react-semaphor 0.1.534 → 0.1.535

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.
Files changed (42) hide show
  1. package/dist/brand-studio/index.js +25 -25
  2. package/dist/briefings/index.js +1 -1
  3. package/dist/chunks/{calculated-field-identity-Cz1ZU_UL.js → calculated-field-identity-BptYhyOP.js} +4 -4
  4. package/dist/chunks/{card-config-utils-BlIiFn0O.js → card-config-utils-C-QfuqEy.js} +50 -51
  5. package/dist/chunks/{dashboard-CCK80YKL.js → dashboard-B7y_WeF2.js} +1 -1
  6. package/dist/chunks/dashboard-briefing-launcher-DwSxDtgZ.js +4224 -0
  7. package/dist/chunks/{dashboard-controls-CoiTGnEr.js → dashboard-controls-CzTh9J0s.js} +862 -873
  8. package/dist/chunks/{dashboard-json-BRGozO--.js → dashboard-json-o6tOjNhH.js} +1 -1
  9. package/dist/chunks/{edit-dashboard-visual-CZFnhGZQ.js → edit-dashboard-visual-Lp_iKRGH.js} +8983 -8749
  10. package/dist/chunks/{index-BQl5rC54.js → index-P5aUuGF1.js} +1 -1
  11. package/dist/chunks/{matrix-control-sources-Tls-h3AN.js → matrix-control-sources-DTqcA2_L.js} +1 -1
  12. package/dist/chunks/report-preferences-dialog-BaUr346O.js +1623 -0
  13. package/dist/chunks/{layout-grid-CiubineE.js → save-kO6cIaob.js} +20 -2
  14. package/dist/chunks/{semaphor-ready-indicator-z4SNdxiC.js → semaphor-ready-indicator-B017OW6t.js} +61957 -76531
  15. package/dist/chunks/slider-CrLoCpsr.js +2383 -0
  16. package/dist/chunks/{switch-BR3Xgbqr.js → switch-ojmMsFMO.js} +4355 -4779
  17. package/dist/chunks/upload-CAIpsti1.js +15 -0
  18. package/dist/chunks/use-create-flow-overlay-state-BbwQ0gpQ.js +1457 -0
  19. package/dist/dashboard/index.js +1 -1
  20. package/dist/dashboard-authoring/index.js +4 -4
  21. package/dist/index.js +221 -220
  22. package/dist/style.css +1 -1
  23. package/dist/surfboard/index.js +1 -1
  24. package/dist/types/components/surfboard/controls/dashboard-filter-controls-launcher.d.ts +0 -1
  25. package/dist/types/lib/hooks/use-dashboard-query.d.ts +0 -2
  26. package/dist/types/lib/hooks/use-dashboard.d.ts +0 -1
  27. package/dist/types/lib/stores/dashboard-store.d.ts +1 -11
  28. package/dist/types/lib/stores/editor-store.d.ts +1 -10
  29. package/dist/types/lib/types/ai-context-types.d.ts +20 -0
  30. package/dist/types/lib/types/common-types.d.ts +1 -20
  31. package/dist/types/lib/types/token-types.d.ts +0 -7
  32. package/dist/types/lib/utils.d.ts +0 -2
  33. package/package.json +1 -7
  34. package/dist/chunks/dashboard-briefing-launcher-B9Fq2Rf3.js +0 -3489
  35. package/dist/chunks/editor-action-buttons-CVtSO3I3.js +0 -2067
  36. package/dist/chunks/report-preferences-dialog-CWdTlWsr.js +0 -1231
  37. package/dist/chunks/save-DgMfP0j8.js +0 -21
  38. package/dist/chunks/slider-DbwmuVB-.js +0 -875
  39. package/dist/dashboard-assistant/index.js +0 -11
  40. package/dist/types/dashboard-assistant/index.d.ts +0 -80
  41. package/dist/types/dashboard-assistant.d.ts +0 -2
  42. package/dist/types/lib/types/assistant-types.d.ts +0 -127
@@ -1,4 +1,4 @@
1
- import { a, R as s, D as o } from "../chunks/report-preferences-dialog-CWdTlWsr.js";
1
+ import { a, R as s, D as o } from "../chunks/report-preferences-dialog-BaUr346O.js";
2
2
  import { C as f, E as D } from "../chunks/common-types-g7yS12Cg.js";
