@carto/ps-react-ui 5.0.0-widgets.4 → 5.0.0-widgets.6

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 (62) hide show
  1. package/dist/{error-DGzuzmn1.js → error-G3sy6lw3.js} +2 -2
  2. package/dist/{error-DGzuzmn1.js.map → error-G3sy6lw3.js.map} +1 -1
  3. package/dist/{no-data-BBAoT1vK.js → no-data-DfkC_Kc_.js} +2 -2
  4. package/dist/{no-data-BBAoT1vK.js.map → no-data-DfkC_Kc_.js.map} +1 -1
  5. package/dist/note-Clng2ej6.js +124 -0
  6. package/dist/note-Clng2ej6.js.map +1 -0
  7. package/dist/{row-C_m1ovHv.js → row-B9hTUitn.js} +2 -2
  8. package/dist/{row-C_m1ovHv.js.map → row-B9hTUitn.js.map} +1 -1
  9. package/dist/{series-6xp-KQ0S.js → series-DojKkd_o.js} +3 -3
  10. package/dist/{series-6xp-KQ0S.js.map → series-DojKkd_o.js.map} +1 -1
  11. package/dist/types/widgets/category/config.d.ts +1 -0
  12. package/dist/types/widgets/category/types.d.ts +1 -0
  13. package/dist/types/widgets/echart/types.d.ts +1 -0
  14. package/dist/types/widgets/index.d.ts +2 -0
  15. package/dist/types/widgets/stores/types.d.ts +0 -75
  16. package/dist/types/widgets/subheader/index.d.ts +2 -2
  17. package/dist/types/widgets/subheader/subheader.d.ts +2 -2
  18. package/dist/types/widgets/subheader/types.d.ts +1 -1
  19. package/dist/types/widgets/table/hooks/use-pagination.d.ts +1 -7
  20. package/dist/types/widgets/table/hooks/use-selection.d.ts +0 -2
  21. package/dist/types/widgets/table/hooks/use-sort.d.ts +1 -7
  22. package/dist/types/widgets/table/types.d.ts +16 -5
  23. package/dist/widget-store-Dd7_sWZT.js +132 -0
  24. package/dist/widget-store-Dd7_sWZT.js.map +1 -0
  25. package/dist/widgets/actions.js +23 -22
  26. package/dist/widgets/actions.js.map +1 -1
  27. package/dist/widgets/bar.js +8 -7
  28. package/dist/widgets/bar.js.map +1 -1
  29. package/dist/widgets/category.js +135 -128
  30. package/dist/widgets/category.js.map +1 -1
  31. package/dist/widgets/echart.js +1 -1
  32. package/dist/widgets/error.js +1 -1
  33. package/dist/widgets/formula.js +19 -18
  34. package/dist/widgets/formula.js.map +1 -1
  35. package/dist/widgets/histogram.js +54 -53
  36. package/dist/widgets/histogram.js.map +1 -1
  37. package/dist/widgets/markdown.js +1 -1
  38. package/dist/widgets/no-data.js +1 -1
  39. package/dist/widgets/note.js +2 -121
  40. package/dist/widgets/note.js.map +1 -1
  41. package/dist/widgets/pie.js +8 -7
  42. package/dist/widgets/pie.js.map +1 -1
  43. package/dist/widgets/range.js +2 -2
  44. package/dist/widgets/root.js +1 -1
  45. package/dist/widgets/scatterplot.js +8 -7
  46. package/dist/widgets/scatterplot.js.map +1 -1
  47. package/dist/widgets/skeleton-loader.js +1 -1
  48. package/dist/widgets/spread.js +20 -19
  49. package/dist/widgets/spread.js.map +1 -1
  50. package/dist/widgets/stores.js +1 -1
  51. package/dist/widgets/subheader.js +5 -5
  52. package/dist/widgets/subheader.js.map +1 -1
  53. package/dist/widgets/table.js +499 -488
  54. package/dist/widgets/table.js.map +1 -1
  55. package/dist/widgets/timeseries.js +8 -7
  56. package/dist/widgets/timeseries.js.map +1 -1
  57. package/dist/widgets/wrapper.js +1 -1
  58. package/dist/widgets.js +6 -4
  59. package/dist/widgets.js.map +1 -1
  60. package/package.json +1 -1
  61. package/dist/widget-store-DNyVElxd.js +0 -190
  62. package/dist/widget-store-DNyVElxd.js.map +0 -1
@@ -1,7 +1,7 @@
1
1
  import { jsx as d, jsxs as a } from "react/jsx-runtime";
2
2
  import { c as f } from "react/compiler-runtime";
3
3
  import { AlertTitle as m, Alert as h } from "@mui/material";
4
- import { u } from "./widget-store-DNyVElxd.js";
4
+ import { u } from "./widget-store-Dd7_sWZT.js";
5
5
  import { useShallow as p } from "zustand/shallow";
