react-semaphor 0.1.127 → 0.1.129

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 (32) hide show
  1. package/dist/chunks/dashboard-controls-CdYJPicU.js +1539 -0
  2. package/dist/chunks/dashboard-controls-D9rqbD5g.js +26 -0
  3. package/dist/chunks/dashboard-export-dialog-BjqND5hL.js +6 -0
  4. package/dist/chunks/dashboard-export-dialog-DNF_PQZb.js +601 -0
  5. package/dist/chunks/{dashboard-json-Bqddgxcf.js → dashboard-json-Dtshd-QS.js} +1 -1
  6. package/dist/chunks/{dashboard-json-CZrxKZBn.js → dashboard-json-xVrkPU1h.js} +1 -1
  7. package/dist/chunks/{edit-dashboard-visual-Du3rYBkf.js → edit-dashboard-visual-VEw_9V-L.js} +187 -187
  8. package/dist/chunks/{edit-dashboard-visual-Kg8h34hs.js → edit-dashboard-visual-YSsXOgAP.js} +1 -1
  9. package/dist/chunks/{editor-action-buttons-BMeOcqc2.js → editor-action-buttons-BFF_pszh.js} +2 -2
  10. package/dist/chunks/{editor-action-buttons-DHk1Cdb6.js → editor-action-buttons-C3KskLE0.js} +1 -1
  11. package/dist/chunks/{index-DJmpV5Lg.js → index-Df1tIEqs.js} +219 -219
  12. package/dist/chunks/{index-DLxVadBx.js → index-vRQsO2Ki.js} +20503 -20317
  13. package/dist/chunks/{resource-management-panel-D6gqCHWr.js → resource-management-panel-C2Ee-LoN.js} +1 -1
  14. package/dist/chunks/{resource-management-panel-VT7LYPp8.js → resource-management-panel-DBZxxjm6.js} +88 -88
  15. package/dist/chunks/{use-visual-utils-DpxMI5Pe.js → use-visual-utils-BMr6v4np.js} +8 -8
  16. package/dist/chunks/{use-visual-utils-O1QcxL8l.js → use-visual-utils-Cdg5yE9F.js} +1 -1
  17. package/dist/dashboard/index.cjs +1 -1
  18. package/dist/dashboard/index.js +1 -1
  19. package/dist/index.cjs +2 -2
  20. package/dist/index.js +88 -87
  21. package/dist/style.css +1 -1
  22. package/dist/surfboard/index.cjs +1 -1
  23. package/dist/surfboard/index.js +1 -1
  24. package/dist/types/dashboard.d.ts +9 -0
  25. package/dist/types/main.d.ts +27 -42
  26. package/dist/types/surfboard.d.ts +9 -0
  27. package/dist/types/types.d.ts +9 -0
  28. package/package.json +1 -1
  29. package/dist/chunks/dashboard-controls-BFo8ClGD.js +0 -1473
  30. package/dist/chunks/dashboard-controls-CpNsaWbB.js +0 -26
  31. package/dist/chunks/dashboard-export-dialog-CKGJIz95.js +0 -6
  32. package/dist/chunks/dashboard-export-dialog-CKr9o8DW.js +0 -600
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../chunks/index-DJmpV5Lg.js"),r=require("../types/index.cjs");exports.Surfboard=e.DashboardPlus;exports.EMPTY_SELECTION=r.EMPTY_SELECTION;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../chunks/index-Df1tIEqs.js"),r=require("../types/index.cjs");exports.Surfboard=e.DashboardPlus;exports.EMPTY_SELECTION=r.EMPTY_SELECTION;
@@ -1,4 +1,4 @@
1
- import { a } from "../chunks/index-DLxVadBx.js";
1
+ import { a } from "../chunks/index-vRQsO2Ki.js";
2
2
  import { EMPTY_SELECTION as E } from "../types/index.js";
3
3
  export {
4
4
  E as EMPTY_SELECTION,
@@ -271,6 +271,7 @@ declare interface ColumnSettings {
271
271
  timezone?: string;
272
272
  sourceTimezone?: string;
273
273
  };
274
+ linkFormat: LinkFormat;
274
275
  colorRanges: ColorRange_2[];
275
276
  }
276
277
 
