react-semaphor 0.1.603 → 0.1.605
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/activity/index.js +1 -73
- package/dist/analytics-protocol/index.js +1 -1491
- package/dist/appearance/index.js +1 -12
- package/dist/appearance-runtime/index.js +1 -5
- package/dist/assistant-context/index.js +1 -11
- package/dist/assistant-protocol/index.js +1 -152
- package/dist/brand-studio/index.js +3 -1598
- package/dist/briefings/index.js +1 -70
- package/dist/chunks/add-to-dashboard-CEmZUf9o.js +12 -0
- package/dist/chunks/analytics-base-schemas-DMFrDqn_.js +1 -0
- package/dist/chunks/appearance-provider-CfoAVQuG.js +608 -0
- package/dist/chunks/appearance-runtime-provider-Bx8H-moR.js +1 -0
- package/dist/chunks/applied-constraints-CinevlKD.js +1 -0
- package/dist/chunks/assistant-chat-DgUaCE9k.js +51 -0
- package/dist/chunks/attachment-filter-line-C_zHMhGh.js +1 -0
- package/dist/chunks/attribution-BEFSsbNn.js +1 -0
- package/dist/chunks/availability-3AIOf6Z-.js +1 -0
- package/dist/chunks/bookmark-impact-BAtemeyK.js +1 -0
- package/dist/chunks/bookmark-state-DScd31KT.js +1 -0
- package/dist/chunks/brand-C9APUFaP.js +1 -0
- package/dist/chunks/card-filter-builder-ClWrXB7P.js +11 -0
- package/dist/chunks/column-bands-DwxbZ6UI.js +1 -0
- package/dist/chunks/comparison-window-caption-tguyN24S.js +1 -0
- package/dist/chunks/context-CntvtZwC.js +2 -0
- package/dist/chunks/conversation-JMK2kyTK.js +1 -0
- package/dist/chunks/dashboard-ChIcbVTx.js +1 -0
- package/dist/chunks/dashboard-briefing-launcher-CwMlhkxV.js +42 -0
- package/dist/chunks/dashboard-controls-UCSAFCGA.js +42 -0
- package/dist/chunks/dashboard-json-B120hYDa.js +1 -0
- package/dist/chunks/dashboard-temporal-snapshot-BFJKbp_6.js +1 -0
- package/dist/chunks/edit-dashboard-visual-DvHp03h_.js +73 -0
- package/dist/chunks/export-file-format-B-wQNHIn.js +4 -0
- package/dist/chunks/filter-line-WwUV5JzN.js +1 -0
- package/dist/chunks/filter-reach-preview-C5M5_hf_.js +1 -0
- package/dist/chunks/filter-value-text-DqTHe_vu.js +1 -0
- package/dist/chunks/index-DViPGDFj.js +1 -0
- package/dist/chunks/index-bkP6SnYu.js +1 -0
- package/dist/chunks/kpi-trend-rule-B87LNzcz.js +1 -0
- package/dist/chunks/layout-grid-CFzqJ7GC.js +6 -0
- package/dist/chunks/matrix-analytical-definition-5T-2euHZ.js +1 -0
- package/dist/chunks/matrix-member-presentation-vVAv-aqg.js +1 -0
- package/dist/chunks/matrix-operation-contract-CWvcEsQ0.js +1 -0
- package/dist/chunks/normalize-dashboard-for-dirty-check-ILKfqgL3.js +1 -0
- package/dist/chunks/numeric-range-options-C8tr-Bls.js +1 -0
- package/dist/chunks/palette-NvEIuXHN.js +6 -0
- package/dist/chunks/pivot-result-contract-expectations-BNWhS8mv.js +1 -0
- package/dist/chunks/pivot-result-identity-B0eWVMXg.js +1 -0
- package/dist/chunks/raw-temporal-value-BHQ-ldpW.js +1 -0
- package/dist/chunks/rendered-file-BbvwaU6z.js +1 -0
- package/dist/chunks/report-preferences-dialog-Bseb2Rlg.js +1 -0
- package/dist/chunks/report-runtime-context-Cd1b5pku.js +1 -0
- package/dist/chunks/resolve-dashboard-input-context-BDY7KwRe.js +8 -0
- package/dist/chunks/resolver-CjsW8Rz0.js +1 -0
- package/dist/chunks/saved-dashboard-context-C3lWc4Dx.js +1 -0
- package/dist/chunks/schema-O1Y3WTGF.js +4 -0
- package/dist/chunks/selection-filter-compiler-kYsRugss.js +1 -0
- package/dist/chunks/semaphor-ready-indicator-BQarSo6S.js +612 -0
- package/dist/chunks/set-6mOnfQeH.js +1 -0
- package/dist/chunks/slider-BPnHdMGq.js +4 -0
- package/dist/chunks/stored-dashboard-DfrxDLhR.js +1 -0
- package/dist/chunks/table-export-sheet-xaczzWZF.js +2 -0
- package/dist/chunks/token-types-1vzMWjI-.js +1 -0
- package/dist/chunks/validators-Dg2kyF4_.js +1 -0
- package/dist/chunks/variable-draft-B4_xqr4Y.js +1 -0
- package/dist/chunks/visual-choice-DgEFfkE-.js +1 -0
- package/dist/dashboard/index.js +1 -7
- package/dist/dashboard-authoring/index.js +1 -4614
- package/dist/format-utils/index.js +1 -425
- package/dist/index.js +1 -554
- package/dist/layouts/index.js +1 -7
- package/dist/live-channel/index.js +1 -124
- package/dist/pdf-export-policy/index.js +1 -92
- package/dist/pdf-table-layout/index.js +1 -993
- package/dist/report-runtime-context/index.js +1 -9
- package/dist/shared/index.js +1 -6
- package/dist/style.css +1 -1
- package/dist/surfboard/index.js +1 -9
- package/dist/types/brand-studio/brand-studio-draft.d.ts +45 -13
- package/dist/types/brand-studio/brand-studio-editor.d.ts +13 -2
- package/dist/types/components/index.d.ts +1 -0
- package/dist/types/components/visual/data-table/hooks/use-data-table-logic.d.ts +17 -6
- package/dist/types/components/visual/data-table/types/data-table.d.ts +52 -42
- package/dist/types/index.js +1 -88
- package/dist/types/lib/appearance/aliases.d.ts +3 -0
- package/dist/types/lib/appearance/index.d.ts +1 -0
- package/dist/types/lib/appearance/table-density.d.ts +18 -0
- package/dist/types/lib/appearance/types.d.ts +39 -1
- package/dist/types/lib/dashboard-viewer/column-header-actions.d.ts +100 -0
- package/dist/types/lib/dashboard-viewer/table-view-edit.d.ts +0 -27
- package/dist/types/lib/dashboard-viewer/table-view.d.ts +26 -2
- package/dist/types/lib/dashboard-viewer/use-table-view.d.ts +2 -0
- package/dist/types/lib/filter-values/build-card-filter-definition.d.ts +32 -0
- package/dist/types/lib/hooks/use-add-new-frame.d.ts +7 -0
- package/dist/types/lib/hooks/use-dashboard-card.d.ts +4 -0
- package/dist/types/lib/interactions/get-click-context-from-chartjs.d.ts +8 -0
- package/dist/types/lib/query-context/dashboard-filter-mapping-resolution.d.ts +9 -0
- package/dist/types/lib/stores/dashboard-store.d.ts +14 -2
- package/dist/types/lib/stores/explorer-actions.d.ts +7 -10
- package/dist/types/lib/types/common-types.d.ts +1 -2
- package/dist/types/lib/types/semantic-types.d.ts +6 -10
- package/dist/types/lib/utils/card-config-utils.d.ts +13 -0
- package/dist/types/lib/utils/field-placement.d.ts +17 -0
- package/dist/types/lib/utils/field-state-calculator.d.ts +7 -19
- package/dist/types/shared/analytics-protocol/analytics-refusal.d.ts +21 -1
- package/dist/types/shared/analytics-protocol/field-provenance.d.ts +7 -4
- package/dist/types/shared/dashboard-authoring/calculations/definition.d.ts +13 -0
- package/dist/types/shared/dashboard-authoring/card-data-source/card-base.d.ts +125 -0
- package/dist/types/shared/dashboard-authoring/card-data-source/card-field-folders.d.ts +55 -0
- package/dist/types/shared/dashboard-authoring/card-data-source/card-joins.d.ts +114 -0
- package/dist/types/shared/dashboard-authoring/card-data-source/card-prune.d.ts +12 -0
- package/dist/types/shared/dashboard-authoring/card-data-source/filter-field-catalog.d.ts +60 -0
- package/dist/types/shared/dashboard-authoring/card-data-source/filter-field-folders.d.ts +180 -0
- package/dist/types/shared/dashboard-authoring/card-data-source/index.d.ts +7 -0
- package/dist/types/shared/dashboard-authoring/card-data-source/join-reach.d.ts +42 -0
- package/dist/types/shared/dashboard-authoring/card-field-places.d.ts +28 -0
- package/dist/types/shared/dashboard-authoring/card-settings/card-display-write.d.ts +2 -8
- package/dist/types/shared/dashboard-authoring/card-settings/card-kinds.d.ts +1 -1
- package/dist/types/shared/dashboard-authoring/card-settings/column-display-values.d.ts +5 -0
- package/dist/types/shared/dashboard-authoring/card-settings/column-display.d.ts +52 -0
- package/dist/types/shared/dashboard-authoring/card-settings/index.d.ts +1 -0
- package/dist/types/shared/dashboard-authoring/card-settings/inputs.d.ts +9 -0
- package/dist/types/shared/dashboard-authoring/card-settings/resolved.d.ts +4 -0
- package/dist/types/shared/dashboard-authoring/card-settings/table-viewer-switches.d.ts +15 -0
- package/dist/types/shared/dashboard-authoring/card-settings/views.d.ts +5 -0
- package/dist/types/shared/dashboard-authoring/changes/card-query-part.d.ts +6 -0
- package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +132 -3
- package/dist/types/shared/dashboard-authoring/changes/diagnostics.d.ts +3 -1
- package/dist/types/shared/dashboard-authoring/conditional-formatting/schema.d.ts +10 -10
- package/dist/types/shared/dashboard-authoring/conditional-formatting/store.d.ts +10 -1
- package/dist/types/shared/dashboard-authoring/field-aggregations.d.ts +9 -2
- package/dist/types/shared/dashboard-authoring/field-folders/field-folders.d.ts +116 -0
- package/dist/types/shared/dashboard-authoring/field-folders/index.d.ts +1 -0
- package/dist/types/shared/dashboard-authoring/filter-reach-decision.d.ts +11 -0
- package/dist/types/shared/dashboard-authoring/index.d.ts +7 -1
- package/dist/types/shared/dashboard-authoring/operations/card-operations.d.ts +2 -0
- package/dist/types/shared/dashboard-authoring/operations/operation-types.d.ts +7 -2
- package/dist/types/shared/dashboard-authoring/outline/outline-dashboard.d.ts +6 -2
- package/dist/types/shared/dashboard-authoring/outline/outline-filters.d.ts +2 -0
- package/dist/types/shared/dashboard-authoring/see-records/result.d.ts +7 -22
- package/dist/types/shared/dashboard-authoring/sheet-kinds.d.ts +36 -0
- package/dist/types/shared/dashboard-authoring/table-sheet-shape.d.ts +140 -0
- package/dist/types/shared/dashboard-viewer/table-column-move.d.ts +15 -0
- package/dist/types/shared/dashboard-viewer/table-settings.d.ts +8 -2
- package/dist/types/shared/format-utils/types/format-types.d.ts +1 -1
- package/dist/usage-events/index.js +1 -285
- package/dist/value-format-preferences/index.js +1 -635
- package/package.json +5 -2
- package/dist/chunks/add-to-dashboard-CFF-wFU-.js +0 -291
- package/dist/chunks/analytics-base-schemas-DsUh5Q3C.js +0 -680
- package/dist/chunks/appearance-context-BwBp25ZG.js +0 -162
- package/dist/chunks/appearance-runtime-provider-BRHYELkC.js +0 -80
- package/dist/chunks/applied-constraints-DU-wndZ7.js +0 -47
- package/dist/chunks/assistant-chat-B6hNQI1t.js +0 -6115
- package/dist/chunks/attribution-BvoKvhcj.js +0 -32
- package/dist/chunks/availability-Bp5Gfu1I.js +0 -44
- package/dist/chunks/bookmark-impact-Ba2PLcGp.js +0 -76
- package/dist/chunks/bookmark-state-n7AaNzR_.js +0 -1667
- package/dist/chunks/brand-BoUV0iHF.js +0 -54
- package/dist/chunks/card-filter-builder-Y22HizVx.js +0 -4069
- package/dist/chunks/column-bands-RdM-kjDe.js +0 -47
- package/dist/chunks/comparison-window-caption-Ck2TIbnR.js +0 -741
- package/dist/chunks/context-UCQ7sere.js +0 -369
- package/dist/chunks/conversation-sQiWYUOb.js +0 -16
- package/dist/chunks/dashboard-BghI99oY.js +0 -14
- package/dist/chunks/dashboard-briefing-launcher-DtBAnGiH.js +0 -4875
- package/dist/chunks/dashboard-controls-CtFXlyjV.js +0 -2290
- package/dist/chunks/dashboard-json-DfGBUtCd.js +0 -66
- package/dist/chunks/dates-BnrXF4bb.js +0 -185
- package/dist/chunks/edit-9df1zOWe.js +0 -226
- package/dist/chunks/edit-dashboard-visual-oxt3x1wb.js +0 -18397
- package/dist/chunks/export-file-format-C-tJsxsf.js +0 -111
- package/dist/chunks/filter-line-Cy5YYqRL.js +0 -703
- package/dist/chunks/filter-reach-copy-CE_ZX147.js +0 -5111
- package/dist/chunks/filter-value-text-fWvSDwkl.js +0 -153
- package/dist/chunks/index-BVKzKl5d.js +0 -90
- package/dist/chunks/index-CV_Kzou0.js +0 -595
- package/dist/chunks/index-D5rxbtS4.js +0 -2795
- package/dist/chunks/layout-grid-9LndRoLa.js +0 -16
- package/dist/chunks/matrix-analytical-definition-CCp48UCw.js +0 -1233
- package/dist/chunks/matrix-member-presentation-zNehruXR.js +0 -391
- package/dist/chunks/matrix-operation-contract-DPBj69D8.js +0 -1413
- package/dist/chunks/metric-comparison-B0FR-Q8I.js +0 -600
- package/dist/chunks/normalize-dashboard-for-dirty-check-XKgH3GFX.js +0 -119
- package/dist/chunks/paintbrush-58FQYY-y.js +0 -27
- package/dist/chunks/palette-Be62Tkoa.js +0 -23
- package/dist/chunks/pickers-DkqmtnTL.js +0 -2403
- package/dist/chunks/pivot-result-contract-expectations-BYqAmG9n.js +0 -5092
- package/dist/chunks/pivot-result-identity-CAP4--iq.js +0 -77
- package/dist/chunks/raw-temporal-value-Dg_MTFF7.js +0 -3778
- package/dist/chunks/rendered-file-D8xEuVVx.js +0 -108
- package/dist/chunks/report-preferences-dialog-uJp9GBTM.js +0 -1651
- package/dist/chunks/report-runtime-context-c77_KF9v.js +0 -388
- package/dist/chunks/resolve-dashboard-input-context-Rtl1ffmE.js +0 -25324
- package/dist/chunks/resolver-DG_tfEpt.js +0 -156
- package/dist/chunks/save-C5A0JnEV.js +0 -21
- package/dist/chunks/saved-dashboard-context-tcyTU8jm.js +0 -618
- package/dist/chunks/schema-C9NPiIru.js +0 -2568
- package/dist/chunks/selection-filter-compiler-DNijjI5y.js +0 -150
- package/dist/chunks/semaphor-ready-indicator-FBvunj6S.js +0 -145603
- package/dist/chunks/shelf-drop-preview-context-QKStrcK9.js +0 -2466
- package/dist/chunks/stored-dashboard-CHozcAY9.js +0 -4075
- package/dist/chunks/style-sheet-parts-CDCG-8Ej.js +0 -8681
- package/dist/chunks/table-export-sheet-ZFIvs6Sj.js +0 -949
- package/dist/chunks/token-types-XbM6QByy.js +0 -8
- package/dist/chunks/upload-H15d7uHK.js +0 -15
- package/dist/chunks/validators-Baf3VIf5.js +0 -3686
- package/dist/chunks/variable-draft-C2y8Jp6Z.js +0 -242
- package/dist/chunks/visual-choice-DDfHfHvY.js +0 -172
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { jsxs as d, jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { useMemo as u, useState as f, useRef as b, useEffect as p } from "react";
|
|
3
|
-
import { u as o } from "./semaphor-ready-indicator-FBvunj6S.js";
|
|
4
|
-
import { B as S, X as N, C as D } from "./style-sheet-parts-CDCG-8Ej.js";
|
|
5
|
-
import { c as J } from "./pickers-DkqmtnTL.js";
|
|
6
|
-
import "./validators-Baf3VIf5.js";
|
|
7
|
-
import "./matrix-operation-contract-DPBj69D8.js";
|
|
8
|
-
import "./analytics-base-schemas-DsUh5Q3C.js";
|
|
9
|
-
import "../value-format-preferences/index.js";
|
|
10
|
-
function z() {
|
|
11
|
-
const r = o((s) => s.dashboard), c = o((s) => s.actions.setDashboard), h = o(
|
|
12
|
-
(s) => s.showDashboardJSON
|
|
13
|
-
), l = o(
|
|
14
|
-
(s) => s.actions.setShowDashboardJSON
|
|
15
|
-
), a = u(
|
|
16
|
-
() => r ? JSON.stringify(r, null, 2) : "",
|
|
17
|
-
[r]
|
|
18
|
-
), [m, n] = f(a), e = b(a);
|
|
19
|
-
return p(() => {
|
|
20
|
-
a !== e.current && (n(a), e.current = a);
|
|
21
|
-
}, [a]), /* @__PURE__ */ d(
|
|
22
|
-
"div",
|
|
23
|
-
{
|
|
24
|
-
className: J("relative p-2", {
|
|
25
|
-
hidden: !h
|
|
26
|
-
}),
|
|
27
|
-
children: [
|
|
28
|
-
/* @__PURE__ */ d(
|
|
29
|
-
S,
|
|
30
|
-
{
|
|
31
|
-
variant: "secondary",
|
|
32
|
-
size: "sm",
|
|
33
|
-
className: "absolute right-2 top-2 z-10 h-8",
|
|
34
|
-
onClick: () => l(!1),
|
|
35
|
-
children: [
|
|
36
|
-
/* @__PURE__ */ t(N, { className: "mr-2 h-4 w-4" }),
|
|
37
|
-
"Close"
|
|
38
|
-
]
|
|
39
|
-
}
|
|
40
|
-
),
|
|
41
|
-
/* @__PURE__ */ t("div", { className: "h-[550px] overflow-hidden", children: /* @__PURE__ */ t(
|
|
42
|
-
D,
|
|
43
|
-
{
|
|
44
|
-
value: m,
|
|
45
|
-
onValueChange: (s) => {
|
|
46
|
-
n(s);
|
|
47
|
-
try {
|
|
48
|
-
const i = JSON.parse(s);
|
|
49
|
-
e.current = JSON.stringify(
|
|
50
|
-
i,
|
|
51
|
-
null,
|
|
52
|
-
2
|
|
53
|
-
), c(i);
|
|
54
|
-
} catch {
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
language: "json"
|
|
58
|
-
}
|
|
59
|
-
) })
|
|
60
|
-
]
|
|
61
|
-
}
|
|
62
|
-
);
|
|
63
|
-
}
|
|
64
|
-
export {
|
|
65
|
-
z as default
|
|
66
|
-
};
|
|
@@ -1,185 +0,0 @@
|
|
|
1
|
-
import { k as w, m as b, n as F, r as y, e as p, o as k, p as T, q as N } from "./resolve-dashboard-input-context-Rtl1ffmE.js";
|
|
2
|
-
import { d as I, g as v } from "./filter-reach-copy-CE_ZX147.js";
|
|
3
|
-
import "./validators-Baf3VIf5.js";
|
|
4
|
-
import "./matrix-operation-contract-DPBj69D8.js";
|
|
5
|
-
import "./analytics-base-schemas-DsUh5Q3C.js";
|
|
6
|
-
import "zod";
|
|
7
|
-
import "./pivot-result-contract-expectations-BYqAmG9n.js";
|
|
8
|
-
import "../value-format-preferences/index.js";
|
|
9
|
-
import { D as C, F as P, G as S } from "./bookmark-state-n7AaNzR_.js";
|
|
10
|
-
import "./schema-C9NPiIru.js";
|
|
11
|
-
import "./index-CV_Kzou0.js";
|
|
12
|
-
import "./context-UCQ7sere.js";
|
|
13
|
-
import { u as R, w as q } from "./selection-filter-compiler-DNijjI5y.js";
|
|
14
|
-
import { b as g } from "./raw-temporal-value-Dg_MTFF7.js";
|
|
15
|
-
import { p as _, r as W } from "./stored-dashboard-CHozcAY9.js";
|
|
16
|
-
import { g as E } from "./saved-dashboard-context-tcyTU8jm.js";
|
|
17
|
-
function ae(e, n, r) {
|
|
18
|
-
const i = e.findIndex((s) => s.id === n);
|
|
19
|
-
if (i === -1) return e;
|
|
20
|
-
const t = e.filter((s, l) => l !== i), a = Math.max(0, Math.min(Math.trunc(r), t.length));
|
|
21
|
-
return a === i ? e : [...t.slice(0, a), e[i], ...t.slice(a)];
|
|
22
|
-
}
|
|
23
|
-
const $ = /* @__PURE__ */ new Set([
|
|
24
|
-
"bar",
|
|
25
|
-
"line",
|
|
26
|
-
"pie",
|
|
27
|
-
"doughnut",
|
|
28
|
-
"table",
|
|
29
|
-
"detailTable",
|
|
30
|
-
"stackedBar",
|
|
31
|
-
"stackedLine",
|
|
32
|
-
"horizontalBar",
|
|
33
|
-
"radar",
|
|
34
|
-
"polarArea",
|
|
35
|
-
"scatter",
|
|
36
|
-
"bubble",
|
|
37
|
-
"funnel",
|
|
38
|
-
"custom"
|
|
39
|
-
]);
|
|
40
|
-
function oe(e) {
|
|
41
|
-
return !!(e && $.has(e));
|
|
42
|
-
}
|
|
43
|
-
const M = 250;
|
|
44
|
-
function se(e) {
|
|
45
|
-
return {
|
|
46
|
-
id: e.id,
|
|
47
|
-
...w(e.field, {
|
|
48
|
-
dataSource: e.dataSource,
|
|
49
|
-
connectionId: e.connectionId
|
|
50
|
-
}),
|
|
51
|
-
width: M
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
function de(e, n, r) {
|
|
55
|
-
const i = e.flatMap((t) => {
|
|
56
|
-
if (r !== void 0 && t.id !== r) return [];
|
|
57
|
-
const a = (t.inlineFilters ?? []).findIndex((s) => s.id === n);
|
|
58
|
-
return a === -1 ? [] : [{ card: t, filter: t.inlineFilters[a], index: a }];
|
|
59
|
-
});
|
|
60
|
-
return i.length === 1 ? { kind: "found", ...i[0] } : i.length > 1 ? { kind: "ambiguous", cards: i.map((t) => t.card) } : { kind: "none" };
|
|
61
|
-
}
|
|
62
|
-
const le = ["hour", "day", "week", "month", "quarter", "year"], ce = 12, x = {
|
|
63
|
-
automatic: "Automatic",
|
|
64
|
-
card: "Set on this card",
|
|
65
|
-
trend_by: "From Trend By"
|
|
66
|
-
};
|
|
67
|
-
function ue(e, n, r = {}) {
|
|
68
|
-
if (!e) return;
|
|
69
|
-
const i = e.granularity;
|
|
70
|
-
if (e.skipped)
|
|
71
|
-
return {
|
|
72
|
-
head: `Too many points by ${i}`,
|
|
73
|
-
// A Trend By sets the grain, so the fix is there (ledger P3-05).
|
|
74
|
-
detail: e.grainSource === "trend_by" ? "Pick a coarser grain on the Trend By." : "Pick a coarser grain, or Automatic."
|
|
75
|
-
};
|
|
76
|
-
const t = x[e.grainSource], a = e.span === "recent" ? `The last 12 ${i}s: no date range` : e.span === "history" ? `The 12 ${i}s ending with this one` : e.window ? I({ ...e.window, timezone: e.calendar.tz }, r.now) : void 0;
|
|
77
|
-
return {
|
|
78
|
-
head: `By ${i} · ${n} ${n === 1 ? "point" : "points"}`,
|
|
79
|
-
detail: a ? `${a} · ${t}` : t
|
|
80
|
-
};
|
|
81
|
-
}
|
|
82
|
-
function A(e, n) {
|
|
83
|
-
var i;
|
|
84
|
-
if (n.status === "blocked" || (i = e.sql) != null && i.trim()) return [];
|
|
85
|
-
const r = new Set(
|
|
86
|
-
n.mappingDispositions.flatMap(
|
|
87
|
-
(t) => t.status === "apply" ? [t.filterValue.filterId] : []
|
|
88
|
-
)
|
|
89
|
-
);
|
|
90
|
-
return n.cardFilterValues.filter((t) => {
|
|
91
|
-
const a = n.queryFilterDefinitions.find(
|
|
92
|
-
(c) => c.id === t.filterId
|
|
93
|
-
);
|
|
94
|
-
if (!b(t)) return !1;
|
|
95
|
-
if (!(r.has(t.filterId) || (a == null ? void 0 : a.kind) === "global-date"))
|
|
96
|
-
return !!(a && B(
|
|
97
|
-
[a],
|
|
98
|
-
n.resolvedPrimaryDateField,
|
|
99
|
-
[t]
|
|
100
|
-
));
|
|
101
|
-
const l = F(t);
|
|
102
|
-
return !!(l && y({
|
|
103
|
-
card: e,
|
|
104
|
-
filter: l,
|
|
105
|
-
filterValue: t,
|
|
106
|
-
effectiveFilterValue: t,
|
|
107
|
-
temporalBinding: n.resolvedPrimaryDateField
|
|
108
|
-
}).status === "eligible");
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
|
-
function B(e, n, r) {
|
|
112
|
-
if (!n) return !1;
|
|
113
|
-
const i = n.qualifiedFieldName, t = n.qualifiedEntityName, a = t && n.name ? `${t}.${n.name}` : i;
|
|
114
|
-
return e.some((s) => {
|
|
115
|
-
if (!(p(s.dataType || "") === "date")) return !1;
|
|
116
|
-
const c = v(s, r), d = c.split("."), f = d[d.length - 1] || c, h = d.length > 1 ? d.slice(0, -1).join(".") : void 0, m = s.qualifiedTableName || h, o = m ? `${m}.${f}` : void 0;
|
|
117
|
-
return i ? o ? o === a || o.endsWith(`.${i}`) : f === n.name : o ? o === a : f === n.name;
|
|
118
|
-
});
|
|
119
|
-
}
|
|
120
|
-
function D(e) {
|
|
121
|
-
return (n) => {
|
|
122
|
-
const r = n.field;
|
|
123
|
-
return !r || p(r.dataType || "") !== "date" ? !1 : e.id && r.id === e.id ? !0 : e.qualifiedFieldName && r.qualifiedFieldName ? r.qualifiedFieldName === e.qualifiedFieldName : r.name === e.name;
|
|
124
|
-
};
|
|
125
|
-
}
|
|
126
|
-
function V(e, n) {
|
|
127
|
-
if (!e) return [];
|
|
128
|
-
const r = (i) => [...i.conditions.filter(D(n)), ...i.groups.flatMap(r)];
|
|
129
|
-
return r(e);
|
|
130
|
-
}
|
|
131
|
-
function L(e, n) {
|
|
132
|
-
if (e.length !== 1 || e[0].operator !== "between") return;
|
|
133
|
-
const [r] = e;
|
|
134
|
-
if (r.relativeMeta) return g({ kind: "relative", window: r.relativeMeta });
|
|
135
|
-
const i = r.value;
|
|
136
|
-
return Array.isArray(i) && i.length === 2 ? g({ kind: "range", start: i[0], end: i[1], calendar: n }) : void 0;
|
|
137
|
-
}
|
|
138
|
-
function O(e, n, r) {
|
|
139
|
-
var m, o;
|
|
140
|
-
const i = (o = (m = e.config) == null ? void 0 : m.groupByColumns) == null ? void 0 : o.find((u) => p(u.dataType || "") === "date"), t = n.resolvedPrimaryDateField, a = i ? { id: i.id, name: i.name, label: i.label || i.name, qualifiedFieldName: i.qualifiedFieldName } : t ? { name: t.name, label: t.name, qualifiedFieldName: t.qualifiedFieldName } : void 0;
|
|
141
|
-
if (!a) return { comparisonDate: null, dateWindow: n.status === "ready" ? "none" : "unknown" };
|
|
142
|
-
const s = { name: a.name, label: a.label }, l = k(e), c = V(l, a);
|
|
143
|
-
if (n.status !== "ready") return { comparisonDate: s, dateWindow: c.length ? "applies" : "unknown" };
|
|
144
|
-
const d = A(e, { status: "ready", ...n.compiledFilters });
|
|
145
|
-
if (!c.length && !d.length) return { comparisonDate: s, dateWindow: "none" };
|
|
146
|
-
const f = R(q({ filters: l }, d).filters).filter(D(a)), h = f.length === 1 && !d.length ? L(f, r) : !f.length && d.length === 1 ? T(d[0], r) : void 0;
|
|
147
|
-
return { comparisonDate: s, dateWindow: "applies", ...h ? { window: h } : {} };
|
|
148
|
-
}
|
|
149
|
-
function fe(e) {
|
|
150
|
-
const n = _(e.dashboard), { runtimeValues: r, transientContexts: i } = W({ dashboard: n, capture: {}, calendar: e.calendar }), t = (o) => {
|
|
151
|
-
const u = E({
|
|
152
|
-
dashboard: n,
|
|
153
|
-
location: o,
|
|
154
|
-
runtimeValues: r,
|
|
155
|
-
semanticExecutionPayload: e.semanticExecutionPayload,
|
|
156
|
-
calendar: e.calendar,
|
|
157
|
-
transientContexts: i
|
|
158
|
-
});
|
|
159
|
-
return O(
|
|
160
|
-
o.card,
|
|
161
|
-
(u == null ? void 0 : u.status) === "ready" ? { status: "ready", compiledFilters: u.compiledFilters, resolvedPrimaryDateField: u.resolvedPrimaryDateField } : { status: "blocked", resolvedPrimaryDateField: u == null ? void 0 : u.resolvedPrimaryDateField },
|
|
162
|
-
e.calendar
|
|
163
|
-
);
|
|
164
|
-
}, a = C(n).find((o) => o.cardId === e.cardId);
|
|
165
|
-
if (a) return a.kind === "documentSectionCard" ? { comparisonDate: null, dateWindow: "unknown" } : t(a);
|
|
166
|
-
const s = P(n, e.cardId);
|
|
167
|
-
if ((s == null ? void 0 : s.kind) !== "variable") return { comparisonDate: null, dateWindow: "unknown" };
|
|
168
|
-
const { card: l } = s, c = (n.sheets ?? []).filter((o) => !N(o) && S(n, { kind: "sheet", sheetId: o.id }).includes(s.id)).map((o) => t({ kind: "sheetCard", sheetId: o.id, cardId: l.id, card: l }));
|
|
169
|
-
if (!c.length) return { comparisonDate: null, dateWindow: "unknown" };
|
|
170
|
-
const [d] = c;
|
|
171
|
-
if (c.every((o) => JSON.stringify(o.window) === JSON.stringify(d.window))) return d;
|
|
172
|
-
const { window: h, ...m } = d;
|
|
173
|
-
return m;
|
|
174
|
-
}
|
|
175
|
-
export {
|
|
176
|
-
le as K,
|
|
177
|
-
ce as a,
|
|
178
|
-
se as b,
|
|
179
|
-
oe as c,
|
|
180
|
-
ue as d,
|
|
181
|
-
fe as e,
|
|
182
|
-
de as f,
|
|
183
|
-
ae as m,
|
|
184
|
-
O as r
|
|
185
|
-
};
|
|
@@ -1,226 +0,0 @@
|
|
|
1
|
-
import { b as v, D as g, s as B, r as N, a as j, n as U } from "./resolver-DG_tfEpt.js";
|
|
2
|
-
import { S as b, C as p, a as f } from "./pickers-DkqmtnTL.js";
|
|
3
|
-
const w = {
|
|
4
|
-
spacing: { min: 0, max: 24, label: "Spacing" },
|
|
5
|
-
canvasPadding: { min: 0, max: 48, label: "Canvas padding" },
|
|
6
|
-
cardCorners: { min: 0, max: 24, label: "Card corners" },
|
|
7
|
-
controlCorners: { min: 0, max: 12, label: "Control corners" },
|
|
8
|
-
barCorners: { min: 0, max: 24, label: "Bar corners" }
|
|
9
|
-
}, d = { min: 1, max: 12 };
|
|
10
|
-
function _(o) {
|
|
11
|
-
const { min: e, max: s, label: r } = w[o];
|
|
12
|
-
return `${r} ${r.endsWith("s") ? "are" : "is"} ${e} to ${s} px`;
|
|
13
|
-
}
|
|
14
|
-
function Z(o) {
|
|
15
|
-
return o in w;
|
|
16
|
-
}
|
|
17
|
-
const M = /^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i;
|
|
18
|
-
function y(o) {
|
|
19
|
-
return typeof o == "string" && M.test(o);
|
|
20
|
-
}
|
|
21
|
-
const H = ["none", "subtle", "raised"], L = /* @__PURE__ */ new Set(["canvas", "chartColors"]);
|
|
22
|
-
function rr(o, e) {
|
|
23
|
-
const s = l(v(o), e), r = l(v({ ...o, tokenAppearance: null, reactAppearance: null }), e), n = l(v({ defaults: o.defaults, organizationAppearance: o.organizationAppearance }), e), a = Object.fromEntries(g.map((i) => [i, z(o, i, e)])), c = o.dashboardStyle ?? {}, t = g.filter((i) => B(c, i, e) !== void 0), C = g.reduce((i, k) => {
|
|
24
|
-
if (!L.has(k)) return i + (c[k] !== void 0 ? 1 : 0);
|
|
25
|
-
const A = c[k];
|
|
26
|
-
return i + (A ? Object.values(A).filter((T) => T !== void 0).length : 0);
|
|
27
|
-
}, 0);
|
|
28
|
-
return {
|
|
29
|
-
mode: e,
|
|
30
|
-
shows: s,
|
|
31
|
-
authored: r,
|
|
32
|
-
inherited: n,
|
|
33
|
-
source: a,
|
|
34
|
-
hostSet: g.filter((i) => a[i] === "token" || a[i] === "react"),
|
|
35
|
-
changed: t,
|
|
36
|
-
changeCount: C,
|
|
37
|
-
pickers: F(r)
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
function l(o, e) {
|
|
41
|
-
const s = o.schemes[e], r = (a) => N(s, j[a]), n = r("cardShadow");
|
|
42
|
-
return {
|
|
43
|
-
spacing: r("spacing"),
|
|
44
|
-
canvasPadding: r("canvasPadding"),
|
|
45
|
-
canvas: r("canvas"),
|
|
46
|
-
cardBorder: r("cardBorder") === 0 ? "off" : "on",
|
|
47
|
-
cardShadow: H.includes(n) ? n : "custom",
|
|
48
|
-
cardCorners: r("cardCorners"),
|
|
49
|
-
controlCorners: r("controlCorners"),
|
|
50
|
-
chartColors: [...r("chartColors") ?? []],
|
|
51
|
-
barCorners: r("barCorners")
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
function z(o, e, s) {
|
|
55
|
-
const r = (n) => {
|
|
56
|
-
var a, c;
|
|
57
|
-
return N((c = (a = U(n)) == null ? void 0 : a.schemes) == null ? void 0 : c[s], j[e]) !== void 0;
|
|
58
|
-
};
|
|
59
|
-
return r(o.reactAppearance) ? "react" : r(o.tokenAppearance) ? "token" : o.dashboardStyle && B(o.dashboardStyle, e, s) !== void 0 ? "dashboard" : r(o.organizationAppearance) ? "organization" : "defaults";
|
|
60
|
-
}
|
|
61
|
-
function F(o) {
|
|
62
|
-
const e = Object.keys(b).find((n) => b[n] === o.spacing) ?? null, s = Object.keys(p).find((n) => {
|
|
63
|
-
const a = p[n];
|
|
64
|
-
return a.cardBorder === o.cardBorder && a.cardShadow === o.cardShadow && a.canvas === o.canvas;
|
|
65
|
-
}) ?? null, r = Object.keys(f).find(
|
|
66
|
-
(n) => f[n].cardCorners === o.cardCorners && f[n].controlCorners === o.controlCorners
|
|
67
|
-
) ?? null;
|
|
68
|
-
return { spacing: e, cards: s, corners: r };
|
|
69
|
-
}
|
|
70
|
-
const I = { muted: "muted", background: "plain" }, G = {
|
|
71
|
-
none: "Removes card shadows",
|
|
72
|
-
subtle: "Gives cards a subtle shadow",
|
|
73
|
-
raised: "Gives cards a raised shadow"
|
|
74
|
-
}, W = {
|
|
75
|
-
outlined: "Shows cards outlined, with a border and no shadow",
|
|
76
|
-
raised: "Shows cards raised, with no border",
|
|
77
|
-
open: "Shows cards open, on a plain canvas"
|
|
78
|
-
};
|
|
79
|
-
function q(o) {
|
|
80
|
-
const { edit: e, before: s, after: r } = o;
|
|
81
|
-
if (e.reset === "all" && Object.keys(e).length === 1)
|
|
82
|
-
return h(s, r) ? [] : [o.resetAll ?? "Resets the dashboard's style to the brand"];
|
|
83
|
-
const n = [], a = (t) => !h(s.light[t], r.light[t]) || !h(s.dark[t], r.dark[t]);
|
|
84
|
-
a("spacing") && n.push(r.light.spacing === 0 ? "Removes the gap between cards" : `Sets the gap between cards to ${r.light.spacing} px`), a("canvasPadding") && n.push(`Sets the canvas padding to ${r.light.canvasPadding} px`);
|
|
85
|
-
const c = e.cards && !a("cardBorder") && !a("cardShadow") && !a("canvas") ? void 0 : e.cards;
|
|
86
|
-
if (c && p[c] ? n.push(W[c]) : (a("cardBorder") && n.push(r.light.cardBorder === "on" ? "Shows card borders" : "Hides card borders"), a("cardShadow") && n.push(G[r.light.cardShadow] ?? "Changes the card shadow"), a("canvas") && n.push($("Sets the canvas to", s, r, "canvas", (t) => I[t] ?? t))), a("cardCorners") || a("controlCorners")) {
|
|
87
|
-
const { cardCorners: t, controlCorners: C } = r.light;
|
|
88
|
-
n.push(t === 0 && C === 0 ? "Squares corners" : `Rounds corners (cards ${t} px, controls ${C} px)`);
|
|
89
|
-
}
|
|
90
|
-
return a("chartColors") && n.push($("Sets chart colors to", s, r, "chartColors", (t) => `${t.length} ${t.length === 1 ? "color" : "colors"}`)), a("barCorners") && n.push(r.light.barCorners === 0 ? "Squares bar corners" : `Rounds bar corners to ${r.light.barCorners} px`), n;
|
|
91
|
-
}
|
|
92
|
-
function $(o, e, s, r, n) {
|
|
93
|
-
const a = !h(e.light[r], s.light[r]), c = !h(e.dark[r], s.dark[r]);
|
|
94
|
-
return a && c && h(s.light[r], s.dark[r]) ? `${o} ${n(s.light[r])}` : a && c ? `${o} ${n(s.light[r])} in light mode and ${n(s.dark[r])} in dark mode` : a ? `${o} ${n(s.light[r])} in light mode` : `${o} ${n(s.dark[r])} in dark mode`;
|
|
95
|
-
}
|
|
96
|
-
function h(o, e) {
|
|
97
|
-
return JSON.stringify(o) === JSON.stringify(e);
|
|
98
|
-
}
|
|
99
|
-
const u = ["light", "dark"], O = ["reset", "spacing", "canvasPadding", "cards", "canvas", "border", "shadow", "corners", "chartColors", "barCorners"], E = ["spacing", "canvasPadding", "canvas", "cards", "border", "shadow", "corners", "chartColors", "barCorners"], J = /* @__PURE__ */ new Set(["canvas", "chartColors"]);
|
|
100
|
-
function or(o) {
|
|
101
|
-
const e = Y(o.edit);
|
|
102
|
-
if (e) return { ok: !1, refusal: e };
|
|
103
|
-
const s = V(o.style ?? {}, o.edit, o.mode), r = { defaults: o.layers.defaults, organizationAppearance: o.layers.organizationAppearance }, n = K(s, r), a = R({ ...r, dashboardStyle: o.style }), c = R({ ...r, dashboardStyle: n });
|
|
104
|
-
return { ok: !0, style: n, sentences: q({ edit: o.edit, before: a, after: c }) };
|
|
105
|
-
}
|
|
106
|
-
function Y(o) {
|
|
107
|
-
if ((x(o) ? Object.entries(o).filter(([s, r]) => r !== void 0 && !(s === "reset" && Array.isArray(r) && r.length === 0)) : []).length === 0)
|
|
108
|
-
return { field: "edit", code: "empty_edit", message: "The style edit changes nothing.", fix: 'Name a setting to change, like spacing: "roomy" or cards: "raised".' };
|
|
109
|
-
for (const [s, r] of Object.entries(o))
|
|
110
|
-
if (r !== void 0 && !O.includes(s))
|
|
111
|
-
return { field: s, code: "unknown_field", message: `${s} is not a dashboard style setting.`, fix: `Use one of ${O.join(", ")}.` };
|
|
112
|
-
if (o.reset !== void 0 && o.reset !== "all" && !(Array.isArray(o.reset) && o.reset.every((s) => E.includes(s))))
|
|
113
|
-
return { field: "reset", code: "invalid_value", message: 'Reset takes "all" or a list of settings.', fix: `Use "all" or some of ${E.join(", ")}.` };
|
|
114
|
-
if (o.spacing !== void 0 && !(typeof o.spacing == "string" && o.spacing in b)) {
|
|
115
|
-
const s = m("spacing", o.spacing);
|
|
116
|
-
if (s) return { ...s, fix: `${s.fix} Or name a step: none, compact, default or roomy.` };
|
|
117
|
-
}
|
|
118
|
-
for (const s of ["canvasPadding", "barCorners"]) {
|
|
119
|
-
const r = o[s] !== void 0 ? m(s, o[s]) : void 0;
|
|
120
|
-
if (r) return r;
|
|
121
|
-
}
|
|
122
|
-
if (o.cards !== void 0 && !(o.cards in p))
|
|
123
|
-
return { field: "cards", code: "invalid_value", message: "Cards are outlined, raised or open.", fix: "Use outlined, raised or open." };
|
|
124
|
-
if (o.border !== void 0 && o.border !== "on" && o.border !== "off")
|
|
125
|
-
return { field: "border", code: "invalid_value", message: "Card border is on or off.", fix: "Use on or off." };
|
|
126
|
-
if (o.shadow !== void 0 && !["none", "subtle", "raised"].includes(o.shadow))
|
|
127
|
-
return { field: "shadow", code: "invalid_value", message: "Card shadow is none, subtle or raised.", fix: "Use none, subtle or raised." };
|
|
128
|
-
if (o.corners !== void 0)
|
|
129
|
-
if (typeof o.corners == "string") {
|
|
130
|
-
if (!(o.corners in f))
|
|
131
|
-
return { field: "corners", code: "invalid_value", message: "Corners are square, subtle, rounded or round.", fix: "Use square, subtle, rounded or round, or give cards and controls in px." };
|
|
132
|
-
} else {
|
|
133
|
-
if (!x(o.corners) || o.corners.cards === void 0 && o.corners.controls === void 0)
|
|
134
|
-
return { field: "corners", code: "invalid_value", message: "Corners take a step or px for cards and controls.", fix: "Use a step like rounded, or { cards: 10, controls: 6 }." };
|
|
135
|
-
{
|
|
136
|
-
const s = o.corners.cards !== void 0 ? m("cardCorners", o.corners.cards) : void 0;
|
|
137
|
-
if (s) return s;
|
|
138
|
-
const r = o.corners.controls !== void 0 ? m("controlCorners", o.corners.controls) : void 0;
|
|
139
|
-
if (r) return r;
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
if (o.canvas !== void 0)
|
|
143
|
-
for (const [s, r] of S(o.canvas)) {
|
|
144
|
-
if (s === void 0) return { field: "canvas", code: "unknown_field", message: "The canvas holds light and dark values only.", fix: "Give one fill, or { light, dark }." };
|
|
145
|
-
if (r !== "muted" && r !== "background" && !y(r))
|
|
146
|
-
return { field: s === "both" ? "canvas" : `canvas.${s}`, code: "invalid_colour", message: "The canvas is muted, background or a hex colour.", fix: "Use muted, background or a hex colour like #f4f4f5." };
|
|
147
|
-
}
|
|
148
|
-
if (o.chartColors !== void 0)
|
|
149
|
-
for (const [s, r] of S(o.chartColors)) {
|
|
150
|
-
const n = s === "both" ? "chartColors" : `chartColors.${s}`;
|
|
151
|
-
if (s === void 0) return { field: "chartColors", code: "unknown_field", message: "Chart colors hold light and dark lists only.", fix: "Give one list, or { light, dark }." };
|
|
152
|
-
if (!Array.isArray(r) || r.length < d.min || r.length > d.max)
|
|
153
|
-
return { field: n, code: "palette_size", message: `Chart colors take ${d.min} to ${d.max} colours.`, fix: `Chart colors take ${d.min} to ${d.max} hex colours, like #2563eb.` };
|
|
154
|
-
if (!r.every(y))
|
|
155
|
-
return { field: n, code: "invalid_colour", message: "Chart colors are hex colours.", fix: `Chart colors take ${d.min} to ${d.max} hex colours, like #2563eb.` };
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
function V(o, e, s) {
|
|
159
|
-
let r = e.reset === "all" ? {} : structuredClone(o);
|
|
160
|
-
if (Array.isArray(e.reset))
|
|
161
|
-
for (const n of e.reset)
|
|
162
|
-
n === "spacing" && delete r.spacing, n === "canvasPadding" && delete r.canvasPadding, (n === "canvas" || n === "cards") && (r = P(r, "canvas", s)), (n === "border" || n === "cards") && delete r.cardBorder, (n === "shadow" || n === "cards") && delete r.cardShadow, n === "corners" && (delete r.cardCorners, delete r.controlCorners), n === "chartColors" && (r = P(r, "chartColors", s)), n === "barCorners" && delete r.barCorners;
|
|
163
|
-
if (typeof e.spacing == "string" ? (r.spacing = b[e.spacing], r.canvasPadding = b[e.spacing]) : typeof e.spacing == "number" && (r.spacing = e.spacing), e.cards) {
|
|
164
|
-
const n = p[e.cards];
|
|
165
|
-
r.cardBorder = n.cardBorder, r.cardShadow = n.cardShadow, r.canvas = { light: n.canvas, dark: n.canvas };
|
|
166
|
-
}
|
|
167
|
-
if (typeof e.corners == "string" ? (r.cardCorners = f[e.corners].cardCorners, r.controlCorners = f[e.corners].controlCorners) : e.corners && (e.corners.cards !== void 0 && (r.cardCorners = e.corners.cards), e.corners.controls !== void 0 && (r.controlCorners = e.corners.controls)), e.canvasPadding !== void 0 && (r.canvasPadding = e.canvasPadding), e.border !== void 0 && (r.cardBorder = e.border), e.shadow !== void 0 && (r.cardShadow = e.shadow), e.barCorners !== void 0 && (r.barCorners = e.barCorners), e.canvas !== void 0)
|
|
168
|
-
for (const [n, a] of S(e.canvas))
|
|
169
|
-
for (const c of n === "both" ? u : [n])
|
|
170
|
-
r.canvas = { ...r.canvas, [c]: y(a) ? a.toLowerCase() : a };
|
|
171
|
-
if (e.chartColors !== void 0)
|
|
172
|
-
for (const [n, a] of S(e.chartColors))
|
|
173
|
-
for (const c of n === "both" ? u : [n])
|
|
174
|
-
r.chartColors = { ...r.chartColors, [c]: a.map((t) => t.toLowerCase()) };
|
|
175
|
-
return r;
|
|
176
|
-
}
|
|
177
|
-
function K(o, e) {
|
|
178
|
-
const s = v(e), r = { light: l(s, "light"), dark: l(s, "dark") }, n = { ...o };
|
|
179
|
-
for (const a of g)
|
|
180
|
-
if (n[a] !== void 0)
|
|
181
|
-
if (J.has(a)) {
|
|
182
|
-
const c = { ...n[a] };
|
|
183
|
-
for (const t of u)
|
|
184
|
-
c[t] !== void 0 && D(c[t], r[t][a]) && delete c[t];
|
|
185
|
-
Object.keys(c).length > 0 ? n[a] = c : delete n[a];
|
|
186
|
-
} else u.every((c) => D(n[a], r[c][a])) && delete n[a];
|
|
187
|
-
return Object.keys(n).length > 0 ? n : void 0;
|
|
188
|
-
}
|
|
189
|
-
function R(o) {
|
|
190
|
-
const e = v(o);
|
|
191
|
-
return { light: l(e, "light"), dark: l(e, "dark") };
|
|
192
|
-
}
|
|
193
|
-
function m(o, e) {
|
|
194
|
-
const { min: s, max: r } = w[o];
|
|
195
|
-
if (typeof e == "number" && Number.isInteger(e) && e >= s && e <= r) return;
|
|
196
|
-
const n = typeof e != "number" || !Number.isFinite(e) ? "invalid_value" : Number.isInteger(e) ? "out_of_range" : "not_integer";
|
|
197
|
-
return { field: o, code: n, message: `${_(o)}.`, fix: `${_(o)}; use ${r} for the most.` };
|
|
198
|
-
}
|
|
199
|
-
function S(o) {
|
|
200
|
-
return x(o) ? Object.entries(o).filter(([, e]) => e !== void 0).map(([e, s]) => [u.includes(e) ? e : void 0, s]) : [["both", o]];
|
|
201
|
-
}
|
|
202
|
-
function P(o, e, s) {
|
|
203
|
-
const r = { ...o[e] };
|
|
204
|
-
for (const a of s ? [s] : u) delete r[a];
|
|
205
|
-
const n = { ...o };
|
|
206
|
-
return Object.keys(r).length > 0 ? n[e] = r : delete n[e], n;
|
|
207
|
-
}
|
|
208
|
-
function D(o, e) {
|
|
209
|
-
return JSON.stringify(o) === JSON.stringify(e);
|
|
210
|
-
}
|
|
211
|
-
function x(o) {
|
|
212
|
-
return typeof o == "object" && o !== null && !Array.isArray(o);
|
|
213
|
-
}
|
|
214
|
-
export {
|
|
215
|
-
d as C,
|
|
216
|
-
w as D,
|
|
217
|
-
V as a,
|
|
218
|
-
rr as b,
|
|
219
|
-
Y as c,
|
|
220
|
-
q as d,
|
|
221
|
-
or as e,
|
|
222
|
-
Z as f,
|
|
223
|
-
_ as g,
|
|
224
|
-
y as i,
|
|
225
|
-
l as r
|
|
226
|
-
};
|