@carto/ps-react-ui 4.2.7 → 4.3.0-widgets.0

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 (209) hide show
  1. package/dist/cjs-D9ro6BXv.js +85 -0
  2. package/dist/cjs-D9ro6BXv.js.map +1 -0
  3. package/dist/components.js +758 -1398
  4. package/dist/components.js.map +1 -1
  5. package/dist/const-BLV7Tvte.js +758 -0
  6. package/dist/const-BLV7Tvte.js.map +1 -0
  7. package/dist/download-KroQ0SWg.js +195 -0
  8. package/dist/download-KroQ0SWg.js.map +1 -0
  9. package/dist/echart-CqfROFu3.js +214 -0
  10. package/dist/echart-CqfROFu3.js.map +1 -0
  11. package/dist/formula-ui-ChzvMEOG.js +52 -0
  12. package/dist/formula-ui-ChzvMEOG.js.map +1 -0
  13. package/dist/lasso-tool-BC-rsMMW.js +552 -0
  14. package/dist/lasso-tool-BC-rsMMW.js.map +1 -0
  15. package/dist/markdown-n_tOtoiT.js +27 -0
  16. package/dist/markdown-n_tOtoiT.js.map +1 -0
  17. package/dist/markdown-ui-BBrzzd7Y.js +62 -0
  18. package/dist/markdown-ui-BBrzzd7Y.js.map +1 -0
  19. package/dist/note-DF-n70TX.js +101 -0
  20. package/dist/note-DF-n70TX.js.map +1 -0
  21. package/dist/range-ui-CtUX11Xm.js +146 -0
  22. package/dist/range-ui-CtUX11Xm.js.map +1 -0
  23. package/dist/root-L_WZnJY5.js +46 -0
  24. package/dist/root-L_WZnJY5.js.map +1 -0
  25. package/dist/row-DQaSxmDV.js +18 -0
  26. package/dist/row-DQaSxmDV.js.map +1 -0
  27. package/dist/series-CsyEPq-X.js +83 -0
  28. package/dist/series-CsyEPq-X.js.map +1 -0
  29. package/dist/skeleton-BSPcEvfq.js +27 -0
  30. package/dist/skeleton-BSPcEvfq.js.map +1 -0
  31. package/dist/skeleton-C4rOYTy-.js +78 -0
  32. package/dist/skeleton-C4rOYTy-.js.map +1 -0
  33. package/dist/skeleton-C9Jqc241.js +82 -0
  34. package/dist/skeleton-C9Jqc241.js.map +1 -0
  35. package/dist/skeleton-D-zHBBIw.js +64 -0
  36. package/dist/skeleton-D-zHBBIw.js.map +1 -0
  37. package/dist/skeleton-DMP-IwaJ.js +109 -0
  38. package/dist/skeleton-DMP-IwaJ.js.map +1 -0
  39. package/dist/skeleton-DRorqowB.js +22 -0
  40. package/dist/skeleton-DRorqowB.js.map +1 -0
  41. package/dist/skeleton-DsZhv-AH.js +89 -0
  42. package/dist/skeleton-DsZhv-AH.js.map +1 -0
  43. package/dist/skeleton-Dx3FCer0.js +13 -0
  44. package/dist/skeleton-Dx3FCer0.js.map +1 -0
  45. package/dist/skeleton-QVDdb1c2.js +21 -0
  46. package/dist/skeleton-QVDdb1c2.js.map +1 -0
  47. package/dist/skeleton-loader-DWC1-EAx.js +23 -0
  48. package/dist/skeleton-loader-DWC1-EAx.js.map +1 -0
  49. package/dist/smart-tooltip-BSlcAkBM.js +39 -0
  50. package/dist/smart-tooltip-BSlcAkBM.js.map +1 -0
  51. package/dist/spread-ui-BjzH190y.js +82 -0
  52. package/dist/spread-ui-BjzH190y.js.map +1 -0
  53. package/dist/style-BGeCtQkP.js +19 -0
  54. package/dist/style-BGeCtQkP.js.map +1 -0
  55. package/dist/style-C7v1iwqD.js +34 -0
  56. package/dist/style-C7v1iwqD.js.map +1 -0
  57. package/dist/styles-cohnxh9F.js +23 -0
  58. package/dist/styles-cohnxh9F.js.map +1 -0
  59. package/dist/types/widgets/_shared/chart-config/config-factory.d.ts +44 -0
  60. package/dist/types/widgets/_shared/chart-config/csv-modifiers.d.ts +19 -0
  61. package/dist/types/widgets/_shared/chart-config/index.d.ts +7 -0
  62. package/dist/types/widgets/_shared/chart-config/option-builders.d.ts +39 -0
  63. package/dist/types/widgets/_shared/skeleton/index.d.ts +4 -0
  64. package/dist/types/widgets/_shared/skeleton/styles.d.ts +19 -0
  65. package/dist/types/widgets/actions/download/download.d.ts +2 -0
  66. package/dist/types/widgets/actions/download/exports.d.ts +6 -0
  67. package/dist/types/widgets/actions/download/types.d.ts +29 -0
  68. package/dist/types/widgets/actions/fullscreen/fullscreen.d.ts +2 -0
  69. package/dist/types/widgets/actions/fullscreen/styles.d.ts +10 -0
  70. package/dist/types/widgets/actions/fullscreen/types.d.ts +21 -0
  71. package/dist/types/widgets/actions/index.d.ts +5 -0
  72. package/dist/types/widgets/bar/config.d.ts +4 -0
  73. package/dist/types/widgets/bar/index.d.ts +3 -0
  74. package/dist/types/widgets/bar/skeleton.d.ts +1 -0
  75. package/dist/types/widgets/bar/style.d.ts +37 -0
  76. package/dist/types/widgets/bar/types.d.ts +15 -0
  77. package/dist/types/widgets/config-loader/index.d.ts +2 -0
  78. package/dist/types/widgets/config-loader/types.d.ts +12 -0
  79. package/dist/types/widgets/config-loader/use-config.d.ts +5 -0
  80. package/dist/types/widgets/echart/const.d.ts +1 -0
  81. package/dist/types/widgets/echart/echart-ui.d.ts +2 -0
  82. package/dist/types/widgets/echart/echart.d.ts +2 -0
  83. package/dist/types/widgets/echart/index.d.ts +5 -0
  84. package/dist/types/widgets/echart/options.d.ts +3 -0
  85. package/dist/types/widgets/echart/types.d.ts +31 -0
  86. package/dist/types/widgets/echart/utils.d.ts +74 -0
  87. package/dist/types/widgets/formula/components/item.d.ts +2 -0
  88. package/dist/types/widgets/formula/components/prefix.d.ts +2 -0
  89. package/dist/types/widgets/formula/components/row.d.ts +2 -0
  90. package/dist/types/widgets/formula/components/series.d.ts +2 -0
  91. package/dist/types/widgets/formula/components/suffix.d.ts +2 -0
  92. package/dist/types/widgets/formula/components/value.d.ts +2 -0
  93. package/dist/types/widgets/formula/config.d.ts +2 -0
  94. package/dist/types/widgets/formula/formula-ui.d.ts +2 -0
  95. package/dist/types/widgets/formula/index.d.ts +10 -0
  96. package/dist/types/widgets/formula/serializer.d.ts +16 -0
  97. package/dist/types/widgets/formula/skeleton.d.ts +1 -0
  98. package/dist/types/widgets/formula/style.d.ts +21 -0
  99. package/dist/types/widgets/formula/types.d.ts +54 -0
  100. package/dist/types/widgets/histogram/config.d.ts +4 -0
  101. package/dist/types/widgets/histogram/index.d.ts +3 -0
  102. package/dist/types/widgets/histogram/skeleton.d.ts +1 -0
  103. package/dist/types/widgets/histogram/style.d.ts +15 -0
  104. package/dist/types/widgets/histogram/types.d.ts +15 -0
  105. package/dist/types/widgets/index.d.ts +4 -1
  106. package/dist/types/widgets/markdown/config.d.ts +2 -0
  107. package/dist/types/widgets/markdown/index.d.ts +5 -0
  108. package/dist/types/widgets/markdown/markdown-ui.d.ts +2 -0
  109. package/dist/types/widgets/markdown/markdown.d.ts +2 -0
  110. package/dist/types/widgets/markdown/skeleton.d.ts +1 -0
  111. package/dist/types/widgets/markdown/style.d.ts +2 -0
  112. package/dist/types/widgets/markdown/types.d.ts +28 -0
  113. package/dist/types/widgets/note/index.d.ts +2 -0
  114. package/dist/types/widgets/note/note.d.ts +2 -0
  115. package/dist/types/widgets/note/style.d.ts +17 -0
  116. package/dist/types/widgets/note/types.d.ts +7 -0
  117. package/dist/types/widgets/pie/config.d.ts +4 -0
  118. package/dist/types/widgets/pie/index.d.ts +3 -0
  119. package/dist/types/widgets/pie/skeleton.d.ts +1 -0
  120. package/dist/types/widgets/pie/style.d.ts +15 -0
  121. package/dist/types/widgets/pie/types.d.ts +15 -0
  122. package/dist/types/widgets/range/components/range-item.d.ts +2 -0
  123. package/dist/types/widgets/range/config.d.ts +2 -0
  124. package/dist/types/widgets/range/index.d.ts +5 -0
  125. package/dist/types/widgets/range/range-ui.d.ts +2 -0
  126. package/dist/types/widgets/range/serializer.d.ts +16 -0
  127. package/dist/types/widgets/range/serializer.test.d.ts +1 -0
  128. package/dist/types/widgets/range/skeleton.d.ts +1 -0
  129. package/dist/types/widgets/range/style.d.ts +2 -0
  130. package/dist/types/widgets/range/types.d.ts +44 -0
  131. package/dist/types/widgets/root/index.d.ts +2 -0
  132. package/dist/types/widgets/root/root.d.ts +2 -0
  133. package/dist/types/widgets/root/style.d.ts +8 -0
  134. package/dist/types/widgets/root/types.d.ts +15 -0
  135. package/dist/types/widgets/scatterplot/config.d.ts +4 -0
  136. package/dist/types/widgets/scatterplot/index.d.ts +3 -0
  137. package/dist/types/widgets/scatterplot/skeleton.d.ts +1 -0
  138. package/dist/types/widgets/scatterplot/style.d.ts +24 -0
  139. package/dist/types/widgets/scatterplot/types.d.ts +15 -0
  140. package/dist/types/widgets/skeleton-loader/index.d.ts +2 -0
  141. package/dist/types/widgets/skeleton-loader/skeleton-loader.d.ts +2 -0
  142. package/dist/types/widgets/skeleton-loader/types.d.ts +7 -0
  143. package/dist/types/widgets/spread/components/max-value.d.ts +2 -0
  144. package/dist/types/widgets/spread/components/min-value.d.ts +2 -0
  145. package/dist/types/widgets/spread/components/separator.d.ts +2 -0
  146. package/dist/types/widgets/spread/config.d.ts +2 -0
  147. package/dist/types/widgets/spread/index.d.ts +8 -0
  148. package/dist/types/widgets/spread/skeleton.d.ts +1 -0
  149. package/dist/types/widgets/spread/spread-ui.d.ts +2 -0
  150. package/dist/types/widgets/spread/style.d.ts +21 -0
  151. package/dist/types/widgets/spread/types.d.ts +52 -0
  152. package/dist/types/widgets/stores/types.d.ts +69 -0
  153. package/dist/types/widgets/stores/widget-store.d.ts +64 -0
  154. package/dist/types/widgets/stores/widget-store.test.d.ts +1 -0
  155. package/dist/types/widgets/timeseries/config.d.ts +4 -0
  156. package/dist/types/widgets/timeseries/index.d.ts +3 -0
  157. package/dist/types/widgets/timeseries/skeleton.d.ts +1 -0
  158. package/dist/types/widgets/timeseries/style.d.ts +38 -0
  159. package/dist/types/widgets/timeseries/types.d.ts +15 -0
  160. package/dist/types/widgets/widget/const.d.ts +2 -0
  161. package/dist/types/widgets/widget/types.d.ts +47 -0
  162. package/dist/types/widgets/widget/widget.d.ts +2 -0
  163. package/dist/types/widgets/wrapper/components/actions.d.ts +2 -0
  164. package/dist/types/widgets/wrapper/components/options.d.ts +2 -0
  165. package/dist/types/widgets/wrapper/components/title.d.ts +6 -0
  166. package/dist/types/widgets/wrapper/index.d.ts +6 -0
  167. package/dist/types/widgets/wrapper/styles.d.ts +83 -0
  168. package/dist/types/widgets/wrapper/types.d.ts +35 -0
  169. package/dist/types/widgets/wrapper/wrapper-ui.d.ts +2 -0
  170. package/dist/types/widgets/wrapper/wrapper.d.ts +2 -0
  171. package/dist/use-config-BYEOiIcu.js +43 -0
  172. package/dist/use-config-BYEOiIcu.js.map +1 -0
  173. package/dist/widget-store-yDO2ul8g.js +44 -0
  174. package/dist/widget-store-yDO2ul8g.js.map +1 -0
  175. package/dist/widgets/actions.js +9 -0
  176. package/dist/widgets/actions.js.map +1 -0
  177. package/dist/widgets/bar.js +7 -0
  178. package/dist/widgets/bar.js.map +1 -0
  179. package/dist/widgets/config-loader.js +5 -0
  180. package/dist/widgets/config-loader.js.map +1 -0
  181. package/dist/widgets/echart.js +11 -0
  182. package/dist/widgets/echart.js.map +1 -0
  183. package/dist/widgets/formula.js +27 -0
  184. package/dist/widgets/formula.js.map +1 -0
  185. package/dist/widgets/histogram.js +7 -0
  186. package/dist/widgets/histogram.js.map +1 -0
  187. package/dist/widgets/note.js +5 -0
  188. package/dist/widgets/note.js.map +1 -0
  189. package/dist/widgets/pie.js +7 -0
  190. package/dist/widgets/pie.js.map +1 -0
  191. package/dist/widgets/range.js +19 -0
  192. package/dist/widgets/range.js.map +1 -0
  193. package/dist/widgets/root.js +5 -0
  194. package/dist/widgets/root.js.map +1 -0
  195. package/dist/widgets/scatterplot.js +7 -0
  196. package/dist/widgets/scatterplot.js.map +1 -0
  197. package/dist/widgets/skeleton-loader.js +5 -0
  198. package/dist/widgets/skeleton-loader.js.map +1 -0
  199. package/dist/widgets/spread.js +21 -0
  200. package/dist/widgets/spread.js.map +1 -0
  201. package/dist/widgets/timeseries.js +7 -0
  202. package/dist/widgets/timeseries.js.map +1 -0
  203. package/dist/widgets/wrapper.js +9 -0
  204. package/dist/widgets/wrapper.js.map +1 -0
  205. package/dist/widgets.js +85 -1
  206. package/dist/widgets.js.map +1 -1
  207. package/dist/wrapper-57csMybC.js +265 -0
  208. package/dist/wrapper-57csMybC.js.map +1 -0
  209. package/package.json +73 -3
