@ixfx/components 0.10.3 → 0.10.5
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 +106 -28
- package/bundle/index.d.ts.map +1 -1
- package/bundle/index.js +335 -22
- package/bundle/index.js.map +1 -1
- package/dist/ac-text.d.ts +1 -1
- package/dist/{ac-token-TCLAZeVg.d.ts → ac-token--_vCHXWw.d.ts} +2 -2
- package/dist/{ac-token-TCLAZeVg.d.ts.map → ac-token--_vCHXWw.d.ts.map} +1 -1
- package/dist/ac-token.d.ts +1 -1
- package/dist/{button-DsFbV4XD.js → button-B7mgqtxR.js} +36 -2
- package/dist/button-B7mgqtxR.js.map +1 -0
- package/dist/button-BYuf72aR.d.ts +63 -0
- package/dist/button-BYuf72aR.d.ts.map +1 -0
- package/dist/button.d.ts +2 -21
- package/dist/button.js +1 -1
- package/dist/colour-picker.d.ts +1 -1
- package/dist/crumbs.d.ts +1 -1
- package/dist/{data-grid-f9W2uzaR.d.ts → data-grid-DE1_gZNk.d.ts} +10 -5
- package/dist/data-grid-DE1_gZNk.d.ts.map +1 -0
- package/dist/data-grid.d.ts +2 -2
- package/dist/data-grid.js +56 -0
- package/dist/data-grid.js.map +1 -1
- package/dist/{detail-list-C3tozzBT.d.ts → detail-list-CaStSzYN.d.ts} +7 -5
- package/dist/detail-list-CaStSzYN.d.ts.map +1 -0
- package/dist/detail-list.d.ts +4 -3
- package/dist/detail-list.js +61 -1
- package/dist/detail-list.js.map +1 -1
- package/dist/{grid-list-CM1XhTaW.d.ts → grid-list-BJDxBL0x.d.ts} +3 -3
- package/dist/{grid-list-CM1XhTaW.d.ts.map → grid-list-BJDxBL0x.d.ts.map} +1 -1
- package/dist/{grid-list-WE92nfX5.js → grid-list-CaMcdpFJ.js} +22 -3
- package/dist/grid-list-CaMcdpFJ.js.map +1 -0
- package/dist/grid-list.d.ts +2 -2
- package/dist/grid-list.js +1 -1
- package/dist/{grouped-item-lister-CEZ72VOs.d.ts → grouped-item-lister-DETte0Dh.d.ts} +3 -3
- package/dist/{grouped-item-lister-CEZ72VOs.d.ts.map → grouped-item-lister-DETte0Dh.d.ts.map} +1 -1
- package/dist/grouped-item-lister.d.ts +1 -1
- package/dist/{icon-DR_3rSyZ.d.ts → icon-CDGprSdE.d.ts} +2 -2
- package/dist/icon-CDGprSdE.d.ts.map +1 -0
- package/dist/icons.d.ts +2 -2
- package/dist/incr-search.d.ts +1 -1
- package/dist/{index-C59-JEPl.d.ts → index-9AhaHIT2.d.ts} +3 -3
- package/dist/{index-C59-JEPl.d.ts.map → index-9AhaHIT2.d.ts.map} +1 -1
- package/dist/{index-garxxqgV.d.ts → index-CYndvTWH.d.ts} +2 -2
- package/dist/{index-garxxqgV.d.ts.map → index-CYndvTWH.d.ts.map} +1 -1
- package/dist/{index-BUB5SICW.d.ts → index-CoqtMSd9.d.ts} +2 -2
- package/dist/{index-BUB5SICW.d.ts.map → index-CoqtMSd9.d.ts.map} +1 -1
- package/dist/{index-BXafRK-_.d.ts → index-CsaQwNkz.d.ts} +2 -2
- package/dist/{index-BXafRK-_.d.ts.map → index-CsaQwNkz.d.ts.map} +1 -1
- package/dist/{index-CJ5fshD3.d.ts → index-UvnoZUAo.d.ts} +2 -2
- package/dist/{index-CJ5fshD3.d.ts.map → index-UvnoZUAo.d.ts.map} +1 -1
- package/dist/{index-BOUaDIW-.d.ts → index-tq6f8007.d.ts} +2 -2
- package/dist/{index-BOUaDIW-.d.ts.map → index-tq6f8007.d.ts.map} +1 -1
- package/dist/index.d.ts +22 -39
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +93 -14
- package/dist/index.js.map +1 -1
- package/dist/{labelled-input-base-Dp_9KP0G.d.ts → labelled-input-base-DiTme1JO.d.ts} +2 -2
- package/dist/{labelled-input-base-Dp_9KP0G.d.ts.map → labelled-input-base-DiTme1JO.d.ts.map} +1 -1
- package/dist/labelled-radial-input.d.ts +2 -2
- package/dist/labelled-radial-input.d.ts.map +1 -1
- package/dist/labelled-range-input.d.ts +1 -1
- package/dist/labelled-slider-input.d.ts +1 -1
- package/dist/{list-selection-types-B5ioL-dG.d.ts → list-selection-types-PjKdhF-a.d.ts} +1 -9
- package/dist/list-selection-types-PjKdhF-a.d.ts.map +1 -0
- package/dist/list-viewport-types-BRZsLcvp.d.ts +23 -0
- package/dist/list-viewport-types-BRZsLcvp.d.ts.map +1 -0
- package/dist/{menu-item-ZmkXNjek.d.ts → menu-item-CZi9vy5O.d.ts} +2 -2
- package/dist/{menu-item-ZmkXNjek.d.ts.map → menu-item-CZi9vy5O.d.ts.map} +1 -1
- package/dist/menu.d.ts +2 -2
- package/dist/miller.d.ts +1 -1
- package/dist/panel.d.ts +1 -1
- package/dist/{split-layout-C5SYbDrq.d.ts → split-layout-JK3xWVX2.d.ts} +2 -2
- package/dist/{split-layout-C5SYbDrq.d.ts.map → split-layout-JK3xWVX2.d.ts.map} +1 -1
- package/dist/split-layout.d.ts +1 -1
- package/dist/{tab-list-DbMIL520.d.ts → tab-list-pqfKaVAE.d.ts} +31 -2
- package/dist/tab-list-pqfKaVAE.d.ts.map +1 -0
- package/dist/tabs.d.ts +1 -1
- package/dist/tabs.js +24 -5
- package/dist/tabs.js.map +1 -1
- package/dist/{titlebar-B5zSTZnF.d.ts → titlebar-Tqu-VvMU.d.ts} +2 -2
- package/dist/{titlebar-B5zSTZnF.d.ts.map → titlebar-Tqu-VvMU.d.ts.map} +1 -1
- package/dist/titlebar.d.ts +1 -1
- package/dist/tree.d.ts +1 -1
- package/dist/{vertical-list-DdaYcvHQ.d.ts → vertical-list-DfcNsa4p.d.ts} +11 -3
- package/dist/vertical-list-DfcNsa4p.d.ts.map +1 -0
- package/dist/vertical-list.d.ts +4 -3
- package/dist/vertical-list.js +47 -1
- package/dist/vertical-list.js.map +1 -1
- package/docs-user/data-grid.md +9 -0
- package/docs-user/detail-list.md +8 -0
- package/docs-user/grid-list.md +1 -1
- package/docs-user/index.json +2 -2
- package/docs-user/vertical-list.md +7 -0
- package/package.json +1 -1
- package/dist/button-DsFbV4XD.js.map +0 -1
- package/dist/button.d.ts.map +0 -1
- package/dist/data-grid-f9W2uzaR.d.ts.map +0 -1
- package/dist/detail-list-C3tozzBT.d.ts.map +0 -1
- package/dist/grid-list-WE92nfX5.js.map +0 -1
- package/dist/icon-DR_3rSyZ.d.ts.map +0 -1
- package/dist/list-selection-types-B5ioL-dG.d.ts.map +0 -1
- package/dist/tab-list-DbMIL520.d.ts.map +0 -1
- package/dist/vertical-list-DdaYcvHQ.d.ts.map +0 -1
package/dist/ac-text.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./icon-
|
|
1
|
+
import "./icon-CDGprSdE.js";
|
|
2
2
|
import { r as IDataProvider } from "./data-provider-BAn_-oR1.js";
|
|
3
3
|
import { LitElement, PropertyValues } from "lit";
|
|
4
4
|
//#region src/ac-token/types.d.ts
|
|
@@ -104,4 +104,4 @@ interface AcTokenElement {
|
|
|
104
104
|
}
|
|
105
105
|
//#endregion
|
|
106
106
|
export { AcTokenItem as a, AcTokenizerFn as c, AcTokenElementEventMap as i, AcTokensChangeDetail as l, AcTokenAddDetail as n, AcTokenRemoveDetail as o, AcTokenAddEvent as r, AcTokenRemoveEvent as s, AcTokenElement as t, AcTokensChangeEvent as u };
|
|
107
|
-
//# sourceMappingURL=ac-token
|
|
107
|
+
//# sourceMappingURL=ac-token--_vCHXWw.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ac-token
|
|
1
|
+
{"version":3,"file":"ac-token--_vCHXWw.d.ts","names":[],"sources":["../src/ac-token/types.ts","../src/ac-token/ac-token.ts"],"mappings":";;;;KAAY;WACD;WACA;WACA;WACA;WACA;WACA,YAAY;;KAGX,iBAAiB;KAEjB;WACD,iBAAiB;;KAEhB,sBAAsB,YAAY;KAElC;WACD,MAAM;WACN;;KAEC,kBAAkB,YAAY;KAE9B;WACD,MAAM;WACN;;KAEC,qBAAqB,YAAY;UAE5B;EACf,mBAAmB;EACnB,gBAAgB;EAChB,mBAAmB;;;;;;;;;;;;;;;;;;;;cCgDR,uBAAuB;;;EAGlC,oBAAoB,sBAAsB;;EAI1C,WAAW;;EAIX;;EAIA;;EAIA;;;;;EAOA;;;;;;EAQA;UAEiB;UACA;UACA;UACA;UAET;;MAqBJ,mBAAmB;MAInB,OAAO,gBAAgB;;;;;;;EAW3B,UAAU,gBAAgB;;MAKtB;EAMK;EAKA;YASU,QAAQ,cAAc;YA6btB,wBAAM;SA+BT,sBAAM;;QAkLhB;YACI;IACR,iBAAiB;;;UAIJ;EACf,oBAAoB,gBAAgB,wBAClC,MAAM,GACN,WAAW,MAAM,gBAAgB,OAAO,uBAAuB,aAC/D,oBAAoB,sCAEpB,cACA,UAAU,oCACV,oBAAoB"}
|
package/dist/ac-token.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as AcTokenItem, c as AcTokenizerFn, i as AcTokenElementEventMap, l as AcTokensChangeDetail, n as AcTokenAddDetail, o as AcTokenRemoveDetail, r as AcTokenAddEvent, s as AcTokenRemoveEvent, t as AcTokenElement, u as AcTokensChangeEvent } from "./ac-token
|
|
1
|
+
import { a as AcTokenItem, c as AcTokenizerFn, i as AcTokenElementEventMap, l as AcTokensChangeDetail, n as AcTokenAddDetail, o as AcTokenRemoveDetail, r as AcTokenAddEvent, s as AcTokenRemoveEvent, t as AcTokenElement, u as AcTokensChangeEvent } from "./ac-token--_vCHXWw.js";
|
|
2
2
|
export { type AcTokenAddDetail, type AcTokenAddEvent, AcTokenElement, type AcTokenElementEventMap, type AcTokenItem, type AcTokenRemoveDetail, type AcTokenRemoveEvent, type AcTokenizerFn, type AcTokensChangeDetail, type AcTokensChangeEvent };
|
|
@@ -96,6 +96,20 @@ const buttonStyles = css`
|
|
|
96
96
|
:host([subtle]) button:focus-visible:not(:disabled) {
|
|
97
97
|
background: color-mix(in oklch, var(--surface-4, #ccc) 70%, transparent);
|
|
98
98
|
}
|
|
99
|
+
|
|
100
|
+
:host([toggleable]) button:not(:disabled) {
|
|
101
|
+
opacity: 0.7;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
:host([toggleable]) button:hover:not(:disabled) {
|
|
105
|
+
opacity: 0.85;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
:host([toggleable][value]) button:not(:disabled) {
|
|
109
|
+
opacity: 1;
|
|
110
|
+
outline: var(--ixfx-button-toggle-outline-width, 2px) solid var(--ixfx-button-toggle-outline-color, oklch(from var(--accent, #666) l c calc(h + 130)));
|
|
111
|
+
outline-offset: var(--ixfx-button-toggle-outline-offset, 2px);
|
|
112
|
+
}
|
|
99
113
|
`;
|
|
100
114
|
//#endregion
|
|
101
115
|
//#region src/button/button.ts
|
|
@@ -107,7 +121,19 @@ let ButtonElement = class ButtonElement extends LitElement {
|
|
|
107
121
|
this.hideLabel = false;
|
|
108
122
|
this.hasIcon = false;
|
|
109
123
|
this.subtle = false;
|
|
124
|
+
this.toggleable = false;
|
|
125
|
+
this.value = false;
|
|
126
|
+
this.#handleClick = () => {
|
|
127
|
+
if (!this.toggleable || this.disabled) return;
|
|
128
|
+
this.value = !this.value;
|
|
129
|
+
this.dispatchEvent(new CustomEvent(`toggle`, {
|
|
130
|
+
detail: { value: this.value },
|
|
131
|
+
bubbles: true,
|
|
132
|
+
composed: true
|
|
133
|
+
}));
|
|
134
|
+
};
|
|
110
135
|
}
|
|
136
|
+
#handleClick;
|
|
111
137
|
_renderIcon() {
|
|
112
138
|
if (this.hideIcon || !this.icon) return nothing;
|
|
113
139
|
if (this.icon.startsWith(`<svg`)) return html`<span class="button-icon">${unsafeHTML(this.icon)}</span>`;
|
|
@@ -117,7 +143,7 @@ let ButtonElement = class ButtonElement extends LitElement {
|
|
|
117
143
|
render() {
|
|
118
144
|
this.hasIcon = !this.hideIcon && !!this.icon;
|
|
119
145
|
const label = this.hideLabel ? nothing : html`<span class="button-label"><slot></slot></span>`;
|
|
120
|
-
return html`<button ?disabled=${this.disabled}>${this._renderIcon()}${label}</button>`;
|
|
146
|
+
return html`<button ?disabled=${this.disabled} @click=${this.#handleClick}>${this._renderIcon()}${label}</button>`;
|
|
121
147
|
}
|
|
122
148
|
static {
|
|
123
149
|
this.styles = [prominenceStyles, buttonStyles];
|
|
@@ -144,8 +170,16 @@ __decorate([property({
|
|
|
144
170
|
type: Boolean,
|
|
145
171
|
reflect: true
|
|
146
172
|
})], ButtonElement.prototype, "subtle", void 0);
|
|
173
|
+
__decorate([property({
|
|
174
|
+
type: Boolean,
|
|
175
|
+
reflect: true
|
|
176
|
+
})], ButtonElement.prototype, "toggleable", void 0);
|
|
177
|
+
__decorate([property({
|
|
178
|
+
type: Boolean,
|
|
179
|
+
reflect: true
|
|
180
|
+
})], ButtonElement.prototype, "value", void 0);
|
|
147
181
|
ButtonElement = __decorate([safeCustomElement(`ixfx-button`)], ButtonElement);
|
|
148
182
|
//#endregion
|
|
149
183
|
export { buttonStyles as n, ButtonElement as t };
|
|
150
184
|
|
|
151
|
-
//# sourceMappingURL=button-
|
|
185
|
+
//# sourceMappingURL=button-B7mgqtxR.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button-B7mgqtxR.js","names":["#handleClick","customElement"],"sources":["../src/button/button-styles.ts","../src/button/button.ts"],"sourcesContent":["import { css } from 'lit';\n\nexport const buttonStyles = css`\n :host {\n display: inline-flex;\n max-width: 100%;\n vertical-align: middle;\n user-select: none;\n -webkit-user-select: none;\n }\n\n :host([hidden]) {\n display: none;\n }\n\n button {\n cursor: pointer;\n appearance: none;\n background: var(--surface-4, #ccc);\n color: var(--surface-3-text, #000);\n border: var(--border, 1px solid #999);\n outline: var(--ixfx-button-outline, none);\n border-radius: var(--radius-xl, 8px);\n corner-shape: superellipse(1);\n padding: var(--ixfx-button-padding-block, var(--space-m, 8px)) var(--ixfx-button-padding-inline, var(--space-l, 12px));\n font-family: var(--font-family, inherit);\n font-size: var(--text-m, 14px);\n margin: 0;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 0.5em;\n width: 100%;\n overflow: hidden;\n white-space: nowrap;\n box-shadow: \n var(--ixfx-button-shade, none),\n inset 1px 1px 1px 1px color-mix(in oklch, var(--surface-4) 30%, transparent), inset -1px -1px 1px 1px color-mix(in oklch, var(--surface-2) 20%, transparent),\n 2px 2px 1px 0px color-mix(in oklch, var(--surface-2) 30%, transparent);\n transition: background var(--transition, 0.2s), border-color var(--transition, 0.2s);\n }\n\n button:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n button:hover:not(:disabled) {\n background: color-mix(in oklch, var(--surface-4) 80%, transparent);\n border-color: var(--accent, #666);\n box-shadow: \n inset 1px 1px 1px 1px color-mix(in oklch, var(--surface-5) 70%, transparent), \n inset -1px -1px 1px 1px color-mix(in oklch, var(--surface-2) 60%, transparent),\n 2px 2px 1px 0px color-mix(in oklch, var(--surface-2) 90%, transparent);\n }\n\n button:active:not(:disabled) {\n background: var(--surface-2, #aaa);\n transform: translateY(1px);\n box-shadow: inset 1px 1px 0px 0.5px color-mix(in oklch,var(--surface-1),transparent);\n }\n\n .button-icon {\n display: var(--ixfx-button-hide-icon, inline-flex);\n align-items: center;\n flex-shrink: 0;\n }\n\n .button-label {\n white-space: nowrap;\n }\n\n :host([has-icon]) .button-label {\n display: var(--ixfx-button-hide-label, inline);\n }\n\n :host([hide-label]) .button-label {\n display: none;\n }\n\n :host([hide-icon]) .button-icon {\n display: none;\n }\n\n :host([subtle]) button {\n background: color-mix(in oklch, var(--surface-4, #ccc) 40%, transparent);\n }\n\n :host([subtle]) button:hover:not(:disabled),\n :host([subtle]) button:focus-visible:not(:disabled) {\n background: color-mix(in oklch, var(--surface-4, #ccc) 70%, transparent);\n }\n\n :host([toggleable]) button:not(:disabled) {\n opacity: 0.7;\n }\n\n :host([toggleable]) button:hover:not(:disabled) {\n opacity: 0.85;\n }\n\n :host([toggleable][value]) button:not(:disabled) {\n opacity: 1;\n outline: var(--ixfx-button-toggle-outline-width, 2px) solid var(--ixfx-button-toggle-outline-color, oklch(from var(--accent, #666) l c calc(h + 130)));\n outline-offset: var(--ixfx-button-toggle-outline-offset, 2px);\n }\n`;\n","/* eslint-disable ts/no-unsafe-declaration-merging */\nimport type { ButtonToggleDetail, ButtonToggleEvent } from \"./types.js\";\nimport { html, LitElement, nothing } from \"lit\";\nimport { property } from \"lit/decorators.js\";\nimport { unsafeHTML } from \"lit/directives/unsafe-html.js\";\nimport { hasIcon } from \"../icons/index.js\";\nimport { prominenceStyles } from \"../styles/prominence.js\";\nimport { safeCustomElement as customElement } from \"../util/custom-elements.js\";\nimport { buttonStyles } from \"./button-styles.js\";\n\n@customElement(`ixfx-button`)\nexport class ButtonElement extends LitElement {\n @property({ type: Boolean })\n disabled = false;\n\n @property({ type: String })\n icon?: string;\n\n @property({ type: Boolean, attribute: `hide-icon`, reflect: true })\n hideIcon = false;\n\n @property({ type: Boolean, attribute: `hide-label`, reflect: true })\n hideLabel = false;\n\n @property({ type: Boolean, attribute: `has-icon`, reflect: true })\n hasIcon = false;\n\n @property({ type: Boolean, reflect: true })\n subtle = false;\n\n /**\n * When true, this button acts as a toggle: clicking it flips `value`\n * between `true` and `false` instead of (or in addition to) firing a\n * regular click.\n */\n @property({ type: Boolean, reflect: true })\n toggleable = false;\n\n /**\n * Current on/off state of a toggleable button. Ignored when `toggleable`\n * is false. Can be set programmatically or declaratively (`value`\n * attribute).\n */\n @property({ type: Boolean, reflect: true })\n value = false;\n\n #handleClick = (): void => {\n if (!this.toggleable || this.disabled)\n return;\n this.value = !this.value;\n this.dispatchEvent(new CustomEvent<ButtonToggleDetail>(`toggle`, {\n detail: { value: this.value },\n bubbles: true,\n composed: true,\n }));\n };\n\n protected _renderIcon() {\n if (this.hideIcon || !this.icon)\n return nothing;\n\n if (this.icon.startsWith(`<svg`)) {\n return html`<span class=\"button-icon\">${unsafeHTML(this.icon)}</span>`;\n }\n\n if (!hasIcon(this.icon))\n return nothing;\n\n return html`<ixfx-icon class=\"button-icon\" name=\"${this.icon}\"></ixfx-icon>`;\n }\n\n protected render() {\n this.hasIcon = !this.hideIcon && !!this.icon;\n const label = this.hideLabel\n ? nothing\n : html`<span class=\"button-label\"><slot></slot></span>`;\n return html`<button ?disabled=${this.disabled} @click=${this.#handleClick}>${this._renderIcon()}${label}</button>`;\n }\n\n static styles = [\n prominenceStyles,\n buttonStyles,\n ];\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"ixfx-button\": ButtonElement;\n }\n}\n\nexport interface ButtonElementEventMap {\n toggle: ButtonToggleEvent;\n}\n\nexport interface ButtonElement {\n addEventListener: (<K extends keyof ButtonElementEventMap>(\n type: K,\n listener: (this: ButtonElement, event: ButtonElementEventMap[K]) => void,\n options?: boolean | AddEventListenerOptions,\n ) => void) & ((\n type: string,\n listener: EventListenerOrEventListenerObject,\n options?: boolean | AddEventListenerOptions,\n ) => void);\n}\n"],"mappings":";;;;;;;;AAEA,MAAa,eAAe,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACSxB,IAAM,gBAAN,MAAM,sBAAsB,WAAW;;;EAEjC,KAAA,WAAA;EAMA,KAAA,WAAA;EAGC,KAAA,YAAA;EAGF,KAAA,UAAA;EAGD,KAAA,SAAA;EAQI,KAAA,aAAA;EAQL,KAAA,QAAA;EAEmB,KAAA,qBAAA;GACzB,IAAI,CAAC,KAAK,cAAc,KAAK,UAC3B;GACF,KAAK,QAAQ,CAAC,KAAK;GACnB,KAAK,cAAc,IAAI,YAAgC,UAAU;IAC/D,QAAQ,EAAE,OAAO,KAAK,MAAM;IAC5B,SAAS;IACT,UAAU;GACZ,CAAC,CAAC;EACJ;;CATA;CAWA,cAAwB;EACtB,IAAI,KAAK,YAAY,CAAC,KAAK,MACzB,OAAO;EAET,IAAI,KAAK,KAAK,WAAW,MAAM,GAC7B,OAAO,IAAI,6BAA6B,WAAW,KAAK,IAAI,EAAE;EAGhE,IAAI,CAAC,QAAQ,KAAK,IAAI,GACpB,OAAO;EAET,OAAO,IAAI,wCAAwC,KAAK,KAAK;CAC/D;CAEA,SAAmB;EACjB,KAAK,UAAU,CAAC,KAAK,YAAY,CAAC,CAAC,KAAK;EACxC,MAAM,QAAQ,KAAK,YACf,UACA,IAAI;EACR,OAAO,IAAI,qBAAqB,KAAK,SAAS,UAAU,KAAKA,aAAa,GAAG,KAAK,YAAY,IAAI,MAAM;CAC1G;;EAEgB,KAAA,SAAA,CACd,kBACA,YACF;;AACF;AAvEG,WAAA,CAAA,SAAS,EAAE,MAAM,QAAQ,CAAC,CAAA,GAAA,cAAA,WAAA,YAAA,KAAA,CAAA;AAG1B,WAAA,CAAA,SAAS,EAAE,MAAM,OAAO,CAAC,CAAA,GAAA,cAAA,WAAA,QAAA,KAAA,CAAA;AAGzB,WAAA,CAAA,SAAS;CAAE,MAAM;CAAS,WAAW;CAAa,SAAS;AAAK,CAAC,CAAA,GAAA,cAAA,WAAA,YAAA,KAAA,CAAA;AAGjE,WAAA,CAAA,SAAS;CAAE,MAAM;CAAS,WAAW;CAAc,SAAS;AAAK,CAAC,CAAA,GAAA,cAAA,WAAA,aAAA,KAAA,CAAA;AAGlE,WAAA,CAAA,SAAS;CAAE,MAAM;CAAS,WAAW;CAAY,SAAS;AAAK,CAAC,CAAA,GAAA,cAAA,WAAA,WAAA,KAAA,CAAA;AAGhE,WAAA,CAAA,SAAS;CAAE,MAAM;CAAS,SAAS;AAAK,CAAC,CAAA,GAAA,cAAA,WAAA,UAAA,KAAA,CAAA;AAQzC,WAAA,CAAA,SAAS;CAAE,MAAM;CAAS,SAAS;AAAK,CAAC,CAAA,GAAA,cAAA,WAAA,cAAA,KAAA,CAAA;AAQzC,WAAA,CAAA,SAAS;CAAE,MAAM;CAAS,SAAS;AAAK,CAAC,CAAA,GAAA,cAAA,WAAA,SAAA,KAAA,CAAA;AAjC3CC,gBAAAA,WAAAA,CAAAA,kBAAc,aAAa,CAAA,GAAA,aAAA"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { LitElement, nothing } from "lit";
|
|
2
|
+
//#region src/button/types.d.ts
|
|
3
|
+
type SplitButtonSelectDetail = {
|
|
4
|
+
readonly value: string;
|
|
5
|
+
readonly label: string;
|
|
6
|
+
};
|
|
7
|
+
type SplitButtonSelectEvent = CustomEvent<SplitButtonSelectDetail>;
|
|
8
|
+
type SwitcherItem = {
|
|
9
|
+
readonly command: string;
|
|
10
|
+
readonly label: string;
|
|
11
|
+
readonly icon: string;
|
|
12
|
+
};
|
|
13
|
+
type PopupItem = {
|
|
14
|
+
readonly command: string;
|
|
15
|
+
readonly label: string;
|
|
16
|
+
readonly icon?: string;
|
|
17
|
+
readonly disabled?: boolean;
|
|
18
|
+
};
|
|
19
|
+
type ItemsProvider = () => PopupItem[] | Promise<PopupItem[]>;
|
|
20
|
+
type ButtonToggleDetail = {
|
|
21
|
+
readonly value: boolean;
|
|
22
|
+
};
|
|
23
|
+
type ButtonToggleEvent = CustomEvent<ButtonToggleDetail>;
|
|
24
|
+
//#endregion
|
|
25
|
+
//#region src/button/button.d.ts
|
|
26
|
+
declare class ButtonElement extends LitElement {
|
|
27
|
+
#private;
|
|
28
|
+
disabled: boolean;
|
|
29
|
+
icon?: string;
|
|
30
|
+
hideIcon: boolean;
|
|
31
|
+
hideLabel: boolean;
|
|
32
|
+
hasIcon: boolean;
|
|
33
|
+
subtle: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* When true, this button acts as a toggle: clicking it flips `value`
|
|
36
|
+
* between `true` and `false` instead of (or in addition to) firing a
|
|
37
|
+
* regular click.
|
|
38
|
+
*/
|
|
39
|
+
toggleable: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Current on/off state of a toggleable button. Ignored when `toggleable`
|
|
42
|
+
* is false. Can be set programmatically or declaratively (`value`
|
|
43
|
+
* attribute).
|
|
44
|
+
*/
|
|
45
|
+
value: boolean;
|
|
46
|
+
protected _renderIcon(): typeof nothing | import("lit").TemplateResult<1>;
|
|
47
|
+
protected render(): import("lit").TemplateResult<1>;
|
|
48
|
+
static styles: import("lit").CSSResult[];
|
|
49
|
+
}
|
|
50
|
+
declare global {
|
|
51
|
+
interface HTMLElementTagNameMap {
|
|
52
|
+
"ixfx-button": ButtonElement;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
interface ButtonElementEventMap {
|
|
56
|
+
toggle: ButtonToggleEvent;
|
|
57
|
+
}
|
|
58
|
+
interface ButtonElement {
|
|
59
|
+
addEventListener: (<K extends keyof ButtonElementEventMap>(type: K, listener: (this: ButtonElement, event: ButtonElementEventMap[K]) => void, options?: boolean | AddEventListenerOptions) => void) & ((type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions) => void);
|
|
60
|
+
}
|
|
61
|
+
//#endregion
|
|
62
|
+
export { ItemsProvider as a, SplitButtonSelectEvent as c, ButtonToggleEvent as i, SwitcherItem as l, ButtonElementEventMap as n, PopupItem as o, ButtonToggleDetail as r, SplitButtonSelectDetail as s, ButtonElement as t };
|
|
63
|
+
//# sourceMappingURL=button-BYuf72aR.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button-BYuf72aR.d.ts","names":[],"sources":["../src/button/types.ts","../src/button/button.ts"],"mappings":";;KAAY;WACD;WACA;;KAGC,yBAAyB,YAAY;KAErC;WACD;WACA;WACA;;KAGC;WACD;WACA;WACA;WACA;;KAGC,sBAAsB,cAAc,QAAQ;KAE5C;WACD;;KAGC,oBAAoB,YAAY;;;cCf/B,sBAAsB;;EAEjC;EAGA;EAGA;EAGA;EAGA;EAGA;;;;;;EAQA;;;;;;EAQA;YAaU,sBAAW,wBAAA;YAcX,wBAAM;SAQT,sBAAM;;QAMP;YACI;IACR,eAAe;;;UAIF;EACf,QAAQ;;UAGO;EACf,oBAAoB,gBAAgB,uBAClC,MAAM,GACN,WAAW,MAAM,eAAe,OAAO,sBAAsB,aAC7D,oBAAoB,sCAEpB,cACA,UAAU,oCACV,oBAAoB"}
|
package/dist/button.d.ts
CHANGED
|
@@ -1,21 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
declare class ButtonElement extends LitElement {
|
|
4
|
-
disabled: boolean;
|
|
5
|
-
icon?: string;
|
|
6
|
-
hideIcon: boolean;
|
|
7
|
-
hideLabel: boolean;
|
|
8
|
-
hasIcon: boolean;
|
|
9
|
-
subtle: boolean;
|
|
10
|
-
protected _renderIcon(): import("lit").TemplateResult<1> | typeof nothing;
|
|
11
|
-
protected render(): import("lit").TemplateResult<1>;
|
|
12
|
-
static styles: import("lit").CSSResult[];
|
|
13
|
-
}
|
|
14
|
-
declare global {
|
|
15
|
-
interface HTMLElementTagNameMap {
|
|
16
|
-
"ixfx-button": ButtonElement;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
//#endregion
|
|
20
|
-
export { ButtonElement };
|
|
21
|
-
//# sourceMappingURL=button.d.ts.map
|
|
1
|
+
import { n as ButtonElementEventMap, t as ButtonElement } from "./button-BYuf72aR.js";
|
|
2
|
+
export { ButtonElement, ButtonElementEventMap };
|
package/dist/button.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as ButtonElement } from "./button-
|
|
1
|
+
import { t as ButtonElement } from "./button-B7mgqtxR.js";
|
|
2
2
|
export { ButtonElement };
|
package/dist/colour-picker.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as ColourPickerInputEvent, i as ColourPickerEventDetail, n as ColourPicker, o as OklchValue, r as ColourPickerChangeEvent, t as ColourPickerPopup } from "./index-
|
|
1
|
+
import { a as ColourPickerInputEvent, i as ColourPickerEventDetail, n as ColourPicker, o as OklchValue, r as ColourPickerChangeEvent, t as ColourPickerPopup } from "./index-tq6f8007.js";
|
|
2
2
|
export { ColourPicker, type ColourPickerChangeEvent, type ColourPickerEventDetail, type ColourPickerInputEvent, ColourPickerPopup, type OklchValue };
|
package/dist/crumbs.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { E as TreeSelectEvent, O as TreeTickleEvent, a as TreeComponent, k as TreeDataModel, n as TreeActivateEvent, o as TreeComponentEventMap, x as TreeItemClickEvent, y as TreeExpandEvent } from "./tree-component-DGmKBbpy.js";
|
|
2
2
|
import { n as TreeExclusivity, o as TreeNode, r as TreeFilterPredicate, s as TreeSelectionFilter, t as LoadChildrenCallback } from "./types-Bc23SI94.js";
|
|
3
|
-
import "./menu-item-
|
|
3
|
+
import "./menu-item-CZi9vy5O.js";
|
|
4
4
|
import "./narrowed-text.js";
|
|
5
5
|
import { LitElement, PropertyValues } from "lit";
|
|
6
6
|
//#region src/crumbs/crumb-navigation.d.ts
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import "./icon-
|
|
1
|
+
import "./icon-CDGprSdE.js";
|
|
2
2
|
import { F as ListDragPreviewSourceResolver, P as ListDragPreviewRenderer, R as ListNativeDragStartEvent } from "./tree-component-DGmKBbpy.js";
|
|
3
|
-
import {
|
|
4
|
-
import "./index-
|
|
3
|
+
import { n as ListViewportChangeEvent, t as ListViewportChangeDetail } from "./list-viewport-types-BRZsLcvp.js";
|
|
4
|
+
import { S as ListSearchController } from "./index-CsaQwNkz.js";
|
|
5
|
+
import "./index-9AhaHIT2.js";
|
|
5
6
|
import "./pan-text-CoYmt2qd.js";
|
|
6
7
|
import { LitElement } from "lit";
|
|
7
8
|
import { CommandId, CommandRegistry } from "@clinth/ui-commands";
|
|
@@ -117,6 +118,9 @@ type DataGridRowActivateDetail = {
|
|
|
117
118
|
readonly rowIndex: number;
|
|
118
119
|
};
|
|
119
120
|
type DataGridRowActivateEvent = CustomEvent<DataGridRowActivateDetail>;
|
|
121
|
+
/** Same shape as the list components' shared `ListViewportChangeDetail`. */
|
|
122
|
+
type DataGridViewportChangeDetail = ListViewportChangeDetail;
|
|
123
|
+
type DataGridViewportChangeEvent = ListViewportChangeEvent;
|
|
120
124
|
interface DataGridElementEventMap {
|
|
121
125
|
'datagrid-sort': DataGridSortEvent;
|
|
122
126
|
'datagrid-select': DataGridSelectEvent;
|
|
@@ -127,6 +131,7 @@ interface DataGridElementEventMap {
|
|
|
127
131
|
'datagrid-cell-edit': DataGridCellEditEvent;
|
|
128
132
|
'datagrid-group-change': DataGridGroupChangeEvent;
|
|
129
133
|
'datagrid-row-activate': DataGridRowActivateEvent;
|
|
134
|
+
'datagrid-viewport-change': DataGridViewportChangeEvent;
|
|
130
135
|
'list-native-drag-start': ListNativeDragStartEvent<unknown>;
|
|
131
136
|
}
|
|
132
137
|
declare class DataGridElement extends LitElement {
|
|
@@ -330,5 +335,5 @@ interface DataGridElement {
|
|
|
330
335
|
removeEventListener: (<K extends keyof DataGridElementEventMap>(type: K, listener: (this: DataGridElement, event: DataGridElementEventMap[K]) => void, options?: boolean | EventListenerOptions) => void) & ((type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions) => void);
|
|
331
336
|
}
|
|
332
337
|
//#endregion
|
|
333
|
-
export {
|
|
334
|
-
//# sourceMappingURL=data-grid-
|
|
338
|
+
export { DataGridEditorType as A, BuiltInFormatterName as C, DataGridEditability as D, DataGridColumnMenu as E, DataGridSelectionMode as F, DataGridSortDirection as I, DataGridSortState as L, DataGridGroupBy as M, DataGridGroupLabel as N, DataGridEditorContext as O, DataGridInteractionMode as P, GlobalFormatter as R, DataGridViewportChangeEvent as S, DataGridColumn as T, DataGridSelectDetail as _, DataGridColumnReorderDetail as a, DataGridSortEvent as b, DataGridColumnResizeEvent as c, DataGridElement as d, DataGridElementEventMap as f, DataGridRowActivateEvent as g, DataGridRowActivateDetail as h, DataGridCellEditEvent as i, DataGridGetRowKey as j, DataGridEditorFactory as k, DataGridColumnVisibilityDetail as l, DataGridGroupChangeEvent as m, DataGridCellClickEvent as n, DataGridColumnReorderEvent as o, DataGridGroupChangeDetail as p, DataGridCellEditDetail as r, DataGridColumnResizeDetail as s, DataGridCellClickDetail as t, DataGridColumnVisibilityEvent as u, DataGridSelectEvent as v, BuiltInFormatterOptions as w, DataGridViewportChangeDetail as x, DataGridSortDetail as y };
|
|
339
|
+
//# sourceMappingURL=data-grid-DE1_gZNk.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-grid-DE1_gZNk.d.ts","names":[],"sources":["../src/data-grid/types.ts","../src/data-grid/data-grid.ts"],"mappings":"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"}
|
package/dist/data-grid.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { I as ListDragSource, L as ListNativeDragStartDetail, M as ListDragPreview, N as ListDragPreviewContext, P as ListDragPreviewRenderer, R as ListNativeDragStartEvent, j as ListDragEntry } from "./tree-component-DGmKBbpy.js";
|
|
2
|
-
import { A as
|
|
3
|
-
export { type BuiltInFormatterName, type BuiltInFormatterOptions, DataGridCellClickDetail, DataGridCellClickEvent, DataGridCellEditDetail, DataGridCellEditEvent, type DataGridColumn, type DataGridColumnMenu, DataGridColumnReorderDetail, DataGridColumnReorderEvent, DataGridColumnResizeDetail, DataGridColumnResizeEvent, DataGridColumnVisibilityDetail, DataGridColumnVisibilityEvent, type DataGridEditability, type DataGridEditorContext, type DataGridEditorFactory, type DataGridEditorType, DataGridElement, DataGridElementEventMap, type DataGridGetRowKey, type DataGridGroupBy, DataGridGroupChangeDetail, DataGridGroupChangeEvent, type DataGridGroupLabel, type DataGridInteractionMode, DataGridRowActivateDetail, DataGridRowActivateEvent, DataGridSelectDetail, DataGridSelectEvent, type DataGridSelectionMode, DataGridSortDetail, type DataGridSortDirection, DataGridSortEvent, type DataGridSortState, type GlobalFormatter, type ListDragEntry, type ListDragPreview, type ListDragPreviewContext, type ListDragPreviewRenderer, type ListDragSource, type ListNativeDragStartDetail, type ListNativeDragStartEvent };
|
|
2
|
+
import { A as DataGridEditorType, C as BuiltInFormatterName, D as DataGridEditability, E as DataGridColumnMenu, F as DataGridSelectionMode, I as DataGridSortDirection, L as DataGridSortState, M as DataGridGroupBy, N as DataGridGroupLabel, O as DataGridEditorContext, P as DataGridInteractionMode, R as GlobalFormatter, S as DataGridViewportChangeEvent, T as DataGridColumn, _ as DataGridSelectDetail, a as DataGridColumnReorderDetail, b as DataGridSortEvent, c as DataGridColumnResizeEvent, d as DataGridElement, f as DataGridElementEventMap, g as DataGridRowActivateEvent, h as DataGridRowActivateDetail, i as DataGridCellEditEvent, j as DataGridGetRowKey, k as DataGridEditorFactory, l as DataGridColumnVisibilityDetail, m as DataGridGroupChangeEvent, n as DataGridCellClickEvent, o as DataGridColumnReorderEvent, p as DataGridGroupChangeDetail, r as DataGridCellEditDetail, s as DataGridColumnResizeDetail, t as DataGridCellClickDetail, u as DataGridColumnVisibilityEvent, v as DataGridSelectEvent, w as BuiltInFormatterOptions, x as DataGridViewportChangeDetail, y as DataGridSortDetail } from "./data-grid-DE1_gZNk.js";
|
|
3
|
+
export { type BuiltInFormatterName, type BuiltInFormatterOptions, DataGridCellClickDetail, DataGridCellClickEvent, DataGridCellEditDetail, DataGridCellEditEvent, type DataGridColumn, type DataGridColumnMenu, DataGridColumnReorderDetail, DataGridColumnReorderEvent, DataGridColumnResizeDetail, DataGridColumnResizeEvent, DataGridColumnVisibilityDetail, DataGridColumnVisibilityEvent, type DataGridEditability, type DataGridEditorContext, type DataGridEditorFactory, type DataGridEditorType, DataGridElement, DataGridElementEventMap, type DataGridGetRowKey, type DataGridGroupBy, DataGridGroupChangeDetail, DataGridGroupChangeEvent, type DataGridGroupLabel, type DataGridInteractionMode, DataGridRowActivateDetail, DataGridRowActivateEvent, DataGridSelectDetail, DataGridSelectEvent, type DataGridSelectionMode, DataGridSortDetail, type DataGridSortDirection, DataGridSortEvent, type DataGridSortState, DataGridViewportChangeDetail, DataGridViewportChangeEvent, type GlobalFormatter, type ListDragEntry, type ListDragPreview, type ListDragPreviewContext, type ListDragPreviewRenderer, type ListDragSource, type ListNativeDragStartDetail, type ListNativeDragStartEvent };
|
package/dist/data-grid.js
CHANGED
|
@@ -17,6 +17,12 @@ import { property, query, state } from "lit/decorators.js";
|
|
|
17
17
|
import { createCommandRegistry } from "@clinth/ui-commands";
|
|
18
18
|
import { repeat } from "lit/directives/repeat.js";
|
|
19
19
|
//#region src/data-grid/data-grid.ts
|
|
20
|
+
/** Shallow key-array equality, treating `undefined` (never dispatched) as different. */
|
|
21
|
+
function sameKeys(a, b) {
|
|
22
|
+
if (a === void 0 || a.length !== b.length) return false;
|
|
23
|
+
for (let i = 0; i < a.length; i++) if (a[i] !== b[i]) return false;
|
|
24
|
+
return true;
|
|
25
|
+
}
|
|
20
26
|
let DataGridElement = class DataGridElement extends LitElement {
|
|
21
27
|
constructor(..._args) {
|
|
22
28
|
super(..._args);
|
|
@@ -109,6 +115,7 @@ let DataGridElement = class DataGridElement extends LitElement {
|
|
|
109
115
|
this._colOffsets = [];
|
|
110
116
|
this._colWidthSum = 0;
|
|
111
117
|
this._raf = 0;
|
|
118
|
+
this.#viewportChangeRaf = 0;
|
|
112
119
|
this.#appendInProgress = false;
|
|
113
120
|
this.#resortRaf = 0;
|
|
114
121
|
this._drag = null;
|
|
@@ -130,6 +137,9 @@ let DataGridElement = class DataGridElement extends LitElement {
|
|
|
130
137
|
this._scrollLeft = el.scrollLeft;
|
|
131
138
|
if (this._headerScrollEl) this._headerScrollEl.scrollLeft = el.scrollLeft;
|
|
132
139
|
this.requestUpdate();
|
|
140
|
+
cancelAnimationFrame(this.#viewportChangeRaf);
|
|
141
|
+
this.#viewportChangeRaf = 0;
|
|
142
|
+
this.#emitViewportChangeIfChanged();
|
|
133
143
|
});
|
|
134
144
|
};
|
|
135
145
|
this._onKeyDown = (e) => {
|
|
@@ -563,6 +573,10 @@ let DataGridElement = class DataGridElement extends LitElement {
|
|
|
563
573
|
#enteringRowKeys;
|
|
564
574
|
#rowReflowTimer;
|
|
565
575
|
#dataGridRenderedOnce;
|
|
576
|
+
#viewportChangeRaf;
|
|
577
|
+
/** Key sets as of the last `datagrid-viewport-change` dispatch, for dedupe. */
|
|
578
|
+
#lastViewportRenderedKeys;
|
|
579
|
+
#lastViewportVisibleKeys;
|
|
566
580
|
#appendInProgress;
|
|
567
581
|
#resortRaf;
|
|
568
582
|
connectedCallback() {
|
|
@@ -578,6 +592,8 @@ let DataGridElement = class DataGridElement extends LitElement {
|
|
|
578
592
|
this.removeEventListener(`keydown`, this._onKeyDown);
|
|
579
593
|
this.removeEventListener(`focusout`, this._onFocusOut);
|
|
580
594
|
cancelAnimationFrame(this._raf);
|
|
595
|
+
cancelAnimationFrame(this.#viewportChangeRaf);
|
|
596
|
+
this.#viewportChangeRaf = 0;
|
|
581
597
|
this.#unregisterSearchCommands?.();
|
|
582
598
|
this.#unregisterSearchCommands = void 0;
|
|
583
599
|
this.#searchRegistry = void 0;
|
|
@@ -618,6 +634,7 @@ let DataGridElement = class DataGridElement extends LitElement {
|
|
|
618
634
|
if (w === this._viewportW && h === this._viewportH) return;
|
|
619
635
|
this._viewportW = w;
|
|
620
636
|
this._viewportH = h;
|
|
637
|
+
this.#scheduleViewportChangeEmit();
|
|
621
638
|
}
|
|
622
639
|
/**
|
|
623
640
|
* Force a fresh re-measure of the viewport and re-render. Normally
|
|
@@ -632,6 +649,7 @@ let DataGridElement = class DataGridElement extends LitElement {
|
|
|
632
649
|
}
|
|
633
650
|
updated(changed) {
|
|
634
651
|
super.updated(changed);
|
|
652
|
+
if (changed.has(`rows`) || changed.has(`sortState`) || changed.has(`columns`) || changed.has(`groupBy`) || changed.has(`groupLabel`) || changed.has(`filterPredicate`) || changed.has(`rowHeight`)) this.#scheduleViewportChangeEmit();
|
|
635
653
|
if (changed.has(`_editing`) || changed.has(`_editingRow`)) requestAnimationFrame(() => {
|
|
636
654
|
let sel = null;
|
|
637
655
|
if (this._editing) sel = `.row[data-key="${this._editing.rowKey}"] .cell[data-col="${this._editing.colKey}"] input, .row[data-key="${this._editing.rowKey}"] .cell[data-col="${this._editing.colKey}"] select`;
|
|
@@ -1411,6 +1429,44 @@ let DataGridElement = class DataGridElement extends LitElement {
|
|
|
1411
1429
|
const { startRow, endRow } = this.getVisibleRange();
|
|
1412
1430
|
return this._flat.slice(startRow, endRow).filter((f) => f.type === `row`).map((f) => f.key);
|
|
1413
1431
|
}
|
|
1432
|
+
/**
|
|
1433
|
+
* Row keys strictly intersecting the viewport (no overscan), mirroring
|
|
1434
|
+
* `ixfx-grid-list.visibleKeys()` for the `datagrid-viewport-change` detail.
|
|
1435
|
+
*/
|
|
1436
|
+
#visibleKeys() {
|
|
1437
|
+
const rh = this.rowHeight;
|
|
1438
|
+
const startRow = Math.max(0, Math.floor(this._scrollTop / rh));
|
|
1439
|
+
const endRow = Math.min(this._flat.length, Math.ceil((this._scrollTop + this._viewportH) / rh));
|
|
1440
|
+
return this._flat.slice(startRow, endRow).filter((f) => f.type === `row`).map((f) => f.key);
|
|
1441
|
+
}
|
|
1442
|
+
/** Coalesce viewport-change dispatches to at most one per animation frame. */
|
|
1443
|
+
#scheduleViewportChangeEmit() {
|
|
1444
|
+
if (this.#viewportChangeRaf !== 0) return;
|
|
1445
|
+
this.#viewportChangeRaf = requestAnimationFrame(() => {
|
|
1446
|
+
this.#viewportChangeRaf = 0;
|
|
1447
|
+
this.#emitViewportChangeIfChanged();
|
|
1448
|
+
});
|
|
1449
|
+
}
|
|
1450
|
+
/**
|
|
1451
|
+
* Dispatch `datagrid-viewport-change` with the current key sets — unless
|
|
1452
|
+
* neither set changed since the last dispatch, so coalesced frames and
|
|
1453
|
+
* no-op scrolls stay silent.
|
|
1454
|
+
*/
|
|
1455
|
+
#emitViewportChangeIfChanged() {
|
|
1456
|
+
const renderedKeys = this.renderedKeys();
|
|
1457
|
+
const visibleKeys = this.#visibleKeys();
|
|
1458
|
+
if (sameKeys(this.#lastViewportRenderedKeys, renderedKeys) && sameKeys(this.#lastViewportVisibleKeys, visibleKeys)) return;
|
|
1459
|
+
this.#lastViewportRenderedKeys = renderedKeys;
|
|
1460
|
+
this.#lastViewportVisibleKeys = visibleKeys;
|
|
1461
|
+
this.dispatchEvent(new CustomEvent(`datagrid-viewport-change`, {
|
|
1462
|
+
detail: {
|
|
1463
|
+
renderedKeys,
|
|
1464
|
+
visibleKeys
|
|
1465
|
+
},
|
|
1466
|
+
bubbles: true,
|
|
1467
|
+
composed: true
|
|
1468
|
+
}));
|
|
1469
|
+
}
|
|
1414
1470
|
_findFirstVisibleCol(scrollLeft) {
|
|
1415
1471
|
let lo = 0;
|
|
1416
1472
|
let hi = this._colOffsets.length - 1;
|