react-semaphor 0.1.559 → 0.1.561
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/analytics-protocol/index.js +389 -378
- package/dist/assistant-context/index.js +1 -1
- package/dist/assistant-protocol/index.js +5 -5
- package/dist/brand-studio/index.js +9 -9
- package/dist/briefings/index.js +5 -5
- package/dist/chunks/analytics-base-schemas-CB3oFAXk.js +658 -0
- package/dist/chunks/{assistant-chat-B_4bVE6I.js → assistant-chat-DiVHY3Hw.js} +209 -211
- package/dist/chunks/bookmark-impact-CR09dpkn.js +75 -0
- package/dist/chunks/bookmark-state-BusLpkb7.js +743 -0
- package/dist/chunks/{braces-Rdxa3H-s.js → braces-u8VorWJc.js} +1 -1
- package/dist/chunks/{comparison-window-caption-CKzQ5LcF.js → comparison-window-caption-DDsIWJYT.js} +201 -201
- package/dist/chunks/{context-DVy4HOU0.js → context-TUjw9eqr.js} +1 -1
- package/dist/chunks/{custom-visual-inputs-zVa9wX_o.js → custom-visual-inputs-DfolidZ9.js} +1 -1
- package/dist/chunks/{dashboard-BziwOVpZ.js → dashboard-BRdZBPqr.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-CbeNR-YI.js → dashboard-briefing-launcher-CgvTLndW.js} +1163 -1178
- package/dist/chunks/{dashboard-controls-RD6UJs1r.js → dashboard-controls-B4vfSzTF.js} +877 -941
- package/dist/chunks/{dashboard-json-DGpv17vL.js → dashboard-json-Y3MF59g7.js} +5 -5
- package/dist/chunks/document-dashboard-inputs-CvBbFTUA.js +1718 -0
- package/dist/chunks/{edit-dashboard-visual-AQ2pQkFp.js → edit-dashboard-visual-DwjZcxj-.js} +9080 -9354
- package/dist/chunks/filter-reach-copy-bijwf_-b.js +3596 -0
- package/dist/chunks/{filter-value-text-B4l-xqJT.js → filter-value-text-DFnhwuEW.js} +3 -3
- package/dist/chunks/global-date-filter-utils-BXgCpvQM.js +15142 -0
- package/dist/chunks/{index-B1Xr7W24.js → index-ClwbY3BL.js} +648 -674
- package/dist/chunks/{layout-grid-Bbz3zKif.js → layout-grid-CtvCBfOm.js} +1 -1
- package/dist/chunks/{list-filter-3sbH0Uy1.js → list-filter-BklYgciR.js} +1 -1
- package/dist/chunks/{matrix-analytical-definition-CEe3PGEo.js → matrix-analytical-definition-pU51-JmY.js} +4 -4
- package/dist/chunks/{matrix-card-BRNGb1C4.js → matrix-card-CUorIB7Q.js} +3 -3
- package/dist/chunks/{matrix-member-presentation-CEegvTqg.js → matrix-member-presentation-Df5UgCGN.js} +1 -1
- package/dist/chunks/{matrix-operation-contract-COxrfQTS.js → matrix-operation-contract-BSiGEXVC.js} +221 -214
- package/dist/chunks/{metric-comparison-DQx-uX__.js → metric-comparison-95aC0uEO.js} +6 -6
- package/dist/chunks/{model-change-CJEj3ZD6.js → model-change-B5wQhg5G.js} +1 -1
- package/dist/chunks/{palette-DMJtp3Vn.js → palette-DTnMhipt.js} +1 -1
- package/dist/chunks/pivot-result-contract-expectations-Bo-86vwS.js +56 -0
- package/dist/chunks/{pivot-result-identity-CAj8SiRL.js → pivot-result-identity-olvXJoB9.js} +1 -1
- package/dist/chunks/{report-preferences-dialog-0sc8B1lh.js → report-preferences-dialog-C2YUIwKG.js} +55 -55
- package/dist/chunks/{report-runtime-context-bYoExeWr.js → report-runtime-context-DoIUr3MP.js} +2 -2
- package/dist/chunks/resolve-dashboard-input-context-q_iiNXE1.js +6503 -0
- package/dist/chunks/{save-DSb1jTtG.js → save-DH4RyrnG.js} +1 -1
- package/dist/chunks/{saved-dashboard-context-BQWM3ldX.js → saved-dashboard-context-8jqfI7hI.js} +59 -59
- package/dist/chunks/{selection-reducer-DSzMWb4x.js → selection-reducer-CV7K4FI6.js} +1 -1
- package/dist/chunks/{semaphor-ready-indicator-Bz14Oma5.js → semaphor-ready-indicator-E2XWyibu.js} +40105 -41658
- package/dist/chunks/{shelf-drop-preview-context-DBHAkgch.js → shelf-drop-preview-context-C29EUzDp.js} +570 -570
- package/dist/chunks/{source-entity-resolution-BOrmNCEM.js → source-entity-resolution-BXI3nQ5Z.js} +1 -1
- package/dist/chunks/{switch-Dq8XPFpT.js → switch-balDSHc7.js} +3 -3
- package/dist/chunks/{table-export-sheet-C_RvEUyO.js → table-export-sheet-CK8tvh4d.js} +1 -1
- package/dist/chunks/temporal-input-presentation-B77JsAzU.js +5002 -0
- package/dist/chunks/{token-types-LCYMJ3pa.js → token-types-DhYH5YKb.js} +1 -1
- package/dist/chunks/{upload-Dr_WAxHQ.js → upload-Ufj8vjyn.js} +1 -1
- package/dist/chunks/{use-create-flow-overlay-state-BK3YFkfc.js → use-create-flow-overlay-state-9WsnzEO5.js} +6 -6
- package/dist/chunks/{validators-C87JPd-_.js → validators-BtaCFIEB.js} +1206 -1579
- package/dist/chunks/{zoned-wall-clock-E35Frf9v.js → zoned-wall-clock-CGLVI40Q.js} +1 -1
- package/dist/dashboard/index.js +2 -2
- package/dist/dashboard-authoring/index.js +2713 -1459
- package/dist/data-app-sdk/index.js +20 -20
- package/dist/data-app-sdk-adapters/index.js +3 -3
- package/dist/data-app-sdk-validation/index.js +10 -10
- package/dist/format-utils/index.js +262 -256
- package/dist/index.js +214 -215
- package/dist/report-runtime-context/index.js +2 -2
- package/dist/style.css +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/components/dashboard/summary-number-formatter.d.ts +6 -0
- package/dist/types/components/editor/editor-aside/utils.d.ts +1 -1
- package/dist/types/components/visual/data-table/types/data-table.d.ts +5 -20
- package/dist/types/index.js +50 -51
- package/dist/types/lib/formatters/canonical-format-adapter.d.ts +2 -29
- package/dist/types/lib/formatters/kpi-number-formatter.d.ts +41 -0
- package/dist/types/lib/formatters/raw-temporal-presentation.d.ts +0 -2
- package/dist/types/lib/formatters/table-column-settings.d.ts +47 -0
- package/dist/types/lib/matrix-table/matrix-card-adapter.d.ts +10 -188
- package/dist/types/lib/matrix-table/matrix-delivery-policy.d.ts +1 -1
- package/dist/types/lib/matrix-table/matrix-delivery.d.ts +16 -372
- package/dist/types/lib/stores/dashboard-store.d.ts +0 -1
- package/dist/types/lib/stores/editor-store.d.ts +48 -10
- package/dist/types/lib/stores/table-actions.d.ts +9 -5
- package/dist/types/lib/table-formatting/index.d.ts +0 -2
- package/dist/types/lib/table-formatting/table-conditional-formatting-range-source.d.ts +3 -2
- package/dist/types/lib/table-formatting/table-conditional-formatting-range.d.ts +3 -2
- package/dist/types/lib/table-formatting/table-formatting-normalize.d.ts +1 -2
- package/dist/types/lib/table-formatting/table-formatting-render-model.d.ts +9 -0
- package/dist/types/lib/table-formatting/table-formatting-types.d.ts +5 -95
- package/dist/types/lib/table-formatting/table-presentation-fields.d.ts +35 -0
- package/dist/types/lib/types/common-types.d.ts +40 -47
- package/dist/types/lib/types/explorer-types.d.ts +11 -43
- package/dist/types/lib/utils/card-config-utils.d.ts +8 -0
- package/dist/types/lib/utils/card-definition.d.ts +9 -187
- package/dist/types/shared/analytics-protocol/analytics-base-schemas.d.ts +169 -513
- package/dist/types/shared/analytics-protocol/contracts.d.ts +32 -9
- package/dist/types/shared/analytics-protocol/execution-input-schemas.d.ts +108 -980
- package/dist/types/shared/analytics-protocol/field-validation.d.ts +1 -0
- package/dist/types/shared/analytics-protocol/matrix-definition-contract.d.ts +281 -4624
- package/dist/types/shared/analytics-protocol/matrix-operation-contract.d.ts +20 -20
- package/dist/types/shared/analytics-protocol/matrix-operation-request.d.ts +18 -18
- package/dist/types/shared/analytics-protocol/matrix-path-contract.d.ts +40 -40
- package/dist/types/shared/analytics-protocol/matrix-window-contract.d.ts +3 -203
- package/dist/types/shared/analytics-protocol/measure-aggregation-profile.d.ts +12 -0
- package/dist/types/shared/analytics-protocol/scalar-value.d.ts +8 -8
- package/dist/types/shared/assistant-context/saved-dashboard-context.d.ts +8 -0
- package/dist/types/shared/assistant-protocol/context.d.ts +69 -69
- package/dist/types/shared/dashboard-authoring/canonical-result-keys.d.ts +13 -0
- package/dist/types/shared/dashboard-authoring/card-export-request.d.ts +4 -1
- package/dist/types/shared/dashboard-authoring/card-formats/sql-date-pattern.d.ts +10 -0
- package/dist/types/shared/dashboard-authoring/card-formats/upgrade-card-formats.d.ts +57 -0
- package/dist/types/shared/dashboard-authoring/card-settings/apply-card-settings.d.ts +11 -0
- package/dist/types/shared/dashboard-authoring/card-settings/card-display-write.d.ts +52 -0
- package/dist/types/shared/dashboard-authoring/card-settings/card-kinds.d.ts +14 -0
- package/dist/types/shared/dashboard-authoring/card-settings/carry-column-settings.d.ts +3 -0
- package/dist/types/shared/dashboard-authoring/card-settings/column-format-write.d.ts +8 -0
- package/dist/types/shared/dashboard-authoring/card-settings/column-names.d.ts +51 -0
- package/dist/types/shared/dashboard-authoring/card-settings/column-sources.d.ts +14 -0
- package/dist/types/shared/dashboard-authoring/card-settings/confirm-class.d.ts +9 -0
- package/dist/types/shared/dashboard-authoring/card-settings/highlight-inputs.d.ts +19 -0
- package/dist/types/shared/dashboard-authoring/card-settings/index.d.ts +15 -0
- package/dist/types/shared/dashboard-authoring/card-settings/inputs.d.ts +102 -0
- package/dist/types/shared/dashboard-authoring/card-settings/read-card-settings.d.ts +10 -0
- package/dist/types/shared/dashboard-authoring/card-settings/resolve-card-highlights.d.ts +14 -0
- package/dist/types/shared/dashboard-authoring/card-settings/resolve-card-settings.d.ts +59 -0
- package/dist/types/shared/dashboard-authoring/card-settings/resolved.d.ts +40 -0
- package/dist/types/shared/dashboard-authoring/card-settings/views.d.ts +28 -0
- package/dist/types/shared/dashboard-authoring/changes/card-query-part.d.ts +6 -0
- package/dist/types/shared/dashboard-authoring/changes/card-types.d.ts +32 -0
- package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +555 -38
- package/dist/types/shared/dashboard-authoring/changes/diagnostics.d.ts +27 -8
- package/dist/types/shared/dashboard-authoring/changes/resolve-dashboard-changes.d.ts +25 -1
- package/dist/types/shared/dashboard-authoring/conditional-formatting/editable.d.ts +14 -0
- package/dist/types/shared/dashboard-authoring/conditional-formatting/evaluate.d.ts +16 -0
- package/dist/types/shared/dashboard-authoring/conditional-formatting/index.d.ts +9 -0
- package/dist/types/shared/dashboard-authoring/conditional-formatting/kpi.d.ts +7 -0
- package/dist/types/shared/dashboard-authoring/conditional-formatting/resolve-card-column-ref.d.ts +17 -0
- package/dist/types/shared/dashboard-authoring/conditional-formatting/retain.d.ts +14 -0
- package/dist/types/shared/dashboard-authoring/conditional-formatting/schema.d.ts +4499 -0
- package/dist/types/shared/dashboard-authoring/conditional-formatting/store.d.ts +12 -0
- package/dist/types/shared/dashboard-authoring/conditional-formatting/types.d.ts +151 -0
- package/dist/types/shared/dashboard-authoring/conditional-formatting/upgrade.d.ts +35 -0
- package/dist/types/shared/dashboard-authoring/control-execution-contract.d.ts +62 -62
- package/dist/types/shared/dashboard-authoring/index.d.ts +8 -0
- package/dist/types/shared/dashboard-authoring/kpi-figure.d.ts +123 -0
- package/dist/types/shared/dashboard-authoring/matrix-authoring.d.ts +4 -5
- package/dist/types/shared/dashboard-authoring/matrix-delivery.d.ts +24 -736
- package/dist/types/shared/dashboard-authoring/operations/operation-types.d.ts +21 -1
- package/dist/types/shared/dashboard-authoring/outline/outline-dashboard.d.ts +10 -4
- package/dist/types/shared/dashboard-authoring/retired-presentation-fields.d.ts +31 -0
- package/dist/types/shared/dashboard-authoring/upgrade-card-presentation.d.ts +14 -0
- package/dist/types/shared/dashboard-viewer/bookmark-impact.d.ts +33 -0
- package/dist/types/shared/format-utils/formatters/matrix-formatter.d.ts +13 -2
- package/dist/types/shared/format-utils/formatters/number-formatter.d.ts +16 -0
- package/dist/types/shared/format-utils/index.d.ts +2 -0
- package/dist/types/shared/format-utils/matrix-export-presentation.d.ts +10 -366
- package/dist/types/shared/format-utils/raw-temporal.d.ts +31 -1
- package/dist/types/shared/format-utils/resolve-column-format.d.ts +43 -0
- package/dist/types/shared/format-utils/retired-format-adapters.d.ts +68 -0
- package/dist/types/shared/format-utils/semantic-format.d.ts +5 -1
- package/dist/types/shared/format-utils/stored-value-format.d.ts +16 -0
- package/dist/types/shared/format-utils/types/format-types.d.ts +10 -12
- package/package.json +2 -2
- package/dist/chunks/analytics-base-schemas-BUFUoO6G.js +0 -472
- package/dist/chunks/bookmark-state-ssqrs5oP.js +0 -111
- package/dist/chunks/document-dashboard-inputs-ChVkcBuu.js +0 -3010
- package/dist/chunks/editor-draft-sync-BN5qYHPF.js +0 -15
- package/dist/chunks/filter-reach-copy-B5Y7FHzg.js +0 -3411
- package/dist/chunks/global-date-filter-utils-DBzEOX9M.js +0 -12222
- package/dist/chunks/pivot-result-contract-expectations-DOYhqeZb.js +0 -1926
- package/dist/chunks/raw-temporal-presentation-BmT7z6NH.js +0 -584
- package/dist/chunks/resolve-dashboard-input-context-B_C_VAJH.js +0 -5520
- package/dist/chunks/table-settings-DXj_zXwS.js +0 -637
- package/dist/chunks/temporal-input-presentation-AhLSkGPf.js +0 -2939
- package/dist/types/lib/table-formatting/table-conditional-formatting-evaluator.d.ts +0 -9
- package/dist/types/lib/table-formatting/table-formatting-validation.d.ts +0 -12
|
@@ -53,8 +53,8 @@ export declare function buildMatrixDeliveryPayload(input: {
|
|
|
53
53
|
parent: readonly {
|
|
54
54
|
member: {
|
|
55
55
|
value: string | number | boolean | {
|
|
56
|
-
value: string;
|
|
57
56
|
type: "integer" | "decimal";
|
|
57
|
+
value: string;
|
|
58
58
|
kind: "exact_number";
|
|
59
59
|
} | null;
|
|
60
60
|
kind: "value";
|
|
@@ -88,7 +88,6 @@ export declare function buildMatrixDeliveryPayload(input: {
|
|
|
88
88
|
active_filters: import('../types/index.js').TFilterValue[];
|
|
89
89
|
formatOptions: {
|
|
90
90
|
matrix: {
|
|
91
|
-
mode: "layout";
|
|
92
91
|
presentation: {
|
|
93
92
|
totals: {
|
|
94
93
|
columns: {
|
|
@@ -130,187 +129,10 @@ export declare function buildMatrixDeliveryPayload(input: {
|
|
|
130
129
|
};
|
|
131
130
|
levelLabels: Readonly<Record<string, string>>;
|
|
132
131
|
measureLabels: Readonly<Record<string, string>>;
|
|
133
|
-
levelFormats: Readonly<Record<string, import('../../shared/analytics-protocol/index.js').
|
|
134
|
-
|
|
135
|
-
pattern?: string | undefined;
|
|
136
|
-
locale?: string | undefined;
|
|
137
|
-
prefix?: string | undefined;
|
|
138
|
-
suffix?: string | undefined;
|
|
139
|
-
relative?: boolean | undefined;
|
|
140
|
-
timezone?: string | undefined;
|
|
141
|
-
sourceTimezone?: string | undefined;
|
|
142
|
-
} | {
|
|
143
|
-
type: "duration";
|
|
144
|
-
prefix?: string | undefined;
|
|
145
|
-
suffix?: string | undefined;
|
|
146
|
-
negativeStyle?: "minus" | "parentheses" | undefined;
|
|
147
|
-
inputUnit?: "second" | "minute" | "hour" | "day" | "millisecond" | undefined;
|
|
148
|
-
outputStyle?: "compact" | "digital" | "long" | undefined;
|
|
149
|
-
largestUnit?: "second" | "minute" | "hour" | "day" | "millisecond" | undefined;
|
|
150
|
-
smallestUnit?: "second" | "minute" | "hour" | "day" | "millisecond" | undefined;
|
|
151
|
-
maxUnits?: number | undefined;
|
|
152
|
-
} | {
|
|
153
|
-
type: "string";
|
|
154
|
-
prefix?: string | undefined;
|
|
155
|
-
suffix?: string | undefined;
|
|
156
|
-
} | {
|
|
157
|
-
type: "number" | "currency" | "percent" | "percentage" | "scientific";
|
|
158
|
-
currency?: string | undefined;
|
|
159
|
-
minimumFractionDigits?: number | undefined;
|
|
160
|
-
maximumFractionDigits?: number | undefined;
|
|
161
|
-
useGrouping?: boolean | undefined;
|
|
162
|
-
prefix?: string | undefined;
|
|
163
|
-
suffix?: string | undefined;
|
|
164
|
-
negativeStyle?: "minus" | "parentheses" | undefined;
|
|
165
|
-
compact?: boolean | undefined;
|
|
166
|
-
scale?: number | undefined;
|
|
167
|
-
percentValueMode?: "fraction" | "whole" | undefined;
|
|
168
|
-
}>>;
|
|
169
|
-
measureFormats: Readonly<Record<string, import('../../shared/analytics-protocol/index.js').TemporalBucketFormat | {
|
|
170
|
-
type: "date" | "datetime";
|
|
171
|
-
pattern?: string | undefined;
|
|
172
|
-
locale?: string | undefined;
|
|
173
|
-
prefix?: string | undefined;
|
|
174
|
-
suffix?: string | undefined;
|
|
175
|
-
relative?: boolean | undefined;
|
|
176
|
-
timezone?: string | undefined;
|
|
177
|
-
sourceTimezone?: string | undefined;
|
|
178
|
-
} | {
|
|
179
|
-
type: "duration";
|
|
180
|
-
prefix?: string | undefined;
|
|
181
|
-
suffix?: string | undefined;
|
|
182
|
-
negativeStyle?: "minus" | "parentheses" | undefined;
|
|
183
|
-
inputUnit?: "second" | "minute" | "hour" | "day" | "millisecond" | undefined;
|
|
184
|
-
outputStyle?: "compact" | "digital" | "long" | undefined;
|
|
185
|
-
largestUnit?: "second" | "minute" | "hour" | "day" | "millisecond" | undefined;
|
|
186
|
-
smallestUnit?: "second" | "minute" | "hour" | "day" | "millisecond" | undefined;
|
|
187
|
-
maxUnits?: number | undefined;
|
|
188
|
-
} | {
|
|
189
|
-
type: "string";
|
|
190
|
-
prefix?: string | undefined;
|
|
191
|
-
suffix?: string | undefined;
|
|
192
|
-
} | {
|
|
193
|
-
type: "number" | "currency" | "percent" | "percentage" | "scientific";
|
|
194
|
-
currency?: string | undefined;
|
|
195
|
-
minimumFractionDigits?: number | undefined;
|
|
196
|
-
maximumFractionDigits?: number | undefined;
|
|
197
|
-
useGrouping?: boolean | undefined;
|
|
198
|
-
prefix?: string | undefined;
|
|
199
|
-
suffix?: string | undefined;
|
|
200
|
-
negativeStyle?: "minus" | "parentheses" | undefined;
|
|
201
|
-
compact?: boolean | undefined;
|
|
202
|
-
scale?: number | undefined;
|
|
203
|
-
percentValueMode?: "fraction" | "whole" | undefined;
|
|
204
|
-
}>>;
|
|
205
|
-
conditionalFormatting?: {
|
|
206
|
-
version: 1;
|
|
207
|
-
rules: {
|
|
208
|
-
id: string;
|
|
209
|
-
target: {
|
|
210
|
-
level: "row" | "cell";
|
|
211
|
-
matrix?: {
|
|
212
|
-
axis: "columns" | "rows";
|
|
213
|
-
levelId?: string | undefined;
|
|
214
|
-
oppositePath?: {
|
|
215
|
-
member: {
|
|
216
|
-
value: string | number | boolean | {
|
|
217
|
-
value: string;
|
|
218
|
-
type: "integer" | "decimal";
|
|
219
|
-
kind: "exact_number";
|
|
220
|
-
} | null;
|
|
221
|
-
kind: "value";
|
|
222
|
-
} | {
|
|
223
|
-
kind: "others";
|
|
224
|
-
rankingId: string;
|
|
225
|
-
};
|
|
226
|
-
levelId: string;
|
|
227
|
-
}[] | undefined;
|
|
228
|
-
} | undefined;
|
|
229
|
-
columnIds?: string[] | undefined;
|
|
230
|
-
conditionColumnId?: string | undefined;
|
|
231
|
-
applyToColumnIds?: string[] | undefined;
|
|
232
|
-
tableParts?: ("subtotal" | "body" | "header" | "footer" | "grandTotal")[] | undefined;
|
|
233
|
-
rowRoles?: ("member" | "subtotal" | "grand_total" | "others")[] | undefined;
|
|
234
|
-
depth?: number | undefined;
|
|
235
|
-
includeTotals?: boolean | undefined;
|
|
236
|
-
includeSubtotals?: boolean | undefined;
|
|
237
|
-
};
|
|
238
|
-
condition: {
|
|
239
|
-
value: string | number | boolean | {
|
|
240
|
-
value: string;
|
|
241
|
-
type: "integer" | "decimal";
|
|
242
|
-
kind: "exact_number";
|
|
243
|
-
} | null;
|
|
244
|
-
kind: "comparison";
|
|
245
|
-
operator: "eq" | "neq" | "gt" | "gte" | "lt" | "lte";
|
|
246
|
-
columnId: string;
|
|
247
|
-
} | {
|
|
248
|
-
kind: "between";
|
|
249
|
-
columnId: string;
|
|
250
|
-
min: string | number | boolean | {
|
|
251
|
-
value: string;
|
|
252
|
-
type: "integer" | "decimal";
|
|
253
|
-
kind: "exact_number";
|
|
254
|
-
} | null;
|
|
255
|
-
max: string | number | boolean | {
|
|
256
|
-
value: string;
|
|
257
|
-
type: "integer" | "decimal";
|
|
258
|
-
kind: "exact_number";
|
|
259
|
-
} | null;
|
|
260
|
-
inclusive?: boolean | undefined;
|
|
261
|
-
} | {
|
|
262
|
-
kind: "blank";
|
|
263
|
-
columnId: string;
|
|
264
|
-
isBlank: boolean;
|
|
265
|
-
} | {
|
|
266
|
-
value: string;
|
|
267
|
-
kind: "contains";
|
|
268
|
-
columnId: string;
|
|
269
|
-
exact?: boolean | undefined;
|
|
270
|
-
caseSensitive?: boolean | undefined;
|
|
271
|
-
} | {
|
|
272
|
-
kind: "topBottom";
|
|
273
|
-
count: number;
|
|
274
|
-
columnId: string;
|
|
275
|
-
direction: "top" | "bottom";
|
|
276
|
-
} | {
|
|
277
|
-
kind: "colorScale";
|
|
278
|
-
columnId: string;
|
|
279
|
-
range: "auto" | "manual";
|
|
280
|
-
colors: {
|
|
281
|
-
min: string;
|
|
282
|
-
max: string;
|
|
283
|
-
mid?: string | undefined;
|
|
284
|
-
};
|
|
285
|
-
min?: number | undefined;
|
|
286
|
-
max?: number | undefined;
|
|
287
|
-
mid?: number | undefined;
|
|
288
|
-
} | {
|
|
289
|
-
kind: "dataBar";
|
|
290
|
-
columnId: string;
|
|
291
|
-
range: "auto" | "manual";
|
|
292
|
-
color: string;
|
|
293
|
-
min?: number | undefined;
|
|
294
|
-
max?: number | undefined;
|
|
295
|
-
showValue?: boolean | undefined;
|
|
296
|
-
};
|
|
297
|
-
name?: string | undefined;
|
|
298
|
-
enabled?: boolean | undefined;
|
|
299
|
-
style?: {
|
|
300
|
-
dataBar?: {
|
|
301
|
-
color: string;
|
|
302
|
-
showValue: boolean;
|
|
303
|
-
} | undefined;
|
|
304
|
-
backgroundColor?: string | undefined;
|
|
305
|
-
textColor?: string | undefined;
|
|
306
|
-
fontWeight?: "normal" | "medium" | "semibold" | "bold" | undefined;
|
|
307
|
-
italic?: boolean | undefined;
|
|
308
|
-
textDecoration?: "none" | "underline" | "line-through" | undefined;
|
|
309
|
-
icon?: "arrowUp" | "arrowDown" | "warning" | "check" | "x" | undefined;
|
|
310
|
-
} | undefined;
|
|
311
|
-
}[];
|
|
312
|
-
} | undefined;
|
|
132
|
+
levelFormats: Readonly<Record<string, import('../../shared/analytics-protocol/index.js').SemaphorValueFormat>>;
|
|
133
|
+
measureFormats: Readonly<Record<string, import('../../shared/analytics-protocol/index.js').SemaphorValueFormat>>;
|
|
313
134
|
};
|
|
135
|
+
mode: "layout";
|
|
314
136
|
format: "csv" | "xlsx" | "pdf";
|
|
315
137
|
spec: {
|
|
316
138
|
source: {
|
|
@@ -324,11 +146,11 @@ export declare function buildMatrixDeliveryPayload(input: {
|
|
|
324
146
|
kind: "physical";
|
|
325
147
|
connectionId: string;
|
|
326
148
|
tableName: string;
|
|
149
|
+
dialect?: "postgres" | "mysql" | "mssql" | "snowflake" | "clickhouse" | "bigquery" | "redshift" | "duckdb" | "sqlite" | "unknown" | undefined;
|
|
327
150
|
label?: string | undefined;
|
|
328
151
|
connectionType?: string | undefined;
|
|
329
152
|
databaseName?: string | undefined;
|
|
330
153
|
schemaName?: string | undefined;
|
|
331
|
-
dialect?: "postgres" | "mysql" | "mssql" | "snowflake" | "clickhouse" | "bigquery" | "redshift" | "duckdb" | "sqlite" | "unknown" | undefined;
|
|
332
154
|
};
|
|
333
155
|
columns: readonly import('../../shared/analytics-protocol/index.js').MatrixLevel[];
|
|
334
156
|
measures: readonly ({
|
|
@@ -370,8 +192,8 @@ export declare function buildMatrixDeliveryPayload(input: {
|
|
|
370
192
|
parent: readonly {
|
|
371
193
|
member: {
|
|
372
194
|
value: string | number | boolean | {
|
|
373
|
-
value: string;
|
|
374
195
|
type: "integer" | "decimal";
|
|
196
|
+
value: string;
|
|
375
197
|
kind: "exact_number";
|
|
376
198
|
} | null;
|
|
377
199
|
kind: "value";
|
|
@@ -403,8 +225,8 @@ export declare function buildMatrixDeliveryPayload(input: {
|
|
|
403
225
|
path: readonly {
|
|
404
226
|
member: {
|
|
405
227
|
value: string | number | boolean | {
|
|
406
|
-
value: string;
|
|
407
228
|
type: "integer" | "decimal";
|
|
229
|
+
value: string;
|
|
408
230
|
kind: "exact_number";
|
|
409
231
|
} | null;
|
|
410
232
|
kind: "value";
|
|
@@ -423,8 +245,8 @@ export declare function buildMatrixDeliveryPayload(input: {
|
|
|
423
245
|
path: readonly {
|
|
424
246
|
member: {
|
|
425
247
|
value: string | number | boolean | {
|
|
426
|
-
value: string;
|
|
427
248
|
type: "integer" | "decimal";
|
|
249
|
+
value: string;
|
|
428
250
|
kind: "exact_number";
|
|
429
251
|
} | null;
|
|
430
252
|
kind: "value";
|
|
@@ -441,7 +263,6 @@ export declare function buildMatrixDeliveryPayload(input: {
|
|
|
441
263
|
kind: "all";
|
|
442
264
|
};
|
|
443
265
|
} | {
|
|
444
|
-
mode: "flat";
|
|
445
266
|
presentation: {
|
|
446
267
|
totals: {
|
|
447
268
|
columns: {
|
|
@@ -483,187 +304,10 @@ export declare function buildMatrixDeliveryPayload(input: {
|
|
|
483
304
|
};
|
|
484
305
|
levelLabels: Readonly<Record<string, string>>;
|
|
485
306
|
measureLabels: Readonly<Record<string, string>>;
|
|
486
|
-
levelFormats: Readonly<Record<string, import('../../shared/analytics-protocol/index.js').
|
|
487
|
-
|
|
488
|
-
pattern?: string | undefined;
|
|
489
|
-
locale?: string | undefined;
|
|
490
|
-
prefix?: string | undefined;
|
|
491
|
-
suffix?: string | undefined;
|
|
492
|
-
relative?: boolean | undefined;
|
|
493
|
-
timezone?: string | undefined;
|
|
494
|
-
sourceTimezone?: string | undefined;
|
|
495
|
-
} | {
|
|
496
|
-
type: "duration";
|
|
497
|
-
prefix?: string | undefined;
|
|
498
|
-
suffix?: string | undefined;
|
|
499
|
-
negativeStyle?: "minus" | "parentheses" | undefined;
|
|
500
|
-
inputUnit?: "second" | "minute" | "hour" | "day" | "millisecond" | undefined;
|
|
501
|
-
outputStyle?: "compact" | "digital" | "long" | undefined;
|
|
502
|
-
largestUnit?: "second" | "minute" | "hour" | "day" | "millisecond" | undefined;
|
|
503
|
-
smallestUnit?: "second" | "minute" | "hour" | "day" | "millisecond" | undefined;
|
|
504
|
-
maxUnits?: number | undefined;
|
|
505
|
-
} | {
|
|
506
|
-
type: "string";
|
|
507
|
-
prefix?: string | undefined;
|
|
508
|
-
suffix?: string | undefined;
|
|
509
|
-
} | {
|
|
510
|
-
type: "number" | "currency" | "percent" | "percentage" | "scientific";
|
|
511
|
-
currency?: string | undefined;
|
|
512
|
-
minimumFractionDigits?: number | undefined;
|
|
513
|
-
maximumFractionDigits?: number | undefined;
|
|
514
|
-
useGrouping?: boolean | undefined;
|
|
515
|
-
prefix?: string | undefined;
|
|
516
|
-
suffix?: string | undefined;
|
|
517
|
-
negativeStyle?: "minus" | "parentheses" | undefined;
|
|
518
|
-
compact?: boolean | undefined;
|
|
519
|
-
scale?: number | undefined;
|
|
520
|
-
percentValueMode?: "fraction" | "whole" | undefined;
|
|
521
|
-
}>>;
|
|
522
|
-
measureFormats: Readonly<Record<string, import('../../shared/analytics-protocol/index.js').TemporalBucketFormat | {
|
|
523
|
-
type: "date" | "datetime";
|
|
524
|
-
pattern?: string | undefined;
|
|
525
|
-
locale?: string | undefined;
|
|
526
|
-
prefix?: string | undefined;
|
|
527
|
-
suffix?: string | undefined;
|
|
528
|
-
relative?: boolean | undefined;
|
|
529
|
-
timezone?: string | undefined;
|
|
530
|
-
sourceTimezone?: string | undefined;
|
|
531
|
-
} | {
|
|
532
|
-
type: "duration";
|
|
533
|
-
prefix?: string | undefined;
|
|
534
|
-
suffix?: string | undefined;
|
|
535
|
-
negativeStyle?: "minus" | "parentheses" | undefined;
|
|
536
|
-
inputUnit?: "second" | "minute" | "hour" | "day" | "millisecond" | undefined;
|
|
537
|
-
outputStyle?: "compact" | "digital" | "long" | undefined;
|
|
538
|
-
largestUnit?: "second" | "minute" | "hour" | "day" | "millisecond" | undefined;
|
|
539
|
-
smallestUnit?: "second" | "minute" | "hour" | "day" | "millisecond" | undefined;
|
|
540
|
-
maxUnits?: number | undefined;
|
|
541
|
-
} | {
|
|
542
|
-
type: "string";
|
|
543
|
-
prefix?: string | undefined;
|
|
544
|
-
suffix?: string | undefined;
|
|
545
|
-
} | {
|
|
546
|
-
type: "number" | "currency" | "percent" | "percentage" | "scientific";
|
|
547
|
-
currency?: string | undefined;
|
|
548
|
-
minimumFractionDigits?: number | undefined;
|
|
549
|
-
maximumFractionDigits?: number | undefined;
|
|
550
|
-
useGrouping?: boolean | undefined;
|
|
551
|
-
prefix?: string | undefined;
|
|
552
|
-
suffix?: string | undefined;
|
|
553
|
-
negativeStyle?: "minus" | "parentheses" | undefined;
|
|
554
|
-
compact?: boolean | undefined;
|
|
555
|
-
scale?: number | undefined;
|
|
556
|
-
percentValueMode?: "fraction" | "whole" | undefined;
|
|
557
|
-
}>>;
|
|
558
|
-
conditionalFormatting?: {
|
|
559
|
-
version: 1;
|
|
560
|
-
rules: {
|
|
561
|
-
id: string;
|
|
562
|
-
target: {
|
|
563
|
-
level: "row" | "cell";
|
|
564
|
-
matrix?: {
|
|
565
|
-
axis: "columns" | "rows";
|
|
566
|
-
levelId?: string | undefined;
|
|
567
|
-
oppositePath?: {
|
|
568
|
-
member: {
|
|
569
|
-
value: string | number | boolean | {
|
|
570
|
-
value: string;
|
|
571
|
-
type: "integer" | "decimal";
|
|
572
|
-
kind: "exact_number";
|
|
573
|
-
} | null;
|
|
574
|
-
kind: "value";
|
|
575
|
-
} | {
|
|
576
|
-
kind: "others";
|
|
577
|
-
rankingId: string;
|
|
578
|
-
};
|
|
579
|
-
levelId: string;
|
|
580
|
-
}[] | undefined;
|
|
581
|
-
} | undefined;
|
|
582
|
-
columnIds?: string[] | undefined;
|
|
583
|
-
conditionColumnId?: string | undefined;
|
|
584
|
-
applyToColumnIds?: string[] | undefined;
|
|
585
|
-
tableParts?: ("subtotal" | "body" | "header" | "footer" | "grandTotal")[] | undefined;
|
|
586
|
-
rowRoles?: ("member" | "subtotal" | "grand_total" | "others")[] | undefined;
|
|
587
|
-
depth?: number | undefined;
|
|
588
|
-
includeTotals?: boolean | undefined;
|
|
589
|
-
includeSubtotals?: boolean | undefined;
|
|
590
|
-
};
|
|
591
|
-
condition: {
|
|
592
|
-
value: string | number | boolean | {
|
|
593
|
-
value: string;
|
|
594
|
-
type: "integer" | "decimal";
|
|
595
|
-
kind: "exact_number";
|
|
596
|
-
} | null;
|
|
597
|
-
kind: "comparison";
|
|
598
|
-
operator: "eq" | "neq" | "gt" | "gte" | "lt" | "lte";
|
|
599
|
-
columnId: string;
|
|
600
|
-
} | {
|
|
601
|
-
kind: "between";
|
|
602
|
-
columnId: string;
|
|
603
|
-
min: string | number | boolean | {
|
|
604
|
-
value: string;
|
|
605
|
-
type: "integer" | "decimal";
|
|
606
|
-
kind: "exact_number";
|
|
607
|
-
} | null;
|
|
608
|
-
max: string | number | boolean | {
|
|
609
|
-
value: string;
|
|
610
|
-
type: "integer" | "decimal";
|
|
611
|
-
kind: "exact_number";
|
|
612
|
-
} | null;
|
|
613
|
-
inclusive?: boolean | undefined;
|
|
614
|
-
} | {
|
|
615
|
-
kind: "blank";
|
|
616
|
-
columnId: string;
|
|
617
|
-
isBlank: boolean;
|
|
618
|
-
} | {
|
|
619
|
-
value: string;
|
|
620
|
-
kind: "contains";
|
|
621
|
-
columnId: string;
|
|
622
|
-
exact?: boolean | undefined;
|
|
623
|
-
caseSensitive?: boolean | undefined;
|
|
624
|
-
} | {
|
|
625
|
-
kind: "topBottom";
|
|
626
|
-
count: number;
|
|
627
|
-
columnId: string;
|
|
628
|
-
direction: "top" | "bottom";
|
|
629
|
-
} | {
|
|
630
|
-
kind: "colorScale";
|
|
631
|
-
columnId: string;
|
|
632
|
-
range: "auto" | "manual";
|
|
633
|
-
colors: {
|
|
634
|
-
min: string;
|
|
635
|
-
max: string;
|
|
636
|
-
mid?: string | undefined;
|
|
637
|
-
};
|
|
638
|
-
min?: number | undefined;
|
|
639
|
-
max?: number | undefined;
|
|
640
|
-
mid?: number | undefined;
|
|
641
|
-
} | {
|
|
642
|
-
kind: "dataBar";
|
|
643
|
-
columnId: string;
|
|
644
|
-
range: "auto" | "manual";
|
|
645
|
-
color: string;
|
|
646
|
-
min?: number | undefined;
|
|
647
|
-
max?: number | undefined;
|
|
648
|
-
showValue?: boolean | undefined;
|
|
649
|
-
};
|
|
650
|
-
name?: string | undefined;
|
|
651
|
-
enabled?: boolean | undefined;
|
|
652
|
-
style?: {
|
|
653
|
-
dataBar?: {
|
|
654
|
-
color: string;
|
|
655
|
-
showValue: boolean;
|
|
656
|
-
} | undefined;
|
|
657
|
-
backgroundColor?: string | undefined;
|
|
658
|
-
textColor?: string | undefined;
|
|
659
|
-
fontWeight?: "normal" | "medium" | "semibold" | "bold" | undefined;
|
|
660
|
-
italic?: boolean | undefined;
|
|
661
|
-
textDecoration?: "none" | "underline" | "line-through" | undefined;
|
|
662
|
-
icon?: "arrowUp" | "arrowDown" | "warning" | "check" | "x" | undefined;
|
|
663
|
-
} | undefined;
|
|
664
|
-
}[];
|
|
665
|
-
} | undefined;
|
|
307
|
+
levelFormats: Readonly<Record<string, import('../../shared/analytics-protocol/index.js').SemaphorValueFormat>>;
|
|
308
|
+
measureFormats: Readonly<Record<string, import('../../shared/analytics-protocol/index.js').SemaphorValueFormat>>;
|
|
666
309
|
};
|
|
310
|
+
mode: "flat";
|
|
667
311
|
format: "csv" | "xlsx";
|
|
668
312
|
spec: {
|
|
669
313
|
source: {
|
|
@@ -677,11 +321,11 @@ export declare function buildMatrixDeliveryPayload(input: {
|
|
|
677
321
|
kind: "physical";
|
|
678
322
|
connectionId: string;
|
|
679
323
|
tableName: string;
|
|
324
|
+
dialect?: "postgres" | "mysql" | "mssql" | "snowflake" | "clickhouse" | "bigquery" | "redshift" | "duckdb" | "sqlite" | "unknown" | undefined;
|
|
680
325
|
label?: string | undefined;
|
|
681
326
|
connectionType?: string | undefined;
|
|
682
327
|
databaseName?: string | undefined;
|
|
683
328
|
schemaName?: string | undefined;
|
|
684
|
-
dialect?: "postgres" | "mysql" | "mssql" | "snowflake" | "clickhouse" | "bigquery" | "redshift" | "duckdb" | "sqlite" | "unknown" | undefined;
|
|
685
329
|
};
|
|
686
330
|
columns: readonly import('../../shared/analytics-protocol/index.js').MatrixLevel[];
|
|
687
331
|
measures: readonly ({
|
|
@@ -723,8 +367,8 @@ export declare function buildMatrixDeliveryPayload(input: {
|
|
|
723
367
|
parent: readonly {
|
|
724
368
|
member: {
|
|
725
369
|
value: string | number | boolean | {
|
|
726
|
-
value: string;
|
|
727
370
|
type: "integer" | "decimal";
|
|
371
|
+
value: string;
|
|
728
372
|
kind: "exact_number";
|
|
729
373
|
} | null;
|
|
730
374
|
kind: "value";
|
|
@@ -760,8 +404,8 @@ export declare function buildMatrixDeliveryPayload(input: {
|
|
|
760
404
|
/** A Matrix data file request (CSV or Excel) for the direct path or a job. */
|
|
761
405
|
export type MatrixFileExportRequest = ReturnType<typeof buildMatrixDeliveryPayload> & {
|
|
762
406
|
format: ExportFileFormat;
|
|
763
|
-
/** One logical export (BA-D17): the direct attempt
|
|
407
|
+
/** One logical export (BA-D17): the direct attempt and its fallback share it. */
|
|
764
408
|
exportRequestId: string;
|
|
765
|
-
/**
|
|
766
|
-
delivery?: 'direct'
|
|
409
|
+
/** The browser always tries the direct path first (MX-D11). */
|
|
410
|
+
delivery?: 'direct';
|
|
767
411
|
};
|
|
@@ -394,7 +394,6 @@ type Actions = {
|
|
|
394
394
|
setCardSql: (sheetId: string, cardId: string, sql: string) => void;
|
|
395
395
|
setCardPython: (cardId: string, pythonCode: string) => void;
|
|
396
396
|
setCardDescription: (sheetId: string, cardId: string, description: string) => void;
|
|
397
|
-
setCardKpiOptions: (sheetId: string, cardId: string, kpiOptions: Record<string, any>) => void;
|
|
398
397
|
updateCardFilters: (cardId: string, filters: FilterGroup | undefined) => void;
|
|
399
398
|
clearCardFilters: (cardId: string) => void;
|
|
400
399
|
setCardInlineFilterValue: (cardId: string, filterValue: TFilterValue) => void;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TCard, TCardPreferences, TCustomCardPreferences, TFrame, TLegendOptions, AggregateCalc, SqlGen, ControlDefinition } from '../types/common-types.js';
|
|
2
2
|
import { TFilterValue } from '../../components/surfboard/filter/types.js';
|
|
3
3
|
import { TChartType } from '../charts/types.js';
|
|
4
4
|
import { FilterByColumn, OldFilterValue, GroupByColumn, MetricColumn, OrderBy, QueryConfig } from '../types/query-types.js';
|
|
5
5
|
import { TableActions } from './table-actions.js';
|
|
6
|
-
import { CardConfig, QueryColumnKeyMap } from '../types/explorer-types.js';
|
|
6
|
+
import { CardConfig, DetailTableBackupConfig, QueryColumnKeyMap } from '../types/explorer-types.js';
|
|
7
7
|
import { CardTypeChange, CardTypeChangeOptions } from '../utils/card-type-change.js';
|
|
8
8
|
import { ExplorerActions } from './explorer-actions.js';
|
|
9
|
+
import { SemaphorResultColumn } from '../../shared/analytics-protocol/contracts.js';
|
|
10
|
+
import { DroppedConditionalRule } from '../../shared/dashboard-authoring/conditional-formatting/retain.js';
|
|
9
11
|
/**
|
|
10
12
|
* Draft slots for preserving work when switching between dev and standard modes.
|
|
11
13
|
* When user switches FROM a mode, the current work is saved to that mode's draft slot.
|
|
@@ -46,6 +48,11 @@ export type EditorStore = {
|
|
|
46
48
|
cardId: string;
|
|
47
49
|
coordinate: import('../../shared/analytics-protocol/index.js').MatrixCoordinate;
|
|
48
50
|
};
|
|
51
|
+
/** Rules the last column change removed, for the rule panels' notice (conditional formatting store CR-D5). */
|
|
52
|
+
droppedConditionalRules?: {
|
|
53
|
+
cardId: string;
|
|
54
|
+
rules: DroppedConditionalRule[];
|
|
55
|
+
};
|
|
49
56
|
/** Live preview command port only; never persisted or copied into card config. */
|
|
50
57
|
matrixPreview?: {
|
|
51
58
|
cardId: string;
|
|
@@ -67,12 +74,21 @@ export type EditorStore = {
|
|
|
67
74
|
sqlGen: SqlGen;
|
|
68
75
|
frame: TFrame;
|
|
69
76
|
card: TCard;
|
|
77
|
+
/**
|
|
78
|
+
* The card as the editor last loaded it from outside: its open, a frame
|
|
79
|
+
* select, a panel that shows a dashboard or document card. The
|
|
80
|
+
* column-change rule leaves a load alone; it carries edits only (card
|
|
81
|
+
* appearance P2-37).
|
|
82
|
+
*/
|
|
83
|
+
loadedCard?: TCard;
|
|
70
84
|
activeTabCardId?: string | null;
|
|
71
85
|
showFilters: boolean;
|
|
72
86
|
applyFilters: boolean;
|
|
73
87
|
inlineFilterValuesMap: Record<string, TFilterValue[]>;
|
|
74
88
|
queryResultColumns: string[];
|
|
75
89
|
queryResultColumnKeyMap?: QueryColumnKeyMap;
|
|
90
|
+
/** The result's columns, with the pivot identities rule editors name pivot columns by. */
|
|
91
|
+
queryResultColumnMeta?: SemaphorResultColumn[];
|
|
76
92
|
queryError?: string;
|
|
77
93
|
selectedConnectionId?: string;
|
|
78
94
|
selectedDatamodelId?: string;
|
|
@@ -89,6 +105,15 @@ export type EditorStore = {
|
|
|
89
105
|
editorContext?: EditorContext;
|
|
90
106
|
/** Draft slots for mode switching - preserves work when toggling between dev/standard */
|
|
91
107
|
modeDrafts: ModeDrafts;
|
|
108
|
+
/**
|
|
109
|
+
* The work each tab the author left in this editing session set aside, by
|
|
110
|
+
* card id: its other-mode drafts and its Table/Detail switch backup,
|
|
111
|
+
* restored when it is opened again and never saved (editor modes across
|
|
112
|
+
* tabs EM-2).
|
|
113
|
+
*/
|
|
114
|
+
tabModeDrafts: Record<string, ModeDrafts & {
|
|
115
|
+
detailTableBackup?: DetailTableBackupConfig;
|
|
116
|
+
}>;
|
|
92
117
|
};
|
|
93
118
|
type Actions = TableActions & ExplorerActions & {
|
|
94
119
|
/** Resets the editor store to its initial state. Called when loading a new dashboard. */
|
|
@@ -108,7 +133,6 @@ type Actions = TableActions & ExplorerActions & {
|
|
|
108
133
|
setCardDescription: (description: string) => void;
|
|
109
134
|
setCardInfo: (info: string) => void;
|
|
110
135
|
setCardId: (cardId: string) => void;
|
|
111
|
-
setCountryLogo: (countryLogoId: string | null) => void;
|
|
112
136
|
setIsDevMode: (isDevMode: boolean) => void;
|
|
113
137
|
/**
|
|
114
138
|
* Switches between dev mode and standard mode with draft preservation.
|
|
@@ -122,10 +146,25 @@ type Actions = TableActions & ExplorerActions & {
|
|
|
122
146
|
/** Whether to skip saving draft (for initial setup) */
|
|
123
147
|
skipDraftSave?: boolean;
|
|
124
148
|
}) => void;
|
|
125
|
-
/**
|
|
149
|
+
/** Starts an editing session on this card: its mode and drafts; every tab's kept drafts go. */
|
|
126
150
|
initializeModeDrafts: (card: TCard) => void;
|
|
127
|
-
/**
|
|
128
|
-
|
|
151
|
+
/**
|
|
152
|
+
* The one tab switch (editor modes across tabs,
|
|
153
|
+
* docs/areas/authoring/editor-modes-across-tabs.md): the tab left is
|
|
154
|
+
* written to the frame in its saved form and its drafts are kept aside;
|
|
155
|
+
* the tab opened starts in the mode it holds, with its kept drafts.
|
|
156
|
+
*/
|
|
157
|
+
switchCardTab: (cardId: string) => void;
|
|
158
|
+
/**
|
|
159
|
+
* The one tab close (editor modes across tabs EM-8): closing the open tab
|
|
160
|
+
* opens the first remaining one through `switchCardTab`; closing another
|
|
161
|
+
* removes only it and its kept drafts, and the open tab stays as it is.
|
|
162
|
+
* `renumber` renumbers the remaining tabs (a custom visual's input slots),
|
|
163
|
+
* the open tab's live copy included.
|
|
164
|
+
*/
|
|
165
|
+
closeCardTab: (cardId: string, options?: {
|
|
166
|
+
renumber?: (cards: TCard[]) => TCard[];
|
|
167
|
+
}) => void;
|
|
129
168
|
/** Clear mode drafts (call when switching cards or closing editor) */
|
|
130
169
|
clearModeDrafts: () => void;
|
|
131
170
|
setOrderByColumns: (orderByColumns: OrderBy[]) => void;
|
|
@@ -150,14 +189,11 @@ type Actions = TableActions & ExplorerActions & {
|
|
|
150
189
|
setChartGrid: (chartGrid: 'xy' | 'x' | 'y' | 'none') => void;
|
|
151
190
|
setLegendOptions: (legendOptions: TLegendOptions) => void;
|
|
152
191
|
setActiveTabCardId: (activeTabCardId: string) => void;
|
|
153
|
-
updateCardTab: (activeTabCardId: string, currentCard: TCard) => void;
|
|
154
192
|
setSortChart: (sortChart: 'asc' | 'desc' | 'none') => void;
|
|
155
193
|
setChartOrientation: (indexAxis: 'x' | 'y') => void;
|
|
156
194
|
setCustomVisualCode: (code: string) => void;
|
|
157
195
|
setCardRefreshInterval: (refreshInterval: string) => void;
|
|
158
|
-
|
|
159
|
-
setColorRanges: (colorRanges: ColorRange[]) => void;
|
|
160
|
-
setQueryResultColumns: (columns: string[], columnKeyMap?: QueryColumnKeyMap) => void;
|
|
196
|
+
setQueryResultColumns: (columns: string[], columnKeyMap?: QueryColumnKeyMap, resultColumns?: SemaphorResultColumn[]) => void;
|
|
161
197
|
setRunSql: (runSql: boolean) => void;
|
|
162
198
|
setCardPreferences: (preferences: TCardPreferences) => void;
|
|
163
199
|
setCustomCardPreferences: (customPreferences: TCustomCardPreferences) => void;
|
|
@@ -165,6 +201,8 @@ type Actions = TableActions & ExplorerActions & {
|
|
|
165
201
|
setFilterOnClickColumnIndex: (index: number) => void;
|
|
166
202
|
setIsSqlRunning: (isSqlRunning: boolean) => void;
|
|
167
203
|
setCard: (card: TCard) => void;
|
|
204
|
+
/** Shows a card from outside the editor (the dashboard, a document): a load, not an edit of the card it replaces. */
|
|
205
|
+
loadCard: (card: TCard) => void;
|
|
168
206
|
setFrame: (frame: TFrame) => void;
|
|
169
207
|
/** Replaces all cards in the frame with new cards. Sets first card as active. */
|
|
170
208
|
replaceFrameCards: (cards: TCard[]) => void;
|
|
@@ -2,7 +2,9 @@ import { PersistedColumnSettingsMap } from '../../components/visual/data-table/t
|
|
|
2
2
|
import { ColumnSizingState } from '@tanstack/react-table';
|
|
3
3
|
import { EditorStore } from './editor-store.js';
|
|
4
4
|
import { TCard } from '../types/common-types.js';
|
|
5
|
-
import { TableBaseFormatting
|
|
5
|
+
import { TableBaseFormatting } from '../table-formatting/index.js';
|
|
6
|
+
import { ConditionalRule } from '../../shared/dashboard-authoring/conditional-formatting/types.js';
|
|
7
|
+
import { ColumnSettingsEdit } from '../formatters/table-column-settings.js';
|
|
6
8
|
export declare const EMPTY_COLUMN_SETTINGS: PersistedColumnSettingsMap;
|
|
7
9
|
export declare const EMPTY_COLUMN_VISIBILITY: Record<string, boolean>;
|
|
8
10
|
export interface EditorState {
|
|
@@ -10,9 +12,13 @@ export interface EditorState {
|
|
|
10
12
|
actions: TableActions;
|
|
11
13
|
}
|
|
12
14
|
export interface TableActions {
|
|
13
|
-
|
|
15
|
+
/** One column's settings edit, written to the contract's stores (column formats CF-D7). */
|
|
16
|
+
editColumnSettings: (edit: ColumnSettingsEdit) => void;
|
|
17
|
+
/** Clears every column's settings, and a SQL card's column formats. */
|
|
18
|
+
resetAllColumnSettings: () => void;
|
|
14
19
|
updateTableBaseFormatting: (baseFormatting: TableBaseFormatting) => void;
|
|
15
|
-
|
|
20
|
+
/** The card's rules (`preferences.conditionalFormatting`, conditional formatting store CR-D7). */
|
|
21
|
+
updateConditionalRules: (rules: ConditionalRule[]) => void;
|
|
16
22
|
updateColumnVisibility: (columnId: string, isVisible: boolean) => void;
|
|
17
23
|
updateColumnSizing: (sizing: ColumnSizingState) => void;
|
|
18
24
|
updatePageSize: (pageSize: number) => void;
|
|
@@ -20,8 +26,6 @@ export interface TableActions {
|
|
|
20
26
|
showAllColumns: () => void;
|
|
21
27
|
hideAllColumns: () => void;
|
|
22
28
|
toggleSelectColumn: (isVisible: boolean) => void;
|
|
23
|
-
initializeColumnVisibility: (columnIds: string[]) => void;
|
|
24
|
-
updateAllColumnVisibility: (visibility: Record<string, boolean>) => void;
|
|
25
29
|
}
|
|
26
30
|
export declare const createTableActions: (set: (fn: (state: EditorStore) => Partial<EditorStore>) => void) => TableActions;
|
|
27
31
|
export declare const selectColumnSettings: (state: EditorState) => PersistedColumnSettingsMap;
|