@@ -0,0 +1,5 @@
1
+ import { BaseConfig, ConfigProps } from './types';
2
+ export declare function useConfig<T>({ id, defaultConfig, config }: ConfigProps<T>): {
3
+ config: T;
4
+ run: (config: Partial<Omit<T & BaseConfig, 'id'>>) => void;
5
+ };
@@ -0,0 +1 @@
1
+ export declare const DEFAULT_STACK_GROUP = "stacked";
@@ -0,0 +1,2 @@
1
+ import { EchartUIProps } from './types';
2
+ export declare function EchartUI({ ref, init, option, className, style, onEvents, }: EchartUIProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { EchartProps } from './types';
2
+ export declare function Echart(props: EchartProps): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,5 @@
1
+ export { Echart } from './echart';
2
+ export { EchartUI } from './echart-ui';
3
+ export type { EchartProps, EchartOptionsProps, EchartUIProps, EchartWidgetData, EchartWidgetState, EchartWidgetConfig, EchartWidgetProps, } from './types';
4
+ export { getCommonOptions } from './options';
5
+ export { mergeWidgetConfig, getEChartBrushConfig, getEChartStackConfig, getEChartZoomConfig, } from './utils';
@@ -0,0 +1,3 @@
1
+ import { EchartOptionsProps } from './types';
2
+ import { theme as CartoTheme } from '@carto/meridian-ds/theme';
3
+ export declare function getCommonOptions(theme: typeof CartoTheme): EchartOptionsProps;
@@ -0,0 +1,31 @@
1
+ import { EChartsOption } from 'echarts';
2
+ import { BaseWidgetState } from '../stores/types';
3
+ import { WrapperState } from '../wrapper/types';
4
+ import { DownloadState, FullScreenState } from '../actions';
5
+ import { FullScreenConfigProps } from '../actions/fullscreen/types';
6
+ import { DownloadConfigProps } from '../actions/download/types';
7
+ import { ConfigProps } from '../config-loader';
8
+ import { Ref } from 'react';
9
+ import type * as echarts from 'echarts';
10
+ export type EchartOptionsProps = EChartsOption;
11
+ export interface EchartUIProps {
12
+ option: EchartOptionsProps;
13
+ className?: string;
14
+ init?: echarts.EChartsInitOpts;
15
+ style?: React.CSSProperties;
16
+ ref?: Ref<echarts.ECharts>;
17
+ onEvents?: Record<string, Parameters<echarts.ECharts['on']>[2]>;
18
+ }
19
+ export interface EchartProps {
20
+ id: string;
21
+ }
22
+ export type EchartWidgetData = Record<string, string | number>[][];
23
+ export type EchartWidgetState = BaseWidgetState<WrapperState<FullScreenState<DownloadState<EchartWidgetProps, EchartWidgetData> & {
24
+ option: EchartUIProps['option'];
25
+ onEvents?: EchartUIProps['onEvents'];
26
+ init?: EchartUIProps['init'];
27
+ }>>>;
28
+ export type EchartWidgetConfig<D = EchartWidgetData> = FullScreenConfigProps & DownloadConfigProps<D> & EchartUIProps;
29
+ export interface EchartWidgetProps {
30
+ config?: ConfigProps<EchartWidgetConfig>['config'];
31
+ }
@@ -0,0 +1,74 @@
1
+ import { EchartOptionsProps } from './types';
2
+ import { Theme } from '@mui/material';
3
+ export declare function mergeWidgetConfig<T extends EchartOptionsProps>(...options: [T, T]): T;
4
+ export declare function getEChartZoomConfig(zoom: boolean, { start, end }: {
5
+ start: number;
6
+ end: number;
7
+ } | undefined, { inside, xSlider, ySlider }: {
8
+ inside?: boolean | undefined;
9
+ xSlider?: boolean | undefined;
10
+ ySlider?: boolean | undefined;
11
+ } | undefined, theme: Theme): {
12
+ dataZoom: ({
13
+ throttle: number;
14
+ type: string;
15
+ xAxisIndex: number[];
16
+ yAxisIndex: number[];
17
+ show: boolean;
18
+ zoomLock: boolean;
19
+ start: number;
20
+ end: number;
21
+ orientation?: undefined;
22
+ bottom?: undefined;
23
+ left?: undefined;
24
+ } | {
25
+ throttle: number;
26
+ type: string;
27
+ show: boolean;
28
+ zoomLock: boolean;
29
+ start: number;
30
+ end: number;
31
+ orientation: string;
32
+ xAxisIndex?: undefined;
33
+ yAxisIndex?: undefined;
34
+ bottom?: undefined;
35
+ left?: undefined;
36
+ } | {
37
+ throttle: number;
38
+ type: string;
39
+ xAxisIndex: number[];
40
+ bottom: number;
41
+ show: boolean;
42
+ zoomLock: boolean;
43
+ start: number;
44
+ end: number;
45
+ yAxisIndex?: undefined;
46
+ orientation?: undefined;
47
+ left?: undefined;
48
+ } | {
49
+ throttle: number;
50
+ type: string;
51
+ left: number;
52
+ yAxisIndex: number[];
53
+ show: boolean;
54
+ zoomLock: boolean;
55
+ start: number;
56
+ end: number;
57
+ xAxisIndex?: undefined;
58
+ orientation?: undefined;
59
+ bottom?: undefined;
60
+ })[];
61
+ };
62
+ export declare function getEChartBrushConfig(brush: boolean): {
63
+ brush: {
64
+ brushType: string;
65
+ brushMode: string;
66
+ };
67
+ } | {
68
+ brush?: undefined;
69
+ };
70
+ export declare function getEChartStackConfig(stack: boolean, stackGroup?: string): {
71
+ stack: string;
72
+ } | {
73
+ stack?: undefined;
74
+ };
@@ -0,0 +1,2 @@
1
+ import { ItemProps } from '../types';
2
+ export declare function Item(props: ItemProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { ValueProps } from '../types';
2
+ export declare function Prefix({ id, index, ...props }: ValueProps): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,2 @@
1
+ import { RowProps } from '../types';
2
+ export declare function Row(props: RowProps): import("react/jsx-runtime").JSX.Element[] | null | undefined;
@@ -0,0 +1,2 @@
1
+ import { ValueProps } from '../types';
2
+ export declare function Series({ id, index }: Pick<ValueProps, 'id' | 'index'>): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,2 @@
1
+ import { ValueProps } from '../types';
2
+ export declare function Suffix({ id, index, ...props }: ValueProps): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,2 @@
1
+ import { ValueProps } from '../types';
2
+ export declare function Value({ id, index, ...props }: ValueProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { FormulaConfig, FormulaWidgetConfig } from './types';
2
+ export declare function formulaConfig({ refUI, data, ...props }: FormulaConfig): FormulaWidgetConfig;
@@ -0,0 +1,2 @@
1
+ import { FormulaUIProps } from './types';
2
+ export declare function FormulaUI(props: FormulaUIProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,10 @@
1
+ export { Item } from './components/item';
2
+ export { Value } from './components/value';
3
+ export { Prefix } from './components/prefix';
4
+ export { Suffix } from './components/suffix';
5
+ export { Series } from './components/series';
6
+ export { Row } from './components/row';
7
+ export { FormulaUI } from './formula-ui';
8
+ export { FormulaSkeleton } from './skeleton';
9
+ export type { RowProps, ValueProps, FormulaWidgetState, ItemProps, DataItem, FormulaUIProps, SeriesConfig, } from './types';
10
+ export { sanitizeDataItem, sanitizeDataItems } from './serializer';
@@ -0,0 +1,16 @@
1
+ import { DataItem } from './types';
2
+ /**
3
+ * Sanitizes DataItem by converting ReactNode prefix/suffix values to undefined.
4
+ * This ensures only string values are stored in the widget state.
5
+ *
6
+ * @param item - The DataItem to sanitize
7
+ * @returns A new DataItem with ReactNode prefix/suffix values converted to undefined
8
+ */
9
+ export declare function sanitizeDataItem(item: DataItem): DataItem;
10
+ /**
11
+ * Sanitizes an array of DataItems by converting ReactNode prefix/suffix values to undefined.
12
+ *
13
+ * @param items - Array of DataItems to sanitize
14
+ * @returns A new array with sanitized DataItems
15
+ */
16
+ export declare function sanitizeDataItems(items: DataItem[] | undefined): DataItem[] | undefined;
@@ -0,0 +1 @@
1
+ export declare function FormulaSkeleton(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,21 @@
1
+ import { Theme } from '@mui/material';
2
+ export declare const styles: {
3
+ root: {
4
+ display: "flex";
5
+ flexDirection: "column";
6
+ gap: (theme: Theme) => string;
7
+ };
8
+ item: {
9
+ '&[data-disabled="true"]': {
10
+ color: (theme: Theme) => string;
11
+ };
12
+ };
13
+ row: {
14
+ display: "flex";
15
+ alignItems: "center";
16
+ gap: (theme: Theme) => string;
17
+ '& + &': {
18
+ marginTop: (theme: Theme) => string;
19
+ };
20
+ };
21
+ };
@@ -0,0 +1,54 @@
1
+ import { TypographyProps } from '@mui/material';
2
+ import { ReactNode } from 'react';
3
+ import { BaseWidgetState, WidgetsStoreProps } from '../stores/types';
4
+ import { DownloadState } from '../actions';
5
+ import { DownloadConfigProps } from '../actions/download/types';
6
+ import { WrapperState } from '../wrapper/types';
7
+ import { BaseWidgetProps } from '../widget/types';
8
+ import { BaseConfig } from '../config-loader';
9
+ export interface FormulaProps extends BaseWidgetProps<FormulaWidgetConfig> {
10
+ type: 'formula';
11
+ data: FormulaWidgetData | undefined;
12
+ }
13
+ export interface FormulaUIProps {
14
+ id: WidgetsStoreProps['id'];
15
+ }
16
+ export interface DataItem {
17
+ value: number;
18
+ prefix?: string | ReactNode;
19
+ suffix?: string | ReactNode;
20
+ color?: string;
21
+ }
22
+ export interface RowProps {
23
+ id: WidgetsStoreProps['id'];
24
+ children: ReactNode | ((props: {
25
+ index: number;
26
+ }) => ReactNode);
27
+ }
28
+ export interface ValueProps extends Omit<ItemProps, 'children'> {
29
+ id: WidgetsStoreProps['id'];
30
+ index?: number;
31
+ }
32
+ export interface ItemProps {
33
+ children: ReactNode;
34
+ disabled?: boolean;
35
+ TypographyProps?: TypographyProps;
36
+ }
37
+ export type FormulaWidgetData = DataItem[];
38
+ export interface SeriesConfig {
39
+ name: string;
40
+ color?: string;
41
+ }
42
+ export type FormulaWidgetState = BaseWidgetState<WrapperState<DownloadState<FormulaProps & {
43
+ formatter?: (value: number) => string;
44
+ series?: SeriesConfig[];
45
+ }, FormulaWidgetData>>>;
46
+ export type FormulaWidgetConfig = BaseConfig & DownloadConfigProps<FormulaWidgetData> & {
47
+ type: FormulaProps['type'];
48
+ formatter?: FormulaWidgetState['formatter'];
49
+ series?: SeriesConfig[];
50
+ };
51
+ export interface FormulaConfig extends Omit<BaseConfig, 'data'> {
52
+ data?: FormulaWidgetData;
53
+ series?: SeriesConfig[];
54
+ }
@@ -0,0 +1,4 @@
1
+ import { HistogramConfig } from './types';
2
+ export declare const histogramConfig: (config: HistogramConfig & {
3
+ refUI?: import('react').Ref<HTMLElement | null>;
4
+ }) => import('../_shared/chart-config/config-factory').ChartWidgetConfigResult<import('../echart').EchartWidgetData, HistogramConfig, "histogram">;
@@ -0,0 +1,3 @@
1
+ export type { HistogramProps, HistogramWidgetData, HistogramWidgetState, HistogramWidgetConfig, } from './types';
2
+ export { histogramConfig } from './config';
3
+ export { HistogramSkeleton } from './skeleton';
@@ -0,0 +1 @@
1
+ export declare function HistogramSkeleton(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,15 @@
1
+ import { Theme } from '@mui/material';
2
+ export declare const styles: {
3
+ skeleton: {
4
+ graph: {
5
+ readonly container: {
6
+ readonly display: "flex";
7
+ readonly alignItems: "center";
8
+ readonly justifyContent: "space-between";
9
+ readonly flexDirection: "column";
10
+ readonly gap: ({ spacing }: Theme) => string;
11
+ readonly height: ({ spacing }: Theme) => string;
12
+ };
13
+ };
14
+ };
15
+ };
@@ -0,0 +1,15 @@
1
+ import { BaseWidgetProps } from '../widget/types';
2
+ import { BaseConfig } from '../config-loader';
3
+ import { EchartWidgetConfig, EchartWidgetData, EchartWidgetState } from '../echart';
4
+ export interface HistogramProps extends BaseWidgetProps<HistogramWidgetConfig> {
5
+ type: 'histogram';
6
+ data: HistogramWidgetData | undefined;
7
+ }
8
+ export type HistogramWidgetData = EchartWidgetData;
9
+ export type HistogramWidgetState = EchartWidgetState;
10
+ export type HistogramWidgetConfig = HistogramConfig & EchartWidgetConfig & {
11
+ type: HistogramProps['type'];
12
+ };
13
+ export interface HistogramConfig extends Omit<BaseConfig, 'data'> {
14
+ data?: HistogramWidgetData;
15
+ }
@@ -1 +1,4 @@
1
- export {};
1
+ export { useWidgetStore, useWidget } from './stores/widget-store';
2
+ export type { BaseWidgetState, WidgetState, WidgetStoreState, WidgetStoreActions, WidgetStore, } from './stores/types';
3
+ export { Widget } from './widget/widget';
4
+ export type { WidgetProps, WidgetConfig, BaseWidgetProps, WidgetBaseComponentConfig, WidgetComponentConfig, } from './widget/types';
@@ -0,0 +1,2 @@
1
+ import { MarkdownConfig, MarkdownWidgetConfig } from './types';
2
+ export declare function markdownConfig({ refUI, data, ...props }: MarkdownConfig): MarkdownWidgetConfig;
@@ -0,0 +1,5 @@
1
+ export { Markdown } from './markdown';
2
+ export { MarkdownUI } from './markdown-ui';
3
+ export { MarkdownSkeleton } from './skeleton';
4
+ export { markdownConfig } from './config';
5
+ export type { MarkdownComponentProps, MarkdownProps, MarkdownUIProps, MarkdownWidgetData, MarkdownWidgetState, MarkdownWidgetConfig, MarkdownConfig, MarkdownDataItem, } from './types';
@@ -0,0 +1,2 @@
1
+ import { MarkdownComponentProps } from './types';
2
+ export declare function MarkdownUI({ children }: MarkdownComponentProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { MarkdownUIProps } from './types';
2
+ export declare function Markdown({ id }: MarkdownUIProps): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1 @@
1
+ export declare function MarkdownSkeleton(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { SxProps, Theme } from '@mui/material';
2
+ export declare const styles: Record<string, SxProps<Theme>>;
@@ -0,0 +1,28 @@
1
+ import { BaseWidgetState, WidgetsStoreProps } from '../stores/types';
2
+ import { DownloadState } from '../actions';
3
+ import { DownloadConfigProps } from '../actions/download/types';
4
+ import { WrapperState } from '../wrapper/types';
5
+ import { BaseWidgetProps } from '../widget/types';
6
+ import { BaseConfig } from '../config-loader';
7
+ import { FullScreenConfigProps } from '../actions/fullscreen/types';
8
+ export interface MarkdownComponentProps {
9
+ children: string;
10
+ }
11
+ export interface MarkdownProps extends BaseWidgetProps<MarkdownWidgetConfig> {
12
+ type: 'markdown';
13
+ data: MarkdownWidgetData | undefined;
14
+ }
15
+ export interface MarkdownUIProps {
16
+ id: WidgetsStoreProps['id'];
17
+ }
18
+ export interface MarkdownDataItem {
19
+ content: string;
20
+ }
21
+ export type MarkdownWidgetData = MarkdownDataItem;
22
+ export type MarkdownWidgetState = BaseWidgetState<WrapperState<DownloadState<MarkdownProps, MarkdownWidgetData>>>;
23
+ export type MarkdownWidgetConfig = BaseConfig & FullScreenConfigProps & DownloadConfigProps<MarkdownWidgetData> & {
24
+ type: MarkdownProps['type'];
25
+ };
26
+ export interface MarkdownConfig extends Omit<BaseConfig, 'data'> {
27
+ data?: MarkdownWidgetData;
28
+ }
@@ -0,0 +1,2 @@
1
+ export { Note } from './note';
2
+ export type { NoteProps } from './types';
@@ -0,0 +1,2 @@
1
+ import { NoteProps } from './types';
2
+ export declare function Note({ id, labels }: NoteProps): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,17 @@
1
+ import { Theme } from '@mui/material';
2
+ export declare const styles: {
3
+ root: {
4
+ typography: string;
5
+ marginBlockStart: ({ spacing }: Theme) => string;
6
+ color: (theme: Theme) => string;
7
+ };
8
+ clamped: {
9
+ display: "-webkit-box";
10
+ WebkitLineClamp: number;
11
+ WebkitBoxOrient: "vertical";
12
+ overflow: "hidden";
13
+ };
14
+ expanded: {
15
+ display: "block";
16
+ };
17
+ };
@@ -0,0 +1,7 @@
1
+ import { WidgetState } from '../stores/types';
2
+ export type NoteProps = Pick<WidgetState, 'id'> & {
3
+ labels?: {
4
+ showMore?: string;
5
+ showLess?: string;
6
+ };
7
+ };
@@ -0,0 +1,4 @@
1
+ import { PieConfig } from './types';
2
+ export declare const pieConfig: (config: PieConfig & {
3
+ refUI?: import('react').Ref<HTMLElement | null>;
4
+ }) => import('../_shared/chart-config/config-factory').ChartWidgetConfigResult<import('../echart').EchartWidgetData, PieConfig, "pie">;
@@ -0,0 +1,3 @@
1
+ export type { PieProps, PieWidgetData, PieWidgetState, PieWidgetConfig, } from './types';
2
+ export { pieConfig } from './config';
3
+ export { PieSkeleton } from './skeleton';
@@ -0,0 +1 @@
1
+ export declare function PieSkeleton(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,15 @@
1
+ import { Theme } from '@mui/material';
2
+ export declare const styles: {
3
+ skeleton: {
4
+ graph: {
5
+ readonly container: {
6
+ readonly display: "flex";
7
+ readonly alignItems: "center";
8
+ readonly justifyContent: "space-between";
9
+ readonly flexDirection: "column";
10
+ readonly gap: ({ spacing }: Theme) => string;
11
+ readonly height: ({ spacing }: Theme) => string;
12
+ };
13
+ };
14
+ };
15
+ };
@@ -0,0 +1,15 @@
1
+ import { BaseWidgetProps } from '../widget/types';
2
+ import { BaseConfig } from '../config-loader';
3
+ import { EchartWidgetConfig, EchartWidgetData, EchartWidgetState } from '../echart';
4
+ export interface PieProps extends BaseWidgetProps<PieWidgetConfig> {
5
+ type: 'pie';
6
+ data: PieWidgetData | undefined;
7
+ }
8
+ export type PieWidgetData = EchartWidgetData;
9
+ export type PieWidgetState = EchartWidgetState;
10
+ export type PieWidgetConfig = PieConfig & EchartWidgetConfig & {
11
+ type: PieProps['type'];
12
+ };
13
+ export interface PieConfig extends Omit<BaseConfig, 'data'> {
14
+ data?: PieWidgetData;
15
+ }
@@ -0,0 +1,2 @@
1
+ import { RangeItemProps } from '../types';
2
+ export declare function RangeItem({ id, index }: RangeItemProps): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,2 @@
1
+ import { RangeConfig, RangeWidgetConfig } from './types';
2
+ export declare function rangeConfig({ refUI, data, ...props }: RangeConfig): RangeWidgetConfig;
@@ -0,0 +1,5 @@
1
+ export { RangeUI } from './range-ui';
2
+ export { RangeSkeleton } from './skeleton';
3
+ export { RangeItem } from './components/range-item';
4
+ export type { RangeWidgetState, RangeUIProps, RangeDataItem, RangeWidgetData, RangeItemProps, } from './types';
5
+ export { sanitizeRangeDataItem, sanitizeRangeDataItems } from './serializer';
@@ -0,0 +1,2 @@
1
+ import { RangeUIProps } from './types';
2
+ export declare function RangeUI(props: RangeUIProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,16 @@
1
+ import { RangeDataItem } from './types';
2
+ /**
3
+ * Sanitizes RangeDataItem by converting ReactNode note values to undefined.
4
+ * This ensures only string values are stored in the widget state.
5
+ *
6
+ * @param item - The RangeDataItem to sanitize
7
+ * @returns A new RangeDataItem with ReactNode note values converted to undefined
8
+ */
9
+ export declare function sanitizeRangeDataItem(item: RangeDataItem): RangeDataItem;
10
+ /**
11
+ * Sanitizes an array of RangeDataItems by converting ReactNode note values to undefined.
12
+ *
13
+ * @param items - Array of RangeDataItems to sanitize
14
+ * @returns A new array with sanitized RangeDataItems
15
+ */
16
+ export declare function sanitizeRangeDataItems(items: RangeDataItem[] | undefined): RangeDataItem[] | undefined;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export declare function RangeSkeleton(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { SxProps, Theme } from '@mui/material';
2
+ export declare const styles: Record<string, SxProps<Theme>>;
@@ -0,0 +1,44 @@
1
+ import { ReactNode } from 'react';
2
+ import { BaseWidgetState, WidgetsStoreProps } from '../stores/types';
3
+ import { DownloadState } from '../actions';
4
+ import { DownloadConfigProps } from '../actions/download/types';
5
+ import { WrapperState } from '../wrapper/types';
6
+ import { BaseWidgetProps } from '../widget/types';
7
+ import { BaseConfig } from '../config-loader';
8
+ export interface RangeProps extends BaseWidgetProps<RangeWidgetConfig> {
9
+ type: 'range';
10
+ data: RangeWidgetData | undefined;
11
+ }
12
+ export interface RangeUIProps {
13
+ id: WidgetsStoreProps['id'];
14
+ }
15
+ export interface RangeDataItem {
16
+ min: number;
17
+ max: number;
18
+ value?: number[];
19
+ step?: number;
20
+ marks?: boolean | {
21
+ value: number;
22
+ label?: string;
23
+ }[];
24
+ disabled?: boolean;
25
+ color?: string;
26
+ note?: string | ReactNode;
27
+ }
28
+ export interface RangeItemProps {
29
+ id: WidgetsStoreProps['id'];
30
+ index: number;
31
+ }
32
+ export type RangeWidgetData = RangeDataItem[];
33
+ export type RangeWidgetState = BaseWidgetState<WrapperState<DownloadState<RangeProps & {
34
+ formatter?: (value: number) => string;
35
+ onChange?: (value: number[], index: number) => void;
36
+ }, RangeWidgetData>>>;
37
+ export type RangeWidgetConfig = BaseConfig & DownloadConfigProps<RangeWidgetData> & {
38
+ type: RangeProps['type'];
39
+ formatter?: RangeWidgetState['formatter'];
40
+ onChange?: RangeWidgetState['onChange'];
41
+ };
42
+ export interface RangeConfig extends Omit<BaseConfig, 'data'> {
43
+ data?: RangeWidgetData;
44
+ }
@@ -0,0 +1,2 @@
1
+ export { Root } from './root';
2
+ export type { RootProps } from './types';
@@ -0,0 +1,2 @@
1
+ import { RootProps } from './types';
2
+ export declare function Root(props: RootProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { Theme } from '@mui/material';
2
+ export declare const styles: {
3
+ root: {
4
+ display: "flex";
5
+ flexDirection: "column";
6
+ gap: (theme: Theme) => string;
7
+ };
8
+ };
@@ -0,0 +1,15 @@
1
+ import { ReactNode } from 'react';
2
+ import { WrapperUIProps } from '../wrapper';
3
+ import { WidgetsStoreProps } from '../stores/types';
4
+ export interface RootProps {
5
+ id: WidgetsStoreProps['id'];
6
+ type: WidgetsStoreProps['type'];
7
+ children: ReactNode;
8
+ title: WrapperUIProps['title'];
9
+ data?: unknown;
10
+ isLoading?: WidgetsStoreProps['isLoading'];
11
+ isFetching?: WidgetsStoreProps['isFetching'];
12
+ collapsed?: WrapperUIProps['collapsed'];
13
+ collapsible?: WrapperUIProps['disabled'];
14
+ disabled?: WrapperUIProps['disabled'];
15
+ }
@@ -0,0 +1,4 @@
1
+ import { ScatterplotConfig, ScatterplotWidgetData } from './types';
2
+ export declare const scatterplotConfig: (config: ScatterplotConfig & {
3
+ refUI?: import('react').Ref<HTMLElement | null>;
4
+ }) => import('../_shared/chart-config/config-factory').ChartWidgetConfigResult<ScatterplotWidgetData, ScatterplotConfig, "scatterplot">;
@@ -0,0 +1,3 @@
1
+ export type { ScatterplotProps, ScatterplotWidgetData, ScatterplotWidgetState, ScatterplotWidgetConfig, } from './types';
2
+ export { scatterplotConfig } from './config';
3
+ export { ScatterplotSkeleton } from './skeleton';
@@ -0,0 +1 @@
1
+ export declare function ScatterplotSkeleton(): import("react/jsx-runtime").JSX.Element;