react-semaphor 0.1.561 → 0.1.563
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 +452 -429
- 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 → analytics-base-schemas-BaIQrEzX.js} +139 -134
- package/dist/chunks/{assistant-chat-DiVHY3Hw.js → assistant-chat-iIp02_77.js} +104 -104
- package/dist/chunks/{bookmark-impact-CR09dpkn.js → bookmark-impact-D4Kl4amw.js} +2 -2
- package/dist/chunks/{bookmark-state-BusLpkb7.js → bookmark-state-CWeoGbrx.js} +25 -25
- package/dist/chunks/{braces-u8VorWJc.js → braces-DzgoQC64.js} +1 -1
- package/dist/chunks/{comparison-window-caption-DDsIWJYT.js → comparison-window-caption-D1EUXzaR.js} +562 -437
- package/dist/chunks/{context-TUjw9eqr.js → context-R31TSL5V.js} +1 -1
- package/dist/chunks/{dashboard-BRdZBPqr.js → dashboard-CmqeP3QZ.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-CgvTLndW.js → dashboard-briefing-launcher-TYlSW77S.js} +155 -154
- package/dist/chunks/{dashboard-controls-B4vfSzTF.js → dashboard-controls-B253nJS-.js} +970 -968
- package/dist/chunks/{dashboard-json-Y3MF59g7.js → dashboard-json-osQuinUZ.js} +5 -5
- package/dist/chunks/dates-DFY7Gfss.js +91 -0
- package/dist/chunks/{edit-dashboard-visual-DwjZcxj-.js → edit-dashboard-visual-CMar-NhA.js} +4636 -4681
- package/dist/chunks/{filter-reach-copy-bijwf_-b.js → filter-reach-copy-CvV7W5dd.js} +1470 -1101
- package/dist/chunks/{filter-value-text-DFnhwuEW.js → filter-value-text-CPwFkrMz.js} +11 -10
- package/dist/chunks/{global-date-filter-utils-BXgCpvQM.js → global-date-filter-utils-N1kcsOFE.js} +8997 -7417
- package/dist/chunks/{index-ClwbY3BL.js → index-CNGkfUp4.js} +91 -85
- package/dist/chunks/{layout-grid-CtvCBfOm.js → layout-grid-BM65viQh.js} +1 -1
- package/dist/chunks/{list-filter-BklYgciR.js → list-filter-BoeLBfL3.js} +1 -1
- package/dist/chunks/{matrix-analytical-definition-pU51-JmY.js → matrix-analytical-definition-hEucouWM.js} +4 -4
- package/dist/chunks/{matrix-card-CUorIB7Q.js → matrix-card-CCh9JjP1.js} +3 -3
- package/dist/chunks/{matrix-member-presentation-Df5UgCGN.js → matrix-member-presentation-DsAUbuoL.js} +1 -1
- package/dist/chunks/{matrix-operation-contract-BSiGEXVC.js → matrix-operation-contract-DsLdFdSa.js} +339 -330
- package/dist/chunks/{metric-comparison-95aC0uEO.js → metric-comparison-Bnso1cm1.js} +2 -2
- package/dist/chunks/{model-change-B5wQhg5G.js → model-change-T1cRkh3m.js} +1 -1
- package/dist/chunks/{palette-DTnMhipt.js → palette-p1XSJFgB.js} +1 -1
- package/dist/chunks/{pivot-result-contract-expectations-Bo-86vwS.js → pivot-result-contract-expectations-B53jqszr.js} +5 -5
- package/dist/chunks/{pivot-result-identity-olvXJoB9.js → pivot-result-identity-Dq5jm-EC.js} +1 -1
- package/dist/chunks/{zoned-wall-clock-CGLVI40Q.js → raw-temporal-value-Bqz8wc7L.js} +97 -46
- package/dist/chunks/{report-preferences-dialog-C2YUIwKG.js → report-preferences-dialog-l54wJyYE.js} +68 -63
- package/dist/chunks/{report-runtime-context-DoIUr3MP.js → report-runtime-context-BITkNSDa.js} +2 -2
- package/dist/chunks/{resolve-dashboard-input-context-q_iiNXE1.js → resolve-dashboard-input-context-DaDrZGuA.js} +3455 -1744
- package/dist/chunks/{save-DH4RyrnG.js → save-CHV1B1fL.js} +1 -1
- package/dist/chunks/{saved-dashboard-context-8jqfI7hI.js → saved-dashboard-context-DFYBrE6O.js} +94 -95
- package/dist/chunks/{selection-filter-compiler-BKXmyLrS.js → selection-filter-compiler-CUDRnUxc.js} +19 -18
- package/dist/chunks/{selection-reducer-CV7K4FI6.js → selection-reducer-Bz5aywT4.js} +1 -1
- package/dist/chunks/{semaphor-ready-indicator-E2XWyibu.js → semaphor-ready-indicator-C3EQEiD9.js} +36434 -37732
- package/dist/chunks/{shelf-drop-preview-context-C29EUzDp.js → shelf-drop-preview-context-BODiBlqT.js} +81 -82
- package/dist/chunks/{source-entity-resolution-BXI3nQ5Z.js → source-entity-resolution-DdDVXFB8.js} +6 -6
- package/dist/chunks/{switch-balDSHc7.js → switch-BW4yXSYs.js} +3 -3
- package/dist/chunks/{table-export-sheet-CK8tvh4d.js → table-export-sheet-bSXxGn-v.js} +1 -1
- package/dist/chunks/{temporal-input-presentation-B77JsAzU.js → temporal-input-presentation-sk9gqLi6.js} +699 -741
- package/dist/chunks/{token-types-DhYH5YKb.js → token-types-BUK06hU2.js} +1 -1
- package/dist/chunks/{upload-Ufj8vjyn.js → upload-BnmuyPqW.js} +1 -1
- package/dist/chunks/{use-create-flow-overlay-state-9WsnzEO5.js → use-create-flow-overlay-state-BXY8-Cyz.js} +6 -6
- package/dist/chunks/{validators-BtaCFIEB.js → validators-BIM0FE31.js} +764 -885
- package/dist/dashboard/index.js +2 -2
- package/dist/dashboard-authoring/index.js +2278 -3030
- package/dist/data-app-sdk/index.js +43 -43
- package/dist/data-app-sdk-adapters/index.js +3 -3
- package/dist/data-app-sdk-validation/index.js +22 -22
- package/dist/format-utils/index.js +215 -209
- package/dist/index.js +225 -224
- 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/index.d.ts +1 -2
- package/dist/types/components/surfboard/filter/types.d.ts +3 -1
- package/dist/types/index.js +5 -5
- 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/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 +3 -1
- package/dist/types/shared/analytics-protocol/contracts.d.ts +9 -40
- 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/card-display-write.d.ts +24 -0
- package/dist/types/shared/dashboard-authoring/card-settings/card-kinds.d.ts +1 -1
- package/dist/types/shared/dashboard-authoring/card-settings/column-polarity-write.d.ts +5 -0
- package/dist/types/shared/dashboard-authoring/card-settings/index.d.ts +4 -2
- package/dist/types/shared/dashboard-authoring/card-settings/inputs.d.ts +15 -0
- package/dist/types/shared/dashboard-authoring/card-settings/resolved.d.ts +12 -1
- package/dist/types/shared/dashboard-authoring/card-settings/views.d.ts +5 -3
- package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +3230 -4658
- package/dist/types/shared/dashboard-authoring/changes/diagnostics.d.ts +24 -2
- 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 +27 -1
- 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/schema.d.ts +10 -10
- package/dist/types/shared/dashboard-authoring/detail-date-presentation.d.ts +9 -0
- package/dist/types/shared/dashboard-authoring/index.d.ts +8 -6
- 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 +52 -2
- package/dist/types/shared/dashboard-authoring/outline/outline-dashboard.d.ts +13 -1
- 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/format-utils/document-print.d.ts +82 -0
- package/dist/types/shared/format-utils/index.d.ts +1 -0
- package/dist/types/shared/format-utils/raw-temporal.d.ts +2 -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 +1 -1
- package/dist/chunks/custom-visual-inputs-DfolidZ9.js +0 -292
- package/dist/chunks/document-dashboard-inputs-CvBbFTUA.js +0 -1718
- 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/bookmark-state-
|
|
1
|
+
import { a, R as s, D as o } from "../chunks/report-preferences-dialog-l54wJyYE.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;
|
|
@@ -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,8 +1,8 @@
|
|
|
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-
|
|
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-
|
|
3
|
-
import { D as j } from "../chunks/token-types-
|
|
4
|
-
import { r as J, a as X } from "../chunks/pivot-result-identity-
|
|
5
|
-
import { D as Z } from "../chunks/report-runtime-context-
|
|
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";
|
|
6
6
|
const e = [
|
|
7
7
|
"concatenate",
|
|
8
8
|
"conditional-category",
|
|
@@ -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;
|
|
@@ -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
|
|
@@ -136,46 +136,6 @@ export type SemaphorDerivedFieldDefinition = {
|
|
|
136
136
|
format?: SemaphorScalarValueFormat;
|
|
137
137
|
tags?: string[];
|
|
138
138
|
};
|
|
139
|
-
export type SemaphorResultColumnRef = {
|
|
140
|
-
columnKey: string;
|
|
141
|
-
} | {
|
|
142
|
-
field: SemaphorFieldRef;
|
|
143
|
-
};
|
|
144
|
-
export type SemaphorResultCalculationOutput = {
|
|
145
|
-
key: string;
|
|
146
|
-
label?: string;
|
|
147
|
-
dataType?: SemaphorFieldRef['dataType'];
|
|
148
|
-
format?: SemaphorScalarValueFormat;
|
|
149
|
-
};
|
|
150
|
-
export type SemaphorResultCalculationDenominator = {
|
|
151
|
-
scope: 'returned_result';
|
|
152
|
-
} | {
|
|
153
|
-
scope: 'population';
|
|
154
|
-
metric: SemaphorFieldRef;
|
|
155
|
-
filters?: SemaphorAnalyticsFilter[];
|
|
156
|
-
};
|
|
157
|
-
export type SemaphorResultCalculation = {
|
|
158
|
-
id: string;
|
|
159
|
-
label: string;
|
|
160
|
-
kind: 'percent_of_total';
|
|
161
|
-
input: SemaphorResultColumnRef;
|
|
162
|
-
denominator?: SemaphorResultCalculationDenominator;
|
|
163
|
-
output: SemaphorResultCalculationOutput;
|
|
164
|
-
} | {
|
|
165
|
-
id: string;
|
|
166
|
-
label: string;
|
|
167
|
-
kind: 'rank';
|
|
168
|
-
input: SemaphorResultColumnRef;
|
|
169
|
-
order?: 'asc' | 'desc';
|
|
170
|
-
output: SemaphorResultCalculationOutput;
|
|
171
|
-
} | {
|
|
172
|
-
id: string;
|
|
173
|
-
label: string;
|
|
174
|
-
kind: 'running_total' | 'previous_row_delta';
|
|
175
|
-
input: SemaphorResultColumnRef;
|
|
176
|
-
orderBy?: SemaphorResultColumnRef;
|
|
177
|
-
output: SemaphorResultCalculationOutput;
|
|
178
|
-
};
|
|
179
139
|
export type SemaphorInputOperator = '=' | '!=' | 'in' | 'not_in' | 'contains' | 'not_contains' | 'between' | 'not_between' | '>' | '>=' | '<' | '<=';
|
|
180
140
|
export type SemaphorAnalyticsFilterOperator = SemaphorInputOperator | 'not_contains' | 'is_null' | 'is_not_null';
|
|
181
141
|
export type SemaphorAnalyticsValueFilterOperator = Exclude<SemaphorAnalyticsFilterOperator, 'is_null' | 'is_not_null'>;
|
|
@@ -337,6 +297,15 @@ export type RawTemporalValueMetadata = {
|
|
|
337
297
|
kind: 'raw_temporal';
|
|
338
298
|
valueKind: RawTemporalValueKind;
|
|
339
299
|
};
|
|
300
|
+
/**
|
|
301
|
+
* What a raw date value in a selection names (column formats CF-D4, ledger
|
|
302
|
+
* P7-04): the kind its result column returned it as, and the report timezone
|
|
303
|
+
* a wall clock was read in. A filter compares the source column against the
|
|
304
|
+
* instants it names (`readRawTemporalEquality`), never against its text.
|
|
305
|
+
*/
|
|
306
|
+
export type RawTemporalSelection = RawTemporalValueMetadata & {
|
|
307
|
+
tz: string;
|
|
308
|
+
};
|
|
340
309
|
export declare const RAW_TEMPORAL_CONTRACT_ERROR_CODES: {
|
|
341
310
|
readonly invalidMetadata: "invalid_raw_temporal_metadata";
|
|
342
311
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { SemaphorFieldRef, SemaphorSourceRef, TemporalBucketMetadata } from './contracts.js';
|
|
2
|
+
import { RawTemporalSelection, SemaphorFieldRef, SemaphorSourceRef, TemporalBucketMetadata } from './contracts.js';
|
|
3
3
|
/**
|
|
4
4
|
* A selection is what a viewer picked by clicking marks, rows, or members on
|
|
5
5
|
* one card. It is a dashboard input value: other cards narrow to it the same
|
|
@@ -20,6 +20,11 @@ export type SelectionField = {
|
|
|
20
20
|
dataType: 'string' | 'number' | 'boolean' | 'date' | 'datetime';
|
|
21
21
|
/** Physical column when it differs from the semantic name. */
|
|
22
22
|
sourceField?: string;
|
|
23
|
+
/**
|
|
24
|
+
* The column's database type, from the clicked field: a condition on this
|
|
25
|
+
* same column compiles its literals with it (ledger P7-06). Never identity.
|
|
26
|
+
*/
|
|
27
|
+
nativeDataType?: string;
|
|
23
28
|
};
|
|
24
29
|
/** One field condition from a click, grounded on the source card's own executable source. */
|
|
25
30
|
export type SelectionCondition = {
|
|
@@ -30,6 +35,8 @@ export type SelectionCondition = {
|
|
|
30
35
|
label?: string;
|
|
31
36
|
/** Present when the value is a canonical grouped-temporal scalar. */
|
|
32
37
|
temporalBucket?: TemporalBucketMetadata;
|
|
38
|
+
/** Present when the value is a raw date-time from a result, in its report timezone (CF-D4, ledger P7-04). */
|
|
39
|
+
rawTemporal?: RawTemporalSelection;
|
|
33
40
|
};
|
|
34
41
|
/** One selected item. Conditions are AND-ed. */
|
|
35
42
|
export type SelectionTuple = {
|
|
@@ -48,6 +55,7 @@ export type AnalyticsSelectionCondition = {
|
|
|
48
55
|
operator: '=' | 'isNull';
|
|
49
56
|
value: string | number | null;
|
|
50
57
|
temporalBucket?: TemporalBucketMetadata;
|
|
58
|
+
rawTemporal?: RawTemporalSelection;
|
|
51
59
|
};
|
|
52
60
|
export type AnalyticsSelectionTuple = {
|
|
53
61
|
conditions: AnalyticsSelectionCondition[];
|
|
@@ -74,7 +82,9 @@ export declare function sourceCardIdFromSelectionInputId(inputId: string): strin
|
|
|
74
82
|
* fiscal calendars is two different selections.
|
|
75
83
|
*/
|
|
76
84
|
export declare function temporalBucketIdentityKey(bucket: TemporalBucketMetadata | undefined): string;
|
|
77
|
-
/** Identity of
|
|
85
|
+
/** Identity of a raw date-time's meaning: the same wall clock in two timezones names two instants. */
|
|
86
|
+
export declare function rawTemporalIdentityKey(raw: RawTemporalSelection | undefined): string;
|
|
87
|
+
/** Identity of one condition: field, operator, value and temporal meaning. Labels excluded. */
|
|
78
88
|
export declare function selectionConditionKey(condition: SelectionCondition): string;
|
|
79
89
|
/** Stable, order-insensitive identity of a tuple. Labels are display only and excluded. */
|
|
80
90
|
export declare function selectionTupleKey(tuple: SelectionTuple): string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SemaphorAnalyticsIntent, SemaphorAnalyticsRecoveryPlan, SemaphorAnalyticsValidationResult, SemaphorDashboardIntent, SemaphorOperationIntent,
|
|
1
|
+
import { SemaphorAnalyticsIntent, SemaphorAnalyticsRecoveryPlan, SemaphorAnalyticsValidationResult, SemaphorDashboardIntent, SemaphorOperationIntent, SemaphorValidationResult } from './contracts.js';
|
|
2
2
|
export { validateSemaphorDerivedFieldDefinition } from './field-validation.js';
|
|
3
3
|
export declare function parseSemaphorIsoTimeWindowBoundary(value: unknown): Date | null;
|
|
4
4
|
export declare function parseSemaphorIsoInstant(value: unknown): Date | null;
|
|
@@ -14,7 +14,6 @@ export type SemaphorOptionDependencyValidationProfile = 'protocol' | 'dashboard'
|
|
|
14
14
|
* intent validator, not here.
|
|
15
15
|
*/
|
|
16
16
|
export declare function validateSemaphorOptionDependencies(value: unknown, profile?: SemaphorOptionDependencyValidationProfile): SemaphorValidationResult;
|
|
17
|
-
export declare function validateSemaphorResultCalculation(calculation: SemaphorResultCalculation): SemaphorValidationResult;
|
|
18
17
|
export declare function validateSemaphorAnalyticsIntent(intent: SemaphorAnalyticsIntent): SemaphorAnalyticsValidationResult;
|
|
19
18
|
export declare function validateSemaphorOperationIntent(intent: SemaphorOperationIntent): SemaphorAnalyticsValidationResult;
|
|
20
19
|
export declare function validateSemaphorAnalyticsRecoveryPlan(plan: SemaphorAnalyticsRecoveryPlan): SemaphorAnalyticsValidationResult;
|
|
@@ -247,14 +247,14 @@ export declare const assistantContextSchema: z.ZodEffects<z.ZodObject<{
|
|
|
247
247
|
kind: "set";
|
|
248
248
|
text: string;
|
|
249
249
|
fingerprint: string;
|
|
250
|
-
notApplied?: "opened_from_another_dashboard" | undefined;
|
|
251
250
|
omittedValues?: number | undefined;
|
|
251
|
+
notApplied?: "opened_from_another_dashboard" | undefined;
|
|
252
252
|
}, {
|
|
253
253
|
kind: "set";
|
|
254
254
|
text: string;
|
|
255
255
|
fingerprint: string;
|
|
256
|
-
notApplied?: "opened_from_another_dashboard" | undefined;
|
|
257
256
|
omittedValues?: number | undefined;
|
|
257
|
+
notApplied?: "opened_from_another_dashboard" | undefined;
|
|
258
258
|
}>, z.ZodObject<{
|
|
259
259
|
kind: z.ZodLiteral<"varies">;
|
|
260
260
|
}, "strict", z.ZodTypeAny, {
|
|
@@ -268,8 +268,8 @@ export declare const assistantContextSchema: z.ZodEffects<z.ZodObject<{
|
|
|
268
268
|
kind: "set";
|
|
269
269
|
text: string;
|
|
270
270
|
fingerprint: string;
|
|
271
|
-
notApplied?: "opened_from_another_dashboard" | undefined;
|
|
272
271
|
omittedValues?: number | undefined;
|
|
272
|
+
notApplied?: "opened_from_another_dashboard" | undefined;
|
|
273
273
|
} | {
|
|
274
274
|
kind: "varies";
|
|
275
275
|
};
|
|
@@ -281,8 +281,8 @@ export declare const assistantContextSchema: z.ZodEffects<z.ZodObject<{
|
|
|
281
281
|
kind: "set";
|
|
282
282
|
text: string;
|
|
283
283
|
fingerprint: string;
|
|
284
|
-
notApplied?: "opened_from_another_dashboard" | undefined;
|
|
285
284
|
omittedValues?: number | undefined;
|
|
285
|
+
notApplied?: "opened_from_another_dashboard" | undefined;
|
|
286
286
|
} | {
|
|
287
287
|
kind: "varies";
|
|
288
288
|
};
|
|
@@ -610,8 +610,8 @@ export declare const assistantContextSchema: z.ZodEffects<z.ZodObject<{
|
|
|
610
610
|
kind: "set";
|
|
611
611
|
text: string;
|
|
612
612
|
fingerprint: string;
|
|
613
|
-
notApplied?: "opened_from_another_dashboard" | undefined;
|
|
614
613
|
omittedValues?: number | undefined;
|
|
614
|
+
notApplied?: "opened_from_another_dashboard" | undefined;
|
|
615
615
|
} | {
|
|
616
616
|
kind: "varies";
|
|
617
617
|
};
|
|
@@ -702,8 +702,8 @@ export declare const assistantContextSchema: z.ZodEffects<z.ZodObject<{
|
|
|
702
702
|
kind: "set";
|
|
703
703
|
text: string;
|
|
704
704
|
fingerprint: string;
|
|
705
|
-
notApplied?: "opened_from_another_dashboard" | undefined;
|
|
706
705
|
omittedValues?: number | undefined;
|
|
706
|
+
notApplied?: "opened_from_another_dashboard" | undefined;
|
|
707
707
|
} | {
|
|
708
708
|
kind: "varies";
|
|
709
709
|
};
|
|
@@ -794,8 +794,8 @@ export declare const assistantContextSchema: z.ZodEffects<z.ZodObject<{
|
|
|
794
794
|
kind: "set";
|
|
795
795
|
text: string;
|
|
796
796
|
fingerprint: string;
|
|
797
|
-
notApplied?: "opened_from_another_dashboard" | undefined;
|
|
798
797
|
omittedValues?: number | undefined;
|
|
798
|
+
notApplied?: "opened_from_another_dashboard" | undefined;
|
|
799
799
|
} | {
|
|
800
800
|
kind: "varies";
|
|
801
801
|
};
|
|
@@ -886,8 +886,8 @@ export declare const assistantContextSchema: z.ZodEffects<z.ZodObject<{
|
|
|
886
886
|
kind: "set";
|
|
887
887
|
text: string;
|
|
888
888
|
fingerprint: string;
|
|
889
|
-
notApplied?: "opened_from_another_dashboard" | undefined;
|
|
890
889
|
omittedValues?: number | undefined;
|
|
890
|
+
notApplied?: "opened_from_another_dashboard" | undefined;
|
|
891
891
|
} | {
|
|
892
892
|
kind: "varies";
|
|
893
893
|
};
|
|
@@ -6,5 +6,11 @@ export type SqlDates = 'raw' | 'grouped';
|
|
|
6
6
|
* names a preset is that preset, any other is a custom pattern.
|
|
7
7
|
*/
|
|
8
8
|
export declare function withSqlDatePattern<T extends object>(field: T, format: unknown, dates: SqlDates): T;
|
|
9
|
+
/** Whether a connection's detail-table dates come back raw for the browser to draw, never formatted in SQL. */
|
|
10
|
+
export declare function drawsDetailDatesInBrowser(connectionType: unknown): boolean;
|
|
11
|
+
/** A field without the request-only SQL date pattern. */
|
|
12
|
+
export declare function withoutSqlDatePattern<T extends object>(field: T): T;
|
|
13
|
+
/** A detail column with the SQL date pattern its format calls for, unless the connection's browser draws its dates. */
|
|
14
|
+
export declare function withDetailSqlDatePattern<T extends object>(field: T, format: unknown, connectionType: unknown): T;
|
|
9
15
|
/** A card config whose fields carry the SQL date patterns their formats call for, as `executeQuery` builds SQL from it. */
|
|
10
|
-
export declare function withCardConfigSqlDatePatterns<T extends CardConfig | undefined>(config: T): T;
|
|
16
|
+
export declare function withCardConfigSqlDatePatterns<T extends CardConfig | undefined>(config: T, connectionType?: unknown): T;
|