react-semaphor 0.1.127 → 0.1.128

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 (29) hide show
  1. package/dist/chunks/dashboard-controls-Dd27T34x.js +26 -0
  2. package/dist/chunks/dashboard-controls-I6kqudDF.js +1539 -0
  3. package/dist/chunks/dashboard-export-dialog-CiZbDQ5t.js +6 -0
  4. package/dist/chunks/dashboard-export-dialog-DEOlAtvs.js +601 -0
  5. package/dist/chunks/{dashboard-json-Bqddgxcf.js → dashboard-json-A6ShtMJP.js} +1 -1
  6. package/dist/chunks/{dashboard-json-CZrxKZBn.js → dashboard-json-D_muUlA0.js} +1 -1
  7. package/dist/chunks/{edit-dashboard-visual-Kg8h34hs.js → edit-dashboard-visual-BgRPk31F.js} +1 -1
  8. package/dist/chunks/{edit-dashboard-visual-Du3rYBkf.js → edit-dashboard-visual-KhJjpeit.js} +187 -187
  9. package/dist/chunks/{editor-action-buttons-DHk1Cdb6.js → editor-action-buttons-cJ_lq4jv.js} +1 -1
  10. package/dist/chunks/{editor-action-buttons-BMeOcqc2.js → editor-action-buttons-umPHWm3K.js} +2 -2
  11. package/dist/chunks/{index-DLxVadBx.js → index-Bko2LZ3Y.js} +371 -369
  12. package/dist/chunks/{index-DJmpV5Lg.js → index-CM_yfKlN.js} +93 -93
  13. package/dist/chunks/{resource-management-panel-VT7LYPp8.js → resource-management-panel-DAdIhRme.js} +88 -88
  14. package/dist/chunks/{resource-management-panel-D6gqCHWr.js → resource-management-panel-DvgyBS2t.js} +1 -1
  15. package/dist/chunks/{use-visual-utils-O1QcxL8l.js → use-visual-utils-80E0OR0x.js} +1 -1
  16. package/dist/chunks/{use-visual-utils-DpxMI5Pe.js → use-visual-utils-C7QMpNLz.js} +8 -8
  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/main.d.ts +18 -42
  25. package/package.json +1 -1
  26. package/dist/chunks/dashboard-controls-BFo8ClGD.js +0 -1473
  27. package/dist/chunks/dashboard-controls-CpNsaWbB.js +0 -26
  28. package/dist/chunks/dashboard-export-dialog-CKGJIz95.js +0 -6
  29. 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-CM_yfKlN.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-Bko2LZ3Y.js";
2
2
  import { EMPTY_SELECTION as E } from "../types/index.js";
3
3
  export {
4
4
  E as EMPTY_SELECTION,
@@ -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
  };
@@ -1388,37 +1379,6 @@ export declare function fmt(str: string): string;
1388
1379
 
1389
1380
  export declare function getColumnDataType(column: TDataColumn): string;
1390
1381
 
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
1382
  export declare type GetDashboardResponse = {
1423
1383
  dashboard: TDashboard;
1424
1384
  lenses: TLens[];
@@ -2760,6 +2720,16 @@ export declare type UIConfig = {
2760
2720
  showDashboardAssistant?: boolean;
2761
2721
  };
2762
2722
 
2723
+ export declare function UnsavedChangesAlert({ open, onOpenChange, onSave, onDiscard, isSaving, }: UnsavedChangesAlertProps): JSX_2.Element;
2724
+
2725
+ declare type UnsavedChangesAlertProps = {
2726
+ open: boolean;
2727
+ onOpenChange: (open: boolean) => void;
2728
+ onSave: () => Promise<void>;
2729
+ onDiscard: () => void;
2730
+ isSaving: boolean;
2731
+ };
2732
+
2763
2733
  export declare interface UpdateUserPreferenceRequest {
2764
2734
  defaultDashboardId: string | null;
2765
2735
  }
@@ -2900,6 +2870,12 @@ export declare const useEditorStore: UseBoundStore<Omit<StoreApi<EditorStore>, "
2900
2870
  setState(nextStateOrUpdater: EditorStore | Partial<EditorStore> | ((state: WritableDraft<EditorStore>) => void), shouldReplace?: boolean | undefined): void;
2901
2871
  }>;
2902
2872
 
2873
+ /**
2874
+ * Initialize a pristine dashboard snapshot whenever edit mode turns on.
2875
+ * Keeps logic centralized so programmatic entry points are covered.
2876
+ */
2877
+ export declare function usePristineSnapshotInitializer(isDashboardEditing: boolean, dashboardState: TDashboard, pristineDashboard: TDashboard | null, setPristineDashboard: (dashboard: TDashboard) => void): void;
2878
+
2903
2879
  export declare interface UserPreference {
2904
2880
  id: string;
2905
2881
  actorType: 'ORG_USER' | 'TENANT_USER';
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.128",
9
9
  "description": "Fully interactive and customizable dashboards for your apps.",
10
10
  "keywords": [
11
11
  "react",