1 line
143 KiB
JSON
1 line
143 KiB
JSON
|
{"ast":null,"code":"import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\n// TODO: https://www.w3.org/TR/2017/NOTE-wai-aria-practices-1.1-20171214/examples/treeview/treeview-2/treeview-2a.html\n// Fully accessibility support\n\nimport classNames from 'classnames';\nimport KeyCode from \"rc-util/es/KeyCode\";\nimport pickAttrs from \"rc-util/es/pickAttrs\";\nimport warning from \"rc-util/es/warning\";\nimport * as React from 'react';\nimport { TreeContext } from \"./contextTypes\";\nimport DropIndicator from \"./DropIndicator\";\nimport NodeList, { MOTION_KEY, MotionEntity } from \"./NodeList\";\nimport TreeNode from \"./TreeNode\";\nimport { arrAdd, arrDel, calcDropPosition, calcSelectedKeys, conductExpandParent, getDragChildrenKeys, parseCheckedKeys, posToArr } from \"./util\";\nimport { conductCheck } from \"./utils/conductUtil\";\nimport getEntity from \"./utils/keyUtil\";\nimport { convertDataToEntities, convertNodePropsToEventData, convertTreeToData, fillFieldNames, flattenTreeData, getTreeNodeProps, warningWithoutKey } from \"./utils/treeUtil\";\nvar MAX_RETRY_TIMES = 10;\nvar Tree = /*#__PURE__*/function (_React$Component) {\n _inherits(Tree, _React$Component);\n var _super = _createSuper(Tree);\n function Tree() {\n var _this;\n _classCallCheck(this, Tree);\n for (var _len = arguments.length, _args = new Array(_len), _key = 0; _key < _len; _key++) {\n _args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(_args));\n _defineProperty(_assertThisInitialized(_this), \"destroyed\", false);\n _defineProperty(_assertThisInitialized(_this), \"delayedDragEnterLogic\", void 0);\n _defineProperty(_assertThisInitialized(_this), \"loadingRetryTimes\", {});\n _defineProperty(_assertThisInitialized(_this), \"state\", {\n keyEntities: {},\n indent: null,\n selectedKeys: [],\n checkedKeys: [],\n halfCheckedKeys: [],\n loadedKeys: [],\n loadingKeys: [],\n expandedKeys: [],\n draggingNodeKey: null,\n dragChildrenKeys: [],\n // dropTargetKey is the key of abstract-drop-node\n // the abstract-drop-node is the real drop node when drag and drop\n // not the DOM drag over node\n dropTargetKey: null,\n dropPosition: null,\n // the drop position of abstract-drop-node, inside 0, top -1, bottom 1\n dropContainerKey: null,\n // the container key of abstract-drop-node if dropPosition is -1 or 1\n dropLevelOffset: null,\n // the drop level offset of abstract-drag-over-node\n dropTargetPos: null,\n // the pos of abstract-drop-node\n dropAllowed: true,\n // if drop to abstract-drop-node is allowed\n // the abstract-drag-over-node\n // if mouse is on the bottom of top dom node or no the top of the bottom dom node\n // abstract-drag-over-node is the top node\n dragOverNodeKey: null,\n treeData: [],\n flattenNodes: [],\n focused: false,\n activeKey: null,\n listChanging: false,\n prevProps: null,\n fieldNames: fillFieldNames()\n });\n _defineProperty(_assertThisInitialized(_this), \"dragStartMousePosition\", null);\n _defineProperty(_assertThisInitialized(_this), \"dragNode\", void 0);\n _defineProperty(_assertThisInitialized(_this), \"currentMouseOverDroppableNodeKey\", null);\n _defineProperty(_assertThisInitialized(_this), \"listRef\", /*
|