react-semaphor 0.1.422 → 0.1.423

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 (43) hide show
  1. package/dist/brand-studio/index.cjs +1 -1
  2. package/dist/brand-studio/index.js +1 -1
  3. package/dist/briefings/index.cjs +1 -1
  4. package/dist/briefings/index.js +913 -712
  5. package/dist/chunks/{calendar-preferences-dialog-C2fBRNZh.js → calendar-preferences-dialog-CTmeASaM.js} +1 -1
  6. package/dist/chunks/{calendar-preferences-dialog-Cbavs2EK.js → calendar-preferences-dialog-t5ET6MON.js} +2 -2
  7. package/dist/chunks/card-config-utils-15sRtebL.js +1 -0
  8. package/dist/chunks/card-config-utils-BYZ5MJOh.js +16 -0
  9. package/dist/chunks/dashboard-briefing-launcher-Cavd0QJb.js +3401 -0
  10. package/dist/chunks/dashboard-briefing-launcher-S2akO-ub.js +26 -0
  11. package/dist/chunks/dashboard-controls-BJLrErjW.js +2322 -0
  12. package/dist/chunks/dashboard-controls-DzbP8AXA.js +52 -0
  13. package/dist/chunks/dashboard-json-5tWb5KD6.js +1 -0
  14. package/dist/chunks/{dashboard-json-Db3rkY_a.js → dashboard-json-Do2-pdPZ.js} +11 -10
  15. package/dist/chunks/{edit-dashboard-visual-CW7mv_si.js → edit-dashboard-visual-Cw6bq4_w.js} +258 -256
  16. package/dist/chunks/edit-dashboard-visual-Yh5YFgMF.js +178 -0
  17. package/dist/chunks/index-BPM3gDRw.js +1406 -0
  18. package/dist/chunks/{index-OD6mLD7U.js → index-yHe0SeLO.js} +81534 -75431
  19. package/dist/chunks/{switch-CWcWwwDJ.js → switch-2bh3Hka1.js} +619 -632
  20. package/dist/chunks/{switch-DRNqX0v0.js → switch-DMT7qf_R.js} +24 -24
  21. package/dist/chunks/{use-create-flow-overlay-state-CkMmXhI-.js → use-create-flow-overlay-state-5MDbZcs1.js} +514 -543
  22. package/dist/chunks/use-create-flow-overlay-state-BNczg9Gj.js +11 -0
  23. package/dist/dashboard/index.cjs +1 -1
  24. package/dist/dashboard/index.js +1 -1
  25. package/dist/data-app-builder/index.cjs +1 -1
  26. package/dist/data-app-builder/index.js +108 -108
  27. package/dist/index.cjs +1 -1
  28. package/dist/index.js +167 -163
  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/briefings.d.ts +2388 -7
  33. package/dist/types/main.d.ts +70 -10
  34. package/dist/types/types.d.ts +4 -8
  35. package/package.json +1 -1
  36. package/dist/chunks/dashboard-briefing-launcher-C0_ZbBK3.js +0 -9077
  37. package/dist/chunks/dashboard-briefing-launcher-CGfEFUnX.js +0 -80
  38. package/dist/chunks/dashboard-controls-BUuS-BGl.js +0 -52
  39. package/dist/chunks/dashboard-controls-ae5t32xV.js +0 -2280
  40. package/dist/chunks/dashboard-json-DTL_kYhz.js +0 -1
  41. package/dist/chunks/edit-dashboard-visual-Ciqdu58a.js +0 -178
  42. package/dist/chunks/index-8y8XX7sX.js +0 -1346
  43. package/dist/chunks/use-create-flow-overlay-state-C0Uhmlpd.js +0 -21
@@ -7,9 +7,12 @@ import { FetchStatus } from '@tanstack/query-core';
7
7
  import { FontSpec } from 'chart.js';
8
8
  import { JSX } from 'react/jsx-runtime';
9
9
  import { JSX as JSX_2 } from 'react';
10
+ import { JSXElementConstructor } from 'react';
10
11
  import { QueryObserverResult } from '@tanstack/query-core';
11
12
  import * as React_2 from 'react';
13
+ import { ReactElement } from 'react';
12
14
  import { ReactNode } from 'react';
15
+ import { ReactPortal } from 'react';
13
16
  import { RefetchOptions } from '@tanstack/query-core';
14
17
  import { StoreApi } from 'zustand';
15
18
  import { UseBoundStore } from 'zustand';
@@ -573,16 +576,11 @@ export declare type BriefingAttachment = (BriefingAttachmentBase & {
573
576
  dashboardId: string;
574
577
  sheetId: string;
575
578
  format: 'pdf';
576
- }) | (BriefingAttachmentBase & {
577
- type: 'visual';
578
- dashboardId: string;
579
- visualId: string;
580
- format: 'pdf' | 'png';
581
579
  }) | (BriefingAttachmentBase & {
582
580
  type: 'card';
583
581
  dashboardId: string;
584
582
  cardId: string;
585
- format: 'csv' | 'pdf' | 'png';
583
+ format: 'csv' | 'pdf';
586
584
  });
