@fluentui/react-charts 9.3.8 → 9.3.9
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/CHANGELOG.md +35 -2
- package/dist/index.d.ts +378 -0
- package/lib/PolarChart.js +1 -0
- package/lib/PolarChart.js.map +1 -0
- package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.js +2 -1
- package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.js.map +1 -1
- package/lib/components/ChartTable/ChartTable.js +21 -7
- package/lib/components/ChartTable/ChartTable.js.map +1 -1
- package/lib/components/ChartTable/ChartTable.types.js.map +1 -1
- package/lib/components/ChartTable/useChartTableStyles.styles.js +24 -3
- package/lib/components/ChartTable/useChartTableStyles.styles.js.map +1 -1
- package/lib/components/ChartTable/useChartTableStyles.styles.raw.js +14 -2
- package/lib/components/ChartTable/useChartTableStyles.styles.raw.js.map +1 -1
- package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.js +7 -5
- package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.js.map +1 -1
- package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js.map +1 -1
- package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.js +47 -3
- package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.js.map +1 -1
- package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.raw.js +24 -17
- package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.raw.js.map +1 -1
- package/lib/components/CommonComponents/CartesianChart.js +32 -13
- package/lib/components/CommonComponents/CartesianChart.js.map +1 -1
- package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -1
- package/lib/components/DeclarativeChart/DeclarativeChart.js +33 -29
- package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +413 -210
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib/components/DonutChart/DonutChart.js +18 -6
- package/lib/components/DonutChart/DonutChart.js.map +1 -1
- package/lib/components/DonutChart/DonutChart.types.js.map +1 -1
- package/lib/components/DonutChart/useDonutChartStyles.styles.js +25 -5
- package/lib/components/DonutChart/useDonutChartStyles.styles.js.map +1 -1
- package/lib/components/DonutChart/useDonutChartStyles.styles.raw.js +16 -5
- package/lib/components/DonutChart/useDonutChartStyles.styles.raw.js.map +1 -1
- package/lib/components/FunnelChart/FunnelChart.js +28 -6
- package/lib/components/FunnelChart/FunnelChart.js.map +1 -1
- package/lib/components/FunnelChart/FunnelChart.types.js.map +1 -1
- package/lib/components/FunnelChart/useFunnelChartStyles.styles.js +26 -4
- package/lib/components/FunnelChart/useFunnelChartStyles.styles.js.map +1 -1
- package/lib/components/FunnelChart/useFunnelChartStyles.styles.raw.js +15 -3
- package/lib/components/FunnelChart/useFunnelChartStyles.styles.raw.js.map +1 -1
- package/lib/components/GaugeChart/GaugeChart.js +7 -6
- package/lib/components/GaugeChart/GaugeChart.js.map +1 -1
- package/lib/components/GaugeChart/GaugeChart.types.js.map +1 -1
- package/lib/components/GaugeChart/useGaugeChartStyles.styles.js +31 -19
- package/lib/components/GaugeChart/useGaugeChartStyles.styles.js.map +1 -1
- package/lib/components/GaugeChart/useGaugeChartStyles.styles.raw.js +23 -18
- package/lib/components/GaugeChart/useGaugeChartStyles.styles.raw.js.map +1 -1
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +1 -1
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
- package/lib/components/HeatMapChart/HeatMapChart.js +5 -1
- package/lib/components/HeatMapChart/HeatMapChart.js.map +1 -1
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +58 -6
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -1
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +1 -1
- package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js +18 -3
- package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js.map +1 -1
- package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js +13 -2
- package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js.map +1 -1
- package/lib/components/Legends/OverflowMenu.js +9 -2
- package/lib/components/Legends/OverflowMenu.js.map +1 -1
- package/lib/components/LineChart/LineChart.js +5 -6
- package/lib/components/LineChart/LineChart.js.map +1 -1
- package/lib/components/PolarChart/PolarChart.js +577 -0
- package/lib/components/PolarChart/PolarChart.js.map +1 -0
- package/lib/components/PolarChart/PolarChart.types.js +1 -0
- package/lib/components/PolarChart/PolarChart.types.js.map +1 -0
- package/lib/components/PolarChart/PolarChart.utils.js +174 -0
- package/lib/components/PolarChart/PolarChart.utils.js.map +1 -0
- package/lib/components/PolarChart/index.js +2 -0
- package/lib/components/PolarChart/index.js.map +1 -0
- package/lib/components/PolarChart/usePolarChartStyles.styles.js +72 -0
- package/lib/components/PolarChart/usePolarChartStyles.styles.js.map +1 -0
- package/lib/components/PolarChart/usePolarChartStyles.styles.raw.js +61 -0
- package/lib/components/PolarChart/usePolarChartStyles.styles.raw.js.map +1 -0
- package/lib/components/SankeyChart/SankeyChart.js +14 -4
- package/lib/components/SankeyChart/SankeyChart.js.map +1 -1
- package/lib/components/SankeyChart/SankeyChart.types.js.map +1 -1
- package/lib/components/SankeyChart/useSankeyChartStyles.styles.js +23 -6
- package/lib/components/SankeyChart/useSankeyChartStyles.styles.js.map +1 -1
- package/lib/components/SankeyChart/useSankeyChartStyles.styles.raw.js +15 -5
- package/lib/components/SankeyChart/useSankeyChartStyles.styles.raw.js.map +1 -1
- package/lib/components/ScatterChart/ScatterChart.js +1 -5
- package/lib/components/ScatterChart/ScatterChart.js.map +1 -1
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js +29 -38
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/types/DataPoint.js +1 -1
- package/lib/types/DataPoint.js.map +1 -1
- package/lib/utilities/ChartTitle.js +45 -0
- package/lib/utilities/ChartTitle.js.map +1 -0
- package/lib/utilities/Common.styles.js +73 -1
- package/lib/utilities/Common.styles.js.map +1 -1
- package/lib/utilities/Common.styles.raw.js +70 -0
- package/lib/utilities/Common.styles.raw.js.map +1 -1
- package/lib/utilities/index.js +1 -0
- package/lib/utilities/index.js.map +1 -1
- package/lib/utilities/utilities.js +6 -6
- package/lib/utilities/utilities.js.map +1 -1
- package/lib-commonjs/PolarChart.js +6 -0
- package/lib-commonjs/PolarChart.js.map +1 -0
- package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.js +2 -1
- package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.js.map +1 -1
- package/lib-commonjs/components/ChartTable/ChartTable.js +21 -7
- package/lib-commonjs/components/ChartTable/ChartTable.js.map +1 -1
- package/lib-commonjs/components/ChartTable/ChartTable.types.js.map +1 -1
- package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.js +34 -3
- package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.js.map +1 -1
- package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.raw.js +14 -2
- package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.js +7 -5
- package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.js +58 -4
- package/lib-commonjs/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.raw.js +24 -17
- package/lib-commonjs/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.raw.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/CartesianChart.js +31 -12
- package/lib-commonjs/components/CommonComponents/CartesianChart.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +59 -56
- package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +419 -213
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib-commonjs/components/DonutChart/DonutChart.js +17 -5
- package/lib-commonjs/components/DonutChart/DonutChart.js.map +1 -1
- package/lib-commonjs/components/DonutChart/DonutChart.types.js.map +1 -1
- package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js +31 -4
- package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.raw.js +15 -4
- package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/FunnelChart/FunnelChart.js +27 -5
- package/lib-commonjs/components/FunnelChart/FunnelChart.js.map +1 -1
- package/lib-commonjs/components/FunnelChart/FunnelChart.types.js.map +1 -1
- package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.js +36 -4
- package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.raw.js +15 -3
- package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/GaugeChart/GaugeChart.js +6 -5
- package/lib-commonjs/components/GaugeChart/GaugeChart.js.map +1 -1
- package/lib-commonjs/components/GaugeChart/GaugeChart.types.js.map +1 -1
- package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.js +39 -18
- package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.raw.js +23 -18
- package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +1 -1
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.js +5 -1
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +57 -5
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js +26 -3
- package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js +13 -2
- package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/Legends/OverflowMenu.js +9 -2
- package/lib-commonjs/components/Legends/OverflowMenu.js.map +1 -1
- package/lib-commonjs/components/LineChart/LineChart.js +5 -6
- package/lib-commonjs/components/LineChart/LineChart.js.map +1 -1
- package/lib-commonjs/components/PolarChart/PolarChart.js +587 -0
- package/lib-commonjs/components/PolarChart/PolarChart.js.map +1 -0
- package/lib-commonjs/components/PolarChart/PolarChart.types.js +6 -0
- package/lib-commonjs/components/PolarChart/PolarChart.types.js.map +1 -0
- package/lib-commonjs/components/PolarChart/PolarChart.utils.js +204 -0
- package/lib-commonjs/components/PolarChart/PolarChart.utils.js.map +1 -0
- package/lib-commonjs/components/PolarChart/index.js +7 -0
- package/lib-commonjs/components/PolarChart/index.js.map +1 -0
- package/lib-commonjs/components/PolarChart/usePolarChartStyles.styles.js +107 -0
- package/lib-commonjs/components/PolarChart/usePolarChartStyles.styles.js.map +1 -0
- package/lib-commonjs/components/PolarChart/usePolarChartStyles.styles.raw.js +75 -0
- package/lib-commonjs/components/PolarChart/usePolarChartStyles.styles.raw.js.map +1 -0
- package/lib-commonjs/components/SankeyChart/SankeyChart.js +14 -4
- package/lib-commonjs/components/SankeyChart/SankeyChart.js.map +1 -1
- package/lib-commonjs/components/SankeyChart/SankeyChart.types.js.map +1 -1
- package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js +28 -4
- package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.raw.js +14 -3
- package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/ScatterChart/ScatterChart.js +1 -5
- package/lib-commonjs/components/ScatterChart/ScatterChart.js.map +1 -1
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js +29 -38
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
- package/lib-commonjs/index.js +1 -0
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/types/DataPoint.js +1 -1
- package/lib-commonjs/types/DataPoint.js.map +1 -1
- package/lib-commonjs/utilities/ChartTitle.js +53 -0
- package/lib-commonjs/utilities/ChartTitle.js.map +1 -0
- package/lib-commonjs/utilities/Common.styles.js +69 -0
- package/lib-commonjs/utilities/Common.styles.js.map +1 -1
- package/lib-commonjs/utilities/Common.styles.raw.js +69 -0
- package/lib-commonjs/utilities/Common.styles.raw.js.map +1 -1
- package/lib-commonjs/utilities/index.js +1 -0
- package/lib-commonjs/utilities/index.js.map +1 -1
- package/lib-commonjs/utilities/utilities.js +10 -4
- package/lib-commonjs/utilities/utilities.js.map +1 -1
- package/package.json +10 -16
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/CommonComponents/Annotations/ChartAnnotationLayer.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { mergeClasses } from '@griffel/react';\nimport type { ChartAnnotation } from '../../../types/ChartAnnotation';\nimport type {\n AnnotationPoint,\n ChartAnnotationContext,\n ChartAnnotationLayerProps,\n ConnectorRenderData,\n ResolvedAnnotationPosition,\n} from './ChartAnnotationLayer.types';\nimport {\n applyOpacityToColor,\n DEFAULT_ANNOTATION_BACKGROUND_OPACITY,\n DEFAULT_CONNECTOR_ARROW,\n DEFAULT_CONNECTOR_END_PADDING,\n DEFAULT_CONNECTOR_START_PADDING,\n DEFAULT_CONNECTOR_STROKE_WIDTH,\n getDefaultConnectorStrokeColor,\n useChartAnnotationLayerStyles,\n} from './useChartAnnotationLayer.styles';\nimport { useId } from '@fluentui/react-utilities';\nimport { tokens } from '@fluentui/react-theme';\n\nconst DEFAULT_HORIZONTAL_ALIGN = 'center';\nconst DEFAULT_VERTICAL_ALIGN = 'middle';\nconst DEFAULT_FOREIGN_OBJECT_WIDTH = 180;\nconst DEFAULT_FOREIGN_OBJECT_HEIGHT = 60;\nconst MIN_ARROW_SIZE = 6;\nconst MAX_ARROW_SIZE = 24;\nconst ARROW_SIZE_SCALE = 0.35;\nconst MAX_SIMPLE_MARKUP_DEPTH = 5;\nconst CHAR_CODE_LESS_THAN = '<'.codePointAt(0)!;\nconst CHAR_CODE_GREATER_THAN = '>'.codePointAt(0)!;\ntype SimpleMarkupNode =\n | { type: 'text'; content: string }\n | { type: 'br' }\n | { type: 'element'; tag: 'b' | 'i'; children: SimpleMarkupNode[] };\n\ntype ElementMarkupNode = Extract<SimpleMarkupNode, { type: 'element' }>;\n\ntype StackFrame = {\n node: ElementMarkupNode | null;\n};\n\nconst decodeSimpleMarkupInput = (input: string): string => {\n const namedEntities: Record<string, string> = {\n amp: '&',\n quot: '\"',\n apos: \"'\",\n nbsp: '\\u00a0',\n };\n\n const withBasicEntitiesDecoded = input.replace(/&(#x?[0-9a-f]+|#\\d+|[a-z][\\w-]*);/gi, (match, entity) => {\n const lower = entity.toLowerCase();\n if (lower === 'lt' || lower === 'gt') {\n return `&${lower};`;\n }\n if (lower.startsWith('#')) {\n const isHex = lower[1] === 'x';\n const digits = lower.slice(isHex ? 2 : 1);\n const codePoint = Number.parseInt(digits, isHex ? 16 : 10);\n if (Number.isNaN(codePoint)) {\n return match;\n }\n if (codePoint === CHAR_CODE_LESS_THAN) {\n return '<';\n }\n if (codePoint === CHAR_CODE_GREATER_THAN) {\n return '>';\n }\n return String.fromCodePoint(codePoint);\n }\n return namedEntities[lower] ?? match;\n });\n\n return withBasicEntitiesDecoded.replace(/<([^;]+)>/gi, (match, inner) => {\n const normalized = inner.trim().replace(/\\s+/g, ' ');\n const lower = normalized.toLowerCase();\n\n switch (lower) {\n case 'b':\n return '<b>';\n case '/b':\n return '</b>';\n case 'i':\n return '<i>';\n case '/i':\n return '</i>';\n case 'br':\n case 'br/':\n case 'br /':\n return '<br />';\n default:\n return match;\n }\n });\n};\n\nconst appendTextNode = (nodes: SimpleMarkupNode[], text: string) => {\n if (text.length === 0) {\n return;\n }\n\n const last = nodes[nodes.length - 1];\n if (last && last.type === 'text') {\n last.content += text;\n } else {\n nodes.push({ type: 'text', content: text });\n }\n};\n\nconst serializeSimpleMarkup = (nodes: SimpleMarkupNode[]): string =>\n nodes\n .map(node => {\n if (node.type === 'text') {\n return node.content;\n }\n if (node.type === 'br') {\n return '<br />';\n }\n return `<${node.tag}>${serializeSimpleMarkup(node.children)}</${node.tag}>`;\n })\n .join('');\n\nconst parseSimpleMarkup = (input: string): SimpleMarkupNode[] => {\n if (!input) {\n return [];\n }\n\n const decodedInput = decodeSimpleMarkupInput(input);\n const rootChildren: SimpleMarkupNode[] = [];\n const stack: StackFrame[] = [{ node: null }];\n const currentChildren = () => stack[stack.length - 1].node?.children ?? rootChildren;\n const tagRegex = /<\\/?([a-z]+)\\s*\\/?\\s*>/gi;\n let lastIndex = 0;\n\n let match: RegExpExecArray | null;\n while ((match = tagRegex.exec(decodedInput)) !== null) {\n const [fullMatch, rawTagName] = match;\n const tagName = rawTagName.toLowerCase();\n const isClosing = fullMatch.startsWith('</');\n const isSelfClosing = /\\/\\s*>$/.test(fullMatch);\n\n appendTextNode(currentChildren(), decodedInput.slice(lastIndex, match.index));\n lastIndex = match.index + fullMatch.length;\n\n if (tagName === 'br' && !isClosing) {\n currentChildren().push({ type: 'br' });\n continue;\n }\n\n if ((tagName === 'b' || tagName === 'i') && !isSelfClosing) {\n if (isClosing) {\n const top = stack[stack.length - 1].node;\n if (stack.length > 1 && top?.tag === tagName) {\n stack.pop();\n } else {\n appendTextNode(currentChildren(), fullMatch);\n }\n } else {\n if (stack.length - 1 >= MAX_SIMPLE_MARKUP_DEPTH) {\n appendTextNode(currentChildren(), fullMatch);\n continue;\n }\n const elementNode: ElementMarkupNode = {\n type: 'element',\n tag: tagName as 'b' | 'i',\n children: [],\n };\n currentChildren().push(elementNode);\n stack.push({ node: elementNode });\n }\n continue;\n }\n\n appendTextNode(currentChildren(), fullMatch);\n }\n\n appendTextNode(currentChildren(), decodedInput.slice(lastIndex));\n\n while (stack.length > 1) {\n const unclosed = stack.pop()!;\n const elementNode = unclosed.node;\n if (!elementNode) {\n continue;\n }\n\n const parentChildren = stack[stack.length - 1].node?.children ?? rootChildren;\n const lastChild = parentChildren[parentChildren.length - 1];\n if (lastChild === elementNode) {\n parentChildren.pop();\n } else {\n const nodeIndex = parentChildren.indexOf(elementNode);\n if (nodeIndex !== -1) {\n parentChildren.splice(nodeIndex, 1);\n }\n }\n\n appendTextNode(\n parentChildren,\n `<${elementNode.tag}>${serializeSimpleMarkup(elementNode.children)}</${elementNode.tag}>`,\n );\n }\n\n return rootChildren;\n};\n\nconst simpleMarkupNodesToPlainText = (nodes: SimpleMarkupNode[]): string =>\n nodes\n .map(node => {\n if (node.type === 'text') {\n return node.content;\n }\n if (node.type === 'br') {\n return '\\n';\n }\n return simpleMarkupNodesToPlainText(node.children);\n })\n .join('');\n\nconst renderSimpleMarkupNodeList = (nodes: SimpleMarkupNode[], keyPrefix: string): React.ReactNode[] =>\n nodes.map((node, index) => {\n const key = `${keyPrefix}-${index}`;\n\n if (node.type === 'text') {\n return <React.Fragment key={key}>{node.content}</React.Fragment>;\n }\n\n if (node.type === 'br') {\n return <br key={key} />;\n }\n\n const Tag = node.tag === 'b' ? 'strong' : 'em';\n return React.createElement(Tag, { key }, ...renderSimpleMarkupNodeList(node.children, key));\n });\nconst renderSimpleMarkup = (nodes: SimpleMarkupNode[], keyPrefix: string): React.ReactNode => {\n const rendered = renderSimpleMarkupNodeList(nodes, keyPrefix);\n return rendered.length <= 1 ? rendered[0] ?? null : rendered;\n};\n\nconst normalizeBandOffset = (\n scale: (((value: unknown) => number) & { bandwidth?: () => number }) | undefined,\n value: unknown,\n) => {\n const position = scale?.(value as never);\n if (typeof position !== 'number' || Number.isNaN(position)) {\n return undefined;\n }\n if (scale && typeof scale.bandwidth === 'function') {\n return position + scale.bandwidth() / 2;\n }\n return position;\n};\n\nconst clamp = (value: number, min: number, max: number) => Math.max(min, Math.min(max, value));\n\ntype AxisCoordinateType = 'data' | 'relative' | 'pixel';\n\nconst resolveDataCoordinate = (\n axis: 'x' | 'y',\n value: number | string | Date,\n context: ChartAnnotationContext,\n yAxis: 'primary' | 'secondary' = 'primary',\n): number | undefined => {\n if (axis === 'x') {\n const xScale = context.xScale;\n if (!xScale) {\n return undefined;\n }\n const parsedValue = value instanceof Date ? value.getTime() : value;\n return normalizeBandOffset(xScale, parsedValue);\n }\n\n const yScale = yAxis === 'secondary' ? context.yScaleSecondary : context.yScalePrimary;\n if (!yScale) {\n return undefined;\n }\n const parsedValue = value instanceof Date ? value.getTime() : value;\n return normalizeBandOffset(yScale, parsedValue);\n};\n\nconst resolveAxisCoordinate = (\n axis: 'x' | 'y',\n coordinateType: AxisCoordinateType,\n value: number | string | Date,\n context: ChartAnnotationContext,\n options: { yAxis?: 'primary' | 'secondary' } = {},\n): number | undefined => {\n switch (coordinateType) {\n case 'data':\n return resolveDataCoordinate(axis, value, context, options.yAxis);\n case 'relative':\n if (typeof value !== 'number' || Number.isNaN(value)) {\n return undefined;\n }\n return axis === 'x'\n ? context.plotRect.x + context.plotRect.width * value\n : context.plotRect.y + context.plotRect.height * value;\n case 'pixel':\n if (typeof value !== 'number' || Number.isNaN(value)) {\n return undefined;\n }\n return axis === 'x' ? context.plotRect.x + value : context.plotRect.y + value;\n default:\n return undefined;\n }\n};\n\nconst createMeasurementSignature = (\n annotationContentSignature: string,\n containerStyle: React.CSSProperties,\n contentStyle: React.CSSProperties,\n layoutClassName?: string,\n styleClassName?: string,\n) =>\n JSON.stringify({\n annotationContentSignature,\n containerStyle,\n contentStyle,\n layoutClassName: layoutClassName ?? '',\n styleClassName: styleClassName ?? '',\n });\n\ntype MeasurementEntry = { width: number; height: number; signature: string };\n\ntype CoordinateDescriptor = {\n xType: AxisCoordinateType;\n yType: AxisCoordinateType;\n yAxis?: 'primary' | 'secondary';\n};\n\nconst getCoordinateDescriptor = (coordinates: ChartAnnotation['coordinates']): CoordinateDescriptor | undefined => {\n switch (coordinates.type) {\n case 'data':\n return { xType: 'data', yType: 'data', yAxis: coordinates.yAxis };\n case 'relative':\n return { xType: 'relative', yType: 'relative' };\n case 'pixel':\n return { xType: 'pixel', yType: 'pixel' };\n case 'mixed':\n return {\n xType: coordinates.xCoordinateType,\n yType: coordinates.yCoordinateType,\n yAxis: coordinates.yAxis,\n };\n default:\n return undefined;\n }\n};\n\nconst resolveCoordinates = (\n annotation: ChartAnnotation,\n context: ChartAnnotationContext,\n): ResolvedAnnotationPosition | undefined => {\n const { coordinates, layout } = annotation;\n\n if (!coordinates) {\n return undefined;\n }\n\n const descriptor = getCoordinateDescriptor(coordinates);\n if (!descriptor) {\n return undefined;\n }\n\n const offsetX = layout?.offsetX ?? 0;\n const offsetY = layout?.offsetY ?? 0;\n\n const anchorX = resolveAxisCoordinate('x', descriptor.xType, coordinates.x, context);\n const anchorY = resolveAxisCoordinate('y', descriptor.yType, coordinates.y, context, {\n yAxis: descriptor.yAxis,\n });\n\n if (anchorX === undefined || anchorY === undefined) {\n return undefined;\n }\n\n const anchor: AnnotationPoint = { x: anchorX, y: anchorY };\n\n let left = anchor.x + offsetX;\n let top = anchor.y + offsetY;\n\n if (layout?.clipToBounds) {\n left = clamp(left, context.plotRect.x, context.plotRect.x + context.plotRect.width);\n top = clamp(top, context.plotRect.y, context.plotRect.y + context.plotRect.height);\n }\n\n return {\n anchor,\n point: { x: left, y: top },\n };\n};\n\nexport const ChartAnnotationLayer: React.FC<ChartAnnotationLayerProps> = React.memo(props => {\n const { annotations: annotationsProp, context } = props;\n\n const classes = useChartAnnotationLayerStyles(props);\n const idPrefix = useId('chart-annotation');\n const autoKeyPrefix = useId('chart-annotation-item');\n\n const [measurements, setMeasurements] = React.useState<Record<string, MeasurementEntry>>({});\n\n const resolvedAnnotations = React.useMemo(() => {\n let fallbackIndex = 0;\n return (annotationsProp ?? []).map(annotation => ({\n annotation,\n key: annotation.id ?? `${autoKeyPrefix}-${fallbackIndex++}`,\n }));\n }, [annotationsProp, autoKeyPrefix]);\n\n React.useEffect(() => {\n setMeasurements(prev => {\n if (resolvedAnnotations.length === 0) {\n if (Object.keys(prev).length === 0) {\n return prev;\n }\n return {} as Record<string, MeasurementEntry>;\n }\n\n const next: Record<string, MeasurementEntry> = {};\n resolvedAnnotations.forEach(({ key }) => {\n if (prev[key]) {\n next[key] = prev[key];\n }\n });\n\n if (Object.keys(next).length === Object.keys(prev).length) {\n let identical = true;\n for (const key of Object.keys(next)) {\n if (next[key] !== prev[key]) {\n identical = false;\n break;\n }\n }\n if (identical) {\n return prev;\n }\n }\n\n return next;\n });\n }, [resolvedAnnotations]);\n\n const updateMeasurement = React.useCallback((key: string, width: number, height: number, signature: string) => {\n setMeasurements(prev => {\n const prevEntry = prev[key];\n if (\n prevEntry &&\n prevEntry.signature === signature &&\n Math.abs(prevEntry.width - width) < 0.5 &&\n Math.abs(prevEntry.height - height) < 0.5\n ) {\n return prev;\n }\n\n if (width === 0 && height === 0) {\n return prev;\n }\n\n return {\n ...prev,\n [key]: { width, height, signature },\n };\n });\n }, []);\n\n const annotationForeignObjects: React.ReactNode[] = [];\n const measurementElements: React.ReactNode[] = [];\n const connectors: ConnectorRenderData[] = [];\n\n resolvedAnnotations.forEach(({ annotation, key }) => {\n const resolved = resolveCoordinates(annotation, context);\n if (!resolved) {\n return;\n }\n\n const rawAnnotationText = annotation.text === undefined || annotation.text === null ? '' : String(annotation.text);\n const annotationMarkupNodes = parseSimpleMarkup(rawAnnotationText);\n const annotationMarkupSignature = JSON.stringify(annotationMarkupNodes);\n const annotationPlainText = simpleMarkupNodesToPlainText(annotationMarkupNodes);\n\n const layout = annotation.layout;\n const horizontalAlign = layout?.align ?? DEFAULT_HORIZONTAL_ALIGN;\n const verticalAlign = layout?.verticalAlign ?? DEFAULT_VERTICAL_ALIGN;\n const backgroundOpacity = annotation.style?.opacity ?? DEFAULT_ANNOTATION_BACKGROUND_OPACITY;\n const baseBackgroundColor = annotation.style?.backgroundColor;\n const hasCustomBackground =\n annotation.style?.backgroundColor !== undefined || annotation.style?.opacity !== undefined;\n\n const containerStyle: React.CSSProperties = {\n maxWidth: layout?.maxWidth,\n ...(hasCustomBackground\n ? {\n backgroundColor: applyOpacityToColor(baseBackgroundColor, backgroundOpacity, {\n preserveOriginalOpacity: annotation.style?.opacity === undefined,\n }),\n }\n : {\n backgroundColor: applyOpacityToColor(tokens.colorNeutralBackground1, DEFAULT_ANNOTATION_BACKGROUND_OPACITY),\n }),\n borderColor: annotation.style?.borderColor,\n borderWidth: annotation.style?.borderWidth,\n borderStyle: annotation.style?.borderStyle ?? (annotation.style?.borderColor ? 'solid' : undefined),\n borderRadius: annotation.style?.borderRadius,\n padding: annotation.style?.padding,\n boxShadow: annotation.style?.boxShadow,\n };\n\n const contentStyle: React.CSSProperties = {\n color: annotation.style?.textColor,\n fontSize: annotation.style?.fontSize,\n fontWeight: annotation.style?.fontWeight,\n opacity: 1,\n };\n\n if (typeof annotation.style?.rotation === 'number' && !Number.isNaN(annotation.style.rotation)) {\n containerStyle.transform = `rotate(${annotation.style.rotation}deg)`;\n containerStyle.transformOrigin = '50% 50%';\n }\n\n const measurementSignature = createMeasurementSignature(\n annotationMarkupSignature,\n containerStyle,\n contentStyle,\n layout?.className,\n annotation.style?.className,\n );\n const measurementEntry = measurements[key];\n const isMeasurementValid = measurementEntry?.signature === measurementSignature;\n const measuredSize = isMeasurementValid ? measurementEntry : undefined;\n const width = Math.max(measuredSize?.width ?? layout?.maxWidth ?? DEFAULT_FOREIGN_OBJECT_WIDTH, 1);\n const height = Math.max(measuredSize?.height ?? DEFAULT_FOREIGN_OBJECT_HEIGHT, 1);\n\n const offsetX = horizontalAlign === 'center' ? -width / 2 : horizontalAlign === 'end' ? -width : 0;\n const offsetY = verticalAlign === 'middle' ? -height / 2 : verticalAlign === 'bottom' ? -height : 0;\n\n const baseTopLeftX = resolved.point.x + offsetX;\n const baseTopLeftY = resolved.point.y + offsetY;\n\n const usePlotBounds = layout?.clipToBounds !== false;\n const viewportX = usePlotBounds ? context.plotRect.x : 0;\n const viewportY = usePlotBounds ? context.plotRect.y : 0;\n const viewportWidth = usePlotBounds ? context.plotRect.width : context.svgRect.width ?? 0;\n const viewportHeight = usePlotBounds ? context.plotRect.height : context.svgRect.height ?? 0;\n\n const maxTopLeftX = viewportWidth > 0 ? viewportX + viewportWidth - width : baseTopLeftX;\n const maxTopLeftY = viewportHeight > 0 ? viewportY + viewportHeight - height : baseTopLeftY;\n\n let topLeftX = viewportWidth > 0 ? clamp(baseTopLeftX, viewportX, Math.max(viewportX, maxTopLeftX)) : baseTopLeftX;\n let topLeftY = viewportHeight > 0 ? clamp(baseTopLeftY, viewportY, Math.max(viewportY, maxTopLeftY)) : baseTopLeftY;\n\n let displayPoint = {\n x: topLeftX - offsetX,\n y: topLeftY - offsetY,\n };\n\n if (annotation.connector) {\n const startPadding = annotation.connector.startPadding ?? 12;\n const endPadding = annotation.connector.endPadding ?? 0;\n const minArrowClearance = 6;\n const minDistance = Math.max(startPadding + endPadding + minArrowClearance, startPadding);\n\n const dx = displayPoint.x - resolved.anchor.x;\n const dy = displayPoint.y - resolved.anchor.y;\n const distance = Math.sqrt(dx * dx + dy * dy);\n\n if (distance < minDistance) {\n const fallbackDirection: AnnotationPoint = { x: 0, y: -1 };\n const ux = distance === 0 ? fallbackDirection.x : dx / distance;\n const uy = distance === 0 ? fallbackDirection.y : dy / distance;\n\n const desiredDisplayX = resolved.anchor.x + ux * minDistance;\n const desiredDisplayY = resolved.anchor.y + uy * minDistance;\n\n let desiredTopLeftX = desiredDisplayX + offsetX;\n let desiredTopLeftY = desiredDisplayY + offsetY;\n\n desiredTopLeftX =\n viewportWidth > 0 ? clamp(desiredTopLeftX, viewportX, Math.max(viewportX, maxTopLeftX)) : desiredTopLeftX;\n desiredTopLeftY =\n viewportHeight > 0 ? clamp(desiredTopLeftY, viewportY, Math.max(viewportY, maxTopLeftY)) : desiredTopLeftY;\n\n topLeftX = desiredTopLeftX;\n topLeftY = desiredTopLeftY;\n displayPoint = {\n x: topLeftX - offsetX,\n y: topLeftY - offsetY,\n };\n }\n }\n\n const measurementStyle: React.CSSProperties = {\n position: 'absolute',\n left: topLeftX,\n top: topLeftY,\n pointerEvents: 'none',\n visibility: 'hidden',\n ...containerStyle,\n };\n\n if (!isMeasurementValid) {\n measurementElements.push(\n <div\n key={`${key}-measurement`}\n ref={node => {\n if (node) {\n const rect = node.getBoundingClientRect();\n if (rect.width !== 0 || rect.height !== 0) {\n updateMeasurement(key, rect.width, rect.height, measurementSignature);\n }\n }\n }}\n className={mergeClasses(\n classes.annotation,\n classes.measurement,\n layout?.className,\n annotation.style?.className,\n )}\n style={measurementStyle}\n aria-hidden={true}\n data-annotation-key={key}\n data-chart-annotation-measurement=\"true\"\n >\n <div\n className={mergeClasses(classes.annotationContent, layout?.className, annotation.style?.className)}\n style={contentStyle}\n >\n {renderSimpleMarkup(annotationMarkupNodes, `${key}-measurement`)}\n </div>\n </div>,\n );\n }\n\n annotationForeignObjects.push(\n <foreignObject\n key={`${key}-annotation`}\n x={topLeftX}\n y={topLeftY}\n width={width}\n height={height}\n className={mergeClasses(classes.annotationForeignObject)}\n data-annotation-key={key}\n >\n <div\n className={mergeClasses(classes.annotation, layout?.className, annotation.style?.className)}\n style={containerStyle}\n data-annotation-key={key}\n >\n <div\n className={mergeClasses(classes.annotationContent, annotation.style?.className)}\n style={contentStyle}\n role={annotation.accessibility?.role ?? 'note'}\n aria-label={annotation.accessibility?.ariaLabel ?? (annotationPlainText ? annotationPlainText : undefined)}\n aria-describedby={annotation.accessibility?.ariaDescribedBy}\n data-chart-annotation=\"true\"\n data-annotation-key={key}\n >\n {renderSimpleMarkup(annotationMarkupNodes, `${key}-content`)}\n </div>\n </div>\n </foreignObject>,\n );\n\n if (annotation.connector) {\n const {\n startPadding = DEFAULT_CONNECTOR_START_PADDING,\n endPadding = DEFAULT_CONNECTOR_END_PADDING,\n strokeColor = getDefaultConnectorStrokeColor(),\n strokeWidth = DEFAULT_CONNECTOR_STROKE_WIDTH,\n dashArray,\n arrow = DEFAULT_CONNECTOR_ARROW,\n } = annotation.connector;\n\n const dx = resolved.anchor.x - displayPoint.x;\n const dy = resolved.anchor.y - displayPoint.y;\n const distance = Math.sqrt(dx * dx + dy * dy) || 1;\n const ux = dx / distance;\n const uy = dy / distance;\n\n const sizeBasis = Math.max(1, Math.min(width, height));\n const proportionalSize = sizeBasis * ARROW_SIZE_SCALE;\n const maxByPadding = startPadding > 0 ? startPadding * 1.25 : MAX_ARROW_SIZE;\n const maxByDistance = distance * 0.6;\n const markerSize = clamp(proportionalSize, MIN_ARROW_SIZE, Math.min(MAX_ARROW_SIZE, maxByPadding, maxByDistance));\n const markerStrokeWidth = clamp(strokeWidth, 1, markerSize / 2);\n\n const start: AnnotationPoint = {\n x: displayPoint.x + ux * startPadding,\n y: displayPoint.y + uy * startPadding,\n };\n\n const end: AnnotationPoint = {\n x: resolved.anchor.x - ux * endPadding,\n y: resolved.anchor.y - uy * endPadding,\n };\n\n connectors.push({\n key: `${key}-connector`,\n start,\n end,\n strokeColor,\n strokeWidth,\n dashArray,\n arrow,\n markerSize,\n markerStrokeWidth,\n });\n }\n });\n\n if (annotationForeignObjects.length === 0 && connectors.length === 0) {\n return null;\n }\n\n const viewBoxWidth = context.svgRect.width || 1;\n const viewBoxHeight = context.svgRect.height || 1;\n\n const markerDefs: React.ReactNode[] = [];\n\n const createMarkerId = (color: string, position: 'start' | 'end', size: number, markerStrokeWidth: number) => {\n const id = `${idPrefix}-${position}-${markerDefs.length}`;\n const refY = size / 2;\n const refX = position === 'end' ? size : 0;\n const pathEnd = `M0 0 L ${size} ${refY} L0 ${size} Z`;\n const pathStart = `M ${size} 0 L0 ${refY} L ${size} ${size} Z`;\n const path = position === 'end' ? pathEnd : pathStart;\n\n markerDefs.push(\n <marker\n key={id}\n id={id}\n markerWidth={size}\n markerHeight={size}\n viewBox={`0 0 ${size} ${size}`}\n refX={refX}\n refY={refY}\n orient=\"auto\"\n markerUnits=\"userSpaceOnUse\"\n >\n <path\n d={path}\n fill={color}\n stroke={color}\n strokeWidth={markerStrokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </marker>,\n );\n\n return id;\n };\n\n const connectorElements = connectors.map(connector => {\n let markerStart: string | undefined;\n let markerEnd: string | undefined;\n\n if (connector.arrow === 'start' || connector.arrow === 'both') {\n markerStart = createMarkerId(connector.strokeColor, 'start', connector.markerSize, connector.markerStrokeWidth);\n }\n if (connector.arrow === 'end' || connector.arrow === 'both') {\n markerEnd = createMarkerId(connector.strokeColor, 'end', connector.markerSize, connector.markerStrokeWidth);\n }\n\n return (\n <line\n key={connector.key}\n x1={connector.start.x}\n y1={connector.start.y}\n x2={connector.end.x}\n y2={connector.end.y}\n stroke={connector.strokeColor}\n strokeWidth={connector.strokeWidth}\n strokeDasharray={connector.dashArray}\n strokeLinecap=\"round\"\n markerStart={markerStart ? `url(#${markerStart})` : undefined}\n markerEnd={markerEnd ? `url(#${markerEnd})` : undefined}\n />\n );\n });\n\n const shouldRenderSvg = connectors.length > 0 || annotationForeignObjects.length > 0;\n return (\n <div className={classes.root} role=\"presentation\" data-chart-annotation-layer=\"true\">\n {shouldRenderSvg && (\n <svg\n className={classes.connectorLayer}\n width=\"100%\"\n height=\"100%\"\n viewBox={`0 0 ${viewBoxWidth} ${viewBoxHeight}`}\n preserveAspectRatio=\"none\"\n data-chart-annotation-svg=\"true\"\n >\n {markerDefs.length > 0 && <defs>{markerDefs}</defs>}\n {connectorElements.length > 0 && (\n <g aria-hidden=\"true\" className={classes.connectorGroup}>\n {connectorElements}\n </g>\n )}\n {annotationForeignObjects}\n </svg>\n )}\n {measurementElements}\n </div>\n );\n});\n\nChartAnnotationLayer.displayName = 'ChartAnnotationLayer';\n"],"names":["React","mergeClasses","applyOpacityToColor","DEFAULT_ANNOTATION_BACKGROUND_OPACITY","DEFAULT_CONNECTOR_ARROW","DEFAULT_CONNECTOR_END_PADDING","DEFAULT_CONNECTOR_START_PADDING","DEFAULT_CONNECTOR_STROKE_WIDTH","getDefaultConnectorStrokeColor","useChartAnnotationLayerStyles","useId","tokens","DEFAULT_HORIZONTAL_ALIGN","DEFAULT_VERTICAL_ALIGN","DEFAULT_FOREIGN_OBJECT_WIDTH","DEFAULT_FOREIGN_OBJECT_HEIGHT","MIN_ARROW_SIZE","MAX_ARROW_SIZE","ARROW_SIZE_SCALE","MAX_SIMPLE_MARKUP_DEPTH","CHAR_CODE_LESS_THAN","codePointAt","CHAR_CODE_GREATER_THAN","decodeSimpleMarkupInput","input","namedEntities","amp","quot","apos","nbsp","withBasicEntitiesDecoded","replace","match","entity","lower","toLowerCase","startsWith","isHex","digits","slice","codePoint","Number","parseInt","isNaN","String","fromCodePoint","inner","normalized","trim","appendTextNode","nodes","text","length","last","type","content","push","serializeSimpleMarkup","map","node","tag","children","join","parseSimpleMarkup","decodedInput","rootChildren","stack","currentChildren","tagRegex","lastIndex","exec","fullMatch","rawTagName","tagName","isClosing","isSelfClosing","test","index","top","pop","elementNode","unclosed","parentChildren","lastChild","nodeIndex","indexOf","splice","simpleMarkupNodesToPlainText","renderSimpleMarkupNodeList","keyPrefix","key","Fragment","br","Tag","createElement","renderSimpleMarkup","rendered","normalizeBandOffset","scale","value","position","undefined","bandwidth","clamp","min","max","Math","resolveDataCoordinate","axis","context","yAxis","xScale","parsedValue","Date","getTime","yScale","yScaleSecondary","yScalePrimary","resolveAxisCoordinate","coordinateType","options","plotRect","x","width","y","height","createMeasurementSignature","annotationContentSignature","containerStyle","contentStyle","layoutClassName","styleClassName","JSON","stringify","getCoordinateDescriptor","coordinates","xType","yType","xCoordinateType","yCoordinateType","resolveCoordinates","annotation","layout","descriptor","offsetX","offsetY","anchorX","anchorY","anchor","left","clipToBounds","point","ChartAnnotationLayer","memo","props","annotations","annotationsProp","classes","idPrefix","autoKeyPrefix","measurements","setMeasurements","useState","resolvedAnnotations","useMemo","fallbackIndex","id","useEffect","prev","Object","keys","next","forEach","identical","updateMeasurement","useCallback","signature","prevEntry","abs","annotationForeignObjects","measurementElements","connectors","resolved","rawAnnotationText","annotationMarkupNodes","annotationMarkupSignature","annotationPlainText","horizontalAlign","align","verticalAlign","backgroundOpacity","style","opacity","baseBackgroundColor","backgroundColor","hasCustomBackground","maxWidth","preserveOriginalOpacity","colorNeutralBackground1","borderColor","borderWidth","borderStyle","borderRadius","padding","boxShadow","color","textColor","fontSize","fontWeight","rotation","transform","transformOrigin","measurementSignature","className","measurementEntry","isMeasurementValid","measuredSize","baseTopLeftX","baseTopLeftY","usePlotBounds","viewportX","viewportY","viewportWidth","svgRect","viewportHeight","maxTopLeftX","maxTopLeftY","topLeftX","topLeftY","displayPoint","connector","startPadding","endPadding","minArrowClearance","minDistance","dx","dy","distance","sqrt","fallbackDirection","ux","uy","desiredDisplayX","desiredDisplayY","desiredTopLeftX","desiredTopLeftY","measurementStyle","pointerEvents","visibility","div","ref","rect","getBoundingClientRect","measurement","aria-hidden","data-annotation-key","data-chart-annotation-measurement","annotationContent","foreignObject","annotationForeignObject","role","accessibility","aria-label","ariaLabel","aria-describedby","ariaDescribedBy","data-chart-annotation","strokeColor","strokeWidth","dashArray","arrow","sizeBasis","proportionalSize","maxByPadding","maxByDistance","markerSize","markerStrokeWidth","start","end","viewBoxWidth","viewBoxHeight","markerDefs","createMarkerId","size","refY","refX","pathEnd","pathStart","path","marker","markerWidth","markerHeight","viewBox","orient","markerUnits","d","fill","stroke","strokeLinecap","strokeLinejoin","connectorElements","markerStart","markerEnd","line","x1","y1","x2","y2","strokeDasharray","shouldRenderSvg","root","data-chart-annotation-layer","svg","connectorLayer","preserveAspectRatio","data-chart-annotation-svg","defs","g","connectorGroup","displayName"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,YAAY,QAAQ,iBAAiB;AAS9C,SACEC,mBAAmB,EACnBC,qCAAqC,EACrCC,uBAAuB,EACvBC,6BAA6B,EAC7BC,+BAA+B,EAC/BC,8BAA8B,EAC9BC,8BAA8B,EAC9BC,6BAA6B,QACxB,mCAAmC;AAC1C,SAASC,KAAK,QAAQ,4BAA4B;AAClD,SAASC,MAAM,QAAQ,wBAAwB;AAE/C,MAAMC,2BAA2B;AACjC,MAAMC,yBAAyB;AAC/B,MAAMC,+BAA+B;AACrC,MAAMC,gCAAgC;AACtC,MAAMC,iBAAiB;AACvB,MAAMC,iBAAiB;AACvB,MAAMC,mBAAmB;AACzB,MAAMC,0BAA0B;AAChC,MAAMC,sBAAsB,IAAIC,WAAW,CAAC;AAC5C,MAAMC,yBAAyB,IAAID,WAAW,CAAC;AAY/C,MAAME,0BAA0B,CAACC;IAC/B,MAAMC,gBAAwC;QAC5CC,KAAK;QACL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AC1J,CAAC;YACnB6K,QAAQnE,UAAUqC,WAAW;YAC7BC,aAAatC,UAAUsC,WAAW;YAClCwC,iBAAiB9E,UAAUuC,SAAS;YACpC6B,eAAc;YACdG,aAAaA,cAAc,CAAC,KAAK,EAAEA,YAAY,CAAC,CAAC,GAAGxM;YACpDyM,WAAWA,YAAY,CAAC,KAAK,EAAEA,UAAU,CAAC,CAAC,GAAGzM;;IAGpD;IAEA,MAAMgN,kBAAkBhI,WAAWjI,MAAM,GAAG,KAAK+H,yBAAyB/H,MAAM,GAAG;IACnF,qBACE,oBAACqM;QAAIpC,WAAWxD,QAAQyJ,IAAI;QAAElD,MAAK;QAAemD,+BAA4B;OAC3EF,iCACC,oBAACG;QACCnG,WAAWxD,QAAQ4J,cAAc;QACjC9L,OAAM;QACNE,QAAO;QACPuK,SAAS,CAAC,IAAI,EAAEb,aAAa,CAAC,EAAEC,eAAe;QAC/CkC,qBAAoB;QACpBC,6BAA0B;OAEzBlC,WAAWrO,MAAM,GAAG,mBAAK,oBAACwQ,cAAMnC,aAChCmB,kBAAkBxP,MAAM,GAAG,mBAC1B,oBAACyQ;QAAE/D,eAAY;QAAOzC,WAAWxD,QAAQiK,cAAc;OACpDlB,oBAGJzH,2BAGJC;AAGP,GAAG;AAEH5B,qBAAqBuK,WAAW,GAAG"}
|
|
1
|
+
{"version":3,"sources":["../src/components/CommonComponents/Annotations/ChartAnnotationLayer.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { mergeClasses } from '@griffel/react';\nimport type { ChartAnnotation } from '../../../types/ChartAnnotation';\nimport type {\n AnnotationPoint,\n ChartAnnotationContext,\n ChartAnnotationLayerProps,\n ConnectorRenderData,\n ResolvedAnnotationPosition,\n} from './ChartAnnotationLayer.types';\nimport {\n applyOpacityToColor,\n DEFAULT_ANNOTATION_BACKGROUND_OPACITY,\n DEFAULT_CONNECTOR_ARROW,\n DEFAULT_CONNECTOR_END_PADDING,\n DEFAULT_CONNECTOR_START_PADDING,\n DEFAULT_CONNECTOR_STROKE_WIDTH,\n getDefaultConnectorStrokeColor,\n useChartAnnotationLayerStyles,\n} from './useChartAnnotationLayer.styles';\nimport { useId } from '@fluentui/react-utilities';\nimport { tokens } from '@fluentui/react-theme';\n\nconst DEFAULT_HORIZONTAL_ALIGN = 'center';\nconst DEFAULT_VERTICAL_ALIGN = 'middle';\nconst DEFAULT_FOREIGN_OBJECT_WIDTH = 180;\nconst DEFAULT_FOREIGN_OBJECT_HEIGHT = 60;\nconst MIN_ARROW_SIZE = 6;\nconst MAX_ARROW_SIZE = 24;\nconst ARROW_SIZE_SCALE = 0.35;\nconst MAX_SIMPLE_MARKUP_DEPTH = 5;\nconst CHAR_CODE_LESS_THAN = '<'.codePointAt(0)!;\nconst CHAR_CODE_GREATER_THAN = '>'.codePointAt(0)!;\ntype SimpleMarkupNode =\n | { type: 'text'; content: string }\n | { type: 'br' }\n | { type: 'element'; tag: 'b' | 'i'; children: SimpleMarkupNode[] };\n\ntype ElementMarkupNode = Extract<SimpleMarkupNode, { type: 'element' }>;\n\ntype StackFrame = {\n node: ElementMarkupNode | null;\n};\n\nconst decodeSimpleMarkupInput = (input: string): string => {\n const namedEntities: Record<string, string> = {\n amp: '&',\n quot: '\"',\n apos: \"'\",\n nbsp: '\\u00a0',\n };\n\n const withBasicEntitiesDecoded = input.replace(/&(#x?[0-9a-f]+|#\\d+|[a-z][\\w-]*);/gi, (match, entity) => {\n const lower = entity.toLowerCase();\n if (lower === 'lt' || lower === 'gt') {\n return `&${lower};`;\n }\n if (lower.startsWith('#')) {\n const isHex = lower[1] === 'x';\n const digits = lower.slice(isHex ? 2 : 1);\n const codePoint = Number.parseInt(digits, isHex ? 16 : 10);\n if (Number.isNaN(codePoint)) {\n return match;\n }\n if (codePoint === CHAR_CODE_LESS_THAN) {\n return '<';\n }\n if (codePoint === CHAR_CODE_GREATER_THAN) {\n return '>';\n }\n return String.fromCodePoint(codePoint);\n }\n return namedEntities[lower] ?? match;\n });\n\n return withBasicEntitiesDecoded.replace(/<([^;]+)>/gi, (match, inner) => {\n const normalized = inner.trim().replace(/\\s+/g, ' ');\n const lower = normalized.toLowerCase();\n\n switch (lower) {\n case 'b':\n return '<b>';\n case '/b':\n return '</b>';\n case 'i':\n return '<i>';\n case '/i':\n return '</i>';\n case 'br':\n case 'br/':\n case 'br /':\n return '<br />';\n default:\n return match;\n }\n });\n};\n\nconst appendTextNode = (nodes: SimpleMarkupNode[], text: string) => {\n if (text.length === 0) {\n return;\n }\n\n const last = nodes[nodes.length - 1];\n if (last && last.type === 'text') {\n last.content += text;\n } else {\n nodes.push({ type: 'text', content: text });\n }\n};\n\nconst serializeSimpleMarkup = (nodes: SimpleMarkupNode[]): string =>\n nodes\n .map(node => {\n if (node.type === 'text') {\n return node.content;\n }\n if (node.type === 'br') {\n return '<br />';\n }\n return `<${node.tag}>${serializeSimpleMarkup(node.children)}</${node.tag}>`;\n })\n .join('');\n\nconst parseSimpleMarkup = (input: string): SimpleMarkupNode[] => {\n if (!input) {\n return [];\n }\n\n const decodedInput = decodeSimpleMarkupInput(input);\n const rootChildren: SimpleMarkupNode[] = [];\n const stack: StackFrame[] = [{ node: null }];\n const currentChildren = () => stack[stack.length - 1].node?.children ?? rootChildren;\n const tagRegex = /<\\/?([a-z]+)\\s*\\/?\\s*>/gi;\n let lastIndex = 0;\n\n let match: RegExpExecArray | null;\n while ((match = tagRegex.exec(decodedInput)) !== null) {\n const [fullMatch, rawTagName] = match;\n const tagName = rawTagName.toLowerCase();\n const isClosing = fullMatch.startsWith('</');\n const isSelfClosing = /\\/\\s*>$/.test(fullMatch);\n\n appendTextNode(currentChildren(), decodedInput.slice(lastIndex, match.index));\n lastIndex = match.index + fullMatch.length;\n\n if (tagName === 'br' && !isClosing) {\n currentChildren().push({ type: 'br' });\n continue;\n }\n\n if ((tagName === 'b' || tagName === 'i') && !isSelfClosing) {\n if (isClosing) {\n const top = stack[stack.length - 1].node;\n if (stack.length > 1 && top?.tag === tagName) {\n stack.pop();\n } else {\n appendTextNode(currentChildren(), fullMatch);\n }\n } else {\n if (stack.length - 1 >= MAX_SIMPLE_MARKUP_DEPTH) {\n appendTextNode(currentChildren(), fullMatch);\n continue;\n }\n const elementNode: ElementMarkupNode = {\n type: 'element',\n tag: tagName as 'b' | 'i',\n children: [],\n };\n currentChildren().push(elementNode);\n stack.push({ node: elementNode });\n }\n continue;\n }\n\n appendTextNode(currentChildren(), fullMatch);\n }\n\n appendTextNode(currentChildren(), decodedInput.slice(lastIndex));\n\n while (stack.length > 1) {\n const unclosed = stack.pop()!;\n const elementNode = unclosed.node;\n if (!elementNode) {\n continue;\n }\n\n const parentChildren = stack[stack.length - 1].node?.children ?? rootChildren;\n const lastChild = parentChildren[parentChildren.length - 1];\n if (lastChild === elementNode) {\n parentChildren.pop();\n } else {\n const nodeIndex = parentChildren.indexOf(elementNode);\n if (nodeIndex !== -1) {\n parentChildren.splice(nodeIndex, 1);\n }\n }\n\n appendTextNode(\n parentChildren,\n `<${elementNode.tag}>${serializeSimpleMarkup(elementNode.children)}</${elementNode.tag}>`,\n );\n }\n\n return rootChildren;\n};\n\nconst simpleMarkupNodesToPlainText = (nodes: SimpleMarkupNode[]): string =>\n nodes\n .map(node => {\n if (node.type === 'text') {\n return node.content;\n }\n if (node.type === 'br') {\n return '\\n';\n }\n return simpleMarkupNodesToPlainText(node.children);\n })\n .join('');\n\nconst renderSimpleMarkupNodeList = (nodes: SimpleMarkupNode[], keyPrefix: string): React.ReactNode[] =>\n nodes.map((node, index) => {\n const key = `${keyPrefix}-${index}`;\n\n if (node.type === 'text') {\n return <React.Fragment key={key}>{node.content}</React.Fragment>;\n }\n\n if (node.type === 'br') {\n return <br key={key} />;\n }\n\n const Tag = node.tag === 'b' ? 'strong' : 'em';\n return React.createElement(Tag, { key }, ...renderSimpleMarkupNodeList(node.children, key));\n });\nconst renderSimpleMarkup = (nodes: SimpleMarkupNode[], keyPrefix: string): React.ReactNode => {\n const rendered = renderSimpleMarkupNodeList(nodes, keyPrefix);\n return rendered.length <= 1 ? rendered[0] ?? null : rendered;\n};\n\nconst normalizeBandOffset = (\n scale: (((value: unknown) => number) & { bandwidth?: () => number }) | undefined,\n value: unknown,\n) => {\n const position = scale?.(value as never);\n if (typeof position !== 'number' || Number.isNaN(position)) {\n return undefined;\n }\n if (scale && typeof scale.bandwidth === 'function') {\n return position + scale.bandwidth() / 2;\n }\n return position;\n};\n\nconst clamp = (value: number, min: number, max: number) => Math.max(min, Math.min(max, value));\n\ntype AxisCoordinateType = 'data' | 'relative' | 'pixel';\n\nconst resolveDataCoordinate = (\n axis: 'x' | 'y',\n value: number | string | Date,\n context: ChartAnnotationContext,\n yAxis: 'primary' | 'secondary' = 'primary',\n): number | undefined => {\n if (axis === 'x') {\n const xScale = context.xScale;\n if (!xScale) {\n return undefined;\n }\n const parsedValue = value instanceof Date ? value.getTime() : value;\n return normalizeBandOffset(xScale, parsedValue);\n }\n\n const yScale = yAxis === 'secondary' ? context.yScaleSecondary : context.yScalePrimary;\n if (!yScale) {\n return undefined;\n }\n const parsedValue = value instanceof Date ? value.getTime() : value;\n return normalizeBandOffset(yScale, parsedValue);\n};\n\nconst resolveAxisCoordinate = (\n axis: 'x' | 'y',\n coordinateType: AxisCoordinateType,\n value: number | string | Date,\n context: ChartAnnotationContext,\n options: { yAxis?: 'primary' | 'secondary' } = {},\n): number | undefined => {\n switch (coordinateType) {\n case 'data':\n return resolveDataCoordinate(axis, value, context, options.yAxis);\n case 'relative':\n if (typeof value !== 'number' || Number.isNaN(value)) {\n return undefined;\n }\n return axis === 'x'\n ? context.plotRect.x + context.plotRect.width * value\n : context.plotRect.y + context.plotRect.height * value;\n case 'pixel':\n if (typeof value !== 'number' || Number.isNaN(value)) {\n return undefined;\n }\n return axis === 'x' ? context.plotRect.x + value : context.plotRect.y + value;\n default:\n return undefined;\n }\n};\n\nconst createMeasurementSignature = (\n annotationContentSignature: string,\n containerStyle: React.CSSProperties,\n contentStyle: React.CSSProperties,\n layoutClassName?: string,\n styleClassName?: string,\n) =>\n JSON.stringify({\n annotationContentSignature,\n containerStyle,\n contentStyle,\n layoutClassName: layoutClassName ?? '',\n styleClassName: styleClassName ?? '',\n });\n\ntype MeasurementEntry = { width: number; height: number; signature: string };\n\ntype CoordinateDescriptor = {\n xType: AxisCoordinateType;\n yType: AxisCoordinateType;\n yAxis?: 'primary' | 'secondary';\n};\n\nconst getCoordinateDescriptor = (coordinates: ChartAnnotation['coordinates']): CoordinateDescriptor | undefined => {\n switch (coordinates.type) {\n case 'data':\n return { xType: 'data', yType: 'data', yAxis: coordinates.yAxis };\n case 'relative':\n return { xType: 'relative', yType: 'relative' };\n case 'pixel':\n return { xType: 'pixel', yType: 'pixel' };\n case 'mixed':\n return {\n xType: coordinates.xCoordinateType,\n yType: coordinates.yCoordinateType,\n yAxis: coordinates.yAxis,\n };\n default:\n return undefined;\n }\n};\n\nconst resolveCoordinates = (\n annotation: ChartAnnotation,\n context: ChartAnnotationContext,\n): ResolvedAnnotationPosition | undefined => {\n const { coordinates, layout } = annotation;\n\n if (!coordinates) {\n return undefined;\n }\n\n const descriptor = getCoordinateDescriptor(coordinates);\n if (!descriptor) {\n return undefined;\n }\n\n const offsetX = layout?.offsetX ?? 0;\n const offsetY = layout?.offsetY ?? 0;\n\n const anchorX = resolveAxisCoordinate('x', descriptor.xType, coordinates.x, context);\n const anchorY = resolveAxisCoordinate('y', descriptor.yType, coordinates.y, context, {\n yAxis: descriptor.yAxis,\n });\n\n if (anchorX === undefined || anchorY === undefined) {\n return undefined;\n }\n\n const anchor: AnnotationPoint = { x: anchorX, y: anchorY };\n\n let left = anchor.x + offsetX;\n let top = anchor.y + offsetY;\n\n if (layout?.clipToBounds) {\n left = clamp(left, context.plotRect.x, context.plotRect.x + context.plotRect.width);\n top = clamp(top, context.plotRect.y, context.plotRect.y + context.plotRect.height);\n }\n\n return {\n anchor,\n point: { x: left, y: top },\n };\n};\n\nexport const ChartAnnotationLayer: React.FC<ChartAnnotationLayerProps> = React.memo(props => {\n const { annotations: annotationsProp, context, hideDefaultStyles } = props;\n\n const classes = useChartAnnotationLayerStyles(props);\n const idPrefix = useId('chart-annotation');\n const autoKeyPrefix = useId('chart-annotation-item');\n\n const [measurements, setMeasurements] = React.useState<Record<string, MeasurementEntry>>({});\n\n const resolvedAnnotations = React.useMemo(() => {\n let fallbackIndex = 0;\n return (annotationsProp ?? []).map(annotation => ({\n annotation,\n key: annotation.id ?? `${autoKeyPrefix}-${fallbackIndex++}`,\n }));\n }, [annotationsProp, autoKeyPrefix]);\n\n React.useEffect(() => {\n setMeasurements(prev => {\n if (resolvedAnnotations.length === 0) {\n if (Object.keys(prev).length === 0) {\n return prev;\n }\n return {} as Record<string, MeasurementEntry>;\n }\n\n const next: Record<string, MeasurementEntry> = {};\n resolvedAnnotations.forEach(({ key }) => {\n if (prev[key]) {\n next[key] = prev[key];\n }\n });\n\n if (Object.keys(next).length === Object.keys(prev).length) {\n let identical = true;\n for (const key of Object.keys(next)) {\n if (next[key] !== prev[key]) {\n identical = false;\n break;\n }\n }\n if (identical) {\n return prev;\n }\n }\n\n return next;\n });\n }, [resolvedAnnotations]);\n\n const updateMeasurement = React.useCallback((key: string, width: number, height: number, signature: string) => {\n setMeasurements(prev => {\n const prevEntry = prev[key];\n if (\n prevEntry &&\n prevEntry.signature === signature &&\n Math.abs(prevEntry.width - width) < 0.5 &&\n Math.abs(prevEntry.height - height) < 0.5\n ) {\n return prev;\n }\n\n if (width === 0 && height === 0) {\n return prev;\n }\n\n return {\n ...prev,\n [key]: { width, height, signature },\n };\n });\n }, []);\n\n const annotationForeignObjects: React.ReactNode[] = [];\n const measurementElements: React.ReactNode[] = [];\n const connectors: ConnectorRenderData[] = [];\n\n resolvedAnnotations.forEach(({ annotation, key }) => {\n const resolved = resolveCoordinates(annotation, context);\n if (!resolved) {\n return;\n }\n\n const rawAnnotationText = annotation.text === undefined || annotation.text === null ? '' : String(annotation.text);\n const annotationMarkupNodes = parseSimpleMarkup(rawAnnotationText);\n const annotationMarkupSignature = JSON.stringify(annotationMarkupNodes);\n const annotationPlainText = simpleMarkupNodesToPlainText(annotationMarkupNodes);\n\n const layout = annotation.layout;\n const horizontalAlign = layout?.align ?? DEFAULT_HORIZONTAL_ALIGN;\n const verticalAlign = layout?.verticalAlign ?? DEFAULT_VERTICAL_ALIGN;\n const backgroundOpacity = annotation.style?.opacity ?? DEFAULT_ANNOTATION_BACKGROUND_OPACITY;\n const baseBackgroundColor = annotation.style?.backgroundColor;\n const hasCustomBackground =\n annotation.style?.backgroundColor !== undefined || annotation.style?.opacity !== undefined;\n\n const containerStyle: React.CSSProperties = {\n maxWidth: layout?.maxWidth,\n ...(hasCustomBackground\n ? {\n backgroundColor: applyOpacityToColor(baseBackgroundColor, backgroundOpacity, {\n preserveOriginalOpacity: annotation.style?.opacity === undefined,\n }),\n }\n : hideDefaultStyles\n ? {}\n : {\n backgroundColor: applyOpacityToColor(tokens.colorNeutralBackground1, DEFAULT_ANNOTATION_BACKGROUND_OPACITY),\n }),\n borderColor: annotation.style?.borderColor,\n borderWidth: annotation.style?.borderWidth,\n borderStyle: annotation.style?.borderStyle ?? (annotation.style?.borderColor ? 'solid' : undefined),\n borderRadius: annotation.style?.borderRadius,\n padding: annotation.style?.padding,\n boxShadow: annotation.style?.boxShadow,\n };\n\n const contentStyle: React.CSSProperties = {\n color: annotation.style?.textColor,\n fontSize: annotation.style?.fontSize,\n fontWeight: annotation.style?.fontWeight,\n opacity: 1,\n };\n\n if (typeof annotation.style?.rotation === 'number' && !Number.isNaN(annotation.style.rotation)) {\n containerStyle.transform = `rotate(${annotation.style.rotation}deg)`;\n containerStyle.transformOrigin = '50% 50%';\n }\n\n const measurementSignature = createMeasurementSignature(\n annotationMarkupSignature,\n containerStyle,\n contentStyle,\n layout?.className,\n annotation.style?.className,\n );\n const measurementEntry = measurements[key];\n const isMeasurementValid = measurementEntry?.signature === measurementSignature;\n const measuredSize = isMeasurementValid ? measurementEntry : undefined;\n const width = Math.max(measuredSize?.width ?? layout?.maxWidth ?? DEFAULT_FOREIGN_OBJECT_WIDTH, 1);\n const height = Math.max(measuredSize?.height ?? DEFAULT_FOREIGN_OBJECT_HEIGHT, 1);\n\n const offsetX = horizontalAlign === 'center' ? -width / 2 : horizontalAlign === 'end' ? -width : 0;\n const offsetY = verticalAlign === 'middle' ? -height / 2 : verticalAlign === 'bottom' ? -height : 0;\n\n const baseTopLeftX = resolved.point.x + offsetX;\n const baseTopLeftY = resolved.point.y + offsetY;\n\n const usePlotBounds = layout?.clipToBounds !== false;\n const viewportX = usePlotBounds ? context.plotRect.x : 0;\n const viewportY = usePlotBounds ? context.plotRect.y : 0;\n const viewportWidth = usePlotBounds ? context.plotRect.width : context.svgRect.width ?? 0;\n const viewportHeight = usePlotBounds ? context.plotRect.height : context.svgRect.height ?? 0;\n\n const maxTopLeftX = viewportWidth > 0 ? viewportX + viewportWidth - width : baseTopLeftX;\n const maxTopLeftY = viewportHeight > 0 ? viewportY + viewportHeight - height : baseTopLeftY;\n\n let topLeftX = viewportWidth > 0 ? clamp(baseTopLeftX, viewportX, Math.max(viewportX, maxTopLeftX)) : baseTopLeftX;\n let topLeftY = viewportHeight > 0 ? clamp(baseTopLeftY, viewportY, Math.max(viewportY, maxTopLeftY)) : baseTopLeftY;\n\n let displayPoint = {\n x: topLeftX - offsetX,\n y: topLeftY - offsetY,\n };\n\n if (annotation.connector) {\n const startPadding = annotation.connector.startPadding ?? 12;\n const endPadding = annotation.connector.endPadding ?? 0;\n const minArrowClearance = 6;\n const minDistance = Math.max(startPadding + endPadding + minArrowClearance, startPadding);\n\n const dx = displayPoint.x - resolved.anchor.x;\n const dy = displayPoint.y - resolved.anchor.y;\n const distance = Math.sqrt(dx * dx + dy * dy);\n\n if (distance < minDistance) {\n const fallbackDirection: AnnotationPoint = { x: 0, y: -1 };\n const ux = distance === 0 ? fallbackDirection.x : dx / distance;\n const uy = distance === 0 ? fallbackDirection.y : dy / distance;\n\n const desiredDisplayX = resolved.anchor.x + ux * minDistance;\n const desiredDisplayY = resolved.anchor.y + uy * minDistance;\n\n let desiredTopLeftX = desiredDisplayX + offsetX;\n let desiredTopLeftY = desiredDisplayY + offsetY;\n\n desiredTopLeftX =\n viewportWidth > 0 ? clamp(desiredTopLeftX, viewportX, Math.max(viewportX, maxTopLeftX)) : desiredTopLeftX;\n desiredTopLeftY =\n viewportHeight > 0 ? clamp(desiredTopLeftY, viewportY, Math.max(viewportY, maxTopLeftY)) : desiredTopLeftY;\n\n topLeftX = desiredTopLeftX;\n topLeftY = desiredTopLeftY;\n displayPoint = {\n x: topLeftX - offsetX,\n y: topLeftY - offsetY,\n };\n }\n }\n\n const measurementStyle: React.CSSProperties = {\n position: 'absolute',\n left: topLeftX,\n top: topLeftY,\n pointerEvents: 'none',\n visibility: 'hidden',\n ...containerStyle,\n };\n\n const annotationClass = hideDefaultStyles ? classes.annotationNoDefaults : classes.annotation;\n\n if (!isMeasurementValid) {\n measurementElements.push(\n <div\n key={`${key}-measurement`}\n ref={node => {\n if (node) {\n const rect = node.getBoundingClientRect();\n if (rect.width !== 0 || rect.height !== 0) {\n updateMeasurement(key, rect.width, rect.height, measurementSignature);\n }\n }\n }}\n className={mergeClasses(annotationClass, classes.measurement, layout?.className, annotation.style?.className)}\n style={measurementStyle}\n aria-hidden={true}\n data-annotation-key={key}\n data-chart-annotation-measurement=\"true\"\n >\n <div\n className={mergeClasses(classes.annotationContent, layout?.className, annotation.style?.className)}\n style={contentStyle}\n >\n {renderSimpleMarkup(annotationMarkupNodes, `${key}-measurement`)}\n </div>\n </div>,\n );\n }\n\n annotationForeignObjects.push(\n <foreignObject\n key={`${key}-annotation`}\n x={topLeftX}\n y={topLeftY}\n width={width}\n height={height}\n className={mergeClasses(classes.annotationForeignObject)}\n data-annotation-key={key}\n >\n <div\n className={mergeClasses(annotationClass, layout?.className, annotation.style?.className)}\n style={containerStyle}\n data-annotation-key={key}\n >\n <div\n className={mergeClasses(\n classes.annotationContent,\n classes.annotationContentInteractive,\n annotation.style?.className,\n )}\n style={contentStyle}\n role={annotation.accessibility?.role ?? 'note'}\n aria-label={annotation.accessibility?.ariaLabel ?? (annotationPlainText ? annotationPlainText : undefined)}\n aria-describedby={annotation.accessibility?.ariaDescribedBy}\n tabIndex={0}\n data-chart-annotation=\"true\"\n data-annotation-key={key}\n >\n {renderSimpleMarkup(annotationMarkupNodes, `${key}-content`)}\n </div>\n </div>\n </foreignObject>,\n );\n\n if (annotation.connector) {\n const {\n startPadding = DEFAULT_CONNECTOR_START_PADDING,\n endPadding = DEFAULT_CONNECTOR_END_PADDING,\n strokeColor = getDefaultConnectorStrokeColor(),\n strokeWidth = DEFAULT_CONNECTOR_STROKE_WIDTH,\n dashArray,\n arrow = DEFAULT_CONNECTOR_ARROW,\n } = annotation.connector;\n\n const dx = resolved.anchor.x - displayPoint.x;\n const dy = resolved.anchor.y - displayPoint.y;\n const distance = Math.sqrt(dx * dx + dy * dy) || 1;\n const ux = dx / distance;\n const uy = dy / distance;\n\n const sizeBasis = Math.max(1, Math.min(width, height));\n const proportionalSize = sizeBasis * ARROW_SIZE_SCALE;\n const maxByPadding = startPadding > 0 ? startPadding * 1.25 : MAX_ARROW_SIZE;\n const maxByDistance = distance * 0.6;\n const markerSize = clamp(proportionalSize, MIN_ARROW_SIZE, Math.min(MAX_ARROW_SIZE, maxByPadding, maxByDistance));\n const markerStrokeWidth = clamp(strokeWidth, 1, markerSize / 2);\n\n const start: AnnotationPoint = {\n x: displayPoint.x + ux * startPadding,\n y: displayPoint.y + uy * startPadding,\n };\n\n const end: AnnotationPoint = {\n x: resolved.anchor.x - ux * endPadding,\n y: resolved.anchor.y - uy * endPadding,\n };\n\n connectors.push({\n key: `${key}-connector`,\n start,\n end,\n strokeColor,\n strokeWidth,\n dashArray,\n arrow,\n markerSize,\n markerStrokeWidth,\n });\n }\n });\n\n if (annotationForeignObjects.length === 0 && connectors.length === 0) {\n return null;\n }\n\n const viewBoxWidth = context.svgRect.width || 1;\n const viewBoxHeight = context.svgRect.height || 1;\n\n const markerDefs: React.ReactNode[] = [];\n\n const createMarkerId = (color: string, position: 'start' | 'end', size: number, markerStrokeWidth: number) => {\n const id = `${idPrefix}-${position}-${markerDefs.length}`;\n const refY = size / 2;\n const refX = position === 'end' ? size : 0;\n const pathEnd = `M0 0 L ${size} ${refY} L0 ${size} Z`;\n const pathStart = `M ${size} 0 L0 ${refY} L ${size} ${size} Z`;\n const path = position === 'end' ? pathEnd : pathStart;\n\n markerDefs.push(\n <marker\n key={id}\n id={id}\n markerWidth={size}\n markerHeight={size}\n viewBox={`0 0 ${size} ${size}`}\n refX={refX}\n refY={refY}\n orient=\"auto\"\n markerUnits=\"userSpaceOnUse\"\n >\n <path\n d={path}\n fill={color}\n stroke={color}\n strokeWidth={markerStrokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </marker>,\n );\n\n return id;\n };\n\n const connectorElements = connectors.map(connector => {\n let markerStart: string | undefined;\n let markerEnd: string | undefined;\n\n if (connector.arrow === 'start' || connector.arrow === 'both') {\n markerStart = createMarkerId(connector.strokeColor, 'start', connector.markerSize, connector.markerStrokeWidth);\n }\n if (connector.arrow === 'end' || connector.arrow === 'both') {\n markerEnd = createMarkerId(connector.strokeColor, 'end', connector.markerSize, connector.markerStrokeWidth);\n }\n\n return (\n <line\n key={connector.key}\n x1={connector.start.x}\n y1={connector.start.y}\n x2={connector.end.x}\n y2={connector.end.y}\n stroke={connector.strokeColor}\n strokeWidth={connector.strokeWidth}\n strokeDasharray={connector.dashArray}\n strokeLinecap=\"round\"\n markerStart={markerStart ? `url(#${markerStart})` : undefined}\n markerEnd={markerEnd ? `url(#${markerEnd})` : undefined}\n />\n );\n });\n\n const shouldRenderSvg = connectors.length > 0 || annotationForeignObjects.length > 0;\n return (\n <div className={classes.root} role=\"presentation\" data-chart-annotation-layer=\"true\">\n {shouldRenderSvg && (\n <svg\n className={classes.connectorLayer}\n width=\"100%\"\n height=\"100%\"\n viewBox={`0 0 ${viewBoxWidth} ${viewBoxHeight}`}\n preserveAspectRatio=\"none\"\n data-chart-annotation-svg=\"true\"\n >\n {markerDefs.length > 0 && <defs>{markerDefs}</defs>}\n {connectorElements.length > 0 && (\n <g aria-hidden=\"true\" className={classes.connectorGroup}>\n {connectorElements}\n </g>\n )}\n {annotationForeignObjects}\n </svg>\n )}\n {measurementElements}\n </div>\n );\n});\n\nChartAnnotationLayer.displayName = 'ChartAnnotationLayer';\n"],"names":["React","mergeClasses","applyOpacityToColor","DEFAULT_ANNOTATION_BACKGROUND_OPACITY","DEFAULT_CONNECTOR_ARROW","DEFAULT_CONNECTOR_END_PADDING","DEFAULT_CONNECTOR_START_PADDING","DEFAULT_CONNECTOR_STROKE_WIDTH","getDefaultConnectorStrokeColor","useChartAnnotationLayerStyles","useId","tokens","DEFAULT_HORIZONTAL_ALIGN","DEFAULT_VERTICAL_ALIGN","DEFAULT_FOREIGN_OBJECT_WIDTH","DEFAULT_FOREIGN_OBJECT_HEIGHT","MIN_ARROW_SIZE","MAX_ARROW_SIZE","ARROW_SIZE_SCALE","MAX_SIMPLE_MARKUP_DEPTH","CHAR_CODE_LESS_THAN","codePointAt","CHAR_CODE_GREATER_THAN","decodeSimpleMarkupInput","input","namedEntities","amp","quot","apos","nbsp","withBasicEntitiesDecoded","replace","match","entity","lower","toLowerCase","startsWith","isHex","digits","slice","codePoint","Number","parseInt","isNaN","String","fromCodePoint","inner","normalized","trim","appendTextNode","nodes","text","length","last","type","content","push","serializeSimpleMarkup","map","node","tag","children","join","parseSimpleMarkup","decodedInput","rootChildren","stack","currentChildren","tagRegex","lastIndex","exec","fullMatch","rawTagName","tagName","isClosing","isSelfClosing","test","index","top","pop","elementNode","unclosed","parentChildren","lastChild","nodeIndex","indexOf","splice","simpleMarkupNodesToPlainText","renderSimpleMarkupNodeList","keyPrefix","key","Fragment","br","Tag","createElement","renderSimpleMarkup","rendered","normalizeBandOffset","scale","value","position","undefined","bandwidth","clamp","min","max","Math","resolveDataCoordinate","axis","context","yAxis","xScale","parsedValue","Date","getTime","yScale","yScaleSecondary","yScalePrimary","resolveAxisCoordinate","coordinateType","options","plotRect","x","width","y","height","createMeasurementSignature","annotationContentSignature","containerStyle","contentStyle","layoutClassName","styleClassName","JSON","stringify","getCoordinateDescriptor","coordinates","xType","yType","xCoordinateType","yCoordinateType","resolveCoordinates","annotation","layout","descriptor","offsetX","offsetY","anchorX","anchorY","anchor","left","clipToBounds","point","ChartAnnotationLayer","memo","props","annotations","annotationsProp","hideDefaultStyles","classes","idPrefix","autoKeyPrefix","measurements","setMeasurements","useState","resolvedAnnotations","useMemo","fallbackIndex","id","useEffect","prev","Object","keys","next","forEach","identical","updateMeasurement","useCallback","signature","prevEntry","abs","annotationForeignObjects","measurementElements","connectors","resolved","rawAnnotationText","annotationMarkupNodes","annotationMarkupSignature","annotationPlainText","horizontalAlign","align","verticalAlign","backgroundOpacity","style","opacity","baseBackgroundColor","backgroundColor","hasCustomBackground","maxWidth","preserveOriginalOpacity","colorNeutralBackground1","borderColor","borderWidth","borderStyle","borderRadius","padding","boxShadow","color","textColor","fontSize","fontWeight","rotation","transform","transformOrigin","measurementSignature","className","measurementEntry","isMeasurementValid","measuredSize","baseTopLeftX","baseTopLeftY","usePlotBounds","viewportX","viewportY","viewportWidth","svgRect","viewportHeight","maxTopLeftX","maxTopLeftY","topLeftX","topLeftY","displayPoint","connector","startPadding","endPadding","minArrowClearance","minDistance","dx","dy","distance","sqrt","fallbackDirection","ux","uy","desiredDisplayX","desiredDisplayY","desiredTopLeftX","desiredTopLeftY","measurementStyle","pointerEvents","visibility","annotationClass","annotationNoDefaults","div","ref","rect","getBoundingClientRect","measurement","aria-hidden","data-annotation-key","data-chart-annotation-measurement","annotationContent","foreignObject","annotationForeignObject","annotationContentInteractive","role","accessibility","aria-label","ariaLabel","aria-describedby","ariaDescribedBy","tabIndex","data-chart-annotation","strokeColor","strokeWidth","dashArray","arrow","sizeBasis","proportionalSize","maxByPadding","maxByDistance","markerSize","markerStrokeWidth","start","end","viewBoxWidth","viewBoxHeight","markerDefs","createMarkerId","size","refY","refX","pathEnd","pathStart","path","marker","markerWidth","markerHeight","viewBox","orient","markerUnits","d","fill","stroke","strokeLinecap","strokeLinejoin","connectorElements","markerStart","markerEnd","line","x1","y1","x2","y2","strokeDasharray","shouldRenderSvg","root","data-chart-annotation-layer","svg","connectorLayer","preserveAspectRatio","data-chart-annotation-svg","defs","g","connectorGroup","displayName"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,YAAY,QAAQ,iBAAiB;AAS9C,SACEC,mBAAmB,EACnBC,qCAAqC,EACrCC,uBAAuB,EACvBC,6BAA6B,EAC7BC,+BAA+B,EAC/BC,8BAA8B,EAC9BC,8BAA8B,EAC9BC,6BAA6B,QACxB,mCAAmC;AAC1C,SAASC,KAAK,QAAQ,4BAA4B;AAClD,SAASC,MAAM,QAAQ,wBAAwB;AAE/C,MAAMC,2BAA2B;AACjC,MAAMC,yBAAyB;AAC/B,MAAMC,+BAA+B;AACrC,MAAMC,gCAAgC;AACtC,MAAMC,iBAAiB;AACvB,MAAMC,iBAAiB;AACvB,MAAMC,mBAAmB;AACzB,MAAMC,0BAA0B;AAChC,MAAMC,sBAAsB,IAAIC,WAAW,CAAC;AAC5C,MAAMC,yBAAyB,IAAID,WAAW,CAAC;AAY/C,MAAME,0BAA0B,CAACC;IAC/B,MAAMC,gBAAwC;QAC5CC,KAAK;QACLC,MAAM;QACNC,MAAM;QACNC,MAAM;IACR;IAEA,MAAMC,2BAA2BN,MAAMO,OAAO,CAAC,uCAAuC,CAACC,OAAOC;QAC5F,MAAMC,QAAQD,OAAOE,WAAW;QAChC,IAAID,UAAU,QAAQA,UAAU,MAAM;YACpC,OAAO,CAAC,CAAC,EAAEA,MAAM,CAAC,CAAC;QACrB;QACA,IAAIA,MAAME,UAAU,CAAC,MAAM;YACzB,MAAMC,QAAQH,KAAK,CAAC,EAAE,KAAK;YAC3B,MAAMI,SAASJ,MAAMK,KAAK,CAACF,QAAQ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C,CAAC,GAAG9M;;IAGpD;IAEA,MAAMqN,kBAAkBpI,WAAWlI,MAAM,GAAG,KAAKgI,yBAAyBhI,MAAM,GAAG;IACnF,qBACE,oBAACwM;QAAItC,WAAWxD,QAAQ6J,IAAI;QAAEnD,MAAK;QAAeoD,+BAA4B;OAC3EF,iCACC,oBAACG;QACCvG,WAAWxD,QAAQgK,cAAc;QACjCnM,OAAM;QACNE,QAAO;QACP4K,SAAS,CAAC,IAAI,EAAEb,aAAa,CAAC,EAAEC,eAAe;QAC/CkC,qBAAoB;QACpBC,6BAA0B;OAEzBlC,WAAW1O,MAAM,GAAG,mBAAK,oBAAC6Q,cAAMnC,aAChCmB,kBAAkB7P,MAAM,GAAG,mBAC1B,oBAAC8Q;QAAEjE,eAAY;QAAO3C,WAAWxD,QAAQqK,cAAc;OACpDlB,oBAGJ7H,2BAGJC;AAGP,GAAG;AAEH7B,qBAAqB4K,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/CommonComponents/Annotations/ChartAnnotationLayer.types.ts"],"sourcesContent":["import { ChartAnnotation, ChartAnnotationArrowHead } from '../../../types/ChartAnnotation';\n\nexport interface AnnotationPoint {\n x: number;\n y: number;\n}\n\nexport interface AnnotationPlotRect {\n x: number;\n y: number;\n width: number;\n height: number;\n}\n\nexport interface ChartAnnotationContext {\n /** Rectangle describing the drawable area of the chart (without margins) */\n plotRect: AnnotationPlotRect;\n /** Size of the owning SVG element */\n svgRect: { width: number; height: number };\n /** Indicates if layout should be mirrored */\n isRtl?: boolean;\n /** Primary x scale mapping data domain to pixels */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n xScale?: (value: any) => number;\n /** Primary y scale mapping data domain to pixels */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n yScalePrimary?: (value: any) => number;\n /** Secondary y scale when present */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n yScaleSecondary?: (value: any) => number;\n}\n\nexport interface ChartAnnotationLayerProps {\n annotations?: ChartAnnotation[];\n context: ChartAnnotationContext;\n className?: string;\n}\n\nexport interface ResolvedAnnotationPosition {\n /** Final absolute position after applying layout and offsets */\n point: AnnotationPoint;\n /** Raw anchor position before offsets (used for connectors) */\n anchor: AnnotationPoint;\n}\n\nexport type ConnectorRenderData = {\n key: string;\n start: AnnotationPoint;\n end: AnnotationPoint;\n strokeColor: string;\n strokeWidth: number;\n dashArray?: string;\n arrow: ChartAnnotationArrowHead;\n markerSize: number;\n markerStrokeWidth: number;\n};\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/components/CommonComponents/Annotations/ChartAnnotationLayer.types.ts"],"sourcesContent":["import { ChartAnnotation, ChartAnnotationArrowHead } from '../../../types/ChartAnnotation';\n\nexport interface AnnotationPoint {\n x: number;\n y: number;\n}\n\nexport interface AnnotationPlotRect {\n x: number;\n y: number;\n width: number;\n height: number;\n}\n\nexport interface ChartAnnotationContext {\n /** Rectangle describing the drawable area of the chart (without margins) */\n plotRect: AnnotationPlotRect;\n /** Size of the owning SVG element */\n svgRect: { width: number; height: number };\n /** Indicates if layout should be mirrored */\n isRtl?: boolean;\n /** Primary x scale mapping data domain to pixels */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n xScale?: (value: any) => number;\n /** Primary y scale mapping data domain to pixels */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n yScalePrimary?: (value: any) => number;\n /** Secondary y scale when present */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n yScaleSecondary?: (value: any) => number;\n}\n\nexport interface ChartAnnotationLayerProps {\n annotations?: ChartAnnotation[];\n context: ChartAnnotationContext;\n className?: string;\n /**\n * When true, removes default border, shadow, and background styling from annotations.\n * @default false\n */\n hideDefaultStyles?: boolean;\n}\n\nexport interface ResolvedAnnotationPosition {\n /** Final absolute position after applying layout and offsets */\n point: AnnotationPoint;\n /** Raw anchor position before offsets (used for connectors) */\n anchor: AnnotationPoint;\n}\n\nexport type ConnectorRenderData = {\n key: string;\n start: AnnotationPoint;\n end: AnnotationPoint;\n strokeColor: string;\n strokeWidth: number;\n dashArray?: string;\n arrow: ChartAnnotationArrowHead;\n markerSize: number;\n markerStrokeWidth: number;\n};\n"],"names":[],"mappings":"AAkDA,WAUE"}
|
|
@@ -42,6 +42,7 @@ export const getDefaultConnectorStrokeColor = () => tokens.colorNeutralForegroun
|
|
|
42
42
|
export const chartAnnotationLayerClassNames = {
|
|
43
43
|
root: 'fui-chartAnnotationLayer__root',
|
|
44
44
|
annotation: 'fui-chartAnnotationLayer__annotation',
|
|
45
|
+
annotationNoDefaults: 'fui-chartAnnotationLayer__annotationNoDefaults',
|
|
45
46
|
connectorLayer: 'fui-chartAnnotationLayer__connectorLayer',
|
|
46
47
|
measurement: 'fui-chartAnnotationLayer__measurement',
|
|
47
48
|
annotationContent: 'fui-chartAnnotationLayer__annotationContent',
|
|
@@ -53,6 +54,23 @@ export const chartAnnotationLayerClassNames = {
|
|
|
53
54
|
/**
|
|
54
55
|
* Base Styles
|
|
55
56
|
*/
|
|
57
|
+
const annotationBaseStyles = {
|
|
58
|
+
...typographyStyles.caption1,
|
|
59
|
+
position: 'absolute',
|
|
60
|
+
pointerEvents: 'none',
|
|
61
|
+
display: 'flex',
|
|
62
|
+
alignItems: 'center',
|
|
63
|
+
justifyContent: 'center',
|
|
64
|
+
textAlign: 'center',
|
|
65
|
+
color: tokens.colorNeutralForeground1,
|
|
66
|
+
paddingTop: '4px',
|
|
67
|
+
paddingBottom: '4px',
|
|
68
|
+
paddingLeft: '8px',
|
|
69
|
+
paddingRight: '8px',
|
|
70
|
+
borderRadius: tokens.borderRadiusMedium,
|
|
71
|
+
whiteSpace: 'pre-wrap',
|
|
72
|
+
zIndex: 2
|
|
73
|
+
};
|
|
56
74
|
const useStyles = /*#__PURE__*/__styles({
|
|
57
75
|
root: {
|
|
58
76
|
qhf8xq: "f1euv43f",
|
|
@@ -89,6 +107,8 @@ const useStyles = /*#__PURE__*/__styles({
|
|
|
89
107
|
Btl43ni: 0,
|
|
90
108
|
B7oj6ja: 0,
|
|
91
109
|
Dimara: "ft85np5",
|
|
110
|
+
Huce71: "fibxuh5",
|
|
111
|
+
Bj3rh1h: "fj25m7a",
|
|
92
112
|
E5pizo: "f1hg901r",
|
|
93
113
|
Bgfg5da: 0,
|
|
94
114
|
B9xav0g: 0,
|
|
@@ -106,7 +126,29 @@ const useStyles = /*#__PURE__*/__styles({
|
|
|
106
126
|
g2u3we: 0,
|
|
107
127
|
icvyot: 0,
|
|
108
128
|
B4j52fo: 0,
|
|
109
|
-
irswps: "fm9niy"
|
|
129
|
+
irswps: "fm9niy"
|
|
130
|
+
},
|
|
131
|
+
annotationNoDefaults: {
|
|
132
|
+
Bahqtrf: "fk6fouc",
|
|
133
|
+
Be2twd7: "fy9rknc",
|
|
134
|
+
Bhrd7zp: "figsok6",
|
|
135
|
+
Bg96gwp: "fwrc4pm",
|
|
136
|
+
qhf8xq: "f1euv43f",
|
|
137
|
+
Bkecrkj: "f1aehjj5",
|
|
138
|
+
mc9l5x: "f22iagw",
|
|
139
|
+
Bt984gj: "f122n59",
|
|
140
|
+
Brf1p80: "f4d9j23",
|
|
141
|
+
fsow6f: "f17mccla",
|
|
142
|
+
sj55zd: "f19n0e5",
|
|
143
|
+
z8tnut: "f10ra9hq",
|
|
144
|
+
Byoj8tv: "f1y2xyjm",
|
|
145
|
+
uwmqm3: ["f177v4lu", "f19lj068"],
|
|
146
|
+
z189sj: ["f19lj068", "f177v4lu"],
|
|
147
|
+
Beyfa6y: 0,
|
|
148
|
+
Bbmb7ep: 0,
|
|
149
|
+
Btl43ni: 0,
|
|
150
|
+
B7oj6ja: 0,
|
|
151
|
+
Dimara: "ft85np5",
|
|
110
152
|
Huce71: "fibxuh5",
|
|
111
153
|
Bj3rh1h: "fj25m7a"
|
|
112
154
|
},
|
|
@@ -151,9 +193,11 @@ const useStyles = /*#__PURE__*/__styles({
|
|
|
151
193
|
p: -1
|
|
152
194
|
}], ".f19g0ac{z-index:1;}", ".fk6fouc{font-family:var(--fontFamilyBase);}", ".fy9rknc{font-size:var(--fontSizeBase200);}", ".figsok6{font-weight:var(--fontWeightRegular);}", ".fwrc4pm{line-height:var(--lineHeightBase200);}", ".f22iagw{display:flex;}", ".f122n59{align-items:center;}", ".f4d9j23{justify-content:center;}", ".f17mccla{text-align:center;}", ".f19n0e5{color:var(--colorNeutralForeground1);}", ".f10ra9hq{padding-top:4px;}", ".f1y2xyjm{padding-bottom:4px;}", ".f177v4lu{padding-left:8px;}", ".f19lj068{padding-right:8px;}", [".ft85np5{border-radius:var(--borderRadiusMedium);}", {
|
|
153
195
|
p: -1
|
|
154
|
-
}], ".f1hg901r{box-shadow:var(--shadow16);}", [".fm9niy{border:1px solid var(--colorNeutralStroke1);}", {
|
|
196
|
+
}], ".fibxuh5{white-space:pre-wrap;}", ".fj25m7a{z-index:2;}", ".f1hg901r{box-shadow:var(--shadow16);}", [".fm9niy{border:1px solid var(--colorNeutralStroke1);}", {
|
|
155
197
|
p: -2
|
|
156
|
-
}], ".
|
|
198
|
+
}], [".ft85np5{border-radius:var(--borderRadiusMedium);}", {
|
|
199
|
+
p: -1
|
|
200
|
+
}], [".f1gl81tg{overflow:visible;}", {
|
|
157
201
|
p: -1
|
|
158
202
|
}], ".fd7fpy0{visibility:hidden;}", [".f1gl81tg{overflow:visible;}", {
|
|
159
203
|
p: -1
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__styles","mergeClasses","tokens","typographyStyles","color","d3Color","DEFAULT_ANNOTATION_BACKGROUND_OPACITY","DEFAULT_ANNOTATION_PADDING","DEFAULT_CONNECTOR_START_PADDING","DEFAULT_CONNECTOR_END_PADDING","DEFAULT_CONNECTOR_STROKE_WIDTH","DEFAULT_CONNECTOR_ARROW","applyOpacityToColor","opacity","options","undefined","parsed","originalOpacity","_options_preserveOriginalOpacity","preserveOriginalOpacity","toString","Math","max","min","getDefaultAnnotationBackgroundColor","colorNeutralBackground1","getDefaultConnectorStrokeColor","colorNeutralForeground1","chartAnnotationLayerClassNames","root","annotation","connectorLayer","measurement","annotationContent","annotationForeignObject","annotationContentInteractive","annotationForeignObjectInteractive","connectorGroup","useStyles","qhf8xq","Bhzewxz","oyh7mz","j35jbq","B5kzvoi","a9b677","Bqenvij","Bkecrkj","B68tc82","Bmxbyg5","Bpg54ce","Bj3rh1h","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","mc9l5x","Bt984gj","Brf1p80","fsow6f","sj55zd","z8tnut","Byoj8tv","uwmqm3","z189sj","Beyfa6y","Bbmb7ep","Btl43ni","B7oj6ja","Dimara","E5pizo","Bgfg5da","B9xav0g","oivjwe","Bn0qgzm","B4g9neb","zhjwy3","wvpqe5","ibv6hh","u1mtju","h3c5rm","vrafjx","Bekrc4i","i8vvqc","g2u3we","icvyot","B4j52fo","irswps","Huce71","Bcdw1i0","d","p","useChartAnnotationLayerStyles","props","_props_styles","_props_styles1","_props_styles2","_props_styles3","_props_styles4","_props_styles5","_props_styles6","_props_styles7","_props_styles8","baseStyles","className","styles"],"sources":["useChartAnnotationLayer.styles.js"],"sourcesContent":["'use client';\nimport { makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport { color as d3Color } from 'd3-color';\nexport const DEFAULT_ANNOTATION_BACKGROUND_OPACITY = 0.8;\nexport const DEFAULT_ANNOTATION_PADDING = '4px 8px';\nexport const DEFAULT_CONNECTOR_START_PADDING = 12;\nexport const DEFAULT_CONNECTOR_END_PADDING = 0;\nexport const DEFAULT_CONNECTOR_STROKE_WIDTH = 2;\nexport const DEFAULT_CONNECTOR_ARROW = 'end';\nexport const applyOpacityToColor = (color, opacity, options)=>{\n if (!color) {\n return undefined;\n }\n const parsed = d3Color(color);\n if (!parsed) {\n return color;\n }\n const originalOpacity = typeof parsed.opacity === 'number' ? parsed.opacity : 1;\n var _options_preserveOriginalOpacity;\n const preserveOriginalOpacity = (_options_preserveOriginalOpacity = options === null || options === void 0 ? void 0 : options.preserveOriginalOpacity) !== null && _options_preserveOriginalOpacity !== void 0 ? _options_preserveOriginalOpacity : true;\n if (preserveOriginalOpacity && originalOpacity < 1) {\n return parsed.toString();\n }\n parsed.opacity = Math.max(0, Math.min(1, opacity));\n return parsed.toString();\n};\n/**\n * Get default annotation background color with opacity applied\n * Updated for v9 - uses tokens instead of theme\n */ export const getDefaultAnnotationBackgroundColor = ()=>applyOpacityToColor(tokens.colorNeutralBackground1, DEFAULT_ANNOTATION_BACKGROUND_OPACITY);\n/**\n * Get default connector stroke color\n * Updated for v9 - uses tokens instead of theme\n */ export const getDefaultConnectorStrokeColor = ()=>tokens.colorNeutralForeground1;\n/**\n * @internal\n */ export const chartAnnotationLayerClassNames = {\n root: 'fui-chartAnnotationLayer__root',\n annotation: 'fui-chartAnnotationLayer__annotation',\n connectorLayer: 'fui-chartAnnotationLayer__connectorLayer',\n measurement: 'fui-chartAnnotationLayer__measurement',\n annotationContent: 'fui-chartAnnotationLayer__annotationContent',\n annotationForeignObject: 'fui-chartAnnotationLayer__annotationForeignObject',\n annotationContentInteractive: 'fui-chartAnnotationLayer__annotationContentInteractive',\n annotationForeignObjectInteractive: 'fui-chartAnnotationLayer__annotationForeignObjectInteractive',\n connectorGroup: 'fui-chartAnnotationLayer__connectorGroup'\n};\n/**\n * Base Styles\n */ const useStyles = makeStyles({\n root: {\n position: 'absolute',\n top: '0',\n left: '0',\n right: '0',\n bottom: '0',\n width: '100%',\n height: '100%',\n pointerEvents: 'none',\n overflow: 'visible',\n zIndex: 1\n },\n annotation: {\n ...typographyStyles.caption1,\n position: 'absolute',\n pointerEvents: 'none',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n textAlign: 'center',\n color: tokens.colorNeutralForeground1,\n paddingTop: '4px',\n paddingBottom: '4px',\n paddingLeft: '8px',\n paddingRight: '8px',\n borderRadius: tokens.borderRadiusMedium,\n boxShadow: tokens.shadow16,\n border: `1px solid ${tokens.colorNeutralStroke1}`,\n whiteSpace: 'pre-wrap',\n zIndex: 2\n },\n connectorLayer: {\n position: 'absolute',\n top: '0',\n left: '0',\n width: '100%',\n height: '100%',\n pointerEvents: 'none',\n overflow: 'visible'\n },\n measurement: {\n position: 'absolute',\n visibility: 'hidden',\n pointerEvents: 'none'\n },\n annotationContent: {\n width: '100%',\n height: '100%',\n pointerEvents: 'none'\n },\n annotationForeignObject: {\n overflow: 'visible',\n pointerEvents: 'none'\n },\n annotationContentInteractive: {\n pointerEvents: 'auto'\n },\n annotationForeignObjectInteractive: {\n pointerEvents: 'auto'\n },\n connectorGroup: {\n pointerEvents: 'none'\n }\n});\n/**\n * Apply styling to the ChartAnnotationLayer slots based on the state\n */ export const useChartAnnotationLayerStyles = (props)=>{\n var _props_styles, _props_styles1, _props_styles2, _props_styles3, _props_styles4, _props_styles5, _props_styles6, _props_styles7, _props_styles8;\n const baseStyles = useStyles();\n return {\n root: mergeClasses(chartAnnotationLayerClassNames.root, baseStyles.root, props.className, (_props_styles = props.styles) === null || _props_styles === void 0 ? void 0 : _props_styles.root),\n annotation: mergeClasses(chartAnnotationLayerClassNames.annotation, baseStyles.annotation, (_props_styles1 = props.styles) === null || _props_styles1 === void 0 ? void 0 : _props_styles1.annotation),\n connectorLayer: mergeClasses(chartAnnotationLayerClassNames.connectorLayer, baseStyles.connectorLayer, (_props_styles2 = props.styles) === null || _props_styles2 === void 0 ? void 0 : _props_styles2.connectorLayer),\n measurement: mergeClasses(chartAnnotationLayerClassNames.measurement, baseStyles.measurement, (_props_styles3 = props.styles) === null || _props_styles3 === void 0 ? void 0 : _props_styles3.measurement),\n annotationContent: mergeClasses(chartAnnotationLayerClassNames.annotationContent, baseStyles.annotationContent, (_props_styles4 = props.styles) === null || _props_styles4 === void 0 ? void 0 : _props_styles4.annotationContent),\n annotationForeignObject: mergeClasses(chartAnnotationLayerClassNames.annotationForeignObject, baseStyles.annotationForeignObject, (_props_styles5 = props.styles) === null || _props_styles5 === void 0 ? void 0 : _props_styles5.annotationForeignObject),\n annotationContentInteractive: mergeClasses(chartAnnotationLayerClassNames.annotationContentInteractive, baseStyles.annotationContentInteractive, (_props_styles6 = props.styles) === null || _props_styles6 === void 0 ? void 0 : _props_styles6.annotationContentInteractive),\n annotationForeignObjectInteractive: mergeClasses(chartAnnotationLayerClassNames.annotationForeignObjectInteractive, baseStyles.annotationForeignObjectInteractive, (_props_styles7 = props.styles) === null || _props_styles7 === void 0 ? void 0 : _props_styles7.annotationForeignObjectInteractive),\n connectorGroup: mergeClasses(chartAnnotationLayerClassNames.connectorGroup, baseStyles.connectorGroup, (_props_styles8 = props.styles) === null || _props_styles8 === void 0 ? void 0 : _props_styles8.connectorGroup)\n };\n};\n"],"mappings":"AAAA,YAAY;;AACZ,SAAAA,QAAA,EAAqBC,YAAY,QAAQ,gBAAgB;AACzD,SAASC,MAAM,EAAEC,gBAAgB,QAAQ,uBAAuB;AAChE,SAASC,KAAK,IAAIC,OAAO,QAAQ,UAAU;AAC3C,OAAO,MAAMC,qCAAqC,GAAG,GAAG;AACxD,OAAO,MAAMC,0BAA0B,GAAG,SAAS;AACnD,OAAO,MAAMC,+BAA+B,GAAG,EAAE;AACjD,OAAO,MAAMC,6BAA6B,GAAG,CAAC;AAC9C,OAAO,MAAMC,8BAA8B,GAAG,CAAC;AAC/C,OAAO,MAAMC,uBAAuB,GAAG,KAAK;AAC5C,OAAO,MAAMC,mBAAmB,GAAGA,CAACR,KAAK,EAAES,OAAO,EAAEC,OAAO,KAAG;EAC1D,IAAI,CAACV,KAAK,EAAE;IACR,OAAOW,SAAS;EACpB;EACA,MAAMC,MAAM,GAAGX,OAAO,CAACD,KAAK,CAAC;EAC7B,IAAI,CAACY,MAAM,EAAE;IACT,OAAOZ,KAAK;EAChB;EACA,MAAMa,eAAe,GAAG,OAAOD,MAAM,CAACH,OAAO,KAAK,QAAQ,GAAGG,MAAM,CAACH,OAAO,GAAG,CAAC;EAC/E,IAAIK,gCAAgC;EACpC,MAAMC,uBAAuB,GAAG,CAAC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AAK,CAAC,GAAG,KAAK,CAAC,GAAGA,cAAc,CAAChE,iBAAiB,CAAC;IAClOC,uBAAuB,EAAEjC,YAAY,CAAC2B,8BAA8B,CAACM,uBAAuB,EAAEoE,UAAU,CAACpE,uBAAuB,EAAE,CAACgE,cAAc,GAAGN,KAAK,CAACY,MAAM,MAAM,IAAI,IAAIN,cAAc,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAGA,cAAc,CAAChE,uBAAuB,CAAC;IAC1PC,4BAA4B,EAAElC,YAAY,CAAC2B,8BAA8B,CAACO,4BAA4B,EAAEmE,UAAU,CAACnE,4BAA4B,EAAE,CAACgE,cAAc,GAAGP,KAAK,CAACY,MAAM,MAAM,IAAI,IAAIL,cAAc,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAGA,cAAc,CAAChE,4BAA4B,CAAC;IAC9QC,kCAAkC,EAAEnC,YAAY,CAAC2B,8BAA8B,CAACQ,kCAAkC,EAAEkE,UAAU,CAAClE,kCAAkC,EAAE,CAACgE,cAAc,GAAGR,KAAK,CAACY,MAAM,MAAM,IAAI,IAAIJ,cAAc,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAGA,cAAc,CAAChE,kCAAkC,CAAC;IACtSC,cAAc,EAAEpC,YAAY,CAAC2B,8BAA8B,CAACS,cAAc,EAAEiE,UAAU,CAACjE,cAAc,EAAE,CAACgE,cAAc,GAAGT,KAAK,CAACY,MAAM,MAAM,IAAI,IAAIH,cAAc,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAGA,cAAc,CAAChE,cAAc;EACzN,CAAC;AACL,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["__styles","mergeClasses","tokens","typographyStyles","color","d3Color","DEFAULT_ANNOTATION_BACKGROUND_OPACITY","DEFAULT_ANNOTATION_PADDING","DEFAULT_CONNECTOR_START_PADDING","DEFAULT_CONNECTOR_END_PADDING","DEFAULT_CONNECTOR_STROKE_WIDTH","DEFAULT_CONNECTOR_ARROW","applyOpacityToColor","opacity","options","undefined","parsed","originalOpacity","_options_preserveOriginalOpacity","preserveOriginalOpacity","toString","Math","max","min","getDefaultAnnotationBackgroundColor","colorNeutralBackground1","getDefaultConnectorStrokeColor","colorNeutralForeground1","chartAnnotationLayerClassNames","root","annotation","annotationNoDefaults","connectorLayer","measurement","annotationContent","annotationForeignObject","annotationContentInteractive","annotationForeignObjectInteractive","connectorGroup","annotationBaseStyles","caption1","position","pointerEvents","display","alignItems","justifyContent","textAlign","paddingTop","paddingBottom","paddingLeft","paddingRight","borderRadius","borderRadiusMedium","whiteSpace","zIndex","useStyles","qhf8xq","Bhzewxz","oyh7mz","j35jbq","B5kzvoi","a9b677","Bqenvij","Bkecrkj","B68tc82","Bmxbyg5","Bpg54ce","Bj3rh1h","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","mc9l5x","Bt984gj","Brf1p80","fsow6f","sj55zd","z8tnut","Byoj8tv","uwmqm3","z189sj","Beyfa6y","Bbmb7ep","Btl43ni","B7oj6ja","Dimara","Huce71","E5pizo","Bgfg5da","B9xav0g","oivjwe","Bn0qgzm","B4g9neb","zhjwy3","wvpqe5","ibv6hh","u1mtju","h3c5rm","vrafjx","Bekrc4i","i8vvqc","g2u3we","icvyot","B4j52fo","irswps","Bcdw1i0","d","p","useChartAnnotationLayerStyles","props","_props_styles","_props_styles1","_props_styles2","_props_styles3","_props_styles4","_props_styles5","_props_styles6","_props_styles7","_props_styles8","baseStyles","className","styles"],"sources":["useChartAnnotationLayer.styles.js"],"sourcesContent":["'use client';\nimport { makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport { color as d3Color } from 'd3-color';\nexport const DEFAULT_ANNOTATION_BACKGROUND_OPACITY = 0.8;\nexport const DEFAULT_ANNOTATION_PADDING = '4px 8px';\nexport const DEFAULT_CONNECTOR_START_PADDING = 12;\nexport const DEFAULT_CONNECTOR_END_PADDING = 0;\nexport const DEFAULT_CONNECTOR_STROKE_WIDTH = 2;\nexport const DEFAULT_CONNECTOR_ARROW = 'end';\nexport const applyOpacityToColor = (color, opacity, options)=>{\n if (!color) {\n return undefined;\n }\n const parsed = d3Color(color);\n if (!parsed) {\n return color;\n }\n const originalOpacity = typeof parsed.opacity === 'number' ? parsed.opacity : 1;\n var _options_preserveOriginalOpacity;\n const preserveOriginalOpacity = (_options_preserveOriginalOpacity = options === null || options === void 0 ? void 0 : options.preserveOriginalOpacity) !== null && _options_preserveOriginalOpacity !== void 0 ? _options_preserveOriginalOpacity : true;\n if (preserveOriginalOpacity && originalOpacity < 1) {\n return parsed.toString();\n }\n parsed.opacity = Math.max(0, Math.min(1, opacity));\n return parsed.toString();\n};\n/**\n * Get default annotation background color with opacity applied\n * Updated for v9 - uses tokens instead of theme\n */ export const getDefaultAnnotationBackgroundColor = ()=>applyOpacityToColor(tokens.colorNeutralBackground1, DEFAULT_ANNOTATION_BACKGROUND_OPACITY);\n/**\n * Get default connector stroke color\n * Updated for v9 - uses tokens instead of theme\n */ export const getDefaultConnectorStrokeColor = ()=>tokens.colorNeutralForeground1;\n/**\n * @internal\n */ export const chartAnnotationLayerClassNames = {\n root: 'fui-chartAnnotationLayer__root',\n annotation: 'fui-chartAnnotationLayer__annotation',\n annotationNoDefaults: 'fui-chartAnnotationLayer__annotationNoDefaults',\n connectorLayer: 'fui-chartAnnotationLayer__connectorLayer',\n measurement: 'fui-chartAnnotationLayer__measurement',\n annotationContent: 'fui-chartAnnotationLayer__annotationContent',\n annotationForeignObject: 'fui-chartAnnotationLayer__annotationForeignObject',\n annotationContentInteractive: 'fui-chartAnnotationLayer__annotationContentInteractive',\n annotationForeignObjectInteractive: 'fui-chartAnnotationLayer__annotationForeignObjectInteractive',\n connectorGroup: 'fui-chartAnnotationLayer__connectorGroup'\n};\n/**\n * Base Styles\n */ const annotationBaseStyles = {\n ...typographyStyles.caption1,\n position: 'absolute',\n pointerEvents: 'none',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n textAlign: 'center',\n color: tokens.colorNeutralForeground1,\n paddingTop: '4px',\n paddingBottom: '4px',\n paddingLeft: '8px',\n paddingRight: '8px',\n borderRadius: tokens.borderRadiusMedium,\n whiteSpace: 'pre-wrap',\n zIndex: 2\n};\nconst useStyles = makeStyles({\n root: {\n position: 'absolute',\n top: '0',\n left: '0',\n right: '0',\n bottom: '0',\n width: '100%',\n height: '100%',\n pointerEvents: 'none',\n overflow: 'visible',\n zIndex: 1\n },\n annotation: {\n ...annotationBaseStyles,\n boxShadow: tokens.shadow16,\n border: `1px solid ${tokens.colorNeutralStroke1}`\n },\n annotationNoDefaults: {\n ...annotationBaseStyles\n },\n connectorLayer: {\n position: 'absolute',\n top: '0',\n left: '0',\n width: '100%',\n height: '100%',\n pointerEvents: 'none',\n overflow: 'visible'\n },\n measurement: {\n position: 'absolute',\n visibility: 'hidden',\n pointerEvents: 'none'\n },\n annotationContent: {\n width: '100%',\n height: '100%',\n pointerEvents: 'none'\n },\n annotationForeignObject: {\n overflow: 'visible',\n pointerEvents: 'none'\n },\n annotationContentInteractive: {\n pointerEvents: 'auto'\n },\n annotationForeignObjectInteractive: {\n pointerEvents: 'auto'\n },\n connectorGroup: {\n pointerEvents: 'none'\n }\n});\n/**\n * Apply styling to the ChartAnnotationLayer slots based on the state\n */ export const useChartAnnotationLayerStyles = (props)=>{\n var _props_styles, _props_styles1, _props_styles2, _props_styles3, _props_styles4, _props_styles5, _props_styles6, _props_styles7, _props_styles8;\n const baseStyles = useStyles();\n return {\n root: mergeClasses(chartAnnotationLayerClassNames.root, baseStyles.root, props.className, (_props_styles = props.styles) === null || _props_styles === void 0 ? void 0 : _props_styles.root),\n annotation: mergeClasses(chartAnnotationLayerClassNames.annotation, baseStyles.annotation, (_props_styles1 = props.styles) === null || _props_styles1 === void 0 ? void 0 : _props_styles1.annotation),\n connectorLayer: mergeClasses(chartAnnotationLayerClassNames.connectorLayer, baseStyles.connectorLayer, (_props_styles2 = props.styles) === null || _props_styles2 === void 0 ? void 0 : _props_styles2.connectorLayer),\n measurement: mergeClasses(chartAnnotationLayerClassNames.measurement, baseStyles.measurement, (_props_styles3 = props.styles) === null || _props_styles3 === void 0 ? void 0 : _props_styles3.measurement),\n annotationContent: mergeClasses(chartAnnotationLayerClassNames.annotationContent, baseStyles.annotationContent, (_props_styles4 = props.styles) === null || _props_styles4 === void 0 ? void 0 : _props_styles4.annotationContent),\n annotationForeignObject: mergeClasses(chartAnnotationLayerClassNames.annotationForeignObject, baseStyles.annotationForeignObject, (_props_styles5 = props.styles) === null || _props_styles5 === void 0 ? void 0 : _props_styles5.annotationForeignObject),\n annotationContentInteractive: mergeClasses(chartAnnotationLayerClassNames.annotationContentInteractive, baseStyles.annotationContentInteractive, (_props_styles6 = props.styles) === null || _props_styles6 === void 0 ? void 0 : _props_styles6.annotationContentInteractive),\n annotationForeignObjectInteractive: mergeClasses(chartAnnotationLayerClassNames.annotationForeignObjectInteractive, baseStyles.annotationForeignObjectInteractive, (_props_styles7 = props.styles) === null || _props_styles7 === void 0 ? void 0 : _props_styles7.annotationForeignObjectInteractive),\n connectorGroup: mergeClasses(chartAnnotationLayerClassNames.connectorGroup, baseStyles.connectorGroup, (_props_styles8 = props.styles) === null || _props_styles8 === void 0 ? void 0 : _props_styles8.connectorGroup)\n };\n};\n"],"mappings":"AAAA,YAAY;;AACZ,SAAAA,QAAA,EAAqBC,YAAY,QAAQ,gBAAgB;AACzD,SAASC,MAAM,EAAEC,gBAAgB,QAAQ,uBAAuB;AAChE,SAASC,KAAK,IAAIC,OAAO,QAAQ,UAAU;AAC3C,OAAO,MAAMC,qCAAqC,GAAG,GAAG;AACxD,OAAO,MAAMC,0BAA0B,GAAG,SAAS;AACnD,OAAO,MAAMC,+BAA+B,GAAG,EAAE;AACjD,OAAO,MAAMC,6BAA6B,GAAG,CAAC;AAC9C,OAAO,MAAMC,8BAA8B,GAAG,CAAC;AAC/C,OAAO,MAAMC,uBAAuB,GAAG,KAAK;AAC5C,OAAO,MA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,CAAC,GAAG,KAAK,CAAC,GAAGA,cAAc,CAAChF,iBAAiB,CAAC;IAClOC,uBAAuB,EAAElC,YAAY,CAAC2B,8BAA8B,CAACO,uBAAuB,EAAEoF,UAAU,CAACpF,uBAAuB,EAAE,CAACgF,cAAc,GAAGN,KAAK,CAACY,MAAM,MAAM,IAAI,IAAIN,cAAc,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAGA,cAAc,CAAChF,uBAAuB,CAAC;IAC1PC,4BAA4B,EAAEnC,YAAY,CAAC2B,8BAA8B,CAACQ,4BAA4B,EAAEmF,UAAU,CAACnF,4BAA4B,EAAE,CAACgF,cAAc,GAAGP,KAAK,CAACY,MAAM,MAAM,IAAI,IAAIL,cAAc,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAGA,cAAc,CAAChF,4BAA4B,CAAC;IAC9QC,kCAAkC,EAAEpC,YAAY,CAAC2B,8BAA8B,CAACS,kCAAkC,EAAEkF,UAAU,CAAClF,kCAAkC,EAAE,CAACgF,cAAc,GAAGR,KAAK,CAACY,MAAM,MAAM,IAAI,IAAIJ,cAAc,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAGA,cAAc,CAAChF,kCAAkC,CAAC;IACtSC,cAAc,EAAErC,YAAY,CAAC2B,8BAA8B,CAACU,cAAc,EAAEiF,UAAU,CAACjF,cAAc,EAAE,CAACgF,cAAc,GAAGT,KAAK,CAACY,MAAM,MAAM,IAAI,IAAIH,cAAc,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAGA,cAAc,CAAChF,cAAc;EACzN,CAAC;AACL,CAAC","ignoreList":[]}
|
|
@@ -38,6 +38,7 @@ export const applyOpacityToColor = (color, opacity, options)=>{
|
|
|
38
38
|
*/ export const chartAnnotationLayerClassNames = {
|
|
39
39
|
root: 'fui-chartAnnotationLayer__root',
|
|
40
40
|
annotation: 'fui-chartAnnotationLayer__annotation',
|
|
41
|
+
annotationNoDefaults: 'fui-chartAnnotationLayer__annotationNoDefaults',
|
|
41
42
|
connectorLayer: 'fui-chartAnnotationLayer__connectorLayer',
|
|
42
43
|
measurement: 'fui-chartAnnotationLayer__measurement',
|
|
43
44
|
annotationContent: 'fui-chartAnnotationLayer__annotationContent',
|
|
@@ -48,7 +49,24 @@ export const applyOpacityToColor = (color, opacity, options)=>{
|
|
|
48
49
|
};
|
|
49
50
|
/**
|
|
50
51
|
* Base Styles
|
|
51
|
-
*/ const
|
|
52
|
+
*/ const annotationBaseStyles = {
|
|
53
|
+
...typographyStyles.caption1,
|
|
54
|
+
position: 'absolute',
|
|
55
|
+
pointerEvents: 'none',
|
|
56
|
+
display: 'flex',
|
|
57
|
+
alignItems: 'center',
|
|
58
|
+
justifyContent: 'center',
|
|
59
|
+
textAlign: 'center',
|
|
60
|
+
color: tokens.colorNeutralForeground1,
|
|
61
|
+
paddingTop: '4px',
|
|
62
|
+
paddingBottom: '4px',
|
|
63
|
+
paddingLeft: '8px',
|
|
64
|
+
paddingRight: '8px',
|
|
65
|
+
borderRadius: tokens.borderRadiusMedium,
|
|
66
|
+
whiteSpace: 'pre-wrap',
|
|
67
|
+
zIndex: 2
|
|
68
|
+
};
|
|
69
|
+
const useStyles = makeStyles({
|
|
52
70
|
root: {
|
|
53
71
|
position: 'absolute',
|
|
54
72
|
top: '0',
|
|
@@ -62,23 +80,12 @@ export const applyOpacityToColor = (color, opacity, options)=>{
|
|
|
62
80
|
zIndex: 1
|
|
63
81
|
},
|
|
64
82
|
annotation: {
|
|
65
|
-
...
|
|
66
|
-
position: 'absolute',
|
|
67
|
-
pointerEvents: 'none',
|
|
68
|
-
display: 'flex',
|
|
69
|
-
alignItems: 'center',
|
|
70
|
-
justifyContent: 'center',
|
|
71
|
-
textAlign: 'center',
|
|
72
|
-
color: tokens.colorNeutralForeground1,
|
|
73
|
-
paddingTop: '4px',
|
|
74
|
-
paddingBottom: '4px',
|
|
75
|
-
paddingLeft: '8px',
|
|
76
|
-
paddingRight: '8px',
|
|
77
|
-
borderRadius: tokens.borderRadiusMedium,
|
|
83
|
+
...annotationBaseStyles,
|
|
78
84
|
boxShadow: tokens.shadow16,
|
|
79
|
-
border: `1px solid ${tokens.colorNeutralStroke1}
|
|
80
|
-
|
|
81
|
-
|
|
85
|
+
border: `1px solid ${tokens.colorNeutralStroke1}`
|
|
86
|
+
},
|
|
87
|
+
annotationNoDefaults: {
|
|
88
|
+
...annotationBaseStyles
|
|
82
89
|
},
|
|
83
90
|
connectorLayer: {
|
|
84
91
|
position: 'absolute',
|
package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.raw.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeStyles, mergeClasses } from '@griffel/react';\nimport { SlotClassNames } from '@fluentui/react-utilities';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport { color as d3Color } from 'd3-color';\nimport { ChartAnnotationArrowHead } from '../../../types/ChartAnnotation';\n\nexport interface ChartAnnotationLayerStyles {\n root?: string;\n annotation?: string;\n connectorLayer?: string;\n measurement?: string;\n annotationContent?: string;\n annotationForeignObject?: string;\n annotationContentInteractive?: string;\n annotationForeignObjectInteractive?: string;\n connectorGroup?: string;\n}\n\nexport interface ChartAnnotationLayerStyleProps {\n className?: string;\n styles?: Partial<ChartAnnotationLayerStyles>;\n}\n\nexport const DEFAULT_ANNOTATION_BACKGROUND_OPACITY = 0.8;\nexport const DEFAULT_ANNOTATION_PADDING = '4px 8px';\nexport const DEFAULT_CONNECTOR_START_PADDING = 12;\nexport const DEFAULT_CONNECTOR_END_PADDING = 0;\nexport const DEFAULT_CONNECTOR_STROKE_WIDTH = 2;\nexport const DEFAULT_CONNECTOR_ARROW: ChartAnnotationArrowHead = 'end';\n\nexport const applyOpacityToColor = (\n color: string | undefined,\n opacity: number,\n options?: {\n preserveOriginalOpacity?: boolean;\n },\n): string | undefined => {\n if (!color) {\n return undefined;\n }\n\n const parsed = d3Color(color);\n if (!parsed) {\n return color;\n }\n\n const originalOpacity = typeof parsed.opacity === 'number' ? parsed.opacity : 1;\n const preserveOriginalOpacity = options?.preserveOriginalOpacity ?? true;\n\n if (preserveOriginalOpacity && originalOpacity < 1) {\n return parsed.toString();\n }\n\n parsed.opacity = Math.max(0, Math.min(1, opacity));\n return parsed.toString();\n};\n\n/**\n * Get default annotation background color with opacity applied\n * Updated for v9 - uses tokens instead of theme\n */\nexport const getDefaultAnnotationBackgroundColor = (): string | undefined =>\n applyOpacityToColor(tokens.colorNeutralBackground1, DEFAULT_ANNOTATION_BACKGROUND_OPACITY);\n\n/**\n * Get default connector stroke color\n * Updated for v9 - uses tokens instead of theme\n */\nexport const getDefaultConnectorStrokeColor = (): string => tokens.colorNeutralForeground1;\n\n/**\n * @internal\n */\nexport const chartAnnotationLayerClassNames: SlotClassNames<ChartAnnotationLayerStyles> = {\n root: 'fui-chartAnnotationLayer__root',\n annotation: 'fui-chartAnnotationLayer__annotation',\n connectorLayer: 'fui-chartAnnotationLayer__connectorLayer',\n measurement: 'fui-chartAnnotationLayer__measurement',\n annotationContent: 'fui-chartAnnotationLayer__annotationContent',\n annotationForeignObject: 'fui-chartAnnotationLayer__annotationForeignObject',\n annotationContentInteractive: 'fui-chartAnnotationLayer__annotationContentInteractive',\n annotationForeignObjectInteractive: 'fui-chartAnnotationLayer__annotationForeignObjectInteractive',\n connectorGroup: 'fui-chartAnnotationLayer__connectorGroup',\n};\n\n/**\n * Base Styles\n */\nconst useStyles = makeStyles({\n root: {\n position: 'absolute',\n top: '0',\n left: '0',\n right: '0',\n bottom: '0',\n width: '100%',\n height: '100%',\n pointerEvents: 'none',\n overflow: 'visible',\n zIndex: 1,\n },\n annotation: {\n ...typographyStyles.caption1,\n position: 'absolute',\n pointerEvents: 'none',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n textAlign: 'center',\n color: tokens.colorNeutralForeground1,\n paddingTop: '4px',\n paddingBottom: '4px',\n paddingLeft: '8px',\n paddingRight: '8px',\n borderRadius: tokens.borderRadiusMedium,\n boxShadow: tokens.shadow16,\n border: `1px solid ${tokens.colorNeutralStroke1}`,\n whiteSpace: 'pre-wrap',\n zIndex: 2,\n },\n connectorLayer: {\n position: 'absolute',\n top: '0',\n left: '0',\n width: '100%',\n height: '100%',\n pointerEvents: 'none',\n overflow: 'visible',\n },\n measurement: {\n position: 'absolute',\n visibility: 'hidden',\n pointerEvents: 'none',\n },\n annotationContent: {\n width: '100%',\n height: '100%',\n pointerEvents: 'none',\n },\n annotationForeignObject: {\n overflow: 'visible',\n pointerEvents: 'none',\n },\n annotationContentInteractive: {\n pointerEvents: 'auto',\n },\n annotationForeignObjectInteractive: {\n pointerEvents: 'auto',\n },\n connectorGroup: {\n pointerEvents: 'none',\n },\n});\n\n/**\n * Apply styling to the ChartAnnotationLayer slots based on the state\n */\nexport const useChartAnnotationLayerStyles = (props: ChartAnnotationLayerStyleProps): ChartAnnotationLayerStyles => {\n const baseStyles = useStyles();\n\n return {\n root: mergeClasses(chartAnnotationLayerClassNames.root, baseStyles.root, props.className, props.styles?.root),\n annotation: mergeClasses(\n chartAnnotationLayerClassNames.annotation,\n baseStyles.annotation,\n props.styles?.annotation,\n ),\n connectorLayer: mergeClasses(\n chartAnnotationLayerClassNames.connectorLayer,\n baseStyles.connectorLayer,\n props.styles?.connectorLayer,\n ),\n measurement: mergeClasses(\n chartAnnotationLayerClassNames.measurement,\n baseStyles.measurement,\n props.styles?.measurement,\n ),\n annotationContent: mergeClasses(\n chartAnnotationLayerClassNames.annotationContent,\n baseStyles.annotationContent,\n props.styles?.annotationContent,\n ),\n annotationForeignObject: mergeClasses(\n chartAnnotationLayerClassNames.annotationForeignObject,\n baseStyles.annotationForeignObject,\n props.styles?.annotationForeignObject,\n ),\n annotationContentInteractive: mergeClasses(\n chartAnnotationLayerClassNames.annotationContentInteractive,\n baseStyles.annotationContentInteractive,\n props.styles?.annotationContentInteractive,\n ),\n annotationForeignObjectInteractive: mergeClasses(\n chartAnnotationLayerClassNames.annotationForeignObjectInteractive,\n baseStyles.annotationForeignObjectInteractive,\n props.styles?.annotationForeignObjectInteractive,\n ),\n connectorGroup: mergeClasses(\n chartAnnotationLayerClassNames.connectorGroup,\n baseStyles.connectorGroup,\n props.styles?.connectorGroup,\n ),\n };\n};\n"],"names":["makeStyles","mergeClasses","tokens","typographyStyles","color","d3Color","DEFAULT_ANNOTATION_BACKGROUND_OPACITY","DEFAULT_ANNOTATION_PADDING","DEFAULT_CONNECTOR_START_PADDING","DEFAULT_CONNECTOR_END_PADDING","DEFAULT_CONNECTOR_STROKE_WIDTH","DEFAULT_CONNECTOR_ARROW","applyOpacityToColor","opacity","options","undefined","parsed","originalOpacity","preserveOriginalOpacity","toString","Math","max","min","getDefaultAnnotationBackgroundColor","colorNeutralBackground1","getDefaultConnectorStrokeColor","colorNeutralForeground1","chartAnnotationLayerClassNames","root","annotation","connectorLayer","measurement","annotationContent","annotationForeignObject","annotationContentInteractive","annotationForeignObjectInteractive","connectorGroup","useStyles","position","top","left","right","bottom","width","height","pointerEvents","overflow","zIndex","caption1","display","alignItems","justifyContent","textAlign","paddingTop","paddingBottom","paddingLeft","paddingRight","borderRadius","borderRadiusMedium","boxShadow","shadow16","border","colorNeutralStroke1","whiteSpace","visibility","useChartAnnotationLayerStyles","props","baseStyles","className","styles"],"mappings":"AAAA;AAEA,SAASA,UAAU,EAAEC,YAAY,QAAQ,iBAAiB;AAE1D,SAASC,MAAM,EAAEC,gBAAgB,QAAQ,wBAAwB;AACjE,SAASC,SAASC,OAAO,QAAQ,WAAW;AAoB5C,OAAO,MAAMC,wCAAwC,IAAI;AACzD,OAAO,MAAMC,6BAA6B,UAAU;AACpD,OAAO,MAAMC,kCAAkC,GAAG;AAClD,OAAO,MAAMC,gCAAgC,EAAE;AAC/C,OAAO,MAAMC,iCAAiC,EAAE;AAChD,OAAO,MAAMC,0BAAoD,MAAM;AAEvE,OAAO,MAAMC,sBAA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,aACjB0B,+BAA+BK,iBAAiB,EAChDmC,WAAWnC,iBAAiB,GAC5BkC,iBAAAA,MAAMG,MAAM,cAAZH,qCAAAA,eAAclC,iBAAiB;QAEjCC,yBAAyBhC,aACvB0B,+BAA+BM,uBAAuB,EACtDkC,WAAWlC,uBAAuB,GAClCiC,iBAAAA,MAAMG,MAAM,cAAZH,qCAAAA,eAAcjC,uBAAuB;QAEvCC,8BAA8BjC,aAC5B0B,+BAA+BO,4BAA4B,EAC3DiC,WAAWjC,4BAA4B,GACvCgC,iBAAAA,MAAMG,MAAM,cAAZH,qCAAAA,eAAchC,4BAA4B;QAE5CC,oCAAoClC,aAClC0B,+BAA+BQ,kCAAkC,EACjEgC,WAAWhC,kCAAkC,GAC7C+B,iBAAAA,MAAMG,MAAM,cAAZH,qCAAAA,eAAc/B,kCAAkC;QAElDC,gBAAgBnC,aACd0B,+BAA+BS,cAAc,EAC7C+B,WAAW/B,cAAc,GACzB8B,iBAAAA,MAAMG,MAAM,cAAZH,qCAAAA,eAAc9B,cAAc;IAEhC;AACF,EAAE"}
|
|
1
|
+
{"version":3,"sources":["../src/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeStyles, mergeClasses } from '@griffel/react';\nimport { SlotClassNames } from '@fluentui/react-utilities';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport { color as d3Color } from 'd3-color';\nimport { ChartAnnotationArrowHead } from '../../../types/ChartAnnotation';\n\nexport interface ChartAnnotationLayerStyles {\n root?: string;\n annotation?: string;\n annotationNoDefaults?: string;\n connectorLayer?: string;\n measurement?: string;\n annotationContent?: string;\n annotationForeignObject?: string;\n annotationContentInteractive?: string;\n annotationForeignObjectInteractive?: string;\n connectorGroup?: string;\n}\n\nexport interface ChartAnnotationLayerStyleProps {\n className?: string;\n styles?: Partial<ChartAnnotationLayerStyles>;\n}\n\nexport const DEFAULT_ANNOTATION_BACKGROUND_OPACITY = 0.8;\nexport const DEFAULT_ANNOTATION_PADDING = '4px 8px';\nexport const DEFAULT_CONNECTOR_START_PADDING = 12;\nexport const DEFAULT_CONNECTOR_END_PADDING = 0;\nexport const DEFAULT_CONNECTOR_STROKE_WIDTH = 2;\nexport const DEFAULT_CONNECTOR_ARROW: ChartAnnotationArrowHead = 'end';\n\nexport const applyOpacityToColor = (\n color: string | undefined,\n opacity: number,\n options?: {\n preserveOriginalOpacity?: boolean;\n },\n): string | undefined => {\n if (!color) {\n return undefined;\n }\n\n const parsed = d3Color(color);\n if (!parsed) {\n return color;\n }\n\n const originalOpacity = typeof parsed.opacity === 'number' ? parsed.opacity : 1;\n const preserveOriginalOpacity = options?.preserveOriginalOpacity ?? true;\n\n if (preserveOriginalOpacity && originalOpacity < 1) {\n return parsed.toString();\n }\n\n parsed.opacity = Math.max(0, Math.min(1, opacity));\n return parsed.toString();\n};\n\n/**\n * Get default annotation background color with opacity applied\n * Updated for v9 - uses tokens instead of theme\n */\nexport const getDefaultAnnotationBackgroundColor = (): string | undefined =>\n applyOpacityToColor(tokens.colorNeutralBackground1, DEFAULT_ANNOTATION_BACKGROUND_OPACITY);\n\n/**\n * Get default connector stroke color\n * Updated for v9 - uses tokens instead of theme\n */\nexport const getDefaultConnectorStrokeColor = (): string => tokens.colorNeutralForeground1;\n\n/**\n * @internal\n */\nexport const chartAnnotationLayerClassNames: SlotClassNames<ChartAnnotationLayerStyles> = {\n root: 'fui-chartAnnotationLayer__root',\n annotation: 'fui-chartAnnotationLayer__annotation',\n annotationNoDefaults: 'fui-chartAnnotationLayer__annotationNoDefaults',\n connectorLayer: 'fui-chartAnnotationLayer__connectorLayer',\n measurement: 'fui-chartAnnotationLayer__measurement',\n annotationContent: 'fui-chartAnnotationLayer__annotationContent',\n annotationForeignObject: 'fui-chartAnnotationLayer__annotationForeignObject',\n annotationContentInteractive: 'fui-chartAnnotationLayer__annotationContentInteractive',\n annotationForeignObjectInteractive: 'fui-chartAnnotationLayer__annotationForeignObjectInteractive',\n connectorGroup: 'fui-chartAnnotationLayer__connectorGroup',\n};\n\n/**\n * Base Styles\n */\nconst annotationBaseStyles = {\n ...typographyStyles.caption1,\n position: 'absolute',\n pointerEvents: 'none',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n textAlign: 'center',\n color: tokens.colorNeutralForeground1,\n paddingTop: '4px',\n paddingBottom: '4px',\n paddingLeft: '8px',\n paddingRight: '8px',\n borderRadius: tokens.borderRadiusMedium,\n whiteSpace: 'pre-wrap',\n zIndex: 2,\n} as const;\n\nconst useStyles = makeStyles({\n root: {\n position: 'absolute',\n top: '0',\n left: '0',\n right: '0',\n bottom: '0',\n width: '100%',\n height: '100%',\n pointerEvents: 'none',\n overflow: 'visible',\n zIndex: 1,\n },\n annotation: {\n ...annotationBaseStyles,\n boxShadow: tokens.shadow16,\n border: `1px solid ${tokens.colorNeutralStroke1}`,\n },\n annotationNoDefaults: {\n ...annotationBaseStyles,\n },\n connectorLayer: {\n position: 'absolute',\n top: '0',\n left: '0',\n width: '100%',\n height: '100%',\n pointerEvents: 'none',\n overflow: 'visible',\n },\n measurement: {\n position: 'absolute',\n visibility: 'hidden',\n pointerEvents: 'none',\n },\n annotationContent: {\n width: '100%',\n height: '100%',\n pointerEvents: 'none',\n },\n annotationForeignObject: {\n overflow: 'visible',\n pointerEvents: 'none',\n },\n annotationContentInteractive: {\n pointerEvents: 'auto',\n },\n annotationForeignObjectInteractive: {\n pointerEvents: 'auto',\n },\n connectorGroup: {\n pointerEvents: 'none',\n },\n});\n\n/**\n * Apply styling to the ChartAnnotationLayer slots based on the state\n */\nexport const useChartAnnotationLayerStyles = (props: ChartAnnotationLayerStyleProps): ChartAnnotationLayerStyles => {\n const baseStyles = useStyles();\n\n return {\n root: mergeClasses(chartAnnotationLayerClassNames.root, baseStyles.root, props.className, props.styles?.root),\n annotation: mergeClasses(\n chartAnnotationLayerClassNames.annotation,\n baseStyles.annotation,\n props.styles?.annotation,\n ),\n connectorLayer: mergeClasses(\n chartAnnotationLayerClassNames.connectorLayer,\n baseStyles.connectorLayer,\n props.styles?.connectorLayer,\n ),\n measurement: mergeClasses(\n chartAnnotationLayerClassNames.measurement,\n baseStyles.measurement,\n props.styles?.measurement,\n ),\n annotationContent: mergeClasses(\n chartAnnotationLayerClassNames.annotationContent,\n baseStyles.annotationContent,\n props.styles?.annotationContent,\n ),\n annotationForeignObject: mergeClasses(\n chartAnnotationLayerClassNames.annotationForeignObject,\n baseStyles.annotationForeignObject,\n props.styles?.annotationForeignObject,\n ),\n annotationContentInteractive: mergeClasses(\n chartAnnotationLayerClassNames.annotationContentInteractive,\n baseStyles.annotationContentInteractive,\n props.styles?.annotationContentInteractive,\n ),\n annotationForeignObjectInteractive: mergeClasses(\n chartAnnotationLayerClassNames.annotationForeignObjectInteractive,\n baseStyles.annotationForeignObjectInteractive,\n props.styles?.annotationForeignObjectInteractive,\n ),\n connectorGroup: mergeClasses(\n chartAnnotationLayerClassNames.connectorGroup,\n baseStyles.connectorGroup,\n props.styles?.connectorGroup,\n ),\n };\n};\n"],"names":["makeStyles","mergeClasses","tokens","typographyStyles","color","d3Color","DEFAULT_ANNOTATION_BACKGROUND_OPACITY","DEFAULT_ANNOTATION_PADDING","DEFAULT_CONNECTOR_START_PADDING","DEFAULT_CONNECTOR_END_PADDING","DEFAULT_CONNECTOR_STROKE_WIDTH","DEFAULT_CONNECTOR_ARROW","applyOpacityToColor","opacity","options","undefined","parsed","originalOpacity","preserveOriginalOpacity","toString","Math","max","min","getDefaultAnnotationBackgroundColor","colorNeutralBackground1","getDefaultConnectorStrokeColor","colorNeutralForeground1","chartAnnotationLayerClassNames","root","annotation","annotationNoDefaults","connectorLayer","measurement","annotationContent","annotationForeignObject","annotationContentInteractive","annotationForeignObjectInteractive","connectorGroup","annotationBaseStyles","caption1","position","pointerEvents","display","alignItems","justifyContent","textAlign","paddingTop","paddingBottom","paddingLeft","paddingRight","borderRadius","borderRadiusMedium","whiteSpace","zIndex","useStyles","top","left","right","bottom","width","height","overflow","boxShadow","shadow16","border","colorNeutralStroke1","visibility","useChartAnnotationLayerStyles","props","baseStyles","className","styles"],"mappings":"AAAA;AAEA,SAASA,UAAU,EAAEC,YAAY,QAAQ,iBAAiB;AAE1D,SAASC,MAAM,EAAEC,gBAAgB,QAAQ,wBAAwB;AACjE,SAASC,SAASC,OAAO,QAAQ,WAAW;AAqB5C,OAAO,MAAMC,wCAAwC,IAAI;AACzD,OAAO,MAAMC,6BAA6B,UAAU;AACpD,OAAO,MAAMC,kCAAkC,GAAG;AAClD,OAAO,MAAMC,gCAAgC,EAAE;AAC/C,OAAO,MAAMC,iCAAiC,EAAE;AAChD,OAAO,MAAMC,0BAAoD,MAAM;AAEvE,OAAO,MAAMC,sBAAsB,CACjCR,OACAS,SACAC;IAIA,IAAI,CAACV,OAAO;QACV,OAAOW;IACT;IAEA,MAAMC,SAASX,QAAQD;IACvB,IAAI,CAACY,QAAQ;QACX,OAAOZ;IACT;IAEA,MAAMa,kBAAkB,OAAOD,OAAOH,OAAO,KAAK,WAAWG,OAAOH,OAAO,GAAG;QAC9CC;IAAhC,MAAMI,0BAA0BJ,CAAAA,mCAAAA,oBAAAA,8BAAAA,QAASI,uBAAuB,cAAhCJ,8CAAAA,mCAAoC;IAEpE,IAAII,2BAA2BD,kBAAkB,GAAG;QAClD,OAAOD,OAAOG,QAAQ;IACxB;IAEAH,OAAOH,OAAO,GAAGO,KAAKC,GAAG,CAAC,GAAGD,KAAKE,GAAG,CAAC,GAAGT;IACzC,OAAOG,OAAOG,QAAQ;AACxB,EAAE;AAEF;;;CAGC,GACD,OAAO,MAAMI,sCAAsC,IACjDX,oBAAoBV,OAAOsB,uBAAuB,EAAElB,uCAAuC;AAE7F;;;CAGC,GACD,OAAO,MAAMmB,iCAAiC,IAAcvB,OAAOwB,uBAAuB,CAAC;AAE3F;;CAEC,GACD,OAAO,MAAMC,iCAA6E;IACxFC,MAAM;IACNC,YAAY;IACZC,sBAAsB;IACtBC,gBAAgB;IAChBC,aAAa;IACbC,mBA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