@svgrid/grid 3.0.6 → 3.0.7
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/dist/SvGrid.controller.svelte.d.ts +2 -0
- package/dist/SvGrid.controller.svelte.js +30 -4
- package/dist/SvGrid.css +16 -5
- package/dist/SvGrid.helpers.js +2 -4
- package/dist/cdn/{GridMenus-C-NtjlrJ.js → GridMenus-BgUS-W3o.js} +2 -2
- package/dist/cdn/{GridMenus-TssHej3q.js → GridMenus-CcwU8I4t.js} +2 -2
- package/dist/cdn/{SvGridCellEditor-BlyCSp0q.js → SvGridCellEditor-9yz-SbdZ.js} +1 -1
- package/dist/cdn/{SvGridCellEditor-ClRRA9lW.js → SvGridCellEditor-D7-ql1Hd.js} +1 -1
- package/dist/cdn/{SvGridChart-DsmwTyZF.js → SvGridChart-DMUOFxOe.js} +3 -3
- package/dist/cdn/{SvGridChart-B4EV8U6t.js → SvGridChart-N7ik0oWy.js} +3 -3
- package/dist/cdn/{SvGridChartBuilder-cHloHobN.js → SvGridChartBuilder-CB_Jnm2k.js} +3 -3
- package/dist/cdn/{SvGridChartBuilder-vOl7C0Za.js → SvGridChartBuilder-Ca7gF8ZK.js} +3 -3
- package/dist/cdn/{SvGridChartPanel-AcqF-Ll5.js → SvGridChartPanel-9GOJRHP7.js} +5 -5
- package/dist/cdn/{SvGridChartPanel-biMtSBPA.js → SvGridChartPanel-Dl-FujN8.js} +5 -5
- package/dist/cdn/{SvGridChartView-I3rDHXAq.js → SvGridChartView-B1LFgoPP.js} +2 -2
- package/dist/cdn/{SvGridChartView-Dx_GmZuL.js → SvGridChartView-By3n7DGZ.js} +2 -2
- package/dist/cdn/{cell-formatting-DVVKOSI9.js → cell-formatting-Mnv84zoE.js} +27 -5
- package/dist/cdn/{chart-DEZxwC0i.js → chart-By7h2Guv.js} +1 -1
- package/dist/cdn/{chart-panel-messages-D12XcTZJ.js → chart-panel-messages-BC-tOgFY.js} +1 -1
- package/dist/cdn/{chart-panel-messages-DguS7gC5.js → chart-panel-messages-DUaXr-sb.js} +1 -1
- package/dist/cdn/{chart-summary-CMAXBGY-.js → chart-summary-BDtrNEiA.js} +1 -1
- package/dist/cdn/{chart-trend-BkEp61Gj.js → chart-trend-C1aOAPBZ.js} +1 -1
- package/dist/cdn/{editor-registry-BhgE3S84.js → editor-registry-BVeHvlZR.js} +49 -50
- package/dist/cdn/{export-format-YzdwBww2.js → export-format-y1wdyCcv.js} +93 -97
- package/dist/cdn/{src-CgoeSM8k.js → src-25JmJ_7g.js} +3244 -3191
- package/dist/cdn/{src-DfwxB1TH.js → src-kE9B98r6.js} +3172 -3119
- package/dist/cdn/svgrid.js +11 -11
- package/dist/cdn/svgrid.svelte-external.js +11 -11
- package/dist/cell-formatting.d.ts +9 -0
- package/dist/cell-formatting.js +34 -0
- package/dist/core.js +117 -19
- package/dist/export-format.d.ts +8 -0
- package/dist/export-format.js +23 -16
- package/dist/virtualization/column-virtualizer.d.ts +1 -0
- package/dist/virtualization/svelte-virtualizer.svelte.d.ts +1 -0
- package/dist/virtualization/svelte-virtualizer.svelte.js +1 -0
- package/dist/virtualization/virtualizer.d.ts +3 -0
- package/dist/virtualization/virtualizer.js +14 -1
- package/package.json +1 -1
- package/src/SvGrid.controller.svelte.ts +30 -4
- package/src/SvGrid.css +16 -5
- package/src/SvGrid.helpers.ts +2 -4
- package/src/cell-formatting.ts +31 -0
- package/src/core.sort.test.ts +86 -0
- package/src/core.ts +109 -19
- package/src/export-dates.test.ts +114 -0
- package/src/export-format.ts +26 -14
- package/src/svgrid.data-push.svelte.test.ts +94 -0
- package/src/svgrid.live-update-paths.svelte.test.ts +4 -2
- package/src/virtualization/svelte-virtualizer.svelte.ts +1 -0
- package/src/virtualization/virtualizer.test.ts +44 -0
- package/src/virtualization/virtualizer.ts +13 -1
|
@@ -493,6 +493,7 @@ export declare function createSvGridController<TFeatures extends TableFeatures =
|
|
|
493
493
|
readonly virtualizer: {
|
|
494
494
|
readonly version: number;
|
|
495
495
|
setOptions: (next: Partial<import("./index.js").VirtualizerOptions>) => void;
|
|
496
|
+
measure: () => void;
|
|
496
497
|
setScrollOffset: (scrollOffset: number) => void;
|
|
497
498
|
setViewportHeight: (viewportHeight: number) => void;
|
|
498
499
|
scrollToIndex: (index: number) => void;
|
|
@@ -506,6 +507,7 @@ export declare function createSvGridController<TFeatures extends TableFeatures =
|
|
|
506
507
|
setViewportWidth(viewportWidth: number): void;
|
|
507
508
|
setHorizontalOffset(scrollOffset: number): void;
|
|
508
509
|
setOptions(next: Partial<import("./index.js").VirtualizerOptions>): void;
|
|
510
|
+
measure(): void;
|
|
509
511
|
setScrollOffset(scrollOffset: number): void;
|
|
510
512
|
setViewportHeight(viewportHeight: number): void;
|
|
511
513
|
scrollToIndex(index: number): void;
|
|
@@ -625,7 +625,16 @@ export function createSvGridController(rawProps, domIdBase) {
|
|
|
625
625
|
// `data` is optional on the type (a `rowModel` may supply the rows
|
|
626
626
|
// instead), so every read falls back to empty rather than to undefined.
|
|
627
627
|
const EMPTY_DATA = [];
|
|
628
|
-
|
|
628
|
+
// Seeded as a copy, for the same reason the sync effect below makes one: the
|
|
629
|
+
// row model tells data apart by array identity, so the grid has to own an
|
|
630
|
+
// array the consumer cannot grow behind its back.
|
|
631
|
+
let internalData = $state.raw(props.data?.length ? props.data.slice() : EMPTY_DATA);
|
|
632
|
+
// What the last sync saw, so the effect can tell a replacement (drop the
|
|
633
|
+
// cell edits) from a push or splice (keep them) and skip a no-op run.
|
|
634
|
+
// svelte-ignore state_referenced_locally
|
|
635
|
+
let lastData = props.data ?? EMPTY_DATA;
|
|
636
|
+
// svelte-ignore state_referenced_locally
|
|
637
|
+
let lastDataLength = props.data?.length ?? 0;
|
|
629
638
|
// Resolve `cellDataType` / `inferColumnTypes` into concrete editorType +
|
|
630
639
|
// format defaults once, up front, so every downstream reader sees a normal
|
|
631
640
|
// column. Explicit fields on the ColumnDef always win.
|
|
@@ -666,12 +675,29 @@ export function createSvGridController(rawProps, domIdBase) {
|
|
|
666
675
|
return collapsedColumnGroups.has(groupId);
|
|
667
676
|
}
|
|
668
677
|
$effect(() => {
|
|
678
|
+
const next = props.data ?? EMPTY_DATA;
|
|
679
|
+
// Reading `length` is what subscribes this effect to a `$state` array's own
|
|
680
|
+
// length signal, so `rows.push(...)` and `rows.splice(...)` re-run it.
|
|
681
|
+
// Without this read nothing in the grid tracks the row count at all:
|
|
682
|
+
// `getRowModel` reads `.length` only inside its cache miss, and the miss is
|
|
683
|
+
// keyed on the array reference, which a mutation does not change.
|
|
684
|
+
const length = next.length;
|
|
685
|
+
const replaced = next !== lastData;
|
|
686
|
+
if (!replaced && length === lastDataLength)
|
|
687
|
+
return;
|
|
688
|
+
lastData = next;
|
|
689
|
+
lastDataLength = length;
|
|
690
|
+
// A fresh array object, because `getRowModel` memoises on identity. The
|
|
691
|
+
// elements are the same objects, so a row that did not move keeps its row
|
|
692
|
+
// object and a field write still reaches its cell through the proxy.
|
|
693
|
+
internalData = length === 0 ? EMPTY_DATA : next.slice();
|
|
669
694
|
// When the consumer replaces `data` (e.g. a "Reset" button), drop any
|
|
670
695
|
// accumulated cell-edit overrides - otherwise `getCellDisplayValue`
|
|
671
696
|
// would keep returning the old edited values from `editedCellValues`
|
|
672
|
-
// even though the underlying data has been replaced.
|
|
673
|
-
|
|
674
|
-
|
|
697
|
+
// even though the underlying data has been replaced. Growing or shrinking
|
|
698
|
+
// the array is not a reset, so it keeps them.
|
|
699
|
+
if (replaced)
|
|
700
|
+
editedCellValues = {};
|
|
675
701
|
});
|
|
676
702
|
$effect(() => {
|
|
677
703
|
internalColumns = resolveCols(props.columns);
|
package/dist/SvGrid.css
CHANGED
|
@@ -1387,9 +1387,6 @@ select.sv-grid-fr-editor {
|
|
|
1387
1387
|
.sv-grid-cell-active,
|
|
1388
1388
|
.sv-grid-cell-editing {
|
|
1389
1389
|
position: relative;
|
|
1390
|
-
/* High enough to sit above pinned-column stacking contexts (z=4) so the
|
|
1391
|
-
list/chips popover overlays adjacent cells instead of being clipped. */
|
|
1392
|
-
z-index: 20;
|
|
1393
1390
|
/* `box-shadow: inset` is bound to the cell's own box, so the ring
|
|
1394
1391
|
clips cleanly with the cell when it's partially scrolled out of
|
|
1395
1392
|
view (and shows up consistently at the right edge of a virtualized
|
|
@@ -1399,10 +1396,24 @@ select.sv-grid-fr-editor {
|
|
|
1399
1396
|
inconsistent at scroll boundaries. */
|
|
1400
1397
|
box-shadow: inset 0 0 0 2px var(--sg-accent, #0b63f3);
|
|
1401
1398
|
outline: none;
|
|
1402
|
-
|
|
1403
|
-
|
|
1399
|
+
}
|
|
1400
|
+
/* Only the EDITING cell escapes its own box and outranks the pinned-column
|
|
1401
|
+
stacking contexts (z=4), so its list/chips popout overlays the neighbours
|
|
1402
|
+
instead of being clipped. The merely-ACTIVE cell used to get the same
|
|
1403
|
+
treatment, and on a grid scrolled sideways that made it paint straight over
|
|
1404
|
+
the sticky selection / row-number column: the checkbox disappeared and the
|
|
1405
|
+
cell's text - unclipped, because overflow was visible - spilled across it.
|
|
1406
|
+
A grid seeds its active cell at (0,0), so this hit the FIRST row of any
|
|
1407
|
+
horizontally scrolled grid with `showRowSelection`, untouched by the user. */
|
|
1408
|
+
.sv-grid-cell-editing {
|
|
1409
|
+
z-index: 20;
|
|
1404
1410
|
overflow: visible;
|
|
1405
1411
|
}
|
|
1412
|
+
/* Above ordinary cells so the ring is not overdrawn by a neighbour, below the
|
|
1413
|
+
sticky columns (z=4) so those keep covering it as they should. */
|
|
1414
|
+
.sv-grid-cell-active:not(.sv-grid-cell-editing) {
|
|
1415
|
+
z-index: 3;
|
|
1416
|
+
}
|
|
1406
1417
|
/* The active cell a grid mounts with is seeded at (0,0), not chosen: no
|
|
1407
1418
|
ring until a click, an arrow key or the api activates a cell (the same
|
|
1408
1419
|
gate the fill handle has always had). Once activated it stays through a
|
package/dist/SvGrid.helpers.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { parseDateValue } from "./cell-formatting.js";
|
|
1
2
|
export function cfTextStyle(cf) {
|
|
2
3
|
let s = "";
|
|
3
4
|
if (cf.color)
|
|
@@ -233,10 +234,7 @@ export function getEditorClass(editorType) {
|
|
|
233
234
|
return "sv-grid-cell-editor";
|
|
234
235
|
}
|
|
235
236
|
export function asDate(value) {
|
|
236
|
-
|
|
237
|
-
return null;
|
|
238
|
-
const parsed = value instanceof Date ? value : new Date(value);
|
|
239
|
-
return Number.isNaN(parsed.getTime()) ? null : parsed;
|
|
237
|
+
return parseDateValue(value);
|
|
240
238
|
}
|
|
241
239
|
export function clampMenuX(x, width) {
|
|
242
240
|
return Math.max(8, Math.min(x, window.innerWidth - width - 8));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $a as e, Fn as t, Qa as n } from "./src-
|
|
2
|
-
import { S as r, _ as i, j as a, k as o } from "./editor-registry-
|
|
1
|
+
import { $a as e, Fn as t, Qa as n } from "./src-kE9B98r6.js";
|
|
2
|
+
import { S as r, _ as i, j as a, k as o } from "./editor-registry-BVeHvlZR.js";
|
|
3
3
|
import { r as s } from "./dismissable-Brc4EZU1.js";
|
|
4
4
|
import * as c from "svelte/internal/client";
|
|
5
5
|
import "svelte/internal/disclose-version";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { $a as e, Fn as t, Qa as n } from "./src-
|
|
1
|
+
import { $a as e, Fn as t, Qa as n } from "./src-25JmJ_7g.js";
|
|
2
2
|
import { $ as r, D as i, E as a, F as o, G as s, H as c, I as l, L as u, N as d, Q as f, R as p, U as m, V as h, X as g, Y as _, Z as v, _ as y, at as b, b as x, d as S, et as C, f as w, ft as T, g as E, h as D, it as O, j as k, k as A, lt as ee, m as j, mt as te, nt as M, o as ne, pt as N, st as P, t as re, tt as F, u as I, ut as L, v as R, w as ie } from "./disclose-version-Dr7rEVv-.js";
|
|
3
|
-
import { S as ae, _ as oe, j as se, k as ce } from "./editor-registry-
|
|
3
|
+
import { S as ae, _ as oe, j as se, k as ce } from "./editor-registry-BVeHvlZR.js";
|
|
4
4
|
import { r as le } from "./dismissable-Brc4EZU1.js";
|
|
5
5
|
//#region src/GridMenus.svelte
|
|
6
6
|
var ue = u("<option> </option>"), de = u("<input class=\"sv-grid-menu-condition-value\" placeholder=\"To\"/>"), fe = u("<input class=\"sv-grid-menu-condition-value\"/> <!>", 1), pe = u("<option> </option>"), me = u("<input class=\"sv-grid-menu-condition-value\" placeholder=\"To\"/>"), he = u("<input class=\"sv-grid-menu-condition-value\"/> <!>", 1), ge = u("<div class=\"sv-grid-menu-join\" role=\"radiogroup\" aria-label=\"Combine conditions\"><button type=\"button\">AND</button> <button type=\"button\">OR</button> <button type=\"button\" class=\"sv-grid-menu-join-x\" title=\"Remove second condition\" aria-label=\"Remove second condition\"><!></button></div> <select class=\"sv-grid-menu-operator-select\" aria-label=\"Second filter condition\"></select> <!>", 1), _e = u("<button type=\"button\" class=\"sv-grid-menu-add-cond\">+ Add condition</button>"), ve = u("<!> <!>", 1), ye = u("<span class=\"sv-grid-menu-head-note\">and the condition above</span>"), be = u("<span class=\"sv-grid-menu-head-note\"> </span>"), xe = u("<div class=\"sv-grid-facet-empty\">No values</div>"), Se = u("<div class=\"sv-grid-facet-note\"> </div>"), Ce = u("<div class=\"sv-grid-menu-filter\"><div class=\"sv-grid-menu-filter-head\"><span class=\"sv-grid-header-icon\"><!></span> Filter\n condition</div> <select class=\"sv-grid-menu-operator-select\" aria-label=\"Filter condition\"></select> <!> <div class=\"sv-grid-menu-sep\"></div> <div class=\"sv-grid-menu-filter-head\">Values <!></div> <span class=\"sv-grid-menu-search-wrap\"><!> <input class=\"sv-grid-menu-search\" placeholder=\"Search values...\"/></span> <label class=\"sv-grid-facet sv-grid-facet-all\"><input type=\"checkbox\"/> <span class=\"sv-grid-facet-label\"> </span></label> <!> <!> <div class=\"sv-grid-menu-actions\"><button type=\"button\" class=\"sv-grid-menu-btn\">Clear filter</button> <button type=\"button\" class=\"sv-grid-menu-btn sv-grid-menu-btn-primary\">Done</button></div></div>"), we = u("<div role=\"tooltip\"> </div>"), Te = u("<div class=\"sv-grid-menu-backdrop\" role=\"presentation\"></div>"), Ee = u("<button type=\"button\" role=\"tab\">Filter</button>"), De = u("<div class=\"sv-grid-menu-tabs\" role=\"tablist\"><button type=\"button\" role=\"tab\">General</button> <!> <button type=\"button\" role=\"tab\">Columns</button></div>"), Oe = u("<div class=\"sv-grid-menu-filter-head\">Visible columns</div> <!>", 1), ke = u("<button type=\"button\" class=\"sv-grid-menu-item\" role=\"menuitem\"><span class=\"sv-grid-header-icon\"><!></span> Sort\n ascending</button> <button type=\"button\" class=\"sv-grid-menu-item\" role=\"menuitem\"><span class=\"sv-grid-header-icon\"><!></span> Sort\n descending</button> <button type=\"button\" class=\"sv-grid-menu-item\" role=\"menuitem\"><span class=\"sv-grid-header-icon\"><!></span> Remove sort</button>", 1), Ae = u("<div class=\"sv-grid-menu-sep\"></div> <button type=\"button\" class=\"sv-grid-menu-item\" role=\"menuitem\"><span class=\"sv-grid-header-icon\"><!></span> Pin to left</button> <button type=\"button\" class=\"sv-grid-menu-item\" role=\"menuitem\"><span class=\"sv-grid-header-icon\"><!></span> Pin to right</button> <button type=\"button\" class=\"sv-grid-menu-item\" role=\"menuitem\"><span class=\"sv-grid-header-icon\"><!></span> Unpin column</button>", 1), je = u("<button type=\"button\" class=\"sv-grid-menu-item\" role=\"menuitem\"><span class=\"sv-grid-header-icon\"><!></span> Autosize\n this column</button>"), Me = u("<div class=\"sv-grid-menu-sep\"></div> <button type=\"button\" class=\"sv-grid-menu-item\" role=\"menuitem\"><span class=\"sv-grid-header-icon\"><!></span> Group\n by this column</button> <button type=\"button\" class=\"sv-grid-menu-item\" role=\"menuitem\"><span class=\"sv-grid-header-icon\"><!></span> Remove grouping</button>", 1), z = u("<button type=\"button\" role=\"menuitem\" aria-haspopup=\"menu\"><span class=\"sv-grid-header-icon\"><!></span> Choose columns <span class=\"sv-grid-header-icon sv-grid-menu-item-chevron\"><!></span></button>"), B = u("<!> <!> <div class=\"sv-grid-menu-sep\"></div> <!> <button type=\"button\" class=\"sv-grid-menu-item\" role=\"menuitem\"><span class=\"sv-grid-header-icon\"><!></span> Autosize\n all columns</button> <!> <div class=\"sv-grid-menu-sep\"></div> <!> <button type=\"button\" class=\"sv-grid-menu-item\" role=\"menuitem\"><span class=\"sv-grid-header-icon\"><!></span> Reset columns</button>", 1), Ne = u("<div class=\"sv-grid-menu sv-grid-column-menu\" role=\"menu\"><!> <!></div>"), Pe = u("<div class=\"sv-grid-menu sv-grid-filter-menu\" role=\"menu\" tabindex=\"-1\"><!></div>"), Fe = u("<div class=\"sv-grid-menu sv-grid-choose-columns-menu\" role=\"menu\"><div class=\"sv-grid-menu-filter-head\">Visible columns</div> <!></div>"), Ie = u("<button type=\"button\" class=\"sv-grid-menu-item\" role=\"menuitemradio\"><span class=\"sv-grid-header-icon\"><!></span> </button>"), Le = u("<div class=\"sv-grid-menu sv-grid-operator-menu\" role=\"menu\"></div>"), Re = u("<div class=\"sv-grid-facet-empty\">No values</div>"), ze = u("<div class=\"sv-grid-menu sv-grid-in-suggest\"><!></div>"), Be = u("<div class=\"sv-grid-menu-sep\"></div>"), V = p("<path></path>"), Ve = p("<svg class=\"sv-grid-menu-icon-own\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.4\" stroke-linecap=\"round\" stroke-linejoin=\"round\" focusable=\"false\"></svg>"), He = u("<span class=\"sv-grid-menu-icon\" aria-hidden=\"true\"><!></span>"), Ue = u("<button type=\"button\" class=\"sv-grid-menu-item\" role=\"menuitem\"><!><span class=\"sv-grid-menu-label\"> </span></button>"), We = u("<div class=\"sv-grid-menu-backdrop\" role=\"presentation\"></div> <div class=\"sv-grid-menu sv-grid-context-menu\" role=\"menu\"></div>", 1), Ge = u("<div class=\"sv-grid-menu-backdrop\" role=\"presentation\"></div> <div class=\"sv-grid-menu sv-grid-comment-editor\" role=\"dialog\" aria-label=\"Edit comment\"><textarea class=\"sv-grid-comment-textarea\" rows=\"3\" placeholder=\"Add a comment…\"></textarea> <div class=\"sv-grid-comment-actions\"><button type=\"button\" class=\"sv-grid-comment-remove\">Remove</button> <span class=\"sv-grid-comment-spacer\"></span> <button type=\"button\" class=\"sv-grid-comment-cancel\">Cancel</button> <button type=\"button\" class=\"sv-grid-comment-save\">Save</button></div></div>", 1), Ke = u("<!> <!> <!> <!> <!> <!> <!> <!> <!>", 1);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as e, O as t, S as n, T as r, b as i, n as a, o, p as s, r as c, v as l, x as u } from "./editor-registry-
|
|
1
|
+
import { A as e, O as t, S as n, T as r, b as i, n as a, o, p as s, r as c, v as l, x as u } from "./editor-registry-BVeHvlZR.js";
|
|
2
2
|
import * as d from "svelte/internal/client";
|
|
3
3
|
import "svelte/internal/disclose-version";
|
|
4
4
|
//#region src/SvGridCellEditor.svelte
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { E as e, F as t, G as n, H as r, I as i, L as a, N as o, Q as s, U as c, V as l, X as u, Y as d, at as f, b as p, d as m, et as h, f as g, g as _, h as v, it as y, j as b, k as x, lt as ee, m as S, mt as C, nt as w, pt as T, r as te, st as E, t as D, tt as O, u as k, ut as ne, v as A, w as j, y as re } from "./disclose-version-Dr7rEVv-.js";
|
|
2
|
-
import { A as ie, O as ae, S as oe, T as se, b as ce, n as le, o as ue, p as de, r as fe, v as M, x as N } from "./editor-registry-
|
|
2
|
+
import { A as ie, O as ae, S as oe, T as se, b as ce, n as le, o as ue, p as de, r as fe, v as M, x as N } from "./editor-registry-BVeHvlZR.js";
|
|
3
3
|
//#region src/SvGridCellEditor.svelte
|
|
4
4
|
var P = a("<span class=\"sv-grid-chip sv-grid-chip-removable\"> <button type=\"button\" class=\"sv-grid-chip-remove\">×</button></span>"), F = a("<button type=\"button\" class=\"sv-grid-chip-commit\" aria-label=\"Commit chip selection\">Done</button>"), I = a("<div class=\"sv-grid-cell-editor sv-grid-cell-editor-chips\" role=\"group\"><div class=\"sv-grid-chips-row\"><!> <input class=\"sv-grid-chip-input\" type=\"text\"/> <!></div></div>"), L = a("<input type=\"checkbox\" class=\"sv-grid-fr-editor sv-grid-fr-checkbox\"/>"), R = a("<option> </option>"), z = a("<select class=\"sv-grid-cell-editor sv-grid-fr-editor\"></select>"), B = a("<input class=\"sv-grid-cell-editor sv-grid-fr-editor\"/>"), pe = a("<button type=\"button\" class=\"sv-grid-checkbox\" role=\"checkbox\" aria-label=\"Edit checkbox value\"></button>"), me = a("<button type=\"button\" role=\"radio\">★</button>"), he = a("<span class=\"sv-grid-rating-editor\" role=\"radiogroup\" aria-label=\"Rating\"><!> <button type=\"button\" aria-label=\"Clear rating\" class=\"sv-grid-rating-clear\">×</button></span>"), ge = a("<textarea class=\"sv-grid-cell-editor sv-grid-cell-editor-textarea\" rows=\"4\"></textarea>"), _e = a("<button type=\"button\" class=\"sv-grid-autocomplete-option\" role=\"option\"> </button>"), ve = a("<div class=\"sv-grid-autocomplete-list\" role=\"listbox\"></div>"), ye = a("<div class=\"sv-grid-autocomplete\"><input class=\"sv-grid-cell-editor sv-grid-cell-editor-autocomplete\" type=\"text\"/> <!></div>"), be = a("<input type=\"color\"/>"), xe = a("<textarea class=\"sv-grid-cell-editor sv-grid-cell-editor-text sv-grid-cell-editor-multiline\"></textarea>"), Se = a("<input/>");
|
|
5
5
|
function V(a, l) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as e } from "./editor-contract-LXgQJAgd.js";
|
|
2
|
-
import { i as t } from "./chart-trend-
|
|
3
|
-
import { C as n, D as r, E as i, H as a, O as o, T as s, X as c, c as l, et as u, g as d, gt as f, ht as ee, i as te, mt as ne, o as re, r as ie, w as ae } from "./chart-
|
|
2
|
+
import { i as t } from "./chart-trend-C1aOAPBZ.js";
|
|
3
|
+
import { C as n, D as r, E as i, H as a, O as o, T as s, X as c, c as l, et as u, g as d, gt as f, ht as ee, i as te, mt as ne, o as re, r as ie, w as ae } from "./chart-By7h2Guv.js";
|
|
4
4
|
import { a as oe, t as se } from "./chart-export-BXqueeWJ.js";
|
|
5
5
|
import * as p from "svelte/internal/client";
|
|
6
6
|
import "svelte/internal/disclose-version";
|
|
@@ -326,7 +326,7 @@ function Ar(e, i) {
|
|
|
326
326
|
return;
|
|
327
327
|
}
|
|
328
328
|
let e = p.get(I), t = !0;
|
|
329
|
-
return import("./chart-summary-
|
|
329
|
+
return import("./chart-summary-BDtrNEiA.js").then((e) => e.n).then(({ chartSummary: n }) => {
|
|
330
330
|
t && p.set(zr, n(e), !0);
|
|
331
331
|
}), () => {
|
|
332
332
|
t = !1;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { B as e, D as t, E as n, F as r, G as i, H as a, I as o, J as s, K as c, L as l, N as u, R as d, U as f, V as p, X as m, Y as h, _ as g, a as _, at as v, b as ee, d as y, et as b, ft as te, i as ne, it as x, j as re, k as S, lt as ie, nt as C, o as ae, pt as w, q as oe, rt as se, st as T, t as E, tt as D, u as ce, ut as le, v as O, w as ue, x as de } from "./disclose-version-Dr7rEVv-.js";
|
|
2
2
|
import { a as fe } from "./editor-contract-LXgQJAgd.js";
|
|
3
|
-
import { i as pe } from "./chart-trend-
|
|
4
|
-
import { C as me, D as he, E as ge, H as _e, O as ve, T as ye, X as be, c as xe, et as Se, g as Ce, gt as we, ht as Te, i as Ee, mt as De, o as Oe, r as ke, w as Ae } from "./chart-
|
|
3
|
+
import { i as pe } from "./chart-trend-C1aOAPBZ.js";
|
|
4
|
+
import { C as me, D as he, E as ge, H as _e, O as ve, T as ye, X as be, c as xe, et as Se, g as Ce, gt as we, ht as Te, i as Ee, mt as De, o as Oe, r as ke, w as Ae } from "./chart-By7h2Guv.js";
|
|
5
5
|
import { a as je, t as Me } from "./chart-export-BXqueeWJ.js";
|
|
6
6
|
//#region src/chart-zoom.ts
|
|
7
7
|
function Ne(e, t, n) {
|
|
@@ -324,7 +324,7 @@ function ti(l, d) {
|
|
|
324
324
|
return;
|
|
325
325
|
}
|
|
326
326
|
let e = i(V), t = !0;
|
|
327
|
-
return import("./chart-summary-
|
|
327
|
+
return import("./chart-summary-BDtrNEiA.js").then((e) => e.n).then(({ chartSummary: n }) => {
|
|
328
328
|
t && x(si, n(e), !0);
|
|
329
329
|
}), () => {
|
|
330
330
|
t = !1;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as e, t } from "./SvModal-ClxGmpAc.js";
|
|
2
|
-
import { _ as n, h as r, l as i, m as a, p as o, u as s, v as c, y as l } from "./chart-
|
|
3
|
-
import { t as u } from "./SvGridChart-
|
|
4
|
-
import { i as d, t as f } from "./chart-panel-messages-
|
|
2
|
+
import { _ as n, h as r, l as i, m as a, p as o, u as s, v as c, y as l } from "./chart-By7h2Guv.js";
|
|
3
|
+
import { t as u } from "./SvGridChart-DMUOFxOe.js";
|
|
4
|
+
import { i as d, t as f } from "./chart-panel-messages-DUaXr-sb.js";
|
|
5
5
|
import * as p from "svelte/internal/client";
|
|
6
6
|
import "svelte/internal/disclose-version";
|
|
7
7
|
//#region src/chart-samples.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { E as e, F as t, G as n, H as r, I as i, L as a, N as o, V as s, Y as c, at as l, d as u, et as d, f, g as p, h as m, it as h, k as g, lt as _, m as v, mt as y, nt as b, pt as x, st as S, t as C, tt as w, u as T, ut as E, v as D, x as O } from "./disclose-version-Dr7rEVv-.js";
|
|
2
2
|
import { n as k, t as A } from "./SvModal-DhB_VMFR.js";
|
|
3
|
-
import { _ as j, h as M, l as N, m as P, p as F, u as I, v as L, y as R } from "./chart-
|
|
4
|
-
import { t as z } from "./SvGridChart-
|
|
5
|
-
import { i as B, t as V } from "./chart-panel-messages-
|
|
3
|
+
import { _ as j, h as M, l as N, m as P, p as F, u as I, v as L, y as R } from "./chart-By7h2Guv.js";
|
|
4
|
+
import { t as z } from "./SvGridChart-N7ik0oWy.js";
|
|
5
|
+
import { i as B, t as V } from "./chart-panel-messages-BC-tOgFY.js";
|
|
6
6
|
//#region src/chart-samples.ts
|
|
7
7
|
var H = null;
|
|
8
8
|
function U() {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
2
|
import { B as t, C as n, E as r, F as i, G as a, H as o, I as s, L as c, N as l, R as u, U as d, V as f, X as p, Y as m, _ as h, a as g, at as _, d as v, et as y, i as b, it as x, k as S, lt as ee, n as C, nt as w, o as T, pt as E, r as D, st as O, t as k, tt as A, u as te, ut as j, v as M, w as ne, x as N } from "./disclose-version-Dr7rEVv-.js";
|
|
3
|
-
import { z as P } from "./chart-
|
|
4
|
-
import { t as re } from "./SvGridChart-
|
|
3
|
+
import { z as P } from "./chart-By7h2Guv.js";
|
|
4
|
+
import { t as re } from "./SvGridChart-N7ik0oWy.js";
|
|
5
5
|
import { a as ie, o as ae, r as oe, s as se, t as ce } from "./chart-export-BXqueeWJ.js";
|
|
6
|
-
import { a as le, i as ue, r as de, t as fe } from "./chart-panel-messages-
|
|
6
|
+
import { a as le, i as ue, r as de, t as fe } from "./chart-panel-messages-BC-tOgFY.js";
|
|
7
7
|
//#region ../../node_modules/.pnpm/svelte@5.55.9_@typescript-eslint+types@8.67.0/node_modules/svelte/src/transition/index.js
|
|
8
8
|
function pe(e) {
|
|
9
9
|
let t = e - 1;
|
|
@@ -159,7 +159,7 @@ function L(e, c) {
|
|
|
159
159
|
x(f, !0);
|
|
160
160
|
return;
|
|
161
161
|
}
|
|
162
|
-
import("./SvGridChartBuilder-
|
|
162
|
+
import("./SvGridChartBuilder-Ca7gF8ZK.js").then((e) => {
|
|
163
163
|
x(u, e.default, !0), x(f, !0);
|
|
164
164
|
});
|
|
165
165
|
}
|
|
@@ -278,7 +278,7 @@ function L(e, c) {
|
|
|
278
278
|
});
|
|
279
279
|
async function _t() {
|
|
280
280
|
if (x(H, !1), !a(L)) return;
|
|
281
|
-
let { chartSummary: e } = await import("./chart-summary-
|
|
281
|
+
let { chartSummary: e } = await import("./chart-summary-BDtrNEiA.js").then((e) => e.n), t = e(a(L));
|
|
282
282
|
try {
|
|
283
283
|
await navigator.clipboard?.writeText(t);
|
|
284
284
|
} catch {}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
-
import { z as t } from "./chart-
|
|
3
|
-
import { t as n } from "./SvGridChart-
|
|
2
|
+
import { z as t } from "./chart-By7h2Guv.js";
|
|
3
|
+
import { t as n } from "./SvGridChart-DMUOFxOe.js";
|
|
4
4
|
import { a as r, o as i, r as a, s as o, t as s } from "./chart-export-BXqueeWJ.js";
|
|
5
|
-
import { a as c, i as l, r as u, t as d } from "./chart-panel-messages-
|
|
5
|
+
import { a as c, i as l, r as u, t as d } from "./chart-panel-messages-DUaXr-sb.js";
|
|
6
6
|
import * as f from "svelte/internal/client";
|
|
7
7
|
import "svelte/internal/disclose-version";
|
|
8
8
|
import { fly as p } from "svelte/transition";
|
|
@@ -135,7 +135,7 @@ function y(e, t) {
|
|
|
135
135
|
f.set(g, !0);
|
|
136
136
|
return;
|
|
137
137
|
}
|
|
138
|
-
import("./SvGridChartBuilder-
|
|
138
|
+
import("./SvGridChartBuilder-CB_Jnm2k.js").then((e) => {
|
|
139
139
|
f.set(h, e.default, !0), f.set(g, !0);
|
|
140
140
|
});
|
|
141
141
|
}
|
|
@@ -254,7 +254,7 @@ function y(e, t) {
|
|
|
254
254
|
});
|
|
255
255
|
async function Je() {
|
|
256
256
|
if (f.set(N, !1), !f.get(T)) return;
|
|
257
|
-
let { chartSummary: e } = await import("./chart-summary-
|
|
257
|
+
let { chartSummary: e } = await import("./chart-summary-BDtrNEiA.js").then((e) => e.n), t = e(f.get(T));
|
|
258
258
|
try {
|
|
259
259
|
await navigator.clipboard?.writeText(t);
|
|
260
260
|
} catch {}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { u as e } from "./chart-
|
|
2
|
-
import { t } from "./SvGridChart-
|
|
1
|
+
import { u as e } from "./chart-By7h2Guv.js";
|
|
2
|
+
import { t } from "./SvGridChart-DMUOFxOe.js";
|
|
3
3
|
import * as n from "svelte/internal/client";
|
|
4
4
|
import "svelte/internal/disclose-version";
|
|
5
5
|
//#region src/SvGridChartView.svelte
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { F as e, G as t, L as n, et as r, lt as i, pt as a, st as o, ut as s, x as c } from "./disclose-version-Dr7rEVv-.js";
|
|
2
|
-
import { u as l } from "./chart-
|
|
3
|
-
import { t as u } from "./SvGridChart-
|
|
2
|
+
import { u as l } from "./chart-By7h2Guv.js";
|
|
3
|
+
import { t as u } from "./SvGridChart-N7ik0oWy.js";
|
|
4
4
|
//#region src/SvGridChartView.svelte
|
|
5
5
|
var d = n("<div class=\"sv-grid-chart-view svelte-10run6t\"><!></div>"), f = {
|
|
6
6
|
hash: "svelte-10run6t",
|
|
@@ -57,12 +57,34 @@ function n(e, n) {
|
|
|
57
57
|
let r = (Array.isArray(e) ? e.join(",") : e ?? "") + "|" + (n.style ?? "") + "|" + (n.currency ?? "") + "|" + (n.minimumFractionDigits ?? "") + "|" + (n.maximumFractionDigits ?? "") + "|" + (n.useGrouping ?? "") + "|" + (n.currencyDisplay ?? "") + "|" + (n.notation ?? "") + "|" + (n.signDisplay ?? "") + "|" + (n.minimumIntegerDigits ?? "") + "|" + (n.compactDisplay ?? "") + "|" + (n.unit ?? "") + "|" + (n.unitDisplay ?? "") + "|" + (n.minimumSignificantDigits ?? "") + "|" + (n.maximumSignificantDigits ?? ""), i = t.get(r);
|
|
58
58
|
return i || (i = new Intl.NumberFormat(e, n), t.set(r, i)), i;
|
|
59
59
|
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
60
|
+
function r(e) {
|
|
61
|
+
if (e instanceof Date) return Number.isNaN(e.getTime()) ? null : e;
|
|
62
|
+
if (typeof e == "number") {
|
|
63
|
+
if (!Number.isFinite(e)) return null;
|
|
64
|
+
let t = new Date(e);
|
|
65
|
+
return Number.isNaN(t.getTime()) ? null : t;
|
|
66
|
+
}
|
|
67
|
+
if (typeof e != "string") return null;
|
|
68
|
+
let t = e.trim();
|
|
69
|
+
if (t === "") return null;
|
|
70
|
+
let n = /^(\d{4})-(\d{2})-(\d{2})$/.exec(t);
|
|
71
|
+
if (n) {
|
|
72
|
+
let [e, t, r] = [
|
|
73
|
+
Number(n[1]),
|
|
74
|
+
Number(n[2]) - 1,
|
|
75
|
+
Number(n[3])
|
|
76
|
+
], i = /* @__PURE__ */ new Date(0);
|
|
77
|
+
return i.setFullYear(e, t, r), i.setHours(0, 0, 0, 0), i.getMonth() === t && i.getDate() === r ? i : null;
|
|
78
|
+
}
|
|
79
|
+
let r = new Date(t);
|
|
80
|
+
return Number.isNaN(r.getTime()) ? null : r;
|
|
64
81
|
}
|
|
82
|
+
var i = /* @__PURE__ */ new Map();
|
|
65
83
|
function a(e, t) {
|
|
84
|
+
let n = (Array.isArray(e) ? e.join(",") : e ?? "") + "|" + (t.dateStyle ?? "") + "|" + (t.timeStyle ?? "") + "|" + (t.year ?? "") + "|" + (t.month ?? "") + "|" + (t.day ?? "") + "|" + (t.hour ?? "") + "|" + (t.minute ?? "") + "|" + (t.second ?? "") + "|" + (t.weekday ?? "") + "|" + (t.hour12 ?? ""), r = i.get(n);
|
|
85
|
+
return r || (r = new Intl.DateTimeFormat(e, t), i.set(n, r)), r;
|
|
86
|
+
}
|
|
87
|
+
function o(e, t) {
|
|
66
88
|
let r = typeof e == "number" ? e : Number(e);
|
|
67
89
|
if (!Number.isFinite(r)) return String(e ?? "");
|
|
68
90
|
let i = t.locales;
|
|
@@ -83,4 +105,4 @@ function a(e, t) {
|
|
|
83
105
|
return n(i, t.options ?? {}).format(r);
|
|
84
106
|
}
|
|
85
107
|
//#endregion
|
|
86
|
-
export { e as
|
|
108
|
+
export { e as a, r as i, a as n, n as r, o as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { E as e, F as t, G as n, H as r, L as i, N as a, V as o, Y as s, d as c, et as l, f as u, g as d, h as f, k as p, lt as m, m as h, nt as g, pt as _, st as v, t as y, tt as b, u as x, ut as S, v as ee } from "./disclose-version-Dr7rEVv-.js";
|
|
2
2
|
import { a as C } from "./editor-contract-LXgQJAgd.js";
|
|
3
|
-
import { b as te } from "./chart-
|
|
3
|
+
import { b as te } from "./chart-By7h2Guv.js";
|
|
4
4
|
//#region src/SvGridChartPickers.svelte
|
|
5
5
|
var w = [
|
|
6
6
|
{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as e } from "./editor-contract-LXgQJAgd.js";
|
|
2
|
-
import { b as t } from "./chart-
|
|
2
|
+
import { b as t } from "./chart-By7h2Guv.js";
|
|
3
3
|
import * as n from "svelte/internal/client";
|
|
4
4
|
import "svelte/internal/disclose-version";
|
|
5
5
|
//#region src/SvGridChartPickers.svelte
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
-
import { i as t, n, t as r } from "./chart-trend-
|
|
2
|
+
import { i as t, n, t as r } from "./chart-trend-C1aOAPBZ.js";
|
|
3
3
|
//#region src/chart-summary.ts
|
|
4
4
|
var i = /* @__PURE__ */ e({ chartSummary: () => d }), a = (e) => typeof e == "number" && Number.isFinite(e);
|
|
5
5
|
function o(e) {
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
+
import { i as e } from "./cell-formatting-Mnv84zoE.js";
|
|
1
2
|
//#region src/SvGrid.helpers.ts
|
|
2
|
-
function
|
|
3
|
+
function t(e) {
|
|
3
4
|
let t = "";
|
|
4
5
|
return e.color && (t += `color:${e.color};`), e.fontWeight != null && (t += `font-weight:${e.fontWeight};`), t;
|
|
5
6
|
}
|
|
6
|
-
function
|
|
7
|
+
function n(e) {
|
|
7
8
|
return Number.isInteger(e) ? e.toLocaleString() : e.toLocaleString(void 0, { maximumFractionDigits: 2 });
|
|
8
9
|
}
|
|
9
|
-
function
|
|
10
|
+
function r(e, t) {
|
|
10
11
|
return `${e}:${t}`;
|
|
11
12
|
}
|
|
12
|
-
function
|
|
13
|
+
function i(e) {
|
|
13
14
|
if (!e) return "";
|
|
14
15
|
if (typeof e == "string") return e;
|
|
15
16
|
if (Array.isArray(e)) return e.filter(Boolean).join(" ");
|
|
@@ -20,22 +21,22 @@ function r(e) {
|
|
|
20
21
|
}
|
|
21
22
|
return "";
|
|
22
23
|
}
|
|
23
|
-
function
|
|
24
|
+
function a(e) {
|
|
24
25
|
if (e == null || e === "") return "";
|
|
25
26
|
if (typeof e == "string" && /^\d{4}-\d{2}-\d{2}$/.test(e)) return e;
|
|
26
27
|
let t = e instanceof Date ? e : new Date(e);
|
|
27
28
|
return Number.isNaN(t.getTime()) ? "" : t.toISOString().slice(0, 10);
|
|
28
29
|
}
|
|
29
|
-
function
|
|
30
|
+
function o(e) {
|
|
30
31
|
if (e == null || e === "") return "";
|
|
31
32
|
if (typeof e == "string" && /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}$/.test(e)) return e;
|
|
32
33
|
let t = e instanceof Date ? e : new Date(e);
|
|
33
34
|
return Number.isNaN(t.getTime()) ? "" : t.toISOString().slice(0, 16);
|
|
34
35
|
}
|
|
35
|
-
function
|
|
36
|
+
function s(e) {
|
|
36
37
|
return String(e).replace(/-native$/, "");
|
|
37
38
|
}
|
|
38
|
-
function
|
|
39
|
+
function c(e) {
|
|
39
40
|
if (e instanceof Date) return e;
|
|
40
41
|
if (typeof e == "string") {
|
|
41
42
|
let t = e.match(/^(\d{1,2}):(\d{2})(?::(\d{2}))?/);
|
|
@@ -46,23 +47,23 @@ function s(e) {
|
|
|
46
47
|
}
|
|
47
48
|
return null;
|
|
48
49
|
}
|
|
49
|
-
function
|
|
50
|
+
function l(e) {
|
|
50
51
|
return e ? `${String(e.getHours()).padStart(2, "0")}:${String(e.getMinutes()).padStart(2, "0")}` : null;
|
|
51
52
|
}
|
|
52
|
-
function
|
|
53
|
-
let n =
|
|
54
|
-
return n === "date" ?
|
|
53
|
+
function u(e, t) {
|
|
54
|
+
let n = s(e);
|
|
55
|
+
return n === "date" ? a(t) : n === "datetime" ? o(t) : String(t ?? "");
|
|
55
56
|
}
|
|
56
|
-
function
|
|
57
|
-
let t =
|
|
57
|
+
function d(e) {
|
|
58
|
+
let t = s(e);
|
|
58
59
|
return t === "number" ? "number" : t === "date" ? "date" : t === "datetime" ? "datetime-local" : t === "time" ? "time" : t === "password" ? "password" : t === "color" ? "color" : "text";
|
|
59
60
|
}
|
|
60
|
-
function
|
|
61
|
+
function f(e) {
|
|
61
62
|
if (!e || Number.isNaN(e.getTime())) return "";
|
|
62
63
|
let t = (e) => String(e).padStart(2, "0");
|
|
63
64
|
return `${e.getFullYear()}-${t(e.getMonth() + 1)}-${t(e.getDate())}`;
|
|
64
65
|
}
|
|
65
|
-
function
|
|
66
|
+
function p(e) {
|
|
66
67
|
if (!e) return null;
|
|
67
68
|
let t = /^(\d{4})-(\d{2})-(\d{2})/.exec(e);
|
|
68
69
|
if (!t) {
|
|
@@ -72,46 +73,44 @@ function f(e) {
|
|
|
72
73
|
let n = new Date(Number(t[1]), Number(t[2]) - 1, Number(t[3]));
|
|
73
74
|
return Number.isNaN(n.getTime()) ? null : n;
|
|
74
75
|
}
|
|
75
|
-
function
|
|
76
|
+
function m(e) {
|
|
76
77
|
if (!e || String(e).endsWith("-native")) return !1;
|
|
77
|
-
let t =
|
|
78
|
+
let t = s(e);
|
|
78
79
|
return t === "date" || t === "datetime" || t === "time";
|
|
79
80
|
}
|
|
80
|
-
function m(e) {
|
|
81
|
-
return o(e) === "number" ? "text" : u(e);
|
|
82
|
-
}
|
|
83
81
|
function h(e) {
|
|
84
|
-
return
|
|
82
|
+
return s(e) === "number" ? "text" : d(e);
|
|
85
83
|
}
|
|
86
84
|
function g(e) {
|
|
85
|
+
return /^-?(\d*\.?\d*)(e-?\d*)?$/i.test(e);
|
|
86
|
+
}
|
|
87
|
+
function _(e) {
|
|
87
88
|
return e == null || e === "" ? [] : Array.isArray(e) ? e.filter((e) => e != null && e !== "") : [e];
|
|
88
89
|
}
|
|
89
|
-
function
|
|
90
|
+
function v(e, t) {
|
|
90
91
|
let n = e.find((e) => e.value === t || String(e.value) === String(t));
|
|
91
92
|
return n ? n.label : String(t ?? "");
|
|
92
93
|
}
|
|
93
|
-
function
|
|
94
|
+
function y(e, t) {
|
|
94
95
|
return e.find((e) => e.value === t || String(e.value) === String(t))?.color;
|
|
95
96
|
}
|
|
96
|
-
function
|
|
97
|
+
function b(e) {
|
|
97
98
|
return e ? `background: color-mix(in srgb, ${e} 22%, transparent);border-color: color-mix(in srgb, ${e} 45%, transparent);color: color-mix(in srgb, ${e} 80%, var(--sg-fg, #0f172a));` : "";
|
|
98
99
|
}
|
|
99
|
-
function
|
|
100
|
-
let t =
|
|
100
|
+
function x(e) {
|
|
101
|
+
let t = s(e);
|
|
101
102
|
return t === "number" ? "sv-grid-cell-editor sv-grid-cell-editor-number" : t === "date" ? "sv-grid-cell-editor sv-grid-cell-editor-date" : t === "datetime" ? "sv-grid-cell-editor sv-grid-cell-editor-datetime" : t === "color" ? "sv-grid-cell-editor sv-grid-cell-editor-color" : "sv-grid-cell-editor";
|
|
102
103
|
}
|
|
103
|
-
function
|
|
104
|
-
|
|
105
|
-
let t = e instanceof Date ? e : new Date(e);
|
|
106
|
-
return Number.isNaN(t.getTime()) ? null : t;
|
|
104
|
+
function S(t) {
|
|
105
|
+
return e(t);
|
|
107
106
|
}
|
|
108
|
-
function
|
|
107
|
+
function C(e, t) {
|
|
109
108
|
return Math.max(8, Math.min(e, window.innerWidth - t - 8));
|
|
110
109
|
}
|
|
111
|
-
function
|
|
110
|
+
function w(e) {
|
|
112
111
|
return typeof CSS < "u" && CSS.escape ? CSS.escape(e) : e.replace(/"/g, "\\\"");
|
|
113
112
|
}
|
|
114
|
-
function
|
|
113
|
+
function T(e, t) {
|
|
115
114
|
if (e == null || e === "") return NaN;
|
|
116
115
|
if (t) {
|
|
117
116
|
let t = (e instanceof Date ? e : new Date(String(e))).getTime();
|
|
@@ -120,11 +119,11 @@ function w(e, t) {
|
|
|
120
119
|
let n = typeof e == "number" ? e : Number(e);
|
|
121
120
|
return Number.isFinite(n) ? n : NaN;
|
|
122
121
|
}
|
|
123
|
-
function
|
|
122
|
+
function E(e) {
|
|
124
123
|
let t = Math.abs(e), n = t >= 1e3 ? 0 : t >= 100 ? 1 : t >= 1 ? 2 : 4;
|
|
125
124
|
return e.toLocaleString(void 0, { maximumFractionDigits: n });
|
|
126
125
|
}
|
|
127
|
-
function
|
|
126
|
+
function D(e) {
|
|
128
127
|
return new Date(e).toLocaleDateString(void 0, {
|
|
129
128
|
year: "numeric",
|
|
130
129
|
month: "short",
|
|
@@ -133,23 +132,23 @@ function E(e) {
|
|
|
133
132
|
}
|
|
134
133
|
//#endregion
|
|
135
134
|
//#region src/editor-registry.ts
|
|
136
|
-
var
|
|
137
|
-
function
|
|
138
|
-
|
|
139
|
-
}
|
|
140
|
-
function k(e) {
|
|
141
|
-
return D.get(e);
|
|
135
|
+
var O = /* @__PURE__ */ new Map();
|
|
136
|
+
function k(e, t) {
|
|
137
|
+
O.set(e, typeof t == "function" ? { component: t } : t);
|
|
142
138
|
}
|
|
143
139
|
function A(e) {
|
|
144
|
-
return
|
|
140
|
+
return O.get(e);
|
|
145
141
|
}
|
|
146
142
|
function j(e) {
|
|
147
|
-
|
|
143
|
+
return O.has(e);
|
|
144
|
+
}
|
|
145
|
+
function M(e) {
|
|
146
|
+
O.delete(e);
|
|
148
147
|
}
|
|
149
|
-
function
|
|
150
|
-
return [...
|
|
148
|
+
function N() {
|
|
149
|
+
return [...O.keys()];
|
|
151
150
|
}
|
|
152
|
-
function
|
|
151
|
+
function P(e) {
|
|
153
152
|
return {
|
|
154
153
|
value: e.value,
|
|
155
154
|
onChange: e.onChange,
|
|
@@ -160,8 +159,8 @@ function N(e) {
|
|
|
160
159
|
inCell: e.inCell
|
|
161
160
|
};
|
|
162
161
|
}
|
|
163
|
-
function
|
|
164
|
-
return e.props ? e.props(t) :
|
|
162
|
+
function F(e, t) {
|
|
163
|
+
return e.props ? e.props(t) : P(t);
|
|
165
164
|
}
|
|
166
165
|
//#endregion
|
|
167
|
-
export {
|
|
166
|
+
export { _ as A, y as C, i as D, T as E, c as O, d as S, g as T, p as _, N as a, u as b, S as c, b as d, w as f, E as g, D as h, k as i, m as j, f as k, t as l, n as m, A as n, F as o, l as p, j as r, M as s, P as t, C as u, h as v, v as w, x, r as y };
|