genesys-spark-chart-components 4.12.1-beta.1 → 4.29.1-beta.0

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 (90) hide show
  1. package/LICENSE +2 -2
  2. package/dist/cjs/app-globals-3a1e7e63.js +5 -0
  3. package/dist/cjs/genesys-chart-webcomponents.cjs.js +5 -3
  4. package/dist/cjs/gux-chart-column-beta.cjs.entry.js +124 -123
  5. package/dist/cjs/gux-chart-donut-beta.cjs.entry.js +213 -212
  6. package/dist/cjs/gux-chart-line-beta.cjs.entry.js +120 -119
  7. package/dist/cjs/gux-chart-pie-beta.cjs.entry.js +96 -95
  8. package/dist/cjs/gux-chart-scatter-plot-beta.cjs.entry.js +126 -125
  9. package/dist/cjs/gux-visualization-beta.cjs.entry.js +213 -213
  10. package/dist/cjs/{index-1e13a15f.js → index-a4712860.js} +185 -63
  11. package/dist/cjs/loader.cjs.js +4 -2
  12. package/dist/cjs/log-error-28c7064e.js +21 -0
  13. package/dist/cjs/{usage-30f04ec3.js → usage-c351d7fb.js} +63 -63
  14. package/dist/collection/collection-manifest.json +2 -2
  15. package/dist/collection/components/beta/gux-chart-column/gux-chart-column.js +324 -324
  16. package/dist/collection/components/beta/gux-chart-column/gux-chart-column.locale.js +88 -88
  17. package/dist/collection/components/beta/gux-chart-column/tests/gux-column-chart.spec.js +16 -16
  18. package/dist/collection/components/beta/gux-chart-donut/gux-chart-donut.js +550 -550
  19. package/dist/collection/components/beta/gux-chart-donut/tests/gux-chart-donut.spec.js +5 -5
  20. package/dist/collection/components/beta/gux-chart-line/gux-chart-line.js +375 -375
  21. package/dist/collection/components/beta/gux-chart-line/gux-chart-line.locale.js +88 -88
  22. package/dist/collection/components/beta/gux-chart-line/tests/gux-chart-line.e2e.js +13 -13
  23. package/dist/collection/components/beta/gux-chart-line/tests/gux-chart-line.spec.js +16 -16
  24. package/dist/collection/components/beta/gux-chart-pie/gux-chart-pie.js +266 -266
  25. package/dist/collection/components/beta/gux-chart-pie/tests/gux-chart-pie.spec.js +5 -5
  26. package/dist/collection/components/beta/gux-chart-scatter-plot/gux-chart-scatter-plot.js +347 -347
  27. package/dist/collection/components/beta/gux-chart-scatter-plot/tests/gux-chart-scatter-plot.spec.js +27 -27
  28. package/dist/collection/components/beta/gux-visualization/gux-visualization.js +133 -133
  29. package/dist/collection/components/beta/gux-visualization/gux-visualization.locale.js +88 -88
  30. package/dist/collection/components/beta/gux-visualization/tests/gux-visualization.e2e.js +25 -25
  31. package/dist/collection/components/beta/gux-visualization/tests/gux-visualization.spec.js +26 -26
  32. package/dist/collection/i18n/fetchResources.js +7 -7
  33. package/dist/collection/i18n/index.js +56 -56
  34. package/dist/collection/test/axeConfig.js +4 -4
  35. package/dist/collection/test/e2eTestUtils.js +14 -14
  36. package/dist/collection/test/specTestUtils.js +5 -5
  37. package/dist/collection/utils/dom/get-closest-element.js +12 -12
  38. package/dist/collection/utils/error/log-error.js +2 -2
  39. package/dist/collection/utils/theme/color-palette.js +10 -10
  40. package/dist/collection/utils/tracking/usage.js +47 -47
  41. package/dist/collection/utils/tracking/usage.spec.js +108 -108
  42. package/dist/esm/app-globals-0f993ce5.js +3 -0
  43. package/dist/esm/genesys-chart-webcomponents.js +6 -4
  44. package/dist/esm/gux-chart-column-beta.entry.js +124 -123
  45. package/dist/esm/gux-chart-donut-beta.entry.js +213 -212
  46. package/dist/esm/gux-chart-line-beta.entry.js +120 -119
  47. package/dist/esm/gux-chart-pie-beta.entry.js +96 -95
  48. package/dist/esm/gux-chart-scatter-plot-beta.entry.js +126 -125
  49. package/dist/esm/gux-visualization-beta.entry.js +213 -213
  50. package/dist/esm/{index-701d93cf.js → index-82fd7406.js} +185 -63
  51. package/dist/esm/loader.js +5 -3
  52. package/dist/esm/log-error-ff9bdda4.js +18 -0
  53. package/dist/esm/{usage-61eee3bd.js → usage-6655c04e.js} +63 -63
  54. package/dist/genesys-chart-webcomponents/genesys-chart-webcomponents.css +1 -1
  55. package/dist/genesys-chart-webcomponents/genesys-chart-webcomponents.esm.js +1 -1
  56. package/dist/genesys-chart-webcomponents/p-1bc0cc3a.js +2 -0
  57. package/dist/genesys-chart-webcomponents/{p-d4a346df.entry.js → p-291b128b.entry.js} +1 -1
  58. package/dist/genesys-chart-webcomponents/p-51f2502a.entry.js +11 -0
  59. package/dist/genesys-chart-webcomponents/{p-137f5b8f.entry.js → p-64f0b385.entry.js} +1 -1
  60. package/dist/genesys-chart-webcomponents/{p-b5179379.entry.js → p-65020b8a.entry.js} +1 -1
  61. package/dist/genesys-chart-webcomponents/{p-d9928f8c.entry.js → p-83283e73.entry.js} +1 -1
  62. package/dist/genesys-chart-webcomponents/p-e1255160.js +1 -0
  63. package/dist/genesys-chart-webcomponents/{p-c3aa8578.entry.js → p-e42dd3ba.entry.js} +1 -1
  64. package/dist/genesys-chart-webcomponents/{p-97c45977.js → p-f6832775.js} +1 -1
  65. package/dist/stencil-wrapper.js +1 -1
  66. package/dist/types/components/beta/gux-chart-column/gux-chart-column.d.ts +45 -45
  67. package/dist/types/components/beta/gux-chart-column/gux-chart-column.locale.d.ts +20 -20
  68. package/dist/types/components/beta/gux-chart-donut/gux-chart-donut.d.ts +30 -30
  69. package/dist/types/components/beta/gux-chart-line/gux-chart-line.d.ts +44 -44
  70. package/dist/types/components/beta/gux-chart-line/gux-chart-line.locale.d.ts +20 -20
  71. package/dist/types/components/beta/gux-chart-pie/gux-chart-pie.d.ts +19 -19
  72. package/dist/types/components/beta/gux-chart-scatter-plot/gux-chart-scatter-plot.d.ts +48 -48
  73. package/dist/types/components/beta/gux-visualization/gux-visualization.d.ts +13 -13
  74. package/dist/types/components/beta/gux-visualization/gux-visualization.locale.d.ts +20 -20
  75. package/dist/types/components.d.ts +12 -0
  76. package/dist/types/i18n/fetchResources.d.ts +3 -3
  77. package/dist/types/i18n/index.d.ts +1 -1
  78. package/dist/types/stencil-public-runtime.d.ts +10 -0
  79. package/dist/types/stencil-wrapper.d.ts +1 -1
  80. package/dist/types/test/axeConfig.d.ts +4 -4
  81. package/dist/types/test/e2eTestUtils.d.ts +4 -4
  82. package/dist/types/test/jestMatcherUtils.d.ts +4 -4
  83. package/dist/types/utils/tracking/usage.d.ts +11 -11
  84. package/package.json +24 -24
  85. package/dist/cjs/log-error-c46b4b4c.js +0 -21
  86. package/dist/component-specs.json +0 -187
  87. package/dist/esm/log-error-0fc61f6f.js +0 -18
  88. package/dist/genesys-chart-webcomponents/p-3e4b3dbc.js +0 -2
  89. package/dist/genesys-chart-webcomponents/p-b901e9e0.entry.js +0 -11
  90. /package/dist/genesys-chart-webcomponents/{p-82f0ea01.js → p-f50e3789.js} +0 -0
