react-semaphor 0.1.584 → 0.1.586
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 +474 -435
- package/dist/assistant-context/index.js +1 -1
- package/dist/briefings/index.js +2 -2
- package/dist/chunks/{assistant-chat-nmycV1Se.js → assistant-chat-BU5gchFy.js} +8 -8
- package/dist/chunks/{bookmark-impact-CI3gmxi0.js → bookmark-impact-ZPSGncK6.js} +2 -2
- package/dist/chunks/{bookmark-state-D9-RFkDg.js → bookmark-state-CL4WEpgB.js} +2 -2
- package/dist/chunks/{card-filter-builder-C7QyPqRy.js → card-filter-builder-HELJWA4D.js} +208 -208
- package/dist/chunks/{comparison-window-caption-BAnsTI8y.js → comparison-window-caption-CoART8BC.js} +530 -633
- package/dist/chunks/{dashboard-inJy_V78.js → dashboard-BXP-ZxSY.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-DXs0XA1O.js → dashboard-briefing-launcher-BGj42whr.js} +9 -9
- package/dist/chunks/{dashboard-controls-6Zoo8d8Y.js → dashboard-controls-zvbRp6D2.js} +9 -9
- package/dist/chunks/{dashboard-json-D5eJhVA9.js → dashboard-json-CykexgqL.js} +1 -1
- package/dist/chunks/{dates-B3_GWc_Y.js → dates-CaqZtq01.js} +6 -6
- package/dist/chunks/{edit-dashboard-visual-DR03SYeW.js → edit-dashboard-visual-C82JNxbt.js} +2679 -2614
- package/dist/chunks/filter-line-Cu2u1K36.js +131 -0
- package/dist/chunks/{filter-reach-copy-CZwzrxBp.js → filter-reach-copy-ZERaFKsN.js} +1640 -1367
- package/dist/chunks/{filter-value-text-DtOvqcjn.js → filter-value-text-xefXzZlf.js} +10 -10
- package/dist/chunks/{index-BgT1L0p5.js → index-otMIColV.js} +35 -35
- package/dist/chunks/{matrix-analytical-definition-Cs2v43FM.js → matrix-analytical-definition-DOVSFFuf.js} +390 -542
- package/dist/chunks/{metric-comparison-Be4uS3Ql.js → metric-comparison-ZmurmEIs.js} +2 -2
- package/dist/chunks/{pivot-header-presentation-uH06jiZD.js → pivot-header-presentation-CdeTU96P.js} +1 -1
- package/dist/chunks/{pivot-result-contract-expectations-DvZY4eJM.js → pivot-result-contract-expectations-Bx_BCu-7.js} +1010 -1005
- package/dist/chunks/{pivot-result-identity-BZexMfmL.js → pivot-result-identity-Bvs6Uq3v.js} +1 -1
- package/dist/chunks/raw-temporal-value-DH-feMc2.js +322 -0
- package/dist/chunks/{report-preferences-dialog-DWeVe2so.js → report-preferences-dialog-B-CoyS1x.js} +119 -119
- package/dist/chunks/{resolve-dashboard-input-context-uATCuOP7.js → resolve-dashboard-input-context-BTTdKXH0.js} +10273 -10190
- package/dist/chunks/{saved-dashboard-context-DSVV9iqW.js → saved-dashboard-context-B-rosN4W.js} +78 -75
- package/dist/chunks/{semaphor-ready-indicator-B9vvRMnJ.js → semaphor-ready-indicator-Cy1n_04D.js} +28208 -27864
- package/dist/chunks/{shelf-drop-preview-context-BHOnp5Bo.js → shelf-drop-preview-context-Bmz54WYm.js} +2 -2
- package/dist/chunks/{stored-dashboard-xc5iidHL.js → stored-dashboard-rDJ8sw6J.js} +601 -596
- package/dist/chunks/{table-export-sheet-Cv_94obr.js → table-export-sheet-Dmtqi5NV.js} +1 -1
- package/dist/chunks/{variable-draft-C3CjhsJQ.js → variable-draft-DvngkRMl.js} +3 -3
- package/dist/chunks/{visual-choice-JiJ-_3bi.js → visual-choice-BBPizkRo.js} +74 -72
- package/dist/dashboard/index.js +2 -2
- package/dist/dashboard-authoring/index.js +699 -688
- package/dist/format-utils/index.js +145 -142
- package/dist/index.js +14 -14
- package/dist/style.css +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/index.js +2 -2
- package/dist/types/lib/dashboard-inputs/dashboard-filter-mapping-authoring.d.ts +86 -3
- package/dist/types/lib/dashboard-inputs/resolve-selection-input.d.ts +49 -27
- package/dist/types/lib/query-context/compile-dashboard-card-filters.d.ts +7 -0
- package/dist/types/lib/query-context/dashboard-filter-mapping-resolution.d.ts +30 -2
- package/dist/types/shared/analytics-protocol/click-reach-filter-id.d.ts +9 -0
- package/dist/types/shared/analytics-protocol/filter-field-ownership.d.ts +3 -1
- package/dist/types/shared/analytics-protocol/index.d.ts +1 -0
- package/dist/types/shared/dashboard-authoring/click-to-filter-card-decision.d.ts +102 -0
- package/dist/types/shared/dashboard-authoring/filter-reach-copy.d.ts +13 -1
- package/dist/types/shared/dashboard-authoring/index.d.ts +2 -0
- package/dist/types/shared/dashboard-authoring/kpi-date-context.d.ts +191 -0
- package/dist/types/shared/dashboard-authoring/kpi-figure.d.ts +3 -0
- package/dist/types/shared/dashboard-authoring/see-records/measure-kind.d.ts +5 -2
- package/dist/types/shared/dashboard-authoring/see-records/result.d.ts +37 -4
- package/dist/types/shared/dashboard-authoring/semantic-auto-join-card.d.ts +13 -0
- package/dist/types/shared/format-utils/semantic-format.d.ts +0 -1
- package/dist/types/shared/format-utils/temporal-bucket.d.ts +20 -0
- package/dist/types/shared/temporal/calendar-periods.d.ts +15 -0
- package/dist/types/shared/temporal/raw-temporal-equality.d.ts +14 -0
- package/package.json +2 -2
- package/dist/chunks/raw-temporal-value-DdT0s47W.js +0 -159
package/dist/chunks/{report-preferences-dialog-DWeVe2so.js → report-preferences-dialog-B-CoyS1x.js}
RENAMED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { jsx as i, Fragment as te, jsxs as h } from "react/jsx-runtime";
|
|
2
2
|
import * as p from "react";
|
|
3
3
|
import Mt, { useMemo as ee, useState as F, useEffect as Z, lazy as Ie, Suspense as Se, useRef as H, useLayoutEffect as Ce, useCallback as W, Activity as jt, useId as de } from "react";
|
|
4
|
-
import { b as Bt, b2 as qe, be as $t, bf as Vt, u as O, bg as
|
|
4
|
+
import { b as Bt, b2 as qe, be as $t, bf as Vt, u as O, bg as bt, N as Wt, K as Kt, bh as qt, bi as Ht, bj as Gt, bk as Jt, bl as ge, bm as vt, bn as Qe, bo as Xt, a7 as ye, a6 as Zt, bp as Yt, bq as Qt, a8 as et, a9 as ea, br as ta, E as aa, F as ra, S as na, B as sa, a as la, U as ia, bs as oa, D as da, A as ca, C as ua, bt as ma, bu as fa, bv as ha, bw as pa, bx as ba, by as va, bz as tt, bA as ke, bB as ga, bC as He, bD as G, bE as ya, bF as wa, bG as Sa, bH as xa, bI as Ca } from "./semaphor-ready-indicator-Cy1n_04D.js";
|
|
5
5
|
import { j as Ea, c as j } from "./pickers-DkqmtnTL.js";
|
|
6
|
-
import { J as Ia } from "./bookmark-state-
|
|
6
|
+
import { J as Ia } from "./bookmark-state-CL4WEpgB.js";
|
|
7
7
|
import { r as Na, a as gt } from "./availability-Bp5Gfu1I.js";
|
|
8
|
-
import { s as Ta } from "./resolve-dashboard-input-context-
|
|
8
|
+
import { s as Ta } from "./resolve-dashboard-input-context-BTTdKXH0.js";
|
|
9
9
|
import { B as K, Z as ka, _ as Aa, $ as Da, a0 as Ra, a1 as Pa, a2 as _a, a3 as ie, H as Q, a4 as he, s as pe, e as La, f as za, h as Fa, j as at, L as yt, y as Fe, z as Ue, A as Oe, D as Me, E as X, T as Ua, k as Oa, l as rt, n as nt } from "./style-sheet-parts-_dGSFzDi.js";
|
|
10
10
|
import "./validators-CJ8Jh0E8.js";
|
|
11
11
|
import "./matrix-operation-contract-BM5TveR3.js";
|
|
12
12
|
import "./analytics-base-schemas-BaIQrEzX.js";
|
|
13
13
|
import { parseValueFormatPreferencesResponse as Ma, canonicalizeSupportedLocale as wt, getSupportedCurrencyCodes as ja, canonicalizeSupportedCurrencyCode as Ba } from "../value-format-preferences/index.js";
|
|
14
|
-
import { e as $a } from "./filter-reach-copy-
|
|
14
|
+
import { e as $a } from "./filter-reach-copy-ZERaFKsN.js";
|
|
15
15
|
import { a as Va } from "./report-runtime-context-NlOXwyRB.js";
|
|
16
|
-
import {
|
|
16
|
+
import { aq as we, ax as ce } from "./pivot-result-contract-expectations-Bx_BCu-7.js";
|
|
17
17
|
function Wa() {
|
|
18
18
|
return /* @__PURE__ */ i(
|
|
19
19
|
"div",
|
|
@@ -68,7 +68,7 @@ function Ga({
|
|
|
68
68
|
return /* @__PURE__ */ i($t.Provider, { value: f, children: e });
|
|
69
69
|
}
|
|
70
70
|
function Ja({ children: e }) {
|
|
71
|
-
return
|
|
71
|
+
return bt() ? /* @__PURE__ */ i(te, { children: e }) : /* @__PURE__ */ i(Ga, { children: e });
|
|
72
72
|
}
|
|
73
73
|
function Xa(e) {
|
|
74
74
|
if (!(e != null && e.accessToken)) return {};
|
|
@@ -94,8 +94,8 @@ function Ya(e, a, t) {
|
|
|
94
94
|
const n = t ? Ia(t, e.cardId) : void 0;
|
|
95
95
|
return !!n && n.sheet.id === e.sheetId;
|
|
96
96
|
}
|
|
97
|
-
const Qa = Ie(() => import("./assistant-chat-
|
|
98
|
-
function
|
|
97
|
+
const Qa = Ie(() => import("./assistant-chat-BU5gchFy.js"));
|
|
98
|
+
function vn() {
|
|
99
99
|
const e = Wt(), a = Kt();
|
|
100
100
|
if (!e.available) return null;
|
|
101
101
|
const t = a !== "lg";
|
|
@@ -124,7 +124,7 @@ const er = {
|
|
|
124
124
|
"full-page": "absolute inset-0 z-30"
|
|
125
125
|
}, tr = "absolute left-0 top-0 z-30 max-h-[var(--assistant-beside-max-h)] max-w-[var(--assistant-beside-max-w)] rounded-card border border-border shadow-lg", ar = 640, fe = 8;
|
|
126
126
|
function rr({ surface: e = "dashboard" } = {}) {
|
|
127
|
-
const a =
|
|
127
|
+
const a = bt(), { isOpen: t, mounted: n, storedLayout: r, width: l, beside: s, besideSize: o, focusCardId: f, askCount: u } = Ht(
|
|
128
128
|
(a == null ? void 0 : a.instance.store) ?? Jt,
|
|
129
129
|
Gt((y) => {
|
|
130
130
|
var C;
|
|
@@ -141,37 +141,37 @@ function rr({ surface: e = "dashboard" } = {}) {
|
|
|
141
141
|
})
|
|
142
142
|
), w = e === "none", c = O(
|
|
143
143
|
(y) => s && t && f && !w ? nr(y.dashboard, y.selectedSheetId, f) : void 0
|
|
144
|
-
),
|
|
144
|
+
), v = sr(c, u);
|
|
145
145
|
if (!(a != null && a.available) || !n && !w) return null;
|
|
146
|
-
const m = w ? "full-page" :
|
|
146
|
+
const m = w ? "full-page" : v.shown ? "beside-card" : r, S = w || t, b = m === "docked-right" || m === "docked-left";
|
|
147
147
|
return /* @__PURE__ */ h(
|
|
148
148
|
"aside",
|
|
149
149
|
{
|
|
150
|
-
ref:
|
|
150
|
+
ref: v.setFloating,
|
|
151
151
|
"aria-label": a.instance.assistantName,
|
|
152
152
|
"data-testid": "assistant-panel",
|
|
153
153
|
"data-layout": m,
|
|
154
154
|
"data-beside-frame": m === "beside-card" ? c : void 0,
|
|
155
|
-
"data-beside-side": m === "beside-card" ?
|
|
155
|
+
"data-beside-side": m === "beside-card" ? v.side : void 0,
|
|
156
156
|
className: j(
|
|
157
157
|
"flex-col bg-background",
|
|
158
158
|
m === "beside-card" ? tr : er[m],
|
|
159
159
|
S ? "flex" : "hidden"
|
|
160
160
|
),
|
|
161
|
-
style: m === "beside-card" ? { ...
|
|
161
|
+
style: m === "beside-card" ? { ...v.style, width: o.width, height: o.height } : (
|
|
162
162
|
// The saved width, never more than the share of the dashboard's area the
|
|
163
163
|
// handle allows, however the area is sized now or later (P4-10).
|
|
164
|
-
|
|
164
|
+
b ? { width: l, maxWidth: `${St * 100}%` } : void 0
|
|
165
165
|
),
|
|
166
166
|
onKeyDown: m === "beside-card" ? (y) => {
|
|
167
167
|
if (y.key !== "Escape" || y.defaultPrevented || !(y.target instanceof Node) || !y.currentTarget.contains(y.target)) return;
|
|
168
168
|
y.preventDefault();
|
|
169
|
-
const C =
|
|
169
|
+
const C = v.cardActions();
|
|
170
170
|
a.instance.close(), C == null || C.focus();
|
|
171
171
|
} : void 0,
|
|
172
172
|
children: [
|
|
173
|
-
|
|
174
|
-
m === "beside-card" ? /* @__PURE__ */ i(ir, { instance: a.instance, size: o, side:
|
|
173
|
+
b ? /* @__PURE__ */ i(or, { instance: a.instance, side: m === "docked-left" ? "right" : "left", width: l }) : null,
|
|
174
|
+
m === "beside-card" ? /* @__PURE__ */ i(ir, { instance: a.instance, size: o, side: v.handleSide }) : null,
|
|
175
175
|
/* @__PURE__ */ i(Se, { fallback: null, children: /* @__PURE__ */ i(Qa, { instance: a.instance, surface: e, placement: m }, a.instance.id) })
|
|
176
176
|
]
|
|
177
177
|
}
|
|
@@ -191,7 +191,7 @@ function sr(e, a) {
|
|
|
191
191
|
Ce(() => {
|
|
192
192
|
s.current = a;
|
|
193
193
|
});
|
|
194
|
-
const o = r === a ? null : t, { refs: f, elements: u, floatingStyles: w, middlewareData: c, isPositioned:
|
|
194
|
+
const o = r === a ? null : t, { refs: f, elements: u, floatingStyles: w, middlewareData: c, isPositioned: v } = ka({
|
|
195
195
|
strategy: "absolute",
|
|
196
196
|
placement: o ?? "right-start",
|
|
197
197
|
middleware: [
|
|
@@ -199,14 +199,14 @@ function sr(e, a) {
|
|
|
199
199
|
Da({ padding: fe }),
|
|
200
200
|
Ra({
|
|
201
201
|
padding: fe,
|
|
202
|
-
apply: ({ availableWidth:
|
|
203
|
-
C.floating.style.setProperty("--assistant-beside-max-w", `${Math.max(0,
|
|
202
|
+
apply: ({ availableWidth: b, availableHeight: y, elements: C }) => {
|
|
203
|
+
C.floating.style.setProperty("--assistant-beside-max-w", `${Math.max(0, b)}px`), C.floating.style.setProperty("--assistant-beside-max-h", `${Math.max(0, y)}px`);
|
|
204
204
|
}
|
|
205
205
|
}),
|
|
206
206
|
Pa()
|
|
207
207
|
],
|
|
208
|
-
whileElementsMounted: (
|
|
209
|
-
const P = lr(
|
|
208
|
+
whileElementsMounted: (b, y, C) => _a(b, y, () => {
|
|
209
|
+
const P = lr(b, y);
|
|
210
210
|
n(P), P === null && l(s.current), C();
|
|
211
211
|
})
|
|
212
212
|
}), m = u.floating;
|
|
@@ -219,15 +219,15 @@ function sr(e, a) {
|
|
|
219
219
|
...w,
|
|
220
220
|
// Not before it is placed (its side is chosen first): never a flash at
|
|
221
221
|
// the row's corner. With the card wholly out of view, it goes with the card.
|
|
222
|
-
...!
|
|
222
|
+
...!v || (S = c.hide) != null && S.referenceHidden ? { visibility: "hidden" } : {}
|
|
223
223
|
},
|
|
224
224
|
/** The side the conversation took; the size handle sits on the corner away from the card. */
|
|
225
225
|
side: o ?? void 0,
|
|
226
226
|
handleSide: o === "left-start" ? "left" : "right",
|
|
227
227
|
/** The card's ··· menu, where Ask lives and focus returns on Escape. */
|
|
228
228
|
cardActions: () => {
|
|
229
|
-
var
|
|
230
|
-
return e ? (
|
|
229
|
+
var b;
|
|
230
|
+
return e ? (b = it(m == null ? void 0 : m.parentElement, e)) == null ? void 0 : b.querySelector("[data-card-actions]") : null;
|
|
231
231
|
}
|
|
232
232
|
};
|
|
233
233
|
}
|
|
@@ -239,7 +239,7 @@ function lr(e, a) {
|
|
|
239
239
|
if (!t || !e.isConnected) return null;
|
|
240
240
|
const n = t.getBoundingClientRect();
|
|
241
241
|
if (n.width < ar) return null;
|
|
242
|
-
const r = e.getBoundingClientRect(), { min: l } =
|
|
242
|
+
const r = e.getBoundingClientRect(), { min: l } = vt, s = (o, f) => o >= l.width + 2 * fe && f >= l.height + 2 * fe;
|
|
243
243
|
return s(n.right - r.right, n.height) ? "right-start" : s(r.left - n.left, n.height) ? "left-start" : s(n.width, n.bottom - r.bottom) ? "bottom-start" : null;
|
|
244
244
|
}
|
|
245
245
|
function ir({
|
|
@@ -283,7 +283,7 @@ function ir({
|
|
|
283
283
|
}[s.key];
|
|
284
284
|
o && (s.preventDefault(), e.setBesideSize({ width: a.width + o.width, height: a.height + o.height }, { save: !0 }));
|
|
285
285
|
},
|
|
286
|
-
onDoubleClick: () => e.setBesideSize(
|
|
286
|
+
onDoubleClick: () => e.setBesideSize(vt.default, { save: !0 }),
|
|
287
287
|
className: j(
|
|
288
288
|
"absolute bottom-0 z-10 h-3 w-3 touch-none outline-none hover:bg-primary/30 focus-visible:bg-primary/40",
|
|
289
289
|
t === "left" ? "left-0 cursor-nesw-resize rounded-bl-card" : "right-0 cursor-nwse-resize rounded-br-card"
|
|
@@ -295,19 +295,19 @@ const le = 16, St = 0.6;
|
|
|
295
295
|
function or({ instance: e, side: a, width: t }) {
|
|
296
296
|
const n = H(void 0), r = (c) => {
|
|
297
297
|
var m, S;
|
|
298
|
-
const
|
|
299
|
-
return
|
|
298
|
+
const v = (S = (m = c.closest("aside")) == null ? void 0 : m.parentElement) == null ? void 0 : S.clientWidth;
|
|
299
|
+
return v ? v * St : ge.max;
|
|
300
300
|
}, l = (c) => {
|
|
301
|
-
var
|
|
302
|
-
return ((
|
|
301
|
+
var v;
|
|
302
|
+
return ((v = c.closest("aside")) == null ? void 0 : v.getBoundingClientRect().width) || t;
|
|
303
303
|
}, s = (c) => {
|
|
304
|
-
const
|
|
305
|
-
if (!
|
|
306
|
-
const m = c -
|
|
307
|
-
return Qe(
|
|
304
|
+
const v = n.current;
|
|
305
|
+
if (!v) return t;
|
|
306
|
+
const m = c - v.startX;
|
|
307
|
+
return Qe(v.startWidth + (a === "left" ? -m : m), v.maxForArea);
|
|
308
308
|
}, o = (c) => {
|
|
309
|
-
var
|
|
310
|
-
c.preventDefault(), (m = (
|
|
309
|
+
var v, m;
|
|
310
|
+
c.preventDefault(), (m = (v = c.currentTarget).setPointerCapture) == null || m.call(v, c.pointerId), n.current = { startX: c.clientX, startWidth: l(c.currentTarget), maxForArea: r(c.currentTarget) };
|
|
311
311
|
}, f = (c) => {
|
|
312
312
|
n.current && e.setWidth(s(c.clientX));
|
|
313
313
|
}, u = (c) => {
|
|
@@ -315,8 +315,8 @@ function or({ instance: e, side: a, width: t }) {
|
|
|
315
315
|
}, w = (c) => {
|
|
316
316
|
if (c.key !== "ArrowLeft" && c.key !== "ArrowRight") return;
|
|
317
317
|
c.preventDefault();
|
|
318
|
-
const
|
|
319
|
-
e.setWidth(Qe(l(c.currentTarget) + (
|
|
318
|
+
const v = c.key === "ArrowLeft" == (a === "left");
|
|
319
|
+
e.setWidth(Qe(l(c.currentTarget) + (v ? le : -le), r(c.currentTarget)), { save: !0 });
|
|
320
320
|
};
|
|
321
321
|
return /* @__PURE__ */ i(
|
|
322
322
|
"div",
|
|
@@ -407,37 +407,37 @@ function ur({
|
|
|
407
407
|
return;
|
|
408
408
|
}
|
|
409
409
|
if (m.dashboard !== S.dashboard)
|
|
410
|
-
for (const [
|
|
411
|
-
y !== m.dashboard && f.current.delete(
|
|
410
|
+
for (const [b, y] of f.current)
|
|
411
|
+
y !== m.dashboard && f.current.delete(b);
|
|
412
412
|
}),
|
|
413
413
|
[]
|
|
414
414
|
), Z(() => {
|
|
415
|
-
const m = (
|
|
415
|
+
const m = (b) => {
|
|
416
416
|
const y = O.getState().dashboard;
|
|
417
|
-
if (!y || y.id !==
|
|
417
|
+
if (!y || y.id !== b.dashboardId) return;
|
|
418
418
|
const C = hr();
|
|
419
419
|
f.current.set(C, y), e.answerCopyRequest({
|
|
420
420
|
kind: "uploaded",
|
|
421
421
|
screenId: e.screenId,
|
|
422
|
-
requestId:
|
|
422
|
+
requestId: b.requestId,
|
|
423
423
|
revisionId: C,
|
|
424
424
|
dashboard: y
|
|
425
425
|
});
|
|
426
|
-
}, S = async (
|
|
426
|
+
}, S = async (b, y) => {
|
|
427
427
|
var g, I, D;
|
|
428
|
-
const C = u.current.get(
|
|
428
|
+
const C = u.current.get(b.deliveryId);
|
|
429
429
|
if (C) {
|
|
430
|
-
e.reportOutcome({ screenId: e.screenId, deliveryId:
|
|
430
|
+
e.reportOutcome({ screenId: e.screenId, deliveryId: b.deliveryId, outcome: C });
|
|
431
431
|
return;
|
|
432
432
|
}
|
|
433
|
-
const P = f.current.get(
|
|
433
|
+
const P = f.current.get(b.revisionId), z = () => !P || f.current.get(b.revisionId) !== P ? "dashboard_changed" : performance.now() < y + b.applyWithinMs ? null : "expired", U = z();
|
|
434
434
|
let _;
|
|
435
435
|
if (U || !P)
|
|
436
436
|
_ = xe(U ?? "dashboard_changed");
|
|
437
437
|
else {
|
|
438
438
|
let E = "expired";
|
|
439
439
|
const q = await c.current.apply(
|
|
440
|
-
{ proposalId:
|
|
440
|
+
{ proposalId: b.proposalId, operations: b.operations, context: b.context, basedOn: P },
|
|
441
441
|
{
|
|
442
442
|
stillWanted: () => {
|
|
443
443
|
const $ = z();
|
|
@@ -447,36 +447,36 @@ function ur({
|
|
|
447
447
|
);
|
|
448
448
|
_ = fr(q, E);
|
|
449
449
|
}
|
|
450
|
-
if (u.current.set(
|
|
450
|
+
if (u.current.set(b.deliveryId, _), e.reportOutcome({ screenId: e.screenId, deliveryId: b.deliveryId, outcome: _ }), _.status !== "applied") return;
|
|
451
451
|
const N = ((g = O.getState().dashboard) == null ? void 0 : g.id) ?? "";
|
|
452
|
-
o({ deliveryId:
|
|
452
|
+
o({ deliveryId: b.deliveryId, proposalId: b.proposalId, summary: b.summary, dashboardId: N, words: null }), (D = (I = c.current).onLifecycleEvent) == null || D.call(I, {
|
|
453
453
|
type: "dashboard:change-applied",
|
|
454
454
|
dashboardId: N,
|
|
455
|
-
payload: { deliveryId:
|
|
455
|
+
payload: { deliveryId: b.deliveryId, summary: b.summary }
|
|
456
456
|
});
|
|
457
457
|
};
|
|
458
|
-
return e.subscribe((
|
|
459
|
-
if (
|
|
460
|
-
m(
|
|
458
|
+
return e.subscribe((b) => {
|
|
459
|
+
if (b.type === "copy_request") {
|
|
460
|
+
m(b);
|
|
461
461
|
return;
|
|
462
462
|
}
|
|
463
463
|
const y = performance.now();
|
|
464
464
|
w.current = w.current.then(
|
|
465
|
-
() => S(
|
|
465
|
+
() => S(b, y).catch((C) => console.error("[live-screen] a delivery failed", C))
|
|
466
466
|
);
|
|
467
467
|
});
|
|
468
468
|
}, [e]);
|
|
469
|
-
const
|
|
470
|
-
var S,
|
|
469
|
+
const v = W(() => {
|
|
470
|
+
var S, b;
|
|
471
471
|
if (!s) return;
|
|
472
472
|
const m = O.getState().actions.undoProposal(s.proposalId);
|
|
473
|
-
m.ok ? ((
|
|
473
|
+
m.ok ? ((b = (S = c.current).onLifecycleEvent) == null || b.call(S, {
|
|
474
474
|
type: "dashboard:change-undone",
|
|
475
475
|
dashboardId: s.dashboardId,
|
|
476
476
|
payload: { deliveryId: s.deliveryId, summary: s.summary }
|
|
477
477
|
}), o(null)) : m.reason === "changed_since" ? o({ ...s, words: "changed_since" }) : m.reason === "not_editable" ? o({ ...s, words: "not_editable" }) : o(null);
|
|
478
478
|
}, [s]);
|
|
479
|
-
return s ? /* @__PURE__ */ i(mr, { note: s, onUndo:
|
|
479
|
+
return s ? /* @__PURE__ */ i(mr, { note: s, onUndo: v }) : null;
|
|
480
480
|
}
|
|
481
481
|
function mr({ note: e, onUndo: a }) {
|
|
482
482
|
const t = O((s) => ea(s, e.proposalId)), n = O((s) => s.isVisualEditing);
|
|
@@ -536,9 +536,9 @@ function xe(e) {
|
|
|
536
536
|
function hr() {
|
|
537
537
|
return globalThis.crypto.randomUUID();
|
|
538
538
|
}
|
|
539
|
-
const pr = Ie(() => import("./dashboard-controls-
|
|
540
|
-
() => import("./edit-dashboard-visual-
|
|
541
|
-
),
|
|
539
|
+
const pr = Ie(() => import("./dashboard-controls-zvbRp6D2.js")), br = Ie(
|
|
540
|
+
() => import("./edit-dashboard-visual-C82JNxbt.js")
|
|
541
|
+
), vr = Ie(() => import("./dashboard-json-CykexgqL.js"));
|
|
542
542
|
function gn({
|
|
543
543
|
showControls: e = !1,
|
|
544
544
|
showFooter: a = !0,
|
|
@@ -567,13 +567,13 @@ function gn({
|
|
|
567
567
|
}
|
|
568
568
|
),
|
|
569
569
|
/* @__PURE__ */ h(da, { preferences: o, children: [
|
|
570
|
-
l && /* @__PURE__ */ i(Se, { fallback: null, children: /* @__PURE__ */ i(
|
|
570
|
+
l && /* @__PURE__ */ i(Se, { fallback: null, children: /* @__PURE__ */ i(vr, {}) }),
|
|
571
571
|
/* @__PURE__ */ i(ca, { children: /* @__PURE__ */ i(Ja, { children: /* @__PURE__ */ h("main", { className: "relative flex h-full w-full flex-col overflow-hidden", children: [
|
|
572
572
|
e && /* @__PURE__ */ i(Se, { fallback: null, children: /* @__PURE__ */ i(pr, {}) }),
|
|
573
573
|
t && /* @__PURE__ */ i(ur, { port: t, onLifecycleEvent: n.onDashboardLifecycleEvent }),
|
|
574
574
|
/* @__PURE__ */ h("div", { className: "relative flex grow overflow-hidden", children: [
|
|
575
575
|
/* @__PURE__ */ i("div", { className: "flex min-w-0 flex-1", children: /* @__PURE__ */ h(ua, { ...n, type: "dashboard", children: [
|
|
576
|
-
r && /* @__PURE__ */ i(Se, { fallback: null, children: /* @__PURE__ */ i(
|
|
576
|
+
r && /* @__PURE__ */ i(Se, { fallback: null, children: /* @__PURE__ */ i(br, {}) }),
|
|
577
577
|
/* @__PURE__ */ i(jt, { mode: r ? "hidden" : "visible", children: /* @__PURE__ */ i(Wa, {}) })
|
|
578
578
|
] }) }),
|
|
579
579
|
/* @__PURE__ */ i(rr, {})
|
|
@@ -588,7 +588,7 @@ function je(e, a, t, n, r, l, s) {
|
|
|
588
588
|
if (l === a.length) return r === e.length ? ot : xr;
|
|
589
589
|
var o = `${r},${l}`;
|
|
590
590
|
if (s[o] !== void 0) return s[o];
|
|
591
|
-
for (var f = n.charAt(l), u = t.indexOf(f, r), w = 0, c,
|
|
591
|
+
for (var f = n.charAt(l), u = t.indexOf(f, r), w = 0, c, v, m, S; u >= 0; ) c = je(e, a, t, n, u + 1, l + 1, s), c > w && (u === r ? c *= ot : Cr.test(e.charAt(u - 1)) ? (c *= yr, m = e.slice(r, u - 1).match(Er), m && r > 0 && (c *= Math.pow(De, m.length))) : Ir.test(e.charAt(u - 1)) ? (c *= gr, S = e.slice(r, u - 1).match(Ct), S && r > 0 && (c *= Math.pow(De, S.length))) : (c *= wr, r > 0 && (c *= Math.pow(De, u - r))), e.charAt(u) !== a.charAt(l) && (c *= Sr)), (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 = je(e, a, t, n, u + 1, l + 2, s), v * Ae > c && (c = v * Ae)), c > w && (w = c), u = t.indexOf(f, u + 1);
|
|
592
592
|
return s[o] = w, w;
|
|
593
593
|
}
|
|
594
594
|
function dt(e) {
|
|
@@ -597,11 +597,11 @@ function dt(e) {
|
|
|
597
597
|
function Nr(e, a, t) {
|
|
598
598
|
return e = t && t.length > 0 ? `${e + " " + t.join(" ")}` : e, je(e, a, dt(e), dt(a), 0, 0, {});
|
|
599
599
|
}
|
|
600
|
-
var me = '[cmdk-group=""]', Re = '[cmdk-group-items=""]', Tr = '[cmdk-group-heading=""]', Et = '[cmdk-item=""]', ct = `${Et}:not([aria-disabled="true"])`, Be = "cmdk-item-select", ne = "data-value", kr = (e, a, t) => Nr(e, a, t), It = p.createContext(void 0),
|
|
600
|
+
var me = '[cmdk-group=""]', Re = '[cmdk-group-items=""]', Tr = '[cmdk-group-heading=""]', Et = '[cmdk-item=""]', ct = `${Et}:not([aria-disabled="true"])`, Be = "cmdk-item-select", ne = "data-value", kr = (e, a, t) => Nr(e, a, t), It = p.createContext(void 0), be = () => p.useContext(It), Nt = p.createContext(void 0), Ge = () => p.useContext(Nt), Tt = p.createContext(void 0), kt = p.forwardRef((e, a) => {
|
|
601
601
|
let t = se(() => {
|
|
602
602
|
var d, T;
|
|
603
603
|
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() } };
|
|
604
|
-
}), n = se(() => /* @__PURE__ */ new Set()), r = se(() => /* @__PURE__ */ new Map()), l = se(() => /* @__PURE__ */ new Map()), s = se(() => /* @__PURE__ */ new Set()), o = At(e), { label: f, children: u, value: w, onValueChange: c, filter:
|
|
604
|
+
}), n = se(() => /* @__PURE__ */ new Set()), r = se(() => /* @__PURE__ */ new Map()), l = se(() => /* @__PURE__ */ new Map()), s = se(() => /* @__PURE__ */ new Set()), o = At(e), { label: f, children: u, value: w, onValueChange: c, filter: v, shouldFilter: m, loop: S, disablePointerSelection: b = !1, vimBindings: y = !0, ...C } = e, P = ie(), z = ie(), U = ie(), _ = p.useRef(null), N = Mr();
|
|
605
605
|
ae(() => {
|
|
606
606
|
if (w !== void 0) {
|
|
607
607
|
let d = w.trim();
|
|
@@ -666,8 +666,8 @@ var me = '[cmdk-group=""]', Re = '[cmdk-group-items=""]', Tr = '[cmdk-group-head
|
|
|
666
666
|
let A = _.current;
|
|
667
667
|
k().sort((x, R) => {
|
|
668
668
|
var L, V;
|
|
669
|
-
let M = x.getAttribute("id"),
|
|
670
|
-
return ((L = d.get(
|
|
669
|
+
let M = x.getAttribute("id"), ve = R.getAttribute("id");
|
|
670
|
+
return ((L = d.get(ve)) != null ? L : 0) - ((V = d.get(M)) != null ? V : 0);
|
|
671
671
|
}).forEach((x) => {
|
|
672
672
|
let R = x.closest(Re);
|
|
673
673
|
R ? R.appendChild(x.parentElement === R ? x : x.closest(`${Re} > *`)) : A.appendChild(x.parentElement === A ? x : x.closest(`${Re} > *`));
|
|
@@ -690,8 +690,8 @@ var me = '[cmdk-group=""]', Re = '[cmdk-group-items=""]', Tr = '[cmdk-group-head
|
|
|
690
690
|
t.current.filtered.groups = /* @__PURE__ */ new Set();
|
|
691
691
|
let R = 0;
|
|
692
692
|
for (let L of n.current) {
|
|
693
|
-
let V = (T = (d = l.current.get(L)) == null ? void 0 : d.value) != null ? T : "", M = (x = (A = l.current.get(L)) == null ? void 0 : A.keywords) != null ? x : [],
|
|
694
|
-
t.current.filtered.items.set(L,
|
|
693
|
+
let V = (T = (d = l.current.get(L)) == null ? void 0 : d.value) != null ? T : "", M = (x = (A = l.current.get(L)) == null ? void 0 : A.keywords) != null ? x : [], ve = D(V, M);
|
|
694
|
+
t.current.filtered.items.set(L, ve), ve > 0 && R++;
|
|
695
695
|
}
|
|
696
696
|
for (let [L, V] of r.current) for (let M of V) if (t.current.filtered.items.get(M) > 0) {
|
|
697
697
|
t.current.filtered.groups.add(L);
|
|
@@ -774,52 +774,52 @@ var me = '[cmdk-group=""]', Re = '[cmdk-group-items=""]', Tr = '[cmdk-group-head
|
|
|
774
774
|
} }, p.createElement("label", { "cmdk-label": "", htmlFor: I.inputId, id: I.labelId, style: Br }, f), Ne(e, (d) => p.createElement(Nt.Provider, { value: g }, p.createElement(It.Provider, { value: I }, d))));
|
|
775
775
|
}), Ar = p.forwardRef((e, a) => {
|
|
776
776
|
var t, n;
|
|
777
|
-
let r = ie(), l = p.useRef(null), s = p.useContext(Tt), o =
|
|
777
|
+
let r = ie(), l = p.useRef(null), s = p.useContext(Tt), o = be(), f = At(e), u = (n = (t = f.current) == null ? void 0 : t.forceMount) != null ? n : s == null ? void 0 : s.forceMount;
|
|
778
778
|
ae(() => {
|
|
779
779
|
if (!u) return o.item(r, s == null ? void 0 : s.id);
|
|
780
780
|
}, [u]);
|
|
781
|
-
let w = Dt(r, l, [e.value, e.children, l], e.keywords), c = Ge(),
|
|
781
|
+
let w = Dt(r, l, [e.value, e.children, l], e.keywords), c = Ge(), v = Y((N) => N.value && N.value === w.current), m = Y((N) => u || o.filter() === !1 ? !0 : N.search ? N.filtered.items.get(r) > 0 : !0);
|
|
782
782
|
p.useEffect(() => {
|
|
783
783
|
let N = l.current;
|
|
784
784
|
if (!(!N || e.disabled)) return N.addEventListener(Be, S), () => N.removeEventListener(Be, S);
|
|
785
785
|
}, [m, e.onSelect, e.disabled]);
|
|
786
786
|
function S() {
|
|
787
787
|
var N, g;
|
|
788
|
-
|
|
788
|
+
b(), (g = (N = f.current).onSelect) == null || g.call(N, w.current);
|
|
789
789
|
}
|
|
790
|
-
function
|
|
790
|
+
function b() {
|
|
791
791
|
c.setState("value", w.current, !0);
|
|
792
792
|
}
|
|
793
793
|
if (!m) return null;
|
|
794
794
|
let { disabled: y, value: C, onSelect: P, forceMount: z, keywords: U, ..._ } = e;
|
|
795
|
-
return p.createElement(Q.div, { ref: he(l, a), ..._, id: r, "cmdk-item": "", role: "option", "aria-disabled": !!y, "aria-selected": !!
|
|
795
|
+
return p.createElement(Q.div, { ref: he(l, a), ..._, id: r, "cmdk-item": "", role: "option", "aria-disabled": !!y, "aria-selected": !!v, "data-disabled": !!y, "data-selected": !!v, onPointerMove: y || o.getDisablePointerSelection() ? void 0 : b, onClick: y ? void 0 : S }, e.children);
|
|
796
796
|
}), Dr = p.forwardRef((e, a) => {
|
|
797
|
-
let { heading: t, children: n, forceMount: r, ...l } = e, s = ie(), o = p.useRef(null), f = p.useRef(null), u = ie(), w =
|
|
797
|
+
let { heading: t, children: n, forceMount: r, ...l } = e, s = ie(), o = p.useRef(null), f = p.useRef(null), u = ie(), w = be(), c = Y((m) => r || w.filter() === !1 ? !0 : m.search ? m.filtered.groups.has(s) : !0);
|
|
798
798
|
ae(() => w.group(s), []), Dt(s, o, [e.value, e.heading, f]);
|
|
799
|
-
let
|
|
800
|
-
return p.createElement(Q.div, { ref: he(o, a), ...l, "cmdk-group": "", role: "presentation", hidden: c ? void 0 : !0 }, t && p.createElement("div", { ref: f, "cmdk-group-heading": "", "aria-hidden": !0, id: u }, t), Ne(e, (m) => p.createElement("div", { "cmdk-group-items": "", role: "group", "aria-labelledby": t ? u : void 0 }, p.createElement(Tt.Provider, { value:
|
|
799
|
+
let v = p.useMemo(() => ({ id: s, forceMount: r }), [r]);
|
|
800
|
+
return p.createElement(Q.div, { ref: he(o, a), ...l, "cmdk-group": "", role: "presentation", hidden: c ? void 0 : !0 }, t && p.createElement("div", { ref: f, "cmdk-group-heading": "", "aria-hidden": !0, id: u }, t), Ne(e, (m) => p.createElement("div", { "cmdk-group-items": "", role: "group", "aria-labelledby": t ? u : void 0 }, p.createElement(Tt.Provider, { value: v }, m))));
|
|
801
801
|
}), Rr = p.forwardRef((e, a) => {
|
|
802
802
|
let { alwaysRender: t, ...n } = e, r = p.useRef(null), l = Y((s) => !s.search);
|
|
803
803
|
return !t && !l ? null : p.createElement(Q.div, { ref: he(r, a), ...n, "cmdk-separator": "", role: "separator" });
|
|
804
804
|
}), Pr = p.forwardRef((e, a) => {
|
|
805
|
-
let { onValueChange: t, ...n } = e, r = e.value != null, l = Ge(), s = Y((u) => u.search), o = Y((u) => u.selectedItemId), f =
|
|
805
|
+
let { onValueChange: t, ...n } = e, r = e.value != null, l = Ge(), s = Y((u) => u.search), o = Y((u) => u.selectedItemId), f = be();
|
|
806
806
|
return p.useEffect(() => {
|
|
807
807
|
e.value != null && l.setState("search", e.value);
|
|
808
808
|
}, [e.value]), p.createElement(Q.input, { ref: a, ...n, "cmdk-input": "", autoComplete: "off", autoCorrect: "off", spellCheck: !1, "aria-autocomplete": "list", role: "combobox", "aria-expanded": !0, "aria-controls": f.listId, "aria-labelledby": f.labelId, "aria-activedescendant": o, id: f.inputId, type: "text", value: r ? e.value : s, onChange: (u) => {
|
|
809
809
|
r || l.setState("search", u.target.value), t == null || t(u.target.value);
|
|
810
810
|
} });
|
|
811
811
|
}), _r = p.forwardRef((e, a) => {
|
|
812
|
-
let { children: t, label: n = "Suggestions", ...r } = e, l = p.useRef(null), s = p.useRef(null), o = Y((u) => u.selectedItemId), f =
|
|
812
|
+
let { children: t, label: n = "Suggestions", ...r } = e, l = p.useRef(null), s = p.useRef(null), o = Y((u) => u.selectedItemId), f = be();
|
|
813
813
|
return p.useEffect(() => {
|
|
814
814
|
if (s.current && l.current) {
|
|
815
|
-
let u = s.current, w = l.current, c,
|
|
815
|
+
let u = s.current, w = l.current, c, v = new ResizeObserver(() => {
|
|
816
816
|
c = requestAnimationFrame(() => {
|
|
817
817
|
let m = u.offsetHeight;
|
|
818
818
|
w.style.setProperty("--cmdk-list-height", m.toFixed(1) + "px");
|
|
819
819
|
});
|
|
820
820
|
});
|
|
821
|
-
return
|
|
822
|
-
cancelAnimationFrame(c),
|
|
821
|
+
return v.observe(u), () => {
|
|
822
|
+
cancelAnimationFrame(c), v.unobserve(u);
|
|
823
823
|
};
|
|
824
824
|
}
|
|
825
825
|
}, []), p.createElement(Q.div, { ref: he(l, a), ...r, "cmdk-list": "", role: "listbox", tabIndex: -1, "aria-activedescendant": o, "aria-label": n, id: f.listId }, Ne(e, (u) => p.createElement("div", { ref: he(s, f.listInnerRef), "cmdk-list-sizer": "" }, u)));
|
|
@@ -860,7 +860,7 @@ function Y(e) {
|
|
|
860
860
|
return p.useSyncExternalStore(a.subscribe, t, t);
|
|
861
861
|
}
|
|
862
862
|
function Dt(e, a, t, n = []) {
|
|
863
|
-
let r = p.useRef(), l =
|
|
863
|
+
let r = p.useRef(), l = be();
|
|
864
864
|
return ae(() => {
|
|
865
865
|
var s;
|
|
866
866
|
let o = (() => {
|
|
@@ -902,7 +902,7 @@ const Rt = p.forwardRef(({ className: e, ...a }, t) => /* @__PURE__ */ i(
|
|
|
902
902
|
));
|
|
903
903
|
Rt.displayName = B.displayName;
|
|
904
904
|
const Pt = p.forwardRef(({ className: e, ...a }, t) => /* @__PURE__ */ h("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
|
|
905
|
-
/* @__PURE__ */ i(
|
|
905
|
+
/* @__PURE__ */ i(ba, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
|
|
906
906
|
/* @__PURE__ */ i(
|
|
907
907
|
B.Input,
|
|
908
908
|
{
|
|
@@ -970,9 +970,9 @@ Ve.displayName = B.Item.displayName;
|
|
|
970
970
|
function $r(e = {}) {
|
|
971
971
|
const { authToken: a, tokenProps: t } = qe(), n = O(
|
|
972
972
|
(N) => N.actions.applyResolvedCalendarPreferences
|
|
973
|
-
), r = e.enabled ?? !0, l = (a == null ? void 0 : a.accessToken) ?? null, s = (t == null ? void 0 : t.apiServiceUrl) ?? null, [o, f] = F(!1), [u, w] = F(!1), [c,
|
|
973
|
+
), r = e.enabled ?? !0, l = (a == null ? void 0 : a.accessToken) ?? null, s = (t == null ? void 0 : t.apiServiceUrl) ?? null, [o, f] = F(!1), [u, w] = F(!1), [c, v] = F(!1), [m, S] = F(null), [b, y] = F(null), C = H(l);
|
|
974
974
|
C.current = l, Z(() => {
|
|
975
|
-
y(null), S(null), f(!1), w(!1),
|
|
975
|
+
y(null), S(null), f(!1), w(!1), v(!1);
|
|
976
976
|
}, [l]);
|
|
977
977
|
const P = W(async (N) => {
|
|
978
978
|
const g = Va(await N.json());
|
|
@@ -1046,7 +1046,7 @@ function $r(e = {}) {
|
|
|
1046
1046
|
if (!l || !s)
|
|
1047
1047
|
return S("Not authenticated"), !1;
|
|
1048
1048
|
const N = l;
|
|
1049
|
-
|
|
1049
|
+
v(!0), S(null);
|
|
1050
1050
|
try {
|
|
1051
1051
|
const g = await fetch(
|
|
1052
1052
|
`${s}/v1/user-preferences/calendar`,
|
|
@@ -1064,7 +1064,7 @@ function $r(e = {}) {
|
|
|
1064
1064
|
} catch (g) {
|
|
1065
1065
|
return C.current === N && S(g instanceof Error ? g.message : "Unknown error"), !1;
|
|
1066
1066
|
} finally {
|
|
1067
|
-
C.current === N &&
|
|
1067
|
+
C.current === N && v(!1);
|
|
1068
1068
|
}
|
|
1069
1069
|
}, [
|
|
1070
1070
|
l,
|
|
@@ -1073,7 +1073,7 @@ function $r(e = {}) {
|
|
|
1073
1073
|
P
|
|
1074
1074
|
]);
|
|
1075
1075
|
return {
|
|
1076
|
-
preferences:
|
|
1076
|
+
preferences: b,
|
|
1077
1077
|
isLoading: o,
|
|
1078
1078
|
isSaving: u,
|
|
1079
1079
|
isClearing: c,
|
|
@@ -1147,7 +1147,7 @@ function qr({
|
|
|
1147
1147
|
isClearing: l,
|
|
1148
1148
|
updatePreferences: s,
|
|
1149
1149
|
clearPreferences: o
|
|
1150
|
-
} = $r({ enabled: e }), f =
|
|
1150
|
+
} = $r({ enabled: e }), f = va(), u = (t == null ? void 0 : t.resolved.tz) || (f == null ? void 0 : f.tz) || "UTC", w = (t == null ? void 0 : t.resolved.weekStart) ?? (f == null ? void 0 : f.weekStart) ?? 1, [c, v] = F((t == null ? void 0 : t.stored) === null), [m, S] = F(!1), [b, y] = F(
|
|
1151
1151
|
u
|
|
1152
1152
|
), [C, P] = F(
|
|
1153
1153
|
w
|
|
@@ -1156,7 +1156,7 @@ function qr({
|
|
|
1156
1156
|
(k) => !Ee.some((oe) => oe.value === k)
|
|
1157
1157
|
),
|
|
1158
1158
|
[_]
|
|
1159
|
-
), g = ee(() => mt(
|
|
1159
|
+
), g = ee(() => mt(b), [b]), I = t != null && t.inherited ? mt(t.inherited.tz) : "UTC", D = t != null && t.inherited ? Kr(t.inherited.weekStart) : "Monday", E = Wr(
|
|
1160
1160
|
t == null ? void 0 : t.inheritedSources
|
|
1161
1161
|
);
|
|
1162
1162
|
Mt.useEffect(() => {
|
|
@@ -1164,7 +1164,7 @@ function qr({
|
|
|
1164
1164
|
S(!1);
|
|
1165
1165
|
return;
|
|
1166
1166
|
}
|
|
1167
|
-
m || (t &&
|
|
1167
|
+
m || (t && v(t.stored === null), y(u), P(w));
|
|
1168
1168
|
}, [
|
|
1169
1169
|
e,
|
|
1170
1170
|
m,
|
|
@@ -1178,7 +1178,7 @@ function qr({
|
|
|
1178
1178
|
return;
|
|
1179
1179
|
}
|
|
1180
1180
|
c ? await o() ? (G.success("Now using default settings."), a()) : G.error("Failed to save preferences. Please try again.") : await s({
|
|
1181
|
-
tz:
|
|
1181
|
+
tz: b,
|
|
1182
1182
|
weekStart: C
|
|
1183
1183
|
}) ? (G.success("Preferences saved."), a()) : G.error("Failed to save preferences. Please try again.");
|
|
1184
1184
|
}, $ = () => {
|
|
@@ -1191,7 +1191,7 @@ function qr({
|
|
|
1191
1191
|
{
|
|
1192
1192
|
value: c ? "defaults" : "custom",
|
|
1193
1193
|
onValueChange: (k) => {
|
|
1194
|
-
S(!0),
|
|
1194
|
+
S(!0), v(k === "defaults");
|
|
1195
1195
|
},
|
|
1196
1196
|
className: "space-y-0.5",
|
|
1197
1197
|
children: [
|
|
@@ -1204,7 +1204,7 @@ function qr({
|
|
|
1204
1204
|
c && "bg-muted/50"
|
|
1205
1205
|
),
|
|
1206
1206
|
onClick: () => {
|
|
1207
|
-
S(!0),
|
|
1207
|
+
S(!0), v(!0);
|
|
1208
1208
|
},
|
|
1209
1209
|
children: [
|
|
1210
1210
|
/* @__PURE__ */ i(
|
|
@@ -1239,7 +1239,7 @@ function qr({
|
|
|
1239
1239
|
!c && "bg-muted/50"
|
|
1240
1240
|
),
|
|
1241
1241
|
onClick: () => {
|
|
1242
|
-
S(!0),
|
|
1242
|
+
S(!0), v(!1);
|
|
1243
1243
|
},
|
|
1244
1244
|
children: [
|
|
1245
1245
|
/* @__PURE__ */ i(
|
|
@@ -1311,7 +1311,7 @@ function qr({
|
|
|
1311
1311
|
{
|
|
1312
1312
|
className: j(
|
|
1313
1313
|
"h-3.5 w-3.5",
|
|
1314
|
-
|
|
1314
|
+
b === k.value ? "opacity-100" : "opacity-0"
|
|
1315
1315
|
)
|
|
1316
1316
|
}
|
|
1317
1317
|
),
|
|
@@ -1335,7 +1335,7 @@ function qr({
|
|
|
1335
1335
|
{
|
|
1336
1336
|
className: j(
|
|
1337
1337
|
"h-3.5 w-3.5",
|
|
1338
|
-
|
|
1338
|
+
b === k ? "opacity-100" : "opacity-0"
|
|
1339
1339
|
)
|
|
1340
1340
|
}
|
|
1341
1341
|
),
|
|
@@ -1415,9 +1415,9 @@ function Hr(e = {}) {
|
|
|
1415
1415
|
(g) => g.actions.applyResolvedValueFormatPreferences
|
|
1416
1416
|
), r = e.enabled ?? !0, l = (a == null ? void 0 : a.accessToken) ?? null, s = (t == null ? void 0 : t.apiServiceUrl) ?? null, o = H(l);
|
|
1417
1417
|
o.current = l;
|
|
1418
|
-
const [f, u] = F(null), [w, c] = F(!1), [
|
|
1418
|
+
const [f, u] = F(null), [w, c] = F(!1), [v, m] = F(!1), [S, b] = F(!1), [y, C] = F(null);
|
|
1419
1419
|
Z(() => {
|
|
1420
|
-
u(null), C(null), c(!1), m(!1),
|
|
1420
|
+
u(null), C(null), c(!1), m(!1), b(!1);
|
|
1421
1421
|
}, [l]);
|
|
1422
1422
|
const P = W(async (g) => {
|
|
1423
1423
|
const I = Ma(await g.json());
|
|
@@ -1478,20 +1478,20 @@ function Hr(e = {}) {
|
|
|
1478
1478
|
[l, n, z]
|
|
1479
1479
|
), N = W(async () => {
|
|
1480
1480
|
const g = l;
|
|
1481
|
-
|
|
1481
|
+
b(!0), C(null);
|
|
1482
1482
|
try {
|
|
1483
1483
|
const I = await z("DELETE");
|
|
1484
1484
|
return o.current !== g ? !1 : (u(I), n(I.resolved, I.sources), !0);
|
|
1485
1485
|
} catch (I) {
|
|
1486
1486
|
return o.current === g && C(I instanceof Error ? I.message : "Unknown error"), !1;
|
|
1487
1487
|
} finally {
|
|
1488
|
-
o.current === g &&
|
|
1488
|
+
o.current === g && b(!1);
|
|
1489
1489
|
}
|
|
1490
1490
|
}, [l, n, z]);
|
|
1491
1491
|
return {
|
|
1492
1492
|
preferences: f,
|
|
1493
1493
|
isLoading: w,
|
|
1494
|
-
isSaving:
|
|
1494
|
+
isSaving: v,
|
|
1495
1495
|
isClearing: S,
|
|
1496
1496
|
error: y,
|
|
1497
1497
|
updatePreferences: _,
|
|
@@ -1622,28 +1622,28 @@ function Zr({
|
|
|
1622
1622
|
disabled: r
|
|
1623
1623
|
}) {
|
|
1624
1624
|
var N, g, I, D;
|
|
1625
|
-
const l = de(), s = de(), o = de(), f = de(), u = de(), c = (e.locale === void 0 ? void 0 : wt(e.locale)) ?? a.locale,
|
|
1625
|
+
const l = de(), s = de(), o = de(), f = de(), u = de(), c = (e.locale === void 0 ? void 0 : wt(e.locale)) ?? a.locale, v = e.defaultCurrency ?? a.defaultCurrency, m = {
|
|
1626
1626
|
locale: c,
|
|
1627
1627
|
dateStyle: e.dateStyle ?? a.dateStyle,
|
|
1628
1628
|
dateTime: {
|
|
1629
1629
|
dateStyle: ((N = e.dateTime) == null ? void 0 : N.dateStyle) ?? a.dateTime.dateStyle,
|
|
1630
1630
|
timeStyle: ((g = e.dateTime) == null ? void 0 : g.timeStyle) ?? a.dateTime.timeStyle
|
|
1631
1631
|
},
|
|
1632
|
-
defaultCurrency:
|
|
1632
|
+
defaultCurrency: v
|
|
1633
1633
|
}, S = new Intl.NumberFormat(c, {
|
|
1634
1634
|
style: "currency",
|
|
1635
|
-
currency:
|
|
1636
|
-
}).format(1e3),
|
|
1635
|
+
currency: v
|
|
1636
|
+
}).format(1e3), b = we({
|
|
1637
1637
|
preferences: m,
|
|
1638
1638
|
calendar: { tz: "UTC" }
|
|
1639
1639
|
}), y = ce({
|
|
1640
1640
|
value: ft,
|
|
1641
1641
|
metadata: { kind: "raw_temporal", valueKind: "date" },
|
|
1642
|
-
format:
|
|
1642
|
+
format: b
|
|
1643
1643
|
}).text, C = ce({
|
|
1644
1644
|
value: Pe,
|
|
1645
1645
|
metadata: { kind: "raw_temporal", valueKind: "wall_datetime" },
|
|
1646
|
-
format:
|
|
1646
|
+
format: b
|
|
1647
1647
|
}).text, P = Le(
|
|
1648
1648
|
(E) => ce({
|
|
1649
1649
|
value: ft,
|
|
@@ -1868,7 +1868,7 @@ function Qr({
|
|
|
1868
1868
|
active: e,
|
|
1869
1869
|
onClose: a
|
|
1870
1870
|
}) {
|
|
1871
|
-
var o, f, u, w, c,
|
|
1871
|
+
var o, f, u, w, c, v, m;
|
|
1872
1872
|
const { preferences: t, isLoading: n, isSaving: r, updatePreferences: l } = Hr({ enabled: e });
|
|
1873
1873
|
if (!e) return null;
|
|
1874
1874
|
if (!t)
|
|
@@ -1886,7 +1886,7 @@ function Qr({
|
|
|
1886
1886
|
((o = t.stored) == null ? void 0 : o.locale) ?? "",
|
|
1887
1887
|
((f = t.stored) == null ? void 0 : f.dateStyle) ?? "",
|
|
1888
1888
|
((w = (u = t.stored) == null ? void 0 : u.dateTime) == null ? void 0 : w.dateStyle) ?? "",
|
|
1889
|
-
((
|
|
1889
|
+
((v = (c = t.stored) == null ? void 0 : c.dateTime) == null ? void 0 : v.timeStyle) ?? "",
|
|
1890
1890
|
((m = t.stored) == null ? void 0 : m.defaultCurrency) ?? ""
|
|
1891
1891
|
].join(":");
|
|
1892
1892
|
return /* @__PURE__ */ i(
|
|
@@ -1915,11 +1915,11 @@ function en({
|
|
|
1915
1915
|
...r.dateStyle !== void 0 ? { dateStyle: r.dateStyle } : {},
|
|
1916
1916
|
...r.dateTime ? { dateTime: { ...r.dateTime } } : {},
|
|
1917
1917
|
...r.defaultCurrency !== void 0 ? { defaultCurrency: r.defaultCurrency } : {}
|
|
1918
|
-
},
|
|
1919
|
-
(
|
|
1918
|
+
}, v = ht.filter(
|
|
1919
|
+
(b) => pt(r, b) === void 0 && pt(e.stored, b) !== void 0
|
|
1920
1920
|
), m = {
|
|
1921
1921
|
...Object.keys(c).length > 0 ? { set: c } : {},
|
|
1922
|
-
...
|
|
1922
|
+
...v.length > 0 ? { clear: v } : {}
|
|
1923
1923
|
};
|
|
1924
1924
|
(Object.keys(m).length === 0 ? !0 : await t(m)) ? (G.success("Display format preferences saved."), n()) : G.error("Failed to save preferences. Please try again.");
|
|
1925
1925
|
}, f = async () => {
|
|
@@ -2022,7 +2022,7 @@ export {
|
|
|
2022
2022
|
$e as e,
|
|
2023
2023
|
Ve as f,
|
|
2024
2024
|
rr as g,
|
|
2025
|
-
|
|
2025
|
+
vn as h,
|
|
2026
2026
|
dr as i,
|
|
2027
2027
|
cr as u
|
|
2028
2028
|
};
|