@carto/ps-react-ui 5.0.0-widgets.1 → 5.0.0-widgets.11

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 (115) hide show
  1. package/dist/error-B2IJ9d2h.js +38 -0
  2. package/dist/error-B2IJ9d2h.js.map +1 -0
  3. package/dist/no-data-C54XJt13.js +61 -0
  4. package/dist/no-data-C54XJt13.js.map +1 -0
  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-DrHwXNvF.js} +2 -2
  8. package/dist/{row-C_m1ovHv.js.map → row-DrHwXNvF.js.map} +1 -1
  9. package/dist/{series-6xp-KQ0S.js → series-Do02NQUF.js} +3 -3
  10. package/dist/{series-6xp-KQ0S.js.map → series-Do02NQUF.js.map} +1 -1
  11. package/dist/types/components/basemaps/group-wrapper.d.ts +1 -1
  12. package/dist/types/widgets/actions/lock-selection/types.d.ts +0 -2
  13. package/dist/types/widgets/actions/searcher/searcher.d.ts +1 -1
  14. package/dist/types/widgets/actions/searcher/types.d.ts +2 -0
  15. package/dist/types/widgets/bar/config.d.ts +1 -1
  16. package/dist/types/widgets/bar/types.d.ts +1 -1
  17. package/dist/types/widgets/category/config.d.ts +2 -1
  18. package/dist/types/widgets/category/style.d.ts +0 -1
  19. package/dist/types/widgets/category/types.d.ts +1 -0
  20. package/dist/types/widgets/echart/types.d.ts +1 -0
  21. package/dist/types/widgets/error/error.d.ts +2 -0
  22. package/dist/types/widgets/error/index.d.ts +2 -0
  23. package/dist/types/widgets/error/types.d.ts +12 -0
  24. package/dist/types/widgets/formula/config.d.ts +1 -1
  25. package/dist/types/widgets/histogram/config.d.ts +1 -1
  26. package/dist/types/widgets/histogram/types.d.ts +1 -1
  27. package/dist/types/widgets/index.d.ts +6 -0
  28. package/dist/types/widgets/loader/index.d.ts +3 -0
  29. package/dist/types/widgets/loader/loader.d.ts +2 -0
  30. package/dist/types/widgets/{root → loader}/types.d.ts +1 -1
  31. package/dist/types/widgets/loader/utils.d.ts +1 -0
  32. package/dist/types/widgets/markdown/types.d.ts +1 -1
  33. package/dist/types/widgets/no-data/index.d.ts +2 -0
  34. package/dist/types/widgets/no-data/no-data.d.ts +35 -0
  35. package/dist/types/widgets/no-data/style.d.ts +6 -0
  36. package/dist/types/widgets/no-data/types.d.ts +67 -0
  37. package/dist/types/widgets/note/index.d.ts +2 -2
  38. package/dist/types/widgets/note/note.d.ts +2 -2
  39. package/dist/types/widgets/note/types.d.ts +1 -1
  40. package/dist/types/widgets/pie/config.d.ts +1 -1
  41. package/dist/types/widgets/pie/types.d.ts +1 -1
  42. package/dist/types/widgets/scatterplot/config.d.ts +1 -1
  43. package/dist/types/widgets/scatterplot/types.d.ts +1 -1
  44. package/dist/types/widgets/selection-summary/index.d.ts +2 -2
  45. package/dist/types/widgets/selection-summary/selection-summary.d.ts +2 -2
  46. package/dist/types/widgets/selection-summary/types.d.ts +1 -1
  47. package/dist/types/widgets/skeleton-loader/skeleton-loader.d.ts +1 -1
  48. package/dist/types/widgets/spread/config.d.ts +1 -1
  49. package/dist/types/widgets/stores/types.d.ts +4 -76
  50. package/dist/types/widgets/stores/widget-store.d.ts +1 -1
  51. package/dist/types/widgets/subheader/index.d.ts +2 -2
  52. package/dist/types/widgets/subheader/subheader.d.ts +2 -2
  53. package/dist/types/widgets/subheader/types.d.ts +1 -1
  54. package/dist/types/widgets/table/config.d.ts +8 -2
  55. package/dist/types/widgets/table/hooks/index.d.ts +2 -2
  56. package/dist/types/widgets/table/hooks/use-pagination.d.ts +4 -16
  57. package/dist/types/widgets/table/hooks/use-selection.d.ts +3 -5
  58. package/dist/types/widgets/table/hooks/use-sort.d.ts +7 -14
  59. package/dist/types/widgets/table/index.d.ts +2 -2
  60. package/dist/types/widgets/table/table-ui.d.ts +3 -3
  61. package/dist/types/widgets/table/types.d.ts +14 -19
  62. package/dist/types/widgets/timeseries/config.d.ts +1 -1
  63. package/dist/types/widgets/timeseries/types.d.ts +1 -1
  64. package/dist/widget-store-CB6Trp_0.js +131 -0
  65. package/dist/widget-store-CB6Trp_0.js.map +1 -0
  66. package/dist/widgets/actions.js +602 -596
  67. package/dist/widgets/actions.js.map +1 -1
  68. package/dist/widgets/bar.js +8 -7
  69. package/dist/widgets/bar.js.map +1 -1
  70. package/dist/widgets/category.js +238 -272
  71. package/dist/widgets/category.js.map +1 -1
  72. package/dist/widgets/echart.js +1 -1
  73. package/dist/widgets/error.js +5 -0
  74. package/dist/widgets/error.js.map +1 -0
  75. package/dist/widgets/formula.js +19 -18
  76. package/dist/widgets/formula.js.map +1 -1
  77. package/dist/widgets/histogram.js +54 -53
  78. package/dist/widgets/histogram.js.map +1 -1
  79. package/dist/widgets/loader.js +57 -0
  80. package/dist/widgets/loader.js.map +1 -0
  81. package/dist/widgets/markdown.js +1 -1
  82. package/dist/widgets/no-data.js +5 -0
  83. package/dist/widgets/no-data.js.map +1 -0
  84. package/dist/widgets/note.js +2 -121
  85. package/dist/widgets/note.js.map +1 -1
  86. package/dist/widgets/pie.js +8 -7
  87. package/dist/widgets/pie.js.map +1 -1
  88. package/dist/widgets/range.js +2 -2
  89. package/dist/widgets/scatterplot.js +8 -7
  90. package/dist/widgets/scatterplot.js.map +1 -1
  91. package/dist/widgets/selection-summary.js +3 -3
  92. package/dist/widgets/selection-summary.js.map +1 -1
  93. package/dist/widgets/skeleton-loader.js +1 -1
  94. package/dist/widgets/spread.js +20 -19
  95. package/dist/widgets/spread.js.map +1 -1
  96. package/dist/widgets/stores.js +1 -1
  97. package/dist/widgets/subheader.js +6 -6
  98. package/dist/widgets/subheader.js.map +1 -1
  99. package/dist/widgets/table.js +562 -570
  100. package/dist/widgets/table.js.map +1 -1
  101. package/dist/widgets/timeseries.js +8 -7
  102. package/dist/widgets/timeseries.js.map +1 -1
  103. package/dist/widgets/wrapper.js +1 -1
  104. package/dist/widgets/wrapper.js.map +1 -1
  105. package/dist/widgets.js +8 -2
  106. package/dist/widgets.js.map +1 -1
  107. package/package.json +12 -4
  108. package/dist/types/widgets/root/index.d.ts +0 -3
  109. package/dist/types/widgets/root/root.d.ts +0 -2
  110. package/dist/types/widgets/root/style.d.ts +0 -8
  111. package/dist/types/widgets/root/utils.d.ts +0 -1
  112. package/dist/widget-store-DNyVElxd.js +0 -190
  113. package/dist/widget-store-DNyVElxd.js.map +0 -1
  114. package/dist/widgets/root.js +0 -68
  115. package/dist/widgets/root.js.map +0 -1
