@embeddable.com/remarkable-ui 0.1.33 → 0.1.34
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-Cr2L2Uki.js +110 -0
- package/dist/ChartCard-Cr2L2Uki.js.map +1 -0
- package/dist/{ComparisonPeriod.type.emb-9nwxR9Tl.js → ComparisonPeriod.type.emb-C7ixEJKv.js} +2 -2
- package/dist/{ComparisonPeriod.type.emb-9nwxR9Tl.js.map → ComparisonPeriod.type.emb-C7ixEJKv.js.map} +1 -1
- package/dist/ComparisonPeriodSelectFieldPro.js +6 -6
- package/dist/ComparisonPeriodSelectFieldPro.js.map +1 -1
- package/dist/DateRangeSelectFieldPro.js +5 -5
- package/dist/DonutChartPro.js +2 -2
- package/dist/DonutLabelChartPro.js +2 -2
- package/dist/{EditorCard-tBhUO9qV.js → EditorCard-B7s7sQ-B.js} +12 -12
- package/dist/{EditorCard-tBhUO9qV.js.map → EditorCard-B7s7sQ-B.js.map} +1 -1
- package/dist/{KpiChart-CqS9-4MK.js → KpiChart-PRQV9-IW.js} +15 -15
- package/dist/{KpiChart-CqS9-4MK.js.map → KpiChart-PRQV9-IW.js.map} +1 -1
- package/dist/KpiChartNumberComparisonPro.js +6 -6
- package/dist/KpiChartNumberPro.js +4 -4
- package/dist/LineChartComparisonDefaultPro.js +36 -36
- package/dist/LineChartComparisonDefaultPro.js.map +1 -1
- 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 → SingleSelectField-DXVRxF0n.js} +29 -29
- package/dist/{SingleSelectField-BwQahxL2.js.map → SingleSelectField-DXVRxF0n.js.map} +1 -1
- package/dist/SingleSelectFieldPro.js +2 -2
- package/dist/TableChartPaginated.js +281 -0
- package/dist/TableChartPaginated.js.map +1 -0
- package/dist/{bars.utils-BS6hyz6a.js → bars.utils-D2ZNn4I1.js} +4 -4
- package/dist/{bars.utils-BS6hyz6a.js.map → bars.utils-D2ZNn4I1.js.map} +1 -1
- package/dist/{charts.utils-CtjnpTZZ.js → charts.utils-BFYHGiMZ.js} +2350 -2320
- package/dist/charts.utils-BFYHGiMZ.js.map +1 -0
- package/dist/{component.constants-BtSbiLSA.js → component.constants-D59iJ42U.js} +3880 -3490
- package/dist/component.constants-D59iJ42U.js.map +1 -0
- package/dist/{editors.timeRange.utils-CteuBPel.js → editors.timeRange.utils-D9m6B3r1.js} +2 -2
- package/dist/{editors.timeRange.utils-CteuBPel.js.map → editors.timeRange.utils-D9m6B3r1.js.map} +1 -1
- package/dist/embeddable-components.json +12 -11
- package/dist/embeddable-theme-2b917.js +1310 -1275
- package/dist/{embeddable-types-4ace4.js → embeddable-types-363c8.js} +42 -35
- package/dist/embeddable-types.js.map +1 -1
- package/dist/{formatter.utils-DsSqaQLy.js → formatter.utils-DDLdrAl9.js} +2 -2
- package/dist/{formatter.utils-DsSqaQLy.js.map → formatter.utils-DDLdrAl9.js.map} +1 -1
- package/dist/{ga-DOnkmpCn.js → ga-BgTlCTPa.js} +5 -5
- package/dist/ga-BgTlCTPa.js.map +1 -0
- package/dist/{index-0EU9wBvd.js → index-Bh33sXJ4.js} +31 -32
- package/dist/{index-0EU9wBvd.js.map → index-Bh33sXJ4.js.map} +1 -1
- package/dist/{index-CVNg2zPD.js → index-BsjrQxtw.js} +8 -8
- package/dist/{index-CVNg2zPD.js.map → index-BsjrQxtw.js.map} +1 -1
- package/dist/index-CWufi8Tg.js +56 -0
- package/dist/index-CWufi8Tg.js.map +1 -0
- package/dist/{index-CuyqPNAk.js → index-D10laZQ1.js} +5 -5
- package/dist/{index-CuyqPNAk.js.map → index-D10laZQ1.js.map} +1 -1
- package/dist/{index-BFMal406.js → index-DWhYhJ0M.js} +8 -8
- package/dist/{index-BFMal406.js.map → index-DWhYhJ0M.js.map} +1 -1
- package/dist/{index-Bgt_jnmA.js → index-fW1psiZu.js} +9 -9
- package/dist/{index-Bgt_jnmA.js.map → index-fW1psiZu.js.map} +1 -1
- package/dist/index.js +182 -175
- package/dist/index.js.map +1 -1
- package/dist/{pies.utils-DCRmuFgI.js → pies.utils-D6CRlUd4.js} +4 -4
- package/dist/{pies.utils-DCRmuFgI.js.map → pies.utils-D6CRlUd4.js.map} +1 -1
- package/dist/remarkable-pro/components/charts/lines/LineChartComparisonDefaultPro/index.d.ts.map +1 -1
- package/dist/remarkable-pro/components/charts/shared/ChartCard/ChartCard.d.ts +4 -2
- package/dist/remarkable-pro/components/charts/shared/ChartCard/ChartCard.d.ts.map +1 -1
- package/dist/remarkable-pro/components/charts/shared/ChartCard/ChartCard.stories.d.ts +3 -2
- package/dist/remarkable-pro/components/charts/shared/ChartCard/ChartCard.stories.d.ts.map +1 -1
- package/dist/remarkable-pro/components/charts/shared/ChartCard/ChartCardMenuPro/ChartCardMenuPro.d.ts.map +1 -1
- package/dist/remarkable-pro/components/charts/shared/ChartCard/ChartCardMenuPro/ChartCardMenuPro.stories.d.ts +1 -0
- package/dist/remarkable-pro/components/charts/shared/ChartCard/ChartCardMenuPro/ChartCardMenuPro.stories.d.ts.map +1 -1
- package/dist/remarkable-pro/components/charts/shared/ChartCard/ChartCardMenuPro/ChartCardMenuPro.types.d.ts +1 -0
- package/dist/remarkable-pro/components/charts/shared/ChartCard/ChartCardMenuPro/ChartCardMenuPro.types.d.ts.map +1 -1
- package/dist/remarkable-pro/components/charts/tables/TableChartPaginated/index.d.ts +28 -0
- package/dist/remarkable-pro/components/charts/tables/TableChartPaginated/index.d.ts.map +1 -0
- package/dist/remarkable-pro/components/charts/tables/tables.utils.d.ts +17 -0
- package/dist/remarkable-pro/components/charts/tables/tables.utils.d.ts.map +1 -0
- package/dist/remarkable-pro/components/component.constants.d.ts +46 -0
- package/dist/remarkable-pro/components/component.constants.d.ts.map +1 -1
- package/dist/remarkable-pro/components/component.utils.d.ts +1 -1
- package/dist/remarkable-pro/components/component.utils.d.ts.map +1 -1
- package/dist/remarkable-pro/components/editors/DateRangeSelectFieldPro/DateRangeSelectFieldPro.utils.d.ts.map +1 -1
- package/dist/remarkable-pro/theme/i18n/translations/de.d.ts.map +1 -1
- package/dist/remarkable-pro/theme/i18n/translations/en.d.ts.map +1 -1
- package/dist/remarkable-ui/charts/tables/Table.hooks.d.ts +9 -0
- package/dist/remarkable-ui/charts/tables/Table.hooks.d.ts.map +1 -0
- package/dist/remarkable-ui/charts/tables/TablePaginated.d.ts +4 -0
- package/dist/remarkable-ui/charts/tables/TablePaginated.d.ts.map +1 -0
- package/dist/remarkable-ui/charts/tables/TablePaginated.stories.d.ts +6 -0
- package/dist/remarkable-ui/charts/tables/TablePaginated.stories.d.ts.map +1 -0
- package/dist/remarkable-ui/charts/tables/components/TableBody/TableBody.d.ts +4 -0
- package/dist/remarkable-ui/charts/tables/components/TableBody/TableBody.d.ts.map +1 -0
- package/dist/remarkable-ui/charts/tables/components/TableHeader/TableHeader.d.ts +4 -0
- package/dist/remarkable-ui/charts/tables/components/TableHeader/TableHeader.d.ts.map +1 -0
- package/dist/remarkable-ui/charts/tables/components/TablePagination/TablePagination.d.ts +6 -0
- package/dist/remarkable-ui/charts/tables/components/TablePagination/TablePagination.d.ts.map +1 -0
- package/dist/remarkable-ui/charts/tables/components/TablePagination/TablePagination.stories.d.ts +10 -0
- package/dist/remarkable-ui/charts/tables/components/TablePagination/TablePagination.stories.d.ts.map +1 -0
- package/dist/remarkable-ui/charts/tables/tables.types.d.ts +44 -0
- package/dist/remarkable-ui/charts/tables/tables.types.d.ts.map +1 -0
- package/dist/remarkable-ui/hooks/useDebounce.hook.d.ts +2 -0
- package/dist/remarkable-ui/hooks/useDebounce.hook.d.ts.map +1 -0
- package/dist/remarkable-ui/hooks/useObserverHeight.hook.d.ts +2 -0
- package/dist/remarkable-ui/hooks/useObserverHeight.hook.d.ts.map +1 -0
- package/dist/remarkable-ui/index.d.ts +3 -0
- package/dist/remarkable-ui/index.d.ts.map +1 -1
- package/dist/remarkable-ui/styles/styles.utils.d.ts +1 -1
- package/dist/remarkable-ui/styles/styles.utils.d.ts.map +1 -1
- package/dist/remarkable-ui.css +1 -1
- package/dist/{timeRange.utils-CWIlCcfG.js → timeRange.utils-D6gvWIhx.js} +2 -2
- package/dist/{timeRange.utils-CWIlCcfG.js.map → timeRange.utils-D6gvWIhx.js.map} +1 -1
- package/package.json +10 -12
- package/dist/BaseButton-D3Nh2VwK.js +0 -24
- package/dist/BaseButton-D3Nh2VwK.js.map +0 -1
- package/dist/ChartCard-BMfUGlQC.js +0 -109
- package/dist/ChartCard-BMfUGlQC.js.map +0 -1
- package/dist/charts.utils-CtjnpTZZ.js.map +0 -1
- package/dist/component.constants-BtSbiLSA.js.map +0 -1
- package/dist/ga-DOnkmpCn.js.map +0 -1
- package/dist/index-Fhr_BPX0.js +0 -56
- package/dist/index-Fhr_BPX0.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-D59iJ42U.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-Cr2L2Uki.js";
|
|
4
|
+
import { g as J, a as K, B as N } from "./bars.utils-D2ZNn4I1.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-D59iJ42U.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-Cr2L2Uki.js";
|
|
4
|
+
import { g as J, a as K, B as N } from "./bars.utils-D2ZNn4I1.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-D59iJ42U.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-Cr2L2Uki.js";
|
|
4
|
+
import { b as N, a as Q, B as U } from "./bars.utils-D2ZNn4I1.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-D59iJ42U.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-Cr2L2Uki.js";
|
|
4
|
+
import { b as N, a as Q, B as U } from "./bars.utils-D2ZNn4I1.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-D59iJ42U.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-Cr2L2Uki.js";
|
|
4
|
+
import { b as Q, a as U, B as X } from "./bars.utils-D2ZNn4I1.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-D59iJ42U.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-Cr2L2Uki.js";
|
|
4
|
+
import { b as Q, a as U, B as Y } from "./bars.utils-D2ZNn4I1.js";
|
|
5
5
|
import { u as Z } from "./charts.newFillGaps.hooks-8oF8pYjr.js";
|
|
6
6
|
const $ = (a) => {
|
|
7
7
|
var n, l;
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { ac as N, j as t, aN as v, i as f, ao as k, ar as D, U as C, ap as L, aj as S, ah as w, ai as I, af as R, al as M, am as x, aO as $ } from "./component.constants-D59iJ42U.js";
|
|
2
|
+
import _, { useRef as T } from "react";
|
|
3
|
+
import { useTheme as j } from "@embeddable.com/react";
|
|
4
|
+
/**
|
|
5
|
+
* @license @tabler/icons-react v3.35.0 - MIT
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license.
|
|
8
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/
|
|
10
|
+
const b = [["path", { d: "M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0", key: "svg-0" }], ["path", { d: "M12 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0", key: "svg-1" }], ["path", { d: "M12 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0", key: "svg-2" }]], P = N("outline", "dots-vertical", "DotsVertical", b), A = "_skeleton_12e7h_10", B = {
|
|
11
|
+
skeleton: A
|
|
12
|
+
}, E = () => /* @__PURE__ */ t.jsx("div", { className: B.skeleton }), O = "_chartCard_hyfnm_1", V = "_error_hyfnm_6", F = "_rightContent_hyfnm_12", H = "_fixedContent_hyfnm_18", K = "_loading_hyfnm_27", a = {
|
|
13
|
+
chartCard: O,
|
|
14
|
+
error: V,
|
|
15
|
+
rightContent: F,
|
|
16
|
+
fixedContent: H,
|
|
17
|
+
loading: K
|
|
18
|
+
}, U = "_loading_7lgag_7", q = {
|
|
19
|
+
loading: U
|
|
20
|
+
}, y = () => /* @__PURE__ */ t.jsx(v, { className: q.loading }), z = "_list_mwshn_1", G = {
|
|
21
|
+
list: z
|
|
22
|
+
}, J = (e) => {
|
|
23
|
+
var h, m;
|
|
24
|
+
const r = j();
|
|
25
|
+
f(r);
|
|
26
|
+
const [g, s] = _.useState(!1), c = ((m = (h = r.charts) == null ? void 0 : h.chartCardMenuPro) == null ? void 0 : m.options) ?? [];
|
|
27
|
+
if (c.length === 0)
|
|
28
|
+
return null;
|
|
29
|
+
const l = (n) => {
|
|
30
|
+
setTimeout(() => {
|
|
31
|
+
Promise.resolve(n()).finally(() => s(!1));
|
|
32
|
+
}, 100);
|
|
33
|
+
}, d = (n) => {
|
|
34
|
+
if (s(!0), e.onCustomDownload) {
|
|
35
|
+
e.onCustomDownload((o) => l(() => n(o)));
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
l(() => n({ ...e, theme: r }));
|
|
39
|
+
};
|
|
40
|
+
return /* @__PURE__ */ t.jsx(
|
|
41
|
+
k,
|
|
42
|
+
{
|
|
43
|
+
side: "bottom",
|
|
44
|
+
align: "end",
|
|
45
|
+
triggerComponent: g ? /* @__PURE__ */ t.jsx(y, {}) : /* @__PURE__ */ t.jsx(S, { icon: P }),
|
|
46
|
+
children: /* @__PURE__ */ t.jsx(D, { className: G.list, autoFocus: !0, children: c.map((n, o) => {
|
|
47
|
+
const i = C.t(n.labelKey);
|
|
48
|
+
return /* @__PURE__ */ t.jsx(
|
|
49
|
+
L,
|
|
50
|
+
{
|
|
51
|
+
label: i,
|
|
52
|
+
onClick: () => d(n.onClick),
|
|
53
|
+
startIcon: n.iconSrc ? /* @__PURE__ */ t.jsx("img", { src: n.iconSrc, alt: `${i} icon` }) : void 0
|
|
54
|
+
},
|
|
55
|
+
o
|
|
56
|
+
);
|
|
57
|
+
}) })
|
|
58
|
+
}
|
|
59
|
+
);
|
|
60
|
+
}, Q = _.forwardRef(
|
|
61
|
+
({ title: e, subtitle: r, children: g, data: s, errorMessage: c, dimensionsAndMeasures: l = [], ...d }, h) => {
|
|
62
|
+
var u;
|
|
63
|
+
const m = j();
|
|
64
|
+
f(m);
|
|
65
|
+
const n = T(null), o = !!(s != null && s.data && ((u = s.data) == null ? void 0 : u.length) > 0), i = !s || (s == null ? void 0 : s.isLoading), p = () => i && !o ? /* @__PURE__ */ t.jsx(E, {}) : c ? /* @__PURE__ */ t.jsx(
|
|
66
|
+
x,
|
|
67
|
+
{
|
|
68
|
+
className: a.error,
|
|
69
|
+
icon: $,
|
|
70
|
+
title: C.t("charts.errorTitle"),
|
|
71
|
+
message: c
|
|
72
|
+
}
|
|
73
|
+
) : o ? g : /* @__PURE__ */ t.jsx(
|
|
74
|
+
x,
|
|
75
|
+
{
|
|
76
|
+
title: C.t("charts.emptyTitle"),
|
|
77
|
+
message: C.t("charts.emptyMessage")
|
|
78
|
+
}
|
|
79
|
+
);
|
|
80
|
+
return /* @__PURE__ */ t.jsxs(w, { className: a.chartCard, ...d, children: [
|
|
81
|
+
/* @__PURE__ */ t.jsx(
|
|
82
|
+
I,
|
|
83
|
+
{
|
|
84
|
+
title: e,
|
|
85
|
+
subtitle: r,
|
|
86
|
+
rightContent: /* @__PURE__ */ t.jsxs("div", { "data-no-export": !0, className: a.rightContent, children: [
|
|
87
|
+
/* @__PURE__ */ t.jsx("div", { className: R(a.fixedContent, i && a.loading), children: /* @__PURE__ */ t.jsx(y, {}) }),
|
|
88
|
+
/* @__PURE__ */ t.jsx("div", { className: a.fixedContent, children: /* @__PURE__ */ t.jsx(
|
|
89
|
+
J,
|
|
90
|
+
{
|
|
91
|
+
title: e,
|
|
92
|
+
containerRef: n,
|
|
93
|
+
data: s == null ? void 0 : s.data,
|
|
94
|
+
dimensionsAndMeasures: l,
|
|
95
|
+
onCustomDownload: d.onCustomDownload
|
|
96
|
+
}
|
|
97
|
+
) })
|
|
98
|
+
] })
|
|
99
|
+
}
|
|
100
|
+
),
|
|
101
|
+
/* @__PURE__ */ t.jsx(M, { ref: h, children: p() })
|
|
102
|
+
] });
|
|
103
|
+
}
|
|
104
|
+
);
|
|
105
|
+
Q.displayName = "ChartCard";
|
|
106
|
+
export {
|
|
107
|
+
Q as C,
|
|
108
|
+
E as S
|
|
109
|
+
};
|
|
110
|
+
//# sourceMappingURL=ChartCard-Cr2L2Uki.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChartCard-Cr2L2Uki.js","sources":["../node_modules/@tabler/icons-react/dist/esm/icons/IconDotsVertical.mjs","../src/remarkable-ui/shared/Skeleton/Skeleton.tsx","../src/remarkable-pro/components/charts/shared/ChartCard/ChartCardLoading/ChartCardLoading.tsx","../src/remarkable-pro/components/charts/shared/ChartCard/ChartCardMenuPro/ChartCardMenuPro.tsx","../src/remarkable-pro/components/charts/shared/ChartCard/ChartCard.tsx"],"sourcesContent":["/**\n * @license @tabler/icons-react v3.35.0 - MIT\n *\n * This source code is licensed under the MIT license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createReactComponent from '../createReactComponent.mjs';\n\nconst __iconNode = [[\"path\", { \"d\": \"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0\", \"key\": \"svg-0\" }], [\"path\", { \"d\": \"M12 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0\", \"key\": \"svg-1\" }], [\"path\", { \"d\": \"M12 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0\", \"key\": \"svg-2\" }]];\nconst IconDotsVertical = createReactComponent(\"outline\", \"dots-vertical\", \"DotsVertical\", __iconNode);\n\nexport { __iconNode, IconDotsVertical as default };\n//# sourceMappingURL=IconDotsVertical.mjs.map\n","import styles from './Skeleton.module.css';\n\nexport const Skeleton = () => {\n return <div className={styles.skeleton} />;\n};\n","import { IconLoader2 } from '@tabler/icons-react';\nimport styles from './ChartCardLoading.module.css';\n\nexport const ChartCardLoading = () => <IconLoader2 className={styles.loading} />;\n","import { IconDotsVertical } from '@tabler/icons-react';\nimport React from 'react';\nimport { useTheme } from '@embeddable.com/react';\nimport { ChartCardLoading } from '../ChartCardLoading/ChartCardLoading';\nimport { i18n, i18nSetup } from '../../../../../theme/i18n/i18n';\nimport { Theme } from '../../../../../theme/theme.types';\nimport {\n Dropdown,\n IconButton,\n SelectList,\n SelectListOption,\n} from '../../../../../../remarkable-ui';\nimport { ChartCardMenuProOptionOnClickProps } from './ChartCardMenuPro.types';\nimport styles from './ChartCardMenuPro.module.css';\n\ntype ChartCardMenuProProps = Omit<ChartCardMenuProOptionOnClickProps, 'theme'>;\n\nexport const ChartCardMenuPro: React.FC<ChartCardMenuProProps> = (props) => {\n const theme: Theme = useTheme() as Theme;\n i18nSetup(theme);\n\n const [isLoading, setIsLoading] = React.useState(false);\n\n const options = theme.charts?.chartCardMenuPro?.options ?? [];\n\n if (options.length === 0) {\n return null;\n }\n\n const startAction = (onClick: () => void | Promise<void>) => {\n setTimeout(() => {\n Promise.resolve(onClick()).finally(() => setIsLoading(false));\n }, 100);\n };\n\n const handleExport = (onClick: (props: ChartCardMenuProOptionOnClickProps) => void) => {\n setIsLoading(true);\n if (props.onCustomDownload) {\n props.onCustomDownload((args) => startAction(() => onClick(args)));\n return;\n }\n startAction(() => onClick({ ...props, theme }));\n };\n\n return (\n <Dropdown\n side=\"bottom\"\n align=\"end\"\n triggerComponent={isLoading ? <ChartCardLoading /> : <IconButton icon={IconDotsVertical} />}\n >\n <SelectList className={styles.list} autoFocus>\n {options.map((option, index) => {\n const label = i18n.t(option.labelKey);\n\n return (\n <SelectListOption\n key={index}\n label={label}\n onClick={() => handleExport(option.onClick)}\n startIcon={\n option.iconSrc ? <img src={option.iconSrc} alt={`${label} icon`} /> : undefined\n }\n />\n );\n })}\n </SelectList>\n </Dropdown>\n );\n};\n","import React, { CSSProperties, useRef } from 'react';\nimport { IconAlertCircle } from '@tabler/icons-react';\nimport {\n Card,\n CardContent,\n CardContentInfo,\n CardHeader,\n Skeleton,\n} from '../../../../../remarkable-ui';\nimport styles from './ChartCard.module.css';\nimport { DataResponse, Dimension, Measure } from '@embeddable.com/core';\nimport { useTheme } from '@embeddable.com/react';\nimport { ChartCardLoading } from './ChartCardLoading/ChartCardLoading';\nimport { ChartCardMenuPro } from './ChartCardMenuPro/ChartCardMenuPro';\nimport { Theme } from '../../../../theme/theme.types';\nimport { i18n, i18nSetup } from '../../../../theme/i18n/i18n';\nimport { ChartCardMenuProOptionOnClickProps } from './ChartCardMenuPro/ChartCardMenuPro.types';\nimport clsx from 'clsx';\n\ntype ChartCardProps = {\n title: string;\n subtitle?: string;\n children: React.ReactNode;\n data: DataResponse;\n isLoading?: boolean;\n errorMessage?: string;\n style?: CSSProperties;\n dimensionsAndMeasures?: (Dimension | Measure)[];\n onCustomDownload?: (props: (props: ChartCardMenuProOptionOnClickProps) => void) => void;\n};\n\nexport const ChartCard = React.forwardRef<HTMLDivElement, ChartCardProps>(\n (\n { title, subtitle, children, data, errorMessage, dimensionsAndMeasures = [], ...props },\n ref,\n ) => {\n const theme: Theme = useTheme() as Theme;\n i18nSetup(theme);\n\n const chartRef = useRef<HTMLDivElement>(null);\n\n const hasData = Boolean(data?.data && data.data?.length > 0);\n\n const isLoading = !data || data?.isLoading;\n\n const getDisplay = () => {\n if (isLoading && !hasData) {\n return <Skeleton />;\n }\n\n if (errorMessage) {\n return (\n <CardContentInfo\n className={styles.error}\n icon={IconAlertCircle}\n title={i18n.t('charts.errorTitle')}\n message={errorMessage}\n />\n );\n }\n\n if (!hasData) {\n return (\n <CardContentInfo\n title={i18n.t('charts.emptyTitle')}\n message={i18n.t('charts.emptyMessage')}\n />\n );\n }\n\n return children;\n };\n\n return (\n <Card className={styles.chartCard} {...props}>\n <CardHeader\n title={title}\n subtitle={subtitle}\n rightContent={\n <div data-no-export className={styles.rightContent}>\n <div className={clsx(styles.fixedContent, isLoading && styles.loading)}>\n <ChartCardLoading />\n </div>\n <div className={styles.fixedContent}>\n <ChartCardMenuPro\n title={title}\n containerRef={chartRef}\n data={data?.data}\n dimensionsAndMeasures={dimensionsAndMeasures}\n onCustomDownload={props.onCustomDownload}\n />\n </div>\n </div>\n }\n />\n\n <CardContent ref={ref}>{getDisplay()}</CardContent>\n </Card>\n );\n },\n);\n\nChartCard.displayName = 'ChartCard';\n"],"names":["__iconNode","IconDotsVertical","createReactComponent","Skeleton","jsx","styles","ChartCardLoading","IconLoader2","ChartCardMenuPro","props","theme","useTheme","i18nSetup","isLoading","setIsLoading","React","options","_b","_a","startAction","onClick","handleExport","args","Dropdown","IconButton","SelectList","option","index","label","i18n","SelectListOption","ChartCard","title","subtitle","children","data","errorMessage","dimensionsAndMeasures","ref","chartRef","useRef","hasData","getDisplay","CardContentInfo","IconAlertCircle","Card","CardHeader","jsxs","clsx","CardContent"],"mappings":";;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMA,IAAa,CAAC,CAAC,QAAQ,EAAE,GAAK,4CAA4C,KAAO,QAAO,CAAE,GAAG,CAAC,QAAQ,EAAE,GAAK,4CAA4C,KAAO,SAAS,GAAG,CAAC,QAAQ,EAAE,GAAK,2CAA2C,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ACGgB,GAAA,EAAK,WAAWxC,EAAO,WAAY,GAAGI,GACrC,UAAA;AAAA,MAAAL,gBAAAA,EAAAA;AAAAA,QAAC0C;AAAA,QAAA;AAAA,UACC,OAAAd;AAAA,UACA,UAAAC;AAAA,UACA,cACEc,gBAAAA,EAAAA,KAAC,OAAA,EAAI,kBAAc,IAAC,WAAW1C,EAAO,cACpC,UAAA;AAAA,YAAAD,gBAAAA,EAAAA,IAAC,OAAA,EAAI,WAAW4C,EAAK3C,EAAO,cAAcQ,KAAaR,EAAO,OAAO,GACnE,UAAAD,gBAAAA,EAAAA,IAACE,GAAA,CAAA,CAAiB,GACpB;AAAA,YACAF,gBAAAA,EAAAA,IAAC,OAAA,EAAI,WAAWC,EAAO,cACrB,UAAAD,gBAAAA,EAAAA;AAAAA,cAACI;AAAA,cAAA;AAAA,gBACC,OAAAwB;AAAA,gBACA,cAAcO;AAAA,gBACd,MAAMJ,KAAA,gBAAAA,EAAM;AAAA,gBACZ,uBAAAE;AAAA,gBACA,kBAAkB5B,EAAM;AAAA,cAAA;AAAA,YAAA,EAC1B,CACF;AAAA,UAAA,EAAA,CACF;AAAA,QAAA;AAAA,MAAA;AAAA,MAIJL,gBAAAA,EAAAA,IAAC6C,GAAA,EAAY,KAAAX,GAAW,UAAAI,EAAA,EAAW,CAAE;AAAA,IAAA,GACvC;AAAA,EAEJ;AACF;AAEAX,EAAU,cAAc;","x_google_ignoreList":[0]}
|
package/dist/{ComparisonPeriod.type.emb-9nwxR9Tl.js → ComparisonPeriod.type.emb-C7ixEJKv.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { aP as i, aQ as o } from "./component.constants-D59iJ42U.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-C7ixEJKv.js.map
|
package/dist/{ComparisonPeriod.type.emb-9nwxR9Tl.js.map → ComparisonPeriod.type.emb-C7ixEJKv.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComparisonPeriod.type.emb-
|
|
1
|
+
{"version":3,"file":"ComparisonPeriod.type.emb-C7ixEJKv.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,12 +1,12 @@
|
|
|
1
1
|
import { useTheme as v, defineComponent as h } from "@embeddable.com/react";
|
|
2
|
-
import {
|
|
2
|
+
import { ac as y, a2 as P, i as f, r as b, j as l, U as C, t as S, c as F, ad as R, V as d } from "./component.constants-D59iJ42U.js";
|
|
3
3
|
import { useMemo as M, useEffect as k } from "react";
|
|
4
|
-
import { S as D } from "./SingleSelectField-
|
|
5
|
-
import { g as T, u as j, a as x } from "./editors.timeRange.utils-
|
|
6
|
-
import { E as L } from "./EditorCard-
|
|
7
|
-
import { C as s } from "./ComparisonPeriod.type.emb-
|
|
4
|
+
import { S as D } from "./SingleSelectField-DXVRxF0n.js";
|
|
5
|
+
import { g as T, u as j, a as x } from "./editors.timeRange.utils-D9m6B3r1.js";
|
|
6
|
+
import { E as L } from "./EditorCard-B7s7sQ-B.js";
|
|
7
|
+
import { C as s } from "./ComparisonPeriod.type.emb-C7ixEJKv.js";
|
|
8
8
|
/**
|
|
9
|
-
* @license @tabler/icons-react v3.
|
|
9
|
+
* @license @tabler/icons-react v3.35.0 - MIT
|
|
10
10
|
*
|
|
11
11
|
* This source code is licensed under the MIT license.
|
|
12
12
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComparisonPeriodSelectFieldPro.js","sources":["../node_modules/@tabler/icons-react/dist/esm/icons/IconCalendarTime.mjs","../src/remarkable-pro/components/editors/ComparisonPeriodSelectFieldPro/ComparisonPeriodSelectFieldPro.utils.ts","../src/remarkable-pro/components/editors/ComparisonPeriodSelectFieldPro/index.tsx","../src/remarkable-pro/components/editors/ComparisonPeriodSelectFieldPro/ComparisonPeriodSelectFieldPro.emb.ts"],"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\": \"M11.795 21h-6.795a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v4\", \"key\": \"svg-0\" }], [\"path\", { \"d\": \"M18 18m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0\", \"key\": \"svg-1\" }], [\"path\", { \"d\": \"M15 3v4\", \"key\": \"svg-2\" }], [\"path\", { \"d\": \"M7 3v4\", \"key\": \"svg-3\" }], [\"path\", { \"d\": \"M3 11h16\", \"key\": \"svg-4\" }], [\"path\", { \"d\": \"M18 16.496v1.504l1 1\", \"key\": \"svg-5\" }]];\nconst IconCalendarTime = createReactComponent(\"outline\", \"calendar-time\", \"CalendarTime\", __iconNode);\n\nexport { __iconNode, IconCalendarTime as default };\n//# sourceMappingURL=IconCalendarTime.mjs.map\n","import { SelectListOptionProps } from '../../../../remarkable-ui';\nimport { TimeRange } from '@embeddable.com/core';\nimport { ComparisonPeriodSelectFieldProOption } from './ComparisonPeriodSelectFieldPro.types';\nimport { getTimeRangeLabel } from '../editors.timeRange.utils';\nimport { resolveI18nString } from '../../component.utils';\n\n// Checks if the comparison period type is available in the embeddable types\nexport const isComparisonPeriodAvailable = (\n option: string | undefined,\n comparisonPeriodSelectFieldProOptions: ComparisonPeriodSelectFieldProOption[],\n): boolean => {\n return !option || comparisonPeriodSelectFieldProOptions.some((opt) => opt.value === option);\n};\n\nexport const getComparisonPeriodSelectFieldProOptions = (\n comparisonPeriodSelectFieldProOptions: ComparisonPeriodSelectFieldProOption[],\n toCompareTimeRange: TimeRange,\n): SelectListOptionProps[] => {\n return comparisonPeriodSelectFieldProOptions.map((option) => {\n return {\n rightLabel: toCompareTimeRange\n ? getTimeRangeLabel(option.getRange(toCompareTimeRange), option.dateFormat)\n : '',\n value: option.value,\n label: resolveI18nString(option.label),\n };\n });\n};\n","import { useTheme } from '@embeddable.com/react';\nimport { SingleSelectField } from '../../../../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 { IconCalendarTime } from '@tabler/icons-react';\nimport { i18n, i18nSetup } from '../../../theme/i18n/i18n';\nimport {\n getComparisonPeriodSelectFieldProOptions,\n isComparisonPeriodAvailable,\n} from './ComparisonPeriodSelectFieldPro.utils';\nimport { getTimeRangeFromTo } from '../editors.timeRange.utils';\nimport { useEffect, useMemo } from 'react';\n\ntype DateComparisonSelectFieldPro = {\n title?: string;\n description?: string;\n placeholder?: string;\n primaryDateRange?: TimeRange;\n comparisonPeriod?: string;\n onChange: (newComparisonPeriod?: string) => void;\n};\n\nconst DateComparisonSelectFieldPro = (props: DateComparisonSelectFieldPro) => {\n const theme: Theme = useTheme() as Theme;\n i18nSetup(theme);\n\n const { description, placeholder, title, comparisonPeriod, onChange } = resolveI18nProps(props);\n\n const comparisonPeriodOptions = theme.defaults.comparisonPeriodsOptions;\n\n const comparisonPeriodAvailable = useMemo(\n () => isComparisonPeriodAvailable(comparisonPeriod, comparisonPeriodOptions),\n [comparisonPeriod, comparisonPeriodOptions],\n );\n\n // If the current comparison period is not available, reset the field\n useEffect(() => {\n if (!comparisonPeriodAvailable) {\n onChange(undefined);\n }\n }, [comparisonPeriodAvailable, onChange]);\n\n const { dayjsLocaleReady } = useLoadDayjsLocale();\n\n // Obtain the actual range for the selected primaryDateRange\n const primaryDateRange = getTimeRangeFromTo(props.primaryDateRange, theme);\n\n if (!dayjsLocaleReady) {\n return null;\n }\n\n const options = getComparisonPeriodSelectFieldProOptions(\n comparisonPeriodOptions,\n primaryDateRange,\n );\n\n return (\n <EditorCard title={title} subtitle={description}>\n <SingleSelectField\n startIcon={IconCalendarTime}\n isClearable\n placeholder={placeholder}\n value={comparisonPeriodAvailable ? comparisonPeriod : undefined}\n onChange={onChange}\n options={options}\n noOptionsMessage={i18n.t('common.noOptionsAvailable')}\n />\n </EditorCard>\n );\n};\n\nexport default DateComparisonSelectFieldPro;\n","import { defineComponent, EmbeddedComponentMeta, Inputs } from '@embeddable.com/react';\nimport { Value } from '@embeddable.com/core';\nimport ComparisonPeriodSelectFieldPro from './index';\nimport { description, placeholder, title } from '../../component.constants';\nimport ComparisonPeriodType from '../../types/ComparisonPeriod.type.emb';\n\nexport const meta = {\n name: 'ComparisonPeriodSelectFieldPro',\n label: 'Comparison Period Select Field',\n category: 'Dropdowns',\n defaultWidth: 300,\n defaultHeight: 120,\n inputs: [\n { ...title },\n { ...description },\n { ...placeholder, defaultValue: 'Select a date-comparison' },\n {\n name: 'primaryDateRange',\n type: 'timeRange',\n label: 'Primary Date Range',\n category: 'Pre-configured variables',\n description: 'Pick the main time period. The comparison range is based on this selection.',\n },\n {\n name: 'comparisonPeriod',\n type: ComparisonPeriodType,\n label: 'Selected Comparison Period',\n category: 'Pre-configured variables',\n },\n ],\n events: [\n {\n name: 'onChange',\n label: 'selected comparison-period updated',\n properties: [\n {\n name: 'value',\n label: 'selected comparison-period',\n type: ComparisonPeriodType,\n },\n ],\n },\n ],\n variables: [\n {\n name: 'comparison-period value',\n type: ComparisonPeriodType,\n defaultValue: Value.noFilter(),\n inputs: ['comparisonPeriod'],\n events: [{ name: 'onChange', property: 'value' }],\n },\n ],\n} as const satisfies EmbeddedComponentMeta;\n\nexport default defineComponent(ComparisonPeriodSelectFieldPro, meta, {\n /* @ts-expect-error - to be fixed in @embeddable.com/react */\n props: (inputs: Inputs<typeof meta>) => inputs,\n events: {\n onChange: (value) => {\n return {\n value: value || Value.noFilter(),\n };\n },\n },\n});\n"],"names":["__iconNode","IconCalendarTime","createReactComponent","isComparisonPeriodAvailable","option","comparisonPeriodSelectFieldProOptions","opt","getComparisonPeriodSelectFieldProOptions","toCompareTimeRange","getTimeRangeLabel","resolveI18nString","DateComparisonSelectFieldPro","props","theme","useTheme","i18nSetup","description","placeholder","title","comparisonPeriod","onChange","resolveI18nProps","comparisonPeriodOptions","comparisonPeriodAvailable","useMemo","useEffect","dayjsLocaleReady","useLoadDayjsLocale","primaryDateRange","getTimeRangeFromTo","options","jsx","EditorCard","SingleSelectField","i18n","meta","ComparisonPeriodType","Value","ComparisonPeriodSelectFieldPro_emb","defineComponent","ComparisonPeriodSelectFieldPro","inputs","value"],"mappings":";;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMA,IAAa,CAAC,CAAC,QAAQ,EAAE,GAAK,2EAA2E,KAAO,SAAS,GAAG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AAO,CAACM,MAAgCA;AAAA,EACxC,QAAQ;AAAA,IACN,UAAU,CAACC,OACF;AAAA,MACL,OAAOA,KAASL,EAAM,SAAA;AAAA,IAAS;AAAA,EAEnC;AAEJ,CAAC;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"ComparisonPeriodSelectFieldPro.js","sources":["../node_modules/@tabler/icons-react/dist/esm/icons/IconCalendarTime.mjs","../src/remarkable-pro/components/editors/ComparisonPeriodSelectFieldPro/ComparisonPeriodSelectFieldPro.utils.ts","../src/remarkable-pro/components/editors/ComparisonPeriodSelectFieldPro/index.tsx","../src/remarkable-pro/components/editors/ComparisonPeriodSelectFieldPro/ComparisonPeriodSelectFieldPro.emb.ts"],"sourcesContent":["/**\n * @license @tabler/icons-react v3.35.0 - MIT\n *\n * This source code is licensed under the MIT license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createReactComponent from '../createReactComponent.mjs';\n\nconst __iconNode = [[\"path\", { \"d\": \"M11.795 21h-6.795a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v4\", \"key\": \"svg-0\" }], [\"path\", { \"d\": \"M18 18m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0\", \"key\": \"svg-1\" }], [\"path\", { \"d\": \"M15 3v4\", \"key\": \"svg-2\" }], [\"path\", { \"d\": \"M7 3v4\", \"key\": \"svg-3\" }], [\"path\", { \"d\": \"M3 11h16\", \"key\": \"svg-4\" }], [\"path\", { \"d\": \"M18 16.496v1.504l1 1\", \"key\": \"svg-5\" }]];\nconst IconCalendarTime = createReactComponent(\"outline\", \"calendar-time\", \"CalendarTime\", __iconNode);\n\nexport { __iconNode, IconCalendarTime as default };\n//# sourceMappingURL=IconCalendarTime.mjs.map\n","import { SelectListOptionProps } from '../../../../remarkable-ui';\nimport { TimeRange } from '@embeddable.com/core';\nimport { ComparisonPeriodSelectFieldProOption } from './ComparisonPeriodSelectFieldPro.types';\nimport { getTimeRangeLabel } from '../editors.timeRange.utils';\nimport { resolveI18nString } from '../../component.utils';\n\n// Checks if the comparison period type is available in the embeddable types\nexport const isComparisonPeriodAvailable = (\n option: string | undefined,\n comparisonPeriodSelectFieldProOptions: ComparisonPeriodSelectFieldProOption[],\n): boolean => {\n return !option || comparisonPeriodSelectFieldProOptions.some((opt) => opt.value === option);\n};\n\nexport const getComparisonPeriodSelectFieldProOptions = (\n comparisonPeriodSelectFieldProOptions: ComparisonPeriodSelectFieldProOption[],\n toCompareTimeRange: TimeRange,\n): SelectListOptionProps[] => {\n return comparisonPeriodSelectFieldProOptions.map((option) => {\n return {\n rightLabel: toCompareTimeRange\n ? getTimeRangeLabel(option.getRange(toCompareTimeRange), option.dateFormat)\n : '',\n value: option.value,\n label: resolveI18nString(option.label),\n };\n });\n};\n","import { useTheme } from '@embeddable.com/react';\nimport { SingleSelectField } from '../../../../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 { IconCalendarTime } from '@tabler/icons-react';\nimport { i18n, i18nSetup } from '../../../theme/i18n/i18n';\nimport {\n getComparisonPeriodSelectFieldProOptions,\n isComparisonPeriodAvailable,\n} from './ComparisonPeriodSelectFieldPro.utils';\nimport { getTimeRangeFromTo } from '../editors.timeRange.utils';\nimport { useEffect, useMemo } from 'react';\n\ntype DateComparisonSelectFieldPro = {\n title?: string;\n description?: string;\n placeholder?: string;\n primaryDateRange?: TimeRange;\n comparisonPeriod?: string;\n onChange: (newComparisonPeriod?: string) => void;\n};\n\nconst DateComparisonSelectFieldPro = (props: DateComparisonSelectFieldPro) => {\n const theme: Theme = useTheme() as Theme;\n i18nSetup(theme);\n\n const { description, placeholder, title, comparisonPeriod, onChange } = resolveI18nProps(props);\n\n const comparisonPeriodOptions = theme.defaults.comparisonPeriodsOptions;\n\n const comparisonPeriodAvailable = useMemo(\n () => isComparisonPeriodAvailable(comparisonPeriod, comparisonPeriodOptions),\n [comparisonPeriod, comparisonPeriodOptions],\n );\n\n // If the current comparison period is not available, reset the field\n useEffect(() => {\n if (!comparisonPeriodAvailable) {\n onChange(undefined);\n }\n }, [comparisonPeriodAvailable, onChange]);\n\n const { dayjsLocaleReady } = useLoadDayjsLocale();\n\n // Obtain the actual range for the selected primaryDateRange\n const primaryDateRange = getTimeRangeFromTo(props.primaryDateRange, theme);\n\n if (!dayjsLocaleReady) {\n return null;\n }\n\n const options = getComparisonPeriodSelectFieldProOptions(\n comparisonPeriodOptions,\n primaryDateRange,\n );\n\n return (\n <EditorCard title={title} subtitle={description}>\n <SingleSelectField\n startIcon={IconCalendarTime}\n isClearable\n placeholder={placeholder}\n value={comparisonPeriodAvailable ? comparisonPeriod : undefined}\n onChange={onChange}\n options={options}\n noOptionsMessage={i18n.t('common.noOptionsAvailable')}\n />\n </EditorCard>\n );\n};\n\nexport default DateComparisonSelectFieldPro;\n","import { defineComponent, EmbeddedComponentMeta, Inputs } from '@embeddable.com/react';\nimport { Value } from '@embeddable.com/core';\nimport ComparisonPeriodSelectFieldPro from './index';\nimport { description, placeholder, title } from '../../component.constants';\nimport ComparisonPeriodType from '../../types/ComparisonPeriod.type.emb';\n\nexport const meta = {\n name: 'ComparisonPeriodSelectFieldPro',\n label: 'Comparison Period Select Field',\n category: 'Dropdowns',\n defaultWidth: 300,\n defaultHeight: 120,\n inputs: [\n { ...title },\n { ...description },\n { ...placeholder, defaultValue: 'Select a date-comparison' },\n {\n name: 'primaryDateRange',\n type: 'timeRange',\n label: 'Primary Date Range',\n category: 'Pre-configured variables',\n description: 'Pick the main time period. The comparison range is based on this selection.',\n },\n {\n name: 'comparisonPeriod',\n type: ComparisonPeriodType,\n label: 'Selected Comparison Period',\n category: 'Pre-configured variables',\n },\n ],\n events: [\n {\n name: 'onChange',\n label: 'selected comparison-period updated',\n properties: [\n {\n name: 'value',\n label: 'selected comparison-period',\n type: ComparisonPeriodType,\n },\n ],\n },\n ],\n variables: [\n {\n name: 'comparison-period value',\n type: ComparisonPeriodType,\n defaultValue: Value.noFilter(),\n inputs: ['comparisonPeriod'],\n events: [{ name: 'onChange', property: 'value' }],\n },\n ],\n} as const satisfies EmbeddedComponentMeta;\n\nexport default defineComponent(ComparisonPeriodSelectFieldPro, meta, {\n /* @ts-expect-error - to be fixed in @embeddable.com/react */\n props: (inputs: Inputs<typeof meta>) => inputs,\n events: {\n onChange: (value) => {\n return {\n value: value || Value.noFilter(),\n };\n },\n },\n});\n"],"names":["__iconNode","IconCalendarTime","createReactComponent","isComparisonPeriodAvailable","option","comparisonPeriodSelectFieldProOptions","opt","getComparisonPeriodSelectFieldProOptions","toCompareTimeRange","getTimeRangeLabel","resolveI18nString","DateComparisonSelectFieldPro","props","theme","useTheme","i18nSetup","description","placeholder","title","comparisonPeriod","onChange","resolveI18nProps","comparisonPeriodOptions","comparisonPeriodAvailable","useMemo","useEffect","dayjsLocaleReady","useLoadDayjsLocale","primaryDateRange","getTimeRangeFromTo","options","jsx","EditorCard","SingleSelectField","i18n","meta","ComparisonPeriodType","Value","ComparisonPeriodSelectFieldPro_emb","defineComponent","ComparisonPeriodSelectFieldPro","inputs","value"],"mappings":";;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMA,IAAa,CAAC,CAAC,QAAQ,EAAE,GAAK,2EAA2E,KAAO,SAAS,GAAG,CAAC,QAAQ,EAAE,GAAK,4CAA4C,KAAO,SAAS,GAAG,CAAC,QAAQ,EAAE,GAAK,WAAW,KAAO,QAAO,CAAE,GAAG,CAAC,QAAQ,EAAE,GAAK,UAAU,KAAO,SAAS,GAAG,CAAC,QAAQ,EAAE,GAAK,YAAY,KAAO,SAAS,GAAG,CAAC,QAAQ,EAAE,GAAK,wBAAwB,KAAO,QAAO,CAAE,CAAC,GAC9YC,IAAmBC,EAAqB,WAAW,iBAAiB,gBAAgBF,CAAU,GC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,GAExD;AAEJ,GClEaC,IAAO;AAAA,EAClB,MAAM;AAAA,EACN,OAAO;AAAA,EACP,UAAU;AAAA,EACV,cAAc;AAAA,EACd,eAAe;AAAA,EACf,QAAQ;AAAA,IACN,EAAE,GAAGjB,EAAA;AAAA,IACL,EAAE,GAAGF,EAAA;AAAA,IACL,EAAE,GAAGC,GAAa,cAAc,2BAAA;AAAA,IAChC;AAAA,MACE,MAAM;AAAA,MACN,MAAM;AAAA,MACN,OAAO;AAAA,MACP,UAAU;AAAA,MACV,aAAa;AAAA,IAAA;AAAA,IAEf;AAAA,MACE,MAAM;AAAA,MACN,MAAMmB;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,MAAMA;AAAA,QAAA;AAAA,MACR;AAAA,IACF;AAAA,EACF;AAAA,EAEF,WAAW;AAAA,IACT;AAAA,MACE,MAAM;AAAA,MACN,MAAMA;AAAA,MACN,cAAcC,EAAM,SAAA;AAAA,MACpB,QAAQ,CAAC,kBAAkB;AAAA,MAC3B,QAAQ,CAAC,EAAE,MAAM,YAAY,UAAU,SAAS;AAAA,IAAA;AAAA,EAClD;AAEJ,GAEAC,IAAeC,EAAgBC,GAAgCL,GAAM;AAAA;AAAA,EAEnE,OAAO,CAACM,MAAgCA;AAAA,EACxC,QAAQ;AAAA,IACN,UAAU,CAACC,OACF;AAAA,MACL,OAAOA,KAASL,EAAM,SAAA;AAAA,IAAS;AAAA,EAEnC;AAEJ,CAAC;","x_google_ignoreList":[0]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as t } from "@embeddable.com/react";
|
|
2
|
-
import { t as l, c as n,
|
|
3
|
-
import { D as o } from "./index-
|
|
4
|
-
const
|
|
2
|
+
import { t as l, c as n, ad as r, V as a } from "./component.constants-D59iJ42U.js";
|
|
3
|
+
import { D as o } from "./index-CWufi8Tg.js";
|
|
4
|
+
const d = {
|
|
5
5
|
name: "DateRangeSelectFieldPro",
|
|
6
6
|
label: "Date Range Select Field",
|
|
7
7
|
category: "Dropdowns",
|
|
@@ -40,7 +40,7 @@ const i = {
|
|
|
40
40
|
events: [{ name: "onChange", property: "value" }]
|
|
41
41
|
}
|
|
42
42
|
]
|
|
43
|
-
}, p = t(o,
|
|
43
|
+
}, p = t(o, d, {
|
|
44
44
|
props: (e) => ({
|
|
45
45
|
...e
|
|
46
46
|
}),
|
|
@@ -56,6 +56,6 @@ const i = {
|
|
|
56
56
|
});
|
|
57
57
|
export {
|
|
58
58
|
p as default,
|
|
59
|
-
|
|
59
|
+
d as meta
|
|
60
60
|
};
|
|
61
61
|
//# sourceMappingURL=DateRangeSelectFieldPro.js.map
|
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-D59iJ42U.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-DWhYhJ0M.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-fW1psiZu.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-D59iJ42U.js";
|
|
3
3
|
import { defineComponent as c } from "@embeddable.com/react";
|
|
4
4
|
const p = {
|
|
5
5
|
name: "DonutLabelChartPro",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ac as l, j as r, af as m, i as u, ah as p, ai as _, al as x, am as f, U as h, aO as C } from "./component.constants-D59iJ42U.js";
|
|
2
2
|
import { useEffect as j } from "react";
|
|
3
3
|
import { useTheme as S } from "@embeddable.com/react";
|
|
4
4
|
/**
|
|
5
|
-
* @license @tabler/icons-react v3.
|
|
5
|
+
* @license @tabler/icons-react v3.35.0 - MIT
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license.
|
|
8
8
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -10,8 +10,8 @@ import { useTheme as S } from "@embeddable.com/react";
|
|
|
10
10
|
const b = [["path", { d: "M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0", key: "svg-0" }], ["path", { d: "M21 21l-6 -6", key: "svg-1" }]], g = l("outline", "search", "Search", b), v = "_listOptions_2o1ip_1", y = "_disabled_2o1ip_6", o = {
|
|
11
11
|
listOptions: v,
|
|
12
12
|
disabled: y
|
|
13
|
-
}, k = ({ children: t, disabled: e, ...s }) => /* @__PURE__ */ r.jsx("div", { className:
|
|
14
|
-
function
|
|
13
|
+
}, k = ({ children: t, disabled: e, ...s }) => /* @__PURE__ */ r.jsx("div", { className: m(o.listOptions, e && o.disabled), ...s, children: t });
|
|
14
|
+
function A(t, e = 300) {
|
|
15
15
|
let s;
|
|
16
16
|
return (...a) => {
|
|
17
17
|
clearTimeout(s), s = setTimeout(() => {
|
|
@@ -19,16 +19,16 @@ function D(t, e = 300) {
|
|
|
19
19
|
}, e);
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
|
-
const
|
|
22
|
+
const D = (t, e) => {
|
|
23
23
|
j(() => {
|
|
24
24
|
t && setTimeout(() => {
|
|
25
25
|
var s;
|
|
26
26
|
(s = e.current) == null || s.focus();
|
|
27
27
|
}, 100);
|
|
28
28
|
}, [t, e]);
|
|
29
|
-
},
|
|
30
|
-
error:
|
|
31
|
-
card:
|
|
29
|
+
}, O = "_error_1xvr5_1", T = "_card_1xvr5_7", c = {
|
|
30
|
+
error: O,
|
|
31
|
+
card: T
|
|
32
32
|
}, H = ({
|
|
33
33
|
title: t,
|
|
34
34
|
subtitle: e,
|
|
@@ -37,7 +37,7 @@ const A = (t, e) => {
|
|
|
37
37
|
...n
|
|
38
38
|
}) => {
|
|
39
39
|
const i = S();
|
|
40
|
-
|
|
40
|
+
u(i);
|
|
41
41
|
const d = () => a ? /* @__PURE__ */ r.jsx(
|
|
42
42
|
f,
|
|
43
43
|
{
|
|
@@ -56,7 +56,7 @@ export {
|
|
|
56
56
|
H as E,
|
|
57
57
|
g as I,
|
|
58
58
|
k as S,
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
A as d,
|
|
60
|
+
D as u
|
|
61
61
|
};
|
|
62
|
-
//# sourceMappingURL=EditorCard-
|
|
62
|
+
//# sourceMappingURL=EditorCard-B7s7sQ-B.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditorCard-
|
|
1
|
+
{"version":3,"file":"EditorCard-B7s7sQ-B.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.35.0 - MIT\n *\n * This source code is licensed under the MIT license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createReactComponent from '../createReactComponent.mjs';\n\nconst __iconNode = [[\"path\", { \"d\": \"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0\", \"key\": \"svg-0\" }], [\"path\", { \"d\": \"M21 21l-6 -6\", \"key\": \"svg-1\" }]];\nconst IconSearch = createReactComponent(\"outline\", \"search\", \"Search\", __iconNode);\n\nexport { __iconNode, IconSearch as default };\n//# sourceMappingURL=IconSearch.mjs.map\n","import { FC } from 'react';\nimport styles from './SelectListOptions.module.css';\nimport clsx from 'clsx';\n\nexport type SelectListOptionsProps = React.HTMLAttributes<HTMLDivElement> & {\n children: React.ReactNode;\n disabled?: boolean;\n};\n\nexport const SelectListOptions: FC<SelectListOptionsProps> = ({ children, disabled, ...props }) => {\n return (\n <div className={clsx(styles.listOptions, disabled && styles.disabled)} {...props}>\n {children}\n </div>\n );\n};\n","// 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,18 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ac as j, j as n, af as x, ag as d } from "./component.constants-D59iJ42U.js";
|
|
2
2
|
/**
|
|
3
|
-
* @license @tabler/icons-react v3.
|
|
3
|
+
* @license @tabler/icons-react v3.35.0 - MIT
|
|
4
4
|
*
|
|
5
5
|
* This source code is licensed under the MIT license.
|
|
6
6
|
* See the LICENSE file in the root directory of this source tree.
|
|
7
7
|
*/
|
|
8
8
|
const v = [["path", { d: "M3 7l6 6l4 -4l8 8", key: "svg-0" }], ["path", { d: "M21 10l0 7l-7 0", key: "svg-1" }]], y = j("outline", "trending-down", "TrendingDown", v);
|
|
9
9
|
/**
|
|
10
|
-
* @license @tabler/icons-react v3.
|
|
10
|
+
* @license @tabler/icons-react v3.35.0 - MIT
|
|
11
11
|
*
|
|
12
12
|
* This source code is licensed under the MIT license.
|
|
13
13
|
* See the LICENSE file in the root directory of this source tree.
|
|
14
14
|
*/
|
|
15
|
-
const
|
|
15
|
+
const f = [["path", { d: "M3 17l6 -6l4 4l8 -8", key: "svg-0" }], ["path", { d: "M14 7l7 0l0 7", key: "svg-1" }]], m = j("outline", "trending-up", "TrendingUp", f), N = "_kpiChartContainer_joxtc_1", T = "_kpiComparisonContainer_joxtc_26", $ = "_kpiChangeHidden_joxtc_47", k = {
|
|
16
16
|
kpiChartContainer: N,
|
|
17
17
|
kpiComparisonContainer: T,
|
|
18
18
|
kpiChangeHidden: $
|
|
@@ -24,37 +24,37 @@ const m = [["path", { d: "M3 17l6 -6l4 4l8 -8", key: "svg-0" }], ["path", { d: "
|
|
|
24
24
|
}, I = (i, e) => i ? e ? o.negative : o.positive : e ? o.positive : o.negative, K = ({
|
|
25
25
|
value: i,
|
|
26
26
|
comparisonValue: e = 0,
|
|
27
|
-
showChangeAsPercentage:
|
|
27
|
+
showChangeAsPercentage: c,
|
|
28
28
|
invertChangeColors: C = !1,
|
|
29
|
-
comparisonLabel:
|
|
29
|
+
comparisonLabel: r,
|
|
30
30
|
valueFormatter: p,
|
|
31
31
|
percentageDecimalPlaces: g = 1,
|
|
32
32
|
className: h
|
|
33
33
|
}) => {
|
|
34
34
|
const s = i - e, t = s > 0;
|
|
35
35
|
let a;
|
|
36
|
-
|
|
37
|
-
const l = `${t ? "+" : ""}${a}`, _ = t ?
|
|
36
|
+
c ? a = `${(e === 0 ? 0 : s / e * 100).toFixed(g)}%` : a = p ? p(s) : s.toString();
|
|
37
|
+
const l = `${t ? "+" : ""}${a}`, _ = t ? m : y;
|
|
38
38
|
return /* @__PURE__ */ n.jsxs("div", { className: x(h, o.kpiChartChangeContainer), children: [
|
|
39
39
|
/* @__PURE__ */ n.jsxs("div", { className: x(o.kpiChangeBadge, I(t, C)), children: [
|
|
40
40
|
/* @__PURE__ */ n.jsx(_, {}),
|
|
41
41
|
/* @__PURE__ */ n.jsx(d, { children: l })
|
|
42
42
|
] }),
|
|
43
|
-
|
|
43
|
+
r && /* @__PURE__ */ n.jsx(d, { children: r })
|
|
44
44
|
] });
|
|
45
45
|
}, R = ({
|
|
46
46
|
value: i,
|
|
47
47
|
changeFontSize: e,
|
|
48
|
-
comparisonValue:
|
|
48
|
+
comparisonValue: c,
|
|
49
49
|
comparisonLabel: C,
|
|
50
|
-
invertChangeColors:
|
|
50
|
+
invertChangeColors: r,
|
|
51
51
|
showChangeAsPercentage: p,
|
|
52
52
|
percentageDecimalPlaces: g = 1,
|
|
53
53
|
equalComparisonLabel: h = "No change",
|
|
54
54
|
valueFontSize: s,
|
|
55
55
|
valueFormatter: t
|
|
56
56
|
}) => {
|
|
57
|
-
const a =
|
|
57
|
+
const a = c !== void 0, l = a && c === i, _ = t ? t(i) : i;
|
|
58
58
|
return /* @__PURE__ */ n.jsxs("div", { className: k.kpiChartContainer, children: [
|
|
59
59
|
/* @__PURE__ */ n.jsx(d, { style: { fontSize: s }, children: _ }),
|
|
60
60
|
/* @__PURE__ */ n.jsx("div", { className: k.kpiComparisonContainer, style: { fontSize: e }, children: l ? /* @__PURE__ */ n.jsx(d, { children: h }) : /* @__PURE__ */ n.jsx(
|
|
@@ -63,8 +63,8 @@ const m = [["path", { d: "M3 17l6 -6l4 4l8 -8", key: "svg-0" }], ["path", { d: "
|
|
|
63
63
|
changeFontSize: e,
|
|
64
64
|
className: x(!a && k.kpiChangeHidden),
|
|
65
65
|
comparisonLabel: C,
|
|
66
|
-
comparisonValue:
|
|
67
|
-
invertChangeColors:
|
|
66
|
+
comparisonValue: c,
|
|
67
|
+
invertChangeColors: r,
|
|
68
68
|
percentageDecimalPlaces: g,
|
|
69
69
|
showChangeAsPercentage: p,
|
|
70
70
|
value: i,
|
|
@@ -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-PRQV9-IW.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KpiChart-
|
|
1
|
+
{"version":3,"file":"KpiChart-PRQV9-IW.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.35.0 - MIT\n *\n * This source code is licensed under the MIT license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createReactComponent from '../createReactComponent.mjs';\n\nconst __iconNode = [[\"path\", { \"d\": \"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.35.0 - MIT\n *\n * This source code is licensed under the MIT license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createReactComponent from '../createReactComponent.mjs';\n\nconst __iconNode = [[\"path\", { \"d\": \"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,I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AE9D,SACEY,gBAAAA,EAAAA,KAAC,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,11 +1,11 @@
|
|
|
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 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-
|
|
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-D59iJ42U.js";
|
|
3
|
+
import { C as O } from "./ChartCard-Cr2L2Uki.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-PRQV9-IW.js";
|
|
6
|
+
import { g as X } from "./formatter.utils-DDLdrAl9.js";
|
|
7
|
+
import { g as Z, a as $ } from "./timeRange.utils-D6gvWIhx.js";
|
|
8
|
+
import { C as k } from "./ComparisonPeriod.type.emb-C7ixEJKv.js";
|
|
9
9
|
const G = (e) => {
|
|
10
10
|
var d, C, P, h, u, f;
|
|
11
11
|
const a = j();
|