@oicl/openbridge-webcomponents 2.0.0-next.127 → 2.0.0-next.128
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/bundle/openbridge-webcomponents.bundle.js +55 -11
- package/bundle/openbridge-webcomponents.bundle.js.map +1 -1
- package/custom-elements.json +33 -3
- package/dist/building-blocks/chart-line/chart-line-base.d.ts +10 -2
- package/dist/building-blocks/chart-line/chart-line-base.d.ts.map +1 -1
- package/dist/building-blocks/chart-line/chart-line-base.js +27 -8
- package/dist/building-blocks/chart-line/chart-line-base.js.map +1 -1
- package/dist/charthelpers/chart-common.css.js +28 -3
- package/dist/charthelpers/chart-common.css.js.map +1 -1
- package/package.json +1 -1
package/custom-elements.json
CHANGED
|
@@ -34038,6 +34038,11 @@
|
|
|
34038
34038
|
"kind": "method",
|
|
34039
34039
|
"name": "syncScalesAndChart",
|
|
34040
34040
|
"privacy": "private",
|
|
34041
|
+
"return": {
|
|
34042
|
+
"type": {
|
|
34043
|
+
"text": "boolean"
|
|
34044
|
+
}
|
|
34045
|
+
},
|
|
34041
34046
|
"description": "Synchronize scale and chart dimensions/data\nThis is the main coordination function",
|
|
34042
34047
|
"inheritedFrom": {
|
|
34043
34048
|
"name": "ObcChartLineBase",
|
|
@@ -34134,7 +34139,12 @@
|
|
|
34134
34139
|
"kind": "method",
|
|
34135
34140
|
"name": "updateComputedDimensions",
|
|
34136
34141
|
"privacy": "private",
|
|
34137
|
-
"
|
|
34142
|
+
"return": {
|
|
34143
|
+
"type": {
|
|
34144
|
+
"text": ""
|
|
34145
|
+
}
|
|
34146
|
+
},
|
|
34147
|
+
"description": "Refresh `computedWidth` / `computedHeight`, the derived pixel size the\nchart and its slotted scales are laid out from.\n\nIn pixel mode they simply mirror `width` / `height`. Only in\n`fixedAspectRatioScaling` mode are they derived — from the wrapper's\nmeasured width and the aspect ratio the `width` / `height` pair defines —\nand only then can this rebuild the chart.",
|
|
34138
34148
|
"inheritedFrom": {
|
|
34139
34149
|
"name": "ObcChartLineBase",
|
|
34140
34150
|
"module": "src/building-blocks/chart-line/chart-line-base.ts"
|
|
@@ -35926,6 +35936,11 @@
|
|
|
35926
35936
|
"kind": "method",
|
|
35927
35937
|
"name": "syncScalesAndChart",
|
|
35928
35938
|
"privacy": "private",
|
|
35939
|
+
"return": {
|
|
35940
|
+
"type": {
|
|
35941
|
+
"text": "boolean"
|
|
35942
|
+
}
|
|
35943
|
+
},
|
|
35929
35944
|
"description": "Synchronize scale and chart dimensions/data\nThis is the main coordination function",
|
|
35930
35945
|
"inheritedFrom": {
|
|
35931
35946
|
"name": "ObcChartLineBase",
|
|
@@ -36022,7 +36037,12 @@
|
|
|
36022
36037
|
"kind": "method",
|
|
36023
36038
|
"name": "updateComputedDimensions",
|
|
36024
36039
|
"privacy": "private",
|
|
36025
|
-
"
|
|
36040
|
+
"return": {
|
|
36041
|
+
"type": {
|
|
36042
|
+
"text": ""
|
|
36043
|
+
}
|
|
36044
|
+
},
|
|
36045
|
+
"description": "Refresh `computedWidth` / `computedHeight`, the derived pixel size the\nchart and its slotted scales are laid out from.\n\nIn pixel mode they simply mirror `width` / `height`. Only in\n`fixedAspectRatioScaling` mode are they derived — from the wrapper's\nmeasured width and the aspect ratio the `width` / `height` pair defines —\nand only then can this rebuild the chart.",
|
|
36026
36046
|
"inheritedFrom": {
|
|
36027
36047
|
"name": "ObcChartLineBase",
|
|
36028
36048
|
"module": "src/building-blocks/chart-line/chart-line-base.ts"
|
|
@@ -84307,6 +84327,11 @@
|
|
|
84307
84327
|
"kind": "method",
|
|
84308
84328
|
"name": "syncScalesAndChart",
|
|
84309
84329
|
"privacy": "private",
|
|
84330
|
+
"return": {
|
|
84331
|
+
"type": {
|
|
84332
|
+
"text": "boolean"
|
|
84333
|
+
}
|
|
84334
|
+
},
|
|
84310
84335
|
"description": "Synchronize scale and chart dimensions/data\nThis is the main coordination function",
|
|
84311
84336
|
"inheritedFrom": {
|
|
84312
84337
|
"name": "ObcChartLineBase",
|
|
@@ -84403,7 +84428,12 @@
|
|
|
84403
84428
|
"kind": "method",
|
|
84404
84429
|
"name": "updateComputedDimensions",
|
|
84405
84430
|
"privacy": "private",
|
|
84406
|
-
"
|
|
84431
|
+
"return": {
|
|
84432
|
+
"type": {
|
|
84433
|
+
"text": ""
|
|
84434
|
+
}
|
|
84435
|
+
},
|
|
84436
|
+
"description": "Refresh `computedWidth` / `computedHeight`, the derived pixel size the\nchart and its slotted scales are laid out from.\n\nIn pixel mode they simply mirror `width` / `height`. Only in\n`fixedAspectRatioScaling` mode are they derived — from the wrapper's\nmeasured width and the aspect ratio the `width` / `height` pair defines —\nand only then can this rebuild the chart.",
|
|
84407
84437
|
"inheritedFrom": {
|
|
84408
84438
|
"name": "ObcChartLineBase",
|
|
84409
84439
|
"module": "src/building-blocks/chart-line/chart-line-base.ts"
|
|
@@ -476,8 +476,16 @@ export declare class ObcChartLineBase extends LitElement {
|
|
|
476
476
|
*/
|
|
477
477
|
private setupAspectRatioResizeObserver;
|
|
478
478
|
/**
|
|
479
|
-
*
|
|
480
|
-
*
|
|
479
|
+
* Refresh `computedWidth` / `computedHeight`, the derived pixel size the
|
|
480
|
+
* chart and its slotted scales are laid out from.
|
|
481
|
+
*
|
|
482
|
+
* In pixel mode they simply mirror `width` / `height`. Only in
|
|
483
|
+
* `fixedAspectRatioScaling` mode are they derived — from the wrapper's
|
|
484
|
+
* measured width and the aspect ratio the `width` / `height` pair defines —
|
|
485
|
+
* and only then can this rebuild the chart.
|
|
486
|
+
*
|
|
487
|
+
* @returns `true` when the change was significant enough that the chart was
|
|
488
|
+
* rebuilt here, so the caller must not rebuild it a second time.
|
|
481
489
|
*/
|
|
482
490
|
private updateComputedDimensions;
|
|
483
491
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chart-line-base.d.ts","sourceRoot":"","sources":["../../../src/building-blocks/chart-line/chart-line-base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,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5B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB,CAAC;
|
|
1
|
+
{"version":3,"file":"chart-line-base.d.ts","sourceRoot":"","sources":["../../../src/building-blocks/chart-line/chart-line-base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAE,cAAc,EAAkB,MAAM,KAAK,CAAC;AAkBhE,OAAO,KAAK,EAAC,YAAY,EAAE,YAAY,EAAqB,MAAM,UAAU,CAAC;AAC7E,OAAO,EACL,eAAe,EACf,UAAU,EACV,oBAAoB,EACpB,QAAQ,EACT,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAiBL,UAAU,EACX,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,+BAA+B,CAAC;AAqB/D;;;GAGG;AACH,MAAM,WAAW,uBAAuB;IACtC,6CAA6C;IAC7C,IAAI,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAC;IAC1C,8EAA8E;IAC9E,SAAS,EAAE,MAAM,CAAC;CACnB;AA0BD,YAAY,EAAC,WAAW,EAAE,YAAY,EAAC,MAAM,+BAA+B,CAAC;AAE7E,oBAAY,SAAS;IACnB,QAAQ,aAAa;IACrB,IAAI,SAAS;IACb,MAAM,WAAW;CAClB;AAED,oBAAY,aAAa;IACvB,IAAI,SAAS;IACb,KAAK,UAAU;CAChB;AAED,oBAAY,QAAQ;IAClB,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,OAAO,YAAY;CACpB;AAED,oBAAY,WAAW;IACrB,OAAO,YAAY;IACnB,IAAI,SAAS;CACd;AAED,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG;IAAC,CAAC,EAAE,WAAW,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAC,CAAC;AAElE,MAAM,MAAM,iBAAiB,GAAG;IAC9B,sEAAsE;IACtE,K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AAE,cAAc,EAAE,CAAC,EAAE;IAwC3C;;;;OAIG;IACH,SAAS,CAAC,0BAA0B;IAiCpC,+EAA+E;IAC/E,OAAO,CAAC,iBAAiB;IAYzB;;;;;OAKG;IACH,SAAS,CAAC,2BAA2B;;gBA0BD,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE;;IAcvD;;OAEG;IACH,SAAS,CAAC,eAAe,IAAI,YAAY,CAAC,MAAM,CAAC;IAwIjD;;;OAGG;IACH,OAAO,CAAC,oBAAoB;IAyC5B;;;;;;;;OAQG;IACH,SAAS,CAAC,iBAAiB,CACzB,IAAI,CAAC,EAAE,MAAM,EACb,UAAU,UAAQ,EAClB,aAAa,UAAO,GA2HG,YAAY,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC;IAGvD;;OAEG;IACH,OAAO,CAAC,yBAAyB;IAUjC,OAAO,CAAC,WAAW;IA2BnB,OAAO,CAAC,WAAW;IAmBnB;;;OAGG;IACH,OAAO,CAAC,iBAAiB;IAczB;;OAEG;IACH,OAAO,CAAC,YAAY;IAqDX,MAAM;IAgCf,OAAgB,MAAM,4BAKpB;CACH"}
|
|
@@ -97,6 +97,11 @@ const LINE_GRAPH_RECREATE_PROP_NAMES = [
|
|
|
97
97
|
"height",
|
|
98
98
|
"fixedAspectRatioScaling"
|
|
99
99
|
];
|
|
100
|
+
const LINE_GRAPH_DIMENSION_PROP_NAMES = [
|
|
101
|
+
"width",
|
|
102
|
+
"height",
|
|
103
|
+
"fixedAspectRatioScaling"
|
|
104
|
+
];
|
|
100
105
|
const _ObcChartLineBase = class _ObcChartLineBase extends LitElement {
|
|
101
106
|
constructor() {
|
|
102
107
|
super(...arguments);
|
|
@@ -629,7 +634,7 @@ const _ObcChartLineBase = class _ObcChartLineBase extends LitElement {
|
|
|
629
634
|
* This is the main coordination function
|
|
630
635
|
*/
|
|
631
636
|
syncScalesAndChart() {
|
|
632
|
-
if (this.isUpdatingScales) return;
|
|
637
|
+
if (this.isUpdatingScales) return false;
|
|
633
638
|
this.isUpdatingScales = true;
|
|
634
639
|
try {
|
|
635
640
|
const padding = this.calculatePaddingFromScales();
|
|
@@ -643,13 +648,14 @@ const _ObcChartLineBase = class _ObcChartLineBase extends LitElement {
|
|
|
643
648
|
effectiveWidth,
|
|
644
649
|
effectiveHeight
|
|
645
650
|
});
|
|
646
|
-
return;
|
|
651
|
+
return false;
|
|
647
652
|
}
|
|
648
653
|
this.updateScaleProperties(padding);
|
|
649
654
|
if (this.chart) {
|
|
650
655
|
this.chart.destroy();
|
|
651
656
|
}
|
|
652
657
|
this.createChart();
|
|
658
|
+
return true;
|
|
653
659
|
} finally {
|
|
654
660
|
this.isUpdatingScales = false;
|
|
655
661
|
}
|
|
@@ -884,6 +890,9 @@ const _ObcChartLineBase = class _ObcChartLineBase extends LitElement {
|
|
|
884
890
|
if (!this.hasAnyChanged(changed, LINE_GRAPH_WATCHED_PROP_NAMES)) {
|
|
885
891
|
return;
|
|
886
892
|
}
|
|
893
|
+
if (this.hasAnyChanged(changed, LINE_GRAPH_DIMENSION_PROP_NAMES)) {
|
|
894
|
+
if (this.updateComputedDimensions()) return;
|
|
895
|
+
}
|
|
887
896
|
if (changed.has("hasLabelPadding") && this.hasExternalScales()) {
|
|
888
897
|
this.syncScalesAndChart();
|
|
889
898
|
return;
|
|
@@ -969,19 +978,27 @@ const _ObcChartLineBase = class _ObcChartLineBase extends LitElement {
|
|
|
969
978
|
this.aspectRatioResizeObserver.observe(wrapper);
|
|
970
979
|
}
|
|
971
980
|
/**
|
|
972
|
-
*
|
|
973
|
-
*
|
|
981
|
+
* Refresh `computedWidth` / `computedHeight`, the derived pixel size the
|
|
982
|
+
* chart and its slotted scales are laid out from.
|
|
983
|
+
*
|
|
984
|
+
* In pixel mode they simply mirror `width` / `height`. Only in
|
|
985
|
+
* `fixedAspectRatioScaling` mode are they derived — from the wrapper's
|
|
986
|
+
* measured width and the aspect ratio the `width` / `height` pair defines —
|
|
987
|
+
* and only then can this rebuild the chart.
|
|
988
|
+
*
|
|
989
|
+
* @returns `true` when the change was significant enough that the chart was
|
|
990
|
+
* rebuilt here, so the caller must not rebuild it a second time.
|
|
974
991
|
*/
|
|
975
992
|
updateComputedDimensions() {
|
|
976
993
|
if (!this.fixedAspectRatioScaling) {
|
|
977
994
|
this.computedWidth = this.width;
|
|
978
995
|
this.computedHeight = this.height;
|
|
979
|
-
return;
|
|
996
|
+
return false;
|
|
980
997
|
}
|
|
981
998
|
const wrapper = this.renderRoot.querySelector(".wrapper");
|
|
982
|
-
if (!wrapper) return;
|
|
999
|
+
if (!wrapper) return false;
|
|
983
1000
|
const parentWidth = wrapper.clientWidth;
|
|
984
|
-
if (parentWidth <= 0) return;
|
|
1001
|
+
if (parentWidth <= 0) return false;
|
|
985
1002
|
const aspectRatio = this.width / this.height;
|
|
986
1003
|
const newWidth = parentWidth;
|
|
987
1004
|
const newHeight = Math.round(parentWidth / aspectRatio);
|
|
@@ -989,12 +1006,14 @@ const _ObcChartLineBase = class _ObcChartLineBase extends LitElement {
|
|
|
989
1006
|
this.computedWidth = newWidth;
|
|
990
1007
|
this.computedHeight = newHeight;
|
|
991
1008
|
if (this.hasExternalScales()) {
|
|
992
|
-
this.syncScalesAndChart();
|
|
1009
|
+
return this.syncScalesAndChart();
|
|
993
1010
|
} else if (this.chart) {
|
|
994
1011
|
this.chart.destroy();
|
|
995
1012
|
this.createChart();
|
|
1013
|
+
return true;
|
|
996
1014
|
}
|
|
997
1015
|
}
|
|
1016
|
+
return false;
|
|
998
1017
|
}
|
|
999
1018
|
/**
|
|
1000
1019
|
* Get the effective width for chart rendering.
|