react-semaphor 0.1.208 → 0.1.210

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 (46) hide show
  1. package/dist/chunks/dashboard-controls-BAOrAMV9.js +42 -0
  2. package/dist/chunks/{dashboard-controls-yOzrvYwI.js → dashboard-controls-C08300Wi.js} +504 -456
  3. package/dist/chunks/{dashboard-json-BuLoVNV4.js → dashboard-json-DlEE5-WA.js} +1 -1
  4. package/dist/chunks/{dashboard-json-DqChvVCF.js → dashboard-json-GjDBGO26.js} +1 -1
  5. package/dist/chunks/{dashboard-summary-settings-dialog-tJueBNph.js → dashboard-summary-settings-dialog-QUuhhXU9.js} +1 -1
  6. package/dist/chunks/{dashboard-summary-settings-dialog-DmccX33N.js → dashboard-summary-settings-dialog-THx-gjnG.js} +1 -1
  7. package/dist/chunks/{edit-dashboard-visual-CV4JsCTg.js → edit-dashboard-visual-Bsmow1Pa.js} +3422 -3536
  8. package/dist/chunks/edit-dashboard-visual-PfWJXb2-.js +164 -0
  9. package/dist/chunks/editor-action-buttons-DNbp_ZWy.js +404 -0
  10. package/dist/chunks/editor-action-buttons-FPyaC09X.js +21 -0
  11. package/dist/chunks/{index-CBcPi9pm.js → index-CAVrkf9d.js} +24248 -23818
  12. package/dist/chunks/index-CXKjmjfB.js +1104 -0
  13. package/dist/chunks/normalize-dashboard-for-dirty-check-D9x96J2F.js +1 -0
  14. package/dist/chunks/normalize-dashboard-for-dirty-check-XKgH3GFX.js +119 -0
  15. package/dist/chunks/notification-bell-BqvKQSw9.js +6 -0
  16. package/dist/chunks/notification-bell-C3a7wC1u.js +871 -0
  17. package/dist/chunks/resource-management-panel-BVTgbma8.js +913 -0
  18. package/dist/chunks/resource-management-panel-C5NjrVsA.js +6 -0
  19. package/dist/chunks/{use-role-aware-display-preferences-DTSpe_ZT.js → use-role-aware-display-preferences-DxCPoCgr.js} +1 -1
  20. package/dist/chunks/{use-role-aware-display-preferences-B4QJkliF.js → use-role-aware-display-preferences-l7NFLYnn.js} +1 -1
  21. package/dist/chunks/{use-visual-utils-ChR-Jti8.js → use-visual-utils-B82Q-Ytl.js} +1 -1
  22. package/dist/chunks/{use-visual-utils-CCT3ABI5.js → use-visual-utils-D9IJz9R0.js} +34 -34
  23. package/dist/dashboard/index.cjs +1 -1
  24. package/dist/dashboard/index.js +1 -1
  25. package/dist/index.cjs +1 -1
  26. package/dist/index.js +44 -40
  27. package/dist/shared/index.cjs +1 -0
  28. package/dist/shared/index.js +6 -0
  29. package/dist/style.css +1 -1
  30. package/dist/surfboard/index.cjs +1 -1
  31. package/dist/surfboard/index.js +2 -2
  32. package/dist/types/dashboard.d.ts +12 -1
  33. package/dist/types/main.d.ts +52 -2
  34. package/dist/types/shared.d.ts +1762 -0
  35. package/dist/types/surfboard.d.ts +12 -1
  36. package/dist/types/types.d.ts +12 -1
  37. package/package.json +6 -1
  38. package/dist/chunks/dashboard-controls-K5zNLdtH.js +0 -42
  39. package/dist/chunks/edit-dashboard-visual-CKNlwaCO.js +0 -179
  40. package/dist/chunks/editor-action-buttons-CAjqJiT_.js +0 -340
  41. package/dist/chunks/editor-action-buttons-DQVh7L5i.js +0 -11
  42. package/dist/chunks/index-DQOwJyRp.js +0 -1104
  43. package/dist/chunks/notification-bell-B-OVf20Q.js +0 -862
  44. package/dist/chunks/notification-bell-DyzIftQU.js +0 -11
  45. package/dist/chunks/resource-management-panel-D_mSi7Cm.js +0 -914
  46. package/dist/chunks/resource-management-panel-NqaNfAq3.js +0 -6
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../chunks/index-DQOwJyRp.js"),a=require("../chunks/common-types-CfJLrTJd.js"),e=require("../chunks/dashboard-summary-settings-dialog-tJueBNph.js");exports.Surfboard=r.DashboardPlus;exports.EMPTY_SELECTION=a.EMPTY_SELECTION;exports.CalendarPreferencesDialog=e.CalendarPreferencesDialog;exports.DashboardSummarySettingsDialog=e.DashboardSummarySettingsDialog;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../chunks/index-CXKjmjfB.js"),a=require("../chunks/common-types-CfJLrTJd.js"),e=require("../chunks/dashboard-summary-settings-dialog-QUuhhXU9.js");exports.Surfboard=r.DashboardPlus;exports.EMPTY_SELECTION=a.EMPTY_SELECTION;exports.CalendarPreferencesDialog=e.CalendarPreferencesDialog;exports.DashboardSummarySettingsDialog=e.DashboardSummarySettingsDialog;
@@ -1,6 +1,6 @@
1
- import { a as o } from "../chunks/index-CBcPi9pm.js";
1
+ import { a as o } from "../chunks/index-CAVrkf9d.js";
2
2
  import { E as s } from "../chunks/common-types-DhqlRVrq.js";
