react-semaphor 0.0.288 → 0.0.290

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.
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../chunks/index-3mJ0FTjs.js");require("react");require("react-dom");exports.Dashboard=e.Dashboard;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../chunks/index-CGIUYFBx.js");require("react");require("react-dom");exports.Dashboard=e.Dashboard;
@@ -1,4 +1,4 @@
1
- import { D as p } from "../chunks/index-CbTZvlIM.js";
1
+ import { D as p } from "../chunks/index-s1-3fkbc.js";
2
2
  import "react";
3
3
  import "react-dom";
4
4
  export {
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./chunks/index-3mJ0FTjs.js"),n=require("./chunks/dashboard-plus-AK0BZVwp.js"),_=require("react");require("react-dom");function v({card:t,footer:u,className:h,...m}){var c;const{customCards:o}=e.useSemaphorContext(),p=_.useRef(null),{isError:C,isLoading:i,isFetching:a,cfg:x,visualKey:f,handleDatapointClick:E}=e.useDashboardCard(t),l=e.useDashboardStore(s=>s.themeStyle),d=e.useDashboardStore(s=>s.selectedSheetId),j=e.useDashboardStore(s=>s.selectedCardId),D=e.useDashboardStore(s=>s.isDashboardEditing),g=((c=t.customCardPreferences)==null?void 0:c.showCardHeader)??!0,{setCardTitle:b,setCardDescription:S,setSelectedCardId:T}=e.useDashboardActions();function R(s){s.stopPropagation(),T(d,t.id)}function A(){if(o&&o.length>0){const s=o.find(r=>r.cardId===t.id);if(s&&s.replaceDefault){const r=s.content;if(r)return e.jsxRuntimeExports.jsx(r,{card:t})}}return t.type==="kpi"?t.data&&t.data.length>0&&e.jsxRuntimeExports.jsx(e.KPICard,{isLoading:i||a,card:t}):N}function y(){if(C)return e.jsxRuntimeExports.jsx("p",{className:"text-sm",children:"Oops! It seems like something went wrong. Please review your connection or filters."});if(t.type==="table"&&t.data&&t.data.length>0)return e.jsxRuntimeExports.jsxs(e.ScrollArea,{children:[e.jsxRuntimeExports.jsx(e.TableVisual,{card:t,data:t.data}),e.jsxRuntimeExports.jsx(e.ScrollBar,{orientation:"horizontal"})]});if(o&&o.length>0){const s=o.find(r=>r.cardId===t.id);if(s&&s.content){const r=s.content;return e.jsxRuntimeExports.jsx(r,{card:t})}}if(x)return e.jsxRuntimeExports.jsx(e.ChartJsVisual,{cfg:x,onDatapointClick:E},f)}function I(){if(o&&o.length>0){const s=o.find(r=>r.cardId===t.id);if(s&&s.footer){const r=s.footer;if(r)return e.jsxRuntimeExports.jsx(r,{card:t})}}return u||null}if(!t.id)return null;const N=e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[g&&e.jsxRuntimeExports.jsxs(e.CardHeader,{className:"pb-4",children:[e.jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxRuntimeExports.jsx(e.Editable,{text:t.title,onSave:s=>b(d,t.id,s),children:e.jsxRuntimeExports.jsx(e.CardTitle,{className:"text-base",children:t.title})}),t.refreshInterval&&e.jsxRuntimeExports.jsxs(e.Tooltip,{children:[e.jsxRuntimeExports.jsx(e.TooltipTrigger,{className:"pr-1",children:e.jsxRuntimeExports.jsx("div",{className:e.cn("h-2 w-2 rounded-full bg-green-500 transition-opacity",{"opacity-10":i||a})})}),e.jsxRuntimeExports.jsx(e.TooltipContent,{side:"right",align:"center",children:e.jsxRuntimeExports.jsx("p",{className:"text-xs",children:`Realtime (${t==null?void 0:t.refreshInterval})`})})]}),!t.refreshInterval&&(i||a)&&e.jsxRuntimeExports.jsx(n.LoaderCircle,{className:"h-4 w-4 animate-spin text-muted-foreground"})]}),e.jsxRuntimeExports.jsx(e.Editable,{text:(t==null?void 0:t.description)||"",onSave:s=>S(d,t.id,s),children:e.jsxRuntimeExports.jsxs(e.CardDescription,{children:[" ",t.description]})})]}),e.jsxRuntimeExports.jsx(e.CardContent,{className:"relative flex grow flex-col overflow-auto pb-0",children:y()}),e.jsxRuntimeExports.jsx(e.CardFooter,{children:I()})]});return e.jsxRuntimeExports.jsx(e.Card,{tabIndex:-1,ref:p,role:"dashboard-card",onClick:R,className:e.cn("relative flex h-full flex-col rounded-sm",{"border-dashed border-foreground/50":j===t.id&&D},l==null?void 0:l.dashboardCard,h),...m,children:A()})}exports.BOOLEAN_DATA_TYPES=e.BOOLEAN_DATA_TYPES;exports.DATE_DATA_TYPES=e.DATE_DATA_TYPES;exports.Dashboard=e.Dashboard;exports.DashboardWC=e.DashboardWC;exports.NUMBER_DATA_TYPES=e.NUMBER_DATA_TYPES;exports.SemaphorQueryClient=e.SemaphorQueryClient;exports.TEXT_DATA_TYPES=e.TEXT_DATA_TYPES;exports.createSqlGenConfig=e.createSqlGenConfig;exports.fmt=e.fmt;exports.getColumnDataType=e.getColumnDataType;exports.getFilterValueType=e.getFilterValueType;exports.getQualifiedTableName=e.getQualifiedTableName;exports.getSql=e.getSql;exports.isColumnInSqlGen=e.isColumnInSqlGen;exports.resolveDataType=e.resolveDataType;exports.useCard=e.useCard;exports.useDashboardActions=e.useDashboardActions;exports.useDashboardStore=e.useDashboardStore;exports.useEditorActions=e.useEditorActions;exports.useEditorStore=e.useEditorStore;exports.SelectComponent=n.SelectComponent;exports.Surfboard=n.DashboardPlus;exports.cleanCard=n.cleanCard;exports.getDashbaordStateWithoutData=n.getDashbaordStateWithoutData;exports.useEditorAside=n.useEditorAside;exports.DashboardCard=v;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./chunks/index-CGIUYFBx.js"),n=require("./chunks/dashboard-plus-tpC9RwP9.js"),_=require("react");require("react-dom");function v({card:t,footer:u,className:h,...m}){var c;const{customCards:o}=e.useSemaphorContext(),p=_.useRef(null),{isError:C,isLoading:i,isFetching:a,cfg:x,visualKey:f,handleDatapointClick:E}=e.useDashboardCard(t),l=e.useDashboardStore(s=>s.themeStyle),d=e.useDashboardStore(s=>s.selectedSheetId),j=e.useDashboardStore(s=>s.selectedCardId),D=e.useDashboardStore(s=>s.isDashboardEditing),g=((c=t.customCardPreferences)==null?void 0:c.showCardHeader)??!0,{setCardTitle:b,setCardDescription:S,setSelectedCardId:T}=e.useDashboardActions();function R(s){s.stopPropagation(),T(d,t.id)}function A(){if(o&&o.length>0){const s=o.find(r=>r.cardId===t.id);if(s&&s.replaceDefault){const r=s.content;if(r)return e.jsxRuntimeExports.jsx(r,{card:t})}}return t.type==="kpi"?t.data&&t.data.length>0&&e.jsxRuntimeExports.jsx(e.KPICard,{isLoading:i||a,card:t}):N}function y(){if(C)return e.jsxRuntimeExports.jsx("p",{className:"text-sm",children:"Oops! It seems like something went wrong. Please review your connection or filters."});if(t.type==="table"&&t.data&&t.data.length>0)return e.jsxRuntimeExports.jsxs(e.ScrollArea,{children:[e.jsxRuntimeExports.jsx(e.TableVisual,{card:t,data:t.data}),e.jsxRuntimeExports.jsx(e.ScrollBar,{orientation:"horizontal"})]});if(o&&o.length>0){const s=o.find(r=>r.cardId===t.id);if(s&&s.content){const r=s.content;return e.jsxRuntimeExports.jsx(r,{card:t})}}if(x)return e.jsxRuntimeExports.jsx(e.ChartJsVisual,{cfg:x,onDatapointClick:E},f)}function I(){if(o&&o.length>0){const s=o.find(r=>r.cardId===t.id);if(s&&s.footer){const r=s.footer;if(r)return e.jsxRuntimeExports.jsx(r,{card:t})}}return u||null}if(!t.id)return null;const N=e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[g&&e.jsxRuntimeExports.jsxs(e.CardHeader,{className:"pb-4",children:[e.jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxRuntimeExports.jsx(e.Editable,{text:t.title,onSave:s=>b(d,t.id,s),children:e.jsxRuntimeExports.jsx(e.CardTitle,{className:"text-base",children:t.title})}),t.refreshInterval&&e.jsxRuntimeExports.jsxs(e.Tooltip,{children:[e.jsxRuntimeExports.jsx(e.TooltipTrigger,{className:"pr-1",children:e.jsxRuntimeExports.jsx("div",{className:e.cn("h-2 w-2 rounded-full bg-green-500 transition-opacity",{"opacity-10":i||a})})}),e.jsxRuntimeExports.jsx(e.TooltipContent,{side:"right",align:"center",children:e.jsxRuntimeExports.jsx("p",{className:"text-xs",children:`Realtime (${t==null?void 0:t.refreshInterval})`})})]}),!t.refreshInterval&&(i||a)&&e.jsxRuntimeExports.jsx(n.LoaderCircle,{className:"h-4 w-4 animate-spin text-muted-foreground"})]}),e.jsxRuntimeExports.jsx(e.Editable,{text:(t==null?void 0:t.description)||"",onSave:s=>S(d,t.id,s),children:e.jsxRuntimeExports.jsxs(e.CardDescription,{children:[" ",t.description]})})]}),e.jsxRuntimeExports.jsx(e.CardContent,{className:"relative flex grow flex-col overflow-auto pb-0",children:y()}),e.jsxRuntimeExports.jsx(e.CardFooter,{children:I()})]});return e.jsxRuntimeExports.jsx(e.Card,{tabIndex:-1,ref:p,role:"dashboard-card",onClick:R,className:e.cn("relative flex h-full flex-col rounded-sm",{"border-dashed border-foreground/50":j===t.id&&D},l==null?void 0:l.dashboardCard,h),...m,children:A()})}exports.BOOLEAN_DATA_TYPES=e.BOOLEAN_DATA_TYPES;exports.DATE_DATA_TYPES=e.DATE_DATA_TYPES;exports.Dashboard=e.Dashboard;exports.DashboardWC=e.DashboardWC;exports.NUMBER_DATA_TYPES=e.NUMBER_DATA_TYPES;exports.SemaphorQueryClient=e.SemaphorQueryClient;exports.TEXT_DATA_TYPES=e.TEXT_DATA_TYPES;exports.createSqlGenConfig=e.createSqlGenConfig;exports.fmt=e.fmt;exports.getColumnDataType=e.getColumnDataType;exports.getFilterValueType=e.getFilterValueType;exports.getQualifiedTableName=e.getQualifiedTableName;exports.getSql=e.getSql;exports.isColumnInSqlGen=e.isColumnInSqlGen;exports.resolveDataType=e.resolveDataType;exports.useCard=e.useCard;exports.useDashboardActions=e.useDashboardActions;exports.useDashboardStore=e.useDashboardStore;exports.useEditorActions=e.useEditorActions;exports.useEditorStore=e.useEditorStore;exports.SelectComponent=n.SelectComponent;exports.Surfboard=n.DashboardPlus;exports.cleanCard=n.cleanCard;exports.getDashbaordStateWithoutData=n.getDashbaordStateWithoutData;exports.useEditorAside=n.useEditorAside;exports.DashboardCard=v;
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
- import { u as P, a as F, b as o, c as k, j as s, C as R, E as h, d as L, T as q, e as B, f as C, g as H, h as Y, i as G, k as K, l as O, K as V, S as z, m as Q, n as W, o as J } from "./chunks/index-CbTZvlIM.js";
2
- import { B as re, s as oe, D as ne, q as ie, N as le, I as de, r as ue, w as ce, t as fe, y as he, x as Ce, A as me, v as xe, z as pe, F as ge, p as je, H as De, G as be } from "./chunks/index-CbTZvlIM.js";
3
- import { L as M } from "./chunks/dashboard-plus-bg-mRdBZ.js";
4
- import { S as Te, D as Ee, c as Ie, g as Ae, u as ve } from "./chunks/dashboard-plus-bg-mRdBZ.js";
1
+ import { u as P, a as F, b as o, c as k, j as s, C as R, E as h, d as L, T as q, e as B, f as C, g as H, h as Y, i as G, k as K, l as O, K as V, S as z, m as Q, n as W, o as J } from "./chunks/index-s1-3fkbc.js";
2
+ import { B as re, s as oe, D as ne, q as ie, N as le, I as de, r as ue, w as ce, t as fe, y as he, x as Ce, A as me, v as xe, z as pe, F as ge, p as je, H as De, G as be } from "./chunks/index-s1-3fkbc.js";
3
+ import { L as M } from "./chunks/dashboard-plus-LDgc9sdb.js";
4
+ import { S as Te, D as Ee, c as Ie, g as Ae, u as ve } from "./chunks/dashboard-plus-LDgc9sdb.js";
5
5
  import U from "react";
