@elliemae/ds-dataviz 3.48.2-next.0 → 3.49.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.
@@ -59,6 +59,8 @@ const getInterval = (interval) => {
59
59
  }
60
60
  };
61
61
  class Scale {
62
+ scale;
63
+ type;
62
64
  constructor(scale) {
63
65
  this.type = "";
64
66
  this.scale = scale;
@@ -68,6 +70,9 @@ class Scale {
68
70
  }
69
71
  }
70
72
  class BandScale extends Scale {
73
+ type;
74
+ scale;
75
+ axisProps;
71
76
  constructor(scale, axisProps) {
72
77
  super(scale);
73
78
  this.scale = scale;
@@ -96,6 +101,9 @@ class BandScale extends Scale {
96
101
  }
97
102
  }
98
103
  class LinearScale extends Scale {
104
+ type;
105
+ scale;
106
+ axisProps;
99
107
  constructor(scale, axisProps) {
100
108
  super(scale);
101
109
  this.scale = scale;
@@ -135,6 +143,9 @@ class LinearScale extends Scale {
135
143
  }
136
144
  }
137
145
  class LogScale extends LinearScale {
146
+ type;
147
+ scale;
148
+ axisProps;
138
149
  constructor(scale, axisProps) {
139
150
  super(scale, axisProps);
140
151
  this.scale = scale;
@@ -153,6 +164,9 @@ class LogScale extends LinearScale {
153
164
  }
154
165
  }
155
166
  class TimeLinearScale extends Scale {
167
+ type;
168
+ scale;
169
+ axisProps;
156
170
  constructor(scale, axisProps) {
157
171
  super(scale);
158
172
  this.scale = scale;
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../../src/graphs/Chart/scales/index.tsx", "../../../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["/* eslint-disable max-lines */\nimport type { ScaleBand, ScaleLinear, ScaleLogarithmic, ScaleTime } from 'd3';\nimport type { DSChartT } from '../react-desc-prop-types.js';\nimport { timeFormat, format, utcDay, utcMonth, utcWeek, utcYear } from 'd3';\n\nexport const AXIS_TYPE = {\n BAND: 'BAND',\n LINEAR: 'LINEAR',\n DATETIME: 'DATETIME',\n LOG: 'LOG',\n} as const;\n\nconst getInterval = (interval?: string) => {\n switch (interval) {\n case 'DAY':\n return utcDay;\n case 'MONTH':\n return utcMonth;\n case 'WEEK':\n return utcWeek;\n case 'YEAR':\n return utcYear;\n default:\n return null;\n }\n};\n\nexport class Scale {\n scale: ScaleBand<string> | ScaleLinear<number, number, never> | ScaleTime<number, number, never>;\n\n type: string;\n\n constructor(scale: ScaleBand<string> | ScaleLinear<number, number, never> | ScaleTime<number, number, never>) {\n this.type = '';\n this.scale = scale;\n }\n\n getBandwidth() {\n return 0;\n }\n}\nexport class BandScale extends Scale {\n type: keyof typeof AXIS_TYPE;\n\n scale: ScaleBand<string>;\n\n axisProps: DSChartT.AxisT;\n\n constructor(scale: ScaleBand<string>, axisProps: DSChartT.AxisT) {\n super(scale);\n this.scale = scale;\n this.type = 'BAND';\n this.axisProps = axisProps;\n }\n\n get(value: string) {\n if (typeof value !== 'string') return 0;\n return this.scale(value);\n }\n\n getTicks() {\n return this.scale.domain();\n }\n\n getTickFormatted(t: number | string | Date) {\n if (typeof t !== 'string') return t;\n if (typeof this.axisProps?.tick?.tickFormat === 'function') {\n return this.axisProps?.tick?.tickFormat(t);\n }\n return t;\n }\n\n getTicksScaled() {\n return this.scale.domain().map((d) => (this.get(d) ?? 0) + this.getBandwidth() / 2);\n }\n\n getBandwidth() {\n return this.scale.bandwidth();\n }\n}\n\nexport class LinearScale extends Scale {\n type: keyof typeof AXIS_TYPE;\n\n scale: ScaleLinear<number, number, never>;\n\n axisProps: DSChartT.AxisT;\n\n constructor(scale: ScaleLinear<number, number, never>, axisProps: DSChartT.AxisT) {\n super(scale);\n this.scale = scale;\n this.type = 'LINEAR';\n this.axisProps = axisProps;\n }\n\n get(value: number) {\n if (typeof value !== 'number') return 0;\n return this.scale(value);\n }\n\n getTickFormatted(t: number | string | Date) {\n if (typeof t !== 'number') return t.toString();\n if (typeof this.axisProps?.tick?.tickFormat === 'function') {\n return this.axisProps?.tick?.tickFormat(t);\n }\n if (typeof this.axisProps?.tick?.tickFormat === 'string') {\n return format(this.axisProps?.tick?.tickFormat)(t);\n }\n return t.toString();\n }\n\n getTicks(dimension: number) {\n const ticks = this.scale.ticks?.(this.axisProps?.tick?.tickCount ?? Math.ceil(dimension / 80));\n if (this.axisProps?.tick?.tickValues) {\n if (this.axisProps?.tick?.overwriteTicks) return this.axisProps?.tick?.tickValues;\n this.axisProps?.tick?.tickValues.forEach((t) => {\n if (typeof t !== 'number') return;\n const isTickAlreadyPresent = ticks.find((tick) => tick === t);\n if (isTickAlreadyPresent) return;\n ticks.push(t);\n });\n }\n return ticks;\n }\n\n getTicksScaled(dimension: number) {\n const ticks = this.getTicks(dimension);\n return ticks.map((t) => (typeof t === 'number' ? this.get(t) : 0));\n }\n}\n\nexport class LogScale extends LinearScale {\n type: keyof typeof AXIS_TYPE;\n\n scale: ScaleLogarithmic<number, number, never>;\n\n axisProps: DSChartT.AxisT;\n\n constructor(scale: ScaleLogarithmic<number, number, never>, axisProps: DSChartT.AxisT) {\n super(scale, axisProps);\n this.scale = scale;\n this.type = 'LOG';\n this.axisProps = axisProps;\n }\n\n getTickFormatted(t: number | string | Date) {\n if (typeof t !== 'number') return t.toString();\n if (typeof this.axisProps?.tick?.tickFormat === 'function') {\n return this.axisProps?.tick?.tickFormat(t);\n }\n if (typeof this.axisProps?.tick?.tickFormat === 'string') {\n return format(this.axisProps?.tick?.tickFormat)(t);\n }\n return format('~s')(t);\n }\n}\n\nexport class TimeLinearScale extends Scale {\n type: keyof typeof AXIS_TYPE;\n\n scale: ScaleTime<number, number, never>;\n\n axisProps: DSChartT.AxisT;\n\n constructor(scale: ScaleTime<number, number, never>, axisProps: DSChartT.AxisT) {\n super(scale);\n this.scale = scale;\n this.type = 'DATETIME';\n this.axisProps = axisProps;\n }\n\n get(value: Date) {\n if (typeof value !== 'object') return 0;\n return this.scale(value);\n }\n\n getTickFormatted(t: number | string | Date) {\n if (typeof t !== 'object') return t.toString();\n if (typeof this.axisProps?.tick?.tickFormat === 'function') {\n return this.axisProps?.tick?.tickFormat(t);\n }\n if (typeof this.axisProps?.tick?.tickFormat === 'string') {\n return timeFormat(this.axisProps?.tick?.tickFormat)(t);\n }\n return t.toString();\n }\n\n getTicks(dimension: number, intervalType?: string) {\n const interval = getInterval(intervalType);\n const finalTickConfig = interval || (this.axisProps?.tick?.tickCount ?? Math.ceil(dimension / 80));\n const ticks = this.scale.ticks?.(finalTickConfig as number);\n const ticksValues = this.axisProps?.tick?.tickValues;\n if (ticksValues) {\n if (this.axisProps?.tick?.overwriteTicks) return ticksValues;\n const newTicks = [] as Date[];\n ticks.forEach((t) => {\n if (typeof t !== 'object') return;\n const exists = ticksValues.some(\n (tickValue) => typeof tickValue === 'object' && tickValue.getTime() === t.getTime(),\n );\n if (!exists) newTicks.push(t);\n });\n return [...newTicks, ...ticksValues];\n }\n return ticks;\n }\n\n getTicksScaled(dimension: number, intervalType?: string) {\n const ticks = this.getTicks(dimension, intervalType);\n return ticks.map((t) => (typeof t === 'object' ? this.get(t) : 0));\n }\n}\n\nexport type ScaleT = BandScale | LinearScale | TimeLinearScale;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADGvB,gBAAuE;AAEhE,MAAM,YAAY;AAAA,EACvB,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,KAAK;AACP;AAEA,MAAM,cAAc,CAAC,aAAsB;AACzC,UAAQ,UAAU;AAAA,IAChB,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT;AACE,aAAO;AAAA,EACX;AACF;AAEO,MAAM,MAAM;AAAA,EAKjB,YAAY,OAAkG;AAC5G,SAAK,OAAO;AACZ,SAAK,QAAQ;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OAAO,KAAK,WAAW,MAAM,eAAe,UAAU;AACxD,iBAAO,sBAAW,KAAK,WAAW,MAAM,UAAU,EAAE,CAAC;AAAA,IACvD;AACA,WAAO,EAAE,SAAS;AAAA,EACpB;AAAA,EAEA,SAAS,WAAmB,cAAuB;AACjD,UAAM,WAAW,YAAY,YAAY;AACzC,UAAM,kBAAkB,aAAa,KAAK,WAAW,MAAM,aAAa,KAAK,KAAK,YAAY,EAAE;AAChG,UAAM,QAAQ,KAAK,MAAM,QAAQ,eAAyB;AAC1D,UAAM,cAAc,KAAK,WAAW,MAAM;AAC1C,QAAI,aAAa;AACf,UAAI,KAAK,WAAW,MAAM,eAAgB,QAAO;AACjD,YAAM,WAAW,CAAC;AAClB,YAAM,QAAQ,CAAC,MAAM;AACnB,YAAI,OAAO,MAAM,SAAU;AAC3B,cAAM,SAAS,YAAY;AAAA,UACzB,CAAC,cAAc,OAAO,cAAc,YAAY,UAAU,QAAQ,MAAM,EAAE,QAAQ;AAAA,QACpF;AACA,YAAI,CAAC,OAAQ,UAAS,KAAK,CAAC;AAAA,MAC9B,CAAC;AACD,aAAO,CAAC,GAAG,UAAU,GAAG,WAAW;AAAA,IACrC;AACA,WAAO;AAAA,EACT;AAAA,EAEA,eAAe,WAAmB,cAAuB;AACvD,UAAM,QAAQ,KAAK,SAAS,WAAW,YAAY;AACnD,WAAO,MAAM,IAAI,CAAC,MAAO,OAAO,MAAM,WAAW,KAAK,IAAI,CAAC,IAAI,CAAE;AAAA,EACnE;AACF;",
6
6
  "names": []
7
7
  }
@@ -76,10 +76,11 @@ const StyledGrid = (0, import_ds_system.styled)("g")`
76
76
  opacity: 0.2;
77
77
  }
78
78
  `;
79
- const StyleFocusableRegion = (0, import_ds_system.styled)("div")`
80
- width: ${({ s }) => s * 2}px;
81
- height: ${({ s }) => s * 2}px;
82
- :focus {
79
+ const StyleFocusableRegion = import_ds_system.styled.div`
80
+ width: ${({ size = 1 }) => size * 2}px;
81
+ height: ${({ size = 1 }) => size * 2}px;
82
+ outline: none;
83
+ &:focus {
83
84
  outline: none;
84
85
  }
85
86
  `;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/graphs/Chart/styles.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import { styled } from '@elliemae/ds-system';\n\ninterface StyledAxisT {\n axisColor: string;\n}\nexport const StyledSVGWrapper = styled.div<{ isGrabbed: boolean }>`\n rect:focus,\n rect:focus-visible,\n circle:focus,\n circle:focus-visible {\n outline: none;\n }\n\n :focus,\n :focus-visible {\n outline: none;\n }\n\n cursor: ${({ isGrabbed }) => (isGrabbed ? 'grabbing' : 'default')};\n\n text {\n font-size: 1rem;\n }\n\n min-width: 300px;\n`;\n\nexport const StyledAxis = styled('line')<StyledAxisT>`\n stroke-width: 2px;\n stroke: ${({ theme }) => theme.colors.neutral['700']};\n ${({ axisColor }) => (axisColor ? `stroke: ${axisColor}` : '')}\n`;\n\nexport const StyledAxisLabel = styled('text')`\n font-size: 1rem;\n font-weight: 600;\n`;\n\nexport const StyledGrid = styled('g')`\n line {\n opacity: 0.2;\n }\n`;\n\nexport const StyleFocusableRegion = styled('div')<{ s: number }>`\n width: ${({ s }) => s * 2 ?? '1'}px;\n height: ${({ s }) => s * 2 ?? '1'}px;\n :focus {\n outline: none;\n }\n`;\n\nexport const StyledLine = styled('path')`\n fill: none;\n stroke-width: 3;\n stroke-linejoin: round;\n`;\nexport const StyledArea = styled('path')`\n stroke-width: 3;\n stroke-linejoin: round;\n opacity: 0.2;\n`;\n\nexport const StyledTooltipContainer = styled.div`\n max-width: 350px;\n background-color: white;\n`;\n\nexport const StyledMouseOverDetectionBox = styled.div`\n position: absolute;\n top: -15px;\n right: -15px;\n width: calc(100% + 30px);\n height: calc(100% + 30px);\n z-index: -1;\n`;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAuB;AAKhB,MAAM,mBAAmB,wBAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAa3B,CAAC,EAAE,UAAU,MAAO,YAAY,aAAa,SAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAS5D,MAAM,iBAAa,yBAAO,MAAM;AAAA;AAAA,YAE3B,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA,IAClD,CAAC,EAAE,UAAU,MAAO,YAAY,WAAW,SAAS,KAAK,EAAG;AAAA;AAGzD,MAAM,sBAAkB,yBAAO,MAAM;AAAA;AAAA;AAAA;AAKrC,MAAM,iBAAa,yBAAO,GAAG;AAAA;AAAA;AAAA;AAAA;AAM7B,MAAM,2BAAuB,yBAAO,KAAK;AAAA,WACrC,CAAC,EAAE,EAAE,MAAM,IAAI,CAAQ;AAAA,YACtB,CAAC,EAAE,EAAE,MAAM,IAAI,CAAQ;AAAA;AAAA;AAAA;AAAA;AAM5B,MAAM,iBAAa,yBAAO,MAAM;AAAA;AAAA;AAAA;AAAA;AAKhC,MAAM,iBAAa,yBAAO,MAAM;AAAA;AAAA;AAAA;AAAA;AAMhC,MAAM,yBAAyB,wBAAO;AAAA;AAAA;AAAA;AAKtC,MAAM,8BAA8B,wBAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;",
4
+ "sourcesContent": ["import { styled } from '@elliemae/ds-system';\n\ninterface StyledAxisT {\n axisColor: string;\n}\nexport const StyledSVGWrapper = styled.div<{ isGrabbed: boolean }>`\n rect:focus,\n rect:focus-visible,\n circle:focus,\n circle:focus-visible {\n outline: none;\n }\n\n :focus,\n :focus-visible {\n outline: none;\n }\n\n cursor: ${({ isGrabbed }) => (isGrabbed ? 'grabbing' : 'default')};\n\n text {\n font-size: 1rem;\n }\n\n min-width: 300px;\n`;\n\nexport const StyledAxis = styled('line')<StyledAxisT>`\n stroke-width: 2px;\n stroke: ${({ theme }) => theme.colors.neutral['700']};\n ${({ axisColor }) => (axisColor ? `stroke: ${axisColor}` : '')}\n`;\n\nexport const StyledAxisLabel = styled('text')`\n font-size: 1rem;\n font-weight: 600;\n`;\n\nexport const StyledGrid = styled('g')`\n line {\n opacity: 0.2;\n }\n`;\n\nexport const StyleFocusableRegion = styled.div<{ size?: number }>`\n width: ${({ size = 1 }) => size * 2}px;\n height: ${({ size = 1 }) => size * 2}px;\n outline: none;\n &:focus {\n outline: none;\n }\n`;\n\nexport const StyledLine = styled('path')`\n fill: none;\n stroke-width: 3;\n stroke-linejoin: round;\n`;\nexport const StyledArea = styled('path')`\n stroke-width: 3;\n stroke-linejoin: round;\n opacity: 0.2;\n`;\n\nexport const StyledTooltipContainer = styled.div`\n max-width: 350px;\n background-color: white;\n`;\n\nexport const StyledMouseOverDetectionBox = styled.div`\n position: absolute;\n top: -15px;\n right: -15px;\n width: calc(100% + 30px);\n height: calc(100% + 30px);\n z-index: -1;\n`;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAuB;AAKhB,MAAM,mBAAmB,wBAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAa3B,CAAC,EAAE,UAAU,MAAO,YAAY,aAAa,SAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAS5D,MAAM,iBAAa,yBAAO,MAAM;AAAA;AAAA,YAE3B,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA,IAClD,CAAC,EAAE,UAAU,MAAO,YAAY,WAAW,SAAS,KAAK,EAAG;AAAA;AAGzD,MAAM,sBAAkB,yBAAO,MAAM;AAAA;AAAA;AAAA;AAKrC,MAAM,iBAAa,yBAAO,GAAG;AAAA;AAAA;AAAA;AAAA;AAM7B,MAAM,uBAAuB,wBAAO;AAAA,WAChC,CAAC,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAAA,YACzB,CAAC,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAO/B,MAAM,iBAAa,yBAAO,MAAM;AAAA;AAAA;AAAA;AAAA;AAKhC,MAAM,iBAAa,yBAAO,MAAM;AAAA;AAAA;AAAA;AAAA;AAMhC,MAAM,yBAAyB,wBAAO;AAAA;AAAA;AAAA;AAKtC,MAAM,8BAA8B,wBAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;",
6
6
  "names": []
7
7
  }
@@ -21,6 +21,8 @@ const getInterval = (interval) => {
21
21
  }
22
22
  };
23
23
  class Scale {
24
+ scale;
25
+ type;
24
26
  constructor(scale) {
25
27
  this.type = "";
26
28
  this.scale = scale;
@@ -30,6 +32,9 @@ class Scale {
30
32
  }
31
33
  }
32
34
  class BandScale extends Scale {
35
+ type;
36
+ scale;
37
+ axisProps;
33
38
  constructor(scale, axisProps) {
34
39
  super(scale);
35
40
  this.scale = scale;
@@ -58,6 +63,9 @@ class BandScale extends Scale {
58
63
  }
59
64
  }
60
65
  class LinearScale extends Scale {
66
+ type;
67
+ scale;
68
+ axisProps;
61
69
  constructor(scale, axisProps) {
62
70
  super(scale);
63
71
  this.scale = scale;
@@ -97,6 +105,9 @@ class LinearScale extends Scale {
97
105
  }
98
106
  }
99
107
  class LogScale extends LinearScale {
108
+ type;
109
+ scale;
110
+ axisProps;
100
111
  constructor(scale, axisProps) {
101
112
  super(scale, axisProps);
102
113
  this.scale = scale;
@@ -115,6 +126,9 @@ class LogScale extends LinearScale {
115
126
  }
116
127
  }
117
128
  class TimeLinearScale extends Scale {
129
+ type;
130
+ scale;
131
+ axisProps;
118
132
  constructor(scale, axisProps) {
119
133
  super(scale);
120
134
  this.scale = scale;
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../../scripts/build/transpile/react-shim.js", "../../../../../src/graphs/Chart/scales/index.tsx"],
4
4
  "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport type { ScaleBand, ScaleLinear, ScaleLogarithmic, ScaleTime } from 'd3';\nimport type { DSChartT } from '../react-desc-prop-types.js';\nimport { timeFormat, format, utcDay, utcMonth, utcWeek, utcYear } from 'd3';\n\nexport const AXIS_TYPE = {\n BAND: 'BAND',\n LINEAR: 'LINEAR',\n DATETIME: 'DATETIME',\n LOG: 'LOG',\n} as const;\n\nconst getInterval = (interval?: string) => {\n switch (interval) {\n case 'DAY':\n return utcDay;\n case 'MONTH':\n return utcMonth;\n case 'WEEK':\n return utcWeek;\n case 'YEAR':\n return utcYear;\n default:\n return null;\n }\n};\n\nexport class Scale {\n scale: ScaleBand<string> | ScaleLinear<number, number, never> | ScaleTime<number, number, never>;\n\n type: string;\n\n constructor(scale: ScaleBand<string> | ScaleLinear<number, number, never> | ScaleTime<number, number, never>) {\n this.type = '';\n this.scale = scale;\n }\n\n getBandwidth() {\n return 0;\n }\n}\nexport class BandScale extends Scale {\n type: keyof typeof AXIS_TYPE;\n\n scale: ScaleBand<string>;\n\n axisProps: DSChartT.AxisT;\n\n constructor(scale: ScaleBand<string>, axisProps: DSChartT.AxisT) {\n super(scale);\n this.scale = scale;\n this.type = 'BAND';\n this.axisProps = axisProps;\n }\n\n get(value: string) {\n if (typeof value !== 'string') return 0;\n return this.scale(value);\n }\n\n getTicks() {\n return this.scale.domain();\n }\n\n getTickFormatted(t: number | string | Date) {\n if (typeof t !== 'string') return t;\n if (typeof this.axisProps?.tick?.tickFormat === 'function') {\n return this.axisProps?.tick?.tickFormat(t);\n }\n return t;\n }\n\n getTicksScaled() {\n return this.scale.domain().map((d) => (this.get(d) ?? 0) + this.getBandwidth() / 2);\n }\n\n getBandwidth() {\n return this.scale.bandwidth();\n }\n}\n\nexport class LinearScale extends Scale {\n type: keyof typeof AXIS_TYPE;\n\n scale: ScaleLinear<number, number, never>;\n\n axisProps: DSChartT.AxisT;\n\n constructor(scale: ScaleLinear<number, number, never>, axisProps: DSChartT.AxisT) {\n super(scale);\n this.scale = scale;\n this.type = 'LINEAR';\n this.axisProps = axisProps;\n }\n\n get(value: number) {\n if (typeof value !== 'number') return 0;\n return this.scale(value);\n }\n\n getTickFormatted(t: number | string | Date) {\n if (typeof t !== 'number') return t.toString();\n if (typeof this.axisProps?.tick?.tickFormat === 'function') {\n return this.axisProps?.tick?.tickFormat(t);\n }\n if (typeof this.axisProps?.tick?.tickFormat === 'string') {\n return format(this.axisProps?.tick?.tickFormat)(t);\n }\n return t.toString();\n }\n\n getTicks(dimension: number) {\n const ticks = this.scale.ticks?.(this.axisProps?.tick?.tickCount ?? Math.ceil(dimension / 80));\n if (this.axisProps?.tick?.tickValues) {\n if (this.axisProps?.tick?.overwriteTicks) return this.axisProps?.tick?.tickValues;\n this.axisProps?.tick?.tickValues.forEach((t) => {\n if (typeof t !== 'number') return;\n const isTickAlreadyPresent = ticks.find((tick) => tick === t);\n if (isTickAlreadyPresent) return;\n ticks.push(t);\n });\n }\n return ticks;\n }\n\n getTicksScaled(dimension: number) {\n const ticks = this.getTicks(dimension);\n return ticks.map((t) => (typeof t === 'number' ? this.get(t) : 0));\n }\n}\n\nexport class LogScale extends LinearScale {\n type: keyof typeof AXIS_TYPE;\n\n scale: ScaleLogarithmic<number, number, never>;\n\n axisProps: DSChartT.AxisT;\n\n constructor(scale: ScaleLogarithmic<number, number, never>, axisProps: DSChartT.AxisT) {\n super(scale, axisProps);\n this.scale = scale;\n this.type = 'LOG';\n this.axisProps = axisProps;\n }\n\n getTickFormatted(t: number | string | Date) {\n if (typeof t !== 'number') return t.toString();\n if (typeof this.axisProps?.tick?.tickFormat === 'function') {\n return this.axisProps?.tick?.tickFormat(t);\n }\n if (typeof this.axisProps?.tick?.tickFormat === 'string') {\n return format(this.axisProps?.tick?.tickFormat)(t);\n }\n return format('~s')(t);\n }\n}\n\nexport class TimeLinearScale extends Scale {\n type: keyof typeof AXIS_TYPE;\n\n scale: ScaleTime<number, number, never>;\n\n axisProps: DSChartT.AxisT;\n\n constructor(scale: ScaleTime<number, number, never>, axisProps: DSChartT.AxisT) {\n super(scale);\n this.scale = scale;\n this.type = 'DATETIME';\n this.axisProps = axisProps;\n }\n\n get(value: Date) {\n if (typeof value !== 'object') return 0;\n return this.scale(value);\n }\n\n getTickFormatted(t: number | string | Date) {\n if (typeof t !== 'object') return t.toString();\n if (typeof this.axisProps?.tick?.tickFormat === 'function') {\n return this.axisProps?.tick?.tickFormat(t);\n }\n if (typeof this.axisProps?.tick?.tickFormat === 'string') {\n return timeFormat(this.axisProps?.tick?.tickFormat)(t);\n }\n return t.toString();\n }\n\n getTicks(dimension: number, intervalType?: string) {\n const interval = getInterval(intervalType);\n const finalTickConfig = interval || (this.axisProps?.tick?.tickCount ?? Math.ceil(dimension / 80));\n const ticks = this.scale.ticks?.(finalTickConfig as number);\n const ticksValues = this.axisProps?.tick?.tickValues;\n if (ticksValues) {\n if (this.axisProps?.tick?.overwriteTicks) return ticksValues;\n const newTicks = [] as Date[];\n ticks.forEach((t) => {\n if (typeof t !== 'object') return;\n const exists = ticksValues.some(\n (tickValue) => typeof tickValue === 'object' && tickValue.getTime() === t.getTime(),\n );\n if (!exists) newTicks.push(t);\n });\n return [...newTicks, ...ticksValues];\n }\n return ticks;\n }\n\n getTicksScaled(dimension: number, intervalType?: string) {\n const ticks = this.getTicks(dimension, intervalType);\n return ticks.map((t) => (typeof t === 'object' ? this.get(t) : 0));\n }\n}\n\nexport type ScaleT = BandScale | LinearScale | TimeLinearScale;\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACGvB,SAAS,YAAY,QAAQ,QAAQ,UAAU,SAA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AA,EACnE;AACF;",
6
6
  "names": []
7
7
  }
@@ -35,10 +35,11 @@ const StyledGrid = styled("g")`
35
35
  opacity: 0.2;
36
36
  }
37
37
  `;
38
- const StyleFocusableRegion = styled("div")`
39
- width: ${({ s }) => s * 2}px;
40
- height: ${({ s }) => s * 2}px;
41
- :focus {
38
+ const StyleFocusableRegion = styled.div`
39
+ width: ${({ size = 1 }) => size * 2}px;
40
+ height: ${({ size = 1 }) => size * 2}px;
41
+ outline: none;
42
+ &:focus {
42
43
  outline: none;
43
44
  }
44
45
  `;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/graphs/Chart/styles.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { styled } from '@elliemae/ds-system';\n\ninterface StyledAxisT {\n axisColor: string;\n}\nexport const StyledSVGWrapper = styled.div<{ isGrabbed: boolean }>`\n rect:focus,\n rect:focus-visible,\n circle:focus,\n circle:focus-visible {\n outline: none;\n }\n\n :focus,\n :focus-visible {\n outline: none;\n }\n\n cursor: ${({ isGrabbed }) => (isGrabbed ? 'grabbing' : 'default')};\n\n text {\n font-size: 1rem;\n }\n\n min-width: 300px;\n`;\n\nexport const StyledAxis = styled('line')<StyledAxisT>`\n stroke-width: 2px;\n stroke: ${({ theme }) => theme.colors.neutral['700']};\n ${({ axisColor }) => (axisColor ? `stroke: ${axisColor}` : '')}\n`;\n\nexport const StyledAxisLabel = styled('text')`\n font-size: 1rem;\n font-weight: 600;\n`;\n\nexport const StyledGrid = styled('g')`\n line {\n opacity: 0.2;\n }\n`;\n\nexport const StyleFocusableRegion = styled('div')<{ s: number }>`\n width: ${({ s }) => s * 2 ?? '1'}px;\n height: ${({ s }) => s * 2 ?? '1'}px;\n :focus {\n outline: none;\n }\n`;\n\nexport const StyledLine = styled('path')`\n fill: none;\n stroke-width: 3;\n stroke-linejoin: round;\n`;\nexport const StyledArea = styled('path')`\n stroke-width: 3;\n stroke-linejoin: round;\n opacity: 0.2;\n`;\n\nexport const StyledTooltipContainer = styled.div`\n max-width: 350px;\n background-color: white;\n`;\n\nexport const StyledMouseOverDetectionBox = styled.div`\n position: absolute;\n top: -15px;\n right: -15px;\n width: calc(100% + 30px);\n height: calc(100% + 30px);\n z-index: -1;\n`;\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,cAAc;AAKhB,MAAM,mBAAmB,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAa3B,CAAC,EAAE,UAAU,MAAO,YAAY,aAAa,SAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAS5D,MAAM,aAAa,OAAO,MAAM;AAAA;AAAA,YAE3B,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA,IAClD,CAAC,EAAE,UAAU,MAAO,YAAY,WAAW,SAAS,KAAK,EAAG;AAAA;AAGzD,MAAM,kBAAkB,OAAO,MAAM;AAAA;AAAA;AAAA;AAKrC,MAAM,aAAa,OAAO,GAAG;AAAA;AAAA;AAAA;AAAA;AAM7B,MAAM,uBAAuB,OAAO,KAAK;AAAA,WACrC,CAAC,EAAE,EAAE,MAAM,IAAI,CAAQ;AAAA,YACtB,CAAC,EAAE,EAAE,MAAM,IAAI,CAAQ;AAAA;AAAA;AAAA;AAAA;AAM5B,MAAM,aAAa,OAAO,MAAM;AAAA;AAAA;AAAA;AAAA;AAKhC,MAAM,aAAa,OAAO,MAAM;AAAA;AAAA;AAAA;AAAA;AAMhC,MAAM,yBAAyB,OAAO;AAAA;AAAA;AAAA;AAKtC,MAAM,8BAA8B,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { styled } from '@elliemae/ds-system';\n\ninterface StyledAxisT {\n axisColor: string;\n}\nexport const StyledSVGWrapper = styled.div<{ isGrabbed: boolean }>`\n rect:focus,\n rect:focus-visible,\n circle:focus,\n circle:focus-visible {\n outline: none;\n }\n\n :focus,\n :focus-visible {\n outline: none;\n }\n\n cursor: ${({ isGrabbed }) => (isGrabbed ? 'grabbing' : 'default')};\n\n text {\n font-size: 1rem;\n }\n\n min-width: 300px;\n`;\n\nexport const StyledAxis = styled('line')<StyledAxisT>`\n stroke-width: 2px;\n stroke: ${({ theme }) => theme.colors.neutral['700']};\n ${({ axisColor }) => (axisColor ? `stroke: ${axisColor}` : '')}\n`;\n\nexport const StyledAxisLabel = styled('text')`\n font-size: 1rem;\n font-weight: 600;\n`;\n\nexport const StyledGrid = styled('g')`\n line {\n opacity: 0.2;\n }\n`;\n\nexport const StyleFocusableRegion = styled.div<{ size?: number }>`\n width: ${({ size = 1 }) => size * 2}px;\n height: ${({ size = 1 }) => size * 2}px;\n outline: none;\n &:focus {\n outline: none;\n }\n`;\n\nexport const StyledLine = styled('path')`\n fill: none;\n stroke-width: 3;\n stroke-linejoin: round;\n`;\nexport const StyledArea = styled('path')`\n stroke-width: 3;\n stroke-linejoin: round;\n opacity: 0.2;\n`;\n\nexport const StyledTooltipContainer = styled.div`\n max-width: 350px;\n background-color: white;\n`;\n\nexport const StyledMouseOverDetectionBox = styled.div`\n position: absolute;\n top: -15px;\n right: -15px;\n width: calc(100% + 30px);\n height: calc(100% + 30px);\n z-index: -1;\n`;\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,cAAc;AAKhB,MAAM,mBAAmB,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAa3B,CAAC,EAAE,UAAU,MAAO,YAAY,aAAa,SAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAS5D,MAAM,aAAa,OAAO,MAAM;AAAA;AAAA,YAE3B,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA,IAClD,CAAC,EAAE,UAAU,MAAO,YAAY,WAAW,SAAS,KAAK,EAAG;AAAA;AAGzD,MAAM,kBAAkB,OAAO,MAAM;AAAA;AAAA;AAAA;AAKrC,MAAM,aAAa,OAAO,GAAG;AAAA;AAAA;AAAA;AAAA;AAM7B,MAAM,uBAAuB,OAAO;AAAA,WAChC,CAAC,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAAA,YACzB,CAAC,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAO/B,MAAM,aAAa,OAAO,MAAM;AAAA;AAAA;AAAA;AAAA;AAKhC,MAAM,aAAa,OAAO,MAAM;AAAA;AAAA;AAAA;AAAA;AAMhC,MAAM,yBAAyB,OAAO;AAAA;AAAA;AAAA;AAKtC,MAAM,8BAA8B,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;",
6
6
  "names": []
7
7
  }
@@ -8,7 +8,7 @@ export declare const StyledAxis: import("styled-components").StyledComponent<"li
8
8
  export declare const StyledAxisLabel: import("styled-components").StyledComponent<"text", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"text">, never>;
9
9
  export declare const StyledGrid: import("styled-components").StyledComponent<"g", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"g">, never>;
10
10
  export declare const StyleFocusableRegion: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, {
11
- s: number;
11
+ size?: number | undefined;
12
12
  } & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"div">, never>;
13
13
  export declare const StyledLine: import("styled-components").StyledComponent<"path", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"path">, never>;
14
14
  export declare const StyledArea: import("styled-components").StyledComponent<"path", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"path">, never>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-dataviz",
3
- "version": "3.48.2-next.0",
3
+ "version": "3.49.0-beta.1",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - DataViz",
6
6
  "files": [
@@ -42,17 +42,17 @@
42
42
  "d3-time": "~3.1.0",
43
43
  "resize-observer-polyfill": "~1.5.1",
44
44
  "uid": "~2.0.2",
45
- "@elliemae/ds-grid": "3.48.2-next.0",
46
- "@elliemae/ds-props-helpers": "3.48.2-next.0",
47
- "@elliemae/ds-popperjs": "3.48.2-next.0",
48
- "@elliemae/ds-system": "3.48.2-next.0"
45
+ "@elliemae/ds-grid": "3.49.0-beta.1",
46
+ "@elliemae/ds-props-helpers": "3.49.0-beta.1",
47
+ "@elliemae/ds-popperjs": "3.49.0-beta.1",
48
+ "@elliemae/ds-system": "3.49.0-beta.1"
49
49
  },
50
50
  "devDependencies": {
51
51
  "@elliemae/pui-cli": "9.0.0-next.50",
52
52
  "@elliemae/pui-theme": "~2.10.0",
53
53
  "@types/d3": "~7.4.0",
54
54
  "styled-components": "~5.3.9",
55
- "@elliemae/ds-monorepo-devops": "3.48.2-next.0"
55
+ "@elliemae/ds-monorepo-devops": "3.49.0-beta.1"
56
56
  },
57
57
  "peerDependencies": {
58
58
  "@elliemae/pui-theme": "~2.10.0",