react-semaphor 0.1.541 → 0.1.543
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 +75 -75
- package/dist/assistant-context/index.js +1 -1
- package/dist/brand-studio/index.js +3 -3
- package/dist/briefings/index.js +51 -49
- package/dist/chunks/apply-dashboard-operations-CG9S7MGt.js +2260 -0
- package/dist/chunks/{assistant-chat-D1fDZD6O.js → assistant-chat-BFMRUYoB.js} +12 -12
- package/dist/chunks/bookmark-state-CXw7lZ50.js +118 -0
- package/dist/chunks/{calendar-day-equality-Bpl15IBo.js → calendar-day-equality-BmJAWduY.js} +180 -207
- package/dist/chunks/comparison-window-caption-Bv18samq.js +1618 -0
- package/dist/chunks/custom-visual-inputs-DUtpYZOk.js +323 -0
- package/dist/chunks/{dashboard-B6IrON_Q.js → dashboard-B9mKTJoy.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-DwjFpewq.js → dashboard-briefing-launcher-Bdmry_oG.js} +18 -18
- package/dist/chunks/{dashboard-controls-C_BI28ME.js → dashboard-controls-UGpjOM2k.js} +69 -70
- package/dist/chunks/{dashboard-filter-value-compatibility-D95O4nd7.js → dashboard-filter-value-compatibility-CwQ_iSNb.js} +2 -2
- package/dist/chunks/{dashboard-json-DDY15Trn.js → dashboard-json-DG8dz0eX.js} +4 -4
- package/dist/chunks/{document-dashboard-inputs-DP_Op5mu.js → document-dashboard-inputs-OwqCbrVp.js} +2382 -4975
- package/dist/chunks/document-sheet-utils-BTb3VZxV.js +3619 -0
- package/dist/chunks/{edit-dashboard-visual-CH2dzWW-.js → edit-dashboard-visual-CDpA4y5e.js} +728 -728
- package/dist/chunks/{filter-value-text-BhWugPWE.js → filter-value-text-CYsVYPuD.js} +18 -19
- package/dist/chunks/{index-DaQlghLY.js → index-l5LclZvs.js} +824 -1351
- package/dist/chunks/{matrix-analytical-definition-bcprSe4u.js → matrix-analytical-definition-C7Gb0e12.js} +1 -1
- package/dist/chunks/{matrix-card-CJn1hB5V.js → matrix-card-DjwWcCo8.js} +2 -2
- package/dist/chunks/{matrix-formatter-DQ8avoIQ.js → matrix-formatter-BnsTX90d.js} +430 -417
- package/dist/chunks/{matrix-member-presentation-BNPSDKBG.js → matrix-member-presentation-CQGdVks6.js} +1 -1
- package/dist/chunks/{matrix-operation-contract-B8PBF1Gd.js → matrix-operation-contract-8OIO4gob.js} +65 -65
- package/dist/chunks/metric-comparison-DEwi9uc2.js +498 -0
- package/dist/chunks/numeric-presentation-F_-H6VAw.js +5227 -0
- package/dist/chunks/{pivot-header-presentation-MkcKnjn3.js → pivot-header-presentation-DHcx1XGQ.js} +1 -1
- package/dist/chunks/{pivot-result-identity-D6hhcRXi.js → pivot-result-identity-DJhXXcns.js} +1 -1
- package/dist/chunks/pivot-result-lifecycle-DupbRk-R.js +1155 -0
- package/dist/chunks/raw-temporal-presentation-D-azM_98.js +585 -0
- package/dist/chunks/{report-preferences-dialog-DpNkFfQO.js → report-preferences-dialog-CPwRwEJx.js} +75 -75
- package/dist/chunks/{report-runtime-context-B984Nq1E.js → report-runtime-context-Dq8XyODK.js} +1 -1
- package/dist/chunks/{saved-dashboard-context-CJ2WpoMF.js → saved-dashboard-context-BKvMfRfC.js} +233 -206
- package/dist/chunks/{selection-reducer-vKIb_jS6.js → selection-reducer-Dj_8xD69.js} +1 -1
- package/dist/chunks/{semaphor-ready-indicator-KT598QJq.js → semaphor-ready-indicator-CN2AHm2x.js} +37489 -39476
- package/dist/chunks/{shelf-drop-preview-context-BxV3Fl8h.js → shelf-drop-preview-context-BGl_rxcW.js} +6 -6
- package/dist/chunks/sort-target-MT1WK1vX.js +29 -0
- package/dist/chunks/{source-entity-resolution-CVA1a85c.js → source-entity-resolution-BYn9giz3.js} +1 -1
- package/dist/chunks/{switch-DWEWiv1J.js → switch-C3jLxlG0.js} +2 -2
- package/dist/chunks/table-export-sheet-BDRXLLdq.js +949 -0
- package/dist/chunks/table-settings-CLZocegs.js +501 -0
- package/dist/chunks/temporal-bucket-D7NBrrtL.js +2071 -0
- package/dist/chunks/{token-types-bxUxXDX2.js → token-types-DBbZVQsm.js} +1 -1
- package/dist/chunks/{use-create-flow-overlay-state-DdD12SMY.js → use-create-flow-overlay-state-BnclfB2k.js} +151 -151
- package/dist/chunks/{validators-Ej1DdCXa.js → validators-DMHTpf7a.js} +73 -73
- package/dist/dashboard/index.js +2 -2
- package/dist/dashboard-authoring/index.js +462 -457
- package/dist/data-app-sdk/index.js +5 -5
- package/dist/data-app-sdk-adapters/index.js +2 -2
- package/dist/data-app-sdk-validation/index.js +9 -9
- package/dist/format-utils/index.js +346 -241
- package/dist/index.js +174 -175
- package/dist/report-runtime-context/index.js +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/briefings/attachment-outcomes.d.ts +1 -1
- package/dist/types/briefings/attachments.d.ts +17 -1
- package/dist/types/briefings/index.d.ts +5 -3
- package/dist/types/index.js +48 -48
- package/dist/types/lib/api/exports-api.d.ts +11 -65
- package/dist/types/lib/dashboard-inputs/control-contract-overrides.d.ts +17 -0
- package/dist/types/lib/dashboard-viewer/export-table-view.d.ts +2 -0
- package/dist/types/lib/hooks/use-dashboard.d.ts +3 -6
- package/dist/types/lib/matrix-table/matrix-delivery-policy.d.ts +8 -2
- package/dist/types/lib/matrix-table/matrix-delivery.d.ts +8 -6
- package/dist/types/lib/query-context/build-dashboard-card-query-contract.d.ts +50 -0
- package/dist/types/lib/types/explorer-types.d.ts +6 -0
- package/dist/types/shared/analytics-protocol/matrix-definition-contract.d.ts +3 -3
- package/dist/types/shared/assistant-context/index.d.ts +1 -1
- package/dist/types/shared/assistant-context/saved-dashboard-context.d.ts +23 -6
- package/dist/types/shared/dashboard-authoring/card-export-request.d.ts +173 -0
- package/dist/types/shared/dashboard-authoring/index.d.ts +1 -0
- package/dist/types/shared/dashboard-authoring/matrix-delivery.d.ts +4 -3
- package/dist/types/shared/format-utils/exporters/export-cells.d.ts +90 -0
- package/dist/types/shared/format-utils/exporters/export-file-format.d.ts +44 -0
- package/dist/types/shared/format-utils/exporters/index.d.ts +6 -0
- package/dist/types/shared/format-utils/exporters/xlsx-file.d.ts +90 -0
- package/dist/types/shared/format-utils/formatters/date-formatter.d.ts +8 -12
- package/dist/types/shared/format-utils/formatters/index.d.ts +1 -1
- package/dist/types/shared/format-utils/formatters/matrix-formatter.d.ts +2 -0
- package/dist/types/shared/format-utils/index.d.ts +2 -0
- package/dist/types/shared/format-utils/matrix-continuation.d.ts +55 -9
- package/dist/types/shared/format-utils/matrix-export-presentation.d.ts +21 -1
- package/dist/types/shared/format-utils/matrix-export-xlsx.d.ts +27 -0
- package/dist/types/shared/format-utils/presentation-execution.d.ts +27 -2
- package/dist/types/shared/format-utils/raw-temporal.d.ts +8 -0
- package/dist/types/shared/format-utils/table-export/index.d.ts +8 -0
- package/dist/types/shared/format-utils/table-export/prepare-table-export.d.ts +50 -0
- package/dist/types/shared/format-utils/table-export/table-export-formatting.d.ts +47 -0
- package/dist/types/shared/format-utils/table-export/table-export-raw-temporal.d.ts +40 -0
- package/dist/types/shared/format-utils/table-export/table-export-result.d.ts +31 -0
- package/dist/types/shared/format-utils/table-export/table-export-sheet.d.ts +38 -0
- package/dist/types/shared/format-utils/temporal-bucket.d.ts +9 -0
- package/package.json +2 -1
- package/dist/chunks/aggregate-table-row-presentation-B_vQjYR3.js +0 -996
- package/dist/chunks/apply-dashboard-operations-C-iahGka.js +0 -402
- package/dist/chunks/bookmark-state-k7y5SNGf.js +0 -331
- package/dist/chunks/calculated-field-identity-DcBS2NPP.js +0 -2161
- package/dist/chunks/canonical-result-keys-CEQefvdO.js +0 -33
- package/dist/chunks/common-types-CUf03Htv.js +0 -288
- package/dist/chunks/csv-utils-GUfKyT1J.js +0 -56
- package/dist/chunks/custom-visual-inputs-BrUOIwln.js +0 -3288
- package/dist/chunks/document-sheet-utils-C1eEldxs.js +0 -1076
- package/dist/chunks/matrix-definition-DQDI2okF.js +0 -206
- package/dist/chunks/metric-comparison-CojWeLqx.js +0 -392
- package/dist/chunks/pivot-result-lifecycle-8qCDmpKc.js +0 -804
- package/dist/chunks/raw-temporal-D61lr48Y.js +0 -1464
- package/dist/chunks/temporal-bucket-D8JF7zKz.js +0 -575
- package/dist/chunks/temporal-bucket-contract-DaOajRC7.js +0 -108
|
@@ -1,53 +1,28 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
7
|
-
function rt(t, e) {
|
|
8
|
-
if (e.id) {
|
|
9
|
-
const n = [];
|
|
10
|
-
t.forEach(
|
|
11
|
-
({ fields: s }, o) => s.forEach((r, a) => {
|
|
12
|
-
r.id === e.id && n.push({ group: o, index: a });
|
|
13
|
-
})
|
|
14
|
-
);
|
|
15
|
-
const i = e.alias ? n.find(
|
|
16
|
-
({ group: s, index: o }) => P(t[s].fields[o], t[s].role) === e.alias
|
|
17
|
-
) : void 0;
|
|
18
|
-
if (i) return i;
|
|
19
|
-
if (n.length === 1) return n[0];
|
|
20
|
-
}
|
|
21
|
-
for (let n = 0; n < t.length; n += 1) {
|
|
22
|
-
const i = t[n].fields.findIndex(
|
|
23
|
-
(s) => s.name === e.name && s.entityName === e.entityName && (s.alias === e.alias || !e.alias)
|
|
24
|
-
);
|
|
25
|
-
if (i !== -1) return { group: n, index: i };
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
function x(t, e) {
|
|
29
|
-
const n = t.split(".").map((a) => a.trim()), i = e.split(".").map((a) => a.trim());
|
|
30
|
-
if (n.length === 0 || i.length === 0 || n.some((a) => !a) || i.some((a) => !a))
|
|
1
|
+
import { l as M } from "./validators-DMHTpf7a.js";
|
|
2
|
+
import { b as W, w as y, z as F } from "./zoned-wall-clock-MulfA26h.js";
|
|
3
|
+
function U(t, e) {
|
|
4
|
+
const n = t.split(".").map((a) => a.trim()), o = e.split(".").map((a) => a.trim());
|
|
5
|
+
if (n.length === 0 || o.length === 0 || n.some((a) => !a) || o.some((a) => !a))
|
|
31
6
|
return !1;
|
|
32
|
-
const [s,
|
|
33
|
-
return s.every((a, u) => a ===
|
|
7
|
+
const [s, i] = n.length <= o.length ? [n, o] : [o, n], r = i.length - s.length;
|
|
8
|
+
return s.every((a, u) => a === i[u + r]);
|
|
34
9
|
}
|
|
35
|
-
function
|
|
36
|
-
const n = t.split("."),
|
|
37
|
-
return !!(s && s ===
|
|
10
|
+
function j(t, e) {
|
|
11
|
+
const n = t.split("."), o = e.split("."), s = n.pop(), i = o.pop();
|
|
12
|
+
return !!(s && s === i && n.length > 0 && o.length > 0 && U(
|
|
38
13
|
n.join("."),
|
|
39
|
-
|
|
14
|
+
o.join(".")
|
|
40
15
|
));
|
|
41
16
|
}
|
|
42
|
-
function
|
|
43
|
-
const e = t.map((
|
|
17
|
+
function P(t) {
|
|
18
|
+
const e = t.map((o) => o.trim()).filter(Boolean);
|
|
44
19
|
if (e.every(
|
|
45
|
-
(
|
|
46
|
-
(
|
|
20
|
+
(o, s) => e.slice(s + 1).every(
|
|
21
|
+
(i) => U(o, i)
|
|
47
22
|
)
|
|
48
23
|
))
|
|
49
24
|
return [...e].sort(
|
|
50
|
-
(
|
|
25
|
+
(o, s) => s.split(".").length - o.split(".").length
|
|
51
26
|
)[0];
|
|
52
27
|
}
|
|
53
28
|
function m(t) {
|
|
@@ -66,24 +41,24 @@ function N(t) {
|
|
|
66
41
|
function d(t) {
|
|
67
42
|
return typeof t == "string" ? t.trim() : "";
|
|
68
43
|
}
|
|
69
|
-
function
|
|
44
|
+
function R(t, e) {
|
|
70
45
|
return t.every(
|
|
71
|
-
(n,
|
|
46
|
+
(n, o) => t.slice(o + 1).every((s) => e(n, s))
|
|
72
47
|
);
|
|
73
48
|
}
|
|
74
|
-
function
|
|
75
|
-
const n = d(t.id),
|
|
76
|
-
return !
|
|
49
|
+
function L(t, e) {
|
|
50
|
+
const n = d(t.id), o = d(t.name), s = d(e.entityId), i = d(e.entityName);
|
|
51
|
+
return !o || !s && !i ? !1 : (!s || s === n || s === o) && (!i || i === o);
|
|
77
52
|
}
|
|
78
|
-
function
|
|
79
|
-
const e = m(t.semanticContext) ? t.semanticContext : void 0, n = m(t.fieldMeta) ? t.fieldMeta : void 0,
|
|
80
|
-
(
|
|
53
|
+
function Q(t) {
|
|
54
|
+
const e = m(t.semanticContext) ? t.semanticContext : void 0, n = m(t.fieldMeta) ? t.fieldMeta : void 0, o = d(e == null ? void 0 : e.semanticDomainId), s = Array.isArray(e == null ? void 0 : e.selectedEntities) ? e.selectedEntities.filter(
|
|
55
|
+
(C) => m(C) && C.type === "dataset"
|
|
81
56
|
) : [];
|
|
82
|
-
if (!!!(
|
|
83
|
-
if (!
|
|
57
|
+
if (!!!(o || s.length > 0 || (n == null ? void 0 : n.entityType) === "dataset")) return;
|
|
58
|
+
if (!o)
|
|
84
59
|
return { status: "unresolved", reason: "incomplete_source_identity" };
|
|
85
60
|
const r = d(n == null ? void 0 : n.entityId), a = d(n == null ? void 0 : n.entityName), u = !!(r || a), l = u ? s.filter(
|
|
86
|
-
(
|
|
61
|
+
(C) => L(C, {
|
|
87
62
|
entityId: r,
|
|
88
63
|
entityName: a
|
|
89
64
|
})
|
|
@@ -92,58 +67,58 @@ function K(t) {
|
|
|
92
67
|
return { status: "unresolved", reason: "incomplete_source_identity" };
|
|
93
68
|
if (u && s.length > 0 && l.length === 0)
|
|
94
69
|
return { status: "unresolved", reason: "divergent_source_identity" };
|
|
95
|
-
const c = l[0], f = d(c == null ? void 0 : c.domainId),
|
|
96
|
-
if (f && f !==
|
|
70
|
+
const c = l[0], f = d(c == null ? void 0 : c.domainId), _ = d(c == null ? void 0 : c.id), h = d(c == null ? void 0 : c.name);
|
|
71
|
+
if (f && f !== o)
|
|
97
72
|
return { status: "unresolved", reason: "divergent_source_identity" };
|
|
98
|
-
const
|
|
99
|
-
return
|
|
73
|
+
const A = _, E = h || a;
|
|
74
|
+
return E ? {
|
|
100
75
|
status: "resolved",
|
|
101
76
|
source: {
|
|
102
77
|
kind: "semantic",
|
|
103
|
-
domainId:
|
|
104
|
-
datasetName:
|
|
105
|
-
...
|
|
78
|
+
domainId: o,
|
|
79
|
+
datasetName: E,
|
|
80
|
+
...A ? { datasetId: A } : {}
|
|
106
81
|
}
|
|
107
82
|
} : { status: "unresolved", reason: "incomplete_source_identity" };
|
|
108
83
|
}
|
|
109
|
-
function
|
|
110
|
-
const n = d(t.connectionId),
|
|
84
|
+
function J(t, e) {
|
|
85
|
+
const n = d(t.connectionId), o = m(t.semanticContext) ? t.semanticContext : void 0, s = d(o == null ? void 0 : o.connectionId);
|
|
111
86
|
if (n && s && n !== s)
|
|
112
87
|
return { status: "unresolved", reason: "divergent_source_identity" };
|
|
113
|
-
const
|
|
88
|
+
const i = n || s, r = m(t.fieldMeta) ? t.fieldMeta : void 0, a = e.split(".").slice(0, -1).join("."), u = N(t.qualifiedTableName), l = N(
|
|
114
89
|
r == null ? void 0 : r.qualifiedEntityName
|
|
115
90
|
), c = [
|
|
116
91
|
u,
|
|
117
92
|
l,
|
|
118
93
|
a
|
|
119
|
-
].filter(Boolean), f =
|
|
120
|
-
return !f && c.length > 0 ? { status: "unresolved", reason: "divergent_source_identity" } : !
|
|
94
|
+
].filter(Boolean), f = P(c);
|
|
95
|
+
return !f && c.length > 0 ? { status: "unresolved", reason: "divergent_source_identity" } : !i || !f ? { status: "unresolved", reason: "incomplete_source_identity" } : {
|
|
121
96
|
status: "resolved",
|
|
122
|
-
source: { kind: "physical", connectionId:
|
|
97
|
+
source: { kind: "physical", connectionId: i, tableName: f }
|
|
123
98
|
};
|
|
124
99
|
}
|
|
125
|
-
function
|
|
126
|
-
const n = m(t.fieldMeta) ? t.fieldMeta : void 0,
|
|
100
|
+
function K(t, e) {
|
|
101
|
+
const n = m(t.fieldMeta) ? t.fieldMeta : void 0, o = typeof (n == null ? void 0 : n.qualifiedFieldName) == "string" ? n.qualifiedFieldName.trim() : "", s = k(
|
|
127
102
|
n == null ? void 0 : n.qualifiedFieldName
|
|
128
|
-
),
|
|
103
|
+
), i = typeof t.column == "string" ? t.column.trim() : "", r = k(i), a = typeof t.qualifiedTableName == "string" ? t.qualifiedTableName.trim() : "", u = N(
|
|
129
104
|
t.qualifiedTableName
|
|
130
105
|
);
|
|
131
|
-
if (
|
|
106
|
+
if (o && !s || e && a && !u || i.includes(".") && !r)
|
|
132
107
|
return { status: "unresolved", reason: "incomplete_field_identity" };
|
|
133
|
-
const l = r.split("."), c = r ? l[l.length - 1] :
|
|
108
|
+
const l = r.split("."), c = r ? l[l.length - 1] : i, f = e && u && c ? `${u}.${c}` : "", _ = [
|
|
134
109
|
s,
|
|
135
110
|
r,
|
|
136
111
|
f
|
|
137
112
|
].filter(Boolean);
|
|
138
|
-
if (!
|
|
139
|
-
|
|
140
|
-
|
|
113
|
+
if (!R(
|
|
114
|
+
_,
|
|
115
|
+
j
|
|
141
116
|
))
|
|
142
117
|
return { status: "unresolved", reason: "divergent_field_identity" };
|
|
143
118
|
const h = r || s || f;
|
|
144
119
|
return h ? { status: "resolved", qualifiedFieldName: h } : { status: "unresolved", reason: "incomplete_field_identity" };
|
|
145
120
|
}
|
|
146
|
-
function
|
|
121
|
+
function Y(t) {
|
|
147
122
|
if (!m(t))
|
|
148
123
|
return { status: "ineligible", reason: "invalid_input" };
|
|
149
124
|
if (t.kind === "global-date")
|
|
@@ -151,50 +126,50 @@ function H(t) {
|
|
|
151
126
|
const e = M(t.dataType);
|
|
152
127
|
if (e !== "date" && e !== "datetime")
|
|
153
128
|
return { status: "ineligible", reason: "non_date_filter" };
|
|
154
|
-
const n = m(t.fieldMeta) ? t.fieldMeta : void 0,
|
|
129
|
+
const n = m(t.fieldMeta) ? t.fieldMeta : void 0, o = M(
|
|
155
130
|
n == null ? void 0 : n.dataType
|
|
156
131
|
);
|
|
157
|
-
if ((n == null ? void 0 : n.dataType) !== void 0 &&
|
|
132
|
+
if ((n == null ? void 0 : n.dataType) !== void 0 && o !== "date" && o !== "datetime")
|
|
158
133
|
return { status: "ineligible", reason: "non_date_filter" };
|
|
159
134
|
if (t.customFilterPreferences)
|
|
160
135
|
return { status: "ineligible", reason: "custom_filter" };
|
|
161
136
|
if (t.targetColumns !== void 0 && (!Array.isArray(t.targetColumns) || t.targetColumns.length > 0))
|
|
162
137
|
return { status: "ineligible", reason: "multi_target_filter" };
|
|
163
|
-
const s =
|
|
164
|
-
if (
|
|
165
|
-
return { status: "ineligible", reason:
|
|
166
|
-
const r = s ||
|
|
138
|
+
const s = Q(t), i = K(t, s === void 0);
|
|
139
|
+
if (i.status === "unresolved")
|
|
140
|
+
return { status: "ineligible", reason: i.reason };
|
|
141
|
+
const r = s || J(t, i.qualifiedFieldName);
|
|
167
142
|
return r.status === "resolved" ? {
|
|
168
143
|
status: "eligible",
|
|
169
144
|
kind: "field_date",
|
|
170
|
-
qualifiedFieldName:
|
|
145
|
+
qualifiedFieldName: i.qualifiedFieldName,
|
|
171
146
|
source: r.source
|
|
172
147
|
} : { status: "ineligible", reason: r.reason };
|
|
173
148
|
}
|
|
174
|
-
function
|
|
149
|
+
function G(t) {
|
|
175
150
|
if (!m(t) || t.kind !== "filter" || !m(t.filter))
|
|
176
151
|
return { status: "ineligible", reason: "invalid_input" };
|
|
177
|
-
const e =
|
|
152
|
+
const e = Y(
|
|
178
153
|
t.filter
|
|
179
154
|
);
|
|
180
155
|
return e.status === "ineligible" ? e : e.kind === "field_date" && m(t.compatibility) && t.compatibility.source === "cardInlineFilter" ? { status: "ineligible", reason: "card_inline_filter" } : e;
|
|
181
156
|
}
|
|
182
|
-
function
|
|
183
|
-
return
|
|
157
|
+
function ot(t) {
|
|
158
|
+
return G(t).status === "eligible";
|
|
184
159
|
}
|
|
185
|
-
function
|
|
160
|
+
function st(t) {
|
|
186
161
|
return `compat-filter:${t}`;
|
|
187
162
|
}
|
|
188
|
-
function
|
|
163
|
+
function it(t) {
|
|
189
164
|
return `compat-control:${t}`;
|
|
190
165
|
}
|
|
191
|
-
function
|
|
166
|
+
function rt(t, e) {
|
|
192
167
|
return `compat-inline-filter:${t}:${e}`;
|
|
193
168
|
}
|
|
194
|
-
function
|
|
169
|
+
function at(t, e) {
|
|
195
170
|
return `compat-card-control:${t}:${e}`;
|
|
196
171
|
}
|
|
197
|
-
function
|
|
172
|
+
function b(t) {
|
|
198
173
|
var e;
|
|
199
174
|
return JSON.stringify([
|
|
200
175
|
((e = t.field) == null ? void 0 : e.id) ?? "",
|
|
@@ -203,34 +178,34 @@ function D(t) {
|
|
|
203
178
|
t.temporalBucket ?? null
|
|
204
179
|
]);
|
|
205
180
|
}
|
|
206
|
-
function
|
|
207
|
-
return JSON.stringify(t.map(
|
|
181
|
+
function H(t) {
|
|
182
|
+
return JSON.stringify(t.map(b).sort());
|
|
208
183
|
}
|
|
209
|
-
function
|
|
184
|
+
function x(t) {
|
|
210
185
|
const e = /* @__PURE__ */ new Map();
|
|
211
186
|
for (const n of t)
|
|
212
|
-
for (const
|
|
213
|
-
const s =
|
|
187
|
+
for (const o of n.tuples) {
|
|
188
|
+
const s = o.conditions.filter(
|
|
214
189
|
(a) => {
|
|
215
190
|
var u;
|
|
216
191
|
return (u = a.field) == null ? void 0 : u.id;
|
|
217
192
|
}
|
|
218
193
|
);
|
|
219
194
|
if (s.length === 0) continue;
|
|
220
|
-
let
|
|
221
|
-
|
|
195
|
+
let i = e.get(n.sourceCardId);
|
|
196
|
+
i || (i = /* @__PURE__ */ new Map(), e.set(n.sourceCardId, i));
|
|
222
197
|
const r = [...s].sort(
|
|
223
|
-
(a, u) =>
|
|
198
|
+
(a, u) => b(a).localeCompare(b(u))
|
|
224
199
|
);
|
|
225
|
-
|
|
200
|
+
i.set(H(r), r);
|
|
226
201
|
}
|
|
227
|
-
return [...e.entries()].sort(([n], [
|
|
202
|
+
return [...e.entries()].sort(([n], [o]) => n.localeCompare(o)).map(([n, o]) => ({
|
|
228
203
|
sourceCardId: n,
|
|
229
|
-
tuples: [...
|
|
204
|
+
tuples: [...o.entries()].sort(([s], [i]) => s.localeCompare(i)).map(([, s]) => ({ conditions: s }))
|
|
230
205
|
}));
|
|
231
206
|
}
|
|
232
|
-
function
|
|
233
|
-
const e =
|
|
207
|
+
function ut(t) {
|
|
208
|
+
const e = x(t);
|
|
234
209
|
if (e.length !== 0)
|
|
235
210
|
return {
|
|
236
211
|
id: "selection",
|
|
@@ -238,14 +213,14 @@ function mt(t) {
|
|
|
238
213
|
negate: !1,
|
|
239
214
|
conditions: [],
|
|
240
215
|
groups: e.map((n) => {
|
|
241
|
-
const
|
|
216
|
+
const o = `selection:${n.sourceCardId}`;
|
|
242
217
|
return {
|
|
243
|
-
id:
|
|
218
|
+
id: o,
|
|
244
219
|
logicalOperator: "OR",
|
|
245
220
|
negate: !1,
|
|
246
221
|
conditions: [],
|
|
247
|
-
groups: n.tuples.map((s,
|
|
248
|
-
const r = `${
|
|
222
|
+
groups: n.tuples.map((s, i) => {
|
|
223
|
+
const r = `${o}:${i}`;
|
|
249
224
|
return {
|
|
250
225
|
id: r,
|
|
251
226
|
logicalOperator: "AND",
|
|
@@ -261,29 +236,29 @@ function mt(t) {
|
|
|
261
236
|
})
|
|
262
237
|
};
|
|
263
238
|
}
|
|
264
|
-
function
|
|
239
|
+
function ct(t) {
|
|
265
240
|
return JSON.stringify(
|
|
266
|
-
|
|
241
|
+
x(t).map((e) => [
|
|
267
242
|
e.sourceCardId,
|
|
268
|
-
e.tuples.map((n) => n.conditions.map(
|
|
243
|
+
e.tuples.map((n) => n.conditions.map(b))
|
|
269
244
|
])
|
|
270
245
|
);
|
|
271
246
|
}
|
|
272
|
-
const
|
|
247
|
+
const S = 864e5, q = {
|
|
273
248
|
second: 1e3,
|
|
274
249
|
minute: 6e4,
|
|
275
250
|
hour: 36e5
|
|
276
251
|
};
|
|
277
|
-
function
|
|
252
|
+
function T(t, e) {
|
|
278
253
|
return {
|
|
279
|
-
...
|
|
254
|
+
...F(t, e),
|
|
280
255
|
millisecond: (t.getTime() % 1e3 + 1e3) % 1e3
|
|
281
256
|
};
|
|
282
257
|
}
|
|
283
258
|
function p(t, e) {
|
|
284
|
-
return
|
|
259
|
+
return W(t, e);
|
|
285
260
|
}
|
|
286
|
-
function
|
|
261
|
+
function v(t) {
|
|
287
262
|
const e = new Date(t);
|
|
288
263
|
return {
|
|
289
264
|
year: e.getUTCFullYear(),
|
|
@@ -299,9 +274,9 @@ function B(t, e) {
|
|
|
299
274
|
const n = /* @__PURE__ */ new Date(0);
|
|
300
275
|
return n.setUTCFullYear(t, e, 0), n.getUTCDate();
|
|
301
276
|
}
|
|
302
|
-
function
|
|
303
|
-
const n = t.year * 12 + (t.month - 1) + e,
|
|
304
|
-
return { ...t, year:
|
|
277
|
+
function I(t, e) {
|
|
278
|
+
const n = t.year * 12 + (t.month - 1) + e, o = Math.floor(n / 12), s = n - o * 12 + 1;
|
|
279
|
+
return { ...t, year: o, month: s, day: Math.min(t.day, B(o, s)) };
|
|
305
280
|
}
|
|
306
281
|
function g(t, e, n) {
|
|
307
282
|
if (e === 0) return t;
|
|
@@ -309,22 +284,22 @@ function g(t, e, n) {
|
|
|
309
284
|
case "second":
|
|
310
285
|
case "minute":
|
|
311
286
|
case "hour":
|
|
312
|
-
return
|
|
313
|
-
y(t) + e *
|
|
287
|
+
return v(
|
|
288
|
+
y(t) + e * q[n]
|
|
314
289
|
);
|
|
315
290
|
case "day":
|
|
316
|
-
return
|
|
291
|
+
return v(y(t) + e * S);
|
|
317
292
|
case "week":
|
|
318
|
-
return
|
|
293
|
+
return v(y(t) + e * 7 * S);
|
|
319
294
|
case "month":
|
|
320
|
-
return
|
|
295
|
+
return I(t, e);
|
|
321
296
|
case "quarter":
|
|
322
|
-
return
|
|
297
|
+
return I(t, e * 3);
|
|
323
298
|
case "year":
|
|
324
|
-
return
|
|
299
|
+
return I(t, e * 12);
|
|
325
300
|
}
|
|
326
301
|
}
|
|
327
|
-
function
|
|
302
|
+
function V(t) {
|
|
328
303
|
return new Date(
|
|
329
304
|
y({ ...t, hour: 0, minute: 0, second: 0 })
|
|
330
305
|
).getUTCDay();
|
|
@@ -334,27 +309,27 @@ function $(t) {
|
|
|
334
309
|
const e = (n = t.fiscalCalendar) == null ? void 0 : n.yearStartMonth;
|
|
335
310
|
return e && e >= 1 && e <= 12 ? e : 1;
|
|
336
311
|
}
|
|
337
|
-
function
|
|
338
|
-
const
|
|
312
|
+
function X(t, e, n) {
|
|
313
|
+
const o = { ...t, hour: 0, minute: 0, second: 0, millisecond: 0 };
|
|
339
314
|
switch (e) {
|
|
340
315
|
case "day":
|
|
341
|
-
return
|
|
316
|
+
return o;
|
|
342
317
|
case "week":
|
|
343
318
|
return g(
|
|
344
|
-
|
|
345
|
-
-((
|
|
319
|
+
o,
|
|
320
|
+
-((V(t) - n.weekStart + 7) % 7),
|
|
346
321
|
"day"
|
|
347
322
|
);
|
|
348
323
|
case "month":
|
|
349
|
-
return { ...
|
|
324
|
+
return { ...o, day: 1 };
|
|
350
325
|
case "quarter": {
|
|
351
326
|
const s = (t.month - $(n) + 12) % 12;
|
|
352
|
-
return
|
|
327
|
+
return I({ ...o, day: 1 }, -(s % 3));
|
|
353
328
|
}
|
|
354
329
|
case "year": {
|
|
355
330
|
const s = $(n);
|
|
356
331
|
return {
|
|
357
|
-
...
|
|
332
|
+
...o,
|
|
358
333
|
year: t.month >= s ? t.year : t.year - 1,
|
|
359
334
|
month: s,
|
|
360
335
|
day: 1
|
|
@@ -362,15 +337,15 @@ function tt(t, e, n) {
|
|
|
362
337
|
}
|
|
363
338
|
}
|
|
364
339
|
}
|
|
365
|
-
function
|
|
366
|
-
const s =
|
|
340
|
+
function D(t, e, n, o = 0) {
|
|
341
|
+
const s = q[e];
|
|
367
342
|
if (s !== void 0) {
|
|
368
|
-
const a =
|
|
343
|
+
const a = T(t, n.tz), u = a.millisecond + (e === "second" ? 0 : a.second * 1e3) + (e === "hour" ? a.minute * 6e4 : 0), l = t.getTime() - u + o * s;
|
|
369
344
|
return { start: new Date(l), endExclusive: new Date(l + s) };
|
|
370
345
|
}
|
|
371
|
-
const
|
|
372
|
-
|
|
373
|
-
|
|
346
|
+
const i = e, r = g(
|
|
347
|
+
X(T(t, n.tz), i, n),
|
|
348
|
+
o,
|
|
374
349
|
e
|
|
375
350
|
);
|
|
376
351
|
return {
|
|
@@ -379,109 +354,107 @@ function b(t, e, n, i = 0) {
|
|
|
379
354
|
};
|
|
380
355
|
}
|
|
381
356
|
function z(t, e, n) {
|
|
382
|
-
return
|
|
357
|
+
return D(t, e, n).start;
|
|
383
358
|
}
|
|
384
359
|
function w(t, e, n) {
|
|
385
|
-
return new Date(
|
|
360
|
+
return new Date(D(t, e, n).endExclusive.getTime() - 1);
|
|
386
361
|
}
|
|
387
|
-
function
|
|
362
|
+
function Z(t, e, n, o) {
|
|
388
363
|
return e === 0 ? t : p(
|
|
389
|
-
g(
|
|
390
|
-
|
|
364
|
+
g(T(t, o.tz), e, n),
|
|
365
|
+
o.tz
|
|
391
366
|
);
|
|
392
367
|
}
|
|
393
|
-
function
|
|
394
|
-
const
|
|
395
|
-
const { year:
|
|
396
|
-
return y({ year:
|
|
368
|
+
function dt(t, e, n) {
|
|
369
|
+
const o = (s) => {
|
|
370
|
+
const { year: i, month: r, day: a } = F(s, n);
|
|
371
|
+
return y({ year: i, month: r, day: a, hour: 0, minute: 0, second: 0 });
|
|
397
372
|
};
|
|
398
|
-
return Math.round((
|
|
373
|
+
return Math.round((o(e) - o(t)) / S);
|
|
399
374
|
}
|
|
400
|
-
const
|
|
401
|
-
function
|
|
402
|
-
const { year: n, month:
|
|
403
|
-
return `${String(n).padStart(4, "0")}-${String(
|
|
375
|
+
const tt = /^(\d{4})-(\d{2})-(\d{2})$/;
|
|
376
|
+
function lt(t, e) {
|
|
377
|
+
const { year: n, month: o, day: s } = F(t, e);
|
|
378
|
+
return `${String(n).padStart(4, "0")}-${String(o).padStart(2, "0")}-${String(s).padStart(2, "0")}`;
|
|
404
379
|
}
|
|
405
380
|
function O(t) {
|
|
406
|
-
const e =
|
|
381
|
+
const e = tt.exec(t);
|
|
407
382
|
if (!e) return null;
|
|
408
|
-
const n = Number(e[1]),
|
|
409
|
-
return
|
|
383
|
+
const n = Number(e[1]), o = Number(e[2]), s = Number(e[3]);
|
|
384
|
+
return o < 1 || o > 12 || s < 1 || s > B(n, o) ? null : { year: n, month: o, day: s };
|
|
410
385
|
}
|
|
411
|
-
function
|
|
386
|
+
function mt(t, e) {
|
|
412
387
|
const n = O(t);
|
|
413
388
|
if (!n) return null;
|
|
414
|
-
const
|
|
389
|
+
const o = { ...n, hour: 0, minute: 0, second: 0, millisecond: 0 };
|
|
415
390
|
return {
|
|
416
|
-
start: p(
|
|
417
|
-
endExclusive: p(g(
|
|
391
|
+
start: p(o, e),
|
|
392
|
+
endExclusive: p(g(o, 1, "day"), e)
|
|
418
393
|
};
|
|
419
394
|
}
|
|
420
|
-
function
|
|
421
|
-
const
|
|
395
|
+
function ft(t, e, n) {
|
|
396
|
+
const o = (i) => new Date(D(n, t.unit, e, i).endExclusive.getTime() - 1), s = (i) => D(n, t.unit, e, i).start;
|
|
422
397
|
switch (t.mode) {
|
|
423
398
|
case "last":
|
|
424
399
|
return t.unit === "minute" || t.unit === "hour" ? {
|
|
425
400
|
start: new Date(
|
|
426
|
-
n.getTime() - t.n *
|
|
401
|
+
n.getTime() - t.n * q[t.unit]
|
|
427
402
|
),
|
|
428
403
|
end: n
|
|
429
|
-
} : t.complete ? { start: s(-t.n), end:
|
|
404
|
+
} : t.complete ? { start: s(-t.n), end: o(-1) } : { start: Z(n, -t.n, t.unit, e), end: n };
|
|
430
405
|
case "this": {
|
|
431
406
|
if (t.boundary && t.unit === "month") {
|
|
432
|
-
const
|
|
407
|
+
const i = t.boundary === "first_day" ? z(n, "month", e) : w(n, "month", e);
|
|
433
408
|
return {
|
|
434
|
-
start: z(
|
|
435
|
-
end: w(
|
|
409
|
+
start: z(i, "day", e),
|
|
410
|
+
end: w(i, "day", e)
|
|
436
411
|
};
|
|
437
412
|
}
|
|
438
|
-
return { start: s(0), end: t.toDate ? n :
|
|
413
|
+
return { start: s(0), end: t.toDate ? n : o(0) };
|
|
439
414
|
}
|
|
440
415
|
case "previous":
|
|
441
|
-
return { start: s(-1), end:
|
|
416
|
+
return { start: s(-1), end: o(-1) };
|
|
442
417
|
case "between":
|
|
443
|
-
return { start: s(t.from), end:
|
|
418
|
+
return { start: s(t.from), end: o(t.to) };
|
|
444
419
|
}
|
|
445
420
|
}
|
|
446
|
-
function
|
|
447
|
-
const { operation: e, values: n, temporalPrecision:
|
|
448
|
-
if (e !== "=" && e !== "!=" ||
|
|
421
|
+
function yt(t) {
|
|
422
|
+
const { operation: e, values: n, temporalPrecision: o } = t;
|
|
423
|
+
if (e !== "=" && e !== "!=" || o === "minute")
|
|
449
424
|
return null;
|
|
450
425
|
const s = Array.isArray(n) ? n : [n];
|
|
451
426
|
if (s.length !== 1 || typeof s[0] != "string") return null;
|
|
452
|
-
const
|
|
453
|
-
return O(
|
|
427
|
+
const i = s[0].trim();
|
|
428
|
+
return O(i) ? { operation: e, day: i } : null;
|
|
454
429
|
}
|
|
455
430
|
export {
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
gt as y,
|
|
486
|
-
ht as z
|
|
431
|
+
j as A,
|
|
432
|
+
U as B,
|
|
433
|
+
q as E,
|
|
434
|
+
L as a,
|
|
435
|
+
G as b,
|
|
436
|
+
it as c,
|
|
437
|
+
rt as d,
|
|
438
|
+
at as e,
|
|
439
|
+
ut as f,
|
|
440
|
+
st as g,
|
|
441
|
+
ct as h,
|
|
442
|
+
ot as i,
|
|
443
|
+
p as j,
|
|
444
|
+
B as k,
|
|
445
|
+
g as l,
|
|
446
|
+
V as m,
|
|
447
|
+
z as n,
|
|
448
|
+
w as o,
|
|
449
|
+
D as p,
|
|
450
|
+
dt as q,
|
|
451
|
+
Y as r,
|
|
452
|
+
Z as s,
|
|
453
|
+
lt as t,
|
|
454
|
+
O as u,
|
|
455
|
+
mt as v,
|
|
456
|
+
T as w,
|
|
457
|
+
ft as x,
|
|
458
|
+
yt as y,
|
|
459
|
+
P as z
|
|
487
460
|
};
|