react-semaphor 0.1.568 → 0.1.570
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/README.md +0 -7
- package/dist/analytics-protocol/index.js +434 -454
- package/dist/appearance/index.js +6 -3
- package/dist/appearance-runtime/index.js +1 -1
- package/dist/assistant-context/index.js +1 -1
- package/dist/brand-studio/index.js +572 -436
- package/dist/briefings/index.js +4 -4
- package/dist/chunks/appearance-context-BwBp25ZG.js +162 -0
- package/dist/chunks/appearance-runtime-provider-BRHYELkC.js +80 -0
- package/dist/chunks/assistant-chat-B-Ddyy8b.js +5940 -0
- package/dist/chunks/{bookmark-impact-CJ-65omV.js → bookmark-impact-DCYD-6Fr.js} +2 -2
- package/dist/chunks/{bookmark-state-Du3s13_V.js → bookmark-state-CflS88gq.js} +251 -250
- package/dist/chunks/brand-B4BdpAB_.js +54 -0
- package/dist/chunks/{card-filter-builder-BBuB99GZ.js → card-filter-builder-0VvKmRst.js} +992 -991
- package/dist/chunks/{comparison-window-caption-CMLb3mut.js → comparison-window-caption-PtcDWvkN.js} +252 -253
- package/dist/chunks/{dashboard-YnWZC4dK.js → dashboard-DxGIr1vZ.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-BF89TU2h.js → dashboard-briefing-launcher-B-quOOOQ.js} +253 -253
- package/dist/chunks/{dashboard-controls-atHc1EjP.js → dashboard-controls-Caodx80b.js} +288 -285
- package/dist/chunks/dashboard-json-Ct-AGDHF.js +66 -0
- package/dist/chunks/{dates-CKO05ino.js → dates-B9mL8BHE.js} +16 -15
- package/dist/chunks/edit-Bpdh_P_a.js +226 -0
- package/dist/chunks/{edit-dashboard-visual-DdmTfn-J.js → edit-dashboard-visual-DeDTuYB5.js} +2257 -2270
- package/dist/chunks/{filter-reach-copy-jZGzK_IH.js → filter-reach-copy-BSY33ro5.js} +1440 -1301
- package/dist/chunks/filter-value-text-DvvSNlho.js +146 -0
- package/dist/chunks/index-BVKzKl5d.js +90 -0
- package/dist/chunks/{index-RNaTnE3m.js → index-CV_Kzou0.js} +233 -223
- package/dist/chunks/{index-CPNZW0mu.js → index-y3HUzRNk.js} +76 -77
- package/dist/chunks/{layout-grid-0hIlqEtk.js → layout-grid-8rR-LPTk.js} +1 -1
- package/dist/chunks/{list-filter-DkgoCeBm.js → list-filter-C1-uTgjR.js} +1 -1
- package/dist/chunks/matrix-analytical-definition-dkS8szLM.js +1253 -0
- package/dist/chunks/matrix-member-presentation-DRa-9e6Q.js +169 -0
- package/dist/chunks/{matrix-operation-contract-Eb6elidS.js → matrix-operation-contract-DCVinw1o.js} +122 -122
- package/dist/chunks/{metric-comparison-ChXUFaZu.js → metric-comparison-n9NsIa-2.js} +175 -128
- package/dist/chunks/paintbrush-aR17Z3C9.js +27 -0
- package/dist/chunks/{palette-4vf2BEEg.js → palette-a5FCZKFI.js} +1 -1
- package/dist/chunks/{_commonjsHelpers-DimLPMtv.js → pickers-DkqmtnTL.js} +352 -290
- package/dist/chunks/pivot-result-contract-expectations-C-HnUKYe.js +55 -0
- package/dist/chunks/{pivot-result-identity-BlbLrqaC.js → pivot-result-identity-B89X5xjb.js} +1 -1
- package/dist/chunks/raw-temporal-value-DdT0s47W.js +159 -0
- package/dist/chunks/{report-preferences-dialog-Mbd-I0wV.js → report-preferences-dialog-Yvhv3WX2.js} +95 -97
- package/dist/chunks/{report-runtime-context-DnA_PiKo.js → report-runtime-context-BhPzLTbS.js} +1 -1
- package/dist/chunks/{resolve-dashboard-input-context-Du0fjN3h.js → resolve-dashboard-input-context-Lkbwycwe.js} +5491 -5683
- package/dist/chunks/resolver-DG_tfEpt.js +156 -0
- package/dist/chunks/{save-D6pHmSSP.js → save-D985VvYp.js} +1 -1
- package/dist/chunks/{saved-dashboard-context-y8N6RvjS.js → saved-dashboard-context-DC_TEd6y.js} +6 -6
- package/dist/chunks/schema-C9NPiIru.js +2568 -0
- package/dist/chunks/{semaphor-ready-indicator-BSEdUq40.js → semaphor-ready-indicator-ByFvqHEO.js} +35916 -36001
- package/dist/chunks/{shelf-drop-preview-context-D7QqPl36.js → shelf-drop-preview-context-CjoVaK6J.js} +64 -66
- package/dist/chunks/{stored-dashboard-d3xQYxBD.js → stored-dashboard-C0hekXiI.js} +332 -333
- package/dist/chunks/{code-editor-DJNOsgJH.js → style-sheet-parts-C7qGZuH1.js} +2402 -2040
- package/dist/chunks/{table-export-sheet--DUKWk6o.js → table-export-sheet-CP8zSOhj.js} +1 -1
- package/dist/chunks/{temporal-input-presentation--2r9BLr0.js → temporal-input-presentation-CqbJjIuu.js} +18 -18
- package/dist/chunks/{token-types-C8JymO8s.js → token-types-iKMplaBL.js} +1 -1
- package/dist/chunks/{upload-Cf3wXZT8.js → upload-CiGNKJ_0.js} +1 -1
- package/dist/chunks/validators-B8fpdinG.js +3651 -0
- package/dist/chunks/{variable-draft-DOX03R4A.js → variable-draft-9-huI1h4.js} +4 -4
- package/dist/dashboard/index.js +2 -2
- package/dist/dashboard-authoring/index.js +1888 -1826
- package/dist/format-utils/index.js +230 -231
- package/dist/index.js +349 -353
- package/dist/layouts/index.js +1 -1
- package/dist/report-runtime-context/index.js +1 -1
- package/dist/style.css +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/appearance/index.d.ts +1 -0
- package/dist/types/brand-studio/brand-studio-draft.d.ts +7 -0
- package/dist/types/brand-studio/index.d.ts +1 -1
- package/dist/types/components/briefings/briefing-author/run-model.d.ts +1 -2
- package/dist/types/components/providers/appearance-runtime-provider.d.ts +4 -1
- package/dist/types/components/sharing-and-management/hooks/use-resource-management.d.ts +0 -2
- package/dist/types/components/sharing-and-management/utils/types.d.ts +0 -72
- package/dist/types/components/surfboard/filter/types.d.ts +5 -4
- package/dist/types/components/ui-custom/date-range-presets.d.ts +1 -17
- package/dist/types/components/visual/data-table/hooks/use-data-table-logic.d.ts +0 -1
- package/dist/types/components/visual/data-table/types/data-table.d.ts +0 -9
- package/dist/types/components/visual/data-table/utils/pagination-utils.d.ts +0 -19
- package/dist/types/components/visual/shared/utils/table-column-order.d.ts +0 -1
- package/dist/types/index.js +9 -9
- package/dist/types/lib/appearance/aliases.d.ts +42 -0
- package/dist/types/lib/appearance/compiler.d.ts +6 -0
- package/dist/types/lib/appearance/defaults.d.ts +6 -0
- package/dist/types/lib/appearance/index.d.ts +2 -0
- package/dist/types/lib/appearance/normalize-organization.d.ts +17 -0
- package/dist/types/lib/appearance/resolver.d.ts +2 -2
- package/dist/types/lib/appearance/types.d.ts +38 -1
- package/dist/types/lib/charts/types.d.ts +6 -2
- package/dist/types/lib/dashboard/semantic-dataset-references.d.ts +0 -1
- package/dist/types/lib/dashboard-inputs/dashboard-input-values.d.ts +0 -2
- package/dist/types/lib/dashboard-variables/types.d.ts +1 -6
- package/dist/types/lib/download-pdf.d.ts +0 -1
- package/dist/types/lib/hooks/use-dashboard.d.ts +3 -4
- package/dist/types/lib/hooks/use-date-filter.d.ts +3 -3
- package/dist/types/lib/matrix-table/matrix-card-adapter.d.ts +1 -1
- package/dist/types/lib/stores/dashboard-store.d.ts +15 -6
- package/dist/types/lib/stores/editor-store.d.ts +0 -1
- package/dist/types/lib/stores/table-actions.d.ts +0 -1
- package/dist/types/lib/table-formatting/table-formatting-css.d.ts +0 -5
- package/dist/types/lib/types/common-types.d.ts +3 -2
- package/dist/types/lib/types/explorer-types.d.ts +2 -2
- package/dist/types/lib/types/index.d.ts +1 -1
- package/dist/types/lib/types/summary-types.d.ts +0 -5
- package/dist/types/lib/utils/card-definition.d.ts +7 -7
- package/dist/types/shared/analytics-protocol/agent-time-window.d.ts +84 -0
- package/dist/types/shared/analytics-protocol/analytics-base-schemas.d.ts +4 -4
- package/dist/types/shared/analytics-protocol/applied-constraints.d.ts +2 -2
- package/dist/types/shared/analytics-protocol/contracts.d.ts +8 -17
- package/dist/types/shared/analytics-protocol/execution-input-schemas.d.ts +10 -10
- package/dist/types/shared/analytics-protocol/fixtures.d.ts +3 -2
- package/dist/types/shared/analytics-protocol/index.d.ts +2 -4
- package/dist/types/shared/analytics-protocol/matrix-definition-contract.d.ts +72 -72
- package/dist/types/shared/analytics-protocol/relative-date/describe.d.ts +18 -0
- package/dist/types/shared/analytics-protocol/relative-date/index.d.ts +7 -0
- package/dist/types/shared/analytics-protocol/relative-date/limits.d.ts +3 -0
- package/dist/types/shared/analytics-protocol/relative-date/presets.d.ts +11 -0
- package/dist/types/shared/analytics-protocol/relative-date/resolve.d.ts +49 -0
- package/dist/types/shared/analytics-protocol/relative-date/schemas.d.ts +76 -0
- package/dist/types/shared/analytics-protocol/relative-date/traits.d.ts +51 -0
- package/dist/types/shared/analytics-protocol/relative-date/window.d.ts +111 -0
- package/dist/types/shared/analytics-protocol/selection-contract.d.ts +1 -1
- package/dist/types/shared/assistant-protocol/context.d.ts +30 -30
- package/dist/types/shared/dashboard-authoring/changes/card-query-part.d.ts +0 -2
- package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +344 -1772
- package/dist/types/shared/dashboard-authoring/changes/diagnostics.d.ts +4 -1
- package/dist/types/shared/dashboard-authoring/changes/read-card-query.d.ts +8 -4
- package/dist/types/shared/dashboard-authoring/changes/resolve-dashboard-changes.d.ts +9 -0
- package/dist/types/shared/dashboard-authoring/conditional-formatting/schema.d.ts +104 -104
- package/dist/types/shared/dashboard-authoring/control-execution-contract.d.ts +20 -20
- package/dist/types/shared/dashboard-authoring/dashboard-style/bounds.d.ts +17 -0
- package/dist/types/shared/dashboard-authoring/dashboard-style/brand.d.ts +20 -0
- package/dist/types/shared/dashboard-authoring/dashboard-style/edit-words.d.ts +7 -0
- package/dist/types/shared/dashboard-authoring/dashboard-style/edit.d.ts +19 -0
- package/dist/types/shared/dashboard-authoring/dashboard-style/index.d.ts +15 -0
- package/dist/types/shared/dashboard-authoring/dashboard-style/layers.d.ts +19 -0
- package/dist/types/shared/dashboard-authoring/dashboard-style/legacy.d.ts +21 -0
- package/dist/types/shared/dashboard-authoring/dashboard-style/parse.d.ts +18 -0
- package/dist/types/shared/dashboard-authoring/dashboard-style/pickers.d.ts +12 -0
- package/dist/types/shared/dashboard-authoring/dashboard-style/types.d.ts +122 -0
- package/dist/types/shared/dashboard-authoring/dashboard-style/view.d.ts +10 -0
- package/dist/types/shared/dashboard-authoring/index.d.ts +1 -0
- package/dist/types/shared/dashboard-authoring/operations/operation-types.d.ts +11 -0
- package/dist/types/shared/dashboard-authoring/outline/outline-dashboard.d.ts +23 -0
- package/dist/types/shared/dashboard-authoring/outline/outline-filters.d.ts +10 -2
- package/dist/types/shared/format-utils/filter-detail.d.ts +2 -8
- package/dist/types/shared/format-utils/filter-line.d.ts +2 -2
- package/dist/types/shared/format-utils/matrix-continuation.d.ts +10 -10
- package/dist/types/shared/temporal/index.d.ts +0 -2
- package/dist/types/shared/temporal/temporal-parity-fixtures.d.ts +2 -2
- package/package.json +7 -26
- package/DATA_APP_SDK.md +0 -339
- package/dist/chunks/appearance-context-DEYtWinQ.js +0 -126
- package/dist/chunks/appearance-runtime-provider-B-M8gwlZ.js +0 -81
- package/dist/chunks/assistant-chat-BN5I8KuN.js +0 -8849
- package/dist/chunks/color-CJvdlFM_.js +0 -2162
- package/dist/chunks/dashboard-json-Cxp3inxd.js +0 -68
- package/dist/chunks/filter-value-text-7zhmth1S.js +0 -163
- package/dist/chunks/index-CLIro-EG.js +0 -425
- package/dist/chunks/index-CuHybtft.js +0 -51
- package/dist/chunks/matrix-analytical-definition-C9xB_T84.js +0 -717
- package/dist/chunks/matrix-card-BSUeSXpD.js +0 -42
- package/dist/chunks/matrix-member-presentation-DZNgQpUq.js +0 -105
- package/dist/chunks/operators-B3zZoskU.js +0 -66
- package/dist/chunks/pivot-result-contract-expectations-Ddh1rNz5.js +0 -56
- package/dist/chunks/raw-temporal-value-Bqz8wc7L.js +0 -242
- package/dist/chunks/selection-reducer-OaJ-N5uN.js +0 -46
- package/dist/chunks/source-entity-resolution-DF6GulDn.js +0 -607
- package/dist/chunks/validators-wtjw0aw6.js +0 -3332
- package/dist/data-app-sdk/index.js +0 -1412
- package/dist/data-app-sdk-adapters/index.js +0 -361
- package/dist/data-app-sdk-validation/index.js +0 -1031
- package/dist/types/components/sharing-and-management/utils/group-types.d.ts +0 -105
- package/dist/types/data-app-sdk/adapters.d.ts +0 -35
- package/dist/types/data-app-sdk/builders.d.ts +0 -62
- package/dist/types/data-app-sdk/contracts.d.ts +0 -419
- package/dist/types/data-app-sdk/executor.d.ts +0 -5
- package/dist/types/data-app-sdk/field-catalog-validation.d.ts +0 -29
- package/dist/types/data-app-sdk/hooks.d.ts +0 -11
- package/dist/types/data-app-sdk/index.d.ts +0 -9
- package/dist/types/data-app-sdk/provider.d.ts +0 -8
- package/dist/types/data-app-sdk/relationship-aware-field-policy.d.ts +0 -21
- package/dist/types/data-app-sdk/selection.d.ts +0 -2
- package/dist/types/data-app-sdk/validation.d.ts +0 -58
- package/dist/types/data-app-sdk-adapters.d.ts +0 -2
- package/dist/types/data-app-sdk-validation.d.ts +0 -2
- package/dist/types/data-app-sdk.d.ts +0 -2
- package/dist/types/shared/analytics-protocol/relative-date-filter.d.ts +0 -68
- package/dist/types/shared/analytics-protocol/relative-date-label.d.ts +0 -20
- package/dist/types/shared/analytics-protocol/time-window-schema.d.ts +0 -314
- package/dist/types/shared/analytics-protocol/time-window.d.ts +0 -52
- package/dist/types/shared/temporal/relative-date.d.ts +0 -21
- package/dist/types/shared/temporal/time-window-periods.d.ts +0 -21
- package/src/data-app-sdk/README.md +0 -402
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TFilter, TFilterValue,
|
|
1
|
+
import { TFilter, TFilterValue, RelativeDateWindow, DateComparisonOperation, FilterStorageOptions, RelativeDateChangeOptions, TemporalPrecision } from '../../components/surfboard/filter/types.js';
|
|
2
2
|
import { DateRange } from 'react-day-picker';
|
|
3
3
|
type UseDateFilterOptions = FilterStorageOptions;
|
|
4
4
|
type DateFilterChangeOptions = {
|
|
@@ -20,7 +20,7 @@ export declare function useDateFilterHook(filterId: string): {
|
|
|
20
20
|
handleClear: () => void;
|
|
21
21
|
handleChange: (date: DateRange | undefined, operation?: DateComparisonOperation, options?: DateFilterChangeOptions) => void;
|
|
22
22
|
handleNullOperation: (operation: "is null" | "is not null") => void;
|
|
23
|
-
handleRelativeChange: (date: DateRange | undefined, relativeMeta:
|
|
23
|
+
handleRelativeChange: (date: DateRange | undefined, relativeMeta: RelativeDateWindow, options?: RelativeDateChangeOptions) => void;
|
|
24
24
|
handleReset: () => void;
|
|
25
25
|
};
|
|
26
26
|
export declare function useDateFilter(filter: TFilter, options?: UseDateFilterOptions): {
|
|
@@ -35,7 +35,7 @@ export declare function useDateFilter(filter: TFilter, options?: UseDateFilterOp
|
|
|
35
35
|
handleClear: () => void;
|
|
36
36
|
handleChange: (date: DateRange | undefined, operation?: DateComparisonOperation, options?: DateFilterChangeOptions) => void;
|
|
37
37
|
handleNullOperation: (operation: "is null" | "is not null") => void;
|
|
38
|
-
handleRelativeChange: (date: DateRange | undefined, relativeMeta:
|
|
38
|
+
handleRelativeChange: (date: DateRange | undefined, relativeMeta: RelativeDateWindow, options?: RelativeDateChangeOptions) => void;
|
|
39
39
|
handleReset: () => void;
|
|
40
40
|
};
|
|
41
41
|
export {};
|
|
@@ -66,6 +66,7 @@ export declare function prepareMatrixCard(card: TCard, catalog: MatrixCardCatalo
|
|
|
66
66
|
levelFormats: Readonly<Record<string, SemaphorValueFormat>>;
|
|
67
67
|
measureFormats: Readonly<Record<string, SemaphorValueFormat>>;
|
|
68
68
|
};
|
|
69
|
+
version: 1;
|
|
69
70
|
spec: {
|
|
70
71
|
source: {
|
|
71
72
|
kind: "semantic";
|
|
@@ -149,7 +150,6 @@ export declare function prepareMatrixCard(card: TCard, catalog: MatrixCardCatalo
|
|
|
149
150
|
} | undefined;
|
|
150
151
|
measureFilters?: readonly import('../../shared/analytics-protocol/index.js').MatrixMeasureFilter[] | undefined;
|
|
151
152
|
};
|
|
152
|
-
version: 1;
|
|
153
153
|
defaultView: {
|
|
154
154
|
columns: {
|
|
155
155
|
depth: number;
|
|
@@ -4,13 +4,14 @@ import { TableColumnEditResult } from '../dashboard-viewer/table-view-edit.js';
|
|
|
4
4
|
import { Bookmark } from '../../shared/dashboard-viewer/index.js';
|
|
5
5
|
import { DashboardViewerState } from '../dashboard-viewer/viewer-store-state.js';
|
|
6
6
|
import { ViewerStateClient } from '../dashboard-viewer/viewer-state-client.js';
|
|
7
|
-
import { AuthToken, TBaseQuery, Breakpoint, ControlDefinition, CustomCard,
|
|
7
|
+
import { AuthToken, TBaseQuery, Breakpoint, ControlDefinition, CustomCard, TCard, TDashboard, TEvent, TFrame, TSheet, CacheConfig, FilterLayoutSettings, DocumentDefinition, DashboardInput, DashboardInputScope, DashboardInputSlot, DashboardInputValues, DashboardLifecycleEvent } from '../types/common-types.js';
|
|
8
8
|
import { TFilter, TFilterValue } from '../../components/surfboard/filter/types.js';
|
|
9
9
|
import { TransientInputContext } from '../dashboard-inputs/transient-input-context.js';
|
|
10
10
|
import { MissingPrintInputs } from '../print/print-inputs.js';
|
|
11
11
|
import { default as ReactGridLayout } from 'react-grid-layout';
|
|
12
12
|
import { CustomizableBreakpoint, EditableBreakpoint, FramePlacement, GridEditBreakpoint, LayoutItem } from '../../shared/layouts/index.js';
|
|
13
13
|
import { DashboardOperation, OperationContext } from '../../shared/dashboard-authoring/operations/apply-dashboard-operations.js';
|
|
14
|
+
import { DashboardStyle } from '../../shared/dashboard-authoring/dashboard-style/types.js';
|
|
14
15
|
import { FilterGroup, Field } from '../types/explorer-types.js';
|
|
15
16
|
import { DashboardControlsModelOptions } from '../controls/control-authoring-types.js';
|
|
16
17
|
import { SemanticExecutionPayload } from '../types/semantic-runtime-types.js';
|
|
@@ -123,7 +124,6 @@ export type DashboardStore = {
|
|
|
123
124
|
*/
|
|
124
125
|
screenSizesOpen: boolean;
|
|
125
126
|
theme?: 'light' | 'dark' | 'system';
|
|
126
|
-
themeStyle?: StyleProps;
|
|
127
127
|
filteringCards?: TCard[];
|
|
128
128
|
dashboard: TDashboard;
|
|
129
129
|
relaodToken?: number;
|
|
@@ -165,6 +165,15 @@ export type DashboardStore = {
|
|
|
165
165
|
/** Live edit-session check for host navigation; owned by dashboard controls. */
|
|
166
166
|
checkUnsavedDashboardChanges: (() => boolean) | null;
|
|
167
167
|
isDashboardEditing: boolean;
|
|
168
|
+
/**
|
|
169
|
+
* The Style panel (dashboard style SPEC §4.8): open, and the dashboard's own style
|
|
170
|
+
* when it opened, which Cancel restores. Loading or replacing the dashboard and
|
|
171
|
+
* leaving edit mode close it.
|
|
172
|
+
*/
|
|
173
|
+
styleSheet: {
|
|
174
|
+
open: boolean;
|
|
175
|
+
snapshot?: Pick<TDashboard, 'dashboardStyle' | 'globalStyle' | 'style'>;
|
|
176
|
+
};
|
|
168
177
|
/**
|
|
169
178
|
* The dashboard and its semantic payload when editing turned on (Phase 7a,
|
|
170
179
|
* D7-7). The toolbars' "before editing" reads this, so a change made in the
|
|
@@ -274,7 +283,10 @@ type Actions = {
|
|
|
274
283
|
applyResolvedValueFormatPreferences: (resolved: ResolvedValueFormatPreferences, sources: ResolvedValueFormatPreferenceSources) => void;
|
|
275
284
|
triggerReload: () => void;
|
|
276
285
|
setInitStore: () => void;
|
|
277
|
-
|
|
286
|
+
openStyleSheet: () => void;
|
|
287
|
+
/** Writes the draft's style through the `dashboard.style` operation, the MCP's writer (DS-INV-4). */
|
|
288
|
+
setDashboardStyle: (style: DashboardStyle | undefined, sentences: string[]) => void;
|
|
289
|
+
closeStyleSheet: (outcome: 'apply' | 'cancel') => void;
|
|
278
290
|
setDashboardInputs: (inputs: DashboardInput[]) => void;
|
|
279
291
|
upsertDashboardInput: (input: DashboardInput) => void;
|
|
280
292
|
/**
|
|
@@ -324,7 +336,6 @@ type Actions = {
|
|
|
324
336
|
setGlobalCacheConfig: (cacheConfig: CacheConfig) => void;
|
|
325
337
|
setCustomCards: (customCards: CustomCard[]) => void;
|
|
326
338
|
setAuthToken: (authToken: AuthToken) => void;
|
|
327
|
-
setThemeStyle: (themeStyle: StyleProps) => void;
|
|
328
339
|
setDashboard: (dashboard: TDashboard, options?: {
|
|
329
340
|
semanticExecutionPayload?: SemanticExecutionPayload;
|
|
330
341
|
dashboardInputValues?: DashboardInputValues;
|
|
@@ -484,8 +495,6 @@ type Actions = {
|
|
|
484
495
|
clearAdHocFilterValues: () => void;
|
|
485
496
|
/** Clears every filter's value on every target, and every ad-hoc value (a card popover's Clear all). */
|
|
486
497
|
clearAllFilterValues: () => void;
|
|
487
|
-
setStyle: (style: TStyle) => void;
|
|
488
|
-
getStyle: () => TStyle | undefined;
|
|
489
498
|
setOnSaveFunction: (onSaveFunction: (dashboard: TDashboard) => void) => void;
|
|
490
499
|
setOnAddCard: (onAddCard: (card: TCard, sheetId: string) => void) => void;
|
|
491
500
|
setOnAcceptChanges: (onAcceptChanges: (frame: TFrame, dashboard: TDashboard) => void) => void;
|
|
@@ -198,7 +198,6 @@ type Actions = TableActions & ExplorerActions & {
|
|
|
198
198
|
setCardPreferences: (preferences: TCardPreferences) => void;
|
|
199
199
|
setCustomCardPreferences: (customPreferences: TCustomCardPreferences) => void;
|
|
200
200
|
setFilterOnClickField: (field: string) => void;
|
|
201
|
-
setFilterOnClickColumnIndex: (index: number) => void;
|
|
202
201
|
setIsSqlRunning: (isSqlRunning: boolean) => void;
|
|
203
202
|
setCard: (card: TCard) => void;
|
|
204
203
|
/** Shows a card from outside the editor (the dashboard, a document): a load, not an edit of the card it replaces. */
|
|
@@ -5,7 +5,6 @@ import { TCard } from '../types/common-types.js';
|
|
|
5
5
|
import { TableBaseFormatting } from '../table-formatting/index.js';
|
|
6
6
|
import { ConditionalRule } from '../../shared/dashboard-authoring/conditional-formatting/types.js';
|
|
7
7
|
import { ColumnSettingsEdit } from '../formatters/table-column-settings.js';
|
|
8
|
-
export declare const EMPTY_COLUMN_SETTINGS: PersistedColumnSettingsMap;
|
|
9
8
|
export declare const EMPTY_COLUMN_VISIBILITY: Record<string, boolean>;
|
|
10
9
|
export interface EditorState {
|
|
11
10
|
card: TCard;
|
|
@@ -1,9 +1,4 @@
|
|
|
1
1
|
import { ConditionalFormattingResult, TableResolvedBaseStyle, TableResolvedRenderStyle } from './table-formatting-types.js';
|
|
2
|
-
export declare function toConditionalFormattingCss(result: ConditionalFormattingResult): {
|
|
3
|
-
className?: string;
|
|
4
|
-
style?: TableResolvedBaseStyle;
|
|
5
|
-
overlay?: ConditionalFormattingResult['overlay'];
|
|
6
|
-
};
|
|
7
2
|
export declare function mergeTableFormattingStyles(args: {
|
|
8
3
|
base: TableResolvedBaseStyle;
|
|
9
4
|
conditional: ConditionalFormattingResult;
|
|
@@ -20,6 +20,7 @@ import { CsvEncoding } from '../../shared/format-utils/exporters/csv-utils.js';
|
|
|
20
20
|
import { DateCanonicalFormat } from '../../shared/format-utils/types/index.js';
|
|
21
21
|
import { PresentationExecutionSnapshot, TemporalInputPresentation } from '../../shared/format-utils/index.js';
|
|
22
22
|
import { JSX } from 'react';
|
|
23
|
+
import { DashboardStyle } from '../../shared/dashboard-authoring/dashboard-style/types.js';
|
|
23
24
|
export type { DashboardFilterApplication, DashboardFilterBoundCardApplication, DashboardFilterCardApplication, DashboardFilterExcludedCardApplication, DashboardFilterTarget, DashboardFilterTargetField, DashboardFilterTargetSource, DashboardFilterOptionSource, } from '../../shared/dashboard-authoring/dashboard-filter-mapping-types.js';
|
|
24
25
|
export type { ClickToFilterCardMapping, ClickToFilterFieldsRule, ClickToFilterMatrixSources, ClickToFilterSettings, LinkedClickToFilterOverrides, } from '../../shared/dashboard-authoring/click-to-filter-settings.js';
|
|
25
26
|
export type Level = 'database' | 'schema' | 'table';
|
|
@@ -277,7 +278,6 @@ export type DashboardProps = {
|
|
|
277
278
|
* run when this is explicitly "document".
|
|
278
279
|
*/
|
|
279
280
|
renderMode?: 'dashboard' | 'document';
|
|
280
|
-
customStyle?: TStyle;
|
|
281
281
|
appearance?: import('../appearance/types.js').AppearanceSpec;
|
|
282
282
|
currentTheme?: Theme;
|
|
283
283
|
version?: string;
|
|
@@ -707,7 +707,6 @@ export type TCardPreferences = {
|
|
|
707
707
|
onClickFilter?: FilterOnClick[];
|
|
708
708
|
filterOnClick?: boolean;
|
|
709
709
|
filterOnClickField?: string;
|
|
710
|
-
filterOnClickColumnIndex?: number;
|
|
711
710
|
sortChart?: 'asc' | 'desc' | 'none';
|
|
712
711
|
datasetOptions?: TDatasetOptions[];
|
|
713
712
|
chartOptions?: TChartOptions;
|
|
@@ -1739,6 +1738,8 @@ export type TDashboard = {
|
|
|
1739
1738
|
customCards?: CustomCard[];
|
|
1740
1739
|
baseQueries?: TBaseQuery[];
|
|
1741
1740
|
globalStyle?: TStyle;
|
|
1741
|
+
/** The dashboard's own style: only what differs from the brand (dashboard style SPEC §3.1). */
|
|
1742
|
+
dashboardStyle?: DashboardStyle;
|
|
1742
1743
|
globalCacheConfig?: CacheConfig;
|
|
1743
1744
|
defaultFilterValues?: TFilterValue[];
|
|
1744
1745
|
controls?: ControlDefinition[];
|
|
@@ -2,7 +2,7 @@ import { TimeDrillStep } from './interaction-types.js';
|
|
|
2
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
|
-
import {
|
|
5
|
+
import { StoredRelativeDate } from '../../shared/analytics-protocol/relative-date/index.js';
|
|
6
6
|
/**
|
|
7
7
|
* Special entity name marker for calculated fields.
|
|
8
8
|
*
|
|
@@ -451,7 +451,7 @@ export interface FilterCondition {
|
|
|
451
451
|
* the server resolves it on every run and `value` only keeps the range seen
|
|
452
452
|
* when it was saved. Valid only with `between` and `not between`.
|
|
453
453
|
*/
|
|
454
|
-
relativeMeta?:
|
|
454
|
+
relativeMeta?: StoredRelativeDate;
|
|
455
455
|
/**
|
|
456
456
|
* "Equals the latest value of this field" (analytics kernel K13). With `=`
|
|
457
457
|
* on a date or timestamp field only. The server resolves it on every run
|
|
@@ -7,6 +7,6 @@ export * from './briefing-types.js';
|
|
|
7
7
|
export type { AppearanceSpec } from '../appearance/types.js';
|
|
8
8
|
export type { TChartType } from '../charts/types.js';
|
|
9
9
|
export type { CanonicalFormatSpec } from '../formatters/canonical-format-adapter.js';
|
|
10
|
-
export type { DateUnit, DateSelectionMode, FilterFieldMeta, FilterLocation, FilterSemanticContext, Operation,
|
|
10
|
+
export type { DateUnit, DateSelectionMode, FilterFieldMeta, FilterLocation, FilterSemanticContext, Operation, RelativeDateWindow, StoredRelativeDate, RelativeDateUnit, SubDayDateUnit, TFilter, TFilterValue, } from '../../components/surfboard/filter/types.js';
|
|
11
11
|
export type DateComparisonOperation = Extract<import('../../components/surfboard/filter/types.js').Operation, '=' | '!=' | '>' | '>=' | '<' | '<=' | 'between' | 'not between' | 'is null' | 'is not null'>;
|
|
12
12
|
export * from '../../shared/dashboard-viewer/index.js';
|
|
@@ -49,11 +49,6 @@ export type SummaryResponse = {
|
|
|
49
49
|
warnings: SummaryWarningCode[];
|
|
50
50
|
};
|
|
51
51
|
};
|
|
52
|
-
export type DashboardSummaryOverridePayload = {
|
|
53
|
-
enabled?: boolean;
|
|
54
|
-
position?: 'top' | 'bottom';
|
|
55
|
-
maxItems?: number;
|
|
56
|
-
};
|
|
57
52
|
export type SummaryCardSummary = {
|
|
58
53
|
cardId: string;
|
|
59
54
|
cardTitle: string;
|
|
@@ -18,7 +18,7 @@ export declare function readShelfCardFields(card: ShelfDefinitionCard): Authored
|
|
|
18
18
|
/** Read-only definition capabilities. Execution and lifecycle remain separate. */
|
|
19
19
|
export declare function getCardDefinition(card: DefinitionCard, catalog?: MatrixCardCatalog): {
|
|
20
20
|
kind: "shelf";
|
|
21
|
-
status: "
|
|
21
|
+
status: "ready" | "absent";
|
|
22
22
|
fields: AuthoredCardFields;
|
|
23
23
|
filters: import('../types/explorer-types.js').FilterGroup | undefined;
|
|
24
24
|
joinPlan: import('../types/explorer-types.js').JoinPlan | undefined;
|
|
@@ -28,7 +28,7 @@ export declare function getCardDefinition(card: DefinitionCard, catalog?: Matrix
|
|
|
28
28
|
error?: undefined;
|
|
29
29
|
} | {
|
|
30
30
|
kind: "matrix";
|
|
31
|
-
status: "
|
|
31
|
+
status: "ready" | "absent" | "invalid";
|
|
32
32
|
matrix: {
|
|
33
33
|
presentation: {
|
|
34
34
|
totals: {
|
|
@@ -74,6 +74,7 @@ export declare function getCardDefinition(card: DefinitionCard, catalog?: Matrix
|
|
|
74
74
|
levelFormats: Readonly<Record<string, import('../../shared/analytics-protocol/index.js').SemaphorValueFormat>>;
|
|
75
75
|
measureFormats: Readonly<Record<string, import('../../shared/analytics-protocol/index.js').SemaphorValueFormat>>;
|
|
76
76
|
};
|
|
77
|
+
version: 1;
|
|
77
78
|
spec: {
|
|
78
79
|
source: {
|
|
79
80
|
kind: "semantic";
|
|
@@ -99,10 +100,10 @@ export declare function getCardDefinition(card: DefinitionCard, catalog?: Matrix
|
|
|
99
100
|
aggregate: "SUM" | "COUNT" | "AVG" | "MIN" | "MAX" | "MEDIAN" | "DISTINCT";
|
|
100
101
|
field: Omit<import('../../shared/analytics-protocol/index.js').SemaphorExecutionFieldRef, "source" | "aggregate" | "derivedField"> & {
|
|
101
102
|
source?: import('../../shared/analytics-protocol/index.js').SemaphorMatrixSourceRef;
|
|
102
|
-
derivedField?: Omit<import('../../
|
|
103
|
+
derivedField?: Omit<import('../../shared/analytics-protocol/index.js').SemaphorDerivedFieldDefinition, "inputs"> & {
|
|
103
104
|
inputs: Record<string, {
|
|
104
105
|
kind: "field";
|
|
105
|
-
field: Omit<import('../../
|
|
106
|
+
field: Omit<import('../../shared/analytics-protocol/index.js').SemaphorFieldRef, "source"> & {
|
|
106
107
|
source?: import('../../shared/analytics-protocol/index.js').SemaphorMatrixSourceRef;
|
|
107
108
|
};
|
|
108
109
|
aggregate?: import('../../shared/analytics-protocol/index.js').SemaphorAggregateFunction;
|
|
@@ -112,10 +113,10 @@ export declare function getCardDefinition(card: DefinitionCard, catalog?: Matrix
|
|
|
112
113
|
} | {
|
|
113
114
|
id: string;
|
|
114
115
|
kind: "calculated";
|
|
115
|
-
definition: Omit<import('../../
|
|
116
|
+
definition: Omit<import('../../shared/analytics-protocol/index.js').SemaphorDerivedFieldDefinition, "inputs"> & {
|
|
116
117
|
inputs: Record<string, {
|
|
117
118
|
kind: "field";
|
|
118
|
-
field: Omit<import('../../
|
|
119
|
+
field: Omit<import('../../shared/analytics-protocol/index.js').SemaphorFieldRef, "source"> & {
|
|
119
120
|
source?: import('../../shared/analytics-protocol/index.js').SemaphorMatrixSourceRef;
|
|
120
121
|
};
|
|
121
122
|
aggregate?: import('../../shared/analytics-protocol/index.js').SemaphorAggregateFunction;
|
|
@@ -157,7 +158,6 @@ export declare function getCardDefinition(card: DefinitionCard, catalog?: Matrix
|
|
|
157
158
|
} | undefined;
|
|
158
159
|
measureFilters?: readonly import('../../shared/analytics-protocol/matrix-definition-contract.js').MatrixMeasureFilter[] | undefined;
|
|
159
160
|
};
|
|
160
|
-
version: 1;
|
|
161
161
|
defaultView: {
|
|
162
162
|
columns: {
|
|
163
163
|
depth: number;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { SemaphorAbsoluteTimeWindow, SemaphorTimeWindow } from './contracts.js';
|
|
3
|
+
import { RelativeDateWindow } from './relative-date/index.js';
|
|
4
|
+
declare const checkedAbsolute: unique symbol;
|
|
5
|
+
/** An absolute window that passed the reader: both instants parse, start <= end. */
|
|
6
|
+
export type CheckedAbsoluteTimeWindow = SemaphorAbsoluteTimeWindow & {
|
|
7
|
+
readonly [checkedAbsolute]: true;
|
|
8
|
+
};
|
|
9
|
+
/** Every window an agent can state, checked. Only readAgentTimeWindow makes one. */
|
|
10
|
+
export type AgentTimeWindow = RelativeDateWindow | CheckedAbsoluteTimeWindow;
|
|
11
|
+
/** Where a window is going. Each use allows a subset of windows (SPEC-B 3.2). */
|
|
12
|
+
export type AgentTimeWindowUse = 'analysis' | 'cardFilter' | 'filterDefault';
|
|
13
|
+
export type AgentTimeWindowRefusalReason = 'old_form' | 'missing_anchor' | 'seconds' | 'sub_day_periods' | 'sub_day_on_date' | 'over_limit' | 'not_a_window' | 'rolling_days_saved' | 'data_anchor_default' | 'absolute_default' | 'absolute_invalid';
|
|
14
|
+
/** One refusal, worded for an agent: what is wrong and what to send instead (RB-INV-5). */
|
|
15
|
+
export type AgentTimeWindowRefusal = {
|
|
16
|
+
reason: AgentTimeWindowRefusalReason;
|
|
17
|
+
/** One sentence. */
|
|
18
|
+
message: string;
|
|
19
|
+
/** What to send instead, as a window or a choice of windows. Always present. */
|
|
20
|
+
fix: string;
|
|
21
|
+
/**
|
|
22
|
+
* The windows `fix` names, in order, as JSON. Each passes readAgentTimeWindow with the same
|
|
23
|
+
* context (A4). Empty when the fix names no window (old_form, absolute_invalid, some not_a_window).
|
|
24
|
+
*/
|
|
25
|
+
suggestions: SemaphorTimeWindow[];
|
|
26
|
+
/** Relative to the window ('anchor', 'n', 'from'); callers prefix the field's path. */
|
|
27
|
+
path?: string;
|
|
28
|
+
};
|
|
29
|
+
export type AgentTimeWindowResult = {
|
|
30
|
+
ok: true;
|
|
31
|
+
window: AgentTimeWindow;
|
|
32
|
+
} | {
|
|
33
|
+
ok: false;
|
|
34
|
+
refusal: AgentTimeWindowRefusal;
|
|
35
|
+
};
|
|
36
|
+
export type AgentTimeWindowContext = {
|
|
37
|
+
use: AgentTimeWindowUse;
|
|
38
|
+
/**
|
|
39
|
+
* For cardFilter and filterDefault: whether the window's date column has a
|
|
40
|
+
* time of day, by the editor's rule. False refuses minute and hour windows
|
|
41
|
+
* (sub_day_on_date). Omitted for analysis, and for a saved use at a tool
|
|
42
|
+
* schema parse, before the field is known.
|
|
43
|
+
*/
|
|
44
|
+
columnHasTime?: boolean;
|
|
45
|
+
};
|
|
46
|
+
/** Narrowing helper, the only `kind` test callers need. */
|
|
47
|
+
export declare function isAbsoluteAgentTimeWindow(window: AgentTimeWindow): window is CheckedAbsoluteTimeWindow;
|
|
48
|
+
/**
|
|
49
|
+
* Whether two checked windows are the same window (SPEC-B 3.6): relative
|
|
50
|
+
* windows through the owner's `relativeDatesEqual`, absolute ones by instant.
|
|
51
|
+
* Missing on both sides is the same; on one side, not.
|
|
52
|
+
*/
|
|
53
|
+
export declare function sameAgentTimeWindow(left: AgentTimeWindow | undefined, right: AgentTimeWindow | undefined): boolean;
|
|
54
|
+
/** The one reader of an agent's time window. Never throws. */
|
|
55
|
+
export declare function readAgentTimeWindow(input: unknown, context: AgentTimeWindowContext): AgentTimeWindowResult;
|
|
56
|
+
/**
|
|
57
|
+
* The refusal a write of this stored window would get, for readback (SPEC-B
|
|
58
|
+
* 3.6). Undefined when the use accepts it. Its message is the reader's, then
|
|
59
|
+
* "It stays while <field> is left out."
|
|
60
|
+
*/
|
|
61
|
+
export declare function storedTimeWindowRefusal(stored: RelativeDateWindow, context: AgentTimeWindowContext, field: 'defaultPeriod' | 'timeWindow'): AgentTimeWindowRefusal | undefined;
|
|
62
|
+
/**
|
|
63
|
+
* The Zod schema for every tool argument that takes a window (SPEC-B 3.3):
|
|
64
|
+
* the strict window shapes and the absolute shape, so a tool's JSON schema
|
|
65
|
+
* lists every shape an agent may send. The reader decides every input once,
|
|
66
|
+
* before the shapes: a refused input is one issue in the reader's words (with
|
|
67
|
+
* its fix), never a shape's ("Unrecognized key(s)"), and an accepted one comes
|
|
68
|
+
* out as the checked window. `columnHasTime` isn't known here; saved uses read
|
|
69
|
+
* again with it. A schema shared by several fields takes the use from the
|
|
70
|
+
* field's path, so the JSON schema lists it once.
|
|
71
|
+
*/
|
|
72
|
+
export declare function agentTimeWindowSchema(use: AgentTimeWindowUse | ((path: ReadonlyArray<string | number>) => AgentTimeWindowUse)): z.ZodType<AgentTimeWindow, z.ZodTypeDef, SemaphorTimeWindow>;
|
|
73
|
+
/** A refusal as one issue message, for every surface that reports it (SPEC-B 3.2): "<message> Fix: <fix>". */
|
|
74
|
+
export declare function agentTimeWindowIssueMessage(refusal: AgentTimeWindowRefusal): string;
|
|
75
|
+
/**
|
|
76
|
+
* The message and fix of an issue message `agentTimeWindowIssueMessage`
|
|
77
|
+
* wrote, for a surface that reports them apart (a ChangeDiagnostic); undefined
|
|
78
|
+
* for any other message.
|
|
79
|
+
*/
|
|
80
|
+
export declare function splitAgentTimeWindowIssueMessage(message: string): {
|
|
81
|
+
message: string;
|
|
82
|
+
fix: string;
|
|
83
|
+
} | undefined;
|
|
84
|
+
export {};
|
|
@@ -31,6 +31,7 @@ export declare const semaphorNumericValueFormatSchema: z.ZodEffects<z.ZodObject<
|
|
|
31
31
|
signDisplay: z.ZodOptional<z.ZodEnum<["auto", "always", "exceptZero", "never"]>>;
|
|
32
32
|
}, "strict", z.ZodTypeAny, {
|
|
33
33
|
type: "number" | "currency" | "percent" | "scientific";
|
|
34
|
+
compact?: boolean | undefined;
|
|
34
35
|
currency?: string | undefined;
|
|
35
36
|
scale?: number | undefined;
|
|
36
37
|
minimumFractionDigits?: number | undefined;
|
|
@@ -39,11 +40,11 @@ export declare const semaphorNumericValueFormatSchema: z.ZodEffects<z.ZodObject<
|
|
|
39
40
|
prefix?: string | undefined;
|
|
40
41
|
suffix?: string | undefined;
|
|
41
42
|
negativeStyle?: "minus" | "parentheses" | undefined;
|
|
42
|
-
compact?: boolean | undefined;
|
|
43
43
|
percentValueMode?: "fraction" | "whole" | undefined;
|
|
44
44
|
signDisplay?: "auto" | "always" | "exceptZero" | "never" | undefined;
|
|
45
45
|
}, {
|
|
46
46
|
type: "number" | "currency" | "percent" | "scientific";
|
|
47
|
+
compact?: boolean | undefined;
|
|
47
48
|
currency?: string | undefined;
|
|
48
49
|
scale?: number | undefined;
|
|
49
50
|
minimumFractionDigits?: number | undefined;
|
|
@@ -52,11 +53,11 @@ export declare const semaphorNumericValueFormatSchema: z.ZodEffects<z.ZodObject<
|
|
|
52
53
|
prefix?: string | undefined;
|
|
53
54
|
suffix?: string | undefined;
|
|
54
55
|
negativeStyle?: "minus" | "parentheses" | undefined;
|
|
55
|
-
compact?: boolean | undefined;
|
|
56
56
|
percentValueMode?: "fraction" | "whole" | undefined;
|
|
57
57
|
signDisplay?: "auto" | "always" | "exceptZero" | "never" | undefined;
|
|
58
58
|
}>, {
|
|
59
59
|
type: "number" | "currency" | "percent" | "scientific";
|
|
60
|
+
compact?: boolean | undefined;
|
|
60
61
|
currency?: string | undefined;
|
|
61
62
|
scale?: number | undefined;
|
|
62
63
|
minimumFractionDigits?: number | undefined;
|
|
@@ -65,11 +66,11 @@ export declare const semaphorNumericValueFormatSchema: z.ZodEffects<z.ZodObject<
|
|
|
65
66
|
prefix?: string | undefined;
|
|
66
67
|
suffix?: string | undefined;
|
|
67
68
|
negativeStyle?: "minus" | "parentheses" | undefined;
|
|
68
|
-
compact?: boolean | undefined;
|
|
69
69
|
percentValueMode?: "fraction" | "whole" | undefined;
|
|
70
70
|
signDisplay?: "auto" | "always" | "exceptZero" | "never" | undefined;
|
|
71
71
|
}, {
|
|
72
72
|
type: "number" | "currency" | "percent" | "scientific";
|
|
73
|
+
compact?: boolean | undefined;
|
|
73
74
|
currency?: string | undefined;
|
|
74
75
|
scale?: number | undefined;
|
|
75
76
|
minimumFractionDigits?: number | undefined;
|
|
@@ -78,7 +79,6 @@ export declare const semaphorNumericValueFormatSchema: z.ZodEffects<z.ZodObject<
|
|
|
78
79
|
prefix?: string | undefined;
|
|
79
80
|
suffix?: string | undefined;
|
|
80
81
|
negativeStyle?: "minus" | "parentheses" | undefined;
|
|
81
|
-
compact?: boolean | undefined;
|
|
82
82
|
percentValueMode?: "fraction" | "whole" | undefined;
|
|
83
83
|
signDisplay?: "auto" | "always" | "exceptZero" | "never" | undefined;
|
|
84
84
|
}>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FilterGroup } from '../../lib/types/explorer-types.js';
|
|
2
2
|
import { MetricComparisonWindowGrain, ResolvedDateWindow } from './metric-comparison.js';
|
|
3
|
-
import {
|
|
3
|
+
import { RelativeDateWindow } from './relative-date/index.js';
|
|
4
4
|
/**
|
|
5
5
|
* What a governed query applied, as evidence (analytics agent Plan 1, Phase
|
|
6
6
|
* 3b, ledger D3b-4): the public conditions of the executed query, decided
|
|
@@ -53,7 +53,7 @@ export type AppliedFilterCondition = {
|
|
|
53
53
|
values: unknown[];
|
|
54
54
|
valueType: 'string' | 'number' | 'date' | 'boolean';
|
|
55
55
|
/** A relative window, with the bounds it resolved to in `values`. */
|
|
56
|
-
relative?:
|
|
56
|
+
relative?: RelativeDateWindow;
|
|
57
57
|
/**
|
|
58
58
|
* On a date condition: the calendar zone the query ran in, which its
|
|
59
59
|
* bounds' day boundaries are in. Bounds that span whole days in it read as
|
|
@@ -2,7 +2,7 @@ import { z } from 'zod';
|
|
|
2
2
|
import { matrixAnalyticalIntentSchema } from './matrix-definition-contract.js';
|
|
3
3
|
import { matrixResultSchema } from './matrix-window-contract.js';
|
|
4
4
|
import { CalendarContext } from '../report-runtime-context/index.js';
|
|
5
|
-
import {
|
|
5
|
+
import { RelativeDateWindowInput } from './relative-date/index.js';
|
|
6
6
|
import { SemaphorQueryConstraints } from './applied-constraints.js';
|
|
7
7
|
export type SemaphorProtocolVersion = 1;
|
|
8
8
|
export type SemaphorDialect = 'postgres' | 'mysql' | 'mssql' | 'snowflake' | 'clickhouse' | 'bigquery' | 'redshift' | 'duckdb' | 'sqlite' | 'unknown';
|
|
@@ -340,27 +340,18 @@ export declare const TEMPORAL_BUCKET_CONTRACT_ERROR_CODES: {
|
|
|
340
340
|
readonly invalidValue: "invalid_temporal_bucket_value";
|
|
341
341
|
};
|
|
342
342
|
export type TemporalBucketContractErrorCode = (typeof TEMPORAL_BUCKET_CONTRACT_ERROR_CODES)[keyof typeof TEMPORAL_BUCKET_CONTRACT_ERROR_CODES];
|
|
343
|
-
|
|
344
|
-
kind?: 'relative';
|
|
345
|
-
unit: SemaphorTimeGrain;
|
|
346
|
-
value: number;
|
|
347
|
-
anchor?: 'now' | 'latest_available';
|
|
348
|
-
completeness?: 'include_partial' | 'complete_periods';
|
|
349
|
-
};
|
|
350
|
-
/** A whole calendar period, such as this month or the previous quarter. */
|
|
351
|
-
export type SemaphorCalendarTimeWindow = {
|
|
352
|
-
kind: 'calendar';
|
|
353
|
-
unit: DateUnit;
|
|
354
|
-
period: 'this' | 'previous';
|
|
355
|
-
/** Only with period "this": the period so far, ending at the anchor. */
|
|
356
|
-
toDate?: boolean;
|
|
357
|
-
};
|
|
343
|
+
/** Two instants an agent names. */
|
|
358
344
|
export type SemaphorAbsoluteTimeWindow = {
|
|
359
345
|
kind: 'absolute';
|
|
360
346
|
start: string;
|
|
361
347
|
end: string;
|
|
362
348
|
};
|
|
363
|
-
|
|
349
|
+
/**
|
|
350
|
+
* A date window as an agent sends it (relative-date-as-of Plan B, SPEC-B 2.1):
|
|
351
|
+
* the editor's window input, or two absolute instants. Not checked: read it
|
|
352
|
+
* with `readAgentTimeWindow` or `agentTimeWindowSchema`.
|
|
353
|
+
*/
|
|
354
|
+
export type SemaphorTimeWindow = RelativeDateWindowInput | SemaphorAbsoluteTimeWindow;
|
|
364
355
|
export type SemaphorPaginationRequest = {
|
|
365
356
|
page: number;
|
|
366
357
|
pageSize: number;
|
|
@@ -374,7 +374,7 @@ export declare const configDerivedFieldSchema: z.ZodEffects<z.ZodObject<{
|
|
|
374
374
|
expressionLanguage?: "semaphor_sql_template" | undefined;
|
|
375
375
|
defaultAggregate?: "SUM" | "COUNT" | "AVG" | "MIN" | "MAX" | "MEDIAN" | "DISTINCT" | undefined;
|
|
376
376
|
aggregationBehavior?: "additive" | "non_additive" | "ratio_of_sums" | "weighted" | "pre_aggregated" | "snapshot" | undefined;
|
|
377
|
-
aggregationStrategy?: "
|
|
377
|
+
aggregationStrategy?: "default" | "weighted" | "symmetric_aggregate" | "aggregate_then_join" | undefined;
|
|
378
378
|
format?: import('./contracts.js').SemaphorScalarValueFormat | undefined;
|
|
379
379
|
tags?: string[] | undefined;
|
|
380
380
|
}, {
|
|
@@ -417,7 +417,7 @@ export declare const configDerivedFieldSchema: z.ZodEffects<z.ZodObject<{
|
|
|
417
417
|
expressionLanguage?: "semaphor_sql_template" | undefined;
|
|
418
418
|
defaultAggregate?: "SUM" | "COUNT" | "AVG" | "MIN" | "MAX" | "MEDIAN" | "DISTINCT" | undefined;
|
|
419
419
|
aggregationBehavior?: "additive" | "non_additive" | "ratio_of_sums" | "weighted" | "pre_aggregated" | "snapshot" | undefined;
|
|
420
|
-
aggregationStrategy?: "
|
|
420
|
+
aggregationStrategy?: "default" | "weighted" | "symmetric_aggregate" | "aggregate_then_join" | undefined;
|
|
421
421
|
format?: import('./contracts.js').SemaphorScalarValueFormat | undefined;
|
|
422
422
|
tags?: string[] | undefined;
|
|
423
423
|
}>, {
|
|
@@ -460,7 +460,7 @@ export declare const configDerivedFieldSchema: z.ZodEffects<z.ZodObject<{
|
|
|
460
460
|
expressionLanguage?: "semaphor_sql_template" | undefined;
|
|
461
461
|
defaultAggregate?: "SUM" | "COUNT" | "AVG" | "MIN" | "MAX" | "MEDIAN" | "DISTINCT" | undefined;
|
|
462
462
|
aggregationBehavior?: "additive" | "non_additive" | "ratio_of_sums" | "weighted" | "pre_aggregated" | "snapshot" | undefined;
|
|
463
|
-
aggregationStrategy?: "
|
|
463
|
+
aggregationStrategy?: "default" | "weighted" | "symmetric_aggregate" | "aggregate_then_join" | undefined;
|
|
464
464
|
format?: import('./contracts.js').SemaphorScalarValueFormat | undefined;
|
|
465
465
|
tags?: string[] | undefined;
|
|
466
466
|
}, {
|
|
@@ -503,7 +503,7 @@ export declare const configDerivedFieldSchema: z.ZodEffects<z.ZodObject<{
|
|
|
503
503
|
expressionLanguage?: "semaphor_sql_template" | undefined;
|
|
504
504
|
defaultAggregate?: "SUM" | "COUNT" | "AVG" | "MIN" | "MAX" | "MEDIAN" | "DISTINCT" | undefined;
|
|
505
505
|
aggregationBehavior?: "additive" | "non_additive" | "ratio_of_sums" | "weighted" | "pre_aggregated" | "snapshot" | undefined;
|
|
506
|
-
aggregationStrategy?: "
|
|
506
|
+
aggregationStrategy?: "default" | "weighted" | "symmetric_aggregate" | "aggregate_then_join" | undefined;
|
|
507
507
|
format?: import('./contracts.js').SemaphorScalarValueFormat | undefined;
|
|
508
508
|
tags?: string[] | undefined;
|
|
509
509
|
}>;
|
|
@@ -785,7 +785,7 @@ export declare const configExecutionFieldSchema: z.ZodObject<{
|
|
|
785
785
|
expressionLanguage?: "semaphor_sql_template" | undefined;
|
|
786
786
|
defaultAggregate?: "SUM" | "COUNT" | "AVG" | "MIN" | "MAX" | "MEDIAN" | "DISTINCT" | undefined;
|
|
787
787
|
aggregationBehavior?: "additive" | "non_additive" | "ratio_of_sums" | "weighted" | "pre_aggregated" | "snapshot" | undefined;
|
|
788
|
-
aggregationStrategy?: "
|
|
788
|
+
aggregationStrategy?: "default" | "weighted" | "symmetric_aggregate" | "aggregate_then_join" | undefined;
|
|
789
789
|
format?: import('./contracts.js').SemaphorScalarValueFormat | undefined;
|
|
790
790
|
tags?: string[] | undefined;
|
|
791
791
|
}, {
|
|
@@ -828,7 +828,7 @@ export declare const configExecutionFieldSchema: z.ZodObject<{
|
|
|
828
828
|
expressionLanguage?: "semaphor_sql_template" | undefined;
|
|
829
829
|
defaultAggregate?: "SUM" | "COUNT" | "AVG" | "MIN" | "MAX" | "MEDIAN" | "DISTINCT" | undefined;
|
|
830
830
|
aggregationBehavior?: "additive" | "non_additive" | "ratio_of_sums" | "weighted" | "pre_aggregated" | "snapshot" | undefined;
|
|
831
|
-
aggregationStrategy?: "
|
|
831
|
+
aggregationStrategy?: "default" | "weighted" | "symmetric_aggregate" | "aggregate_then_join" | undefined;
|
|
832
832
|
format?: import('./contracts.js').SemaphorScalarValueFormat | undefined;
|
|
833
833
|
tags?: string[] | undefined;
|
|
834
834
|
}>, {
|
|
@@ -871,7 +871,7 @@ export declare const configExecutionFieldSchema: z.ZodObject<{
|
|
|
871
871
|
expressionLanguage?: "semaphor_sql_template" | undefined;
|
|
872
872
|
defaultAggregate?: "SUM" | "COUNT" | "AVG" | "MIN" | "MAX" | "MEDIAN" | "DISTINCT" | undefined;
|
|
873
873
|
aggregationBehavior?: "additive" | "non_additive" | "ratio_of_sums" | "weighted" | "pre_aggregated" | "snapshot" | undefined;
|
|
874
|
-
aggregationStrategy?: "
|
|
874
|
+
aggregationStrategy?: "default" | "weighted" | "symmetric_aggregate" | "aggregate_then_join" | undefined;
|
|
875
875
|
format?: import('./contracts.js').SemaphorScalarValueFormat | undefined;
|
|
876
876
|
tags?: string[] | undefined;
|
|
877
877
|
}, {
|
|
@@ -914,7 +914,7 @@ export declare const configExecutionFieldSchema: z.ZodObject<{
|
|
|
914
914
|
expressionLanguage?: "semaphor_sql_template" | undefined;
|
|
915
915
|
defaultAggregate?: "SUM" | "COUNT" | "AVG" | "MIN" | "MAX" | "MEDIAN" | "DISTINCT" | undefined;
|
|
916
916
|
aggregationBehavior?: "additive" | "non_additive" | "ratio_of_sums" | "weighted" | "pre_aggregated" | "snapshot" | undefined;
|
|
917
|
-
aggregationStrategy?: "
|
|
917
|
+
aggregationStrategy?: "default" | "weighted" | "symmetric_aggregate" | "aggregate_then_join" | undefined;
|
|
918
918
|
format?: import('./contracts.js').SemaphorScalarValueFormat | undefined;
|
|
919
919
|
tags?: string[] | undefined;
|
|
920
920
|
}>>;
|
|
@@ -981,7 +981,7 @@ export declare const configExecutionFieldSchema: z.ZodObject<{
|
|
|
981
981
|
expressionLanguage?: "semaphor_sql_template" | undefined;
|
|
982
982
|
defaultAggregate?: "SUM" | "COUNT" | "AVG" | "MIN" | "MAX" | "MEDIAN" | "DISTINCT" | undefined;
|
|
983
983
|
aggregationBehavior?: "additive" | "non_additive" | "ratio_of_sums" | "weighted" | "pre_aggregated" | "snapshot" | undefined;
|
|
984
|
-
aggregationStrategy?: "
|
|
984
|
+
aggregationStrategy?: "default" | "weighted" | "symmetric_aggregate" | "aggregate_then_join" | undefined;
|
|
985
985
|
format?: import('./contracts.js').SemaphorScalarValueFormat | undefined;
|
|
986
986
|
tags?: string[] | undefined;
|
|
987
987
|
} | undefined;
|
|
@@ -1048,7 +1048,7 @@ export declare const configExecutionFieldSchema: z.ZodObject<{
|
|
|
1048
1048
|
expressionLanguage?: "semaphor_sql_template" | undefined;
|
|
1049
1049
|
defaultAggregate?: "SUM" | "COUNT" | "AVG" | "MIN" | "MAX" | "MEDIAN" | "DISTINCT" | undefined;
|
|
1050
1050
|
aggregationBehavior?: "additive" | "non_additive" | "ratio_of_sums" | "weighted" | "pre_aggregated" | "snapshot" | undefined;
|
|
1051
|
-
aggregationStrategy?: "
|
|
1051
|
+
aggregationStrategy?: "default" | "weighted" | "symmetric_aggregate" | "aggregate_then_join" | undefined;
|
|
1052
1052
|
format?: import('./contracts.js').SemaphorScalarValueFormat | undefined;
|
|
1053
1053
|
tags?: string[] | undefined;
|
|
1054
1054
|
} | undefined;
|
|
@@ -167,9 +167,10 @@ export declare const SEMAPHOR_ANALYTICS_INTENT_FIXTURES: {
|
|
|
167
167
|
dataType: "date";
|
|
168
168
|
};
|
|
169
169
|
timeWindow: {
|
|
170
|
+
kind: "rolling";
|
|
170
171
|
unit: "month";
|
|
171
|
-
|
|
172
|
-
anchor: "
|
|
172
|
+
n: number;
|
|
173
|
+
anchor: "latest_data";
|
|
173
174
|
};
|
|
174
175
|
dimensions: {
|
|
175
176
|
name: string;
|
|
@@ -23,8 +23,7 @@ export * from './selection-filter-compiler.js';
|
|
|
23
23
|
export * from './temporal-context.js';
|
|
24
24
|
export * from './temporal-bucket-contract.js';
|
|
25
25
|
export * from './raw-temporal-contract.js';
|
|
26
|
-
export * from './relative-date
|
|
27
|
-
export * from './relative-date-label.js';
|
|
26
|
+
export * from './relative-date/index.js';
|
|
28
27
|
export * from './operation-temporal-state.js';
|
|
29
28
|
export * from './aggregate-expression.js';
|
|
30
29
|
export * from './measure-aggregation-profile.js';
|
|
@@ -39,8 +38,7 @@ export * from './visual-choice.js';
|
|
|
39
38
|
*/
|
|
40
39
|
export { filterGroupSchema as savedFilterGroupSchema } from './explorer-input-schemas.js';
|
|
41
40
|
export * from '../temporal/index.js';
|
|
42
|
-
export * from './time-window.js';
|
|
43
|
-
export * from './time-window-schema.js';
|
|
41
|
+
export * from './agent-time-window.js';
|
|
44
42
|
export * from './scalar-value.js';
|
|
45
43
|
export * from './matrix-window-contract.js';
|
|
46
44
|
export * from './matrix-member-presentation.js';
|