react-semaphor 0.1.560 → 0.1.562
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 +450 -423
- 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-CHLxsPfX.js → analytics-base-schemas-BaIQrEzX.js} +221 -188
- package/dist/chunks/{assistant-chat-Bu2fFm_I.js → assistant-chat-R_yT8xH4.js} +116 -117
- package/dist/chunks/bookmark-impact-D4Kl4amw.js +75 -0
- package/dist/chunks/bookmark-state-CWeoGbrx.js +743 -0
- package/dist/chunks/{braces-Da41xfUd.js → braces-DzgoQC64.js} +1 -1
- package/dist/chunks/{comparison-window-caption-4FNkMrzE.js → comparison-window-caption-D1EUXzaR.js} +550 -425
- package/dist/chunks/{context-BgPDzLHZ.js → context-R31TSL5V.js} +1 -1
- package/dist/chunks/{dashboard-_MeBuy67.js → dashboard-Bp1y5oun.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-CEi4Pr_v.js → dashboard-briefing-launcher-S5FB3aUW.js} +236 -236
- package/dist/chunks/dashboard-controls-CfC_6Ztn.js +2277 -0
- package/dist/chunks/{dashboard-json-B1mU_OMa.js → dashboard-json-gYZT7ZQY.js} +5 -5
- package/dist/chunks/dates-DFY7Gfss.js +91 -0
- package/dist/chunks/{edit-dashboard-visual-0CJN31Y3.js → edit-dashboard-visual-u7OI_g8Q.js} +7119 -7198
- package/dist/chunks/filter-reach-copy-CvV7W5dd.js +3965 -0
- package/dist/chunks/{filter-value-text-CRC-K_l_.js → filter-value-text-CPwFkrMz.js} +11 -10
- package/dist/chunks/global-date-filter-utils-N1kcsOFE.js +16722 -0
- package/dist/chunks/{index-DtHidOPV.js → index-CNGkfUp4.js} +269 -264
- package/dist/chunks/{layout-grid-BvsH4RY2.js → layout-grid-BM65viQh.js} +1 -1
- package/dist/chunks/{list-filter-Dg0otx5E.js → list-filter-BoeLBfL3.js} +1 -1
- package/dist/chunks/{matrix-analytical-definition-CM18W8w6.js → matrix-analytical-definition-hEucouWM.js} +4 -4
- package/dist/chunks/{matrix-card-HPskLaPy.js → matrix-card-CCh9JjP1.js} +3 -3
- package/dist/chunks/{matrix-member-presentation-Bbrfrke4.js → matrix-member-presentation-DsAUbuoL.js} +1 -1
- package/dist/chunks/{matrix-operation-contract-WPv4R-H_.js → matrix-operation-contract-DsLdFdSa.js} +365 -349
- package/dist/chunks/{metric-comparison-ljMKYZKa.js → metric-comparison-Bnso1cm1.js} +6 -6
- package/dist/chunks/{model-change-Ccn1zaxl.js → model-change-T1cRkh3m.js} +1 -1
- package/dist/chunks/{palette-Bsh376zO.js → palette-p1XSJFgB.js} +1 -1
- package/dist/chunks/pivot-result-contract-expectations-B53jqszr.js +56 -0
- package/dist/chunks/{pivot-result-identity-vS9TSh4f.js → pivot-result-identity-Dq5jm-EC.js} +1 -1
- package/dist/chunks/{zoned-wall-clock-B1n_WjW3.js → raw-temporal-value-Bqz8wc7L.js} +97 -46
- package/dist/chunks/{report-preferences-dialog-BV8L0SeS.js → report-preferences-dialog-C4RAR8u5.js} +68 -63
- package/dist/chunks/{report-runtime-context-BZQh9ywy.js → report-runtime-context-BITkNSDa.js} +2 -2
- package/dist/chunks/resolve-dashboard-input-context-DaDrZGuA.js +8214 -0
- package/dist/chunks/{save-B5EAsgQF.js → save-CHV1B1fL.js} +1 -1
- package/dist/chunks/{saved-dashboard-context-n2Wn11cV.js → saved-dashboard-context-DFYBrE6O.js} +93 -94
- package/dist/chunks/{selection-filter-compiler-BKXmyLrS.js → selection-filter-compiler-CUDRnUxc.js} +19 -18
- package/dist/chunks/{selection-reducer-D0YnaAD9.js → selection-reducer-Bz5aywT4.js} +1 -1
- package/dist/chunks/{semaphor-ready-indicator-XLBLOJ2V.js → semaphor-ready-indicator-Cfuafnem.js} +38188 -40344
- package/dist/chunks/{shelf-drop-preview-context-DHMa54a-.js → shelf-drop-preview-context-BR2GEYog.js} +81 -82
- package/dist/chunks/{source-entity-resolution-dUG5VWRm.js → source-entity-resolution-DdDVXFB8.js} +6 -6
- package/dist/chunks/{switch-ByxH4M7t.js → switch-BW4yXSYs.js} +3 -3
- package/dist/chunks/{table-export-sheet-C_GdeTYU.js → table-export-sheet-bSXxGn-v.js} +1 -1
- package/dist/chunks/temporal-input-presentation-sk9gqLi6.js +4960 -0
- package/dist/chunks/{token-types-CQtXUVMy.js → token-types-BUK06hU2.js} +1 -1
- package/dist/chunks/{upload-wbR-NVzq.js → upload-BnmuyPqW.js} +1 -1
- package/dist/chunks/{use-create-flow-overlay-state-CEBaLOKC.js → use-create-flow-overlay-state-DyzhWvRJ.js} +6 -6
- package/dist/chunks/{validators-CXTneCA4.js → validators-BIM0FE31.js} +774 -895
- package/dist/dashboard/index.js +2 -2
- package/dist/dashboard-authoring/index.js +2477 -2685
- package/dist/data-app-sdk/index.js +30 -30
- package/dist/data-app-sdk-adapters/index.js +3 -3
- package/dist/data-app-sdk-validation/index.js +25 -25
- package/dist/format-utils/index.js +274 -267
- package/dist/index.js +59 -59
- 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/briefings/attachment-outcomes.d.ts +1 -1
- package/dist/types/components/dashboard/dashboard-create-dialog.d.ts +23 -0
- package/dist/types/components/dashboard/summary-number-formatter.d.ts +6 -0
- package/dist/types/components/index.d.ts +1 -2
- package/dist/types/components/surfboard/filter/types.d.ts +3 -1
- package/dist/types/index.js +50 -51
- package/dist/types/lib/formatters/kpi-number-formatter.d.ts +41 -0
- package/dist/types/lib/formatters/raw-temporal-presentation.d.ts +59 -2
- package/dist/types/lib/interactions/get-click-context-from-matrix.d.ts +5 -0
- package/dist/types/lib/interactions/get-click-context-from-table.d.ts +45 -0
- package/dist/types/lib/print/print-inputs.d.ts +2 -1
- package/dist/types/lib/query-context/assemble-card-query.d.ts +2 -0
- package/dist/types/lib/query-context/build-dashboard-execution-snapshot.d.ts +5 -0
- package/dist/types/lib/selection/selection-from-click-context.d.ts +41 -0
- package/dist/types/lib/stores/editor-store.d.ts +9 -1
- package/dist/types/lib/stores/table-actions.d.ts +0 -2
- package/dist/types/lib/types/common-types.d.ts +6 -0
- package/dist/types/lib/types/explorer-types.d.ts +7 -1
- package/dist/types/lib/types/interaction-types.d.ts +3 -1
- package/dist/types/lib/types/token-types.d.ts +0 -1
- package/dist/types/shared/analytics-protocol/analytics-base-schemas.d.ts +13 -1
- package/dist/types/shared/analytics-protocol/contracts.d.ts +9 -40
- package/dist/types/shared/analytics-protocol/measure-aggregation-profile.d.ts +12 -0
- package/dist/types/shared/analytics-protocol/selection-contract.d.ts +12 -2
- package/dist/types/shared/analytics-protocol/validators.d.ts +1 -2
- package/dist/types/shared/assistant-protocol/context.d.ts +8 -8
- package/dist/types/shared/dashboard-authoring/card-formats/sql-date-pattern.d.ts +7 -1
- 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 +76 -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-polarity-write.d.ts +5 -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 +17 -0
- package/dist/types/shared/dashboard-authoring/card-settings/inputs.d.ts +117 -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 +51 -0
- package/dist/types/shared/dashboard-authoring/card-settings/views.d.ts +30 -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 +3402 -4313
- package/dist/types/shared/dashboard-authoring/changes/diagnostics.d.ts +49 -8
- package/dist/types/shared/dashboard-authoring/changes/field-ref.d.ts +91 -0
- package/dist/types/shared/dashboard-authoring/changes/read-card-query.d.ts +7 -0
- package/dist/types/shared/dashboard-authoring/changes/resolve-dashboard-changes.d.ts +52 -2
- package/dist/types/shared/dashboard-authoring/changes/resolve-dashboard-create.d.ts +26 -0
- package/dist/types/shared/dashboard-authoring/click-to-filter-settings.d.ts +2 -1
- package/dist/types/shared/dashboard-authoring/conditional-formatting/kpi.d.ts +1 -8
- package/dist/types/shared/dashboard-authoring/conditional-formatting/schema.d.ts +20 -20
- package/dist/types/shared/dashboard-authoring/detail-date-presentation.d.ts +9 -0
- package/dist/types/shared/dashboard-authoring/index.d.ts +11 -6
- package/dist/types/shared/dashboard-authoring/kpi-figure.d.ts +123 -0
- package/dist/types/shared/dashboard-authoring/measure-calculations/apply.d.ts +8 -0
- package/dist/types/shared/dashboard-authoring/measure-calculations/comparison.d.ts +16 -0
- package/dist/types/shared/dashboard-authoring/measure-calculations/dates.d.ts +41 -0
- package/dist/types/shared/dashboard-authoring/measure-calculations/index.d.ts +17 -0
- package/dist/types/shared/dashboard-authoring/measure-calculations/options.d.ts +63 -0
- package/dist/types/shared/dashboard-authoring/measure-calculations/read.d.ts +16 -0
- package/dist/types/shared/dashboard-authoring/measure-calculations/resolve.d.ts +79 -0
- package/dist/types/shared/dashboard-authoring/measure-calculations/schemas.d.ts +934 -0
- package/dist/types/shared/dashboard-authoring/measure-calculations/sentences.d.ts +4 -0
- package/dist/types/shared/dashboard-authoring/measure-calculations/set.d.ts +11 -0
- package/dist/types/shared/dashboard-authoring/measure-calculations/transform.d.ts +63 -0
- package/dist/types/shared/dashboard-authoring/measure-calculations/window-transforms.d.ts +60 -0
- package/dist/types/shared/dashboard-authoring/new-card.d.ts +12 -1
- package/dist/types/shared/dashboard-authoring/operations/apply-dashboard-operations.d.ts +2 -1
- package/dist/types/shared/dashboard-authoring/operations/operation-sentences.d.ts +46 -0
- package/dist/types/shared/dashboard-authoring/operations/operation-types.d.ts +73 -3
- package/dist/types/shared/dashboard-authoring/outline/outline-dashboard.d.ts +21 -3
- package/dist/types/shared/dashboard-authoring/text-card-words/blocks.d.ts +58 -0
- package/dist/types/shared/dashboard-authoring/text-card-words/index.d.ts +55 -0
- package/dist/types/shared/dashboard-authoring/text-card-words/rich-content.d.ts +18 -0
- package/dist/types/shared/dashboard-viewer/bookmark-impact.d.ts +33 -0
- package/dist/types/shared/format-utils/document-print.d.ts +82 -0
- package/dist/types/shared/format-utils/formatters/matrix-formatter.d.ts +8 -1
- package/dist/types/shared/format-utils/index.d.ts +1 -0
- package/dist/types/shared/format-utils/raw-temporal.d.ts +18 -7
- package/dist/types/shared/temporal/index.d.ts +1 -0
- package/dist/types/shared/temporal/raw-temporal-equality.d.ts +19 -0
- package/dist/types/shared/temporal/raw-temporal-value.d.ts +29 -0
- package/dist/types/shared/temporal/zoned-wall-clock.d.ts +6 -0
- package/package.json +2 -2
- package/dist/chunks/bookmark-state-BFY9oNmr.js +0 -111
- package/dist/chunks/custom-visual-inputs-Dz-enUNR.js +0 -292
- package/dist/chunks/dashboard-controls-Bi7fyG-4.js +0 -2339
- package/dist/chunks/document-dashboard-inputs-CkWfDB8c.js +0 -3010
- package/dist/chunks/filter-reach-copy-BF4w4kI2.js +0 -3738
- package/dist/chunks/global-date-filter-utils-D8365uPH.js +0 -12889
- package/dist/chunks/pivot-result-contract-expectations-Bl5suy4-.js +0 -1832
- package/dist/chunks/raw-temporal-presentation-BHm7s-hz.js +0 -540
- package/dist/chunks/resolve-dashboard-input-context-CAMiWvyR.js +0 -5280
- package/dist/chunks/table-settings-Imz0FgWi.js +0 -637
- package/dist/chunks/temporal-input-presentation-uvNK_tM0.js +0 -3228
- package/dist/types/components/dashboard/ai-dashboard-create-dialog.d.ts +0 -38
- package/dist/types/components/dashboard/dashboard-create-template.d.ts +0 -10
- package/dist/types/lib/hooks/use-dashboard-authoring.d.ts +0 -49
- package/dist/types/shared/dashboard-authoring/artifact-compiler.d.ts +0 -6
- package/dist/types/shared/dashboard-authoring/contracts.d.ts +0 -106
- package/dist/types/shared/dashboard-authoring/protocol-adapter.d.ts +0 -7
- package/dist/types/shared/dashboard-authoring/source-matching.d.ts +0 -34
- package/dist/types/shared/dashboard-authoring/validators.d.ts +0 -2
package/dist/surfboard/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a, R as s, D as o } from "../chunks/report-preferences-dialog-
|
|
2
|
-
import { C as f, E as D } from "../chunks/
|
|
1
|
+
import { a, R as s, D as o } from "../chunks/report-preferences-dialog-C4RAR8u5.js";
|
|
2
|
+
import { C as f, E as D } from "../chunks/bookmark-state-CWeoGbrx.js";
|
|
3
3
|
export {
|
|
4
4
|
f as CONTROL_CARD_DEFAULT_VALUE,
|
|
5
5
|
a as DisplayFormatPreferencesFields,
|
|
@@ -4,7 +4,7 @@ import { BriefingAttachmentFormat } from './index.js';
|
|
|
4
4
|
* RA-D14). The app decides the code and writes the customer line; the run
|
|
5
5
|
* card reads both back from the run.
|
|
6
6
|
*/
|
|
7
|
-
export declare const BRIEFING_ATTACHMENT_OMISSION_CODES: readonly ["PDF_ROW_LIMIT_EXCEEDED", "PDF_SIZE_LIMIT_EXCEEDED", "TABLE_COMPLETENESS_UNVERIFIED", "CARD_QUERY_FAILED", "RENDER_NOT_READY", "RENDER_TIMED_OUT", "EXPORT_JOB_FAILED", "ATTACHMENT_UNAVAILABLE", "EXCEL_LIMIT_EXCEEDED", "EXPORT_ROW_LIMIT_EXCEEDED", "EXPORT_COUNT_UNAVAILABLE", "EXPORT_NO_ROWS", "IMAGE_TOO_LARGE"];
|
|
7
|
+
export declare const BRIEFING_ATTACHMENT_OMISSION_CODES: readonly ["PDF_ROW_LIMIT_EXCEEDED", "PDF_SIZE_LIMIT_EXCEEDED", "TABLE_COMPLETENESS_UNVERIFIED", "CARD_QUERY_FAILED", "RENDER_NOT_READY", "RENDER_TIMED_OUT", "EXPORT_JOB_FAILED", "ATTACHMENT_UNAVAILABLE", "EXCEL_LIMIT_EXCEEDED", "EXPORT_ROW_LIMIT_EXCEEDED", "EXPORT_COUNT_UNAVAILABLE", "EXPORT_NO_ROWS", "IMAGE_TOO_LARGE", "DOCUMENT_PAGE_OVERFLOW", "DOCUMENT_ROW_LIMIT_EXCEEDED", "DOCUMENT_SECTION_SETUP", "REPORT_INPUTS_MISSING"];
|
|
8
8
|
export type BriefingAttachmentOmissionCode = (typeof BRIEFING_ATTACHMENT_OMISSION_CODES)[number];
|
|
9
9
|
/** One left-out attachment, as recorded on the run and read by every channel. */
|
|
10
10
|
export type BriefingOmittedAttachment = {
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
/** What the dialog hands its host to create: the new dashboard's title and description. */
|
|
3
|
+
export type DashboardCreateBlankData = {
|
|
4
|
+
title: string;
|
|
5
|
+
description: string;
|
|
6
|
+
};
|
|
7
|
+
export interface DashboardCreateDialogProps {
|
|
8
|
+
open: boolean;
|
|
9
|
+
onOpenChange: (open: boolean) => void;
|
|
10
|
+
onCreateBlank: (data: DashboardCreateBlankData) => void | Promise<void>;
|
|
11
|
+
isCreatingBlank: boolean;
|
|
12
|
+
/** The host's settings under the title, such as who can see the new dashboard. */
|
|
13
|
+
settingsSlot?: ReactNode;
|
|
14
|
+
blankDescription?: string;
|
|
15
|
+
description?: string;
|
|
16
|
+
canCreate?: boolean;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Names a new, empty dashboard; the person builds it in the editor. The
|
|
20
|
+
* console and the embedded dashboard hub both mount it and save through
|
|
21
|
+
* their own blank create.
|
|
22
|
+
*/
|
|
23
|
+
export declare function DashboardCreateDialog({ open, onOpenChange, onCreateBlank, isCreatingBlank, settingsSlot, blankDescription, description, canCreate, }: DashboardCreateDialogProps): import("react").JSX.Element;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { KpiNumberFormatter } from '../../lib/formatters/kpi-number-formatter.js';
|
|
1
2
|
import { TCard } from '../../lib/types/common-types.js';
|
|
2
3
|
import { ResolvedValueFormatPreferences } from '../../shared/value-format-preferences/index.js';
|
|
3
4
|
export type SummaryNumberFormatter = {
|
|
@@ -5,6 +6,11 @@ export type SummaryNumberFormatter = {
|
|
|
5
6
|
formatSigned: (value: number | null) => string;
|
|
6
7
|
formatPct: (value: number | null) => string;
|
|
7
8
|
};
|
|
9
|
+
/** A summary's numbers in the KPI value's formats: its formatter and its delta's. */
|
|
10
|
+
export declare function summaryNumberFormatterFrom({ formatter, deltaFormatter, }: {
|
|
11
|
+
formatter: KpiNumberFormatter;
|
|
12
|
+
deltaFormatter: KpiNumberFormatter;
|
|
13
|
+
}): SummaryNumberFormatter;
|
|
8
14
|
export declare function buildSummaryNumberFormatter({ card, preferences, boundCurrency, }: {
|
|
9
15
|
card?: TCard;
|
|
10
16
|
preferences?: ResolvedValueFormatPreferences | null;
|
|
@@ -59,8 +59,7 @@ export * from './providers/semaphor-query-provider.js';
|
|
|
59
59
|
export { invalidateToken } from '../lib/api/invalidate-token.js';
|
|
60
60
|
export { downloadPdf, downloadDocumentPdf } from '../lib/download-pdf.js';
|
|
61
61
|
export { DashboardExportDialog } from './dashboard/dashboard-export-dialog.js';
|
|
62
|
-
export {
|
|
63
|
-
export type { DashboardAuthoringSource } from '../lib/hooks/use-dashboard-authoring.js';
|
|
62
|
+
export { DashboardCreateDialog, type DashboardCreateDialogProps, type DashboardCreateBlankData, } from './dashboard/dashboard-create-dialog.js';
|
|
64
63
|
export { SummaryCard } from './dashboard/summary-card.js';
|
|
65
64
|
export { CardSummary } from './dashboard/card-summary.js';
|
|
66
65
|
export { useDashboardSummary } from '../lib/hooks/use-dashboard-summary.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DashboardInputTargetContext } from '../../../lib/dashboard-inputs/dashboard-input-target-context.js';
|
|
2
2
|
import { NormalizedDashboardInput } from '../../../lib/types/common-types.js';
|
|
3
3
|
import { CalculatedFieldFormula, Field } from '../../../lib/types/explorer-types.js';
|
|
4
|
-
import { TemporalBucketMetadata } from '../../../shared/analytics-protocol/contracts.js';
|
|
4
|
+
import { RawTemporalSelection, TemporalBucketMetadata } from '../../../shared/analytics-protocol/contracts.js';
|
|
5
5
|
import { DateUnit, RelativeDateFilter, RelativeDateUnit, SubDayDateUnit } from '../../../shared/analytics-protocol/relative-date-filter.js';
|
|
6
6
|
export type DateSelectionMode = 'range' | 'months' | 'day';
|
|
7
7
|
export type DateComparisonOperation = '=' | '!=' | '>' | '>=' | '<' | '<=' | 'between' | 'not between' | 'is null' | 'is not null';
|
|
@@ -141,6 +141,8 @@ type BaseFilter = {
|
|
|
141
141
|
semanticContext?: FilterSemanticContext;
|
|
142
142
|
/** Governed meaning for canonical grouped-temporal filter values. */
|
|
143
143
|
temporalBucket?: TemporalBucketMetadata;
|
|
144
|
+
/** A raw date-time value from a result, in its report timezone (CF-D4, ledger P7-04). */
|
|
145
|
+
rawTemporal?: RawTemporalSelection;
|
|
144
146
|
/**
|
|
145
147
|
* Set on the Global Date value bound to a card's date field. On that field
|
|
146
148
|
* it replaces the card's own date range for the run; any other date filter
|
package/dist/types/index.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { C as
|
|
3
|
-
import { D as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { D as $ } from "../chunks/report-runtime-context-BZQh9ywy.js";
|
|
1
|
+
import { B as s, x as r, C as l, E as o, V as i, j as n, c as d, g as m, f as u, b as c, e as E, d as C, a as T, w as p, v as D, h as A, l as I, u as _, s as F, m as S, n as b, p as L, k as f, o as N, q as R, i as y, r as g, t as h } from "../chunks/bookmark-state-CWeoGbrx.js";
|
|
2
|
+
import { C as M, D as O, L as V, e as w, g as k, j as U, h as B, k as K, d as z, b as v, i as Y, c as q, n as G, f as P } from "../chunks/validators-BIM0FE31.js";
|
|
3
|
+
import { D as j } from "../chunks/token-types-BUK06hU2.js";
|
|
4
|
+
import { r as J, a as X } from "../chunks/pivot-result-identity-Dq5jm-EC.js";
|
|
5
|
+
import { D as Z } from "../chunks/report-runtime-context-BITkNSDa.js";
|
|
7
6
|
const e = [
|
|
8
7
|
"concatenate",
|
|
9
8
|
"conditional-category",
|
|
@@ -37,51 +36,51 @@ const e = [
|
|
|
37
36
|
"is-blank"
|
|
38
37
|
];
|
|
39
38
|
export {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
39
|
+
s as BOOKMARK_STATE_VERSION,
|
|
40
|
+
r as BOOKMARK_VISIBILITIES,
|
|
41
|
+
M as CALCULATED_FIELD_ENTITY_MARKER,
|
|
43
42
|
e as CALCULATED_FIELD_TEMPLATE_IDS,
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
43
|
+
l as CONTROL_CARD_DEFAULT_VALUE,
|
|
44
|
+
O as DATE_FORMAT_VALUES,
|
|
45
|
+
Z as DEFAULT_CALENDAR_CONTEXT,
|
|
46
|
+
j as DEFAULT_SEMANTIC_DOMAIN_ACCESS,
|
|
47
|
+
o as EMPTY_SELECTION,
|
|
48
|
+
V as LEGACY_CALCULATED_FIELD_ENTITY_MARKER,
|
|
49
|
+
i as VIEWER_LIMITS,
|
|
50
|
+
n as VIEWER_TABLE_SETTINGS_VERSION,
|
|
51
|
+
d as collectDatasetNamesFromExplorerField,
|
|
52
|
+
m as collectDatasetNamesFromFilterGroup,
|
|
53
|
+
u as collectExecutionDatasetNamesFromExplorerField,
|
|
54
|
+
c as collectPreferredDatasetNamesFromExplorerField,
|
|
55
|
+
E as collectQualifiedDatasetNamesFromExplorerField,
|
|
56
|
+
C as datasetRefFromSource,
|
|
57
|
+
T as dependencyDisplayIdentity,
|
|
58
|
+
w as getCalculatedFieldComputeStage,
|
|
60
59
|
p as getCustomizableTableCardIds,
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
60
|
+
k as getFieldRuntimeColumnName,
|
|
61
|
+
D as getSortableTableCardIds,
|
|
62
|
+
U as hasCalculatedFieldMarker,
|
|
63
|
+
B as hasCalculatedFormulaInputs,
|
|
64
|
+
K as hasSyntheticCalculatedFieldOwner,
|
|
65
|
+
A as humanizeDatasetName,
|
|
66
|
+
z as inspectCalculatedField,
|
|
67
|
+
v as isCalculatedDimension,
|
|
68
|
+
Y as isCalculatedMetric,
|
|
69
|
+
q as isDerivedField,
|
|
70
|
+
I as isEmptyViewerTableSettings,
|
|
71
|
+
_ as isTableCardCustomizable,
|
|
72
|
+
F as isTableCardSortable,
|
|
73
|
+
S as measureJsonBytes,
|
|
74
|
+
G as normalizeCalculatedFieldRepresentation,
|
|
75
|
+
b as normalizeViewerTableSettings,
|
|
76
|
+
L as parseBookmarkState,
|
|
77
|
+
f as parseTableColumnId,
|
|
78
|
+
N as parseViewerTableSettings,
|
|
79
|
+
R as parseViewerTableSettingsMap,
|
|
80
|
+
y as readBookmarkState,
|
|
81
|
+
g as resolveFieldDatasetDependencies,
|
|
82
|
+
J as resolveQueryColumnKeyMapEntry,
|
|
83
|
+
X as resolveUniqueQueryColumnKeyMapEntry,
|
|
84
|
+
P as shouldDropInheritedCalculationAggregate,
|
|
85
|
+
h as toTableColumnId
|
|
87
86
|
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { KpiColumn } from '../../shared/dashboard-authoring/kpi-figure.js';
|
|
2
|
+
import { CanonicalFormatSpec } from './canonical-format-adapter.js';
|
|
3
|
+
import { TCard, TFormatOptions } from '../types/common-types.js';
|
|
4
|
+
import { ResolvedValueFormatPreferences } from '../../shared/value-format-preferences/index.js';
|
|
5
|
+
export type KpiNumberFormatter = {
|
|
6
|
+
format: (value: number | null) => string;
|
|
7
|
+
formatSigned: (value: number | null) => string;
|
|
8
|
+
supportsComparisonDeltaInheritance: boolean;
|
|
9
|
+
/** The KPI's active format, for the comparison indicator's own fallback text. */
|
|
10
|
+
formatOptions?: TFormatOptions;
|
|
11
|
+
/** The locale the column formats in. */
|
|
12
|
+
locale: string;
|
|
13
|
+
};
|
|
14
|
+
type KpiNumberFormatterInput = {
|
|
15
|
+
card?: TCard;
|
|
16
|
+
/** The column to format: the KPI's value (the KPI value owner's) unless another measure is named. */
|
|
17
|
+
column?: KpiColumn;
|
|
18
|
+
preferences?: ResolvedValueFormatPreferences | null;
|
|
19
|
+
boundCurrency?: string;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* A KPI column's format with the viewer's preferences and bound currency
|
|
23
|
+
* applied, and the locale it formats in. For a difference (`numericDelta`):
|
|
24
|
+
* the column's own format only when it is a number or a duration (a date or
|
|
25
|
+
* text format can't show one), else the plain number fallback.
|
|
26
|
+
*/
|
|
27
|
+
export declare function resolveKpiFormatContext({ card, column, preferences, boundCurrency, numericDelta, }: KpiNumberFormatterInput & {
|
|
28
|
+
numericDelta?: boolean;
|
|
29
|
+
}): {
|
|
30
|
+
locale: string;
|
|
31
|
+
canonicalPrimaryFormat?: CanonicalFormatSpec;
|
|
32
|
+
};
|
|
33
|
+
/** A KPI column's formatter. */
|
|
34
|
+
export declare function buildKpiNumberFormatter(input: KpiNumberFormatterInput): KpiNumberFormatter;
|
|
35
|
+
/**
|
|
36
|
+
* The formatter a comparison's difference uses: the column's format when it is
|
|
37
|
+
* a number or a duration (a date or text format can't show a difference), else
|
|
38
|
+
* the plain number fallback.
|
|
39
|
+
*/
|
|
40
|
+
export declare function buildKpiDeltaNumberFormatter(input: KpiNumberFormatterInput): KpiNumberFormatter;
|
|
41
|
+
export {};
|
|
@@ -4,7 +4,7 @@ import { TCard } from '../types/common-types.js';
|
|
|
4
4
|
import { SemaphorResultColumn } from '../../shared/analytics-protocol/index.js';
|
|
5
5
|
import { CalendarContext } from '../../shared/report-runtime-context/index.js';
|
|
6
6
|
import { ResolvedValueFormatPreferences } from '../../shared/value-format-preferences/index.js';
|
|
7
|
-
import { MissingResolvedRawTemporalFormatError, RawTemporalFormat, RawTemporalFormatResult, PreparedRawTemporalFormatter, PresentationExecutionSnapshot, ResolvedRawTemporalFormat, RawTemporalValueKind, SqlTemporalColumnClassification } from '../../shared/format-utils/index.js';
|
|
7
|
+
import { MissingResolvedRawTemporalFormatError, RawTemporalFormat, RawTemporalFormatResult, PreparedRawTemporalFormatter, PresentationExecutionSnapshot, ResolvedRawTemporalFormat, RawTemporalValueKind, RawTemporalValueMetadata, SqlTemporalColumnClassification } from '../../shared/format-utils/index.js';
|
|
8
8
|
import { TemporalResultOwner } from '../../shared/dashboard-authoring/index.js';
|
|
9
9
|
export type RawTemporalResultTriple = {
|
|
10
10
|
records: readonly Record<string, unknown>[];
|
|
@@ -60,7 +60,7 @@ export declare class RawTemporalPresentationBoundaryError extends Error {
|
|
|
60
60
|
reason?: "missing_declared_sql_custom_date_format";
|
|
61
61
|
} | undefined);
|
|
62
62
|
}
|
|
63
|
-
export declare function resolveAuthoredDetailRawTemporalFormat(field: DetailField): RawTemporalFormat;
|
|
63
|
+
export declare function resolveAuthoredDetailRawTemporalFormat(field: Pick<DetailField, 'id' | 'format'>): RawTemporalFormat;
|
|
64
64
|
export declare function resolveDeclaredSqlRawTemporalFormat(settings: NonNullable<PersistedColumnSettingsMap[string]>['dateFormat']): RawTemporalFormat | undefined;
|
|
65
65
|
export declare function getDefaultDeclaredSqlRawTemporalPattern(valueKind: RawTemporalValueKind | undefined): string;
|
|
66
66
|
export declare function validateDeclaredSqlRawTemporalPattern(input: {
|
|
@@ -74,6 +74,62 @@ export declare function previewDeclaredSqlRawTemporalFormat(input: {
|
|
|
74
74
|
valueKind?: RawTemporalValueKind;
|
|
75
75
|
value?: string;
|
|
76
76
|
}): string;
|
|
77
|
+
/**
|
|
78
|
+
* The kinds a raw date column's values may arrive as, from its type: a date,
|
|
79
|
+
* or a date and time read as a wall clock or an instant (the source and the
|
|
80
|
+
* report timezone decide, so both are checked). The database type decides
|
|
81
|
+
* when the field has one: a PostgreSQL timestamp's catalog type is often
|
|
82
|
+
* `date` (ledger P7-07).
|
|
83
|
+
*/
|
|
84
|
+
export declare function rawDateValueKinds(field: {
|
|
85
|
+
dataType?: string;
|
|
86
|
+
nativeDataType?: string;
|
|
87
|
+
}): RawTemporalValueKind[];
|
|
88
|
+
type DetailDateField = Pick<DetailField, 'id' | 'format' | 'dataType' | 'nativeDataType'>;
|
|
89
|
+
/**
|
|
90
|
+
* Whether the detail table draws a date column's stored format for every
|
|
91
|
+
* kind its values may arrive as (`rawDateValueKinds`); no format is
|
|
92
|
+
* Automatic, which always draws. One rule for the table, its exports
|
|
93
|
+
* (`resolveDetailDateFormat`) and the backfill (column formats CF-D4,
|
|
94
|
+
* ledger P7-07).
|
|
95
|
+
*/
|
|
96
|
+
export declare function checkDetailDateFormat(field: DetailDateField): {
|
|
97
|
+
ok: true;
|
|
98
|
+
} | {
|
|
99
|
+
ok: false;
|
|
100
|
+
reason: string;
|
|
101
|
+
};
|
|
102
|
+
/**
|
|
103
|
+
* The format a detail date column draws with: its stored one when the table
|
|
104
|
+
* draws it (`checkDetailDateFormat`), else Automatic, as a grouped date's
|
|
105
|
+
* format that doesn't fit its grain does (`resolveTemporalBucketPresentation`).
|
|
106
|
+
*/
|
|
107
|
+
export declare function resolveDetailDateFormat(field: DetailDateField): RawTemporalFormat;
|
|
108
|
+
/**
|
|
109
|
+
* One detail date column's formatter (column formats CF-D4): the format it
|
|
110
|
+
* draws with (`resolveDetailDateFormat`) resolved against the viewer's
|
|
111
|
+
* preferences and prepared for the column's value kind. A result whose kind
|
|
112
|
+
* the column's type didn't foretell (a stale catalog type) draws Automatic
|
|
113
|
+
* too: a detail table never fails on a date's format.
|
|
114
|
+
*/
|
|
115
|
+
export declare function prepareDetailDateColumn(input: {
|
|
116
|
+
field: DetailDateField;
|
|
117
|
+
metadata: RawTemporalValueMetadata;
|
|
118
|
+
preferences: ResolvedValueFormatPreferences;
|
|
119
|
+
calendar: Pick<CalendarContext, 'tz'>;
|
|
120
|
+
}): {
|
|
121
|
+
format: ResolvedRawTemporalFormat;
|
|
122
|
+
formatValue: PreparedRawTemporalFormatter;
|
|
123
|
+
};
|
|
124
|
+
/** The detail date choice that stores no format: the column draws in the report's date style. */
|
|
125
|
+
export declare const AUTOMATIC_DETAIL_DATE_FORMAT = "auto";
|
|
126
|
+
/** A detail date format drawn on a sample of the column's kind; no format is automatic. Throws when the column can't draw it. */
|
|
127
|
+
export declare function previewDetailDateFormat(input: {
|
|
128
|
+
format: DetailField['format'];
|
|
129
|
+
valueKind: RawTemporalValueKind;
|
|
130
|
+
preferences: ResolvedValueFormatPreferences;
|
|
131
|
+
calendarTimezone: string;
|
|
132
|
+
}): string;
|
|
77
133
|
export declare function inspectDeclaredSqlRawTemporalPreview(input: Parameters<typeof previewDeclaredSqlRawTemporalFormat>[0]): {
|
|
78
134
|
ok: true;
|
|
79
135
|
text: string;
|
|
@@ -151,3 +207,4 @@ export declare function isCardRawTemporalResultCompatible(input: {
|
|
|
151
207
|
result: unknown;
|
|
152
208
|
expectedResultOwner?: TemporalResultOwner;
|
|
153
209
|
}): boolean;
|
|
210
|
+
export {};
|
|
@@ -14,6 +14,11 @@ export type MatrixInteractionInput = {
|
|
|
14
14
|
rowPath: MatrixPath;
|
|
15
15
|
columnPath: MatrixPath;
|
|
16
16
|
measureId?: string;
|
|
17
|
+
/**
|
|
18
|
+
* The report timezone the window's raw date-times were converted to: a
|
|
19
|
+
* raw member's value is a wall clock there (column formats CF-D4).
|
|
20
|
+
*/
|
|
21
|
+
calendarTimezone: string;
|
|
17
22
|
/** Host binding owner resolves source-bearing refs; this adapter never invents Field metadata. */
|
|
18
23
|
resolveField: (ref: MatrixField, source: MatrixSpec['source']) => Field | undefined;
|
|
19
24
|
/** Existing host permissions and configured source/drill eligibility, not a security boundary. */
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { Row } from '@tanstack/react-table';
|
|
2
|
+
import { TCard } from '../types/index.js';
|
|
3
|
+
import { ClickContextResult } from './get-click-context-from-chartjs.js';
|
|
4
|
+
import { QueryColumnKeyMap } from '../types/explorer-types.js';
|
|
5
|
+
import { RegularTableTemporalPresentation } from '../formatters/regular-table-temporal-presentation.js';
|
|
6
|
+
import { RawTemporalPresentation } from '../formatters/raw-temporal-presentation.js';
|
|
7
|
+
/**
|
|
8
|
+
* Parameters for building table click context
|
|
9
|
+
*/
|
|
10
|
+
export interface TableClickContextParams {
|
|
11
|
+
/**
|
|
12
|
+
* Resolved card configuration with field definitions
|
|
13
|
+
*/
|
|
14
|
+
resolvedCardConfig: any;
|
|
15
|
+
/**
|
|
16
|
+
* Card being interacted with
|
|
17
|
+
*/
|
|
18
|
+
card: TCard;
|
|
19
|
+
/**
|
|
20
|
+
* TanStack table row that was clicked
|
|
21
|
+
*/
|
|
22
|
+
row: Row<any>;
|
|
23
|
+
columnKeyMap?: QueryColumnKeyMap;
|
|
24
|
+
temporalPresentation?: RegularTableTemporalPresentation;
|
|
25
|
+
/** The table's raw dates as drawn: a raw date-time cell is a wall clock in the report timezone (column formats CF-D4). */
|
|
26
|
+
rawTemporalPresentation?: RawTemporalPresentation;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Extracts interaction context from a table row click
|
|
30
|
+
*
|
|
31
|
+
* This function maps table row data into the same ClickContextResult format
|
|
32
|
+
* that charts use, enabling tables to trigger all interaction types
|
|
33
|
+
* (click filters, drills, URLs, etc.)
|
|
34
|
+
*
|
|
35
|
+
* @param params - Table click context parameters
|
|
36
|
+
* @returns Click context with dimension conditions and metric values, or undefined if no valid context
|
|
37
|
+
*/
|
|
38
|
+
export declare function getClickContextFromTable({ resolvedCardConfig, card, row, columnKeyMap, temporalPresentation, rawTemporalPresentation, }: TableClickContextParams): ClickContextResult | undefined;
|
|
39
|
+
/**
|
|
40
|
+
* The dimension field a table column shows, resolved through the same column
|
|
41
|
+
* key binding the row capture uses. Undefined for metric and utility columns.
|
|
42
|
+
*/
|
|
43
|
+
export declare function getTableDimensionFieldForColumn({ resolvedCardConfig, card, columnId, columnKeyMap, }: Pick<TableClickContextParams, 'resolvedCardConfig' | 'card' | 'columnKeyMap'> & {
|
|
44
|
+
columnId: string;
|
|
45
|
+
}): import('../types/index.js').Field | undefined;
|
|
@@ -47,7 +47,8 @@ export type PrintInputResolution =
|
|
|
47
47
|
};
|
|
48
48
|
/**
|
|
49
49
|
* Why a sheet cannot print. A plain object, not an Error instance, so it can
|
|
50
|
-
* live in the Immer store.
|
|
50
|
+
* live in the Immer store. The print failure markers carry its code and input
|
|
51
|
+
* labels (Document PDF reliability C1 S2).
|
|
51
52
|
*/
|
|
52
53
|
export type MissingPrintInputs = {
|
|
53
54
|
code: 'print_inputs_not_captured';
|
|
@@ -140,6 +140,8 @@ export type BlockedCardQuery = {
|
|
|
140
140
|
reason: CardQueryBlock['reason'] | 'metadata' | 'configuration' | 'coverage';
|
|
141
141
|
missingRequiredLabels: string[];
|
|
142
142
|
message?: string;
|
|
143
|
+
/** The card's primary date, when the compile resolved it before blocking (reports by conversation S-9, ledger P3-13). */
|
|
144
|
+
resolvedPrimaryDateField?: ResolvedPrimaryDateField;
|
|
143
145
|
};
|
|
144
146
|
/**
|
|
145
147
|
* A card's compiled query, as the Matrix runtime and every capture run it: a
|
|
@@ -6,6 +6,8 @@ import { TransientInputContext } from '../dashboard-inputs/transient-input-conte
|
|
|
6
6
|
import { SemanticExecutionPayload } from '../types/semantic-runtime-types.js';
|
|
7
7
|
import { ViewerTableSettings } from '../../shared/dashboard-viewer/index.js';
|
|
8
8
|
import { CompiledCardQueryContext } from './build-card-query-context.js';
|
|
9
|
+
import { CompiledDashboardCardFilters } from './compile-dashboard-card-filters.js';
|
|
10
|
+
import { ResolvedPrimaryDateField } from '../../shared/analytics-protocol/contracts.js';
|
|
9
11
|
import { CardRequestPayload } from './card-server-request.js';
|
|
10
12
|
import { DocumentSectionCardRuntime } from './document-section-card-query.js';
|
|
11
13
|
import { MatrixCardCatalog, prepareMatrixCard } from '../matrix-table/matrix-card-adapter.js';
|
|
@@ -80,6 +82,9 @@ export type DashboardCardExecutionSnapshot = {
|
|
|
80
82
|
card: TCard;
|
|
81
83
|
sheetId: string;
|
|
82
84
|
queryContext: CompiledCardQueryContext;
|
|
85
|
+
/** The compile's dashboard filters and primary date: what a comparison's date reads (reports by conversation SPEC S-9). */
|
|
86
|
+
compiledFilters: CompiledDashboardCardFilters;
|
|
87
|
+
resolvedPrimaryDateField: ResolvedPrimaryDateField;
|
|
83
88
|
matrix?: ReturnType<typeof prepareMatrixCard>;
|
|
84
89
|
/** The request the card posts to /api/v1/query (`withRequest`; never for Matrix). */
|
|
85
90
|
request?: CardRequestPayload;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { SelectionTuple } from '../../shared/analytics-protocol/selection-contract.js';
|
|
2
|
+
import { ClickToFilterSettings } from '../../shared/dashboard-authoring/click-to-filter-settings.js';
|
|
3
|
+
import { DashboardCardFilterSourceInventory } from '../../shared/dashboard-authoring/dashboard-card-source-index.js';
|
|
4
|
+
import { Field } from '../types/explorer-types.js';
|
|
5
|
+
import { ClickFilterCondition } from '../types/interaction-types.js';
|
|
6
|
+
export type SelectionTupleUnavailableReason =
|
|
7
|
+
/** The click carried no dimension value (a total, a blank area). */
|
|
8
|
+
'noFields'
|
|
9
|
+
/** The fields rule needs the clicked column and it is not a filterable dimension. */
|
|
10
|
+
| 'clickedColumnNotFilterable'
|
|
11
|
+
/** None of the clicked fields are among the author's chosen columns. */
|
|
12
|
+
| 'noChosenColumns'
|
|
13
|
+
/** A field is calculated, or is not on a source this card executes. */
|
|
14
|
+
| 'fieldNotFilterable'
|
|
15
|
+
/** The builder produced a condition that is not an equality or a blank. */
|
|
16
|
+
| 'unsupportedCondition';
|
|
17
|
+
export type SelectionTupleResult = {
|
|
18
|
+
status: 'ready';
|
|
19
|
+
tuple: SelectionTuple;
|
|
20
|
+
} | {
|
|
21
|
+
status: 'unavailable';
|
|
22
|
+
code: SelectionTupleUnavailableReason;
|
|
23
|
+
/** Viewer-facing; shown as a tooltip on the source. */
|
|
24
|
+
reason: string;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Turns a click-context builder's output into one selection tuple: applies the
|
|
28
|
+
* card's fields rule, drops measures, and grounds every explorer field on one
|
|
29
|
+
* of the source card's own executable sources. One ungroundable condition
|
|
30
|
+
* makes the whole tuple unavailable, because a partial tuple would filter to
|
|
31
|
+
* more than the viewer clicked.
|
|
32
|
+
*/
|
|
33
|
+
export declare function selectionTupleFromClickContext(params: {
|
|
34
|
+
settings: Pick<ClickToFilterSettings, 'fields'>;
|
|
35
|
+
/** Builder output. */
|
|
36
|
+
conditions: ClickFilterCondition[];
|
|
37
|
+
/** The dimension column under the pointer; required for 'clickedCell'. */
|
|
38
|
+
clickedField?: Field;
|
|
39
|
+
/** buildDashboardCardSourceIndex(card) of the source card. */
|
|
40
|
+
sourceIndex: DashboardCardFilterSourceInventory;
|
|
41
|
+
}): SelectionTupleResult;
|
|
@@ -74,6 +74,13 @@ export type EditorStore = {
|
|
|
74
74
|
sqlGen: SqlGen;
|
|
75
75
|
frame: TFrame;
|
|
76
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;
|
|
77
84
|
activeTabCardId?: string | null;
|
|
78
85
|
showFilters: boolean;
|
|
79
86
|
applyFilters: boolean;
|
|
@@ -126,7 +133,6 @@ type Actions = TableActions & ExplorerActions & {
|
|
|
126
133
|
setCardDescription: (description: string) => void;
|
|
127
134
|
setCardInfo: (info: string) => void;
|
|
128
135
|
setCardId: (cardId: string) => void;
|
|
129
|
-
setCountryLogo: (countryLogoId: string | null) => void;
|
|
130
136
|
setIsDevMode: (isDevMode: boolean) => void;
|
|
131
137
|
/**
|
|
132
138
|
* Switches between dev mode and standard mode with draft preservation.
|
|
@@ -195,6 +201,8 @@ type Actions = TableActions & ExplorerActions & {
|
|
|
195
201
|
setFilterOnClickColumnIndex: (index: number) => void;
|
|
196
202
|
setIsSqlRunning: (isSqlRunning: boolean) => void;
|
|
197
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;
|
|
198
206
|
setFrame: (frame: TFrame) => void;
|
|
199
207
|
/** Replaces all cards in the frame with new cards. Sets first card as active. */
|
|
200
208
|
replaceFrameCards: (cards: TCard[]) => void;
|
|
@@ -26,8 +26,6 @@ export interface TableActions {
|
|
|
26
26
|
showAllColumns: () => void;
|
|
27
27
|
hideAllColumns: () => void;
|
|
28
28
|
toggleSelectColumn: (isVisible: boolean) => void;
|
|
29
|
-
initializeColumnVisibility: (columnIds: string[]) => void;
|
|
30
|
-
updateAllColumnVisibility: (visibility: Record<string, boolean>) => void;
|
|
31
29
|
}
|
|
32
30
|
export declare const createTableActions: (set: (fn: (state: EditorStore) => Partial<EditorStore>) => void) => TableActions;
|
|
33
31
|
export declare const selectColumnSettings: (state: EditorState) => PersistedColumnSettingsMap;
|
|
@@ -293,6 +293,12 @@ export type DashboardProps = {
|
|
|
293
293
|
* LC-D31). Only Semaphor's embed page passes it.
|
|
294
294
|
*/
|
|
295
295
|
liveScreen?: LiveScreenPort;
|
|
296
|
+
/**
|
|
297
|
+
* A short status the host shows in the toolbar, after the title and the
|
|
298
|
+
* favorite star (the watch page's "Watching" and its menu, watch page
|
|
299
|
+
* ledger P1-15). Only Semaphor's own pages pass it.
|
|
300
|
+
*/
|
|
301
|
+
toolbarStatus?: React.ReactNode;
|
|
296
302
|
onSave?: (dashboard: TDashboard) => void;
|
|
297
303
|
onFilterValuesChange?: (filterValues: TFilterValue[]) => void;
|
|
298
304
|
LoadingComponent?: (props: LoadingProps) => React.ReactNode;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TimeDrillStep } from './interaction-types.js';
|
|
2
|
-
import { SemaphorDerivedFieldDefinition, MatrixConfig, SemaphorSourceRef, SemaphorResultColumn, SemaphorPivotValue, SemaphorTimeGrain, SemanticGroupedTemporalInput, TemporalBucketMetadata, TemporalBucketFormat, SemaphorScalarValueFormat, SemaphorValueFormat, MetricComparisonConfig, MetricComparisonPolarity, SemaphorConnectionType } from '../../shared/analytics-protocol/index.js';
|
|
2
|
+
import { SemaphorDerivedFieldDefinition, MatrixConfig, SemaphorSourceRef, SemaphorResultColumn, SemaphorPivotValue, SemaphorTimeGrain, SemanticGroupedTemporalInput, RawTemporalSelection, TemporalBucketMetadata, TemporalBucketFormat, SemaphorScalarValueFormat, SemaphorValueFormat, MetricComparisonConfig, MetricComparisonPolarity, SemaphorConnectionType } from '../../shared/analytics-protocol/index.js';
|
|
3
3
|
import { FlatTableExportTotalsBehavior, FlatTableExportTotalsRequest, QueryColumnKeyMap as SharedQueryColumnKeyMap } from '../../shared/format-utils/index.js';
|
|
4
4
|
import { CardQuerySourceRowEvidence, TemporalResultOwner } from '../../shared/dashboard-authoring/index.js';
|
|
5
5
|
import { RelativeDateFilter } from '../../shared/analytics-protocol/relative-date-filter.js';
|
|
@@ -440,6 +440,12 @@ export interface FilterCondition {
|
|
|
440
440
|
label?: string;
|
|
441
441
|
/** Governed meaning for a canonical grouped-temporal scalar. */
|
|
442
442
|
temporalBucket?: TemporalBucketMetadata;
|
|
443
|
+
/**
|
|
444
|
+
* A raw date-time from a result (a detail cell, a Matrix member), in its
|
|
445
|
+
* report timezone: the filter compares the source column against the
|
|
446
|
+
* instants it names, not its text (column formats CF-D4, ledger P7-04).
|
|
447
|
+
*/
|
|
448
|
+
rawTemporal?: RawTemporalSelection;
|
|
443
449
|
/**
|
|
444
450
|
* Relative date window ("This month"). When present it is authoritative:
|
|
445
451
|
* the server resolves it on every run and `value` only keeps the range seen
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TChartType } from '../charts/types.js';
|
|
2
2
|
import { Field, Operator, SortByField, TimeGranularity } from './explorer-types.js';
|
|
3
|
-
import { TemporalBucketMetadata } from '../../shared/analytics-protocol/contracts.js';
|
|
3
|
+
import { RawTemporalSelection, TemporalBucketMetadata } from '../../shared/analytics-protocol/contracts.js';
|
|
4
4
|
/**
|
|
5
5
|
* Defines what element must be clicked to trigger an interaction.
|
|
6
6
|
*
|
|
@@ -242,6 +242,8 @@ export interface ClickFilterCondition {
|
|
|
242
242
|
label?: string;
|
|
243
243
|
/** Governed meaning for a canonical grouped-temporal scalar. */
|
|
244
244
|
temporalBucket?: TemporalBucketMetadata;
|
|
245
|
+
/** What a raw date-time value names: its result column's kind and report timezone (CF-D4, ledger P7-04). */
|
|
246
|
+
rawTemporal?: RawTemporalSelection;
|
|
245
247
|
}
|
|
246
248
|
export interface ClickFilterConditionGroup {
|
|
247
249
|
filters: ClickFilterCondition[];
|
|
@@ -111,7 +111,6 @@ export type UIConfig = {
|
|
|
111
111
|
features: {
|
|
112
112
|
/** Master switch over every AI feature. Absent in tokens minted before it existed. */
|
|
113
113
|
aiFeatures?: boolean;
|
|
114
|
-
dashboardAiAuthoring: boolean;
|
|
115
114
|
analyticalBriefings: boolean;
|
|
116
115
|
aiWritingHelpers: boolean;
|
|
117
116
|
/** The assistant switch. Absent in tokens minted before it existed. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { CanonicalDashboardRecordsPayload, DashboardRecordsPayload, SemaphorDerivedFieldDefinition, SemaphorExecutionFieldRef, SemaphorFieldRef, SemaphorResultColumn, SemaphorSourceRef, RawTemporalValueMetadata, TemporalBucketFormat, TemporalBucketMetadata, SemaphorScalarValueFormat, SemaphorValueFormat } from './contracts.js';
|
|
2
|
+
import { CanonicalDashboardRecordsPayload, DashboardRecordsPayload, SemaphorDerivedFieldDefinition, SemaphorExecutionFieldRef, SemaphorFieldRef, SemaphorResultColumn, SemaphorSourceRef, RawTemporalSelection, RawTemporalValueMetadata, TemporalBucketFormat, TemporalBucketMetadata, SemaphorScalarValueFormat, SemaphorValueFormat } from './contracts.js';
|
|
3
3
|
/** Leaf metadata/result schemas; no dependency on operation-specific contracts. */
|
|
4
4
|
export declare const recordSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
5
5
|
export declare const recordArraySchema: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">;
|
|
@@ -9,6 +9,8 @@ export declare const nullableScalarSchema: z.ZodUnion<[z.ZodNumber, z.ZodString,
|
|
|
9
9
|
export declare const temporalBucketFormatSchema: z.ZodType<TemporalBucketFormat>;
|
|
10
10
|
export declare const temporalBucketMetadataSchema: z.ZodType<TemporalBucketMetadata>;
|
|
11
11
|
export declare const rawTemporalValueMetadataSchema: z.ZodType<RawTemporalValueMetadata>;
|
|
12
|
+
/** A raw date in a selection: its result column's kind and the report timezone its wall clock was read in (CF-D4, ledger P7-04). */
|
|
13
|
+
export declare const rawTemporalSelectionSchema: z.ZodType<RawTemporalSelection>;
|
|
12
14
|
/**
|
|
13
15
|
* The stored number formats (column formats CF-D28): strict, no `locale` (the
|
|
14
16
|
* viewer decides, CF-D13), percent states `percentValueMode` and never
|
|
@@ -192,6 +194,16 @@ export declare const semaphorScalarValueFormatInputSchema: z.ZodType<SemaphorSca
|
|
|
192
194
|
* model, parses with it.
|
|
193
195
|
*/
|
|
194
196
|
export declare const semaphorValueFormatSchema: z.ZodType<SemaphorValueFormat>;
|
|
197
|
+
/** Every stored format type (CF-D28). */
|
|
198
|
+
export declare const STORED_VALUE_FORMAT_TYPES: readonly ["number", "currency", "percent", "scientific", "duration", "date", "string", "temporal_bucket"];
|
|
199
|
+
/**
|
|
200
|
+
* The schema that decides one stored format type, so a refusal can name the
|
|
201
|
+
* type's own problem (the union reports only that nothing matched). A format
|
|
202
|
+
* of a type is valid exactly when this schema accepts it.
|
|
203
|
+
*/
|
|
204
|
+
export declare function storedValueFormatSchemaFor(type: string): z.ZodTypeAny | undefined;
|
|
205
|
+
/** The fields a stored format of `type` can state, read from its schema: a hint for a refusal, never the check. */
|
|
206
|
+
export declare function storedValueFormatFields(type: string): readonly string[] | undefined;
|
|
195
207
|
export declare const semaphorSemanticSourceRefSchema: z.ZodObject<{
|
|
196
208
|
kind: z.ZodLiteral<"semantic">;
|
|
197
209
|
domainId: z.ZodString;
|