@semcore/d3-chart 2.17.5 → 3.0.0-beta.1

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.
Files changed (156) hide show
  1. package/CHANGELOG.md +18 -2
  2. package/lib/cjs/Area.js +9 -9
  3. package/lib/cjs/Axis.js +14 -14
  4. package/lib/cjs/Bar.js +11 -10
  5. package/lib/cjs/Bar.js.map +1 -1
  6. package/lib/cjs/Bubble.js +18 -13
  7. package/lib/cjs/Bubble.js.map +1 -1
  8. package/lib/cjs/Donut.js +10 -8
  9. package/lib/cjs/Donut.js.map +1 -1
  10. package/lib/cjs/Dots.js +9 -9
  11. package/lib/cjs/HorizontalBar.js +11 -10
  12. package/lib/cjs/HorizontalBar.js.map +1 -1
  13. package/lib/cjs/Hover.js +33 -11
  14. package/lib/cjs/Hover.js.map +1 -1
  15. package/lib/cjs/Line.js +8 -8
  16. package/lib/cjs/Plot.js +3 -3
  17. package/lib/cjs/Radar.js +82 -71
  18. package/lib/cjs/Radar.js.map +1 -1
  19. package/lib/cjs/RadialTree.js +92 -74
  20. package/lib/cjs/RadialTree.js.map +1 -1
  21. package/lib/cjs/ReferenceLine.js +9 -9
  22. package/lib/cjs/ResponsiveContainer.js +1 -2
  23. package/lib/cjs/ResponsiveContainer.js.map +1 -1
  24. package/lib/cjs/ScatterPlot.js +15 -10
  25. package/lib/cjs/ScatterPlot.js.map +1 -1
  26. package/lib/cjs/Tooltip.js +8 -8
  27. package/lib/cjs/Venn.js +10 -8
  28. package/lib/cjs/Venn.js.map +1 -1
  29. package/lib/cjs/a11y/PlotA11yModule.js +2 -2
  30. package/lib/cjs/a11y/PlotA11yModule.js.map +1 -1
  31. package/lib/cjs/a11y/PlotA11yView.js +3 -3
  32. package/lib/cjs/a11y/hints.js.map +1 -1
  33. package/lib/cjs/a11y/serialize.js.map +1 -1
  34. package/lib/cjs/createElement.d.js +2 -0
  35. package/lib/cjs/createElement.d.js.map +1 -0
  36. package/lib/cjs/types/Area.d.js.map +1 -1
  37. package/lib/cjs/types/Axis.d.js.map +1 -1
  38. package/lib/cjs/types/Bar.d.js.map +1 -1
  39. package/lib/cjs/types/Bubble.d.js.map +1 -1
  40. package/lib/cjs/types/ClipPath.d.js.map +1 -1
  41. package/lib/cjs/types/Donut.d.js.map +1 -1
  42. package/lib/cjs/types/GroupBar.d.js.map +1 -1
  43. package/lib/cjs/types/HorizontalBar.d.js.map +1 -1
  44. package/lib/cjs/types/Hover.d.js.map +1 -1
  45. package/lib/cjs/types/Line.d.js.map +1 -1
  46. package/lib/cjs/types/Plot.d.js +0 -2
  47. package/lib/cjs/types/Plot.d.js.map +1 -1
  48. package/lib/cjs/types/Radar.d.js +2 -0
  49. package/lib/cjs/types/Radar.d.js.map +1 -0
  50. package/lib/cjs/types/ReferenceLine.d.js.map +1 -1
  51. package/lib/cjs/types/ResponsiveContainer.d.js.map +1 -1
  52. package/lib/cjs/types/ScatterPlot.d.js.map +1 -1
  53. package/lib/cjs/types/StackBar.d.js.map +1 -1
  54. package/lib/cjs/types/StackedArea.d.js.map +1 -1
  55. package/lib/cjs/types/Tooltip.d.js.map +1 -1
  56. package/lib/cjs/types/Venn.d.js.map +1 -1
  57. package/lib/cjs/types/context.d.js.map +1 -1
  58. package/lib/cjs/types/index.d.js.map +1 -1
  59. package/lib/cjs/utils.js.map +1 -1
  60. package/lib/es6/Area.js +9 -9
  61. package/lib/es6/Axis.js +14 -14
  62. package/lib/es6/Bar.js +11 -10
  63. package/lib/es6/Bar.js.map +1 -1
  64. package/lib/es6/Bubble.js +18 -13
  65. package/lib/es6/Bubble.js.map +1 -1
  66. package/lib/es6/Donut.js +10 -8
  67. package/lib/es6/Donut.js.map +1 -1
  68. package/lib/es6/Dots.js +9 -9
  69. package/lib/es6/HorizontalBar.js +11 -10
  70. package/lib/es6/HorizontalBar.js.map +1 -1
  71. package/lib/es6/Hover.js +36 -12
  72. package/lib/es6/Hover.js.map +1 -1
  73. package/lib/es6/Line.js +8 -8
  74. package/lib/es6/Plot.js +3 -3
  75. package/lib/es6/Radar.js +84 -72
  76. package/lib/es6/Radar.js.map +1 -1
  77. package/lib/es6/RadialTree.js +90 -72
  78. package/lib/es6/RadialTree.js.map +1 -1
  79. package/lib/es6/ReferenceLine.js +9 -9
  80. package/lib/es6/ResponsiveContainer.js +0 -1
  81. package/lib/es6/ResponsiveContainer.js.map +1 -1
  82. package/lib/es6/ScatterPlot.js +15 -10
  83. package/lib/es6/ScatterPlot.js.map +1 -1
  84. package/lib/es6/Tooltip.js +8 -8
  85. package/lib/es6/Venn.js +10 -8
  86. package/lib/es6/Venn.js.map +1 -1
  87. package/lib/es6/a11y/PlotA11yModule.js +2 -2
  88. package/lib/es6/a11y/PlotA11yModule.js.map +1 -1
  89. package/lib/es6/a11y/PlotA11yView.js +3 -3
  90. package/lib/es6/a11y/hints.js.map +1 -1
  91. package/lib/es6/a11y/serialize.js.map +1 -1
  92. package/lib/es6/createElement.d.js +2 -0
  93. package/lib/es6/createElement.d.js.map +1 -0
  94. package/lib/es6/types/Area.d.js.map +1 -1
  95. package/lib/es6/types/Axis.d.js.map +1 -1
  96. package/lib/es6/types/Bar.d.js.map +1 -1
  97. package/lib/es6/types/Bubble.d.js.map +1 -1
  98. package/lib/es6/types/ClipPath.d.js.map +1 -1
  99. package/lib/es6/types/Donut.d.js.map +1 -1
  100. package/lib/es6/types/GroupBar.d.js.map +1 -1
  101. package/lib/es6/types/HorizontalBar.d.js.map +1 -1
  102. package/lib/es6/types/Hover.d.js.map +1 -1
  103. package/lib/es6/types/Line.d.js.map +1 -1
  104. package/lib/es6/types/Plot.d.js +1 -1
  105. package/lib/es6/types/Plot.d.js.map +1 -1
  106. package/lib/es6/types/Radar.d.js +2 -0
  107. package/lib/es6/types/Radar.d.js.map +1 -0
  108. package/lib/es6/types/ReferenceLine.d.js.map +1 -1
  109. package/lib/es6/types/ResponsiveContainer.d.js.map +1 -1
  110. package/lib/es6/types/ScatterPlot.d.js.map +1 -1
  111. package/lib/es6/types/StackBar.d.js.map +1 -1
  112. package/lib/es6/types/StackedArea.d.js.map +1 -1
  113. package/lib/es6/types/Tooltip.d.js.map +1 -1
  114. package/lib/es6/types/Venn.d.js.map +1 -1
  115. package/lib/es6/types/context.d.js.map +1 -1
  116. package/lib/es6/types/index.d.js +3 -0
  117. package/lib/es6/types/index.d.js.map +1 -1
  118. package/lib/es6/utils.js.map +1 -1
  119. package/lib/types/Area.d.ts +26 -17
  120. package/lib/types/Axis.d.ts +40 -23
  121. package/lib/types/Bar.d.ts +32 -16
  122. package/lib/types/Bubble.d.ts +30 -12
  123. package/lib/types/ClipPath.d.ts +7 -5
  124. package/lib/types/Donut.d.ts +29 -13
  125. package/lib/types/GroupBar.d.ts +15 -12
  126. package/lib/types/HorizontalBar.d.ts +12 -12
  127. package/lib/types/Hover.d.ts +32 -8
  128. package/lib/types/Line.d.ts +33 -23
  129. package/lib/types/Plot.d.ts +34 -22
  130. package/lib/types/Radar.d.ts +145 -0
  131. package/lib/types/RadialTree.d.ts +53 -28
  132. package/lib/types/ReferenceLine.d.ts +27 -14
  133. package/lib/types/ResponsiveContainer.d.ts +18 -10
  134. package/lib/types/ScatterPlot.d.ts +25 -9
  135. package/lib/types/StackBar.d.ts +20 -14
  136. package/lib/types/StackedArea.d.ts +16 -12
  137. package/lib/types/Tooltip.d.ts +55 -23
  138. package/lib/types/Venn.d.ts +47 -29
  139. package/lib/types/a11y/PlotA11yModule.d.ts +1 -1
  140. package/lib/types/a11y/focus.d.ts +1 -1
  141. package/lib/types/a11y/hints.d.ts +5 -5
  142. package/lib/types/a11y/insights.d.ts +8 -8
  143. package/lib/types/a11y/intl.d.ts +1 -1
  144. package/lib/types/a11y/locale.d.ts +1 -1
  145. package/lib/types/a11y/serialize.d.ts +4 -4
  146. package/lib/types/a11y/summarize.d.ts +1 -1
  147. package/lib/types/context.d.ts +10 -0
  148. package/lib/types/createElement.d.ts +2 -0
  149. package/lib/types/index.d.ts +2 -0
  150. package/lib/types/utils.d.ts +10 -7
  151. package/package.json +10 -10
  152. package/lib/cjs/types/Radar.js +0 -2
  153. package/lib/cjs/types/Radar.js.map +0 -1
  154. package/lib/es6/types/Radar.js +0 -2
  155. package/lib/es6/types/Radar.js.map +0 -1
  156. package/lib/types/types/Radar.d.ts +0 -95
@@ -10,8 +10,8 @@ import { normalizeLocale } from './locale';
10
10
  import { localizedMessages } from './translations/module/__intergalactic-dynamic-locales';
11
11
  import { Root, sstyled } from '@semcore/core';
12
12
  /*__reshadow-styles__:"../style/plotA11yModule.shadow.css"*/
13
- var styles = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SPlotA11yModule_1kvea_gg_{-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none;opacity:0}.___SPlotA11yModule_1kvea_gg_:focus{-webkit-user-select:all;-moz-user-select:all;user-select:all;pointer-events:all;opacity:1}" /*__inner_css_end__*/, "1kvea_gg_") /*__reshadow_css_end__*/, {
14
- "__SPlotA11yModule": "___SPlotA11yModule_1kvea_gg_"
13
+ var styles = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SPlotA11yModule_b3u6c_gg_{-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none;opacity:0}.___SPlotA11yModule_b3u6c_gg_:focus{-webkit-user-select:all;-moz-user-select:all;user-select:all;pointer-events:all;opacity:1}" /*__inner_css_end__*/, "b3u6c_gg_") /*__reshadow_css_end__*/, {
14
+ "__SPlotA11yModule": "___SPlotA11yModule_b3u6c_gg_"
15
15
  });
16
16
  import { Context as I18nContext, useI18n } from '@semcore/utils/lib/enhances/WithI18n';
17
17
  import { Box } from '@semcore/flex-box';
