react-semaphor 0.1.321 → 0.1.322

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 (35) hide show
  1. package/dist/brand-studio/index.js +4 -4
  2. package/dist/chunks/{braces-Cy5NEBa8.js → braces-ZjRH2Kl7.js} +1 -1
  3. package/dist/chunks/{calendar-preferences-dialog-CzoSmQNw.js → calendar-preferences-dialog-CZqePF6B.js} +1 -1
  4. package/dist/chunks/{calendar-preferences-dialog-D-0W76fR.js → calendar-preferences-dialog-t0OOALVd.js} +3 -3
  5. package/dist/chunks/{chevrons-up-down-DZTs1oVD.js → chevrons-up-down-CA-XvN1o.js} +1 -1
  6. package/dist/chunks/{dashboard-briefing-launcher-D5z1kf6J.js → dashboard-briefing-launcher-BYbnbZ9e.js} +6 -5
  7. package/dist/chunks/{dashboard-briefing-launcher-Cqm8NnVb.js → dashboard-briefing-launcher-d1_fm91W.js} +13 -13
  8. package/dist/chunks/dashboard-controls-B3HHMRPC.js +52 -0
  9. package/dist/chunks/dashboard-controls-BuChCKDm.js +2246 -0
  10. package/dist/chunks/{dashboard-json-BRx9CbrK.js → dashboard-json-DgoYjD0O.js} +2 -2
  11. package/dist/chunks/{dashboard-json-ezFjz7Fc.js → dashboard-json-M5-VFCtZ.js} +1 -1
  12. package/dist/chunks/{edit-dashboard-visual-Cw0KmT4i.js → edit-dashboard-visual-BH8DP1qq.js} +1 -1
  13. package/dist/chunks/{edit-dashboard-visual-sI6ds8MP.js → edit-dashboard-visual-DP31ytwJ.js} +616 -616
  14. package/dist/chunks/{index-BZg7rVe-.js → index-ChmS5nsv.js} +21344 -21136
  15. package/dist/chunks/{index-DX6Krdga.js → index-CodH6sqg.js} +194 -194
  16. package/dist/chunks/{palette-Bc-vOLSt.js → palette-D96DOM7E.js} +1 -1
  17. package/dist/chunks/{resource-management-panel-CRRUcnVu.js → resource-management-panel-D3vO68dH.js} +1 -1
  18. package/dist/chunks/{resource-management-panel-pN81x7Gw.js → resource-management-panel-gt__S0Pb.js} +18 -18
  19. package/dist/chunks/{save-CXa6cKaY.js → save-DxkSzUTZ.js} +1 -1
  20. package/dist/chunks/{switch-DdTUsWgd.js → switch-Deo2Ltmj.js} +6 -6
  21. package/dist/chunks/{use-create-flow-overlay-state-BfV5187a.js → use-create-flow-overlay-state-BZaSpL-c.js} +1 -1
  22. package/dist/chunks/{use-create-flow-overlay-state-B9ujZUon.js → use-create-flow-overlay-state-OA3iI54p.js} +4 -4
  23. package/dist/chunks/{use-visual-utils-D_uHFfTn.js → use-visual-utils-CMucAqbS.js} +1 -1
  24. package/dist/chunks/{use-visual-utils-PxijRlpS.js → use-visual-utils-CsXS-Zeh.js} +20 -20
  25. package/dist/dashboard/index.cjs +1 -1
  26. package/dist/dashboard/index.js +1 -1
  27. package/dist/index.cjs +1 -1
  28. package/dist/index.js +131 -130
  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/main.d.ts +145 -0
  33. package/package.json +1 -1
  34. package/dist/chunks/dashboard-controls-CRIwHD59.js +0 -1999
  35. package/dist/chunks/dashboard-controls-DSt7iwFC.js +0 -52
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../chunks/index-DX6Krdga.js"),e=require("../chunks/common-types-C73-Ud1-.js"),a=require("../chunks/calendar-preferences-dialog-CzoSmQNw.js");exports.Surfboard=r.DashboardPlus;exports.CONTROL_CARD_DEFAULT_VALUE=e.CONTROL_CARD_DEFAULT_VALUE;exports.EMPTY_SELECTION=e.EMPTY_SELECTION;exports.CalendarPreferencesDialog=a.CalendarPreferencesDialog;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../chunks/index-CodH6sqg.js"),e=require("../chunks/common-types-C73-Ud1-.js"),a=require("../chunks/calendar-preferences-dialog-CZqePF6B.js");exports.Surfboard=r.DashboardPlus;exports.CONTROL_CARD_DEFAULT_VALUE=e.CONTROL_CARD_DEFAULT_VALUE;exports.EMPTY_SELECTION=e.EMPTY_SELECTION;exports.CalendarPreferencesDialog=a.CalendarPreferencesDialog;
@@ -1,6 +1,6 @@
1
- import { a as e } from "../chunks/index-BZg7rVe-.js";
1
+ import { a as e } from "../chunks/index-ChmS5nsv.js";
2
2
  import { C, E } from "../chunks/common-types-4bjoIgvm.js";