3
3
  export {
4
4
  f as CONTROL_CARD_DEFAULT_VALUE,
@@ -15,7 +15,6 @@ type DashboardFilterControlsLauncherProps = {
15
15
  * Behavior preserved from the legacy aside-based version:
16
16
  * - Document sheets route to the document inspector instead of the
17
17
  * filter picker.
18
- * - Opening the filter picker collapses the AI assistant rail.
19
18
  * - `showFilters` in the dashboard store is the source of truth for
20
19
  * whether the picker popover is open. External code that calls
21
20
  * `setShowFilters(false)` (e.g. semaphor-app's close / save / discard
@@ -2,7 +2,6 @@ export declare function useDashboardQuery(): {
2
2
  data: {
3
3
  initialReportContext: import('../../shared/report-runtime-context/index.js').ReportRuntimeContext;
4
4
  dashboard: import('../types/index.js').TDashboard;
5
- assistantProfileId?: string;
6
5
  semanticExecutionPayload: import('../types/semantic-runtime-types.js').SemanticExecutionPayload;
7
6
  organizationAppearance?: import('../types/index.js').AppearanceSpec | null;
8
7
  viewer?: import('../types/index.js').DashboardViewerPayload;
@@ -13,7 +12,6 @@ export declare function useDashboardQuery(): {
13
12
  refetch: (options?: import('@tanstack/query-core').RefetchOptions) => Promise<import('@tanstack/query-core').QueryObserverResult<{
14
13
  initialReportContext: import('../../shared/report-runtime-context/index.js').ReportRuntimeContext;
15
14
  dashboard: import('../types/index.js').TDashboard;
16
- assistantProfileId?: string;
17
15
  semanticExecutionPayload: import('../types/semantic-runtime-types.js').SemanticExecutionPayload;
18
16
  organizationAppearance?: import('../types/index.js').AppearanceSpec | null;
19
17
  viewer?: import('../types/index.js').DashboardViewerPayload;
@@ -40,7 +40,6 @@ export declare function useDashboard({ customStyle, currentTheme, onSave, onEven
40
40
  refetch: (options?: import('@tanstack/query-core').RefetchOptions) => Promise<import('@tanstack/query-core').QueryObserverResult<{
41
41
  initialReportContext: import('../../shared/report-runtime-context/index.js').ReportRuntimeContext;
42
42
  dashboard: TDashboard;
43
- assistantProfileId?: string;
44
43
  semanticExecutionPayload: import('../types/semantic-runtime-types.js').SemanticExecutionPayload;
45
44
  organizationAppearance?: import('../appearance/types.js').AppearanceSpec | null;
46
45
  viewer?: import('../../shared/dashboard-viewer/index.js').DashboardViewerPayload;
@@ -4,12 +4,11 @@ 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, StyleProps, TCard, TDashboard, TEvent, TFrame, TSheet, TStyle, AIScopeTable, CacheConfig, FilterLayoutSettings, DocumentDefinition, DashboardInput, DashboardInputSlot, DashboardInputValues, DashboardLifecycleEvent } from '../types/common-types.js';
7
+ import { AuthToken, TBaseQuery, Breakpoint, ControlDefinition, CustomCard, StyleProps, TCard, TDashboard, TEvent, TFrame, TSheet, TStyle, CacheConfig, FilterLayoutSettings, DocumentDefinition, DashboardInput, 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
- import { DashboardAIContext } from '../types/assistant-types.js';
13
12
  import { FilterGroup, Field } from '../types/explorer-types.js';
14
13
  import { DashboardControlsModelOptions } from '../controls/control-authoring-types.js';
15
14
  import { SemanticExecutionPayload } from '../types/semantic-runtime-types.js';
@@ -53,7 +52,6 @@ export type FilterDashboardInputDefinitionUpdateResult = {
53
52
  issues: DashboardFilterMappingAuthoringIssue[];
54
53
  };
55
54
  export type DashboardStore = {
56
- handleOpenAssistantProfile?: () => void;
57
55
  isDownloadingPdf?: boolean;
58
56
  isSessionExpired: boolean;
59
57
  authToken?: AuthToken;
@@ -62,7 +60,6 @@ export type DashboardStore = {
62
60
  themeStyle?: StyleProps;
63
61
  filteringCards?: TCard[];
64
62
  dashboard: TDashboard;
65
- dashboardAssistantDraftScopeKey: string;
66
63
  relaodToken?: number;
67
64
  selectedSheetId?: string | null | undefined;
68
65
  selectedFrameId?: string | null;
@@ -91,7 +88,6 @@ export type DashboardStore = {
91
88
  checkUnsavedDashboardChanges: (() => boolean) | null;
92
89
  isDashboardEditing: boolean;
93
90
  isVisualEditing: boolean;
94
- showContext: boolean;
95
91
  showDashboardJSON: boolean;
96
92
  showFilters: boolean;
97
93
  filterValues?: TFilterValue[];
@@ -171,8 +167,6 @@ type Actions = {
171
167
  applyResolvedCalendarPreferences: (resolved: CalendarPreferencesResponse['resolved'], sources: ResolvedCalendarPreferenceSources) => void;
172
168
  applyResolvedValueFormatPreferences: (resolved: ResolvedValueFormatPreferences, sources: ResolvedValueFormatPreferenceSources) => void;
173
169
  triggerReload: () => void;
174
- setAiContext: (aiContext: DashboardAIContext) => void;
175
- setHandleOpenAssistantProfile: (handleOpenAssistantProfile: () => void) => void;
176
170
  setFilterMode: (filterId: string, filterMode: 'include' | 'exclude') => void;
177
171
  setInitStore: () => void;
178
172
  setGlobalStyle: (style: TStyle) => void;
@@ -207,9 +201,6 @@ type Actions = {
207
201
  updateDashboardControl: (controlId: string, updates: Partial<ControlDefinition>) => void;
208
202
  reorderDashboardControls: (orderedControlIds: string[]) => void;
209
203
  setIsDownloadingPdf: (isDownloadingPdf: boolean) => void;
210
- setAIScopeTables: (aiScopeTables: AIScopeTable[]) => void;
211
- addToAIScope: (scopeTable: AIScopeTable) => void;
212
- removeFromAIScope: (scopeTable: AIScopeTable) => void;
213
204
  setIsSessionExpired: (isSessionExpired: boolean) => void;
214
205
  setCurrentBreakpoint: (breakpoint: Breakpoint) => void;
215
206
  setFilteringCards: (cards: TCard[]) => void;
@@ -321,7 +312,6 @@ type Actions = {
321
312
  removeFrame: (sheetId: string, frameId: string) => void;
322
313
  removeCard: (sheetId: string, card: TCard) => void;
323
314
  setIsDashboardEditing: (editing: boolean) => void;
324
- setShowContext: (show: boolean) => void;
325
315
  setShowDashboardJSON: (show: boolean) => void;
326
316
  setIsVisualEditing: (editing: boolean) => void;
327
317
  setShowFilters: (show: boolean) => void;
@@ -1,4 +1,4 @@
1
- import { ColorRange, TCard, TCardPreferences, TCustomCardPreferences, TFrame, TLegendOptions, AIScopeTable, AggregateCalc, SqlGen, ControlDefinition } from '../types/common-types.js';
1
+ import { ColorRange, TCard, TCardPreferences, TCustomCardPreferences, TFrame, TLegendOptions, AggregateCalc, SqlGen, ControlDefinition } from '../types/common-types.js';
2
2
  import { TFilterValue } from '../../components/surfboard/filter/types.js';
3
3
  import { TChartType } from '../charts/types.js';
4
4
  import { FilterByColumn, OldFilterValue, GroupByColumn, MetricColumn, OrderBy, QueryConfig } from '../types/query-types.js';
@@ -61,9 +61,6 @@ export type EditorStore = {
61
61
  queryData: any;
62
62
  };
63
63
  isDevMode: boolean;
64
- showAIDialog: boolean;
65
- userInputForAI: string;
66
- triggerAIRun: boolean;
67
64
  runSql: boolean;
68
65
  isSqlRunning: boolean;
69
66
  actions: Actions;
@@ -83,7 +80,6 @@ export type EditorStore = {
83
80
  selectedDatabaseName?: string;
84
81
  selectedSchemaName?: string;
85
82
  selectedTableName?: string;
86
- currentAssitantScope?: AIScopeTable[];
87
83
  onConnectionChange?: (connectionId: string) => void;
88
84
  onDatamodelChange?: (datamodelId: string) => void;
89
85
  onDatabaseChange?: (databaseName: string) => void;
@@ -152,13 +148,8 @@ type Actions = TableActions & ExplorerActions & {
152
148
  updateGroupByColumnOld: (columnId: string, column: GroupByColumn) => void;
153
149
  updatePivotByColumnOld: (columnId: string, column: GroupByColumn) => void;
154
150
  updateFilterColumn: (columnId: string, column: FilterByColumn) => void;
155
- setCurrentAssitantScope: (currentAssitantScope: AIScopeTable[]) => void;
156
151
  setChartGrid: (chartGrid: 'xy' | 'x' | 'y' | 'none') => void;
157
152
  setLegendOptions: (legendOptions: TLegendOptions) => void;
158
- runAssistant: (message: string) => void;
159
- setShowAIDialog: (showAIDialog: boolean) => void;
160
- setUserInputForAI: (userInputForAI: string) => void;
161
- setTriggerAIRun: (triggerAIRun: boolean) => void;
162
153
  setActiveTabCardId: (activeTabCardId: string) => void;
163
154
  updateCardTab: (activeTabCardId: string, currentCard: TCard) => void;
164
155
  setSortChart: (sortChart: 'asc' | 'desc' | 'none') => void;
@@ -0,0 +1,20 @@
1
+ import { SelectedEntities } from './explorer-types.js';
2
+ export type FileAttachment = {
3
+ id: string;
4
+ name: string;
5
+ size: number;
6
+ type: string;
7
+ data?: string;
8
+ url?: string;
9
+ preview?: string;
10
+ uploadProgress?: number;
11
+ };
12
+ export type AIContext = {
13
+ selectedEntities: SelectedEntities;
14
+ fileAttachments?: FileAttachment[];
15
+ };
16
+ export type DashboardAIContextMode = 'auto' | 'fixed';
17
+ /** The dashboard's data scope, persisted as `TDashboard.aiContext`. */
18
+ export type DashboardAIContext = AIContext & {
19
+ mode?: DashboardAIContextMode;
20
+ };
@@ -11,7 +11,7 @@ import { ClickToFilterSettings, LinkedClickToFilterOverrides } from '../../share
11
11
  import { SelectionInputValue } from '../../shared/analytics-protocol/selection-contract.js';
12
12
  import { ResolvedCardSelection } from '../dashboard-inputs/resolve-selection-input.js';
13
13
  import { TransientInputContext } from '../dashboard-inputs/transient-input-context.js';
14
- import { DashboardAIContext } from './assistant-types.js';
14
+ import { DashboardAIContext } from './ai-context-types.js';
15
15
  import { CardInteractionConfig, InteractionTargetOverride } from './interaction-types.js';
16
16
  import { SemanticExecutionPayload } from './semantic-runtime-types.js';
17
17
  import { ReportRuntimeContext } from '../../shared/report-runtime-context/index.js';
@@ -76,7 +76,6 @@ export type Theme = 'dark' | 'light' | 'system';
76
76
  export type GetDashboardResponse = {
77
77
  dashboard: TDashboard;
78
78
  initialReportContext: ReportRuntimeContext;
79
- assistantProfileId?: string;
80
79
  semanticExecutionPayload: SemanticExecutionPayload;
81
80
  organizationAppearance?: import('../appearance/types.js').AppearanceSpec | null;
82
81
  /**
@@ -271,7 +270,6 @@ export type DashboardProps = {
271
270
  appearance?: import('../appearance/types.js').AppearanceSpec;
272
271
  currentTheme?: Theme;
273
272
  version?: string;
274
- showAssistant?: boolean;
275
273
  showBriefings?: boolean;
276
274
  customCards?: CustomCard[];
277
275
  onChartElementClicked?: (card: TCard, fieldValues: any) => void;
@@ -1601,7 +1599,6 @@ export type TDashboard = {
1601
1599
  filters?: TFilter[];
1602
1600
  customCards?: CustomCard[];
1603
1601
  baseQueries?: TBaseQuery[];
1604
- aiScopeTables?: AIScopeTable[];
1605
1602
  globalStyle?: TStyle;
1606
1603
  globalCacheConfig?: CacheConfig;
1607
1604
  defaultFilterValues?: TFilterValue[];
@@ -1638,12 +1635,6 @@ export type LoadingProps = {
1638
1635
  export type ErrorProps = {
1639
1636
  message?: string;
1640
1637
  };
1641
- export type TCardContext = {
1642
- id: string;
1643
- name: string;
1644
- description: string;
1645
- sql: string;
1646
- };
1647
1638
  type Params = {
1648
1639
  [key: string]: string | number | string[] | number[];
1649
1640
  };
@@ -1652,16 +1643,6 @@ export type ConnectionPolicy = {
1652
1643
  name: string;
1653
1644
  params: Params;
1654
1645
  };
1655
- export type AIScopeTable = {
1656
- connectionId: string;
1657
- connectionType: string;
1658
- databaseName: string;
1659
- schemaName: string;
1660
- tableName: string;
1661
- datamodelId: string;
1662
- datamodelName: string;
1663
- };
1664
- export type AssistantId = 'dashboard-assistant' | 'editor-assistant';
1665
1646
  export interface UserPreference {
1666
1647
  id: string;
1667
1648
  actorType: 'ORG_USER' | 'TENANT_USER';
@@ -77,12 +77,6 @@ export type UIConfig = {
77
77
  * Defaults to true unless explicitly disabled.
78
78
  */
79
79
  showInfoTab?: boolean;
80
- /**
81
- * Controls dashboard assistant visibility.
82
- * If set, this takes precedence over the embed prop `showAssistant`.
83
- * If unset, runtime falls back to `showAssistant`; if both are unset, assistant is hidden.
84
- */
85
- showDashboardAssistant?: boolean;
86
80
  /**
87
81
  * Controls briefing authoring visibility in the dashboard toolbar.
88
82
  * If set, this takes precedence over the embed prop `showBriefings`.
@@ -115,7 +109,6 @@ export type UIConfig = {
115
109
  projectFeatures?: {
116
110
  schemaVersion: 'project-features/v1';
117
111
  features: {
118
- dashboardAssistant: boolean;
119
112
  dashboardAiAuthoring: boolean;
120
113
  analyticalBriefings: boolean;
121
114
  aiWritingHelpers: boolean;
@@ -29,7 +29,6 @@ export declare function getTenantAndEndUserId(accessToken: string | undefined):
29
29
  tenantId: string;
30
30
  endUserId: string;
31
31
  };
32
- export declare function getAssistantProfileIdFromToken(accessToken: string | undefined): string | undefined;
33
32
  export declare function getTokenParams(accessToken: string | undefined): import('./types/index.js').TokenParams | undefined;
34
33
  export declare function copyToClipboard<T extends RefObject<HTMLElement | null>>(contentRef: T): void;
35
34
  export declare function resolveBaseQuery(sqlQuery: string | undefined, baseQueries: TBaseQuery[] | undefined): string;
@@ -44,7 +43,6 @@ export declare function invalidateToken(apiServiceUrl: string): Promise<any>;
44
43
  export declare function getDashboard(apiServiceUrl: string, accessToken: string | undefined, params?: {}): Promise<{
45
44
  initialReportContext: import('../shared/report-runtime-context/index.js').ReportRuntimeContext;
46
45
  dashboard: import('./types/common-types.js').TDashboard;
47
- assistantProfileId?: string;
48
46
  semanticExecutionPayload: import('./types/semantic-runtime-types.js').SemanticExecutionPayload;
49
47
  organizationAppearance?: import('./types/index.js').AppearanceSpec | null;
50
48
  viewer?: import('./types/index.js').DashboardViewerPayload;
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "email": "support@semaphor.cloud"
6
6
  },
7
7
  "license": "MIT",
8
- "version": "0.1.534",
8
+ "version": "0.1.535",
9
9
  "description": "Fully interactive and customizable dashboards for your apps.",
10
10
  "keywords": [
11
11
  "react",
@@ -56,10 +56,6 @@
56
56
  "types": "./dist/types/analytics-protocol.d.ts",
57
57
  "import": "./dist/analytics-protocol/index.js"
58
58
  },
59
- "./dashboard-assistant": {
60
- "types": "./dist/types/dashboard-assistant.d.ts",
61
- "import": "./dist/dashboard-assistant/index.js"
62
- },
63
59
  "./data-app-sdk": {
64
60
  "types": "./dist/types/data-app-sdk.d.ts",
65
61
  "import": "./dist/data-app-sdk/index.js"
@@ -144,7 +140,6 @@
144
140
  "link:restore": "./scripts/link-helper.sh restore"
145
141
  },
146
142
  "dependencies": {
147
- "@ai-sdk/react": "^2.0.72",
148
143
  "@dnd-kit/core": "^6.3.1",
149
144
  "@dnd-kit/sortable": "^10.0.0",
150
145
  "@dnd-kit/utilities": "^3.2.2",
@@ -184,7 +179,6 @@
184
179
  "@tanstack/react-query": "^5.62.15",
185
180
  "@tanstack/react-table": "^8.11.7",
186
181
  "@tanstack/react-virtual": "^3.13.26",
187
- "ai": "^5.0.7",
188
182
  "chart.js": "^4.4.1",
189
183
  "chartjs-chart-funnel": "^4.2.4",
190
184
  "chartjs-chart-geo": "^4.3.4",