@oicl/openbridge-webcomponents 2.0.0-next.77 → 2.0.0-next.79
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 +117 -29
- package/bundle/openbridge-webcomponents.bundle.js.map +1 -1
- package/custom-elements.json +77 -5
- package/dist/components/input/input.d.ts +1 -0
- package/dist/components/input/input.d.ts.map +1 -0
- package/dist/components/input/input.js +2 -0
- package/dist/components/input/input.js.map +1 -0
- package/dist/components/pagination/pagination.d.ts +9 -0
- package/dist/components/pagination/pagination.d.ts.map +1 -1
- package/dist/components/pagination/pagination.js +12 -2
- package/dist/components/pagination/pagination.js.map +1 -1
- package/dist/components/slider/slider.d.ts +14 -1
- package/dist/components/slider/slider.d.ts.map +1 -1
- package/dist/components/slider/slider.js +17 -0
- package/dist/components/slider/slider.js.map +1 -1
- package/dist/components/slider-double/slider-double.d.ts +17 -1
- package/dist/components/slider-double/slider-double.d.ts.map +1 -1
- package/dist/components/slider-double/slider-double.js +15 -0
- package/dist/components/slider-double/slider-double.js.map +1 -1
- package/dist/components/toggle-button-group/toggle-button-group.d.ts +4 -0
- package/dist/components/toggle-button-group/toggle-button-group.d.ts.map +1 -1
- package/dist/components/toggle-button-group/toggle-button-group.js +15 -3
- package/dist/components/toggle-button-group/toggle-button-group.js.map +1 -1
- package/dist/components/toggle-button-vertical-group/toggle-button-vertical-group.d.ts +4 -0
- package/dist/components/toggle-button-vertical-group/toggle-button-vertical-group.d.ts.map +1 -1
- package/dist/components/toggle-button-vertical-group/toggle-button-vertical-group.js +10 -3
- package/dist/components/toggle-button-vertical-group/toggle-button-vertical-group.js.map +1 -1
- package/dist/components/toggle-switch/toggle-switch.d.ts +2 -0
- package/dist/components/toggle-switch/toggle-switch.d.ts.map +1 -1
- package/dist/components/toggle-switch/toggle-switch.js +8 -0
- package/dist/components/toggle-switch/toggle-switch.js.map +1 -1
- package/dist/navigation-instruments/indicator-graph/indicator-graph.css.js +34 -20
- package/dist/navigation-instruments/indicator-graph/indicator-graph.css.js.map +1 -1
- package/dist/navigation-instruments/indicator-graph/indicator-graph.d.ts.map +1 -1
- package/dist/navigation-instruments/indicator-graph/indicator-graph.js +2 -1
- package/dist/navigation-instruments/indicator-graph/indicator-graph.js.map +1 -1
- package/dist/navigation-instruments/watch/watch.css.js +4 -0
- package/dist/navigation-instruments/watch/watch.css.js.map +1 -1
- package/package.json +1 -1
|
@@ -51296,6 +51296,10 @@ const compentStyle$14 = i$7`
|
|
|
51296
51296
|
box-sizing: border-box;
|
|
51297
51297
|
}
|
|
51298
51298
|
|
|
51299
|
+
:host {
|
|
51300
|
+
overflow: hidden;
|
|
51301
|
+
}
|
|
51302
|
+
|
|
51299
51303
|
.label {
|
|
51300
51304
|
font-family: var(--global-typography-font-family);
|
|
51301
51305
|
font-weight: var(--global-typography-ui-body-font-weight);
|
|
@@ -75808,12 +75812,23 @@ let ObcSlider = class extends i$4 {
|
|
|
75808
75812
|
this.value = value;
|
|
75809
75813
|
this.dispatchEvent(new CustomEvent("value", { detail: this.value }));
|
|
75810
75814
|
}
|
|
75815
|
+
/**
|
|
75816
|
+
* Fires the `change` event with the current value.
|
|
75817
|
+
*
|
|
75818
|
+
* @fires change
|
|
75819
|
+
*/
|
|
75820
|
+
fireChangeEvent() {
|
|
75821
|
+
this.dispatchEvent(
|
|
75822
|
+
new CustomEvent("change", { detail: this.value })
|
|
75823
|
+
);
|
|
75824
|
+
}
|
|
75811
75825
|
/**
|
|
75812
75826
|
* Decrements the value by `stepClick` when the left icon button is clicked.
|
|
75813
75827
|
*/
|
|
75814
75828
|
onReduceClick() {
|
|
75815
75829
|
if (this.disabled) return;
|
|
75816
75830
|
this.onInput(Math.max(this.value - this.stepClick, this.min));
|
|
75831
|
+
this.fireChangeEvent();
|
|
75817
75832
|
}
|
|
75818
75833
|
/**
|
|
75819
75834
|
* Increments the value by `stepClick` when the right icon button is clicked.
|
|
@@ -75821,6 +75836,7 @@ let ObcSlider = class extends i$4 {
|
|
|
75821
75836
|
onIncreaseClick() {
|
|
75822
75837
|
if (this.disabled) return;
|
|
75823
75838
|
this.onInput(Math.min(this.value + this.stepClick, this.max));
|
|
75839
|
+
this.fireChangeEvent();
|
|
75824
75840
|
}
|
|
75825
75841
|
get slider() {
|
|
75826
75842
|
return this.renderRoot.querySelector('input[type="range"]');
|
|
@@ -75878,12 +75894,14 @@ let ObcSlider = class extends i$4 {
|
|
|
75878
75894
|
window.removeEventListener("mousemove", this.onWindowMouseMove);
|
|
75879
75895
|
window.removeEventListener("mouseup", this.onWindowMouseUp);
|
|
75880
75896
|
this.stopAnimation();
|
|
75897
|
+
this.fireChangeEvent();
|
|
75881
75898
|
}
|
|
75882
75899
|
onTouchEnd() {
|
|
75883
75900
|
this.isTouchActive = false;
|
|
75884
75901
|
window.removeEventListener("touchmove", this.onWindowTouchMove);
|
|
75885
75902
|
window.removeEventListener("touchend", this.onWindowTouchEnd);
|
|
75886
75903
|
this.stopAnimation();
|
|
75904
|
+
this.fireChangeEvent();
|
|
75887
75905
|
}
|
|
75888
75906
|
updateTargetValue(e2) {
|
|
75889
75907
|
const rect2 = this.slider.getBoundingClientRect();
|
|
@@ -75977,6 +75995,9 @@ let ObcSlider = class extends i$4 {
|
|
|
75977
75995
|
@input=${(event) => {
|
|
75978
75996
|
this.value = Number(event.target.value);
|
|
75979
75997
|
this.dispatchEvent(new CustomEvent("value", { detail: this.value }));
|
|
75998
|
+
}}
|
|
75999
|
+
@change=${() => {
|
|
76000
|
+
this.fireChangeEvent();
|
|
75980
76001
|
}}
|
|
75981
76002
|
@mousedown=${this.onMouseDown}
|
|
75982
76003
|
@touchstart=${this.onTouchStart}
|
|
@@ -77274,6 +77295,13 @@ let ObcToggleSwitch = class extends i$4 {
|
|
|
77274
77295
|
e2.target.checked = this.checked;
|
|
77275
77296
|
}
|
|
77276
77297
|
}
|
|
77298
|
+
_fireChangeEvent(e2) {
|
|
77299
|
+
if (this.disabled) {
|
|
77300
|
+
e2.preventDefault();
|
|
77301
|
+
return;
|
|
77302
|
+
}
|
|
77303
|
+
this.dispatchEvent(new CustomEvent("change"));
|
|
77304
|
+
}
|
|
77277
77305
|
render() {
|
|
77278
77306
|
return b`
|
|
77279
77307
|
<label
|
|
@@ -77298,6 +77326,7 @@ let ObcToggleSwitch = class extends i$4 {
|
|
|
77298
77326
|
.checked=${this.checked}
|
|
77299
77327
|
?disabled=${this.disabled}
|
|
77300
77328
|
@input=${this._tryChange}
|
|
77329
|
+
@change=${this._fireChangeEvent}
|
|
77301
77330
|
/>
|
|
77302
77331
|
</div>
|
|
77303
77332
|
</div>
|
|
@@ -78080,7 +78109,7 @@ let ObcToggleButtonGroup = class extends i$4 {
|
|
|
78080
78109
|
if (this.disabled) return null;
|
|
78081
78110
|
return Array.from(this.options).find((opt) => !opt.disabled) || null;
|
|
78082
78111
|
}
|
|
78083
|
-
updateSelection(newValue,
|
|
78112
|
+
updateSelection(newValue, emitValueEvent = true, emitChangeEvent = false) {
|
|
78084
78113
|
const oldValue = this.value;
|
|
78085
78114
|
if (!this.hasAnyEnabledOption()) {
|
|
78086
78115
|
this.options.forEach((option) => {
|
|
@@ -78109,13 +78138,20 @@ let ObcToggleButtonGroup = class extends i$4 {
|
|
|
78109
78138
|
option.selected = option.value === newValue;
|
|
78110
78139
|
});
|
|
78111
78140
|
this.setNoDivider();
|
|
78112
|
-
if (
|
|
78141
|
+
if (emitValueEvent && oldValue !== newValue) {
|
|
78113
78142
|
this.dispatchEvent(
|
|
78114
78143
|
new CustomEvent("value", {
|
|
78115
78144
|
detail: { value: newValue, previousValue: oldValue }
|
|
78116
78145
|
})
|
|
78117
78146
|
);
|
|
78118
78147
|
}
|
|
78148
|
+
if (emitChangeEvent && oldValue !== newValue) {
|
|
78149
|
+
this.dispatchEvent(
|
|
78150
|
+
new CustomEvent("change", {
|
|
78151
|
+
detail: { value: newValue }
|
|
78152
|
+
})
|
|
78153
|
+
);
|
|
78154
|
+
}
|
|
78119
78155
|
}
|
|
78120
78156
|
updateActivated(newValue) {
|
|
78121
78157
|
if (newValue) {
|
|
@@ -78216,8 +78252,13 @@ let ObcToggleButtonGroup = class extends i$4 {
|
|
|
78216
78252
|
detail: { value, previousValue: this.value }
|
|
78217
78253
|
})
|
|
78218
78254
|
);
|
|
78255
|
+
this.dispatchEvent(
|
|
78256
|
+
new CustomEvent("change", {
|
|
78257
|
+
detail: { value }
|
|
78258
|
+
})
|
|
78259
|
+
);
|
|
78219
78260
|
} else {
|
|
78220
|
-
this.updateSelection(value);
|
|
78261
|
+
this.updateSelection(value, true, true);
|
|
78221
78262
|
}
|
|
78222
78263
|
}
|
|
78223
78264
|
willUpdate(changedProperties) {
|
|
@@ -94344,7 +94385,14 @@ let ObcPagination = class extends i$4 {
|
|
|
94344
94385
|
this.fullWidth = false;
|
|
94345
94386
|
this.disabled = false;
|
|
94346
94387
|
this.handlePageChange = (event) => {
|
|
94347
|
-
this.setCurrentPage(Number(event.detail.value));
|
|
94388
|
+
const success = this.setCurrentPage(Number(event.detail.value));
|
|
94389
|
+
if (success) {
|
|
94390
|
+
this.dispatchEvent(
|
|
94391
|
+
new CustomEvent("select-page", {
|
|
94392
|
+
detail: { page: Number(event.detail.value) }
|
|
94393
|
+
})
|
|
94394
|
+
);
|
|
94395
|
+
}
|
|
94348
94396
|
};
|
|
94349
94397
|
this.handleFirstClick = () => {
|
|
94350
94398
|
if (!this.canNavigateFirst) return;
|
|
@@ -94405,13 +94453,16 @@ let ObcPagination = class extends i$4 {
|
|
|
94405
94453
|
}
|
|
94406
94454
|
setCurrentPage(newPage) {
|
|
94407
94455
|
const page = Math.max(1, Math.min(newPage, this.validatedPages));
|
|
94408
|
-
if (page === this.currentPage)
|
|
94456
|
+
if (page === this.currentPage) {
|
|
94457
|
+
return false;
|
|
94458
|
+
}
|
|
94409
94459
|
this.currentPage = page;
|
|
94410
94460
|
this.dispatchEvent(
|
|
94411
94461
|
new CustomEvent("value", {
|
|
94412
94462
|
detail: { value: page }
|
|
94413
94463
|
})
|
|
94414
94464
|
);
|
|
94465
|
+
return true;
|
|
94415
94466
|
}
|
|
94416
94467
|
dispatchNavigateEvent(action) {
|
|
94417
94468
|
this.dispatchEvent(
|
|
@@ -100660,6 +100711,18 @@ let ObcSliderDouble = class extends i$4 {
|
|
|
100660
100711
|
new CustomEvent("value", { detail: { low: this.low, high: this.high } })
|
|
100661
100712
|
);
|
|
100662
100713
|
}
|
|
100714
|
+
/**
|
|
100715
|
+
* Fires the `change` event with the current low and high values.
|
|
100716
|
+
*
|
|
100717
|
+
* @fires change
|
|
100718
|
+
*/
|
|
100719
|
+
fireChangeEvent() {
|
|
100720
|
+
this.dispatchEvent(
|
|
100721
|
+
new CustomEvent("change", {
|
|
100722
|
+
detail: { low: this.low, high: this.high }
|
|
100723
|
+
})
|
|
100724
|
+
);
|
|
100725
|
+
}
|
|
100663
100726
|
lowClickValue(e2) {
|
|
100664
100727
|
const rect2 = this.minInput.getBoundingClientRect();
|
|
100665
100728
|
const left = rect2.left + this.THUMB_WIDTH - this.THUMB_VISIBLE_WIDTH / 2;
|
|
@@ -100747,6 +100810,7 @@ let ObcSliderDouble = class extends i$4 {
|
|
|
100747
100810
|
window.removeEventListener("mousemove", this.onWindowMouseMove);
|
|
100748
100811
|
window.removeEventListener("mouseup", this.onWindowMouseUp);
|
|
100749
100812
|
this.stopAnimation();
|
|
100813
|
+
this.fireChangeEvent();
|
|
100750
100814
|
}
|
|
100751
100815
|
updateTargetValue(e2) {
|
|
100752
100816
|
const unroundedValue = this.isTargetingLow ? this.lowClickValue(e2) : this.highClickValue(e2);
|
|
@@ -100863,6 +100927,7 @@ let ObcSliderDouble = class extends i$4 {
|
|
|
100863
100927
|
.value=${this.low.toString()}
|
|
100864
100928
|
?disabled=${this.variant === "no-input" || this.disabled}
|
|
100865
100929
|
@input=${this.onInput}
|
|
100930
|
+
@change=${() => this.fireChangeEvent()}
|
|
100866
100931
|
/>
|
|
100867
100932
|
<input
|
|
100868
100933
|
type="range"
|
|
@@ -100873,6 +100938,7 @@ let ObcSliderDouble = class extends i$4 {
|
|
|
100873
100938
|
.value=${this.high.toString()}
|
|
100874
100939
|
?disabled=${this.variant === "no-input" || this.disabled}
|
|
100875
100940
|
@input=${this.onInput}
|
|
100941
|
+
@change=${() => this.fireChangeEvent()}
|
|
100876
100942
|
/>
|
|
100877
100943
|
<div class="interactive-track"></div>
|
|
100878
100944
|
<div class="thumb min"></div>
|
|
@@ -107397,7 +107463,7 @@ let ObcToggleButtonVerticalGroup = class extends i$4 {
|
|
|
107397
107463
|
if (this.disabled) return null;
|
|
107398
107464
|
return Array.from(this.options).find((opt) => !opt.disabled) || null;
|
|
107399
107465
|
}
|
|
107400
|
-
updateSelection(newValue,
|
|
107466
|
+
updateSelection(newValue, emitValueEvent = true, emitChangeEvent = false) {
|
|
107401
107467
|
const oldValue = this.value;
|
|
107402
107468
|
if (!this.hasAnyEnabledOption()) {
|
|
107403
107469
|
this.options.forEach((option) => {
|
|
@@ -107426,13 +107492,20 @@ let ObcToggleButtonVerticalGroup = class extends i$4 {
|
|
|
107426
107492
|
option.selected = option.value === newValue;
|
|
107427
107493
|
});
|
|
107428
107494
|
this.updateDividers();
|
|
107429
|
-
if (
|
|
107495
|
+
if (emitValueEvent && oldValue !== newValue) {
|
|
107430
107496
|
this.dispatchEvent(
|
|
107431
107497
|
new CustomEvent("value", {
|
|
107432
107498
|
detail: { value: newValue, previousValue: oldValue }
|
|
107433
107499
|
})
|
|
107434
107500
|
);
|
|
107435
107501
|
}
|
|
107502
|
+
if (emitChangeEvent && oldValue !== newValue) {
|
|
107503
|
+
this.dispatchEvent(
|
|
107504
|
+
new CustomEvent("change", {
|
|
107505
|
+
detail: { value: newValue }
|
|
107506
|
+
})
|
|
107507
|
+
);
|
|
107508
|
+
}
|
|
107436
107509
|
}
|
|
107437
107510
|
firstUpdated(changed) {
|
|
107438
107511
|
super.firstUpdated(changed);
|
|
@@ -107531,7 +107604,7 @@ let ObcToggleButtonVerticalGroup = class extends i$4 {
|
|
|
107531
107604
|
}
|
|
107532
107605
|
onOptionSelected(e2) {
|
|
107533
107606
|
const { value } = e2.detail;
|
|
107534
|
-
this.updateSelection(value);
|
|
107607
|
+
this.updateSelection(value, true, true);
|
|
107535
107608
|
}
|
|
107536
107609
|
render() {
|
|
107537
107610
|
const classes = {
|
|
@@ -219131,10 +219204,36 @@ const compentStyle$7 = i$7`
|
|
|
219131
219204
|
.chart-container {
|
|
219132
219205
|
width: 100%;
|
|
219133
219206
|
height: 100%;
|
|
219207
|
+
box-sizing: border-box;
|
|
219134
219208
|
display: flex;
|
|
219135
219209
|
align-items: center;
|
|
219136
219210
|
justify-content: center;
|
|
219137
219211
|
position: relative;
|
|
219212
|
+
|
|
219213
|
+
padding-bottom: 0.5px;
|
|
219214
|
+
|
|
219215
|
+
--dot-width: 6px;
|
|
219216
|
+
--dot-radius: calc(var(--dot-width) / 2);
|
|
219217
|
+
}
|
|
219218
|
+
|
|
219219
|
+
.chart-container.medium {
|
|
219220
|
+
--dot-width: 8px;
|
|
219221
|
+
}
|
|
219222
|
+
|
|
219223
|
+
.chart-container.large {
|
|
219224
|
+
--dot-width: 10px;
|
|
219225
|
+
}
|
|
219226
|
+
|
|
219227
|
+
.u-over {
|
|
219228
|
+
position: absolute;
|
|
219229
|
+
}
|
|
219230
|
+
|
|
219231
|
+
#chart {
|
|
219232
|
+
position: absolute;
|
|
219233
|
+
width: calc(100% - var(--dot-radius));
|
|
219234
|
+
left: 0;
|
|
219235
|
+
top: var(--dot-radius);
|
|
219236
|
+
bottom: var(--dot-radius);
|
|
219138
219237
|
}
|
|
219139
219238
|
|
|
219140
219239
|
canvas {
|
|
@@ -219146,11 +219245,12 @@ canvas {
|
|
|
219146
219245
|
}
|
|
219147
219246
|
|
|
219148
219247
|
#dot {
|
|
219248
|
+
box-sizing: border-box;
|
|
219149
219249
|
position: absolute;
|
|
219150
|
-
width:
|
|
219151
|
-
height:
|
|
219152
|
-
right:
|
|
219153
|
-
bottom:
|
|
219250
|
+
width: var(--dot-width);
|
|
219251
|
+
height: var(--dot-width);
|
|
219252
|
+
right: 0;
|
|
219253
|
+
bottom: 0;
|
|
219154
219254
|
border-radius: 50%;
|
|
219155
219255
|
background: var(--element-neutral-color);
|
|
219156
219256
|
border: 1px solid var(--border-silhouette-color);
|
|
@@ -219161,25 +219261,12 @@ canvas {
|
|
|
219161
219261
|
background: var(--element-neutral-enhanced-color);
|
|
219162
219262
|
}
|
|
219163
219263
|
|
|
219164
|
-
.medium #dot {
|
|
219165
|
-
width: 6px;
|
|
219166
|
-
height: 6px;
|
|
219167
|
-
right: -4px;
|
|
219168
|
-
bottom: -4px;
|
|
219169
|
-
}
|
|
219170
|
-
|
|
219171
|
-
.large #dot {
|
|
219172
|
-
width: 8px;
|
|
219173
|
-
height: 8px;
|
|
219174
|
-
right: -5px;
|
|
219175
|
-
bottom: -5px;
|
|
219176
|
-
}
|
|
219177
|
-
|
|
219178
219264
|
#zero-line {
|
|
219179
219265
|
position: absolute;
|
|
219180
|
-
|
|
219266
|
+
left: 0;
|
|
219267
|
+
right: var(--dot-radius);
|
|
219181
219268
|
height: 1px;
|
|
219182
|
-
bottom: -0.5px;
|
|
219269
|
+
bottom: calc(var(--dot-radius) - 0.5px);
|
|
219183
219270
|
background: var(--element-disabled-color);
|
|
219184
219271
|
border-radius: 2px;
|
|
219185
219272
|
}
|
|
@@ -219335,6 +219422,7 @@ let ObcIndicatorGraph = class extends i$4 {
|
|
|
219335
219422
|
<div
|
|
219336
219423
|
class="chart-container ${this._effectivePriority} ${this._effectiveSize}"
|
|
219337
219424
|
>
|
|
219425
|
+
<div id="chart"></div>
|
|
219338
219426
|
<div
|
|
219339
219427
|
id="zero-line"
|
|
219340
219428
|
style="transform: translateY(${-(this.zeroLineY ?? 0)}px);
|
|
@@ -219359,7 +219447,7 @@ __decorateClass$p([
|
|
|
219359
219447
|
n$3({ type: Object })
|
|
219360
219448
|
], ObcIndicatorGraph.prototype, "layout", 2);
|
|
219361
219449
|
__decorateClass$p([
|
|
219362
|
-
e$3("
|
|
219450
|
+
e$3("#chart")
|
|
219363
219451
|
], ObcIndicatorGraph.prototype, "chart", 2);
|
|
219364
219452
|
__decorateClass$p([
|
|
219365
219453
|
r$3()
|