@@ -0,0 +1,38 @@
1
+ import { jsx as d, jsxs as a } from "react/jsx-runtime";
2
+ import { c as f } from "react/compiler-runtime";
3
+ import { AlertTitle as m, Alert as h } from "@mui/material";
4
+ import { u } from "./widget-store-CB6Trp_0.js";
5
+ import { useShallow as p } from "zustand/shallow";
6
+ function W(g) {
7
+ const r = f(7), {
8
+ id: l,
9
+ children: c
10
+ } = g;
11
+ let s;
12
+ r[0] !== l ? (s = (o) => {
13
+ const e = o.widgets[l];
14
+ return {
15
+ isLoading: e?.isLoading,
16
+ isFetching: e?.isFetching,
17
+ error: e?.error
18
+ };
19
+ }, r[0] = l, r[1] = s) : s = r[1];
20
+ const i = u(p(s));
21
+ if (i?.isLoading || i?.isFetching)
22
+ return c;
23
+ if (i?.error) {
24
+ const o = i.error.title ?? "Error", e = i.error.message ?? "An error occurred while loading the widget. Please try again.";
25
+ let t;
26
+ r[2] !== o ? (t = /* @__PURE__ */ d(m, { children: o }), r[2] = o, r[3] = t) : t = r[3];
27
+ let n;
28
+ return r[4] !== e || r[5] !== t ? (n = /* @__PURE__ */ a(h, { severity: "error", children: [
29
+ t,
30
+ e
31
+ ] }), r[4] = e, r[5] = t, r[6] = n) : n = r[6], n;
32
+ }
33
+ return c;
34
+ }
35
+ export {
36
+ W
37
+ };
38
+ //# sourceMappingURL=error-B2IJ9d2h.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error-B2IJ9d2h.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;"}
@@ -0,0 +1,61 @@
1
+ import { jsx as g, jsxs as h } from "react/jsx-runtime";
2
+ import { c as x } from "react/compiler-runtime";
3
+ import { Typography as y, Box as v } from "@mui/material";
4
+ import { useShallow as w } from "zustand/shallow";
5
+ import { u as b } from "./widget-store-CB6Trp_0.js";
6
+ const j = {
7
+ root: {
8
+ display: "flex",
9
+ flexDirection: "column",
10
+ gap: 1,
11
+ // 8px
12
+ paddingTop: 1,
13
+ // 8px
14
+ paddingBottom: 2,
15
+ // 16px
16
+ paddingX: 2,
17
+ // 16px
18
+ width: "100%",
19
+ minHeight: "100%"
20
+ }
21
+ };
22
+ function k(i) {
23
+ const t = x(9), {
24
+ id: s,
25
+ children: c,
26
+ title: f,
27
+ description: p,
28
+ isEmpty: u
29
+ } = i, a = f === void 0 ? "No data available" : f, l = p === void 0 ? "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" : p, m = u === void 0 ? A : u;
30
+ let o;
31
+ t[0] !== s ? (o = (r) => {
32
+ const e = r.widgets[s];
33
+ return {
34
+ isLoading: e?.isLoading,
35
+ isFetching: e?.isFetching,
36
+ data: e?.data
37
+ };
38
+ }, t[0] = s, t[1] = o) : o = t[1];
39
+ const d = b(w(o));
40
+ if (d?.isLoading || d?.isFetching)
41
+ return c;
42
+ if (m(d?.data)) {
43
+ let r;
44
+ t[2] !== a ? (r = /* @__PURE__ */ g(y, { variant: "body2", color: "text.primary", children: a }), t[2] = a, t[3] = r) : r = t[3];
45
+ let e;
46
+ t[4] !== l ? (e = /* @__PURE__ */ g(y, { variant: "caption", color: "text.secondary", children: l }), t[4] = l, t[5] = e) : e = t[5];
47
+ let n;
48
+ return t[6] !== r || t[7] !== e ? (n = /* @__PURE__ */ h(v, { sx: j.root, children: [
49
+ r,
50
+ e
51
+ ] }), t[6] = r, t[7] = e, t[8] = n) : n = t[8], n;
52
+ }
53
+ return c;
54
+ }
55
+ function A(i) {
56
+ return i == null ? !0 : Array.isArray(i) ? !!(i.length === 0 || i.every((t) => Array.isArray(t) && t.length === 0)) : typeof i == "object" ? Object.keys(i).length === 0 : !1;
57
+ }
58
+ export {
59
+ k as W
60
+ };
61
+ //# sourceMappingURL=no-data-C54XJt13.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"no-data-C54XJt13.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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AAnB,EAACwD,GAAA,EACUV,SAAAA,GACD,SAAA,QACF,OAAA,WACF,IAAA9E,EAAMgB,YACKmC,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-CB6Trp_0.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-DrHwXNvF.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-DrHwXNvF.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-CB6Trp_0.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-DrHwXNvF.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-Do02NQUF.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,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,MAAWA,EAAKC,QAAQO,gBAAiBX,CAAK;AAAA,EAAA,GACtD3B,OAAA2B,GAAA3B,OAAAqB,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-Do02NQUF.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;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nB,GAWHe,UAAAA,GACH,GAAS5C,QAAA6B,GAAA7B,QAAA4C,GAAA5C,QAAA+C,KAAAA,IAAA/C,EAAA,EAAA,GAbT+C;AAaS;"}
@@ -3,4 +3,4 @@ export declare function GroupWrapper({ title, children, collapsed, }: {
3
3
  title: string;
4
4
  children: ReactNode;
5
5
  collapsed?: boolean;
6
- }): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import('react').ReactPortal | import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element | null | undefined;
6
+ }): string | number | bigint | boolean | import("react/jsx-runtime").JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import('react').ReactPortal | import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | null | undefined;
@@ -7,8 +7,6 @@ import { BaseWidgetState } from '../../stores/types';
7
7
  export interface LockSelectionStateProps {
8
8
  /** Whether the selection is currently locked */
9
9
  isLocked?: boolean;
10
- /** The items that are locked (by name) */
11
- lockedItems?: string[];
12
10
  }
