react-semaphor 0.1.443 → 0.1.445
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/CHANGELOG.md +7 -0
- package/dist/analytics-protocol/index.cjs +1 -1
- package/dist/analytics-protocol/index.js +123 -107
- package/dist/appearance/index.cjs +1 -1
- package/dist/brand-studio/index.cjs +2 -2
- package/dist/brand-studio/index.js +5 -4
- package/dist/briefings/index.cjs +1 -1
- package/dist/briefings/index.js +526 -457
- package/dist/chunks/analyze-result-contract-BHb7sUUW.cjs +1 -0
- package/dist/chunks/analyze-result-contract-DUv3QnMl.js +29 -0
- package/dist/chunks/{braces-CbO-aIwH.js → braces-BKimshER.cjs} +1 -1
- package/dist/chunks/{code-editor-BpADiIlq.js → code-editor-B4gTfvc5.js} +6800 -6560
- package/dist/chunks/code-editor-BYVorgOf.cjs +138 -0
- package/dist/chunks/common-types-CQ6SHfLk.cjs +1 -0
- package/dist/chunks/{common-types-ClkOI-3O.js → common-types-DFsDdpH7.js} +22 -21
- package/dist/chunks/dashboard-CAiwJW3L.cjs +1397 -0
- package/dist/chunks/{dashboard-briefing-launcher-C60n8LqW.js → dashboard-briefing-launcher-2SLNOaTg.js} +26 -24
- package/dist/chunks/{dashboard-briefing-launcher-BYMLjZxG.js → dashboard-briefing-launcher-CHwjpUYz.cjs} +2 -2
- package/dist/chunks/{dashboard-controls-ti9Rcel2.js → dashboard-controls-BfL14aqO.js} +11 -9
- package/dist/chunks/{dashboard-controls-BH_fZYDU.js → dashboard-controls-BgGTg4yw.cjs} +2 -2
- package/dist/chunks/dashboard-date-comparison-definition-DZq0htjG.cjs +1 -0
- package/dist/chunks/dashboard-json-BOv8tCa9.cjs +1 -0
- package/dist/chunks/{dashboard-json-Bturr634.js → dashboard-json-BZwq3EcS.js} +14 -12
- package/dist/chunks/{dashboard-Bd1Quco-.js → dashboard-u61yfU6u.js} +50081 -47351
- package/dist/chunks/edit-dashboard-visual-BdVCH0DJ.cjs +182 -0
- package/dist/chunks/{edit-dashboard-visual-DglMds57.js → edit-dashboard-visual-njLPYip3.js} +6825 -6656
- package/dist/chunks/{editor-action-buttons-CRi0fhVW.js → editor-action-buttons-BhLX5Q6m.js} +24 -23
- package/dist/chunks/{editor-action-buttons-Cxo7_tNG.js → editor-action-buttons-CBVMFipA.cjs} +1 -1
- package/dist/chunks/{index-D7KJindZ.js → format-types-CSv0V7mm.cjs} +1 -1
- package/dist/chunks/{index-CnujJ3fa.js → format-types-CZH5w1lo.js} +23 -17
- package/dist/chunks/{layout-grid-B08pP7v6.js → layout-grid-3-HWzEwU.cjs} +1 -1
- package/dist/chunks/{metric-comparison-CPoDx56y.js → metric-comparison-BJ_Qu1ZF.js} +1 -1
- package/dist/chunks/metric-comparison-CUAJ8n4y.cjs +1 -0
- package/dist/chunks/{palette-C0yjT5Tv.js → palette-DW_l7Jr0.cjs} +1 -1
- package/dist/chunks/pivot-result-identity-B6QCWOSi.js +94 -0
- package/dist/chunks/pivot-result-identity-CDLRT-YG.cjs +1 -0
- package/dist/chunks/pivot-result-lifecycle-BM3Pl-D1.js +914 -0
- package/dist/chunks/pivot-result-lifecycle-DPc0ANwk.cjs +4 -0
- package/dist/chunks/presentation-execution-BTV-Q43g.cjs +1 -0
- package/dist/chunks/presentation-execution-CGlb7YZ6.js +637 -0
- package/dist/chunks/{report-preferences-dialog-TtwdAuNn.js → report-preferences-dialog-D_NJu2wU.js} +7 -6
- package/dist/chunks/report-preferences-dialog-r8QzOSFb.cjs +1 -0
- package/dist/chunks/report-runtime-context-C8LZFsqV.cjs +1 -0
- package/dist/chunks/report-runtime-context-Qzn11HQe.js +387 -0
- package/dist/chunks/{save-Xdc4pnys.js → save-4_uMnE6s.cjs} +1 -1
- package/dist/chunks/{search-Dcud9ajy.js → search-6ZmeMq55.cjs} +1 -1
- package/dist/chunks/temporal-bucket-BnPxGrAi.js +446 -0
- package/dist/chunks/temporal-bucket-authoring-BUZMuVca.js +205 -0
- package/dist/chunks/temporal-bucket-authoring-CPTwHzvs.cjs +1 -0
- package/dist/chunks/temporal-bucket-contract-B2bJ1oe4.js +108 -0
- package/dist/chunks/temporal-bucket-contract-ChDBWX8I.cjs +1 -0
- package/dist/chunks/temporal-bucket-pMnV-4Nj.cjs +1 -0
- package/dist/chunks/{comparison-document-migration-Dj6xZMCb.js → temporal-result-owner-Cb27SSG9.js} +152 -123
- package/dist/chunks/temporal-result-owner-f6-i65Fb.cjs +1 -0
- package/dist/chunks/token-types-BdQ8kHBm.cjs +1 -0
- package/dist/chunks/token-types-DLo91nOf.js +8 -0
- package/dist/chunks/{update-policy-DnF_74zC.js → update-policy-BxvYMYz0.cjs} +1 -1
- package/dist/chunks/{update-policy-De2NswtM.js → update-policy-eg59mQqv.js} +1 -1
- package/dist/chunks/validators-9D4KBqKD.cjs +1 -0
- package/dist/chunks/validators-wZ2WlNHc.js +4640 -0
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +2 -2
- package/dist/dashboard-authoring/index.cjs +3 -3
- package/dist/dashboard-authoring/index.js +136 -126
- package/dist/data-app-builder/index.cjs +1 -1
- package/dist/data-app-builder/index.js +2 -2
- package/dist/data-app-codegen/index.cjs +1 -1
- package/dist/data-app-codegen/index.js +2 -2
- package/dist/data-app-codegen-node/index.cjs +1 -1
- package/dist/data-app-codegen-node/index.js +3 -3
- package/dist/data-app-sdk/index.cjs +2 -2
- package/dist/data-app-sdk/index.js +34 -35
- package/dist/data-app-sdk-adapters/index.cjs +1 -1
- package/dist/data-app-sdk-adapters/index.js +5 -5
- package/dist/data-app-sdk-validation/index.cjs +1 -1
- package/dist/data-app-sdk-validation/index.js +9 -10
- package/dist/format-utils/index.cjs +3 -3
- package/dist/format-utils/index.js +155 -176
- package/dist/index.cjs +1 -1
- package/dist/index.js +180 -174
- package/dist/report-runtime-context/index.cjs +1 -1
- package/dist/report-runtime-context/index.js +7 -392
- package/dist/shared/index.cjs +1 -1
- package/dist/style.css +1 -1
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +3 -3
- package/dist/types/analytics-protocol.d.ts +257 -48
- package/dist/types/briefings.d.ts +138 -50
- package/dist/types/dashboard-assistant.d.ts +207 -52
- package/dist/types/dashboard-authoring.d.ts +182 -50
- package/dist/types/dashboard.d.ts +290 -48
- package/dist/types/data-app-builder.d.ts +48 -42
- package/dist/types/data-app-codegen-node.d.ts +50 -44
- package/dist/types/data-app-codegen.d.ts +50 -44
- package/dist/types/data-app-sdk-adapters.d.ts +48 -42
- package/dist/types/data-app-sdk-validation.d.ts +81 -43
- package/dist/types/data-app-sdk.d.ts +83 -45
- package/dist/types/format-utils.d.ts +645 -67
- package/dist/types/index.cjs +1 -1
- package/dist/types/index.js +19 -19
- package/dist/types/main.d.ts +298 -94
- package/dist/types/report-runtime-context.d.ts +3 -0
- package/dist/types/shared.d.ts +116 -41
- package/dist/types/surfboard.d.ts +290 -48
- package/dist/types/types.d.ts +455 -65
- package/package.json +3 -1
- package/dist/chunks/analyze-result-contract-BswhsmWT.js +0 -1
- package/dist/chunks/analyze-result-contract-CfOBEwaC.js +0 -1998
- package/dist/chunks/code-editor-M7HTUhdF.js +0 -138
- package/dist/chunks/common-types-C73-Ud1-.js +0 -1
- package/dist/chunks/comparison-document-migration-DbU_BTxR.js +0 -1
- package/dist/chunks/csv-utils-BZDvO2Fw.js +0 -376
- package/dist/chunks/csv-utils-Co0WxHke.js +0 -4
- package/dist/chunks/dashboard-cB3xmTNn.js +0 -1402
- package/dist/chunks/dashboard-date-comparison-definition-DGZr3m-b.js +0 -1
- package/dist/chunks/dashboard-json-Dw_55vSZ.js +0 -1
- package/dist/chunks/edit-dashboard-visual-BUc3NBQ4.js +0 -182
- package/dist/chunks/metric-comparison-DVy3fll_.js +0 -1
- package/dist/chunks/numeric-presentation-BJs5lSar.js +0 -517
- package/dist/chunks/numeric-presentation-Dlb-Dk4c.js +0 -1
- package/dist/chunks/report-preferences-dialog-CCvFqH4Q.js +0 -1
- package/dist/chunks/source-identity-5OPV4gvg.js +0 -92
- package/dist/chunks/source-identity-Cbo2LOHQ.js +0 -1
- package/dist/chunks/validators-B2vUAqTf.js +0 -1
- package/dist/chunks/validators-Bce_J7Vd.js +0 -2448
- /package/dist/chunks/{card-config-utils-15sRtebL.js → card-config-utils-15sRtebL.cjs} +0 -0
- /package/dist/chunks/{catalog-field-grounding-Bnx-3tE0.js → catalog-field-grounding-Bnx-3tE0.cjs} +0 -0
- /package/dist/chunks/{dashboard-input-contract-DV3cshjz.js → dashboard-input-contract-DV3cshjz.cjs} +0 -0
- /package/dist/chunks/{index-Dpm_VET4.js → index-Dpm_VET4.cjs} +0 -0
- /package/dist/chunks/{index-jSrCwPQz.js → index-jSrCwPQz.cjs} +0 -0
- /package/dist/chunks/{normalize-dashboard-for-dirty-check-BXRUMVb2.js → normalize-dashboard-for-dirty-check-BXRUMVb2.cjs} +0 -0
- /package/dist/chunks/{operators-DrTQsJXv.js → operators-DrTQsJXv.cjs} +0 -0
- /package/dist/chunks/{use-debounced-dirty-check-XHSwAefL.js → use-debounced-dirty-check-XHSwAefL.cjs} +0 -0
|
@@ -1,394 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { p as
|
|
3
|
-
const M = {
|
|
4
|
-
tz: "UTC",
|
|
5
|
-
weekStart: 1,
|
|
6
|
-
anchor: "now"
|
|
7
|
-
}, b = [
|
|
8
|
-
"tz",
|
|
9
|
-
"weekStart",
|
|
10
|
-
"anchor",
|
|
11
|
-
"fiscalCalendar"
|
|
12
|
-
], w = ["kind", "yearStartMonth"], E = [
|
|
13
|
-
"calendar",
|
|
14
|
-
"valueFormat",
|
|
15
|
-
"preferenceSources"
|
|
16
|
-
], z = ["calendar", "valueFormat"], k = ["tz", "weekStart"], F = [
|
|
17
|
-
"stored",
|
|
18
|
-
"inherited",
|
|
19
|
-
"inheritedSources",
|
|
20
|
-
"resolved",
|
|
21
|
-
"sources"
|
|
22
|
-
], T = [
|
|
23
|
-
"locale",
|
|
24
|
-
"dateStyle",
|
|
25
|
-
"dateTime",
|
|
26
|
-
"defaultCurrency"
|
|
27
|
-
], R = ["dateStyle", "timeStyle"];
|
|
28
|
-
function o(e) {
|
|
29
|
-
if (e === null || typeof e != "object" || Array.isArray(e))
|
|
30
|
-
return !1;
|
|
31
|
-
const r = Object.getPrototypeOf(e);
|
|
32
|
-
return r === null || Object.getPrototypeOf(r) === null;
|
|
33
|
-
}
|
|
34
|
-
function n(e, r, t) {
|
|
35
|
-
const a = new Set(r);
|
|
36
|
-
return Object.keys(e).filter((s) => !a.has(s)).map((s) => ({
|
|
37
|
-
path: t === "$" ? s : `${t}.${s}`,
|
|
38
|
-
code: "unknown_property",
|
|
39
|
-
message: `Unknown property "${s}"`
|
|
40
|
-
}));
|
|
41
|
-
}
|
|
42
|
-
function p(e) {
|
|
43
|
-
try {
|
|
44
|
-
return new Intl.DateTimeFormat("en-US", { timeZone: e }).format(), !0;
|
|
45
|
-
} catch {
|
|
46
|
-
return !1;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
function y(e) {
|
|
50
|
-
return Number.isInteger(e) && typeof e == "number" && e >= 0 && e <= 6;
|
|
51
|
-
}
|
|
52
|
-
function d(e, r, t) {
|
|
53
|
-
if (!o(e))
|
|
54
|
-
return {
|
|
55
|
-
ok: !1,
|
|
56
|
-
issues: [
|
|
57
|
-
{
|
|
58
|
-
path: r,
|
|
59
|
-
code: "invalid_type",
|
|
60
|
-
message: "Calendar preferences must be an object"
|
|
61
|
-
}
|
|
62
|
-
]
|
|
63
|
-
};
|
|
64
|
-
const a = n(e, ["tz", "weekStart"], r);
|
|
65
|
-
return (!t || e.tz !== void 0) && (typeof e.tz != "string" || !p(e.tz)) && a.push({
|
|
66
|
-
path: `${r}.tz`,
|
|
67
|
-
code: "invalid_timezone",
|
|
68
|
-
message: "tz must be a valid IANA timezone"
|
|
69
|
-
}), (!t || e.weekStart !== void 0) && !y(e.weekStart) && a.push({
|
|
70
|
-
path: `${r}.weekStart`,
|
|
71
|
-
code: "invalid_week_start",
|
|
72
|
-
message: "weekStart must be an integer from 0 to 6"
|
|
73
|
-
}), a.length ? { ok: !1, issues: a } : {
|
|
74
|
-
ok: !0,
|
|
75
|
-
value: {
|
|
76
|
-
...e.tz !== void 0 ? { tz: e.tz } : {},
|
|
77
|
-
...e.weekStart !== void 0 ? { weekStart: e.weekStart } : {}
|
|
78
|
-
}
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
function A(e) {
|
|
82
|
-
if (e === "now") return { ok: !0, value: "now" };
|
|
83
|
-
if (!o(e))
|
|
84
|
-
return {
|
|
85
|
-
ok: !1,
|
|
86
|
-
issues: [
|
|
87
|
-
{
|
|
88
|
-
path: "anchor",
|
|
89
|
-
code: "invalid_anchor",
|
|
90
|
-
message: 'anchor must be "now" or an object with an ISO timestamp'
|
|
91
|
-
}
|
|
92
|
-
]
|
|
93
|
-
};
|
|
94
|
-
const r = n(e, ["iso"], "anchor"), t = e.iso;
|
|
95
|
-
return g(t) === null && r.push({
|
|
96
|
-
path: "anchor.iso",
|
|
97
|
-
code: "invalid_anchor",
|
|
98
|
-
message: "anchor.iso must be an ISO timestamp with an explicit offset"
|
|
99
|
-
}), r.length ? { ok: !1, issues: r } : { ok: !0, value: { iso: t } };
|
|
100
|
-
}
|
|
101
|
-
function $(e) {
|
|
102
|
-
if (!o(e))
|
|
103
|
-
return {
|
|
104
|
-
ok: !1,
|
|
105
|
-
issues: [
|
|
106
|
-
{
|
|
107
|
-
path: "fiscalCalendar",
|
|
108
|
-
code: "invalid_fiscal_calendar",
|
|
109
|
-
message: "fiscalCalendar must be an object"
|
|
110
|
-
}
|
|
111
|
-
]
|
|
112
|
-
};
|
|
113
|
-
const r = n(e, w, "fiscalCalendar");
|
|
114
|
-
return e.kind !== "month_aligned" && r.push({
|
|
115
|
-
path: "fiscalCalendar.kind",
|
|
116
|
-
code: "invalid_fiscal_calendar",
|
|
117
|
-
message: 'fiscalCalendar.kind must be "month_aligned"'
|
|
118
|
-
}), (!Number.isInteger(e.yearStartMonth) || typeof e.yearStartMonth != "number" || e.yearStartMonth < 1 || e.yearStartMonth > 12) && r.push({
|
|
119
|
-
path: "fiscalCalendar.yearStartMonth",
|
|
120
|
-
code: "invalid_fiscal_calendar",
|
|
121
|
-
message: "fiscalCalendar.yearStartMonth must be an integer from 1 to 12"
|
|
122
|
-
}), r.length ? { ok: !1, issues: r } : {
|
|
123
|
-
ok: !0,
|
|
124
|
-
value: {
|
|
125
|
-
kind: "month_aligned",
|
|
126
|
-
yearStartMonth: e.yearStartMonth
|
|
127
|
-
}
|
|
128
|
-
};
|
|
129
|
-
}
|
|
130
|
-
function O(e) {
|
|
131
|
-
if (!o(e))
|
|
132
|
-
return {
|
|
133
|
-
ok: !1,
|
|
134
|
-
issues: [
|
|
135
|
-
{
|
|
136
|
-
path: "$",
|
|
137
|
-
code: "invalid_type",
|
|
138
|
-
message: "Calendar context must be an object"
|
|
139
|
-
}
|
|
140
|
-
]
|
|
141
|
-
};
|
|
142
|
-
const r = n(e, b, "$");
|
|
143
|
-
(typeof e.tz != "string" || !p(e.tz)) && r.push({
|
|
144
|
-
path: "tz",
|
|
145
|
-
code: "invalid_timezone",
|
|
146
|
-
message: "tz must be a valid IANA timezone"
|
|
147
|
-
}), y(e.weekStart) || r.push({
|
|
148
|
-
path: "weekStart",
|
|
149
|
-
code: "invalid_week_start",
|
|
150
|
-
message: "weekStart must be an integer from 0 to 6"
|
|
151
|
-
});
|
|
152
|
-
const t = A(e.anchor);
|
|
153
|
-
t.ok || r.push(...t.issues);
|
|
154
|
-
let a;
|
|
155
|
-
if (e.fiscalCalendar !== void 0) {
|
|
156
|
-
const s = $(e.fiscalCalendar);
|
|
157
|
-
s.ok ? a = s.value : r.push(...s.issues);
|
|
158
|
-
}
|
|
159
|
-
return r.length || !t.ok ? { ok: !1, issues: r } : {
|
|
160
|
-
ok: !0,
|
|
161
|
-
value: {
|
|
162
|
-
tz: e.tz,
|
|
163
|
-
weekStart: e.weekStart,
|
|
164
|
-
anchor: t.value,
|
|
165
|
-
...a ? { fiscalCalendar: a } : {}
|
|
166
|
-
}
|
|
167
|
-
};
|
|
168
|
-
}
|
|
169
|
-
function l(e, r, t) {
|
|
170
|
-
if (!C(e)) {
|
|
171
|
-
t.push({
|
|
172
|
-
path: r,
|
|
173
|
-
code: "invalid_preference_source",
|
|
174
|
-
message: "Preference source is invalid"
|
|
175
|
-
});
|
|
176
|
-
return;
|
|
177
|
-
}
|
|
178
|
-
return e;
|
|
179
|
-
}
|
|
180
|
-
function v(e, r) {
|
|
181
|
-
if (!o(e))
|
|
182
|
-
return {
|
|
183
|
-
ok: !1,
|
|
184
|
-
issues: [
|
|
185
|
-
{
|
|
186
|
-
path: r,
|
|
187
|
-
code: "invalid_type",
|
|
188
|
-
message: "Calendar preference sources must be an object"
|
|
189
|
-
}
|
|
190
|
-
]
|
|
191
|
-
};
|
|
192
|
-
const t = n(e, k, r), a = l(e.tz, `${r}.tz`, t), s = l(
|
|
193
|
-
e.weekStart,
|
|
194
|
-
`${r}.weekStart`,
|
|
195
|
-
t
|
|
196
|
-
);
|
|
197
|
-
return t.length || !a || !s ? { ok: !1, issues: t } : { ok: !0, value: { tz: a, weekStart: s } };
|
|
198
|
-
}
|
|
199
|
-
function D(e) {
|
|
200
|
-
if (!o(e))
|
|
201
|
-
return {
|
|
202
|
-
ok: !1,
|
|
203
|
-
issues: [
|
|
204
|
-
{
|
|
205
|
-
path: "$",
|
|
206
|
-
code: "invalid_type",
|
|
207
|
-
message: "Calendar preference response must be an object"
|
|
208
|
-
}
|
|
209
|
-
]
|
|
210
|
-
};
|
|
211
|
-
const r = n(e, F, "$"), t = e.stored === null ? { ok: !0, value: null } : d(e.stored, "stored", !0), a = d(
|
|
212
|
-
e.inherited,
|
|
213
|
-
"inherited",
|
|
214
|
-
!1
|
|
215
|
-
), s = v(
|
|
216
|
-
e.inheritedSources,
|
|
217
|
-
"inheritedSources"
|
|
218
|
-
), c = d(e.resolved, "resolved", !1), i = v(e.sources, "sources");
|
|
219
|
-
for (const u of [t, a, s, c, i])
|
|
220
|
-
u.ok || r.push(...u.issues);
|
|
221
|
-
return r.length || !t.ok || !a.ok || !s.ok || !c.ok || !i.ok ? { ok: !1, issues: r } : {
|
|
222
|
-
ok: !0,
|
|
223
|
-
value: {
|
|
224
|
-
stored: t.value,
|
|
225
|
-
inherited: a.value,
|
|
226
|
-
inheritedSources: s.value,
|
|
227
|
-
resolved: c.value,
|
|
228
|
-
sources: i.value
|
|
229
|
-
}
|
|
230
|
-
};
|
|
231
|
-
}
|
|
232
|
-
function j(e) {
|
|
233
|
-
if (!o(e))
|
|
234
|
-
return {
|
|
235
|
-
ok: !1,
|
|
236
|
-
issues: [
|
|
237
|
-
{
|
|
238
|
-
path: "preferenceSources",
|
|
239
|
-
code: "invalid_type",
|
|
240
|
-
message: "preferenceSources must be an object"
|
|
241
|
-
}
|
|
242
|
-
]
|
|
243
|
-
};
|
|
244
|
-
const r = n(e, z, "preferenceSources"), t = e.calendar, a = e.valueFormat;
|
|
245
|
-
if (o(t) || r.push({
|
|
246
|
-
path: "preferenceSources.calendar",
|
|
247
|
-
code: "invalid_type",
|
|
248
|
-
message: "Calendar preference sources must be an object"
|
|
249
|
-
}), o(a) || r.push({
|
|
250
|
-
path: "preferenceSources.valueFormat",
|
|
251
|
-
code: "invalid_type",
|
|
252
|
-
message: "Value-format preference sources must be an object"
|
|
253
|
-
}), !o(t) || !o(a))
|
|
254
|
-
return { ok: !1, issues: r };
|
|
255
|
-
r.push(
|
|
256
|
-
...n(
|
|
257
|
-
t,
|
|
258
|
-
k,
|
|
259
|
-
"preferenceSources.calendar"
|
|
260
|
-
),
|
|
261
|
-
...n(
|
|
262
|
-
a,
|
|
263
|
-
T,
|
|
264
|
-
"preferenceSources.valueFormat"
|
|
265
|
-
)
|
|
266
|
-
);
|
|
267
|
-
const s = a.dateTime;
|
|
268
|
-
o(s) ? r.push(
|
|
269
|
-
...n(
|
|
270
|
-
s,
|
|
271
|
-
R,
|
|
272
|
-
"preferenceSources.valueFormat.dateTime"
|
|
273
|
-
)
|
|
274
|
-
) : r.push({
|
|
275
|
-
path: "preferenceSources.valueFormat.dateTime",
|
|
276
|
-
code: "invalid_type",
|
|
277
|
-
message: "Datetime preference sources must be an object"
|
|
278
|
-
});
|
|
279
|
-
const c = l(
|
|
280
|
-
t.tz,
|
|
281
|
-
"preferenceSources.calendar.tz",
|
|
282
|
-
r
|
|
283
|
-
), i = l(
|
|
284
|
-
t.weekStart,
|
|
285
|
-
"preferenceSources.calendar.weekStart",
|
|
286
|
-
r
|
|
287
|
-
), u = l(
|
|
288
|
-
a.locale,
|
|
289
|
-
"preferenceSources.valueFormat.locale",
|
|
290
|
-
r
|
|
291
|
-
), f = l(
|
|
292
|
-
a.dateStyle,
|
|
293
|
-
"preferenceSources.valueFormat.dateStyle",
|
|
294
|
-
r
|
|
295
|
-
), m = o(s) ? l(
|
|
296
|
-
s.dateStyle,
|
|
297
|
-
"preferenceSources.valueFormat.dateTime.dateStyle",
|
|
298
|
-
r
|
|
299
|
-
) : void 0, S = o(s) ? l(
|
|
300
|
-
s.timeStyle,
|
|
301
|
-
"preferenceSources.valueFormat.dateTime.timeStyle",
|
|
302
|
-
r
|
|
303
|
-
) : void 0, h = l(
|
|
304
|
-
a.defaultCurrency,
|
|
305
|
-
"preferenceSources.valueFormat.defaultCurrency",
|
|
306
|
-
r
|
|
307
|
-
);
|
|
308
|
-
return r.length || !c || !i || !u || !f || !m || !S || !h ? { ok: !1, issues: r } : {
|
|
309
|
-
ok: !0,
|
|
310
|
-
value: {
|
|
311
|
-
calendar: {
|
|
312
|
-
tz: c,
|
|
313
|
-
weekStart: i
|
|
314
|
-
},
|
|
315
|
-
valueFormat: {
|
|
316
|
-
locale: u,
|
|
317
|
-
dateStyle: f,
|
|
318
|
-
dateTime: {
|
|
319
|
-
dateStyle: m,
|
|
320
|
-
timeStyle: S
|
|
321
|
-
},
|
|
322
|
-
defaultCurrency: h
|
|
323
|
-
}
|
|
324
|
-
}
|
|
325
|
-
};
|
|
326
|
-
}
|
|
327
|
-
function P(e) {
|
|
328
|
-
var a;
|
|
329
|
-
const r = _(e);
|
|
330
|
-
if (!r.ok)
|
|
331
|
-
return {
|
|
332
|
-
ok: !1,
|
|
333
|
-
issues: r.issues.map((s) => ({
|
|
334
|
-
path: `valueFormat.${s.path}`,
|
|
335
|
-
code: "invalid_value_format",
|
|
336
|
-
message: s.message
|
|
337
|
-
}))
|
|
338
|
-
};
|
|
339
|
-
const t = r.value;
|
|
340
|
-
return t.locale === void 0 || t.dateStyle === void 0 || ((a = t.dateTime) == null ? void 0 : a.dateStyle) === void 0 || t.dateTime.timeStyle === void 0 || t.defaultCurrency === void 0 ? {
|
|
341
|
-
ok: !1,
|
|
342
|
-
issues: [
|
|
343
|
-
{
|
|
344
|
-
path: "valueFormat",
|
|
345
|
-
code: "invalid_value_format",
|
|
346
|
-
message: "Resolved value-format preferences must be complete"
|
|
347
|
-
}
|
|
348
|
-
]
|
|
349
|
-
} : {
|
|
350
|
-
ok: !0,
|
|
351
|
-
value: {
|
|
352
|
-
locale: t.locale,
|
|
353
|
-
dateStyle: t.dateStyle,
|
|
354
|
-
dateTime: {
|
|
355
|
-
dateStyle: t.dateTime.dateStyle,
|
|
356
|
-
timeStyle: t.dateTime.timeStyle
|
|
357
|
-
},
|
|
358
|
-
defaultCurrency: t.defaultCurrency
|
|
359
|
-
}
|
|
360
|
-
};
|
|
361
|
-
}
|
|
362
|
-
function K(e) {
|
|
363
|
-
if (!o(e))
|
|
364
|
-
return {
|
|
365
|
-
ok: !1,
|
|
366
|
-
issues: [
|
|
367
|
-
{
|
|
368
|
-
path: "$",
|
|
369
|
-
code: "invalid_type",
|
|
370
|
-
message: "Report runtime context must be an object"
|
|
371
|
-
}
|
|
372
|
-
]
|
|
373
|
-
};
|
|
374
|
-
const r = n(e, E, "$"), t = O(e.calendar), a = P(e.valueFormat), s = j(e.preferenceSources);
|
|
375
|
-
return t.ok || r.push(
|
|
376
|
-
...t.issues.map((c) => ({
|
|
377
|
-
...c,
|
|
378
|
-
path: c.path === "$" ? "calendar" : `calendar.${c.path}`
|
|
379
|
-
}))
|
|
380
|
-
), a.ok || r.push(...a.issues), s.ok || r.push(...s.issues), r.length || !t.ok || !a.ok || !s.ok ? { ok: !1, issues: r } : {
|
|
381
|
-
ok: !0,
|
|
382
|
-
value: {
|
|
383
|
-
calendar: t.value,
|
|
384
|
-
valueFormat: a.value,
|
|
385
|
-
preferenceSources: s.value
|
|
386
|
-
}
|
|
387
|
-
};
|
|
388
|
-
}
|
|
1
|
+
import { b as r } from "../chunks/validators-wZ2WlNHc.js";
|
|
2
|
+
import { D as n, p as o, a as p, b as t } from "../chunks/report-runtime-context-Qzn11HQe.js";
|
|
389
3
|
export {
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
4
|
+
n as DEFAULT_CALENDAR_CONTEXT,
|
|
5
|
+
r as isValidIanaTimeZone,
|
|
6
|
+
o as parseCalendarContext,
|
|
7
|
+
p as parseCalendarPreferencesResponse,
|
|
8
|
+
t as parseReportRuntimeContext
|
|
394
9
|
};
|
package/dist/shared/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../chunks/use-debounced-dirty-check-XHSwAefL.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../chunks/use-debounced-dirty-check-XHSwAefL.cjs"),e=require("../chunks/normalize-dashboard-for-dirty-check-BXRUMVb2.cjs");exports.useDebouncedDirtyCheck=r.useDebouncedDirtyCheck;exports.normalizeDashboardForDirtyCheck=e.normalizeDashboardForDirtyCheck;exports.serializeDashboardForDirtyCheck=e.serializeDashboardForDirtyCheck;
|