react-semaphor 0.1.536 → 0.1.538
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-Qgpv6_G8.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-BAqUIFp5.js +7966 -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-BTDY_I5L.js → dashboard-DTDDFQsS.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-DV_rlhT2.js → dashboard-briefing-launcher-Bb2QUqOa.js} +764 -740
- package/dist/chunks/{dashboard-controls-B4LxN5dr.js → dashboard-controls-FpONU8QV.js} +683 -686
- package/dist/chunks/{common-types-g7yS12Cg.js → dashboard-filter-value-compatibility-D95O4nd7.js} +18 -24
- package/dist/chunks/dashboard-json-DazPhBU_.js +69 -0
- package/dist/chunks/document-dashboard-inputs-D96rlU7S.js +10678 -0
- package/dist/chunks/document-sheet-utils-C1eEldxs.js +1076 -0
- package/dist/chunks/{edit-dashboard-visual-L5zsle6X.js → edit-dashboard-visual-CIhZodVH.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-Bgw32tb3.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-BCGs4-AE.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-BrTkjcod.js +566 -0
- package/dist/chunks/{selection-reducer-CiDEtmAq.js → selection-reducer-vKIb_jS6.js} +2 -2
- package/dist/chunks/{semaphor-ready-indicator-3TXTZgw-.js → semaphor-ready-indicator-CHHoWhil.js} +65657 -62814
- package/dist/chunks/{shelf-drop-preview-context-CBCs9rjz.js → shelf-drop-preview-context-EsayECEC.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-Bk-SBnaY.js → use-create-flow-overlay-state-BqA92GkX.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-text-filter.d.ts +7 -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 +5 -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 +131 -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-Ccjo0Dzw.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-CW8VEIDx.js +0 -1623
- package/dist/chunks/save-kO6cIaob.js +0 -34
- package/dist/chunks/semantic-format-DiqYeKwU.js +0 -192
- package/dist/chunks/switch-CKB-kUaC.js +0 -25003
- 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,87 +0,0 @@
|
|
|
1
|
-
import { y as u, r as f, z as p, o as i, t as d } from "./validators-DMSH81OM.js";
|
|
2
|
-
function x(e, t) {
|
|
3
|
-
return t.levelLabels[e.id] ?? e.field.label ?? e.field.name;
|
|
4
|
-
}
|
|
5
|
-
function v(e, t) {
|
|
6
|
-
return t.measureLabels[e.id] ?? (e.kind === "aggregate" ? e.field.label ?? e.field.name : e.definition.label);
|
|
7
|
-
}
|
|
8
|
-
function w(e) {
|
|
9
|
-
return d.parse(g(e));
|
|
10
|
-
}
|
|
11
|
-
function g(e) {
|
|
12
|
-
const t = u.parse(e), s = (a) => ({
|
|
13
|
-
grand: { visible: !0, position: "after" },
|
|
14
|
-
levels: Object.fromEntries(
|
|
15
|
-
a.map((r) => [
|
|
16
|
-
r.id,
|
|
17
|
-
{ visible: !0, position: "before" }
|
|
18
|
-
])
|
|
19
|
-
)
|
|
20
|
-
});
|
|
21
|
-
return f.parse({
|
|
22
|
-
version: 1,
|
|
23
|
-
spec: t,
|
|
24
|
-
presentation: {
|
|
25
|
-
layout: { kind: "compact" },
|
|
26
|
-
absence: { emptyText: "—", nullText: "" },
|
|
27
|
-
levelLabels: {},
|
|
28
|
-
measureLabels: {},
|
|
29
|
-
levelFormats: {},
|
|
30
|
-
measureFormats: {},
|
|
31
|
-
totals: { rows: s(t.rows), columns: s(t.columns) }
|
|
32
|
-
},
|
|
33
|
-
defaultView: {
|
|
34
|
-
rows: { depth: 0, overrides: [] },
|
|
35
|
-
columns: { depth: t.columns.length > 1 ? 1 : 0, overrides: [] }
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
function h(e, t) {
|
|
40
|
-
const s = new Map(e.map((a) => [i(a), a]));
|
|
41
|
-
for (const a of t ?? []) s.set(i(a), a);
|
|
42
|
-
return [...s.values()];
|
|
43
|
-
}
|
|
44
|
-
function M(e) {
|
|
45
|
-
const { spec: t, presentation: s, defaults: a, session: r } = p.parse(e), c = new Map(
|
|
46
|
-
h(t.sorts, r == null ? void 0 : r.sorts).map((o) => [i(o), o])
|
|
47
|
-
);
|
|
48
|
-
for (const o of ["rows", "columns"])
|
|
49
|
-
for (const l of t[o]) {
|
|
50
|
-
const n = {
|
|
51
|
-
axis: o,
|
|
52
|
-
levelId: l.id,
|
|
53
|
-
scope: { kind: "level" },
|
|
54
|
-
target: { kind: "member" },
|
|
55
|
-
direction: "asc",
|
|
56
|
-
nulls: "last"
|
|
57
|
-
};
|
|
58
|
-
c.has(i(n)) || c.set(i(n), n);
|
|
59
|
-
}
|
|
60
|
-
const m = (o, l) => ({
|
|
61
|
-
depth: Math.min(o.depth, Math.max(0, l - 1)),
|
|
62
|
-
// Leaf toggles are valid but have no effect. Collapsed ancestors retain dormant overrides.
|
|
63
|
-
overrides: o.overrides.filter(
|
|
64
|
-
(n) => n.path.length < l
|
|
65
|
-
)
|
|
66
|
-
});
|
|
67
|
-
return {
|
|
68
|
-
spec: { ...t, sorts: [...c.values()] },
|
|
69
|
-
presentation: s,
|
|
70
|
-
view: {
|
|
71
|
-
rows: m((r == null ? void 0 : r.rows) ?? a.rows, t.rows.length),
|
|
72
|
-
columns: m(
|
|
73
|
-
(r == null ? void 0 : r.columns) ?? a.columns,
|
|
74
|
-
t.columns.length
|
|
75
|
-
),
|
|
76
|
-
sorts: (r == null ? void 0 : r.sorts) ?? []
|
|
77
|
-
}
|
|
78
|
-
};
|
|
79
|
-
}
|
|
80
|
-
export {
|
|
81
|
-
v as a,
|
|
82
|
-
g as b,
|
|
83
|
-
w as c,
|
|
84
|
-
x as g,
|
|
85
|
-
h as m,
|
|
86
|
-
M as r
|
|
87
|
-
};
|
|
@@ -1,209 +0,0 @@
|
|
|
1
|
-
import { r as g } from "./metric-comparison-BKHyvnAy.js";
|
|
2
|
-
import { E as f } from "./validators-DMSH81OM.js";
|
|
3
|
-
const v = [
|
|
4
|
-
"=",
|
|
5
|
-
"!=",
|
|
6
|
-
">",
|
|
7
|
-
"<",
|
|
8
|
-
">=",
|
|
9
|
-
"<=",
|
|
10
|
-
"like",
|
|
11
|
-
"not like",
|
|
12
|
-
"between",
|
|
13
|
-
"not between",
|
|
14
|
-
"in",
|
|
15
|
-
"not in",
|
|
16
|
-
"is null",
|
|
17
|
-
"is not null"
|
|
18
|
-
], y = /* @__PURE__ */ new Set(["string", "number", "date", "boolean"]);
|
|
19
|
-
function b(t) {
|
|
20
|
-
return typeof t == "string" && v.includes(t);
|
|
21
|
-
}
|
|
22
|
-
function E(t, e) {
|
|
23
|
-
switch (t) {
|
|
24
|
-
case "is null":
|
|
25
|
-
case "is not null":
|
|
26
|
-
return e.length === 0;
|
|
27
|
-
case "between":
|
|
28
|
-
case "not between":
|
|
29
|
-
return e.length === 2;
|
|
30
|
-
case "in":
|
|
31
|
-
case "not in":
|
|
32
|
-
return e.length >= 1;
|
|
33
|
-
default:
|
|
34
|
-
return e.length === 1;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
function P(t) {
|
|
38
|
-
if (!t || typeof t != "object" || Array.isArray(t))
|
|
39
|
-
return;
|
|
40
|
-
const e = t, n = {};
|
|
41
|
-
for (const i of S)
|
|
42
|
-
e[i] !== void 0 && (n[i] = e[i]);
|
|
43
|
-
return n;
|
|
44
|
-
}
|
|
45
|
-
const S = [
|
|
46
|
-
"operation",
|
|
47
|
-
"values",
|
|
48
|
-
"valueType",
|
|
49
|
-
"temporalBucket",
|
|
50
|
-
"relativeMeta",
|
|
51
|
-
"temporalPrecision"
|
|
52
|
-
];
|
|
53
|
-
function A(t) {
|
|
54
|
-
const e = P(t);
|
|
55
|
-
if (!e) return;
|
|
56
|
-
const { operation: n, values: i } = e;
|
|
57
|
-
if (!b(n) || !Array.isArray(i) || !E(n, i)) return;
|
|
58
|
-
const r = typeof e.valueType == "string" && y.has(e.valueType) ? e.valueType : void 0;
|
|
59
|
-
return {
|
|
60
|
-
operation: n,
|
|
61
|
-
values: i,
|
|
62
|
-
...r ? { valueType: r } : {},
|
|
63
|
-
...e.temporalBucket !== void 0 ? { temporalBucket: e.temporalBucket } : {},
|
|
64
|
-
...e.relativeMeta !== void 0 ? { relativeMeta: e.relativeMeta } : {},
|
|
65
|
-
...e.temporalPrecision !== void 0 ? { temporalPrecision: e.temporalPrecision } : {}
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
function k(t) {
|
|
69
|
-
const e = A(t);
|
|
70
|
-
if (!e)
|
|
71
|
-
throw new Error(
|
|
72
|
-
`Filter operation "${String(t.operation)}" cannot be expressed as predicate semantics.`
|
|
73
|
-
);
|
|
74
|
-
return e;
|
|
75
|
-
}
|
|
76
|
-
function x(t) {
|
|
77
|
-
return t.operation === "is null" || t.operation === "is not null";
|
|
78
|
-
}
|
|
79
|
-
function N(t, e) {
|
|
80
|
-
return g({ ...t, role: e });
|
|
81
|
-
}
|
|
82
|
-
function M(t, e) {
|
|
83
|
-
if (e.id) {
|
|
84
|
-
const n = [];
|
|
85
|
-
t.forEach(
|
|
86
|
-
({ fields: r }, o) => r.forEach((s, l) => {
|
|
87
|
-
s.id === e.id && n.push({ group: o, index: l });
|
|
88
|
-
})
|
|
89
|
-
);
|
|
90
|
-
const i = e.alias ? n.find(
|
|
91
|
-
({ group: r, index: o }) => N(t[r].fields[o], t[r].role) === e.alias
|
|
92
|
-
) : void 0;
|
|
93
|
-
if (i) return i;
|
|
94
|
-
if (n.length === 1) return n[0];
|
|
95
|
-
}
|
|
96
|
-
for (let n = 0; n < t.length; n += 1) {
|
|
97
|
-
const i = t[n].fields.findIndex(
|
|
98
|
-
(r) => r.name === e.name && r.entityName === e.entityName && (r.alias === e.alias || !e.alias)
|
|
99
|
-
);
|
|
100
|
-
if (i !== -1) return { group: n, index: i };
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
function c(t) {
|
|
104
|
-
var e;
|
|
105
|
-
return JSON.stringify([
|
|
106
|
-
((e = t.field) == null ? void 0 : e.id) ?? "",
|
|
107
|
-
t.operator,
|
|
108
|
-
t.value ?? null,
|
|
109
|
-
t.temporalBucket ?? null
|
|
110
|
-
]);
|
|
111
|
-
}
|
|
112
|
-
function w(t) {
|
|
113
|
-
return JSON.stringify(t.map(c).sort());
|
|
114
|
-
}
|
|
115
|
-
function m(t) {
|
|
116
|
-
const e = /* @__PURE__ */ new Map();
|
|
117
|
-
for (const n of t)
|
|
118
|
-
for (const i of n.tuples) {
|
|
119
|
-
const r = i.conditions.filter(
|
|
120
|
-
(l) => {
|
|
121
|
-
var a;
|
|
122
|
-
return (a = l.field) == null ? void 0 : a.id;
|
|
123
|
-
}
|
|
124
|
-
);
|
|
125
|
-
if (r.length === 0) continue;
|
|
126
|
-
let o = e.get(n.sourceCardId);
|
|
127
|
-
o || (o = /* @__PURE__ */ new Map(), e.set(n.sourceCardId, o));
|
|
128
|
-
const s = [...r].sort(
|
|
129
|
-
(l, a) => c(l).localeCompare(c(a))
|
|
130
|
-
);
|
|
131
|
-
o.set(w(s), s);
|
|
132
|
-
}
|
|
133
|
-
return [...e.entries()].sort(([n], [i]) => n.localeCompare(i)).map(([n, i]) => ({
|
|
134
|
-
sourceCardId: n,
|
|
135
|
-
tuples: [...i.entries()].sort(([r], [o]) => r.localeCompare(o)).map(([, r]) => ({ conditions: r }))
|
|
136
|
-
}));
|
|
137
|
-
}
|
|
138
|
-
function O(t) {
|
|
139
|
-
const e = m(t);
|
|
140
|
-
if (e.length !== 0)
|
|
141
|
-
return {
|
|
142
|
-
id: "selection",
|
|
143
|
-
logicalOperator: "AND",
|
|
144
|
-
negate: !1,
|
|
145
|
-
conditions: [],
|
|
146
|
-
groups: e.map((n) => {
|
|
147
|
-
const i = `selection:${n.sourceCardId}`;
|
|
148
|
-
return {
|
|
149
|
-
id: i,
|
|
150
|
-
logicalOperator: "OR",
|
|
151
|
-
negate: !1,
|
|
152
|
-
conditions: [],
|
|
153
|
-
groups: n.tuples.map((r, o) => {
|
|
154
|
-
const s = `${i}:${o}`;
|
|
155
|
-
return {
|
|
156
|
-
id: s,
|
|
157
|
-
logicalOperator: "AND",
|
|
158
|
-
negate: !1,
|
|
159
|
-
conditions: r.conditions.map((l, a) => ({
|
|
160
|
-
...l,
|
|
161
|
-
id: `${s}:${a}`
|
|
162
|
-
})),
|
|
163
|
-
groups: []
|
|
164
|
-
};
|
|
165
|
-
})
|
|
166
|
-
};
|
|
167
|
-
})
|
|
168
|
-
};
|
|
169
|
-
}
|
|
170
|
-
function B(t) {
|
|
171
|
-
return JSON.stringify(
|
|
172
|
-
m(t).map((e) => [
|
|
173
|
-
e.sourceCardId,
|
|
174
|
-
e.tuples.map((n) => n.conditions.map(c))
|
|
175
|
-
])
|
|
176
|
-
);
|
|
177
|
-
}
|
|
178
|
-
function C(t, e) {
|
|
179
|
-
var i;
|
|
180
|
-
if (e === null) return !0;
|
|
181
|
-
if (e.overrides.length === 0) return t.length <= e.depth;
|
|
182
|
-
const n = f(t);
|
|
183
|
-
return ((i = e.overrides.find((r) => r.path.length === t.length && f(r.path) === n)) == null ? void 0 : i.expanded) ?? t.length <= e.depth;
|
|
184
|
-
}
|
|
185
|
-
function K(t) {
|
|
186
|
-
var p;
|
|
187
|
-
const { path: e, levelCount: n, expansion: i, total: r, axis: o } = t, s = e.length >= n || ((p = e[e.length - 1]) == null ? void 0 : p.member.kind) === "others", l = !s && !t.childrenEmpty, a = l && C(e, i), d = o === "rows" && t.rowLayout !== "tabular", h = a && !!t.skipRedundant && !!t.singleChild, u = !!(r != null && r.visible) && !h;
|
|
188
|
-
return {
|
|
189
|
-
expandable: l,
|
|
190
|
-
expanded: a,
|
|
191
|
-
memberVisible: d || !a,
|
|
192
|
-
valueVisible: s || u && (!a || r.position === "before"),
|
|
193
|
-
subtotalBefore: !d && a && u && r.position === "before",
|
|
194
|
-
subtotalAfter: a && u && r.position === "after"
|
|
195
|
-
};
|
|
196
|
-
}
|
|
197
|
-
export {
|
|
198
|
-
v as N,
|
|
199
|
-
A as a,
|
|
200
|
-
B as b,
|
|
201
|
-
O as c,
|
|
202
|
-
C as d,
|
|
203
|
-
M as f,
|
|
204
|
-
x as i,
|
|
205
|
-
P as p,
|
|
206
|
-
K as r,
|
|
207
|
-
N as s,
|
|
208
|
-
k as t
|
|
209
|
-
};
|