@ixfx/components 0.18.0 → 0.18.1
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 +209 -4
- package/bundle/index.js +359 -319
- package/dist/ac-text.js +1 -1
- package/dist/ac-token.js +2 -2
- package/dist/{checked-select-DsQ-o9lI.js → checked-select-CC-qSO1P.js} +2 -2
- package/dist/checked-select.js +1 -1
- package/dist/{crumb-navigation-09YFje6W.js → crumb-navigation-C78edQGt.js} +3 -3
- package/dist/crumbs.js +1 -1
- package/dist/{data-grid-BQWmVYg0.d.ts → data-grid-BYMZZbNc.d.ts} +25 -2
- package/dist/{data-grid-BGmJbMCb.js → data-grid-CJrbLzLr.js} +79 -18
- package/dist/data-grid.d.ts +1 -1
- package/dist/data-grid.js +1 -1
- package/dist/{detail-list-CfjoIl2N.d.ts → detail-list-CBgnKkEm.d.ts} +29 -3
- package/dist/{detail-list-CrHASoAx.js → detail-list-Dk9oSvAZ.js} +74 -10
- package/dist/detail-list.d.ts +2 -2
- package/dist/detail-list.js +1 -1
- package/dist/{flat-list-C2z81bK6.d.ts → flat-list-D5glF_vD.d.ts} +1 -1
- package/dist/flat-list.d.ts +1 -1
- package/dist/flat-list.js +3 -3
- package/dist/{grid-list-DYU_z2K9.js → grid-list-0wC2xGBS.js} +103 -14
- package/dist/{grid-list-Crv-hFJL.d.ts → grid-list-B3T_2N0N.d.ts} +26 -2
- package/dist/grid-list.d.ts +1 -1
- package/dist/grid-list.js +1 -1
- package/dist/{incr-search-C5114RxZ.js → incr-search-Bk4acsCM.js} +14 -6
- package/dist/incr-search.d.ts +1 -1
- package/dist/incr-search.js +1 -1
- package/dist/{index-BymYKGY-.d.ts → index-BIv_Hu7C.d.ts} +2 -2
- package/dist/{index-Db5VGFR1.d.ts → index-BuvySJEc.d.ts} +4 -0
- package/dist/{index-BE0hk8xS.d.ts → index-fhZCKSY6.d.ts} +2 -2
- package/dist/index.d.ts +63 -17
- package/dist/index.js +200 -37
- package/dist/interaction-DNuFnTm0.js +3 -0
- package/dist/item-tags-Dz-jQq-4.d.ts +65 -0
- package/dist/{list-native-drag-controller-Brk30s5d.js → list-native-drag-controller-B_INa6_G.js} +106 -1
- package/dist/{menu-B6NFqEtm.js → menu-CgT60B3-.js} +2 -2
- package/dist/{menu-item-D0zy1yax.js → menu-item-CbywH4Xo.js} +2 -2
- package/dist/menu.js +2 -2
- package/dist/{miller-B0qbnWwe.js → miller-Dyv4UM7k.js} +3 -3
- package/dist/miller.d.ts +1 -1
- package/dist/miller.js +1 -1
- package/dist/narrowed-text.js +3 -3
- package/dist/{node-graph-D9iovxQp.js → node-graph-yrbOLbYo.js} +1 -1
- package/dist/node-graph.js +1 -1
- package/dist/select-horiz.js +2 -2
- package/dist/sunburst-tree.d.ts +1 -1
- package/dist/sunburst-tree.js +1 -1
- package/dist/{sunbursttree-list-C-FuZB5z.js → sunbursttree-list-CJdznPzN.js} +2 -2
- package/dist/{sunbursttree-list-XF7gBKod.d.ts → sunbursttree-list-CmydFG66.d.ts} +1 -1
- package/dist/{tickled-controller-BVhGKzjZ.js → tickled-controller-BsFFr_1N.js} +1 -1
- package/dist/{tickled-controller-DSPoG551.d.ts → tickled-controller-Dz0UqwlQ.d.ts} +5 -0
- package/dist/{tree-1CSNgw72.js → tree-C3rgEEmm.js} +4 -4
- package/dist/tree.d.ts +1 -1
- package/dist/tree.js +1 -1
- package/dist/{vertical-list-BNCRA_zy.js → vertical-list-By-yuhkw.js} +60 -6
- package/dist/{vertical-list-Dyc5azxv.d.ts → vertical-list-C4z3La0C.d.ts} +20 -2
- package/dist/vertical-list.d.ts +1 -1
- package/dist/vertical-list.js +1 -1
- package/docs-user/README.md +1 -0
- package/docs-user/button.md +31 -1
- package/docs-user/data-grid.md +3 -0
- package/docs-user/detail-list.md +3 -0
- package/docs-user/grid-list.md +3 -0
- package/docs-user/index.json +6 -2
- package/docs-user/llms.txt +1 -0
- package/docs-user/multicol-list.md +3 -0
- package/docs-user/user-item-tags.md +68 -0
- package/llms.txt +1 -0
- package/package.json +1 -1
- package/dist/interaction-BEcBIY0d.js +0 -3
package/dist/index.js
CHANGED
|
@@ -9,28 +9,27 @@ import { TitlebarElement } from "./titlebar.js";
|
|
|
9
9
|
import { n as buttonStyles, t as ButtonElement } from "./button-BOX1dfyd.js";
|
|
10
10
|
import { t as prominenceStyles } from "./prominence-BOOQVWF-.js";
|
|
11
11
|
import { t as IxfxIconElement } from "./icon-DvTQuylG.js";
|
|
12
|
-
import "./menu-item-
|
|
12
|
+
import "./menu-item-CbywH4Xo.js";
|
|
13
13
|
import { Checkbox } from "./checkbox.js";
|
|
14
|
-
import { t as CheckedSelect } from "./checked-select-
|
|
14
|
+
import { t as CheckedSelect } from "./checked-select-CC-qSO1P.js";
|
|
15
15
|
import { i as ICON_CLOSE, n as ICON_CHECK, r as ICON_CHEVRON_DOWN, t as ICON_CARET_RIGHT } from "./defaults-_6ELsqLb.js";
|
|
16
16
|
import { n as ColourPicker, t as ColourPickerPopup } from "./colour-picker-D8g-bTSF.js";
|
|
17
17
|
import { t as DataController } from "./data-controller-q-rXRMzJ.js";
|
|
18
18
|
import { t as collectDataResult } from "./data-provider-C6ZNAcaT.js";
|
|
19
19
|
import { a as toGroupKey, i as resolveGroupKey, n as defaultGroupLabel, o as toggleInSet, r as partitionByGroup, t as EMPTY_GROUP_LABEL } from "./grouping-kENdqzSV.js";
|
|
20
|
-
import { a as
|
|
20
|
+
import { a as TreeDataModel, c as pruneDraggedDescendants, i as TreeDropController, n as TreeListElement, o as applyTreeDrop, r as TreeBaseElement, s as dropTargetFor, t as TreeController } from "./tree-C3rgEEmm.js";
|
|
21
21
|
import { i as ListDragSelectController, n as gestureOf, r as isMultiMode, t as ListSelectionController } from "./list-selection-controller-Dkh3m3hX.js";
|
|
22
22
|
import { a as capKeys, c as keysAsFlags, d as partitionKeys, f as withoutFlag, i as capFlags, l as keysToArray, n as EMPTY_KEYS, o as flagsFromRecord, r as MAX_PENDING_KEYS, s as flagsToRecord, t as EMPTY_FLAGS, u as partitionFlags } from "./pending-Afl4LT64.js";
|
|
23
23
|
import { i as sameKeySet, n as applyPartialAttributes, r as isPartialKey, t as PARTIAL_DESCRIPTION } from "./partial-keys-D4l_ede_.js";
|
|
24
24
|
import { n as createScrollHoverGuard, t as SCROLL_HOVER_SUPPRESS_ATTR } from "./scroll-hover-guard-BGAjtyXT.js";
|
|
25
|
-
import {
|
|
26
|
-
import { t as CrumbNavigationElement } from "./crumb-navigation-09YFje6W.js";
|
|
25
|
+
import { t as CrumbNavigationElement } from "./crumb-navigation-C78edQGt.js";
|
|
27
26
|
import { t as popupSurfaceStyles } from "./popup-D8IxN1Eq.js";
|
|
28
27
|
import { t as scrollFadeStyles } from "./scroll-fade-DH8OXSqL.js";
|
|
29
28
|
import { DataDisplayComponent } from "./data-display.js";
|
|
30
|
-
import { t as DataGridElement } from "./data-grid-
|
|
31
|
-
import "./interaction-
|
|
29
|
+
import { t as DataGridElement } from "./data-grid-CJrbLzLr.js";
|
|
30
|
+
import "./interaction-DNuFnTm0.js";
|
|
32
31
|
import { DateInputElement, formatDateInput, parseDateInput } from "./date-input.js";
|
|
33
|
-
import { t as DetailListElement } from "./detail-list-
|
|
32
|
+
import { t as DetailListElement } from "./detail-list-Dk9oSvAZ.js";
|
|
34
33
|
import { t as createDragGhost } from "./drag-ghost-DNWu_RyN.js";
|
|
35
34
|
import { a as distribute, c as preserveRestoreWeights, d as toSnapshot, f as walk, i as buildModel, l as resolveTracks, n as SplitPanelElement, o as findPanelNode, r as applySnapshot, s as normalise, t as SplitLayoutElement, u as setPanelRestoreWeight } from "./split-layout-BMN_s6d7.js";
|
|
36
35
|
import { t as TabListElement } from "./tab-list-CFJy3hVm.js";
|
|
@@ -38,12 +37,12 @@ import { EditableLabel } from "./editable-label.js";
|
|
|
38
37
|
import { n as EditableNumber, t as LabelledSliderInput } from "./labelled-slider-input-CfRKd5kC.js";
|
|
39
38
|
import { FlatListElement } from "./flat-list.js";
|
|
40
39
|
import { n as formStyles, r as adoptLightDomStyles, t as FormElement } from "./form-Cxx2sO8_.js";
|
|
41
|
-
import { t as GridListElement } from "./grid-list-
|
|
40
|
+
import { t as GridListElement } from "./grid-list-0wC2xGBS.js";
|
|
42
41
|
import { GroupedItemListerElement } from "./grouped-item-lister.js";
|
|
43
|
-
import { t as VerticalListElement } from "./vertical-list-
|
|
42
|
+
import { t as VerticalListElement } from "./vertical-list-By-yuhkw.js";
|
|
44
43
|
import { t as IxfxHexEditorElement } from "./hex-editor-DephDhuu.js";
|
|
45
|
-
import { a as LIST_SEARCH_COMMAND_IDS, c as createElementListSearchAdapter, f as createDataListSearchAdapter, g as createFuzzySearch, h as createAcCompletionProvider, i as ListSearchController, l as KeyedElementIndex, m as createIncrSearch, n as listSearchStyles, o as registerListSearchCommands, p as IncrSearchTreeController, r as LIST_SEARCH_MODES, s as createElementIncrSearch, t as createTreeListSearchAdapter, u as keyForElement } from "./incr-search-
|
|
46
|
-
import { t as TickledController } from "./tickled-controller-
|
|
44
|
+
import { a as LIST_SEARCH_COMMAND_IDS, c as createElementListSearchAdapter, f as createDataListSearchAdapter, g as createFuzzySearch, h as createAcCompletionProvider, i as ListSearchController, l as KeyedElementIndex, m as createIncrSearch, n as listSearchStyles, o as registerListSearchCommands, p as IncrSearchTreeController, r as LIST_SEARCH_MODES, s as createElementIncrSearch, t as createTreeListSearchAdapter, u as keyForElement } from "./incr-search-Bk4acsCM.js";
|
|
45
|
+
import { t as TickledController } from "./tickled-controller-BsFFr_1N.js";
|
|
47
46
|
import { a as resolveKeyPath, i as reconcileSelection$1, n as reconcileCursor, t as pathFromJson } from "./tree-DUc-iQcg.js";
|
|
48
47
|
import { a as restoreElementScroll, c as VIEW_STATE_VERSION, i as onUserScrollIntent, n as anchorFromRow, o as scrollToOffset, r as captureElementScroll, s as VIEW_STATE_CHANGE, t as ViewStateController } from "./view-state-controller-DiPAPiA7.js";
|
|
49
48
|
import "./icons.js";
|
|
@@ -51,11 +50,12 @@ import { LabelledRadialInput } from "./labelled-radial-input.js";
|
|
|
51
50
|
import { LabelledRangeInput } from "./labelled-range-input.js";
|
|
52
51
|
import { LedElement } from "./led.js";
|
|
53
52
|
import { ListGroupHeaderElement } from "./list-group-header.js";
|
|
54
|
-
import { a as menuFromTreeToElements, t as menu_exports } from "./menu-
|
|
55
|
-
import { n as MillerListElement, r as MillerBaseElement, t as MillerTreeController } from "./miller-
|
|
53
|
+
import { a as menuFromTreeToElements, t as menu_exports } from "./menu-CgT60B3-.js";
|
|
54
|
+
import { n as MillerListElement, r as MillerBaseElement, t as MillerTreeController } from "./miller-Dyv4UM7k.js";
|
|
56
55
|
import { a as iconBus, c as setIconFont, i as hasIcon, l as svgToDataUri, n as getIconEntry, o as registerFontIcon, r as getIconFont, s as registerIcon, t as getIcon } from "./registry-DcF0fO7l.js";
|
|
56
|
+
import { _ as sameTags, a as listItemFadeKeyframes, c as captionForEntry, d as ItemTagResolver, f as TAG_PART_PREFIX, g as sameTagKeys, h as resolveTagFlags, i as animateListItemOut, l as createDefaultListDragPreview, m as collectTags, n as LIST_ITEM_MOTION_MS, o as prefersReducedMotion, p as applyTagAttributes, r as animateListItemIn, s as startListItemOutAnimation, t as ListNativeDragController, u as DEFAULT_ITEM_TAG_FLAGS, v as tagPartTokens, y as tagsAttribute } from "./list-native-drag-controller-B_INa6_G.js";
|
|
57
57
|
import { NarrowedTextElement } from "./narrowed-text.js";
|
|
58
|
-
import { $ as forceState, A as marqueeStyle, At as outDegreeOf, B as NODE_SHAPES, C as zoomAt, Ct as edgeId, D as MARQUEE_THRESHOLD_PX, Dt as inDegreeOf, E as NodeDragController, Et as hasWire, F as findSnapTarget, Ft as toEdges, G as resizeRect, H as shapeSpec, I as proximityFactor, It as toNodeGraph, J as blinkPeriodSeconds, K as GraphPortElement, L as settled, M as rectFromPoints, Mt as portId, N as rectsIntersect, Nt as removeNode, O as MarqueeController, Ot as incomingEdge, P as wantsMarquee, Pt as removeWire, Q as forcePositions, R as smoothStep, S as screenToFlow, St as cycleBlockedNodes, T as DRAG_THRESHOLD_PX, Tt as fromEdges, U as RESIZE_HANDLES, V as isNodeShape, W as isResizeHandle, X as forceMovement, Y as DEFAULT_FORCE_OPTIONS, Z as forcePin, _ as clampZoom, _t as normaliseConnection, a as selectionAfterNodePress, at as edgeShape, b as flowToScreen, bt as addWire, c as collapsedOffset, ct as polylinePath, d as sanitizeFlowSpeed, dt as EASY_CONNECT_MARGIN, et as forceStep, f as withEntry, ft as inEasyConnectZone, g as boundsOf, gt as findValidWire, h as isEditableTarget, ht as canConnect, i as selectionAfterEdgeClick, it as edgePath, j as nodesInRect, jt as parsePortId, k as combineSelection, kt as incomingEdges, l as measureNode, lt as polylineShape, m as PanZoomController, mt as removeNodes, n as renderWires, nt as defaultSide, o as findProximityConnection, ot as extendFromSide, p as withWireFlow, pt as pickStartPort, q as MAX_BLINK_HZ, r as WireDragController, rt as edgeMidpoint, s as rectGap, st as polylineMidpoint, t as NodeGraphElement, tt as EDGE_CORNER_RADIUS, u as MAX_FLOW_SPEED, ut as stepPoints, v as fitBounds, vt as resolveConnection, w as nodeGraphStyles, wt as ensurePort, x as panBy, xt as connectContext, y as fitRects, yt as typesCompatible, z as GraphNodeElement } from "./node-graph-
|
|
58
|
+
import { $ as forceState, A as marqueeStyle, At as outDegreeOf, B as NODE_SHAPES, C as zoomAt, Ct as edgeId, D as MARQUEE_THRESHOLD_PX, Dt as inDegreeOf, E as NodeDragController, Et as hasWire, F as findSnapTarget, Ft as toEdges, G as resizeRect, H as shapeSpec, I as proximityFactor, It as toNodeGraph, J as blinkPeriodSeconds, K as GraphPortElement, L as settled, M as rectFromPoints, Mt as portId, N as rectsIntersect, Nt as removeNode, O as MarqueeController, Ot as incomingEdge, P as wantsMarquee, Pt as removeWire, Q as forcePositions, R as smoothStep, S as screenToFlow, St as cycleBlockedNodes, T as DRAG_THRESHOLD_PX, Tt as fromEdges, U as RESIZE_HANDLES, V as isNodeShape, W as isResizeHandle, X as forceMovement, Y as DEFAULT_FORCE_OPTIONS, Z as forcePin, _ as clampZoom, _t as normaliseConnection, a as selectionAfterNodePress, at as edgeShape, b as flowToScreen, bt as addWire, c as collapsedOffset, ct as polylinePath, d as sanitizeFlowSpeed, dt as EASY_CONNECT_MARGIN, et as forceStep, f as withEntry, ft as inEasyConnectZone, g as boundsOf, gt as findValidWire, h as isEditableTarget, ht as canConnect, i as selectionAfterEdgeClick, it as edgePath, j as nodesInRect, jt as parsePortId, k as combineSelection, kt as incomingEdges, l as measureNode, lt as polylineShape, m as PanZoomController, mt as removeNodes, n as renderWires, nt as defaultSide, o as findProximityConnection, ot as extendFromSide, p as withWireFlow, pt as pickStartPort, q as MAX_BLINK_HZ, r as WireDragController, rt as edgeMidpoint, s as rectGap, st as polylineMidpoint, t as NodeGraphElement, tt as EDGE_CORNER_RADIUS, u as MAX_FLOW_SPEED, ut as stepPoints, v as fitBounds, vt as resolveConnection, w as nodeGraphStyles, wt as ensurePort, x as panBy, xt as connectContext, y as fitRects, yt as typesCompatible, z as GraphNodeElement } from "./node-graph-yrbOLbYo.js";
|
|
59
59
|
import { NotificationPillElement } from "./notifier.js";
|
|
60
60
|
import { t as PanTextElement } from "./pan-text-DrJYKQKN.js";
|
|
61
61
|
import { PanelElement } from "./panel.js";
|
|
@@ -71,7 +71,7 @@ import { t as WheelNudgeMixin } from "./wheel-nudge-DgJzrL28.js";
|
|
|
71
71
|
import { t as SliderInputElement } from "./slider-input-C3mbUBZi.js";
|
|
72
72
|
import { SnackbarElement } from "./snackbar.js";
|
|
73
73
|
import { SnapContainer } from "./snap-container.js";
|
|
74
|
-
import { a as findSunburstId, c as sunburstChildId, d as sunburstParentId, f as sunburstPathToId, i as defaultSunburstValueAccessor, l as sunburstHasChildren, n as computeSunburstLayout, o as findSunburstNodeById, p as SUNBURST_PATH_SEPARATOR, r as createValueResolver, s as isSunburstAncestorId, t as SunburstTreeListElement, u as sunburstIdToPath } from "./sunbursttree-list-
|
|
74
|
+
import { a as findSunburstId, c as sunburstChildId, d as sunburstParentId, f as sunburstPathToId, i as defaultSunburstValueAccessor, l as sunburstHasChildren, n as computeSunburstLayout, o as findSunburstNodeById, p as SUNBURST_PATH_SEPARATOR, r as createValueResolver, s as isSunburstAncestorId, t as SunburstTreeListElement, u as sunburstIdToPath } from "./sunbursttree-list-CJdznPzN.js";
|
|
75
75
|
import { SwipeElement } from "./swipe.js";
|
|
76
76
|
import { a as resolveCssVars, i as attachTimelineInteractions, n as TimelineTrackTabElement, o as resolveGrid, r as timelineStyles, s as TimelineController, t as IxfxTimelineElement } from "./timeline-Br5JIeLI.js";
|
|
77
77
|
import { TransitoryLabelElement } from "./transitory-label.js";
|
|
@@ -1014,6 +1014,11 @@ let SplitButton = class SplitButton extends ButtonElement {
|
|
|
1014
1014
|
super(..._args);
|
|
1015
1015
|
this.mode = `default`;
|
|
1016
1016
|
this.defaultValue = ``;
|
|
1017
|
+
this.popoverTarget = ``;
|
|
1018
|
+
this._hasPopoverSlot = false;
|
|
1019
|
+
this._popoverOpen = false;
|
|
1020
|
+
this.#caretWasOpenOnPress = false;
|
|
1021
|
+
this.#buildingPopover = false;
|
|
1017
1022
|
this._selectedCommand = ``;
|
|
1018
1023
|
this._selectedLabel = ``;
|
|
1019
1024
|
this._selectedIcon = ``;
|
|
@@ -1021,6 +1026,12 @@ let SplitButton = class SplitButton extends ButtonElement {
|
|
|
1021
1026
|
this._dynamicItems = [];
|
|
1022
1027
|
this._loadingItems = false;
|
|
1023
1028
|
this._menuHasItems = false;
|
|
1029
|
+
this._onPopoverSlotChange = (e) => {
|
|
1030
|
+
this._hasPopoverSlot = e.target.assignedElements({ flatten: true }).length > 0;
|
|
1031
|
+
};
|
|
1032
|
+
this._onPopoverToggle = (e) => {
|
|
1033
|
+
this._popoverOpen = e.newState === `open`;
|
|
1034
|
+
};
|
|
1024
1035
|
this._onDefaultMenuSlotChange = (e) => {
|
|
1025
1036
|
const slot = e.target;
|
|
1026
1037
|
this._menuHasItems = slot.assignedElements({ flatten: true }).length > 0;
|
|
@@ -1059,6 +1070,17 @@ let SplitButton = class SplitButton extends ButtonElement {
|
|
|
1059
1070
|
};
|
|
1060
1071
|
this._handleCaretClick = async (e) => {
|
|
1061
1072
|
e.stopPropagation();
|
|
1073
|
+
if (this._popoverMode) {
|
|
1074
|
+
const wasOpen = this.#caretWasOpenOnPress;
|
|
1075
|
+
this.#caretWasOpenOnPress = false;
|
|
1076
|
+
if (wasOpen) {
|
|
1077
|
+
const el = this._resolvePopover();
|
|
1078
|
+
if (el?.matches(`:popover-open`)) el.hidePopover();
|
|
1079
|
+
return;
|
|
1080
|
+
}
|
|
1081
|
+
await this._showPopover(true);
|
|
1082
|
+
return;
|
|
1083
|
+
}
|
|
1062
1084
|
if (this._menuTrigger?.isOpen) {
|
|
1063
1085
|
this._menuTrigger.closeMenu();
|
|
1064
1086
|
return;
|
|
@@ -1084,25 +1106,21 @@ let SplitButton = class SplitButton extends ButtonElement {
|
|
|
1084
1106
|
this._handlePrimaryKeyDown = (e) => {
|
|
1085
1107
|
if (e.key === `ArrowDown`) {
|
|
1086
1108
|
e.preventDefault();
|
|
1087
|
-
this.
|
|
1109
|
+
this._openOverlay();
|
|
1088
1110
|
}
|
|
1089
1111
|
};
|
|
1090
1112
|
this._handleCaretKeyDown = (e) => {
|
|
1091
1113
|
if (e.key === `ArrowDown`) {
|
|
1092
1114
|
e.preventDefault();
|
|
1093
|
-
this.
|
|
1115
|
+
this._openOverlay();
|
|
1094
1116
|
}
|
|
1095
1117
|
};
|
|
1118
|
+
this._handleCaretPointerDown = () => {
|
|
1119
|
+
this.#caretWasOpenOnPress = this._resolvePopover()?.matches(`:popover-open`) ?? false;
|
|
1120
|
+
};
|
|
1096
1121
|
}
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
this._menuTrigger?.removeEventListener(`menu-command`, this._handleSwitcherMenuCommand);
|
|
1100
|
-
}
|
|
1101
|
-
firstUpdated() {
|
|
1102
|
-
this.updateComplete.then(() => {
|
|
1103
|
-
this._menuTrigger?.addEventListener(`menu-command`, this._handleSwitcherMenuCommand);
|
|
1104
|
-
});
|
|
1105
|
-
}
|
|
1122
|
+
#caretWasOpenOnPress;
|
|
1123
|
+
#buildingPopover;
|
|
1106
1124
|
updated(changedProperties) {
|
|
1107
1125
|
super.updated(changedProperties);
|
|
1108
1126
|
if ((changedProperties.has(`items`) || changedProperties.has(`mode`)) && this.items && !this.itemsProvider) this._applyItems(this.items);
|
|
@@ -1145,11 +1163,41 @@ let SplitButton = class SplitButton extends ButtonElement {
|
|
|
1145
1163
|
}
|
|
1146
1164
|
/** True when there is (or will be) popup content. Used to dim the caret visually. */
|
|
1147
1165
|
get _caretHasContent() {
|
|
1166
|
+
if (this._popoverMode) return true;
|
|
1148
1167
|
if (this.itemsProvider) return true;
|
|
1149
1168
|
if (this.items && this.items.length > 0) return true;
|
|
1150
1169
|
if (this.mode === `switcher`) return this._switcherItems.length > 1;
|
|
1151
1170
|
return this._menuHasItems;
|
|
1152
1171
|
}
|
|
1172
|
+
/** The caret toggles a popover (slotted content, `popover-target` or `popoverProvider`) rather than the menu. */
|
|
1173
|
+
get _popoverMode() {
|
|
1174
|
+
return this.popoverTarget !== `` || this.popoverProvider !== void 0 || this._hasPopoverSlot;
|
|
1175
|
+
}
|
|
1176
|
+
_resolvePopover() {
|
|
1177
|
+
if (this.popoverTarget !== ``) {
|
|
1178
|
+
const el = this.getRootNode().getElementById?.(this.popoverTarget);
|
|
1179
|
+
return el instanceof HTMLElement && el.popover !== null ? el : void 0;
|
|
1180
|
+
}
|
|
1181
|
+
return this._popoverPanel;
|
|
1182
|
+
}
|
|
1183
|
+
/** Show the popover (building its content first). `toggle`: hide it instead when already open. */
|
|
1184
|
+
async _showPopover(toggle) {
|
|
1185
|
+
const el = this._resolvePopover();
|
|
1186
|
+
if (!el || this.#buildingPopover) return;
|
|
1187
|
+
if (el.matches(`:popover-open`)) {
|
|
1188
|
+
if (toggle) el.hidePopover();
|
|
1189
|
+
return;
|
|
1190
|
+
}
|
|
1191
|
+
if (this.popoverProvider) {
|
|
1192
|
+
this.#buildingPopover = true;
|
|
1193
|
+
try {
|
|
1194
|
+
await this.popoverProvider(el);
|
|
1195
|
+
} finally {
|
|
1196
|
+
this.#buildingPopover = false;
|
|
1197
|
+
}
|
|
1198
|
+
}
|
|
1199
|
+
el.showPopover({ source: this._caretEl });
|
|
1200
|
+
}
|
|
1153
1201
|
_applySwitcherItems(items) {
|
|
1154
1202
|
this._switcherItems = items;
|
|
1155
1203
|
if (!this._selectedCommand && items.length > 0) {
|
|
@@ -1159,6 +1207,10 @@ let SplitButton = class SplitButton extends ButtonElement {
|
|
|
1159
1207
|
this._selectedIcon = picked.icon;
|
|
1160
1208
|
}
|
|
1161
1209
|
}
|
|
1210
|
+
_openOverlay() {
|
|
1211
|
+
if (this._popoverMode) this._showPopover(false);
|
|
1212
|
+
else this._menuTrigger?.openMenu();
|
|
1213
|
+
}
|
|
1162
1214
|
render() {
|
|
1163
1215
|
return this.mode === `switcher` ? this._renderSwitcher() : this._renderDefault();
|
|
1164
1216
|
}
|
|
@@ -1171,13 +1223,36 @@ let SplitButton = class SplitButton extends ButtonElement {
|
|
|
1171
1223
|
part="caret"
|
|
1172
1224
|
?disabled=${this.disabled}
|
|
1173
1225
|
?data-empty=${empty}
|
|
1174
|
-
aria-haspopup
|
|
1226
|
+
aria-haspopup=${this._popoverMode ? `dialog` : `true`}
|
|
1227
|
+
aria-expanded=${this._popoverMode ? String(this._popoverOpen) : nothing}
|
|
1175
1228
|
aria-label=${ariaLabel}
|
|
1229
|
+
@pointerdown=${this._handleCaretPointerDown}
|
|
1176
1230
|
@click=${this._handleCaretClick}
|
|
1177
1231
|
@keydown=${this._handleCaretKeyDown}
|
|
1178
1232
|
>
|
|
1179
1233
|
<ixfx-icon name="${iconName}"></ixfx-icon>
|
|
1180
1234
|
</button>
|
|
1235
|
+
`;
|
|
1236
|
+
}
|
|
1237
|
+
/** The caret with its overlay: the popover panel in popover mode, otherwise the menu trigger + menu. */
|
|
1238
|
+
_renderCaretArea(iconName, ariaLabel, menuContent) {
|
|
1239
|
+
const panel = html`
|
|
1240
|
+
<div class="popover-panel" part="popover" popover="auto" @toggle=${this._onPopoverToggle}>
|
|
1241
|
+
<slot name="popover" @slotchange=${this._onPopoverSlotChange}></slot>
|
|
1242
|
+
</div>
|
|
1243
|
+
`;
|
|
1244
|
+
if (this._popoverMode) return html`
|
|
1245
|
+
<div class="caret-area">
|
|
1246
|
+
${this._renderCaret(iconName, ariaLabel)}
|
|
1247
|
+
${this.popoverTarget === `` ? panel : nothing}
|
|
1248
|
+
</div>
|
|
1249
|
+
`;
|
|
1250
|
+
return html`
|
|
1251
|
+
<ixfx-menu-trigger .registry=${this.registry} .keyboardManager=${this.keyboardManager} @menu-command=${this._handleSwitcherMenuCommand}>
|
|
1252
|
+
${this._renderCaret(iconName, ariaLabel)}
|
|
1253
|
+
${menuContent}
|
|
1254
|
+
</ixfx-menu-trigger>
|
|
1255
|
+
${panel}
|
|
1181
1256
|
`;
|
|
1182
1257
|
}
|
|
1183
1258
|
_renderLoadingOrItems(items) {
|
|
@@ -1208,10 +1283,7 @@ let SplitButton = class SplitButton extends ButtonElement {
|
|
|
1208
1283
|
>
|
|
1209
1284
|
${this._renderIcon()}${label}
|
|
1210
1285
|
</button>
|
|
1211
|
-
|
|
1212
|
-
${this._renderCaret(`chevron-down`, `Open menu`)}
|
|
1213
|
-
${menuContent}
|
|
1214
|
-
</ixfx-menu-trigger>
|
|
1286
|
+
${this._renderCaretArea(`chevron-down`, `Open menu`, menuContent)}
|
|
1215
1287
|
</div>
|
|
1216
1288
|
`;
|
|
1217
1289
|
}
|
|
@@ -1238,12 +1310,11 @@ let SplitButton = class SplitButton extends ButtonElement {
|
|
|
1238
1310
|
>
|
|
1239
1311
|
${primaryIcon}${primaryLabel}
|
|
1240
1312
|
</button>
|
|
1241
|
-
|
|
1242
|
-
${this._renderCaret(`chevron-right`, `Choose action`)}
|
|
1313
|
+
${this._renderCaretArea(`chevron-right`, `Choose action`, html`
|
|
1243
1314
|
<ixfx-menu-container slot="menu">
|
|
1244
1315
|
${popupItems}
|
|
1245
1316
|
</ixfx-menu-container>
|
|
1246
|
-
|
|
1317
|
+
`)}
|
|
1247
1318
|
</div>
|
|
1248
1319
|
`;
|
|
1249
1320
|
}
|
|
@@ -1386,10 +1457,33 @@ let SplitButton = class SplitButton extends ButtonElement {
|
|
|
1386
1457
|
background: color-mix(in oklch, var(--surface-3, #ccc) 70%, transparent);
|
|
1387
1458
|
}
|
|
1388
1459
|
|
|
1389
|
-
ixfx-menu-trigger
|
|
1460
|
+
ixfx-menu-trigger,
|
|
1461
|
+
.caret-area {
|
|
1390
1462
|
display: inline-flex;
|
|
1391
1463
|
align-items: stretch;
|
|
1392
1464
|
}
|
|
1465
|
+
|
|
1466
|
+
button.caret {
|
|
1467
|
+
anchor-name: --split-caret;
|
|
1468
|
+
}
|
|
1469
|
+
|
|
1470
|
+
.popover-panel {
|
|
1471
|
+
position: fixed;
|
|
1472
|
+
inset: auto;
|
|
1473
|
+
margin: 0;
|
|
1474
|
+
position-anchor: --split-caret;
|
|
1475
|
+
top: calc(anchor(bottom) + var(--space-s, 4px));
|
|
1476
|
+
right: anchor(right);
|
|
1477
|
+
position-try-fallbacks: flip-block, flip-inline;
|
|
1478
|
+
padding: var(--space-m, 8px);
|
|
1479
|
+
background: var(--surface-3, #ccc);
|
|
1480
|
+
color: var(--surface-3-text, #000);
|
|
1481
|
+
border: var(--border, 1px solid #999);
|
|
1482
|
+
border-radius: var(--radius-l, 8px);
|
|
1483
|
+
box-shadow: 0 4px 16px color-mix(in oklch, black 30%, transparent);
|
|
1484
|
+
max-width: min(90vw, var(--ixfx-split-button-popover-max-width, 40ch));
|
|
1485
|
+
overflow: auto;
|
|
1486
|
+
}
|
|
1393
1487
|
`
|
|
1394
1488
|
];
|
|
1395
1489
|
}
|
|
@@ -1403,7 +1497,16 @@ __decorate([property({
|
|
|
1403
1497
|
})], SplitButton.prototype, "defaultValue", void 0);
|
|
1404
1498
|
__decorate([property({ attribute: false })], SplitButton.prototype, "itemsProvider", void 0);
|
|
1405
1499
|
__decorate([property({ attribute: false })], SplitButton.prototype, "items", void 0);
|
|
1500
|
+
__decorate([property({
|
|
1501
|
+
type: String,
|
|
1502
|
+
attribute: `popover-target`
|
|
1503
|
+
})], SplitButton.prototype, "popoverTarget", void 0);
|
|
1504
|
+
__decorate([property({ attribute: false })], SplitButton.prototype, "popoverProvider", void 0);
|
|
1406
1505
|
__decorate([query(`ixfx-menu-trigger`)], SplitButton.prototype, "_menuTrigger", void 0);
|
|
1506
|
+
__decorate([query(`.popover-panel`)], SplitButton.prototype, "_popoverPanel", void 0);
|
|
1507
|
+
__decorate([query(`button.caret`)], SplitButton.prototype, "_caretEl", void 0);
|
|
1508
|
+
__decorate([state()], SplitButton.prototype, "_hasPopoverSlot", void 0);
|
|
1509
|
+
__decorate([state()], SplitButton.prototype, "_popoverOpen", void 0);
|
|
1407
1510
|
__decorate([state()], SplitButton.prototype, "_selectedCommand", void 0);
|
|
1408
1511
|
__decorate([state()], SplitButton.prototype, "_selectedLabel", void 0);
|
|
1409
1512
|
__decorate([state()], SplitButton.prototype, "_selectedIcon", void 0);
|
|
@@ -11072,6 +11175,7 @@ var MulticolColumnController = class {
|
|
|
11072
11175
|
if (this.#listerEl) {
|
|
11073
11176
|
this.#pushItems();
|
|
11074
11177
|
this.#restoreAfterSync();
|
|
11178
|
+
this.#applyTags();
|
|
11075
11179
|
}
|
|
11076
11180
|
if (r.changed) this.#onSelectionChange(this.id, r.selected, r.restored ? `restore` : `data`);
|
|
11077
11181
|
}
|
|
@@ -11110,6 +11214,38 @@ var MulticolColumnController = class {
|
|
|
11110
11214
|
#applyPartialKeys() {
|
|
11111
11215
|
if (!this.#listerEl) return;
|
|
11112
11216
|
for (const list of this.#listerEl.querySelectorAll(`ixfx-vertical-list`)) list.partialKeys = this.#partialKeys;
|
|
11217
|
+
this.#applyTags();
|
|
11218
|
+
}
|
|
11219
|
+
#tagKeys;
|
|
11220
|
+
#tagHook;
|
|
11221
|
+
#tagBehaviour;
|
|
11222
|
+
/**
|
|
11223
|
+
* Item tags for this column: `keys` (by item key) merged with `hook` results,
|
|
11224
|
+
* and the behaviour per tag. Forwarded to the column's inner lists.
|
|
11225
|
+
*/
|
|
11226
|
+
setTags(keys, hook, behaviour) {
|
|
11227
|
+
this.#tagKeys = keys;
|
|
11228
|
+
this.#tagHook = hook;
|
|
11229
|
+
this.#tagBehaviour = behaviour;
|
|
11230
|
+
this.#applyTags();
|
|
11231
|
+
}
|
|
11232
|
+
#applyTags() {
|
|
11233
|
+
if (!this.#listerEl) return;
|
|
11234
|
+
let merged = this.#tagKeys;
|
|
11235
|
+
if (this.#tagHook) {
|
|
11236
|
+
const byTag = /* @__PURE__ */ new Map();
|
|
11237
|
+
for (const [tag, keys] of this.#tagKeys ?? []) byTag.set(tag, new Set(keys));
|
|
11238
|
+
for (const item of this.#lastItems) for (const tag of this.#tagHook(item, this.id) ?? []) {
|
|
11239
|
+
const set = byTag.get(tag) ?? /* @__PURE__ */ new Set();
|
|
11240
|
+
set.add(item.key);
|
|
11241
|
+
byTag.set(tag, set);
|
|
11242
|
+
}
|
|
11243
|
+
merged = byTag;
|
|
11244
|
+
}
|
|
11245
|
+
for (const list of this.#listerEl.querySelectorAll(`ixfx-vertical-list`)) {
|
|
11246
|
+
list.tagBehaviour = this.#tagBehaviour;
|
|
11247
|
+
list.tagKeys = merged;
|
|
11248
|
+
}
|
|
11113
11249
|
}
|
|
11114
11250
|
#handleSelect = () => {
|
|
11115
11251
|
if (this.#syncingSelection || this.#syncsInFlight > 0) return;
|
|
@@ -11658,6 +11794,7 @@ let MulticolListElement = class MulticolListElement extends LitElement {
|
|
|
11658
11794
|
}
|
|
11659
11795
|
updated(changedProperties) {
|
|
11660
11796
|
if (changedProperties.has(`categories`)) this.#resolvePendingColumns();
|
|
11797
|
+
if (changedProperties.has(`tags`)) this.refreshTags();
|
|
11661
11798
|
const seedCategory = flattenCategories(this.categories)[0];
|
|
11662
11799
|
if (!this._autoSeeded && this._columns.length === 0 && seedCategory) {
|
|
11663
11800
|
this._autoSeeded = true;
|
|
@@ -11729,6 +11866,30 @@ let MulticolListElement = class MulticolListElement extends LitElement {
|
|
|
11729
11866
|
_getCategoryTooltip(key) {
|
|
11730
11867
|
return findCategory(this.categories, key)?.description ?? `Change category`;
|
|
11731
11868
|
}
|
|
11869
|
+
#tagKeys;
|
|
11870
|
+
#tagBehaviour;
|
|
11871
|
+
/** Tags by item key, in every column with an item of that key: tag name → keys. */
|
|
11872
|
+
get tagKeys() {
|
|
11873
|
+
return this.#tagKeys;
|
|
11874
|
+
}
|
|
11875
|
+
set tagKeys(value) {
|
|
11876
|
+
if (sameTagKeys(value, this.#tagKeys)) return;
|
|
11877
|
+
this.#tagKeys = value;
|
|
11878
|
+
this.refreshTags();
|
|
11879
|
+
}
|
|
11880
|
+
/** Interaction flags per tag name (`selectable`, `focusable`, `draggable`, `searchable`); the most restrictive flag wins. */
|
|
11881
|
+
get tagBehaviour() {
|
|
11882
|
+
return this.#tagBehaviour;
|
|
11883
|
+
}
|
|
11884
|
+
set tagBehaviour(value) {
|
|
11885
|
+
if (value === this.#tagBehaviour) return;
|
|
11886
|
+
this.#tagBehaviour = value;
|
|
11887
|
+
this.refreshTags();
|
|
11888
|
+
}
|
|
11889
|
+
/** Re-evaluate every column's tags. */
|
|
11890
|
+
refreshTags() {
|
|
11891
|
+
for (const col of this._columns) col.setTags(this.#tagKeys, this.tags, this.#tagBehaviour);
|
|
11892
|
+
}
|
|
11732
11893
|
#partialKeys;
|
|
11733
11894
|
#columnPartialKeys;
|
|
11734
11895
|
/**
|
|
@@ -11775,6 +11936,7 @@ let MulticolListElement = class MulticolListElement extends LitElement {
|
|
|
11775
11936
|
#createController(id, category) {
|
|
11776
11937
|
const controller = this.#createColumnController(id, category);
|
|
11777
11938
|
controller.setPartialKeys(this.#partialFor(id));
|
|
11939
|
+
controller.setTags(this.#tagKeys, this.tags, this.#tagBehaviour);
|
|
11778
11940
|
return controller;
|
|
11779
11941
|
}
|
|
11780
11942
|
#createColumnController(id, category) {
|
|
@@ -12141,6 +12303,7 @@ __decorate([state()], MulticolListElement.prototype, "_resizingColumnId", void 0
|
|
|
12141
12303
|
__decorate([state()], MulticolListElement.prototype, "_draggingColumnId", void 0);
|
|
12142
12304
|
__decorate([state()], MulticolListElement.prototype, "_dropCaretX", void 0);
|
|
12143
12305
|
__decorate([query(`#container`)], MulticolListElement.prototype, "_containerEl", void 0);
|
|
12306
|
+
__decorate([property({ attribute: false })], MulticolListElement.prototype, "tags", void 0);
|
|
12144
12307
|
MulticolListElement = __decorate([safeCustomElement(`ixfx-multicol-list`)], MulticolListElement);
|
|
12145
12308
|
function withoutKey(map, key) {
|
|
12146
12309
|
const next = new Map(map);
|
|
@@ -17993,4 +18156,4 @@ function monitorIndeterminate(targetElOrQuery, watchedElsOrQueries) {
|
|
|
17993
18156
|
function init() {
|
|
17994
18157
|
console.log(`Init`);
|
|
17995
18158
|
}
|
|
17996
|
-
export { AGE_UNITS, AcTextElement, AcTokenElement, BottomDrawerElement, ButtonElement, Checkbox, CheckedSelect, ColourPicker, ColourPickerPopup, CrumbNavigationElement, CrumbPathController, CrumbPathElement, DEFAULT_FORCE_OPTIONS, DEFAULT_SIBLING_SPACING, DRAG_THRESHOLD_PX, DataController, DataDisplayComponent, DataGridElement, DataTableElement, DateInputElement, DetailListElement, DockHostElement, DockPanelElement, EASY_CONNECT_MARGIN, EDGE_CORNER_RADIUS, EMPTY_FLAGS, EMPTY_GROUP_LABEL, EMPTY_KEYS, EditableLabel, EditableNumber, FlatListElement, FormElement, FormGroupElement, FormOptionsElement, FormPartElement, FormRowElement, GraphNodeElement, GraphPortElement, GridListElement, GroupedItemListerElement, HyperbolicTreeListElement, ICON_CARET_RIGHT, ICON_CHECK, ICON_CHEVRON_DOWN, ICON_CLOSE, IcicleTreeListElement, IncrSearchTreeController as IncrSearchMillerController, IncrSearchTreeController, IxfxHexEditorElement, IxfxIconElement, IxfxTimelineElement, KeyedElementIndex, LIST_ITEM_MOTION_MS, LIST_SEARCH_COMMAND_IDS, LIST_SEARCH_MODES, LabelledRadialInput, LabelledRangeInput, LabelledSliderInput, LedElement, ListDragSelectController, ListGroupHeaderElement, ListNativeDragController, ListSearchController, ListSelectionController, MARQUEE_THRESHOLD_PX, MAX_BLINK_HZ, MAX_FLOW_SPEED, MAX_PENDING_KEYS, MarqueeController, menu_exports as Menu, MillerBaseElement, MillerListElement, MillerTreeController, MulticolListElement, NODE_SHAPES, NarrowedTextElement, NodeDragController, NodeGraphElement, NotificationManager, NotificationPillElement, PARTIAL_DESCRIPTION, PanTextElement, PanZoomController, PanelElement, PanelGroupElement, PlotDataSeries, PlotHistogram, PlotMultiAxis, PlotSingleAxis, PlotXyAxis, PolarPad, RESIZE_HANDLES, RadialInputElement, RadioGroup, RangeElement, RangeInput, RangeMultiElement, RatingElement, SCROLL_HOVER_SUPPRESS_ATTR, SIZE_UNITS, SUNBURST_PATH_SEPARATOR, SelectHorizElement, ShapefillValueElement, SliderInputElement, SlidingNumberElement, SnackbarElement, SnapContainer, SplitButton, SplitLayoutElement, SplitPanelElement, SunburstTreeListElement, SwipeElement, TabController, TabListElement, TabListItemElement, TabPanelElement, TabPanelsElement, TextShimmerElement, TickledController, TimelineController, TimelineTrackTabElement, TitlebarElement, ToolbarElement, ToolbarGroupElement, TooltipElement, TransitoryLabelElement, TreeBaseElement, TreeController, TreeDataModel, TreeDropController, TreeKeyboardNavController, TreeListElement, TreemapListElement, TwoSplitLayoutElement, UnitInputElement, VIEW_STATE_CHANGE, VIEW_STATE_VERSION, VerticalListElement, ViewStateController, WireDragController, XyPad, addPanelToStack, addWire, anchorFromRow, animateListItemIn, animateListItemOut, applyAgeModification, applyHighlights, applyIsometry, applyPartialAttributes, applySnapshot, applyTreeDrop, attachTimelineInteractions, bestUnit, bindViewState, blinkPeriodSeconds, bottomDrawerCommandId, boundsOf, buildHighlightTargets, buildModel, canConnect, capFlags, capKeys, captionForEntry, captureElementScroll, clampToDisk, clampZoom, clearHighlights, collapsedOffset, collectContainerNames, collectDataResult, collectPanelIds, collectStackPaths, combineSelection, composeIsometry, computeCanonicalPositions, computeColour, computeHyperbolicLayout, computeIcicleLayout, computeLeafGeoms, computeSunburstLayout, computeTreemapLayout, connectContext, createAcCompletionProvider, createDataListSearchAdapter, createDefaultListDragPreview, createElementIncrSearch, createElementListSearchAdapter, createEmptyLayout, createEmptyStack, createFuzzySearch, createIncrSearch, createNotificationManager, createPillRenderer, createScrollHoverGuard, createSplit, createStack, createTreeListAdapter, createTreeListSearchAdapter, createValueResolver, createVerticalListAdapter, cycleBlockedNodes, decomposeViewIsometry, defaultGroupLabel, defaultSide, defaultSunburstValueAccessor, distribute, dropTargetFor, edgeId, edgeMidpoint, edgePath, edgeShape, ensurePort, euclideanRadiusForHyperbolicDistance, extendFromSide, extractStack, findEmptiedStacks, findHyperbolicIdOf, findHyperbolicKeyPath, findHyperbolicNode, findHyperbolicPath, findHyperbolicPathById, findIcicleKeyPath, findIcicleNode, findIciclePath, findNode, findPanelNode, findParentOf, findProximityConnection, findSnapTarget, findStackOf, findStackPathByName, findSunburstId, findSunburstNodeById, findTreemapNode, findTreemapPath, findValidWire, fitBounds, fitRects, flagsFromRecord, flagsToRecord, flowToScreen, forceMovement, forcePin, forcePositions, forceState, forceStep, formatDateInput, fromEdges, geodesicInterpolate, geodesicPath, geodesicSegment, gestureOf, getActiveDragPanelId, getIcon, getIconEntry, getIconFont, getLeafNeighbours, hasIcon, hasWire, hyperbolicBranchId, hyperbolicChildIds, hyperbolicDistanceForEuclideanRadius, hyperbolicIdDepth, hyperbolicRelativeFrame, iconBus, identityIsometry, inDegreeOf, inEasyConnectZone, incomingEdge, incomingEdges, init, insertBeside, invertIsometry, isDragging, isEditableTarget, isHyperbolicDescendantId, isMultiMode, isNodeShape, isPartialKey, isResizeHandle, isSplit, isStack, isSunburstAncestorId, isViewStateful, keyForElement, keysAsFlags, keysToArray, listItemFadeKeyframes, listSearchStyles, marqueeStyle, measureNode, mobiusAdd, mobiusFromOrigin, mobiusToOrigin, monitorIndeterminate, moveLeafNodeToEdge, moveLeafStep, nodeGraphStyles, nodesInRect, norm, normalise, normaliseConnection, normaliseValue, normalize, onUserScrollIntent, outDegreeOf, panBy, panelGapIndex, parseColourScaleAttr, parseDateInput, parseLayout, parsePortId, partitionByGroup, partitionFlags, partitionKeys, pickStartPort, poincareDistance, pointerOverAnyHost, polylineMidpoint, polylinePath, polylineShape, portId, prefersReducedMotion, preserveRestoreWeights, proximityFactor, pruneDraggedDescendants, readBaseColour, rectFromPoints, rectGap, rectsIntersect, registerFontIcon, registerIcon, registerListSearchCommands, removeNode, removeNodes, removePanelFromStack, removeWire, renderWires, resizeRect, resolveConnection, resolveCssVars, resolveGrid, resolveGroupKey, resolveIcicleKeyPath, resolveLeafPath, resolveTracks, restoreElementScroll, rotationIsometry, sameKeySet, sanitizeFlowSpeed, screenToFlow, scrollToOffset, selectionAfterEdgeClick, selectionAfterNodePress, serializeLayout, setActive, setIconFont, setPanelRestoreWeight, settled, shapeSpec, smoothStep, snapshotNonEmptyStacks, startListItemOutAnimation, stepPoints, sunburstChildId, sunburstHasChildren, sunburstIdToPath, sunburstParentId, sunburstPathToId, svgToDataUri, swapLeaves, tickledItemStyles, tickledStyles, timelineStyles, toBase, toEdges, toGroupKey, toNodeGraph, toSnapshot, toggleInSet, toolbarGapIndex, translationFromOrigin, typesCompatible, viewIsometry, walk, wantsMarquee, withEntry, withWireFlow, withoutFlag, wrapRoot, zoomAt };
|
|
18159
|
+
export { AGE_UNITS, AcTextElement, AcTokenElement, BottomDrawerElement, ButtonElement, Checkbox, CheckedSelect, ColourPicker, ColourPickerPopup, CrumbNavigationElement, CrumbPathController, CrumbPathElement, DEFAULT_FORCE_OPTIONS, DEFAULT_ITEM_TAG_FLAGS, DEFAULT_SIBLING_SPACING, DRAG_THRESHOLD_PX, DataController, DataDisplayComponent, DataGridElement, DataTableElement, DateInputElement, DetailListElement, DockHostElement, DockPanelElement, EASY_CONNECT_MARGIN, EDGE_CORNER_RADIUS, EMPTY_FLAGS, EMPTY_GROUP_LABEL, EMPTY_KEYS, EditableLabel, EditableNumber, FlatListElement, FormElement, FormGroupElement, FormOptionsElement, FormPartElement, FormRowElement, GraphNodeElement, GraphPortElement, GridListElement, GroupedItemListerElement, HyperbolicTreeListElement, ICON_CARET_RIGHT, ICON_CHECK, ICON_CHEVRON_DOWN, ICON_CLOSE, IcicleTreeListElement, IncrSearchTreeController as IncrSearchMillerController, IncrSearchTreeController, ItemTagResolver, IxfxHexEditorElement, IxfxIconElement, IxfxTimelineElement, KeyedElementIndex, LIST_ITEM_MOTION_MS, LIST_SEARCH_COMMAND_IDS, LIST_SEARCH_MODES, LabelledRadialInput, LabelledRangeInput, LabelledSliderInput, LedElement, ListDragSelectController, ListGroupHeaderElement, ListNativeDragController, ListSearchController, ListSelectionController, MARQUEE_THRESHOLD_PX, MAX_BLINK_HZ, MAX_FLOW_SPEED, MAX_PENDING_KEYS, MarqueeController, menu_exports as Menu, MillerBaseElement, MillerListElement, MillerTreeController, MulticolListElement, NODE_SHAPES, NarrowedTextElement, NodeDragController, NodeGraphElement, NotificationManager, NotificationPillElement, PARTIAL_DESCRIPTION, PanTextElement, PanZoomController, PanelElement, PanelGroupElement, PlotDataSeries, PlotHistogram, PlotMultiAxis, PlotSingleAxis, PlotXyAxis, PolarPad, RESIZE_HANDLES, RadialInputElement, RadioGroup, RangeElement, RangeInput, RangeMultiElement, RatingElement, SCROLL_HOVER_SUPPRESS_ATTR, SIZE_UNITS, SUNBURST_PATH_SEPARATOR, SelectHorizElement, ShapefillValueElement, SliderInputElement, SlidingNumberElement, SnackbarElement, SnapContainer, SplitButton, SplitLayoutElement, SplitPanelElement, SunburstTreeListElement, SwipeElement, TAG_PART_PREFIX, TabController, TabListElement, TabListItemElement, TabPanelElement, TabPanelsElement, TextShimmerElement, TickledController, TimelineController, TimelineTrackTabElement, TitlebarElement, ToolbarElement, ToolbarGroupElement, TooltipElement, TransitoryLabelElement, TreeBaseElement, TreeController, TreeDataModel, TreeDropController, TreeKeyboardNavController, TreeListElement, TreemapListElement, TwoSplitLayoutElement, UnitInputElement, VIEW_STATE_CHANGE, VIEW_STATE_VERSION, VerticalListElement, ViewStateController, WireDragController, XyPad, addPanelToStack, addWire, anchorFromRow, animateListItemIn, animateListItemOut, applyAgeModification, applyHighlights, applyIsometry, applyPartialAttributes, applySnapshot, applyTagAttributes, applyTreeDrop, attachTimelineInteractions, bestUnit, bindViewState, blinkPeriodSeconds, bottomDrawerCommandId, boundsOf, buildHighlightTargets, buildModel, canConnect, capFlags, capKeys, captionForEntry, captureElementScroll, clampToDisk, clampZoom, clearHighlights, collapsedOffset, collectContainerNames, collectDataResult, collectPanelIds, collectStackPaths, collectTags, combineSelection, composeIsometry, computeCanonicalPositions, computeColour, computeHyperbolicLayout, computeIcicleLayout, computeLeafGeoms, computeSunburstLayout, computeTreemapLayout, connectContext, createAcCompletionProvider, createDataListSearchAdapter, createDefaultListDragPreview, createElementIncrSearch, createElementListSearchAdapter, createEmptyLayout, createEmptyStack, createFuzzySearch, createIncrSearch, createNotificationManager, createPillRenderer, createScrollHoverGuard, createSplit, createStack, createTreeListAdapter, createTreeListSearchAdapter, createValueResolver, createVerticalListAdapter, cycleBlockedNodes, decomposeViewIsometry, defaultGroupLabel, defaultSide, defaultSunburstValueAccessor, distribute, dropTargetFor, edgeId, edgeMidpoint, edgePath, edgeShape, ensurePort, euclideanRadiusForHyperbolicDistance, extendFromSide, extractStack, findEmptiedStacks, findHyperbolicIdOf, findHyperbolicKeyPath, findHyperbolicNode, findHyperbolicPath, findHyperbolicPathById, findIcicleKeyPath, findIcicleNode, findIciclePath, findNode, findPanelNode, findParentOf, findProximityConnection, findSnapTarget, findStackOf, findStackPathByName, findSunburstId, findSunburstNodeById, findTreemapNode, findTreemapPath, findValidWire, fitBounds, fitRects, flagsFromRecord, flagsToRecord, flowToScreen, forceMovement, forcePin, forcePositions, forceState, forceStep, formatDateInput, fromEdges, geodesicInterpolate, geodesicPath, geodesicSegment, gestureOf, getActiveDragPanelId, getIcon, getIconEntry, getIconFont, getLeafNeighbours, hasIcon, hasWire, hyperbolicBranchId, hyperbolicChildIds, hyperbolicDistanceForEuclideanRadius, hyperbolicIdDepth, hyperbolicRelativeFrame, iconBus, identityIsometry, inDegreeOf, inEasyConnectZone, incomingEdge, incomingEdges, init, insertBeside, invertIsometry, isDragging, isEditableTarget, isHyperbolicDescendantId, isMultiMode, isNodeShape, isPartialKey, isResizeHandle, isSplit, isStack, isSunburstAncestorId, isViewStateful, keyForElement, keysAsFlags, keysToArray, listItemFadeKeyframes, listSearchStyles, marqueeStyle, measureNode, mobiusAdd, mobiusFromOrigin, mobiusToOrigin, monitorIndeterminate, moveLeafNodeToEdge, moveLeafStep, nodeGraphStyles, nodesInRect, norm, normalise, normaliseConnection, normaliseValue, normalize, onUserScrollIntent, outDegreeOf, panBy, panelGapIndex, parseColourScaleAttr, parseDateInput, parseLayout, parsePortId, partitionByGroup, partitionFlags, partitionKeys, pickStartPort, poincareDistance, pointerOverAnyHost, polylineMidpoint, polylinePath, polylineShape, portId, prefersReducedMotion, preserveRestoreWeights, proximityFactor, pruneDraggedDescendants, readBaseColour, rectFromPoints, rectGap, rectsIntersect, registerFontIcon, registerIcon, registerListSearchCommands, removeNode, removeNodes, removePanelFromStack, removeWire, renderWires, resizeRect, resolveConnection, resolveCssVars, resolveGrid, resolveGroupKey, resolveIcicleKeyPath, resolveLeafPath, resolveTagFlags, resolveTracks, restoreElementScroll, rotationIsometry, sameKeySet, sameTagKeys, sameTags, sanitizeFlowSpeed, screenToFlow, scrollToOffset, selectionAfterEdgeClick, selectionAfterNodePress, serializeLayout, setActive, setIconFont, setPanelRestoreWeight, settled, shapeSpec, smoothStep, snapshotNonEmptyStacks, startListItemOutAnimation, stepPoints, sunburstChildId, sunburstHasChildren, sunburstIdToPath, sunburstParentId, sunburstPathToId, svgToDataUri, swapLeaves, tagPartTokens, tagsAttribute, tickledItemStyles, tickledStyles, timelineStyles, toBase, toEdges, toGroupKey, toNodeGraph, toSnapshot, toggleInSet, toolbarGapIndex, translationFromOrigin, typesCompatible, viewIsometry, walk, wantsMarquee, withEntry, withWireFlow, withoutFlag, wrapRoot, zoomAt };
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Caller-assigned item tags, shared by every list-like component
|
|
3
|
+
* (`ixfx-grid-list`, `ixfx-detail-list`, `ixfx-data-grid`, `ixfx-multicol-list`).
|
|
4
|
+
*
|
|
5
|
+
* What a tag *means* belongs to the caller. The component only
|
|
6
|
+
*
|
|
7
|
+
* 1. exposes it for styling: a `tag-<name>` token in the item's `part`, and
|
|
8
|
+
* `data-tags` (space-separated, so `[data-tags~="foo"]` matches);
|
|
9
|
+
* 2. applies the generic interaction flags declared for it in `tagBehaviour`.
|
|
10
|
+
*
|
|
11
|
+
* Tokens are prefixed so a caller tag called `selected` cannot collide with
|
|
12
|
+
* the built-in state token.
|
|
13
|
+
*/
|
|
14
|
+
/** Generic interaction flags a tag can switch off. Omitted flags keep the default (`true`). */
|
|
15
|
+
type ItemTagBehaviourFlags = {
|
|
16
|
+
/** `false`: no selection or tickle, no `list-select-intent`; range and select-all skip the item. */
|
|
17
|
+
selectable?: boolean;
|
|
18
|
+
/** `false`: keyboard cursor movement skips the item. */
|
|
19
|
+
focusable?: boolean;
|
|
20
|
+
/** `false`: no drag starts from the item. */
|
|
21
|
+
draggable?: boolean;
|
|
22
|
+
/** `false`: the item is left out of incremental search. */
|
|
23
|
+
searchable?: boolean;
|
|
24
|
+
};
|
|
25
|
+
/** Behaviour declarations keyed by tag name. */
|
|
26
|
+
type ItemTagBehaviour = Readonly<Record<string, ItemTagBehaviourFlags>>;
|
|
27
|
+
/** Tag assignment by key set: tag name → keys that carry it. Like `partialKeys`, for tags kept apart from the data. */
|
|
28
|
+
type ItemTagKeys = ReadonlyMap<string, ReadonlySet<string>>;
|
|
29
|
+
/** The effective flags for an item: every flag is explicit. */
|
|
30
|
+
type ResolvedItemTagFlags = Required<ItemTagBehaviourFlags>;
|
|
31
|
+
declare const DEFAULT_ITEM_TAG_FLAGS: ResolvedItemTagFlags;
|
|
32
|
+
/** Prefix of a tag's `part` token. */
|
|
33
|
+
declare const TAG_PART_PREFIX = "tag-";
|
|
34
|
+
/**
|
|
35
|
+
* Merge the tags from the per-item hook and from `tagKeys`, de-duplicated,
|
|
36
|
+
* in first-seen order. Empty and whitespace-containing names are dropped
|
|
37
|
+
* (they could not be a single `part` token).
|
|
38
|
+
*/
|
|
39
|
+
declare function collectTags(key: string | undefined, fromHook: readonly string[] | undefined, tagKeys: ItemTagKeys | undefined): readonly string[];
|
|
40
|
+
/** Most restrictive wins: any `false` among the item's tags beats the default and any `true`. */
|
|
41
|
+
declare function resolveTagFlags(tags: readonly string[], behaviour: ItemTagBehaviour | undefined): ResolvedItemTagFlags;
|
|
42
|
+
/** ` tag-foo tag-bar` — append to a `part` value. Empty string when there are no tags. */
|
|
43
|
+
declare function tagPartTokens(tags: readonly string[]): string;
|
|
44
|
+
/** Value for `data-tags` (`"foo bar"`), or `undefined` when there are no tags. */
|
|
45
|
+
declare function tagsAttribute(tags: readonly string[]): string | undefined;
|
|
46
|
+
/** Reflect tags onto an element (element mode / light DOM): `data-tags`, and `tag-*` tokens in `part` it didn't set. */
|
|
47
|
+
declare function applyTagAttributes(el: Element, tags: readonly string[], basePart?: string): void;
|
|
48
|
+
/** Whether two tag lists are identical (order matters; lists are tiny). */
|
|
49
|
+
declare function sameTags(a: readonly string[], b: readonly string[]): boolean;
|
|
50
|
+
/** Whether two `tagKeys` maps hold the same tags with the same keys. */
|
|
51
|
+
declare function sameTagKeys(a: ItemTagKeys | undefined, b: ItemTagKeys | undefined): boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Per-component holder for the two assignment forms and `tagBehaviour`.
|
|
54
|
+
* Resolves an item's tags and flags; caches nothing (callers re-render on change).
|
|
55
|
+
*/
|
|
56
|
+
declare class ItemTagResolver {
|
|
57
|
+
tagKeys: ItemTagKeys | undefined;
|
|
58
|
+
behaviour: ItemTagBehaviour | undefined;
|
|
59
|
+
/** Tags for an item, merging the hook's result with `tagKeys`. */
|
|
60
|
+
tagsFor(key: string | undefined, fromHook?: readonly string[]): readonly string[];
|
|
61
|
+
flagsFor(tags: readonly string[]): ResolvedItemTagFlags;
|
|
62
|
+
/** Convenience: flags for an item straight from its key and hook result. */
|
|
63
|
+
flagsForItem(key: string | undefined, fromHook?: readonly string[]): ResolvedItemTagFlags;
|
|
64
|
+
}
|
|
65
|
+
export { ItemTagResolver as a, applyTagAttributes as c, sameTagKeys as d, sameTags as f, ItemTagKeys as i, collectTags as l, tagsAttribute as m, ItemTagBehaviour as n, ResolvedItemTagFlags as o, tagPartTokens as p, ItemTagBehaviourFlags as r, TAG_PART_PREFIX as s, DEFAULT_ITEM_TAG_FLAGS as t, resolveTagFlags as u };
|
package/dist/{list-native-drag-controller-Brk30s5d.js → list-native-drag-controller-B_INa6_G.js}
RENAMED
|
@@ -1,5 +1,110 @@
|
|
|
1
1
|
import { n as getIconEntry, r as getIconFont } from "./registry-DcF0fO7l.js";
|
|
2
2
|
import { css } from "lit";
|
|
3
|
+
// src/interaction/item-tags.ts
|
|
4
|
+
const DEFAULT_ITEM_TAG_FLAGS = Object.freeze({
|
|
5
|
+
selectable: true,
|
|
6
|
+
focusable: true,
|
|
7
|
+
draggable: true,
|
|
8
|
+
searchable: true
|
|
9
|
+
});
|
|
10
|
+
const NO_TAGS = Object.freeze([]);
|
|
11
|
+
/** Prefix of a tag's `part` token. */
|
|
12
|
+
const TAG_PART_PREFIX = `tag-`;
|
|
13
|
+
/**
|
|
14
|
+
* Merge the tags from the per-item hook and from `tagKeys`, de-duplicated,
|
|
15
|
+
* in first-seen order. Empty and whitespace-containing names are dropped
|
|
16
|
+
* (they could not be a single `part` token).
|
|
17
|
+
*/
|
|
18
|
+
function collectTags(key, fromHook, tagKeys) {
|
|
19
|
+
let out;
|
|
20
|
+
const add = (tag) => {
|
|
21
|
+
if (tag === `` || /\s/.test(tag)) return;
|
|
22
|
+
out ??= [];
|
|
23
|
+
if (!out.includes(tag)) out.push(tag);
|
|
24
|
+
};
|
|
25
|
+
if (fromHook) for (const tag of fromHook) add(tag);
|
|
26
|
+
if (tagKeys && key !== void 0) {
|
|
27
|
+
for (const [tag, keys] of tagKeys) if (keys.has(key)) add(tag);
|
|
28
|
+
}
|
|
29
|
+
return out ?? NO_TAGS;
|
|
30
|
+
}
|
|
31
|
+
/** Most restrictive wins: any `false` among the item's tags beats the default and any `true`. */
|
|
32
|
+
function resolveTagFlags(tags, behaviour) {
|
|
33
|
+
if (tags.length === 0 || !behaviour) return DEFAULT_ITEM_TAG_FLAGS;
|
|
34
|
+
let selectable = true;
|
|
35
|
+
let focusable = true;
|
|
36
|
+
let draggable = true;
|
|
37
|
+
let searchable = true;
|
|
38
|
+
for (const tag of tags) {
|
|
39
|
+
const flags = Object.hasOwn(behaviour, tag) ? behaviour[tag] : void 0;
|
|
40
|
+
if (!flags) continue;
|
|
41
|
+
if (flags.selectable === false) selectable = false;
|
|
42
|
+
if (flags.focusable === false) focusable = false;
|
|
43
|
+
if (flags.draggable === false) draggable = false;
|
|
44
|
+
if (flags.searchable === false) searchable = false;
|
|
45
|
+
}
|
|
46
|
+
return selectable && focusable && draggable && searchable ? DEFAULT_ITEM_TAG_FLAGS : {
|
|
47
|
+
selectable,
|
|
48
|
+
focusable,
|
|
49
|
+
draggable,
|
|
50
|
+
searchable
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
/** ` tag-foo tag-bar` — append to a `part` value. Empty string when there are no tags. */
|
|
54
|
+
function tagPartTokens(tags) {
|
|
55
|
+
let out = ``;
|
|
56
|
+
for (const tag of tags) out += ` ${TAG_PART_PREFIX}${tag}`;
|
|
57
|
+
return out;
|
|
58
|
+
}
|
|
59
|
+
/** Value for `data-tags` (`"foo bar"`), or `undefined` when there are no tags. */
|
|
60
|
+
function tagsAttribute(tags) {
|
|
61
|
+
return tags.length === 0 ? void 0 : tags.join(` `);
|
|
62
|
+
}
|
|
63
|
+
/** Reflect tags onto an element (element mode / light DOM): `data-tags`, and `tag-*` tokens in `part` it didn't set. */
|
|
64
|
+
function applyTagAttributes(el, tags, basePart) {
|
|
65
|
+
const value = tagsAttribute(tags);
|
|
66
|
+
if (value === void 0) el.removeAttribute(`data-tags`);
|
|
67
|
+
else el.setAttribute(`data-tags`, value);
|
|
68
|
+
if (basePart !== void 0) {
|
|
69
|
+
const part = basePart + tagPartTokens(tags);
|
|
70
|
+
if (part === ``) el.removeAttribute(`part`);
|
|
71
|
+
else el.setAttribute(`part`, part);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
/** Whether two tag lists are identical (order matters; lists are tiny). */
|
|
75
|
+
function sameTags(a, b) {
|
|
76
|
+
if (a === b) return true;
|
|
77
|
+
if (a.length !== b.length) return false;
|
|
78
|
+
return a.every((tag, i) => tag === b[i]);
|
|
79
|
+
}
|
|
80
|
+
/** Whether two `tagKeys` maps hold the same tags with the same keys. */
|
|
81
|
+
function sameTagKeys(a, b) {
|
|
82
|
+
if (a === b) return true;
|
|
83
|
+
if (!a || !b || a.size !== b.size) return false;
|
|
84
|
+
for (const [tag, keys] of a) {
|
|
85
|
+
const other = b.get(tag);
|
|
86
|
+
if (!other || other.size !== keys.size) return false;
|
|
87
|
+
for (const key of keys) if (!other.has(key)) return false;
|
|
88
|
+
}
|
|
89
|
+
return true;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Per-component holder for the two assignment forms and `tagBehaviour`.
|
|
93
|
+
* Resolves an item's tags and flags; caches nothing (callers re-render on change).
|
|
94
|
+
*/
|
|
95
|
+
var ItemTagResolver = class {
|
|
96
|
+
/** Tags for an item, merging the hook's result with `tagKeys`. */
|
|
97
|
+
tagsFor(key, fromHook) {
|
|
98
|
+
return collectTags(key, fromHook, this.tagKeys);
|
|
99
|
+
}
|
|
100
|
+
flagsFor(tags) {
|
|
101
|
+
return resolveTagFlags(tags, this.behaviour);
|
|
102
|
+
}
|
|
103
|
+
/** Convenience: flags for an item straight from its key and hook result. */
|
|
104
|
+
flagsForItem(key, fromHook) {
|
|
105
|
+
return resolveTagFlags(collectTags(key, fromHook, this.tagKeys), this.behaviour);
|
|
106
|
+
}
|
|
107
|
+
};
|
|
3
108
|
// src/interaction/list-drag-preview-row.ts
|
|
4
109
|
const ROW_MIN = 24;
|
|
5
110
|
const ROW_MAX = 36;
|
|
@@ -818,4 +923,4 @@ var ListNativeDragController = class {
|
|
|
818
923
|
} catch {}
|
|
819
924
|
};
|
|
820
925
|
};
|
|
821
|
-
export { listItemFadeKeyframes as a, captionForEntry as c, animateListItemOut as i, createDefaultListDragPreview as l, LIST_ITEM_MOTION_MS as n, prefersReducedMotion as o, animateListItemIn as r, startListItemOutAnimation as s, ListNativeDragController as t };
|
|
926
|
+
export { sameTags as _, listItemFadeKeyframes as a, captionForEntry as c, ItemTagResolver as d, TAG_PART_PREFIX as f, sameTagKeys as g, resolveTagFlags as h, animateListItemOut as i, createDefaultListDragPreview as l, collectTags as m, LIST_ITEM_MOTION_MS as n, prefersReducedMotion as o, applyTagAttributes as p, animateListItemIn as r, startListItemOutAnimation as s, ListNativeDragController as t, DEFAULT_ITEM_TAG_FLAGS as u, tagPartTokens as v, tagsAttribute as y };
|