react-semaphor 0.1.525 → 0.1.527
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/DATA_APP_SDK.md +5 -1
- package/dist/analytics-protocol/index.js +1179 -296
- package/dist/brand-studio/index.js +31 -31
- package/dist/briefings/index.js +50 -49
- package/dist/chunks/{calculated-field-identity-Dy_WpDdo.js → calculated-field-identity-DEhjPSr-.js} +77 -76
- package/dist/chunks/{card-config-utils-CAyjC5Tp.js → card-config-utils-BlIbwkuD.js} +62 -59
- package/dist/chunks/{constants-DeLIHVAW.js → constants-DNWVy8Y3.js} +4 -4
- package/dist/chunks/dashboard-JNHR0_cZ.js +14 -0
- package/dist/chunks/{dashboard-briefing-launcher-BilVIEyw.js → dashboard-briefing-launcher-D9pFByPh.js} +274 -267
- package/dist/chunks/{dashboard-controls-DyLPcvCK.js → dashboard-controls-CJI5ZWMq.js} +740 -692
- package/dist/chunks/dashboard-json-DLdrFry-.js +65 -0
- package/dist/chunks/{edit-dashboard-visual-DtmKNNdE.js → edit-dashboard-visual-D5LjWle1.js} +6760 -6728
- package/dist/chunks/editor-action-buttons-G91NQKxU.js +2070 -0
- package/dist/chunks/{field-aggregations-BQjogiI1.js → field-aggregations-DeVQLIsP.js} +19 -19
- package/dist/chunks/{field-dependencies-v-lJNzC7.js → field-dependencies-CGYic38w.js} +1 -1
- package/dist/chunks/{index-ON7Gpvcv.js → index-BvJOYbNv.js} +760 -750
- package/dist/chunks/{matrix-analytical-definition-BimC4XIV.js → matrix-analytical-definition-BJyH5-99.js} +1 -1
- package/dist/chunks/{matrix-card-CIlz0Dnp.js → matrix-card-DY45yiUM.js} +7 -6
- package/dist/chunks/{matrix-control-sources-B1K7x0SL.js → matrix-control-sources-BypfLZsK.js} +36 -36
- package/dist/chunks/{matrix-definition-E5gXXSTZ.js → matrix-definition-Cdn3LoxW.js} +3 -3
- package/dist/chunks/{semantic-format-Baqp8kD_.js → matrix-formatter-BoKU3MzZ.js} +655 -511
- package/dist/chunks/{matrix-member-presentation-Bw7-JCrr.js → matrix-member-presentation-BBW0n1iY.js} +1 -1
- package/dist/chunks/matrix-operation-contract-BV02rLhu.js +809 -0
- package/dist/chunks/{metric-comparison-BphoJ9bq.js → metric-comparison-Crljx_XY.js} +15 -10
- package/dist/chunks/{numeric-presentation-VhMUHfrJ.js → numeric-presentation-LvnNY5Ma.js} +68 -68
- package/dist/chunks/pivot-header-presentation-D5v8uyjj.js +618 -0
- package/dist/chunks/{pivot-result-identity-BzUQiCEV.js → pivot-result-identity-CY__BuwI.js} +1 -1
- package/dist/chunks/{pivot-result-lifecycle-BFO354lk.js → pivot-result-lifecycle-BWrPhlGT.js} +259 -204
- package/dist/chunks/{raw-temporal-7bFbXd2a.js → raw-temporal-CdnA_OXJ.js} +10 -10
- package/dist/chunks/{raw-temporal-contract-BQZIJ1fn.js → raw-temporal-contract-Bc9z83t-.js} +1 -1
- package/dist/chunks/relative-date-DAF9J7mt.js +456 -0
- package/dist/chunks/report-preferences-dialog-D3hxu4sE.js +1231 -0
- package/dist/chunks/{report-runtime-context-CxIoGyNM.js → report-runtime-context-CtaGGlit.js} +1 -1
- package/dist/chunks/{selection-reducer-CvCBQbl2.js → selection-reducer-C7Um5XN-.js} +3 -3
- package/dist/chunks/semantic-format-BjBMOSoo.js +192 -0
- package/dist/chunks/{index-DYOaHuLS.js → semaphor-ready-indicator-D46I_4g7.js} +145070 -146854
- package/dist/chunks/slider-B6LELqx6.js +876 -0
- package/dist/chunks/{source-entity-resolution-Bzefiive.js → source-entity-resolution-Bde29mqE.js} +25 -25
- package/dist/chunks/{switch-CWPcwAZ4.js → switch-_7uBAbYx.js} +7950 -8545
- package/dist/chunks/{temporal-bucket-PcLFSYWX.js → temporal-bucket-DlFuhCnT.js} +6 -6
- package/dist/chunks/{temporal-bucket-contract-DTLDRzgV.js → temporal-bucket-contract-C6lUGPS3.js} +1 -1
- package/dist/chunks/temporal-input-presentation-DyMWCZYh.js +195 -0
- package/dist/chunks/{token-types-BC6RcUY8.js → token-types-UjyNz95-.js} +1 -1
- package/dist/chunks/{validators-CsdOtZI6.js → validators-CQcG0EPN.js} +852 -731
- package/dist/chunks/zoned-wall-clock-BkxV9jS2.js +46 -0
- package/dist/dashboard/index.js +1 -1
- package/dist/dashboard-authoring/index.js +138 -137
- package/dist/data-app-sdk/index.js +30 -29
- package/dist/data-app-sdk-adapters/index.js +23 -22
- package/dist/data-app-sdk-validation/index.js +27 -26
- package/dist/format-utils/index.js +247 -329
- package/dist/index.js +435 -246
- package/dist/report-runtime-context/index.js +2 -2
- package/dist/style.css +1 -1
- package/dist/surfboard/index.js +4 -5
- package/dist/types/briefings/index.d.ts +3 -0
- package/dist/types/components/dashboard/dashboard-container.d.ts +1 -1
- package/dist/types/components/dashboard/sheet/layout-change-guard.d.ts +1 -1
- package/dist/types/components/dashboard/sheet/sheet-layout.d.ts +1 -1
- package/dist/types/components/editor/editor-main/text-card.d.ts +1 -1
- package/dist/types/components/editor/editor.d.ts +1 -1
- package/dist/types/components/explorer/filters/card-date-filter.d.ts +13 -5
- package/dist/types/components/explorer/filters/card-date-selection.d.ts +28 -0
- package/dist/types/components/providers/semaphor-context-provider.d.ts +1 -1
- package/dist/types/components/providers/theme-provider-context.d.ts +1 -1
- package/dist/types/components/providers/theme-provider.d.ts +1 -1
- package/dist/types/components/shared/unsaved-changes/use-pristine-snapshot-initializer.d.ts +1 -1
- package/dist/types/components/sharing-and-management/dashboard-actions-menu.d.ts +1 -1
- package/dist/types/components/sharing-and-management/hooks/use-resource-management.d.ts +0 -1
- package/dist/types/components/surfboard/dashboard-plus.d.ts +1 -1
- package/dist/types/components/surfboard/download-settings-dialog.d.ts +8 -0
- package/dist/types/components/surfboard/filter/types.d.ts +8 -29
- package/dist/types/components/surfboard/filter/use-dashboard-filter-mapping-popover.d.ts +5 -1
- package/dist/types/components/ui-custom/date-range-picker.d.ts +18 -2
- package/dist/types/components/ui-custom/date-range-presets.d.ts +8 -21
- package/dist/types/components/ui-custom/report-calendar.d.ts +18 -0
- package/dist/types/components/visual/aggregated-table/utils/export-utils.d.ts +3 -5
- package/dist/types/components/visual/column-display-utils.d.ts +1 -1
- package/dist/types/components/visual/data-table/data-table-toolbar.d.ts +1 -1
- package/dist/types/components/visual/kpi-visual/kpi-utils.d.ts +1 -1
- package/dist/types/components/visual/pivot-table/utils/pivot-table-export-utils.d.ts +3 -1
- package/dist/types/components/visual/settings/color-format.d.ts +1 -1
- package/dist/types/components/visual/visual-utils.d.ts +1 -1
- package/dist/types/index.js +5 -5
- package/dist/types/lib/actions/data-point-click-action.d.ts +2 -1
- package/dist/types/lib/api/exports-api.d.ts +3 -0
- package/dist/types/lib/csv-download.d.ts +9 -0
- package/dist/types/lib/csv-encoding-options.d.ts +6 -0
- package/dist/types/lib/dashboard/normalize-dashboard-for-dirty-check.d.ts +1 -1
- package/dist/types/lib/dashboard-inputs/dashboard-filter-mapping-storage-transition.d.ts +2 -1
- package/dist/types/lib/dashboard-navigation/build-carried-click-context.d.ts +0 -1
- package/dist/types/lib/document/document-input-runtime.d.ts +2 -1
- package/dist/types/lib/export-utils.d.ts +17 -15
- package/dist/types/lib/hooks/explorer/use-filter-builder.d.ts +2 -2
- package/dist/types/lib/hooks/explorer/use-schemas.d.ts +1 -1
- package/dist/types/lib/hooks/use-dashboard.d.ts +2 -2
- package/dist/types/lib/hooks/use-relative-date-summarizer.d.ts +7 -0
- package/dist/types/lib/interactions/get-click-context-from-chartjs.d.ts +1 -2
- package/dist/types/lib/matrix-table/matrix-application-adapter.d.ts +3 -2
- package/dist/types/lib/matrix-table/matrix-card-adapter.d.ts +1 -1
- package/dist/types/lib/matrix-table/matrix-card-draft.d.ts +1 -1
- package/dist/types/lib/matrix-table/matrix-dataset-history.d.ts +47 -0
- package/dist/types/lib/matrix-table/matrix-delivery.d.ts +7 -3
- package/dist/types/lib/matrix-table/matrix-execution-context.d.ts +2 -0
- package/dist/types/lib/matrix-table/matrix-query-transport.d.ts +4 -1
- package/dist/types/lib/matrix-table/matrix-runtime-types.d.ts +105 -4
- package/dist/types/lib/matrix-table/matrix-runtime.d.ts +43 -2
- package/dist/types/lib/matrix-table/use-matrix.d.ts +6 -0
- package/dist/types/lib/query-context/build-card-query-context.d.ts +5 -1
- package/dist/types/lib/query-context/build-dashboard-card-query-contract.d.ts +0 -1
- package/dist/types/lib/query-context/build-global-date-comparison-context.d.ts +1 -2
- package/dist/types/lib/query-context/compile-dashboard-card-filters.d.ts +1 -2
- package/dist/types/lib/query-context/dashboard-card-query-key.d.ts +10 -0
- package/dist/types/lib/query-context/query-auth-scope.d.ts +5 -0
- package/dist/types/lib/stores/dashboard-store.d.ts +9 -4
- package/dist/types/lib/stores/editor-store.d.ts +1 -2
- package/dist/types/lib/stores/table-actions.d.ts +2 -1
- package/dist/types/lib/temporal-filter/temporal-filter-utils.d.ts +9 -2
- package/dist/types/lib/types/common-types.d.ts +5 -0
- package/dist/types/lib/types/explorer-types.d.ts +14 -0
- package/dist/types/lib/types/token-types.d.ts +0 -13
- package/dist/types/lib/utils/card-definition.d.ts +1 -1
- package/dist/types/lib/utils/date-timezone-utils.d.ts +4 -46
- package/dist/types/lib/utils/filter-default-value-utils.d.ts +8 -2
- package/dist/types/lib/utils/inline-filter-utils.d.ts +3 -2
- package/dist/types/lib/utils/relative-date-description.d.ts +38 -0
- package/dist/types/lib/utils.d.ts +0 -2
- package/dist/types/shared/analytics-protocol/contracts.d.ts +10 -7
- package/dist/types/shared/analytics-protocol/index.d.ts +12 -1
- package/dist/types/shared/analytics-protocol/matrix-definition-contract.d.ts +20 -20
- package/dist/types/shared/analytics-protocol/matrix-operation-contract.d.ts +10 -10
- package/dist/types/shared/analytics-protocol/matrix-operation-request.d.ts +8 -8
- package/dist/types/shared/analytics-protocol/matrix-window-contract.d.ts +51 -5
- package/dist/types/shared/analytics-protocol/metric-comparison.d.ts +9 -3
- package/dist/types/shared/analytics-protocol/operation-temporal-state.d.ts +64 -0
- package/dist/types/shared/analytics-protocol/relative-date-filter.d.ts +61 -0
- package/dist/types/shared/analytics-protocol/relative-date-label.d.ts +20 -0
- package/dist/types/shared/analytics-protocol/runtime-schemas.d.ts +0 -2
- package/dist/types/shared/analytics-protocol/time-window-schema.d.ts +314 -0
- package/dist/types/shared/analytics-protocol/time-window.d.ts +13 -0
- package/dist/types/shared/dashboard-authoring/matrix-delivery.d.ts +8 -4
- package/dist/types/shared/format-utils/exporters/csv-utils.d.ts +46 -15
- package/dist/types/shared/format-utils/exporters/index.d.ts +2 -3
- package/dist/types/shared/format-utils/flat-table-export-totals.d.ts +2 -1
- package/dist/types/shared/format-utils/matrix-export-presentation.d.ts +2 -2
- package/dist/types/shared/format-utils/types/format-types.d.ts +0 -42
- package/dist/types/shared/temporal/calendar-periods.d.ts +56 -0
- package/dist/types/shared/temporal/index.d.ts +5 -0
- package/dist/types/shared/temporal/relative-date.d.ts +21 -0
- package/dist/types/shared/temporal/temporal-parity-fixtures.d.ts +73 -0
- package/dist/types/shared/temporal/time-window-periods.d.ts +21 -0
- package/dist/types/shared/temporal/zoned-wall-clock.d.ts +23 -0
- package/package.json +2 -17
- package/src/data-app-sdk/README.md +6 -3
- package/dist/chunks/dashboard-date-comparison-definition-BqNhECUr.js +0 -183
- package/dist/chunks/dashboard-json-QEoU-mx4.js +0 -75
- package/dist/chunks/editor-action-buttons-B9VRW3Bh.js +0 -2019
- package/dist/chunks/matrix-formatter-WBgtebUT.js +0 -341
- package/dist/chunks/matrix-operation-contract-D32U2CSw.js +0 -1802
- package/dist/chunks/mouse-pointer-2-BZvGk45-.js +0 -19
- package/dist/chunks/pivot-header-presentation-CGtudHo7.js +0 -661
- package/dist/chunks/report-preferences-dialog-BLaFmlE2.js +0 -723
- package/dist/chunks/temporal-input-presentation-2RJrvmYL.js +0 -222
- package/dist/chunks/update-policy-DhAUtiC8.js +0 -913
- package/dist/data-app-builder/index.js +0 -3666
- package/dist/data-app-builder-browser-runtime/index.js +0 -8
- package/dist/data-app-codegen/index.js +0 -22
- package/dist/data-app-codegen-node/index.js +0 -1807
- package/dist/types/components/data-app-runtime/published-data-app-runtime.d.ts +0 -7
- package/dist/types/components/surfboard/json-to-csv.d.ts +0 -7
- package/dist/types/components/visual/data-table/utils/export-utils.d.ts +0 -31
- package/dist/types/data-app-builder/browser-runtime.d.ts +0 -174
- package/dist/types/data-app-builder/constants.d.ts +0 -14
- package/dist/types/data-app-builder/data-app-builder.d.ts +0 -14
- package/dist/types/data-app-builder/index.d.ts +0 -1
- package/dist/types/data-app-builder/lib/api.d.ts +0 -36
- package/dist/types/data-app-builder/lib/context-select.d.ts +0 -3
- package/dist/types/data-app-builder/lib/diagnostics.d.ts +0 -12
- package/dist/types/data-app-builder/lib/file-tree.d.ts +0 -2
- package/dist/types/data-app-builder/types.d.ts +0 -558
- package/dist/types/data-app-builder-browser-runtime.d.ts +0 -2
- package/dist/types/data-app-builder.d.ts +0 -2
- package/dist/types/data-app-codegen/generate-contract.d.ts +0 -26
- package/dist/types/data-app-codegen/generated-contract-files.d.ts +0 -7
- package/dist/types/data-app-codegen/generated-contract-validation.d.ts +0 -13
- package/dist/types/data-app-codegen/index.d.ts +0 -6
- package/dist/types/data-app-codegen/live-execution.d.ts +0 -42
- package/dist/types/data-app-codegen/node.d.ts +0 -2
- package/dist/types/data-app-codegen/update-policy.d.ts +0 -25
- package/dist/types/data-app-codegen/validation.d.ts +0 -8
- package/dist/types/data-app-codegen-node.d.ts +0 -2
- package/dist/types/data-app-codegen.d.ts +0 -2
- package/dist/types/lib/encrypt-utils.d.ts +0 -9
- package/dist/types/shared/analytics-protocol/data-app-codegen-summary.d.ts +0 -418
- package/dist/types/shared/format-utils/exporters/pivot-exporter.d.ts +0 -13
- package/dist/types/shared/format-utils/exporters/table-exporter.d.ts +0 -10
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { r as a, t as s, u as f } from "./validators-
|
|
2
|
-
import "./matrix-operation-contract-
|
|
1
|
+
import { r as a, t as s, u as f } from "./validators-CQcG0EPN.js";
|
|
2
|
+
import "./matrix-operation-contract-BV02rLhu.js";
|
|
3
|
+
import "zod";
|
|
3
4
|
function u(i, r = {}) {
|
|
4
5
|
var n, o;
|
|
5
6
|
if (i.type !== "matrixTable" || !i.config || typeof i.config != "object" || !("matrix" in i.config)) return { status: "absent" };
|
|
@@ -9,7 +10,7 @@ function u(i, r = {}) {
|
|
|
9
10
|
const t = (r.authoringDraft ? a : s).safeParse(i.config.matrix);
|
|
10
11
|
return t.success ? { status: "ready", config: t.data } : { status: "invalid", error: t.error };
|
|
11
12
|
}
|
|
12
|
-
function
|
|
13
|
+
function l(i) {
|
|
13
14
|
const r = u(i);
|
|
14
15
|
if (r.status === "invalid") throw r.error;
|
|
15
16
|
return r.status === "ready" ? r.config : void 0;
|
|
@@ -22,15 +23,15 @@ function c(i) {
|
|
|
22
23
|
t.kind === "aggregate" ? e(t.field) : Object.values(t.definition.inputs).forEach((n) => e(n.field));
|
|
23
24
|
}), r;
|
|
24
25
|
}
|
|
25
|
-
function
|
|
26
|
+
function x(i) {
|
|
26
27
|
return f([
|
|
27
28
|
i.source,
|
|
28
29
|
...c(i).map((r) => r.source ?? i.source)
|
|
29
30
|
]);
|
|
30
31
|
}
|
|
31
32
|
export {
|
|
32
|
-
|
|
33
|
+
x as a,
|
|
33
34
|
u as i,
|
|
34
35
|
c as m,
|
|
35
|
-
|
|
36
|
+
l as r
|
|
36
37
|
};
|
package/dist/chunks/{matrix-control-sources-B1K7x0SL.js → matrix-control-sources-BypfLZsK.js}
RENAMED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
var te = Object.defineProperty;
|
|
2
2
|
var re = (e, t, o) => t in e ? te(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o;
|
|
3
3
|
var x = (e, t, o) => re(e, typeof t != "symbol" ? t + "" : t, o);
|
|
4
|
-
import { h as oe, f as ne,
|
|
4
|
+
import { h as oe, f as ne, aa as ie, a0 as ae, G, a1 as se, az as P, F as ce, u as j, ai as le } from "./validators-CQcG0EPN.js";
|
|
5
5
|
import { C as A } from "./common-types-C6cAQgyh.js";
|
|
6
|
-
import "./matrix-operation-contract-
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { a as H } from "./matrix-card-
|
|
11
|
-
import { m as Y, a as Z } from "./constants-
|
|
6
|
+
import "./matrix-operation-contract-BV02rLhu.js";
|
|
7
|
+
import { ZodError as de } from "zod";
|
|
8
|
+
import { u as ue, x as ge } from "./calculated-field-identity-DEhjPSr-.js";
|
|
9
|
+
import { B as fe } from "./field-aggregations-DeVQLIsP.js";
|
|
10
|
+
import { a as H } from "./matrix-card-DY45yiUM.js";
|
|
11
|
+
import { m as Y, a as Z } from "./constants-DNWVy8Y3.js";
|
|
12
12
|
function me(e, t) {
|
|
13
13
|
const r = Ne(e);
|
|
14
14
|
let i;
|
|
@@ -76,7 +76,7 @@ function Te(e, t) {
|
|
|
76
76
|
if (!o) return /* @__PURE__ */ new Date(NaN);
|
|
77
77
|
const r = !!o[4], i = R(o[1]), a = R(o[2]) - 1, d = R(o[3]), u = R(o[4]), g = R(o[5]) - 1;
|
|
78
78
|
if (r)
|
|
79
|
-
return Re(t, u, g) ?
|
|
79
|
+
return Re(t, u, g) ? Ce(t, u, g) : /* @__PURE__ */ new Date(NaN);
|
|
80
80
|
{
|
|
81
81
|
const O = /* @__PURE__ */ new Date(0);
|
|
82
82
|
return !we(t, a, d) || !Ee(t, i) ? /* @__PURE__ */ new Date(NaN) : (O.setUTCFullYear(t, a, Math.max(i, d)), O);
|
|
@@ -101,18 +101,18 @@ function he(e) {
|
|
|
101
101
|
const o = t[1] === "+" ? -1 : 1, r = parseInt(t[2]), i = t[3] && parseInt(t[3]) || 0;
|
|
102
102
|
return Ae(r, i) ? o * (r * Y + i * Z) : NaN;
|
|
103
103
|
}
|
|
104
|
-
function
|
|
104
|
+
function Ce(e, t, o) {
|
|
105
105
|
const r = /* @__PURE__ */ new Date(0);
|
|
106
106
|
r.setUTCFullYear(e, 0, 4);
|
|
107
107
|
const i = r.getUTCDay() || 7, a = (t - 1) * 7 + o + 1 - i;
|
|
108
108
|
return r.setUTCDate(r.getUTCDate() + a), r;
|
|
109
109
|
}
|
|
110
|
-
const
|
|
110
|
+
const ye = [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
|
111
111
|
function W(e) {
|
|
112
112
|
return e % 400 === 0 || e % 4 === 0 && e % 100 !== 0;
|
|
113
113
|
}
|
|
114
114
|
function we(e, t, o) {
|
|
115
|
-
return t >= 0 && t <= 11 && o >= 1 && o <= (
|
|
115
|
+
return t >= 0 && t <= 11 && o >= 1 && o <= (ye[t] || (W(e) ? 29 : 28));
|
|
116
116
|
}
|
|
117
117
|
function Ee(e, t) {
|
|
118
118
|
return t >= 1 && t <= (W(e) ? 366 : 365);
|
|
@@ -166,7 +166,7 @@ function ot(e, t, o) {
|
|
|
166
166
|
function nt(e, t) {
|
|
167
167
|
return `${e}-${t}`;
|
|
168
168
|
}
|
|
169
|
-
const it = "CONTROL_PLACEHOLDER_QUOTED", xe = "CONTROL_REFERENCE_MISSING", Le = "CONTROL_VALUE_MISSING", at = "CONTROL_VALUE_INVALID", st = "CONTROL_CONTEXT_UNSUPPORTED",
|
|
169
|
+
const it = "CONTROL_PLACEHOLDER_QUOTED", xe = "CONTROL_REFERENCE_MISSING", Le = "CONTROL_VALUE_MISSING", at = "CONTROL_VALUE_INVALID", st = "CONTROL_CONTEXT_UNSUPPORTED", Ve = "CONTROL_DEFINITION_DUPLICATE", ve = "CONTROL_DEFINITION_INVALID", V = "CONTROL_BINDING_MAPPING_MISSING", Me = "CONTROL_BINDING_TARGET_INVALID", q = "CONTROL_BINDING_VALUE_INVALID";
|
|
170
170
|
class I extends Error {
|
|
171
171
|
constructor(o, r) {
|
|
172
172
|
super(o);
|
|
@@ -182,14 +182,14 @@ function X(e, t) {
|
|
|
182
182
|
throw new I(
|
|
183
183
|
"Malformed control definition was provided for query execution.",
|
|
184
184
|
{
|
|
185
|
-
code:
|
|
185
|
+
code: ve
|
|
186
186
|
}
|
|
187
187
|
);
|
|
188
188
|
if (o.get(r.id))
|
|
189
189
|
throw new I(
|
|
190
190
|
`Duplicate control definition '${r.id}' was provided for query execution.`,
|
|
191
191
|
{
|
|
192
|
-
code:
|
|
192
|
+
code: Ve,
|
|
193
193
|
controlId: r.id
|
|
194
194
|
}
|
|
195
195
|
);
|
|
@@ -357,7 +357,7 @@ function z(e) {
|
|
|
357
357
|
throw new I(
|
|
358
358
|
`Binding for control '${e.binding.controlId}' does not map value '${e.selectedValue}'.`,
|
|
359
359
|
{
|
|
360
|
-
code:
|
|
360
|
+
code: V,
|
|
361
361
|
controlId: e.binding.controlId
|
|
362
362
|
}
|
|
363
363
|
);
|
|
@@ -369,7 +369,7 @@ function Ge(e) {
|
|
|
369
369
|
throw new I(
|
|
370
370
|
`Binding for control '${e.binding.controlId}' does not map value '${e.selectedValue}' to a valid group-by field.`,
|
|
371
371
|
{
|
|
372
|
-
code:
|
|
372
|
+
code: V,
|
|
373
373
|
controlId: e.binding.controlId
|
|
374
374
|
}
|
|
375
375
|
);
|
|
@@ -381,7 +381,7 @@ function Pe(e) {
|
|
|
381
381
|
throw new I(
|
|
382
382
|
`Binding for control '${e.binding.controlId}' does not map value '${e.selectedValue}' to a valid metric field.`,
|
|
383
383
|
{
|
|
384
|
-
code:
|
|
384
|
+
code: V,
|
|
385
385
|
controlId: e.binding.controlId
|
|
386
386
|
}
|
|
387
387
|
);
|
|
@@ -495,7 +495,7 @@ function lt(e) {
|
|
|
495
495
|
c.set(l.id, [...f, l]);
|
|
496
496
|
}
|
|
497
497
|
return g = { refs: n, byId: c }, g;
|
|
498
|
-
},
|
|
498
|
+
}, y = (n, c) => {
|
|
499
499
|
throw new I(n, {
|
|
500
500
|
code: Me,
|
|
501
501
|
...c ? { controlId: c } : {}
|
|
@@ -504,12 +504,12 @@ function lt(e) {
|
|
|
504
504
|
var f;
|
|
505
505
|
if (n.derivedField) return n.derivedField.dataType;
|
|
506
506
|
const l = O().refs.filter((h) => h.field.name === n.name && G(h.field.source ?? e.spec.source, n.source ?? e.spec.source));
|
|
507
|
-
return l.length > 1 ?
|
|
508
|
-
},
|
|
509
|
-
if (!D.success) return
|
|
507
|
+
return l.length > 1 ? y("The selected field is ambiguous in the authorized Matrix field catalog.", c) : ce(((f = l[0]) == null ? void 0 : f.field.dataType) ?? n.dataType);
|
|
508
|
+
}, v = (n, c) => ue(n, c.target, (l) => S(l, c.controlId)), D = ie.safeParse(t);
|
|
509
|
+
if (!D.success) return y(D.error.message);
|
|
510
510
|
t = D.data;
|
|
511
511
|
const K = [...i, ...a].map((n) => {
|
|
512
|
-
const c = Q({ binding: n, definitions: o, controlValues: e.controlValues }), l = !n.matrixTargetId && c !== void 0 && c !== A ?
|
|
512
|
+
const c = Q({ binding: n, definitions: o, controlValues: e.controlValues }), l = !n.matrixTargetId && c !== void 0 && c !== A ? v(D.data, n) : [];
|
|
513
513
|
return {
|
|
514
514
|
binding: n,
|
|
515
515
|
selectedValue: c,
|
|
@@ -519,7 +519,7 @@ function lt(e) {
|
|
|
519
519
|
for (const { binding: n, targetId: c, selectedValue: l } of K) {
|
|
520
520
|
if (l === void 0 || l === A)
|
|
521
521
|
continue;
|
|
522
|
-
const f = (s) =>
|
|
522
|
+
const f = (s) => y(s, n.controlId), h = n.target === "config_metric_selector" || n.target === "config_aggregation", ee = v(t, n);
|
|
523
523
|
(!c || !ee.some((s) => s.id === c)) && f("Choose a valid Matrix level or measure target for this control.");
|
|
524
524
|
const M = `${n.target}:${c}`;
|
|
525
525
|
d.has(M) && f("Multiple controls cannot replace the same Matrix target."), d.add(M);
|
|
@@ -528,13 +528,13 @@ function lt(e) {
|
|
|
528
528
|
if (m.length !== 1) return f(m.length ? "The selected field is ambiguous in the authorized Matrix field catalog." : "The selected field is not in the authorized Matrix field catalog.");
|
|
529
529
|
const N = se.safeParse(m[0].field);
|
|
530
530
|
return N.success ? N.data : f(N.error.message);
|
|
531
|
-
}, w = n.target === "config_metric_selector" || n.target === "config_field_selector" ? n.mapping[l] : void 0,
|
|
531
|
+
}, w = n.target === "config_metric_selector" || n.target === "config_field_selector" ? n.mapping[l] : void 0, C = w && typeof w == "object" && "kind" in w && w.kind === "matrix_instance" ? w.id : void 0;
|
|
532
532
|
if (h) {
|
|
533
533
|
u.set(c, n.controlId);
|
|
534
|
-
const s =
|
|
535
|
-
(p) => p.id ===
|
|
534
|
+
const s = C === void 0 ? void 0 : D.data.measures.find(
|
|
535
|
+
(p) => p.id === C && p.kind === "aggregate"
|
|
536
536
|
);
|
|
537
|
-
|
|
537
|
+
C !== void 0 && !s && f("The selected Matrix aggregate measure is no longer available.");
|
|
538
538
|
const m = n.target === "config_metric_selector" && !s ? Pe({ binding: n, selectedValue: l }) : void 0, N = ((s == null ? void 0 : s.kind) === "aggregate" ? s.aggregate : m == null ? void 0 : m.aggregate) ?? (n.target === "config_aggregation" ? z({ binding: n, selectedValue: l }) : void 0), _ = N === void 0 ? void 0 : ae.safeParse(N);
|
|
539
539
|
_ && !_.success && f("This aggregation is not supported by Matrix."), t = {
|
|
540
540
|
...t,
|
|
@@ -548,10 +548,10 @@ function lt(e) {
|
|
|
548
548
|
)
|
|
549
549
|
};
|
|
550
550
|
} else {
|
|
551
|
-
const s =
|
|
552
|
-
(p) => p.id ===
|
|
551
|
+
const s = C === void 0 ? void 0 : [...D.data.rows, ...D.data.columns].find(
|
|
552
|
+
(p) => p.id === C
|
|
553
553
|
);
|
|
554
|
-
|
|
554
|
+
C !== void 0 && !s && f("The selected Matrix level is no longer available.");
|
|
555
555
|
const m = n.target === "config_field_selector" && !s ? Ge({ binding: n, selectedValue: l }) : void 0, N = n.target === "config_grain" ? z({ binding: n, selectedValue: l }) : s ? s.grain : m == null ? void 0 : m.granularity;
|
|
556
556
|
N !== void 0 && !je.has(N) && f("This time grain is not supported by Matrix.");
|
|
557
557
|
const _ = (p) => p.map((E) => {
|
|
@@ -570,12 +570,12 @@ function lt(e) {
|
|
|
570
570
|
const l = t.measures.find((h) => h.id === n);
|
|
571
571
|
if (!l || l.kind !== "aggregate") continue;
|
|
572
572
|
const f = S(l.field, c);
|
|
573
|
-
|
|
573
|
+
fe(f).some((h) => h.value === l.aggregate) || y(`Aggregation '${l.aggregate}' is not eligible for this Matrix field datatype.`, c);
|
|
574
574
|
}
|
|
575
575
|
try {
|
|
576
|
-
return
|
|
576
|
+
return ge(D.data, t);
|
|
577
577
|
} catch (n) {
|
|
578
|
-
if (n instanceof
|
|
578
|
+
if (n instanceof de) return y(n.message);
|
|
579
579
|
throw n;
|
|
580
580
|
}
|
|
581
581
|
}
|
|
@@ -615,9 +615,9 @@ export {
|
|
|
615
615
|
at as f,
|
|
616
616
|
nt as g,
|
|
617
617
|
st as h,
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
618
|
+
Ve as i,
|
|
619
|
+
ve as j,
|
|
620
|
+
V as k,
|
|
621
621
|
Me as l,
|
|
622
622
|
dt as m,
|
|
623
623
|
q as n,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
function
|
|
1
|
+
import { y as u, r as f, z as p, o as i, t as d } from "./validators-CQcG0EPN.js";
|
|
2
|
+
function x(e, t) {
|
|
3
3
|
return t.levelLabels[e.id] ?? e.field.label ?? e.field.name;
|
|
4
4
|
}
|
|
5
5
|
function v(e, t) {
|
|
@@ -81,7 +81,7 @@ export {
|
|
|
81
81
|
v as a,
|
|
82
82
|
g as b,
|
|
83
83
|
w as c,
|
|
84
|
-
|
|
84
|
+
x as g,
|
|
85
85
|
h as m,
|
|
86
86
|
M as r
|
|
87
87
|
};
|