@@ -1,139 +1,140 @@
1
- import { r as registerInstance, h, g as getElement } from './index-701d93cf.js';
2
- import { t as trackComponent } from './usage-61eee3bd.js';
3
- import { V as VISUALIZATION_COLORS, l as logError } from './log-error-0fc61f6f.js';
1
+ import { r as registerInstance, h, g as getElement } from './index-82fd7406.js';
2
+ import { t as trackComponent } from './usage-6655c04e.js';
3
+ import { V as VISUALIZATION_COLORS, l as logError } from './log-error-ff9bdda4.js';
4
4
 
5
5
  const guxChartScatterPlotCss = "gux-visualization-beta{height:fit-content;color:#2e394c}";
6
+ const GuxChartScatterPlotBetaStyle0 = guxChartScatterPlotCss;
6
7
 
7
8
  const DEFAULT_COLOR_FIELD_NAME = 'category';
8
9
  const GuxScatterPlotChart = class {
9
- constructor(hostRef) {
10
- registerInstance(this, hostRef);
11
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
12
- this.baseChartSpec = {
13
- $schema: 'https://vega.github.io/schema/vega-lite/v5.json',
14
- params: [
15
- {
16
- name: 'onHover',
17
- select: { type: 'point', on: 'mouseover' }
10
+ constructor(hostRef) {
11
+ registerInstance(this, hostRef);
12
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
13
+ this.baseChartSpec = {
14
+ $schema: 'https://vega.github.io/schema/vega-lite/v5.json',
15
+ params: [
16
+ {
17
+ name: 'onHover',
18
+ select: { type: 'point', on: 'mouseover' }
19
+ }
20
+ ],
21
+ config: {
22
+ axis: {
23
+ ticks: false,
24
+ titlePadding: 8,
25
+ gridColor: '#F6F7F9'
26
+ },
27
+ axisX: {
28
+ labelAngle: 0,
29
+ grid: true
30
+ },
31
+ legend: {
32
+ symbolType: 'circle'
33
+ }
34
+ },
35
+ width: { step: 40 },
36
+ encoding: {
37
+ x: { type: 'nominal' },
38
+ y: { type: 'quantitative' },
39
+ color: {
40
+ field: DEFAULT_COLOR_FIELD_NAME,
41
+ type: 'nominal',
42
+ scale: { range: VISUALIZATION_COLORS },
43
+ legend: null
44
+ },
45
+ size: {
46
+ condition: [
47
+ {
48
+ param: 'onHover',
49
+ empty: false,
50
+ value: 100
51
+ }
52
+ ],
53
+ value: 40
54
+ }
55
+ }
56
+ };
57
+ this.chartData = undefined;
58
+ this.xTickLabelSlant = undefined;
59
+ this.includeLegend = undefined;
60
+ this.legendPosition = 'right';
61
+ this.xFieldName = undefined;
62
+ this.xAxisTitle = undefined;
63
+ this.yFieldName = undefined;
64
+ this.yAxisTitle = undefined;
65
+ this.legendTitle = undefined;
66
+ this.colorFieldName = undefined;
67
+ this.useShape = undefined;
68
+ this.embedOptions = undefined;
69
+ }
70
+ parseData() {
71
+ if (!this.xFieldName || !this.yFieldName) {
72
+ logError(this.root, 'requires x-field-name and y-field-name');
18
73
  }
19
- ],
20
- config: {
21
- axis: {
22
- ticks: false,
23
- titlePadding: 8,
24
- gridColor: '#F6F7F9'
25
- },
26
- axisX: {
27
- labelAngle: 0,
28
- grid: true
29
- },
30
- legend: {
31
- symbolType: 'circle'
74
+ let chartData = {};
75
+ if (this.chartData) {
76
+ chartData = { data: this.chartData };
32
77
  }
33
- },
34
- width: { step: 40 },
35
- encoding: {
36
- x: { type: 'nominal' },
37
- y: { type: 'quantitative' },
38
- color: {
39
- field: DEFAULT_COLOR_FIELD_NAME,
40
- type: 'nominal',
41
- scale: { range: VISUALIZATION_COLORS },
42
- legend: null
43
- },
44
- size: {
45
- condition: [
46
- {
47
- param: 'onHover',
48
- empty: false,
49
- value: 100
50
- }
51
- ],
52
- value: 40
78
+ if (this.xTickLabelSlant) {
79
+ this.baseChartSpec.config.axisX.labelAngle = -45;
53
80
  }
54
- }
55
- };
56
- this.chartData = undefined;
57
- this.xTickLabelSlant = undefined;
58
- this.includeLegend = undefined;
59
- this.legendPosition = 'right';
60
- this.xFieldName = undefined;
61
- this.xAxisTitle = undefined;
62
- this.yFieldName = undefined;
63
- this.yAxisTitle = undefined;
64
- this.legendTitle = undefined;
65
- this.colorFieldName = undefined;
66
- this.useShape = undefined;
67
- this.embedOptions = undefined;
68
- }
69
- parseData() {
70
- if (!this.xFieldName || !this.yFieldName) {
71
- logError(this.root, 'requires x-field-name and y-field-name');
72
- }
73
- let chartData = {};
74
- if (this.chartData) {
75
- chartData = { data: this.chartData };
76
- }
77
- if (this.xTickLabelSlant) {
78
- this.baseChartSpec.config.axisX.labelAngle = -45;
79
- }
80
- if (this.legendPosition) {
81
- this.baseChartSpec.config.legend.orient = this.legendPosition;
82
- }
83
- const xFieldName = this.xFieldName;
84
- const xAxisTitle = this.xAxisTitle;
85
- const yFieldName = this.yFieldName;
86
- const yAxisTitle = this.yAxisTitle;
87
- const legendTitle = this.legendTitle;
88
- const useShape = this.useShape || 'circle';
89
- const colorFieldName = this.colorFieldName || DEFAULT_COLOR_FIELD_NAME;
90
- if (this.includeLegend) {
91
- this.baseChartSpec.encoding.color.legend = true;
92
- }
93
- if (xFieldName) {
94
- this.baseChartSpec.encoding.x.field = xFieldName;
95
- }
96
- if (xAxisTitle) {
97
- this.baseChartSpec.encoding.x.title = xAxisTitle;
98
- }
99
- if (yFieldName) {
100
- this.baseChartSpec.encoding.y.field = yFieldName;
101
- }
102
- if (yAxisTitle) {
103
- this.baseChartSpec.encoding.y.title = yAxisTitle;
81
+ if (this.legendPosition) {
82
+ this.baseChartSpec.config.legend.orient = this.legendPosition;
83
+ }
84
+ const xFieldName = this.xFieldName;
85
+ const xAxisTitle = this.xAxisTitle;
86
+ const yFieldName = this.yFieldName;
87
+ const yAxisTitle = this.yAxisTitle;
88
+ const legendTitle = this.legendTitle;
89
+ const useShape = this.useShape || 'circle';
90
+ const colorFieldName = this.colorFieldName || DEFAULT_COLOR_FIELD_NAME;
91
+ if (this.includeLegend) {
92
+ this.baseChartSpec.encoding.color.legend = true;
93
+ }
94
+ if (xFieldName) {
95
+ this.baseChartSpec.encoding.x.field = xFieldName;
96
+ }
97
+ if (xAxisTitle) {
98
+ this.baseChartSpec.encoding.x.title = xAxisTitle;
99
+ }
100
+ if (yFieldName) {
101
+ this.baseChartSpec.encoding.y.field = yFieldName;
102
+ }
103
+ if (yAxisTitle) {
104
+ this.baseChartSpec.encoding.y.title = yAxisTitle;
105
+ }
106
+ if (colorFieldName) {
107
+ this.baseChartSpec.encoding.color.field = colorFieldName;
108
+ }
109
+ if (legendTitle) {
110
+ this.baseChartSpec.encoding.color.title = legendTitle;
111
+ }
112
+ this.baseChartSpec.mark = { type: useShape, filled: true };
113
+ this.baseChartSpec.config.legend.symbolType = useShape;
114
+ this.baseChartSpec.encoding.shape = {
115
+ field: colorFieldName,
116
+ type: 'nominal'
117
+ };
118
+ this.baseChartSpec.encoding.tooltip = [
119
+ { field: xFieldName, type: 'nominal', title: xAxisTitle },
120
+ { field: yFieldName, type: 'quantitative', title: yAxisTitle },
121
+ { field: colorFieldName, type: 'nominal', title: legendTitle }
122
+ ];
123
+ const spec = Object.assign(this.baseChartSpec, chartData);
124
+ this.visualizationSpec = spec;
104
125
  }
105
- if (colorFieldName) {
106
- this.baseChartSpec.encoding.color.field = colorFieldName;
126
+ componentWillLoad() {
127
+ trackComponent(this.root);
128
+ this.parseData();
107
129
  }
108
- if (legendTitle) {
109
- this.baseChartSpec.encoding.color.title = legendTitle;
130
+ render() {
131
+ return (h("gux-visualization-beta", { key: '94b4f927328d22a8764207acdd36cb8bef342ea0', visualizationSpec: this.visualizationSpec }));
110
132
  }
111
- this.baseChartSpec.mark = { type: useShape, filled: true };
112
- this.baseChartSpec.config.legend.symbolType = useShape;
113
- this.baseChartSpec.encoding.shape = {
114
- field: colorFieldName,
115
- type: 'nominal'
116
- };
117
- this.baseChartSpec.encoding.tooltip = [
118
- { field: xFieldName, type: 'nominal', title: xAxisTitle },
119
- { field: yFieldName, type: 'quantitative', title: yAxisTitle },
120
- { field: colorFieldName, type: 'nominal', title: legendTitle }
121
- ];
122
- const spec = Object.assign(this.baseChartSpec, chartData);
123
- this.visualizationSpec = spec;
124
- }
125
- componentWillLoad() {
126
- trackComponent(this.root);
127
- this.parseData();
128
- }
129
- render() {
130
- return (h("gux-visualization-beta", { visualizationSpec: this.visualizationSpec }));
131
- }
132
- get root() { return getElement(this); }
133
- static get watchers() { return {
134
- "chartData": ["parseData"]
135
- }; }
133
+ get root() { return getElement(this); }
134
+ static get watchers() { return {
135
+ "chartData": ["parseData"]
136
+ }; }
136
137
  };
137
- GuxScatterPlotChart.style = guxChartScatterPlotCss;
138
+ GuxScatterPlotChart.style = GuxChartScatterPlotBetaStyle0;
138
139
 
139
140
  export { GuxScatterPlotChart as gux_chart_scatter_plot_beta };