@@ -835,6 +836,14 @@ export declare type KPICardProps = {
835
836
 
836
837
  export declare type Level = 'database' | 'schema' | 'table';
837
838
 
839
+ declare interface LinkFormat {
840
+ urlTemplate: string;
841
+ labelType: 'value' | 'static' | 'column';
842
+ staticLabel?: string;
843
+ labelColumn?: string;
844
+ openInNewTab: boolean;
845
+ }
846
+
838
847
  export declare type LoadingProps = {
839
848
  message?: string;
840
849
  };
@@ -1,17 +1,12 @@
1
- import { AIContext as AIContext_2 } from '../../lib/types/assistant-types';
2
- import { AIScopeTable as AIScopeTable_2 } from '..';
3
- import { CacheConfig as CacheConfig_2 } from '..';
4
1
  import { Chart } from 'chart.js';
5
2
  import { ChartConfiguration } from 'chart.js';
6
3
  import { ColumnSizingState } from '@tanstack/react-table';
7
4
  import { ComboBoxOption as ComboBoxOption_2 } from '../../components/surfboard/filter/types';
8
5
  import { ComparisonMetadata as ComparisonMetadata_2 } from '../types/query-types';
9
- import { CustomCard as CustomCard_2 } from '..';
10
6
  import { DateRange } from 'react-day-picker';
11
7
  import { default as default_2 } from 'react-grid-layout';
12
8
  import { Dialect as Dialect_2 } from '../types/explorer-types';
13
9
  import { DropdownItem as DropdownItem_2 } from '../types/dropdown-types';
14
- import { EmailSettings as EmailSettings_2 } from '..';
15
10
  import { FontSpec } from 'chart.js';
16
11
  import { GroupByField as GroupByField_2 } from '../types/explorer-types';
17
12
  import { JSX as JSX_2 } from 'react/jsx-runtime';
@@ -22,11 +17,7 @@ import { QueryObserverResult } from '@tanstack/query-core';
22
17
  import * as React_2 from 'react';
23
18
  import { RefetchOptions } from '@tanstack/query-core';
24
19
  import { StoreApi } from 'zustand';
25
- import { TBaseQuery as TBaseQuery_2 } from '..';
26
20
  import { TDbCapabilities as TDbCapabilities_2 } from '../types';
27
- import { TFilter as TFilter_2 } from '../surfboard/filter/types';
28
- import { TFilterValue as TFilterValue_2 } from '..';
29
- import { TStyle as TStyle_2 } from '..';
30
21
  import { UseBoundStore } from 'zustand';
31
22
  import { WritableDraft } from 'immer';
32
23
 
@@ -472,8 +463,6 @@ declare type CardWithFooter = BaseCustomCard & {
472
463
  }>;
473
464
  };
474
465
 
475
- export declare function cleanCard(card: TCard): TCard;
476
-
477
466
  export declare interface ClickedMetricValue {
478
467
  field: Field;
479
468
  value: number;
@@ -539,6 +528,8 @@ export declare interface ClickFilterInteraction {
539
528
  label?: string;
540
529
  }
541
530
 
531
+ export declare const cloneDeep: (value: any) => any;
532
+
542
533
  export declare type ColorConfig = {
543
534
  segments: Record<string, string>;
544
535
  };
@@ -585,6 +576,7 @@ declare interface ColumnSettings {
585
576
  timezone?: string;
586
577
  sourceTimezone?: string;
587
578
  };
579
+ linkFormat: LinkFormat;
588
580
  colorRanges: ColorRange_2[];
589
581
  }
590
582
 
@@ -1388,37 +1380,6 @@ export declare function fmt(str: string): string;
1388
1380
 
1389
1381
  export declare function getColumnDataType(column: TDataColumn): string;
1390
1382
 
