@embeddable.com/remarkable-ui 0.1.31 → 0.1.33
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.
- package/dist/BarChartDefaultHorizontalPro.js +3 -3
- package/dist/BarChartDefaultPro.js +3 -3
- package/dist/BarChartGroupedHorizontalPro.js +3 -3
- package/dist/BarChartGroupedPro.js +3 -3
- package/dist/BarChartStackedHorizontalPro.js +3 -3
- package/dist/BarChartStackedPro.js +3 -3
- package/dist/{BaseButton-Bf7IgH4E.js → BaseButton-D3Nh2VwK.js} +2 -2
- package/dist/{BaseButton-Bf7IgH4E.js.map → BaseButton-D3Nh2VwK.js.map} +1 -1
- package/dist/{ChartCard-CACbKXZ7.js → ChartCard-BMfUGlQC.js} +13 -13
- package/dist/{ChartCard-CACbKXZ7.js.map → ChartCard-BMfUGlQC.js.map} +1 -1
- package/dist/{ComparisonPeriod.type.emb-Q_A2MmQY.js → ComparisonPeriod.type.emb-9nwxR9Tl.js} +2 -2
- package/dist/{ComparisonPeriod.type.emb-Q_A2MmQY.js.map → ComparisonPeriod.type.emb-9nwxR9Tl.js.map} +1 -1
- package/dist/ComparisonPeriodSelectFieldPro.js +4 -4
- package/dist/DateRangeSelectFieldPro.js +2 -2
- package/dist/DonutChartPro.js +2 -2
- package/dist/DonutLabelChartPro.js +2 -2
- package/dist/{EditorCard-CNU8sUaR.js → EditorCard-tBhUO9qV.js} +9 -9
- package/dist/{EditorCard-CNU8sUaR.js.map → EditorCard-tBhUO9qV.js.map} +1 -1
- package/dist/{KpiChart-C-SmtMQp.js → KpiChart-CqS9-4MK.js} +2 -2
- package/dist/{KpiChart-C-SmtMQp.js.map → KpiChart-CqS9-4MK.js.map} +1 -1
- package/dist/KpiChartNumberComparisonPro.js +39 -39
- package/dist/KpiChartNumberComparisonPro.js.map +1 -1
- package/dist/KpiChartNumberPro.js +4 -4
- package/dist/LineChartComparisonDefaultPro.js +5 -5
- package/dist/LineChartDefaultPro.js +3 -3
- package/dist/LineChartGroupedPro.js +3 -3
- package/dist/MultiSelectFieldPro.js +2 -2
- package/dist/PieChartPro.js +2 -2
- package/dist/SingleSelectField-BwQahxL2.js +96 -0
- package/dist/SingleSelectField-BwQahxL2.js.map +1 -0
- package/dist/SingleSelectFieldPro.js +2 -2
- package/dist/{bars.utils-BaxcPPid.js → bars.utils-BS6hyz6a.js} +4 -4
- package/dist/{bars.utils-BaxcPPid.js.map → bars.utils-BS6hyz6a.js.map} +1 -1
- package/dist/{charts.utils-CQtEx-IN.js → charts.utils-CtjnpTZZ.js} +3 -3
- package/dist/{charts.utils-CQtEx-IN.js.map → charts.utils-CtjnpTZZ.js.map} +1 -1
- package/dist/{component.constants-B1QqUi2G.js → component.constants-BtSbiLSA.js} +1676 -1659
- package/dist/component.constants-BtSbiLSA.js.map +1 -0
- package/dist/embeddable-components.json +12 -12
- package/dist/{formatter.utils-B3HZzPUm.js → formatter.utils-DsSqaQLy.js} +2 -2
- package/dist/{formatter.utils-B3HZzPUm.js.map → formatter.utils-DsSqaQLy.js.map} +1 -1
- package/dist/index-0EU9wBvd.js +210 -0
- package/dist/index-0EU9wBvd.js.map +1 -0
- package/dist/{index-DyMUkLDE.js → index-BFMal406.js} +8 -8
- package/dist/{index-DyMUkLDE.js.map → index-BFMal406.js.map} +1 -1
- package/dist/{index-Fs7N8msy.js → index-Bgt_jnmA.js} +13 -13
- package/dist/{index-Fs7N8msy.js.map → index-Bgt_jnmA.js.map} +1 -1
- package/dist/{index-SdQVlaEz.js → index-CVNg2zPD.js} +11 -11
- package/dist/{index-SdQVlaEz.js.map → index-CVNg2zPD.js.map} +1 -1
- package/dist/{index-Dye21BCa.js → index-CuyqPNAk.js} +5 -5
- package/dist/{index-Dye21BCa.js.map → index-CuyqPNAk.js.map} +1 -1
- package/dist/{index-DXHlr-gm.js → index-Fhr_BPX0.js} +4 -4
- package/dist/{index-DXHlr-gm.js.map → index-Fhr_BPX0.js.map} +1 -1
- package/dist/index.js +100 -99
- package/dist/{pies.utils-CPE4fxFn.js → pies.utils-DCRmuFgI.js} +4 -4
- package/dist/{pies.utils-CPE4fxFn.js.map → pies.utils-DCRmuFgI.js.map} +1 -1
- package/dist/remarkable-ui/editors/InputField/InputField.d.ts +4 -0
- package/dist/remarkable-ui/editors/InputField/InputField.d.ts.map +1 -1
- package/dist/remarkable-ui/editors/NumberField/NumberField.d.ts +2 -0
- package/dist/remarkable-ui/editors/NumberField/NumberField.d.ts.map +1 -1
- package/dist/remarkable-ui/editors/NumberField/NumberField.stories.d.ts +4 -0
- package/dist/remarkable-ui/editors/NumberField/NumberField.stories.d.ts.map +1 -1
- package/dist/remarkable-ui/editors/TextField/TextField.d.ts +2 -0
- package/dist/remarkable-ui/editors/TextField/TextField.d.ts.map +1 -1
- package/dist/remarkable-ui/editors/TextField/TextField.stories.d.ts +5 -0
- package/dist/remarkable-ui/editors/TextField/TextField.stories.d.ts.map +1 -1
- package/dist/remarkable-ui/editors/select/MultiSelectField/MultiSelectField.d.ts +2 -0
- package/dist/remarkable-ui/editors/select/MultiSelectField/MultiSelectField.d.ts.map +1 -1
- package/dist/remarkable-ui/editors/select/MultiSelectField/MultiSelectField.stories.d.ts +2 -0
- package/dist/remarkable-ui/editors/select/MultiSelectField/MultiSelectField.stories.d.ts.map +1 -1
- package/dist/remarkable-ui/editors/select/SingleSelectField/SingleSelectField.d.ts +2 -0
- package/dist/remarkable-ui/editors/select/SingleSelectField/SingleSelectField.d.ts.map +1 -1
- package/dist/remarkable-ui/editors/select/SingleSelectField/SingleSelectField.stories.d.ts +2 -0
- package/dist/remarkable-ui/editors/select/SingleSelectField/SingleSelectField.stories.d.ts.map +1 -1
- package/dist/remarkable-ui/editors/select/shared/SelectButton/SelectButton.d.ts +1 -0
- package/dist/remarkable-ui/editors/select/shared/SelectButton/SelectButton.d.ts.map +1 -1
- package/dist/remarkable-ui/index.d.ts +1 -0
- package/dist/remarkable-ui/index.d.ts.map +1 -1
- package/dist/remarkable-ui/shared/FieldErrorMessage/FieldErrorMessage.d.ts +5 -0
- package/dist/remarkable-ui/shared/FieldErrorMessage/FieldErrorMessage.d.ts.map +1 -0
- package/dist/remarkable-ui.css +1 -1
- package/dist/{timeRange.utils-C0iy3N-l.js → timeRange.utils-CWIlCcfG.js} +2 -2
- package/dist/{timeRange.utils-C0iy3N-l.js.map → timeRange.utils-CWIlCcfG.js.map} +1 -1
- package/package.json +1 -1
- package/dist/SingleSelectField-AZ79m6bQ.js +0 -88
- package/dist/SingleSelectField-AZ79m6bQ.js.map +0 -1
- package/dist/component.constants-B1QqUi2G.js.map +0 -1
- package/dist/index-BcXLOYYi.js +0 -203
- package/dist/index-BcXLOYYi.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-
|
|
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-BtSbiLSA.js";
|
|
2
2
|
import { useTheme as W, defineComponent as _ } from "@embeddable.com/react";
|
|
3
|
-
import { C as q } from "./ChartCard-
|
|
4
|
-
import { g as J, a as K, B as N } from "./bars.utils-
|
|
3
|
+
import { C as q } from "./ChartCard-BMfUGlQC.js";
|
|
4
|
+
import { g as J, a as K, B as N } from "./bars.utils-BS6hyz6a.js";
|
|
5
5
|
import { u as Q } from "./charts.newFillGaps.hooks-8oF8pYjr.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-
|
|
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-BtSbiLSA.js";
|
|
2
2
|
import { useTheme as W, defineComponent as _ } from "@embeddable.com/react";
|
|
3
|
-
import { C as H } from "./ChartCard-
|
|
4
|
-
import { g as J, a as K, B as N } from "./bars.utils-
|
|
3
|
+
import { C as H } from "./ChartCard-BMfUGlQC.js";
|
|
4
|
+
import { g as J, a as K, B as N } from "./bars.utils-BS6hyz6a.js";
|
|
5
5
|
import { u as Q } from "./charts.newFillGaps.hooks-8oF8pYjr.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-
|
|
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-BtSbiLSA.js";
|
|
2
2
|
import { useTheme as q, defineComponent as J } from "@embeddable.com/react";
|
|
3
|
-
import { C as K } from "./ChartCard-
|
|
4
|
-
import { b as N, a as Q, B as U } from "./bars.utils-
|
|
3
|
+
import { C as K } from "./ChartCard-BMfUGlQC.js";
|
|
4
|
+
import { b as N, a as Q, B as U } from "./bars.utils-BS6hyz6a.js";
|
|
5
5
|
import { u as X } from "./charts.newFillGaps.hooks-8oF8pYjr.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-
|
|
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-BtSbiLSA.js";
|
|
2
2
|
import { useTheme as H, defineComponent as J } from "@embeddable.com/react";
|
|
3
|
-
import { C as K } from "./ChartCard-
|
|
4
|
-
import { b as N, a as Q, B as U } from "./bars.utils-
|
|
3
|
+
import { C as K } from "./ChartCard-BMfUGlQC.js";
|
|
4
|
+
import { b as N, a as Q, B as U } from "./bars.utils-BS6hyz6a.js";
|
|
5
5
|
import { u as Y } from "./charts.newFillGaps.hooks-8oF8pYjr.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-
|
|
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-BtSbiLSA.js";
|
|
2
2
|
import { useTheme as J, defineComponent as K } from "@embeddable.com/react";
|
|
3
|
-
import { C as N } from "./ChartCard-
|
|
4
|
-
import { b as Q, a as U, B as X } from "./bars.utils-
|
|
3
|
+
import { C as N } from "./ChartCard-BMfUGlQC.js";
|
|
4
|
+
import { b as Q, a as U, B as X } from "./bars.utils-BS6hyz6a.js";
|
|
5
5
|
import { u as Z } from "./charts.newFillGaps.hooks-8oF8pYjr.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-
|
|
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-BtSbiLSA.js";
|
|
2
2
|
import { useTheme as J, defineComponent as K } from "@embeddable.com/react";
|
|
3
|
-
import { C as N } from "./ChartCard-
|
|
4
|
-
import { b as Q, a as U, B as Y } from "./bars.utils-
|
|
3
|
+
import { C as N } from "./ChartCard-BMfUGlQC.js";
|
|
4
|
+
import { b as Q, a as U, B as Y } from "./bars.utils-BS6hyz6a.js";
|
|
5
5
|
import { u as Z } from "./charts.newFillGaps.hooks-8oF8pYjr.js";
|
|
6
6
|
const $ = (a) => {
|
|
7
7
|
var n, l;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as c, a6 as e } from "./component.constants-
|
|
1
|
+
import { j as c, a6 as e } from "./component.constants-BtSbiLSA.js";
|
|
2
2
|
const m = "_baseButton_zbrmc_1", _ = "_primary_zbrmc_15", i = "_secondary_zbrmc_34", b = "_icon_zbrmc_55", s = {
|
|
3
3
|
baseButton: m,
|
|
4
4
|
primary: _,
|
|
@@ -21,4 +21,4 @@ const m = "_baseButton_zbrmc_1", _ = "_primary_zbrmc_15", i = "_secondary_zbrmc_
|
|
|
21
21
|
export {
|
|
22
22
|
y as B
|
|
23
23
|
};
|
|
24
|
-
//# sourceMappingURL=BaseButton-
|
|
24
|
+
//# sourceMappingURL=BaseButton-D3Nh2VwK.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseButton-
|
|
1
|
+
{"version":3,"file":"BaseButton-D3Nh2VwK.js","sources":["../src/remarkable-ui/shared/BaseButton/BaseButton.tsx"],"sourcesContent":["import clsx from 'clsx';\nimport React from 'react';\nimport styles from './BaseButton.module.css';\n\nexport type BaseButtonProps = {\n variant?: 'primary' | 'secondary';\n size?: 'small' | 'medium';\n ref?: React.Ref<HTMLButtonElement>;\n} & React.ButtonHTMLAttributes<HTMLButtonElement>;\n\nexport const BaseButton: React.FC<BaseButtonProps> = ({\n variant = 'primary',\n size = 'medium',\n className,\n children,\n ...props\n}) => {\n return (\n <button\n className={clsx(styles.baseButton, styles[variant], styles[size], className)}\n {...props}\n >\n {children}\n </button>\n );\n};\n"],"names":["BaseButton","variant","size","className","children","props","jsx","clsx","styles"],"mappings":";;;;;;GAUaA,IAAwC,CAAC;AAAA,EACpD,SAAAC,IAAU;AAAA,EACV,MAAAC,IAAO;AAAA,EACP,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,GAAGC;AACL,MAEIC,gBAAAA,EAAAA;AAAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWC,EAAKC,EAAO,YAAYA,EAAOP,CAAO,GAAGO,EAAON,CAAI,GAAGC,CAAS;AAAA,IAC1E,GAAGE;AAAA,IAEH,UAAAD;AAAA,EAAA;AAAA;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a4 as p, j as t, a6 as k,
|
|
2
|
-
import
|
|
1
|
+
import { a4 as p, j as t, a6 as k, aC as y, i as x, ae as v, ah as N, U as l, af as B, a8 as I, a9 as L, ab as S, ac as g, aD as D } from "./component.constants-BtSbiLSA.js";
|
|
2
|
+
import R, { useRef as M } from "react";
|
|
3
3
|
import { useTheme as f } from "@embeddable.com/react";
|
|
4
|
-
import { B as $ } from "./BaseButton-
|
|
4
|
+
import { B as $ } from "./BaseButton-D3Nh2VwK.js";
|
|
5
5
|
/**
|
|
6
6
|
* @license @tabler/icons-react v3.34.1 - MIT
|
|
7
7
|
*
|
|
@@ -25,7 +25,7 @@ const b = [["path", { d: "M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0", key: "svg-0
|
|
|
25
25
|
var i, c;
|
|
26
26
|
const n = f();
|
|
27
27
|
x(n);
|
|
28
|
-
const [o, e] =
|
|
28
|
+
const [o, e] = R.useState(!1), r = ((c = (i = n.charts) == null ? void 0 : i.chartCardMenuPro) == null ? void 0 : c.options) ?? [];
|
|
29
29
|
if (r.length === 0)
|
|
30
30
|
return null;
|
|
31
31
|
const d = (s) => {
|
|
@@ -41,14 +41,14 @@ const b = [["path", { d: "M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0", key: "svg-0
|
|
|
41
41
|
side: "bottom",
|
|
42
42
|
align: "end",
|
|
43
43
|
triggerComponent: o ? /* @__PURE__ */ t.jsx(j, {}) : /* @__PURE__ */ t.jsx(V, { icon: T }),
|
|
44
|
-
children: /* @__PURE__ */ t.jsx(
|
|
45
|
-
const
|
|
44
|
+
children: /* @__PURE__ */ t.jsx(N, { className: G.list, autoFocus: !0, children: r.map((s, m) => {
|
|
45
|
+
const C = l.t(s.labelKey);
|
|
46
46
|
return /* @__PURE__ */ t.jsx(
|
|
47
|
-
|
|
47
|
+
B,
|
|
48
48
|
{
|
|
49
|
-
label:
|
|
49
|
+
label: C,
|
|
50
50
|
onClick: () => h(s.onClick),
|
|
51
|
-
startIcon: s.iconSrc ? /* @__PURE__ */ t.jsx("img", { src: s.iconSrc, alt: `${
|
|
51
|
+
startIcon: s.iconSrc ? /* @__PURE__ */ t.jsx("img", { src: s.iconSrc, alt: `${C} icon` }) : void 0
|
|
52
52
|
},
|
|
53
53
|
m
|
|
54
54
|
);
|
|
@@ -67,15 +67,15 @@ const b = [["path", { d: "M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0", key: "svg-0
|
|
|
67
67
|
const i = f();
|
|
68
68
|
x(i);
|
|
69
69
|
const c = M(null), s = e.data && e.data.length > 0, m = () => !s && e.isLoading ? /* @__PURE__ */ t.jsx(w, {}) : r ? /* @__PURE__ */ t.jsx(
|
|
70
|
-
|
|
70
|
+
g,
|
|
71
71
|
{
|
|
72
72
|
className: u.error,
|
|
73
|
-
icon:
|
|
73
|
+
icon: D,
|
|
74
74
|
title: l.t("charts.errorTitle"),
|
|
75
75
|
message: r
|
|
76
76
|
}
|
|
77
77
|
) : s ? o : /* @__PURE__ */ t.jsx(
|
|
78
|
-
|
|
78
|
+
g,
|
|
79
79
|
{
|
|
80
80
|
title: l.t("charts.emptyTitle"),
|
|
81
81
|
message: l.t("charts.emptyMessage")
|
|
@@ -106,4 +106,4 @@ export {
|
|
|
106
106
|
V as I,
|
|
107
107
|
w as S
|
|
108
108
|
};
|
|
109
|
-
//# sourceMappingURL=ChartCard-
|
|
109
|
+
//# sourceMappingURL=ChartCard-BMfUGlQC.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChartCard-CACbKXZ7.js","sources":["../node_modules/@tabler/icons-react/dist/esm/icons/IconDotsVertical.mjs","../src/remarkable-ui/shared/Skeleton/Skeleton.tsx","../src/remarkable-ui/shared/IconButton/IconButton.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.34.1 - 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 clsx from 'clsx';\nimport React from 'react';\nimport styles from './IconButton.module.css';\nimport { TablerIcon } from '@tabler/icons-react';\nimport { BaseButton, type BaseButtonProps } from '../BaseButton';\n\ntype IconButtonProps = Omit<BaseButtonProps, 'variant'> & {\n className?: string;\n icon: TablerIcon;\n};\n\nexport const IconButton: React.FC<IconButtonProps> = ({ icon: Icon, className, ...props }) => {\n return (\n <BaseButton variant=\"secondary\" className={clsx(styles.iconButton, className)} {...props}>\n <Icon className={styles.icon} />\n </BaseButton>\n );\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 setIsLoading(true);\n setTimeout(() => {\n Promise.resolve(onClick()).finally(() => setIsLoading(false));\n }, 100);\n };\n\n const handleExport = (onClick: (props: ChartCardMenuProOptionOnClickProps) => void) => {\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, FC, 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';\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};\n\nexport const ChartCard: FC<ChartCardProps> = ({\n title,\n subtitle,\n children,\n data,\n errorMessage,\n dimensionsAndMeasures = [],\n ...props\n}) => {\n const theme: Theme = useTheme() as Theme;\n i18nSetup(theme);\n\n const chartRef = useRef<HTMLDivElement>(null);\n\n const hasData = data.data && data.data.length > 0;\n\n const getDisplay = () => {\n if (!hasData && data.isLoading) {\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 ref={chartRef} className={styles.chartCard} {...props}>\n <CardHeader\n title={title}\n subtitle={subtitle}\n rightContent={\n <div data-no-export className={styles.rightContent}>\n {data.isLoading ? (\n <ChartCardLoading />\n ) : (\n <ChartCardMenuPro\n title={title}\n containerRef={chartRef}\n data={data.data}\n dimensionsAndMeasures={dimensionsAndMeasures}\n />\n )}\n </div>\n }\n />\n\n <CardContent>{getDisplay()}</CardContent>\n </Card>\n );\n};\n"],"names":["__iconNode","IconDotsVertical","createReactComponent","Skeleton","jsx","styles","IconButton","Icon","className","props","BaseButton","clsx","ChartCardLoading","IconLoader2","ChartCardMenuPro","theme","useTheme","i18nSetup","isLoading","setIsLoading","React","options","_b","_a","startAction","onClick","handleExport","Dropdown","SelectList","option","index","label","i18n","SelectListOption","ChartCard","title","subtitle","children","data","errorMessage","dimensionsAndMeasures","chartRef","useRef","hasData","getDisplay","CardContentInfo","IconAlertCircle","jsxs","Card","CardHeader","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;;;GCQ7BC,IAAwC,CAAC,EAAE,MAAMC,GAAM,WAAAC,GAAW,GAAGC,8BAE7EC,GAAA,EAAW,SAAQ,aAAY,WAAWC,EAAKN,EAAO,YAAYG,CAAS,GAAI,GAAGC,GACjF,UAAAL,gBAAAA,EAAAA,IAACG,KAAK,WAAWF,EAAO,MAAM,GAChC;;;;;;GCZSO,IAAmB,MAAMR,gBAAAA,EAAAA,IAACS,GAAA,EAAY,WA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K;AAAA,YACX,uBAAAE;AAAA,UAAA;AAAA,QAAA,EACF,CAEJ;AAAA,MAAA;AAAA,IAAA;AAAA,IAIJpC,gBAAAA,EAAAA,IAAC8C,GAAA,EAAa,UAAAN,EAAA,EAAW,CAAE;AAAA,EAAA,GAC7B;AAEJ;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"ChartCard-BMfUGlQC.js","sources":["../node_modules/@tabler/icons-react/dist/esm/icons/IconDotsVertical.mjs","../src/remarkable-ui/shared/Skeleton/Skeleton.tsx","../src/remarkable-ui/shared/IconButton/IconButton.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.34.1 - 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 clsx from 'clsx';\nimport React from 'react';\nimport styles from './IconButton.module.css';\nimport { TablerIcon } from '@tabler/icons-react';\nimport { BaseButton, type BaseButtonProps } from '../BaseButton';\n\ntype IconButtonProps = Omit<BaseButtonProps, 'variant'> & {\n className?: string;\n icon: TablerIcon;\n};\n\nexport const IconButton: React.FC<IconButtonProps> = ({ icon: Icon, className, ...props }) => {\n return (\n <BaseButton variant=\"secondary\" className={clsx(styles.iconButton, className)} {...props}>\n <Icon className={styles.icon} />\n </BaseButton>\n );\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 setIsLoading(true);\n setTimeout(() => {\n Promise.resolve(onClick()).finally(() => setIsLoading(false));\n }, 100);\n };\n\n const handleExport = (onClick: (props: ChartCardMenuProOptionOnClickProps) => void) => {\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, FC, 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';\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};\n\nexport const ChartCard: FC<ChartCardProps> = ({\n title,\n subtitle,\n children,\n data,\n errorMessage,\n dimensionsAndMeasures = [],\n ...props\n}) => {\n const theme: Theme = useTheme() as Theme;\n i18nSetup(theme);\n\n const chartRef = useRef<HTMLDivElement>(null);\n\n const hasData = data.data && data.data.length > 0;\n\n const getDisplay = () => {\n if (!hasData && data.isLoading) {\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 ref={chartRef} className={styles.chartCard} {...props}>\n <CardHeader\n title={title}\n subtitle={subtitle}\n rightContent={\n <div data-no-export className={styles.rightContent}>\n {data.isLoading ? (\n <ChartCardLoading />\n ) : (\n <ChartCardMenuPro\n title={title}\n containerRef={chartRef}\n data={data.data}\n dimensionsAndMeasures={dimensionsAndMeasures}\n />\n )}\n </div>\n }\n />\n\n <CardContent>{getDisplay()}</CardContent>\n </Card>\n );\n};\n"],"names":["__iconNode","IconDotsVertical","createReactComponent","Skeleton","jsx","styles","IconButton","Icon","className","props","BaseButton","clsx","ChartCardLoading","IconLoader2","ChartCardMenuPro","theme","useTheme","i18nSetup","isLoading","setIsLoading","React","options","_b","_a","startAction","onClick","handleExport","Dropdown","SelectList","option","index","label","i18n","SelectListOption","ChartCard","title","subtitle","children","data","errorMessage","dimensionsAndMeasures","chartRef","useRef","hasData","getDisplay","CardContentInfo","IconAlertCircle","jsxs","Card","CardHeader","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;;;GCQ7BC,IAAwC,CAAC,EAAE,MAAMC,GAAM,WAAAC,GAAW,GAAGC,8BAE7EC,GAAA,EAAW,SAAQ,aAAY,WAAWC,EAAKN,EAAO,YAAYG,CAAS,GAAI,GAAGC,GACjF,UAAAL,gBAAAA,EAAAA,IAACG,KAAK,WAAWF,EAAO,MAAM,GAChC;;;;;;GCZSO,IAAmB,MAAMR,gBAAAA,EAAAA,IAACS,GAAA,EAAY,WAAWR,EAAO,SAAS;;GCcjES,IAAoD,CAACL,MAAU;;AAC1E,QAAMM,IAAeC,EAAA;AACrB,EAAAC,EAAUF,CA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gBAAAA,EAAAA,IAAC8C,GAAA,EAAa,UAAAN,EAAA,EAAW,CAAE;AAAA,EAAA,GAC7B;AAEJ;","x_google_ignoreList":[0]}
|
package/dist/{ComparisonPeriod.type.emb-Q_A2MmQY.js → ComparisonPeriod.type.emb-9nwxR9Tl.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { aE as i, aF as o } from "./component.constants-BtSbiLSA.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-
|
|
14
|
+
//# sourceMappingURL=ComparisonPeriod.type.emb-9nwxR9Tl.js.map
|
package/dist/{ComparisonPeriod.type.emb-Q_A2MmQY.js.map → ComparisonPeriod.type.emb-9nwxR9Tl.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComparisonPeriod.type.emb-
|
|
1
|
+
{"version":3,"file":"ComparisonPeriod.type.emb-9nwxR9Tl.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 { a4 as y, a2 as P, i as f, r as b, j as l, U as C, t as S, c as F, a5 as R, V as d } from "./component.constants-
|
|
2
|
+
import { a4 as y, a2 as P, i as f, r as b, j as l, U as C, t as S, c as F, a5 as R, V as d } from "./component.constants-BtSbiLSA.js";
|
|
3
3
|
import { useMemo as M, useEffect as k } from "react";
|
|
4
|
-
import { S as D } from "./SingleSelectField-
|
|
4
|
+
import { S as D } from "./SingleSelectField-BwQahxL2.js";
|
|
5
5
|
import { g as T, u as j, a as x } from "./editors.timeRange.utils-CteuBPel.js";
|
|
6
|
-
import { E as L } from "./EditorCard-
|
|
7
|
-
import { C as s } from "./ComparisonPeriod.type.emb-
|
|
6
|
+
import { E as L } from "./EditorCard-tBhUO9qV.js";
|
|
7
|
+
import { C as s } from "./ComparisonPeriod.type.emb-9nwxR9Tl.js";
|
|
8
8
|
/**
|
|
9
9
|
* @license @tabler/icons-react v3.34.1 - 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, a5 as r, V as a } from "./component.constants-
|
|
3
|
-
import { D as o } from "./index-
|
|
2
|
+
import { t as l, c as n, a5 as r, V as a } from "./component.constants-BtSbiLSA.js";
|
|
3
|
+
import { D as o } from "./index-Fhr_BPX0.js";
|
|
4
4
|
const i = {
|
|
5
5
|
name: "DateRangeSelectFieldPro",
|
|
6
6
|
label: "Date Range Select Field",
|
package/dist/DonutChartPro.js
CHANGED
|
@@ -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-
|
|
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-BtSbiLSA.js";
|
|
2
2
|
import { defineComponent as c } from "@embeddable.com/react";
|
|
3
|
-
import { D as p } from "./index-
|
|
3
|
+
import { D as p } from "./index-BFMal406.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-
|
|
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-
|
|
1
|
+
import { D as n } from "./index-Bgt_jnmA.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-BtSbiLSA.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 { a4 as l, j as r, a6 as u, i as m, a8 as p, a9 as _, ab as x, ac as
|
|
1
|
+
import { a4 as l, j as r, a6 as u, i as m, a8 as p, a9 as _, ab as x, ac as f, U as h, aD as C } from "./component.constants-BtSbiLSA.js";
|
|
2
2
|
import { useEffect as j } from "react";
|
|
3
3
|
import { useTheme as S } from "@embeddable.com/react";
|
|
4
4
|
/**
|
|
@@ -11,7 +11,7 @@ const b = [["path", { d: "M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0", key: "svg
|
|
|
11
11
|
listOptions: v,
|
|
12
12
|
disabled: y
|
|
13
13
|
}, k = ({ children: t, disabled: e, ...s }) => /* @__PURE__ */ r.jsx("div", { className: u(o.listOptions, e && o.disabled), ...s, children: t });
|
|
14
|
-
function
|
|
14
|
+
function D(t, e = 300) {
|
|
15
15
|
let s;
|
|
16
16
|
return (...a) => {
|
|
17
17
|
clearTimeout(s), s = setTimeout(() => {
|
|
@@ -19,7 +19,7 @@ function A(t, e = 300) {
|
|
|
19
19
|
}, e);
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
|
-
const
|
|
22
|
+
const A = (t, e) => {
|
|
23
23
|
j(() => {
|
|
24
24
|
t && setTimeout(() => {
|
|
25
25
|
var s;
|
|
@@ -39,11 +39,11 @@ const D = (t, e) => {
|
|
|
39
39
|
const i = S();
|
|
40
40
|
m(i);
|
|
41
41
|
const d = () => a ? /* @__PURE__ */ r.jsx(
|
|
42
|
-
|
|
42
|
+
f,
|
|
43
43
|
{
|
|
44
44
|
className: c.error,
|
|
45
|
-
icon:
|
|
46
|
-
title:
|
|
45
|
+
icon: C,
|
|
46
|
+
title: h.t("editors.errorTitle"),
|
|
47
47
|
message: a
|
|
48
48
|
}
|
|
49
49
|
) : s;
|
|
@@ -56,7 +56,7 @@ export {
|
|
|
56
56
|
H as E,
|
|
57
57
|
g as I,
|
|
58
58
|
k as S,
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
D as d,
|
|
60
|
+
A as u
|
|
61
61
|
};
|
|
62
|
-
//# sourceMappingURL=EditorCard-
|
|
62
|
+
//# sourceMappingURL=EditorCard-tBhUO9qV.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditorCard-
|
|
1
|
+
{"version":3,"file":"EditorCard-tBhUO9qV.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/utils/debounce.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.34.1 - 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","// 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 { 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","debounce","fn","delay","timer","args","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;ACZG,SAASM,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;ACVO,MAAMG,IAAuB,CAClCC,GACAC,MACG;AACH,EAAAC,EAAU,MAAM;AACd,IAAIF,KACF,WAAW,MAAM;;AACd,OAAAG,IAAAF,EAAe,YAAf,QAAAE,EAAwD;AAAA,IAC3D,GAAG,GAAG;AAAA,EAEV,GAAG,CAACH,GAAQC,CAAc,CAAC;AAC7B;;;GCEaG,IAAkC,CAAC;AAAA,EAC9C,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,UAAAlB;AAAA,EACA,cAAAmB;AAAA,EACA,GAAGjB;AACL,MAAM;AACJ,QAAMkB,IAAeC,EAAA;AACrB,EAAAC,EAAUF,CAAK;AAEf,QAAMG,IAAa,MACbJ,IAEAhB,gBAAAA,EAAAA;AAAAA,IAACqB;AAAA,IAAA;AAAA,MACC,WAAWnB,EAAO;AAAA,MAClB,MAAMoB;AAAA,MACN,OAAOC,EAAK,EAAE,oBAAoB;AAAA,MAClC,SAASP;AAAA,IAAA;AAAA,EAAA,IAKRnB;AAGT,gCACG2B,GAAA,EAAK,WAAWtB,EAAO,MAAO,GAAGH,GAChC,UAAA;AAAA,IAAAC,gBAAAA,EAAAA,IAACyB,GAAA,EAAW,OAAAX,GAAc,UAAAC,EAAA,CAAoB;AAAA,IAC9Cf,gBAAAA,EAAAA,IAAC0B,GAAA,EAAa,UAAAN,EAAA,EAAW,CAAE;AAAA,EAAA,GAC7B;AAEJ;","x_google_ignoreList":[0]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a4 as j, j as n, a6 as x, a7 as d } from "./component.constants-
|
|
1
|
+
import { a4 as j, j as n, a6 as x, a7 as d } from "./component.constants-BtSbiLSA.js";
|
|
2
2
|
/**
|
|
3
3
|
* @license @tabler/icons-react v3.34.1 - MIT
|
|
4
4
|
*
|
|
@@ -76,4 +76,4 @@ const m = [["path", { d: "M3 17l6 -6l4 4l8 -8", key: "svg-0" }], ["path", { d: "
|
|
|
76
76
|
export {
|
|
77
77
|
R as K
|
|
78
78
|
};
|
|
79
|
-
//# sourceMappingURL=KpiChart-
|
|
79
|
+
//# sourceMappingURL=KpiChart-CqS9-4MK.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KpiChart-
|
|
1
|
+
{"version":3,"file":"KpiChart-CqS9-4MK.js","sources":["../node_modules/@tabler/icons-react/dist/esm/icons/IconTrendingDown.mjs","../node_modules/@tabler/icons-react/dist/esm/icons/IconTrendingUp.mjs","../src/remarkable-ui/charts/kpis/components/KpiChartChange.tsx","../src/remarkable-ui/charts/kpis/KpiChart.tsx"],"sourcesContent":["/**\n * @license @tabler/icons-react v3.34.1 - 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\": \"M3 7l6 6l4 -4l8 8\", \"key\": \"svg-0\" }], [\"path\", { \"d\": \"M21 10l0 7l-7 0\", \"key\": \"svg-1\" }]];\nconst IconTrendingDown = createReactComponent(\"outline\", \"trending-down\", \"TrendingDown\", __iconNode);\n\nexport { __iconNode, IconTrendingDown as default };\n//# sourceMappingURL=IconTrendingDown.mjs.map\n","/**\n * @license @tabler/icons-react v3.34.1 - 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\": \"M3 17l6 -6l4 4l8 -8\", \"key\": \"svg-0\" }], [\"path\", { \"d\": \"M14 7l7 0l0 7\", \"key\": \"svg-1\" }]];\nconst IconTrendingUp = createReactComponent(\"outline\", \"trending-up\", \"TrendingUp\", __iconNode);\n\nexport { __iconNode, IconTrendingUp as default };\n//# sourceMappingURL=IconTrendingUp.mjs.map\n","import { FC } from 'react';\nimport styles from './KpiChartChange.module.css';\nimport clsx from 'clsx';\nimport { Typography } from '../../../shared/Typography/Typography';\nimport { IconTrendingDown, IconTrendingUp } from '@tabler/icons-react';\nimport { KpiChartProps } from '../KpiChart.types';\n\nconst getChangeClass = (isPositive: boolean, invertChangeColors: boolean) => {\n if (isPositive) return invertChangeColors ? styles.negative : styles.positive;\n return invertChangeColors ? styles.positive : styles.negative;\n};\n\ntype KpiChartChangeProps = KpiChartProps & { className?: string };\n\nexport const KpiChartChange: FC<KpiChartChangeProps> = ({\n value,\n comparisonValue = 0,\n showChangeAsPercentage,\n invertChangeColors = false,\n comparisonLabel,\n valueFormatter,\n percentageDecimalPlaces = 1,\n className,\n}) => {\n const difference = value - comparisonValue;\n const isPositive = difference > 0;\n\n let differenceLabel: string;\n\n if (showChangeAsPercentage) {\n const percentage = comparisonValue === 0 ? 0 : (difference / comparisonValue) * 100;\n differenceLabel = `${percentage.toFixed(percentageDecimalPlaces)}%`;\n } else {\n differenceLabel = valueFormatter ? valueFormatter(difference) : difference.toString();\n }\n\n const displayValue = `${isPositive ? '+' : ''}${differenceLabel}`;\n\n const Icon = isPositive ? IconTrendingUp : IconTrendingDown;\n\n return (\n <div className={clsx(className, styles.kpiChartChangeContainer)}>\n <div className={clsx(styles.kpiChangeBadge, getChangeClass(isPositive, invertChangeColors))}>\n <Icon />\n <Typography>{displayValue}</Typography>\n </div>\n {comparisonLabel && <Typography>{comparisonLabel}</Typography>}\n </div>\n );\n};\n","import { FC } from 'react';\nimport { Typography } from '../../shared/Typography/Typography';\nimport styles from './KpiChart.module.css';\nimport { KpiChartChange } from './components/KpiChartChange';\nimport { KpiChartProps } from './KpiChart.types';\nimport clsx from 'clsx';\n\nexport const KpiChart: FC<KpiChartProps> = ({\n value,\n changeFontSize,\n comparisonValue,\n comparisonLabel,\n invertChangeColors,\n showChangeAsPercentage,\n percentageDecimalPlaces = 1,\n equalComparisonLabel = 'No change',\n valueFontSize,\n valueFormatter,\n}) => {\n const hasComparisonValue = comparisonValue !== undefined;\n const equalComparison = hasComparisonValue && comparisonValue === value;\n\n const displayValue = valueFormatter ? valueFormatter(value) : value;\n\n return (\n <div className={styles.kpiChartContainer}>\n <Typography style={{ fontSize: valueFontSize }}>{displayValue}</Typography>\n <div className={styles.kpiComparisonContainer} style={{ fontSize: changeFontSize }}>\n {equalComparison ? (\n <Typography>{equalComparisonLabel}</Typography>\n ) : (\n <KpiChartChange\n changeFontSize={changeFontSize}\n className={clsx(!hasComparisonValue && styles.kpiChangeHidden)}\n comparisonLabel={comparisonLabel}\n comparisonValue={comparisonValue}\n invertChangeColors={invertChangeColors}\n percentageDecimalPlaces={percentageDecimalPlaces}\n showChangeAsPercentage={showChangeAsPercentage}\n value={value}\n valueFormatter={valueFormatter}\n />\n )}\n </div>\n </div>\n );\n};\n"],"names":["__iconNode","IconTrendingDown","createReactComponent","IconTrendingUp","getChangeClass","isPositive","invertChangeColors","styles","KpiChartChange","value","comparisonValue","showChangeAsPercentage","comparisonLabel","valueFormatter","percentageDecimalPlaces","className","difference","differenceLabel","displayValue","Icon","clsx","jsxs","jsx","Typography","KpiChart","changeFontSize","equalComparisonLabel","valueFontSize","hasComparisonValue","equalComparison"],"mappings":";AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMA,IAAa,CAAC,CAAC,QAAQ,EAAE,GAAK,qBAAqB,KAAO,QAAO,CAAE,GAAG,CAAC,QAAQ,EAAE,GAAK,mBAAmB,KAAO,QAAO,CAAE,CAAC,GAC1HC,IAAmBC,EAAqB,WAAW,iBAAiB,gBAAgBF,CAAU;ACVpG;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMA,IAAa,CAAC,CAAC,QAAQ,EAAE,GAAK,uBAAuB,KAAO,QAAO,CAAE,GAAG,CAAC,QAAQ,EAAE,GAAK,iBAAiB,KAAO,QAAO,CAAE,CAAC,GAC1HG,IAAiBD,EAAqB,WAAW,eAAe,cAAcF,CAAU;;;;;;;;;GCHxFI,IAAiB,CAACC,GAAqBC,MACvCD,IAAmBC,IAAqBC,EAAO,WAAWA,EAAO,WAC9DD,IAAqBC,EAAO,WAAWA,EAAO,UAK1CC,IAA0C,CAAC;AAAA,EACtD,OAAAC;AAAA,EACA,iBAAAC,IAAkB;AAAA,EAClB,wBAAAC;AA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AAC,OAAA,EAAI,WAAWd,EAAO,mBACrB,UAAA;AAAA,IAAAe,gBAAAA,MAACC,KAAW,OAAO,EAAE,UAAUI,EAAA,GAAkB,UAAAT,GAAa;AAAA,IAC9DI,gBAAAA,EAAAA,IAAC,OAAA,EAAI,WAAWf,EAAO,wBAAwB,OAAO,EAAE,UAAUkB,EAAA,GAC/D,UAAAI,IACCP,gBAAAA,MAACC,GAAA,EAAY,aAAqB,IAElCD,gBAAAA,EAAAA;AAAAA,MAACd;AAAA,MAAA;AAAA,QACC,gBAAAiB;AAAA,QACA,WAAWL,EAAK,CAACQ,KAAsBrB,EAAO,eAAe;AAAA,QAC7D,iBAAAK;AAAA,QACA,iBAAAF;AAAA,QACA,oBAAAJ;AAAA,QACA,yBAAAQ;AAAA,QACA,wBAAAH;AAAA,QACA,OAAAF;AAAA,QACA,gBAAAI;AAAA,MAAA;AAAA,IAAA,EACF,CAEJ;AAAA,EAAA,GACF;AAEJ;","x_google_ignoreList":[0,1]}
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import { useTheme as j, defineComponent as w } from "@embeddable.com/react";
|
|
2
|
-
import { i as A, r as Y, U as l, j as
|
|
3
|
-
import { C as O } from "./ChartCard-
|
|
2
|
+
import { i as A, r as Y, U as l, j as y, d as q, w as B, W as E, X as M, t as I, c as J, Y as b, Z as c, o as v } from "./component.constants-BtSbiLSA.js";
|
|
3
|
+
import { C as O } from "./ChartCard-BMfUGlQC.js";
|
|
4
4
|
import { useEffect as U } from "react";
|
|
5
|
-
import { K as W } from "./KpiChart-
|
|
6
|
-
import { g as X } from "./formatter.utils-
|
|
7
|
-
import { g as Z, a as $ } from "./timeRange.utils-
|
|
8
|
-
import { C as k } from "./ComparisonPeriod.type.emb-
|
|
5
|
+
import { K as W } from "./KpiChart-CqS9-4MK.js";
|
|
6
|
+
import { g as X } from "./formatter.utils-DsSqaQLy.js";
|
|
7
|
+
import { g as Z, a as $ } from "./timeRange.utils-CWIlCcfG.js";
|
|
8
|
+
import { C as k } from "./ComparisonPeriod.type.emb-9nwxR9Tl.js";
|
|
9
9
|
const G = (e) => {
|
|
10
|
-
var
|
|
10
|
+
var d, C, P, h, u, f;
|
|
11
11
|
const a = j();
|
|
12
12
|
A(a);
|
|
13
13
|
const { title: i, description: n } = Y(e), {
|
|
14
|
-
changeFontSize:
|
|
14
|
+
changeFontSize: D,
|
|
15
15
|
comparisonPeriod: s,
|
|
16
|
-
comparisonDateRange:
|
|
17
|
-
displayChangeAsPercentage:
|
|
18
|
-
fontSize:
|
|
16
|
+
comparisonDateRange: R,
|
|
17
|
+
displayChangeAsPercentage: N,
|
|
18
|
+
fontSize: S,
|
|
19
19
|
measure: t,
|
|
20
20
|
primaryDateRange: p,
|
|
21
|
-
results:
|
|
22
|
-
resultsComparison:
|
|
23
|
-
reversePositiveNegativeColors:
|
|
24
|
-
percentageDecimalPlaces:
|
|
25
|
-
setComparisonDateRange:
|
|
21
|
+
results: r,
|
|
22
|
+
resultsComparison: o,
|
|
23
|
+
reversePositiveNegativeColors: F,
|
|
24
|
+
percentageDecimalPlaces: z,
|
|
25
|
+
setComparisonDateRange: K
|
|
26
26
|
} = e;
|
|
27
27
|
U(() => {
|
|
28
28
|
const m = Z(
|
|
@@ -30,19 +30,19 @@ const G = (e) => {
|
|
|
30
30
|
s,
|
|
31
31
|
a
|
|
32
32
|
);
|
|
33
|
-
|
|
33
|
+
K(m);
|
|
34
34
|
}, [s, JSON.stringify(p), a]);
|
|
35
|
-
const
|
|
36
|
-
isLoading: !!(
|
|
37
|
-
data: !(
|
|
38
|
-
...(
|
|
39
|
-
...(
|
|
35
|
+
const L = (C = (d = r.data) == null ? void 0 : d[0]) == null ? void 0 : C[t.name], T = R ? (h = (P = o == null ? void 0 : o.data) == null ? void 0 : P[0]) == null ? void 0 : h[t.name] : void 0, V = X(a), x = (m) => V.data(t, m), _ = `vs ${$(s, a).toLowerCase()}`, g = {
|
|
36
|
+
isLoading: !!(r.isLoading || o != null && o.isLoading),
|
|
37
|
+
data: !(r != null && r.data) && !(o != null && o.data) ? void 0 : [
|
|
38
|
+
...(u = r.data) != null && u.length ? [{ label: l.t("charts.primaryPeriod"), ...r.data[0] }] : [],
|
|
39
|
+
...(f = o == null ? void 0 : o.data) != null && f.length ? [{ label: l.t("charts.comparisonPeriod"), ...o.data[0] }] : []
|
|
40
40
|
]
|
|
41
41
|
};
|
|
42
|
-
return /* @__PURE__ */
|
|
42
|
+
return /* @__PURE__ */ y.jsx(
|
|
43
43
|
O,
|
|
44
44
|
{
|
|
45
|
-
data:
|
|
45
|
+
data: g,
|
|
46
46
|
dimensionsAndMeasures: [
|
|
47
47
|
// Add a label dimension to distinguish primary and comparison periods in exports
|
|
48
48
|
{
|
|
@@ -53,21 +53,21 @@ const G = (e) => {
|
|
|
53
53
|
},
|
|
54
54
|
t
|
|
55
55
|
],
|
|
56
|
-
errorMessage:
|
|
56
|
+
errorMessage: r.error,
|
|
57
57
|
subtitle: n,
|
|
58
58
|
title: i,
|
|
59
|
-
children: /* @__PURE__ */
|
|
59
|
+
children: /* @__PURE__ */ y.jsx(
|
|
60
60
|
W,
|
|
61
61
|
{
|
|
62
|
-
value:
|
|
63
|
-
comparisonValue: T,
|
|
64
|
-
valueFormatter:
|
|
65
|
-
valueFontSize:
|
|
66
|
-
changeFontSize:
|
|
67
|
-
invertChangeColors:
|
|
68
|
-
showChangeAsPercentage:
|
|
69
|
-
comparisonLabel:
|
|
70
|
-
percentageDecimalPlaces:
|
|
62
|
+
value: L,
|
|
63
|
+
comparisonValue: g.isLoading ? void 0 : T,
|
|
64
|
+
valueFormatter: x,
|
|
65
|
+
valueFontSize: S,
|
|
66
|
+
changeFontSize: D,
|
|
67
|
+
invertChangeColors: F,
|
|
68
|
+
showChangeAsPercentage: N,
|
|
69
|
+
comparisonLabel: _,
|
|
70
|
+
percentageDecimalPlaces: z
|
|
71
71
|
}
|
|
72
72
|
)
|
|
73
73
|
}
|
|
@@ -97,7 +97,7 @@ const G = (e) => {
|
|
|
97
97
|
I,
|
|
98
98
|
J,
|
|
99
99
|
{
|
|
100
|
-
...
|
|
100
|
+
...b,
|
|
101
101
|
name: "displayChangeAsPercentage",
|
|
102
102
|
label: "Display Change as %",
|
|
103
103
|
defaultValue: !1
|
|
@@ -109,7 +109,7 @@ const G = (e) => {
|
|
|
109
109
|
defaultValue: 1
|
|
110
110
|
},
|
|
111
111
|
{
|
|
112
|
-
...
|
|
112
|
+
...b,
|
|
113
113
|
name: "reversePositiveNegativeColors",
|
|
114
114
|
label: "Reverse Positive/Negative Colors",
|
|
115
115
|
defaultValue: !1
|
|
@@ -129,7 +129,7 @@ const G = (e) => {
|
|
|
129
129
|
...e,
|
|
130
130
|
comparisonDateRange: a == null ? void 0 : a.comparisonDateRange,
|
|
131
131
|
setComparisonDateRange: (n) => i({ comparisonDateRange: n }),
|
|
132
|
-
results:
|
|
132
|
+
results: v({
|
|
133
133
|
from: e.dataset,
|
|
134
134
|
select: [e.measure],
|
|
135
135
|
limit: 1,
|
|
@@ -141,7 +141,7 @@ const G = (e) => {
|
|
|
141
141
|
}
|
|
142
142
|
] : void 0
|
|
143
143
|
}),
|
|
144
|
-
resultsComparison: e.primaryDateRange && e.timeProperty && (a != null && a.comparisonDateRange) ?
|
|
144
|
+
resultsComparison: e.primaryDateRange && e.timeProperty && (a != null && a.comparisonDateRange) ? v({
|
|
145
145
|
from: e.dataset,
|
|
146
146
|
select: [e.measure],
|
|
147
147
|
limit: 1,
|