@ixfx/components 0.16.1 → 0.16.2
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 +216 -56
- package/bundle/index.js +370 -315
- package/dist/ac-text.d.ts +1 -1
- package/dist/{ac-token-qEs3FsQv.d.ts → ac-token-Cq7lsYf-.d.ts} +1 -1
- package/dist/ac-token.d.ts +1 -1
- package/dist/ac-token.js +1 -1
- package/dist/{button-N92DKoWb.d.ts → button-D1sPDUCM.d.ts} +1 -1
- package/dist/button.d.ts +1 -1
- package/dist/colour-picker.d.ts +1 -1
- package/dist/{crumb-navigation-YnFVFqrx.js → crumb-navigation-D3ndPgFg.js} +2 -2
- package/dist/{crumb-navigation-BbqfmkYs.d.ts → crumb-navigation-nnr881n-.d.ts} +1 -1
- package/dist/crumbs.d.ts +1 -1
- package/dist/crumbs.js +1 -1
- package/dist/{data-grid-Csh5EJW9.d.ts → data-grid-BAEpfTkb.d.ts} +22 -4
- package/dist/{data-grid-Cqxuwgbb.js → data-grid-CaPLWt5E.js} +138 -57
- package/dist/data-grid.d.ts +2 -2
- package/dist/data-grid.js +1 -1
- package/dist/{detail-list-Bo5ze3SN.js → detail-list-C3XKTRmE.js} +71 -20
- package/dist/{detail-list-DSZ1DDor.d.ts → detail-list-DK49TsJd.d.ts} +12 -4
- package/dist/detail-list.d.ts +2 -2
- package/dist/detail-list.js +1 -1
- package/dist/{flat-list-CT9kX3TQ.d.ts → flat-list-Bv4-qfjp.d.ts} +9 -4
- package/dist/flat-list.d.ts +1 -1
- package/dist/flat-list.js +6 -3
- package/dist/{grid-list-D0dJNVEF.js → grid-list-51XsR2X2.js} +55 -18
- package/dist/{grid-list-DDLrWRxm.d.ts → grid-list-DaeSHv9P.d.ts} +58 -14
- package/dist/grid-list.d.ts +2 -2
- package/dist/grid-list.js +1 -1
- package/dist/{grouped-item-lister-DETte0Dh.d.ts → grouped-item-lister-DZIjo9nO.d.ts} +2 -2
- package/dist/grouped-item-lister.d.ts +1 -1
- package/dist/{icon-CDGprSdE.d.ts → icon-DR_3rSyZ.d.ts} +1 -1
- package/dist/icons.d.ts +2 -2
- package/dist/{incr-search-CgbL-OlS.js → incr-search-2YaxUUA9.js} +10 -1
- package/dist/incr-search.d.ts +1 -1
- package/dist/incr-search.js +1 -1
- package/dist/{index-CoqtMSd9.d.ts → index-BUB5SICW.d.ts} +1 -1
- package/dist/{index-CUErGhCg.d.ts → index-BjRoPrwj.d.ts} +1 -1
- package/dist/{index-DN2BWctP.d.ts → index-Bz3loIAf.d.ts} +1 -1
- package/dist/{index-UvnoZUAo.d.ts → index-CJ5fshD3.d.ts} +1 -1
- package/dist/{index-DxyyVqzA.d.ts → index-DM9OLgTH.d.ts} +3 -2
- package/dist/{index-Bnm-kKGC.d.ts → index-DXDz60XH.d.ts} +20 -1
- package/dist/{index-CYndvTWH.d.ts → index-garxxqgV.d.ts} +1 -1
- package/dist/{index-D-lZNlHa.d.ts → index-vdbbGE7N.d.ts} +1 -1
- package/dist/index.d.ts +45 -25
- package/dist/index.js +15 -14
- package/dist/item-appearance-Bl6rMIID.js +60 -0
- package/dist/{labelled-input-base-DiTme1JO.d.ts → labelled-input-base-Dp_9KP0G.d.ts} +1 -1
- package/dist/labelled-radial-input.d.ts +2 -2
- package/dist/labelled-range-input.d.ts +1 -1
- package/dist/labelled-slider-input.d.ts +1 -1
- package/dist/list-group-header.d.ts +1 -1
- package/dist/{list-selection-controller-5L0Nj9tR.js → list-selection-controller-CJDdjH7E.js} +192 -54
- package/dist/list-selection-types-hj9Njei3.d.ts +83 -0
- package/dist/{menu-CU9KAm8s.js → menu-BX1FHxY8.js} +16 -1
- package/dist/{menu-item-bF6narIz.d.ts → menu-item-B0zqw2xp.d.ts} +1 -1
- package/dist/{menu-item-BUv8An2k.js → menu-item-oxU1VKiJ.js} +34 -9
- package/dist/menu.d.ts +2 -2
- package/dist/menu.js +2 -2
- package/dist/{miller-DUqiUAWQ.js → miller-BfrTcujx.js} +142 -11
- package/dist/miller.d.ts +1 -1
- package/dist/miller.js +1 -1
- package/dist/narrowed-text.js +1 -1
- package/dist/panel.d.ts +1 -1
- package/dist/{split-layout-CophkNeU.d.ts → split-layout-ChZ0Glrs.d.ts} +1 -1
- package/dist/split-layout.d.ts +1 -1
- package/dist/sunburst-tree.d.ts +1 -1
- package/dist/sunburst-tree.js +1 -1
- package/dist/{sunbursttree-list-B_M0YTEA.js → sunbursttree-list-906G33ME.js} +1 -1
- package/dist/{sunbursttree-list-DePuFYlU.d.ts → sunbursttree-list-BAS0KrDG.d.ts} +1 -1
- package/dist/{tab-list-Df371rqw.d.ts → tab-list-wC0xNz1b.d.ts} +1 -1
- package/dist/tabs.d.ts +1 -1
- package/dist/{titlebar-Tqu-VvMU.d.ts → titlebar-B5zSTZnF.d.ts} +1 -1
- package/dist/titlebar.d.ts +1 -1
- package/dist/{tree-DAlgvaHB.js → tree-C_H1COTf.js} +1 -1
- package/dist/tree.d.ts +1 -1
- package/dist/tree.js +1 -1
- package/dist/{vertical-list-SAx56U-l.d.ts → vertical-list-od4050Bo.d.ts} +11 -2
- package/dist/{vertical-list-DyKPKGxK.js → vertical-list-qMRIxZIT.js} +54 -20
- package/dist/vertical-list.d.ts +2 -2
- package/dist/vertical-list.js +1 -1
- package/docs-user/data-grid.md +10 -3
- package/docs-user/detail-list.md +1 -1
- package/docs-user/grid-list.md +4 -1
- package/docs-user/index.json +2 -2
- package/docs-user/menu.md +11 -1
- package/docs-user/vertical-list.md +9 -1
- package/package.json +1 -1
- package/dist/item-appearance-BjcMyauw.js +0 -29
- package/dist/list-selection-types-PjKdhF-a.d.ts +0 -45
|
@@ -3,14 +3,14 @@ import { t as themeFallbacks } from "./fallbacks-DQ_5OsmR.js";
|
|
|
3
3
|
import { n as safeCustomElement, t as __decorate } from "./decorate-VRK8rslU.js";
|
|
4
4
|
import "./icon-1gpwtPx8.js";
|
|
5
5
|
import { t as DataController } from "./data-controller-DOlmqNKb.js";
|
|
6
|
-
import { c as createElementListSearchAdapter, i as ListSearchController, n as listSearchStyles, o as registerListSearchCommands, r as LIST_SEARCH_MODES, u as keyForElement } from "./incr-search-
|
|
6
|
+
import { c as createElementListSearchAdapter, d as keysOfElements, i as ListSearchController, n as listSearchStyles, o as registerListSearchCommands, r as LIST_SEARCH_MODES, u as keyForElement } from "./incr-search-2YaxUUA9.js";
|
|
7
7
|
import { a as toGroupKey, r as partitionByGroup } from "./grouping-RYPnHkrS.js";
|
|
8
8
|
import { i as animateListItemOut, r as animateListItemIn, t as ListNativeDragController } from "./list-native-drag-controller-CcXoS0YX.js";
|
|
9
|
-
import {
|
|
9
|
+
import { i as ListDragSelectController, n as gestureOf, t as ListSelectionController } from "./list-selection-controller-CJDdjH7E.js";
|
|
10
10
|
import { a as capKeys, d as partitionKeys, l as keysToArray, o as flagsFromRecord } from "./pending-BGidHppL.js";
|
|
11
|
-
import { a as
|
|
11
|
+
import { a as isPartialKey, i as applyPartialAttributes, n as appearanceColor, o as sameKeySet, t as appearanceAbsent } from "./item-appearance-Bl6rMIID.js";
|
|
12
12
|
import { t as scrollFadeStyles } from "./scroll-fade-Xx28D7mH.js";
|
|
13
|
-
import {
|
|
13
|
+
import { a as restoreElementScroll, o as scrollToOffset, r as captureElementScroll, t as ViewStateController } from "./view-state-controller-BdyXWUUM.js";
|
|
14
14
|
import "./list-group-header.js";
|
|
15
15
|
import { LitElement, css, html, nothing, render } from "lit";
|
|
16
16
|
import { property, query, state } from "lit/decorators.js";
|
|
@@ -332,6 +332,7 @@ let DetailListElement = class DetailListElement extends LitElement {
|
|
|
332
332
|
interactionMode: this.interactionMode
|
|
333
333
|
}),
|
|
334
334
|
getKey: keyForElement,
|
|
335
|
+
onIntent: (intent) => this._dispatchCancelable(`list-select-intent`, intent) === false,
|
|
335
336
|
getGroupKey: (el) => this.#groupIndex.get(el) ?? null,
|
|
336
337
|
crossGroupSelection: () => this.crossGroupSelection,
|
|
337
338
|
getFallbackGroupKey: () => {
|
|
@@ -343,7 +344,8 @@ let DetailListElement = class DetailListElement extends LitElement {
|
|
|
343
344
|
this._dispatch(`list-select`, {
|
|
344
345
|
selected,
|
|
345
346
|
previous,
|
|
346
|
-
selectedKeys: this.selection.selectedKeys
|
|
347
|
+
selectedKeys: this.selection.selectedKeys,
|
|
348
|
+
previousKeys: keysOfElements(previous)
|
|
347
349
|
});
|
|
348
350
|
this.#viewState.notify();
|
|
349
351
|
}
|
|
@@ -436,6 +438,8 @@ let DetailListElement = class DetailListElement extends LitElement {
|
|
|
436
438
|
getLabel: (el) => el.getAttribute(`data-search-label`) ?? el.textContent?.trim() ?? ``,
|
|
437
439
|
highlightKey: SEARCH_HIGHLIGHT_KEY
|
|
438
440
|
}) });
|
|
441
|
+
this.#partialKeys = /* @__PURE__ */ new Set();
|
|
442
|
+
this.#markedPartial = /* @__PURE__ */ new Set();
|
|
439
443
|
this.#onListScroll = () => {
|
|
440
444
|
if (!this.#viewState.pendingScroll) this.#viewState.notify();
|
|
441
445
|
if (this.#viewportScrollRaf !== 0) return;
|
|
@@ -459,7 +463,7 @@ let DetailListElement = class DetailListElement extends LitElement {
|
|
|
459
463
|
if ((e.ctrlKey || e.metaKey) && e.key === `a`) {
|
|
460
464
|
if (this.selection.canSelectAll()) {
|
|
461
465
|
e.preventDefault();
|
|
462
|
-
this.selection.selectAll();
|
|
466
|
+
this.selection.selectAll(`keyboard`);
|
|
463
467
|
}
|
|
464
468
|
return;
|
|
465
469
|
}
|
|
@@ -468,17 +472,17 @@ let DetailListElement = class DetailListElement extends LitElement {
|
|
|
468
472
|
case `ArrowDown`:
|
|
469
473
|
e.preventDefault();
|
|
470
474
|
this.#navigateDown();
|
|
471
|
-
if (e.shiftKey && this.interactionMode === `vscode`) {
|
|
475
|
+
if (e.shiftKey && (this.interactionMode === `vscode` || this.interactionMode === `manual`)) {
|
|
472
476
|
const cur = this.tickled.tickledId;
|
|
473
|
-
if (cur) this.selection.
|
|
477
|
+
if (cur) this.selection.handleExtend(cur);
|
|
474
478
|
}
|
|
475
479
|
break;
|
|
476
480
|
case `ArrowUp`:
|
|
477
481
|
e.preventDefault();
|
|
478
482
|
this.#navigateUp();
|
|
479
|
-
if (e.shiftKey && this.interactionMode === `vscode`) {
|
|
483
|
+
if (e.shiftKey && (this.interactionMode === `vscode` || this.interactionMode === `manual`)) {
|
|
480
484
|
const cur = this.tickled.tickledId;
|
|
481
|
-
if (cur) this.selection.
|
|
485
|
+
if (cur) this.selection.handleExtend(cur);
|
|
482
486
|
}
|
|
483
487
|
break;
|
|
484
488
|
case `ArrowRight`:
|
|
@@ -502,7 +506,7 @@ let DetailListElement = class DetailListElement extends LitElement {
|
|
|
502
506
|
if (id) {
|
|
503
507
|
e.preventDefault();
|
|
504
508
|
this._dispatch(`list-item-click`, { item: id });
|
|
505
|
-
this._activateItem(id);
|
|
509
|
+
this._activateItem(id, `keyboard`);
|
|
506
510
|
}
|
|
507
511
|
break;
|
|
508
512
|
}
|
|
@@ -514,7 +518,7 @@ let DetailListElement = class DetailListElement extends LitElement {
|
|
|
514
518
|
}
|
|
515
519
|
break;
|
|
516
520
|
}
|
|
517
|
-
case `Escape`: this.selection.
|
|
521
|
+
case `Escape`: this.selection.handleClear(`keyboard`);
|
|
518
522
|
}
|
|
519
523
|
};
|
|
520
524
|
this._onClick = (e) => {
|
|
@@ -529,7 +533,7 @@ let DetailListElement = class DetailListElement extends LitElement {
|
|
|
529
533
|
if (!item) return;
|
|
530
534
|
this.focus();
|
|
531
535
|
this._dispatch(`list-item-click`, { item });
|
|
532
|
-
this.selection.handleClick(item, e);
|
|
536
|
+
this.selection.handleClick(item, gestureOf(e));
|
|
533
537
|
};
|
|
534
538
|
this._onDblClick = (e) => {
|
|
535
539
|
const item = this._findListItem(e.composedPath());
|
|
@@ -1807,7 +1811,41 @@ let DetailListElement = class DetailListElement extends LitElement {
|
|
|
1807
1811
|
this.#appliedSelected = new Set(selected);
|
|
1808
1812
|
this.#appliedChecked = checked;
|
|
1809
1813
|
if (this.dataset.inputMode !== this.tickled.inputMode) this.dataset.inputMode = this.tickled.inputMode;
|
|
1810
|
-
if (selectionChanged)
|
|
1814
|
+
if (selectionChanged) {
|
|
1815
|
+
this.#syncPartial();
|
|
1816
|
+
this._syncCheckboxes();
|
|
1817
|
+
}
|
|
1818
|
+
}
|
|
1819
|
+
#partialKeys;
|
|
1820
|
+
/** Rows currently carrying `data-partial`. */
|
|
1821
|
+
#markedPartial;
|
|
1822
|
+
/**
|
|
1823
|
+
* Rows shown as *partially* selected (a part of the resource is selected):
|
|
1824
|
+
* `data-partial`, an indeterminate checkbox in `checked` mode, and an
|
|
1825
|
+
* accessible description. Independent of `selectedKeys` — a key in both
|
|
1826
|
+
* counts as selected. Replace-on-set.
|
|
1827
|
+
*/
|
|
1828
|
+
get partialKeys() {
|
|
1829
|
+
return this.#partialKeys;
|
|
1830
|
+
}
|
|
1831
|
+
set partialKeys(keys) {
|
|
1832
|
+
const next = new Set(keys);
|
|
1833
|
+
if (sameKeySet(next, this.#partialKeys)) return;
|
|
1834
|
+
this.#partialKeys = next;
|
|
1835
|
+
this.#itemStatesFullSync = true;
|
|
1836
|
+
this._syncItemStates();
|
|
1837
|
+
}
|
|
1838
|
+
/** Touch only the rows whose partial state changed: O(partial keys), not O(rows). */
|
|
1839
|
+
#syncPartial() {
|
|
1840
|
+
const selected = this.selection.selected;
|
|
1841
|
+
const next = /* @__PURE__ */ new Set();
|
|
1842
|
+
for (const key of this.#partialKeys) {
|
|
1843
|
+
const el = this.#itemForKey(key);
|
|
1844
|
+
if (el && isPartialKey(key, this.#partialKeys, selected.has(el))) next.add(el);
|
|
1845
|
+
}
|
|
1846
|
+
for (const el of this.#markedPartial) if (!next.has(el)) applyPartialAttributes(el, false);
|
|
1847
|
+
for (const el of next) if (!this.#markedPartial.has(el)) applyPartialAttributes(el, true);
|
|
1848
|
+
this.#markedPartial = next;
|
|
1811
1849
|
}
|
|
1812
1850
|
_syncCheckboxes() {
|
|
1813
1851
|
const inCheckedMode = this.interactionMode === `checked`;
|
|
@@ -1837,16 +1875,22 @@ let DetailListElement = class DetailListElement extends LitElement {
|
|
|
1837
1875
|
el.prepend(cb);
|
|
1838
1876
|
}
|
|
1839
1877
|
const checked = this.selection.selected.has(el);
|
|
1878
|
+
const partial = isPartialKey(keyForElement(el), this.#partialKeys, checked);
|
|
1840
1879
|
if (wantsCustom) {
|
|
1841
|
-
cb.setAttribute(`aria-checked`, String(checked));
|
|
1880
|
+
cb.setAttribute(`aria-checked`, partial ? `mixed` : String(checked));
|
|
1842
1881
|
cb.toggleAttribute(`data-checked`, checked);
|
|
1882
|
+
cb.toggleAttribute(`data-partial`, partial);
|
|
1843
1883
|
if (this.checkboxRenderer) {
|
|
1844
1884
|
const renderer = typeof this.checkboxRenderer === `function` ? this.checkboxRenderer : this.checkboxRenderer.renderer;
|
|
1845
1885
|
render(renderer(checked), cb);
|
|
1846
1886
|
}
|
|
1847
1887
|
} else {
|
|
1848
1888
|
const input = cb.querySelector(`input.ixfx-list-checkbox`);
|
|
1849
|
-
if (input)
|
|
1889
|
+
if (input) {
|
|
1890
|
+
input.checked = checked;
|
|
1891
|
+
input.indeterminate = partial;
|
|
1892
|
+
}
|
|
1893
|
+
cb.setAttribute(`aria-checked`, partial ? `mixed` : String(checked));
|
|
1850
1894
|
}
|
|
1851
1895
|
}
|
|
1852
1896
|
}
|
|
@@ -1865,7 +1909,7 @@ let DetailListElement = class DetailListElement extends LitElement {
|
|
|
1865
1909
|
cell.setAttribute(`part`, `checkbox`);
|
|
1866
1910
|
cell.addEventListener(`click`, (e) => {
|
|
1867
1911
|
e.stopPropagation();
|
|
1868
|
-
this.selection.
|
|
1912
|
+
this.selection.handleCheckbox(el);
|
|
1869
1913
|
});
|
|
1870
1914
|
const input = document.createElement(`input`);
|
|
1871
1915
|
input.type = `checkbox`;
|
|
@@ -1884,7 +1928,7 @@ let DetailListElement = class DetailListElement extends LitElement {
|
|
|
1884
1928
|
span.setAttribute(`part`, `checkbox`);
|
|
1885
1929
|
span.addEventListener(`click`, (e) => {
|
|
1886
1930
|
e.stopPropagation();
|
|
1887
|
-
this.selection.
|
|
1931
|
+
this.selection.handleCheckbox(el);
|
|
1888
1932
|
});
|
|
1889
1933
|
return span;
|
|
1890
1934
|
}
|
|
@@ -1949,8 +1993,8 @@ let DetailListElement = class DetailListElement extends LitElement {
|
|
|
1949
1993
|
visibleKeys
|
|
1950
1994
|
});
|
|
1951
1995
|
}
|
|
1952
|
-
_activateItem(item) {
|
|
1953
|
-
|
|
1996
|
+
_activateItem(item, source = `pointer`) {
|
|
1997
|
+
this.selection.handleReplace(item, source);
|
|
1954
1998
|
this._dispatch(`list-activate`, { item });
|
|
1955
1999
|
}
|
|
1956
2000
|
static {
|
|
@@ -2070,6 +2114,13 @@ let DetailListElement = class DetailListElement extends LitElement {
|
|
|
2070
2114
|
outline: 1px solid transparent;
|
|
2071
2115
|
}
|
|
2072
2116
|
|
|
2117
|
+
/* Partially selected: a dashed edge, lighter than a full selection. Hook: --item-bg-partial. */
|
|
2118
|
+
::slotted([data-partial]) {
|
|
2119
|
+
background: var(--item-bg-partial, color-mix(in srgb, var(--item-bg-selected) 35%, transparent));
|
|
2120
|
+
outline: 1px dashed var(--item-border-partial, var(--border));
|
|
2121
|
+
outline-offset: -1px;
|
|
2122
|
+
}
|
|
2123
|
+
|
|
2073
2124
|
::slotted([data-selected][data-tickled]) {
|
|
2074
2125
|
background: var(--item-bg-selected-tickled);
|
|
2075
2126
|
outline: 2px dashed var(--surface-3);
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import "./icon-
|
|
1
|
+
import "./icon-DR_3rSyZ.js";
|
|
2
2
|
import { r as IDataProvider } from "./data-provider-BAn_-oR1.js";
|
|
3
3
|
import { L as ListDragPreviewRenderer, R as ListDragPreviewSourceResolver, V as ListNativeDragStartEvent } from "./tree-component-DgfkxmVY.js";
|
|
4
4
|
import { a as ViewStateBase, s as ViewStateChangeEvent, t as GetViewStateOptions } from "./types-LU1u0CB8.js";
|
|
5
5
|
import "./index-9ttcdwlL.js";
|
|
6
6
|
import { n as ListViewportChangeEvent } from "./list-viewport-types-BRZsLcvp.js";
|
|
7
|
-
import {
|
|
7
|
+
import { i as ListInteractionMode, m as ListSelectionMode, r as ListElementEventMap } from "./list-selection-types-hj9Njei3.js";
|
|
8
|
+
import { S as ListSearchController } from "./index-BjRoPrwj.js";
|
|
8
9
|
import { a as ListGroupEventMap, o as ListGroupInfo, s as ListGroupLabel } from "./grouping-CUKgmkMm.js";
|
|
9
|
-
import {
|
|
10
|
-
import { n as CustomCheckboxOptions, t as AddItemOptions } from "./vertical-list-SAx56U-l.js";
|
|
10
|
+
import { n as CustomCheckboxOptions, t as AddItemOptions } from "./vertical-list-od4050Bo.js";
|
|
11
11
|
import "./list-group-header.js";
|
|
12
12
|
import { LitElement, PropertyValues } from "lit";
|
|
13
13
|
import { CommandId, CommandRegistry } from "@clinth/ui-commands";
|
|
@@ -267,6 +267,14 @@ declare class DetailListElement extends LitElement {
|
|
|
267
267
|
* only the items whose state changed are touched, so hovering is O(1).
|
|
268
268
|
*/
|
|
269
269
|
private _syncItemStates;
|
|
270
|
+
/**
|
|
271
|
+
* Rows shown as *partially* selected (a part of the resource is selected):
|
|
272
|
+
* `data-partial`, an indeterminate checkbox in `checked` mode, and an
|
|
273
|
+
* accessible description. Independent of `selectedKeys` — a key in both
|
|
274
|
+
* counts as selected. Replace-on-set.
|
|
275
|
+
*/
|
|
276
|
+
get partialKeys(): ReadonlySet<string>;
|
|
277
|
+
set partialKeys(keys: Iterable<string>);
|
|
270
278
|
private _syncCheckboxes;
|
|
271
279
|
/**
|
|
272
280
|
* Native checkbox cell: a span that stretches to the row's full cross-axis
|
package/dist/detail-list.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { B as ListNativeDragStartDetail, F as ListDragPreview, I as ListDragPreviewContext, L as ListDragPreviewRenderer, P as ListDragEntry, V as ListNativeDragStartEvent, z as ListDragSource } from "./tree-component-DgfkxmVY.js";
|
|
2
2
|
import { n as ListViewportChangeEvent, t as ListViewportChangeDetail } from "./list-viewport-types-BRZsLcvp.js";
|
|
3
3
|
import { i as ListGroupChangeEvent, l as ListGroupToggleDetail, n as ListGroupBy, o as ListGroupInfo, r as ListGroupChangeDetail, s as ListGroupLabel, u as ListGroupToggleEvent } from "./grouping-CUKgmkMm.js";
|
|
4
|
-
import { a as DetailSortComparator, c as DetailListViewState, i as DetailGroupBy, n as DetailListElementEventMap, o as DetailSortItem, r as DetailFormatter, s as DetailSortMode, t as DetailListElement } from "./detail-list-
|
|
5
|
-
import { n as CustomCheckboxOptions, t as AddItemOptions } from "./vertical-list-
|
|
4
|
+
import { a as DetailSortComparator, c as DetailListViewState, i as DetailGroupBy, n as DetailListElementEventMap, o as DetailSortItem, r as DetailFormatter, s as DetailSortMode, t as DetailListElement } from "./detail-list-DK49TsJd.js";
|
|
5
|
+
import { n as CustomCheckboxOptions, t as AddItemOptions } from "./vertical-list-od4050Bo.js";
|
|
6
6
|
export { type AddItemOptions, type CustomCheckboxOptions, type DetailFormatter, type DetailGroupBy, DetailListElement, DetailListElementEventMap, type DetailListViewState, type DetailSortComparator, type DetailSortItem, type DetailSortMode, type ListDragEntry, type ListDragPreview, type ListDragPreviewContext, type ListDragPreviewRenderer, type ListDragSource, type ListGroupBy, type ListGroupChangeDetail, type ListGroupChangeEvent, type ListGroupInfo, type ListGroupLabel, type ListGroupToggleDetail, type ListGroupToggleEvent, type ListNativeDragStartDetail, type ListNativeDragStartEvent, type ListViewportChangeDetail, type ListViewportChangeEvent };
|
package/dist/detail-list.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import "./icon-
|
|
1
|
+
import "./icon-DR_3rSyZ.js";
|
|
2
2
|
import { M as TreeDataModel } from "./tree-component-DgfkxmVY.js";
|
|
3
3
|
import { o as TreeNode, r as TreeFilterPredicate, t as LoadChildrenCallback } from "./types-Jky6oNAp.js";
|
|
4
4
|
import { a as ViewStateBase, t as GetViewStateOptions } from "./types-LU1u0CB8.js";
|
|
5
5
|
import "./index-9ttcdwlL.js";
|
|
6
|
-
import "./crumb-navigation-
|
|
7
|
-
import { i as ListInteractionMode,
|
|
8
|
-
import { r as VerticalListElement } from "./vertical-list-
|
|
6
|
+
import "./crumb-navigation-nnr881n-.js";
|
|
7
|
+
import { i as ListInteractionMode, m as ListSelectionMode } from "./list-selection-types-hj9Njei3.js";
|
|
8
|
+
import { r as VerticalListElement } from "./vertical-list-od4050Bo.js";
|
|
9
9
|
import { LitElement, PropertyValues } from "lit";
|
|
10
10
|
//#region src/flat-list/types.d.ts
|
|
11
11
|
/** How branches and leaves are ordered within one level. */
|
|
@@ -121,6 +121,11 @@ declare class FlatListElement extends LitElement {
|
|
|
121
121
|
branchOrder: FlatListBranchOrder;
|
|
122
122
|
selectionMode: ListSelectionMode;
|
|
123
123
|
interactionMode: ListInteractionMode;
|
|
124
|
+
/**
|
|
125
|
+
* Row keys shown as *partially* selected (see `ixfx-vertical-list`'s
|
|
126
|
+
* `partialKeys`). Independent of the selection; a key in both counts as selected.
|
|
127
|
+
*/
|
|
128
|
+
partialKeys: ReadonlySet<string>;
|
|
124
129
|
itemWrap: `stop` | `wrap`;
|
|
125
130
|
searchModes: string | undefined;
|
|
126
131
|
itemsDraggable: boolean;
|
package/dist/flat-list.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as FlatListSelectEvent, a as FlatListContextMenuDetail, c as FlatListDropEvent, d as FlatListEditCommitDetail, f as FlatListEditCommitEvent, g as FlatListSelectDetail, h as FlatListNavigateEvent, i as FlatListBranchOrder, l as FlatListEditCancelDetail, m as FlatListNavigateDetail, n as FlatListActivateDetail, o as FlatListContextMenuEvent, p as FlatListElementEventMap, r as FlatListActivateEvent, s as FlatListDropDetail, t as FlatListElement, u as FlatListEditCancelEvent, v as FlatListViewState } from "./flat-list-
|
|
1
|
+
import { _ as FlatListSelectEvent, a as FlatListContextMenuDetail, c as FlatListDropEvent, d as FlatListEditCommitDetail, f as FlatListEditCommitEvent, g as FlatListSelectDetail, h as FlatListNavigateEvent, i as FlatListBranchOrder, l as FlatListEditCancelDetail, m as FlatListNavigateDetail, n as FlatListActivateDetail, o as FlatListContextMenuEvent, p as FlatListElementEventMap, r as FlatListActivateEvent, s as FlatListDropDetail, t as FlatListElement, u as FlatListEditCancelEvent, v as FlatListViewState } from "./flat-list-Bv4-qfjp.js";
|
|
2
2
|
export { type FlatListActivateDetail, type FlatListActivateEvent, type FlatListBranchOrder, type FlatListContextMenuDetail, type FlatListContextMenuEvent, type FlatListDropDetail, type FlatListDropEvent, type FlatListEditCancelDetail, type FlatListEditCancelEvent, type FlatListEditCommitDetail, type FlatListEditCommitEvent, FlatListElement, type FlatListElementEventMap, type FlatListNavigateDetail, type FlatListNavigateEvent, type FlatListSelectDetail, type FlatListSelectEvent, type FlatListViewState };
|
package/dist/flat-list.js
CHANGED
|
@@ -2,11 +2,11 @@ import { t as TickledController } from "./tickled-controller-D-HZymaZ.js";
|
|
|
2
2
|
import { t as themeFallbacks } from "./fallbacks-DQ_5OsmR.js";
|
|
3
3
|
import { n as safeCustomElement, t as __decorate } from "./decorate-VRK8rslU.js";
|
|
4
4
|
import "./icon-1gpwtPx8.js";
|
|
5
|
+
import { n as appearanceColor, t as appearanceAbsent } from "./item-appearance-Bl6rMIID.js";
|
|
5
6
|
import { t as collectDataResult } from "./data-provider-35TyWclX.js";
|
|
6
7
|
import { t as ViewStateController } from "./view-state-controller-BdyXWUUM.js";
|
|
7
|
-
import { n as resolveKeyPath } from "./crumb-navigation-
|
|
8
|
-
import
|
|
9
|
-
import "./vertical-list-DyKPKGxK.js";
|
|
8
|
+
import { n as resolveKeyPath } from "./crumb-navigation-D3ndPgFg.js";
|
|
9
|
+
import "./vertical-list-qMRIxZIT.js";
|
|
10
10
|
import { LitElement, css, html, nothing } from "lit";
|
|
11
11
|
import { property, state } from "lit/decorators.js";
|
|
12
12
|
//#region src/flat-list/flat-list.ts
|
|
@@ -73,6 +73,7 @@ let FlatListElement = class FlatListElement extends LitElement {
|
|
|
73
73
|
this.branchOrder = `first`;
|
|
74
74
|
this.selectionMode = `single`;
|
|
75
75
|
this.interactionMode = `standard`;
|
|
76
|
+
this.partialKeys = /* @__PURE__ */ new Set();
|
|
76
77
|
this.itemWrap = `stop`;
|
|
77
78
|
this.itemsDraggable = false;
|
|
78
79
|
this.itemsDroppable = false;
|
|
@@ -597,6 +598,7 @@ let FlatListElement = class FlatListElement extends LitElement {
|
|
|
597
598
|
key-property="key"
|
|
598
599
|
.selectionMode=${this.selectionMode}
|
|
599
600
|
.interactionMode=${this.interactionMode}
|
|
601
|
+
.partialKeys=${this.partialKeys}
|
|
600
602
|
.itemWrap=${this.itemWrap}
|
|
601
603
|
.searchModes=${this.searchModes}
|
|
602
604
|
?items-draggable=${this.itemsDraggable}
|
|
@@ -742,6 +744,7 @@ __decorate([property({
|
|
|
742
744
|
type: String,
|
|
743
745
|
attribute: `interaction-mode`
|
|
744
746
|
})], FlatListElement.prototype, "interactionMode", void 0);
|
|
747
|
+
__decorate([property({ attribute: false })], FlatListElement.prototype, "partialKeys", void 0);
|
|
745
748
|
__decorate([property({
|
|
746
749
|
type: String,
|
|
747
750
|
attribute: `item-wrap`
|
|
@@ -2,16 +2,16 @@ import { t as TickledController } from "./tickled-controller-D-HZymaZ.js";
|
|
|
2
2
|
import { n as tickledStyles, t as tickledItemStyles } from "./tickled-styles-BrAHEj1q.js";
|
|
3
3
|
import { t as themeFallbacks } from "./fallbacks-DQ_5OsmR.js";
|
|
4
4
|
import { n as safeCustomElement, t as __decorate } from "./decorate-VRK8rslU.js";
|
|
5
|
-
import { c as createElementListSearchAdapter,
|
|
5
|
+
import { c as createElementListSearchAdapter, f as createDataListSearchAdapter, i as ListSearchController, n as listSearchStyles, o as registerListSearchCommands, r as LIST_SEARCH_MODES, u as keyForElement } from "./incr-search-2YaxUUA9.js";
|
|
6
6
|
import { i as resolveGroupKey, r as partitionByGroup } from "./grouping-RYPnHkrS.js";
|
|
7
7
|
import { a as listItemFadeKeyframes, t as ListNativeDragController } from "./list-native-drag-controller-CcXoS0YX.js";
|
|
8
|
-
import {
|
|
8
|
+
import { i as ListDragSelectController, n as gestureOf, t as ListSelectionController } from "./list-selection-controller-CJDdjH7E.js";
|
|
9
9
|
import { c as keysAsFlags, f as withoutFlag, i as capFlags, l as keysToArray, o as flagsFromRecord, s as flagsToRecord, t as EMPTY_FLAGS } from "./pending-BGidHppL.js";
|
|
10
|
+
import { a as isPartialKey, n as appearanceColor, o as sameKeySet, r as PARTIAL_DESCRIPTION, t as appearanceAbsent } from "./item-appearance-Bl6rMIID.js";
|
|
10
11
|
import { n as createScrollHoverGuard } from "./scroll-hover-guard-Cjw6179Q.js";
|
|
11
12
|
import "./interaction-E-uMGHkJ.js";
|
|
12
|
-
import { t as ViewStateController } from "./view-state-controller-BdyXWUUM.js";
|
|
13
13
|
import { t as scrollFadeStyles } from "./scroll-fade-Xx28D7mH.js";
|
|
14
|
-
import {
|
|
14
|
+
import { t as ViewStateController } from "./view-state-controller-BdyXWUUM.js";
|
|
15
15
|
import "./pan-text-CqtvjPyK.js";
|
|
16
16
|
import "./list-group-header.js";
|
|
17
17
|
import { LitElement, css, html, nothing } from "lit";
|
|
@@ -847,6 +847,7 @@ let GridListElement = class GridListElement extends LitElement {
|
|
|
847
847
|
interactionMode: this.interactionMode
|
|
848
848
|
}),
|
|
849
849
|
getKey: (k) => k,
|
|
850
|
+
onIntent: (intent) => this._dispatch(`list-select-intent`, intent, true) === false,
|
|
850
851
|
getGroupKey: (k) => this.groupBy === null ? null : this.#source.groupKeyOfKey(k),
|
|
851
852
|
crossGroupSelection: () => this.crossGroupSelection,
|
|
852
853
|
getFallbackGroupKey: () => {
|
|
@@ -940,8 +941,8 @@ let GridListElement = class GridListElement extends LitElement {
|
|
|
940
941
|
this.#marqueeRect = rect;
|
|
941
942
|
this.requestUpdate();
|
|
942
943
|
},
|
|
943
|
-
onCommit: (finalSet) => {
|
|
944
|
-
this.selection.applyDragSelection(finalSet);
|
|
944
|
+
onCommit: (finalSet, info) => {
|
|
945
|
+
this.selection.applyDragSelection(finalSet, info);
|
|
945
946
|
this.#marqueePreview = /* @__PURE__ */ new Set();
|
|
946
947
|
this.#marqueeRect = void 0;
|
|
947
948
|
this.requestUpdate();
|
|
@@ -968,6 +969,8 @@ let GridListElement = class GridListElement extends LitElement {
|
|
|
968
969
|
this.#resolveKey = (key) => this.#source.indexOfKey(key) >= 0 ? key : void 0;
|
|
969
970
|
this.#markedTickled = /* @__PURE__ */ new Set();
|
|
970
971
|
this.#markedSelected = /* @__PURE__ */ new Set();
|
|
972
|
+
this.#markedPartial = /* @__PURE__ */ new Set();
|
|
973
|
+
this.#partialKeys = /* @__PURE__ */ new Set();
|
|
971
974
|
this.#selectedSnapshot = /* @__PURE__ */ new Set();
|
|
972
975
|
this.#onScroll = (e) => {
|
|
973
976
|
const el = e.target;
|
|
@@ -1001,7 +1004,7 @@ let GridListElement = class GridListElement extends LitElement {
|
|
|
1001
1004
|
if ((e.ctrlKey || e.metaKey) && e.key === `a`) {
|
|
1002
1005
|
if (this.selection.canSelectAll()) {
|
|
1003
1006
|
e.preventDefault();
|
|
1004
|
-
this.selection.selectAll();
|
|
1007
|
+
this.selection.selectAll(`keyboard`);
|
|
1005
1008
|
}
|
|
1006
1009
|
return;
|
|
1007
1010
|
}
|
|
@@ -1065,7 +1068,7 @@ let GridListElement = class GridListElement extends LitElement {
|
|
|
1065
1068
|
if (id) {
|
|
1066
1069
|
e.preventDefault();
|
|
1067
1070
|
this.#emitItemEvent(`list-item-click`, id);
|
|
1068
|
-
this.#onCellActivate(id);
|
|
1071
|
+
this.#onCellActivate(id, `keyboard`);
|
|
1069
1072
|
}
|
|
1070
1073
|
break;
|
|
1071
1074
|
}
|
|
@@ -1079,7 +1082,7 @@ let GridListElement = class GridListElement extends LitElement {
|
|
|
1079
1082
|
}
|
|
1080
1083
|
case `Escape`:
|
|
1081
1084
|
if (this.#nativeDragging) this.#clearNativeDragState();
|
|
1082
|
-
this.selection.
|
|
1085
|
+
this.selection.handleClear(`keyboard`);
|
|
1083
1086
|
break;
|
|
1084
1087
|
default: return;
|
|
1085
1088
|
}
|
|
@@ -1314,6 +1317,11 @@ let GridListElement = class GridListElement extends LitElement {
|
|
|
1314
1317
|
outline: 2px solid var(--accent);
|
|
1315
1318
|
outline-offset: -2px;
|
|
1316
1319
|
}
|
|
1320
|
+
/* Partially selected: a dashed ring, lighter than a full selection. */
|
|
1321
|
+
.cell.partial:not(.selected) {
|
|
1322
|
+
outline: 2px dashed var(--grid-list-partial-outline, var(--accent));
|
|
1323
|
+
outline-offset: -2px;
|
|
1324
|
+
}
|
|
1317
1325
|
:host(:not([caption-style="separate"])) .cell.selected.tickled {
|
|
1318
1326
|
background: var(--item-bg-selected-tickled);
|
|
1319
1327
|
outline: 2px dashed var(--surface-3);
|
|
@@ -2489,6 +2497,24 @@ let GridListElement = class GridListElement extends LitElement {
|
|
|
2489
2497
|
/** Light-DOM items currently carrying `data-tickled` / `data-selected`. */
|
|
2490
2498
|
#markedTickled;
|
|
2491
2499
|
#markedSelected;
|
|
2500
|
+
#markedPartial;
|
|
2501
|
+
#partialKeys;
|
|
2502
|
+
/**
|
|
2503
|
+
* Cells shown as *partially* selected (a part of the resource is selected):
|
|
2504
|
+
* `data-partial` / `part="item partial"` and an accessible description.
|
|
2505
|
+
* Independent of `selectedKeys` — a key in both counts as selected.
|
|
2506
|
+
* Replace-on-set; keys without a cell are kept for when it appears.
|
|
2507
|
+
*/
|
|
2508
|
+
get partialKeys() {
|
|
2509
|
+
return this.#partialKeys;
|
|
2510
|
+
}
|
|
2511
|
+
set partialKeys(keys) {
|
|
2512
|
+
const next = new Set(keys);
|
|
2513
|
+
if (sameKeySet(next, this.#partialKeys)) return;
|
|
2514
|
+
this.#partialKeys = next;
|
|
2515
|
+
this._syncItemStates();
|
|
2516
|
+
this.requestUpdate();
|
|
2517
|
+
}
|
|
2492
2518
|
/**
|
|
2493
2519
|
* Mirror cursor / selection onto the light-DOM items as `data-tickled` /
|
|
2494
2520
|
* `data-selected`. Only the items whose state changed are touched, so a
|
|
@@ -2516,6 +2542,12 @@ let GridListElement = class GridListElement extends LitElement {
|
|
|
2516
2542
|
}
|
|
2517
2543
|
this.#markedTickled = syncMarker(`data-tickled`, this.#markedTickled, tickledEl ? /* @__PURE__ */ new Set([tickledEl]) : /* @__PURE__ */ new Set());
|
|
2518
2544
|
this.#markedSelected = syncMarker(`data-selected`, this.#markedSelected, selectedEls);
|
|
2545
|
+
const partialEls = /* @__PURE__ */ new Set();
|
|
2546
|
+
for (const key of this.#partialKeys) {
|
|
2547
|
+
const el = selected.has(key) ? void 0 : elementFor(key);
|
|
2548
|
+
if (el) partialEls.add(el);
|
|
2549
|
+
}
|
|
2550
|
+
this.#markedPartial = syncMarker(`data-partial`, this.#markedPartial, partialEls);
|
|
2519
2551
|
this.setAttribute(`data-input-mode`, this.tickled.inputMode);
|
|
2520
2552
|
}
|
|
2521
2553
|
#emitSelect(selected, previous) {
|
|
@@ -2641,6 +2673,7 @@ let GridListElement = class GridListElement extends LitElement {
|
|
|
2641
2673
|
#renderDataCell(index, win) {
|
|
2642
2674
|
const key = this.#source.keyAt(index);
|
|
2643
2675
|
const selected = this.#selectedSnapshot.has(key);
|
|
2676
|
+
const partial = isPartialKey(key, this.#partialKeys, selected);
|
|
2644
2677
|
const marquee = this.#marqueePreview.has(key);
|
|
2645
2678
|
const tickled = this.tickled.isTickled(key);
|
|
2646
2679
|
const selectable = this.#source.isSelectable(index);
|
|
@@ -2656,10 +2689,11 @@ let GridListElement = class GridListElement extends LitElement {
|
|
|
2656
2689
|
const icon = appearanceAbsent(rawIcon) ? void 0 : rawIcon;
|
|
2657
2690
|
return html`
|
|
2658
2691
|
<div
|
|
2659
|
-
class="cell${selected ? ` selected` : ``}${tickled ? ` tickled` : ``}${marquee ? ` marquee` : ``}${this.#recycledKeys.has(key) ? ` recycled` : ``}${this.#nativeDragging && key === this.#dragOriginKey ? ` dragging-origin` : ``}"
|
|
2660
|
-
part="item${selected ? ` selected` : ``}${tickled ? ` tickled` : ``}"
|
|
2692
|
+
class="cell${selected ? ` selected` : ``}${partial ? ` partial` : ``}${tickled ? ` tickled` : ``}${marquee ? ` marquee` : ``}${this.#recycledKeys.has(key) ? ` recycled` : ``}${this.#nativeDragging && key === this.#dragOriginKey ? ` dragging-origin` : ``}"
|
|
2693
|
+
part="item${selected ? ` selected` : ``}${partial ? ` partial` : ``}${tickled ? ` tickled` : ``}"
|
|
2661
2694
|
role="option"
|
|
2662
2695
|
aria-selected=${selected ? `true` : `false`}
|
|
2696
|
+
aria-description=${partial ? PARTIAL_DESCRIPTION : nothing}
|
|
2663
2697
|
aria-setsize=${this.#source.count}
|
|
2664
2698
|
aria-posinset=${index + 1}
|
|
2665
2699
|
style="width:${this.itemSize}px;height:${cellHeight}px;transform:translate(${x}px,${y}px)"
|
|
@@ -2667,6 +2701,7 @@ let GridListElement = class GridListElement extends LitElement {
|
|
|
2667
2701
|
data-key=${key}
|
|
2668
2702
|
draggable=${draggable ? `true` : `false`}
|
|
2669
2703
|
?data-selected=${selected}
|
|
2704
|
+
?data-partial=${partial}
|
|
2670
2705
|
?data-tickled=${tickled}
|
|
2671
2706
|
?data-marquee=${marquee}
|
|
2672
2707
|
@click=${(e) => this.#onCellClick(e, key)}
|
|
@@ -2763,6 +2798,7 @@ let GridListElement = class GridListElement extends LitElement {
|
|
|
2763
2798
|
#renderCell(el, index, win) {
|
|
2764
2799
|
const key = this.#source.keyAt(index);
|
|
2765
2800
|
const selected = this.#selectedSnapshot.has(key);
|
|
2801
|
+
const partial = isPartialKey(key, this.#partialKeys, selected);
|
|
2766
2802
|
const marquee = this.#marqueePreview.has(key);
|
|
2767
2803
|
const tickled = this.tickled.isTickled(key);
|
|
2768
2804
|
const entering = this.#entering.has(el);
|
|
@@ -2778,10 +2814,11 @@ let GridListElement = class GridListElement extends LitElement {
|
|
|
2778
2814
|
const captionCss = separate ? `height:${Math.max(0, this.captionHeight - 4)}px` : style === `under` ? `height:${this.captionHeight}px` : ``;
|
|
2779
2815
|
return html`
|
|
2780
2816
|
<div
|
|
2781
|
-
class="cell${selected ? ` selected` : ``}${tickled ? ` tickled` : ``}${entering ? ` entering` : ``}${marquee ? ` marquee` : ``}${this.#recycledKeys.has(key) ? ` recycled` : ``}${this.#nativeDragging && key === this.#dragOriginKey ? ` dragging-origin` : ``}"
|
|
2782
|
-
part="item${selected ? ` selected` : ``}${tickled ? ` tickled` : ``}"
|
|
2817
|
+
class="cell${selected ? ` selected` : ``}${partial ? ` partial` : ``}${tickled ? ` tickled` : ``}${entering ? ` entering` : ``}${marquee ? ` marquee` : ``}${this.#recycledKeys.has(key) ? ` recycled` : ``}${this.#nativeDragging && key === this.#dragOriginKey ? ` dragging-origin` : ``}"
|
|
2818
|
+
part="item${selected ? ` selected` : ``}${partial ? ` partial` : ``}${tickled ? ` tickled` : ``}"
|
|
2783
2819
|
role="option"
|
|
2784
2820
|
aria-selected=${selected ? `true` : `false`}
|
|
2821
|
+
aria-description=${partial ? PARTIAL_DESCRIPTION : nothing}
|
|
2785
2822
|
aria-setsize=${this.#source.count}
|
|
2786
2823
|
aria-posinset=${index + 1}
|
|
2787
2824
|
style="width:${this.itemSize}px;height:${cellHeight}px;transform:translate(${x}px,${y}px)"
|
|
@@ -2789,6 +2826,7 @@ let GridListElement = class GridListElement extends LitElement {
|
|
|
2789
2826
|
data-key=${key}
|
|
2790
2827
|
draggable=${draggable ? `true` : `false`}
|
|
2791
2828
|
?data-selected=${selected}
|
|
2829
|
+
?data-partial=${partial}
|
|
2792
2830
|
?data-tickled=${tickled}
|
|
2793
2831
|
?data-marquee=${marquee}
|
|
2794
2832
|
@click=${(e) => this.#onCellClick(e, key)}
|
|
@@ -2869,7 +2907,7 @@ let GridListElement = class GridListElement extends LitElement {
|
|
|
2869
2907
|
}
|
|
2870
2908
|
#onCellClick(e, key) {
|
|
2871
2909
|
if (this.#dragSelect.isDragging || this.#nativeDragging || this.#nativeDrag.isDragging || this.#postDragSuppressTimer !== 0) return;
|
|
2872
|
-
this.selection.handleClick(key, e);
|
|
2910
|
+
this.selection.handleClick(key, gestureOf(e));
|
|
2873
2911
|
this.#emitItemEvent(`list-item-click`, key);
|
|
2874
2912
|
}
|
|
2875
2913
|
/**
|
|
@@ -2882,11 +2920,10 @@ let GridListElement = class GridListElement extends LitElement {
|
|
|
2882
2920
|
*/
|
|
2883
2921
|
#onViewportClick(e) {
|
|
2884
2922
|
const mode = this.interactionMode;
|
|
2885
|
-
if (mode === `manual`) return;
|
|
2886
2923
|
if (this.selectionMode === `none` && mode !== `checked` && mode !== `sticky`) return;
|
|
2887
2924
|
if (this.#dragSelect.isDragging || this.#nativeDragging || this.#nativeDrag.isDragging || this.#postDragSuppressTimer !== 0) return;
|
|
2888
2925
|
for (const node of e.composedPath()) if (node instanceof Element && (node.classList.contains(`cell`) || node.classList.contains(`group-header`))) return;
|
|
2889
|
-
this.selection.
|
|
2926
|
+
this.selection.handleClear(`pointer`, true);
|
|
2890
2927
|
}
|
|
2891
2928
|
#startPostDragSuppressTimer() {
|
|
2892
2929
|
if (this.#postDragSuppressTimer) clearTimeout(this.#postDragSuppressTimer);
|
|
@@ -2900,8 +2937,8 @@ let GridListElement = class GridListElement extends LitElement {
|
|
|
2900
2937
|
this.toggleAttribute(`data-native-dragging`, false);
|
|
2901
2938
|
this.removeAttribute(`aria-label`);
|
|
2902
2939
|
}
|
|
2903
|
-
#onCellActivate(key) {
|
|
2904
|
-
|
|
2940
|
+
#onCellActivate(key, source = `pointer`) {
|
|
2941
|
+
this.selection.handleReplace(key, source);
|
|
2905
2942
|
this.#emitItemEvent(`list-activate`, key);
|
|
2906
2943
|
}
|
|
2907
2944
|
};
|