587
585
 
588
586
  declare type BriefingAttachmentBase = {
@@ -590,7 +588,7 @@ declare type BriefingAttachmentBase = {
590
588
  settings?: BriefingAttachmentSettings;
591
589
  };
592
590
 
593
- export declare type BriefingAttachmentFormat = 'pdf' | 'csv' | 'png';
591
+ export declare type BriefingAttachmentFormat = 'pdf' | 'csv';
594
592
 
595
593
  export declare type BriefingAttachmentSettings = {
596
594
  theme?: string;
@@ -616,9 +614,10 @@ export declare type BriefingAttachmentSettings = {
616
614
  dashboardInputExecutionSnapshot?: Record<string, unknown>;
617
615
  selectedSheetId?: string;
618
616
  cardType?: string;
617
+ allowDownload?: boolean;
619
618
  };
620
619
 
621
- export declare function BriefingAuthor({ apiServiceUrl, token, briefing, sourceContext, title, className, client, generateRequestId, onSaved, onDeleted, onRunStarted, onCancel, onBack, onMinimizeRun, }: BriefingAuthorProps): JSX.Element;
620
+ export declare function BriefingAuthor({ apiServiceUrl, token, briefing, intent, initialAttachments, initialName, initialMessage, initialTimezone, availableDashboards, sourceContext, title, hideHeader, className, client, generateRequestId, onSaved, onDeleted, onRunStarted, onCancel, onBack, onMinimizeRun, }: BriefingAuthorProps): JSX.Element;
622
621
 
623
622
  export declare type BriefingAuthorClient = {
624
623
  createBriefing: typeof createBriefing;
@@ -638,12 +637,50 @@ export declare type BriefingAuthorClient = {
638
637
  polishBriefingText: typeof polishBriefingText;
639
638
  };
640
639
 
640
+ export declare function BriefingAuthorDialog({ open, onOpenChange, launchRequest, briefing, authorProps, }: BriefingAuthorDialogProps): JSX.Element;
641
+
642
+ export declare type BriefingAuthorDialogProps = {
643
+ open: boolean;
644
+ onOpenChange: (open: boolean) => void;
645
+ launchRequest: BriefingAuthorLaunchRequest;
646
+ briefing?: BriefingDetail | null;
647
+ authorProps?: Omit<BriefingAuthorProps, 'briefing' | 'intent' | 'sourceContext' | 'initialAttachments' | 'initialName' | 'initialMessage' | 'initialTimezone' | 'availableDashboards' | 'title' | 'onCancel'>;
648
+ };
649
+
650
+ export declare type BriefingAuthorIntent = 'scheduled_report' | 'analytical_briefing';
651
+
652
+ export declare type BriefingAuthorLaunchRequest = {
653
+ intent: BriefingAuthorIntent;
654
+ sourceContext: BriefingAuthorSourceContext;
655
+ initialAttachments?: BriefingAttachment[];
656
+ initialName?: string;
657
+ initialMessage?: string;
658
+ initialTimezone?: string;
659
+ availableDashboards?: Array<{
660
+ id: string;
661
+ title: string;
662
+ dashboard?: TDashboard;
663
+ }>;
664
+ title?: string;
665
+ };
666
+
641
667
  export declare type BriefingAuthorProps = {
642
668
  apiServiceUrl?: string;
643
669
  token?: string;
644
670
  briefing?: BriefingDetail | null;
671
+ intent?: BriefingAuthorIntent;
672
+ initialAttachments?: BriefingAttachment[];
673
+ initialName?: string;
674
+ initialMessage?: string;
675
+ initialTimezone?: string;
676
+ availableDashboards?: Array<{
677
+ id: string;
678
+ title: string;
679
+ dashboard?: TDashboard;
680
+ }>;
645
681
  sourceContext?: BriefingAuthorSourceContext;
646
682
  title?: string;
683
+ hideHeader?: boolean;
647
684
  className?: string;
648
685
  client?: Partial<BriefingAuthorClient>;
649
686
  generateRequestId?: () => string;
@@ -724,7 +761,6 @@ export declare type BriefingDeliveryConfig = {
724
761
  };
725
762
 
726
763
  export declare interface BriefingDetail extends BriefingListItem {
727
- deliveryConfig: BriefingDeliveryConfig | null;
728
764
  latestRun?: BriefingRun | null;
729
765
  }
730
766
 
@@ -827,6 +863,7 @@ export declare interface BriefingListItem {
827
863
  body: BriefingBody;
828
864
  attachments: BriefingAttachment[];
829
865
  presentation: BriefingPresentation;
866
+ deliveryConfig: BriefingDeliveryConfig | null;
830
867
  limits?: BriefingLimits;
831
868
  scope?: BriefingScopeMetadata;
832
869
  creator?: BriefingCreatorMetadata;
@@ -1045,6 +1082,23 @@ export declare type BriefingTenantSummary = {
1045
1082
 
1046
1083
  export declare function briefingToFormDraft(briefing: BriefingDetail): BriefingFormDraft;
1047
1084
 
1085
+ export declare type BriefingUiCapabilities = {
1086
+ surfaceVisible: boolean;
1087
+ canCreate: boolean;
1088
+ analyticalBriefingsEnabled: boolean;
1089
+ userType: 'organization' | 'tenant' | null;
1090
+ loading: boolean;
1091
+ error: boolean;
1092
+ };
1093
+
1094
+ export declare function BriefingUiCapabilitiesBoundary({ children, }: {
1095
+ children: ReactNode;
1096
+ }): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | ReactPortal | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | JSX.Element | null | undefined;
1097
+
1098
+ export declare function BriefingUiCapabilitiesProvider({ children, }: {
1099
+ children: ReactNode;
1100
+ }): JSX.Element;
1101
+
1048
1102
  declare type BriefingWebhookConfig = {
1049
1103
  url: string;
1050
1104
  method?: 'POST' | 'PUT';
@@ -1779,7 +1833,7 @@ export declare type DashboardAuthoringSource = DashboardAuthoringDatasetRef & {
1779
1833
  primaryDateField?: string;
1780
1834
  };
1781
1835
 
1782
- export declare function DashboardBriefingLauncher({ dashboardId, dashboardTitle, apiServiceUrl, token, disabled, className, manageBriefingsHref, client, }: DashboardBriefingLauncherProps): JSX.Element;
1836
+ export declare function DashboardBriefingLauncher(props: DashboardBriefingLauncherProps): JSX.Element;
1783
1837
 
1784
1838
  declare type DashboardBriefingLauncherClient = {
1785
1839
  listBriefings: typeof listBriefings;
@@ -1798,6 +1852,10 @@ export declare type DashboardBriefingLauncherProps = {
1798
1852
  disabled?: boolean;
1799
1853
  className?: string;
1800
1854
  manageBriefingsHref?: string;
1855
+ open?: boolean;
1856
+ onOpenChange?: (open: boolean) => void;
1857
+ hideTrigger?: boolean;
1858
+ workflowIntent?: BriefingAuthorIntent;
1801
1859
  client?: Partial<DashboardBriefingLauncherClient>;
1802
1860
  };
1803
1861
 
@@ -6866,6 +6924,8 @@ export declare function useAddNewFrame(): {
6866
6924
  canAddFrame: boolean;
6867
6925
  };
6868
6926
 
6927
+ export declare function useBriefingUiCapabilities(): BriefingUiCapabilities;
6928
+
6869
6929
  export declare function useCard(cardId: string): {
6870
6930
  data: any;
6871
6931
  card: TCard;
@@ -191,16 +191,11 @@ export declare type BriefingAttachment = (BriefingAttachmentBase & {
191
191
  dashboardId: string;
192
192
  sheetId: string;
193
193
  format: 'pdf';
194
- }) | (BriefingAttachmentBase & {
195
- type: 'visual';
196
- dashboardId: string;
197
- visualId: string;
198
- format: 'pdf' | 'png';
199
194
  }) | (BriefingAttachmentBase & {
200
195
  type: 'card';
201
196
  dashboardId: string;
202
197
  cardId: string;
203
- format: 'csv' | 'pdf' | 'png';
198
+ format: 'csv' | 'pdf';
204
199
  });
205
200
 
206
201
  declare type BriefingAttachmentBase = {
@@ -208,7 +203,7 @@ declare type BriefingAttachmentBase = {
208
203
  settings?: BriefingAttachmentSettings;
209
204
  };
210
205
 
211
- export declare type BriefingAttachmentFormat = 'pdf' | 'csv' | 'png';
206
+ export declare type BriefingAttachmentFormat = 'pdf' | 'csv';
212
207
 
213
208
  export declare type BriefingAttachmentSettings = {
214
209
  theme?: string;
@@ -234,6 +229,7 @@ export declare type BriefingAttachmentSettings = {
234
229
  dashboardInputExecutionSnapshot?: Record<string, unknown>;
235
230
  selectedSheetId?: string;
236
231
  cardType?: string;
232
+ allowDownload?: boolean;
237
233
  };
238
234
 
239
235
  export declare type BriefingBody = {
@@ -279,7 +275,6 @@ export declare type BriefingDeliveryConfig = {
279
275
  };
280
276
 
281
277
  export declare interface BriefingDetail extends BriefingListItem {
282
- deliveryConfig: BriefingDeliveryConfig | null;
283
278
  latestRun?: BriefingRun | null;
284
279
  }
285
280
 
@@ -323,6 +318,7 @@ export declare interface BriefingListItem {
323
318
  body: BriefingBody;
324
319
  attachments: BriefingAttachment[];
325
320
  presentation: BriefingPresentation;
321
+ deliveryConfig: BriefingDeliveryConfig | null;
326
322
  limits?: BriefingLimits;
327
323
  scope?: BriefingScopeMetadata;
328
324
  creator?: BriefingCreatorMetadata;
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "email": "support@semaphor.cloud"
6
6
  },
7
7
  "license": "MIT",
8
- "version": "0.1.422",
8
+ "version": "0.1.423",
9
9
  "description": "Fully interactive and customizable dashboards for your apps.",
10
10
  "keywords": [
11
11
  "react",