@oicl/openbridge-webcomponents 2.0.0-next.126 → 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 +75 -15
- package/bundle/openbridge-webcomponents.bundle.js.map +1 -1
- package/custom-elements.json +835 -545
- package/dist/automation/analog-valve/analog-valve.d.ts.map +1 -1
- package/dist/automation/analog-valve/analog-valve.js +3 -0
- package/dist/automation/analog-valve/analog-valve.js.map +1 -1
- package/dist/automation/automation-button/abstract-automation-button-motorized.d.ts.map +1 -1
- package/dist/automation/automation-button/abstract-automation-button-motorized.js +3 -0
- package/dist/automation/automation-button/abstract-automation-button-motorized.js.map +1 -1
- package/dist/automation/automation-button/abstract-automation-button-squared.d.ts.map +1 -1
- package/dist/automation/automation-button/abstract-automation-button-squared.js +3 -0
- package/dist/automation/automation-button/abstract-automation-button-squared.js.map +1 -1
- package/dist/automation/automation-button/abstract-automation-button.d.ts +4 -1
- package/dist/automation/automation-button/abstract-automation-button.d.ts.map +1 -1
- package/dist/automation/automation-button/abstract-automation-button.js +8 -4
- package/dist/automation/automation-button/abstract-automation-button.js.map +1 -1
- package/dist/automation/digital-valve/digital-valve.d.ts.map +1 -1
- package/dist/automation/digital-valve/digital-valve.js +3 -0
- package/dist/automation/digital-valve/digital-valve.js.map +1 -1
- 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 +6 -6
|
@@ -18137,7 +18137,9 @@ class ObcAbstractAutomationButton extends i$4 {
|
|
|
18137
18137
|
super(...arguments);
|
|
18138
18138
|
this.showReadoutStack = true;
|
|
18139
18139
|
this.readoutPosition = AutomationButtonReadoutPosition.bottom;
|
|
18140
|
+
this.showStatus = true;
|
|
18140
18141
|
this.readoutSize = AutomationButtonReadoutStackSize.regular;
|
|
18142
|
+
this.tag = null;
|
|
18141
18143
|
this.positioning = AutomationButtonPositioning.point;
|
|
18142
18144
|
this.activated = false;
|
|
18143
18145
|
this.alert = false;
|
|
@@ -18150,7 +18152,6 @@ class ObcAbstractAutomationButton extends i$4 {
|
|
|
18150
18152
|
this.progress = false;
|
|
18151
18153
|
this.progressMode = CircularProgressMode.indeterminate;
|
|
18152
18154
|
this.progressValue = 0;
|
|
18153
|
-
this.tag = null;
|
|
18154
18155
|
this.badgeControl = "none";
|
|
18155
18156
|
this.badgeCommandLocked = "none";
|
|
18156
18157
|
this.badgeInterlock = "none";
|
|
@@ -18325,9 +18326,15 @@ __decorateClass$zA([
|
|
|
18325
18326
|
__decorateClass$zA([
|
|
18326
18327
|
n$3({ type: String })
|
|
18327
18328
|
], ObcAbstractAutomationButton.prototype, "readoutPosition");
|
|
18329
|
+
__decorateClass$zA([
|
|
18330
|
+
n$3({ type: Boolean, attribute: false })
|
|
18331
|
+
], ObcAbstractAutomationButton.prototype, "showStatus");
|
|
18328
18332
|
__decorateClass$zA([
|
|
18329
18333
|
n$3({ type: String })
|
|
18330
18334
|
], ObcAbstractAutomationButton.prototype, "readoutSize");
|
|
18335
|
+
__decorateClass$zA([
|
|
18336
|
+
n$3({ type: String })
|
|
18337
|
+
], ObcAbstractAutomationButton.prototype, "tag");
|
|
18331
18338
|
__decorateClass$zA([
|
|
18332
18339
|
n$3({ type: String })
|
|
18333
18340
|
], ObcAbstractAutomationButton.prototype, "positioning");
|
|
@@ -18364,9 +18371,6 @@ __decorateClass$zA([
|
|
|
18364
18371
|
__decorateClass$zA([
|
|
18365
18372
|
n$3({ type: Number })
|
|
18366
18373
|
], ObcAbstractAutomationButton.prototype, "progressValue");
|
|
18367
|
-
__decorateClass$zA([
|
|
18368
|
-
n$3({ type: String })
|
|
18369
|
-
], ObcAbstractAutomationButton.prototype, "tag");
|
|
18370
18374
|
__decorateClass$zA([
|
|
18371
18375
|
n$3({ type: String })
|
|
18372
18376
|
], ObcAbstractAutomationButton.prototype, "badgeControl");
|
|
@@ -18411,6 +18415,9 @@ let ObcAnalogValve = class extends ObcAbstractAutomationButton {
|
|
|
18411
18415
|
this.variant = "regular";
|
|
18412
18416
|
}
|
|
18413
18417
|
get extraReadouts() {
|
|
18418
|
+
if (!this.showStatus) {
|
|
18419
|
+
return [];
|
|
18420
|
+
}
|
|
18414
18421
|
if (this.open) {
|
|
18415
18422
|
return [
|
|
18416
18423
|
{
|
|
@@ -18498,6 +18505,9 @@ class ObcAbstractAutomationButtonMotorized extends ObcAbstractAutomationButton {
|
|
|
18498
18505
|
}
|
|
18499
18506
|
get extraReadouts() {
|
|
18500
18507
|
const speed = this.speed ?? this.speedInPercent;
|
|
18508
|
+
if (!this.showStatus) {
|
|
18509
|
+
return [];
|
|
18510
|
+
}
|
|
18501
18511
|
if (speed !== void 0 && speed !== null && this.on) {
|
|
18502
18512
|
return [
|
|
18503
18513
|
{
|
|
@@ -18568,6 +18578,9 @@ class ObcAbstractAutomationButtonSquared extends ObcAbstractAutomationButton {
|
|
|
18568
18578
|
return this.orientation;
|
|
18569
18579
|
}
|
|
18570
18580
|
get extraReadouts() {
|
|
18581
|
+
if (!this.showStatus) {
|
|
18582
|
+
return [];
|
|
18583
|
+
}
|
|
18571
18584
|
if (this.on) {
|
|
18572
18585
|
return [
|
|
18573
18586
|
{
|
|
@@ -20336,11 +20349,36 @@ canvas {
|
|
|
20336
20349
|
display: block;
|
|
20337
20350
|
}
|
|
20338
20351
|
|
|
20339
|
-
/* Fixed aspect ratio scaling mode: canvas
|
|
20352
|
+
/* Fixed aspect ratio scaling mode: the canvas container must be a definite
|
|
20353
|
+
box, not shrink-to-fit. The wrapper is a column flex with align-items:
|
|
20354
|
+
center, so the container would otherwise size to the canvas' max-content
|
|
20355
|
+
width — and a canvas with an auto width and a definite height resolves
|
|
20356
|
+
against its intrinsic 2:1 ratio, capping the chart at height * 2. */
|
|
20340
20357
|
|
|
20341
|
-
:host([fixedaspectratioscaling]) canvas {
|
|
20358
|
+
:host([fixedaspectratioscaling]) .canvas-and-slots-container {
|
|
20342
20359
|
width: 100%;
|
|
20343
|
-
|
|
20360
|
+
}
|
|
20361
|
+
|
|
20362
|
+
/* Fixed aspect ratio scaling mode: canvas fills wrapper.
|
|
20363
|
+
|
|
20364
|
+
\`!important\` is load-bearing, not a shortcut. Chart.js measures the
|
|
20365
|
+
container with getBoundingClientRect() — which is scaled by any ancestor
|
|
20366
|
+
CSS \`zoom\` — and writes that number straight back as an inline
|
|
20367
|
+
\`style="width/height: Npx"\`. The browser then scales that CSS-pixel value
|
|
20368
|
+
by the same zoom a second time, so the canvas lands at zoom² of its cell
|
|
20369
|
+
(64% at zoom 0.8, 156% at zoom 1.25). Overriding the inline style pins the
|
|
20370
|
+
canvas to the box the layout actually gave it at every zoom level; Chart.js
|
|
20371
|
+
keeps using its own measurement for the drawing buffer, which only affects
|
|
20372
|
+
raster resolution, not geometry.
|
|
20373
|
+
|
|
20374
|
+
No auto margins here either: Chart.js subtracts the canvas' resolved
|
|
20375
|
+
margins from the container width, so centring it with \`margin: 0 auto\`
|
|
20376
|
+
makes the leftover space permanently unavailable to it. */
|
|
20377
|
+
|
|
20378
|
+
:host([fixedaspectratioscaling]) canvas {
|
|
20379
|
+
width: 100% !important;
|
|
20380
|
+
height: var(--chart-height, auto) !important;
|
|
20381
|
+
margin: 0;
|
|
20344
20382
|
}
|
|
20345
20383
|
`;
|
|
20346
20384
|
const chartDebugStyle = i$7`* {
|
|
@@ -35253,6 +35291,11 @@ const LINE_GRAPH_RECREATE_PROP_NAMES = [
|
|
|
35253
35291
|
"height",
|
|
35254
35292
|
"fixedAspectRatioScaling"
|
|
35255
35293
|
];
|
|
35294
|
+
const LINE_GRAPH_DIMENSION_PROP_NAMES = [
|
|
35295
|
+
"width",
|
|
35296
|
+
"height",
|
|
35297
|
+
"fixedAspectRatioScaling"
|
|
35298
|
+
];
|
|
35256
35299
|
const _ObcChartLineBase = class _ObcChartLineBase extends i$4 {
|
|
35257
35300
|
constructor() {
|
|
35258
35301
|
super(...arguments);
|
|
@@ -35785,7 +35828,7 @@ const _ObcChartLineBase = class _ObcChartLineBase extends i$4 {
|
|
|
35785
35828
|
* This is the main coordination function
|
|
35786
35829
|
*/
|
|
35787
35830
|
syncScalesAndChart() {
|
|
35788
|
-
if (this.isUpdatingScales) return;
|
|
35831
|
+
if (this.isUpdatingScales) return false;
|
|
35789
35832
|
this.isUpdatingScales = true;
|
|
35790
35833
|
try {
|
|
35791
35834
|
const padding = this.calculatePaddingFromScales();
|
|
@@ -35799,13 +35842,14 @@ const _ObcChartLineBase = class _ObcChartLineBase extends i$4 {
|
|
|
35799
35842
|
effectiveWidth,
|
|
35800
35843
|
effectiveHeight
|
|
35801
35844
|
});
|
|
35802
|
-
return;
|
|
35845
|
+
return false;
|
|
35803
35846
|
}
|
|
35804
35847
|
this.updateScaleProperties(padding);
|
|
35805
35848
|
if (this.chart) {
|
|
35806
35849
|
this.chart.destroy();
|
|
35807
35850
|
}
|
|
35808
35851
|
this.createChart();
|
|
35852
|
+
return true;
|
|
35809
35853
|
} finally {
|
|
35810
35854
|
this.isUpdatingScales = false;
|
|
35811
35855
|
}
|
|
@@ -36040,6 +36084,9 @@ const _ObcChartLineBase = class _ObcChartLineBase extends i$4 {
|
|
|
36040
36084
|
if (!this.hasAnyChanged(changed, LINE_GRAPH_WATCHED_PROP_NAMES)) {
|
|
36041
36085
|
return;
|
|
36042
36086
|
}
|
|
36087
|
+
if (this.hasAnyChanged(changed, LINE_GRAPH_DIMENSION_PROP_NAMES)) {
|
|
36088
|
+
if (this.updateComputedDimensions()) return;
|
|
36089
|
+
}
|
|
36043
36090
|
if (changed.has("hasLabelPadding") && this.hasExternalScales()) {
|
|
36044
36091
|
this.syncScalesAndChart();
|
|
36045
36092
|
return;
|
|
@@ -36125,19 +36172,27 @@ const _ObcChartLineBase = class _ObcChartLineBase extends i$4 {
|
|
|
36125
36172
|
this.aspectRatioResizeObserver.observe(wrapper);
|
|
36126
36173
|
}
|
|
36127
36174
|
/**
|
|
36128
|
-
*
|
|
36129
|
-
*
|
|
36175
|
+
* Refresh `computedWidth` / `computedHeight`, the derived pixel size the
|
|
36176
|
+
* chart and its slotted scales are laid out from.
|
|
36177
|
+
*
|
|
36178
|
+
* In pixel mode they simply mirror `width` / `height`. Only in
|
|
36179
|
+
* `fixedAspectRatioScaling` mode are they derived — from the wrapper's
|
|
36180
|
+
* measured width and the aspect ratio the `width` / `height` pair defines —
|
|
36181
|
+
* and only then can this rebuild the chart.
|
|
36182
|
+
*
|
|
36183
|
+
* @returns `true` when the change was significant enough that the chart was
|
|
36184
|
+
* rebuilt here, so the caller must not rebuild it a second time.
|
|
36130
36185
|
*/
|
|
36131
36186
|
updateComputedDimensions() {
|
|
36132
36187
|
if (!this.fixedAspectRatioScaling) {
|
|
36133
36188
|
this.computedWidth = this.width;
|
|
36134
36189
|
this.computedHeight = this.height;
|
|
36135
|
-
return;
|
|
36190
|
+
return false;
|
|
36136
36191
|
}
|
|
36137
36192
|
const wrapper = this.renderRoot.querySelector(".wrapper");
|
|
36138
|
-
if (!wrapper) return;
|
|
36193
|
+
if (!wrapper) return false;
|
|
36139
36194
|
const parentWidth = wrapper.clientWidth;
|
|
36140
|
-
if (parentWidth <= 0) return;
|
|
36195
|
+
if (parentWidth <= 0) return false;
|
|
36141
36196
|
const aspectRatio = this.width / this.height;
|
|
36142
36197
|
const newWidth = parentWidth;
|
|
36143
36198
|
const newHeight = Math.round(parentWidth / aspectRatio);
|
|
@@ -36145,12 +36200,14 @@ const _ObcChartLineBase = class _ObcChartLineBase extends i$4 {
|
|
|
36145
36200
|
this.computedWidth = newWidth;
|
|
36146
36201
|
this.computedHeight = newHeight;
|
|
36147
36202
|
if (this.hasExternalScales()) {
|
|
36148
|
-
this.syncScalesAndChart();
|
|
36203
|
+
return this.syncScalesAndChart();
|
|
36149
36204
|
} else if (this.chart) {
|
|
36150
36205
|
this.chart.destroy();
|
|
36151
36206
|
this.createChart();
|
|
36207
|
+
return true;
|
|
36152
36208
|
}
|
|
36153
36209
|
}
|
|
36210
|
+
return false;
|
|
36154
36211
|
}
|
|
36155
36212
|
/**
|
|
36156
36213
|
* Get the effective width for chart rendering.
|
|
@@ -40705,6 +40762,9 @@ let ObcDigitalValve = class extends ObcAbstractAutomationButton {
|
|
|
40705
40762
|
return this.open;
|
|
40706
40763
|
}
|
|
40707
40764
|
get extraReadouts() {
|
|
40765
|
+
if (!this.showStatus) {
|
|
40766
|
+
return [];
|
|
40767
|
+
}
|
|
40708
40768
|
if (this.open) {
|
|
40709
40769
|
return [
|
|
40710
40770
|
{
|