@embeddable.com/remarkable-pro 0.0.11 → 0.0.13
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/{ChartCard-uZBftDKk.js → ChartCard-DaUtlchs.js} +19 -19
- package/dist/{ChartCard-uZBftDKk.js.map → ChartCard-DaUtlchs.js.map} +1 -1
- package/dist/{Color.type.emb-BPT7WKyR.js → Color.type.emb-DFhAaPXz.js} +2 -2
- package/dist/{Color.type.emb-BPT7WKyR.js.map → Color.type.emb-DFhAaPXz.js.map} +1 -1
- package/dist/ColorEditor.js +2 -2
- package/dist/{ComparisonPeriod.type.emb-Bq4r1RbE.js → ComparisonPeriod.type.emb-C-YdNTEB.js} +2 -2
- package/dist/{ComparisonPeriod.type.emb-Bq4r1RbE.js.map → ComparisonPeriod.type.emb-C-YdNTEB.js.map} +1 -1
- package/dist/ComparisonPeriodSelectFieldPro.js +4 -4
- package/dist/DateRangePickerCustomPro.js +89 -0
- package/dist/DateRangePickerCustomPro.js.map +1 -0
- package/dist/DateRangeSelectFieldPro.js +26 -18
- package/dist/DateRangeSelectFieldPro.js.map +1 -1
- package/dist/DonutChartPro.js +3 -3
- package/dist/DonutLabelChartPro.js +3 -3
- package/dist/{EditorCard-B95YC3pz.js → EditorCard-DXQeyo3r.js} +6 -6
- package/dist/{EditorCard-B95YC3pz.js.map → EditorCard-DXQeyo3r.js.map} +1 -1
- package/dist/HeatMapPro.js +4 -4
- package/dist/KpiChartNumberComparisonPro.js +4 -4
- package/dist/KpiChartNumberPro.js +3 -3
- package/dist/LineChartComparisonDefaultPro.js +5 -5
- package/dist/LineChartDefaultPro.js +4 -4
- package/dist/LineChartGroupedPro.js +3 -3
- package/dist/MultiSelectFieldPro.js +3 -3
- package/dist/PieChartPro.js +3 -3
- package/dist/PivotTablePro.js +3 -3
- package/dist/SingleSelectFieldPro.js +3 -3
- package/dist/TableChartPaginated.js +3 -3
- package/dist/{bars.utils-BHrcAtuH.js → bars.utils-C45cnEfc.js} +4 -4
- package/dist/{bars.utils-BHrcAtuH.js.map → bars.utils-C45cnEfc.js.map} +1 -1
- package/dist/charts.fillGaps.hooks-zCMYcjxz.js +65 -0
- package/dist/charts.fillGaps.hooks-zCMYcjxz.js.map +1 -0
- package/dist/{charts.utils-DtFuEHDp.js → charts.utils-D_9y_kjG.js} +918 -880
- package/dist/charts.utils-D_9y_kjG.js.map +1 -0
- package/dist/{component.constants-DmK3uQGY.js → component.constants-DJqBv0qe.js} +2 -2
- package/dist/{component.constants-DmK3uQGY.js.map → component.constants-DJqBv0qe.js.map} +1 -1
- package/dist/components/charts/charts.fillGaps.hooks.d.ts.map +1 -1
- package/dist/components/editors/ComparisonPeriodSelectFieldPro/index.d.ts.map +1 -1
- package/dist/components/editors/dates/DateRangePickerCustomPro/index.d.ts +13 -0
- package/dist/components/editors/dates/DateRangePickerCustomPro/index.d.ts.map +1 -0
- package/dist/components/editors/{DateRangeSelectFieldPro/DateRangeSelectFieldPro.types.d.ts → dates/DateRangePickerPresetsPro/DateRangePickerPresetsPro.types.d.ts} +1 -1
- package/dist/components/editors/dates/DateRangePickerPresetsPro/DateRangePickerPresetsPro.types.d.ts.map +1 -0
- package/dist/components/editors/{DateRangeSelectFieldPro/DateRangeSelectFieldPro.utils.d.ts → dates/DateRangePickerPresetsPro/DateRangePickerPresetsPro.utils.d.ts} +2 -2
- package/dist/components/editors/dates/DateRangePickerPresetsPro/DateRangePickerPresetsPro.utils.d.ts.map +1 -0
- package/dist/components/editors/dates/DateRangePickerPresetsPro/index.d.ts +14 -0
- package/dist/components/editors/dates/DateRangePickerPresetsPro/index.d.ts.map +1 -0
- package/dist/components/editors/dates/dates.utils.d.ts +8 -0
- package/dist/components/editors/dates/dates.utils.d.ts.map +1 -0
- package/dist/{editors.timeRange.utils-DTtRGaCo.js → dates.utils-f-XJ_LBg.js} +49 -28
- package/dist/dates.utils-f-XJ_LBg.js.map +1 -0
- package/dist/embeddable-components.json +11 -10
- package/dist/embeddable-theme-0137e.js +756 -718
- package/dist/{formatter.utils-DCDukEZ9.js → formatter.utils-BRMB8qAc.js} +2 -2
- package/dist/{formatter.utils-DCDukEZ9.js.map → formatter.utils-BRMB8qAc.js.map} +1 -1
- package/dist/{index-C23J5jXR.js → index-BEwcJPua.js} +5 -5
- package/dist/{index-C23J5jXR.js.map → index-BEwcJPua.js.map} +1 -1
- package/dist/index-BIiign0L.js +62054 -0
- package/dist/index-BIiign0L.js.map +1 -0
- package/dist/{index-C7mz7pKQ.js → index-Ba6ziHiQ.js} +24 -21
- package/dist/index-Ba6ziHiQ.js.map +1 -0
- package/dist/{index-BuBPj3by.js → index-BbypzboN.js} +5 -5
- package/dist/{index-BuBPj3by.js.map → index-BbypzboN.js.map} +1 -1
- package/dist/{index-Dfh1KgI5.js → index-Bn5j2FLA.js} +6 -6
- package/dist/{index-Dfh1KgI5.js.map → index-Bn5j2FLA.js.map} +1 -1
- package/dist/{index-GhU7CFw0.js → index-BqgkyNm8.js} +6 -6
- package/dist/{index-GhU7CFw0.js.map → index-BqgkyNm8.js.map} +1 -1
- package/dist/{index-B92AHN8Y.js → index-C4oavwFu.js} +6 -6
- package/dist/{index-B92AHN8Y.js.map → index-C4oavwFu.js.map} +1 -1
- package/dist/{index-Dbg-T-ST.js → index-CNjwWCGc.js} +5 -5
- package/dist/{index-Dbg-T-ST.js.map → index-CNjwWCGc.js.map} +1 -1
- package/dist/{index-D_-Nl-64.js → index-CSdnJs7F.js} +7 -7
- package/dist/{index-D_-Nl-64.js.map → index-CSdnJs7F.js.map} +1 -1
- package/dist/{index-O8I3E36E.js → index-CVv-xIyp.js} +5 -5
- package/dist/{index-O8I3E36E.js.map → index-CVv-xIyp.js.map} +1 -1
- package/dist/index-CYfKRRhL.js +128 -0
- package/dist/index-CYfKRRhL.js.map +1 -0
- package/dist/{index-Cj6xdAWZ.js → index-CfpIN_sB.js} +6 -6
- package/dist/{index-Cj6xdAWZ.js.map → index-CfpIN_sB.js.map} +1 -1
- package/dist/{index-C6oyYlMu.js → index-DBFwmzJQ.js} +11 -11
- package/dist/{index-C6oyYlMu.js.map → index-DBFwmzJQ.js.map} +1 -1
- package/dist/{index-Bk1YIZZf.js → index-DD5t0omh.js} +5 -5
- package/dist/{index-Bk1YIZZf.js.map → index-DD5t0omh.js.map} +1 -1
- package/dist/{index-BEM0olHp.js → index-Df6HY9t3.js} +6 -6
- package/dist/{index-BEM0olHp.js.map → index-Df6HY9t3.js.map} +1 -1
- package/dist/{index-CFoVL8LS.js → index-Djoz2cf4.js} +6 -6
- package/dist/{index-CFoVL8LS.js.map → index-Djoz2cf4.js.map} +1 -1
- package/dist/{index-CmYz5k0C.js → index-DkbXF0dN.js} +6 -6
- package/dist/{index-CmYz5k0C.js.map → index-DkbXF0dN.js.map} +1 -1
- package/dist/{index-SIEfd0gp.js → index-Drxp0RBw.js} +6 -6
- package/dist/{index-SIEfd0gp.js.map → index-Drxp0RBw.js.map} +1 -1
- package/dist/{index-jqEl3LLC.js → index-GA9m2JpT.js} +6 -6
- package/dist/{index-jqEl3LLC.js.map → index-GA9m2JpT.js.map} +1 -1
- package/dist/{index-sJkPi8Q_.js → index-QLS7PLnH.js} +6 -6
- package/dist/{index-sJkPi8Q_.js.map → index-QLS7PLnH.js.map} +1 -1
- package/dist/{index-CbWn6WMr.js → index-S5z1sMxW.js} +6 -6
- package/dist/{index-CbWn6WMr.js.map → index-S5z1sMxW.js.map} +1 -1
- package/dist/{index-DSk9EA7t.js → index-ifHDbmyw.js} +6 -6
- package/dist/{index-DSk9EA7t.js.map → index-ifHDbmyw.js.map} +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +29 -29
- package/dist/{pies.utils-Zw1lwwC4.js → pies.utils-B_jS454c.js} +5 -5
- package/dist/{pies.utils-Zw1lwwC4.js.map → pies.utils-B_jS454c.js.map} +1 -1
- package/dist/remarkable-pro.css +1 -1
- package/dist/theme/i18n/translations/de.d.ts.map +1 -1
- package/dist/theme/i18n/translations/en.d.ts.map +1 -1
- package/dist/{timeRange.utils-C96Hp2HD.js → timeRange.utils-CgLgHA94.js} +2 -2
- package/dist/{timeRange.utils-C96Hp2HD.js.map → timeRange.utils-CgLgHA94.js.map} +1 -1
- package/package.json +2 -2
- package/dist/charts.fillGaps.hooks-Dd-VYdOE.js +0 -66
- package/dist/charts.fillGaps.hooks-Dd-VYdOE.js.map +0 -1
- package/dist/charts.utils-DtFuEHDp.js.map +0 -1
- package/dist/components/editors/DateRangeSelectFieldPro/DateRangeSelectFieldPro.types.d.ts.map +0 -1
- package/dist/components/editors/DateRangeSelectFieldPro/DateRangeSelectFieldPro.utils.d.ts.map +0 -1
- package/dist/components/editors/DateRangeSelectFieldPro/index.d.ts +0 -12
- package/dist/components/editors/DateRangeSelectFieldPro/index.d.ts.map +0 -1
- package/dist/components/editors/editors.timeRange.utils.d.ts +0 -5
- package/dist/components/editors/editors.timeRange.utils.d.ts.map +0 -1
- package/dist/editors.timeRange.utils-DTtRGaCo.js.map +0 -1
- package/dist/index-C7mz7pKQ.js.map +0 -1
- package/dist/index-DjwSlZQY.js +0 -17237
- package/dist/index-DjwSlZQY.js.map +0 -1
- package/dist/index-mp4eyizO.js +0 -57
- package/dist/index-mp4eyizO.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { V as e, l as s } from "./index-
|
|
1
|
+
import { V as e, l as s } from "./index-BIiign0L.js";
|
|
2
2
|
import { defineComponent as o } from "@embeddable.com/react";
|
|
3
|
-
import { B as r } from "./index-
|
|
4
|
-
import { v as i, E as t, z as l, F as n, G as m, I as x, J as u, K as d, M as c, N as f, O as h, R as p, U as D, V as b, X as B } from "./component.constants-
|
|
3
|
+
import { B as r } from "./index-Bn5j2FLA.js";
|
|
4
|
+
import { v as i, E as t, z as l, F as n, G as m, I as x, J as u, K as d, M as c, N as f, O as h, R as p, U as D, V as b, X as B } from "./component.constants-DJqBv0qe.js";
|
|
5
5
|
const C = {
|
|
6
6
|
name: "BarChartDefaultHorizontalPro",
|
|
7
7
|
label: "Bar Chart - Default Horizontal",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { V as e, l as s } from "./index-
|
|
1
|
+
import { V as e, l as s } from "./index-BIiign0L.js";
|
|
2
2
|
import { defineComponent as r } from "@embeddable.com/react";
|
|
3
|
-
import { B as i } from "./index-
|
|
4
|
-
import { v as t, E as o, z as l, F as n, G as m, I as x, J as u, K as d, M as c, N as f, O as h, P as p, S as D, T as b, W as B } from "./component.constants-
|
|
3
|
+
import { B as i } from "./index-GA9m2JpT.js";
|
|
4
|
+
import { v as t, E as o, z as l, F as n, G as m, I as x, J as u, K as d, M as c, N as f, O as h, P as p, S as D, T as b, W as B } from "./component.constants-DJqBv0qe.js";
|
|
5
5
|
const C = {
|
|
6
6
|
name: "BarChartDefaultPro",
|
|
7
7
|
label: "Bar Chart - Default",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { V as e, l as s } from "./index-
|
|
1
|
+
import { V as e, l as s } from "./index-BIiign0L.js";
|
|
2
2
|
import { defineComponent as o } from "@embeddable.com/react";
|
|
3
|
-
import { B as i } from "./index-
|
|
4
|
-
import { v as r, D as n, z as l, w as t, F as m, G as u, H as p, I as d, J as x, K as g, M as c, N as V, O as b, R as h, U as B, V as D } from "./component.constants-
|
|
3
|
+
import { B as i } from "./index-C4oavwFu.js";
|
|
4
|
+
import { v as r, D as n, z as l, w as t, F as m, G as u, H as p, I as d, J as x, K as g, M as c, N as V, O as b, R as h, U as B, V as D } from "./component.constants-DJqBv0qe.js";
|
|
5
5
|
const C = {
|
|
6
6
|
name: "BarChartGroupedHorizontalPro",
|
|
7
7
|
label: "Bar Chart - Grouped Horizontal",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { V as a, l as s } from "./index-
|
|
1
|
+
import { V as a, l as s } from "./index-BIiign0L.js";
|
|
2
2
|
import { defineComponent as i } from "@embeddable.com/react";
|
|
3
|
-
import { B as r } from "./index-
|
|
4
|
-
import { v as o, D as n, z as l, w as t, F as m, G as u, H as p, I as d, J as x, K as g, M as c, N as b, O as V, P as h, S as B, T as D } from "./component.constants-
|
|
3
|
+
import { B as r } from "./index-ifHDbmyw.js";
|
|
4
|
+
import { v as o, D as n, z as l, w as t, F as m, G as u, H as p, I as d, J as x, K as g, M as c, N as b, O as V, P as h, S as B, T as D } from "./component.constants-DJqBv0qe.js";
|
|
5
5
|
const C = {
|
|
6
6
|
name: "BarChartGroupedPro",
|
|
7
7
|
label: "Bar Chart - Grouped",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { V as e, l as s } from "./index-
|
|
1
|
+
import { V as e, l as s } from "./index-BIiign0L.js";
|
|
2
2
|
import { defineComponent as i } from "@embeddable.com/react";
|
|
3
|
-
import { B as o } from "./index-
|
|
4
|
-
import { v as r, D as l, z as n, w as t, F as m, G as u, H as d, I as x, J as c, K as p, M as g, N as b, O as V, R as h, U as B, V as D, L as C } from "./component.constants-
|
|
3
|
+
import { B as o } from "./index-Df6HY9t3.js";
|
|
4
|
+
import { v as r, D as l, z as n, w as t, F as m, G as u, H as d, I as x, J as c, K as p, M as g, N as b, O as V, R as h, U as B, V as D, L as C } from "./component.constants-DJqBv0qe.js";
|
|
5
5
|
const f = {
|
|
6
6
|
name: "BarChartStackedHorizontalPro",
|
|
7
7
|
label: "Bar Chart - Stacked Horizontal",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { V as e, l as s } from "./index-
|
|
1
|
+
import { V as e, l as s } from "./index-BIiign0L.js";
|
|
2
2
|
import { defineComponent as i } from "@embeddable.com/react";
|
|
3
|
-
import { B as o } from "./index-
|
|
4
|
-
import { v as r, D as l, z as n, w as t, F as m, G as u, H as d, I as x, J as c, K as p, M as g, N as b, O as h, P as V, S as B, T as D, L as C } from "./component.constants-
|
|
3
|
+
import { B as o } from "./index-S5z1sMxW.js";
|
|
4
|
+
import { v as r, D as l, z as n, w as t, F as m, G as u, H as d, I as x, J as c, K as p, M as g, N as b, O as h, P as V, S as B, T as D, L as C } from "./component.constants-DJqBv0qe.js";
|
|
5
5
|
const f = {
|
|
6
6
|
name: "BarChartStackedPro",
|
|
7
7
|
label: "Bar Chart - Stacked",
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import f, { useRef as
|
|
1
|
+
import { t as R, j as t, Q as I, x as S, y as L, z as N, A as k, C as D, q as M, R as x, r as b, U as T, s as _ } from "./index-BIiign0L.js";
|
|
2
|
+
import f, { useRef as w } from "react";
|
|
3
3
|
import { useTheme as j } from "@embeddable.com/react";
|
|
4
|
-
import { a as p, i as m, a0 as A } from "./component.constants-
|
|
4
|
+
import { a as p, i as m, a0 as A } from "./component.constants-DJqBv0qe.js";
|
|
5
5
|
/**
|
|
6
6
|
* @license @tabler/icons-react v3.36.0 - MIT
|
|
7
7
|
*
|
|
8
8
|
* This source code is licensed under the MIT license.
|
|
9
9
|
* See the LICENSE file in the root directory of this source tree.
|
|
10
10
|
*/
|
|
11
|
-
const F = [["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" }]], $ = R("outline", "dots-vertical", "DotsVertical", F), E = "_chartCard_84eo6_1", H = "_fixedContent_84eo6_6", O = "_loading_84eo6_13", P = "_hidden_84eo6_18",
|
|
11
|
+
const F = [["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" }]], $ = R("outline", "dots-vertical", "DotsVertical", F), E = "_chartCard_84eo6_1", H = "_fixedContent_84eo6_6", O = "_loading_84eo6_13", P = "_hidden_84eo6_18", U = "_chartCardRightContent_84eo6_22", o = {
|
|
12
12
|
chartCard: E,
|
|
13
13
|
fixedContent: H,
|
|
14
14
|
loading: O,
|
|
15
15
|
hidden: P,
|
|
16
|
-
chartCardRightContent:
|
|
17
|
-
},
|
|
18
|
-
loading:
|
|
19
|
-
}, v = () => /* @__PURE__ */ t.jsx(I, { className:
|
|
20
|
-
list:
|
|
16
|
+
chartCardRightContent: U
|
|
17
|
+
}, V = "_loading_1amm4_7", q = {
|
|
18
|
+
loading: V
|
|
19
|
+
}, v = () => /* @__PURE__ */ t.jsx(I, { className: q.loading }), z = "_list_mwshn_1", B = {
|
|
20
|
+
list: z
|
|
21
21
|
};
|
|
22
|
-
function
|
|
22
|
+
function K({ src: s, className: a, ...r }) {
|
|
23
23
|
const e = decodeURIComponent(s.replace(/^data:image\/svg\+xml,/, ""));
|
|
24
24
|
return /* @__PURE__ */ t.jsx("div", { className: a, ...r, dangerouslySetInnerHTML: { __html: e } });
|
|
25
25
|
}
|
|
26
|
-
const
|
|
26
|
+
const Q = (s) => {
|
|
27
27
|
const a = j();
|
|
28
28
|
p(a);
|
|
29
29
|
const [r, e] = f.useState(!1), i = a.defaults.chartMenuOptions ?? [];
|
|
@@ -46,26 +46,26 @@ const G = (s) => {
|
|
|
46
46
|
side: "bottom",
|
|
47
47
|
align: "end",
|
|
48
48
|
triggerComponent: r ? /* @__PURE__ */ t.jsx(v, {}) : /* @__PURE__ */ t.jsx(k, { icon: $ }),
|
|
49
|
-
children: /* @__PURE__ */ t.jsx(L, { className:
|
|
49
|
+
children: /* @__PURE__ */ t.jsx(L, { className: B.list, autoFocus: !0, children: i.map((n, c) => {
|
|
50
50
|
const h = m.t(n.labelKey);
|
|
51
51
|
return /* @__PURE__ */ t.jsx(
|
|
52
52
|
N,
|
|
53
53
|
{
|
|
54
54
|
label: h,
|
|
55
55
|
onClick: () => d(n.onClick),
|
|
56
|
-
startIcon: n.iconSrc ? /* @__PURE__ */ t.jsx(
|
|
56
|
+
startIcon: n.iconSrc ? /* @__PURE__ */ t.jsx(K, { src: n.iconSrc }) : void 0
|
|
57
57
|
},
|
|
58
58
|
c
|
|
59
59
|
);
|
|
60
60
|
}) })
|
|
61
61
|
}
|
|
62
62
|
);
|
|
63
|
-
},
|
|
63
|
+
}, G = f.forwardRef(
|
|
64
64
|
({ title: s, subtitle: a, children: r, data: e, errorMessage: i, dimensionsAndMeasures: l = [], onCustomDownload: d }, n) => {
|
|
65
65
|
var u;
|
|
66
66
|
const c = j();
|
|
67
67
|
p(c);
|
|
68
|
-
const h =
|
|
68
|
+
const h = w(null), g = !!(e != null && e.data && ((u = e.data) == null ? void 0 : u.length) > 0), C = !e || (e == null ? void 0 : e.isLoading), y = () => C && !g ? /* @__PURE__ */ t.jsx(T, {}) : i ? /* @__PURE__ */ t.jsx(
|
|
69
69
|
_,
|
|
70
70
|
{
|
|
71
71
|
variant: "error",
|
|
@@ -99,7 +99,7 @@ const G = (s) => {
|
|
|
99
99
|
{
|
|
100
100
|
className: x(o.fixedContent, C ? o.hidden : o.visible),
|
|
101
101
|
children: /* @__PURE__ */ t.jsx(
|
|
102
|
-
|
|
102
|
+
Q,
|
|
103
103
|
{
|
|
104
104
|
title: s,
|
|
105
105
|
containerRef: h,
|
|
@@ -117,8 +117,8 @@ const G = (s) => {
|
|
|
117
117
|
] });
|
|
118
118
|
}
|
|
119
119
|
);
|
|
120
|
-
|
|
120
|
+
G.displayName = "ChartCard";
|
|
121
121
|
export {
|
|
122
|
-
|
|
122
|
+
G as C
|
|
123
123
|
};
|
|
124
|
-
//# sourceMappingURL=ChartCard-
|
|
124
|
+
//# sourceMappingURL=ChartCard-DaUtlchs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChartCard-uZBftDKk.js","sources":["../node_modules/@tabler/icons-react/dist/esm/icons/IconDotsVertical.mjs","../src/components/charts/shared/ChartCard/ChartCardLoading/ChartCardLoading.tsx","../src/components/charts/shared/ChartCard/ChartCardMenuPro/ChartCardMenuPro.tsx","../src/components/charts/shared/ChartCard/ChartCard.tsx"],"sourcesContent":["/**\n * @license @tabler/icons-react v3.36.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 { 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 ActionIcon,\n SelectFieldContent,\n SelectListOption,\n} from '@embeddable.com/remarkable-ui';\nimport styles from './ChartCardMenuPro.module.css';\nimport { ChartCardMenuOptionOnClickProps } from '../../../../../theme/defaults/defaults.ChartCardMenu.constants';\n\ntype InlineSvgFromDataProps = React.HTMLAttributes<HTMLSpanElement> & {\n src: string;\n};\n\nexport function InlineSvgFromData({ src, className, ...rest }: InlineSvgFromDataProps) {\n // Remove prefix and URL-decode the SVG markup\n const svgMarkup = decodeURIComponent(src.replace(/^data:image\\/svg\\+xml,/, ''));\n\n return <div className={className} {...rest} dangerouslySetInnerHTML={{ __html: svgMarkup }} />;\n}\n\ntype ChartCardMenuProProps = Omit<ChartCardMenuOptionOnClickProps, '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.defaults.chartMenuOptions ?? [];\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: ChartCardMenuOptionOnClickProps) => 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 /> : <ActionIcon icon={IconDotsVertical} />}\n >\n <SelectFieldContent 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={option.iconSrc ? <InlineSvgFromData src={option.iconSrc} /> : undefined}\n />\n );\n })}\n </SelectFieldContent>\n </Dropdown>\n );\n};\n","import React, { CSSProperties, useRef } from 'react';\nimport { IconAlertCircle } from '@tabler/icons-react';\nimport {\n Card,\n CardContent,\n CardFeedback,\n CardHeader,\n Skeleton,\n} from '@embeddable.com/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 clsx from 'clsx';\nimport { ChartCardMenuOptionOnClickProps } from '../../../../theme/defaults/defaults.ChartCardMenu.constants';\n\ntype ChartCardProps = {\n title: string;\n subtitle?: string;\n children: React.ReactNode;\n data: DataResponse;\n errorMessage?: string;\n style?: CSSProperties;\n dimensionsAndMeasures?: (Dimension | Measure)[];\n onCustomDownload?: (props: (props: ChartCardMenuOptionOnClickProps) => void) => void;\n};\n\nexport const ChartCard = React.forwardRef<HTMLDivElement, ChartCardProps>(\n (\n { title, subtitle, children, data, errorMessage, dimensionsAndMeasures = [], onCustomDownload },\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 <CardFeedback\n variant=\"error\"\n icon={IconAlertCircle}\n title={i18n.t('charts.errorTitle')}\n message={errorMessage}\n />\n );\n }\n\n if (!hasData) {\n return (\n <CardFeedback\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}>\n <CardHeader\n title={title}\n subtitle={subtitle}\n rightContent={\n <div className={styles.chartCardRightContent}>\n <div\n className={clsx(styles.fixedContent, isLoading ? styles.loading : styles.hidden)}\n >\n <ChartCardLoading />\n </div>\n <div\n className={clsx(styles.fixedContent, isLoading ? styles.hidden : styles.visible)}\n >\n <ChartCardMenuPro\n title={title}\n containerRef={chartRef}\n data={data?.data}\n dimensionsAndMeasures={dimensionsAndMeasures}\n onCustomDownload={onCustomDownload}\n />\n </div>\n </div>\n }\n />\n\n <CardContent ref={onCustomDownload ? ref : chartRef}>{getDisplay()}</CardContent>\n </Card>\n );\n },\n);\n\nChartCard.displayName = 'ChartCard';\n"],"names":["__iconNode","IconDotsVertical","createReactComponent","ChartCardLoading","jsx","IconLoader2","styles","InlineSvgFromData","src","className","rest","svgMarkup","ChartCardMenuPro","props","theme","useTheme","i18nSetup","isLoading","setIsLoading","React","options","startAction","onClick","handleExport","args","Dropdown","ActionIcon","SelectFieldContent","option","index","label","i18n","SelectListOption","ChartCard","title","subtitle","children","data","errorMessage","dimensionsAndMeasures","onCustomDownload","ref","chartRef","useRef","hasData","_a","getDisplay","Skeleton","CardFeedback","IconAlertCircle","jsxs","Card","CardHeader","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;;;;;;;;GCPvFG,IAAmB,MAAMC,gBAAAA,EAAAA,IAACC,GAAA,EAAY,WAAWC,EAAO,SAAS;;;ACgBvE,SAASC,EAAkB,EAAE,KAAAC,GAAK,WAAAC,GAAW,GAAGC,KAAgC;AAErF,QAAMC,IAAY,mBAAmBH,EAAI,QAAQ,0BAA0B,EAAE,CAAC;AAE9E,SAAOJ,gBAAAA,EAAAA,IAAC,SAAI,WAAAK,GAAuB,GAAGC,GAAM,yBAAyB,EAAE,QAAQC,EAAA,GAAa;AAC9F;AAIO,MAAMC,IAAoD,CAACC,MAAU;AAC1E,QAAMC,IAAeC,EAAA;AACrB,EAAAC,EAAUF,CAAK;AA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A;AAAA,YAEpBC,gBAAAA,EAAAA;AAAAA,cAAC;AAAA,cAAA;AAAA,gBACC,WAAWiD,EAAK/C,EAAO,cAAcW,IAAYX,EAAO,SAASA,EAAO,OAAO;AAAA,gBAE/E,UAAAF,gBAAAA,EAAAA;AAAAA,kBAACQ;AAAA,kBAAA;AAAA,oBACC,OAAAsB;AAAA,oBACA,cAAcQ;AAAA,oBACd,MAAML,KAAA,gBAAAA,EAAM;AAAA,oBACZ,uBAAAE;AAAA,oBACA,kBAAAC;AAAA,kBAAA;AAAA,gBAAA;AAAA,cACF;AAAA,YAAA;AAAA,UACF,EAAA,CACF;AAAA,QAAA;AAAA,MAAA;AAAA,4BAIHc,GAAA,EAAY,KAAKd,IAAmBC,IAAMC,GAAW,cAAW,CAAE;AAAA,IAAA,GACrE;AAAA,EAEJ;AACF;AAEAT,EAAU,cAAc;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"ChartCard-DaUtlchs.js","sources":["../node_modules/@tabler/icons-react/dist/esm/icons/IconDotsVertical.mjs","../src/components/charts/shared/ChartCard/ChartCardLoading/ChartCardLoading.tsx","../src/components/charts/shared/ChartCard/ChartCardMenuPro/ChartCardMenuPro.tsx","../src/components/charts/shared/ChartCard/ChartCard.tsx"],"sourcesContent":["/**\n * @license @tabler/icons-react v3.36.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 { 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 ActionIcon,\n SelectFieldContent,\n SelectListOption,\n} from '@embeddable.com/remarkable-ui';\nimport styles from './ChartCardMenuPro.module.css';\nimport { ChartCardMenuOptionOnClickProps } from '../../../../../theme/defaults/defaults.ChartCardMenu.constants';\n\ntype InlineSvgFromDataProps = React.HTMLAttributes<HTMLSpanElement> & {\n src: string;\n};\n\nexport function InlineSvgFromData({ src, className, ...rest }: InlineSvgFromDataProps) {\n // Remove prefix and URL-decode the SVG markup\n const svgMarkup = decodeURIComponent(src.replace(/^data:image\\/svg\\+xml,/, ''));\n\n return <div className={className} {...rest} dangerouslySetInnerHTML={{ __html: svgMarkup }} />;\n}\n\ntype ChartCardMenuProProps = Omit<ChartCardMenuOptionOnClickProps, '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.defaults.chartMenuOptions ?? [];\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: ChartCardMenuOptionOnClickProps) => 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 /> : <ActionIcon icon={IconDotsVertical} />}\n >\n <SelectFieldContent 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={option.iconSrc ? <InlineSvgFromData src={option.iconSrc} /> : undefined}\n />\n );\n })}\n </SelectFieldContent>\n </Dropdown>\n );\n};\n","import React, { CSSProperties, useRef } from 'react';\nimport { IconAlertCircle } from '@tabler/icons-react';\nimport {\n Card,\n CardContent,\n CardFeedback,\n CardHeader,\n Skeleton,\n} from '@embeddable.com/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 clsx from 'clsx';\nimport { ChartCardMenuOptionOnClickProps } from '../../../../theme/defaults/defaults.ChartCardMenu.constants';\n\ntype ChartCardProps = {\n title: string;\n subtitle?: string;\n children: React.ReactNode;\n data: DataResponse;\n errorMessage?: string;\n style?: CSSProperties;\n dimensionsAndMeasures?: (Dimension | Measure)[];\n onCustomDownload?: (props: (props: ChartCardMenuOptionOnClickProps) => void) => void;\n};\n\nexport const ChartCard = React.forwardRef<HTMLDivElement, ChartCardProps>(\n (\n { title, subtitle, children, data, errorMessage, dimensionsAndMeasures = [], onCustomDownload },\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 <CardFeedback\n variant=\"error\"\n icon={IconAlertCircle}\n title={i18n.t('charts.errorTitle')}\n message={errorMessage}\n />\n );\n }\n\n if (!hasData) {\n return (\n <CardFeedback\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}>\n <CardHeader\n title={title}\n subtitle={subtitle}\n rightContent={\n <div className={styles.chartCardRightContent}>\n <div\n className={clsx(styles.fixedContent, isLoading ? styles.loading : styles.hidden)}\n >\n <ChartCardLoading />\n </div>\n <div\n className={clsx(styles.fixedContent, isLoading ? styles.hidden : styles.visible)}\n >\n <ChartCardMenuPro\n title={title}\n containerRef={chartRef}\n data={data?.data}\n dimensionsAndMeasures={dimensionsAndMeasures}\n onCustomDownload={onCustomDownload}\n />\n </div>\n </div>\n }\n />\n\n <CardContent ref={onCustomDownload ? ref : chartRef}>{getDisplay()}</CardContent>\n </Card>\n );\n },\n);\n\nChartCard.displayName = 'ChartCard';\n"],"names":["__iconNode","IconDotsVertical","createReactComponent","ChartCardLoading","jsx","IconLoader2","styles","InlineSvgFromData","src","className","rest","svgMarkup","ChartCardMenuPro","props","theme","useTheme","i18nSetup","isLoading","setIsLoading","React","options","startAction","onClick","handleExport","args","Dropdown","ActionIcon","SelectFieldContent","option","index","label","i18n","SelectListOption","ChartCard","title","subtitle","children","data","errorMessage","dimensionsAndMeasures","onCustomDownload","ref","chartRef","useRef","hasData","_a","getDisplay","Skeleton","CardFeedback","IconAlertCircle","jsxs","Card","CardHeader","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,2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B;AAAA,QACjC,SAASA,EAAK,EAAE,qBAAqB;AAAA,MAAA;AAAA,IAAA;AAQ7C,WACEmB,gBAAAA,EAAAA,KAACC,GAAA,EAAK,WAAW7C,EAAO,WACtB,UAAA;AAAA,MAAAF,gBAAAA,EAAAA;AAAAA,QAACgD;AAAA,QAAA;AAAA,UACC,OAAAlB;AAAA,UACA,UAAAC;AAAA,UACA,cACEe,gBAAAA,EAAAA,KAAC,OAAA,EAAI,WAAW5C,EAAO,uBACrB,UAAA;AAAA,YAAAF,gBAAAA,EAAAA;AAAAA,cAAC;AAAA,cAAA;AAAA,gBACC,WAAWiD,EAAK/C,EAAO,cAAcW,IAAYX,EAAO,UAAUA,EAAO,MAAM;AAAA,gBAE/E,gCAACH,GAAA,CAAA,CAAiB;AAAA,cAAA;AAAA,YAAA;AAAA,YAEpBC,gBAAAA,EAAAA;AAAAA,cAAC;AAAA,cAAA;AAAA,gBACC,WAAWiD,EAAK/C,EAAO,cAAcW,IAAYX,EAAO,SAASA,EAAO,OAAO;AAAA,gBAE/E,UAAAF,gBAAAA,EAAAA;AAAAA,kBAACQ;AAAA,kBAAA;AAAA,oBACC,OAAAsB;AAAA,oBACA,cAAcQ;AAAA,oBACd,MAAML,KAAA,gBAAAA,EAAM;AAAA,oBACZ,uBAAAE;AAAA,oBACA,kBAAAC;AAAA,kBAAA;AAAA,gBAAA;AAAA,cACF;AAAA,YAAA;AAAA,UACF,EAAA,CACF;AAAA,QAAA;AAAA,MAAA;AAAA,4BAIHc,GAAA,EAAY,KAAKd,IAAmBC,IAAMC,GAAW,cAAW,CAAE;AAAA,IAAA,GACrE;AAAA,EAEJ;AACF;AAEAT,EAAU,cAAc;","x_google_ignoreList":[0]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as e } from "./index-
|
|
1
|
+
import { d as e } from "./index-BIiign0L.js";
|
|
2
2
|
const r = e("color", {
|
|
3
3
|
label: "Color",
|
|
4
4
|
optionLabel: (o) => o.toUpperCase()
|
|
@@ -6,4 +6,4 @@ const r = e("color", {
|
|
|
6
6
|
export {
|
|
7
7
|
r as C
|
|
8
8
|
};
|
|
9
|
-
//# sourceMappingURL=Color.type.emb-
|
|
9
|
+
//# sourceMappingURL=Color.type.emb-DFhAaPXz.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Color.type.emb-
|
|
1
|
+
{"version":3,"file":"Color.type.emb-DFhAaPXz.js","sources":["../src/editors/ColorEditor/Color.type.emb.ts"],"sourcesContent":["import { defineType } from '@embeddable.com/core';\n\nconst ColorType = defineType('color', {\n label: 'Color',\n optionLabel: (value: string) => value.toUpperCase(),\n});\n\nexport default ColorType;\n"],"names":["ColorType","defineType","value"],"mappings":";AAEA,MAAMA,IAAYC,EAAW,SAAS;AAAA,EACpC,OAAO;AAAA,EACP,aAAa,CAACC,MAAkBA,EAAM,YAAA;AACxC,CAAC;"}
|
package/dist/ColorEditor.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineEditor as l } from "@embeddable.com/react";
|
|
2
|
-
import { C as a } from "./Color.type.emb-
|
|
3
|
-
import { j as n, A as i, I as p, V as u } from "./index-
|
|
2
|
+
import { C as a } from "./Color.type.emb-DFhAaPXz.js";
|
|
3
|
+
import { j as n, A as i, I as p, V as u } from "./index-BIiign0L.js";
|
|
4
4
|
import { useState as m, useEffect as C } from "react";
|
|
5
5
|
const I = "_colorInputContainer_1o1qe_1", d = "_colorInput_1o1qe_1", s = {
|
|
6
6
|
colorInputContainer: I,
|
package/dist/{ComparisonPeriod.type.emb-Bq4r1RbE.js → ComparisonPeriod.type.emb-C-YdNTEB.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as i, b as o } from "./index-
|
|
1
|
+
import { d as i, b as o } from "./index-BIiign0L.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-C-YdNTEB.js.map
|
package/dist/{ComparisonPeriod.type.emb-Bq4r1RbE.js.map → ComparisonPeriod.type.emb-C-YdNTEB.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComparisonPeriod.type.emb-
|
|
1
|
+
{"version":3,"file":"ComparisonPeriod.type.emb-C-YdNTEB.js","sources":["../src/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,8 +1,8 @@
|
|
|
1
1
|
import { defineComponent as r } from "@embeddable.com/react";
|
|
2
|
-
import { V as a } from "./index-
|
|
3
|
-
import { D as i } from "./index-
|
|
4
|
-
import { F as t, G as n, _ as l } from "./component.constants-
|
|
5
|
-
import { C as o } from "./ComparisonPeriod.type.emb-
|
|
2
|
+
import { V as a } from "./index-BIiign0L.js";
|
|
3
|
+
import { D as i } from "./index-Ba6ziHiQ.js";
|
|
4
|
+
import { F as t, G as n, _ as l } from "./component.constants-DJqBv0qe.js";
|
|
5
|
+
import { C as o } from "./ComparisonPeriod.type.emb-C-YdNTEB.js";
|
|
6
6
|
const p = {
|
|
7
7
|
name: "ComparisonPeriodSelectFieldPro",
|
|
8
8
|
label: "Comparison Period Select Field",
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { useTheme as C, defineComponent as v } from "@embeddable.com/react";
|
|
2
|
+
import { j as l, c as y, V as s } from "./index-BIiign0L.js";
|
|
3
|
+
import { u as D, g as P, a as V, b as w } from "./dates.utils-f-XJ_LBg.js";
|
|
4
|
+
import { a as j, r as k, i as F, F as M, G as T, _ as x, g as o } from "./component.constants-DJqBv0qe.js";
|
|
5
|
+
import { E as L } from "./EditorCard-DXQeyo3r.js";
|
|
6
|
+
const S = (e) => {
|
|
7
|
+
const a = C();
|
|
8
|
+
j(a);
|
|
9
|
+
const { dayjsLocaleReady: r } = D();
|
|
10
|
+
if (!r)
|
|
11
|
+
return null;
|
|
12
|
+
const { onChange: i, clearable: u, selectedValue: t, showTwoMonths: c } = e, { description: d, placeholder: m, title: g } = k(e), p = (R) => {
|
|
13
|
+
const b = w(R);
|
|
14
|
+
i(b);
|
|
15
|
+
}, n = a.defaults.dateRangesOptions, h = P(t, "MMM DD", n), f = a.i18n.language ?? a.formatter.locale;
|
|
16
|
+
return /* @__PURE__ */ l.jsx(L, { title: g, subtitle: d, children: /* @__PURE__ */ l.jsx(
|
|
17
|
+
y,
|
|
18
|
+
{
|
|
19
|
+
locale: f,
|
|
20
|
+
clearable: u,
|
|
21
|
+
placeholder: m,
|
|
22
|
+
displayValue: h,
|
|
23
|
+
numberOfMonths: c ? 2 : 1,
|
|
24
|
+
value: V(t, n),
|
|
25
|
+
onChange: p,
|
|
26
|
+
submitLabel: F.t("editors.dateRangePicker.apply")
|
|
27
|
+
}
|
|
28
|
+
) });
|
|
29
|
+
}, E = {
|
|
30
|
+
name: "DateRangePickerCustomPro",
|
|
31
|
+
label: "Date-Range Picker - Custom",
|
|
32
|
+
category: "Dropdowns",
|
|
33
|
+
defaultWidth: 300,
|
|
34
|
+
defaultHeight: 120,
|
|
35
|
+
inputs: [
|
|
36
|
+
{ ...M },
|
|
37
|
+
{ ...T },
|
|
38
|
+
{ ...x, defaultValue: "Select a date-range" },
|
|
39
|
+
{ ...o, name: "clearable", label: "Can be cleared", defaultValue: !0 },
|
|
40
|
+
{
|
|
41
|
+
name: "selectedValue",
|
|
42
|
+
type: "timeRange",
|
|
43
|
+
label: "Selected Value",
|
|
44
|
+
category: "Pre-configured variables"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
...o,
|
|
48
|
+
name: "showTwoMonths",
|
|
49
|
+
label: "Show two months",
|
|
50
|
+
defaultValue: !1
|
|
51
|
+
}
|
|
52
|
+
],
|
|
53
|
+
events: [
|
|
54
|
+
{
|
|
55
|
+
name: "onChange",
|
|
56
|
+
label: "selected date-range updated",
|
|
57
|
+
properties: [
|
|
58
|
+
{
|
|
59
|
+
name: "value",
|
|
60
|
+
label: "selected date-range",
|
|
61
|
+
type: "timeRange"
|
|
62
|
+
}
|
|
63
|
+
]
|
|
64
|
+
}
|
|
65
|
+
],
|
|
66
|
+
variables: [
|
|
67
|
+
{
|
|
68
|
+
name: "date-range value",
|
|
69
|
+
type: "timeRange",
|
|
70
|
+
defaultValue: s.noFilter(),
|
|
71
|
+
inputs: ["selectedValue"],
|
|
72
|
+
events: [{ name: "onChange", property: "value" }]
|
|
73
|
+
}
|
|
74
|
+
]
|
|
75
|
+
}, I = v(S, E, {
|
|
76
|
+
props: (e) => ({
|
|
77
|
+
...e
|
|
78
|
+
}),
|
|
79
|
+
events: {
|
|
80
|
+
onChange: (e) => ({
|
|
81
|
+
value: e ?? s.noFilter()
|
|
82
|
+
})
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
export {
|
|
86
|
+
I as default,
|
|
87
|
+
E as meta
|
|
88
|
+
};
|
|
89
|
+
//# sourceMappingURL=DateRangePickerCustomPro.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DateRangePickerCustomPro.js","sources":["../src/components/editors/dates/DateRangePickerCustomPro/index.tsx","../src/components/editors/dates/DateRangePickerCustomPro/DateRangePickerCustomPro.emb.ts"],"sourcesContent":["import { useTheme } from '@embeddable.com/react';\nimport { DateRange, DateRangePickerField } from '@embeddable.com/remarkable-ui';\nimport { Theme } from '../../../../theme/theme.types';\nimport { useLoadDayjsLocale } from '../../../../utils.ts/date.utils';\nimport { TimeRange } from '@embeddable.com/core';\nimport { resolveI18nProps } from '../../../component.utils';\nimport { EditorCard } from '../../shared/EditorCard/EditorCard';\nimport { i18n, i18nSetup } from '../../../../theme/i18n/i18n';\nimport {\n getDateRangeFromTimeRange,\n getTimeRangeFromDateRange,\n getTimeRangeLabel,\n} from '../dates.utils';\n\ntype DateRangePickerPresetsProps = {\n description?: string;\n onChange: (newDateRange: TimeRange) => void;\n placeholder?: string;\n selectedValue: TimeRange;\n title?: string;\n clearable?: boolean;\n showTwoMonths?: boolean;\n};\n\nconst DateRangePickerPresets = (props: DateRangePickerPresetsProps) => {\n const theme: Theme = useTheme() as Theme;\n i18nSetup(theme);\n\n const { dayjsLocaleReady } = useLoadDayjsLocale();\n\n if (!dayjsLocaleReady) {\n return null;\n }\n\n const { onChange, clearable, selectedValue, showTwoMonths } = props;\n\n const { description, placeholder, title } = resolveI18nProps(props);\n\n const handleChange = (newDateRange: DateRange | undefined) => {\n const timeRange: TimeRange = getTimeRangeFromDateRange(newDateRange);\n onChange(timeRange);\n };\n\n const dateRangeOptions = theme.defaults.dateRangesOptions;\n const displayValue = getTimeRangeLabel(selectedValue, 'MMM DD', dateRangeOptions);\n\n const locale = theme.i18n.language ?? theme.formatter.locale;\n\n return (\n <EditorCard title={title} subtitle={description}>\n <DateRangePickerField\n locale={locale}\n clearable={clearable}\n placeholder={placeholder}\n displayValue={displayValue}\n numberOfMonths={showTwoMonths ? 2 : 1}\n value={getDateRangeFromTimeRange(selectedValue, dateRangeOptions)}\n onChange={handleChange}\n submitLabel={i18n.t('editors.dateRangePicker.apply')}\n />\n </EditorCard>\n );\n};\n\nexport default DateRangePickerPresets;\n","import { defineComponent, EmbeddedComponentMeta, Inputs } from '@embeddable.com/react';\nimport { Value } from '@embeddable.com/core';\nimport DateTimeSelectFieldPro from './index';\nimport { description, genericBoolean, placeholder, title } from '../../../component.constants';\n\nexport const meta = {\n name: 'DateRangePickerCustomPro',\n label: 'Date-Range Picker - Custom',\n category: 'Dropdowns',\n defaultWidth: 300,\n defaultHeight: 120,\n inputs: [\n { ...title },\n { ...description },\n { ...placeholder, defaultValue: 'Select a date-range' },\n { ...genericBoolean, name: 'clearable', label: 'Can be cleared', defaultValue: true },\n {\n name: 'selectedValue',\n type: 'timeRange',\n label: 'Selected Value',\n category: 'Pre-configured variables',\n },\n {\n ...genericBoolean,\n name: 'showTwoMonths',\n label: 'Show two months',\n defaultValue: false,\n },\n ],\n events: [\n {\n name: 'onChange',\n label: 'selected date-range updated',\n properties: [\n {\n name: 'value',\n label: 'selected date-range',\n type: 'timeRange',\n },\n ],\n },\n ],\n variables: [\n {\n name: 'date-range value',\n type: 'timeRange',\n defaultValue: Value.noFilter(),\n inputs: ['selectedValue'],\n events: [{ name: 'onChange', property: 'value' }],\n },\n ],\n} as const satisfies EmbeddedComponentMeta;\n\nexport default defineComponent(DateTimeSelectFieldPro, meta, {\n props: (inputs: Inputs<typeof meta>) => {\n return {\n ...inputs,\n };\n },\n events: {\n onChange: (range) => ({\n value: range ?? Value.noFilter(),\n }),\n },\n});\n"],"names":["DateRangePickerPresets","props","theme","useTheme","i18nSetup","dayjsLocaleReady","useLoadDayjsLocale","onChange","clearable","selectedValue","showTwoMonths","description","placeholder","title","resolveI18nProps","handleChange","newDateRange","timeRange","getTimeRangeFromDateRange","dateRangeOptions","displayValue","getTimeRangeLabel","locale","jsx","EditorCard","DateRangePickerField","getDateRangeFromTimeRange","i18n","meta","genericBoolean","Value","DateRangePickerCustomPro_emb","defineComponent","DateTimeSelectFieldPro","inputs","range"],"mappings":";;;;;AAwBA,MAAMA,IAAyB,CAACC,MAAuC;AACrE,QAAMC,IAAeC,EAAA;AACrB,EAAAC,EAAUF,CAAK;AAEf,QAAM,EAAE,kBAAAG,EAAA,IAAqBC,EAAA;AAE7B,MAAI,CAACD;AACH,WAAO;AAGT,QAAM,EAAE,UAAAE,GAAU,WAAAC,GAAW,eAAAC,GAAe,eAAAC,MAAkBT,GAExD,EAAE,aAAAU,GAAa,aAAAC,GAAa,OAAAC,EAAA,IAAUC,EAAiBb,CAAK,GAE5Dc,IAAe,CAACC,MAAwC;AAC5D,UAAMC,IAAuBC,EAA0BF,CAAY;AACnE,IAAAT,EAASU,CAAS;AAAA,EACpB,GAEME,IAAmBjB,EAAM,SAAS,mBAClCkB,IAAeC,EAAkBZ,GAAe,UAAUU,CAAgB,GAE1EG,IAASpB,EAAM,KAAK,YAAYA,EAAM,UAAU;AAEtD,SACEqB,gBAAAA,EAAAA,IAACC,GAAA,EAAW,OAAAX,GAAc,UAAUF,GAClC,UAAAY,gBAAAA,EAAAA;AAAAA,IAACE;AAAA,IAAA;AAAA,MACC,QAAAH;AAAA,MACA,WAAAd;AAAA,MACA,aAAAI;AAAA,MACA,cAAAQ;AAAA,MACA,gBAAgBV,IAAgB,IAAI;AAAA,MACpC,OAAOgB,EAA0BjB,GAAeU,CAAgB;AAAA,MAChE,UAAUJ;AAAA,MACV,aAAaY,EAAK,EAAE,+BAA+B;AAAA,IAAA;AAAA,EAAA,GAEvD;AAEJ,GCzDaC,IAAO;AAAA,EAClB,MAAM;AAAA,EACN,OAAO;AAAA,EACP,UAAU;AAAA,EACV,cAAc;AAAA,EACd,eAAe;AAAA,EACf,QAAQ;AAAA,IACN,EAAE,GAAGf,EAAA;AAAA,IACL,EAAE,GAAGF,EAAA;AAAA,IACL,EAAE,GAAGC,GAAa,cAAc,sBAAA;AAAA,IAChC,EAAE,GAAGiB,GAAgB,MAAM,aAAa,OAAO,kBAAkB,cAAc,GAAA;AAAA,IAC/E;AAAA,MACE,MAAM;AAAA,MACN,MAAM;AAAA,MACN,OAAO;AAAA,MACP,UAAU;AAAA,IAAA;AAAA,IAEZ;AAAA,MACE,GAAGA;AAAA,MACH,MAAM;AAAA,MACN,OAAO;AAAA,MACP,cAAc;AAAA,IAAA;AAAA,EAChB;AAAA,EAEF,QAAQ;AAAA,IACN;AAAA,MACE,MAAM;AAAA,MACN,OAAO;AAAA,MACP,YAAY;AAAA,QACV;AAAA,UACE,MAAM;AAAA,UACN,OAAO;AAAA,UACP,MAAM;AAAA,QAAA;AAAA,MACR;AAAA,IACF;AAAA,EACF;AAAA,EAEF,WAAW;AAAA,IACT;AAAA,MACE,MAAM;AAAA,MACN,MAAM;AAAA,MACN,cAAcC,EAAM,SAAA;AAAA,MACpB,QAAQ,CAAC,eAAe;AAAA,MACxB,QAAQ,CAAC,EAAE,MAAM,YAAY,UAAU,SAAS;AAAA,IAAA;AAAA,EAClD;AAEJ,GAEAC,IAAeC,EAAgBC,GAAwBL,GAAM;AAAA,EAC3D,OAAO,CAACM,OACC;AAAA,IACL,GAAGA;AAAA,EAAA;AAAA,EAGP,QAAQ;AAAA,IACN,UAAU,CAACC,OAAW;AAAA,MACpB,OAAOA,KAASL,EAAM,SAAA;AAAA,IAAS;AAAA,EACjC;AAEJ,CAAC;"}
|
|
@@ -1,18 +1,30 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { V as
|
|
3
|
-
import { D as
|
|
4
|
-
import { F as
|
|
5
|
-
const
|
|
1
|
+
import { defineComponent as l } from "@embeddable.com/react";
|
|
2
|
+
import { V as t } from "./index-BIiign0L.js";
|
|
3
|
+
import { D as n } from "./index-CYfKRRhL.js";
|
|
4
|
+
import { F as o, G as r, _ as s, g as a } from "./component.constants-DJqBv0qe.js";
|
|
5
|
+
const u = {
|
|
6
6
|
name: "DateRangeSelectFieldPro",
|
|
7
|
-
label: "Date
|
|
7
|
+
label: "Date-Range Picker - Presets",
|
|
8
8
|
category: "Dropdowns",
|
|
9
9
|
defaultWidth: 300,
|
|
10
10
|
defaultHeight: 120,
|
|
11
11
|
inputs: [
|
|
12
|
-
{ ...
|
|
12
|
+
{ ...o },
|
|
13
13
|
{ ...r },
|
|
14
|
-
{ ...
|
|
15
|
-
{
|
|
14
|
+
{ ...s, defaultValue: "Select a date-range" },
|
|
15
|
+
{
|
|
16
|
+
...a,
|
|
17
|
+
name: "showCustomRangeOptions",
|
|
18
|
+
label: "Show custom date-range option",
|
|
19
|
+
defaultValue: !0
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
...a,
|
|
23
|
+
name: "showTwoMonths",
|
|
24
|
+
label: "Show two-month view",
|
|
25
|
+
defaultValue: !1
|
|
26
|
+
},
|
|
27
|
+
{ ...a, name: "clearable", label: "Can be cleared", defaultValue: !0 },
|
|
16
28
|
{
|
|
17
29
|
name: "selectedValue",
|
|
18
30
|
type: "timeRange",
|
|
@@ -37,27 +49,23 @@ const d = {
|
|
|
37
49
|
{
|
|
38
50
|
name: "date-range value",
|
|
39
51
|
type: "timeRange",
|
|
40
|
-
defaultValue:
|
|
52
|
+
defaultValue: t.noFilter(),
|
|
41
53
|
inputs: ["selectedValue"],
|
|
42
54
|
events: [{ name: "onChange", property: "value" }]
|
|
43
55
|
}
|
|
44
56
|
]
|
|
45
|
-
},
|
|
57
|
+
}, g = l(n, u, {
|
|
46
58
|
props: (e) => ({
|
|
47
59
|
...e
|
|
48
60
|
}),
|
|
49
61
|
events: {
|
|
50
62
|
onChange: (e) => ({
|
|
51
|
-
value: e
|
|
52
|
-
...e,
|
|
53
|
-
relativeTimeString: ""
|
|
54
|
-
// This is prioritised over the from and to dates, so we don't pass this for now (as we don't want Cube parsing this instead of using the calculated dates)
|
|
55
|
-
} : a.noFilter()
|
|
63
|
+
value: e ?? t.noFilter()
|
|
56
64
|
})
|
|
57
65
|
}
|
|
58
66
|
});
|
|
59
67
|
export {
|
|
60
|
-
|
|
61
|
-
|
|
68
|
+
g as default,
|
|
69
|
+
u as meta
|
|
62
70
|
};
|
|
63
71
|
//# sourceMappingURL=DateRangeSelectFieldPro.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateRangeSelectFieldPro.js","sources":["../src/components/editors/
|
|
1
|
+
{"version":3,"file":"DateRangeSelectFieldPro.js","sources":["../src/components/editors/dates/DateRangePickerPresetsPro/DateRangeSelectFieldPro.emb.ts"],"sourcesContent":["import { defineComponent, EmbeddedComponentMeta, Inputs } from '@embeddable.com/react';\nimport { Value } from '@embeddable.com/core';\nimport DateTimeSelectFieldPro from './index';\nimport { description, genericBoolean, placeholder, title } from '../../../component.constants';\n\nexport const meta = {\n name: 'DateRangeSelectFieldPro',\n label: 'Date-Range Picker - Presets',\n category: 'Dropdowns',\n defaultWidth: 300,\n defaultHeight: 120,\n inputs: [\n { ...title },\n { ...description },\n { ...placeholder, defaultValue: 'Select a date-range' },\n {\n ...genericBoolean,\n name: 'showCustomRangeOptions',\n label: 'Show custom date-range option',\n defaultValue: true,\n },\n {\n ...genericBoolean,\n name: 'showTwoMonths',\n label: 'Show two-month view',\n defaultValue: false,\n },\n { ...genericBoolean, name: 'clearable', label: 'Can be cleared', defaultValue: true },\n {\n name: 'selectedValue',\n type: 'timeRange',\n label: 'Selected Value',\n category: 'Pre-configured variables',\n },\n ],\n events: [\n {\n name: 'onChange',\n label: 'selected date-range updated',\n properties: [\n {\n name: 'value',\n label: 'selected date-range',\n type: 'timeRange',\n },\n ],\n },\n ],\n variables: [\n {\n name: 'date-range value',\n type: 'timeRange',\n defaultValue: Value.noFilter(),\n inputs: ['selectedValue'],\n events: [{ name: 'onChange', property: 'value' }],\n },\n ],\n} as const satisfies EmbeddedComponentMeta;\n\nexport default defineComponent(DateTimeSelectFieldPro, meta, {\n props: (inputs: Inputs<typeof meta>) => {\n return {\n ...inputs,\n };\n },\n events: {\n onChange: (range) => ({\n value: range ?? Value.noFilter(),\n }),\n },\n});\n"],"names":["meta","title","description","placeholder","genericBoolean","Value","DateRangeSelectFieldPro_emb","defineComponent","DateTimeSelectFieldPro","inputs","range"],"mappings":";;;;AAKO,MAAMA,IAAO;AAAA,EAClB,MAAM;AAAA,EACN,OAAO;AAAA,EACP,UAAU;AAAA,EACV,cAAc;AAAA,EACd,eAAe;AAAA,EACf,QAAQ;AAAA,IACN,EAAE,GAAGC,EAAA;AAAA,IACL,EAAE,GAAGC,EAAA;AAAA,IACL,EAAE,GAAGC,GAAa,cAAc,sBAAA;AAAA,IAChC;AAAA,MACE,GAAGC;AAAA,MACH,MAAM;AAAA,MACN,OAAO;AAAA,MACP,cAAc;AAAA,IAAA;AAAA,IAEhB;AAAA,MACE,GAAGA;AAAA,MACH,MAAM;AAAA,MACN,OAAO;AAAA,MACP,cAAc;AAAA,IAAA;AAAA,IAEhB,EAAE,GAAGA,GAAgB,MAAM,aAAa,OAAO,kBAAkB,cAAc,GAAA;AAAA,IAC/E;AAAA,MACE,MAAM;AAAA,MACN,MAAM;AAAA,MACN,OAAO;AAAA,MACP,UAAU;AAAA,IAAA;AAAA,EACZ;AAAA,EAEF,QAAQ;AAAA,IACN;AAAA,MACE,MAAM;AAAA,MACN,OAAO;AAAA,MACP,YAAY;AAAA,QACV;AAAA,UACE,MAAM;AAAA,UACN,OAAO;AAAA,UACP,MAAM;AAAA,QAAA;AAAA,MACR;AAAA,IACF;AAAA,EACF;AAAA,EAEF,WAAW;AAAA,IACT;AAAA,MACE,MAAM;AAAA,MACN,MAAM;AAAA,MACN,cAAcC,EAAM,SAAA;AAAA,MACpB,QAAQ,CAAC,eAAe;AAAA,MACxB,QAAQ,CAAC,EAAE,MAAM,YAAY,UAAU,SAAS;AAAA,IAAA;AAAA,EAClD;AAEJ,GAEAC,IAAeC,EAAgBC,GAAwBR,GAAM;AAAA,EAC3D,OAAO,CAACS,OACC;AAAA,IACL,GAAGA;AAAA,EAAA;AAAA,EAGP,QAAQ;AAAA,IACN,UAAU,CAACC,OAAW;AAAA,MACpB,OAAOA,KAASL,EAAM,SAAA;AAAA,IAAS;AAAA,EACjC;AAEJ,CAAC;"}
|
package/dist/DonutChartPro.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { V as a, l as s } from "./index-
|
|
1
|
+
import { V as a, l as s } from "./index-BIiign0L.js";
|
|
2
2
|
import { defineComponent as t } from "@embeddable.com/react";
|
|
3
|
-
import { D as o } from "./index-
|
|
4
|
-
import { v as n, D as r, w as i, F as m, G as l, I as d, Z as u, J as p, K as c } from "./component.constants-
|
|
3
|
+
import { D as o } from "./index-CNjwWCGc.js";
|
|
4
|
+
import { v as n, D as r, w as i, F as m, G as l, I as d, Z as u, J as p, K as c } from "./component.constants-DJqBv0qe.js";
|
|
5
5
|
const C = {
|
|
6
6
|
name: "DonutChartPro",
|
|
7
7
|
label: "Donut Chart",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { D as n } from "./index-
|
|
2
|
-
import { V as s, l as a } from "./index-
|
|
1
|
+
import { D as n } from "./index-Djoz2cf4.js";
|
|
2
|
+
import { V as s, l as a } from "./index-BIiign0L.js";
|
|
3
3
|
import { defineComponent as r } from "@embeddable.com/react";
|
|
4
|
-
import { v as o, D as t, w as l, F as i, G as m, I as d, Z as u, J as b, K as c } from "./component.constants-
|
|
4
|
+
import { v as o, D as t, w as l, F as i, G as m, I as d, Z as u, J as b, K as c } from "./component.constants-DJqBv0qe.js";
|
|
5
5
|
const p = {
|
|
6
6
|
name: "DonutLabelChartPro",
|
|
7
7
|
label: "Donut Label Chart",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { j as r, C as c,
|
|
2
|
-
import { useTheme as
|
|
3
|
-
import { a as
|
|
1
|
+
import { j as r, C as c, q as d, r as m, s as l } from "./index-BIiign0L.js";
|
|
2
|
+
import { useTheme as C } from "@embeddable.com/react";
|
|
3
|
+
import { a as p, i as x, a0 as j } from "./component.constants-DJqBv0qe.js";
|
|
4
4
|
const u = "_card_15bw3_1", f = {
|
|
5
5
|
card: u
|
|
6
6
|
}, b = ({
|
|
@@ -10,8 +10,8 @@ const u = "_card_15bw3_1", f = {
|
|
|
10
10
|
errorMessage: s,
|
|
11
11
|
...n
|
|
12
12
|
}) => {
|
|
13
|
-
const o =
|
|
14
|
-
|
|
13
|
+
const o = C();
|
|
14
|
+
p(o);
|
|
15
15
|
const i = () => s ? /* @__PURE__ */ r.jsx(
|
|
16
16
|
l,
|
|
17
17
|
{
|
|
@@ -29,4 +29,4 @@ const u = "_card_15bw3_1", f = {
|
|
|
29
29
|
export {
|
|
30
30
|
b as E
|
|
31
31
|
};
|
|
32
|
-
//# sourceMappingURL=EditorCard-
|
|
32
|
+
//# sourceMappingURL=EditorCard-DXQeyo3r.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditorCard-
|
|
1
|
+
{"version":3,"file":"EditorCard-DXQeyo3r.js","sources":["../src/components/editors/shared/EditorCard/EditorCard.tsx"],"sourcesContent":["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, CardFeedback, CardHeader } from '@embeddable.com/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 <CardFeedback\n variant=\"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":["EditorCard","title","subtitle","children","errorMessage","props","theme","useTheme","i18nSetup","getDisplay","jsx","CardFeedback","IconAlertCircle","i18n","Card","styles","CardHeader","CardContent"],"mappings":";;;;;GAeaA,IAAkC,CAAC;AAAA,EAC9C,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,cAAAC;AAAA,EACA,GAAGC;AACL,MAAM;AACJ,QAAMC,IAAeC,EAAA;AACrB,EAAAC,EAAUF,CAAK;AAEf,QAAMG,IAAa,MACbL,IAEAM,gBAAAA,EAAAA;AAAAA,IAACC;AAAA,IAAA;AAAA,MACC,SAAQ;AAAA,MACR,MAAMC;AAAA,MACN,OAAOC,EAAK,EAAE,oBAAoB;AAAA,MAClC,SAAST;AAAA,IAAA;AAAA,EAAA,IAKRD;AAGT,gCACGW,GAAA,EAAK,WAAWC,EAAO,MAAO,GAAGV,GAChC,UAAA;AAAA,IAAAK,gBAAAA,EAAAA,IAACM,GAAA,EAAW,OAAAf,GAAc,UAAAC,EAAA,CAAoB;AAAA,IAC9CQ,gBAAAA,EAAAA,IAACO,GAAA,EAAa,UAAAR,EAAA,EAAW,CAAE;AAAA,EAAA,GAC7B;AAEJ;"}
|
package/dist/HeatMapPro.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { l } from "./index-
|
|
1
|
+
import { l } from "./index-BIiign0L.js";
|
|
2
2
|
import { defineComponent as n } from "@embeddable.com/react";
|
|
3
|
-
import { H as i } from "./index-
|
|
4
|
-
import { v as m, D as s, z as t, F as u, G as d, d as a, g as p, c as r, H as g } from "./component.constants-
|
|
5
|
-
import { C as o } from "./Color.type.emb-
|
|
3
|
+
import { H as i } from "./index-BqgkyNm8.js";
|
|
4
|
+
import { v as m, D as s, z as t, F as u, G as d, d as a, g as p, c as r, H as g } from "./component.constants-DJqBv0qe.js";
|
|
5
|
+
import { C as o } from "./Color.type.emb-DFhAaPXz.js";
|
|
6
6
|
const c = {
|
|
7
7
|
name: "HeatMapPro",
|
|
8
8
|
label: "Heat Map",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineComponent as t } from "@embeddable.com/react";
|
|
2
|
-
import { v as l, D as s, y as p, b as c, F as g, G as d, g as o, c as r } from "./component.constants-
|
|
3
|
-
import { K as y } from "./index-
|
|
4
|
-
import { l as i } from "./index-
|
|
5
|
-
import { C } from "./ComparisonPeriod.type.emb-
|
|
2
|
+
import { v as l, D as s, y as p, b as c, F as g, G as d, g as o, c as r } from "./component.constants-DJqBv0qe.js";
|
|
3
|
+
import { K as y } from "./index-CfpIN_sB.js";
|
|
4
|
+
import { l as i } from "./index-BIiign0L.js";
|
|
5
|
+
import { C } from "./ComparisonPeriod.type.emb-C-YdNTEB.js";
|
|
6
6
|
const P = {
|
|
7
7
|
name: "KpiChartNumberComparisonPro",
|
|
8
8
|
label: "Kpi Chart - Number Comparison",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as r } from "@embeddable.com/react";
|
|
2
|
-
import { v as a, D as t, F as o, G as m, c as s } from "./component.constants-
|
|
3
|
-
import { K as i } from "./index-
|
|
4
|
-
import { l as p } from "./index-
|
|
2
|
+
import { v as a, D as t, F as o, G as m, c as s } from "./component.constants-DJqBv0qe.js";
|
|
3
|
+
import { K as i } from "./index-DD5t0omh.js";
|
|
4
|
+
import { l as p } from "./index-BIiign0L.js";
|
|
5
5
|
const n = {
|
|
6
6
|
name: "KpiChartNumberPro",
|
|
7
7
|
label: "Kpi Chart - Number",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { defineComponent as p } from "@embeddable.com/react";
|
|
2
|
-
import { v as c, E as n, g as o, w as d, b as g, y, F as u, G as x, I as C, J as f, K as D, M as b, N as h, O as R, P as L, S as v, T as A, H as P } from "./component.constants-
|
|
3
|
-
import { L as T } from "./index-
|
|
4
|
-
import { V, l as s } from "./index-
|
|
5
|
-
import { C as w } from "./ComparisonPeriod.type.emb-
|
|
6
|
-
import { C as l } from "./Color.type.emb-
|
|
2
|
+
import { v as c, E as n, g as o, w as d, b as g, y, F as u, G as x, I as C, J as f, K as D, M as b, N as h, O as R, P as L, S as v, T as A, H as P } from "./component.constants-DJqBv0qe.js";
|
|
3
|
+
import { L as T } from "./index-CSdnJs7F.js";
|
|
4
|
+
import { V, l as s } from "./index-BIiign0L.js";
|
|
5
|
+
import { C as w } from "./ComparisonPeriod.type.emb-C-YdNTEB.js";
|
|
6
|
+
import { C as l } from "./Color.type.emb-DFhAaPXz.js";
|
|
7
7
|
const F = {
|
|
8
8
|
name: "LineChartComparisonDefaultPro",
|
|
9
9
|
label: "Line Chart Comparison - Default",
|