3
- import { C as s } from "../chunks/calendar-preferences-dialog-D-0W76fR.js";
3
+ import { C as s } from "../chunks/calendar-preferences-dialog-t0OOALVd.js";
4
4
  export {
5
5
  C as CONTROL_CARD_DEFAULT_VALUE,
6
6
  s as CalendarPreferencesDialog,
@@ -452,6 +452,11 @@ export declare function applyBriefingFormPatch(draft: BriefingFormDraft, patch:
452
452
 
453
453
  export declare type AssistantId = 'dashboard-assistant' | 'editor-assistant';
454
454
 
455
+ declare type AsyncMutation<TInput, TOutput> = {
456
+ isPending?: boolean;
457
+ mutateAsync: (input: TInput) => Promise<TOutput>;
458
+ };
459
+
455
460
  export declare type AuthToken = {
456
461
  accessToken: string;
457
462
  refreshToken?: string;
@@ -1702,6 +1707,7 @@ declare interface CreateResourceRequest {
1702
1707
  title: string;
1703
1708
  description?: string;
1704
1709
  isPrivate?: boolean;
1710
+ template?: TDashboard;
1705
1711
  }
1706
1712
 
1707
1713
  export declare function createSqlGenConfig(column: TDataColumn, preSqlGen: SqlGen, calc?: AggregateCalc): SqlGen;
@@ -1716,6 +1722,33 @@ declare type DashboardAIContext = AIContext & {
1716
1722
 
1717
1723
  declare type DashboardAIContextMode = 'auto' | 'fixed';
1718
1724
 
1725
+ declare type DashboardAuthoringDatasetRef = {
1726
+ kind: 'semantic';
1727
+ domainId: string;
1728
+ datasetName: string;
1729
+ datasetId?: string;
1730
+ label?: string;
1731
+ connectionId?: string;
1732
+ } | {
1733
+ kind: 'physical';
1734
+ connectionId: string;
1735
+ databaseName?: string;
1736
+ schemaName?: string;
1737
+ tableName: string;
1738
+ label?: string;
1739
+ };
1740
+
1741
+ export declare type DashboardAuthoringSource = DashboardAuthoringDatasetRef & {
1742
+ domainName?: string;
1743
+ domainLabel?: string;
1744
+ description?: string;
1745
+ connectionType?: string;
1746
+ database?: string;
1747
+ schema?: string;
1748
+ table?: string;
1749
+ primaryDateField?: string;
1750
+ };
1751
+
1719
1752
  export declare function DashboardBriefingLauncher({ dashboardId, dashboardTitle, apiServiceUrl, token, disabled, className, manageBriefingsHref, client, }: DashboardBriefingLauncherProps): JSX.Element;
1720
1753
 
1721
1754
  declare type DashboardBriefingLauncherClient = {
@@ -1738,6 +1771,17 @@ export declare type DashboardBriefingLauncherProps = {
1738
1771
  client?: Partial<DashboardBriefingLauncherClient>;
1739
1772
  };
1740
1773
 
1774
+ declare type DashboardCardQueryIntent = {
1775
+ metric?: string;
1776
+ metrics?: string[];
1777
+ dateField?: string;
1778
+ timeGrain?: 'day' | 'week' | 'month' | 'quarter' | 'year';
1779
+ dimensions?: string[];
1780
+ limit?: number;
1781
+ };
1782
+
1783
+ declare type DashboardCardSizeIntent = 'kpi' | 'chart' | 'table' | 'text';
1784
+
1741
1785
  declare type DashboardControlsModelOptions = {
1742
1786
  renamed?: {
1743
1787
  oldId: string;
@@ -1758,6 +1802,36 @@ declare type DashboardControlsSettingsProps = {
1758
1802
  initialMode?: 'manage' | 'create';
1759
1803
  };
1760
1804
 
1805
+ declare type DashboardCreateBlankData = {
1806
+ title: string;
1807
+ description: string;
1808
+ dataset?: DashboardAuthoringSource;
1809
+ };
1810
+
1811
+ export declare function DashboardCreateDialogBase({ open, onOpenChange, onCreateBlank, onAiCreateSuccess, isCreatingBlank, sources, sourcesLoading, suggestDashboards, planDashboard, createDashboardFromPlan, settingsSlot, blankDescription, description, canCreate, }: DashboardCreateDialogBaseProps): JSX.Element;
1812
+
1813
+ export declare interface DashboardCreateDialogBaseProps {
1814
+ open: boolean;
1815
+ onOpenChange: (open: boolean) => void;
1816
+ onCreateBlank: (data: DashboardCreateBlankData) => void;
1817
+ onAiCreateSuccess: (result: any) => void;
1818
+ isCreatingBlank: boolean;
1819
+ sources: DashboardAuthoringSource[];
1820
+ sourcesLoading?: boolean;
1821
+ suggestDashboards: (input: {
1822
+ dataset: DashboardAuthoringDatasetRef;
1823
+ }) => Promise<DashboardSuggestion[]>;
1824
+ planDashboard: AsyncMutation<{
1825
+ prompt: string;
1826
+ dataset: DashboardAuthoringDatasetRef;
1827
+ }, DashboardPlan>;
1828
+ createDashboardFromPlan: AsyncMutation<DashboardPlan, any>;
1829
+ settingsSlot?: ReactNode;
1830
+ blankDescription?: string;
1831
+ description?: string;
1832
+ canCreate?: boolean;
1833
+ }
1834
+
1761
1835
  export declare type DashboardEventHandlers = {
1762
1836
  onExportData?: (payload: ExportDataPayload) => void;
1763
1837
  };
@@ -1948,6 +2022,65 @@ export declare type DashboardInputVariableRef = {
1948
2022
  key: 'generatedAt' | 'pageNumber' | 'pageCount';
1949
2023
  };
1950
2024
 
2025
+ declare type DashboardPlan = {
2026
+ version: 1;
2027
+ id: string;
2028
+ title: string;
2029
+ description?: string;
2030
+ datasets: DashboardAuthoringDatasetRef[];
2031
+ sheets: DashboardPlanSheet[];
2032
+ filterInputs?: DashboardPlanFilterInput[];
2033
+ calculatedFields?: DashboardPlanCalculatedField[];
2034
+ warnings?: DashboardPlanWarning[];
2035
+ unresolvedRequests?: string[];
2036
+ deferredSuggestions?: string[];
2037
+ };
2038
+
2039
+ declare type DashboardPlanCalculatedField = {
2040
+ id: string;
2041
+ name: string;
2042
+ scope: 'card' | 'sheet' | 'dashboard' | 'domain';
2043
+ expression?: string;
2044
+ field?: Field;
2045
+ targetCardId?: string;
2046
+ reuseOnly?: boolean;
2047
+ };
2048
+
2049
+ declare type DashboardPlanCard = {
2050
+ id: string;
2051
+ frameId: string;
2052
+ title: string;
2053
+ description?: string;
2054
+ type: Exclude<TChartType, 'custom'>;
2055
+ role: DashboardCardSizeIntent;
2056
+ priority: number;
2057
+ section?: string;
2058
+ query?: DashboardCardQueryIntent;
2059
+ text?: string;
2060
+ };
2061
+
2062
+ declare type DashboardPlanFilterInput = {
2063
+ id: string;
2064
+ label: string;
2065
+ variableName: string;
2066
+ filter: TFilter;
2067
+ defaultValue?: unknown;
2068
+ };
2069
+
2070
+ declare type DashboardPlanSheet = {
2071
+ id: string;
2072
+ title: string;
2073
+ description?: string;
2074
+ kind: 'dashboard';
2075
+ cards: DashboardPlanCard[];
2076
+ };
2077
+
2078
+ declare type DashboardPlanWarning = {
2079
+ code: string;
2080
+ message: string;
2081
+ cardId?: string;
2082
+ };
2083
+
1951
2084
  declare type DashboardPlusProps = {
1952
2085
  showControls?: boolean;
1953
2086
  showFooter?: boolean;
@@ -2131,6 +2264,18 @@ export declare type DashboardStore = {
2131
2264
  actions: Actions_2;
2132
2265
  };
2133
2266
 
2267
+ declare type DashboardSuggestion = {
2268
+ id: string;
2269
+ title: string;
2270
+ description: string;
2271
+ preview: DashboardSuggestionPreviewKind[];
2272
+ cardCount: number;
2273
+ filterCount: number;
2274
+ prompt: string;
2275
+ };
2276
+
2277
+ declare type DashboardSuggestionPreviewKind = 'kpi' | 'line' | 'bar' | 'donut' | 'table';
2278
+
2134
2279
  export declare const DashboardWC: CustomElementConstructor;
2135
2280
 
2136
2281
  export declare interface DatabaseEntityReference {
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "email": "support@semaphor.cloud"
6
6
  },
7
7
  "license": "MIT",
8
- "version": "0.1.321",
8
+ "version": "0.1.322",
9
9
  "description": "Fully interactive and customizable dashboards for your apps.",
10
10
  "keywords": [
11
11
  "react",