react-semaphor 0.1.602 → 0.1.604
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/activity/index.js +1 -73
- package/dist/analytics-protocol/index.js +1 -1451
- package/dist/appearance/index.js +1 -12
- package/dist/appearance-runtime/index.js +1 -5
- package/dist/assistant-context/index.js +1 -11
- package/dist/assistant-protocol/index.js +1 -152
- package/dist/brand-studio/index.js +4 -1594
- package/dist/briefings/index.js +1 -70
- package/dist/chunks/add-to-dashboard-DeHEBEqG.js +12 -0
- package/dist/chunks/analytics-base-schemas-BREc5WGv.js +1 -0
- package/dist/chunks/appearance-context-BqBZrijL.js +1 -0
- package/dist/chunks/appearance-runtime-provider-DmbCrOOG.js +1 -0
- package/dist/chunks/applied-constraints-CinevlKD.js +1 -0
- package/dist/chunks/assistant-chat-CjYrwVDa.js +56 -0
- package/dist/chunks/attribution-BEFSsbNn.js +1 -0
- package/dist/chunks/availability-3AIOf6Z-.js +1 -0
- package/dist/chunks/bookmark-impact-C89zBLq3.js +1 -0
- package/dist/chunks/bookmark-state-69YYnRql.js +1 -0
- package/dist/chunks/brand-DCaZyRt6.js +1 -0
- package/dist/chunks/card-filter-builder-CTp6RAz1.js +17 -0
- package/dist/chunks/column-bands-DwxbZ6UI.js +1 -0
- package/dist/chunks/comparison-window-caption-C312mn3s.js +1 -0
- package/dist/chunks/context-ALdccLHw.js +2 -0
- package/dist/chunks/conversation-JMK2kyTK.js +1 -0
- package/dist/chunks/dashboard-BX28ld6s.js +1 -0
- package/dist/chunks/dashboard-briefing-launcher-qo7GH4EO.js +37 -0
- package/dist/chunks/dashboard-controls-DhRjB7MA.js +42 -0
- package/dist/chunks/dashboard-json-9cHzhSjC.js +1 -0
- package/dist/chunks/dates-D-KP8G-z.js +1 -0
- package/dist/chunks/edit-DEAK0UZo.js +1 -0
- package/dist/chunks/edit-dashboard-visual-Duq_QkB_.js +93 -0
- package/dist/chunks/export-file-format-B-wQNHIn.js +4 -0
- package/dist/chunks/filter-line-CwQrqORc.js +1 -0
- package/dist/chunks/filter-reach-preview-gixPFlZj.js +1 -0
- package/dist/chunks/filter-value-text-B3tXakhd.js +1 -0
- package/dist/chunks/index-B-VF1ogs.js +1 -0
- package/dist/chunks/index-BE1DfxNs.js +1 -0
- package/dist/chunks/index-DViPGDFj.js +1 -0
- package/dist/chunks/layout-grid-BWtlgw0T.js +6 -0
- package/dist/chunks/matrix-analytical-definition-CtFqWyCK.js +1 -0
- package/dist/chunks/matrix-member-presentation-Q0MCJ-YK.js +1 -0
- package/dist/chunks/matrix-operation-contract-D1RC1bfi.js +1 -0
- package/dist/chunks/metric-comparison-DEZYXROZ.js +1 -0
- package/dist/chunks/normalize-dashboard-for-dirty-check-ILKfqgL3.js +1 -0
- package/dist/chunks/paintbrush-BjS3SbrH.js +6 -0
- package/dist/chunks/palette-BzC-CGOc.js +6 -0
- package/dist/chunks/pickers-DuBrUht0.js +1 -0
- package/dist/chunks/pivot-result-contract-expectations-DTQAgr4n.js +1 -0
- package/dist/chunks/pivot-result-identity-DTNCB--h.js +1 -0
- package/dist/chunks/raw-temporal-value-DeyEhL0S.js +1 -0
- package/dist/chunks/rendered-file-BbvwaU6z.js +1 -0
- package/dist/chunks/report-preferences-dialog-B_gUmCzG.js +1 -0
- package/dist/chunks/report-runtime-context-BWzIHCKK.js +1 -0
- package/dist/chunks/resolve-dashboard-input-context-B-TtRqxu.js +8 -0
- package/dist/chunks/resolver-AN9ChBfZ.js +1 -0
- package/dist/chunks/save-DdFUZcbi.js +6 -0
- package/dist/chunks/saved-dashboard-context-BAJ5tWiq.js +1 -0
- package/dist/chunks/schema-MC0cQSAb.js +4 -0
- package/dist/chunks/selection-filter-compiler-CCoCD25M.js +1 -0
- package/dist/chunks/semaphor-ready-indicator-DzjorP3t.js +999 -0
- package/dist/chunks/set-DuJfGkbY.js +1 -0
- package/dist/chunks/shelf-drop-preview-context-BlLJ5RsT.js +6 -0
- package/dist/chunks/stored-dashboard-Ctcpkllg.js +1 -0
- package/dist/chunks/style-sheet-parts-BRGt9O05.js +178 -0
- package/dist/chunks/table-export-sheet-rC5pKmXg.js +2 -0
- package/dist/chunks/token-types-Bj9iMy0w.js +1 -0
- package/dist/chunks/validators-CqV3Yka1.js +1 -0
- package/dist/chunks/variable-draft-DJrfUyhv.js +1 -0
- package/dist/chunks/visual-choice-DgEFfkE-.js +1 -0
- package/dist/dashboard/index.js +1 -7
- package/dist/dashboard-authoring/index.js +1 -4491
- package/dist/format-utils/index.js +1 -424
- package/dist/index.js +1 -554
- package/dist/layouts/index.js +1 -7
- package/dist/live-channel/index.js +1 -124
- package/dist/pdf-export-policy/index.js +1 -92
- package/dist/pdf-table-layout/index.js +1 -993
- package/dist/report-runtime-context/index.js +1 -9
- package/dist/shared/index.js +1 -6
- package/dist/style.css +1 -1
- package/dist/surfboard/index.js +1 -9
- package/dist/types/components/ui-custom/date-range-presets.d.ts +8 -0
- package/dist/types/index.js +1 -88
- package/dist/types/lib/document/document-edits.d.ts +0 -4
- package/dist/types/lib/filter-values/build-card-filter-definition.d.ts +32 -0
- package/dist/types/lib/query-context/dashboard-filter-mapping-resolution.d.ts +9 -0
- package/dist/types/lib/stores/dashboard-store.d.ts +0 -1
- package/dist/types/lib/stores/explorer-actions.d.ts +7 -6
- package/dist/types/lib/types/common-types.d.ts +0 -2
- package/dist/types/lib/types/explorer-types.d.ts +1 -1
- package/dist/types/lib/types/semantic-types.d.ts +6 -10
- package/dist/types/lib/utils/field-state-calculator.d.ts +7 -19
- package/dist/types/shared/analytics-protocol/analytics-base-schemas.d.ts +18 -0
- package/dist/types/shared/analytics-protocol/analyze-result-types.d.ts +3 -0
- package/dist/types/shared/analytics-protocol/comparison-choices.d.ts +92 -0
- package/dist/types/shared/analytics-protocol/comparison-placement.d.ts +30 -0
- package/dist/types/shared/analytics-protocol/contracts.d.ts +11 -5
- package/dist/types/shared/analytics-protocol/date-window.d.ts +105 -0
- package/dist/types/shared/analytics-protocol/filter-field-ownership.d.ts +27 -0
- package/dist/types/shared/analytics-protocol/fixtures.d.ts +4 -2
- package/dist/types/shared/analytics-protocol/index.d.ts +3 -0
- package/dist/types/shared/analytics-protocol/metric-comparison.d.ts +93 -11
- package/dist/types/shared/assistant-protocol/context.d.ts +16 -16
- package/dist/types/shared/dashboard-authoring/calculations/calculated-column.d.ts +1 -1
- package/dist/types/shared/dashboard-authoring/calculations/definition.d.ts +13 -0
- package/dist/types/shared/dashboard-authoring/card-data-source/card-base.d.ts +125 -0
- package/dist/types/shared/dashboard-authoring/card-data-source/card-field-folders.d.ts +55 -0
- package/dist/types/shared/dashboard-authoring/card-data-source/card-joins.d.ts +114 -0
- package/dist/types/shared/dashboard-authoring/card-data-source/card-prune.d.ts +12 -0
- package/dist/types/shared/dashboard-authoring/card-data-source/filter-field-catalog.d.ts +60 -0
- package/dist/types/shared/dashboard-authoring/card-data-source/filter-field-folders.d.ts +132 -0
- package/dist/types/shared/dashboard-authoring/card-data-source/index.d.ts +7 -0
- package/dist/types/shared/dashboard-authoring/card-data-source/join-reach.d.ts +42 -0
- package/dist/types/shared/dashboard-authoring/card-field-places.d.ts +28 -0
- package/dist/types/shared/dashboard-authoring/card-settings/card-display-write.d.ts +8 -0
- package/dist/types/shared/dashboard-authoring/card-settings/card-kinds.d.ts +1 -1
- package/dist/types/shared/dashboard-authoring/card-settings/inputs.d.ts +2 -1
- package/dist/types/shared/dashboard-authoring/card-settings/resolved.d.ts +0 -3
- package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +21 -358
- package/dist/types/shared/dashboard-authoring/changes/diagnostics.d.ts +2 -0
- package/dist/types/shared/dashboard-authoring/conditional-formatting/schema.d.ts +10 -10
- package/dist/types/shared/dashboard-authoring/dashboard-variable-card.d.ts +2 -4
- package/dist/types/shared/dashboard-authoring/field-folders/field-folders.d.ts +115 -0
- package/dist/types/shared/dashboard-authoring/field-folders/index.d.ts +1 -0
- package/dist/types/shared/dashboard-authoring/filter-reach-decision.d.ts +11 -0
- package/dist/types/shared/dashboard-authoring/index.d.ts +6 -1
- package/dist/types/shared/dashboard-authoring/kpi-date-context.d.ts +2 -0
- package/dist/types/shared/dashboard-authoring/kpi-figure.d.ts +18 -0
- package/dist/types/shared/dashboard-authoring/measure-calculations/comparison.d.ts +8 -7
- package/dist/types/shared/dashboard-authoring/measure-calculations/dates.d.ts +11 -1
- package/dist/types/shared/dashboard-authoring/measure-calculations/index.d.ts +2 -2
- package/dist/types/shared/dashboard-authoring/measure-calculations/options.d.ts +4 -0
- package/dist/types/shared/dashboard-authoring/measure-calculations/read.d.ts +18 -1
- package/dist/types/shared/dashboard-authoring/measure-calculations/resolve.d.ts +2 -0
- package/dist/types/shared/dashboard-authoring/measure-calculations/schemas.d.ts +46 -88
- package/dist/types/shared/dashboard-authoring/operations/calculated-field-operations.d.ts +33 -8
- package/dist/types/shared/dashboard-authoring/operations/operation-types.d.ts +0 -2
- package/dist/types/shared/dashboard-authoring/outline/outline-filters.d.ts +5 -0
- package/dist/types/shared/dashboard-authoring/see-records/result.d.ts +7 -22
- package/dist/types/shared/format-utils/comparison-detail.d.ts +34 -0
- package/dist/types/shared/format-utils/index.d.ts +1 -0
- package/dist/types/shared/format-utils/partial-period.d.ts +4 -2
- package/dist/types/shared/temporal/calendar-periods.d.ts +11 -0
- package/dist/types/shared/temporal/index.d.ts +2 -0
- package/dist/types/shared/temporal/temporal-text.d.ts +33 -0
- package/dist/types/shared/temporal/temporal.d.ts +27 -0
- package/dist/types/shared/temporal/zoned-wall-clock.d.ts +4 -3
- package/dist/usage-events/index.js +1 -285
- package/dist/value-format-preferences/index.js +1 -635
- package/package.json +6 -2
- package/dist/chunks/add-to-dashboard-ClhEIFst.js +0 -291
- package/dist/chunks/analytics-base-schemas-DevrgqQb.js +0 -678
- package/dist/chunks/appearance-context-BwBp25ZG.js +0 -162
- package/dist/chunks/appearance-runtime-provider-BRHYELkC.js +0 -80
- package/dist/chunks/applied-constraints-DU-wndZ7.js +0 -47
- package/dist/chunks/assistant-chat-BWF3GYip.js +0 -6115
- package/dist/chunks/attribution-BvoKvhcj.js +0 -32
- package/dist/chunks/availability-Bp5Gfu1I.js +0 -44
- package/dist/chunks/bookmark-impact-BF3iRx5a.js +0 -76
- package/dist/chunks/bookmark-state-CBSTdW6q.js +0 -1666
- package/dist/chunks/brand-BoUV0iHF.js +0 -54
- package/dist/chunks/card-filter-builder-B8XHwMY6.js +0 -4069
- package/dist/chunks/column-bands-RdM-kjDe.js +0 -47
- package/dist/chunks/comparison-window-caption-W83qB4V5.js +0 -741
- package/dist/chunks/context-BJoEFgNl.js +0 -369
- package/dist/chunks/conversation-sQiWYUOb.js +0 -16
- package/dist/chunks/dashboard-DG5EIYYB.js +0 -14
- package/dist/chunks/dashboard-briefing-launcher-CBSrhyWZ.js +0 -4875
- package/dist/chunks/dashboard-controls-D6ECO4N1.js +0 -2290
- package/dist/chunks/dashboard-json-DrJftBSL.js +0 -66
- package/dist/chunks/dates-Bz-qM5px.js +0 -164
- package/dist/chunks/edit-9df1zOWe.js +0 -226
- package/dist/chunks/edit-dashboard-visual-BDYAJIbb.js +0 -18605
- package/dist/chunks/export-file-format-C-tJsxsf.js +0 -111
- package/dist/chunks/filter-line-BXT6y303.js +0 -703
- package/dist/chunks/filter-reach-copy-BukhZmzm.js +0 -5250
- package/dist/chunks/filter-value-text-D3-bf3_b.js +0 -153
- package/dist/chunks/index-BVKzKl5d.js +0 -90
- package/dist/chunks/index-BW0yozjs.js +0 -2795
- package/dist/chunks/index-CV_Kzou0.js +0 -595
- package/dist/chunks/layout-grid-Ds0diMeY.js +0 -16
- package/dist/chunks/matrix-analytical-definition-CgQgVeeI.js +0 -1162
- package/dist/chunks/matrix-member-presentation-DSBIIudt.js +0 -258
- package/dist/chunks/matrix-operation-contract--DkNCOzd.js +0 -1412
- package/dist/chunks/metric-comparison-zMylnIkc.js +0 -541
- package/dist/chunks/normalize-dashboard-for-dirty-check-XKgH3GFX.js +0 -119
- package/dist/chunks/paintbrush-CX8pao1j.js +0 -27
- package/dist/chunks/palette-CuA0HlzF.js +0 -23
- package/dist/chunks/pickers-DkqmtnTL.js +0 -2403
- package/dist/chunks/pivot-result-contract-expectations-C8KL7hPx.js +0 -5046
- package/dist/chunks/pivot-result-identity-C1AOH1PS.js +0 -77
- package/dist/chunks/raw-temporal-value-E416F-0L.js +0 -454
- package/dist/chunks/rendered-file-D8xEuVVx.js +0 -108
- package/dist/chunks/report-preferences-dialog-CbuVNDGi.js +0 -1637
- package/dist/chunks/report-runtime-context-E7USjN7E.js +0 -388
- package/dist/chunks/resolve-dashboard-input-context-CULCE_hM.js +0 -25172
- package/dist/chunks/resolver-DG_tfEpt.js +0 -156
- package/dist/chunks/save-BKHlDONy.js +0 -21
- package/dist/chunks/saved-dashboard-context-C1WlOx5z.js +0 -632
- package/dist/chunks/schema-C9NPiIru.js +0 -2568
- package/dist/chunks/selection-filter-compiler-ifT8JCXS.js +0 -131
- package/dist/chunks/semaphor-ready-indicator-CBIRcDWs.js +0 -145326
- package/dist/chunks/shelf-drop-preview-context-xR69SMA8.js +0 -2466
- package/dist/chunks/stored-dashboard-BuM8vnWf.js +0 -4070
- package/dist/chunks/style-sheet-parts-Bt9ZNre8.js +0 -8674
- package/dist/chunks/table-export-sheet-DVljtHkG.js +0 -949
- package/dist/chunks/token-types-D_xKgyVS.js +0 -8
- package/dist/chunks/upload-Dll_M7XQ.js +0 -15
- package/dist/chunks/validators-ClWHpYql.js +0 -3686
- package/dist/chunks/variable-draft-CDGGl53R.js +0 -242
- package/dist/chunks/visual-choice-DDfHfHvY.js +0 -172
|
@@ -1,258 +0,0 @@
|
|
|
1
|
-
import { m as p } from "./validators-ClWHpYql.js";
|
|
2
|
-
function _(t) {
|
|
3
|
-
const e = y(t);
|
|
4
|
-
return h(e) ? e : void 0;
|
|
5
|
-
}
|
|
6
|
-
function y(t) {
|
|
7
|
-
if (typeof t != "string" || t.trim().length === 0)
|
|
8
|
-
return;
|
|
9
|
-
const e = t.trim().toLowerCase();
|
|
10
|
-
switch (e) {
|
|
11
|
-
case "=":
|
|
12
|
-
return "=";
|
|
13
|
-
case "!=":
|
|
14
|
-
return "!=";
|
|
15
|
-
case "in":
|
|
16
|
-
return "in";
|
|
17
|
-
case "not_in":
|
|
18
|
-
return "not_in";
|
|
19
|
-
case "contains":
|
|
20
|
-
return "contains";
|
|
21
|
-
case "not_contains":
|
|
22
|
-
return "not_contains";
|
|
23
|
-
case "between":
|
|
24
|
-
return "between";
|
|
25
|
-
case "not_between":
|
|
26
|
-
return "not_between";
|
|
27
|
-
case ">":
|
|
28
|
-
case ">=":
|
|
29
|
-
case "<":
|
|
30
|
-
case "<=":
|
|
31
|
-
return e;
|
|
32
|
-
case "is_null":
|
|
33
|
-
return "is_null";
|
|
34
|
-
case "is_not_null":
|
|
35
|
-
return "is_not_null";
|
|
36
|
-
default:
|
|
37
|
-
return x(t) ? t : void 0;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
function h(t) {
|
|
41
|
-
return t === "=" || t === "!=" || t === "in" || t === "not_in" || t === "contains" || t === "not_contains" || t === "between" || t === "not_between" || t === ">" || t === ">=" || t === "<" || t === "<=";
|
|
42
|
-
}
|
|
43
|
-
function x(t) {
|
|
44
|
-
return h(t) || t === "not_contains" || t === "is_null" || t === "is_not_null";
|
|
45
|
-
}
|
|
46
|
-
function O(t) {
|
|
47
|
-
switch (t) {
|
|
48
|
-
case "not in":
|
|
49
|
-
return "not_in";
|
|
50
|
-
case "like":
|
|
51
|
-
return "contains";
|
|
52
|
-
case "not like":
|
|
53
|
-
return "not_contains";
|
|
54
|
-
case "not between":
|
|
55
|
-
return "not_between";
|
|
56
|
-
case "is null":
|
|
57
|
-
case "is not null":
|
|
58
|
-
return;
|
|
59
|
-
default:
|
|
60
|
-
return _(t);
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
const E = [
|
|
64
|
-
"=",
|
|
65
|
-
"!=",
|
|
66
|
-
">",
|
|
67
|
-
"<",
|
|
68
|
-
">=",
|
|
69
|
-
"<=",
|
|
70
|
-
"like",
|
|
71
|
-
"not like",
|
|
72
|
-
"between",
|
|
73
|
-
"not between",
|
|
74
|
-
"in",
|
|
75
|
-
"not in",
|
|
76
|
-
"is null",
|
|
77
|
-
"is not null"
|
|
78
|
-
], N = /* @__PURE__ */ new Set(["string", "number", "date", "boolean"]);
|
|
79
|
-
function A(t) {
|
|
80
|
-
return typeof t == "string" && E.includes(t);
|
|
81
|
-
}
|
|
82
|
-
function P(t, e) {
|
|
83
|
-
switch (t) {
|
|
84
|
-
case "is null":
|
|
85
|
-
case "is not null":
|
|
86
|
-
return e.length === 0;
|
|
87
|
-
case "between":
|
|
88
|
-
case "not between":
|
|
89
|
-
return e.length === 2;
|
|
90
|
-
case "in":
|
|
91
|
-
case "not in":
|
|
92
|
-
return e.length >= 1;
|
|
93
|
-
default:
|
|
94
|
-
return e.length === 1;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
function R(t) {
|
|
98
|
-
if (!t || typeof t != "object" || Array.isArray(t))
|
|
99
|
-
return;
|
|
100
|
-
const e = t, n = {};
|
|
101
|
-
for (const o of S)
|
|
102
|
-
e[o] !== void 0 && (n[o] = e[o]);
|
|
103
|
-
return n;
|
|
104
|
-
}
|
|
105
|
-
const S = [
|
|
106
|
-
"operation",
|
|
107
|
-
"values",
|
|
108
|
-
"valueType",
|
|
109
|
-
"temporalBucket",
|
|
110
|
-
"relativeMeta",
|
|
111
|
-
"temporalPrecision"
|
|
112
|
-
];
|
|
113
|
-
function M(t) {
|
|
114
|
-
const e = R(t);
|
|
115
|
-
if (!e) return;
|
|
116
|
-
const { operation: n, values: o } = e;
|
|
117
|
-
if (!A(n) || !Array.isArray(o) || !P(n, o)) return;
|
|
118
|
-
const i = typeof e.valueType == "string" && N.has(e.valueType) ? e.valueType : void 0;
|
|
119
|
-
return {
|
|
120
|
-
operation: n,
|
|
121
|
-
values: o,
|
|
122
|
-
...i ? { valueType: i } : {},
|
|
123
|
-
...e.temporalBucket !== void 0 ? { temporalBucket: e.temporalBucket } : {},
|
|
124
|
-
...e.relativeMeta !== void 0 ? { relativeMeta: e.relativeMeta } : {},
|
|
125
|
-
...e.temporalPrecision !== void 0 ? { temporalPrecision: e.temporalPrecision } : {}
|
|
126
|
-
};
|
|
127
|
-
}
|
|
128
|
-
function B(t) {
|
|
129
|
-
const e = M(t);
|
|
130
|
-
if (!e)
|
|
131
|
-
throw new Error(
|
|
132
|
-
`Filter operation "${String(t.operation)}" cannot be expressed as predicate semantics.`
|
|
133
|
-
);
|
|
134
|
-
return e;
|
|
135
|
-
}
|
|
136
|
-
function I(t) {
|
|
137
|
-
return t.operation === "is null" || t.operation === "is not null";
|
|
138
|
-
}
|
|
139
|
-
const w = "numeric_range", F = 32, T = (t) => typeof t == "number" && Number.isFinite(t), f = (t) => {
|
|
140
|
-
if (T(t)) return t;
|
|
141
|
-
if (typeof t == "string" && t.trim() !== "") {
|
|
142
|
-
const e = Number(t);
|
|
143
|
-
return Number.isFinite(e) ? e : null;
|
|
144
|
-
}
|
|
145
|
-
return null;
|
|
146
|
-
};
|
|
147
|
-
function V(t) {
|
|
148
|
-
if (!t || typeof t != "object") return;
|
|
149
|
-
const e = t;
|
|
150
|
-
if (e.kind !== w) return;
|
|
151
|
-
const n = f(e.min), o = f(e.max), i = f(e.emptyRows) ?? 0, c = e.bucketing === "value" ? "value" : "width", u = f(e.bucketWidth) ?? 0, r = Array.isArray(e.buckets) ? e.buckets.map((s) => Math.max(0, f(s) ?? 0)) : [];
|
|
152
|
-
if (n === null == (o === null) && !(n !== null && o !== null && n > o) && !(r.length > 0 && !(u > 0)))
|
|
153
|
-
return { kind: w, min: n, max: o, emptyRows: i, bucketing: c, buckets: r, bucketWidth: u };
|
|
154
|
-
}
|
|
155
|
-
function k(t) {
|
|
156
|
-
return t.buckets.reduce((e, n) => e + n, 0);
|
|
157
|
-
}
|
|
158
|
-
function U(t, e) {
|
|
159
|
-
const n = t.min ?? 0;
|
|
160
|
-
return { from: n + e * t.bucketWidth, to: n + (e + 1) * t.bucketWidth };
|
|
161
|
-
}
|
|
162
|
-
function a(t, e, n) {
|
|
163
|
-
const o = k(t);
|
|
164
|
-
if (t.min === null || t.max === null || t.buckets.length === 0)
|
|
165
|
-
return t.min === null ? { rows: 0, exact: !0 } : { rows: (n ? e >= t.min : e > t.min) ? o : 0, exact: !0 };
|
|
166
|
-
if (t.bucketing === "value") {
|
|
167
|
-
let s = 0;
|
|
168
|
-
return t.buckets.forEach((l, d) => {
|
|
169
|
-
const m = t.min + d;
|
|
170
|
-
(n ? m <= e : m < e) && (s += l);
|
|
171
|
-
}), { rows: s, exact: !0 };
|
|
172
|
-
}
|
|
173
|
-
if (e <= t.min) return { rows: 0, exact: !(n && e === t.min) };
|
|
174
|
-
if (e >= t.max) return { rows: o, exact: n || e > t.max };
|
|
175
|
-
const i = (e - t.min) / t.bucketWidth, c = Math.floor(i);
|
|
176
|
-
let u = 0;
|
|
177
|
-
for (let s = 0; s < c; s += 1) u += t.buckets[s] ?? 0;
|
|
178
|
-
const r = i - c;
|
|
179
|
-
return u += (t.buckets[c] ?? 0) * r, { rows: u, exact: r === 0 && !n };
|
|
180
|
-
}
|
|
181
|
-
function j(t, e, n) {
|
|
182
|
-
const o = k(t), i = (r, ...s) => ({
|
|
183
|
-
rows: Math.round(Math.max(0, Math.min(o, r))),
|
|
184
|
-
exact: s.every(Boolean)
|
|
185
|
-
}), [c, u] = n;
|
|
186
|
-
switch (e) {
|
|
187
|
-
case "is null":
|
|
188
|
-
return { rows: t.emptyRows, exact: !0 };
|
|
189
|
-
case "is not null":
|
|
190
|
-
return { rows: o, exact: !0 };
|
|
191
|
-
case ">=": {
|
|
192
|
-
const r = a(t, c, !1);
|
|
193
|
-
return i(o - r.rows, r.exact);
|
|
194
|
-
}
|
|
195
|
-
case ">": {
|
|
196
|
-
const r = a(t, c, !0);
|
|
197
|
-
return i(o - r.rows, r.exact);
|
|
198
|
-
}
|
|
199
|
-
case "<=": {
|
|
200
|
-
const r = a(t, c, !0);
|
|
201
|
-
return i(r.rows, r.exact);
|
|
202
|
-
}
|
|
203
|
-
case "<": {
|
|
204
|
-
const r = a(t, c, !1);
|
|
205
|
-
return i(r.rows, r.exact);
|
|
206
|
-
}
|
|
207
|
-
case "between":
|
|
208
|
-
case "not between": {
|
|
209
|
-
const r = a(t, u, !0), s = a(t, c, !1), l = r.rows - s.rows;
|
|
210
|
-
return i(e === "between" ? l : o - l, r.exact, s.exact);
|
|
211
|
-
}
|
|
212
|
-
case "=":
|
|
213
|
-
case "!=": {
|
|
214
|
-
if (t.bucketing !== "value" && t.buckets.length > 0) return null;
|
|
215
|
-
const r = a(t, c, !0).rows - a(t, c, !1).rows;
|
|
216
|
-
return i(e === "=" ? r : o - r, !0);
|
|
217
|
-
}
|
|
218
|
-
default:
|
|
219
|
-
return null;
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
function C(t, e) {
|
|
223
|
-
var o;
|
|
224
|
-
if (e === null) return !0;
|
|
225
|
-
if (e.overrides.length === 0) return t.length <= e.depth;
|
|
226
|
-
const n = p(t);
|
|
227
|
-
return ((o = e.overrides.find((i) => i.path.length === t.length && p(i.path) === n)) == null ? void 0 : o.expanded) ?? t.length <= e.depth;
|
|
228
|
-
}
|
|
229
|
-
function W(t) {
|
|
230
|
-
var b;
|
|
231
|
-
const { path: e, levelCount: n, expansion: o, total: i, axis: c } = t, u = e.length >= n || ((b = e[e.length - 1]) == null ? void 0 : b.member.kind) === "others", r = !u && !t.childrenEmpty, s = r && C(e, o), l = c === "rows" && t.rowLayout !== "tabular", d = s && !!t.skipRedundant && !!t.singleChild, m = !!(i != null && i.visible) && !d;
|
|
232
|
-
return {
|
|
233
|
-
expandable: r,
|
|
234
|
-
expanded: s,
|
|
235
|
-
memberVisible: l || !s,
|
|
236
|
-
valueVisible: u || m && (!s || i.position === "before"),
|
|
237
|
-
subtotalBefore: !l && s && m && i.position === "before",
|
|
238
|
-
subtotalAfter: s && m && i.position === "after"
|
|
239
|
-
};
|
|
240
|
-
}
|
|
241
|
-
export {
|
|
242
|
-
E as N,
|
|
243
|
-
y as a,
|
|
244
|
-
M as b,
|
|
245
|
-
B as c,
|
|
246
|
-
w as d,
|
|
247
|
-
F as e,
|
|
248
|
-
k as f,
|
|
249
|
-
U as g,
|
|
250
|
-
j as h,
|
|
251
|
-
I as i,
|
|
252
|
-
C as j,
|
|
253
|
-
W as k,
|
|
254
|
-
_ as n,
|
|
255
|
-
R as p,
|
|
256
|
-
V as r,
|
|
257
|
-
O as t
|
|
258
|
-
};
|