@embeddable.com/remarkable-ui 0.1.48 → 0.1.50

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 (93) hide show
  1. package/dist/BarChartDefaultHorizontalPro.js +3 -3
  2. package/dist/BarChartDefaultPro.js +3 -3
  3. package/dist/BarChartGroupedHorizontalPro.js +3 -3
  4. package/dist/BarChartGroupedPro.js +3 -3
  5. package/dist/BarChartStackedHorizontalPro.js +3 -3
  6. package/dist/BarChartStackedPro.js +3 -3
  7. package/dist/{ChartCard-CMgDz_bs.js → ChartCard-k190CXR0.js} +29 -29
  8. package/dist/{ChartCard-CMgDz_bs.js.map → ChartCard-k190CXR0.js.map} +1 -1
  9. package/dist/{ComparisonPeriod.type.emb-C1o3iM9L.js → ComparisonPeriod.type.emb-Dgl2VM4_.js} +2 -2
  10. package/dist/{ComparisonPeriod.type.emb-C1o3iM9L.js.map → ComparisonPeriod.type.emb-Dgl2VM4_.js.map} +1 -1
  11. package/dist/ComparisonPeriodSelectFieldPro.js +4 -4
  12. package/dist/DateRangeSelectFieldPro.js +2 -2
  13. package/dist/DonutChartPro.js +2 -2
  14. package/dist/DonutLabelChartPro.js +2 -2
  15. package/dist/{EditorCard-CJoUz4uM.js → EditorCard-BNBH4Y9F.js} +17 -17
  16. package/dist/{EditorCard-CJoUz4uM.js.map → EditorCard-BNBH4Y9F.js.map} +1 -1
  17. package/dist/HeatMap-ylrlKLQI.js +223 -0
  18. package/dist/HeatMap-ylrlKLQI.js.map +1 -0
  19. package/dist/HeatMapPro.js +138 -0
  20. package/dist/HeatMapPro.js.map +1 -0
  21. package/dist/{KpiChart-C6zepuhF.js → KpiChart-DJ5el66E.js} +16 -16
  22. package/dist/{KpiChart-C6zepuhF.js.map → KpiChart-DJ5el66E.js.map} +1 -1
  23. package/dist/KpiChartNumberComparisonPro.js +6 -6
  24. package/dist/KpiChartNumberPro.js +4 -4
  25. package/dist/LineChartComparisonDefaultPro.js +5 -5
  26. package/dist/LineChartDefaultPro.js +3 -3
  27. package/dist/LineChartGroupedPro.js +3 -3
  28. package/dist/MultiSelectFieldPro.js +2 -2
  29. package/dist/PieChartPro.js +2 -2
  30. package/dist/PivotTable-awuBNY8c.js +273 -0
  31. package/dist/PivotTable-awuBNY8c.js.map +1 -0
  32. package/dist/PivotTablePro.js +39 -39
  33. package/dist/PivotTablePro.js.map +1 -1
  34. package/dist/{SingleSelectField-CJNiLfee.js → SingleSelectField-CY0TwkyW.js} +3 -3
  35. package/dist/{SingleSelectField-CJNiLfee.js.map → SingleSelectField-CY0TwkyW.js.map} +1 -1
  36. package/dist/SingleSelectFieldPro.js +2 -2
  37. package/dist/TableChartPaginated.js +3 -3
  38. package/dist/{bars.utils-vXPRJDGQ.js → bars.utils-cZSSvRai.js} +4 -4
  39. package/dist/{bars.utils-vXPRJDGQ.js.map → bars.utils-cZSSvRai.js.map} +1 -1
  40. package/dist/{charts.utils-HfNL9dVl.js → charts.utils-LgE4AEAw.js} +4 -4
  41. package/dist/charts.utils-LgE4AEAw.js.map +1 -0
  42. package/dist/{component.constants-CFaxyNCw.js → component.constants-D0ea4CW4.js} +1363 -1357
  43. package/dist/{component.constants-CFaxyNCw.js.map → component.constants-D0ea4CW4.js.map} +1 -1
  44. package/dist/embeddable-components.json +12 -11
  45. package/dist/embeddable-lifecycle.js +1 -1
  46. package/dist/embeddable-theme-2b917.js +1 -1
  47. package/dist/{formatter.utils-Cu4uKJSZ.js → formatter.utils-DBUd3PfE.js} +2 -2
  48. package/dist/{formatter.utils-Cu4uKJSZ.js.map → formatter.utils-DBUd3PfE.js.map} +1 -1
  49. package/dist/{index-C4BiW71l.js → index-BGf7vP5k.js} +5 -5
  50. package/dist/{index-C4BiW71l.js.map → index-BGf7vP5k.js.map} +1 -1
  51. package/dist/{index-DW-LmiPi.js → index-BpujEeVe.js} +11 -11
  52. package/dist/{index-DW-LmiPi.js.map → index-BpujEeVe.js.map} +1 -1
  53. package/dist/{index-DvMr1tvf.js → index-C_G6mJoE.js} +4 -4
  54. package/dist/{index-DvMr1tvf.js.map → index-C_G6mJoE.js.map} +1 -1
  55. package/dist/{index-CxxeUDMD.js → index-DGb59RGF.js} +13 -13
  56. package/dist/{index-CxxeUDMD.js.map → index-DGb59RGF.js.map} +1 -1
  57. package/dist/{index-DvEWwlqq.js → index-D_TXLv5w.js} +30 -30
  58. package/dist/{index-DvEWwlqq.js.map → index-D_TXLv5w.js.map} +1 -1
  59. package/dist/{index-BAfVF5iP.js → index-DuWcnytb.js} +10 -10
  60. package/dist/{index-BAfVF5iP.js.map → index-DuWcnytb.js.map} +1 -1
  61. package/dist/index.js +94 -91
  62. package/dist/index.js.map +1 -1
  63. package/dist/object.utils-D_Zzon-H.js.map +1 -1
  64. package/dist/{pies.utils-JpKM3rVw.js → pies.utils-DpY3U9c2.js} +4 -4
  65. package/dist/{pies.utils-JpKM3rVw.js.map → pies.utils-DpY3U9c2.js.map} +1 -1
  66. package/dist/remarkable-pro/components/charts/tables/HeatMapPro/index.d.ts +29 -0
  67. package/dist/remarkable-pro/components/charts/tables/HeatMapPro/index.d.ts.map +1 -0
  68. package/dist/remarkable-pro/components/component.constants.d.ts +7 -0
  69. package/dist/remarkable-pro/components/component.constants.d.ts.map +1 -1
  70. package/dist/remarkable-ui/charts/tables/HeatMap/HeatMap.d.ts +3 -0
  71. package/dist/remarkable-ui/charts/tables/HeatMap/HeatMap.d.ts.map +1 -0
  72. package/dist/remarkable-ui/charts/tables/HeatMap/HeatMap.stories.d.ts +9 -0
  73. package/dist/remarkable-ui/charts/tables/HeatMap/HeatMap.stories.d.ts.map +1 -0
  74. package/dist/remarkable-ui/charts/tables/HeatMap/HeatMap.types.d.ts +30 -0
  75. package/dist/remarkable-ui/charts/tables/HeatMap/HeatMap.types.d.ts.map +1 -0
  76. package/dist/remarkable-ui/charts/tables/HeatMap/HeatMap.utils.d.ts +43 -0
  77. package/dist/remarkable-ui/charts/tables/HeatMap/HeatMap.utils.d.ts.map +1 -0
  78. package/dist/remarkable-ui/charts/tables/PivotTable/PivotTable.d.ts.map +1 -1
  79. package/dist/remarkable-ui/charts/tables/PivotTable/PivotTable.types.d.ts +1 -0
  80. package/dist/remarkable-ui/charts/tables/PivotTable/PivotTable.types.d.ts.map +1 -1
  81. package/dist/remarkable-ui/charts/tables/tables.utils.d.ts +6 -0
  82. package/dist/remarkable-ui/charts/tables/tables.utils.d.ts.map +1 -0
  83. package/dist/remarkable-ui/index.d.ts +2 -0
  84. package/dist/remarkable-ui/index.d.ts.map +1 -1
  85. package/dist/remarkable-ui.css +2 -2
  86. package/dist/tables.utils-D7KXdM2S.js +9 -0
  87. package/dist/tables.utils-D7KXdM2S.js.map +1 -0
  88. package/dist/{timeRange.utils-Z2lmKTCB.js → timeRange.utils-B9kyLPq_.js} +2 -2
  89. package/dist/{timeRange.utils-Z2lmKTCB.js.map → timeRange.utils-B9kyLPq_.js.map} +1 -1
  90. package/package.json +1 -1
  91. package/dist/PivotTable-SNPquHl0.js +0 -253
  92. package/dist/PivotTable-SNPquHl0.js.map +0 -1
  93. package/dist/charts.utils-HfNL9dVl.js.map +0 -1
