react-semaphor 0.1.558 → 0.1.560
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/analytics-protocol/index.js +368 -358
- package/dist/assistant-context/index.js +1 -1
- package/dist/assistant-protocol/index.js +5 -5
- package/dist/brand-studio/index.js +9 -9
- package/dist/briefings/index.js +5 -5
- package/dist/chunks/analytics-base-schemas-CHLxsPfX.js +630 -0
- package/dist/chunks/{assistant-chat-BCWoP6Rf.js → assistant-chat-Bu2fFm_I.js} +206 -207
- package/dist/chunks/{bookmark-state-PjQpxbG7.js → bookmark-state-BFY9oNmr.js} +3 -3
- package/dist/chunks/{braces-D5Ucy7q1.js → braces-Da41xfUd.js} +1 -1
- package/dist/chunks/{comparison-window-caption-Dc7BaCMz.js → comparison-window-caption-4FNkMrzE.js} +213 -213
- package/dist/chunks/{context-DVy4HOU0.js → context-BgPDzLHZ.js} +1 -1
- package/dist/chunks/{custom-visual-inputs-B-DLRGrV.js → custom-visual-inputs-Dz-enUNR.js} +1 -1
- package/dist/chunks/{dashboard-wK6Bai4V.js → dashboard-_MeBuy67.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-Coqghdn6.js → dashboard-briefing-launcher-CEi4Pr_v.js} +1152 -1166
- package/dist/chunks/{dashboard-controls-BYWSM2RM.js → dashboard-controls-Bi7fyG-4.js} +98 -98
- package/dist/chunks/{dashboard-json-pPTB5gj0.js → dashboard-json-B1mU_OMa.js} +5 -5
- package/dist/chunks/{document-dashboard-inputs-PY_7Xm55.js → document-dashboard-inputs-CkWfDB8c.js} +64 -64
- package/dist/chunks/{edit-dashboard-visual-BODxuUeq.js → edit-dashboard-visual-0CJN31Y3.js} +8274 -8514
- package/dist/chunks/filter-reach-copy-BF4w4kI2.js +3738 -0
- package/dist/chunks/{filter-value-text-CUBpotVN.js → filter-value-text-CRC-K_l_.js} +3 -3
- package/dist/chunks/{global-date-filter-utils-BsFqnnbA.js → global-date-filter-utils-D8365uPH.js} +4088 -3416
- package/dist/chunks/{index-DP_wQl0v.js → index-DtHidOPV.js} +579 -604
- package/dist/chunks/{layout-grid-CkoXmv0L.js → layout-grid-BvsH4RY2.js} +1 -1
- package/dist/chunks/{list-filter-B4i25kuc.js → list-filter-Dg0otx5E.js} +1 -1
- package/dist/chunks/{matrix-analytical-definition-4GTUDheD.js → matrix-analytical-definition-CM18W8w6.js} +41 -41
- package/dist/chunks/{matrix-card-fS_4O7zA.js → matrix-card-HPskLaPy.js} +3 -3
- package/dist/chunks/{matrix-member-presentation-Dj7HaAHC.js → matrix-member-presentation-Bbrfrke4.js} +1 -1
- package/dist/chunks/{matrix-operation-contract-CpgLZ7E5.js → matrix-operation-contract-WPv4R-H_.js} +130 -130
- package/dist/chunks/{metric-comparison-C8LY7GG5.js → metric-comparison-ljMKYZKa.js} +2 -2
- package/dist/chunks/{model-change-CJEj3ZD6.js → model-change-Ccn1zaxl.js} +1 -1
- package/dist/chunks/{palette-stlpjVk4.js → palette-Bsh376zO.js} +1 -1
- package/dist/chunks/{pivot-result-contract-expectations-DMk-mKhG.js → pivot-result-contract-expectations-Bl5suy4-.js} +602 -696
- package/dist/chunks/{pivot-result-identity-CrQ54Xbj.js → pivot-result-identity-vS9TSh4f.js} +1 -1
- package/dist/chunks/{raw-temporal-presentation-BI2z2LlB.js → raw-temporal-presentation-BHm7s-hz.js} +230 -274
- package/dist/chunks/{report-preferences-dialog-Dc-YyVwf.js → report-preferences-dialog-BV8L0SeS.js} +55 -55
- package/dist/chunks/{report-runtime-context-CohdtiMg.js → report-runtime-context-BZQh9ywy.js} +2 -2
- package/dist/chunks/{resolve-dashboard-input-context-BZYI1hB0.js → resolve-dashboard-input-context-CAMiWvyR.js} +2021 -2239
- package/dist/chunks/{save-C1dgxgAu.js → save-B5EAsgQF.js} +1 -1
- package/dist/chunks/{saved-dashboard-context-CIBoMq46.js → saved-dashboard-context-n2Wn11cV.js} +57 -57
- package/dist/chunks/{selection-reducer-_d6aKJnj.js → selection-reducer-D0YnaAD9.js} +1 -1
- package/dist/chunks/{semaphor-ready-indicator-ERTLU7B4.js → semaphor-ready-indicator-XLBLOJ2V.js} +38446 -39176
- package/dist/chunks/{shelf-drop-preview-context-fEnx6iL_.js → shelf-drop-preview-context-DHMa54a-.js} +570 -570
- package/dist/chunks/source-entity-resolution-dUG5VWRm.js +607 -0
- package/dist/chunks/{switch-BqUan2mN.js → switch-ByxH4M7t.js} +3 -3
- package/dist/chunks/{table-export-sheet-CTCTA_bd.js → table-export-sheet-C_GdeTYU.js} +1 -1
- package/dist/chunks/{table-settings-DF1gdVQR.js → table-settings-Imz0FgWi.js} +8 -8
- package/dist/chunks/{temporal-input-presentation-DoSniQj1.js → temporal-input-presentation-uvNK_tM0.js} +1109 -820
- package/dist/chunks/{token-types-DFyLflLY.js → token-types-CQtXUVMy.js} +1 -1
- package/dist/chunks/{upload-DcoyjkRV.js → upload-wbR-NVzq.js} +1 -1
- package/dist/chunks/{use-create-flow-overlay-state-xhb9YFg-.js → use-create-flow-overlay-state-CEBaLOKC.js} +6 -6
- package/dist/chunks/validators-CXTneCA4.js +3453 -0
- package/dist/chunks/{zoned-wall-clock-E35Frf9v.js → zoned-wall-clock-B1n_WjW3.js} +1 -1
- package/dist/dashboard/index.js +2 -2
- package/dist/dashboard-authoring/index.js +2207 -1496
- package/dist/data-app-sdk/index.js +20 -20
- package/dist/data-app-sdk-adapters/index.js +3 -3
- package/dist/data-app-sdk-validation/index.js +6 -6
- package/dist/format-utils/index.js +181 -176
- package/dist/index.js +22 -22
- package/dist/report-runtime-context/index.js +2 -2
- package/dist/style.css +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/components/editor/editor-aside/utils.d.ts +1 -1
- package/dist/types/components/visual/data-table/types/data-table.d.ts +5 -20
- package/dist/types/index.js +6 -6
- package/dist/types/lib/formatters/canonical-format-adapter.d.ts +2 -29
- package/dist/types/lib/formatters/raw-temporal-presentation.d.ts +0 -2
- package/dist/types/lib/formatters/table-column-settings.d.ts +47 -0
- package/dist/types/lib/matrix-table/matrix-card-adapter.d.ts +10 -188
- package/dist/types/lib/matrix-table/matrix-delivery-policy.d.ts +1 -1
- package/dist/types/lib/matrix-table/matrix-delivery.d.ts +16 -372
- package/dist/types/lib/stores/dashboard-store.d.ts +0 -1
- package/dist/types/lib/stores/editor-store.d.ts +39 -9
- package/dist/types/lib/stores/table-actions.d.ts +9 -3
- package/dist/types/lib/table-formatting/index.d.ts +0 -2
- package/dist/types/lib/table-formatting/table-conditional-formatting-range-source.d.ts +3 -2
- package/dist/types/lib/table-formatting/table-conditional-formatting-range.d.ts +3 -2
- package/dist/types/lib/table-formatting/table-formatting-normalize.d.ts +1 -2
- package/dist/types/lib/table-formatting/table-formatting-render-model.d.ts +9 -0
- package/dist/types/lib/table-formatting/table-formatting-types.d.ts +5 -95
- package/dist/types/lib/table-formatting/table-presentation-fields.d.ts +35 -0
- package/dist/types/lib/types/common-types.d.ts +40 -47
- package/dist/types/lib/types/explorer-types.d.ts +13 -44
- package/dist/types/lib/utils/card-config-utils.d.ts +9 -1
- package/dist/types/lib/utils/card-definition.d.ts +9 -187
- package/dist/types/shared/analytics-protocol/analytics-base-schemas.d.ts +159 -513
- package/dist/types/shared/analytics-protocol/contracts.d.ts +32 -9
- package/dist/types/shared/analytics-protocol/execution-input-schemas.d.ts +108 -980
- package/dist/types/shared/analytics-protocol/field-validation.d.ts +1 -0
- package/dist/types/shared/analytics-protocol/matrix-definition-contract.d.ts +281 -4624
- package/dist/types/shared/analytics-protocol/matrix-operation-contract.d.ts +20 -20
- package/dist/types/shared/analytics-protocol/matrix-operation-request.d.ts +18 -18
- package/dist/types/shared/analytics-protocol/matrix-path-contract.d.ts +40 -40
- package/dist/types/shared/analytics-protocol/matrix-window-contract.d.ts +3 -203
- package/dist/types/shared/analytics-protocol/scalar-value.d.ts +8 -8
- package/dist/types/shared/analytics-protocol/source-capabilities.d.ts +21 -0
- package/dist/types/shared/assistant-context/saved-dashboard-context.d.ts +8 -0
- package/dist/types/shared/assistant-protocol/context.d.ts +69 -69
- package/dist/types/shared/dashboard-authoring/canonical-result-keys.d.ts +13 -0
- package/dist/types/shared/dashboard-authoring/card-export-request.d.ts +4 -1
- package/dist/types/shared/dashboard-authoring/card-formats/sql-date-pattern.d.ts +10 -0
- package/dist/types/shared/dashboard-authoring/card-formats/upgrade-card-formats.d.ts +57 -0
- package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +24 -24
- package/dist/types/shared/dashboard-authoring/conditional-formatting/editable.d.ts +14 -0
- package/dist/types/shared/dashboard-authoring/conditional-formatting/evaluate.d.ts +16 -0
- package/dist/types/shared/dashboard-authoring/conditional-formatting/index.d.ts +9 -0
- package/dist/types/shared/dashboard-authoring/conditional-formatting/kpi.d.ts +14 -0
- package/dist/types/shared/dashboard-authoring/conditional-formatting/resolve-card-column-ref.d.ts +17 -0
- package/dist/types/shared/dashboard-authoring/conditional-formatting/retain.d.ts +14 -0
- package/dist/types/shared/dashboard-authoring/conditional-formatting/schema.d.ts +4499 -0
- package/dist/types/shared/dashboard-authoring/conditional-formatting/store.d.ts +12 -0
- package/dist/types/shared/dashboard-authoring/conditional-formatting/types.d.ts +151 -0
- package/dist/types/shared/dashboard-authoring/conditional-formatting/upgrade.d.ts +35 -0
- package/dist/types/shared/dashboard-authoring/control-execution-contract.d.ts +62 -62
- package/dist/types/shared/dashboard-authoring/dashboard-card-source-index.d.ts +2 -0
- package/dist/types/shared/dashboard-authoring/index.d.ts +5 -0
- package/dist/types/shared/dashboard-authoring/legacy-table-routing.d.ts +4 -2
- package/dist/types/shared/dashboard-authoring/matrix-authoring.d.ts +4 -5
- package/dist/types/shared/dashboard-authoring/matrix-delivery.d.ts +24 -736
- package/dist/types/shared/dashboard-authoring/retired-presentation-fields.d.ts +31 -0
- package/dist/types/shared/dashboard-authoring/upgrade-card-presentation.d.ts +14 -0
- package/dist/types/shared/format-utils/formatters/matrix-formatter.d.ts +5 -1
- package/dist/types/shared/format-utils/formatters/number-formatter.d.ts +16 -0
- package/dist/types/shared/format-utils/index.d.ts +2 -0
- package/dist/types/shared/format-utils/matrix-export-presentation.d.ts +10 -366
- package/dist/types/shared/format-utils/raw-temporal.d.ts +15 -1
- package/dist/types/shared/format-utils/resolve-column-format.d.ts +43 -0
- package/dist/types/shared/format-utils/retired-format-adapters.d.ts +68 -0
- package/dist/types/shared/format-utils/semantic-format.d.ts +5 -1
- package/dist/types/shared/format-utils/stored-value-format.d.ts +16 -0
- package/dist/types/shared/format-utils/types/format-types.d.ts +10 -12
- package/package.json +1 -1
- package/dist/chunks/analytics-base-schemas-BUFUoO6G.js +0 -472
- package/dist/chunks/editor-draft-sync-BN5qYHPF.js +0 -15
- package/dist/chunks/filter-reach-copy-BvJH9JO-.js +0 -3411
- package/dist/chunks/source-entity-resolution-DXW1HpKf.js +0 -816
- package/dist/chunks/validators-hmfNNQz8.js +0 -3595
- package/dist/types/lib/table-formatting/table-conditional-formatting-evaluator.d.ts +0 -9
- package/dist/types/lib/table-formatting/table-formatting-validation.d.ts +0 -12
|
@@ -1,20 +1,19 @@
|
|
|
1
|
-
import { jsxs as Ne, jsx as
|
|
1
|
+
import { jsxs as Ne, jsx as N, Fragment as ft } from "react/jsx-runtime";
|
|
2
2
|
import * as T from "react";
|
|
3
|
-
import zn, { forwardRef as Fe, createElement as xe, useContext as rt, createContext as xt, useRef as
|
|
4
|
-
import { b1 as In, a6 as ie, b2 as Pt, a7 as wt,
|
|
5
|
-
import { C as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { f as Yn, r as Nt, g as Mt, a as Je, c as Te, n as jn, b as Qn } from "./custom-visual-inputs-B-DLRGrV.js";
|
|
3
|
+
import zn, { forwardRef as Fe, createElement as xe, useContext as rt, createContext as xt, useRef as O, useLayoutEffect as Pn, useImperativeHandle as zt, useEffect as ne, useState as de, useCallback as G, useMemo as W, memo as wn, Suspense as Cn, useSyncExternalStore as En } from "react";
|
|
4
|
+
import { b1 as In, a6 as ie, b2 as Pt, b3 as Rn, a7 as wt, b4 as ot, b5 as Ct, b6 as Et, b7 as Dn, b8 as An, b9 as Nn, ba as Mn, u as Re, bb as Ln, bc as _n, bd as kn, be as Tn, bf as Hn, bg as Vn, bh as $n, bi as Fn, bj as Kn } from "./semaphor-ready-indicator-XLBLOJ2V.js";
|
|
5
|
+
import { C as It, A as Rt, D as ze, E as me, F as Dt, G as Bn, H as qn, J as Pe, K as On, M as At, N as Gn, O as Un } from "./switch-ByxH4M7t.js";
|
|
6
|
+
import { db as Wn, dc as jn } from "./global-date-filter-utils-D8365uPH.js";
|
|
7
|
+
import { f as Xn, r as Nt, g as Mt, a as Je, c as Te, n as Yn, b as Qn } from "./custom-visual-inputs-Dz-enUNR.js";
|
|
9
8
|
import "./index-CuHybtft.js";
|
|
10
|
-
import "./validators-
|
|
11
|
-
import "./matrix-operation-contract-
|
|
12
|
-
import "./analytics-base-schemas-
|
|
9
|
+
import "./validators-CXTneCA4.js";
|
|
10
|
+
import "./matrix-operation-contract-WPv4R-H_.js";
|
|
11
|
+
import "./analytics-base-schemas-CHLxsPfX.js";
|
|
13
12
|
import "zod";
|
|
14
13
|
import "../value-format-preferences/index.js";
|
|
15
14
|
import { c as we } from "./_commonjsHelpers-DimLPMtv.js";
|
|
16
15
|
import { u as Jn } from "./appearance-context-DEYtWinQ.js";
|
|
17
|
-
const
|
|
16
|
+
const Po = zn.memo(function({
|
|
18
17
|
context: t = "editor"
|
|
19
18
|
} = {}) {
|
|
20
19
|
return /* @__PURE__ */ Ne(
|
|
@@ -24,14 +23,14 @@ const wo = zn.memo(function({
|
|
|
24
23
|
className: "flex h-full grow flex-col items-center overflow-hidden",
|
|
25
24
|
children: [
|
|
26
25
|
" ",
|
|
27
|
-
/* @__PURE__ */
|
|
26
|
+
/* @__PURE__ */ N(In, { context: t }),
|
|
28
27
|
" "
|
|
29
28
|
]
|
|
30
29
|
}
|
|
31
30
|
);
|
|
32
31
|
}), Ke = xt(null);
|
|
33
32
|
Ke.displayName = "PanelGroupContext";
|
|
34
|
-
const
|
|
33
|
+
const q = {
|
|
35
34
|
group: "data-panel-group",
|
|
36
35
|
groupDirection: "data-panel-group-direction",
|
|
37
36
|
groupId: "data-panel-group-id",
|
|
@@ -44,10 +43,10 @@ const B = {
|
|
|
44
43
|
resizeHandleEnabled: "data-panel-resize-handle-enabled",
|
|
45
44
|
resizeHandleId: "data-panel-resize-handle-id",
|
|
46
45
|
resizeHandleState: "data-resize-handle-state"
|
|
47
|
-
}, it = 10,
|
|
46
|
+
}, it = 10, ge = Pn, pt = T.useId, Zn = typeof pt == "function" ? pt : () => null;
|
|
48
47
|
let er = 0;
|
|
49
48
|
function st(e = null) {
|
|
50
|
-
const t = Zn(), n =
|
|
49
|
+
const t = Zn(), n = O(e || t || null);
|
|
51
50
|
return n.current === null && (n.current = "" + er++), e ?? n.current;
|
|
52
51
|
}
|
|
53
52
|
function Lt({
|
|
@@ -68,8 +67,8 @@ function Lt({
|
|
|
68
67
|
tagName: p = "div",
|
|
69
68
|
...g
|
|
70
69
|
}) {
|
|
71
|
-
const
|
|
72
|
-
if (
|
|
70
|
+
const y = rt(Ke);
|
|
71
|
+
if (y === null)
|
|
73
72
|
throw Error("Panel components must be rendered within a PanelGroup container");
|
|
74
73
|
const {
|
|
75
74
|
collapsePanel: h,
|
|
@@ -77,12 +76,12 @@ function Lt({
|
|
|
77
76
|
getPanelSize: x,
|
|
78
77
|
getPanelStyle: R,
|
|
79
78
|
groupId: D,
|
|
80
|
-
isPanelCollapsed:
|
|
81
|
-
reevaluatePanelConstraints:
|
|
79
|
+
isPanelCollapsed: L,
|
|
80
|
+
reevaluatePanelConstraints: C,
|
|
82
81
|
registerPanel: X,
|
|
83
|
-
resizePanel:
|
|
84
|
-
unregisterPanel:
|
|
85
|
-
} =
|
|
82
|
+
resizePanel: J,
|
|
83
|
+
unregisterPanel: K
|
|
84
|
+
} = y, M = st(s), _ = O({
|
|
86
85
|
callbacks: {
|
|
87
86
|
onCollapse: d,
|
|
88
87
|
onExpand: f,
|
|
@@ -95,64 +94,64 @@ function Lt({
|
|
|
95
94
|
maxSize: l,
|
|
96
95
|
minSize: a
|
|
97
96
|
},
|
|
98
|
-
id:
|
|
97
|
+
id: M,
|
|
99
98
|
idIsFromProps: s !== void 0,
|
|
100
99
|
order: c
|
|
101
100
|
});
|
|
102
|
-
|
|
101
|
+
O({
|
|
103
102
|
didLogMissingDefaultSizeWarning: !1
|
|
104
|
-
}),
|
|
103
|
+
}), ge(() => {
|
|
105
104
|
const {
|
|
106
|
-
callbacks:
|
|
107
|
-
constraints:
|
|
108
|
-
} =
|
|
109
|
-
|
|
105
|
+
callbacks: B,
|
|
106
|
+
constraints: $
|
|
107
|
+
} = _.current, F = {
|
|
108
|
+
...$
|
|
110
109
|
};
|
|
111
|
-
|
|
112
|
-
}),
|
|
113
|
-
const
|
|
114
|
-
return X(
|
|
115
|
-
|
|
110
|
+
_.current.id = M, _.current.idIsFromProps = s !== void 0, _.current.order = c, B.onCollapse = d, B.onExpand = f, B.onResize = u, $.collapsedSize = n, $.collapsible = r, $.defaultSize = i, $.maxSize = l, $.minSize = a, (F.collapsedSize !== $.collapsedSize || F.collapsible !== $.collapsible || F.maxSize !== $.maxSize || F.minSize !== $.minSize) && C(_.current, F);
|
|
111
|
+
}), ge(() => {
|
|
112
|
+
const B = _.current;
|
|
113
|
+
return X(B), () => {
|
|
114
|
+
K(B);
|
|
116
115
|
};
|
|
117
|
-
}, [c,
|
|
116
|
+
}, [c, M, X, K]), zt(o, () => ({
|
|
118
117
|
collapse: () => {
|
|
119
|
-
h(
|
|
118
|
+
h(_.current);
|
|
120
119
|
},
|
|
121
|
-
expand: (
|
|
122
|
-
A(
|
|
120
|
+
expand: (B) => {
|
|
121
|
+
A(_.current, B);
|
|
123
122
|
},
|
|
124
123
|
getId() {
|
|
125
|
-
return
|
|
124
|
+
return M;
|
|
126
125
|
},
|
|
127
126
|
getSize() {
|
|
128
|
-
return x(
|
|
127
|
+
return x(_.current);
|
|
129
128
|
},
|
|
130
129
|
isCollapsed() {
|
|
131
|
-
return
|
|
130
|
+
return L(_.current);
|
|
132
131
|
},
|
|
133
132
|
isExpanded() {
|
|
134
|
-
return !
|
|
133
|
+
return !L(_.current);
|
|
135
134
|
},
|
|
136
|
-
resize: (
|
|
137
|
-
|
|
135
|
+
resize: (B) => {
|
|
136
|
+
J(_.current, B);
|
|
138
137
|
}
|
|
139
|
-
}), [h, A, x,
|
|
140
|
-
const U = R(
|
|
138
|
+
}), [h, A, x, L, M, J]);
|
|
139
|
+
const U = R(_.current, i);
|
|
141
140
|
return xe(p, {
|
|
142
141
|
...g,
|
|
143
142
|
children: e,
|
|
144
143
|
className: t,
|
|
145
|
-
id:
|
|
144
|
+
id: M,
|
|
146
145
|
style: {
|
|
147
146
|
...U,
|
|
148
147
|
...m
|
|
149
148
|
},
|
|
150
149
|
// CSS selectors
|
|
151
|
-
[
|
|
152
|
-
[
|
|
153
|
-
[
|
|
154
|
-
[
|
|
155
|
-
[
|
|
150
|
+
[q.groupId]: D,
|
|
151
|
+
[q.panel]: "",
|
|
152
|
+
[q.panelCollapsible]: r || void 0,
|
|
153
|
+
[q.panelId]: M,
|
|
154
|
+
[q.panelSize]: parseFloat("" + U.flexGrow).toFixed(1)
|
|
156
155
|
});
|
|
157
156
|
}
|
|
158
157
|
const tr = Fe((e, t) => xe(Lt, {
|
|
@@ -161,7 +160,7 @@ const tr = Fe((e, t) => xe(Lt, {
|
|
|
161
160
|
}));
|
|
162
161
|
Lt.displayName = "Panel";
|
|
163
162
|
tr.displayName = "forwardRef(Panel)";
|
|
164
|
-
let Ze = null, He = -1,
|
|
163
|
+
let Ze = null, He = -1, ue = null;
|
|
165
164
|
function nr(e, t) {
|
|
166
165
|
if (t) {
|
|
167
166
|
const n = (t & Vt) !== 0, r = (t & $t) !== 0, i = (t & Ft) !== 0, o = (t & Kt) !== 0;
|
|
@@ -184,17 +183,17 @@ function nr(e, t) {
|
|
|
184
183
|
}
|
|
185
184
|
}
|
|
186
185
|
function rr() {
|
|
187
|
-
|
|
186
|
+
ue !== null && (document.head.removeChild(ue), Ze = null, ue = null, He = -1);
|
|
188
187
|
}
|
|
189
188
|
function We(e, t) {
|
|
190
189
|
var n, r;
|
|
191
190
|
const i = nr(e, t);
|
|
192
191
|
if (Ze !== i) {
|
|
193
|
-
if (Ze = i,
|
|
192
|
+
if (Ze = i, ue === null && (ue = document.createElement("style"), document.head.appendChild(ue)), He >= 0) {
|
|
194
193
|
var o;
|
|
195
|
-
(o =
|
|
194
|
+
(o = ue.sheet) === null || o === void 0 || o.removeRule(He);
|
|
196
195
|
}
|
|
197
|
-
He = (n = (r =
|
|
196
|
+
He = (n = (r = ue.sheet) === null || r === void 0 ? void 0 : r.insertRule(`*{cursor: ${i} !important;}`)) !== null && n !== void 0 ? n : -1;
|
|
198
197
|
}
|
|
199
198
|
}
|
|
200
199
|
function _t(e) {
|
|
@@ -292,7 +291,7 @@ function Ht(e) {
|
|
|
292
291
|
return t && t instanceof ShadowRoot ? t.host : t;
|
|
293
292
|
}
|
|
294
293
|
const Vt = 1, $t = 2, Ft = 4, Kt = 8, ur = or() === "coarse";
|
|
295
|
-
let se = [], Se = !1,
|
|
294
|
+
let se = [], Se = !1, pe = /* @__PURE__ */ new Map(), qe = /* @__PURE__ */ new Map();
|
|
296
295
|
const Me = /* @__PURE__ */ new Set();
|
|
297
296
|
function dr(e, t, n, r, i) {
|
|
298
297
|
var o;
|
|
@@ -303,12 +302,12 @@ function dr(e, t, n, r, i) {
|
|
|
303
302
|
element: t,
|
|
304
303
|
hitAreaMargins: r,
|
|
305
304
|
setResizeHandlerState: i
|
|
306
|
-
}, a = (o =
|
|
307
|
-
return
|
|
305
|
+
}, a = (o = pe.get(s)) !== null && o !== void 0 ? o : 0;
|
|
306
|
+
return pe.set(s, a + 1), Me.add(l), Ve(), function() {
|
|
308
307
|
var f;
|
|
309
308
|
qe.delete(e), Me.delete(l);
|
|
310
|
-
const u = (f =
|
|
311
|
-
if (
|
|
309
|
+
const u = (f = pe.get(s)) !== null && f !== void 0 ? f : 1;
|
|
310
|
+
if (pe.set(s, u - 1), Ve(), u === 1 && pe.delete(s), se.includes(l)) {
|
|
312
311
|
const c = se.indexOf(l);
|
|
313
312
|
c >= 0 && se.splice(c, 1), at(), i("up", !0, null);
|
|
314
313
|
}
|
|
@@ -327,7 +326,7 @@ function fr(e) {
|
|
|
327
326
|
y: r
|
|
328
327
|
}), Ve(), se.length > 0 && ($e("down", e), e.preventDefault(), Bt(t) || e.stopImmediatePropagation());
|
|
329
328
|
}
|
|
330
|
-
function
|
|
329
|
+
function je(e) {
|
|
331
330
|
const {
|
|
332
331
|
x: t,
|
|
333
332
|
y: n
|
|
@@ -344,7 +343,7 @@ function Xe(e) {
|
|
|
344
343
|
}
|
|
345
344
|
$e("move", e), at(), se.length > 0 && e.preventDefault();
|
|
346
345
|
}
|
|
347
|
-
function
|
|
346
|
+
function Xe(e) {
|
|
348
347
|
const {
|
|
349
348
|
target: t
|
|
350
349
|
} = e, {
|
|
@@ -360,7 +359,7 @@ function Ye(e) {
|
|
|
360
359
|
function Bt(e) {
|
|
361
360
|
let t = e;
|
|
362
361
|
for (; t; ) {
|
|
363
|
-
if (t.hasAttribute(
|
|
362
|
+
if (t.hasAttribute(q.resizeHandle))
|
|
364
363
|
return !0;
|
|
365
364
|
t = t.parentElement;
|
|
366
365
|
}
|
|
@@ -403,7 +402,7 @@ function lt({
|
|
|
403
402
|
}
|
|
404
403
|
});
|
|
405
404
|
}
|
|
406
|
-
function
|
|
405
|
+
function Ye(e, t) {
|
|
407
406
|
qe.set(e, t);
|
|
408
407
|
}
|
|
409
408
|
function at() {
|
|
@@ -426,16 +425,16 @@ function Ve() {
|
|
|
426
425
|
capture: !0,
|
|
427
426
|
signal: Qe.signal
|
|
428
427
|
};
|
|
429
|
-
Me.size && (Se ? (se.length > 0 &&
|
|
428
|
+
Me.size && (Se ? (se.length > 0 && pe.forEach((t, n) => {
|
|
430
429
|
const {
|
|
431
430
|
body: r
|
|
432
431
|
} = n;
|
|
433
|
-
t > 0 && (r.addEventListener("contextmenu",
|
|
434
|
-
}), window.addEventListener("pointerup",
|
|
432
|
+
t > 0 && (r.addEventListener("contextmenu", Xe, e), r.addEventListener("pointerleave", je, e), r.addEventListener("pointermove", je, e));
|
|
433
|
+
}), window.addEventListener("pointerup", Xe, e), window.addEventListener("pointercancel", Xe, e)) : pe.forEach((t, n) => {
|
|
435
434
|
const {
|
|
436
435
|
body: r
|
|
437
436
|
} = n;
|
|
438
|
-
t > 0 && (r.addEventListener("pointerdown", fr, e), r.addEventListener("pointermove",
|
|
437
|
+
t > 0 && (r.addEventListener("pointerdown", fr, e), r.addEventListener("pointermove", je, e));
|
|
439
438
|
}));
|
|
440
439
|
}
|
|
441
440
|
function $e(e, t) {
|
|
@@ -447,28 +446,28 @@ function $e(e, t) {
|
|
|
447
446
|
});
|
|
448
447
|
}
|
|
449
448
|
function pr() {
|
|
450
|
-
const [e, t] =
|
|
451
|
-
return
|
|
449
|
+
const [e, t] = de(0);
|
|
450
|
+
return G(() => t((n) => n + 1), []);
|
|
452
451
|
}
|
|
453
452
|
function I(e, t) {
|
|
454
453
|
if (!e)
|
|
455
454
|
throw console.error(t), Error(t);
|
|
456
455
|
}
|
|
457
|
-
function
|
|
456
|
+
function he(e, t, n = it) {
|
|
458
457
|
return e.toFixed(n) === t.toFixed(n) ? 0 : e > t ? 1 : -1;
|
|
459
458
|
}
|
|
460
|
-
function
|
|
461
|
-
return
|
|
459
|
+
function ae(e, t, n = it) {
|
|
460
|
+
return he(e, t, n) === 0;
|
|
462
461
|
}
|
|
463
|
-
function
|
|
464
|
-
return
|
|
462
|
+
function ee(e, t, n) {
|
|
463
|
+
return he(e, t, n) === 0;
|
|
465
464
|
}
|
|
466
465
|
function mr(e, t, n) {
|
|
467
466
|
if (e.length !== t.length)
|
|
468
467
|
return !1;
|
|
469
468
|
for (let r = 0; r < e.length; r++) {
|
|
470
469
|
const i = e[r], o = t[r];
|
|
471
|
-
if (!
|
|
470
|
+
if (!ee(i, o, n))
|
|
472
471
|
return !1;
|
|
473
472
|
}
|
|
474
473
|
return !0;
|
|
@@ -486,10 +485,10 @@ function be({
|
|
|
486
485
|
maxSize: s = 100,
|
|
487
486
|
minSize: l = 0
|
|
488
487
|
} = r;
|
|
489
|
-
if (
|
|
488
|
+
if (he(n, l) < 0)
|
|
490
489
|
if (o) {
|
|
491
490
|
const a = (i + l) / 2;
|
|
492
|
-
|
|
491
|
+
he(n, a) < 0 ? n = i : n = l;
|
|
493
492
|
} else
|
|
494
493
|
n = l;
|
|
495
494
|
return n = Math.min(s, n), n = parseFloat(n.toFixed(it)), n;
|
|
@@ -502,7 +501,7 @@ function De({
|
|
|
502
501
|
prevLayout: i,
|
|
503
502
|
trigger: o
|
|
504
503
|
}) {
|
|
505
|
-
if (
|
|
504
|
+
if (ee(e, 0))
|
|
506
505
|
return t;
|
|
507
506
|
const s = [...t], [l, a] = r;
|
|
508
507
|
I(l != null, "Invalid first pivot index"), I(a != null, "Invalid second pivot index");
|
|
@@ -517,10 +516,10 @@ function De({
|
|
|
517
516
|
minSize: g = 0
|
|
518
517
|
} = c;
|
|
519
518
|
if (p) {
|
|
520
|
-
const
|
|
521
|
-
if (I(
|
|
522
|
-
const h = g -
|
|
523
|
-
|
|
519
|
+
const y = t[u];
|
|
520
|
+
if (I(y != null, `Previous layout not found for panel index ${u}`), ee(y, m)) {
|
|
521
|
+
const h = g - y;
|
|
522
|
+
he(h, Math.abs(e)) > 0 && (e = e < 0 ? 0 - h : h);
|
|
524
523
|
}
|
|
525
524
|
}
|
|
526
525
|
}
|
|
@@ -533,10 +532,10 @@ function De({
|
|
|
533
532
|
minSize: g = 0
|
|
534
533
|
} = c;
|
|
535
534
|
if (p) {
|
|
536
|
-
const
|
|
537
|
-
if (I(
|
|
538
|
-
const h =
|
|
539
|
-
|
|
535
|
+
const y = t[u];
|
|
536
|
+
if (I(y != null, `Previous layout not found for panel index ${u}`), ee(y, g)) {
|
|
537
|
+
const h = y - m;
|
|
538
|
+
he(h, Math.abs(e)) > 0 && (e = e < 0 ? 0 - h : h);
|
|
540
539
|
}
|
|
541
540
|
}
|
|
542
541
|
}
|
|
@@ -563,12 +562,12 @@ function De({
|
|
|
563
562
|
for (; c >= 0 && c < n.length; ) {
|
|
564
563
|
const m = Math.abs(e) - Math.abs(d), p = t[c];
|
|
565
564
|
I(p != null, `Previous layout not found for panel index ${c}`);
|
|
566
|
-
const g = p - m,
|
|
565
|
+
const g = p - m, y = be({
|
|
567
566
|
panelConstraints: n,
|
|
568
567
|
panelIndex: c,
|
|
569
568
|
size: g
|
|
570
569
|
});
|
|
571
|
-
if (!
|
|
570
|
+
if (!ee(p, y) && (d += p - y, s[c] = y, d.toPrecision(3).localeCompare(Math.abs(e).toPrecision(3), void 0, {
|
|
572
571
|
numeric: !0
|
|
573
572
|
}) >= 0))
|
|
574
573
|
break;
|
|
@@ -585,7 +584,7 @@ function De({
|
|
|
585
584
|
panelIndex: u,
|
|
586
585
|
size: m
|
|
587
586
|
});
|
|
588
|
-
if (s[u] = p, !
|
|
587
|
+
if (s[u] = p, !ee(p, m)) {
|
|
589
588
|
let g = m - p, h = e < 0 ? a : l;
|
|
590
589
|
for (; h >= 0 && h < n.length; ) {
|
|
591
590
|
const A = s[h];
|
|
@@ -595,14 +594,14 @@ function De({
|
|
|
595
594
|
panelIndex: h,
|
|
596
595
|
size: x
|
|
597
596
|
});
|
|
598
|
-
if (
|
|
597
|
+
if (ee(A, R) || (g -= R - A, s[h] = R), ee(g, 0))
|
|
599
598
|
break;
|
|
600
599
|
e > 0 ? h-- : h++;
|
|
601
600
|
}
|
|
602
601
|
}
|
|
603
602
|
}
|
|
604
603
|
const f = s.reduce((u, c) => c + u, 0);
|
|
605
|
-
return
|
|
604
|
+
return ee(f, 100) ? s : i;
|
|
606
605
|
}
|
|
607
606
|
function gr({
|
|
608
607
|
layout: e,
|
|
@@ -628,10 +627,10 @@ function gr({
|
|
|
628
627
|
};
|
|
629
628
|
}
|
|
630
629
|
function Le(e, t = document) {
|
|
631
|
-
return Array.from(t.querySelectorAll(`[${
|
|
630
|
+
return Array.from(t.querySelectorAll(`[${q.resizeHandleId}][data-panel-group-id="${e}"]`));
|
|
632
631
|
}
|
|
633
632
|
function qt(e, t, n = document) {
|
|
634
|
-
const i = Le(e, n).findIndex((o) => o.getAttribute(
|
|
633
|
+
const i = Le(e, n).findIndex((o) => o.getAttribute(q.resizeHandleId) === t);
|
|
635
634
|
return i ?? null;
|
|
636
635
|
}
|
|
637
636
|
function Ot(e, t, n) {
|
|
@@ -646,7 +645,7 @@ function Gt(e, t = document) {
|
|
|
646
645
|
return r || null;
|
|
647
646
|
}
|
|
648
647
|
function Oe(e, t = document) {
|
|
649
|
-
const n = t.querySelector(`[${
|
|
648
|
+
const n = t.querySelector(`[${q.resizeHandleId}="${e}"]`);
|
|
650
649
|
return n || null;
|
|
651
650
|
}
|
|
652
651
|
function hr(e, t, n, r = document) {
|
|
@@ -663,9 +662,9 @@ function yr({
|
|
|
663
662
|
panelGroupElement: o,
|
|
664
663
|
setLayout: s
|
|
665
664
|
}) {
|
|
666
|
-
|
|
665
|
+
O({
|
|
667
666
|
didWarnAboutMissingResizeHandle: !1
|
|
668
|
-
}),
|
|
667
|
+
}), ge(() => {
|
|
669
668
|
if (!o)
|
|
670
669
|
return;
|
|
671
670
|
const l = Le(n, o);
|
|
@@ -689,7 +688,7 @@ function yr({
|
|
|
689
688
|
a.removeAttribute("aria-controls"), a.removeAttribute("aria-valuemax"), a.removeAttribute("aria-valuemin"), a.removeAttribute("aria-valuenow");
|
|
690
689
|
});
|
|
691
690
|
};
|
|
692
|
-
}, [n, r, i, o]),
|
|
691
|
+
}, [n, r, i, o]), ne(() => {
|
|
693
692
|
if (!o)
|
|
694
693
|
return;
|
|
695
694
|
const l = t.current;
|
|
@@ -701,13 +700,13 @@ function yr({
|
|
|
701
700
|
const f = Le(n, o);
|
|
702
701
|
I(f, `No resize handles found for group id "${n}"`);
|
|
703
702
|
const u = f.map((c) => {
|
|
704
|
-
const m = c.getAttribute(
|
|
703
|
+
const m = c.getAttribute(q.resizeHandleId);
|
|
705
704
|
I(m, "Resize handle element has no handle id attribute");
|
|
706
705
|
const [p, g] = hr(n, m, a, o);
|
|
707
706
|
if (p == null || g == null)
|
|
708
707
|
return () => {
|
|
709
708
|
};
|
|
710
|
-
const
|
|
709
|
+
const y = (h) => {
|
|
711
710
|
if (!h.defaultPrevented)
|
|
712
711
|
switch (h.key) {
|
|
713
712
|
case "Enter": {
|
|
@@ -718,14 +717,14 @@ function yr({
|
|
|
718
717
|
I(x, `No panel data found for index ${A}`);
|
|
719
718
|
const R = r[A], {
|
|
720
719
|
collapsedSize: D = 0,
|
|
721
|
-
collapsible:
|
|
722
|
-
minSize:
|
|
720
|
+
collapsible: L,
|
|
721
|
+
minSize: C = 0
|
|
723
722
|
} = x.constraints;
|
|
724
|
-
if (R != null &&
|
|
723
|
+
if (R != null && L) {
|
|
725
724
|
const X = De({
|
|
726
|
-
delta:
|
|
725
|
+
delta: ee(R, D) ? C - D : D - R,
|
|
727
726
|
initialLayout: r,
|
|
728
|
-
panelConstraints: a.map((
|
|
727
|
+
panelConstraints: a.map((J) => J.constraints),
|
|
729
728
|
pivotIndices: Ot(n, m, o),
|
|
730
729
|
prevLayout: r,
|
|
731
730
|
trigger: "keyboard"
|
|
@@ -737,8 +736,8 @@ function yr({
|
|
|
737
736
|
}
|
|
738
737
|
}
|
|
739
738
|
};
|
|
740
|
-
return c.addEventListener("keydown",
|
|
741
|
-
c.removeEventListener("keydown",
|
|
739
|
+
return c.addEventListener("keydown", y), () => {
|
|
740
|
+
c.removeEventListener("keydown", y);
|
|
742
741
|
};
|
|
743
742
|
});
|
|
744
743
|
return () => {
|
|
@@ -764,7 +763,7 @@ function Ut(e, t) {
|
|
|
764
763
|
function vr(e, t, n, r, i) {
|
|
765
764
|
const o = n === "horizontal", s = Oe(t, i);
|
|
766
765
|
I(s, `No resize handle element found for id "${t}"`);
|
|
767
|
-
const l = s.getAttribute(
|
|
766
|
+
const l = s.getAttribute(q.groupId);
|
|
768
767
|
I(l, "Resize handle element has no group id attribute");
|
|
769
768
|
let {
|
|
770
769
|
initialCursorPosition: a
|
|
@@ -849,7 +848,7 @@ function ye(e, t, n) {
|
|
|
849
848
|
onExpand: m,
|
|
850
849
|
onResize: p
|
|
851
850
|
} = s;
|
|
852
|
-
p && p(r, u), f && (c || m) && (m && (u == null ||
|
|
851
|
+
p && p(r, u), f && (c || m) && (m && (u == null || ae(u, d)) && !ae(r, d) && m(), c && (u == null || !ae(u, d)) && ae(r, d) && c());
|
|
853
852
|
}
|
|
854
853
|
});
|
|
855
854
|
}
|
|
@@ -906,7 +905,7 @@ function vt(e) {
|
|
|
906
905
|
function Wt(e) {
|
|
907
906
|
return `react-resizable-panels:${e}`;
|
|
908
907
|
}
|
|
909
|
-
function
|
|
908
|
+
function jt(e) {
|
|
910
909
|
return e.map((t) => {
|
|
911
910
|
const {
|
|
912
911
|
constraints: n,
|
|
@@ -917,7 +916,7 @@ function Xt(e) {
|
|
|
917
916
|
return i ? r : o ? `${o}:${JSON.stringify(n)}` : JSON.stringify(n);
|
|
918
917
|
}).sort((t, n) => t.localeCompare(n)).join(",");
|
|
919
918
|
}
|
|
920
|
-
function
|
|
919
|
+
function Xt(e, t) {
|
|
921
920
|
try {
|
|
922
921
|
const n = Wt(e), r = t.getItem(n);
|
|
923
922
|
if (r) {
|
|
@@ -931,12 +930,12 @@ function Yt(e, t) {
|
|
|
931
930
|
}
|
|
932
931
|
function Pr(e, t, n) {
|
|
933
932
|
var r, i;
|
|
934
|
-
const o = (r =
|
|
933
|
+
const o = (r = Xt(e, n)) !== null && r !== void 0 ? r : {}, s = jt(t);
|
|
935
934
|
return (i = o[s]) !== null && i !== void 0 ? i : null;
|
|
936
935
|
}
|
|
937
936
|
function wr(e, t, n, r, i) {
|
|
938
937
|
var o;
|
|
939
|
-
const s = Wt(e), l =
|
|
938
|
+
const s = Wt(e), l = jt(t), a = (o = Xt(e, i)) !== null && o !== void 0 ? o : {};
|
|
940
939
|
a[l] = {
|
|
941
940
|
expandToSizes: Object.fromEntries(n.entries()),
|
|
942
941
|
layout: r
|
|
@@ -954,7 +953,7 @@ function bt({
|
|
|
954
953
|
const n = [...e], r = n.reduce((o, s) => o + s, 0);
|
|
955
954
|
if (n.length !== t.length)
|
|
956
955
|
throw Error(`Invalid ${t.length} panel layout: ${n.map((o) => `${o}%`).join(", ")}`);
|
|
957
|
-
if (!
|
|
956
|
+
if (!ee(r, 100) && n.length > 0)
|
|
958
957
|
for (let o = 0; o < t.length; o++) {
|
|
959
958
|
const s = n[o];
|
|
960
959
|
I(s != null, `No layout data found for index ${o}`);
|
|
@@ -972,7 +971,7 @@ function bt({
|
|
|
972
971
|
});
|
|
973
972
|
s != l && (i += s - l, n[o] = l);
|
|
974
973
|
}
|
|
975
|
-
if (!
|
|
974
|
+
if (!ee(i, 0))
|
|
976
975
|
for (let o = 0; o < t.length; o++) {
|
|
977
976
|
const s = n[o];
|
|
978
977
|
I(s != null, `No layout data found for index ${o}`);
|
|
@@ -981,7 +980,7 @@ function bt({
|
|
|
981
980
|
panelIndex: o,
|
|
982
981
|
size: l
|
|
983
982
|
});
|
|
984
|
-
if (s !== a && (i -= a - s, n[o] = a,
|
|
983
|
+
if (s !== a && (i -= a - s, n[o] = a, ee(i, 0)))
|
|
985
984
|
break;
|
|
986
985
|
}
|
|
987
986
|
return n;
|
|
@@ -992,7 +991,7 @@ const Cr = 100, Ae = {
|
|
|
992
991
|
vt(Ae), Ae.setItem(e, t);
|
|
993
992
|
}
|
|
994
993
|
}, St = {};
|
|
995
|
-
function
|
|
994
|
+
function Yt({
|
|
996
995
|
autoSaveId: e = null,
|
|
997
996
|
children: t,
|
|
998
997
|
className: n = "",
|
|
@@ -1006,7 +1005,7 @@ function jt({
|
|
|
1006
1005
|
tagName: f = "div",
|
|
1007
1006
|
...u
|
|
1008
1007
|
}) {
|
|
1009
|
-
const c = st(o), m =
|
|
1008
|
+
const c = st(o), m = O(null), [p, g] = de(null), [y, h] = de([]), A = pr(), x = O({}), R = O(/* @__PURE__ */ new Map()), D = O(0), L = O({
|
|
1010
1009
|
autoSaveId: e,
|
|
1011
1010
|
direction: r,
|
|
1012
1011
|
dragState: p,
|
|
@@ -1014,212 +1013,212 @@ function jt({
|
|
|
1014
1013
|
keyboardResizeBy: l,
|
|
1015
1014
|
onLayout: s,
|
|
1016
1015
|
storage: a
|
|
1017
|
-
}),
|
|
1018
|
-
layout:
|
|
1016
|
+
}), C = O({
|
|
1017
|
+
layout: y,
|
|
1019
1018
|
panelDataArray: [],
|
|
1020
1019
|
panelDataArrayChanged: !1
|
|
1021
1020
|
});
|
|
1022
|
-
|
|
1021
|
+
O({
|
|
1023
1022
|
didLogIdAndOrderWarning: !1,
|
|
1024
1023
|
didLogPanelConstraintsWarning: !1,
|
|
1025
1024
|
prevPanelIds: []
|
|
1026
1025
|
}), zt(i, () => ({
|
|
1027
|
-
getId: () =>
|
|
1026
|
+
getId: () => L.current.id,
|
|
1028
1027
|
getLayout: () => {
|
|
1029
1028
|
const {
|
|
1030
|
-
layout:
|
|
1031
|
-
} =
|
|
1032
|
-
return
|
|
1029
|
+
layout: v
|
|
1030
|
+
} = C.current;
|
|
1031
|
+
return v;
|
|
1033
1032
|
},
|
|
1034
|
-
setLayout: (
|
|
1033
|
+
setLayout: (v) => {
|
|
1035
1034
|
const {
|
|
1036
1035
|
onLayout: P
|
|
1037
|
-
} =
|
|
1036
|
+
} = L.current, {
|
|
1038
1037
|
layout: E,
|
|
1039
1038
|
panelDataArray: z
|
|
1040
|
-
} =
|
|
1041
|
-
layout:
|
|
1042
|
-
panelConstraints: z.map((
|
|
1039
|
+
} = C.current, b = bt({
|
|
1040
|
+
layout: v,
|
|
1041
|
+
panelConstraints: z.map((w) => w.constraints)
|
|
1043
1042
|
});
|
|
1044
|
-
yt(E,
|
|
1043
|
+
yt(E, b) || (h(b), C.current.layout = b, P && P(b), ye(z, b, x.current));
|
|
1045
1044
|
}
|
|
1046
|
-
}), []),
|
|
1047
|
-
|
|
1045
|
+
}), []), ge(() => {
|
|
1046
|
+
L.current.autoSaveId = e, L.current.direction = r, L.current.dragState = p, L.current.id = c, L.current.onLayout = s, L.current.storage = a;
|
|
1048
1047
|
}), yr({
|
|
1049
|
-
committedValuesRef:
|
|
1050
|
-
eagerValuesRef:
|
|
1048
|
+
committedValuesRef: L,
|
|
1049
|
+
eagerValuesRef: C,
|
|
1051
1050
|
groupId: c,
|
|
1052
|
-
layout:
|
|
1053
|
-
panelDataArray:
|
|
1051
|
+
layout: y,
|
|
1052
|
+
panelDataArray: C.current.panelDataArray,
|
|
1054
1053
|
setLayout: h,
|
|
1055
1054
|
panelGroupElement: m.current
|
|
1056
|
-
}),
|
|
1055
|
+
}), ne(() => {
|
|
1057
1056
|
const {
|
|
1058
|
-
panelDataArray:
|
|
1059
|
-
} =
|
|
1057
|
+
panelDataArray: v
|
|
1058
|
+
} = C.current;
|
|
1060
1059
|
if (e) {
|
|
1061
|
-
if (
|
|
1060
|
+
if (y.length === 0 || y.length !== v.length)
|
|
1062
1061
|
return;
|
|
1063
1062
|
let P = St[e];
|
|
1064
1063
|
P == null && (P = zr(wr, Cr), St[e] = P);
|
|
1065
|
-
const E = [...
|
|
1066
|
-
P(e, E, z,
|
|
1064
|
+
const E = [...v], z = new Map(R.current);
|
|
1065
|
+
P(e, E, z, y, a);
|
|
1067
1066
|
}
|
|
1068
|
-
}, [e,
|
|
1067
|
+
}, [e, y, a]), ne(() => {
|
|
1069
1068
|
});
|
|
1070
|
-
const X =
|
|
1069
|
+
const X = G((v) => {
|
|
1071
1070
|
const {
|
|
1072
1071
|
onLayout: P
|
|
1073
|
-
} =
|
|
1072
|
+
} = L.current, {
|
|
1074
1073
|
layout: E,
|
|
1075
1074
|
panelDataArray: z
|
|
1076
|
-
} =
|
|
1077
|
-
if (
|
|
1078
|
-
const
|
|
1079
|
-
collapsedSize:
|
|
1080
|
-
panelSize:
|
|
1081
|
-
pivotIndices:
|
|
1082
|
-
} =
|
|
1083
|
-
if (I(
|
|
1084
|
-
R.current.set(
|
|
1085
|
-
const
|
|
1086
|
-
delta:
|
|
1075
|
+
} = C.current;
|
|
1076
|
+
if (v.constraints.collapsible) {
|
|
1077
|
+
const b = z.map((H) => H.constraints), {
|
|
1078
|
+
collapsedSize: w = 0,
|
|
1079
|
+
panelSize: k,
|
|
1080
|
+
pivotIndices: S
|
|
1081
|
+
} = fe(z, v, E);
|
|
1082
|
+
if (I(k != null, `Panel size not found for panel "${v.id}"`), !ae(k, w)) {
|
|
1083
|
+
R.current.set(v.id, k);
|
|
1084
|
+
const Q = ve(z, v) === z.length - 1 ? k - w : w - k, V = De({
|
|
1085
|
+
delta: Q,
|
|
1087
1086
|
initialLayout: E,
|
|
1088
|
-
panelConstraints:
|
|
1089
|
-
pivotIndices:
|
|
1087
|
+
panelConstraints: b,
|
|
1088
|
+
pivotIndices: S,
|
|
1090
1089
|
prevLayout: E,
|
|
1091
1090
|
trigger: "imperative-api"
|
|
1092
1091
|
});
|
|
1093
|
-
ke(E,
|
|
1092
|
+
ke(E, V) || (h(V), C.current.layout = V, P && P(V), ye(z, V, x.current));
|
|
1094
1093
|
}
|
|
1095
1094
|
}
|
|
1096
|
-
}, []),
|
|
1095
|
+
}, []), J = G((v, P) => {
|
|
1097
1096
|
const {
|
|
1098
1097
|
onLayout: E
|
|
1099
|
-
} =
|
|
1098
|
+
} = L.current, {
|
|
1100
1099
|
layout: z,
|
|
1101
|
-
panelDataArray:
|
|
1102
|
-
} =
|
|
1103
|
-
if (
|
|
1104
|
-
const
|
|
1105
|
-
collapsedSize:
|
|
1106
|
-
panelSize:
|
|
1107
|
-
minSize:
|
|
1108
|
-
pivotIndices:
|
|
1109
|
-
} =
|
|
1110
|
-
if (
|
|
1111
|
-
const oe = R.current.get(
|
|
1100
|
+
panelDataArray: b
|
|
1101
|
+
} = C.current;
|
|
1102
|
+
if (v.constraints.collapsible) {
|
|
1103
|
+
const w = b.map((oe) => oe.constraints), {
|
|
1104
|
+
collapsedSize: k = 0,
|
|
1105
|
+
panelSize: S = 0,
|
|
1106
|
+
minSize: H = 0,
|
|
1107
|
+
pivotIndices: Q
|
|
1108
|
+
} = fe(b, v, z), V = P ?? H;
|
|
1109
|
+
if (ae(S, k)) {
|
|
1110
|
+
const oe = R.current.get(v.id), Ee = oe != null && oe >= V ? oe : V, Ue = ve(b, v) === b.length - 1 ? S - Ee : Ee - S, Z = De({
|
|
1112
1111
|
delta: Ue,
|
|
1113
1112
|
initialLayout: z,
|
|
1114
|
-
panelConstraints:
|
|
1115
|
-
pivotIndices:
|
|
1113
|
+
panelConstraints: w,
|
|
1114
|
+
pivotIndices: Q,
|
|
1116
1115
|
prevLayout: z,
|
|
1117
1116
|
trigger: "imperative-api"
|
|
1118
1117
|
});
|
|
1119
|
-
ke(z, Z) || (h(Z),
|
|
1118
|
+
ke(z, Z) || (h(Z), C.current.layout = Z, E && E(Z), ye(b, Z, x.current));
|
|
1120
1119
|
}
|
|
1121
1120
|
}
|
|
1122
|
-
}, []),
|
|
1121
|
+
}, []), K = G((v) => {
|
|
1123
1122
|
const {
|
|
1124
1123
|
layout: P,
|
|
1125
1124
|
panelDataArray: E
|
|
1126
|
-
} =
|
|
1125
|
+
} = C.current, {
|
|
1127
1126
|
panelSize: z
|
|
1128
|
-
} =
|
|
1129
|
-
return I(z != null, `Panel size not found for panel "${
|
|
1130
|
-
}, []),
|
|
1127
|
+
} = fe(E, v, P);
|
|
1128
|
+
return I(z != null, `Panel size not found for panel "${v.id}"`), z;
|
|
1129
|
+
}, []), M = G((v, P) => {
|
|
1131
1130
|
const {
|
|
1132
1131
|
panelDataArray: E
|
|
1133
|
-
} =
|
|
1132
|
+
} = C.current, z = ve(E, v);
|
|
1134
1133
|
return xr({
|
|
1135
1134
|
defaultSize: P,
|
|
1136
1135
|
dragState: p,
|
|
1137
|
-
layout:
|
|
1136
|
+
layout: y,
|
|
1138
1137
|
panelData: E,
|
|
1139
1138
|
panelIndex: z
|
|
1140
1139
|
});
|
|
1141
|
-
}, [p,
|
|
1140
|
+
}, [p, y]), _ = G((v) => {
|
|
1142
1141
|
const {
|
|
1143
1142
|
layout: P,
|
|
1144
1143
|
panelDataArray: E
|
|
1145
|
-
} =
|
|
1144
|
+
} = C.current, {
|
|
1146
1145
|
collapsedSize: z = 0,
|
|
1147
|
-
collapsible:
|
|
1148
|
-
panelSize:
|
|
1149
|
-
} =
|
|
1150
|
-
return I(
|
|
1151
|
-
}, []), U =
|
|
1146
|
+
collapsible: b,
|
|
1147
|
+
panelSize: w
|
|
1148
|
+
} = fe(E, v, P);
|
|
1149
|
+
return I(w != null, `Panel size not found for panel "${v.id}"`), b === !0 && ae(w, z);
|
|
1150
|
+
}, []), U = G((v) => {
|
|
1152
1151
|
const {
|
|
1153
1152
|
layout: P,
|
|
1154
1153
|
panelDataArray: E
|
|
1155
|
-
} =
|
|
1154
|
+
} = C.current, {
|
|
1156
1155
|
collapsedSize: z = 0,
|
|
1157
|
-
collapsible:
|
|
1158
|
-
panelSize:
|
|
1159
|
-
} =
|
|
1160
|
-
return I(
|
|
1161
|
-
}, []),
|
|
1156
|
+
collapsible: b,
|
|
1157
|
+
panelSize: w
|
|
1158
|
+
} = fe(E, v, P);
|
|
1159
|
+
return I(w != null, `Panel size not found for panel "${v.id}"`), !b || he(w, z) > 0;
|
|
1160
|
+
}, []), B = G((v) => {
|
|
1162
1161
|
const {
|
|
1163
1162
|
panelDataArray: P
|
|
1164
|
-
} =
|
|
1165
|
-
P.push(
|
|
1166
|
-
const
|
|
1167
|
-
return
|
|
1168
|
-
}),
|
|
1163
|
+
} = C.current;
|
|
1164
|
+
P.push(v), P.sort((E, z) => {
|
|
1165
|
+
const b = E.order, w = z.order;
|
|
1166
|
+
return b == null && w == null ? 0 : b == null ? -1 : w == null ? 1 : b - w;
|
|
1167
|
+
}), C.current.panelDataArrayChanged = !0, A();
|
|
1169
1168
|
}, [A]);
|
|
1170
|
-
|
|
1171
|
-
if (
|
|
1172
|
-
|
|
1169
|
+
ge(() => {
|
|
1170
|
+
if (C.current.panelDataArrayChanged) {
|
|
1171
|
+
C.current.panelDataArrayChanged = !1;
|
|
1173
1172
|
const {
|
|
1174
|
-
autoSaveId:
|
|
1173
|
+
autoSaveId: v,
|
|
1175
1174
|
onLayout: P,
|
|
1176
1175
|
storage: E
|
|
1177
|
-
} =
|
|
1176
|
+
} = L.current, {
|
|
1178
1177
|
layout: z,
|
|
1179
|
-
panelDataArray:
|
|
1180
|
-
} =
|
|
1181
|
-
let
|
|
1182
|
-
if (
|
|
1183
|
-
const
|
|
1184
|
-
|
|
1178
|
+
panelDataArray: b
|
|
1179
|
+
} = C.current;
|
|
1180
|
+
let w = null;
|
|
1181
|
+
if (v) {
|
|
1182
|
+
const S = Pr(v, b, E);
|
|
1183
|
+
S && (R.current = new Map(Object.entries(S.expandToSizes)), w = S.layout);
|
|
1185
1184
|
}
|
|
1186
|
-
|
|
1187
|
-
panelDataArray:
|
|
1185
|
+
w == null && (w = Sr({
|
|
1186
|
+
panelDataArray: b
|
|
1188
1187
|
}));
|
|
1189
|
-
const
|
|
1190
|
-
layout:
|
|
1191
|
-
panelConstraints:
|
|
1188
|
+
const k = bt({
|
|
1189
|
+
layout: w,
|
|
1190
|
+
panelConstraints: b.map((S) => S.constraints)
|
|
1192
1191
|
});
|
|
1193
|
-
yt(z,
|
|
1192
|
+
yt(z, k) || (h(k), C.current.layout = k, P && P(k), ye(b, k, x.current));
|
|
1194
1193
|
}
|
|
1195
|
-
}),
|
|
1196
|
-
const
|
|
1194
|
+
}), ge(() => {
|
|
1195
|
+
const v = C.current;
|
|
1197
1196
|
return () => {
|
|
1198
|
-
|
|
1197
|
+
v.layout = [];
|
|
1199
1198
|
};
|
|
1200
1199
|
}, []);
|
|
1201
|
-
const
|
|
1200
|
+
const $ = G((v) => {
|
|
1202
1201
|
let P = !1;
|
|
1203
1202
|
const E = m.current;
|
|
1204
|
-
return E && window.getComputedStyle(E, null).getPropertyValue("direction") === "rtl" && (P = !0), function(
|
|
1205
|
-
|
|
1206
|
-
const
|
|
1207
|
-
if (!
|
|
1203
|
+
return E && window.getComputedStyle(E, null).getPropertyValue("direction") === "rtl" && (P = !0), function(b) {
|
|
1204
|
+
b.preventDefault();
|
|
1205
|
+
const w = m.current;
|
|
1206
|
+
if (!w)
|
|
1208
1207
|
return () => null;
|
|
1209
1208
|
const {
|
|
1210
|
-
direction:
|
|
1211
|
-
dragState:
|
|
1212
|
-
id:
|
|
1213
|
-
keyboardResizeBy:
|
|
1214
|
-
onLayout:
|
|
1215
|
-
} =
|
|
1209
|
+
direction: k,
|
|
1210
|
+
dragState: S,
|
|
1211
|
+
id: H,
|
|
1212
|
+
keyboardResizeBy: Q,
|
|
1213
|
+
onLayout: V
|
|
1214
|
+
} = L.current, {
|
|
1216
1215
|
layout: oe,
|
|
1217
1216
|
panelDataArray: Ee
|
|
1218
|
-
} =
|
|
1217
|
+
} = C.current, {
|
|
1219
1218
|
initialLayout: _e
|
|
1220
|
-
} =
|
|
1221
|
-
let Z = br(
|
|
1222
|
-
const ut =
|
|
1219
|
+
} = S ?? {}, Ue = Ot(H, v, w);
|
|
1220
|
+
let Z = br(b, v, k, S, Q, w);
|
|
1221
|
+
const ut = k === "horizontal";
|
|
1223
1222
|
ut && P && (Z = -Z);
|
|
1224
1223
|
const Sn = Ee.map((xn) => xn.constraints), Ie = De({
|
|
1225
1224
|
delta: Z,
|
|
@@ -1227,89 +1226,89 @@ function jt({
|
|
|
1227
1226
|
panelConstraints: Sn,
|
|
1228
1227
|
pivotIndices: Ue,
|
|
1229
1228
|
prevLayout: oe,
|
|
1230
|
-
trigger: _t(
|
|
1229
|
+
trigger: _t(b) ? "keyboard" : "mouse-or-touch"
|
|
1231
1230
|
}), dt = !ke(oe, Ie);
|
|
1232
|
-
(kt(
|
|
1231
|
+
(kt(b) || Tt(b)) && D.current != Z && (D.current = Z, !dt && Z !== 0 ? ut ? Ye(v, Z < 0 ? Vt : $t) : Ye(v, Z < 0 ? Ft : Kt) : Ye(v, 0)), dt && (h(Ie), C.current.layout = Ie, V && V(Ie), ye(Ee, Ie, x.current));
|
|
1233
1232
|
};
|
|
1234
|
-
}, []),
|
|
1233
|
+
}, []), F = G((v, P) => {
|
|
1235
1234
|
const {
|
|
1236
1235
|
onLayout: E
|
|
1237
|
-
} =
|
|
1236
|
+
} = L.current, {
|
|
1238
1237
|
layout: z,
|
|
1239
|
-
panelDataArray:
|
|
1240
|
-
} =
|
|
1241
|
-
panelSize:
|
|
1242
|
-
pivotIndices:
|
|
1243
|
-
} =
|
|
1244
|
-
I(
|
|
1245
|
-
const
|
|
1246
|
-
delta:
|
|
1238
|
+
panelDataArray: b
|
|
1239
|
+
} = C.current, w = b.map((oe) => oe.constraints), {
|
|
1240
|
+
panelSize: k,
|
|
1241
|
+
pivotIndices: S
|
|
1242
|
+
} = fe(b, v, z);
|
|
1243
|
+
I(k != null, `Panel size not found for panel "${v.id}"`);
|
|
1244
|
+
const Q = ve(b, v) === b.length - 1 ? k - P : P - k, V = De({
|
|
1245
|
+
delta: Q,
|
|
1247
1246
|
initialLayout: z,
|
|
1248
|
-
panelConstraints:
|
|
1249
|
-
pivotIndices:
|
|
1247
|
+
panelConstraints: w,
|
|
1248
|
+
pivotIndices: S,
|
|
1250
1249
|
prevLayout: z,
|
|
1251
1250
|
trigger: "imperative-api"
|
|
1252
1251
|
});
|
|
1253
|
-
ke(z,
|
|
1254
|
-
}, []), Y =
|
|
1252
|
+
ke(z, V) || (h(V), C.current.layout = V, E && E(V), ye(b, V, x.current));
|
|
1253
|
+
}, []), Y = G((v, P) => {
|
|
1255
1254
|
const {
|
|
1256
1255
|
layout: E,
|
|
1257
1256
|
panelDataArray: z
|
|
1258
|
-
} =
|
|
1259
|
-
collapsedSize:
|
|
1260
|
-
collapsible:
|
|
1257
|
+
} = C.current, {
|
|
1258
|
+
collapsedSize: b = 0,
|
|
1259
|
+
collapsible: w
|
|
1261
1260
|
} = P, {
|
|
1262
|
-
collapsedSize:
|
|
1263
|
-
collapsible:
|
|
1264
|
-
maxSize:
|
|
1265
|
-
minSize:
|
|
1266
|
-
} =
|
|
1267
|
-
panelSize:
|
|
1268
|
-
} =
|
|
1269
|
-
|
|
1270
|
-
}, [
|
|
1261
|
+
collapsedSize: k = 0,
|
|
1262
|
+
collapsible: S,
|
|
1263
|
+
maxSize: H = 100,
|
|
1264
|
+
minSize: Q = 0
|
|
1265
|
+
} = v.constraints, {
|
|
1266
|
+
panelSize: V
|
|
1267
|
+
} = fe(z, v, E);
|
|
1268
|
+
V != null && (w && S && ae(V, b) ? ae(b, k) || F(v, k) : V < Q ? F(v, Q) : V > H && F(v, H));
|
|
1269
|
+
}, [F]), j = G((v, P) => {
|
|
1271
1270
|
const {
|
|
1272
1271
|
direction: E
|
|
1273
|
-
} =
|
|
1272
|
+
} = L.current, {
|
|
1274
1273
|
layout: z
|
|
1275
|
-
} =
|
|
1274
|
+
} = C.current;
|
|
1276
1275
|
if (!m.current)
|
|
1277
1276
|
return;
|
|
1278
|
-
const
|
|
1279
|
-
I(
|
|
1280
|
-
const
|
|
1277
|
+
const b = Oe(v, m.current);
|
|
1278
|
+
I(b, `Drag handle element not found for id "${v}"`);
|
|
1279
|
+
const w = Ut(E, P);
|
|
1281
1280
|
g({
|
|
1282
|
-
dragHandleId:
|
|
1283
|
-
dragHandleRect:
|
|
1284
|
-
initialCursorPosition:
|
|
1281
|
+
dragHandleId: v,
|
|
1282
|
+
dragHandleRect: b.getBoundingClientRect(),
|
|
1283
|
+
initialCursorPosition: w,
|
|
1285
1284
|
initialLayout: z
|
|
1286
1285
|
});
|
|
1287
|
-
}, []),
|
|
1286
|
+
}, []), te = G(() => {
|
|
1288
1287
|
g(null);
|
|
1289
|
-
}, []),
|
|
1288
|
+
}, []), ce = G((v) => {
|
|
1290
1289
|
const {
|
|
1291
1290
|
panelDataArray: P
|
|
1292
|
-
} =
|
|
1293
|
-
E >= 0 && (P.splice(E, 1), delete x.current[
|
|
1294
|
-
}, [A]),
|
|
1291
|
+
} = C.current, E = ve(P, v);
|
|
1292
|
+
E >= 0 && (P.splice(E, 1), delete x.current[v.id], C.current.panelDataArrayChanged = !0, A());
|
|
1293
|
+
}, [A]), le = W(() => ({
|
|
1295
1294
|
collapsePanel: X,
|
|
1296
1295
|
direction: r,
|
|
1297
1296
|
dragState: p,
|
|
1298
|
-
expandPanel:
|
|
1299
|
-
getPanelSize:
|
|
1300
|
-
getPanelStyle:
|
|
1297
|
+
expandPanel: J,
|
|
1298
|
+
getPanelSize: K,
|
|
1299
|
+
getPanelStyle: M,
|
|
1301
1300
|
groupId: c,
|
|
1302
|
-
isPanelCollapsed:
|
|
1301
|
+
isPanelCollapsed: _,
|
|
1303
1302
|
isPanelExpanded: U,
|
|
1304
1303
|
reevaluatePanelConstraints: Y,
|
|
1305
|
-
registerPanel:
|
|
1306
|
-
registerResizeHandle:
|
|
1307
|
-
resizePanel:
|
|
1308
|
-
startDragging:
|
|
1309
|
-
stopDragging:
|
|
1310
|
-
unregisterPanel:
|
|
1304
|
+
registerPanel: B,
|
|
1305
|
+
registerResizeHandle: $,
|
|
1306
|
+
resizePanel: F,
|
|
1307
|
+
startDragging: j,
|
|
1308
|
+
stopDragging: te,
|
|
1309
|
+
unregisterPanel: ce,
|
|
1311
1310
|
panelGroupElement: m.current
|
|
1312
|
-
}), [X, p, r,
|
|
1311
|
+
}), [X, p, r, J, K, M, c, _, U, Y, B, $, F, j, te, ce]), re = {
|
|
1313
1312
|
display: "flex",
|
|
1314
1313
|
flexDirection: r === "horizontal" ? "row" : "column",
|
|
1315
1314
|
height: "100%",
|
|
@@ -1317,7 +1316,7 @@ function jt({
|
|
|
1317
1316
|
width: "100%"
|
|
1318
1317
|
};
|
|
1319
1318
|
return xe(Ke.Provider, {
|
|
1320
|
-
value:
|
|
1319
|
+
value: le
|
|
1321
1320
|
}, xe(f, {
|
|
1322
1321
|
...u,
|
|
1323
1322
|
children: t,
|
|
@@ -1325,25 +1324,25 @@ function jt({
|
|
|
1325
1324
|
id: o,
|
|
1326
1325
|
ref: m,
|
|
1327
1326
|
style: {
|
|
1328
|
-
...
|
|
1327
|
+
...re,
|
|
1329
1328
|
...d
|
|
1330
1329
|
},
|
|
1331
1330
|
// CSS selectors
|
|
1332
|
-
[
|
|
1333
|
-
[
|
|
1334
|
-
[
|
|
1331
|
+
[q.group]: "",
|
|
1332
|
+
[q.groupDirection]: r,
|
|
1333
|
+
[q.groupId]: c
|
|
1335
1334
|
}));
|
|
1336
1335
|
}
|
|
1337
|
-
const Er = Fe((e, t) => xe(
|
|
1336
|
+
const Er = Fe((e, t) => xe(Yt, {
|
|
1338
1337
|
...e,
|
|
1339
1338
|
forwardedRef: t
|
|
1340
1339
|
}));
|
|
1341
|
-
|
|
1340
|
+
Yt.displayName = "PanelGroup";
|
|
1342
1341
|
Er.displayName = "forwardRef(PanelGroup)";
|
|
1343
1342
|
function ve(e, t) {
|
|
1344
1343
|
return e.findIndex((n) => n === t || n.id === t.id);
|
|
1345
1344
|
}
|
|
1346
|
-
function
|
|
1345
|
+
function fe(e, t, n) {
|
|
1347
1346
|
const r = ve(e, t), o = r === e.length - 1 ? [r - 1, r] : [r, r + 1], s = n[r];
|
|
1348
1347
|
return {
|
|
1349
1348
|
...t.constraints,
|
|
@@ -1357,7 +1356,7 @@ function Ir({
|
|
|
1357
1356
|
resizeHandler: n,
|
|
1358
1357
|
panelGroupElement: r
|
|
1359
1358
|
}) {
|
|
1360
|
-
|
|
1359
|
+
ne(() => {
|
|
1361
1360
|
if (e || n == null || r == null)
|
|
1362
1361
|
return;
|
|
1363
1362
|
const i = Oe(t, r);
|
|
@@ -1377,7 +1376,7 @@ function Ir({
|
|
|
1377
1376
|
}
|
|
1378
1377
|
case "F6": {
|
|
1379
1378
|
s.preventDefault();
|
|
1380
|
-
const l = i.getAttribute(
|
|
1379
|
+
const l = i.getAttribute(q.groupId);
|
|
1381
1380
|
I(l, `No group element found for id "${l}"`);
|
|
1382
1381
|
const a = Le(l, r), d = qt(l, t, r);
|
|
1383
1382
|
I(d !== null, `No resize element found for id "${t}"`);
|
|
@@ -1409,14 +1408,14 @@ function Rr({
|
|
|
1409
1408
|
tagName: m = "div",
|
|
1410
1409
|
...p
|
|
1411
1410
|
}) {
|
|
1412
|
-
var g,
|
|
1413
|
-
const h =
|
|
1411
|
+
var g, y;
|
|
1412
|
+
const h = O(null), A = O({
|
|
1414
1413
|
onClick: s,
|
|
1415
1414
|
onDragging: l,
|
|
1416
1415
|
onPointerDown: d,
|
|
1417
1416
|
onPointerUp: f
|
|
1418
1417
|
});
|
|
1419
|
-
|
|
1418
|
+
ne(() => {
|
|
1420
1419
|
A.current.onClick = s, A.current.onDragging = l, A.current.onPointerDown = d, A.current.onPointerUp = f;
|
|
1421
1420
|
});
|
|
1422
1421
|
const x = rt(Ke);
|
|
@@ -1425,82 +1424,82 @@ function Rr({
|
|
|
1425
1424
|
const {
|
|
1426
1425
|
direction: R,
|
|
1427
1426
|
groupId: D,
|
|
1428
|
-
registerResizeHandle:
|
|
1429
|
-
startDragging:
|
|
1427
|
+
registerResizeHandle: L,
|
|
1428
|
+
startDragging: C,
|
|
1430
1429
|
stopDragging: X,
|
|
1431
|
-
panelGroupElement:
|
|
1432
|
-
} = x,
|
|
1433
|
-
state:
|
|
1430
|
+
panelGroupElement: J
|
|
1431
|
+
} = x, K = st(i), [M, _] = de("inactive"), [U, B] = de(!1), [$, F] = de(null), Y = O({
|
|
1432
|
+
state: M
|
|
1434
1433
|
});
|
|
1435
|
-
|
|
1436
|
-
Y.current.state =
|
|
1437
|
-
}),
|
|
1434
|
+
ge(() => {
|
|
1435
|
+
Y.current.state = M;
|
|
1436
|
+
}), ne(() => {
|
|
1438
1437
|
if (n)
|
|
1439
|
-
|
|
1438
|
+
F(null);
|
|
1440
1439
|
else {
|
|
1441
|
-
const
|
|
1442
|
-
|
|
1440
|
+
const le = L(K);
|
|
1441
|
+
F(() => le);
|
|
1443
1442
|
}
|
|
1444
|
-
}, [n,
|
|
1445
|
-
const
|
|
1446
|
-
return
|
|
1447
|
-
if (n ||
|
|
1443
|
+
}, [n, K, L]);
|
|
1444
|
+
const j = (g = r == null ? void 0 : r.coarse) !== null && g !== void 0 ? g : 15, te = (y = r == null ? void 0 : r.fine) !== null && y !== void 0 ? y : 5;
|
|
1445
|
+
return ne(() => {
|
|
1446
|
+
if (n || $ == null)
|
|
1448
1447
|
return;
|
|
1449
|
-
const
|
|
1450
|
-
I(
|
|
1451
|
-
let
|
|
1452
|
-
return dr(
|
|
1453
|
-
coarse:
|
|
1454
|
-
fine:
|
|
1448
|
+
const le = h.current;
|
|
1449
|
+
I(le, "Element ref not attached");
|
|
1450
|
+
let re = !1;
|
|
1451
|
+
return dr(K, le, R, {
|
|
1452
|
+
coarse: j,
|
|
1453
|
+
fine: te
|
|
1455
1454
|
}, (P, E, z) => {
|
|
1456
1455
|
if (!E) {
|
|
1457
|
-
|
|
1456
|
+
_("inactive");
|
|
1458
1457
|
return;
|
|
1459
1458
|
}
|
|
1460
1459
|
switch (P) {
|
|
1461
1460
|
case "down": {
|
|
1462
|
-
|
|
1461
|
+
_("drag"), re = !1, I(z, 'Expected event to be defined for "down" action'), C(K, z);
|
|
1463
1462
|
const {
|
|
1464
|
-
onDragging:
|
|
1465
|
-
onPointerDown:
|
|
1463
|
+
onDragging: b,
|
|
1464
|
+
onPointerDown: w
|
|
1466
1465
|
} = A.current;
|
|
1467
|
-
|
|
1466
|
+
b == null || b(!0), w == null || w();
|
|
1468
1467
|
break;
|
|
1469
1468
|
}
|
|
1470
1469
|
case "move": {
|
|
1471
1470
|
const {
|
|
1472
|
-
state:
|
|
1471
|
+
state: b
|
|
1473
1472
|
} = Y.current;
|
|
1474
|
-
|
|
1473
|
+
re = !0, b !== "drag" && _("hover"), I(z, 'Expected event to be defined for "move" action'), $(z);
|
|
1475
1474
|
break;
|
|
1476
1475
|
}
|
|
1477
1476
|
case "up": {
|
|
1478
|
-
|
|
1477
|
+
_("hover"), X();
|
|
1479
1478
|
const {
|
|
1480
|
-
onClick:
|
|
1481
|
-
onDragging:
|
|
1482
|
-
onPointerUp:
|
|
1479
|
+
onClick: b,
|
|
1480
|
+
onDragging: w,
|
|
1481
|
+
onPointerUp: k
|
|
1483
1482
|
} = A.current;
|
|
1484
|
-
|
|
1483
|
+
w == null || w(!1), k == null || k(), re || b == null || b();
|
|
1485
1484
|
break;
|
|
1486
1485
|
}
|
|
1487
1486
|
}
|
|
1488
1487
|
});
|
|
1489
|
-
}, [
|
|
1488
|
+
}, [j, R, n, te, L, K, $, C, X]), Ir({
|
|
1490
1489
|
disabled: n,
|
|
1491
|
-
handleId:
|
|
1492
|
-
resizeHandler:
|
|
1493
|
-
panelGroupElement:
|
|
1490
|
+
handleId: K,
|
|
1491
|
+
resizeHandler: $,
|
|
1492
|
+
panelGroupElement: J
|
|
1494
1493
|
}), xe(m, {
|
|
1495
1494
|
...p,
|
|
1496
1495
|
children: e,
|
|
1497
1496
|
className: t,
|
|
1498
1497
|
id: i,
|
|
1499
1498
|
onBlur: () => {
|
|
1500
|
-
|
|
1499
|
+
B(!1), o == null || o();
|
|
1501
1500
|
},
|
|
1502
1501
|
onFocus: () => {
|
|
1503
|
-
|
|
1502
|
+
B(!0), a == null || a();
|
|
1504
1503
|
},
|
|
1505
1504
|
ref: h,
|
|
1506
1505
|
role: "separator",
|
|
@@ -1513,24 +1512,24 @@ function Rr({
|
|
|
1513
1512
|
},
|
|
1514
1513
|
tabIndex: c,
|
|
1515
1514
|
// CSS selectors
|
|
1516
|
-
[
|
|
1517
|
-
[
|
|
1518
|
-
[
|
|
1519
|
-
[
|
|
1520
|
-
[
|
|
1521
|
-
[
|
|
1522
|
-
[
|
|
1515
|
+
[q.groupDirection]: R,
|
|
1516
|
+
[q.groupId]: D,
|
|
1517
|
+
[q.resizeHandle]: "",
|
|
1518
|
+
[q.resizeHandleActive]: M === "drag" ? "pointer" : U ? "keyboard" : void 0,
|
|
1519
|
+
[q.resizeHandleEnabled]: !n,
|
|
1520
|
+
[q.resizeHandleId]: K,
|
|
1521
|
+
[q.resizeHandleState]: M
|
|
1523
1522
|
});
|
|
1524
1523
|
}
|
|
1525
1524
|
Rr.displayName = "PanelResizeHandle";
|
|
1526
1525
|
function Qt() {
|
|
1527
1526
|
var a, d;
|
|
1528
|
-
const e = ie((f) => f.card), t = ie((f) => f.frame), n =
|
|
1529
|
-
() =>
|
|
1527
|
+
const e = ie((f) => f.card), t = ie((f) => f.frame), n = W(
|
|
1528
|
+
() => Xn(t, e),
|
|
1530
1529
|
[t, e]
|
|
1531
1530
|
), { manifest: r } = Pt(
|
|
1532
1531
|
((a = n == null ? void 0 : n.customCardPreferences) == null ? void 0 : a.url) || ""
|
|
1533
|
-
), i =
|
|
1532
|
+
), i = W(
|
|
1534
1533
|
() => {
|
|
1535
1534
|
var f;
|
|
1536
1535
|
return (f = r == null ? void 0 : r.visuals) == null ? void 0 : f.find(
|
|
@@ -1541,20 +1540,20 @@ function Qt() {
|
|
|
1541
1540
|
);
|
|
1542
1541
|
},
|
|
1543
1542
|
[r, (d = n == null ? void 0 : n.customCardPreferences) == null ? void 0 : d.componentName]
|
|
1544
|
-
), o = Nt(n, i), s =
|
|
1543
|
+
), o = Nt(n, i), s = W(
|
|
1545
1544
|
() => Mt({
|
|
1546
1545
|
frame: t,
|
|
1547
1546
|
configCard: n,
|
|
1548
1547
|
isMultiInputVisual: o === "multiple"
|
|
1549
1548
|
}),
|
|
1550
1549
|
[t, n, o]
|
|
1551
|
-
), l =
|
|
1550
|
+
), l = W(() => {
|
|
1552
1551
|
const f = s.findIndex(
|
|
1553
1552
|
(u) => (u == null ? void 0 : u.id) === e.id
|
|
1554
1553
|
);
|
|
1555
1554
|
return f < 0 ? -1 : Je(e, f);
|
|
1556
1555
|
}, [s, e]);
|
|
1557
|
-
return
|
|
1556
|
+
return W(() => !n || o !== "multiple" || l < 0 ? e.type : Te(
|
|
1558
1557
|
e,
|
|
1559
1558
|
l,
|
|
1560
1559
|
i == null ? void 0 : i.slots
|
|
@@ -1566,26 +1565,26 @@ function Jt({
|
|
|
1566
1565
|
onStoreUpdate: n,
|
|
1567
1566
|
delay: r = 300
|
|
1568
1567
|
}) {
|
|
1569
|
-
const [i, o] =
|
|
1568
|
+
const [i, o] = de(e ?? t), s = O(null), l = O(i), a = O(e), d = O(!1), f = G(() => {
|
|
1570
1569
|
s.current && (clearTimeout(s.current), s.current = null), d.current && l.current !== (a.current ?? t) && (n(l.current), a.current = l.current);
|
|
1571
1570
|
}, [t, n]);
|
|
1572
|
-
|
|
1571
|
+
ne(() => {
|
|
1573
1572
|
if (e !== a.current) {
|
|
1574
1573
|
s.current && (clearTimeout(s.current), s.current = null);
|
|
1575
1574
|
const c = e ?? t;
|
|
1576
1575
|
o(c), l.current = c, a.current = e, d.current = !1;
|
|
1577
1576
|
}
|
|
1578
|
-
}, [e, t]),
|
|
1577
|
+
}, [e, t]), ne(() => {
|
|
1579
1578
|
if (d.current)
|
|
1580
1579
|
return s.current = setTimeout(() => {
|
|
1581
1580
|
f();
|
|
1582
1581
|
}, r), () => {
|
|
1583
1582
|
s.current && (clearTimeout(s.current), s.current = null);
|
|
1584
1583
|
};
|
|
1585
|
-
}, [r, f, i]),
|
|
1584
|
+
}, [r, f, i]), ne(() => () => {
|
|
1586
1585
|
s.current && clearTimeout(s.current);
|
|
1587
1586
|
}, []);
|
|
1588
|
-
const u =
|
|
1587
|
+
const u = G(
|
|
1589
1588
|
(c) => {
|
|
1590
1589
|
const m = c ?? t;
|
|
1591
1590
|
d.current = !0, l.current = m, o(m);
|
|
@@ -1599,24 +1598,24 @@ function Zt({
|
|
|
1599
1598
|
readQueryKey: t,
|
|
1600
1599
|
setRunSql: n
|
|
1601
1600
|
}) {
|
|
1602
|
-
|
|
1601
|
+
Rn(), setTimeout(() => {
|
|
1603
1602
|
e.resetQueries({ queryKey: t(), exact: !0 }), n(!0);
|
|
1604
1603
|
}, 0);
|
|
1605
1604
|
}
|
|
1606
1605
|
const Dr = 300;
|
|
1607
1606
|
function Ar({ className: e }, t) {
|
|
1608
|
-
const n = ie((x) => x.card.sql), r = ie((x) => x.sqlGen), i = ie((x) => x.card), o = Qt(), { setCardSql: s, setSqlGen: l, setRunSql: a } = wt(), d =
|
|
1607
|
+
const n = ie((x) => x.card.sql), r = ie((x) => x.sqlGen), i = ie((x) => x.card), o = Qt(), { setCardSql: s, setSqlGen: l, setRunSql: a } = wt(), d = W(() => o !== i.type ? { ...i, type: o } : i, [i, o]), { queryKey: f } = ot(d), u = Ct(), c = O(f);
|
|
1609
1608
|
c.current = f;
|
|
1610
|
-
const m =
|
|
1609
|
+
const m = O(r);
|
|
1611
1610
|
m.current = r;
|
|
1612
|
-
const p =
|
|
1611
|
+
const p = G(
|
|
1613
1612
|
(x) => {
|
|
1614
1613
|
s(x);
|
|
1615
1614
|
},
|
|
1616
1615
|
[s]
|
|
1617
1616
|
), {
|
|
1618
1617
|
value: g,
|
|
1619
|
-
onChange:
|
|
1618
|
+
onChange: y,
|
|
1620
1619
|
flush: h
|
|
1621
1620
|
} = Jt({
|
|
1622
1621
|
storeValue: n,
|
|
@@ -1624,12 +1623,12 @@ function Ar({ className: e }, t) {
|
|
|
1624
1623
|
onStoreUpdate: p,
|
|
1625
1624
|
delay: Dr
|
|
1626
1625
|
});
|
|
1627
|
-
|
|
1626
|
+
ne(() => Et(h), [h]);
|
|
1628
1627
|
function A(x) {
|
|
1629
|
-
|
|
1628
|
+
y(x), Wn(m.current) || l({});
|
|
1630
1629
|
}
|
|
1631
|
-
return /* @__PURE__ */
|
|
1632
|
-
|
|
1630
|
+
return /* @__PURE__ */ N("div", { className: "relative h-full w-full", children: /* @__PURE__ */ N(
|
|
1631
|
+
It,
|
|
1633
1632
|
{
|
|
1634
1633
|
ref: t,
|
|
1635
1634
|
value: g ?? "",
|
|
@@ -1650,20 +1649,20 @@ function Ar({ className: e }, t) {
|
|
|
1650
1649
|
}
|
|
1651
1650
|
) });
|
|
1652
1651
|
}
|
|
1653
|
-
const
|
|
1652
|
+
const wo = Fe(Ar), Nr = 300, Mr = `# 'data' holds the SQL result.
|
|
1654
1653
|
# Set 'result' to a list of dicts to replace it, for example:
|
|
1655
1654
|
# import pandas as pd
|
|
1656
1655
|
# result = pd.DataFrame(data).to_dict('records')`;
|
|
1657
1656
|
function Lr({ className: e }, t) {
|
|
1658
|
-
const n = ie((p) => p.card.python), r = ie((p) => p.card), i = Qt(), { setCardPython: o, setRunSql: s } = wt(), l =
|
|
1657
|
+
const n = ie((p) => p.card.python), r = ie((p) => p.card), i = Qt(), { setCardPython: o, setRunSql: s } = wt(), l = W(() => i !== r.type ? { ...r, type: i } : r, [r, i]), { queryKey: a } = ot(l), d = Ct(), f = O(a);
|
|
1659
1658
|
f.current = a;
|
|
1660
1659
|
const { value: u, onChange: c, flush: m } = Jt({
|
|
1661
1660
|
storeValue: n,
|
|
1662
1661
|
onStoreUpdate: o,
|
|
1663
1662
|
delay: Nr
|
|
1664
1663
|
});
|
|
1665
|
-
return
|
|
1666
|
-
|
|
1664
|
+
return ne(() => Et(m), [m]), /* @__PURE__ */ N(
|
|
1665
|
+
It,
|
|
1667
1666
|
{
|
|
1668
1667
|
ref: t,
|
|
1669
1668
|
value: u ?? "",
|
|
@@ -1688,42 +1687,42 @@ function Lr({ className: e }, t) {
|
|
|
1688
1687
|
}
|
|
1689
1688
|
);
|
|
1690
1689
|
}
|
|
1691
|
-
const
|
|
1690
|
+
const Co = Fe(Lr);
|
|
1692
1691
|
function _r({ card: e }) {
|
|
1693
|
-
var
|
|
1694
|
-
const t =
|
|
1695
|
-
() =>
|
|
1692
|
+
var E, z, b, w, k;
|
|
1693
|
+
const t = Dn(), [n, r] = de({}), { authToken: i } = An(), o = jn(i == null ? void 0 : i.accessToken), { compiledAppearance: s } = Jn(), l = W(
|
|
1694
|
+
() => Nn(s),
|
|
1696
1695
|
[s]
|
|
1697
|
-
), a = ie((
|
|
1698
|
-
(
|
|
1696
|
+
), a = ie((S) => S.frame), d = ie(
|
|
1697
|
+
(S) => S.inlineFilterValuesMap[e.id]
|
|
1699
1698
|
), f = ie(
|
|
1700
|
-
(
|
|
1699
|
+
(S) => S.actions.setCardInlineFilterValue
|
|
1701
1700
|
), u = ie(
|
|
1702
|
-
(
|
|
1701
|
+
(S) => S.actions.removeCardInlineFilterValue
|
|
1703
1702
|
), c = e, { getCard: m, manifest: p } = Pt(
|
|
1704
|
-
((
|
|
1705
|
-
), g = (
|
|
1706
|
-
(
|
|
1707
|
-
var
|
|
1708
|
-
return
|
|
1703
|
+
((E = c.customCardPreferences) == null ? void 0 : E.url) || ""
|
|
1704
|
+
), g = (z = p == null ? void 0 : p.visuals) == null ? void 0 : z.find(
|
|
1705
|
+
(S) => {
|
|
1706
|
+
var H;
|
|
1707
|
+
return S.name === ((H = c.customCardPreferences) == null ? void 0 : H.componentName);
|
|
1709
1708
|
}
|
|
1710
|
-
),
|
|
1709
|
+
), y = Nt(c, g) ?? "single", h = W(
|
|
1711
1710
|
() => Mt({
|
|
1712
1711
|
frame: a,
|
|
1713
1712
|
configCard: c,
|
|
1714
|
-
isMultiInputVisual:
|
|
1713
|
+
isMultiInputVisual: y === "multiple"
|
|
1715
1714
|
}),
|
|
1716
|
-
[a, c,
|
|
1717
|
-
), A =
|
|
1718
|
-
const
|
|
1719
|
-
(
|
|
1715
|
+
[a, c, y]
|
|
1716
|
+
), A = W(() => {
|
|
1717
|
+
const S = h.findIndex(
|
|
1718
|
+
(H) => (H == null ? void 0 : H.id) === e.id
|
|
1720
1719
|
);
|
|
1721
|
-
return
|
|
1722
|
-
}, [h, e]), x =
|
|
1720
|
+
return S < 0 ? -1 : Je(e, S);
|
|
1721
|
+
}, [h, e]), x = W(() => y !== "multiple" || A < 0 ? e.type : Te(
|
|
1723
1722
|
e,
|
|
1724
1723
|
A,
|
|
1725
1724
|
g == null ? void 0 : g.slots
|
|
1726
|
-
) ?? e.type, [
|
|
1725
|
+
) ?? e.type, [y, A, e, g == null ? void 0 : g.slots]), R = W(() => y === "multiple" ? {
|
|
1727
1726
|
...e,
|
|
1728
1727
|
connectionId: void 0,
|
|
1729
1728
|
dataSource: void 0,
|
|
@@ -1731,87 +1730,87 @@ function _r({ card: e }) {
|
|
|
1731
1730
|
python: "",
|
|
1732
1731
|
config: void 0,
|
|
1733
1732
|
queryConfig: void 0
|
|
1734
|
-
} : x !== e.type ? { ...e, type: x } : e, [e, x,
|
|
1735
|
-
(
|
|
1736
|
-
),
|
|
1737
|
-
(
|
|
1733
|
+
} : x !== e.type ? { ...e, type: x } : e, [e, x, y]), { data: D, effectiveCardConfig: L, renderCard: C } = ot(R), X = Mn(), J = Re((S) => S.dashboard), K = Re(
|
|
1734
|
+
(S) => S.dashboardInputValues
|
|
1735
|
+
), M = Re(
|
|
1736
|
+
(S) => S.adHocFilterValues
|
|
1738
1737
|
), _ = Re(
|
|
1739
|
-
(
|
|
1740
|
-
var
|
|
1741
|
-
return ((
|
|
1738
|
+
(S) => {
|
|
1739
|
+
var H;
|
|
1740
|
+
return ((H = S.reportContext) == null ? void 0 : H.calendar) ?? null;
|
|
1742
1741
|
}
|
|
1743
|
-
),
|
|
1744
|
-
() =>
|
|
1742
|
+
), U = Re((S) => S.selectedSheetId), B = W(
|
|
1743
|
+
() => Ln({
|
|
1745
1744
|
card: e,
|
|
1746
|
-
sheetId:
|
|
1745
|
+
sheetId: U || "",
|
|
1747
1746
|
inlineFilterValues: d,
|
|
1748
|
-
setInlineFilterValue: (
|
|
1749
|
-
removeInlineFilterValue: (
|
|
1747
|
+
setInlineFilterValue: (S) => f(e.id, S),
|
|
1748
|
+
removeInlineFilterValue: (S) => u(e.id, S)
|
|
1750
1749
|
}),
|
|
1751
1750
|
[
|
|
1752
1751
|
e,
|
|
1753
|
-
|
|
1752
|
+
U,
|
|
1754
1753
|
d,
|
|
1755
1754
|
f,
|
|
1756
1755
|
u
|
|
1757
1756
|
]
|
|
1758
1757
|
), {
|
|
1759
|
-
filterInputs:
|
|
1760
|
-
filters:
|
|
1761
|
-
filterValues:
|
|
1762
|
-
} =
|
|
1763
|
-
() =>
|
|
1764
|
-
dashboard:
|
|
1758
|
+
filterInputs: $,
|
|
1759
|
+
filters: F,
|
|
1760
|
+
filterValues: Y
|
|
1761
|
+
} = W(
|
|
1762
|
+
() => _n({
|
|
1763
|
+
dashboard: J,
|
|
1765
1764
|
card: e,
|
|
1766
|
-
sheetId:
|
|
1767
|
-
dashboardInputValues:
|
|
1768
|
-
adHocFilterValues:
|
|
1769
|
-
transientContexts:
|
|
1765
|
+
sheetId: U,
|
|
1766
|
+
dashboardInputValues: K,
|
|
1767
|
+
adHocFilterValues: M,
|
|
1768
|
+
transientContexts: X,
|
|
1770
1769
|
calendar: _
|
|
1771
1770
|
}),
|
|
1772
1771
|
[
|
|
1773
|
-
|
|
1772
|
+
M,
|
|
1774
1773
|
e,
|
|
1775
|
-
|
|
1774
|
+
K,
|
|
1776
1775
|
_,
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1776
|
+
J,
|
|
1777
|
+
U,
|
|
1778
|
+
X
|
|
1780
1779
|
]
|
|
1781
|
-
),
|
|
1782
|
-
(
|
|
1783
|
-
const
|
|
1784
|
-
r((
|
|
1785
|
-
...
|
|
1786
|
-
[
|
|
1780
|
+
), j = G(
|
|
1781
|
+
(S, H) => {
|
|
1782
|
+
const Q = Yn(H);
|
|
1783
|
+
r((V) => ({
|
|
1784
|
+
...V,
|
|
1785
|
+
[S]: Q
|
|
1787
1786
|
}));
|
|
1788
1787
|
},
|
|
1789
1788
|
[]
|
|
1790
|
-
),
|
|
1791
|
-
(
|
|
1789
|
+
), te = (b = c.customCardPreferences) == null ? void 0 : b.componentName, ce = te ? m(te) : null, le = kn(
|
|
1790
|
+
(w = c.customCardPreferences) == null ? void 0 : w.settings,
|
|
1792
1791
|
c
|
|
1793
|
-
),
|
|
1792
|
+
), re = W(
|
|
1794
1793
|
() => Qn(h),
|
|
1795
1794
|
[h]
|
|
1796
|
-
),
|
|
1797
|
-
() =>
|
|
1798
|
-
(
|
|
1799
|
-
|
|
1800
|
-
|
|
1795
|
+
), v = W(
|
|
1796
|
+
() => re.map(
|
|
1797
|
+
(S, H) => Te(
|
|
1798
|
+
S,
|
|
1799
|
+
H,
|
|
1801
1800
|
g == null ? void 0 : g.slots
|
|
1802
1801
|
)
|
|
1803
1802
|
),
|
|
1804
|
-
[
|
|
1805
|
-
),
|
|
1806
|
-
() =>
|
|
1807
|
-
|
|
1808
|
-
slotOrderedCards:
|
|
1803
|
+
[re, g == null ? void 0 : g.slots]
|
|
1804
|
+
), P = W(
|
|
1805
|
+
() => Tn(
|
|
1806
|
+
y === "multiple" ? Hn({
|
|
1807
|
+
slotOrderedCards: re,
|
|
1809
1808
|
multiInputData: n,
|
|
1810
1809
|
valueFormatPreferences: t
|
|
1811
1810
|
}) : [
|
|
1812
1811
|
{
|
|
1813
1812
|
card: e,
|
|
1814
|
-
cardConfig:
|
|
1813
|
+
cardConfig: L,
|
|
1815
1814
|
columns: D == null ? void 0 : D.columns,
|
|
1816
1815
|
columnKeyMap: D == null ? void 0 : D.columnKeyMap,
|
|
1817
1816
|
valueFormatPreferences: t
|
|
@@ -1822,99 +1821,100 @@ function _r({ card: e }) {
|
|
|
1822
1821
|
e,
|
|
1823
1822
|
D == null ? void 0 : D.columnKeyMap,
|
|
1824
1823
|
D == null ? void 0 : D.columns,
|
|
1825
|
-
|
|
1824
|
+
L,
|
|
1826
1825
|
n,
|
|
1827
|
-
|
|
1828
|
-
|
|
1826
|
+
re,
|
|
1827
|
+
y,
|
|
1829
1828
|
t
|
|
1830
1829
|
]
|
|
1831
1830
|
);
|
|
1832
|
-
return
|
|
1831
|
+
return te ? /* @__PURE__ */ N("div", { className: "semaphor-custom mb-3 flex grow basis-0 flex-col space-y-2 overflow-y-auto", children: /* @__PURE__ */ Ne(
|
|
1833
1832
|
Cn,
|
|
1834
1833
|
{
|
|
1835
|
-
fallback: /* @__PURE__ */
|
|
1834
|
+
fallback: /* @__PURE__ */ N(ft, {}),
|
|
1836
1835
|
children: [
|
|
1837
|
-
|
|
1838
|
-
|
|
1836
|
+
ce && y === "single" && /* @__PURE__ */ N(
|
|
1837
|
+
ce,
|
|
1839
1838
|
{
|
|
1840
1839
|
editing: !0,
|
|
1841
1840
|
params: o,
|
|
1842
1841
|
theme: l,
|
|
1843
|
-
settings:
|
|
1844
|
-
cardMetadata:
|
|
1845
|
-
|
|
1842
|
+
settings: le,
|
|
1843
|
+
cardMetadata: Vn({
|
|
1844
|
+
// Its formats as its rows render, live model formats included (CF-D17).
|
|
1845
|
+
card: C,
|
|
1846
1846
|
dataMetadata: D == null ? void 0 : D.metadata
|
|
1847
1847
|
}),
|
|
1848
|
-
onDataChange:
|
|
1848
|
+
onDataChange: j,
|
|
1849
1849
|
data: (D == null ? void 0 : D.records) || [],
|
|
1850
1850
|
columns: (D == null ? void 0 : D.columns) || [],
|
|
1851
|
-
formatTemporalBucketValue:
|
|
1852
|
-
filterInputs:
|
|
1853
|
-
filters:
|
|
1851
|
+
formatTemporalBucketValue: P,
|
|
1852
|
+
filterInputs: $,
|
|
1853
|
+
filters: F,
|
|
1854
1854
|
filterValues: [
|
|
1855
|
-
...
|
|
1855
|
+
...Y || [],
|
|
1856
1856
|
...d || []
|
|
1857
1857
|
],
|
|
1858
|
-
inlineFilters:
|
|
1858
|
+
inlineFilters: B
|
|
1859
1859
|
}
|
|
1860
1860
|
),
|
|
1861
|
-
|
|
1862
|
-
h.map((
|
|
1863
|
-
if (!
|
|
1864
|
-
const
|
|
1865
|
-
|
|
1866
|
-
|
|
1861
|
+
ce && y === "multiple" && /* @__PURE__ */ Ne(ft, { children: [
|
|
1862
|
+
h.map((S, H) => {
|
|
1863
|
+
if (!S) return null;
|
|
1864
|
+
const Q = Je(S, H), V = Te(
|
|
1865
|
+
S,
|
|
1866
|
+
Q,
|
|
1867
1867
|
g == null ? void 0 : g.slots
|
|
1868
1868
|
);
|
|
1869
|
-
return /* @__PURE__ */
|
|
1870
|
-
|
|
1869
|
+
return /* @__PURE__ */ N(
|
|
1870
|
+
$n,
|
|
1871
1871
|
{
|
|
1872
|
-
onDataChange:
|
|
1873
|
-
card:
|
|
1874
|
-
effectiveCardType:
|
|
1872
|
+
onDataChange: j,
|
|
1873
|
+
card: S,
|
|
1874
|
+
effectiveCardType: V
|
|
1875
1875
|
},
|
|
1876
|
-
`${
|
|
1876
|
+
`${S.id}-${Q}`
|
|
1877
1877
|
);
|
|
1878
1878
|
}),
|
|
1879
|
-
/* @__PURE__ */
|
|
1880
|
-
|
|
1879
|
+
/* @__PURE__ */ N("div", { className: "flex flex-col gap-2", children: /* @__PURE__ */ N(
|
|
1880
|
+
ce,
|
|
1881
1881
|
{
|
|
1882
1882
|
editing: !0,
|
|
1883
|
-
onDataChange:
|
|
1884
|
-
|
|
1883
|
+
onDataChange: j,
|
|
1884
|
+
...Fn({
|
|
1885
1885
|
configCard: c,
|
|
1886
|
-
slotOrderedCards:
|
|
1887
|
-
slotTypes:
|
|
1886
|
+
slotOrderedCards: re,
|
|
1887
|
+
slotTypes: v,
|
|
1888
1888
|
multiInputData: n,
|
|
1889
1889
|
params: o,
|
|
1890
1890
|
theme: l,
|
|
1891
|
-
chartSettings:
|
|
1892
|
-
filterInputs:
|
|
1893
|
-
filters:
|
|
1891
|
+
chartSettings: le,
|
|
1892
|
+
filterInputs: $,
|
|
1893
|
+
filters: F,
|
|
1894
1894
|
filterValues: [
|
|
1895
|
-
...
|
|
1895
|
+
...Y || [],
|
|
1896
1896
|
...d || []
|
|
1897
1897
|
],
|
|
1898
|
-
inlineFilters:
|
|
1899
|
-
formatTemporalBucketValue:
|
|
1898
|
+
inlineFilters: B,
|
|
1899
|
+
formatTemporalBucketValue: P
|
|
1900
1900
|
})
|
|
1901
1901
|
}
|
|
1902
1902
|
) })
|
|
1903
1903
|
] })
|
|
1904
1904
|
]
|
|
1905
1905
|
},
|
|
1906
|
-
(
|
|
1906
|
+
(k = c.customCardPreferences) == null ? void 0 : k.componentName
|
|
1907
1907
|
) }) : null;
|
|
1908
1908
|
}
|
|
1909
|
-
const
|
|
1909
|
+
const Eo = wn(_r);
|
|
1910
1910
|
var en = "Toggle", tn = T.forwardRef((e, t) => {
|
|
1911
|
-
const { pressed: n, defaultPressed: r, onPressedChange: i, ...o } = e, [s, l] =
|
|
1911
|
+
const { pressed: n, defaultPressed: r, onPressedChange: i, ...o } = e, [s, l] = Rt({
|
|
1912
1912
|
prop: n,
|
|
1913
1913
|
onChange: i,
|
|
1914
1914
|
defaultProp: r ?? !1,
|
|
1915
1915
|
caller: en
|
|
1916
1916
|
});
|
|
1917
|
-
return /* @__PURE__ */
|
|
1917
|
+
return /* @__PURE__ */ N(
|
|
1918
1918
|
ze.button,
|
|
1919
1919
|
{
|
|
1920
1920
|
type: "button",
|
|
@@ -1923,7 +1923,7 @@ var en = "Toggle", tn = T.forwardRef((e, t) => {
|
|
|
1923
1923
|
"data-disabled": e.disabled ? "" : void 0,
|
|
1924
1924
|
...o,
|
|
1925
1925
|
ref: t,
|
|
1926
|
-
onClick:
|
|
1926
|
+
onClick: me(e.onClick, () => {
|
|
1927
1927
|
e.disabled || l(!s);
|
|
1928
1928
|
})
|
|
1929
1929
|
}
|
|
@@ -1931,7 +1931,7 @@ var en = "Toggle", tn = T.forwardRef((e, t) => {
|
|
|
1931
1931
|
});
|
|
1932
1932
|
tn.displayName = en;
|
|
1933
1933
|
var nn = tn;
|
|
1934
|
-
const kr =
|
|
1934
|
+
const kr = Dt(
|
|
1935
1935
|
"inline-flex items-center justify-center rounded-control text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",
|
|
1936
1936
|
{
|
|
1937
1937
|
variants: {
|
|
@@ -1950,7 +1950,7 @@ const kr = Rt(
|
|
|
1950
1950
|
size: "default"
|
|
1951
1951
|
}
|
|
1952
1952
|
}
|
|
1953
|
-
), Tr = T.forwardRef(({ className: e, variant: t, size: n, ...r }, i) => /* @__PURE__ */
|
|
1953
|
+
), Tr = T.forwardRef(({ className: e, variant: t, size: n, ...r }, i) => /* @__PURE__ */ N(
|
|
1954
1954
|
nn,
|
|
1955
1955
|
{
|
|
1956
1956
|
ref: i,
|
|
@@ -1959,7 +1959,7 @@ const kr = Rt(
|
|
|
1959
1959
|
}
|
|
1960
1960
|
));
|
|
1961
1961
|
Tr.displayName = nn.displayName;
|
|
1962
|
-
const Hr =
|
|
1962
|
+
const Hr = Dt(
|
|
1963
1963
|
"relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",
|
|
1964
1964
|
{
|
|
1965
1965
|
variants: {
|
|
@@ -1972,7 +1972,7 @@ const Hr = Rt(
|
|
|
1972
1972
|
variant: "default"
|
|
1973
1973
|
}
|
|
1974
1974
|
}
|
|
1975
|
-
), Vr = T.forwardRef(({ className: e, variant: t, ...n }, r) => /* @__PURE__ */
|
|
1975
|
+
), Vr = T.forwardRef(({ className: e, variant: t, ...n }, r) => /* @__PURE__ */ N(
|
|
1976
1976
|
"div",
|
|
1977
1977
|
{
|
|
1978
1978
|
ref: r,
|
|
@@ -1982,7 +1982,7 @@ const Hr = Rt(
|
|
|
1982
1982
|
}
|
|
1983
1983
|
));
|
|
1984
1984
|
Vr.displayName = "Alert";
|
|
1985
|
-
const $r = T.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */
|
|
1985
|
+
const $r = T.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ N(
|
|
1986
1986
|
"h5",
|
|
1987
1987
|
{
|
|
1988
1988
|
ref: n,
|
|
@@ -1991,7 +1991,7 @@ const $r = T.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ L(
|
|
|
1991
1991
|
}
|
|
1992
1992
|
));
|
|
1993
1993
|
$r.displayName = "AlertTitle";
|
|
1994
|
-
const Fr = T.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */
|
|
1994
|
+
const Fr = T.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ N(
|
|
1995
1995
|
"div",
|
|
1996
1996
|
{
|
|
1997
1997
|
ref: n,
|
|
@@ -2005,7 +2005,7 @@ var rn = ["PageUp", "PageDown"], on = ["ArrowUp", "ArrowDown", "ArrowLeft", "Arr
|
|
|
2005
2005
|
"from-right": ["Home", "PageDown", "ArrowDown", "ArrowRight"],
|
|
2006
2006
|
"from-bottom": ["Home", "PageDown", "ArrowDown", "ArrowLeft"],
|
|
2007
2007
|
"from-top": ["Home", "PageDown", "ArrowUp", "ArrowLeft"]
|
|
2008
|
-
}, Ce = "Slider", [et, Kr, Br] =
|
|
2008
|
+
}, Ce = "Slider", [et, Kr, Br] = qn(Ce), [ln] = Bn(Ce, [
|
|
2009
2009
|
Br
|
|
2010
2010
|
]), [qr, Ge] = ln(Ce), an = T.forwardRef(
|
|
2011
2011
|
(e, t) => {
|
|
@@ -2026,38 +2026,38 @@ var rn = ["PageUp", "PageDown"], on = ["ArrowUp", "ArrowDown", "ArrowLeft", "Arr
|
|
|
2026
2026
|
inverted: m = !1,
|
|
2027
2027
|
form: p,
|
|
2028
2028
|
...g
|
|
2029
|
-
} = e,
|
|
2029
|
+
} = e, y = T.useRef(/* @__PURE__ */ new Set()), h = T.useRef(0), x = s === "horizontal" ? Or : Gr, [R = [], D] = Rt({
|
|
2030
2030
|
prop: f,
|
|
2031
2031
|
defaultProp: d,
|
|
2032
|
-
onChange: (
|
|
2032
|
+
onChange: (M) => {
|
|
2033
2033
|
var U;
|
|
2034
|
-
(U = [...
|
|
2034
|
+
(U = [...y.current][h.current]) == null || U.focus(), u(M);
|
|
2035
2035
|
}
|
|
2036
|
-
}),
|
|
2037
|
-
function
|
|
2038
|
-
const
|
|
2039
|
-
|
|
2036
|
+
}), L = T.useRef(R);
|
|
2037
|
+
function C(M) {
|
|
2038
|
+
const _ = Yr(R, M);
|
|
2039
|
+
K(M, _);
|
|
2040
2040
|
}
|
|
2041
|
-
function X(
|
|
2042
|
-
|
|
2041
|
+
function X(M) {
|
|
2042
|
+
K(M, h.current);
|
|
2043
2043
|
}
|
|
2044
|
-
function
|
|
2045
|
-
const
|
|
2046
|
-
R[h.current] !==
|
|
2044
|
+
function J() {
|
|
2045
|
+
const M = L.current[h.current];
|
|
2046
|
+
R[h.current] !== M && c(R);
|
|
2047
2047
|
}
|
|
2048
|
-
function
|
|
2049
|
-
const
|
|
2048
|
+
function K(M, _, { commit: U } = { commit: !1 }) {
|
|
2049
|
+
const B = eo(o), $ = to(Math.round((M - r) / o) * o + r, B), F = At($, [r, i]);
|
|
2050
2050
|
D((Y = []) => {
|
|
2051
|
-
const
|
|
2052
|
-
if (Zr(
|
|
2053
|
-
h.current =
|
|
2054
|
-
const
|
|
2055
|
-
return
|
|
2051
|
+
const j = jr(Y, F, _);
|
|
2052
|
+
if (Zr(j, a * o)) {
|
|
2053
|
+
h.current = j.indexOf(F);
|
|
2054
|
+
const te = String(j) !== String(Y);
|
|
2055
|
+
return te && U && c(j), te ? j : Y;
|
|
2056
2056
|
} else
|
|
2057
2057
|
return Y;
|
|
2058
2058
|
});
|
|
2059
2059
|
}
|
|
2060
|
-
return /* @__PURE__ */
|
|
2060
|
+
return /* @__PURE__ */ N(
|
|
2061
2061
|
qr,
|
|
2062
2062
|
{
|
|
2063
2063
|
scope: e.__scopeSlider,
|
|
@@ -2066,32 +2066,32 @@ var rn = ["PageUp", "PageDown"], on = ["ArrowUp", "ArrowDown", "ArrowLeft", "Arr
|
|
|
2066
2066
|
min: r,
|
|
2067
2067
|
max: i,
|
|
2068
2068
|
valueIndexToChangeRef: h,
|
|
2069
|
-
thumbs:
|
|
2069
|
+
thumbs: y.current,
|
|
2070
2070
|
values: R,
|
|
2071
2071
|
orientation: s,
|
|
2072
2072
|
form: p,
|
|
2073
|
-
children: /* @__PURE__ */
|
|
2073
|
+
children: /* @__PURE__ */ N(et.Provider, { scope: e.__scopeSlider, children: /* @__PURE__ */ N(et.Slot, { scope: e.__scopeSlider, children: /* @__PURE__ */ N(
|
|
2074
2074
|
x,
|
|
2075
2075
|
{
|
|
2076
2076
|
"aria-disabled": l,
|
|
2077
2077
|
"data-disabled": l ? "" : void 0,
|
|
2078
2078
|
...g,
|
|
2079
2079
|
ref: t,
|
|
2080
|
-
onPointerDown:
|
|
2081
|
-
l || (
|
|
2080
|
+
onPointerDown: me(g.onPointerDown, () => {
|
|
2081
|
+
l || (L.current = R);
|
|
2082
2082
|
}),
|
|
2083
2083
|
min: r,
|
|
2084
2084
|
max: i,
|
|
2085
2085
|
inverted: m,
|
|
2086
|
-
onSlideStart: l ? void 0 :
|
|
2086
|
+
onSlideStart: l ? void 0 : C,
|
|
2087
2087
|
onSlideMove: l ? void 0 : X,
|
|
2088
|
-
onSlideEnd: l ? void 0 :
|
|
2089
|
-
onHomeKeyDown: () => !l &&
|
|
2090
|
-
onEndKeyDown: () => !l &&
|
|
2091
|
-
onStepKeyDown: ({ event:
|
|
2088
|
+
onSlideEnd: l ? void 0 : J,
|
|
2089
|
+
onHomeKeyDown: () => !l && K(r, 0, { commit: !0 }),
|
|
2090
|
+
onEndKeyDown: () => !l && K(i, R.length - 1, { commit: !0 }),
|
|
2091
|
+
onStepKeyDown: ({ event: M, direction: _ }) => {
|
|
2092
2092
|
if (!l) {
|
|
2093
|
-
const
|
|
2094
|
-
|
|
2093
|
+
const $ = rn.includes(M.key) || M.shiftKey && on.includes(M.key) ? 10 : 1, F = h.current, Y = R[F], j = o * $ * _;
|
|
2094
|
+
K(Y + j, F, { commit: !0 });
|
|
2095
2095
|
}
|
|
2096
2096
|
}
|
|
2097
2097
|
}
|
|
@@ -2118,12 +2118,12 @@ var [cn, un] = ln(Ce, {
|
|
|
2118
2118
|
onSlideEnd: a,
|
|
2119
2119
|
onStepKeyDown: d,
|
|
2120
2120
|
...f
|
|
2121
|
-
} = e, [u, c] = T.useState(null), m = Pe(t, (x) => c(x)), p = T.useRef(void 0), g =
|
|
2121
|
+
} = e, [u, c] = T.useState(null), m = Pe(t, (x) => c(x)), p = T.useRef(void 0), g = On(i), y = g === "ltr", h = y && !o || !y && o;
|
|
2122
2122
|
function A(x) {
|
|
2123
|
-
const R = p.current || u.getBoundingClientRect(), D = [0, R.width],
|
|
2124
|
-
return p.current = R,
|
|
2123
|
+
const R = p.current || u.getBoundingClientRect(), D = [0, R.width], C = ct(D, h ? [n, r] : [r, n]);
|
|
2124
|
+
return p.current = R, C(x - R.left);
|
|
2125
2125
|
}
|
|
2126
|
-
return /* @__PURE__ */
|
|
2126
|
+
return /* @__PURE__ */ N(
|
|
2127
2127
|
cn,
|
|
2128
2128
|
{
|
|
2129
2129
|
scope: e.__scopeSlider,
|
|
@@ -2131,7 +2131,7 @@ var [cn, un] = ln(Ce, {
|
|
|
2131
2131
|
endEdge: h ? "right" : "left",
|
|
2132
2132
|
direction: h ? 1 : -1,
|
|
2133
2133
|
size: "width",
|
|
2134
|
-
children: /* @__PURE__ */
|
|
2134
|
+
children: /* @__PURE__ */ N(
|
|
2135
2135
|
dn,
|
|
2136
2136
|
{
|
|
2137
2137
|
dir: g,
|
|
@@ -2175,10 +2175,10 @@ var [cn, un] = ln(Ce, {
|
|
|
2175
2175
|
...d
|
|
2176
2176
|
} = e, f = T.useRef(null), u = Pe(t, f), c = T.useRef(void 0), m = !i;
|
|
2177
2177
|
function p(g) {
|
|
2178
|
-
const
|
|
2179
|
-
return c.current =
|
|
2178
|
+
const y = c.current || f.current.getBoundingClientRect(), h = [0, y.height], x = ct(h, m ? [r, n] : [n, r]);
|
|
2179
|
+
return c.current = y, x(g - y.top);
|
|
2180
2180
|
}
|
|
2181
|
-
return /* @__PURE__ */
|
|
2181
|
+
return /* @__PURE__ */ N(
|
|
2182
2182
|
cn,
|
|
2183
2183
|
{
|
|
2184
2184
|
scope: e.__scopeSlider,
|
|
@@ -2186,7 +2186,7 @@ var [cn, un] = ln(Ce, {
|
|
|
2186
2186
|
endEdge: m ? "top" : "bottom",
|
|
2187
2187
|
size: "height",
|
|
2188
2188
|
direction: m ? 1 : -1,
|
|
2189
|
-
children: /* @__PURE__ */
|
|
2189
|
+
children: /* @__PURE__ */ N(
|
|
2190
2190
|
dn,
|
|
2191
2191
|
{
|
|
2192
2192
|
"data-orientation": "vertical",
|
|
@@ -2197,12 +2197,12 @@ var [cn, un] = ln(Ce, {
|
|
|
2197
2197
|
"--radix-slider-thumb-transform": "translateY(50%)"
|
|
2198
2198
|
},
|
|
2199
2199
|
onSlideStart: (g) => {
|
|
2200
|
-
const
|
|
2201
|
-
o == null || o(
|
|
2200
|
+
const y = p(g.clientY);
|
|
2201
|
+
o == null || o(y);
|
|
2202
2202
|
},
|
|
2203
2203
|
onSlideMove: (g) => {
|
|
2204
|
-
const
|
|
2205
|
-
s == null || s(
|
|
2204
|
+
const y = p(g.clientY);
|
|
2205
|
+
s == null || s(y);
|
|
2206
2206
|
},
|
|
2207
2207
|
onSlideEnd: () => {
|
|
2208
2208
|
c.current = void 0, l == null || l();
|
|
@@ -2228,22 +2228,22 @@ var [cn, un] = ln(Ce, {
|
|
|
2228
2228
|
onStepKeyDown: a,
|
|
2229
2229
|
...d
|
|
2230
2230
|
} = e, f = Ge(Ce, n);
|
|
2231
|
-
return /* @__PURE__ */
|
|
2231
|
+
return /* @__PURE__ */ N(
|
|
2232
2232
|
ze.span,
|
|
2233
2233
|
{
|
|
2234
2234
|
...d,
|
|
2235
2235
|
ref: t,
|
|
2236
|
-
onKeyDown:
|
|
2236
|
+
onKeyDown: me(e.onKeyDown, (u) => {
|
|
2237
2237
|
u.key === "Home" ? (s(u), u.preventDefault()) : u.key === "End" ? (l(u), u.preventDefault()) : rn.concat(on).includes(u.key) && (a(u), u.preventDefault());
|
|
2238
2238
|
}),
|
|
2239
|
-
onPointerDown:
|
|
2239
|
+
onPointerDown: me(e.onPointerDown, (u) => {
|
|
2240
2240
|
const c = u.target;
|
|
2241
2241
|
c.setPointerCapture(u.pointerId), u.preventDefault(), f.thumbs.has(c) ? c.focus() : r(u);
|
|
2242
2242
|
}),
|
|
2243
|
-
onPointerMove:
|
|
2243
|
+
onPointerMove: me(e.onPointerMove, (u) => {
|
|
2244
2244
|
u.target.hasPointerCapture(u.pointerId) && i(u);
|
|
2245
2245
|
}),
|
|
2246
|
-
onPointerUp:
|
|
2246
|
+
onPointerUp: me(e.onPointerUp, (u) => {
|
|
2247
2247
|
const c = u.target;
|
|
2248
2248
|
c.hasPointerCapture(u.pointerId) && (c.releasePointerCapture(u.pointerId), o(u));
|
|
2249
2249
|
})
|
|
@@ -2253,7 +2253,7 @@ var [cn, un] = ln(Ce, {
|
|
|
2253
2253
|
), fn = "SliderTrack", pn = T.forwardRef(
|
|
2254
2254
|
(e, t) => {
|
|
2255
2255
|
const { __scopeSlider: n, ...r } = e, i = Ge(fn, n);
|
|
2256
|
-
return /* @__PURE__ */
|
|
2256
|
+
return /* @__PURE__ */ N(
|
|
2257
2257
|
ze.span,
|
|
2258
2258
|
{
|
|
2259
2259
|
"data-disabled": i.disabled ? "" : void 0,
|
|
@@ -2270,7 +2270,7 @@ var tt = "SliderRange", mn = T.forwardRef(
|
|
|
2270
2270
|
const { __scopeSlider: n, ...r } = e, i = Ge(tt, n), o = un(tt, n), s = T.useRef(null), l = Pe(t, s), a = i.values.length, d = i.values.map(
|
|
2271
2271
|
(c) => yn(c, i.min, i.max)
|
|
2272
2272
|
), f = a > 1 ? Math.min(...d) : 0, u = 100 - Math.max(...d);
|
|
2273
|
-
return /* @__PURE__ */
|
|
2273
|
+
return /* @__PURE__ */ N(
|
|
2274
2274
|
ze.span,
|
|
2275
2275
|
{
|
|
2276
2276
|
"data-orientation": i.orientation,
|
|
@@ -2293,11 +2293,11 @@ var nt = "SliderThumb", gn = T.forwardRef(
|
|
|
2293
2293
|
() => r ? n().findIndex((l) => l.ref.current === r) : -1,
|
|
2294
2294
|
[n, r]
|
|
2295
2295
|
);
|
|
2296
|
-
return /* @__PURE__ */
|
|
2296
|
+
return /* @__PURE__ */ N(Ur, { ...e, ref: o, index: s });
|
|
2297
2297
|
}
|
|
2298
2298
|
), Ur = T.forwardRef(
|
|
2299
2299
|
(e, t) => {
|
|
2300
|
-
const { __scopeSlider: n, index: r, name: i, ...o } = e, s = Ge(nt, n), l = un(nt, n), [a, d] = T.useState(null), f = Pe(t, (A) => d(A)), u = a ? s.form || !!a.closest("form") : !0, c =
|
|
2300
|
+
const { __scopeSlider: n, index: r, name: i, ...o } = e, s = Ge(nt, n), l = un(nt, n), [a, d] = T.useState(null), f = Pe(t, (A) => d(A)), u = a ? s.form || !!a.closest("form") : !0, c = Gn(a), m = s.values[r], p = m === void 0 ? 0 : yn(m, s.min, s.max), g = Xr(r, s.values.length), y = c == null ? void 0 : c[l.size], h = y ? Qr(y, p, l.direction) : 0;
|
|
2301
2301
|
return T.useEffect(() => {
|
|
2302
2302
|
if (a)
|
|
2303
2303
|
return s.thumbs.add(a), () => {
|
|
@@ -2312,7 +2312,7 @@ var nt = "SliderThumb", gn = T.forwardRef(
|
|
|
2312
2312
|
[l.startEdge]: `calc(${p}% + ${h}px)`
|
|
2313
2313
|
},
|
|
2314
2314
|
children: [
|
|
2315
|
-
/* @__PURE__ */
|
|
2315
|
+
/* @__PURE__ */ N(et.ItemSlot, { scope: e.__scopeSlider, children: /* @__PURE__ */ N(
|
|
2316
2316
|
ze.span,
|
|
2317
2317
|
{
|
|
2318
2318
|
role: "slider",
|
|
@@ -2327,12 +2327,12 @@ var nt = "SliderThumb", gn = T.forwardRef(
|
|
|
2327
2327
|
...o,
|
|
2328
2328
|
ref: f,
|
|
2329
2329
|
style: m === void 0 ? { display: "none" } : e.style,
|
|
2330
|
-
onFocus:
|
|
2330
|
+
onFocus: me(e.onFocus, () => {
|
|
2331
2331
|
s.valueIndexToChangeRef.current = r;
|
|
2332
2332
|
})
|
|
2333
2333
|
}
|
|
2334
2334
|
) }),
|
|
2335
|
-
u && /* @__PURE__ */
|
|
2335
|
+
u && /* @__PURE__ */ N(
|
|
2336
2336
|
hn,
|
|
2337
2337
|
{
|
|
2338
2338
|
name: i ?? (s.name ? s.name + (s.values.length > 1 ? "[]" : "") : void 0),
|
|
@@ -2349,7 +2349,7 @@ var nt = "SliderThumb", gn = T.forwardRef(
|
|
|
2349
2349
|
gn.displayName = nt;
|
|
2350
2350
|
var Wr = "RadioBubbleInput", hn = T.forwardRef(
|
|
2351
2351
|
({ __scopeSlider: e, value: t, ...n }, r) => {
|
|
2352
|
-
const i = T.useRef(null), o = Pe(i, r), s =
|
|
2352
|
+
const i = T.useRef(null), o = Pe(i, r), s = Un(t);
|
|
2353
2353
|
return T.useEffect(() => {
|
|
2354
2354
|
const l = i.current;
|
|
2355
2355
|
if (!l) return;
|
|
@@ -2358,7 +2358,7 @@ var Wr = "RadioBubbleInput", hn = T.forwardRef(
|
|
|
2358
2358
|
const u = new Event("input", { bubbles: !0 });
|
|
2359
2359
|
f.call(l, t), l.dispatchEvent(u);
|
|
2360
2360
|
}
|
|
2361
|
-
}, [s, t]), /* @__PURE__ */
|
|
2361
|
+
}, [s, t]), /* @__PURE__ */ N(
|
|
2362
2362
|
ze.input,
|
|
2363
2363
|
{
|
|
2364
2364
|
style: { display: "none" },
|
|
@@ -2370,18 +2370,18 @@ var Wr = "RadioBubbleInput", hn = T.forwardRef(
|
|
|
2370
2370
|
}
|
|
2371
2371
|
);
|
|
2372
2372
|
hn.displayName = Wr;
|
|
2373
|
-
function
|
|
2373
|
+
function jr(e = [], t, n) {
|
|
2374
2374
|
const r = [...e];
|
|
2375
2375
|
return r[n] = t, r.sort((i, o) => i - o);
|
|
2376
2376
|
}
|
|
2377
2377
|
function yn(e, t, n) {
|
|
2378
2378
|
const o = 100 / (n - t) * (e - t);
|
|
2379
|
-
return
|
|
2379
|
+
return At(o, [0, 100]);
|
|
2380
2380
|
}
|
|
2381
|
-
function
|
|
2381
|
+
function Xr(e, t) {
|
|
2382
2382
|
return t > 2 ? `Value ${e + 1} of ${t}` : t === 2 ? ["Minimum", "Maximum"][e] : void 0;
|
|
2383
2383
|
}
|
|
2384
|
-
function
|
|
2384
|
+
function Yr(e, t) {
|
|
2385
2385
|
if (e.length === 1) return 0;
|
|
2386
2386
|
const n = e.map((i) => Math.abs(i - t)), r = Math.min(...n);
|
|
2387
2387
|
return n.indexOf(r);
|
|
@@ -2425,25 +2425,25 @@ const io = T.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ Ne(
|
|
|
2425
2425
|
),
|
|
2426
2426
|
...t,
|
|
2427
2427
|
children: [
|
|
2428
|
-
/* @__PURE__ */
|
|
2429
|
-
/* @__PURE__ */
|
|
2428
|
+
/* @__PURE__ */ N(no, { className: "relative h-2 w-full grow overflow-hidden rounded-full bg-secondary", children: /* @__PURE__ */ N(ro, { className: "absolute h-full bg-primary" }) }),
|
|
2429
|
+
/* @__PURE__ */ N(oo, { className: "block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50" })
|
|
2430
2430
|
]
|
|
2431
2431
|
}
|
|
2432
2432
|
));
|
|
2433
2433
|
io.displayName = vn.displayName;
|
|
2434
|
-
const so = xt(null), lo =
|
|
2434
|
+
const so = xt(null), lo = Kn();
|
|
2435
2435
|
function bn(e) {
|
|
2436
2436
|
const t = rt(so) ?? lo;
|
|
2437
2437
|
return En(t.subscribe, () => e(t.get()), () => e(null));
|
|
2438
2438
|
}
|
|
2439
|
-
function
|
|
2439
|
+
function Io(e) {
|
|
2440
2440
|
return bn(
|
|
2441
|
-
|
|
2441
|
+
G((t) => (t == null ? void 0 : t.slot.zone) === e ? t.outcome : null, [e])
|
|
2442
2442
|
);
|
|
2443
2443
|
}
|
|
2444
|
-
function
|
|
2444
|
+
function Ro(e, t, n) {
|
|
2445
2445
|
return bn(
|
|
2446
|
-
|
|
2446
|
+
G(
|
|
2447
2447
|
(r) => (r == null ? void 0 : r.slot.zone) !== e || r.outcome.kind === "refused" ? null : r.slot.beforeId === t ? "top" : !r.slot.beforeId && n ? "bottom" : null,
|
|
2448
2448
|
[e, t, n]
|
|
2449
2449
|
)
|
|
@@ -2451,18 +2451,18 @@ function Do(e, t, n) {
|
|
|
2451
2451
|
}
|
|
2452
2452
|
export {
|
|
2453
2453
|
Vr as A,
|
|
2454
|
-
|
|
2455
|
-
|
|
2454
|
+
Eo as E,
|
|
2455
|
+
Po as F,
|
|
2456
2456
|
tr as P,
|
|
2457
|
-
|
|
2457
|
+
wo as S,
|
|
2458
2458
|
Tr as T,
|
|
2459
2459
|
Er as a,
|
|
2460
2460
|
Rr as b,
|
|
2461
|
-
|
|
2461
|
+
Co as c,
|
|
2462
2462
|
Fr as d,
|
|
2463
2463
|
io as e,
|
|
2464
|
-
|
|
2465
|
-
|
|
2464
|
+
Io as f,
|
|
2465
|
+
Ro as g,
|
|
2466
2466
|
so as h,
|
|
2467
2467
|
Zt as r,
|
|
2468
2468
|
Qt as u
|