react-semaphor 0.1.514 → 0.1.516
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.cjs +1 -1
- package/dist/analytics-protocol/index.js +226 -225
- package/dist/brand-studio/index.cjs +1 -1
- package/dist/brand-studio/index.js +4 -4
- package/dist/briefings/index.cjs +1 -1
- package/dist/briefings/index.js +8 -8
- package/dist/chunks/{calculated-field-identity-BiTGmnST.cjs → calculated-field-identity-5bg9oHTw.cjs} +1 -1
- package/dist/chunks/{calculated-field-identity-DnRd4YIY.js → calculated-field-identity-DzJBs2J8.js} +4 -4
- package/dist/chunks/{card-config-utils-B2cDWQqB.js → card-config-utils-Cxnq2R6z.js} +14 -14
- package/dist/chunks/{card-config-utils-CMO4_zVs.cjs → card-config-utils-z86y6tSq.cjs} +1 -1
- package/dist/chunks/column-bands-CU0byntA.cjs +1 -0
- package/dist/chunks/column-bands-RdM-kjDe.js +47 -0
- package/dist/chunks/{dashboard-briefing-launcher-e3s3MuSs.js → dashboard-briefing-launcher-BCEHJ_eD.js} +15 -12
- package/dist/chunks/{dashboard-briefing-launcher-BzPD50QD.cjs → dashboard-briefing-launcher-CjZ4aE34.cjs} +2 -2
- package/dist/chunks/{dashboard-controls-DAOABnks.js → dashboard-controls-DFfit5KH.js} +12 -12
- package/dist/chunks/{dashboard-controls-DQBfOqmC.cjs → dashboard-controls-f9aJ70Zu.cjs} +1 -1
- package/dist/chunks/{dashboard-date-comparison-definition-D7Bl-YAl.js → dashboard-date-comparison-definition-BqNhECUr.js} +6 -6
- package/dist/chunks/{dashboard-date-comparison-definition-C_w-GO_5.cjs → dashboard-date-comparison-definition-Y6JZwpcr.cjs} +1 -1
- package/dist/chunks/{dashboard-json-S5Eq2GAg.js → dashboard-json-DVtcA02f.js} +7 -7
- package/dist/chunks/{dashboard-json-1jZycd5h.cjs → dashboard-json-deqQC-UR.cjs} +1 -1
- package/dist/chunks/edit-dashboard-visual-DK6lSC_p.cjs +172 -0
- package/dist/chunks/{edit-dashboard-visual-Bkm0ciHG.js → edit-dashboard-visual-lJ6rDH3w.js} +4553 -4542
- package/dist/chunks/{editor-action-buttons-Bvv16QA-.js → editor-action-buttons-Bnxxa439.js} +7 -7
- package/dist/chunks/{editor-action-buttons-B2NCSsDw.cjs → editor-action-buttons-CmDaQbPN.cjs} +1 -1
- package/dist/chunks/{field-aggregations-CzuQKtqx.js → field-aggregations-Dl2A3rbV.js} +461 -358
- package/dist/chunks/field-aggregations-pH_3kymD.cjs +1 -0
- package/dist/chunks/{field-dependencies-DIab72rQ.cjs → field-dependencies-EB485TdB.cjs} +1 -1
- package/dist/chunks/{field-dependencies-DXW4jtvJ.js → field-dependencies-v-lJNzC7.js} +1 -1
- package/dist/chunks/{index-nhUr9xBz.js → index-BVVl2JDK.js} +57955 -54696
- package/dist/chunks/{index-CACdoqu3.js → index-C8w91oj4.js} +61 -51
- package/dist/chunks/index-Cw2ypaFl.cjs +1 -0
- package/dist/chunks/index-DfqMtR9S.cjs +4 -0
- package/dist/chunks/index-UNKSfi7s.cjs +1434 -0
- package/dist/chunks/{index-CnGVjyF8.js → index-ylOpKRDu.js} +877 -849
- package/dist/chunks/{matrix-analytical-definition-Ct5Tu8np.cjs → matrix-analytical-definition-BWd159lN.cjs} +1 -1
- package/dist/chunks/{matrix-analytical-definition-BDAK2aEi.js → matrix-analytical-definition-BimC4XIV.js} +1 -1
- package/dist/chunks/{matrix-card-U4c72doZ.cjs → matrix-card-C2RjEYZ8.cjs} +1 -1
- package/dist/chunks/{matrix-card-DOIeTmjh.js → matrix-card-CIlz0Dnp.js} +2 -2
- package/dist/chunks/{matrix-control-sources-FjxGIbqk.cjs → matrix-control-sources-BvEJF7d3.cjs} +1 -1
- package/dist/chunks/{matrix-control-sources-BxKH2yu2.js → matrix-control-sources-KbZe1gj_.js} +51 -51
- package/dist/chunks/{matrix-definition-CBJW_4ii.cjs → matrix-definition-DanUT11P.cjs} +1 -1
- package/dist/chunks/{matrix-definition-I9rHB9zN.js → matrix-definition-E5gXXSTZ.js} +1 -1
- package/dist/chunks/matrix-formatter-BJTO8ky9.cjs +1 -0
- package/dist/chunks/matrix-formatter-CCXNRt3s.js +341 -0
- package/dist/chunks/{matrix-member-presentation-DO1VSqfh.js → matrix-member-presentation-Bw7-JCrr.js} +64 -64
- package/dist/chunks/matrix-member-presentation-DvXDEo0U.cjs +1 -0
- package/dist/chunks/{matrix-operation-contract-DoiWTUbT.cjs → matrix-operation-contract-0RxoU_M3.cjs} +1 -1
- package/dist/chunks/{matrix-operation-contract-D0HfzwZg.js → matrix-operation-contract-D32U2CSw.js} +19 -19
- package/dist/chunks/{metric-comparison-Dqc7_tnW.js → metric-comparison-BphoJ9bq.js} +1 -1
- package/dist/chunks/{metric-comparison-DBQ3EJTz.cjs → metric-comparison-CUmltzpz.cjs} +1 -1
- package/dist/chunks/pivot-header-presentation-BSZhB1g-.js +661 -0
- package/dist/chunks/pivot-header-presentation-EoUS5ze5.cjs +5 -0
- package/dist/chunks/{pivot-result-identity-8M-bZrw9.js → pivot-result-identity-BzUQiCEV.js} +4 -4
- package/dist/chunks/{pivot-result-identity-uTiylUNr.cjs → pivot-result-identity-gquWljbd.cjs} +1 -1
- package/dist/chunks/pivot-result-lifecycle-gl9cBfB-.cjs +1 -0
- package/dist/chunks/{pivot-result-lifecycle-BeOpjAhg.js → pivot-result-lifecycle-kRhiJkzg.js} +208 -149
- package/dist/chunks/{raw-temporal-DrmCX9Wq.js → raw-temporal-BqOfk-xN.js} +471 -361
- package/dist/chunks/{raw-temporal-contract-CFLGwTiI.js → raw-temporal-contract-BQZIJ1fn.js} +1 -1
- package/dist/chunks/{raw-temporal-contract-DECbTuzA.cjs → raw-temporal-contract-CklMVG_1.cjs} +1 -1
- package/dist/chunks/raw-temporal-eJXecCyJ.cjs +1 -0
- package/dist/chunks/{report-preferences-dialog-B2fzQH1T.js → report-preferences-dialog-CHXPEl7v.js} +6 -6
- package/dist/chunks/{report-preferences-dialog-DcLkVqni.cjs → report-preferences-dialog-Cto0vDwI.cjs} +1 -1
- package/dist/chunks/{report-runtime-context-Cs65Mrxj.js → report-runtime-context-CxIoGyNM.js} +1 -1
- package/dist/chunks/{report-runtime-context-DzvHBPxl.cjs → report-runtime-context-CzSrCBsu.cjs} +1 -1
- package/dist/chunks/{selection-reducer-BIiQXbGM.js → selection-reducer-CvCBQbl2.js} +1 -1
- package/dist/chunks/{selection-reducer-CGKKsaPa.cjs → selection-reducer-Kl22OzIk.cjs} +1 -1
- package/dist/chunks/{semantic-format-BZxJLKvw.js → semantic-format-DwqGYx4V.js} +25 -31
- package/dist/chunks/semantic-format-mVI32OJH.cjs +1 -0
- package/dist/chunks/{source-entity-resolution-D7vnmDwm.js → source-entity-resolution-Bzefiive.js} +7 -7
- package/dist/chunks/{source-entity-resolution-CjbgnwyX.cjs → source-entity-resolution-R46X34SE.cjs} +1 -1
- package/dist/chunks/switch-DNbWXEOP.cjs +134 -0
- package/dist/chunks/{switch-QfKb0Iwe.js → switch-DNv-hVmt.js} +8260 -7659
- package/dist/chunks/{temporal-bucket-B9hMwemw.js → temporal-bucket-DlFuhCnT.js} +6 -6
- package/dist/chunks/{temporal-bucket-contract-IWDgyTMw.js → temporal-bucket-contract-DTLDRzgV.js} +1 -1
- package/dist/chunks/{temporal-bucket-contract-ZctiyXYk.cjs → temporal-bucket-contract-nTv6gvX5.cjs} +1 -1
- package/dist/chunks/{token-types-Dl0hcKBX.js → token-types-BC6RcUY8.js} +1 -1
- package/dist/chunks/{token-types-Ahh5u4iT.cjs → token-types-aWrzwonf.cjs} +1 -1
- package/dist/chunks/{update-policy-COjFudhl.cjs → update-policy-DRDLWe7Y.cjs} +1 -1
- package/dist/chunks/{update-policy-BeQqjupC.js → update-policy-DhAUtiC8.js} +2 -2
- package/dist/chunks/{validators-CkHsAvwB.js → validators-CsdOtZI6.js} +411 -397
- package/dist/chunks/validators-DFeDcdpA.cjs +1 -0
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/dashboard-authoring/index.cjs +3 -3
- package/dist/dashboard-authoring/index.js +233 -227
- package/dist/data-app-builder/index.cjs +1 -1
- package/dist/data-app-builder/index.js +3 -3
- package/dist/data-app-codegen/index.cjs +1 -1
- package/dist/data-app-codegen/index.js +2 -2
- package/dist/data-app-codegen-node/index.cjs +1 -1
- package/dist/data-app-codegen-node/index.js +3 -3
- package/dist/data-app-sdk/index.cjs +1 -1
- package/dist/data-app-sdk/index.js +5 -5
- package/dist/data-app-sdk-adapters/index.cjs +1 -1
- package/dist/data-app-sdk-adapters/index.js +2 -2
- package/dist/data-app-sdk-validation/index.cjs +1 -1
- package/dist/data-app-sdk-validation/index.js +5 -5
- package/dist/format-utils/index.cjs +3 -3
- package/dist/format-utils/index.js +291 -397
- package/dist/index.cjs +1 -1
- package/dist/index.js +15 -15
- package/dist/pdf-table-layout/index.cjs +1 -0
- package/dist/pdf-table-layout/index.js +993 -0
- package/dist/report-runtime-context/index.cjs +1 -1
- package/dist/report-runtime-context/index.js +2 -2
- package/dist/style.css +1 -1
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/briefings/index.d.ts +1 -1
- package/dist/types/components/document-sheet/document-input-bar.d.ts +1 -3
- package/dist/types/components/document-sheet/document-insert-picker.d.ts +37 -0
- package/dist/types/components/document-sheet/document-kpi-section.d.ts +17 -0
- package/dist/types/components/document-sheet/document-matrix-layout-context.d.ts +10 -0
- package/dist/types/components/document-sheet/document-matrix-section.d.ts +27 -0
- package/dist/types/components/document-sheet/document-measure-layer.d.ts +45 -0
- package/dist/types/components/document-sheet/document-outline.d.ts +7 -1
- package/dist/types/components/document-sheet/document-page-navigation.d.ts +22 -0
- package/dist/types/components/document-sheet/document-page.d.ts +9 -5
- package/dist/types/components/document-sheet/document-panel/document-side-panel.d.ts +36 -0
- package/dist/types/components/document-sheet/document-panel/inputs-panel.d.ts +9 -0
- package/dist/types/components/document-sheet/document-panel/page-panel.d.ts +5 -0
- package/dist/types/components/document-sheet/document-panel/panel-controls.d.ts +14 -0
- package/dist/types/components/document-sheet/document-panel/region-panels.d.ts +11 -0
- package/dist/types/components/document-sheet/document-panel/section-panel.d.ts +25 -0
- package/dist/types/components/document-sheet/document-section-print-boundary.d.ts +9 -0
- package/dist/types/components/document-sheet/document-table-chrome.d.ts +22 -0
- package/dist/types/components/document-sheet/document-table-section.d.ts +3 -7
- package/dist/types/components/document-sheet/document-text-preview-context.d.ts +8 -0
- package/dist/types/components/document-sheet/use-first-fitting-variant.d.ts +18 -0
- package/dist/types/components/editor/editor-main/dashboard-variable-node.d.ts +12 -2
- package/dist/types/components/explorer/chart-configuration/matrix-authoring-controls.d.ts +7 -2
- package/dist/types/components/text-variables/variable-chip-plugin.d.ts +23 -0
- package/dist/types/components/text-variables/variable-chip.d.ts +18 -0
- package/dist/types/components/text-variables/variable-picker.d.ts +27 -0
- package/dist/types/components/visual/aggregated-table/utils/metric-format-resolver.d.ts +3 -3
- package/dist/types/components/visual/data-table/types/data-table.d.ts +4 -1
- package/dist/types/components/visual/pivot-table/utils/pivot-metric-formatting.d.ts +2 -2
- package/dist/types/components/visual/settings/table-presentation-settings.d.ts +27 -1
- package/dist/types/index.cjs +1 -1
- package/dist/types/index.js +5 -5
- package/dist/types/lib/dashboard-inputs/text-variable-options.d.ts +15 -0
- package/dist/types/lib/document/document-canvas-actions.d.ts +22 -0
- package/dist/types/lib/document/document-edits.d.ts +119 -0
- package/dist/types/lib/document/document-kpi-figure.d.ts +27 -0
- package/dist/types/lib/document/document-kpi-layout.d.ts +29 -0
- package/dist/types/lib/document/document-kpi-section-edits.d.ts +15 -0
- package/dist/types/lib/document/document-matrix-bands.d.ts +66 -0
- package/dist/types/lib/document/document-matrix-print.d.ts +11 -0
- package/dist/types/lib/document/document-pagination.d.ts +56 -3
- package/dist/types/lib/document/document-panel-target.d.ts +19 -0
- package/dist/types/lib/document/document-section-editor.d.ts +8 -7
- package/dist/types/lib/document/document-section-kinds.d.ts +49 -0
- package/dist/types/lib/document/document-section-query-options.d.ts +25 -0
- package/dist/types/lib/document/document-section-render-state.d.ts +26 -0
- package/dist/types/lib/document/document-section-utils.d.ts +11 -4
- package/dist/types/lib/document/document-table-dom.d.ts +4 -6
- package/dist/types/lib/document/document-table-pagination-model.d.ts +0 -5
- package/dist/types/lib/document/document-table-print-model.d.ts +4 -3
- package/dist/types/lib/document/document-table-style.d.ts +15 -4
- package/dist/types/lib/document/document-table-surface.d.ts +15 -0
- package/dist/types/lib/document/document-variables.d.ts +40 -6
- package/dist/types/lib/document/use-document-section-data.d.ts +39 -0
- package/dist/types/lib/document/use-measured-document-table-layout.d.ts +50 -0
- package/dist/types/lib/formatters/kpi-result-values.d.ts +20 -0
- package/dist/types/lib/formatters/metric-formatting.d.ts +3 -3
- package/dist/types/lib/hooks/query-context/use-dashboard-card-execution-snapshot.d.ts +8 -2
- package/dist/types/lib/hooks/use-dashboard-frame-query.d.ts +6 -0
- package/dist/types/lib/hooks/use-dashboard-kpi-actions.d.ts +1 -1
- package/dist/types/lib/hooks/use-document-section-editor.d.ts +2 -2
- package/dist/types/lib/hooks/use-document-section-session.d.ts +36 -0
- package/dist/types/lib/hooks/use-editor-preview.d.ts +17 -0
- package/dist/types/lib/hooks/use-is-editing-card.d.ts +7 -0
- package/dist/types/lib/matrix-table/matrix-card-adapter.d.ts +2 -0
- package/dist/types/lib/matrix-table/matrix-card-draft.d.ts +2 -0
- package/dist/types/lib/matrix-table/matrix-delivery.d.ts +4 -0
- package/dist/types/lib/matrix-table/matrix-layout-read.d.ts +68 -0
- package/dist/types/lib/query-context/build-dashboard-execution-snapshot.d.ts +8 -1
- package/dist/types/lib/query-context/build-dashboard-frame-base-query-contexts.d.ts +4 -2
- package/dist/types/lib/query-context/card-execution.d.ts +30 -0
- package/dist/types/lib/query-context/document-section-card-query.d.ts +37 -0
- package/dist/types/lib/stores/dashboard-store.d.ts +12 -8
- package/dist/types/lib/stores/editor-store.d.ts +2 -0
- package/dist/types/lib/table-formatting/table-presentation-fields.d.ts +1 -0
- package/dist/types/lib/text-variables/text-variable-types.d.ts +39 -0
- package/dist/types/lib/types/common-types.d.ts +34 -1
- package/dist/types/lib/utils/card-definition.d.ts +2 -0
- package/dist/types/lib/utils/card-utils.d.ts +13 -6
- package/dist/types/lib/utils/date-timezone-utils.d.ts +26 -4
- package/dist/types/pdf-table-layout.d.ts +2 -0
- package/dist/types/shared/analytics-protocol/index.d.ts +1 -1
- package/dist/types/shared/analytics-protocol/matrix-definition-contract.d.ts +45 -0
- package/dist/types/shared/analytics-protocol/matrix-member-presentation.d.ts +4 -0
- package/dist/types/shared/dashboard-authoring/document-section-cards.d.ts +56 -0
- package/dist/types/shared/dashboard-authoring/index.d.ts +1 -0
- package/dist/types/shared/dashboard-authoring/matrix-delivery.d.ts +36 -1
- package/dist/types/shared/format-utils/formatters/duration-formatter.d.ts +4 -1
- package/dist/types/shared/format-utils/formatters/index.d.ts +2 -2
- package/dist/types/shared/format-utils/formatters/matrix-formatter.d.ts +5 -0
- package/dist/types/shared/format-utils/formatters/number-formatter.d.ts +8 -2
- package/dist/types/shared/format-utils/index.d.ts +1 -0
- package/dist/types/shared/format-utils/matrix-export-presentation.d.ts +690 -1
- package/dist/types/shared/format-utils/matrix-print.d.ts +38 -0
- package/dist/types/shared/format-utils/pdf-table-layout/column-bands.d.ts +55 -0
- package/dist/types/shared/format-utils/pdf-table-layout/index.d.ts +6 -0
- package/dist/types/shared/format-utils/pdf-table-layout/page-size.d.ts +7 -0
- package/dist/types/shared/format-utils/pdf-table-layout/table-column-semantics.d.ts +106 -0
- package/dist/types/shared/format-utils/pdf-table-layout/table-column-widths.d.ts +13 -0
- package/dist/types/shared/format-utils/pdf-table-layout/table-page-geometry.d.ts +19 -0
- package/dist/types/shared/format-utils/pdf-table-layout/wide-table-layout.d.ts +46 -0
- package/dist/types/shared/format-utils/presentation-execution.d.ts +17 -2
- package/dist/types/shared/format-utils/table-structure.d.ts +9 -0
- package/dist/types/shared/format-utils/types/format-types.d.ts +16 -1
- package/package.json +6 -1
- package/dist/chunks/edit-dashboard-visual-BwJ2Eljw.cjs +0 -172
- package/dist/chunks/field-aggregations-jSi77h9Z.cjs +0 -1
- package/dist/chunks/index-DhlVxvyI.cjs +0 -4
- package/dist/chunks/index-DrOFJOCq.cjs +0 -1424
- package/dist/chunks/index-F25jnH0p.cjs +0 -1
- package/dist/chunks/matrix-formatter-BLunke3R.js +0 -424
- package/dist/chunks/matrix-formatter-CveLJo6S.cjs +0 -1
- package/dist/chunks/matrix-member-presentation-CFHjdrxT.cjs +0 -1
- package/dist/chunks/pivot-header-presentation-Cxz8-06f.cjs +0 -5
- package/dist/chunks/pivot-header-presentation-Dm9dUQsl.js +0 -415
- package/dist/chunks/pivot-result-lifecycle-BiERyXnS.cjs +0 -1
- package/dist/chunks/raw-temporal-BUeTpG76.cjs +0 -1
- package/dist/chunks/semantic-format-BzH69TRq.cjs +0 -1
- package/dist/chunks/switch--Re1K566.cjs +0 -134
- package/dist/chunks/validators-DVYAnnX0.cjs +0 -1
|
@@ -1,22 +1,119 @@
|
|
|
1
|
-
import { A as
|
|
2
|
-
import { G as
|
|
3
|
-
import { f as
|
|
1
|
+
import { A as he, a$ as A, u as w, l as be, al as oe, ai as ie } from "./validators-CsdOtZI6.js";
|
|
2
|
+
import { G as ge, u as ye } from "./matrix-operation-contract-D32U2CSw.js";
|
|
3
|
+
import { f as Ce, C as _e } from "./metric-comparison-BphoJ9bq.js";
|
|
4
4
|
import { z as u } from "zod";
|
|
5
|
-
import { m as
|
|
6
|
-
import { r as
|
|
7
|
-
import { i as
|
|
8
|
-
import { v as $,
|
|
9
|
-
import { DEFAULT_RESOLVED_VALUE_FORMAT_PREFERENCES as
|
|
5
|
+
import { m as ve } from "./source-entity-resolution-Bzefiive.js";
|
|
6
|
+
import { r as Ye } from "./field-dependencies-v-lJNzC7.js";
|
|
7
|
+
import { i as Me, a as ke } from "./matrix-card-CIlz0Dnp.js";
|
|
8
|
+
import { v as $, i as Ie, f as Ee } from "./temporal-bucket-DlFuhCnT.js";
|
|
9
|
+
import { DEFAULT_RESOLVED_VALUE_FORMAT_PREFERENCES as se } from "../value-format-preferences/index.js";
|
|
10
|
+
const J = 8, z = 6, B = Object.freeze([]);
|
|
11
|
+
function Te(e) {
|
|
12
|
+
switch (e.type) {
|
|
13
|
+
case "table":
|
|
14
|
+
case "chart":
|
|
15
|
+
return e.card ? [e.card] : B;
|
|
16
|
+
case "kpi":
|
|
17
|
+
return Array.isArray(e.cards) ? e.cards : B;
|
|
18
|
+
default:
|
|
19
|
+
return B;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
function ut(e, t) {
|
|
23
|
+
switch (e.type) {
|
|
24
|
+
case "table":
|
|
25
|
+
case "chart": {
|
|
26
|
+
if (!e.card) return e;
|
|
27
|
+
const n = t(e.card);
|
|
28
|
+
return n === e.card ? e : { ...e, card: n };
|
|
29
|
+
}
|
|
30
|
+
case "kpi": {
|
|
31
|
+
if (!Array.isArray(e.cards)) return e;
|
|
32
|
+
const n = e.cards.map(t);
|
|
33
|
+
return n.every((o, i) => o === e.cards[i]) ? e : { ...e, cards: n };
|
|
34
|
+
}
|
|
35
|
+
default:
|
|
36
|
+
return e;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
function dt(e) {
|
|
40
|
+
var n;
|
|
41
|
+
const t = [];
|
|
42
|
+
for (const o of e.sheets || []) {
|
|
43
|
+
const i = o.id;
|
|
44
|
+
for (const r of o.cards || [])
|
|
45
|
+
t.push({ kind: "sheetCard", sheetId: i, cardId: r.id, card: r });
|
|
46
|
+
for (const r of o.frames || [])
|
|
47
|
+
for (const s of r.cards || [])
|
|
48
|
+
t.push({
|
|
49
|
+
kind: "frameCard",
|
|
50
|
+
sheetId: i,
|
|
51
|
+
frameId: r.id,
|
|
52
|
+
cardId: s.id,
|
|
53
|
+
card: s
|
|
54
|
+
});
|
|
55
|
+
for (const r of ((n = o.document) == null ? void 0 : n.sections) || [])
|
|
56
|
+
for (const s of Te(r))
|
|
57
|
+
t.push({
|
|
58
|
+
kind: "documentSectionCard",
|
|
59
|
+
sheetId: i,
|
|
60
|
+
sectionId: r.id,
|
|
61
|
+
cardId: s.id,
|
|
62
|
+
card: s
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
return t;
|
|
66
|
+
}
|
|
67
|
+
function F(e) {
|
|
68
|
+
return !!e && typeof e == "object" && !Array.isArray(e);
|
|
69
|
+
}
|
|
70
|
+
function ft(e) {
|
|
71
|
+
if (!F(e))
|
|
72
|
+
return [{ path: "", message: "must be an object." }];
|
|
73
|
+
const t = [];
|
|
74
|
+
e.title !== void 0 && typeof e.title != "string" && t.push({ path: "title", message: "must be a string." });
|
|
75
|
+
const n = e.cards;
|
|
76
|
+
if (!Array.isArray(n))
|
|
77
|
+
t.push({ path: "cards", message: "must be an array of KPI cards." });
|
|
78
|
+
else {
|
|
79
|
+
(n.length < 1 || n.length > J) && t.push({
|
|
80
|
+
path: "cards",
|
|
81
|
+
message: `must hold 1 to ${J} KPI cards.`
|
|
82
|
+
});
|
|
83
|
+
const i = /* @__PURE__ */ new Set();
|
|
84
|
+
n.forEach((r, s) => {
|
|
85
|
+
if (!F(r)) {
|
|
86
|
+
t.push({ path: `cards[${s}]`, message: "must be a card." });
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
typeof r.id != "string" || !r.id ? t.push({
|
|
90
|
+
path: `cards[${s}].id`,
|
|
91
|
+
message: "must be a non-empty string."
|
|
92
|
+
}) : i.has(r.id) ? t.push({
|
|
93
|
+
path: `cards[${s}].id`,
|
|
94
|
+
message: `duplicates card id '${r.id}'.`
|
|
95
|
+
}) : i.add(r.id), r.type !== "kpi" && t.push({ path: `cards[${s}].type`, message: "must be 'kpi'." });
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
const o = e.kpi;
|
|
99
|
+
return F(o) ? (o.layout !== "tiles" && o.layout !== "lines" ? t.push({
|
|
100
|
+
path: "kpi.layout",
|
|
101
|
+
message: "must be 'tiles' or 'lines'."
|
|
102
|
+
}) : o.layout === "tiles" && Array.isArray(n) && n.length > z && t.push({
|
|
103
|
+
path: "kpi.layout",
|
|
104
|
+
message: `must be 'lines' for more than ${z} KPI cards.`
|
|
105
|
+
}), o.columns !== void 0 && o.columns !== 1 && o.columns !== 2 && t.push({ path: "kpi.columns", message: "must be 1 or 2." })) : t.push({ path: "kpi", message: "must be an object." }), t;
|
|
106
|
+
}
|
|
10
107
|
const N = /* @__PURE__ */ new Set([
|
|
11
108
|
"previous_period",
|
|
12
109
|
"same_period_last_year",
|
|
13
110
|
"start_vs_end",
|
|
14
111
|
"target"
|
|
15
|
-
]),
|
|
112
|
+
]), Ae = /* @__PURE__ */ new Set([...N, "none", ""]);
|
|
16
113
|
function h(e) {
|
|
17
114
|
return !!e && typeof e == "object" && !Array.isArray(e);
|
|
18
115
|
}
|
|
19
|
-
function
|
|
116
|
+
function re(e) {
|
|
20
117
|
const t = h(e.preferences) ? e.preferences : void 0, n = t && h(t.kpiVisualOptions) ? t.kpiVisualOptions : void 0, o = t && h(t.tableVisualOptions) ? t.tableVisualOptions : void 0;
|
|
21
118
|
return {
|
|
22
119
|
preferences: t,
|
|
@@ -28,42 +125,42 @@ function ne(e) {
|
|
|
28
125
|
tableComparisonPresent: !!o && "metricComparison" in o
|
|
29
126
|
};
|
|
30
127
|
}
|
|
31
|
-
function
|
|
128
|
+
function G(e) {
|
|
32
129
|
const t = [], n = (o, i) => {
|
|
33
130
|
if (Array.isArray(o)) {
|
|
34
|
-
o.forEach((s,
|
|
131
|
+
o.forEach((s, a) => n(s, `${i}[${a}]`));
|
|
35
132
|
return;
|
|
36
133
|
}
|
|
37
134
|
if (!h(o)) return;
|
|
38
|
-
const
|
|
39
|
-
if (h(
|
|
40
|
-
const s =
|
|
135
|
+
const r = o.config;
|
|
136
|
+
if (h(r)) {
|
|
137
|
+
const s = re(o), a = !!(s.kpiComparisonPresent || s.tableComparisonPresent), m = r.metricColumns, p = Array.isArray(m) ? m.flatMap(
|
|
41
138
|
(l, c) => h(l) ? [{ index: c, metric: l }] : []
|
|
42
139
|
) : [];
|
|
43
|
-
if ((p.some(({ metric: l }) => "comparisonType" in l) ||
|
|
140
|
+
if ((p.some(({ metric: l }) => "comparisonType" in l) || a) && t.push({
|
|
44
141
|
path: i,
|
|
45
142
|
card: o,
|
|
46
143
|
metrics: p,
|
|
47
144
|
malformedMetricIndexes: Array.isArray(m) ? m.flatMap(
|
|
48
145
|
(l, c) => h(l) ? [] : [c]
|
|
49
146
|
) : [],
|
|
50
|
-
malformedMetricColumns: "metricColumns" in
|
|
51
|
-
hasLegacyPresentation:
|
|
52
|
-
}), "metricColumns" in
|
|
147
|
+
malformedMetricColumns: "metricColumns" in r && !Array.isArray(m),
|
|
148
|
+
hasLegacyPresentation: a
|
|
149
|
+
}), "metricColumns" in r || a) return;
|
|
53
150
|
}
|
|
54
151
|
Object.entries(o).forEach(
|
|
55
|
-
([s,
|
|
152
|
+
([s, a]) => n(a, i ? `${i}.${s}` : s)
|
|
56
153
|
);
|
|
57
154
|
};
|
|
58
155
|
return n(e, "$"), t;
|
|
59
156
|
}
|
|
60
|
-
const
|
|
157
|
+
const ae = {
|
|
61
158
|
difference: "difference",
|
|
62
159
|
change: "percent_change",
|
|
63
160
|
change_difference: "both",
|
|
64
161
|
ratio: "ratio"
|
|
65
162
|
};
|
|
66
|
-
function
|
|
163
|
+
function Q(e, t) {
|
|
67
164
|
if (!e) return;
|
|
68
165
|
const n = Object.fromEntries(
|
|
69
166
|
t.flatMap(
|
|
@@ -72,7 +169,7 @@ function U(e, t) {
|
|
|
72
169
|
);
|
|
73
170
|
return Object.keys(n).length ? n : void 0;
|
|
74
171
|
}
|
|
75
|
-
function
|
|
172
|
+
function De(e, t, n) {
|
|
76
173
|
if (e !== void 0) {
|
|
77
174
|
if (!h(e)) {
|
|
78
175
|
n.push({
|
|
@@ -102,36 +199,36 @@ function ke(e, t, n) {
|
|
|
102
199
|
});
|
|
103
200
|
}
|
|
104
201
|
}
|
|
105
|
-
function
|
|
106
|
-
const n = t === "kpi" ? e.calculationType : e.calculatedAs, o = t === "table" && n === void 0 ? "both" :
|
|
202
|
+
function R(e, t) {
|
|
203
|
+
const n = t === "kpi" ? e.calculationType : e.calculatedAs, o = t === "table" && n === void 0 ? "both" : ae[String(n)], i = h(e.formatOptions) ? e.formatOptions : void 0, r = h(e.conditionalLabels) ? e.conditionalLabels : void 0, s = h(
|
|
107
204
|
t === "kpi" ? e.colorConfig : e.colors
|
|
108
|
-
) ? t === "kpi" ? e.colorConfig : e.colors : void 0,
|
|
109
|
-
if (o && (
|
|
205
|
+
) ? t === "kpi" ? e.colorConfig : e.colors : void 0, a = {};
|
|
206
|
+
if (o && (a.displayMode = o), typeof (i == null ? void 0 : i.decimalPlaces) == "number" && (a.precision = i.decimalPlaces), t === "kpi") {
|
|
110
207
|
const l = e.showArrow !== !1, c = e.showColor !== !1;
|
|
111
|
-
|
|
112
|
-
} else (e.indicatorStyle === "arrow_badge" || e.indicatorStyle === "arrow" || e.indicatorStyle === "badge" || e.indicatorStyle === "none") && (
|
|
113
|
-
const m =
|
|
114
|
-
...
|
|
115
|
-
...typeof
|
|
208
|
+
a.indicatorStyle = l ? c ? "arrow_badge" : "arrow" : c ? "badge" : "none", a.showColor = c, (e.position === "left" || e.position === "right" || e.position === "top") && (a.position = e.position), typeof e.conditionalLabel == "boolean" && (a.conditionalLabel = e.conditionalLabel), typeof e.labelName == "string" && (a.labelName = e.labelName);
|
|
209
|
+
} else (e.indicatorStyle === "arrow_badge" || e.indicatorStyle === "arrow" || e.indicatorStyle === "badge" || e.indicatorStyle === "none") && (a.indicatorStyle = e.indicatorStyle);
|
|
210
|
+
const m = r ? {
|
|
211
|
+
...Q(r, ["increase", "decrease"]),
|
|
212
|
+
...typeof r.noChange == "string" ? { neutral: r.noChange } : typeof r.neutral == "string" ? { neutral: r.neutral } : {}
|
|
116
213
|
} : void 0;
|
|
117
|
-
m && Object.keys(m).length && (
|
|
214
|
+
m && Object.keys(m).length && (a.conditionalLabels = m);
|
|
118
215
|
const p = s ? {
|
|
119
|
-
...
|
|
216
|
+
...Q(s, ["increase", "decrease"]),
|
|
120
217
|
...typeof s.noChange == "string" ? { neutral: s.noChange } : typeof s.neutral == "string" ? { neutral: s.neutral } : {}
|
|
121
218
|
} : void 0;
|
|
122
|
-
return p && Object.keys(p).length && (
|
|
219
|
+
return p && Object.keys(p).length && (a.colors = p), a;
|
|
123
220
|
}
|
|
124
|
-
function
|
|
125
|
-
return { ...
|
|
221
|
+
function W(e) {
|
|
222
|
+
return { ..._e, ...e };
|
|
126
223
|
}
|
|
127
|
-
function
|
|
224
|
+
function X(e) {
|
|
128
225
|
return e.some(({ metric: t }) => t.comparisonType === "previous_period" || t.comparisonType === "same_period_last_year" || t.comparisonType === "target" ? !0 : h(t.comparison) && t.comparison.mode === "explicit");
|
|
129
226
|
}
|
|
130
|
-
function
|
|
227
|
+
function L(e) {
|
|
131
228
|
const t = e.card.config;
|
|
132
229
|
return e.metrics.length === 2 && (t.groupByColumns === void 0 || Array.isArray(t.groupByColumns) && t.groupByColumns.length === 0);
|
|
133
230
|
}
|
|
134
|
-
function
|
|
231
|
+
function Z(e, t, n, o) {
|
|
135
232
|
const i = t === "kpi" ? [
|
|
136
233
|
"enabled",
|
|
137
234
|
"calculationType",
|
|
@@ -159,12 +256,12 @@ function K(e, t, n, o) {
|
|
|
159
256
|
message: `Unknown legacy comparison presentation field "${l}" cannot be dropped automatically.`
|
|
160
257
|
});
|
|
161
258
|
});
|
|
162
|
-
const
|
|
163
|
-
e[
|
|
259
|
+
const r = t === "kpi" ? "calculationType" : "calculatedAs";
|
|
260
|
+
e[r] !== void 0 && !ae[String(e[r])] && o.push({
|
|
164
261
|
severity: "error",
|
|
165
262
|
code: "invalid_legacy_comparison_presentation",
|
|
166
|
-
path: `${n}.${
|
|
167
|
-
message: `Legacy comparison ${
|
|
263
|
+
path: `${n}.${r}`,
|
|
264
|
+
message: `Legacy comparison ${r} is unsupported.`
|
|
168
265
|
}), t === "kpi" && e.position !== void 0 && !["left", "right", "top"].includes(String(e.position)) && o.push({
|
|
169
266
|
severity: "error",
|
|
170
267
|
code: "invalid_legacy_comparison_presentation",
|
|
@@ -189,8 +286,8 @@ function K(e, t, n, o) {
|
|
|
189
286
|
});
|
|
190
287
|
return;
|
|
191
288
|
}
|
|
192
|
-
Object.entries(e[l]).forEach(([b,
|
|
193
|
-
c.includes(b) ? typeof
|
|
289
|
+
Object.entries(e[l]).forEach(([b, d]) => {
|
|
290
|
+
c.includes(b) ? typeof d != "string" && o.push({
|
|
194
291
|
severity: "error",
|
|
195
292
|
code: "invalid_legacy_comparison_presentation",
|
|
196
293
|
path: `${n}.${l}.${b}`,
|
|
@@ -217,9 +314,9 @@ function K(e, t, n, o) {
|
|
|
217
314
|
code: "invalid_legacy_comparison_presentation",
|
|
218
315
|
path: `${n}.indicatorStyle`,
|
|
219
316
|
message: "Legacy comparison indicatorStyle is unsupported."
|
|
220
|
-
}),
|
|
221
|
-
const m =
|
|
222
|
-
|
|
317
|
+
}), De(e.formatOptions, `${n}.formatOptions`, o);
|
|
318
|
+
const m = R(e, t);
|
|
319
|
+
Ce(m, n).errors.forEach((l) => {
|
|
223
320
|
o.push({
|
|
224
321
|
severity: "error",
|
|
225
322
|
code: "invalid_legacy_comparison_presentation",
|
|
@@ -228,15 +325,15 @@ function K(e, t, n, o) {
|
|
|
228
325
|
});
|
|
229
326
|
});
|
|
230
327
|
}
|
|
231
|
-
function
|
|
232
|
-
const t =
|
|
328
|
+
function ee(e) {
|
|
329
|
+
const t = re(e.card), n = t.kpiComparison ? R(t.kpiComparison, "kpi") : void 0, o = t.tableComparison ? R(t.tableComparison, "table") : void 0;
|
|
233
330
|
return { namespaces: t, kpi: n, table: o, presentation: n || o };
|
|
234
331
|
}
|
|
235
|
-
function
|
|
236
|
-
const t = h(e.preferences) ? e.preferences : {}, n = h(t.kpiVisualOptions) ? t.kpiVisualOptions : {}, o = h(n.metricComparison) ? n.metricComparison : {}, i = h(t.tableVisualOptions) ? t.tableVisualOptions : {},
|
|
237
|
-
return n.lowerIsBetter === !0 || o.lowerIsBetter === !0 ||
|
|
332
|
+
function Ne(e) {
|
|
333
|
+
const t = h(e.preferences) ? e.preferences : {}, n = h(t.kpiVisualOptions) ? t.kpiVisualOptions : {}, o = h(n.metricComparison) ? n.metricComparison : {}, i = h(t.tableVisualOptions) ? t.tableVisualOptions : {}, r = h(i.metricComparison) ? i.metricComparison : {};
|
|
334
|
+
return n.lowerIsBetter === !0 || o.lowerIsBetter === !0 || r.lowerIsBetter === !0 ? "lower_is_better" : "higher_is_better";
|
|
238
335
|
}
|
|
239
|
-
function
|
|
336
|
+
function Oe(e) {
|
|
240
337
|
switch (e.comparisonType) {
|
|
241
338
|
case "previous_period":
|
|
242
339
|
return { mode: "explicit", spec: { kind: "previous_period" } };
|
|
@@ -251,7 +348,7 @@ function Ie(e) {
|
|
|
251
348
|
return;
|
|
252
349
|
}
|
|
253
350
|
}
|
|
254
|
-
function
|
|
351
|
+
function we(e) {
|
|
255
352
|
const t = h(e.preferences) ? e.preferences : void 0;
|
|
256
353
|
if (!t) return;
|
|
257
354
|
const n = h(t.kpiVisualOptions) ? t.kpiVisualOptions : void 0;
|
|
@@ -259,13 +356,13 @@ function Te(e) {
|
|
|
259
356
|
const o = h(t.tableVisualOptions) ? t.tableVisualOptions : void 0, i = o && h(o.metricComparison) ? o.metricComparison : void 0;
|
|
260
357
|
i && delete i.lowerIsBetter;
|
|
261
358
|
}
|
|
262
|
-
function
|
|
263
|
-
const t =
|
|
359
|
+
function ht(e) {
|
|
360
|
+
const t = G(e);
|
|
264
361
|
if (!t.length)
|
|
265
362
|
return { document: e, changed: !1, changes: [], diagnostics: [] };
|
|
266
363
|
const n = [];
|
|
267
364
|
if (t.forEach((s) => {
|
|
268
|
-
var
|
|
365
|
+
var a, m, p, l;
|
|
269
366
|
if (s.malformedMetricColumns && n.push({
|
|
270
367
|
severity: "error",
|
|
271
368
|
code: "malformed_metric_columns",
|
|
@@ -280,43 +377,43 @@ function at(e) {
|
|
|
280
377
|
});
|
|
281
378
|
}), s.metrics.forEach(({ metric: c, index: b }) => {
|
|
282
379
|
if (!("comparisonType" in c)) return;
|
|
283
|
-
const
|
|
380
|
+
const d = `${s.path}.config.metricColumns[${b}]`, y = String(c.comparisonType || "");
|
|
284
381
|
"comparison" in c && n.push({
|
|
285
382
|
severity: "error",
|
|
286
383
|
code: "conflicting_comparison_contracts",
|
|
287
|
-
path:
|
|
384
|
+
path: d,
|
|
288
385
|
message: "Metric contains both legacy and canonical comparison configuration; resolve the conflict before migration."
|
|
289
386
|
});
|
|
290
|
-
const C = h(c.parameters) ? c.parameters : void 0,
|
|
291
|
-
N.has(y) && (
|
|
387
|
+
const C = h(c.parameters) ? c.parameters : void 0, v = C && h(C.windowTransform) ? C.windowTransform : void 0;
|
|
388
|
+
N.has(y) && (v == null ? void 0 : v.function) === "previous_period_delta" && n.push({
|
|
292
389
|
severity: "error",
|
|
293
390
|
code: "conflicting_comparison_window_transform",
|
|
294
|
-
path:
|
|
391
|
+
path: d,
|
|
295
392
|
message: "A metric cannot combine baseline comparison with previous_period_delta; resolve the authoring intent before migration."
|
|
296
|
-
}),
|
|
393
|
+
}), Ae.has(y) || n.push({
|
|
297
394
|
severity: "error",
|
|
298
395
|
code: "unsupported_comparison_type",
|
|
299
|
-
path: `${
|
|
396
|
+
path: `${d}.comparisonType`,
|
|
300
397
|
message: `Unsupported legacy metric comparison type "${y}".`
|
|
301
398
|
}), c.comparisonType === "target" && (typeof c.targetValue != "number" || !Number.isFinite(c.targetValue)) && n.push({
|
|
302
399
|
severity: "error",
|
|
303
400
|
code: "invalid_target_value",
|
|
304
|
-
path: `${
|
|
401
|
+
path: `${d}.targetValue`,
|
|
305
402
|
message: "Legacy target comparison requires a finite metric targetValue."
|
|
306
403
|
}), c.comparisonType === "start_vs_end" && n.push({
|
|
307
404
|
severity: "error",
|
|
308
405
|
code: "unsupported_start_vs_end",
|
|
309
|
-
path: `${
|
|
406
|
+
path: `${d}.comparisonType`,
|
|
310
407
|
message: "start_vs_end is retired and cannot be migrated automatically."
|
|
311
408
|
}), c.targetValue !== void 0 && c.comparisonType !== "target" && n.push({
|
|
312
409
|
severity: "warning",
|
|
313
410
|
code: "stray_target_value",
|
|
314
|
-
path: `${
|
|
411
|
+
path: `${d}.targetValue`,
|
|
315
412
|
message: "Dead non-target targetValue will be removed without changing the baseline."
|
|
316
413
|
});
|
|
317
414
|
}), s.hasLegacyPresentation) {
|
|
318
|
-
const { namespaces: c, kpi: b, table:
|
|
319
|
-
(
|
|
415
|
+
const { namespaces: c, kpi: b, table: d } = ee(s), y = [
|
|
416
|
+
(a = c.kpiOptions) == null ? void 0 : a.lowerIsBetter,
|
|
320
417
|
(m = c.kpiComparison) == null ? void 0 : m.lowerIsBetter,
|
|
321
418
|
(p = c.tableComparison) == null ? void 0 : p.lowerIsBetter
|
|
322
419
|
].filter((C) => typeof C == "boolean");
|
|
@@ -345,22 +442,22 @@ function at(e) {
|
|
|
345
442
|
code: "conflicting_comparison_presentation_contracts",
|
|
346
443
|
path: `${s.path}.preferences.comparisonPresentation`,
|
|
347
444
|
message: "Card contains both legacy and canonical comparison presentation; resolve the conflict before migration."
|
|
348
|
-
}), c.kpiComparison && typeof c.kpiComparison.enabled == "boolean" && "metricPairComparisonEnabled" in (c.preferences || {}) &&
|
|
445
|
+
}), c.kpiComparison && typeof c.kpiComparison.enabled == "boolean" && "metricPairComparisonEnabled" in (c.preferences || {}) && L(s) && n.push({
|
|
349
446
|
severity: "error",
|
|
350
447
|
code: "conflicting_comparison_presentation_contracts",
|
|
351
448
|
path: `${s.path}.preferences.metricPairComparisonEnabled`,
|
|
352
449
|
message: "Card contains both legacy and canonical metric-pair enablement; resolve the conflict before migration."
|
|
353
|
-
}), c.kpiComparison &&
|
|
450
|
+
}), c.kpiComparison && Z(
|
|
354
451
|
c.kpiComparison,
|
|
355
452
|
"kpi",
|
|
356
453
|
`${s.path}.preferences.kpiVisualOptions.metricComparison`,
|
|
357
454
|
n
|
|
358
|
-
), c.tableComparison &&
|
|
455
|
+
), c.tableComparison && Z(
|
|
359
456
|
c.tableComparison,
|
|
360
457
|
"table",
|
|
361
458
|
`${s.path}.preferences.tableVisualOptions.metricComparison`,
|
|
362
459
|
n
|
|
363
|
-
), b &&
|
|
460
|
+
), b && d && JSON.stringify(W(b)) !== JSON.stringify(W(d)) && n.push({
|
|
364
461
|
severity: "error",
|
|
365
462
|
code: "conflicting_legacy_presentation_namespaces",
|
|
366
463
|
path: `${s.path}.preferences`,
|
|
@@ -369,36 +466,36 @@ function at(e) {
|
|
|
369
466
|
}
|
|
370
467
|
}), n.some((s) => s.severity === "error"))
|
|
371
468
|
return { document: e, changed: !1, changes: [], diagnostics: n };
|
|
372
|
-
const o = JSON.parse(JSON.stringify(e)), i =
|
|
469
|
+
const o = JSON.parse(JSON.stringify(e)), i = G(o), r = [];
|
|
373
470
|
return i.forEach((s) => {
|
|
374
471
|
var m;
|
|
375
|
-
const
|
|
472
|
+
const a = Ne(s.card);
|
|
376
473
|
if (s.metrics.forEach(({ metric: p, index: l }) => {
|
|
377
474
|
if (!("comparisonType" in p)) return;
|
|
378
|
-
const c = String(p.comparisonType || ""), b = `${s.path}.config.metricColumns[${l}]`,
|
|
379
|
-
delete p.comparisonType, "targetValue" in p && (delete p.targetValue, y.push("targetValue")), "comparisonDisplay" in p && (delete p.comparisonDisplay, y.push("comparisonDisplay")),
|
|
475
|
+
const c = String(p.comparisonType || ""), b = `${s.path}.config.metricColumns[${l}]`, d = Oe(p), y = ["comparisonType"];
|
|
476
|
+
delete p.comparisonType, "targetValue" in p && (delete p.targetValue, y.push("targetValue")), "comparisonDisplay" in p && (delete p.comparisonDisplay, y.push("comparisonDisplay")), d ? p.comparison = d : delete p.comparison, N.has(c) && (p.comparisonPolarity = a), r.push({
|
|
380
477
|
kind: "metric",
|
|
381
478
|
path: b,
|
|
382
479
|
metricId: typeof p.id == "string" ? p.id : void 0,
|
|
383
480
|
legacyType: c,
|
|
384
|
-
comparison:
|
|
385
|
-
comparisonPolarity: N.has(c) ?
|
|
481
|
+
comparison: d,
|
|
482
|
+
comparisonPolarity: N.has(c) ? a : void 0,
|
|
386
483
|
removedFields: y
|
|
387
484
|
});
|
|
388
|
-
}),
|
|
389
|
-
const { namespaces: p, presentation: l } =
|
|
485
|
+
}), we(s.card), s.hasLegacyPresentation) {
|
|
486
|
+
const { namespaces: p, presentation: l } = ee(s), c = (m = p.kpiComparison) == null ? void 0 : m.enabled, b = {
|
|
390
487
|
...l
|
|
391
488
|
};
|
|
392
|
-
typeof c == "boolean" &&
|
|
393
|
-
const
|
|
489
|
+
typeof c == "boolean" && X(s.metrics) && (b.showComparison = c);
|
|
490
|
+
const d = typeof c == "boolean" && L(s) ? c : void 0, y = typeof c == "boolean" && !X(s.metrics) && !L(s) ? ["kpiVisualOptions.metricComparison.enabled"] : void 0, C = p.preferences, v = [];
|
|
394
491
|
s.metrics.forEach(({ metric: D }) => {
|
|
395
|
-
"comparisonPolarity" in D || (D.comparisonPolarity =
|
|
396
|
-
}), Object.keys(b).length && (C.comparisonPresentation = b),
|
|
492
|
+
"comparisonPolarity" in D || (D.comparisonPolarity = a, typeof D.id == "string" && v.push(D.id));
|
|
493
|
+
}), Object.keys(b).length && (C.comparisonPresentation = b), d !== void 0 && (C.metricPairComparisonEnabled = d), p.kpiOptions && delete p.kpiOptions.metricComparison, p.tableOptions && delete p.tableOptions.metricComparison, r.push({
|
|
397
494
|
kind: "presentation",
|
|
398
495
|
path: `${s.path}.preferences`,
|
|
399
496
|
comparisonPresentation: Object.keys(b).length ? b : void 0,
|
|
400
|
-
metricPairComparisonEnabled:
|
|
401
|
-
comparisonPolarityMetricIds:
|
|
497
|
+
metricPairComparisonEnabled: d,
|
|
498
|
+
comparisonPolarityMetricIds: v,
|
|
402
499
|
intentionallyDiscardedFields: y,
|
|
403
500
|
removedFields: [
|
|
404
501
|
...p.kpiComparison ? ["kpiVisualOptions.metricComparison"] : [],
|
|
@@ -406,132 +503,132 @@ function at(e) {
|
|
|
406
503
|
]
|
|
407
504
|
});
|
|
408
505
|
}
|
|
409
|
-
}), { document: o, changed: !0, changes:
|
|
506
|
+
}), { document: o, changed: !0, changes: r, diagnostics: n };
|
|
410
507
|
}
|
|
411
|
-
function
|
|
508
|
+
function f(e) {
|
|
412
509
|
return typeof e == "string" && e.trim().length > 0 ? e.trim() : null;
|
|
413
510
|
}
|
|
414
|
-
function
|
|
511
|
+
function ce(e) {
|
|
415
512
|
return Array.from(new Set(e.filter((t) => !!t)));
|
|
416
513
|
}
|
|
417
|
-
function
|
|
418
|
-
const t =
|
|
419
|
-
return t ?
|
|
514
|
+
function $e(e) {
|
|
515
|
+
const t = f(e.table), n = f(e.schema), o = f(e.catalog) || f(e.database);
|
|
516
|
+
return t ? ce([
|
|
420
517
|
t,
|
|
421
518
|
n ? `${n}.${t}` : null,
|
|
422
519
|
o ? `${o}.${t}` : null,
|
|
423
520
|
o && n ? `${o}.${n}.${t}` : null
|
|
424
521
|
]) : [];
|
|
425
522
|
}
|
|
426
|
-
function
|
|
427
|
-
const t =
|
|
428
|
-
return
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
523
|
+
function te(e) {
|
|
524
|
+
const t = f(e.table) || f(e.tableName);
|
|
525
|
+
return ce([
|
|
526
|
+
f(e.name),
|
|
527
|
+
f(e.alias),
|
|
528
|
+
...$e({
|
|
432
529
|
table: t,
|
|
433
|
-
schema:
|
|
434
|
-
catalog:
|
|
435
|
-
database:
|
|
530
|
+
schema: f(e.schema) || f(e.schemaName),
|
|
531
|
+
catalog: f(e.catalog),
|
|
532
|
+
database: f(e.database) || f(e.databaseName)
|
|
436
533
|
})
|
|
437
534
|
]);
|
|
438
535
|
}
|
|
439
|
-
function
|
|
440
|
-
const n =
|
|
536
|
+
function Pe(e, t) {
|
|
537
|
+
const n = f(e.domainId), o = f(t.domainId);
|
|
441
538
|
if (n && o && n !== o)
|
|
442
539
|
return !0;
|
|
443
540
|
if (e.type === "dataset")
|
|
444
541
|
return !1;
|
|
445
|
-
const i =
|
|
446
|
-
if (i &&
|
|
542
|
+
const i = f(e.id), r = f(t.id);
|
|
543
|
+
if (i && r && i !== r)
|
|
447
544
|
return !0;
|
|
448
|
-
const s =
|
|
449
|
-
return !!(s &&
|
|
545
|
+
const s = f(e.connectionId), a = f(t.connectionId);
|
|
546
|
+
return !!(s && a && s !== a);
|
|
450
547
|
}
|
|
451
|
-
function
|
|
452
|
-
return
|
|
548
|
+
function j(e, t = !1) {
|
|
549
|
+
return f(e.table) || f(e.tableName) || (e.type !== "dataset" || t ? f(e.name) : null);
|
|
453
550
|
}
|
|
454
551
|
function V(e) {
|
|
455
|
-
return
|
|
552
|
+
return f(e.catalog) || f(e.database) || f(e.databaseName);
|
|
456
553
|
}
|
|
457
|
-
function
|
|
458
|
-
return
|
|
554
|
+
function x(e) {
|
|
555
|
+
return f(e.schema) || f(e.schemaName);
|
|
459
556
|
}
|
|
460
|
-
function
|
|
557
|
+
function O(e) {
|
|
461
558
|
return e.length === 1 ? e[0] : void 0;
|
|
462
559
|
}
|
|
463
|
-
function
|
|
464
|
-
const n =
|
|
560
|
+
function Be(e, t) {
|
|
561
|
+
const n = j(t, !0), o = V(t), i = x(t);
|
|
465
562
|
if (!(!n || !o && !i))
|
|
466
|
-
return
|
|
467
|
-
e.filter((
|
|
468
|
-
const s =
|
|
469
|
-
return !(
|
|
563
|
+
return O(
|
|
564
|
+
e.filter((r) => {
|
|
565
|
+
const s = r;
|
|
566
|
+
return !(j(s) !== n || o && V(s) !== o || i && x(s) !== i);
|
|
470
567
|
})
|
|
471
568
|
);
|
|
472
569
|
}
|
|
473
|
-
function
|
|
570
|
+
function I(e, t) {
|
|
474
571
|
if (!t || !(e != null && e.length))
|
|
475
572
|
return;
|
|
476
573
|
const n = e.filter(
|
|
477
|
-
(
|
|
574
|
+
(a) => !Pe(a, t)
|
|
478
575
|
);
|
|
479
576
|
if (t.type === "dataset") {
|
|
480
|
-
const
|
|
481
|
-
if (
|
|
482
|
-
return
|
|
577
|
+
const a = f(t.id);
|
|
578
|
+
if (a)
|
|
579
|
+
return O(
|
|
483
580
|
n.filter(
|
|
484
|
-
(p) => p.type === "dataset" &&
|
|
581
|
+
(p) => p.type === "dataset" && f(p.id) === a
|
|
485
582
|
)
|
|
486
583
|
);
|
|
487
|
-
if (
|
|
488
|
-
const p =
|
|
489
|
-
return
|
|
584
|
+
if (f(t.domainId)) {
|
|
585
|
+
const p = f(t.name);
|
|
586
|
+
return O(
|
|
490
587
|
n.filter(
|
|
491
|
-
(l) => l.type === "dataset" &&
|
|
588
|
+
(l) => l.type === "dataset" && f(l.name) === p
|
|
492
589
|
)
|
|
493
590
|
);
|
|
494
591
|
}
|
|
495
592
|
}
|
|
496
593
|
let o = [];
|
|
497
594
|
if (t.type === "dataset") {
|
|
498
|
-
const
|
|
595
|
+
const a = f(t.name);
|
|
499
596
|
if (o = n.filter(
|
|
500
|
-
(m) => m.type === "dataset" &&
|
|
597
|
+
(m) => m.type === "dataset" && f(m.name) === a
|
|
501
598
|
), o.length === 1)
|
|
502
599
|
return o[0];
|
|
503
600
|
}
|
|
504
|
-
if (!!(
|
|
505
|
-
return
|
|
601
|
+
if (!!(j(t, !0) && (V(t) || x(t))))
|
|
602
|
+
return Be(n, t);
|
|
506
603
|
if (o.length > 1)
|
|
507
604
|
return;
|
|
508
|
-
const
|
|
509
|
-
if (
|
|
605
|
+
const r = te(t);
|
|
606
|
+
if (r.length === 0)
|
|
510
607
|
return;
|
|
511
|
-
const s = n.filter((
|
|
512
|
-
|
|
608
|
+
const s = n.filter((a) => te(
|
|
609
|
+
a
|
|
513
610
|
).some(
|
|
514
|
-
(p) =>
|
|
611
|
+
(p) => r.includes(p)
|
|
515
612
|
));
|
|
516
|
-
return
|
|
613
|
+
return O(s);
|
|
517
614
|
}
|
|
518
|
-
function
|
|
519
|
-
const n =
|
|
615
|
+
function S(e, t) {
|
|
616
|
+
const n = I(e, t);
|
|
520
617
|
return n ? { ...t, ...n } : t;
|
|
521
618
|
}
|
|
522
|
-
function
|
|
619
|
+
function bt(e, t) {
|
|
523
620
|
const n = t || [];
|
|
524
621
|
return n.length === 0 ? e : {
|
|
525
622
|
...e,
|
|
526
|
-
baseEntity:
|
|
623
|
+
baseEntity: S(n, e.baseEntity),
|
|
527
624
|
joins: e.joins.map((o) => ({
|
|
528
625
|
...o,
|
|
529
|
-
source:
|
|
530
|
-
target:
|
|
626
|
+
source: S(n, o.source),
|
|
627
|
+
target: S(n, o.target)
|
|
531
628
|
}))
|
|
532
629
|
};
|
|
533
630
|
}
|
|
534
|
-
function
|
|
631
|
+
function gt(e, t) {
|
|
535
632
|
if (!(e != null && e.joins.length))
|
|
536
633
|
return [];
|
|
537
634
|
const n = [
|
|
@@ -539,7 +636,7 @@ function lt(e, t) {
|
|
|
539
636
|
...e.joins.flatMap((i) => [i.source, i.target])
|
|
540
637
|
], o = [];
|
|
541
638
|
return n.forEach((i) => {
|
|
542
|
-
!
|
|
639
|
+
!I(t, i) && !I(o, i) && o.push(i);
|
|
543
640
|
}), o;
|
|
544
641
|
}
|
|
545
642
|
function M(e) {
|
|
@@ -548,14 +645,14 @@ function M(e) {
|
|
|
548
645
|
function k(e) {
|
|
549
646
|
return M(e) && typeof e.name == "string";
|
|
550
647
|
}
|
|
551
|
-
function
|
|
648
|
+
function q(e) {
|
|
552
649
|
return !M(e) || e.kind !== "semantic" && e.kind !== "physical" || (e.kind === "semantic" ? [e.datasetId, e.datasetName, e.connectionId] : [e.databaseName, e.schemaName]).some(
|
|
553
650
|
(n) => n !== void 0 && typeof n != "string"
|
|
554
|
-
) ? !1 :
|
|
651
|
+
) ? !1 : he(
|
|
555
652
|
e
|
|
556
653
|
);
|
|
557
654
|
}
|
|
558
|
-
function
|
|
655
|
+
function Fe(e) {
|
|
559
656
|
return [
|
|
560
657
|
...e.groupByColumns ?? [],
|
|
561
658
|
...e.metricColumns ?? [],
|
|
@@ -564,38 +661,38 @@ function we(e) {
|
|
|
564
661
|
...e.sortByColumns ?? []
|
|
565
662
|
];
|
|
566
663
|
}
|
|
567
|
-
function
|
|
664
|
+
function U(e) {
|
|
568
665
|
return e ? [
|
|
569
666
|
...(e.conditions ?? []).flatMap(
|
|
570
667
|
(t) => t.field ? [t.field] : []
|
|
571
668
|
),
|
|
572
|
-
...(e.groups ?? []).flatMap(
|
|
669
|
+
...(e.groups ?? []).flatMap(U)
|
|
573
670
|
] : [];
|
|
574
671
|
}
|
|
575
|
-
function
|
|
672
|
+
function le(e) {
|
|
576
673
|
var o, i;
|
|
577
|
-
const t = "parameters" in e ?
|
|
674
|
+
const t = "parameters" in e ? U((o = e.parameters) == null ? void 0 : o.filters) : [], n = ((i = e.calculatedFormula) == null ? void 0 : i.inputFields) ?? [];
|
|
578
675
|
return [
|
|
579
676
|
...t,
|
|
580
|
-
...n.flatMap((
|
|
677
|
+
...n.flatMap((r) => le(r))
|
|
581
678
|
];
|
|
582
679
|
}
|
|
583
|
-
function
|
|
680
|
+
function pe(e) {
|
|
584
681
|
const t = Array.isArray(e == null ? void 0 : e.selectedEntities) ? e.selectedEntities.filter(k) : [];
|
|
585
|
-
return
|
|
682
|
+
return w(
|
|
586
683
|
t.flatMap((n) => {
|
|
587
|
-
const o =
|
|
684
|
+
const o = E(n, e);
|
|
588
685
|
return o ? [o] : [];
|
|
589
686
|
})
|
|
590
687
|
);
|
|
591
688
|
}
|
|
592
|
-
function
|
|
689
|
+
function H(e, t) {
|
|
593
690
|
const n = t.filter(
|
|
594
691
|
(o) => A(o, e)
|
|
595
692
|
);
|
|
596
693
|
return n.length === 1 ? n[0] : void 0;
|
|
597
694
|
}
|
|
598
|
-
function
|
|
695
|
+
function Le(e, t) {
|
|
599
696
|
if (t.kind === "semantic")
|
|
600
697
|
return !!(e.entityId && e.entityId === t.datasetId || e.entityName && e.entityName === t.datasetName);
|
|
601
698
|
const n = [
|
|
@@ -605,68 +702,68 @@ function Oe(e, t) {
|
|
|
605
702
|
].filter((o) => !!o).join(".");
|
|
606
703
|
return !!(e.entityName === t.tableName || e.qualifiedEntityName && e.qualifiedEntityName === n);
|
|
607
704
|
}
|
|
608
|
-
function
|
|
705
|
+
function Se(e, t) {
|
|
609
706
|
const n = Array.isArray(t == null ? void 0 : t.selectedEntities) ? t.selectedEntities.filter(k) : [], o = e.entityName || e.qualifiedEntityName;
|
|
610
707
|
if (!o) return;
|
|
611
|
-
const i = e.entityId ?
|
|
708
|
+
const i = e.entityId ? I(n, {
|
|
612
709
|
type: "dataset",
|
|
613
710
|
id: e.entityId,
|
|
614
711
|
name: o
|
|
615
712
|
}) : void 0;
|
|
616
713
|
if (i)
|
|
617
|
-
return
|
|
618
|
-
const
|
|
714
|
+
return E(i, t);
|
|
715
|
+
const r = I(n, {
|
|
619
716
|
type: (t == null ? void 0 : t.mode) === "semanticDomain" ? "dataset" : "table",
|
|
620
717
|
name: (t == null ? void 0 : t.mode) === "semanticDomain" ? o : e.qualifiedEntityName || o
|
|
621
718
|
});
|
|
622
|
-
if (
|
|
719
|
+
if (r && !((t == null ? void 0 : t.mode) === "semanticDomain" && e.entityId && ![
|
|
623
720
|
e.entityName,
|
|
624
721
|
e.qualifiedEntityName,
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
].filter((
|
|
628
|
-
return
|
|
629
|
-
}
|
|
630
|
-
function
|
|
631
|
-
var
|
|
632
|
-
const o = !!(
|
|
722
|
+
r.name,
|
|
723
|
+
r.type === "dataset" && "table" in r ? r.table : void 0
|
|
724
|
+
].filter((a) => !!a).includes(e.entityId)))
|
|
725
|
+
return E(r, t);
|
|
726
|
+
}
|
|
727
|
+
function Re(e, t, n) {
|
|
728
|
+
var r, s, a;
|
|
729
|
+
const o = !!(be(e) || (s = (r = e.calculatedFormula) == null ? void 0 : r.inputFields) != null && s.length || (a = e.derivedField) != null && a.inputs && Object.keys(e.derivedField.inputs).length > 0);
|
|
633
730
|
if (e.source && !o) {
|
|
634
|
-
const m =
|
|
731
|
+
const m = H(
|
|
635
732
|
e.source,
|
|
636
733
|
n
|
|
637
734
|
);
|
|
638
735
|
return m ? [m] : [];
|
|
639
736
|
}
|
|
640
|
-
const i =
|
|
641
|
-
return
|
|
737
|
+
const i = Ye(e).datasets;
|
|
738
|
+
return w(
|
|
642
739
|
i.flatMap((m) => {
|
|
643
|
-
const l = e.source &&
|
|
740
|
+
const l = e.source && Le(m, e.source) && H(e.source, n) || Se(m, t);
|
|
644
741
|
return l ? [l] : [];
|
|
645
742
|
})
|
|
646
743
|
);
|
|
647
744
|
}
|
|
648
|
-
function
|
|
649
|
-
const n =
|
|
745
|
+
function je(e, t) {
|
|
746
|
+
const n = pe(t), o = Fe(e), i = U(e.filters), r = [
|
|
650
747
|
...i,
|
|
651
|
-
...[...o, ...i].flatMap(
|
|
748
|
+
...[...o, ...i].flatMap(le)
|
|
652
749
|
];
|
|
653
|
-
return
|
|
654
|
-
[...o, ...
|
|
655
|
-
(s) =>
|
|
750
|
+
return w(
|
|
751
|
+
[...o, ...r].flatMap(
|
|
752
|
+
(s) => Re(s, t, n)
|
|
656
753
|
)
|
|
657
754
|
);
|
|
658
755
|
}
|
|
659
|
-
function
|
|
756
|
+
function Ve(e, t, n) {
|
|
660
757
|
var i;
|
|
661
|
-
return
|
|
758
|
+
return q(e) ? !!!((i = t == null ? void 0 : t.selectedEntities) != null && i.length) || !n ? e : H(e, pe(t)) : void 0;
|
|
662
759
|
}
|
|
663
|
-
function
|
|
760
|
+
function E(e, t) {
|
|
664
761
|
var p, l;
|
|
665
|
-
const n = Array.isArray(t == null ? void 0 : t.selectedEntities) ? t.selectedEntities.filter(k) : void 0, o =
|
|
666
|
-
if ((t == null ? void 0 : t.mode) === "semanticDomain" && !
|
|
762
|
+
const n = Array.isArray(t == null ? void 0 : t.selectedEntities) ? t.selectedEntities.filter(k) : void 0, o = I(n, e), i = o ? { ...e, ...o } : e, r = "domainId" in i && typeof i.domainId == "string" && !!i.domainId.trim();
|
|
763
|
+
if ((t == null ? void 0 : t.mode) === "semanticDomain" && !r)
|
|
667
764
|
return;
|
|
668
765
|
if ((t == null ? void 0 : t.mode) !== "database" && i.type === "dataset") {
|
|
669
|
-
const c =
|
|
766
|
+
const c = ve(
|
|
670
767
|
{
|
|
671
768
|
entities: [i],
|
|
672
769
|
semanticDomainId: t == null ? void 0 : t.semanticDomainId,
|
|
@@ -685,67 +782,67 @@ function I(e, t) {
|
|
|
685
782
|
}
|
|
686
783
|
if ((t == null ? void 0 : t.mode) === "semanticDomain")
|
|
687
784
|
return;
|
|
688
|
-
const s = i.connectionId || (t == null ? void 0 : t.connectionId),
|
|
689
|
-
if (!s || !
|
|
785
|
+
const s = i.connectionId || (t == null ? void 0 : t.connectionId), a = i.type === "dataset" && "table" in i && i.table ? i.table : i.name;
|
|
786
|
+
if (!s || !a)
|
|
690
787
|
return;
|
|
691
788
|
const m = {
|
|
692
789
|
kind: "physical",
|
|
693
790
|
connectionId: s,
|
|
694
791
|
connectionType: i.connectionType || (t == null ? void 0 : t.connectionType),
|
|
695
|
-
tableName:
|
|
792
|
+
tableName: a,
|
|
696
793
|
databaseName: i.database || ((p = t == null ? void 0 : t.dbSelection) == null ? void 0 : p.database),
|
|
697
794
|
schemaName: i.schema || ((l = t == null ? void 0 : t.dbSelection) == null ? void 0 : l.schema),
|
|
698
795
|
dialect: i.dialect
|
|
699
796
|
};
|
|
700
|
-
return
|
|
797
|
+
return q(m) ? m : void 0;
|
|
701
798
|
}
|
|
702
|
-
function
|
|
703
|
-
var
|
|
704
|
-
const n =
|
|
799
|
+
function xe(e, t) {
|
|
800
|
+
var a, m;
|
|
801
|
+
const n = E(e, t);
|
|
705
802
|
if (!n) return;
|
|
706
|
-
const o = e.type === "dataset" && "table" in e && typeof e.table == "string" ? e.table.trim() : void 0, i = n.kind === "physical" ? n.tableName : o,
|
|
707
|
-
connectionId:
|
|
708
|
-
databaseName: e.database || ((
|
|
803
|
+
const o = e.type === "dataset" && "table" in e && typeof e.table == "string" ? e.table.trim() : void 0, i = n.kind === "physical" ? n.tableName : o, r = e.connectionId || (t == null ? void 0 : t.connectionId), s = i && r ? {
|
|
804
|
+
connectionId: r,
|
|
805
|
+
databaseName: e.database || ((a = t == null ? void 0 : t.dbSelection) == null ? void 0 : a.database),
|
|
709
806
|
schemaName: e.schema || ((m = t == null ? void 0 : t.dbSelection) == null ? void 0 : m.schema),
|
|
710
807
|
tableName: i
|
|
711
808
|
} : void 0;
|
|
712
809
|
return { source: n, ...s ? { executionTable: s } : {} };
|
|
713
810
|
}
|
|
714
|
-
function
|
|
811
|
+
function He(e) {
|
|
715
812
|
const t = M(e.dataSource) ? e.dataSource : void 0;
|
|
716
813
|
if (typeof e.sql == "string" && e.sql.trim()) {
|
|
717
|
-
const
|
|
814
|
+
const a = [], m = Array.isArray(t == null ? void 0 : t.selectedEntities) ? t.selectedEntities : [];
|
|
718
815
|
for (const p of m) {
|
|
719
816
|
if (!k(p)) continue;
|
|
720
|
-
const l =
|
|
721
|
-
l && !
|
|
817
|
+
const l = xe(p, t);
|
|
818
|
+
l && !a.some(
|
|
722
819
|
(c) => A(
|
|
723
820
|
c.source,
|
|
724
821
|
l.source
|
|
725
822
|
)
|
|
726
|
-
) &&
|
|
823
|
+
) && a.push(l);
|
|
727
824
|
}
|
|
728
825
|
return {
|
|
729
826
|
cardId: e.id,
|
|
730
827
|
kind: "sql",
|
|
731
|
-
pinnedCatalogSources:
|
|
828
|
+
pinnedCatalogSources: a
|
|
732
829
|
};
|
|
733
830
|
}
|
|
734
831
|
if (!M(e.config))
|
|
735
832
|
return { cardId: e.id, kind: "unconfigured" };
|
|
736
|
-
const n = e.config, o = [], i =
|
|
833
|
+
const n = e.config, o = [], i = Me(e);
|
|
737
834
|
if (i.status === "invalid")
|
|
738
835
|
return { cardId: e.id, kind: "unconfigured" };
|
|
739
|
-
const
|
|
740
|
-
if (e.type === "matrixTable" && !
|
|
836
|
+
const r = i.status === "ready" ? i.config : void 0;
|
|
837
|
+
if (e.type === "matrixTable" && !r)
|
|
741
838
|
return { cardId: e.id, kind: "unconfigured" };
|
|
742
|
-
|
|
743
|
-
...
|
|
839
|
+
r && o.push(
|
|
840
|
+
...ke(r.spec).filter(q)
|
|
744
841
|
);
|
|
745
|
-
const s = (
|
|
842
|
+
const s = (r == null ? void 0 : r.spec.joinPlan) ?? (M(n.joinPlan) ? n.joinPlan : void 0);
|
|
746
843
|
if (s) {
|
|
747
|
-
const
|
|
748
|
-
for (const l of
|
|
844
|
+
const a = Array.isArray(s.joins) ? s.joins : [], m = [s.baseEntity];
|
|
845
|
+
for (const l of a)
|
|
749
846
|
M(l) && m.push(l.source, l.target);
|
|
750
847
|
let p = !1;
|
|
751
848
|
for (const l of m) {
|
|
@@ -753,21 +850,21 @@ function xe(e) {
|
|
|
753
850
|
p = !0;
|
|
754
851
|
continue;
|
|
755
852
|
}
|
|
756
|
-
const c =
|
|
853
|
+
const c = E(l, t);
|
|
757
854
|
c ? o.push(c) : p = !0;
|
|
758
855
|
}
|
|
759
856
|
p && (o.length = 0);
|
|
760
857
|
} else if (e.type !== "matrixTable") {
|
|
761
|
-
const
|
|
762
|
-
if (
|
|
763
|
-
const p =
|
|
764
|
-
|
|
858
|
+
const a = Array.isArray(t == null ? void 0 : t.selectedEntities) ? t.selectedEntities : [];
|
|
859
|
+
if (a.length === 1 && k(a[0])) {
|
|
860
|
+
const p = E(
|
|
861
|
+
a[0],
|
|
765
862
|
t
|
|
766
863
|
);
|
|
767
864
|
p && o.push(p);
|
|
768
865
|
}
|
|
769
|
-
o.push(...
|
|
770
|
-
const m =
|
|
866
|
+
o.push(...je(n, t));
|
|
867
|
+
const m = Ve(
|
|
771
868
|
n.queryBaseSource,
|
|
772
869
|
t,
|
|
773
870
|
o.length > 0
|
|
@@ -777,65 +874,65 @@ function xe(e) {
|
|
|
777
874
|
return {
|
|
778
875
|
cardId: e.id,
|
|
779
876
|
kind: "config",
|
|
780
|
-
executableSources:
|
|
877
|
+
executableSources: w(o)
|
|
781
878
|
};
|
|
782
879
|
}
|
|
783
|
-
function
|
|
880
|
+
function yt(e, t) {
|
|
784
881
|
return (e.kind === "config" ? e.executableSources : e.kind === "sql" ? e.pinnedCatalogSources.map((o) => o.source) : []).some(
|
|
785
882
|
(o) => A(o, t)
|
|
786
883
|
);
|
|
787
884
|
}
|
|
788
|
-
function
|
|
885
|
+
function qe(e, t) {
|
|
789
886
|
if (e.kind === "config")
|
|
790
887
|
return e.executableSources.find(
|
|
791
888
|
(n) => A(n, t)
|
|
792
889
|
);
|
|
793
890
|
}
|
|
794
|
-
function
|
|
891
|
+
function Ct(e, t) {
|
|
795
892
|
var n;
|
|
796
|
-
return (n =
|
|
893
|
+
return (n = Ue(e, t)) == null ? void 0 : n.source;
|
|
797
894
|
}
|
|
798
|
-
function
|
|
895
|
+
function Ue(e, t) {
|
|
799
896
|
if (e.kind === "sql")
|
|
800
897
|
return e.pinnedCatalogSources.find(
|
|
801
898
|
(n) => A(n.source, t)
|
|
802
899
|
);
|
|
803
900
|
}
|
|
804
|
-
const
|
|
901
|
+
const me = {
|
|
805
902
|
rowMembers: !0,
|
|
806
903
|
columnMembers: !0,
|
|
807
904
|
cells: !0
|
|
808
905
|
};
|
|
809
|
-
function
|
|
906
|
+
function Ke(e, t) {
|
|
810
907
|
return {
|
|
811
908
|
enabled: t === "on",
|
|
812
909
|
fields: e.type === "detailTable" ? { kind: "clickedCell" } : { kind: "wholeRow" },
|
|
813
910
|
multipleSelection: !0,
|
|
814
911
|
selectionCheckboxes: "auto",
|
|
815
|
-
...e.type === "matrixTable" ? { matrixSources: { ...
|
|
912
|
+
...e.type === "matrixTable" ? { matrixSources: { ...me } } : {},
|
|
816
913
|
targets: { kind: "allSheets" },
|
|
817
914
|
cardMappings: []
|
|
818
915
|
};
|
|
819
916
|
}
|
|
820
|
-
const
|
|
821
|
-
function
|
|
917
|
+
const Je = ["string", "number", "boolean", "date", "datetime"];
|
|
918
|
+
function ze(e) {
|
|
822
919
|
return (e.kind === "semantic" ? [e.datasetId, e.datasetName] : [
|
|
823
920
|
e.tableName,
|
|
824
921
|
[e.databaseName, e.schemaName, e.tableName].filter(Boolean).join(".")
|
|
825
|
-
]).filter((t) => !!t).map((t) =>
|
|
922
|
+
]).filter((t) => !!t).map((t) => ie(t));
|
|
826
923
|
}
|
|
827
|
-
function
|
|
924
|
+
function Ge(e, t) {
|
|
828
925
|
if (t.kind !== "config" || e.expression || e.calculatedFormula) return;
|
|
829
|
-
const n =
|
|
830
|
-
if (!
|
|
926
|
+
const n = oe(e.dataType);
|
|
927
|
+
if (!Je.includes(n)) return;
|
|
831
928
|
let o;
|
|
832
929
|
if (e.source)
|
|
833
|
-
o =
|
|
930
|
+
o = qe(t, e.source);
|
|
834
931
|
else {
|
|
835
|
-
const i = [e.entityId, e.entityName, e.qualifiedEntityName].filter((s) => !!s).map((s) =>
|
|
836
|
-
(s) =>
|
|
932
|
+
const i = [e.entityId, e.entityName, e.qualifiedEntityName].filter((s) => !!s).map((s) => ie(s)), r = t.executableSources.filter(
|
|
933
|
+
(s) => ze(s).some((a) => i.includes(a))
|
|
837
934
|
);
|
|
838
|
-
|
|
935
|
+
r.length === 1 ? o = r[0] : !r.length && t.executableSources.length === 1 && (o = t.executableSources[0]);
|
|
839
936
|
}
|
|
840
937
|
if (!(!o || !e.name))
|
|
841
938
|
return {
|
|
@@ -845,7 +942,7 @@ function qe(e, t) {
|
|
|
845
942
|
...e.sourceField && e.sourceField !== e.name ? { sourceField: e.sourceField } : {}
|
|
846
943
|
};
|
|
847
944
|
}
|
|
848
|
-
function
|
|
945
|
+
function Qe(e, t) {
|
|
849
946
|
const { matrixSources: n, ...o } = t, i = t.fields.kind === "chosenColumns" ? {
|
|
850
947
|
kind: "chosenColumns",
|
|
851
948
|
clickedFieldKeys: [...new Set(t.fields.clickedFieldKeys)]
|
|
@@ -853,62 +950,62 @@ function Je(e, t) {
|
|
|
853
950
|
return {
|
|
854
951
|
...o,
|
|
855
952
|
fields: i,
|
|
856
|
-
...e.type === "matrixTable" ? { matrixSources: n ?? { ...
|
|
953
|
+
...e.type === "matrixTable" ? { matrixSources: n ?? { ...me } } : {}
|
|
857
954
|
};
|
|
858
955
|
}
|
|
859
|
-
function
|
|
956
|
+
function _t(e, t) {
|
|
860
957
|
var c, b;
|
|
861
958
|
if (e.clickToFilter)
|
|
862
|
-
return
|
|
863
|
-
const n =
|
|
864
|
-
(
|
|
959
|
+
return Qe(e, e.clickToFilter);
|
|
960
|
+
const n = Ke(e, t), o = (((c = e.interactionConfig) == null ? void 0 : c.interactions) ?? []).filter(
|
|
961
|
+
(d) => d.mode === "clickFilter"
|
|
865
962
|
);
|
|
866
963
|
if (!o.length) return n;
|
|
867
|
-
const i =
|
|
868
|
-
let
|
|
964
|
+
const i = He(e);
|
|
965
|
+
let r = !1;
|
|
869
966
|
const s = [];
|
|
870
|
-
for (const
|
|
871
|
-
if (((b =
|
|
872
|
-
|
|
967
|
+
for (const d of o) {
|
|
968
|
+
if (((b = d.trigger) == null ? void 0 : b.type) !== "attribute") {
|
|
969
|
+
r = !0;
|
|
873
970
|
continue;
|
|
874
971
|
}
|
|
875
|
-
const y =
|
|
876
|
-
|
|
972
|
+
const y = Ge(
|
|
973
|
+
d.trigger.field,
|
|
877
974
|
i
|
|
878
975
|
);
|
|
879
976
|
if (!y) {
|
|
880
|
-
|
|
977
|
+
r = !0;
|
|
881
978
|
continue;
|
|
882
979
|
}
|
|
883
|
-
const C =
|
|
980
|
+
const C = ye(y);
|
|
884
981
|
s.includes(C) || s.push(C);
|
|
885
982
|
}
|
|
886
|
-
const
|
|
887
|
-
(
|
|
983
|
+
const a = o.every(
|
|
984
|
+
(d) => d.applyToCardIds !== void 0
|
|
888
985
|
), m = [
|
|
889
|
-
...new Set(o.flatMap((
|
|
986
|
+
...new Set(o.flatMap((d) => d.applyToCardIds ?? []))
|
|
890
987
|
], p = o.filter(
|
|
891
|
-
(
|
|
892
|
-
), l =
|
|
893
|
-
...new Set(p.flatMap((
|
|
988
|
+
(d) => d.applyToCardIds === void 0
|
|
989
|
+
), l = a ? [] : [
|
|
990
|
+
...new Set(p.flatMap((d) => d.excludeCardIds ?? []))
|
|
894
991
|
].filter(
|
|
895
|
-
(
|
|
992
|
+
(d) => p.every((y) => {
|
|
896
993
|
var C;
|
|
897
|
-
return (C = y.excludeCardIds) == null ? void 0 : C.includes(
|
|
994
|
+
return (C = y.excludeCardIds) == null ? void 0 : C.includes(d);
|
|
898
995
|
})
|
|
899
996
|
);
|
|
900
997
|
return {
|
|
901
998
|
...n,
|
|
902
999
|
enabled: !0,
|
|
903
|
-
fields:
|
|
904
|
-
targets:
|
|
905
|
-
cardMappings: l.map((
|
|
1000
|
+
fields: r || !s.length ? { kind: "wholeRow" } : { kind: "chosenColumns", clickedFieldKeys: s },
|
|
1001
|
+
targets: a ? { kind: "cards", cardIds: m } : { kind: "allSheets" },
|
|
1002
|
+
cardMappings: l.map((d) => ({
|
|
906
1003
|
kind: "excluded",
|
|
907
|
-
cardId:
|
|
1004
|
+
cardId: d
|
|
908
1005
|
}))
|
|
909
1006
|
};
|
|
910
1007
|
}
|
|
911
|
-
const
|
|
1008
|
+
const ue = u.union([
|
|
912
1009
|
u.object({
|
|
913
1010
|
kind: u.literal("allSheets"),
|
|
914
1011
|
sheetKinds: u.array(u.enum(["dashboard", "document"])).optional()
|
|
@@ -920,15 +1017,15 @@ const ce = u.union([
|
|
|
920
1017
|
sheetId: u.string(),
|
|
921
1018
|
sectionIds: u.array(u.string())
|
|
922
1019
|
}).strict()
|
|
923
|
-
]),
|
|
1020
|
+
]), de = u.union([
|
|
924
1021
|
u.object({
|
|
925
1022
|
kind: u.literal("bound"),
|
|
926
1023
|
cardId: u.string().min(1),
|
|
927
1024
|
clickedFieldKey: u.string().min(1),
|
|
928
|
-
target: u.object({ kind: u.literal("field"), field:
|
|
1025
|
+
target: u.object({ kind: u.literal("field"), field: ge }).strict()
|
|
929
1026
|
}).strict(),
|
|
930
1027
|
u.object({ kind: u.literal("excluded"), cardId: u.string().min(1) }).strict()
|
|
931
|
-
]),
|
|
1028
|
+
]), vt = u.object({
|
|
932
1029
|
enabled: u.boolean(),
|
|
933
1030
|
fields: u.union([
|
|
934
1031
|
u.object({ kind: u.literal("wholeRow") }).strict(),
|
|
@@ -945,12 +1042,12 @@ const ce = u.union([
|
|
|
945
1042
|
columnMembers: u.boolean(),
|
|
946
1043
|
cells: u.boolean()
|
|
947
1044
|
}).strict().optional(),
|
|
948
|
-
targets:
|
|
949
|
-
cardMappings: u.array(
|
|
950
|
-
}).strict(),
|
|
951
|
-
targets:
|
|
952
|
-
cardMappings: u.array(
|
|
953
|
-
}).strict(),
|
|
1045
|
+
targets: ue,
|
|
1046
|
+
cardMappings: u.array(de)
|
|
1047
|
+
}).strict(), Yt = u.boolean(), Mt = u.object({
|
|
1048
|
+
targets: ue.nullable().optional(),
|
|
1049
|
+
cardMappings: u.array(de).nullable().optional()
|
|
1050
|
+
}).strict(), We = [
|
|
954
1051
|
"bar",
|
|
955
1052
|
"horizontalBar",
|
|
956
1053
|
"line",
|
|
@@ -959,25 +1056,25 @@ const ce = u.union([
|
|
|
959
1056
|
"combo",
|
|
960
1057
|
"stackedBar",
|
|
961
1058
|
"stackedLine"
|
|
962
|
-
],
|
|
963
|
-
|
|
1059
|
+
], Xe = new Set(
|
|
1060
|
+
We
|
|
964
1061
|
);
|
|
965
|
-
function
|
|
966
|
-
return typeof e == "string" &&
|
|
1062
|
+
function Ze(e) {
|
|
1063
|
+
return typeof e == "string" && Xe.has(e);
|
|
967
1064
|
}
|
|
968
|
-
function
|
|
969
|
-
return e === "detailTable" || e === "table" || e === "aggregateTable" || e === "pivotTable" || e === "custom" ||
|
|
1065
|
+
function kt(e) {
|
|
1066
|
+
return e === "detailTable" || e === "table" || e === "aggregateTable" || e === "pivotTable" || e === "custom" || Ze(e);
|
|
970
1067
|
}
|
|
971
|
-
function
|
|
1068
|
+
function ne(e) {
|
|
972
1069
|
return !!(e != null && e.trim());
|
|
973
1070
|
}
|
|
974
|
-
function
|
|
975
|
-
return
|
|
1071
|
+
function It(e) {
|
|
1072
|
+
return ne(e.sql) || ne(e.normalizedPython) ? "freeform" : e.hasExecutableConfig ? "config" : "none";
|
|
976
1073
|
}
|
|
977
1074
|
const P = {
|
|
978
1075
|
type: "temporal_bucket",
|
|
979
1076
|
presentation: { mode: "auto" }
|
|
980
|
-
},
|
|
1077
|
+
}, _ = {
|
|
981
1078
|
value: "auto",
|
|
982
1079
|
label: "Automatic",
|
|
983
1080
|
format: P
|
|
@@ -1009,9 +1106,9 @@ function Y(e) {
|
|
|
1009
1106
|
custom: !0
|
|
1010
1107
|
};
|
|
1011
1108
|
}
|
|
1012
|
-
const
|
|
1109
|
+
const K = {
|
|
1013
1110
|
second: [
|
|
1014
|
-
|
|
1111
|
+
_,
|
|
1015
1112
|
g("HH:mm:ss", "14:30:45 (HH:mm:ss)"),
|
|
1016
1113
|
g(
|
|
1017
1114
|
"YYYY-MM-DD HH:mm:ss",
|
|
@@ -1020,19 +1117,19 @@ const q = {
|
|
|
1020
1117
|
Y("DD/MM/YYYY HH:mm:ss")
|
|
1021
1118
|
],
|
|
1022
1119
|
minute: [
|
|
1023
|
-
|
|
1120
|
+
_,
|
|
1024
1121
|
g("HH:mm", "14:30 (HH:mm)"),
|
|
1025
1122
|
g("YYYY-MM-DD HH:mm", "2024-01-15 14:30 (YYYY-MM-DD HH:mm)"),
|
|
1026
1123
|
Y("DD/MM/YYYY HH:mm")
|
|
1027
1124
|
],
|
|
1028
1125
|
hour: [
|
|
1029
|
-
|
|
1126
|
+
_,
|
|
1030
1127
|
g("HH", "14 (HH)"),
|
|
1031
1128
|
g("YYYY-MM-DD HH", "2024-01-15 14 (YYYY-MM-DD HH)"),
|
|
1032
1129
|
Y("DD/MM/YYYY HH")
|
|
1033
1130
|
],
|
|
1034
1131
|
day: [
|
|
1035
|
-
|
|
1132
|
+
_,
|
|
1036
1133
|
g("YYYY-MM-DD", "2024-01-15 (YYYY-MM-DD)"),
|
|
1037
1134
|
g("MM/DD/YYYY", "01/15/2024 (MM/DD/YYYY)"),
|
|
1038
1135
|
g("DD/MM/YYYY", "15/01/2024 (DD/MM/YYYY)"),
|
|
@@ -1041,14 +1138,14 @@ const q = {
|
|
|
1041
1138
|
Y("YYYY/MM/DD")
|
|
1042
1139
|
],
|
|
1043
1140
|
week: [
|
|
1044
|
-
|
|
1141
|
+
_,
|
|
1045
1142
|
T("week_of_short", "Week of Jan 15, 2024"),
|
|
1046
1143
|
T("week_of_long", "Week of January 15, 2024"),
|
|
1047
1144
|
g("YYYY-MM-DD", "2024-01-15 (YYYY-MM-DD)"),
|
|
1048
1145
|
Y("YYYY/MM/DD")
|
|
1049
1146
|
],
|
|
1050
1147
|
month: [
|
|
1051
|
-
|
|
1148
|
+
_,
|
|
1052
1149
|
g("MMM YYYY", "Jan 2024 (MMM YYYY)"),
|
|
1053
1150
|
g("MMMM YYYY", "January 2024 (MMMM YYYY)"),
|
|
1054
1151
|
g("YYYY-MM", "2024-01 (YYYY-MM)"),
|
|
@@ -1057,16 +1154,16 @@ const q = {
|
|
|
1057
1154
|
Y("YYYY/MM")
|
|
1058
1155
|
],
|
|
1059
1156
|
quarter: [
|
|
1060
|
-
|
|
1157
|
+
_,
|
|
1061
1158
|
T("quarter_short", "Q1 2024"),
|
|
1062
1159
|
T("quarter_long", "1st Quarter 2024")
|
|
1063
1160
|
],
|
|
1064
1161
|
year: [
|
|
1065
|
-
|
|
1162
|
+
_,
|
|
1066
1163
|
g("YYYY", "2024 (YYYY)"),
|
|
1067
1164
|
g("YY", "24 (YY)")
|
|
1068
1165
|
]
|
|
1069
|
-
},
|
|
1166
|
+
}, et = {
|
|
1070
1167
|
second: "2026-07-31T14:05:09",
|
|
1071
1168
|
minute: "2026-07-31T14:05:00",
|
|
1072
1169
|
hour: "2026-07-31T14:00:00",
|
|
@@ -1076,9 +1173,9 @@ const q = {
|
|
|
1076
1173
|
quarter: "2026-07-01",
|
|
1077
1174
|
year: "2026-01-01"
|
|
1078
1175
|
};
|
|
1079
|
-
function
|
|
1080
|
-
return
|
|
1081
|
-
value:
|
|
1176
|
+
function tt(e, t, n = se) {
|
|
1177
|
+
return Ee({
|
|
1178
|
+
value: et[t],
|
|
1082
1179
|
metadata: {
|
|
1083
1180
|
kind: "temporal_bucket",
|
|
1084
1181
|
granularity: t,
|
|
@@ -1110,33 +1207,33 @@ function Qe(e, t, n = te) {
|
|
|
1110
1207
|
}
|
|
1111
1208
|
});
|
|
1112
1209
|
}
|
|
1113
|
-
function
|
|
1114
|
-
const o =
|
|
1115
|
-
(
|
|
1210
|
+
function Et(e, t, n = se) {
|
|
1211
|
+
const o = K[e], i = (t == null ? void 0 : t.presentation.mode) === "preset" ? t.presentation.preset : void 0, r = i && t && $(t, e).ok && !o.some(
|
|
1212
|
+
(a) => {
|
|
1116
1213
|
var m;
|
|
1117
|
-
return ((m =
|
|
1214
|
+
return ((m = a.format) == null ? void 0 : m.presentation.mode) === "preset" && a.format.presentation.preset === i;
|
|
1118
1215
|
}
|
|
1119
1216
|
) ? T(i, i) : void 0;
|
|
1120
|
-
return (
|
|
1121
|
-
if (!
|
|
1122
|
-
const m =
|
|
1123
|
-
|
|
1217
|
+
return (r ? [...o, r] : o).map((a) => {
|
|
1218
|
+
if (!a.format || a.custom) return a;
|
|
1219
|
+
const m = tt(
|
|
1220
|
+
a.format,
|
|
1124
1221
|
e,
|
|
1125
1222
|
n
|
|
1126
1223
|
);
|
|
1127
|
-
return
|
|
1128
|
-
...
|
|
1129
|
-
label: `${m} (${
|
|
1130
|
-
} :
|
|
1224
|
+
return a.format.presentation.mode === "pattern" ? {
|
|
1225
|
+
...a,
|
|
1226
|
+
label: `${m} (${a.format.presentation.pattern})`
|
|
1227
|
+
} : a.format.presentation.mode === "auto" ? { ...a, label: `Automatic (${m})` } : { ...a, label: m };
|
|
1131
1228
|
});
|
|
1132
1229
|
}
|
|
1133
|
-
function
|
|
1134
|
-
const n =
|
|
1230
|
+
function Tt(e, t) {
|
|
1231
|
+
const n = K[t];
|
|
1135
1232
|
if (e.presentation.mode === "pattern") {
|
|
1136
1233
|
const o = e.presentation.pattern, i = n.find(
|
|
1137
|
-
(
|
|
1234
|
+
(r) => {
|
|
1138
1235
|
var s;
|
|
1139
|
-
return ((s =
|
|
1236
|
+
return ((s = r.format) == null ? void 0 : s.presentation.mode) === "pattern" && r.format.presentation.pattern === o;
|
|
1140
1237
|
}
|
|
1141
1238
|
);
|
|
1142
1239
|
return {
|
|
@@ -1148,14 +1245,14 @@ function Ct(e, t) {
|
|
|
1148
1245
|
if (e.presentation.mode === "preset") {
|
|
1149
1246
|
const o = e.presentation.preset, i = n.find(
|
|
1150
1247
|
(s) => {
|
|
1151
|
-
var
|
|
1152
|
-
return ((
|
|
1248
|
+
var a;
|
|
1249
|
+
return ((a = s.format) == null ? void 0 : a.presentation.mode) === "preset" && s.format.presentation.preset === o;
|
|
1153
1250
|
}
|
|
1154
|
-
),
|
|
1251
|
+
), r = $(
|
|
1155
1252
|
e,
|
|
1156
1253
|
t
|
|
1157
1254
|
).ok;
|
|
1158
|
-
return i ? { value: i.value, customPattern: "", format: e } :
|
|
1255
|
+
return i ? { value: i.value, customPattern: "", format: e } : r ? {
|
|
1159
1256
|
value: `preset:${o}`,
|
|
1160
1257
|
customPattern: "",
|
|
1161
1258
|
format: e
|
|
@@ -1163,67 +1260,73 @@ function Ct(e, t) {
|
|
|
1163
1260
|
}
|
|
1164
1261
|
return { value: "auto", customPattern: "", format: e };
|
|
1165
1262
|
}
|
|
1166
|
-
function
|
|
1263
|
+
function At(e, t, n = "") {
|
|
1167
1264
|
var s;
|
|
1168
|
-
const o =
|
|
1169
|
-
(
|
|
1170
|
-
), i = t.startsWith("preset:") ? t.slice(7) : void 0,
|
|
1265
|
+
const o = K[e].find(
|
|
1266
|
+
(a) => a.value === t
|
|
1267
|
+
), i = t.startsWith("preset:") ? t.slice(7) : void 0, r = t === "custom" ? {
|
|
1171
1268
|
type: "temporal_bucket",
|
|
1172
1269
|
presentation: {
|
|
1173
1270
|
mode: "pattern",
|
|
1174
1271
|
pattern: n.trim() || (((s = o == null ? void 0 : o.format) == null ? void 0 : s.presentation.mode) === "pattern" ? o.format.presentation.pattern : "")
|
|
1175
1272
|
}
|
|
1176
|
-
} : (o == null ? void 0 : o.format) ?? (i &&
|
|
1273
|
+
} : (o == null ? void 0 : o.format) ?? (i && Ie(i) ? {
|
|
1177
1274
|
type: "temporal_bucket",
|
|
1178
1275
|
presentation: {
|
|
1179
1276
|
mode: "preset",
|
|
1180
1277
|
preset: i
|
|
1181
1278
|
}
|
|
1182
1279
|
} : void 0);
|
|
1183
|
-
return !
|
|
1280
|
+
return !r || !$(r, e).ok ? P : r;
|
|
1184
1281
|
}
|
|
1185
|
-
function
|
|
1282
|
+
function Dt(e, t) {
|
|
1186
1283
|
return $(e, t).ok ? e : P;
|
|
1187
1284
|
}
|
|
1188
|
-
const
|
|
1285
|
+
const fe = [
|
|
1189
1286
|
{ value: "COUNT", label: "Count" },
|
|
1190
1287
|
{ value: "DISTINCT", label: "Count Distinct" }
|
|
1191
|
-
],
|
|
1192
|
-
...
|
|
1288
|
+
], nt = [
|
|
1289
|
+
...fe,
|
|
1193
1290
|
{ value: "SUM", label: "Sum" },
|
|
1194
1291
|
{ value: "AVG", label: "Average" },
|
|
1195
1292
|
{ value: "MIN", label: "Min" },
|
|
1196
1293
|
{ value: "MAX", label: "Max" },
|
|
1197
1294
|
{ value: "MEDIAN", label: "Median" }
|
|
1198
1295
|
];
|
|
1199
|
-
function
|
|
1200
|
-
return
|
|
1296
|
+
function Nt(e) {
|
|
1297
|
+
return oe(e) === "number" ? nt : fe;
|
|
1201
1298
|
}
|
|
1202
1299
|
export {
|
|
1203
1300
|
P as A,
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
qe as
|
|
1220
|
-
|
|
1301
|
+
Nt as B,
|
|
1302
|
+
bt as C,
|
|
1303
|
+
J as D,
|
|
1304
|
+
gt as E,
|
|
1305
|
+
We as S,
|
|
1306
|
+
It as a,
|
|
1307
|
+
Tt as b,
|
|
1308
|
+
vt as c,
|
|
1309
|
+
At as d,
|
|
1310
|
+
Dt as e,
|
|
1311
|
+
E as f,
|
|
1312
|
+
Et as g,
|
|
1313
|
+
He as h,
|
|
1314
|
+
Ze as i,
|
|
1315
|
+
yt as j,
|
|
1316
|
+
qe as k,
|
|
1317
|
+
Ct as l,
|
|
1318
|
+
Ue as m,
|
|
1319
|
+
z as n,
|
|
1320
|
+
Te as o,
|
|
1321
|
+
tt as p,
|
|
1221
1322
|
ut as q,
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1323
|
+
Yt as r,
|
|
1324
|
+
kt as s,
|
|
1325
|
+
ht as t,
|
|
1326
|
+
dt as u,
|
|
1327
|
+
ft as v,
|
|
1328
|
+
Ke as w,
|
|
1329
|
+
Ge as x,
|
|
1330
|
+
_t as y,
|
|
1331
|
+
Mt as z
|
|
1229
1332
|
};
|