react-semaphor 0.1.564 → 0.1.566
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/DATA_APP_SDK.md +3 -3
- package/README.md +2 -2
- package/dist/analytics-protocol/index.js +8 -8
- package/dist/assistant-context/index.js +3 -2
- package/dist/brand-studio/index.js +28 -29
- package/dist/briefings/index.js +53 -49
- package/dist/chunks/{assistant-chat-D1BEEHUF.js → assistant-chat-DNKAYSQL.js} +204 -204
- package/dist/chunks/{bookmark-impact-XOsVUAqW.js → bookmark-impact-BeUbq0jc.js} +2 -2
- package/dist/chunks/bookmark-state-ByODVqee.js +1613 -0
- package/dist/chunks/card-filter-builder-SXaRWbKr.js +4100 -0
- package/dist/chunks/{switch-BW4yXSYs.js → code-editor-DJNOsgJH.js} +463 -442
- package/dist/chunks/{comparison-window-caption-D1EUXzaR.js → comparison-window-caption-CMLb3mut.js} +451 -419
- package/dist/chunks/{dashboard-DfYsASNd.js → dashboard-Cni7nGhg.js} +1 -1
- package/dist/chunks/dashboard-briefing-launcher-CXeXRTem.js +4910 -0
- package/dist/chunks/{dashboard-controls-CJ8Dz50D.js → dashboard-controls-CsqKybrf.js} +685 -675
- package/dist/chunks/{dashboard-json-D3uZxGO-.js → dashboard-json-WWmw3Piu.js} +4 -4
- package/dist/chunks/{dates-EvDtT25n.js → dates-DJRUS-he.js} +12 -12
- package/dist/chunks/{edit-dashboard-visual-CgHJXBQv.js → edit-dashboard-visual-BrIEaBhc.js} +7724 -10341
- package/dist/chunks/filter-reach-copy-D5LqgrUf.js +4667 -0
- package/dist/chunks/{filter-value-text-CPwFkrMz.js → filter-value-text-7zhmth1S.js} +2 -2
- package/dist/chunks/{index-CAgf2x4E.js → index-Bq9UbCGk.js} +653 -574
- package/dist/chunks/{layout-grid-BM65viQh.js → layout-grid-0hIlqEtk.js} +1 -1
- package/dist/chunks/{list-filter-BoeLBfL3.js → list-filter-DkgoCeBm.js} +1 -1
- package/dist/chunks/{matrix-analytical-definition-hEucouWM.js → matrix-analytical-definition-C9xB_T84.js} +18 -18
- package/dist/chunks/{matrix-card-CCh9JjP1.js → matrix-card-BSUeSXpD.js} +2 -2
- package/dist/chunks/{matrix-member-presentation-DsAUbuoL.js → matrix-member-presentation-DZNgQpUq.js} +1 -1
- package/dist/chunks/{matrix-operation-contract-DsLdFdSa.js → matrix-operation-contract-Eb6elidS.js} +1 -1
- package/dist/chunks/{metric-comparison-Bnso1cm1.js → metric-comparison-ChXUFaZu.js} +1 -1
- package/dist/chunks/{palette-p1XSJFgB.js → palette-4vf2BEEg.js} +1 -1
- package/dist/chunks/{pivot-result-contract-expectations-B53jqszr.js → pivot-result-contract-expectations-Ddh1rNz5.js} +4 -4
- package/dist/chunks/{pivot-result-identity-Dq5jm-EC.js → pivot-result-identity-BlbLrqaC.js} +1 -1
- package/dist/chunks/{report-preferences-dialog-DMqxSU4X.js → report-preferences-dialog-CeHioJwL.js} +122 -131
- package/dist/chunks/{report-runtime-context-BITkNSDa.js → report-runtime-context-DnA_PiKo.js} +1 -1
- package/dist/chunks/resolve-dashboard-input-context-CwS-2r-b.js +21419 -0
- package/dist/chunks/{save-CHV1B1fL.js → save-D6pHmSSP.js} +1 -1
- package/dist/chunks/saved-dashboard-context-c-MZZTx2.js +629 -0
- package/dist/chunks/{selection-reducer-Bz5aywT4.js → selection-reducer-OaJ-N5uN.js} +1 -1
- package/dist/chunks/{semaphor-ready-indicator-CFeCIuaw.js → semaphor-ready-indicator-B2NpYRE-.js} +81034 -80950
- package/dist/chunks/{shelf-drop-preview-context-cEyVkKTF.js → shelf-drop-preview-context-DM7yypwC.js} +407 -407
- package/dist/chunks/{source-entity-resolution-DdDVXFB8.js → source-entity-resolution-DF6GulDn.js} +1 -1
- package/dist/chunks/stored-dashboard-DTWc2pzt.js +5026 -0
- package/dist/chunks/{table-export-sheet-bSXxGn-v.js → table-export-sheet--DUKWk6o.js} +1 -1
- package/dist/chunks/{temporal-input-presentation-sk9gqLi6.js → temporal-input-presentation--2r9BLr0.js} +392 -377
- package/dist/chunks/{token-types-BUK06hU2.js → token-types-C8JymO8s.js} +1 -1
- package/dist/chunks/{upload-BnmuyPqW.js → upload-Cf3wXZT8.js} +1 -1
- package/dist/chunks/{validators-BIM0FE31.js → validators-wtjw0aw6.js} +7 -7
- package/dist/chunks/variable-draft-DFizFCJu.js +241 -0
- package/dist/dashboard/index.js +2 -2
- package/dist/dashboard-authoring/index.js +2324 -1796
- package/dist/data-app-sdk/index.js +4 -4
- package/dist/data-app-sdk-adapters/index.js +2 -2
- package/dist/data-app-sdk-validation/index.js +5 -5
- package/dist/format-utils/index.js +174 -167
- package/dist/index.js +189 -187
- package/dist/pdf-export-policy/index.js +80 -28
- package/dist/pdf-table-layout/index.js +65 -65
- package/dist/report-runtime-context/index.js +1 -1
- package/dist/style.css +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/briefings/attachment-outcomes.d.ts +1 -1
- package/dist/types/briefings/delivery-outcome.d.ts +37 -0
- package/dist/types/briefings/index.d.ts +2 -0
- package/dist/types/briefings/run-outcomes.d.ts +6 -0
- package/dist/types/components/briefings/briefing-author/run-model.d.ts +9 -0
- package/dist/types/components/dashboard-variables/data-variables-menu.d.ts +8 -0
- package/dist/types/components/dashboard-variables/variable-editor-host.d.ts +1 -0
- package/dist/types/components/index.d.ts +2 -0
- package/dist/types/index.js +5 -5
- package/dist/types/lib/dashboard-inputs/build-normalized-dashboard-inputs.d.ts +62 -0
- package/dist/types/lib/dashboard-inputs/dashboard-filter-mapping-authoring.d.ts +33 -2
- package/dist/types/lib/dashboard-inputs/filter-settings.d.ts +7 -2
- package/dist/types/lib/dashboard-inputs/prepare-loaded-dashboard.d.ts +4 -2
- package/dist/types/lib/dashboard-variables/data-text.d.ts +33 -0
- package/dist/types/lib/dashboard-variables/types.d.ts +207 -0
- package/dist/types/lib/document/document-edits.d.ts +16 -1
- package/dist/types/lib/document/document-panel-target.d.ts +1 -1
- package/dist/types/lib/document/document-section-query-options.d.ts +29 -0
- package/dist/types/lib/document/document-table-data-policy.d.ts +0 -1
- package/dist/types/lib/hooks/use-dashboard-frame-query.d.ts +92 -0
- package/dist/types/lib/query-context/build-card-query-context.d.ts +6 -0
- package/dist/types/lib/query-context/dashboard-filter-mapping-resolution.d.ts +15 -3
- package/dist/types/lib/query-context/describe-card-execution-snapshot.d.ts +1 -0
- package/dist/types/lib/query-context/use-semantic-execution-payload-for-cards.d.ts +24 -0
- package/dist/types/lib/stores/dashboard-store.d.ts +36 -0
- package/dist/types/lib/text-variables/temporal-input-text.d.ts +28 -0
- package/dist/types/lib/text-variables/text-variable-types.d.ts +72 -0
- package/dist/types/lib/types/common-types.d.ts +155 -51
- package/dist/types/lib/utils/card-definition.d.ts +2 -2
- package/dist/types/shared/assistant-context/index.d.ts +1 -1
- package/dist/types/shared/assistant-context/saved-dashboard-context.d.ts +51 -1
- package/dist/types/shared/dashboard-authoring/card-query-request.d.ts +7 -1
- package/dist/types/shared/dashboard-authoring/card-settings/resolve-card-highlights.d.ts +10 -0
- package/dist/types/shared/dashboard-authoring/changes/card-query-part.d.ts +1 -0
- package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +1087 -430
- package/dist/types/shared/dashboard-authoring/changes/diagnostics.d.ts +20 -1
- package/dist/types/shared/dashboard-authoring/changes/resolve-dashboard-changes.d.ts +1 -1
- package/dist/types/shared/dashboard-authoring/conditional-formatting/kpi.d.ts +10 -0
- package/dist/types/shared/dashboard-authoring/conditional-formatting/schema.d.ts +40 -40
- package/dist/types/shared/dashboard-authoring/control-execution-contract.d.ts +16 -16
- package/dist/types/shared/dashboard-authoring/dashboard-card-source-index.d.ts +1 -0
- package/dist/types/shared/dashboard-authoring/dashboard-filter-sql-subscription.d.ts +24 -0
- package/dist/types/shared/dashboard-authoring/dashboard-filter-targets.d.ts +29 -0
- package/dist/types/shared/dashboard-authoring/dashboard-input-scope.d.ts +7 -4
- package/dist/types/shared/dashboard-authoring/dashboard-variable-card.d.ts +159 -0
- package/dist/types/shared/dashboard-authoring/dashboard-variable-changes.d.ts +61 -0
- package/dist/types/shared/dashboard-authoring/document-section-cards.d.ts +7 -0
- package/dist/types/shared/dashboard-authoring/filter-model/index.d.ts +2 -0
- package/dist/types/shared/dashboard-authoring/filter-model/read-dashboard-filter-model.d.ts +10 -0
- package/dist/types/shared/dashboard-authoring/index.d.ts +6 -0
- package/dist/types/shared/dashboard-authoring/measure-calculations/comparison.d.ts +2 -0
- package/dist/types/shared/dashboard-authoring/operations/operation-sentences.d.ts +1 -1
- package/dist/types/shared/dashboard-authoring/operations/operation-types.d.ts +50 -3
- package/dist/types/shared/dashboard-authoring/outline/outline-dashboard.d.ts +48 -1
- package/dist/types/shared/dashboard-authoring/outline/outline-filters.d.ts +22 -6
- package/dist/types/shared/dashboard-authoring/text-card-words/blocks.d.ts +87 -13
- package/dist/types/shared/dashboard-authoring/text-card-words/chip-colors.d.ts +23 -0
- package/dist/types/shared/dashboard-authoring/text-card-words/index.d.ts +90 -8
- package/dist/types/shared/dashboard-authoring/text-card-words/rich-content.d.ts +31 -3
- package/dist/types/shared/dashboard-authoring/text-card-words/variable-words.d.ts +8 -0
- package/dist/types/shared/dashboard-authoring/variable-draft.d.ts +125 -0
- package/dist/types/shared/dashboard-authoring/variable-editability.d.ts +24 -0
- package/dist/types/shared/dashboard-authoring/variable-references.d.ts +39 -0
- package/dist/types/shared/format-utils/document-print.d.ts +4 -2
- package/dist/types/shared/format-utils/index.d.ts +1 -0
- package/dist/types/shared/format-utils/pdf-capacity-lines.d.ts +17 -0
- package/dist/types/shared/format-utils/pdf-delivery.d.ts +8 -1
- package/dist/types/shared/format-utils/pdf-export-policy.d.ts +74 -6
- package/dist/types/shared/format-utils/presentation-execution.d.ts +9 -0
- package/package.json +2 -2
- package/src/data-app-sdk/README.md +3 -3
- package/dist/chunks/bookmark-state-CWeoGbrx.js +0 -743
- package/dist/chunks/braces-DzgoQC64.js +0 -23
- package/dist/chunks/dashboard-briefing-launcher-lvYfJoUQ.js +0 -3878
- package/dist/chunks/filter-reach-copy-Cmb05jlE.js +0 -3965
- package/dist/chunks/global-date-filter-utils-ruJYwjgZ.js +0 -16733
- package/dist/chunks/resolve-dashboard-input-context-i_jCSYae.js +0 -8214
- package/dist/chunks/saved-dashboard-context-Dg3oDmH_.js +0 -564
- package/dist/chunks/use-create-flow-overlay-state-Dl6DCxh8.js +0 -1436
package/dist/chunks/{report-preferences-dialog-DMqxSU4X.js → report-preferences-dialog-CeHioJwL.js}
RENAMED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { jsx as o, Fragment as te, jsxs as h } from "react/jsx-runtime";
|
|
2
2
|
import * as p from "react";
|
|
3
|
-
import
|
|
4
|
-
import { b as Wt,
|
|
3
|
+
import jt, { useMemo as ee, useState as L, useEffect as J, createContext as $t, useRef as j, useCallback as K, useContext as qe, lazy as Ee, Suspense as Se, useLayoutEffect as Ce, Activity as Vt, useId as de } from "react";
|
|
4
|
+
import { b as Wt, aU as He, b4 as Kt, b5 as qt, u as U, b6 as gt, x as Ht, b7 as Gt, b8 as Jt, b9 as Xt, ba as Yt, bb as ge, bc as yt, bd as tt, be as Zt, Z as ye, Y as Qt, bf as ea, bg as ta, _ as at, $ as aa, bh as ra, E as na, F as sa, S as la, B as oa, a as ia, U as da, bi as ca, D as ua, A as fa, C as ma, bj as ha, bk as pa, bl as va, bm as ba, bn as ga, bo as ya, bp as rt, bq as ke, br as wa, bs as Ge, bt as G, bu as Sa, bv as xa, bw as Ca, bx as Ia, by as Ea } from "./semaphor-ready-indicator-B2NpYRE-.js";
|
|
5
5
|
import { j as Na } from "./index-CuHybtft.js";
|
|
6
|
-
import {
|
|
6
|
+
import { ay as Ta } from "./bookmark-state-ByODVqee.js";
|
|
7
7
|
import { r as ka, a as wt } from "./availability-Bp5Gfu1I.js";
|
|
8
|
-
import { s as Aa } from "./
|
|
9
|
-
import { B as q, Q as Ra, U as Da, V as _a, W as Pa, Y as Oa, Z as La, _ as oe, D as Q, $ as he,
|
|
10
|
-
import "./validators-
|
|
11
|
-
import "./matrix-operation-contract-
|
|
8
|
+
import { s as Aa } from "./resolve-dashboard-input-context-CwS-2r-b.js";
|
|
9
|
+
import { B as q, Q as Ra, U as Da, V as _a, W as Pa, Y as Oa, Z as La, _ as oe, D as Q, $ as he, n as pe, P as za, a as Fa, d as Ua, e as nt, L as St, t as ze, u as Fe, v as Ue, w as Me, x as Y, T as Ma, f as Ba, g as st, i as lt } from "./code-editor-DJNOsgJH.js";
|
|
10
|
+
import "./validators-wtjw0aw6.js";
|
|
11
|
+
import "./matrix-operation-contract-Eb6elidS.js";
|
|
12
12
|
import "./analytics-base-schemas-BaIQrEzX.js";
|
|
13
13
|
import "zod";
|
|
14
|
-
import { parseValueFormatPreferencesResponse as
|
|
14
|
+
import { parseValueFormatPreferencesResponse as ja, canonicalizeSupportedLocale as xt, getSupportedCurrencyCodes as $a, canonicalizeSupportedCurrencyCode as Va } from "../value-format-preferences/index.js";
|
|
15
15
|
import { c as B } from "./_commonjsHelpers-DimLPMtv.js";
|
|
16
|
-
import {
|
|
17
|
-
import { a as Ka } from "./report-runtime-context-
|
|
18
|
-
import {
|
|
16
|
+
import { j as Wa } from "./filter-reach-copy-D5LqgrUf.js";
|
|
17
|
+
import { a as Ka } from "./report-runtime-context-DnA_PiKo.js";
|
|
18
|
+
import { ah as we, ao as ce } from "./temporal-input-presentation--2r9BLr0.js";
|
|
19
19
|
function qa() {
|
|
20
20
|
return /* @__PURE__ */ o(
|
|
21
21
|
"div",
|
|
@@ -115,9 +115,9 @@ const sr = {
|
|
|
115
115
|
anchorSlot: null,
|
|
116
116
|
setAnchorSlot: () => {
|
|
117
117
|
}
|
|
118
|
-
}, Je =
|
|
119
|
-
function
|
|
120
|
-
const [e, a] = L("lg"), t =
|
|
118
|
+
}, Je = $t(sr);
|
|
119
|
+
function Tn() {
|
|
120
|
+
const [e, a] = L("lg"), t = j(null);
|
|
121
121
|
return { measure: K((r) => {
|
|
122
122
|
var s;
|
|
123
123
|
if ((s = t.current) == null || s.disconnect(), t.current = null, !r || typeof ResizeObserver > "u") return;
|
|
@@ -130,15 +130,15 @@ function kn() {
|
|
|
130
130
|
function lr() {
|
|
131
131
|
return qe(Je).width;
|
|
132
132
|
}
|
|
133
|
-
function
|
|
133
|
+
function kn() {
|
|
134
134
|
return qe(Je).overflowItems;
|
|
135
135
|
}
|
|
136
|
-
function
|
|
137
|
-
const n = qe(Je), r = n.hasOverflowMenu && !nr(a, n.width), { register: l, setOpenOverflowId: s } = n, i = t == null ? void 0 : t.label, m = t == null ? void 0 : t.hint, u = t == null ? void 0 : t.checked, y = (t == null ? void 0 : t.order) ?? 0, c =
|
|
136
|
+
function An(e, a, t) {
|
|
137
|
+
const n = qe(Je), r = n.hasOverflowMenu && !nr(a, n.width), { register: l, setOpenOverflowId: s } = n, i = t == null ? void 0 : t.label, m = t == null ? void 0 : t.hint, u = t == null ? void 0 : t.checked, y = (t == null ? void 0 : t.order) ?? 0, c = j(t == null ? void 0 : t.icon);
|
|
138
138
|
c.current = t == null ? void 0 : t.icon;
|
|
139
|
-
const v =
|
|
139
|
+
const v = j(t == null ? void 0 : t.onSelect);
|
|
140
140
|
v.current = t == null ? void 0 : t.onSelect;
|
|
141
|
-
const f =
|
|
141
|
+
const f = j(t == null ? void 0 : t.onOpen);
|
|
142
142
|
return f.current = t == null ? void 0 : t.onOpen, J(() => {
|
|
143
143
|
if (!(!r || i === void 0))
|
|
144
144
|
return l({
|
|
@@ -163,8 +163,8 @@ function Rn(e, a, t) {
|
|
|
163
163
|
anchorSlot: n.anchorSlot
|
|
164
164
|
};
|
|
165
165
|
}
|
|
166
|
-
const or = Ee(() => import("./assistant-chat-
|
|
167
|
-
function
|
|
166
|
+
const or = Ee(() => import("./assistant-chat-DNKAYSQL.js"));
|
|
167
|
+
function Rn() {
|
|
168
168
|
const e = Ht(), a = lr();
|
|
169
169
|
if (!e.available) return null;
|
|
170
170
|
const t = a !== "lg";
|
|
@@ -256,7 +256,7 @@ function fr(e, a, t) {
|
|
|
256
256
|
}
|
|
257
257
|
function mr(e, a) {
|
|
258
258
|
var w;
|
|
259
|
-
const [t, n] = L(void 0), [r, l] = L(void 0), s =
|
|
259
|
+
const [t, n] = L(void 0), [r, l] = L(void 0), s = j(a);
|
|
260
260
|
Ce(() => {
|
|
261
261
|
s.current = a;
|
|
262
262
|
});
|
|
@@ -316,7 +316,7 @@ function pr({
|
|
|
316
316
|
size: a,
|
|
317
317
|
side: t
|
|
318
318
|
}) {
|
|
319
|
-
const n =
|
|
319
|
+
const n = j(void 0), r = t === "left" ? -1 : 1, l = (s) => {
|
|
320
320
|
const i = n.current;
|
|
321
321
|
return {
|
|
322
322
|
width: i.start.width + r * (s.clientX - i.x),
|
|
@@ -362,7 +362,7 @@ function pr({
|
|
|
362
362
|
}
|
|
363
363
|
const le = 16, Ct = 0.6;
|
|
364
364
|
function vr({ instance: e, side: a, width: t }) {
|
|
365
|
-
const n =
|
|
365
|
+
const n = j(void 0), r = (c) => {
|
|
366
366
|
var f, w;
|
|
367
367
|
const v = (w = (f = c.closest("aside")) == null ? void 0 : f.parentElement) == null ? void 0 : w.clientWidth;
|
|
368
368
|
return v ? v * Ct : ge.max;
|
|
@@ -424,7 +424,7 @@ function br(e) {
|
|
|
424
424
|
const l = Wa(t.basedOn, t.operations, t.context);
|
|
425
425
|
if (!l.ok) return { ok: !1, reason: "refused", message: l.failedAt.message };
|
|
426
426
|
const s = { domainsById: {} };
|
|
427
|
-
for (const i of
|
|
427
|
+
for (const i of l.queryFrames) {
|
|
428
428
|
const m = await a(i, { reuseLoaded: !0 }).catch((u) => {
|
|
429
429
|
console.warn("Applying the change without refreshed semantic metadata:", u);
|
|
430
430
|
});
|
|
@@ -436,16 +436,7 @@ function br(e) {
|
|
|
436
436
|
);
|
|
437
437
|
}
|
|
438
438
|
function gr(e) {
|
|
439
|
-
const a =
|
|
440
|
-
...e.created.filter((t) => t.kind === "card").map((t) => t.id),
|
|
441
|
-
...e.touched
|
|
442
|
-
]);
|
|
443
|
-
return (e.dashboard.sheets ?? []).flatMap(
|
|
444
|
-
(t) => (t.frames ?? []).filter((n) => (n.cards ?? []).some((r) => a.has(r.id)))
|
|
445
|
-
);
|
|
446
|
-
}
|
|
447
|
-
function yr(e) {
|
|
448
|
-
const { canEditDashboard: a, isInspectionMode: t } = ea(), n = ta(), r = U(at), l = e && n && a === !0 && !t, s = $(l);
|
|
439
|
+
const { canEditDashboard: a, isInspectionMode: t } = ea(), n = ta(), r = U(at), l = e && n && a === !0 && !t, s = j(l);
|
|
449
440
|
Ce(() => {
|
|
450
441
|
s.current = l;
|
|
451
442
|
});
|
|
@@ -466,14 +457,14 @@ const It = {
|
|
|
466
457
|
changedSince: "Changed since. Cancel discards every unsaved change.",
|
|
467
458
|
closeEditorToUndo: "Close the editor to undo."
|
|
468
459
|
};
|
|
469
|
-
function
|
|
460
|
+
function yr({
|
|
470
461
|
port: e,
|
|
471
462
|
onLifecycleEvent: a
|
|
472
463
|
}) {
|
|
473
|
-
const { canChange: t, canChangeNow: n } =
|
|
464
|
+
const { canChange: t, canChangeNow: n } = gr(!0), r = U((f) => {
|
|
474
465
|
var w;
|
|
475
466
|
return (w = f.dashboard) == null ? void 0 : w.id;
|
|
476
|
-
}), l = br(n), [s, i] = L(null), m =
|
|
467
|
+
}), l = br(n), [s, i] = L(null), m = j(/* @__PURE__ */ new Map()), u = j(/* @__PURE__ */ new Map()), y = j(Promise.resolve()), c = j({ apply: l, onLifecycleEvent: a });
|
|
477
468
|
Ce(() => {
|
|
478
469
|
c.current = { apply: l, onLifecycleEvent: a };
|
|
479
470
|
}), J(() => {
|
|
@@ -493,7 +484,7 @@ function wr({
|
|
|
493
484
|
const f = (b) => {
|
|
494
485
|
const S = U.getState().dashboard;
|
|
495
486
|
if (!S || S.id !== b.dashboardId) return;
|
|
496
|
-
const C =
|
|
487
|
+
const C = xr();
|
|
497
488
|
m.current.set(C, S), e.answerCopyRequest({
|
|
498
489
|
kind: "uploaded",
|
|
499
490
|
screenId: e.screenId,
|
|
@@ -523,7 +514,7 @@ function wr({
|
|
|
523
514
|
}
|
|
524
515
|
}
|
|
525
516
|
);
|
|
526
|
-
P =
|
|
517
|
+
P = Sr(H, I);
|
|
527
518
|
}
|
|
528
519
|
if (u.current.set(b.deliveryId, P), e.reportOutcome({ screenId: e.screenId, deliveryId: b.deliveryId, outcome: P }), P.status !== "applied") return;
|
|
529
520
|
const N = ((g = U.getState().dashboard) == null ? void 0 : g.id) ?? "";
|
|
@@ -554,9 +545,9 @@ function wr({
|
|
|
554
545
|
payload: { deliveryId: s.deliveryId, summary: s.summary }
|
|
555
546
|
}), i(null)) : f.reason === "changed_since" ? i({ ...s, words: "changed_since" }) : f.reason === "not_editable" ? i({ ...s, words: "not_editable" }) : i(null);
|
|
556
547
|
}, [s]);
|
|
557
|
-
return s ? /* @__PURE__ */ o(
|
|
548
|
+
return s ? /* @__PURE__ */ o(wr, { note: s, onUndo: v }) : null;
|
|
558
549
|
}
|
|
559
|
-
function
|
|
550
|
+
function wr({ note: e, onUndo: a }) {
|
|
560
551
|
const t = U((s) => aa(s, e.proposalId)), n = U((s) => s.isVisualEditing);
|
|
561
552
|
if (t === "none" && e.words === null) return null;
|
|
562
553
|
const r = e.words === "changed_since" || t === "changed_since", l = r ? "changed_since" : e.words === "not_editable" ? "not_editable" : t;
|
|
@@ -594,7 +585,7 @@ function Sr({ note: e, onUndo: a }) {
|
|
|
594
585
|
}
|
|
595
586
|
);
|
|
596
587
|
}
|
|
597
|
-
function
|
|
588
|
+
function Sr(e, a) {
|
|
598
589
|
if (e.ok) return { status: "applied" };
|
|
599
590
|
switch (e.reason) {
|
|
600
591
|
case "dashboard_changed":
|
|
@@ -611,13 +602,13 @@ function xr(e, a) {
|
|
|
611
602
|
function xe(e) {
|
|
612
603
|
return { status: "not_applied", reason: e, message: It[e] };
|
|
613
604
|
}
|
|
614
|
-
function
|
|
605
|
+
function xr() {
|
|
615
606
|
return globalThis.crypto.randomUUID();
|
|
616
607
|
}
|
|
617
|
-
const
|
|
618
|
-
() => import("./edit-dashboard-visual-
|
|
619
|
-
),
|
|
620
|
-
function
|
|
608
|
+
const Cr = Ee(() => import("./dashboard-controls-CsqKybrf.js")), Ir = Ee(
|
|
609
|
+
() => import("./edit-dashboard-visual-BrIEaBhc.js")
|
|
610
|
+
), Er = Ee(() => import("./dashboard-json-WWmw3Piu.js"));
|
|
611
|
+
function Dn({
|
|
621
612
|
showControls: e = !1,
|
|
622
613
|
showFooter: a = !0,
|
|
623
614
|
liveScreen: t,
|
|
@@ -645,13 +636,13 @@ function _n({
|
|
|
645
636
|
}
|
|
646
637
|
),
|
|
647
638
|
/* @__PURE__ */ h(ua, { preferences: i, children: [
|
|
648
|
-
l && /* @__PURE__ */ o(Se, { fallback: null, children: /* @__PURE__ */ o(
|
|
639
|
+
l && /* @__PURE__ */ o(Se, { fallback: null, children: /* @__PURE__ */ o(Er, {}) }),
|
|
649
640
|
/* @__PURE__ */ o(fa, { children: /* @__PURE__ */ o(Ya, { children: /* @__PURE__ */ h("main", { className: "relative flex h-full w-full flex-col overflow-hidden", children: [
|
|
650
|
-
e && /* @__PURE__ */ o(Se, { fallback: null, children: /* @__PURE__ */ o(
|
|
651
|
-
t && /* @__PURE__ */ o(
|
|
641
|
+
e && /* @__PURE__ */ o(Se, { fallback: null, children: /* @__PURE__ */ o(Cr, {}) }),
|
|
642
|
+
t && /* @__PURE__ */ o(yr, { port: t, onLifecycleEvent: n.onDashboardLifecycleEvent }),
|
|
652
643
|
/* @__PURE__ */ h("div", { className: "relative flex grow overflow-hidden", children: [
|
|
653
644
|
/* @__PURE__ */ o("div", { className: "flex min-w-0 flex-1", children: /* @__PURE__ */ h(ma, { ...n, type: "dashboard", children: [
|
|
654
|
-
r && /* @__PURE__ */ o(Se, { fallback: null, children: /* @__PURE__ */ o(
|
|
645
|
+
r && /* @__PURE__ */ o(Se, { fallback: null, children: /* @__PURE__ */ o(Ir, {}) }),
|
|
655
646
|
/* @__PURE__ */ o(Vt, { mode: r ? "hidden" : "visible", children: /* @__PURE__ */ o(qa, {}) })
|
|
656
647
|
] }) }),
|
|
657
648
|
/* @__PURE__ */ o(ur, {})
|
|
@@ -661,25 +652,25 @@ function _n({
|
|
|
661
652
|
] })
|
|
662
653
|
] }) }) });
|
|
663
654
|
}
|
|
664
|
-
var ct = 1,
|
|
655
|
+
var ct = 1, Nr = 0.9, Tr = 0.8, kr = 0.17, Ae = 0.1, Re = 0.999, Ar = 0.9999, Rr = 0.99, Dr = /[\\\/_+.#"@\[\(\{&]/, _r = /[\\\/_+.#"@\[\(\{&]/g, Pr = /[\s-]/, Et = /[\s-]/g;
|
|
665
656
|
function Be(e, a, t, n, r, l, s) {
|
|
666
|
-
if (l === a.length) return r === e.length ? ct :
|
|
657
|
+
if (l === a.length) return r === e.length ? ct : Rr;
|
|
667
658
|
var i = `${r},${l}`;
|
|
668
659
|
if (s[i] !== void 0) return s[i];
|
|
669
|
-
for (var m = n.charAt(l), u = t.indexOf(m, r), y = 0, c, v, f, w; u >= 0; ) c = Be(e, a, t, n, u + 1, l + 1, s), c > y && (u === r ? c *= ct :
|
|
660
|
+
for (var m = n.charAt(l), u = t.indexOf(m, r), y = 0, c, v, f, w; u >= 0; ) c = Be(e, a, t, n, u + 1, l + 1, s), c > y && (u === r ? c *= ct : Dr.test(e.charAt(u - 1)) ? (c *= Tr, f = e.slice(r, u - 1).match(_r), f && r > 0 && (c *= Math.pow(Re, f.length))) : Pr.test(e.charAt(u - 1)) ? (c *= Nr, w = e.slice(r, u - 1).match(Et), w && r > 0 && (c *= Math.pow(Re, w.length))) : (c *= kr, r > 0 && (c *= Math.pow(Re, u - r))), e.charAt(u) !== a.charAt(l) && (c *= Ar)), (c < Ae && t.charAt(u - 1) === n.charAt(l + 1) || n.charAt(l + 1) === n.charAt(l) && t.charAt(u - 1) !== n.charAt(l)) && (v = Be(e, a, t, n, u + 1, l + 2, s), v * Ae > c && (c = v * Ae)), c > y && (y = c), u = t.indexOf(m, u + 1);
|
|
670
661
|
return s[i] = y, y;
|
|
671
662
|
}
|
|
672
663
|
function ut(e) {
|
|
673
664
|
return e.toLowerCase().replace(Et, " ");
|
|
674
665
|
}
|
|
675
|
-
function
|
|
666
|
+
function Or(e, a, t) {
|
|
676
667
|
return e = t && t.length > 0 ? `${e + " " + t.join(" ")}` : e, Be(e, a, ut(e), ut(a), 0, 0, {});
|
|
677
668
|
}
|
|
678
|
-
var fe = '[cmdk-group=""]', De = '[cmdk-group-items=""]',
|
|
669
|
+
var fe = '[cmdk-group=""]', De = '[cmdk-group-items=""]', Lr = '[cmdk-group-heading=""]', Nt = '[cmdk-item=""]', ft = `${Nt}:not([aria-disabled="true"])`, je = "cmdk-item-select", ne = "data-value", zr = (e, a, t) => Or(e, a, t), Tt = p.createContext(void 0), ve = () => p.useContext(Tt), kt = p.createContext(void 0), Xe = () => p.useContext(kt), At = p.createContext(void 0), Rt = p.forwardRef((e, a) => {
|
|
679
670
|
let t = se(() => {
|
|
680
671
|
var d, T;
|
|
681
672
|
return { search: "", value: (T = (d = e.value) != null ? d : e.defaultValue) != null ? T : "", selectedItemId: void 0, filtered: { count: 0, items: /* @__PURE__ */ new Map(), groups: /* @__PURE__ */ new Set() } };
|
|
682
|
-
}), n = se(() => /* @__PURE__ */ new Set()), r = se(() => /* @__PURE__ */ new Map()), l = se(() => /* @__PURE__ */ new Map()), s = se(() => /* @__PURE__ */ new Set()), i = Dt(e), { label: m, children: u, value: y, onValueChange: c, filter: v, shouldFilter: f, loop: w, disablePointerSelection: b = !1, vimBindings: S = !0, ...C } = e, _ = oe(), z = oe(), F = oe(), P = p.useRef(null), N =
|
|
673
|
+
}), n = se(() => /* @__PURE__ */ new Set()), r = se(() => /* @__PURE__ */ new Map()), l = se(() => /* @__PURE__ */ new Map()), s = se(() => /* @__PURE__ */ new Set()), i = Dt(e), { label: m, children: u, value: y, onValueChange: c, filter: v, shouldFilter: f, loop: w, disablePointerSelection: b = !1, vimBindings: S = !0, ...C } = e, _ = oe(), z = oe(), F = oe(), P = p.useRef(null), N = Hr();
|
|
683
674
|
ae(() => {
|
|
684
675
|
if (y !== void 0) {
|
|
685
676
|
let d = y.trim();
|
|
@@ -728,7 +719,7 @@ var fe = '[cmdk-group=""]', De = '[cmdk-group-items=""]', zr = '[cmdk-group-head
|
|
|
728
719
|
}), filter: () => i.current.shouldFilter, label: m || e["aria-label"], getDisablePointerSelection: () => i.current.disablePointerSelection, listId: _, inputId: F, labelId: z, listInnerRef: P }), []);
|
|
729
720
|
function R(d, T) {
|
|
730
721
|
var A, x;
|
|
731
|
-
let D = (x = (A = i.current) == null ? void 0 : A.filter) != null ? x :
|
|
722
|
+
let D = (x = (A = i.current) == null ? void 0 : A.filter) != null ? x : zr;
|
|
732
723
|
return d ? D(d, t.current.search, T) : 0;
|
|
733
724
|
}
|
|
734
725
|
function I() {
|
|
@@ -780,7 +771,7 @@ var fe = '[cmdk-group=""]', De = '[cmdk-group-items=""]', zr = '[cmdk-group-head
|
|
|
780
771
|
function re() {
|
|
781
772
|
var d, T, A;
|
|
782
773
|
let x = X();
|
|
783
|
-
x && (((d = x.parentElement) == null ? void 0 : d.firstChild) === x && ((A = (T = x.closest(fe)) == null ? void 0 : T.querySelector(
|
|
774
|
+
x && (((d = x.parentElement) == null ? void 0 : d.firstChild) === x && ((A = (T = x.closest(fe)) == null ? void 0 : T.querySelector(Lr)) == null || A.scrollIntoView({ block: "nearest" })), x.scrollIntoView({ block: "nearest" }));
|
|
784
775
|
}
|
|
785
776
|
function X() {
|
|
786
777
|
var d;
|
|
@@ -801,7 +792,7 @@ var fe = '[cmdk-group=""]', De = '[cmdk-group-items=""]', zr = '[cmdk-group-head
|
|
|
801
792
|
}
|
|
802
793
|
function Ye(d) {
|
|
803
794
|
let T = X(), A = T == null ? void 0 : T.closest(fe), x;
|
|
804
|
-
for (; A && !x; ) A = d > 0 ?
|
|
795
|
+
for (; A && !x; ) A = d > 0 ? Kr(A, fe) : qr(A, fe), x = A == null ? void 0 : A.querySelector(ft);
|
|
805
796
|
x ? g.setState("value", x.getAttribute(ne)) : Te(d);
|
|
806
797
|
}
|
|
807
798
|
let Ze = () => ie(k().length - 1), Qe = (d) => {
|
|
@@ -844,13 +835,13 @@ var fe = '[cmdk-group=""]', De = '[cmdk-group-items=""]', zr = '[cmdk-group-head
|
|
|
844
835
|
d.preventDefault();
|
|
845
836
|
let x = X();
|
|
846
837
|
if (x) {
|
|
847
|
-
let D = new Event(
|
|
838
|
+
let D = new Event(je);
|
|
848
839
|
x.dispatchEvent(D);
|
|
849
840
|
}
|
|
850
841
|
}
|
|
851
842
|
}
|
|
852
|
-
} }, p.createElement("label", { "cmdk-label": "", htmlFor: E.inputId, id: E.labelId, style:
|
|
853
|
-
}),
|
|
843
|
+
} }, p.createElement("label", { "cmdk-label": "", htmlFor: E.inputId, id: E.labelId, style: Jr }, m), Ne(e, (d) => p.createElement(kt.Provider, { value: g }, p.createElement(Tt.Provider, { value: E }, d))));
|
|
844
|
+
}), Fr = p.forwardRef((e, a) => {
|
|
854
845
|
var t, n;
|
|
855
846
|
let r = oe(), l = p.useRef(null), s = p.useContext(At), i = ve(), m = Dt(e), u = (n = (t = m.current) == null ? void 0 : t.forceMount) != null ? n : s == null ? void 0 : s.forceMount;
|
|
856
847
|
ae(() => {
|
|
@@ -859,7 +850,7 @@ var fe = '[cmdk-group=""]', De = '[cmdk-group-items=""]', zr = '[cmdk-group-head
|
|
|
859
850
|
let y = _t(r, l, [e.value, e.children, l], e.keywords), c = Xe(), v = Z((N) => N.value && N.value === y.current), f = Z((N) => u || i.filter() === !1 ? !0 : N.search ? N.filtered.items.get(r) > 0 : !0);
|
|
860
851
|
p.useEffect(() => {
|
|
861
852
|
let N = l.current;
|
|
862
|
-
if (!(!N || e.disabled)) return N.addEventListener(
|
|
853
|
+
if (!(!N || e.disabled)) return N.addEventListener(je, w), () => N.removeEventListener(je, w);
|
|
863
854
|
}, [f, e.onSelect, e.disabled]);
|
|
864
855
|
function w() {
|
|
865
856
|
var N, g;
|
|
@@ -871,15 +862,15 @@ var fe = '[cmdk-group=""]', De = '[cmdk-group-items=""]', zr = '[cmdk-group-head
|
|
|
871
862
|
if (!f) return null;
|
|
872
863
|
let { disabled: S, value: C, onSelect: _, forceMount: z, keywords: F, ...P } = e;
|
|
873
864
|
return p.createElement(Q.div, { ref: he(l, a), ...P, id: r, "cmdk-item": "", role: "option", "aria-disabled": !!S, "aria-selected": !!v, "data-disabled": !!S, "data-selected": !!v, onPointerMove: S || i.getDisablePointerSelection() ? void 0 : b, onClick: S ? void 0 : w }, e.children);
|
|
874
|
-
}),
|
|
865
|
+
}), Ur = p.forwardRef((e, a) => {
|
|
875
866
|
let { heading: t, children: n, forceMount: r, ...l } = e, s = oe(), i = p.useRef(null), m = p.useRef(null), u = oe(), y = ve(), c = Z((f) => r || y.filter() === !1 ? !0 : f.search ? f.filtered.groups.has(s) : !0);
|
|
876
867
|
ae(() => y.group(s), []), _t(s, i, [e.value, e.heading, m]);
|
|
877
868
|
let v = p.useMemo(() => ({ id: s, forceMount: r }), [r]);
|
|
878
869
|
return p.createElement(Q.div, { ref: he(i, a), ...l, "cmdk-group": "", role: "presentation", hidden: c ? void 0 : !0 }, t && p.createElement("div", { ref: m, "cmdk-group-heading": "", "aria-hidden": !0, id: u }, t), Ne(e, (f) => p.createElement("div", { "cmdk-group-items": "", role: "group", "aria-labelledby": t ? u : void 0 }, p.createElement(At.Provider, { value: v }, f))));
|
|
879
|
-
}),
|
|
870
|
+
}), Mr = p.forwardRef((e, a) => {
|
|
880
871
|
let { alwaysRender: t, ...n } = e, r = p.useRef(null), l = Z((s) => !s.search);
|
|
881
872
|
return !t && !l ? null : p.createElement(Q.div, { ref: he(r, a), ...n, "cmdk-separator": "", role: "separator" });
|
|
882
|
-
}),
|
|
873
|
+
}), Br = p.forwardRef((e, a) => {
|
|
883
874
|
let { onValueChange: t, ...n } = e, r = e.value != null, l = Xe(), s = Z((u) => u.search), i = Z((u) => u.selectedItemId), m = ve();
|
|
884
875
|
return p.useEffect(() => {
|
|
885
876
|
e.value != null && l.setState("search", e.value);
|
|
@@ -901,21 +892,21 @@ var fe = '[cmdk-group=""]', De = '[cmdk-group-items=""]', zr = '[cmdk-group-head
|
|
|
901
892
|
};
|
|
902
893
|
}
|
|
903
894
|
}, []), p.createElement(Q.div, { ref: he(l, a), ...r, "cmdk-list": "", role: "listbox", tabIndex: -1, "aria-activedescendant": i, "aria-label": n, id: m.listId }, Ne(e, (u) => p.createElement("div", { ref: he(s, m.listInnerRef), "cmdk-list-sizer": "" }, u)));
|
|
904
|
-
}),
|
|
895
|
+
}), $r = p.forwardRef((e, a) => {
|
|
905
896
|
let { open: t, onOpenChange: n, overlayClassName: r, contentClassName: l, container: s, ...i } = e;
|
|
906
897
|
return p.createElement(ha, { open: t, onOpenChange: n }, p.createElement(pa, { container: s }, p.createElement(va, { "cmdk-overlay": "", className: r }), p.createElement(ba, { "aria-label": e.label, "cmdk-dialog": "", className: l }, p.createElement(Rt, { ref: a, ...i }))));
|
|
907
|
-
}),
|
|
898
|
+
}), Vr = p.forwardRef((e, a) => Z((t) => t.filtered.count === 0) ? p.createElement(Q.div, { ref: a, ...e, "cmdk-empty": "", role: "presentation" }) : null), Wr = p.forwardRef((e, a) => {
|
|
908
899
|
let { progress: t, children: n, label: r = "Loading...", ...l } = e;
|
|
909
900
|
return p.createElement(Q.div, { ref: a, ...l, "cmdk-loading": "", role: "progressbar", "aria-valuenow": t, "aria-valuemin": 0, "aria-valuemax": 100, "aria-label": r }, Ne(e, (s) => p.createElement("div", { "aria-hidden": !0 }, s)));
|
|
910
|
-
}),
|
|
911
|
-
function
|
|
901
|
+
}), $ = Object.assign(Rt, { List: jr, Item: Fr, Input: Br, Group: Ur, Separator: Mr, Dialog: $r, Empty: Vr, Loading: Wr });
|
|
902
|
+
function Kr(e, a) {
|
|
912
903
|
let t = e.nextElementSibling;
|
|
913
904
|
for (; t; ) {
|
|
914
905
|
if (t.matches(a)) return t;
|
|
915
906
|
t = t.nextElementSibling;
|
|
916
907
|
}
|
|
917
908
|
}
|
|
918
|
-
function
|
|
909
|
+
function qr(e, a) {
|
|
919
910
|
let t = e.previousElementSibling;
|
|
920
911
|
for (; t; ) {
|
|
921
912
|
if (t.matches(a)) return t;
|
|
@@ -951,7 +942,7 @@ function _t(e, a, t, n = []) {
|
|
|
951
942
|
l.value(e, i, m), (s = a.current) == null || s.setAttribute(ne, i), r.current = i;
|
|
952
943
|
}), r;
|
|
953
944
|
}
|
|
954
|
-
var
|
|
945
|
+
var Hr = () => {
|
|
955
946
|
let [e, a] = p.useState(), t = se(() => /* @__PURE__ */ new Map());
|
|
956
947
|
return ae(() => {
|
|
957
948
|
t.current.forEach((n) => n()), t.current = /* @__PURE__ */ new Map();
|
|
@@ -959,16 +950,16 @@ var Gr = () => {
|
|
|
959
950
|
t.current.set(n, r), a({});
|
|
960
951
|
};
|
|
961
952
|
};
|
|
962
|
-
function
|
|
953
|
+
function Gr(e) {
|
|
963
954
|
let a = e.type;
|
|
964
955
|
return typeof a == "function" ? a(e.props) : "render" in a ? a.render(e.props) : e;
|
|
965
956
|
}
|
|
966
957
|
function Ne({ asChild: e, children: a }, t) {
|
|
967
|
-
return e && p.isValidElement(a) ? p.cloneElement(
|
|
958
|
+
return e && p.isValidElement(a) ? p.cloneElement(Gr(a), { ref: a.ref }, t(a.props.children)) : t(a);
|
|
968
959
|
}
|
|
969
|
-
var
|
|
960
|
+
var Jr = { position: "absolute", width: "1px", height: "1px", padding: "0", margin: "-1px", overflow: "hidden", clip: "rect(0, 0, 0, 0)", whiteSpace: "nowrap", borderWidth: "0" };
|
|
970
961
|
const Pt = p.forwardRef(({ className: e, ...a }, t) => /* @__PURE__ */ o(
|
|
971
|
-
|
|
962
|
+
$,
|
|
972
963
|
{
|
|
973
964
|
ref: t,
|
|
974
965
|
className: B(
|
|
@@ -978,11 +969,11 @@ const Pt = p.forwardRef(({ className: e, ...a }, t) => /* @__PURE__ */ o(
|
|
|
978
969
|
...a
|
|
979
970
|
}
|
|
980
971
|
));
|
|
981
|
-
Pt.displayName =
|
|
972
|
+
Pt.displayName = $.displayName;
|
|
982
973
|
const Ot = p.forwardRef(({ className: e, ...a }, t) => /* @__PURE__ */ h("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
|
|
983
974
|
/* @__PURE__ */ o(ga, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
|
|
984
975
|
/* @__PURE__ */ o(
|
|
985
|
-
|
|
976
|
+
$.Input,
|
|
986
977
|
{
|
|
987
978
|
ref: t,
|
|
988
979
|
className: B(
|
|
@@ -993,27 +984,27 @@ const Ot = p.forwardRef(({ className: e, ...a }, t) => /* @__PURE__ */ h("div",
|
|
|
993
984
|
}
|
|
994
985
|
)
|
|
995
986
|
] }));
|
|
996
|
-
Ot.displayName =
|
|
987
|
+
Ot.displayName = $.Input.displayName;
|
|
997
988
|
const Lt = p.forwardRef(({ className: e, ...a }, t) => /* @__PURE__ */ o(
|
|
998
|
-
|
|
989
|
+
$.List,
|
|
999
990
|
{
|
|
1000
991
|
ref: t,
|
|
1001
992
|
className: B("max-h-[300px] overflow-y-auto overflow-x-hidden", e),
|
|
1002
993
|
...a
|
|
1003
994
|
}
|
|
1004
995
|
));
|
|
1005
|
-
Lt.displayName =
|
|
996
|
+
Lt.displayName = $.List.displayName;
|
|
1006
997
|
const zt = p.forwardRef((e, a) => /* @__PURE__ */ o(
|
|
1007
|
-
|
|
998
|
+
$.Empty,
|
|
1008
999
|
{
|
|
1009
1000
|
ref: a,
|
|
1010
1001
|
className: "py-6 text-center text-sm",
|
|
1011
1002
|
...e
|
|
1012
1003
|
}
|
|
1013
1004
|
));
|
|
1014
|
-
zt.displayName =
|
|
1015
|
-
const
|
|
1016
|
-
|
|
1005
|
+
zt.displayName = $.Empty.displayName;
|
|
1006
|
+
const $e = p.forwardRef(({ className: e, ...a }, t) => /* @__PURE__ */ o(
|
|
1007
|
+
$.Group,
|
|
1017
1008
|
{
|
|
1018
1009
|
ref: t,
|
|
1019
1010
|
className: B(
|
|
@@ -1023,18 +1014,18 @@ const je = p.forwardRef(({ className: e, ...a }, t) => /* @__PURE__ */ o(
|
|
|
1023
1014
|
...a
|
|
1024
1015
|
}
|
|
1025
1016
|
));
|
|
1026
|
-
|
|
1017
|
+
$e.displayName = $.Group.displayName;
|
|
1027
1018
|
const Ft = p.forwardRef(({ className: e, ...a }, t) => /* @__PURE__ */ o(
|
|
1028
|
-
|
|
1019
|
+
$.Separator,
|
|
1029
1020
|
{
|
|
1030
1021
|
ref: t,
|
|
1031
1022
|
className: B("-mx-1 h-px bg-border", e),
|
|
1032
1023
|
...a
|
|
1033
1024
|
}
|
|
1034
1025
|
));
|
|
1035
|
-
Ft.displayName =
|
|
1026
|
+
Ft.displayName = $.Separator.displayName;
|
|
1036
1027
|
const Ve = p.forwardRef(({ className: e, ...a }, t) => /* @__PURE__ */ o(
|
|
1037
|
-
|
|
1028
|
+
$.Item,
|
|
1038
1029
|
{
|
|
1039
1030
|
ref: t,
|
|
1040
1031
|
className: B(
|
|
@@ -1044,11 +1035,11 @@ const Ve = p.forwardRef(({ className: e, ...a }, t) => /* @__PURE__ */ o(
|
|
|
1044
1035
|
...a
|
|
1045
1036
|
}
|
|
1046
1037
|
));
|
|
1047
|
-
Ve.displayName =
|
|
1048
|
-
function
|
|
1038
|
+
Ve.displayName = $.Item.displayName;
|
|
1039
|
+
function Xr(e = {}) {
|
|
1049
1040
|
const { authToken: a, tokenProps: t } = He(), n = U(
|
|
1050
1041
|
(N) => N.actions.applyResolvedCalendarPreferences
|
|
1051
|
-
), r = e.enabled ?? !0, l = (a == null ? void 0 : a.accessToken) ?? null, s = (t == null ? void 0 : t.apiServiceUrl) ?? null, [i, m] = L(!1), [u, y] = L(!1), [c, v] = L(!1), [f, w] = L(null), [b, S] = L(null), C =
|
|
1042
|
+
), r = e.enabled ?? !0, l = (a == null ? void 0 : a.accessToken) ?? null, s = (t == null ? void 0 : t.apiServiceUrl) ?? null, [i, m] = L(!1), [u, y] = L(!1), [c, v] = L(!1), [f, w] = L(null), [b, S] = L(null), C = j(l);
|
|
1052
1043
|
C.current = l, J(() => {
|
|
1053
1044
|
S(null), w(null), m(!1), y(!1), v(!1);
|
|
1054
1045
|
}, [l]);
|
|
@@ -1181,7 +1172,7 @@ const Ie = [
|
|
|
1181
1172
|
{ value: 1, label: "Monday" },
|
|
1182
1173
|
{ value: 6, label: "Saturday" }
|
|
1183
1174
|
], mt = "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground";
|
|
1184
|
-
function
|
|
1175
|
+
function Yr() {
|
|
1185
1176
|
try {
|
|
1186
1177
|
const e = Intl;
|
|
1187
1178
|
if (e.supportedValuesOf)
|
|
@@ -1190,7 +1181,7 @@ function Zr() {
|
|
|
1190
1181
|
}
|
|
1191
1182
|
return Ie.map((e) => e.value);
|
|
1192
1183
|
}
|
|
1193
|
-
function
|
|
1184
|
+
function Zr(e) {
|
|
1194
1185
|
if (!e) return "default";
|
|
1195
1186
|
if (e.tz !== e.weekStart) return "inherited";
|
|
1196
1187
|
switch (e.tz) {
|
|
@@ -1210,11 +1201,11 @@ function ht(e) {
|
|
|
1210
1201
|
const a = Ie.find((t) => t.value === e);
|
|
1211
1202
|
return a ? a.label : e;
|
|
1212
1203
|
}
|
|
1213
|
-
function
|
|
1204
|
+
function Qr(e) {
|
|
1214
1205
|
const a = Ut.find((t) => t.value === e);
|
|
1215
1206
|
return a ? a.label : String(e);
|
|
1216
1207
|
}
|
|
1217
|
-
function
|
|
1208
|
+
function en({
|
|
1218
1209
|
active: e,
|
|
1219
1210
|
onClose: a
|
|
1220
1211
|
}) {
|
|
@@ -1225,19 +1216,19 @@ function tn({
|
|
|
1225
1216
|
isClearing: l,
|
|
1226
1217
|
updatePreferences: s,
|
|
1227
1218
|
clearPreferences: i
|
|
1228
|
-
} =
|
|
1219
|
+
} = Xr({ enabled: e }), m = ya(), u = (t == null ? void 0 : t.resolved.tz) || (m == null ? void 0 : m.tz) || "UTC", y = (t == null ? void 0 : t.resolved.weekStart) ?? (m == null ? void 0 : m.weekStart) ?? 1, [c, v] = L((t == null ? void 0 : t.stored) === null), [f, w] = L(!1), [b, S] = L(
|
|
1229
1220
|
u
|
|
1230
1221
|
), [C, _] = L(
|
|
1231
1222
|
y
|
|
1232
|
-
), [z, F] = L(!1), P = ee(() =>
|
|
1223
|
+
), [z, F] = L(!1), P = ee(() => Yr(), []), N = ee(
|
|
1233
1224
|
() => P.filter(
|
|
1234
1225
|
(k) => !Ie.some((ie) => ie.value === k)
|
|
1235
1226
|
),
|
|
1236
1227
|
[P]
|
|
1237
|
-
), g = ee(() => ht(b), [b]), E = t != null && t.inherited ? ht(t.inherited.tz) : "UTC", R = t != null && t.inherited ?
|
|
1228
|
+
), g = ee(() => ht(b), [b]), E = t != null && t.inherited ? ht(t.inherited.tz) : "UTC", R = t != null && t.inherited ? Qr(t.inherited.weekStart) : "Monday", I = Zr(
|
|
1238
1229
|
t == null ? void 0 : t.inheritedSources
|
|
1239
1230
|
);
|
|
1240
|
-
|
|
1231
|
+
jt.useEffect(() => {
|
|
1241
1232
|
if (!e) {
|
|
1242
1233
|
w(!1);
|
|
1243
1234
|
return;
|
|
@@ -1376,7 +1367,7 @@ function tn({
|
|
|
1376
1367
|
/* @__PURE__ */ o(Ot, { placeholder: "Search timezones…" }),
|
|
1377
1368
|
/* @__PURE__ */ h(Lt, { children: [
|
|
1378
1369
|
/* @__PURE__ */ o(zt, { children: "No timezone found." }),
|
|
1379
|
-
/* @__PURE__ */ o(
|
|
1370
|
+
/* @__PURE__ */ o($e, { heading: "Common", children: Ie.map((k) => /* @__PURE__ */ h(
|
|
1380
1371
|
Ve,
|
|
1381
1372
|
{
|
|
1382
1373
|
value: `${k.value} ${k.label}`,
|
|
@@ -1400,7 +1391,7 @@ function tn({
|
|
|
1400
1391
|
k.value
|
|
1401
1392
|
)) }),
|
|
1402
1393
|
/* @__PURE__ */ o(Ft, {}),
|
|
1403
|
-
/* @__PURE__ */ o(
|
|
1394
|
+
/* @__PURE__ */ o($e, { heading: "All timezones", children: N.map((k) => /* @__PURE__ */ h(
|
|
1404
1395
|
Ve,
|
|
1405
1396
|
{
|
|
1406
1397
|
value: k,
|
|
@@ -1488,17 +1479,17 @@ function tn({
|
|
|
1488
1479
|
] })
|
|
1489
1480
|
] });
|
|
1490
1481
|
}
|
|
1491
|
-
function
|
|
1482
|
+
function tn(e = {}) {
|
|
1492
1483
|
const { authToken: a, tokenProps: t } = He(), n = U(
|
|
1493
1484
|
(g) => g.actions.applyResolvedValueFormatPreferences
|
|
1494
|
-
), r = e.enabled ?? !0, l = (a == null ? void 0 : a.accessToken) ?? null, s = (t == null ? void 0 : t.apiServiceUrl) ?? null, i =
|
|
1485
|
+
), r = e.enabled ?? !0, l = (a == null ? void 0 : a.accessToken) ?? null, s = (t == null ? void 0 : t.apiServiceUrl) ?? null, i = j(l);
|
|
1495
1486
|
i.current = l;
|
|
1496
1487
|
const [m, u] = L(null), [y, c] = L(!1), [v, f] = L(!1), [w, b] = L(!1), [S, C] = L(null);
|
|
1497
1488
|
J(() => {
|
|
1498
1489
|
u(null), C(null), c(!1), f(!1), b(!1);
|
|
1499
1490
|
}, [l]);
|
|
1500
1491
|
const _ = K(async (g) => {
|
|
1501
|
-
const E =
|
|
1492
|
+
const E = ja(await g.json());
|
|
1502
1493
|
if (!E.ok)
|
|
1503
1494
|
throw new Error("Value format preferences response is invalid");
|
|
1504
1495
|
return E.value;
|
|
@@ -1601,7 +1592,7 @@ const We = [
|
|
|
1601
1592
|
"INR",
|
|
1602
1593
|
"BRL",
|
|
1603
1594
|
"KWD"
|
|
1604
|
-
]),
|
|
1595
|
+
]), an = $a(), rn = an.filter(
|
|
1605
1596
|
(e) => !Mt.has(e)
|
|
1606
1597
|
), Bt = [
|
|
1607
1598
|
{ value: "short", label: "Short" },
|
|
@@ -1630,7 +1621,7 @@ function Pe(e) {
|
|
|
1630
1621
|
var a;
|
|
1631
1622
|
return ((a = Bt.find((t) => t.value === e)) == null ? void 0 : a.label) ?? e;
|
|
1632
1623
|
}
|
|
1633
|
-
function
|
|
1624
|
+
function nn(e) {
|
|
1634
1625
|
const a = We.find((t) => t.value === e);
|
|
1635
1626
|
return a ? `${a.label} — ${a.value}` : e;
|
|
1636
1627
|
}
|
|
@@ -1691,7 +1682,7 @@ function Le({
|
|
|
1691
1682
|
)
|
|
1692
1683
|
] });
|
|
1693
1684
|
}
|
|
1694
|
-
function
|
|
1685
|
+
function sn({
|
|
1695
1686
|
value: e,
|
|
1696
1687
|
inherited: a,
|
|
1697
1688
|
inheritedSources: t,
|
|
@@ -1784,7 +1775,7 @@ function ln({
|
|
|
1784
1775
|
locale: I === "inherit" ? void 0 : I
|
|
1785
1776
|
}),
|
|
1786
1777
|
children: [
|
|
1787
|
-
/* @__PURE__ */ o(Fe, { id: l, size: "xs", children: /* @__PURE__ */ o(Ue, { children: e.locale === void 0 ? `Inherited · ${a.locale}` :
|
|
1778
|
+
/* @__PURE__ */ o(Fe, { id: l, size: "xs", children: /* @__PURE__ */ o(Ue, { children: e.locale === void 0 ? `Inherited · ${a.locale}` : nn(e.locale) }) }),
|
|
1788
1779
|
/* @__PURE__ */ h(Me, { children: [
|
|
1789
1780
|
/* @__PURE__ */ h(Y, { value: "inherit", children: [
|
|
1790
1781
|
"Inherited from ",
|
|
@@ -1883,7 +1874,7 @@ function ln({
|
|
|
1883
1874
|
a.defaultCurrency
|
|
1884
1875
|
] }),
|
|
1885
1876
|
[...Mt].map((I) => /* @__PURE__ */ o(Y, { value: I, children: I }, I)),
|
|
1886
|
-
|
|
1877
|
+
rn.map((I) => /* @__PURE__ */ o(Y, { value: I, children: I }, I))
|
|
1887
1878
|
] })
|
|
1888
1879
|
]
|
|
1889
1880
|
}
|
|
@@ -1931,7 +1922,7 @@ function bt(e, a) {
|
|
|
1931
1922
|
return e == null ? void 0 : e.defaultCurrency;
|
|
1932
1923
|
}
|
|
1933
1924
|
}
|
|
1934
|
-
function
|
|
1925
|
+
function ln(e) {
|
|
1935
1926
|
var n, r;
|
|
1936
1927
|
const a = (n = e == null ? void 0 : e.dateTime) == null ? void 0 : n.dateStyle, t = (r = e == null ? void 0 : e.dateTime) == null ? void 0 : r.timeStyle;
|
|
1937
1928
|
return {
|
|
@@ -1941,12 +1932,12 @@ function on(e) {
|
|
|
1941
1932
|
defaultCurrency: e == null ? void 0 : e.defaultCurrency
|
|
1942
1933
|
};
|
|
1943
1934
|
}
|
|
1944
|
-
function
|
|
1935
|
+
function on({
|
|
1945
1936
|
active: e,
|
|
1946
1937
|
onClose: a
|
|
1947
1938
|
}) {
|
|
1948
1939
|
var i, m, u, y, c, v, f;
|
|
1949
|
-
const { preferences: t, isLoading: n, isSaving: r, updatePreferences: l } =
|
|
1940
|
+
const { preferences: t, isLoading: n, isSaving: r, updatePreferences: l } = tn({ enabled: e });
|
|
1950
1941
|
if (!e) return null;
|
|
1951
1942
|
if (!t)
|
|
1952
1943
|
return /* @__PURE__ */ h(te, { children: [
|
|
@@ -1967,7 +1958,7 @@ function dn({
|
|
|
1967
1958
|
((f = t.stored) == null ? void 0 : f.defaultCurrency) ?? ""
|
|
1968
1959
|
].join(":");
|
|
1969
1960
|
return /* @__PURE__ */ o(
|
|
1970
|
-
|
|
1961
|
+
dn,
|
|
1971
1962
|
{
|
|
1972
1963
|
preferences: t,
|
|
1973
1964
|
isSaving: r,
|
|
@@ -1977,7 +1968,7 @@ function dn({
|
|
|
1977
1968
|
s
|
|
1978
1969
|
);
|
|
1979
1970
|
}
|
|
1980
|
-
function
|
|
1971
|
+
function dn({
|
|
1981
1972
|
preferences: e,
|
|
1982
1973
|
isSaving: a,
|
|
1983
1974
|
updatePreferences: t,
|
|
@@ -1985,7 +1976,7 @@ function cn({
|
|
|
1985
1976
|
}) {
|
|
1986
1977
|
var u, y;
|
|
1987
1978
|
const [r, l] = L(
|
|
1988
|
-
() =>
|
|
1979
|
+
() => ln(e.stored)
|
|
1989
1980
|
), s = (r.locale === void 0 || xt(r.locale) !== void 0) && (r.defaultCurrency === void 0 || Va(r.defaultCurrency) !== void 0) && (r.dateStyle === void 0 || ["short", "medium", "long"].includes(r.dateStyle)) && (((u = r.dateTime) == null ? void 0 : u.dateStyle) === void 0 || ["short", "medium", "long"].includes(r.dateTime.dateStyle)) && (((y = r.dateTime) == null ? void 0 : y.timeStyle) === void 0 || ["short", "medium", "long"].includes(r.dateTime.timeStyle)), i = async () => {
|
|
1990
1981
|
const c = {
|
|
1991
1982
|
...r.locale !== void 0 ? { locale: r.locale } : {},
|
|
@@ -2008,7 +1999,7 @@ function cn({
|
|
|
2008
1999
|
};
|
|
2009
2000
|
return /* @__PURE__ */ h(te, { children: [
|
|
2010
2001
|
/* @__PURE__ */ o("div", { className: "py-2", children: /* @__PURE__ */ o(
|
|
2011
|
-
|
|
2002
|
+
sn,
|
|
2012
2003
|
{
|
|
2013
2004
|
value: r,
|
|
2014
2005
|
inherited: e.inherited,
|
|
@@ -2055,7 +2046,7 @@ function cn({
|
|
|
2055
2046
|
] })
|
|
2056
2047
|
] });
|
|
2057
2048
|
}
|
|
2058
|
-
function
|
|
2049
|
+
function _n({
|
|
2059
2050
|
open: e,
|
|
2060
2051
|
onOpenChange: a
|
|
2061
2052
|
}) {
|
|
@@ -2071,14 +2062,14 @@ function Pn({
|
|
|
2071
2062
|
/* @__PURE__ */ o(st, { value: "calendar", children: "Calendar" })
|
|
2072
2063
|
] }),
|
|
2073
2064
|
/* @__PURE__ */ o(lt, { value: "display", children: /* @__PURE__ */ o(
|
|
2074
|
-
|
|
2065
|
+
on,
|
|
2075
2066
|
{
|
|
2076
2067
|
active: e && t === "display",
|
|
2077
2068
|
onClose: r
|
|
2078
2069
|
}
|
|
2079
2070
|
) }),
|
|
2080
2071
|
/* @__PURE__ */ o(lt, { value: "calendar", children: /* @__PURE__ */ o(
|
|
2081
|
-
|
|
2072
|
+
en,
|
|
2082
2073
|
{
|
|
2083
2074
|
active: e && t === "calendar",
|
|
2084
2075
|
onClose: r
|
|
@@ -2090,25 +2081,25 @@ function Pn({
|
|
|
2090
2081
|
export {
|
|
2091
2082
|
Xa as A,
|
|
2092
2083
|
Pt as C,
|
|
2093
|
-
|
|
2094
|
-
|
|
2084
|
+
Dn as D,
|
|
2085
|
+
_n as R,
|
|
2095
2086
|
ar as T,
|
|
2096
|
-
|
|
2087
|
+
sn as a,
|
|
2097
2088
|
Ot as b,
|
|
2098
2089
|
Lt as c,
|
|
2099
2090
|
zt as d,
|
|
2100
|
-
|
|
2091
|
+
$e as e,
|
|
2101
2092
|
Ve as f,
|
|
2102
2093
|
ur as g,
|
|
2103
|
-
|
|
2094
|
+
Rn as h,
|
|
2104
2095
|
tr as i,
|
|
2105
2096
|
nr as j,
|
|
2106
|
-
|
|
2107
|
-
|
|
2097
|
+
An as k,
|
|
2098
|
+
kn as l,
|
|
2108
2099
|
lr as m,
|
|
2109
2100
|
Je as n,
|
|
2110
|
-
|
|
2101
|
+
gr as o,
|
|
2111
2102
|
br as p,
|
|
2112
2103
|
rr as t,
|
|
2113
|
-
|
|
2104
|
+
Tn as u
|
|
2114
2105
|
};
|