6
6
  function W(g) {
7
7
  const r = f(7), {
@@ -35,4 +35,4 @@ function W(g) {
35
35
  export {
36
36
  W
37
37
  };
38
- //# sourceMappingURL=error-DGzuzmn1.js.map
38
+ //# sourceMappingURL=error-G3sy6lw3.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"error-DGzuzmn1.js","sources":["../src/widgets/error/error.tsx"],"sourcesContent":["import { Alert, AlertTitle } from '@mui/material'\nimport { useWidgetStore } from '../stores/widget-store'\nimport { useShallow } from 'zustand/shallow'\nimport type { WidgetErrorProps } from './types'\n\nexport function WidgetError({ id, children }: WidgetErrorProps) {\n const widget = useWidgetStore(\n useShallow((state) => {\n const w = state.widgets[id]\n return {\n isLoading: w?.isLoading,\n isFetching: w?.isFetching,\n error: w?.error,\n }\n }),\n )\n\n // Don't show error during loading/fetching states\n if (widget?.isLoading || widget?.isFetching) {\n return children\n }\n\n // Show error UI if error exists\n if (widget?.error) {\n const errorTitle = widget.error.title ?? 'Error'\n const errorMessage =\n widget.error.message ??\n 'An error occurred while loading the widget. Please try again.'\n\n return (\n <Alert severity='error'>\n <AlertTitle>{errorTitle}</AlertTitle>\n {errorMessage}\n </Alert>\n )\n }\n\n // No error, render children\n return children\n}\n"],"names":["WidgetError","t0","$","_c","id","children","t1","state","w","widgets","isLoading","isFetching","error","widget","useWidgetStore","useShallow","errorTitle","title","errorMessage","message","t2","AlertTitle","t3","jsxs","Alert"],"mappings":";;;;;AAKO,SAAAA,EAAAC,GAAA;AAAA,QAAAC,IAAAC,EAAA,CAAA,GAAqB;AAAA,IAAAC,IAAAA;AAAAA,IAAAC,UAAAA;AAAAA,EAAAA,IAAAJ;AAAkC,MAAAK;AAAA,EAAAJ,SAAAE,KAE/CE,IAAAC,CAAAA,MAAA;AACT,UAAAC,IAAUD,EAAKE,QAASL,CAAE;AAAC,WACpB;AAAA,MAAAM,WACMF,GAACE;AAAAA,MAAWC,YACXH,GAACG;AAAAA,MAAYC,OAClBJ,GAACI;AAAAA,IAAAA;AAAAA,EACT,GACFV,OAAAE,GAAAF,OAAAI,KAAAA,IAAAJ,EAAA,CAAA;AARH,QAAAW,IAAeC,EACbC,EAAWT,CAOV,CACH;AAGA,MAAIO,GAAMH,aAAeG,GAAMF;AAAY,WAClCN;AAIT,MAAIQ,GAAMD,OAAO;AACf,UAAAI,IAAmBH,EAAMD,MAAMK,SAAZ,SACnBC,IACEL,EAAMD,MAAMO,WAAZ;AAC+D,QAAAC;AAAA,IAAAlB,SAAAc,KAI7DI,sBAACC,kBAAuB,GAAanB,OAAAc,GAAAd,OAAAkB,KAAAA,IAAAlB,EAAA,CAAA;AAAA,QAAAoB;AAAA,WAAApB,EAAA,CAAA,MAAAgB,KAAAhB,SAAAkB,KADvCE,IAAA,gBAAAC,EAACC,GAAA,EAAe,UAAA,SACdJ,UAAAA;AAAAA,MAAAA;AAAAA,MACCF;AAAAA,IAAAA,GACH,GAAQhB,OAAAgB,GAAAhB,OAAAkB,GAAAlB,OAAAoB,KAAAA,IAAApB,EAAA,CAAA,GAHRoB;AAAAA,EAGQ;AAEX,SAGMjB;AAAQ;"}
1
+ {"version":3,"file":"error-G3sy6lw3.js","sources":["../src/widgets/error/error.tsx"],"sourcesContent":["import { Alert, AlertTitle } from '@mui/material'\nimport { useWidgetStore } from '../stores/widget-store'\nimport { useShallow } from 'zustand/shallow'\nimport type { WidgetErrorProps } from './types'\n\nexport function WidgetError({ id, children }: WidgetErrorProps) {\n const widget = useWidgetStore(\n useShallow((state) => {\n const w = state.widgets[id]\n return {\n isLoading: w?.isLoading,\n isFetching: w?.isFetching,\n error: w?.error,\n }\n }),\n )\n\n // Don't show error during loading/fetching states\n if (widget?.isLoading || widget?.isFetching) {\n return children\n }\n\n // Show error UI if error exists\n if (widget?.error) {\n const errorTitle = widget.error.title ?? 'Error'\n const errorMessage =\n widget.error.message ??\n 'An error occurred while loading the widget. Please try again.'\n\n return (\n <Alert severity='error'>\n <AlertTitle>{errorTitle}</AlertTitle>\n {errorMessage}\n </Alert>\n )\n }\n\n // No error, render children\n return children\n}\n"],"names":["WidgetError","t0","$","_c","id","children","t1","state","w","widgets","isLoading","isFetching","error","widget","useWidgetStore","useShallow","errorTitle","title","errorMessage","message","t2","AlertTitle","t3","jsxs","Alert"],"mappings":";;;;;AAKO,SAAAA,EAAAC,GAAA;AAAA,QAAAC,IAAAC,EAAA,CAAA,GAAqB;AAAA,IAAAC,IAAAA;AAAAA,IAAAC,UAAAA;AAAAA,EAAAA,IAAAJ;AAAkC,MAAAK;AAAA,EAAAJ,SAAAE,KAE/CE,IAAAC,CAAAA,MAAA;AACT,UAAAC,IAAUD,EAAKE,QAASL,CAAE;AAAC,WACpB;AAAA,MAAAM,WACMF,GAACE;AAAAA,MAAWC,YACXH,GAACG;AAAAA,MAAYC,OAClBJ,GAACI;AAAAA,IAAAA;AAAAA,EACT,GACFV,OAAAE,GAAAF,OAAAI,KAAAA,IAAAJ,EAAA,CAAA;AARH,QAAAW,IAAeC,EACbC,EAAWT,CAOV,CACH;AAGA,MAAIO,GAAMH,aAAeG,GAAMF;AAAY,WAClCN;AAIT,MAAIQ,GAAMD,OAAO;AACf,UAAAI,IAAmBH,EAAMD,MAAMK,SAAZ,SACnBC,IACEL,EAAMD,MAAMO,WAAZ;AAC+D,QAAAC;AAAA,IAAAlB,SAAAc,KAI7DI,sBAACC,kBAAuB,GAAanB,OAAAc,GAAAd,OAAAkB,KAAAA,IAAAlB,EAAA,CAAA;AAAA,QAAAoB;AAAA,WAAApB,EAAA,CAAA,MAAAgB,KAAAhB,SAAAkB,KADvCE,IAAA,gBAAAC,EAACC,GAAA,EAAe,UAAA,SACdJ,UAAAA;AAAAA,MAAAA;AAAAA,MACCF;AAAAA,IAAAA,GACH,GAAQhB,OAAAgB,GAAAhB,OAAAkB,GAAAlB,OAAAoB,KAAAA,IAAApB,EAAA,CAAA,GAHRoB;AAAAA,EAGQ;AAEX,SAGMjB;AAAQ;"}
@@ -2,7 +2,7 @@ import { jsx as g, jsxs as h } from "react/jsx-runtime";
2
2
  import { c as x } from "react/compiler-runtime";
3
3
  import { Typography as y, Box as v } from "@mui/material";
4
4
  import { useShallow as w } from "zustand/shallow";
5
- import { u as b } from "./widget-store-DNyVElxd.js";
5
+ import { u as b } from "./widget-store-Dd7_sWZT.js";
6
6
  const j = {
7
7
  root: {
8
8
  display: "flex",
@@ -58,4 +58,4 @@ function A(i) {
58
58
  export {
59
59
  k as W
60
60
  };
61
- //# sourceMappingURL=no-data-BBAoT1vK.js.map
61
+ //# sourceMappingURL=no-data-DfkC_Kc_.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"no-data-BBAoT1vK.js","sources":["../src/widgets/no-data/style.ts","../src/widgets/no-data/no-data.tsx"],"sourcesContent":["import type { SxProps, Theme } from '@mui/material'\n\n/**\n * Styles for NoData component matching Figma design specifications\n * Design reference: node 5781-11028\n */\nexport const styles: Record<string, SxProps<Theme>> = {\n root: {\n display: 'flex',\n flexDirection: 'column',\n gap: 1, // 8px\n paddingTop: 1, // 8px\n paddingBottom: 2, // 16px\n paddingX: 2, // 16px\n width: '100%',\n minHeight: '100%',\n },\n}\n","import { Box, Typography } from '@mui/material'\nimport { useShallow } from 'zustand/shallow'\nimport { useWidgetStore } from '../stores/widget-store'\nimport type { WidgetNoDataProps } from './types'\nimport { styles } from './style'\n\n/**\n * NoData wrapper component that displays empty state UI when widget has no data\n *\n * Integrates with widget store to check loading/fetching state and data availability.\n * Works in conjunction with SkeletonLoader for complete loading/empty state handling.\n *\n * @example Basic usage\n * ```tsx\n * <NoData id=\"my-widget\">\n * <WidgetContent id=\"my-widget\" />\n * </NoData>\n * ```\n *\n * @example With SkeletonLoader\n * ```tsx\n * <SkeletonLoader id=\"my-widget\" Skeleton={MySkeleton}>\n * <NoData id=\"my-widget\">\n * <WidgetContent id=\"my-widget\" />\n * </NoData>\n * </SkeletonLoader>\n * ```\n *\n * @example With custom messages\n * ```tsx\n * <NoData\n * id=\"my-widget\"\n * title=\"No results found\"\n * description=\"Try adjusting your filters\"\n * >\n * <WidgetContent id=\"my-widget\" />\n * </NoData>\n * ```\n */\nexport function WidgetNoData({\n id,\n children,\n title = 'No data available',\n description = 'There are no results for the combination of filters applied to your data. Try tweaking your filters, or zoom and pan the map to adjust filters',\n isEmpty = defaultIsEmpty,\n}: WidgetNoDataProps) {\n // Subscribe to widget store with selective subscription for optimal performance\n const widget = useWidgetStore(\n useShallow((state) => {\n const w = state.widgets[id]\n return {\n isLoading: w?.isLoading,\n isFetching: w?.isFetching,\n data: w?.data,\n }\n }),\n )\n\n // If loading or fetching, show children\n // SkeletonLoader handles loading state, this allows proper composition\n if (widget?.isLoading || widget?.isFetching) {\n return children\n }\n\n // Check if data is empty\n if (isEmpty(widget?.data)) {\n return (\n <Box sx={styles.root}>\n <Typography variant='body2' color='text.primary'>\n {title}\n </Typography>\n <Typography variant='caption' color='text.secondary'>\n {description}\n </Typography>\n </Box>\n )\n }\n\n // Data exists, render children\n return children\n}\n\n/**\n * Default function to determine if data is empty\n * Handles various data structures commonly used in widgets\n */\nfunction defaultIsEmpty(data: unknown): boolean {\n // Null or undefined\n if (data == null) {\n return true\n }\n\n // Arrays (most common case)\n if (Array.isArray(data)) {\n // Empty array\n if (data.length === 0) {\n return true\n }\n\n // Array of arrays (CategoryWidget pattern: [[],[]])\n // Check if all inner arrays are empty\n if (data.every((item) => Array.isArray(item) && item.length === 0)) {\n return true\n }\n\n return false\n }\n\n // Objects\n if (typeof data === 'object') {\n return Object.keys(data).length === 0\n }\n\n // Primitives (numbers, strings, booleans) are considered valid data\n return false\n}\n"],"names":["styles","root","display","flexDirection","gap","paddingTop","paddingBottom","paddingX","width","minHeight","WidgetNoData","t0","$","_c","id","children","title","t1","description","t2","isEmpty","t3","undefined","defaultIsEmpty","t4","state","w","widgets","isLoading","isFetching","data","widget","useWidgetStore","useShallow","t5","Typography","t6","t7","Box","Array","isArray","length","every","item","Object","keys"],"mappings":";;;;;AAMO,MAAMA,IAAyC;AAAA,EACpDC,MAAM;AAAA,IACJC,SAAS;AAAA,IACTC,eAAe;AAAA,IACfC,KAAK;AAAA;AAA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ANfC,sBAACC,GAAA,EAAQ,IAAAtC,EAAMC,MACbiC,UAAAA;AAAAA,MAAAA;AAAAA,MAGAE;AAAAA,IAAAA,GAGF,GAAMxB,OAAAsB,GAAAtB,OAAAwB,GAAAxB,OAAAyB,KAAAA,IAAAzB,EAAA,CAAA,GAPNyB;AAAAA,EAOM;AAET,SAGMtB;AAAQ;AAOjB,SAASQ,EAAeO,GAAwB;AAE9C,SAAIA,KAAQ,OACH,KAILS,MAAMC,QAAQV,CAAI,IAEhBA,GAAAA,EAAKW,WAAW,KAMhBX,EAAKY,MAAOC,CAAAA,MAASJ,MAAMC,QAAQG,CAAI,KAAKA,EAAKF,WAAW,CAAC,KAQ/D,OAAOX,KAAS,WACXc,OAAOC,KAAKf,CAAI,EAAEW,WAAW,IAI/B;AACT;"}
1
+ {"version":3,"file":"no-data-DfkC_Kc_.js","sources":["../src/widgets/no-data/style.ts","../src/widgets/no-data/no-data.tsx"],"sourcesContent":["import type { SxProps, Theme } from '@mui/material'\n\n/**\n * Styles for NoData component matching Figma design specifications\n * Design reference: node 5781-11028\n */\nexport const styles: Record<string, SxProps<Theme>> = {\n root: {\n display: 'flex',\n flexDirection: 'column',\n gap: 1, // 8px\n paddingTop: 1, // 8px\n paddingBottom: 2, // 16px\n paddingX: 2, // 16px\n width: '100%',\n minHeight: '100%',\n },\n}\n","import { Box, Typography } from '@mui/material'\nimport { useShallow } from 'zustand/shallow'\nimport { useWidgetStore } from '../stores/widget-store'\nimport type { WidgetNoDataProps } from './types'\nimport { styles } from './style'\n\n/**\n * NoData wrapper component that displays empty state UI when widget has no data\n *\n * Integrates with widget store to check loading/fetching state and data availability.\n * Works in conjunction with SkeletonLoader for complete loading/empty state handling.\n *\n * @example Basic usage\n * ```tsx\n * <NoData id=\"my-widget\">\n * <WidgetContent id=\"my-widget\" />\n * </NoData>\n * ```\n *\n * @example With SkeletonLoader\n * ```tsx\n * <SkeletonLoader id=\"my-widget\" Skeleton={MySkeleton}>\n * <NoData id=\"my-widget\">\n * <WidgetContent id=\"my-widget\" />\n * </NoData>\n * </SkeletonLoader>\n * ```\n *\n * @example With custom messages\n * ```tsx\n * <NoData\n * id=\"my-widget\"\n * title=\"No results found\"\n * description=\"Try adjusting your filters\"\n * >\n * <WidgetContent id=\"my-widget\" />\n * </NoData>\n * ```\n */\nexport function WidgetNoData({\n id,\n children,\n title = 'No data available',\n description = 'There are no results for the combination of filters applied to your data. Try tweaking your filters, or zoom and pan the map to adjust filters',\n isEmpty = defaultIsEmpty,\n}: WidgetNoDataProps) {\n // Subscribe to widget store with selective subscription for optimal performance\n const widget = useWidgetStore(\n useShallow((state) => {\n const w = state.widgets[id]\n return {\n isLoading: w?.isLoading,\n isFetching: w?.isFetching,\n data: w?.data,\n }\n }),\n )\n\n // If loading or fetching, show children\n // SkeletonLoader handles loading state, this allows proper composition\n if (widget?.isLoading || widget?.isFetching) {\n return children\n }\n\n // Check if data is empty\n if (isEmpty(widget?.data)) {\n return (\n <Box sx={styles.root}>\n <Typography variant='body2' color='text.primary'>\n {title}\n </Typography>\n <Typography variant='caption' color='text.secondary'>\n {description}\n </Typography>\n </Box>\n )\n }\n\n // Data exists, render children\n return children\n}\n\n/**\n * Default function to determine if data is empty\n * Handles various data structures commonly used in widgets\n */\nfunction defaultIsEmpty(data: unknown): boolean {\n // Null or undefined\n if (data == null) {\n return true\n }\n\n // Arrays (most common case)\n if (Array.isArray(data)) {\n // Empty array\n if (data.length === 0) {\n return true\n }\n\n // Array of arrays (CategoryWidget pattern: [[],[]])\n // Check if all inner arrays are empty\n if (data.every((item) => Array.isArray(item) && item.length === 0)) {\n return true\n }\n\n return false\n }\n\n // Objects\n if (typeof data === 'object') {\n return Object.keys(data).length === 0\n }\n\n // Primitives (numbers, strings, booleans) are considered valid data\n return false\n}\n"],"names":["styles","root","display","flexDirection","gap","paddingTop","paddingBottom","paddingX","width","minHeight","WidgetNoData","t0","$","_c","id","children","title","t1","description","t2","isEmpty","t3","undefined","defaultIsEmpty","t4","state","w","widgets","isLoading","isFetching","data","widget","useWidgetStore","useShallow","t5","Typography","t6","t7","Box","Array","isArray","length","every","item","Object","keys"],"mappings":";;;;;AAMO,MAAMA,IAAyC;AAAA,EACpDC,MAAM;AAAA,IACJC,SAAS;AAAA,IACTC,eAAe;AAAA,IACfC,KAAK;AAAA;AAAA,IACLC,YAAY;AAAA;AAAA,IACZC,eAAe;AAAA;AAAA,IACfC,UAAU;AAAA;AAAA,IACVC,OAAO;AAAA,IACPC,WAAW;AAAA,EAAA;AAEf;ACsBO,SAAAC,EAAAC,GAAA;AAAA,QAAAC,IAAAC,EAAA,CAAA,GAAsB;AAAA,IAAAC,IAAAA;AAAAA,IAAAC,UAAAA;AAAAA,IAAAC,OAAAC;AAAAA,IAAAC,aAAAC;AAAAA,IAAAC,SAAAC;AAAAA,EAAAA,IAAAV,GAG3BK,IAAAC,MAAAK,SAAA,sBAAAL,GACAC,IAAAC,MAAAG,SAAA,mJAAAH,GACAC,IAAAC,MAAAC,SAAAC,IAAAF;AAAwB,MAAAG;AAAA,EAAAZ,SAAAE,KAIXU,IAAAC,CAAAA,MAAA;AACT,UAAAC,IAAUD,EAAKE,QAASb,CAAE;AAAC,WACpB;AAAA,MAAAc,WACMF,GAACE;AAAAA,MAAWC,YACXH,GAACG;AAAAA,MAAYC,MACnBJ,GAACI;AAAAA,IAAAA;AAAAA,EACR,GACFlB,OAAAE,GAAAF,OAAAY,KAAAA,IAAAZ,EAAA,CAAA;AARH,QAAAmB,IAAeC,EACbC,EAAWT,CAOV,CACH;AAIA,MAAIO,GAAMH,aAAeG,GAAMF;AAAY,WAClCd;AAIT,MAAIK,EAAQW,GAAMD,IAAM,GAAC;AAAA,QAAAI;AAAA,IAAAtB,SAAAI,KAGnBkB,sBAACC,GAAA,EAAmB,SAAA,SAAc,OAAA,gBAC/BnB,UAAAA,GACH,GAAaJ,OAAAI,GAAAJ,OAAAsB,KAAAA,IAAAtB,EAAA,CAAA;AAAA,QAAAwB;AAAA,IAAAxB,SAAAM,KACbkB,sBAACD,GAAA,EAAmB,SAAA,WAAgB,OAAA,kBACjCjB,UAAAA,GACH,GAAaN,OAAAM,GAAAN,OAAAwB,KAAAA,IAAAxB,EAAA,CAAA;AAAA,QAAAyB;AAAA,WAAAzB,EAAA,CAAA,MAAAsB,KAAAtB,SAAAwB,KANfC,sBAACC,GAAA,EAAQ,IAAAtC,EAAMC,MACbiC,UAAAA;AAAAA,MAAAA;AAAAA,MAGAE;AAAAA,IAAAA,GAGF,GAAMxB,OAAAsB,GAAAtB,OAAAwB,GAAAxB,OAAAyB,KAAAA,IAAAzB,EAAA,CAAA,GAPNyB;AAAAA,EAOM;AAET,SAGMtB;AAAQ;AAOjB,SAASQ,EAAeO,GAAwB;AAE9C,SAAIA,KAAQ,OACH,KAILS,MAAMC,QAAQV,CAAI,IAEhBA,GAAAA,EAAKW,WAAW,KAMhBX,EAAKY,MAAOC,CAAAA,MAASJ,MAAMC,QAAQG,CAAI,KAAKA,EAAKF,WAAW,CAAC,KAQ/D,OAAOX,KAAS,WACXc,OAAOC,KAAKf,CAAI,EAAEW,WAAW,IAI/B;AACT;"}
@@ -0,0 +1,124 @@
1
+ import { jsx as p, jsxs as N } from "react/jsx-runtime";
2
+ import { c as R } from "react/compiler-runtime";
3
+ import { useState as _, useRef as j, useEffectEvent as z, useEffect as M } from "react";
4
+ import { Button as F, Box as W, Link as H, Typography as P } from "@mui/material";
5
+ import U from "react-markdown";
6
+ const L = {
7
+ root: {
8
+ typography: "caption",
9
+ color: (n) => n.palette.text.secondary,
10
+ marginBlockStart: ({
11
+ spacing: n
12
+ }) => n(1)
13
+ },
14
+ clamped: {
15
+ display: "-webkit-box",
16
+ WebkitLineClamp: 3,
17
+ WebkitBoxOrient: "vertical",
18
+ overflow: "hidden"
19
+ },
20
+ expanded: {
21
+ display: "block"
22
+ },
23
+ linkButton: {
24
+ padding: 0,
25
+ minWidth: "auto",
26
+ textTransform: "none",
27
+ typography: "caption",
28
+ fontWeight: 500,
29
+ textDecoration: "none",
30
+ "&:hover": {
31
+ backgroundColor: "transparent"
32
+ }
33
+ }
34
+ }, C = {
35
+ showMore: "Show More",
36
+ showLess: "Show Less"
37
+ }, l = (n) => {
38
+ const e = R(2), {
39
+ children: t
40
+ } = n;
41
+ let r;
42
+ return e[0] !== t ? (r = /* @__PURE__ */ p(P, { paragraph: !0, color: "inherit", variant: "caption", children: t }), e[0] = t, e[1] = r) : r = e[1], r;
43
+ }, $ = {
44
+ h1: l,
45
+ h2: l,
46
+ h3: l,
47
+ p: l,
48
+ a: ({
49
+ children: n,
50
+ href: e,
51
+ target: t = "_blank",
52
+ rel: r = "noopener noreferrer"
53
+ }) => /* @__PURE__ */ p(H, { href: e, target: t, rel: r, color: "text.primary", underline: "always", children: n }),
54
+ img: () => null,
55
+ ul: l,
56
+ ol: l,
57
+ li: l
58
+ };
59
+ function Q(n) {
60
+ const e = R(27), {
61
+ children: t,
62
+ labels: r
63
+ } = n, S = r === void 0 ? C : r, [o, A] = _(!1), [E, D] = _(!1), h = j(null);
64
+ let m;
65
+ e[0] === Symbol.for("react.memo_cache_sentinel") ? (m = () => {
66
+ if (h.current) {
67
+ const v = h.current.scrollHeight > h.current.clientHeight;
68
+ D(v);
69
+ }
70
+ }, e[0] = m) : m = e[0];
71
+ const s = z(m);
72
+ let u;
73
+ e[1] !== s ? (u = () => {
74
+ s();
75
+ }, e[1] = s, e[2] = u) : u = e[2];
76
+ let g;
77
+ e[3] !== t ? (g = [t], e[3] = t, e[4] = g) : g = e[4], M(u, g);
78
+ let x;
79
+ e[5] !== s ? (x = () => {
80
+ const v = h.current;
81
+ if (!v)
82
+ return;
83
+ const O = new ResizeObserver(() => {
84
+ s();
85
+ });
86
+ return O.observe(v), () => {
87
+ O.disconnect();
88
+ };
89
+ }, e[5] = s, e[6] = x) : x = e[6];
90
+ let w;
91
+ if (e[7] === Symbol.for("react.memo_cache_sentinel") ? (w = [], e[7] = w) : w = e[7], M(x, w), !t)
92
+ return null;
93
+ let b;
94
+ e[8] !== o ? (b = () => {
95
+ A(!o);
96
+ }, e[8] = o, e[9] = b) : b = e[9];
97
+ const T = b;
98
+ let y;
99
+ e[10] !== S ? (y = {
100
+ ...C,
101
+ ...S
102
+ }, e[10] = S, e[11] = y) : y = e[11];
103
+ const i = y, B = o ? L.expanded : L.clamped;
104
+ let c;
105
+ e[12] !== B ? (c = {
106
+ ...L.root,
107
+ ...B
108
+ }, e[12] = B, e[13] = c) : c = e[13];
109
+ let a;
110
+ e[14] !== t ? (a = /* @__PURE__ */ p(U, { components: $, children: t }), e[14] = t, e[15] = a) : a = e[15];
111
+ let f;
112
+ e[16] !== c || e[17] !== a ? (f = /* @__PURE__ */ p(W, { ref: h, sx: c, children: a }), e[16] = c, e[17] = a, e[18] = f) : f = e[18];
113
+ let d;
114
+ e[19] !== T || e[20] !== o || e[21] !== i || e[22] !== E ? (d = (E || o) && /* @__PURE__ */ p(F, { onClick: T, variant: "text", color: "primary", sx: L.linkButton, "aria-expanded": o, "aria-label": o ? i.showLess : i.showMore, "aria-controls": "note-content", children: o ? i.showLess : i.showMore }), e[19] = T, e[20] = o, e[21] = i, e[22] = E, e[23] = d) : d = e[23];
115
+ let k;
116
+ return e[24] !== f || e[25] !== d ? (k = /* @__PURE__ */ N(W, { children: [
117
+ f,
118
+ d
119
+ ] }), e[24] = f, e[25] = d, e[26] = k) : k = e[26], k;
120
+ }
121
+ export {
122
+ Q as W
123
+ };
124
+ //# sourceMappingURL=note-Clng2ej6.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"note-Clng2ej6.js","sources":["../src/widgets/note/style.ts","../src/widgets/note/note.tsx"],"sourcesContent":["import type { SxProps, Theme } from '@mui/material'\n\nexport const styles = {\n root: {\n typography: 'caption',\n color: (theme: Theme) => theme.palette.text.secondary,\n marginBlockStart: ({ spacing }) => spacing(1),\n },\n clamped: {\n display: '-webkit-box',\n WebkitLineClamp: 3,\n WebkitBoxOrient: 'vertical',\n overflow: 'hidden',\n },\n expanded: {\n display: 'block',\n },\n linkButton: {\n padding: 0,\n minWidth: 'auto',\n textTransform: 'none',\n typography: 'caption',\n fontWeight: 500,\n textDecoration: 'none',\n '&:hover': {\n backgroundColor: 'transparent',\n },\n },\n} satisfies Record<string, SxProps<Theme>>\n","import { useState, useEffect, useRef, useEffectEvent } from 'react'\nimport { Box, Button, Link, Typography } from '@mui/material'\nimport type { WidgetNoteProps } from './types'\nimport { styles } from './style'\nimport ReactMarkdown, { type Components } from 'react-markdown'\n\nconst DEFAULT_LABELS = {\n showMore: 'Show More',\n showLess: 'Show Less',\n} as const\n\nconst DEFAULT_P = ({ children }: { children?: React.ReactNode }) => (\n <Typography paragraph color='inherit' variant='caption'>\n {children}\n </Typography>\n)\n\nconst COMPONENTS: Components = {\n h1: DEFAULT_P,\n h2: DEFAULT_P,\n h3: DEFAULT_P,\n p: DEFAULT_P,\n a: ({ children, href, target = '_blank', rel = 'noopener noreferrer' }) => (\n <Link\n href={href}\n target={target}\n rel={rel}\n color='text.primary'\n underline='always'\n >\n {children}\n </Link>\n ),\n img: () => null,\n ul: DEFAULT_P,\n ol: DEFAULT_P,\n li: DEFAULT_P,\n}\n\nexport function WidgetNote({\n children,\n labels = DEFAULT_LABELS,\n}: WidgetNoteProps) {\n const [isExpanded, setIsExpanded] = useState(false)\n const [shouldShowToggle, setShouldShowToggle] = useState(false)\n const contentRef = useRef<HTMLDivElement>(null)\n\n const checkOverflow = useEffectEvent(() => {\n if (contentRef.current) {\n // Check if content overflows 3 lines\n const isOverflowing =\n contentRef.current.scrollHeight > contentRef.current.clientHeight\n setShouldShowToggle(isOverflowing)\n }\n })\n\n useEffect(() => {\n checkOverflow()\n }, [children])\n\n useEffect(() => {\n const element = contentRef.current\n if (!element) return\n\n const resizeObserver = new ResizeObserver(() => {\n checkOverflow()\n })\n\n resizeObserver.observe(element)\n\n return () => {\n resizeObserver.disconnect()\n }\n }, [])\n\n if (!children) {\n return null\n }\n\n const handleToggle = () => {\n setIsExpanded(!isExpanded)\n }\n\n const mergedLabels = { ...DEFAULT_LABELS, ...labels }\n\n return (\n <Box>\n <Box\n ref={contentRef}\n sx={{\n ...styles.root,\n ...(isExpanded ? styles.expanded : styles.clamped),\n }}\n >\n <ReactMarkdown components={COMPONENTS}>{children}</ReactMarkdown>\n </Box>\n {(shouldShowToggle || isExpanded) && (\n <Button\n onClick={handleToggle}\n variant='text'\n color='primary'\n sx={styles.linkButton}\n aria-expanded={isExpanded}\n aria-label={\n isExpanded ? mergedLabels.showLess : mergedLabels.showMore\n }\n aria-controls='note-content'\n >\n {isExpanded ? mergedLabels.showLess : mergedLabels.showMore}\n </Button>\n )}\n </Box>\n )\n}\n"],"names":["styles","root","typography","color","theme","palette","text","secondary","marginBlockStart","spacing","clamped","display","WebkitLineClamp","WebkitBoxOrient","overflow","expanded","linkButton","padding","minWidth","textTransform","fontWeight","textDecoration","backgroundColor","DEFAULT_LABELS","showMore","showLess","DEFAULT_P","t0","$","_c","children","t1","jsx","Typography","COMPONENTS","h1","h2","h3","p","a","href","target","rel","Link","img","ul","ol","li","WidgetNote","labels","undefined","isExpanded","setIsExpanded","useState","shouldShowToggle","setShouldShowToggle","contentRef","useRef","t2","Symbol","for","current","isOverflowing","scrollHeight","clientHeight","checkOverflow","useEffectEvent","t3","t4","useEffect","t5","element","resizeObserver","ResizeObserver","observe","disconnect","t6","t7","handleToggle","t8","mergedLabels","t9","t10","t11","ReactMarkdown","t12","Box","t13","Button","t14"],"mappings":";;;;;AAEO,MAAMA,IAAS;AAAA,EACpBC,MAAM;AAAA,IACJC,YAAY;AAAA,IACZC,OAAOA,CAACC,MAAiBA,EAAMC,QAAQC,KAAKC;AAAAA,IAC5CC,kBAAkBA,CAAC;AAAA,MAAEC,SAAAA;AAAAA,IAAAA,MAAcA,EAAQ,CAAC;AAAA,EAAA;AAAA,EAE9CC,SAAS;AAAA,IACPC,SAAS;AAAA,IACTC,iBAAiB;AAAA,IACjBC,iBAAiB;AAAA,IACjBC,UAAU;AAAA,EAAA;AAAA,EA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ACKmC,iBAAAA,GAEb,cAAAA,IAAa6B,EAAYvD,WAAYuD,EAAYxD,UAErC,iBAAA,gBAEb2B,UAAAA,IAAa6B,EAAYvD,WAAYuD,EAAYxD,UACpD,GACDI,QAAAkD,GAAAlD,QAAAuB,GAAAvB,QAAAoD,GAAApD,QAAA0B,GAAA1B,QAAA2D,KAAAA,IAAA3D,EAAA,EAAA;AAAA,MAAA6D;AAAA,SAAA7D,EAAA,EAAA,MAAAyD,KAAAzD,UAAA2D,KAxBHE,sBAACH,GAAA,EACCD,UAAAA;AAAAA,IAAAA;AAAAA,IASCE;AAAAA,EAAAA,GAeH,GAAM3D,QAAAyD,GAAAzD,QAAA2D,GAAA3D,QAAA6D,KAAAA,IAAA7D,EAAA,EAAA,GAzBN6D;AAyBM;"}
@@ -1,7 +1,7 @@
1
1
  import { jsx as d } from "react/jsx-runtime";
2
2
  import { c as n } from "react/compiler-runtime";
3
3
  import { Box as c } from "@mui/material";
4
- import { u as m } from "./widget-store-DNyVElxd.js";
4
+ import { u as m } from "./widget-store-Dd7_sWZT.js";
5
5
  import { useShallow as s } from "zustand/shallow";
6
6
  const f = {
7
7
  item: {
@@ -32,4 +32,4 @@ export {
32
32
  y as R,
33
33
  f as s
34
34
  };
35
- //# sourceMappingURL=row-C_m1ovHv.js.map
35
+ //# sourceMappingURL=row-B9hTUitn.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"row-C_m1ovHv.js","sources":["../src/widgets/formula/style.ts","../src/widgets/formula/components/row.tsx"],"sourcesContent":["import type { SxProps, Theme } from '@mui/material'\n\nexport const styles = {\n root: {\n display: 'flex',\n flexDirection: 'column',\n gap: (theme: Theme) => theme.spacing(2),\n },\n item: {\n '&[data-disabled=\"true\"]': {\n color: (theme: Theme) => theme.palette.text.disabled,\n },\n },\n row: {\n display: 'flex',\n alignItems: 'center',\n gap: (theme: Theme) => theme.spacing(1),\n\n '& + &': {\n marginTop: (theme: Theme) => theme.spacing(1),\n },\n },\n} satisfies Record<string, SxProps<Theme>>\n","import { Box } from '@mui/material'\nimport { styles } from '../style'\nimport type { FormulaWidgetState, RowProps } from '../types'\nimport { useWidgetStore } from '../../stores/widget-store'\nimport { useShallow } from 'zustand/shallow'\n\nexport function Row(props: RowProps) {\n const data = useWidgetStore(\n useShallow((state) => state.getWidget<FormulaWidgetState>(props.id)?.data),\n )\n\n return data?.map((_, index) => {\n return (\n <Box sx={styles.row} key={index}>\n {typeof props.children === 'function'\n ? props.children({ index })\n : props.children}\n </Box>\n )\n })\n}\n"],"names":["styles","item","color","theme","palette","text","disabled","row","display","alignItems","gap","spacing","marginTop","Row","props","$","_c","t0","id","state","getWidget","data","useWidgetStore","useShallow","t1","map","_","index","jsx","Box","children"],"mappings":";;;;;AAEO,MAAMA,IAAS;AAAA,EAMpBC,MAAM;AAAA,IACJ,2BAA2B;AAAA,MACzBC,OAAOA,CAACC,MAAiBA,EAAMC,QAAQC,KAAKC;AAAAA,IAAAA;AAAAA,EAC9C;AAAA,EAEFC,KAAK;AAAA,IACHC,SAAS;AAAA,IACTC,YAAY;AAAA,IACZC,KAAKA,CAACP,MAAiBA,EAAMQ,QAAQ,CAAC;AAAA,IAEtC,SAAS;AAAA,MACPC,WAAWA,CAACT,MAAiBA,EAAMQ,QAAQ,CAAC;AAAA,IAAA;AAAA,EAC9C;AAEJ;AChBO,SAAAE,EAAAC,GAAA;AAAA,QAAAC,IAAAC,EAAA,CAAA;AAAA,MAAAC;AAAA,EAAAF,EAAA,CAAA,MAAAD,EAAAI,MAEQD,IAAAE,CAAAA,MAAWA,EAAKC,UAA+BN,EAAKI,EAAS,GAACG,MAAAN,EAAA,CAAA,IAAAD,EAAAI,IAAAH,OAAAE,KAAAA,IAAAF,EAAA,CAAA;AAD3E,QAAAM,IAAaC,EACXC,EAAWN,CAA8D,CAC3E;AAAC,MAAAO;AAAA,SAAAT,EAAA,CAAA,MAAAM,KAAAN,SAAAD,KAEMU,IAAAH,GAAII,IAAM,CAAAC,GAAAC,MAEb,gBAAAC,EAACC,GAAA,EAAQ,IAAA7B,EAAMO,KACZ,UAAA,OAAOO,EAAKgB,YAAc,aACvBhB,EAAKgB,SAAU;AAAA,IAAAH,OAAAA;AAAAA,EAAAA,CACF,IAAbb,EAAKgB,SAAAA,GAHeH,CAI1B,CAEH,GAACZ,OAAAM,GAAAN,OAAAD,GAAAC,OAAAS,KAAAA,IAAAT,EAAA,CAAA,GARKS;AAQL;"}
1
+ {"version":3,"file":"row-B9hTUitn.js","sources":["../src/widgets/formula/style.ts","../src/widgets/formula/components/row.tsx"],"sourcesContent":["import type { SxProps, Theme } from '@mui/material'\n\nexport const styles = {\n root: {\n display: 'flex',\n flexDirection: 'column',\n gap: (theme: Theme) => theme.spacing(2),\n },\n item: {\n '&[data-disabled=\"true\"]': {\n color: (theme: Theme) => theme.palette.text.disabled,\n },\n },\n row: {\n display: 'flex',\n alignItems: 'center',\n gap: (theme: Theme) => theme.spacing(1),\n\n '& + &': {\n marginTop: (theme: Theme) => theme.spacing(1),\n },\n },\n} satisfies Record<string, SxProps<Theme>>\n","import { Box } from '@mui/material'\nimport { styles } from '../style'\nimport type { FormulaWidgetState, RowProps } from '../types'\nimport { useWidgetStore } from '../../stores/widget-store'\nimport { useShallow } from 'zustand/shallow'\n\nexport function Row(props: RowProps) {\n const data = useWidgetStore(\n useShallow((state) => state.getWidget<FormulaWidgetState>(props.id)?.data),\n )\n\n return data?.map((_, index) => {\n return (\n <Box sx={styles.row} key={index}>\n {typeof props.children === 'function'\n ? props.children({ index })\n : props.children}\n </Box>\n )\n })\n}\n"],"names":["styles","item","color","theme","palette","text","disabled","row","display","alignItems","gap","spacing","marginTop","Row","props","$","_c","t0","id","state","getWidget","data","useWidgetStore","useShallow","t1","map","_","index","jsx","Box","children"],"mappings":";;;;;AAEO,MAAMA,IAAS;AAAA,EAMpBC,MAAM;AAAA,IACJ,2BAA2B;AAAA,MACzBC,OAAOA,CAACC,MAAiBA,EAAMC,QAAQC,KAAKC;AAAAA,IAAAA;AAAAA,EAC9C;AAAA,EAEFC,KAAK;AAAA,IACHC,SAAS;AAAA,IACTC,YAAY;AAAA,IACZC,KAAKA,CAACP,MAAiBA,EAAMQ,QAAQ,CAAC;AAAA,IAEtC,SAAS;AAAA,MACPC,WAAWA,CAACT,MAAiBA,EAAMQ,QAAQ,CAAC;AAAA,IAAA;AAAA,EAC9C;AAEJ;AChBO,SAAAE,EAAAC,GAAA;AAAA,QAAAC,IAAAC,EAAA,CAAA;AAAA,MAAAC;AAAA,EAAAF,EAAA,CAAA,MAAAD,EAAAI,MAEQD,IAAAE,CAAAA,MAAWA,EAAKC,UAA+BN,EAAKI,EAAS,GAACG,MAAAN,EAAA,CAAA,IAAAD,EAAAI,IAAAH,OAAAE,KAAAA,IAAAF,EAAA,CAAA;AAD3E,QAAAM,IAAaC,EACXC,EAAWN,CAA8D,CAC3E;AAAC,MAAAO;AAAA,SAAAT,EAAA,CAAA,MAAAM,KAAAN,SAAAD,KAEMU,IAAAH,GAAII,IAAM,CAAAC,GAAAC,MAEb,gBAAAC,EAACC,GAAA,EAAQ,IAAA7B,EAAMO,KACZ,UAAA,OAAOO,EAAKgB,YAAc,aACvBhB,EAAKgB,SAAU;AAAA,IAAAH,OAAAA;AAAAA,EAAAA,CACF,IAAbb,EAAKgB,SAAAA,GAHeH,CAI1B,CAEH,GAACZ,OAAAM,GAAAN,OAAAD,GAAAC,OAAAS,KAAAA,IAAAT,EAAA,CAAA,GARKS;AAQL;"}
@@ -1,9 +1,9 @@
1
1
  import { jsx as m } from "react/jsx-runtime";
2
2
  import { c as h } from "react/compiler-runtime";
3
- import { u as g } from "./widget-store-DNyVElxd.js";
3
+ import { u as g } from "./widget-store-Dd7_sWZT.js";
4
4
  import { useShallow as p } from "zustand/shallow";
5
5
  import { Typography as S, Avatar as b } from "@mui/material";
6
- import { s as P } from "./row-C_m1ovHv.js";
6
+ import { s as P } from "./row-B9hTUitn.js";
7
7
  function y(i) {
8
8
  const e = h(4);
9
9
  let t;
@@ -88,4 +88,4 @@ export {
88
88
  j as S,
89
89
  I as a
90
90
  };
91
- //# sourceMappingURL=series-6xp-KQ0S.js.map
91
+ //# sourceMappingURL=series-DojKkd_o.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"series-6xp-KQ0S.js","sources":["../src/widgets/formula/components/item.tsx","../src/widgets/formula/components/prefix.tsx","../src/widgets/formula/components/suffix.tsx","../src/widgets/formula/components/series.tsx"],"sourcesContent":["import { Typography } from '@mui/material'\nimport type { ItemProps } from '../types'\nimport { styles } from '../style'\n\nexport function Item(props: ItemProps) {\n return (\n <Typography\n sx={styles.item}\n variant='h5'\n fontWeight='medium'\n data-disabled={props.disabled}\n color='default'\n {...props.TypographyProps}\n >\n {props.children}\n </Typography>\n )\n}\n","import { type FormulaWidgetState, type ValueProps } from '../types'\nimport { useWidgetStore } from '../../stores/widget-store'\nimport { Item } from './item'\nimport { useShallow } from 'zustand/shallow'\n\nexport function Prefix({ id, index = 0, ...props }: ValueProps) {\n const prefix = useWidgetStore(\n useShallow(\n (state) => state.getWidget<FormulaWidgetState>(id)?.data?.[index]?.prefix,\n ),\n )\n\n if (!prefix) {\n return null\n }\n\n return <Item {...props}>{prefix}</Item>\n}\n","import { type FormulaWidgetState, type ValueProps } from '../types'\nimport { useWidgetStore } from '../../stores/widget-store'\nimport { Item } from './item'\nimport type { Theme } from '@mui/material'\nimport { useShallow } from 'zustand/shallow'\n\nexport function Suffix({ id, index = 0, ...props }: ValueProps) {\n const suffix = useWidgetStore(\n useShallow(\n (state) => state.getWidget<FormulaWidgetState>(id)?.data?.[index]?.suffix,\n ),\n )\n\n if (!suffix) {\n return null\n }\n\n return (\n <Item\n TypographyProps={{\n color: (theme: Theme) => theme.palette.text.secondary,\n }}\n {...props}\n >\n {suffix}\n </Item>\n )\n}\n","import { Avatar } from '@mui/material'\nimport type { FormulaWidgetState, ValueProps } from '../types'\nimport { useWidgetStore } from '../../stores/widget-store'\nimport { useShallow } from 'zustand/shallow'\n\nexport function Series({ id, index = 0 }: Pick<ValueProps, 'id' | 'index'>) {\n const serie = useWidgetStore(\n useShallow(\n (state) => state.getWidget<FormulaWidgetState>(id)?.series?.[index],\n ),\n )\n if (!serie) {\n return null\n }\n\n const { name, color } = serie\n\n return (\n <Avatar\n sx={{\n bgcolor: color,\n width: 32,\n height: 32,\n fontSize: '0.875rem',\n fontWeight: 'medium',\n ...(color && {\n color: (theme) => theme.palette.getContrastText(color),\n }),\n }}\n >\n {name.charAt(0).toUpperCase()}\n </Avatar>\n )\n}\n"],"names":["Item","props","$","_c","t0","TypographyProps","children","disabled","Typography","styles","item","Prefix","id","t1","index","undefined","t2","state","getWidget","data","prefix","useWidgetStore","useShallow","t3","jsx","Suffix","suffix","Symbol","for","color","_temp","t4","theme","palette","text","secondary","Series","series","serie","name","getContrastText","bgcolor","width","height","fontSize","fontWeight","t5","charAt","toUpperCase","t6","Avatar"],"mappings":";;;;;;AAIO,SAAAA,EAAAC,GAAA;AAAA,QAAAC,IAAAC,EAAA,CAAA;AAAA,MAAAC;AAAA,SAAAF,EAAA,CAAA,MAAAD,EAAAI,mBAAAH,EAAA,CAAA,MAAAD,EAAAK,YAAAJ,EAAA,CAAA,MAAAD,EAAAM,YAEHH,sBAACI,GAAA,EACK,IAAAC,EAAMC,MACF,SAAA,MACG,YAAA,UACI,iBAAAT,EAAKM,UACd,OAAA,WAAS,GACXN,EAAKI,iBAERJ,YAAKK,UACR,GAAaJ,EAAA,CAAA,IAAAD,EAAAI,iBAAAH,EAAA,CAAA,IAAAD,EAAAK,UAAAJ,EAAA,CAAA,IAAAD,EAAAM,UAAAL,OAAAE,KAAAA,IAAAF,EAAA,CAAA,GATbE;AASa;ACVV,SAAAO,EAAAP,GAAA;AAAA,QAAAF,IAAAC,EAAA,EAAA;AAAA,MAAAS,GAAAX,GAAAY;AAAA,EAAAX,SAAAE,KAAgB;AAAA,IAAAQ,IAAAA;AAAAA,IAAAE,OAAAD;AAAAA,IAAA,GAAAZ;AAAAA,EAAAA,IAAAG,GAAuC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AAqB,KAAAA,IAAArB,EAAA,CAAA;AAAA,MAAA6B;AAAA,EAAA7B,EAAA,CAAA,MAAA2B,KAAA3B,SAAAqB,KARCQ,IAAA;AAAA,IAAAU,SACOZ;AAAAA,IAAKa,OACP;AAAA,IAAEC,QACD;AAAA,IAAEC,UACA;AAAA,IAAUC,YACR;AAAA,IAAQ,GAChBtB;AAAAA,EAAAA,GAGLrB,OAAA2B,GAAA3B,OAAAqB,GAAArB,OAAA6B,KAAAA,IAAA7B,EAAA,CAAA;AAAA,MAAA4C;AAAA,EAAA5C,SAAAqC,KAEAO,IAAAP,EAAIQ,OAAQ,CAAC,EAACC,YAAAA,GAAc9C,OAAAqC,GAAArC,OAAA4C,KAAAA,IAAA5C,EAAA,CAAA;AAAA,MAAA+C;AAAA,SAAA/C,EAAA,EAAA,MAAA6B,KAAA7B,UAAA4C,KAZ/BG,IAAA,gBAAAzB,EAAC0B,GAAA,EACK,IAAAnB,GAWHe,UAAAA,GACH,GAAS5C,QAAA6B,GAAA7B,QAAA4C,GAAA5C,QAAA+C,KAAAA,IAAA/C,EAAA,EAAA,GAbT+C;AAaS;"}
1
+ {"version":3,"file":"series-DojKkd_o.js","sources":["../src/widgets/formula/components/item.tsx","../src/widgets/formula/components/prefix.tsx","../src/widgets/formula/components/suffix.tsx","../src/widgets/formula/components/series.tsx"],"sourcesContent":["import { Typography } from '@mui/material'\nimport type { ItemProps } from '../types'\nimport { styles } from '../style'\n\nexport function Item(props: ItemProps) {\n return (\n <Typography\n sx={styles.item}\n variant='h5'\n fontWeight='medium'\n data-disabled={props.disabled}\n color='default'\n {...props.TypographyProps}\n >\n {props.children}\n </Typography>\n )\n}\n","import { type FormulaWidgetState, type ValueProps } from '../types'\nimport { useWidgetStore } from '../../stores/widget-store'\nimport { Item } from './item'\nimport { useShallow } from 'zustand/shallow'\n\nexport function Prefix({ id, index = 0, ...props }: ValueProps) {\n const prefix = useWidgetStore(\n useShallow(\n (state) => state.getWidget<FormulaWidgetState>(id)?.data?.[index]?.prefix,\n ),\n )\n\n if (!prefix) {\n return null\n }\n\n return <Item {...props}>{prefix}</Item>\n}\n","import { type FormulaWidgetState, type ValueProps } from '../types'\nimport { useWidgetStore } from '../../stores/widget-store'\nimport { Item } from './item'\nimport type { Theme } from '@mui/material'\nimport { useShallow } from 'zustand/shallow'\n\nexport function Suffix({ id, index = 0, ...props }: ValueProps) {\n const suffix = useWidgetStore(\n useShallow(\n (state) => state.getWidget<FormulaWidgetState>(id)?.data?.[index]?.suffix,\n ),\n )\n\n if (!suffix) {\n return null\n }\n\n return (\n <Item\n TypographyProps={{\n color: (theme: Theme) => theme.palette.text.secondary,\n }}\n {...props}\n >\n {suffix}\n </Item>\n )\n}\n","import { Avatar } from '@mui/material'\nimport type { FormulaWidgetState, ValueProps } from '../types'\nimport { useWidgetStore } from '../../stores/widget-store'\nimport { useShallow } from 'zustand/shallow'\n\nexport function Series({ id, index = 0 }: Pick<ValueProps, 'id' | 'index'>) {\n const serie = useWidgetStore(\n useShallow(\n (state) => state.getWidget<FormulaWidgetState>(id)?.series?.[index],\n ),\n )\n if (!serie) {\n return null\n }\n\n const { name, color } = serie\n\n return (\n <Avatar\n sx={{\n bgcolor: color,\n width: 32,\n height: 32,\n fontSize: '0.875rem',\n fontWeight: 'medium',\n ...(color && {\n color: (theme) => theme.palette.getContrastText(color),\n }),\n }}\n >\n {name.charAt(0).toUpperCase()}\n </Avatar>\n )\n}\n"],"names":["Item","props","$","_c","t0","TypographyProps","children","disabled","Typography","styles","item","Prefix","id","t1","index","undefined","t2","state","getWidget","data","prefix","useWidgetStore","useShallow","t3","jsx","Suffix","suffix","Symbol","for","color","_temp","t4","theme","palette","text","secondary","Series","series","serie","name","getContrastText","bgcolor","width","height","fontSize","fontWeight","t5","charAt","toUpperCase","t6","Avatar"],"mappings":";;;;;;AAIO,SAAAA,EAAAC,GAAA;AAAA,QAAAC,IAAAC,EAAA,CAAA;AAAA,MAAAC;AAAA,SAAAF,EAAA,CAAA,MAAAD,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A,IAAA/C,EAAA,EAAA,GAbT+C;AAaS;"}
@@ -10,6 +10,7 @@ export interface CategoryConfigProps {
10
10
  formatter?: (value: number) => string;
11
11
  maxItems?: number;
12
12
  labels?: CategoryLabels;
13
+ max?: number;
13
14
  }
14
15
  export declare function categoryDownloadConfig({ refUI, series, }: CategoryDownloadConfigProps): DownloadItem<CategoryWidgetData>[];
15
16
  export declare function categoryConfig(): CategoryWidgetConfig;
@@ -29,5 +29,6 @@ export interface CategoryWidgetConfig {
29
29
  name: string;
30
30
  }) => void;
31
31
  selected?: (name: string) => boolean;
32
+ max?: number;
32
33
  }
33
34
  export type CategoryDownloadConfig = DownloadItem<CategoryWidgetData>[];
@@ -29,4 +29,5 @@ export interface EchartWidgetOptionProps<D> {
29
29
  export interface EchartWidgetProps {
30
30
  type: string;
31
31
  option: EchartUIProps['option'];
32
+ onEvents?: EchartUIProps['onEvents'];
32
33
  }
@@ -4,3 +4,5 @@ export { WidgetNoData } from './no-data';
4
4
  export type { WidgetNoDataProps } from './no-data';
5
5
  export { WidgetError } from './error';
6
6
  export type { WidgetErrorProps } from './error';
7
+ export { WidgetNote } from './note';
8
+ export type { WidgetNoteProps } from './note';
@@ -1,55 +1,4 @@
1
1
  import { RefObject } from 'react';
2
- /**
3
- * Sort direction for table columns
4
- */
5
- export type StoreSortDirection = 'asc' | 'desc';
6
- /**
7
- * Pagination mode for tables
8
- */
9
- export type StorePaginationMode = 'local' | 'remote';
10
- /**
11
- * Sort mode for tables
12
- */
13
- export type StoreSortMode = 'local' | 'remote';
14
- /**
15
- * Table pagination state stored in widget store
16
- */
17
- export interface TablePaginationStoreState {
18
- /** Current page (0-indexed) */
19
- page: number;
20
- /** Rows per page */
21
- rowsPerPage: number;
22
- /** Available rows per page options */
23
- rowsPerPageOptions: number[];
24
- /** Pagination mode: local or remote */
25
- mode: StorePaginationMode;
26
- }
27
- /**
28
- * Table sort state stored in widget store
29
- */
30
- export interface TableSortStoreState {
31
- /** Column ID being sorted */
32
- columnId: string | null;
33
- /** Sort direction */
34
- direction: StoreSortDirection;
35
- /** Sort mode: local or remote */
36
- mode: StoreSortMode;
37
- }
38
- /**
39
- * Table selection state stored in widget store
40
- */
41
- export interface TableSelectionStoreState {
42
- /** Set of selected row IDs */
43
- selectedIds: Set<string | number>;
44
- }
45
- /**
46
- * Combined table state for widget store
47
- */
48
- export interface TableStoreState {
49
- pagination?: TablePaginationStoreState;
50
- sort?: TableSortStoreState;
51
- selection?: TableSelectionStoreState;
52
- }
53
2
  export interface WidgetsStoreProps {
54
3
  /** Unique identifier for the widget */
55
4
  id: string;
@@ -172,30 +121,6 @@ export interface WidgetStoreActions {
172
121
  * @returns Widget state or undefined if not found
173
122
  */
174
123
  getWidget: <T extends WidgetState = WidgetState>(id: WidgetState['id']) => T | undefined;
175
- /**
176
- * Set table pagination state for a widget
177
- * @param id - Widget ID
178
- * @param pagination - Partial pagination state to merge
179
- */
180
- setTablePagination: (id: WidgetState['id'], pagination: Partial<TablePaginationStoreState>) => void;
181
- /**
182
- * Set table sort state for a widget
183
- * @param id - Widget ID
184
- * @param sort - Partial sort state to merge
185
- */
186
- setTableSort: (id: WidgetState['id'], sort: Partial<TableSortStoreState>) => void;
187
- /**
188
- * Set table selection state for a widget
189
- * @param id - Widget ID
190
- * @param selection - Partial selection state to merge
191
- */
192
- setTableSelection: (id: WidgetState['id'], selection: Partial<TableSelectionStoreState>) => void;
193
- /**
194
- * Get table state for a widget
195
- * @param id - Widget ID
196
- * @returns Table state or undefined if not found
197
- */
198
- getTableState: (id: WidgetState['id']) => TableStoreState | undefined;
199
124
  /**
200
125
  * Register a tool with the widget's transformation pipeline
201
126
  * @param widgetId - Widget ID
@@ -1,2 +1,2 @@
1
- export { WidgetSubheader } from './subheader';
2
- export type { WidgetSubheaderProps } from './types';
1
+ export { WidgetSubHeader } from './subheader';
2
+ export type { WidgetSubHeaderProps } from './types';
@@ -1,2 +1,2 @@
1
- import { WidgetSubheaderProps } from './types';
2
- export declare function WidgetSubheader({ slotLeft, slotRight, sx, }: WidgetSubheaderProps): import("react/jsx-runtime").JSX.Element;
1
+ import { WidgetSubHeaderProps } from './types';
2
+ export declare function WidgetSubHeader({ slotLeft, slotRight, sx, }: WidgetSubHeaderProps): import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,6 @@
1
1
  import { SxProps, Theme } from '@mui/material';
2
2
  import { ReactNode } from 'react';
3
- export interface WidgetSubheaderProps {
3
+ export interface WidgetSubHeaderProps {
4
4
  /** Content for the left slot */
5
5
  slotLeft?: ReactNode;
6
6
  /** Content for the right slot*/
@@ -1,11 +1,5 @@
1
- import { TableRow, PaginationMode } from '../types';
1
+ import { TableRow } from '../types';
2
2
  export interface UsePaginationOptions {
3
- /** Pagination mode: local or remote */
4
- mode: PaginationMode;
5
- /** Initial page (0-indexed) */
6
- initialPage?: number;
7
- /** Initial rows per page */
8
- initialRowsPerPage?: number;
9
3
  /** Available rows per page options */
10
4
  rowsPerPageOptions?: number[];
11
5
  /** Total rows (for remote pagination) */
@@ -1,7 +1,5 @@
1
1
  import { TableRow } from '../types';
2
2
  export interface UseSelectionOptions {
3
- /** Initial selected IDs */
4
- initialSelectedIds?: Set<string | number>;
5
3
  /** Callback when selection changes */
6
4
  onSelectionChange?: (selectedIds: Set<string | number>) => void;
7
5
  }
@@ -1,11 +1,5 @@
1
- import { TableRow, SortMode, SortDirection, SortState } from '../types';
1
+ import { TableRow, SortDirection, SortState } from '../types';
2
2
  export interface UseSortOptions {
3
- /** Sort mode: local or remote */
4
- mode: SortMode;
5
- /** Initial sort column ID */
6
- initialColumnId?: string | null;
7
- /** Initial sort direction */
8
- initialDirection?: SortDirection;
9
3
  /** Callback when sort changes (for remote sorting) */
10
4
  onSortChange?: (columnId: string, direction: SortDirection) => void;
11
5
  }
@@ -78,6 +78,8 @@ export interface TableWidgetConfig {
78
78
  columns?: TableColumn[];
79
79
  /** Enable row selection with checkboxes */
80
80
  selectable?: boolean;
81
+ /** Currently selected row IDs */
82
+ selected: Set<string | number>;
81
83
  /** Pagination configuration */
82
84
  pagination?: {
83
85
  /** Pagination mode: local (client-side) or remote (server-side) */
@@ -103,20 +105,29 @@ export interface TableWidgetConfig {
103
105
  /** Callback when hovering over a row (null when leaving table) */
104
106
  onRowHover?: (row: TableRow | null) => void;
105
107
  /** Callback when selection changes */
106
- onSelectionChange?: (selectedIds: Set<string | number>) => void;
108
+ onSelectionChange?: (selected: Set<string | number>) => void;
107
109
  /** Callback when page changes (for remote pagination) */
108
110
  onPageChange?: (page: number, rowsPerPage: number) => void;
109
111
  /** Callback when sort changes (for remote sorting) */
110
112
  onSortChange?: (columnId: string, direction: SortDirection) => void;
111
113
  }
112
114
  /**
113
- * Table widget state
115
+ * Table widget state - includes both configuration and runtime state
114
116
  */
115
117
  export type TableWidgetState = BaseWidgetState<WrapperState<TableWidgetConfig> & {
116
118
  data: TableWidgetData;
117
- paginationState?: TablePaginationState;
118
- sortState?: SortState;
119
- selectedIds?: Set<string | number>;
119
+ pagination?: {
120
+ page: number;
121
+ rowsPerPage: number;
122
+ rowsPerPageOptions: number[];
123
+ mode: PaginationMode;
124
+ total?: number;
125
+ };
126
+ sort?: {
127
+ columnId: string | null;
128
+ direction: SortDirection;
129
+ mode: SortMode;
130
+ };
120
131
  }>;
121
132
  /**
122
133
  * Table download configuration