react-semaphor 0.1.569 → 0.1.571
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/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 +570 -432
- package/dist/briefings/index.js +2 -2
- package/dist/chunks/appearance-context-BwBp25ZG.js +162 -0
- package/dist/chunks/appearance-runtime-provider-BRHYELkC.js +80 -0
- package/dist/chunks/assistant-chat-SkCraw2C.js +5940 -0
- package/dist/chunks/{bookmark-impact-Czg6FGt5.js → bookmark-impact-DCYD-6Fr.js} +1 -1
- package/dist/chunks/brand-BoUV0iHF.js +54 -0
- package/dist/chunks/{card-filter-builder-BS982X7x.js → card-filter-builder-D-aSYpyr.js} +72 -72
- package/dist/chunks/{comparison-window-caption-lLTgzOkM.js → comparison-window-caption-PtcDWvkN.js} +2 -2
- package/dist/chunks/{dashboard-BiYSbxZv.js → dashboard-B_w_ekUz.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-Bdj7luOr.js → dashboard-briefing-launcher-_g1m2tJ3.js} +183 -182
- package/dist/chunks/{dashboard-controls-TViDsnb8.js → dashboard-controls-CY0gbcCt.js} +285 -280
- package/dist/chunks/{dashboard-json-Dg9dQd9U.js → dashboard-json-DsM79yem.js} +3 -3
- package/dist/chunks/{dates-BsPrWZIP.js → dates-RSEzJ9N7.js} +13 -12
- package/dist/chunks/edit-9df1zOWe.js +226 -0
- package/dist/chunks/{edit-dashboard-visual-C6hoIeEJ.js → edit-dashboard-visual-cX0FM-4i.js} +2256 -2268
- package/dist/chunks/{filter-reach-copy-hcQ4os0u.js → filter-reach-copy-thzt25Rc.js} +1303 -1226
- package/dist/chunks/{filter-value-text-CVxEEDVl.js → filter-value-text-DvvSNlho.js} +1 -1
- package/dist/chunks/index-BVKzKl5d.js +90 -0
- package/dist/chunks/{index-RNaTnE3m.js → index-CV_Kzou0.js} +233 -223
- package/dist/chunks/{index-G4q89J6O.js → index-y3HUzRNk.js} +61 -60
- package/dist/chunks/{layout-grid-BIcoFfdS.js → layout-grid-8rR-LPTk.js} +1 -1
- package/dist/chunks/{list-filter-C6tYkHyv.js → list-filter-C1-uTgjR.js} +1 -1
- package/dist/chunks/paintbrush-aR17Z3C9.js +27 -0
- package/dist/chunks/{palette-NjHOE_6B.js → palette-a5FCZKFI.js} +1 -1
- package/dist/chunks/{_commonjsHelpers-Bid1ZNYj.js → pickers-DkqmtnTL.js} +179 -166
- package/dist/chunks/{pivot-result-contract-expectations-DkmueDTW.js → pivot-result-contract-expectations-C-HnUKYe.js} +1 -1
- package/dist/chunks/{report-preferences-dialog-Xc8_GFju.js → report-preferences-dialog-B_GXs91t.js} +79 -79
- package/dist/chunks/{resolve-dashboard-input-context-KqvcLcTM.js → resolve-dashboard-input-context-Lkbwycwe.js} +5179 -5391
- package/dist/chunks/resolver-DG_tfEpt.js +156 -0
- package/dist/chunks/{save-C6VmEJTA.js → save-D985VvYp.js} +1 -1
- package/dist/chunks/{saved-dashboard-context-BeXXyoD4.js → saved-dashboard-context-DC_TEd6y.js} +3 -3
- package/dist/chunks/schema-C9NPiIru.js +2568 -0
- package/dist/chunks/{semaphor-ready-indicator-BNkaANsG.js → semaphor-ready-indicator-CBQamwQY.js} +33931 -34031
- package/dist/chunks/{shelf-drop-preview-context-C_issPBA.js → shelf-drop-preview-context-Bkjf0XXw.js} +50 -50
- package/dist/chunks/{stored-dashboard-B6_StAty.js → stored-dashboard-C0hekXiI.js} +189 -188
- package/dist/chunks/{code-editor-BsxHzm9u.js → style-sheet-parts-C7qGZuH1.js} +2400 -2036
- package/dist/chunks/{table-export-sheet-BWP2joD1.js → table-export-sheet-CP8zSOhj.js} +1 -1
- package/dist/chunks/{temporal-input-presentation-scSWQXAB.js → temporal-input-presentation-CqbJjIuu.js} +14 -14
- package/dist/chunks/{upload-BRW4Mwrd.js → upload-CiGNKJ_0.js} +1 -1
- package/dist/chunks/{variable-draft-BQ3OMjvy.js → variable-draft-DvglU8yj.js} +2 -2
- package/dist/dashboard/index.js +1 -1
- package/dist/dashboard-authoring/index.js +2064 -1946
- package/dist/format-utils/index.js +8 -8
- package/dist/index.js +332 -335
- package/dist/layouts/index.js +1 -1
- package/dist/style.css +1 -1
- package/dist/surfboard/index.js +1 -1
- 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/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/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/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 -52
- package/dist/types/lib/types/summary-types.d.ts +0 -5
- package/dist/types/shared/analytics-protocol/analytics-base-schemas.d.ts +4 -4
- package/dist/types/shared/analytics-protocol/execution-input-schemas.d.ts +10 -10
- package/dist/types/shared/analytics-protocol/matrix-definition-contract.d.ts +68 -68
- package/dist/types/shared/assistant-protocol/context.d.ts +18 -18
- package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +212 -42
- package/dist/types/shared/dashboard-authoring/changes/diagnostics.d.ts +4 -1
- package/dist/types/shared/dashboard-authoring/changes/resolve-dashboard-changes.d.ts +8 -0
- package/dist/types/shared/dashboard-authoring/conditional-formatting/schema.d.ts +30 -30
- package/dist/types/shared/dashboard-authoring/control-execution-contract.d.ts +4 -4
- 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 +20 -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 +19 -0
- package/dist/types/shared/format-utils/matrix-continuation.d.ts +7 -7
- package/package.json +6 -3
- 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-Dzf2Mbph.js +0 -8847
- package/dist/chunks/color-CJvdlFM_.js +0 -2162
- package/dist/chunks/index-CLIro-EG.js +0 -425
- package/dist/types/components/sharing-and-management/utils/group-types.d.ts +0 -105
package/dist/surfboard/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a, R as s, D as o } from "../chunks/report-preferences-dialog-
|
|
1
|
+
import { a, R as s, D as o } from "../chunks/report-preferences-dialog-B_GXs91t.js";
|
|
2
2
|
import { C as f, E as D } from "../chunks/bookmark-state-CflS88gq.js";
|
|
3
3
|
export {
|
|
4
4
|
f as CONTROL_CARD_DEFAULT_VALUE,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { assertValidAppearanceSpec, validateAppearanceSpec, } from '../lib/appearance/schema.js';
|
|
2
2
|
export { mergeAppearanceSpecs, normalizeAppearanceSpec, } from '../lib/appearance/merge.js';
|
|
3
3
|
export { resolveAppearance } from '../lib/appearance/resolver.js';
|
|
4
|
+
export { normalizeOrganizationAppearance } from '../lib/appearance/normalize-organization.js';
|
|
4
5
|
export { APPEARANCE_SPEC_VERSION, type AppearanceMode, type AppearanceSpec, type AppearanceValidationIssue, type AppearanceValidationIssueCode, type AppearanceValidationResult, type NormalizedAppearanceSpec, } from '../lib/appearance/types.js';
|
|
@@ -74,6 +74,13 @@ type PresetScheme = {
|
|
|
74
74
|
export declare const BRAND_STUDIO_PRESETS: BrandStudioPreset[];
|
|
75
75
|
export declare function createBrandStudioDraft(appearance?: AppearanceSpec | null): BrandStudioDraft;
|
|
76
76
|
export declare function buildAppearanceSpecFromDraft(draft: BrandStudioDraft): AppearanceSpec;
|
|
77
|
+
/**
|
|
78
|
+
* The brand as it is saved: what differs from the defaults, on one path each
|
|
79
|
+
* (dashboard style API-3). A component colour the draft only copied from its token
|
|
80
|
+
* on the dashboard canvas or the card frame (the editor's shape fills them) is left
|
|
81
|
+
* to the token, so a later token change still reaches that surface.
|
|
82
|
+
*/
|
|
83
|
+
export declare function brandStudioSaveSpec(draft: BrandStudioDraft): AppearanceSpec;
|
|
77
84
|
export declare function applyBrandStudioPreset(draft: BrandStudioDraft, presetId: string): BrandStudioDraft;
|
|
78
85
|
export declare function applyBrandStudioColorToken(scheme: RequiredBrandStudioScheme, token: BrandStudioColorToken, value: string): void;
|
|
79
86
|
export declare function applyBrandStudioRadiusToken(scheme: RequiredBrandStudioScheme, token: BrandStudioRadiusToken, value: number): void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { BrandStudioEditor, type BrandStudioEditorProps, } from './brand-studio-editor.js';
|
|
2
|
-
export { applyBrandStudioPreset, BRAND_STUDIO_PRESETS, buildAppearanceSpecFromDraft, createBrandStudioDraft, type BrandStudioDraft, type RequiredBrandStudioScheme, } from './brand-studio-draft.js';
|
|
2
|
+
export { applyBrandStudioPreset, BRAND_STUDIO_PRESETS, buildAppearanceSpecFromDraft, brandStudioSaveSpec, createBrandStudioDraft, type BrandStudioDraft, type RequiredBrandStudioScheme, } from './brand-studio-draft.js';
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BriefingRecipient, BriefingRun } from '../../../lib/types/briefing-types.js';
|
|
2
2
|
import { isActiveBriefingRunStatus, isTerminalBriefingRunStatus } from '../use-briefing-run-detail.js';
|
|
3
3
|
export declare const isTerminalRunStatus: typeof isTerminalBriefingRunStatus;
|
|
4
4
|
export declare const isActiveRunStatus: typeof isActiveBriefingRunStatus;
|
|
5
|
-
export declare function deliveryChannels(current: BriefingDeliveryChannel[], channel: BriefingDeliveryChannel, checked: boolean): BriefingDeliveryChannel[];
|
|
6
5
|
export declare function creatorEmailRecipient(currentUser: {
|
|
7
6
|
email?: string | null;
|
|
8
7
|
name?: string | null;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { AppearanceSpec, NormalizedAppearanceSpec } from '../../lib/appearance/types.js';
|
|
3
|
+
import { DashboardStyle } from '../../shared/dashboard-authoring/dashboard-style/types.js';
|
|
3
4
|
export type AppearanceRuntimeProviderProps = {
|
|
4
5
|
appearance?: AppearanceSpec | null;
|
|
5
6
|
organizationAppearance?: AppearanceSpec | null;
|
|
7
|
+
/** The dashboard's own style, between the organization and the token. */
|
|
8
|
+
dashboardStyle?: DashboardStyle;
|
|
6
9
|
tokenAppearance?: AppearanceSpec | null;
|
|
7
10
|
reactAppearance?: AppearanceSpec | null;
|
|
8
11
|
systemMode?: 'light' | 'dark';
|
|
@@ -16,4 +19,4 @@ export type InternalAppearanceRuntimeProviderProps = AppearanceRuntimeProviderPr
|
|
|
16
19
|
* Portaled Semaphor content receives the matching scope through PortalScope.
|
|
17
20
|
*/
|
|
18
21
|
export declare function AppearanceRuntimeProvider(props: AppearanceRuntimeProviderProps): import("react").JSX.Element;
|
|
19
|
-
export declare function InternalAppearanceRuntimeProvider({ appearance, organizationAppearance, tokenAppearance, reactAppearance, resolvedAppearance, systemMode, children, }: InternalAppearanceRuntimeProviderProps): import("react").JSX.Element;
|
|
22
|
+
export declare function InternalAppearanceRuntimeProvider({ appearance, organizationAppearance, dashboardStyle, tokenAppearance, reactAppearance, resolvedAppearance, systemMode, children, }: InternalAppearanceRuntimeProviderProps): import("react").JSX.Element;
|
|
@@ -239,8 +239,6 @@ export declare function useVisualManagement(onDeleteSuccess?: () => void, onCrea
|
|
|
239
239
|
isUpdatingShares: boolean;
|
|
240
240
|
refetch: (options?: import('@tanstack/query-core').RefetchOptions) => Promise<import('@tanstack/query-core').QueryObserverResult<any, Error>>;
|
|
241
241
|
};
|
|
242
|
-
export declare function useDashboardShares(dashboardId: string): import('@tanstack/react-query').UseQueryResult<any, Error>;
|
|
243
|
-
export declare function useVisualShares(visualId: string): import('@tanstack/react-query').UseQueryResult<any, Error>;
|
|
244
242
|
export declare function useCreateVisualWithFrame(onSuccessCallback?: (data?: any) => void): import('@tanstack/react-query').UseMutationResult<any, Error, CreateVisualRequest, unknown>;
|
|
245
243
|
export declare function useUpdateVisualMutation(): import('@tanstack/react-query').UseMutationResult<any, Error, {
|
|
246
244
|
visualId: string;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { GroupShareData } from './group-types.js';
|
|
2
1
|
export interface MinimalResourceForSharing {
|
|
3
2
|
id: string;
|
|
4
3
|
title: string;
|
|
@@ -7,82 +6,11 @@ export declare enum ResourceType {
|
|
|
7
6
|
DASHBOARD = "dashboard",
|
|
8
7
|
VISUAL = "visual"
|
|
9
8
|
}
|
|
10
|
-
export type UserType = 'tenant' | 'organization';
|
|
11
|
-
export interface User {
|
|
12
|
-
id: string;
|
|
13
|
-
name: string;
|
|
14
|
-
email: string;
|
|
15
|
-
type: string;
|
|
16
|
-
}
|
|
17
9
|
export interface Tenant {
|
|
18
10
|
id: string;
|
|
19
11
|
name: string;
|
|
20
12
|
/** Every user in the tenant, counted on the server (tenants API). */
|
|
21
13
|
userCount?: number;
|
|
22
14
|
}
|
|
23
|
-
export interface SelectedUser {
|
|
24
|
-
id: string;
|
|
25
|
-
role: ShareRole;
|
|
26
|
-
}
|
|
27
|
-
export interface UsersToUpdate {
|
|
28
|
-
id: string;
|
|
29
|
-
currentRole: ShareRole;
|
|
30
|
-
newRole: ShareRole;
|
|
31
|
-
}
|
|
32
15
|
export type ShareScope = 'specific_tenant_user' | 'all_tenant_users' | 'specific_org_user' | 'all_org_users' | 'org_users_only' | 'all_tenants_only';
|
|
33
16
|
export type ShareRole = 'VIEWER' | 'EDITOR' | 'CONTRIBUTOR';
|
|
34
|
-
export interface RoleOption {
|
|
35
|
-
value: ShareRole;
|
|
36
|
-
label: string;
|
|
37
|
-
description: string;
|
|
38
|
-
}
|
|
39
|
-
export type ShareMode = 'allOrgUsers' | 'specificOrgUsers' | 'allTenants' | 'allTenantUsers' | 'specificTenantUsers' | 'specificGroups' | 'allOrgGroups' | 'allTenantGroups';
|
|
40
|
-
export type OrgTabShareData = {
|
|
41
|
-
context: 'org-tab';
|
|
42
|
-
mode: 'allOrgUsers';
|
|
43
|
-
orgWideRole: ShareRole;
|
|
44
|
-
removeAccess?: boolean;
|
|
45
|
-
updateAccess?: boolean;
|
|
46
|
-
} | {
|
|
47
|
-
context: 'org-tab';
|
|
48
|
-
mode: 'specificOrgUsers';
|
|
49
|
-
selectedUsers: SelectedUser[];
|
|
50
|
-
usersToRemove: string[];
|
|
51
|
-
usersToUpdate: UsersToUpdate[];
|
|
52
|
-
};
|
|
53
|
-
export type TenantTabShareData = {
|
|
54
|
-
context: 'tenant-tab';
|
|
55
|
-
mode: 'allTenants';
|
|
56
|
-
allTenantsRole: ShareRole;
|
|
57
|
-
removeAccess?: boolean;
|
|
58
|
-
updateAccess?: boolean;
|
|
59
|
-
} | {
|
|
60
|
-
context: 'tenant-tab';
|
|
61
|
-
mode: 'allTenantUsers';
|
|
62
|
-
tenantId: string;
|
|
63
|
-
tenantWideRole: ShareRole;
|
|
64
|
-
removeAccess?: boolean;
|
|
65
|
-
updateAccess?: boolean;
|
|
66
|
-
} | {
|
|
67
|
-
context: 'tenant-tab';
|
|
68
|
-
mode: 'specificTenantUsers';
|
|
69
|
-
tenantId: string;
|
|
70
|
-
selectedUsers: SelectedUser[];
|
|
71
|
-
usersToRemove: string[];
|
|
72
|
-
usersToUpdate: UsersToUpdate[];
|
|
73
|
-
};
|
|
74
|
-
export type OrgUserShareData = OrgTabShareData | TenantTabShareData;
|
|
75
|
-
export type TenantUserShareData = {
|
|
76
|
-
context: 'tenant-dialog';
|
|
77
|
-
mode: 'allTenantUsers';
|
|
78
|
-
tenantWideRole: ShareRole;
|
|
79
|
-
removeAccess?: boolean;
|
|
80
|
-
updateAccess?: boolean;
|
|
81
|
-
} | {
|
|
82
|
-
context: 'tenant-dialog';
|
|
83
|
-
mode: 'specificTenantUsers';
|
|
84
|
-
selectedUsers: SelectedUser[];
|
|
85
|
-
usersToRemove: string[];
|
|
86
|
-
usersToUpdate: UsersToUpdate[];
|
|
87
|
-
};
|
|
88
|
-
export type ShareData = OrgUserShareData | TenantUserShareData | GroupShareData;
|
|
@@ -80,7 +80,6 @@ export declare function useDataTableLogic(props: DataTableLogicProps): {
|
|
|
80
80
|
handleColumnSettingsChange: (next: ColumnSettings) => void;
|
|
81
81
|
handleColumnBaseStyleChange: (next: TableBaseStyle) => void;
|
|
82
82
|
isHandlingVisibilityChange: React.RefObject<boolean>;
|
|
83
|
-
themeStyle: import('../../../index.js').StyleProps | undefined;
|
|
84
83
|
tableRef: React.RefObject<any>;
|
|
85
84
|
internalColumnSettings: ColumnSettingsMap;
|
|
86
85
|
internalSelectColumnVisible: boolean;
|
|
@@ -258,11 +258,6 @@ export interface DataTablePaginationProps {
|
|
|
258
258
|
exportData?: any[];
|
|
259
259
|
appearance?: DataTablePaginationAppearance;
|
|
260
260
|
}
|
|
261
|
-
export interface ColorPickerProps {
|
|
262
|
-
color: string;
|
|
263
|
-
onChange: (color: string) => void;
|
|
264
|
-
className?: string;
|
|
265
|
-
}
|
|
266
261
|
export declare const DATE_FORMAT_GROUPS: {
|
|
267
262
|
label: string;
|
|
268
263
|
formats: {
|
|
@@ -274,10 +269,6 @@ export declare const DATE_FORMATS: {
|
|
|
274
269
|
label: string;
|
|
275
270
|
value: string;
|
|
276
271
|
}[];
|
|
277
|
-
export declare const DATE_FORMAT_TYPES: {
|
|
278
|
-
label: string;
|
|
279
|
-
value: string;
|
|
280
|
-
}[];
|
|
281
272
|
export declare const COMMON_TIMEZONES: {
|
|
282
273
|
label: string;
|
|
283
274
|
value: string;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { TCard, VisualDisplayMode } from '../../../../lib/types/common-types.js';
|
|
2
|
-
import { PaginationMetadata } from '../../../../lib/types/explorer-types.js';
|
|
3
2
|
export type PaginationMode = 'client' | 'server' | 'disabled';
|
|
4
3
|
export declare const TABLE_PAGE_SIZE_OPTIONS: readonly [10, 20, 50, 100, 500, 1000];
|
|
5
4
|
export declare const DEFAULT_TABLE_PAGE_SIZE = 50;
|
|
@@ -19,21 +18,3 @@ export declare function isDevPaginationSwitchableCard(card: TCard): boolean;
|
|
|
19
18
|
* - Client pagination: When card has raw SQL OR is not a table
|
|
20
19
|
*/
|
|
21
20
|
export declare function getPaginationMode(card: TCard, displayMode?: VisualDisplayMode): PaginationMode;
|
|
22
|
-
/**
|
|
23
|
-
* Converts frontend pagination state (0-based) to backend format (1-based)
|
|
24
|
-
*/
|
|
25
|
-
export declare function toBackendPagination(pageIndex: number, pageSize: number): {
|
|
26
|
-
page: number;
|
|
27
|
-
pageSize: number;
|
|
28
|
-
};
|
|
29
|
-
/**
|
|
30
|
-
* Converts backend pagination metadata (1-based) to frontend format (0-based)
|
|
31
|
-
*/
|
|
32
|
-
export declare function fromBackendPagination(metadata: PaginationMetadata): {
|
|
33
|
-
pageIndex: number;
|
|
34
|
-
pageSize: number;
|
|
35
|
-
pageCount: number;
|
|
36
|
-
totalCount: number;
|
|
37
|
-
hasNextPage: boolean;
|
|
38
|
-
hasPrevPage: boolean;
|
|
39
|
-
};
|
|
@@ -14,7 +14,6 @@ type ConfigField = DetailField | GroupByField | MetricField;
|
|
|
14
14
|
export declare function reorderTableCardConfig(card: TCard, request: ColumnReorderRequest, columnKeyMap?: QueryColumnKeyMap): CardConfig | null;
|
|
15
15
|
export declare function hasConfigOwnedTableFields(card: TCard | undefined): boolean;
|
|
16
16
|
export declare function hasConfigBackedTableColumnOrder(card: TCard | undefined, columnKeyMap: QueryColumnKeyMap | undefined): boolean;
|
|
17
|
-
export declare function getConfigBackedTableOutputColumnIds(card: TCard | undefined, columnKeyMap: QueryColumnKeyMap | undefined): string[];
|
|
18
17
|
export declare function resolveDataTableFieldOutputKey(field: ConfigField, role: QueryColumnKeyRole, availableKeys: string[], columnKeyMap?: QueryColumnKeyMap): string | undefined;
|
|
19
18
|
export declare function resolveDataTableColumnDisplayLabel(columnId: string, card: TCard | undefined, columnKeyMap?: QueryColumnKeyMap): string | undefined;
|
|
20
19
|
export declare function buildDataTableColumnDisplayLabels(columnIds: readonly string[], card: TCard | undefined, columnKeyMap?: QueryColumnKeyMap, resultColumns?: readonly SemaphorResultColumn[], temporalPresentation?: GroupedTemporalPresentation): {
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { AppearanceSpec } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* One canonical path per property (dashboard style DS-D26, SPEC §3.3). Some
|
|
4
|
+
* properties also have a component-level path; inside one layer the component
|
|
5
|
+
* value wins, as it always has, and is moved onto the canonical token path, so
|
|
6
|
+
* that layers merge by property: a later layer's token beats an earlier layer's
|
|
7
|
+
* component value, and the reverse.
|
|
8
|
+
*/
|
|
9
|
+
export declare const APPEARANCE_ALIASES: readonly [{
|
|
10
|
+
readonly alias: readonly ["components", "dashboard", "padding"];
|
|
11
|
+
readonly canonical: readonly ["tokens", "spacing", "dashboardPadding"];
|
|
12
|
+
}, {
|
|
13
|
+
readonly alias: readonly ["components", "card", "borderRadius"];
|
|
14
|
+
readonly canonical: readonly ["tokens", "radius", "card"];
|
|
15
|
+
}, {
|
|
16
|
+
readonly alias: readonly ["components", "card", "shadow"];
|
|
17
|
+
readonly canonical: readonly ["tokens", "shadow", "card"];
|
|
18
|
+
}, {
|
|
19
|
+
readonly alias: readonly ["components", "card", "padding"];
|
|
20
|
+
readonly canonical: readonly ["tokens", "spacing", "cardPadding"];
|
|
21
|
+
}, {
|
|
22
|
+
readonly alias: readonly ["components", "pagination", "borderRadius"];
|
|
23
|
+
readonly canonical: readonly ["tokens", "radius", "control"];
|
|
24
|
+
}, {
|
|
25
|
+
readonly alias: readonly ["components", "interactive", "borderRadius"];
|
|
26
|
+
readonly canonical: readonly ["tokens", "radius", "control"];
|
|
27
|
+
}];
|
|
28
|
+
/**
|
|
29
|
+
* A layer that recolours the page without naming a canvas paints the canvas with the
|
|
30
|
+
* page colour, as the dashboard surface always did (dashboard style P2-09). A colour
|
|
31
|
+
* equal to the default page colour never did, so it doesn't.
|
|
32
|
+
*/
|
|
33
|
+
export declare const CANVAS_FROM_PAGE_COLOR: {
|
|
34
|
+
readonly page: readonly ["tokens", "color", "background"];
|
|
35
|
+
readonly canvas: readonly ["components", "dashboard", "background"];
|
|
36
|
+
};
|
|
37
|
+
export declare function normalizeAppearanceAliases<T extends AppearanceSpec | null | undefined>(spec: T): T;
|
|
38
|
+
export declare function readPath(value: unknown, path: readonly string[]): unknown;
|
|
39
|
+
/** A copy with `path` set; parents are copied, never mutated. */
|
|
40
|
+
export declare function writePath(value: Record<string, unknown>, path: readonly string[], leaf: unknown): Record<string, unknown>;
|
|
41
|
+
/** A copy without `path`; a parent left empty is removed. */
|
|
42
|
+
export declare function deletePath(value: Record<string, unknown>, path: readonly string[]): Record<string, unknown>;
|
|
@@ -6,4 +6,10 @@ export declare function compileAppearance(params: {
|
|
|
6
6
|
systemMode?: ResolvedAppearanceMode;
|
|
7
7
|
defaults?: NormalizedAppearanceSpec;
|
|
8
8
|
}): CompiledAppearance;
|
|
9
|
+
/** The named card shadows (dashboard style SPEC §3.3); `subtle` is the card's long-standing `shadow-sm`. */
|
|
10
|
+
export declare const APPEARANCE_SHADOWS: {
|
|
11
|
+
readonly none: "none";
|
|
12
|
+
readonly subtle: "0 1px 2px 0 rgb(0 0 0 / 0.05)";
|
|
13
|
+
readonly raised: "0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)";
|
|
14
|
+
};
|
|
9
15
|
export declare function resolveAppearanceMode(mode: AppearanceMode, systemMode?: ResolvedAppearanceMode): ResolvedAppearanceMode;
|
|
@@ -1,3 +1,9 @@
|
|
|
1
1
|
import { NormalizedAppearanceSpec } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* The default chart palette (dashboard style SPEC §3.7, DS-D25): brand blue first,
|
|
4
|
+
* validated for colour-blind separation on white and on zinc-900. Series take slots
|
|
5
|
+
* in order.
|
|
6
|
+
*/
|
|
2
7
|
export declare const SEMAPHOR_DEFAULT_CHART_PALETTE: string[];
|
|
8
|
+
export declare const SEMAPHOR_DEFAULT_DARK_CHART_PALETTE: string[];
|
|
3
9
|
export declare const SEMAPHOR_DEFAULT_APPEARANCE_SPEC: NormalizedAppearanceSpec;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
export { APPEARANCE_ALIASES, CANVAS_FROM_PAGE_COLOR, normalizeAppearanceAliases } from './aliases.js';
|
|
1
2
|
export * from './color.js';
|
|
2
3
|
export * from './compiler.js';
|
|
3
4
|
export * from './defaults.js';
|
|
4
5
|
export * from './merge.js';
|
|
6
|
+
export * from './normalize-organization.js';
|
|
5
7
|
export * from './resolver.js';
|
|
6
8
|
export * from './schema.js';
|
|
7
9
|
export * from './types.js';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { AppearanceSpec } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* A stored organization appearance, rewritten to state what renders today and
|
|
4
|
+
* nothing more (SPEC §4.6): hidden legacy defaults removed, aliases folded onto
|
|
5
|
+
* their canonical paths (the component value winning), values equal to the
|
|
6
|
+
* defaults removed, retired table components removed. `null` when nothing is left.
|
|
7
|
+
*/
|
|
8
|
+
export declare function normalizeOrganizationAppearance(spec: AppearanceSpec): {
|
|
9
|
+
spec: AppearanceSpec | null;
|
|
10
|
+
changes: string[];
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* What a stored brand drew under the old renderers, on canonical paths, values equal
|
|
14
|
+
* to the defaults kept: the brand's side of "the brand wins today" when a dashboard's
|
|
15
|
+
* legacy style is converted (SPEC §4.5). Read the brand as stored, before it is normalized.
|
|
16
|
+
*/
|
|
17
|
+
export declare function renderedOrganizationScheme(spec: AppearanceSpec | null | undefined, mode: 'light' | 'dark'): Record<string, unknown> | undefined;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare function resolveAppearance(layers?:
|
|
1
|
+
import { AppearanceLayers, NormalizedAppearanceSpec } from './types.js';
|
|
2
|
+
export declare function resolveAppearance(layers?: AppearanceLayers): NormalizedAppearanceSpec;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { DashboardStyle } from '../../shared/dashboard-authoring/dashboard-style/types.js';
|
|
1
2
|
export declare const APPEARANCE_SPEC_VERSION: 1;
|
|
2
3
|
export type AppearanceMode = 'light' | 'dark' | 'system';
|
|
3
4
|
export type ResolvedAppearanceMode = 'light' | 'dark';
|
|
@@ -36,18 +37,24 @@ export type AppearanceTokens = {
|
|
|
36
37
|
};
|
|
37
38
|
};
|
|
38
39
|
export type BaseSurfaceAppearance = {
|
|
40
|
+
/** On `components.dashboard` (the canvas) also the keywords `muted` and `background`, naming those color tokens. */
|
|
39
41
|
background?: string;
|
|
40
42
|
foreground?: string;
|
|
41
43
|
borderColor?: string;
|
|
42
44
|
borderRadius?: number;
|
|
45
|
+
/** CSS shadow, or `none`, `subtle` or `raised` (compiled to CSS). */
|
|
43
46
|
shadow?: string;
|
|
44
47
|
padding?: number;
|
|
48
|
+
/** `components.card` only: 1 draws the card border, 0 hides it. */
|
|
49
|
+
borderWidth?: 0 | 1;
|
|
45
50
|
};
|
|
46
51
|
export type InteractiveSurfaceAppearance = BaseSurfaceAppearance & {
|
|
47
52
|
toolbarBackground?: string;
|
|
48
53
|
};
|
|
49
54
|
export type ChartAppearance = {
|
|
50
55
|
palette?: string[];
|
|
56
|
+
/** Corner radius of bars, px. */
|
|
57
|
+
barRadius?: number;
|
|
51
58
|
background?: string;
|
|
52
59
|
foreground?: string;
|
|
53
60
|
gridColor?: string;
|
|
@@ -149,17 +156,47 @@ export type RgbColor = {
|
|
|
149
156
|
g: number;
|
|
150
157
|
b: number;
|
|
151
158
|
};
|
|
159
|
+
/**
|
|
160
|
+
* Everything a chart builder takes from the appearance (dashboard style SPEC §3.5,
|
|
161
|
+
* CT-1): chart code gets style and mode only from a `ChartTheme` it is given.
|
|
162
|
+
* `gridColor`, `axisColor` and `legendColor` are unset when Chart.js's own colours draw.
|
|
163
|
+
*/
|
|
164
|
+
export type ChartTheme = {
|
|
165
|
+
mode: ResolvedAppearanceMode;
|
|
166
|
+
palette: string[];
|
|
167
|
+
font: {
|
|
168
|
+
family: string;
|
|
169
|
+
size: number;
|
|
170
|
+
};
|
|
171
|
+
gridColor?: string;
|
|
172
|
+
axisColor?: string;
|
|
173
|
+
legendColor?: string;
|
|
174
|
+
tooltip: {
|
|
175
|
+
background: string;
|
|
176
|
+
title: string;
|
|
177
|
+
body: string;
|
|
178
|
+
footer: string;
|
|
179
|
+
border: string;
|
|
180
|
+
cornerRadius: number;
|
|
181
|
+
};
|
|
182
|
+
barRadius: number;
|
|
183
|
+
};
|
|
152
184
|
export type CompiledAppearance = {
|
|
153
185
|
mode: ResolvedAppearanceMode;
|
|
154
186
|
scheme: AppearanceScheme;
|
|
155
187
|
cssVariables: Record<string, string>;
|
|
156
188
|
colorValues: AppearanceColorTokens;
|
|
157
189
|
chartPalette: string[];
|
|
190
|
+
chartTheme: ChartTheme;
|
|
158
191
|
table?: TableAppearance;
|
|
159
192
|
};
|
|
160
|
-
|
|
193
|
+
/** The resolver's inputs, first to last (dashboard style DS-D4, SPEC §3.3). */
|
|
194
|
+
export type AppearanceLayers = {
|
|
161
195
|
defaults?: NormalizedAppearanceSpec;
|
|
196
|
+
/** Brand Studio's saved brand, or its preview while it is open. */
|
|
162
197
|
organizationAppearance?: AppearanceSpec | null | undefined;
|
|
198
|
+
/** The dashboard's own style: the editing draft's. */
|
|
199
|
+
dashboardStyle?: DashboardStyle | undefined;
|
|
163
200
|
tokenAppearance?: AppearanceSpec | null | undefined;
|
|
164
201
|
reactAppearance?: AppearanceSpec | null | undefined;
|
|
165
202
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TDataColumn, TCardPreferences, TCard } from '../types/common-types.js';
|
|
2
|
+
import { ChartTheme } from '../appearance/types.js';
|
|
2
3
|
import { Chart, ChartConfiguration } from 'chart.js';
|
|
3
4
|
import { ComparisonMetadataMap, QueryConfig } from '../types/query-types.js';
|
|
4
5
|
import { ChartNumericPresentationContext } from '../formatters/chart-numeric-presentation.js';
|
|
@@ -25,7 +26,8 @@ export type ChartConfigParams = {
|
|
|
25
26
|
provider?: TChartProvider;
|
|
26
27
|
userSettings?: object;
|
|
27
28
|
preferences?: TCardPreferences;
|
|
28
|
-
|
|
29
|
+
/** The appearance's chart style and mode (dashboard style SPEC §3.5): the only style a builder reads. */
|
|
30
|
+
chartTheme: ChartTheme;
|
|
29
31
|
/**
|
|
30
32
|
* Indicates SQL/dev mode where grouping is derived directly from raw data
|
|
31
33
|
*/
|
|
@@ -47,6 +49,8 @@ export type BlurEffectProps = {
|
|
|
47
49
|
cfg: TChartConfiguration | undefined;
|
|
48
50
|
apply: boolean;
|
|
49
51
|
blurColor?: string;
|
|
52
|
+
/** The chart's mode, from its `ChartTheme` (CT-1). */
|
|
53
|
+
mode?: 'light' | 'dark';
|
|
50
54
|
};
|
|
51
55
|
export type TChartType = 'bar' | 'horizontalBar' | 'line' | 'area' | 'stackedArea' | 'combo' | 'pie' | 'doughnut' | 'radar' | 'polarArea' | 'bubble' | 'scatter' | 'stackedBar' | 'stackedLine' | 'table' | 'matrixTable' | 'detailTable' | 'kpi' | 'pyramid' | 'tornado' | 'range' | 'text' | 'funnel' | 'bullet' | 'heatmap' | 'treemap' | 'custom';
|
|
52
56
|
export { TABLE_CHART_TYPES, isTableChartType };
|
|
@@ -17,7 +17,6 @@ export declare function findBySemanticDatasetReferenceCandidate<TDataset extends
|
|
|
17
17
|
export declare function getSemanticDatasetPayloadLookupNames<TDataset extends SemanticDatasetIdentityLike>(datasets: TDataset[] | undefined, dataset: TDataset): string[];
|
|
18
18
|
export declare function collectCardSemanticDatasetReferences(card: TCard | undefined): SemanticDatasetReference[];
|
|
19
19
|
export declare function collectFrameSemanticDatasetReferences(frame: TFrame | undefined): SemanticDatasetReference[];
|
|
20
|
-
export declare function collectDashboardSemanticDatasetReferences(dashboard: TDashboard): SemanticDatasetReference[];
|
|
21
20
|
export declare function resolveEffectiveCardSemanticDatasetReference(card: TCard | undefined, cardConfig?: CardConfig): SemanticDatasetReference | null;
|
|
22
21
|
export declare function findDashboardFrameById(dashboard: TDashboard | undefined, frameId: string | undefined): TFrame | null;
|
|
23
22
|
export declare function haveMatchingSemanticDatasetReferences(left: SemanticDatasetReference[], right: SemanticDatasetReference[]): boolean;
|
|
@@ -72,8 +72,6 @@ export declare function compactDashboardInputValues(values: DashboardInputValues
|
|
|
72
72
|
* when `over` is empty.
|
|
73
73
|
*/
|
|
74
74
|
export declare function overlayDashboardInputValues(base: DashboardInputValues, over: DashboardInputValues): DashboardInputValues;
|
|
75
|
-
/** The values without any slot of these inputs, on every target. `values` itself when none is held. */
|
|
76
|
-
export declare function removeDashboardInputSlotsById(values: DashboardInputValues, inputIds: ReadonlySet<string>): DashboardInputValues;
|
|
77
75
|
/**
|
|
78
76
|
* The saved defaults the runtime reads (SPEC 5.2): the filter model's, which
|
|
79
77
|
* hold owned `defaultFilterValues` entries as slots. With no such entry they
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ControlDefinition, ControlOption, DashboardInputExportKey, DataVariable, DocumentInputDefinition, ReportValueKey, ResolvedDashboardInput,
|
|
1
|
+
import { ControlDefinition, ControlOption, DashboardInputExportKey, DataVariable, DocumentInputDefinition, ReportValueKey, ResolvedDashboardInput, VariableRef } from '../types/common-types.js';
|
|
2
2
|
import { TFilterValue } from '../../components/surfboard/filter/types.js';
|
|
3
3
|
import { TemporalTextPresentationContext } from '../text-variables/temporal-input-text.js';
|
|
4
4
|
import { TextVariableChipFace } from '../text-variables/text-variable-types.js';
|
|
@@ -200,8 +200,3 @@ export type RenderedText = {
|
|
|
200
200
|
/** A data variable in this text is still loading (print readiness, DV-D32). */
|
|
201
201
|
pending: boolean;
|
|
202
202
|
};
|
|
203
|
-
/** A stored variable inline, as both text shapes hold it. */
|
|
204
|
-
export type StoredVariableInline = {
|
|
205
|
-
ref: VariableRef;
|
|
206
|
-
presentation?: TextVariablePresentation;
|
|
207
|
-
};
|
|
@@ -164,7 +164,6 @@ export declare function downloadDocumentPdf(apiServiceUrl: string, authToken: Au
|
|
|
164
164
|
password?: string;
|
|
165
165
|
}): Promise<void>;
|
|
166
166
|
export declare function getVisualParamsForPrint(authToken: AuthToken | undefined, cardId: string, frameId: string, cardTitle: string, overrides?: VisualPrintRuntimeOverrides): VisualPdfParams;
|
|
167
|
-
export declare function downloadVisualPdf(apiServiceUrl: string, authToken: AuthToken | undefined, cardId: string, frameId: string, cardTitle: string, cardChartType?: TChartType, password?: string, pageSize?: string, orientation?: string, filterLine?: string, filterValues?: TFilterValue[], expandedState?: Record<string, boolean>, matrix?: MatrixPdfCapture): Promise<void>;
|
|
168
167
|
/** `captured`: the print parameters taken at the click (`getVisualParamsForPrint`), for a fallback after an await. */
|
|
169
168
|
export declare function downloadVisualPdfWithResponse(apiServiceUrl: string, authToken: AuthToken | undefined, cardId: string, frameId: string, cardTitle: string, cardChartType?: TChartType, password?: string, pageSize?: string, orientation?: string, filterLine?: string, filterValues?: TFilterValue[], expandedState?: Record<string, boolean>, matrix?: MatrixPdfCapture, captured?: VisualPdfParams): Promise<PdfDownloadResponse | undefined>;
|
|
170
169
|
type FastPathOptions = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AuthToken, CustomCard, DashboardLifecycleEvent, DashboardInputExecutionSnapshot, TDashboard, TEvent
|
|
1
|
+
import { AuthToken, CustomCard, DashboardLifecycleEvent, DashboardInputExecutionSnapshot, TDashboard, TEvent } from '../types/common-types.js';
|
|
2
2
|
import { PresentationExecutionSnapshot } from '../../shared/format-utils/index.js';
|
|
3
3
|
import { TFilterValue } from '../../components/surfboard/filter/types.js';
|
|
4
4
|
import { ControlContractOverrides } from '../dashboard-inputs/control-contract-overrides.js';
|
|
@@ -19,7 +19,6 @@ type UseDashboardProps = {
|
|
|
19
19
|
presentationExecutionSnapshot?: PresentationExecutionSnapshot;
|
|
20
20
|
/** PDF render: the viewer's table settings captured at export time. Nothing is read or written. */
|
|
21
21
|
viewerTableSettings?: Readonly<Record<string, ViewerTableSettings>>;
|
|
22
|
-
customStyle?: TStyle;
|
|
23
22
|
currentTheme?: 'light' | 'dark' | 'system';
|
|
24
23
|
onSave?: (dashboard: TDashboard) => void;
|
|
25
24
|
onEvent?: (event: TEvent) => void;
|
|
@@ -30,7 +29,7 @@ type UseDashboardProps = {
|
|
|
30
29
|
type?: 'dashboard' | 'visual';
|
|
31
30
|
cardId?: string;
|
|
32
31
|
};
|
|
33
|
-
export declare function useDashboard({
|
|
32
|
+
export declare function useDashboard({ currentTheme, onSave, onEvent, onDashboardLifecycleEvent, defaultFilterValues, defaultControlValues, controlContractOverrides, dashboardInputExecutionSnapshot, printInputCapture, presentationExecutionSnapshot, viewerTableSettings, type, cardId, selectedSheetId, onFilterValuesChange, }: UseDashboardProps): {
|
|
34
33
|
isFetching: boolean;
|
|
35
34
|
isLoading: boolean;
|
|
36
35
|
isError: boolean;
|
|
@@ -38,7 +37,7 @@ export declare function useDashboard({ customStyle, currentTheme, onSave, onEven
|
|
|
38
37
|
initialReportContext: import('../../shared/report-runtime-context/index.js').ReportRuntimeContext;
|
|
39
38
|
dashboard: TDashboard;
|
|
40
39
|
semanticExecutionPayload: import('../types/semantic-runtime-types.js').SemanticExecutionPayload;
|
|
41
|
-
organizationAppearance?: import('../
|
|
40
|
+
organizationAppearance?: import('../types/index.js').AppearanceSpec | null;
|
|
42
41
|
viewer?: import('../../shared/dashboard-viewer/index.js').DashboardViewerPayload;
|
|
43
42
|
} | null, Error>>;
|
|
44
43
|
};
|
|
@@ -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'>;
|
|
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;
|