Submit
Path:
~
/
/
opt
/
psa
/
admin
/
ui-library
/
File Content:
react-movable.js.map
{"version":3,"file":"react-movable.js?a25c57fe5c569309acf3","mappings":";;;;;;;;;AAAa;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,yBAAyB,mBAAO,CAAC,cAAO;AACxC,4BAA4B,mBAAO,CAAC,mBAAW;AAC/C,cAAc,mBAAO,CAAC,kBAAS;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE,0CAA0C;AACnH;AACA;AACA,aAAa;AACb;AACA;AACA,oEAAoE,wDAAwD;AAC5H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,kBAAkB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4EAA4E,0DAA0D;AACtI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,qCAAqC,wCAAwC;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,gCAAgC;AACzE;AACA;AACA;AACA;AACA;AACA,+CAA+C;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,eAAe;AACrE;AACA;AACA,sDAAsD,eAAe;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,iDAAiD;AACtF;AACA;AACA;AACA;AACA,iCAAiC,4BAA4B;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,eAAe;AAC7E;AACA;AACA,8DAA8D,eAAe;AAC7E;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,aAAa;AACb,6BAA6B,oCAAoC;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C;AACA;AACA;AACA;AACA,SAAS,MAAM,+CAA+C;AAC9D,6CAA6C,gBAAgB,oJAAoJ;AACjN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,gBAAgB,4EAA4E;AAC/I;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA,iBAAiB;AACjB,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,kBAAe;;;;;;;;;;;ACvhBF;AACb;AACA,6CAA6C;AAC7C;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,6BAA6B,mBAAO,CAAC,iBAAQ;AAC7C,YAAY;AACZ,cAAc,mBAAO,CAAC,kBAAS;AAC/B,iBAAiB;AACjB,mBAAmB;;;;;;;;;;;ACTN;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA,8BAA8B;AAC9B,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,yBAAyB,uBAAuB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B","sources":["webpack://PleskUiLibrary/../../../../../../gen/node_modules/node_modules/@plesk/react-movable/lib/List.js","webpack://PleskUiLibrary/../../../../../../gen/node_modules/node_modules/@plesk/react-movable/lib/index.js","webpack://PleskUiLibrary/../../../../../../gen/node_modules/node_modules/@plesk/react-movable/lib/utils.js"],"sourcesContent":["\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result[\"default\"] = mod;\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar React = __importStar(require(\"react\"));\nvar ReactDOM = __importStar(require(\"react-dom\"));\nvar utils_1 = require(\"./utils\");\nvar AUTOSCROLL_ACTIVE_OFFSET = 200;\nvar AUTOSCROLL_SPEED_RATIO = 10;\nvar List = /** @class */ (function (_super) {\n __extends(List, _super);\n function List(props) {\n var _this = _super.call(this, props) || this;\n _this.listRef = React.createRef();\n _this.ghostRef = React.createRef();\n _this.topOffsets = [];\n _this.itemTranslateOffsets = [];\n _this.initialYOffset = 0;\n _this.lastScroll = 0;\n _this.lastYOffset = 0;\n _this.lastListYOffset = 0;\n _this.needle = -1;\n _this.afterIndex = -2;\n _this.state = {\n itemDragged: -1,\n itemDraggedOutOfBounds: -1,\n selectedItem: -1,\n initialX: 0,\n initialY: 0,\n targetX: 0,\n targetY: 0,\n targetHeight: 0,\n targetWidth: 0,\n liveText: '',\n scrollingSpeed: 0,\n scrollWindow: false\n };\n _this.doScrolling = function () {\n var _a = _this.state, scrollingSpeed = _a.scrollingSpeed, scrollWindow = _a.scrollWindow;\n var listEl = _this.listRef.current;\n window.requestAnimationFrame(function () {\n if (scrollWindow) {\n window.scrollTo(window.pageXOffset, window.pageYOffset + scrollingSpeed * 1.5);\n }\n else {\n listEl.scrollTop += scrollingSpeed;\n }\n if (scrollingSpeed !== 0) {\n _this.doScrolling();\n }\n });\n };\n _this.getChildren = function () {\n if (_this.listRef && _this.listRef.current) {\n var children = Array.from(_this.listRef.current.children);\n if (_this.props.hooks &&\n typeof _this.props.hooks.getChildren === 'function') {\n return _this.props.hooks.getChildren(children);\n }\n return children;\n }\n console.warn('No items found in the List container. Did you forget to pass & spread the `props` param in renderList?');\n return [];\n };\n _this.calculateOffsets = function () {\n _this.topOffsets = _this.getChildren().map(function (item) { return item.getBoundingClientRect().top; });\n _this.itemTranslateOffsets = _this.getChildren().map(function (item) {\n return utils_1.getTranslateOffset(item);\n });\n };\n _this.getTargetIndex = function (e) {\n return _this.getChildren().findIndex(function (child) { return child === e.target || child.contains(e.target); });\n };\n _this.onMouseOrTouchStart = function (e) {\n if (_this.dropTimeout && _this.state.itemDragged > -1) {\n window.clearTimeout(_this.dropTimeout);\n _this.finishDrop();\n }\n var isTouch = utils_1.isTouchEvent(e);\n if (!isTouch && e.button !== 0)\n return;\n var index = _this.getTargetIndex(e);\n if (index === -1 ||\n // @ts-ignore\n (_this.props.values[index] && _this.props.values[index].disabled))\n return;\n var listItemTouched = _this.getChildren()[index];\n var handle = listItemTouched.querySelector('[data-movable-handle]');\n if (handle && !handle.contains(e.target)) {\n return;\n }\n if (utils_1.checkIfInteractive(e.target, listItemTouched)) {\n return;\n }\n e.preventDefault();\n _this.props.beforeDrag &&\n _this.props.beforeDrag({\n elements: _this.getChildren(),\n index: index\n });\n if (isTouch) {\n var opts = { passive: false };\n listItemTouched.style.touchAction = 'none';\n document.addEventListener('touchend', _this.schdOnEnd, opts);\n document.addEventListener('touchmove', _this.schdOnTouchMove, opts);\n document.addEventListener('touchcancel', _this.schdOnEnd, opts);\n }\n else {\n document.addEventListener('mousemove', _this.schdOnMouseMove);\n document.addEventListener('mouseup', _this.schdOnEnd);\n var listItemDragged = _this.getChildren()[_this.state.itemDragged];\n if (listItemDragged && listItemDragged.style) {\n listItemDragged.style.touchAction = '';\n }\n }\n _this.onStart(listItemTouched, isTouch ? e.touches[0].clientX : e.clientX, isTouch ? e.touches[0].clientY : e.clientY, index);\n };\n _this.getYOffset = function () {\n var listScroll = _this.listRef.current\n ? _this.listRef.current.scrollTop\n : 0;\n return window.pageYOffset + listScroll;\n };\n _this.onStart = function (target, clientX, clientY, index) {\n if (_this.state.selectedItem > -1) {\n _this.setState({ selectedItem: -1 });\n _this.needle = -1;\n }\n var targetRect = target.getBoundingClientRect();\n var targetStyles = window.getComputedStyle(target);\n _this.calculateOffsets();\n _this.initialYOffset = _this.getYOffset();\n _this.lastYOffset = window.pageYOffset;\n _this.lastListYOffset = _this.listRef.current.scrollTop;\n _this.setState({\n itemDragged: index,\n targetX: targetRect.left - parseInt(targetStyles['margin-left'], 10),\n targetY: targetRect.top - parseInt(targetStyles['margin-top'], 10),\n targetHeight: targetRect.height,\n targetWidth: targetRect.width,\n initialX: clientX,\n initialY: clientY\n });\n };\n _this.onMouseMove = function (e) {\n e.cancelable && e.preventDefault();\n _this.onMove(e.clientX, e.clientY);\n };\n _this.onTouchMove = function (e) {\n e.cancelable && e.preventDefault();\n _this.onMove(e.touches[0].clientX, e.touches[0].clientY);\n };\n _this.onWheel = function (e) {\n if (_this.state.itemDragged < 0)\n return;\n _this.lastScroll = _this.listRef.current.scrollTop += e.deltaY;\n _this.moveOtherItems();\n };\n _this.onMove = function (clientX, clientY) {\n if (_this.state.itemDragged === -1)\n return null;\n utils_1.transformItem(_this.ghostRef.current, clientY - _this.state.initialY, _this.props.lockVertically ? 0 : clientX - _this.state.initialX);\n _this.autoScrolling(clientY);\n _this.moveOtherItems();\n };\n _this.moveOtherItems = function () {\n var targetRect = _this.ghostRef.current.getBoundingClientRect();\n var itemVerticalCenter = targetRect.top + targetRect.height / 2;\n var offset = utils_1.getTranslateOffset(_this.getChildren()[_this.state.itemDragged]);\n var currentYOffset = _this.getYOffset();\n // adjust offsets if scrolling happens during the item movement\n if (_this.initialYOffset !== currentYOffset) {\n _this.topOffsets = _this.topOffsets.map(function (offset) { return offset - (currentYOffset - _this.initialYOffset); });\n _this.initialYOffset = currentYOffset;\n }\n if (_this.isDraggedItemOutOfBounds() && _this.props.removableByMove) {\n _this.afterIndex = _this.topOffsets.length + 1;\n }\n else {\n _this.afterIndex = utils_1.binarySearch(_this.topOffsets, itemVerticalCenter);\n }\n _this.animateItems(_this.afterIndex === -1 ? 0 : _this.afterIndex, _this.state.itemDragged, offset);\n };\n _this.autoScrolling = function (clientY) {\n var _a = _this.listRef.current.getBoundingClientRect(), top = _a.top, bottom = _a.bottom, height = _a.height;\n var viewportHeight = window.innerHeight || document.documentElement.clientHeight;\n // autoscrolling for the window (down)\n if (bottom > viewportHeight &&\n viewportHeight - clientY < AUTOSCROLL_ACTIVE_OFFSET) {\n _this.setState({\n scrollingSpeed: Math.round((AUTOSCROLL_ACTIVE_OFFSET - (viewportHeight - clientY)) /\n AUTOSCROLL_SPEED_RATIO),\n scrollWindow: true\n });\n // autoscrolling for the window (up)\n }\n else if (top < 0 && clientY < AUTOSCROLL_ACTIVE_OFFSET) {\n _this.setState({\n scrollingSpeed: Math.round((AUTOSCROLL_ACTIVE_OFFSET - clientY) / -AUTOSCROLL_SPEED_RATIO),\n scrollWindow: true\n });\n }\n else {\n if (_this.state.scrollWindow && _this.state.scrollingSpeed !== 0) {\n _this.setState({ scrollingSpeed: 0, scrollWindow: false });\n }\n // autoscrolling for containers with overflow\n if (height + 20 < _this.listRef.current.scrollHeight) {\n var scrollingSpeed = 0;\n if (clientY - top < AUTOSCROLL_ACTIVE_OFFSET) {\n scrollingSpeed = Math.round((AUTOSCROLL_ACTIVE_OFFSET - (clientY - top)) /\n -AUTOSCROLL_SPEED_RATIO);\n }\n else if (bottom - clientY < AUTOSCROLL_ACTIVE_OFFSET) {\n scrollingSpeed = Math.round((AUTOSCROLL_ACTIVE_OFFSET - (bottom - clientY)) /\n AUTOSCROLL_SPEED_RATIO);\n }\n if (_this.state.scrollingSpeed !== scrollingSpeed) {\n _this.setState({ scrollingSpeed: scrollingSpeed });\n }\n }\n }\n };\n _this.animateItems = function (needle, movedItem, offset, animateMovedItem) {\n if (animateMovedItem === void 0) { animateMovedItem = false; }\n _this.getChildren().forEach(function (item, i) {\n utils_1.setItemTransition(item, _this.props.transitionDuration);\n if (movedItem === i && animateMovedItem) {\n if (movedItem === needle) {\n return utils_1.transformItem(item, null);\n }\n utils_1.transformItem(item, movedItem < needle\n ? _this.itemTranslateOffsets\n .slice(movedItem + 1, needle + 1)\n .reduce(function (a, b) { return a + b; }, 0)\n : _this.itemTranslateOffsets\n .slice(needle, movedItem)\n .reduce(function (a, b) { return a + b; }, 0) * -1);\n }\n else if (movedItem < needle && i > movedItem && i <= needle) {\n utils_1.transformItem(item, -offset);\n }\n else if (i < movedItem && movedItem > needle && i >= needle) {\n utils_1.transformItem(item, offset);\n }\n else {\n utils_1.transformItem(item, null);\n }\n });\n };\n _this.isDraggedItemOutOfBounds = function () {\n var initialRect = _this.getChildren()[_this.state.itemDragged].getBoundingClientRect();\n var targetRect = _this.ghostRef.current.getBoundingClientRect();\n if (Math.abs(initialRect.left - targetRect.left) > targetRect.width) {\n if (_this.state.itemDraggedOutOfBounds === -1) {\n _this.setState({ itemDraggedOutOfBounds: _this.state.itemDragged });\n }\n return true;\n }\n if (_this.state.itemDraggedOutOfBounds > -1) {\n _this.setState({ itemDraggedOutOfBounds: -1 });\n }\n return false;\n };\n _this.onEnd = function (e) {\n e.cancelable && e.preventDefault();\n document.removeEventListener('mousemove', _this.schdOnMouseMove);\n document.removeEventListener('touchmove', _this.schdOnTouchMove);\n document.removeEventListener('mouseup', _this.schdOnEnd);\n document.removeEventListener('touchup', _this.schdOnEnd);\n document.removeEventListener('touchcancel', _this.schdOnEnd);\n var removeItem = _this.props.removableByMove && _this.isDraggedItemOutOfBounds();\n if (!removeItem &&\n _this.props.transitionDuration > 0 &&\n _this.afterIndex !== -2) {\n // animate drop\n utils_1.schd(function () {\n utils_1.setItemTransition(_this.ghostRef.current, _this.props.transitionDuration, 'cubic-bezier(.2,1,.1,1)');\n if (_this.afterIndex < 1 && _this.state.itemDragged === 0) {\n utils_1.transformItem(_this.ghostRef.current, 0, 0);\n }\n else {\n utils_1.transformItem(_this.ghostRef.current, \n // compensate window scroll\n -(window.pageYOffset - _this.lastYOffset) +\n // compensate container scroll\n -(_this.listRef.current.scrollTop - _this.lastListYOffset) +\n (_this.state.itemDragged < _this.afterIndex\n ? _this.itemTranslateOffsets\n .slice(_this.state.itemDragged + 1, _this.afterIndex + 1)\n .reduce(function (a, b) { return a + b; }, 0)\n : _this.itemTranslateOffsets\n .slice(_this.afterIndex < 0 ? 0 : _this.afterIndex, _this.state.itemDragged)\n .reduce(function (a, b) { return a + b; }, 0) * -1), 0);\n }\n })();\n }\n _this.dropTimeout = window.setTimeout(_this.finishDrop, removeItem || _this.afterIndex === -2 ? 0 : _this.props.transitionDuration);\n };\n _this.finishDrop = function () {\n var removeItem = _this.props.removableByMove && _this.isDraggedItemOutOfBounds();\n if (removeItem ||\n (_this.afterIndex > -2 && _this.state.itemDragged !== _this.afterIndex)) {\n _this.props.onChange({\n oldIndex: _this.state.itemDragged,\n newIndex: removeItem ? -1 : Math.max(_this.afterIndex, 0),\n targetRect: _this.ghostRef.current.getBoundingClientRect()\n });\n }\n _this.getChildren().forEach(function (item) {\n utils_1.setItemTransition(item, 0);\n utils_1.transformItem(item, null);\n });\n _this.setState({ itemDragged: -1, scrollingSpeed: 0 });\n _this.afterIndex = -2;\n // sometimes the scroll gets messed up after the drop, fix:\n if (_this.lastScroll > 0) {\n _this.listRef.current.scrollTop = _this.lastScroll;\n _this.lastScroll = 0;\n }\n };\n _this.onKeyDown = function (e) {\n var selectedItem = _this.state.selectedItem;\n var index = _this.getTargetIndex(e);\n if (utils_1.checkIfInteractive(e.target, e.currentTarget)) {\n return;\n }\n if (index === -1)\n return;\n if (e.key === ' ') {\n e.preventDefault();\n if (selectedItem === index) {\n if (selectedItem !== _this.needle) {\n _this.getChildren().forEach(function (item) {\n utils_1.setItemTransition(item, 0);\n utils_1.transformItem(item, null);\n });\n _this.props.onChange({\n oldIndex: selectedItem,\n newIndex: _this.needle,\n targetRect: _this.getChildren()[_this.needle].getBoundingClientRect()\n });\n _this.getChildren()[_this.needle].focus();\n }\n _this.setState({\n selectedItem: -1,\n liveText: _this.props.voiceover.dropped(selectedItem + 1, _this.needle + 1)\n });\n _this.needle = -1;\n }\n else {\n _this.setState({\n selectedItem: index,\n liveText: _this.props.voiceover.lifted(index + 1)\n });\n _this.needle = index;\n _this.calculateOffsets();\n }\n }\n if ((e.key === 'ArrowDown' || e.key === 'j') &&\n selectedItem > -1 &&\n _this.needle < _this.props.values.length - 1) {\n e.preventDefault();\n var offset = utils_1.getTranslateOffset(_this.getChildren()[selectedItem]);\n _this.needle++;\n _this.animateItems(_this.needle, selectedItem, offset, true);\n _this.setState({\n liveText: _this.props.voiceover.moved(_this.needle + 1, false)\n });\n }\n if ((e.key === 'ArrowUp' || e.key === 'k') &&\n selectedItem > -1 &&\n _this.needle > 0) {\n e.preventDefault();\n var offset = utils_1.getTranslateOffset(_this.getChildren()[selectedItem]);\n _this.needle--;\n _this.animateItems(_this.needle, selectedItem, offset, true);\n _this.setState({\n liveText: _this.props.voiceover.moved(_this.needle + 1, true)\n });\n }\n if (e.key === 'Escape' && selectedItem > -1) {\n _this.getChildren().forEach(function (item) {\n utils_1.setItemTransition(item, 0);\n utils_1.transformItem(item, null);\n });\n _this.setState({\n selectedItem: -1,\n liveText: _this.props.voiceover.canceled(selectedItem + 1)\n });\n _this.needle = -1;\n }\n if ((e.key === 'Tab' || e.key === 'Enter') && selectedItem > -1) {\n e.preventDefault();\n }\n };\n _this.schdOnMouseMove = utils_1.schd(_this.onMouseMove);\n _this.schdOnTouchMove = utils_1.schd(_this.onTouchMove);\n _this.schdOnEnd = utils_1.schd(_this.onEnd);\n return _this;\n }\n List.prototype.componentDidMount = function () {\n this.calculateOffsets();\n document.addEventListener('touchstart', this.onMouseOrTouchStart, {\n passive: false,\n capture: false\n });\n document.addEventListener('mousedown', this.onMouseOrTouchStart);\n };\n List.prototype.componentDidUpdate = function (_prevProps, prevState) {\n if (prevState.scrollingSpeed !== this.state.scrollingSpeed &&\n prevState.scrollingSpeed === 0) {\n this.doScrolling();\n }\n };\n List.prototype.componentWillUnmount = function () {\n document.removeEventListener('touchstart', this.onMouseOrTouchStart);\n document.removeEventListener('mousedown', this.onMouseOrTouchStart);\n };\n List.prototype.render = function () {\n var _this = this;\n var baseStyle = __assign(__assign({}, (this.props.useDragHandle ? undefined : {\n userSelect: 'none',\n WebkitUserSelect: 'none',\n MozUserSelect: 'none',\n msUserSelect: 'none',\n })), { boxSizing: 'border-box', position: 'relative' });\n var ghostStyle = __assign(__assign({}, baseStyle), { top: this.state.targetY, left: this.state.targetX, width: this.state.targetWidth, height: this.state.targetHeight, position: 'fixed', marginTop: 0 });\n return (React.createElement(React.Fragment, null,\n this.props.renderList({\n children: this.props.values.map(function (value, index) {\n var isHidden = index === _this.state.itemDragged;\n var isSelected = index === _this.state.selectedItem;\n var isDisabled = \n // @ts-ignore\n _this.props.values[index] && _this.props.values[index].disabled;\n var props = {\n key: index,\n tabIndex: isDisabled ? -1 : 0,\n 'aria-roledescription': _this.props.voiceover.item(index + 1),\n onKeyDown: _this.onKeyDown,\n style: __assign(__assign({}, baseStyle), { visibility: isHidden ? 'hidden' : undefined, zIndex: isSelected ? 5000 : 0 })\n };\n return _this.props.renderItem({\n value: value,\n props: props,\n index: index,\n isDragged: false,\n isSelected: isSelected,\n isOutOfBounds: false\n });\n }),\n isDragged: this.state.itemDragged > -1,\n props: {\n ref: this.listRef\n }\n }),\n this.state.itemDragged > -1 &&\n ReactDOM.createPortal(this.props.renderItem({\n value: this.props.values[this.state.itemDragged],\n props: {\n ref: this.ghostRef,\n style: ghostStyle,\n onWheel: this.onWheel\n },\n index: this.state.itemDragged,\n isDragged: true,\n isSelected: false,\n isOutOfBounds: this.state.itemDraggedOutOfBounds > -1\n }), this.props.container || document.body),\n React.createElement(\"div\", { \"aria-live\": \"assertive\", role: \"log\", \"aria-atomic\": \"true\", style: {\n position: 'absolute',\n width: '1px',\n height: '1px',\n margin: '-1px',\n border: '0px',\n padding: '0px',\n overflow: 'hidden',\n clip: 'rect(0px, 0px, 0px, 0px)',\n clipPath: 'inset(100%)'\n } }, this.state.liveText)));\n };\n List.defaultProps = {\n transitionDuration: 300,\n lockVertically: false,\n removableByMove: false,\n voiceover: {\n item: function (position) {\n return \"You are currently at a draggable item at position \" + position + \". Press space bar to lift.\";\n },\n lifted: function (position) {\n return \"You have lifted item at position \" + position + \". Press j to move down, k to move up, space bar to drop and escape to cancel.\";\n },\n moved: function (position, up) {\n return \"You have moved the lifted item \" + (up ? 'up' : 'down') + \" to position \" + position + \". Press j to move down, k to move up, space bar to drop and escape to cancel.\";\n },\n dropped: function (from, to) {\n return \"You have dropped the item. It has moved from position \" + from + \" to \" + to + \".\";\n },\n canceled: function (position) {\n return \"You have cancelled the movement. The item has returned to its starting position of \" + position + \".\";\n }\n }\n };\n return List;\n}(React.Component));\nexports.default = List;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar List_1 = __importDefault(require(\"./List\"));\nexports.List = List_1.default;\nvar utils_1 = require(\"./utils\");\nexports.arrayMove = utils_1.arrayMove;\nexports.arrayRemove = utils_1.arrayRemove;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction arrayMove(array, from, to) {\n array = array.slice();\n array.splice(to < 0 ? array.length + to : to, 0, array.splice(from, 1)[0]);\n return array;\n}\nexports.arrayMove = arrayMove;\nfunction arrayRemove(array, index) {\n array = array.slice();\n array.splice(index, 1);\n return array;\n}\nexports.arrayRemove = arrayRemove;\nfunction getTranslateOffset(element) {\n var style = window.getComputedStyle(element);\n return (Math.max(parseInt(style['margin-top'], 10), parseInt(style['margin-bottom'], 10)) + element.getBoundingClientRect().height);\n}\nexports.getTranslateOffset = getTranslateOffset;\nfunction isTouchEvent(event) {\n return ((event.touches && event.touches.length) ||\n (event.changedTouches && event.changedTouches.length));\n}\nexports.isTouchEvent = isTouchEvent;\nfunction transformItem(element, offsetY, offsetX) {\n if (offsetY === void 0) { offsetY = 0; }\n if (offsetX === void 0) { offsetX = 0; }\n if (!element)\n return;\n if (offsetY === null || offsetX === null) {\n element.style.removeProperty('transform');\n return;\n }\n element.style.transform = \"translate(\" + offsetX + \"px, \" + offsetY + \"px)\";\n}\nexports.transformItem = transformItem;\nfunction isItemTransformed(element) {\n return !!element.style.transform;\n}\nexports.isItemTransformed = isItemTransformed;\nfunction setItemTransition(element, duration, timing) {\n if (element) {\n element.style['transition'] = \"transform \" + duration + \"ms\" + (timing ? \" \" + timing : '');\n }\n}\nexports.setItemTransition = setItemTransition;\n// returns the \"slot\" for the targetValue, aka where it should go\n// in an ordered \"array\", it starts with -1 index\nfunction binarySearch(array, targetValue) {\n var min = 0;\n var max = array.length - 1;\n var guess;\n while (min <= max) {\n guess = Math.floor((max + min) / 2);\n if (!array[guess + 1] ||\n (array[guess] <= targetValue && array[guess + 1] >= targetValue)) {\n return guess;\n }\n else if (array[guess] < targetValue && array[guess + 1] < targetValue) {\n min = guess + 1;\n }\n else {\n max = guess - 1;\n }\n }\n return -1;\n}\nexports.binarySearch = binarySearch;\n// adapted from https://github.com/alexreardon/raf-schd\nexports.schd = function (fn) {\n var lastArgs = [];\n var frameId = null;\n var wrapperFn = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n lastArgs = args;\n if (frameId) {\n return;\n }\n frameId = requestAnimationFrame(function () {\n frameId = null;\n fn.apply(void 0, lastArgs);\n });\n };\n return wrapperFn;\n};\nfunction checkIfInteractive(target, rootElement) {\n var DISABLED_ELEMENTS = [\n 'input',\n 'textarea',\n 'select',\n 'option',\n 'optgroup',\n 'video',\n 'audio',\n 'button',\n 'a'\n ];\n var DISABLED_ROLES = ['button', 'link', 'checkbox', 'tab'];\n while (target !== rootElement) {\n if (target.getAttribute('data-movable-handle')) {\n return false;\n }\n if (DISABLED_ELEMENTS.includes(target.tagName.toLowerCase())) {\n return true;\n }\n var role = target.getAttribute('role');\n if (role && DISABLED_ROLES.includes(role.toLowerCase())) {\n return true;\n }\n if (target.tagName.toLowerCase() === 'label' &&\n target.hasAttribute('for')) {\n return true;\n }\n if (target.tagName)\n target = target.parentElement;\n }\n return false;\n}\nexports.checkIfInteractive = checkIfInteractive;\n"],"names":[],"sourceRoot":""}
Submit
FILE
FOLDER
INFO
Name
Size
Permission
Action
fonts
---
0755
images
---
0755
5.js
1706572 bytes
0644
5.js.map
2034503 bytes
0644
5.min.js
810920 bytes
0644
5.min.js.map
2670761 bytes
0644
codemirror.js
4338 bytes
0644
codemirror.js.map
5303 bytes
0644
codemirror.min.js
3351 bytes
0644
codemirror.min.js.map
6616 bytes
0644
plesk-ui-library-rtl.css
215125 bytes
0644
plesk-ui-library-rtl.css.map
582055 bytes
0644
plesk-ui-library-rtl.js
3058 bytes
0644
plesk-ui-library-rtl.js.map
2281 bytes
0644
plesk-ui-library-rtl.min.js
648 bytes
0644
plesk-ui-library-rtl.min.js.map
2413 bytes
0644
plesk-ui-library.css
214979 bytes
0644
plesk-ui-library.css.map
581759 bytes
0644
plesk-ui-library.js
2814412 bytes
0644
plesk-ui-library.js.map
2818053 bytes
0644
plesk-ui-library.min.js
672897 bytes
0644
plesk-ui-library.min.js.map
1988694 bytes
0644
react-movable.js
31227 bytes
0644
react-movable.js.map
35329 bytes
0644
react-movable.min.js
14147 bytes
0644
react-movable.min.js.map
48785 bytes
0644
react-sortable-hoc.js
87420 bytes
0644
react-sortable-hoc.js.map
79054 bytes
0644
react-sortable-hoc.min.js
29520 bytes
0644
react-sortable-hoc.min.js.map
105538 bytes
0644
N4ST4R_ID | Naxtarrr