@elliemae/ds-dataviz 3.62.1 → 3.70.0-alpha.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/dist/cjs/graphs/Chart/SingleStackedBar/SingleStackedBar.js +48 -23
  2. package/dist/cjs/graphs/Chart/SingleStackedBar/SingleStackedBar.js.map +2 -2
  3. package/dist/cjs/graphs/Chart/SingleStackedBar/react-desc-prop-types.js.map +2 -2
  4. package/dist/cjs/graphs/Chart/parts/FocusableRegion.js +16 -10
  5. package/dist/cjs/graphs/Chart/parts/FocusableRegion.js.map +2 -2
  6. package/dist/cjs/graphs/Chart/parts/Scrapper/ScrapperLine.js +15 -12
  7. package/dist/cjs/graphs/Chart/parts/Scrapper/ScrapperLine.js.map +2 -2
  8. package/dist/cjs/graphs/Chart/parts/Scrapper/VerticalScrapperLine.js +13 -11
  9. package/dist/cjs/graphs/Chart/parts/Scrapper/VerticalScrapperLine.js.map +2 -2
  10. package/dist/cjs/graphs/Chart/react-desc-prop-types.js.map +1 -1
  11. package/dist/esm/graphs/Chart/SingleStackedBar/SingleStackedBar.js +48 -23
  12. package/dist/esm/graphs/Chart/SingleStackedBar/SingleStackedBar.js.map +2 -2
  13. package/dist/esm/graphs/Chart/SingleStackedBar/react-desc-prop-types.js.map +2 -2
  14. package/dist/esm/graphs/Chart/parts/FocusableRegion.js +17 -11
  15. package/dist/esm/graphs/Chart/parts/FocusableRegion.js.map +2 -2
  16. package/dist/esm/graphs/Chart/parts/Scrapper/ScrapperLine.js +16 -13
  17. package/dist/esm/graphs/Chart/parts/Scrapper/ScrapperLine.js.map +2 -2
  18. package/dist/esm/graphs/Chart/parts/Scrapper/VerticalScrapperLine.js +14 -12
  19. package/dist/esm/graphs/Chart/parts/Scrapper/VerticalScrapperLine.js.map +2 -2
  20. package/dist/esm/graphs/Chart/react-desc-prop-types.js.map +1 -1
  21. package/dist/types/graphs/Chart/SingleStackedBar/react-desc-prop-types.d.ts +3 -3
  22. package/dist/types/graphs/Chart/parts/Axis/Axis.d.ts +1 -1
  23. package/dist/types/graphs/Chart/parts/Axis/AxisBottom.d.ts +1 -1
  24. package/dist/types/graphs/Chart/parts/Axis/AxisLeft.d.ts +1 -1
  25. package/dist/types/graphs/Chart/parts/Axis/AxisRight.d.ts +1 -1
  26. package/dist/types/graphs/Chart/parts/ChartContainer.d.ts +2 -1
  27. package/dist/types/graphs/Chart/parts/ClipPaths.d.ts +2 -1
  28. package/dist/types/graphs/Chart/parts/Labels/index.d.ts +2 -1
  29. package/dist/types/graphs/Chart/parts/Legend/BottomLegend.d.ts +2 -1
  30. package/dist/types/graphs/Chart/parts/Legend/LeftLegend.d.ts +2 -1
  31. package/dist/types/graphs/Chart/parts/Legend/Legend.d.ts +2 -1
  32. package/dist/types/graphs/Chart/parts/Legend/LegendItem.d.ts +2 -1
  33. package/dist/types/graphs/Chart/parts/Legend/RightLegend.d.ts +2 -1
  34. package/dist/types/graphs/Chart/parts/Legend/TopLegend.d.ts +2 -1
  35. package/dist/types/graphs/Chart/parts/Scrapper/Scrapper.d.ts +2 -1
  36. package/dist/types/graphs/Chart/parts/Scrapper/VerticalScrapper.d.ts +2 -1
  37. package/dist/types/graphs/Chart/parts/Scroller/BlurMask.d.ts +2 -1
  38. package/dist/types/graphs/Chart/parts/Scroller/Controllers.d.ts +2 -1
  39. package/dist/types/graphs/Chart/parts/Scroller/ScrollBarX.d.ts +2 -1
  40. package/dist/types/graphs/Chart/parts/Scroller/ScrollBarY.d.ts +2 -1
  41. package/dist/types/graphs/Chart/parts/Scroller/ScrollableContainerX.d.ts +2 -1
  42. package/dist/types/graphs/Chart/parts/Scroller/ScrollableContainerY.d.ts +2 -1
  43. package/dist/types/graphs/Chart/parts/SeriesFactory.d.ts +2 -1
  44. package/dist/types/graphs/Chart/react-desc-prop-types.d.ts +2 -2
  45. package/dist/types/graphs/Chart/series/HorizontalBars.d.ts +2 -1
  46. package/dist/types/graphs/Chart/series/HorizontalStackedBars.d.ts +2 -1
  47. package/package.json +10 -10
  48. package/dist/types/graphs/Chart/tests/basic.test.d.ts +0 -1
  49. package/dist/types/graphs/Chart/tests/scrollable.test.d.ts +0 -1
  50. package/dist/types/graphs/Chart/tests/single-stacked-bar.test.d.ts +0 -1
  51. package/dist/types/typescript-testing/typescript-data-viz-valid.d.ts +0 -1
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../../scripts/build/transpile/react-shim.js", "../../../../../src/graphs/Chart/SingleStackedBar/SingleStackedBar.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport type { DSGridT } from '@elliemae/ds-grid';\nimport { Grid } from '@elliemae/ds-grid';\nimport { DSPopperJS } from '@elliemae/ds-popperjs';\nimport {\n describe,\n useGetGlobalAttributes,\n useGetXstyledProps,\n useMemoMergePropsWithDefault,\n useValidateTypescriptPropTypes,\n} from '@elliemae/ds-props-helpers';\nimport { mergeRefs } from '@elliemae/ds-system';\nimport React, { useCallback, useMemo, useState, type WeakValidationMap } from 'react';\nimport { COLOR_PALLET } from '../helpers/colorPallet.js';\nimport { DSSingleStackedBarName } from './exported-related/index.js';\nimport { DSSingleStackedBarPropTypes, defaultProps, type DSSingleStackedBarT } from './react-desc-prop-types.js';\nimport { StyledBar, StyledMouseOverDetectionBox, StyledTooltipContainer, Wrapper } from './styles.js';\nconst Bar = React.memo((props: DSSingleStackedBarT.BarT) => {\n const [referenceElement, setReferenceElement] = useState<HTMLDivElement | null>(null);\n const [isHover, setIsHover] = useState(false);\n const { height, TooltipRenderer, datum, tabIndex, isFocused, borderRadius, bg } = props;\n const handleRefCallback = useCallback(\n (_ref: HTMLDivElement | null) => {\n if (isFocused) {\n _ref?.focus();\n }\n },\n [isFocused],\n );\n\n const handleMouseEnter = useCallback(() => {\n setIsHover(true);\n }, []);\n\n const handleMouseLeave = useCallback(() => {\n setIsHover(false);\n }, []);\n return (\n <div>\n {(isFocused || isHover) && TooltipRenderer ? (\n <DSPopperJS referenceElement={referenceElement} showPopover>\n <StyledMouseOverDetectionBox />\n <StyledTooltipContainer>\n <TooltipRenderer datum={datum} />\n </StyledTooltipContainer>\n </DSPopperJS>\n ) : null}\n <StyledBar\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n bg={bg}\n height={height}\n borderRadius={borderRadius}\n innerRef={mergeRefs(handleRefCallback, setReferenceElement)}\n tabIndex={tabIndex}\n role=\"img\"\n // until uziel work is merged we keep this default value\n aria-label={`${datum.name} value: ${datum.data}`}\n />\n </div>\n );\n});\n\nconst DSSingleStackedBar: React.ComponentType<DSSingleStackedBarT.Props> = (props) => {\n const propsWithDefaults = useMemoMergePropsWithDefault<DSSingleStackedBarT.InternalProps>(props, defaultProps);\n useValidateTypescriptPropTypes(propsWithDefaults, DSSingleStackedBarPropTypes, 'DSSingleStackedBar');\n\n const globalAttributes = useGetGlobalAttributes<DSSingleStackedBarT.InternalProps, HTMLDivElement, DSGridT.Props>(\n propsWithDefaults,\n );\n\n const xstyledProps = useGetXstyledProps(propsWithDefaults);\n\n const { data, LegendRenderer, gutter, height } = propsWithDefaults;\n const [keyBarFocused, setKeyBarFocused] = useState<number>(0);\n const [isChartFocused, setIsChartFocused] = useState(false);\n\n const total = useMemo(() => data.map((datum) => datum.data).reduce((acc, curr) => acc + curr, 0), [data]);\n const cols = useMemo(() => data.map((datum) => `${Math.ceil(datum.data * 100) / total}%`), [data, total]);\n const rows = useMemo(\n () => (LegendRenderer !== undefined ? [`${height}px`, 'auto'] : [`${height}px`]),\n [LegendRenderer, height],\n );\n const barNames = useMemo(() => data.map((datum) => datum.name), [data]);\n const getBorderRadius = useCallback(\n (index: number) => {\n if (index === 0) return '50px 0 0 50px';\n if (index === data.length - 1) return '0 50px 50px 0';\n return undefined;\n },\n [data.length],\n );\n\n const handleOnKeyDown: React.KeyboardEventHandler = useCallback(\n (e) => {\n if (e.code === 'ArrowRight') {\n if (barNames[keyBarFocused + 1]) {\n setKeyBarFocused(keyBarFocused + 1);\n } else {\n setKeyBarFocused(0);\n }\n }\n if (e.code === 'ArrowLeft') {\n if (barNames[keyBarFocused - 1]) {\n setKeyBarFocused(keyBarFocused - 1);\n } else {\n setKeyBarFocused(barNames.length - 1);\n }\n }\n },\n [keyBarFocused, barNames],\n );\n\n return (\n <Wrapper\n cols={cols}\n gutter={gutter}\n role=\"region\"\n onKeyDown={handleOnKeyDown}\n tabIndex={-1}\n onFocus={() => setIsChartFocused(true)}\n onBlur={(e) => e.currentTarget !== e.target && setIsChartFocused(false)}\n {...xstyledProps}\n {...globalAttributes}\n >\n {data.map((datum, i) => (\n <Grid rows={rows}>\n <Bar\n key={datum.name}\n datum={datum}\n isFocused={barNames[keyBarFocused] === datum.name && isChartFocused}\n borderRadius={getBorderRadius(i)}\n bg={COLOR_PALLET[datum.color as keyof typeof COLOR_PALLET] ?? datum.color}\n tabIndex={i === keyBarFocused ? 0 : -1}\n {...props}\n />\n {LegendRenderer !== undefined ? <LegendRenderer key={`${datum.name}-legend`} datum={datum} /> : null}\n </Grid>\n ))}\n </Wrapper>\n );\n};\n\nDSSingleStackedBar.displayName = DSSingleStackedBarName;\nconst DSSingleStackedBarWithSchema = describe(DSSingleStackedBar);\nDSSingleStackedBarWithSchema.propTypes =\n DSSingleStackedBarPropTypes as unknown as WeakValidationMap<DSSingleStackedBarT.Props>;\n\nexport { DSSingleStackedBar, DSSingleStackedBarWithSchema };\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACwCf,SACE,KADF;AAtCR,SAAS,YAAY;AACrB,SAAS,kBAAkB;AAC3B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,iBAAiB;AAC1B,OAAOA,UAAS,aAAa,SAAS,gBAAwC;AAC9E,SAAS,oBAAoB;AAC7B,SAAS,8BAA8B;AACvC,SAAS,6BAA6B,oBAA8C;AACpF,SAAS,WAAW,6BAA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,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA,MAAK;AAAA,MACL,WAAW;AAAA,MACX,UAAU;AAAA,MACV,SAAS,MAAM,kBAAkB,IAAI;AAAA,MACrC,QAAQ,CAAC,MAAM,EAAE,kBAAkB,EAAE,UAAU,kBAAkB,KAAK;AAAA,MACrE,GAAG;AAAA,MACH,GAAG;AAAA,MAEH,eAAK,IAAI,CAAC,OAAO,MAChB,qBAAC,QAAK,MACJ;AAAA;AAAA,UAAC;AAAA;AAAA,YAEC;AAAA,YACA,WAAW,SAAS,aAAa,MAAM,MAAM,QAAQ;AAAA,YACrD,cAAc,gBAAgB,CAAC;AAAA,YAC/B,IAAI,aAAa,MAAM,KAAkC,KAAK,MAAM;AAAA,YACpE,UAAU,MAAM,gBAAgB,IAAI;AAAA,YACnC,GAAG;AAAA;AAAA,UANC,MAAM;AAAA,QAOb;AAAA,QACC,mBAAmB,SAAY,oBAAC,kBAA4C,SAAxB,GAAG,MAAM,IAAI,SAAyB,IAAK;AAAA,SAClG,CACD;AAAA;AAAA,EACH;AAEJ;AAEA,mBAAmB,cAAc;AACjC,MAAM,+BAA+B,SAAS,kBAAkB;AAChE,6BAA6B,YAC3B;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport type { DSGridT } from '@elliemae/ds-grid';\nimport { Grid } from '@elliemae/ds-grid';\nimport { useFloatingContext, FloatingWrapper, PopoverArrow } from '@elliemae/ds-floating-context';\nimport {\n describe,\n useGetGlobalAttributes,\n useGetXstyledProps,\n useMemoMergePropsWithDefault,\n useValidateTypescriptPropTypes,\n} from '@elliemae/ds-props-helpers';\nimport { mergeRefs } from '@elliemae/ds-system';\nimport React, { useCallback, useMemo, useState, type WeakValidationMap } from 'react';\nimport { COLOR_PALLET } from '../helpers/colorPallet.js';\nimport { DSSingleStackedBarName } from './exported-related/index.js';\nimport { DSSingleStackedBarPropTypes, defaultProps, type DSSingleStackedBarT } from './react-desc-prop-types.js';\nimport { StyledBar, StyledMouseOverDetectionBox, StyledTooltipContainer, Wrapper } from './styles.js';\nconst Bar = React.memo((props: DSSingleStackedBarT.BarT) => {\n const [isHover, setIsHover] = useState(false);\n const { height, TooltipRenderer, datum, tabIndex, isFocused, borderRadius, bg } = props;\n\n const isTooltipOpen = (isFocused || isHover) && !!TooltipRenderer;\n const {\n refs,\n floatingStyles,\n arrowStyles,\n context,\n isOpen: isFloatingOpen,\n } = useFloatingContext({\n externallyControlledIsOpen: isTooltipOpen,\n withoutAnimation: true,\n customOffset: [0, 14],\n });\n\n const handleRefCallback = useCallback(\n (_ref: HTMLDivElement | null) => {\n if (isFocused) {\n _ref?.focus();\n }\n },\n [isFocused],\n );\n\n const handleMouseEnter = useCallback(() => {\n setIsHover(true);\n }, []);\n\n const handleMouseLeave = useCallback(() => {\n setIsHover(false);\n }, []);\n\n const backgroundColor =\n datum.color in COLOR_PALLET ? COLOR_PALLET[datum.color as keyof typeof COLOR_PALLET] : datum.color;\n return (\n <div>\n {TooltipRenderer && (\n <FloatingWrapper\n innerRef={refs.setFloating}\n isOpen={isFloatingOpen}\n floatingStyles={floatingStyles}\n context={context}\n >\n <StyledMouseOverDetectionBox />\n <StyledTooltipContainer>\n <TooltipRenderer datum={datum} />\n </StyledTooltipContainer>\n <PopoverArrow {...arrowStyles} />\n </FloatingWrapper>\n )}\n <StyledBar\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n bg={backgroundColor}\n height={height}\n borderRadius={borderRadius}\n innerRef={mergeRefs(handleRefCallback, refs.setReference)}\n tabIndex={tabIndex}\n role=\"img\"\n // until uziel work is merged we keep this default value\n aria-label={`${datum.name} value: ${datum.data}`}\n />\n </div>\n );\n});\n\nconst DSSingleStackedBar: React.ComponentType<DSSingleStackedBarT.Props> = (props) => {\n const propsWithDefaults = useMemoMergePropsWithDefault<DSSingleStackedBarT.InternalProps>(props, defaultProps);\n useValidateTypescriptPropTypes(propsWithDefaults, DSSingleStackedBarPropTypes, 'DSSingleStackedBar');\n\n const globalAttributes = useGetGlobalAttributes<DSSingleStackedBarT.InternalProps, HTMLDivElement, DSGridT.Props>(\n propsWithDefaults,\n );\n\n const xstyledProps = useGetXstyledProps(propsWithDefaults);\n\n const { data, LegendRenderer, gutter, height } = propsWithDefaults;\n const [keyBarFocused, setKeyBarFocused] = useState<number>(0);\n const [isChartFocused, setIsChartFocused] = useState(false);\n\n const total = useMemo(() => data.map((datum) => datum.data).reduce((acc, curr) => acc + curr, 0), [data]);\n const cols = useMemo(() => data.map((datum) => `${Math.ceil(datum.data * 100) / total}%`), [data, total]);\n const rows = useMemo(\n () => (LegendRenderer !== undefined ? [`${height}px`, 'auto'] : [`${height}px`]),\n [LegendRenderer, height],\n );\n const barNames = useMemo(() => data.map((datum) => datum.name), [data]);\n const getBorderRadius = useCallback(\n (index: number) => {\n if (index === 0) return '50px 0 0 50px';\n if (index === data.length - 1) return '0 50px 50px 0';\n return undefined;\n },\n [data.length],\n );\n\n const handleOnKeyDown: React.KeyboardEventHandler = useCallback(\n (e) => {\n if (e.code === 'ArrowRight') {\n if (barNames[keyBarFocused + 1]) {\n setKeyBarFocused(keyBarFocused + 1);\n } else {\n setKeyBarFocused(0);\n }\n }\n if (e.code === 'ArrowLeft') {\n if (barNames[keyBarFocused - 1]) {\n setKeyBarFocused(keyBarFocused - 1);\n } else {\n setKeyBarFocused(barNames.length - 1);\n }\n }\n },\n [keyBarFocused, barNames],\n );\n\n return (\n <Wrapper\n cols={cols}\n gutter={gutter}\n role=\"region\"\n onKeyDown={handleOnKeyDown}\n tabIndex={-1}\n onFocus={() => setIsChartFocused(true)}\n onBlur={(e) => e.currentTarget !== e.target && setIsChartFocused(false)}\n {...xstyledProps}\n {...globalAttributes}\n >\n {data.map((datum, i) => {\n const backgroundColor =\n datum.color in COLOR_PALLET ? COLOR_PALLET[datum.color as keyof typeof COLOR_PALLET] : datum.color;\n return (\n <Grid rows={rows}>\n <Bar\n key={datum.name}\n datum={datum}\n isFocused={barNames[keyBarFocused] === datum.name && isChartFocused}\n borderRadius={getBorderRadius(i)}\n bg={backgroundColor}\n tabIndex={i === keyBarFocused ? 0 : -1}\n {...props}\n />\n {LegendRenderer !== undefined ? <LegendRenderer key={`${datum.name}-legend`} datum={datum} /> : null}\n </Grid>\n );\n })}\n </Wrapper>\n );\n};\n\nDSSingleStackedBar.displayName = DSSingleStackedBarName;\nconst DSSingleStackedBarWithSchema = describe(DSSingleStackedBar);\nDSSingleStackedBarWithSchema.propTypes =\n DSSingleStackedBarPropTypes as unknown as WeakValidationMap<DSSingleStackedBarT.Props>;\n\nexport { DSSingleStackedBar, DSSingleStackedBarWithSchema };\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACwDf,SAME,KANF;AAtDR,SAAS,YAAY;AACrB,SAAS,oBAAoB,iBAAiB,oBAAoB;AAClE;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,iBAAiB;AAC1B,OAAOA,UAAS,aAAa,SAAS,gBAAwC;AAC9E,SAAS,oBAAoB;AAC7B,SAAS,8BAA8B;AACvC,SAAS,6BAA6B,oBAA8C;AACpF,SAAS,WAAW,6BAA6B,wBAAwB,eAAe;AACxF,MAAM,MAAMA,OAAM,KAAK,CAAC,UAAoC;AAC1D,QAAM,CAAC,SAAS,UAAU,IAAI,SAAS,KAAK;AAC5C,QAAM,EAAE,QAAQ,iBAAiB,OAAO,UAAU,WAAW,cAAc,GAAG,IAAI;AAElF,QAAM,iBAAiB,aAAa,YAAY,CAAC,CAAC;AAClD,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,QAAQ;AAAA,EACV,IAAI,mBAAmB;AAAA,IACrB,4BAA4B;AAAA,IAC5B,kBAAkB;AAAA,IAClB,cAAc,CAAC,GAAG,EAAE;AAAA,EACtB,CAAC;AAED,QAAM,oBAAoB;AAAA,IACxB,CAAC,SAAgC;AAC/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M,kBAAkB,IAAI;AAAA,MACrC,QAAQ,CAAC,MAAM,EAAE,kBAAkB,EAAE,UAAU,kBAAkB,KAAK;AAAA,MACrE,GAAG;AAAA,MACH,GAAG;AAAA,MAEH,eAAK,IAAI,CAAC,OAAO,MAAM;AACtB,cAAM,kBACJ,MAAM,SAAS,eAAe,aAAa,MAAM,KAAkC,IAAI,MAAM;AAC/F,eACE,qBAAC,QAAK,MACJ;AAAA;AAAA,YAAC;AAAA;AAAA,cAEC;AAAA,cACA,WAAW,SAAS,aAAa,MAAM,MAAM,QAAQ;AAAA,cACrD,cAAc,gBAAgB,CAAC;AAAA,cAC/B,IAAI;AAAA,cACJ,UAAU,MAAM,gBAAgB,IAAI;AAAA,cACnC,GAAG;AAAA;AAAA,YANC,MAAM;AAAA,UAOb;AAAA,UACC,mBAAmB,SAAY,oBAAC,kBAA4C,SAAxB,GAAG,MAAM,IAAI,SAAyB,IAAK;AAAA,WAClG;AAAA,MAEJ,CAAC;AAAA;AAAA,EACH;AAEJ;AAEA,mBAAmB,cAAc;AACjC,MAAM,+BAA+B,SAAS,kBAAkB;AAChE,6BAA6B,YAC3B;",
6
6
  "names": ["React"]
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../../scripts/build/transpile/react-shim.js", "../../../../../src/graphs/Chart/SingleStackedBar/react-desc-prop-types.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from '@elliemae/ds-props-helpers';\nimport type { GlobalAttributesT, XstyledProps, DSPropTypesSchema } from '@elliemae/ds-props-helpers';\nimport { type BackgroundProps, type BorderProps } from '@elliemae/ds-system';\n\nexport declare namespace DSSingleStackedBarT {\n export type DatumT = {\n name: string;\n data: number;\n color: string;\n };\n export type SingleStackedBarDatumT = DatumT[];\n export type TooltipRenderDataT = {\n datum: DatumT;\n };\n export interface SingleStackedBarT {\n data: SingleStackedBarDatumT;\n TooltipRenderer?: React.ComponentType<TooltipRenderDataT>;\n LegendRenderer?: React.ComponentType<TooltipRenderDataT>;\n height: string | number;\n gutter?: string | number;\n }\n\n export interface BarT extends SingleStackedBarT {\n isFocused: boolean;\n borderRadius?: BorderProps['borderRadius'];\n bg: BackgroundProps['bg'];\n tabIndex?: 0 | -1;\n datum: DatumT;\n }\n\n export interface RequiredProps {\n height: string | number;\n data: DatumT[];\n }\n\n export interface DefaultProps {\n gutter: string;\n }\n\n export interface OptionalProps {\n TooltipRenderer?: React.ComponentType<TooltipRenderDataT>;\n LegendRenderer?: React.ComponentType<TooltipRenderDataT>;\n }\n\n export interface Props\n extends Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps>,\n XstyledProps,\n RequiredProps {}\n\n export interface InternalProps\n extends DefaultProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps>,\n XstyledProps,\n RequiredProps {}\n}\n\nexport const defaultProps: DSSingleStackedBarT.DefaultProps = {\n gutter: 'xxxs',\n};\n\nexport const DSSingleStackedBarPropTypes: DSPropTypesSchema<DSSingleStackedBarT.Props> = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n height: PropTypes.string.description('Height of the bar').isRequired,\n gutter: PropTypes.string.description('Gap between the bars').defaultValue('xxxs'),\n TooltipRenderer: PropTypes.func.description('Callback function that returns a custom renderer for the tooltip'),\n LegendRenderer: PropTypes.func.description('Callback function that returns a custom renderer for the legend'),\n data: PropTypes.arrayOf(\n PropTypes.shape({ name: PropTypes.string, data: PropTypes.number, color: PropTypes.string }),\n ).description('Array of the series which represent the chart'),\n};\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,WAAW,2BAA2B,wBAAwB;AA2DhE,MAAM,eAAiD;AAAA,EAC5D,QAAQ;AACV;AAEO,MAAM,8BAA4E;AAAA,EACvF,GAAG;AAAA,EACH,GAAG;AAAA,EACH,QAAQ,UAAU,OAAO,YAAY,mBAAmB,EAAE;AAAA,EAC1D,QAAQ,UAAU,OAAO,YAAY,sBAAsB,EAAE,aAAa,MAAM;AAAA,EAChF,iBAAiB,UAAU,KAAK,YAAY,kEAAkE;AAAA,EAC9G,gBAAgB,UAAU,KAAK,YAAY,iEAAiE;AAAA,EAC5G,MAAM,UAAU;AAAA,IACd,UAAU,MAAM,EAAE,MAAM,UAAU,QAAQ,MAAM,UAAU,QAAQ,OAAO,UAAU,OAAO,CAAC;AAAA,EAC7F,EAAE,YAAY,+CAA+C;AAC/D;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type { DSPropTypesSchema, GlobalAttributesT, XstyledProps } from '@elliemae/ds-props-helpers';\nimport { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from '@elliemae/ds-props-helpers';\nimport { type BorderProps } from '@elliemae/ds-system';\n\nexport declare namespace DSSingleStackedBarT {\n export type DatumT = {\n name: string;\n data: number;\n color: string;\n };\n export type SingleStackedBarDatumT = DatumT[];\n export type TooltipRenderDataT = {\n datum: DatumT;\n };\n export interface SingleStackedBarT {\n data: SingleStackedBarDatumT;\n TooltipRenderer?: React.ComponentType<TooltipRenderDataT>;\n LegendRenderer?: React.ComponentType<TooltipRenderDataT>;\n height: string | number;\n gutter?: string | number;\n }\n\n export interface BarT extends SingleStackedBarT {\n isFocused: boolean;\n borderRadius?: BorderProps['borderRadius'];\n bg: string;\n tabIndex?: 0 | -1;\n datum: DatumT;\n }\n\n export interface RequiredProps {\n height: string | number;\n data: DatumT[];\n }\n\n export interface DefaultProps {\n gutter: string;\n }\n\n export interface OptionalProps {\n TooltipRenderer?: React.ComponentType<TooltipRenderDataT>;\n LegendRenderer?: React.ComponentType<TooltipRenderDataT>;\n }\n\n export interface Props\n extends\n Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps>,\n XstyledProps,\n RequiredProps {}\n\n export interface InternalProps\n extends\n DefaultProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps>,\n XstyledProps,\n RequiredProps {}\n}\n\nexport const defaultProps: DSSingleStackedBarT.DefaultProps = {\n gutter: 'xxxs',\n};\n\nexport const DSSingleStackedBarPropTypes: DSPropTypesSchema<DSSingleStackedBarT.Props> = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n height: PropTypes.string.description('Height of the bar').isRequired,\n gutter: PropTypes.string.description('Gap between the bars').defaultValue('xxxs'),\n TooltipRenderer: PropTypes.func.description('Callback function that returns a custom renderer for the tooltip'),\n LegendRenderer: PropTypes.func.description('Callback function that returns a custom renderer for the legend'),\n data: PropTypes.arrayOf(\n PropTypes.shape({ name: PropTypes.string, data: PropTypes.number, color: PropTypes.string }),\n ).description('Array of the series which represent the chart'),\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,WAAW,2BAA2B,wBAAwB;AA4DhE,MAAM,eAAiD;AAAA,EAC5D,QAAQ;AACV;AAEO,MAAM,8BAA4E;AAAA,EACvF,GAAG;AAAA,EACH,GAAG;AAAA,EACH,QAAQ,UAAU,OAAO,YAAY,mBAAmB,EAAE;AAAA,EAC1D,QAAQ,UAAU,OAAO,YAAY,sBAAsB,EAAE,aAAa,MAAM;AAAA,EAChF,iBAAiB,UAAU,KAAK,YAAY,kEAAkE;AAAA,EAC9G,gBAAgB,UAAU,KAAK,YAAY,iEAAiE;AAAA,EAC5G,MAAM,UAAU;AAAA,IACd,UAAU,MAAM,EAAE,MAAM,UAAU,QAAQ,MAAM,UAAU,QAAQ,OAAO,UAAU,OAAO,CAAC;AAAA,EAC7F,EAAE,YAAY,+CAA+C;AAC/D;",
6
6
  "names": []
7
7
  }
@@ -1,28 +1,34 @@
1
1
  import * as React from "react";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
- import { useState, useContext, useMemo } from "react";
4
- import { DSPopperJS } from "@elliemae/ds-popperjs";
3
+ import { useContext, useMemo } from "react";
4
+ import { useFloatingContext, FloatingWrapper, PopoverArrow } from "@elliemae/ds-floating-context";
5
5
  import { ThemeContext } from "@elliemae/ds-system";
6
6
  import { StyledTooltipContainer, StyledMouseOverDetectionBox } from "../styles.js";
7
7
  const FocusableRegion = (props) => {
8
- const [referenceElement, setReferenceElement] = useState(null);
9
8
  const theme = useContext(ThemeContext);
10
9
  const { content, ...rest } = props;
10
+ const { refs, floatingStyles, arrowStyles, context } = useFloatingContext({
11
+ externallyControlledIsOpen: true,
12
+ withoutAnimation: true,
13
+ customOffset: [0, 14]
14
+ });
11
15
  return useMemo(
12
- () => /* @__PURE__ */ jsx("foreignObject", { ...rest, ref: setReferenceElement, children: /* @__PURE__ */ jsxs(
13
- DSPopperJS,
16
+ () => /* @__PURE__ */ jsx("foreignObject", { ...rest, ref: refs.setReference, children: /* @__PURE__ */ jsxs(
17
+ FloatingWrapper,
14
18
  {
15
- withoutAnimation: true,
16
- referenceElement,
17
- showPopover: true,
18
- zIndex: theme.zIndex.tooltip,
19
+ innerRef: refs.setFloating,
20
+ isOpen: true,
21
+ floatingStyles: { ...floatingStyles, zIndex: theme.zIndex.tooltip },
22
+ context,
19
23
  children: [
20
24
  /* @__PURE__ */ jsx(StyledMouseOverDetectionBox, {}),
21
- /* @__PURE__ */ jsx(StyledTooltipContainer, { children: content })
25
+ /* @__PURE__ */ jsx(StyledTooltipContainer, { children: content }),
26
+ /* @__PURE__ */ jsx(PopoverArrow, { ...arrowStyles })
22
27
  ]
23
28
  }
24
29
  ) }),
25
- [content, referenceElement, rest, theme.zIndex.tooltip]
30
+ // eslint-disable-next-line react-hooks/exhaustive-deps
31
+ [content, refs, floatingStyles, context, rest, theme.zIndex.tooltip]
26
32
  );
27
33
  };
28
34
  export {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../../scripts/build/transpile/react-shim.js", "../../../../../src/graphs/Chart/parts/FocusableRegion.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport React, { useState, useContext, useMemo } from 'react';\nimport { DSPopperJS } from '@elliemae/ds-popperjs';\nimport { ThemeContext } from '@elliemae/ds-system';\nimport { StyledTooltipContainer, StyledMouseOverDetectionBox } from '../styles.js';\n\ninterface FocusableRegionProps {\n content: React.ReactNode;\n id: string;\n width: number;\n height: number;\n x?: number;\n y?: number;\n transform?: string;\n tabIndex?: number;\n style?: React.CSSProperties;\n}\n\nexport const FocusableRegion: React.ComponentType<FocusableRegionProps> = (props) => {\n const [referenceElement, setReferenceElement] = useState<HTMLOrSVGElement | null>(null);\n const theme = useContext(ThemeContext);\n\n const { content, ...rest } = props;\n\n return useMemo(\n () => (\n <foreignObject {...rest} ref={setReferenceElement}>\n <DSPopperJS\n withoutAnimation\n referenceElement={referenceElement as HTMLElement}\n showPopover\n zIndex={theme.zIndex.tooltip}\n >\n <StyledMouseOverDetectionBox />\n <StyledTooltipContainer>{content}</StyledTooltipContainer>\n </DSPopperJS>\n </foreignObject>\n ),\n [content, referenceElement, rest, theme.zIndex.tooltip],\n );\n};\n"],
5
- "mappings": "AAAA,YAAY,WAAW;AC2Bf,SAME,KANF;AA1BR,SAAgB,UAAU,YAAY,eAAe;AACrD,SAAS,kBAAkB;AAC3B,SAAS,oBAAoB;AAC7B,SAAS,wBAAwB,mCAAmC;AAc7D,MAAM,kBAA6D,CAAC,UAAU;AACnF,QAAM,CAAC,kBAAkB,mBAAmB,IAAI,SAAkC,IAAI;AACtF,QAAM,QAAQ,WAAW,YAAY;AAErC,QAAM,EAAE,SAAS,GAAG,KAAK,IAAI;AAE7B,SAAO;AAAA,IACL,MACE,oBAAC,mBAAe,GAAG,MAAM,KAAK,qBAC5B;AAAA,MAAC;AAAA;AAAA,QACC,kBAAgB;AAAA,QAChB;AAAA,QACA,aAAW;AAAA,QACX,QAAQ,MAAM,OAAO;AAAA,QAErB;AAAA,8BAAC,+BAA4B;AAAA,UAC7B,oBAAC,0BAAwB,mBAAQ;AAAA;AAAA;AAAA,IACnC,GACF;AAAA,IAEF,CAAC,SAAS,kBAAkB,MAAM,MAAM,OAAO,OAAO;AAAA,EACxD;AACF;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport React, { useContext, useMemo } from 'react';\nimport { useFloatingContext, FloatingWrapper, PopoverArrow } from '@elliemae/ds-floating-context';\nimport { ThemeContext } from '@elliemae/ds-system';\nimport { StyledTooltipContainer, StyledMouseOverDetectionBox } from '../styles.js';\n\ninterface FocusableRegionProps {\n content: React.ReactNode;\n id: string;\n width: number;\n height: number;\n x?: number;\n y?: number;\n transform?: string;\n tabIndex?: number;\n style?: React.CSSProperties;\n}\n\nexport const FocusableRegion: React.ComponentType<FocusableRegionProps> = (props) => {\n const theme = useContext(ThemeContext);\n const { content, ...rest } = props;\n\n const { refs, floatingStyles, arrowStyles, context } = useFloatingContext({\n externallyControlledIsOpen: true,\n withoutAnimation: true,\n customOffset: [0, 14],\n });\n\n return useMemo(\n () => (\n <foreignObject {...rest} ref={refs.setReference as React.Ref<SVGForeignObjectElement>}>\n <FloatingWrapper\n innerRef={refs.setFloating}\n isOpen\n floatingStyles={{ ...floatingStyles, zIndex: theme.zIndex.tooltip }}\n context={context}\n >\n <StyledMouseOverDetectionBox />\n <StyledTooltipContainer>{content}</StyledTooltipContainer>\n <PopoverArrow {...arrowStyles} />\n </FloatingWrapper>\n </foreignObject>\n ),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [content, refs, floatingStyles, context, rest, theme.zIndex.tooltip],\n );\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;AC+Bf,SAME,KANF;AA9BR,SAAgB,YAAY,eAAe;AAC3C,SAAS,oBAAoB,iBAAiB,oBAAoB;AAClE,SAAS,oBAAoB;AAC7B,SAAS,wBAAwB,mCAAmC;AAc7D,MAAM,kBAA6D,CAAC,UAAU;AACnF,QAAM,QAAQ,WAAW,YAAY;AACrC,QAAM,EAAE,SAAS,GAAG,KAAK,IAAI;AAE7B,QAAM,EAAE,MAAM,gBAAgB,aAAa,QAAQ,IAAI,mBAAmB;AAAA,IACxE,4BAA4B;AAAA,IAC5B,kBAAkB;AAAA,IAClB,cAAc,CAAC,GAAG,EAAE;AAAA,EACtB,CAAC;AAED,SAAO;AAAA,IACL,MACE,oBAAC,mBAAe,GAAG,MAAM,KAAK,KAAK,cACjC;AAAA,MAAC;AAAA;AAAA,QACC,UAAU,KAAK;AAAA,QACf,QAAM;AAAA,QACN,gBAAgB,EAAE,GAAG,gBAAgB,QAAQ,MAAM,OAAO,QAAQ;AAAA,QAClE;AAAA,QAEA;AAAA,8BAAC,+BAA4B;AAAA,UAC7B,oBAAC,0BAAwB,mBAAQ;AAAA,UACjC,oBAAC,gBAAc,GAAG,aAAa;AAAA;AAAA;AAAA,IACjC,GACF;AAAA;AAAA,IAGF,CAAC,SAAS,MAAM,gBAAgB,SAAS,MAAM,MAAM,OAAO,OAAO;AAAA,EACrE;AACF;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  import * as React from "react";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
- import { useContext, useCallback, useState } from "react";
4
- import { DSPopperJS } from "@elliemae/ds-popperjs";
3
+ import { useContext, useCallback } from "react";
4
+ import { useFloatingContext, FloatingWrapper } from "@elliemae/ds-floating-context";
5
5
  import { ThemeContext } from "@elliemae/ds-system";
6
6
  import { ChartContext } from "../../ChartContext.js";
7
7
  import { StyledMouseOverDetectionBox, StyledTooltipContainer } from "../../styles.js";
@@ -16,25 +16,28 @@ const ScrapperLine = ({ yPosition, datum }) => {
16
16
  props: { TooltipRenderer, scrapper }
17
17
  } = useContext(ChartContext);
18
18
  const theme = useContext(ThemeContext);
19
- const [referenceElement, setReferenceElement] = useState(null);
20
19
  const yPositionString = yPosition;
20
+ const isActive = scrapperPosY === yPositionString;
21
+ const { refs, floatingStyles, context } = useFloatingContext({
22
+ externallyControlledIsOpen: isActive && !!TooltipRenderer,
23
+ withoutAnimation: true,
24
+ customOffset: [0, 5],
25
+ placement: scrapper?.tooltipPreference
26
+ });
21
27
  const handleOnMouseEnter = useCallback(() => {
22
28
  if (!isGrabbed) setScrapperPosY(yPositionString);
23
29
  setActivePoint(null);
24
30
  }, [isGrabbed, setScrapperPosY, setActivePoint, yPositionString]);
25
31
  const strokeDetectorWidth = yScale?.type === "BAND" ? yScale?.getBandwidth() : "4px";
26
32
  return /* @__PURE__ */ jsxs("g", { children: [
27
- scrapperPosY === yPositionString ? /* @__PURE__ */ jsxs("g", { children: [
33
+ isActive ? /* @__PURE__ */ jsxs("g", { children: [
28
34
  TooltipRenderer ? /* @__PURE__ */ jsx("foreignObject", { children: /* @__PURE__ */ jsxs(
29
- DSPopperJS,
35
+ FloatingWrapper,
30
36
  {
31
- withoutAnimation: true,
32
- withoutArrow: true,
33
- customOffset: [0, 5],
34
- referenceElement,
35
- showPopover: true,
36
- zIndex: theme.zIndex.tooltip,
37
- startPlacementPreference: scrapper?.tooltipPreference,
37
+ innerRef: refs.setFloating,
38
+ isOpen: isActive,
39
+ floatingStyles: { ...floatingStyles, zIndex: theme.zIndex.tooltip },
40
+ context,
38
41
  children: [
39
42
  /* @__PURE__ */ jsx(StyledMouseOverDetectionBox, {}),
40
43
  /* @__PURE__ */ jsx(StyledTooltipContainer, { children: /* @__PURE__ */ jsx(TooltipRenderer, { data: datum }) })
@@ -44,7 +47,7 @@ const ScrapperLine = ({ yPosition, datum }) => {
44
47
  /* @__PURE__ */ jsx(
45
48
  "line",
46
49
  {
47
- ref: setReferenceElement,
50
+ ref: refs.setReference,
48
51
  x1: innerWidth,
49
52
  strokeWidth: "2px",
50
53
  stroke: "transparent",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../../../scripts/build/transpile/react-shim.js", "../../../../../../src/graphs/Chart/parts/Scrapper/ScrapperLine.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useContext, useCallback, useState } from 'react';\nimport { DSPopperJS } from '@elliemae/ds-popperjs';\nimport { ThemeContext } from '@elliemae/ds-system';\nimport { ChartContext } from '../../ChartContext.js';\nimport { StyledMouseOverDetectionBox, StyledTooltipContainer } from '../../styles.js';\nimport type { DSChartT } from '../../react-desc-prop-types.js';\ninterface ScrapperLineProps {\n yPosition: number;\n datum: DSChartT.ScrapperDatum[];\n}\n\nexport const ScrapperLine: React.ComponentType<ScrapperLineProps> = ({ yPosition, datum }) => {\n const {\n scrapperPosY,\n setScrapperPosY,\n innerWidth,\n yScale,\n setActivePoint,\n isGrabbed,\n props: { TooltipRenderer, scrapper },\n } = useContext(ChartContext);\n const theme = useContext(ThemeContext);\n const [referenceElement, setReferenceElement] = useState<HTMLOrSVGElement | null>(null);\n\n const yPositionString = yPosition;\n const handleOnMouseEnter = useCallback(() => {\n if (!isGrabbed) setScrapperPosY(yPositionString);\n setActivePoint(null);\n }, [isGrabbed, setScrapperPosY, setActivePoint, yPositionString]);\n\n const strokeDetectorWidth = yScale?.type === 'BAND' ? yScale?.getBandwidth() : '4px';\n\n return (\n <g>\n {scrapperPosY === yPositionString ? (\n <g>\n {TooltipRenderer ? (\n <foreignObject>\n <DSPopperJS\n withoutAnimation\n withoutArrow\n customOffset={[0, 5]}\n referenceElement={referenceElement as HTMLElement}\n showPopover\n zIndex={theme.zIndex.tooltip}\n startPlacementPreference={scrapper?.tooltipPreference}\n >\n <StyledMouseOverDetectionBox />\n <StyledTooltipContainer>\n <TooltipRenderer data={datum} />\n </StyledTooltipContainer>\n </DSPopperJS>\n </foreignObject>\n ) : null}\n <line\n ref={setReferenceElement}\n x1={innerWidth}\n strokeWidth=\"2px\"\n stroke=\"transparent\"\n y1={yPosition}\n x2={innerWidth}\n y2={yPosition}\n />\n <line\n x1={0}\n strokeWidth=\"2px\"\n stroke=\"grey\"\n strokeDasharray=\"4 4\"\n y1={yPosition}\n x2={innerWidth}\n y2={yPosition}\n />\n </g>\n ) : null}\n <line\n onMouseEnter={handleOnMouseEnter}\n x1={0}\n strokeWidth={strokeDetectorWidth}\n stroke=\"transparent\"\n y1={yPosition}\n x2={innerWidth}\n y2={yPosition}\n />\n </g>\n );\n};\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACsCT,SASE,KATF;AAtCd,SAAgB,YAAY,aAAa,gBAAgB;AACzD,SAAS,kBAAkB;AAC3B,SAAS,oBAAoB;AAC7B,SAAS,oBAAoB;AAC7B,SAAS,6BAA6B,8BAA8B;AAO7D,MAAM,eAAuD,CAAC,EAAE,WAAW,MAAM,MAAM;AAC5F,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,OAAO,EAAE,iBAAiB,SAAS;AAAA,EACrC,IAAI,WAAW,YAAY;AAC3B,QAAM,QAAQ,WAAW,YAAY;AACrC,QAAM,CAAC,kBAAkB,mBAAmB,IAAI,SAAkC,IAAI;AAEtF,QAAM,kBAAkB;AACxB,QAAM,qBAAqB,YAAY,MAAM;AAC3C,QAAI,CAAC,UAAW,iBAAgB,eAAe;AAC/C,mBAAe,IAAI;AAAA,EACrB,GAAG,CAAC,WAAW,iBAAiB,gBAAgB,eAAe,CAAC;AAEhE,QAAM,sBAAsB,QAAQ,SAAS,SAAS,QAAQ,aAAa,IAAI;AAE/E,SACE,qBAAC,OACE;AAAA,qBAAiB,kBAChB,qBAAC,OACE;AAAA,wBACC,oBAAC,mBACC;AAAA,QAAC;AAAA;AAAA,UACC,kBAAgB;AAAA,UAChB,cAAY;AAAA,UACZ,cAAc,CAAC,GAAG,CAAC;AAAA,UACnB;AAAA,UACA,aAAW;AAAA,UACX,QAAQ,MAAM,OAAO;AAAA,UACrB,0BAA0B,UAAU;AAAA,UAEpC;AAAA,gCAAC,+BAA4B;AAAA,YAC7B,oBAAC,0BACC,8BAAC,mBAAgB,MAAM,OAAO,GAChC;AAAA;AAAA;AAAA,MACF,GACF,IACE;AAAA,MACJ;AAAA,QAAC;AAAA;AAAA,UACC,KAAK;AAAA,UACL,IAAI;AAAA,UACJ,aAAY;AAAA,UACZ,QAAO;AAAA,UACP,IAAI;AAAA,UACJ,IAAI;AAAA,UACJ,IAAI;AAAA;AAAA,MACN;AAAA,MACA;AAAA,QAAC;AAAA;AAAA,UACC,IAAI;AAAA,UACJ,aAAY;AAAA,UACZ,QAAO;AAAA,UACP,iBAAgB;AAAA,UAChB,IAAI;AAAA,UACJ,IAAI;AAAA,UACJ,IAAI;AAAA;AAAA,MACN;AAAA,OACF,IACE;AAAA,IACJ;AAAA,MAAC;AAAA;AAAA,QACC,cAAc;AAAA,QACd,IAAI;AAAA,QACJ,aAAa;AAAA,QACb,QAAO;AAAA,QACP,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA;AAAA,IACN;AAAA,KACF;AAEJ;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useContext, useCallback } from 'react';\nimport { useFloatingContext, FloatingWrapper } from '@elliemae/ds-floating-context';\nimport { ThemeContext } from '@elliemae/ds-system';\nimport { ChartContext } from '../../ChartContext.js';\nimport { StyledMouseOverDetectionBox, StyledTooltipContainer } from '../../styles.js';\nimport type { DSChartT } from '../../react-desc-prop-types.js';\ninterface ScrapperLineProps {\n yPosition: number;\n datum: DSChartT.ScrapperDatum[];\n}\n\nexport const ScrapperLine: React.ComponentType<ScrapperLineProps> = ({ yPosition, datum }) => {\n const {\n scrapperPosY,\n setScrapperPosY,\n innerWidth,\n yScale,\n setActivePoint,\n isGrabbed,\n props: { TooltipRenderer, scrapper },\n } = useContext(ChartContext);\n const theme = useContext(ThemeContext);\n\n const yPositionString = yPosition;\n const isActive = scrapperPosY === yPositionString;\n\n const { refs, floatingStyles, context } = useFloatingContext({\n externallyControlledIsOpen: isActive && !!TooltipRenderer,\n withoutAnimation: true,\n customOffset: [0, 5],\n placement: scrapper?.tooltipPreference,\n });\n\n const handleOnMouseEnter = useCallback(() => {\n if (!isGrabbed) setScrapperPosY(yPositionString);\n setActivePoint(null);\n }, [isGrabbed, setScrapperPosY, setActivePoint, yPositionString]);\n\n const strokeDetectorWidth = yScale?.type === 'BAND' ? yScale?.getBandwidth() : '4px';\n\n return (\n <g>\n {isActive ? (\n <g>\n {TooltipRenderer ? (\n <foreignObject>\n <FloatingWrapper\n innerRef={refs.setFloating}\n isOpen={isActive}\n floatingStyles={{ ...floatingStyles, zIndex: theme.zIndex.tooltip }}\n context={context}\n >\n <StyledMouseOverDetectionBox />\n <StyledTooltipContainer>\n <TooltipRenderer data={datum} />\n </StyledTooltipContainer>\n </FloatingWrapper>\n </foreignObject>\n ) : null}\n <line\n ref={refs.setReference as React.Ref<SVGLineElement>}\n x1={innerWidth}\n strokeWidth=\"2px\"\n stroke=\"transparent\"\n y1={yPosition}\n x2={innerWidth}\n y2={yPosition}\n />\n <line\n x1={0}\n strokeWidth=\"2px\"\n stroke=\"grey\"\n strokeDasharray=\"4 4\"\n y1={yPosition}\n x2={innerWidth}\n y2={yPosition}\n />\n </g>\n ) : null}\n <line\n onMouseEnter={handleOnMouseEnter}\n x1={0}\n strokeWidth={strokeDetectorWidth}\n stroke=\"transparent\"\n y1={yPosition}\n x2={innerWidth}\n y2={yPosition}\n />\n </g>\n );\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;AC8CT,SAME,KANF;AA9Cd,SAAgB,YAAY,mBAAmB;AAC/C,SAAS,oBAAoB,uBAAuB;AACpD,SAAS,oBAAoB;AAC7B,SAAS,oBAAoB;AAC7B,SAAS,6BAA6B,8BAA8B;AAO7D,MAAM,eAAuD,CAAC,EAAE,WAAW,MAAM,MAAM;AAC5F,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,OAAO,EAAE,iBAAiB,SAAS;AAAA,EACrC,IAAI,WAA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cAAc;AAAA,QACd,IAAI;AAAA,QACJ,aAAa;AAAA,QACb,QAAO;AAAA,QACP,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA;AAAA,IACN;AAAA,KACF;AAEJ;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  import * as React from "react";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
- import React2, { useContext, useCallback, useState } from "react";
4
- import { DSPopperJS } from "@elliemae/ds-popperjs";
3
+ import React2, { useContext, useCallback } from "react";
4
+ import { useFloatingContext, FloatingWrapper } from "@elliemae/ds-floating-context";
5
5
  import { ThemeContext } from "@elliemae/ds-system";
6
6
  import { StyledMouseOverDetectionBox, StyledTooltipContainer } from "../../styles.js";
7
7
  const VerticalScrapperLine = React2.memo(
@@ -19,8 +19,13 @@ const VerticalScrapperLine = React2.memo(
19
19
  scrapper
20
20
  }) => {
21
21
  const theme = useContext(ThemeContext);
22
- const [referenceElement, setReferenceElement] = useState();
23
22
  const isActive = scrapperPosX === xPosition;
23
+ const { refs, floatingStyles, context } = useFloatingContext({
24
+ externallyControlledIsOpen: isActive && !isGrabbed && !!TooltipRenderer,
25
+ withoutAnimation: true,
26
+ customOffset: [0, 5],
27
+ placement: scrapper.tooltipPreference
28
+ });
24
29
  const handleOnMouseEnter = useCallback(() => {
25
30
  if (!isGrabbed) setScrapperPosX(xPosition);
26
31
  setActivePoint(null);
@@ -29,15 +34,12 @@ const VerticalScrapperLine = React2.memo(
29
34
  return /* @__PURE__ */ jsxs("g", { transform: `translate(${nonNullXscale.type === "BAND" ? nonNullXscale.getBandwidth() / 2 : 0}, 0)`, children: [
30
35
  isActive && !isGrabbed ? /* @__PURE__ */ jsxs("g", { children: [
31
36
  TooltipRenderer ? /* @__PURE__ */ jsx("foreignObject", { children: /* @__PURE__ */ jsxs(
32
- DSPopperJS,
37
+ FloatingWrapper,
33
38
  {
34
- withoutAnimation: true,
35
- withoutArrow: true,
36
- customOffset: [0, 5],
37
- referenceElement,
38
- showPopover: true,
39
- zIndex: theme.zIndex.tooltip,
40
- startPlacementPreference: scrapper.tooltipPreference,
39
+ innerRef: refs.setFloating,
40
+ isOpen: isActive && !isGrabbed,
41
+ floatingStyles: { ...floatingStyles, zIndex: theme.zIndex.tooltip },
42
+ context,
41
43
  children: [
42
44
  /* @__PURE__ */ jsx(StyledMouseOverDetectionBox, {}),
43
45
  /* @__PURE__ */ jsx(StyledTooltipContainer, { children: /* @__PURE__ */ jsx(TooltipRenderer, { data }) })
@@ -47,7 +49,7 @@ const VerticalScrapperLine = React2.memo(
47
49
  /* @__PURE__ */ jsx(
48
50
  "line",
49
51
  {
50
- ref: setReferenceElement,
52
+ ref: refs.setReference,
51
53
  x1: xPosition,
52
54
  strokeWidth: "2px",
53
55
  stroke: scrapper.color,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../../../scripts/build/transpile/react-shim.js", "../../../../../../src/graphs/Chart/parts/Scrapper/VerticalScrapperLine.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable complexity */\nimport React, { useContext, useCallback, useState } from 'react';\nimport { DSPopperJS } from '@elliemae/ds-popperjs';\nimport { ThemeContext } from '@elliemae/ds-system';\nimport { StyledMouseOverDetectionBox, StyledTooltipContainer } from '../../styles.js';\nimport type { DSChartT } from '../../react-desc-prop-types.js';\nimport type { ScaleT } from '../../scales/index.js';\ninterface VerticalScrapperLineProps {\n rectDetector?: { left: number; right: number };\n xPosition: number;\n data: DSChartT.ScrapperDatum[];\n scrapperPosX: number;\n setScrapperPosX: (x: number) => void;\n isGrabbed: boolean;\n xScale: ScaleT | null;\n setActivePoint: React.Dispatch<React.SetStateAction<DSChartT.InternalDatum | null>>;\n innerHeight: number;\n TooltipRenderer?:\n | React.ComponentType<{\n data: {\n name: string;\n xValue: string | number | Date | null;\n yValue: string | number | Date | null;\n datum: DSChartT.InternalDatum;\n }[];\n }>\n | undefined;\n scrapper: DSChartT.ScrapperT;\n}\n\nexport const VerticalScrapperLine: React.ComponentType<VerticalScrapperLineProps> = React.memo(\n ({\n rectDetector,\n xPosition,\n data,\n scrapperPosX,\n setScrapperPosX,\n isGrabbed,\n xScale,\n setActivePoint,\n innerHeight,\n TooltipRenderer,\n scrapper,\n }) => {\n const theme = useContext(ThemeContext);\n const [referenceElement, setReferenceElement] = useState<HTMLOrSVGElement | null>();\n const isActive = scrapperPosX === xPosition;\n const handleOnMouseEnter = useCallback(() => {\n if (!isGrabbed) setScrapperPosX(xPosition);\n setActivePoint(null);\n }, [isGrabbed, setActivePoint, setScrapperPosX, xPosition]);\n // the code was abusing `xScale?.` even in place where it could lead to NaN\n // I am not sure what the `?.` was solving but xScale typescript says | null\n // this line is a monkeypatch to avoid the NaN but it charts should be properly revisited to use typesafe code and algorithms\n const nonNullXscale = xScale ?? { type: 'notBANDAndEverythingElseIsCurrentlyTreatedTheSame' };\n return (\n <g transform={`translate(${nonNullXscale.type === 'BAND' ? nonNullXscale.getBandwidth() / 2 : 0}, 0)`}>\n {isActive && !isGrabbed ? (\n <g>\n {TooltipRenderer ? (\n <foreignObject>\n <DSPopperJS\n withoutAnimation\n withoutArrow\n customOffset={[0, 5]}\n referenceElement={referenceElement as HTMLElement}\n showPopover\n zIndex={theme.zIndex.tooltip}\n startPlacementPreference={scrapper.tooltipPreference}\n >\n <StyledMouseOverDetectionBox />\n <StyledTooltipContainer>\n <TooltipRenderer data={data} />\n </StyledTooltipContainer>\n </DSPopperJS>\n </foreignObject>\n ) : null}\n <line\n ref={setReferenceElement}\n x1={xPosition}\n strokeWidth=\"2px\"\n stroke={scrapper.color}\n y1={0}\n x2={xPosition}\n y2={innerHeight}\n strokeDasharray=\"4 4\"\n />\n </g>\n ) : null}\n <rect\n onMouseOver={handleOnMouseEnter}\n x={\n nonNullXscale.type === 'BAND'\n ? xPosition - nonNullXscale.getBandwidth() / 2\n : xPosition - (rectDetector?.left ?? 0)\n }\n fill=\"transparent\"\n y={0}\n width={\n nonNullXscale.type === 'BAND'\n ? nonNullXscale.getBandwidth()\n : (rectDetector?.right ?? 0) + (rectDetector?.left ?? 0)\n }\n height={innerHeight}\n />\n </g>\n );\n },\n);\n"],
5
- "mappings": "AAAA,YAAY,WAAW;AC6DP,SASE,KATF;AA5DhB,OAAOA,UAAS,YAAY,aAAa,gBAAgB;AACzD,SAAS,kBAAkB;AAC3B,SAAS,oBAAoB;AAC7B,SAAS,6BAA6B,8BAA8B;AA0B7D,MAAM,uBAAuEA,OAAM;AAAA,EACxF,CAAC;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,MAAM;AACJ,UAAM,QAAQ,WAAW,YAAY;AACrC,UAAM,CAAC,kBAAkB,mBAAmB,IAAI,SAAkC;AAClF,UAAM,WAAW,iBAAiB;AAClC,UAAM,qBAAqB,YAAY,MAAM;AAC3C,UAAI,CAAC,UAAW,iBAAgB,SAAS;AACzC,qBAAe,IAAI;AAAA,IACrB,GAAG,CAAC,WAAW,gBAAgB,iBAAiB,SAAS,CAAC;AAI1D,UAAM,gBAAgB,UAAU,EAAE,MAAM,oDAAoD;AAC5F,WACE,qBAAC,OAAE,WAAW,aAAa,cAAc,SAAS,SAAS,cAAc,aAAa,IAAI,IAAI,CAAC,QAC5F;AAAA,kBAAY,CAAC,YACZ,qBAAC,OACE;AAAA,0BACC,oBAAC,mBACC;AAAA,UAAC;AAAA;AAAA,YACC,kBAAgB;AAAA,YAChB,cAAY;AAAA,YACZ,cAAc,CAAC,GAAG,CAAC;AAAA,YACnB;AAAA,YACA,aAAW;AAAA,YACX,QAAQ,MAAM,OAAO;AAAA,YACrB,0BAA0B,SAAS;AAAA,YAEnC;AAAA,kCAAC,+BAA4B;AAAA,cAC7B,oBAAC,0BACC,8BAAC,mBAAgB,MAAY,GAC/B;AAAA;AAAA;AAAA,QACF,GACF,IACE;AAAA,QACJ;AAAA,UAAC;AAAA;AAAA,YACC,KAAK;AAAA,YACL,IAAI;AAAA,YACJ,aAAY;AAAA,YACZ,QAAQ,SAAS;AAAA,YACjB,IAAI;AAAA,YACJ,IAAI;AAAA,YACJ,IAAI;AAAA,YACJ,iBAAgB;AAAA;AAAA,QAClB;AAAA,SACF,IACE;AAAA,MACJ;AAAA,QAAC;AAAA;AAAA,UACC,aAAa;AAAA,UACb,GACE,cAAc,SAAS,SACnB,YAAY,cAAc,aAAa,IAAI,IAC3C,aAAa,cAAc,QAAQ;AAAA,UAEzC,MAAK;AAAA,UACL,GAAG;AAAA,UACH,OACE,cAAc,SAAS,SACnB,cAAc,aAAa,KAC1B,cAAc,SAAS,MAAM,cAAc,QAAQ;AAAA,UAE1D,QAAQ;AAAA;AAAA,MACV;AAAA,OACF;AAAA,EAEJ;AACF;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable complexity */\nimport React, { useContext, useCallback } from 'react';\nimport { useFloatingContext, FloatingWrapper } from '@elliemae/ds-floating-context';\nimport { ThemeContext } from '@elliemae/ds-system';\nimport { StyledMouseOverDetectionBox, StyledTooltipContainer } from '../../styles.js';\nimport type { DSChartT } from '../../react-desc-prop-types.js';\nimport type { ScaleT } from '../../scales/index.js';\ninterface VerticalScrapperLineProps {\n rectDetector?: { left: number; right: number };\n xPosition: number;\n data: DSChartT.ScrapperDatum[];\n scrapperPosX: number;\n setScrapperPosX: (x: number) => void;\n isGrabbed: boolean;\n xScale: ScaleT | null;\n setActivePoint: React.Dispatch<React.SetStateAction<DSChartT.InternalDatum | null>>;\n innerHeight: number;\n TooltipRenderer?:\n | React.ComponentType<{\n data: {\n name: string;\n xValue: string | number | Date | null;\n yValue: string | number | Date | null;\n datum: DSChartT.InternalDatum;\n }[];\n }>\n | undefined;\n scrapper: DSChartT.ScrapperT;\n}\n\nexport const VerticalScrapperLine: React.ComponentType<VerticalScrapperLineProps> = React.memo(\n ({\n rectDetector,\n xPosition,\n data,\n scrapperPosX,\n setScrapperPosX,\n isGrabbed,\n xScale,\n setActivePoint,\n innerHeight,\n TooltipRenderer,\n scrapper,\n }) => {\n const theme = useContext(ThemeContext);\n const isActive = scrapperPosX === xPosition;\n\n const { refs, floatingStyles, context } = useFloatingContext({\n externallyControlledIsOpen: isActive && !isGrabbed && !!TooltipRenderer,\n withoutAnimation: true,\n customOffset: [0, 5],\n placement: scrapper.tooltipPreference,\n });\n\n const handleOnMouseEnter = useCallback(() => {\n if (!isGrabbed) setScrapperPosX(xPosition);\n setActivePoint(null);\n }, [isGrabbed, setActivePoint, setScrapperPosX, xPosition]);\n // the code was abusing `xScale?.` even in place where it could lead to NaN\n // I am not sure what the `?.` was solving but xScale typescript says | null\n // this line is a monkeypatch to avoid the NaN but it charts should be properly revisited to use typesafe code and algorithms\n const nonNullXscale = xScale ?? { type: 'notBANDAndEverythingElseIsCurrentlyTreatedTheSame' };\n return (\n <g transform={`translate(${nonNullXscale.type === 'BAND' ? nonNullXscale.getBandwidth() / 2 : 0}, 0)`}>\n {isActive && !isGrabbed ? (\n <g>\n {TooltipRenderer ? (\n <foreignObject>\n <FloatingWrapper\n innerRef={refs.setFloating}\n isOpen={isActive && !isGrabbed}\n floatingStyles={{ ...floatingStyles, zIndex: theme.zIndex.tooltip }}\n context={context}\n >\n <StyledMouseOverDetectionBox />\n <StyledTooltipContainer>\n <TooltipRenderer data={data} />\n </StyledTooltipContainer>\n </FloatingWrapper>\n </foreignObject>\n ) : null}\n <line\n ref={refs.setReference as React.Ref<SVGLineElement>}\n x1={xPosition}\n strokeWidth=\"2px\"\n stroke={scrapper.color}\n y1={0}\n x2={xPosition}\n y2={innerHeight}\n strokeDasharray=\"4 4\"\n />\n </g>\n ) : null}\n <rect\n onMouseOver={handleOnMouseEnter}\n x={\n nonNullXscale.type === 'BAND'\n ? xPosition - nonNullXscale.getBandwidth() / 2\n : xPosition - (rectDetector?.left ?? 0)\n }\n fill=\"transparent\"\n y={0}\n width={\n nonNullXscale.type === 'BAND'\n ? nonNullXscale.getBandwidth()\n : (rectDetector?.right ?? 0) + (rectDetector?.left ?? 0)\n }\n height={innerHeight}\n />\n </g>\n );\n },\n);\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACoEP,SAME,KANF;AAnEhB,OAAOA,UAAS,YAAY,mBAAmB;AAC/C,SAAS,oBAAoB,uBAAuB;AACpD,SAAS,oBAAoB;AAC7B,SAAS,6BAA6B,8BAA8B;AA0B7D,MAAM,uBAAuEA,OAAM;AAAA,EACxF,CAAC;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,MAAM;AACJ,UAAM,QAAQ,WAAW,YAAY;AACrC,UAAM,WAAW,iBAAiB;AAElC,UAAM,EAAE,MAAM,gBAAgB,QAAQ,IAAI,mBAAmB;AAAA,MAC3D,4BAA4B,YAAY,CAAC,aAAa,CAAC,CAAC;AAAA,MACxD,kBAAkB;AAAA,MAClB,cAAc,CAAC,GAAG,CAAC;AAAA,MACnB,WAAW,SAAS;AAAA,IACtB,CAAC;AAED,UAAM,qBAAqB,YAAY,MAAM;AAC3C,UAAI,CAAC,UAAW,iBAAgB,SAAS;AACzC,qBAAe,IAAI;AAAA,IACrB,GAAG,CAAC,WAAW,gBAAgB,iBAAiB,SAAS,CAAC;AAI1D,UAAM,gBAAgB,UAAU,EAAE,MAAM,oDAAoD;AAC5F,WACE,qBAAC,OAAE,WAAW,aAAa,cAAc,SAAS,SAAS,cAAc,aAAa,IAAI,IAAI,CAAC,QAC5F;AAAA,kBAAY,CAAC,YACZ,qBAAC,OACE;AAAA,0BACC,oBAAC,mBACC;AAAA,UAAC;AAAA;AAAA,YACC,UAAU,KAAK;AAAA,YACf,QAAQ,YAAY,CAAC;AAAA,YACrB,gBAAgB,EAAE,GAAG,gBAAgB,QAAQ,MAAM,OAAO,QAAQ;AAAA,YAClE;AAAA,YAEA;AAAA,kCAAC,+BAA4B;AAAA,cAC7B,oBAAC,0BACC,8BAAC,mBAAgB,MAAY,GAC/B;AAAA;AAAA;AAAA,QACF,GACF,IACE;AAAA,QACJ;AAAA,UAAC;AAAA;AAAA,YACC,KAAK,KAAK;AAAA,YACV,IAAI;AAAA,YACJ,aAAY;AAAA,YACZ,QAAQ,SAAS;AAAA,YACjB,IAAI;AAAA,YACJ,IAAI;AAAA,YACJ,IAAI;AAAA,YACJ,iBAAgB;AAAA;AAAA,QAClB;AAAA,SACF,IACE;AAAA,MACJ;AAAA,QAAC;AAAA;AAAA,UACC,aAAa;AAAA,UACb,GACE,cAAc,SAAS,SACnB,YAAY,cAAc,aAAa,IAAI,IAC3C,aAAa,cAAc,QAAQ;AAAA,UAEzC,MAAK;AAAA,UACL,GAAG;AAAA,UACH,OACE,cAAc,SAAS,SACnB,cAAc,aAAa,KAC1B,cAAc,SAAS,MAAM,cAAc,QAAQ;AAAA,UAE1D,QAAQ;AAAA;AAAA,MACV;AAAA,OACF;AAAA,EAEJ;AACF;",
6
6
  "names": ["React"]
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/graphs/Chart/react-desc-prop-types.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport { globalAttributesPropTypes, PropTypes } from '@elliemae/ds-props-helpers';\nimport type { Series, ScaleLinear, ScaleBand } from 'd3';\nimport { type DSPopperJST } from '@elliemae/ds-popperjs';\nimport { type SERIE_TYPES } from '../constants.js';\nexport declare namespace DSChartT {\n export type AxisTypeT = 'log' | 'band' | 'time' | 'linear';\n\n export type LinearScale = ScaleLinear<number, number, never>;\n export type BandScale = ScaleBand<string>;\n export type SeriesTypes = (typeof SERIE_TYPES)[keyof typeof SERIE_TYPES];\n export type Scales = LinearScale | BandScale;\n export interface SeriesT {\n name: string;\n data: Array<number | null | { x: number | string | Date; y: number }>;\n type: SeriesTypes;\n scale?: string;\n color: string;\n // line\n dashStyle?: string;\n pointRadius?: number;\n pointStyle?: string;\n }\n\n export interface ScrapperT {\n type: 'horizontal' | 'vertical';\n color: string;\n tooltipPreference: DSPopperJST.PopperPlacementsT;\n }\n\n export interface SerieComponentT {\n serie: InternalSerie;\n }\n\n export interface LegendT {\n position: 'right' | 'bottom' | 'left' | 'top';\n preventFilterAction?: boolean;\n }\n\n export interface AxisTickT {\n tickValues?: number[] | Date[];\n tickFormat?: ((value: string | number | Date) => string) | string;\n tickCount?: number;\n tickRotation?: number;\n overwriteTicks?: boolean;\n color?: string;\n }\n\n export type IntervalT = 'DAY' | 'WEEK' | 'MONTH' | 'YEAR';\n\n export interface AxisT {\n type: AxisTypeT;\n showGrid?: boolean;\n color?: string;\n label?: string;\n cols?: string[];\n domainPadding?: number | number[];\n intervalType?: IntervalT;\n hideAxis?: boolean;\n beginAtZero?: boolean;\n advanced?: {\n pointSpacing: {\n type: string;\n value: number;\n };\n };\n tick?: AxisTickT;\n plotRange?: number[];\n min?: number | Date;\n max?: number | Date;\n domainPaddingType?: string;\n }\n\n export interface InternalDatum {\n key: string;\n value: number | { x: number; y: number };\n position: number;\n serie: string;\n scale: string;\n color: string;\n }\n\n export interface InternalSerie {\n key: string;\n data: InternalDatum[];\n name: string;\n type: SeriesTypes;\n scale?: string | undefined;\n color: string;\n dashStyle?: string;\n pointRadius?: number;\n pointStyle?: string;\n curveStyle?: string;\n }\n\n export type InternalData = InternalSerie[];\n export interface TooltipRenderDataT {\n data: {\n datum: InternalDatum;\n name: string;\n xValue: string | number | Date | null;\n yValue: string | number | Date | null;\n }[];\n }\n export interface OptionalProps {\n groups?: string[][];\n types?: 'scatter';\n scrapper?: ScrapperT;\n withTrendHighlight?: boolean;\n TooltipRenderer?: React.ComponentType<TooltipRenderDataT>;\n height?: number;\n width?: number;\n legend?: LegendT;\n xScroll?: boolean;\n yScroll?: boolean;\n y2Axis?: AxisT;\n yAxis: AxisT;\n xAxis: AxisT;\n }\n\n export interface DefaultProps {\n series: SeriesT[];\n }\n\n export interface RequiredProps {}\n\n export interface Props extends OptionalProps, DefaultProps, RequiredProps {}\n\n export type StackedSeriesByGroupT = Series<\n {\n [key: string]: number;\n },\n string\n >[][];\n\n export interface ScrapperDatum {\n position: number | undefined;\n name: string;\n xValue: string | number | Date | null;\n yValue: string | number | Date | null;\n key: number;\n datum: DSChartT.InternalDatum;\n }\n}\n\nexport const defaultProps: DSChartT.DefaultProps = {\n series: [\n {\n name: '1',\n data: [0],\n color: 'grey-100',\n type: 'bar',\n },\n ],\n};\n\nexport const propTypes = {\n ...globalAttributesPropTypes,\n height: PropTypes.number.isRequired.description('height').defaultValue(''),\n width: PropTypes.number.isRequired.description('height').defaultValue(''),\n margin: PropTypes.shape({\n top: PropTypes.number,\n bottom: PropTypes.number,\n left: PropTypes.number,\n right: PropTypes.number,\n })\n .isRequired.description('margin')\n .defaultValue(''),\n series: PropTypes.arrayOf(PropTypes.object).description('yValue').defaultValue(''),\n};\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport { globalAttributesPropTypes, PropTypes } from '@elliemae/ds-props-helpers';\nimport type { Series, ScaleLinear, ScaleBand } from 'd3';\nimport { type DSHookFloatingContextT } from '@elliemae/ds-floating-context';\nimport { type SERIE_TYPES } from '../constants.js';\nexport declare namespace DSChartT {\n export type AxisTypeT = 'log' | 'band' | 'time' | 'linear';\n\n export type LinearScale = ScaleLinear<number, number, never>;\n export type BandScale = ScaleBand<string>;\n export type SeriesTypes = (typeof SERIE_TYPES)[keyof typeof SERIE_TYPES];\n export type Scales = LinearScale | BandScale;\n export interface SeriesT {\n name: string;\n data: Array<number | null | { x: number | string | Date; y: number }>;\n type: SeriesTypes;\n scale?: string;\n color: string;\n // line\n dashStyle?: string;\n pointRadius?: number;\n pointStyle?: string;\n }\n\n export interface ScrapperT {\n type: 'horizontal' | 'vertical';\n color: string;\n tooltipPreference: DSHookFloatingContextT.PopperPlacementsT;\n }\n\n export interface SerieComponentT {\n serie: InternalSerie;\n }\n\n export interface LegendT {\n position: 'right' | 'bottom' | 'left' | 'top';\n preventFilterAction?: boolean;\n }\n\n export interface AxisTickT {\n tickValues?: number[] | Date[];\n tickFormat?: ((value: string | number | Date) => string) | string;\n tickCount?: number;\n tickRotation?: number;\n overwriteTicks?: boolean;\n color?: string;\n }\n\n export type IntervalT = 'DAY' | 'WEEK' | 'MONTH' | 'YEAR';\n\n export interface AxisT {\n type: AxisTypeT;\n showGrid?: boolean;\n color?: string;\n label?: string;\n cols?: string[];\n domainPadding?: number | number[];\n intervalType?: IntervalT;\n hideAxis?: boolean;\n beginAtZero?: boolean;\n advanced?: {\n pointSpacing: {\n type: string;\n value: number;\n };\n };\n tick?: AxisTickT;\n plotRange?: number[];\n min?: number | Date;\n max?: number | Date;\n domainPaddingType?: string;\n }\n\n export interface InternalDatum {\n key: string;\n value: number | { x: number; y: number };\n position: number;\n serie: string;\n scale: string;\n color: string;\n }\n\n export interface InternalSerie {\n key: string;\n data: InternalDatum[];\n name: string;\n type: SeriesTypes;\n scale?: string | undefined;\n color: string;\n dashStyle?: string;\n pointRadius?: number;\n pointStyle?: string;\n curveStyle?: string;\n }\n\n export type InternalData = InternalSerie[];\n export interface TooltipRenderDataT {\n data: {\n datum: InternalDatum;\n name: string;\n xValue: string | number | Date | null;\n yValue: string | number | Date | null;\n }[];\n }\n export interface OptionalProps {\n groups?: string[][];\n types?: 'scatter';\n scrapper?: ScrapperT;\n withTrendHighlight?: boolean;\n TooltipRenderer?: React.ComponentType<TooltipRenderDataT>;\n height?: number;\n width?: number;\n legend?: LegendT;\n xScroll?: boolean;\n yScroll?: boolean;\n y2Axis?: AxisT;\n yAxis: AxisT;\n xAxis: AxisT;\n }\n\n export interface DefaultProps {\n series: SeriesT[];\n }\n\n export interface RequiredProps {}\n\n export interface Props extends OptionalProps, DefaultProps, RequiredProps {}\n\n export type StackedSeriesByGroupT = Series<\n {\n [key: string]: number;\n },\n string\n >[][];\n\n export interface ScrapperDatum {\n position: number | undefined;\n name: string;\n xValue: string | number | Date | null;\n yValue: string | number | Date | null;\n key: number;\n datum: DSChartT.InternalDatum;\n }\n}\n\nexport const defaultProps: DSChartT.DefaultProps = {\n series: [\n {\n name: '1',\n data: [0],\n color: 'grey-100',\n type: 'bar',\n },\n ],\n};\n\nexport const propTypes = {\n ...globalAttributesPropTypes,\n height: PropTypes.number.isRequired.description('height').defaultValue(''),\n width: PropTypes.number.isRequired.description('height').defaultValue(''),\n margin: PropTypes.shape({\n top: PropTypes.number,\n bottom: PropTypes.number,\n left: PropTypes.number,\n right: PropTypes.number,\n })\n .isRequired.description('margin')\n .defaultValue(''),\n series: PropTypes.arrayOf(PropTypes.object).description('yValue').defaultValue(''),\n};\n"],
5
5
  "mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,2BAA2B,iBAAiB;AAgJ9C,MAAM,eAAsC;AAAA,EACjD,QAAQ;AAAA,IACN;AAAA,MACE,MAAM;AAAA,MACN,MAAM,CAAC,CAAC;AAAA,MACR,OAAO;AAAA,MACP,MAAM;AAAA,IACR;AAAA,EACF;AACF;AAEO,MAAM,YAAY;AAAA,EACvB,GAAG;AAAA,EACH,QAAQ,UAAU,OAAO,WAAW,YAAY,QAAQ,EAAE,aAAa,EAAE;AAAA,EACzE,OAAO,UAAU,OAAO,WAAW,YAAY,QAAQ,EAAE,aAAa,EAAE;AAAA,EACxE,QAAQ,UAAU,MAAM;AAAA,IACtB,KAAK,UAAU;AAAA,IACf,QAAQ,UAAU;AAAA,IAClB,MAAM,UAAU;AAAA,IAChB,OAAO,UAAU;AAAA,EACnB,CAAC,EACE,WAAW,YAAY,QAAQ,EAC/B,aAAa,EAAE;AAAA,EAClB,QAAQ,UAAU,QAAQ,UAAU,MAAM,EAAE,YAAY,QAAQ,EAAE,aAAa,EAAE;AACnF;",
6
6
  "names": []
7
7
  }
@@ -1,5 +1,5 @@
1
- import type { GlobalAttributesT, XstyledProps, DSPropTypesSchema } from '@elliemae/ds-props-helpers';
2
- import { type BackgroundProps, type BorderProps } from '@elliemae/ds-system';
1
+ import type { DSPropTypesSchema, GlobalAttributesT, XstyledProps } from '@elliemae/ds-props-helpers';
2
+ import { type BorderProps } from '@elliemae/ds-system';
3
3
  export declare namespace DSSingleStackedBarT {
4
4
  type DatumT = {
5
5
  name: string;
@@ -20,7 +20,7 @@ export declare namespace DSSingleStackedBarT {
20
20
  interface BarT extends SingleStackedBarT {
21
21
  isFocused: boolean;
22
22
  borderRadius?: BorderProps['borderRadius'];
23
- bg: BackgroundProps['bg'];
23
+ bg: string;
24
24
  tabIndex?: 0 | -1;
25
25
  datum: DatumT;
26
26
  }
@@ -24,5 +24,5 @@ interface AxisT<S extends ScaleT> {
24
24
  GridRenderer: (props: GridRenderPropsT) => JSX.Element | null;
25
25
  color: string;
26
26
  }
27
- export declare const Axis: React.MemoExoticComponent<(<S extends ScaleT>(props: AxisT<S>) => import("react/jsx-runtime.js").JSX.Element | null)>;
27
+ export declare const Axis: React.MemoExoticComponent<(<S extends ScaleT>(props: AxisT<S>) => React.JSX.Element | null)>;
28
28
  export {};
@@ -1,2 +1,2 @@
1
1
  import React from 'react';
2
- export declare const AxisBottom: React.MemoExoticComponent<() => import("react/jsx-runtime.js").JSX.Element | null>;
2
+ export declare const AxisBottom: React.MemoExoticComponent<() => React.JSX.Element | null>;
@@ -1,2 +1,2 @@
1
1
  import React from 'react';
2
- export declare const AxisLeft: React.MemoExoticComponent<() => import("react/jsx-runtime.js").JSX.Element | null>;
2
+ export declare const AxisLeft: React.MemoExoticComponent<() => React.JSX.Element | null>;
@@ -1,2 +1,2 @@
1
1
  import React from 'react';
2
- export declare const AxisRight: React.MemoExoticComponent<() => import("react/jsx-runtime.js").JSX.Element | null>;
2
+ export declare const AxisRight: React.MemoExoticComponent<() => React.JSX.Element | null>;
@@ -1 +1,2 @@
1
- export declare const ChartContainer: () => import("react/jsx-runtime.js").JSX.Element;
1
+ import React from 'react';
2
+ export declare const ChartContainer: () => React.JSX.Element;
@@ -1 +1,2 @@
1
- export declare const ClipPaths: () => import("react/jsx-runtime.js").JSX.Element;
1
+ import React from 'react';
2
+ export declare const ClipPaths: () => React.JSX.Element;
@@ -1 +1,2 @@
1
- export declare const Labels: () => import("react/jsx-runtime.js").JSX.Element;
1
+ import React from 'react';
2
+ export declare const Labels: () => React.JSX.Element;
@@ -1 +1,2 @@
1
- export declare const BottomLegend: () => import("react/jsx-runtime.js").JSX.Element;
1
+ import React from 'react';
2
+ export declare const BottomLegend: () => React.JSX.Element;
@@ -1 +1,2 @@
1
- export declare const LeftLegend: () => import("react/jsx-runtime.js").JSX.Element;
1
+ import React from 'react';
2
+ export declare const LeftLegend: () => React.JSX.Element;
@@ -1 +1,2 @@
1
- export declare const Legend: () => import("react/jsx-runtime.js").JSX.Element | null;
1
+ import React from 'react';
2
+ export declare const Legend: () => React.JSX.Element | null;
@@ -1,5 +1,6 @@
1
+ import React from 'react';
1
2
  interface LegendItemProps {
2
3
  domainValue: string;
3
4
  }
4
- export declare const LegendItem: (props: LegendItemProps) => import("react/jsx-runtime.js").JSX.Element;
5
+ export declare const LegendItem: (props: LegendItemProps) => React.JSX.Element;
5
6
  export {};
@@ -1 +1,2 @@
1
- export declare const RightLegend: () => import("react/jsx-runtime.js").JSX.Element;
1
+ import React from 'react';
2
+ export declare const RightLegend: () => React.JSX.Element;
@@ -1 +1,2 @@
1
- export declare const TopLegend: () => import("react/jsx-runtime.js").JSX.Element;
1
+ import React from 'react';
2
+ export declare const TopLegend: () => React.JSX.Element;
@@ -1 +1,2 @@
1
- export declare const Scrapper: () => import("react/jsx-runtime.js").JSX.Element;
1
+ import React from 'react';
2
+ export declare const Scrapper: () => React.JSX.Element;
@@ -1 +1,2 @@
1
- export declare const VerticalScrapper: () => import("react/jsx-runtime.js").JSX.Element;
1
+ import React from 'react';
2
+ export declare const VerticalScrapper: () => React.JSX.Element;
@@ -1 +1,2 @@
1
- export declare const BlurMask: () => import("react/jsx-runtime.js").JSX.Element | null;
1
+ import React from 'react';
2
+ export declare const BlurMask: () => React.JSX.Element | null;
@@ -1 +1,2 @@
1
- export declare const Controllers: () => import("react/jsx-runtime.js").JSX.Element | null;
1
+ import React from 'react';
2
+ export declare const Controllers: () => React.JSX.Element | null;
@@ -1 +1,2 @@
1
- export declare const ScrollBarX: () => import("react/jsx-runtime.js").JSX.Element;
1
+ import React from 'react';
2
+ export declare const ScrollBarX: () => React.JSX.Element;
@@ -1 +1,2 @@
1
- export declare const ScrollBarY: () => import("react/jsx-runtime.js").JSX.Element;
1
+ import React from 'react';
2
+ export declare const ScrollBarY: () => React.JSX.Element;
@@ -1 +1,2 @@
1
- export declare const ScrollableContainerX: () => import("react/jsx-runtime.js").JSX.Element;
1
+ import React from 'react';
2
+ export declare const ScrollableContainerX: () => React.JSX.Element;
@@ -1 +1,2 @@
1
- export declare const ScrollableContainerY: () => import("react/jsx-runtime.js").JSX.Element;
1
+ import React from 'react';
2
+ export declare const ScrollableContainerY: () => React.JSX.Element;
@@ -1 +1,2 @@
1
- export declare const SeriesFactory: () => import("react/jsx-runtime.js").JSX.Element;
1
+ import React from 'react';
2
+ export declare const SeriesFactory: () => React.JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import type { Series, ScaleLinear, ScaleBand } from 'd3';
2
- import { type DSPopperJST } from '@elliemae/ds-popperjs';
2
+ import { type DSHookFloatingContextT } from '@elliemae/ds-floating-context';
3
3
  import { type SERIE_TYPES } from '../constants.js';
4
4
  export declare namespace DSChartT {
5
5
  type AxisTypeT = 'log' | 'band' | 'time' | 'linear';
@@ -23,7 +23,7 @@ export declare namespace DSChartT {
23
23
  interface ScrapperT {
24
24
  type: 'horizontal' | 'vertical';
25
25
  color: string;
26
- tooltipPreference: DSPopperJST.PopperPlacementsT;
26
+ tooltipPreference: DSHookFloatingContextT.PopperPlacementsT;
27
27
  }
28
28
  interface SerieComponentT {
29
29
  serie: InternalSerie;
@@ -1,2 +1,3 @@
1
+ import React from 'react';
1
2
  import type { DSChartT } from '../react-desc-prop-types.js';
2
- export declare const HorizontalBars: ({ serie }: DSChartT.SerieComponentT) => import("react/jsx-runtime.js").JSX.Element;
3
+ export declare const HorizontalBars: ({ serie }: DSChartT.SerieComponentT) => React.JSX.Element;
@@ -1,2 +1,3 @@
1
+ import React from 'react';
1
2
  import type { DSChartT } from '../react-desc-prop-types.js';
2
- export declare const HorizontalStackedBars: ({ serie }: DSChartT.SerieComponentT) => import("react/jsx-runtime.js").JSX.Element;
3
+ export declare const HorizontalStackedBars: ({ serie }: DSChartT.SerieComponentT) => React.JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-dataviz",
3
- "version": "3.62.1",
3
+ "version": "3.70.0-alpha.9",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - DataViz",
6
6
  "files": [
@@ -22,7 +22,7 @@
22
22
  ],
23
23
  "repository": {
24
24
  "type": "git",
25
- "url": "https://git.elliemae.io/platform-ui/dimsum.git"
25
+ "url": "https://github.com/intcx/PLATFORM-UI.dimsum.git"
26
26
  },
27
27
  "engines": {
28
28
  "pnpm": ">=9",
@@ -39,25 +39,25 @@
39
39
  "d3": "~7.9.0",
40
40
  "resize-observer-polyfill": "~1.5.1",
41
41
  "uid": "^2.0.2",
42
- "@elliemae/ds-popperjs": "3.62.1",
43
- "@elliemae/ds-system": "3.62.1",
44
- "@elliemae/ds-grid": "3.62.1",
45
- "@elliemae/ds-props-helpers": "3.62.1"
42
+ "@elliemae/ds-floating-context": "3.70.0-alpha.9",
43
+ "@elliemae/ds-props-helpers": "3.70.0-alpha.9",
44
+ "@elliemae/ds-grid": "3.70.0-alpha.9",
45
+ "@elliemae/ds-system": "3.70.0-alpha.9"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@elliemae/pui-theme": "~2.13.0",
49
49
  "@types/d3": "~7.4.0",
50
50
  "jest": "^30.0.0",
51
- "styled-components": "~5.3.9",
52
- "@elliemae/ds-monorepo-devops": "3.62.1",
53
- "@elliemae/ds-test-utils": "3.62.1"
51
+ "styled-components": "~5.3.11",
52
+ "@elliemae/ds-monorepo-devops": "3.70.0-alpha.9",
53
+ "@elliemae/ds-test-utils": "3.70.0-alpha.9"
54
54
  },
55
55
  "peerDependencies": {
56
56
  "@elliemae/pui-theme": "~2.13.0",
57
57
  "lodash-es": "^4.18.1",
58
58
  "react": "^18.3.1",
59
59
  "react-dom": "^18.3.1",
60
- "styled-components": "~5.3.9"
60
+ "styled-components": "~5.3.11"
61
61
  },
62
62
  "publishConfig": {
63
63
  "access": "public",
@@ -1 +0,0 @@
1
- export {};