react-semaphor 0.1.144 → 0.1.146

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 (24) hide show
  1. package/dist/chunks/{dashboard-controls-_rTkbfKU.js → dashboard-controls-BTd2GP5a.js} +1 -1
  2. package/dist/chunks/{dashboard-controls-BG6qR7N2.js → dashboard-controls-CE8KM6Tg.js} +199 -199
  3. package/dist/chunks/{dashboard-export-dialog-iH6sg1-y.js → dashboard-export-dialog-D9RPWq-E.js} +26 -26
  4. package/dist/chunks/{dashboard-export-dialog-BXuJmTUR.js → dashboard-export-dialog-DvMsFXpk.js} +1 -1
  5. package/dist/chunks/{dashboard-json-DZkwc1co.js → dashboard-json-B1RDTwhR.js} +1 -1
  6. package/dist/chunks/{dashboard-json-CV6LkrYw.js → dashboard-json-BYlLpF4e.js} +1 -1
  7. package/dist/chunks/{edit-dashboard-visual-tCgjsYbu.js → edit-dashboard-visual-BvFmi5Wg.js} +1002 -1000
  8. package/dist/chunks/{edit-dashboard-visual-TG6Ezk2J.js → edit-dashboard-visual-DEgGCKtt.js} +9 -9
  9. package/dist/chunks/{editor-action-buttons-Czzj0JBw.js → editor-action-buttons-Be2gqSdc.js} +1 -1
  10. package/dist/chunks/{editor-action-buttons-Cvg5mWPC.js → editor-action-buttons-CrwUOyJX.js} +2 -2
  11. package/dist/chunks/{index-Do9K-YLk.js → index-C4H_NxAd.js} +61 -61
  12. package/dist/chunks/{index-CPBGb2zs.js → index-Cz1fGuVl.js} +1 -1
  13. package/dist/chunks/{resource-management-panel-DyeJEtOT.js → resource-management-panel-CBrnB1xs.js} +1 -1
  14. package/dist/chunks/{resource-management-panel-Chc6oyIG.js → resource-management-panel-CmaSAoHN.js} +62 -62
  15. package/dist/chunks/{use-visual-utils-Dtg1I8ku.js → use-visual-utils-DF-sQ-ZN.js} +1 -1
  16. package/dist/chunks/{use-visual-utils-Bf6l2e8y.js → use-visual-utils-DHrvE5kS.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 +26 -25
  21. package/dist/surfboard/index.cjs +1 -1
  22. package/dist/surfboard/index.js +1 -1
  23. package/dist/types/main.d.ts +67 -5
  24. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { a } from "../chunks/index-Do9K-YLk.js";
1
+ import { a } from "../chunks/index-C4H_NxAd.js";
2
2
  import { EMPTY_SELECTION as E } from "../types/index.js";
3
3
  export {
4
4
  E as EMPTY_SELECTION,
@@ -23,6 +23,16 @@ import { UseBoundStore } from 'zustand';
23
23
  import { WritableDraft } from 'immer';
24
24
 
25
25
  declare type Actions = {
26
+ selectDashboard: (dashboard: ResourceListItem) => void;
27
+ updateSelectedDashboard: (dashboard: ResourceListItem) => void;
28
+ selectVisual: (visual: ResourceListItem) => void;
29
+ clearSelectedDashboard: () => void;
30
+ clearSelectedVisual: () => void;
31
+ setInitialDashboard: (dashboard: ResourceListItem) => void;
32
+ setShowHub: (show: boolean) => void;
33
+ };
34
+
35
+ declare type Actions_2 = {
26
36
  triggerReload: () => void;
27
37
  setAiContext: (aiContext: AIContext) => void;
28
38
  setHandleOpenAssistantProfile: (handleOpenAssistantProfile: () => void) => void;
@@ -128,7 +138,7 @@ declare type Actions = {
128
138
  clearDrillContext: () => void;
129
139
  };
130
140
 
131
- declare type Actions_2 = TableActions & ExplorerActions & DrillActions & {
141
+ declare type Actions_3 = TableActions & ExplorerActions & DrillActions & {
132
142
  /** Resets the editor store to its initial state. Called when loading a new dashboard. */
133
143
  resetEditorStore: () => void;
134
144
  setEditorFilterMode: (filterColumnName: string, filterMode: 'include' | 'exclude') => void;
@@ -794,7 +804,7 @@ export declare type DashboardStore = {
794
804
  onAcceptChanges?: (frame: TFrame, dashboard: TDashboard) => void;
795
805
  onUpdateCard?: (card: TCard, sheetId: string) => void;
796
806
  onRemoveCard?: (card: TCard, sheetId: string) => void;
797
- actions: Actions;
807
+ actions: Actions_2;
798
808
  };
799
809
 
800
810
  export declare const DashboardWC: CustomElementConstructor;
@@ -1163,7 +1173,7 @@ export declare type EditorStore = {
1163
1173
  triggerAIRun: boolean;
1164
1174
  runSql: boolean;
1165
1175
  isSqlRunning: boolean;
1166
- actions: Actions_2;
1176
+ actions: Actions_3;
1167
1177
  sqlGen: SqlGen;
1168
1178
  frame: TFrame;
1169
1179
  card: TCard;
@@ -1670,6 +1680,16 @@ export declare type LoadingProps = {
1670
1680
 
1671
1681
  export declare type LogicalOperator = 'AND' | 'OR';
1672
1682
 
1683
+ declare type ManagementStore = {
1684
+ initialDashboard: ResourceListItem | null;
1685
+ selectedDashboard: ResourceListItem | null;
1686
+ selectedVisual: ResourceListItem | null;
1687
+ lastSelectedDashboard: ResourceListItem | null;
1688
+ lastSelectedVisual: ResourceListItem | null;
1689
+ showHub: boolean;
1690
+ actions: Actions;
1691
+ };
1692
+
1673
1693
  export declare interface MetricColumn extends BaseColumn {
1674
1694
  role: 'metric';
1675
1695
  aggregate: AggregateFunction;
@@ -1874,6 +1894,44 @@ export declare function resolveDatamodelName(datamodelName: string): string;
1874
1894
 
1875
1895
  export declare const resolveDataType: (value: any) => string;
1876
1896
 
1897
+ declare interface ResourceListItem {
1898
+ id: string;
1899
+ title: string;
1900
+ description: string;
1901
+ isPrivate: boolean;
1902
+ isPublic: boolean;
1903
+ version: string;
1904
+ createdBy: string | null;
1905
+ createdByTenantUser: string;
1906
+ tenantId: string;
1907
+ projectId: string;
1908
+ createdAt: string;
1909
+ updatedAt: string;
1910
+ lastModified: string;
1911
+ lastModifiedBy: string;
1912
+ createdByUser: string | null;
1913
+ createdByTenantUserRel: {
1914
+ name: string;
1915
+ email: string;
1916
+ };
1917
+ permissions: {
1918
+ canEdit: boolean;
1919
+ canShare: boolean;
1920
+ canDelete: boolean;
1921
+ };
1922
+ ownership: {
1923
+ status: 'private' | 'shared' | 'public';
1924
+ isOwner: boolean;
1925
+ sharedCount: number;
1926
+ createdBy: {
1927
+ type: 'tenant' | 'user';
1928
+ userId: string;
1929
+ name: string;
1930
+ email: string;
1931
+ };
1932
+ };
1933
+ }
1934
+
1877
1935
  export declare function ResourceManagementPanel({ isOpen, onClose, className, onDashboardItemClick, variant, }: ResourceManagementPanelProps): JSX_2.Element;
1878
1936
 
1879
1937
  declare interface ResourceManagementPanelProps {
@@ -2890,7 +2948,7 @@ export declare const useCurrentCardConfig: () => {
2890
2948
 
2891
2949
  export declare const useCurrentSheetActiveCards: () => TCard[];
2892
2950
 
2893
- export declare const useDashboardActions: () => Actions;
2951
+ export declare const useDashboardActions: () => Actions_2;
2894
2952
 
2895
2953
  export declare function useDashboardQuery(): {
2896
2954
  data: GetDashboardResponse_2 | null | undefined;
@@ -2925,7 +2983,7 @@ export declare function useDateFilterHook(filterId: string): {
2925
2983
  handleReset: () => void;
2926
2984
  };
2927
2985
 
2928
- export declare const useEditorActions: () => Actions_2;
2986
+ export declare const useEditorActions: () => Actions_3;
2929
2987
 
2930
2988
  export declare function useEditorAside(token?: AuthToken, _connectionQueryKey?: string): {
2931
2989
  connectionItems: ConnectionItem[];
@@ -2982,6 +3040,10 @@ export declare const useEditorStore: UseBoundStore<Omit<StoreApi<EditorStore>, "
2982
3040
  setState(nextStateOrUpdater: EditorStore | Partial<EditorStore> | ((state: WritableDraft<EditorStore>) => void), shouldReplace?: boolean | undefined): void;
2983
3041
  }>;
2984
3042
 
3043
+ export declare const useManagementStore: UseBoundStore<Omit<StoreApi<ManagementStore>, "setState"> & {
3044
+ setState(nextStateOrUpdater: ManagementStore | Partial<ManagementStore> | ((state: WritableDraft<ManagementStore>) => void), shouldReplace?: boolean | undefined): void;
3045
+ }>;
3046
+
2985
3047
  /**
2986
3048
  * Initialize a pristine dashboard snapshot whenever edit mode turns on.
2987
3049
  * Keeps logic centralized so programmatic entry points are covered.
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "email": "support@semaphor.cloud"
6
6
  },
7
7
  "license": "MIT",
8
- "version": "0.1.144",
8
+ "version": "0.1.146",
9
9
  "description": "Fully interactive and customizable dashboards for your apps.",
10
10
  "keywords": [
11
11
  "react",