@ixfx/components 0.14.1 → 0.14.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/index.d.ts +22 -6
- package/bundle/index.js +27 -15
- package/dist/crumbs.d.ts +2 -2
- package/dist/{data-grid-D7RxYISt.d.ts → data-grid-DmkId8bu.d.ts} +3 -3
- package/dist/data-grid.d.ts +2 -2
- package/dist/{detail-list-w32XZEgH.d.ts → detail-list-CmQqeXvp.d.ts} +3 -3
- package/dist/detail-list.d.ts +3 -3
- package/dist/{flat-list-CkRIZCuR.d.ts → flat-list-BmQBB3ZC.d.ts} +3 -3
- package/dist/flat-list.d.ts +1 -1
- package/dist/{grid-list-DUvhSoT2.d.ts → grid-list-BVsUEvgd.d.ts} +3 -3
- package/dist/grid-list.d.ts +2 -2
- package/dist/incr-search.d.ts +1 -1
- package/dist/{index-CO6m-YC0.d.ts → index-BvoXLnBf.d.ts} +2 -2
- package/dist/{index-CSCrK0hR.d.ts → index-DuhzWWTr.d.ts} +10 -4
- package/dist/{index-B-hzcIP0.d.ts → index-DxyyVqzA.d.ts} +1 -1
- package/dist/index.d.ts +13 -11
- package/dist/index.js +12 -5
- package/dist/{list-native-drag-controller-CvXN3NB7.d.ts → list-native-drag-controller-NMspr0E1.d.ts} +1 -1
- package/dist/menu.d.ts +1 -1
- package/dist/miller.d.ts +3 -3
- package/dist/{tree-9Hs7VxuX.js → tree-BFoN2Z_P.js} +41 -10
- package/dist/{tree-component-Tslymyyl.d.ts → tree-component-CDsYTBDi.d.ts} +1 -1
- package/dist/tree.d.ts +3 -3
- package/dist/tree.js +1 -1
- package/dist/{types-DQ7KOUIj.d.ts → types-Jky6oNAp.d.ts} +8 -0
- package/dist/{vertical-list-B1Fq06xr.d.ts → vertical-list-ztrdFvyT.d.ts} +2 -2
- package/dist/vertical-list.d.ts +2 -2
- package/dist/vertical-list.js +4 -1
- package/docs-user/index.json +2 -2
- package/docs-user/tree.md +56 -3
- package/package.json +1 -1
package/bundle/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ declare class IxfxIconElement extends LitElement {
|
|
|
9
9
|
rotate: string;
|
|
10
10
|
connectedCallback(): void;
|
|
11
11
|
disconnectedCallback(): void;
|
|
12
|
-
protected render():
|
|
12
|
+
protected render(): import("lit").TemplateResult<1> | typeof nothing;
|
|
13
13
|
protected updated(changed: Map<string, unknown>): void;
|
|
14
14
|
static styles: import("lit").CSSResult[];
|
|
15
15
|
}
|
|
@@ -596,7 +596,7 @@ declare class ButtonElement extends LitElement {
|
|
|
596
596
|
* attribute).
|
|
597
597
|
*/
|
|
598
598
|
value: boolean;
|
|
599
|
-
protected _renderIcon():
|
|
599
|
+
protected _renderIcon(): import("lit").TemplateResult<1> | typeof nothing;
|
|
600
600
|
protected render(): import("lit").TemplateResult<1>;
|
|
601
601
|
static styles: import("lit").CSSResult[];
|
|
602
602
|
}
|
|
@@ -2101,7 +2101,7 @@ declare abstract class LabelledInputBase extends LitElement {
|
|
|
2101
2101
|
value: number;
|
|
2102
2102
|
}>) => void;
|
|
2103
2103
|
protected _syncValue(v: number): void;
|
|
2104
|
-
protected _renderEditableNumber():
|
|
2104
|
+
protected _renderEditableNumber(): import("lit").TemplateResult<1> | typeof nothing;
|
|
2105
2105
|
updated(changedProperties: Map<string, unknown>): void;
|
|
2106
2106
|
}
|
|
2107
2107
|
//#endregion
|
|
@@ -2441,6 +2441,14 @@ type TreeItem = {
|
|
|
2441
2441
|
* (`beginEdit`) uses it; other components ignore it.
|
|
2442
2442
|
*/
|
|
2443
2443
|
editable?: boolean;
|
|
2444
|
+
/**
|
|
2445
|
+
* Set to `false` to make this node unselectable, regardless of
|
|
2446
|
+
* `selectionFilter`. In `ixfx-tree-list`'s `checked` mode no checkbox is
|
|
2447
|
+
* drawn for it (see `alignCheckboxes`). Unselectable branches can still be
|
|
2448
|
+
* expanded, and their selectable descendants can still be selected.
|
|
2449
|
+
* Default: selectable.
|
|
2450
|
+
*/
|
|
2451
|
+
selectable?: boolean;
|
|
2444
2452
|
/** Tooltip text shown on hover. */
|
|
2445
2453
|
tooltip?: string;
|
|
2446
2454
|
/** Optional string value, e.g. for use as a command/route. */
|
|
@@ -5784,7 +5792,7 @@ declare class SplitLayoutElement extends LitElement {
|
|
|
5784
5792
|
private _onPointerUp;
|
|
5785
5793
|
private _emitResize;
|
|
5786
5794
|
private _emitChange;
|
|
5787
|
-
protected render():
|
|
5795
|
+
protected render(): import("lit").TemplateResult<1> | typeof nothing;
|
|
5788
5796
|
private _getTrackSizes;
|
|
5789
5797
|
private _resolveTracks;
|
|
5790
5798
|
private _renderGutter;
|
|
@@ -7990,7 +7998,7 @@ declare class GroupedItemListerElement<T = unknown> extends LitElement {
|
|
|
7990
7998
|
connectedCallback(): void;
|
|
7991
7999
|
disconnectedCallback(): void;
|
|
7992
8000
|
protected updated(changed: PropertyValues): void;
|
|
7993
|
-
protected render():
|
|
8001
|
+
protected render(): import("lit").TemplateResult<1> | typeof nothing;
|
|
7994
8002
|
}
|
|
7995
8003
|
declare global {
|
|
7996
8004
|
interface HTMLElementTagNameMap {
|
|
@@ -8219,6 +8227,12 @@ declare class TreeListElement extends TreeBaseElement {
|
|
|
8219
8227
|
* </svg>`;
|
|
8220
8228
|
*/
|
|
8221
8229
|
checkboxRenderer: ((state: TreeCheckboxState) => unknown) | undefined;
|
|
8230
|
+
/**
|
|
8231
|
+
* In `checked` mode, whether unselectable rows (`item.selectable === false`)
|
|
8232
|
+
* keep the space their checkbox would occupy, so their carets and labels line
|
|
8233
|
+
* up with selectable siblings. When off (default) they reserve no space.
|
|
8234
|
+
*/
|
|
8235
|
+
alignCheckboxes: boolean;
|
|
8222
8236
|
willUpdate(changedProps: PropertyValues): void;
|
|
8223
8237
|
protected renderNodeContent(node: TreeNode, depth: number): TemplateResult;
|
|
8224
8238
|
protected _renderNode(node: TreeNode, depth: number): TemplateResult;
|
|
@@ -9435,7 +9449,7 @@ declare class LabelledRadialInput extends LabelledInputBase {
|
|
|
9435
9449
|
private _isWide;
|
|
9436
9450
|
private _getEffectivePrecision;
|
|
9437
9451
|
protected _handleResize(entries: ResizeObserverEntry[]): void;
|
|
9438
|
-
protected _renderEditableNumber():
|
|
9452
|
+
protected _renderEditableNumber(): import("lit").TemplateResult<1> | typeof nothing;
|
|
9439
9453
|
render(): import("lit").TemplateResult<1>;
|
|
9440
9454
|
private _getTooltipValue;
|
|
9441
9455
|
static styles: CSSResultGroup;
|
|
@@ -10131,6 +10145,7 @@ type MulticolCategoryDefaults = {
|
|
|
10131
10145
|
groupBy?: (item: MulticolItem) => string;
|
|
10132
10146
|
allLabel?: string;
|
|
10133
10147
|
sort?: SortDirection;
|
|
10148
|
+
menu?: boolean;
|
|
10134
10149
|
};
|
|
10135
10150
|
type MulticolCategory = {
|
|
10136
10151
|
readonly key: string;
|
|
@@ -10145,6 +10160,7 @@ type MulticolColumnState = {
|
|
|
10145
10160
|
readonly categoryKey: string;
|
|
10146
10161
|
readonly sort: SortDirection;
|
|
10147
10162
|
readonly grouped: boolean;
|
|
10163
|
+
readonly menu: boolean;
|
|
10148
10164
|
readonly width?: number;
|
|
10149
10165
|
};
|
|
10150
10166
|
type MulticolColumnsChangeReason = `add` | `remove` | `reorder` | `category` | `sort` | `grouping` | `resize`;
|
package/bundle/index.js
CHANGED
|
@@ -6804,6 +6804,8 @@ const je={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t
|
|
|
6804
6804
|
box-sizing: border-box;
|
|
6805
6805
|
outline: none;
|
|
6806
6806
|
--ixfx-list-item-padding: var(--ixfx-list-item-padding, var(--list-item-padding, 4px var(--space-m, 8px)));
|
|
6807
|
+
--_item-padding:
|
|
6808
|
+
var(--ixfx-list-item-padding, var(--list-item-padding, 0 var(--space-xs, 3px)));
|
|
6807
6809
|
}
|
|
6808
6810
|
|
|
6809
6811
|
:host(:focus-visible) {
|
|
@@ -6840,7 +6842,7 @@ const je={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t
|
|
|
6840
6842
|
::slotted(li) {
|
|
6841
6843
|
display: flex;
|
|
6842
6844
|
align-items: center;
|
|
6843
|
-
padding: var(--
|
|
6845
|
+
padding: var(--_item-padding);
|
|
6844
6846
|
/* Inset each row from the scroll container's edges (margin, not padding:
|
|
6845
6847
|
padding is inside the border box, so the tickle/selection outlines
|
|
6846
6848
|
would still sit flush against the edge and be clipped). */
|
|
@@ -6962,6 +6964,7 @@ const je={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t
|
|
|
6962
6964
|
background: transparent;
|
|
6963
6965
|
color: inherit;
|
|
6964
6966
|
outline: 1px solid transparent;
|
|
6967
|
+
padding: var(--space-s);
|
|
6965
6968
|
}
|
|
6966
6969
|
|
|
6967
6970
|
:host([interaction-mode="checked"]) ::slotted([data-selected][data-tickled]) {
|
|
@@ -7735,7 +7738,7 @@ const je={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t
|
|
|
7735
7738
|
height: 100%;
|
|
7736
7739
|
transform: none;
|
|
7737
7740
|
}
|
|
7738
|
-
`]}};E([d({type:Boolean,reflect:!0})],ob.prototype,`collapsed`,void 0),E([d({type:String,attribute:`orientation`,reflect:!0})],ob.prototype,`orientation`,void 0),E([d({type:Boolean})],ob.prototype,`closable`,void 0),E([d({type:Boolean,reflect:!0})],ob.prototype,`collapsible`,void 0),E([d({type:String})],ob.prototype,`title`,void 0),E([d({type:String,attribute:`icon-name`})],ob.prototype,`iconName`,void 0),E([d({type:String,attribute:`toggle-interaction`})],ob.prototype,`toggleInteraction`,void 0),E([d({type:String,attribute:`variant`,reflect:!0})],ob.prototype,`variant`,void 0),E([d({type:Boolean,attribute:`hide-titlebar`})],ob.prototype,`hideTitlebar`,void 0),E([d({type:Boolean,attribute:`keep-toolbar`})],ob.prototype,`keepToolbar`,void 0),ob=E([T(`ixfx-panel`)],ob);const sb=`__ungrouped__`;let cb=class extends n{constructor(...e){super(...e),this.grouped=!1,this.crossGroupSelection=!1,this.#n=new Map,this.#i=!1,this.#a=new Ae(this),this.#d=e=>{if(this.#i)return;let n=e.target,r;for(let[e,i]of this.#n)if(i===n){r=e;break}if(r!==void 0){if(this.grouped&&!this.crossGroupSelection){this.#i=!0;for(let[e,n]of this.#n)e!==r&&n.clearSelection();this.#i=!1}this.dispatchEvent(new CustomEvent(`grouped-select`,{detail:{selected:this.selectedItems,groupKey:r===sb?void 0:r},bubbles:!0,composed:!0}))}}}#e;#t;#n;#r;#i;#a;get groupBy(){return this.#e}set groupBy(e){this.#e=e,this.requestUpdate()}get factory(){return this.#t}set factory(e){e!==this.#t&&(this.#s(),this.#t=e,this.requestUpdate())}get provider(){return this.#a.provider}set provider(e){this.#a.provider=e,e&&this.#a.request(void 0)}get selectedItems(){let e=new Set;for(let n of this.#n.values())for(let r of n.selectedItems)e.add(r);return e}dispatch(e,n){for(let r of this.#n.values())r.dispatch(e,n)}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.addEventListener(`select`,this.#d)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(`select`,this.#d)}updated(e){super.updated(e),e.has(`grouped`)&&this.#s(),this.#c()}render(){return this.#t?this.grouped?this.#e?(this.#r=this.#o(),i`${_(this.#r.keys(),e=>e,e=>i`<ixfx-panel data-group-key=${e} .title=${e}></ixfx-panel>`)}`):a:i`<div class="ungrouped-host"></div>`:a}#o(){let e=new Map;if(!this.#e)return e;for(let n of this.#a.items){let r=this.#e(n),i=e.get(r);i||(i=[],e.set(r,i)),i.push(n)}return e}#s(){for(let e of this.#n.values())e.remove();this.#n.clear()}#c(){if(this.#t){if(!this.grouped){this.#l();return}this.#e&&this.#u()}}#l(){let e=this.querySelector(`.ungrouped-host`);if(!e)return;let n=this.#n.get(sb);n||(n=this.#t(void 0),e.appendChild(n),this.#n.set(sb,n)),n.setItems(this.#a.items)}#u(){let e=this.#r??this.#o();for(let n of[...this.#n.keys()])e.has(n)||(this.#n.get(n)?.remove(),this.#n.delete(n));for(let[n,r]of e){let e=[...this.children].find(e=>e instanceof HTMLElement&&e.dataset.groupKey===n);if(!e)continue;let i=this.#n.get(n);i||(i=this.#t(n),e.appendChild(i),this.#n.set(n,i)),i.setItems(r)}}#d};E([d({type:Boolean,reflect:!0})],cb.prototype,`grouped`,void 0),E([d({type:Boolean,attribute:`cross-group-selection`,reflect:!0})],cb.prototype,`crossGroupSelection`,void 0),cb=E([T(`ixfx-grouped-item-lister`)],cb);const lb=`application/x-ixfx-tree`,ub=new Map,db=new Map;let fb,pb=0;function mb(){return`tree-drag-${++pb}-${Date.now()}`}function hb(e,n,r,i){ub.set(e,{sourceId:e,nodes:r,keys:i}),db.set(e,new WeakRef(n)),fb=e}function gb(e){ub.delete(e),db.delete(e),fb===e&&(fb=void 0)}function _b(){if(fb===void 0)return;let e=ub.get(fb);if(e)return{sourceId:fb,keys:e.keys,nodes:e.nodes,element:db.get(fb)?.deref()}}function vb(e,n,r){return Math.max(n,Math.min(r,e))}var yb=class{#e;#t;#n=!1;#r;#i=`internal`;#a=[];#o=[];#s;#c;#l=0;#u=0;#d=0;#f;constructor(e,n){this.#e=e,this.#t=n,e.addController(this)}get isDragging(){return this.#n}get isRejected(){return this.#n&&this.#r===void 0}get dropState(){return this.#r}hostConnected(){this.#p()}hostUpdated(){this.#p()}#p(){let e=this.#t.getScrollContainer();!e||e===this.#f||(this.#m(),this.#f=e,e.addEventListener(`dragenter`,this.#h),e.addEventListener(`dragover`,this.#g),e.addEventListener(`dragleave`,this.#v),e.addEventListener(`drop`,this.#y))}#m(){let e=this.#f;e&&(e.removeEventListener(`dragenter`,this.#h),e.removeEventListener(`dragover`,this.#g),e.removeEventListener(`dragleave`,this.#v),e.removeEventListener(`drop`,this.#y),this.#f=void 0)}hostDisconnected(){this.#m(),this.#w(),this.#D(),this.#n=!1,this.#r=void 0}#h=e=>{this.#t.getDndMode()===`none`||!e.dataTransfer||this.#t.resolveDrag(e.dataTransfer,`hover`)!==void 0&&(e.preventDefault(),this.#n||(this.#n=!0,this.#t.onActiveChange(!0)))};#g=e=>{if(this.#t.getDndMode()===`none`||!e.dataTransfer)return;this.#u=e.clientX,this.#d=e.clientY;let n=this.#t.resolveDrag(e.dataTransfer,`hover`);if(!n){this.#_(e);return}this.#n||(this.#n=!0,this.#t.onActiveChange(!0)),this.#i=n.source,this.#a=n.keys,this.#o=n.nodes;let r=this.#t.getVisibleRows();this.#C(this.#x(r,e.clientY)),this.#T();let i=this.#S(e,r,n.source);if(!i){this.#_(e,!1);return}let a={source:n.source,dragged:n.nodes.length>0?n.nodes:void 0,draggedKeys:n.keys,target:i,dataTransfer:e.dataTransfer};if(!this.#t.vet(a)){this.#_(e,!1);return}e.preventDefault(),e.dataTransfer.dropEffect=n.source===`internal`?`move`:`copy`,this.#O(i)};#_(e,n=!0){e.dataTransfer&&(e.dataTransfer.dropEffect=`none`),this.#O(void 0),n&&this.#w()}#v=e=>{let n=this.#t.getScrollContainer(),r=e.relatedTarget;n&&r&&n.contains(r)||this.#b()};#y=e=>{if(!e.dataTransfer){this.#b();return}e.preventDefault(),this.#D(),this.#w();let n=e=>{this.#r=void 0,this.#n=!1,this.#t.onDropStateChange(void 0),this.#t.onActiveChange(!1),this.#t.onDragEnd(e)};if(this.#t.getDndMode()===`none`){n(!1);return}let r=this.#t.resolveDrag(e.dataTransfer,`drop`);if(!r){n(!1);return}this.#a=r.keys,this.#o=r.nodes;let i=this.#S(e,this.#t.getVisibleRows(),r.source);if(!i){n(!1);return}let a={source:r.source,dragged:r.nodes.length>0?r.nodes:void 0,draggedKeys:r.keys,target:i,dataTransfer:e.dataTransfer};if(!this.#t.vet(a)){n(!1);return}let o={...a,external:r.source===`external`?r.nodes:void 0};n(this.#t.commitDrop(o))};#b(){this.#w(),this.#D(),this.#r!==void 0&&(this.#r=void 0,this.#t.onDropStateChange(void 0)),this.#n&&(this.#n=!1,this.#t.onActiveChange(!1))}#x(e,n){if(e.length!==0)return n<e[0].rect.top?e[0]:n>e[e.length-1].rect.bottom?e[e.length-1]:e.find(e=>n>=e.rect.top&&n<=e.rect.bottom)??e[e.length-1]}#S(e,n,r){if(n.length===0)return;let i=this.#x(n,e.clientY);if(!i)return;let a=vb((e.clientY-i.rect.top)/i.rect.height,0,1),o=a<.25?`before`:a>.75?`after`:`inside`,s=i.node.item.isLeaf===!0;o===`inside`&&s&&(o=`after`);let c=!1;o===`after`&&!s&&this.#t.isExpanded(i.key)&&(o=`inside`,c=!0);let l,u,d,f;if(o===`inside`)l=i.key,u=i.key,d=i.depth+1,f=c?0:i.node.children?.length??0;else{let r=this.#t.getIndentPx()||1,a=n[0].rect.left,s=vb(Math.round((e.clientX-a)/r),0,i.depth),c={node:i.node,depth:i.depth,parentKey:this.#t.getRowInfo(i.key)?.parentKey};u=i.key;for(let e=i.depth-s;e>0&&c.parentKey!==void 0;e--){let e=this.#t.getRowInfo(c.parentKey);if(!e)break;u=c.parentKey,c=e}d=c.depth,l=c.parentKey;let p=this.#t.getChildren(l).findIndex(e=>e.item.key===u);f=(p<0?0:p)+ +(o===`after`)}if(r===`internal`){for(let e of this.#a)if(e===l||e===u||l!==void 0&&this.#t.isSelfOrDescendant(e,l)||o!==`inside`&&this.#t.isSelfOrDescendant(e,u))return;if(this.#a.length>0&&!this.#t.isReorderAllowed()&&!this.#a.some(e=>this.#t.getParentKey(e)!==l))return}return{parentKey:l,index:f,referenceKey:u,position:o,depth:d}}#C(e){if(!e||e.node.item.isLeaf===!0||this.#t.isExpanded(e.key)){this.#w();return}if(e.key===this.#c)return;this.#w();let n=this.#c=e.key;this.#s=setTimeout(()=>{this.#s=void 0,this.#c===n&&(this.#c=void 0,this.#t.expandKey(n))},Math.max(0,this.#t.getExpandHoverMs()))}#w(){this.#s!==void 0&&(clearTimeout(this.#s),this.#s=void 0),this.#c=void 0}#T(){this.#l===0&&(this.#l=requestAnimationFrame(this.#E))}#E=()=>{if(this.#l=0,!this.#n)return;let e=this.#t.getScrollContainer();if(!e)return;let n=e.getBoundingClientRect(),r=this.#d-n.top,i=0;r<24?i=-Math.ceil(16*(1-Math.max(0,r)/24)):r>n.height-24&&(i=Math.ceil(16*(1-Math.max(0,n.height-r)/24))),i!==0&&this.#u>=n.left&&this.#u<=n.right&&(e.scrollTop+=i,this.#T())};#D(){this.#l!==0&&(cancelAnimationFrame(this.#l),this.#l=0)}#O(e){let n=e===void 0?this.#r===void 0:e.referenceKey===this.#r?.referenceKey&&e.position===this.#r?.position&&e.depth===this.#r?.depth&&e.index===this.#r?.index;this.#r=e,(!n||this.#n)&&this.#t.onDropStateChange(e)}};function bb(e,n){let r=[],i=new Map,a=[],o=(e,r,i)=>{if(!e||e.length===0)return;let o=e.filter(e=>n.isShown(e,r));for(let e=o.length-1;e>=0;e--)a.push({node:o[e],depth:r,parentKey:i,posInSet:e+1,setSize:o.length})};for(o(e.children,0,void 0);a.length>0;){let{node:e,depth:s,parentKey:c,posInSet:l,setSize:u}=a.pop();i.set(e.item.key,r.length),r.push({node:e,depth:s,parentKey:c,posInSet:l,setSize:u}),e.children&&e.children.length>0&&n.isExpanded(e,s)&&o(e.children,s+1,e.item.key)}return{rows:r,indexByKey:i}}function xb(e){let n=new Map,r=new Set,i=[];if(e.children)for(let r of e.children)n.set(r.item.key,e.item.key),i.push({node:r,depth:0,parentKey:e.item.key});for(;i.length>0;){let{node:e,depth:a,parentKey:o}=i.pop();if(n.set(e.item.key,o),e.item.icon&&r.add(a),e.children)for(let n=e.children.length-1;n>=0;n--){let r=e.children[n];i.push({node:r,depth:a+1,parentKey:e.item.key})}}return{parentByKey:n,depthsWithIcons:r}}function Sb(e,n){let r=new Set;if(!e.children)return r;let i=[],a=(e,r)=>{i.push({node:e,depth:r,next:0,matched:n(e,r)})};for(let n of e.children)for(a(n,0);i.length>0;){let e=i[i.length-1],n=e.node.children;if(n&&e.next<n.length){a(n[e.next++],e.depth+1);continue}i.pop(),e.matched&&(r.add(e.node.item.key),i.length>0&&(i[i.length-1].matched=!0))}return r}function Cb(e,n,r){if(r.size===0)return[...e];let i=new Set;for(let n of e)i.add(n.node.item.key);let a=Symbol(`end`),o=new Map,s=a;for(let e=n.length-1;e>=0;e--){let a=n[e];if(i.has(a)){s=a;continue}let c=r.get(a);if(!c)continue;let l=o.get(s);l?l.push(c):o.set(s,[c])}let c=[];for(let n of e){let e=o.get(n.node.item.key);if(e)for(let n=e.length-1;n>=0;n--)c.push(e[n]);c.push(n)}let l=o.get(a);if(l)for(let e=l.length-1;e>=0;e--)c.push(l[e]);return c}function wb(e,n){let r=new Map;if(!e.children)return r;let i=[];for(let a of e.children)for(i.push({node:a,next:0,checked:0,unchecked:0});i.length>0;){let e=i[i.length-1],{node:a}=e,o=a.children,s=a.item.isLeaf||!o?.length;if(!s&&e.next<o.length){i.push({node:o[e.next++],next:0,checked:0,unchecked:0});continue}i.pop();let c;if(c=s?n.has(a)?`checked`:`unchecked`:e.checked===o.length?`checked`:e.unchecked===o.length?`unchecked`:`indeterminate`,r.set(a.item.key,c),i.length>0){let e=i[i.length-1];c===`checked`?e.checked++:c===`unchecked`&&e.unchecked++}}return r}function Tb(e,n){if(e.has(n))return e;let r=new Set(e);return r.add(n),r}function Eb(e,n){if(!e.has(n))return e;let r=new Set(e);return r.delete(n),r}function Db(e,n){let r;for(let i of e)n(i)&&(r??=new Set(e),r.delete(i));return r??e}function Ob(e){return Math.max(1,e.rowHeight+e.gap)}function kb(e,n){return e.listOffset+n*Ob(e)+e.gap}function Ab(e,n){return kb(e,n)+e.rowHeight}function jb(e,n,r=5){let{count:i}=e;if(i<=0)return{start:0,end:0};let a=Ob(e),o=Math.max(0,n-e.listOffset),s=Math.floor(o/a),c=Math.ceil((o+e.viewportHeight)/a),l=Math.min(i,Math.max(0,s-r));return{start:l,end:Math.min(i,Math.max(l,c+r))}}function Mb(e,n,r,i=0){if(n<0||n>=e.count)return r;let a=kb(e,n),o=a+e.rowHeight;return a<r+i?n===0?0:Math.max(0,a-i):o>r+e.viewportHeight?Math.max(0,o-e.viewportHeight):r}function Nb(e,n,r,i=0){if(n<0||n>=e.count)return r;let a=kb(e,n),o=a+e.rowHeight;if(a>=r+i&&o<=r+e.viewportHeight)return r;let s=a+e.rowHeight/2-(e.viewportHeight+i)/2;return Math.max(0,s)}function Pb(e){return Math.max(1,Math.floor(e.viewportHeight/Ob(e))-1)}function Fb(e){return{count:e.count,topOf:n=>kb(e,n),bottomOf:n=>Ab(e,n)}}function Ib(e,n){let r=0,i=e.count;for(;r<i;){let a=r+i>>>1;e.bottomOf(a)>n?i=a:r=a+1}return r}function Lb(e,n,r,i=0){if(e.count===0)return;let a=Math.min(Ib(e,n),e.count-1),o=a,s=e.count;for(;o<s;){let n=o+s>>>1;e.topOf(n)>=r?s=n:o=n+1}let c=Math.max(a,o-1);return{first:Math.max(0,a-i),last:Math.min(e.count-1,c+i)}}const Rb={rows:[],indexByKey:new Map};let q=class extends n{constructor(...e){super(...e),this.exclusivity=`none`,this.selectionFilter=`all`,this.interactionMode=`standard`,this._selectedNodes=new Set,this.disableKeyboardNavigation=!1,this.registry=void 0,this.itemDnd=`none`,this.dndExpandHoverMs=500,this.reorderable=!0,this.stickyHeaders=!0,this.virtualize=`auto`,this.virtualizeThreshold=200,this.applyInternalDrop=!0,this._expandedKeys=new Set,this.#i=0,this._selectionVersion=0,this._scrollTop=0,this.#l={rowHeight:30,gap:1,listOffset:0},this.#u=0,this.#d=0,this.#m=0,this.#h=0,this.#g=!1,this.#S=()=>{this.#d===0&&(this.#d=requestAnimationFrame(()=>{this.#d=0,this.#C()}))},this.tickled=new ie(this,{getItems:()=>this.#s().rows.map(({node:e})=>({id:e.item.key,enabled:!0})),hoverDisabled:()=>this.#J?.isDragging===!0||this.#Y?.isDragging===!0,onStateChange:()=>{this.setAttribute(`data-input-mode`,this.tickled.inputMode)}}),this._focusedDepth=0,this.search=new Bt(this,{adapter:Ut(this,{labelSelector:`.tree-label`,highlightKey:`incr-search-highlight`})}),this.#I={indent:20},this.#L=[],this.#R=[],this.#z=new Map,this.#B=new Map,this.#V=new Set,this.#H=new Map,this.#U=new Map,this.#W=!1,this.#G=``,this.#X=new Set,this.#Z=!1,this.#$=()=>{this.#Q=void 0},this.#te=()=>{this.#de===0&&(this.#de=requestAnimationFrame(()=>{this.#de=0,this.#re()}))},this._stickyKeys=[],this.#le=new Map,this.#ue=!0,this.#de=0,this.#pe=!1,this.#Ie=`user`,this.#Le=!1,this.#$e=0,this.#dt=e=>{if(this.search.isOpen)return;let n=this.#s().rows;if(n.length===0)return;if((e.ctrlKey||e.metaKey)&&e.key===`a`){e.preventDefault(),this.selectAll();return}[`ArrowDown`,`ArrowUp`,`ArrowLeft`,`ArrowRight`,`Home`,`End`,`PageUp`,`PageDown`,`Enter`,` `].includes(e.key)&&this.tickled.setInputMode(`keyboard`);let r=this.#ot();switch(e.key){case`ArrowDown`:e.preventDefault(),this.#ut(n,r,Math.min(r+1,n.length-1),e.shiftKey);break;case`ArrowUp`:e.preventDefault(),this.#ut(n,r,Math.max(r-1,0),e.shiftKey);break;case`Home`:e.preventDefault(),this.#ut(n,r,0,e.shiftKey);break;case`End`:e.preventDefault(),this.#ut(n,r,n.length-1,e.shiftKey);break;case`PageDown`:{e.preventDefault();let i=this.#lt();this.#ut(n,r,Math.min(r+i,n.length-1),e.shiftKey);break}case`PageUp`:{e.preventDefault();let i=this.#lt();this.#ut(n,r,Math.max(r-i,0),e.shiftKey);break}case`ArrowRight`:{e.preventDefault();let i=n[r];i&&i.node.item.isLeaf!==!0&&(this._expandedKeys.has(i.node.item.key)?r+1<n.length&&this.#st(r+1):this.#Ke(i.node,i.depth)),this.requestUpdate();break}case`ArrowLeft`:{e.preventDefault();let i=n[r];if(i&&this._expandedKeys.has(i.node.item.key))this.#e(Eb(this._expandedKeys,i.node.item.key)),this.dispatchEvent(new CustomEvent(`collapse`,{detail:{node:i.node,depth:i.depth},bubbles:!0,composed:!0}));else if(i.depth>0){let e=i.depth-1;for(let i=r-1;i>=0;i--)if(n[i].depth===e){this.#st(i);break}}this.requestUpdate();break}case`Enter`:{e.preventDefault();let i=n[r];i&&(this.interactionMode!==`manual`&&this.interactionMode!==`checked`&&this.select(i.node),this.dispatchEvent(new CustomEvent(`activate`,{detail:{node:i.node,depth:i.depth},bubbles:!0,composed:!0})),this.requestUpdate());break}case` `:{e.preventDefault();let i=n[r];if(!i)break;this.interactionMode===`checked`?this._handleCheckboxClick(new MouseEvent(`click`),i.node,i.depth):(this.interactionMode===`standard`||this.interactionMode===`vscode`||this.interactionMode===`manual`)&&this.#Ge(i.node,i.depth);break}case`Escape`:e.preventDefault(),this.#tt()}},this.#ft=e=>{let n=e.target.closest(`ul.tree-list li`);if(!n)return;let r=n.dataset.key;if(!r)return;let i=this.#s(),a=i.indexByKey.get(r),o=a===void 0?void 0:i.rows[a];if(!o)return;let s={node:o.node,depth:o.depth};this.dispatchEvent(new CustomEvent(`item-dblclick`,{detail:s,bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`activate`,{detail:s,bubbles:!0,composed:!0}))}}get selectedNodes(){return this._selectedNodes}#e(e){e!==this._expandedKeys&&(this._expandedKeys=e,this.#t=void 0,this.#ue=!0)}#t;#n;#r;#i;#a;#o;invalidateStructure(){this.#i++,this.#t=void 0,this.requestUpdate()}#s(){if(!this.root)return Rb;if(this.#t&&this.#n===this.root&&this.#r===this.filterPredicate)return this.#t;let e=this.#D();return this.#t=bb(this.root,{isExpanded:(e,n)=>this._isExpanded(e,n),isShown:e?n=>e.matches.has(n.item.key):()=>!0}),this.#n=this.root,this.#r=this.filterPredicate,this.#t}#c(){let e=this.root;if(!e)return{parentByKey:new Map,depthsWithIcons:new Set};let n=this.#a;if(n&&n.root===e&&n.version===this.#i)return n.index;let r=xb(e);return this.#a={root:e,version:this.#i,index:r},r}#l;#u;#d;#f;#p;#m;#h;#g;#_(){return this.virtualize===`off`?!1:this.virtualize===`on`||this.#s().rows.length>this.virtualizeThreshold}#v(e){return{count:e,rowHeight:this.#l.rowHeight,gap:this.#l.gap,listOffset:this.#l.listOffset,viewportHeight:this.#u>0?this.#u:600}}#y(){let e=this.renderRoot.querySelector(`ul.tree-list`),n=e?.querySelector(`li.item:not(.leaving)`),r=n?.getBoundingClientRect().height??0,i=r>0?r:this.#Se(),a=n?Number.parseFloat(getComputedStyle(n).marginTop):NaN,o=Number.isNaN(a)?Number.parseFloat(getComputedStyle(this).getPropertyValue(`--tree-item-gap`)):a,s=Number.isNaN(o)?1:o,c=this.#l.listOffset;if(e){let n=Number.parseFloat(getComputedStyle(e).paddingTop);c=e.offsetTop+(Number.isNaN(n)?0:n)}let l=this.#be()?.clientHeight??0,u=l>0&&l!==this.#u;l>0&&(this.#u=l);let d=this.#l,f=d.rowHeight!==i||d.gap!==s||d.listOffset!==c;return this.#l={rowHeight:i,gap:s,listOffset:c},f||u}#b(e){return jb(this.#v(e),this._scrollTop)}#x(){let e=this.#be()?.scrollTop;e!==void 0&&e!==this._scrollTop&&(this._scrollTop=e)}#S;#C(){let e=this.#be();if(!e||!this.root||!this.#_())return;let n=e.scrollTop;if(n===this._scrollTop)return;let r=jb(this.#v(this.#s().rows.length),n);(r.start!==this.#m||r.end!==this.#h)&&(this._scrollTop=n)}#w(){let e=this.#be();e!==this.#f&&(this.#f?.removeEventListener(`scroll`,this.#S),this.#p?.disconnect(),this.#p=void 0,this.#f=e,e&&(e.addEventListener(`scroll`,this.#S,{passive:!0}),typeof ResizeObserver<`u`&&(this.#p=new ResizeObserver(e=>{let n=e.at(-1)?.contentRect.height??0;n>0&&n!==this.#u&&this.#_()&&this.requestUpdate()}),this.#p.observe(e))))}#T(){this.#f?.removeEventListener(`scroll`,this.#S),this.#f=void 0,this.#p?.disconnect(),this.#p=void 0,this.#d!==0&&(cancelAnimationFrame(this.#d),this.#d=0)}#E(e,n=`edge`){let r=this.#be();if(!r)return;let i=this.#v(this.#s().rows.length),a=this.renderRoot.querySelector(`.sticky-headers`)?.getBoundingClientRect().height??0,o=(n===`center-if-hidden`?Nb:Mb)(i,e,r.scrollTop,a);(o!==r.scrollTop||o!==this._scrollTop)&&(r.scrollTop=o,this._scrollTop=o)}#D(){let e=this.filterPredicate,n=this.root;if(!e||!n)return;let r=this.#o;if(r&&r.predicate===e&&r.root===n&&r.version===this.#i)return r;let i=Sb(n,e),{parentByKey:a}=this.#c(),o=new Set;for(let e of i){let n=a.get(e);n!==void 0&&o.add(n)}let s={predicate:e,root:n,version:this.#i,matches:i,autoExpanded:o};return this.#o=s,s}get _structureVersion(){return this.#i}get _depthsWithIcons(){return this.#c().depthsWithIcons}#O;#k(){let e=this.searchModes?.trim();if(e===void 0)return[...Rt];let n=new Set(e.split(/\s+/));return Rt.filter(e=>n.has(e))}#A(){this.#F&&(this.search.setModes(this.#k()),this.#O?.(),this.#O=Lt(this.#F,this.search))}#j;#M;#N;#P;#F;#I;#L;#R;#z;#B;#V;#H;#U;#W;#G;#K;#q;#J;#Y;#X;#Z;#Q;#$;#ee(){let e=this.#be();this.stickyHeaders&&e?(!this.#pe||this.#fe!==e)&&(this.#fe?.removeEventListener(`scroll`,this.#te),e.addEventListener(`scroll`,this.#te,{passive:!0}),this.#fe=e,this.#pe=!0):this.#pe&&=(this.#fe?.removeEventListener(`scroll`,this.#te),this.#fe=void 0,!1)}#te;#ne(e){return{count:e.length,topOf:n=>e[n].offsetTop,bottomOf:n=>e[n].offsetTop+e[n].offsetHeight}}#re(){this.#ue=!1;let e=new Map,n=()=>this.#ie([],e);if(!this.stickyHeaders||!this.root)return n();let r=this.#be(),i=this.renderRoot.querySelector(`ul.tree-list`);if(!r||!i)return n();let a=this.#s(),o=this.#_(),s=i.children,c=this.#R;if(a.rows.length===0||!o&&(s.length===0||s.length!==c.length))return n();let l=o?Fb(this.#v(a.rows.length)):this.#ne(s),u=r.scrollTop,d=u+(this.renderRoot.querySelector(`.sticky-headers`)?.getBoundingClientRect().height??0),f=Ib(l,u);if(!o)for(;f<s.length&&s[f].classList.contains(`leaving`);)f++;if(f>=l.count)return n();let p=o?f:a.indexByKey.get(c[f]);if(p===void 0)return n();let m=[],h=a.rows[p].parentKey;for(;h!==void 0;){let e=a.indexByKey.get(h);if(e===void 0)break;m.unshift(a.rows[e]),h=a.rows[e].parentKey}let g=new Map,_=[];for(let e of m){let n=e.node.item.key,r=o?a.indexByKey.get(n):this.#z.get(n);r===void 0||l.bottomOf(r)>d||(_.push(n),g.set(n,{node:e.node,depth:e.depth}))}this.#ie(_,g)}#ie(e,n){let r=this._stickyKeys;r.length===e.length&&r.every((n,r)=>n===e[r])||(this.#le=n,this._stickyKeys=e)}#ae(){return!this.stickyHeaders||this._stickyKeys.length===0?a:i`
|
|
7741
|
+
`]}};E([d({type:Boolean,reflect:!0})],ob.prototype,`collapsed`,void 0),E([d({type:String,attribute:`orientation`,reflect:!0})],ob.prototype,`orientation`,void 0),E([d({type:Boolean})],ob.prototype,`closable`,void 0),E([d({type:Boolean,reflect:!0})],ob.prototype,`collapsible`,void 0),E([d({type:String})],ob.prototype,`title`,void 0),E([d({type:String,attribute:`icon-name`})],ob.prototype,`iconName`,void 0),E([d({type:String,attribute:`toggle-interaction`})],ob.prototype,`toggleInteraction`,void 0),E([d({type:String,attribute:`variant`,reflect:!0})],ob.prototype,`variant`,void 0),E([d({type:Boolean,attribute:`hide-titlebar`})],ob.prototype,`hideTitlebar`,void 0),E([d({type:Boolean,attribute:`keep-toolbar`})],ob.prototype,`keepToolbar`,void 0),ob=E([T(`ixfx-panel`)],ob);const sb=`__ungrouped__`;let cb=class extends n{constructor(...e){super(...e),this.grouped=!1,this.crossGroupSelection=!1,this.#n=new Map,this.#i=!1,this.#a=new Ae(this),this.#d=e=>{if(this.#i)return;let n=e.target,r;for(let[e,i]of this.#n)if(i===n){r=e;break}if(r!==void 0){if(this.grouped&&!this.crossGroupSelection){this.#i=!0;for(let[e,n]of this.#n)e!==r&&n.clearSelection();this.#i=!1}this.dispatchEvent(new CustomEvent(`grouped-select`,{detail:{selected:this.selectedItems,groupKey:r===sb?void 0:r},bubbles:!0,composed:!0}))}}}#e;#t;#n;#r;#i;#a;get groupBy(){return this.#e}set groupBy(e){this.#e=e,this.requestUpdate()}get factory(){return this.#t}set factory(e){e!==this.#t&&(this.#s(),this.#t=e,this.requestUpdate())}get provider(){return this.#a.provider}set provider(e){this.#a.provider=e,e&&this.#a.request(void 0)}get selectedItems(){let e=new Set;for(let n of this.#n.values())for(let r of n.selectedItems)e.add(r);return e}dispatch(e,n){for(let r of this.#n.values())r.dispatch(e,n)}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.addEventListener(`select`,this.#d)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(`select`,this.#d)}updated(e){super.updated(e),e.has(`grouped`)&&this.#s(),this.#c()}render(){return this.#t?this.grouped?this.#e?(this.#r=this.#o(),i`${_(this.#r.keys(),e=>e,e=>i`<ixfx-panel data-group-key=${e} .title=${e}></ixfx-panel>`)}`):a:i`<div class="ungrouped-host"></div>`:a}#o(){let e=new Map;if(!this.#e)return e;for(let n of this.#a.items){let r=this.#e(n),i=e.get(r);i||(i=[],e.set(r,i)),i.push(n)}return e}#s(){for(let e of this.#n.values())e.remove();this.#n.clear()}#c(){if(this.#t){if(!this.grouped){this.#l();return}this.#e&&this.#u()}}#l(){let e=this.querySelector(`.ungrouped-host`);if(!e)return;let n=this.#n.get(sb);n||(n=this.#t(void 0),e.appendChild(n),this.#n.set(sb,n)),n.setItems(this.#a.items)}#u(){let e=this.#r??this.#o();for(let n of[...this.#n.keys()])e.has(n)||(this.#n.get(n)?.remove(),this.#n.delete(n));for(let[n,r]of e){let e=[...this.children].find(e=>e instanceof HTMLElement&&e.dataset.groupKey===n);if(!e)continue;let i=this.#n.get(n);i||(i=this.#t(n),e.appendChild(i),this.#n.set(n,i)),i.setItems(r)}}#d};E([d({type:Boolean,reflect:!0})],cb.prototype,`grouped`,void 0),E([d({type:Boolean,attribute:`cross-group-selection`,reflect:!0})],cb.prototype,`crossGroupSelection`,void 0),cb=E([T(`ixfx-grouped-item-lister`)],cb);const lb=`application/x-ixfx-tree`,ub=new Map,db=new Map;let fb,pb=0;function mb(){return`tree-drag-${++pb}-${Date.now()}`}function hb(e,n,r,i){ub.set(e,{sourceId:e,nodes:r,keys:i}),db.set(e,new WeakRef(n)),fb=e}function gb(e){ub.delete(e),db.delete(e),fb===e&&(fb=void 0)}function _b(){if(fb===void 0)return;let e=ub.get(fb);if(e)return{sourceId:fb,keys:e.keys,nodes:e.nodes,element:db.get(fb)?.deref()}}function vb(e,n,r){return Math.max(n,Math.min(r,e))}var yb=class{#e;#t;#n=!1;#r;#i=`internal`;#a=[];#o=[];#s;#c;#l=0;#u=0;#d=0;#f;constructor(e,n){this.#e=e,this.#t=n,e.addController(this)}get isDragging(){return this.#n}get isRejected(){return this.#n&&this.#r===void 0}get dropState(){return this.#r}hostConnected(){this.#p()}hostUpdated(){this.#p()}#p(){let e=this.#t.getScrollContainer();!e||e===this.#f||(this.#m(),this.#f=e,e.addEventListener(`dragenter`,this.#h),e.addEventListener(`dragover`,this.#g),e.addEventListener(`dragleave`,this.#v),e.addEventListener(`drop`,this.#y))}#m(){let e=this.#f;e&&(e.removeEventListener(`dragenter`,this.#h),e.removeEventListener(`dragover`,this.#g),e.removeEventListener(`dragleave`,this.#v),e.removeEventListener(`drop`,this.#y),this.#f=void 0)}hostDisconnected(){this.#m(),this.#w(),this.#D(),this.#n=!1,this.#r=void 0}#h=e=>{this.#t.getDndMode()===`none`||!e.dataTransfer||this.#t.resolveDrag(e.dataTransfer,`hover`)!==void 0&&(e.preventDefault(),this.#n||(this.#n=!0,this.#t.onActiveChange(!0)))};#g=e=>{if(this.#t.getDndMode()===`none`||!e.dataTransfer)return;this.#u=e.clientX,this.#d=e.clientY;let n=this.#t.resolveDrag(e.dataTransfer,`hover`);if(!n){this.#_(e);return}this.#n||(this.#n=!0,this.#t.onActiveChange(!0)),this.#i=n.source,this.#a=n.keys,this.#o=n.nodes;let r=this.#t.getVisibleRows();this.#C(this.#x(r,e.clientY)),this.#T();let i=this.#S(e,r,n.source);if(!i){this.#_(e,!1);return}let a={source:n.source,dragged:n.nodes.length>0?n.nodes:void 0,draggedKeys:n.keys,target:i,dataTransfer:e.dataTransfer};if(!this.#t.vet(a)){this.#_(e,!1);return}e.preventDefault(),e.dataTransfer.dropEffect=n.source===`internal`?`move`:`copy`,this.#O(i)};#_(e,n=!0){e.dataTransfer&&(e.dataTransfer.dropEffect=`none`),this.#O(void 0),n&&this.#w()}#v=e=>{let n=this.#t.getScrollContainer(),r=e.relatedTarget;n&&r&&n.contains(r)||this.#b()};#y=e=>{if(!e.dataTransfer){this.#b();return}e.preventDefault(),this.#D(),this.#w();let n=e=>{this.#r=void 0,this.#n=!1,this.#t.onDropStateChange(void 0),this.#t.onActiveChange(!1),this.#t.onDragEnd(e)};if(this.#t.getDndMode()===`none`){n(!1);return}let r=this.#t.resolveDrag(e.dataTransfer,`drop`);if(!r){n(!1);return}this.#a=r.keys,this.#o=r.nodes;let i=this.#S(e,this.#t.getVisibleRows(),r.source);if(!i){n(!1);return}let a={source:r.source,dragged:r.nodes.length>0?r.nodes:void 0,draggedKeys:r.keys,target:i,dataTransfer:e.dataTransfer};if(!this.#t.vet(a)){n(!1);return}let o={...a,external:r.source===`external`?r.nodes:void 0};n(this.#t.commitDrop(o))};#b(){this.#w(),this.#D(),this.#r!==void 0&&(this.#r=void 0,this.#t.onDropStateChange(void 0)),this.#n&&(this.#n=!1,this.#t.onActiveChange(!1))}#x(e,n){if(e.length!==0)return n<e[0].rect.top?e[0]:n>e[e.length-1].rect.bottom?e[e.length-1]:e.find(e=>n>=e.rect.top&&n<=e.rect.bottom)??e[e.length-1]}#S(e,n,r){if(n.length===0)return;let i=this.#x(n,e.clientY);if(!i)return;let a=vb((e.clientY-i.rect.top)/i.rect.height,0,1),o=a<.25?`before`:a>.75?`after`:`inside`,s=i.node.item.isLeaf===!0;o===`inside`&&s&&(o=`after`);let c=!1;o===`after`&&!s&&this.#t.isExpanded(i.key)&&(o=`inside`,c=!0);let l,u,d,f;if(o===`inside`)l=i.key,u=i.key,d=i.depth+1,f=c?0:i.node.children?.length??0;else{let r=this.#t.getIndentPx()||1,a=n[0].rect.left,s=vb(Math.round((e.clientX-a)/r),0,i.depth),c={node:i.node,depth:i.depth,parentKey:this.#t.getRowInfo(i.key)?.parentKey};u=i.key;for(let e=i.depth-s;e>0&&c.parentKey!==void 0;e--){let e=this.#t.getRowInfo(c.parentKey);if(!e)break;u=c.parentKey,c=e}d=c.depth,l=c.parentKey;let p=this.#t.getChildren(l).findIndex(e=>e.item.key===u);f=(p<0?0:p)+ +(o===`after`)}if(r===`internal`){for(let e of this.#a)if(e===l||e===u||l!==void 0&&this.#t.isSelfOrDescendant(e,l)||o!==`inside`&&this.#t.isSelfOrDescendant(e,u))return;if(this.#a.length>0&&!this.#t.isReorderAllowed()&&!this.#a.some(e=>this.#t.getParentKey(e)!==l))return}return{parentKey:l,index:f,referenceKey:u,position:o,depth:d}}#C(e){if(!e||e.node.item.isLeaf===!0||this.#t.isExpanded(e.key)){this.#w();return}if(e.key===this.#c)return;this.#w();let n=this.#c=e.key;this.#s=setTimeout(()=>{this.#s=void 0,this.#c===n&&(this.#c=void 0,this.#t.expandKey(n))},Math.max(0,this.#t.getExpandHoverMs()))}#w(){this.#s!==void 0&&(clearTimeout(this.#s),this.#s=void 0),this.#c=void 0}#T(){this.#l===0&&(this.#l=requestAnimationFrame(this.#E))}#E=()=>{if(this.#l=0,!this.#n)return;let e=this.#t.getScrollContainer();if(!e)return;let n=e.getBoundingClientRect(),r=this.#d-n.top,i=0;r<24?i=-Math.ceil(16*(1-Math.max(0,r)/24)):r>n.height-24&&(i=Math.ceil(16*(1-Math.max(0,n.height-r)/24))),i!==0&&this.#u>=n.left&&this.#u<=n.right&&(e.scrollTop+=i,this.#T())};#D(){this.#l!==0&&(cancelAnimationFrame(this.#l),this.#l=0)}#O(e){let n=e===void 0?this.#r===void 0:e.referenceKey===this.#r?.referenceKey&&e.position===this.#r?.position&&e.depth===this.#r?.depth&&e.index===this.#r?.index;this.#r=e,(!n||this.#n)&&this.#t.onDropStateChange(e)}};function bb(e,n){let r=[],i=new Map,a=[],o=(e,r,i)=>{if(!e||e.length===0)return;let o=e.filter(e=>n.isShown(e,r));for(let e=o.length-1;e>=0;e--)a.push({node:o[e],depth:r,parentKey:i,posInSet:e+1,setSize:o.length})};for(o(e.children,0,void 0);a.length>0;){let{node:e,depth:s,parentKey:c,posInSet:l,setSize:u}=a.pop();i.set(e.item.key,r.length),r.push({node:e,depth:s,parentKey:c,posInSet:l,setSize:u}),e.children&&e.children.length>0&&n.isExpanded(e,s)&&o(e.children,s+1,e.item.key)}return{rows:r,indexByKey:i}}function xb(e){let n=new Map,r=new Set,i=[];if(e.children)for(let r of e.children)n.set(r.item.key,e.item.key),i.push({node:r,depth:0,parentKey:e.item.key});for(;i.length>0;){let{node:e,depth:a,parentKey:o}=i.pop();if(n.set(e.item.key,o),e.item.icon&&r.add(a),e.children)for(let n=e.children.length-1;n>=0;n--){let r=e.children[n];i.push({node:r,depth:a+1,parentKey:e.item.key})}}return{parentByKey:n,depthsWithIcons:r}}function Sb(e,n){let r=new Set;if(!e.children)return r;let i=[],a=(e,r)=>{i.push({node:e,depth:r,next:0,matched:n(e,r)})};for(let n of e.children)for(a(n,0);i.length>0;){let e=i[i.length-1],n=e.node.children;if(n&&e.next<n.length){a(n[e.next++],e.depth+1);continue}i.pop(),e.matched&&(r.add(e.node.item.key),i.length>0&&(i[i.length-1].matched=!0))}return r}function Cb(e,n,r){if(r.size===0)return[...e];let i=new Set;for(let n of e)i.add(n.node.item.key);let a=Symbol(`end`),o=new Map,s=a;for(let e=n.length-1;e>=0;e--){let a=n[e];if(i.has(a)){s=a;continue}let c=r.get(a);if(!c)continue;let l=o.get(s);l?l.push(c):o.set(s,[c])}let c=[];for(let n of e){let e=o.get(n.node.item.key);if(e)for(let n=e.length-1;n>=0;n--)c.push(e[n]);c.push(n)}let l=o.get(a);if(l)for(let e=l.length-1;e>=0;e--)c.push(l[e]);return c}function wb(e,n){let r=new Map;if(!e.children)return r;let i=[];for(let a of e.children)for(i.push({node:a,next:0,checked:0,unchecked:0,counted:0});i.length>0;){let e=i[i.length-1],{node:a}=e,o=a.children,s=a.item.isLeaf||!o?.length;if(!s&&e.next<o.length){i.push({node:o[e.next++],next:0,checked:0,unchecked:0,counted:0});continue}i.pop();let c;c=s?n.has(a)?`checked`:`unchecked`:e.counted===0?`unchecked`:e.checked===e.counted?`checked`:e.unchecked===e.counted?`unchecked`:`indeterminate`,r.set(a.item.key,c);let l=s&&a.item.selectable===!1;if(i.length>0&&!l){let e=i[i.length-1];e.counted++,c===`checked`?e.checked++:c===`unchecked`&&e.unchecked++}}return r}function Tb(e,n){if(e.has(n))return e;let r=new Set(e);return r.add(n),r}function Eb(e,n){if(!e.has(n))return e;let r=new Set(e);return r.delete(n),r}function Db(e,n){let r;for(let i of e)n(i)&&(r??=new Set(e),r.delete(i));return r??e}function Ob(e){return Math.max(1,e.rowHeight+e.gap)}function kb(e,n){return e.listOffset+n*Ob(e)+e.gap}function Ab(e,n){return kb(e,n)+e.rowHeight}function jb(e,n,r=5){let{count:i}=e;if(i<=0)return{start:0,end:0};let a=Ob(e),o=Math.max(0,n-e.listOffset),s=Math.floor(o/a),c=Math.ceil((o+e.viewportHeight)/a),l=Math.min(i,Math.max(0,s-r));return{start:l,end:Math.min(i,Math.max(l,c+r))}}function Mb(e,n,r,i=0){if(n<0||n>=e.count)return r;let a=kb(e,n),o=a+e.rowHeight;return a<r+i?n===0?0:Math.max(0,a-i):o>r+e.viewportHeight?Math.max(0,o-e.viewportHeight):r}function Nb(e,n,r,i=0){if(n<0||n>=e.count)return r;let a=kb(e,n),o=a+e.rowHeight;if(a>=r+i&&o<=r+e.viewportHeight)return r;let s=a+e.rowHeight/2-(e.viewportHeight+i)/2;return Math.max(0,s)}function Pb(e){return Math.max(1,Math.floor(e.viewportHeight/Ob(e))-1)}function Fb(e){return{count:e.count,topOf:n=>kb(e,n),bottomOf:n=>Ab(e,n)}}function Ib(e,n){let r=0,i=e.count;for(;r<i;){let a=r+i>>>1;e.bottomOf(a)>n?i=a:r=a+1}return r}function Lb(e,n,r,i=0){if(e.count===0)return;let a=Math.min(Ib(e,n),e.count-1),o=a,s=e.count;for(;o<s;){let n=o+s>>>1;e.topOf(n)>=r?s=n:o=n+1}let c=Math.max(a,o-1);return{first:Math.max(0,a-i),last:Math.min(e.count-1,c+i)}}const Rb={rows:[],indexByKey:new Map};let q=class extends n{constructor(...e){super(...e),this.exclusivity=`none`,this.selectionFilter=`all`,this.interactionMode=`standard`,this._selectedNodes=new Set,this.disableKeyboardNavigation=!1,this.registry=void 0,this.itemDnd=`none`,this.dndExpandHoverMs=500,this.reorderable=!0,this.stickyHeaders=!0,this.virtualize=`auto`,this.virtualizeThreshold=200,this.applyInternalDrop=!0,this._expandedKeys=new Set,this.#i=0,this._selectionVersion=0,this._scrollTop=0,this.#l={rowHeight:30,gap:1,listOffset:0},this.#u=0,this.#d=0,this.#m=0,this.#h=0,this.#g=!1,this.#S=()=>{this.#d===0&&(this.#d=requestAnimationFrame(()=>{this.#d=0,this.#C()}))},this.tickled=new ie(this,{getItems:()=>this.#s().rows.map(({node:e})=>({id:e.item.key,enabled:!0})),hoverDisabled:()=>this.#J?.isDragging===!0||this.#Y?.isDragging===!0,onStateChange:()=>{this.setAttribute(`data-input-mode`,this.tickled.inputMode)}}),this._focusedDepth=0,this.search=new Bt(this,{adapter:Ut(this,{labelSelector:`.tree-label`,highlightKey:`incr-search-highlight`})}),this.#I={indent:20},this.#L=[],this.#R=[],this.#z=new Map,this.#B=new Map,this.#V=new Set,this.#H=new Map,this.#U=new Map,this.#W=!1,this.#G=``,this.#X=new Set,this.#Z=!1,this.#$=()=>{this.#Q=void 0},this.#te=()=>{this.#de===0&&(this.#de=requestAnimationFrame(()=>{this.#de=0,this.#re()}))},this._stickyKeys=[],this.#le=new Map,this.#ue=!0,this.#de=0,this.#pe=!1,this.#Ie=`user`,this.#Le=!1,this.#$e=0,this.#dt=e=>{if(this.search.isOpen)return;let n=this.#s().rows;if(n.length===0)return;if((e.ctrlKey||e.metaKey)&&e.key===`a`){e.preventDefault(),this.selectAll();return}[`ArrowDown`,`ArrowUp`,`ArrowLeft`,`ArrowRight`,`Home`,`End`,`PageUp`,`PageDown`,`Enter`,` `].includes(e.key)&&this.tickled.setInputMode(`keyboard`);let r=this.#ot();switch(e.key){case`ArrowDown`:e.preventDefault(),this.#ut(n,r,Math.min(r+1,n.length-1),e.shiftKey);break;case`ArrowUp`:e.preventDefault(),this.#ut(n,r,Math.max(r-1,0),e.shiftKey);break;case`Home`:e.preventDefault(),this.#ut(n,r,0,e.shiftKey);break;case`End`:e.preventDefault(),this.#ut(n,r,n.length-1,e.shiftKey);break;case`PageDown`:{e.preventDefault();let i=this.#lt();this.#ut(n,r,Math.min(r+i,n.length-1),e.shiftKey);break}case`PageUp`:{e.preventDefault();let i=this.#lt();this.#ut(n,r,Math.max(r-i,0),e.shiftKey);break}case`ArrowRight`:{e.preventDefault();let i=n[r];i&&i.node.item.isLeaf!==!0&&(this._expandedKeys.has(i.node.item.key)?r+1<n.length&&this.#st(r+1):this.#Ke(i.node,i.depth)),this.requestUpdate();break}case`ArrowLeft`:{e.preventDefault();let i=n[r];if(i&&this._expandedKeys.has(i.node.item.key))this.#e(Eb(this._expandedKeys,i.node.item.key)),this.dispatchEvent(new CustomEvent(`collapse`,{detail:{node:i.node,depth:i.depth},bubbles:!0,composed:!0}));else if(i.depth>0){let e=i.depth-1;for(let i=r-1;i>=0;i--)if(n[i].depth===e){this.#st(i);break}}this.requestUpdate();break}case`Enter`:{e.preventDefault();let i=n[r];i&&(this.interactionMode!==`manual`&&this.interactionMode!==`checked`&&this.select(i.node),this.dispatchEvent(new CustomEvent(`activate`,{detail:{node:i.node,depth:i.depth},bubbles:!0,composed:!0})),this.requestUpdate());break}case` `:{e.preventDefault();let i=n[r];if(!i)break;this.interactionMode===`checked`?this._handleCheckboxClick(new MouseEvent(`click`),i.node,i.depth):(this.interactionMode===`standard`||this.interactionMode===`vscode`||this.interactionMode===`manual`)&&this.#Ge(i.node,i.depth);break}case`Escape`:e.preventDefault(),this.#tt()}},this.#ft=e=>{let n=e.target.closest(`ul.tree-list li`);if(!n)return;let r=n.dataset.key;if(!r)return;let i=this.#s(),a=i.indexByKey.get(r),o=a===void 0?void 0:i.rows[a];if(!o)return;let s={node:o.node,depth:o.depth};this.dispatchEvent(new CustomEvent(`item-dblclick`,{detail:s,bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`activate`,{detail:s,bubbles:!0,composed:!0}))}}get selectedNodes(){return this._selectedNodes}#e(e){e!==this._expandedKeys&&(this._expandedKeys=e,this.#t=void 0,this.#ue=!0)}#t;#n;#r;#i;#a;#o;invalidateStructure(){this.#i++,this.#t=void 0,this.requestUpdate()}#s(){if(!this.root)return Rb;if(this.#t&&this.#n===this.root&&this.#r===this.filterPredicate)return this.#t;let e=this.#D();return this.#t=bb(this.root,{isExpanded:(e,n)=>this._isExpanded(e,n),isShown:e?n=>e.matches.has(n.item.key):()=>!0}),this.#n=this.root,this.#r=this.filterPredicate,this.#t}#c(){let e=this.root;if(!e)return{parentByKey:new Map,depthsWithIcons:new Set};let n=this.#a;if(n&&n.root===e&&n.version===this.#i)return n.index;let r=xb(e);return this.#a={root:e,version:this.#i,index:r},r}#l;#u;#d;#f;#p;#m;#h;#g;#_(){return this.virtualize===`off`?!1:this.virtualize===`on`||this.#s().rows.length>this.virtualizeThreshold}#v(e){return{count:e,rowHeight:this.#l.rowHeight,gap:this.#l.gap,listOffset:this.#l.listOffset,viewportHeight:this.#u>0?this.#u:600}}#y(){let e=this.renderRoot.querySelector(`ul.tree-list`),n=e?.querySelector(`li.item:not(.leaving)`),r=n?.getBoundingClientRect().height??0,i=r>0?r:this.#Se(),a=n?Number.parseFloat(getComputedStyle(n).marginTop):NaN,o=Number.isNaN(a)?Number.parseFloat(getComputedStyle(this).getPropertyValue(`--tree-item-gap`)):a,s=Number.isNaN(o)?1:o,c=this.#l.listOffset;if(e){let n=Number.parseFloat(getComputedStyle(e).paddingTop);c=e.offsetTop+(Number.isNaN(n)?0:n)}let l=this.#be()?.clientHeight??0,u=l>0&&l!==this.#u;l>0&&(this.#u=l);let d=this.#l,f=d.rowHeight!==i||d.gap!==s||d.listOffset!==c;return this.#l={rowHeight:i,gap:s,listOffset:c},f||u}#b(e){return jb(this.#v(e),this._scrollTop)}#x(){let e=this.#be()?.scrollTop;e!==void 0&&e!==this._scrollTop&&(this._scrollTop=e)}#S;#C(){let e=this.#be();if(!e||!this.root||!this.#_())return;let n=e.scrollTop;if(n===this._scrollTop)return;let r=jb(this.#v(this.#s().rows.length),n);(r.start!==this.#m||r.end!==this.#h)&&(this._scrollTop=n)}#w(){let e=this.#be();e!==this.#f&&(this.#f?.removeEventListener(`scroll`,this.#S),this.#p?.disconnect(),this.#p=void 0,this.#f=e,e&&(e.addEventListener(`scroll`,this.#S,{passive:!0}),typeof ResizeObserver<`u`&&(this.#p=new ResizeObserver(e=>{let n=e.at(-1)?.contentRect.height??0;n>0&&n!==this.#u&&this.#_()&&this.requestUpdate()}),this.#p.observe(e))))}#T(){this.#f?.removeEventListener(`scroll`,this.#S),this.#f=void 0,this.#p?.disconnect(),this.#p=void 0,this.#d!==0&&(cancelAnimationFrame(this.#d),this.#d=0)}#E(e,n=`edge`){let r=this.#be();if(!r)return;let i=this.#v(this.#s().rows.length),a=this.renderRoot.querySelector(`.sticky-headers`)?.getBoundingClientRect().height??0,o=(n===`center-if-hidden`?Nb:Mb)(i,e,r.scrollTop,a);(o!==r.scrollTop||o!==this._scrollTop)&&(r.scrollTop=o,this._scrollTop=o)}#D(){let e=this.filterPredicate,n=this.root;if(!e||!n)return;let r=this.#o;if(r&&r.predicate===e&&r.root===n&&r.version===this.#i)return r;let i=Sb(n,e),{parentByKey:a}=this.#c(),o=new Set;for(let e of i){let n=a.get(e);n!==void 0&&o.add(n)}let s={predicate:e,root:n,version:this.#i,matches:i,autoExpanded:o};return this.#o=s,s}get _structureVersion(){return this.#i}get _depthsWithIcons(){return this.#c().depthsWithIcons}#O;#k(){let e=this.searchModes?.trim();if(e===void 0)return[...Rt];let n=new Set(e.split(/\s+/));return Rt.filter(e=>n.has(e))}#A(){this.#F&&(this.search.setModes(this.#k()),this.#O?.(),this.#O=Lt(this.#F,this.search))}#j;#M;#N;#P;#F;#I;#L;#R;#z;#B;#V;#H;#U;#W;#G;#K;#q;#J;#Y;#X;#Z;#Q;#$;#ee(){let e=this.#be();this.stickyHeaders&&e?(!this.#pe||this.#fe!==e)&&(this.#fe?.removeEventListener(`scroll`,this.#te),e.addEventListener(`scroll`,this.#te,{passive:!0}),this.#fe=e,this.#pe=!0):this.#pe&&=(this.#fe?.removeEventListener(`scroll`,this.#te),this.#fe=void 0,!1)}#te;#ne(e){return{count:e.length,topOf:n=>e[n].offsetTop,bottomOf:n=>e[n].offsetTop+e[n].offsetHeight}}#re(){this.#ue=!1;let e=new Map,n=()=>this.#ie([],e);if(!this.stickyHeaders||!this.root)return n();let r=this.#be(),i=this.renderRoot.querySelector(`ul.tree-list`);if(!r||!i)return n();let a=this.#s(),o=this.#_(),s=i.children,c=this.#R;if(a.rows.length===0||!o&&(s.length===0||s.length!==c.length))return n();let l=o?Fb(this.#v(a.rows.length)):this.#ne(s),u=r.scrollTop,d=u+(this.renderRoot.querySelector(`.sticky-headers`)?.getBoundingClientRect().height??0),f=Ib(l,u);if(!o)for(;f<s.length&&s[f].classList.contains(`leaving`);)f++;if(f>=l.count)return n();let p=o?f:a.indexByKey.get(c[f]);if(p===void 0)return n();let m=[],h=a.rows[p].parentKey;for(;h!==void 0;){let e=a.indexByKey.get(h);if(e===void 0)break;m.unshift(a.rows[e]),h=a.rows[e].parentKey}let g=new Map,_=[];for(let e of m){let n=e.node.item.key,r=o?a.indexByKey.get(n):this.#z.get(n);r===void 0||l.bottomOf(r)>d||(_.push(n),g.set(n,{node:e.node,depth:e.depth}))}this.#ie(_,g)}#ie(e,n){let r=this._stickyKeys;r.length===e.length&&r.every((n,r)=>n===e[r])||(this.#le=n,this._stickyKeys=e)}#ae(){return!this.stickyHeaders||this._stickyKeys.length===0?a:i`
|
|
7739
7742
|
<div class="sticky-anchor">
|
|
7740
7743
|
<div class="sticky-headers" part="sticky-headers">
|
|
7741
7744
|
${this._stickyKeys.map(e=>{let n=this.#le.get(e);return n?this.#oe(n.node,n.depth):a})}
|
|
@@ -7753,13 +7756,13 @@ const je={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t
|
|
|
7753
7756
|
@click=${n=>this.#se(n,e)}
|
|
7754
7757
|
@keydown=${n=>{(n.key===`Enter`||n.key===` `)&&(n.preventDefault(),this.#ce(e))}}
|
|
7755
7758
|
>${this.renderNodeContent(e,n)}</div>
|
|
7756
|
-
`}#se(e,n){if(!(this.#J?.isDragging||this.#Y?.isDragging)){if(n.item.isLeaf!==!0&&e.target instanceof Element&&e.target.closest(`.tree-caret`)){let e=this.#le.get(n.item.key)?.depth??0;this.#Ke(n,e),this.#ue=!0,this.requestUpdate();return}this.#ce(n)}}#ce(e){this.#Pe(e)&&this.select(e),this.#Qe(e.item.key),this.#ue=!0,this.requestUpdate()}#le;#ue;#de;#fe;#pe;get nativeDrag(){return this.#Y}get dropState(){return this.#q}get nativeDragKeys(){return this.#X}#me(e){this.#U.get(e)?.cancel(),this.#U.delete(e)}#he(){for(let e of this.#U.values())try{e.cancel()}catch{}this.#U.clear()}willUpdate(e){super.willUpdate(e);let n=this.#t!==void 0&&e.size===1&&e.has(`_scrollTop`)&&this.#_();if(this.#g=n,n){this.#x();return}this.#t=void 0,(e.has(`root`)||e.has(`model`))&&this.#i++,this.#ge(e.has(`filterPredicate`));let r=this.#_();this.toggleAttribute(`data-virtual`,r),r&&(this.#y(),this.#x()),(e.has(`root`)||e.has(`model`)||e.has(`filterPredicate`)||e.has(`stickyHeaders`))&&(this.#ue=!0),this.#ue&&this.#re()}#ge(e){let n=this.#s().rows;if(this.#_()){this.#V.clear(),this.#he(),this.#H.clear(),this.#L=[];return}let r=new Set(n.map(e=>e.node.item.key));if(this.#V.clear(),e)this.#he(),this.#H.clear();else if(this.#W&&this.#L.length>0){let e=new Set(this.#L);for(let{node:r}of n)e.has(r.item.key)||this.#V.add(r.item.key);this.#V.size>50&&this.#V.clear();for(let e of this.#L)if(!r.has(e)&&!this.#H.has(e)){let n=this.#B.get(e);n&&this.#H.set(e,n)}}for(let e of[...this.#H.keys()])r.has(e)&&(this.#me(e),this.#H.delete(e));this.#H.size>50&&(this.#he(),this.#H.clear())}_isLeaving(e){return this.#H.has(e.item.key)}_isFilteredOut(e,n){return!1}#_e(){if(this.#V.size>0){for(let e of this.renderRoot.querySelectorAll(`.item`)){let n=e.dataset.key;if(!(n===void 0||!this.#V.has(n))){if(this.#U.has(n))this.#me(n);else for(let n of e.getAnimations())n.cancel();Gn(e)}}this.#V.clear()}if(this.#H.size>0)for(let e of this.renderRoot.querySelectorAll(`.item.leaving`)){let n=e.dataset.key;if(n===void 0||this.#U.has(n))continue;let r=Jn(e),i=r.animation;if(!i){r.then(()=>{this.#H.has(n)&&(this.#H.delete(n),this.requestUpdate())});continue}this.#me(n),this.#U.set(n,i),r.then(()=>{this.#U.get(n)===i&&(this.#U.delete(n),this.#H.delete(n),this.requestUpdate(),this.updateComplete.then(()=>{try{i.cancel()}catch{}}))})}let e=this.#s().rows;this.#L=e.map(e=>e.node.item.key),this.#B.clear();for(let n of e)this.#B.set(n.node.item.key,n);this.#W=!0}updated(e){if(this.#Q=void 0,this.#w(),this.#g){this.#g=!1,this.#ve();return}if(this.#ee(),e.has(`root`)&&this.root&&(this.#tt(),this.#
|
|
7757
|
-
`))}catch{}},onActiveChange:e=>{this.toggleAttribute(`data-native-dragging`,e),e||(this.#X=new Set),this.requestUpdate()},onEnd:()=>{gb(this.#G),this.#X=new Set,this.#K=setTimeout(()=>{this.#K=void 0},150),this.#Z||this.dispatchEvent(new CustomEvent(`tree-drag-end`,{detail:{dropped:!1},bubbles:!0,composed:!0})),this.#Z=!1}}),this.#J=new yb(this,{getDndMode:()=>this.itemDnd,getExpandHoverMs:()=>this.dndExpandHoverMs,getVisibleRows:()=>this.#Te(),getRowInfo:e=>{let n=this.#s(),r=n.indexByKey.get(e);if(r===void 0)return;let{node:i,depth:a,parentKey:o}=n.rows[r];return{node:i,depth:a,parentKey:o}},getChildren:e=>this.#Ce(e),getIndentPx:()=>this.#xe(),getScrollContainer:()=>this.#be(),isSelfOrDescendant:(e,n)=>this.#De(e,n),isExpanded:e=>this._expandedKeys.has(e),isReorderAllowed:()=>this.reorderable,getParentKey:e=>this.#Oe(e)?.item.key,resolveDrag:(e,n)=>this.#Ae(e,n),vet:e=>{if(this.canDrop&&!this.canDrop(e))return!1;let n=new CustomEvent(`tree-drag-over`,{detail:e,bubbles:!0,composed:!0,cancelable:!0});return this.dispatchEvent(n)},expandKey:e=>this.#Ee(e),onDropStateChange:e=>{this.#q=e,this.toggleAttribute(`data-drop-rejected`,this.#J.isDragging&&e===void 0),this.requestUpdate()},onActiveChange:e=>{e?(this.#Q=void 0,this.#be()?.addEventListener(`scroll`,this.#$,{passive:!0})):(this.#be()?.removeEventListener(`scroll`,this.#$),this.#Q=void 0,this.toggleAttribute(`data-drop-rejected`,!1)),this.requestUpdate()},commitDrop:e=>this.dispatchEvent(new CustomEvent(`tree-drop`,{detail:e,bubbles:!0,composed:!0,cancelable:!0}))?(this.applyInternalDrop&&e.source===`internal`&&this.model&&this.model.applyDrop({source:`internal`,draggedKeys:e.draggedKeys,target:e.target}),this.#Z=!0,!0):!1,onDragEnd:e=>{this.#q=void 0,this.toggleAttribute(`data-drop-rejected`,!1),this.requestUpdate(),this.dispatchEvent(new CustomEvent(`tree-drag-end`,{detail:{dropped:e},bubbles:!0,composed:!0}))}})}#be(){return this.shadowRoot?.querySelector(`#container`)??void 0}#xe(){let e=Number.parseInt(getComputedStyle(this).getPropertyValue(`--tree-indent`),10);return Number.isNaN(e)?20:e}#Se(){let e=Number.parseInt(getComputedStyle(this).getPropertyValue(`--tree-item-height`),10);return Number.isNaN(e)?30:e}#Ce(e){if(e===void 0)return this.root?.children??[];let n=this.#s(),r=n.indexByKey.get(e);return r===void 0?[]:n.rows[r].node.children??[]}#we(e,n,r){let i=this.#s(),a=this.#v(i.rows.length),o=Lb(Fb(a),e.scrollTop,e.scrollTop+e.clientHeight,1);if(!o)return;let s=e.getBoundingClientRect(),c=n.querySelector(`li.item`)?.getBoundingClientRect()??s;for(let n=o.first;n<=o.last;n++){let{node:o,depth:l}=i.rows[n],u=s.top-e.scrollTop+kb(a,n),d={x:c.left,y:u,left:c.left,right:c.left+c.width,top:u,bottom:u+a.rowHeight,width:c.width,height:a.rowHeight,toJSON:()=>({})};r.push({key:o.item.key,node:o,depth:l,index:n,rect:d})}}#Te(){if(this.#Q)return this.#Q;let e=[],n=this.#be(),r=this.renderRoot.querySelector(`ul.tree-list`),i=this.#R;if(n&&r&&this.#_())this.#we(n,r,e);else if(n&&r&&r.children.length===i.length){let a=this.#s(),o=r.children,s=Lb(this.#ne(o),n.scrollTop,n.scrollTop+n.clientHeight,1);if(s)for(let n=s.first;n<=s.last;n++){let r=o[n];if(r.classList.contains(`leaving`))continue;let s=a.indexByKey.get(i[n]);if(s===void 0)continue;let{node:c,depth:l}=a.rows[s];e.push({key:c.item.key,node:c,depth:l,index:s,rect:r.getBoundingClientRect()})}}return this.#Q=e,e}#Ee(e){if(this._expandedKeys.has(e))return;let n=this.#s(),r=n.indexByKey.get(e),i=r===void 0?void 0:n.rows[r];!i||i.node.item.isLeaf===!0||(this.#Ke(i.node,i.depth),this.#Q=void 0,this.requestUpdate())}#De(e,n){if(e===n)return!0;let{parentByKey:r}=this.#c(),i=r.get(n);for(;i!==void 0;){if(i===e)return!0;i=r.get(i)}return!1}#Oe(e){let n=this.#c().parentByKey.get(e);if(n!==void 0&&n!==this.root?.item.key)return this.#ke(n)}#ke(e){let n=this.#s(),r=n.indexByKey.get(e);if(r!==void 0)return n.rows[r].node;let{parentByKey:i}=this.#c(),a=[];for(let n=e;n!==void 0&&n!==this.root?.item.key;n=i.get(n))a.unshift(n);let o=this.root;for(let e of a)o=o?.children?.find(n=>n.item.key===e);return o}#Ae(e,n){let r=this.itemDnd;if(r===`none`)return;let i=r===`internal`||r===`both`,a=r===`external`||r===`both`,o=[];try{o=Array.from(e.types)}catch{}let s=_b(),c=o.includes(lb)||s!==void 0;if(i&&c){if(s&&s.keys.length>0){let e=this.root?yg(this.root,s.keys):s.keys;return{source:`internal`,keys:e,nodes:e.map(e=>this.#ke(e)).filter(e=>e!==void 0)}}if(n===`drop`)try{let n=e.getData(lb);if(n){let e=JSON.parse(n);return{source:`internal`,keys:e.keys??[],nodes:e.nodes??[]}}}catch{}return{source:`internal`,keys:[],nodes:[]}}if(a&&!c){if(this.acceptDropTypes!==void 0){let n=this.acceptDropTypes.trim().split(/\s+/).filter(Boolean),r=Array.from(e.types);if(n.length>0&&!n.some(e=>r.includes(e)))return}if(n===`drop`){let n=this.parseExternalDrop?.(e);return!n||n.length===0?void 0:{source:`external`,keys:n.map(e=>e.item.key),nodes:n}}return this.parseExternalDrop?{source:`external`,keys:[],nodes:[]}:void 0}}#je(){if(this.itemDnd===`none`)return!1;let e=this.#s().rows;return e.length===0?!1:!this.canDrag||e.some(({node:e})=>this.canDrag({nodes:[e],keys:[e.item.key]}))}disconnectedCallback(){super.disconnectedCallback(),this.#he(),this.#H.clear(),this.#V.clear(),this.#N?.(),this.#N=void 0,this.#O?.(),this.#O=void 0,this.#K!==void 0&&(clearTimeout(this.#K),this.#K=void 0),this.#be()?.removeEventListener(`scroll`,this.#$),this.#T(),this.#pe&&=(this.#fe?.removeEventListener(`scroll`,this.#te),this.#fe=void 0,!1),this.#de!==0&&(cancelAnimationFrame(this.#de),this.#de=0),gb(this.#G),this.#F&&(this.#F.unregister(`select-all`),this.#F.unregister(`deselect-all`),this.#F=void 0,this.registry=void 0)}getConfig(){return{...this.#I}}setConfig(e){this.#I={...this.#I,...e},this.requestUpdate()}select(e){if(!this.#Pe(e))return;let n=new Set(this._selectedNodes);this._selectedNodes.clear(),this._selectedNodes.add(e),this.selectedNode=e,this.#Re(n),this.requestUpdate()}deselect(e){if(!this._selectedNodes.has(e))return;let n=new Set(this._selectedNodes);this._selectedNodes.delete(e),this.selectedNode===e&&(this.selectedNode=[...this._selectedNodes].at(-1)),this.#Re(n),this.requestUpdate()}clearSelection(){if(this._selectedNodes.size===0)return;let e=new Set(this._selectedNodes);this.#Fe(),this.#Re(e),this.requestUpdate()}selectAll(){let e=new Set(this._selectedNodes);if(this.interactionMode===`checked`)for(let{node:e}of this.#s().rows)this.#Pe(e)&&this.#Je(e,!0);else{for(let{node:e}of this.#s().rows)this.#Pe(e)&&this._selectedNodes.add(e);this.selectedNode=[...this._selectedNodes].at(-1)}this.#Re(e),this.requestUpdate()}deselectAll(){let e=new Set(this._selectedNodes);if(this.interactionMode===`checked`)for(let{node:e}of this.#s().rows)this.#Pe(e)&&this.#Je(e,!1);else this.#Fe();this.#Re(e),this.requestUpdate()}expandAll(e){this.#Me(!0,e)}collapseAll(e){this.#Me(!1,e)}#Me(e,n){let r=this.root;if(!r)return;let i=r=>e?r<(n??1/0):r>=(n??0),a=[],o=this._expandedKeys,s=(n,r)=>{let c=n.children;if(n.item.isLeaf!==!0&&c!==void 0&&c.length>0&&i(r)){let i=o.has(n.item.key);e&&!i?(o=Tb(o,n.item.key),this._isExpanded(n,r)||a.push({node:n,depth:r})):!e&&i&&(o=Eb(o,n.item.key),a.push({node:n,depth:r}))}for(let e of c??[])s(e,r+1)};for(let e of r.children??[])s(e,0);if(o===this._expandedKeys)return;this.#e(o);let c=e?`expand`:`collapse`;for(let{node:e,depth:n}of a)this.dispatchEvent(new CustomEvent(c,{detail:{node:e,depth:n},bubbles:!0,composed:!0}));this.requestUpdate()}navigateTo(e,n={}){if(!this.root?.children)return!1;let r=this.#Ie,i=this.#Le;this.#Ie=`programmatic`,this.#Le=n.silent===!0;try{return this.#Ne(e,n.reveal??`edge`)}finally{this.#Ie=r,this.#Le=i}}#Ne(e,n){this.#tt(),this.#Fe(),this.tickled.clearTickled(),this._focusedDepth=0;let r=this.root;for(let n of e){let i=r?.children;if(!i)return!1;let a=i.find(e=>e.item.key===n);if(!a)return!1;this.#nt(a.item.key),this.#e(Tb(this._expandedKeys,a.item.key)),n===e.at(-1)&&(this.select(a),this.tickled.setTickled(a.item.key)),r=a}return this.#ue=!0,this.requestUpdate(),this.#Qe(e.at(-1),n),!0}navigateToNode(e){if(!this.root?.children)return!1;let n=this.#ze(this.root.children,e);return n?this.navigateTo(n):!1}revealKey(e){if(!this.root?.children)return!1;let n=this.#ze(this.root.children,n=>n.item.key===e);if(!n)return!1;for(let e=0;e<n.length-1;e++)this.#nt(n[e]),this.#e(Tb(this._expandedKeys,n[e]));return this.tickled.setTickled(e),this.#ue=!0,this.requestUpdate(),this.updateComplete.then(()=>this.#Qe(e)),!0}selectMany(e){let n=new Set(this._selectedNodes);this._selectedNodes=new Set([...e].filter(e=>this.#Pe(e))),this.selectedNode=[...this._selectedNodes].at(-1),this.#Re(n),this.requestUpdate()}getNodes(){if(!this.root?.children)return[];let e=[],n=(r,i)=>{if(e.push({node:r,depth:i}),r.children)for(let e of r.children)n(e,i+1)};for(let e of this.root.children)n(e,0);return e}#Pe(e){return this.selectionFilter===`none`?!1:this.selectionFilter===`leaf`?e.item.isLeaf===!0:this.selectionFilter!==`branch`||e.item.isLeaf===!1||e.children!==void 0&&e.children.length>0}#Fe(){this._selectionVersion++,this._selectedNodes.clear(),this.selectedNode=void 0}#Ie;#Le;#Re(e){if(this._selectionVersion++,this.#Le)return;let n={selected:new Set(this._selectedNodes),previous:e,origin:this.#Ie};this.dispatchEvent(new CustomEvent(`select`,{detail:n,bubbles:!0,composed:!0}))}#ze(e,n,r=[]){for(let i of e){let e=[...r,i.item.key];if(n(i))return e;if(i.children?.length){let r=this.#ze(i.children,n,e);if(r)return r}}}renderNodeContent(e,n){let r=e.item.isLeaf!==!0,o=this._isExpanded(e,n);return i`
|
|
7759
|
+
`}#se(e,n){if(!(this.#J?.isDragging||this.#Y?.isDragging)){if(n.item.isLeaf!==!0&&e.target instanceof Element&&e.target.closest(`.tree-caret`)){let e=this.#le.get(n.item.key)?.depth??0;this.#Ke(n,e),this.#ue=!0,this.requestUpdate();return}this.#ce(n)}}#ce(e){this.#Pe(e)&&this.select(e),this.#Qe(e.item.key),this.#ue=!0,this.requestUpdate()}#le;#ue;#de;#fe;#pe;get nativeDrag(){return this.#Y}get dropState(){return this.#q}get nativeDragKeys(){return this.#X}#me(e){this.#U.get(e)?.cancel(),this.#U.delete(e)}#he(){for(let e of this.#U.values())try{e.cancel()}catch{}this.#U.clear()}willUpdate(e){super.willUpdate(e);let n=this.#t!==void 0&&e.size===1&&e.has(`_scrollTop`)&&this.#_();if(this.#g=n,n){this.#x();return}if(this.#t=void 0,(e.has(`root`)||e.has(`model`))&&this.#i++,e.has(`root`)&&this.root&&this._expandedKeys.size>0){let{parentByKey:e}=this.#c();this.#e(Db(this._expandedKeys,n=>!e.has(n)))}this.#ge(e.has(`filterPredicate`));let r=this.#_();this.toggleAttribute(`data-virtual`,r),r&&(this.#y(),this.#x()),(e.has(`root`)||e.has(`model`)||e.has(`filterPredicate`)||e.has(`stickyHeaders`))&&(this.#ue=!0),this.#ue&&this.#re()}#ge(e){let n=this.#s().rows;if(this.#_()){this.#V.clear(),this.#he(),this.#H.clear(),this.#L=[];return}let r=new Set(n.map(e=>e.node.item.key));if(this.#V.clear(),e)this.#he(),this.#H.clear();else if(this.#W&&this.#L.length>0){let e=new Set(this.#L);for(let{node:r}of n)e.has(r.item.key)||this.#V.add(r.item.key);this.#V.size>50&&this.#V.clear();for(let e of this.#L)if(!r.has(e)&&!this.#H.has(e)){let n=this.#B.get(e);n&&this.#H.set(e,n)}}for(let e of[...this.#H.keys()])r.has(e)&&(this.#me(e),this.#H.delete(e));this.#H.size>50&&(this.#he(),this.#H.clear())}_isLeaving(e){return this.#H.has(e.item.key)}_isFilteredOut(e,n){return!1}#_e(){if(this.#V.size>0){for(let e of this.renderRoot.querySelectorAll(`.item`)){let n=e.dataset.key;if(!(n===void 0||!this.#V.has(n))){if(this.#U.has(n))this.#me(n);else for(let n of e.getAnimations())n.cancel();Gn(e)}}this.#V.clear()}if(this.#H.size>0)for(let e of this.renderRoot.querySelectorAll(`.item.leaving`)){let n=e.dataset.key;if(n===void 0||this.#U.has(n))continue;let r=Jn(e),i=r.animation;if(!i){r.then(()=>{this.#H.has(n)&&(this.#H.delete(n),this.requestUpdate())});continue}this.#me(n),this.#U.set(n,i),r.then(()=>{this.#U.get(n)===i&&(this.#U.delete(n),this.#H.delete(n),this.requestUpdate(),this.updateComplete.then(()=>{try{i.cancel()}catch{}}))})}let e=this.#s().rows;this.#L=e.map(e=>e.node.item.key),this.#B.clear();for(let n of e)this.#B.set(n.node.item.key,n);this.#W=!0}updated(e){if(this.#Q=void 0,this.#w(),this.#g){this.#g=!1,this.#ve();return}if(this.#ee(),e.has(`root`)&&this.root&&(this.#tt(),this.#Fe(),this.tickled.clearTickled(),this._focusedDepth=0,this.#he(),this.#H.clear(),this.#V.clear()),e.has(`model`)){this.#N?.(),this.#N=void 0;let e=this.model;e&&(this.root=e.root,this.#N=e._subscribe(e=>{e.type===`root`?(this.root=e.root,this.requestUpdate()):e.type===`invalidate`&&this._expandedKeys.has(e.key)&&(this.#e(Eb(this._expandedKeys,e.key)),this.requestUpdate())}))}e.has(`interactionMode`)&&(this.#P=void 0,this.clearSelection()),e.has(`selectedNode`)&&this.selectedNode&&e.get(`selectedNode`)!==this.selectedNode&&this.tickled.setTickled(this.selectedNode.item.key),this.#_()?(this.#L=[],this.#B.clear(),this.#y()&&queueMicrotask(()=>this.requestUpdate()),this.#ve()):this.#_e()}#ve(){this.search.isOpen&&this.search.repaintHighlights()}connectedCallback(){super.connectedCallback(),this.setAttribute(`data-input-mode`,`mouse`);let e=this.#F=Jt();e.register({id:`select-all`,label:`Select All`,description:`Select all visible items`,execute:()=>this.selectAll()}),e.register({id:`deselect-all`,label:`Deselect All`,description:`Clear all selection`,execute:()=>this.deselectAll()}),this.registry=e,this.#A(),this.#ye()}#ye(){this.#G=mb(),this.#Y=new Yn(this,{source:`tree-list`,isEnabled:()=>this.itemDnd!==`none`&&this.#je(),resolveEventToKey:e=>{if(e instanceof Element)return e.closest(`ul.tree-list li[data-key]`)?.getAttribute(`data-key`)??void 0},prepareSelection:e=>{let n=this.#s(),r=n.rows,i=n.indexByKey.get(e),a=i===void 0?void 0:r[i];if(!a)return;let o=new Set(this._selectedNodes);o.has(a.node)||o.clear(),o.add(a.node);let s=r.filter(e=>o.has(e.node)).map(e=>e.node.item.key),c=new Set(this.root?yg(this.root,s):s),l=r.filter(e=>c.has(e.node.item.key)).map((e,n)=>({key:e.node.item.key,index:n,item:e.node,element:this.shadowRoot?.querySelector(`ul.tree-list li[data-key="${CSS.escape(e.node.item.key)}"]`)??void 0})),u=l.find(n=>n.key===e)??{key:e,index:0,item:a.node,element:void 0};return l.some(e=>e.key===u.key)||l.unshift(u),{origin:u,selected:l}},getMetrics:()=>({rowHeight:this.#Se()}),getRenderer:()=>this.dragPreviewRenderer,getDragPreviewSourceResolver:()=>this.dragPreviewSource,dispatch:e=>{let n=e.selected.map(e=>e.key),r=e.selected.map(e=>e.item),i=new CustomEvent(`list-native-drag-start`,{detail:e,bubbles:!0,composed:!0,cancelable:!0}),a=this.dispatchEvent(i);return a&&(this.#X=new Set(n),this.#Z=!1,(this.itemDnd===`internal`||this.itemDnd===`both`)&&hb(this.#G,this,r,n),this.dispatchEvent(new CustomEvent(`tree-drag-start`,{detail:{nodes:r,keys:n},bubbles:!0,composed:!0}))),a},writeDataTransfer:(e,n)=>{if(this.itemDnd!==`internal`&&this.itemDnd!==`both`)return;let r=n.selected.map(e=>e.key),i=n.selected.map(e=>e.item);try{e.setData(lb,JSON.stringify({sourceId:this.#G,keys:r,nodes:i})),e.setData(`text/plain`,i.map(e=>e.item.label).join(`
|
|
7760
|
+
`))}catch{}},onActiveChange:e=>{this.toggleAttribute(`data-native-dragging`,e),e||(this.#X=new Set),this.requestUpdate()},onEnd:()=>{gb(this.#G),this.#X=new Set,this.#K=setTimeout(()=>{this.#K=void 0},150),this.#Z||this.dispatchEvent(new CustomEvent(`tree-drag-end`,{detail:{dropped:!1},bubbles:!0,composed:!0})),this.#Z=!1}}),this.#J=new yb(this,{getDndMode:()=>this.itemDnd,getExpandHoverMs:()=>this.dndExpandHoverMs,getVisibleRows:()=>this.#Te(),getRowInfo:e=>{let n=this.#s(),r=n.indexByKey.get(e);if(r===void 0)return;let{node:i,depth:a,parentKey:o}=n.rows[r];return{node:i,depth:a,parentKey:o}},getChildren:e=>this.#Ce(e),getIndentPx:()=>this.#xe(),getScrollContainer:()=>this.#be(),isSelfOrDescendant:(e,n)=>this.#De(e,n),isExpanded:e=>this._expandedKeys.has(e),isReorderAllowed:()=>this.reorderable,getParentKey:e=>this.#Oe(e)?.item.key,resolveDrag:(e,n)=>this.#Ae(e,n),vet:e=>{if(this.canDrop&&!this.canDrop(e))return!1;let n=new CustomEvent(`tree-drag-over`,{detail:e,bubbles:!0,composed:!0,cancelable:!0});return this.dispatchEvent(n)},expandKey:e=>this.#Ee(e),onDropStateChange:e=>{this.#q=e,this.toggleAttribute(`data-drop-rejected`,this.#J.isDragging&&e===void 0),this.requestUpdate()},onActiveChange:e=>{e?(this.#Q=void 0,this.#be()?.addEventListener(`scroll`,this.#$,{passive:!0})):(this.#be()?.removeEventListener(`scroll`,this.#$),this.#Q=void 0,this.toggleAttribute(`data-drop-rejected`,!1)),this.requestUpdate()},commitDrop:e=>this.dispatchEvent(new CustomEvent(`tree-drop`,{detail:e,bubbles:!0,composed:!0,cancelable:!0}))?(this.applyInternalDrop&&e.source===`internal`&&this.model&&this.model.applyDrop({source:`internal`,draggedKeys:e.draggedKeys,target:e.target}),this.#Z=!0,!0):!1,onDragEnd:e=>{this.#q=void 0,this.toggleAttribute(`data-drop-rejected`,!1),this.requestUpdate(),this.dispatchEvent(new CustomEvent(`tree-drag-end`,{detail:{dropped:e},bubbles:!0,composed:!0}))}})}#be(){return this.shadowRoot?.querySelector(`#container`)??void 0}#xe(){let e=Number.parseInt(getComputedStyle(this).getPropertyValue(`--tree-indent`),10);return Number.isNaN(e)?20:e}#Se(){let e=Number.parseInt(getComputedStyle(this).getPropertyValue(`--tree-item-height`),10);return Number.isNaN(e)?30:e}#Ce(e){if(e===void 0)return this.root?.children??[];let n=this.#s(),r=n.indexByKey.get(e);return r===void 0?[]:n.rows[r].node.children??[]}#we(e,n,r){let i=this.#s(),a=this.#v(i.rows.length),o=Lb(Fb(a),e.scrollTop,e.scrollTop+e.clientHeight,1);if(!o)return;let s=e.getBoundingClientRect(),c=n.querySelector(`li.item`)?.getBoundingClientRect()??s;for(let n=o.first;n<=o.last;n++){let{node:o,depth:l}=i.rows[n],u=s.top-e.scrollTop+kb(a,n),d={x:c.left,y:u,left:c.left,right:c.left+c.width,top:u,bottom:u+a.rowHeight,width:c.width,height:a.rowHeight,toJSON:()=>({})};r.push({key:o.item.key,node:o,depth:l,index:n,rect:d})}}#Te(){if(this.#Q)return this.#Q;let e=[],n=this.#be(),r=this.renderRoot.querySelector(`ul.tree-list`),i=this.#R;if(n&&r&&this.#_())this.#we(n,r,e);else if(n&&r&&r.children.length===i.length){let a=this.#s(),o=r.children,s=Lb(this.#ne(o),n.scrollTop,n.scrollTop+n.clientHeight,1);if(s)for(let n=s.first;n<=s.last;n++){let r=o[n];if(r.classList.contains(`leaving`))continue;let s=a.indexByKey.get(i[n]);if(s===void 0)continue;let{node:c,depth:l}=a.rows[s];e.push({key:c.item.key,node:c,depth:l,index:s,rect:r.getBoundingClientRect()})}}return this.#Q=e,e}#Ee(e){if(this._expandedKeys.has(e))return;let n=this.#s(),r=n.indexByKey.get(e),i=r===void 0?void 0:n.rows[r];!i||i.node.item.isLeaf===!0||(this.#Ke(i.node,i.depth),this.#Q=void 0,this.requestUpdate())}#De(e,n){if(e===n)return!0;let{parentByKey:r}=this.#c(),i=r.get(n);for(;i!==void 0;){if(i===e)return!0;i=r.get(i)}return!1}#Oe(e){let n=this.#c().parentByKey.get(e);if(n!==void 0&&n!==this.root?.item.key)return this.#ke(n)}#ke(e){let n=this.#s(),r=n.indexByKey.get(e);if(r!==void 0)return n.rows[r].node;let{parentByKey:i}=this.#c(),a=[];for(let n=e;n!==void 0&&n!==this.root?.item.key;n=i.get(n))a.unshift(n);let o=this.root;for(let e of a)o=o?.children?.find(n=>n.item.key===e);return o}#Ae(e,n){let r=this.itemDnd;if(r===`none`)return;let i=r===`internal`||r===`both`,a=r===`external`||r===`both`,o=[];try{o=Array.from(e.types)}catch{}let s=_b(),c=o.includes(lb)||s!==void 0;if(i&&c){if(s&&s.keys.length>0){let e=this.root?yg(this.root,s.keys):s.keys;return{source:`internal`,keys:e,nodes:e.map(e=>this.#ke(e)).filter(e=>e!==void 0)}}if(n===`drop`)try{let n=e.getData(lb);if(n){let e=JSON.parse(n);return{source:`internal`,keys:e.keys??[],nodes:e.nodes??[]}}}catch{}return{source:`internal`,keys:[],nodes:[]}}if(a&&!c){if(this.acceptDropTypes!==void 0){let n=this.acceptDropTypes.trim().split(/\s+/).filter(Boolean),r=Array.from(e.types);if(n.length>0&&!n.some(e=>r.includes(e)))return}if(n===`drop`){let n=this.parseExternalDrop?.(e);return!n||n.length===0?void 0:{source:`external`,keys:n.map(e=>e.item.key),nodes:n}}return this.parseExternalDrop?{source:`external`,keys:[],nodes:[]}:void 0}}#je(){if(this.itemDnd===`none`)return!1;let e=this.#s().rows;return e.length===0?!1:!this.canDrag||e.some(({node:e})=>this.canDrag({nodes:[e],keys:[e.item.key]}))}disconnectedCallback(){super.disconnectedCallback(),this.#he(),this.#H.clear(),this.#V.clear(),this.#N?.(),this.#N=void 0,this.#O?.(),this.#O=void 0,this.#K!==void 0&&(clearTimeout(this.#K),this.#K=void 0),this.#be()?.removeEventListener(`scroll`,this.#$),this.#T(),this.#pe&&=(this.#fe?.removeEventListener(`scroll`,this.#te),this.#fe=void 0,!1),this.#de!==0&&(cancelAnimationFrame(this.#de),this.#de=0),gb(this.#G),this.#F&&(this.#F.unregister(`select-all`),this.#F.unregister(`deselect-all`),this.#F=void 0,this.registry=void 0)}getConfig(){return{...this.#I}}setConfig(e){this.#I={...this.#I,...e},this.requestUpdate()}select(e){if(!this.#Pe(e))return;let n=new Set(this._selectedNodes);this._selectedNodes.clear(),this._selectedNodes.add(e),this.selectedNode=e,this.#Re(n),this.requestUpdate()}deselect(e){if(!this._selectedNodes.has(e))return;let n=new Set(this._selectedNodes);this._selectedNodes.delete(e),this.selectedNode===e&&(this.selectedNode=[...this._selectedNodes].at(-1)),this.#Re(n),this.requestUpdate()}clearSelection(){if(this._selectedNodes.size===0)return;let e=new Set(this._selectedNodes);this.#Fe(),this.#Re(e),this.requestUpdate()}selectAll(){let e=new Set(this._selectedNodes);if(this.interactionMode===`checked`)for(let{node:e}of this.#s().rows)this.#Pe(e)&&this.#Je(e,!0);else{for(let{node:e}of this.#s().rows)this.#Pe(e)&&this._selectedNodes.add(e);this.selectedNode=[...this._selectedNodes].at(-1)}this.#Re(e),this.requestUpdate()}deselectAll(){let e=new Set(this._selectedNodes);if(this.interactionMode===`checked`)for(let{node:e}of this.#s().rows)this.#Pe(e)&&this.#Je(e,!1);else this.#Fe();this.#Re(e),this.requestUpdate()}expandAll(e){this.#Me(!0,e)}collapseAll(e){this.#Me(!1,e)}#Me(e,n){let r=this.root;if(!r)return;let i=r=>e?r<(n??1/0):r>=(n??0),a=[],o=this._expandedKeys,s=(n,r)=>{let c=n.children;if(n.item.isLeaf!==!0&&c!==void 0&&c.length>0&&i(r)){let i=o.has(n.item.key);e&&!i?(o=Tb(o,n.item.key),this._isExpanded(n,r)||a.push({node:n,depth:r})):!e&&i&&(o=Eb(o,n.item.key),a.push({node:n,depth:r}))}for(let e of c??[])s(e,r+1)};for(let e of r.children??[])s(e,0);if(o===this._expandedKeys)return;this.#e(o);let c=e?`expand`:`collapse`;for(let{node:e,depth:n}of a)this.dispatchEvent(new CustomEvent(c,{detail:{node:e,depth:n},bubbles:!0,composed:!0}));this.requestUpdate()}navigateTo(e,n={}){if(!this.root?.children)return!1;let r=this.#Ie,i=this.#Le;this.#Ie=`programmatic`,this.#Le=n.silent===!0;try{return this.#Ne(e,n.reveal??`edge`)}finally{this.#Ie=r,this.#Le=i}}#Ne(e,n){this.#tt(),this.#Fe(),this.tickled.clearTickled(),this._focusedDepth=0;let r=this.root;for(let n of e){let i=r?.children;if(!i)return!1;let a=i.find(e=>e.item.key===n);if(!a)return!1;this.#nt(a.item.key),this.#e(Tb(this._expandedKeys,a.item.key)),n===e.at(-1)&&(this.select(a),this.tickled.setTickled(a.item.key)),r=a}return this.#ue=!0,this.requestUpdate(),this.#Qe(e.at(-1),n),!0}navigateToNode(e){if(!this.root?.children)return!1;let n=this.#ze(this.root.children,e);return n?this.navigateTo(n):!1}revealKey(e){if(!this.root?.children)return!1;let n=this.#ze(this.root.children,n=>n.item.key===e);if(!n)return!1;for(let e=0;e<n.length-1;e++)this.#nt(n[e]),this.#e(Tb(this._expandedKeys,n[e]));return this.tickled.setTickled(e),this.#ue=!0,this.requestUpdate(),this.updateComplete.then(()=>this.#Qe(e)),!0}selectMany(e){let n=new Set(this._selectedNodes);this._selectedNodes=new Set([...e].filter(e=>this.#Pe(e))),this.selectedNode=[...this._selectedNodes].at(-1),this.#Re(n),this.requestUpdate()}getNodes(){if(!this.root?.children)return[];let e=[],n=(r,i)=>{if(e.push({node:r,depth:i}),r.children)for(let e of r.children)n(e,i+1)};for(let e of this.root.children)n(e,0);return e}#Pe(e){return e.item.selectable===!1||this.selectionFilter===`none`?!1:this.selectionFilter===`leaf`?e.item.isLeaf===!0||e.item.isLeaf!==!1&&e.children?.length===0:this.selectionFilter!==`branch`||e.item.isLeaf===!1||e.children!==void 0&&e.children.length>0}#Fe(){this._selectionVersion++,this._selectedNodes.clear(),this.selectedNode=void 0}#Ie;#Le;#Re(e){if(this._selectionVersion++,this.#Le)return;let n={selected:new Set(this._selectedNodes),previous:e,origin:this.#Ie};this.dispatchEvent(new CustomEvent(`select`,{detail:n,bubbles:!0,composed:!0}))}#ze(e,n,r=[]){for(let i of e){let e=[...r,i.item.key];if(n(i))return e;if(i.children?.length){let r=this.#ze(i.children,n,e);if(r)return r}}}renderNodeContent(e,n){let r=e.item.isLeaf!==!0,o=this._isExpanded(e,n);return i`
|
|
7758
7761
|
<span class="tree-caret">
|
|
7759
7762
|
${r?i`<ixfx-icon class="caret-icon" name="chevron-down" .rotate=${o?a:`-90deg`}></ixfx-icon>`:``}
|
|
7760
7763
|
</span>
|
|
7761
7764
|
<span class="tree-label">${e.item.label}</span>
|
|
7762
|
-
`}_handleItemClick(e,n,r){if(!(this.#J?.isDragging||this.#Y?.isDragging||this.#K!==void 0)&&!(r&&r.detail>=2)){switch(this.#j&&this._expandedKeys.has(this.#j.item.key)&&this.#tt(),this.tickled.handlePointerEnter(e.item.key),this._focusedDepth=n,this.dispatchEvent(new CustomEvent(`item-click`,{detail:{node:e,depth:n},bubbles:!0,composed:!0})),this.interactionMode){case`implicit`:this.#Ve(e,n,r);break;case`standard`:this.#He(e,n,r);break;case`vscode`:this.#He(e,n,r);break;case`manual`:this.#We(e,n,r);break;case`checked`:this.#Ue(e,n)}this.requestUpdate()}}#Be(e,n){if(e.item.isLeaf===!0)return!1;let r=n?.target;return r instanceof Element&&r.closest(`.tree-caret`)!==null}#Ve(e,n,r){if(!this.#Be(e,r)&&this.#Pe(e)){let n=new Set(this._selectedNodes);this._selectedNodes.clear(),this._selectedNodes.add(e),this.selectedNode=e,(!n.has(e)||n.size!==1)&&this.#Re(n)}this.#Ke(e,n)}#He(e,n,r){let i=r?r.metaKey||r.ctrlKey:!1,a=r?r.shiftKey:!1;if(i){if(this.#Pe(e)){let n=new Set(this._selectedNodes);this._selectedNodes.has(e)?(this._selectedNodes.delete(e),this.selectedNode===e&&(this.selectedNode=[...this._selectedNodes].at(-1))):(this._selectedNodes.add(e),this.selectedNode=e,this.#P={node:e,flatIndex:this.#Ye(e)}),this.#Re(n)}return}if(a&&this.#P){let n=this.#s(),r=n.rows,i=n.indexByKey.get(this.#P.node.item.key)??-1,a=n.indexByKey.get(e.item.key)??-1;if(i>=0&&a>=0){let n=new Set(this._selectedNodes),o=Math.min(i,a),s=Math.max(i,a),c=r.slice(o,s+1).map(e=>e.node).filter(e=>this.#Pe(e));this._selectedNodes=new Set(c),this.selectedNode=e,this.#Re(n)}return}if(!this.#Be(e,r)&&this.#Pe(e)){let n=new Set(this._selectedNodes);this._selectedNodes.clear(),this._selectedNodes.add(e),this.selectedNode=e,this.#P={node:e,flatIndex:this.#Ye(e)},(!n.has(e)||n.size!==1)&&this.#Re(n)}this.#Ke(e,n)}#Ue(e,n){this.#Ke(e,n)}#We(e,n,r){let i=r?r.metaKey||r.ctrlKey:!1,a=r?r.shiftKey:!1;if(i){if(this.#Pe(e)){let n=new Set(this._selectedNodes);this._selectedNodes.has(e)?(this._selectedNodes.delete(e),this.selectedNode===e&&(this.selectedNode=[...this._selectedNodes].at(-1))):(this._selectedNodes.add(e),this.selectedNode=e,this.#P={node:e,flatIndex:this.#Ye(e)}),this.#Re(n)}return}if(a&&this.#P){let n=this.#s(),r=n.rows,i=n.indexByKey.get(this.#P.node.item.key)??-1,a=n.indexByKey.get(e.item.key)??-1;if(i>=0&&a>=0){let n=new Set(this._selectedNodes),o=Math.min(i,a),s=Math.max(i,a),c=r.slice(o,s+1).map(e=>e.node).filter(e=>this.#Pe(e));this._selectedNodes=new Set(c),this.selectedNode=e,this.#Re(n)}return}this.#Ke(e,n)}#Ge(e,n){if(!this.#Pe(e))return;let r=new Set(this._selectedNodes);this._selectedNodes.has(e)?(this._selectedNodes.delete(e),this.selectedNode===e&&(this.selectedNode=[...this._selectedNodes].at(-1))):(this._selectedNodes.add(e),this.selectedNode=e,this.#P={node:e,flatIndex:this.#Ye(e)}),this.#Re(r)}_handleCheckboxClick(e,n,r){e.stopPropagation();let i=new Set(this._selectedNodes),a=this.#qe(n);this.#Je(n,!a),(this.selectedNode===void 0||!this._selectedNodes.has(this.selectedNode))&&(this.selectedNode=[...this._selectedNodes].at(-1)),this.#Re(i),this.requestUpdate()}#Ke(e,n){let r=this._expandedKeys.has(e.item.key);if(this.#ue=!0,r)this.#e(Eb(this._expandedKeys,e.item.key)),this.dispatchEvent(new CustomEvent(`collapse`,{detail:{node:e,depth:n},bubbles:!0,composed:!0}));else if(e.children===void 0){if(e.item.isLeaf!==!1)return;if(this.model??(this.loadChildren?this:void 0)){this.#j=e;let r=new AbortController;this.#M=r,this.#Ze(e,n,r).catch(()=>{})}}else this.#nt(e.item.key),this.#e(Tb(this._expandedKeys,e.item.key)),this.dispatchEvent(new CustomEvent(`expand`,{detail:{node:e,depth:n},bubbles:!0,composed:!0}))}#qe(e){let n=[],r=e=>{this.#Pe(e)&&n.push(e),e.children?.forEach(r)};return r(e),n.length>0&&n.every(e=>this._selectedNodes.has(e))}#Je(e,n){if(this.#Pe(e)&&(n?this._selectedNodes.add(e):this._selectedNodes.delete(e)),e.children)for(let r of e.children)this.#Je(r,n)}#Ye(e){return this.#s().indexByKey.get(e.item.key)??-1}#Xe(e,n,r){if(!this.#P){let r=e[n]?.node;r&&(this.#P={node:r,flatIndex:n})}if(!this.#P)return;let i=this.#s().indexByKey.get(this.#P.node.item.key)??-1;if(i<0)return;let a=Math.min(i,r),o=Math.max(i,r);if(this.interactionMode===`vscode`){this.#P.selectionSnapshot||(this.#P={...this.#P,selectionSnapshot:new Set(this._selectedNodes)});let n=this.#P.selectionSnapshot,i=e.slice(a,o+1).map(e=>e.node).filter(e=>this.#Pe(e)),s=new Set(n);for(let e of i)n.has(e)?s.delete(e):s.add(e);let c=new Set(this._selectedNodes);this._selectedNodes=s,this.selectedNode=e[r]?.node??this.selectedNode,this.#Re(c)}else{let n=new Set(this._selectedNodes),i=e.slice(a,o+1).map(e=>e.node).filter(e=>this.#Pe(e));this._selectedNodes=new Set(i),this.selectedNode=e[r]?.node??this.selectedNode,this.#Re(n)}}async#Ze(e,n,r){try{let i;if(i=this.model?await this.model.getChildren(e,n,r.signal):[...await dg(this.loadChildren({node:e,depth:n},r.signal),r.signal)],r.signal.aborted)return;e.children=i,this.#i++,this.#nt(e.item.key),this.#e(Tb(this._expandedKeys,e.item.key)),this.#t=void 0,this.#ue=!0,this.#j=void 0,this.#M=void 0,this.dispatchEvent(new CustomEvent(`expand`,{detail:{node:e,depth:n},bubbles:!0,composed:!0})),this.requestUpdate()}catch{if(r.signal.aborted)return;e.children=[],this.#i++,this.#t=void 0,this.#j=void 0,this.#M=void 0,this.requestUpdate()}}_isSelected(e){return this._selectedNodes.has(e)}_isFocused(e){return this.tickled.isTickled(e.item.key)}_isExpanded(e,n=0){return this._expandedKeys.has(e.item.key)?!0:this.#D()?.autoExpanded.has(e.item.key)??!1}get _pendingNode(){return this.#j}#Qe(e,n=`edge`){if(n===`center-if-hidden`){this.updateComplete.then(()=>{this.#y();let r=this.#s().indexByKey.get(e);r!==void 0&&this.#E(r,n)});return}if(this.#_()){this.updateComplete.then(()=>{let n=this.#s().indexByKey.get(e);n!==void 0&&this.#E(n)});return}let r=++this.#$e;requestAnimationFrame(()=>{this.#et(e);let n=this.#be()?.getAnimations?.({subtree:!0})??[];n.length>0&&Promise.allSettled(n.map(e=>e.finished)).then(()=>{r===this.#$e&&this.#et(e)})})}#$e;#et(e){let n=this.#be(),r=this.shadowRoot?.querySelector(`ul.tree-list [data-key="${CSS.escape(e)}"]`);if(!r||!n)return;let i=r.getBoundingClientRect(),a=n.getBoundingClientRect(),o=i.top-a.top,s=o+i.height,c=this.renderRoot.querySelector(`.sticky-headers`)?.getBoundingClientRect().height??0;o<c?n.scrollTop+=o-c:s>n.clientHeight&&(n.scrollTop+=s-n.clientHeight)}#tt(){this.#M&&(this.#M.abort(),this.#M=void 0,this.#j=void 0)}#nt(e){if(this.exclusivity!==`none`){if(this.exclusivity===`depth`)this.#rt(e);else if(this.exclusivity===`global`){let n=this.#it(e);this.#e(Db(this._expandedKeys,r=>!n.has(r)&&r!==e))}}}#rt(e){if(!this.root)return;let n=this.#at(this.root,e);if(!n?.children)return;let r=new Set(n.children.map(e=>e.item.key));this.#e(Db(this._expandedKeys,n=>n!==e&&r.has(n)))}#it(e){let n=new Set,r=i=>{if(i.item.key===e)return!0;if(!i.children)return!1;for(let e of i.children)if(r(e))return n.add(i.item.key),!0;return!1};return this.root&&r(this.root),n}#at(e,n,r=void 0){if(e.children)for(let i of e.children){if(i.item.key===n)return r??e;let a=this.#at(i,n,i);if(a)return a}}#ot(){let e=this.tickled.tickledId;return e?this.#s().indexByKey.get(e)??0:0}#st(e){let n=this.#s().rows;if(e<0||e>=n.length)return;let{node:r,depth:i}=n[e];if(this.tickled.setTickled(r.item.key),this._focusedDepth=i,this.dispatchEvent(new CustomEvent(`tickle`,{detail:{node:r,depth:i},bubbles:!0,composed:!0})),this.requestUpdate(),this.#_()){this.#E(e);return}this.updateComplete.then(()=>this.#ct())}#ct(){let e=this.tickled.tickledId;e!==void 0&&(this.shadowRoot?.querySelector(`ul.tree-list [data-key="${CSS.escape(e)}"]`))?.scrollIntoView({block:`nearest`,behavior:`smooth`})}#lt(){return this.#y(),Pb(this.#v(this.#s().rows.length))}#ut(e,n,r,i){this.interactionMode===`implicit`&&this.select(e[r].node),this.#st(r),i&&(this.interactionMode===`standard`||this.interactionMode===`vscode`)?this.#Xe(e,n,r):this.interactionMode===`vscode`&&(this.#P=void 0),this.requestUpdate()}#dt;renderLoadingIndicator(){return i`<span class="loading-spinner"></span>`}render(){let e=this.#s().rows;return i`
|
|
7765
|
+
`}_handleItemClick(e,n,r){if(!(this.#J?.isDragging||this.#Y?.isDragging||this.#K!==void 0)&&!(r&&r.detail>=2)){if(this.interactionMode===`checked`&&e.item.selectable!==!1&&r&&!(r.target instanceof Element&&r.target.closest(`.tree-label`))){this._handleCheckboxClick(r,e,n);return}switch(this.#j&&this._expandedKeys.has(this.#j.item.key)&&this.#tt(),this.tickled.handlePointerEnter(e.item.key),this._focusedDepth=n,this.dispatchEvent(new CustomEvent(`item-click`,{detail:{node:e,depth:n},bubbles:!0,composed:!0})),this.interactionMode){case`implicit`:this.#Ve(e,n,r);break;case`standard`:this.#He(e,n,r);break;case`vscode`:this.#He(e,n,r);break;case`manual`:this.#We(e,n,r);break;case`checked`:this.#Ue(e,n)}this.requestUpdate()}}#Be(e,n){if(e.item.isLeaf===!0)return!1;let r=n?.target;return r instanceof Element&&r.closest(`.tree-caret`)!==null}#Ve(e,n,r){if(!this.#Be(e,r)&&this.#Pe(e)){let n=new Set(this._selectedNodes);this._selectedNodes.clear(),this._selectedNodes.add(e),this.selectedNode=e,(!n.has(e)||n.size!==1)&&this.#Re(n)}this.#Ke(e,n)}#He(e,n,r){let i=r?r.metaKey||r.ctrlKey:!1,a=r?r.shiftKey:!1;if(i){if(this.#Pe(e)){let n=new Set(this._selectedNodes);this._selectedNodes.has(e)?(this._selectedNodes.delete(e),this.selectedNode===e&&(this.selectedNode=[...this._selectedNodes].at(-1))):(this._selectedNodes.add(e),this.selectedNode=e,this.#P={node:e,flatIndex:this.#Ye(e)}),this.#Re(n)}return}if(a&&this.#P){let n=this.#s(),r=n.rows,i=n.indexByKey.get(this.#P.node.item.key)??-1,a=n.indexByKey.get(e.item.key)??-1;if(i>=0&&a>=0){let n=new Set(this._selectedNodes),o=Math.min(i,a),s=Math.max(i,a),c=r.slice(o,s+1).map(e=>e.node).filter(e=>this.#Pe(e));this._selectedNodes=new Set(c),this.selectedNode=e,this.#Re(n)}return}if(!this.#Be(e,r)&&this.#Pe(e)){let n=new Set(this._selectedNodes);this._selectedNodes.clear(),this._selectedNodes.add(e),this.selectedNode=e,this.#P={node:e,flatIndex:this.#Ye(e)},(!n.has(e)||n.size!==1)&&this.#Re(n)}this.#Ke(e,n)}#Ue(e,n){this.#Ke(e,n)}#We(e,n,r){let i=r?r.metaKey||r.ctrlKey:!1,a=r?r.shiftKey:!1;if(i){if(this.#Pe(e)){let n=new Set(this._selectedNodes);this._selectedNodes.has(e)?(this._selectedNodes.delete(e),this.selectedNode===e&&(this.selectedNode=[...this._selectedNodes].at(-1))):(this._selectedNodes.add(e),this.selectedNode=e,this.#P={node:e,flatIndex:this.#Ye(e)}),this.#Re(n)}return}if(a&&this.#P){let n=this.#s(),r=n.rows,i=n.indexByKey.get(this.#P.node.item.key)??-1,a=n.indexByKey.get(e.item.key)??-1;if(i>=0&&a>=0){let n=new Set(this._selectedNodes),o=Math.min(i,a),s=Math.max(i,a),c=r.slice(o,s+1).map(e=>e.node).filter(e=>this.#Pe(e));this._selectedNodes=new Set(c),this.selectedNode=e,this.#Re(n)}return}this.#Ke(e,n)}#Ge(e,n){if(!this.#Pe(e))return;let r=new Set(this._selectedNodes);this._selectedNodes.has(e)?(this._selectedNodes.delete(e),this.selectedNode===e&&(this.selectedNode=[...this._selectedNodes].at(-1))):(this._selectedNodes.add(e),this.selectedNode=e,this.#P={node:e,flatIndex:this.#Ye(e)}),this.#Re(r)}_handleCheckboxClick(e,n,r){e.stopPropagation();let i=new Set(this._selectedNodes),a=this.#qe(n);this.#Je(n,!a),(this.selectedNode===void 0||!this._selectedNodes.has(this.selectedNode))&&(this.selectedNode=[...this._selectedNodes].at(-1)),this.#Re(i),this.requestUpdate()}#Ke(e,n){let r=this._expandedKeys.has(e.item.key);if(this.#ue=!0,r)this.#e(Eb(this._expandedKeys,e.item.key)),this.dispatchEvent(new CustomEvent(`collapse`,{detail:{node:e,depth:n},bubbles:!0,composed:!0}));else if(e.children===void 0){if(e.item.isLeaf!==!1)return;if(this.model??(this.loadChildren?this:void 0)){this.#j=e;let r=new AbortController;this.#M=r,this.#Ze(e,n,r).catch(()=>{})}}else this.#nt(e.item.key),this.#e(Tb(this._expandedKeys,e.item.key)),this.dispatchEvent(new CustomEvent(`expand`,{detail:{node:e,depth:n},bubbles:!0,composed:!0}))}#qe(e){let n=[],r=e=>{this.#Pe(e)&&n.push(e),e.children?.forEach(r)};return r(e),n.length>0&&n.every(e=>this._selectedNodes.has(e))}#Je(e,n){if(this.#Pe(e)&&(n?this._selectedNodes.add(e):this._selectedNodes.delete(e)),e.children)for(let r of e.children)this.#Je(r,n)}#Ye(e){return this.#s().indexByKey.get(e.item.key)??-1}#Xe(e,n,r){if(!this.#P){let r=e[n]?.node;r&&(this.#P={node:r,flatIndex:n})}if(!this.#P)return;let i=this.#s().indexByKey.get(this.#P.node.item.key)??-1;if(i<0)return;let a=Math.min(i,r),o=Math.max(i,r);if(this.interactionMode===`vscode`){this.#P.selectionSnapshot||(this.#P={...this.#P,selectionSnapshot:new Set(this._selectedNodes)});let n=this.#P.selectionSnapshot,i=e.slice(a,o+1).map(e=>e.node).filter(e=>this.#Pe(e)),s=new Set(n);for(let e of i)n.has(e)?s.delete(e):s.add(e);let c=new Set(this._selectedNodes);this._selectedNodes=s,this.selectedNode=e[r]?.node??this.selectedNode,this.#Re(c)}else{let n=new Set(this._selectedNodes),i=e.slice(a,o+1).map(e=>e.node).filter(e=>this.#Pe(e));this._selectedNodes=new Set(i),this.selectedNode=e[r]?.node??this.selectedNode,this.#Re(n)}}async#Ze(e,n,r){try{let i;if(i=this.model?await this.model.getChildren(e,n,r.signal):[...await dg(this.loadChildren({node:e,depth:n},r.signal),r.signal)],r.signal.aborted)return;e.children=i,this.#i++,this.#nt(e.item.key),this.#e(Tb(this._expandedKeys,e.item.key)),this.#t=void 0,this.#ue=!0,this.#j=void 0,this.#M=void 0,this.dispatchEvent(new CustomEvent(`expand`,{detail:{node:e,depth:n},bubbles:!0,composed:!0})),this.requestUpdate()}catch{if(r.signal.aborted)return;e.children=[],this.#i++,this.#t=void 0,this.#j=void 0,this.#M=void 0,this.requestUpdate()}}_isSelected(e){return this._selectedNodes.has(e)}_isFocused(e){return this.tickled.isTickled(e.item.key)}_isExpanded(e,n=0){return this._expandedKeys.has(e.item.key)?!0:this.#D()?.autoExpanded.has(e.item.key)??!1}get _pendingNode(){return this.#j}#Qe(e,n=`edge`){if(n===`center-if-hidden`){this.updateComplete.then(()=>{this.#y();let r=this.#s().indexByKey.get(e);r!==void 0&&this.#E(r,n)});return}if(this.#_()){this.updateComplete.then(()=>{let n=this.#s().indexByKey.get(e);n!==void 0&&this.#E(n)});return}let r=++this.#$e;requestAnimationFrame(()=>{this.#et(e);let n=this.#be()?.getAnimations?.({subtree:!0})??[];n.length>0&&Promise.allSettled(n.map(e=>e.finished)).then(()=>{r===this.#$e&&this.#et(e)})})}#$e;#et(e){let n=this.#be(),r=this.shadowRoot?.querySelector(`ul.tree-list [data-key="${CSS.escape(e)}"]`);if(!r||!n)return;let i=r.getBoundingClientRect(),a=n.getBoundingClientRect(),o=i.top-a.top,s=o+i.height,c=this.renderRoot.querySelector(`.sticky-headers`)?.getBoundingClientRect().height??0;o<c?n.scrollTop+=o-c:s>n.clientHeight&&(n.scrollTop+=s-n.clientHeight)}#tt(){this.#M&&(this.#M.abort(),this.#M=void 0,this.#j=void 0)}#nt(e){if(this.exclusivity!==`none`){if(this.exclusivity===`depth`)this.#rt(e);else if(this.exclusivity===`global`){let n=this.#it(e);this.#e(Db(this._expandedKeys,r=>!n.has(r)&&r!==e))}}}#rt(e){if(!this.root)return;let n=this.#at(this.root,e);if(!n?.children)return;let r=new Set(n.children.map(e=>e.item.key));this.#e(Db(this._expandedKeys,n=>n!==e&&r.has(n)))}#it(e){let n=new Set,r=i=>{if(i.item.key===e)return!0;if(!i.children)return!1;for(let e of i.children)if(r(e))return n.add(i.item.key),!0;return!1};return this.root&&r(this.root),n}#at(e,n,r=void 0){if(e.children)for(let i of e.children){if(i.item.key===n)return r??e;let a=this.#at(i,n,i);if(a)return a}}#ot(){let e=this.tickled.tickledId;return e?this.#s().indexByKey.get(e)??0:0}#st(e){let n=this.#s().rows;if(e<0||e>=n.length)return;let{node:r,depth:i}=n[e];if(this.tickled.setTickled(r.item.key),this._focusedDepth=i,this.dispatchEvent(new CustomEvent(`tickle`,{detail:{node:r,depth:i},bubbles:!0,composed:!0})),this.requestUpdate(),this.#_()){this.#E(e);return}this.updateComplete.then(()=>this.#ct())}#ct(){let e=this.tickled.tickledId;e!==void 0&&(this.shadowRoot?.querySelector(`ul.tree-list [data-key="${CSS.escape(e)}"]`))?.scrollIntoView({block:`nearest`,behavior:`smooth`})}#lt(){return this.#y(),Pb(this.#v(this.#s().rows.length))}#ut(e,n,r,i){this.interactionMode===`implicit`&&this.select(e[r].node),this.#st(r),i&&(this.interactionMode===`standard`||this.interactionMode===`vscode`)?this.#Xe(e,n,r):this.interactionMode===`vscode`&&(this.#P=void 0),this.requestUpdate()}#dt;renderLoadingIndicator(){return i`<span class="loading-spinner"></span>`}render(){let e=this.#s().rows;return i`
|
|
7763
7766
|
<div
|
|
7764
7767
|
id="container"
|
|
7765
7768
|
data-input-mode=${this.tickled.inputMode}
|
|
@@ -8029,7 +8032,7 @@ const je={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t
|
|
|
8029
8032
|
:host([data-drop-rejected]) {
|
|
8030
8033
|
cursor: not-allowed;
|
|
8031
8034
|
}
|
|
8032
|
-
`]}};E([d({type:Object})],q.prototype,`root`,void 0),E([d({attribute:!1})],q.prototype,`model`,void 0),E([d({attribute:!1})],q.prototype,`loadChildren`,void 0),E([d({reflect:!0,attribute:`exclusivity`})],q.prototype,`exclusivity`,void 0),E([d({reflect:!0,attribute:`selection-filter`})],q.prototype,`selectionFilter`,void 0),E([d({type:String,attribute:`interaction-mode`})],q.prototype,`interactionMode`,void 0),E([d({attribute:!1})],q.prototype,`selectedNode`,void 0),E([m()],q.prototype,`_selectedNodes`,void 0),E([d({attribute:!1})],q.prototype,`filterPredicate`,void 0),E([d({type:Boolean,attribute:`disable-keyboard-navigation`})],q.prototype,`disableKeyboardNavigation`,void 0),E([d({attribute:!1})],q.prototype,`registry`,void 0),E([d({type:String,attribute:`search-modes`,reflect:!0})],q.prototype,`searchModes`,void 0),E([d({reflect:!0,attribute:`item-dnd`})],q.prototype,`itemDnd`,void 0),E([d({type:String,attribute:`accept-drop-types`})],q.prototype,`acceptDropTypes`,void 0),E([d({type:Number,attribute:`dnd-expand-hover-ms`})],q.prototype,`dndExpandHoverMs`,void 0),E([d({reflect:!0,attribute:`reorderable`,converter:{fromAttribute:e=>e!==`false`,toAttribute:e=>e?null:`false`}})],q.prototype,`reorderable`,void 0),E([d({reflect:!0,attribute:`sticky-headers`,converter:{fromAttribute:e=>e!==`false`,toAttribute:e=>e?null:`false`}})],q.prototype,`stickyHeaders`,void 0),E([d({reflect:!0,attribute:`virtualize`})],q.prototype,`virtualize`,void 0),E([d({type:Number,attribute:`virtualize-threshold`})],q.prototype,`virtualizeThreshold`,void 0),E([d({attribute:!1})],q.prototype,`dragPreviewRenderer`,void 0),E([d({attribute:!1})],q.prototype,`dragPreviewSource`,void 0),E([d({attribute:!1})],q.prototype,`canDrag`,void 0),E([d({attribute:!1})],q.prototype,`canDrop`,void 0),E([d({attribute:!1})],q.prototype,`parseExternalDrop`,void 0),E([d({attribute:!1})],q.prototype,`applyInternalDrop`,void 0),E([m()],q.prototype,`_expandedKeys`,void 0),E([m()],q.prototype,`_scrollTop`,void 0),E([m()],q.prototype,`_focusedDepth`,void 0),E([m()],q.prototype,`_stickyKeys`,void 0),q=E([T(`ixfx-tree-base`)],q);let zb=class extends q{#e;willUpdate(e){super.willUpdate(e),this.#t()}#t(){let e=this.root;if(this.interactionMode!==`checked`||!e){this.#e=void 0;return}let n=this.#e;n&&n.root===e&&n.structureVersion===this._structureVersion&&n.selectionVersion===this._selectionVersion||(this.#e={root:e,structureVersion:this._structureVersion,selectionVersion:this._selectionVersion,states:wb(e,this._selectedNodes)})}renderNodeContent(e,n){let r=e.item.isLeaf!==!0,o=this._isExpanded(e,n),s=e.item.icon,c=e.item.tooltip,l=i`
|
|
8035
|
+
`]}};E([d({type:Object})],q.prototype,`root`,void 0),E([d({attribute:!1})],q.prototype,`model`,void 0),E([d({attribute:!1})],q.prototype,`loadChildren`,void 0),E([d({reflect:!0,attribute:`exclusivity`})],q.prototype,`exclusivity`,void 0),E([d({reflect:!0,attribute:`selection-filter`})],q.prototype,`selectionFilter`,void 0),E([d({type:String,attribute:`interaction-mode`})],q.prototype,`interactionMode`,void 0),E([d({attribute:!1})],q.prototype,`selectedNode`,void 0),E([m()],q.prototype,`_selectedNodes`,void 0),E([d({attribute:!1})],q.prototype,`filterPredicate`,void 0),E([d({type:Boolean,attribute:`disable-keyboard-navigation`})],q.prototype,`disableKeyboardNavigation`,void 0),E([d({attribute:!1})],q.prototype,`registry`,void 0),E([d({type:String,attribute:`search-modes`,reflect:!0})],q.prototype,`searchModes`,void 0),E([d({reflect:!0,attribute:`item-dnd`})],q.prototype,`itemDnd`,void 0),E([d({type:String,attribute:`accept-drop-types`})],q.prototype,`acceptDropTypes`,void 0),E([d({type:Number,attribute:`dnd-expand-hover-ms`})],q.prototype,`dndExpandHoverMs`,void 0),E([d({reflect:!0,attribute:`reorderable`,converter:{fromAttribute:e=>e!==`false`,toAttribute:e=>e?null:`false`}})],q.prototype,`reorderable`,void 0),E([d({reflect:!0,attribute:`sticky-headers`,converter:{fromAttribute:e=>e!==`false`,toAttribute:e=>e?null:`false`}})],q.prototype,`stickyHeaders`,void 0),E([d({reflect:!0,attribute:`virtualize`})],q.prototype,`virtualize`,void 0),E([d({type:Number,attribute:`virtualize-threshold`})],q.prototype,`virtualizeThreshold`,void 0),E([d({attribute:!1})],q.prototype,`dragPreviewRenderer`,void 0),E([d({attribute:!1})],q.prototype,`dragPreviewSource`,void 0),E([d({attribute:!1})],q.prototype,`canDrag`,void 0),E([d({attribute:!1})],q.prototype,`canDrop`,void 0),E([d({attribute:!1})],q.prototype,`parseExternalDrop`,void 0),E([d({attribute:!1})],q.prototype,`applyInternalDrop`,void 0),E([m()],q.prototype,`_expandedKeys`,void 0),E([m()],q.prototype,`_scrollTop`,void 0),E([m()],q.prototype,`_focusedDepth`,void 0),E([m()],q.prototype,`_stickyKeys`,void 0),q=E([T(`ixfx-tree-base`)],q);let zb=class extends q{constructor(...e){super(...e),this.alignCheckboxes=!1}#e;willUpdate(e){super.willUpdate(e),this.#t()}#t(){let e=this.root;if(this.interactionMode!==`checked`||!e){this.#e=void 0;return}let n=this.#e;n&&n.root===e&&n.structureVersion===this._structureVersion&&n.selectionVersion===this._selectionVersion||(this.#e={root:e,structureVersion:this._structureVersion,selectionVersion:this._selectionVersion,states:wb(e,this._selectedNodes)})}renderNodeContent(e,n){let r=e.item.isLeaf!==!0,o=this._isExpanded(e,n),s=e.item.icon,c=e.item.tooltip,l=i`
|
|
8033
8036
|
<span class="tree-caret">
|
|
8034
8037
|
${r?i`<ixfx-icon class="caret-icon" name="chevron-down" .rotate=${o?a:`-90deg`}></ixfx-icon>`:``}
|
|
8035
8038
|
</span>
|
|
@@ -8038,7 +8041,7 @@ const je={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t
|
|
|
8038
8041
|
${e.item.label}
|
|
8039
8042
|
${c?i`<ixfx-tooltip class="tree-tooltip" anchor="--tooltip-tree-${e.item.key}" .value=${c}></ixfx-tooltip>`:a}
|
|
8040
8043
|
</span>
|
|
8041
|
-
`;if(this.interactionMode===`checked`){let r=this.#e?.states.get(e.item.key)??`unchecked`;return i`${this.#n(e,n,r)}${l}`}return l}#n(e,n,r){let a=r=>this._handleCheckboxClick(r,e,n);return this.checkboxRenderer?i`
|
|
8044
|
+
`;if(this.interactionMode===`checked`){if(e.item.selectable===!1)return this.alignCheckboxes?i`<span class="tree-checkbox-spacer" aria-hidden="true"></span>${l}`:l;let r=this.#e?.states.get(e.item.key)??`unchecked`;return i`${this.#n(e,n,r)}${l}`}return l}#n(e,n,r){let a=r=>this._handleCheckboxClick(r,e,n);return this.checkboxRenderer?i`
|
|
8042
8045
|
<span
|
|
8043
8046
|
class="tree-checkbox tree-checkbox-custom"
|
|
8044
8047
|
part="checkbox"
|
|
@@ -8127,9 +8130,16 @@ const je={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t
|
|
|
8127
8130
|
anchor-name: --tooltip-tree;
|
|
8128
8131
|
}
|
|
8129
8132
|
|
|
8130
|
-
.tree-checkbox
|
|
8133
|
+
.tree-checkbox,
|
|
8134
|
+
.tree-checkbox-spacer {
|
|
8131
8135
|
flex-shrink: 0;
|
|
8132
|
-
|
|
8136
|
+
box-sizing: border-box;
|
|
8137
|
+
width: var(--tree-checkbox-size, 14px);
|
|
8138
|
+
height: var(--tree-checkbox-size, 14px);
|
|
8139
|
+
margin: 0 var(--space-xs, 3px) 0 0;
|
|
8140
|
+
}
|
|
8141
|
+
|
|
8142
|
+
.tree-checkbox {
|
|
8133
8143
|
cursor: pointer;
|
|
8134
8144
|
accent-color: var(--accent);
|
|
8135
8145
|
pointer-events: auto;
|
|
@@ -8163,7 +8173,7 @@ const je={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t
|
|
|
8163
8173
|
white-space: nowrap;
|
|
8164
8174
|
position: relative;
|
|
8165
8175
|
}
|
|
8166
|
-
`]}};E([d({attribute:!1})],zb.prototype,`checkboxRenderer`,void 0),zb=E([T(`ixfx-tree-list`)],zb);function Bb(e,n){let r=document.createElement(`div`);r.style.cssText=`display:contents;`;let i;function a(r){let i={...e(r),data:r},o=n?.getChildren?.(r);return{item:i,children:o?o.map(a):i.isLeaf?[]:void 0}}function o(){return i||(i=document.createElement(`ixfx-tree-list`),i.interactionMode=n?.interactionMode??`standard`,i.selectionFilter=n?.selectionFilter??`all`,i.exclusivity=n?.exclusivity??`none`,i.style.cssText=`display:block;width:100%;`,r.appendChild(i),c(),i)}function s(e){let n=new Set;for(let r of e)r.item.data!==void 0&&n.add(r.item.data);return n}function c(){i.addEventListener(`select`,e=>{e.stopPropagation();let n={selected:s(e.detail.selected),previous:s(e.detail.previous)};r.dispatchEvent(new CustomEvent(`select`,{detail:n,bubbles:!0,composed:!0}))}),i.addEventListener(`activate`,e=>{e.stopPropagation();let n=e.detail.node.item.data;if(n===void 0)return;let i={item:n};r.dispatchEvent(new CustomEvent(`activate`,{detail:i,bubbles:!0,composed:!0}))}),i.addEventListener(`item-click`,e=>{e.stopPropagation();let n=e.detail.node.item.data;if(n===void 0)return;let i={item:n};r.dispatchEvent(new CustomEvent(`item-click`,{detail:i,bubbles:!0,composed:!0}))}),i.addEventListener(`tickle`,e=>{e.stopPropagation();let n=e.detail.node.item.data;if(n===void 0)return;let i={item:n};r.dispatchEvent(new CustomEvent(`tickle`,{detail:i,bubbles:!0,composed:!0}))})}let l=`single`,u=Object.assign(r,{setItems(e){let n=o();n.root={item:{key:`__adapter_root__`,label:``,isLeaf:!1},children:e.map(a)}},clearSelection(){i?.clearSelection()},dispatch(e,r){n?.onDispatch?.(e,r,i)}});return Object.defineProperties(u,{selectedItems:{get(){return i?s(i.selectedNodes):new Set},enumerable:!0,configurable:!0},selectionMode:{get(){return l},set(e){l=e,i&&(e===`none`?i.selectionFilter=`none`:e===`single`?(i.selectionFilter=n?.selectionFilter??`all`,i.interactionMode=`implicit`):(i.selectionFilter=n?.selectionFilter??`all`,i.interactionMode=n?.interactionMode??`standard`))},enumerable:!0,configurable:!0}}),u}function Vb(e,n){let r=document.createElement(`div`);r.style.cssText=`display:contents;`;let i,a=n?.selectionMode??`single`,o=new WeakMap;function s(){return i||(i=document.createElement(`ixfx-vertical-list`),i.style.cssText=`height:auto;width:100%;`,i.selectionMode=a,n?.interactionMode&&(i.interactionMode=n.interactionMode),r.appendChild(i),c(),i)}function c(){i.addEventListener(`list-select`,e=>{let n={selected:u(e.detail.selected),previous:u(e.detail.previous)};r.dispatchEvent(new CustomEvent(`select`,{detail:n,bubbles:!0,composed:!0}))}),i.addEventListener(`list-activate`,e=>{let n=o.get(e.detail.item);n!==void 0&&r.dispatchEvent(new CustomEvent(`activate`,{detail:{item:n},bubbles:!0,composed:!0}))}),i.addEventListener(`list-item-click`,e=>{let n=o.get(e.detail.item);n!==void 0&&r.dispatchEvent(new CustomEvent(`item-click`,{detail:{item:n},bubbles:!0,composed:!0}))}),i.addEventListener(`list-tickle`,e=>{let n=o.get(e.detail.item);n!==void 0&&r.dispatchEvent(new CustomEvent(`tickle`,{detail:{item:n},bubbles:!0,composed:!0}))})}function l(n){let r=s();r.clearItems(),o=new WeakMap;for(let i of n){let n=e(i);o.set(n,i),r.addItem(n)}}function u(e){let n=new Set;for(let r of e){let e=o.get(r);e!==void 0&&n.add(e)}return n}let d=Object.assign(r,{setItems(e){l(e)},clearSelection(){i?.clearSelection()},dispatch(e,r){n?.onDispatch?.(e,r,i)}});return Object.defineProperties(d,{selectedItems:{get(){return i?u(i.selectedItems):new Set},enumerable:!0,configurable:!0},selectionMode:{get(){return i?.selectionMode??a},set(e){a=e,i&&(i.selectionMode=e)},enumerable:!0,configurable:!0}}),d}const Hb=new Set([9,10,11,12,13,32]);function Ub(e){return e<32&&e!==9&&e!==10&&e!==11&&e!==12&&e!==13}function Wb(e){return e>=32&&e<=126}function Gb(e){return e===0?`byte-null`:Hb.has(e)?`byte-whitespace`:Ub(e)?`byte-control`:Wb(e)?`byte-printable`:`byte-other`}function Kb(e,n,r,i){let a=eg.createSteps(r,i,{steps:16}).map(eg.toCssColour);return{forByte:r=>r===0?e:r===255?n:a[r>>4]}}function qb(e){return{data:new Uint8Array(e),changeset:new Set}}function Jb(e,n){return e.data[n]??0}function Yb(e){return e.data.length}function Xb(e){return Math.max(0,Math.min(255,e))}function Zb(e,n,r){let i=Xb(r),a=e.data[n],o=new Map([[n,{before:a,after:i}]]);return e.data[n]=i,e.changeset.add(n),o}function Qb(e,n){let r=new Map;return n.forEach((n,i)=>{let a=Xb(n),o=e.data[i];r.set(i,{before:o,after:a}),e.data[i]=a,e.changeset.add(i)}),r}function $b(e,n){let r=new Map;return n.forEach((n,i)=>{let a=e.data[i];r.set(i,{before:n.after,after:a}),e.data[i]=n.after,e.changeset.add(i)}),r}function ex(e){let n=new Map;return e.forEach((e,r)=>{n.set(r,{before:e.after,after:e.before})}),n}function tx(e){return e.changeset}function nx(){return{undos:[],redos:[]}}function rx(e,n){e.undos.push(n),e.redos=[]}function ix(e){let n=e.undos.pop();return n&&e.redos.push(n),n}function ax(e){let n=e.redos.pop();return n&&e.undos.push(n),n}const ox=e=>e*4,sx=(e,n)=>e<n?e:n,cx=(e,n)=>e>n?e:n;function lx(e,n){return Math.max(0,Math.min(e,n-1))}function ux(e,n){if(!e)return[];let r=ox(n);if(e.kind===`single`)return[e.pos];if(e.kind===`contiguous`){let n=sx(e.start,e.end),r=cx(e.start,e.end),i=[];for(let e=n;e<=r;e++)i.push(e);return i}if(e.kind===`rectangular`){let n=[];for(let i=0;i<e.height;i++)for(let a=0;a<e.width;a++){let o=e.y+i,s=e.x+a,c=o*r+s;n.push(c)}return n}return[]}function dx(e,n,r){if(!e)return!1;let i=ox(r);if(e.kind===`single`)return n===e.pos;if(e.kind===`contiguous`){let r=sx(e.start,e.end),i=cx(e.start,e.end);return n>=r&&n<=i}if(e.kind===`rectangular`){let r=Math.floor(n/i),a=n%i,o=e.x,s=e.y,c=e.width,l=e.height;return r>=s&&r<s+l&&a>=o&&a<o+c}return!1}function fx(e,n,r,i){let a;a=e?e.kind===`single`?e.pos:e.kind===`contiguous`?cx(e.start,e.end):e.kind===`rectangular`?e.y*ox(r)+e.x+e.width-1:0:0;let o=ox(r),s;switch(n){case`left`:s=a-1;break;case`right`:s=a+1;break;case`up`:s=a-o;break;case`down`:s=a+o;break;default:s=a}return lx(s,i)}function px(e,n,r,i){return{kind:`single`,pos:fx(e,n,r,i)}}function mx(e,n,r,i,a=0,o=0){let s=ox(r),c,l,u,d;if(!e||e.kind===`single`){let n=e?.kind===`single`?e.pos:0;c=n%s,l=Math.floor(n/s),u=1,d=1}else if(e.kind===`contiguous`){let n=sx(e.start,e.end),r=cx(e.start,e.end);c=n%s,l=Math.floor(n/s),u=r-n+1,d=1}else e.kind===`rectangular`?(c=e.x,l=e.y,u=e.width,d=e.height):(c=0,l=0,u=1,d=1);let f=a>0||e?.kind===`rectangular`?a:c,p=o>0||e?.kind===`rectangular`?o:l;switch(n){case`left`:c>f?--u:(c===f&&u>1||c>0)&&(--c,u+=1);break;case`right`:c+u<s&&(u+=1);break;case`up`:l>p?--d:(l===p&&d>1||l>0)&&(--l,d+=1);break;case`down`:d+=1}return{kind:`rectangular`,x:c,y:l,width:u,height:d}}function hx(e,n,r,i){let a=ox(i);if(r===`contiguous`)return{kind:`contiguous`,start:sx(e,n),end:cx(e,n)};let o=e%a,s=Math.floor(e/a),c=n%a,l=Math.floor(n/a);return{kind:`rectangular`,x:sx(o,c),y:sx(s,l),width:Math.abs(c-o)+1,height:Math.abs(l-s)+1}}let gx=class extends n{constructor(...e){super(...e),this.columns=4,this.colourScheme=`ascii`,this.showChangeset=!0,this.hideOffsetCol=!1,this.hideHexCol=!1,this.hideTextCol=!1,this._selection=null,this._scrollTop=0,this._editState=null,this._containerH=0,this._shadeMap=null,this._focusSide=null,this._store=qb(new Uint8Array),this._undoStack=nx(),this._copyBuffer=null,this._rowHeight=24,this._dragStart=null,this._dragAnchor=null,this._rectAnchorX=0,this._rectAnchorY=0,this._rectAnchorXFromKeyboard=0,this._rectAnchorYFromKeyboard=0,this._initialSelectionPoint=0,this._currentCursorPoint=0,this._pointerMode=null,this._currentDragDiff=null,this._shiftClickTarget=null,this._onScroll=e=>{let n=e.target;this._scrollTop=n.scrollTop,this.requestUpdate()},this._onKeyDown=e=>{if([`ArrowLeft`,`ArrowRight`,`ArrowUp`,`ArrowDown`].includes(e.key)){e.preventDefault(),e.stopPropagation(),this._editState&&=null;let n=e.key.replace(`Arrow`,``).toLowerCase(),r=Yb(this._store),i=ox(this.columns);if(e.metaKey||e.ctrlKey){if(!this._selection||this._selection.kind!==`rectangular`){let e=0;this._selection?.kind===`single`?e=this._selection.pos:this._selection?.kind===`contiguous`&&(e=Math.min(this._selection.start,this._selection.end)),this._rectAnchorXFromKeyboard=e%i,this._rectAnchorYFromKeyboard=Math.floor(e/i),this._selection={kind:`rectangular`,x:this._rectAnchorXFromKeyboard,y:this._rectAnchorYFromKeyboard,width:1,height:1}}this._selection=mx(this._selection,n,this.columns,r,this._rectAnchorXFromKeyboard,this._rectAnchorYFromKeyboard)}else if(e.shiftKey){if(!this._selection)this._initialSelectionPoint=0,this._currentCursorPoint=0;else if(this._selection.kind===`single`)this._initialSelectionPoint=this._selection.pos,this._currentCursorPoint=this._selection.pos;else if(this._selection.kind===`rectangular`){let e=this._selection.y*i+this._selection.x;this._initialSelectionPoint=e,this._currentCursorPoint=e}let e=fx(this._selection,n,this.columns,r),a=Math.min(this._initialSelectionPoint,e),o=Math.max(this._initialSelectionPoint,e);this._currentCursorPoint=e,this._selection={kind:`contiguous`,start:a,end:o}}else{this._selection=px(this._selection,n,this.columns,r);let e=fx(this._selection,n,this.columns,r);this._initialSelectionPoint=e,this._currentCursorPoint=e}this._dispatchSelectEvent(),this.requestUpdate();return}if(e.key===`Tab`){if(e.preventDefault(),e.stopPropagation(),this._editState)this._advanceCursor();else{let e=Yb(this._store);this._selection=px(this._selection,`right`,this.columns,e),this._dispatchSelectEvent()}this.requestUpdate();return}if(e.key===`Escape`){if(e.preventDefault(),e.stopPropagation(),this._editState)this._editState=null;else if(this._selection&&this._selection.kind!==`single`){let e=this._selection,n=0;if(e.kind===`contiguous`){let r=e;n=Math.min(r.start,r.end)}if(e.kind===`rectangular`){let r=e;n=r.y*ox(this.columns)+r.x}this._selection={kind:`single`,pos:n},this._dispatchSelectEvent()}this.requestUpdate();return}if(this._editState){if(e.stopPropagation(),e.key===`Backspace`){this._handleBackspace();return}if(e.key===`Enter`){this._editState.side===`hex`&&this._editState.partial.startsWith(`.`)&&this._commitDecimalValue();return}e.key.length===1&&this._handleValueEntry(e.key);return}if(this._selection&&this._selection.kind===`single`&&e.key.length===1){e.preventDefault(),e.stopPropagation();let n=this._selection.pos,r=this._focusSide??`hex`;this._editState={pos:n,side:r,partial:``},this._handleValueEntry(e.key)}}}static{this.styles=r`
|
|
8176
|
+
`]}};E([d({attribute:!1})],zb.prototype,`checkboxRenderer`,void 0),E([d({type:Boolean,reflect:!0,attribute:`align-checkboxes`})],zb.prototype,`alignCheckboxes`,void 0),zb=E([T(`ixfx-tree-list`)],zb);function Bb(e,n){let r=document.createElement(`div`);r.style.cssText=`display:contents;`;let i;function a(r){let i={...e(r),data:r},o=n?.getChildren?.(r);return{item:i,children:o?o.map(a):i.isLeaf?[]:void 0}}function o(){return i||(i=document.createElement(`ixfx-tree-list`),i.interactionMode=n?.interactionMode??`standard`,i.selectionFilter=n?.selectionFilter??`all`,i.exclusivity=n?.exclusivity??`none`,i.style.cssText=`display:block;width:100%;`,r.appendChild(i),c(),i)}function s(e){let n=new Set;for(let r of e)r.item.data!==void 0&&n.add(r.item.data);return n}function c(){i.addEventListener(`select`,e=>{e.stopPropagation();let n={selected:s(e.detail.selected),previous:s(e.detail.previous)};r.dispatchEvent(new CustomEvent(`select`,{detail:n,bubbles:!0,composed:!0}))}),i.addEventListener(`activate`,e=>{e.stopPropagation();let n=e.detail.node.item.data;if(n===void 0)return;let i={item:n};r.dispatchEvent(new CustomEvent(`activate`,{detail:i,bubbles:!0,composed:!0}))}),i.addEventListener(`item-click`,e=>{e.stopPropagation();let n=e.detail.node.item.data;if(n===void 0)return;let i={item:n};r.dispatchEvent(new CustomEvent(`item-click`,{detail:i,bubbles:!0,composed:!0}))}),i.addEventListener(`tickle`,e=>{e.stopPropagation();let n=e.detail.node.item.data;if(n===void 0)return;let i={item:n};r.dispatchEvent(new CustomEvent(`tickle`,{detail:i,bubbles:!0,composed:!0}))})}let l=`single`,u=Object.assign(r,{setItems(e){let n=o();n.root={item:{key:`__adapter_root__`,label:``,isLeaf:!1},children:e.map(a)}},clearSelection(){i?.clearSelection()},dispatch(e,r){n?.onDispatch?.(e,r,i)}});return Object.defineProperties(u,{selectedItems:{get(){return i?s(i.selectedNodes):new Set},enumerable:!0,configurable:!0},selectionMode:{get(){return l},set(e){l=e,i&&(e===`none`?i.selectionFilter=`none`:e===`single`?(i.selectionFilter=n?.selectionFilter??`all`,i.interactionMode=`implicit`):(i.selectionFilter=n?.selectionFilter??`all`,i.interactionMode=n?.interactionMode??`standard`))},enumerable:!0,configurable:!0}}),u}function Vb(e,n){let r=document.createElement(`div`);r.style.cssText=`display:contents;`;let i,a=n?.selectionMode??`single`,o=new WeakMap;function s(){return i||(i=document.createElement(`ixfx-vertical-list`),i.style.cssText=`height:auto;width:100%;`,i.selectionMode=a,n?.interactionMode&&(i.interactionMode=n.interactionMode),r.appendChild(i),c(),i)}function c(){i.addEventListener(`list-select`,e=>{let n={selected:u(e.detail.selected),previous:u(e.detail.previous)};r.dispatchEvent(new CustomEvent(`select`,{detail:n,bubbles:!0,composed:!0}))}),i.addEventListener(`list-activate`,e=>{let n=o.get(e.detail.item);n!==void 0&&r.dispatchEvent(new CustomEvent(`activate`,{detail:{item:n},bubbles:!0,composed:!0}))}),i.addEventListener(`list-item-click`,e=>{let n=o.get(e.detail.item);n!==void 0&&r.dispatchEvent(new CustomEvent(`item-click`,{detail:{item:n},bubbles:!0,composed:!0}))}),i.addEventListener(`list-tickle`,e=>{let n=o.get(e.detail.item);n!==void 0&&r.dispatchEvent(new CustomEvent(`tickle`,{detail:{item:n},bubbles:!0,composed:!0}))})}function l(n){let r=s();r.clearItems(),o=new WeakMap;for(let i of n){let n=e(i);o.set(n,i),r.addItem(n)}}function u(e){let n=new Set;for(let r of e){let e=o.get(r);e!==void 0&&n.add(e)}return n}let d=Object.assign(r,{setItems(e){l(e)},clearSelection(){i?.clearSelection()},dispatch(e,r){n?.onDispatch?.(e,r,i)}});return Object.defineProperties(d,{selectedItems:{get(){return i?u(i.selectedItems):new Set},enumerable:!0,configurable:!0},selectionMode:{get(){return i?.selectionMode??a},set(e){a=e,i&&(i.selectionMode=e)},enumerable:!0,configurable:!0}}),d}const Hb=new Set([9,10,11,12,13,32]);function Ub(e){return e<32&&e!==9&&e!==10&&e!==11&&e!==12&&e!==13}function Wb(e){return e>=32&&e<=126}function Gb(e){return e===0?`byte-null`:Hb.has(e)?`byte-whitespace`:Ub(e)?`byte-control`:Wb(e)?`byte-printable`:`byte-other`}function Kb(e,n,r,i){let a=eg.createSteps(r,i,{steps:16}).map(eg.toCssColour);return{forByte:r=>r===0?e:r===255?n:a[r>>4]}}function qb(e){return{data:new Uint8Array(e),changeset:new Set}}function Jb(e,n){return e.data[n]??0}function Yb(e){return e.data.length}function Xb(e){return Math.max(0,Math.min(255,e))}function Zb(e,n,r){let i=Xb(r),a=e.data[n],o=new Map([[n,{before:a,after:i}]]);return e.data[n]=i,e.changeset.add(n),o}function Qb(e,n){let r=new Map;return n.forEach((n,i)=>{let a=Xb(n),o=e.data[i];r.set(i,{before:o,after:a}),e.data[i]=a,e.changeset.add(i)}),r}function $b(e,n){let r=new Map;return n.forEach((n,i)=>{let a=e.data[i];r.set(i,{before:n.after,after:a}),e.data[i]=n.after,e.changeset.add(i)}),r}function ex(e){let n=new Map;return e.forEach((e,r)=>{n.set(r,{before:e.after,after:e.before})}),n}function tx(e){return e.changeset}function nx(){return{undos:[],redos:[]}}function rx(e,n){e.undos.push(n),e.redos=[]}function ix(e){let n=e.undos.pop();return n&&e.redos.push(n),n}function ax(e){let n=e.redos.pop();return n&&e.undos.push(n),n}const ox=e=>e*4,sx=(e,n)=>e<n?e:n,cx=(e,n)=>e>n?e:n;function lx(e,n){return Math.max(0,Math.min(e,n-1))}function ux(e,n){if(!e)return[];let r=ox(n);if(e.kind===`single`)return[e.pos];if(e.kind===`contiguous`){let n=sx(e.start,e.end),r=cx(e.start,e.end),i=[];for(let e=n;e<=r;e++)i.push(e);return i}if(e.kind===`rectangular`){let n=[];for(let i=0;i<e.height;i++)for(let a=0;a<e.width;a++){let o=e.y+i,s=e.x+a,c=o*r+s;n.push(c)}return n}return[]}function dx(e,n,r){if(!e)return!1;let i=ox(r);if(e.kind===`single`)return n===e.pos;if(e.kind===`contiguous`){let r=sx(e.start,e.end),i=cx(e.start,e.end);return n>=r&&n<=i}if(e.kind===`rectangular`){let r=Math.floor(n/i),a=n%i,o=e.x,s=e.y,c=e.width,l=e.height;return r>=s&&r<s+l&&a>=o&&a<o+c}return!1}function fx(e,n,r,i){let a;a=e?e.kind===`single`?e.pos:e.kind===`contiguous`?cx(e.start,e.end):e.kind===`rectangular`?e.y*ox(r)+e.x+e.width-1:0:0;let o=ox(r),s;switch(n){case`left`:s=a-1;break;case`right`:s=a+1;break;case`up`:s=a-o;break;case`down`:s=a+o;break;default:s=a}return lx(s,i)}function px(e,n,r,i){return{kind:`single`,pos:fx(e,n,r,i)}}function mx(e,n,r,i,a=0,o=0){let s=ox(r),c,l,u,d;if(!e||e.kind===`single`){let n=e?.kind===`single`?e.pos:0;c=n%s,l=Math.floor(n/s),u=1,d=1}else if(e.kind===`contiguous`){let n=sx(e.start,e.end),r=cx(e.start,e.end);c=n%s,l=Math.floor(n/s),u=r-n+1,d=1}else e.kind===`rectangular`?(c=e.x,l=e.y,u=e.width,d=e.height):(c=0,l=0,u=1,d=1);let f=a>0||e?.kind===`rectangular`?a:c,p=o>0||e?.kind===`rectangular`?o:l;switch(n){case`left`:c>f?--u:(c===f&&u>1||c>0)&&(--c,u+=1);break;case`right`:c+u<s&&(u+=1);break;case`up`:l>p?--d:(l===p&&d>1||l>0)&&(--l,d+=1);break;case`down`:d+=1}return{kind:`rectangular`,x:c,y:l,width:u,height:d}}function hx(e,n,r,i){let a=ox(i);if(r===`contiguous`)return{kind:`contiguous`,start:sx(e,n),end:cx(e,n)};let o=e%a,s=Math.floor(e/a),c=n%a,l=Math.floor(n/a);return{kind:`rectangular`,x:sx(o,c),y:sx(s,l),width:Math.abs(c-o)+1,height:Math.abs(l-s)+1}}let gx=class extends n{constructor(...e){super(...e),this.columns=4,this.colourScheme=`ascii`,this.showChangeset=!0,this.hideOffsetCol=!1,this.hideHexCol=!1,this.hideTextCol=!1,this._selection=null,this._scrollTop=0,this._editState=null,this._containerH=0,this._shadeMap=null,this._focusSide=null,this._store=qb(new Uint8Array),this._undoStack=nx(),this._copyBuffer=null,this._rowHeight=24,this._dragStart=null,this._dragAnchor=null,this._rectAnchorX=0,this._rectAnchorY=0,this._rectAnchorXFromKeyboard=0,this._rectAnchorYFromKeyboard=0,this._initialSelectionPoint=0,this._currentCursorPoint=0,this._pointerMode=null,this._currentDragDiff=null,this._shiftClickTarget=null,this._onScroll=e=>{let n=e.target;this._scrollTop=n.scrollTop,this.requestUpdate()},this._onKeyDown=e=>{if([`ArrowLeft`,`ArrowRight`,`ArrowUp`,`ArrowDown`].includes(e.key)){e.preventDefault(),e.stopPropagation(),this._editState&&=null;let n=e.key.replace(`Arrow`,``).toLowerCase(),r=Yb(this._store),i=ox(this.columns);if(e.metaKey||e.ctrlKey){if(!this._selection||this._selection.kind!==`rectangular`){let e=0;this._selection?.kind===`single`?e=this._selection.pos:this._selection?.kind===`contiguous`&&(e=Math.min(this._selection.start,this._selection.end)),this._rectAnchorXFromKeyboard=e%i,this._rectAnchorYFromKeyboard=Math.floor(e/i),this._selection={kind:`rectangular`,x:this._rectAnchorXFromKeyboard,y:this._rectAnchorYFromKeyboard,width:1,height:1}}this._selection=mx(this._selection,n,this.columns,r,this._rectAnchorXFromKeyboard,this._rectAnchorYFromKeyboard)}else if(e.shiftKey){if(!this._selection)this._initialSelectionPoint=0,this._currentCursorPoint=0;else if(this._selection.kind===`single`)this._initialSelectionPoint=this._selection.pos,this._currentCursorPoint=this._selection.pos;else if(this._selection.kind===`rectangular`){let e=this._selection.y*i+this._selection.x;this._initialSelectionPoint=e,this._currentCursorPoint=e}let e=fx(this._selection,n,this.columns,r),a=Math.min(this._initialSelectionPoint,e),o=Math.max(this._initialSelectionPoint,e);this._currentCursorPoint=e,this._selection={kind:`contiguous`,start:a,end:o}}else{this._selection=px(this._selection,n,this.columns,r);let e=fx(this._selection,n,this.columns,r);this._initialSelectionPoint=e,this._currentCursorPoint=e}this._dispatchSelectEvent(),this.requestUpdate();return}if(e.key===`Tab`){if(e.preventDefault(),e.stopPropagation(),this._editState)this._advanceCursor();else{let e=Yb(this._store);this._selection=px(this._selection,`right`,this.columns,e),this._dispatchSelectEvent()}this.requestUpdate();return}if(e.key===`Escape`){if(e.preventDefault(),e.stopPropagation(),this._editState)this._editState=null;else if(this._selection&&this._selection.kind!==`single`){let e=this._selection,n=0;if(e.kind===`contiguous`){let r=e;n=Math.min(r.start,r.end)}if(e.kind===`rectangular`){let r=e;n=r.y*ox(this.columns)+r.x}this._selection={kind:`single`,pos:n},this._dispatchSelectEvent()}this.requestUpdate();return}if(this._editState){if(e.stopPropagation(),e.key===`Backspace`){this._handleBackspace();return}if(e.key===`Enter`){this._editState.side===`hex`&&this._editState.partial.startsWith(`.`)&&this._commitDecimalValue();return}e.key.length===1&&this._handleValueEntry(e.key);return}if(this._selection&&this._selection.kind===`single`&&e.key.length===1){e.preventDefault(),e.stopPropagation();let n=this._selection.pos,r=this._focusSide??`hex`;this._editState={pos:n,side:r,partial:``},this._handleValueEntry(e.key)}}}static{this.styles=r`
|
|
8167
8177
|
:host {
|
|
8168
8178
|
--hex-row-height: 24px;
|
|
8169
8179
|
--hex-offset-width: 8ch;
|
|
@@ -9947,7 +9957,7 @@ const je={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t
|
|
|
9947
9957
|
}
|
|
9948
9958
|
|
|
9949
9959
|
|
|
9950
|
-
`]}};ew=E([T(`ixfx-miller-list`)],ew);var tw=class{#e;#t;#n;#r=new WeakMap;#i=new Map;#a=new Map;#o=new Map;#s=new WeakMap;#c;constructor(e,n,r){this.#e=e,this.#t=n,this.#n=r}connect(){this.disconnect(),this.#c=new AbortController,this.#s=new WeakMap,this.#i.clear(),this.#o.clear(),this.#a.clear();let e={item:this.#f(this.#e)};this.#r.set(e,this.#e),e.children=this.#p(this.#e),this.#t.root=e,this.#t.loadChildren=this.#n.loadChildren??(({node:e})=>{let n=this.#r.get(e);return n?this.#p(n):[]})}disconnect(){this.#c?.abort(),this.#c=void 0,this.#t.loadChildren=void 0}navigateToValue(e,n){let r=this.#_(this.#e,e);return r?this.#l(r,n):!1}navigateToKeyPath(e,n){let r=this.#t.viewRoot??this.#t.root;if(!r||e.length===0)return!1;this.#u(r);let i=r.children??[];for(let n=0;n<e.length-1;n++){let r=i.find(r=>r.item.key===e[n]);if(!r)return!1;this.#u(r),i=r.children??[]}return this.#t.navigateTo(e,n)}navigateToIdentity(e,n){let r=this.#d(e);if(!r)return!1;let i=[],a=this.#e.getIdentity();for(let e=r;e;e=e.getParent())if(i.unshift(e),e.getIdentity()===a)return this.#l(i,n);return!1}lookupByKey(e){return this.#a.get(e)}sync(){let e=this.#t.root;if(!e)return;this.#s=new WeakMap,this.#i.clear(),this.#o.clear(),this.#a.clear(),this.#r.set(e,this.#e),e.item=this.#f(this.#e);let n=new Set([e]);e.children&&this.#g(this.#e,e.children,n);let r=this.#t.viewRoot;r&&!n.has(r)&&(this.#t.viewRoot=void 0),this.#t.invalidateStructure()}#l(e,n){let r=this.#t.viewRoot??this.#t.root;if(!r)return!1;let i=1;if(this.#t.viewRoot){let n=this.#r.get(r);if(!n)return!1;let a=n.getIdentity(),o=e.findIndex(e=>e.getIdentity()===a);if(o<0)return!1;i=o+1}return i>=e.length?!1:this.navigateToKeyPath(e.slice(i).map(e=>this.#f(e).key),n)}#u(e){if(e.children!==void 0)return;let n=this.#r.get(e);n&&(e.children=this.#p(n))}#d(e){return this.#o.get(e)}#f(e){let n=e.getIdentity(),r=this.#s.get(n);return r||(r=this.#n.valueToItem(e.getValue(),e),this.#s.set(n,r)),r}#p(e){return Array.from(e.children(),e=>this.#m(e))}#m(e){let n=[...e.children()];for(let e of n)this.#o.set(e.getIdentity(),e);let r=this.#f(e),i=r.isLeaf??n.length===0,a={item:{...r,isLeaf:i},children:i?[]:void 0};return this.#h(a,e),a}#h(e,n){this.#r.set(e,n),this.#i.set(n.getIdentity(),e),this.#o.set(n.getIdentity(),n),this.#a.set(e.item.key,n)}#g(e,n,r){let i=new Map(n.map(e=>[e.item.key,e])),a=Array.from(e.children(),e=>{let n=this.#m(e),a=i.get(n.item.key);return a?(a.item=n.item,this.#h(a,e),r.add(a),n.item.isLeaf?a.children=[]:a.children===void 0?a.children=void 0:this.#g(e,a.children,r),a):(r.add(n),n)});n.splice(0,n.length,...a)}#_(e,n,r=[]){let i=[...r,e];if(n(e.getValue()))return i;for(let r of e.children()){let e=this.#_(r,n,i);if(e)return e}}};function nw(e){return e.children!==void 0&&e.children.length>0}function rw(e){return e.flatMap(e=>nw(e)?rw(e.children):[e])}function iw(e,n){for(let r of e){if(r.key===n)return r;let e=r.children?iw(r.children,n):void 0;if(e)return e}}function aw(e,n){return rw(e).find(e=>e.key===n)}const ow=`__all__`;function sw(e,n){let r=n===`desc`?-1:1;return[...e].sort((e,n)=>r*e.label.localeCompare(n.label,void 0,{sensitivity:`base`,numeric:!0}))}function cw(e,n,r,i){if(r===0)return{insert:0,caretOffset:0};let a=2**53-1,o=i;for(let s=0;s<r;s++){if(s===i)continue;let r=e[s],c=e[s+1]??e[e.length-1],l=(r+c)/2,u=Math.abs(n-(n<l?r:c));u<a&&(a=u,o=n<l?s:s+1)}let s=o>i?o-1:o;return{insert:Math.max(0,Math.min(r-1,s)),caretOffset:e[o]??e[e.length-1]}}var lw=class{#e;#t;#n;#r;#i;#a;#o=void 0;#s;#c;#l;#u=[];#d=!0;#f=[];#p=!1;#m;constructor(e){this.id=e.id,this.#e=e.category,this.#t=e.categoryDefaults,this.#n=e.selectionMode,this.#r=e.dataProvider,this.#i=e.onSelectionChange,this.#a=e.onRequestData,this.#m={id:e.id,categoryKey:e.category.key,sort:e.categoryDefaults?.sort??`asc`,grouped:e.categoryDefaults?.grouped??!1,width:220}}get state(){return this.getState()}get categoryKey(){return this.#e.key}getState(){return{...this.#m}}updateState(e){let n=e;if(e.width!==void 0&&!Number.isFinite(e.width)){let{width:r,...i}=e;n=i}let r=n.sort!==void 0&&n.sort!==this.#m.sort,i=n.grouped!==void 0&&n.grouped!==this.#m.grouped;this.#m={...this.#m,...n},r&&this.#_(),i&&this.#v()}setWidth(e){Number.isFinite(e)&&(this.#m={...this.#m,width:Math.max(80,Math.min(480,Math.round(e)))})}setSort(e){e!==this.#m.sort&&(this.#m={...this.#m,sort:e},this.#_())}setGrouped(e){e!==this.#m.grouped&&(this.#m={...this.#m,grouped:e},this.#v())}setSelectionMode(e){if(e!==this.#n){this.#n=e;for(let n of this.#y())n.selectionMode=e}}setCategory(e){this.#e=e,this.#t=e.defaults,this.#m={...this.#m,categoryKey:e.key,sort:e.defaults?.sort??`asc`,grouped:e.defaults?.grouped??!1},this.clearSelection(),this.#v()}get listerHost(){return this.#s}get isMounted(){return this.#s!==void 0}setDataProvider(e){this.#r=e}mount(e){if(this.#s)return;this.#s=e;let n=document.createElement(`div`);n.className=`all-row`,n.dataset.key=ow,n.setAttribute(`role`,`button`),n.setAttribute(`tabindex`,`0`);let r=document.createElement(`span`);r.className=`all-label`,n.appendChild(r);let i=()=>{this.#d||this.#x()};n.addEventListener(`click`,i),n.addEventListener(`keydown`,e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),i())}),this.#c=n;let a=document.createElement(`ixfx-grouped-item-lister`);a.crossGroupSelection=!0,a.factory=()=>Vb(uw,{selectionMode:this.#n,interactionMode:`standard`}),a.addEventListener(`select`,this.#b),this.#l=a,this.#v(),this.#C(),e.append(n,a),this.#f.length>0&&(this.#g(),this.#S())}unmount(){this.#w(),this.#c?.remove(),this.#l?.remove(),this.#c=void 0,this.#l=void 0,this.#s=void 0}requestData(e){if(!this.#r)return;this.#w();let n=new AbortController;this.#o=n;let{signal:r}=n;this.#a(this.id,e,r),Promise.resolve().then(async()=>{let n=await dg(this.#r(e,r),r);r.aborted||this.#h(n)}).catch(()=>{})}#h(e){this.#f=e;let n=this.#u.filter(n=>e.some(e=>e.key===n)),r=n.length!==this.#u.length;if(this.#u=n,n.length===0&&(this.#d=!0),!this.#l){r&&this.#i(this.id,n);return}this.#g(),this.#S(),r&&this.#i(this.id,n)}#g(){if(!this.#l)return;let e=sw(this.#f,this.#m.sort);this.#l.provider=()=>e}#_(){!this.#l||this.#f.length===0||(this.#g(),this.#S())}#v(){if(!this.#l)return;let e=this.#t?.groupBy;this.#l.groupBy=e,this.#l.grouped=this.#m.grouped&&e!==void 0,this.#f.length>0&&this.#S()}#y(){return this.#l?this.#l.querySelectorAll(`:scope > .ungrouped-host > *, :scope > ixfx-panel > *`):[]}#b=()=>{if(this.#p)return;let e=[...this.#l?.selectedItems??[]].map(e=>e.key).filter(e=>e!==ow);if(e.length===this.#u.length&&e.every(e=>this.#u.includes(e))){this.#C();return}this.#u=e,this.#d=e.length===0,this.#C(),this.#i(this.id,e)};#x(){let e=this.#u;this.#p=!0;try{this.#u=[],this.#d=!0;for(let e of this.#y())e.clearSelection()}finally{this.#p=!1}this.#C(),e.length>0&&this.#i(this.id,[])}clearSelection(){this.#x()}get selectedValues(){return this.#u}#S(){this.#l&&this.#l.updateComplete.then(()=>{if(!(!this.#l||!this.#s)){this.#p=!0;try{let e=this.#u;for(let n of this.#l.querySelectorAll(`ixfx-vertical-list`))n.selectKeys(e);let n=[...this.#l.selectedItems].map(e=>e.key).filter(e=>e!==ow);this.#u=n,this.#d=n.length===0}finally{this.#p=!1}this.#C()}})}#C(){if(!this.#c)return;let e=this.#t?.allLabel??`All`,n=this.#c.querySelector(`.all-label`);n&&(n.textContent=e),this.#c.toggleAttribute(`data-selected`,this.#d)}#w(){this.#o&&=(this.#o.abort(),void 0)}};function uw(e){let n=document.createElement(`li`);n.dataset.key=e.key;let r=document.createElement(`span`);if(r.className=`item-label`,r.textContent=e.label,n.appendChild(r),e.count!==void 0){let r=document.createElement(`span`);r.className=`count`,r.textContent=String(e.count),n.appendChild(r)}return n}ge(`menu`,`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><
|
|
9960
|
+
`]}};ew=E([T(`ixfx-miller-list`)],ew);var tw=class{#e;#t;#n;#r=new WeakMap;#i=new Map;#a=new Map;#o=new Map;#s=new WeakMap;#c;constructor(e,n,r){this.#e=e,this.#t=n,this.#n=r}connect(){this.disconnect(),this.#c=new AbortController,this.#s=new WeakMap,this.#i.clear(),this.#o.clear(),this.#a.clear();let e={item:this.#f(this.#e)};this.#r.set(e,this.#e),e.children=this.#p(this.#e),this.#t.root=e,this.#t.loadChildren=this.#n.loadChildren??(({node:e})=>{let n=this.#r.get(e);return n?this.#p(n):[]})}disconnect(){this.#c?.abort(),this.#c=void 0,this.#t.loadChildren=void 0}navigateToValue(e,n){let r=this.#_(this.#e,e);return r?this.#l(r,n):!1}navigateToKeyPath(e,n){let r=this.#t.viewRoot??this.#t.root;if(!r||e.length===0)return!1;this.#u(r);let i=r.children??[];for(let n=0;n<e.length-1;n++){let r=i.find(r=>r.item.key===e[n]);if(!r)return!1;this.#u(r),i=r.children??[]}return this.#t.navigateTo(e,n)}navigateToIdentity(e,n){let r=this.#d(e);if(!r)return!1;let i=[],a=this.#e.getIdentity();for(let e=r;e;e=e.getParent())if(i.unshift(e),e.getIdentity()===a)return this.#l(i,n);return!1}lookupByKey(e){return this.#a.get(e)}sync(){let e=this.#t.root;if(!e)return;this.#s=new WeakMap,this.#i.clear(),this.#o.clear(),this.#a.clear(),this.#r.set(e,this.#e),e.item=this.#f(this.#e);let n=new Set([e]);e.children&&this.#g(this.#e,e.children,n);let r=this.#t.viewRoot;r&&!n.has(r)&&(this.#t.viewRoot=void 0),this.#t.invalidateStructure()}#l(e,n){let r=this.#t.viewRoot??this.#t.root;if(!r)return!1;let i=1;if(this.#t.viewRoot){let n=this.#r.get(r);if(!n)return!1;let a=n.getIdentity(),o=e.findIndex(e=>e.getIdentity()===a);if(o<0)return!1;i=o+1}return i>=e.length?!1:this.navigateToKeyPath(e.slice(i).map(e=>this.#f(e).key),n)}#u(e){if(e.children!==void 0)return;let n=this.#r.get(e);n&&(e.children=this.#p(n))}#d(e){return this.#o.get(e)}#f(e){let n=e.getIdentity(),r=this.#s.get(n);return r||(r=this.#n.valueToItem(e.getValue(),e),this.#s.set(n,r)),r}#p(e){return Array.from(e.children(),e=>this.#m(e))}#m(e){let n=[...e.children()];for(let e of n)this.#o.set(e.getIdentity(),e);let r=this.#f(e),i=r.isLeaf??n.length===0,a={item:{...r,isLeaf:i},children:i?[]:void 0};return this.#h(a,e),a}#h(e,n){this.#r.set(e,n),this.#i.set(n.getIdentity(),e),this.#o.set(n.getIdentity(),n),this.#a.set(e.item.key,n)}#g(e,n,r){let i=new Map(n.map(e=>[e.item.key,e])),a=Array.from(e.children(),e=>{let n=this.#m(e),a=i.get(n.item.key);return a?(a.item=n.item,this.#h(a,e),r.add(a),n.item.isLeaf?a.children=[]:a.children===void 0?a.children=void 0:this.#g(e,a.children,r),a):(r.add(n),n)});n.splice(0,n.length,...a)}#_(e,n,r=[]){let i=[...r,e];if(n(e.getValue()))return i;for(let r of e.children()){let e=this.#_(r,n,i);if(e)return e}}};function nw(e){return e.children!==void 0&&e.children.length>0}function rw(e){return e.flatMap(e=>nw(e)?rw(e.children):[e])}function iw(e,n){for(let r of e){if(r.key===n)return r;let e=r.children?iw(r.children,n):void 0;if(e)return e}}function aw(e,n){return rw(e).find(e=>e.key===n)}const ow=`__all__`;function sw(e,n){let r=n===`desc`?-1:1;return[...e].sort((e,n)=>r*e.label.localeCompare(n.label,void 0,{sensitivity:`base`,numeric:!0}))}function cw(e,n,r,i){if(r===0)return{insert:0,caretOffset:0};let a=2**53-1,o=i;for(let s=0;s<r;s++){if(s===i)continue;let r=e[s],c=e[s+1]??e[e.length-1],l=(r+c)/2,u=Math.abs(n-(n<l?r:c));u<a&&(a=u,o=n<l?s:s+1)}let s=o>i?o-1:o;return{insert:Math.max(0,Math.min(r-1,s)),caretOffset:e[o]??e[e.length-1]}}var lw=class{#e;#t;#n;#r;#i;#a;#o=void 0;#s;#c;#l;#u=[];#d=!0;#f=[];#p=!1;#m;constructor(e){this.id=e.id,this.#e=e.category,this.#t=e.categoryDefaults,this.#n=e.selectionMode,this.#r=e.dataProvider,this.#i=e.onSelectionChange,this.#a=e.onRequestData,this.#m={id:e.id,categoryKey:e.category.key,sort:e.categoryDefaults?.sort??`asc`,grouped:e.categoryDefaults?.grouped??!1,menu:e.categoryDefaults?.menu??!0,width:220}}get state(){return this.getState()}get categoryKey(){return this.#e.key}get menu(){return this.#m.menu}getState(){return{...this.#m}}updateState(e){let n=e;if(e.width!==void 0&&!Number.isFinite(e.width)){let{width:r,...i}=e;n=i}let r=n.sort!==void 0&&n.sort!==this.#m.sort,i=n.grouped!==void 0&&n.grouped!==this.#m.grouped;this.#m={...this.#m,...n},r&&this.#_(),i&&this.#v()}setWidth(e){Number.isFinite(e)&&(this.#m={...this.#m,width:Math.max(80,Math.min(480,Math.round(e)))})}setSort(e){e!==this.#m.sort&&(this.#m={...this.#m,sort:e},this.#_())}setGrouped(e){e!==this.#m.grouped&&(this.#m={...this.#m,grouped:e},this.#v())}setSelectionMode(e){if(e!==this.#n){this.#n=e;for(let n of this.#y())n.selectionMode=e}}setCategory(e){this.#e=e,this.#t=e.defaults,this.#m={...this.#m,categoryKey:e.key,sort:e.defaults?.sort??`asc`,grouped:e.defaults?.grouped??!1,menu:e.defaults?.menu??!0},this.clearSelection(),this.#v()}get listerHost(){return this.#s}get isMounted(){return this.#s!==void 0}setDataProvider(e){this.#r=e}mount(e){if(this.#s)return;this.#s=e;let n=document.createElement(`div`);n.className=`all-row`,n.dataset.key=ow,n.setAttribute(`role`,`button`),n.setAttribute(`tabindex`,`0`);let r=document.createElement(`span`);r.className=`all-label`,n.appendChild(r);let i=()=>{this.#d||this.#x()};n.addEventListener(`click`,i),n.addEventListener(`keydown`,e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),i())}),this.#c=n;let a=document.createElement(`ixfx-grouped-item-lister`);a.crossGroupSelection=!0,a.factory=()=>Vb(uw,{selectionMode:this.#n,interactionMode:`standard`}),a.addEventListener(`select`,this.#b),this.#l=a,this.#v(),this.#C(),e.append(n,a),this.#f.length>0&&(this.#g(),this.#S())}unmount(){this.#w(),this.#c?.remove(),this.#l?.remove(),this.#c=void 0,this.#l=void 0,this.#s=void 0}requestData(e){if(!this.#r)return;this.#w();let n=new AbortController;this.#o=n;let{signal:r}=n;this.#a(this.id,e,r),Promise.resolve().then(async()=>{let n=await dg(this.#r(e,r),r);r.aborted||this.#h(n)}).catch(()=>{})}#h(e){this.#f=e;let n=this.#u.filter(n=>e.some(e=>e.key===n)),r=n.length!==this.#u.length;if(this.#u=n,n.length===0&&(this.#d=!0),!this.#l){r&&this.#i(this.id,n);return}this.#g(),this.#S(),r&&this.#i(this.id,n)}#g(){if(!this.#l)return;let e=sw(this.#f,this.#m.sort);this.#l.provider=()=>e}#_(){!this.#l||this.#f.length===0||(this.#g(),this.#S())}#v(){if(!this.#l)return;let e=this.#t?.groupBy;this.#l.groupBy=e,this.#l.grouped=this.#m.grouped&&e!==void 0,this.#f.length>0&&this.#S()}#y(){return this.#l?this.#l.querySelectorAll(`:scope > .ungrouped-host > *, :scope > ixfx-panel > *`):[]}#b=()=>{if(this.#p)return;let e=[...this.#l?.selectedItems??[]].map(e=>e.key).filter(e=>e!==ow);if(e.length===this.#u.length&&e.every(e=>this.#u.includes(e))){this.#C();return}this.#u=e,this.#d=e.length===0,this.#C(),this.#i(this.id,e)};#x(){let e=this.#u;this.#p=!0;try{this.#u=[],this.#d=!0;for(let e of this.#y())e.clearSelection()}finally{this.#p=!1}this.#C(),e.length>0&&this.#i(this.id,[])}clearSelection(){this.#x()}get selectedValues(){return this.#u}#S(){this.#l&&this.#l.updateComplete.then(()=>{if(!(!this.#l||!this.#s)){this.#p=!0;try{let e=this.#u;for(let n of this.#l.querySelectorAll(`ixfx-vertical-list`))n.selectKeys(e);let n=[...this.#l.selectedItems].map(e=>e.key).filter(e=>e!==ow);this.#u=n,this.#d=n.length===0}finally{this.#p=!1}this.#C()}})}#C(){if(!this.#c)return;let e=this.#t?.allLabel??`All`,n=this.#c.querySelector(`.all-label`);n&&(n.textContent=e),this.#c.toggleAttribute(`data-selected`,this.#d)}#w(){this.#o&&=(this.#o.abort(),void 0)}};function uw(e){let n=document.createElement(`li`);n.dataset.key=e.key;let r=document.createElement(`span`);if(r.className=`item-label`,r.textContent=e.label,n.appendChild(r),e.count!==void 0){let r=document.createElement(`span`);r.className=`count`,r.textContent=String(e.count),n.appendChild(r)}return n}ge(`menu`,`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="1"/><circle cx="19" cy="12" r="1"/><circle cx="5" cy="12" r="1"/></svg>`);let dw=class extends n{constructor(...e){super(...e),this.categories=[],this.selectionMode=`multiple`,this.minColumns=1,this.maxColumns=5,this._columns=[],this._colOffsets=[0],this._resizingColumnId=void 0,this._draggingColumnId=void 0,this._dropCaretX=void 0,this._idCounter=0,this._autoSeeded=!1,this._drag={pointerId:-1,from:-1,startX:0,startY:0,active:!1,ghost:null,insert:-1}}static{this.styles=[w,Yt,r`
|
|
9951
9961
|
:host {
|
|
9952
9962
|
--multicol-list-bg: var(--surface-3);
|
|
9953
9963
|
--multicol-list-header-bg: var(--surface-2);
|
|
@@ -10016,7 +10026,7 @@ const je={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t
|
|
|
10016
10026
|
}
|
|
10017
10027
|
.reorder-handle .ixfx-handle {
|
|
10018
10028
|
--ixfx-handle-length: 14px;
|
|
10019
|
-
--ixfx-handle-thickness: var(--multicol-list-reorder-handle-width,
|
|
10029
|
+
--ixfx-handle-thickness: var(--multicol-list-reorder-handle-width, 6px);
|
|
10020
10030
|
--ixfx-handle-dot-size: 3px;
|
|
10021
10031
|
}
|
|
10022
10032
|
.column-label {
|
|
@@ -10095,6 +10105,7 @@ const je={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t
|
|
|
10095
10105
|
position: relative;
|
|
10096
10106
|
display: flex;
|
|
10097
10107
|
flex-direction: column;
|
|
10108
|
+
--list-gutter: 0;
|
|
10098
10109
|
}
|
|
10099
10110
|
.all-row {
|
|
10100
10111
|
display: flex;
|
|
@@ -10141,11 +10152,11 @@ const je={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t
|
|
|
10141
10152
|
${_(this._columns,e=>e.id,(e,n)=>this._renderColumn(e,n))}
|
|
10142
10153
|
${this._dropCaretX===void 0?a:i`<div class="drop-caret" style="left: ${this._dropCaretX}px"></div>`}
|
|
10143
10154
|
</div>
|
|
10144
|
-
`}updated(e){let n=rw(this.categories)[0];if(!this._autoSeeded&&this._columns.length===0&&n&&(this._autoSeeded=!0,this.addColumn(n.key)),e.has(`selectionMode`))for(let e of this._columns)e.setSelectionMode(this.selectionMode);if(e.has(`dataProvider`))for(let e of this._columns)e.setDataProvider(this.dataProvider);for(let e of this._columns)if(!e.isMounted){let n=this.shadowRoot?.querySelector(`[data-col-id="${e.id}"] .lister-host`);n&&e.mount(n)}e.has(`categories`)&&this._syncColumnsWithCategories(),(e.has(`categories`)||e.has(`dataProvider`))&&this._requeryAllColumns(),this._updateColOffsets()}_renderColumn(e,n){let r=e.getState().width??220,
|
|
10155
|
+
`}updated(e){let n=rw(this.categories)[0];if(!this._autoSeeded&&this._columns.length===0&&n&&(this._autoSeeded=!0,this.addColumn(n.key)),e.has(`selectionMode`))for(let e of this._columns)e.setSelectionMode(this.selectionMode);if(e.has(`dataProvider`))for(let e of this._columns)e.setDataProvider(this.dataProvider);for(let e of this._columns)if(!e.isMounted){let n=this.shadowRoot?.querySelector(`[data-col-id="${e.id}"] .lister-host`);n&&e.mount(n)}e.has(`categories`)&&this._syncColumnsWithCategories(),(e.has(`categories`)||e.has(`dataProvider`))&&this._requeryAllColumns(),this._updateColOffsets()}_renderColumn(e,n){let r=e.getState().width??220,o=Number.isFinite(r)?r:220;return i`
|
|
10145
10156
|
<div
|
|
10146
10157
|
class="column"
|
|
10147
10158
|
data-col-id="${e.id}"
|
|
10148
|
-
style="width: ${
|
|
10159
|
+
style="width: ${o}px"
|
|
10149
10160
|
>
|
|
10150
10161
|
<div
|
|
10151
10162
|
class="column-header"
|
|
@@ -10162,13 +10173,14 @@ const je={216:`O`,223:`s`,248:`o`,273:`d`,295:`h`,305:`i`,320:`l`,322:`l`,359:`t
|
|
|
10162
10173
|
data-tooltip=${this._getCategoryTooltip(e.categoryKey)}
|
|
10163
10174
|
@click=${n=>{n.stopPropagation(),this._openCategoryPicker(e,n.currentTarget)}}
|
|
10164
10175
|
>${this._getCategoryLabel(e.categoryKey)}</button>
|
|
10176
|
+
${e.menu?i`
|
|
10165
10177
|
<button
|
|
10166
10178
|
class="burger-btn"
|
|
10167
10179
|
data-tooltip="Column options"
|
|
10168
10180
|
@click=${n=>{n.stopPropagation(),this._openBurgerMenu(e,n.currentTarget)}}
|
|
10169
10181
|
>
|
|
10170
10182
|
<ixfx-icon name="menu" size="14"></ixfx-icon>
|
|
10171
|
-
</button
|
|
10183
|
+
</button>`:a}
|
|
10172
10184
|
<span
|
|
10173
10185
|
class="resize-handle"
|
|
10174
10186
|
?data-active=${this._resizingColumnId===e.id}
|
package/dist/crumbs.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as TreeTickleEvent, O as TreeSelectEvent, a as TreeComponent, j as TreeDataModel, n as TreeActivateEvent, o as TreeComponentEventMap, x as TreeItemClickEvent, y as TreeExpandEvent } from "./tree-component-
|
|
2
|
-
import { n as TreeExclusivity, o as TreeNode, r as TreeFilterPredicate, s as TreeSelectionFilter, t as LoadChildrenCallback } from "./types-
|
|
1
|
+
import { A as TreeTickleEvent, O as TreeSelectEvent, a as TreeComponent, j as TreeDataModel, n as TreeActivateEvent, o as TreeComponentEventMap, x as TreeItemClickEvent, y as TreeExpandEvent } from "./tree-component-CDsYTBDi.js";
|
|
2
|
+
import { n as TreeExclusivity, o as TreeNode, r as TreeFilterPredicate, s as TreeSelectionFilter, t as LoadChildrenCallback } from "./types-Jky6oNAp.js";
|
|
3
3
|
import "./menu-item-bF6narIz.js";
|
|
4
4
|
import "./index-o-CWDt11.js";
|
|
5
5
|
import { LitElement, PropertyValues } from "lit";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "./icon-CDGprSdE.js";
|
|
2
|
-
import { B as ListNativeDragStartEvent, I as ListDragPreviewRenderer, L as ListDragPreviewSourceResolver } from "./tree-component-
|
|
2
|
+
import { B as ListNativeDragStartEvent, I as ListDragPreviewRenderer, L as ListDragPreviewSourceResolver } from "./tree-component-CDsYTBDi.js";
|
|
3
3
|
import { n as ListViewportChangeEvent, t as ListViewportChangeDetail } from "./list-viewport-types-BRZsLcvp.js";
|
|
4
|
-
import { S as ListSearchController } from "./index-
|
|
5
|
-
import "./index-
|
|
4
|
+
import { S as ListSearchController } from "./index-BvoXLnBf.js";
|
|
5
|
+
import "./index-DxyyVqzA.js";
|
|
6
6
|
import "./pan-text-CoYmt2qd.js";
|
|
7
7
|
import { LitElement } from "lit";
|
|
8
8
|
import { CommandId, CommandRegistry } from "@clinth/ui-commands";
|
package/dist/data-grid.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { B as ListNativeDragStartEvent, F as ListDragPreviewContext, I as ListDragPreviewRenderer, N as ListDragEntry, P as ListDragPreview, R as ListDragSource, z as ListNativeDragStartDetail } from "./tree-component-
|
|
2
|
-
import { A as DataGridEditorFactory, B as GlobalFormatter, C as BuiltInFormatterName, D as DataGridDataType, E as DataGridColumnMenu, F as DataGridInteractionMode, I as DataGridRowLook, L as DataGridSelectionMode, M as DataGridGetRowKey, N as DataGridGroupBy, O as DataGridEditability, P as DataGridGroupLabel, R as DataGridSortDirection, S as DataGridViewportChangeEvent, T as DataGridColumn, _ as DataGridSelectDetail, a as DataGridColumnReorderDetail, b as DataGridSortEvent, c as DataGridColumnResizeEvent, d as DataGridElement, f as DataGridElementEventMap, g as DataGridRowActivateEvent, h as DataGridRowActivateDetail, i as DataGridCellEditEvent, j as DataGridEditorType, k as DataGridEditorContext, l as DataGridColumnVisibilityDetail, m as DataGridGroupChangeEvent, n as DataGridCellClickEvent, o as DataGridColumnReorderEvent, p as DataGridGroupChangeDetail, r as DataGridCellEditDetail, s as DataGridColumnResizeDetail, t as DataGridCellClickDetail, u as DataGridColumnVisibilityEvent, v as DataGridSelectEvent, w as BuiltInFormatterOptions, x as DataGridViewportChangeDetail, y as DataGridSortDetail, z as DataGridSortState } from "./data-grid-
|
|
1
|
+
import { B as ListNativeDragStartEvent, F as ListDragPreviewContext, I as ListDragPreviewRenderer, N as ListDragEntry, P as ListDragPreview, R as ListDragSource, z as ListNativeDragStartDetail } from "./tree-component-CDsYTBDi.js";
|
|
2
|
+
import { A as DataGridEditorFactory, B as GlobalFormatter, C as BuiltInFormatterName, D as DataGridDataType, E as DataGridColumnMenu, F as DataGridInteractionMode, I as DataGridRowLook, L as DataGridSelectionMode, M as DataGridGetRowKey, N as DataGridGroupBy, O as DataGridEditability, P as DataGridGroupLabel, R as DataGridSortDirection, S as DataGridViewportChangeEvent, T as DataGridColumn, _ as DataGridSelectDetail, a as DataGridColumnReorderDetail, b as DataGridSortEvent, c as DataGridColumnResizeEvent, d as DataGridElement, f as DataGridElementEventMap, g as DataGridRowActivateEvent, h as DataGridRowActivateDetail, i as DataGridCellEditEvent, j as DataGridEditorType, k as DataGridEditorContext, l as DataGridColumnVisibilityDetail, m as DataGridGroupChangeEvent, n as DataGridCellClickEvent, o as DataGridColumnReorderEvent, p as DataGridGroupChangeDetail, r as DataGridCellEditDetail, s as DataGridColumnResizeDetail, t as DataGridCellClickDetail, u as DataGridColumnVisibilityEvent, v as DataGridSelectEvent, w as BuiltInFormatterOptions, x as DataGridViewportChangeDetail, y as DataGridSortDetail, z as DataGridSortState } from "./data-grid-DmkId8bu.js";
|
|
3
3
|
export { type BuiltInFormatterName, type BuiltInFormatterOptions, DataGridCellClickDetail, DataGridCellClickEvent, DataGridCellEditDetail, DataGridCellEditEvent, type DataGridColumn, type DataGridColumnMenu, DataGridColumnReorderDetail, DataGridColumnReorderEvent, DataGridColumnResizeDetail, DataGridColumnResizeEvent, DataGridColumnVisibilityDetail, DataGridColumnVisibilityEvent, type DataGridDataType, type DataGridEditability, type DataGridEditorContext, type DataGridEditorFactory, type DataGridEditorType, DataGridElement, DataGridElementEventMap, type DataGridGetRowKey, type DataGridGroupBy, DataGridGroupChangeDetail, DataGridGroupChangeEvent, type DataGridGroupLabel, type DataGridInteractionMode, DataGridRowActivateDetail, DataGridRowActivateEvent, type DataGridRowLook, DataGridSelectDetail, DataGridSelectEvent, type DataGridSelectionMode, DataGridSortDetail, type DataGridSortDirection, DataGridSortEvent, type DataGridSortState, DataGridViewportChangeDetail, DataGridViewportChangeEvent, type GlobalFormatter, type ListDragEntry, type ListDragPreview, type ListDragPreviewContext, type ListDragPreviewRenderer, type ListDragSource, type ListNativeDragStartDetail, type ListNativeDragStartEvent };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import "./icon-CDGprSdE.js";
|
|
2
2
|
import { r as IDataProvider } from "./data-provider-BAn_-oR1.js";
|
|
3
|
-
import { B as ListNativeDragStartEvent, I as ListDragPreviewRenderer, L as ListDragPreviewSourceResolver } from "./tree-component-
|
|
3
|
+
import { B as ListNativeDragStartEvent, I as ListDragPreviewRenderer, L as ListDragPreviewSourceResolver } from "./tree-component-CDsYTBDi.js";
|
|
4
4
|
import { n as ListViewportChangeEvent } from "./list-viewport-types-BRZsLcvp.js";
|
|
5
|
-
import { S as ListSearchController } from "./index-
|
|
5
|
+
import { S as ListSearchController } from "./index-BvoXLnBf.js";
|
|
6
6
|
import { a as ListGroupEventMap, o as ListGroupInfo, s as ListGroupLabel } from "./grouping-CUKgmkMm.js";
|
|
7
7
|
import { i as ListInteractionMode, l as ListSelectionMode, r as ListElementEventMap } from "./list-selection-types-PjKdhF-a.js";
|
|
8
|
-
import { n as CustomCheckboxOptions, t as AddItemOptions } from "./vertical-list-
|
|
8
|
+
import { n as CustomCheckboxOptions, t as AddItemOptions } from "./vertical-list-ztrdFvyT.js";
|
|
9
9
|
import "./list-group-header.js";
|
|
10
10
|
import { LitElement, PropertyValues } from "lit";
|
|
11
11
|
import { CommandId, CommandRegistry } from "@clinth/ui-commands";
|