@@ -1 +1 @@
1
- {"version":3,"file":"PlotA11yModule.js","names":["React","normalizeLocale","localizedMessages","Root","sstyled","styles","_sstyled","insert","Context","I18nContext","useI18n","Box","globalWasFocused","globalNavWithKeyboard","PlotA11yModule","props","_ref","arguments[0]","_ref5","SPlotA11yModule","_React$useState","useState","_React$useState2","_slicedToArray","wasFocused","setWasFocused","_React$useState3","_React$useState4","navWithKeyboard","setNavWithKeyboard","_React$useState5","_React$useState6","plotA11yView","setPlotA11yView","hadnleHiddenElementsFocus","useCallback","_React$useState7","_React$useState8","loading","setLoading","_React$useState9","_React$useState10","error","setError","contextLocale","useContext","locale","useMemo","_props$locale","t","useEffect","_props$plotRef$curren","focusListener","plotRef","current","addEventListener","_props$plotRef$curren2","removeEventListener","_document$body","keyboardListener","event","navigationKeys","includes","key","document","body","_document$body2","shouldDisplayView","then","_ref6","PlotA11yView","Component","console","_ref2","createElement","_extends","_ref3","cn","_objectSpread","_assignProps","_ref4","_assignProps2","_assignProps3"],"sources":["../../../src/a11y/PlotA11yModule.tsx"],"sourcesContent":["import React from 'react';\nimport { DataStructureHints, PartialDataSummarizationConfig } from './hints';\nimport { normalizeLocale } from './locale';\nimport { localizedMessages } from './translations/module/__intergalactic-dynamic-locales';\nimport { Root, sstyled } from '@semcore/core';\nimport styles from '../style/plotA11yModule.shadow.css';\nimport { Context as I18nContext, useI18n } from '@semcore/utils/lib/enhances/WithI18n';\nimport { Box } from '@semcore/flex-box';\n\nlet globalWasFocused = false;\nlet globalNavWithKeyboard = false;\n\nexport type A11yViewProps = {\n id: string;\n data: Record<string, unknown>[];\n hints: DataStructureHints;\n plotLabel: string;\n locale: NavigatorLanguage['language'];\n config: PartialDataSummarizationConfig;\n\n plotRef: React.RefObject<Element>;\n};\n\nexport const PlotA11yModule: React.FC<A11yViewProps> = (props) => {\n const SPlotA11yModule = Root;\n const [wasFocused, setWasFocused] = React.useState(globalWasFocused);\n const [navWithKeyboard, setNavWithKeyboard] = React.useState(globalNavWithKeyboard);\n const [plotA11yView, setPlotA11yView] = React.useState<{\n Component: React.FC<A11yViewProps>;\n } | null>(null);\n\n const hadnleHiddenElementsFocus = React.useCallback(() => {\n setWasFocused(true);\n setNavWithKeyboard(true);\n }, []);\n\n const [loading, setLoading] = React.useState(false);\n const [error, setError] = React.useState<Error | null>(null);\n\n const contextLocale = React.useContext(I18nContext);\n const locale = React.useMemo(\n () => normalizeLocale(props.locale ?? contextLocale, localizedMessages),\n [props.locale],\n );\n const t = useI18n(localizedMessages, locale);\n\n React.useEffect(() => {\n if (wasFocused) return;\n const focusListener = () => {\n globalWasFocused = true;\n setWasFocused(true);\n };\n\n props.plotRef.current?.addEventListener('focus', focusListener);\n return () => props.plotRef.current?.removeEventListener('focus', focusListener);\n }, [wasFocused, props.plotRef]);\n React.useEffect(() => {\n if (navWithKeyboard) return;\n const keyboardListener = (event: Event) => {\n const navigationKeys = [\n 'Tab',\n 'ArrowUp',\n 'ArrowLeft',\n 'ArrowDown',\n 'ArrowRight',\n 'ArrowUp',\n 'ArrowLeft',\n ];\n if ('key' in event && navigationKeys.includes((event as KeyboardEvent).key)) {\n setNavWithKeyboard(true);\n globalNavWithKeyboard = true;\n }\n };\n document.body?.addEventListener('keydown', keyboardListener);\n return () => document.body?.removeEventListener('keydown', keyboardListener);\n }, [navWithKeyboard]);\n\n const shouldDisplayView = wasFocused && navWithKeyboard;\n\n React.useEffect(() => {\n if (!shouldDisplayView) return;\n if (plotA11yView) return;\n if (loading) return;\n\n setLoading(true);\n\n import('./PlotA11yView')\n .then(({ PlotA11yView }) => {\n setPlotA11yView({ Component: PlotA11yView });\n setLoading(false);\n setError(null);\n })\n .catch((error) => {\n console.error(error);\n setError(error);\n });\n }, [plotA11yView, shouldDisplayView, loading, setLoading]);\n\n if (plotA11yView) {\n return sstyled(styles)(\n <plotA11yView.Component {...props} locale={locale!} />,\n ) as React.ReactElement;\n }\n\n if (error) {\n return sstyled(styles)(\n <SPlotA11yModule render={Box} tabIndex={0} aria-live='assertive'>\n {t('failed')}\n </SPlotA11yModule>,\n ) as React.ReactElement;\n }\n if (loading) {\n return sstyled(styles)(\n <SPlotA11yModule render={Box} tabIndex={0} aria-live='polite'>\n {t('loading')}\n </SPlotA11yModule>,\n ) as React.ReactElement;\n }\n\n return sstyled(styles)(\n <SPlotA11yModule render={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AAM,CAAC,eACpBL,KAAA,CAAA0E,aAAA,CAACvD,eAAe,EAAAD,KAAA,CAAA2D,EAAA,oBAAAC,aAAA,KAAAI,aAAA;IAAA,YAAwB,CAAC;IAAA,WAAWhD;EAAyB,GAAAlB,IAAA,KAC1EiC,CAAC,CAAC,UAAU,CAAC,CACE;AAEtB,CAAC"}
1
+ {"version":3,"file":"PlotA11yModule.js","names":["React","normalizeLocale","localizedMessages","Root","sstyled","styles","_sstyled","insert","Context","I18nContext","useI18n","Box","globalWasFocused","globalNavWithKeyboard","PlotA11yModule","props","_ref","arguments[0]","_ref5","SPlotA11yModule","_React$useState","useState","_React$useState2","_slicedToArray","wasFocused","setWasFocused","_React$useState3","_React$useState4","navWithKeyboard","setNavWithKeyboard","_React$useState5","_React$useState6","plotA11yView","setPlotA11yView","hadnleHiddenElementsFocus","useCallback","_React$useState7","_React$useState8","loading","setLoading","_React$useState9","_React$useState10","error","setError","contextLocale","useContext","locale","useMemo","_props$locale","t","useEffect","_props$plotRef$curren","focusListener","plotRef","current","addEventListener","_props$plotRef$curren2","removeEventListener","_document$body","keyboardListener","event","navigationKeys","includes","key","document","body","_document$body2","shouldDisplayView","then","_ref6","PlotA11yView","Component","console","_ref2","createElement","_extends","_ref3","cn","_objectSpread","_assignProps","_ref4","_assignProps2","_assignProps3"],"sources":["../../../src/a11y/PlotA11yModule.tsx"],"sourcesContent":["import React from 'react';\nimport { DataStructureHints, PartialDataSummarizationConfig } from './hints';\nimport { normalizeLocale } from './locale';\nimport { localizedMessages } from './translations/module/__intergalactic-dynamic-locales';\nimport { Root, sstyled } from '@semcore/core';\nimport styles from '../style/plotA11yModule.shadow.css';\nimport { Context as I18nContext, useI18n } from '@semcore/utils/lib/enhances/WithI18n';\nimport { Box } from '@semcore/flex-box';\n\nlet globalWasFocused = false;\nlet globalNavWithKeyboard = false;\n\nexport type A11yViewProps = {\n id: string;\n data: Record<string, unknown>[];\n hints: DataStructureHints;\n plotLabel: string;\n locale: NavigatorLanguage['language'];\n config: PartialDataSummarizationConfig;\n\n plotRef: React.RefObject<Element>;\n};\n\nexport const PlotA11yModule: React.FC<A11yViewProps> = (props) => {\n const SPlotA11yModule = Root;\n const [wasFocused, setWasFocused] = React.useState(globalWasFocused);\n const [navWithKeyboard, setNavWithKeyboard] = React.useState(globalNavWithKeyboard);\n const [plotA11yView, setPlotA11yView] = React.useState<{\n Component: React.FC<A11yViewProps>;\n } | null>(null);\n\n const hadnleHiddenElementsFocus = React.useCallback(() => {\n setWasFocused(true);\n setNavWithKeyboard(true);\n }, []);\n\n const [loading, setLoading] = React.useState(false);\n const [error, setError] = React.useState<Error | null>(null);\n\n const contextLocale = React.useContext(I18nContext);\n const locale = React.useMemo(\n () => normalizeLocale(props.locale ?? contextLocale, localizedMessages),\n [props.locale],\n );\n const t = useI18n(localizedMessages, locale!);\n\n React.useEffect(() => {\n if (wasFocused) return;\n const focusListener = () => {\n globalWasFocused = true;\n setWasFocused(true);\n };\n\n props.plotRef.current?.addEventListener('focus', focusListener);\n return () => props.plotRef.current?.removeEventListener('focus', focusListener);\n }, [wasFocused, props.plotRef]);\n React.useEffect(() => {\n if (navWithKeyboard) return;\n const keyboardListener = (event: Event) => {\n const navigationKeys = [\n 'Tab',\n 'ArrowUp',\n 'ArrowLeft',\n 'ArrowDown',\n 'ArrowRight',\n 'ArrowUp',\n 'ArrowLeft',\n ];\n if ('key' in event && navigationKeys.includes((event as KeyboardEvent).key)) {\n setNavWithKeyboard(true);\n globalNavWithKeyboard = true;\n }\n };\n document.body?.addEventListener('keydown', keyboardListener);\n return () => document.body?.removeEventListener('keydown', keyboardListener);\n }, [navWithKeyboard]);\n\n const shouldDisplayView = wasFocused && navWithKeyboard;\n\n React.useEffect(() => {\n if (!shouldDisplayView) return;\n if (plotA11yView) return;\n if (loading) return;\n\n setLoading(true);\n\n import('./PlotA11yView')\n .then(({ PlotA11yView }) => {\n setPlotA11yView({ Component: PlotA11yView });\n setLoading(false);\n setError(null);\n })\n .catch((error) => {\n console.error(error);\n setError(error);\n });\n }, [plotA11yView, shouldDisplayView, loading, setLoading]);\n\n if (plotA11yView) {\n return sstyled(styles)(\n <plotA11yView.Component {...props} locale={locale!} />,\n ) as React.ReactElement;\n }\n\n if (error) {\n return sstyled(styles)(\n <SPlotA11yModule render={Box} tabIndex={0} aria-live='assertive'>\n {t('failed')}\n </SPlotA11yModule>,\n ) as React.ReactElement;\n }\n if (loading) {\n return sstyled(styles)(\n <SPlotA11yModule render={Box} tabIndex={0} aria-live='polite'>\n {t('loading')}\n </SPlotA11yModule>,\n ) as React.ReactElement;\n }\n\n return sstyled(styles)(\n <SPlotA11yModule render={Box} tabIndex={0} onFocus={hadnleHiddenElementsFocus}>\n {t('disabled')}\n </SPlotA11yModule>,\n ) as React.ReactElement;\n};\n"],"mappings":";;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAASC,eAAe,QAAQ,UAAU;AAC1C,SAASC,iBAAiB,QAAQ,uDAAuD;AACzF,SAASC,IAAI,EAAEC,OAAO,QAAQ,eAAe;AAAC;AAAA,IAAAC,MAAA,+BAAAC,QAAA,CAAAC,MAAA;EAAA;AAAA;AAE9C,SAASC,OAAO,IAAIC,WAAW,EAAEC,OAAO,QAAQ,sCAAsC;AACtF,SAASC,GAAG,QAAQ,mBAAmB;AAEvC,IAAIC,gBAAgB,GAAG,KAAK;AAC5B,IAAIC,qBAAqB,GAAG,KAAK;AAajC,OAAO,IAAMC,cAAuC,GAAG,SAA1CA,cAAuCA,CAAIC,KAAK,EAAK;EAAA,IAAAC,IAAA,GAAAC,YAAA;IAAAC,KAAA;EAChE,IAAMC,eAAe,GAgGMR,GAAG;EA/F9B,IAAAS,eAAA,GAAoCpB,KAAK,CAACqB,QAAQ,CAACT,gBAAgB,CAAC;IAAAU,gBAAA,GAAAC,cAAA,CAAAH,eAAA;IAA7DI,UAAU,GAAAF,gBAAA;IAAEG,aAAa,GAAAH,gBAAA;EAChC,IAAAI,gBAAA,GAA8C1B,KAAK,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AAW,GAAA/D,IAAA,KAC7DiC,CAAC,CAAC,QAAQ,CAAC,CACI;EAEtB;EACA,IAAIX,OAAO,EAAE;IAAA,IAAA0C,KAAA;IACX,OAAAA,KAAA,GAAO5E,OAAO,CAACC,MAAM,CAAC,eACpBL,KAAA,CAAA0E,aAAA,CAACvD,eAAe,EAAA6D,KAAA,CAAAH,EAAA,oBAAAC,aAAA,KAAAG,aAAA;MAAA,YAAwB,CAAC;MAAA,aAAY;IAAQ,GAAAjE,IAAA,KAC1DiC,CAAC,CAAC,SAAS,CAAC,CACG;EAEtB;EAEA,OAAA/B,KAAA,GAAOd,OAAO,CAACC,MAAM,CAAC,eACpBL,KAAA,CAAA0E,aAAA,CAACvD,eAAe,EAAAD,KAAA,CAAA2D,EAAA,oBAAAC,aAAA,KAAAI,aAAA;IAAA,YAAwB,CAAC;IAAA,WAAWhD;EAAyB,GAAAlB,IAAA,KAC1EiC,CAAC,CAAC,UAAU,CAAC,CACE;AAEtB,CAAC"}
@@ -12,9 +12,9 @@ import { getIntl } from './intl';
12
12
  import { summarize } from './summarize';
13
13
  import { Root, sstyled } from '@semcore/core';
14
14
  /*__reshadow-styles__:"../style/plotA11yView.shadow.css"*/
15
- var styles = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SPlotA11yView_1yzv6_gg_{-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none;opacity:0;background-color:var(--intergalactic-bg-primary-neutral, #ffffff);color:var(--intergalactic-text-primary, #191b23);border:3px solid var(--intergalactic-border-primary, #c4c7cf);font-size:var(--intergalactic-fs-50, 10px);padding:2px;width:200px;height:200px;max-width:80%;max-height:80%;overflow:auto}.___SPlotA11yView_1yzv6_gg_.__focus-within_1yzv6_gg_,.___SPlotA11yView_1yzv6_gg_:focus{-webkit-user-select:all;-moz-user-select:all;user-select:all;pointer-events:all;opacity:1;z-index:var(--intergalactic-z-index-overlay, 500);position:relative;display:block}.___SPlotA11yView_1yzv6_gg_:focus,.___SPlotA11yView_1yzv6_gg_:focus-within{-webkit-user-select:all;-moz-user-select:all;user-select:all;pointer-events:all;opacity:1;z-index:var(--intergalactic-z-index-overlay, 500);position:relative;display:block}.___SPlotA11yView_1yzv6_gg_ a{cursor:pointer;text-decoration:underline;margin-bottom:var(--intergalactic-spacing-2x, 8px);display:block}.___SPlotA11yView_1yzv6_gg_ table,.___SPlotA11yView_1yzv6_gg_ td,.___SPlotA11yView_1yzv6_gg_ th{border:1px solid var(--intergalactic-border-primary, #c4c7cf)}" /*__inner_css_end__*/, "1yzv6_gg_") /*__reshadow_css_end__*/, {
16
- "__SPlotA11yView": "___SPlotA11yView_1yzv6_gg_",
17
- "_focus-within": "__focus-within_1yzv6_gg_"
15
+ var styles = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SPlotA11yView_104s4_gg_{-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none;opacity:0;background-color:var(--intergalactic-bg-primary-neutral, #ffffff);color:var(--intergalactic-text-primary, #191b23);border:3px solid var(--intergalactic-border-primary, #c4c7cf);font-size:var(--intergalactic-fs-50, 10px);padding:2px;width:200px;height:200px;max-width:80%;max-height:80%;overflow:auto}.___SPlotA11yView_104s4_gg_.__focus-within_104s4_gg_,.___SPlotA11yView_104s4_gg_:focus{-webkit-user-select:all;-moz-user-select:all;user-select:all;pointer-events:all;opacity:1;z-index:var(--intergalactic-z-index-overlay, 500);position:relative;display:block}.___SPlotA11yView_104s4_gg_:focus,.___SPlotA11yView_104s4_gg_:focus-within{-webkit-user-select:all;-moz-user-select:all;user-select:all;pointer-events:all;opacity:1;z-index:var(--intergalactic-z-index-overlay, 500);position:relative;display:block}.___SPlotA11yView_104s4_gg_ a{cursor:pointer;text-decoration:underline;margin-bottom:var(--intergalactic-spacing-2x, 8px);display:block}.___SPlotA11yView_104s4_gg_ table,.___SPlotA11yView_104s4_gg_ td,.___SPlotA11yView_104s4_gg_ th{border:1px solid var(--intergalactic-border-primary, #c4c7cf)}" /*__inner_css_end__*/, "104s4_gg_") /*__reshadow_css_end__*/, {
16
+ "__SPlotA11yView": "___SPlotA11yView_104s4_gg_",
17
+ "_focus-within": "__focus-within_104s4_gg_"
18
18
  });
19
19
  import { Box } from '@semcore/flex-box';
20
20
  import { useAsyncI18nMessages } from '@semcore/utils/lib/enhances/i18nEnhance';
@@ -1 +1 @@
1
- {"version":3,"file":"hints.js","names":["reactToText","makeDataHintsContainer","fields","verticalAxes","Set","horizontalAxes","valueAxes","values","groups","axesTitle","vertical","horizontal","titles","getVerticalAxesTitle","getHorizontalAxesTitle","valuesAxes","getValueAxesTitle","grid","dataType","pointsDensity","makeDataHintsHandlers","mutableContainer","handler","specifyDataRowFields","x","y","value","add","setupGrid","direction","size","establishDataType","describeValueEntity","dataKey","readableName","labelKey","describeGroupedValues","groupKey","axes","label","addKeyLabelGetter","getter","setTitle","describedDataAxes","title","_typeof","Date","String","setPointsDensity","makeDataSummarizationConfig","config","_config$trendTangens","_config$movingAverage","_config$additionalFie","_objectSpread","clustersGridSize","undefined","maxListSymbols","datesWithTime","clustersLimit","valuesLimit","groupsLimit","disable","override","trendTangens","weak","medium","strong","Infinity","movingAverage","longSize","shortSize","notableDiff","additionalFields","_toConsumableArray"],"sources":["../../../src/a11y/hints.ts"],"sourcesContent":["import { SerializableDataType } from './insights';\nimport reactToText from '@semcore/utils/lib/reactToText';\n\ntype DeepPartial<T> = T extends object\n ? {\n [P in keyof T]?: DeepPartial<T[P]>;\n }\n : T;\n\nexport type DataStructureHints = {\n fields: {\n verticalAxes: Set<string | number>;\n horizontalAxes: Set<string | number>;\n valueAxes: Set<string | number>;\n values: Set<string | number>;\n };\n groups: Set<string | number>;\n axesTitle: {\n vertical: string | null;\n horizontal: string | null;\n };\n titles: {\n verticalAxes: {\n [dataKey: string | number]: string;\n };\n getVerticalAxesTitle: null | ((dataKey: string | number) => string);\n horizontalAxes: {\n [dataKey: string | number]: string;\n };\n getHorizontalAxesTitle: null | ((dataKey: string | number) => string);\n valuesAxes: {\n [dataKey: string | number]: string;\n };\n getValueAxesTitle: null | ((dataKey: string | number) => string);\n };\n grid: {\n verticalAxes: number | null;\n horizontalAxes: number | null;\n };\n pointsDensity: {\n verticalAxes: number;\n horizontalAxes: number;\n } | null;\n dataType: SerializableDataType | null;\n};\nexport type DataSummarizationConfig = {\n trendTangens: {\n static: number;\n weak: number;\n medium: number;\n strong: number;\n };\n movingAverage: {\n longSize: number | undefined;\n shortSize: number | undefined;\n notableDiff: number | undefined;\n };\n dataType: SerializableDataType | undefined;\n clustersGridSize: number | undefined;\n maxListSymbols: number;\n datesWithTime: boolean | undefined;\n clustersLimit: number;\n valuesLimit: number;\n groupsLimit: number;\n disable: boolean;\n override: string | undefined;\n additionalFields: string[];\n};\nexport type PartialDataSummarizationConfig = DeepPartial<DataSummarizationConfig>;\n\nexport const makeDataHintsContainer = (): DataStructureHints => ({\n fields: {\n verticalAxes: new Set(),\n horizontalAxes: new Set(),\n valueAxes: new Set(),\n values: new Set(),\n },\n groups: new Set(),\n axesTitle: {\n vertical: null,\n horizontal: null,\n },\n titles: {\n verticalAxes: {},\n getVerticalAxesTitle: null,\n horizontalAxes: {},\n getHorizontalAxesTitle: null,\n valuesAxes: {},\n getValueAxesTitle: null,\n },\n grid: {\n verticalAxes: null,\n horizontalAxes: null,\n },\n dataType: null,\n pointsDensity: null,\n});\n\nexport const makeDataHintsHandlers = (mutableContainer: DataStructureHints) => {\n const handler = {\n specifyDataRowFields: (x?: string, y?: string, value?: string) => {\n if (y) mutableContainer.fields.verticalAxes.add(y);\n if (x) mutableContainer.fields.horizontalAxes.add(x);\n if (value) mutableContainer.fields.valueAxes.add(value);\n },\n setupGrid: (direction: 'vertical' | 'horizontal', size: number) => {\n if (direction === 'horizontal') {\n mutableContainer.grid.horizontalAxes = size;\n } else if (direction === 'vertical') {\n mutableContainer.grid.verticalAxes = size;\n }\n },\n establishDataType: (dataType: SerializableDataType) => {\n mutableContainer.dataType = dataType;\n },\n describeValueEntity: (dataKey: string | number, readableName: string) => {\n mutableContainer.fields.values.add(dataKey);\n handler.labelKey('value', dataKey, readableName);\n },\n describeGroupedValues: (groupKey: string | number, dataKey: string | number) => {\n mutableContainer.groups.add(groupKey);\n mutableContainer.fields.values.add(dataKey);\n },\n labelKey: (\n axes: 'vertical' | 'horizontal' | 'value',\n dataKey: string | number,\n label: string,\n ) => {\n if (axes === 'vertical') mutableContainer.titles.verticalAxes[dataKey] = label;\n if (axes === 'horizontal') mutableContainer.titles.horizontalAxes[dataKey] = label;\n if (axes === 'value') mutableContainer.titles.valuesAxes[dataKey] = label;\n },\n addKeyLabelGetter: (\n axes: 'vertical' | 'horizontal' | 'value',\n getter: (dataKey: string | number) => string,\n ) => {\n if (axes === 'vertical') mutableContainer.titles.getVerticalAxesTitle = getter;\n if (axes === 'horizontal') mutableContainer.titles.getHorizontalAxesTitle = getter;\n if (axes === 'value') mutableContainer.titles.getValueAxesTitle = getter;\n },\n setTitle: (describedDataAxes: 'vertical' | 'horizontal', title: string) => {\n if (\n typeof title === 'number' ||\n typeof title === 'bigint' ||\n (typeof title === 'object' && (title as any) instanceof Date)\n ) {\n title = String(title);\n }\n if (typeof title !== 'string') {\n title = reactToText(title);\n }\n if (describedDataAxes === 'horizontal') {\n mutableContainer.axesTitle.horizontal = title;\n } else if (describedDataAxes === 'vertical') {\n mutableContainer.axesTitle.vertical = title;\n }\n },\n setPointsDensity: (horizontalAxes: number, verticalAxes: number) => {\n mutableContainer.pointsDensity = { verticalAxes, horizontalAxes };\n },\n };\n return handler;\n};\n\nexport type DataHintsHandler = ReturnType<typeof makeDataHintsHandlers>;\n\nexport const makeDataSummarizationConfig = (\n config?: PartialDataSummarizationConfig,\n): DataSummarizationConfig => ({\n clustersGridSize: undefined,\n maxListSymbols: 100,\n datesWithTime: undefined,\n clustersLimit: 5,\n valuesLimit: 5,\n groupsLimit: 5,\n dataType: undefined,\n disable: false,\n override: undefined,\n ...(config ?? {}),\n trendTangens: {\n static: 1 / 15,\n weak: 1 / 10,\n medium: 1 / 5,\n strong: Infinity,\n ...(config?.trendTangens ?? {}),\n },\n movingAverage: {\n longSize: undefined,\n shortSize: undefined,\n notableDiff: undefined,\n ...(config?.movingAverage ?? {}),\n },\n additionalFields: [...(config?.additionalFields ?? [])],\n});\n"],"mappings":";;;AACA,OAAOA,WAAW,MAAM,gCAAgC;AAqExD,OAAO,IAAMC,sBAAsB,GAAG,SAAzBA,sBAAsBA,CAAA;EAAA,OAA8B;IAC/DC,MAAM,EAAE;MACNC,YAAY,EAAE,IAAIC,GAAG,EAAE;MACvBC,cAAc,EAAE,IAAID,GAAG,EAAE;MACzBE,SAAS,EAAE,IAAIF,GAAG,EAAE;MACpBG,MAAM,EAAE,IAAIH,GAAG;IACjB,CAAC;IACDI,MAAM,EAAE,IAAIJ,GAAG,EAAE;IACjBK,SAAS,EAAE;MACTC,QAAQ,EAAE,IAAI;MACdC,UAAU,EAAE;IACd,CAAC;IACDC,MAAM,EAAE;MACNT,YAAY,EAAE,CAAC,CAAC;MAChBU,oBAAoB,EAAE,IAAI;MAC1BR,cAAc,EAAE,CAAC,CAAC;MAClBS,sBAAsB,EAAE,IAAI;MAC5BC,UAAU,EAAE,CAAC,CAAC;MACdC,iBAAiB,EAAE;IACrB,CAAC;IACDC,IAAI,EAAE;MACJd,YAAY,EAAE,IAAI;MAClBE,cAAc,EAAE;IAClB,CAAC;IACDa,QAAQ,EAAE,IAAI;IACdC,aAAa,EAAE;EACjB,CAAC;AAAA,CAAC;AAEF,OAAO,IAAMC,qBAAqB,GAAG,SAAxBA,qBAAqBA,CAAIC,gBAAoC,EAAK;EAC7E,IAAMC,OAAO,GAAG;IACdC,oBAAoB,EAAE,SAAAA,qBAACC,CAAU,EAAEC,CAAU,EAAEC,KAAc,EAAK;MAChE,IAAID,CAAC,EAAEJ,gBAAgB,CAACnB,MAAM,CAACC,YAAY,CAACwB,GAAG,CAACF,CAAC,CAAC;MAClD,IAAID,CAAC,EAAEH,gBAAgB,CAACnB,MAA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B,OAAO;AAChB,CAAC;AAID,OAAO,IAAM2B,2BAA2B,GAAG,SAA9BA,2BAA2BA,CACtCC,MAAuC;EAAA,IAAAC,oBAAA,EAAAC,qBAAA,EAAAC,qBAAA;EAAA,OAAAC,aAAA,CAAAA,aAAA;IAEvCC,gBAAgB,EAAEC,SAAS;IAC3BC,cAAc,EAAE,GAAG;IACnBC,aAAa,EAAEF,SAAS;IACxBG,aAAa,EAAE,CAAC;IAChBC,WAAW,EAAE,CAAC;IACdC,WAAW,EAAE,CAAC;IACd3C,QAAQ,EAAEsC,SAAS;IACnBM,OAAO,EAAE,KAAK;IACdC,QAAQ,EAAEP;EAAS,GACfN,MAAM,aAANA,MAAM,cAANA,MAAM,GAAI,CAAC,CAAC;IAChBc,YAAY,EAAAV,aAAA;MACV,UAAQ,CAAC,GAAG,EAAE;MACdW,IAAI,EAAE,CAAC,GAAG,EAAE;MACZC,MAAM,EAAE,CAAC,GAAG,CAAC;MACbC,MAAM,EAAEC;IAAQ,IAAAjB,oBAAA,GACZD,MAAM,aAANA,MAAM,uBAANA,MAAM,CAAEc,YAAY,cAAAb,oBAAA,cAAAA,oBAAA,GAAI,CAAC,CAAC,CAC/B;IACDkB,aAAa,EAAAf,aAAA;MACXgB,QAAQ,EAAEd,SAAS;MACnBe,SAAS,EAAEf,SAAS;MACpBgB,WAAW,EAAEhB;IAAS,IAAAJ,qBAAA,GAClBF,MAAM,aAANA,MAAM,uBAANA,MAAM,CAAEmB,aAAa,cAAAjB,qBAAA,cAAAA,qBAAA,GAAI,CAAC,CAAC,CAChC;IACDqB,gBAAgB,EAAAC,kBAAA,EAAArB,qBAAA,GAAOH,MAAM,aAANA,MAAM,uBAANA,MAAM,CAAEuB,gBAAgB,cAAApB,qBAAA,cAAAA,qBAAA,GAAI,EAAE;EAAE;AAAA,CACvD"}
1
+ {"version":3,"file":"hints.js","names":["reactToText","makeDataHintsContainer","fields","verticalAxes","Set","horizontalAxes","valueAxes","values","groups","axesTitle","vertical","horizontal","titles","getVerticalAxesTitle","getHorizontalAxesTitle","valuesAxes","getValueAxesTitle","grid","dataType","pointsDensity","makeDataHintsHandlers","mutableContainer","handler","specifyDataRowFields","x","y","value","add","setupGrid","direction","size","establishDataType","describeValueEntity","dataKey","readableName","labelKey","describeGroupedValues","groupKey","axes","label","addKeyLabelGetter","getter","setTitle","describedDataAxes","title","_typeof","Date","String","setPointsDensity","makeDataSummarizationConfig","config","_config$trendTangens","_config$movingAverage","_config$additionalFie","_objectSpread","clustersGridSize","undefined","maxListSymbols","datesWithTime","clustersLimit","valuesLimit","groupsLimit","disable","override","trendTangens","weak","medium","strong","Infinity","movingAverage","longSize","shortSize","notableDiff","additionalFields","_toConsumableArray"],"sources":["../../../src/a11y/hints.ts"],"sourcesContent":["import { SerializableDataType } from './insights';\nimport reactToText from '@semcore/utils/lib/reactToText';\n\ntype DeepPartial<T> = T extends object\n ? {\n [P in keyof T]?: DeepPartial<T[P]>;\n }\n : T;\n\nexport type DataStructureHints = {\n fields: {\n verticalAxes: Set<string | number>;\n horizontalAxes: Set<string | number>;\n valueAxes: Set<string | number>;\n values: Set<string | number>;\n };\n groups: Set<string | number>;\n axesTitle: {\n vertical: string | null;\n horizontal: string | null;\n };\n titles: {\n verticalAxes: {\n [dataKey: string | number]: string;\n };\n getVerticalAxesTitle: null | ((dataKey: string | number) => string);\n horizontalAxes: {\n [dataKey: string | number]: string;\n };\n getHorizontalAxesTitle: null | ((dataKey: string | number) => string);\n valuesAxes: {\n [dataKey: string | number]: string;\n };\n getValueAxesTitle: null | ((dataKey: string | number) => string);\n };\n grid: {\n verticalAxes: number | null;\n horizontalAxes: number | null;\n };\n pointsDensity: {\n verticalAxes: number;\n horizontalAxes: number;\n } | null;\n dataType: SerializableDataType | null;\n};\nexport type DataSummarizationConfig = {\n trendTangens: {\n static: number;\n weak: number;\n medium: number;\n strong: number;\n };\n movingAverage: {\n longSize: number | undefined;\n shortSize: number | undefined;\n notableDiff: number | undefined;\n };\n dataType: SerializableDataType | undefined;\n clustersGridSize: number | undefined;\n maxListSymbols: number;\n datesWithTime: boolean | undefined;\n clustersLimit: number;\n valuesLimit: number;\n groupsLimit: number;\n disable: boolean;\n override: string | undefined;\n additionalFields: string[];\n};\nexport type PartialDataSummarizationConfig = DeepPartial<DataSummarizationConfig>;\n\nexport const makeDataHintsContainer = (): DataStructureHints => ({\n fields: {\n verticalAxes: new Set(),\n horizontalAxes: new Set(),\n valueAxes: new Set(),\n values: new Set(),\n },\n groups: new Set(),\n axesTitle: {\n vertical: null,\n horizontal: null,\n },\n titles: {\n verticalAxes: {},\n getVerticalAxesTitle: null,\n horizontalAxes: {},\n getHorizontalAxesTitle: null,\n valuesAxes: {},\n getValueAxesTitle: null,\n },\n grid: {\n verticalAxes: null,\n horizontalAxes: null,\n },\n dataType: null,\n pointsDensity: null,\n});\n\nexport const makeDataHintsHandlers = (mutableContainer: DataStructureHints) => {\n const handler = {\n specifyDataRowFields: (x?: string, y?: string, value?: string) => {\n if (y) mutableContainer.fields.verticalAxes.add(y);\n if (x) mutableContainer.fields.horizontalAxes.add(x);\n if (value) mutableContainer.fields.valueAxes.add(value);\n },\n setupGrid: (direction: 'vertical' | 'horizontal', size: number) => {\n if (direction === 'horizontal') {\n mutableContainer.grid.horizontalAxes = size;\n } else if (direction === 'vertical') {\n mutableContainer.grid.verticalAxes = size;\n }\n },\n establishDataType: (dataType: SerializableDataType) => {\n mutableContainer.dataType = dataType;\n },\n describeValueEntity: (dataKey: string | number, readableName: string) => {\n mutableContainer.fields.values.add(dataKey);\n handler.labelKey('value', dataKey, readableName);\n },\n describeGroupedValues: (groupKey: string | number, dataKey: string | number) => {\n mutableContainer.groups.add(groupKey);\n mutableContainer.fields.values.add(dataKey);\n },\n labelKey: (\n axes: 'vertical' | 'horizontal' | 'value',\n dataKey: string | number,\n label: string,\n ) => {\n if (axes === 'vertical') mutableContainer.titles.verticalAxes[dataKey] = label;\n if (axes === 'horizontal') mutableContainer.titles.horizontalAxes[dataKey] = label;\n if (axes === 'value') mutableContainer.titles.valuesAxes[dataKey] = label;\n },\n addKeyLabelGetter: (\n axes: 'vertical' | 'horizontal' | 'value',\n getter: (dataKey: string | number) => string,\n ) => {\n if (axes === 'vertical') mutableContainer.titles.getVerticalAxesTitle = getter;\n if (axes === 'horizontal') mutableContainer.titles.getHorizontalAxesTitle = getter;\n if (axes === 'value') mutableContainer.titles.getValueAxesTitle = getter;\n },\n setTitle: (describedDataAxes: 'vertical' | 'horizontal', title: string) => {\n if (\n typeof title === 'number' ||\n typeof title === 'bigint' ||\n (typeof title === 'object' && (title as any) instanceof Date)\n ) {\n title = String(title);\n }\n if (typeof title !== 'string') {\n title = reactToText(title);\n }\n if (describedDataAxes === 'horizontal') {\n mutableContainer.axesTitle.horizontal = title;\n } else if (describedDataAxes === 'vertical') {\n mutableContainer.axesTitle.vertical = title;\n }\n },\n setPointsDensity: (horizontalAxes: number, verticalAxes: number) => {\n mutableContainer.pointsDensity = { verticalAxes, horizontalAxes };\n },\n };\n return handler;\n};\n\nexport type DataHintsHandler = ReturnType<typeof makeDataHintsHandlers>;\n\nexport const makeDataSummarizationConfig = (\n config?: PartialDataSummarizationConfig,\n): DataSummarizationConfig => ({\n clustersGridSize: undefined,\n maxListSymbols: 100,\n datesWithTime: undefined,\n clustersLimit: 5,\n valuesLimit: 5,\n groupsLimit: 5,\n dataType: undefined,\n disable: false,\n override: undefined,\n ...(config ?? {}),\n trendTangens: {\n static: 1 / 15,\n weak: 1 / 10,\n medium: 1 / 5,\n strong: Infinity,\n ...(config?.trendTangens ?? {}),\n },\n movingAverage: {\n longSize: undefined,\n shortSize: undefined,\n notableDiff: undefined,\n ...(config?.movingAverage ?? {}),\n },\n additionalFields: [...(config?.additionalFields ?? [])] as string[],\n});\n"],"mappings":";;;AACA,OAAOA,WAAW,MAAM,gCAAgC;AAqExD,OAAO,IAAMC,sBAAsB,GAAG,SAAzBA,sBAAsBA,CAAA;EAAA,OAA8B;IAC/DC,MAAM,EAAE;MACNC,YAAY,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C;IACd3C,QAAQ,EAAEsC,SAAS;IACnBM,OAAO,EAAE,KAAK;IACdC,QAAQ,EAAEP;EAAS,GACfN,MAAM,aAANA,MAAM,cAANA,MAAM,GAAI,CAAC,CAAC;IAChBc,YAAY,EAAAV,aAAA;MACV,UAAQ,CAAC,GAAG,EAAE;MACdW,IAAI,EAAE,CAAC,GAAG,EAAE;MACZC,MAAM,EAAE,CAAC,GAAG,CAAC;MACbC,MAAM,EAAEC;IAAQ,IAAAjB,oBAAA,GACZD,MAAM,aAANA,MAAM,uBAANA,MAAM,CAAEc,YAAY,cAAAb,oBAAA,cAAAA,oBAAA,GAAI,CAAC,CAAC,CAC/B;IACDkB,aAAa,EAAAf,aAAA;MACXgB,QAAQ,EAAEd,SAAS;MACnBe,SAAS,EAAEf,SAAS;MACpBgB,WAAW,EAAEhB;IAAS,IAAAJ,qBAAA,GAClBF,MAAM,aAANA,MAAM,uBAANA,MAAM,CAAEmB,aAAa,cAAAjB,qBAAA,cAAAA,qBAAA,GAAI,CAAC,CAAC,CAChC;IACDqB,gBAAgB,EAAAC,kBAAA,EAAArB,qBAAA,GAAOH,MAAM,aAANA,MAAM,uBAANA,MAAM,CAAEuB,gBAAgB,cAAApB,qBAAA,cAAAA,qBAAA,GAAI,EAAE;EAAc;AAAA,CACnE"}
@@ -1 +1 @@
1
- {"version":3,"file":"serialize.js","names":["getIntl","formatLimitedSizeList","items","intl","maxFinalStringLength","arguments","length","undefined","includeEllipsis","limit","stringifyList","cutItems","slice","push","formatMessage","id","leftCount","formatList","formattedList","overflowRatio","Math","floor","maxIncreaseAttempts","i","newLimitFormattedList","isReactComponent","obj","_typeof","displayName","guessNumberAsTimestampMinDate","Date","getTime","formatValue","value","_ref","siblingsTimeMark","maxListSymbols","datesWithTime","formatNumber","abs","formatDate","dateStyle","timeStyle","Array","isArray","formattedValues","map","subValue","String","formatValuesList","values","_ref2","result","_ref3","rawValue","label","serialize","_ref4","_ref5","_ref6","insights","dataType","dataRange","dataTitle","entitiesCount","clustersLimit","valuesLimit","groupsLimit","locale","translations","availableLocales","dataRangeSummary","range","from","to","trendsInsights","trendsByDataKey","_iterator","_createForOfIteratorHelper","_step","s","n","done","_trendsByDataKey$insi","insight","dataKey","err","e","f","entities","count","entitiesList","Object","entries","_ref7","_ref8","_slicedToArray","generalTrend","find","type","localTrends","filter","primaryTrend","secondaryTrends","mainSummary","trend","concat","change","strength","secondarylSummaries","general","locals","summary","clustersInsights","biggestClusters","maxSize","size","minSize","clusterInsight","labels","anonymous","relativeSize","x","center","xLabel","y","yLabel","_ref9","_ref10","valuesInsight","groupInsights","valueCounts","group","minValuesCount","min","apply","_toConsumableArray","maxValuesCount","max","groupsCount","valuesCount","_ref11","sumamry"],"sources":["../../../src/a11y/serialize.ts"],"sourcesContent":["import { AnalyzedData, ClusterNode, ComparisonNode, GeneralTrendNode, TrendNode } from './insights';\n\nimport React from 'react';\nimport { DataSummarizationConfig } from './hints';\nimport { getIntl, Intl } from './intl';\n\nconst formatLimitedSizeList = (\n items: unknown[],\n intl: Intl,\n maxFinalStringLength = 100,\n includeEllipsis = true,\n) => {\n let limit = items.length;\n const stringifyList = () => {\n const cutItems = items.slice(0, limit);\n if (items.length > limit && includeEllipsis) {\n cutItems.push(intl.formatMessage({ id: 'ellipsis' }, { leftCount: limit - items.length }));\n }\n\n return intl.formatList(cutItems);\n };\n\n let formattedList = stringifyList();\n if (formattedList.length <= maxFinalStringLength) {\n return formattedList;\n }\n\n const overflowRatio = formattedList.length / maxFinalStringLength;\n limit = Math.floor(limit / overflowRatio);\n if (limit === 0) {\n limit = 1;\n return stringifyList();\n }\n\n formattedList = stringifyList();\n\n const maxIncreaseAttempts = 4;\n for (let i = 0; i < maxIncreaseAttempts; i++) {\n limit++;\n const newLimitFormattedList = stringifyList();\n\n if (newLimitFormattedList.length > maxFinalStringLength) {\n return formattedList;\n }\n\n formattedList = newLimitFormattedList;\n }\n\n return formattedList;\n};\n\nconst isReactComponent = (obj: any) =>\n typeof obj === 'object' && obj && 'displayName' in obj && typeof obj.displayName === 'string';\n\nconst guessNumberAsTimestampMinDate = new Date('1975').getTime();\n\nexport const formatValue = (\n intl: Intl,\n value: unknown,\n {\n siblingsTimeMark,\n maxListSymbols,\n datesWithTime,\n }: {\n siblingsTimeMark?: unknown;\n maxListSymbols?: number;\n datesWithTime?: boolean;\n } = {},\n): string => {\n if (typeof value === 'number') {\n if (value >= guessNumberAsTimestampMinDate) {\n return formatValue(intl, new Date(value), {\n siblingsTimeMark,\n maxListSymbols,\n datesWithTime,\n });\n }\n return intl.formatNumber(value);\n }\n if (value instanceof Date) {\n if (\n datesWithTime ||\n (siblingsTimeMark &&\n siblingsTimeMark instanceof Date &&\n Math.abs(value.getTime() - siblingsTimeMark.getTime()) < 1000 * 60 * 60 * 24 * 5)\n ) {\n return intl.formatDate(value, { dateStyle: 'medium', timeStyle: 'medium' });\n }\n return intl.formatDate(value, { dateStyle: 'medium' });\n }\n\n if (Array.isArray(value)) {\n const formattedValues = value.map((subValue) =>\n formatValue(intl, subValue, { siblingsTimeMark, maxListSymbols, datesWithTime }),\n );\n\n return formatLimitedSizeList(formattedValues, intl, maxListSymbols);\n }\n\n if (isReactComponent(value)) {\n return String((value as React.FC).displayName);\n }\n\n if (value === undefined || value === null) {\n return intl.formatMessage({ id: 'data-not-available' });\n }\n\n return String(value);\n};\n\nconst formatValuesList = (\n values: { label: string; value: unknown }[],\n {\n intl,\n limit,\n datesWithTime,\n maxListSymbols,\n }: { intl: Intl; limit: number; datesWithTime?: boolean; maxListSymbols: number },\n) => {\n const result = values.slice(0, limit).map(({ value: rawValue, label }) => {\n if (rawValue === undefined) return label;\n\n const value = formatValue(intl, rawValue, { datesWithTime, maxListSymbols });\n\n if (String(value) === String(label)) return value;\n\n return intl.formatMessage({ id: 'value-labeled' }, { label, value });\n });\n if (values.length > limit) {\n result.push(\n intl.formatMessage({ id: 'ellipsis' }, { leftCount: limit - values.values.length }),\n );\n }\n\n return intl.formatList(result);\n};\n\nexport const serialize = (\n { insights, dataType, dataRange, dataTitle, entitiesCount }: AnalyzedData,\n {\n datesWithTime,\n maxListSymbols,\n clustersLimit,\n valuesLimit,\n groupsLimit,\n }: DataSummarizationConfig,\n {\n locale,\n translations,\n availableLocales,\n }: {\n locale: string;\n translations?: { [messageId: string]: string };\n availableLocales?: { [localeId: string]: any };\n },\n): string | null => {\n if (insights.length === 0) return null;\n\n const intl = getIntl(locale, translations, availableLocales);\n\n const dataRangeSummary = intl.formatList(\n dataRange.map((range) => {\n const from = formatValue(intl, range.from, {\n siblingsTimeMark: range.to,\n datesWithTime,\n maxListSymbols,\n });\n const to = formatValue(intl, range.to, {\n siblingsTimeMark: range.from,\n datesWithTime,\n maxListSymbols,\n });\n\n return intl.formatMessage(\n { id: range.label ? 'additional-axe' : 'additional-axe-no-label' },\n { from, to, label: range.label },\n );\n }),\n );\n\n if (dataType === 'time-series') {\n const trendsInsights = insights as (GeneralTrendNode | TrendNode)[];\n const trendsByDataKey: { [label: string]: (GeneralTrendNode | TrendNode)[] } = {};\n for (const insight of trendsInsights) {\n trendsByDataKey[insight.dataKey] = trendsByDataKey[insight.dataKey] ?? [];\n trendsByDataKey[insight.dataKey].push(insight);\n }\n\n const entities = intl.formatMessage(\n { id: 'entity-type-time-series' },\n { count: entitiesCount },\n );\n const entitiesList = Object.entries(trendsByDataKey).map(([dataKey, insights]) => {\n const generalTrend = insights.find((insight) => insight.type === 'general-trend');\n const localTrends = insights.filter((insight) => insight !== generalTrend);\n const primaryTrend = generalTrend ?? localTrends[0];\n const secondaryTrends: (TrendNode | GeneralTrendNode)[] = insights.filter(\n (insight) => insight !== primaryTrend,\n );\n const mainSummary: string = intl.formatMessage(\n { id: 'time-series-general-trend' },\n {\n dataKey: entitiesCount !== 1 ? dataKey : '',\n trend: intl.formatMessage({ id: `trend-${primaryTrend.change.strength}` }),\n from: intl.formatNumber(primaryTrend.change.from),\n to: intl.formatNumber(primaryTrend.change.to),\n },\n );\n const secondarylSummaries = secondaryTrends.map((trend) =>\n intl.formatMessage(\n { id: 'time-series-local-trend' },\n {\n trend: intl.formatMessage({ id: `trend-${trend.change.strength}` }),\n from: formatValue(intl, trend.from, {\n siblingsTimeMark: trend.to,\n datesWithTime,\n maxListSymbols,\n }),\n to: formatValue(intl, trend.to, {\n siblingsTimeMark: trend.from,\n datesWithTime,\n maxListSymbols,\n }),\n },\n ),\n );\n\n if (secondarylSummaries.length === 0) {\n return mainSummary;\n }\n\n return intl.formatMessage(\n {\n id: 'time-series-detailed-trend',\n },\n {\n general: mainSummary,\n locals: formatLimitedSizeList(secondarylSummaries, intl, 400, false),\n },\n );\n });\n\n const summary = intl.formatMessage(\n { id: dataTitle ? 'chart-summary' : 'chart-summary-no-label' },\n { entities, entitiesList: intl.formatList(entitiesList), label: dataTitle },\n );\n\n if (dataRangeSummary.length > 0) {\n return `${summary}\\n${dataRangeSummary}`;\n }\n\n return summary;\n } else if (dataType === 'points-cloud') {\n const clustersInsights = insights as ClusterNode[];\n const biggestClusters = clustersInsights.slice(0, clustersLimit);\n\n const maxSize = clustersInsights[0].size;\n const minSize = clustersInsights[clustersInsights.length - 1].size;\n const entities =\n maxSize === minSize\n ? intl.formatMessage(\n { id: 'entity-type-clusters-single-size' },\n { count: entitiesCount, size: maxSize },\n )\n : intl.formatMessage(\n { id: 'entity-type-clusters-multiple-size' },\n { count: entitiesCount, maxSize, minSize },\n );\n const entitiesList = biggestClusters.map((clusterInsight) => {\n const labels = formatLimitedSizeList(clusterInsight.labels, intl, maxListSymbols);\n const anonymous =\n clusterInsight.labels.length === 0 || labels === String(clusterInsight.size);\n\n return intl.formatMessage(\n {\n id: anonymous ? 'entity-type-clusters-label-anonymous' : 'entity-type-clusters-label',\n },\n {\n relativeSize: intl.formatMessage({ id: `relative-size-${clusterInsight.relativeSize}` }),\n labels,\n size: clusterInsight.size,\n x: intl.formatNumber(clusterInsight.center.x),\n xLabel: clusterInsight.center.xLabel,\n y: intl.formatNumber(clusterInsight.center.y),\n yLabel: clusterInsight.center.yLabel,\n },\n );\n });\n if (insights.length > clustersLimit) {\n entitiesList.push(\n intl.formatMessage({ id: 'ellipsis' }, { leftCount: insights.length - clustersLimit }),\n );\n }\n\n const summary = intl.formatMessage(\n { id: dataTitle ? 'chart-summary' : 'chart-summary-no-label' },\n { entities, entitiesList: intl.formatList(entitiesList), label: dataTitle },\n );\n\n if (dataRangeSummary.length > 0) {\n return `${summary}\\n${dataRangeSummary}`;\n }\n\n return summary;\n } else if (dataType === 'values-set') {\n const [valuesInsight] = insights as [ComparisonNode];\n const entities = intl.formatMessage({ id: 'entity-type-values' }, { count: entitiesCount });\n const entitiesList = formatValuesList(valuesInsight.values, {\n intl,\n limit: valuesLimit,\n datesWithTime,\n maxListSymbols,\n });\n\n return intl.formatMessage(\n { id: dataTitle ? 'chart-summary' : 'chart-summary-no-label' },\n { entities, entitiesList: entitiesList, label: dataTitle },\n );\n } else if (dataType === 'grouped-values' || dataType === 'indexed-groups') {\n const groupInsights = insights as ComparisonNode[];\n const valueCounts = groupInsights.map((group) => group.values.length);\n const minValuesCount = Math.min(...valueCounts);\n const maxValuesCount = Math.max(...valueCounts);\n\n const entities =\n minValuesCount === maxValuesCount\n ? intl.formatMessage(\n { id: 'entity-type-grouped-values-single-size' },\n { groupsCount: groupInsights.length, valuesCount: valueCounts[0] },\n )\n : intl.formatMessage(\n { id: 'entity-type-grouped-values-multiple-size' },\n { groupsCount: groupInsights.length, minValuesCount, maxValuesCount },\n );\n const entitiesList = groupInsights.slice(0, groupsLimit).map(({ label, values }) => {\n const formattedValues = formatValuesList(values, {\n intl,\n limit: valuesLimit,\n datesWithTime,\n maxListSymbols,\n });\n return intl.formatMessage({ id: 'values-group' }, { label, values: formattedValues });\n });\n if (groupInsights.values.length > groupsLimit) {\n entitiesList.push(\n intl.formatMessage(\n { id: 'ellipsis' },\n { leftCount: groupInsights.values.length - groupsLimit },\n ),\n );\n }\n\n const sumamry = intl.formatMessage(\n { id: dataTitle ? 'chart-summary' : 'chart-summary-no-label'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M,GAAA2F,MAAA,CAAN3F,MAAM;MAC3E,IAAML,eAAe,GAAGI,gBAAgB,CAACC,MAAM,EAAE;QAC/C/C,IAAI,EAAJA,IAAI;QACJM,KAAK,EAAEyD,WAAW;QAClB7B,aAAa,EAAbA,aAAa;QACbD,cAAc,EAAdA;MACF,CAAC,CAAC;MACF,OAAOjC,IAAI,CAACW,aAAa,CAAC;QAAEC,EAAE,EAAE;MAAe,CAAC,EAAE;QAAEwC,KAAK,EAALA,KAAK;QAAEL,MAAM,EAAEL;MAAgB,CAAC,CAAC;IACvF,CAAC,CAAC;IACF,IAAIqF,aAAa,CAAChF,MAAM,CAAC5C,MAAM,GAAG6D,WAAW,EAAE;MAC7CwB,cAAY,CAAC9E,IAAI,CACfV,IAAI,CAACW,aAAa,CAChB;QAAEC,EAAE,EAAE;MAAW,CAAC,EAClB;QAAEC,SAAS,EAAEkH,aAAa,CAAChF,MAAM,CAAC5C,MAAM,GAAG6D;MAAY,CAAC,CACzD,CACF;IACH;IAEA,IAAM2E,OAAO,GAAG3I,IAAI,CAACW,aAAa,CAChC;MAAEC,EAAE,EAAEgD,SAAS,GAAG,eAAe,GAAG;IAAyB,CAAC,EAC9D;MAAE0B,QAAQ,EAARA,UAAQ;MAAEE,YAAY,EAAExF,IAAI,CAACc,UAAU,CAAC0E,cAAY,CAAC;MAAEpC,KAAK,EAAEQ;IAAU,CAAC,CAC5E;IAED,OAAO+E,OAAO;EAChB;EAEA,OAAO,IAAI;AACb,CAAC"}
1
+ {"version":3,"file":"serialize.js","names":["getIntl","formatLimitedSizeList","items","intl","maxFinalStringLength","arguments","length","undefined","includeEllipsis","limit","stringifyList","cutItems","slice","push","formatMessage","id","leftCount","formatList","formattedList","overflowRatio","Math","floor","maxIncreaseAttempts","i","newLimitFormattedList","isReactComponent","obj","_typeof","displayName","guessNumberAsTimestampMinDate","Date","getTime","formatValue","value","_ref","siblingsTimeMark","maxListSymbols","datesWithTime","formatNumber","abs","formatDate","dateStyle","timeStyle","Array","isArray","formattedValues","map","subValue","String","formatValuesList","values","_ref2","result","_ref3","rawValue","label","serialize","_ref4","_ref5","_ref6","insights","dataType","dataRange","dataTitle","entitiesCount","clustersLimit","valuesLimit","groupsLimit","locale","translations","availableLocales","dataRangeSummary","range","from","to","trendsInsights","trendsByDataKey","_iterator","_createForOfIteratorHelper","_step","s","n","done","_trendsByDataKey$insi","insight","dataKey","err","e","f","entities","count","entitiesList","Object","entries","_ref7","_ref8","_slicedToArray","generalTrend","find","type","localTrends","filter","primaryTrend","secondaryTrends","mainSummary","trend","concat","change","strength","secondarylSummaries","general","locals","summary","clustersInsights","biggestClusters","maxSize","size","minSize","clusterInsight","labels","anonymous","relativeSize","x","center","xLabel","y","yLabel","_ref9","_ref10","valuesInsight","groupInsights","valueCounts","group","minValuesCount","min","apply","_toConsumableArray","maxValuesCount","max","groupsCount","valuesCount","_ref11","sumamry"],"sources":["../../../src/a11y/serialize.ts"],"sourcesContent":["import { AnalyzedData, ClusterNode, ComparisonNode, GeneralTrendNode, TrendNode } from './insights';\n\nimport React from 'react';\nimport { DataSummarizationConfig } from './hints';\nimport { getIntl, Intl } from './intl';\n\nconst formatLimitedSizeList = (\n items: unknown[],\n intl: Intl,\n maxFinalStringLength = 100,\n includeEllipsis = true,\n) => {\n let limit = items.length;\n const stringifyList = () => {\n const cutItems = items.slice(0, limit);\n if (items.length > limit && includeEllipsis) {\n cutItems.push(intl.formatMessage({ id: 'ellipsis' }, { leftCount: limit - items.length }));\n }\n\n return intl.formatList(cutItems);\n };\n\n let formattedList = stringifyList();\n if (formattedList.length <= maxFinalStringLength) {\n return formattedList;\n }\n\n const overflowRatio = formattedList.length / maxFinalStringLength;\n limit = Math.floor(limit / overflowRatio);\n if (limit === 0) {\n limit = 1;\n return stringifyList();\n }\n\n formattedList = stringifyList();\n\n const maxIncreaseAttempts = 4;\n for (let i = 0; i < maxIncreaseAttempts; i++) {\n limit++;\n const newLimitFormattedList = stringifyList();\n\n if (newLimitFormattedList.length > maxFinalStringLength) {\n return formattedList;\n }\n\n formattedList = newLimitFormattedList;\n }\n\n return formattedList;\n};\n\nconst isReactComponent = (obj: any) =>\n typeof obj === 'object' && obj && 'displayName' in obj && typeof obj.displayName === 'string';\n\nconst guessNumberAsTimestampMinDate = new Date('1975').getTime();\n\nexport const formatValue = (\n intl: Intl,\n value: unknown,\n {\n siblingsTimeMark,\n maxListSymbols,\n datesWithTime,\n }: {\n siblingsTimeMark?: unknown;\n maxListSymbols?: number;\n datesWithTime?: boolean;\n } = {},\n): string => {\n if (typeof value === 'number') {\n if (value >= guessNumberAsTimestampMinDate) {\n return formatValue(intl, new Date(value), {\n siblingsTimeMark,\n maxListSymbols,\n datesWithTime,\n });\n }\n return intl.formatNumber(value);\n }\n if (value instanceof Date) {\n if (\n datesWithTime ||\n (siblingsTimeMark &&\n siblingsTimeMark instanceof Date &&\n Math.abs(value.getTime() - siblingsTimeMark.getTime()) < 1000 * 60 * 60 * 24 * 5)\n ) {\n return intl.formatDate(value, { dateStyle: 'medium', timeStyle: 'medium' });\n }\n return intl.formatDate(value, { dateStyle: 'medium' });\n }\n\n if (Array.isArray(value)) {\n const formattedValues = value.map((subValue) =>\n formatValue(intl, subValue, { siblingsTimeMark, maxListSymbols, datesWithTime }),\n );\n\n return formatLimitedSizeList(formattedValues, intl, maxListSymbols);\n }\n\n if (isReactComponent(value)) {\n return String((value as React.FC).displayName);\n }\n\n if (value === undefined || value === null) {\n return intl.formatMessage({ id: 'data-not-available' });\n }\n\n return String(value);\n};\n\nconst formatValuesList = (\n values: { label: string; value: unknown }[],\n {\n intl,\n limit,\n datesWithTime,\n maxListSymbols,\n }: { intl: Intl; limit: number; datesWithTime?: boolean; maxListSymbols: number },\n) => {\n const result = values.slice(0, limit).map(({ value: rawValue, label }) => {\n if (rawValue === undefined) return label;\n\n const value = formatValue(intl, rawValue, { datesWithTime, maxListSymbols });\n\n if (String(value) === String(label)) return value;\n\n return intl.formatMessage({ id: 'value-labeled' }, { label, value });\n });\n if (values.length > limit) {\n result.push(\n intl.formatMessage({ id: 'ellipsis' }, { leftCount: limit - values.values.length }),\n );\n }\n\n return intl.formatList(result);\n};\n\nexport const serialize = (\n { insights, dataType, dataRange, dataTitle, entitiesCount }: AnalyzedData,\n {\n datesWithTime,\n maxListSymbols,\n clustersLimit,\n valuesLimit,\n groupsLimit,\n }: DataSummarizationConfig,\n {\n locale,\n translations,\n availableLocales,\n }: {\n locale: string;\n translations?: { [messageId: string]: string };\n availableLocales?: { [localeId: string]: any };\n },\n): string | null => {\n if (insights.length === 0) return null;\n\n const intl = getIntl(locale, translations!, availableLocales!);\n\n const dataRangeSummary = intl.formatList(\n dataRange.map((range) => {\n const from = formatValue(intl, range.from, {\n siblingsTimeMark: range.to,\n datesWithTime,\n maxListSymbols,\n });\n const to = formatValue(intl, range.to, {\n siblingsTimeMark: range.from,\n datesWithTime,\n maxListSymbols,\n });\n\n return intl.formatMessage(\n { id: range.label ? 'additional-axe' : 'additional-axe-no-label' },\n { from, to, label: range.label },\n );\n }),\n );\n\n if (dataType === 'time-series') {\n const trendsInsights = insights as (GeneralTrendNode | TrendNode)[];\n const trendsByDataKey: { [label: string]: (GeneralTrendNode | TrendNode)[] } = {};\n for (const insight of trendsInsights) {\n trendsByDataKey[insight.dataKey] = trendsByDataKey[insight.dataKey] ?? [];\n trendsByDataKey[insight.dataKey].push(insight);\n }\n\n const entities = intl.formatMessage(\n { id: 'entity-type-time-series' },\n { count: entitiesCount },\n );\n const entitiesList = Object.entries(trendsByDataKey).map(([dataKey, insights]) => {\n const generalTrend = insights.find((insight) => insight.type === 'general-trend');\n const localTrends = insights.filter((insight) => insight !== generalTrend);\n const primaryTrend = generalTrend ?? localTrends[0];\n const secondaryTrends: (TrendNode | GeneralTrendNode)[] = insights.filter(\n (insight) => insight !== primaryTrend,\n );\n const mainSummary: string = intl.formatMessage(\n { id: 'time-series-general-trend' },\n {\n dataKey: entitiesCount !== 1 ? dataKey : '',\n trend: intl.formatMessage({ id: `trend-${primaryTrend.change.strength}` }),\n from: intl.formatNumber(primaryTrend.change.from),\n to: intl.formatNumber(primaryTrend.change.to),\n },\n );\n const secondarylSummaries = secondaryTrends.map((trend) =>\n intl.formatMessage(\n { id: 'time-series-local-trend' },\n {\n trend: intl.formatMessage({ id: `trend-${trend.change.strength}` }),\n from: formatValue(intl, trend.from, {\n siblingsTimeMark: trend.to,\n datesWithTime,\n maxListSymbols,\n }),\n to: formatValue(intl, trend.to, {\n siblingsTimeMark: trend.from,\n datesWithTime,\n maxListSymbols,\n }),\n },\n ),\n );\n\n if (secondarylSummaries.length === 0) {\n return mainSummary;\n }\n\n return intl.formatMessage(\n {\n id: 'time-series-detailed-trend',\n },\n {\n general: mainSummary,\n locals: formatLimitedSizeList(secondarylSummaries, intl, 400, false),\n },\n );\n });\n\n const summary = intl.formatMessage(\n { id: dataTitle ? 'chart-summary' : 'chart-summary-no-label' },\n { entities, entitiesList: intl.formatList(entitiesList), label: dataTitle },\n );\n\n if (dataRangeSummary.length > 0) {\n return `${summary}\\n${dataRangeSummary}`;\n }\n\n return summary;\n } else if (dataType === 'points-cloud') {\n const clustersInsights = insights as ClusterNode[];\n const biggestClusters = clustersInsights.slice(0, clustersLimit);\n\n const maxSize = clustersInsights[0].size;\n const minSize = clustersInsights[clustersInsights.length - 1].size;\n const entities =\n maxSize === minSize\n ? intl.formatMessage(\n { id: 'entity-type-clusters-single-size' },\n { count: entitiesCount, size: maxSize },\n )\n : intl.formatMessage(\n { id: 'entity-type-clusters-multiple-size' },\n { count: entitiesCount, maxSize, minSize },\n );\n const entitiesList = biggestClusters.map((clusterInsight) => {\n const labels = formatLimitedSizeList(clusterInsight.labels, intl, maxListSymbols);\n const anonymous =\n clusterInsight.labels.length === 0 || labels === String(clusterInsight.size);\n\n return intl.formatMessage(\n {\n id: anonymous ? 'entity-type-clusters-label-anonymous' : 'entity-type-clusters-label',\n },\n {\n relativeSize: intl.formatMessage({ id: `relative-size-${clusterInsight.relativeSize}` }),\n labels,\n size: clusterInsight.size,\n x: intl.formatNumber(clusterInsight.center.x),\n xLabel: clusterInsight.center.xLabel,\n y: intl.formatNumber(clusterInsight.center.y),\n yLabel: clusterInsight.center.yLabel,\n },\n );\n });\n if (insights.length > clustersLimit) {\n entitiesList.push(\n intl.formatMessage({ id: 'ellipsis' }, { leftCount: insights.length - clustersLimit }),\n );\n }\n\n const summary = intl.formatMessage(\n { id: dataTitle ? 'chart-summary' : 'chart-summary-no-label' },\n { entities, entitiesList: intl.formatList(entitiesList), label: dataTitle },\n );\n\n if (dataRangeSummary.length > 0) {\n return `${summary}\\n${dataRangeSummary}`;\n }\n\n return summary;\n } else if (dataType === 'values-set') {\n const [valuesInsight] = insights as [ComparisonNode];\n const entities = intl.formatMessage({ id: 'entity-type-values' }, { count: entitiesCount });\n const entitiesList = formatValuesList(valuesInsight.values, {\n intl,\n limit: valuesLimit,\n datesWithTime,\n maxListSymbols,\n });\n\n return intl.formatMessage(\n { id: dataTitle ? 'chart-summary' : 'chart-summary-no-label' },\n { entities, entitiesList: entitiesList, label: dataTitle },\n );\n } else if (dataType === 'grouped-values' || dataType === 'indexed-groups') {\n const groupInsights = insights as ComparisonNode[];\n const valueCounts = groupInsights.map((group) => group.values.length);\n const minValuesCount = Math.min(...valueCounts);\n const maxValuesCount = Math.max(...valueCounts);\n\n const entities =\n minValuesCount === maxValuesCount\n ? intl.formatMessage(\n { id: 'entity-type-grouped-values-single-size' },\n { groupsCount: groupInsights.length, valuesCount: valueCounts[0] },\n )\n : intl.formatMessage(\n { id: 'entity-type-grouped-values-multiple-size' },\n { groupsCount: groupInsights.length, minValuesCount, maxValuesCount },\n );\n const entitiesList = groupInsights.slice(0, groupsLimit).map(({ label, values }) => {\n const formattedValues = formatValuesList(values, {\n intl,\n limit: valuesLimit,\n datesWithTime,\n maxListSymbols,\n });\n return intl.formatMessage({ id: 'values-group' }, { label, values: formattedValues });\n });\n if (groupInsights.values.length > groupsLimit) {\n entitiesList.push(\n intl.formatMessage(\n { id: 'ellipsis' },\n { leftCount: groupInsights.values.length - groupsLimit },\n ),\n );\n }\n\n const sumamry = intl.formatMessage(\n { id: dataTitle ? 'chart-summary' : 'chart-summary-no-label' },\n { entities, entitiesList: intl.formatList(entitiesList), label: dataTitle },\n );\n\n return sumamry;\n }\n\n return null;\n};\n"],"mappings":";;;;AAIA,SAASA,OAAO,QAAc,QAAQ;AAEtC,IAAMC,qBAAqB,GAAG,SAAxBA,qBAAqBA,CACzBC,KAAgB,EAChBC,IAAU,EAGP;EAAA,IAFHC,oBAAoB,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,GAAG;EAAA,IAC1BG,eAAe,GAAAH,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,IAAI;EAEtB,IAAII,KAAK,GAAGP,KAAK,CAACI,MAAM;EACxB,IAAMI,aAAa,GAAG,SAAhBA,aAAaA,CAAA,EAAS;IAC1B,IAAMC,QAAQ,GAAGT,KAAK,CAACU,KAAK,CAAC,CAAC,EAAEH,KAAK,CAAC;IACtC,IAAIP,KAAK,CAACI,MAAM,GAAGG,KAAK,IAAID,eAAe,EAAE;MAC3CG,QAAQ,CAACE,IAAI,CAACV,IAAI,CAACW,aAAa,CAAC;QAAEC,EAAE,EAAE;MAAW,CAAC,EAAE;QAAEC,SAAS,EAAEP,KAAK,GAAGP,KAAK,CAACI;MAAO,CAAC,CAAC,CAAC;IAC5F;IAEA,OAAOH,IAAI,CAACc,UAAU,CAACN,QAAQ,CAAC;EAClC,CAAC;EAED,IAAIO,aAAa,GAAGR,aAAa,EAAE;EACnC,IAAIQ,aAAa,CAACZ,MAAM,IAAIF,oBAAoB,EAAE;IAChD,OAAOc,aAAa;EACtB;EAEA,IAAMC,aAAa,GAAGD,aAAa,CAACZ,MAAM,GAAGF,oBAAoB;EACjEK,KAAK,GAAGW,IAAI,CAACC,KAAK,CAACZ,KAAK,GAAGU,aAAa,CAAC;EACz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,CAAC,CAACrB,GAAG,CAAC,UAAA+F,MAAA,EAAuB;MAAA,IAApBtF,KAAK,GAAAsF,MAAA,CAALtF,KAAK;QAAEL,MAAM,GAAA2F,MAAA,CAAN3F,MAAM;MAC3E,IAAML,eAAe,GAAGI,gBAAgB,CAACC,MAAM,EAAE;QAC/C/C,IAAI,EAAJA,IAAI;QACJM,KAAK,EAAEyD,WAAW;QAClB7B,aAAa,EAAbA,aAAa;QACbD,cAAc,EAAdA;MACF,CAAC,CAAC;MACF,OAAOjC,IAAI,CAACW,aAAa,CAAC;QAAEC,EAAE,EAAE;MAAe,CAAC,EAAE;QAAEwC,KAAK,EAALA,KAAK;QAAEL,MAAM,EAAEL;MAAgB,CAAC,CAAC;IACvF,CAAC,CAAC;IACF,IAAIqF,aAAa,CAAChF,MAAM,CAAC5C,MAAM,GAAG6D,WAAW,EAAE;MAC7CwB,cAAY,CAAC9E,IAAI,CACfV,IAAI,CAACW,aAAa,CAChB;QAAEC,EAAE,EAAE;MAAW,CAAC,EAClB;QAAEC,SAAS,EAAEkH,aAAa,CAAChF,MAAM,CAAC5C,MAAM,GAAG6D;MAAY,CAAC,CACzD,CACF;IACH;IAEA,IAAM2E,OAAO,GAAG3I,IAAI,CAACW,aAAa,CAChC;MAAEC,EAAE,EAAEgD,SAAS,GAAG,eAAe,GAAG;IAAyB,CAAC,EAC9D;MAAE0B,QAAQ,EAARA,UAAQ;MAAEE,YAAY,EAAExF,IAAI,CAACc,UAAU,CAAC0E,cAAY,CAAC;MAAEpC,KAAK,EAAEQ;IAAU,CAAC,CAC5E;IAED,OAAO+E,OAAO;EAChB;EAEA,OAAO,IAAI;AACb,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=createElement.d.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createElement.d.js","names":[],"sources":["../../src/createElement.d.ts"],"sourcesContent":["declare const createElement: any;\nexport default createElement;\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"Area.d.js","names":[],"sources":["../../../src/types/Area.d.ts"],"sourcesContent":["import { ReturnEl } from '@semcore/core';\nimport { MapProps } from './Plot';\nimport IContext from './context';\nimport { CurveFactory } from 'd3-shape';\n\nexport interface IAreaProps extends IContext {\n /** Field from data for XAxis */\n x?: string;\n /** Field from data for YAxis*/\n y?: string;\n /** Line color\n * @default '#50aef4'*/\n color?: string;\n /** Element hide property */\n hide?: boolean;\n /** Curve method */\n curve?: CurveFactory;\n /** Animation duration in ms\n * @default 500\n */\n duration?: number;\n /** Enables element transparency */\n transparent?: boolean;\n}\n\nexport interface IAreaDotsProps extends IContext {\n /** Show all Dot */\n display?: boolean;\n /** Hide property */\n hide?: boolean;\n /** Enables element transparency */\n transparent?: boolean;\n}\n\nexport interface IAreaDotsContext {\n /** Value element of data */\n value?: any;\n /** Index element of data */\n index?: number;\n}\n\nexport interface IAreaNullProps extends IContext {\n /** Hide property */\n hide?: boolean;\n}\n\ndeclare const Area: (<T>(props: MapProps<IAreaProps & T>) => ReturnEl) & {\n Dots: <T>(props: MapProps<IAreaDotsProps & T, IAreaDotsContext>) => ReturnEl;\n Null: <T>(props: MapProps<IAreaNullProps & T>) => ReturnEl;\n Line: <T>(props: MapProps<IContext & T>) => ReturnEl;\n};\n\nexport default Area;\n"],"mappings":""}
1
+ {"version":3,"file":"Area.d.js","names":[],"sources":["../../../src/types/Area.d.ts"],"sourcesContent":["import { UnknownProperties } from '@semcore/core';\nimport { Context } from './context';\nimport { CurveFactory } from 'd3-shape';\nimport { IntergalacticD3Component } from './Plot';\n\n/** @deprecated */\nexport interface IAreaProps extends AreaProps, UnknownProperties {}\nexport type AreaProps = Context & {\n /** Field name from `data` array item for the XAxis */\n x?: string;\n /** Field name from `data` array item for the YAxis*/\n y?: string;\n /** Line color\n * @default '#50aef4'*/\n color?: string;\n /** Element hide property */\n hide?: boolean;\n /** Curve method */\n curve?: CurveFactory;\n /** Animation duration in ms\n * @default 500\n */\n duration?: number;\n /** Enables element transparency */\n transparent?: boolean;\n};\n\n/** @deprecated */\nexport interface IAreaDotsProps extends AreaDotsProps, UnknownProperties {}\nexport type AreaDotsProps = Context & {\n /** Show all Dot */\n display?: boolean;\n /** Hide property */\n hide?: boolean;\n /** Enables element transparency */\n transparent?: boolean;\n};\n\n/** @deprecated */\nexport interface IAreaDotsContext extends AreaDotsContext, UnknownProperties {}\nexport type AreaDotsContext = {\n /** Value element of data */\n /** @deprecated */\n value?: any;\n /** Index element of data */\n index?: number;\n};\n\n/** @deprecated */\nexport interface IAreaNullProps extends AreaNullProps, UnknownProperties {}\nexport type AreaNullProps = Context & {\n /** Hide property */\n hide?: boolean;\n};\n\ndeclare const Area: IntergalacticD3Component<'path', AreaProps, Context> & {\n Dots: IntergalacticD3Component<'circle', AreaDotsProps, AreaDotsContext>;\n Null: IntergalacticD3Component<'path', AreaNullProps, Context>;\n Line: IntergalacticD3Component<'path', Context, Context>;\n};\n\nexport default Area;\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"Axis.d.js","names":[],"sources":["../../../src/types/Axis.d.ts"],"sourcesContent":["import { ReturnEl } from '@semcore/core';\nimport { MapProps } from './Plot';\nimport IContext from './context';\n\nexport interface IXAxisProps extends IContext {\n /** The position of the axis relative chart\n * @default 'button' */\n position?: 'top' | 'right' | 'bottom' | 'left' | number;\n /** Element hide property\n * @default false */\n hide?: boolean;\n /** Values for axis ticks */\n ticks?: any[];\n}\n\nexport interface IYAxisProps extends IContext {\n /** The position of the axis relative chart\n * @default 'left' */\n position?: 'top' | 'right' | 'bottom' | 'left' | number;\n /** Element hide property\n * @default true */\n hide?: boolean;\n /** Values for axis ticks */\n ticks?: any[];\n}\n\nexport interface IAxisTicksProps extends IContext {\n /** The position of the axis relative chart */\n position?: 'top' | 'right' | 'bottom' | 'left';\n /** Element hide property */\n hide?: boolean;\n /** Values for axis ticks */\n ticks?: any[];\n}\n\nexport interface IAxisGridProps extends IContext {\n /** Values for axis ticks */\n ticks?: any[];\n}\n\nexport interface IAxisTitleProps extends IContext {\n /** The position of the axis relative chart */\n position?: 'top' | 'right' | 'bottom' | 'left';\n\n /** For vertical titles disables characters rotation while puts\n * characters into the vertical column for better reading in some languages.\n * @default true for `zh` and `ja` locales and false for all others.\n */\n verticalWritingMode?: boolean;\n}\n\nexport interface IAxisTicksContext {\n /** Value element of data */\n value: any;\n /** Index element of data */\n index: number;\n}\n\ndeclare const XAxis: (<T>(props: MapProps<IXAxisProps & T>) => ReturnEl) & {\n Ticks: <T>(props: MapProps<IAxisTicksProps & T, IAxisTicksContext>) => ReturnEl;\n Grid: <T>(props: MapProps<IAxisGridProps & T>) => ReturnEl;\n Title: <T>(props: MapProps<IAxisTitleProps & T>) => ReturnEl;\n};\n\ndeclare const YAxis: (<T>(props: MapProps<IYAxisProps & T>) => ReturnEl) & {\n Ticks: <T>(props: MapProps<IAxisTicksProps & T, IAxisTicksContext>) => ReturnEl;\n Grid: <T>(props: MapProps<IAxisGridProps & T>) => ReturnEl;\n Title: <T>(props: MapProps<IAxisTitleProps & T>) => ReturnEl;\n};\n\nexport { XAxis, YAxis };\n"],"mappings":""}
1
+ {"version":3,"file":"Axis.d.js","names":[],"sources":["../../../src/types/Axis.d.ts"],"sourcesContent":["import { IntergalacticD3Component } from './Plot';\nimport { Context } from './context';\nimport { UnknownProperties } from '@semcore/core';\n\n/** @deprecated */\nexport interface IXAxisProps extends XAxisProps, UnknownProperties {}\nexport type XAxisProps = Context & {\n /** The position of the axis relative chart\n * @default 'button' */\n position?: 'top' | 'right' | 'bottom' | 'left' | number;\n /** Element hide property\n * @default false */\n hide?: boolean;\n /** Values for axis ticks */\n /** @deprecated */\n ticks?: any[];\n};\n\n/** @deprecated */\nexport interface IYAxisProps extends YAxisProps, UnknownProperties {}\nexport type YAxisProps = Context & {\n /** The position of the axis relative chart\n * @default 'left' */\n position?: 'top' | 'right' | 'bottom' | 'left' | number;\n /** Element hide property\n * @default true */\n hide?: boolean;\n /** Values for axis ticks */\n /** @deprecated */\n ticks?: any[];\n};\n\n/** @deprecated */\nexport interface IAxisTicksProps extends AxisTicksProps, UnknownProperties {}\nexport type AxisTicksProps = Context & {\n /** The position of the axis relative chart */\n position?: 'top' | 'right' | 'bottom' | 'left';\n /** Element hide property */\n hide?: boolean;\n /** Values for axis ticks */\n /** @deprecated */\n ticks?: any[];\n};\n\n/** @deprecated */\nexport interface IAxisGridProps extends AxisGridProps, UnknownProperties {}\nexport type AxisGridProps = Context & {\n /** Values for axis ticks */\n /** @deprecated */\n ticks?: any[];\n};\n\n/** @deprecated */\nexport interface IAxisTitleProps extends AxisTitleProps, UnknownProperties {}\nexport type AxisTitleProps = Context & {\n /** The position of the axis relative chart */\n position?: 'top' | 'right' | 'bottom' | 'left';\n\n /** For vertical titles disables characters rotation while puts\n * characters into the vertical column for better reading in some languages.\n * @default true for `zh` and `ja` locales and false for all others.\n */\n verticalWritingMode?: boolean;\n};\n\n/** @deprecated */\nexport interface IAxisTicksContext extends AxisTicksContext, UnknownProperties {}\nexport type AxisTicksContext = {\n /** Value element of data */\n /** @deprecated */\n value: any;\n /** Index element of data */\n index: number;\n};\n\ndeclare const XAxis: IntergalacticD3Component<'path', XAxisProps> & {\n Ticks: IntergalacticD3Component<'path', AxisTicksProps, AxisTicksContext>;\n Grid: IntergalacticD3Component<'path', AxisGridProps>;\n Title: IntergalacticD3Component<'text', AxisTitleProps>;\n};\n\ndeclare const YAxis: IntergalacticD3Component<'path', YAxisProps> & {\n Ticks: IntergalacticD3Component<'path', AxisTicksProps, AxisTicksContext>;\n Grid: IntergalacticD3Component<'path', AxisGridProps>;\n Title: IntergalacticD3Component<'text', AxisTitleProps>;\n};\n\nexport { XAxis, YAxis };\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"Bar.d.js","names":[],"sources":["../../../src/types/Bar.d.ts"],"sourcesContent":["import { ReturnEl } from '@semcore/core';\nimport { MapProps } from './Plot';\nimport IContext from './context';\n\nexport interface IBarProps extends IContext {\n /** Field from data for XAxis */\n x?: string;\n /** Field from data for YAxis */\n y?: string;\n /** Line color\n * @default '#50aef4'*/\n color?: string;\n /** Element hide property */\n hide?: boolean;\n /** Animation duration in ms\n * @default 500\n */\n duration?: number;\n /** Radius of curvature\n * @default 2\n */\n r?: number | number[];\n /** Minimal height\n * @default 2\n */\n hMin?: number;\n /**\n * Bar click handler\n */\n onClick?: (data: { [key: string]: string | number }, event: Event) => void;\n /** Enables element transparency */\n transparent?: boolean;\n}\n\nexport interface IBarContext {\n /** Value element of data */\n value: any;\n /** Index element of data */\n index: number;\n}\n\nexport interface IBackgroundProps extends IContext {\n /** Coordinate x */\n x?: number | string;\n /** Coordinate y */\n y?: number | string;\n /** Value element of data */\n value?: any;\n /** Width rect */\n width?: number | string;\n /** Height rect */\n height?: number | string;\n}\n\ndeclare const Bar: (<T>(props: MapProps<IBarProps & T, IBarContext>) => ReturnEl) & {\n Background: <T>(props: MapProps<IBackgroundProps & T>) => ReturnEl;\n};\n\nexport default Bar;\n"],"mappings":""}
1
+ {"version":3,"file":"Bar.d.js","names":[],"sources":["../../../src/types/Bar.d.ts"],"sourcesContent":["import { UnknownProperties } from '@semcore/core';\nimport { Context } from './context';\nimport { IntergalacticD3Component } from './Plot';\n\n/** @deprecated */\nexport interface IBarProps extends BarProps, UnknownProperties {}\nexport type BarProps = Context & {\n /** Field name from `data` array item for the XAxis */\n x?: string;\n /** Field name from `data` array item for the YAxis */\n y?: string;\n /** Line color\n * @default '#50aef4'*/\n color?: string;\n /** Element hide property */\n hide?: boolean;\n /** Animation duration in ms\n * @default 500\n */\n duration?: number;\n /** Radius of curvature\n * @default 2\n */\n r?: number | number[];\n /** Minimal height\n * @default 2\n */\n hMin?: number;\n /**\n * Bar click handler\n */\n onClick?: (data: { [key: string]: string | number }, event: Event) => void;\n /** Enables element transparency */\n transparent?: boolean;\n};\n\n/** @deprecated */\nexport interface IBarContext extends BarContext, UnknownProperties {}\nexport type BarContext = {\n /** @deprecated */\n value: unknown;\n /** Index in `data` array */\n index: number;\n x: number;\n y: number;\n width: number;\n height: number;\n};\n\n/** @deprecated */\nexport interface IBackgroundProps extends BackgroundProps, UnknownProperties {}\nexport type BackgroundProps = Context & {\n /** Coordinate x */\n x?: number | string;\n /** Coordinate y */\n y?: number | string;\n /** Value element of data */\n /** @deprecated */\n value?: any;\n /** Width rect */\n width?: number | string;\n /** Height rect */\n height?: number | string;\n};\n\ntype BackgroundContext = Context & {\n /** Index in `data` array */\n index: number;\n};\n\ndeclare const Bar: IntergalacticD3Component<'rect', BarProps, BarContext> & {\n Background: IntergalacticD3Component<'rect', BackgroundProps, BackgroundContext>;\n};\n\nexport default Bar;\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"Bubble.d.js","names":[],"sources":["../../../src/types/Bubble.d.ts"],"sourcesContent":["import { ReturnEl } from '@semcore/core';\nimport { MapProps } from './Plot';\nimport IContext from './context';\n\nexport interface IBubbleProps extends IContext {\n /** Field from data for XAxis */\n x: string;\n /** Field from data for YAxis */\n y: string;\n /** Field from data for circle radius */\n value: string;\n /** Field from data for circle label */\n label?: string;\n /** Circle color */\n color?: string;\n /** Cross in the center of the bubble\n * @default true\n */\n markedCross?: boolean;\n /** Animation duration in ms\n * @default 500\n */\n duration?: number;\n /** Enables element transparency */\n transparent?: boolean;\n}\n\nexport interface IBubbleContext {\n /** Index element of data */\n index: number;\n}\n\ndeclare const Bubble: <T>(props: MapProps<IBubbleProps & T, IBubbleContext>) => ReturnEl;\n\nexport default Bubble;\n"],"mappings":""}
1
+ {"version":3,"file":"Bubble.d.js","names":[],"sources":["../../../src/types/Bubble.d.ts"],"sourcesContent":["import { Intergalactic, UnknownProperties } from '@semcore/core';\nimport { Context } from './context';\nimport { TooltipType } from './Tooltip';\nimport { IntergalacticD3Component } from './Plot';\n\n/** @deprecated */\nexport interface IBubbleProps extends BubbleProps, UnknownProperties {}\nexport type BubbleProps = Context & {\n /** Field name from `data` array item for the XAxis */\n x: string;\n /** Field name from `data` array item for the YAxis */\n y: string;\n /** Field name from `data` array item for the circle radius */\n value: string;\n /** Field name from `data` array item for the circle label */\n label?: string;\n /** Circle color */\n color?: string;\n /** Cross in the center of the bubble\n * @default true\n */\n markedCross?: boolean;\n /** Animation duration in ms\n * @default 500\n */\n duration?: number;\n /** Enables element transparency */\n transparent?: boolean;\n};\n\n/** @deprecated */\nexport interface IBubbleContext extends BubbleContext, UnknownProperties {}\nexport type BubbleContext = {\n /** Index element of data */\n index: number;\n};\n\ndeclare const Bubble: IntergalacticD3Component<Intergalactic.Tag, BubbleProps, BubbleContext> & {\n Tooltip: TooltipType<\n BubbleProps & {\n /**\n * @deprecated Use `index` instead.\n */\n xIndex: number;\n /**\n * Index of item in the `data` array used to render related bubble.\n */\n index: number;\n }\n >;\n};\n\nexport default Bubble;\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"ClipPath.d.js","names":[],"sources":["../../../src/types/ClipPath.d.ts"],"sourcesContent":["import React from 'react';\nimport { MapProps } from './Plot';\nimport { ReturnEl } from '@semcore/core';\n\nexport interface IClipPath {\n /**\n * HTML tag name for the displayed item\n * @default rect\n */\n tag?: string;\n /**\n * HTML selector\n */\n id?: string;\n /**\n * CSS property\n */\n transition?: string;\n /**\n * Function which run after mounted clipPath\n */\n setAttributeTag?: (rect: React.ReactNode) => void;\n}\n\ndeclare const ClipPath: <T>(props: MapProps<IClipPath & T>) => ReturnEl;\n\nexport default ClipPath;\n"],"mappings":""}
1
+ {"version":3,"file":"ClipPath.d.js","names":[],"sources":["../../../src/types/ClipPath.d.ts"],"sourcesContent":["import React from 'react';\nimport { UnknownProperties } from '@semcore/core';\nimport { IntergalacticD3Component } from './Plot';\n\n/** @deprecated */\nexport interface IClipPath extends ClipPath, UnknownProperties {}\nexport type ClipPath = {\n /**\n * HTML tag name for the displayed item\n * @default rect\n */\n tag?: string;\n /**\n * HTML selector\n */\n id?: string;\n /**\n * CSS property\n */\n transition?: string;\n /**\n * Function which run after mounted clipPath\n */\n setAttributeTag?: (rect: React.ReactNode) => void;\n};\n\ndeclare const ClipPath: IntergalacticD3Component<'clipPath', ClipPath>;\n\nexport default ClipPath;\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"Donut.d.js","names":[],"sources":["../../../src/types/Donut.d.ts"],"sourcesContent":["import { ReturnEl } from '@semcore/core';\nimport { MapProps } from './Plot';\nimport IContext from './context';\n\nexport interface IDonutProps extends IContext {\n /** Inner radius\n * @default 0\n * */\n innerRadius?: number;\n /** Outer radius\n * @default calculated by the formula from width, height\n * */\n outerRadius?: number;\n /** Semi donut */\n halfsize?: boolean;\n /** Animation duration in ms\n * @default 500\n */\n duration?: number;\n}\n\nexport interface IPieProps extends IContext {\n /**\n * Name of the field in the data\n * */\n dataKey: string;\n /** Color pie\n @default #50aef4\n **/\n color?: string;\n /**\n * Active sector\n * */\n active?: boolean;\n /** Enables element transparency */\n transparent?: boolean;\n}\n\nexport interface IEmptyDataProps extends IContext {}\n\nexport interface ILabelProps extends IContext {}\n\ndeclare const Donut: (<T>(props: MapProps<IDonutProps & T>) => ReturnEl) & {\n Pie: <T>(props: MapProps<IPieProps & T>) => ReturnEl;\n EmptyData: <T>(props: MapProps<IEmptyDataProps & T>) => ReturnEl;\n Label: <T>(props: MapProps<ILabelProps & T>) => ReturnEl;\n};\n\nexport default Donut;\n"],"mappings":""}
1
+ {"version":3,"file":"Donut.d.js","names":[],"sources":["../../../src/types/Donut.d.ts"],"sourcesContent":["import { UnknownProperties } from '@semcore/core';\nimport { Context } from './context';\nimport { TooltipType } from './Tooltip';\nimport { IntergalacticD3Component } from './Plot';\n\n/** @deprecated */\nexport interface IDonutProps extends DonutProps, UnknownProperties {}\nexport type DonutProps = Context & {\n /** Inner radius\n * @default 0\n * */\n innerRadius?: number;\n /** Outer radius\n * @default calculated by the formula from width, height\n * */\n outerRadius?: number;\n /** Semi donut */\n halfsize?: boolean;\n /** Animation duration in ms\n * @default 500\n */\n duration?: number;\n};\n\n/** @deprecated */\nexport interface IPieProps extends PieProps, UnknownProperties {}\nexport type PieProps = Context & {\n /**\n * Name of the field in the data\n * */\n dataKey: string;\n /**\n * Human readable name of the segment\n * */\n name: string;\n /** Color pie\n @default #50aef4\n **/\n color?: string;\n /**\n * Active sector\n * */\n active?: boolean;\n /** Enables element transparency */\n transparent?: boolean;\n};\n\n/** @deprecated */\nexport interface IEmptyDataProps extends EmptyDataProps, UnknownProperties {}\nexport type EmptyDataProps = Context & {};\n\n/** @deprecated */\nexport interface ILabelProps extends LabelProps, UnknownProperties {}\nexport type LabelProps = Context & {\n label?: string;\n};\n\ndeclare const Donut: IntergalacticD3Component<'g', DonutProps> & {\n Pie: IntergalacticD3Component<'path', PieProps>;\n EmptyData: IntergalacticD3Component<'path', IEmptyDataProps>;\n Label: IntergalacticD3Component<'text', LabelProps>;\n Tooltip: TooltipType<PieProps>;\n};\n\nexport default Donut;\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"GroupBar.d.js","names":[],"sources":["../../../src/types/GroupBar.d.ts"],"sourcesContent":["import { ReturnEl } from '@semcore/core';\nimport { MapProps } from './Plot';\nimport { IBarContext, IBarProps } from './Bar';\nimport { IHorizontalBarProps } from './HorizontalBar';\nimport IContext from './context';\n\nexport interface IGroupBarProps extends IContext {\n /** Field from data for XAxis */\n x?: string;\n /** Field from data for YAxis */\n y?: string;\n /** Scale for group bars */\n scaleGroup?: any;\n}\n\ndeclare const GroupBar: (<T>(props: MapProps<IGroupBarProps & T>) => ReturnEl) & {\n Bar: <T>(props: MapProps<IBarProps & T, IBarContext>) => ReturnEl;\n HorizontalBar: <T>(props: MapProps<IHorizontalBarProps & T, IBarContext>) => ReturnEl;\n};\n\nexport default GroupBar;\n"],"mappings":""}
1
+ {"version":3,"file":"GroupBar.d.js","names":[],"sources":["../../../src/types/GroupBar.d.ts"],"sourcesContent":["import { UnknownProperties } from '@semcore/core';\nimport { BarContext, BarProps } from './Bar';\nimport { HorizontalBarProps } from './HorizontalBar';\nimport { Context } from './context';\nimport { IntergalacticD3Component } from './Plot';\n\n/** @deprecated */\nexport interface IGroupBarProps extends GroupBarProps, UnknownProperties {}\nexport type GroupBarProps = Context & {\n /** Field name from `data` array item for the XAxis */\n x?: string;\n /** Field name from `data` array item for the YAxis */\n y?: string;\n /** Scale for group bars */\n /** @deprecated */\n scaleGroup?: any;\n};\n\ndeclare const GroupBar: IntergalacticD3Component<'g', GroupBarProps> & {\n Bar: IntergalacticD3Component<'path', BarProps>;\n HorizontalBar: IntergalacticD3Component<'path', HorizontalBarProps, BarContext>;\n};\n\nexport default GroupBar;\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"HorizontalBar.d.js","names":[],"sources":["../../../src/types/HorizontalBar.d.ts"],"sourcesContent":["import { ReturnEl } from '@semcore/core';\nimport { MapProps } from './Plot';\nimport IContext from './context';\nimport { IBarContext, IBackgroundProps } from './Bar';\n\nexport interface IHorizontalBarProps extends IContext {\n /** Field from data for XAxis */\n x?: string;\n /** Field from data for YAxis */\n y?: string;\n /** Line color\n * @default '#50aef4'*/\n color?: string;\n /** Animation duration in ms\n * @default 500\n */\n duration?: number;\n /** Radius of curvature\n * @default 2\n */\n r?: number | number[];\n /** Enables element transparency */\n transparent?: boolean;\n}\n\ndeclare const HorizontalBar: (<T>(\n props: MapProps<IHorizontalBarProps & T, IBarContext>,\n) => ReturnEl) & {\n Background: <T>(props: MapProps<IBackgroundProps & T>) => ReturnEl;\n};\n\nexport default HorizontalBar;\n"],"mappings":""}
1
+ {"version":3,"file":"HorizontalBar.d.js","names":[],"sources":["../../../src/types/HorizontalBar.d.ts"],"sourcesContent":["import { UnknownProperties } from '@semcore/core';\nimport { Context } from './context';\nimport { BarContext, BackgroundProps } from './Bar';\nimport { IntergalacticD3Component } from './Plot';\n\n/** @deprecated */\nexport interface IHorizontalBarProps extends HorizontalBarProps, UnknownProperties {}\nexport type HorizontalBarProps = Context & {\n /** Field name from `data` array item for the XAxis */\n x?: string;\n /** Field name from `data` array item for the YAxis */\n y?: string;\n /** Line color\n * @default '#50aef4'*/\n color?: string;\n /** Animation duration in ms\n * @default 500\n */\n duration?: number;\n /** Radius of curvature\n * @default 2\n */\n r?: number | number[];\n /** Enables element transparency */\n transparent?: boolean;\n};\n\ndeclare const HorizontalBar: IntergalacticD3Component<'path', HorizontalBarProps, BarContext> & {\n Background: IntergalacticD3Component<'rect', BackgroundProps, Context>;\n};\n\nexport default HorizontalBar;\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"Hover.d.js","names":[],"sources":["../../../src/types/Hover.d.ts"],"sourcesContent":["import { ReturnEl } from '@semcore/core';\nimport { MapProps } from './Plot';\nimport IContext from './context';\n\nexport interface IHoverProps extends IContext {\n /** Field from data for XAxis */\n x?: string;\n /** Field from data for YAxis */\n y?: string;\n}\n\ndeclare const HoverLine: <T>(props: MapProps<IHoverProps & T>) => ReturnEl;\n\ndeclare const HoverRect: <T>(props: MapProps<IHoverProps & T>) => ReturnEl;\n\nexport { HoverLine, HoverRect };\n"],"mappings":""}
1
+ {"version":3,"file":"Hover.d.js","names":[],"sources":["../../../src/types/Hover.d.ts"],"sourcesContent":["import { UnknownProperties } from '@semcore/core';\nimport { Context } from './context';\nimport { ReturnEl } from '@semcore/core';\nimport { TooltipTypeBase } from './Tooltip';\nimport { IBoxProps } from '@semcore/flex-box';\nimport { IntergalacticD3Component } from './Plot';\n\n/** @deprecated */\nexport interface IHoverProps extends HoverProps, UnknownProperties {}\nexport type HoverProps = Context & {\n /** Field name from `data` array item for the XAxis */\n x?: string;\n /** Field name from `data` array item for the YAxis */\n y?: string;\n};\n\ntype HoverTooltip = (<X, Y>(\n props: {\n /** Field name from `data` array item for the XAxis */\n x?: X;\n /** Field name from `data` array item for the YAxis */\n y?: Y;\n children: (props: {\n /** Index in `data` array of the current item */\n xIndex: X extends string ? string : never;\n /** Index in `data` array of the current item */\n yIndex: Y extends string ? string : never;\n }) => { children: ReturnEl };\n } & Omit<IBoxProps, 'children'>,\n) => ReturnEl) &\n TooltipTypeBase;\n\ndeclare const HoverLine: IntergalacticD3Component<'g', HoverProps> & {\n Tooltip: HoverTooltip;\n};\n\ndeclare const HoverRect: IntergalacticD3Component<'g', HoverProps> & {\n Tooltip: HoverTooltip;\n};\nexport { HoverLine, HoverRect };\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"Line.d.js","names":[],"sources":["../../../src/types/Line.d.ts"],"sourcesContent":["import { ReturnEl } from '@semcore/core';\nimport { MapProps } from './Plot';\nimport IContext from './context';\nimport { CurveFactory } from 'd3-shape';\nimport { IFadeInOutProps } from '@semcore/animation';\n\nexport interface ILineProps extends IContext {\n /** Field from data for XAxis */\n x?: string;\n /** Field from data for YAxis */\n y?: string;\n /** Line color\n * @default '#50aef4'*/\n color?: string;\n /** Element hide property */\n hide?: boolean;\n /** Curve method */\n curve?: CurveFactory;\n /** Animation duration in ms\n * @default 500\n */\n duration?: number;\n /** Enables element transparency */\n transparent?: boolean;\n}\n\nexport interface ILineDotsProps extends IContext, IFadeInOutProps {\n /** Show all Dot */\n display?: boolean;\n /** Hide property */\n hide?: boolean;\n /** Index active of element */\n activeIndex?: number;\n}\n\nexport interface ILineDotsContext {\n /** Value element of data */\n value?: any;\n /** Index element of data */\n index?: number;\n}\n\nexport interface ILineNullProps extends IContext {\n /** Hide property */\n hide?: boolean;\n}\n\ndeclare const Line: (<T>(props: MapProps<ILineProps & T>) => ReturnEl) & {\n Dots: <T>(props: MapProps<ILineDotsProps & T, ILineDotsContext>) => ReturnEl;\n Null: <T>(props: MapProps<ILineNullProps & T>) => ReturnEl;\n};\n\nexport default Line;\n"],"mappings":""}
1
+ {"version":3,"file":"Line.d.js","names":[],"sources":["../../../src/types/Line.d.ts"],"sourcesContent":["import { UnknownProperties } from '@semcore/core';\nimport { Context } from './context';\nimport { CurveFactory } from 'd3-shape';\nimport { FadeInOutProps } from '@semcore/animation';\nimport { IntergalacticD3Component } from './Plot';\n\n/** @deprecated */\nexport interface ILineProps extends LineProps, UnknownProperties {}\nexport type LineProps = Context & {\n /** Field name from `data` array item for the XAxis */\n x?: string;\n /** Field name from `data` array item for the YAxis */\n y?: string;\n /** Line color\n * @default '#50aef4'*/\n color?: string;\n /** Element hide property */\n hide?: boolean;\n /** Curve method */\n curve?: CurveFactory;\n /** Animation duration in ms\n * @default 500\n */\n duration?: number;\n /** Enables element transparency */\n transparent?: boolean;\n};\n\n/** @deprecated */\nexport interface ILineDotsProps extends LineDotsProps, UnknownProperties {}\nexport type LineDotsProps = Context &\n FadeInOutProps & {\n /** Show all Dot */\n display?: boolean;\n /** Hide property */\n hide?: boolean;\n /** Index active of element */\n activeIndex?: number;\n };\n\n/** @deprecated */\nexport interface ILineDotsContext extends LineDotsContext, UnknownProperties {}\nexport type LineDotsContext = {\n /** Value element of data */\n /** @deprecated */\n value?: any;\n /** Index element of data */\n index?: number;\n};\n\n/** @deprecated */\nexport interface ILineNullProps extends LineNullProps, UnknownProperties {}\nexport type LineNullProps = Context & {\n /** Hide property */\n hide?: boolean;\n};\n\ndeclare const Line: IntergalacticD3Component<'line', LineProps, Context> & {\n Dots: IntergalacticD3Component<'circle', LineDotsProps, LineDotsContext>;\n Null: IntergalacticD3Component<'path', LineNullProps>;\n};\n\nexport default Line;\n"],"mappings":""}
@@ -1,2 +1,2 @@
1
- import { MapProps } from './Plot';
1
+ export {};
2
2
  //# sourceMappingURL=Plot.d.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Plot.d.js","names":["MapProps"],"sources":["../../../src/types/Plot.d.ts"],"sourcesContent":["import { IBoxProps } from '@semcore/flex-box';\nimport { ReturnEl } from '@semcore/core';\nimport { MapProps } from './Plot';\nimport IContext from './context';\n\nexport interface IPlotProps extends IContext, IBoxProps {\n /** Width of the svg element\n * @default 0*/\n width?: number;\n /** Height of the svg element\n * @default 0*/\n height?: number;\n /** Human readable chart name (e.g \"Last market trends\") */\n label?: string;\n /**\n * Locale for displaying the days of a week and months, to be transferred to `Intl`\n * @default en\n * */\n locale?: NavigatorLanguage['language'];\n /** Optional prop to tune up alt text generating for charts */\n a11yAltTextConfig?: PlotSummarizerConfig;\n}\n\nexport type PlotSummarizerConfig = {\n /** Totally disable automatic data summarization */\n disable?: boolean;\n /** Disable automatic data summarization and use provided text */\n override?: string;\n /** Tuning up time series trends analyzing. Represents angle tangens of time series change of different strength */\n trendTangens?: {\n /** Angle tangens of time series that have meaningful trending change\n * @default 1/15\n */\n static?: number;\n /** Angle tangens of time series that have weak trending change\n * @default 1/10\n */\n weak?: number;\n /** Angle tangens of time series that have medium trending change\n * @default 1/5\n */\n medium?: number;\n /** Angle tangens of time series that have strong trending change\n * @default Infinity\n */\n strong?: number;\n };\n /** Tuning up time series local trends detection based on moving averages */\n movingAverage?: {\n /** Frame size of long moving average\n * @default Math.sqrt(data.length)\n */\n longSize?: number;\n /** Frame size of short moving average\n * @default Math.sqrt(data.length)/2\n */\n shortSize?: number;\n /** Absolute difference between values on moving averages crossing to\n * be handled as local trend change.\n * @default StandardDeviation/10\n */\n notableDiff?: number;\n };\n /** The way data to be interpreted as. By default is based on used used Plot elements and data structure.\n */\n dataType?: 'time-series' | 'points-cloud' | 'values-set';\n /** Grid size to split data of point clouds into clusters.\n */\n clustersGridSize?: number;\n /** Limits some output lists in chart alt text\n * @default 100\n * **/\n maxListSymbols?: number;\n /** Always add time to dates in chart alt text **/\n datesWithTime?: boolean;\n /** Described clusters count before text \"and X more\"\n * @default false\n * **/\n clustersLimit?: number;\n /** Described values count before text \"and X more\"\n * @default false\n * **/\n valuesLimit?: number;\n /** Described grouped value groups count before text \"and X more\"\n * @default false\n * **/\n groupsLimit?: number;\n /** Additional field for extra text description to the data\n * **/\n additionalFields?: string[];\n};\n\nexport type MapProps<Props, Ctx = {}, UCProps = {}> = Props & {\n children?:\n | ((props: Props & Ctx, handlers: UCProps) => Props | React.PropsWithChildren)\n | React.ReactNode;\n};\n\ndeclare const Plot: <T>(props: MapProps<IPlotProps & T>) => ReturnEl;\n\nexport default Plot;\n"],"mappings":"AAEA,SAASA,QAAQ,QAAQ,QAAQ"}
1
+ {"version":3,"file":"Plot.d.js","names":[],"sources":["../../../src/types/Plot.d.ts"],"sourcesContent":["import { BoxProps } from '@semcore/flex-box';\nimport { UnknownProperties, Intergalactic } from '@semcore/core';\nimport { Context } from './context';\n\n/** @deprecated */\nexport interface IPlotProps extends PlotProps, UnknownProperties {}\nexport type PlotProps = Context &\n BoxProps & {\n /** Width of the svg element\n * @default 0*/\n width?: number;\n /** Height of the svg element\n * @default 0*/\n height?: number;\n /** Human readable chart name (e.g \"Last market trends\") */\n label?: string;\n /**\n * Locale for displaying the days of a week and months, to be transferred to `Intl`\n * @default en\n * */\n locale?: NavigatorLanguage['language'];\n /** Optional prop to tune up alt text generating for charts */\n a11yAltTextConfig?: PlotSummarizerConfig;\n\n /** @deprecated */\n eventEmitter?: unknown;\n };\n\nexport type PlotSummarizerConfig = {\n /** Totally disable automatic data summarization */\n disable?: boolean;\n /** Disable automatic data summarization and use provided text */\n override?: string;\n /** Tuning up time series trends analyzing. Represents angle tangens of time series change of different strength */\n trendTangens?: {\n /** Angle tangens of time series that have meaningful trending change\n * @default 1/15\n */\n static?: number;\n /** Angle tangens of time series that have weak trending change\n * @default 1/10\n */\n weak?: number;\n /** Angle tangens of time series that have medium trending change\n * @default 1/5\n */\n medium?: number;\n /** Angle tangens of time series that have strong trending change\n * @default Infinity\n */\n strong?: number;\n };\n /** Tuning up time series local trends detection based on moving averages */\n movingAverage?: {\n /** Frame size of long moving average\n * @default Math.sqrt(data.length)\n */\n longSize?: number;\n /** Frame size of short moving average\n * @default Math.sqrt(data.length)/2\n */\n shortSize?: number;\n /** Absolute difference between values on moving averages crossing to\n * be handled as local trend change.\n * @default StandardDeviation/10\n */\n notableDiff?: number;\n };\n /** The way data to be interpreted as. By default is based on used used Plot elements and data structure.\n */\n dataType?: 'time-series' | 'points-cloud' | 'values-set';\n /** Grid size to split data of point clouds into clusters.\n */\n clustersGridSize?: number;\n /** Limits some output lists in chart alt text\n * @default 100\n * **/\n maxListSymbols?: number;\n /** Always add time to dates in chart alt text **/\n datesWithTime?: boolean;\n /** Described clusters count before text \"and X more\"\n * @default false\n * **/\n clustersLimit?: number;\n /** Described values count before text \"and X more\"\n * @default false\n * **/\n valuesLimit?: number;\n /** Described grouped value groups count before text \"and X more\"\n * @default false\n * **/\n groupsLimit?: number;\n /** Additional field for extra text description to the data\n * **/\n additionalFields?: string[];\n};\n\n/** @deprecated */\nexport type MapProps<Props, Ctx = {}, UCProps = {}> = Props & {\n children?:\n | ((props: Props & Ctx, handlers: UCProps) => Props | React.PropsWithChildren)\n | React.ReactNode;\n};\n\nexport type IntergalacticD3Component<BaseTag extends Intergalactic.Tag, Props, Context = {}> = (<\n Tag extends Intergalactic.Tag = BaseTag,\n>(\n props: Intergalactic.InternalTypings.PropsRenderingResultComponentProps<Tag, Props, Context>,\n) => Intergalactic.InternalTypings.ComponentRenderingResults) &\n Intergalactic.InternalTypings.ComponentAdditive<BaseTag>;\n\ndeclare const Plot: IntergalacticD3Component<'svg', PlotProps, Context>;\nexport default Plot;\n"],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=Radar.d.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Radar.d.js","names":[],"sources":["../../../src/types/Radar.d.ts"],"sourcesContent":["import { Context } from './context';\nimport { UnknownProperties } from '@semcore/core';\nimport { CurveFactory } from 'd3-shape';\nimport { TooltipType } from './Tooltip';\nimport { IntergalacticD3Component } from './Plot';\nimport { BoxProps } from '@semcore/flex-box';\n\n/** @deprecated */\nexport interface IRadarProps extends RadarProps, UnknownProperties {}\nexport type RadarProps = Context & {\n /**\n * Scale for radar element\n * */\n /** @deprecated */\n scale: any;\n /**\n * Graph type to be displayed\n * @default 'polygon'\n * */\n type?: 'polygon' | 'circle';\n /**\n * Indent from the edge of svg to graph\n * */\n offset?: number;\n\n /**\n * Label font size\n * @default 12\n * */\n textSize?: number;\n\n /**\n * Base angle of chart rotation\n * @default 0\n * @example Math.PI/3\n * */\n angleOffset?: number;\n};\n\n/** @deprecated */\nexport interface IRadarAxisProps extends RadarAxisProps, UnknownProperties {}\nexport type RadarAxisProps = Context & {\n /**\n * Sets the field name for categories\n * */\n dataKey: string;\n};\n\n/** @deprecated */\nexport interface IRadarAxisTicksProps extends RadarAxisTicksProps, UnknownProperties {}\nexport type RadarAxisTicksProps = {\n /**\n * Distance between auxiliary lines\n * @default 100\n * */\n tickSize?: number;\n};\n\n/** @deprecated */\nexport interface IRadarAxisLabelsProps extends RadarAxisLabelsProps, UnknownProperties {}\nexport type RadarAxisLabelsProps = {\n /**\n * Indent from graph to label\n * @default 10\n * */\n labelOffset?: number;\n};\n\ntype RadarAxisLabelsContext = Context & {\n xDirection: 'middle' | 'start' | 'end';\n yDirection: 'alphabetic' | 'mathematical' | 'middle';\n x: number;\n y: number;\n};\n\n/** @deprecated */\nexport interface IRadialPolygonProps extends RadialPolygonProps, UnknownProperties {}\nexport type RadialPolygonProps = Context & {\n /**\n * Sets the field name for data\n * */\n dataKey: string;\n /**\n * Curve method\n * @default curveLinearClosed\n * */\n curve?: CurveFactory;\n /**\n * Sets the color of the entire polygon\n * */\n color?: string;\n /**\n * Sets the fill color\n * */\n fill?: string;\n};\n\n/** @deprecated */\nexport interface IRadialPolygonLineProps extends RadialPolygonLineProps, UnknownProperties {}\nexport type RadialPolygonLineProps = {\n /**\n * Sets the line color\n * */\n color?: string;\n};\n\n/** @deprecated */\nexport interface IRadialPolygonDotsProps extends RadialPolygonDotsProps, UnknownProperties {}\nexport type RadialPolygonDotsProps = {\n /**\n * Sets the dot color\n * */\n color?: string;\n};\n\n/** @deprecated */\nexport interface IRadarHoverProps extends RadarHoverProps, UnknownProperties {}\nexport type RadarHoverProps = BoxProps & Context & {};\n\ndeclare const Radar: IntergalacticD3Component<'g', RadarProps, Context> & {\n Axis: IntergalacticD3Component<'path', RadarAxisProps, Context> & {\n Ticks: IntergalacticD3Component<'path', RadarAxisTicksProps, Context>;\n Labels: IntergalacticD3Component<'text', RadarAxisLabelsProps, RadarAxisLabelsContext>;\n };\n Polygon: IntergalacticD3Component<'path', RadialPolygonProps, Context> & {\n Line: IntergalacticD3Component<'line', RadialPolygonLineProps, Context>;\n Dots: IntergalacticD3Component<'circle', RadialPolygonDotsProps, Context>;\n };\n Hover: IntergalacticD3Component<'path', RadarHoverProps, Context>;\n Tooltip: TooltipType<\n RadarHoverProps & {\n /** Index in `data` array of the current items */\n index: number;\n }\n >;\n};\n\nexport declare function getLabelOffsetPosition(\n xDirection: 'middle' | 'start' | 'end',\n yDirection: 'alphabetic' | 'mathematical' | 'middle',\n width: number,\n height: number,\n): [xOffset: number, yOffset: number];\n\nexport default Radar;\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"ReferenceLine.d.js","names":[],"sources":["../../../src/types/ReferenceLine.d.ts"],"sourcesContent":["import { ReturnEl } from '@semcore/core';\nimport { MapProps } from './Plot';\nimport IContext from './context';\n\nexport interface IReferenceLineProps extends IContext {\n /** The position of the title relative reference line\n * @default 'left' */\n position?: 'top' | 'right' | 'bottom' | 'left';\n /** Value element of data */\n value: any;\n}\n\nexport interface IReferenceLineTitleProps extends IContext {\n /** The position of the axis relative reference line */\n position?: 'top' | 'right' | 'bottom' | 'left';\n /** Value element of data */\n value: any;\n}\n\nexport interface IReferenceLineBackgroundProps extends IContext {\n /** The position of the axis relative reference line */\n position?: 'top' | 'right' | 'bottom' | 'left';\n /** Value element of data */\n value: any;\n}\n\ndeclare const ReferenceLine: (<T>(props: MapProps<IReferenceLineProps & T>) => ReturnEl) & {\n Title: <T>(props: MapProps<IReferenceLineTitleProps & T>) => ReturnEl;\n Background: <T>(props: MapProps<IReferenceLineBackgroundProps & T>) => ReturnEl;\n};\n\nexport default ReferenceLine;\n"],"mappings":""}
1
+ {"version":3,"file":"ReferenceLine.d.js","names":[],"sources":["../../../src/types/ReferenceLine.d.ts"],"sourcesContent":["import { UnknownProperties } from '@semcore/core';\nimport { Context } from './context';\nimport { IntergalacticD3Component } from './Plot';\n\n/** @deprecated **/\nexport interface IReferenceLineProps extends ReferenceLineProps, UnknownProperties {}\nexport type ReferenceLineProps = Context & {\n /** The position of the title relative reference line\n * @default 'left' */\n position?: 'top' | 'right' | 'bottom' | 'left';\n /** Value element of data */\n /** @deprecated */\n value?: any;\n\n title?: string;\n};\n\n/** @deprecated **/\nexport interface IReferenceLineTitleProps extends ReferenceLineTitleProps, UnknownProperties {}\nexport type ReferenceLineTitleProps = Context & {\n /** The position of the axis relative reference line */\n position?: 'top' | 'right' | 'bottom' | 'left';\n /** Value element of data */\n /** @deprecated */\n value: any;\n};\n\n/** @deprecated **/\nexport interface IReferenceLineBackgroundProps\n extends ReferenceLineBackgroundProps,\n UnknownProperties {}\nexport type ReferenceLineBackgroundProps = Context & {\n /** The position of the axis relative reference line */\n position?: 'top' | 'right' | 'bottom' | 'left';\n /** Value element of data */\n /** @deprecated */\n value?: any;\n};\n\ndeclare const ReferenceLine: IntergalacticD3Component<'line', ReferenceLineProps, Context> & {\n Title: IntergalacticD3Component<'text', ReferenceLineTitleProps, Context>;\n Background: IntergalacticD3Component<'rect', ReferenceLineBackgroundProps, Context>;\n};\n\nexport default ReferenceLine;\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"ResponsiveContainer.d.js","names":[],"sources":["../../../src/types/ResponsiveContainer.d.ts"],"sourcesContent":["import { IBoxProps } from '@semcore/flex-box';\nimport { ReturnEl } from '@semcore/core';\nimport { MapProps } from './Plot';\n\nexport interface IResponsiveContainerProps extends IBoxProps {\n /** Relation between height and width dimensions block */\n aspect?: number;\n /** Callback which will be called after changing the block size */\n onResize?: (size: [number, number], entries: ResizeObserverEntry[]) => void;\n}\n\nexport interface IResponsiveContainerContext {\n width?: number;\n height?: number;\n}\n\ndeclare const ResponsiveContainer: <T>(\n props: MapProps<IResponsiveContainerProps & T, IResponsiveContainerContext>,\n) => ReturnEl;\n\nexport default ResponsiveContainer;\n"],"mappings":""}
1
+ {"version":3,"file":"ResponsiveContainer.d.js","names":[],"sources":["../../../src/types/ResponsiveContainer.d.ts"],"sourcesContent":["import { BoxProps } from '@semcore/flex-box';\nimport { UnknownProperties } from '@semcore/core';\nimport { IntergalacticD3Component } from './Plot';\n\n/** @deprecated */\nexport interface IResponsiveContainerProps extends ResponsiveContainerProps, UnknownProperties {}\nexport type ResponsiveContainerProps = BoxProps & {\n /** Relation between height and width dimensions block */\n aspect?: number;\n /** Callback which will be called after changing the block size */\n onResize?: (size: [number, number], entries: ResizeObserverEntry[]) => void;\n};\n\n/** @deprecated */\nexport interface IResponsiveContainerContext\n extends ResponsiveContainerContext,\n UnknownProperties {}\nexport type ResponsiveContainerContext = {\n width?: number;\n height?: number;\n};\n\ndeclare const ResponsiveContainer: IntergalacticD3Component<\n 'div',\n ResponsiveContainerProps,\n ResponsiveContainerContext\n>;\n\nexport default ResponsiveContainer;\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"ScatterPlot.d.js","names":[],"sources":["../../../src/types/ScatterPlot.d.ts"],"sourcesContent":["import { ReturnEl } from '@semcore/core';\nimport { MapProps } from './Plot';\nimport IContext from './context';\n\nexport interface IScatterPlotProps extends IContext {\n /** Field from data for XAxis */\n x: string;\n /** Field from data for YAxis */\n y: string;\n /** Field from data for circle value */\n value?: string;\n /** Circle color */\n color?: string;\n /** Circle value color */\n valueColor?: string;\n /** Animation duration in ms\n * @default 500\n */\n duration?: number;\n /** Radius of circles\n * @default 5.5 or 12 with value\n */\n r?: number;\n /** Enables element transparency */\n transparent?: boolean;\n}\n\ndeclare const ScatterPlot: <T>(props: MapProps<IScatterPlotProps & T>) => ReturnEl;\n\nexport default ScatterPlot;\n"],"mappings":""}
1
+ {"version":3,"file":"ScatterPlot.d.js","names":[],"sources":["../../../src/types/ScatterPlot.d.ts"],"sourcesContent":["import { UnknownProperties } from '@semcore/core';\nimport { Context } from './context';\nimport { TooltipType } from './Tooltip';\nimport { IntergalacticD3Component } from './Plot';\n\n/** @deprecated */\nexport interface IScatterPlotProps extends ScatterPlotProps, UnknownProperties {}\nexport type ScatterPlotProps = Context & {\n /** Field name from `data` array item for the XAxis */\n x: string;\n /** Field name from `data` array item for the YAxis */\n y: string;\n /** Field name from `data` array item for the circle value */\n value?: string;\n /** Circle color */\n color?: string;\n /** Circle value color */\n valueColor?: string;\n /** Animation duration in ms\n * @default 500\n */\n duration?: number;\n /** Radius of circles\n * @default 5.5 or 12 with value\n */\n r?: number;\n /** Enables element transparency */\n transparent?: boolean;\n};\n\ndeclare const ScatterPlot: IntergalacticD3Component<'g', ScatterPlotProps, Context> & {\n Tooltip: TooltipType<\n ScatterPlotProps & {\n /**\n * @deprecated Use `index` instead.\n */\n xIndex: number;\n /**\n * Index of item in the `data` array used to render related circle.\n */\n index: number;\n }\n >;\n};\n\nexport default ScatterPlot;\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"StackBar.d.js","names":[],"sources":["../../../src/types/StackBar.d.ts"],"sourcesContent":["import { ReturnEl } from '@semcore/core';\nimport { MapProps } from './Plot';\nimport IContext from './context';\nimport { IBarContext, IBarProps } from './Bar';\nimport { IHorizontalBarProps } from './HorizontalBar';\n\nexport interface IStackBarProps extends IContext {\n /** Field from data for XAxis */\n x?: string;\n /** Field from data for YAxis */\n y?: string;\n /** Stack generators\n * @default d3.stack() */\n stack?: any;\n}\n\nexport interface IStackBarContext {\n /** Series is an array of points, where each point corresponds to the element in the input data. */\n series: any[];\n}\n\ndeclare const StackBar: (<T>(props: MapProps<IStackBarProps & T, IStackBarContext>) => ReturnEl) & {\n Bar: <T>(props: MapProps<IBarProps & T, IBarContext>) => ReturnEl;\n HorizontalBar: <T>(props: MapProps<IHorizontalBarProps & T, IBarContext>) => ReturnEl;\n};\n\nexport default StackBar;\n"],"mappings":""}
1
+ {"version":3,"file":"StackBar.d.js","names":[],"sources":["../../../src/types/StackBar.d.ts"],"sourcesContent":["import { UnknownProperties } from '@semcore/core';\nimport { Context } from './context';\nimport { BarContext, BarProps } from './Bar';\nimport { HorizontalBarProps } from './HorizontalBar';\nimport { IntergalacticD3Component } from './Plot';\n\n/** @deprecated */\nexport interface IStackBarProps extends StackBarProps, UnknownProperties {}\nexport type StackBarProps = Context & {\n /** Field name from `data` array item for the XAxis */\n x?: string;\n /** Field name from `data` array item for the YAxis */\n y?: string;\n /** Stack generators\n * @default d3.stack() */\n /** @deprecated */\n stack?: any;\n};\n\n/** @deprecated */\nexport interface IStackBarContext extends StackBarContext, UnknownProperties {}\nexport type StackBarContext = {\n /** Series is an array of points, where each point corresponds to the element in the input data. */\n /** @deprecated */\n series: any[];\n};\n\ndeclare const StackBar: IntergalacticD3Component<'g', StackBarProps, StackBarContext> & {\n Bar: IntergalacticD3Component<'path', BarProps, BarContext>;\n HorizontalBar: IntergalacticD3Component<'path', HorizontalBarProps, BarContext>;\n};\n\nexport default StackBar;\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"StackedArea.d.js","names":[],"sources":["../../../src/types/StackedArea.d.ts"],"sourcesContent":["import { ReturnEl } from '@semcore/core';\nimport { MapProps } from './Plot';\nimport IContext from './context';\nimport Area from './Area';\n\nexport interface IStackedAreaProps extends IContext {\n /** Field from data for XAxis */\n x?: string;\n /** Field from data for YAxis */\n y?: string;\n /** Stack generators\n * @default d3.stack() */\n stack?: any;\n}\n\nexport interface IStackedAreaContext {\n /** Series is an array of points, where each point corresponds to the element in the input data. */\n series: any[];\n}\n\ndeclare const StackedArea: (<T>(\n props: MapProps<IStackedAreaProps & T, IStackedAreaContext>,\n) => ReturnEl) & {\n Area: typeof Area;\n};\n\nexport default StackedArea;\n"],"mappings":""}
1
+ {"version":3,"file":"StackedArea.d.js","names":[],"sources":["../../../src/types/StackedArea.d.ts"],"sourcesContent":["import { UnknownProperties } from '@semcore/core';\nimport { Context } from './context';\nimport Area from './Area';\nimport { IntergalacticD3Component } from './Plot';\n\n/** @deprecated */\nexport interface IStackedAreaProps extends StackedAreaProps, UnknownProperties {}\nexport type StackedAreaProps = Context & {\n /** Field name from `data` array item for the XAxis */\n x?: string;\n /** Field name from `data` array item for the YAxis */\n y?: string;\n /** Stack generators\n * @default d3.stack() */\n /** @deprecated */\n stack?: any;\n};\n\n/** @deprecated */\nexport interface IStackedAreaContext extends StackedAreaContext, UnknownProperties {}\nexport type StackedAreaContext = {\n /** Series is an array of points, where each point corresponds to the element in the input data. */\n /** @deprecated */\n series: any[];\n};\n\ndeclare const StackedArea: IntergalacticD3Component<'g', StackedAreaProps, StackedAreaContext> & {\n Area: typeof Area;\n};\n\nexport default StackedArea;\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"Tooltip.d.js","names":[],"sources":["../../../src/types/Tooltip.d.ts"],"sourcesContent":["import { ComponentProps } from 'react';\nimport Popper, { IPopperProps, IPopperTriggerProps } from '@semcore/popper';\nimport { PropGetterFn, ReturnEl } from '@semcore/core';\nimport { MapProps } from './Plot';\nimport { IBoxProps } from '@semcore/flex-box';\nimport IContext from './context';\n\nexport interface ITooltipChartProps extends IPopperProps, IPopperTriggerProps, IContext {\n /** Field from data for XAxis */\n x?: string;\n /** Field from data for YAxis */\n y?: string;\n}\n\nexport interface ITooltipChartContext {\n getTriggerProps: PropGetterFn;\n getPopperProps: PropGetterFn;\n /** Index active value for Axis x */\n xIndex: number | null;\n /** Index active value for Axis y */\n yIndex: number | null;\n}\n\ndeclare const Tooltip: (<T>(\n props: MapProps<ITooltipChartProps & T, ITooltipChartContext>,\n) => ReturnEl) & {\n Trigger: <T>(props: MapProps<ComponentProps<typeof Popper.Trigger> & T>) => ReturnEl;\n Popper: <T>(props: MapProps<ComponentProps<typeof Popper.Popper> & T>) => ReturnEl;\n Title: <T>(props: MapProps<IBoxProps & T>) => ReturnEl;\n Dot: <T>(props: MapProps<IBoxProps & { color?: string } & T>) => ReturnEl;\n Footer: <T>(props: MapProps<IBoxProps & T>) => ReturnEl;\n};\n\nexport default Tooltip;\n"],"mappings":""}
1
+ {"version":3,"file":"Tooltip.d.js","names":[],"sources":["../../../src/types/Tooltip.d.ts"],"sourcesContent":["import Popper, { PopperProps, PopperTriggerProps } from '@semcore/popper';\nimport { PropGetterFn, UnknownProperties, Intergalactic } from '@semcore/core';\nimport { Box, BoxProps } from '@semcore/flex-box';\nimport { Context } from './context';\nimport { IntergalacticD3Component } from './Plot';\n\n/** @deprecated */\nexport interface ITooltipChartProps extends TooltipChartProps, UnknownProperties {}\nexport type TooltipChartProps = PopperProps &\n PopperTriggerProps &\n Context & {\n /** Field name from `data` array item for the XAxis */\n x?: string;\n /** Field name from `data` array item for the YAxis */\n y?: string;\n };\n\n/** @deprecated */\nexport interface ITooltipChartContext extends TooltipChartContext, UnknownProperties {\n /** Index active value for Axis x */\n xIndex: number | null;\n /** Index active value for Axis y */\n yIndex: number | null;\n}\nexport type TooltipChartContext = {\n getTriggerProps: PropGetterFn;\n getPopperProps: PropGetterFn;\n};\n\nexport type TooltipTypeBase = {\n Trigger: typeof Popper.Trigger;\n Popper: typeof Popper.Popper;\n Title: typeof Box;\n Dot: IntergalacticD3Component<'div', BoxProps & { color?: string }, TooltipChartContext>;\n Footer: typeof Box;\n};\n\nexport type TooltipType<ChildrenRenderProps = {}, TooltipProps = {}> = (<\n Tag extends Intergalactic.Tag = typeof Box,\n>(\n props: Intergalactic.InternalTypings.PropsRenderingResultComponentProps<\n Tag,\n TooltipProps,\n ChildrenRenderProps & TooltipChartContext\n >,\n) => Intergalactic.InternalTypings.ComponentRenderingResults) &\n Intergalactic.InternalTypings.ComponentAdditive<Intergalactic.Tag> &\n TooltipTypeBase;\n\n/**\n * @deprecated Consider migration to better typed Bubble.Tooltip, HoverLine.Tooltip,\n * HoverRect.Tooltip, Donut.Tooltip, Radar.Tooltip,\n * ScatterPlot.Tooltip or Venn.Tooltip.\n *\n * Migration examples:\n * 1. `<Tooltip tag={HoverLine}>...</Tooltip>` => `<HoverLine.Tooltip>...</HoverLine.Tooltip>`\n * 2. `<Tooltip tag={HoverRect}>...</Tooltip>` => `<HoverRect.Tooltip>...</HoverRect.Tooltip>`\n * 3. `<Tooltip tag={Radar.Hover}>...</Tooltip>` => `<Radar.Tooltip>...</Radar.Tooltip>`\n * 4. `<Tooltip>...</Tooltip>` => `<Bubble.Tooltip>...</Bubble.Tooltip>`\n * 5. `<Tooltip>...</Tooltip>` => `<Donut.Tooltip>...</Donut.Tooltip>`\n * 6. `<Tooltip>...</Tooltip>` => `<ScatterPlot.Tooltip>...</ScatterPlot.Tooltip>`\n * 7. `<Tooltip>...</Tooltip>` => `<Venn.Tooltip>...</Venn.Tooltip>`\n */\ndeclare const Tooltip: TooltipType;\n\nexport default Tooltip;\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"Venn.d.js","names":[],"sources":["../../../src/types/Venn.d.ts"],"sourcesContent":["import { ReturnEl } from '@semcore/core';\nimport { MapProps } from './Plot';\nimport IContext from './context';\nimport { IFadeInOutProps } from '@semcore/animation';\n\nexport interface IVennProps extends IContext, IFadeInOutProps {\n /**\n * Rotate sets in the chart\n * @default Math.PI / 2\n */\n orientation?: number;\n /**\n * The function for sorting sets inside the chart\n * @default (circle1, circle2) => circle2.radius - circle1.radius\n */\n orientationOrder?: (c1: number, c2: number) => number;\n}\n\nexport interface ICircleProps extends IContext {\n /**\n * Name of the field in the data\n * */\n dataKey: string;\n /** Color circle\n @default #3AB011\n **/\n color?: string;\n /** Animation duration in ms\n * @default 500\n */\n duration?: number;\n /** Enables element transparency */\n transparent?: boolean;\n}\n\nexport interface IIntersectionProps extends IContext, IFadeInOutProps {\n /**\n * Name of the field in the data\n * */\n dataKey: string;\n /** Enables element transparency */\n transparent?: boolean;\n}\n\ndeclare const Venn: (<T>(props: MapProps<IVennProps & T>) => ReturnEl) & {\n Circle: <T>(props: MapProps<ICircleProps & T>) => ReturnEl;\n Intersection: <T>(props: MapProps<IIntersectionProps & T>) => ReturnEl;\n};\n\nexport default Venn;\n"],"mappings":""}
1
+ {"version":3,"file":"Venn.d.js","names":[],"sources":["../../../src/types/Venn.d.ts"],"sourcesContent":["import { UnknownProperties } from '@semcore/core';\nimport { Context } from './context';\nimport { FadeInOutProps } from '@semcore/animation';\nimport { TooltipType } from './Tooltip';\nimport { IntergalacticD3Component } from './Plot';\n\n/** @deprecated */\nexport interface IVennProps extends VennProps, UnknownProperties {}\nexport type VennProps = Context &\n FadeInOutProps & {\n /**\n * Rotate sets in the chart\n * @default Math.PI / 2\n */\n orientation?: number;\n /**\n * The function for sorting sets inside the chart\n * @default (circle1, circle2) => circle2.radius - circle1.radius\n */\n orientationOrder?: (c1: number, c2: number) => number;\n };\n\n/** @deprecated */\nexport interface ICircleProps extends CircleProps, UnknownProperties {}\nexport type CircleProps = Context & {\n /**\n * Name of the field in the data\n * */\n dataKey: string;\n /**\n * Human readable name of the circle\n * */\n name: string;\n /** Color circle\n @default #3AB011\n **/\n color?: string;\n /** Animation duration in ms\n * @default 500\n */\n duration?: number;\n /** Enables element transparency */\n transparent?: boolean;\n};\n\n/** @deprecated */\nexport interface IIntersectionProps extends IntersectionProps, UnknownProperties {}\nexport type IntersectionProps = Context &\n FadeInOutProps & {\n /**\n * Name of the field in the data\n * */\n dataKey: string;\n /**\n * Human readable name of the intersection\n * */\n name: string;\n /** Enables element transparency */\n transparent?: boolean;\n };\n\ndeclare const Venn: IntergalacticD3Component<'g', VennProps, Context> & {\n Circle: IntergalacticD3Component<'circle', CircleProps, Context>;\n Intersection: IntergalacticD3Component<'path', IntersectionProps, Context>;\n Tooltip: TooltipType<CircleProps>;\n};\n\nexport default Venn;\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"context.d.js","names":[],"sources":["../../../src/types/context.d.ts"],"sourcesContent":["export default interface IContext {\n /** Data for graphic */\n data?: any;\n /** Scale for svg element */\n scale?: any[];\n\n [key: string]: unknown;\n}\n"],"mappings":""}
1
+ {"version":3,"file":"context.d.js","names":[],"sources":["../../../src/types/context.d.ts"],"sourcesContent":["export type Context = {\n /** Data for graphic */\n data?: unknown;\n /** Scale for svg element */\n scale?: unknown[];\n};\n\n/** @deprecated */\nexport default interface IContext {\n /** Data for graphic */\n /** @deprecated */\n data?: any;\n /** Scale for svg element */\n /** @deprecated */\n scale?: any[];\n\n [key: string]: unknown;\n}\n"],"mappings":""}