13
11
  /**
14
12
  * Widget state extension for lock selection functionality.
@@ -18,4 +18,4 @@ export declare const SEARCHER_TOOL_ID = "searcher";
18
18
  * />
19
19
  * ```
20
20
  */
21
- export declare function Searcher({ id, filterFn, order, labels, TextFieldProps, ClearIcon, }: SearcherProps): import("react/jsx-runtime").JSX.Element | null;
21
+ export declare function Searcher({ id, filterFn, order, labels, TextFieldProps, ClearIcon, debounceDelay, }: SearcherProps): import("react/jsx-runtime").JSX.Element | null;
@@ -59,4 +59,6 @@ export interface SearcherProps {
59
59
  TextFieldProps?: Omit<TextFieldProps, 'value' | 'onChange' | 'size'>;
60
60
  /** Custom icon for clear button */
61
61
  ClearIcon?: ReactNode;
62
+ /** Debounce delay in milliseconds for search input. Defaults to 300ms */
63
+ debounceDelay?: number;
62
64
  }
@@ -1,5 +1,5 @@
1
1
  import { BarConfig, BarWidgetConfig, BarWidgetData } from './types';
2
2
  import { DownloadItem } from '../actions';
3
- import { ConfigProps } from '../root/types';
3
+ import { ConfigProps } from '../loader/types';
4
4
  export declare function barDownloadConfig({ refUI, }: ConfigProps): DownloadItem<BarWidgetData>[];
