react-semaphor 0.0.289 → 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-L--hgWeJ.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-MEy4VWWZ.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-L--hgWeJ.js"),n=require("./chunks/dashboard-plus-z4fkzB_M.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-MEy4VWWZ.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-MEy4VWWZ.js";
3
- import { L as M } from "./chunks/dashboard-plus-5B6hJeBZ.js";
4
- import { S as Te, D as Ee, c as Ie, g as Ae, u as ve } from "./chunks/dashboard-plus-5B6hJeBZ.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-z4fkzB_M.js");require("../chunks/index-L--hgWeJ.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-5B6hJeBZ.js";
2
- import "../chunks/index-MEy4VWWZ.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';
@@ -582,6 +584,16 @@ export declare type TCardPreferences = {
582
584
  textVisualOptions?: {
583
585
  isDynamicText?: boolean;
584
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
+ };
585
597
  };
586
598
 
587
599
  declare type TChartConfiguration = ChartConfiguration;
@@ -609,7 +621,7 @@ export declare type TChartOptions = {
609
621
  indexAxis?: 'x' | 'y' | undefined;
610
622
  };
611
623
 
612
- 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';
613
625
 
614
626
  export declare type TColumnSetting<T extends DisplayDataType> = {
615
627
  columnIdx: number;
@@ -738,7 +750,7 @@ export declare function useCard(cardId: string): {
738
750
  isLoading: boolean;
739
751
  isFetching: boolean;
740
752
  visualKey: number;
741
- 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;
742
754
  cfg: TChartConfiguration | undefined;
743
755
  };
744
756
 
@@ -975,6 +987,16 @@ export declare const useDashboardStore: UseBoundStore<Omit<StoreApi<DashboardSto
975
987
  textVisualOptions?: {
976
988
  isDynamicText?: boolean | undefined;
977
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;
978
1000
  } | undefined;
979
1001
  customCardPreferences?: {
980
1002
  showCardHeader?: boolean | undefined;
@@ -1186,6 +1208,16 @@ export declare const useDashboardStore: UseBoundStore<Omit<StoreApi<DashboardSto
1186
1208
  textVisualOptions?: {
1187
1209
  isDynamicText?: boolean | undefined;
1188
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;
1189
1221
  } | undefined;
1190
1222
  customCardPreferences?: {
1191
1223
  showCardHeader?: boolean | undefined;
@@ -1356,6 +1388,16 @@ export declare const useDashboardStore: UseBoundStore<Omit<StoreApi<DashboardSto
1356
1388
  textVisualOptions?: {
1357
1389
  isDynamicText?: boolean | undefined;
1358
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;
1359
1401
  } | undefined;
1360
1402
  customCardPreferences?: {
1361
1403
  showCardHeader?: boolean | undefined;
@@ -1686,6 +1728,16 @@ export declare const useDashboardStore: UseBoundStore<Omit<StoreApi<DashboardSto
1686
1728
  textVisualOptions?: {
1687
1729
  isDynamicText?: boolean | undefined;
1688
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;
1689
1741
  } | undefined;
1690
1742
  customCardPreferences?: {
1691
1743
  showCardHeader?: boolean | undefined;
@@ -2080,6 +2132,16 @@ export declare const useEditorStore: UseBoundStore<Omit<StoreApi<EditorStore>, "
2080
2132
  textVisualOptions?: {
2081
2133
  isDynamicText?: boolean | undefined;
2082
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;
2083
2145
  } | undefined;
2084
2146
  customCardPreferences?: {
2085
2147
  showCardHeader?: boolean | undefined;
@@ -2249,6 +2311,16 @@ export declare const useEditorStore: UseBoundStore<Omit<StoreApi<EditorStore>, "
2249
2311
  textVisualOptions?: {
2250
2312
  isDynamicText?: boolean | undefined;
2251
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;
2252
2324
  } | undefined;
2253
2325
  customCardPreferences?: {
2254
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.289",
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",