3
- import { C as m, D as t } from "../chunks/dashboard-summary-settings-dialog-DmccX33N.js";
3
+ import { C as m, D as t } from "../chunks/dashboard-summary-settings-dialog-THx-gjnG.js";
4
4
  export {
5
5
  m as CalendarPreferencesDialog,
6
6
  t as DashboardSummarySettingsDialog,
@@ -187,7 +187,7 @@ declare interface CardInteractionConfig {
187
187
  * V2: Unified interactions array.
188
188
  * Each interaction includes a trigger that specifies what element must be clicked.
189
189
  */
190
- interactions?: Interaction[];
190
+ interactions?: PersistedInteraction[];
191
191
  allowedDrillTargets?: Field[];
192
192
  drillHierarchies?: DrillHierarchy[];
193
193
  }
@@ -879,6 +879,11 @@ declare interface InlineDrillInteraction {
879
879
  */
880
880
  declare type Interaction = ClickFilterInteraction | DrillDownInteraction | DrillThroughInteraction | DrillToDetailInteraction | DrillToURLInteraction | InlineDrillInteraction | DrillUpInteraction | DynamicDrillInteraction;
881
881
 
882
+ declare interface InteractionTargetOverride {
883
+ applyToCardIds?: string[] | null;
884
+ excludeCardIds?: string[] | null;
885
+ }
886
+
882
887
  /**
883
888
  * Defines what element must be clicked to trigger an interaction.
884
889
  *
@@ -1053,6 +1058,10 @@ declare type Params = {
1053
1058
  [key: string]: string | number | string[] | number[];
1054
1059
  };
1055
1060
 
1061
+ declare type PersistedInteraction = Interaction & {
1062
+ id?: string;
1063
+ };
1064
+
1056
1065
  declare interface PivotByField extends Field {
1057
1066
  role: 'pivotby';
1058
1067
  }
@@ -1333,6 +1342,8 @@ export declare type TCard = {
1333
1342
  dataSource?: DataSource;
1334
1343
  config?: CardConfig;
1335
1344
  interactionConfig?: CardInteractionConfig;
1345
+ linkedSourceCardId?: string;
1346
+ linkedInteractionTargetOverrides?: Record<string, InteractionTargetOverride>;
1336
1347
  paginationConfig?: PaginationConfig;
1337
1348
  queryConfig?: QueryConfig;
1338
1349
  customCfg?: any;
@@ -822,7 +822,7 @@ export declare interface CardInteractionConfig {
822
822
  * V2: Unified interactions array.
823
823
  * Each interaction includes a trigger that specifies what element must be clicked.
824
824
  */
825
- interactions?: Interaction[];
825
+ interactions?: PersistedInteraction[];
826
826
  allowedDrillTargets?: Field[];
827
827
  drillHierarchies?: DrillHierarchy[];
828
828
  }
@@ -2340,6 +2340,11 @@ export declare interface InteractionState {
2340
2340
  targetDashboardId?: string;
2341
2341
  }
2342
2342
 
2343
+ export declare interface InteractionTargetOverride {
2344
+ applyToCardIds?: string[] | null;
2345
+ excludeCardIds?: string[] | null;
2346
+ }
2347
+
2343
2348
  /**
2344
2349
  * Defines what element must be clicked to trigger an interaction.
2345
2350
  *
@@ -2574,6 +2579,14 @@ export declare type ModelItem = DropdownItem;
2574
2579
 
2575
2580
  declare type NoneOptions = {};
2576
2581
 
2582
+ /**
2583
+ * Normalizes dashboard layout objects into a canonical structure:
2584
+ * - strips transient react-grid-layout runtime fields
2585
+ * - sorts layout arrays deterministically
2586
+ * - keeps all breakpoints so md/xs-only edits still register as dirty
2587
+ */
2588
+ export declare function normalizeDashboardForDirtyCheck(dashboard: TDashboard | null): TDashboard | null;
2589
+
2577
2590
  /**
2578
2591
  * Notification bell icon with badge.
2579
2592
  *
@@ -2642,6 +2655,10 @@ declare type Params = {
2642
2655
  [key: string]: string | number | string[] | number[];
2643
2656
  };
2644
2657
 
2658
+ export declare type PersistedInteraction = Interaction & {
2659
+ id?: string;
2660
+ };
2661
+
2645
2662
  export declare interface PivotByField extends Field {
2646
2663
  role: 'pivotby';
2647
2664
  }
@@ -2847,6 +2864,13 @@ declare function SemaphorQueryClient({ children, }: {
2847
2864
  export { SemaphorQueryClient as SemaphorDataProvider }
2848
2865
  export { SemaphorQueryClient }
2849
2866
 
2867
+ /**
2868
+ * Stable serializer for dashboard dirty checks.
2869
+ * This consolidates normalization + serialization into one call site, so
2870
+ * callers can avoid separate pre-normalization state objects.
2871
+ */
2872
+ export declare function serializeDashboardForDirtyCheck(dashboard: TDashboard | null): string;
2873
+
2850
2874
  export declare function ShareDialog({ resource, resourceType, onClose, onShareSuccess, onRemoveSuccess, }: ShareDialogProps): JSX.Element;
2851
2875
 
2852
2876
  declare interface ShareDialogProps {
@@ -2884,6 +2908,8 @@ export declare type SqlGen = {
2884
2908
  dimensions?: string[];
2885
2909
  };
2886
2910
 
2911
+ declare type StateSerializer<T> = (value: T) => string;
2912
+
2887
2913
  declare type StringOptions = {
2888
2914
  maxLength?: number;
2889
2915
  };
@@ -3184,6 +3210,8 @@ export declare type TCard = {
3184
3210
  dataSource?: DataSource;
3185
3211
  config?: CardConfig;
3186
3212
  interactionConfig?: CardInteractionConfig;
3213
+ linkedSourceCardId?: string;
3214
+ linkedInteractionTargetOverrides?: Record<string, InteractionTargetOverride>;
3187
3215
  paginationConfig?: PaginationConfig;
3188
3216
  queryConfig?: QueryConfig;
3189
3217
  customCfg?: any;
@@ -3973,7 +4001,7 @@ export declare type UIConfig = {
3973
4001
  showDashboardAssistant?: boolean;
3974
4002
  };
3975
4003
 
3976
- export declare function UnsavedChangesAlert({ open, onOpenChange, onSave, onDiscard, isSaving, }: UnsavedChangesAlertProps): JSX.Element;
4004
+ export declare function UnsavedChangesAlert({ open, onOpenChange, onSave, onDiscard, isSaving, title, description, cancelLabel, discardLabel, saveLabel, }: UnsavedChangesAlertProps): JSX.Element;
3977
4005
 
3978
4006
  declare type UnsavedChangesAlertProps = {
3979
4007
  open: boolean;
@@ -3981,6 +4009,11 @@ declare type UnsavedChangesAlertProps = {
3981
4009
  onSave: () => Promise<void>;
3982
4010
  onDiscard: () => void;
3983
4011
  isSaving: boolean;
4012
+ title?: string;
4013
+ description?: string;
4014
+ cancelLabel?: string;
4015
+ discardLabel?: string;
4016
+ saveLabel?: string;
3984
4017
  };
3985
4018
 
3986
4019
  export declare function updateAlert(apiServiceUrl: string, token: string, id: string, payload: UpdateAlertRequest): Promise<{
@@ -4024,6 +4057,7 @@ declare interface UpdateResourceRequest {
4024
4057
  title?: string;
4025
4058
  description?: string;
4026
4059
  isPrivate?: boolean;
4060
+ expectedLastModified?: string;
4027
4061
  }
4028
4062
 
4029
4063
  export declare interface UpdateUserPreferenceRequest {
@@ -4574,6 +4608,22 @@ export declare function useDateFilterHook(filterId: string): {
4574
4608
  handleReset: () => void;
4575
4609
  };
4576
4610
 
4611
+ /**
4612
+ * Efficiently checks if current state differs from pristine state
4613
+ * using debouncing and requestIdleCallback to avoid blocking the main thread.
4614
+ *
4615
+ * @param currentState - The current state to compare
4616
+ * @param pristineState - The original state to compare against (null if not tracking)
4617
+ * @param debounceMs - Milliseconds to wait after last change (default: 300)
4618
+ * @param idleTimeout - Max ms to wait for idle time (default: 1000)
4619
+ * @returns Object with isDirty boolean and resetDirty function to immediately clear dirty state
4620
+ */
4621
+ export declare function useDebouncedDirtyCheck<T>(currentState: T, pristineState: T | null, debounceMs?: number, idleTimeout?: number, serializeState?: StateSerializer<T>): {
4622
+ isDirty: boolean;
4623
+ isDirtyPending: boolean;
4624
+ resetDirty: () => void;
4625
+ };
4626
+
4577
4627
  export declare const useEditorActions: () => Actions_3;
4578
4628
 
4579
4629
  export declare function useEditorAside(token?: AuthToken, _connectionQueryKey?: string): {