genesys-spark-chart-components 4.82.0 → 4.83.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.
- package/dist/cjs/{color-palette-aa165953.js → color-palette-7ff76714.js} +6 -7
- package/dist/cjs/genesys-chart-webcomponents.cjs.js +9 -9
- package/dist/cjs/gux-chart-column-beta.cjs.entry.js +2 -2
- package/dist/cjs/gux-chart-donut-beta.cjs.entry.js +2 -2
- package/dist/cjs/gux-chart-line-beta.cjs.entry.js +2 -2
- package/dist/cjs/gux-chart-pie-beta.cjs.entry.js +2 -2
- package/dist/cjs/gux-chart-scatter-plot-beta.cjs.entry.js +2 -2
- package/dist/cjs/gux-visualization-beta.cjs.entry.js +4 -4
- package/dist/cjs/index-817704d9.js +1198 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/beta/gux-visualization/gux-visualization.js +2 -2
- package/dist/collection/test/setupAxeTests.js +3 -11
- package/dist/esm/{color-palette-9cf471d5.js → color-palette-883bdc64.js} +6 -7
- package/dist/esm/genesys-chart-webcomponents.js +10 -10
- package/dist/esm/gux-chart-column-beta.entry.js +2 -2
- package/dist/esm/gux-chart-donut-beta.entry.js +2 -2
- package/dist/esm/gux-chart-line-beta.entry.js +2 -2
- package/dist/esm/gux-chart-pie-beta.entry.js +2 -2
- package/dist/esm/gux-chart-scatter-plot-beta.entry.js +2 -2
- package/dist/esm/gux-visualization-beta.entry.js +4 -4
- package/dist/esm/index-e1e997ee.js +1170 -0
- package/dist/esm/loader.js +2 -2
- package/dist/genesys-chart-webcomponents/genesys-chart-webcomponents.esm.js +1 -1
- package/dist/genesys-chart-webcomponents/{p-4eec02be.entry.js → p-2ec9eae2.entry.js} +1 -1
- package/dist/genesys-chart-webcomponents/{p-c9f85c67.entry.js → p-3e724248.entry.js} +1 -1
- package/dist/genesys-chart-webcomponents/{p-5c1fa076.entry.js → p-58f41069.entry.js} +2 -2
- package/dist/genesys-chart-webcomponents/{p-c538ac76.entry.js → p-776540fb.entry.js} +1 -1
- package/dist/genesys-chart-webcomponents/p-7f2ebcdb.js +2 -0
- package/dist/genesys-chart-webcomponents/{p-a7bc85cd.js → p-b836a7d3.js} +1 -1
- package/dist/genesys-chart-webcomponents/{p-464f1055.entry.js → p-c690f202.entry.js} +1 -1
- package/dist/genesys-chart-webcomponents/{p-f87517c1.entry.js → p-ff2fd38a.entry.js} +1 -1
- package/dist/loader/cdn.js +1 -3
- package/dist/loader/index.cjs.js +1 -3
- package/dist/loader/index.d.ts +3 -0
- package/dist/loader/index.es2017.js +1 -3
- package/dist/loader/index.js +1 -3
- package/dist/stencil-wrapper.js +1 -1
- package/dist/types/stencil-public-runtime.d.ts +3 -10
- package/dist/types/stencil-wrapper.d.ts +1 -1
- package/package.json +6 -7
- package/dist/cjs/index-95713c33.js +0 -1795
- package/dist/collection/components/beta/gux-chart-column/tests/gux-column-chart.spec.js +0 -22
- package/dist/collection/components/beta/gux-chart-donut/tests/gux-chart-donut.spec.js +0 -11
- package/dist/collection/components/beta/gux-chart-line/tests/gux-chart-line.e2e.js +0 -17
- package/dist/collection/components/beta/gux-chart-line/tests/gux-chart-line.spec.js +0 -22
- package/dist/collection/components/beta/gux-chart-pie/tests/gux-chart-pie.spec.js +0 -11
- package/dist/collection/components/beta/gux-chart-scatter-plot/tests/gux-chart-scatter-plot.spec.js +0 -33
- package/dist/collection/components/beta/gux-visualization/tests/gux-visualization.e2e.js +0 -31
- package/dist/collection/components/beta/gux-visualization/tests/gux-visualization.spec.js +0 -35
- package/dist/collection/utils/tracking/usage.spec.js +0 -121
- package/dist/esm/index-e4944b0d.js +0 -1767
- package/dist/esm/polyfills/core-js.js +0 -11
- package/dist/esm/polyfills/dom.js +0 -79
- package/dist/esm/polyfills/es5-html-element.js +0 -1
- package/dist/esm/polyfills/index.js +0 -34
- package/dist/esm/polyfills/system.js +0 -6
- package/dist/genesys-chart-webcomponents/p-e068d41d.js +0 -2
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { newSpecPage } from "../../../../test/specTestUtils";
|
|
2
|
-
import { GuxColumnChart } from "../gux-chart-column";
|
|
3
|
-
const components = [GuxColumnChart];
|
|
4
|
-
const language = 'en';
|
|
5
|
-
describe('gux-chart-column-beta', () => {
|
|
6
|
-
it('should build', async () => {
|
|
7
|
-
const html = '<gux-chart-column-beta x-field-name="date" y-field-name="value"></gux-chart-column-beta>';
|
|
8
|
-
const page = await newSpecPage({ components, html, language });
|
|
9
|
-
expect(page.rootInstance).toBeInstanceOf(GuxColumnChart);
|
|
10
|
-
});
|
|
11
|
-
it('should reflect user option to make slant x axis tick labels', async () => {
|
|
12
|
-
let html = '<gux-chart-column-beta x-field-name="date" y-field-name="value"></gux-chart-column-beta>';
|
|
13
|
-
let page = await newSpecPage({ components, html, language });
|
|
14
|
-
expect(page.rootInstance.xTickLabelSlant).toBeUndefined();
|
|
15
|
-
expect(page.rootInstance.baseChartSpec.config.axisX.labelAngle).toBe(0);
|
|
16
|
-
html =
|
|
17
|
-
'<gux-chart-column-beta x-field-name="date" y-field-name="value" x-tick-label-slant="true"></gux-chart-column-beta>';
|
|
18
|
-
page = await newSpecPage({ components, html, language });
|
|
19
|
-
expect(page.rootInstance.xTickLabelSlant).toBeTruthy();
|
|
20
|
-
expect(page.rootInstance.baseChartSpec.config.axisX.labelAngle).toBe(45);
|
|
21
|
-
});
|
|
22
|
-
});
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { newSpecPage } from "../../../../test/specTestUtils";
|
|
2
|
-
import { GuxDonutChart } from "../gux-chart-donut";
|
|
3
|
-
const components = [GuxDonutChart];
|
|
4
|
-
const language = 'en';
|
|
5
|
-
describe('gux-chart-donut-beta', () => {
|
|
6
|
-
it('should build', async () => {
|
|
7
|
-
const html = '<gux-chart-donut-beta inner-radius="20" outer-radius="80"></gux-chart-donut-beta>';
|
|
8
|
-
const page = await newSpecPage({ components, html, language });
|
|
9
|
-
expect(page.rootInstance).toBeInstanceOf(GuxDonutChart);
|
|
10
|
-
});
|
|
11
|
-
});
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { newE2EPage } from "@stencil/core/testing";
|
|
2
|
-
describe('gux-chart-line-beta', () => {
|
|
3
|
-
describe('#render', () => {
|
|
4
|
-
[
|
|
5
|
-
{
|
|
6
|
-
description: 'should render chart',
|
|
7
|
-
html: '<gux-chart-line-beta x-field-name="date" y-field-name="value"></gux-chart-line-beta>'
|
|
8
|
-
}
|
|
9
|
-
].forEach(({ description, html }) => {
|
|
10
|
-
it(description, async () => {
|
|
11
|
-
const page = await newE2EPage({ html });
|
|
12
|
-
const element = await page.find('gux-chart-line-beta');
|
|
13
|
-
expect(element.outerHTML).toMatchSnapshot();
|
|
14
|
-
});
|
|
15
|
-
});
|
|
16
|
-
});
|
|
17
|
-
});
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { newSpecPage } from "../../../../test/specTestUtils";
|
|
2
|
-
import { GuxLineChart } from "../gux-chart-line";
|
|
3
|
-
const components = [GuxLineChart];
|
|
4
|
-
const language = 'en';
|
|
5
|
-
describe('gux-chart-line-beta', () => {
|
|
6
|
-
it('should build', async () => {
|
|
7
|
-
const html = '<gux-chart-line-beta x-field-name="date" y-field-name="value"></gux-chart-line-beta>';
|
|
8
|
-
const page = await newSpecPage({ components, html, language });
|
|
9
|
-
expect(page.rootInstance).toBeInstanceOf(GuxLineChart);
|
|
10
|
-
});
|
|
11
|
-
it('should reflect user option to make slant x axis tick labels', async () => {
|
|
12
|
-
let html = '<gux-chart-line-beta x-field-name="date" y-field-name="value"></gux-chart-line-beta>';
|
|
13
|
-
let page = await newSpecPage({ components, html, language });
|
|
14
|
-
expect(page.rootInstance.xTickLabelSlant).toBeUndefined();
|
|
15
|
-
expect(page.rootInstance.baseChartSpec.config.axisX.labelAngle).toBe(0);
|
|
16
|
-
html =
|
|
17
|
-
'<gux-chart-line-beta x-field-name="date" y-field-name="value" x-tick-label-slant="true"></gux-chart-line-beta>';
|
|
18
|
-
page = await newSpecPage({ components, html, language });
|
|
19
|
-
expect(page.rootInstance.xTickLabelSlant).toBeTruthy();
|
|
20
|
-
expect(page.rootInstance.baseChartSpec.config.axisX.labelAngle).toBe(45);
|
|
21
|
-
});
|
|
22
|
-
});
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { newSpecPage } from "../../../../test/specTestUtils";
|
|
2
|
-
import { GuxPieChart } from "../gux-chart-pie";
|
|
3
|
-
const components = [GuxPieChart];
|
|
4
|
-
const language = 'en';
|
|
5
|
-
describe('gux-chart-pie-beta', () => {
|
|
6
|
-
it('should build', async () => {
|
|
7
|
-
const html = '<gux-chart-pie-beta outer-radius="80"></gux-chart-pie-beta>';
|
|
8
|
-
const page = await newSpecPage({ components, html, language });
|
|
9
|
-
expect(page.rootInstance).toBeInstanceOf(GuxPieChart);
|
|
10
|
-
});
|
|
11
|
-
});
|
package/dist/collection/components/beta/gux-chart-scatter-plot/tests/gux-chart-scatter-plot.spec.js
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { newSpecPage } from "../../../../test/specTestUtils";
|
|
2
|
-
import { GuxScatterPlotChart } from "../gux-chart-scatter-plot";
|
|
3
|
-
const components = [GuxScatterPlotChart];
|
|
4
|
-
const language = 'en';
|
|
5
|
-
describe('gux-chart-scatter-plot-beta', () => {
|
|
6
|
-
it('should build', async () => {
|
|
7
|
-
const html = '<gux-chart-scatter-plot-beta x-field-name="date" y-field-name="value"></gux-chart-scatter-plot-beta>';
|
|
8
|
-
const page = await newSpecPage({ components, html, language });
|
|
9
|
-
expect(page.rootInstance).toBeInstanceOf(GuxScatterPlotChart);
|
|
10
|
-
});
|
|
11
|
-
it('should reflect the shape user has chosen', async () => {
|
|
12
|
-
let html = '<gux-chart-scatter-plot-beta x-field-name="date" y-field-name="value"></gux-chart-scatter-plot-beta>';
|
|
13
|
-
let page = await newSpecPage({ components, html, language });
|
|
14
|
-
expect(page.rootInstance.useShape).toBeUndefined();
|
|
15
|
-
expect(page.rootInstance.baseChartSpec.mark.type).toBe('circle');
|
|
16
|
-
html =
|
|
17
|
-
'<gux-chart-scatter-plot-beta x-field-name="date" y-field-name="value" use-shape="square"></gux-chart-scatter-plot-beta>';
|
|
18
|
-
page = await newSpecPage({ components, html, language });
|
|
19
|
-
expect(page.rootInstance.useShape).toBeTruthy();
|
|
20
|
-
expect(page.rootInstance.baseChartSpec.mark.type).toBe('square');
|
|
21
|
-
});
|
|
22
|
-
it('should reflect user option to make slant x axis tick labels', async () => {
|
|
23
|
-
let html = '<gux-chart-scatter-plot-beta x-field-name="date" y-field-name="value"></gux-chart-scatter-plot-beta>';
|
|
24
|
-
let page = await newSpecPage({ components, html, language });
|
|
25
|
-
expect(page.rootInstance.xTickLabelSlant).toBeUndefined();
|
|
26
|
-
expect(page.rootInstance.baseChartSpec.config.axisX.labelAngle).toBe(0);
|
|
27
|
-
html =
|
|
28
|
-
'<gux-chart-scatter-plot-beta x-field-name="date" y-field-name="value" x-tick-label-slant="true"></gux-chart-scatter-plot-beta>';
|
|
29
|
-
page = await newSpecPage({ components, html, language });
|
|
30
|
-
expect(page.rootInstance.xTickLabelSlant).toBeTruthy();
|
|
31
|
-
expect(page.rootInstance.baseChartSpec.config.axisX.labelAngle).toBe(-45);
|
|
32
|
-
});
|
|
33
|
-
});
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { newE2EPage } from "@stencil/core/testing";
|
|
2
|
-
const visualizationSpecLine = {
|
|
3
|
-
$schema: 'https://vega.github.io/schema/vega-lite/v5.json',
|
|
4
|
-
data: { url: 'https://vega.github.io/editor/data/seattle-weather.csv' },
|
|
5
|
-
mark: {
|
|
6
|
-
type: 'line',
|
|
7
|
-
interpolate: 'monotone'
|
|
8
|
-
},
|
|
9
|
-
encoding: {
|
|
10
|
-
x: { timeUnit: 'month', field: 'date', bandPosition: 0.5 },
|
|
11
|
-
y: { aggregate: 'mean', field: 'temp_max' }
|
|
12
|
-
}
|
|
13
|
-
};
|
|
14
|
-
describe('gux-visualization-beta', () => {
|
|
15
|
-
describe('#render', () => {
|
|
16
|
-
[
|
|
17
|
-
{
|
|
18
|
-
description: 'should render default button',
|
|
19
|
-
html: '<gux-visualization-beta lang="en" id="visualization-1"></gux-visualization-beta>'
|
|
20
|
-
}
|
|
21
|
-
].forEach(({ description, html }) => {
|
|
22
|
-
it(description, async () => {
|
|
23
|
-
const page = await newE2EPage({ html });
|
|
24
|
-
const element = (await page.find('gux-visualization-beta'));
|
|
25
|
-
element.visualizationSpec = visualizationSpecLine;
|
|
26
|
-
await page.waitForChanges();
|
|
27
|
-
expect(element.outerHTML).toMatchSnapshot();
|
|
28
|
-
});
|
|
29
|
-
});
|
|
30
|
-
});
|
|
31
|
-
});
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { newSpecPage } from "../../../../test/specTestUtils";
|
|
2
|
-
import { GuxVisualization } from "../gux-visualization";
|
|
3
|
-
const components = [GuxVisualization];
|
|
4
|
-
const language = 'en';
|
|
5
|
-
const visualizationSpecLine = {
|
|
6
|
-
$schema: 'https://vega.github.io/schema/vega-lite/v5.json',
|
|
7
|
-
data: { url: 'https://vega.github.io/editor/data/seattle-weather.csv' },
|
|
8
|
-
mark: {
|
|
9
|
-
type: 'line',
|
|
10
|
-
interpolate: 'monotone'
|
|
11
|
-
},
|
|
12
|
-
encoding: {
|
|
13
|
-
x: { timeUnit: 'month', field: 'date', bandPosition: 0.5 },
|
|
14
|
-
y: { aggregate: 'mean', field: 'temp_max' }
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
describe.skip('gux-visualization-beta', () => {
|
|
18
|
-
describe('#render', () => {
|
|
19
|
-
[
|
|
20
|
-
{
|
|
21
|
-
description: 'should render default button',
|
|
22
|
-
html: '<gux-visualization-beta></gux-visualization-beta>'
|
|
23
|
-
}
|
|
24
|
-
].forEach(({ description, html }) => {
|
|
25
|
-
it(description, async () => {
|
|
26
|
-
const page = await newSpecPage({ components, html, language });
|
|
27
|
-
const element = page.root;
|
|
28
|
-
element.visualizationSpec = visualizationSpecLine;
|
|
29
|
-
await page.waitForChanges();
|
|
30
|
-
expect(page.rootInstance).toBeInstanceOf(GuxVisualization);
|
|
31
|
-
expect(page.root).toMatchSnapshot();
|
|
32
|
-
});
|
|
33
|
-
});
|
|
34
|
-
});
|
|
35
|
-
});
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
import { trackComponent, trackAction, getVersionEvent } from "./usage";
|
|
2
|
-
import packageInfo from "../../../package.json";
|
|
3
|
-
const component = document.createElement('gux-button');
|
|
4
|
-
const addPageAction = jest.fn();
|
|
5
|
-
describe('tracking/usage', () => {
|
|
6
|
-
beforeAll(() => {
|
|
7
|
-
jest.useFakeTimers();
|
|
8
|
-
});
|
|
9
|
-
beforeEach(() => {
|
|
10
|
-
addPageAction.mockClear();
|
|
11
|
-
window.newrelic = {
|
|
12
|
-
addPageAction
|
|
13
|
-
};
|
|
14
|
-
window.document.contains = jest.fn().mockReturnValue(true);
|
|
15
|
-
});
|
|
16
|
-
describe('Component usage tracking', () => {
|
|
17
|
-
test("Doesn't throw when newrelic is not present", () => {
|
|
18
|
-
window.newrelic = undefined;
|
|
19
|
-
expect(() => {
|
|
20
|
-
trackComponent(component);
|
|
21
|
-
}).not.toThrow();
|
|
22
|
-
});
|
|
23
|
-
test('Logs the library after the first component loads', () => {
|
|
24
|
-
trackComponent(component);
|
|
25
|
-
jest.runOnlyPendingTimers();
|
|
26
|
-
expect(addPageAction).toHaveBeenCalledTimes(2);
|
|
27
|
-
expect(addPageAction.mock.calls[0][0]).toBe('spark-library');
|
|
28
|
-
const versionInfo = addPageAction.mock.calls[0][1];
|
|
29
|
-
expect(versionInfo.fullVersion).toBe(packageInfo.version);
|
|
30
|
-
expect(packageInfo.version.startsWith(versionInfo.majorVersion)).toBe(true);
|
|
31
|
-
expect(packageInfo.version.startsWith(versionInfo.minorVersion)).toBe(true);
|
|
32
|
-
});
|
|
33
|
-
test('Logs the tag name when a component is tracked', () => {
|
|
34
|
-
trackComponent(component);
|
|
35
|
-
jest.runOnlyPendingTimers();
|
|
36
|
-
expect(addPageAction).toHaveBeenCalledWith('spark-component', {
|
|
37
|
-
component: 'gux-button',
|
|
38
|
-
version: packageInfo.version,
|
|
39
|
-
queueDepth: 0
|
|
40
|
-
});
|
|
41
|
-
});
|
|
42
|
-
test('Optionally logs a tag variant', () => {
|
|
43
|
-
trackComponent(component, { variant: 'test' });
|
|
44
|
-
jest.runOnlyPendingTimers();
|
|
45
|
-
expect(addPageAction).toHaveBeenCalledWith('spark-component', {
|
|
46
|
-
component: 'gux-button',
|
|
47
|
-
version: packageInfo.version,
|
|
48
|
-
variant: 'test',
|
|
49
|
-
queueDepth: 0
|
|
50
|
-
});
|
|
51
|
-
});
|
|
52
|
-
});
|
|
53
|
-
describe('Component action tracking', () => {
|
|
54
|
-
test("Doesn't throw when newrelic is not present", () => {
|
|
55
|
-
window.newrelic = undefined;
|
|
56
|
-
expect(() => {
|
|
57
|
-
trackAction(component, 'click');
|
|
58
|
-
}).not.toThrow();
|
|
59
|
-
});
|
|
60
|
-
test('Logs the component tag and action', () => {
|
|
61
|
-
trackAction(component, 'click');
|
|
62
|
-
jest.runOnlyPendingTimers();
|
|
63
|
-
expect(addPageAction).toHaveBeenCalledWith('spark-action', {
|
|
64
|
-
component: 'gux-button',
|
|
65
|
-
action: 'click',
|
|
66
|
-
queueDepth: 0
|
|
67
|
-
});
|
|
68
|
-
});
|
|
69
|
-
test('Optionally logs metadata', () => {
|
|
70
|
-
trackAction(component, 'click', { strength: 'real hard' });
|
|
71
|
-
jest.runOnlyPendingTimers();
|
|
72
|
-
expect(addPageAction).toHaveBeenCalledWith('spark-action', {
|
|
73
|
-
component: 'gux-button',
|
|
74
|
-
action: 'click',
|
|
75
|
-
strength: 'real hard',
|
|
76
|
-
queueDepth: 0
|
|
77
|
-
});
|
|
78
|
-
});
|
|
79
|
-
});
|
|
80
|
-
});
|
|
81
|
-
describe('getVersionObject', () => {
|
|
82
|
-
[
|
|
83
|
-
{
|
|
84
|
-
packageLockVersion: '0.0.1',
|
|
85
|
-
expectedVersionObject: {
|
|
86
|
-
fullVersion: '0.0.1',
|
|
87
|
-
majorVersion: '0',
|
|
88
|
-
minorVersion: '0.0'
|
|
89
|
-
}
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
packageLockVersion: '0.1.1',
|
|
93
|
-
expectedVersionObject: {
|
|
94
|
-
fullVersion: '0.1.1',
|
|
95
|
-
majorVersion: '0',
|
|
96
|
-
minorVersion: '0.1'
|
|
97
|
-
}
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
packageLockVersion: '1.1.1',
|
|
101
|
-
expectedVersionObject: {
|
|
102
|
-
fullVersion: '1.1.1',
|
|
103
|
-
majorVersion: '1',
|
|
104
|
-
minorVersion: '1.1'
|
|
105
|
-
}
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
packageLockVersion: '2.0.0-alpha.0',
|
|
109
|
-
expectedVersionObject: {
|
|
110
|
-
fullVersion: '2.0.0-alpha.0',
|
|
111
|
-
majorVersion: '2',
|
|
112
|
-
minorVersion: '2.0'
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
].forEach(({ packageLockVersion, expectedVersionObject }, index) => {
|
|
116
|
-
it(`should return expected versionObject (${index + 1})`, async () => {
|
|
117
|
-
const versionEvent = getVersionEvent(packageLockVersion);
|
|
118
|
-
expect(versionEvent.metadata).toEqual(expectedVersionObject);
|
|
119
|
-
});
|
|
120
|
-
});
|
|
121
|
-
});
|