5
5
  export declare function barConfig(props: BarConfig): BarWidgetConfig;
@@ -1,6 +1,6 @@
1
1
  import { EchartWidgetData, EchartWidgetState } from '../echart';
2
2
  import { EchartWidgetOptionProps, EchartWidgetProps } from '../echart/types';
3
- import { ConfigProps } from '../root';
3
+ import { ConfigProps } from '../loader';
4
4
  export type BarWidgetData = EchartWidgetData;
5
5
  export type BarWidgetState = EchartWidgetState;
6
6
  export type BarWidgetConfig = EchartWidgetProps & {
@@ -1,5 +1,5 @@
1
1
  import { DownloadItem } from '../actions';
2
- import { ConfigProps } from '../root/types';
2
+ import { ConfigProps } from '../loader/types';
3
3
  import { CategoryWidgetConfig, CategoryWidgetData, CategorySeriesConfig, CategoryLabels } from './types';
4
4
  export interface CategoryDownloadConfigProps extends ConfigProps {
5
5
  series?: CategorySeriesConfig[];
@@ -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;
@@ -4,7 +4,6 @@ export declare const styles: {
4
4
  display: "flex";
5
5
  flexDirection: "column";
6
6
  position: "relative";
7
- overflow: "auto";
8
7
  };
9
8
  list: {
10
9
  display: "flex";
@@ -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
  }
@@ -0,0 +1,2 @@
1
+ import { WidgetErrorProps } from './types';
2
+ export declare function WidgetError({ id, children }: WidgetErrorProps): string | number | bigint | boolean | import("react/jsx-runtime").JSX.Element | Iterable<import('react').ReactNode> | Promise<string | number | bigint | boolean | import('react').ReactPortal | import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>> | Iterable<import('react').ReactNode> | null | undefined> | null | undefined;
@@ -0,0 +1,2 @@
1
+ export { WidgetError } from './error';
2
+ export type { WidgetErrorProps } from './types';
@@ -0,0 +1,12 @@
1
+ import { ReactNode } from 'react';
2
+ import { WidgetState } from '../stores/types';
3
+ export interface WidgetErrorProps {
4
+ /**
5
+ * Widget ID to fetch error state from store
6
+ */
7
+ id: WidgetState['id'];
8
+ /**
9
+ * Children to render when no error exists
10
+ */
11
+ children: ReactNode;
12
+ }
@@ -1,4 +1,4 @@
1
- import { ConfigProps } from '../root/types';
1
+ import { ConfigProps } from '../loader/types';
2
2
  import { FormulaDownloadConfig, FormulaWidgetConfig } from './types';
3
3
  export declare function formulaDownloadConfig({ refUI, }: ConfigProps): FormulaDownloadConfig;
4
4
  export declare function formulaConfig(): FormulaWidgetConfig;
@@ -1,5 +1,5 @@
1
1
  import { HistogramConfig, HistogramWidgetConfig, HistogramWidgetData } from './types';
2
2
  import { DownloadItem } from '../actions';
3
- import { ConfigProps } from '../root/types';
3
+ import { ConfigProps } from '../loader/types';
4
4
  export declare function histogramDownloadConfig({ refUI, }: ConfigProps): DownloadItem<HistogramWidgetData>[];
5
5
  export declare function histogramConfig(props: HistogramConfig): HistogramWidgetConfig;
@@ -1,6 +1,6 @@
1
1
  import { EchartWidgetData, EchartWidgetState } from '../echart';
2
2
  import { EchartWidgetOptionProps, EchartWidgetProps } from '../echart/types';
3
- import { ConfigProps } from '../root';
3
+ import { ConfigProps } from '../loader';
4
4
  export type HistogramWidgetData = EchartWidgetData;
5
5
  export type HistogramWidgetState = EchartWidgetState;
6
6
  export type HistogramWidgetConfig = EchartWidgetProps & {
@@ -1,2 +1,8 @@
1
1
  export { useWidgetStore } from './stores/widget-store';
2
2
  export type { BaseWidgetState, WidgetsStoreProps, WidgetState, WidgetStore, WidgetStoreActions, WidgetStoreState, } from './stores/types';
3
+ export { WidgetNoData } from './no-data';
4
+ export type { WidgetNoDataProps } from './no-data';
5
+ export { WidgetError } from './error';
6
+ export type { WidgetErrorProps } from './error';
7
+ export { WidgetNote } from './note';
8
+ export type { WidgetNoteProps } from './note';
@@ -0,0 +1,3 @@
1
+ export { WidgetLoader } from './loader';
2
+ export { mergeWidgetConfig } from './utils';
3
+ export type { WidgetLoaderProps, ConfigProps } from './types';
@@ -0,0 +1,2 @@
1
+ import { WidgetLoaderProps } from './types';
2
+ export declare function WidgetLoader<T>(props: WidgetLoaderProps<T>): import('react').ReactNode;
@@ -1,6 +1,6 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { WidgetsStoreProps, WidgetState } from '../stores/types';
3
- export interface RootProps<T> extends WidgetsStoreProps {
3
+ export interface WidgetLoaderProps<T> extends WidgetsStoreProps {
4
4
  children: ReactNode;
5
5
  config?: T;
6
6
  }
@@ -0,0 +1 @@
1
+ export declare function mergeWidgetConfig<T>(...options: [Partial<T> | undefined, Partial<T> | undefined]): T;
@@ -14,5 +14,5 @@ export interface MarkdownDataItem {
14
14
  }
15
15
  export type MarkdownWidgetData = MarkdownDataItem;
16
16
  export type MarkdownWidgetState = BaseWidgetState<WrapperState<MarkdownWidgetConfig>>;
17
- export type MarkdownWidgetConfig = unknown;
17
+ export type MarkdownWidgetConfig = Record<string, unknown>;
18
18
  export type MarkdownDownloadConfig = DownloadItem<MarkdownWidgetData>[];
@@ -0,0 +1,2 @@
1
+ export { WidgetNoData } from './no-data';
2
+ export type { WidgetNoDataProps } from './types';
@@ -0,0 +1,35 @@
1
+ import { WidgetNoDataProps } from './types';
2
+ /**
3
+ * NoData wrapper component that displays empty state UI when widget has no data
4
+ *
5
+ * Integrates with widget store to check loading/fetching state and data availability.
6
+ * Works in conjunction with SkeletonLoader for complete loading/empty state handling.
7
+ *
8
+ * @example Basic usage
9
+ * ```tsx
10
+ * <NoData id="my-widget">
11
+ * <WidgetContent id="my-widget" />
12
+ * </NoData>
13
+ * ```
14
+ *
15
+ * @example With SkeletonLoader
16
+ * ```tsx
17
+ * <SkeletonLoader id="my-widget" Skeleton={MySkeleton}>
18
+ * <NoData id="my-widget">
19
+ * <WidgetContent id="my-widget" />
20
+ * </NoData>
21
+ * </SkeletonLoader>
22
+ * ```
23
+ *
24
+ * @example With custom messages
25
+ * ```tsx
26
+ * <NoData
27
+ * id="my-widget"
28
+ * title="No results found"
29
+ * description="Try adjusting your filters"
30
+ * >
31
+ * <WidgetContent id="my-widget" />
32
+ * </NoData>
33
+ * ```
34
+ */
35
+ export declare function WidgetNoData({ id, children, title, description, isEmpty, }: WidgetNoDataProps): string | number | bigint | boolean | import("react/jsx-runtime").JSX.Element | Iterable<import('react').ReactNode> | Promise<string | number | bigint | boolean | import('react').ReactPortal | import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>> | Iterable<import('react').ReactNode> | null | undefined> | null | undefined;
@@ -0,0 +1,6 @@
1
+ import { SxProps, Theme } from '@mui/material';
2
+ /**
3
+ * Styles for NoData component matching Figma design specifications
4
+ * Design reference: node 5781-11028
5
+ */
6
+ export declare const styles: Record<string, SxProps<Theme>>;