1391
- export declare function getDashbaordStateWithoutData(dashboardState: TDashboard): {
1392
- sheets: {
1393
- frames: {
1394
- cards: TCard[];
1395
- id: string;
1396
- visualId?: string;
1397
- filterId?: string;
1398
- activeCardId: string;
1399
- }[] | undefined;
1400
- id: string;
1401
- title?: string;
1402
- description?: string;
1403
- layout?: ReactGridLayout.Layout[];
1404
- layouts?: ReactGridLayout.Layouts;
1405
- cards?: TCard[];
1406
- }[] | undefined;
1407
- id: string;
1408
- title?: string;
1409
- aiContext?: AIContext_2;
1410
- description?: string;
1411
- style?: TStyle_2;
1412
- filters?: TFilter_2[];
1413
- customCards?: CustomCard_2[];
1414
- baseQueries?: TBaseQuery_2[];
1415
- aiScopeTables?: AIScopeTable_2[];
1416
- globalStyle?: TStyle_2;
1417
- globalCacheConfig?: CacheConfig_2;
1418
- emailSettings?: EmailSettings_2;
1419
- defaultFilterValues?: TFilterValue_2[];
1420
- };
1421
-
1422
1383
  export declare type GetDashboardResponse = {
1423
1384
  dashboard: TDashboard;
1424
1385
  lenses: TLens[];
@@ -1683,6 +1644,14 @@ export declare type KPICardProps = {
1683
1644
 
1684
1645
  export declare type Level = 'database' | 'schema' | 'table';
1685
1646
 
1647
+ declare interface LinkFormat {
1648
+ urlTemplate: string;
1649
+ labelType: 'value' | 'static' | 'column';
1650
+ staticLabel?: string;
1651
+ labelColumn?: string;
1652
+ openInNewTab: boolean;
1653
+ }
1654
+
1686
1655
  export declare type LoadingProps = {
1687
1656
  message?: string;
1688
1657
  };
@@ -2760,6 +2729,16 @@ export declare type UIConfig = {
2760
2729
  showDashboardAssistant?: boolean;
2761
2730
  };
2762
2731
 
2732
+ export declare function UnsavedChangesAlert({ open, onOpenChange, onSave, onDiscard, isSaving, }: UnsavedChangesAlertProps): JSX_2.Element;
2733
+
2734
+ declare type UnsavedChangesAlertProps = {
2735
+ open: boolean;
2736
+ onOpenChange: (open: boolean) => void;
2737
+ onSave: () => Promise<void>;
2738
+ onDiscard: () => void;
2739
+ isSaving: boolean;
2740
+ };
2741
+
2763
2742
  export declare interface UpdateUserPreferenceRequest {
2764
2743
  defaultDashboardId: string | null;
2765
2744
  }
@@ -2900,6 +2879,12 @@ export declare const useEditorStore: UseBoundStore<Omit<StoreApi<EditorStore>, "
2900
2879
  setState(nextStateOrUpdater: EditorStore | Partial<EditorStore> | ((state: WritableDraft<EditorStore>) => void), shouldReplace?: boolean | undefined): void;
2901
2880
  }>;
2902
2881
 
2882
+ /**
2883
+ * Initialize a pristine dashboard snapshot whenever edit mode turns on.
2884
+ * Keeps logic centralized so programmatic entry points are covered.
2885
+ */
2886
+ export declare function usePristineSnapshotInitializer(isDashboardEditing: boolean, dashboardState: TDashboard, pristineDashboard: TDashboard | null, setPristineDashboard: (dashboard: TDashboard) => void): void;
2887
+
2903
2888
  export declare interface UserPreference {
2904
2889
  id: string;
2905
2890
  actorType: 'ORG_USER' | 'TENANT_USER';
@@ -271,6 +271,7 @@ declare interface ColumnSettings {
271
271
  timezone?: string;
272
272
  sourceTimezone?: string;
273
273
  };
274
+ linkFormat: LinkFormat;
274
275
  colorRanges: ColorRange_2[];
275
276
  }
276
277
 
@@ -838,6 +839,14 @@ export declare type KPICardProps = {
838
839
 
839
840
  export declare type Level = 'database' | 'schema' | 'table';
840
841
 
842
+ declare interface LinkFormat {
843
+ urlTemplate: string;
844
+ labelType: 'value' | 'static' | 'column';
845
+ staticLabel?: string;
846
+ labelColumn?: string;
847
+ openInNewTab: boolean;
848
+ }
849
+
841
850
  export declare type LoadingProps = {
842
851
  message?: string;
843
852
  };
@@ -270,6 +270,7 @@ declare interface ColumnSettings {
270
270
  timezone?: string;
271
271
  sourceTimezone?: string;
272
272
  };
273
+ linkFormat: LinkFormat;
273
274
  colorRanges: ColorRange_2[];
274
275
  }
275
276
 
@@ -832,6 +833,14 @@ export declare type KPICardProps = {
832
833
 
833
834
  export declare type Level = 'database' | 'schema' | 'table';
834
835
 
836
+ declare interface LinkFormat {
837
+ urlTemplate: string;
838
+ labelType: 'value' | 'static' | 'column';
839
+ staticLabel?: string;
840
+ labelColumn?: string;
841
+ openInNewTab: boolean;
842
+ }
843
+
835
844
  export declare type LoadingProps = {
836
845
  message?: string;
837
846
  };
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "email": "support@semaphor.cloud"
6
6
  },
7
7
  "license": "MIT",
8
- "version": "0.1.127",
8
+ "version": "0.1.129",
9
9
  "description": "Fully interactive and customizable dashboards for your apps.",
10
10
  "keywords": [
11
11
  "react",