1 line
180 KiB
JSON
1 line
180 KiB
JSON
{"ast":null,"code":"import React, { Component } from 'react';\nimport { DomHandler, ObjectUtils, classNames } from 'primereact/utils';\nimport { Ripple } from 'primereact/ripple';\n\nfunction _arrayLikeToArray$2(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray$2(arr);\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\n\nfunction _unsupportedIterableToArray$2(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray$2(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$2(o, minLen);\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray$2(arr) || _nonIterableSpread();\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n Object.defineProperty(subClass, \"prototype\", {\n writable: false\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, _typeof(obj);\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n } else if (call !== void 0) {\n throw new TypeError(\"Derived constructors may only return object or undefined\");\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction _createForOfIteratorHelper$1(o, allowArrayLike) {\n var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"];\n\n if (!it) {\n if (Array.isArray(o) || (it = _unsupportedIterableToArray$1(o)) || allowArrayLike && o && typeof o.length === \"number\") {\n if (it) o = it;\n var i = 0;\n\n var F = function F() {};\n\n return {\n s: F,\n n: function n() {\n if (i >= o.length) return {\n done: true\n };\n return {\n done: false,\n value: o[i++]\n };\n },\n e: function e(_e) {\n throw _e;\n },\n f: F\n };\n }\n\n throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n }\n\n var normalCompletion = true,\n didErr = false,\n err;\n return {\n s: function s() {\n it = it.call(o);\n },\n n: function n() {\n var step = it.next();\n normalCompletion = step.done;\n return step;\n },\n e: function e(_e2) {\n didErr = true;\n err = _e2;\n },\n f: function f() {\n try {\n if (!normalCompletion && it[\"return\"] != null) it[\"return\"]();\n } finally {\n if (didErr) throw err;\n }\n }\n };\n}\n\nfunction _unsupportedIterableToArray$1(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray$1(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$1(o, minLen);\n}\n\nfunction _arrayLikeToArray$1(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nfunction ownKeys$1(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n enumerableOnly && (symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n })), keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread$1(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = null != arguments[i] ? arguments[i] : {};\n i % 2 ? ownKeys$1(Object(source), !0).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n\n return target;\n}\n\nfunction _createSuper$1(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct$1();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _isNativeReflectConstruct$1() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nvar UITreeNode = /*#__PURE__*/function (_Component) {\n _inherits(UITreeNode, _Component);\n\n var _super = _createSuper$1(UITreeNode);\n\n function UITreeNode(props) {\n var _this;\n\n _classCallCheck(this, UITreeNode);\n\n _this = _super.call(this, props);\n _this.onClick = _this.onClick.bind(_assertThisInitialized(_this));\n _this.onDoubleClick = _this.onDoubleClick.bind(_assertThisInitialized(_this));\n _this.onRightClick = _this.onRightClick.bind(_assertThisInitialized(_this));\n _this.onTouchEnd = _this.onTouchEnd.bind(_assertThisInitialized(_this));\n _this.onTogglerClick = _this.onTogglerClick.bind(_assertThisInitialized(_this));\n _this.onNodeKeyDown = _this.onNodeKeyDown.bind(_assertThisInitialized(_this));\n _this.propagateUp = _this.propagateUp.bind(_assertThisInitialized(_this));\n _this.onDrop = _this.onDrop.bind(_assertThisInitialized(_this));\n _this.onDragOver = _this.onDragOver.bind(_assertThisInitialized(_this));\n _this.onDragEnter = _this.onDragEnter.bind(_assertThisInitialized(_this));\n _this.onDragLeave = _this.onDragLeave.bind(_assertThisInitialized(_this));\n _this.onDragStart = _this.onDragStart.bind(_assertThisInitialized(_this));\n _this.onDragEnd = _this.onDragEnd.bind(_assertThisInitialized(_this));\n _this.onDropPointDragOver = _this.onDropPointDragOver.bind(_assertThisInitialized(_this));\n _this.onDropPointDragEnter = _this.onDropPointDragEnter.bind(_assertThisInitialized(_this));\n _this.onDropPointDragLeave = _this.onDropPointDragLeave.bind(_assertThisInitialized(_this));\n return _this;\n }\n\n _createClass(UITreeNode, [{\n key: \"isLeaf\",\n value: function isLeaf() {\n return this.props.isNodeLeaf(this.props.node);\n }\n }, {\n key: \"expand\",\n value: function expand(event) {\n var expandedKeys = this.props.expandedKeys ? _objectSpread$1({}, this.props.expandedKeys) : {};\n expandedKeys[this.props.node.key] = true;\n this.props.onToggle({\n originalEvent: event,\n value: expandedKeys\n });\n this.invokeToggleEvents(event, true);\n }\n }, {\n key: \"collapse\",\n value: function collapse(event) {\n var expandedKeys = _objectSpread$1({}, this.props.expandedKeys);\n\n delete expandedKeys[this.props.node.key];\n this.props.onToggle({\n originalEvent: event,\n value: expandedKeys\n });\n this.invokeToggleEvents(event, false);\n }\n }, {\n key: \"onTogglerClick\",\n value: function onTogglerClick(event) {\n if (this.props.disabled) {\n return;\n }\n\n if (this.isExpanded()) this.collapse(event);else this.expand(event);\n }\n }, {\n key: \"invokeToggleEvents\",\n value: function invokeToggleEvents(event, expanded) {\n if (expanded) {\n if (this.props.onExpand) {\n this.props.onExpand({\n originalEvent: event,\n node: this.props.node\n });\n }\n } else {\n if (this.props.onCollapse) {\n this.props.onCollapse({\n originalEvent: event,\n node: this.props.node\n });\n }\n }\n }\n }, {\n key: \"isExpanded\",\n value: function isExpanded() {\n return (this.props.expandedKeys ? this.props.expandedKeys[this.props.node.key] !== undefined : false) || this.props.node.expanded;\n }\n }, {\n key: \"onNodeKeyDown\",\n value: function onNodeKeyDown(event) {\n if (this.props.disabled) {\n return;\n }\n\n var nodeElement = event.target.parentElement;\n\n if (!DomHandler.hasClass(nodeElement, 'p-treenode')) {\n return;\n }\n\n switch (event.which) {\n //down arrow\n case 40:\n var listElement = nodeElement.children[1];\n\n if (listElement) {\n this.focusNode(listElement.children[0]);\n } else {\n var nextNodeElement = nodeElement.nextElementSibling;\n\n if (nextNodeElement) {\n this.focusNode(nextNodeElement);\n } else {\n var nextSiblingAncestor = this.findNextSiblingOfAncestor(nodeElement);\n\n if (nextSiblingAncestor) {\n this.focusNode(nextSiblingAncestor);\n }\n }\n }\n\n event.preventDefault();\n break;\n //up arrow\n\n case 38:\n if (nodeElement.previousElementSibling) {\n this.focusNode(this.findLastVisibleDescendant(nodeElement.previousElementSibling));\n } else {\n var parentNodeElement = this.getParentNodeElement(nodeElement);\n\n if (parentNodeElement) {\n this.focusNode(parentNodeElement);\n }\n }\n\n event.preventDefault();\n break;\n //right arrow\n\n case 39:\n if (!this.isExpanded()) {\n this.expand(event);\n }\n\n event.preventDefault();\n break;\n //left arrow\n\n case 37:\n if (this.isExpanded()) {\n this.collapse(event);\n }\n\n event.preventDefault();\n break;\n //enter\n\n case 13:\n this.onClick(event);\n event.preventDefault();\n break;\n }\n }\n }, {\n key: \"findNextSiblingOfAncestor\",\n value: function findNextSiblingOfAncestor(nodeElement) {\n var parentNodeElement = this.getParentNodeElement(nodeElement);\n\n if (parentNodeElement) {\n if (parentNodeElement.nextElementSibling) return parentNodeElement.nextElementSibling;else return this.findNextSiblingOfAncestor(parentNodeElement);\n } else {\n return null;\n }\n }\n }, {\n key: \"findLastVisibleDescendant\",\n value: function findLastVisibleDescendant(nodeElement) {\n var childrenListElement = nodeElement.children[1];\n\n if (childrenListElement) {\n var lastChildElement = childrenListElement.children[childrenListElement.children.length - 1];\n return this.findLastVisibleDescendant(lastChildElement);\n } else {\n return nodeElement;\n }\n }\n }, {\n key: \"getParentNodeElement\",\n value: function getParentNodeElement(nodeElement) {\n var parentNodeElement = nodeElement.parentElement.parentElement;\n return DomHandler.hasClass(parentNodeElement, 'p-treenode') ? parentNodeElement : null;\n }\n }, {\n key: \"focusNode\",\n value: function focusNode(element) {\n element.children[0].focus();\n }\n }, {\n key: \"onClick\",\n value: function onClick(event) {\n if (this.props.onClick) {\n this.props.onClick({\n originalEvent: event,\n node: this.props.node\n });\n }\n\n if (event.target.className && event.target.className.constructor === String && event.target.className.indexOf('p-tree-toggler') === 0 || this.props.disabled) {\n return;\n }\n\n if (this.props.selectionMode && this.props.node.selectable !== false) {\n var selectionKeys;\n\n if (this.isCheckboxSelectionMode()) {\n var checked = this.isChecked();\n selectionKeys = this.props.selectionKeys ? _objectSpread$1({}, this.props.selectionKeys) : {};\n\n if (checked) {\n if (this.props.propagateSelectionDown) this.propagateDown(this.props.node, false, selectionKeys);else delete selectionKeys[this.props.node.key];\n\n if (this.props.propagateSelectionUp && this.props.onPropagateUp) {\n this.props.onPropagateUp({\n originalEvent: event,\n check: false,\n selectionKeys: selectionKeys\n });\n }\n\n if (this.props.onUnselect) {\n this.props.onUnselect({\n originalEvent: event,\n node: this.props.node\n });\n }\n } else {\n if (this.props.propagateSelectionDown) this.propagateDown(this.props.node, true, selectionKeys);else selectionKeys[this.props.node.key] = {\n checked: true\n };\n\n if (this.props.propagateSelectionUp && this.props.onPropagateUp) {\n this.props.onPropagateUp({\n originalEvent: event,\n check: true,\n selectionKeys: selectionKeys\n });\n }\n\n if (this.props.onSelect) {\n this.props.onSelect({\n originalEvent: event,\n node: this.props.node\n });\n }\n }\n } else {\n var selected = this.isSelected();\n var metaSelection = this.nodeTouched ? false : this.props.metaKeySelection;\n\n if (metaSelection) {\n var metaKey = event.metaKey || event.ctrlKey;\n\n if (selected && metaKey) {\n if (this.isSingleSelectionMode()) {\n selectionKeys = null;\n } else {\n selectionKeys = _objectSpread$1({}, this.props.selectionKeys);\n delete selectionKeys[this.props.node.key];\n }\n\n if (this.props.onUnselect) {\n this.props.onUnselect({\n originalEvent: event,\n node: this.props.node\n });\n }\n } else {\n if (this.isSingleSelectionMode()) {\n selectionKeys = this.props.node.key;\n } else if (this.isMultipleSelectionMode()) {\n selectionKeys = !metaKey ? {} : this.props.selectionKeys ? _objectSpread$1({}, this.props.selectionKeys) : {};\n selectionKeys[this.props.node.key] = true;\n }\n\n if (this.props.onSelect) {\n this.props.onSelect({\n originalEvent: event,\n node: this.props.node\n });\n }\n }\n } else {\n if (this.isSingleSelectionMode()) {\n if (selected) {\n selectionKeys = null;\n\n if (this.props.onUnselect) {\n this.props.onUnselect({\n originalEvent: event,\n node: this.props.node\n });\n }\n } else {\n selectionKeys = this.props.node.key;\n\n if (this.props.onSelect) {\n this.props.onSelect({\n originalEvent: event,\n node: this.props.node\n });\n }\n }\n } else {\n if (selected) {\n selectionKeys = _objectSpread$1({}, this.props.selectionKeys);\n delete selectionKeys[this.props.node.key];\n\n if (this.props.onUnselect) {\n this.props.onUnselect({\n originalEvent: event,\n node: this.props.node\n });\n }\n } else {\n selectionKeys = this.props.selectionKeys ? _objectSpread$1({}, this.props.selectionKeys) : {};\n selectionKeys[this.props.node.key] = true;\n\n if (this.props.onSelect) {\n this.props.onSelect({\n originalEvent: event,\n node: this.props.node\n });\n }\n }\n }\n }\n }\n\n if (this.props.onSelectionChange) {\n this.props.onSelectionChange({\n originalEvent: event,\n value: selectionKeys\n });\n }\n }\n\n this.nodeTouched = false;\n }\n }, {\n key: \"onDoubleClick\",\n value: function onDoubleClick(event) {\n if (this.props.onDoubleClick) {\n this.props.onDoubleClick({\n originalEvent: event,\n node: this.props.node\n });\n }\n }\n }, {\n key: \"onRightClick\",\n value: function onRightClick(event) {\n if (this.props.disabled) {\n return;\n }\n\n DomHandler.clearSelection();\n\n if (this.props.onContextMenuSelectionChange) {\n this.props.onContextMenuSelectionChange({\n originalEvent: event,\n value: this.props.node.key\n });\n }\n\n if (this.props.onContextMenu) {\n this.props.onContextMenu({\n originalEvent: event,\n node: this.props.node\n });\n }\n }\n }, {\n key: \"propagateUp\",\n value: function propagateUp(event) {\n var check = event.check;\n var selectionKeys = event.selectionKeys;\n var checkedChildCount = 0;\n var childPartialSelected = false;\n\n var _iterator = _createForOfIteratorHelper$1(this.props.node.children),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var child = _step.value;\n if (selectionKeys[child.key] && selectionKeys[child.key].checked) checkedChildCount++;else if (selectionKeys[child.key] && selectionKeys[child.key].partialChecked) childPartialSelected = true;\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n\n if (check && checkedChildCount === this.props.node.children.length) {\n selectionKeys[this.props.node.key] = {\n checked: true,\n partialChecked: false\n };\n } else {\n if (!check) {\n delete selectionKeys[this.props.node.key];\n }\n\n if (childPartialSelected || checkedChildCount > 0 && checkedChildCount !== this.props.node.children.length) selectionKeys[this.props.node.key] = {\n checked: false,\n partialChecked: true\n };else delete selectionKeys[this.props.node.key];\n }\n\n if (this.props.propagateSelectionUp && this.props.onPropagateUp) {\n this.props.onPropagateUp(event);\n }\n }\n }, {\n key: \"propagateDown\",\n value: function propagateDown(node, check, selectionKeys) {\n if (check) selectionKeys[node.key] = {\n checked: true,\n partialChecked: false\n };else delete selectionKeys[node.key];\n\n if (node.children && node.children.length) {\n for (var i = 0; i < node.children.length; i++) {\n this.propagateDown(node.children[i], check, selectionKeys);\n }\n }\n }\n }, {\n key: \"isSelected\",\n value: function isSelected() {\n if (this.props.selectionMode && this.props.selectionKeys) return this.isSingleSelectionMode() ? this.props.selectionKeys === this.props.node.key : this.props.selectionKeys[this.props.node.key] !== undefined;else return false;\n }\n }, {\n key: \"isChecked\",\n value: function isChecked() {\n return this.props.selectionKeys ? this.props.selectionKeys[this.props.node.key] && this.props.selectionKeys[this.props.node.key].checked : false;\n }\n }, {\n key: \"isPartialChecked\",\n value: function isPartialChecked() {\n return this.props.selectionKeys ? this.props.selectionKeys[this.props.node.key] && this.props.selectionKeys[this.props.node.key].partialChecked : false;\n }\n }, {\n key: \"isSingleSelectionMode\",\n value: function isSingleSelectionMode() {\n return this.props.selectionMode && this.props.selectionMode === 'single';\n }\n }, {\n key: \"isMultipleSelectionMode\",\n value: function isMultipleSelectionMode() {\n return this.props.selectionMode && this.props.selectionMode === 'multiple';\n }\n }, {\n key: \"isCheckboxSelectionMode\",\n value: function isCheckboxSelectionMode() {\n return this.props.selectionMode && this.props.selectionMode === 'checkbox';\n }\n }, {\n key: \"onTouchEnd\",\n value: function onTouchEnd() {\n this.nodeTouched = true;\n }\n }, {\n key: \"onDropPoint\",\n value: function onDropPoint(event, position) {\n event.preventDefault();\n\n if (this.props.node.droppable !== false) {\n DomHandler.removeClass(event.target, 'p-treenode-droppoint-active');\n\n if (this.props.onDropPoint) {\n this.props.onDropPoint({\n originalEvent: event,\n path: this.props.path,\n index: this.props.index,\n position: position\n });\n }\n }\n }\n }, {\n key: \"onDropPointDragOver\",\n value: function onDropPointDragOver(event) {\n if (event.dataTransfer.types[1] === this.props.dragdropScope.toLocaleLowerCase()) {\n event.dataTransfer.dropEffect = 'move';\n event.preventDefault();\n }\n }\n }, {\n key: \"onDropPointDragEnter\",\n value: function onDropPointDragEnter(event) {\n if (event.dataTransfer.types[1] === this.props.dragdropScope.toLocaleLowerCase()) {\n DomHandler.addClass(event.target, 'p-treenode-droppoint-active');\n }\n }\n }, {\n key: \"onDropPointDragLeave\",\n value: function onDropPointDragLeave(event) {\n if (event.dataTransfer.types[1] === this.props.dragdropScope.toLocaleLowerCase()) {\n DomHandler.removeClass(event.target, 'p-treenode-droppoint-active');\n }\n }\n }, {\n key: \"onDrop\",\n value: function onDrop(event) {\n if (this.props.dragdropScope && this.props.node.droppable !== false) {\n DomHandler.removeClass(this.contentElement, 'p-treenode-dragover');\n event.preventDefault();\n event.stopPropagation();\n\n if (this.props.onDrop) {\n this.props.onDrop({\n originalEvent: event,\n path: this.props.path,\n index: this.props.index\n });\n }\n }\n }\n }, {\n key: \"onDragOver\",\n value: function onDragOver(event) {\n if (event.dataTransfer.types[1] === this.props.dragdropScope.toLocaleLowerCase() && this.props.node.droppable !== false) {\n event.dataTransfer.dropEffect = 'move';\n event.preventDefault();\n event.stopPropagation();\n }\n }\n }, {\n key: \"onDragEnter\",\n value: function onDragEnter(event) {\n if (event.dataTransfer.types[1] === this.props.dragdropScope.toLocaleLowerCase() && this.props.node.droppable !== false) {\n DomHandler.addClass(this.contentElement, 'p-treenode-dragover');\n }\n }\n }, {\n key: \"onDragLeave\",\n value: function onDragLeave(event) {\n if (event.dataTransfer.types[1] === this.props.dragdropScope.toLocaleLowerCase() && this.props.node.droppable !== false) {\n var rect = event.currentTarget.getBoundingClientRect();\n\n if (event.nativeEvent.x > rect.left + rect.width || event.nativeEvent.x < rect.left || event.nativeEvent.y >= Math.floor(rect.top + rect.height) || event.nativeEvent.y < rect.top) {\n DomHandler.removeClass(this.contentElement, 'p-treenode-dragover');\n }\n }\n }\n }, {\n key: \"onDragStart\",\n value: function onDragStart(event) {\n event.dataTransfer.setData(\"text\", this.props.dragdropScope);\n event.dataTransfer.setData(this.props.dragdropScope, this.props.dragdropScope);\n\n if (this.props.onDragStart) {\n this.props.onDragStart({\n originalEvent: event,\n path: this.props.path,\n index: this.props.index\n });\n }\n }\n }, {\n key: \"onDragEnd\",\n value: function onDragEnd(event) {\n if (this.props.onDragEnd) {\n this.props.onDragEnd({\n originalEvent: event\n });\n }\n }\n }, {\n key: \"renderLabel\",\n value: function renderLabel() {\n var content = /*#__PURE__*/React.createElement(\"span\", {\n className: \"p-treenode-label\"\n }, this.props.node.label);\n\n if (this.props.nodeTemplate) {\n var defaultContentOptions = {\n onTogglerClick: this.onTogglerClick,\n className: 'p-treenode-label',\n element: content,\n props: this.props,\n expanded: this.isExpanded()\n };\n content = ObjectUtils.getJSXElement(this.props.nodeTemplate, this.props.node, defaultContentOptions);\n }\n\n return content;\n }\n }, {\n key: \"renderCheckbox\",\n value: function renderCheckbox() {\n if (this.isCheckboxSelectionMode() && this.props.node.selectable !== false) {\n var checked = this.isChecked();\n var partialChecked = this.isPartialChecked();\n var className = classNames('p-checkbox-box', {\n 'p-highlight': checked,\n 'p-indeterminate': partialChecked,\n 'p-disabled': this.props.disabled\n });\n var icon = classNames('p-checkbox-icon p-c', {\n 'pi pi-check': checked,\n 'pi pi-minus': partialChecked\n });\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"p-checkbox p-component\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: className,\n role: \"checkbox\",\n \"aria-checked\": checked\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: icon\n })));\n }\n\n return null;\n }\n }, {\n key: \"renderIcon\",\n value: function renderIcon(expanded) {\n var icon = this.props.node.icon || (expanded ? this.props.node.expandedIcon : this.props.node.collapsedIcon);\n\n if (icon) {\n var className = classNames('p-treenode-icon', icon);\n return /*#__PURE__*/React.createElement(\"span\", {\n className: className\n });\n }\n\n return null;\n }\n }, {\n key: \"renderToggler\",\n value: function renderToggler(expanded) {\n var iconClassName = classNames('p-tree-toggler-icon pi pi-fw', {\n 'pi-chevron-right': !expanded,\n 'pi-chevron-down': expanded\n });\n var content = /*#__PURE__*/React.createElement(\"button\", {\n type: \"button\",\n className: \"p-tree-toggler p-link\",\n tabIndex: -1,\n onClick: this.onTogglerClick\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: iconClassName\n }), /*#__PURE__*/React.createElement(Ripple, null));\n\n if (this.props.togglerTemplate) {\n var defaultContentOptions = {\n onClick: this.onTogglerClick,\n containerClassName: 'p-tree-toggler p-link',\n iconClassName: 'p-tree-toggler-icon',\n element: content,\n props: this.props,\n expanded: expanded\n };\n content = ObjectUtils.getJSXElement(this.props.togglerTemplate, this.props.node, defaultContentOptions);\n }\n\n return content;\n }\n }, {\n key: \"renderDropPoint\",\n value: function renderDropPoint(position) {\n var _this2 = this;\n\n if (this.props.dragdropScope) {\n return /*#__PURE__*/React.createElement(\"li\", {\n className: \"p-treenode-droppoint\",\n onDrop: function onDrop(event) {\n return _this2.onDropPoint(event, position);\n },\n onDragOver: this.onDropPointDragOver,\n onDragEnter: this.onDropPointDragEnter,\n onDragLeave: this.onDropPointDragLeave\n });\n }\n\n return null;\n }\n }, {\n key: \"renderContent\",\n value: function renderContent() {\n var _this3 = this;\n\n var selected = this.isSelected();\n var checked = this.isChecked();\n var className = classNames('p-treenode-content', this.props.node.className, {\n 'p-treenode-selectable': this.props.selectionMode && this.props.node.selectable !== false,\n 'p-highlight': this.isCheckboxSelectionMode() ? checked : selected,\n 'p-highlight-contextmenu': this.props.contextMenuSelectionKey && this.props.contextMenuSelectionKey === this.props.node.key,\n 'p-disabled': this.props.disabled\n });\n var expanded = this.isExpanded();\n var toggler = this.renderToggler(expanded);\n var checkbox = this.renderCheckbox();\n var icon = this.renderIcon(expanded);\n var label = this.renderLabel();\n var tabIndex = this.props.disabled ? undefined : 0;\n return /*#__PURE__*/React.createElement(\"div\", {\n ref: function ref(el) {\n return _this3.contentElement = el;\n },\n className: className,\n style: this.props.node.style,\n onClick: this.onClick,\n onDoubleClick: this.onDoubleClick,\n onContextMenu: this.onRightClick,\n onTouchEnd: this.onTouchEnd,\n draggable: this.props.dragdropScope && this.props.node.draggable !== false && !this.props.disabled,\n onDrop: this.onDrop,\n onDragOver: this.onDragOver,\n onDragEnter: this.onDragEnter,\n onDragLeave: this.onDragLeave,\n onDragStart: this.onDragStart,\n onDragEnd: this.onDragEnd,\n tabIndex: tabIndex,\n onKeyDown: this.onNodeKeyDown,\n role: \"treeitem\",\n \"aria-posinset\": this.props.index + 1,\n \"aria-expanded\": this.isExpanded(),\n \"aria-selected\": checked || selected\n }, toggler, checkbox, icon, label);\n }\n }, {\n key: \"renderChildren\",\n value: function renderChildren() {\n var _this4 = this;\n\n if (this.props.node.children && this.props.node.children.length && this.isExpanded()) {\n return /*#__PURE__*/React.createElement(\"ul\", {\n className: \"p-treenode-children\",\n role: \"group\"\n }, this.props.node.children.map(function (childNode, index) {\n return /*#__PURE__*/React.createElement(UITreeNode, {\n key: childNode.key || childNode.label,\n node: childNode,\n parent: _this4.props.node,\n index: index,\n last: index === _this4.props.node.children.length - 1,\n path: _this4.props.path + '-' + index,\n disabled: _this4.props.disabled,\n selectionMode: _this4.props.selectionMode,\n selectionKeys: _this4.props.selectionKeys,\n onSelectionChange: _this4.props.onSelectionChange,\n metaKeySelection: _this4.props.metaKeySelection,\n propagateSelectionDown: _this4.props.propagateSelectionDown,\n propagateSelectionUp: _this4.props.propagateSelectionUp,\n contextMenuSelectionKey: _this4.props.contextMenuSelectionKey,\n onContextMenuSelectionChange: _this4.props.onContextMenuSelectionChange,\n onContextMenu: _this4.props.onContextMenu,\n onExpand: _this4.props.onExpand,\n onCollapse: _this4.props.onCollapse,\n onSelect: _this4.props.onSelect,\n onUnselect: _this4.props.onUnselect,\n expandedKeys: _this4.props.expandedKeys,\n onToggle: _this4.props.onToggle,\n onPropagateUp: _this4.propagateUp,\n nodeTemplate: _this4.props.nodeTemplate,\n togglerTemplate: _this4.props.togglerTemplate,\n isNodeLeaf: _this4.props.isNodeLeaf,\n dragdropScope: _this4.props.dragdropScope,\n onDragStart: _this4.props.onDragStart,\n onDragEnd: _this4.props.onDragEnd,\n onDrop: _this4.props.onDrop,\n onDropPoint: _this4.props.onDropPoint\n });\n }));\n }\n\n return null;\n }\n }, {\n key: \"renderNode\",\n value: function renderNode() {\n var className = classNames('p-treenode', {\n 'p-treenode-leaf': this.isLeaf()\n }, this.props.node.className);\n var content = this.renderContent();\n var children = this.renderChildren();\n return /*#__PURE__*/React.createElement(\"li\", {\n className: className,\n style: this.props.node.style\n }, content, children);\n }\n }, {\n key: \"render\",\n value: function render() {\n var node = this.renderNode();\n\n if (this.props.dragdropScope && !this.props.disabled) {\n var beforeDropPoint = this.renderDropPoint(-1);\n var afterDropPoint = this.props.last ? this.renderDropPoint(1) : null;\n return /*#__PURE__*/React.createElement(React.Fragment, null, beforeDropPoint, node, afterDropPoint);\n } else {\n return node;\n }\n }\n }]);\n\n return UITreeNode;\n}(Component);\n\n_defineProperty(UITreeNode, \"defaultProps\", {\n node: null,\n index: null,\n last: null,\n parent: null,\n path: null,\n disabled: false,\n selectionMode: null,\n selectionKeys: null,\n contextMenuSelectionKey: null,\n metaKeySelection: true,\n expandedKeys: null,\n propagateSelectionUp: true,\n propagateSelectionDown: true,\n dragdropScope: null,\n ariaLabel: null,\n ariaLabelledBy: null,\n nodeTemplate: null,\n togglerTemplate: null,\n isNodeLeaf: null,\n onSelect: null,\n onUnselect: null,\n onExpand: null,\n onCollapse: null,\n onToggle: null,\n onSelectionChange: null,\n onContextMenuSelectionChange: null,\n onPropagateUp: null,\n onDragStart: null,\n onDragEnd: null,\n onDrop: null,\n onDropPoint: null,\n onContextMenu: null,\n onNodeClick: null,\n onNodeDoubleClick: null\n});\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n enumerableOnly && (symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n })), keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = null != arguments[i] ? arguments[i] : {};\n i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n\n return target;\n}\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) {\n var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"];\n\n if (!it) {\n if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") {\n if (it) o = it;\n var i = 0;\n\n var F = function F() {};\n\n return {\n s: F,\n n: function n() {\n if (i >= o.length) return {\n done: true\n };\n return {\n done: false,\n value: o[i++]\n };\n },\n e: function e(_e) {\n throw _e;\n },\n f: F\n };\n }\n\n throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n }\n\n var normalCompletion = true,\n didErr = false,\n err;\n return {\n s: function s() {\n it = it.call(o);\n },\n n: function n() {\n var step = it.next();\n normalCompletion = step.done;\n return step;\n },\n e: function e(_e2) {\n didErr = true;\n err = _e2;\n },\n f: function f() {\n try {\n if (!normalCompletion && it[\"return\"] != null) it[\"return\"]();\n } finally {\n if (didErr) throw err;\n }\n }\n };\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nvar Tree = /*#__PURE__*/function (_Component) {\n _inherits(Tree, _Component);\n\n var _super = _createSuper(Tree);\n\n function Tree(props) {\n var _this;\n\n _classCallCheck(this, Tree);\n\n _this = _super.call(this, props);\n _this.state = {};\n\n if (!_this.props.onFilterValueChange) {\n _this.state['filterValue'] = '';\n }\n\n if (!_this.props.onToggle) {\n _this.state['expandedKeys'] = _this.props.expandedKeys;\n }\n\n _this.isNodeLeaf = _this.isNodeLeaf.bind(_assertThisInitialized(_this));\n _this.onToggle = _this.onToggle.bind(_assertThisInitialized(_this));\n _this.onDragStart = _this.onDragStart.bind(_assertThisInitialized(_this));\n _this.onDragEnd = _this.onDragEnd.bind(_assertThisInitialized(_this));\n _this.onDrop = _this.onDrop.bind(_assertThisInitialized(_this));\n _this.onDropPoint = _this.onDropPoint.bind(_assertThisInitialized(_this));\n _this.onFilterInputChange = _this.onFilterInputChange.bind(_assertThisInitialized(_this));\n _this.onFilterInputKeyDown = _this.onFilterInputKeyDown.bind(_assertThisInitialized(_this));\n return _this;\n }\n\n _createClass(Tree, [{\n key: \"getFilterValue\",\n value: function getFilterValue() {\n return this.props.onFilterValueChange ? this.props.filterValue : this.state.filterValue;\n }\n }, {\n key: \"getExpandedKeys\",\n value: function getExpandedKeys() {\n return this.props.onToggle ? this.props.expandedKeys : this.state.expandedKeys;\n }\n }, {\n key: \"getRootNode\",\n value: function getRootNode() {\n return this.props.filter && this.filteredNodes ? this.filteredNodes : this.props.value;\n }\n }, {\n key: \"onToggle\",\n value: function onToggle(event) {\n if (this.props.onToggle) {\n this.props.onToggle(event);\n } else {\n this.setState({\n expandedKeys: event.value\n });\n }\n }\n }, {\n key: \"onDragStart\",\n value: function onDragStart(event) {\n this.dragState = {\n path: event.path,\n index: event.index\n };\n }\n }, {\n key: \"onDragEnd\",\n value: function onDragEnd() {\n this.dragState = null;\n }\n }, {\n key: \"onDrop\",\n value: function onDrop(event) {\n if (this.validateDropNode(this.dragState.path, event.path)) {\n var value = JSON.parse(JSON.stringify(this.props.value));\n var dragPaths = this.dragState.path.split('-');\n dragPaths.pop();\n var dragNodeParent = this.findNode(value, dragPaths);\n var dragNode = dragNodeParent ? dragNodeParent.children[this.dragState.index] : value[this.dragState.index];\n var dropNode = this.findNode(value, event.path.split('-'));\n if (dropNode.children) dropNode.children.push(dragNode);else dropNode.children = [dragNode];\n if (dragNodeParent) dragNodeParent.children.splice(this.dragState.index, 1);else value.splice(this.dragState.index, 1);\n\n if (this.props.onDragDrop) {\n this.props.onDragDrop({\n originalEvent: event.originalEvent,\n value: value,\n dragNode: dragNode,\n dropNode: dropNode,\n dropIndex: event.index\n });\n }\n }\n }\n }, {\n key: \"onDropPoint\",\n value: function onDropPoint(event) {\n if (this.validateDropPoint(event)) {\n var value = JSON.parse(JSON.stringify(this.props.value));\n var dragPaths = this.dragState.path.split('-');\n dragPaths.pop();\n var dropPaths = event.path.split('-');\n dropPaths.pop();\n var dragNodeParent = this.findNode(value, dragPaths);\n var dropNodeParent = this.findNode(value, dropPaths);\n var dragNode = dragNodeParent ? dragNodeParent.children[this.dragState.index] : value[this.dragState.index];\n var siblings = this.areSiblings(this.dragState.path, event.path);\n if (dragNodeParent) dragNodeParent.children.splice(this.dragState.index, 1);else value.splice(this.dragState.index, 1);\n\n if (event.position < 0) {\n var dropIndex = siblings ? this.dragState.index > event.index ? event.index : event.index - 1 : event.index;\n if (dropNodeParent) dropNodeParent.children.splice(dropIndex, 0, dragNode);else value.splice(dropIndex, 0, dragNode);\n } else {\n if (dropNodeParent) dropNodeParent.children.push(dragNode);else value.push(dragNode);\n }\n\n if (this.props.onDragDrop) {\n this.props.onDragDrop({\n originalEvent: event.originalEvent,\n value: value,\n dragNode: dragNode,\n dropNode: dropNodeParent,\n dropIndex: event.index\n });\n }\n }\n }\n }, {\n key: \"validateDrop\",\n value: function validateDrop(dragPath, dropPath) {\n if (!dragPath) {\n return false;\n } else {\n //same node\n if (dragPath === dropPath) {\n return false;\n } //parent dropped on an descendant\n\n\n if (dropPath.indexOf(dragPath) === 0) {\n return false;\n }\n\n return true;\n }\n }\n }, {\n key: \"validateDropNode\",\n value: function validateDropNode(dragPath, dropPath) {\n var validateDrop = this.validateDrop(dragPath, dropPath);\n\n if (validateDrop) {\n //child dropped on parent\n if (dragPath.indexOf('-') > 0 && dragPath.substring(0, dragPath.lastIndexOf('-')) === dropPath) {\n return false;\n }\n\n return true;\n } else {\n return false;\n }\n }\n }, {\n key: \"validateDropPoint\",\n value: function validateDropPoint(event) {\n var validateDrop = this.validateDrop(this.dragState.path, event.path);\n\n if (validateDrop) {\n //child dropped to next sibling's drop point\n if (event.position === -1 && this.areSiblings(this.dragState.path, event.path) && this.dragState.index + 1 === event.index) {\n return false;\n }\n\n return true;\n } else {\n return false;\n }\n }\n }, {\n key: \"areSiblings\",\n value: function areSiblings(path1, path2) {\n if (path1.length === 1 && path2.length === 1) return true;else return path1.substring(0, path1.lastIndexOf('-')) === path2.substring(0, path2.lastIndexOf('-'));\n }\n }, {\n key: \"findNode\",\n value: function findNode(value, path) {\n if (path.length === 0) {\n return null;\n } else {\n var index = parseInt(path[0], 10);\n var nextSearchRoot = value.children ? value.children[index] : value[index];\n\n if (path.length === 1) {\n return nextSearchRoot;\n } else {\n path.shift();\n return this.findNode(nextSearchRoot, path);\n }\n }\n }\n }, {\n key: \"isNodeLeaf\",\n value: function isNodeLeaf(node) {\n return node.leaf === false ? false : !(node.children && node.children.length);\n }\n }, {\n key: \"onFilterInputKeyDown\",\n value: function onFilterInputKeyDown(event) {\n //enter\n if (event.which === 13) {\n event.preventDefault();\n }\n }\n }, {\n key: \"onFilterInputChange\",\n value: function onFilterInputChange(event) {\n this.filterChanged = true;\n var filterValue = event.target.value;\n\n if (this.props.onFilterValueChange) {\n this.props.onFilterValueChange({\n originalEvent: event,\n value: filterValue\n });\n } else {\n this.setState({\n filterValue: filterValue\n });\n }\n }\n }, {\n key: \"filter\",\n value: function filter(value) {\n this.setState({\n filterValue: ObjectUtils.isNotEmpty(value) ? value : ''\n }, this._filter);\n }\n }, {\n key: \"_filter\",\n value: function _filter() {\n if (!this.filterChanged) {\n return;\n }\n\n var filterValue = this.getFilterValue();\n\n if (ObjectUtils.isEmpty(filterValue)) {\n this.filteredNodes = this.props.value;\n } else {\n this.filteredNodes = [];\n var searchFields = this.props.filterBy.split(',');\n var filterText = filterValue.toLocaleLowerCase(this.props.filterLocale);\n var isStrictMode = this.props.filterMode === 'strict';\n\n var _iterator = _createForOfIteratorHelper(this.props.value),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var node = _step.value;\n\n var copyNode = _objectSpread({}, node);\n\n var paramsWithoutNode = {\n searchFields: searchFields,\n filterText: filterText,\n isStrictMode: isStrictMode\n };\n\n if (isStrictMode && (this.findFilteredNodes(copyNode, paramsWithoutNode) || this.isFilterMatched(copyNode, paramsWithoutNode)) || !isStrictMode && (this.isFilterMatched(copyNode, paramsWithoutNode) || this.findFilteredNodes(copyNode, paramsWithoutNode))) {\n this.filteredNodes.push(copyNode);\n }\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n }\n\n this.filterChanged = false;\n }\n }, {\n key: \"findFilteredNodes\",\n value: function findFilteredNodes(node, paramsWithoutNode) {\n if (node) {\n var matched = false;\n\n if (node.children) {\n var childNodes = _toConsumableArray(node.children);\n\n node.children = [];\n\n var _iterator2 = _createForOfIteratorHelper(childNodes),\n _step2;\n\n try {\n for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n var childNode = _step2.value;\n\n var copyChildNode = _objectSpread({}, childNode);\n\n if (this.isFilterMatched(copyChildNode, paramsWithoutNode)) {\n matched = true;\n node.children.push(copyChildNode);\n }\n }\n } catch (err) {\n _iterator2.e(err);\n } finally {\n _iterator2.f();\n }\n }\n\n if (matched) {\n node.expanded = true;\n return true;\n }\n }\n }\n }, {\n key: \"isFilterMatched\",\n value: function isFilterMatched(node, _ref) {\n var searchFields = _ref.searchFields,\n filterText = _ref.filterText,\n isStrictMode = _ref.isStrictMode;\n var matched = false;\n\n var _iterator3 = _createForOfIteratorHelper(searchFields),\n _step3;\n\n try {\n for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {\n var field = _step3.value;\n var fieldValue = String(ObjectUtils.resolveFieldData(node, field)).toLocaleLowerCase(this.props.filterLocale);\n\n if (fieldValue.indexOf(filterText) > -1) {\n matched = true;\n }\n }\n } catch (err) {\n _iterator3.e(err);\n } finally {\n _iterator3.f();\n }\n\n if (!matched || isStrictMode && !this.isNodeLeaf(node)) {\n matched = this.findFilteredNodes(node, {\n searchFields: searchFields,\n filterText: filterText,\n isStrictMode: isStrictMode\n }) || matched;\n }\n\n return matched;\n }\n }, {\n key: \"renderRootChild\",\n value: function renderRootChild(node, index, last) {\n return /*#__PURE__*/React.createElement(UITreeNode, {\n key: node.key || node.label,\n node: node,\n index: index,\n last: last,\n path: String(index),\n disabled: this.props.disabled,\n selectionMode: this.props.selectionMode,\n selectionKeys: this.props.selectionKeys,\n onSelectionChange: this.props.onSelectionChange,\n metaKeySelection: this.props.metaKeySelection,\n contextMenuSelectionKey: this.props.contextMenuSelectionKey,\n onContextMenuSelectionChange: this.props.onContextMenuSelectionChange,\n onContextMenu: this.props.onContextMenu,\n propagateSelectionDown: this.props.propagateSelectionDown,\n propagateSelectionUp: this.props.propagateSelectionUp,\n onExpand: this.props.onExpand,\n onCollapse: this.props.onCollapse,\n onSelect: this.props.onSelect,\n onUnselect: this.props.onUnselect,\n expandedKeys: this.getExpandedKeys(),\n onToggle: this.onToggle,\n nodeTemplate: this.props.nodeTemplate,\n togglerTemplate: this.props.togglerTemplate,\n isNodeLeaf: this.isNodeLeaf,\n dragdropScope: this.props.dragdropScope,\n onDragStart: this.onDragStart,\n onDragEnd: this.onDragEnd,\n onDrop: this.onDrop,\n onDropPoint: this.onDropPoint,\n onNodeClick: this.props.onNodeClick,\n onNodeDoubleClick: this.props.onNodeDoubleClick\n });\n }\n }, {\n key: \"renderRootChildren\",\n value: function renderRootChildren() {\n var _this2 = this;\n\n if (this.props.filter) {\n this.filterChanged = true;\n\n this._filter();\n }\n\n var value = this.getRootNode();\n return value.map(function (node, index) {\n return _this2.renderRootChild(node, index, index === value.length - 1);\n });\n }\n }, {\n key: \"renderModel\",\n value: function renderModel() {\n if (this.props.value) {\n var rootNodes = this.renderRootChildren();\n var contentClass = classNames('p-tree-container', this.props.contentClassName);\n return /*#__PURE__*/React.createElement(\"ul\", {\n className: contentClass,\n role: \"tree\",\n \"aria-label\": this.props.ariaLabel,\n \"aria-labelledby\": this.props.ariaLabelledBy,\n style: this.props.contentStyle\n }, rootNodes);\n }\n\n return null;\n }\n }, {\n key: \"renderLoader\",\n value: function renderLoader() {\n if (this.props.loading) {\n var icon = classNames('p-tree-loading-icon pi-spin', this.props.loadingIcon);\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"p-tree-loading-overlay p-component-overlay\"\n }, /*#__PURE__*/React.createElement(\"i\", {\n className: icon\n }));\n }\n\n return null;\n }\n }, {\n key: \"renderFilter\",\n value: function renderFilter() {\n if (this.props.filter) {\n var filterValue = this.getFilterValue();\n filterValue = ObjectUtils.isNotEmpty(filterValue) ? filterValue : '';\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"p-tree-filter-container\"\n }, /*#__PURE__*/React.createElement(\"input\", {\n type: \"text\",\n value: filterValue,\n autoComplete: \"off\",\n className: \"p-tree-filter p-inputtext p-component\",\n placeholder: this.props.filterPlaceholder,\n onKeyDown: this.onFilterInputKeyDown,\n onChange: this.onFilterInputChange,\n disabled: this.props.disabled\n }), /*#__PURE__*/React.createElement(\"span\", {\n className: \"p-tree-filter-icon pi pi-search\"\n }));\n }\n\n return null;\n }\n }, {\n key: \"renderHeader\",\n value: function renderHeader() {\n if (this.props.showHeader) {\n var filterElement = this.renderFilter();\n var content = filterElement;\n\n if (this.props.header) {\n var defaultContentOptions = {\n filterContainerClassName: 'p-tree-filter-container',\n filterIconClasssName: 'p-tree-filter-icon pi pi-search',\n filterInput: {\n className: 'p-tree-filter p-inputtext p-component',\n onKeyDown: this.onFilterInputKeyDown,\n onChange: this.onFilterInputChange\n },\n filterElement: filterElement,\n element: content,\n props: this.props\n };\n content = ObjectUtils.getJSXElement(this.props.header, defaultContentOptions);\n }\n\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"p-tree-header\"\n }, content);\n }\n\n return null;\n }\n }, {\n key: \"renderFooter\",\n value: function renderFooter() {\n var content = ObjectUtils.getJSXElement(this.props.footer, this.props);\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"p-tree-footer\"\n }, content);\n }\n }, {\n key: \"render\",\n value: function render() {\n var className = classNames('p-tree p-component', this.props.className, {\n 'p-tree-selectable': this.props.selectionMode,\n 'p-tree-loading': this.props.loading,\n 'p-disabled': this.props.disabled\n });\n var loader = this.renderLoader();\n var content = this.renderModel();\n var header = this.renderHeader();\n var footer = this.renderFooter();\n return /*#__PURE__*/React.createElement(\"div\", {\n id: this.props.id,\n className: className,\n style: this.props.style\n }, loader, header, content, footer);\n }\n }]);\n\n return Tree;\n}(Component);\n\n_defineProperty(Tree, \"defaultProps\", {\n id: null,\n value: null,\n disabled: false,\n selectionMode: null,\n selectionKeys: null,\n onSelectionChange: null,\n contextMenuSelectionKey: null,\n onContextMenuSelectionChange: null,\n expandedKeys: null,\n style: null,\n className: null,\n contentStyle: null,\n contentClassName: null,\n metaKeySelection: true,\n propagateSelectionUp: true,\n propagateSelectionDown: true,\n loading: false,\n loadingIcon: 'pi pi-spinner',\n dragdropScope: null,\n header: null,\n footer: null,\n showHeader: true,\n filter: false,\n filterValue: null,\n filterBy: 'label',\n filterMode: 'lenient',\n filterPlaceholder: null,\n filterLocale: undefined,\n nodeTemplate: null,\n togglerTemplate: null,\n onSelect: null,\n onUnselect: null,\n onExpand: null,\n onCollapse: null,\n onToggle: null,\n onDragDrop: null,\n onContextMenu: null,\n onFilterValueChange: null,\n onNodeClick: null,\n onNodeDoubleClick: null\n});\n\nexport { Tree };","map":{"version":3,"names":["React","Component","DomHandler","ObjectUtils","classNames","Ripple","_arrayLikeToArray$2","arr","len","length","i","arr2","Array","_arrayWithoutHoles","isArray","_iterableToArray","iter","Symbol","iterator","from","_unsupportedIterableToArray$2","o","minLen","n","Object","prototype","toString","call","slice","constructor","name","test","_nonIterableSpread","TypeError","_toConsumableArray","_classCallCheck","instance","Constructor","_defineProperties","target","props","descriptor","enumerable","configurable","writable","defineProperty","key","_createClass","protoProps","staticProps","_assertThisInitialized","self","ReferenceError","_setPrototypeOf","p","setPrototypeOf","__proto__","_inherits","subClass","superClass","create","value","_typeof","obj","_possibleConstructorReturn","_getPrototypeOf","getPrototypeOf","_defineProperty","_createForOfIteratorHelper$1","allowArrayLike","it","_unsupportedIterableToArray$1","F","s","done","e","_e","f","normalCompletion","didErr","err","step","next","_e2","_arrayLikeToArray$1","ownKeys$1","object","enumerableOnly","keys","getOwnPropertySymbols","symbols","filter","sym","getOwnPropertyDescriptor","push","apply","_objectSpread$1","arguments","source","forEach","getOwnPropertyDescriptors","defineProperties","_createSuper$1","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct$1","_createSuperInternal","Super","result","NewTarget","Reflect","construct","sham","Proxy","Boolean","valueOf","UITreeNode","_Component","_super","_this","onClick","bind","onDoubleClick","onRightClick","onTouchEnd","onTogglerClick","onNodeKeyDown","propagateUp","onDrop","onDragOver","onDragEnter","onDragLeave","onDragStart","onDragEnd","onDropPointDragOver","onDropPointDragEnter","onDropPointDragLeave","isLeaf","isNodeLeaf","node","expand","event","expandedKeys","onToggle","originalEvent","invokeToggleEvents","collapse","disabled","isExpanded","expanded","onExpand","onCollapse","undefined","nodeElement","parentElement","hasClass","which","listElement","children","focusNode","nextNodeElement","nextElementSibling","nextSiblingAncestor","findNextSiblingOfAncestor","preventDefault","previousElementSibling","findLastVisibleDescendant","parentNodeElement","getParentNodeElement","childrenListElement","lastChildElement","element","focus","className","String","indexOf","selectionMode","selectable","selectionKeys","isCheckboxSelectionMode","checked","isChecked","propagateSelectionDown","propagateDown","propagateSelectionUp","onPropagateUp","check","onUnselect","onSelect","selected","isSelected","metaSelection","nodeTouched","metaKeySelection","metaKey","ctrlKey","isSingleSelectionMode","isMultipleSelectionMode","onSelectionChange","clearSelection","onContextMenuSelectionChange","onContextMenu","checkedChildCount","childPartialSelected","_iterator","_step","child","partialChecked","isPartialChecked","onDropPoint","position","droppable","removeClass","path","index","dataTransfer","types","dragdropScope","toLocaleLowerCase","dropEffect","addClass","contentElement","stopPropagation","rect","currentTarget","getBoundingClientRect","nativeEvent","x","left","width","y","Math","floor","top","height","setData","renderLabel","content","createElement","label","nodeTemplate","defaultContentOptions","getJSXElement","renderCheckbox","icon","role","renderIcon","expandedIcon","collapsedIcon","renderToggler","iconClassName","type","tabIndex","togglerTemplate","containerClassName","renderDropPoint","_this2","renderContent","_this3","contextMenuSelectionKey","toggler","checkbox","ref","el","style","draggable","onKeyDown","renderChildren","_this4","map","childNode","parent","last","renderNode","render","beforeDropPoint","afterDropPoint","Fragment","ariaLabel","ariaLabelledBy","onNodeClick","onNodeDoubleClick","ownKeys","_objectSpread","_createForOfIteratorHelper","_unsupportedIterableToArray","_arrayLikeToArray","_createSuper","_isNativeReflectConstruct","Tree","state","onFilterValueChange","onFilterInputChange","onFilterInputKeyDown","getFilterValue","filterValue","getExpandedKeys","getRootNode","filteredNodes","setState","dragState","validateDropNode","JSON","parse","stringify","dragPaths","split","pop","dragNodeParent","findNode","dragNode","dropNode","splice","onDragDrop","dropIndex","validateDropPoint","dropPaths","dropNodeParent","siblings","areSiblings","validateDrop","dragPath","dropPath","substring","lastIndexOf","path1","path2","parseInt","nextSearchRoot","shift","leaf","filterChanged","isNotEmpty","_filter","isEmpty","searchFields","filterBy","filterText","filterLocale","isStrictMode","filterMode","copyNode","paramsWithoutNode","findFilteredNodes","isFilterMatched","matched","childNodes","_iterator2","_step2","copyChildNode","_ref","_iterator3","_step3","field","fieldValue","resolveFieldData","renderRootChild","renderRootChildren","renderModel","rootNodes","contentClass","contentClassName","contentStyle","renderLoader","loading","loadingIcon","renderFilter","autoComplete","placeholder","filterPlaceholder","onChange","renderHeader","showHeader","filterElement","header","filterContainerClassName","filterIconClasssName","filterInput","renderFooter","footer","loader","id"],"sources":["/Users/paolasanchez/Desktop/Pry4/Katoikia/katoikia-app/web-ui/sakai-react/node_modules/primereact/tree/tree.esm.js"],"sourcesContent":["import React, { Component } from 'react';\nimport { DomHandler, ObjectUtils, classNames } from 'primereact/utils';\nimport { Ripple } from 'primereact/ripple';\n\nfunction _arrayLikeToArray$2(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray$2(arr);\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\n\nfunction _unsupportedIterableToArray$2(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray$2(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$2(o, minLen);\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray$2(arr) || _nonIterableSpread();\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n Object.defineProperty(subClass, \"prototype\", {\n writable: false\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, _typeof(obj);\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n } else if (call !== void 0) {\n throw new TypeError(\"Derived constructors may only return object or undefined\");\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction _createForOfIteratorHelper$1(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray$1(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it[\"return\"] != null) it[\"return\"](); } finally { if (didErr) throw err; } } }; }\n\nfunction _unsupportedIterableToArray$1(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray$1(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$1(o, minLen); }\n\nfunction _arrayLikeToArray$1(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction ownKeys$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$1(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _createSuper$1(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$1(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _isNativeReflectConstruct$1() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nvar UITreeNode = /*#__PURE__*/function (_Component) {\n _inherits(UITreeNode, _Component);\n\n var _super = _createSuper$1(UITreeNode);\n\n function UITreeNode(props) {\n var _this;\n\n _classCallCheck(this, UITreeNode);\n\n _this = _super.call(this, props);\n _this.onClick = _this.onClick.bind(_assertThisInitialized(_this));\n _this.onDoubleClick = _this.onDoubleClick.bind(_assertThisInitialized(_this));\n _this.onRightClick = _this.onRightClick.bind(_assertThisInitialized(_this));\n _this.onTouchEnd = _this.onTouchEnd.bind(_assertThisInitialized(_this));\n _this.onTogglerClick = _this.onTogglerClick.bind(_assertThisInitialized(_this));\n _this.onNodeKeyDown = _this.onNodeKeyDown.bind(_assertThisInitialized(_this));\n _this.propagateUp = _this.propagateUp.bind(_assertThisInitialized(_this));\n _this.onDrop = _this.onDrop.bind(_assertThisInitialized(_this));\n _this.onDragOver = _this.onDragOver.bind(_assertThisInitialized(_this));\n _this.onDragEnter = _this.onDragEnter.bind(_assertThisInitialized(_this));\n _this.onDragLeave = _this.onDragLeave.bind(_assertThisInitialized(_this));\n _this.onDragStart = _this.onDragStart.bind(_assertThisInitialized(_this));\n _this.onDragEnd = _this.onDragEnd.bind(_assertThisInitialized(_this));\n _this.onDropPointDragOver = _this.onDropPointDragOver.bind(_assertThisInitialized(_this));\n _this.onDropPointDragEnter = _this.onDropPointDragEnter.bind(_assertThisInitialized(_this));\n _this.onDropPointDragLeave = _this.onDropPointDragLeave.bind(_assertThisInitialized(_this));\n return _this;\n }\n\n _createClass(UITreeNode, [{\n key: \"isLeaf\",\n value: function isLeaf() {\n return this.props.isNodeLeaf(this.props.node);\n }\n }, {\n key: \"expand\",\n value: function expand(event) {\n var expandedKeys = this.props.expandedKeys ? _objectSpread$1({}, this.props.expandedKeys) : {};\n expandedKeys[this.props.node.key] = true;\n this.props.onToggle({\n originalEvent: event,\n value: expandedKeys\n });\n this.invokeToggleEvents(event, true);\n }\n }, {\n key: \"collapse\",\n value: function collapse(event) {\n var expandedKeys = _objectSpread$1({}, this.props.expandedKeys);\n\n delete expandedKeys[this.props.node.key];\n this.props.onToggle({\n originalEvent: event,\n value: expandedKeys\n });\n this.invokeToggleEvents(event, false);\n }\n }, {\n key: \"onTogglerClick\",\n value: function onTogglerClick(event) {\n if (this.props.disabled) {\n return;\n }\n\n if (this.isExpanded()) this.collapse(event);else this.expand(event);\n }\n }, {\n key: \"invokeToggleEvents\",\n value: function invokeToggleEvents(event, expanded) {\n if (expanded) {\n if (this.props.onExpand) {\n this.props.onExpand({\n originalEvent: event,\n node: this.props.node\n });\n }\n } else {\n if (this.props.onCollapse) {\n this.props.onCollapse({\n originalEvent: event,\n node: this.props.node\n });\n }\n }\n }\n }, {\n key: \"isExpanded\",\n value: function isExpanded() {\n return (this.props.expandedKeys ? this.props.expandedKeys[this.props.node.key] !== undefined : false) || this.props.node.expanded;\n }\n }, {\n key: \"onNodeKeyDown\",\n value: function onNodeKeyDown(event) {\n if (this.props.disabled) {\n return;\n }\n\n var nodeElement = event.target.parentElement;\n\n if (!DomHandler.hasClass(nodeElement, 'p-treenode')) {\n return;\n }\n\n switch (event.which) {\n //down arrow\n case 40:\n var listElement = nodeElement.children[1];\n\n if (listElement) {\n this.focusNode(listElement.children[0]);\n } else {\n var nextNodeElement = nodeElement.nextElementSibling;\n\n if (nextNodeElement) {\n this.focusNode(nextNodeElement);\n } else {\n var nextSiblingAncestor = this.findNextSiblingOfAncestor(nodeElement);\n\n if (nextSiblingAncestor) {\n this.focusNode(nextSiblingAncestor);\n }\n }\n }\n\n event.preventDefault();\n break;\n //up arrow\n\n case 38:\n if (nodeElement.previousElementSibling) {\n this.focusNode(this.findLastVisibleDescendant(nodeElement.previousElementSibling));\n } else {\n var parentNodeElement = this.getParentNodeElement(nodeElement);\n\n if (parentNodeElement) {\n this.focusNode(parentNodeElement);\n }\n }\n\n event.preventDefault();\n break;\n //right arrow\n\n case 39:\n if (!this.isExpanded()) {\n this.expand(event);\n }\n\n event.preventDefault();\n break;\n //left arrow\n\n case 37:\n if (this.isExpanded()) {\n this.collapse(event);\n }\n\n event.preventDefault();\n break;\n //enter\n\n case 13:\n this.onClick(event);\n event.preventDefault();\n break;\n }\n }\n }, {\n key: \"findNextSiblingOfAncestor\",\n value: function findNextSiblingOfAncestor(nodeElement) {\n var parentNodeElement = this.getParentNodeElement(nodeElement);\n\n if (parentNodeElement) {\n if (parentNodeElement.nextElementSibling) return parentNodeElement.nextElementSibling;else return this.findNextSiblingOfAncestor(parentNodeElement);\n } else {\n return null;\n }\n }\n }, {\n key: \"findLastVisibleDescendant\",\n value: function findLastVisibleDescendant(nodeElement) {\n var childrenListElement = nodeElement.children[1];\n\n if (childrenListElement) {\n var lastChildElement = childrenListElement.children[childrenListElement.children.length - 1];\n return this.findLastVisibleDescendant(lastChildElement);\n } else {\n return nodeElement;\n }\n }\n }, {\n key: \"getParentNodeElement\",\n value: function getParentNodeElement(nodeElement) {\n var parentNodeElement = nodeElement.parentElement.parentElement;\n return DomHandler.hasClass(parentNodeElement, 'p-treenode') ? parentNodeElement : null;\n }\n }, {\n key: \"focusNode\",\n value: function focusNode(element) {\n element.children[0].focus();\n }\n }, {\n key: \"onClick\",\n value: function onClick(event) {\n if (this.props.onClick) {\n this.props.onClick({\n originalEvent: event,\n node: this.props.node\n });\n }\n\n if (event.target.className && event.target.className.constructor === String && event.target.className.indexOf('p-tree-toggler') === 0 || this.props.disabled) {\n return;\n }\n\n if (this.props.selectionMode && this.props.node.selectable !== false) {\n var selectionKeys;\n\n if (this.isCheckboxSelectionMode()) {\n var checked = this.isChecked();\n selectionKeys = this.props.selectionKeys ? _objectSpread$1({}, this.props.selectionKeys) : {};\n\n if (checked) {\n if (this.props.propagateSelectionDown) this.propagateDown(this.props.node, false, selectionKeys);else delete selectionKeys[this.props.node.key];\n\n if (this.props.propagateSelectionUp && this.props.onPropagateUp) {\n this.props.onPropagateUp({\n originalEvent: event,\n check: false,\n selectionKeys: selectionKeys\n });\n }\n\n if (this.props.onUnselect) {\n this.props.onUnselect({\n originalEvent: event,\n node: this.props.node\n });\n }\n } else {\n if (this.props.propagateSelectionDown) this.propagateDown(this.props.node, true, selectionKeys);else selectionKeys[this.props.node.key] = {\n checked: true\n };\n\n if (this.props.propagateSelectionUp && this.props.onPropagateUp) {\n this.props.onPropagateUp({\n originalEvent: event,\n check: true,\n selectionKeys: selectionKeys\n });\n }\n\n if (this.props.onSelect) {\n this.props.onSelect({\n originalEvent: event,\n node: this.props.node\n });\n }\n }\n } else {\n var selected = this.isSelected();\n var metaSelection = this.nodeTouched ? false : this.props.metaKeySelection;\n\n if (metaSelection) {\n var metaKey = event.metaKey || event.ctrlKey;\n\n if (selected && metaKey) {\n if (this.isSingleSelectionMode()) {\n selectionKeys = null;\n } else {\n selectionKeys = _objectSpread$1({}, this.props.selectionKeys);\n delete selectionKeys[this.props.node.key];\n }\n\n if (this.props.onUnselect) {\n this.props.onUnselect({\n originalEvent: event,\n node: this.props.node\n });\n }\n } else {\n if (this.isSingleSelectionMode()) {\n selectionKeys = this.props.node.key;\n } else if (this.isMultipleSelectionMode()) {\n selectionKeys = !metaKey ? {} : this.props.selectionKeys ? _objectSpread$1({}, this.props.selectionKeys) : {};\n selectionKeys[this.props.node.key] = true;\n }\n\n if (this.props.onSelect) {\n this.props.onSelect({\n originalEvent: event,\n node: this.props.node\n });\n }\n }\n } else {\n if (this.isSingleSelectionMode()) {\n if (selected) {\n selectionKeys = null;\n\n if (this.props.onUnselect) {\n this.props.onUnselect({\n originalEvent: event,\n node: this.props.node\n });\n }\n } else {\n selectionKeys = this.props.node.key;\n\n if (this.props.onSelect) {\n this.props.onSelect({\n originalEvent: event,\n node: this.props.node\n });\n }\n }\n } else {\n if (selected) {\n selectionKeys = _objectSpread$1({}, this.props.selectionKeys);\n delete selectionKeys[this.props.node.key];\n\n if (this.props.onUnselect) {\n this.props.onUnselect({\n originalEvent: event,\n node: this.props.node\n });\n }\n } else {\n selectionKeys = this.props.selectionKeys ? _objectSpread$1({}, this.props.selectionKeys) : {};\n selectionKeys[this.props.node.key] = true;\n\n if (this.props.onSelect) {\n this.props.onSelect({\n originalEvent: event,\n node: this.props.node\n });\n }\n }\n }\n }\n }\n\n if (this.props.onSelectionChange) {\n this.props.onSelectionChange({\n originalEvent: event,\n value: selectionKeys\n });\n }\n }\n\n this.nodeTouched = false;\n }\n }, {\n key: \"onDoubleClick\",\n value: function onDoubleClick(event) {\n if (this.props.onDoubleClick) {\n this.props.onDoubleClick({\n originalEvent: event,\n node: this.props.node\n });\n }\n }\n }, {\n key: \"onRightClick\",\n value: function onRightClick(event) {\n if (this.props.disabled) {\n return;\n }\n\n DomHandler.clearSelection();\n\n if (this.props.onContextMenuSelectionChange) {\n this.props.onContextMenuSelectionChange({\n originalEvent: event,\n value: this.props.node.key\n });\n }\n\n if (this.props.onContextMenu) {\n this.props.onContextMenu({\n originalEvent: event,\n node: this.props.node\n });\n }\n }\n }, {\n key: \"propagateUp\",\n value: function propagateUp(event) {\n var check = event.check;\n var selectionKeys = event.selectionKeys;\n var checkedChildCount = 0;\n var childPartialSelected = false;\n\n var _iterator = _createForOfIteratorHelper$1(this.props.node.children),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var child = _step.value;\n if (selectionKeys[child.key] && selectionKeys[child.key].checked) checkedChildCount++;else if (selectionKeys[child.key] && selectionKeys[child.key].partialChecked) childPartialSelected = true;\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n\n if (check && checkedChildCount === this.props.node.children.length) {\n selectionKeys[this.props.node.key] = {\n checked: true,\n partialChecked: false\n };\n } else {\n if (!check) {\n delete selectionKeys[this.props.node.key];\n }\n\n if (childPartialSelected || checkedChildCount > 0 && checkedChildCount !== this.props.node.children.length) selectionKeys[this.props.node.key] = {\n checked: false,\n partialChecked: true\n };else delete selectionKeys[this.props.node.key];\n }\n\n if (this.props.propagateSelectionUp && this.props.onPropagateUp) {\n this.props.onPropagateUp(event);\n }\n }\n }, {\n key: \"propagateDown\",\n value: function propagateDown(node, check, selectionKeys) {\n if (check) selectionKeys[node.key] = {\n checked: true,\n partialChecked: false\n };else delete selectionKeys[node.key];\n\n if (node.children && node.children.length) {\n for (var i = 0; i < node.children.length; i++) {\n this.propagateDown(node.children[i], check, selectionKeys);\n }\n }\n }\n }, {\n key: \"isSelected\",\n value: function isSelected() {\n if (this.props.selectionMode && this.props.selectionKeys) return this.isSingleSelectionMode() ? this.props.selectionKeys === this.props.node.key : this.props.selectionKeys[this.props.node.key] !== undefined;else return false;\n }\n }, {\n key: \"isChecked\",\n value: function isChecked() {\n return this.props.selectionKeys ? this.props.selectionKeys[this.props.node.key] && this.props.selectionKeys[this.props.node.key].checked : false;\n }\n }, {\n key: \"isPartialChecked\",\n value: function isPartialChecked() {\n return this.props.selectionKeys ? this.props.selectionKeys[this.props.node.key] && this.props.selectionKeys[this.props.node.key].partialChecked : false;\n }\n }, {\n key: \"isSingleSelectionMode\",\n value: function isSingleSelectionMode() {\n return this.props.selectionMode && this.props.selectionMode === 'single';\n }\n }, {\n key: \"isMultipleSelectionMode\",\n value: function isMultipleSelectionMode() {\n return this.props.selectionMode && this.props.selectionMode === 'multiple';\n }\n }, {\n key: \"isCheckboxSelectionMode\",\n value: function isCheckboxSelectionMode() {\n return this.props.selectionMode && this.props.selectionMode === 'checkbox';\n }\n }, {\n key: \"onTouchEnd\",\n value: function onTouchEnd() {\n this.nodeTouched = true;\n }\n }, {\n key: \"onDropPoint\",\n value: function onDropPoint(event, position) {\n event.preventDefault();\n\n if (this.props.node.droppable !== false) {\n DomHandler.removeClass(event.target, 'p-treenode-droppoint-active');\n\n if (this.props.onDropPoint) {\n this.props.onDropPoint({\n originalEvent: event,\n path: this.props.path,\n index: this.props.index,\n position: position\n });\n }\n }\n }\n }, {\n key: \"onDropPointDragOver\",\n value: function onDropPointDragOver(event) {\n if (event.dataTransfer.types[1] === this.props.dragdropScope.toLocaleLowerCase()) {\n event.dataTransfer.dropEffect = 'move';\n event.preventDefault();\n }\n }\n }, {\n key: \"onDropPointDragEnter\",\n value: function onDropPointDragEnter(event) {\n if (event.dataTransfer.types[1] === this.props.dragdropScope.toLocaleLowerCase()) {\n DomHandler.addClass(event.target, 'p-treenode-droppoint-active');\n }\n }\n }, {\n key: \"onDropPointDragLeave\",\n value: function onDropPointDragLeave(event) {\n if (event.dataTransfer.types[1] === this.props.dragdropScope.toLocaleLowerCase()) {\n DomHandler.removeClass(event.target, 'p-treenode-droppoint-active');\n }\n }\n }, {\n key: \"onDrop\",\n value: function onDrop(event) {\n if (this.props.dragdropScope && this.props.node.droppable !== false) {\n DomHandler.removeClass(this.contentElement, 'p-treenode-dragover');\n event.preventDefault();\n event.stopPropagation();\n\n if (this.props.onDrop) {\n this.props.onDrop({\n originalEvent: event,\n path: this.props.path,\n index: this.props.index\n });\n }\n }\n }\n }, {\n key: \"onDragOver\",\n value: function onDragOver(event) {\n if (event.dataTransfer.types[1] === this.props.dragdropScope.toLocaleLowerCase() && this.props.node.droppable !== false) {\n event.dataTransfer.dropEffect = 'move';\n event.preventDefault();\n event.stopPropagation();\n }\n }\n }, {\n key: \"onDragEnter\",\n value: function onDragEnter(event) {\n if (event.dataTransfer.types[1] === this.props.dragdropScope.toLocaleLowerCase() && this.props.node.droppable !== false) {\n DomHandler.addClass(this.contentElement, 'p-treenode-dragover');\n }\n }\n }, {\n key: \"onDragLeave\",\n value: function onDragLeave(event) {\n if (event.dataTransfer.types[1] === this.props.dragdropScope.toLocaleLowerCase() && this.props.node.droppable !== false) {\n var rect = event.currentTarget.getBoundingClientRect();\n\n if (event.nativeEvent.x > rect.left + rect.width || event.nativeEvent.x < rect.left || event.nativeEvent.y >= Math.floor(rect.top + rect.height) || event.nativeEvent.y < rect.top) {\n DomHandler.removeClass(this.contentElement, 'p-treenode-dragover');\n }\n }\n }\n }, {\n key: \"onDragStart\",\n value: function onDragStart(event) {\n event.dataTransfer.setData(\"text\", this.props.dragdropScope);\n event.dataTransfer.setData(this.props.dragdropScope, this.props.dragdropScope);\n\n if (this.props.onDragStart) {\n this.props.onDragStart({\n originalEvent: event,\n path: this.props.path,\n index: this.props.index\n });\n }\n }\n }, {\n key: \"onDragEnd\",\n value: function onDragEnd(event) {\n if (this.props.onDragEnd) {\n this.props.onDragEnd({\n originalEvent: event\n });\n }\n }\n }, {\n key: \"renderLabel\",\n value: function renderLabel() {\n var content = /*#__PURE__*/React.createElement(\"span\", {\n className: \"p-treenode-label\"\n }, this.props.node.label);\n\n if (this.props.nodeTemplate) {\n var defaultContentOptions = {\n onTogglerClick: this.onTogglerClick,\n className: 'p-treenode-label',\n element: content,\n props: this.props,\n expanded: this.isExpanded()\n };\n content = ObjectUtils.getJSXElement(this.props.nodeTemplate, this.props.node, defaultContentOptions);\n }\n\n return content;\n }\n }, {\n key: \"renderCheckbox\",\n value: function renderCheckbox() {\n if (this.isCheckboxSelectionMode() && this.props.node.selectable !== false) {\n var checked = this.isChecked();\n var partialChecked = this.isPartialChecked();\n var className = classNames('p-checkbox-box', {\n 'p-highlight': checked,\n 'p-indeterminate': partialChecked,\n 'p-disabled': this.props.disabled\n });\n var icon = classNames('p-checkbox-icon p-c', {\n 'pi pi-check': checked,\n 'pi pi-minus': partialChecked\n });\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"p-checkbox p-component\"\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: className,\n role: \"checkbox\",\n \"aria-checked\": checked\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: icon\n })));\n }\n\n return null;\n }\n }, {\n key: \"renderIcon\",\n value: function renderIcon(expanded) {\n var icon = this.props.node.icon || (expanded ? this.props.node.expandedIcon : this.props.node.collapsedIcon);\n\n if (icon) {\n var className = classNames('p-treenode-icon', icon);\n return /*#__PURE__*/React.createElement(\"span\", {\n className: className\n });\n }\n\n return null;\n }\n }, {\n key: \"renderToggler\",\n value: function renderToggler(expanded) {\n var iconClassName = classNames('p-tree-toggler-icon pi pi-fw', {\n 'pi-chevron-right': !expanded,\n 'pi-chevron-down': expanded\n });\n var content = /*#__PURE__*/React.createElement(\"button\", {\n type: \"button\",\n className: \"p-tree-toggler p-link\",\n tabIndex: -1,\n onClick: this.onTogglerClick\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: iconClassName\n }), /*#__PURE__*/React.createElement(Ripple, null));\n\n if (this.props.togglerTemplate) {\n var defaultContentOptions = {\n onClick: this.onTogglerClick,\n containerClassName: 'p-tree-toggler p-link',\n iconClassName: 'p-tree-toggler-icon',\n element: content,\n props: this.props,\n expanded: expanded\n };\n content = ObjectUtils.getJSXElement(this.props.togglerTemplate, this.props.node, defaultContentOptions);\n }\n\n return content;\n }\n }, {\n key: \"renderDropPoint\",\n value: function renderDropPoint(position) {\n var _this2 = this;\n\n if (this.props.dragdropScope) {\n return /*#__PURE__*/React.createElement(\"li\", {\n className: \"p-treenode-droppoint\",\n onDrop: function onDrop(event) {\n return _this2.onDropPoint(event, position);\n },\n onDragOver: this.onDropPointDragOver,\n onDragEnter: this.onDropPointDragEnter,\n onDragLeave: this.onDropPointDragLeave\n });\n }\n\n return null;\n }\n }, {\n key: \"renderContent\",\n value: function renderContent() {\n var _this3 = this;\n\n var selected = this.isSelected();\n var checked = this.isChecked();\n var className = classNames('p-treenode-content', this.props.node.className, {\n 'p-treenode-selectable': this.props.selectionMode && this.props.node.selectable !== false,\n 'p-highlight': this.isCheckboxSelectionMode() ? checked : selected,\n 'p-highlight-contextmenu': this.props.contextMenuSelectionKey && this.props.contextMenuSelectionKey === this.props.node.key,\n 'p-disabled': this.props.disabled\n });\n var expanded = this.isExpanded();\n var toggler = this.renderToggler(expanded);\n var checkbox = this.renderCheckbox();\n var icon = this.renderIcon(expanded);\n var label = this.renderLabel();\n var tabIndex = this.props.disabled ? undefined : 0;\n return /*#__PURE__*/React.createElement(\"div\", {\n ref: function ref(el) {\n return _this3.contentElement = el;\n },\n className: className,\n style: this.props.node.style,\n onClick: this.onClick,\n onDoubleClick: this.onDoubleClick,\n onContextMenu: this.onRightClick,\n onTouchEnd: this.onTouchEnd,\n draggable: this.props.dragdropScope && this.props.node.draggable !== false && !this.props.disabled,\n onDrop: this.onDrop,\n onDragOver: this.onDragOver,\n onDragEnter: this.onDragEnter,\n onDragLeave: this.onDragLeave,\n onDragStart: this.onDragStart,\n onDragEnd: this.onDragEnd,\n tabIndex: tabIndex,\n onKeyDown: this.onNodeKeyDown,\n role: \"treeitem\",\n \"aria-posinset\": this.props.index + 1,\n \"aria-expanded\": this.isExpanded(),\n \"aria-selected\": checked || selected\n }, toggler, checkbox, icon, label);\n }\n }, {\n key: \"renderChildren\",\n value: function renderChildren() {\n var _this4 = this;\n\n if (this.props.node.children && this.props.node.children.length && this.isExpanded()) {\n return /*#__PURE__*/React.createElement(\"ul\", {\n className: \"p-treenode-children\",\n role: \"group\"\n }, this.props.node.children.map(function (childNode, index) {\n return /*#__PURE__*/React.createElement(UITreeNode, {\n key: childNode.key || childNode.label,\n node: childNode,\n parent: _this4.props.node,\n index: index,\n last: index === _this4.props.node.children.length - 1,\n path: _this4.props.path + '-' + index,\n disabled: _this4.props.disabled,\n selectionMode: _this4.props.selectionMode,\n selectionKeys: _this4.props.selectionKeys,\n onSelectionChange: _this4.props.onSelectionChange,\n metaKeySelection: _this4.props.metaKeySelection,\n propagateSelectionDown: _this4.props.propagateSelectionDown,\n propagateSelectionUp: _this4.props.propagateSelectionUp,\n contextMenuSelectionKey: _this4.props.contextMenuSelectionKey,\n onContextMenuSelectionChange: _this4.props.onContextMenuSelectionChange,\n onContextMenu: _this4.props.onContextMenu,\n onExpand: _this4.props.onExpand,\n onCollapse: _this4.props.onCollapse,\n onSelect: _this4.props.onSelect,\n onUnselect: _this4.props.onUnselect,\n expandedKeys: _this4.props.expandedKeys,\n onToggle: _this4.props.onToggle,\n onPropagateUp: _this4.propagateUp,\n nodeTemplate: _this4.props.nodeTemplate,\n togglerTemplate: _this4.props.togglerTemplate,\n isNodeLeaf: _this4.props.isNodeLeaf,\n dragdropScope: _this4.props.dragdropScope,\n onDragStart: _this4.props.onDragStart,\n onDragEnd: _this4.props.onDragEnd,\n onDrop: _this4.props.onDrop,\n onDropPoint: _this4.props.onDropPoint\n });\n }));\n }\n\n return null;\n }\n }, {\n key: \"renderNode\",\n value: function renderNode() {\n var className = classNames('p-treenode', {\n 'p-treenode-leaf': this.isLeaf()\n }, this.props.node.className);\n var content = this.renderContent();\n var children = this.renderChildren();\n return /*#__PURE__*/React.createElement(\"li\", {\n className: className,\n style: this.props.node.style\n }, content, children);\n }\n }, {\n key: \"render\",\n value: function render() {\n var node = this.renderNode();\n\n if (this.props.dragdropScope && !this.props.disabled) {\n var beforeDropPoint = this.renderDropPoint(-1);\n var afterDropPoint = this.props.last ? this.renderDropPoint(1) : null;\n return /*#__PURE__*/React.createElement(React.Fragment, null, beforeDropPoint, node, afterDropPoint);\n } else {\n return node;\n }\n }\n }]);\n\n return UITreeNode;\n}(Component);\n\n_defineProperty(UITreeNode, \"defaultProps\", {\n node: null,\n index: null,\n last: null,\n parent: null,\n path: null,\n disabled: false,\n selectionMode: null,\n selectionKeys: null,\n contextMenuSelectionKey: null,\n metaKeySelection: true,\n expandedKeys: null,\n propagateSelectionUp: true,\n propagateSelectionDown: true,\n dragdropScope: null,\n ariaLabel: null,\n ariaLabelledBy: null,\n nodeTemplate: null,\n togglerTemplate: null,\n isNodeLeaf: null,\n onSelect: null,\n onUnselect: null,\n onExpand: null,\n onCollapse: null,\n onToggle: null,\n onSelectionChange: null,\n onContextMenuSelectionChange: null,\n onPropagateUp: null,\n onDragStart: null,\n onDragEnd: null,\n onDrop: null,\n onDropPoint: null,\n onContextMenu: null,\n onNodeClick: null,\n onNodeDoubleClick: null\n});\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it[\"return\"] != null) it[\"return\"](); } finally { if (didErr) throw err; } } }; }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nvar Tree = /*#__PURE__*/function (_Component) {\n _inherits(Tree, _Component);\n\n var _super = _createSuper(Tree);\n\n function Tree(props) {\n var _this;\n\n _classCallCheck(this, Tree);\n\n _this = _super.call(this, props);\n _this.state = {};\n\n if (!_this.props.onFilterValueChange) {\n _this.state['filterValue'] = '';\n }\n\n if (!_this.props.onToggle) {\n _this.state['expandedKeys'] = _this.props.expandedKeys;\n }\n\n _this.isNodeLeaf = _this.isNodeLeaf.bind(_assertThisInitialized(_this));\n _this.onToggle = _this.onToggle.bind(_assertThisInitialized(_this));\n _this.onDragStart = _this.onDragStart.bind(_assertThisInitialized(_this));\n _this.onDragEnd = _this.onDragEnd.bind(_assertThisInitialized(_this));\n _this.onDrop = _this.onDrop.bind(_assertThisInitialized(_this));\n _this.onDropPoint = _this.onDropPoint.bind(_assertThisInitialized(_this));\n _this.onFilterInputChange = _this.onFilterInputChange.bind(_assertThisInitialized(_this));\n _this.onFilterInputKeyDown = _this.onFilterInputKeyDown.bind(_assertThisInitialized(_this));\n return _this;\n }\n\n _createClass(Tree, [{\n key: \"getFilterValue\",\n value: function getFilterValue() {\n return this.props.onFilterValueChange ? this.props.filterValue : this.state.filterValue;\n }\n }, {\n key: \"getExpandedKeys\",\n value: function getExpandedKeys() {\n return this.props.onToggle ? this.props.expandedKeys : this.state.expandedKeys;\n }\n }, {\n key: \"getRootNode\",\n value: function getRootNode() {\n return this.props.filter && this.filteredNodes ? this.filteredNodes : this.props.value;\n }\n }, {\n key: \"onToggle\",\n value: function onToggle(event) {\n if (this.props.onToggle) {\n this.props.onToggle(event);\n } else {\n this.setState({\n expandedKeys: event.value\n });\n }\n }\n }, {\n key: \"onDragStart\",\n value: function onDragStart(event) {\n this.dragState = {\n path: event.path,\n index: event.index\n };\n }\n }, {\n key: \"onDragEnd\",\n value: function onDragEnd() {\n this.dragState = null;\n }\n }, {\n key: \"onDrop\",\n value: function onDrop(event) {\n if (this.validateDropNode(this.dragState.path, event.path)) {\n var value = JSON.parse(JSON.stringify(this.props.value));\n var dragPaths = this.dragState.path.split('-');\n dragPaths.pop();\n var dragNodeParent = this.findNode(value, dragPaths);\n var dragNode = dragNodeParent ? dragNodeParent.children[this.dragState.index] : value[this.dragState.index];\n var dropNode = this.findNode(value, event.path.split('-'));\n if (dropNode.children) dropNode.children.push(dragNode);else dropNode.children = [dragNode];\n if (dragNodeParent) dragNodeParent.children.splice(this.dragState.index, 1);else value.splice(this.dragState.index, 1);\n\n if (this.props.onDragDrop) {\n this.props.onDragDrop({\n originalEvent: event.originalEvent,\n value: value,\n dragNode: dragNode,\n dropNode: dropNode,\n dropIndex: event.index\n });\n }\n }\n }\n }, {\n key: \"onDropPoint\",\n value: function onDropPoint(event) {\n if (this.validateDropPoint(event)) {\n var value = JSON.parse(JSON.stringify(this.props.value));\n var dragPaths = this.dragState.path.split('-');\n dragPaths.pop();\n var dropPaths = event.path.split('-');\n dropPaths.pop();\n var dragNodeParent = this.findNode(value, dragPaths);\n var dropNodeParent = this.findNode(value, dropPaths);\n var dragNode = dragNodeParent ? dragNodeParent.children[this.dragState.index] : value[this.dragState.index];\n var siblings = this.areSiblings(this.dragState.path, event.path);\n if (dragNodeParent) dragNodeParent.children.splice(this.dragState.index, 1);else value.splice(this.dragState.index, 1);\n\n if (event.position < 0) {\n var dropIndex = siblings ? this.dragState.index > event.index ? event.index : event.index - 1 : event.index;\n if (dropNodeParent) dropNodeParent.children.splice(dropIndex, 0, dragNode);else value.splice(dropIndex, 0, dragNode);\n } else {\n if (dropNodeParent) dropNodeParent.children.push(dragNode);else value.push(dragNode);\n }\n\n if (this.props.onDragDrop) {\n this.props.onDragDrop({\n originalEvent: event.originalEvent,\n value: value,\n dragNode: dragNode,\n dropNode: dropNodeParent,\n dropIndex: event.index\n });\n }\n }\n }\n }, {\n key: \"validateDrop\",\n value: function validateDrop(dragPath, dropPath) {\n if (!dragPath) {\n return false;\n } else {\n //same node\n if (dragPath === dropPath) {\n return false;\n } //parent dropped on an descendant\n\n\n if (dropPath.indexOf(dragPath) === 0) {\n return false;\n }\n\n return true;\n }\n }\n }, {\n key: \"validateDropNode\",\n value: function validateDropNode(dragPath, dropPath) {\n var validateDrop = this.validateDrop(dragPath, dropPath);\n\n if (validateDrop) {\n //child dropped on parent\n if (dragPath.indexOf('-') > 0 && dragPath.substring(0, dragPath.lastIndexOf('-')) === dropPath) {\n return false;\n }\n\n return true;\n } else {\n return false;\n }\n }\n }, {\n key: \"validateDropPoint\",\n value: function validateDropPoint(event) {\n var validateDrop = this.validateDrop(this.dragState.path, event.path);\n\n if (validateDrop) {\n //child dropped to next sibling's drop point\n if (event.position === -1 && this.areSiblings(this.dragState.path, event.path) && this.dragState.index + 1 === event.index) {\n return false;\n }\n\n return true;\n } else {\n return false;\n }\n }\n }, {\n key: \"areSiblings\",\n value: function areSiblings(path1, path2) {\n if (path1.length === 1 && path2.length === 1) return true;else return path1.substring(0, path1.lastIndexOf('-')) === path2.substring(0, path2.lastIndexOf('-'));\n }\n }, {\n key: \"findNode\",\n value: function findNode(value, path) {\n if (path.length === 0) {\n return null;\n } else {\n var index = parseInt(path[0], 10);\n var nextSearchRoot = value.children ? value.children[index] : value[index];\n\n if (path.length === 1) {\n return nextSearchRoot;\n } else {\n path.shift();\n return this.findNode(nextSearchRoot, path);\n }\n }\n }\n }, {\n key: \"isNodeLeaf\",\n value: function isNodeLeaf(node) {\n return node.leaf === false ? false : !(node.children && node.children.length);\n }\n }, {\n key: \"onFilterInputKeyDown\",\n value: function onFilterInputKeyDown(event) {\n //enter\n if (event.which === 13) {\n event.preventDefault();\n }\n }\n }, {\n key: \"onFilterInputChange\",\n value: function onFilterInputChange(event) {\n this.filterChanged = true;\n var filterValue = event.target.value;\n\n if (this.props.onFilterValueChange) {\n this.props.onFilterValueChange({\n originalEvent: event,\n value: filterValue\n });\n } else {\n this.setState({\n filterValue: filterValue\n });\n }\n }\n }, {\n key: \"filter\",\n value: function filter(value) {\n this.setState({\n filterValue: ObjectUtils.isNotEmpty(value) ? value : ''\n }, this._filter);\n }\n }, {\n key: \"_filter\",\n value: function _filter() {\n if (!this.filterChanged) {\n return;\n }\n\n var filterValue = this.getFilterValue();\n\n if (ObjectUtils.isEmpty(filterValue)) {\n this.filteredNodes = this.props.value;\n } else {\n this.filteredNodes = [];\n var searchFields = this.props.filterBy.split(',');\n var filterText = filterValue.toLocaleLowerCase(this.props.filterLocale);\n var isStrictMode = this.props.filterMode === 'strict';\n\n var _iterator = _createForOfIteratorHelper(this.props.value),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var node = _step.value;\n\n var copyNode = _objectSpread({}, node);\n\n var paramsWithoutNode = {\n searchFields: searchFields,\n filterText: filterText,\n isStrictMode: isStrictMode\n };\n\n if (isStrictMode && (this.findFilteredNodes(copyNode, paramsWithoutNode) || this.isFilterMatched(copyNode, paramsWithoutNode)) || !isStrictMode && (this.isFilterMatched(copyNode, paramsWithoutNode) || this.findFilteredNodes(copyNode, paramsWithoutNode))) {\n this.filteredNodes.push(copyNode);\n }\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n }\n\n this.filterChanged = false;\n }\n }, {\n key: \"findFilteredNodes\",\n value: function findFilteredNodes(node, paramsWithoutNode) {\n if (node) {\n var matched = false;\n\n if (node.children) {\n var childNodes = _toConsumableArray(node.children);\n\n node.children = [];\n\n var _iterator2 = _createForOfIteratorHelper(childNodes),\n _step2;\n\n try {\n for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n var childNode = _step2.value;\n\n var copyChildNode = _objectSpread({}, childNode);\n\n if (this.isFilterMatched(copyChildNode, paramsWithoutNode)) {\n matched = true;\n node.children.push(copyChildNode);\n }\n }\n } catch (err) {\n _iterator2.e(err);\n } finally {\n _iterator2.f();\n }\n }\n\n if (matched) {\n node.expanded = true;\n return true;\n }\n }\n }\n }, {\n key: \"isFilterMatched\",\n value: function isFilterMatched(node, _ref) {\n var searchFields = _ref.searchFields,\n filterText = _ref.filterText,\n isStrictMode = _ref.isStrictMode;\n var matched = false;\n\n var _iterator3 = _createForOfIteratorHelper(searchFields),\n _step3;\n\n try {\n for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {\n var field = _step3.value;\n var fieldValue = String(ObjectUtils.resolveFieldData(node, field)).toLocaleLowerCase(this.props.filterLocale);\n\n if (fieldValue.indexOf(filterText) > -1) {\n matched = true;\n }\n }\n } catch (err) {\n _iterator3.e(err);\n } finally {\n _iterator3.f();\n }\n\n if (!matched || isStrictMode && !this.isNodeLeaf(node)) {\n matched = this.findFilteredNodes(node, {\n searchFields: searchFields,\n filterText: filterText,\n isStrictMode: isStrictMode\n }) || matched;\n }\n\n return matched;\n }\n }, {\n key: \"renderRootChild\",\n value: function renderRootChild(node, index, last) {\n return /*#__PURE__*/React.createElement(UITreeNode, {\n key: node.key || node.label,\n node: node,\n index: index,\n last: last,\n path: String(index),\n disabled: this.props.disabled,\n selectionMode: this.props.selectionMode,\n selectionKeys: this.props.selectionKeys,\n onSelectionChange: this.props.onSelectionChange,\n metaKeySelection: this.props.metaKeySelection,\n contextMenuSelectionKey: this.props.contextMenuSelectionKey,\n onContextMenuSelectionChange: this.props.onContextMenuSelectionChange,\n onContextMenu: this.props.onContextMenu,\n propagateSelectionDown: this.props.propagateSelectionDown,\n propagateSelectionUp: this.props.propagateSelectionUp,\n onExpand: this.props.onExpand,\n onCollapse: this.props.onCollapse,\n onSelect: this.props.onSelect,\n onUnselect: this.props.onUnselect,\n expandedKeys: this.getExpandedKeys(),\n onToggle: this.onToggle,\n nodeTemplate: this.props.nodeTemplate,\n togglerTemplate: this.props.togglerTemplate,\n isNodeLeaf: this.isNodeLeaf,\n dragdropScope: this.props.dragdropScope,\n onDragStart: this.onDragStart,\n onDragEnd: this.onDragEnd,\n onDrop: this.onDrop,\n onDropPoint: this.onDropPoint,\n onNodeClick: this.props.onNodeClick,\n onNodeDoubleClick: this.props.onNodeDoubleClick\n });\n }\n }, {\n key: \"renderRootChildren\",\n value: function renderRootChildren() {\n var _this2 = this;\n\n if (this.props.filter) {\n this.filterChanged = true;\n\n this._filter();\n }\n\n var value = this.getRootNode();\n return value.map(function (node, index) {\n return _this2.renderRootChild(node, index, index === value.length - 1);\n });\n }\n }, {\n key: \"renderModel\",\n value: function renderModel() {\n if (this.props.value) {\n var rootNodes = this.renderRootChildren();\n var contentClass = classNames('p-tree-container', this.props.contentClassName);\n return /*#__PURE__*/React.createElement(\"ul\", {\n className: contentClass,\n role: \"tree\",\n \"aria-label\": this.props.ariaLabel,\n \"aria-labelledby\": this.props.ariaLabelledBy,\n style: this.props.contentStyle\n }, rootNodes);\n }\n\n return null;\n }\n }, {\n key: \"renderLoader\",\n value: function renderLoader() {\n if (this.props.loading) {\n var icon = classNames('p-tree-loading-icon pi-spin', this.props.loadingIcon);\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"p-tree-loading-overlay p-component-overlay\"\n }, /*#__PURE__*/React.createElement(\"i\", {\n className: icon\n }));\n }\n\n return null;\n }\n }, {\n key: \"renderFilter\",\n value: function renderFilter() {\n if (this.props.filter) {\n var filterValue = this.getFilterValue();\n filterValue = ObjectUtils.isNotEmpty(filterValue) ? filterValue : '';\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"p-tree-filter-container\"\n }, /*#__PURE__*/React.createElement(\"input\", {\n type: \"text\",\n value: filterValue,\n autoComplete: \"off\",\n className: \"p-tree-filter p-inputtext p-component\",\n placeholder: this.props.filterPlaceholder,\n onKeyDown: this.onFilterInputKeyDown,\n onChange: this.onFilterInputChange,\n disabled: this.props.disabled\n }), /*#__PURE__*/React.createElement(\"span\", {\n className: \"p-tree-filter-icon pi pi-search\"\n }));\n }\n\n return null;\n }\n }, {\n key: \"renderHeader\",\n value: function renderHeader() {\n if (this.props.showHeader) {\n var filterElement = this.renderFilter();\n var content = filterElement;\n\n if (this.props.header) {\n var defaultContentOptions = {\n filterContainerClassName: 'p-tree-filter-container',\n filterIconClasssName: 'p-tree-filter-icon pi pi-search',\n filterInput: {\n className: 'p-tree-filter p-inputtext p-component',\n onKeyDown: this.onFilterInputKeyDown,\n onChange: this.onFilterInputChange\n },\n filterElement: filterElement,\n element: content,\n props: this.props\n };\n content = ObjectUtils.getJSXElement(this.props.header, defaultContentOptions);\n }\n\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"p-tree-header\"\n }, content);\n }\n\n return null;\n }\n }, {\n key: \"renderFooter\",\n value: function renderFooter() {\n var content = ObjectUtils.getJSXElement(this.props.footer, this.props);\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"p-tree-footer\"\n }, content);\n }\n }, {\n key: \"render\",\n value: function render() {\n var className = classNames('p-tree p-component', this.props.className, {\n 'p-tree-selectable': this.props.selectionMode,\n 'p-tree-loading': this.props.loading,\n 'p-disabled': this.props.disabled\n });\n var loader = this.renderLoader();\n var content = this.renderModel();\n var header = this.renderHeader();\n var footer = this.renderFooter();\n return /*#__PURE__*/React.createElement(\"div\", {\n id: this.props.id,\n className: className,\n style: this.props.style\n }, loader, header, content, footer);\n }\n }]);\n\n return Tree;\n}(Component);\n\n_defineProperty(Tree, \"defaultProps\", {\n id: null,\n value: null,\n disabled: false,\n selectionMode: null,\n selectionKeys: null,\n onSelectionChange: null,\n contextMenuSelectionKey: null,\n onContextMenuSelectionChange: null,\n expandedKeys: null,\n style: null,\n className: null,\n contentStyle: null,\n contentClassName: null,\n metaKeySelection: true,\n propagateSelectionUp: true,\n propagateSelectionDown: true,\n loading: false,\n loadingIcon: 'pi pi-spinner',\n dragdropScope: null,\n header: null,\n footer: null,\n showHeader: true,\n filter: false,\n filterValue: null,\n filterBy: 'label',\n filterMode: 'lenient',\n filterPlaceholder: null,\n filterLocale: undefined,\n nodeTemplate: null,\n togglerTemplate: null,\n onSelect: null,\n onUnselect: null,\n onExpand: null,\n onCollapse: null,\n onToggle: null,\n onDragDrop: null,\n onContextMenu: null,\n onFilterValueChange: null,\n onNodeClick: null,\n onNodeDoubleClick: null\n});\n\nexport { Tree };\n"],"mappings":"AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC;AACA,SAASC,UAAT,EAAqBC,WAArB,EAAkCC,UAAlC,QAAoD,kBAApD;AACA,SAASC,MAAT,QAAuB,mBAAvB;;AAEA,SAASC,mBAAT,CAA6BC,GAA7B,EAAkCC,GAAlC,EAAuC;EACrC,IAAIA,GAAG,IAA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