react-semaphor 0.1.537 → 0.1.539
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 +352 -341
- package/dist/assistant-context/index.js +10 -0
- package/dist/assistant-protocol/index.js +104 -0
- package/dist/brand-studio/index.js +35 -31
- package/dist/briefings/index.js +46 -45
- package/dist/chunks/_commonjsHelpers-BkfeUUK-.js +28 -0
- package/dist/chunks/add-to-dashboard-CxtTfISD.js +56 -0
- package/dist/chunks/aggregate-table-row-presentation-BjK9YfMI.js +979 -0
- package/dist/chunks/analytics-base-schemas-BFAoRlkU.js +472 -0
- package/dist/chunks/apply-dashboard-operations-C-iahGka.js +402 -0
- package/dist/chunks/assistant-chat-DgiSuFT4.js +8083 -0
- package/dist/chunks/availability-Bp5Gfu1I.js +44 -0
- package/dist/chunks/{bookmark-state-B-I9BDD0.js → bookmark-state-k7y5SNGf.js} +9 -9
- package/dist/chunks/{braces-8TRlDwDw.js → braces-o9UiRQes.js} +1 -1
- package/dist/chunks/calculated-field-identity-DcBS2NPP.js +2161 -0
- package/dist/chunks/calendar-day-equality-Bpl15IBo.js +487 -0
- package/dist/chunks/class-utils-Df1OVOT1.js +2315 -0
- package/dist/chunks/{field-dependencies-CpRUwr9J.js → common-types-CUf03Htv.js} +65 -58
- package/dist/chunks/context-HD9usB1P.js +349 -0
- package/dist/chunks/conversation-sQiWYUOb.js +16 -0
- package/dist/chunks/csv-utils-GUfKyT1J.js +56 -0
- package/dist/chunks/custom-visual-inputs-BrUOIwln.js +3288 -0
- package/dist/chunks/{dashboard-briefing-launcher-A2uVpHCp.js → dashboard-briefing-launcher-Bl3gCeBR.js} +580 -556
- package/dist/chunks/{dashboard-controls-DxTuVis_.js → dashboard-controls-0EX0HiJt.js} +683 -686
- package/dist/chunks/{common-types-g7yS12Cg.js → dashboard-filter-value-compatibility-D95O4nd7.js} +18 -24
- package/dist/chunks/dashboard-json-6X_2BDiL.js +69 -0
- package/dist/chunks/{dashboard-BPJo-Fnd.js → dashboard-y5BwcvzT.js} +1 -1
- package/dist/chunks/document-dashboard-inputs-BrYYlRVo.js +10678 -0
- package/dist/chunks/document-sheet-utils-C1eEldxs.js +1076 -0
- package/dist/chunks/{edit-dashboard-visual-ByV0OwSp.js → edit-dashboard-visual-Bzchfgga.js} +4744 -4746
- package/dist/chunks/editor-draft-sync-BN5qYHPF.js +15 -0
- package/dist/chunks/filter-value-text-BhWugPWE.js +163 -0
- package/dist/chunks/index-CqMiAkay.js +3164 -0
- package/dist/chunks/index-CuHybtft.js +51 -0
- package/dist/chunks/layout-grid-Bgzth8vd.js +16 -0
- package/dist/chunks/{matrix-analytical-definition-CgBTD6H8.js → matrix-analytical-definition-bcprSe4u.js} +1 -1
- package/dist/chunks/{matrix-card-CAdizkUl.js → matrix-card-CJn1hB5V.js} +13 -12
- package/dist/chunks/matrix-definition-DQDI2okF.js +206 -0
- package/dist/chunks/{matrix-formatter-DJCk8Znf.js → matrix-formatter-DQ8avoIQ.js} +648 -457
- package/dist/chunks/matrix-member-presentation-BNPSDKBG.js +105 -0
- package/dist/chunks/{matrix-operation-contract-BKupLHXL.js → matrix-operation-contract-B8PBF1Gd.js} +134 -133
- package/dist/chunks/{metric-comparison-BKHyvnAy.js → metric-comparison-CojWeLqx.js} +1 -1
- package/dist/chunks/{palette-Cp1hqZtm.js → palette-D10o_yYX.js} +1 -1
- package/dist/chunks/pivot-header-presentation-MkcKnjn3.js +42 -0
- package/dist/chunks/{pivot-result-identity-Bs4tLtLo.js → pivot-result-identity-D6hhcRXi.js} +1 -1
- package/dist/chunks/pivot-result-lifecycle-8qCDmpKc.js +804 -0
- package/dist/chunks/raw-temporal-D61lr48Y.js +1464 -0
- package/dist/chunks/{raw-temporal-contract-mLFS-9wk.js → raw-temporal-contract-C51YG48G.js} +1 -1
- package/dist/chunks/report-preferences-dialog-CWhSbc5_.js +1808 -0
- package/dist/chunks/{report-runtime-context-CG_I0PPW.js → report-runtime-context-B984Nq1E.js} +8 -7
- package/dist/chunks/save-CfJpQQ68.js +21 -0
- package/dist/chunks/saved-dashboard-context-Dqve2jlB.js +566 -0
- package/dist/chunks/{selection-reducer-CiDEtmAq.js → selection-reducer-vKIb_jS6.js} +2 -2
- package/dist/chunks/{semaphor-ready-indicator-CHu1L-lo.js → semaphor-ready-indicator-ldcwmLoY.js} +65803 -62954
- package/dist/chunks/{shelf-drop-preview-context-i-H6DFyU.js → shelf-drop-preview-context-BWxunXTq.js} +199 -196
- package/dist/chunks/{source-entity-resolution-C-oNyYMp.js → source-entity-resolution-CVA1a85c.js} +8 -8
- package/dist/chunks/switch-CvItuC1Q.js +8199 -0
- package/dist/chunks/{temporal-bucket-DlFuhCnT.js → temporal-bucket-D8JF7zKz.js} +86 -71
- package/dist/chunks/{temporal-bucket-contract-D2OuaVZ7.js → temporal-bucket-contract-DaOajRC7.js} +1 -1
- package/dist/chunks/{token-types-DtSJOUjh.js → token-types-bxUxXDX2.js} +1 -1
- package/dist/chunks/{upload-CAIpsti1.js → upload-BFX7apKV.js} +1 -1
- package/dist/chunks/{use-create-flow-overlay-state-Bj63WwHc.js → use-create-flow-overlay-state-RHgzVfcz.js} +331 -339
- package/dist/chunks/{validators-DMSH81OM.js → validators-Ej1DdCXa.js} +1050 -1510
- package/dist/chunks/visual-choice-JiJ-_3bi.js +204 -0
- package/dist/chunks/x-4f5U2XwU.js +100 -0
- package/dist/chunks/{zoned-wall-clock-1qlWCE20.js → zoned-wall-clock-MulfA26h.js} +2 -2
- package/dist/dashboard/index.js +2 -2
- package/dist/dashboard-authoring/index.js +823 -661
- package/dist/data-app-sdk/index.js +32 -30
- package/dist/data-app-sdk-adapters/index.js +23 -22
- package/dist/data-app-sdk-validation/index.js +23 -22
- package/dist/format-utils/index.js +173 -168
- package/dist/index.js +267 -258
- package/dist/layouts/index.js +236 -24
- 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/assistant-context.d.ts +2 -0
- package/dist/types/assistant-protocol.d.ts +2 -0
- package/dist/types/components/assistant/assistant-entry-points.d.ts +18 -0
- package/dist/types/components/assistant/assistant-provider.d.ts +19 -0
- package/dist/types/components/assistant/assistant-store.d.ts +52 -0
- package/dist/types/components/assistant/use-assistant.d.ts +38 -0
- package/dist/types/components/index.d.ts +5 -1
- package/dist/types/components/surfboard/filter/types.d.ts +5 -2
- package/dist/types/index.js +50 -51
- package/dist/types/lib/api/invalidate-token.d.ts +7 -0
- package/dist/types/lib/charts/cartesian-fields.d.ts +64 -0
- package/dist/types/lib/charts/types.d.ts +7 -0
- package/dist/types/lib/dashboard-inputs/dashboard-filter-mapping-storage-transition.d.ts +14 -2
- package/dist/types/lib/dashboard-inputs/dashboard-input-target-context.d.ts +5 -6
- package/dist/types/lib/dashboard-inputs/dashboard-input-values.d.ts +8 -3
- package/dist/types/lib/dashboard-inputs/resolve-dashboard-input-context.d.ts +11 -6
- package/dist/types/lib/dashboard-pagination/dashboard-card-pagination.d.ts +7 -0
- package/dist/types/lib/dashboard-viewer/compatibility-input-storage.d.ts +79 -0
- package/dist/types/lib/dashboard-viewer/viewer-state.d.ts +3 -2
- package/dist/types/lib/document/document-table-data-policy.d.ts +15 -0
- package/dist/types/lib/filter-values/filter-mode.d.ts +22 -0
- package/dist/types/lib/hooks/use-calendar-context.d.ts +5 -0
- package/dist/types/lib/hooks/use-filter-option-browse.d.ts +5 -0
- package/dist/types/lib/hooks/use-text-filter.d.ts +9 -0
- package/dist/types/lib/print/print-inputs.d.ts +4 -2
- package/dist/types/lib/query-context/build-card-query-context.d.ts +12 -4
- package/dist/types/lib/query-context/build-dashboard-execution-snapshot.d.ts +93 -0
- package/dist/types/lib/query-context/card-server-request.d.ts +72 -0
- package/dist/types/lib/query-context/compile-dashboard-card-filters.d.ts +7 -0
- package/dist/types/lib/query-context/describe-card-execution-snapshot.d.ts +56 -0
- package/dist/types/lib/query-context/document-section-card-query.d.ts +45 -0
- package/dist/types/lib/query-context/resolve-runtime-card-filters.d.ts +17 -2
- package/dist/types/lib/stores/dashboard-store.d.ts +34 -11
- package/dist/types/lib/stores/editor-store.d.ts +4 -2
- package/dist/types/lib/types/token-types.d.ts +11 -0
- package/dist/types/lib/utils/card-type-change.d.ts +30 -0
- package/dist/types/lib/utils/comparison-window-caption.d.ts +12 -0
- package/dist/types/lib/utils/filter-default-value-utils.d.ts +13 -2
- package/dist/types/shared/analytics-protocol/applied-constraints.d.ts +74 -0
- package/dist/types/shared/analytics-protocol/contracts.d.ts +3 -0
- package/dist/types/shared/analytics-protocol/filter-field-ownership.d.ts +43 -0
- package/dist/types/shared/analytics-protocol/index.d.ts +3 -0
- package/dist/types/shared/analytics-protocol/matrix-window-contract.d.ts +1 -1
- package/dist/types/shared/analytics-protocol/visual-choice.d.ts +75 -0
- package/dist/types/shared/assistant-context/index.d.ts +9 -0
- package/dist/types/shared/assistant-context/project-context.d.ts +55 -0
- package/dist/types/shared/assistant-context/saved-dashboard-context.d.ts +130 -0
- package/dist/types/shared/assistant-protocol/add-to-dashboard.d.ts +17 -0
- package/dist/types/shared/assistant-protocol/artifact.d.ts +63 -0
- package/dist/types/shared/assistant-protocol/availability.d.ts +39 -0
- package/dist/types/shared/assistant-protocol/context.d.ts +952 -0
- package/dist/types/shared/assistant-protocol/conversation.d.ts +38 -0
- package/dist/types/shared/assistant-protocol/index.d.ts +16 -0
- package/dist/types/shared/assistant-protocol/limits.d.ts +53 -0
- package/dist/types/shared/assistant-protocol/parts.d.ts +140 -0
- package/dist/types/shared/assistant-protocol/request.d.ts +77 -0
- package/dist/types/shared/assistant-protocol/sources.d.ts +27 -0
- package/dist/types/shared/assistant-protocol/token-config.d.ts +32 -0
- package/dist/types/shared/assistant-protocol/transcript.d.ts +40 -0
- package/dist/types/shared/dashboard-authoring/card-query-request.d.ts +112 -0
- package/dist/types/shared/dashboard-authoring/control-execution-contract.d.ts +1794 -0
- package/dist/types/shared/dashboard-authoring/index.d.ts +5 -0
- package/dist/types/shared/dashboard-authoring/new-card.d.ts +10 -0
- package/dist/types/shared/dashboard-authoring/operations/apply-dashboard-operations.d.ts +40 -0
- package/dist/types/shared/dashboard-authoring/resolved-primary-date-field-validation.d.ts +16 -0
- package/dist/types/shared/format-utils/filter-detail.d.ts +70 -0
- package/dist/types/shared/format-utils/filter-value-text.d.ts +15 -0
- package/dist/types/shared/format-utils/index.d.ts +3 -0
- package/dist/types/shared/format-utils/raw-temporal.d.ts +7 -0
- package/dist/types/shared/format-utils/temporal-bucket.d.ts +7 -0
- package/dist/types/shared/layouts/frame-layouts.d.ts +23 -0
- package/dist/types/shared/layouts/index.d.ts +1 -0
- package/package.json +12 -2
- package/dist/chunks/calculated-field-identity-BptYhyOP.js +0 -1326
- package/dist/chunks/calendar-day-equality-BRjN1S9h.js +0 -383
- package/dist/chunks/card-config-utils-BOM1dxCk.js +0 -1150
- package/dist/chunks/constants-DNWVy8Y3.js +0 -9
- package/dist/chunks/dashboard-json-B1dEQu98.js +0 -65
- package/dist/chunks/field-aggregations-CoLzYHeL.js +0 -1229
- package/dist/chunks/index-DTcTAGGM.js +0 -4101
- package/dist/chunks/matrix-continuation-C4sRcjZU.js +0 -72
- package/dist/chunks/matrix-control-sources-DTqcA2_L.js +0 -636
- package/dist/chunks/matrix-definition-D9iShKZI.js +0 -87
- package/dist/chunks/matrix-member-presentation-Ct8GuxHt.js +0 -209
- package/dist/chunks/numeric-presentation-CWu3gunq.js +0 -537
- package/dist/chunks/pivot-header-presentation-CHs2GFrM.js +0 -753
- package/dist/chunks/pivot-result-lifecycle-DQz_gjGu.js +0 -789
- package/dist/chunks/raw-temporal-iMXRK-Qz.js +0 -930
- package/dist/chunks/report-preferences-dialog-DXPjteCU.js +0 -1623
- package/dist/chunks/save-kO6cIaob.js +0 -34
- package/dist/chunks/semantic-format-DiqYeKwU.js +0 -192
- package/dist/chunks/switch-DO8a0EfJ.js +0 -25004
- package/dist/chunks/temporal-input-presentation-BD7YNUzu.js +0 -195
- package/dist/chunks/x-CXDkqdur.js +0 -149
- package/dist/types/lib/class-utils.d.ts +0 -2
- package/dist/types/lib/document/document-input-runtime.d.ts +0 -26
- package/dist/types/lib/utils.d.ts +0 -51
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/common-types-
|
|
1
|
+
import { a, R as s, D as o } from "../chunks/report-preferences-dialog-CWhSbc5_.js";
|
|
2
|
+
import { C as f, E as D } from "../chunks/common-types-CUf03Htv.js";
|
|
3
3
|
export {
|
|
4
4
|
f as CONTROL_CARD_DEFAULT_VALUE,
|
|
5
5
|
a as DisplayFormatPreferencesFields,
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/** Where the panel is: beside a dashboard, or on a page with no dashboard in view. */
|
|
2
|
+
export type AssistantPanelSurface = 'dashboard' | 'none';
|
|
3
|
+
/** Opens and closes the panel. Named after the assistant; no other wording. */
|
|
4
|
+
export declare function AssistantToolbarButton(): import("react").JSX.Element | null;
|
|
5
|
+
/**
|
|
6
|
+
* The panel. Beside a dashboard (`surface="dashboard"`), the chat mounts on
|
|
7
|
+
* the first open and stays mounted while the panel is closed, so its
|
|
8
|
+
* conversation and draft are kept; it shows beside the card editor too, where
|
|
9
|
+
* the draft being edited is the card in focus (Phase 5, D5-1); unmounting the
|
|
10
|
+
* provider ends them. Hidden with a class, not `Activity`: a hidden Activity
|
|
11
|
+
* would run the chat's cleanup and stop an answer the viewer is still waiting
|
|
12
|
+
* for. With no dashboard in view (`surface="none"`, the host's assistant
|
|
13
|
+
* page, D3c-9) it is always shown, in full page, filling the host's
|
|
14
|
+
* positioned container.
|
|
15
|
+
*/
|
|
16
|
+
export declare function AssistantPanel({ surface }?: {
|
|
17
|
+
surface?: AssistantPanelSurface;
|
|
18
|
+
}): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { AuthToken } from '../../lib/types/common-types.js';
|
|
3
|
+
export declare function AssistantProvider({ children, authToken, }: {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
/**
|
|
6
|
+
* The dashboard's token, for a host that mounts the provider above its own
|
|
7
|
+
* toolbar and the dashboard. Null while there is none (the assistant is
|
|
8
|
+
* unavailable). Omitted inside the dashboard, which reads its own token.
|
|
9
|
+
*/
|
|
10
|
+
authToken?: AuthToken | null;
|
|
11
|
+
}): import("react").JSX.Element;
|
|
12
|
+
/**
|
|
13
|
+
* The dashboard's assistant: the host's instance when the host mounted a
|
|
14
|
+
* provider above it, otherwise one of its own. One instance per caller, never
|
|
15
|
+
* two (L3-6).
|
|
16
|
+
*/
|
|
17
|
+
export declare function AssistantScope({ children }: {
|
|
18
|
+
children: ReactNode;
|
|
19
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { StoreApi } from 'zustand/vanilla';
|
|
2
|
+
import { AssistantLayout } from '../../shared/assistant-protocol/conversation.js';
|
|
3
|
+
/**
|
|
4
|
+
* One assistant instance's panel state (analytics agent Plan 1, ledger
|
|
5
|
+
* D3a-10, L3-4). Created by the provider for one caller, never at module
|
|
6
|
+
* level: a different caller gets a new store, so nothing here needs a reset.
|
|
7
|
+
* The conversation itself (messages, its id, the answer streaming) lives in
|
|
8
|
+
* the chat, which mounts on first open and stays mounted while the panel is
|
|
9
|
+
* closed.
|
|
10
|
+
*/
|
|
11
|
+
/** The card the user asked about, on the sheet it was asked on. */
|
|
12
|
+
export type AssistantFocus = {
|
|
13
|
+
cardId: string;
|
|
14
|
+
sheetId: string | null;
|
|
15
|
+
};
|
|
16
|
+
export type AssistantPanelState = {
|
|
17
|
+
isOpen: boolean;
|
|
18
|
+
/** True from the first open: the chat stays mounted (hidden while closed), so its conversation is kept. */
|
|
19
|
+
mounted: boolean;
|
|
20
|
+
focus: AssistantFocus | undefined;
|
|
21
|
+
/** Counts Ask actions, so the composer takes focus on each one. */
|
|
22
|
+
askCount: number;
|
|
23
|
+
/** Where the panel shows (AG-D21, D3c-4): the viewer's saved choice, else the token's default, else docked right. */
|
|
24
|
+
layout: AssistantLayout;
|
|
25
|
+
/** The docked panel's width in pixels: the viewer's saved choice, else the default. */
|
|
26
|
+
width: number;
|
|
27
|
+
};
|
|
28
|
+
export type AssistantStore = {
|
|
29
|
+
store: StoreApi<AssistantPanelState>;
|
|
30
|
+
toggle(): void;
|
|
31
|
+
close(): void;
|
|
32
|
+
askAbout(focus: AssistantFocus): void;
|
|
33
|
+
clearFocus(): void;
|
|
34
|
+
setLayout(layout: AssistantLayout): void;
|
|
35
|
+
/** Sets the docked width, clamped; `save` keeps it in this browser (at the end of a drag, on each key). */
|
|
36
|
+
setWidth(width: number, options?: {
|
|
37
|
+
save?: boolean;
|
|
38
|
+
}): void;
|
|
39
|
+
};
|
|
40
|
+
/** The viewer's layout choice, kept in this browser (AG-D21). */
|
|
41
|
+
export declare const ASSISTANT_LAYOUT_STORAGE_KEY = "semaphor.assistant.layout";
|
|
42
|
+
/** The viewer's docked width, kept in this browser. */
|
|
43
|
+
export declare const ASSISTANT_WIDTH_STORAGE_KEY = "semaphor.assistant.width";
|
|
44
|
+
/** The docked panel's width: the default, and the range a viewer can resize it within. */
|
|
45
|
+
export declare const ASSISTANT_WIDTH: {
|
|
46
|
+
readonly default: 360;
|
|
47
|
+
readonly min: 320;
|
|
48
|
+
readonly max: 720;
|
|
49
|
+
};
|
|
50
|
+
export declare function clampAssistantWidth(width: number, maxForArea?: number): number;
|
|
51
|
+
/** `defaultLayout`: the token's `config.assistant.layout`, an embed's default (AG-D21); the viewer's own choice wins. */
|
|
52
|
+
export declare function createAssistantStore(defaultLayout?: AssistantLayout): AssistantStore;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { AssistantLayout } from '../../shared/assistant-protocol/conversation.js';
|
|
2
|
+
import { AssistantStore } from './assistant-store.js';
|
|
3
|
+
/**
|
|
4
|
+
* The assistant instance a provider holds, and the hooks that read it
|
|
5
|
+
* (analytics agent Plan 1, spec 5). Light: imported by the toolbar, the card
|
|
6
|
+
* menu and the panel.
|
|
7
|
+
*/
|
|
8
|
+
/** One caller's assistant. `id` keys the chat: a new caller mounts a new chat. */
|
|
9
|
+
export type AssistantInstance = AssistantStore & {
|
|
10
|
+
id: number;
|
|
11
|
+
callerKey: string;
|
|
12
|
+
assistantName: string;
|
|
13
|
+
};
|
|
14
|
+
export type AssistantContextValue = {
|
|
15
|
+
instance: AssistantInstance;
|
|
16
|
+
available: boolean;
|
|
17
|
+
};
|
|
18
|
+
export declare const AssistantInstanceContext: import('react').Context<AssistantContextValue | null>;
|
|
19
|
+
/** The instance, for the panel and the chat. Undefined outside a provider. */
|
|
20
|
+
export declare function useAssistantInstance(): AssistantContextValue | null;
|
|
21
|
+
export type UseAssistantResult = {
|
|
22
|
+
available: boolean;
|
|
23
|
+
isOpen: boolean;
|
|
24
|
+
assistantName: string;
|
|
25
|
+
layout: AssistantLayout;
|
|
26
|
+
toggle(): void;
|
|
27
|
+
close(): void;
|
|
28
|
+
setLayout(layout: AssistantLayout): void;
|
|
29
|
+
askAbout(cardId: string): void;
|
|
30
|
+
clearSelectedCard(): void;
|
|
31
|
+
};
|
|
32
|
+
/** Read where there is no provider; never written. */
|
|
33
|
+
export declare const NO_ASSISTANT_STORE: import('zustand').StoreApi<import('./assistant-store.js').AssistantPanelState>;
|
|
34
|
+
/**
|
|
35
|
+
* For the toolbar button and Ask. Outside a provider, or when the assistant
|
|
36
|
+
* is unavailable, `available` is false and every entry point renders nothing.
|
|
37
|
+
*/
|
|
38
|
+
export declare function useAssistant(): UseAssistantResult;
|
|
@@ -33,6 +33,10 @@ export * from './editor/editor-aside/utils.js';
|
|
|
33
33
|
export * from '../lib/hooks/use-editor-aside.js';
|
|
34
34
|
export { VisualEditingControls } from './editor/editor-main/visual-editing-controls.js';
|
|
35
35
|
export { AdvancedModeToggle } from './editor/editor-main/advanced-mode-toggle.js';
|
|
36
|
+
export { AssistantProvider } from './assistant/assistant-provider.js';
|
|
37
|
+
export { AssistantPanel, AssistantToolbarButton } from './assistant/assistant-entry-points.js';
|
|
38
|
+
export type { AssistantPanelSurface } from './assistant/assistant-entry-points.js';
|
|
39
|
+
export { useAssistant } from './assistant/use-assistant.js';
|
|
36
40
|
export * from '../lib/types/common-types.js';
|
|
37
41
|
export * from '../lib/stores/dashboard-store.js';
|
|
38
42
|
export * from '../lib/stores/editor-store.js';
|
|
@@ -42,7 +46,7 @@ export { normalizeDashboardForDirtyCheck, serializeDashboardForDirtyCheck, } fro
|
|
|
42
46
|
export { cloneDeep } from '../lib/object-utils.js';
|
|
43
47
|
export { Combobox } from './ui-custom/combo-box.js';
|
|
44
48
|
export * from './providers/semaphor-query-provider.js';
|
|
45
|
-
export { invalidateToken } from '../lib/
|
|
49
|
+
export { invalidateToken } from '../lib/api/invalidate-token.js';
|
|
46
50
|
export { downloadPdf, downloadDocumentPdf } from '../lib/download-pdf.js';
|
|
47
51
|
export { DashboardExportDialog } from './dashboard/dashboard-export-dialog.js';
|
|
48
52
|
export { DashboardCreateDialogBase, type DashboardCreateDialogBaseProps, } from './dashboard/ai-dashboard-create-dialog.js';
|
|
@@ -75,6 +75,11 @@ export type FilterFieldMeta = Pick<Field, 'name' | 'qualifiedFieldName'> & Parti
|
|
|
75
75
|
nativeDataType?: string;
|
|
76
76
|
expression?: string;
|
|
77
77
|
calculatedFormula?: CalculatedFieldFormula;
|
|
78
|
+
/**
|
|
79
|
+
* The dashboard input's title, as the viewer sees it: how evidence names
|
|
80
|
+
* the condition (ledger P3-100). Never used to resolve the field.
|
|
81
|
+
*/
|
|
82
|
+
label?: string;
|
|
78
83
|
};
|
|
79
84
|
export type FilterSemanticContext = {
|
|
80
85
|
semanticDomainId?: string;
|
|
@@ -218,8 +223,6 @@ export type FilterStorageOptions = {
|
|
|
218
223
|
setInlineFilterValue?: (filterValue: TFilterValue) => void;
|
|
219
224
|
/** Optional inline filter value remover override for editor-scoped state. */
|
|
220
225
|
removeInlineFilterValue?: (filterId: string) => void;
|
|
221
|
-
/** Optional inline filter mode setter override for non-dashboard state. */
|
|
222
|
-
setInlineFilterMode?: (filterId: string, filterMode: 'include' | 'exclude') => void;
|
|
223
226
|
/** Sheet kind of the target; inferred from the dashboard when omitted. */
|
|
224
227
|
sheetKind?: 'dashboard' | 'document';
|
|
225
228
|
/** Document section id when the Input is local to one section. */
|
package/dist/types/index.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { C as s, E as r } from "../chunks/common-types-
|
|
2
|
-
import { C as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { D as ae } from "../chunks/report-runtime-context-CG_I0PPW.js";
|
|
1
|
+
import { C as s, E as r, c as l, g as o, f as i, b as n, e as d, d as m, a as u, h as c, r as E } from "../chunks/common-types-CUf03Htv.js";
|
|
2
|
+
import { C as p, D as T, L as D, P as A, e as I, g as _, j as F, h as S, k as b, d as L, b as f, i as N, c as R, n as g, f as h } from "../chunks/validators-Ej1DdCXa.js";
|
|
3
|
+
import { D as M } from "../chunks/token-types-bxUxXDX2.js";
|
|
4
|
+
import { B as O, j as V, V as k, a as w, h as U, g as B, i as K, f as z, e as v, m as P, n as Y, p as G, b as Q, c as j, d as q, r as W, t as J } from "../chunks/bookmark-state-k7y5SNGf.js";
|
|
5
|
+
import { r as H, a as Z } from "../chunks/pivot-result-identity-D6hhcRXi.js";
|
|
6
|
+
import { D as ee } from "../chunks/report-runtime-context-B984Nq1E.js";
|
|
8
7
|
const e = [
|
|
9
8
|
"concatenate",
|
|
10
9
|
"conditional-category",
|
|
@@ -38,52 +37,52 @@ const e = [
|
|
|
38
37
|
"is-blank"
|
|
39
38
|
];
|
|
40
39
|
export {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
O as BOOKMARK_STATE_VERSION,
|
|
41
|
+
V as BOOKMARK_VISIBILITIES,
|
|
42
|
+
p as CALCULATED_FIELD_ENTITY_MARKER,
|
|
44
43
|
e as CALCULATED_FIELD_TEMPLATE_IDS,
|
|
45
44
|
s as CONTROL_CARD_DEFAULT_VALUE,
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
T as DATE_FORMAT_VALUES,
|
|
46
|
+
ee as DEFAULT_CALENDAR_CONTEXT,
|
|
48
47
|
M as DEFAULT_SEMANTIC_DOMAIN_ACCESS,
|
|
49
48
|
r as EMPTY_SELECTION,
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
49
|
+
D as LEGACY_CALCULATED_FIELD_ENTITY_MARKER,
|
|
50
|
+
A as PivotMarkerEnum,
|
|
51
|
+
k as VIEWER_LIMITS,
|
|
52
|
+
w as VIEWER_TABLE_SETTINGS_VERSION,
|
|
53
|
+
l as collectDatasetNamesFromExplorerField,
|
|
54
|
+
o as collectDatasetNamesFromFilterGroup,
|
|
55
|
+
i as collectExecutionDatasetNamesFromExplorerField,
|
|
56
|
+
n as collectPreferredDatasetNamesFromExplorerField,
|
|
57
|
+
d as collectQualifiedDatasetNamesFromExplorerField,
|
|
58
|
+
m as datasetRefFromSource,
|
|
59
|
+
u as dependencyDisplayIdentity,
|
|
60
|
+
I as getCalculatedFieldComputeStage,
|
|
61
|
+
U as getCustomizableTableCardIds,
|
|
62
|
+
_ as getFieldRuntimeColumnName,
|
|
63
|
+
B as getSortableTableCardIds,
|
|
64
|
+
F as hasCalculatedFieldMarker,
|
|
65
|
+
S as hasCalculatedFormulaInputs,
|
|
66
|
+
b as hasSyntheticCalculatedFieldOwner,
|
|
67
|
+
c as humanizeDatasetName,
|
|
68
|
+
L as inspectCalculatedField,
|
|
69
|
+
f as isCalculatedDimension,
|
|
70
|
+
N as isCalculatedMetric,
|
|
71
|
+
R as isDerivedField,
|
|
72
|
+
K as isEmptyViewerTableSettings,
|
|
73
|
+
z as isTableCardCustomizable,
|
|
74
|
+
v as isTableCardSortable,
|
|
75
|
+
P as measureJsonBytes,
|
|
76
|
+
g as normalizeCalculatedFieldRepresentation,
|
|
77
|
+
Y as normalizeViewerTableSettings,
|
|
78
|
+
G as parseBookmarkState,
|
|
79
|
+
Q as parseTableColumnId,
|
|
80
|
+
j as parseViewerTableSettings,
|
|
81
|
+
q as parseViewerTableSettingsMap,
|
|
82
|
+
W as readBookmarkState,
|
|
83
|
+
E as resolveFieldDatasetDependencies,
|
|
84
|
+
H as resolveQueryColumnKeyMapEntry,
|
|
85
|
+
Z as resolveUniqueQueryColumnKeyMapEntry,
|
|
86
|
+
h as shouldDropInheritedCalculationAggregate,
|
|
87
|
+
J as toTableColumnId
|
|
89
88
|
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Invalidates the dashboard's current token on the server. Apart from
|
|
3
|
+
* `lib/utils` because it reads the dashboard store: the pure helpers there are
|
|
4
|
+
* loaded by server entries (`react-semaphor/assistant-context`), which must
|
|
5
|
+
* not load the store.
|
|
6
|
+
*/
|
|
7
|
+
export declare function invalidateToken(apiServiceUrl: string): Promise<any>;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { TCard } from '../types/common-types.js';
|
|
2
|
+
import { CardConfig, Field, QueryColumnKeyMap } from '../types/explorer-types.js';
|
|
3
|
+
import { CartesianTemporalPresentation } from '../formatters/cartesian-temporal-presentation.js';
|
|
4
|
+
export declare const CARTESIAN_AXIS_PATH_SEPARATOR = " \u00B7 ";
|
|
5
|
+
export type CartesianFieldRoles = {
|
|
6
|
+
/** Result keys for the category path, outer to inner. */
|
|
7
|
+
axisKeys: string[];
|
|
8
|
+
/** Result key whose values become series through a local pivot. */
|
|
9
|
+
seriesKey?: string;
|
|
10
|
+
/** Result keys plotted as values, in display order. */
|
|
11
|
+
valueKeys: string[];
|
|
12
|
+
};
|
|
13
|
+
export declare function usesCartesianFieldRoles(cardType?: string): boolean;
|
|
14
|
+
/**
|
|
15
|
+
* The saved Sort setting applies only where the editor offers it, so a value
|
|
16
|
+
* left over from switching chart type has no effect.
|
|
17
|
+
*/
|
|
18
|
+
export declare function supportsChartSort(cardType?: string): boolean;
|
|
19
|
+
export declare function isStackedCartesianChartType(cardType?: string): boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Legacy stacked shape: exactly two Rows fields and an empty Pivot zone render
|
|
22
|
+
* the second Rows field as the series. Saved dashboards depend on this, so it
|
|
23
|
+
* is kept for that exact shape only and never extended to more Rows fields.
|
|
24
|
+
*/
|
|
25
|
+
export declare function resolveLegacySeriesGroupField(cardConfig: CardConfig | undefined): Field | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* Resolve cartesian roles for a chart.
|
|
28
|
+
*
|
|
29
|
+
* `keys` are the result keys in display order (comparison internals removed,
|
|
30
|
+
* temporal axis first), as builders already compute them.
|
|
31
|
+
*/
|
|
32
|
+
export declare function resolveCartesianFieldRoles(input: {
|
|
33
|
+
card: TCard;
|
|
34
|
+
cardType: string;
|
|
35
|
+
keys: readonly string[];
|
|
36
|
+
columnKeyMap?: QueryColumnKeyMap;
|
|
37
|
+
isComparison: boolean;
|
|
38
|
+
}): CartesianFieldRoles;
|
|
39
|
+
/**
|
|
40
|
+
* Order records so bars sharing an outer axis value are contiguous, keeping
|
|
41
|
+
* first-appearance order of groups and query order within a group. With a sort
|
|
42
|
+
* direction, groups are ordered by group total and records within each group
|
|
43
|
+
* by record total. Single-level charts without a sort keep their order.
|
|
44
|
+
*/
|
|
45
|
+
export declare function orderCartesianRecordsByAxisPath<T extends Record<string, unknown>>(input: {
|
|
46
|
+
records: readonly T[];
|
|
47
|
+
axisKeys: readonly string[];
|
|
48
|
+
valueKeys: readonly string[];
|
|
49
|
+
sortChart?: 'asc' | 'desc' | 'none';
|
|
50
|
+
}): T[];
|
|
51
|
+
/**
|
|
52
|
+
* The one rule for a missing category on a chart axis: only null, undefined
|
|
53
|
+
* and empty text are missing, so `0` and `false` stay categories of their own
|
|
54
|
+
* (ledger P4-20; analytics agent Plan 1).
|
|
55
|
+
*/
|
|
56
|
+
export declare function isMissingCategory(value: unknown): boolean;
|
|
57
|
+
/** One level of a multi-level path. */
|
|
58
|
+
export declare function formatAxisPathLevel(value: unknown, columnKey: string, temporalPresentation?: CartesianTemporalPresentation): string;
|
|
59
|
+
/**
|
|
60
|
+
* Axis labels for the category path. One-level paths match `getXaxisLabels`;
|
|
61
|
+
* deeper paths join each formatted level with ` · `. Both read a missing
|
|
62
|
+
* category by `isMissingCategory`.
|
|
63
|
+
*/
|
|
64
|
+
export declare function formatCartesianAxisPathLabels(records: readonly Record<string, unknown>[], axisKeys: readonly string[], temporalPresentation?: CartesianTemporalPresentation): unknown[];
|
|
@@ -6,6 +6,7 @@ import { QueryColumnKeyMap } from '../types/explorer-types.js';
|
|
|
6
6
|
import { SemaphorResultColumn } from '../../shared/analytics-protocol/index.js';
|
|
7
7
|
import { PresentationExecutionSnapshot } from '../../shared/format-utils/index.js';
|
|
8
8
|
import { CartesianTemporalPresentation } from '../formatters/cartesian-temporal-presentation.js';
|
|
9
|
+
import { CartesianFieldRoles } from './cartesian-fields.js';
|
|
9
10
|
export type ChartConfigParams = {
|
|
10
11
|
card: TCard;
|
|
11
12
|
data: any[];
|
|
@@ -31,6 +32,12 @@ export type ChartConfigParams = {
|
|
|
31
32
|
isDevMode?: boolean;
|
|
32
33
|
comparisonMetadata?: ComparisonMetadataMap;
|
|
33
34
|
numericPresentation?: ChartNumericPresentationContext;
|
|
35
|
+
/**
|
|
36
|
+
* Cartesian roles (axis, series, values) from a caller without saved Rows
|
|
37
|
+
* and Pivot fields, such as an assistant answer's result. Without it, roles
|
|
38
|
+
* come from the card's fields, or by position for an SQL card.
|
|
39
|
+
*/
|
|
40
|
+
fieldRoles?: CartesianFieldRoles;
|
|
34
41
|
};
|
|
35
42
|
export type BlurEffectProps = {
|
|
36
43
|
chart: Chart;
|
|
@@ -12,7 +12,14 @@ export type DashboardFilterStorageState = {
|
|
|
12
12
|
};
|
|
13
13
|
export type DashboardFilterAuthoringSettingsUpdate = {
|
|
14
14
|
forceSelection?: boolean;
|
|
15
|
-
/**
|
|
15
|
+
/**
|
|
16
|
+
* The caller changed the default its target loads. Filter settings start
|
|
17
|
+
* from the target's saved default (`resolveAuthoredFilterDefaultFields`),
|
|
18
|
+
* which can differ from the definition for a scoped Input or an overlay
|
|
19
|
+
* entry, so they say so; callers that start from the definition leave it
|
|
20
|
+
* unset and the owner compares definitions. Also resets a saved slot that
|
|
21
|
+
* has no backing default.
|
|
22
|
+
*/
|
|
16
23
|
defaultValueChanged?: boolean;
|
|
17
24
|
defaultComparisonChanged?: boolean;
|
|
18
25
|
defaultComparisonSelection?: GlobalDateComparisonSelection;
|
|
@@ -36,7 +43,12 @@ export type DashboardFilterOptionPolicy = {
|
|
|
36
43
|
/** Resolves the policy an authoring transaction should persist. */
|
|
37
44
|
export declare function resolveFilterOptionPolicy(current: DashboardFilterOptionPolicy | undefined, settings: DashboardFilterAuthoringSettingsUpdate | undefined): DashboardFilterOptionPolicy;
|
|
38
45
|
export declare function hasFilterOptionPolicy(policy: DashboardFilterOptionPolicy | undefined): boolean;
|
|
39
|
-
/**
|
|
46
|
+
/**
|
|
47
|
+
* Callers submit edits; the owner decides whether defaults must be reseeded.
|
|
48
|
+
* A default change (values, date window or mode) writes the target's saved
|
|
49
|
+
* default and live value; the definition, which the caller submits whole,
|
|
50
|
+
* holds the last authored default.
|
|
51
|
+
*/
|
|
40
52
|
export declare function resolveFilterAuthoringSettings(previous: TFilter | undefined, filter: TFilter, settings: DashboardFilterAuthoringSettingsUpdate | undefined, target: DashboardInputRuntimeTarget, calendar?: DefaultsCalendar): {
|
|
41
53
|
target: DashboardInputRuntimeTarget;
|
|
42
54
|
defaultValueChanged: boolean;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { CalendarContext } from '../../shared/report-runtime-context/index.js';
|
|
1
2
|
import { ControlDefinition, NormalizedDashboardInput, NormalizedFilterDashboardInput, TCard, TDashboard } from '../types/common-types.js';
|
|
2
3
|
import { TFilter, TFilterValue } from '../../components/surfboard/filter/types.js';
|
|
3
|
-
import {
|
|
4
|
+
import { DashboardInputRuntimeValues } from './resolve-dashboard-input-context.js';
|
|
4
5
|
/**
|
|
5
6
|
* The Input target context: one resolved view of "what is in scope" for a
|
|
6
7
|
* filter whose options are browsed, searched, label-resolved or authored.
|
|
@@ -71,7 +72,6 @@ export type DashboardInputTargetContext = {
|
|
|
71
72
|
definitions: ControlDefinition[];
|
|
72
73
|
values: Record<string, unknown>;
|
|
73
74
|
};
|
|
74
|
-
resolveMode: DashboardInputResolveMode;
|
|
75
75
|
validation: DashboardInputValidationPolicy;
|
|
76
76
|
/** Inputs excluded from this context, each with its reason. */
|
|
77
77
|
excluded: DashboardInputTargetExclusion[];
|
|
@@ -85,15 +85,15 @@ export type BuildDashboardInputTargetContextInput = {
|
|
|
85
85
|
/** The card a card-local target belongs to; lifts its inline inputs. */
|
|
86
86
|
card?: TCard | null;
|
|
87
87
|
runtimeValues: DashboardInputRuntimeValues;
|
|
88
|
-
resolveMode?: DashboardInputResolveMode;
|
|
89
88
|
validation?: DashboardInputValidationPolicy;
|
|
90
|
-
|
|
89
|
+
/** The report calendar input defaults resolve in (CQ-D8); null only before the report context loads. */
|
|
90
|
+
calendar: CalendarContext | null;
|
|
91
91
|
};
|
|
92
92
|
export declare class DashboardInputTargetContextError extends Error {
|
|
93
93
|
readonly exclusions: DashboardInputTargetExclusion[];
|
|
94
94
|
constructor(exclusions: DashboardInputTargetExclusion[]);
|
|
95
95
|
}
|
|
96
|
-
export declare function buildDashboardInputTargetContext({ dashboard, filter, scope: requestedScope, card, runtimeValues,
|
|
96
|
+
export declare function buildDashboardInputTargetContext({ dashboard, filter, scope: requestedScope, card, runtimeValues, validation, calendar, }: BuildDashboardInputTargetContextInput): DashboardInputTargetContext;
|
|
97
97
|
/**
|
|
98
98
|
* An explicit context for surfaces that inject their own scope (explorer
|
|
99
99
|
* field probes, captured execution). Nothing is read from a store; the
|
|
@@ -106,7 +106,6 @@ export declare function createExplicitDashboardInputTargetContext(params: {
|
|
|
106
106
|
values?: TFilterValue[];
|
|
107
107
|
adHocValues?: TFilterValue[];
|
|
108
108
|
controls?: DashboardInputTargetContext['controls'];
|
|
109
|
-
resolveMode?: DashboardInputResolveMode;
|
|
110
109
|
target?: NormalizedFilterDashboardInput;
|
|
111
110
|
}): DashboardInputTargetContext;
|
|
112
111
|
/**
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CalendarContext } from '../../shared/report-runtime-context/index.js';
|
|
1
2
|
import { TFilterValue } from '../../components/surfboard/filter/types.js';
|
|
2
3
|
import { DashboardInput, NormalizedDashboardInput, DashboardInputSlot, DashboardInputValues, TDashboard } from '../types/common-types.js';
|
|
3
4
|
import { GlobalDateComparisonSelection } from '../../shared/analytics-protocol/index.js';
|
|
@@ -22,7 +23,8 @@ export declare function hydrateAuthoredDashboardInputSlot(params: {
|
|
|
22
23
|
input: NormalizedDashboardInput;
|
|
23
24
|
runtimeValues?: DashboardInputValues;
|
|
24
25
|
target: DashboardInputRuntimeTarget;
|
|
25
|
-
|
|
26
|
+
/** The report calendar a default resolves in; null only before the report context loads (CQ-D8). */
|
|
27
|
+
calendar: CalendarContext | null;
|
|
26
28
|
}): DashboardInputSlot | undefined;
|
|
27
29
|
/** Materialize protected empty slots at writes using the same policy as reads.
|
|
28
30
|
* Missing scoped slots may still inherit defaults lazily until first use.
|
|
@@ -30,13 +32,16 @@ export declare function hydrateAuthoredDashboardInputSlot(params: {
|
|
|
30
32
|
export declare function restoreForcedDashboardInputValues(params: {
|
|
31
33
|
dashboard: Pick<TDashboard, 'inputs' | 'filters' | 'defaultInputValues'>;
|
|
32
34
|
runtimeValues: DashboardInputValues;
|
|
33
|
-
|
|
35
|
+
/** The report calendar forced defaults resolve in; null only before the report context loads (CQ-D8). */
|
|
36
|
+
calendar: CalendarContext | null;
|
|
34
37
|
}): DashboardInputValues;
|
|
35
38
|
export declare function setDashboardInputRuntimeComparisonSelection(values: DashboardInputValues, input: Pick<DashboardInput, 'id' | 'runtimeScope'>, target: DashboardInputRuntimeTarget, comparisonSelection: GlobalDateComparisonSelection | undefined): DashboardInputValues;
|
|
36
39
|
export declare function setDashboardInputRuntimeValueAspect(values: DashboardInputValues, input: Pick<DashboardInput, 'id' | 'runtimeScope'>, target: DashboardInputRuntimeTarget, valueAspect: Extract<DashboardInputSlot, {
|
|
37
40
|
status: 'set' | 'cleared';
|
|
38
41
|
}>): DashboardInputValues;
|
|
39
|
-
export declare function getBackingDefaultSlot(input: NormalizedDashboardInput,
|
|
42
|
+
export declare function getBackingDefaultSlot(input: NormalizedDashboardInput,
|
|
43
|
+
/** The report calendar the default resolves in; null only before the report context loads (CQ-D8). */
|
|
44
|
+
calendar: CalendarContext | null): DashboardInputSlot | undefined;
|
|
40
45
|
export declare function createFilterDashboardInputSlot(filterValue: TFilterValue | undefined): DashboardInputSlot | undefined;
|
|
41
46
|
export declare function createControlDashboardInputSlot(value: unknown): DashboardInputSlot | undefined;
|
|
42
47
|
export declare function cloneDashboardInputValues(values: DashboardInputValues | undefined): DashboardInputValues;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CalendarContext } from '../../shared/report-runtime-context/index.js';
|
|
1
2
|
import { CardViewStateMap } from '../dashboard-view-state/index.js';
|
|
2
3
|
import { TFilterValue } from '../../components/surfboard/filter/types.js';
|
|
3
4
|
import { DashboardInputValues, NormalizedDashboardInput, ResolvedDashboardInput, ResolvedDashboardInputContext, TCard, TDashboard } from '../types/common-types.js';
|
|
@@ -5,7 +6,6 @@ import { DashboardInputRuntimeTarget } from './dashboard-input-values.js';
|
|
|
5
6
|
import { doesDashboardInputApplyToTarget } from './dashboard-input-scope.js';
|
|
6
7
|
import { TransientInputContext } from './transient-input-context.js';
|
|
7
8
|
export { doesDashboardInputApplyToTarget };
|
|
8
|
-
export type DashboardInputResolveMode = 'interactive' | 'editor' | 'print' | 'schedule' | 'export';
|
|
9
9
|
export type DashboardInputRuntimeValues = {
|
|
10
10
|
dashboardInputValues?: DashboardInputValues;
|
|
11
11
|
filterValues?: TFilterValue[];
|
|
@@ -32,10 +32,15 @@ export type ResolveDashboardInputContextInput = {
|
|
|
32
32
|
* would show or query the destination without what the viewer drilled on.
|
|
33
33
|
*/
|
|
34
34
|
transientContexts: readonly TransientInputContext[] | undefined;
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
/**
|
|
36
|
+
* The viewer's report calendar, from report preferences (zone, week start,
|
|
37
|
+
* fiscal year, anchor): an input's default resolves in it (card query
|
|
38
|
+
* assembly CQ-D8). Required so that every caller passes it; null only
|
|
39
|
+
* before the report context loads.
|
|
40
|
+
*/
|
|
41
|
+
calendar: CalendarContext | null;
|
|
37
42
|
};
|
|
38
|
-
export declare function resolveDashboardInputContext({ dashboard, sheetId, card, sectionId, sheetKind, runtimeValues: authoredRuntimeValues, transientContexts,
|
|
43
|
+
export declare function resolveDashboardInputContext({ dashboard, sheetId, card, sectionId, sheetKind, runtimeValues: authoredRuntimeValues, transientContexts, calendar, }: ResolveDashboardInputContextInput): ResolvedDashboardInputContext;
|
|
39
44
|
/**
|
|
40
45
|
* The Global Date rule: exactly one Global Date input may exist. Returns every
|
|
41
46
|
* Global Date input after the first, in order. The strict resolver fails on
|
|
@@ -48,8 +53,8 @@ export declare function resolveDashboardInput(params: {
|
|
|
48
53
|
input: NormalizedDashboardInput;
|
|
49
54
|
runtimeValues: ResolveDashboardInputContextInput['runtimeValues'];
|
|
50
55
|
target: DashboardInputRuntimeTarget;
|
|
51
|
-
|
|
52
|
-
|
|
56
|
+
/** See `ResolveDashboardInputContextInput.calendar`. */
|
|
57
|
+
calendar: CalendarContext | null;
|
|
53
58
|
}): ResolvedDashboardInput;
|
|
54
59
|
export declare function compileDashboardInputQueryPayload({ resolvedInputs, card, }: {
|
|
55
60
|
resolvedInputs: ResolvedDashboardInput[];
|
|
@@ -1,4 +1,11 @@
|
|
|
1
|
+
import { TCard } from '../types/common-types.js';
|
|
1
2
|
import { PaginationConfig, PaginationMetadata } from '../types/explorer-types.js';
|
|
3
|
+
/**
|
|
4
|
+
* The page size a viewer starts a server-paginated card on: the card's saved
|
|
5
|
+
* page size, then its table preference. One owner for the live query and a
|
|
6
|
+
* captured request (the analytics agent's replay of a card, ledger P3-78).
|
|
7
|
+
*/
|
|
8
|
+
export declare function resolveDashboardCardDefaultPageSize(card: TCard): number;
|
|
2
9
|
export type DashboardCardPaginationState = PaginationConfig & {
|
|
3
10
|
queryInputIdentity: string;
|
|
4
11
|
};
|