6
6
  import "react-dom";
7
7
  function se({
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../chunks/dashboard-plus-AK0BZVwp.js");require("../chunks/index-3mJ0FTjs.js");require("react");require("react-dom");exports.Surfboard=r.DashboardPlus;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../chunks/dashboard-plus-tpC9RwP9.js");require("../chunks/index-CGIUYFBx.js");require("react");require("react-dom");exports.Surfboard=r.DashboardPlus;
@@ -1,5 +1,5 @@
1
- import { D as i } from "../chunks/dashboard-plus-bg-mRdBZ.js";
2
- import "../chunks/index-CbTZvlIM.js";
1
+ import { D as i } from "../chunks/dashboard-plus-LDgc9sdb.js";
2
+ import "../chunks/index-s1-3fkbc.js";
3
3
  import "react";
4
4
  import "react-dom";
5
5
  export {
@@ -300,6 +300,16 @@ export declare type TCardPreferences = {
300
300
  textVisualOptions?: {
301
301
  isDynamicText?: boolean;
302
302
  };
303
+ mapVisualOptions?: {
304
+ topoJsonUrl?: string;
305
+ objectKey?: string;
306
+ outlineKey?: string;
307
+ customTopoJsonUrl?: string;
308
+ projection?: string;
309
+ projectionScale?: number;
310
+ projectionOffset?: [number, number];
311
+ colorScale?: string;
312
+ };
303
313
  };
304
314
 
305
315
  export declare type TChartOptions = {
@@ -325,7 +335,7 @@ export declare type TChartOptions = {
325
335
  indexAxis?: 'x' | 'y' | undefined;
326
336
  };
327
337
 
328
- declare type TChartType = 'bar' | 'horizontalBar' | 'line' | 'pie' | 'doughnut' | 'radar' | 'polarArea' | 'bubble' | 'scatter' | 'stackedBar' | 'stackedLine' | 'table' | 'kpi' | 'pyramid' | 'range' | 'text' | 'custom';
338
+ declare type TChartType = 'bar' | 'horizontalBar' | 'line' | 'pie' | 'doughnut' | 'radar' | 'polarArea' | 'bubble' | 'scatter' | 'stackedBar' | 'stackedLine' | 'table' | 'kpi' | 'pyramid' | 'range' | 'text' | 'map' | 'custom';
329
339
 
330
340
  export declare type TColumnSetting<T extends DisplayDataType> = {
331
341
  columnIdx: number;
@@ -4,6 +4,8 @@ import { ChartConfiguration } from 'chart.js';
4
4
  import { ChartTypeRegistry } from 'chart.js';
5
5
  import { FC } from 'react';
6
6
  import { FontSpec } from 'chart.js';
7
+ import { IBubbleMapDataPoint } from 'chartjs-chart-geo';
8
+ import { IChoroplethDataPoint } from 'chartjs-chart-geo';
7
9
  import { JSX as JSX_2 } from 'react/jsx-runtime';
8
10
  import { Layout } from 'react-grid-layout';
9
11
  import { Layouts } from 'react-grid-layout';
@@ -81,7 +83,6 @@ declare type Actions = {
81
83
  getCardSheet: (cardId: string) => TSheet | undefined;
82
84
  getSelectedSheetLayout: () => ReactGridLayout_2.Layout[] | undefined;
83
85
  getSelectedSheetLayouts: () => ReactGridLayout_2.Layouts | undefined;
84
- getSheetFilterValues: (sheetId: string) => TFilterValue[] | undefined;
85
86
  handleDataPointClickAction: (card: TCard, dataPoint: any) => void;
86
87
  addBaseQuery: (baseQuery: TBaseQuery) => void;
87
88
  removeBaseQuery: (baseQueryId: string) => void;
@@ -583,6 +584,16 @@ export declare type TCardPreferences = {
583
584
  textVisualOptions?: {
584
585
  isDynamicText?: boolean;
585
586
  };
587
+ mapVisualOptions?: {
588
+ topoJsonUrl?: string;
589
+ objectKey?: string;
590
+ outlineKey?: string;
591
+ customTopoJsonUrl?: string;
592
+ projection?: string;
593
+ projectionScale?: number;
594
+ projectionOffset?: [number, number];
595
+ colorScale?: string;
596
+ };
586
597
  };
587
598
 
588
599
  declare type TChartConfiguration = ChartConfiguration;
@@ -610,7 +621,7 @@ export declare type TChartOptions = {
610
621
  indexAxis?: 'x' | 'y' | undefined;
611
622
  };
612
623
 
613
- declare type TChartType = 'bar' | 'horizontalBar' | 'line' | 'pie' | 'doughnut' | 'radar' | 'polarArea' | 'bubble' | 'scatter' | 'stackedBar' | 'stackedLine' | 'table' | 'kpi' | 'pyramid' | 'range' | 'text' | 'custom';
624
+ declare type TChartType = 'bar' | 'horizontalBar' | 'line' | 'pie' | 'doughnut' | 'radar' | 'polarArea' | 'bubble' | 'scatter' | 'stackedBar' | 'stackedLine' | 'table' | 'kpi' | 'pyramid' | 'range' | 'text' | 'map' | 'custom';
614
625
 
615
626
  export declare type TColumnSetting<T extends DisplayDataType> = {
616
627
  columnIdx: number;
@@ -739,7 +750,7 @@ export declare function useCard(cardId: string): {
739
750
  isLoading: boolean;
740
751
  isFetching: boolean;
741
752
  visualKey: number;
742
- handleDatapointClick: (chart: Chart<keyof ChartTypeRegistry, (number | [number, number] | Point | BubbleDataPoint | null)[], unknown>, datasetIndex: number, clickIndex: number, value: number) => void;
753
+ handleDatapointClick: (chart: Chart<keyof ChartTypeRegistry, (number | [number, number] | Point | BubbleDataPoint | IChoroplethDataPoint | IBubbleMapDataPoint | null)[], unknown>, datasetIndex: number, clickIndex: number, value: number) => void;
743
754
  cfg: TChartConfiguration | undefined;
744
755
  };
745
756
 
@@ -976,6 +987,16 @@ export declare const useDashboardStore: UseBoundStore<Omit<StoreApi<DashboardSto
976
987
  textVisualOptions?: {
977
988
  isDynamicText?: boolean | undefined;
978
989
  } | undefined;
990
+ mapVisualOptions?: {
991
+ topoJsonUrl?: string | undefined;
992
+ objectKey?: string | undefined;
993
+ outlineKey?: string | undefined;
994
+ customTopoJsonUrl?: string | undefined;
995
+ projection?: string | undefined;
996
+ projectionScale?: number | undefined;
997
+ projectionOffset?: [number, number] | undefined;
998
+ colorScale?: string | undefined;
999
+ } | undefined;
979
1000
  } | undefined;
980
1001
  customCardPreferences?: {
981
1002
  showCardHeader?: boolean | undefined;
@@ -1187,6 +1208,16 @@ export declare const useDashboardStore: UseBoundStore<Omit<StoreApi<DashboardSto
1187
1208
  textVisualOptions?: {
1188
1209
  isDynamicText?: boolean | undefined;
1189
1210
  } | undefined;
1211
+ mapVisualOptions?: {
1212
+ topoJsonUrl?: string | undefined;
1213
+ objectKey?: string | undefined;
1214
+ outlineKey?: string | undefined;
1215
+ customTopoJsonUrl?: string | undefined;
1216
+ projection?: string | undefined;
1217
+ projectionScale?: number | undefined;
1218
+ projectionOffset?: [number, number] | undefined;
1219
+ colorScale?: string | undefined;
1220
+ } | undefined;
1190
1221
  } | undefined;
1191
1222
  customCardPreferences?: {
1192
1223
  showCardHeader?: boolean | undefined;
@@ -1357,6 +1388,16 @@ export declare const useDashboardStore: UseBoundStore<Omit<StoreApi<DashboardSto
1357
1388
  textVisualOptions?: {
1358
1389
  isDynamicText?: boolean | undefined;
1359
1390
  } | undefined;
1391
+ mapVisualOptions?: {
1392
+ topoJsonUrl?: string | undefined;
1393
+ objectKey?: string | undefined;
1394
+ outlineKey?: string | undefined;
1395
+ customTopoJsonUrl?: string | undefined;
1396
+ projection?: string | undefined;
1397
+ projectionScale?: number | undefined;
1398
+ projectionOffset?: [number, number] | undefined;
1399
+ colorScale?: string | undefined;
1400
+ } | undefined;
1360
1401
  } | undefined;
1361
1402
  customCardPreferences?: {
1362
1403
  showCardHeader?: boolean | undefined;
@@ -1687,6 +1728,16 @@ export declare const useDashboardStore: UseBoundStore<Omit<StoreApi<DashboardSto
1687
1728
  textVisualOptions?: {
1688
1729
  isDynamicText?: boolean | undefined;
1689
1730
  } | undefined;
1731
+ mapVisualOptions?: {
1732
+ topoJsonUrl?: string | undefined;
1733
+ objectKey?: string | undefined;
1734
+ outlineKey?: string | undefined;
1735
+ customTopoJsonUrl?: string | undefined;
1736
+ projection?: string | undefined;
1737
+ projectionScale?: number | undefined;
1738
+ projectionOffset?: [number, number] | undefined;
1739
+ colorScale?: string | undefined;
1740
+ } | undefined;
1690
1741
  } | undefined;
1691
1742
  customCardPreferences?: {
1692
1743
  showCardHeader?: boolean | undefined;
@@ -1842,7 +1893,6 @@ export declare const useDashboardStore: UseBoundStore<Omit<StoreApi<DashboardSto
1842
1893
  getCardSheet: (cardId: string) => TSheet | undefined;
1843
1894
  getSelectedSheetLayout: () => ReactGridLayout_2.Layout[] | undefined;
1844
1895
  getSelectedSheetLayouts: () => ReactGridLayout_2.Layouts | undefined;
1845
- getSheetFilterValues: (sheetId: string) => TFilterValue[] | undefined;
1846
1896
  handleDataPointClickAction: (card: TCard, dataPoint: any) => void;
1847
1897
  addBaseQuery: (baseQuery: TBaseQuery) => void;
1848
1898
  removeBaseQuery: (baseQueryId: string) => void;
@@ -2082,6 +2132,16 @@ export declare const useEditorStore: UseBoundStore<Omit<StoreApi<EditorStore>, "
2082
2132
  textVisualOptions?: {
2083
2133
  isDynamicText?: boolean | undefined;
2084
2134
  } | undefined;
2135
+ mapVisualOptions?: {
2136
+ topoJsonUrl?: string | undefined;
2137
+ objectKey?: string | undefined;
2138
+ outlineKey?: string | undefined;
2139
+ customTopoJsonUrl?: string | undefined;
2140
+ projection?: string | undefined;
2141
+ projectionScale?: number | undefined;
2142
+ projectionOffset?: [number, number] | undefined;
2143
+ colorScale?: string | undefined;
2144
+ } | undefined;
2085
2145
  } | undefined;
2086
2146
  customCardPreferences?: {
2087
2147
  showCardHeader?: boolean | undefined;
@@ -2251,6 +2311,16 @@ export declare const useEditorStore: UseBoundStore<Omit<StoreApi<EditorStore>, "
2251
2311
  textVisualOptions?: {
2252
2312
  isDynamicText?: boolean | undefined;
2253
2313
  } | undefined;
2314
+ mapVisualOptions?: {
2315
+ topoJsonUrl?: string | undefined;
2316
+ objectKey?: string | undefined;
2317
+ outlineKey?: string | undefined;
2318
+ customTopoJsonUrl?: string | undefined;
2319
+ projection?: string | undefined;
2320
+ projectionScale?: number | undefined;
2321
+ projectionOffset?: [number, number] | undefined;
2322
+ colorScale?: string | undefined;
2323
+ } | undefined;
2254
2324
  } | undefined;
2255
2325
  customCardPreferences?: {
2256
2326
  showCardHeader?: boolean | undefined;
@@ -305,6 +305,16 @@ export declare type TCardPreferences = {
305
305
  textVisualOptions?: {
306
306
  isDynamicText?: boolean;
307
307
  };
308
+ mapVisualOptions?: {
309
+ topoJsonUrl?: string;
310
+ objectKey?: string;
311
+ outlineKey?: string;
312
+ customTopoJsonUrl?: string;
313
+ projection?: string;
314
+ projectionScale?: number;
315
+ projectionOffset?: [number, number];
316
+ colorScale?: string;
317
+ };
308
318
  };
309
319
 
310
320
  export declare type TChartOptions = {
@@ -330,7 +340,7 @@ export declare type TChartOptions = {
330
340
  indexAxis?: 'x' | 'y' | undefined;
331
341
  };
332
342
 
333
- declare type TChartType = 'bar' | 'horizontalBar' | 'line' | 'pie' | 'doughnut' | 'radar' | 'polarArea' | 'bubble' | 'scatter' | 'stackedBar' | 'stackedLine' | 'table' | 'kpi' | 'pyramid' | 'range' | 'text' | 'custom';
343
+ declare type TChartType = 'bar' | 'horizontalBar' | 'line' | 'pie' | 'doughnut' | 'radar' | 'polarArea' | 'bubble' | 'scatter' | 'stackedBar' | 'stackedLine' | 'table' | 'kpi' | 'pyramid' | 'range' | 'text' | 'map' | 'custom';
334
344
 
335
345
  export declare type TColumnSetting<T extends DisplayDataType> = {
336
346
  columnIdx: number;
@@ -297,6 +297,16 @@ export declare type TCardPreferences = {
297
297
  textVisualOptions?: {
298
298
  isDynamicText?: boolean;
299
299
  };
300
+ mapVisualOptions?: {
301
+ topoJsonUrl?: string;
302
+ objectKey?: string;
303
+ outlineKey?: string;
304
+ customTopoJsonUrl?: string;
305
+ projection?: string;
306
+ projectionScale?: number;
307
+ projectionOffset?: [number, number];
308
+ colorScale?: string;
309
+ };
300
310
  };
301
311
 
302
312
  export declare type TChartOptions = {
@@ -322,7 +332,7 @@ export declare type TChartOptions = {
322
332
  indexAxis?: 'x' | 'y' | undefined;
323
333
  };
324
334
 
325
- declare type TChartType = 'bar' | 'horizontalBar' | 'line' | 'pie' | 'doughnut' | 'radar' | 'polarArea' | 'bubble' | 'scatter' | 'stackedBar' | 'stackedLine' | 'table' | 'kpi' | 'pyramid' | 'range' | 'text' | 'custom';
335
+ declare type TChartType = 'bar' | 'horizontalBar' | 'line' | 'pie' | 'doughnut' | 'radar' | 'polarArea' | 'bubble' | 'scatter' | 'stackedBar' | 'stackedLine' | 'table' | 'kpi' | 'pyramid' | 'range' | 'text' | 'map' | 'custom';
326
336
 
327
337
  export declare type TColumnSetting<T extends DisplayDataType> = {
328
338
  columnIdx: number;
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "email": "support@semaphor.cloud"
6
6
  },
7
7
  "license": "MIT",
8
- "version": "0.0.288",
8
+ "version": "0.0.290",
9
9
  "description": "Fully interactive and customizable dashboards for your apps.",
10
10
  "keywords": [
11
11
  "react",
@@ -73,6 +73,7 @@
73
73
  "@tanstack/react-table": "^8.11.7",
74
74
  "ai": "^3.3.0",
75
75
  "chart.js": "^4.4.1",
76
+ "chartjs-chart-geo": "^4.3.4",
76
77
  "chartjs-plugin-datalabels": "^2.2.0",
77
78
  "class-variance-authority": "^0.7.0",
78
79
  "clsx": "^2.0.0",