genesys-spark-chart-components 4.12.1-beta.1 → 4.29.0-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.
- package/LICENSE +2 -2
- package/dist/cjs/app-globals-3a1e7e63.js +5 -0
- package/dist/cjs/genesys-chart-webcomponents.cjs.js +5 -3
- package/dist/cjs/gux-chart-column-beta.cjs.entry.js +124 -123
- package/dist/cjs/gux-chart-donut-beta.cjs.entry.js +213 -212
- package/dist/cjs/gux-chart-line-beta.cjs.entry.js +120 -119
- package/dist/cjs/gux-chart-pie-beta.cjs.entry.js +96 -95
- package/dist/cjs/gux-chart-scatter-plot-beta.cjs.entry.js +126 -125
- package/dist/cjs/gux-visualization-beta.cjs.entry.js +213 -213
- package/dist/cjs/{index-1e13a15f.js → index-a4712860.js} +185 -63
- package/dist/cjs/loader.cjs.js +4 -2
- package/dist/cjs/log-error-28c7064e.js +21 -0
- package/dist/cjs/{usage-30f04ec3.js → usage-3d9281d1.js} +63 -63
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/beta/gux-chart-column/gux-chart-column.js +324 -324
- package/dist/collection/components/beta/gux-chart-column/gux-chart-column.locale.js +88 -88
- package/dist/collection/components/beta/gux-chart-column/tests/gux-column-chart.spec.js +16 -16
- package/dist/collection/components/beta/gux-chart-donut/gux-chart-donut.js +550 -550
- package/dist/collection/components/beta/gux-chart-donut/tests/gux-chart-donut.spec.js +5 -5
- package/dist/collection/components/beta/gux-chart-line/gux-chart-line.js +375 -375
- package/dist/collection/components/beta/gux-chart-line/gux-chart-line.locale.js +88 -88
- package/dist/collection/components/beta/gux-chart-line/tests/gux-chart-line.e2e.js +13 -13
- package/dist/collection/components/beta/gux-chart-line/tests/gux-chart-line.spec.js +16 -16
- package/dist/collection/components/beta/gux-chart-pie/gux-chart-pie.js +266 -266
- package/dist/collection/components/beta/gux-chart-pie/tests/gux-chart-pie.spec.js +5 -5
- package/dist/collection/components/beta/gux-chart-scatter-plot/gux-chart-scatter-plot.js +347 -347
- package/dist/collection/components/beta/gux-chart-scatter-plot/tests/gux-chart-scatter-plot.spec.js +27 -27
- package/dist/collection/components/beta/gux-visualization/gux-visualization.js +133 -133
- package/dist/collection/components/beta/gux-visualization/gux-visualization.locale.js +88 -88
- package/dist/collection/components/beta/gux-visualization/tests/gux-visualization.e2e.js +25 -25
- package/dist/collection/components/beta/gux-visualization/tests/gux-visualization.spec.js +26 -26
- package/dist/collection/i18n/fetchResources.js +7 -7
- package/dist/collection/i18n/index.js +56 -56
- package/dist/collection/test/axeConfig.js +4 -4
- package/dist/collection/test/e2eTestUtils.js +14 -14
- package/dist/collection/test/specTestUtils.js +5 -5
- package/dist/collection/utils/dom/get-closest-element.js +12 -12
- package/dist/collection/utils/error/log-error.js +2 -2
- package/dist/collection/utils/theme/color-palette.js +10 -10
- package/dist/collection/utils/tracking/usage.js +47 -47
- package/dist/collection/utils/tracking/usage.spec.js +108 -108
- package/dist/esm/app-globals-0f993ce5.js +3 -0
- package/dist/esm/genesys-chart-webcomponents.js +6 -4
- package/dist/esm/gux-chart-column-beta.entry.js +124 -123
- package/dist/esm/gux-chart-donut-beta.entry.js +213 -212
- package/dist/esm/gux-chart-line-beta.entry.js +120 -119
- package/dist/esm/gux-chart-pie-beta.entry.js +96 -95
- package/dist/esm/gux-chart-scatter-plot-beta.entry.js +126 -125
- package/dist/esm/gux-visualization-beta.entry.js +213 -213
- package/dist/esm/{index-701d93cf.js → index-82fd7406.js} +185 -63
- package/dist/esm/loader.js +5 -3
- package/dist/esm/log-error-ff9bdda4.js +18 -0
- package/dist/esm/{usage-61eee3bd.js → usage-4d835ee1.js} +63 -63
- package/dist/genesys-chart-webcomponents/genesys-chart-webcomponents.css +1 -1
- package/dist/genesys-chart-webcomponents/genesys-chart-webcomponents.esm.js +1 -1
- package/dist/genesys-chart-webcomponents/p-01bbadbf.entry.js +11 -0
- package/dist/genesys-chart-webcomponents/{p-137f5b8f.entry.js → p-12eb9928.entry.js} +1 -1
- package/dist/genesys-chart-webcomponents/p-1bc0cc3a.js +2 -0
- package/dist/genesys-chart-webcomponents/{p-b5179379.entry.js → p-25bdbf17.entry.js} +1 -1
- package/dist/genesys-chart-webcomponents/{p-c3aa8578.entry.js → p-74011efc.entry.js} +1 -1
- package/dist/genesys-chart-webcomponents/{p-97c45977.js → p-7e62b207.js} +1 -1
- package/dist/genesys-chart-webcomponents/p-e1255160.js +1 -0
- package/dist/genesys-chart-webcomponents/{p-d9928f8c.entry.js → p-e80b1b1c.entry.js} +1 -1
- package/dist/genesys-chart-webcomponents/{p-d4a346df.entry.js → p-f6cebcf8.entry.js} +1 -1
- package/dist/stencil-wrapper.js +1 -1
- package/dist/types/components/beta/gux-chart-column/gux-chart-column.d.ts +45 -45
- package/dist/types/components/beta/gux-chart-column/gux-chart-column.locale.d.ts +20 -20
- package/dist/types/components/beta/gux-chart-donut/gux-chart-donut.d.ts +30 -30
- package/dist/types/components/beta/gux-chart-line/gux-chart-line.d.ts +44 -44
- package/dist/types/components/beta/gux-chart-line/gux-chart-line.locale.d.ts +20 -20
- package/dist/types/components/beta/gux-chart-pie/gux-chart-pie.d.ts +19 -19
- package/dist/types/components/beta/gux-chart-scatter-plot/gux-chart-scatter-plot.d.ts +48 -48
- package/dist/types/components/beta/gux-visualization/gux-visualization.d.ts +13 -13
- package/dist/types/components/beta/gux-visualization/gux-visualization.locale.d.ts +20 -20
- package/dist/types/components.d.ts +12 -0
- package/dist/types/i18n/fetchResources.d.ts +3 -3
- package/dist/types/i18n/index.d.ts +1 -1
- package/dist/types/stencil-public-runtime.d.ts +10 -0
- package/dist/types/stencil-wrapper.d.ts +1 -1
- package/dist/types/test/axeConfig.d.ts +4 -4
- package/dist/types/test/e2eTestUtils.d.ts +4 -4
- package/dist/types/test/jestMatcherUtils.d.ts +4 -4
- package/dist/types/utils/tracking/usage.d.ts +11 -11
- package/package.json +24 -24
- package/dist/cjs/log-error-c46b4b4c.js +0 -21
- package/dist/component-specs.json +0 -187
- package/dist/esm/log-error-0fc61f6f.js +0 -18
- package/dist/genesys-chart-webcomponents/p-3e4b3dbc.js +0 -2
- package/dist/genesys-chart-webcomponents/p-b901e9e0.entry.js +0 -11
- /package/dist/genesys-chart-webcomponents/{p-82f0ea01.js → p-f50e3789.js} +0 -0
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index$3 = require('./index-
|
|
6
|
-
const usage = require('./usage-
|
|
5
|
+
const index$3 = require('./index-a4712860.js');
|
|
6
|
+
const usage = require('./usage-3d9281d1.js');
|
|
7
7
|
|
|
8
8
|
/*!
|
|
9
9
|
* https://github.com/Starcounter-Jack/JSON-Patch
|
|
@@ -2110,6 +2110,7 @@ const ascendingBisect = bisector$1(ascending$3);
|
|
|
2110
2110
|
const bisectRight$1 = ascendingBisect.right;
|
|
2111
2111
|
const bisectLeft$1 = ascendingBisect.left;
|
|
2112
2112
|
bisector$1(number$6).center;
|
|
2113
|
+
const bisect$1 = bisectRight$1;
|
|
2113
2114
|
|
|
2114
2115
|
function variance(values, valueof) {
|
|
2115
2116
|
let count = 0;
|
|
@@ -14494,7 +14495,7 @@ function polymap(domain, range, interpolate) {
|
|
|
14494
14495
|
}
|
|
14495
14496
|
|
|
14496
14497
|
return function(x) {
|
|
14497
|
-
var i =
|
|
14498
|
+
var i = bisect$1(domain, x, 1, j) - 1;
|
|
14498
14499
|
return r[i](d[i](x));
|
|
14499
14500
|
};
|
|
14500
14501
|
}
|
|
@@ -14936,7 +14937,7 @@ function quantile() {
|
|
|
14936
14937
|
}
|
|
14937
14938
|
|
|
14938
14939
|
function scale(x) {
|
|
14939
|
-
return x == null || isNaN(x = +x) ? unknown : range[
|
|
14940
|
+
return x == null || isNaN(x = +x) ? unknown : range[bisect$1(thresholds, x)];
|
|
14940
14941
|
}
|
|
14941
14942
|
|
|
14942
14943
|
scale.invertExtent = function(y) {
|
|
@@ -14986,7 +14987,7 @@ function quantize$1() {
|
|
|
14986
14987
|
unknown;
|
|
14987
14988
|
|
|
14988
14989
|
function scale(x) {
|
|
14989
|
-
return x != null && x <= x ? range[
|
|
14990
|
+
return x != null && x <= x ? range[bisect$1(domain, x, 0, n)] : unknown;
|
|
14990
14991
|
}
|
|
14991
14992
|
|
|
14992
14993
|
function rescale() {
|
|
@@ -15037,7 +15038,7 @@ function threshold() {
|
|
|
15037
15038
|
n = 1;
|
|
15038
15039
|
|
|
15039
15040
|
function scale(x) {
|
|
15040
|
-
return x != null && x <= x ? range[
|
|
15041
|
+
return x != null && x <= x ? range[bisect$1(domain, x, 0, n)] : unknown;
|
|
15041
15042
|
}
|
|
15042
15043
|
|
|
15043
15044
|
scale.domain = function(_) {
|
|
@@ -15574,7 +15575,7 @@ function scaleBinOrdinal$5() {
|
|
|
15574
15575
|
let domain = [],
|
|
15575
15576
|
range = [];
|
|
15576
15577
|
function scale(x) {
|
|
15577
|
-
return x == null || x !== x ? undefined : range[(
|
|
15578
|
+
return x == null || x !== x ? undefined : range[(bisect$1(domain, x) - 1) % range.length];
|
|
15578
15579
|
}
|
|
15579
15580
|
scale.domain = function (_) {
|
|
15580
15581
|
if (arguments.length) {
|
|
@@ -22300,7 +22301,7 @@ function scaleBinOrdinal$4() {
|
|
|
22300
22301
|
let domain = [],
|
|
22301
22302
|
range = [];
|
|
22302
22303
|
function scale(x) {
|
|
22303
|
-
return x == null || x !== x ? undefined : range[(
|
|
22304
|
+
return x == null || x !== x ? undefined : range[(bisect$1(domain, x) - 1) % range.length];
|
|
22304
22305
|
}
|
|
22305
22306
|
scale.domain = function (_) {
|
|
22306
22307
|
if (arguments.length) {
|
|
@@ -23940,22 +23941,22 @@ var lambda0, phi0, lambda1, phi1, // bounds
|
|
|
23940
23941
|
ranges,
|
|
23941
23942
|
range$3;
|
|
23942
23943
|
|
|
23943
|
-
var boundsStream$
|
|
23944
|
+
var boundsStream$2 = {
|
|
23944
23945
|
point: boundsPoint$1,
|
|
23945
23946
|
lineStart: boundsLineStart,
|
|
23946
23947
|
lineEnd: boundsLineEnd,
|
|
23947
23948
|
polygonStart: function() {
|
|
23948
|
-
boundsStream$
|
|
23949
|
-
boundsStream$
|
|
23950
|
-
boundsStream$
|
|
23949
|
+
boundsStream$2.point = boundsRingPoint;
|
|
23950
|
+
boundsStream$2.lineStart = boundsRingStart;
|
|
23951
|
+
boundsStream$2.lineEnd = boundsRingEnd;
|
|
23951
23952
|
deltaSum = new Adder();
|
|
23952
23953
|
areaStream$1.polygonStart();
|
|
23953
23954
|
},
|
|
23954
23955
|
polygonEnd: function() {
|
|
23955
23956
|
areaStream$1.polygonEnd();
|
|
23956
|
-
boundsStream$
|
|
23957
|
-
boundsStream$
|
|
23958
|
-
boundsStream$
|
|
23957
|
+
boundsStream$2.point = boundsPoint$1;
|
|
23958
|
+
boundsStream$2.lineStart = boundsLineStart;
|
|
23959
|
+
boundsStream$2.lineEnd = boundsLineEnd;
|
|
23959
23960
|
if (areaRingSum$1 < 0) lambda0 = -(lambda1 = 180), phi0 = -(phi1 = 90);
|
|
23960
23961
|
else if (deltaSum > epsilon$3) phi1 = 90;
|
|
23961
23962
|
else if (deltaSum < -epsilon$3) phi0 = -90;
|
|
@@ -24022,12 +24023,12 @@ function linePoint(lambda, phi) {
|
|
|
24022
24023
|
}
|
|
24023
24024
|
|
|
24024
24025
|
function boundsLineStart() {
|
|
24025
|
-
boundsStream$
|
|
24026
|
+
boundsStream$2.point = linePoint;
|
|
24026
24027
|
}
|
|
24027
24028
|
|
|
24028
24029
|
function boundsLineEnd() {
|
|
24029
24030
|
range$3[0] = lambda0, range$3[1] = lambda1;
|
|
24030
|
-
boundsStream$
|
|
24031
|
+
boundsStream$2.point = boundsPoint$1;
|
|
24031
24032
|
p0 = null;
|
|
24032
24033
|
}
|
|
24033
24034
|
|
|
@@ -24074,7 +24075,7 @@ function geoBounds$1(feature) {
|
|
|
24074
24075
|
|
|
24075
24076
|
phi1 = lambda1 = -(lambda0 = phi0 = Infinity);
|
|
24076
24077
|
ranges = [];
|
|
24077
|
-
geoStream(feature, boundsStream$
|
|
24078
|
+
geoStream(feature, boundsStream$2);
|
|
24078
24079
|
|
|
24079
24080
|
// First, sort ranges by their minimum longitudes.
|
|
24080
24081
|
if (n = ranges.length) {
|
|
@@ -25319,6 +25320,8 @@ function areaRingEnd() {
|
|
|
25319
25320
|
areaPoint(x00$2, y00$2);
|
|
25320
25321
|
}
|
|
25321
25322
|
|
|
25323
|
+
const pathArea = areaStream;
|
|
25324
|
+
|
|
25322
25325
|
var x0$2 = Infinity,
|
|
25323
25326
|
y0$2 = x0$2,
|
|
25324
25327
|
x1 = -x0$2,
|
|
@@ -25344,6 +25347,8 @@ function boundsPoint(x, y) {
|
|
|
25344
25347
|
if (y > y1) y1 = y;
|
|
25345
25348
|
}
|
|
25346
25349
|
|
|
25350
|
+
const boundsStream$1 = boundsStream;
|
|
25351
|
+
|
|
25347
25352
|
// TODO Enforce positive area for exterior, negative area for interior?
|
|
25348
25353
|
|
|
25349
25354
|
var X0 = 0,
|
|
@@ -25441,6 +25446,8 @@ function centroidPointRing(x, y) {
|
|
|
25441
25446
|
centroidPoint(x0$1 = x, y0$1 = y);
|
|
25442
25447
|
}
|
|
25443
25448
|
|
|
25449
|
+
const pathCentroid = centroidStream;
|
|
25450
|
+
|
|
25444
25451
|
function PathContext(context) {
|
|
25445
25452
|
this._context = context;
|
|
25446
25453
|
}
|
|
@@ -25524,6 +25531,8 @@ function lengthPoint(x, y) {
|
|
|
25524
25531
|
x0 = x, y0 = y;
|
|
25525
25532
|
}
|
|
25526
25533
|
|
|
25534
|
+
const pathMeasure = lengthStream;
|
|
25535
|
+
|
|
25527
25536
|
// Simple caching for constant-radius points.
|
|
25528
25537
|
let cacheDigits, cacheAppend, cacheRadius, cacheCircle;
|
|
25529
25538
|
|
|
@@ -25626,23 +25635,23 @@ function geoPath(projection, context) {
|
|
|
25626
25635
|
}
|
|
25627
25636
|
|
|
25628
25637
|
path.area = function(object) {
|
|
25629
|
-
geoStream(object, projectionStream(
|
|
25630
|
-
return
|
|
25638
|
+
geoStream(object, projectionStream(pathArea));
|
|
25639
|
+
return pathArea.result();
|
|
25631
25640
|
};
|
|
25632
25641
|
|
|
25633
25642
|
path.measure = function(object) {
|
|
25634
|
-
geoStream(object, projectionStream(
|
|
25635
|
-
return
|
|
25643
|
+
geoStream(object, projectionStream(pathMeasure));
|
|
25644
|
+
return pathMeasure.result();
|
|
25636
25645
|
};
|
|
25637
25646
|
|
|
25638
25647
|
path.bounds = function(object) {
|
|
25639
|
-
geoStream(object, projectionStream(boundsStream));
|
|
25640
|
-
return boundsStream.result();
|
|
25648
|
+
geoStream(object, projectionStream(boundsStream$1));
|
|
25649
|
+
return boundsStream$1.result();
|
|
25641
25650
|
};
|
|
25642
25651
|
|
|
25643
25652
|
path.centroid = function(object) {
|
|
25644
|
-
geoStream(object, projectionStream(
|
|
25645
|
-
return
|
|
25653
|
+
geoStream(object, projectionStream(pathCentroid));
|
|
25654
|
+
return pathCentroid.result();
|
|
25646
25655
|
};
|
|
25647
25656
|
|
|
25648
25657
|
path.projection = function(_) {
|
|
@@ -25704,8 +25713,8 @@ function fit$1(projection, fitBounds, object) {
|
|
|
25704
25713
|
var clip = projection.clipExtent && projection.clipExtent();
|
|
25705
25714
|
projection.scale(150).translate([0, 0]);
|
|
25706
25715
|
if (clip != null) projection.clipExtent(null);
|
|
25707
|
-
geoStream(object, projection.stream(boundsStream));
|
|
25708
|
-
fitBounds(boundsStream.result());
|
|
25716
|
+
geoStream(object, projection.stream(boundsStream$1));
|
|
25717
|
+
fitBounds(boundsStream$1.result());
|
|
25709
25718
|
if (clip != null) projection.clipExtent(clip);
|
|
25710
25719
|
return projection;
|
|
25711
25720
|
}
|
|
@@ -26852,7 +26861,7 @@ function scaleBinOrdinal$3() {
|
|
|
26852
26861
|
let domain = [],
|
|
26853
26862
|
range = [];
|
|
26854
26863
|
function scale(x) {
|
|
26855
|
-
return x == null || x !== x ? undefined : range[(
|
|
26864
|
+
return x == null || x !== x ? undefined : range[(bisect$1(domain, x) - 1) % range.length];
|
|
26856
26865
|
}
|
|
26857
26866
|
scale.domain = function (_) {
|
|
26858
26867
|
if (arguments.length) {
|
|
@@ -34727,7 +34736,7 @@ function scaleBinOrdinal$2() {
|
|
|
34727
34736
|
let domain = [],
|
|
34728
34737
|
range = [];
|
|
34729
34738
|
function scale(x) {
|
|
34730
|
-
return x == null || x !== x ? undefined : range[(
|
|
34739
|
+
return x == null || x !== x ? undefined : range[(bisect$1(domain, x) - 1) % range.length];
|
|
34731
34740
|
}
|
|
34732
34741
|
scale.domain = function (_) {
|
|
34733
34742
|
if (arguments.length) {
|
|
@@ -36429,7 +36438,7 @@ function scaleBinOrdinal$1() {
|
|
|
36429
36438
|
range = [];
|
|
36430
36439
|
|
|
36431
36440
|
function scale(x) {
|
|
36432
|
-
return x == null || x !== x ? undefined : range[(
|
|
36441
|
+
return x == null || x !== x ? undefined : range[(bisect$1(domain, x) - 1) % range.length];
|
|
36433
36442
|
}
|
|
36434
36443
|
|
|
36435
36444
|
scale.domain = function (_) {
|
|
@@ -38554,7 +38563,7 @@ function scaleBinOrdinal() {
|
|
|
38554
38563
|
let domain = [],
|
|
38555
38564
|
range = [];
|
|
38556
38565
|
function scale(x) {
|
|
38557
|
-
return x == null || x !== x ? undefined : range[(
|
|
38566
|
+
return x == null || x !== x ? undefined : range[(bisect$1(domain, x) - 1) % range.length];
|
|
38558
38567
|
}
|
|
38559
38568
|
scale.domain = function (_) {
|
|
38560
38569
|
if (arguments.length) {
|
|
@@ -48307,21 +48316,9 @@ const pkg$1 = {
|
|
|
48307
48316
|
|
|
48308
48317
|
Array.prototype.flat||Object.defineProperty(Array.prototype,"flat",{configurable:!0,value:function r(){var t=isNaN(arguments[0])?1:Number(arguments[0]);return t?Array.prototype.reduce.call(this,function(a,e){return Array.isArray(e)?a.push.apply(a,r.call(e,t-1)):a.push(e),a},[]):Array.prototype.slice.call(this)},writable:!0}),Array.prototype.flatMap||Object.defineProperty(Array.prototype,"flatMap",{configurable:!0,value:function(r){return Array.prototype.map.apply(this,arguments).flat()},writable:!0});
|
|
48309
48318
|
|
|
48310
|
-
|
|
48311
|
-
return module = {
|
|
48312
|
-
path: basedir,
|
|
48313
|
-
exports: {},
|
|
48314
|
-
require: function (path, base) {
|
|
48315
|
-
return commonjsRequire();
|
|
48316
|
-
}
|
|
48317
|
-
}, fn(module, module.exports), module.exports;
|
|
48318
|
-
}
|
|
48319
|
-
|
|
48320
|
-
function commonjsRequire () {
|
|
48321
|
-
throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');
|
|
48322
|
-
}
|
|
48319
|
+
var clone = {exports: {}};
|
|
48323
48320
|
|
|
48324
|
-
|
|
48321
|
+
(function (module) {
|
|
48325
48322
|
var clone = (function() {
|
|
48326
48323
|
|
|
48327
48324
|
function _instanceof(obj, type) {
|
|
@@ -48578,7 +48575,9 @@ return clone;
|
|
|
48578
48575
|
if (module.exports) {
|
|
48579
48576
|
module.exports = clone;
|
|
48580
48577
|
}
|
|
48581
|
-
});
|
|
48578
|
+
}(clone));
|
|
48579
|
+
|
|
48580
|
+
const clone_ = clone.exports;
|
|
48582
48581
|
|
|
48583
48582
|
// do not edit .js files directly - edit src/index.jst
|
|
48584
48583
|
|
|
@@ -48726,7 +48725,7 @@ function normalizeLogicalComposition(op, normalizer) {
|
|
|
48726
48725
|
}
|
|
48727
48726
|
|
|
48728
48727
|
const deepEqual = fastDeepEqual;
|
|
48729
|
-
const duplicate =
|
|
48728
|
+
const duplicate = clone_;
|
|
48730
48729
|
function never(message) {
|
|
48731
48730
|
throw new Error(message);
|
|
48732
48731
|
}
|
|
@@ -71765,189 +71764,190 @@ const locales = [
|
|
|
71765
71764
|
];
|
|
71766
71765
|
|
|
71767
71766
|
function getClosestElement(selector, baseElement = this) {
|
|
71768
|
-
|
|
71769
|
-
|
|
71770
|
-
|
|
71771
|
-
|
|
71772
|
-
|
|
71773
|
-
|
|
71767
|
+
function closest(element) {
|
|
71768
|
+
if (!element || element === document || element === window) {
|
|
71769
|
+
return null;
|
|
71770
|
+
}
|
|
71771
|
+
if (element.assignedSlot) {
|
|
71772
|
+
element = element.assignedSlot;
|
|
71773
|
+
}
|
|
71774
|
+
const found = element.closest(selector);
|
|
71775
|
+
return found
|
|
71776
|
+
? found
|
|
71777
|
+
: closest(element.getRootNode().host);
|
|
71774
71778
|
}
|
|
71775
|
-
|
|
71776
|
-
return found
|
|
71777
|
-
? found
|
|
71778
|
-
: closest(element.getRootNode().host);
|
|
71779
|
-
}
|
|
71780
|
-
return closest(baseElement);
|
|
71779
|
+
return closest(baseElement);
|
|
71781
71780
|
}
|
|
71782
71781
|
|
|
71783
71782
|
const DEFAULT_LOCALE = 'en';
|
|
71784
71783
|
function getDesiredLocale(element) {
|
|
71785
|
-
|
|
71786
|
-
|
|
71787
|
-
|
|
71788
|
-
|
|
71789
|
-
|
|
71790
|
-
|
|
71791
|
-
|
|
71792
|
-
|
|
71793
|
-
|
|
71794
|
-
|
|
71795
|
-
|
|
71784
|
+
const locale = findLocaleInDom(element);
|
|
71785
|
+
const lang = locale.split(/[_-]/)[0];
|
|
71786
|
+
if (locales.indexOf(locale) >= 0) {
|
|
71787
|
+
return locale;
|
|
71788
|
+
}
|
|
71789
|
+
else if (locales.indexOf(lang) >= 0) {
|
|
71790
|
+
return lang;
|
|
71791
|
+
}
|
|
71792
|
+
else {
|
|
71793
|
+
return DEFAULT_LOCALE;
|
|
71794
|
+
}
|
|
71796
71795
|
}
|
|
71797
71796
|
function findLocaleInDom(element) {
|
|
71798
|
-
|
|
71799
|
-
|
|
71800
|
-
|
|
71801
|
-
|
|
71802
|
-
|
|
71803
|
-
|
|
71804
|
-
|
|
71797
|
+
const closestElement = getClosestElement('[lang]', element);
|
|
71798
|
+
if (closestElement && closestElement.lang) {
|
|
71799
|
+
return closestElement.lang.toLowerCase();
|
|
71800
|
+
}
|
|
71801
|
+
else {
|
|
71802
|
+
return DEFAULT_LOCALE;
|
|
71803
|
+
}
|
|
71805
71804
|
}
|
|
71806
71805
|
|
|
71807
71806
|
// https://github.com/d3/d3-time-format/tree/master/locale
|
|
71808
71807
|
// This is just a POC I would structure the files differently when implementing for production.
|
|
71809
71808
|
const timeFormatLocale = {
|
|
71810
|
-
|
|
71811
|
-
|
|
71812
|
-
|
|
71813
|
-
|
|
71814
|
-
|
|
71815
|
-
|
|
71816
|
-
|
|
71817
|
-
|
|
71818
|
-
|
|
71819
|
-
|
|
71820
|
-
|
|
71821
|
-
|
|
71822
|
-
|
|
71823
|
-
|
|
71824
|
-
|
|
71825
|
-
|
|
71826
|
-
|
|
71827
|
-
|
|
71828
|
-
|
|
71829
|
-
|
|
71830
|
-
|
|
71831
|
-
|
|
71832
|
-
|
|
71833
|
-
|
|
71834
|
-
|
|
71835
|
-
|
|
71836
|
-
|
|
71837
|
-
|
|
71838
|
-
|
|
71839
|
-
|
|
71840
|
-
|
|
71841
|
-
|
|
71842
|
-
|
|
71843
|
-
|
|
71844
|
-
|
|
71845
|
-
|
|
71846
|
-
|
|
71847
|
-
|
|
71848
|
-
|
|
71849
|
-
|
|
71850
|
-
|
|
71851
|
-
|
|
71852
|
-
|
|
71853
|
-
|
|
71854
|
-
|
|
71855
|
-
|
|
71856
|
-
|
|
71857
|
-
|
|
71858
|
-
|
|
71859
|
-
|
|
71860
|
-
|
|
71861
|
-
|
|
71862
|
-
|
|
71863
|
-
|
|
71864
|
-
|
|
71865
|
-
|
|
71866
|
-
|
|
71867
|
-
|
|
71868
|
-
|
|
71869
|
-
|
|
71870
|
-
|
|
71871
|
-
|
|
71872
|
-
|
|
71873
|
-
|
|
71874
|
-
|
|
71875
|
-
|
|
71876
|
-
|
|
71877
|
-
|
|
71878
|
-
|
|
71879
|
-
|
|
71880
|
-
|
|
71881
|
-
|
|
71882
|
-
|
|
71883
|
-
|
|
71884
|
-
|
|
71885
|
-
|
|
71886
|
-
|
|
71887
|
-
|
|
71888
|
-
|
|
71889
|
-
|
|
71890
|
-
|
|
71891
|
-
|
|
71892
|
-
|
|
71893
|
-
|
|
71894
|
-
|
|
71895
|
-
|
|
71896
|
-
|
|
71897
|
-
|
|
71809
|
+
en: {
|
|
71810
|
+
dateTime: '%x, %X',
|
|
71811
|
+
date: '%-m/%-d/%Y',
|
|
71812
|
+
time: '%-I:%M:%S %p',
|
|
71813
|
+
periods: ['AM', 'PM'],
|
|
71814
|
+
days: [
|
|
71815
|
+
'Sunday',
|
|
71816
|
+
'Monday',
|
|
71817
|
+
'Tuesday',
|
|
71818
|
+
'Wednesday',
|
|
71819
|
+
'Thursday',
|
|
71820
|
+
'Friday',
|
|
71821
|
+
'Saturday'
|
|
71822
|
+
],
|
|
71823
|
+
shortDays: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
|
|
71824
|
+
months: [
|
|
71825
|
+
'January',
|
|
71826
|
+
'February',
|
|
71827
|
+
'March',
|
|
71828
|
+
'April',
|
|
71829
|
+
'May',
|
|
71830
|
+
'June',
|
|
71831
|
+
'July',
|
|
71832
|
+
'August',
|
|
71833
|
+
'September',
|
|
71834
|
+
'October',
|
|
71835
|
+
'November',
|
|
71836
|
+
'December'
|
|
71837
|
+
],
|
|
71838
|
+
shortMonths: [
|
|
71839
|
+
'Jan',
|
|
71840
|
+
'Feb',
|
|
71841
|
+
'Mar',
|
|
71842
|
+
'Apr',
|
|
71843
|
+
'May',
|
|
71844
|
+
'Jun',
|
|
71845
|
+
'Jul',
|
|
71846
|
+
'Aug',
|
|
71847
|
+
'Sep',
|
|
71848
|
+
'Oct',
|
|
71849
|
+
'Nov',
|
|
71850
|
+
'Dec'
|
|
71851
|
+
]
|
|
71852
|
+
},
|
|
71853
|
+
de: {
|
|
71854
|
+
dateTime: '%A, der %e. %B %Y, %X',
|
|
71855
|
+
date: '%d.%m.%Y',
|
|
71856
|
+
time: '%H:%M:%S',
|
|
71857
|
+
periods: ['AM', 'PM'],
|
|
71858
|
+
days: [
|
|
71859
|
+
'Sonntag',
|
|
71860
|
+
'Montag',
|
|
71861
|
+
'Dienstag',
|
|
71862
|
+
'Mittwoch',
|
|
71863
|
+
'Donnerstag',
|
|
71864
|
+
'Freitag',
|
|
71865
|
+
'Samstag'
|
|
71866
|
+
],
|
|
71867
|
+
shortDays: ['So', 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa'],
|
|
71868
|
+
months: [
|
|
71869
|
+
'Januar',
|
|
71870
|
+
'Februar',
|
|
71871
|
+
'März',
|
|
71872
|
+
'April',
|
|
71873
|
+
'Mai',
|
|
71874
|
+
'Juni',
|
|
71875
|
+
'Juli',
|
|
71876
|
+
'August',
|
|
71877
|
+
'September',
|
|
71878
|
+
'Oktober',
|
|
71879
|
+
'November',
|
|
71880
|
+
'Dezember'
|
|
71881
|
+
],
|
|
71882
|
+
shortMonths: [
|
|
71883
|
+
'Jan',
|
|
71884
|
+
'Feb',
|
|
71885
|
+
'Mrz',
|
|
71886
|
+
'Apr',
|
|
71887
|
+
'Mai',
|
|
71888
|
+
'Jun',
|
|
71889
|
+
'Jul',
|
|
71890
|
+
'Aug',
|
|
71891
|
+
'Sep',
|
|
71892
|
+
'Okt',
|
|
71893
|
+
'Nov',
|
|
71894
|
+
'Dez'
|
|
71895
|
+
]
|
|
71896
|
+
}
|
|
71898
71897
|
};
|
|
71899
71898
|
|
|
71900
71899
|
const guxVisualizationCss = ":host{height:fit-content}text{fill:#2e394c}.role-axis-domain{fill:#2e394c}.role-axis-label text{fill:#596373}.mark-rule.role-axis-domain line{stroke:#2e394c}";
|
|
71900
|
+
const GuxVisualizationBetaStyle0 = guxVisualizationCss;
|
|
71901
71901
|
|
|
71902
71902
|
const GuxVisualization = class {
|
|
71903
|
-
|
|
71904
|
-
|
|
71905
|
-
|
|
71906
|
-
|
|
71907
|
-
|
|
71908
|
-
|
|
71909
|
-
|
|
71910
|
-
|
|
71911
|
-
|
|
71912
|
-
|
|
71913
|
-
|
|
71914
|
-
|
|
71915
|
-
|
|
71916
|
-
|
|
71917
|
-
|
|
71918
|
-
|
|
71919
|
-
|
|
71920
|
-
|
|
71921
|
-
|
|
71922
|
-
|
|
71923
|
-
|
|
71924
|
-
|
|
71925
|
-
|
|
71926
|
-
|
|
71927
|
-
|
|
71928
|
-
|
|
71929
|
-
|
|
71930
|
-
|
|
71931
|
-
|
|
71932
|
-
|
|
71903
|
+
constructor(hostRef) {
|
|
71904
|
+
index$3.registerInstance(this, hostRef);
|
|
71905
|
+
this.chartComponentReady = index$3.createEvent(this, "chartComponentReady", 7);
|
|
71906
|
+
this.chartClicked = index$3.createEvent(this, "chartClicked", 7);
|
|
71907
|
+
this.defaultVisualizationSpec = {};
|
|
71908
|
+
this.defaultEmbedOptions = {
|
|
71909
|
+
actions: false,
|
|
71910
|
+
renderer: 'svg'
|
|
71911
|
+
};
|
|
71912
|
+
this.visualizationSpec = undefined;
|
|
71913
|
+
this.embedOptions = undefined;
|
|
71914
|
+
}
|
|
71915
|
+
componentWillLoad() {
|
|
71916
|
+
usage.trackComponent(this.root);
|
|
71917
|
+
}
|
|
71918
|
+
handleChartClick(_name, value) {
|
|
71919
|
+
this.chartClicked.emit(value);
|
|
71920
|
+
}
|
|
71921
|
+
async componentDidRender() {
|
|
71922
|
+
const locale = getDesiredLocale(this.root);
|
|
71923
|
+
const patchOption = {
|
|
71924
|
+
patch: (visSpec) => {
|
|
71925
|
+
if (!(visSpec === null || visSpec === void 0 ? void 0 : visSpec.signals)) {
|
|
71926
|
+
visSpec.signals = [];
|
|
71927
|
+
}
|
|
71928
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
|
|
71929
|
+
visSpec.signals.push({
|
|
71930
|
+
name: 'chartClick',
|
|
71931
|
+
value: 0,
|
|
71932
|
+
on: [{ events: 'rect:mousedown', update: 'datum' }]
|
|
71933
|
+
});
|
|
71934
|
+
return visSpec;
|
|
71935
|
+
}
|
|
71936
|
+
};
|
|
71937
|
+
await embed(this.chartContainer, Object.assign({}, this.defaultVisualizationSpec, this.visualizationSpec), Object.assign({
|
|
71938
|
+
timeFormatLocale: timeFormatLocale[locale]
|
|
71939
|
+
}, this.defaultEmbedOptions, this.embedOptions, patchOption)).then(result => {
|
|
71940
|
+
result.view.addSignalListener('chartClick', (name, value) => this.handleChartClick(name, value));
|
|
71933
71941
|
});
|
|
71934
|
-
|
|
71935
|
-
|
|
71936
|
-
|
|
71937
|
-
|
|
71938
|
-
|
|
71939
|
-
|
|
71940
|
-
|
|
71941
|
-
|
|
71942
|
-
}
|
|
71943
|
-
componentDidLoad() {
|
|
71944
|
-
this.chartComponentReady.emit();
|
|
71945
|
-
}
|
|
71946
|
-
render() {
|
|
71947
|
-
return (index$3.h("div", { ref: el => (this.chartContainer = el) }));
|
|
71948
|
-
}
|
|
71949
|
-
get root() { return index$3.getElement(this); }
|
|
71942
|
+
}
|
|
71943
|
+
componentDidLoad() {
|
|
71944
|
+
this.chartComponentReady.emit();
|
|
71945
|
+
}
|
|
71946
|
+
render() {
|
|
71947
|
+
return (index$3.h("div", { key: '109a4cf0a395ef4d9b6a5aec9e306d416ae86e65', ref: el => (this.chartContainer = el) }));
|
|
71948
|
+
}
|
|
71949
|
+
get root() { return index$3.getElement(this); }
|
|
71950
71950
|
};
|
|
71951
|
-
GuxVisualization.style =
|
|
71951
|
+
GuxVisualization.style = GuxVisualizationBetaStyle0;
|
|
71952
71952
|
|
|
71953
71953
|
exports.gux_visualization_beta = GuxVisualization;
|