@ixfx/components 0.15.4 → 0.16.0
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 +1223 -48
- package/bundle/index.js +875 -700
- package/dist/ac-text.d.ts +1 -1
- package/dist/{ac-token-Cq7lsYf-.d.ts → ac-token-qEs3FsQv.d.ts} +1 -1
- package/dist/ac-token.d.ts +1 -1
- package/dist/colour-picker.d.ts +1 -1
- package/dist/crumb-navigation-BbqfmkYs.d.ts +147 -0
- package/dist/crumb-navigation-YnFVFqrx.js +1290 -0
- package/dist/crumbs.d.ts +2 -115
- package/dist/crumbs.js +1 -1179
- package/dist/{data-grid-CbiubdG2.d.ts → data-grid-CIG2DVip.d.ts} +58 -9
- package/dist/{data-grid-Dx3l3dxw.js → data-grid-rMkLX2qo.js} +630 -215
- package/dist/data-grid.d.ts +3 -3
- package/dist/data-grid.js +1 -1
- package/dist/{detail-list-ClkMV0SN.d.ts → detail-list-6iMTNP4N.d.ts} +35 -5
- package/dist/{detail-list-q8bs67BM.js → detail-list-C4pDSoI8.js} +218 -7
- package/dist/detail-list.d.ts +4 -4
- package/dist/detail-list.js +1 -1
- package/dist/{flat-list-0xTZdXzh.d.ts → flat-list-JPgQSmLW.d.ts} +28 -5
- package/dist/flat-list.d.ts +2 -2
- package/dist/flat-list.js +123 -4
- package/dist/{grid-list-y6dWJYu3.js → grid-list-CdEkScn-.js} +276 -75
- package/dist/{grid-list-BnWJUIBC.d.ts → grid-list-D6n7WH8l.d.ts} +128 -22
- package/dist/grid-list.d.ts +3 -3
- package/dist/grid-list.js +1 -1
- package/dist/{grouped-item-lister-Bhyo-dkH.d.ts → grouped-item-lister-DETte0Dh.d.ts} +1 -1
- package/dist/grouped-item-lister.d.ts +1 -1
- package/dist/{icon-DR_3rSyZ.d.ts → icon-CDGprSdE.d.ts} +1 -1
- package/dist/icons.d.ts +2 -2
- package/dist/incr-search.d.ts +1 -1
- package/dist/index-9ttcdwlL.d.ts +71 -0
- package/dist/{index-BAuqR9El.d.ts → index-Bx0BXPxI.d.ts} +52 -6
- package/dist/index-CYRc6Dah.d.ts +475 -0
- package/dist/{index-garxxqgV.d.ts → index-CYndvTWH.d.ts} +1 -1
- package/dist/{index-BUB5SICW.d.ts → index-CoqtMSd9.d.ts} +1 -1
- package/dist/{index-Bz3loIAf.d.ts → index-DN2BWctP.d.ts} +1 -1
- package/dist/{index-BPTuCRGb.d.ts → index-Dr80Zdl6.d.ts} +2 -2
- package/dist/{index-cnaRPQPp.d.ts → index-DxyyVqzA.d.ts} +2 -2
- package/dist/{index-CJ5fshD3.d.ts → index-UvnoZUAo.d.ts} +1 -1
- package/dist/index.d.ts +380 -33
- package/dist/index.js +2247 -866
- package/dist/{labelled-input-base-Dp_9KP0G.d.ts → labelled-input-base-DiTme1JO.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-native-drag-controller-O2Nruqpi.d.ts → list-native-drag-controller-D_UrXipS.d.ts} +1 -1
- package/dist/{list-selection-controller-BeE70lbB.js → list-selection-controller-5L0Nj9tR.js} +87 -2
- package/dist/{menu-item-B0zqw2xp.d.ts → menu-item-bF6narIz.d.ts} +1 -1
- package/dist/menu.d.ts +2 -2
- package/dist/miller-BFRfn0ve.js +2237 -0
- package/dist/miller.d.ts +4 -437
- package/dist/miller.js +1 -1815
- package/dist/panel.d.ts +1 -1
- package/dist/pending-BGidHppL.js +91 -0
- package/dist/scroll-hover-guard-Cjw6179Q.js +35 -0
- package/dist/{split-layout-C5SYbDrq.d.ts → split-layout-CophkNeU.d.ts} +42 -4
- package/dist/{split-layout-Deoxy47d.js → split-layout-DTY4PJRp.js} +251 -19
- package/dist/split-layout.d.ts +1 -1
- package/dist/split-layout.js +1 -1
- package/dist/sunburst-tree.d.ts +2 -0
- package/dist/sunburst-tree.js +2 -0
- package/dist/sunbursttree-list-B_VxOHlo.js +1556 -0
- package/dist/sunbursttree-list-D6j5BxVQ.d.ts +303 -0
- package/dist/{tab-list-wC0xNz1b.d.ts → tab-list-Df371rqw.d.ts} +1 -1
- package/dist/tabs.d.ts +1 -1
- package/dist/{titlebar-B5zSTZnF.d.ts → titlebar-Tqu-VvMU.d.ts} +1 -1
- package/dist/titlebar.d.ts +1 -1
- package/dist/tree-CftHwtEb.js +146 -0
- package/dist/{tree-D8VxvR9u.js → tree-Crdpl4nc.js} +275 -47
- package/dist/{tree-component-C6UHO-w9.d.ts → tree-component-DgfkxmVY.d.ts} +19 -8
- package/dist/tree.d.ts +3 -3
- package/dist/tree.js +1 -1
- package/dist/types-LU1u0CB8.d.ts +87 -0
- package/dist/vertical-list-1V1Vg2O5.js +1993 -0
- package/dist/{vertical-list-B8FoU-pU.d.ts → vertical-list-BPDmZx6T.d.ts} +31 -3
- package/dist/vertical-list.d.ts +3 -3
- package/dist/vertical-list.js +1 -1789
- package/dist/view-state-controller-BdyXWUUM.js +305 -0
- package/docs-user/README.md +3 -0
- package/docs-user/crumbs.md +27 -0
- package/docs-user/data-grid.md +77 -5
- package/docs-user/detail-list.md +54 -0
- package/docs-user/dock.md +54 -12
- package/docs-user/flat-list.md +27 -0
- package/docs-user/grid-list.md +64 -11
- package/docs-user/hyperbolic-tree.md +31 -4
- package/docs-user/icicle-tree.md +36 -0
- package/docs-user/index.json +17 -2
- package/docs-user/llms.txt +3 -0
- package/docs-user/miller.md +52 -21
- package/docs-user/multicol-list.md +50 -8
- package/docs-user/split-layout.md +45 -17
- package/docs-user/sunburst-tree.md +223 -0
- package/docs-user/tree.md +46 -7
- package/docs-user/treemap.md +32 -0
- package/docs-user/twosplit-layout.md +22 -0
- package/docs-user/user-catalog.md +1 -1
- package/docs-user/vertical-list.md +55 -7
- package/llms.txt +3 -0
- package/package.json +5 -1
|
@@ -1,13 +1,61 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { L as ListDragPreviewRenderer, R as ListDragPreviewSourceResolver, V as ListNativeDragStartEvent } from "./tree-component-DgfkxmVY.js";
|
|
2
|
+
import { a as ViewStateBase, t as GetViewStateOptions } from "./types-LU1u0CB8.js";
|
|
3
|
+
import "./index-9ttcdwlL.js";
|
|
4
|
+
import { S as ListSearchController } from "./index-Dr80Zdl6.js";
|
|
3
5
|
import "./pan-text-CoYmt2qd.js";
|
|
4
6
|
import { i as ListGroupChangeEvent, n as ListGroupBy, o as ListGroupInfo, s as ListGroupLabel, u as ListGroupToggleEvent } from "./grouping-CUKgmkMm.js";
|
|
5
7
|
import { i as ListInteractionMode, l as ListSelectionMode } from "./list-selection-types-PjKdhF-a.js";
|
|
6
8
|
import "./list-group-header.js";
|
|
7
|
-
import "./list-native-drag-controller-
|
|
9
|
+
import "./list-native-drag-controller-D_UrXipS.js";
|
|
8
10
|
import { i as TickledItem, n as TickledController } from "./tickled-controller-DodxD3eQ.js";
|
|
9
11
|
import { LitElement, PropertyValues, ReactiveController, ReactiveControllerHost, html } from "lit";
|
|
10
12
|
import { CommandRegistry } from "@clinth/ui-commands";
|
|
13
|
+
//#region src/common/view-state/pending.d.ts
|
|
14
|
+
/**
|
|
15
|
+
* Pure helpers for *pending* view state: keyed intent that is waiting for a
|
|
16
|
+
* matching item to appear in the data.
|
|
17
|
+
*
|
|
18
|
+
* Pending sets / maps are insertion-ordered (oldest first) and capped so a
|
|
19
|
+
* long-running app with churning data can't grow them without bound.
|
|
20
|
+
*/
|
|
21
|
+
/** Default cap on pending keys per facet. Oldest entries are dropped first. */
|
|
22
|
+
declare const MAX_PENDING_KEYS = 2000;
|
|
23
|
+
type PendingKeys = ReadonlySet<string>;
|
|
24
|
+
type PendingFlags = ReadonlyMap<string, boolean>;
|
|
25
|
+
declare const EMPTY_KEYS: PendingKeys;
|
|
26
|
+
declare const EMPTY_FLAGS: PendingFlags;
|
|
27
|
+
/**
|
|
28
|
+
* Split `keys` into those `has` reports present (to apply now) and those
|
|
29
|
+
* still missing (to keep pending). Returns the input set untouched as
|
|
30
|
+
* `missing` when nothing matched, so callers can cheaply detect "no change".
|
|
31
|
+
*/
|
|
32
|
+
declare function partitionKeys(keys: PendingKeys, has: (key: string) => boolean): {
|
|
33
|
+
readonly present: readonly string[];
|
|
34
|
+
readonly missing: PendingKeys;
|
|
35
|
+
};
|
|
36
|
+
/** As {@link partitionKeys}, for keyed boolean flags (e.g. expanded / collapsed). */
|
|
37
|
+
declare function partitionFlags(flags: PendingFlags, has: (key: string) => boolean): {
|
|
38
|
+
readonly present: ReadonlyArray<readonly [string, boolean]>;
|
|
39
|
+
readonly missing: PendingFlags;
|
|
40
|
+
};
|
|
41
|
+
/** Keep at most `max` keys, dropping the oldest. */
|
|
42
|
+
declare function capKeys(keys: PendingKeys, max?: number): PendingKeys;
|
|
43
|
+
/** Keep at most `max` flags, dropping the oldest. */
|
|
44
|
+
declare function capFlags(flags: PendingFlags, max?: number): PendingFlags;
|
|
45
|
+
/** `flags` without `key` (same instance when absent). */
|
|
46
|
+
declare function withoutFlag(flags: PendingFlags, key: string): PendingFlags;
|
|
47
|
+
/** JSON record → flags map. Non-boolean values are ignored. */
|
|
48
|
+
declare function flagsFromRecord(record: Readonly<Record<string, boolean>> | undefined): PendingFlags;
|
|
49
|
+
/**
|
|
50
|
+
* Combine pending and live flags into one JSON record. Live entries win when
|
|
51
|
+
* a key is in both (it shouldn't be — matched keys leave pending).
|
|
52
|
+
*/
|
|
53
|
+
declare function flagsToRecord(...sources: Array<Iterable<readonly [string, boolean]>>): Record<string, boolean>;
|
|
54
|
+
/** Pending keys followed by live keys, de-duplicated, as a JSON array. */
|
|
55
|
+
declare function keysToArray(...sources: Array<Iterable<string>>): string[];
|
|
56
|
+
/** Map `keys` to `true` flags — for components that record a plain key set. */
|
|
57
|
+
declare function keysAsFlags(keys: Iterable<string>, value?: boolean): Iterable<readonly [string, boolean]>;
|
|
58
|
+
//#endregion
|
|
11
59
|
//#region src/interaction/list-drag-select-controller.d.ts
|
|
12
60
|
/** Surface-relative rectangle: origin at the scroll container's top-left. */
|
|
13
61
|
type DragSelectRect = {
|
|
@@ -220,6 +268,29 @@ declare class ListSelectionController<T> {
|
|
|
220
268
|
* fires once if anything changed.
|
|
221
269
|
*/
|
|
222
270
|
removeKeys(keys: Iterable<string>, resolve: (key: string) => T | undefined): void;
|
|
271
|
+
/** Selected keys waiting for their items to appear. */
|
|
272
|
+
get pendingKeys(): PendingKeys;
|
|
273
|
+
/**
|
|
274
|
+
* Restore a selection by key: keys that resolve are selected now (one
|
|
275
|
+
* `onChange`), the rest are kept pending for `resolvePending()`. Replaces
|
|
276
|
+
* any previous selection and pending keys. Unlike `selectKeys`, this works
|
|
277
|
+
* in `selectionMode="none"` only to the extent of holding keys pending.
|
|
278
|
+
*/
|
|
279
|
+
restoreKeys(keys: Iterable<string>, resolve: (key: string) => T | undefined): void;
|
|
280
|
+
/**
|
|
281
|
+
* Select pending keys whose items now resolve (call after items are added
|
|
282
|
+
* or rebuilt). Fires `onChange` once when anything was selected; returns
|
|
283
|
+
* whether it did.
|
|
284
|
+
*/
|
|
285
|
+
resolvePending(resolve: (key: string) => T | undefined): boolean;
|
|
286
|
+
/**
|
|
287
|
+
* Silently deselect `items` that left the data, keeping their keys pending
|
|
288
|
+
* so they are re-selected if the same keys come back (data reset, re-fetch).
|
|
289
|
+
* No `onChange`; returns whether the selection changed.
|
|
290
|
+
*/
|
|
291
|
+
demote(items: Iterable<T>): boolean;
|
|
292
|
+
/** Drop pending keys without touching the live selection. */
|
|
293
|
+
clearPending(): void;
|
|
223
294
|
/** Route a click on `item` according to the current interaction mode. */
|
|
224
295
|
handleClick(item: T, gesture: ListSelectionGesture): void;
|
|
225
296
|
/** Route a Space keypress on `item` according to the current interaction mode. */
|
|
@@ -234,7 +305,8 @@ declare class ListSelectionController<T> {
|
|
|
234
305
|
remap(fn: (item: T) => T): void;
|
|
235
306
|
/**
|
|
236
307
|
* Hard reset: empty the selection and clear the anchor without firing
|
|
237
|
-
* `onChange` (e.g. when all items are removed).
|
|
308
|
+
* `onChange` (e.g. when all items are removed). Keyed selected items become
|
|
309
|
+
* pending, so a rebuilt item set re-selects them via `resolvePending()`.
|
|
238
310
|
*/
|
|
239
311
|
reset(): void;
|
|
240
312
|
/**
|
|
@@ -404,6 +476,23 @@ interface GridListFullElementEventMap extends GridListElementEventMap {
|
|
|
404
476
|
'list-native-drag-start': ListNativeDragStartEvent;
|
|
405
477
|
}
|
|
406
478
|
//#endregion
|
|
479
|
+
//#region src/grid-list/grid-list-view-state.d.ts
|
|
480
|
+
/**
|
|
481
|
+
* Pure view-state helpers for `ixfx-grid-list`. The component runs
|
|
482
|
+
* {@link reconcileGroups} whenever its item set or grouping changes, so a
|
|
483
|
+
* group's collapsed state survives the group disappearing (data reset,
|
|
484
|
+
* filter, streaming) and comes back when the group does. Scroll is captured
|
|
485
|
+
* and restored arithmetically from the virtual layout, along the main axis
|
|
486
|
+
* (`scrollLeft` in `row` orientation, `scrollTop` otherwise).
|
|
487
|
+
*/
|
|
488
|
+
/**
|
|
489
|
+
* `ixfx-grid-list` view state. All fields are the shared base fields:
|
|
490
|
+
* `selected` (item keys), `focus` (keyboard cursor key), `scroll`, and
|
|
491
|
+
* `expanded` (group key → open; groups default open, so only `false` entries
|
|
492
|
+
* are ever recorded).
|
|
493
|
+
*/
|
|
494
|
+
type GridListViewState = ViewStateBase;
|
|
495
|
+
//#endregion
|
|
407
496
|
//#region src/grid-list/grid-list.d.ts
|
|
408
497
|
declare class GridListElement<T = unknown> extends LitElement {
|
|
409
498
|
#private;
|
|
@@ -417,18 +506,17 @@ declare class GridListElement<T = unknown> extends LitElement {
|
|
|
417
506
|
*/
|
|
418
507
|
disableHoverTickle: boolean;
|
|
419
508
|
/**
|
|
420
|
-
*
|
|
421
|
-
* wheel / trackpad gesture replaces the cell
|
|
422
|
-
*
|
|
423
|
-
* emit `list-tickle` even though the pointer never moved.
|
|
424
|
-
*
|
|
425
|
-
*
|
|
426
|
-
*
|
|
427
|
-
*
|
|
428
|
-
*
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
disableScrollHoverTickle: boolean;
|
|
509
|
+
* Let hover follow cells that scroll beneath a stationary pointer. Off by
|
|
510
|
+
* default: with virtualisation, a wheel / trackpad gesture replaces the cell
|
|
511
|
+
* beneath the pointer, and following its `pointerenter` would move the
|
|
512
|
+
* cursor and emit `list-tickle` even though the pointer never moved. While a
|
|
513
|
+
* scroll gesture is active those enters are ignored and the host carries a
|
|
514
|
+
* `data-scroll-hover-suppress` attribute that gates the CSS `:hover`
|
|
515
|
+
* highlight, so the visual cursor holds still too. Hover resumes on the next
|
|
516
|
+
* real pointer movement, or after the pointer leaves the list. Click
|
|
517
|
+
* selection, keyboard navigation, and `focusKey()` are unaffected.
|
|
518
|
+
*/
|
|
519
|
+
scrollHoverTickle: boolean;
|
|
432
520
|
itemSize: number;
|
|
433
521
|
gap: number;
|
|
434
522
|
/**
|
|
@@ -618,8 +706,9 @@ declare class GridListElement<T = unknown> extends LitElement {
|
|
|
618
706
|
removeSelectedKeys(keys: Iterable<string>): void;
|
|
619
707
|
/**
|
|
620
708
|
* Data mode: replace the whole item array. Selection and cursor keep any key
|
|
621
|
-
* that is still present; keys that vanish are
|
|
622
|
-
* A no-op in
|
|
709
|
+
* that is still present; keys that vanish are deselected silently and held
|
|
710
|
+
* as pending view state, so they come back if the key reappears. A no-op in
|
|
711
|
+
* element mode.
|
|
623
712
|
*/
|
|
624
713
|
setItems(items: readonly T[]): void;
|
|
625
714
|
/**
|
|
@@ -636,19 +725,36 @@ declare class GridListElement<T = unknown> extends LitElement {
|
|
|
636
725
|
*/
|
|
637
726
|
updateItem(key: string, item: T): void;
|
|
638
727
|
/**
|
|
639
|
-
* Data mode: remove the items carrying these keys. Removed keys
|
|
640
|
-
*
|
|
728
|
+
* Data mode: remove the items carrying these keys. Removed keys leave the
|
|
729
|
+
* selection and cursor silently (via the `items` change) and are held as
|
|
730
|
+
* pending view state. A no-op in element mode.
|
|
641
731
|
*/
|
|
642
732
|
removeItems(keys: Iterable<string>): void;
|
|
643
733
|
/**
|
|
644
734
|
* Data mode: drop every item. Selection and cursor are reset and one
|
|
645
|
-
* `list-select` with empty sets is emitted
|
|
735
|
+
* `list-select` with empty sets is emitted; their keys are held as pending
|
|
736
|
+
* view state, so re-adding the same keys restores them. A no-op in element
|
|
737
|
+
* mode.
|
|
646
738
|
*/
|
|
647
739
|
clearItems(): void;
|
|
648
740
|
/** Move the cursor to the item with this key and scroll it into view. */
|
|
649
741
|
focusKey(key: string): void;
|
|
650
742
|
/** The key of the item under the cursor, or `undefined`. */
|
|
651
743
|
get tickledKey(): string | undefined;
|
|
744
|
+
/**
|
|
745
|
+
* Snapshot selection, collapsed groups, keyboard cursor and scroll as plain
|
|
746
|
+
* JSON, keyed by item / group key. Includes pending state for keys not
|
|
747
|
+
* currently present unless `includePending: false`.
|
|
748
|
+
*/
|
|
749
|
+
getViewState(options?: GetViewStateOptions<GridListViewState>): GridListViewState;
|
|
750
|
+
/**
|
|
751
|
+
* Apply saved view state. Fields present replace the current ones; keys
|
|
752
|
+
* (items or groups) that aren't present yet are applied as they appear.
|
|
753
|
+
* Restored selection fires `list-select`.
|
|
754
|
+
*/
|
|
755
|
+
setViewState(state: Partial<GridListViewState>): void;
|
|
756
|
+
/** Drop view state still waiting for its keys to appear. */
|
|
757
|
+
clearPendingViewState(): void;
|
|
652
758
|
/** Element mode: the light-DOM element carrying `key`, or `undefined`. */
|
|
653
759
|
getItem(key: string): Element | undefined;
|
|
654
760
|
/** Element mode: the light-DOM element at effective index `index`. */
|
|
@@ -689,4 +795,4 @@ interface GridListElement {
|
|
|
689
795
|
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
690
796
|
}
|
|
691
797
|
//#endregion
|
|
692
|
-
export {
|
|
798
|
+
export { isMultiMode as A, capKeys as B, TreeKeyboardNavController as C, ListSelectionControllerConfig as D, ListSelectionController as E, EMPTY_KEYS as F, partitionFlags as G, flagsToRecord as H, MAX_PENDING_KEYS as I, partitionKeys as K, PendingFlags as L, ListDragSelectController as M, ListDragSelectControllerConfig as N, ListSelectionGesture as O, EMPTY_FLAGS as P, PendingKeys as R, TreeKeyboardNavCallbacks as S, TreeKeyboardNavItemId as T, keysAsFlags as U, flagsFromRecord as V, keysToArray as W, GridListSelectEvent as _, GridListCaptionAlign as a, GridListViewportChangeDetail as b, GridListCaptionStyle as c, GridListFullElementEventMap as d, GridListItemClickDetail as f, GridListSelectDetail as g, GridListOrientation as h, GridListActivateEvent as i, DragSelectRect as j, ListSelectionModes as k, GridListDataAdapter as l, GridListItemEventDetail as m, GridListViewState as n, GridListCaptionBackdrop as o, GridListItemClickEvent as p, withoutFlag as q, GridListActivateDetail as r, GridListCaptionPosition as s, GridListElement as t, GridListElementEventMap as u, GridListTickleDetail as v, TreeKeyboardNavControllerConfig as w, GridListViewportChangeEvent as x, GridListTickleEvent as y, capFlags as z };
|
package/dist/grid-list.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { B as
|
|
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
|
+
import { _ as GridListSelectEvent, a as GridListCaptionAlign, b as GridListViewportChangeDetail, c as GridListCaptionStyle, d as GridListFullElementEventMap, f as GridListItemClickDetail, g as GridListSelectDetail, h as GridListOrientation, i as GridListActivateEvent, l as GridListDataAdapter, m as GridListItemEventDetail, n as GridListViewState, o as GridListCaptionBackdrop, p as GridListItemClickEvent, r as GridListActivateDetail, s as GridListCaptionPosition, t as GridListElement, u as GridListElementEventMap, v as GridListTickleDetail, x as GridListViewportChangeEvent, y as GridListTickleEvent } from "./grid-list-D6n7WH8l.js";
|
|
2
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";
|
|
3
4
|
import { i as ListInteractionMode, l as ListSelectionMode } from "./list-selection-types-PjKdhF-a.js";
|
|
4
|
-
|
|
5
|
-
export { type GridListActivateDetail, type GridListActivateEvent, type GridListCaptionAlign, type GridListCaptionBackdrop, type GridListCaptionPosition, type GridListCaptionStyle, type GridListDataAdapter, GridListElement, type GridListElementEventMap, type GridListFullElementEventMap, type GridListItemClickDetail, type GridListItemClickEvent, type GridListItemEventDetail, type GridListOrientation, type GridListSelectDetail, type GridListSelectEvent, type GridListTickleDetail, type GridListTickleEvent, type GridListViewportChangeDetail, type GridListViewportChangeEvent, 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 ListInteractionMode, type ListNativeDragStartDetail, type ListNativeDragStartEvent, type ListSelectionMode };
|
|
5
|
+
export { type GridListActivateDetail, type GridListActivateEvent, type GridListCaptionAlign, type GridListCaptionBackdrop, type GridListCaptionPosition, type GridListCaptionStyle, type GridListDataAdapter, GridListElement, type GridListElementEventMap, type GridListFullElementEventMap, type GridListItemClickDetail, type GridListItemClickEvent, type GridListItemEventDetail, type GridListOrientation, type GridListSelectDetail, type GridListSelectEvent, type GridListTickleDetail, type GridListTickleEvent, type GridListViewState, type GridListViewportChangeDetail, type GridListViewportChangeEvent, 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 ListInteractionMode, type ListNativeDragStartDetail, type ListNativeDragStartEvent, type ListSelectionMode };
|
package/dist/grid-list.js
CHANGED
|
@@ -106,7 +106,7 @@ declare class GroupedItemListerElement<T = unknown> extends LitElement {
|
|
|
106
106
|
connectedCallback(): void;
|
|
107
107
|
disconnectedCallback(): void;
|
|
108
108
|
protected updated(changed: PropertyValues): void;
|
|
109
|
-
protected render(): import("lit").TemplateResult<1
|
|
109
|
+
protected render(): typeof nothing | import("lit").TemplateResult<1>;
|
|
110
110
|
}
|
|
111
111
|
declare global {
|
|
112
112
|
interface HTMLElementTagNameMap {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as IGroupedSubComponent, c as SubComponentActivateEvent, d as SubComponentItemClickEvent, f as SubComponentSelectDetail, h as SubComponentTickleEvent, i as GroupedSelectEvent, l as SubComponentFactory, m as SubComponentTickleDetail, n as GroupedItemListerElementEventMap, o as IGroupedSubComponentEventMap, p as SubComponentSelectEvent, r as GroupedSelectDetail, s as SubComponentActivateDetail, t as GroupedItemListerElement, u as SubComponentItemClickDetail } from "./grouped-item-lister-
|
|
1
|
+
import { a as IGroupedSubComponent, c as SubComponentActivateEvent, d as SubComponentItemClickEvent, f as SubComponentSelectDetail, h as SubComponentTickleEvent, i as GroupedSelectEvent, l as SubComponentFactory, m as SubComponentTickleDetail, n as GroupedItemListerElementEventMap, o as IGroupedSubComponentEventMap, p as SubComponentSelectEvent, r as GroupedSelectDetail, s as SubComponentActivateDetail, t as GroupedItemListerElement, u as SubComponentItemClickDetail } from "./grouped-item-lister-DETte0Dh.js";
|
|
2
2
|
export { GroupedItemListerElement, type GroupedItemListerElementEventMap, type GroupedSelectDetail, type GroupedSelectEvent, type IGroupedSubComponent, type IGroupedSubComponentEventMap, type SubComponentActivateDetail, type SubComponentActivateEvent, type SubComponentFactory, type SubComponentItemClickDetail, type SubComponentItemClickEvent, type SubComponentSelectDetail, type SubComponentSelectEvent, type SubComponentTickleDetail, type SubComponentTickleEvent };
|
|
@@ -9,7 +9,7 @@ declare class IxfxIconElement extends LitElement {
|
|
|
9
9
|
rotate: string;
|
|
10
10
|
connectedCallback(): void;
|
|
11
11
|
disconnectedCallback(): void;
|
|
12
|
-
protected render(): import("lit").TemplateResult<1
|
|
12
|
+
protected render(): typeof nothing | import("lit").TemplateResult<1>;
|
|
13
13
|
protected updated(changed: Map<string, unknown>): void;
|
|
14
14
|
static styles: import("lit").CSSResult[];
|
|
15
15
|
}
|
package/dist/icons.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as IxfxIconElement } from "./icon-
|
|
2
|
-
import { a as getIconEntry, c as iconBus, d as setIconFont, f as svgToDataUri, g as ICON_CLOSE, h as ICON_CHEVRON_DOWN, i as getIcon, l as registerFontIcon, m as ICON_CHECK, n as IconChangedEvent, o as getIconFont, p as ICON_CARET_RIGHT, r as IconEntry, s as hasIcon, t as IconChangedDetail, u as registerIcon } from "./index-
|
|
1
|
+
import { t as IxfxIconElement } from "./icon-CDGprSdE.js";
|
|
2
|
+
import { a as getIconEntry, c as iconBus, d as setIconFont, f as svgToDataUri, g as ICON_CLOSE, h as ICON_CHEVRON_DOWN, i as getIcon, l as registerFontIcon, m as ICON_CHECK, n as IconChangedEvent, o as getIconFont, p as ICON_CARET_RIGHT, r as IconEntry, s as hasIcon, t as IconChangedDetail, u as registerIcon } from "./index-CYndvTWH.js";
|
|
3
3
|
export { ICON_CARET_RIGHT, ICON_CHECK, ICON_CHEVRON_DOWN, ICON_CLOSE, type IconChangedDetail, type IconChangedEvent, type IconEntry, IxfxIconElement, getIcon, getIconEntry, getIconFont, hasIcon, iconBus, registerFontIcon, registerIcon, setIconFont, svgToDataUri };
|
package/dist/incr-search.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as FuzzySearch, C as ListSearchControllerOptions, D as IncrSearchTreeOptions, E as IncrSearchTreeController, F as IncrSearchChangeCallback, I as IncrSearchOptions, L as IncrSearchResult, M as HighlightOptions, N as HighlightTarget, O as createAcCompletionProvider, P as IncrSearch, R as IncrSearchState, S as ListSearchController, T as ListSearchMode, _ as DataListSearchAdapterOptions, a as RegisterListSearchCommandsOptions, b as LIST_SEARCH_MODES, c as applyHighlights, d as createFuzzySearch, f as ElementIncrSearch, g as createElementListSearchAdapter, h as ElementListSearchHost, i as LIST_SEARCH_COMMAND_IDS, j as FuzzySearchOptions, k as ElementIncrSearchOptions, l as buildHighlightTargets, m as ElementListSearchAdapterOptions, n as createTreeListSearchAdapter, o as registerListSearchCommands, p as createElementIncrSearch, r as listSearchStyles, s as createIncrSearch, t as TreeListSearchAdapterOptions, u as clearHighlights, v as DataListSearchItem, w as ListSearchHost, x as ListSearchAdapter, y as createDataListSearchAdapter } from "./index-
|
|
1
|
+
import { A as FuzzySearch, C as ListSearchControllerOptions, D as IncrSearchTreeOptions, E as IncrSearchTreeController, F as IncrSearchChangeCallback, I as IncrSearchOptions, L as IncrSearchResult, M as HighlightOptions, N as HighlightTarget, O as createAcCompletionProvider, P as IncrSearch, R as IncrSearchState, S as ListSearchController, T as ListSearchMode, _ as DataListSearchAdapterOptions, a as RegisterListSearchCommandsOptions, b as LIST_SEARCH_MODES, c as applyHighlights, d as createFuzzySearch, f as ElementIncrSearch, g as createElementListSearchAdapter, h as ElementListSearchHost, i as LIST_SEARCH_COMMAND_IDS, j as FuzzySearchOptions, k as ElementIncrSearchOptions, l as buildHighlightTargets, m as ElementListSearchAdapterOptions, n as createTreeListSearchAdapter, o as registerListSearchCommands, p as createElementIncrSearch, r as listSearchStyles, s as createIncrSearch, t as TreeListSearchAdapterOptions, u as clearHighlights, v as DataListSearchItem, w as ListSearchHost, x as ListSearchAdapter, y as createDataListSearchAdapter } from "./index-Dr80Zdl6.js";
|
|
2
2
|
export { type DataListSearchAdapterOptions, type DataListSearchItem, type ElementIncrSearch, type ElementIncrSearchOptions, type ElementListSearchAdapterOptions, type ElementListSearchHost, type FuzzySearch, type FuzzySearchOptions, type HighlightOptions, type HighlightTarget, type IncrSearch, type IncrSearchChangeCallback, IncrSearchTreeController as IncrSearchMillerController, IncrSearchTreeController, type IncrSearchTreeOptions as IncrSearchMillerOptions, type IncrSearchTreeOptions, type IncrSearchOptions, type IncrSearchResult, type IncrSearchState, LIST_SEARCH_COMMAND_IDS, LIST_SEARCH_MODES, type ListSearchAdapter, ListSearchController, type ListSearchControllerOptions, type ListSearchHost, type ListSearchMode, type RegisterListSearchCommandsOptions, type TreeListSearchAdapterOptions, applyHighlights, buildHighlightTargets, clearHighlights, createAcCompletionProvider, createDataListSearchAdapter, createElementIncrSearch, createElementListSearchAdapter, createFuzzySearch, createIncrSearch, createTreeListSearchAdapter, listSearchStyles, registerListSearchCommands };
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { a as ViewStateBase, c as ViewStateChangeReason, n as ScrollState, t as GetViewStateOptions } from "./types-LU1u0CB8.js";
|
|
2
|
+
import { ReactiveController, ReactiveControllerHost } from "lit";
|
|
3
|
+
//#region src/common/view-state/view-state-controller.d.ts
|
|
4
|
+
type ViewStateControllerOptions<S extends ViewStateBase> = {
|
|
5
|
+
/** Component kind written into every state, e.g. `tree-list`. */
|
|
6
|
+
readonly kind: string;
|
|
7
|
+
/** Build the full current state (pending included). Called when the change event fires. */
|
|
8
|
+
readonly capture: () => S;
|
|
9
|
+
/** Trailing debounce for `view-state-change`, ms. Default 150. */
|
|
10
|
+
readonly debounceMs?: number;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Plumbing shared by every view-stateful component:
|
|
14
|
+
*
|
|
15
|
+
* - **change events** — `notify(reason)` coalesces changes into one debounced
|
|
16
|
+
* `view-state-change` event (strongest reason wins: user > data > restore),
|
|
17
|
+
* flushed immediately on disconnect so the last change is never lost.
|
|
18
|
+
* - **restore marking** — changes made inside `restoring(fn)` are reported as
|
|
19
|
+
* `restore`, so persistence code can skip writing back what it just loaded.
|
|
20
|
+
* - **validation** — `accepts(state)` rejects a state for another kind / version.
|
|
21
|
+
* - **pending scroll** — a scroll position waiting for its anchor item (or for
|
|
22
|
+
* enough content). Cancelled by the user's own scroll intent on the target
|
|
23
|
+
* given to `observeScrollTarget()`.
|
|
24
|
+
*
|
|
25
|
+
* The component owns its facets (selection, expansion, columns) and decides
|
|
26
|
+
* what's pending; this controller only carries the cross-cutting parts.
|
|
27
|
+
*/
|
|
28
|
+
declare class ViewStateController<S extends ViewStateBase> implements ReactiveController {
|
|
29
|
+
#private;
|
|
30
|
+
constructor(host: ReactiveControllerHost & EventTarget, options: ViewStateControllerOptions<S>);
|
|
31
|
+
get kind(): string;
|
|
32
|
+
hostConnected(): void;
|
|
33
|
+
hostDisconnected(): void;
|
|
34
|
+
/** Record a change. Inside `restoring()` the reason is forced to `restore`. */
|
|
35
|
+
notify(reason?: ViewStateChangeReason): void;
|
|
36
|
+
/** Fire any pending change event now. */
|
|
37
|
+
flush(): void;
|
|
38
|
+
/** Run `fn` with every `notify()` inside it reported as `restore`. */
|
|
39
|
+
restoring<T>(fn: () => T): T;
|
|
40
|
+
/** True while inside `restoring()`. */
|
|
41
|
+
get isRestoring(): boolean;
|
|
42
|
+
/** Whether `state` is for this component kind and schema version. Warns when not. */
|
|
43
|
+
accepts(state: Partial<S> | null | undefined): state is Partial<S>;
|
|
44
|
+
/**
|
|
45
|
+
* Stamp `v` / `kind` onto `fields` and apply `include`. Components build
|
|
46
|
+
* their full field set and pass it through here from `getViewState()`.
|
|
47
|
+
*/
|
|
48
|
+
shape(fields: Omit<S, `v` | `kind`>, options?: GetViewStateOptions<S>): S;
|
|
49
|
+
/**
|
|
50
|
+
* Watch `target` for user scroll intent (wheel / touch / pointer / nav key);
|
|
51
|
+
* any intent drops the pending scroll. Call again if the scroll container
|
|
52
|
+
* is replaced.
|
|
53
|
+
*/
|
|
54
|
+
observeScrollTarget(target: EventTarget): void;
|
|
55
|
+
get pendingScroll(): ScrollState | undefined;
|
|
56
|
+
set pendingScroll(scroll: ScrollState | undefined);
|
|
57
|
+
/**
|
|
58
|
+
* Try the pending scroll with `apply`; it returns `true` once the position
|
|
59
|
+
* was fully reached (anchor present, content long enough), which clears it.
|
|
60
|
+
* Call after each render that may have added items.
|
|
61
|
+
*/
|
|
62
|
+
applyPendingScroll(apply: (scroll: ScrollState) => boolean): void;
|
|
63
|
+
/**
|
|
64
|
+
* Call from the viewport's `scroll` listener. Ignored while a scroll restore
|
|
65
|
+
* is still pending; the event caused by a restore's own write is reported
|
|
66
|
+
* as `restore`, anything else as `user`.
|
|
67
|
+
*/
|
|
68
|
+
notifyScroll(): void;
|
|
69
|
+
}
|
|
70
|
+
//#endregion
|
|
71
|
+
export { ViewStateControllerOptions as n, ViewStateController as t };
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { B as ListNativeDragStartDetail, C as TreeItemDblClickEvent, D as TreeSelectAllOptions, E as TreeSearchHost, L as ListDragPreviewRenderer, M as TreeDataModel, R as ListDragPreviewSourceResolver, _ as TreeDropTarget, a as TreeComponent, c as TreeDragContext, d as TreeDragStartEvent, h as TreeDropEvent, i as TreeCollapseEvent, j as TreeTickleEvent, k as TreeSelectEvent, l as TreeDragEndEvent, m as TreeDropDetail, n as TreeActivateEvent, o as TreeComponentEventMap, p as TreeDropContext, s as TreeDndMode, u as TreeDragOverEvent, w as TreeNavigateOptions, x as TreeItemClickEvent, y as TreeExpandEvent } from "./tree-component-DgfkxmVY.js";
|
|
2
2
|
import { a as TreeItem, i as TreeInteractionMode, n as TreeExclusivity, o as TreeNode, r as TreeFilterPredicate, s as TreeSelectionFilter, t as LoadChildrenCallback } from "./types-Jky6oNAp.js";
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
3
|
+
import { a as ViewStateBase, t as GetViewStateOptions } from "./types-LU1u0CB8.js";
|
|
4
|
+
import "./index-9ttcdwlL.js";
|
|
5
|
+
import { S as ListSearchController } from "./index-Dr80Zdl6.js";
|
|
6
|
+
import { t as ListNativeDragController } from "./list-native-drag-controller-D_UrXipS.js";
|
|
5
7
|
import { n as TickledController } from "./tickled-controller-DodxD3eQ.js";
|
|
6
8
|
import { LitElement, PropertyValues, ReactiveController, ReactiveControllerHost, TemplateResult, nothing } from "lit";
|
|
7
9
|
import { CommandRegistry } from "@clinth/ui-commands";
|
|
@@ -12,6 +14,10 @@ type TreeConfig = {
|
|
|
12
14
|
indent: number;
|
|
13
15
|
};
|
|
14
16
|
//#endregion
|
|
17
|
+
//#region src/tree/tree-view-state.d.ts
|
|
18
|
+
/** `ixfx-tree-list` view state. All fields are the shared base fields. */
|
|
19
|
+
type TreeListViewState = ViewStateBase;
|
|
20
|
+
//#endregion
|
|
15
21
|
//#region src/tree/tree-base.d.ts
|
|
16
22
|
/**
|
|
17
23
|
* `auto` windows the list once it has more than `virtualizeThreshold` visible
|
|
@@ -40,6 +46,13 @@ declare class TreeBaseElement extends LitElement implements TreeComponent, TreeS
|
|
|
40
46
|
get selectedNodes(): ReadonlySet<TreeNode>;
|
|
41
47
|
filterPredicate: TreeFilterPredicate | undefined;
|
|
42
48
|
disableKeyboardNavigation: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Let hover follow rows that scroll beneath a stationary pointer. Off by
|
|
51
|
+
* default: while a scroll gesture is active, row `pointerenter` is ignored so
|
|
52
|
+
* the hover cursor holds still instead of trailing the content. Hover resumes
|
|
53
|
+
* on the next real pointer movement, or when the pointer leaves the tree.
|
|
54
|
+
*/
|
|
55
|
+
scrollHoverTickle: boolean;
|
|
43
56
|
registry: CommandRegistry<unknown> | undefined;
|
|
44
57
|
/**
|
|
45
58
|
* Space-separated subset of `navigate select filter` — limits which
|
|
@@ -89,6 +102,12 @@ declare class TreeBaseElement extends LitElement implements TreeComponent, TreeS
|
|
|
89
102
|
applyInternalDrop: boolean;
|
|
90
103
|
/** Immutable: replace via `#setExpanded` so the flat-row cache is invalidated. */
|
|
91
104
|
protected _expandedKeys: ReadonlySet<string>;
|
|
105
|
+
/**
|
|
106
|
+
* Whether restoring view state may call `loadChildren` / `model` to open
|
|
107
|
+
* saved branches that aren't loaded yet (one at a time, cascading down the
|
|
108
|
+
* saved path). Default `true`.
|
|
109
|
+
*/
|
|
110
|
+
restoreLoads: boolean;
|
|
92
111
|
/** Bumped whenever `_selectedNodes` content may have changed. */
|
|
93
112
|
protected _selectionVersion: number;
|
|
94
113
|
/**
|
|
@@ -103,6 +122,13 @@ declare class TreeBaseElement extends LitElement implements TreeComponent, TreeS
|
|
|
103
122
|
/** Depths at which any loaded node carries an icon (stable across expansion). */
|
|
104
123
|
protected get _depthsWithIcons(): ReadonlySet<number>;
|
|
105
124
|
protected tickled: TickledController<string>;
|
|
125
|
+
/**
|
|
126
|
+
* Row `pointerenter` funnel: moves the hover cursor unless a scroll gesture
|
|
127
|
+
* is sliding rows beneath a stationary pointer (see `scrollHoverTickle`).
|
|
128
|
+
* Subclasses rendering their own rows should call this rather than the
|
|
129
|
+
* tickled controller directly.
|
|
130
|
+
*/
|
|
131
|
+
protected _handleRowPointerEnter(node: TreeNode, depth: number): void;
|
|
106
132
|
protected _focusedDepth: number;
|
|
107
133
|
/** Incremental search (navigate / select / filter). See `docs/infra-incremental.md`. */
|
|
108
134
|
readonly search: ListSearchController<{
|
|
@@ -132,11 +158,31 @@ declare class TreeBaseElement extends LitElement implements TreeComponent, TreeS
|
|
|
132
158
|
disconnectedCallback(): void;
|
|
133
159
|
getConfig(): TreeConfig;
|
|
134
160
|
setConfig(config: Partial<TreeConfig>): void;
|
|
161
|
+
/**
|
|
162
|
+
* Snapshot selection, expansion, cursor and scroll as plain JSON, keyed by
|
|
163
|
+
* `item.key`. Includes pending state for keys not currently loaded.
|
|
164
|
+
*/
|
|
165
|
+
getViewState(options?: GetViewStateOptions<TreeListViewState>): TreeListViewState;
|
|
166
|
+
/**
|
|
167
|
+
* Apply saved view state. Fields present replace the current ones; keys
|
|
168
|
+
* that aren't loaded yet are applied as they appear — including via
|
|
169
|
+
* `loadChildren` / `model` for saved-open branches when `restoreLoads`.
|
|
170
|
+
*/
|
|
171
|
+
setViewState(state: Partial<TreeListViewState>): void;
|
|
172
|
+
clearPendingViewState(): void;
|
|
135
173
|
select(node: TreeNode): void;
|
|
136
174
|
deselect(node: TreeNode): void;
|
|
137
175
|
clearSelection(): void;
|
|
138
|
-
|
|
139
|
-
|
|
176
|
+
/**
|
|
177
|
+
* Select every selectable node in the tree, or only the matches while a
|
|
178
|
+
* `filterPredicate` is active. Nodes inside collapsed branches are included;
|
|
179
|
+
* unloaded (lazy) children are not. With `visibleOnly`, only rows that are
|
|
180
|
+
* showing are selected (Ctrl+A). In `checked` mode checking a row checks its
|
|
181
|
+
* descendants, so `visibleOnly` makes no difference there.
|
|
182
|
+
*/
|
|
183
|
+
selectAll(options?: TreeSelectAllOptions): void;
|
|
184
|
+
/** Mirror of {@link selectAll}: deselect the same set of nodes it would select. */
|
|
185
|
+
deselectAll(options?: TreeSelectAllOptions): void;
|
|
140
186
|
/**
|
|
141
187
|
* Expand every already-loaded branch in a single update. With `maxDepth`,
|
|
142
188
|
* only branches at depth < `maxDepth` are expanded (the root's children are
|
|
@@ -378,4 +424,4 @@ declare class TreeDropController implements ReactiveController {
|
|
|
378
424
|
hostDisconnected(): void;
|
|
379
425
|
}
|
|
380
426
|
//#endregion
|
|
381
|
-
export { TreeDropVisibleRow as a, TreeListElement as c, TreeBaseElement as d, TreeBaseElementEventMap as f, TreeDropRowInfo as i, TreeCheckboxState as l,
|
|
427
|
+
export { TreeDropVisibleRow as a, TreeListElement as c, TreeBaseElement as d, TreeBaseElementEventMap as f, TreeConfig as h, TreeDropRowInfo as i, TreeCheckboxState as l, TreeListViewState as m, TreeDropControllerConfig as n, TreeController as o, TreeVirtualize as p, TreeDropResolvedDrag as r, TreeControllerOptions as s, TreeDropController as t, TreeAnimation as u };
|