@alfalab/core-components-chart 5.0.2 → 5.0.3
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/Component.js.map +1 -1
- package/components/Dot/index.css +7 -7
- package/components/Dot/index.js.map +1 -1
- package/components/Dot/index.module.css.js +1 -1
- package/components/Legends/index.css +7 -7
- package/components/Legends/index.module.css.js +1 -1
- package/components/Legends/index.module.css.js.map +1 -1
- package/components/Tick/index.css +2 -2
- package/components/Tick/index.module.css.js +1 -1
- package/components/Tick/index.module.css.js.map +1 -1
- package/components/TooltipContent/index.css +6 -6
- package/components/TooltipContent/index.js.map +1 -1
- package/components/TooltipContent/index.module.css.js +1 -1
- package/components/TooltipContent/index.module.css.js.map +1 -1
- package/cssm/Component.js.map +1 -1
- package/cssm/components/Dot/index.js.map +1 -1
- package/cssm/components/RectBar.d.ts +0 -1
- package/cssm/components/TooltipContent/index.js.map +1 -1
- package/cssm/hooks/usePathBar/index.d.ts +1 -1
- package/cssm/hooks/usePathBar/index.js.map +1 -1
- package/cssm/hooks/useSettings/index.d.ts +1 -1
- package/cssm/hooks/useSettings/utils/setComposedChartsMargin.d.ts +1 -1
- package/cssm/hooks/useSettings/utils/setDatas.d.ts +1 -1
- package/cssm/hooks/useSettings/utils/setDatas.js.map +1 -1
- package/cssm/hooks/useSettings/utils/setGradientCharts.js.map +1 -1
- package/cssm/hooks/useSettings/utils/setLegendMargin.js.map +1 -1
- package/cssm/hooks/useSettings/utils/sortByIndex.js.map +1 -1
- package/cssm/icons/Circle.d.ts +1 -1
- package/cssm/icons/CircleLine.d.ts +1 -1
- package/cssm/icons/FilledCircle.d.ts +1 -1
- package/cssm/icons/Point.d.ts +1 -1
- package/cssm/icons/StrokeCircle.d.ts +1 -1
- package/cssm/types/chart.types.d.ts +2 -2
- package/cssm/types/payload.types.d.ts +0 -1
- package/cssm/types/seria.types.d.ts +1 -1
- package/cssm/types/tooltip.types.d.ts +1 -1
- package/cssm/types/utils/tick.types.d.ts +0 -1
- package/esm/Component.js.map +1 -1
- package/esm/components/Dot/index.css +7 -7
- package/esm/components/Dot/index.js.map +1 -1
- package/esm/components/Dot/index.module.css.js +1 -1
- package/esm/components/Legends/index.css +7 -7
- package/esm/components/Legends/index.module.css.js +1 -1
- package/esm/components/Legends/index.module.css.js.map +1 -1
- package/esm/components/RectBar.d.ts +0 -1
- package/esm/components/Tick/index.css +2 -2
- package/esm/components/Tick/index.module.css.js +1 -1
- package/esm/components/Tick/index.module.css.js.map +1 -1
- package/esm/components/TooltipContent/index.css +6 -6
- package/esm/components/TooltipContent/index.js.map +1 -1
- package/esm/components/TooltipContent/index.module.css.js +1 -1
- package/esm/components/TooltipContent/index.module.css.js.map +1 -1
- package/esm/hooks/usePathBar/index.d.ts +1 -1
- package/esm/hooks/usePathBar/index.js.map +1 -1
- package/esm/hooks/useSettings/index.d.ts +1 -1
- package/esm/hooks/useSettings/utils/setComposedChartsMargin.d.ts +1 -1
- package/esm/hooks/useSettings/utils/setDatas.d.ts +1 -1
- package/esm/hooks/useSettings/utils/setDatas.js.map +1 -1
- package/esm/hooks/useSettings/utils/setGradientCharts.js.map +1 -1
- package/esm/hooks/useSettings/utils/setLegendMargin.js.map +1 -1
- package/esm/hooks/useSettings/utils/sortByIndex.js.map +1 -1
- package/esm/icons/Circle.d.ts +1 -1
- package/esm/icons/CircleLine.d.ts +1 -1
- package/esm/icons/FilledCircle.d.ts +1 -1
- package/esm/icons/Point.d.ts +1 -1
- package/esm/icons/StrokeCircle.d.ts +1 -1
- package/esm/index.css +4 -4
- package/esm/index.module.css.js +1 -1
- package/esm/index.module.css.js.map +1 -1
- package/esm/types/chart.types.d.ts +2 -2
- package/esm/types/payload.types.d.ts +0 -1
- package/esm/types/seria.types.d.ts +1 -1
- package/esm/types/tooltip.types.d.ts +1 -1
- package/esm/types/utils/tick.types.d.ts +0 -1
- package/hooks/usePathBar/index.d.ts +1 -1
- package/hooks/usePathBar/index.js.map +1 -1
- package/hooks/useSettings/index.d.ts +1 -1
- package/hooks/useSettings/utils/setComposedChartsMargin.d.ts +1 -1
- package/hooks/useSettings/utils/setDatas.d.ts +1 -1
- package/hooks/useSettings/utils/setDatas.js.map +1 -1
- package/hooks/useSettings/utils/setGradientCharts.js.map +1 -1
- package/hooks/useSettings/utils/setLegendMargin.js.map +1 -1
- package/hooks/useSettings/utils/sortByIndex.js.map +1 -1
- package/icons/Circle.d.ts +1 -1
- package/icons/CircleLine.d.ts +1 -1
- package/icons/FilledCircle.d.ts +1 -1
- package/icons/Point.d.ts +1 -1
- package/icons/StrokeCircle.d.ts +1 -1
- package/index.css +4 -4
- package/index.module.css.js +1 -1
- package/index.module.css.js.map +1 -1
- package/modern/Component.js.map +1 -1
- package/modern/components/Dot/index.css +7 -7
- package/modern/components/Dot/index.js.map +1 -1
- package/modern/components/Dot/index.module.css.js +1 -1
- package/modern/components/Legends/index.css +7 -7
- package/modern/components/Legends/index.module.css.js +1 -1
- package/modern/components/Legends/index.module.css.js.map +1 -1
- package/modern/components/RectBar.d.ts +0 -1
- package/modern/components/Tick/index.css +2 -2
- package/modern/components/Tick/index.module.css.js +1 -1
- package/modern/components/Tick/index.module.css.js.map +1 -1
- package/modern/components/TooltipContent/index.css +6 -6
- package/modern/components/TooltipContent/index.js.map +1 -1
- package/modern/components/TooltipContent/index.module.css.js +1 -1
- package/modern/components/TooltipContent/index.module.css.js.map +1 -1
- package/modern/hooks/usePathBar/index.d.ts +1 -1
- package/modern/hooks/usePathBar/index.js.map +1 -1
- package/modern/hooks/useSettings/index.d.ts +1 -1
- package/modern/hooks/useSettings/utils/setComposedChartsMargin.d.ts +1 -1
- package/modern/hooks/useSettings/utils/setDatas.d.ts +1 -1
- package/modern/hooks/useSettings/utils/setDatas.js.map +1 -1
- package/modern/hooks/useSettings/utils/setGradientCharts.js.map +1 -1
- package/modern/hooks/useSettings/utils/setLegendMargin.js.map +1 -1
- package/modern/hooks/useSettings/utils/sortByIndex.js.map +1 -1
- package/modern/icons/Circle.d.ts +1 -1
- package/modern/icons/CircleLine.d.ts +1 -1
- package/modern/icons/FilledCircle.d.ts +1 -1
- package/modern/icons/Point.d.ts +1 -1
- package/modern/icons/StrokeCircle.d.ts +1 -1
- package/modern/index.css +4 -4
- package/modern/index.module.css.js +1 -1
- package/modern/index.module.css.js.map +1 -1
- package/modern/types/chart.types.d.ts +2 -2
- package/modern/types/payload.types.d.ts +0 -1
- package/modern/types/seria.types.d.ts +1 -1
- package/modern/types/tooltip.types.d.ts +1 -1
- package/modern/types/utils/tick.types.d.ts +0 -1
- package/moderncssm/Component.js.map +1 -1
- package/moderncssm/components/Dot/index.js.map +1 -1
- package/moderncssm/components/RectBar.d.ts +0 -1
- package/moderncssm/components/TooltipContent/index.js.map +1 -1
- package/moderncssm/hooks/usePathBar/index.d.ts +1 -1
- package/moderncssm/hooks/usePathBar/index.js.map +1 -1
- package/moderncssm/hooks/useSettings/index.d.ts +1 -1
- package/moderncssm/hooks/useSettings/utils/setComposedChartsMargin.d.ts +1 -1
- package/moderncssm/hooks/useSettings/utils/setDatas.d.ts +1 -1
- package/moderncssm/hooks/useSettings/utils/setDatas.js.map +1 -1
- package/moderncssm/hooks/useSettings/utils/setGradientCharts.js.map +1 -1
- package/moderncssm/hooks/useSettings/utils/setLegendMargin.js.map +1 -1
- package/moderncssm/hooks/useSettings/utils/sortByIndex.js.map +1 -1
- package/moderncssm/icons/Circle.d.ts +1 -1
- package/moderncssm/icons/CircleLine.d.ts +1 -1
- package/moderncssm/icons/FilledCircle.d.ts +1 -1
- package/moderncssm/icons/Point.d.ts +1 -1
- package/moderncssm/icons/StrokeCircle.d.ts +1 -1
- package/moderncssm/types/chart.types.d.ts +2 -2
- package/moderncssm/types/payload.types.d.ts +0 -1
- package/moderncssm/types/seria.types.d.ts +1 -1
- package/moderncssm/types/tooltip.types.d.ts +1 -1
- package/moderncssm/types/utils/tick.types.d.ts +0 -1
- package/package.json +4 -4
- package/src/components/Legends/index.module.css +1 -1
- package/src/components/Tick/index.module.css +1 -1
- package/src/components/TooltipContent/index.module.css +1 -1
- package/src/index.module.css +1 -1
- package/types/chart.types.d.ts +2 -2
- package/types/payload.types.d.ts +0 -1
- package/types/seria.types.d.ts +1 -1
- package/types/tooltip.types.d.ts +1 -1
- package/types/utils/tick.types.d.ts +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/TooltipContent/index.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport cn from 'classnames';\n\nimport { TypographyText } from '@alfalab/core-components-typography';\n\nimport { type PayloadProps } from '../../types/payload.types';\nimport { type SeriaProps } from '../../types/seria.types';\nimport { type TooltipProps } from '../../types/tooltip.types';\n\nimport styles from './index.module.css';\n\nexport interface TooltipContentProps extends TooltipProps {\n payload: PayloadProps[];\n series: SeriaProps[];\n}\n\nexport const TooltipContent = forwardRef<HTMLDivElement, TooltipContentProps>(\n (\n {\n payload,\n separator,\n label,\n tooltipArrowSide,\n arrow,\n series,\n labelFormatter,\n labelStyle,\n contentFormatter,\n },\n ref,\n ) => {\n if (!label || payload.length === 0) return null;\n\n if (typeof contentFormatter === 'function') {\n return (\n <div className={cn(styles.tooltip)} ref={ref}>\n {arrow && (\n <span\n className={cn(styles.tooltipArrow, {\n [styles.tooltipArrowRight]: !tooltipArrowSide,\n })}\n />\n )}\n {contentFormatter?.({ label, payload })}\n </div>\n );\n }\n\n return (\n <div className={cn(styles.tooltip)} ref={ref}>\n {arrow && (\n <span\n className={cn(styles.tooltipArrow, {\n [styles.tooltipArrowRight]: !tooltipArrowSide,\n })}\n />\n )}\n <ul className={cn(styles.tooltipList)}>\n <li className={cn(styles.tooltipItem)} style={labelStyle}>\n <TypographyText\n view='primary-medium'\n tag='span'\n weight='medium'\n className={cn(styles.tooltipLabel)}\n >\n {labelFormatter ? labelFormatter(label) : label}\n </TypographyText>\n </li>\n {payload.map((entry: PayloadProps) => {\n const data: SeriaProps | undefined = series.find(\n (d: SeriaProps) => d.properties.dataKey === entry.dataKey,\n );\n\n if (data?.hideTooltip || data?.hide) return null;\n\n return (\n <li\n className={cn(styles.tooltipItem)}\n key={entry.dataKey}\n style={{ color: entry.color }}\n >\n <TypographyText\n view='primary-medium'\n tag='span'\n weight='medium'\n className={cn(styles.tooltipValue)}\n >\n {entry?.formatter ? entry.formatter(entry.value) : entry.value}\n {separator || ' '}\n </TypographyText>\n <TypographyText\n view='secondary-large'\n tag='span'\n className={cn(styles.tooltipName)}\n >{`${entry.name}`}</TypographyText>\n </li>\n );\n })}\n </ul>\n </div>\n );\n },\n);\n"],"names":[],"mappings":";;;;;IAgBa,cAAc,GAAG,UAAU,CACpC,UACI,EAUC,EACD,GAAG,EAAA;;QAVC,OAAO,GAAA,EAAA,CAAA,OAAA,EACP,SAAS,GAAA,EAAA,CAAA,SAAA,EACT,KAAK,GAAA,EAAA,CAAA,KAAA,EACL,gBAAgB,GAAA,EAAA,CAAA,gBAAA,EAChB,KAAK,WAAA,EACL,MAAM,GAAA,EAAA,CAAA,MAAA,EACN,cAAc,GAAA,EAAA,CAAA,cAAA,EACd,UAAU,GAAA,EAAA,CAAA,UAAA,EACV,gBAAgB,GAAA,EAAA,CAAA,gBAAA;AAIpB,IAAA,IAAI,CAAC,KAAK,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;AAAE,QAAA,OAAO,IAAI;AAE/C,IAAA,IAAI,OAAO,gBAAgB,KAAK,UAAU,EAAE;AACxC,QAAA,QACI,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,GAAG,EAAA;YACvC,KAAK,KACF,KACI,CAAA,aAAA,CAAA,MAAA,EAAA,EAAA,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,YAAY,GAAA,EAAA,GAAA,EAAA;AAC7B,oBAAA,EAAA,CAAC,MAAM,CAAC,iBAAiB,CAAA,GAAG,CAAC,gBAAgB;AAC/C,oBAAA,EAAA,EAAA,EAAA,CACJ,CACL,EACA,gBAAgB,KAAA,IAAA,IAAhB,gBAAgB,KAAA,MAAA,GAAA,MAAA;YAAhB,gBAAgB,CAAG,EAAE,KAAK,EAAA,KAAA,EAAE,OAAO,EAAA,OAAA,EAAE,CAAC,CACrC
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/TooltipContent/index.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport cn from 'classnames';\n\nimport { TypographyText } from '@alfalab/core-components-typography';\n\nimport { type PayloadProps } from '../../types/payload.types';\nimport { type SeriaProps } from '../../types/seria.types';\nimport { type TooltipProps } from '../../types/tooltip.types';\n\nimport styles from './index.module.css';\n\nexport interface TooltipContentProps extends TooltipProps {\n payload: PayloadProps[];\n series: SeriaProps[];\n}\n\nexport const TooltipContent = forwardRef<HTMLDivElement, TooltipContentProps>(\n (\n {\n payload,\n separator,\n label,\n tooltipArrowSide,\n arrow,\n series,\n labelFormatter,\n labelStyle,\n contentFormatter,\n },\n ref,\n ) => {\n if (!label || payload.length === 0) return null;\n\n if (typeof contentFormatter === 'function') {\n return (\n <div className={cn(styles.tooltip)} ref={ref}>\n {arrow && (\n <span\n className={cn(styles.tooltipArrow, {\n [styles.tooltipArrowRight]: !tooltipArrowSide,\n })}\n />\n )}\n {contentFormatter?.({ label, payload })}\n </div>\n );\n }\n\n return (\n <div className={cn(styles.tooltip)} ref={ref}>\n {arrow && (\n <span\n className={cn(styles.tooltipArrow, {\n [styles.tooltipArrowRight]: !tooltipArrowSide,\n })}\n />\n )}\n <ul className={cn(styles.tooltipList)}>\n <li className={cn(styles.tooltipItem)} style={labelStyle}>\n <TypographyText\n view='primary-medium'\n tag='span'\n weight='medium'\n className={cn(styles.tooltipLabel)}\n >\n {labelFormatter ? labelFormatter(label) : label}\n </TypographyText>\n </li>\n {payload.map((entry: PayloadProps) => {\n const data: SeriaProps | undefined = series.find(\n (d: SeriaProps) => d.properties.dataKey === entry.dataKey,\n );\n\n if (data?.hideTooltip || data?.hide) return null;\n\n return (\n <li\n className={cn(styles.tooltipItem)}\n key={entry.dataKey}\n style={{ color: entry.color }}\n >\n <TypographyText\n view='primary-medium'\n tag='span'\n weight='medium'\n className={cn(styles.tooltipValue)}\n >\n {entry?.formatter ? entry.formatter(entry.value) : entry.value}\n {separator || ' '}\n </TypographyText>\n <TypographyText\n view='secondary-large'\n tag='span'\n className={cn(styles.tooltipName)}\n >{`${entry.name}`}</TypographyText>\n </li>\n );\n })}\n </ul>\n </div>\n );\n },\n);\n"],"names":[],"mappings":";;;;;IAgBa,cAAc,GAAG,UAAU,CACpC,UACI,EAUC,EACD,GAAG,EAAA;;QAVC,OAAO,GAAA,EAAA,CAAA,OAAA,EACP,SAAS,GAAA,EAAA,CAAA,SAAA,EACT,KAAK,GAAA,EAAA,CAAA,KAAA,EACL,gBAAgB,GAAA,EAAA,CAAA,gBAAA,EAChB,KAAK,WAAA,EACL,MAAM,GAAA,EAAA,CAAA,MAAA,EACN,cAAc,GAAA,EAAA,CAAA,cAAA,EACd,UAAU,GAAA,EAAA,CAAA,UAAA,EACV,gBAAgB,GAAA,EAAA,CAAA,gBAAA;AAIpB,IAAA,IAAI,CAAC,KAAK,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;AAAE,QAAA,OAAO,IAAI;AAE/C,IAAA,IAAI,OAAO,gBAAgB,KAAK,UAAU,EAAE;AACxC,QAAA,QACI,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,GAAG,EAAA;YACvC,KAAK,KACF,KACI,CAAA,aAAA,CAAA,MAAA,EAAA,EAAA,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,YAAY,GAAA,EAAA,GAAA,EAAA;AAC7B,oBAAA,EAAA,CAAC,MAAM,CAAC,iBAAiB,CAAA,GAAG,CAAC,gBAAgB;AAC/C,oBAAA,EAAA,EAAA,EAAA,CAC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ltipArrow":"chart__tooltipArrow_1ceg4","tooltipArrowRight":"chart__tooltipArrowRight_1ceg4"};
|
|
4
4
|
|
|
5
5
|
export { styles as default };
|
|
6
6
|
//# sourceMappingURL=index.module.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.module.css.js","sources":["../../src/components/TooltipContent/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/
|
|
1
|
+
{"version":3,"file":"index.module.css.js","sources":["../../src/components/TooltipContent/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/index.css';\n\n.tooltip {\n background-color: var(--color-light-base-bg-primary);\n border: 1px solid var(--color-light-neutral-400);\n box-shadow: var(--shadow-l);\n border-radius: var(--border-radius-8);\n padding: var(--gap-12) var(--gap-16);\n pointer-events: none;\n position: relative;\n}\n\n.tooltipList {\n position: relative;\n z-index: 5;\n list-style-type: none;\n padding: var(--gap-0);\n margin: var(--gap-0);\n}\n\n.tooltipItem {\n margin-bottom: var(--gap-10);\n}\n\n.tooltipArrow {\n position: absolute;\n left: var(--gap-0);\n top: 50%;\n transform: translate(-50%, -50%) scale(1, 1) rotate(45deg);\n width: 10px;\n height: 10px;\n border: 1px solid var(--color-light-neutral-400);\n background-color: var(--color-light-base-bg-primary);\n}\n\n.tooltipArrow:before {\n content: '';\n position: absolute;\n left: var(--gap-2-neg);\n top: var(--gap-2-neg);\n width: 0;\n height: 0;\n border-style: solid;\n border-width: 0 14px 14px 0;\n border-color: transparent var(--color-light-base-bg-primary) transparent transparent;\n}\n\n.tooltipArrowRight {\n left: 100%;\n transform: translate(-50%, -50%) scale(-1, 1) rotate(45deg);\n}\n"],"names":[],"mappings":";;AAEgB,aAAe,CAAC,SAAS,CAAC,sBAAsB,CAAC,aAAa,CAAC,0BAA0B,CAAC,aAAa,CAAC,0BAA0B,CAAC,cAAc,CAAC,2BAA2B,CAAC,mBAAmB,CAAC,gCAAgC,CAAC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/hooks/usePathBar/index.ts"],"sourcesContent":["import { useEffect, useState } from 'react';\n\nimport { type RadiusProp } from '../../types/seria.types';\n\nimport { getRadius } from './utils/getRadius';\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport type usePathBarProps = {\n radius?: RadiusProp;\n height: number;\n background?: {\n x: number;\n y: number;\n height: number;\n width: number;\n };\n y?: number;\n};\n\nexport const usePathBar = (props: usePathBarProps): number[] => {\n const [topRadius, setTopRadius] = useState<number>(0);\n const [bottomRadius, setBottomRadius] = useState<number>(0);\n const [initHeight, setInitHeight] = useState<number>(0);\n const [initY, setInitY] = useState<number>(0);\n\n useEffect(() => {\n const { radius, height, background, y } = props;\n const radiusTop = radius?.top ? getRadius(height, radius.top) : 0;\n const radiusBottom = radius?.bottom ? getRadius(height, radius.bottom) : 0;\n\n const heightCheck =\n (radius && height !== 0 && height / 2 < (radius?.top || 0)) ||\n height / 2 < (radius?.bottom || 0);\n\n // eslint-disable-next-line no-nested-ternary\n const heightInit = heightCheck\n ? (radiusTop || radiusBottom) && radiusTop + radiusBottom\n : height > 0 && height < 2\n ? 2\n : height;\n\n if (background && y) {\n const yInit = heightCheck\n ? background.height + background.y - (radiusTop + radiusBottom)\n : y;\n\n setInitY(yInit);\n }\n\n if (radiusTop !== 0) setTopRadius(radiusTop);\n if (radiusBottom !== 0) setBottomRadius(radiusBottom);\n if (heightInit !== 0) setInitHeight(heightInit);\n }, [props]);\n\n return [initHeight, topRadius, bottomRadius, initY];\n};\n"],"names":[],"mappings":";;;AAmBO,IAAM,UAAU,GAAG,UAAC,KAAsB,EAAA;IACvC,IAAA,EAAA,GAA4B,QAAQ,CAAS,CAAC,CAAC,EAA9C,SAAS,GAAA,EAAA,CAAA,CAAA,CAAA,EAAE,YAAY,GAAA,EAAA,CAAA,CAAA,CAAuB;IAC/C,IAAA,EAAA,GAAkC,QAAQ,CAAS,CAAC,CAAC,EAApD,YAAY,GAAA,EAAA,CAAA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AAS,IAAI,YAAY,KAAK,SAAS,GAAG;AAC7C,cAAE,MAAM,GAAG,CAAC,IAAI,MAAM,GAAG;AACvB,kBAAE;kBACA,MAAM;
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/hooks/usePathBar/index.ts"],"sourcesContent":["import { useEffect, useState } from 'react';\n\nimport { type RadiusProp } from '../../types/seria.types';\n\nimport { getRadius } from './utils/getRadius';\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport type usePathBarProps = {\n radius?: RadiusProp;\n height: number;\n background?: {\n x: number;\n y: number;\n height: number;\n width: number;\n };\n y?: number;\n};\n\nexport const usePathBar = (props: usePathBarProps): number[] => {\n const [topRadius, setTopRadius] = useState<number>(0);\n const [bottomRadius, setBottomRadius] = useState<number>(0);\n const [initHeight, setInitHeight] = useState<number>(0);\n const [initY, setInitY] = useState<number>(0);\n\n useEffect(() => {\n const { radius, height, background, y } = props;\n const radiusTop = radius?.top ? getRadius(height, radius.top) : 0;\n const radiusBottom = radius?.bottom ? getRadius(height, radius.bottom) : 0;\n\n const heightCheck =\n (radius && height !== 0 && height / 2 < (radius?.top || 0)) ||\n height / 2 < (radius?.bottom || 0);\n\n // eslint-disable-next-line no-nested-ternary\n const heightInit = heightCheck\n ? (radiusTop || radiusBottom) && radiusTop + radiusBottom\n : height > 0 && height < 2\n ? 2\n : height;\n\n if (background && y) {\n const yInit = heightCheck\n ? background.height + background.y - (radiusTop + radiusBottom)\n : y;\n\n setInitY(yInit);\n }\n\n if (radiusTop !== 0) setTopRadius(radiusTop);\n if (radiusBottom !== 0) setBottomRadius(radiusBottom);\n if (heightInit !== 0) setInitHeight(heightInit);\n }, [props]);\n\n return [initHeight, topRadius, bottomRadius, initY];\n};\n"],"names":[],"mappings":";;;AAmBO,IAAM,UAAU,GAAG,UAAC,KAAsB,EAAA;IACvC,IAAA,EAAA,GAA4B,QAAQ,CAAS,CAAC,CAAC,EAA9C,SAAS,GAAA,EAAA,CAAA,CAAA,CAAA,EAAE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A,IAAN,MAAM,KAAA,MAAA,GAAA,MAAA,GAAN,MAAM,CAAE,MAAM,KAAI,CAAC,CAAC;;QAGtC,IAAM,UAAU,GAAG;cACb,CAAC,SAAS,IAAI,YAAY,KAAK,SAAS,GAAG;AAC7C,cAAE,MAAM,GAAG,CAAC,IAAI,MAAM,GAAG;AACvB,kBAAE;kBACA,MAAM;AAEd,QAAA,IAAI,UAAU,IAAI,CAAC,EAAE;YACjB,IAAM,KAAK,GAAG;AACV,kBAAE,UAAU,CAAC,MAAM,GAAG,UAAU,CAAC,CAAC,IAAI,SAAS,GAAG,YAAY;kBAC5D,CAAC;YAEP,QAAQ,CAAC,KAAK,CAAC;;QAGnB,IAAI,SAAS,KAAK,CAAC;YAAE,YAAY,CAAC,SAAS,CAAC;QAC5C,IAAI,YAAY,KAAK,CAAC;YAAE,eAAe,CAAC,YAAY,CAAC;QACrD,IAAI,UAAU,KAAK,CAAC;YAAE,aAAa,CAAC,UAAU,CAAC;AACnD,KAAC,EAAE,CAAC,KAAK,CAAC,CAAC;IAEX,OAAO,CAAC,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,CAAC;AACvD;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type Dispatch, type SetStateAction } from 'react';
|
|
2
2
|
import { type OptionsProps } from '../../types/options.types';
|
|
3
3
|
import { type DataDynamicBooleanProps, type DataDynamicProps } from '../../types/utils/data.types';
|
|
4
|
-
|
|
4
|
+
type Settings = [
|
|
5
5
|
{
|
|
6
6
|
state: OptionsProps | null;
|
|
7
7
|
data: DataDynamicProps[];
|
|
@@ -2,7 +2,7 @@ import { type BrushProps } from '../../../types/brush.types';
|
|
|
2
2
|
import { type ComposedChartProps } from '../../../types/composedChart.types';
|
|
3
3
|
import { type LegendProps } from '../../../types/legend.types';
|
|
4
4
|
import { type XAxisProps } from '../../../types/xAxis.types';
|
|
5
|
-
|
|
5
|
+
type ComposedChartsMarginResultProps = {
|
|
6
6
|
top: number;
|
|
7
7
|
bottom: number;
|
|
8
8
|
left: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type SeriaProps } from '../../../types/seria.types';
|
|
2
2
|
import { type DataDynamicBooleanProps, type DataDynamicProps } from '../../../types/utils/data.types';
|
|
3
|
-
|
|
3
|
+
type DatasResultProps = [DataDynamicProps[], DataDynamicBooleanProps, number];
|
|
4
4
|
export declare const setDatas: (series: SeriaProps[], labels: Array<string | number>) => DatasResultProps;
|
|
5
5
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setDatas.js","sources":["../../../../src/hooks/useSettings/utils/setDatas.ts"],"sourcesContent":["import { type SeriaProps } from '../../../types/seria.types';\nimport {\n type DataDynamicBooleanProps,\n type DataDynamicProps,\n type DataProps,\n} from '../../../types/utils/data.types';\n\ntype DatasResultProps = [DataDynamicProps[], DataDynamicBooleanProps, number];\n\nexport const setDatas = (\n series: SeriaProps[],\n labels: Array<string | number>,\n): DatasResultProps => {\n const initData: DataDynamicProps[] = [];\n const chartsNames: DataDynamicBooleanProps = {};\n let count = 0;\n\n for (let i = 0; i < series.length; i++) {\n const {\n properties: { dataKey = '' } = {},\n data: seriaData = [],\n hideLegend,\n hide,\n } = series[i];\n\n if (!hideLegend && !hide) count += 1;\n\n labels.map((label) => {\n const item = seriaData.find((d: DataProps) => d.label === label);\n\n if (item) {\n const obj: DataDynamicProps = {\n label,\n };\n\n obj[`${dataKey}`] = item.value;\n\n if (!chartsNames[`${dataKey}`]) chartsNames[`${dataKey}`] = true;\n\n const index = initData\n .map((dataItem: DataDynamicProps) => dataItem.label)\n .indexOf(label);\n\n if (index === -1) initData.push(obj);\n else initData[index] = { ...initData[index], ...obj };\n }\n\n return null;\n });\n }\n\n return [initData, chartsNames, count];\n};\n"],"names":[],"mappings":";;AASa,IAAA,QAAQ,GAAG,UACpB,MAAoB,EACpB,MAA8B,EAAA;IAE9B,IAAM,QAAQ,GAAuB,EAAE;IACvC,IAAM,WAAW,GAA4B,EAAE;IAC/C,IAAI,KAAK,GAAG,CAAC;4BAEJ,CAAC,EAAA;AACA,QAAA,IAAA,EAKF,GAAA,MAAM,CAAC,CAAC,CAAC,EAJT,EAAiC,GAAA,EAAA,CAAA,UAAA,EAAjC,EAA+B,GAAA,EAAA,KAAA,MAAA,GAAA,EAAE,GAAA,EAAA,EAAnB,eAAY,EAAZ,OAAO,GAAG,EAAA,KAAA,MAAA,GAAA,EAAE,GAAA,EAAA,EAC1B,EAAoB,GAAA,EAAA,CAAA,IAAA,EAAd,SAAS,GAAG,EAAA,KAAA,MAAA,GAAA,EAAE,GAAA,EAAA,EACpB,UAAU,GAAA,EAAA,CAAA,UAAA,EACV,IAAI,UACK;AAEb,QAAA,IAAI,CAAC,UAAU,IAAI,CAAC,IAAI;YAAE,KAAK,IAAI,CAAC;AAEpC,QAAA,MAAM,CAAC,GAAG,CAAC,UAAC,KAAK,EAAA;AACb,YAAA,IAAM,IAAI,GAAG,SAAS,CAAC,IAAI,CAAC,UAAC,CAAY,EAAA,EAAK,OAAA,CAAC,CAAC,KAAK,KAAK,KAAK,CAAjB,EAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"setDatas.js","sources":["../../../../src/hooks/useSettings/utils/setDatas.ts"],"sourcesContent":["import { type SeriaProps } from '../../../types/seria.types';\nimport {\n type DataDynamicBooleanProps,\n type DataDynamicProps,\n type DataProps,\n} from '../../../types/utils/data.types';\n\ntype DatasResultProps = [DataDynamicProps[], DataDynamicBooleanProps, number];\n\nexport const setDatas = (\n series: SeriaProps[],\n labels: Array<string | number>,\n): DatasResultProps => {\n const initData: DataDynamicProps[] = [];\n const chartsNames: DataDynamicBooleanProps = {};\n let count = 0;\n\n for (let i = 0; i < series.length; i++) {\n const {\n properties: { dataKey = '' } = {},\n data: seriaData = [],\n hideLegend,\n hide,\n } = series[i];\n\n if (!hideLegend && !hide) count += 1;\n\n labels.map((label) => {\n const item = seriaData.find((d: DataProps) => d.label === label);\n\n if (item) {\n const obj: DataDynamicProps = {\n label,\n };\n\n obj[`${dataKey}`] = item.value;\n\n if (!chartsNames[`${dataKey}`]) chartsNames[`${dataKey}`] = true;\n\n const index = initData\n .map((dataItem: DataDynamicProps) => dataItem.label)\n .indexOf(label);\n\n if (index === -1) initData.push(obj);\n else initData[index] = { ...initData[index], ...obj };\n }\n\n return null;\n });\n }\n\n return [initData, chartsNames, count];\n};\n"],"names":[],"mappings":";;AASa,IAAA,QAAQ,GAAG,UACpB,MAAoB,EACpB,MAA8B,EAAA;IAE9B,IAAM,QAAQ,GAAuB,EAAE;IACvC,IAAM,WAAW,GAA4B,EAAE;IAC/C,IAAI,KAAK,GAAG,CAAC;4BAEJ,CAAC,EAAA;AACA,QAAA,IAAA,EAKF,GAAA,MAAM,CAAC,CAAC,CAAC,EAJT,EAAiC,GAAA,EAAA,CAAA,UAAA,EAAjC,EAA+B,GAAA,EAAA,KAAA,MAAA,GAAA,EAAE,GAAA,EAAA,EAAnB,eAAY,EAAZ,OAAO,GAAG,EAAA,KAAA,MAAA,GAAA,EAAE,GAAA,EAAA,EAC1B,EAAoB,GAAA,EAAA,CAAA,IAAA,EAAd,SAAS,GAAG,EAAA,KAAA,MAAA,GAAA,EAAE,GAAA,EAAA,EACpB,UAAU,GAAA,EAAA,CAAA,UAAA,EACV,IAAI,UACK;AAEb,QAAA,IAAI,CAAC,UAAU,IAAI,CAAC,IAAI;YAAE,KAAK,IAAI,CAAC;AAEpC,QAAA,MAAM,CAAC,GAAG,CAAC,UAAC,KAAK,EAAA;AACb,YAAA,IAAM,IAAI,GAAG,SAAS,CAAC,IAAI,CAAC,UAAC,CAAY,EAAA,EAAK,OAAA,CAAC,CAAC,KAAK,KAAK,KAAK,CAAjB,EAAiB,CAAC;YAEhE,IAAI,IAAI,EAAE;AACN,gBAAA,IAAM,GAAG,GAAqB;AAC1B,oBAAA,KAAK,EAAA,KAAA;iBACR;gBAED,GAAG,CAAC,UAAG,OAAO,CAAE,CAAC,GAAG,IAAI,CAAC,KAAK;AAE9B,gBAAA,IAAI,CAAC,WAAW,CAAC,EAAG,CAAA,MAAA,CAAA,OAAO,CAAE,CAAC;AAAE,oBAAA,WAAW,CAAC,EAAG,CAAA,MAAA,CAAA,OAAO,CAAE,CAAC,GAAG,IAAI;gBAEhE,IAAM,KAAK,GAAG;qBACT,GAAG,CAAC,UAAC,QAA0B,EAAK,EAAA,OAAA,QAAQ,CAAC,KAAK,CAAd,EAAc;qBAClD,OAAO,CAAC,KAAK,CAAC;gBAEnB,IAAI,KAAK,KAAK,EAAE;AAAE,oBAAA,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC;;oBAC/B,QAAQ,CAAC,KAAK,CAAC,GAAQ,QAAA,CAAA,QAAA,CAAA,EAAA,EAAA,QAAQ,CAAC,KAAK,CAAC,CAAA,EAAK,GAAG,CAAE;;AAGzD,YAAA,OAAO,IAAI;AACf,SAAC,CAAC;;AA/BN,IAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,EAAA;gBAA7B,CAAC,CAAA;AAgCT;AAED,IAAA,OAAO,CAAC,QAAQ,EAAE,WAAW,EAAE,KAAK,CAAC;AACzC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setGradientCharts.js","sources":["../../../../src/hooks/useSettings/utils/setGradientCharts.ts"],"sourcesContent":["import { type SeriaProps } from '../../../types/seria.types';\nimport { type DataProps } from '../../../types/utils/data.types';\n\nexport const setGradientCharts = (series: SeriaProps[]): SeriaProps[] => {\n const filterSeries = series.filter((item) => item.chart !== 'gradient');\n\n return filterSeries.reduce((accum: SeriaProps[], item: SeriaProps) => {\n const { chart, data: dataSeria, offset, fill } = item;\n\n if (chart === 'area') {\n let newData = null;\n\n if (offset) {\n newData = dataSeria.map((d: DataProps) => {\n const { label, value } = d;\n\n return {\n label,\n value: Math.ceil(value - value * offset),\n };\n });\n }\n\n accum.push({\n ...item,\n zIndex: -100,\n chart: 'gradient',\n hideLegend: true,\n hideTooltip: true,\n properties: {\n ...item.properties,\n dataKey: `${item.properties.dataKey}-gradient`,\n fill,\n },\n data: newData || item.data,\n });\n }\n\n accum.push(item);\n\n return accum;\n }, []);\n};\n"],"names":[],"mappings":";;AAGO,IAAM,iBAAiB,GAAG,UAAC,MAAoB,EAAA;AAClD,IAAA,IAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,UAAC,IAAI,EAAA,EAAK,OAAA,IAAI,CAAC,KAAK,KAAK,UAAU,CAAzB,EAAyB,CAAC;AAEvE,IAAA,OAAO,YAAY,CAAC,MAAM,CAAC,UAAC,KAAmB,EAAE,IAAgB,EAAA;AACrD,QAAA,IAAA,KAAK,GAAoC,IAAI,MAAxC,EAAQ,SAAS,GAAmB,IAAI,CAAA,IAAvB,EAAE,MAAM,GAAW,IAAI,CAAf,MAAA,EAAE,IAAI,GAAK,IAAI,KAAT;
|
|
1
|
+
{"version":3,"file":"setGradientCharts.js","sources":["../../../../src/hooks/useSettings/utils/setGradientCharts.ts"],"sourcesContent":["import { type SeriaProps } from '../../../types/seria.types';\nimport { type DataProps } from '../../../types/utils/data.types';\n\nexport const setGradientCharts = (series: SeriaProps[]): SeriaProps[] => {\n const filterSeries = series.filter((item) => item.chart !== 'gradient');\n\n return filterSeries.reduce((accum: SeriaProps[], item: SeriaProps) => {\n const { chart, data: dataSeria, offset, fill } = item;\n\n if (chart === 'area') {\n let newData = null;\n\n if (offset) {\n newData = dataSeria.map((d: DataProps) => {\n const { label, value } = d;\n\n return {\n label,\n value: Math.ceil(value - value * offset),\n };\n });\n }\n\n accum.push({\n ...item,\n zIndex: -100,\n chart: 'gradient',\n hideLegend: true,\n hideTooltip: true,\n properties: {\n ...item.properties,\n dataKey: `${item.properties.dataKey}-gradient`,\n fill,\n },\n data: newData || item.data,\n });\n }\n\n accum.push(item);\n\n return accum;\n }, []);\n};\n"],"names":[],"mappings":";;AAGO,IAAM,iBAAiB,GAAG,UAAC,M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hB,QAAA,OAAO,KAAK;KACf,EAAE,EAAE,CAAC;AACV;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setLegendMargin.js","sources":["../../../../src/hooks/useSettings/utils/setLegendMargin.ts"],"sourcesContent":["import { type BrushProps } from '../../../types/brush.types';\nimport { type LegendProps } from '../../../types/legend.types';\n\nexport const setLegendMargin = (brush: BrushProps, legend: LegendProps): number => {\n let top = 0;\n\n if (typeof brush?.brushMargin !== 'number' || !legend?.verticalAlign) return top;\n\n if (legend.verticalAlign === 'top') {\n top = legend.marginTop ? Number(legend.marginTop * -1) : 0;\n } else {\n top = legend?.marginTop ? legend.marginTop + (brush?.brushMargin || 0) : brush?.brushMargin;\n }\n\n return top;\n};\n"],"names":[],"mappings":"AAGa,IAAA,eAAe,GAAG,UAAC,KAAiB,EAAE,MAAmB,EAAA;IAClE,IAAI,GAAG,GAAG,CAAC;IAEX,IAAI,QAAO,KAAK,KAAA,IAAA,IAAL,KAAK,KAAL,MAAA,GAAA,MAAA,GAAA,KAAK,CAAE,WAAW,CAAA,KAAK,QAAQ,IAAI,EAAC,MAAM,KAAA,IAAA,IAAN,MAAM,KAAN,MAAA,GAAA,MAAA,GAAA,MAAM,CAAE,aAAa,CAAA;AAAE,QAAA,OAAO,GAAG;AAEhF,IAAA,IAAI,MAAM,CAAC,aAAa,KAAK,KAAK,EAAE;QAChC,GAAG,GAAG,MAAM,CAAC,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,SAAS,GAAG,EAAE,CAAC,GAAG,CAAC;
|
|
1
|
+
{"version":3,"file":"setLegendMargin.js","sources":["../../../../src/hooks/useSettings/utils/setLegendMargin.ts"],"sourcesContent":["import { type BrushProps } from '../../../types/brush.types';\nimport { type LegendProps } from '../../../types/legend.types';\n\nexport const setLegendMargin = (brush: BrushProps, legend: LegendProps): number => {\n let top = 0;\n\n if (typeof brush?.brushMargin !== 'number' || !legend?.verticalAlign) return top;\n\n if (legend.verticalAlign === 'top') {\n top = legend.marginTop ? Number(legend.marginTop * -1) : 0;\n } else {\n top = legend?.marginTop ? legend.marginTop + (brush?.brushMargin || 0) : brush?.brushMargin;\n }\n\n return top;\n};\n"],"names":[],"mappings":"AAGa,IAAA,eAAe,GAAG,UAAC,KAAiB,EAAE,MAAmB,EAAA;IAClE,IAAI,GAAG,GAAG,CAAC;IAEX,IAAI,QAAO,KAAK,KAAA,IAAA,IAAL,KAAK,KAAL,MAAA,GAAA,MAAA,GAAA,KAAK,CAAE,WAAW,CAAA,KAAK,QAAQ,IAAI,EAAC,MAAM,KAAA,IAAA,IAAN,MAAM,KAAN,MAAA,GAAA,MAAA,GAAA,MAAM,CAAE,aAAa,CAAA;AAAE,QAAA,OAAO,GAAG;AAEhF,IAAA,IAAI,MAAM,CAAC,aAAa,KAAK,KAAK,EAAE;QAChC,GAAG,GAAG,MAAM,CAAC,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,SAAS,GAAG,EAAE,CAAC,GAAG,CAAC;;SACvD;AACH,QAAA,GAAG,GAAG,CAAA,MAAM,KAAN,IAAA,IAAA,MAAM,uBAAN,MAAM,CAAE,SAAS,IAAG,MAAM,CAAC,SAAS,IAAI,CAAA,KAAK,KAAL,IAAA,IAAA,KAAK,uBAAL,KAAK,CAAE,WAAW,KAAI,CAAC,CAAC,GAAG,KAAK,KAAL,IAAA,IAAA,KAAK,uBAAL,KAAK,CAAE,WAAW;;AAG/F,IAAA,OAAO,GAAG;AACd;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sortByIndex.js","sources":["../../../../src/hooks/useSettings/utils/sortByIndex.ts"],"sourcesContent":["import { type SeriaProps } from '../../../types/seria.types';\n\nexport const sortByIndex = (series: SeriaProps[]): SeriaProps[] =>\n series.sort((a: SeriaProps, b: SeriaProps) => {\n if (a?.zIndex && b?.zIndex && a?.zIndex > b?.zIndex) {\n return 1;\n }\n\n return -1;\n });\n"],"names":[],"mappings":"AAEO,IAAM,WAAW,GAAG,UAAC,MAAoB,EAAA;AAC5C,IAAA,OAAA,MAAM,CAAC,IAAI,CAAC,UAAC,CAAa,EAAE,CAAa,EAAA;AACrC,QAAA,IAAI,CAAA,CAAC,
|
|
1
|
+
{"version":3,"file":"sortByIndex.js","sources":["../../../../src/hooks/useSettings/utils/sortByIndex.ts"],"sourcesContent":["import { type SeriaProps } from '../../../types/seria.types';\n\nexport const sortByIndex = (series: SeriaProps[]): SeriaProps[] =>\n series.sort((a: SeriaProps, b: SeriaProps) => {\n if (a?.zIndex && b?.zIndex && a?.zIndex > b?.zIndex) {\n return 1;\n }\n\n return -1;\n });\n"],"names":[],"mappings":"AAEO,IAAM,WAAW,GAAG,UAAC,MAAoB,EAAA;AAC5C,IAAA,OAAA,MAAM,CAAC,IAAI,CAAC,UAAC,CAAa,EAAE,CAAa,EAAA;AACrC,QAAA,IAAI,CAAA,CAAC,KAAA,IAAA,IAAD,CAAC,KAAA,MAAA,GAAA,MAAA,GAAD,CAAC,CAAE,MAAM,MAAI,CAAC,aAAD,CAAC,KAAA,MAAA,GAAA,MAAA,GAAD,CAAC,CAAE,MAAM,CAAA,IAAI,CAAA,CAAC,aAAD,CAAC,KAAA,MAAA,GAAA,MAAA,GAAD,CAAC,CAAE,MAAM,KAAG,CAAC,KAAD,IAAA,IAAA,CAAC,uBAAD,CAAC,CAAE,MAAM,CAAA,EAAE;AACjD,YAAA,OAAO,CAAC;;QAGZ,OAAO,EAAE;AACb,KAAC,CAAC;AANF;;;;"}
|
package/esm/icons/Circle.d.ts
CHANGED
package/esm/icons/Point.d.ts
CHANGED
package/esm/index.css
CHANGED
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
--font-family-system:
|
|
6
6
|
system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica, sans-serif;
|
|
7
7
|
}
|
|
8
|
-
.
|
|
8
|
+
.chart__coreChart_1bs2j .recharts-line path {
|
|
9
9
|
transition: d 0.2s ease-out;
|
|
10
10
|
}
|
|
11
|
-
.
|
|
11
|
+
.chart__coreChart_1bs2j .recharts-text tspan {
|
|
12
12
|
fill: var(--color-light-text-primary);
|
|
13
13
|
|
|
14
14
|
font-size: 16px;
|
|
@@ -19,11 +19,11 @@
|
|
|
19
19
|
|
|
20
20
|
font-family: var(--font-family-system);
|
|
21
21
|
}
|
|
22
|
-
.
|
|
22
|
+
.chart__bar_1bs2j {
|
|
23
23
|
transition:
|
|
24
24
|
opacity 0.2s ease-out,
|
|
25
25
|
d 0.2s ease-out;
|
|
26
26
|
}
|
|
27
|
-
.
|
|
27
|
+
.chart__unfocused_1bs2j {
|
|
28
28
|
opacity: 0.3;
|
|
29
29
|
}
|
package/esm/index.module.css.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './index.css';
|
|
2
2
|
|
|
3
|
-
var styles = {"coreChart":"
|
|
3
|
+
var styles = {"coreChart":"chart__coreChart_1bs2j","bar":"chart__bar_1bs2j","unfocused":"chart__unfocused_1bs2j"};
|
|
4
4
|
|
|
5
5
|
export { styles as default };
|
|
6
6
|
//# sourceMappingURL=index.module.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.module.css.js","sources":["src/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/
|
|
1
|
+
{"version":3,"file":"index.module.css.js","sources":["src/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/index.css';\n\n.coreChart {\n & :global(.recharts-line path) {\n transition: d 0.2s ease-out;\n }\n\n & :global(.recharts-text tspan) {\n fill: var(--color-light-text-primary);\n\n @mixin paragraph_component_primary;\n }\n}\n\n.bar {\n transition:\n opacity 0.2s ease-out,\n d 0.2s ease-out;\n}\n\n.unfocused {\n opacity: 0.3;\n}\n"],"names":[],"mappings":";;AAEgB,aAAe,CAAC,WAAW,CAAC,wBAAwB,CAAC,KAAK,CAAC,kBAAkB,CAAC,WAAW,CAAC,wBAAwB,CAAC;;;;"}
|
|
@@ -3,8 +3,8 @@ import { type RectangleProps } from 'recharts';
|
|
|
3
3
|
import { type DataKey } from 'recharts/types/util/types';
|
|
4
4
|
import { type DataProps } from './utils/data.types';
|
|
5
5
|
import { type DotSettingProps } from './utils/dot.types';
|
|
6
|
-
|
|
7
|
-
export
|
|
6
|
+
type CurveType = 'linear' | 'monotone' | 'step';
|
|
7
|
+
export type RectangleShapeType = ReactElement<SVGElement> | ((props: any) => ReactElement<SVGElement>) | RectangleProps | boolean;
|
|
8
8
|
export interface ChartProps {
|
|
9
9
|
/**
|
|
10
10
|
* Название графика (отображается в легендах и тултипе)
|
|
@@ -2,7 +2,7 @@ import { type DataProps } from './utils/data.types';
|
|
|
2
2
|
import { type GradientProps } from './utils/gradient.types';
|
|
3
3
|
import { type ChartProps } from './chart.types';
|
|
4
4
|
import { type LabelListProps } from './labelList.types';
|
|
5
|
-
export
|
|
5
|
+
export type RadiusProp = {
|
|
6
6
|
top?: number;
|
|
7
7
|
bottom?: number;
|
|
8
8
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type ReactElement, type ReactNode, type ReactText, type SVGProps } from 'react';
|
|
2
2
|
import { type AnimationTiming } from 'recharts/types/util/types';
|
|
3
3
|
import { type PayloadProps } from './payload.types';
|
|
4
|
-
|
|
4
|
+
type TooltipContentProps = {
|
|
5
5
|
label: string | number;
|
|
6
6
|
payload: PayloadProps[];
|
|
7
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/hooks/usePathBar/index.ts"],"sourcesContent":["import { useEffect, useState } from 'react';\n\nimport { type RadiusProp } from '../../types/seria.types';\n\nimport { getRadius } from './utils/getRadius';\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport type usePathBarProps = {\n radius?: RadiusProp;\n height: number;\n background?: {\n x: number;\n y: number;\n height: number;\n width: number;\n };\n y?: number;\n};\n\nexport const usePathBar = (props: usePathBarProps): number[] => {\n const [topRadius, setTopRadius] = useState<number>(0);\n const [bottomRadius, setBottomRadius] = useState<number>(0);\n const [initHeight, setInitHeight] = useState<number>(0);\n const [initY, setInitY] = useState<number>(0);\n\n useEffect(() => {\n const { radius, height, background, y } = props;\n const radiusTop = radius?.top ? getRadius(height, radius.top) : 0;\n const radiusBottom = radius?.bottom ? getRadius(height, radius.bottom) : 0;\n\n const heightCheck =\n (radius && height !== 0 && height / 2 < (radius?.top || 0)) ||\n height / 2 < (radius?.bottom || 0);\n\n // eslint-disable-next-line no-nested-ternary\n const heightInit = heightCheck\n ? (radiusTop || radiusBottom) && radiusTop + radiusBottom\n : height > 0 && height < 2\n ? 2\n : height;\n\n if (background && y) {\n const yInit = heightCheck\n ? background.height + background.y - (radiusTop + radiusBottom)\n : y;\n\n setInitY(yInit);\n }\n\n if (radiusTop !== 0) setTopRadius(radiusTop);\n if (radiusBottom !== 0) setBottomRadius(radiusBottom);\n if (heightInit !== 0) setInitHeight(heightInit);\n }, [props]);\n\n return [initHeight, topRadius, bottomRadius, initY];\n};\n"],"names":["useState","useEffect","getRadius"],"mappings":";;;;;;;AAmBO,IAAM,UAAU,GAAG,UAAC,KAAsB,EAAA;IACvC,IAAA,EAAA,GAA4BA,cAAQ,CAAS,CAAC,CAAC,EAA9C,SAAS,GAAA,EAAA,CAAA,CAAA,CAAA,EAAE,YAAY,GAAA,EAAA,CAAA,CAAA,CAAuB;IAC/C,IAAA,EAAA,GAAkCA,cAAQ,CAAS,CAAC,CAAC,EAApD,YAAY,GAAA,EAAA,CAAA,CAAA,CAAA,EAAE,eAAe,GAAA,EAAA,CAAA,CAAA,CAAuB;IACrD,IAAA,EAAA,GAA8BA,cAAQ,CAAS,CAAC,CAAC,EAAhD,UAAU,GAAA,EAAA,CAAA,CAAA,CAAA,EAAE,aAAa,GAAA,EAAA,CAAA,CAAA,CAAuB;IACjD,IAAA,EAAA,GAAoBA,cAAQ,CAAS,CAAC,CAAC,EAAtC,KAAK,GAAA,EAAA,CAAA,CAAA,CAAA,EAAE,QAAQ,GAAA,EAAA,CAAA,CAAA,CAAuB;AAE7C,IAAAC,eAAS,CAAC,YAAA;AACE,QAAA,IAAA,MAAM,GAA4B,KAAK,OAAjC,EAAE,MAAM,GAAoB,KAAK,CAAA,MAAzB,EAAE,UAAU,GAAQ,KAAK,CAAb,UAAA,EAAE,CAAC,GAAK,KAAK,EAAV;QACrC,IAAM,SAAS,GAAG,CAAA,MAAM,KAAA,IAAA,IAAN,MAAM,KAAN,MAAA,GAAA,MAAA,GAAA,MAAM,CAAE,GAAG,IAAGC,mBAAS,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC;QACjE,IAAM,YAAY,GAAG,CAAA,MAAM,KAAA,IAAA,IAAN,MAAM,KAAN,MAAA,GAAA,MAAA,GAAA,MAAM,CAAE,MAAM,IAAGA,mBAAS,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC;QAE1E,IAAM,WAAW,GACb,CAAC,MAAM,IAAI,MAAM,KAAK,CAAC,IAAI,MAAM,GAAG,CAAC,IAAI,CAAA,MAAM,KAAA,IAAA,IAAN,MAAM,KAAA,MAAA,GAAA,MAAA,GAAN,MAAM,CAAE,GAAG,KAAI,CAAC,CAAC;AAC1D,YAAA,MAAM,GAAG,CAAC,IAAI,CAAA,MAAM,KAAA,IAAA,IAAN,MAAM,KAAA,MAAA,GAAA,MAAA,GAAN,MAAM,CAAE,MAAM,KAAI,CAAC,CAAC;;QAGtC,IAAM,UAAU,GAAG;cACb,CAAC,SAAS,IAAI,YAAY,KAAK,SAAS,GAAG;AAC7C,cAAE,MAAM,GAAG,CAAC,IAAI,MAAM,GAAG;AACvB,kBAAE;kBACA,MAAM;
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/hooks/usePathBar/index.ts"],"sourcesContent":["import { useEffect, useState } from 'react';\n\nimport { type RadiusProp } from '../../types/seria.types';\n\nimport { getRadius } from './utils/getRadius';\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport type usePathBarProps = {\n radius?: RadiusProp;\n height: number;\n background?: {\n x: number;\n y: number;\n height: number;\n width: number;\n };\n y?: number;\n};\n\nexport const usePathBar = (props: usePathBarProps): number[] => {\n const [topRadius, setTopRadius] = useState<number>(0);\n const [bottomRadius, setBottomRadius] = useState<number>(0);\n const [initHeight, setInitHeight] = useState<number>(0);\n const [initY, setInitY] = useState<number>(0);\n\n useEffect(() => {\n const { radius, height, background, y } = props;\n const radiusTop = radius?.top ? getRadius(height, radius.top) : 0;\n const radiusBottom = radius?.bottom ? getRadius(height, radius.bottom) : 0;\n\n const heightCheck =\n (radius && height !== 0 && height / 2 < (radius?.top || 0)) ||\n height / 2 < (radius?.bottom || 0);\n\n // eslint-disable-next-line no-nested-ternary\n const heightInit = heightCheck\n ? (radiusTop || radiusBottom) && radiusTop + radiusBottom\n : height > 0 && height < 2\n ? 2\n : height;\n\n if (background && y) {\n const yInit = heightCheck\n ? background.height + background.y - (radiusTop + radiusBottom)\n : y;\n\n setInitY(yInit);\n }\n\n if (radiusTop !== 0) setTopRadius(radiusTop);\n if (radiusBottom !== 0) setBottomRadius(radiusBottom);\n if (heightInit !== 0) setInitHeight(heightInit);\n }, [props]);\n\n return [initHeight, topRadius, bottomRadius, initY];\n};\n"],"names":["useState","useEffect","getRadius"],"mappings":";;;;;;;AAmBO,IAAM,UAAU,GAAG,UAAC,KAAsB,EAAA;IACvC,IAAA,EAAA,GAA4BA,cAAQ,CAAS,CAAC,CAAC,EAA9C,SAAS,GAAA,EAAA,CAAA,CAAA,CAAA,EAAE,YAAY,GAAA,EAAA,CAAA,CAAA,CAAuB;IAC/C,IAAA,EAAA,GAAkCA,cAAQ,CAAS,CAAC,CAAC,EAApD,YAAY,GAAA,EAAA,CAAA,CAAA,CAAA,EAAE,eAAe,GAAA,EAAA,CAAA,CAAA,CAAuB;IACrD,IAAA,EAAA,GAA8BA,cAAQ,CAAS,CAAC,CAAC,EAAhD,UAAU,GAAA,EAAA,CAAA,CAAA,CAAA,EAAE,aAAa,GAAA,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M,KAAK,GAAG;AACV,kBAAE,UAAU,CAAC,MAAM,GAAG,UAAU,CAAC,CAAC,IAAI,SAAS,GAAG,YAAY;kBAC5D,CAAC;YAEP,QAAQ,CAAC,KAAK,CAAC;;QAGnB,IAAI,SAAS,KAAK,CAAC;YAAE,YAAY,CAAC,SAAS,CAAC;QAC5C,IAAI,YAAY,KAAK,CAAC;YAAE,eAAe,CAAC,YAAY,CAAC;QACrD,IAAI,UAAU,KAAK,CAAC;YAAE,aAAa,CAAC,UAAU,CAAC;AACnD,KAAC,EAAE,CAAC,KAAK,CAAC,CAAC;IAEX,OAAO,CAAC,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,CAAC;AACvD;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type Dispatch, type SetStateAction } from 'react';
|
|
2
2
|
import { type OptionsProps } from '../../types/options.types';
|
|
3
3
|
import { type DataDynamicBooleanProps, type DataDynamicProps } from '../../types/utils/data.types';
|
|
4
|
-
|
|
4
|
+
type Settings = [
|
|
5
5
|
{
|
|
6
6
|
state: OptionsProps | null;
|
|
7
7
|
data: DataDynamicProps[];
|
|
@@ -2,7 +2,7 @@ import { type BrushProps } from '../../../types/brush.types';
|
|
|
2
2
|
import { type ComposedChartProps } from '../../../types/composedChart.types';
|
|
3
3
|
import { type LegendProps } from '../../../types/legend.types';
|
|
4
4
|
import { type XAxisProps } from '../../../types/xAxis.types';
|
|
5
|
-
|
|
5
|
+
type ComposedChartsMarginResultProps = {
|
|
6
6
|
top: number;
|
|
7
7
|
bottom: number;
|
|
8
8
|
left: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type SeriaProps } from '../../../types/seria.types';
|
|
2
2
|
import { type DataDynamicBooleanProps, type DataDynamicProps } from '../../../types/utils/data.types';
|
|
3
|
-
|
|
3
|
+
type DatasResultProps = [DataDynamicProps[], DataDynamicBooleanProps, number];
|
|
4
4
|
export declare const setDatas: (series: SeriaProps[], labels: Array<string | number>) => DatasResultProps;
|
|
5
5
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setDatas.js","sources":["../../../src/hooks/useSettings/utils/setDatas.ts"],"sourcesContent":["import { type SeriaProps } from '../../../types/seria.types';\nimport {\n type DataDynamicBooleanProps,\n type DataDynamicProps,\n type DataProps,\n} from '../../../types/utils/data.types';\n\ntype DatasResultProps = [DataDynamicProps[], DataDynamicBooleanProps, number];\n\nexport const setDatas = (\n series: SeriaProps[],\n labels: Array<string | number>,\n): DatasResultProps => {\n const initData: DataDynamicProps[] = [];\n const chartsNames: DataDynamicBooleanProps = {};\n let count = 0;\n\n for (let i = 0; i < series.length; i++) {\n const {\n properties: { dataKey = '' } = {},\n data: seriaData = [],\n hideLegend,\n hide,\n } = series[i];\n\n if (!hideLegend && !hide) count += 1;\n\n labels.map((label) => {\n const item = seriaData.find((d: DataProps) => d.label === label);\n\n if (item) {\n const obj: DataDynamicProps = {\n label,\n };\n\n obj[`${dataKey}`] = item.value;\n\n if (!chartsNames[`${dataKey}`]) chartsNames[`${dataKey}`] = true;\n\n const index = initData\n .map((dataItem: DataDynamicProps) => dataItem.label)\n .indexOf(label);\n\n if (index === -1) initData.push(obj);\n else initData[index] = { ...initData[index], ...obj };\n }\n\n return null;\n });\n }\n\n return [initData, chartsNames, count];\n};\n"],"names":["__assign"],"mappings":";;;;;;AASa,IAAA,QAAQ,GAAG,UACpB,MAAoB,EACpB,MAA8B,EAAA;IAE9B,IAAM,QAAQ,GAAuB,EAAE;IACvC,IAAM,WAAW,GAA4B,EAAE;IAC/C,IAAI,KAAK,GAAG,CAAC;4BAEJ,CAAC,EAAA;AACA,QAAA,IAAA,EAKF,GAAA,MAAM,CAAC,CAAC,CAAC,EAJT,EAAiC,GAAA,EAAA,CAAA,UAAA,EAAjC,EAA+B,GAAA,EAAA,KAAA,MAAA,GAAA,EAAE,GAAA,EAAA,EAAnB,eAAY,EAAZ,OAAO,GAAG,EAAA,KAAA,MAAA,GAAA,EAAE,GAAA,EAAA,EAC1B,EAAoB,GAAA,EAAA,CAAA,IAAA,EAAd,SAAS,GAAG,EAAA,KAAA,MAAA,GAAA,EAAE,GAAA,EAAA,EACpB,UAAU,GAAA,EAAA,CAAA,UAAA,EACV,IAAI,UACK;AAEb,QAAA,IAAI,CAAC,UAAU,IAAI,CAAC,IAAI;YAAE,KAAK,IAAI,CAAC;AAEpC,QAAA,MAAM,CAAC,GAAG,CAAC,UAAC,KAAK,EAAA;AACb,YAAA,IAAM,IAAI,GAAG,SAAS,CAAC,IAAI,CAAC,UAAC,CAAY,EAAA,EAAK,OAAA,CAAC,CAAC,KAAK,KAAK,KAAK,CAAjB,EAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"setDatas.js","sources":["../../../src/hooks/useSettings/utils/setDatas.ts"],"sourcesContent":["import { type SeriaProps } from '../../../types/seria.types';\nimport {\n type DataDynamicBooleanProps,\n type DataDynamicProps,\n type DataProps,\n} from '../../../types/utils/data.types';\n\ntype DatasResultProps = [DataDynamicProps[], DataDynamicBooleanProps, number];\n\nexport const setDatas = (\n series: SeriaProps[],\n labels: Array<string | number>,\n): DatasResultProps => {\n const initData: DataDynamicProps[] = [];\n const chartsNames: DataDynamicBooleanProps = {};\n let count = 0;\n\n for (let i = 0; i < series.length; i++) {\n const {\n properties: { dataKey = '' } = {},\n data: seriaData = [],\n hideLegend,\n hide,\n } = series[i];\n\n if (!hideLegend && !hide) count += 1;\n\n labels.map((label) => {\n const item = seriaData.find((d: DataProps) => d.label === label);\n\n if (item) {\n const obj: DataDynamicProps = {\n label,\n };\n\n obj[`${dataKey}`] = item.value;\n\n if (!chartsNames[`${dataKey}`]) chartsNames[`${dataKey}`] = true;\n\n const index = initData\n .map((dataItem: DataDynamicProps) => dataItem.label)\n .indexOf(label);\n\n if (index === -1) initData.push(obj);\n else initData[index] = { ...initData[index], ...obj };\n }\n\n return null;\n });\n }\n\n return [initData, chartsNames, count];\n};\n"],"names":["__assign"],"mappings":";;;;;;A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,EAAc;qBAClD,OAAO,CAAC,KAAK,CAAC;gBAEnB,IAAI,KAAK,KAAK,EAAE;AAAE,oBAAA,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC;;oBAC/B,QAAQ,CAAC,KAAK,CAAC,GAAQA,cAAA,CAAAA,cAAA,CAAA,EAAA,EAAA,QAAQ,CAAC,KAAK,CAAC,CAAA,EAAK,GAAG,CAAE;;AAGzD,YAAA,OAAO,IAAI;AACf,SAAC,CAAC;;AA/BN,IAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,EAAA;gBAA7B,CAAC,CAAA;AAgCT;AAED,IAAA,OAAO,CAAC,QAAQ,EAAE,WAAW,EAAE,KAAK,CAAC;AACzC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setGradientCharts.js","sources":["../../../src/hooks/useSettings/utils/setGradientCharts.ts"],"sourcesContent":["import { type SeriaProps } from '../../../types/seria.types';\nimport { type DataProps } from '../../../types/utils/data.types';\n\nexport const setGradientCharts = (series: SeriaProps[]): SeriaProps[] => {\n const filterSeries = series.filter((item) => item.chart !== 'gradient');\n\n return filterSeries.reduce((accum: SeriaProps[], item: SeriaProps) => {\n const { chart, data: dataSeria, offset, fill } = item;\n\n if (chart === 'area') {\n let newData = null;\n\n if (offset) {\n newData = dataSeria.map((d: DataProps) => {\n const { label, value } = d;\n\n return {\n label,\n value: Math.ceil(value - value * offset),\n };\n });\n }\n\n accum.push({\n ...item,\n zIndex: -100,\n chart: 'gradient',\n hideLegend: true,\n hideTooltip: true,\n properties: {\n ...item.properties,\n dataKey: `${item.properties.dataKey}-gradient`,\n fill,\n },\n data: newData || item.data,\n });\n }\n\n accum.push(item);\n\n return accum;\n }, []);\n};\n"],"names":["__assign"],"mappings":";;;;;;AAGO,IAAM,iBAAiB,GAAG,UAAC,MAAoB,EAAA;AAClD,IAAA,IAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,UAAC,IAAI,EAAA,EAAK,OAAA,IAAI,CAAC,KAAK,KAAK,UAAU,CAAzB,EAAyB,CAAC;AAEvE,IAAA,OAAO,YAAY,CAAC,MAAM,CAAC,UAAC,KAAmB,EAAE,IAAgB,EAAA;AACrD,QAAA,IAAA,KAAK,GAAoC,IAAI,MAAxC,EAAQ,SAAS,GAAmB,IAAI,CAAA,IAAvB,EAAE,MAAM,GAAW,IAAI,CAAf,MAAA,EAAE,IAAI,GAAK,IAAI,KAAT;
|
|
1
|
+
{"version":3,"file":"setGradientCharts.js","sources":["../../../src/hooks/useSettings/utils/setGradientCharts.ts"],"sourcesContent":["import { type SeriaProps } from '../../../types/seria.types';\nimport { type DataProps } from '../../../types/utils/data.types';\n\nexport const setGradientCharts = (series: SeriaProps[]): SeriaProps[] => {\n const filterSeries = series.filter((item) => item.chart !== 'gradient');\n\n return filterSeries.reduce((accum: SeriaProps[], item: SeriaProps) => {\n const { chart, data: dataSeria, offset, fill } = item;\n\n if (chart === 'area') {\n let newData = null;\n\n if (offset) {\n newData = dataSeria.map((d: DataProps) => {\n const { label, value } = d;\n\n return {\n label,\n value: Math.ceil(value - value * offset),\n };\n });\n }\n\n accum.push({\n ...item,\n zIndex: -100,\n chart: 'gradient',\n hideLegend: true,\n hideTooltip: true,\n properties: {\n ...item.properties,\n dataKey: `${item.properties.dataKey}-gradient`,\n fill,\n },\n data: newData || item.data,\n });\n }\n\n accum.push(item);\n\n return accum;\n }, []);\n};\n"],"names":["__assign"],"mappings":";;;;;;AAGO,IAAM,iBAAiB,GAAG,UAAC,MAAoB,EAAA;AAClD,IAAA,IAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,UAAC,IAAI,EAAA,EAAK,OAAA,IAAI,CAAC,KAAK,KAAK,UAAU,CAAzB,EAAyB,CAAC;AAEvE,IAAA,OAAO,YAAY,CAAC,MAAM,CAAC,UAAC,KAAmB,EAAE,IAAgB,EAAA;AACrD,QAAA,IAAA,KAAK,GAAoC,IAAI,MAAxC,EAAQ,SAAS,GAAmB,IAAI,CAAA,IAAvB,EAAE,MAAM,GAAW,IAAI,CAAf,MAAA,EAAE,IAAI,GAAK,IAAI,KAAT;AAE5C,QAAA,IAAI,KAAK,KAAK,MAAM,EAAE;YAClB,IAAI,OAAO,GAAG,IAAI;YAElB,IAAI,MAAM,EAAE;AACR,gBAAA,OAAO,GAAG,SAAS,CAAC,GAAG,CAAC,UAAC,CAAY,EAAA;oBACzB,IAAA,KAAK,GAAY,CAAC,CAAA,KAAb,EAAE,KAAK,GAAK,CAAC,CAAA,KAAN;oBAEpB,OAAO;AACH,wBAAA,KAAK,EAAA,KAAA;wBACL,KAAK,EAAE,IAAI,CAAC,IAAI,CAAC,KAAK,GAAG,KAAK,GAAG,MAAM,CAAC;qBAC3C;AACL,iBAAC,CAAC;;YAGN,KAAK,CAAC,IAAI,CACHA,cAAA,CAAAA,cAAA,CAAA,EAAA,EAAA,IAAI,KACP,MAAM,EAAE,IAAI,EACZ,KAAK,EAAE,UAAU,EACjB,UAAU,EAAE,IAAI,EAChB,WAAW,EAAE,IAAI,EACjB,UAAU,EAAAA,cAAA,CAAAA,cAAA,CAAA,EAAA,EACH,IAAI,CAAC,UAAU,KAClB,OAAO,EAAE,UAAG,IAAI,CAAC,UAAU,CAAC,OAAO,EAAA,WAAA,CAAW,EAC9C,IAAI,EAAA,IAAA,EAER,CAAA,EAAA,IAAI,EAAE,OAAO,IAAI,IAAI,CAAC,IAAI,EAAA,CAAA,CAC5B;;AAGN,QAAA,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC;AAEhB,QAAA,OAAO,KAAK;KACf,EAAE,EAAE,CAAC;AACV;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setLegendMargin.js","sources":["../../../src/hooks/useSettings/utils/setLegendMargin.ts"],"sourcesContent":["import { type BrushProps } from '../../../types/brush.types';\nimport { type LegendProps } from '../../../types/legend.types';\n\nexport const setLegendMargin = (brush: BrushProps, legend: LegendProps): number => {\n let top = 0;\n\n if (typeof brush?.brushMargin !== 'number' || !legend?.verticalAlign) return top;\n\n if (legend.verticalAlign === 'top') {\n top = legend.marginTop ? Number(legend.marginTop * -1) : 0;\n } else {\n top = legend?.marginTop ? legend.marginTop + (brush?.brushMargin || 0) : brush?.brushMargin;\n }\n\n return top;\n};\n"],"names":[],"mappings":";;;;AAGa,IAAA,eAAe,GAAG,UAAC,KAAiB,EAAE,MAAmB,EAAA;IAClE,IAAI,GAAG,GAAG,CAAC;IAEX,IAAI,QAAO,KAAK,KAAA,IAAA,IAAL,KAAK,KAAL,MAAA,GAAA,MAAA,GAAA,KAAK,CAAE,WAAW,CAAA,KAAK,QAAQ,IAAI,EAAC,MAAM,KAAA,IAAA,IAAN,MAAM,KAAN,MAAA,GAAA,MAAA,GAAA,MAAM,CAAE,aAAa,CAAA;AAAE,QAAA,OAAO,GAAG;AAEhF,IAAA,IAAI,MAAM,CAAC,aAAa,KAAK,KAAK,EAAE;QAChC,GAAG,GAAG,MAAM,CAAC,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,SAAS,GAAG,EAAE,CAAC,GAAG,CAAC;
|
|
1
|
+
{"version":3,"file":"setLegendMargin.js","sources":["../../../src/hooks/useSettings/utils/setLegendMargin.ts"],"sourcesContent":["import { type BrushProps } from '../../../types/brush.types';\nimport { type LegendProps } from '../../../types/legend.types';\n\nexport const setLegendMargin = (brush: BrushProps, legend: LegendProps): number => {\n let top = 0;\n\n if (typeof brush?.brushMargin !== 'number' || !legend?.verticalAlign) return top;\n\n if (legend.verticalAlign === 'top') {\n top = legend.marginTop ? Number(legend.marginTop * -1) : 0;\n } else {\n top = legend?.marginTop ? legend.marginTop + (brush?.brushMargin || 0) : brush?.brushMargin;\n }\n\n return top;\n};\n"],"names":[],"mappings":";;;;AAGa,IAAA,eAAe,GAAG,UAAC,KAAiB,EAAE,MAAmB,EAAA;IAClE,IAAI,GAAG,GAAG,CAAC;IAEX,IAAI,QAAO,KAAK,KAAA,IAAA,IAAL,KAAK,KAAL,MAAA,GAAA,MAAA,GAAA,KAAK,CAAE,WAAW,CAAA,KAAK,QAAQ,IAAI,EAAC,MAAM,KAAA,IAAA,IAAN,MAAM,KAAN,MAAA,GAAA,MAAA,GAAA,MAAM,CAAE,aAAa,CAAA;AAAE,QAAA,OAAO,GAAG;AAEhF,IAAA,IAAI,MAAM,CAAC,aAAa,KAAK,KAAK,EAAE;QAChC,GAAG,GAAG,MAAM,CAAC,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,SAAS,GAAG,EAAE,CAAC,GAAG,CAAC;;SACvD;AACH,QAAA,GAAG,GAAG,CAAA,MAAM,KAAN,IAAA,IAAA,MAAM,uBAAN,MAAM,CAAE,SAAS,IAAG,MAAM,CAAC,SAAS,IAAI,CAAA,KAAK,KAAL,IAAA,IAAA,KAAK,uBAAL,KAAK,CAAE,WAAW,KAAI,CAAC,CAAC,GAAG,KAAK,KAAL,IAAA,IAAA,KAAK,uBAAL,KAAK,CAAE,WAAW;;AAG/F,IAAA,OAAO,GAAG;AACd;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sortByIndex.js","sources":["../../../src/hooks/useSettings/utils/sortByIndex.ts"],"sourcesContent":["import { type SeriaProps } from '../../../types/seria.types';\n\nexport const sortByIndex = (series: SeriaProps[]): SeriaProps[] =>\n series.sort((a: SeriaProps, b: SeriaProps) => {\n if (a?.zIndex && b?.zIndex && a?.zIndex > b?.zIndex) {\n return 1;\n }\n\n return -1;\n });\n"],"names":[],"mappings":";;;;AAEO,IAAM,WAAW,GAAG,UAAC,MAAoB,EAAA;AAC5C,IAAA,OAAA,MAAM,CAAC,IAAI,CAAC,UAAC,CAAa,EAAE,CAAa,EAAA;AACrC,QAAA,IAAI,CAAA,CAAC,
|
|
1
|
+
{"version":3,"file":"sortByIndex.js","sources":["../../../src/hooks/useSettings/utils/sortByIndex.ts"],"sourcesContent":["import { type SeriaProps } from '../../../types/seria.types';\n\nexport const sortByIndex = (series: SeriaProps[]): SeriaProps[] =>\n series.sort((a: SeriaProps, b: SeriaProps) => {\n if (a?.zIndex && b?.zIndex && a?.zIndex > b?.zIndex) {\n return 1;\n }\n\n return -1;\n });\n"],"names":[],"mappings":";;;;AAEO,IAAM,WAAW,GAAG,UAAC,MAAoB,EAAA;AAC5C,IAAA,OAAA,MAAM,CAAC,IAAI,CAAC,UAAC,CAAa,EAAE,CAAa,EAAA;AACrC,QAAA,IAAI,CAAA,CAAC,KAAA,IAAA,IAAD,CAAC,KAAA,MAAA,GAAA,MAAA,GAAD,CAAC,CAAE,MAAM,MAAI,CAAC,aAAD,CAAC,KAAA,MAAA,GAAA,MAAA,GAAD,CAAC,CAAE,MAAM,CAAA,IAAI,CAAA,CAAC,aAAD,CAAC,KAAA,MAAA,GAAA,MAAA,GAAD,CAAC,CAAE,MAAM,KAAG,CAAC,KAAD,IAAA,IAAA,CAAC,uBAAD,CAAC,CAAE,MAAM,CAAA,EAAE;AACjD,YAAA,OAAO,CAAC;;QAGZ,OAAO,EAAE;AACb,KAAC,CAAC;AANF;;;;"}
|
package/icons/Circle.d.ts
CHANGED
package/icons/CircleLine.d.ts
CHANGED
package/icons/FilledCircle.d.ts
CHANGED
package/icons/Point.d.ts
CHANGED
package/icons/StrokeCircle.d.ts
CHANGED
package/index.css
CHANGED
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
--font-family-system:
|
|
6
6
|
system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica, sans-serif;
|
|
7
7
|
}
|
|
8
|
-
.
|
|
8
|
+
.chart__coreChart_1bs2j .recharts-line path {
|
|
9
9
|
transition: d 0.2s ease-out;
|
|
10
10
|
}
|
|
11
|
-
.
|
|
11
|
+
.chart__coreChart_1bs2j .recharts-text tspan {
|
|
12
12
|
fill: var(--color-light-text-primary);
|
|
13
13
|
|
|
14
14
|
font-size: 16px;
|
|
@@ -19,11 +19,11 @@
|
|
|
19
19
|
|
|
20
20
|
font-family: var(--font-family-system);
|
|
21
21
|
}
|
|
22
|
-
.
|
|
22
|
+
.chart__bar_1bs2j {
|
|
23
23
|
transition:
|
|
24
24
|
opacity 0.2s ease-out,
|
|
25
25
|
d 0.2s ease-out;
|
|
26
26
|
}
|
|
27
|
-
.
|
|
27
|
+
.chart__unfocused_1bs2j {
|
|
28
28
|
opacity: 0.3;
|
|
29
29
|
}
|
package/index.module.css.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
require('./index.css');
|
|
4
4
|
|
|
5
|
-
var styles = {"coreChart":"
|
|
5
|
+
var styles = {"coreChart":"chart__coreChart_1bs2j","bar":"chart__bar_1bs2j","unfocused":"chart__unfocused_1bs2j"};
|
|
6
6
|
|
|
7
7
|
module.exports = styles;
|
|
8
8
|
//# sourceMappingURL=index.module.css.js.map
|
package/index.module.css.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.module.css.js","sources":["src/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/
|
|
1
|
+
{"version":3,"file":"index.module.css.js","sources":["src/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/index.css';\n\n.coreChart {\n & :global(.recharts-line path) {\n transition: d 0.2s ease-out;\n }\n\n & :global(.recharts-text tspan) {\n fill: var(--color-light-text-primary);\n\n @mixin paragraph_component_primary;\n }\n}\n\n.bar {\n transition:\n opacity 0.2s ease-out,\n d 0.2s ease-out;\n}\n\n.unfocused {\n opacity: 0.3;\n}\n"],"names":[],"mappings":";;;;AAEgB,aAAe,CAAC,WAAW,CAAC,wBAAwB,CAAC,KAAK,CAAC,kBAAkB,CAAC,WAAW,CAAC,wBAAwB,CAAC;;;;"}
|