@embeddable.com/remarkable-pro 0.0.16 → 0.0.17
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 +2 -2
- package/dist/BarChartDefaultPro.js +2 -2
- package/dist/BarChartGroupedHorizontalPro.js +2 -2
- package/dist/BarChartGroupedPro.js +2 -2
- package/dist/BarChartStackedHorizontalPro.js +2 -2
- package/dist/BarChartStackedPro.js +2 -2
- package/dist/{ChartCard-DWq8ltZe.js → ChartCard-CuGtJlaW.js} +2 -2
- package/dist/{ChartCard-DWq8ltZe.js.map → ChartCard-CuGtJlaW.js.map} +1 -1
- package/dist/ComparisonPeriodSelectFieldPro.js +2 -2
- package/dist/DateRangePickerCustomPro.js +2 -2
- package/dist/DateRangeSelectFieldPro.js +2 -2
- package/dist/DonutChartPro.js +2 -2
- package/dist/DonutLabelChartPro.js +2 -2
- package/dist/{EditorCard-GIL6-rb_.js → EditorCard-CNtTIFGO.js} +2 -2
- package/dist/{EditorCard-GIL6-rb_.js.map → EditorCard-CNtTIFGO.js.map} +1 -1
- package/dist/HeatMapPro.js +18 -17
- package/dist/HeatMapPro.js.map +1 -1
- package/dist/KpiChartNumberComparisonPro.js +2 -2
- package/dist/KpiChartNumberPro.js +2 -2
- package/dist/LineChartComparisonDefaultPro.js +2 -2
- package/dist/LineChartDefaultPro.js +2 -2
- package/dist/LineChartGroupedPro.js +2 -2
- package/dist/MultiSelectFieldPro.js +2 -2
- package/dist/PieChartPro.js +2 -2
- package/dist/PivotTablePro.js +2 -2
- package/dist/SingleSelectFieldPro.js +2 -2
- package/dist/TableChartPaginated.js +2 -2
- package/dist/{bars.utils-fkN2-HS9.js → bars.utils-c9bi5X5n.js} +3 -3
- package/dist/{bars.utils-fkN2-HS9.js.map → bars.utils-c9bi5X5n.js.map} +1 -1
- package/dist/{charts.utils-BiED7HDM.js → charts.utils-nkrr8Yy8.js} +3 -3
- package/dist/{charts.utils-BiED7HDM.js.map → charts.utils-nkrr8Yy8.js.map} +1 -1
- package/dist/{component.inputs.constants-BYwiwFNH.js → component.inputs.constants-CpWMPDsp.js} +2 -2
- package/dist/{component.inputs.constants-BYwiwFNH.js.map → component.inputs.constants-CpWMPDsp.js.map} +1 -1
- package/dist/components/component.inputs.constants.d.ts +1 -1
- package/dist/embeddable-components.json +10 -10
- package/dist/{formatter.utils-C6e5AE1P.js → formatter.utils-DPI9zC1z.js} +2 -2
- package/dist/{formatter.utils-C6e5AE1P.js.map → formatter.utils-DPI9zC1z.js.map} +1 -1
- package/dist/{index-DP-lVPuh.js → index-1Pthtw-F.js} +4 -4
- package/dist/{index-DP-lVPuh.js.map → index-1Pthtw-F.js.map} +1 -1
- package/dist/{index-B6Sxhv5V.js → index-8dPSbeeV.js} +3 -3
- package/dist/{index-B6Sxhv5V.js.map → index-8dPSbeeV.js.map} +1 -1
- package/dist/{index-CBauec4T.js → index-B0gfoUZP.js} +4 -4
- package/dist/{index-CBauec4T.js.map → index-B0gfoUZP.js.map} +1 -1
- package/dist/{index-IERhvJoR.js → index-B6Nckx8Z.js} +5 -5
- package/dist/{index-IERhvJoR.js.map → index-B6Nckx8Z.js.map} +1 -1
- package/dist/{index-za3bNggu.js → index-BBmMB5DD.js} +4 -4
- package/dist/{index-za3bNggu.js.map → index-BBmMB5DD.js.map} +1 -1
- package/dist/{index-BiJMrvpt.js → index-BHVaEsvO.js} +4 -4
- package/dist/{index-BiJMrvpt.js.map → index-BHVaEsvO.js.map} +1 -1
- package/dist/{index-PV9-pvEj.js → index-BQKTtuOl.js} +4 -4
- package/dist/{index-PV9-pvEj.js.map → index-BQKTtuOl.js.map} +1 -1
- package/dist/{index-Do4E11C9.js → index-BTdWqSDj.js} +4 -4
- package/dist/{index-Do4E11C9.js.map → index-BTdWqSDj.js.map} +1 -1
- package/dist/{index-agIiR5E8.js → index-BUnUdDZd.js} +4 -4
- package/dist/{index-agIiR5E8.js.map → index-BUnUdDZd.js.map} +1 -1
- package/dist/{index-Bvnqafeu.js → index-BaSNws-A.js} +4 -4
- package/dist/{index-Bvnqafeu.js.map → index-BaSNws-A.js.map} +1 -1
- package/dist/{index-AkhRDk1Q.js → index-CB5nTme1.js} +4 -4
- package/dist/{index-AkhRDk1Q.js.map → index-CB5nTme1.js.map} +1 -1
- package/dist/{index-B7ZOvR_0.js → index-CSH6Tke5.js} +4 -4
- package/dist/{index-B7ZOvR_0.js.map → index-CSH6Tke5.js.map} +1 -1
- package/dist/{index-CdT1o7ra.js → index-CwL7feVe.js} +4 -4
- package/dist/{index-CdT1o7ra.js.map → index-CwL7feVe.js.map} +1 -1
- package/dist/{index-De2fu_3w.js → index-DbQoW48_.js} +5 -5
- package/dist/{index-De2fu_3w.js.map → index-DbQoW48_.js.map} +1 -1
- package/dist/{index-Ybpp0kam.js → index-DfXkoWel.js} +3 -3
- package/dist/{index-Ybpp0kam.js.map → index-DfXkoWel.js.map} +1 -1
- package/dist/{index-DGoq-GmG.js → index-DjA9mRxV.js} +5 -5
- package/dist/{index-DGoq-GmG.js.map → index-DjA9mRxV.js.map} +1 -1
- package/dist/{index-BPWmQIUP.js → index-Dz6llBs_.js} +4 -4
- package/dist/{index-BPWmQIUP.js.map → index-Dz6llBs_.js.map} +1 -1
- package/dist/{index-DJy_zcds.js → index-WDuZPeli.js} +4 -4
- package/dist/{index-DJy_zcds.js.map → index-WDuZPeli.js.map} +1 -1
- package/dist/{index-hHZCF8mP.js → index-hmfJGJBH.js} +4 -4
- package/dist/{index-hHZCF8mP.js.map → index-hmfJGJBH.js.map} +1 -1
- package/dist/{index-BKe5XLWq.js → index-natSwnW-.js} +4 -4
- package/dist/{index-BKe5XLWq.js.map → index-natSwnW-.js.map} +1 -1
- package/dist/{index-BLrDwmLF.js → index-z0A1zEtp.js} +4 -4
- package/dist/{index-BLrDwmLF.js.map → index-z0A1zEtp.js.map} +1 -1
- package/dist/index.js +28 -28
- package/dist/{pies.utils--MuyzEyP.js → pies.utils-BO9fuUwj.js} +4 -4
- package/dist/{pies.utils--MuyzEyP.js.map → pies.utils-BO9fuUwj.js.map} +1 -1
- package/dist/{timeRange.utils-Cf2JBR0j.js → timeRange.utils-DaDev_JE.js} +2 -2
- package/dist/{timeRange.utils-Cf2JBR0j.js.map → timeRange.utils-DaDev_JE.js.map} +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { V as s, l as i } from "./Color.type.emb-CLYI-rua.js";
|
|
2
2
|
import { defineComponent as o } from "@embeddable.com/react";
|
|
3
|
-
import { B as r } from "./index-
|
|
4
|
-
import { b as e } from "./component.inputs.constants-
|
|
3
|
+
import { B as r } from "./index-1Pthtw-F.js";
|
|
4
|
+
import { b as e } from "./component.inputs.constants-CpWMPDsp.js";
|
|
5
5
|
const t = {
|
|
6
6
|
name: "BarChartDefaultHorizontalPro",
|
|
7
7
|
label: "Bar Chart - Default Horizontal",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { V as s, l as i } from "./Color.type.emb-CLYI-rua.js";
|
|
2
2
|
import { defineComponent as r } from "@embeddable.com/react";
|
|
3
|
-
import { B as t } from "./index-
|
|
4
|
-
import { b as e } from "./component.inputs.constants-
|
|
3
|
+
import { B as t } from "./index-BBmMB5DD.js";
|
|
4
|
+
import { b as e } from "./component.inputs.constants-CpWMPDsp.js";
|
|
5
5
|
const o = {
|
|
6
6
|
name: "BarChartDefaultPro",
|
|
7
7
|
label: "Bar Chart - Default",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { V as i, l as o } from "./Color.type.emb-CLYI-rua.js";
|
|
2
2
|
import { defineComponent as r } from "@embeddable.com/react";
|
|
3
|
-
import { B as s } from "./index-
|
|
4
|
-
import { b as e } from "./component.inputs.constants-
|
|
3
|
+
import { B as s } from "./index-BTdWqSDj.js";
|
|
4
|
+
import { b as e } from "./component.inputs.constants-CpWMPDsp.js";
|
|
5
5
|
const n = {
|
|
6
6
|
name: "BarChartGroupedHorizontalPro",
|
|
7
7
|
label: "Bar Chart - Grouped Horizontal",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { V as i, l as r } from "./Color.type.emb-CLYI-rua.js";
|
|
2
2
|
import { defineComponent as s } from "@embeddable.com/react";
|
|
3
|
-
import { B as o } from "./index-
|
|
4
|
-
import { b as e } from "./component.inputs.constants-
|
|
3
|
+
import { B as o } from "./index-hmfJGJBH.js";
|
|
4
|
+
import { b as e } from "./component.inputs.constants-CpWMPDsp.js";
|
|
5
5
|
const n = {
|
|
6
6
|
name: "BarChartGroupedPro",
|
|
7
7
|
label: "Bar Chart - Grouped",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { V as i, l as o } from "./Color.type.emb-CLYI-rua.js";
|
|
2
2
|
import { defineComponent as s } from "@embeddable.com/react";
|
|
3
|
-
import { B as r } from "./index-
|
|
4
|
-
import { b as e } from "./component.inputs.constants-
|
|
3
|
+
import { B as r } from "./index-B0gfoUZP.js";
|
|
4
|
+
import { b as e } from "./component.inputs.constants-CpWMPDsp.js";
|
|
5
5
|
const t = {
|
|
6
6
|
name: "BarChartStackedHorizontalPro",
|
|
7
7
|
label: "Bar Chart - Stacked Horizontal",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { V as i, l as s } from "./Color.type.emb-CLYI-rua.js";
|
|
2
2
|
import { defineComponent as o } from "@embeddable.com/react";
|
|
3
|
-
import { B as r } from "./index-
|
|
4
|
-
import { b as e } from "./component.inputs.constants-
|
|
3
|
+
import { B as r } from "./index-CSH6Tke5.js";
|
|
4
|
+
import { b as e } from "./component.inputs.constants-CpWMPDsp.js";
|
|
5
5
|
const t = {
|
|
6
6
|
name: "BarChartStackedPro",
|
|
7
7
|
label: "Bar Chart - Stacked",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as R, j as t, Q as I, x as S, y as L, z as N, A as k, C as D, p as M, R as x, q as b, U as T, r as _ } from "./Color.type.emb-CLYI-rua.js";
|
|
2
2
|
import f, { useRef as w } from "react";
|
|
3
3
|
import { useTheme as j } from "@embeddable.com/react";
|
|
4
|
-
import { a as p, i as m, I as A } from "./component.inputs.constants-
|
|
4
|
+
import { a as p, i as m, I as A } from "./component.inputs.constants-CpWMPDsp.js";
|
|
5
5
|
/**
|
|
6
6
|
* @license @tabler/icons-react v3.36.0 - MIT
|
|
7
7
|
*
|
|
@@ -121,4 +121,4 @@ G.displayName = "ChartCard";
|
|
|
121
121
|
export {
|
|
122
122
|
G as C
|
|
123
123
|
};
|
|
124
|
-
//# sourceMappingURL=ChartCard-
|
|
124
|
+
//# sourceMappingURL=ChartCard-CuGtJlaW.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChartCard-DWq8ltZe.js","sources":["../node_modules/@tabler/icons-react/dist/esm/icons/IconDotsVertical.mjs","../src/components/charts/shared/ChartCard/ChartCardLoading/ChartCardLoading.tsx","../src/components/charts/shared/ChartCard/ChartCardMenuPro/ChartCardMenuPro.tsx","../src/components/charts/shared/ChartCard/ChartCard.tsx"],"sourcesContent":["/**\n * @license @tabler/icons-react v3.36.0 - MIT\n *\n * This source code is licensed under the MIT license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createReactComponent from '../createReactComponent.mjs';\n\nconst __iconNode = [[\"path\", { \"d\": \"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0\", \"key\": \"svg-0\" }], [\"path\", { \"d\": \"M12 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0\", \"key\": \"svg-1\" }], [\"path\", { \"d\": \"M12 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0\", \"key\": \"svg-2\" }]];\nconst IconDotsVertical = createReactComponent(\"outline\", \"dots-vertical\", \"DotsVertical\", __iconNode);\n\nexport { __iconNode, IconDotsVertical as default };\n//# sourceMappingURL=IconDotsVertical.mjs.map\n","import { IconLoader2 } from '@tabler/icons-react';\nimport styles from './ChartCardLoading.module.css';\n\nexport const ChartCardLoading = () => <IconLoader2 className={styles.loading} />;\n","import { IconDotsVertical } from '@tabler/icons-react';\nimport React from 'react';\nimport { useTheme } from '@embeddable.com/react';\nimport { ChartCardLoading } from '../ChartCardLoading/ChartCardLoading';\nimport { i18n, i18nSetup } from '../../../../../theme/i18n/i18n';\nimport { Theme } from '../../../../../theme/theme.types';\nimport {\n Dropdown,\n ActionIcon,\n SelectFieldContent,\n SelectListOption,\n} from '@embeddable.com/remarkable-ui';\nimport styles from './ChartCardMenuPro.module.css';\nimport { ChartCardMenuOptionOnClickProps } from '../../../../../theme/defaults/defaults.ChartCardMenu.constants';\n\ntype InlineSvgFromDataProps = React.HTMLAttributes<HTMLSpanElement> & {\n src: string;\n};\n\nexport function InlineSvgFromData({ src, className, ...rest }: InlineSvgFromDataProps) {\n // Remove prefix and URL-decode the SVG markup\n const svgMarkup = decodeURIComponent(src.replace(/^data:image\\/svg\\+xml,/, ''));\n\n return <div className={className} {...rest} dangerouslySetInnerHTML={{ __html: svgMarkup }} />;\n}\n\ntype ChartCardMenuProProps = Omit<ChartCardMenuOptionOnClickProps, 'theme'>;\n\nexport const ChartCardMenuPro: React.FC<ChartCardMenuProProps> = (props) => {\n const theme: Theme = useTheme() as Theme;\n i18nSetup(theme);\n\n const [isLoading, setIsLoading] = React.useState(false);\n\n const options = theme.defaults.chartMenuOptions ?? [];\n\n if (options.length === 0) {\n return null;\n }\n\n const startAction = (onClick: () => void | Promise<void>) => {\n setTimeout(() => {\n Promise.resolve(onClick()).finally(() => setIsLoading(false));\n }, 100);\n };\n\n const handleExport = (onClick: (props: ChartCardMenuOptionOnClickProps) => void) => {\n setIsLoading(true);\n if (props.onCustomDownload) {\n props.onCustomDownload((args) => startAction(() => onClick(args)));\n return;\n }\n startAction(() => onClick({ ...props, theme }));\n };\n\n return (\n <Dropdown\n side=\"bottom\"\n align=\"end\"\n triggerComponent={isLoading ? <ChartCardLoading /> : <ActionIcon icon={IconDotsVertical} />}\n >\n <SelectFieldContent className={styles.list} autoFocus>\n {options.map((option, index) => {\n const label = i18n.t(option.labelKey);\n\n return (\n <SelectListOption\n key={index}\n label={label}\n onClick={() => handleExport(option.onClick)}\n startIcon={option.iconSrc ? <InlineSvgFromData src={option.iconSrc} /> : undefined}\n />\n );\n })}\n </SelectFieldContent>\n </Dropdown>\n );\n};\n","import React, { CSSProperties, useRef } from 'react';\nimport { IconAlertCircle } from '@tabler/icons-react';\nimport {\n Card,\n CardContent,\n CardFeedback,\n CardHeader,\n Skeleton,\n} from '@embeddable.com/remarkable-ui';\nimport styles from './ChartCard.module.css';\nimport { DataResponse, Dimension, Measure } from '@embeddable.com/core';\nimport { useTheme } from '@embeddable.com/react';\nimport { ChartCardLoading } from './ChartCardLoading/ChartCardLoading';\nimport { ChartCardMenuPro } from './ChartCardMenuPro/ChartCardMenuPro';\nimport { Theme } from '../../../../theme/theme.types';\nimport { i18n, i18nSetup } from '../../../../theme/i18n/i18n';\nimport clsx from 'clsx';\nimport { ChartCardMenuOptionOnClickProps } from '../../../../theme/defaults/defaults.ChartCardMenu.constants';\n\ntype ChartCardProps = {\n title: string;\n subtitle?: string;\n children: React.ReactNode;\n data: DataResponse;\n errorMessage?: string;\n style?: CSSProperties;\n dimensionsAndMeasures?: (Dimension | Measure)[];\n onCustomDownload?: (props: (props: ChartCardMenuOptionOnClickProps) => void) => void;\n};\n\nexport const ChartCard = React.forwardRef<HTMLDivElement, ChartCardProps>(\n (\n { title, subtitle, children, data, errorMessage, dimensionsAndMeasures = [], onCustomDownload },\n ref,\n ) => {\n const theme: Theme = useTheme() as Theme;\n i18nSetup(theme);\n\n const chartRef = useRef<HTMLDivElement>(null);\n\n const hasData = Boolean(data?.data && data.data?.length > 0);\n\n const isLoading = !data || data?.isLoading;\n\n const getDisplay = () => {\n if (isLoading && !hasData) {\n return <Skeleton />;\n }\n\n if (errorMessage) {\n return (\n <CardFeedback\n variant=\"error\"\n icon={IconAlertCircle}\n title={i18n.t('charts.errorTitle')}\n message={errorMessage}\n />\n );\n }\n\n if (!hasData) {\n return (\n <CardFeedback\n title={i18n.t('charts.emptyTitle')}\n message={i18n.t('charts.emptyMessage')}\n />\n );\n }\n\n return children;\n };\n\n return (\n <Card className={styles.chartCard}>\n <CardHeader\n title={title}\n subtitle={subtitle}\n rightContent={\n <div className={styles.chartCardRightContent}>\n <div\n className={clsx(styles.fixedContent, isLoading ? styles.loading : styles.hidden)}\n >\n <ChartCardLoading />\n </div>\n <div\n className={clsx(styles.fixedContent, isLoading ? styles.hidden : styles.visible)}\n >\n <ChartCardMenuPro\n title={title}\n containerRef={chartRef}\n data={data?.data}\n dimensionsAndMeasures={dimensionsAndMeasures}\n onCustomDownload={onCustomDownload}\n />\n </div>\n </div>\n }\n />\n\n <CardContent ref={onCustomDownload ? ref : chartRef}>{getDisplay()}</CardContent>\n </Card>\n );\n },\n);\n\nChartCard.displayName = 'ChartCard';\n"],"names":["__iconNode","IconDotsVertical","createReactComponent","ChartCardLoading","jsx","IconLoader2","styles","InlineSvgFromData","src","className","rest","svgMarkup","ChartCardMenuPro","props","theme","useTheme","i18nSetup","isLoading","setIsLoading","React","options","startAction","onClick","handleExport","args","Dropdown","ActionIcon","SelectFieldContent","option","index","label","i18n","SelectListOption","ChartCard","title","subtitle","children","data","errorMessage","dimensionsAndMeasures","onCustomDownload","ref","chartRef","useRef","hasData","_a","getDisplay","Skeleton","CardFeedback","IconAlertCircle","jsxs","Card","CardHeader","clsx","CardContent"],"mappings":";;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMA,IAAa,CAAC,CAAC,QAAQ,EAAE,GAAK,4CAA4C,KAAO,QAAO,CAAE,GAAG,CAAC,QAAQ,EAAE,GAAK,4CAA4C,KAAO,SAAS,GAAG,CAAC,QAAQ,EAAE,GAAK,2CAA2C,KAAO,QAAO,CAAE,CAAC,GACxPC,IAAmBC,EAAqB,WAAW,iBAAiB,gBAAgBF,CAAU;;;;;;;;GCPvFG,IAAmB,MAAMC,gBAAAA,EAAAA,IAACC,GAAA,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AA,MAAAF,gBAAAA,EAAAA;AAAAA,QAACgD;AAAA,QAAA;AAAA,UACC,OAAAlB;AAAA,UACA,UAAAC;AAAA,UACA,cACEe,gBAAAA,EAAAA,KAAC,OAAA,EAAI,WAAW5C,EAAO,uBACrB,UAAA;AAAA,YAAAF,gBAAAA,EAAAA;AAAAA,cAAC;AAAA,cAAA;AAAA,gBACC,WAAWiD,EAAK/C,EAAO,cAAcW,IAAYX,EAAO,UAAUA,EAAO,MAAM;AAAA,gBAE/E,gCAACH,GAAA,CAAA,CAAiB;AAAA,cAAA;AAAA,YAAA;AAAA,YAEpBC,gBAAAA,EAAAA;AAAAA,cAAC;AAAA,cAAA;AAAA,gBACC,WAAWiD,EAAK/C,EAAO,cAAcW,IAAYX,EAAO,SAASA,EAAO,OAAO;AAAA,gBAE/E,UAAAF,gBAAAA,EAAAA;AAAAA,kBAACQ;AAAA,kBAAA;AAAA,oBACC,OAAAsB;AAAA,oBACA,cAAcQ;AAAA,oBACd,MAAML,KAAA,gBAAAA,EAAM;AAAA,oBACZ,uBAAAE;AAAA,oBACA,kBAAAC;AAAA,kBAAA;AAAA,gBAAA;AAAA,cACF;AAAA,YAAA;AAAA,UACF,EAAA,CACF;AAAA,QAAA;AAAA,MAAA;AAAA,4BAIHc,GAAA,EAAY,KAAKd,IAAmBC,IAAMC,GAAW,cAAW,CAAE;AAAA,IAAA,GACrE;AAAA,EAEJ;AACF;AAEAT,EAAU,cAAc;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"ChartCard-CuGtJlaW.js","sources":["../node_modules/@tabler/icons-react/dist/esm/icons/IconDotsVertical.mjs","../src/components/charts/shared/ChartCard/ChartCardLoading/ChartCardLoading.tsx","../src/components/charts/shared/ChartCard/ChartCardMenuPro/ChartCardMenuPro.tsx","../src/components/charts/shared/ChartCard/ChartCard.tsx"],"sourcesContent":["/**\n * @license @tabler/icons-react v3.36.0 - MIT\n *\n * This source code is licensed under the MIT license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createReactComponent from '../createReactComponent.mjs';\n\nconst __iconNode = [[\"path\", { \"d\": \"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0\", \"key\": \"svg-0\" }], [\"path\", { \"d\": \"M12 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0\", \"key\": \"svg-1\" }], [\"path\", { \"d\": \"M12 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0\", \"key\": \"svg-2\" }]];\nconst IconDotsVertical = createReactComponent(\"outline\", \"dots-vertical\", \"DotsVertical\", __iconNode);\n\nexport { __iconNode, IconDotsVertical as default };\n//# sourceMappingURL=IconDotsVertical.mjs.map\n","import { IconLoader2 } from '@tabler/icons-react';\nimport styles from './ChartCardLoading.module.css';\n\nexport const ChartCardLoading = () => <IconLoader2 className={styles.loading} />;\n","import { IconDotsVertical } from '@tabler/icons-react';\nimport React from 'react';\nimport { useTheme } from '@embeddable.com/react';\nimport { ChartCardLoading } from '../ChartCardLoading/ChartCardLoading';\nimport { i18n, i18nSetup } from '../../../../../theme/i18n/i18n';\nimport { Theme } from '../../../../../theme/theme.types';\nimport {\n Dropdown,\n ActionIcon,\n SelectFieldContent,\n SelectListOption,\n} from '@embeddable.com/remarkable-ui';\nimport styles from './ChartCardMenuPro.module.css';\nimport { ChartCardMenuOptionOnClickProps } from '../../../../../theme/defaults/defaults.ChartCardMenu.constants';\n\ntype InlineSvgFromDataProps = React.HTMLAttributes<HTMLSpanElement> & {\n src: string;\n};\n\nexport function InlineSvgFromData({ src, className, ...rest }: InlineSvgFromDataProps) {\n // Remove prefix and URL-decode the SVG markup\n const svgMarkup = decodeURIComponent(src.replace(/^data:image\\/svg\\+xml,/, ''));\n\n return <div className={className} {...rest} dangerouslySetInnerHTML={{ __html: svgMarkup }} />;\n}\n\ntype ChartCardMenuProProps = Omit<ChartCardMenuOptionOnClickProps, 'theme'>;\n\nexport const ChartCardMenuPro: React.FC<ChartCardMenuProProps> = (props) => {\n const theme: Theme = useTheme() as Theme;\n i18nSetup(theme);\n\n const [isLoading, setIsLoading] = React.useState(false);\n\n const options = theme.defaults.chartMenuOptions ?? [];\n\n if (options.length === 0) {\n return null;\n }\n\n const startAction = (onClick: () => void | Promise<void>) => {\n setTimeout(() => {\n Promise.resolve(onClick()).finally(() => setIsLoading(false));\n }, 100);\n };\n\n const handleExport = (onClick: (props: ChartCardMenuOptionOnClickProps) => void) => {\n setIsLoading(true);\n if (props.onCustomDownload) {\n props.onCustomDownload((args) => startAction(() => onClick(args)));\n return;\n }\n startAction(() => onClick({ ...props, theme }));\n };\n\n return (\n <Dropdown\n side=\"bottom\"\n align=\"end\"\n triggerComponent={isLoading ? <ChartCardLoading /> : <ActionIcon icon={IconDotsVertical} />}\n >\n <SelectFieldContent className={styles.list} autoFocus>\n {options.map((option, index) => {\n const label = i18n.t(option.labelKey);\n\n return (\n <SelectListOption\n key={index}\n label={label}\n onClick={() => handleExport(option.onClick)}\n startIcon={option.iconSrc ? <InlineSvgFromData src={option.iconSrc} /> : undefined}\n />\n );\n })}\n </SelectFieldContent>\n </Dropdown>\n );\n};\n","import React, { CSSProperties, useRef } from 'react';\nimport { IconAlertCircle } from '@tabler/icons-react';\nimport {\n Card,\n CardContent,\n CardFeedback,\n CardHeader,\n Skeleton,\n} from '@embeddable.com/remarkable-ui';\nimport styles from './ChartCard.module.css';\nimport { DataResponse, Dimension, Measure } from '@embeddable.com/core';\nimport { useTheme } from '@embeddable.com/react';\nimport { ChartCardLoading } from './ChartCardLoading/ChartCardLoading';\nimport { ChartCardMenuPro } from './ChartCardMenuPro/ChartCardMenuPro';\nimport { Theme } from '../../../../theme/theme.types';\nimport { i18n, i18nSetup } from '../../../../theme/i18n/i18n';\nimport clsx from 'clsx';\nimport { ChartCardMenuOptionOnClickProps } from '../../../../theme/defaults/defaults.ChartCardMenu.constants';\n\ntype ChartCardProps = {\n title: string;\n subtitle?: string;\n children: React.ReactNode;\n data: DataResponse;\n errorMessage?: string;\n style?: CSSProperties;\n dimensionsAndMeasures?: (Dimension | Measure)[];\n onCustomDownload?: (props: (props: ChartCardMenuOptionOnClickProps) => void) => void;\n};\n\nexport const ChartCard = React.forwardRef<HTMLDivElement, ChartCardProps>(\n (\n { title, subtitle, children, data, errorMessage, dimensionsAndMeasures = [], onCustomDownload },\n ref,\n ) => {\n const theme: Theme = useTheme() as Theme;\n i18nSetup(theme);\n\n const chartRef = useRef<HTMLDivElement>(null);\n\n const hasData = Boolean(data?.data && data.data?.length > 0);\n\n const isLoading = !data || data?.isLoading;\n\n const getDisplay = () => {\n if (isLoading && !hasData) {\n return <Skeleton />;\n }\n\n if (errorMessage) {\n return (\n <CardFeedback\n variant=\"error\"\n icon={IconAlertCircle}\n title={i18n.t('charts.errorTitle')}\n message={errorMessage}\n />\n );\n }\n\n if (!hasData) {\n return (\n <CardFeedback\n title={i18n.t('charts.emptyTitle')}\n message={i18n.t('charts.emptyMessage')}\n />\n );\n }\n\n return children;\n };\n\n return (\n <Card className={styles.chartCard}>\n <CardHeader\n title={title}\n subtitle={subtitle}\n rightContent={\n <div className={styles.chartCardRightContent}>\n <div\n className={clsx(styles.fixedContent, isLoading ? styles.loading : styles.hidden)}\n >\n <ChartCardLoading />\n </div>\n <div\n className={clsx(styles.fixedContent, isLoading ? styles.hidden : styles.visible)}\n >\n <ChartCardMenuPro\n title={title}\n containerRef={chartRef}\n data={data?.data}\n dimensionsAndMeasures={dimensionsAndMeasures}\n onCustomDownload={onCustomDownload}\n />\n </div>\n </div>\n }\n />\n\n <CardContent ref={onCustomDownload ? ref : chartRef}>{getDisplay()}</CardContent>\n </Card>\n );\n },\n);\n\nChartCard.displayName = 'ChartCard';\n"],"names":["__iconNode","IconDotsVertical","createReactComponent","ChartCardLoading","jsx","IconLoader2","styles","InlineSvgFromData","src","className","rest","svgMarkup","ChartCardMenuPro","props","theme","useTheme","i18nSetup","isLoading","setIsLoading","React","options","startAction","onClick","handleExport","args","Dropdown","ActionIcon","SelectFieldContent","option","index","label","i18n","SelectListOption","ChartCard","title","subtitle","children","data","errorMessage","dimensionsAndMeasures","onCustomDownload","ref","chartRef","useRef","hasData","_a","getDisplay","Skeleton","CardFeedback","IconAlertCircle","jsxs","Card","CardHeader","clsx","CardContent"],"mappings":";;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMA,IAAa,CAAC,CAAC,QAAQ,EAAE,GAAK,4CAA4C,KAAO,QAAO,CAAE,GAAG,CAAC,QAAQ,EAAE,GAAK,4CAA4C,KAAO,SAAS,GAAG,CAAC,QAAQ,EAAE,GAAK,2CAA2C,KAAO,QAAO,CAAE,CAAC,GACxPC,IAAmBC,EAAqB,WAAW,iBAAiB,gBAAgBF,CAAU;;;;;;;;GCPvFG,IAAmB,MAAMC,gBAAAA,EAAAA,IAACC,GAAA,EAAY,WAAWC,EAAO,SAAS;;;ACgBvE,SAASC,EAAkB,EAAE,KAAAC,GAAK,WAAAC,GAAW,GAAGC,KAAgC;AAErF,QAAMC,IAAY,mBAAmBH,EAAI,QAAQ,0BAA0B,EAAE,CAAC;AAE9E,SAAOJ,gBAAAA,EAAAA,IAAC,SAAI,WAAAK,GAAuB,GAAGC,GAAM,yBAAyB,EAAE,QAAQC,EAAA,GAAa;AAC9F;AAIO,MAAMC,IAAoD,CAACC,MAAU;AAC1E,QAAMC,IAAeC,EAAA;AACrB,EAAAC,EAAUF,CAAK;AAEf,QAAM,CAACG,GAAWC,CAAY,IAAIC,EAAM,SAAS,EAAK,GAEhDC,IAAUN,EAAM,SAAS,oBAAoB,CAAA;AAEnD,MAAIM,EAAQ,WAAW;AACrB,WAAO;AAGT,QAAMC,IAAc,CAACC,MAAwC;AAC3D,eAAW,MAAM;AACf,cAAQ,QAAQA,GAAS,EAAE,QAAQ,MAAMJ,EAAa,EAAK,CAAC;AAAA,IAC9D,GAAG,GAAG;AAAA,EACR,GAEMK,IAAe,CAACD,MAA8D;AAElF,QADAJ,EAAa,EAAI,GACbL,EAAM,kBAAkB;AAC1B,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AAAA,UACF,EAAA,CACF;AAAA,QAAA;AAAA,MAAA;AAAA,4BAIHc,GAAA,EAAY,KAAKd,IAAmBC,IAAMC,GAAW,cAAW,CAAE;AAAA,IAAA,GACrE;AAAA,EAEJ;AACF;AAEAT,EAAU,cAAc;","x_google_ignoreList":[0]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as i } from "@embeddable.com/react";
|
|
2
2
|
import { V as r } from "./Color.type.emb-CLYI-rua.js";
|
|
3
|
-
import { D as t } from "./index-
|
|
4
|
-
import { b as e, C as a } from "./component.inputs.constants-
|
|
3
|
+
import { D as t } from "./index-DfXkoWel.js";
|
|
4
|
+
import { b as e, C as a } from "./component.inputs.constants-CpWMPDsp.js";
|
|
5
5
|
const n = {
|
|
6
6
|
name: "ComparisonPeriodSelectFieldPro",
|
|
7
7
|
label: "Comparison Period Select Field",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useTheme as C, defineComponent as v } from "@embeddable.com/react";
|
|
2
2
|
import { j as s, c as y, V as l } from "./Color.type.emb-CLYI-rua.js";
|
|
3
3
|
import { u as D, g as P, a as V, b as w } from "./dates.utils-f-XJ_LBg.js";
|
|
4
|
-
import { a as j, r as k, i as M, b as a } from "./component.inputs.constants-
|
|
5
|
-
import { E as T } from "./EditorCard-
|
|
4
|
+
import { a as j, r as k, i as M, b as a } from "./component.inputs.constants-CpWMPDsp.js";
|
|
5
|
+
import { E as T } from "./EditorCard-CNtTIFGO.js";
|
|
6
6
|
const x = (e) => {
|
|
7
7
|
const t = C();
|
|
8
8
|
j(t);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as n } from "@embeddable.com/react";
|
|
2
2
|
import { V as t } from "./Color.type.emb-CLYI-rua.js";
|
|
3
|
-
import { D as l } from "./index-
|
|
4
|
-
import { b as e } from "./component.inputs.constants-
|
|
3
|
+
import { D as l } from "./index-8dPSbeeV.js";
|
|
4
|
+
import { b as e } from "./component.inputs.constants-CpWMPDsp.js";
|
|
5
5
|
const o = {
|
|
6
6
|
name: "DateRangeSelectFieldPro",
|
|
7
7
|
label: "Date-Range Picker - Presets",
|
package/dist/DonutChartPro.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { V as o, l as n } from "./Color.type.emb-CLYI-rua.js";
|
|
2
2
|
import { defineComponent as a } from "@embeddable.com/react";
|
|
3
|
-
import { D as s } from "./index-
|
|
4
|
-
import { b as e } from "./component.inputs.constants-
|
|
3
|
+
import { D as s } from "./index-CwL7feVe.js";
|
|
4
|
+
import { b as e } from "./component.inputs.constants-CpWMPDsp.js";
|
|
5
5
|
const r = {
|
|
6
6
|
name: "DonutChartPro",
|
|
7
7
|
label: "Donut Chart",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { D as n } from "./index-
|
|
1
|
+
import { D as n } from "./index-B6Nckx8Z.js";
|
|
2
2
|
import { V as r, l as t } from "./Color.type.emb-CLYI-rua.js";
|
|
3
3
|
import { defineComponent as o } from "@embeddable.com/react";
|
|
4
|
-
import { b as e } from "./component.inputs.constants-
|
|
4
|
+
import { b as e } from "./component.inputs.constants-CpWMPDsp.js";
|
|
5
5
|
const s = {
|
|
6
6
|
name: "DonutLabelChartPro",
|
|
7
7
|
label: "Donut Label Chart",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { j as r, C as c, p as d, q as m, r as l } from "./Color.type.emb-CLYI-rua.js";
|
|
2
2
|
import { useTheme as p } from "@embeddable.com/react";
|
|
3
|
-
import { a as C, i as x, I as j } from "./component.inputs.constants-
|
|
3
|
+
import { a as C, i as x, I as j } from "./component.inputs.constants-CpWMPDsp.js";
|
|
4
4
|
const u = "_card_15bw3_1", f = {
|
|
5
5
|
card: u
|
|
6
6
|
}, b = ({
|
|
@@ -29,4 +29,4 @@ const u = "_card_15bw3_1", f = {
|
|
|
29
29
|
export {
|
|
30
30
|
b as E
|
|
31
31
|
};
|
|
32
|
-
//# sourceMappingURL=EditorCard-
|
|
32
|
+
//# sourceMappingURL=EditorCard-CNtTIFGO.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditorCard-
|
|
1
|
+
{"version":3,"file":"EditorCard-CNtTIFGO.js","sources":["../src/components/editors/shared/EditorCard/EditorCard.tsx"],"sourcesContent":["import { useTheme } from '@embeddable.com/react';\nimport { i18n, i18nSetup } from '../../../../theme/i18n/i18n';\nimport styles from './EditorCard.module.css';\nimport { FC } from 'react';\nimport { Theme } from '../../../../theme/theme.types';\nimport { Card, CardContent, CardFeedback, CardHeader } from '@embeddable.com/remarkable-ui';\nimport { IconAlertCircle } from '@tabler/icons-react';\n\ntype EditorCardProps = {\n title?: string;\n subtitle?: string;\n children: React.ReactNode;\n errorMessage?: string;\n};\n\nexport const EditorCard: FC<EditorCardProps> = ({\n title,\n subtitle,\n children,\n errorMessage,\n ...props\n}) => {\n const theme: Theme = useTheme() as Theme;\n i18nSetup(theme);\n\n const getDisplay = () => {\n if (errorMessage) {\n return (\n <CardFeedback\n variant=\"error\"\n icon={IconAlertCircle}\n title={i18n.t('editors.errorTitle')}\n message={errorMessage}\n />\n );\n }\n\n return children;\n };\n\n return (\n <Card className={styles.card} {...props}>\n <CardHeader title={title} subtitle={subtitle} />\n <CardContent>{getDisplay()}</CardContent>\n </Card>\n );\n};\n"],"names":["EditorCard","title","subtitle","children","errorMessage","props","theme","useTheme","i18nSetup","getDisplay","jsx","CardFeedback","IconAlertCircle","i18n","Card","styles","CardHeader","CardContent"],"mappings":";;;;;GAeaA,IAAkC,CAAC;AAAA,EAC9C,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,cAAAC;AAAA,EACA,GAAGC;AACL,MAAM;AACJ,QAAMC,IAAeC,EAAA;AACrB,EAAAC,EAAUF,CAAK;AAEf,QAAMG,IAAa,MACbL,IAEAM,gBAAAA,EAAAA;AAAAA,IAACC;AAAA,IAAA;AAAA,MACC,SAAQ;AAAA,MACR,MAAMC;AAAA,MACN,OAAOC,EAAK,EAAE,oBAAoB;AAAA,MAClC,SAAST;AAAA,IAAA;AAAA,EAAA,IAKRD;AAGT,gCACGW,GAAA,EAAK,WAAWC,EAAO,MAAO,GAAGV,GAChC,UAAA;AAAA,IAAAK,gBAAAA,EAAAA,IAACM,GAAA,EAAW,OAAAf,GAAc,UAAAC,EAAA,CAAoB;AAAA,IAC9CQ,gBAAAA,EAAAA,IAACO,GAAA,EAAa,UAAAR,EAAA,EAAW,CAAE;AAAA,EAAA,GAC7B;AAEJ;"}
|
package/dist/HeatMapPro.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { g as
|
|
1
|
+
import { g as t, l as a } from "./Color.type.emb-CLYI-rua.js";
|
|
2
2
|
import { defineComponent as n } from "@embeddable.com/react";
|
|
3
|
-
import { H as
|
|
4
|
-
import { b as e } from "./component.inputs.constants-
|
|
3
|
+
import { H as i } from "./index-z0A1zEtp.js";
|
|
4
|
+
import { b as e } from "./component.inputs.constants-CpWMPDsp.js";
|
|
5
5
|
const r = {
|
|
6
6
|
name: "HeatMapPro",
|
|
7
7
|
label: "Heat Map",
|
|
@@ -24,62 +24,63 @@ const r = {
|
|
|
24
24
|
e.displayNullAs,
|
|
25
25
|
{
|
|
26
26
|
...e.color,
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
required: !0,
|
|
28
|
+
name: "midColor",
|
|
29
|
+
label: "Mid-point color",
|
|
30
|
+
defaultValue: t("--em-tablechart-heatmap-color", "#FF5400")
|
|
29
31
|
},
|
|
30
32
|
{
|
|
31
33
|
...e.color,
|
|
32
|
-
name: "
|
|
33
|
-
label: "
|
|
34
|
-
defaultValue: a("--em-tablechart-heatmap-color", "#FF5400")
|
|
34
|
+
name: "maxColor",
|
|
35
|
+
label: "Max-point color (optional)"
|
|
35
36
|
},
|
|
36
37
|
{
|
|
37
38
|
...e.color,
|
|
38
39
|
name: "minColor",
|
|
39
|
-
label: "Min
|
|
40
|
+
label: "Min-point color (optional)"
|
|
40
41
|
},
|
|
41
42
|
{
|
|
42
43
|
...e.string,
|
|
43
44
|
name: "minThreshold",
|
|
44
|
-
label: "Max range lower limit",
|
|
45
|
+
label: "Max-point range lower limit",
|
|
45
46
|
description: "Enter a value as either a number (e.g. 20) or a percentage (e.g. 20%)",
|
|
46
47
|
category: "Component Settings"
|
|
47
48
|
},
|
|
48
49
|
{
|
|
49
50
|
...e.string,
|
|
50
51
|
name: "maxThreshold",
|
|
51
|
-
label: "Min range upper limit",
|
|
52
|
+
label: "Min-point range upper limit",
|
|
52
53
|
description: "Enter a value as either a number (e.g. 20) or a percentage (e.g. 20%)",
|
|
53
54
|
category: "Component Settings"
|
|
54
55
|
},
|
|
55
56
|
{
|
|
56
57
|
...e.boolean,
|
|
57
58
|
name: "showValues",
|
|
58
|
-
label: "Show
|
|
59
|
+
label: "Show values",
|
|
59
60
|
defaultValue: !0,
|
|
60
61
|
category: "Component Settings"
|
|
61
62
|
},
|
|
62
63
|
{
|
|
63
64
|
...e.number,
|
|
64
65
|
name: "firstColumnWidth",
|
|
65
|
-
label: "First
|
|
66
|
+
label: "First column width",
|
|
66
67
|
description: "Set the width in px (e.g. 200)",
|
|
67
68
|
category: "Component Settings"
|
|
68
69
|
},
|
|
69
70
|
{
|
|
70
71
|
...e.number,
|
|
71
72
|
name: "columnWidth",
|
|
72
|
-
label: "Column
|
|
73
|
+
label: "Column width",
|
|
73
74
|
description: "Set the width in px (e.g. 200)",
|
|
74
75
|
category: "Component Settings"
|
|
75
76
|
},
|
|
76
77
|
e.maxResults
|
|
77
78
|
]
|
|
78
|
-
},
|
|
79
|
+
}, u = n(i, r, {
|
|
79
80
|
/* @ts-expect-error - to be fixed in @embeddable.com/react */
|
|
80
81
|
props: (o) => ({
|
|
81
82
|
...o,
|
|
82
|
-
results:
|
|
83
|
+
results: a({
|
|
83
84
|
from: o.dataset,
|
|
84
85
|
select: [o.rowDimension, o.columnDimension, o.measure],
|
|
85
86
|
limit: o.maxResults,
|
|
@@ -88,7 +89,7 @@ const r = {
|
|
|
88
89
|
})
|
|
89
90
|
});
|
|
90
91
|
export {
|
|
91
|
-
|
|
92
|
+
u as default,
|
|
92
93
|
r as meta
|
|
93
94
|
};
|
|
94
95
|
//# sourceMappingURL=HeatMapPro.js.map
|
package/dist/HeatMapPro.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HeatMapPro.js","sources":["../src/components/charts/tables/HeatMapPro/HeatMapPro.emb.ts"],"sourcesContent":["import { loadData } from '@embeddable.com/core';\nimport { defineComponent, EmbeddedComponentMeta, Inputs } from '@embeddable.com/react';\nimport HeatMapPro from './index';\nimport { inputs } from '../../../component.inputs.constants';\nimport { getStyle } from '@embeddable.com/remarkable-ui';\n\nexport const meta = {\n name: 'HeatMapPro',\n label: 'Heat Map',\n category: 'Table Charts',\n inputs: [\n inputs.dataset,\n inputs.measure,\n {\n ...inputs.dimensionWithDateBounds,\n label: 'Row Dimension',\n name: 'rowDimension',\n },\n {\n ...inputs.dimensionWithDateBounds,\n label: 'Column Dimension',\n name: 'columnDimension',\n },\n inputs.title,\n inputs.description,\n inputs.displayNullAs,\n {\n ...inputs.color,\n name: '
|
|
1
|
+
{"version":3,"file":"HeatMapPro.js","sources":["../src/components/charts/tables/HeatMapPro/HeatMapPro.emb.ts"],"sourcesContent":["import { loadData } from '@embeddable.com/core';\nimport { defineComponent, EmbeddedComponentMeta, Inputs } from '@embeddable.com/react';\nimport HeatMapPro from './index';\nimport { inputs } from '../../../component.inputs.constants';\nimport { getStyle } from '@embeddable.com/remarkable-ui';\n\nexport const meta = {\n name: 'HeatMapPro',\n label: 'Heat Map',\n category: 'Table Charts',\n inputs: [\n inputs.dataset,\n inputs.measure,\n {\n ...inputs.dimensionWithDateBounds,\n label: 'Row Dimension',\n name: 'rowDimension',\n },\n {\n ...inputs.dimensionWithDateBounds,\n label: 'Column Dimension',\n name: 'columnDimension',\n },\n inputs.title,\n inputs.description,\n inputs.displayNullAs,\n {\n ...inputs.color,\n required: true,\n name: 'midColor',\n label: 'Mid-point color',\n defaultValue: getStyle('--em-tablechart-heatmap-color', '#FF5400'),\n },\n {\n ...inputs.color,\n name: 'maxColor',\n label: 'Max-point color (optional)',\n },\n {\n ...inputs.color,\n name: 'minColor',\n label: 'Min-point color (optional)',\n },\n\n {\n ...inputs.string,\n name: 'minThreshold',\n label: 'Max-point range lower limit',\n description: 'Enter a value as either a number (e.g. 20) or a percentage (e.g. 20%)',\n category: 'Component Settings',\n },\n {\n ...inputs.string,\n name: 'maxThreshold',\n label: 'Min-point range upper limit',\n description: 'Enter a value as either a number (e.g. 20) or a percentage (e.g. 20%)',\n category: 'Component Settings',\n },\n {\n ...inputs.boolean,\n name: 'showValues',\n label: 'Show values',\n defaultValue: true,\n category: 'Component Settings',\n },\n {\n ...inputs.number,\n name: 'firstColumnWidth',\n label: 'First column width',\n description: 'Set the width in px (e.g. 200)',\n category: 'Component Settings',\n },\n {\n ...inputs.number,\n name: 'columnWidth',\n label: 'Column width',\n description: 'Set the width in px (e.g. 200)',\n category: 'Component Settings',\n },\n inputs.maxResults,\n ],\n} as const satisfies EmbeddedComponentMeta;\n\nexport default defineComponent(HeatMapPro, meta, {\n /* @ts-expect-error - to be fixed in @embeddable.com/react */\n props: (inputs: Inputs<typeof meta>) => {\n return {\n ...inputs,\n results: loadData({\n from: inputs.dataset,\n select: [inputs.rowDimension, inputs.columnDimension, inputs.measure],\n limit: inputs.maxResults,\n countRows: true,\n }),\n };\n },\n});\n"],"names":["meta","inputs","getStyle","HeatMapPro_emb","defineComponent","HeatMapPro","loadData"],"mappings":";;;;AAMO,MAAMA,IAAO;AAAA,EAClB,MAAM;AAAA,EACN,OAAO;AAAA,EACP,UAAU;AAAA,EACV,QAAQ;AAAA,IACNC,EAAO;AAAA,IACPA,EAAO;AAAA,IACP;AAAA,MACE,GAAGA,EAAO;AAAA,MACV,OAAO;AAAA,MACP,MAAM;AAAA,IAAA;AAAA,IAER;AAAA,MACE,GAAGA,E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,MACpE,OAAOA,EAAO;AAAA,MACd,WAAW;AAAA,IAAA,CACZ;AAAA,EAAA;AAGP,CAAC;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as n } from "@embeddable.com/react";
|
|
2
|
-
import { K as m } from "./index-
|
|
2
|
+
import { K as m } from "./index-DjA9mRxV.js";
|
|
3
3
|
import { l as r } from "./Color.type.emb-CLYI-rua.js";
|
|
4
|
-
import { b as a } from "./component.inputs.constants-
|
|
4
|
+
import { b as a } from "./component.inputs.constants-CpWMPDsp.js";
|
|
5
5
|
const l = {
|
|
6
6
|
name: "KpiChartNumberComparisonPro",
|
|
7
7
|
label: "Kpi Chart - Number Comparison",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as e } from "@embeddable.com/react";
|
|
2
|
-
import { K as a } from "./index-
|
|
2
|
+
import { K as a } from "./index-BQKTtuOl.js";
|
|
3
3
|
import { l as o } from "./Color.type.emb-CLYI-rua.js";
|
|
4
|
-
import { b as r } from "./component.inputs.constants-
|
|
4
|
+
import { b as r } from "./component.inputs.constants-CpWMPDsp.js";
|
|
5
5
|
const m = {
|
|
6
6
|
name: "KpiChartNumberPro",
|
|
7
7
|
label: "Kpi Chart - Number",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as m } from "@embeddable.com/react";
|
|
2
|
-
import { L as p } from "./index-
|
|
2
|
+
import { L as p } from "./index-DbQoW48_.js";
|
|
3
3
|
import { V as c, l as s } from "./Color.type.emb-CLYI-rua.js";
|
|
4
|
-
import { b as e, s as i } from "./component.inputs.constants-
|
|
4
|
+
import { b as e, s as i } from "./component.inputs.constants-CpWMPDsp.js";
|
|
5
5
|
const d = {
|
|
6
6
|
name: "LineChartComparisonDefaultPro",
|
|
7
7
|
label: "Line Chart Comparison - Default",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as s } from "@embeddable.com/react";
|
|
2
|
-
import { L as n } from "./index-
|
|
2
|
+
import { L as n } from "./index-natSwnW-.js";
|
|
3
3
|
import { V as i, l as o } from "./Color.type.emb-CLYI-rua.js";
|
|
4
|
-
import { b as e, s as l } from "./component.inputs.constants-
|
|
4
|
+
import { b as e, s as l } from "./component.inputs.constants-CpWMPDsp.js";
|
|
5
5
|
const t = {
|
|
6
6
|
name: "LineChartDefaultPro",
|
|
7
7
|
label: "Line Chart - Default",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as a } from "@embeddable.com/react";
|
|
2
|
-
import { L as o } from "./index-
|
|
2
|
+
import { L as o } from "./index-BUnUdDZd.js";
|
|
3
3
|
import { V as i, l as s } from "./Color.type.emb-CLYI-rua.js";
|
|
4
|
-
import { b as e } from "./component.inputs.constants-
|
|
4
|
+
import { b as e } from "./component.inputs.constants-CpWMPDsp.js";
|
|
5
5
|
const t = {
|
|
6
6
|
name: "LineChartGroupedPro",
|
|
7
7
|
label: "Line Chart - Grouped",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as r } from "@embeddable.com/react";
|
|
2
2
|
import { V as t, l as s } from "./Color.type.emb-CLYI-rua.js";
|
|
3
|
-
import { M as d, a as u } from "./index-
|
|
4
|
-
import { b as a } from "./component.inputs.constants-
|
|
3
|
+
import { M as d, a as u } from "./index-WDuZPeli.js";
|
|
4
|
+
import { b as a } from "./component.inputs.constants-CpWMPDsp.js";
|
|
5
5
|
const m = {
|
|
6
6
|
name: "MultiSelectFieldPro",
|
|
7
7
|
label: "Multi Select Field",
|
package/dist/PieChartPro.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { V as o, l as a } from "./Color.type.emb-CLYI-rua.js";
|
|
2
2
|
import { defineComponent as s } from "@embeddable.com/react";
|
|
3
|
-
import { P as i } from "./index-
|
|
4
|
-
import { b as e } from "./component.inputs.constants-
|
|
3
|
+
import { P as i } from "./index-BHVaEsvO.js";
|
|
4
|
+
import { b as e } from "./component.inputs.constants-CpWMPDsp.js";
|
|
5
5
|
const n = {
|
|
6
6
|
name: "PieChartPro",
|
|
7
7
|
label: "Pie Chart",
|
package/dist/PivotTablePro.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { l as a } from "./Color.type.emb-CLYI-rua.js";
|
|
2
2
|
import { defineComponent as n } from "@embeddable.com/react";
|
|
3
|
-
import { P as s } from "./index-
|
|
4
|
-
import { b as e, s as t } from "./component.inputs.constants-
|
|
3
|
+
import { P as s } from "./index-CB5nTme1.js";
|
|
4
|
+
import { b as e, s as t } from "./component.inputs.constants-CpWMPDsp.js";
|
|
5
5
|
const l = {
|
|
6
6
|
name: "PivotTablePro",
|
|
7
7
|
label: "Pivot Table",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as r } from "@embeddable.com/react";
|
|
2
2
|
import { V as l, l as s } from "./Color.type.emb-CLYI-rua.js";
|
|
3
|
-
import { M as d, S as m } from "./index-
|
|
4
|
-
import { b as a } from "./component.inputs.constants-
|
|
3
|
+
import { M as d, S as m } from "./index-BaSNws-A.js";
|
|
4
|
+
import { b as a } from "./component.inputs.constants-CpWMPDsp.js";
|
|
5
5
|
const c = {
|
|
6
6
|
name: "SingleSelectFieldPro",
|
|
7
7
|
label: "Single Select Field",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { V as u, l as s, m as f } from "./Color.type.emb-CLYI-rua.js";
|
|
2
2
|
import { defineComponent as g } from "@embeddable.com/react";
|
|
3
|
-
import { T as p } from "./index-
|
|
4
|
-
import { b as n, s as m } from "./component.inputs.constants-
|
|
3
|
+
import { T as p } from "./index-Dz6llBs_.js";
|
|
4
|
+
import { b as n, s as m } from "./component.inputs.constants-CpWMPDsp.js";
|
|
5
5
|
const b = {
|
|
6
6
|
name: "TableChartPaginated",
|
|
7
7
|
label: "Table Chart - Paginated",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as F, g as P } from "./charts.utils-
|
|
2
|
-
import { g as h } from "./formatter.utils-
|
|
1
|
+
import { r as F, g as P } from "./charts.utils-nkrr8Yy8.js";
|
|
2
|
+
import { g as h } from "./formatter.utils-DPI9zC1z.js";
|
|
3
3
|
import { g as p, a as g } from "./object.utils-D_Zzon-H.js";
|
|
4
4
|
import { a as T, b as v } from "./Color.type.emb-CLYI-rua.js";
|
|
5
5
|
const B = (l, c) => {
|
|
@@ -142,4 +142,4 @@ export {
|
|
|
142
142
|
V as b,
|
|
143
143
|
B as g
|
|
144
144
|
};
|
|
145
|
-
//# sourceMappingURL=bars.utils-
|
|
145
|
+
//# sourceMappingURL=bars.utils-c9bi5X5n.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bars.utils-fkN2-HS9.js","sources":["../src/components/charts/bars/bars.utils.ts"],"sourcesContent":["import { DataResponse, Dimension, Measure } from '@embeddable.com/core';\nimport { Theme } from '../../../theme/theme.types';\nimport { remarkableTheme } from '../../../theme/theme.constants';\nimport { ChartData, ChartOptions } from 'chart.js';\nimport { getThemeFormatter } from '../../../theme/formatter/formatter.utils';\nimport { groupTailAsOther } from '../charts.utils';\nimport { getColor } from '../../../theme/styles/styles.utils';\nimport { getChartColors, getChartContrastColors } from '@embeddable.com/remarkable-ui';\nimport { getObjectStableKey } from '../../../utils.ts/object.utils';\nimport { Context } from 'chartjs-plugin-datalabels';\n\nexport const getBarStackedChartProData = (\n props: {\n data: DataResponse['data'];\n dimension: Dimension;\n groupDimension: Dimension;\n measure: Measure;\n },\n theme: Theme,\n): ChartData<'bar'> => {\n const themeFormatter = getThemeFormatter(theme);\n const { data = [], dimension, groupDimension, measure } = props;\n\n const axis = [...new Set(data.map((d) => d[dimension.name]).filter((d) => d != null))].sort();\n const groupDimensionName = `${groupDimension.name}${groupDimension.inputs?.granularity ? `.${groupDimension.inputs.granularity}` : ''}`;\n const groupBy = [...new Set(data.map((d) => d[groupDimensionName]))].filter((d) => d != null);\n\n const themeKey = getObjectStableKey(theme);\n const chartContrastColors = getChartContrastColors();\n const datasets = groupBy.map((groupByItem, index) => {\n const backgroundColor = getColor(\n `${themeKey}.charts.backgroundColors`,\n `${groupDimension.name}.${groupByItem}`,\n theme.charts.backgroundColors ?? chartContrastColors,\n index,\n );\n\n const borderColor = getColor(\n `${themeKey}.charts.borderColors`,\n `${groupDimension.name}.${groupByItem}`,\n theme.charts.borderColors ?? chartContrastColors,\n index,\n );\n\n return {\n label: themeFormatter.data(groupDimension, groupByItem),\n rawLabel: groupByItem,\n backgroundColor,\n borderColor,\n data: axis.map((axisItem) => {\n const record = data.find(\n (d) => d[groupDimensionName] === groupByItem && d[dimension.name] === axisItem,\n );\n return record ? Number(record[measure.name]) : 0;\n }),\n };\n });\n\n return {\n labels: axis,\n datasets,\n };\n};\n\nexport const getBarChartProData = (\n props: {\n data: DataResponse['data'];\n dimension: Dimension;\n measures: Measure[];\n maxItems?: number;\n },\n theme: Theme = remarkableTheme,\n): ChartData<'bar'> => {\n if (!props.data) {\n return {\n labels: [],\n datasets: [{ data: [] }],\n };\n }\n\n const themeFormatter = getThemeFormatter(theme);\n const themeKey = getObjectStableKey(theme);\n const groupedData = groupTailAsOther(props.data, props.dimension, props.measures, props.maxItems);\n const chartColors = getChartColors();\n\n return {\n labels: groupedData.map((item) => {\n return item[props.dimension.name];\n }),\n datasets: props.measures.map((measure, index) => {\n const backgroundColor = getColor(\n `${themeKey}.charts.backgroundColors`,\n measure.name,\n theme.charts.backgroundColors ?? chartColors,\n index,\n );\n\n const borderColor = getColor(\n `${themeKey}.charts.borderColors`,\n measure.name,\n theme.charts.borderColors ?? chartColors,\n index,\n );\n\n return {\n label: themeFormatter.dimensionOrMeasureTitle(measure),\n data: groupedData.map((item) => item[measure.name] ?? 0),\n backgroundColor,\n borderColor,\n };\n }),\n };\n};\n\nconst getBarChartProDatalabelTotalFormatter = (\n context: Context,\n formatter: (value: number) => string,\n) => {\n const { datasets } = context.chart.data;\n const i = context.dataIndex;\n\n const total = datasets.reduce((sum, ds) => {\n const val = ds.data[i] as number;\n return sum + (val || 0);\n }, 0);\n\n return formatter(total);\n};\n\nexport const getBarChartProOptions = (\n options: {\n onBarClicked: (args: {\n axisDimensionValue: string | null;\n groupingDimensionValue: string | null;\n }) => void;\n measures: Measure[];\n dimension: Dimension;\n horizontal: boolean;\n data: ChartData<'bar'>;\n },\n theme: Theme,\n): Partial<ChartOptions<'bar'>> => {\n const { onBarClicked, measures, dimension, horizontal, data } = options;\n\n const themeFormatter = getThemeFormatter(theme);\n return {\n plugins: {\n legend: { position: theme.charts.legendPosition ?? 'bottom' },\n datalabels: {\n labels: {\n total: {\n formatter: (_value: string | number, context: Context) =>\n getBarChartProDatalabelTotalFormatter(context, (value: number) =>\n themeFormatter.data(measures[0]!, value),\n ),\n },\n value: {\n formatter: (value: string | number, context) => {\n const measure = measures[context.datasetIndex % measures.length]!;\n return themeFormatter.data(measure, value);\n },\n },\n },\n },\n tooltip: {\n callbacks: {\n title: (context) => {\n const label = context[0]?.label;\n return themeFormatter.data(dimension, label);\n },\n label: (context) => {\n const measure = measures[context.datasetIndex % measures.length]!;\n const raw = context.raw as number;\n return `${themeFormatter.data(dimension, context.dataset.label) || ''}: ${themeFormatter.data(measure, raw)}`;\n },\n },\n },\n },\n scales: {\n x: {\n ticks: {\n callback: (value) => {\n if (horizontal) {\n return themeFormatter.data(measures[0]!, value);\n }\n\n if (!data || !data.labels) return undefined;\n\n const label = data.labels[Number(value)] as string;\n\n return themeFormatter.data(dimension, label);\n },\n },\n },\n y: {\n ticks: {\n callback: (value) => {\n if (!horizontal) {\n return themeFormatter.data(measures[0]!, value);\n }\n if (!data || !data.labels) return undefined;\n const label = data.labels[Number(value)] as string;\n return themeFormatter.data(dimension, label);\n },\n },\n },\n },\n onClick: (_event, elements, chart) => {\n const element = elements[0];\n const axisDimensionValue = (element ? chart.data.labels![element.index] : null) as\n | string\n | null;\n const groupingDimensionValue = (\n element\n ? (chart.data.datasets[element.datasetIndex] as { rawLabel?: string | null })?.rawLabel\n : null\n ) as string | null;\n\n onBarClicked({\n axisDimensionValue,\n groupingDimensionValue,\n });\n },\n };\n};\n"],"names":["getBarStackedChartProData","props","theme","themeFormatter","getThemeFormatter","data","dimension","groupDimension","measure","axis","d","groupDimensionName","_a","groupBy","themeKey","getObjectStableKey","chartContrastColors","getChartContrastColors","datasets","groupByItem","index","backgroundColor","getColor","borderColor","axisItem","record","getBarChartProData","remarkableTheme","groupedData","groupTailAsOther","chartColors","getChartColors","item","getBarChartProDatalabelTotalFormatter","context","formatter","i","total","sum","ds","val","getBarChartProOptions","options","onBarClicked","measures","horizontal","_value","value","label","raw","_event","elements","chart","element","axisDimensionValue","groupingDimensionValue"],"mappings":";;;;AAWO,MAAMA,IAA4B,CACvCC,GAMAC,MACqB;;AACrB,QAAMC,IAAiBC,EAAkBF,CAAK,GACxC,EAAE,MAAAG,IAAO,CAAA,GAAI,WAAAC,GAAW,gBAAAC,GAAgB,SAAAC,MAAYP,GAEpDQ,IAAO,CAAC,GAAG,IAAI,IAAIJ,EAAK,IAAI,CAACK,MAAMA,EAAEJ,EAAU,IAAI,CAAC,EAAE,OAAO,CAACI,MAAMA,KAAK,IAAI,CAAC,CAAC,EAAE,KAAA,GACjFC,IAAqB,GAAGJ,EAAe,IAAI,IAAGK,IAAAL,EAAe,WAAf,QAAAK,EAAuB,cAAc,IAAIL,EAAe,OAAO,WAAW,KAAK,EAAE,IAC/HM,IAAU,CAAC,GAAG,IAAI,IAAIR,EAAK,IAAI,CAACK,MAAMA,EAAEC,CAAkB,CAAC,CAAC,CAAC,EAAE,OAAO,CAACD,MAAMA,KAAK,IAAI,GAEtFI,IAAWC,EAAmBb,CAAK,GACnCc,IAAsBC,EAAA,GACtBC,IAAWL,EAAQ,IAAI,CAACM,GAAaC,MAAU;AACnD,UAAMC,IAAkBC;AAAA,MACtB,GAAGR,CAAQ;AAAA,MACX,GAAGP,EAAe,IAAI,IAAIY,CAAW;AAAA,MACrCjB,EAAM,OAAO,oBAAoBc;AAAA,MACjCI;AAAA,IAAA,GAGIG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AUD,EAAM,KAAK,OAAQC,EAAQ,KAAK,IAAI,MAGpEE,IACJF,KACKzC,IAAAwC,EAAM,KAAK,SAASC,EAAQ,YAAY,MAAxC,gBAAAzC,EAA4E,WAC7E;AAGN,MAAA+B,EAAa;AAAA,QACX,oBAAAW;AAAA,QACA,wBAAAC;AAAA,MAAA,CACD;AAAA,IACH;AAAA,EAAA;AAEJ;"}
|
|
1
|
+
{"version":3,"file":"bars.utils-c9bi5X5n.js","sources":["../src/components/charts/bars/bars.utils.ts"],"sourcesContent":["import { DataResponse, Dimension, Measure } from '@embeddable.com/core';\nimport { Theme } from '../../../theme/theme.types';\nimport { remarkableTheme } from '../../../theme/theme.constants';\nimport { ChartData, ChartOptions } from 'chart.js';\nimport { getThemeFormatter } from '../../../theme/formatter/formatter.utils';\nimport { groupTailAsOther } from '../charts.utils';\nimport { getColor } from '../../../theme/styles/styles.utils';\nimport { getChartColors, getChartContrastColors } from '@embeddable.com/remarkable-ui';\nimport { getObjectStableKey } from '../../../utils.ts/object.utils';\nimport { Context } from 'chartjs-plugin-datalabels';\n\nexport const getBarStackedChartProData = (\n props: {\n data: DataResponse['data'];\n dimension: Dimension;\n groupDimension: Dimension;\n measure: Measure;\n },\n theme: Theme,\n): ChartData<'bar'> => {\n const themeFormatter = getThemeFormatter(theme);\n const { data = [], dimension, groupDimension, measure } = props;\n\n const axis = [...new Set(data.map((d) => d[dimension.name]).filter((d) => d != null))].sort();\n const groupDimensionName = `${groupDimension.name}${groupDimension.inputs?.granularity ? `.${groupDimension.inputs.granularity}` : ''}`;\n const groupBy = [...new Set(data.map((d) => d[groupDimensionName]))].filter((d) => d != null);\n\n const themeKey = getObjectStableKey(theme);\n const chartContrastColors = getChartContrastColors();\n const datasets = groupBy.map((groupByItem, index) => {\n const backgroundColor = getColor(\n `${themeKey}.charts.backgroundColors`,\n `${groupDimension.name}.${groupByItem}`,\n theme.charts.backgroundColors ?? chartContrastColors,\n index,\n );\n\n const borderColor = getColor(\n `${themeKey}.charts.borderColors`,\n `${groupDimension.name}.${groupByItem}`,\n theme.charts.borderColors ?? chartContrastColors,\n index,\n );\n\n return {\n label: themeFormatter.data(groupDimension, groupByItem),\n rawLabel: groupByItem,\n backgroundColor,\n borderColor,\n data: axis.map((axisItem) => {\n const record = data.find(\n (d) => d[groupDimensionName] === groupByItem && d[dimension.name] === axisItem,\n );\n return record ? Number(record[measure.name]) : 0;\n }),\n };\n });\n\n return {\n labels: axis,\n datasets,\n };\n};\n\nexport const getBarChartProData = (\n props: {\n data: DataResponse['data'];\n dimension: Dimension;\n measures: Measure[];\n maxItems?: number;\n },\n theme: Theme = remarkableTheme,\n): ChartData<'bar'> => {\n if (!props.data) {\n return {\n labels: [],\n datasets: [{ data: [] }],\n };\n }\n\n const themeFormatter = getThemeFormatter(theme);\n const themeKey = getObjectStableKey(theme);\n const groupedData = groupTailAsOther(props.data, props.dimension, props.measures, props.maxItems);\n const chartColors = getChartColors();\n\n return {\n labels: groupedData.map((item) => {\n return item[props.dimension.name];\n }),\n datasets: props.measures.map((measure, index) => {\n const backgroundColor = getColor(\n `${themeKey}.charts.backgroundColors`,\n measure.name,\n theme.charts.backgroundColors ?? chartColors,\n index,\n );\n\n const borderColor = getColor(\n `${themeKey}.charts.borderColors`,\n measure.name,\n theme.charts.borderColors ?? chartColors,\n index,\n );\n\n return {\n label: themeFormatter.dimensionOrMeasureTitle(measure),\n data: groupedData.map((item) => item[measure.name] ?? 0),\n backgroundColor,\n borderColor,\n };\n }),\n };\n};\n\nconst getBarChartProDatalabelTotalFormatter = (\n context: Context,\n formatter: (value: number) => string,\n) => {\n const { datasets } = context.chart.data;\n const i = context.dataIndex;\n\n const total = datasets.reduce((sum, ds) => {\n const val = ds.data[i] as number;\n return sum + (val || 0);\n }, 0);\n\n return formatter(total);\n};\n\nexport const getBarChartProOptions = (\n options: {\n onBarClicked: (args: {\n axisDimensionValue: string | null;\n groupingDimensionValue: string | null;\n }) => void;\n measures: Measure[];\n dimension: Dimension;\n horizontal: boolean;\n data: ChartData<'bar'>;\n },\n theme: Theme,\n): Partial<ChartOptions<'bar'>> => {\n const { onBarClicked, measures, dimension, horizontal, data } = options;\n\n const themeFormatter = getThemeFormatter(theme);\n return {\n plugins: {\n legend: { position: theme.charts.legendPosition ?? 'bottom' },\n datalabels: {\n labels: {\n total: {\n formatter: (_value: string | number, context: Context) =>\n getBarChartProDatalabelTotalFormatter(context, (value: number) =>\n themeFormatter.data(measures[0]!, value),\n ),\n },\n value: {\n formatter: (value: string | number, context) => {\n const measure = measures[context.datasetIndex % measures.length]!;\n return themeFormatter.data(measure, value);\n },\n },\n },\n },\n tooltip: {\n callbacks: {\n title: (context) => {\n const label = context[0]?.label;\n return themeFormatter.data(dimension, label);\n },\n label: (context) => {\n const measure = measures[context.datasetIndex % measures.length]!;\n const raw = context.raw as number;\n return `${themeFormatter.data(dimension, context.dataset.label) || ''}: ${themeFormatter.data(measure, raw)}`;\n },\n },\n },\n },\n scales: {\n x: {\n ticks: {\n callback: (value) => {\n if (horizontal) {\n return themeFormatter.data(measures[0]!, value);\n }\n\n if (!data || !data.labels) return undefined;\n\n const label = data.labels[Number(value)] as string;\n\n return themeFormatter.data(dimension, label);\n },\n },\n },\n y: {\n ticks: {\n callback: (value) => {\n if (!horizontal) {\n return themeFormatter.data(measures[0]!, value);\n }\n if (!data || !data.labels) return undefined;\n const label = data.labels[Number(value)] as string;\n return themeFormatter.data(dimension, label);\n },\n },\n },\n },\n onClick: (_event, elements, chart) => {\n const element = elements[0];\n const axisDimensionValue = (element ? chart.data.labels![element.index] : null) as\n | string\n | null;\n const groupingDimensionValue = (\n element\n ? (chart.data.datasets[element.datasetIndex] as { rawLabel?: string | null })?.rawLabel\n : null\n ) as string | null;\n\n onBarClicked({\n axisDimensionValue,\n groupingDimensionValue,\n });\n },\n };\n};\n"],"names":["getBarStackedChartProData","props","theme","themeFormatter","getThemeFormatter","data","dimension","groupDimension","measure","axis","d","groupDimensionName","_a","groupBy","themeKey","getObjectStableKey","chartContrastColors","getChartContrastColors","datasets","groupByItem","index","backgroundColor","getColor","borderColor","axisItem","record","getBarChartProData","remarkableTheme","groupedData","groupTailAsOther","chartColors","getChartColors","item","getBarChartProDatalabelTotalFormatter","context","formatter","i","total","sum","ds","val","getBarChartProOptions","options","onBarClicked","measures","horizontal","_value","value","label","raw","_event","elements","chart","element","axisDimensionValue","groupingDimensionValue"],"mappings":";;;;AAWO,MAAMA,IAA4B,CACvCC,GAMAC,MACqB;;AACrB,QAAMC,IAAiBC,EAAkBF,CAAK,GACxC,EAAE,MAAAG,IAAO,CAAA,GAAI,WAAAC,GAAW,gBAAAC,GAAgB,SAAAC,MAAYP,GAEpDQ,IAAO,CAAC,GAAG,IAAI,IAAIJ,EAAK,IAAI,CAACK,MAAMA,EAAEJ,EAAU,IAAI,CAAC,EAAE,OAAO,CAACI,MAAMA,KAAK,IAAI,CAAC,CAAC,EAAE,KAAA,GACjFC,IAAqB,GAAGJ,EAAe,IAAI,IAAGK,IAAAL,EAAe,WAAf,QAAAK,EAAuB,cAAc,IAAIL,EAAe,OAAO,WAAW,KAAK,EAAE,IAC/HM,IAAU,CAAC,GAAG,IAAI,IAAIR,EAAK,IAAI,CAACK,MAAMA,EAAEC,CAAkB,CAAC,CAAC,CAAC,EAAE,OAAO,CAACD,MAAMA,KAAK,IAAI,GAEtFI,IAAWC,EAAmBb,CAAK,GACnCc,IAAsBC,EAAA,GACtBC,IAAWL,EAAQ,IAAI,CAACM,GAAaC,MAAU;AACnD,UAAMC,IAAkBC;AAAA,MACtB,GAAGR,CAAQ;AAAA,MACX,GAAGP,EAAe,IAAI,IAAIY,CAAW;AAAA,MACrCjB,EAAM,OAAO,oBAAoBc;AAAA,MACjCI;AAAA,IAAA,GAGIG,IAAcD;AAAA,MAClB,GAAGR,CAAQ;AAAA,MACX,GAAGP,EAAe,IAAI,IAAIY,CAAW;AAAA,MACrCjB,EAAM,OAAO,gBAAgBc;AAAA,MAC7BI;AAAA,IAAA;AAGF,WAAO;AAAA,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AA,QACX,oBAAAW;AAAA,QACA,wBAAAC;AAAA,MAAA,CACD;AAAA,IACH;AAAA,EAAA;AAEJ;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Y as os } from "./Color.type.emb-CLYI-rua.js";
|
|
2
|
-
import { a as ai, i as hn } from "./component.inputs.constants-
|
|
2
|
+
import { a as ai, i as hn } from "./component.inputs.constants-CpWMPDsp.js";
|
|
3
3
|
import { d as Te, u as ii, g as fs } from "./utc-B2gCnkBk.js";
|
|
4
4
|
import { i as si, q as oi } from "./quarterOfYear-wgcl4CRi.js";
|
|
5
|
-
import { g as ls } from "./formatter.utils-
|
|
5
|
+
import { g as ls } from "./formatter.utils-DPI9zC1z.js";
|
|
6
6
|
var cs = {
|
|
7
7
|
"--em-core-border-radius--000": "0px",
|
|
8
8
|
"--em-core-border-radius--050": "2px",
|
|
@@ -17338,4 +17338,4 @@ export {
|
|
|
17338
17338
|
jm as g,
|
|
17339
17339
|
Km as r
|
|
17340
17340
|
};
|
|
17341
|
-
//# sourceMappingURL=charts.utils-
|
|
17341
|
+
//# sourceMappingURL=charts.utils-nkrr8Yy8.js.map
|