genesys-spark-chart-components 4.262.5 → 4.262.7
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-CwSB4jG_.js → color-palette-oGmXTF-5.js} +1 -1
- package/dist/cjs/gux-chart-column-beta.cjs.entry.js +6 -8
- package/dist/cjs/gux-chart-donut-beta.cjs.entry.js +6 -8
- package/dist/cjs/gux-chart-line-beta.cjs.entry.js +1 -1
- package/dist/cjs/gux-chart-pie-beta.cjs.entry.js +6 -8
- package/dist/cjs/gux-chart-scatter-plot-beta.cjs.entry.js +1 -1
- package/dist/cjs/gux-visualization-beta.cjs.entry.js +1 -1
- package/dist/collection/components/beta/gux-chart-column/gux-chart-column.js +5 -7
- package/dist/collection/components/beta/gux-chart-column/tests/gux-chart-column.common.js +63 -0
- package/dist/collection/components/beta/gux-chart-donut/gux-chart-donut.js +5 -7
- package/dist/collection/components/beta/gux-chart-donut/tests/gux-chart-donut.common.js +50 -0
- package/dist/collection/components/beta/gux-chart-line/tests/gux-chart-line.common.js +62 -0
- package/dist/collection/components/beta/gux-chart-pie/gux-chart-pie.js +5 -7
- package/dist/collection/components/beta/gux-chart-pie/tests/gux-chart-pie.common.js +45 -0
- package/dist/collection/components/beta/gux-chart-scatter-plot/tests/gux-chart-scatter-plot.common.js +54 -0
- package/dist/collection/components/beta/gux-visualization/tests/gux-visualization.common.js +116 -0
- package/dist/collection/test/commonTestUtils.js +1 -0
- package/dist/collection/test/expectToHaveNoViolations.js +44 -0
- package/dist/collection/test/playwrightTestUtils.js +177 -0
- package/dist/collection/test/setupAxeTests.js +5 -64
- package/dist/esm/{color-palette-DMUN-KvB.js → color-palette-BH9zhAvb.js} +1 -1
- package/dist/esm/gux-chart-column-beta.entry.js +6 -8
- package/dist/esm/gux-chart-donut-beta.entry.js +6 -8
- package/dist/esm/gux-chart-line-beta.entry.js +1 -1
- package/dist/esm/gux-chart-pie-beta.entry.js +6 -8
- package/dist/esm/gux-chart-scatter-plot-beta.entry.js +1 -1
- package/dist/esm/gux-visualization-beta.entry.js +1 -1
- package/dist/genesys-chart-webcomponents/genesys-chart-webcomponents.esm.js +1 -1
- package/dist/genesys-chart-webcomponents/{p-94fcd188.entry.js → p-57556bf9.entry.js} +1 -1
- package/dist/genesys-chart-webcomponents/p-7b3718fb.entry.js +1 -0
- package/dist/genesys-chart-webcomponents/{p-9ee251a3.entry.js → p-87576cfe.entry.js} +1 -1
- package/dist/genesys-chart-webcomponents/{p-DMUN-KvB.js → p-BH9zhAvb.js} +1 -1
- package/dist/genesys-chart-webcomponents/p-a3574178.entry.js +1 -0
- package/dist/genesys-chart-webcomponents/p-b98f3044.entry.js +1 -0
- package/dist/genesys-chart-webcomponents/{p-4074c43f.entry.js → p-e195e791.entry.js} +1 -1
- package/dist/types/components/beta/gux-chart-column/tests/gux-chart-column.common.d.ts +5 -0
- package/dist/types/components/beta/gux-chart-donut/tests/gux-chart-donut.common.d.ts +5 -0
- package/dist/types/components/beta/gux-chart-line/tests/gux-chart-line.common.d.ts +5 -0
- package/dist/types/components/beta/gux-chart-pie/tests/gux-chart-pie.common.d.ts +5 -0
- package/dist/types/components/beta/gux-chart-scatter-plot/tests/gux-chart-scatter-plot.common.d.ts +5 -0
- package/dist/types/components/beta/gux-visualization/tests/gux-visualization.common.d.ts +6 -0
- package/dist/types/test/commonTestUtils.d.ts +4 -0
- package/dist/types/test/expectToHaveNoViolations.d.ts +14 -0
- package/dist/types/test/playwrightTestUtils.d.ts +27 -0
- package/dist/types/test/setupAxeTests.d.ts +1 -0
- package/package.json +9 -1
- package/dist/genesys-chart-webcomponents/p-30c034e4.entry.js +0 -1
- package/dist/genesys-chart-webcomponents/p-40e1427e.entry.js +0 -1
- package/dist/genesys-chart-webcomponents/p-bf3467de.entry.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export function toHaveNoViolations(axeViolations, axeScanDetails) {
|
|
2
|
+
const violations = axeViolations.reduce((violationsAcc, violation) => {
|
|
3
|
+
violation.nodes = violation.nodes.reduce((nodesAcc, node) => {
|
|
4
|
+
const excluded = axeScanDetails.axeExclusions.some(exclusion => {
|
|
5
|
+
return (exclusion.issueId === violation.id &&
|
|
6
|
+
(!exclusion.target ||
|
|
7
|
+
node.target[0].toString().startsWith(exclusion.target)));
|
|
8
|
+
});
|
|
9
|
+
return excluded ? nodesAcc : nodesAcc.concat(node);
|
|
10
|
+
}, []);
|
|
11
|
+
return violation.nodes.length === 0
|
|
12
|
+
? violationsAcc
|
|
13
|
+
: violationsAcc.concat(violation);
|
|
14
|
+
}, []);
|
|
15
|
+
if (violations.length === 0) {
|
|
16
|
+
return {
|
|
17
|
+
message: () => `No violations found`,
|
|
18
|
+
pass: true
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
const violationMessage = createViolationMessage(violations, axeScanDetails.axeScanContext);
|
|
23
|
+
return {
|
|
24
|
+
message: () => violationMessage,
|
|
25
|
+
pass: false
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
function createViolationMessage(axeViolations, axeScanContext) {
|
|
30
|
+
let violationMessage = '';
|
|
31
|
+
let elementMessage = '';
|
|
32
|
+
const axeContextMessage = axeScanContext
|
|
33
|
+
? `Axe scan context:\n${axeScanContext}\n`
|
|
34
|
+
: '';
|
|
35
|
+
axeViolations.forEach(violation => {
|
|
36
|
+
violation.nodes.forEach(element => {
|
|
37
|
+
elementMessage += `\n\n${element.target}\n${element.failureSummary}`;
|
|
38
|
+
});
|
|
39
|
+
violationMessage += `${axeContextMessage}Violation id: ${violation.id}\nViolation description: ${violation.description}
|
|
40
|
+
\nAffected Elements (${violation.nodes.length}):${elementMessage}\n
|
|
41
|
+
`;
|
|
42
|
+
});
|
|
43
|
+
return violationMessage;
|
|
44
|
+
}
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
var __asyncValues = (this && this.__asyncValues) || function (o) {
|
|
2
|
+
if (!Symbol.asyncIterator)
|
|
3
|
+
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
4
|
+
var m = o[Symbol.asyncIterator], i;
|
|
5
|
+
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
|
6
|
+
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
|
7
|
+
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
|
|
8
|
+
};
|
|
9
|
+
var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); };
|
|
10
|
+
var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) {
|
|
11
|
+
if (!Symbol.asyncIterator)
|
|
12
|
+
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
13
|
+
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
14
|
+
return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
15
|
+
function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }
|
|
16
|
+
function verb(n, f) { if (g[n]) {
|
|
17
|
+
i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); };
|
|
18
|
+
if (f)
|
|
19
|
+
i[n] = f(i[n]);
|
|
20
|
+
} }
|
|
21
|
+
function resume(n, v) { try {
|
|
22
|
+
step(g[n](v));
|
|
23
|
+
}
|
|
24
|
+
catch (e) {
|
|
25
|
+
settle(q[0][3], e);
|
|
26
|
+
} }
|
|
27
|
+
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
28
|
+
function fulfill(value) { resume("next", value); }
|
|
29
|
+
function reject(value) { resume("throw", value); }
|
|
30
|
+
function settle(f, v) { if (f(v), q.shift(), q.length)
|
|
31
|
+
resume(q[0][0], q[0][1]); }
|
|
32
|
+
};
|
|
33
|
+
import { expect as baseExpect } from "@playwright/test";
|
|
34
|
+
import { test } from "@stencil/playwright";
|
|
35
|
+
import AxeBuilder from "@axe-core/playwright";
|
|
36
|
+
import { toHaveNoViolations } from "./expectToHaveNoViolations";
|
|
37
|
+
const modes = ['light'];
|
|
38
|
+
export const expect = baseExpect.extend({ toHaveNoViolations });
|
|
39
|
+
async function setMode(page, mode) {
|
|
40
|
+
const html = page.locator('html');
|
|
41
|
+
await html.evaluate((element, mode) => element.setAttribute('flare-mode', mode), mode);
|
|
42
|
+
}
|
|
43
|
+
export async function runAxe(page) {
|
|
44
|
+
return new AxeBuilder({ page })
|
|
45
|
+
.withTags([
|
|
46
|
+
'wcag2a',
|
|
47
|
+
'wcag2aa',
|
|
48
|
+
// 'wcag2aaa',
|
|
49
|
+
'wcag21a',
|
|
50
|
+
'wcag21aa',
|
|
51
|
+
'wcag22aa'
|
|
52
|
+
])
|
|
53
|
+
.analyze();
|
|
54
|
+
}
|
|
55
|
+
export async function analyze(page, element, extraActions = () => Promise.resolve(), performA11yCheck = true, screenshotOptions = {}, axeScanDetails = { axeExclusions: [] }) {
|
|
56
|
+
for (const mode of modes) {
|
|
57
|
+
await setMode(page, mode);
|
|
58
|
+
await extraActions(page);
|
|
59
|
+
await snap(page, element, performA11yCheck, screenshotOptions, axeScanDetails);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
export async function snap(page, element, performA11yCheck = true, screenshotOptions = {}, axeScanDetails = { axeExclusions: [] }) {
|
|
63
|
+
if (performA11yCheck) {
|
|
64
|
+
expect((await runAxe(page)).violations).toHaveNoViolations(axeScanDetails);
|
|
65
|
+
}
|
|
66
|
+
if ((await anyVisible(page.locator('gux-tooltip'))) ||
|
|
67
|
+
(await anyVisible(page.locator('gux-tooltip-beta')))) {
|
|
68
|
+
expect(await page.screenshot(screenshotOptions)).toMatchSnapshot();
|
|
69
|
+
}
|
|
70
|
+
else if (element && (await page.locator(element).isVisible())) {
|
|
71
|
+
expect(await page.locator(element).screenshot(screenshotOptions)).toMatchSnapshot();
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
expect(await page.screenshot(screenshotOptions)).toMatchSnapshot();
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
async function anyVisible(locator) {
|
|
78
|
+
var _a, e_1, _b, _c;
|
|
79
|
+
try {
|
|
80
|
+
for (var _d = true, _e = __asyncValues(iterateLocator(locator)), _f; _f = await _e.next(), _a = _f.done, !_a; _d = true) {
|
|
81
|
+
_c = _f.value;
|
|
82
|
+
_d = false;
|
|
83
|
+
const l = _c;
|
|
84
|
+
if (await l.isVisible()) {
|
|
85
|
+
return true;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
catch (e_1_1) {
|
|
90
|
+
e_1 = { error: e_1_1 };
|
|
91
|
+
}
|
|
92
|
+
finally {
|
|
93
|
+
try {
|
|
94
|
+
if (!_d && !_a && (_b = _e.return))
|
|
95
|
+
await _b.call(_e);
|
|
96
|
+
}
|
|
97
|
+
finally {
|
|
98
|
+
if (e_1)
|
|
99
|
+
throw e_1.error;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
return false;
|
|
103
|
+
}
|
|
104
|
+
function iterateLocator(locator) {
|
|
105
|
+
return __asyncGenerator(this, arguments, function* iterateLocator_1() {
|
|
106
|
+
for (let index = 0; index < (yield __await(locator.count())); index++) {
|
|
107
|
+
yield yield __await(locator.nth(index));
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
async function setupPage(page) {
|
|
112
|
+
await Promise.all([
|
|
113
|
+
page.addStyleTag({
|
|
114
|
+
url: 'https://apps.inindca.com/webfonts/urbanist.css'
|
|
115
|
+
}),
|
|
116
|
+
page.addStyleTag({
|
|
117
|
+
url: 'https://apps.inindca.com/webfonts/noto-sans.css'
|
|
118
|
+
}),
|
|
119
|
+
page.addStyleTag({
|
|
120
|
+
url: 'https://apps.inindca.com/webfonts/noto-sans-mono.css'
|
|
121
|
+
}),
|
|
122
|
+
page.addStyleTag({
|
|
123
|
+
path: 'public/build/genesys-chart-webcomponents.css'
|
|
124
|
+
}),
|
|
125
|
+
page.addStyleTag({
|
|
126
|
+
content: `
|
|
127
|
+
html {
|
|
128
|
+
color: var(--gse-semantic-foreground-container-highEmphasis);
|
|
129
|
+
background-color: var(--gse-semantic-background-container-page-default);
|
|
130
|
+
}
|
|
131
|
+
`
|
|
132
|
+
})
|
|
133
|
+
]);
|
|
134
|
+
}
|
|
135
|
+
export async function setContent(page, html) {
|
|
136
|
+
await page.setContent(html);
|
|
137
|
+
await setupPage(page);
|
|
138
|
+
}
|
|
139
|
+
// Gets the center position of the first element matching a CSS selector
|
|
140
|
+
// inside a component's shadow root, then moves the mouse there to trigger hover.
|
|
141
|
+
// Supports one level of shadow DOM nesting (e.g. host > shadow > gux-visualization-beta > shadow > mark)
|
|
142
|
+
export async function hoverFirstShadowMark(page, hostSelector, markSelector) {
|
|
143
|
+
const position = await page.evaluate(({ hostSelector, markSelector }) => {
|
|
144
|
+
var _a, _b, _c, _d, _e;
|
|
145
|
+
const host = document.querySelector(hostSelector);
|
|
146
|
+
// Try direct shadow root first, then one level deeper (for components
|
|
147
|
+
// that render gux-visualization-beta inside their own shadow root)
|
|
148
|
+
let mark = (_b = (_a = host === null || host === void 0 ? void 0 : host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(markSelector)) !== null && _b !== void 0 ? _b : null;
|
|
149
|
+
if (!mark) {
|
|
150
|
+
const vizHost = (_c = host === null || host === void 0 ? void 0 : host.shadowRoot) === null || _c === void 0 ? void 0 : _c.querySelector('gux-visualization-beta');
|
|
151
|
+
mark =
|
|
152
|
+
(_e = (_d = vizHost === null || vizHost === void 0 ? void 0 : vizHost.shadowRoot) === null || _d === void 0 ? void 0 : _d.querySelector(markSelector)) !== null && _e !== void 0 ? _e : null;
|
|
153
|
+
}
|
|
154
|
+
if (!mark) {
|
|
155
|
+
return null;
|
|
156
|
+
}
|
|
157
|
+
const rect = mark.getBoundingClientRect();
|
|
158
|
+
return { x: rect.x + rect.width / 2, y: rect.y + rect.height / 2 };
|
|
159
|
+
}, { hostSelector, markSelector });
|
|
160
|
+
if (position) {
|
|
161
|
+
await page.mouse.move(position.x, position.y);
|
|
162
|
+
await page
|
|
163
|
+
.waitForSelector('#vg-tooltip-element.visible', { timeout: 2000 })
|
|
164
|
+
.catch(() => {
|
|
165
|
+
// tooltip may not be configured on this chart, continue
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
export async function checkRenders({ renderConfigs, element, extraActions = () => Promise.resolve(), performA11yCheck = true, screenshotOptions = {}, skip = false, axeExclusions = [] }) {
|
|
170
|
+
renderConfigs.forEach(({ description, html }, index) => {
|
|
171
|
+
(skip ? test.skip : test)(description || `should render component as expected (${index + 1})`, async ({ page }) => {
|
|
172
|
+
await setContent(page, html);
|
|
173
|
+
await analyze(page, element, extraActions, performA11yCheck, screenshotOptions, { axeExclusions });
|
|
174
|
+
});
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
export { test } from '@stencil/playwright';
|
|
@@ -1,67 +1,8 @@
|
|
|
1
|
+
import { toHaveNoViolations } from "./expectToHaveNoViolations";
|
|
1
2
|
global.beforeEach(() => {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
});
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
function toHaveNoViolations(axeViolations, axeScanDetails) {
|
|
10
|
-
const violations = [];
|
|
11
|
-
|
|
12
|
-
axeViolations.forEach(violation => {
|
|
13
|
-
const violationTargets = [];
|
|
14
|
-
violation.nodes.forEach(violationInstance => {
|
|
15
|
-
let excludedElement = false;
|
|
16
|
-
axeScanDetails.axeExclusions.forEach(exclusion => {
|
|
17
|
-
if (
|
|
18
|
-
exclusion.issueId === violation.id &&
|
|
19
|
-
(!exclusion.target ||
|
|
20
|
-
exclusion.target === violationInstance.target[0].toString())
|
|
21
|
-
) {
|
|
22
|
-
excludedElement = true;
|
|
3
|
+
expect.extend({
|
|
4
|
+
toHaveNoViolations(axeViolations, axeScanDetails) {
|
|
5
|
+
return toHaveNoViolations(axeViolations, axeScanDetails);
|
|
23
6
|
}
|
|
24
|
-
});
|
|
25
|
-
if (excludedElement === false) {
|
|
26
|
-
violationTargets.push(violationInstance);
|
|
27
|
-
violation.violationInstance = violationTargets;
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
if (violation.violationInstance) {
|
|
31
|
-
violations.push(violation);
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
const violationMessage = createViolationMessage(violations, axeScanDetails);
|
|
35
|
-
return returnPassOrFail(violations, violationMessage);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
function createViolationMessage(violations, axeScanDetails) {
|
|
39
|
-
let violationMessage = '';
|
|
40
|
-
let elementMessage = '';
|
|
41
|
-
const axeContextMessage = axeScanDetails.axeScanContext
|
|
42
|
-
? `Axe scan context:\n${axeScanDetails.axeScanContext}\n`
|
|
43
|
-
: '';
|
|
44
|
-
violations.forEach(violation => {
|
|
45
|
-
violation.violationInstance.forEach(element => {
|
|
46
|
-
elementMessage += `\n${element.target}\n${element.failureSummary}`;
|
|
47
7
|
});
|
|
48
|
-
|
|
49
|
-
\nAffected Elements (${violation.violationInstance.length}):${elementMessage}\n
|
|
50
|
-
`;
|
|
51
|
-
});
|
|
52
|
-
return violationMessage;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
function returnPassOrFail(violations, violationMessage) {
|
|
56
|
-
if (violations.length === 0) {
|
|
57
|
-
return {
|
|
58
|
-
message: () => `No violations found`,
|
|
59
|
-
pass: true
|
|
60
|
-
};
|
|
61
|
-
} else {
|
|
62
|
-
return {
|
|
63
|
-
message: () => violationMessage,
|
|
64
|
-
pass: false
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
}
|
|
8
|
+
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h, g as getElement } from './index-B5vpMGHk.js';
|
|
2
|
-
import { D as DEFAULT_LABEL_COLOR, a as DEFAULT_DOMAIN_COLOR, V as VISUALIZATION_COLORS, t as trackComponent } from './color-palette-
|
|
2
|
+
import { D as DEFAULT_LABEL_COLOR, a as DEFAULT_DOMAIN_COLOR, V as VISUALIZATION_COLORS, t as trackComponent } from './color-palette-BH9zhAvb.js';
|
|
3
3
|
import { l as logError } from './log-error-nsqlWzyl.js';
|
|
4
4
|
|
|
5
5
|
const guxChartColumnCss = () => `gux-visualization-beta{height:fit-content;color:#2e394c;}gux-visualization-beta .mark-rect.layer_0_marks path{fill:url(#diagonalHatch0)}gux-visualization-beta{}gux-visualization-beta .mark-rect.layer_1_marks path{fill:#1da8b3}`;
|
|
@@ -52,10 +52,6 @@ const GuxColumnChart = class {
|
|
|
52
52
|
if (!this.xFieldName || !this.yFieldName) {
|
|
53
53
|
logError(this.root, 'requires x-field-name and y-field-name');
|
|
54
54
|
}
|
|
55
|
-
let chartData = {};
|
|
56
|
-
if (this.chartData) {
|
|
57
|
-
chartData = { data: this.chartData };
|
|
58
|
-
}
|
|
59
55
|
if (this.xTickLabelSlant) {
|
|
60
56
|
this.baseChartSpec.config.axisX.labelAngle = 45;
|
|
61
57
|
}
|
|
@@ -114,15 +110,17 @@ const GuxColumnChart = class {
|
|
|
114
110
|
[rangeField]: VISUALIZATION_COLORS
|
|
115
111
|
};
|
|
116
112
|
this.baseChartSpec.config.range = rangeConfig;
|
|
117
|
-
|
|
118
|
-
|
|
113
|
+
if (this.chartData) {
|
|
114
|
+
this.baseChartSpec.data = this.chartData;
|
|
115
|
+
}
|
|
116
|
+
this.visualizationSpec = JSON.parse(JSON.stringify(this.baseChartSpec));
|
|
119
117
|
}
|
|
120
118
|
componentWillLoad() {
|
|
121
119
|
trackComponent(this.root);
|
|
122
120
|
this.parseData();
|
|
123
121
|
}
|
|
124
122
|
render() {
|
|
125
|
-
return (h("gux-visualization-beta", { key: '
|
|
123
|
+
return (h("gux-visualization-beta", { key: 'bd2bf20b792ced36ea252d1332b3049c3ff5a652', visualizationSpec: this.visualizationSpec }));
|
|
126
124
|
}
|
|
127
125
|
get root() { return getElement(this); }
|
|
128
126
|
static get watchers() { return {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h, g as getElement } from './index-B5vpMGHk.js';
|
|
2
|
-
import { V as VISUALIZATION_COLORS, t as trackComponent } from './color-palette-
|
|
2
|
+
import { V as VISUALIZATION_COLORS, t as trackComponent } from './color-palette-BH9zhAvb.js';
|
|
3
3
|
import { l as logError } from './log-error-nsqlWzyl.js';
|
|
4
4
|
|
|
5
5
|
const guxChartDonutCss = () => `gux-visualization-beta{height:fit-content;color:#2e394c}`;
|
|
@@ -47,10 +47,6 @@ const GuxDonutChart = class {
|
|
|
47
47
|
if (!this.outerRadius && !this.innerRadius) {
|
|
48
48
|
logError(this.root, 'requires at least one of outer-radius or inner-radius');
|
|
49
49
|
}
|
|
50
|
-
let chartData = {};
|
|
51
|
-
if (this.chartData) {
|
|
52
|
-
chartData = { data: this.chartData };
|
|
53
|
-
}
|
|
54
50
|
this.baseChartSpec.config.legend.orient = this.legendPosition;
|
|
55
51
|
if (this.includeLegend) {
|
|
56
52
|
this.baseChartSpec.encoding.color.legend = {};
|
|
@@ -184,15 +180,17 @@ const GuxDonutChart = class {
|
|
|
184
180
|
};
|
|
185
181
|
}
|
|
186
182
|
}
|
|
187
|
-
|
|
188
|
-
|
|
183
|
+
if (this.chartData) {
|
|
184
|
+
this.baseChartSpec.data = this.chartData;
|
|
185
|
+
}
|
|
186
|
+
this.visualizationSpec = JSON.parse(JSON.stringify(this.baseChartSpec));
|
|
189
187
|
}
|
|
190
188
|
componentWillLoad() {
|
|
191
189
|
trackComponent(this.root);
|
|
192
190
|
this.parseData();
|
|
193
191
|
}
|
|
194
192
|
render() {
|
|
195
|
-
return (h("gux-visualization-beta", { key: '
|
|
193
|
+
return (h("gux-visualization-beta", { key: 'd8fd27820d40a737e614891b68c579d03422399e', visualizationSpec: this.visualizationSpec, embedOptions: this.tooltipSpec }));
|
|
196
194
|
}
|
|
197
195
|
get root() { return getElement(this); }
|
|
198
196
|
static get watchers() { return {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h, g as getElement } from './index-B5vpMGHk.js';
|
|
2
|
-
import { D as DEFAULT_LABEL_COLOR, a as DEFAULT_DOMAIN_COLOR, V as VISUALIZATION_COLORS, t as trackComponent } from './color-palette-
|
|
2
|
+
import { D as DEFAULT_LABEL_COLOR, a as DEFAULT_DOMAIN_COLOR, V as VISUALIZATION_COLORS, t as trackComponent } from './color-palette-BH9zhAvb.js';
|
|
3
3
|
import { l as logError } from './log-error-nsqlWzyl.js';
|
|
4
4
|
|
|
5
5
|
const guxChartLineCss = () => `gux-visualization-beta{height:fit-content;color:#2e394c}`;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h, g as getElement } from './index-B5vpMGHk.js';
|
|
2
|
-
import { V as VISUALIZATION_COLORS, t as trackComponent } from './color-palette-
|
|
2
|
+
import { V as VISUALIZATION_COLORS, t as trackComponent } from './color-palette-BH9zhAvb.js';
|
|
3
3
|
import { l as logError } from './log-error-nsqlWzyl.js';
|
|
4
4
|
|
|
5
5
|
const guxChartPieCss = () => `gux-visualization-beta{height:fit-content;color:#2e394c}`;
|
|
@@ -46,10 +46,6 @@ const GuxPieChart = class {
|
|
|
46
46
|
if (!this.outerRadius) {
|
|
47
47
|
logError(this.root, 'requires outer-radius');
|
|
48
48
|
}
|
|
49
|
-
let chartData = {};
|
|
50
|
-
if (this.chartData) {
|
|
51
|
-
chartData = { data: this.chartData };
|
|
52
|
-
}
|
|
53
49
|
if (this.includeLegend) {
|
|
54
50
|
this.baseChartSpec.encoding.color.legend = true;
|
|
55
51
|
}
|
|
@@ -77,15 +73,17 @@ const GuxPieChart = class {
|
|
|
77
73
|
}
|
|
78
74
|
});
|
|
79
75
|
}
|
|
80
|
-
|
|
81
|
-
|
|
76
|
+
if (this.chartData) {
|
|
77
|
+
this.baseChartSpec.data = this.chartData;
|
|
78
|
+
}
|
|
79
|
+
this.visualizationSpec = JSON.parse(JSON.stringify(this.baseChartSpec));
|
|
82
80
|
}
|
|
83
81
|
componentWillLoad() {
|
|
84
82
|
trackComponent(this.root);
|
|
85
83
|
this.parseData();
|
|
86
84
|
}
|
|
87
85
|
render() {
|
|
88
|
-
return (h("gux-visualization-beta", { key: '
|
|
86
|
+
return (h("gux-visualization-beta", { key: '14ea025a649390ac62820a42990bbbf4f7b8f4f5', visualizationSpec: this.visualizationSpec }));
|
|
89
87
|
}
|
|
90
88
|
get root() { return getElement(this); }
|
|
91
89
|
static get watchers() { return {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h, g as getElement } from './index-B5vpMGHk.js';
|
|
2
|
-
import { D as DEFAULT_LABEL_COLOR, a as DEFAULT_DOMAIN_COLOR, V as VISUALIZATION_COLORS, t as trackComponent } from './color-palette-
|
|
2
|
+
import { D as DEFAULT_LABEL_COLOR, a as DEFAULT_DOMAIN_COLOR, V as VISUALIZATION_COLORS, t as trackComponent } from './color-palette-BH9zhAvb.js';
|
|
3
3
|
import { l as logError } from './log-error-nsqlWzyl.js';
|
|
4
4
|
|
|
5
5
|
const guxChartScatterPlotCss = () => `gux-visualization-beta{height:fit-content;color:#2e394c}`;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h as h$1, g as getElement } from './index-B5vpMGHk.js';
|
|
2
|
-
import { a as DEFAULT_DOMAIN_COLOR, D as DEFAULT_LABEL_COLOR, t as trackComponent } from './color-palette-
|
|
2
|
+
import { a as DEFAULT_DOMAIN_COLOR, D as DEFAULT_LABEL_COLOR, t as trackComponent } from './color-palette-BH9zhAvb.js';
|
|
3
3
|
|
|
4
4
|
// Note: This regex matches even invalid JSON strings, but since we’re
|
|
5
5
|
// working on the output of `JSON.stringify` we know that only valid strings
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as l}from"./p-B5vpMGHk.js";export{s as setNonce}from"./p-B5vpMGHk.js";import{g as i}from"./p-DQuL1Twl.js";(()=>{const l=import.meta.url,i={};return""!==l&&(i.resourcesUrl=new URL(".",l).href),e(i)})().then((async e=>(await i(),l([["p-
|
|
1
|
+
import{p as e,b as l}from"./p-B5vpMGHk.js";export{s as setNonce}from"./p-B5vpMGHk.js";import{g as i}from"./p-DQuL1Twl.js";(()=>{const l=import.meta.url,i={};return""!==l&&(i.resourcesUrl=new URL(".",l).href),e(i)})().then((async e=>(await i(),l([["p-57556bf9",[[1,"gux-visualization-beta",{visualizationSpec:[16],embedOptions:[16],screenreaderDescription:[1,"screenreader-description"]}]]],["p-b98f3044",[[1,"gux-chart-column-beta",{labelColor:[1,"label-color"],domainColor:[1,"domain-color"],chartData:[16],xTickLabelSlant:[4,"x-tick-label-slant"],includeLegend:[4,"include-legend"],xFieldName:[1,"x-field-name"],yFieldName:[1,"y-field-name"],xAxisTitle:[1,"x-axis-title"],yAxisTitle:[1,"y-axis-title"],legendTitle:[1,"legend-title"],legendPosition:[1,"legend-position"],chartLayers:[16],embedOptions:[16]},null,{chartData:[{parseData:0}]}]]],["p-a3574178",[[1,"gux-chart-donut-beta",{chartData:[16],includeLegend:[4,"include-legend"],legendPosition:[1,"legend-position"],legendTitle:[1,"legend-title"],colorFieldName:[1,"color-field-name"],outerRadius:[2,"outer-radius"],innerRadius:[2,"inner-radius"],labelRadius:[2,"label-radius"],labelField:[1,"label-field"],gauge:[4],centerText:[1,"center-text"],centerSubText:[1,"center-sub-text"],showTooltip:[4,"show-tooltip"],tooltipOptions:[16],legendX:[2,"legend-x"],legendY:[2,"legend-y"],legendFontSize:[2,"legend-font-size"],legendSymbolSize:[2,"legend-symbol-size"],embedOptions:[16]},null,{chartData:[{parseData:0}]}]]],["p-87576cfe",[[1,"gux-chart-line-beta",{labelColor:[1,"label-color"],domainColor:[1,"domain-color"],chartData:[16],xTickLabelSlant:[4,"x-tick-label-slant"],includeLegend:[4,"include-legend"],legendPosition:[1,"legend-position"],includeDataPointMarkers:[4,"include-data-point-markers"],xFieldName:[1,"x-field-name"],xAxisTitle:[1,"x-axis-title"],yFieldName:[1,"y-field-name"],yAxisTitle:[1,"y-axis-title"],legendTitle:[1,"legend-title"],colorFieldName:[1,"color-field-name"],xGridVisible:[4,"x-grid-visible"],yGridVisible:[4,"y-grid-visible"],strokeDash:[4,"stroke-dash"],interpolation:[1],embedOptions:[16]},null,{chartData:[{parseData:0}]}]]],["p-7b3718fb",[[1,"gux-chart-pie-beta",{chartData:[16],includeLegend:[4,"include-legend"],legendPosition:[1,"legend-position"],legendTitle:[1,"legend-title"],colorFieldName:[1,"color-field-name"],outerRadius:[2,"outer-radius"],labelRadius:[2,"label-radius"],labelField:[1,"label-field"],embedOptions:[16]},null,{chartData:[{parseData:0}]}]]],["p-e195e791",[[1,"gux-chart-scatter-plot-beta",{labelColor:[1,"label-color"],domainColor:[1,"domain-color"],chartData:[16],xTickLabelSlant:[4,"x-tick-label-slant"],includeLegend:[4,"include-legend"],legendPosition:[1,"legend-position"],xFieldName:[1,"x-field-name"],xAxisTitle:[1,"x-axis-title"],yFieldName:[1,"y-field-name"],yAxisTitle:[1,"y-axis-title"],legendTitle:[1,"legend-title"],colorFieldName:[1,"color-field-name"],useShape:[1,"use-shape"],xGridVisible:[4,"x-grid-visible"],yGridVisible:[4,"y-grid-visible"],embedOptions:[16]},null,{chartData:[{parseData:0}]}]]]],e))));
|