@embeddable.com/remarkable-ui 0.1.14 → 0.1.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/BarChartDefaultHorizontalPro.js +3 -3
- package/dist/BarChartDefaultPro.js +3 -3
- package/dist/BarChartGroupedHorizontalPro.js +3 -3
- package/dist/BarChartGroupedPro.js +3 -3
- package/dist/BarChartStackedHorizontalPro.js +3 -3
- package/dist/BarChartStackedPro.js +3 -3
- package/dist/{BaseButton-BbhHQD9t.js → BaseButton-BJ_6r0uk.js} +2 -2
- package/dist/{BaseButton-BbhHQD9t.js.map → BaseButton-BJ_6r0uk.js.map} +1 -1
- package/dist/{ChartCard-11lQWjXq.js → ChartCard-Cb0QE9kP.js} +3 -3
- package/dist/{ChartCard-11lQWjXq.js.map → ChartCard-Cb0QE9kP.js.map} +1 -1
- package/dist/{ComparisonPeriod.type.emb-D51Sg3wt.js → ComparisonPeriod.type.emb-61HEPz26.js} +2 -2
- package/dist/{ComparisonPeriod.type.emb-D51Sg3wt.js.map → ComparisonPeriod.type.emb-61HEPz26.js.map} +1 -1
- package/dist/ComparisonPeriodSelectFieldPro.js +4 -4
- package/dist/DateRangeSelectFieldPro.js +2 -2
- package/dist/DonutChartPro.js +2 -2
- package/dist/DonutLabelChartPro.js +2 -2
- package/dist/{EditorCard-BriyqUva.js → EditorCard-DWz8Bm-e.js} +2 -2
- package/dist/{EditorCard-BriyqUva.js.map → EditorCard-DWz8Bm-e.js.map} +1 -1
- package/dist/{KpiChart-Cp9ZUyRz.js → KpiChart-CzUK0Dgw.js} +2 -2
- package/dist/{KpiChart-Cp9ZUyRz.js.map → KpiChart-CzUK0Dgw.js.map} +1 -1
- package/dist/KpiChartNumberComparisonPro.js +5 -5
- package/dist/KpiChartNumberPro.js +4 -4
- package/dist/MultiSelectFieldPro.js +2 -2
- package/dist/PieChartPro.js +2 -2
- package/dist/{SingleSelectField-D1E9OJxC.js → SingleSelectField-BJnoOYrw.js} +3 -3
- package/dist/{SingleSelectField-D1E9OJxC.js.map → SingleSelectField-BJnoOYrw.js.map} +1 -1
- package/dist/SingleSelectFieldPro.js +2 -2
- package/dist/{charts.fillGaps.hooks-t2xhHbW-.js → charts.fillGaps.hooks-BFmuMVNT.js} +4 -4
- package/dist/{charts.fillGaps.hooks-t2xhHbW-.js.map → charts.fillGaps.hooks-BFmuMVNT.js.map} +1 -1
- package/dist/{component.constants-DIhZCTG3.js → component.constants-Bn9l4N1t.js} +3 -2
- package/dist/{component.constants-DIhZCTG3.js.map → component.constants-Bn9l4N1t.js.map} +1 -1
- package/dist/embeddable-components.json +8 -8
- package/dist/{formatter.utils-CuZlh4EL.js → formatter.utils-Ba_5cIcm.js} +2 -2
- package/dist/{formatter.utils-CuZlh4EL.js.map → formatter.utils-Ba_5cIcm.js.map} +1 -1
- package/dist/{index-C-zjH8iP.js → index-6ilf5W1J.js} +5 -5
- package/dist/{index-C-zjH8iP.js.map → index-6ilf5W1J.js.map} +1 -1
- package/dist/{index-Ddf7wtBP.js → index-BhW48cz5.js} +5 -5
- package/dist/{index-Ddf7wtBP.js.map → index-BhW48cz5.js.map} +1 -1
- package/dist/{index-YRbjfwIA.js → index-CobXKlOi.js} +4 -4
- package/dist/{index-YRbjfwIA.js.map → index-CobXKlOi.js.map} +1 -1
- package/dist/{index-9F910tDw.js → index-DEzAFKmN.js} +4 -4
- package/dist/{index-9F910tDw.js.map → index-DEzAFKmN.js.map} +1 -1
- package/dist/{index-DqKfDjMs.js → index-DYBt2TuY.js} +5 -5
- package/dist/{index-DqKfDjMs.js.map → index-DYBt2TuY.js.map} +1 -1
- package/dist/{index-B8y21zu2.js → index-Dwb4Z6Hd.js} +4 -4
- package/dist/{index-B8y21zu2.js.map → index-Dwb4Z6Hd.js.map} +1 -1
- package/dist/index.js +18 -18
- package/dist/{object.utils-DhhMwS2t.js → object.utils-C6JIOYmv.js} +3 -3
- package/dist/{object.utils-DhhMwS2t.js.map → object.utils-C6JIOYmv.js.map} +1 -1
- package/dist/{pies.utils-Cmzdr27l.js → pies.utils-CSx7w1mv.js} +4 -4
- package/dist/{pies.utils-Cmzdr27l.js.map → pies.utils-CSx7w1mv.js.map} +1 -1
- package/dist/remarkable-pro/components/component.constants.d.ts +1 -0
- package/dist/remarkable-pro/components/component.constants.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { i as L, r as w, m as M, j as n, 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 F, l as W, n as Y, V as E, o as G } from "./component.constants-
|
|
1
|
+
import { i as L, r as w, m as M, j as n, 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 F, l as W, n as Y, V as E, o as G } from "./component.constants-Bn9l4N1t.js";
|
|
2
2
|
import { useTheme as O, defineComponent as _ } from "@embeddable.com/react";
|
|
3
|
-
import { C as q } from "./ChartCard-
|
|
4
|
-
import { u as J, g as K, a as N, B as Q } from "./charts.fillGaps.hooks-
|
|
3
|
+
import { C as q } from "./ChartCard-Cb0QE9kP.js";
|
|
4
|
+
import { u as J, g as K, a as N, B as Q } from "./charts.fillGaps.hooks-BFmuMVNT.js";
|
|
5
5
|
const U = (a) => {
|
|
6
6
|
var o, i;
|
|
7
7
|
const e = O();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { i as L, r as y, m as w, j as n, 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 F, p as W, q as X, u as q, v as z, V as E, o as G } from "./component.constants-
|
|
1
|
+
import { i as L, r as y, m as w, j as n, 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 F, p as W, q as X, u as q, v as z, V as E, o as G } from "./component.constants-Bn9l4N1t.js";
|
|
2
2
|
import { useTheme as O, defineComponent as _ } from "@embeddable.com/react";
|
|
3
|
-
import { C as H } from "./ChartCard-
|
|
4
|
-
import { u as J, g as K, a as N, B as Q } from "./charts.fillGaps.hooks-
|
|
3
|
+
import { C as H } from "./ChartCard-Cb0QE9kP.js";
|
|
4
|
+
import { u as J, g as K, a as N, B as Q } from "./charts.fillGaps.hooks-BFmuMVNT.js";
|
|
5
5
|
const U = (a) => {
|
|
6
6
|
var i, o;
|
|
7
7
|
const s = O();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { i as f, r as w, m as k, j as l, d as z, w as G, b as P, z as M, t as H, c as R, s as j, e as v, f as S, g as T, x as F, y as Y, h as W, k as E, l as I, V as u, o as O } from "./component.constants-
|
|
1
|
+
import { i as f, r as w, m as k, j as l, d as z, w as G, b as P, z as M, t as H, c as R, s as j, e as v, f as S, g as T, x as F, y as Y, h as W, k as E, l as I, V as u, o as O } from "./component.constants-Bn9l4N1t.js";
|
|
2
2
|
import { useTheme as _, defineComponent as q } from "@embeddable.com/react";
|
|
3
|
-
import { C as J } from "./ChartCard-
|
|
4
|
-
import { u as K, b as N, a as Q, B as U } from "./charts.fillGaps.hooks-
|
|
3
|
+
import { C as J } from "./ChartCard-Cb0QE9kP.js";
|
|
4
|
+
import { u as K, b as N, a as Q, B as U } from "./charts.fillGaps.hooks-BFmuMVNT.js";
|
|
5
5
|
const X = (a) => {
|
|
6
6
|
var t, n;
|
|
7
7
|
const e = _();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { i as L, r as w, m as G, j as l, d as k, w as P, b as M, z as R, t as j, c as v, s as S, e as T, f as F, g as X, x as z, y as W, p as q, q as E, u as I, V as u, o as O } from "./component.constants-
|
|
1
|
+
import { i as L, r as w, m as G, j as l, d as k, w as P, b as M, z as R, t as j, c as v, s as S, e as T, f as F, g as X, x as z, y as W, p as q, q as E, u as I, V as u, o as O } from "./component.constants-Bn9l4N1t.js";
|
|
2
2
|
import { useTheme as _, defineComponent as H } from "@embeddable.com/react";
|
|
3
|
-
import { C as J } from "./ChartCard-
|
|
4
|
-
import { u as K, b as N, a as Q, B as U } from "./charts.fillGaps.hooks-
|
|
3
|
+
import { C as J } from "./ChartCard-Cb0QE9kP.js";
|
|
4
|
+
import { u as K, b as N, a as Q, B as U } from "./charts.fillGaps.hooks-BFmuMVNT.js";
|
|
5
5
|
const Y = (e) => {
|
|
6
6
|
var t, n;
|
|
7
7
|
const a = _();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { i as L, r as w, m as f, j as l, d as S, w as z, b as P, z as M, t as H, c as R, s as T, e as j, f as v, g as F, x as G, y as Y, h as W, k as E, l as I, A as O, V as m, o as _ } from "./component.constants-
|
|
1
|
+
import { i as L, r as w, m as f, j as l, d as S, w as z, b as P, z as M, t as H, c as R, s as T, e as j, f as v, g as F, x as G, y as Y, h as W, k as E, l as I, A as O, V as m, o as _ } from "./component.constants-Bn9l4N1t.js";
|
|
2
2
|
import { useTheme as q, defineComponent as J } from "@embeddable.com/react";
|
|
3
|
-
import { C as K } from "./ChartCard-
|
|
4
|
-
import { u as N, b as Q, a as U, B as X } from "./charts.fillGaps.hooks-
|
|
3
|
+
import { C as K } from "./ChartCard-Cb0QE9kP.js";
|
|
4
|
+
import { u as N, b as Q, a as U, B as X } from "./charts.fillGaps.hooks-BFmuMVNT.js";
|
|
5
5
|
const Z = (a) => {
|
|
6
6
|
var i, n;
|
|
7
7
|
const e = q();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { i as L, r as f, m as w, j as l, d as S, w as P, b as M, z as R, t as T, c as j, s as v, e as F, f as G, g as X, x as z, y as W, p as q, q as E, u as I, A as O, V as m, o as _ } from "./component.constants-
|
|
1
|
+
import { i as L, r as f, m as w, j as l, d as S, w as P, b as M, z as R, t as T, c as j, s as v, e as F, f as G, g as X, x as z, y as W, p as q, q as E, u as I, A as O, V as m, o as _ } from "./component.constants-Bn9l4N1t.js";
|
|
2
2
|
import { useTheme as H, defineComponent as J } from "@embeddable.com/react";
|
|
3
|
-
import { C as K } from "./ChartCard-
|
|
4
|
-
import { u as N, b as Q, a as U, B as Y } from "./charts.fillGaps.hooks-
|
|
3
|
+
import { C as K } from "./ChartCard-Cb0QE9kP.js";
|
|
4
|
+
import { u as N, b as Q, a as U, B as Y } from "./charts.fillGaps.hooks-BFmuMVNT.js";
|
|
5
5
|
const Z = (a) => {
|
|
6
6
|
var o, n;
|
|
7
7
|
const e = H();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as c, a1 as e } from "./component.constants-
|
|
1
|
+
import { j as c, a1 as e } from "./component.constants-Bn9l4N1t.js";
|
|
2
2
|
const i = "_baseButton_1tlim_1", m = "_primary_1tlim_15", _ = "_secondary_1tlim_35", u = "_icon_1tlim_56", t = {
|
|
3
3
|
baseButton: i,
|
|
4
4
|
primary: m,
|
|
@@ -21,4 +21,4 @@ const i = "_baseButton_1tlim_1", m = "_primary_1tlim_15", _ = "_secondary_1tlim_
|
|
|
21
21
|
export {
|
|
22
22
|
l as B
|
|
23
23
|
};
|
|
24
|
-
//# sourceMappingURL=BaseButton-
|
|
24
|
+
//# sourceMappingURL=BaseButton-BJ_6r0uk.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseButton-
|
|
1
|
+
{"version":3,"file":"BaseButton-BJ_6r0uk.js","sources":["../src/remarkable-ui/shared/BaseButton/BaseButton.tsx"],"sourcesContent":["import clsx from 'clsx';\nimport React from 'react';\nimport styles from './BaseButton.module.css';\n\nexport type BaseButtonProps = {\n variant?: 'primary' | 'secondary';\n size?: 'small' | 'medium';\n ref?: React.Ref<HTMLButtonElement>;\n} & React.ButtonHTMLAttributes<HTMLButtonElement>;\n\nexport const BaseButton: React.FC<BaseButtonProps> = ({\n variant = 'primary',\n size = 'medium',\n className,\n children,\n ...props\n}) => {\n return (\n <button\n className={clsx(styles.baseButton, styles[variant], styles[size], className)}\n {...props}\n >\n {children}\n </button>\n );\n};\n"],"names":["BaseButton","variant","size","className","children","props","jsx","clsx","styles"],"mappings":";;;;;;GAUaA,IAAwC,CAAC;AAAA,EACpD,SAAAC,IAAU;AAAA,EACV,MAAAC,IAAO;AAAA,EACP,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,GAAGC;AACL,MAEIC,gBAAAA,EAAAA;AAAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWC,EAAKC,EAAO,YAAYA,EAAOP,CAAO,GAAGO,EAAON,CAAI,GAAGC,CAAS;AAAA,IAC1E,GAAGE;AAAA,IAEH,UAAAD;AAAA,EAAA;AAAA;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Z as p, j as t, a1 as k, av as y, i as x, a8 as v, ab as N, R as d, a9 as B, a2 as I, a3 as L, a5 as S, a7 as C, aw as R } from "./component.constants-
|
|
1
|
+
import { Z as p, j as t, a1 as k, av as y, i as x, a8 as v, ab as N, R as d, a9 as B, a2 as I, a3 as L, a5 as S, a7 as C, aw as R } from "./component.constants-Bn9l4N1t.js";
|
|
2
2
|
import D, { useRef as M } from "react";
|
|
3
3
|
import { useTheme as f } from "@embeddable.com/react";
|
|
4
|
-
import { B as $ } from "./BaseButton-
|
|
4
|
+
import { B as $ } from "./BaseButton-BJ_6r0uk.js";
|
|
5
5
|
/**
|
|
6
6
|
* @license @tabler/icons-react v3.34.1 - MIT
|
|
7
7
|
*
|
|
@@ -103,4 +103,4 @@ export {
|
|
|
103
103
|
V as I,
|
|
104
104
|
P as S
|
|
105
105
|
};
|
|
106
|
-
//# sourceMappingURL=ChartCard-
|
|
106
|
+
//# sourceMappingURL=ChartCard-Cb0QE9kP.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChartCard-11lQWjXq.js","sources":["../node_modules/@tabler/icons-react/dist/esm/icons/IconDotsVertical.mjs","../src/remarkable-ui/shared/Skeleton/Skeleton.tsx","../src/remarkable-ui/shared/IconButton/IconButton.tsx","../src/remarkable-pro/components/charts/shared/ChartCard/ChartCardLoading/ChartCardLoading.tsx","../src/remarkable-pro/components/charts/shared/ChartCard/ChartCardMenuPro/ChartCardMenuPro.tsx","../src/remarkable-pro/components/charts/shared/ChartCard/ChartCard.tsx"],"sourcesContent":["/**\n * @license @tabler/icons-react v3.34.1 - MIT\n *\n * This source code is licensed under the MIT license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createReactComponent from '../createReactComponent.mjs';\n\nconst __iconNode = [[\"path\", { \"d\": \"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0\", \"key\": \"svg-0\" }], [\"path\", { \"d\": \"M12 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0\", \"key\": \"svg-1\" }], [\"path\", { \"d\": \"M12 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0\", \"key\": \"svg-2\" }]];\nconst IconDotsVertical = createReactComponent(\"outline\", \"dots-vertical\", \"DotsVertical\", __iconNode);\n\nexport { __iconNode, IconDotsVertical as default };\n//# sourceMappingURL=IconDotsVertical.mjs.map\n","import styles from './Skeleton.module.css';\n\nexport const Skeleton = () => {\n return <div className={styles.skeleton} />;\n};\n","import clsx from 'clsx';\nimport React from 'react';\nimport styles from './IconButton.module.css';\nimport { TablerIcon } from '@tabler/icons-react';\nimport { BaseButton, type BaseButtonProps } from '../BaseButton';\n\ntype IconButtonProps = Omit<BaseButtonProps, 'variant'> & {\n className?: string;\n icon: TablerIcon;\n};\n\nexport const IconButton: React.FC<IconButtonProps> = ({ icon: Icon, className, ...props }) => {\n return (\n <BaseButton variant=\"secondary\" className={clsx(styles.iconButton, className)} {...props}>\n <Icon className={styles.icon} />\n </BaseButton>\n );\n};\n","import { IconLoader2 } from '@tabler/icons-react';\nimport styles from './ChartCardLoading.module.css';\n\nexport const ChartCardLoading = () => <IconLoader2 className={styles.loading} />;\n","import { IconDotsVertical } from '@tabler/icons-react';\nimport React from 'react';\nimport { useTheme } from '@embeddable.com/react';\nimport { ChartCardLoading } from '../ChartCardLoading/ChartCardLoading';\nimport { i18n, i18nSetup } from '../../../../../theme/i18n/i18n';\nimport { Theme } from '../../../../../theme/theme.types';\nimport {\n Dropdown,\n IconButton,\n SelectList,\n SelectListOption,\n} from '../../../../../../remarkable-ui';\nimport { ChartCardMenuProOptionOnClickProps } from './ChartCardMenuPro.types';\nimport styles from './ChartCardMenuPro.module.css';\n\ntype ChartCardMenuProProps = Omit<ChartCardMenuProOptionOnClickProps, 'theme'>;\n\nexport const ChartCardMenuPro: React.FC<ChartCardMenuProProps> = (props) => {\n const theme: Theme = useTheme() as Theme;\n i18nSetup(theme);\n\n const [isLoading, setIsLoading] = React.useState(false);\n\n const startAction = (onClick: () => void | Promise<void>) => {\n setIsLoading(true);\n setTimeout(() => {\n Promise.resolve(onClick()).finally(() => setIsLoading(false));\n }, 100);\n };\n\n const handleExport = (onClick: (props: ChartCardMenuProOptionOnClickProps) => void) => {\n startAction(() => onClick({ ...props, theme }));\n };\n\n const options = theme.charts?.chartCardMenuPro?.options ?? [];\n\n if (options.length === 0) {\n return null;\n }\n\n return (\n <Dropdown\n side=\"bottom\"\n align=\"end\"\n triggerComponent={isLoading ? <ChartCardLoading /> : <IconButton icon={IconDotsVertical} />}\n >\n <SelectList className={styles.list} autoFocus>\n {options.map((option, index) => {\n const label = i18n.t(option.labelKey);\n\n return (\n <SelectListOption\n key={index}\n label={label}\n onClick={() => handleExport(option.onClick)}\n startIcon={\n option.iconSrc ? <img src={option.iconSrc} alt={`${label} icon`} /> : undefined\n }\n />\n );\n })}\n </SelectList>\n </Dropdown>\n );\n};\n","import React, { CSSProperties, FC, useRef } from 'react';\nimport { IconAlertCircle } from '@tabler/icons-react';\nimport {\n Card,\n CardContent,\n CardContentInfo,\n CardHeader,\n Skeleton,\n} from '../../../../../remarkable-ui';\nimport styles from './ChartCard.module.css';\nimport { DataResponse, Dimension, Measure } from '@embeddable.com/core';\nimport { useTheme } from '@embeddable.com/react';\nimport { ChartCardLoading } from './ChartCardLoading/ChartCardLoading';\nimport { ChartCardMenuPro } from './ChartCardMenuPro/ChartCardMenuPro';\nimport { Theme } from '../../../../theme/theme.types';\nimport { i18n, i18nSetup } from '../../../../theme/i18n/i18n';\n\ntype ChartCardProps = {\n title: string;\n subtitle?: string;\n children: React.ReactNode;\n data: DataResponse;\n isLoading?: boolean;\n errorMessage?: string;\n style?: CSSProperties;\n dimensionsAndMeasures?: (Dimension | Measure)[];\n};\n\nexport const ChartCard: FC<ChartCardProps> = ({\n title,\n subtitle,\n children,\n data,\n errorMessage,\n dimensionsAndMeasures = [],\n ...props\n}) => {\n const theme: Theme = useTheme() as Theme;\n i18nSetup(theme);\n\n const chartRef = useRef<HTMLDivElement>(null);\n\n const hasData = data.data && data.data.length > 0;\n\n const getDisplay = () => {\n if (!hasData && data.isLoading) {\n return <Skeleton />;\n }\n\n if (errorMessage) {\n return (\n <CardContentInfo\n className={styles.error}\n icon={IconAlertCircle}\n title={i18n.t('charts.errorTitle')}\n message={errorMessage}\n />\n );\n }\n\n if (!hasData) {\n return (\n <CardContentInfo\n title={i18n.t('charts.emptyTitle')}\n message={i18n.t('charts.emptyMessage')}\n />\n );\n }\n\n return children;\n };\n\n return (\n <Card ref={chartRef} className={styles.chartCard} {...props}>\n <CardHeader\n title={title}\n subtitle={subtitle}\n rightContent={\n <div data-no-export className={styles.rightContent}>\n {data.isLoading ? (\n <ChartCardLoading />\n ) : (\n <ChartCardMenuPro\n title={title}\n containerRef={chartRef}\n data={data.data}\n dimensionsAndMeasures={dimensionsAndMeasures}\n />\n )}\n </div>\n }\n />\n\n <CardContent>{getDisplay()}</CardContent>\n </Card>\n );\n};\n"],"names":["__iconNode","IconDotsVertical","createReactComponent","Skeleton","jsx","styles","IconButton","Icon","className","props","BaseButton","clsx","ChartCardLoading","IconLoader2","ChartCardMenuPro","theme","useTheme","i18nSetup","isLoading","setIsLoading","React","startAction","onClick","handleExport","options","_b","_a","Dropdown","SelectList","option","index","label","i18n","SelectListOption","ChartCard","title","subtitle","children","data","errorMessage","dimensionsAndMeasures","chartRef","useRef","hasData","getDisplay","CardContentInfo","IconAlertCircle","jsxs","Card","CardHeader","CardContent"],"m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O;AAAA,IAAA;AAAA,EAAA,IAKVI,IASEN,IAPHjC,gBAAAA,EAAAA;AAAAA,IAACyC;AAAA,IAAA;AAAA,MACC,OAAOb,EAAK,EAAE,mBAAmB;AAAA,MACjC,SAASA,EAAK,EAAE,qBAAqB;AAAA,IAAA;AAAA,EAAA;AAQ7C,SACEe,gBAAAA,OAACC,KAAK,KAAKP,GAAU,WAAWpC,EAAO,WAAY,GAAGI,GACpD,UAAA;AAAA,IAAAL,gBAAAA,EAAAA;AAAAA,MAAC6C;AAAA,MAAA;AAAA,QACC,OAAAd;AAAA,QACA,UAAAC;AAAA,QACA,cACEhC,gBAAAA,EAAAA,IAAC,OAAA,EAAI,kBAAc,IAAC,WAAWC,EAAO,cACnC,UAAAiC,EAAK,YACJlC,gBAAAA,EAAAA,IAACQ,GAAA,CAAA,CAAiB,IAElBR,gBAAAA,EAAAA;AAAAA,UAACU;AAAA,UAAA;AAAA,YACC,OAAAqB;AAAA,YACA,cAAcM;AAAA,YACd,MAAMH,EAAK;AAAA,YACX,uBAAAE;AAAA,UAAA;AAAA,QAAA,EACF,CAEJ;AAAA,MAAA;AAAA,IAAA;AAAA,IAIJpC,gBAAAA,EAAAA,IAAC8C,GAAA,EAAa,UAAAN,EAAA,EAAW,CAAE;AAAA,EAAA,GAC7B;AAEJ;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"ChartCard-Cb0QE9kP.js","sources":["../node_modules/@tabler/icons-react/dist/esm/icons/IconDotsVertical.mjs","../src/remarkable-ui/shared/Skeleton/Skeleton.tsx","../src/remarkable-ui/shared/IconButton/IconButton.tsx","../src/remarkable-pro/components/charts/shared/ChartCard/ChartCardLoading/ChartCardLoading.tsx","../src/remarkable-pro/components/charts/shared/ChartCard/ChartCardMenuPro/ChartCardMenuPro.tsx","../src/remarkable-pro/components/charts/shared/ChartCard/ChartCard.tsx"],"sourcesContent":["/**\n * @license @tabler/icons-react v3.34.1 - MIT\n *\n * This source code is licensed under the MIT license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createReactComponent from '../createReactComponent.mjs';\n\nconst __iconNode = [[\"path\", { \"d\": \"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0\", \"key\": \"svg-0\" }], [\"path\", { \"d\": \"M12 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0\", \"key\": \"svg-1\" }], [\"path\", { \"d\": \"M12 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0\", \"key\": \"svg-2\" }]];\nconst IconDotsVertical = createReactComponent(\"outline\", \"dots-vertical\", \"DotsVertical\", __iconNode);\n\nexport { __iconNode, IconDotsVertical as default };\n//# sourceMappingURL=IconDotsVertical.mjs.map\n","import styles from './Skeleton.module.css';\n\nexport const Skeleton = () => {\n return <div className={styles.skeleton} />;\n};\n","import clsx from 'clsx';\nimport React from 'react';\nimport styles from './IconButton.module.css';\nimport { TablerIcon } from '@tabler/icons-react';\nimport { BaseButton, type BaseButtonProps } from '../BaseButton';\n\ntype IconButtonProps = Omit<BaseButtonProps, 'variant'> & {\n className?: string;\n icon: TablerIcon;\n};\n\nexport const IconButton: React.FC<IconButtonProps> = ({ icon: Icon, className, ...props }) => {\n return (\n <BaseButton variant=\"secondary\" className={clsx(styles.iconButton, className)} {...props}>\n <Icon className={styles.icon} />\n </BaseButton>\n );\n};\n","import { IconLoader2 } from '@tabler/icons-react';\nimport styles from './ChartCardLoading.module.css';\n\nexport const ChartCardLoading = () => <IconLoader2 className={styles.loading} />;\n","import { IconDotsVertical } from '@tabler/icons-react';\nimport React from 'react';\nimport { useTheme } from '@embeddable.com/react';\nimport { ChartCardLoading } from '../ChartCardLoading/ChartCardLoading';\nimport { i18n, i18nSetup } from '../../../../../theme/i18n/i18n';\nimport { Theme } from '../../../../../theme/theme.types';\nimport {\n Dropdown,\n IconButton,\n SelectList,\n SelectListOption,\n} from '../../../../../../remarkable-ui';\nimport { ChartCardMenuProOptionOnClickProps } from './ChartCardMenuPro.types';\nimport styles from './ChartCardMenuPro.module.css';\n\ntype ChartCardMenuProProps = Omit<ChartCardMenuProOptionOnClickProps, 'theme'>;\n\nexport const ChartCardMenuPro: React.FC<ChartCardMenuProProps> = (props) => {\n const theme: Theme = useTheme() as Theme;\n i18nSetup(theme);\n\n const [isLoading, setIsLoading] = React.useState(false);\n\n const startAction = (onClick: () => void | Promise<void>) => {\n setIsLoading(true);\n setTimeout(() => {\n Promise.resolve(onClick()).finally(() => setIsLoading(false));\n }, 100);\n };\n\n const handleExport = (onClick: (props: ChartCardMenuProOptionOnClickProps) => void) => {\n startAction(() => onClick({ ...props, theme }));\n };\n\n const options = theme.charts?.chartCardMenuPro?.options ?? [];\n\n if (options.length === 0) {\n return null;\n }\n\n return (\n <Dropdown\n side=\"bottom\"\n align=\"end\"\n triggerComponent={isLoading ? <ChartCardLoading /> : <IconButton icon={IconDotsVertical} />}\n >\n <SelectList className={styles.list} autoFocus>\n {options.map((option, index) => {\n const label = i18n.t(option.labelKey);\n\n return (\n <SelectListOption\n key={index}\n label={label}\n onClick={() => handleExport(option.onClick)}\n startIcon={\n option.iconSrc ? <img src={option.iconSrc} alt={`${label} icon`} /> : undefined\n }\n />\n );\n })}\n </SelectList>\n </Dropdown>\n );\n};\n","import React, { CSSProperties, FC, useRef } from 'react';\nimport { IconAlertCircle } from '@tabler/icons-react';\nimport {\n Card,\n CardContent,\n CardContentInfo,\n CardHeader,\n Skeleton,\n} from '../../../../../remarkable-ui';\nimport styles from './ChartCard.module.css';\nimport { DataResponse, Dimension, Measure } from '@embeddable.com/core';\nimport { useTheme } from '@embeddable.com/react';\nimport { ChartCardLoading } from './ChartCardLoading/ChartCardLoading';\nimport { ChartCardMenuPro } from './ChartCardMenuPro/ChartCardMenuPro';\nimport { Theme } from '../../../../theme/theme.types';\nimport { i18n, i18nSetup } from '../../../../theme/i18n/i18n';\n\ntype ChartCardProps = {\n title: string;\n subtitle?: string;\n children: React.ReactNode;\n data: DataResponse;\n isLoading?: boolean;\n errorMessage?: string;\n style?: CSSProperties;\n dimensionsAndMeasures?: (Dimension | Measure)[];\n};\n\nexport const ChartCard: FC<ChartCardProps> = ({\n title,\n subtitle,\n children,\n data,\n errorMessage,\n dimensionsAndMeasures = [],\n ...props\n}) => {\n const theme: Theme = useTheme() as Theme;\n i18nSetup(theme);\n\n const chartRef = useRef<HTMLDivElement>(null);\n\n const hasData = data.data && data.data.length > 0;\n\n const getDisplay = () => {\n if (!hasData && data.isLoading) {\n return <Skeleton />;\n }\n\n if (errorMessage) {\n return (\n <CardContentInfo\n className={styles.error}\n icon={IconAlertCircle}\n title={i18n.t('charts.errorTitle')}\n message={errorMessage}\n />\n );\n }\n\n if (!hasData) {\n return (\n <CardContentInfo\n title={i18n.t('charts.emptyTitle')}\n message={i18n.t('charts.emptyMessage')}\n />\n );\n }\n\n return children;\n };\n\n return (\n <Card ref={chartRef} className={styles.chartCard} {...props}>\n <CardHeader\n title={title}\n subtitle={subtitle}\n rightContent={\n <div data-no-export className={styles.rightContent}>\n {data.isLoading ? (\n <ChartCardLoading />\n ) : (\n <ChartCardMenuPro\n title={title}\n containerRef={chartRef}\n data={data.data}\n dimensionsAndMeasures={dimensionsAndMeasures}\n />\n )}\n </div>\n }\n />\n\n <CardContent>{getDisplay()}</CardContent>\n </Card>\n );\n};\n"],"names":["__iconNode","IconDotsVertical","createReactComponent","Skeleton","jsx","styles","IconButton","Icon","className","props","BaseButton","clsx","ChartCardLoading","IconLoader2","ChartCardMenuPro","theme","useTheme","i18nSetup","isLoading","setIsLoading","React","startAction","onClick","handleExport","options","_b","_a","Dropdown","SelectList","option","index","label","i18n","SelectListOption","ChartCard","title","subtitle","children","data","errorMessage","dimensionsAndMeasures","chartRef","useRef","hasData","getDisplay","CardContentInfo","IconAlertCircle","jsxs","Card","CardHeader","CardContent"],"mappings":";;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMA,IAAa,CAAC,CAAC,QAAQ,EAAE,GAAK,4CAA4C,KAAO,QAAO,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EAAE,mBAAmB;AAAA,MACjC,SAASA,EAAK,EAAE,qBAAqB;AAAA,IAAA;AAAA,EAAA;AAQ7C,SACEe,gBAAAA,OAACC,KAAK,KAAKP,GAAU,WAAWpC,EAAO,WAAY,GAAGI,GACpD,UAAA;AAAA,IAAAL,gBAAAA,EAAAA;AAAAA,MAAC6C;AAAA,MAAA;AAAA,QACC,OAAAd;AAAA,QACA,UAAAC;AAAA,QACA,cACEhC,gBAAAA,EAAAA,IAAC,OAAA,EAAI,kBAAc,IAAC,WAAWC,EAAO,cACnC,UAAAiC,EAAK,YACJlC,gBAAAA,EAAAA,IAACQ,GAAA,CAAA,CAAiB,IAElBR,gBAAAA,EAAAA;AAAAA,UAACU;AAAA,UAAA;AAAA,YACC,OAAAqB;AAAA,YACA,cAAcM;AAAA,YACd,MAAMH,EAAK;AAAA,YACX,uBAAAE;AAAA,UAAA;AAAA,QAAA,EACF,CAEJ;AAAA,MAAA;AAAA,IAAA;AAAA,IAIJpC,gBAAAA,EAAAA,IAAC8C,GAAA,EAAa,UAAAN,EAAA,EAAW,CAAE;AAAA,EAAA,GAC7B;AAEJ;","x_google_ignoreList":[0]}
|
package/dist/{ComparisonPeriod.type.emb-D51Sg3wt.js → ComparisonPeriod.type.emb-61HEPz26.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as i, a0 as e } from "./component.constants-
|
|
1
|
+
import { $ as i, a0 as e } from "./component.constants-Bn9l4N1t.js";
|
|
2
2
|
const o = i("comparisonPeriod", {
|
|
3
3
|
label: "Comparison Period",
|
|
4
4
|
optionLabel: (r) => r
|
|
@@ -12,4 +12,4 @@ e(o, "Previous year");
|
|
|
12
12
|
export {
|
|
13
13
|
o as C
|
|
14
14
|
};
|
|
15
|
-
//# sourceMappingURL=ComparisonPeriod.type.emb-
|
|
15
|
+
//# sourceMappingURL=ComparisonPeriod.type.emb-61HEPz26.js.map
|
package/dist/{ComparisonPeriod.type.emb-D51Sg3wt.js.map → ComparisonPeriod.type.emb-61HEPz26.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComparisonPeriod.type.emb-
|
|
1
|
+
{"version":3,"file":"ComparisonPeriod.type.emb-61HEPz26.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, 'summer');\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,QAAQ;AAC3CG,EAAaH,GAAsB,iBAAiB;AACpDG,EAAaH,GAAsB,eAAe;AAClDG,EAAaH,GAAsB,gBAAgB;AACnDG,EAAaH,GAAsB,kBAAkB;AACrDG,EAAaH,GAAsB,eAAe;"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { useTheme as v, defineComponent as h } from "@embeddable.com/react";
|
|
2
|
-
import { Z as y, S as P, i as f, r as b, j as l, R as C, t as S, c as R, _ as F, V as d } from "./component.constants-
|
|
2
|
+
import { Z as y, S as P, i as f, r as b, j as l, R as C, t as S, c as R, _ as F, V as d } from "./component.constants-Bn9l4N1t.js";
|
|
3
3
|
import { useMemo as M, useEffect as k } from "react";
|
|
4
|
-
import { S as D } from "./SingleSelectField-
|
|
4
|
+
import { S as D } from "./SingleSelectField-BJnoOYrw.js";
|
|
5
5
|
import { g as T, u as j, a as x } from "./editors.timeRange.utils-CteuBPel.js";
|
|
6
|
-
import { E as L } from "./EditorCard-
|
|
7
|
-
import { C as s } from "./ComparisonPeriod.type.emb-
|
|
6
|
+
import { E as L } from "./EditorCard-DWz8Bm-e.js";
|
|
7
|
+
import { C as s } from "./ComparisonPeriod.type.emb-61HEPz26.js";
|
|
8
8
|
/**
|
|
9
9
|
* @license @tabler/icons-react v3.34.1 - MIT
|
|
10
10
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as t } from "@embeddable.com/react";
|
|
2
|
-
import { t as l, c as n, _ as r, V as a } from "./component.constants-
|
|
3
|
-
import { D as o } from "./index-
|
|
2
|
+
import { t as l, c as n, _ as r, V as a } from "./component.constants-Bn9l4N1t.js";
|
|
3
|
+
import { D as o } from "./index-CobXKlOi.js";
|
|
4
4
|
const i = {
|
|
5
5
|
name: "DateRangeSelectFieldPro",
|
|
6
6
|
label: "Date Range Select Field",
|
package/dist/DonutChartPro.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { d as a, w as s, z as t, t as o, c as n, s as r, Y 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, Y as i, e as m, f as l, V as d, o as u } from "./component.constants-Bn9l4N1t.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-DEzAFKmN.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, Y as m, e as d, f as u, V as b, o as t } from "./component.constants-
|
|
1
|
+
import { D as n } from "./index-BhW48cz5.js";
|
|
2
|
+
import { d as s, w as a, z as r, t as o, c as l, s as i, Y as m, e as d, f as u, V as b, o as t } from "./component.constants-Bn9l4N1t.js";
|
|
3
3
|
import { defineComponent as c } from "@embeddable.com/react";
|
|
4
4
|
const p = {
|
|
5
5
|
name: "DonutLabelChartPro",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Z as l, j as r, a1 as u, i as m, a2 as p, a3 as _, a5 as x, a7 as f, R as h, aw as C } from "./component.constants-
|
|
1
|
+
import { Z as l, j as r, a1 as u, i as m, a2 as p, a3 as _, a5 as x, a7 as f, R as h, aw as C } from "./component.constants-Bn9l4N1t.js";
|
|
2
2
|
import { useEffect as j } from "react";
|
|
3
3
|
import { useTheme as S } from "@embeddable.com/react";
|
|
4
4
|
/**
|
|
@@ -59,4 +59,4 @@ export {
|
|
|
59
59
|
R as d,
|
|
60
60
|
w as u
|
|
61
61
|
};
|
|
62
|
-
//# sourceMappingURL=EditorCard-
|
|
62
|
+
//# sourceMappingURL=EditorCard-DWz8Bm-e.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditorCard-
|
|
1
|
+
{"version":3,"file":"EditorCard-DWz8Bm-e.js","sources":["../node_modules/@tabler/icons-react/dist/esm/icons/IconSearch.mjs","../src/remarkable-ui/editors/select/shared/SelectList/SelectListOptions/SelectListOptions.tsx","../src/remarkable-ui/utils/debounce.utils.ts","../src/remarkable-ui/editors/select/shared/useSelectSearchFocus.hook.ts","../src/remarkable-pro/components/editors/shared/EditorCard/EditorCard.tsx"],"sourcesContent":["/**\n * @license @tabler/icons-react v3.34.1 - MIT\n *\n * This source code is licensed under the MIT license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createReactComponent from '../createReactComponent.mjs';\n\nconst __iconNode = [[\"path\", { \"d\": \"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0\", \"key\": \"svg-0\" }], [\"path\", { \"d\": \"M21 21l-6 -6\", \"key\": \"svg-1\" }]];\nconst IconSearch = createReactComponent(\"outline\", \"search\", \"Search\", __iconNode);\n\nexport { __iconNode, IconSearch as default };\n//# sourceMappingURL=IconSearch.mjs.map\n","import { FC } from 'react';\nimport styles from './SelectListOptions.module.css';\nimport clsx from 'clsx';\n\nexport type SelectListOptionsProps = React.HTMLAttributes<HTMLDivElement> & {\n children: React.ReactNode;\n disabled?: boolean;\n};\n\nexport const SelectListOptions: FC<SelectListOptionsProps> = ({ children, disabled, ...props }) => {\n return (\n <div className={clsx(styles.listOptions, disabled && styles.disabled)} {...props}>\n {children}\n </div>\n );\n};\n","// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function debounce<T extends (...args: any[]) => void>(\n fn: T,\n delay = 300,\n): (...args: Parameters<T>) => void {\n let timer: NodeJS.Timeout;\n return (...args: Parameters<T>) => {\n clearTimeout(timer);\n timer = setTimeout(() => {\n fn(...args);\n }, delay);\n };\n}\n","import { useEffect } from 'react';\n\nexport const useSelectSearchFocus = (\n isOpen: boolean,\n searchFieldRef: React.RefObject<HTMLInputElement | null>,\n) => {\n useEffect(() => {\n if (isOpen) {\n setTimeout(() => {\n (searchFieldRef.current as unknown as HTMLInputElement)?.focus();\n }, 100);\n }\n }, [isOpen, searchFieldRef]);\n};\n","import { useTheme } from '@embeddable.com/react';\nimport { i18n, i18nSetup } from '../../../../theme/i18n/i18n';\nimport styles from './EditorCard.module.css';\nimport { FC } from 'react';\nimport { Theme } from '../../../../theme/theme.types';\nimport { Card, CardContent, CardContentInfo, CardHeader } from '../../../../../remarkable-ui';\nimport { IconAlertCircle } from '@tabler/icons-react';\n\ntype EditorCardProps = {\n title?: string;\n subtitle?: string;\n children: React.ReactNode;\n errorMessage?: string;\n};\n\nexport const EditorCard: FC<EditorCardProps> = ({\n title,\n subtitle,\n children,\n errorMessage,\n ...props\n}) => {\n const theme: Theme = useTheme() as Theme;\n i18nSetup(theme);\n\n const getDisplay = () => {\n if (errorMessage) {\n return (\n <CardContentInfo\n className={styles.error}\n icon={IconAlertCircle}\n title={i18n.t('editors.errorTitle')}\n message={errorMessage}\n />\n );\n }\n\n return children;\n };\n\n return (\n <Card className={styles.card} {...props}>\n <CardHeader title={title} subtitle={subtitle} />\n <CardContent>{getDisplay()}</CardContent>\n </Card>\n );\n};\n"],"names":["__iconNode","IconSearch","createReactComponent","SelectListOptions","children","disabled","props","jsx","clsx","styles","debounce","fn","delay","timer","args","useSelectSearchFocus","isOpen","searchFieldRef","useEffect","_a","EditorCard","title","subtitle","errorMessage","theme","useTheme","i18nSetup","getDisplay","CardContentInfo","IconAlertCircle","i18n","Card","CardHeader","CardContent"],"mappings":";;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMA,IAAa,CAAC,CAAC,QAAQ,EAAE,GAAK,8CAA8C,KAAO,QAAO,CAAE,GAAG,CAAC,QAAQ,EAAE,GAAK,gBAAgB,KAAO,QAAO,CAAE,CAAC,GAChJC,IAAaC,EAAqB,WAAW,UAAU,UAAUF,CAAU;;;GCDpEG,IAAgD,CAAC,EAAE,UAAAC,GAAU,UAAAC,GAAU,GAAGC,QAEnFC,gBAAAA,EAAAA,IAAC,OAAA,EAAI,WAAWC,EAAKC,EAAO,aAAaJ,KAAYI,EAAO,QAAQ,GAAI,GAAGH,GACxE,UAAAF,EAAA,CACH;ACZG,SAASM,EACdC,GACAC,IAAQ,KAC0B;AAClC,MAAIC;AACJ,SAAO,IAAIC,MAAwB;AACjC,iBAAaD,CAAK,GAClBA,IAAQ,WAAW,MAAM;AACvB,MAAAF,EAAG,GAAGG,CAAI;AAAA,IACZ,GAAGF,CAAK;AAAA,EACV;AACF;ACVO,MAAMG,IAAuB,CAClCC,GACAC,MACG;AACH,EAAAC,EAAU,MAAM;AACd,IAAIF,KACF,WAAW,MAAM;;AACd,OAAAG,IAAAF,EAAe,YAAf,QAAAE,EAAwD;AAAA,IAC3D,GAAG,GAAG;AAAA,EAEV,GAAG,CAACH,GAAQC,CAAc,CAAC;AAC7B;;;GCEaG,IAAkC,CAAC;AAAA,EAC9C,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,UAAAlB;AAAA,EACA,cAAAmB;AAAA,EACA,GAAGjB;AACL,MAAM;AACJ,QAAMkB,IAAeC,EAAA;AACrB,EAAAC,EAAUF,CAAK;AAEf,QAAMG,IAAa,MACbJ,IAEAhB,gBAAAA,EAAAA;AAAAA,IAACqB;AAAA,IAAA;AAAA,MACC,WAAWnB,EAAO;AAAA,MAClB,MAAMoB;AAAA,MACN,OAAOC,EAAK,EAAE,oBAAoB;AAAA,MAClC,SAASP;AAAA,IAAA;AAAA,EAAA,IAKRnB;AAGT,gCACG2B,GAAA,EAAK,WAAWtB,EAAO,MAAO,GAAGH,GAChC,UAAA;AAAA,IAAAC,gBAAAA,EAAAA,IAACyB,GAAA,EAAW,OAAAX,GAAc,UAAAC,EAAA,CAAoB;AAAA,IAC9Cf,gBAAAA,EAAAA,IAAC0B,GAAA,EAAa,UAAAN,EAAA,EAAW,CAAE;AAAA,EAAA,GAC7B;AAEJ;","x_google_ignoreList":[0]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Z as x, j as n, a1 as k, a6 as C } from "./component.constants-
|
|
1
|
+
import { Z as x, j as n, a1 as k, a6 as C } from "./component.constants-Bn9l4N1t.js";
|
|
2
2
|
/**
|
|
3
3
|
* @license @tabler/icons-react v3.34.1 - MIT
|
|
4
4
|
*
|
|
@@ -74,4 +74,4 @@ const y = [["path", { d: "M3 17l6 -6l4 4l8 -8", key: "svg-0" }], ["path", { d: "
|
|
|
74
74
|
export {
|
|
75
75
|
K
|
|
76
76
|
};
|
|
77
|
-
//# sourceMappingURL=KpiChart-
|
|
77
|
+
//# sourceMappingURL=KpiChart-CzUK0Dgw.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KpiChart-
|
|
1
|
+
{"version":3,"file":"KpiChart-CzUK0Dgw.js","sources":["../node_modules/@tabler/icons-react/dist/esm/icons/IconTrendingDown.mjs","../node_modules/@tabler/icons-react/dist/esm/icons/IconTrendingUp.mjs","../src/remarkable-ui/charts/kpis/components/KpiChartChange.tsx","../src/remarkable-ui/charts/kpis/KpiChart.tsx"],"sourcesContent":["/**\n * @license @tabler/icons-react v3.34.1 - MIT\n *\n * This source code is licensed under the MIT license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createReactComponent from '../createReactComponent.mjs';\n\nconst __iconNode = [[\"path\", { \"d\": \"M3 7l6 6l4 -4l8 8\", \"key\": \"svg-0\" }], [\"path\", { \"d\": \"M21 10l0 7l-7 0\", \"key\": \"svg-1\" }]];\nconst IconTrendingDown = createReactComponent(\"outline\", \"trending-down\", \"TrendingDown\", __iconNode);\n\nexport { __iconNode, IconTrendingDown as default };\n//# sourceMappingURL=IconTrendingDown.mjs.map\n","/**\n * @license @tabler/icons-react v3.34.1 - MIT\n *\n * This source code is licensed under the MIT license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createReactComponent from '../createReactComponent.mjs';\n\nconst __iconNode = [[\"path\", { \"d\": \"M3 17l6 -6l4 4l8 -8\", \"key\": \"svg-0\" }], [\"path\", { \"d\": \"M14 7l7 0l0 7\", \"key\": \"svg-1\" }]];\nconst IconTrendingUp = createReactComponent(\"outline\", \"trending-up\", \"TrendingUp\", __iconNode);\n\nexport { __iconNode, IconTrendingUp as default };\n//# sourceMappingURL=IconTrendingUp.mjs.map\n","import { FC } from 'react';\nimport styles from './KpiChartChange.module.css';\nimport clsx from 'clsx';\nimport { Typography } from '../../../shared/Typography/Typography';\nimport { IconTrendingDown, IconTrendingUp } from '@tabler/icons-react';\nimport { KpiChartProps } from '../KpiChart.types';\n\nconst getChangeClass = (isPositive: boolean, invertChangeColors: boolean) => {\n if (isPositive) return invertChangeColors ? styles.negative : styles.positive;\n return invertChangeColors ? styles.positive : styles.negative;\n};\n\ntype KpiChartChangeProps = KpiChartProps & { className?: string };\n\nexport const KpiChartChange: FC<KpiChartChangeProps> = ({\n value,\n comparisonValue = 0,\n showChangeAsPercentage,\n invertChangeColors = false,\n comparisonLabel,\n className,\n}) => {\n const difference = value - comparisonValue;\n const isPositive = difference > 0;\n\n let differenceLabel: string = difference.toString();\n\n if (showChangeAsPercentage) {\n const percentage = comparisonValue === 0 ? 0 : (difference / comparisonValue) * 100;\n\n const percentageDisplay =\n percentage % 1 === 0 ? percentage : percentage.toFixed(1).replace(/\\.?0+$/, '');\n\n differenceLabel = `${percentageDisplay}%`;\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 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 className={clsx(!hasComparisonValue && styles.kpiChangeHidden)}\n value={value}\n comparisonValue={comparisonValue}\n invertChangeColors={invertChangeColors}\n showChangeAsPercentage={showChangeAsPercentage}\n comparisonLabel={comparisonLabel}\n changeFontSize={changeFontSize}\n />\n )}\n </div>\n </div>\n );\n};\n"],"names":["__iconNode","IconTrendingDown","createReactComponent","IconTrendingUp","getChangeClass","isPositive","invertChangeColors","styles","KpiChartChange","value","comparisonValue","showChangeAsPercentage","comparisonLabel","className","difference","differenceLabel","percentage","displayValue","Icon","clsx","jsxs","jsx","Typography","KpiChart","changeFontSize","equalComparisonLabel","valueFontSize","valueFormatter","hasComparisonValue","equalComparison"],"mappings":";AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMA,IAAa,CAAC,CAAC,QAAQ,EAAE,GAAK,qBAAqB,KAAO,QAAO,CAAE,GAAG,CAAC,QAAQ,EAAE,GAAK,mBAAmB,KAAO,QAAO,CAAE,CAAC,GAC1HC,IAAmBC,EAAqB,WAAW,iBAAiB,gBAAgBF,CAAU;ACVpG;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMA,IAAa,CAAC,CAAC,QAAQ,EAAE,GAAK,uBAAuB,KAAO,QAAO,CAAE,GAAG,CAAC,QAAQ,EAAE,GAAK,iBAAiB,KAAO,QAAO,CAAE,CAAC,GAC1HG,IAAiBD,EAAqB,WAAW,eAAe,cAAcF,CAAU;;;;;;;;;GCHxFI,IAAiB,CAACC,GAAqBC,MACvCD,IAAmBC,IAAqBC,EAAO,WAAWA,EAAO,WAC9DD,IAAqBC,EAAO,WAAWA,EAAO,UAK1CC,IAA0C,CAAC;AAAA,EACtD,OAAAC;AAAA,EACA,iBAAAC,IAAkB;AAAA,EAClB,wBAAAC;AAAA,EACA,oBAAAL,IAAqB;AAAA,EACrB,iBAAAM;AAAA,EACA,WAAAC;AACF,MAAM;AACJ,QAAMC,IAAaL,IAAQC,GACrBL,IAAaS,IAAa;AAEhC,MAAIC,IAA0BD,EAAW,SAAA;AAEzC,MAAIH,GAAwB;AAC1B,UAAMK,IAAaN,MAAoB,IAAI,IAAKI,IAAaJ,IAAmB;AAKhF,IAAAK,IAAkB,GAFhBC,IAAa,MAAM,IAAIA,IAAaA,EAAW,QAAQ,CAAC,EAAE,QAAQ,UAAU,EAAE,CAE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AAsBrB,EAAO,eAAe;AAAA,QAC7D,OAAAE;AAAA,QACA,iBAAAC;AAAA,QACA,oBAAAJ;AAAA,QACA,wBAAAK;AAAA,QACA,iBAAAC;AAAA,QACA,gBAAAY;AAAA,MAAA;AAAA,IAAA,EACF,CAEJ;AAAA,EAAA,GACF;AAEJ;","x_google_ignoreList":[0,1]}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { useTheme as K, defineComponent as x } from "@embeddable.com/react";
|
|
2
|
-
import { S as V, i as j, r as w, j as f, d as A, w as L, T as O, U as q, t as E, c as I, W as v, X as P, o as h } from "./component.constants-
|
|
3
|
-
import { C as M } from "./ChartCard-
|
|
2
|
+
import { S as V, i as j, r as w, j as f, d as A, w as L, T as O, U as q, t as E, c as I, W as v, X as P, o as h } from "./component.constants-Bn9l4N1t.js";
|
|
3
|
+
import { C as M } from "./ChartCard-Cb0QE9kP.js";
|
|
4
4
|
import { useEffect as Y } from "react";
|
|
5
|
-
import { K as B } from "./KpiChart-
|
|
6
|
-
import { g as J } from "./formatter.utils-
|
|
7
|
-
import { C as U } from "./ComparisonPeriod.type.emb-
|
|
5
|
+
import { K as B } from "./KpiChart-CzUK0Dgw.js";
|
|
6
|
+
import { g as J } from "./formatter.utils-Ba_5cIcm.js";
|
|
7
|
+
import { C as U } from "./ComparisonPeriod.type.emb-61HEPz26.js";
|
|
8
8
|
const W = (e, a, o) => {
|
|
9
9
|
var t;
|
|
10
10
|
if (!e || !a)
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { useTheme as h, defineComponent as f } from "@embeddable.com/react";
|
|
2
|
-
import { i as C, r as b, j as m, d as K, w as g, t as x, c as F, X as N, o as S } from "./component.constants-
|
|
3
|
-
import { C as j } from "./ChartCard-
|
|
2
|
+
import { i as C, r as b, j as m, d as K, w as g, t as x, c as F, X as N, o as S } from "./component.constants-Bn9l4N1t.js";
|
|
3
|
+
import { C as j } from "./ChartCard-Cb0QE9kP.js";
|
|
4
4
|
import "react";
|
|
5
|
-
import { K as v } from "./KpiChart-
|
|
6
|
-
import { g as z } from "./formatter.utils-
|
|
5
|
+
import { K as v } from "./KpiChart-CzUK0Dgw.js";
|
|
6
|
+
import { g as z } from "./formatter.utils-Ba_5cIcm.js";
|
|
7
7
|
const P = (e) => {
|
|
8
8
|
var s, o;
|
|
9
9
|
const a = h();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as i } from "@embeddable.com/react";
|
|
2
|
-
import { d as r, z as s, t as d, c as u, _ as m, V as t, o as c } from "./component.constants-
|
|
3
|
-
import { M as p, a as f } from "./index-
|
|
2
|
+
import { d as r, z as s, t as d, c as u, _ as m, V as t, o as c } from "./component.constants-Bn9l4N1t.js";
|
|
3
|
+
import { M as p, a as f } from "./index-DYBt2TuY.js";
|
|
4
4
|
const g = {
|
|
5
5
|
name: "MultiSelectFieldPro",
|
|
6
6
|
label: "Multi Select Field",
|
package/dist/PieChartPro.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 i, Y as r, e as m, f as l, V as d, o as c } from "./component.constants-
|
|
1
|
+
import { d as a, w as s, z as t, t as o, c as n, s as i, Y as r, e as m, f as l, V as d, o as c } from "./component.constants-Bn9l4N1t.js";
|
|
2
2
|
import { defineComponent as p } from "@embeddable.com/react";
|
|
3
|
-
import { P as u } from "./index-
|
|
3
|
+
import { P as u } from "./index-Dwb4Z6Hd.js";
|
|
4
4
|
const C = {
|
|
5
5
|
name: "PieChartPro",
|
|
6
6
|
label: "Pie Chart",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { j as l, a8 as R, ab as D, ac as E, a9 as h, aa as k } from "./component.constants-
|
|
1
|
+
import { j as l, a8 as R, ab as D, ac as E, a9 as h, aa as k } from "./component.constants-Bn9l4N1t.js";
|
|
2
2
|
import { useState as i, useRef as w, useEffect as B, useMemo as K } from "react";
|
|
3
|
-
import { u as M, d as N, I as P, S as T } from "./EditorCard-
|
|
3
|
+
import { u as M, d as N, I as P, S as T } from "./EditorCard-DWz8Bm-e.js";
|
|
4
4
|
const G = ({
|
|
5
5
|
value: t = "",
|
|
6
6
|
startIcon: p,
|
|
@@ -85,4 +85,4 @@ const G = ({
|
|
|
85
85
|
export {
|
|
86
86
|
G as S
|
|
87
87
|
};
|
|
88
|
-
//# sourceMappingURL=SingleSelectField-
|
|
88
|
+
//# sourceMappingURL=SingleSelectField-BJnoOYrw.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SingleSelectField-
|
|
1
|
+
{"version":3,"file":"SingleSelectField-BJnoOYrw.js","sources":["../src/remarkable-ui/editors/select/SingleSelectField/SingleSelectField.tsx"],"sourcesContent":["import { FC, useEffect, useMemo, useRef, useState } from 'react';\nimport { TextField } from '../../TextField/TextField';\nimport { SelectButton } from '../shared/SelectButton/SelectButton';\nimport { Dropdown } from '../../../shared/Dropdown/Dropdown';\nimport { SelectList } from '../shared/SelectList/SelectList';\nimport { SelectListOptions } from '../shared/SelectList/SelectListOptions/SelectListOptions';\nimport {\n SelectListOption,\n SelectListOptionProps,\n} from '../shared/SelectList/SelectListOptions/SelectListOption/SelectListOption';\nimport { debounce } from '../../../utils/debounce.utils';\nimport { IconSearch, TablerIcon } from '@tabler/icons-react';\nimport { useSelectSearchFocus } from '../shared/useSelectSearchFocus.hook';\n\nexport type SingleSelectFieldProps = {\n options: SelectListOptionProps[];\n startIcon?: TablerIcon;\n value?: string;\n disabled?: boolean;\n placeholder?: string;\n isSearchable?: boolean;\n isClearable?: boolean;\n isLoading?: boolean;\n noOptionsMessage?: string;\n onChange: (value: string) => void;\n onSearch?: (search: string) => void;\n};\n\nexport const SingleSelectField: FC<SingleSelectFieldProps> = ({\n value = '',\n startIcon,\n options,\n disabled,\n placeholder,\n isSearchable,\n isClearable,\n isLoading,\n noOptionsMessage = 'No options available',\n onChange,\n onSearch,\n}) => {\n const [isOpen, setIsOpen] = useState(false);\n const [searchValue, setSearchValue] = useState<string>('');\n const [selectedLabel, setSelectedLabel] = useState<string>(value);\n\n const searchFieldRef = useRef<HTMLInputElement>(null);\n useSelectSearchFocus(isOpen, searchFieldRef);\n\n useEffect(() => {\n if (!value) {\n setSelectedLabel('');\n return;\n }\n\n const option = options.find((opt) => opt.value === value);\n if (option) {\n setSelectedLabel(option.label);\n }\n }, [value, options]);\n\n const debouncedSearch = useMemo(() => (onSearch ? debounce(onSearch) : undefined), [onSearch]);\n\n const displayOptions =\n isSearchable && !onSearch\n ? options.filter((option) => option.label.toLowerCase().includes(searchValue.toLowerCase()))\n : options;\n\n const handleChange = (newValue?: string) => {\n setSearchValue('');\n onChange(newValue ?? '');\n onSearch?.('');\n\n if (newValue === '') {\n setSelectedLabel('');\n } else {\n const option = options.find((opt) => opt.value === newValue);\n if (option) setSelectedLabel(option.label);\n }\n };\n\n const handleSearch = (newSearch: string) => {\n setSearchValue(newSearch);\n debouncedSearch?.(newSearch);\n };\n\n return (\n <Dropdown\n open={isOpen}\n onOpenChange={setIsOpen}\n disabled={disabled}\n triggerComponent={\n <SelectButton\n startIcon={startIcon}\n aria-label=\"Select option\"\n placeholder={placeholder}\n disabled={disabled}\n valueLabel={selectedLabel}\n onClear={() => handleChange('')}\n isClearable={isClearable}\n isLoading={isLoading}\n />\n }\n >\n <SelectList>\n {isSearchable && (\n <TextField\n ref={searchFieldRef}\n startIcon={IconSearch}\n aria-label=\"Search options\"\n placeholder=\"Search…\"\n role=\"searchbox\"\n value={searchValue}\n onKeyDown={(e) => e.stopPropagation()}\n onChange={handleSearch}\n />\n )}\n <SelectListOptions disabled={isLoading}>\n {displayOptions.map((option) => (\n <SelectListOption\n key={option?.value ?? option.label}\n onClick={() => handleChange(option?.value)}\n isSelected={option.value === value}\n {...option}\n />\n ))}\n {options.length === 0 && (\n <SelectListOption disabled value=\"empty\" label={noOptionsMessage} />\n )}\n </SelectListOptions>\n </SelectList>\n </Dropdown>\n );\n};\n"],"names":["SingleSelectField","value","startIcon","options","disabled","placeholder","isSearchable","isClearable","isLoading","noOptionsMessage","onChange","onSearch","isOpen","setIsOpen","useState","searchValue","setSearchValue","selectedLabel","setSelectedLabel","searchFieldRef","useRef","useSelectSearchFocus","useEffect","option","opt","debouncedSearch","useMemo","debounce","displayOptions","handleChange","newValue","handleSearch","newSearch","jsx","Dropdown","SelectButton","SelectList","TextField","IconSearch","jsxs","SelectListOptions","SelectListOption"],"mappings":";;;AA4BO,MAAMA,IAAgD,CAAC;AAAA,EAC5D,OAAAC,IAAQ;AAAA,EACR,WAAAC;AAAA,EACA,SAAAC;AAAA,EACA,UAAAC;AAAA,EACA,aAAAC;AAAA,EACA,cAAAC;AAAA,EACA,aAAAC;AAAA,EACA,WAAAC;AAAA,EACA,kBAAAC,IAAmB;AAAA,EACnB,UAAAC;AAAA,EACA,UAAAC;AACF,MAAM;AACJ,QAAM,CAACC,GAAQC,CAAS,IAAIC,EAAS,EAAK,GACpC,CAACC,GAAaC,CAAc,IAAIF,EAAiB,EAAE,GACnD,CAACG,GAAeC,CAAgB,IAAIJ,EAAiBb,CAAK,GAE1DkB,IAAiBC,EAAyB,IAAI;AACpD,EAAAC,EAAqBT,GAAQO,CAAc,GAE3CG,EAAU,MAAM;AACd,QAAI,CAACrB,GAAO;AACV,MAAAiB,EAAiB,EAAE;AACnB;AAAA,IACF;AAEA,UAAMK,IAASpB,EAAQ,KAAK,CAACqB,MAAQA,EAAI,UAAUvB,CAAK;AACxD,IAAIsB,KACFL,EAAiBK,EAAO,KAAK;AAAA,EAEjC,GAAG,CAACtB,GAAOE,CAAO,CAAC;AAEnB,QAAMsB,IAAkBC,EAAQ,MAAOf,IAAWgB,EAAShB,CAAQ,IAAI,QAAY,CAACA,CAAQ,CAAC,GAEvFiB,IACJtB,KAAgB,CAACK,IACbR,EAAQ,OAAO,CAACoB,MAAWA,EAAO,MAAM,cAAc,SAASR,EAAY,YAAA,CAAa,CAAC,IACzFZ,GAEA0B,IAAe,CAACC,MAAsB;AAK1C,QAJAd,EA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AAYA,EAAO,UAAUtB;AAAA,cAC5B,GAAGsB;AAAA,YAAA;AAAA,aAHCA,KAAA,gBAAAA,EAAQ,UAASA,EAAO;AAAA,UAAA,CAKhC;AAAA,UACApB,EAAQ,WAAW,KAClB8B,gBAAAA,EAAAA,IAACQ,GAAA,EAAiB,UAAQ,IAAC,OAAM,SAAQ,OAAOhC,EAAA,CAAkB;AAAA,QAAA,EAAA,CAEtE;AAAA,MAAA,EAAA,CACF;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as i } from "@embeddable.com/react";
|
|
2
|
-
import { d as s, z as r, t as d, c as m, _ as c, V as n, o as u } from "./component.constants-
|
|
3
|
-
import { M as p, S as g } from "./index-
|
|
2
|
+
import { d as s, z as r, t as d, c as m, _ as c, V as n, o as u } from "./component.constants-Bn9l4N1t.js";
|
|
3
|
+
import { M as p, S as g } from "./index-6ilf5W1J.js";
|
|
4
4
|
const f = {
|
|
5
5
|
name: "SingleSelectFieldPro",
|
|
6
6
|
label: "Single Select Field",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { B as f, C as O, D as Q, m as I, E as R, F as J, G as X, L as tt, H as et, I as at, J as rt, K as st, M as nt, j as N, N as ot, O as lt, P as it, Q as L, R as ct } from "./component.constants-
|
|
1
|
+
import { B as f, C as O, D as Q, m as I, E as R, F as J, G as X, L as tt, H as et, I as at, J as rt, K as st, M as nt, j as N, N as ot, O as lt, P as it, Q as L, R as ct } from "./component.constants-Bn9l4N1t.js";
|
|
2
2
|
import { useRef as dt, useMemo as ut } from "react";
|
|
3
|
-
import { r as mt, g as W, a as ft, b as H } from "./object.utils-
|
|
4
|
-
import { g as Y } from "./formatter.utils-
|
|
3
|
+
import { r as mt, g as W, a as ft, b as H } from "./object.utils-C6JIOYmv.js";
|
|
4
|
+
import { g as Y } from "./formatter.utils-Ba_5cIcm.js";
|
|
5
5
|
import { d as D } from "./utc-B2gCnkBk.js";
|
|
6
6
|
import { useTheme as ht } from "@embeddable.com/react";
|
|
7
7
|
const j = {
|
|
@@ -555,4 +555,4 @@ export {
|
|
|
555
555
|
_t as g,
|
|
556
556
|
$t as u
|
|
557
557
|
};
|
|
558
|
-
//# sourceMappingURL=charts.fillGaps.hooks-
|
|
558
|
+
//# sourceMappingURL=charts.fillGaps.hooks-BFmuMVNT.js.map
|