@svgrid/grid 3.0.5 → 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/README.md +28 -7
- package/dist/GridMenus.svelte +34 -4
- package/dist/SvGrid.controller.svelte.d.ts +23 -3
- package/dist/SvGrid.controller.svelte.js +235 -54
- package/dist/SvGrid.css +143 -7
- package/dist/SvGrid.helpers.js +2 -4
- package/dist/SvGrid.svelte +223 -38
- package/dist/SvGrid.types.d.ts +77 -4
- package/dist/SvGridDropdown.svelte +20 -0
- package/dist/SvGridDropdown.svelte.d.ts +12 -0
- package/dist/SvModal.svelte +22 -0
- package/dist/SvModal.svelte.d.ts +7 -0
- package/dist/a11y/dismissable.d.ts +10 -0
- package/dist/a11y/dismissable.js +24 -2
- package/dist/build-api.js +81 -31
- package/dist/cdn/{GridMenus-CID62rlI.js → GridMenus-BgUS-W3o.js} +151 -142
- package/dist/cdn/GridMenus-CcwU8I4t.js +644 -0
- package/dist/cdn/{SvChartMenu-FBSMINA6.js → SvChartMenu-BFSTpvB-.js} +1 -1
- package/dist/cdn/{SvChartMenu-Bl6PBbkT.js → SvChartMenu-BZ1Iwv0y.js} +1 -1
- package/dist/cdn/{SvDateTimePicker-DQwt4UAs.js → SvDateTimePicker-D9u_cOf8.js} +1 -1
- package/dist/cdn/{SvDateTimePicker-vNU6bZ-q.js → SvDateTimePicker-s_6IUpI7.js} +1 -1
- package/dist/cdn/{SvGridCellEditor-B1p-vCK5.js → SvGridCellEditor-9yz-SbdZ.js} +2 -2
- package/dist/cdn/{SvGridCellEditor-D_0q4xAu.js → SvGridCellEditor-D7-ql1Hd.js} +2 -2
- package/dist/cdn/{SvGridChart-C3EWAZaM.js → SvGridChart-DMUOFxOe.js} +4 -4
- package/dist/cdn/{SvGridChart-DzLkSwCH.js → SvGridChart-N7ik0oWy.js} +4 -4
- package/dist/cdn/{SvGridChartBuilder-CfII62sZ.js → SvGridChartBuilder-CB_Jnm2k.js} +4 -4
- package/dist/cdn/{SvGridChartBuilder-BE2T1ykB.js → SvGridChartBuilder-Ca7gF8ZK.js} +4 -4
- package/dist/cdn/{SvGridChartPanel-xf4sWVTo.js → SvGridChartPanel-9GOJRHP7.js} +5 -5
- package/dist/cdn/{SvGridChartPanel-CCX5_Wgd.js → SvGridChartPanel-Dl-FujN8.js} +5 -5
- package/dist/cdn/{SvGridChartView-CfuXmY5I.js → SvGridChartView-B1LFgoPP.js} +2 -2
- package/dist/cdn/{SvGridChartView-DYwabQWj.js → SvGridChartView-By3n7DGZ.js} +2 -2
- package/dist/cdn/{SvGridDropdown-D0VdjeR8.js → SvGridDropdown-BWeM3lMe.js} +46 -46
- package/dist/cdn/{SvGridDropdown-D13MtJ2j.js → SvGridDropdown-CJ6QqTxu.js} +67 -67
- package/dist/cdn/{SvModal-CIZWCcad.js → SvModal-ClxGmpAc.js} +187 -186
- package/dist/cdn/{SvModal-BAE-pjZX.js → SvModal-DhB_VMFR.js} +148 -147
- package/dist/cdn/{cell-formatting-C2Hf5gqd.js → cell-formatting-Mnv84zoE.js} +28 -6
- package/dist/cdn/{chart-Dz7SqMXH.js → chart-By7h2Guv.js} +1 -1
- package/dist/cdn/{chart-panel-messages-CUbf2R4i.js → chart-panel-messages-BC-tOgFY.js} +1 -1
- package/dist/cdn/{chart-panel-messages-CmNrMdsr.js → chart-panel-messages-DUaXr-sb.js} +1 -1
- package/dist/cdn/{chart-summary-BJW_tg_X.js → chart-summary-BDtrNEiA.js} +1 -1
- package/dist/cdn/{chart-trend-CaN9mDEV.js → chart-trend-C1aOAPBZ.js} +1 -1
- package/dist/cdn/{dismissable-DAHetSNk.js → dismissable-Brc4EZU1.js} +5 -1
- package/dist/cdn/{editor-registry-BhgE3S84.js → editor-registry-BVeHvlZR.js} +49 -50
- package/dist/cdn/{export-format-CUDLy2yn.js → export-format-y1wdyCcv.js} +93 -97
- package/dist/cdn/{row-resize-niQCp040.js → row-resize-DtOS1KG6.js} +41 -32
- package/dist/cdn/{server-block-cache-CGoWz-87.js → server-block-cache-DIqb3VZn.js} +4 -0
- package/dist/cdn/{src-jcFMkBnN.js → src-25JmJ_7g.js} +4768 -4149
- package/dist/cdn/{src-Bklofsad.js → src-kE9B98r6.js} +4796 -4177
- package/dist/cdn/svgrid.js +18 -18
- package/dist/cdn/svgrid.svelte-external.js +18 -18
- package/dist/cdn/{validate-C7Rn_Bns.js → validate-AZoD8BoR.js} +6 -2
- package/dist/cell-formatting.d.ts +9 -0
- package/dist/cell-formatting.js +52 -1
- package/dist/cell-render.js +25 -6
- package/dist/clipboard.d.ts +2 -2
- package/dist/clipboard.js +72 -23
- package/dist/columns.js +7 -2
- package/dist/conditional-formatting.d.ts +2 -0
- package/dist/conditional-formatting.js +2 -0
- package/dist/core.d.ts +22 -6
- package/dist/core.js +478 -40
- package/dist/editing.js +24 -0
- package/dist/export-format.d.ts +8 -0
- package/dist/export-format.js +23 -16
- package/dist/grid-messages.d.ts +4 -0
- package/dist/grid-messages.js +4 -0
- package/dist/headless.d.ts +5 -0
- package/dist/headless.js +12 -0
- package/dist/history.d.ts +21 -0
- package/dist/history.js +34 -4
- package/dist/index.d.ts +1 -1
- package/dist/keyboard-handlers.js +24 -1
- package/dist/keyboard.js +4 -0
- package/dist/row-drag-touch.d.ts +1 -1
- package/dist/row-drag.js +35 -1
- package/dist/row-model.d.ts +6 -0
- package/dist/row-resize.js +22 -1
- package/dist/selection.js +1 -1
- package/dist/server-block-cache.d.ts +5 -0
- package/dist/server-block-cache.js +8 -0
- package/dist/server-data-source.d.ts +35 -3
- package/dist/server-data-source.js +11 -2
- package/dist/server.d.ts +1 -1
- package/dist/sparkline.js +7 -5
- package/dist/svgrid-wrapper.types.d.ts +33 -0
- package/dist/validate.js +9 -1
- 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 +6 -1
- package/src/GridMenus.svelte +34 -4
- package/src/SvGrid.controller.svelte.ts +236 -57
- package/src/SvGrid.css +143 -7
- package/src/SvGrid.helpers.ts +2 -4
- package/src/SvGrid.svelte +223 -38
- package/src/SvGrid.types.ts +77 -4
- package/src/SvGridDropdown.svelte +20 -0
- package/src/SvModal.svelte +22 -0
- package/src/SvModal.test.ts +30 -1
- package/src/a11y/dismissable.test.ts +10 -1
- package/src/a11y/dismissable.ts +22 -2
- package/src/build-api.ts +85 -27
- package/src/cell-formatting.test.ts +17 -0
- package/src/cell-formatting.ts +49 -1
- package/src/cell-render.test.ts +24 -2
- package/src/cell-render.ts +24 -8
- package/src/clipboard.test.ts +107 -0
- package/src/clipboard.ts +62 -23
- package/src/columns.test.ts +4 -4
- package/src/columns.ts +7 -2
- package/src/conditional-formatting.test.ts +8 -0
- package/src/conditional-formatting.ts +3 -0
- package/src/core.sort.test.ts +86 -0
- package/src/core.tick-repair.test.ts +287 -0
- package/src/core.ts +478 -40
- package/src/editing.test.ts +52 -0
- package/src/editing.ts +25 -0
- package/src/export-dates.test.ts +114 -0
- package/src/export-format.ts +26 -14
- package/src/grid-messages.test.ts +7 -0
- package/src/grid-messages.ts +10 -0
- package/src/headless.ts +24 -0
- package/src/history.test.ts +49 -1
- package/src/history.ts +48 -2
- package/src/index.ts +2 -0
- package/src/keyboard-handlers.coverage.test.ts +65 -0
- package/src/keyboard-handlers.ts +26 -1
- package/src/keyboard.ts +3 -0
- package/src/row-drag-touch.ts +2 -2
- package/src/row-drag.test.ts +51 -0
- package/src/row-drag.ts +35 -2
- package/src/row-model.ts +6 -0
- package/src/row-resize.ts +24 -1
- package/src/selection.ts +1 -1
- package/src/server-block-cache.test.ts +27 -0
- package/src/server-block-cache.ts +13 -0
- package/src/server-data-source.infinite.test.ts +62 -0
- package/src/server-data-source.test.ts +19 -0
- package/src/server-data-source.ts +48 -4
- package/src/server.ts +2 -0
- package/src/sparkline.test.ts +7 -0
- package/src/sparkline.ts +6 -4
- package/src/svgrid-wrapper.types.ts +32 -0
- package/src/svgrid.api.test.ts +21 -0
- package/src/svgrid.charting.test.ts +12 -4
- package/src/svgrid.context-menu.test.ts +12 -0
- package/src/svgrid.data-push.svelte.test.ts +94 -0
- package/src/svgrid.detail-rows.svelte.test.ts +187 -0
- package/src/svgrid.filter-menu-scroll.test.ts +9 -0
- package/src/svgrid.gantt-seam.test.ts +1 -1
- package/src/svgrid.live-update-paths.svelte.test.ts +186 -0
- package/src/svgrid.menu-scroll-close.test.ts +10 -0
- package/src/svgrid.row-model-seam.svelte.test.ts +16 -0
- package/src/svgrid.row-pinning.test.ts +15 -1
- package/src/svgrid.selection-bar-seam.test.ts +1 -1
- package/src/svgrid.sticky-groups.svelte.test.ts +145 -0
- package/src/svgrid.upsell-license.test.ts +1 -1
- package/src/test-setup.ts +12 -0
- package/src/transaction.test.ts +58 -0
- package/src/validate.ts +7 -1
- package/src/virtualization/svelte-virtualizer.svelte.ts +1 -0
- package/src/virtualization/virtualizer.test.ts +44 -0
- package/src/virtualization/virtualizer.ts +13 -1
- package/dist/cdn/GridMenus-DLL-qZeu.js +0 -635
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { E as e, F as t, G as n, H as r, I as i, L as a, N as o, U as s, V as c, X as l, Y as u, a as d, at as f, b as p, c as m, d as h, et as g, i as ee, it as _, j as v, k as y, l as b, lt as
|
|
2
|
-
import { i as
|
|
3
|
-
import { i as
|
|
4
|
-
import { t as
|
|
5
|
-
import { n as
|
|
1
|
+
import { E as e, F as t, G as n, H as r, I as i, L as a, N as o, U as s, V as c, X as l, Y as u, a as d, at as f, b as p, c as m, d as h, et as g, i as ee, it as _, j as v, k as y, l as b, lt as x, mt as S, nt as C, ot as w, pt as T, rt as E, s as te, st as D, t as O, tt as k, ut as A, v as j, x as ne } from "./disclose-version-Dr7rEVv-.js";
|
|
2
|
+
import { i as M } from "./editor-contract-LXgQJAgd.js";
|
|
3
|
+
import { i as N } from "./popover-P-9P2YYn.js";
|
|
4
|
+
import { t as P } from "./dismissable-Brc4EZU1.js";
|
|
5
|
+
import { n as F, r as re } from "./focus-trap-BBOQYBma.js";
|
|
6
6
|
//#region src/a11y/scroll-lock.ts
|
|
7
|
-
var
|
|
8
|
-
function
|
|
7
|
+
var I = 0, L = "", R = "";
|
|
8
|
+
function z() {
|
|
9
9
|
if (typeof document > "u") return () => {};
|
|
10
10
|
let e = document.body;
|
|
11
|
-
if (
|
|
12
|
-
|
|
11
|
+
if (I === 0) {
|
|
12
|
+
L = e.style.overflow, R = e.style.paddingRight;
|
|
13
13
|
let t = window.innerWidth - document.documentElement.clientWidth;
|
|
14
14
|
if (t > 0) {
|
|
15
15
|
let n = parseFloat(getComputedStyle(e).paddingRight) || 0;
|
|
@@ -17,24 +17,24 @@ function L() {
|
|
|
17
17
|
}
|
|
18
18
|
e.style.overflow = "hidden";
|
|
19
19
|
}
|
|
20
|
-
|
|
20
|
+
I++;
|
|
21
21
|
let t = !1;
|
|
22
22
|
return () => {
|
|
23
|
-
t || (t = !0,
|
|
23
|
+
t || (t = !0, I = Math.max(0, I - 1), I === 0 && (e.style.overflow = L, e.style.paddingRight = R));
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
|
-
function
|
|
27
|
-
return
|
|
26
|
+
function B() {
|
|
27
|
+
return I;
|
|
28
28
|
}
|
|
29
29
|
//#endregion
|
|
30
30
|
//#region src/createOverlay.svelte.ts
|
|
31
|
-
function
|
|
31
|
+
function ie(e) {
|
|
32
32
|
return l(() => {
|
|
33
33
|
if (!e.open() || !e.getDialog()) return;
|
|
34
34
|
e.onOpen?.();
|
|
35
|
-
let t = e.getDialog(), n = e.trapFocus?.() ?? !0 ?
|
|
35
|
+
let t = e.getDialog(), n = e.trapFocus?.() ?? !0 ? F(t, e.initialFocus ? { initialFocus: e.initialFocus } : void 0) : null;
|
|
36
36
|
n?.activate();
|
|
37
|
-
let r = e.scrollLock?.() ?? !0 ?
|
|
37
|
+
let r = e.scrollLock?.() ?? !0 ? z() : null, i = P({
|
|
38
38
|
element: () => e.getDialog(),
|
|
39
39
|
onDismiss: (t) => {
|
|
40
40
|
(t === "escape" ? e.closeOnEsc?.() ?? !0 : e.closeOnBackdrop?.() ?? !0) && e.onClose();
|
|
@@ -53,10 +53,10 @@ function z(e) {
|
|
|
53
53
|
}
|
|
54
54
|
//#endregion
|
|
55
55
|
//#region src/createTabs.svelte.ts
|
|
56
|
-
var
|
|
57
|
-
function
|
|
58
|
-
let t = `sv-tabs-${
|
|
59
|
-
_(c, e, !0),
|
|
56
|
+
var V = 0;
|
|
57
|
+
function H(e) {
|
|
58
|
+
let t = `sv-tabs-${V++}`, r = () => e.tabs(), i = () => e.orientation?.() ?? "horizontal", a = () => e.activation?.() ?? "automatic", o = D(() => r().filter((e) => !e.disabled)), s = D(() => e.value() ?? r().find((e) => !e.disabled)?.id ?? r()[0]?.id ?? ""), c = f(""), l = f(0), u = (e) => {
|
|
59
|
+
_(c, e, !0), w(l);
|
|
60
60
|
}, d = (e) => `${t}-tab-${e}`, p = (e) => `${t}-panel-${e}`;
|
|
61
61
|
function m(t) {
|
|
62
62
|
let n = r().find((e) => e.id === t);
|
|
@@ -125,66 +125,66 @@ function V(e) {
|
|
|
125
125
|
}
|
|
126
126
|
//#endregion
|
|
127
127
|
//#region src/SvTabs.svelte
|
|
128
|
-
var
|
|
128
|
+
var U = a("<button type=\"button\" class=\"sv-tabs__scroll svelte-kxoh8m\" tabindex=\"-1\" aria-hidden=\"true\"><svg viewBox=\"0 0 24 24\" width=\"15\" height=\"15\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M15 18l-6-6 6-6\"></path></svg></button>"), ae = a("<button type=\"button\" class=\"sv-tabs__close svelte-kxoh8m\" tabindex=\"-1\"><svg viewBox=\"0 0 24 24\" width=\"12\" height=\"12\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\"><path d=\"M6 6l12 12M18 6L6 18\"></path></svg></button>"), oe = a("<span role=\"presentation\"><button> </button> <!></span>"), W = a("<button type=\"button\" class=\"sv-tabs__scroll svelte-kxoh8m\" tabindex=\"-1\" aria-hidden=\"true\"><svg viewBox=\"0 0 24 24\" width=\"15\" height=\"15\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M9 18l6-6-6-6\"></path></svg></button>"), G = a("<div><!></div>"), K = a("<div><div class=\"sv-tabs__strip svelte-kxoh8m\"><!> <div></div> <!></div> <!></div>"), se = {
|
|
129
129
|
hash: "svelte-kxoh8m",
|
|
130
130
|
code: ".sv-tabs.svelte-kxoh8m {--_accent: var(--sg-accent, #2563eb);display:flex;gap:0;}.sv-tabs--top.svelte-kxoh8m {flex-direction:column;}.sv-tabs--bottom.svelte-kxoh8m {flex-direction:column-reverse;}.sv-tabs--left.svelte-kxoh8m {flex-direction:row;}.sv-tabs--right.svelte-kxoh8m {flex-direction:row-reverse;}.sv-tabs__strip.svelte-kxoh8m {display:flex;align-items:center;min-width:0;}.sv-tabs--vertical.svelte-kxoh8m .sv-tabs__strip:where(.svelte-kxoh8m) {align-items:stretch;}.sv-tabs__list.svelte-kxoh8m {display:flex;gap:2px;}.sv-tabs--horizontal.svelte-kxoh8m .sv-tabs__list:where(.svelte-kxoh8m) {overflow-x:auto;flex:1 1 auto;min-width:0;scrollbar-width:none;scroll-behavior:smooth;}.sv-tabs--horizontal.svelte-kxoh8m .sv-tabs__list:where(.svelte-kxoh8m)::-webkit-scrollbar {display:none;}.sv-tabs--horizontal.svelte-kxoh8m .sv-tabs__tabwrap:where(.svelte-kxoh8m) {flex:none;}.sv-tabs--vertical.svelte-kxoh8m .sv-tabs__list:where(.svelte-kxoh8m) {flex-direction:column;}.sv-tabs__scroll.svelte-kxoh8m {flex:none;display:grid;place-items:center;width:26px;align-self:stretch;background:none;border:0;color:var(--sg-muted, #64748b);cursor:pointer;}.sv-tabs__scroll.svelte-kxoh8m:hover:not(:disabled) {color:var(--_accent);}.sv-tabs__scroll.svelte-kxoh8m:disabled {opacity:0.3;cursor:default;}\n /* Drag-reorder feedback */.sv-tabs__tabwrap.is-drag.svelte-kxoh8m {opacity:0.4;}.sv-tabs__tabwrap.is-over.svelte-kxoh8m::before {content:'';position:absolute;inset-inline-start:-1px;top:5px;bottom:5px;width:2px;background:var(--_accent);border-radius:2px;}.sv-tabs__tabwrap[draggable='true'].svelte-kxoh8m .sv-tabs__tab:where(.svelte-kxoh8m) {cursor:grab;}.sv-tabs--top.svelte-kxoh8m .sv-tabs__list:where(.svelte-kxoh8m) {border-bottom:1px solid var(--sg-border, #e2e8f0);}.sv-tabs--bottom.svelte-kxoh8m .sv-tabs__list:where(.svelte-kxoh8m) {border-top:1px solid var(--sg-border, #e2e8f0);}.sv-tabs--left.svelte-kxoh8m .sv-tabs__list:where(.svelte-kxoh8m) {border-inline-end:1px solid var(--sg-border, #e2e8f0);}.sv-tabs--right.svelte-kxoh8m .sv-tabs__list:where(.svelte-kxoh8m) {border-inline-start:1px solid var(--sg-border, #e2e8f0);}.sv-tabs--pill.svelte-kxoh8m .sv-tabs__list:where(.svelte-kxoh8m) {border:0;background:var(--sg-header-bg, #f1f5f9);padding:3px;border-radius:9px;gap:3px;}.sv-tabs__tabwrap.svelte-kxoh8m {position:relative;display:inline-flex;align-items:center;}.sv-tabs__tab.svelte-kxoh8m {background:none;border:0;font:inherit;font-size:13px;font-weight:600;color:var(--sg-muted, #64748b);padding:9px 14px;cursor:pointer;white-space:nowrap;}.sv-tabs__tabwrap.is-closable.svelte-kxoh8m .sv-tabs__tab:where(.svelte-kxoh8m) {padding-inline-end:4px;}.sv-tabs__tab.svelte-kxoh8m:hover:not(:disabled):not(.is-active) {color:var(--sg-fg, #0f172a);}.sv-tabs__tab.svelte-kxoh8m:disabled {opacity:0.45;cursor:not-allowed;}.sv-tabs__tab.svelte-kxoh8m:focus-visible {outline:2px solid var(--sg-focus-ring, var(--_accent));outline-offset:-2px;border-radius:6px;}.sv-tabs__close.svelte-kxoh8m {display:grid;place-items:center;width:18px;height:18px;margin-inline-end:8px;flex:none;background:none;border:0;color:var(--sg-muted, #64748b);cursor:pointer;border-radius:4px;}.sv-tabs__close.svelte-kxoh8m:hover {background:var(--sg-row-hover-bg, #f1f5f9);color:var(--sg-danger, #dc2626);}.sv-tabs--line.svelte-kxoh8m .sv-tabs__tab.is-active:where(.svelte-kxoh8m) {color:var(--_accent);}.sv-tabs--line.svelte-kxoh8m .sv-tabs__tabwrap.is-active:where(.svelte-kxoh8m)::after {content:'';position:absolute;background:var(--_accent);}.sv-tabs--line.sv-tabs--top.svelte-kxoh8m .sv-tabs__tabwrap.is-active:where(.svelte-kxoh8m)::after {left:8px;right:8px;height:2px;bottom:-1px;}.sv-tabs--line.sv-tabs--bottom.svelte-kxoh8m .sv-tabs__tabwrap.is-active:where(.svelte-kxoh8m)::after {left:8px;right:8px;height:2px;top:-1px;}.sv-tabs--line.sv-tabs--left.svelte-kxoh8m .sv-tabs__tabwrap.is-active:where(.svelte-kxoh8m)::after {top:8px;bottom:8px;width:2px;inset-inline-end:-1px;}.sv-tabs--line.sv-tabs--right.svelte-kxoh8m .sv-tabs__tabwrap.is-active:where(.svelte-kxoh8m)::after {top:8px;bottom:8px;width:2px;inset-inline-start:-1px;}.sv-tabs--pill.svelte-kxoh8m .sv-tabs__tab:where(.svelte-kxoh8m) {border-radius:7px;padding:7px 14px;}.sv-tabs--pill.svelte-kxoh8m .sv-tabs__tabwrap.is-active:where(.svelte-kxoh8m) .sv-tabs__tab:where(.svelte-kxoh8m), .sv-tabs--pill.svelte-kxoh8m .sv-tabs__tab.is-active:where(.svelte-kxoh8m) {background:var(--sg-bg, #fff);color:var(--sg-fg, #0f172a);box-shadow:0 1px 2px rgba(0,0,0,0.08);}.sv-tabs__panel.svelte-kxoh8m {padding:16px 2px;outline:none;flex:1;min-width:0;}"
|
|
131
131
|
};
|
|
132
|
-
function
|
|
133
|
-
|
|
134
|
-
let c =
|
|
135
|
-
function
|
|
136
|
-
J && (_(
|
|
132
|
+
function q(i, a) {
|
|
133
|
+
A(a, !0), ne(i, se);
|
|
134
|
+
let c = O(a, "value", 15), p = O(a, "variant", 3, "line"), m = O(a, "activation", 3, "automatic"), S = O(a, "reorderable", 3, !1), w = D(() => a.tabPosition ?? (a.orientation === "vertical" ? "left" : "top")), E = D(() => n(w) === "left" || n(w) === "right" ? "vertical" : "horizontal"), k = D(() => a.dir === "ltr" || a.dir === "rtl" ? a.dir : void 0), M = f(0), N = f(0), P = f(0), F = D(() => n(E) === "horizontal" && n(P) > n(N) + 1), re = D(() => n(M) <= 1), I = D(() => n(M) + n(N) >= n(P) - 1);
|
|
135
|
+
function L() {
|
|
136
|
+
J && (_(N, J.clientWidth, !0), _(P, J.scrollWidth, !0), _(M, J.scrollLeft, !0));
|
|
137
137
|
}
|
|
138
138
|
l(() => {
|
|
139
|
-
a.tabs.length, queueMicrotask(
|
|
139
|
+
a.tabs.length, queueMicrotask(L);
|
|
140
140
|
}), l(() => {
|
|
141
|
-
let e = () =>
|
|
141
|
+
let e = () => L();
|
|
142
142
|
return window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
|
|
143
143
|
});
|
|
144
|
-
function
|
|
144
|
+
function R(e) {
|
|
145
145
|
J?.scrollBy({
|
|
146
|
-
left: e * Math.max(120, n(
|
|
146
|
+
left: e * Math.max(120, n(N) * .7),
|
|
147
147
|
behavior: "smooth"
|
|
148
148
|
});
|
|
149
149
|
}
|
|
150
|
-
let
|
|
151
|
-
function
|
|
150
|
+
let z = f(null), B = f(null);
|
|
151
|
+
function ie(e, t) {
|
|
152
152
|
if (e === t) return;
|
|
153
153
|
let n = a.tabs.map((e) => e.id), r = n.indexOf(e), i = n.indexOf(t);
|
|
154
154
|
r < 0 || i < 0 || (n.splice(i, 0, n.splice(r, 1)[0]), a.onReorder?.(n));
|
|
155
155
|
}
|
|
156
|
-
let
|
|
156
|
+
let V = H({
|
|
157
157
|
tabs: () => a.tabs,
|
|
158
158
|
value: () => c(),
|
|
159
159
|
onChange: (e) => {
|
|
160
160
|
c(e), a.onChange?.(e);
|
|
161
161
|
},
|
|
162
162
|
onClose: (e) => a.onClose?.(e),
|
|
163
|
-
orientation: () => n(
|
|
163
|
+
orientation: () => n(E),
|
|
164
164
|
activation: () => m(),
|
|
165
165
|
dir: () => a.dir,
|
|
166
166
|
ariaLabel: () => a.ariaLabel
|
|
167
|
-
}), q =
|
|
167
|
+
}), q = D(() => V.activeId), J = null, Y = 0;
|
|
168
168
|
l(() => {
|
|
169
|
-
if (
|
|
170
|
-
Y =
|
|
171
|
-
let e =
|
|
169
|
+
if (V.focusTick !== Y) {
|
|
170
|
+
Y = V.focusTick;
|
|
171
|
+
let e = V.focusId;
|
|
172
172
|
queueMicrotask(() => J?.querySelector(`[data-tab="${e}"]`)?.focus());
|
|
173
173
|
}
|
|
174
174
|
});
|
|
175
|
-
var X =
|
|
176
|
-
var i =
|
|
177
|
-
u(() => i.disabled = n(
|
|
175
|
+
var X = K(), Z = g(X), ce = g(Z), le = (e) => {
|
|
176
|
+
var i = U();
|
|
177
|
+
u(() => i.disabled = n(re)), r("click", i, () => R(-1)), t(e, i);
|
|
178
178
|
};
|
|
179
179
|
y(ce, (e) => {
|
|
180
|
-
n(
|
|
180
|
+
n(F) && e(le);
|
|
181
181
|
});
|
|
182
|
-
var
|
|
183
|
-
b(
|
|
182
|
+
var Q = C(ce, 2), $ = (e) => _(M, e.currentTarget.scrollLeft, !0);
|
|
183
|
+
b(Q, (e) => ({
|
|
184
184
|
class: "sv-tabs__list",
|
|
185
|
-
onscroll:
|
|
185
|
+
onscroll: $,
|
|
186
186
|
...e
|
|
187
|
-
}), [() =>
|
|
187
|
+
}), [() => V.tablistProps()], void 0, void 0, "svelte-kxoh8m"), e(Q, 21, () => a.tabs, (e) => e.id, (e, i) => {
|
|
188
188
|
var a = oe();
|
|
189
189
|
let c;
|
|
190
190
|
var l = g(a);
|
|
@@ -192,199 +192,200 @@ function K(i, a) {
|
|
|
192
192
|
type: "button",
|
|
193
193
|
class: "sv-tabs__tab",
|
|
194
194
|
...e,
|
|
195
|
-
[
|
|
196
|
-
}), [() =>
|
|
195
|
+
[te]: { "is-active": n(i).id === n(q) }
|
|
196
|
+
}), [() => V.tabProps(n(i).id)], void 0, void 0, "svelte-kxoh8m");
|
|
197
197
|
var d = g(l, !0);
|
|
198
|
-
|
|
199
|
-
var f =
|
|
198
|
+
T(l);
|
|
199
|
+
var f = C(l, 2), p = (e) => {
|
|
200
200
|
var a = ae();
|
|
201
201
|
u(() => h(a, "aria-label", `Close ${n(i).label}`)), r("click", a, (e) => {
|
|
202
|
-
e.stopPropagation(),
|
|
202
|
+
e.stopPropagation(), V.close(n(i).id);
|
|
203
203
|
}), t(e, a);
|
|
204
204
|
};
|
|
205
205
|
y(f, (e) => {
|
|
206
206
|
n(i).closable && e(p);
|
|
207
|
-
}),
|
|
208
|
-
c =
|
|
207
|
+
}), T(a), u(() => {
|
|
208
|
+
c = j(a, 1, "sv-tabs__tabwrap svelte-kxoh8m", null, c, {
|
|
209
209
|
"is-active": n(i).id === n(q),
|
|
210
210
|
"is-closable": n(i).closable,
|
|
211
|
-
"is-drag": n(
|
|
212
|
-
"is-over": n(
|
|
213
|
-
}), h(a, "draggable",
|
|
211
|
+
"is-drag": n(z) === n(i).id,
|
|
212
|
+
"is-over": n(B) === n(i).id
|
|
213
|
+
}), h(a, "draggable", S() && !n(i).disabled), o(d, n(i).label);
|
|
214
214
|
}), s("dragstart", a, function(...e) {
|
|
215
|
-
(
|
|
216
|
-
_(
|
|
215
|
+
(S() ? (e) => {
|
|
216
|
+
_(z, n(i).id, !0), e.dataTransfer && (e.dataTransfer.effectAllowed = "move");
|
|
217
217
|
} : void 0)?.apply(this, e);
|
|
218
218
|
}), s("dragover", a, function(...e) {
|
|
219
|
-
(
|
|
220
|
-
e.preventDefault(), _(
|
|
219
|
+
(S() ? (e) => {
|
|
220
|
+
e.preventDefault(), _(B, n(i).id, !0);
|
|
221
221
|
} : void 0)?.apply(this, e);
|
|
222
222
|
}), s("dragleave", a, function(...e) {
|
|
223
|
-
(
|
|
224
|
-
n(
|
|
223
|
+
(S() ? () => {
|
|
224
|
+
n(B) === n(i).id && _(B, null);
|
|
225
225
|
} : void 0)?.apply(this, e);
|
|
226
226
|
}), s("drop", a, function(...e) {
|
|
227
|
-
(
|
|
228
|
-
e.preventDefault(), n(
|
|
227
|
+
(S() ? (e) => {
|
|
228
|
+
e.preventDefault(), n(z) && ie(n(z), n(i).id), _(z, null), _(B, null);
|
|
229
229
|
} : void 0)?.apply(this, e);
|
|
230
230
|
}), s("dragend", a, function(...e) {
|
|
231
|
-
(
|
|
232
|
-
_(
|
|
231
|
+
(S() ? () => {
|
|
232
|
+
_(z, null), _(B, null);
|
|
233
233
|
} : void 0)?.apply(this, e);
|
|
234
234
|
}), t(e, a);
|
|
235
|
-
}),
|
|
236
|
-
var ue =
|
|
237
|
-
var i =
|
|
238
|
-
u(() => i.disabled = n(
|
|
235
|
+
}), T(Q), ee(Q, (e) => J = e, () => J);
|
|
236
|
+
var ue = C(Q, 2), de = (e) => {
|
|
237
|
+
var i = W();
|
|
238
|
+
u(() => i.disabled = n(I)), r("click", i, () => R(1)), t(e, i);
|
|
239
239
|
};
|
|
240
240
|
y(ue, (e) => {
|
|
241
|
-
n(
|
|
242
|
-
}),
|
|
243
|
-
var fe =
|
|
244
|
-
var r =
|
|
241
|
+
n(F) && e(de);
|
|
242
|
+
}), T(Z);
|
|
243
|
+
var fe = C(Z, 2), pe = (e) => {
|
|
244
|
+
var r = G();
|
|
245
245
|
b(r, (e) => ({
|
|
246
246
|
class: "sv-tabs__panel",
|
|
247
247
|
...e
|
|
248
|
-
}), [() =>
|
|
248
|
+
}), [() => V.panelProps(n(q))], void 0, void 0, "svelte-kxoh8m");
|
|
249
249
|
var i = g(r);
|
|
250
|
-
v(i, () => a.panel, () => n(q)),
|
|
250
|
+
v(i, () => a.panel, () => n(q)), T(r), t(e, r);
|
|
251
251
|
};
|
|
252
252
|
y(fe, (e) => {
|
|
253
253
|
a.panel && e(pe);
|
|
254
|
-
}),
|
|
255
|
-
|
|
256
|
-
}), d(
|
|
254
|
+
}), T(X), u(() => {
|
|
255
|
+
j(X, 1, `sv-tabs sv-tabs--${n(w) ?? ""} sv-tabs--${n(E) ?? ""} sv-tabs--${p() ?? ""}`, "svelte-kxoh8m"), h(X, "dir", n(k)), X.dir = X.dir;
|
|
256
|
+
}), d(Q, "clientWidth", (e) => _(N, e)), t(i, X), x();
|
|
257
257
|
}
|
|
258
258
|
c(["click"]);
|
|
259
259
|
//#endregion
|
|
260
260
|
//#region src/SvModal.svelte
|
|
261
|
-
var
|
|
261
|
+
var J = a("<button type=\"button\" class=\"sv-modal__x\" aria-label=\"Close\">×</button>"), Y = a("<div><h2 class=\"sv-modal__title\"> </h2> <!></div>"), X = a("<div class=\"sv-modal__footer\"><!></div>"), Z = a("<div class=\"sv-modal__resize\" aria-hidden=\"true\"></div>"), ce = a("<div class=\"sv-modal__backdrop\"><div><!> <div class=\"sv-modal__body\"><!></div> <!> <!></div></div>"), le = {
|
|
262
262
|
hash: "svelte-11fjt09",
|
|
263
263
|
code: ".sv-modal__backdrop {position:fixed;inset:0;z-index:2147483000;background:rgba(15, 23, 42, 0.45);backdrop-filter:blur(1.5px);\n animation: svelte-11fjt09-sv-modal-fade 0.16s ease both;}\n @keyframes svelte-11fjt09-sv-modal-fade { from { opacity: 0 } to { opacity: 1 } }\n @media (prefers-reduced-motion: reduce) {.sv-modal__backdrop { animation: none} }.sv-modal {position:fixed;top:50%;left:50%;display:flex;flex-direction:column;max-width:94vw;max-height:88vh;min-width:240px;background:var(--sg-bg, #fff);color:var(--sg-fg, #0f172a);border:1px solid var(--sg-border, #e2e8f0);border-radius:12px;overflow:hidden;box-shadow:0 24px 64px -16px rgba(15, 23, 42, 0.5);\n animation: svelte-11fjt09-sv-modal-in 0.18s cubic-bezier(0.16, 1, 0.3, 1) both;}\n @keyframes svelte-11fjt09-sv-modal-in { from { opacity: 0; transform: translate(-50%, -50%) scale(0.94) } to { opacity: 1 } }\n @media (prefers-reduced-motion: reduce) {.sv-modal { animation: none} }.sv-modal--sm {width:360px;}.sv-modal--md {width:520px;}.sv-modal--lg {width:720px;}.sv-modal.is-resized {max-width:none;max-height:none;}.sv-modal__header {display:flex;align-items:center;gap:12px;padding:13px 16px;border-bottom:1px solid var(--sg-border, #e2e8f0);}.sv-modal__header.is-draggable {cursor:move;touch-action:none;user-select:none;}.sv-modal__title {flex:1;margin:0;font-size:15px;font-weight:650;}.sv-modal__x {flex:none;width:28px;height:28px;display:grid;place-items:center;background:none;border:0;color:var(--sg-muted, #64748b);cursor:pointer;border-radius:6px;font-size:20px;line-height:1;}.sv-modal__x:hover {background:var(--sg-row-hover-bg, #f1f5f9);color:var(--sg-fg, #0f172a);}.sv-modal__body {padding:16px;overflow:auto;flex:1;font-size:13.5px;line-height:1.6;}.sv-modal__footer {display:flex;justify-content:flex-end;gap:8px;padding:12px 16px;border-top:1px solid var(--sg-border, #e2e8f0);}.sv-modal__resize {position:absolute;inset-inline-end:0;bottom:0;width:16px;height:16px;cursor:nwse-resize;touch-action:none;background:linear-gradient(135deg, transparent 50%, var(--sg-muted, #94a3b8) 50%, var(--sg-muted, #94a3b8) 60%, transparent 60%, transparent 72%, var(--sg-muted, #94a3b8) 72%, var(--sg-muted, #94a3b8) 82%, transparent 82%);opacity:0.6;}"
|
|
264
264
|
};
|
|
265
265
|
function Q(e, a) {
|
|
266
|
-
|
|
267
|
-
let c =
|
|
266
|
+
A(a, !0), ne(e, le);
|
|
267
|
+
let c = O(a, "open", 15, !1), l = O(a, "size", 3, "md"), d = O(a, "draggable", 3, !1), w = O(a, "resizable", 3, !1), D = O(a, "closeOnBackdrop", 3, !0), P = O(a, "closeOnEsc", 3, !0), F = O(a, "hideClose", 3, !1), I = M("sv-modal-title"), L = f(null), R = f(E({
|
|
268
268
|
x: 0,
|
|
269
269
|
y: 0
|
|
270
|
-
})),
|
|
271
|
-
function
|
|
270
|
+
})), z = f(null);
|
|
271
|
+
function B() {
|
|
272
272
|
c(!1), a.onClose?.();
|
|
273
273
|
}
|
|
274
|
-
let
|
|
274
|
+
let V = ie({
|
|
275
275
|
open: () => c(),
|
|
276
|
-
getDialog: () => n(
|
|
277
|
-
onClose:
|
|
278
|
-
closeOnEsc: () =>
|
|
279
|
-
closeOnBackdrop: () =>
|
|
276
|
+
getDialog: () => n(L),
|
|
277
|
+
onClose: B,
|
|
278
|
+
closeOnEsc: () => P(),
|
|
279
|
+
closeOnBackdrop: () => D(),
|
|
280
280
|
onOpen: () => {
|
|
281
|
-
_(
|
|
281
|
+
_(R, {
|
|
282
282
|
x: 0,
|
|
283
283
|
y: 0
|
|
284
|
-
}, !0), _(
|
|
285
|
-
}
|
|
286
|
-
|
|
284
|
+
}, !0), _(z, null);
|
|
285
|
+
},
|
|
286
|
+
initialFocus: () => a.initialFocus?.() || (n(L) ? re(n(L)).find((e) => !e.closest(".sv-modal__header")) ?? n(L) : null)
|
|
287
|
+
}), H = !1, U = {
|
|
287
288
|
x: 0,
|
|
288
289
|
y: 0,
|
|
289
290
|
ox: 0,
|
|
290
291
|
oy: 0
|
|
291
292
|
};
|
|
292
293
|
function ae(e) {
|
|
293
|
-
!d() || e.target.closest(".sv-modal__x") || (
|
|
294
|
+
!d() || e.target.closest(".sv-modal__x") || (H = !0, U = {
|
|
294
295
|
x: e.clientX,
|
|
295
296
|
y: e.clientY,
|
|
296
|
-
ox: n(
|
|
297
|
-
oy: n(
|
|
297
|
+
ox: n(R).x,
|
|
298
|
+
oy: n(R).y
|
|
298
299
|
}, e.currentTarget.setPointerCapture(e.pointerId));
|
|
299
300
|
}
|
|
300
301
|
function oe(e) {
|
|
301
|
-
|
|
302
|
-
x:
|
|
303
|
-
y:
|
|
302
|
+
H && _(R, {
|
|
303
|
+
x: U.ox + (e.clientX - U.x),
|
|
304
|
+
y: U.oy + (e.clientY - U.y)
|
|
304
305
|
}, !0);
|
|
305
306
|
}
|
|
306
|
-
function
|
|
307
|
-
|
|
307
|
+
function W(e) {
|
|
308
|
+
H && (H = !1, e.currentTarget.releasePointerCapture(e.pointerId));
|
|
308
309
|
}
|
|
309
|
-
let
|
|
310
|
+
let G = !1, K = {
|
|
310
311
|
x: 0,
|
|
311
312
|
y: 0,
|
|
312
313
|
w: 0,
|
|
313
314
|
h: 0
|
|
314
315
|
};
|
|
315
316
|
function se(e) {
|
|
316
|
-
if (!
|
|
317
|
-
e.stopPropagation(),
|
|
318
|
-
let t = n(
|
|
319
|
-
|
|
317
|
+
if (!w() || !n(L)) return;
|
|
318
|
+
e.stopPropagation(), G = !0;
|
|
319
|
+
let t = n(L).getBoundingClientRect();
|
|
320
|
+
K = {
|
|
320
321
|
x: e.clientX,
|
|
321
322
|
y: e.clientY,
|
|
322
323
|
w: t.width,
|
|
323
324
|
h: t.height
|
|
324
|
-
}, _(
|
|
325
|
+
}, _(z, {
|
|
325
326
|
w: t.width,
|
|
326
327
|
h: t.height
|
|
327
328
|
}, !0), e.currentTarget.setPointerCapture(e.pointerId);
|
|
328
329
|
}
|
|
329
|
-
function
|
|
330
|
-
|
|
331
|
-
w: Math.max(240,
|
|
332
|
-
h: Math.max(160,
|
|
330
|
+
function q(e) {
|
|
331
|
+
G && _(z, {
|
|
332
|
+
w: Math.max(240, K.w + (e.clientX - K.x)),
|
|
333
|
+
h: Math.max(160, K.h + (e.clientY - K.y))
|
|
333
334
|
}, !0);
|
|
334
335
|
}
|
|
335
336
|
function Q(e) {
|
|
336
|
-
|
|
337
|
+
G && (G = !1, e.currentTarget.releasePointerCapture(e.pointerId));
|
|
337
338
|
}
|
|
338
|
-
var $ = i(),
|
|
339
|
-
var i =
|
|
339
|
+
var $ = i(), ue = k($), de = (e) => {
|
|
340
|
+
var i = ce(), c = g(i);
|
|
340
341
|
b(c, (e) => ({
|
|
341
342
|
class: `sv-modal sv-modal--${l() ?? ""}`,
|
|
342
343
|
...e,
|
|
343
|
-
[
|
|
344
|
+
[te]: { "is-resized": !!n(z) },
|
|
344
345
|
[m]: {
|
|
345
|
-
transform: `translate(calc(-50% + ${n(
|
|
346
|
-
width: n(
|
|
347
|
-
height: n(
|
|
346
|
+
transform: `translate(calc(-50% + ${n(R).x}px), calc(-50% + ${n(R).y}px))`,
|
|
347
|
+
width: n(z) ? `${n(z).w}px` : a.width ? `${a.width}px` : void 0,
|
|
348
|
+
height: n(z) ? `${n(z).h}px` : void 0
|
|
348
349
|
}
|
|
349
|
-
}), [() =>
|
|
350
|
-
var f = g(c),
|
|
351
|
-
var n =
|
|
350
|
+
}), [() => V.dialogProps({ labelledBy: a.title ? I : void 0 })]);
|
|
351
|
+
var f = g(c), x = (e) => {
|
|
352
|
+
var n = Y();
|
|
352
353
|
let i;
|
|
353
354
|
var c = g(n), l = g(c, !0);
|
|
354
|
-
|
|
355
|
-
var f =
|
|
356
|
-
var n =
|
|
357
|
-
r("click", n,
|
|
355
|
+
T(c);
|
|
356
|
+
var f = C(c, 2), p = (e) => {
|
|
357
|
+
var n = J();
|
|
358
|
+
r("click", n, B), t(e, n);
|
|
358
359
|
};
|
|
359
360
|
y(f, (e) => {
|
|
360
|
-
|
|
361
|
-
}),
|
|
362
|
-
i =
|
|
363
|
-
}), r("pointerdown", n, ae), r("pointermove", n, oe), r("pointerup", n,
|
|
361
|
+
F() || e(p);
|
|
362
|
+
}), T(n), u(() => {
|
|
363
|
+
i = j(n, 1, "sv-modal__header", null, i, { "is-draggable": d() }), h(c, "id", I), o(l, a.title ?? "");
|
|
364
|
+
}), r("pointerdown", n, ae), r("pointermove", n, oe), r("pointerup", n, W), s("pointercancel", n, W), t(e, n);
|
|
364
365
|
};
|
|
365
366
|
y(f, (e) => {
|
|
366
|
-
(a.title || !
|
|
367
|
+
(a.title || !F()) && e(x);
|
|
367
368
|
});
|
|
368
|
-
var
|
|
369
|
-
v(
|
|
370
|
-
var
|
|
371
|
-
var n =
|
|
372
|
-
v(r, () => a.footer),
|
|
369
|
+
var E = C(f, 2), D = g(E);
|
|
370
|
+
v(D, () => a.children ?? S), T(E);
|
|
371
|
+
var O = C(E, 2), k = (e) => {
|
|
372
|
+
var n = X(), r = g(n);
|
|
373
|
+
v(r, () => a.footer), T(n), t(e, n);
|
|
373
374
|
};
|
|
374
|
-
y(
|
|
375
|
-
a.footer && e(
|
|
375
|
+
y(O, (e) => {
|
|
376
|
+
a.footer && e(k);
|
|
376
377
|
});
|
|
377
|
-
var
|
|
378
|
-
var n =
|
|
379
|
-
r("pointerdown", n, se), r("pointermove", n,
|
|
378
|
+
var A = C(O, 2), ne = (e) => {
|
|
379
|
+
var n = Z();
|
|
380
|
+
r("pointerdown", n, se), r("pointermove", n, q), r("pointerup", n, Q), s("pointercancel", n, Q), t(e, n);
|
|
380
381
|
};
|
|
381
|
-
y(
|
|
382
|
-
|
|
383
|
-
}),
|
|
382
|
+
y(A, (e) => {
|
|
383
|
+
w() && e(ne);
|
|
384
|
+
}), T(c), ee(c, (e) => _(L, e), () => n(L)), T(i), p(i, (e) => N?.(e)), t(e, i);
|
|
384
385
|
};
|
|
385
|
-
y(
|
|
386
|
-
c() && e(
|
|
387
|
-
}), t(e, $),
|
|
386
|
+
y(ue, (e) => {
|
|
387
|
+
c() && e(de);
|
|
388
|
+
}), t(e, $), x();
|
|
388
389
|
}
|
|
389
390
|
c([
|
|
390
391
|
"pointerdown",
|
|
@@ -393,4 +394,4 @@ c([
|
|
|
393
394
|
"click"
|
|
394
395
|
]);
|
|
395
396
|
//#endregion
|
|
396
|
-
export {
|
|
397
|
+
export { z as a, ie as i, q as n, B as o, H as r, Q as t };
|
|
@@ -54,15 +54,37 @@ function e(e, t) {
|
|
|
54
54
|
}
|
|
55
55
|
var t = /* @__PURE__ */ new Map();
|
|
56
56
|
function n(e, n) {
|
|
57
|
-
let r = (Array.isArray(e) ? e.join(",") : e ?? "") + "|" + (n.style ?? "") + "|" + (n.currency ?? "") + "|" + (n.minimumFractionDigits ?? "") + "|" + (n.maximumFractionDigits ?? "") + "|" + (n.useGrouping ?? "") + "|" + (n.currencyDisplay ?? "") + "|" + (n.notation ?? ""), i = t.get(r);
|
|
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) {
|
|
@@ -37,8 +37,12 @@ function o(t, n) {
|
|
|
37
37
|
if (typeof window > "u") return () => {};
|
|
38
38
|
let r = (r) => {
|
|
39
39
|
e(t(), r.target) || n();
|
|
40
|
+
}, i = !1, a = requestAnimationFrame(() => {
|
|
41
|
+
a = null, i = !0, window.addEventListener("scroll", r, !0);
|
|
42
|
+
});
|
|
43
|
+
return () => {
|
|
44
|
+
a !== null && cancelAnimationFrame(a), a = null, i && window.removeEventListener("scroll", r, !0), i = !1;
|
|
40
45
|
};
|
|
41
|
-
return window.addEventListener("scroll", r, !0), () => window.removeEventListener("scroll", r, !0);
|
|
42
46
|
}
|
|
43
47
|
//#endregion
|
|
44
48
|
export { a as n, o as r, i as t };
|