{"version":3,"file":"tree-item-element-base-CLYIkt67.js","sources":["../../../src/packages/core/tree/entity-actions/reload-tree-item-children/reload-tree-item-children-request.event.ts","../../../src/packages/core/tree/tree-item/tree-item-base/tree-item-context-base.ts","../../../src/packages/core/tree/tree-item/tree-item-base/tree-item-element-base.ts"],"sourcesContent":["import { UmbEntityActionEvent, type UmbEntityActionEventArgs } from '@umbraco-cms/backoffice/entity-action';\n\n/**\n * @deprecated Use `UmbRequestReloadChildrenOfEntityEvent` instead.\n */\nexport class UmbRequestReloadTreeItemChildrenEvent extends UmbEntityActionEvent {\n\tstatic readonly TYPE = 'request-reload-tree-item-children';\n\n\tconstructor(args: UmbEntityActionEventArgs) {\n\t\tsuper(UmbRequestReloadTreeItemChildrenEvent.TYPE, args);\n\t}\n}\n","import type { UmbTreeItemContext } from '../tree-item-context.interface.js';\nimport { UMB_TREE_CONTEXT, type UmbDefaultTreeContext } from '../../default/index.js';\nimport type { UmbTreeItemModel, UmbTreeRootModel } from '../../types.js';\nimport { UmbRequestReloadTreeItemChildrenEvent } from '../../entity-actions/reload-tree-item-children/index.js';\nimport { map } from '@umbraco-cms/backoffice/external/rxjs';\nimport { UmbArrayState, UmbBooleanState, UmbObjectState, UmbStringState } from '@umbraco-cms/backoffice/observable-api';\nimport type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';\nimport { UmbContextBase } from '@umbraco-cms/backoffice/class-api';\nimport { UmbContextToken } from '@umbraco-cms/backoffice/context-api';\nimport { UMB_SECTION_CONTEXT, UMB_SECTION_SIDEBAR_CONTEXT } from '@umbraco-cms/backoffice/section';\nimport type { UmbSectionContext, UmbSectionSidebarContext } from '@umbraco-cms/backoffice/section';\nimport type { ManifestTreeItem } from '@umbraco-cms/backoffice/extension-registry';\nimport { umbExtensionsRegistry } from '@umbraco-cms/backoffice/extension-registry';\nimport { UMB_ACTION_EVENT_CONTEXT, type UmbActionEventContext } from '@umbraco-cms/backoffice/action';\nimport {\n\tUmbRequestReloadChildrenOfEntityEvent,\n\tUmbRequestReloadStructureForEntityEvent,\n} from '@umbraco-cms/backoffice/entity-action';\nimport type { UmbEntityActionEvent } from '@umbraco-cms/backoffice/entity-action';\nimport { UmbPaginationManager, debounce } from '@umbraco-cms/backoffice/utils';\nimport { UmbChangeEvent } from '@umbraco-cms/backoffice/event';\n\nexport abstract class UmbTreeItemContextBase<\n\t\tTreeItemType extends UmbTreeItemModel,\n\t\tTreeRootType extends UmbTreeRootModel,\n\t>\n\textends UmbContextBase>\n\timplements UmbTreeItemContext\n{\n\tpublic unique?: string | null;\n\tpublic entityType?: string;\n\tpublic readonly pagination = new UmbPaginationManager();\n\n\t#manifest?: ManifestTreeItem;\n\n\tprotected readonly _treeItem = new UmbObjectState(undefined);\n\treadonly treeItem = this._treeItem.asObservable();\n\n\t// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n\t// @ts-ignore\n\t#childItems = new UmbArrayState([], (x) => x.unique);\n\treadonly childItems = this.#childItems.asObservable();\n\n\t#hasChildren = new UmbBooleanState(false);\n\treadonly hasChildren = this.#hasChildren.asObservable();\n\n\t#isLoading = new UmbBooleanState(false);\n\treadonly isLoading = this.#isLoading.asObservable();\n\n\t#isSelectable = new UmbBooleanState(false);\n\treadonly isSelectable = this.#isSelectable.asObservable();\n\n\t#isSelectableContext = new UmbBooleanState(false);\n\treadonly isSelectableContext = this.#isSelectableContext.asObservable();\n\n\t#isSelected = new UmbBooleanState(false);\n\treadonly isSelected = this.#isSelected.asObservable();\n\n\t#isActive = new UmbBooleanState(false);\n\treadonly isActive = this.#isActive.asObservable();\n\n\t#hasActions = new UmbBooleanState(false);\n\treadonly hasActions = this.#hasActions.asObservable();\n\n\t#path = new UmbStringState('');\n\treadonly path = this.#path.asObservable();\n\n\t#foldersOnly = new UmbBooleanState(false);\n\treadonly foldersOnly = this.#foldersOnly.asObservable();\n\n\ttreeContext?: UmbDefaultTreeContext;\n\t#sectionContext?: UmbSectionContext;\n\t#sectionSidebarContext?: UmbSectionSidebarContext;\n\t#actionEventContext?: UmbActionEventContext;\n\n\t// TODO: get this from the tree context\n\t#paging = {\n\t\tskip: 0,\n\t\ttake: 50,\n\t};\n\n\tconstructor(host: UmbControllerHost) {\n\t\tsuper(host, UMB_TREE_ITEM_CONTEXT);\n\t\tthis.pagination.setPageSize(this.#paging.take);\n\t\tthis.#consumeContexts();\n\n\t\t// listen for page changes on the pagination manager\n\t\tthis.pagination.addEventListener(UmbChangeEvent.TYPE, this.#onPageChange);\n\n\t\t/* TODO: revisit. This is a temp solution to notify the parent it needs to reload its children\n\t\tthere might be a better way to do this through a tree item parent context.\n\t\tIt does not look like there is a way to have a \"dynamic\" parent context that will stop when a\n\t\tspecific parent is reached (a tree item unique that matches the parentUnique of this item) */\n\t\tconst hostElement = this.getHostElement();\n\t\t// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n\t\t// @ts-ignore\n\t\thostElement.addEventListener('temp-reload-tree-item-parent', (event: CustomEvent) => {\n\t\t\tconst treeItem = this.getTreeItem();\n\t\t\t// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n\t\t\t// @ts-ignore\n\t\t\tconst unique = treeItem?.unique;\n\t\t\tif (event.detail.unique === unique) {\n\t\t\t\tevent.stopPropagation();\n\t\t\t\tthis.loadChildren();\n\t\t\t}\n\t\t});\n\n\t\twindow.addEventListener('navigationend', this.#debouncedCheckIsActive);\n\t}\n\n\t/**\n\t * Sets the manifest\n\t * @param {ManifestCollection} manifest\n\t * @memberof UmbCollectionContext\n\t */\n\tpublic set manifest(manifest: ManifestTreeItem | undefined) {\n\t\tif (this.#manifest === manifest) return;\n\t\tthis.#manifest = manifest;\n\t}\n\tpublic get manifest() {\n\t\treturn this.#manifest;\n\t}\n\n\t// TODO: Be aware that this method, could be removed and we can use the getter method instead [NL]\n\t/**\n\t * Returns the manifest.\n\t * @returns {ManifestCollection}\n\t * @memberof UmbCollectionContext\n\t */\n\tpublic getManifest() {\n\t\treturn this.#manifest;\n\t}\n\n\tpublic setTreeItem(treeItem: TreeItemType | undefined) {\n\t\tif (!treeItem) {\n\t\t\tthis._treeItem.setValue(undefined);\n\t\t\treturn;\n\t\t}\n\n\t\t// Only check for undefined. The tree root has null as unique\n\t\tif (treeItem.unique === undefined) throw new Error('Could not create tree item context, unique is missing');\n\t\tthis.unique = treeItem.unique;\n\n\t\tif (!treeItem.entityType) throw new Error('Could not create tree item context, tree item type is missing');\n\t\tthis.entityType = treeItem.entityType;\n\n\t\tthis.#hasChildren.setValue(treeItem.hasChildren || false);\n\t\tthis._treeItem.setValue(treeItem);\n\n\t\t// Update observers:\n\t\tthis.#observeActions();\n\t\tthis.#observeIsSelectable();\n\t\tthis.#observeIsSelected();\n\t\tthis.#observeSectionPath();\n\t}\n\n\t/**\n\t * Load children of the tree item\n\t * @memberof UmbTreeItemContextBase\n\t */\n\tpublic loadChildren = () => this.#loadChildren();\n\n\t/**\n\t * Load more children of the tree item\n\t * @memberof UmbTreeItemContextBase\n\t */\n\tpublic loadMore = () => this.#loadChildren(true);\n\n\tasync #loadChildren(loadMore = false) {\n\t\tif (this.unique === undefined) throw new Error('Could not request children, unique key is missing');\n\t\tif (this.entityType === undefined) throw new Error('Could not request children, entity type is missing');\n\n\t\t// TODO: wait for tree context to be ready\n\t\tconst repository = this.treeContext?.getRepository();\n\t\tif (!repository) throw new Error('Could not request children, repository is missing');\n\n\t\tthis.#isLoading.setValue(true);\n\n\t\tconst skip = loadMore ? this.#paging.skip : 0;\n\t\tconst take = loadMore ? this.#paging.take : this.pagination.getCurrentPageNumber() * this.#paging.take;\n\t\tconst foldersOnly = this.#foldersOnly.getValue();\n\t\tconst additionalArgs = this.treeContext?.getAdditionalRequestArgs();\n\n\t\tconst { data } = await repository.requestTreeItemsOf({\n\t\t\tparent: {\n\t\t\t\tunique: this.unique,\n\t\t\t\tentityType: this.entityType,\n\t\t\t},\n\t\t\tfoldersOnly,\n\t\t\tskip,\n\t\t\ttake,\n\t\t\t...additionalArgs,\n\t\t});\n\n\t\tif (data) {\n\t\t\tif (loadMore) {\n\t\t\t\tconst currentItems = this.#childItems.getValue();\n\t\t\t\tthis.#childItems.setValue([...currentItems, ...data.items]);\n\t\t\t} else {\n\t\t\t\tthis.#childItems.setValue(data.items);\n\t\t\t}\n\n\t\t\tthis.#hasChildren.setValue(data.total > 0);\n\t\t\tthis.pagination.setTotalItems(data.total);\n\t\t}\n\n\t\tthis.#isLoading.setValue(false);\n\t}\n\n\tpublic toggleContextMenu() {\n\t\tif (!this.getTreeItem() || !this.entityType || this.unique === undefined) {\n\t\t\tthrow new Error('Could not request children, tree item is not set');\n\t\t}\n\n\t\tthis.#sectionSidebarContext?.toggleContextMenu(this.getHostElement(), {\n\t\t\tentityType: this.entityType,\n\t\t\tunique: this.unique,\n\t\t\theadline: this.getTreeItem()?.name || '',\n\t\t});\n\t}\n\n\tpublic select() {\n\t\tif (this.unique === undefined) throw new Error('Could not select. Unique is missing');\n\t\tthis.treeContext?.selection.select(this.unique);\n\t}\n\n\tpublic deselect() {\n\t\tif (this.unique === undefined) throw new Error('Could not deselect. Unique is missing');\n\t\tthis.treeContext?.selection.deselect(this.unique);\n\t}\n\n\tasync #consumeContexts() {\n\t\tthis.consumeContext(UMB_SECTION_CONTEXT, (instance) => {\n\t\t\tthis.#sectionContext = instance;\n\t\t\tthis.#observeSectionPath();\n\t\t});\n\n\t\tthis.consumeContext(UMB_SECTION_SIDEBAR_CONTEXT, (instance) => {\n\t\t\tthis.#sectionSidebarContext = instance;\n\t\t});\n\n\t\tthis.consumeContext(UMB_TREE_CONTEXT, (treeContext) => {\n\t\t\t// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n\t\t\t// @ts-ignore\n\t\t\tthis.treeContext = treeContext;\n\t\t\tthis.#observeIsSelectable();\n\t\t\tthis.#observeIsSelected();\n\t\t\tthis.#observeFoldersOnly();\n\t\t});\n\n\t\tthis.consumeContext(UMB_ACTION_EVENT_CONTEXT, (instance) => {\n\t\t\tthis.#actionEventContext?.removeEventListener(\n\t\t\t\tUmbRequestReloadTreeItemChildrenEvent.TYPE,\n\t\t\t\tthis.#onReloadRequest as EventListener,\n\t\t\t);\n\n\t\t\tthis.#actionEventContext?.removeEventListener(\n\t\t\t\tUmbRequestReloadChildrenOfEntityEvent.TYPE,\n\t\t\t\tthis.#onReloadRequest as EventListener,\n\t\t\t);\n\n\t\t\tthis.#actionEventContext?.removeEventListener(\n\t\t\t\tUmbRequestReloadStructureForEntityEvent.TYPE,\n\t\t\t\tthis.#onReloadStructureRequest as unknown as EventListener,\n\t\t\t);\n\n\t\t\tthis.#actionEventContext = instance;\n\n\t\t\tthis.#actionEventContext.addEventListener(\n\t\t\t\tUmbRequestReloadTreeItemChildrenEvent.TYPE,\n\t\t\t\tthis.#onReloadRequest as EventListener,\n\t\t\t);\n\n\t\t\tthis.#actionEventContext.addEventListener(\n\t\t\t\tUmbRequestReloadChildrenOfEntityEvent.TYPE,\n\t\t\t\tthis.#onReloadRequest as EventListener,\n\t\t\t);\n\n\t\t\tthis.#actionEventContext.addEventListener(\n\t\t\t\tUmbRequestReloadStructureForEntityEvent.TYPE,\n\t\t\t\tthis.#onReloadStructureRequest as unknown as EventListener,\n\t\t\t);\n\t\t});\n\t}\n\n\tgetTreeItem() {\n\t\treturn this._treeItem.getValue();\n\t}\n\n\t#observeIsSelectable() {\n\t\tif (!this.treeContext) return;\n\t\tthis.observe(\n\t\t\tthis.treeContext.selection.selectable,\n\t\t\t(value) => {\n\t\t\t\tthis.#isSelectableContext.setValue(value);\n\n\t\t\t\t// If the tree is selectable, check if this item is selectable\n\t\t\t\tif (value === true) {\n\t\t\t\t\tconst isSelectable = this.treeContext?.selectableFilter?.(this.getTreeItem()!) ?? true;\n\t\t\t\t\tthis.#isSelectable.setValue(isSelectable);\n\t\t\t\t\tthis.#checkIsActive();\n\t\t\t\t}\n\t\t\t},\n\t\t\t'observeIsSelectable',\n\t\t);\n\t}\n\n\t#observeIsSelected() {\n\t\tif (!this.treeContext || !this.unique) return;\n\n\t\tthis.observe(\n\t\t\tthis.treeContext.selection.selection.pipe(map((selection) => selection.includes(this.unique!))),\n\t\t\t(isSelected) => {\n\t\t\t\tthis.#isSelected.setValue(isSelected);\n\t\t\t},\n\t\t\t'observeIsSelected',\n\t\t);\n\t}\n\n\t#observeFoldersOnly() {\n\t\tif (!this.treeContext || this.unique === undefined) return;\n\n\t\tthis.observe(\n\t\t\tthis.treeContext.foldersOnly,\n\t\t\t(foldersOnly) => {\n\t\t\t\tthis.#foldersOnly.setValue(foldersOnly);\n\t\t\t},\n\t\t\t'observeFoldersOnly',\n\t\t);\n\t}\n\n\t#observeSectionPath() {\n\t\tif (!this.#sectionContext) return;\n\n\t\tthis.observe(\n\t\t\tthis.#sectionContext.pathname,\n\t\t\t(pathname) => {\n\t\t\t\tif (!pathname || !this.entityType || this.unique === undefined) return;\n\t\t\t\tconst path = this.constructPath(pathname, this.entityType, this.unique);\n\t\t\t\tthis.#path.setValue(path);\n\t\t\t\tthis.#checkIsActive();\n\t\t\t},\n\t\t\t'observeSectionPath',\n\t\t);\n\t}\n\n\t#observeActions() {\n\t\tthis.observe(\n\t\t\tumbExtensionsRegistry\n\t\t\t\t.byType('entityAction')\n\t\t\t\t.pipe(map((actions) => actions.filter((action) => action.forEntityTypes.includes(this.entityType!)))),\n\t\t\t(actions) => {\n\t\t\t\tthis.#hasActions.setValue(actions.length > 0);\n\t\t\t},\n\t\t\t'observeActions',\n\t\t);\n\t}\n\n\t#onReloadRequest = (event: UmbEntityActionEvent) => {\n\t\tif (event.getUnique() !== this.unique) return;\n\t\tif (event.getEntityType() !== this.entityType) return;\n\t\tthis.loadChildren();\n\t};\n\n\t#onReloadStructureRequest = async (event: UmbRequestReloadStructureForEntityEvent) => {\n\t\tif (!this.unique) return;\n\t\tif (event.getUnique() !== this.unique) return;\n\t\tif (event.getEntityType() !== this.entityType) return;\n\n\t\t/* TODO: revisit. This is a temp solution to notify the parent it needs to reload its children\n\t\tthere might be a better way to do this through a tree item parent context.\n\t\tIt does not look like there is a way to have a \"dynamic\" parent context that will stop when a\n\t\tspecific parent is reached (a tree item unique that matches the parentUnique of this item) */\n\t\tconst treeItem = this.getTreeItem();\n\t\tconst parentUnique = treeItem?.parent.unique;\n\n\t\tconst customEvent = new CustomEvent('temp-reload-tree-item-parent', {\n\t\t\tdetail: { unique: parentUnique },\n\t\t\tbubbles: true,\n\t\t\tcomposed: true,\n\t\t});\n\t\tthis.getHostElement().dispatchEvent(customEvent);\n\t};\n\n\t#onPageChange = (event: UmbChangeEvent) => {\n\t\tconst target = event.target as UmbPaginationManager;\n\t\tthis.#paging.skip = target.getSkip();\n\t\tthis.loadMore();\n\t};\n\n\t#debouncedCheckIsActive = debounce(() => this.#checkIsActive(), 100);\n\n\t#checkIsActive() {\n\t\t// don't set the active state if the item is selectable\n\t\tconst isSelectable = this.#isSelectable.getValue();\n\n\t\tif (isSelectable) {\n\t\t\tthis.#isActive.setValue(false);\n\t\t\treturn;\n\t\t}\n\n\t\tconst path = this.#path.getValue();\n\t\tconst location = window.location.pathname;\n\t\tconst isActive = location.includes(path);\n\t\tthis.#isActive.setValue(isActive);\n\t}\n\n\t// TODO: use router context\n\tconstructPath(pathname: string, entityType: string, unique: string | null) {\n\t\t// TODO: Encode uniques [NL]\n\t\treturn `section/${pathname}/workspace/${entityType}/edit/${unique}`;\n\t}\n\n\toverride destroy(): void {\n\t\tthis.#actionEventContext?.removeEventListener(\n\t\t\tUmbRequestReloadTreeItemChildrenEvent.TYPE,\n\t\t\tthis.#onReloadRequest as EventListener,\n\t\t);\n\n\t\tthis.#actionEventContext?.removeEventListener(\n\t\t\tUmbRequestReloadChildrenOfEntityEvent.TYPE,\n\t\t\tthis.#onReloadRequest as EventListener,\n\t\t);\n\n\t\tthis.#actionEventContext?.removeEventListener(\n\t\t\tUmbRequestReloadStructureForEntityEvent.TYPE,\n\t\t\tthis.#onReloadStructureRequest as unknown as EventListener,\n\t\t);\n\t\twindow.removeEventListener('navigationend', this.#debouncedCheckIsActive);\n\t\tsuper.destroy();\n\t}\n}\n\nexport const UMB_TREE_ITEM_CONTEXT = new UmbContextToken>('UmbTreeItemContext');\n","import type { UmbTreeItemContext } from '../index.js';\nimport type { UmbTreeItemModel } from '../../types.js';\nimport { UMB_TREE_ITEM_CONTEXT } from './tree-item-context-base.js';\nimport { html, nothing, state, ifDefined, repeat, property } from '@umbraco-cms/backoffice/external/lit';\nimport { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';\n\n// eslint-disable-next-line local-rules/enforce-element-suffix-on-element-class-name\nexport abstract class UmbTreeItemElementBase extends UmbLitElement {\n\t_item?: TreeItemModelType;\n\t@property({ type: Object, attribute: false })\n\tget item(): TreeItemModelType | undefined {\n\t\treturn this._item;\n\t}\n\tset item(newVal: TreeItemModelType) {\n\t\tthis._item = newVal;\n\t\tthis.#initTreeItem();\n\t}\n\n\t@property({ type: Boolean, attribute: false })\n\thideActions: boolean = false;\n\n\t@state()\n\tprivate _isActive = false;\n\n\t@state()\n\tprivate _childItems?: TreeItemModelType[];\n\n\t@state()\n\tprivate _href?: string;\n\n\t@state()\n\tprivate _isLoading = false;\n\n\t@state()\n\tprivate _isSelectableContext = false;\n\n\t@state()\n\tprivate _isSelectable = false;\n\n\t@state()\n\tprivate _isSelected = false;\n\n\t@state()\n\tprivate _hasChildren = false;\n\n\t@state()\n\tprivate _iconSlotHasChildren = false;\n\n\t@state()\n\tprivate _totalPages = 1;\n\n\t@state()\n\tprivate _currentPage = 1;\n\n\t#treeItemContext?: UmbTreeItemContext;\n\n\tconstructor() {\n\t\tsuper();\n\n\t\t// TODO: Notice this can be retrieve via a api property. [NL]\n\t\tthis.consumeContext(UMB_TREE_ITEM_CONTEXT, (instance) => {\n\t\t\tthis.#treeItemContext = instance;\n\t\t\tif (!this.#treeItemContext) return;\n\n\t\t\tthis.#initTreeItem();\n\n\t\t\t// TODO: investigate if we can make an observe decorator\n\t\t\tthis.observe(this.#treeItemContext.treeItem, (value) => (this._item = value));\n\t\t\tthis.observe(this.#treeItemContext.childItems, (value) => (this._childItems = value));\n\t\t\tthis.observe(this.#treeItemContext.hasChildren, (value) => (this._hasChildren = value));\n\t\t\tthis.observe(this.#treeItemContext.isActive, (value) => (this._isActive = value));\n\t\t\tthis.observe(this.#treeItemContext.isLoading, (value) => (this._isLoading = value));\n\t\t\tthis.observe(this.#treeItemContext.isSelectableContext, (value) => (this._isSelectableContext = value));\n\t\t\tthis.observe(this.#treeItemContext.isSelectable, (value) => (this._isSelectable = value));\n\t\t\tthis.observe(this.#treeItemContext.isSelected, (value) => (this._isSelected = value));\n\t\t\tthis.observe(this.#treeItemContext.path, (value) => (this._href = value));\n\t\t\tthis.observe(this.#treeItemContext.pagination.currentPage, (value) => (this._currentPage = value));\n\t\t\tthis.observe(this.#treeItemContext.pagination.totalPages, (value) => (this._totalPages = value));\n\t\t});\n\t}\n\n\t#initTreeItem() {\n\t\tif (!this.#treeItemContext) return;\n\t\tif (!this._item) return;\n\t\tthis.#treeItemContext.setTreeItem(this._item);\n\t}\n\n\tprivate _handleSelectedItem(event: Event) {\n\t\tevent.stopPropagation();\n\t\tthis.#treeItemContext?.select();\n\t}\n\n\tprivate _handleDeselectedItem(event: Event) {\n\t\tevent.stopPropagation();\n\t\tthis.#treeItemContext?.deselect();\n\t}\n\n\t// TODO: do we want to catch and emit a backoffice event here?\n\tprivate _onShowChildren() {\n\t\tthis.#treeItemContext?.loadChildren();\n\t}\n\n\t#onLoadMoreClick = (event: any) => {\n\t\tevent.stopPropagation();\n\t\tconst next = (this._currentPage = this._currentPage + 1);\n\t\tthis.#treeItemContext?.pagination.setCurrentPageNumber(next);\n\t};\n\n\t// Note: Currently we want to prevent opening when the item is in a selectable context, but this might change in the future.\n\t// If we like to be able to open items in selectable context, then we might want to make it as a menu item action, so you have to click ... and chose an action called 'Edit'\n\toverride render() {\n\t\tconst label = this.localize.string(this._item?.name ?? '');\n\t\treturn html`\n\t\t\t\n\t\t\t\t${this.renderIconContainer()} ${this.renderLabel()} ${this.#renderActions()} ${this.#renderChildItems()}\n\t\t\t\t\n\t\t\t\t${this.#renderPaging()}\n\t\t\t\n\t\t`;\n\t}\n\n\t#hasNodes = (e: Event) => {\n\t\treturn (e.target as HTMLSlotElement).assignedNodes({ flatten: true }).length > 0;\n\t};\n\n\trenderIconContainer() {\n\t\treturn html`\n\t\t\t {\n\t\t\t\t\tthis._iconSlotHasChildren = this.#hasNodes(e);\n\t\t\t\t}}>\n\t\t\t${!this._iconSlotHasChildren ? this.#renderIcon() : nothing}\n\t\t`;\n\t}\n\n\t#renderIcon() {\n\t\tconst icon = this._item?.icon;\n\t\tconst isFolder = this._item?.isFolder;\n\n\t\tif (icon) {\n\t\t\treturn html``;\n\t\t}\n\n\t\tif (isFolder) {\n\t\t\treturn html``;\n\t\t}\n\n\t\treturn html``;\n\t}\n\n\trenderLabel() {\n\t\treturn html``;\n\t}\n\n\t#renderActions() {\n\t\tif (this.hideActions) return;\n\t\treturn this.#treeItemContext && this._item\n\t\t\t? html`\n\t\t\t\t`\n\t\t\t: '';\n\t}\n\n\t#renderChildItems() {\n\t\treturn html`\n\t\t\t${this._childItems\n\t\t\t\t? repeat(\n\t\t\t\t\t\tthis._childItems,\n\t\t\t\t\t\t(item, index) => item.name + '___' + index,\n\t\t\t\t\t\t(item) =>\n\t\t\t\t\t\t\thtml``,\n\t\t\t\t\t)\n\t\t\t\t: ''}\n\t\t`;\n\t}\n\n\t#renderPaging() {\n\t\tif (this._totalPages <= 1 || this._currentPage === this._totalPages) {\n\t\t\treturn nothing;\n\t\t}\n\n\t\treturn html` `;\n\t}\n}\n"],"names":["UmbRequestReloadTreeItemChildrenEvent","UmbEntityActionEvent","args","UmbTreeItemContextBase","UmbContextBase","host","UMB_TREE_ITEM_CONTEXT","UmbPaginationManager","UmbObjectState","#childItems","UmbArrayState","x","#hasChildren","UmbBooleanState","#isLoading","#isSelectable","#isSelectableContext","#isSelected","#isActive","#hasActions","#path","UmbStringState","#foldersOnly","#paging","#loadChildren","#onReloadRequest","event","#onReloadStructureRequest","parentUnique","customEvent","#onPageChange","target","#debouncedCheckIsActive","debounce","#checkIsActive","#consumeContexts","UmbChangeEvent","unique","#manifest","#sectionContext","#sectionSidebarContext","#actionEventContext","manifest","treeItem","#observeActions","#observeIsSelectable","#observeIsSelected","#observeSectionPath","loadMore","repository","skip","take","foldersOnly","additionalArgs","data","currentItems","UMB_SECTION_CONTEXT","instance","UMB_SECTION_SIDEBAR_CONTEXT","UMB_TREE_CONTEXT","treeContext","#observeFoldersOnly","UMB_ACTION_EVENT_CONTEXT","UmbRequestReloadChildrenOfEntityEvent","UmbRequestReloadStructureForEntityEvent","value","isSelectable","map","selection","isSelected","pathname","path","umbExtensionsRegistry","actions","action","isActive","entityType","UmbContextToken","UmbTreeItemElementBase","UmbLitElement","#onLoadMoreClick","next","#treeItemContext","#hasNodes","#initTreeItem","newVal","label","html","ifDefined","#renderActions","#renderChildItems","#renderPaging","nothing","#renderIcon","icon","isFolder","repeat","item","index","__decorateClass","property","state"],"mappings":";;;;;;;;;;;;;;;AAKO,MAAMA,UAA8CC,EAAqB;AAAA,EAC/E,OAAA;AAAA,SAAgB,OAAO;AAAA,EAAA;AAAA,EAEvB,YAAYC,GAAgC;AACrC,UAAAF,EAAsC,MAAME,CAAI;AAAA,EACvD;AACD;ACWO,MAAeC,WAIbC,EAET;AAAA,EAqDC,YAAYC,GAAyB;AACpC,UAAMA,GAAMC,CAAqB,GAnDlB,KAAA,aAAa,IAAIC,KAId,KAAA,YAAY,IAAIC,EAAyC,MAAS,GAC5E,KAAA,WAAW,KAAK,UAAU,aAAa,GAIhD,KAAAC,KAAc,IAAIC,EAA4B,CAAA,GAAI,CAACC,MAAMA,EAAE,MAAM,GACxD,KAAA,aAAa,KAAKF,GAAY,aAAa,GAErC,KAAAG,KAAA,IAAIC,EAAgB,EAAK,GAC/B,KAAA,cAAc,KAAKD,GAAa,aAAa,GAEzC,KAAAE,KAAA,IAAID,EAAgB,EAAK,GAC7B,KAAA,YAAY,KAAKC,GAAW,aAAa,GAElC,KA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