Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) Safe-mode: OFF (not secure) /var/www/html/wincloud_gateway/node_modules/react-dnd/dist/cjs/common/ drwxr-xr-x | |
| Viewing file: Select action/file-type: "use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.DropTargetMonitorImpl = void 0;
var _invariant = require("@react-dnd/invariant");
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
var isCallingCanDrop = false;
var DropTargetMonitorImpl =
/*#__PURE__*/
function () {
function DropTargetMonitorImpl(manager) {
_classCallCheck(this, DropTargetMonitorImpl);
this.targetId = null;
this.internalMonitor = manager.getMonitor();
}
_createClass(DropTargetMonitorImpl, [{
key: "receiveHandlerId",
value: function receiveHandlerId(targetId) {
this.targetId = targetId;
}
}, {
key: "getHandlerId",
value: function getHandlerId() {
return this.targetId;
}
}, {
key: "subscribeToStateChange",
value: function subscribeToStateChange(listener, options) {
return this.internalMonitor.subscribeToStateChange(listener, options);
}
}, {
key: "canDrop",
value: function canDrop() {
// Cut out early if the target id has not been set. This should prevent errors
// where the user has an older version of dnd-core like in
// https://github.com/react-dnd/react-dnd/issues/1310
if (!this.targetId) {
return false;
}
(0, _invariant.invariant)(!isCallingCanDrop, 'You may not call monitor.canDrop() inside your canDrop() implementation. ' + 'Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor');
try {
isCallingCanDrop = true;
return this.internalMonitor.canDropOnTarget(this.targetId);
} finally {
isCallingCanDrop = false;
}
}
}, {
key: "isOver",
value: function isOver(options) {
if (!this.targetId) {
return false;
}
return this.internalMonitor.isOverTarget(this.targetId, options);
}
}, {
key: "getItemType",
value: function getItemType() {
return this.internalMonitor.getItemType();
}
}, {
key: "getItem",
value: function getItem() {
return this.internalMonitor.getItem();
}
}, {
key: "getDropResult",
value: function getDropResult() {
return this.internalMonitor.getDropResult();
}
}, {
key: "didDrop",
value: function didDrop() {
return this.internalMonitor.didDrop();
}
}, {
key: "getInitialClientOffset",
value: function getInitialClientOffset() {
return this.internalMonitor.getInitialClientOffset();
}
}, {
key: "getInitialSourceClientOffset",
value: function getInitialSourceClientOffset() {
return this.internalMonitor.getInitialSourceClientOffset();
}
}, {
key: "getSourceClientOffset",
value: function getSourceClientOffset() {
return this.internalMonitor.getSourceClientOffset();
}
}, {
key: "getClientOffset",
value: function getClientOffset() {
return this.internalMonitor.getClientOffset();
}
}, {
key: "getDifferenceFromInitialOffset",
value: function getDifferenceFromInitialOffset() {
return this.internalMonitor.getDifferenceFromInitialOffset();
}
}]);
return DropTargetMonitorImpl;
}();
exports.DropTargetMonitorImpl = DropTargetMonitorImpl; |
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0043 ]-- |