@oicl/openbridge-webcomponents-full-bundle 2.2.0-next.22 → 2.2.0-next.23
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/custom-elements-manifest.config.mjs +2 -1
- package/custom-elements.json +312 -17
- package/llms/components/obc-accordion-card.md +141 -0
- package/llms/components/obc-accordion-item.md +90 -0
- package/llms/components/obc-advice-button.md +87 -0
- package/llms/components/obc-advice-floating-item.md +113 -0
- package/llms/components/obc-advice-menu-item.md +87 -0
- package/llms/components/obc-advice-message-item.md +138 -0
- package/llms/components/obc-alert-button-item.md +117 -0
- package/llms/components/obc-alert-button.md +134 -0
- package/llms/components/obc-alert-counter-item.md +74 -0
- package/llms/components/obc-alert-detail-page.md +45 -0
- package/llms/components/obc-alert-floating-item.md +53 -0
- package/llms/components/obc-alert-frame.md +142 -0
- package/llms/components/obc-alert-icon.md +79 -0
- package/llms/components/obc-alert-list-details-experimental.md +89 -0
- package/llms/components/obc-alert-list-details.md +38 -0
- package/llms/components/obc-alert-list-page-small.md +39 -0
- package/llms/components/obc-alert-list.md +37 -0
- package/llms/components/obc-alert-menu-item.md +128 -0
- package/llms/components/obc-alert-menu.md +115 -0
- package/llms/components/obc-alert-subsystem-button.md +88 -0
- package/llms/components/obc-alert-subsystem-counter.md +110 -0
- package/llms/components/obc-analog-threeway-valve.md +106 -0
- package/llms/components/obc-analog-valve.md +74 -0
- package/llms/components/obc-app-button.md +83 -0
- package/llms/components/obc-app-menu.md +69 -0
- package/llms/components/obc-area-graph.md +333 -0
- package/llms/components/obc-attachment-list-item.md +49 -0
- package/llms/components/obc-audio-output.md +59 -0
- package/llms/components/obc-audio-recording-item.md +91 -0
- package/llms/components/obc-automation-badge.md +66 -0
- package/llms/components/obc-automation-button-readout-stack.md +71 -0
- package/llms/components/obc-automation-button.md +86 -0
- package/llms/components/obc-automation-input-modal.md +48 -0
- package/llms/components/obc-automation-readout.md +32 -0
- package/llms/components/obc-automation-tank.md +156 -0
- package/llms/components/obc-azimuth-thruster-labeled.md +56 -0
- package/llms/components/obc-azimuth-thruster.md +80 -0
- package/llms/components/obc-badge-command.md +26 -0
- package/llms/components/obc-badge.md +151 -0
- package/llms/components/obc-bar-horizontal.md +123 -0
- package/llms/components/obc-bar-vertical.md +125 -0
- package/llms/components/obc-battery-icon.md +38 -0
- package/llms/components/obc-bearing-indicator.md +27 -0
- package/llms/components/obc-bipolar-transistor.md +64 -0
- package/llms/components/obc-breadcrumb.md +58 -0
- package/llms/components/obc-brilliance-menu.md +115 -0
- package/llms/components/obc-bus.md +64 -0
- package/llms/components/obc-button.md +110 -0
- package/llms/components/obc-calendar.md +91 -0
- package/llms/components/obc-capacitor.md +64 -0
- package/llms/components/obc-card.md +103 -0
- package/llms/components/obc-chart-object-vessel-button.md +103 -0
- package/llms/components/obc-chat-message.md +35 -0
- package/llms/components/obc-check-button.md +104 -0
- package/llms/components/obc-checkbox-item.md +95 -0
- package/llms/components/obc-checkbox-list.md +73 -0
- package/llms/components/obc-checkbox.md +97 -0
- package/llms/components/obc-circular-progress.md +36 -0
- package/llms/components/obc-clock.md +86 -0
- package/llms/components/obc-command-button.md +56 -0
- package/llms/components/obc-command-menu.md +135 -0
- package/llms/components/obc-communication-table.md +31 -0
- package/llms/components/obc-compass-flat.md +79 -0
- package/llms/components/obc-compass-indicator.md +61 -0
- package/llms/components/obc-compass-sector.md +110 -0
- package/llms/components/obc-compass.md +157 -0
- package/llms/components/obc-context-menu-input.md +191 -0
- package/llms/components/obc-converter.md +64 -0
- package/llms/components/obc-corner-line.md +29 -0
- package/llms/components/obc-current.md +79 -0
- package/llms/components/obc-damper.md +62 -0
- package/llms/components/obc-date-item.md +66 -0
- package/llms/components/obc-depth-actual.md +69 -0
- package/llms/components/obc-depth-indicator.md +31 -0
- package/llms/components/obc-depth-top-band.md +43 -0
- package/llms/components/obc-depth.md +94 -0
- package/llms/components/obc-diagnostic-button.md +71 -0
- package/llms/components/obc-diagnostic-menu.md +88 -0
- package/llms/components/obc-digital-threeway-valve.md +112 -0
- package/llms/components/obc-digital-valve.md +78 -0
- package/llms/components/obc-diodes.md +64 -0
- package/llms/components/obc-direction-line.md +28 -0
- package/llms/components/obc-divider.md +44 -0
- package/llms/components/obc-donut-chart.md +116 -0
- package/llms/components/obc-draft-trim.md +67 -0
- package/llms/components/obc-dropdown-button.md +99 -0
- package/llms/components/obc-electricity-battery.md +83 -0
- package/llms/components/obc-elevated-card-radio-group.md +103 -0
- package/llms/components/obc-elevated-card-radio.md +104 -0
- package/llms/components/obc-elevated-card.md +146 -0
- package/llms/components/obc-end-point-line.md +29 -0
- package/llms/components/obc-event-item.md +47 -0
- package/llms/components/obc-event-list.md +37 -0
- package/llms/components/obc-fan.md +68 -0
- package/llms/components/obc-filter-chip.md +91 -0
- package/llms/components/obc-filter.md +64 -0
- package/llms/components/obc-floating-item.md +125 -0
- package/llms/components/obc-form-container.md +45 -0
- package/llms/components/obc-form-footer-container.md +34 -0
- package/llms/components/obc-form-group.md +80 -0
- package/llms/components/obc-form-item.md +95 -0
- package/llms/components/obc-gauge-bar-indicator.md +46 -0
- package/llms/components/obc-gauge-generator.md +102 -0
- package/llms/components/obc-gauge-horizontal.md +169 -0
- package/llms/components/obc-gauge-motors-and-pumps.md +110 -0
- package/llms/components/obc-gauge-proportional.md +134 -0
- package/llms/components/obc-gauge-radial-indicator.md +76 -0
- package/llms/components/obc-gauge-radial.md +163 -0
- package/llms/components/obc-gauge-trend-indicator.md +53 -0
- package/llms/components/obc-gauge-trend.md +271 -0
- package/llms/components/obc-gauge-valve.md +114 -0
- package/llms/components/obc-gauge-vertical.md +169 -0
- package/llms/components/obc-gnss-skyplot.md +80 -0
- package/llms/components/obc-graph-mini.md +28 -0
- package/llms/components/obc-ground.md +64 -0
- package/llms/components/obc-heading-indicator.md +42 -0
- package/llms/components/obc-heading.md +106 -0
- package/llms/components/obc-heat-exchanger.md +80 -0
- package/llms/components/obc-heat-pump.md +79 -0
- package/llms/components/obc-heave-indicator.md +38 -0
- package/llms/components/obc-heave.md +60 -0
- package/llms/components/obc-horizontal-line.md +29 -0
- package/llms/components/obc-hydraulic-check-valve.md +36 -0
- package/llms/components/obc-hydraulic-separator.md +80 -0
- package/llms/components/obc-hydraulic-valve-4-3.md +71 -0
- package/llms/components/obc-hydraulic-valve-x-2.md +68 -0
- package/llms/components/obc-icon-button.md +117 -0
- package/llms/components/obc-icon-check-button.md +85 -0
- package/llms/components/obc-indicator-battery.md +69 -0
- package/llms/components/obc-indicator-engine.md +39 -0
- package/llms/components/obc-indicator-generator.md +59 -0
- package/llms/components/obc-indicator-graph.md +33 -0
- package/llms/components/obc-indicator-tank-atmospheric.md +69 -0
- package/llms/components/obc-input-chip.md +96 -0
- package/llms/components/obc-instrument-field.md +172 -0
- package/llms/components/obc-instrument-radial.md +77 -0
- package/llms/components/obc-integration-app-bar.md +41 -0
- package/llms/components/obc-integration-bar-dropdown.md +71 -0
- package/llms/components/obc-integration-bar.md +72 -0
- package/llms/components/obc-integration-button.md +62 -0
- package/llms/components/obc-integration-dropdown-button.md +75 -0
- package/llms/components/obc-integration-fleet-button.md +41 -0
- package/llms/components/obc-integration-tabs.md +28 -0
- package/llms/components/obc-integration-vessel-menu.md +58 -0
- package/llms/components/obc-integration-vessel-selector.md +32 -0
- package/llms/components/obc-keyboard-full.md +175 -0
- package/llms/components/obc-keyboard-numeric.md +77 -0
- package/llms/components/obc-line-cross.md +28 -0
- package/llms/components/obc-line-graph.md +164 -0
- package/llms/components/obc-line-overlap.md +28 -0
- package/llms/components/obc-logic.md +64 -0
- package/llms/components/obc-main-engine-indicator.md +55 -0
- package/llms/components/obc-main-engine.md +54 -0
- package/llms/components/obc-menu-button.md +158 -0
- package/llms/components/obc-message-menu-item.md +165 -0
- package/llms/components/obc-modal-window.md +139 -0
- package/llms/components/obc-mosfet.md +64 -0
- package/llms/components/obc-motor.md +73 -0
- package/llms/components/obc-navigation-item-group.md +82 -0
- package/llms/components/obc-navigation-item.md +138 -0
- package/llms/components/obc-navigation-menu.md +135 -0
- package/llms/components/obc-non-return-valve.md +79 -0
- package/llms/components/obc-notification-badge-button.md +87 -0
- package/llms/components/obc-notification-button.md +92 -0
- package/llms/components/obc-notification-floating-item.md +121 -0
- package/llms/components/obc-notification-menu-item.md +87 -0
- package/llms/components/obc-notification-message-item.md +127 -0
- package/llms/components/obc-number-input-field.md +97 -0
- package/llms/components/obc-pagination.md +95 -0
- package/llms/components/obc-pie-chart.md +120 -0
- package/llms/components/obc-pitch-indicator.md +39 -0
- package/llms/components/obc-pitch-roll-heave.md +86 -0
- package/llms/components/obc-pitch-roll-yaw.md +72 -0
- package/llms/components/obc-pitch-roll.md +63 -0
- package/llms/components/obc-pitch.md +81 -0
- package/llms/components/obc-pivot-item-group.md +79 -0
- package/llms/components/obc-pivot-item.md +75 -0
- package/llms/components/obc-poi-aton.md +68 -0
- package/llms/components/obc-poi-button-aton.md +54 -0
- package/llms/components/obc-poi-button-data.md +53 -0
- package/llms/components/obc-poi-button-vessel.md +55 -0
- package/llms/components/obc-poi-button.md +94 -0
- package/llms/components/obc-poi-card-header.md +90 -0
- package/llms/components/obc-poi-card.md +110 -0
- package/llms/components/obc-poi-controller.md +151 -0
- package/llms/components/obc-poi-data.md +72 -0
- package/llms/components/obc-poi-graphic-line.md +70 -0
- package/llms/components/obc-poi-group.md +85 -0
- package/llms/components/obc-poi-header.md +71 -0
- package/llms/components/obc-poi-layer-stack.md +85 -0
- package/llms/components/obc-poi-layer.md +110 -0
- package/llms/components/obc-poi-line.md +70 -0
- package/llms/components/obc-poi-object-aton.md +45 -0
- package/llms/components/obc-poi-object-data.md +48 -0
- package/llms/components/obc-poi-object-vessel.md +95 -0
- package/llms/components/obc-poi-object.md +82 -0
- package/llms/components/obc-poi-pointer.md +70 -0
- package/llms/components/obc-poi-selection-frame.md +66 -0
- package/llms/components/obc-poi-vessel.md +70 -0
- package/llms/components/obc-poi.md +140 -0
- package/llms/components/obc-polar-chart.md +126 -0
- package/llms/components/obc-position-deviation.md +84 -0
- package/llms/components/obc-pressure-reduction-valve.md +88 -0
- package/llms/components/obc-pressure-sustain-valve.md +85 -0
- package/llms/components/obc-progress-bar.md +102 -0
- package/llms/components/obc-progress-button.md +111 -0
- package/llms/components/obc-progress-indicator-dots.md +57 -0
- package/llms/components/obc-propulsion-azimuth-indicator.md +48 -0
- package/llms/components/obc-pump.md +76 -0
- package/llms/components/obc-radial-bar-chart.md +103 -0
- package/llms/components/obc-radio.md +82 -0
- package/llms/components/obc-rate-of-turn.md +95 -0
- package/llms/components/obc-readout-block.md +137 -0
- package/llms/components/obc-readout-list-item.md +142 -0
- package/llms/components/obc-readout-list.md +85 -0
- package/llms/components/obc-readout.md +169 -0
- package/llms/components/obc-resistor.md +64 -0
- package/llms/components/obc-rich-button.md +92 -0
- package/llms/components/obc-roll-indicator.md +38 -0
- package/llms/components/obc-roll.md +56 -0
- package/llms/components/obc-rot-indicator.md +32 -0
- package/llms/components/obc-rot-linear.md +68 -0
- package/llms/components/obc-rot-sector.md +125 -0
- package/llms/components/obc-router.md +64 -0
- package/llms/components/obc-rudder-indicator.md +54 -0
- package/llms/components/obc-rudder.md +112 -0
- package/llms/components/obc-ruler-pointer.md +57 -0
- package/llms/components/obc-scrollbar.md +57 -0
- package/llms/components/obc-sequence-card.md +119 -0
- package/llms/components/obc-sequence-connector.md +70 -0
- package/llms/components/obc-sequence-item.md +64 -0
- package/llms/components/obc-sequence-loading-spinner.md +70 -0
- package/llms/components/obc-sequence-modal.md +89 -0
- package/llms/components/obc-sequence-step.md +48 -0
- package/llms/components/obc-sequence-toolbar.md +108 -0
- package/llms/components/obc-slide-button.md +111 -0
- package/llms/components/obc-slider-double.md +137 -0
- package/llms/components/obc-slider.md +143 -0
- package/llms/components/obc-source.md +64 -0
- package/llms/components/obc-speed-arrows.md +39 -0
- package/llms/components/obc-speed-directions.md +66 -0
- package/llms/components/obc-speed-gauge.md +124 -0
- package/llms/components/obc-speed-indicator.md +37 -0
- package/llms/components/obc-split-button.md +144 -0
- package/llms/components/obc-start-stop-switch.md +126 -0
- package/llms/components/obc-status-indicator.md +30 -0
- package/llms/components/obc-stepper-box.md +90 -0
- package/llms/components/obc-surge-sway-yaw.md +95 -0
- package/llms/components/obc-switch.md +69 -0
- package/llms/components/obc-system-button.md +112 -0
- package/llms/components/obc-system-menu.md +67 -0
- package/llms/components/obc-tab-item.md +161 -0
- package/llms/components/obc-tab-row.md +151 -0
- package/llms/components/obc-tabbed-card.md +148 -0
- package/llms/components/obc-table-header-item.md +42 -0
- package/llms/components/obc-table.md +124 -0
- package/llms/components/obc-tag.md +41 -0
- package/llms/components/obc-text-input-field.md +94 -0
- package/llms/components/obc-textarea-field.md +186 -0
- package/llms/components/obc-textbox.md +80 -0
- package/llms/components/obc-three-way-line.md +29 -0
- package/llms/components/obc-thruster.md +64 -0
- package/llms/components/obc-title-container.md +81 -0
- package/llms/components/obc-toggle-button-group.md +184 -0
- package/llms/components/obc-toggle-button-option.md +126 -0
- package/llms/components/obc-toggle-button-three-state.md +38 -0
- package/llms/components/obc-toggle-button-vertical-group.md +142 -0
- package/llms/components/obc-toggle-button-vertical-option.md +110 -0
- package/llms/components/obc-toggle-switch.md +126 -0
- package/llms/components/obc-toggletip.md +135 -0
- package/llms/components/obc-tooltip.md +106 -0
- package/llms/components/obc-top-bar.md +194 -0
- package/llms/components/obc-top-view-propulsion.md +84 -0
- package/llms/components/obc-topbar-message-item.md +150 -0
- package/llms/components/obc-transformer.md +64 -0
- package/llms/components/obc-transmitter-button.md +101 -0
- package/llms/components/obc-transmitter-stack.md +79 -0
- package/llms/components/obc-transmitter.md +114 -0
- package/llms/components/obc-tree-navigation-group.md +69 -0
- package/llms/components/obc-tree-navigation-item.md +110 -0
- package/llms/components/obc-tree-navigation.md +73 -0
- package/llms/components/obc-tunnel-thruster.md +59 -0
- package/llms/components/obc-user-button.md +107 -0
- package/llms/components/obc-user-menu.md +154 -0
- package/llms/components/obc-valve-analog-three-way-icon.md +69 -0
- package/llms/components/obc-valve-analog-two-way-icon.md +39 -0
- package/llms/components/obc-velocity-projection-plot.md +34 -0
- package/llms/components/obc-vendor-button.md +63 -0
- package/llms/components/obc-vertical-line.md +33 -0
- package/llms/components/obc-watch-flat.md +54 -0
- package/llms/components/obc-watch.md +206 -0
- package/llms/components/obc-wind-indicator.md +52 -0
- package/llms/components/obc-wind-propulsion.md +92 -0
- package/llms/components/obc-wind.md +46 -0
- package/llms/docs/ar-poi-projection.md +36 -0
- package/llms/docs/automation-sequence-step-diagram-playground.md +13 -0
- package/llms/docs/building-blocks-advice.md +31 -0
- package/llms/docs/building-blocks-external-scale.md +138 -0
- package/llms/docs/building-blocks-setpoint.md +119 -0
- package/llms/docs/introduction-advice-system.md +161 -0
- package/llms/docs/introduction-getting-started.md +94 -0
- package/llms/docs/introduction-introduction.md +27 -0
- package/llms/docs/introduction-join-the-project.md +11 -0
- package/llms/docs/introduction-migration-guide-2-0-to-2-1.md +126 -0
- package/llms/docs/introduction-migration-guide-2-1-to-2-2.md +106 -0
- package/llms/docs/introduction-migration-guide.md +1063 -0
- package/llms/docs/palettes-categorical-colour.md +9 -0
- package/llms/llms-full.txt +28380 -0
- package/llms/llms.txt +368 -0
- package/package.json +12 -2
- package/script/cem-plugins/lifecycle.d.mts +6 -0
- package/script/cem-plugins/lifecycle.mjs +48 -0
- package/script/cem-plugins.test.ts +52 -1
- package/script/generate-llms-txt.ts +34 -0
- package/script/llms/channel.test.ts +69 -0
- package/script/llms/channel.ts +63 -0
- package/script/llms/generate.test.ts +143 -0
- package/script/llms/generate.ts +229 -0
- package/script/llms/manifest.test.ts +160 -0
- package/script/llms/manifest.ts +109 -0
- package/script/llms/markdown.test.ts +22 -0
- package/script/llms/markdown.ts +37 -0
- package/script/llms/mdx.test.ts +172 -0
- package/script/llms/mdx.ts +171 -0
- package/script/llms/render-component.test.ts +290 -0
- package/script/llms/render-component.ts +208 -0
- package/script/llms/render-guides.test.ts +105 -0
- package/script/llms/render-guides.ts +51 -0
- package/script/llms/render-llms-txt.test.ts +222 -0
- package/script/llms/render-llms-txt.ts +185 -0
- package/script/llms/sources.test.ts +118 -0
- package/script/llms/sources.ts +89 -0
- package/script/llms/stories.test.ts +193 -0
- package/script/llms/stories.ts +256 -0
- package/script/llms/types.ts +95 -0
- package/script/prepare-full-bundle.ts +1 -0
|
@@ -0,0 +1,1063 @@
|
|
|
1
|
+
# Migrating from 1.x to 2.0
|
|
2
|
+
|
|
3
|
+
This guide takes an app from `@oicl/openbridge-webcomponents` 1.0.1, the last release on the `latest` channel, to 2.0. It follows the order you meet the changes in: installing, importing, styling, then component by component. Changes that still compile and run but behave differently come with before/after code.
|
|
4
|
+
|
|
5
|
+
The [Changelog](https://raw.githubusercontent.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/develop/packages/openbridge-webcomponents/CHANGELOG.md) lists every change. If you already run a `2.0.0-next` prerelease, use it for the changes between prereleases; this guide covers the difference from 1.0.1.
|
|
6
|
+
|
|
7
|
+
Already on 2.0? See [Migrating from 2.0 to 2.1](https://openbridge-next-storybook.web.app/docs/introduction-migration-guide-2-0-to-2-1.md) for what changed after this guide.
|
|
8
|
+
|
|
9
|
+
## Contents
|
|
10
|
+
|
|
11
|
+
1. [Major Breaking Changes](#major-breaking-changes)
|
|
12
|
+
2. [Upgrade Steps](#upgrade-steps)
|
|
13
|
+
3. [License](#license)
|
|
14
|
+
4. [Packages and Imports](#packages-and-imports)
|
|
15
|
+
5. [Framework Wrappers](#framework-wrappers)
|
|
16
|
+
6. [CSS and Theming](#css-and-theming)
|
|
17
|
+
7. [Component Changes](#component-changes)
|
|
18
|
+
8. [Keyboard, Focus and Events](#keyboard-focus-and-events)
|
|
19
|
+
9. [Deprecated Components](#deprecated-components)
|
|
20
|
+
10. [API Mapping by Component](#api-mapping-by-component)
|
|
21
|
+
11. [Icons](#icons)
|
|
22
|
+
12. [Troubleshooting](#troubleshooting)
|
|
23
|
+
|
|
24
|
+
## Major Breaking Changes
|
|
25
|
+
|
|
26
|
+
- **License:** 2.0 is published under `AGPL-3.0-only`, and each version also becomes available under Apache-2.0 180 days after it is first made public. 1.0.1 was Apache-2.0. See [License](#license).
|
|
27
|
+
- **Core package:** only `dist/`, the CDN bundle and `custom-elements.json` are published, so imports from `src/` fail. See [The Core Package Ships Only dist/](#the-core-package-ships-only-dist).
|
|
28
|
+
- **Angular:** every component has its own entry point, so every import changes. See [Angular](#angular).
|
|
29
|
+
- **React:** `onClick` on 13 components receives the native DOM event. See [React](#react).
|
|
30
|
+
- **Svelte:** eight components renamed a snippet prop, and named slots no longer render a wrapping `div`. See [Svelte](#svelte).
|
|
31
|
+
- **Alert flashing:** `--alarm-blink-*` and `--warning-blink-*` no longer animate; use `--flash-*` and `blinkingAll()`. See [Alert Flashing Variables](#alert-flashing-variables).
|
|
32
|
+
- **CSS variables:** 141 were renamed or removed, and the old names fail without an error. See [Renamed CSS Variables](#renamed-css-variables).
|
|
33
|
+
- **Component APIs:** properties were renamed, retyped or given new defaults, among them the [automation badges](#badges-take-values-silent), [wind speeds in knots](#wind-speed-in-knots-silent), [`obc-card` timeouts in seconds](#obc-card-timeouts-in-seconds-silent) and [`obc-number-input-field` values as numbers](#obc-number-input-field-value-and-events). See [Component Changes](#component-changes) and [API Mapping by Component](#api-mapping-by-component).
|
|
34
|
+
- **Keyboard:** the tab row, the toggle button group and the context menu are one tab stop each, with the arrow keys moving between their items, and the modals take focus when they connect. See [Keyboard, Focus and Events](#keyboard-focus-and-events).
|
|
35
|
+
- **Icons:** 50 icons were renamed, and the wind icons ending in `-1`, `-5` and `-10` kept their names but show a different glyph. See [Icons](#icons).
|
|
36
|
+
- **Deprecations:** 11 components are deprecated. They still work in 2.0. See [Deprecated Components](#deprecated-components).
|
|
37
|
+
|
|
38
|
+
## Upgrade Steps
|
|
39
|
+
|
|
40
|
+
1. **Update the core package and your framework wrapper together.** Each wrapper depends on the core package of the same version:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
npm install @oicl/openbridge-webcomponents@^2.0.0 @oicl/openbridge-webcomponents-react@^2.0.0
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Then check that only one copy of the core package is installed. When two copies load, the first to register an element wins and the other is ignored without an error.
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
npm ls @oicl/openbridge-webcomponents
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
2. **Fix the imports that no longer resolve:** paths into `src/`, the [AR modules](#ar-import-paths) and every [Angular](#angular) import.
|
|
53
|
+
3. **Rename what was renamed:** properties, attributes and events in the [API mapping](#api-mapping-by-component), [CSS variables](#renamed-css-variables) and [icons](#icons). TypeScript reports most renamed properties on the framework wrappers, but an HTML attribute that no longer exists is ignored without a warning, so search your templates too.
|
|
54
|
+
4. **Check the changes that do not fail loudly:** the [flashing variables](#alert-flashing-variables), the reused [wind icon names](#icons) and every heading marked _(silent)_ in [Component Changes](#component-changes), such as the [`obc-card` timeouts](#obc-card-timeouts-in-seconds-silent), the [`obc-compass-indicator` orientation](#obc-compass-indicator-orientation-silent) and the [`obc-depth-actual` ranges](#obc-depth-actual-ranges-and-labels-silent).
|
|
55
|
+
5. **Compare screenshots.** The dusk and bright palettes were retuned and many components now follow the OpenBridge 6.1 design, so visual tests show differences that need no code change. See [Palette Values](#palette-values).
|
|
56
|
+
|
|
57
|
+
## License
|
|
58
|
+
|
|
59
|
+
1.0.1 and earlier were published under the Apache License 2.0. From 2.0, every package is published under `AGPL-3.0-only` and ships `LICENSE.txt`, `LICENSE-AGPL.txt` and `LICENSE-APACHE.txt`; each version also becomes available under Apache-2.0 180 days after it is first made public. The `2.0.0-next` prereleases carry these terms from `2.0.0-next.156`.
|
|
60
|
+
|
|
61
|
+
The terms are in [`LICENSE.txt`](https://github.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/blob/develop/LICENSE.txt), and [Getting Started](https://openbridge-next-storybook.web.app/?path=/docs/introduction-getting-started--docs#licensing-model) summarises them. Read them before you upgrade an app that cannot take on the AGPL obligations.
|
|
62
|
+
|
|
63
|
+
## Packages and Imports
|
|
64
|
+
|
|
65
|
+
Paths under `dist/` for components, icons and `openbridge.css` are unchanged, and so is the CDN bundle at `bundle/openbridge-webcomponents.bundle.js`. The supported framework versions are the same as in 1.0.1: React 17 to 19, Vue 3, Angular 20 and Svelte 5.
|
|
66
|
+
|
|
67
|
+
### The Core Package Ships Only `dist/`
|
|
68
|
+
|
|
69
|
+
1.0.1 published the whole package folder, TypeScript sources included. 2.0 publishes `dist/`, the CDN bundle, `custom-elements.json` and the license files, so imports from `src/` fail ([#911](https://github.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/pull/911)):
|
|
70
|
+
|
|
71
|
+
```js
|
|
72
|
+
// 1.0.1
|
|
73
|
+
import '@oicl/openbridge-webcomponents/src/palettes/variables.css';
|
|
74
|
+
import {iconIds} from '@oicl/openbridge-webcomponents/src/icons/names';
|
|
75
|
+
|
|
76
|
+
// 2.0
|
|
77
|
+
import '@oicl/openbridge-webcomponents/dist/openbridge.css';
|
|
78
|
+
import {iconIds} from '@oicl/openbridge-webcomponents/dist/icons/names.js';
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
The TypeScript sources, the PostCSS mixins, the translation files and these docs moved to a separate package. Install it at the same version as the core package:
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
npm install @oicl/openbridge-webcomponents-full-bundle@^2.0.0
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### AR Import Paths
|
|
88
|
+
|
|
89
|
+
The point-of-interest modules moved into three folders ([#761](https://github.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/pull/761)). Tag names are unchanged; the deep imports change in the core package and in the React and Vue wrappers, which follow the same folders. Svelte imports from the package root and needs no change.
|
|
90
|
+
|
|
91
|
+
| 1.0.1 | 2.0 |
|
|
92
|
+
| ---------------------------------------------------- | ------------------------------------------- |
|
|
93
|
+
| `dist/ar/building-blocks/poi/poi.js` | `dist/ar/poi/poi.js` |
|
|
94
|
+
| `dist/ar/poi-aton/poi-aton.js` | `dist/ar/poi/poi-aton.js` |
|
|
95
|
+
| `dist/ar/poi-data/poi-data.js` | `dist/ar/poi/poi-data.js` |
|
|
96
|
+
| `dist/ar/poi-vessel/poi-vessel.js` | `dist/ar/poi/poi-vessel.js` |
|
|
97
|
+
| `dist/ar/building-blocks/poi-button/poi-button.js` | `dist/ar/poi-button/poi-button.js` |
|
|
98
|
+
| `dist/ar/poi-button-aton/poi-button-aton.js` | `dist/ar/poi-button/poi-button-aton.js` |
|
|
99
|
+
| `dist/ar/poi-button-data/poi-button-data.js` | `dist/ar/poi-button/poi-button-data.js` |
|
|
100
|
+
| `dist/ar/poi-button-vessel/poi-button-vessel.js` | `dist/ar/poi-button/poi-button-vessel.js` |
|
|
101
|
+
| `dist/ar/building-blocks/poi-object/poi-object.js` | `dist/ar/poi-object/poi-object.js` |
|
|
102
|
+
| `dist/ar/poi-object-aton/poi-object-aton.js` | `dist/ar/poi-object/poi-object-aton.js` |
|
|
103
|
+
| `dist/ar/poi-object-data/poi-object-data.js` | `dist/ar/poi-object/poi-object-data.js` |
|
|
104
|
+
| `dist/ar/poi-object-vessel/poi-object-vessel.js` | `dist/ar/poi-object/poi-object-vessel.js` |
|
|
105
|
+
| other `dist/ar/building-blocks/poi/*` modules | the same file name in `dist/ar/poi/` |
|
|
106
|
+
| other `dist/ar/building-blocks/poi-object/*` modules | the same file name in `dist/ar/poi-object/` |
|
|
107
|
+
|
|
108
|
+
The two abstract base classes lost their prefix: `ObcPoiBase` is now `PoiBase`, and `ObcAbstractPoiObject` is now `AbstractPoiObject`.
|
|
109
|
+
|
|
110
|
+
### CDN Bundle
|
|
111
|
+
|
|
112
|
+
The 1.0.1 bundle stops with an error while it loads, and some components, `obc-top-bar` among them, never register. The 2.0 bundle loads completely ([#801](https://github.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/pull/801)):
|
|
113
|
+
|
|
114
|
+
```html
|
|
115
|
+
<link
|
|
116
|
+
rel="stylesheet"
|
|
117
|
+
href="https://cdn.jsdelivr.net/npm/@oicl/openbridge-webcomponents@2/dist/openbridge.css"
|
|
118
|
+
/>
|
|
119
|
+
<script
|
|
120
|
+
type="module"
|
|
121
|
+
src="https://cdn.jsdelivr.net/npm/@oicl/openbridge-webcomponents@2/bundle/openbridge-webcomponents.bundle.js"
|
|
122
|
+
></script>
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
The bundle does not include the flashing helper; see [Alert Flashing Variables](#alert-flashing-variables).
|
|
126
|
+
|
|
127
|
+
### Fonts
|
|
128
|
+
|
|
129
|
+
The package still loads no font. `bundle/NotoSans.ttf` is no longer published, so point `@font-face` at `dist/NotoSans.ttf`:
|
|
130
|
+
|
|
131
|
+
```css
|
|
132
|
+
/* 1.0.1 */
|
|
133
|
+
@font-face {
|
|
134
|
+
font-family: 'Noto Sans';
|
|
135
|
+
src: url('/node_modules/@oicl/openbridge-webcomponents/bundle/NotoSans.ttf');
|
|
136
|
+
font-weight: 400 700;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/* 2.0 */
|
|
140
|
+
@font-face {
|
|
141
|
+
font-family: 'Noto Sans';
|
|
142
|
+
src: url('/node_modules/@oicl/openbridge-webcomponents/dist/NotoSans.ttf');
|
|
143
|
+
font-weight: 400 700;
|
|
144
|
+
}
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
## Framework Wrappers
|
|
148
|
+
|
|
149
|
+
The wrappers are generated from the components, so the property, event and slot changes in [API Mapping by Component](#api-mapping-by-component) apply to them too. This section covers what changed in the wrappers themselves. In all four, the alert menu's `alert-list-click` binding, which never fired, is replaced by `go-to-alert-list-click`, and the compass sector's `None` event is gone.
|
|
150
|
+
|
|
151
|
+
### React
|
|
152
|
+
|
|
153
|
+
Import paths are unchanged apart from the [AR modules](#ar-import-paths).
|
|
154
|
+
|
|
155
|
+
`onClick` on these components is now attached with `addEventListener` and receives the native `PointerEvent` instead of a React synthetic event: `ObcAppButton`, `ObcAutomationButton`, `ObcAutomationReadout`, `ObcAutomationTank`, `ObcCommandButton`, `ObcIconButton`, `ObcIntegrationButton`, `ObcIntegrationFleetButton`, `ObcIntegrationTabs`, `ObcNotificationBadgeButton`, `ObcPoiButton`, `ObcSequenceStep` and `ObcVendorButton`. A handler typed `React.MouseEvent` no longer compiles, and `stopPropagation()` in the handler now also stops native listeners on ancestor elements.
|
|
156
|
+
|
|
157
|
+
```tsx
|
|
158
|
+
// 1.0.1
|
|
159
|
+
<ObcIconButton onClick={(e: React.MouseEvent<HTMLElement>) => save()} />
|
|
160
|
+
<ObcAlertMenu onAlertListClick={openList} />
|
|
161
|
+
|
|
162
|
+
// 2.0
|
|
163
|
+
<ObcIconButton onClick={(e: Event) => save()} />
|
|
164
|
+
<ObcAlertMenu onGoToAlertListClick={openList} />
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
Events that had no binding in 1.0.1 now have one, for example `onChange` on `ObcToggleSwitch` and `onLayerSelectionChanged` on `ObcPoiLayer`. A handler passed for them was never called before; it runs now.
|
|
168
|
+
|
|
169
|
+
### Vue
|
|
170
|
+
|
|
171
|
+
Import paths are unchanged apart from the [AR modules](#ar-import-paths). There is still no `v-model`: bind the property and listen to the event.
|
|
172
|
+
|
|
173
|
+
An omitted boolean prop no longer reaches the element as `false`. The 1.0.1 wrapper let Vue cast an absent boolean to `false` and wrote that over the element's default; the 2.0 wrapper declares boolean props with `default: undefined`, so the element's own default holds. This shows on the properties that default to `true`, such as `showStatus` on the automation devices, `hasCancelAction` and `hasCloseAction` on `obc-modal-window` and `clickable` on `obc-automation-tank`: they are on unless you bind `false`.
|
|
174
|
+
|
|
175
|
+
```html
|
|
176
|
+
<!-- 2.0: on by default; bind false to switch it off -->
|
|
177
|
+
<ObcPump :show-status="false" />
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
`@alert-list-click` on `ObcAlertMenu` is now `@go-to-alert-list-click`, and `ObcToggleSwitch` emits `change` as well as `input`.
|
|
181
|
+
|
|
182
|
+
### Angular
|
|
183
|
+
|
|
184
|
+
The package root no longer exports components. Import each component from the entry point named after its tag:
|
|
185
|
+
|
|
186
|
+
```ts
|
|
187
|
+
// 1.0.1
|
|
188
|
+
import {ObcTopBar, ObcIconButton} from '@oicl/openbridge-webcomponents-ng';
|
|
189
|
+
|
|
190
|
+
// 2.0
|
|
191
|
+
import {ObcTopBar} from '@oicl/openbridge-webcomponents-ng/obc-top-bar';
|
|
192
|
+
import {ObcIconButton} from '@oicl/openbridge-webcomponents-ng/obc-icon-button';
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
Importing a wrapper now registers only its own element; in 1.0.1 any import registered all of them. If a template uses a tag whose wrapper you do not import, import the element from the core package:
|
|
196
|
+
|
|
197
|
+
```ts
|
|
198
|
+
import '@oicl/openbridge-webcomponents/dist/components/clock/clock.js';
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
Each entry point also re-exports the enums and other values its property and event types use, so `import {IconButtonVariant} from '@oicl/openbridge-webcomponents-ng/obc-icon-button'` works as a value.
|
|
202
|
+
|
|
203
|
+
Outputs keep their names, such as `(menuButtonClickedEvent)`. The alert menu's `(alertListClickEvent)` is now `(goToAlertListClickEvent)`.
|
|
204
|
+
|
|
205
|
+
### Svelte
|
|
206
|
+
|
|
207
|
+
Imports from the package root are unchanged.
|
|
208
|
+
|
|
209
|
+
- **Events:** callback props are attached with `addEventListener`. In 1.0.1, `onInput`, `onChange` and `onClick` on 20 components were never called, because those events do not bubble. They are called now, so remove any workaround that listened on the element directly, or the handler runs twice.
|
|
210
|
+
- **Named slots:** snippet content is no longer wrapped in `<div slot="…">`. The slot attribute goes on the elements your snippet renders, and text goes into a `span` with `display: contents`. CSS that targets the wrapping `div` needs updating.
|
|
211
|
+
- **Snippet props:** where a slot name matches a property name, the snippet prop gained a `Snippet` suffix.
|
|
212
|
+
|
|
213
|
+
| Component | 1.0.1 snippet | 2.0 snippet |
|
|
214
|
+
| ------------------------------------------------------------------------- | ------------------------------- | ---------------------------------------------------- |
|
|
215
|
+
| `ObcTabItem` | `title` | `titleSnippet` |
|
|
216
|
+
| `ObcTitleContainer` | `label` | `labelSnippet` |
|
|
217
|
+
| `ObcFormContainer` | `contentTitle` | `contentTitleSnippet` |
|
|
218
|
+
| `ObcMessageMenuItem` | `title`, `description` | `titleSnippet`, `descriptionSnippet` |
|
|
219
|
+
| `ObcChartObjectVesselButton` | `name`, `number`, `vesselImage` | `nameSnippet`, `numberSnippet`, `vesselImageSnippet` |
|
|
220
|
+
| `ObcFloatingItem`, `ObcAdviceFloatingItem`, `ObcNotificationFloatingItem` | `action`, `action2` | `actionSnippet`, `action2Snippet` |
|
|
221
|
+
|
|
222
|
+
```html
|
|
223
|
+
<!-- 1.0.1 -->
|
|
224
|
+
<ObcTabItem>{#snippet title()}<b>Engine</b>{/snippet}</ObcTabItem>
|
|
225
|
+
|
|
226
|
+
<!-- 2.0: set the property, or use the renamed snippet -->
|
|
227
|
+
<ObcTabItem title="Engine" />
|
|
228
|
+
<ObcTabItem>{#snippet titleSnippet()}<b>Engine</b>{/snippet}</ObcTabItem>
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
## CSS and Theming
|
|
232
|
+
|
|
233
|
+
The `data-obc-theme` values (`day`, `dusk`, `night`, `bright`) and the size classes (`obc-component-size-regular`, `-medium`, `-large`, `-xl`) are unchanged.
|
|
234
|
+
|
|
235
|
+
### Alert Flashing Variables
|
|
236
|
+
|
|
237
|
+
In 1.0.1, `openbridge.css` animated `--alarm-blink-on`, `--alarm-blink-off`, `--warning-blink-on` and `--warning-blink-off` on the root element, and any stylesheet could read them. 2.0 removes that animation ([#1116](https://github.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/pull/1116)). The four variables are still registered but keep their initial values, so an element that reads them stops flashing without an error.
|
|
238
|
+
|
|
239
|
+
Flashing now uses three tempos, each with an `on` and an `off` variable, animated per element by `blinkingAll()` ([#1135](https://github.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/pull/1135)):
|
|
240
|
+
|
|
241
|
+
| 1.0.1 (on / off) | 2.0 | On / off | Alert types |
|
|
242
|
+
| ------------------------------------------------------- | ----------------------------------------------- | ---------------- | ---------------------------- |
|
|
243
|
+
| `--alarm-blink-on`, `--alarm-blink-off` (1 s / 1 s) | `--flash-fast-on`, `--flash-fast-off` | 400 ms / 400 ms | alarm, high, critical |
|
|
244
|
+
| `--warning-blink-on`, `--warning-blink-off` (2 s / 2 s) | `--flash-slow-on`, `--flash-slow-off` | 1200 ms / 400 ms | warning, medium |
|
|
245
|
+
| none | `--flash-very-slow-on`, `--flash-very-slow-off` | 2800 ms / 400 ms | low, and any rectified alert |
|
|
246
|
+
|
|
247
|
+
Caution and diagnostic alerts do not flash.
|
|
248
|
+
|
|
249
|
+
```css
|
|
250
|
+
/* 1.0.1 */
|
|
251
|
+
.my-alarm-lamp {
|
|
252
|
+
opacity: var(--alarm-blink-on);
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
/* 2.0 */
|
|
256
|
+
.my-alarm-lamp {
|
|
257
|
+
opacity: var(--flash-fast-on);
|
|
258
|
+
}
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
```js
|
|
262
|
+
// 2.0: animate the variables on a container; its descendants inherit them
|
|
263
|
+
import {blinkingAll} from '@oicl/openbridge-webcomponents/dist/palettes/blinking.js';
|
|
264
|
+
|
|
265
|
+
const stop = blinkingAll(document.querySelector('#alarm-panel'));
|
|
266
|
+
// call stop() when the container is removed
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
The CDN bundle does not export `blinkingAll`. On a plain HTML page, import the module file:
|
|
270
|
+
|
|
271
|
+
```html
|
|
272
|
+
<script type="module">
|
|
273
|
+
import {blinkingAll} from 'https://cdn.jsdelivr.net/npm/@oicl/openbridge-webcomponents@2/dist/palettes/blinking.js';
|
|
274
|
+
blinkingAll(document.querySelector('#alarm-panel'));
|
|
275
|
+
</script>
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
The alert components animate themselves at the new tempos, so a blinking alarm flashes faster than in 1.0.1. `obc-alert-button`, `obc-alert-icon` and `obc-alert-frame` take a `flashingSpeed` to pick a tempo, or `fixed` to stop flashing.
|
|
279
|
+
|
|
280
|
+
### Renamed CSS Variables
|
|
281
|
+
|
|
282
|
+
141 custom properties from 1.0.1 are gone. A `var()` that names one resolves to nothing, and an override that sets one no longer reaches the component; neither raises an error. All but one have a new name:
|
|
283
|
+
|
|
284
|
+
| 1.0.1 | 2.0 |
|
|
285
|
+
| ---------------------------------------------------------------------- | ----------------------------------------------------------------------- |
|
|
286
|
+
| `--instrument-components-readout-new-*` (115 variables) | `--instrument-components-readout-*` |
|
|
287
|
+
| `--app-components-badge-*` (9 variables) | `--ui-components-badge-*` |
|
|
288
|
+
| `--ui-components-keyboard-nummeric-*` (9 variables) | `--ui-components-keyboard-numeric-*` |
|
|
289
|
+
| `--app-components-clock-colon-size` | `--app-components-clock-colon-size-regular` |
|
|
290
|
+
| `--app-components-clock-digit-spacing` | `--app-components-clock-digit-spacing-regular` |
|
|
291
|
+
| `--instrument-components-advice-indicator-alert-point-height` | `--instrument-components-advice-indicator-alert-point-thickness` |
|
|
292
|
+
| `--instrument-components-advice-indicator-alert-point-width` | `--instrument-components-advice-indicator-alert-point-lenght` |
|
|
293
|
+
| `--data-weather-cloud-seconday-color` | `--data-weather-cloud-secondary-color` |
|
|
294
|
+
| `--data-weather-cloud-light-seconday-color` | `--data-weather-cloud-light-secondary-color` |
|
|
295
|
+
| `--global-size-spacing-nav-item-and-menus-padding-horizonal-list-item` | `--global-size-spacing-nav-item-and-menus-padding-horizontal-list-item` |
|
|
296
|
+
| `--alert-warning-text-color` | none |
|
|
297
|
+
|
|
298
|
+
`lenght` is the 2.0 spelling. The three spelling fixes (`seconday`, `horizonal`) also changed a value: in the bright theme for the two weather colors and in the dusk theme for `--data-weather-cloud-secondary-color`, and at the `xl` size for the list item padding (24 px to 8 px).
|
|
299
|
+
|
|
300
|
+
```css
|
|
301
|
+
/* 1.0.1 */
|
|
302
|
+
obc-badge {
|
|
303
|
+
--app-components-badge-padding: 6px;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
/* 2.0 */
|
|
307
|
+
obc-badge {
|
|
308
|
+
--ui-components-badge-padding: 6px;
|
|
309
|
+
}
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
### Set `data-obc-theme`
|
|
313
|
+
|
|
314
|
+
A page without `data-obc-theme` on `<html>` still gets the day palette, but the colors of the new critical and diagnostic alert levels are defined only under the attribute. Set it explicitly:
|
|
315
|
+
|
|
316
|
+
```html
|
|
317
|
+
<html lang="en" data-obc-theme="day"></html>
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
### Palette Values
|
|
321
|
+
|
|
322
|
+
534 variables kept their names and changed value in at least one theme or size. Most of the changes are in the dusk and bright palettes; in the night and bright themes, the running colors changed from purple to green. No code needs to change, but screenshot tests will show the difference. To keep a 1.0.1 value, override the variable under its theme:
|
|
323
|
+
|
|
324
|
+
```css
|
|
325
|
+
:root[data-obc-theme='night'] {
|
|
326
|
+
--shadow-flat-color: rgb(230 175 112 / 0);
|
|
327
|
+
}
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
## Component Changes
|
|
331
|
+
|
|
332
|
+
The changes are grouped by family. A heading marked _(silent)_ is a change that compiles and runs without an error but changes what users see or what your code receives. Every renamed or removed property is also listed in [API Mapping by Component](#api-mapping-by-component).
|
|
333
|
+
|
|
334
|
+
### Automation
|
|
335
|
+
|
|
336
|
+
#### Badges Take Values _(silent)_
|
|
337
|
+
|
|
338
|
+
On the automation devices (`obc-pump`, `obc-fan`, `obc-analog-valve` and the other elements built on the automation button), `badgeAuto`, `badgeDuty` and `badgeAlertOff` are gone, and `badgeCommandLocked` takes a value instead of being a boolean ([#839](https://github.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/pull/839)). Four properties choose the badges:
|
|
339
|
+
|
|
340
|
+
- `badgeControl`: `none`, `local`, `local-only`, `manual`, `manual-only` or `auto`
|
|
341
|
+
- `badgeInterlock`: `none`, `interlock` or `interlock-inhibit`
|
|
342
|
+
- `badgeAlert`: `none`, `silence`, `caution`, `warning`, `alarm` or one of the `level-*` alert levels
|
|
343
|
+
- `badgeCommandLocked`: `none` or `command-locked`
|
|
344
|
+
|
|
345
|
+
The old attributes are ignored, and a bare `badgeCommandLocked` attribute now hides the badge. On `obc-automation-badge`, `type="duty"` is now `interlock` and `type="alert-off"` is `alert-silenced`.
|
|
346
|
+
|
|
347
|
+
```html
|
|
348
|
+
<!-- 1.0.1 -->
|
|
349
|
+
<obc-pump badgeAuto badgeDuty badgeAlertOff badgeCommandLocked></obc-pump>
|
|
350
|
+
<obc-automation-badge type="duty"></obc-automation-badge>
|
|
351
|
+
|
|
352
|
+
<!-- 2.0 -->
|
|
353
|
+
<obc-pump
|
|
354
|
+
badgeControl="auto"
|
|
355
|
+
badgeInterlock="interlock"
|
|
356
|
+
badgeAlert="silence"
|
|
357
|
+
badgeCommandLocked="command-locked"
|
|
358
|
+
></obc-pump>
|
|
359
|
+
<obc-automation-badge type="interlock"></obc-automation-badge>
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
#### ID Tag Shows Whenever `tag` Is Set _(silent)_
|
|
363
|
+
|
|
364
|
+
`hasIdTag` is removed, and `tag` is a string that renders exactly as given ([03fe7cd](https://github.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/commit/03fe7cdff)). In 1.0.1 the tag showed only with `hasIdTag`, and a number was formatted as `#0012`. A page that always sets `tag` now always shows it; leave `tag` unset, or set it to `null`, to hide it. On `obc-automation-button` and `obc-automation-button-readout-stack`, `tag` was an object with a `value` number and is now the same string.
|
|
365
|
+
|
|
366
|
+
```html
|
|
367
|
+
<!-- 1.0.1 -->
|
|
368
|
+
<obc-pump tag="12" hasIdTag></obc-pump>
|
|
369
|
+
|
|
370
|
+
<!-- 2.0 -->
|
|
371
|
+
<obc-pump tag="#0012"></obc-pump>
|
|
372
|
+
```
|
|
373
|
+
|
|
374
|
+
#### `obc-automation-tank` Redesign
|
|
375
|
+
|
|
376
|
+
The tank follows the OpenBridge 6.1 design and is larger at every size ([#862](https://github.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/pull/862), [#962](https://github.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/pull/962)):
|
|
377
|
+
|
|
378
|
+
- `variant="compact"` is now the boolean `compact`, and `orientation` (`vertical` or `horizontal`) picks the layout.
|
|
379
|
+
- `positioning` defaults to `button`, which fills the parent element. 1.0.1 always anchored the tank at a point, so a tank placed on a diagram needs `positioning="point"`.
|
|
380
|
+
- The tank renders as a button. Set `clickable = false` from JavaScript for a tank that only displays.
|
|
381
|
+
|
|
382
|
+
```html
|
|
383
|
+
<!-- 1.0.1 -->
|
|
384
|
+
<obc-automation-tank
|
|
385
|
+
variant="compact"
|
|
386
|
+
value="42"
|
|
387
|
+
max="100"
|
|
388
|
+
tag="T1"
|
|
389
|
+
></obc-automation-tank>
|
|
390
|
+
|
|
391
|
+
<!-- 2.0 -->
|
|
392
|
+
<obc-automation-tank
|
|
393
|
+
compact
|
|
394
|
+
positioning="point"
|
|
395
|
+
value="42"
|
|
396
|
+
max="100"
|
|
397
|
+
tag="T1"
|
|
398
|
+
></obc-automation-tank>
|
|
399
|
+
```
|
|
400
|
+
|
|
401
|
+
#### `direction` Only on Motors, Pumps and Fans
|
|
402
|
+
|
|
403
|
+
`direction` moved to `obc-motor`, `obc-pump` and `obc-fan` ([#982](https://github.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/pull/982)). It drew nothing on the other devices, so only TypeScript and wrapper code that sets it needs a change.
|
|
404
|
+
|
|
405
|
+
#### Readout Rows
|
|
406
|
+
|
|
407
|
+
The value and setpoint rows under a device render through `obc-readout-block` ([#1097](https://github.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/pull/1097)). A missing value shows the figure dash `‒` instead of the text `NaN`, and hinted zeros are drawn in a dimmed color. The device icon colors moved from the pipe tokens to the automation button tokens, and the new `activated` property draws the selected background ([#967](https://github.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/pull/967)).
|
|
408
|
+
|
|
409
|
+
#### `on` Is Now `turnedOn`
|
|
410
|
+
|
|
411
|
+
The on/off property of the seventeen two-state devices, `obc-fan`, `obc-motor`, `obc-pump` and the fourteen devices on the squared base, is `turnedOn` ([#1317](https://github.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/pull/1317)). `on` stays as a deprecated alias that sets `turnedOn`, so 1.x markup keeps working and the rename can wait until you next touch the page. Removing `on` is a 3.0 change.
|
|
412
|
+
|
|
413
|
+
The old name begins with `on`, which Svelte compiles into an event listener, and Vue binds `on` followed by anything but a lowercase letter the same way, so `on={running}` in a template never reached the property. The new attribute is Lit's default, `turnedon`.
|
|
414
|
+
|
|
415
|
+
```html
|
|
416
|
+
<!-- 1.0.1, still works in 2.0 -->
|
|
417
|
+
<obc-pump on></obc-pump>
|
|
418
|
+
|
|
419
|
+
<!-- 2.0 -->
|
|
420
|
+
<obc-pump turnedOn></obc-pump>
|
|
421
|
+
```
|
|
422
|
+
|
|
423
|
+
### Instruments
|
|
424
|
+
|
|
425
|
+
#### Wind Speed in Knots _(silent)_
|
|
426
|
+
|
|
427
|
+
Wind inputs that took a Beaufort number or a glyph index now take knots, under new names ([#909](https://github.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/pull/909)). The old properties are gone, so an old attribute is ignored and the instrument shows its default.
|
|
428
|
+
|
|
429
|
+
| Element | 1.0.1 | 2.0 |
|
|
430
|
+
| ------------------------------ | ---------------------------- | -------------------------------------------------------------- |
|
|
431
|
+
| `obc-wind` | `currentWindSpeedBeaufort` | `currentWindSpeedKnots` |
|
|
432
|
+
| `obc-wind-indicator` | `speed` | `currentWindSpeedKnots` (attribute `current-wind-speed-knots`) |
|
|
433
|
+
| `obc-compass` | `windSpeed` | `currentWindSpeedKnots` |
|
|
434
|
+
| `obc-watch` | `wind` | `windKnots` |
|
|
435
|
+
| `obc-velocity-projection-plot` | `instantWindSpeedNumber` | `currentWindSpeedKnots` |
|
|
436
|
+
| `obc-velocity-projection-plot` | `instantWindDirectionDeg` | `currentWindFromDirection` |
|
|
437
|
+
| `obc-velocity-projection-plot` | `instantCurrentSpeedNumber` | `currentSpeedKnots` |
|
|
438
|
+
| `obc-velocity-projection-plot` | `instantCurrentDirectionDeg` | `currentFromDirection` |
|
|
439
|
+
|
|
440
|
+
```html
|
|
441
|
+
<!-- 1.0.1: Beaufort 5 -->
|
|
442
|
+
<obc-wind currentWindFromDirection="45" currentWindSpeedBeaufort="5"></obc-wind>
|
|
443
|
+
<obc-compass heading="10" windFromDirection="45" windSpeed="5"></obc-compass>
|
|
444
|
+
|
|
445
|
+
<!-- 2.0: knots (Beaufort 5 is 17 to 21 knots) -->
|
|
446
|
+
<obc-wind currentWindFromDirection="45" currentWindSpeedKnots="19"></obc-wind>
|
|
447
|
+
<obc-compass
|
|
448
|
+
heading="10"
|
|
449
|
+
windFromDirection="45"
|
|
450
|
+
currentWindSpeedKnots="19"
|
|
451
|
+
></obc-compass>
|
|
452
|
+
```
|
|
453
|
+
|
|
454
|
+
#### `obc-wind-indicator` Redesign
|
|
455
|
+
|
|
456
|
+
The indicator was redrawn, with `type` (`arrow`, `shaft` or `labeled`) and `direction` (`true` or `relative`) ([#785](https://github.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/pull/785)). `speed` is now `currentWindSpeedKnots`, and `angle` is deprecated in favor of `currentWindFromDirection`. Both use dashed attribute names. `northUp` is removed: for a view relative to the vessel, set `direction="relative"` and `rotation-angle` to the heading.
|
|
457
|
+
|
|
458
|
+
```html
|
|
459
|
+
<!-- 1.0.1 -->
|
|
460
|
+
<obc-wind-indicator speed="5" angle="120"></obc-wind-indicator>
|
|
461
|
+
|
|
462
|
+
<!-- 2.0 -->
|
|
463
|
+
<obc-wind-indicator
|
|
464
|
+
current-wind-speed-knots="19"
|
|
465
|
+
current-wind-from-direction="120"
|
|
466
|
+
></obc-wind-indicator>
|
|
467
|
+
```
|
|
468
|
+
|
|
469
|
+
#### `obc-compass-indicator` Orientation _(silent)_
|
|
470
|
+
|
|
471
|
+
`arrow` is now `direction` (`heading`, `course` or `north`) ([#785](https://github.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/pull/785)). `northUp` now defaults to `true` and has no HTML attribute ([#909](https://github.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/pull/909)), so markup that drew a heading-up indicator in 1.0.1 draws it north-up. Set `northUp = false` from JavaScript or a framework binding to keep heading-up.
|
|
472
|
+
|
|
473
|
+
```html
|
|
474
|
+
<!-- 1.0.1: heading-up -->
|
|
475
|
+
<obc-compass-indicator angle="45" arrow="course"></obc-compass-indicator>
|
|
476
|
+
|
|
477
|
+
<!-- 2.0: north-up; set northUp = false for heading-up -->
|
|
478
|
+
<obc-compass-indicator angle="45" direction="course"></obc-compass-indicator>
|
|
479
|
+
```
|
|
480
|
+
|
|
481
|
+
#### Rate of Turn in Degrees per Minute _(silent)_
|
|
482
|
+
|
|
483
|
+
`rateOfTurnDegreesPerMinute` replaces `rotationsPerMinute` on the compass family, the watch, `obc-rate-of-turn` and `obc-rot-indicator` ([#818](https://github.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/pull/818)). `rotationsPerMinute` still works while the new property is unset. `rotMaxValue`, the full scale of the rate-of-turn bar, is now in degrees per minute and defaults to `60` instead of `10`, so a bar driven by `rotationsPerMinute` with the default `rotMaxValue` is six times shorter.
|
|
484
|
+
|
|
485
|
+
```html
|
|
486
|
+
<!-- 1.0.1: bar at 50 % -->
|
|
487
|
+
<obc-compass rotType="bar" rotationsPerMinute="5"></obc-compass>
|
|
488
|
+
|
|
489
|
+
<!-- 2.0: bar at 50 % -->
|
|
490
|
+
<obc-compass rotType="bar" rateOfTurnDegreesPerMinute="30"></obc-compass>
|
|
491
|
+
```
|
|
492
|
+
|
|
493
|
+
#### `obc-gauge-radial` Value Mapping _(silent)_
|
|
494
|
+
|
|
495
|
+
The needle and bar map `minValue` to `maxValue` onto the full dial ([f0121f8](https://github.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/commit/f0121f877)). 1.0.1 ignored a positive `minValue` and assumed a symmetric range for a negative one, so the same value can point elsewhere. The gauge also fills its container and centers the dial in it; `verticalAlignment` and `horizontalAlignment` place the dial.
|
|
496
|
+
|
|
497
|
+
```html
|
|
498
|
+
<!-- 1.0.1 and 2.0: the same markup -->
|
|
499
|
+
<obc-gauge-radial minValue="50" maxValue="150" value="100"></obc-gauge-radial>
|
|
500
|
+
<!-- 1.0.1: the needle points 45° right of top; 2.0: straight up, at mid-scale -->
|
|
501
|
+
```
|
|
502
|
+
|
|
503
|
+
#### `obc-speed-gauge` Readout
|
|
504
|
+
|
|
505
|
+
`showReadout` is now `hasReadout` ([#949](https://github.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/pull/949)). The readout also takes `label`, `unit` and `fractionDigits`.
|
|
506
|
+
|
|
507
|
+
```html
|
|
508
|
+
<!-- 1.0.1 -->
|
|
509
|
+
<obc-speed-gauge showReadout></obc-speed-gauge>
|
|
510
|
+
|
|
511
|
+
<!-- 2.0 -->
|
|
512
|
+
<obc-speed-gauge hasReadout></obc-speed-gauge>
|
|
513
|
+
```
|
|
514
|
+
|
|
515
|
+
#### `obc-depth-actual` Ranges and Labels _(silent)_
|
|
516
|
+
|
|
517
|
+
The same markup draws a different instrument ([#1247](https://github.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/pull/1247)). The default range is 100 instead of 10, the tick intervals and the waterline follow the range, a label column sits beside the frame, and the depth marker is hidden when the depth is past the range. `maxDepth` sets the range, with `instrumentRange` kept as an alias, and `autoRange` steps between 25, 100 and 1000 as the depth changes.
|
|
518
|
+
|
|
519
|
+
```html
|
|
520
|
+
<!-- 1.0.1: range 10 -->
|
|
521
|
+
<obc-depth-actual depth="4"></obc-depth-actual>
|
|
522
|
+
|
|
523
|
+
<!-- 2.0: the 1.0.1 range and ticks; showLabels = false removes the label column -->
|
|
524
|
+
<obc-depth-actual
|
|
525
|
+
depth="4"
|
|
526
|
+
maxDepth="10"
|
|
527
|
+
primaryTickmarkInterval="50"
|
|
528
|
+
secondaryTickmarkInterval="10"
|
|
529
|
+
></obc-depth-actual>
|
|
530
|
+
```
|
|
531
|
+
|
|
532
|
+
#### Vessel Image `fore-fore` Removed
|
|
533
|
+
|
|
534
|
+
`VesselImage` no longer has `fore-fore` ([#833](https://github.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/pull/833)). Pick another fore view, such as the default `psv-fore`, on `obc-roll`, `obc-pitch-roll` and the other instruments that take a vessel image.
|
|
535
|
+
|
|
536
|
+
#### Instrument Layout
|
|
537
|
+
|
|
538
|
+
- Radial instruments reserve room for their tick labels and hide the labels when the instrument is too small, instead of clipping them. `faceDiameter` pins the ring size so instruments line up ([#1049](https://github.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/pull/1049)).
|
|
539
|
+
- `obc-wind` picks a small, medium or large drawing from its size and shows compass labels ([#864](https://github.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/pull/864), [#1083](https://github.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/pull/1083)).
|
|
540
|
+
- `obc-bearing-indicator`, `obc-compass-indicator`, `obc-gauge-horizontal` and `obc-gauge-vertical` no longer leave a gap of about 4 px below them ([#1130](https://github.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/pull/1130)).
|
|
541
|
+
- `obc-compass-sector` and `obc-rudder` are the drawing rather than a square holding it: the host takes the frame's aspect ratio, `448 / 217` and `448 / 269` by default, and fits inside the container ([#1292](https://github.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/pull/1292)). 1.0.1 let `obc-compass-sector` fill its container, so a square box left the 120° arc floating in empty space, and a layout that reserved one now gets a shorter element. On `obc-compass-sector` the ROT track, inside tick labels and the readout each crop less, which makes the box taller.
|
|
542
|
+
|
|
543
|
+
### Alerts
|
|
544
|
+
|
|
545
|
+
The flashing variables and tempos are described in [Alert Flashing Variables](#alert-flashing-variables).
|
|
546
|
+
|
|
547
|
+
#### `obc-alert-icon` Glyphs
|
|
548
|
+
|
|
549
|
+
The icon draws the alert levels and changed three properties ([#1039](https://github.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/pull/1039)):
|
|
550
|
+
|
|
551
|
+
- `outline` is removed; use an outline icon element such as `obi-alarm-badge-outline` instead.
|
|
552
|
+
- `type` is deprecated in favor of `alertType`.
|
|
553
|
+
- `acknowledged` shows the steady acknowledged glyph. The alternating glyph that 1.0.1 showed for an acknowledged alarm now needs `silenced`.
|
|
554
|
+
|
|
555
|
+
Without a type, the icon draws an alarm instead of the text "No alarm".
|
|
556
|
+
|
|
557
|
+
```html
|
|
558
|
+
<!-- 1.0.1 -->
|
|
559
|
+
<obc-alert-icon type="alarm" outline></obc-alert-icon>
|
|
560
|
+
<obc-alert-icon type="alarm" acknowledged></obc-alert-icon>
|
|
561
|
+
|
|
562
|
+
<!-- 2.0 -->
|
|
563
|
+
<obi-alarm-badge-outline></obi-alarm-badge-outline>
|
|
564
|
+
<obc-alert-icon alertType="alarm" silenced></obc-alert-icon>
|
|
565
|
+
```
|
|
566
|
+
|
|
567
|
+
#### `obc-alert-frame` States and Stroke
|
|
568
|
+
|
|
569
|
+
- `mode` sets the alert state: `acked-active` (the default, steady), `unacked-active` (flashes) or `unacked-rectified` (dashed, flashes very slowly). The frame never flashed in 1.0.1 ([#947](https://github.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/pull/947)).
|
|
570
|
+
- `flashingSpeed` on `obc-alert-frame`, `obc-alert-icon` and `obc-alert-button` picks a tempo, or `fixed` for none ([#1135](https://github.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/pull/1135)).
|
|
571
|
+
- The stroke is centered on the frame's edge instead of sitting outside it, so remove any offset that made room for it ([#1236](https://github.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/pull/1236)).
|
|
572
|
+
|
|
573
|
+
```html
|
|
574
|
+
<!-- 2.0 -->
|
|
575
|
+
<obc-alert-frame status="alarm" mode="unacked-active">…</obc-alert-frame>
|
|
576
|
+
<obc-alert-button
|
|
577
|
+
alertType="warning"
|
|
578
|
+
nAlerts="3"
|
|
579
|
+
counter
|
|
580
|
+
blinking
|
|
581
|
+
flashingSpeed="fixed"
|
|
582
|
+
></obc-alert-button>
|
|
583
|
+
```
|
|
584
|
+
|
|
585
|
+
#### New Alert Levels
|
|
586
|
+
|
|
587
|
+
`AlertType` adds `level-critical`, `level-high`, `level-medium`, `level-low` and `level-diagnostic` to `alarm`, `warning` and `caution` ([#947](https://github.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/pull/947)). TypeScript code that handles every `AlertType` value gets new cases. `ObcAlertFrameStatus` remains as an alias of `AlertType`.
|
|
588
|
+
|
|
589
|
+
#### Smaller Alert Changes
|
|
590
|
+
|
|
591
|
+
- `obc-alert-menu`: setting `showSilenceButton` or `showAlertListButton` to `false` from JavaScript hides that footer button.
|
|
592
|
+
- `obc-alert-list-details`: the column header reads `Status` instead of `status`.
|
|
593
|
+
- `obc-alert-menu-item`: long titles and descriptions wrap instead of overflowing.
|
|
594
|
+
- `obc-alert-button`: the bell and count are drawn by the new `obc-alert-button-item` and sit one pixel further left ([#1236](https://github.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/pull/1236)).
|
|
595
|
+
|
|
596
|
+
### UI Components
|
|
597
|
+
|
|
598
|
+
#### `obc-card` Timeouts in Seconds _(silent)_
|
|
599
|
+
|
|
600
|
+
`dialogTimeOutSeconds` and `dialogVisibleTimerSeconds` were read as milliseconds in 1.0.1, despite their names, and are now seconds ([#884](https://github.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/pull/884)). `dialogTimeOutSeconds="20000"` meant 20 seconds in 1.0.1; carried over unchanged it means 20000 seconds, five and a half hours. `0` turns auto-close off.
|
|
601
|
+
|
|
602
|
+
```html
|
|
603
|
+
<!-- 1.0.1 -->
|
|
604
|
+
<obc-card
|
|
605
|
+
hasDialog
|
|
606
|
+
dialogTimeOutSeconds="30000"
|
|
607
|
+
dialogVisibleTimerSeconds="5000"
|
|
608
|
+
></obc-card>
|
|
609
|
+
|
|
610
|
+
<!-- 2.0 -->
|
|
611
|
+
<obc-card
|
|
612
|
+
hasDialog
|
|
613
|
+
dialogTimeOutSeconds="30"
|
|
614
|
+
dialogVisibleTimerSeconds="5"
|
|
615
|
+
></obc-card>
|
|
616
|
+
```
|
|
617
|
+
|
|
618
|
+
#### `obc-number-input-field` Value and Events
|
|
619
|
+
|
|
620
|
+
`value` is a number, and `NaN` when the field is empty ([#887](https://github.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/pull/887)). The `input` event is a `CustomEvent` with `detail.value` that does not bubble, so listen on the element, not on a parent. `change` fires when the field loses focus. While the field is not focused, the value is shown with the separators of the browser's locale.
|
|
621
|
+
|
|
622
|
+
```js
|
|
623
|
+
// 1.0.1
|
|
624
|
+
field.value = '12.5';
|
|
625
|
+
form.addEventListener('input', (e) => save(e.target.value));
|
|
626
|
+
|
|
627
|
+
// 2.0
|
|
628
|
+
field.value = 12.5;
|
|
629
|
+
field.addEventListener('input', (e) => save(e.detail.value));
|
|
630
|
+
field.addEventListener('change', (e) => commit(e.detail.value));
|
|
631
|
+
```
|
|
632
|
+
|
|
633
|
+
#### `obc-stepper-box` Value
|
|
634
|
+
|
|
635
|
+
The stepper box now holds a numeric value ([#886](https://github.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/pull/886)). The default, `unit` and `helper-text` slots and `hasHelperText` are gone; set `value`, `unit` and `helperText`, and optionally `min` and `max`. The buttons change `value` themselves and then fire `up` or `down` and `change`, each with `detail.value`, so an app that also increments on `up` steps twice. An unset `value` shows `1`.
|
|
636
|
+
|
|
637
|
+
```html
|
|
638
|
+
<!-- 1.0.1 -->
|
|
639
|
+
<obc-stepper-box hasHelperText>
|
|
640
|
+
<div>5</div>
|
|
641
|
+
<div slot="unit">kg</div>
|
|
642
|
+
<div slot="helper-text">Set weight</div>
|
|
643
|
+
</obc-stepper-box>
|
|
644
|
+
|
|
645
|
+
<!-- 2.0 -->
|
|
646
|
+
<obc-stepper-box
|
|
647
|
+
value="5"
|
|
648
|
+
unit="kg"
|
|
649
|
+
helperText="Set weight"
|
|
650
|
+
min="0"
|
|
651
|
+
></obc-stepper-box>
|
|
652
|
+
```
|
|
653
|
+
|
|
654
|
+
#### `obc-checkbox-item` Levels
|
|
655
|
+
|
|
656
|
+
`isNested`, `isLevel1` and `isLevel2` are replaced by `level` ([#1201](https://github.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/pull/1201)): `isNested` becomes `level="1"`, `isLevel1` becomes `level="1" expandable`, and `isLevel2` becomes `level="2"`. `expanded` sets the chevron's direction. The chevron fires `expand-toggle` and leaves the checkbox and `expanded` alone; the new `obc-checkbox-list` handles `expanded` and hides the rows under a collapsed parent. Rows are indented 32 px per level instead of 48 px.
|
|
657
|
+
|
|
658
|
+
```html
|
|
659
|
+
<!-- 1.0.1 -->
|
|
660
|
+
<obc-checkbox-item isLevel1 label="Engines"></obc-checkbox-item>
|
|
661
|
+
<obc-checkbox-item isLevel2 label="Port engine"></obc-checkbox-item>
|
|
662
|
+
|
|
663
|
+
<!-- 2.0 -->
|
|
664
|
+
<obc-checkbox-list>
|
|
665
|
+
<obc-checkbox-item
|
|
666
|
+
level="1"
|
|
667
|
+
expandable
|
|
668
|
+
expanded
|
|
669
|
+
label="Engines"
|
|
670
|
+
></obc-checkbox-item>
|
|
671
|
+
<obc-checkbox-item level="2" label="Port engine"></obc-checkbox-item>
|
|
672
|
+
</obc-checkbox-list>
|
|
673
|
+
```
|
|
674
|
+
|
|
675
|
+
#### `obc-user-menu` Content _(silent)_
|
|
676
|
+
|
|
677
|
+
In 1.0.1 an empty user menu showed made-up rows, an avatar and recently signed-in users. 2.0 shows only what you pass: `signedInActions` for the rows, `recentUsers`, and `userInitials` or `userLabel` for the avatar ([#1168](https://github.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/pull/1168)). The small signed-in layout shows a primary button only for the action that `primaryActionId` names. The sign-in layouts add a "Use another account" button, which fires `use-another-account-click` and hides with `showUseAnotherAccount = false` ([#1246](https://github.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/pull/1246)).
|
|
678
|
+
|
|
679
|
+
```js
|
|
680
|
+
// 2.0
|
|
681
|
+
menu.signedInActions = [
|
|
682
|
+
{id: 'preferences', label: 'Preferences'},
|
|
683
|
+
{id: 'log', label: 'Log'},
|
|
684
|
+
];
|
|
685
|
+
menu.primaryActionId = 'preferences';
|
|
686
|
+
```
|
|
687
|
+
|
|
688
|
+
#### `obc-modal-window` Height and Actions
|
|
689
|
+
|
|
690
|
+
The modal takes the height of its content, up to 90 % of the viewport, instead of a fixed 407 px ([#1047](https://github.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/pull/1047)). `--obc-modal-window-height` sets a fixed height ([#1156](https://github.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/pull/1156)). `hasCancelAction` and `hasCloseAction` hide the cancel and close buttons; both default to `true` ([#883](https://github.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/pull/883)).
|
|
691
|
+
|
|
692
|
+
```html
|
|
693
|
+
<!-- 2.0: the 1.0.1 height -->
|
|
694
|
+
<obc-modal-window style="--obc-modal-window-height: 407px"></obc-modal-window>
|
|
695
|
+
```
|
|
696
|
+
|
|
697
|
+
#### Integration Buttons _(silent)_
|
|
698
|
+
|
|
699
|
+
`obc-integration-fleet-button` shows its alerts only with `showAlerts` ([#961](https://github.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/pull/961)), and `obc-integration-button` shows the `status` slot only with `hasStatus` ([#624](https://github.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/pull/624)). All integration components are experimental in 2.0.
|
|
700
|
+
|
|
701
|
+
```html
|
|
702
|
+
<!-- 1.0.1 -->
|
|
703
|
+
<obc-integration-fleet-button></obc-integration-fleet-button>
|
|
704
|
+
<obc-integration-button>
|
|
705
|
+
<span slot="status">Online</span>
|
|
706
|
+
</obc-integration-button>
|
|
707
|
+
|
|
708
|
+
<!-- 2.0 -->
|
|
709
|
+
<obc-integration-fleet-button showAlerts></obc-integration-fleet-button>
|
|
710
|
+
<obc-integration-button hasStatus>
|
|
711
|
+
<span slot="status">Online</span>
|
|
712
|
+
</obc-integration-button>
|
|
713
|
+
```
|
|
714
|
+
|
|
715
|
+
#### Tab Badges
|
|
716
|
+
|
|
717
|
+
`obc-tab-item` and the `tabs` of `obc-tab-row` take a `badges` array, so a tab can show several badges ([#1011](https://github.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/pull/1011)). `hasBadge`, `badgeCount`, `badgeType`, `badgeSize`, `badgeShowNumber` and `showLeadingBadgeIcon` are deprecated and still work.
|
|
718
|
+
|
|
719
|
+
```js
|
|
720
|
+
// 1.0.1
|
|
721
|
+
row.tabs = [
|
|
722
|
+
{
|
|
723
|
+
id: 'alarms',
|
|
724
|
+
title: 'Alarms',
|
|
725
|
+
hasBadge: true,
|
|
726
|
+
badgeCount: 3,
|
|
727
|
+
badgeType: 'alarm',
|
|
728
|
+
},
|
|
729
|
+
];
|
|
730
|
+
|
|
731
|
+
// 2.0
|
|
732
|
+
row.tabs = [
|
|
733
|
+
{
|
|
734
|
+
id: 'alarms',
|
|
735
|
+
title: 'Alarms',
|
|
736
|
+
badges: [{type: 'alarm', size: 'regular', count: 3}],
|
|
737
|
+
},
|
|
738
|
+
];
|
|
739
|
+
```
|
|
740
|
+
|
|
741
|
+
#### `obc-start-stop-switch` Icon Flags
|
|
742
|
+
|
|
743
|
+
`showCheckedStateIcon` and `showUncheckedStateIcon` are removed ([#1279](https://github.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/pull/1279)). Neither had an effect: the `checked-state-icon` and `unchecked-state-icon` slots always render. Drop the attributes and keep the slots.
|
|
744
|
+
|
|
745
|
+
#### Events and Keyboard
|
|
746
|
+
|
|
747
|
+
- `obc-toggle-switch` fires `change` with `detail.checked` as well as `input`, and the `change` event of `obc-text-input-field` carries `detail.value` ([#1088](https://github.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/pull/1088)).
|
|
748
|
+
- `obc-navigation-item` no longer dispatches an extra `click` on `window`; the click from the item itself still bubbles ([#1112](https://github.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/pull/1112)).
|
|
749
|
+
- `obc-icon-button` passes its `aria-label` to the inner button ([#1202](https://github.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/pull/1202)).
|
|
750
|
+
- `obc-menu-button` and `obc-split-button` move focus into the open menu and support the arrow keys, Home, End and Escape ([#811](https://github.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/pull/811)).
|
|
751
|
+
- `obc-slide-button` completes with Space or Enter, and `obc-start-stop-switch` toggles with them ([#1075](https://github.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/pull/1075)).
|
|
752
|
+
|
|
753
|
+
#### Component Layout
|
|
754
|
+
|
|
755
|
+
- Buttons with and without a border share one visible height ([#830](https://github.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/pull/830)).
|
|
756
|
+
- `obc-top-bar` keeps its controls on screen and shortens the title first when space runs out ([#1213](https://github.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/pull/1213)).
|
|
757
|
+
- `obc-navigation-menu` scrolls its items and keeps the footer and logo in place ([#895](https://github.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/pull/895)).
|
|
758
|
+
- `obc-accordion-card` and `obc-accordion-item` slide open and closed over `--obc-accordion-expand-duration` (200 ms), and `prefers-reduced-motion: reduce` switches instantly ([#1304](https://github.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/pull/1304)). 1.0.1 rendered no panel while collapsed; the panel is now always in the DOM, `inert` while closed, so a query or a test that expected the collapsed content to be absent finds it.
|
|
759
|
+
|
|
760
|
+
### Readouts
|
|
761
|
+
|
|
762
|
+
#### `obc-instrument-field` Is Deprecated
|
|
763
|
+
|
|
764
|
+
`obc-instrument-field` still works in 2.0 and is deprecated in favor of `obc-readout` ([#1146](https://github.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/pull/1146)). The most common renames are `tag` to `label`, and `size="regular"` and `size="enhanced"` to `size="small"` and `size="large"`. Color moves to `priority`: `neutralColor` becomes `priority="regular"`, and the 1.0.1 default with `neutralColor` unset becomes `priority="enhanced"`. `obc-readout` resolves an unset `priority` to `regular`, so a field that relied on the 1.0.1 default has to set `priority="enhanced"` explicitly, as the example below does. `maxDigits` counts digits differently. The [Instrument Field (deprecated)](https://openbridge-next-storybook.web.app/components/obc-instrument-field.md) page maps every property and shows each case next to its `obc-readout` equivalent.
|
|
765
|
+
|
|
766
|
+
```html
|
|
767
|
+
<!-- 1.0.1 -->
|
|
768
|
+
<obc-instrument-field
|
|
769
|
+
tag="HDG"
|
|
770
|
+
unit="DEG"
|
|
771
|
+
value="182"
|
|
772
|
+
size="enhanced"
|
|
773
|
+
></obc-instrument-field>
|
|
774
|
+
|
|
775
|
+
<!-- 2.0 -->
|
|
776
|
+
<obc-readout
|
|
777
|
+
label="HDG"
|
|
778
|
+
unit="DEG"
|
|
779
|
+
value="182"
|
|
780
|
+
size="large"
|
|
781
|
+
priority="enhanced"
|
|
782
|
+
></obc-readout>
|
|
783
|
+
```
|
|
784
|
+
|
|
785
|
+
`obc-readout` applies no minimum height: a small vertical readout is 44 px tall instead of 48, and a stacked one with no value is 40 px; the medium and large tiers are unchanged ([#1255](https://github.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/pull/1255)).
|
|
786
|
+
|
|
787
|
+
#### Placeholder Dash
|
|
788
|
+
|
|
789
|
+
A missing value is drawn with the figure dash `‒` (U+2012) instead of a hyphen, so `--.-` becomes `‒‒.‒` ([#1210](https://github.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/pull/1210)). Update text assertions in tests. The character is exported as `READOUT_UNAVAILABLE_DASH` from `dist/navigation-instruments/readout/readout-formatters.js`.
|
|
790
|
+
|
|
791
|
+
### Charts
|
|
792
|
+
|
|
793
|
+
#### Line and Area Chart Axes _(silent)_
|
|
794
|
+
|
|
795
|
+
Under custom `yAxes`, a dataset without `yAxisID` is plotted against the first axis in `yAxes`; 1.0.1 created an extra axis from 0 to 1 for it ([#1222](https://github.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/pull/1222)). A chart smaller than 192 px also leaves room for a slotted scale instead of drawing over it.
|
|
796
|
+
|
|
797
|
+
```js
|
|
798
|
+
chart.yAxes = [{id: 'power', position: 'left'}];
|
|
799
|
+
// 1.0.1: plotted against an extra 0 to 1 axis
|
|
800
|
+
// 2.0: plotted against 'power'
|
|
801
|
+
chart.datasets = [{label: 'kW', data: [1, 2, 3]}];
|
|
802
|
+
```
|
|
803
|
+
|
|
804
|
+
#### Chart Size
|
|
805
|
+
|
|
806
|
+
- `obc-gauge-trend` fills its container at any aspect ratio; 1.0.1 limited the canvas width to twice its height ([#1139](https://github.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/pull/1139)).
|
|
807
|
+
- The donut, pie, polar and radial bar charts render at their computed size. With a legend, 1.0.1 drew them about twice as large ([#1074](https://github.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/pull/1074)).
|
|
808
|
+
|
|
809
|
+
#### Chart Properties That Did Nothing
|
|
810
|
+
|
|
811
|
+
1.0.1's typings listed `fill`, `fillMode` and `stacked` on `obc-line-graph`, `fill` on `obc-area-graph`, `enhanced`, `fill` and `stacked` on `obc-gauge-trend`, and `trimToDiscreteStops` on `obc-polar-chart`, but setting them had no effect. The wrappers no longer offer them ([#1046](https://github.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/pull/1046)). For a filled, stacked chart, use `fillMode` and `stacked` on `obc-area-graph`.
|
|
812
|
+
|
|
813
|
+
#### `formatChartNumber`
|
|
814
|
+
|
|
815
|
+
The chart helper `formatNumericValue` in `dist/charthelpers/canvas-layout.js` is now `formatChartNumber` ([#1210](https://github.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/pull/1210)).
|
|
816
|
+
|
|
817
|
+
### AR
|
|
818
|
+
|
|
819
|
+
The point-of-interest components are experimental in 2.0. Besides the [import paths](#ar-import-paths) ([#761](https://github.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/pull/761)):
|
|
820
|
+
|
|
821
|
+
- `lineCompensationY` is removed from `obc-poi-aton`, `obc-poi-data` and `obc-poi-vessel`; the layer computes the offset.
|
|
822
|
+
- `obc-poi-layer` reads the `is-selected` attribute instead of `isselected`.
|
|
823
|
+
- `ObcPoiObjectAtonState` and `ObcPoiObjectDataState` are merged into `ObcPoiObjectState`, and `ObcPoiObjectDataStyle` is now `ObcPoiObjectStyle`. The old names are still exported from `dist/ar/poi-button/poi-button-aton.js` and `dist/ar/poi-button/poi-button-data.js`.
|
|
824
|
+
|
|
825
|
+
The POI components also stopped touching the consumer's light DOM, and selection and grouping became public APIs ([#1060](https://github.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/pull/1060)):
|
|
826
|
+
|
|
827
|
+
- `obc-poi-group` reads the `position-vertical` attribute instead of `positionvertical`.
|
|
828
|
+
- A bare `obc-poi` places its button 192 px above the anchor instead of 96.
|
|
829
|
+
- `--obc-poi-layer-line-length` is removed.
|
|
830
|
+
- `obc-poi-layer-stack` leaves the selected target where you put it instead of moving it into the selected layer, and projects its button instead. Read `selectedTargets`, or listen for `selection-change`, in place of reading the DOM. `selectTarget`, `deselectTarget` and `clearSelection` drive the selection from script.
|
|
831
|
+
- `obc-poi-layer` builds its auto-groups inside its own shadow DOM and assigns the members to them through slots. 1.0.1 inserted the group elements among the layer's own children, so a page that read them from its markup reads `layer.autoGroups` after `grouping-change` instead.
|
|
832
|
+
- Header content slotted into a POI stays in your markup. 1.0.1 moved those nodes into the button the component renders inside its shadow DOM, so they left `poi.children`; 2.0 forwards them through a chain of `<slot name="header">` and leaves them where you wrote them. The markup does not change, only where the nodes are found.
|
|
833
|
+
|
|
834
|
+
```html
|
|
835
|
+
<!-- 1.0.1 -->
|
|
836
|
+
<obc-poi-data line-compensation-y="12"></obc-poi-data>
|
|
837
|
+
<obc-poi-layer isSelected></obc-poi-layer>
|
|
838
|
+
<obc-poi-group positionVertical="240px"></obc-poi-group>
|
|
839
|
+
|
|
840
|
+
<!-- 2.0 -->
|
|
841
|
+
<obc-poi-data></obc-poi-data>
|
|
842
|
+
<obc-poi-layer is-selected></obc-poi-layer>
|
|
843
|
+
<obc-poi-group position-vertical="240px"></obc-poi-group>
|
|
844
|
+
```
|
|
845
|
+
|
|
846
|
+
## Keyboard, Focus and Events
|
|
847
|
+
|
|
848
|
+
The components that carry a widget role follow the [WAI-ARIA Authoring Practices](https://www.w3.org/WAI/ARIA/apg/patterns/) in 2.0 ([#1297](https://github.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/pull/1297), [#1314](https://github.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/pull/1314)). No property was removed. What changed is how the components answer the keyboard, when they take focus, and which events leave them, so a page that drives them from script or asserts their keyboard behavior in tests needs a second look.
|
|
849
|
+
|
|
850
|
+
### One Tab Stop per Composite Widget _(silent)_
|
|
851
|
+
|
|
852
|
+
`obc-tab-row`, `obc-toggle-button-group` and `obc-context-menu-input` hold a single tab stop each, and the arrow keys move between their items, with `Home` and `End` for the first and last. In 1.0.1 every item was its own tab stop, so a test that reached the last of five tabs with five presses of `Tab` now leaves the row on the second.
|
|
853
|
+
|
|
854
|
+
Two buttons left the tab order, each with a key in its place:
|
|
855
|
+
|
|
856
|
+
- a tab's close button under `hasClose`, with `Delete` on the focused tab,
|
|
857
|
+
- the close button in `obc-context-menu-input`'s title bar, with `Escape`.
|
|
858
|
+
|
|
859
|
+
Both still fire the events they fired before, `tab-closed` and `close`.
|
|
860
|
+
|
|
861
|
+
### Modals Take Focus _(silent)_
|
|
862
|
+
|
|
863
|
+
`obc-modal-window`, `obc-sequence-modal` and `obc-automation-input-modal` follow the APG dialog pattern: focus moves onto the dialog when the element connects, `Tab` and `Shift+Tab` cycle inside it, and focus returns to the element that opened it when the element disconnects. Focus lands on the dialog container rather than on its first button, so the `Enter` that opened a dialog cannot activate anything in it.
|
|
864
|
+
|
|
865
|
+
A page that keeps a modal in the DOM and hides it with CSS now takes focus on load. Render the modal only while it is open.
|
|
866
|
+
|
|
867
|
+
`Escape` also closes `obc-keyboard-full` and `obc-keyboard-numeric`, through the same event as their close button, and `obc-stepper-box` answers the [spinbutton](https://www.w3.org/WAI/ARIA/apg/patterns/spinbutton/) keys wherever focus sits inside it. On `obc-modal-window`, `Escape` fires `close-click`, or `cancel-click` when there is no close button.
|
|
868
|
+
|
|
869
|
+
### Accessible Names in English
|
|
870
|
+
|
|
871
|
+
Icon-only buttons name themselves for a screen reader, and the defaults are English, so a localized page sets them. `obc-topbar-message-item` is the exception: its `actionLabel` is empty by default and the button stays unnamed until the page sets it.
|
|
872
|
+
|
|
873
|
+
| Element | Property | Default |
|
|
874
|
+
| ------------------------------------------- | ---------------------------------- | -------------------------- |
|
|
875
|
+
| `obc-floating-item` | `dismissLabel` | `Dismiss` |
|
|
876
|
+
| `obc-keyboard-full`, `obc-keyboard-numeric` | `closeLabel` | `Close` |
|
|
877
|
+
| `obc-modal-window`, `obc-sequence-modal` | `closeLabel` | `Close` |
|
|
878
|
+
| `obc-slider`, `obc-stepper-box` | `decrementLabel`, `incrementLabel` | `Decrease`, `Increase` |
|
|
879
|
+
| `obc-split-button` | `dropdownLabel` | `More options` |
|
|
880
|
+
| `obc-topbar-message-item` | `actionLabel` | empty; the icon is unnamed |
|
|
881
|
+
|
|
882
|
+
`obc-tab-row` names its tab list through `label`, and `obc-toggle-button-group`, `obc-table` and `obc-alert-list-details-experimental` take their name from `aria-label`.
|
|
883
|
+
|
|
884
|
+
### Events Stay Inside Their Component _(silent)_
|
|
885
|
+
|
|
886
|
+
A component no longer lets a child's event out unless it documents that event itself, so what an element fires is what its `@fires` list in the docs shows. 75 events that crossed the shadow boundary in 1.0.1 without any element documenting them were closed off: most are stopped where they are handled, among them the readout source events of the instruments and `tab-click` inside `obc-tab-row`, and the rest now carry an `@fires` entry on the component that passes them on, as `event-click` does on `obc-date-item` and `obc-calendar`.
|
|
887
|
+
|
|
888
|
+
One documented event changed: `obc-bar-horizontal`, `obc-bar-vertical`, `obc-gauge-horizontal` and `obc-gauge-vertical` fire `scale-dimensions-changed` without `composed`, so it no longer crosses out of the shadow root of a component that renders one of them. A listener on the scale itself, or on an ancestor in the same tree, still sees it.
|
|
889
|
+
|
|
890
|
+
## Deprecated Components
|
|
891
|
+
|
|
892
|
+
Deprecated components and properties still work in 2.0 and are slated for removal. Components now show their status in Storybook: stable, beta, experimental or deprecated. The experimental ones, among them all AR and integration components, may still change their API. The replacements below are the ones the components' own `@deprecated` notes name ([#1262](https://github.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/pull/1262)).
|
|
893
|
+
|
|
894
|
+
| Element | Use instead |
|
|
895
|
+
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
896
|
+
| `obc-instrument-field` | `obc-readout`; see [Instrument Field (deprecated)](https://openbridge-next-storybook.web.app/components/obc-instrument-field.md) |
|
|
897
|
+
| `obc-azimuth-thruster-labeled` | `obc-azimuth-thruster` with an `obc-readout` beside it |
|
|
898
|
+
| `obc-notification-badge-button` | `obc-icon-button`: the icon goes in its default slot and the text in the `label` slot with `hasLabel`; `openLeft`, `openRight` and `indent` have no equivalent |
|
|
899
|
+
| `obc-corner-line`, `obc-direction-line`, `obc-end-point-line`, `obc-horizontal-line`, `obc-line-cross`, `obc-line-overlap`, `obc-three-way-line`, `obc-vertical-line` | the `@oicl/connector-diagram` package |
|
|
900
|
+
|
|
901
|
+
These properties are deprecated on components that stay:
|
|
902
|
+
|
|
903
|
+
| Element | Deprecated | Use instead |
|
|
904
|
+
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
|
|
905
|
+
| `obc-alert-icon` | `type` | `alertType` |
|
|
906
|
+
| `obc-bipolar-transistor`, `obc-capacitor`, `obc-converter`, `obc-damper`, `obc-diodes`, `obc-fan`, `obc-filter`, `obc-ground`, `obc-logic`, `obc-mosfet`, `obc-motor`, `obc-pump`, `obc-resistor`, `obc-router`, `obc-source`, `obc-switch`, `obc-transformer` | `on` | `turnedOn`; setting `on` sets `turnedOn` |
|
|
907
|
+
| `obc-compass`, `obc-compass-flat`, `obc-compass-sector`, `obc-rate-of-turn`, `obc-rot-indicator`, `obc-watch`, `obc-watch-flat` | `rotationsPerMinute` | `rateOfTurnDegreesPerMinute`; the old property applies only while the new one is unset |
|
|
908
|
+
| `obc-depth-actual` | `instrumentRange` | `maxDepth` |
|
|
909
|
+
| `obc-fan`, `obc-motor`, `obc-pump` | `speedInPercent` | `speed` with `speedUnit`; `speed` wins when both are set |
|
|
910
|
+
| `obc-tab-item`, and the `tabs` of `obc-tab-row` | `hasBadge`, `badgeCount`, `badgeType`, `badgeSize`, `badgeShowNumber`, `showLeadingBadgeIcon` | `badges` |
|
|
911
|
+
| `obc-wind-indicator` | `angle` | `currentWindFromDirection` |
|
|
912
|
+
|
|
913
|
+
The `ArrowStyle` enum and the `arrow()` function in `dist/navigation-instruments/compass/arrow.js` and `dist/navigation-instruments/heading/arrow.js` are deprecated as well; use `HdgArrowStyle`, `CogArrowStyle`, `hdgArrow` and `cogArrow` from `dist/navigation-instruments/course-arrows/course-arrows.js`.
|
|
914
|
+
|
|
915
|
+
## API Mapping by Component
|
|
916
|
+
|
|
917
|
+
These tables compare the component manifests of 1.0.1 and 2.0, element by element. They list renamed and removed properties, changed types and defaults, and attribute, slot and wrapper event changes; properties added in 2.0 are left out, and so are type changes that only gave an existing type a name. Search the page for an element or property name; Chrome and Edge open a closed section when they find a match in it.
|
|
918
|
+
|
|
919
|
+
"All automation devices" stands for `obc-analog-valve`, `obc-bipolar-transistor`, `obc-capacitor`, `obc-converter`, `obc-damper`, `obc-digital-valve`, `obc-diodes`, `obc-fan`, `obc-filter`, `obc-ground`, `obc-logic`, `obc-mosfet`, `obc-motor`, `obc-pump`, `obc-resistor`, `obc-router`, `obc-source`, `obc-switch` and `obc-transformer`. Chart and integration components have no entries; the chart properties that were listed in 1.0.1 but did nothing are covered in [Chart Properties That Did Nothing](#chart-properties-that-did-nothing).
|
|
920
|
+
|
|
921
|
+
<details>
|
|
922
|
+
<summary>Automation (22 elements)</summary>
|
|
923
|
+
|
|
924
|
+
| Element | 1.0.1 | 2.0 |
|
|
925
|
+
| -------------------------------------------------------------------------------------- | -------------------------------------------------- | ----------------------------------------------------------- |
|
|
926
|
+
| all automation devices | `badgeAlertOff` | `badgeAlert="silence"` |
|
|
927
|
+
| all automation devices | `badgeAuto` | `badgeControl="auto"` |
|
|
928
|
+
| all automation devices | `badgeCommandLocked`: `boolean` | `badgeCommandLocked`: `AutomationButtonBadgeCommandLocked` |
|
|
929
|
+
| all automation devices | `badgeDuty` | `badgeInterlock="interlock"` |
|
|
930
|
+
| all automation devices except `obc-fan`, `obc-motor` and `obc-pump` | `direction` | removed; only `obc-motor`, `obc-pump` and `obc-fan` have it |
|
|
931
|
+
| all automation devices, `obc-automation-button`, `obc-automation-button-readout-stack` | `hasIdTag` | removed; set `tag`, or leave it unset to hide the tag |
|
|
932
|
+
| all automation devices | `tag` = `''` | `tag` = `null` |
|
|
933
|
+
| `obc-automation-button`, `obc-automation-button-readout-stack` | `tag`: `AutomationButtonReadoutStackTag` or `null` | `tag`: `string` or `null` |
|
|
934
|
+
| `obc-automation-tank` | `variant` | `orientation`; `variant="compact"` is now `compact` |
|
|
935
|
+
|
|
936
|
+
</details>
|
|
937
|
+
|
|
938
|
+
<details>
|
|
939
|
+
<summary>Instruments (10 elements)</summary>
|
|
940
|
+
|
|
941
|
+
| Element | 1.0.1 | 2.0 |
|
|
942
|
+
| ------------------------------------------------------- | ---------------------------------------------------------- | -------------------------------------------------------------- |
|
|
943
|
+
| `obc-compass`, `obc-compass-flat`, `obc-compass-sector` | `rotMaxValue` = `10` | `rotMaxValue` = `60` |
|
|
944
|
+
| `obc-compass` | `windSpeed` | `currentWindSpeedKnots` |
|
|
945
|
+
| `obc-compass-indicator` | `arrow` | `direction` |
|
|
946
|
+
| `obc-compass-indicator` | `northUp` = `false` | `northUp` = `true` |
|
|
947
|
+
| `obc-compass-indicator` | attribute `northup` | none; set the `northUp` property |
|
|
948
|
+
| `obc-compass-sector` | wrapper event `None` (a `@fires` placeholder; never fired) | removed |
|
|
949
|
+
| `obc-depth-actual` | `primaryTickmarkInterval` = `50` | unset; follows the range |
|
|
950
|
+
| `obc-depth-actual` | `secondaryTickmarkInterval` = `10` | unset; follows the range |
|
|
951
|
+
| `obc-speed-gauge` | `showReadout` | `hasReadout` |
|
|
952
|
+
| `obc-velocity-projection-plot` | `instantCurrentDirectionDeg` | `currentFromDirection` |
|
|
953
|
+
| `obc-velocity-projection-plot` | `instantCurrentSpeedNumber` | `currentSpeedKnots` |
|
|
954
|
+
| `obc-velocity-projection-plot` | `instantWindDirectionDeg` | `currentWindFromDirection` |
|
|
955
|
+
| `obc-velocity-projection-plot` | `instantWindSpeedNumber` | `currentWindSpeedKnots` |
|
|
956
|
+
| `obc-watch` | `wind` | `windKnots` |
|
|
957
|
+
| `obc-wind` | `currentWindSpeedBeaufort` | `currentWindSpeedKnots` |
|
|
958
|
+
| `obc-wind-indicator` | `northUp` | removed; use `direction="relative"` with `rotation-angle` |
|
|
959
|
+
| `obc-wind-indicator` | `speed` | `currentWindSpeedKnots` (attribute `current-wind-speed-knots`) |
|
|
960
|
+
|
|
961
|
+
</details>
|
|
962
|
+
|
|
963
|
+
<details>
|
|
964
|
+
<summary>UI Components (7 elements)</summary>
|
|
965
|
+
|
|
966
|
+
| Element | 1.0.1 | 2.0 |
|
|
967
|
+
| ------------------------ | ------------------------------------- | ------------------------------------------ |
|
|
968
|
+
| `obc-alert-icon` | `outline` | removed; use an `obi-*-badge-outline` icon |
|
|
969
|
+
| `obc-alert-menu` | wrapper event `alert-list-click` | `go-to-alert-list-click` |
|
|
970
|
+
| `obc-card` | `dialogTimeOutSeconds` = `20000` | `dialogTimeOutSeconds` = `20` |
|
|
971
|
+
| `obc-card` | `dialogVisibleTimerSeconds` = `10000` | `dialogVisibleTimerSeconds` = `10` |
|
|
972
|
+
| `obc-checkbox-item` | `isLevel1` | `level="1" expandable` |
|
|
973
|
+
| `obc-checkbox-item` | `isLevel2` | `level="2"` |
|
|
974
|
+
| `obc-checkbox-item` | `isNested` | `level="1"` |
|
|
975
|
+
| `obc-number-input-field` | `value` = `''` | `value` = `NaN` |
|
|
976
|
+
| `obc-number-input-field` | `value`: `string` | `value`: `number` |
|
|
977
|
+
| `obc-start-stop-switch` | `showCheckedStateIcon` | removed; the icon slots always rendered |
|
|
978
|
+
| `obc-start-stop-switch` | `showUncheckedStateIcon` | removed; the icon slots always rendered |
|
|
979
|
+
| `obc-stepper-box` | `hasHelperText` | set `helperText` |
|
|
980
|
+
| `obc-stepper-box` | `leftIcon` | removed |
|
|
981
|
+
| `obc-stepper-box` | `rightIcon` | removed |
|
|
982
|
+
| `obc-stepper-box` | default slot | set `value` |
|
|
983
|
+
| `obc-stepper-box` | slot `helper-text` | set `helperText` |
|
|
984
|
+
| `obc-stepper-box` | slot `unit` | set `unit` |
|
|
985
|
+
|
|
986
|
+
</details>
|
|
987
|
+
|
|
988
|
+
<details>
|
|
989
|
+
<summary>Building Blocks (1 element)</summary>
|
|
990
|
+
|
|
991
|
+
| Element | 1.0.1 | 2.0 |
|
|
992
|
+
| ----------------------- | ---------- | ------- |
|
|
993
|
+
| `obc-instrument-radial` | `maxAngle` | removed |
|
|
994
|
+
| `obc-instrument-radial` | `minAngle` | removed |
|
|
995
|
+
|
|
996
|
+
</details>
|
|
997
|
+
|
|
998
|
+
<details>
|
|
999
|
+
<summary>AR (8 elements)</summary>
|
|
1000
|
+
|
|
1001
|
+
| Element | 1.0.1 | 2.0 |
|
|
1002
|
+
| --------------------------------------------------------------------- | ---------------------------- | -------------------------------------- |
|
|
1003
|
+
| `obc-poi`, `obc-poi-aton`, `obc-poi-data`, `obc-poi-vessel` | `buttonY` = `null` | `buttonY` = `0` |
|
|
1004
|
+
| `obc-poi` | `y` = `96` | `y` = `192` |
|
|
1005
|
+
| `obc-poi-aton`, `obc-poi-data`, `obc-poi-vessel` | `lineCompensationY` | removed; the layer computes the offset |
|
|
1006
|
+
| `obc-poi-group` | attribute `positionvertical` | attribute `position-vertical` |
|
|
1007
|
+
| `obc-poi-layer` | attribute `isselected` | attribute `is-selected` |
|
|
1008
|
+
| `obc-poi-object-aton`, `obc-poi-object-data`, `obc-poi-object-vessel` | `colorStyleVars` | removed |
|
|
1009
|
+
| `obc-poi-object-data`, `obc-poi-object-vessel` | `objectStyle`: `string` | `objectStyle`: `ObcPoiObjectStyle` |
|
|
1010
|
+
|
|
1011
|
+
</details>
|
|
1012
|
+
|
|
1013
|
+
## Icons
|
|
1014
|
+
|
|
1015
|
+
50 icon elements were renamed. The instruments that draw wind barbs pick the icon from the wind speed themselves, so only code that renders an `obi-*` icon directly, or builds its name, needs a change. A renamed icon that is still used renders nothing.
|
|
1016
|
+
|
|
1017
|
+
| 1.0.1 | 2.0 |
|
|
1018
|
+
| ------------------------------------- | -------------------------- |
|
|
1019
|
+
| `obi-bipolar_transistor-*` (14 icons) | `obi-bipolar-transistor-*` |
|
|
1020
|
+
| `obi-chevron-tripple-left` | `obi-chevron-triple-left` |
|
|
1021
|
+
| `obi-chevron-tripple-right` | `obi-chevron-triple-right` |
|
|
1022
|
+
| `obi-heat_pump_balance` | `obi-heat-pump-balance` |
|
|
1023
|
+
|
|
1024
|
+
The wind barb icons are named by wind speed in knots instead of a number from 1 to 14 ([#933](https://github.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/pull/933)). The same suffixes apply to `obi-wind-apparent-*`, `obi-wind-shaft-*` and `obi-wind-true-*`. The names ending in `-1`, `-5` and `-10` still exist and now show a different barb, so they render the wrong speed without an error:
|
|
1025
|
+
|
|
1026
|
+
| 1.0.1 suffix | 2.0 suffix |
|
|
1027
|
+
| ------------------- | ------------------------------------------------------------ |
|
|
1028
|
+
| `-1` (name reused) | `-0` |
|
|
1029
|
+
| `-2` | `-1` |
|
|
1030
|
+
| `-3` | `-5` |
|
|
1031
|
+
| `-4` | `-10` |
|
|
1032
|
+
| `-5` (name reused) | `-15` |
|
|
1033
|
+
| `-6` | `-20` |
|
|
1034
|
+
| `-7` | `-25` |
|
|
1035
|
+
| `-8` | `-30` |
|
|
1036
|
+
| `-9` | `-35` |
|
|
1037
|
+
| `-10` (name reused) | `-40`; `obi-wind-true-*` has no `-40`, so use `-35` or `-45` |
|
|
1038
|
+
| `-11` | `-45` |
|
|
1039
|
+
| `-12` | `-50` |
|
|
1040
|
+
| `-13` | `-60` |
|
|
1041
|
+
| `-14` | `-70` |
|
|
1042
|
+
|
|
1043
|
+
To pick a barb from a speed, use the helpers the instruments use:
|
|
1044
|
+
|
|
1045
|
+
```js
|
|
1046
|
+
import {windKnotsToWindTrueBucket} from '@oicl/openbridge-webcomponents/dist/navigation-instruments/watch/environment.js';
|
|
1047
|
+
|
|
1048
|
+
const iconTag = `obi-wind-true-${windKnotsToWindTrueBucket(19)}`; // obi-wind-true-20
|
|
1049
|
+
```
|
|
1050
|
+
|
|
1051
|
+
## Troubleshooting
|
|
1052
|
+
|
|
1053
|
+
- **An element renders nothing.** It was never registered; check `customElements.get('obc-…')` in the browser console. Look for a moved [AR import](#ar-import-paths), an [Angular import](#angular) that now registers only its own element, or a second copy of the core package ([Upgrade Steps](#upgrade-steps)).
|
|
1054
|
+
- **An attribute has no effect.** The property was renamed or removed ([API Mapping by Component](#api-mapping-by-component)), or it is a boolean that defaults to `true`, which has no attribute; set the property from JavaScript.
|
|
1055
|
+
- **An element styled with your own CSS stopped flashing.** It reads `--alarm-blink-*` or `--warning-blink-*` ([Alert Flashing Variables](#alert-flashing-variables)).
|
|
1056
|
+
- **A color or spacing set with a CSS variable is gone.** The variable was renamed ([Renamed CSS Variables](#renamed-css-variables)). Critical and diagnostic alert colors also need [`data-obc-theme`](#set-data-obc-theme).
|
|
1057
|
+
- **A dialog never closes.** `obc-card` timeouts are in [seconds](#obc-card-timeouts-in-seconds-silent).
|
|
1058
|
+
- **An `input` handler on a parent element is not called.** `obc-number-input-field` events no longer bubble; listen on the field ([details](#obc-number-input-field-value-and-events)).
|
|
1059
|
+
- **A Svelte event handler runs twice.** Remove the listener you added on the element as a workaround ([Svelte](#svelte)).
|
|
1060
|
+
- **TypeScript rejects a React `onClick` handler.** Type the event as `Event` ([React](#react)).
|
|
1061
|
+
- **A wind barb shows the wrong speed.** The wind icons are named by knots ([Icons](#icons)).
|
|
1062
|
+
- **A test that looks for `--` in a missing value fails.** Missing values use the [figure dash](#placeholder-dash).
|
|
1063
|
+
- **A layout moved.** `obc-automation-tank` [fills its parent](#obc-automation-tank-redesign), `obc-modal-window` [takes its content height](#obc-modal-window-height-and-actions) and `obc-gauge-radial` [centers its dial](#obc-gauge-radial-value-mapping-silent).
|