react-semaphor 0.1.537 → 0.1.539
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 +352 -341
- package/dist/assistant-context/index.js +10 -0
- package/dist/assistant-protocol/index.js +104 -0
- package/dist/brand-studio/index.js +35 -31
- package/dist/briefings/index.js +46 -45
- package/dist/chunks/_commonjsHelpers-BkfeUUK-.js +28 -0
- package/dist/chunks/add-to-dashboard-CxtTfISD.js +56 -0
- package/dist/chunks/aggregate-table-row-presentation-BjK9YfMI.js +979 -0
- package/dist/chunks/analytics-base-schemas-BFAoRlkU.js +472 -0
- package/dist/chunks/apply-dashboard-operations-C-iahGka.js +402 -0
- package/dist/chunks/assistant-chat-DgiSuFT4.js +8083 -0
- package/dist/chunks/availability-Bp5Gfu1I.js +44 -0
- package/dist/chunks/{bookmark-state-B-I9BDD0.js → bookmark-state-k7y5SNGf.js} +9 -9
- package/dist/chunks/{braces-8TRlDwDw.js → braces-o9UiRQes.js} +1 -1
- package/dist/chunks/calculated-field-identity-DcBS2NPP.js +2161 -0
- package/dist/chunks/calendar-day-equality-Bpl15IBo.js +487 -0
- package/dist/chunks/class-utils-Df1OVOT1.js +2315 -0
- package/dist/chunks/{field-dependencies-CpRUwr9J.js → common-types-CUf03Htv.js} +65 -58
- package/dist/chunks/context-HD9usB1P.js +349 -0
- package/dist/chunks/conversation-sQiWYUOb.js +16 -0
- package/dist/chunks/csv-utils-GUfKyT1J.js +56 -0
- package/dist/chunks/custom-visual-inputs-BrUOIwln.js +3288 -0
- package/dist/chunks/{dashboard-briefing-launcher-A2uVpHCp.js → dashboard-briefing-launcher-Bl3gCeBR.js} +580 -556
- package/dist/chunks/{dashboard-controls-DxTuVis_.js → dashboard-controls-0EX0HiJt.js} +683 -686
- package/dist/chunks/{common-types-g7yS12Cg.js → dashboard-filter-value-compatibility-D95O4nd7.js} +18 -24
- package/dist/chunks/dashboard-json-6X_2BDiL.js +69 -0
- package/dist/chunks/{dashboard-BPJo-Fnd.js → dashboard-y5BwcvzT.js} +1 -1
- package/dist/chunks/document-dashboard-inputs-BrYYlRVo.js +10678 -0
- package/dist/chunks/document-sheet-utils-C1eEldxs.js +1076 -0
- package/dist/chunks/{edit-dashboard-visual-ByV0OwSp.js → edit-dashboard-visual-Bzchfgga.js} +4744 -4746
- package/dist/chunks/editor-draft-sync-BN5qYHPF.js +15 -0
- package/dist/chunks/filter-value-text-BhWugPWE.js +163 -0
- package/dist/chunks/index-CqMiAkay.js +3164 -0
- package/dist/chunks/index-CuHybtft.js +51 -0
- package/dist/chunks/layout-grid-Bgzth8vd.js +16 -0
- package/dist/chunks/{matrix-analytical-definition-CgBTD6H8.js → matrix-analytical-definition-bcprSe4u.js} +1 -1
- package/dist/chunks/{matrix-card-CAdizkUl.js → matrix-card-CJn1hB5V.js} +13 -12
- package/dist/chunks/matrix-definition-DQDI2okF.js +206 -0
- package/dist/chunks/{matrix-formatter-DJCk8Znf.js → matrix-formatter-DQ8avoIQ.js} +648 -457
- package/dist/chunks/matrix-member-presentation-BNPSDKBG.js +105 -0
- package/dist/chunks/{matrix-operation-contract-BKupLHXL.js → matrix-operation-contract-B8PBF1Gd.js} +134 -133
- package/dist/chunks/{metric-comparison-BKHyvnAy.js → metric-comparison-CojWeLqx.js} +1 -1
- package/dist/chunks/{palette-Cp1hqZtm.js → palette-D10o_yYX.js} +1 -1
- package/dist/chunks/pivot-header-presentation-MkcKnjn3.js +42 -0
- package/dist/chunks/{pivot-result-identity-Bs4tLtLo.js → pivot-result-identity-D6hhcRXi.js} +1 -1
- package/dist/chunks/pivot-result-lifecycle-8qCDmpKc.js +804 -0
- package/dist/chunks/raw-temporal-D61lr48Y.js +1464 -0
- package/dist/chunks/{raw-temporal-contract-mLFS-9wk.js → raw-temporal-contract-C51YG48G.js} +1 -1
- package/dist/chunks/report-preferences-dialog-CWhSbc5_.js +1808 -0
- package/dist/chunks/{report-runtime-context-CG_I0PPW.js → report-runtime-context-B984Nq1E.js} +8 -7
- package/dist/chunks/save-CfJpQQ68.js +21 -0
- package/dist/chunks/saved-dashboard-context-Dqve2jlB.js +566 -0
- package/dist/chunks/{selection-reducer-CiDEtmAq.js → selection-reducer-vKIb_jS6.js} +2 -2
- package/dist/chunks/{semaphor-ready-indicator-CHu1L-lo.js → semaphor-ready-indicator-ldcwmLoY.js} +65803 -62954
- package/dist/chunks/{shelf-drop-preview-context-i-H6DFyU.js → shelf-drop-preview-context-BWxunXTq.js} +199 -196
- package/dist/chunks/{source-entity-resolution-C-oNyYMp.js → source-entity-resolution-CVA1a85c.js} +8 -8
- package/dist/chunks/switch-CvItuC1Q.js +8199 -0
- package/dist/chunks/{temporal-bucket-DlFuhCnT.js → temporal-bucket-D8JF7zKz.js} +86 -71
- package/dist/chunks/{temporal-bucket-contract-D2OuaVZ7.js → temporal-bucket-contract-DaOajRC7.js} +1 -1
- package/dist/chunks/{token-types-DtSJOUjh.js → token-types-bxUxXDX2.js} +1 -1
- package/dist/chunks/{upload-CAIpsti1.js → upload-BFX7apKV.js} +1 -1
- package/dist/chunks/{use-create-flow-overlay-state-Bj63WwHc.js → use-create-flow-overlay-state-RHgzVfcz.js} +331 -339
- package/dist/chunks/{validators-DMSH81OM.js → validators-Ej1DdCXa.js} +1050 -1510
- package/dist/chunks/visual-choice-JiJ-_3bi.js +204 -0
- package/dist/chunks/x-4f5U2XwU.js +100 -0
- package/dist/chunks/{zoned-wall-clock-1qlWCE20.js → zoned-wall-clock-MulfA26h.js} +2 -2
- package/dist/dashboard/index.js +2 -2
- package/dist/dashboard-authoring/index.js +823 -661
- package/dist/data-app-sdk/index.js +32 -30
- package/dist/data-app-sdk-adapters/index.js +23 -22
- package/dist/data-app-sdk-validation/index.js +23 -22
- package/dist/format-utils/index.js +173 -168
- package/dist/index.js +267 -258
- package/dist/layouts/index.js +236 -24
- package/dist/report-runtime-context/index.js +2 -2
- package/dist/style.css +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/assistant-context.d.ts +2 -0
- package/dist/types/assistant-protocol.d.ts +2 -0
- package/dist/types/components/assistant/assistant-entry-points.d.ts +18 -0
- package/dist/types/components/assistant/assistant-provider.d.ts +19 -0
- package/dist/types/components/assistant/assistant-store.d.ts +52 -0
- package/dist/types/components/assistant/use-assistant.d.ts +38 -0
- package/dist/types/components/index.d.ts +5 -1
- package/dist/types/components/surfboard/filter/types.d.ts +5 -2
- package/dist/types/index.js +50 -51
- package/dist/types/lib/api/invalidate-token.d.ts +7 -0
- package/dist/types/lib/charts/cartesian-fields.d.ts +64 -0
- package/dist/types/lib/charts/types.d.ts +7 -0
- package/dist/types/lib/dashboard-inputs/dashboard-filter-mapping-storage-transition.d.ts +14 -2
- package/dist/types/lib/dashboard-inputs/dashboard-input-target-context.d.ts +5 -6
- package/dist/types/lib/dashboard-inputs/dashboard-input-values.d.ts +8 -3
- package/dist/types/lib/dashboard-inputs/resolve-dashboard-input-context.d.ts +11 -6
- package/dist/types/lib/dashboard-pagination/dashboard-card-pagination.d.ts +7 -0
- package/dist/types/lib/dashboard-viewer/compatibility-input-storage.d.ts +79 -0
- package/dist/types/lib/dashboard-viewer/viewer-state.d.ts +3 -2
- package/dist/types/lib/document/document-table-data-policy.d.ts +15 -0
- package/dist/types/lib/filter-values/filter-mode.d.ts +22 -0
- package/dist/types/lib/hooks/use-calendar-context.d.ts +5 -0
- package/dist/types/lib/hooks/use-filter-option-browse.d.ts +5 -0
- package/dist/types/lib/hooks/use-text-filter.d.ts +9 -0
- package/dist/types/lib/print/print-inputs.d.ts +4 -2
- package/dist/types/lib/query-context/build-card-query-context.d.ts +12 -4
- package/dist/types/lib/query-context/build-dashboard-execution-snapshot.d.ts +93 -0
- package/dist/types/lib/query-context/card-server-request.d.ts +72 -0
- package/dist/types/lib/query-context/compile-dashboard-card-filters.d.ts +7 -0
- package/dist/types/lib/query-context/describe-card-execution-snapshot.d.ts +56 -0
- package/dist/types/lib/query-context/document-section-card-query.d.ts +45 -0
- package/dist/types/lib/query-context/resolve-runtime-card-filters.d.ts +17 -2
- package/dist/types/lib/stores/dashboard-store.d.ts +34 -11
- package/dist/types/lib/stores/editor-store.d.ts +4 -2
- package/dist/types/lib/types/token-types.d.ts +11 -0
- package/dist/types/lib/utils/card-type-change.d.ts +30 -0
- package/dist/types/lib/utils/comparison-window-caption.d.ts +12 -0
- package/dist/types/lib/utils/filter-default-value-utils.d.ts +13 -2
- package/dist/types/shared/analytics-protocol/applied-constraints.d.ts +74 -0
- package/dist/types/shared/analytics-protocol/contracts.d.ts +3 -0
- package/dist/types/shared/analytics-protocol/filter-field-ownership.d.ts +43 -0
- package/dist/types/shared/analytics-protocol/index.d.ts +3 -0
- package/dist/types/shared/analytics-protocol/matrix-window-contract.d.ts +1 -1
- package/dist/types/shared/analytics-protocol/visual-choice.d.ts +75 -0
- package/dist/types/shared/assistant-context/index.d.ts +9 -0
- package/dist/types/shared/assistant-context/project-context.d.ts +55 -0
- package/dist/types/shared/assistant-context/saved-dashboard-context.d.ts +130 -0
- package/dist/types/shared/assistant-protocol/add-to-dashboard.d.ts +17 -0
- package/dist/types/shared/assistant-protocol/artifact.d.ts +63 -0
- package/dist/types/shared/assistant-protocol/availability.d.ts +39 -0
- package/dist/types/shared/assistant-protocol/context.d.ts +952 -0
- package/dist/types/shared/assistant-protocol/conversation.d.ts +38 -0
- package/dist/types/shared/assistant-protocol/index.d.ts +16 -0
- package/dist/types/shared/assistant-protocol/limits.d.ts +53 -0
- package/dist/types/shared/assistant-protocol/parts.d.ts +140 -0
- package/dist/types/shared/assistant-protocol/request.d.ts +77 -0
- package/dist/types/shared/assistant-protocol/sources.d.ts +27 -0
- package/dist/types/shared/assistant-protocol/token-config.d.ts +32 -0
- package/dist/types/shared/assistant-protocol/transcript.d.ts +40 -0
- package/dist/types/shared/dashboard-authoring/card-query-request.d.ts +112 -0
- package/dist/types/shared/dashboard-authoring/control-execution-contract.d.ts +1794 -0
- package/dist/types/shared/dashboard-authoring/index.d.ts +5 -0
- package/dist/types/shared/dashboard-authoring/new-card.d.ts +10 -0
- package/dist/types/shared/dashboard-authoring/operations/apply-dashboard-operations.d.ts +40 -0
- package/dist/types/shared/dashboard-authoring/resolved-primary-date-field-validation.d.ts +16 -0
- package/dist/types/shared/format-utils/filter-detail.d.ts +70 -0
- package/dist/types/shared/format-utils/filter-value-text.d.ts +15 -0
- package/dist/types/shared/format-utils/index.d.ts +3 -0
- package/dist/types/shared/format-utils/raw-temporal.d.ts +7 -0
- package/dist/types/shared/format-utils/temporal-bucket.d.ts +7 -0
- package/dist/types/shared/layouts/frame-layouts.d.ts +23 -0
- package/dist/types/shared/layouts/index.d.ts +1 -0
- package/package.json +12 -2
- package/dist/chunks/calculated-field-identity-BptYhyOP.js +0 -1326
- package/dist/chunks/calendar-day-equality-BRjN1S9h.js +0 -383
- package/dist/chunks/card-config-utils-BOM1dxCk.js +0 -1150
- package/dist/chunks/constants-DNWVy8Y3.js +0 -9
- package/dist/chunks/dashboard-json-B1dEQu98.js +0 -65
- package/dist/chunks/field-aggregations-CoLzYHeL.js +0 -1229
- package/dist/chunks/index-DTcTAGGM.js +0 -4101
- package/dist/chunks/matrix-continuation-C4sRcjZU.js +0 -72
- package/dist/chunks/matrix-control-sources-DTqcA2_L.js +0 -636
- package/dist/chunks/matrix-definition-D9iShKZI.js +0 -87
- package/dist/chunks/matrix-member-presentation-Ct8GuxHt.js +0 -209
- package/dist/chunks/numeric-presentation-CWu3gunq.js +0 -537
- package/dist/chunks/pivot-header-presentation-CHs2GFrM.js +0 -753
- package/dist/chunks/pivot-result-lifecycle-DQz_gjGu.js +0 -789
- package/dist/chunks/raw-temporal-iMXRK-Qz.js +0 -930
- package/dist/chunks/report-preferences-dialog-DXPjteCU.js +0 -1623
- package/dist/chunks/save-kO6cIaob.js +0 -34
- package/dist/chunks/semantic-format-DiqYeKwU.js +0 -192
- package/dist/chunks/switch-DO8a0EfJ.js +0 -25004
- package/dist/chunks/temporal-input-presentation-BD7YNUzu.js +0 -195
- package/dist/chunks/x-CXDkqdur.js +0 -149
- package/dist/types/lib/class-utils.d.ts +0 -2
- package/dist/types/lib/document/document-input-runtime.d.ts +0 -26
- package/dist/types/lib/utils.d.ts +0 -51
|
@@ -1,195 +0,0 @@
|
|
|
1
|
-
import { DEFAULT_RESOLVED_VALUE_FORMAT_PREFERENCES as C } from "../value-format-preferences/index.js";
|
|
2
|
-
import { h as T, r as D, g as w, v as E } from "./raw-temporal-iMXRK-Qz.js";
|
|
3
|
-
import { f as I, c as R, d as z } from "./temporal-bucket-DlFuhCnT.js";
|
|
4
|
-
import { z as U } from "./zoned-wall-clock-1qlWCE20.js";
|
|
5
|
-
const A = /* @__PURE__ */ new Set(["short", "medium", "long"]), L = /^(\d{4})-(\d{2})-(\d{2})$/, $ = /^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}(?::\d{2}(?:\.\d{1,9})?)?$/, b = /^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}(?::\d{2}(?:\.\d{1,9})?)?(?:Z|[+-]\d{2}:\d{2})$/, h = " – ";
|
|
6
|
-
function Q(t) {
|
|
7
|
-
if (!z(t)) return;
|
|
8
|
-
const e = Object.keys(t);
|
|
9
|
-
if (t.mode === "period_label" && e.length === 1)
|
|
10
|
-
return { mode: "period_label" };
|
|
11
|
-
if (t.mode === "style" && e.length === 2 && typeof t.dateStyle == "string" && A.has(t.dateStyle))
|
|
12
|
-
return { mode: "style", dateStyle: t.dateStyle };
|
|
13
|
-
if (t.mode === "pattern" && e.length === 3 && t.dialect === "semaphor_tokens" && typeof t.pattern == "string" && N(t.pattern) === null)
|
|
14
|
-
return {
|
|
15
|
-
mode: "pattern",
|
|
16
|
-
dialect: "semaphor_tokens",
|
|
17
|
-
pattern: t.pattern
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
function N(t) {
|
|
21
|
-
try {
|
|
22
|
-
return E({ dialect: "semaphor_tokens", pattern: t }), null;
|
|
23
|
-
} catch (e) {
|
|
24
|
-
return e instanceof Error ? e.message : "The pattern is invalid.";
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
function X(t) {
|
|
28
|
-
const { value: e, part: a, presentation: r, preferences: n, calendar: o } = t;
|
|
29
|
-
if ((r == null ? void 0 : r.mode) === "period_label" && e.periodLabel && a === "range")
|
|
30
|
-
return { ok: !0, text: e.periodLabel };
|
|
31
|
-
const [l, d] = e.bounds, s = d === void 0 || a === "start" ? [{ raw: l, role: "start" }] : a === "end" ? [{ raw: d, role: "end" }] : [
|
|
32
|
-
{ raw: l, role: "start" },
|
|
33
|
-
{ raw: d, role: "end" }
|
|
34
|
-
], c = s.map(({ raw: m }) => M(m, o.tz));
|
|
35
|
-
if (c.some((m) => m === null))
|
|
36
|
-
return {
|
|
37
|
-
ok: !1,
|
|
38
|
-
text: s.map(({ raw: m }) => m).join(h),
|
|
39
|
-
diagnostic: {
|
|
40
|
-
code: "invalid_temporal_input_value",
|
|
41
|
-
message: "A date input bound is not a date or an instant."
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
const f = e.precision === "day" ? c.map(
|
|
45
|
-
(m, _) => j(m, s[_].role, o.tz)
|
|
46
|
-
) : [], g = f.length > 0 && f.every((m) => m !== null) ? f : null;
|
|
47
|
-
return { ok: !0, text: g ? P(g, r, n, o) : F(
|
|
48
|
-
c.map((m) => V(m, o.tz)),
|
|
49
|
-
r,
|
|
50
|
-
n,
|
|
51
|
-
o
|
|
52
|
-
) };
|
|
53
|
-
}
|
|
54
|
-
function P(t, e, a, r) {
|
|
55
|
-
const [n, o = n] = t;
|
|
56
|
-
if ((e == null ? void 0 : e.mode) === "pattern")
|
|
57
|
-
return p(
|
|
58
|
-
t.map(
|
|
59
|
-
(i) => k(y(i), "date", e.pattern, a, r)
|
|
60
|
-
)
|
|
61
|
-
);
|
|
62
|
-
const l = (e == null ? void 0 : e.mode) === "style" ? e.dateStyle : a.dateStyle;
|
|
63
|
-
if (!e || e.mode === "period_label") {
|
|
64
|
-
const i = Z(n, o, r);
|
|
65
|
-
if (i)
|
|
66
|
-
return I({
|
|
67
|
-
value: y(n),
|
|
68
|
-
metadata: {
|
|
69
|
-
kind: "temporal_bucket",
|
|
70
|
-
granularity: i,
|
|
71
|
-
calendar: { tz: r.tz, weekStart: r.weekStart ?? 1 }
|
|
72
|
-
},
|
|
73
|
-
format: R({
|
|
74
|
-
metadata: {
|
|
75
|
-
kind: "temporal_bucket",
|
|
76
|
-
granularity: i,
|
|
77
|
-
calendar: { tz: r.tz, weekStart: r.weekStart ?? 1 }
|
|
78
|
-
},
|
|
79
|
-
locale: a.locale,
|
|
80
|
-
styles: { dateStyle: l, dateTime: { ...a.dateTime } }
|
|
81
|
-
}).format
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
const d = new Intl.DateTimeFormat(a.locale, {
|
|
85
|
-
calendar: "gregory",
|
|
86
|
-
timeZone: "UTC",
|
|
87
|
-
dateStyle: l
|
|
88
|
-
});
|
|
89
|
-
return B(n, o) ? d.format(u(n)) : S(d, u(n), u(o));
|
|
90
|
-
}
|
|
91
|
-
function F(t, e, a, r) {
|
|
92
|
-
if ((e == null ? void 0 : e.mode) === "pattern")
|
|
93
|
-
return p(
|
|
94
|
-
t.map(
|
|
95
|
-
(d) => k(
|
|
96
|
-
d.toISOString(),
|
|
97
|
-
"instant",
|
|
98
|
-
e.pattern,
|
|
99
|
-
a,
|
|
100
|
-
r
|
|
101
|
-
)
|
|
102
|
-
)
|
|
103
|
-
);
|
|
104
|
-
const n = new Intl.DateTimeFormat(a.locale, {
|
|
105
|
-
calendar: "gregory",
|
|
106
|
-
timeZone: r.tz,
|
|
107
|
-
dateStyle: (e == null ? void 0 : e.mode) === "style" ? e.dateStyle : a.dateTime.dateStyle,
|
|
108
|
-
timeStyle: a.dateTime.timeStyle
|
|
109
|
-
}), [o, l] = t;
|
|
110
|
-
return l && l.getTime() !== o.getTime() ? S(n, o, l) : n.format(o);
|
|
111
|
-
}
|
|
112
|
-
function S(t, e, a) {
|
|
113
|
-
const r = t;
|
|
114
|
-
return typeof r.formatRange == "function" ? r.formatRange(e, a) : `${t.format(e)}${h}${t.format(a)}`;
|
|
115
|
-
}
|
|
116
|
-
function k(t, e, a, r, n) {
|
|
117
|
-
const o = D({
|
|
118
|
-
format: {
|
|
119
|
-
type: "raw_temporal",
|
|
120
|
-
presentation: { mode: "pattern", dialect: "semaphor_tokens", pattern: a }
|
|
121
|
-
},
|
|
122
|
-
// Temporal formatting reads no currency.
|
|
123
|
-
preferences: {
|
|
124
|
-
...r,
|
|
125
|
-
defaultCurrency: C.defaultCurrency
|
|
126
|
-
},
|
|
127
|
-
calendar: { tz: n.tz }
|
|
128
|
-
}), l = e === "date" && O(a) ? "instant" : e;
|
|
129
|
-
return w({
|
|
130
|
-
value: l === e ? t : T(`${t}T00:00:00`, n.tz).toISOString(),
|
|
131
|
-
metadata: { kind: "raw_temporal", valueKind: l },
|
|
132
|
-
format: o
|
|
133
|
-
}).text;
|
|
134
|
-
}
|
|
135
|
-
function O(t) {
|
|
136
|
-
return /HH|mm|ss/.test(t);
|
|
137
|
-
}
|
|
138
|
-
function p(t) {
|
|
139
|
-
return t[1] === void 0 || t[0] === t[1] ? t[0] : t.join(h);
|
|
140
|
-
}
|
|
141
|
-
function M(t, e) {
|
|
142
|
-
const a = L.exec(t);
|
|
143
|
-
if (a) {
|
|
144
|
-
const n = {
|
|
145
|
-
year: Number(a[1]),
|
|
146
|
-
month: Number(a[2]),
|
|
147
|
-
day: Number(a[3])
|
|
148
|
-
};
|
|
149
|
-
return H(n) ? { kind: "date", date: n } : null;
|
|
150
|
-
}
|
|
151
|
-
const r = b.test(t) ? new Date(t.replace(" ", "T")) : $.test(t) ? T(t.replace(" ", "T"), e) : null;
|
|
152
|
-
return r && !Number.isNaN(r.getTime()) ? { kind: "instant", instant: r } : null;
|
|
153
|
-
}
|
|
154
|
-
function V(t, e) {
|
|
155
|
-
return t.kind === "instant" ? t.instant : T(`${y(t.date)}T00:00:00`, e);
|
|
156
|
-
}
|
|
157
|
-
function j(t, e, a) {
|
|
158
|
-
if (t.kind === "date") return t.date;
|
|
159
|
-
const r = U(t.instant, a), n = { year: r.year, month: r.month, day: r.day };
|
|
160
|
-
if (r.hour === 0 && r.minute === 0 && r.second === 0 && t.instant.getUTCMilliseconds() === 0) return e === "start" ? n : x(n, -1);
|
|
161
|
-
const l = r.hour === 23 && r.minute === 59 && r.second === 59;
|
|
162
|
-
return e === "end" && l ? n : null;
|
|
163
|
-
}
|
|
164
|
-
function Z(t, e, a) {
|
|
165
|
-
return a.fiscalCalendar || t.day !== 1 || t.year !== e.year || e.day !== v(e.year, e.month) ? null : t.month === e.month ? "month" : t.month % 3 === 1 && e.month === t.month + 2 ? "quarter" : t.month === 1 && e.month === 12 ? "year" : null;
|
|
166
|
-
}
|
|
167
|
-
function y(t) {
|
|
168
|
-
return `${String(t.year).padStart(4, "0")}-${String(t.month).padStart(2, "0")}-${String(t.day).padStart(2, "0")}`;
|
|
169
|
-
}
|
|
170
|
-
function u(t) {
|
|
171
|
-
const e = /* @__PURE__ */ new Date(0);
|
|
172
|
-
return e.setUTCFullYear(t.year, t.month - 1, t.day), e.setUTCHours(0, 0, 0, 0), e;
|
|
173
|
-
}
|
|
174
|
-
function x(t, e) {
|
|
175
|
-
const a = u(t);
|
|
176
|
-
return a.setUTCDate(a.getUTCDate() + e), {
|
|
177
|
-
year: a.getUTCFullYear(),
|
|
178
|
-
month: a.getUTCMonth() + 1,
|
|
179
|
-
day: a.getUTCDate()
|
|
180
|
-
};
|
|
181
|
-
}
|
|
182
|
-
function B(t, e) {
|
|
183
|
-
return t.year === e.year && t.month === e.month && t.day === e.day;
|
|
184
|
-
}
|
|
185
|
-
function v(t, e) {
|
|
186
|
-
return new Date(Date.UTC(t, e, 0)).getUTCDate();
|
|
187
|
-
}
|
|
188
|
-
function H(t) {
|
|
189
|
-
return t.year >= 1 && t.month >= 1 && t.month <= 12 && t.day >= 1 && t.day <= v(t.year, t.month);
|
|
190
|
-
}
|
|
191
|
-
export {
|
|
192
|
-
X as f,
|
|
193
|
-
Q as p,
|
|
194
|
-
N as v
|
|
195
|
-
};
|
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
import { forwardRef as i, createElement as c } from "react";
|
|
2
|
-
class s extends Error {
|
|
3
|
-
}
|
|
4
|
-
s.prototype.name = "InvalidTokenError";
|
|
5
|
-
function g(t) {
|
|
6
|
-
return decodeURIComponent(atob(t).replace(/(.)/g, (e, r) => {
|
|
7
|
-
let o = r.charCodeAt(0).toString(16).toUpperCase();
|
|
8
|
-
return o.length < 2 && (o = "0" + o), "%" + o;
|
|
9
|
-
}));
|
|
10
|
-
}
|
|
11
|
-
function m(t) {
|
|
12
|
-
let e = t.replace(/-/g, "+").replace(/_/g, "/");
|
|
13
|
-
switch (e.length % 4) {
|
|
14
|
-
case 0:
|
|
15
|
-
break;
|
|
16
|
-
case 2:
|
|
17
|
-
e += "==";
|
|
18
|
-
break;
|
|
19
|
-
case 3:
|
|
20
|
-
e += "=";
|
|
21
|
-
break;
|
|
22
|
-
default:
|
|
23
|
-
throw new Error("base64 string is not of the correct length");
|
|
24
|
-
}
|
|
25
|
-
try {
|
|
26
|
-
return g(e);
|
|
27
|
-
} catch {
|
|
28
|
-
return atob(e);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
function C(t, e) {
|
|
32
|
-
if (typeof t != "string")
|
|
33
|
-
throw new s("Invalid token specified: must be a string");
|
|
34
|
-
e || (e = {});
|
|
35
|
-
const r = e.header === !0 ? 0 : 1, o = t.split(".")[r];
|
|
36
|
-
if (typeof o != "string")
|
|
37
|
-
throw new s(`Invalid token specified: missing part #${r + 1}`);
|
|
38
|
-
let a;
|
|
39
|
-
try {
|
|
40
|
-
a = m(o);
|
|
41
|
-
} catch (n) {
|
|
42
|
-
throw new s(`Invalid token specified: invalid base64 for part #${r + 1} (${n.message})`);
|
|
43
|
-
}
|
|
44
|
-
try {
|
|
45
|
-
return JSON.parse(a);
|
|
46
|
-
} catch (n) {
|
|
47
|
-
throw new s(`Invalid token specified: invalid json for part #${r + 1} (${n.message})`);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* @license lucide-react v0.453.0 - ISC
|
|
52
|
-
*
|
|
53
|
-
* This source code is licensed under the ISC license.
|
|
54
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
55
|
-
*/
|
|
56
|
-
const b = (t) => t.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), d = (...t) => t.filter((e, r, o) => !!e && o.indexOf(e) === r).join(" ");
|
|
57
|
-
/**
|
|
58
|
-
* @license lucide-react v0.453.0 - ISC
|
|
59
|
-
*
|
|
60
|
-
* This source code is licensed under the ISC license.
|
|
61
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
62
|
-
*/
|
|
63
|
-
var k = {
|
|
64
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
65
|
-
width: 24,
|
|
66
|
-
height: 24,
|
|
67
|
-
viewBox: "0 0 24 24",
|
|
68
|
-
fill: "none",
|
|
69
|
-
stroke: "currentColor",
|
|
70
|
-
strokeWidth: 2,
|
|
71
|
-
strokeLinecap: "round",
|
|
72
|
-
strokeLinejoin: "round"
|
|
73
|
-
};
|
|
74
|
-
/**
|
|
75
|
-
* @license lucide-react v0.453.0 - ISC
|
|
76
|
-
*
|
|
77
|
-
* This source code is licensed under the ISC license.
|
|
78
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
79
|
-
*/
|
|
80
|
-
const v = i(
|
|
81
|
-
({
|
|
82
|
-
color: t = "currentColor",
|
|
83
|
-
size: e = 24,
|
|
84
|
-
strokeWidth: r = 2,
|
|
85
|
-
absoluteStrokeWidth: o,
|
|
86
|
-
className: a = "",
|
|
87
|
-
children: n,
|
|
88
|
-
iconNode: p,
|
|
89
|
-
...u
|
|
90
|
-
}, h) => c(
|
|
91
|
-
"svg",
|
|
92
|
-
{
|
|
93
|
-
ref: h,
|
|
94
|
-
...k,
|
|
95
|
-
width: e,
|
|
96
|
-
height: e,
|
|
97
|
-
stroke: t,
|
|
98
|
-
strokeWidth: o ? Number(r) * 24 / Number(e) : r,
|
|
99
|
-
className: d("lucide", a),
|
|
100
|
-
...u
|
|
101
|
-
},
|
|
102
|
-
[
|
|
103
|
-
...p.map(([f, w]) => c(f, w)),
|
|
104
|
-
...Array.isArray(n) ? n : [n]
|
|
105
|
-
]
|
|
106
|
-
)
|
|
107
|
-
);
|
|
108
|
-
/**
|
|
109
|
-
* @license lucide-react v0.453.0 - ISC
|
|
110
|
-
*
|
|
111
|
-
* This source code is licensed under the ISC license.
|
|
112
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
113
|
-
*/
|
|
114
|
-
const l = (t, e) => {
|
|
115
|
-
const r = i(
|
|
116
|
-
({ className: o, ...a }, n) => c(v, {
|
|
117
|
-
ref: n,
|
|
118
|
-
iconNode: e,
|
|
119
|
-
className: d(`lucide-${b(t)}`, o),
|
|
120
|
-
...a
|
|
121
|
-
})
|
|
122
|
-
);
|
|
123
|
-
return r.displayName = `${t}`, r;
|
|
124
|
-
};
|
|
125
|
-
/**
|
|
126
|
-
* @license lucide-react v0.453.0 - ISC
|
|
127
|
-
*
|
|
128
|
-
* This source code is licensed under the ISC license.
|
|
129
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
130
|
-
*/
|
|
131
|
-
const I = l("ChevronDown", [
|
|
132
|
-
["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]
|
|
133
|
-
]);
|
|
134
|
-
/**
|
|
135
|
-
* @license lucide-react v0.453.0 - ISC
|
|
136
|
-
*
|
|
137
|
-
* This source code is licensed under the ISC license.
|
|
138
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
139
|
-
*/
|
|
140
|
-
const $ = l("X", [
|
|
141
|
-
["path", { d: "M18 6 6 18", key: "1bl5f8" }],
|
|
142
|
-
["path", { d: "m6 6 12 12", key: "d8bk6v" }]
|
|
143
|
-
]);
|
|
144
|
-
export {
|
|
145
|
-
I as C,
|
|
146
|
-
$ as X,
|
|
147
|
-
l as c,
|
|
148
|
-
C as j
|
|
149
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { TFilterValue } from '../../components/surfboard/filter/types.js';
|
|
2
|
-
import { DefaultsCalendar } from '../utils/filter-default-value-utils.js';
|
|
3
|
-
import { DocumentControlInputDefinition, DocumentFilterInputDefinition, DocumentInputDefinition } from '../types/common-types.js';
|
|
4
|
-
export type DocumentFilterMode = 'include' | 'exclude';
|
|
5
|
-
export declare function isFilterDocumentInput(input: DocumentInputDefinition): input is DocumentFilterInputDefinition;
|
|
6
|
-
export declare function isControlDocumentInput(input: DocumentInputDefinition): input is DocumentControlInputDefinition;
|
|
7
|
-
export declare function buildDefaultDocumentInputFilterValuesById(inputs: DocumentInputDefinition[], calendar?: DefaultsCalendar): Record<string, TFilterValue | undefined>;
|
|
8
|
-
export declare function buildDefaultDocumentInputControlValuesById(inputs: DocumentInputDefinition[]): Record<string, unknown>;
|
|
9
|
-
export declare function getDocumentInputSignature(inputs: DocumentInputDefinition[]): string;
|
|
10
|
-
export declare function getDocumentInputDefinitionSignaturesById(inputs: DocumentInputDefinition[]): Record<string, string>;
|
|
11
|
-
export declare function reconcileDocumentInputFilterValues(currentValues: Record<string, TFilterValue | undefined>, inputs: DocumentInputDefinition[], defaultsByInputId: Record<string, TFilterValue | undefined>, currentDefinitionSignaturesById: Record<string, string>, previousDefinitionSignaturesById: Record<string, string>): Record<string, TFilterValue | undefined>;
|
|
12
|
-
export declare function reconcileDocumentInputControlValues(currentValues: Record<string, unknown>, inputs: DocumentInputDefinition[], defaultsByInputId: Record<string, unknown>, currentDefinitionSignaturesById: Record<string, string>, previousDefinitionSignaturesById: Record<string, string>): Record<string, unknown>;
|
|
13
|
-
export declare function normalizeDocumentInputFilterValue(input: DocumentFilterInputDefinition, filterValue: TFilterValue | undefined): TFilterValue | undefined;
|
|
14
|
-
/**
|
|
15
|
-
* Materializes valid document-local values without changing the export shape.
|
|
16
|
-
* Unknown or currently invalid entries retain their existing behavior while
|
|
17
|
-
* known values cross the same normalization seam used by query execution.
|
|
18
|
-
*/
|
|
19
|
-
export declare function materializeDocumentInputFilterValuesById(valuesByInputId: Record<string, TFilterValue | undefined>, inputs: DocumentInputDefinition[]): Record<string, TFilterValue | undefined>;
|
|
20
|
-
export declare function reconcileDocumentInputFilterModes(currentModes: Record<string, DocumentFilterMode>, inputs: DocumentInputDefinition[]): Record<string, DocumentFilterMode>;
|
|
21
|
-
export declare function isInclusionFilterOperation(operation: TFilterValue['operation']): operation is 'in' | 'not in';
|
|
22
|
-
export declare function getFilterModeFromOperation(operation: TFilterValue['operation']): DocumentFilterMode;
|
|
23
|
-
export declare function getFilterOperationFromMode(filterMode: DocumentFilterMode): 'in' | 'not in';
|
|
24
|
-
export declare function getDocumentFilterValues(valuesByInputId: Record<string, TFilterValue | undefined>, inputs: DocumentInputDefinition[], currentDefinitionSignaturesById: Record<string, string>, previousDefinitionSignaturesById: Record<string, string>): TFilterValue[];
|
|
25
|
-
export declare function getDocumentControlValues(valuesByInputId: Record<string, unknown>, inputs: DocumentInputDefinition[], currentDefinitionSignaturesById: Record<string, string>, previousDefinitionSignaturesById: Record<string, string>): Record<string, unknown>;
|
|
26
|
-
export declare function getMissingRequiredInputLabels(inputs: DocumentInputDefinition[], valuesByInputId: Record<string, TFilterValue | undefined>, controlValuesByInputId: Record<string, unknown>, currentDefinitionSignaturesById: Record<string, string>, previousDefinitionSignaturesById: Record<string, string>): string[];
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { GetPluginsResponse, TBaseQuery } from './types/common-types.js';
|
|
2
|
-
import { RefObject } from 'react';
|
|
3
|
-
export { cn } from './class-utils.js';
|
|
4
|
-
export declare const isObjectEmpty: (obj: object) => boolean;
|
|
5
|
-
export type RequestError = Error & {
|
|
6
|
-
status?: number;
|
|
7
|
-
payload?: unknown;
|
|
8
|
-
error?: string;
|
|
9
|
-
detail?: string;
|
|
10
|
-
details?: unknown;
|
|
11
|
-
sql?: string;
|
|
12
|
-
usesFallbackMessage?: boolean;
|
|
13
|
-
[key: string]: unknown;
|
|
14
|
-
};
|
|
15
|
-
export type RequestErrorMessageOptions = {
|
|
16
|
-
preserveSyntheticMessage?: boolean;
|
|
17
|
-
};
|
|
18
|
-
export declare function toRequestError(payload: unknown, status: number, fallbackMessage: string): RequestError;
|
|
19
|
-
export declare function getRequestErrorMessage(error: unknown, fallbackMessage?: string, options?: RequestErrorMessageOptions): string;
|
|
20
|
-
export declare function formatRequestErrorSummary(summary: string, error: unknown, options?: RequestErrorMessageOptions): string;
|
|
21
|
-
export declare function getRequestErrorStatus(error: unknown): number | undefined;
|
|
22
|
-
export declare function getRequestErrorViolations<T = unknown>(error: unknown): T[] | undefined;
|
|
23
|
-
export declare function getRequestErrorSql(error: unknown): string | undefined;
|
|
24
|
-
export declare function getRequestErrorFromResponse(response: Response): Promise<RequestError>;
|
|
25
|
-
export declare function requestJsonRegular(url: string, authToken: string, method?: string, data?: unknown, signal?: AbortSignal): Promise<any>;
|
|
26
|
-
export declare function getRequest(url: string, authToken: string, params?: {}, signal?: AbortSignal): Promise<any>;
|
|
27
|
-
export declare function postRequestRegular(url: string, authToken: string, data?: {}, method?: string): Promise<any>;
|
|
28
|
-
export declare function getTenantAndEndUserId(accessToken: string | undefined): {
|
|
29
|
-
tenantId: string;
|
|
30
|
-
endUserId: string;
|
|
31
|
-
};
|
|
32
|
-
export declare function getTokenParams(accessToken: string | undefined): import('./types/index.js').TokenParams | undefined;
|
|
33
|
-
export declare function copyToClipboard<T extends RefObject<HTMLElement | null>>(contentRef: T): void;
|
|
34
|
-
export declare function resolveBaseQuery(sqlQuery: string | undefined, baseQueries: TBaseQuery[] | undefined): string;
|
|
35
|
-
export declare function titleCase(string: string): string;
|
|
36
|
-
export declare function toTitleCase(str: string): string;
|
|
37
|
-
export declare function toLabel(str: string): string;
|
|
38
|
-
export declare const simpleRing = "focus:ring-1 focus:ring-offset-0 focus-visible:ring-1 focus-visible:ring-offset-0";
|
|
39
|
-
export declare const removeRing = "focus-visible:ring-0 focus-visible:ring-ring focus-visible:ring-offset-0 focus:ring-0 focus:ring-ring focus:ring-offset-0";
|
|
40
|
-
export declare function customStringify(obj: object): string;
|
|
41
|
-
export declare function customParse(jsonString: string): any;
|
|
42
|
-
export declare function invalidateToken(apiServiceUrl: string): Promise<any>;
|
|
43
|
-
export declare function getDashboard(apiServiceUrl: string, accessToken: string | undefined, params?: {}): Promise<{
|
|
44
|
-
initialReportContext: import('../shared/report-runtime-context/index.js').ReportRuntimeContext;
|
|
45
|
-
dashboard: import('./types/common-types.js').TDashboard;
|
|
46
|
-
semanticExecutionPayload: import('./types/semantic-runtime-types.js').SemanticExecutionPayload;
|
|
47
|
-
organizationAppearance?: import('./types/index.js').AppearanceSpec | null;
|
|
48
|
-
viewer?: import('./types/index.js').DashboardViewerPayload;
|
|
49
|
-
} | null>;
|
|
50
|
-
export declare function getPlugins(apiServiceUrl: string, accessToken: string | undefined): Promise<GetPluginsResponse | null>;
|
|
51
|
-
export declare const getDataType: (dbType: unknown) => "string" | "number" | "boolean" | "date" | "json" | "geo";
|