@@ -1,7 +1,7 @@
1
- import { i as L, r as w, m as M, j as l, d as V, a as y, b as z, t as P, c as k, s as v, e as H, f as R, g as j, x as I, y as S, h as T, k as Y, l as F, n as E, V as G, o as O } from "./component.constants-CFaxyNCw.js";
1
+ import { i as L, r as w, m as M, j as l, d as V, a as y, b as z, t as P, c as k, s as v, e as H, f as R, g as j, x as I, y as S, h as T, k as Y, l as F, n as E, V as G, o as O } from "./component.constants-D0ea4CW4.js";
2
2
  import { useTheme as W, defineComponent as _ } from "@embeddable.com/react";
3
- import { C as q } from "./ChartCard-CMgDz_bs.js";
4
- import { g as J, a as K, B as N } from "./bars.utils-vXPRJDGQ.js";
3
+ import { C as q } from "./ChartCard-k190CXR0.js";
4
+ import { g as J, a as K, B as N } from "./bars.utils-cZSSvRai.js";
5
5
  import { u as Q } from "./charts.fillGaps.hooks-5WclK2CD.js";
6
6
  const U = (a) => {
7
7
  var i, n;
@@ -1,7 +1,7 @@
1
- import { i as L, r as y, m as w, j as l, d as M, a as V, b as P, t as v, c as k, s as R, e as j, f as I, g as S, x as T, y as X, p as F, q, u as z, v as E, V as G, o as O } from "./component.constants-CFaxyNCw.js";
1
+ import { i as L, r as y, m as w, j as l, d as M, a as V, b as P, t as v, c as k, s as R, e as j, f as I, g as S, x as T, y as X, p as F, q, u as z, v as E, V as G, o as O } from "./component.constants-D0ea4CW4.js";
2
2
  import { useTheme as W, defineComponent as _ } from "@embeddable.com/react";
3
- import { C as H } from "./ChartCard-CMgDz_bs.js";
4
- import { g as J, a as K, B as N } from "./bars.utils-vXPRJDGQ.js";
3
+ import { C as H } from "./ChartCard-k190CXR0.js";
4
+ import { g as J, a as K, B as N } from "./bars.utils-cZSSvRai.js";
5
5
  import { u as Q } from "./charts.fillGaps.hooks-5WclK2CD.js";
6
6
  const U = (a) => {
7
7
  var o, n;
@@ -1,7 +1,7 @@
1
- import { i as L, r as w, m as k, j as m, d as z, w as G, b as P, z as R, t as M, c as H, A as j, s as v, e as S, f as T, g as F, x as Y, y as E, h as I, k as O, l as W, V as u, o as _ } from "./component.constants-CFaxyNCw.js";
1
+ import { i as L, r as w, m as k, j as m, d as z, w as G, b as P, z as R, t as M, c as H, A as j, s as v, e as S, f as T, g as F, x as Y, y as E, h as I, k as O, l as W, V as u, o as _ } from "./component.constants-D0ea4CW4.js";
2
2
  import { useTheme as q, defineComponent as J } from "@embeddable.com/react";
3
- import { C as K } from "./ChartCard-CMgDz_bs.js";
4
- import { b as N, a as Q, B as U } from "./bars.utils-vXPRJDGQ.js";
3
+ import { C as K } from "./ChartCard-k190CXR0.js";
4
+ import { b as N, a as Q, B as U } from "./bars.utils-cZSSvRai.js";
5
5
  import { u as X } from "./charts.fillGaps.hooks-5WclK2CD.js";
6
6
  const Z = (e) => {
7
7
  var n, l;
@@ -1,7 +1,7 @@
1
- import { i as L, r as w, m as G, j as m, d as k, w as P, b as R, z as M, t as j, c as v, A as S, s as T, e as F, f as X, g as z, x as q, y as E, p as I, q as O, u as W, V as u, o as _ } from "./component.constants-CFaxyNCw.js";
1
+ import { i as L, r as w, m as G, j as m, d as k, w as P, b as R, z as M, t as j, c as v, A as S, s as T, e as F, f as X, g as z, x as q, y as E, p as I, q as O, u as W, V as u, o as _ } from "./component.constants-D0ea4CW4.js";
2
2
  import { useTheme as H, defineComponent as J } from "@embeddable.com/react";
3
- import { C as K } from "./ChartCard-CMgDz_bs.js";
4
- import { b as N, a as Q, B as U } from "./bars.utils-vXPRJDGQ.js";
3
+ import { C as K } from "./ChartCard-k190CXR0.js";
4
+ import { b as N, a as Q, B as U } from "./bars.utils-cZSSvRai.js";
5
5
  import { u as Y } from "./charts.fillGaps.hooks-5WclK2CD.js";
6
6
  const Z = (e) => {
7
7
  var n, l;
@@ -1,7 +1,7 @@
1
- import { i as L, r as f, m as w, j as m, d as S, w as z, b as P, z as R, t as M, c as H, A as T, s as j, e as v, f as F, g as G, x as Y, y as E, h as I, k as O, l as W, B as _, V as u, o as q } from "./component.constants-CFaxyNCw.js";
1
+ import { i as L, r as f, m as w, j as m, d as S, w as z, b as P, z as R, t as M, c as H, A as T, s as j, e as v, f as F, g as G, x as Y, y as E, h as I, k as O, l as W, B as _, V as u, o as q } from "./component.constants-D0ea4CW4.js";
2
2
  import { useTheme as J, defineComponent as K } from "@embeddable.com/react";
3
- import { C as N } from "./ChartCard-CMgDz_bs.js";
4
- import { b as Q, a as U, B as X } from "./bars.utils-vXPRJDGQ.js";
3
+ import { C as N } from "./ChartCard-k190CXR0.js";
4
+ import { b as Q, a as U, B as X } from "./bars.utils-cZSSvRai.js";
5
5
  import { u as Z } from "./charts.fillGaps.hooks-5WclK2CD.js";
6
6
  const $ = (a) => {
7
7
  var n, l;
@@ -1,7 +1,7 @@
1
- import { i as D, r as L, m as w, j as m, d as S, w as P, b as R, z as M, t as T, c as j, A as v, s as F, e as G, f as X, g as z, x as q, y as E, p as I, q as O, u as W, B as _, V as u, o as H } from "./component.constants-CFaxyNCw.js";
1
+ import { i as D, r as L, m as w, j as m, d as S, w as P, b as R, z as M, t as T, c as j, A as v, s as F, e as G, f as X, g as z, x as q, y as E, p as I, q as O, u as W, B as _, V as u, o as H } from "./component.constants-D0ea4CW4.js";
2
2
  import { useTheme as J, defineComponent as K } from "@embeddable.com/react";
3
- import { C as N } from "./ChartCard-CMgDz_bs.js";
4
- import { b as Q, a as U, B as Y } from "./bars.utils-vXPRJDGQ.js";
3
+ import { C as N } from "./ChartCard-k190CXR0.js";
4
+ import { b as Q, a as U, B as Y } from "./bars.utils-cZSSvRai.js";
5
5
  import { u as Z } from "./charts.fillGaps.hooks-5WclK2CD.js";
6
6
  const $ = (a) => {
7
7
  var n, l;
@@ -1,5 +1,5 @@
1
- import { ad as k, j as t, aP as v, i as x, ap as N, as as D, U as C, aq as L, ak as S, ai as w, aj as I, ag as R, am as M, an as _, aQ as $ } from "./component.constants-CFaxyNCw.js";
2
- import f, { useRef as P } from "react";
1
+ import { ae as k, j as t, aQ as v, i as x, aq as D, at as N, U as C, ar as w, al as L, aj as R, ak as S, ah as I, an as M, ao as _, aR as $ } from "./component.constants-D0ea4CW4.js";
2
+ import f, { useRef as T } from "react";
3
3
  import { useTheme as j } from "@embeddable.com/react";
4
4
  /**
5
5
  * @license @tabler/icons-react v3.35.0 - MIT
@@ -7,7 +7,7 @@ import { useTheme as j } from "@embeddable.com/react";
7
7
  * This source code is licensed under the MIT license.
8
8
  * See the LICENSE file in the root directory of this source tree.
9
9
  */
10
- const T = [["path", { d: "M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0", key: "svg-0" }], ["path", { d: "M12 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0", key: "svg-1" }], ["path", { d: "M12 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0", key: "svg-2" }]], b = k("outline", "dots-vertical", "DotsVertical", T), A = "_skeleton_12e7h_10", B = {
10
+ const b = [["path", { d: "M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0", key: "svg-0" }], ["path", { d: "M12 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0", key: "svg-1" }], ["path", { d: "M12 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0", key: "svg-2" }]], P = k("outline", "dots-vertical", "DotsVertical", b), A = "_skeleton_12e7h_10", B = {
11
11
  skeleton: A
12
12
  }, E = () => /* @__PURE__ */ t.jsx("div", { className: B.skeleton }), V = "_chartCard_1edc9_1", q = "_error_1edc9_6", F = "_rightContent_1edc9_12", H = "_fixedContent_1edc9_17", K = "_loading_1edc9_26", O = "_hidden_1edc9_31", n = {
13
13
  chartCard: V,
@@ -18,40 +18,40 @@ const T = [["path", { d: "M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0", key: "svg-0
18
18
  hidden: O
19
19
  }, Q = "_loading_7lgag_7", U = {
20
20
  loading: Q
21
- }, p = () => /* @__PURE__ */ t.jsx(v, { className: U.loading }), z = "_list_mwshn_1", G = {
21
+ }, y = () => /* @__PURE__ */ t.jsx(v, { className: U.loading }), z = "_list_mwshn_1", G = {
22
22
  list: z
23
23
  }, J = (o) => {
24
24
  var h, m;
25
25
  const r = j();
26
26
  x(r);
27
- const [g, e] = f.useState(!1), c = ((m = (h = r.charts) == null ? void 0 : h.chartCardMenuPro) == null ? void 0 : m.options) ?? [];
27
+ const [u, e] = f.useState(!1), c = ((m = (h = r.charts) == null ? void 0 : h.chartCardMenuPro) == null ? void 0 : m.options) ?? [];
28
28
  if (c.length === 0)
29
29
  return null;
30
- const l = (s) => {
30
+ const d = (s) => {
31
31
  setTimeout(() => {
32
32
  Promise.resolve(s()).finally(() => e(!1));
33
33
  }, 100);
34
- }, d = (s) => {
34
+ }, i = (s) => {
35
35
  if (e(!0), o.onCustomDownload) {
36
- o.onCustomDownload((a) => l(() => s(a)));
36
+ o.onCustomDownload((a) => d(() => s(a)));
37
37
  return;
38
38
  }
39
- l(() => s({ ...o, theme: r }));
39
+ d(() => s({ ...o, theme: r }));
40
40
  };
41
41
  return /* @__PURE__ */ t.jsx(
42
- N,
42
+ D,
43
43
  {
44
44
  side: "bottom",
45
45
  align: "end",
46
- triggerComponent: g ? /* @__PURE__ */ t.jsx(p, {}) : /* @__PURE__ */ t.jsx(S, { icon: b }),
47
- children: /* @__PURE__ */ t.jsx(D, { className: G.list, autoFocus: !0, children: c.map((s, a) => {
48
- const i = C.t(s.labelKey);
46
+ triggerComponent: u ? /* @__PURE__ */ t.jsx(y, {}) : /* @__PURE__ */ t.jsx(L, { icon: P }),
47
+ children: /* @__PURE__ */ t.jsx(N, { className: G.list, autoFocus: !0, children: c.map((s, a) => {
48
+ const l = C.t(s.labelKey);
49
49
  return /* @__PURE__ */ t.jsx(
50
- L,
50
+ w,
51
51
  {
52
- label: i,
53
- onClick: () => d(s.onClick),
54
- startIcon: s.iconSrc ? /* @__PURE__ */ t.jsx("img", { src: s.iconSrc, alt: `${i} icon` }) : void 0
52
+ label: l,
53
+ onClick: () => i(s.onClick),
54
+ startIcon: s.iconSrc ? /* @__PURE__ */ t.jsx("img", { src: s.iconSrc, alt: `${l} icon` }) : void 0
55
55
  },
56
56
  a
57
57
  );
@@ -59,11 +59,11 @@ const T = [["path", { d: "M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0", key: "svg-0
59
59
  }
60
60
  );
61
61
  }, W = f.forwardRef(
62
- ({ title: o, subtitle: r, children: g, data: e, errorMessage: c, dimensionsAndMeasures: l = [], ...d }, h) => {
63
- var u;
62
+ ({ title: o, subtitle: r, children: u, data: e, errorMessage: c, dimensionsAndMeasures: d = [], ...i }, h) => {
63
+ var g;
64
64
  const m = j();
65
65
  x(m);
66
- const s = P(null), a = !!(e != null && e.data && ((u = e.data) == null ? void 0 : u.length) > 0), i = !e || (e == null ? void 0 : e.isLoading), y = () => i && !a ? /* @__PURE__ */ t.jsx(E, {}) : c ? /* @__PURE__ */ t.jsx(
66
+ const s = T(null), a = !!(e != null && e.data && ((g = e.data) == null ? void 0 : g.length) > 0), l = !e || (e == null ? void 0 : e.isLoading), p = () => l && !a ? /* @__PURE__ */ t.jsx(E, {}) : c ? /* @__PURE__ */ t.jsx(
67
67
  _,
68
68
  {
69
69
  className: n.error,
@@ -71,16 +71,16 @@ const T = [["path", { d: "M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0", key: "svg-0
71
71
  title: C.t("charts.errorTitle"),
72
72
  message: c
73
73
  }
74
- ) : a ? g : /* @__PURE__ */ t.jsx(
74
+ ) : a ? u : /* @__PURE__ */ t.jsx(
75
75
  _,
76
76
  {
77
77
  title: C.t("charts.emptyTitle"),
78
78
  message: C.t("charts.emptyMessage")
79
79
  }
80
80
  );
81
- return /* @__PURE__ */ t.jsxs(w, { className: n.chartCard, ...d, children: [
81
+ return /* @__PURE__ */ t.jsxs(R, { className: n.chartCard, ...i, children: [
82
82
  /* @__PURE__ */ t.jsx(
83
- I,
83
+ S,
84
84
  {
85
85
  title: o,
86
86
  subtitle: r,
@@ -88,8 +88,8 @@ const T = [["path", { d: "M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0", key: "svg-0
88
88
  /* @__PURE__ */ t.jsx(
89
89
  "div",
90
90
  {
91
- className: R(n.fixedContent, i ? n.loading : n.hidden),
92
- children: /* @__PURE__ */ t.jsx(p, {})
91
+ className: I(n.fixedContent, l ? n.loading : n.hidden),
92
+ children: /* @__PURE__ */ t.jsx(y, {})
93
93
  }
94
94
  ),
95
95
  /* @__PURE__ */ t.jsx("div", { className: n.fixedContent, children: /* @__PURE__ */ t.jsx(
@@ -98,14 +98,14 @@ const T = [["path", { d: "M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0", key: "svg-0
98
98
  title: o,
99
99
  containerRef: s,
100
100
  data: e == null ? void 0 : e.data,
101
- dimensionsAndMeasures: l,
102
- onCustomDownload: d.onCustomDownload
101
+ dimensionsAndMeasures: d,
102
+ onCustomDownload: i.onCustomDownload
103
103
  }
104
104
  ) })
105
105
  ] })
106
106
  }
107
107
  ),
108
- /* @__PURE__ */ t.jsx(M, { ref: h, children: y() })
108
+ /* @__PURE__ */ t.jsx(M, { ref: i.onCustomDownload ? h : s, children: p() })
109
109
  ] });
110
110
  }
111
111
  );
@@ -114,4 +114,4 @@ export {
114
114
  W as C,
115
115
  E as S
116
116
  };
117
- //# sourceMappingURL=ChartCard-CMgDz_bs.js.map
117
+ //# sourceMappingURL=ChartCard-k190CXR0.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ChartCard-CMgDz_bs.js","sources":["../node_modules/@tabler/icons-react/dist/esm/icons/IconDotsVertical.mjs","../src/remarkable-ui/shared/Skeleton/Skeleton.tsx","../src/remarkable-pro/components/charts/shared/ChartCard/ChartCardLoading/ChartCardLoading.tsx","../src/remarkable-pro/components/charts/shared/ChartCard/ChartCardMenuPro/ChartCardMenuPro.tsx","../src/remarkable-pro/components/charts/shared/ChartCard/ChartCard.tsx"],"sourcesContent":["/**\n * @license @tabler/icons-react v3.35.0 - MIT\n *\n * This source code is licensed under the MIT license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createReactComponent from '../createReactComponent.mjs';\n\nconst __iconNode = [[\"path\", { \"d\": \"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0\", \"key\": \"svg-0\" }], [\"path\", { \"d\": \"M12 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0\", \"key\": \"svg-1\" }], [\"path\", { \"d\": \"M12 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0\", \"key\": \"svg-2\" }]];\nconst IconDotsVertical = createReactComponent(\"outline\", \"dots-vertical\", \"DotsVertical\", __iconNode);\n\nexport { __iconNode, IconDotsVertical as default };\n//# sourceMappingURL=IconDotsVertical.mjs.map\n","import styles from './Skeleton.module.css';\n\nexport const Skeleton = () => {\n return <div className={styles.skeleton} />;\n};\n","import { IconLoader2 } from '@tabler/icons-react';\nimport styles from './ChartCardLoading.module.css';\n\nexport const ChartCardLoading = () => <IconLoader2 className={styles.loading} />;\n","import { IconDotsVertical } from '@tabler/icons-react';\nimport React from 'react';\nimport { useTheme } from '@embeddable.com/react';\nimport { ChartCardLoading } from '../ChartCardLoading/ChartCardLoading';\nimport { i18n, i18nSetup } from '../../../../../theme/i18n/i18n';\nimport { Theme } from '../../../../../theme/theme.types';\nimport {\n Dropdown,\n IconButton,\n SelectList,\n SelectListOption,\n} from '../../../../../../remarkable-ui';\nimport { ChartCardMenuProOptionOnClickProps } from './ChartCardMenuPro.types';\nimport styles from './ChartCardMenuPro.module.css';\n\ntype ChartCardMenuProProps = Omit<ChartCardMenuProOptionOnClickProps, 'theme'>;\n\nexport const ChartCardMenuPro: React.FC<ChartCardMenuProProps> = (props) => {\n const theme: Theme = useTheme() as Theme;\n i18nSetup(theme);\n\n const [isLoading, setIsLoading] = React.useState(false);\n\n const options = theme.charts?.chartCardMenuPro?.options ?? [];\n\n if (options.length === 0) {\n return null;\n }\n\n const startAction = (onClick: () => void | Promise<void>) => {\n setTimeout(() => {\n Promise.resolve(onClick()).finally(() => setIsLoading(false));\n }, 100);\n };\n\n const handleExport = (onClick: (props: ChartCardMenuProOptionOnClickProps) => void) => {\n setIsLoading(true);\n if (props.onCustomDownload) {\n props.onCustomDownload((args) => startAction(() => onClick(args)));\n return;\n }\n startAction(() => onClick({ ...props, theme }));\n };\n\n return (\n <Dropdown\n side=\"bottom\"\n align=\"end\"\n triggerComponent={isLoading ? <ChartCardLoading /> : <IconButton icon={IconDotsVertical} />}\n >\n <SelectList className={styles.list} autoFocus>\n {options.map((option, index) => {\n const label = i18n.t(option.labelKey);\n\n return (\n <SelectListOption\n key={index}\n label={label}\n onClick={() => handleExport(option.onClick)}\n startIcon={\n option.iconSrc ? <img src={option.iconSrc} alt={`${label} icon`} /> : undefined\n }\n />\n );\n })}\n </SelectList>\n </Dropdown>\n );\n};\n","import React, { CSSProperties, useRef } from 'react';\nimport { IconAlertCircle } from '@tabler/icons-react';\nimport {\n Card,\n CardContent,\n CardContentInfo,\n CardHeader,\n Skeleton,\n} from '../../../../../remarkable-ui';\nimport styles from './ChartCard.module.css';\nimport { DataResponse, Dimension, Measure } from '@embeddable.com/core';\nimport { useTheme } from '@embeddable.com/react';\nimport { ChartCardLoading } from './ChartCardLoading/ChartCardLoading';\nimport { ChartCardMenuPro } from './ChartCardMenuPro/ChartCardMenuPro';\nimport { Theme } from '../../../../theme/theme.types';\nimport { i18n, i18nSetup } from '../../../../theme/i18n/i18n';\nimport { ChartCardMenuProOptionOnClickProps } from './ChartCardMenuPro/ChartCardMenuPro.types';\nimport clsx from 'clsx';\n\ntype ChartCardProps = {\n title: string;\n subtitle?: string;\n children: React.ReactNode;\n data: DataResponse;\n isLoading?: boolean;\n errorMessage?: string;\n style?: CSSProperties;\n dimensionsAndMeasures?: (Dimension | Measure)[];\n onCustomDownload?: (props: (props: ChartCardMenuProOptionOnClickProps) => void) => void;\n};\n\nexport const ChartCard = React.forwardRef<HTMLDivElement, ChartCardProps>(\n (\n { title, subtitle, children, data, errorMessage, dimensionsAndMeasures = [], ...props },\n ref,\n ) => {\n const theme: Theme = useTheme() as Theme;\n i18nSetup(theme);\n\n const chartRef = useRef<HTMLDivElement>(null);\n\n const hasData = Boolean(data?.data && data.data?.length > 0);\n\n const isLoading = !data || data?.isLoading;\n\n const getDisplay = () => {\n if (isLoading && !hasData) {\n return <Skeleton />;\n }\n\n if (errorMessage) {\n return (\n <CardContentInfo\n className={styles.error}\n icon={IconAlertCircle}\n title={i18n.t('charts.errorTitle')}\n message={errorMessage}\n />\n );\n }\n\n if (!hasData) {\n return (\n <CardContentInfo\n title={i18n.t('charts.emptyTitle')}\n message={i18n.t('charts.emptyMessage')}\n />\n );\n }\n\n return children;\n };\n\n return (\n <Card className={styles.chartCard} {...props}>\n <CardHeader\n title={title}\n subtitle={subtitle}\n rightContent={\n <div data-no-export className={styles.rightContent}>\n <div\n className={clsx(styles.fixedContent, isLoading ? styles.loading : styles.hidden)}\n >\n <ChartCardLoading />\n </div>\n <div className={styles.fixedContent}>\n <ChartCardMenuPro\n title={title}\n containerRef={chartRef}\n data={data?.data}\n dimensionsAndMeasures={dimensionsAndMeasures}\n onCustomDownload={props.onCustomDownload}\n />\n </div>\n </div>\n }\n />\n\n <CardContent ref={ref}>{getDisplay()}</CardContent>\n </Card>\n );\n },\n);\n\nChartCard.displayName = 'ChartCard';\n"],"names":["__iconNode","IconDotsVertical","createReactComponent","Skeleton","jsx","styles","ChartCardLoading","IconLoader2","ChartCardMenuPro","props","theme","useTheme","i18nSetup","isLoading","setIsLoading","React","options","_b","_a","startAction","onClick","handleExport","args","Dropdown","IconButton","SelectList","option","index","label","i18n","SelectListOption","ChartCard","title","subtitle","children","data","errorMessage","dimensionsAndMeasures","ref","chartRef","useRef","hasData","getDisplay","CardContentInfo","IconAlertCircle","Card","CardHeader","jsxs","clsx","CardContent"],"mappings":";;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMA,IAAa,CAAC,CAAC,QAAQ,EAAE,GAAK,4CAA4C,KAAO,QAAO,CAAE,GAAG,CAAC,QAAQ,EAAE,GAAK,4CAA4C,KAAO,SAAS,GAAG,CAAC,QAAQ,EAAE,GAAK,2CAA2C,KAAO,QAAO,CAAE,CAAC,GACxPC,IAAmBC,EAAqB,WAAW,iBAAiB,gBAAgBF,CAAU;;GCRvFG,IAAW,MACfC,gBAAAA,EAAAA,IAAC,OAAA,EAAI,WAAWC,EAAO,SAAA,CAAU;;;;;;;;;GCA7BC,IAAmB,MAAMF,gBAAAA,EAAAA,IAACG,GAAA,EAAY,WAAWF,EAAO,SAAS;;GCcjEG,IAAoD,CAACC,MAAU;;AAC1E,QAAMC,IAAeC,EAAA;AACrB,EAAAC,EAAUF,CAAK;AAEf,QAAM,CAACG,GAAWC,CAAY,IAAIC,EAAM,SAAS,EAAK,GAEhDC,MAAUC,KAAAC,IAAAR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AAAA,cAAA;AAAA,YAAA;AAAA,YAEpBF,gBAAAA,EAAAA,IAAC,OAAA,EAAI,WAAWC,EAAO,cACrB,UAAAD,gBAAAA,EAAAA;AAAAA,cAACI;AAAA,cAAA;AAAA,gBACC,OAAAwB;AAAA,gBACA,cAAcO;AAAA,gBACd,MAAMJ,KAAA,gBAAAA,EAAM;AAAA,gBACZ,uBAAAE;AAAA,gBACA,kBAAkB5B,EAAM;AAAA,cAAA;AAAA,YAAA,EAC1B,CACF;AAAA,UAAA,EAAA,CACF;AAAA,QAAA;AAAA,MAAA;AAAA,MAIJL,gBAAAA,EAAAA,IAAC6C,GAAA,EAAY,KAAAX,GAAW,UAAAI,EAAA,EAAW,CAAE;AAAA,IAAA,GACvC;AAAA,EAEJ;AACF;AAEAX,EAAU,cAAc;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"ChartCard-k190CXR0.js","sources":["../node_modules/@tabler/icons-react/dist/esm/icons/IconDotsVertical.mjs","../src/remarkable-ui/shared/Skeleton/Skeleton.tsx","../src/remarkable-pro/components/charts/shared/ChartCard/ChartCardLoading/ChartCardLoading.tsx","../src/remarkable-pro/components/charts/shared/ChartCard/ChartCardMenuPro/ChartCardMenuPro.tsx","../src/remarkable-pro/components/charts/shared/ChartCard/ChartCard.tsx"],"sourcesContent":["/**\n * @license @tabler/icons-react v3.35.0 - MIT\n *\n * This source code is licensed under the MIT license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createReactComponent from '../createReactComponent.mjs';\n\nconst __iconNode = [[\"path\", { \"d\": \"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0\", \"key\": \"svg-0\" }], [\"path\", { \"d\": \"M12 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0\", \"key\": \"svg-1\" }], [\"path\", { \"d\": \"M12 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0\", \"key\": \"svg-2\" }]];\nconst IconDotsVertical = createReactComponent(\"outline\", \"dots-vertical\", \"DotsVertical\", __iconNode);\n\nexport { __iconNode, IconDotsVertical as default };\n//# sourceMappingURL=IconDotsVertical.mjs.map\n","import styles from './Skeleton.module.css';\n\nexport const Skeleton = () => {\n return <div className={styles.skeleton} />;\n};\n","import { IconLoader2 } from '@tabler/icons-react';\nimport styles from './ChartCardLoading.module.css';\n\nexport const ChartCardLoading = () => <IconLoader2 className={styles.loading} />;\n","import { IconDotsVertical } from '@tabler/icons-react';\nimport React from 'react';\nimport { useTheme } from '@embeddable.com/react';\nimport { ChartCardLoading } from '../ChartCardLoading/ChartCardLoading';\nimport { i18n, i18nSetup } from '../../../../../theme/i18n/i18n';\nimport { Theme } from '../../../../../theme/theme.types';\nimport {\n Dropdown,\n IconButton,\n SelectList,\n SelectListOption,\n} from '../../../../../../remarkable-ui';\nimport { ChartCardMenuProOptionOnClickProps } from './ChartCardMenuPro.types';\nimport styles from './ChartCardMenuPro.module.css';\n\ntype ChartCardMenuProProps = Omit<ChartCardMenuProOptionOnClickProps, 'theme'>;\n\nexport const ChartCardMenuPro: React.FC<ChartCardMenuProProps> = (props) => {\n const theme: Theme = useTheme() as Theme;\n i18nSetup(theme);\n\n const [isLoading, setIsLoading] = React.useState(false);\n\n const options = theme.charts?.chartCardMenuPro?.options ?? [];\n\n if (options.length === 0) {\n return null;\n }\n\n const startAction = (onClick: () => void | Promise<void>) => {\n setTimeout(() => {\n Promise.resolve(onClick()).finally(() => setIsLoading(false));\n }, 100);\n };\n\n const handleExport = (onClick: (props: ChartCardMenuProOptionOnClickProps) => void) => {\n setIsLoading(true);\n if (props.onCustomDownload) {\n props.onCustomDownload((args) => startAction(() => onClick(args)));\n return;\n }\n startAction(() => onClick({ ...props, theme }));\n };\n\n return (\n <Dropdown\n side=\"bottom\"\n align=\"end\"\n triggerComponent={isLoading ? <ChartCardLoading /> : <IconButton icon={IconDotsVertical} />}\n >\n <SelectList className={styles.list} autoFocus>\n {options.map((option, index) => {\n const label = i18n.t(option.labelKey);\n\n return (\n <SelectListOption\n key={index}\n label={label}\n onClick={() => handleExport(option.onClick)}\n startIcon={\n option.iconSrc ? <img src={option.iconSrc} alt={`${label} icon`} /> : undefined\n }\n />\n );\n })}\n </SelectList>\n </Dropdown>\n );\n};\n","import React, { CSSProperties, useRef } from 'react';\nimport { IconAlertCircle } from '@tabler/icons-react';\nimport {\n Card,\n CardContent,\n CardContentInfo,\n CardHeader,\n Skeleton,\n} from '../../../../../remarkable-ui';\nimport styles from './ChartCard.module.css';\nimport { DataResponse, Dimension, Measure } from '@embeddable.com/core';\nimport { useTheme } from '@embeddable.com/react';\nimport { ChartCardLoading } from './ChartCardLoading/ChartCardLoading';\nimport { ChartCardMenuPro } from './ChartCardMenuPro/ChartCardMenuPro';\nimport { Theme } from '../../../../theme/theme.types';\nimport { i18n, i18nSetup } from '../../../../theme/i18n/i18n';\nimport { ChartCardMenuProOptionOnClickProps } from './ChartCardMenuPro/ChartCardMenuPro.types';\nimport clsx from 'clsx';\n\ntype ChartCardProps = {\n title: string;\n subtitle?: string;\n children: React.ReactNode;\n data: DataResponse;\n isLoading?: boolean;\n errorMessage?: string;\n style?: CSSProperties;\n dimensionsAndMeasures?: (Dimension | Measure)[];\n onCustomDownload?: (props: (props: ChartCardMenuProOptionOnClickProps) => void) => void;\n};\n\nexport const ChartCard = React.forwardRef<HTMLDivElement, ChartCardProps>(\n (\n { title, subtitle, children, data, errorMessage, dimensionsAndMeasures = [], ...props },\n ref,\n ) => {\n const theme: Theme = useTheme() as Theme;\n i18nSetup(theme);\n\n const chartRef = useRef<HTMLDivElement>(null);\n\n const hasData = Boolean(data?.data && data.data?.length > 0);\n\n const isLoading = !data || data?.isLoading;\n\n const getDisplay = () => {\n if (isLoading && !hasData) {\n return <Skeleton />;\n }\n\n if (errorMessage) {\n return (\n <CardContentInfo\n className={styles.error}\n icon={IconAlertCircle}\n title={i18n.t('charts.errorTitle')}\n message={errorMessage}\n />\n );\n }\n\n if (!hasData) {\n return (\n <CardContentInfo\n title={i18n.t('charts.emptyTitle')}\n message={i18n.t('charts.emptyMessage')}\n />\n );\n }\n\n return children;\n };\n\n return (\n <Card className={styles.chartCard} {...props}>\n <CardHeader\n title={title}\n subtitle={subtitle}\n rightContent={\n <div data-no-export className={styles.rightContent}>\n <div\n className={clsx(styles.fixedContent, isLoading ? styles.loading : styles.hidden)}\n >\n <ChartCardLoading />\n </div>\n <div className={styles.fixedContent}>\n <ChartCardMenuPro\n title={title}\n containerRef={chartRef}\n data={data?.data}\n dimensionsAndMeasures={dimensionsAndMeasures}\n onCustomDownload={props.onCustomDownload}\n />\n </div>\n </div>\n }\n />\n\n <CardContent ref={props.onCustomDownload ? ref : chartRef}>{getDisplay()}</CardContent>\n </Card>\n );\n },\n);\n\nChartCard.displayName = 'ChartCard';\n"],"names":["__iconNode","IconDotsVertical","createReactComponent","Skeleton","jsx","styles","ChartCardLoading","IconLoader2","ChartCardMenuPro","props","theme","useTheme","i18nSetup","isLoading","setIsLoading","React","options","_b","_a","startAction","onClick","handleExport","args","Dropdown","IconButton","SelectList","option","index","label","i18n","SelectListOption","ChartCard","title","subtitle","children","data","errorMessage","dimensionsAndMeasures","ref","chartRef","useRef","hasData","getDisplay","CardContentInfo","IconAlertCircle","Card","CardHeader","jsxs","clsx","CardContent"],"mappings":";;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMA,IAAa,CAAC,CAAC,QAAQ,EAAE,GAAK,4CAA4C,KAAO,QAAO,CAAE,GAAG,CAAC,QAAQ,EAAE,GAAK,4CAA4C,KAAO,SAAS,GAAG,CAAC,QAAQ,EAAE,GAAK,2CAA2C,KAAO,QAAO,CAAE,CAAC,GACxPC,IAAmBC,EAAqB,WAAW,iBAAiB,gBAAgBF,CAAU;;GCRvFG,IAAW,MACfC,gBAAAA,EAAAA,IAAC,OAAA,EAAI,WAAWC,EAAO,SAAA,CAAU;;;;;;;;;GCA7BC,IAAmB,MAAMF,gBAAAA,EAAAA,IAACG,GAAA,EAAY,WAAWF,EAAO,SAA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;AAAA,YAAAD,gBAAAA,EAAAA;AAAAA,cAAC;AAAA,cAAA;AAAA,gBACC,WAAW4C,EAAK3C,EAAO,cAAcQ,IAAYR,EAAO,UAAUA,EAAO,MAAM;AAAA,gBAE/E,gCAACC,GAAA,CAAA,CAAiB;AAAA,cAAA;AAAA,YAAA;AAAA,YAEpBF,gBAAAA,EAAAA,IAAC,OAAA,EAAI,WAAWC,EAAO,cACrB,UAAAD,gBAAAA,EAAAA;AAAAA,cAACI;AAAA,cAAA;AAAA,gBACC,OAAAwB;AAAA,gBACA,cAAcO;AAAA,gBACd,MAAMJ,KAAA,gBAAAA,EAAM;AAAA,gBACZ,uBAAAE;AAAA,gBACA,kBAAkB5B,EAAM;AAAA,cAAA;AAAA,YAAA,EAC1B,CACF;AAAA,UAAA,EAAA,CACF;AAAA,QAAA;AAAA,MAAA;AAAA,MAIJL,gBAAAA,MAAC6C,KAAY,KAAKxC,EAAM,mBAAmB6B,IAAMC,GAAW,cAAW,CAAE;AAAA,IAAA,GAC3E;AAAA,EAEJ;AACF;AAEAR,EAAU,cAAc;","x_google_ignoreList":[0]}
@@ -1,4 +1,4 @@
1
- import { aR as i, aS as o } from "./component.constants-CFaxyNCw.js";
1
+ import { aS as i, aT as o } from "./component.constants-D0ea4CW4.js";
2
2
  const e = i("comparisonPeriod", {
3
3
  label: "Comparison Period",
4
4
  optionLabel: (r) => r
@@ -11,4 +11,4 @@ o(e, "Previous year");
11
11
  export {
12
12
  e as C
13
13
  };
14
- //# sourceMappingURL=ComparisonPeriod.type.emb-C1o3iM9L.js.map
14
+ //# sourceMappingURL=ComparisonPeriod.type.emb-Dgl2VM4_.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ComparisonPeriod.type.emb-C1o3iM9L.js","sources":["../src/remarkable-pro/components/types/ComparisonPeriod.type.emb.ts"],"sourcesContent":["import { defineOption, defineType } from '@embeddable.com/core';\n\nconst ComparisonPeriodType = defineType('comparisonPeriod', {\n label: 'Comparison Period',\n optionLabel: (value: string) => value,\n});\n\ndefineOption(ComparisonPeriodType, 'Previous period');\ndefineOption(ComparisonPeriodType, 'Previous week');\ndefineOption(ComparisonPeriodType, 'Previous month');\ndefineOption(ComparisonPeriodType, 'Previous quarter');\ndefineOption(ComparisonPeriodType, 'Previous year');\n\nexport default ComparisonPeriodType;\n"],"names":["ComparisonPeriodType","defineType","value","defineOption"],"mappings":";AAEA,MAAMA,IAAuBC,EAAW,oBAAoB;AAAA,EAC1D,OAAO;AAAA,EACP,aAAa,CAACC,MAAkBA;AAClC,CAAC;AAEDC,EAAaH,GAAsB,iBAAiB;AACpDG,EAAaH,GAAsB,eAAe;AAClDG,EAAaH,GAAsB,gBAAgB;AACnDG,EAAaH,GAAsB,kBAAkB;AACrDG,EAAaH,GAAsB,eAAe;"}
1
+ {"version":3,"file":"ComparisonPeriod.type.emb-Dgl2VM4_.js","sources":["../src/remarkable-pro/components/types/ComparisonPeriod.type.emb.ts"],"sourcesContent":["import { defineOption, defineType } from '@embeddable.com/core';\n\nconst ComparisonPeriodType = defineType('comparisonPeriod', {\n label: 'Comparison Period',\n optionLabel: (value: string) => value,\n});\n\ndefineOption(ComparisonPeriodType, 'Previous period');\ndefineOption(ComparisonPeriodType, 'Previous week');\ndefineOption(ComparisonPeriodType, 'Previous month');\ndefineOption(ComparisonPeriodType, 'Previous quarter');\ndefineOption(ComparisonPeriodType, 'Previous year');\n\nexport default ComparisonPeriodType;\n"],"names":["ComparisonPeriodType","defineType","value","defineOption"],"mappings":";AAEA,MAAMA,IAAuBC,EAAW,oBAAoB;AAAA,EAC1D,OAAO;AAAA,EACP,aAAa,CAACC,MAAkBA;AAClC,CAAC;AAEDC,EAAaH,GAAsB,iBAAiB;AACpDG,EAAaH,GAAsB,eAAe;AAClDG,EAAaH,GAAsB,gBAAgB;AACnDG,EAAaH,GAAsB,kBAAkB;AACrDG,EAAaH,GAAsB,eAAe;"}
@@ -1,10 +1,10 @@
1
1
  import { useTheme as v, defineComponent as h } from "@embeddable.com/react";
2
- import { ad as y, a2 as P, i as f, r as b, j as l, U as C, t as S, c as F, ae as R, V as d } from "./component.constants-CFaxyNCw.js";
2
+ import { ae as y, a2 as P, i as f, r as b, j as l, U as C, t as S, c as F, af as R, V as d } from "./component.constants-D0ea4CW4.js";
3
3
  import { useMemo as M, useEffect as k } from "react";
4
- import { S as D } from "./SingleSelectField-CJNiLfee.js";
4
+ import { S as D } from "./SingleSelectField-CY0TwkyW.js";
5
5
  import { g as T, u as j, a as x } from "./editors.timeRange.utils-D9m6B3r1.js";
6
- import { E as L } from "./EditorCard-CJoUz4uM.js";
7
- import { C as s } from "./ComparisonPeriod.type.emb-C1o3iM9L.js";
6
+ import { E as L } from "./EditorCard-BNBH4Y9F.js";
7
+ import { C as s } from "./ComparisonPeriod.type.emb-Dgl2VM4_.js";
8
8
  /**
9
9
  * @license @tabler/icons-react v3.35.0 - MIT
10
10
  *
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as t } from "@embeddable.com/react";
2
- import { t as l, c as n, ae as r, V as a } from "./component.constants-CFaxyNCw.js";
3
- import { D as o } from "./index-DvMr1tvf.js";
2
+ import { t as l, c as n, af as r, V as a } from "./component.constants-D0ea4CW4.js";
3
+ import { D as o } from "./index-C_G6mJoE.js";
4
4
  const i = {
5
5
  name: "DateRangeSelectFieldPro",
6
6
  label: "Date Range Select Field",
@@ -1,6 +1,6 @@
1
- import { d as a, w as s, z as t, t as o, c as n, s as r, a3 as i, e as m, f as l, V as d, o as u } from "./component.constants-CFaxyNCw.js";
1
+ import { d as a, w as s, z as t, t as o, c as n, s as r, a3 as i, e as m, f as l, V as d, o as u } from "./component.constants-D0ea4CW4.js";
2
2
  import { defineComponent as c } from "@embeddable.com/react";
3
- import { D as p } from "./index-BAfVF5iP.js";
3
+ import { D as p } from "./index-DuWcnytb.js";
4
4
  const C = {
5
5
  name: "DonutChartPro",
6
6
  label: "Donut Chart",
@@ -1,5 +1,5 @@
1
- import { D as n } from "./index-CxxeUDMD.js";
2
- import { d as s, w as a, z as r, t as o, c as l, s as i, a3 as m, e as d, f as u, V as b, o as t } from "./component.constants-CFaxyNCw.js";
1
+ import { D as n } from "./index-DGb59RGF.js";
2
+ import { d as s, w as a, z as r, t as o, c as l, s as i, a3 as m, e as d, f as u, V as b, o as t } from "./component.constants-D0ea4CW4.js";
3
3
  import { defineComponent as c } from "@embeddable.com/react";
4
4
  const p = {
5
5
  name: "DonutLabelChartPro",
@@ -1,4 +1,4 @@
1
- import { ad as u, j as a, ag as m, i as y, ai as g, aj as _, am as p, an as h, U as x, aQ as f } from "./component.constants-CFaxyNCw.js";
1
+ import { ae as u, j as a, ah as y, i as m, aj as g, ak as _, an as p, ao as h, U as x, aR as f } from "./component.constants-D0ea4CW4.js";
2
2
  import { useEffect as j } from "react";
3
3
  import { useTheme as C } from "@embeddable.com/react";
4
4
  /**
@@ -7,14 +7,14 @@ import { useTheme as C } from "@embeddable.com/react";
7
7
  * This source code is licensed under the MIT license.
8
8
  * See the LICENSE file in the root directory of this source tree.
9
9
  */
10
- const b = [["path", { d: "M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0", key: "svg-0" }], ["path", { d: "M21 21l-6 -6", key: "svg-1" }]], $ = u("outline", "search", "Search", b), S = "_listOptions_2o1ip_1", v = "_disabled_2o1ip_6", c = {
10
+ const b = [["path", { d: "M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0", key: "svg-0" }], ["path", { d: "M21 21l-6 -6", key: "svg-1" }]], R = u("outline", "search", "Search", b), S = "_listOptions_2o1ip_1", v = "_disabled_2o1ip_6", c = {
11
11
  listOptions: S,
12
12
  disabled: v
13
- }, A = ({ children: t, disabled: s, ...e }) => /* @__PURE__ */ a.jsx("div", { className: m(c.listOptions, s && c.disabled), ...e, children: t }), L = "_category_1p6u3_1", N = "_categoryLabel_1p6u3_11", n = {
13
+ }, $ = ({ children: t, disabled: s, ...e }) => /* @__PURE__ */ a.jsx("div", { className: y(c.listOptions, s && c.disabled), ...e, children: t }), L = "_category_1p6u3_1", N = "_categoryLabel_1p6u3_11", n = {
14
14
  category: L,
15
15
  categoryLabel: N
16
- }, B = ({ label: t }) => /* @__PURE__ */ a.jsx("div", { className: n.category, children: /* @__PURE__ */ a.jsx("span", { className: n.categoryLabel, children: t }) });
17
- function D(t, s = 300) {
16
+ }, A = ({ label: t }) => /* @__PURE__ */ a.jsx("div", { className: n.category, children: /* @__PURE__ */ a.jsx("span", { className: n.categoryLabel, children: t }) });
17
+ function B(t, s = 300) {
18
18
  let e;
19
19
  return (...r) => {
20
20
  clearTimeout(e), e = setTimeout(() => {
@@ -22,7 +22,7 @@ function D(t, s = 300) {
22
22
  }, s);
23
23
  };
24
24
  }
25
- const H = (t) => {
25
+ const D = (t) => {
26
26
  const s = t.reduce((e, r) => {
27
27
  if ("category" in r && r.category) {
28
28
  const o = r.category;
@@ -31,7 +31,7 @@ const H = (t) => {
31
31
  return e;
32
32
  }, {});
33
33
  return Object.keys(s).length === 0 ? null : s;
34
- }, M = (t, s) => {
34
+ }, H = (t, s) => {
35
35
  j(() => {
36
36
  t && setTimeout(() => {
37
37
  var e;
@@ -41,7 +41,7 @@ const H = (t) => {
41
41
  }, O = "_error_1xvr5_1", T = "_card_1xvr5_7", i = {
42
42
  error: O,
43
43
  card: T
44
- }, Q = ({
44
+ }, M = ({
45
45
  title: t,
46
46
  subtitle: s,
47
47
  children: e,
@@ -49,7 +49,7 @@ const H = (t) => {
49
49
  ...o
50
50
  }) => {
51
51
  const l = C();
52
- y(l);
52
+ m(l);
53
53
  const d = () => r ? /* @__PURE__ */ a.jsx(
54
54
  h,
55
55
  {
@@ -65,12 +65,12 @@ const H = (t) => {
65
65
  ] });
66
66
  };
67
67
  export {
68
- Q as E,
69
- $ as I,
70
- A as S,
71
- B as a,
72
- D as d,
73
- H as g,
74
- M as u
68
+ M as E,
69
+ R as I,
70
+ $ as S,
71
+ A as a,
72
+ B as d,
73
+ D as g,
74
+ H as u
75
75
  };
76
- //# sourceMappingURL=EditorCard-CJoUz4uM.js.map
76
+ //# sourceMappingURL=EditorCard-BNBH4Y9F.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"EditorCard-CJoUz4uM.js","sources":["../node_modules/@tabler/icons-react/dist/esm/icons/IconSearch.mjs","../src/remarkable-ui/editors/select/shared/SelectList/SelectListOptions/SelectListOptions.tsx","../src/remarkable-ui/editors/select/shared/SelectList/SelectListOptions/SelectListCategory/SelectListCategory.tsx","../src/remarkable-ui/utils/debounce.utils.ts","../src/remarkable-ui/editors/select/shared/SelectList/selectList.utils.ts","../src/remarkable-ui/editors/select/shared/useSelectSearchFocus.hook.ts","../src/remarkable-pro/components/editors/shared/EditorCard/EditorCard.tsx"],"sourcesContent":["/**\n * @license @tabler/icons-react v3.35.0 - MIT\n *\n * This source code is licensed under the MIT license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createReactComponent from '../createReactComponent.mjs';\n\nconst __iconNode = [[\"path\", { \"d\": \"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0\", \"key\": \"svg-0\" }], [\"path\", { \"d\": \"M21 21l-6 -6\", \"key\": \"svg-1\" }]];\nconst IconSearch = createReactComponent(\"outline\", \"search\", \"Search\", __iconNode);\n\nexport { __iconNode, IconSearch as default };\n//# sourceMappingURL=IconSearch.mjs.map\n","import { FC } from 'react';\nimport styles from './SelectListOptions.module.css';\nimport clsx from 'clsx';\n\nexport type SelectListOptionsProps = React.HTMLAttributes<HTMLDivElement> & {\n children: React.ReactNode;\n disabled?: boolean;\n};\n\nexport const SelectListOptions: FC<SelectListOptionsProps> = ({ children, disabled, ...props }) => {\n return (\n <div className={clsx(styles.listOptions, disabled && styles.disabled)} {...props}>\n {children}\n </div>\n );\n};\n","import { FC } from 'react';\nimport styles from './SelectListCategory.module.css';\n\ntype SelectListCategoryProps = {\n label: string;\n};\n\nexport const SelectListCategory: FC<SelectListCategoryProps> = ({ label }) => {\n return (\n <div className={styles.category}>\n <span className={styles.categoryLabel}>{label}</span>\n </div>\n );\n};\n","// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function debounce<T extends (...args: any[]) => void>(\n fn: T,\n delay = 300,\n): (...args: Parameters<T>) => void {\n let timer: NodeJS.Timeout;\n return (...args: Parameters<T>) => {\n clearTimeout(timer);\n timer = setTimeout(() => {\n fn(...args);\n }, delay);\n };\n}\n","import {\n SelectListOptionProps,\n SelectListOptionPropsWithCategory,\n} from './SelectListOptions/SelectListOption/SelectListOption';\n\ntype GroupedOptions = {\n [category: string]: SelectListOptionPropsWithCategory[];\n};\n\nexport const groupOptionsByCategory = (\n options: (SelectListOptionProps | SelectListOptionPropsWithCategory)[],\n): GroupedOptions | null => {\n const result = options.reduce<GroupedOptions>((acc, option) => {\n if ('category' in option && option.category) {\n const category = option.category;\n if (!acc[category]) {\n acc[category] = [];\n }\n acc[category].push(option);\n }\n return acc;\n }, {});\n\n // Return null if no categories were found\n return Object.keys(result).length === 0 ? null : result;\n};\n","import { useEffect } from 'react';\n\nexport const useSelectSearchFocus = (\n isOpen: boolean,\n searchFieldRef: React.RefObject<HTMLInputElement | null>,\n) => {\n useEffect(() => {\n if (isOpen) {\n setTimeout(() => {\n (searchFieldRef.current as unknown as HTMLInputElement)?.focus();\n }, 100);\n }\n }, [isOpen, searchFieldRef]);\n};\n","import { useTheme } from '@embeddable.com/react';\nimport { i18n, i18nSetup } from '../../../../theme/i18n/i18n';\nimport styles from './EditorCard.module.css';\nimport { FC } from 'react';\nimport { Theme } from '../../../../theme/theme.types';\nimport { Card, CardContent, CardContentInfo, CardHeader } from '../../../../../remarkable-ui';\nimport { IconAlertCircle } from '@tabler/icons-react';\n\ntype EditorCardProps = {\n title?: string;\n subtitle?: string;\n children: React.ReactNode;\n errorMessage?: string;\n};\n\nexport const EditorCard: FC<EditorCardProps> = ({\n title,\n subtitle,\n children,\n errorMessage,\n ...props\n}) => {\n const theme: Theme = useTheme() as Theme;\n i18nSetup(theme);\n\n const getDisplay = () => {\n if (errorMessage) {\n return (\n <CardContentInfo\n className={styles.error}\n icon={IconAlertCircle}\n title={i18n.t('editors.errorTitle')}\n message={errorMessage}\n />\n );\n }\n\n return children;\n };\n\n return (\n <Card className={styles.card} {...props}>\n <CardHeader title={title} subtitle={subtitle} />\n <CardContent>{getDisplay()}</CardContent>\n </Card>\n );\n};\n"],"names":["__iconNode","IconSearch","createReactComponent","SelectListOptions","children","disabled","props","jsx","clsx","styles","SelectListCategory","label","debounce","fn","delay","timer","args","groupOptionsByCategory","options","result","acc","option","category","useSelectSearchFocus","isOpen","searchFieldRef","useEffect","_a","EditorCard","title","subtitle","errorMessage","theme","useTheme","i18nSetup","getDisplay","CardContentInfo","IconAlertCircle","i18n","Card","CardHeader","CardContent"],"mappings":";;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMA,IAAa,CAAC,CAAC,QAAQ,EAAE,GAAK,8CAA8C,KAAO,QAAO,CAAE,GAAG,CAAC,QAAQ,EAAE,GAAK,gBAAgB,KAAO,QAAO,CAAE,CAAC,GAChJC,IAAaC,EAAqB,WAAW,UAAU,UAAUF,CAAU;;;GCDpEG,IAAgD,CAAC,EAAE,UAAAC,GAAU,UAAAC,GAAU,GAAGC,QAEnFC,gBAAAA,EAAAA,IAAC,OAAA,EAAI,WAAWC,EAAKC,EAAO,aAAaJ,KAAYI,EAAO,QAAQ,GAAI,GAAGH,GACxE,UAAAF,EAAA,CACH;;;GCNSM,IAAkD,CAAC,EAAE,OAAAC,QAE9DJ,gBAAAA,EAAAA,IAAC,OAAA,EAAI,WAAWE,EAAO,UACrB,UAAAF,gBAAAA,EAAAA,IAAC,QAAA,EAAK,WAAWE,EAAO,eAAgB,UAAAE,EAAA,CAAM,GAChD;ACVG,SAASC,EACdC,GACAC,IAAQ,KAC0B;AAClC,MAAIC;AACJ,SAAO,IAAIC,MAAwB;AACjC,iBAAaD,CAAK,GAClBA,IAAQ,WAAW,MAAM;AACvB,MAAAF,EAAG,GAAGG,CAAI;AAAA,IACZ,GAAG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A,EAAA,GAC7B;AAEJ;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"EditorCard-BNBH4Y9F.js","sources":["../node_modules/@tabler/icons-react/dist/esm/icons/IconSearch.mjs","../src/remarkable-ui/editors/select/shared/SelectList/SelectListOptions/SelectListOptions.tsx","../src/remarkable-ui/editors/select/shared/SelectList/SelectListOptions/SelectListCategory/SelectListCategory.tsx","../src/remarkable-ui/utils/debounce.utils.ts","../src/remarkable-ui/editors/select/shared/SelectList/selectList.utils.ts","../src/remarkable-ui/editors/select/shared/useSelectSearchFocus.hook.ts","../src/remarkable-pro/components/editors/shared/EditorCard/EditorCard.tsx"],"sourcesContent":["/**\n * @license @tabler/icons-react v3.35.0 - MIT\n *\n * This source code is licensed under the MIT license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createReactComponent from '../createReactComponent.mjs';\n\nconst __iconNode = [[\"path\", { \"d\": \"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0\", \"key\": \"svg-0\" }], [\"path\", { \"d\": \"M21 21l-6 -6\", \"key\": \"svg-1\" }]];\nconst IconSearch = createReactComponent(\"outline\", \"search\", \"Search\", __iconNode);\n\nexport { __iconNode, IconSearch as default };\n//# sourceMappingURL=IconSearch.mjs.map\n","import { FC } from 'react';\nimport styles from './SelectListOptions.module.css';\nimport clsx from 'clsx';\n\nexport type SelectListOptionsProps = React.HTMLAttributes<HTMLDivElement> & {\n children: React.ReactNode;\n disabled?: boolean;\n};\n\nexport const SelectListOptions: FC<SelectListOptionsProps> = ({ children, disabled, ...props }) => {\n return (\n <div className={clsx(styles.listOptions, disabled && styles.disabled)} {...props}>\n {children}\n </div>\n );\n};\n","import { FC } from 'react';\nimport styles from './SelectListCategory.module.css';\n\ntype SelectListCategoryProps = {\n label: string;\n};\n\nexport const SelectListCategory: FC<SelectListCategoryProps> = ({ label }) => {\n return (\n <div className={styles.category}>\n <span className={styles.categoryLabel}>{label}</span>\n </div>\n );\n};\n","// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function debounce<T extends (...args: any[]) => void>(\n fn: T,\n delay = 300,\n): (...args: Parameters<T>) => void {\n let timer: NodeJS.Timeout;\n return (...args: Parameters<T>) => {\n clearTimeout(timer);\n timer = setTimeout(() => {\n fn(...args);\n }, delay);\n };\n}\n","import {\n SelectListOptionProps,\n SelectListOptionPropsWithCategory,\n} from './SelectListOptions/SelectListOption/SelectListOption';\n\ntype GroupedOptions = {\n [category: string]: SelectListOptionPropsWithCategory[];\n};\n\nexport const groupOptionsByCategory = (\n options: (SelectListOptionProps | SelectListOptionPropsWithCategory)[],\n): GroupedOptions | null => {\n const result = options.reduce<GroupedOptions>((acc, option) => {\n if ('category' in option && option.category) {\n const category = option.category;\n if (!acc[category]) {\n acc[category] = [];\n }\n acc[category].push(option);\n }\n return acc;\n }, {});\n\n // Return null if no categories were found\n return Object.keys(result).length === 0 ? null : result;\n};\n","import { useEffect } from 'react';\n\nexport const useSelectSearchFocus = (\n isOpen: boolean,\n searchFieldRef: React.RefObject<HTMLInputElement | null>,\n) => {\n useEffect(() => {\n if (isOpen) {\n setTimeout(() => {\n (searchFieldRef.current as unknown as HTMLInputElement)?.focus();\n }, 100);\n }\n }, [isOpen, searchFieldRef]);\n};\n","import { useTheme } from '@embeddable.com/react';\nimport { i18n, i18nSetup } from '../../../../theme/i18n/i18n';\nimport styles from './EditorCard.module.css';\nimport { FC } from 'react';\nimport { Theme } from '../../../../theme/theme.types';\nimport { Card, CardContent, CardContentInfo, CardHeader } from '../../../../../remarkable-ui';\nimport { IconAlertCircle } from '@tabler/icons-react';\n\ntype EditorCardProps = {\n title?: string;\n subtitle?: string;\n children: React.ReactNode;\n errorMessage?: string;\n};\n\nexport const EditorCard: FC<EditorCardProps> = ({\n title,\n subtitle,\n children,\n errorMessage,\n ...props\n}) => {\n const theme: Theme = useTheme() as Theme;\n i18nSetup(theme);\n\n const getDisplay = () => {\n if (errorMessage) {\n return (\n <CardContentInfo\n className={styles.error}\n icon={IconAlertCircle}\n title={i18n.t('editors.errorTitle')}\n message={errorMessage}\n />\n );\n }\n\n return children;\n };\n\n return (\n <Card className={styles.card} {...props}>\n <CardHeader title={title} subtitle={subtitle} />\n <CardContent>{getDisplay()}</CardContent>\n </Card>\n );\n};\n"],"names":["__iconNode","IconSearch","createReactComponent","SelectListOptions","children","disabled","props","jsx","clsx","styles","SelectListCategory","label","debounce","fn","delay","timer","args","groupOptionsByCategory","options","result","acc","option","category","useSelectSearchFocus","isOpen","searchFieldRef","useEffect","_a","EditorCard","title","subtitle","errorMessage","theme","useTheme","i18nSetup","getDisplay","CardContentInfo","IconAlertCircle","i18n","Card","CardHeader","CardContent"],"mappings":";;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMA,IAAa,CAAC,CAAC,QAAQ,EAAE,GAAK,8CAA8C,KAAO,QAAO,CAAE,GAAG,CAAC,QAAQ,EAAE,GAAK,gBAAgB,KAAO,QAAO,CAAE,CAAC,GAChJC,IAAaC,EAAqB,WAAW,UAAU,UAAUF,CAAU;;;GCDpEG,IAAgD,CAAC,EAAE,UAAAC,GAAU,UAAAC,GAAU,GAAGC,QAEnFC,gBAAAA,EAAAA,IAAC,OAAA,EAAI,WAAWC,EAAKC,EAAO,aAAaJ,KAAYI,EAAO,QAAQ,GAAI,GAAGH,GACxE,UAAAF,EAAA,CACH;;;GCNSM,IAAkD,CAAC,EAAE,OAAAC,QAE9DJ,gBAAAA,EAAAA,IAAC,OAAA,EAAI,WAAWE,EAAO,UACrB,UAAAF,gBAAAA,EAAAA,IAAC,QAAA,EAAK,WAAWE,EAAO,eAAgB,UAAAE,EAAA,CAAM,GAChD;ACVG,SAASC,EACdC,GACAC,IAAQ,KAC0B;AAClC,MAAIC;AACJ,SAAO,IAAIC,MAAwB;AACjC,iBAAaD,CAAK,GAClBA,IAAQ,WAAW,MAAM;AACvB,MAAAF,EAAG,GAAGG,CAAI;AAAA,IACZ,GAAGF,CAAK;AAAA,EACV;AACF;ACHO,MAAM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