@oicl/openbridge-webcomponents-full-bundle 2.0.0-next.101 → 2.0.0-next.102
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/openbridge-webcomponents.bundle.js +1 -0
- package/bundle/openbridge-webcomponents.bundle.js.map +1 -1
- package/custom-elements.json +291 -399
- package/dist/bars-graphs/donut-chart/donut-chart.d.ts +18 -16
- package/dist/bars-graphs/donut-chart/donut-chart.d.ts.map +1 -1
- package/dist/bars-graphs/donut-chart/donut-chart.js.map +1 -1
- package/dist/bars-graphs/pie-chart/pie-chart.d.ts +14 -12
- package/dist/bars-graphs/pie-chart/pie-chart.d.ts.map +1 -1
- package/dist/bars-graphs/pie-chart/pie-chart.js.map +1 -1
- package/dist/bars-graphs/polar-chart/polar-chart.d.ts +19 -16
- package/dist/bars-graphs/polar-chart/polar-chart.d.ts.map +1 -1
- package/dist/bars-graphs/polar-chart/polar-chart.js.map +1 -1
- package/dist/bars-graphs/radial-bar-chart/radial-bar-chart.d.ts +8 -8
- package/dist/bars-graphs/radial-bar-chart/radial-bar-chart.d.ts.map +1 -1
- package/dist/bars-graphs/radial-bar-chart/radial-bar-chart.js.map +1 -1
- package/dist/building-blocks/chart-line/chart-line-base.d.ts +8 -25
- package/dist/building-blocks/chart-line/chart-line-base.d.ts.map +1 -1
- package/dist/building-blocks/chart-line/chart-line-base.js.map +1 -1
- package/dist/integration-systems/integration-bar/integration-bar.d.ts +20 -24
- package/dist/integration-systems/integration-bar/integration-bar.d.ts.map +1 -1
- package/dist/integration-systems/integration-bar/integration-bar.js.map +1 -1
- package/dist/integration-systems/integration-button/integration-button.d.ts +15 -13
- package/dist/integration-systems/integration-button/integration-button.d.ts.map +1 -1
- package/dist/integration-systems/integration-button/integration-button.js.map +1 -1
- package/dist/navigation-instruments/compass/compass.d.ts +47 -30
- package/dist/navigation-instruments/compass/compass.d.ts.map +1 -1
- package/dist/navigation-instruments/compass/compass.js.map +1 -1
- package/dist/navigation-instruments/compass-flat/compass-flat.d.ts +8 -9
- package/dist/navigation-instruments/compass-flat/compass-flat.d.ts.map +1 -1
- package/dist/navigation-instruments/compass-flat/compass-flat.js.map +1 -1
- package/dist/navigation-instruments/gauge-trend/gauge-trend.d.ts +0 -5
- package/dist/navigation-instruments/gauge-trend/gauge-trend.d.ts.map +1 -1
- package/dist/navigation-instruments/gauge-trend/gauge-trend.js.map +1 -1
- package/dist/navigation-instruments/graph-mini/graph-mini.d.ts +1 -1
- package/dist/navigation-instruments/graph-mini/graph-mini.d.ts.map +1 -1
- package/dist/navigation-instruments/graph-mini/graph-mini.js.map +1 -1
- package/dist/navigation-instruments/indicator-graph/indicator-graph.d.ts +1 -1
- package/dist/navigation-instruments/indicator-graph/indicator-graph.d.ts.map +1 -1
- package/dist/navigation-instruments/indicator-graph/indicator-graph.js.map +1 -1
- package/dist/navigation-instruments/watch/watch.d.ts +16 -16
- package/dist/navigation-instruments/watch/watch.d.ts.map +1 -1
- package/dist/navigation-instruments/watch/watch.js +1 -0
- package/dist/navigation-instruments/watch/watch.js.map +1 -1
- package/package.json +1 -1
- package/script/check-slot-event-docs.ts +35 -0
- package/src/bars-graphs/donut-chart/donut-chart.ts +18 -16
- package/src/bars-graphs/pie-chart/pie-chart.ts +14 -12
- package/src/bars-graphs/polar-chart/polar-chart.ts +19 -16
- package/src/bars-graphs/radial-bar-chart/radial-bar-chart.ts +8 -8
- package/src/building-blocks/chart-line/chart-line-base.ts +8 -25
- package/src/integration-systems/integration-bar/integration-bar.ts +20 -24
- package/src/integration-systems/integration-button/integration-button.ts +15 -13
- package/src/navigation-instruments/compass/compass.ts +47 -30
- package/src/navigation-instruments/compass-flat/compass-flat.ts +8 -9
- package/src/navigation-instruments/gauge-trend/gauge-trend.ts +0 -5
- package/src/navigation-instruments/graph-mini/graph-mini.ts +1 -1
- package/src/navigation-instruments/indicator-graph/indicator-graph.ts +1 -1
- package/src/navigation-instruments/watch/watch.ts +16 -16
|
@@ -125,32 +125,32 @@ const RADIAL_BAR_WATCHED_PROP_NAMES = [
|
|
|
125
125
|
* </script>
|
|
126
126
|
* ```
|
|
127
127
|
*
|
|
128
|
-
* @property {number[]} data - Array of values for each ring (set via JavaScript)
|
|
129
|
-
* @property {string[]} colors - Custom ring colors (set via JavaScript) with fallback to theme palette
|
|
130
|
-
* @property {number} max - Maximum value for calculating remaining empty area, default: 100
|
|
131
|
-
* @property {number} circumference - Arc span in degrees: 360 for full circle, 270 for 3/4 circle, default: 270
|
|
132
|
-
* @property {boolean} showDebugOverlay - Show debug overlay for development, default: false
|
|
133
|
-
* @property {number} fixedHeight - Fixed height of the chart in pixels (mandatory, determines chart circumference), default: 320. The chart's circumference is always based on this fixed height to match other radial instruments.
|
|
134
|
-
* @property {number} minRingThickness - Minimum thickness of each ring in pixels, excluding borders, default: 16
|
|
135
|
-
* @property {boolean} legend - Whether to display the legend below the chart, default: false
|
|
136
128
|
* @beta
|
|
137
129
|
*/
|
|
138
130
|
@customElement('obc-radial-bar-chart')
|
|
139
131
|
export class ObcRadialBarChart extends LitElement {
|
|
132
|
+
/** Array of values for each ring (set via JavaScript) */
|
|
140
133
|
@property({type: Array, attribute: false}) data: number[] = [];
|
|
134
|
+
/** Custom ring colors (set via JavaScript) with fallback to theme palette */
|
|
141
135
|
@property({type: Array, attribute: false}) colors: string[] = [];
|
|
142
136
|
@property({type: String})
|
|
143
137
|
priority: Priority = Priority.regular;
|
|
138
|
+
/** Maximum value for calculating remaining empty area, default: 100 */
|
|
144
139
|
@property({type: Number})
|
|
145
140
|
max = 100;
|
|
141
|
+
/** Arc span in degrees: 360 for full circle, 270 for 3/4 circle, default: 270 */
|
|
146
142
|
@property({type: Number})
|
|
147
143
|
circumference = 270;
|
|
144
|
+
/** Whether to display the legend below the chart, default: false */
|
|
148
145
|
@property({type: Boolean, reflect: true})
|
|
149
146
|
legend = false;
|
|
147
|
+
/** Show debug overlay for development, default: false */
|
|
150
148
|
@property({type: Boolean, reflect: true})
|
|
151
149
|
showDebugOverlay = false;
|
|
150
|
+
/** Fixed height of the chart in pixels (determines chart circumference), default: 320. The chart's circumference is always based on this fixed height to match other radial instruments. */
|
|
152
151
|
@property({type: Number, reflect: true})
|
|
153
152
|
fixedHeight = 320;
|
|
153
|
+
/** Minimum thickness of each ring in pixels, excluding borders, default: 16 */
|
|
154
154
|
@property({
|
|
155
155
|
type: Number,
|
|
156
156
|
})
|
|
@@ -311,32 +311,15 @@ const LINE_GRAPH_RECREATE_PROP_NAMES = [
|
|
|
311
311
|
* </script>
|
|
312
312
|
* ```
|
|
313
313
|
*
|
|
314
|
-
*
|
|
315
|
-
*
|
|
316
|
-
*
|
|
317
|
-
*
|
|
318
|
-
*
|
|
319
|
-
*
|
|
320
|
-
*
|
|
321
|
-
* @property {Array<{id?: string; position?: 'left'|'right'; min?: number; max?: number; grid?: boolean}>} yAxes - Multiple y-axis definitions for complex charts. Each axis can specify `id` (referenced by dataset `yAxisID`), `position`, `min`/`max` range, and `grid` visibility.
|
|
322
|
-
* @property {boolean} showGrid - Show vertical grid lines (x-axis). When combined with `showGridX` and `showGridY`, controls full grid visibility. Default: `false`.
|
|
323
|
-
* @property {boolean} showGridX - Show vertical grid lines (x-axis). Set to `false` to hide only vertical lines while keeping horizontal lines. Default: `false`.
|
|
324
|
-
* @property {boolean} showGridY - Show horizontal grid lines (y-axis). Set to `false` to hide only horizontal lines while keeping vertical lines. Default: `false`.
|
|
325
|
-
* @property {boolean} showTickMarks - Show axis tick marks and labels. Automatically hidden below 192px height threshold. Default: `false`.
|
|
326
|
-
* @property {boolean} showPoints - Show point markers on data points. Default: `false`.
|
|
327
|
-
* @property {boolean} fill - Enable area fill under/between lines. Use with `fillMode` to control fill style. Default: `false`.
|
|
328
|
-
* @property {'semitransparent'|'solid'|'threshold'} fillMode - Fill rendering mode. `'semitransparent'` uses 50% alpha, `'solid'` uses opaque fill, `'threshold'` (single-series only) fills above/below midpoint with red/blue gradient. Default: `'semitransparent'`.
|
|
329
|
-
* @property {'smooth'|'straight'|'stepped'} lineMode - Line drawing style. `'smooth'` applies bezier curve tension, `'straight'` draws straight lines, `'stepped'` creates step-like lines. Default: `'smooth'`.
|
|
330
|
-
* @property {boolean} stacked - Stack multi-series datasets vertically on y-axis. Ignored for single-series and threshold fill mode. Default: `false`.
|
|
331
|
-
* @property {string} unit - Unit label displayed in tooltips (e.g., 'kW', 'kg', '%'). Default: empty string.
|
|
332
|
-
* @property {number} xTicksLimit - Maximum number of x-axis ticks/grid lines. Useful for matching external axes. Optional.
|
|
333
|
-
* @property {number} xStepSize - Force specific interval between x-axis ticks (e.g., 1, 2, 5). Useful for matching external axes. Optional.
|
|
334
|
-
* @property {number} yTicksLimit - Maximum number of y-axis ticks/grid lines. Useful for matching external axes. Optional.
|
|
335
|
-
* @property {number} yStepSize - Force specific interval between y-axis ticks (e.g., 2, 5, 10). Useful for matching external axes. Optional.
|
|
336
|
-
* @property {boolean} legend - Show HTML legend below chart with series labels and colors. Default: `false`.
|
|
337
|
-
* @property {number} height - Chart height in pixels. Determines chart size with 1.5:1 aspect ratio (width = height × 1.5). Default: `320`.
|
|
338
|
-
* @property {boolean} showDebugOverlay - Development mode: show visual debug overlay with dimension guides. Shows blue border around canvas (axis area) and red border around chart grid (data area). Default: `false`.
|
|
314
|
+
* TODO(maintainer): `fill` is documented here as a class-level `@property` tag
|
|
315
|
+
* only because tooling (the manifest, lit-analyzer, story controls) still
|
|
316
|
+
* depends on it, yet no `@property`-decorated field backs it and no render path
|
|
317
|
+
* reads `this.fill` (fill is decided by the abstract `shouldApplyFill()`). Decide
|
|
318
|
+
* whether `fill` is a real public property (add a decorated field) or obsolete
|
|
319
|
+
* (remove this tag and the `.fill=` usages in the stories/wrappers). Kept as-is
|
|
320
|
+
* here to avoid changing the public API surface in a docs-only cleanup.
|
|
339
321
|
*
|
|
322
|
+
* @property {boolean} fill - Enable area fill under/between lines. Use with `fillMode` to control fill style. Default: `false`.
|
|
340
323
|
* @ignore This is an abstract base class. Use concrete implementations like ObcLineGraph or ObcAreaGraph instead.
|
|
341
324
|
* @experimental
|
|
342
325
|
*/
|
|
@@ -30,30 +30,6 @@ import {classMap} from 'lit/directives/class-map.js';
|
|
|
30
30
|
* @slot clock - Custom clock content, rendered when `showClock` is true
|
|
31
31
|
* @slot integration-buttons - Regular vessel integration buttons
|
|
32
32
|
* @slot hug-buttons - Compact vessel integration buttons; slotted integration buttons are forced to hug type
|
|
33
|
-
* @property {IntegrationBarType} type - Integration bar mode for fleet/vessel presentation
|
|
34
|
-
* @property {boolean} hideHomeButton - Hides the home button when true
|
|
35
|
-
* @property {boolean} showClock - Toggles rendering of the clock slot
|
|
36
|
-
* @property {boolean} showLinkButton - Toggles visibility of link button
|
|
37
|
-
* @property {boolean} linkButtonActivated - Activated state of link button
|
|
38
|
-
* @property {boolean} showUserButton - Toggles visibility of user button
|
|
39
|
-
* @property {boolean} userButtonActivated - Activated state of user button
|
|
40
|
-
* @property {boolean} showDimmingButton - Toggles visibility of dimming button
|
|
41
|
-
* @property {boolean} dimmingButtonActivated - Activated state of dimming button
|
|
42
|
-
* @property {boolean} showSystemButton - Toggles visibility of system button
|
|
43
|
-
* @property {boolean} systemButtonActivated - Activated state of system button
|
|
44
|
-
* @property {boolean} showScreenButton - Toggles visibility of screen button
|
|
45
|
-
* @property {boolean} screenButtonActivated - Activated state of screen button
|
|
46
|
-
* @property {boolean} showNotificationButton - Toggles visibility of notification button
|
|
47
|
-
* @property {boolean} notificationButtonActivated - Activated state of notification button
|
|
48
|
-
* @property {boolean} showAlertButton - Toggles visibility of alert button
|
|
49
|
-
* @property {boolean} alertButtonActivated - Activated state of alert button
|
|
50
|
-
* @property {boolean} showFleetButton - Toggles visibility of fleet button
|
|
51
|
-
* @property {boolean} fleetButtonSelected - Selected state of fleet button
|
|
52
|
-
* @property {boolean} fleetButtonActivated - Active state of fleet button while selection is pending
|
|
53
|
-
* @property {string} fleetButtonLabel - Label for the fleet button
|
|
54
|
-
* @property {string} selectedVesselValue - Selected vessel value
|
|
55
|
-
* @property {string} activeVesselValue - Active vessel value while selection is pending
|
|
56
|
-
* @property {{value: string; label: string}[]} vesselSelectorOptions - Available vessel options
|
|
57
33
|
* @fires fleet-button-click - Fired when the fleet button is clicked
|
|
58
34
|
* @fires link-button-clicked - Fired when the link button is clicked
|
|
59
35
|
* @fires alert-button-clicked - Fired when the alert button is clicked
|
|
@@ -66,25 +42,45 @@ import {classMap} from 'lit/directives/class-map.js';
|
|
|
66
42
|
*/
|
|
67
43
|
@customElement('obc-integration-bar')
|
|
68
44
|
export class ObcIntegrationBar extends LitElement {
|
|
45
|
+
/** Hides the home button when true */
|
|
69
46
|
@property({type: Boolean}) hideHomeButton = false;
|
|
47
|
+
/** Toggles rendering of the clock slot */
|
|
70
48
|
@property({type: Boolean}) showClock = false;
|
|
49
|
+
/** Toggles visibility of link button */
|
|
71
50
|
@property({type: Boolean}) showLinkButton = false;
|
|
51
|
+
/** Activated state of link button */
|
|
72
52
|
@property({type: Boolean}) linkButtonActivated = false;
|
|
53
|
+
/** Toggles visibility of user button */
|
|
73
54
|
@property({type: Boolean}) showUserButton = false;
|
|
55
|
+
/** Activated state of user button */
|
|
74
56
|
@property({type: Boolean}) userButtonActivated = false;
|
|
57
|
+
/** Toggles visibility of dimming button */
|
|
75
58
|
@property({type: Boolean}) showDimmingButton = false;
|
|
59
|
+
/** Activated state of dimming button */
|
|
76
60
|
@property({type: Boolean}) dimmingButtonActivated = false;
|
|
61
|
+
/** Toggles visibility of system button */
|
|
77
62
|
@property({type: Boolean}) showSystemButton = false;
|
|
63
|
+
/** Activated state of system button */
|
|
78
64
|
@property({type: Boolean}) systemButtonActivated = false;
|
|
65
|
+
/** Toggles visibility of screen button */
|
|
79
66
|
@property({type: Boolean}) showScreenButton = false;
|
|
67
|
+
/** Activated state of screen button */
|
|
80
68
|
@property({type: Boolean}) screenButtonActivated = false;
|
|
69
|
+
/** Toggles visibility of notification button */
|
|
81
70
|
@property({type: Boolean}) showNotificationButton = false;
|
|
71
|
+
/** Activated state of notification button */
|
|
82
72
|
@property({type: Boolean}) notificationButtonActivated = false;
|
|
73
|
+
/** Toggles visibility of alert button */
|
|
83
74
|
@property({type: Boolean}) showAlertButton = false;
|
|
75
|
+
/** Activated state of alert button */
|
|
84
76
|
@property({type: Boolean}) alertButtonActivated = false;
|
|
77
|
+
/** Toggles visibility of fleet button */
|
|
85
78
|
@property({type: Boolean}) showFleetButton = false;
|
|
79
|
+
/** Selected state of fleet button */
|
|
86
80
|
@property({type: Boolean}) fleetButtonSelected = false;
|
|
81
|
+
/** Active state of fleet button while selection is pending */
|
|
87
82
|
@property({type: Boolean}) fleetButtonActivated = false;
|
|
83
|
+
/** Label for the fleet button */
|
|
88
84
|
@property({type: String}) fleetButtonLabel = 'Fleet';
|
|
89
85
|
|
|
90
86
|
@state() private buttonsOnBar = false;
|
|
@@ -35,36 +35,38 @@ export enum IntegrationButtonType {
|
|
|
35
35
|
*
|
|
36
36
|
* @fires click - Fired when the internal button is activated.
|
|
37
37
|
*
|
|
38
|
-
* @property {boolean} hasTrailingIcon - Shows the `trailing-icon` slot.
|
|
39
|
-
* @property {boolean} hasTrailingIcon2 - Shows the `trailing-icon2` slot.
|
|
40
|
-
* @property {boolean} hasLeadingIcon - Shows the `leading-icon` slot.
|
|
41
|
-
* @property {boolean} hasstatus - Shows the `status` slot.
|
|
42
|
-
* @property {IntegrationButtonReadout[]} readouts - List of readout items shown in the rich type.
|
|
43
|
-
* @property {boolean} disabled - Disables the internal button.
|
|
44
|
-
* @property {boolean} activated - Applies active state styling while a selection is pending.
|
|
45
|
-
* @property {boolean} selected - Applies selected state styling.
|
|
46
|
-
* @property {boolean} dividerBottom - Shows a bottom divider under the button.
|
|
47
|
-
* @property {boolean} dividerRight - Shows a right divider to separate from adjacent buttons.
|
|
48
|
-
* @property {IntegrationButtonVariant} variant - Visual variant (`normal` or `flat`).
|
|
49
|
-
* @property {IntegrationButtonType} type - Layout type (`hug`, `regular`, or `rich`).
|
|
50
38
|
* @experimental
|
|
51
39
|
*/
|
|
52
40
|
@customElement('obc-integration-button')
|
|
53
41
|
export class ObcIntegrationButton extends LitElement {
|
|
42
|
+
/** Shows the `trailing-icon` slot. */
|
|
54
43
|
@property({type: Boolean}) hasTrailingIcon = false;
|
|
55
|
-
/**
|
|
44
|
+
/**
|
|
45
|
+
* Shows the `trailing-icon2` slot.
|
|
46
|
+
* @availableWhen hasTrailingIcon==true
|
|
47
|
+
*/
|
|
56
48
|
@property({type: Boolean}) hasTrailingIcon2 = false;
|
|
49
|
+
/** Shows the `leading-icon` slot. */
|
|
57
50
|
@property({type: Boolean}) hasLeadingIcon = false;
|
|
51
|
+
/** Shows the `status` slot. */
|
|
58
52
|
@property({type: Boolean}) hasStatus = false;
|
|
53
|
+
/** List of readout items shown in the rich type. */
|
|
59
54
|
@property({type: Array, attribute: false})
|
|
60
55
|
readouts: IntegrationButtonReadout[] = [];
|
|
56
|
+
/** Disables the internal button. */
|
|
61
57
|
@property({type: Boolean}) disabled = false;
|
|
58
|
+
/** Applies active state styling while a selection is pending. */
|
|
62
59
|
@property({type: Boolean}) activated = false;
|
|
60
|
+
/** Applies selected state styling. */
|
|
63
61
|
@property({type: Boolean}) selected = false;
|
|
62
|
+
/** Shows a bottom divider under the button. */
|
|
64
63
|
@property({type: Boolean}) dividerBottom = false;
|
|
64
|
+
/** Shows a right divider to separate from adjacent buttons. */
|
|
65
65
|
@property({type: Boolean}) dividerRight = false;
|
|
66
|
+
/** Visual variant (`normal` or `flat`). */
|
|
66
67
|
@property({type: String}) variant: IntegrationButtonVariant =
|
|
67
68
|
IntegrationButtonVariant.normal;
|
|
69
|
+
/** Layout type (`hug`, `regular`, or `rich`). */
|
|
68
70
|
@property({type: String}) type: IntegrationButtonType =
|
|
69
71
|
IntegrationButtonType.regular;
|
|
70
72
|
|
|
@@ -59,9 +59,9 @@ export enum CompassPriorityElement {
|
|
|
59
59
|
* Supports spinning dots (`rotType="dots"`) — the dot animation is
|
|
60
60
|
* amplified by `rotDotAnimationFactor` so small physical values still
|
|
61
61
|
* read at a glance — and a banana-shaped arc bar (`rotType="bar"`)
|
|
62
|
-
* showing the
|
|
63
|
-
*
|
|
64
|
-
* circle via `rotPosition`.
|
|
62
|
+
* showing the rate of turn as an arc anchored at the current heading.
|
|
63
|
+
* Bar extent is driven by the physical value only (gain is not applied).
|
|
64
|
+
* Position on the outer scale ring or inner circle via `rotPosition`.
|
|
65
65
|
* - **Environmental overlays**: Wind speed/direction and current
|
|
66
66
|
* speed/direction indicators on the watch face.
|
|
67
67
|
* - **Vessel image**: Configurable vessel silhouette centered on the
|
|
@@ -94,25 +94,6 @@ export enum CompassPriorityElement {
|
|
|
94
94
|
* ></obc-compass>
|
|
95
95
|
* ```
|
|
96
96
|
*
|
|
97
|
-
* @property {number} heading - The current heading of the vessel in degrees.
|
|
98
|
-
* @property {number} courseOverGround - The current course over ground in degrees.
|
|
99
|
-
* @property {number | null} headingSetpoint - The set point for the heading in degrees.
|
|
100
|
-
* @property {boolean} atHeadingSetpoint - Indicates if the vessel is at the heading set point.
|
|
101
|
-
* @property {boolean} autoAtHeadingSetpoint - Enables automatic at heading set point calculation.
|
|
102
|
-
* @property {number} autoAtHeadingSetpointDeadband - The deadband for the heading set point in degrees.
|
|
103
|
-
* @property {boolean} touching - Indicates if the compass is being touched.
|
|
104
|
-
* @property {Array<AngleAdvice>} headingAdvices - An array of angle advices for the compass.
|
|
105
|
-
* @property {number | null} currentWindSpeedKnots - The wind speed in knots.
|
|
106
|
-
* @property {number | null} windFromDirection - The direction the wind is coming from in degrees.
|
|
107
|
-
* @property {number | null} currentSpeed - The current speed, number of arrows.
|
|
108
|
-
* @property {number | null} currentFromDirection - The direction the current is coming from in degrees.
|
|
109
|
-
* @property {VesselImage} vesselImage - The image of the vessel.
|
|
110
|
-
* @property {number|undefined} rateOfTurnDegreesPerMinute - Measured rate of turn in degrees per minute (the AIS / ITU-R M.1371 convention). Sign controls direction (positive = starboard / clockwise). Drives both the bar extent and the dot animation.
|
|
111
|
-
* @property {number} rotDotAnimationFactor - Visual amplification for the dot animation only. Default `18` (≈1 rpm at 20°/min).
|
|
112
|
-
* @property {number} rotationsPerMinute - **Deprecated.** Use `rateOfTurnDegreesPerMinute` instead. Kept as a backward-compatible fallback when `rateOfTurnDegreesPerMinute` is `undefined`.
|
|
113
|
-
* @property {RotType} rotType - ROT display mode: `'dots'` (spinning dots, default) or `'bar'` (arc bar from HDG to COG).
|
|
114
|
-
* @property {RotPosition} rotPosition - ROT track position: `'innerCircle'` (default) or `'scale'` (on the outer ring).
|
|
115
|
-
* @property {Priority} priority - Color priority: `Priority.enhanced` uses the blue/enhanced color palette, `Priority.regular` (default) uses the standard palette.
|
|
116
97
|
*
|
|
117
98
|
* @ignition-base-height: 512px
|
|
118
99
|
* @ignition-base-width: 512px
|
|
@@ -120,36 +101,65 @@ export enum CompassPriorityElement {
|
|
|
120
101
|
*/
|
|
121
102
|
@customElement('obc-compass')
|
|
122
103
|
export class ObcCompass extends LitElement {
|
|
104
|
+
/** The current heading of the vessel in degrees. */
|
|
123
105
|
@property({type: Number}) heading = 0;
|
|
106
|
+
/** The current course over ground in degrees. */
|
|
124
107
|
@property({type: Number}) courseOverGround = 0;
|
|
125
108
|
|
|
109
|
+
/** The set point for the heading in degrees. */
|
|
126
110
|
@property({type: Number}) headingSetpoint: number | null = null;
|
|
127
111
|
/** @availableWhen headingSetpoint!=null */
|
|
128
112
|
@property({type: Number}) newHeadingSetpoint: number | undefined;
|
|
129
|
-
/**
|
|
113
|
+
/**
|
|
114
|
+
* Indicates if the vessel is at the heading set point.
|
|
115
|
+
* @availableWhen headingSetpoint!=null && autoAtHeadingSetpoint==false
|
|
116
|
+
*/
|
|
130
117
|
@property({type: Boolean}) atHeadingSetpoint: boolean = false;
|
|
131
118
|
/** @availableWhen headingSetpoint!=null */
|
|
132
119
|
@property({type: Number}) headingSetpointAtZeroDeadband: number = 0.5;
|
|
133
120
|
/** @availableWhen headingSetpoint!=null */
|
|
134
121
|
@property({type: Boolean}) headingSetpointOverride: boolean = false;
|
|
135
|
-
/**
|
|
122
|
+
/**
|
|
123
|
+
* Enables automatic at heading set point calculation.
|
|
124
|
+
* @availableWhen headingSetpoint!=null
|
|
125
|
+
*/
|
|
136
126
|
@property({type: Boolean, attribute: false}) autoAtHeadingSetpoint: boolean =
|
|
137
127
|
true;
|
|
138
|
-
/**
|
|
128
|
+
/**
|
|
129
|
+
* The deadband for the heading set point in degrees.
|
|
130
|
+
* @availableWhen headingSetpoint!=null && autoAtHeadingSetpoint==true
|
|
131
|
+
*/
|
|
139
132
|
@property({type: Number}) autoAtHeadingSetpointDeadband: number = 2;
|
|
140
133
|
/** @availableWhen headingSetpoint!=null */
|
|
141
134
|
@property({type: Boolean}) animateSetpoint: boolean = false;
|
|
142
|
-
/**
|
|
135
|
+
/**
|
|
136
|
+
* Indicates if the compass is being touched.
|
|
137
|
+
* @availableWhen headingSetpoint!=null
|
|
138
|
+
*/
|
|
143
139
|
@property({type: Boolean}) touching: boolean = false;
|
|
140
|
+
/** An array of angle advices for the compass. */
|
|
144
141
|
@property({type: Array, attribute: false}) headingAdvices: AngleAdvice[] = [];
|
|
145
|
-
/**
|
|
142
|
+
/**
|
|
143
|
+
* The wind speed in knots.
|
|
144
|
+
* @availableWhen windFromDirection!=null
|
|
145
|
+
*/
|
|
146
146
|
@property({type: Number}) currentWindSpeedKnots: number | null = null;
|
|
147
|
-
/**
|
|
147
|
+
/**
|
|
148
|
+
* The direction the wind is coming from in degrees.
|
|
149
|
+
* @availableWhen currentWindSpeedKnots!=null
|
|
150
|
+
*/
|
|
148
151
|
@property({type: Number}) windFromDirection: number | null = null;
|
|
149
|
-
/**
|
|
152
|
+
/**
|
|
153
|
+
* The current speed, number of arrows.
|
|
154
|
+
* @availableWhen currentFromDirection!=null
|
|
155
|
+
*/
|
|
150
156
|
@property({type: Number}) currentSpeed: number | null = null;
|
|
151
|
-
/**
|
|
157
|
+
/**
|
|
158
|
+
* The direction the current is coming from in degrees.
|
|
159
|
+
* @availableWhen currentSpeed!=null
|
|
160
|
+
*/
|
|
152
161
|
@property({type: Number}) currentFromDirection: number | null = null;
|
|
162
|
+
/** The image of the vessel. */
|
|
153
163
|
@property({type: String}) vesselImage: VesselImage = VesselImage.genericTop;
|
|
154
164
|
/**
|
|
155
165
|
* Measured rate of turn in degrees per minute (positive = starboard).
|
|
@@ -166,12 +176,18 @@ export class ObcCompass extends LitElement {
|
|
|
166
176
|
*/
|
|
167
177
|
@property({type: Number}) rotDotAnimationFactor: number = 18;
|
|
168
178
|
/**
|
|
179
|
+
* Legacy rate-of-turn input, in rotations per minute. When
|
|
180
|
+
* `rateOfTurnDegreesPerMinute` is `undefined`, this value is used
|
|
181
|
+
* (unconverted) as the fallback ROT, driving both the spinning dot ring
|
|
182
|
+
* and the bar extent.
|
|
169
183
|
* @deprecated Use `rateOfTurnDegreesPerMinute` (and optionally
|
|
170
184
|
* `rotDotAnimationFactor`) instead. Takes effect only when
|
|
171
185
|
* `rateOfTurnDegreesPerMinute` is `undefined`.
|
|
172
186
|
*/
|
|
173
187
|
@property({type: Number}) rotationsPerMinute: number = 1;
|
|
188
|
+
/** ROT display mode: `'dots'` (spinning dots, default) or `'bar'` (a rate-of-turn arc anchored at the current heading, its length proportional to the rate of turn). */
|
|
174
189
|
@property({type: String}) rotType: RotType = RotType.dots;
|
|
190
|
+
/** ROT track position: `'innerCircle'` (default) or `'scale'` (on the outer ring). */
|
|
175
191
|
@property({type: String}) rotPosition: RotPosition = RotPosition.innerCircle;
|
|
176
192
|
/**
|
|
177
193
|
* Bar-extent reference value in **degrees per minute**. The bar fills the
|
|
@@ -192,6 +208,7 @@ export class ObcCompass extends LitElement {
|
|
|
192
208
|
@property({type: String}) direction: CompassDirection =
|
|
193
209
|
CompassDirection.NorthUp;
|
|
194
210
|
@property({type: String}) state: InstrumentState = InstrumentState.active;
|
|
211
|
+
/** Color priority: `Priority.enhanced` uses the blue/enhanced color palette, `Priority.regular` (default) uses the standard palette. */
|
|
195
212
|
@property({type: String}) priority: Priority = Priority.regular;
|
|
196
213
|
/** @availableWhen priority==enhanced */
|
|
197
214
|
@property({type: Array, attribute: false})
|
|
@@ -58,14 +58,6 @@ export interface Label {
|
|
|
58
58
|
* - **Color priority**: Per-element priority for HDG, COG, and ROT via
|
|
59
59
|
* `priorityElements`.
|
|
60
60
|
*
|
|
61
|
-
* @property {number} heading - Current heading in degrees.
|
|
62
|
-
* @property {number} courseOverGround - Current COG in degrees.
|
|
63
|
-
* @property {RotType|undefined} rotType - ROT display mode: `'dots'`, `'bar'`, or `undefined` (hidden).
|
|
64
|
-
* @property {number|undefined} rateOfTurnDegreesPerMinute - Measured rate of turn in degrees per minute (positive = starboard). Drives the bar extent and (after `× rotDotAnimationFactor`) the dot animation.
|
|
65
|
-
* @property {number} rotDotAnimationFactor - Visual amplification for the dot animation only. Default `18` (≈1 rpm at 20°/min).
|
|
66
|
-
* @property {number} rotationsPerMinute - **Deprecated.** Use `rateOfTurnDegreesPerMinute` instead.
|
|
67
|
-
* @property {number} rotMaxValue - Bar-extent reference value in **degrees per minute**. Default `60` per ES-TRIN 2025/1 Art. 3.02.
|
|
68
|
-
* @property {number} rotArcExtent - Degrees of bar arc per max-value ROT (default 60).
|
|
69
61
|
*
|
|
70
62
|
* @ignition-base-height: 170px
|
|
71
63
|
* @ignition-base-width: 512px
|
|
@@ -74,7 +66,9 @@ export interface Label {
|
|
|
74
66
|
@customElement('obc-compass-flat')
|
|
75
67
|
export class ObcCompassFlat extends LitElement {
|
|
76
68
|
@property({type: Boolean}) FOVIndicator: boolean = false;
|
|
69
|
+
/** Current heading in degrees. */
|
|
77
70
|
@property({type: Number}) heading = 0;
|
|
71
|
+
/** Current COG in degrees. */
|
|
78
72
|
@property({type: Number}) courseOverGround = 0;
|
|
79
73
|
@property({type: Number}) tickInterval = 5;
|
|
80
74
|
@property({type: Number}) FOV = 45;
|
|
@@ -85,6 +79,7 @@ export class ObcCompassFlat extends LitElement {
|
|
|
85
79
|
priorityElements: CompassFlatPriorityElement[] = [
|
|
86
80
|
CompassFlatPriorityElement.hdg,
|
|
87
81
|
];
|
|
82
|
+
/** ROT display mode: `'dots'`, `'bar'`, or `undefined` (hidden). */
|
|
88
83
|
@property({type: String}) rotType: RotType | undefined;
|
|
89
84
|
/**
|
|
90
85
|
* Measured rate of turn in degrees per minute (positive = starboard).
|
|
@@ -98,6 +93,7 @@ export class ObcCompassFlat extends LitElement {
|
|
|
98
93
|
*/
|
|
99
94
|
@property({type: Number}) rotDotAnimationFactor: number = 18;
|
|
100
95
|
/**
|
|
96
|
+
* **Deprecated.** Use `rateOfTurnDegreesPerMinute` instead.
|
|
101
97
|
* @deprecated Use `rateOfTurnDegreesPerMinute` instead.
|
|
102
98
|
* @availableWhen rotType!=undefined
|
|
103
99
|
*/
|
|
@@ -108,7 +104,10 @@ export class ObcCompassFlat extends LitElement {
|
|
|
108
104
|
* @availableWhen rotType!=undefined
|
|
109
105
|
*/
|
|
110
106
|
@property({type: Number}) rotMaxValue: number = 60;
|
|
111
|
-
/**
|
|
107
|
+
/**
|
|
108
|
+
* Degrees of bar arc per max-value ROT (default 60).
|
|
109
|
+
* @availableWhen rotType!=undefined
|
|
110
|
+
*/
|
|
112
111
|
@property({type: Number}) rotArcExtent: number = 60;
|
|
113
112
|
/** @availableWhen rotType!=undefined */
|
|
114
113
|
@property({type: Boolean}) rotPortStarboard: boolean = false;
|
|
@@ -115,11 +115,6 @@ export {FillMode, ScaleType};
|
|
|
115
115
|
* ></obc-gauge-trend>
|
|
116
116
|
* ```
|
|
117
117
|
*
|
|
118
|
-
* @property {number} width - Chart width in pixels (defines aspect ratio)
|
|
119
|
-
* @property {number} height - Chart height in pixels (defines aspect ratio)
|
|
120
|
-
* @property {boolean} enhanced - Use enhanced color palette for chart and scales
|
|
121
|
-
* @property {InstrumentState} state - Instrument state (automatically applied to scale)
|
|
122
|
-
* @property {boolean} chartFill - Enable chart area fill (default: false for line-only)
|
|
123
118
|
*
|
|
124
119
|
* Setpoint properties are inherited from {@link SetpointMixin}.
|
|
125
120
|
* These are forwarded to the internal `obc-bar-vertical` scale:
|
|
@@ -8,11 +8,11 @@ import {customElement} from '../../decorator.js';
|
|
|
8
8
|
* @element obc-graph-mini
|
|
9
9
|
* @description A mini graph component
|
|
10
10
|
*
|
|
11
|
-
* @property {Array} data - The data to display in the graph, first array is the x values, second array is the y values
|
|
12
11
|
* @beta
|
|
13
12
|
*/
|
|
14
13
|
@customElement('obc-graph-mini')
|
|
15
14
|
export class ObcGraphMini extends LitElement {
|
|
15
|
+
/** The data to display in the graph, first array is the x values, second array is the y values */
|
|
16
16
|
@property({type: Array})
|
|
17
17
|
data: [number[], number[]] = [[], []];
|
|
18
18
|
|
|
@@ -26,11 +26,11 @@ export interface ObcIndicatorGraphLayout {
|
|
|
26
26
|
* @element obc-indicator-graph
|
|
27
27
|
* @description A mini graph component
|
|
28
28
|
*
|
|
29
|
-
* @property {Array} data - The data to display in the graph, first array is the x values, second array is the y values
|
|
30
29
|
* @beta
|
|
31
30
|
*/
|
|
32
31
|
@customElement('obc-indicator-graph')
|
|
33
32
|
export class ObcIndicatorGraph extends LitElement {
|
|
33
|
+
/** The data to display in the graph, first array is the x values, second array is the y values */
|
|
34
34
|
@property({type: Array})
|
|
35
35
|
data: [number[], number[]] = [[], []];
|
|
36
36
|
|
|
@@ -161,22 +161,6 @@ const RADIAL_SETPOINT_INWARD_ADJUST = 4;
|
|
|
161
161
|
* `_setpointCssAngle` tracks the accumulated CSS angle to avoid long-way-around
|
|
162
162
|
* transitions across the 0°/360° boundary.
|
|
163
163
|
*
|
|
164
|
-
* @property {InstrumentState} state - Instrument state (active, loading, off)
|
|
165
|
-
* @property {Priority} priority - Color priority (enhanced = blue palette, regular = gray palette)
|
|
166
|
-
* @property {number|undefined} angleSetpoint - Setpoint angle in degrees (0° = 12 o'clock)
|
|
167
|
-
* @property {number|undefined} newAngleSetpoint - New setpoint being adjusted (focus mode)
|
|
168
|
-
* @property {boolean} atAngleSetpoint - Whether value matches setpoint (within deadband)
|
|
169
|
-
* @property {number} angleSetpointAtZeroDeadband - Deadband for zero detection (default 0.5°)
|
|
170
|
-
* @property {boolean} setpointOverride - Override to derive setpoint color from priority regardless of state
|
|
171
|
-
* @property {RotType|undefined} rotType - ROT visualization type: `'dots'` (spinning dots) or `'bar'` (arc bar with clipped dots). Undefined hides the ROT layer.
|
|
172
|
-
* @property {RotPosition} rotPosition - Track on which ROT elements are placed: `'scale'` (on the outer ring) or `'innerCircle'` (default, inside the inner ring)
|
|
173
|
-
* @property {number} rotStartAngle - Start angle of the ROT bar arc in degrees (0° = 12 o'clock, clockwise). Only used when `rotType` is `'bar'`.
|
|
174
|
-
* @property {number} rotEndAngle - End angle of the ROT bar arc in degrees. The bar is hidden when the difference from `rotStartAngle` is less than 0.1°.
|
|
175
|
-
* @property {Priority|undefined} rotPriority - Override priority for ROT color derivation. When set, ROT colors use this instead of the main `priority`. Useful when the ROT element has independent priority (e.g. compass per-element priority).
|
|
176
|
-
* @property {number|undefined} rateOfTurnDegreesPerMinute - Measured rate of turn in degrees per minute (the maritime/AIS convention, see ES-TRIN 2025/1 Art. 3.02 and ITU-R M.1371). Sign controls direction (positive = starboard/clockwise). When defined, this drives both the dot animation (multiplied by `rotDotAnimationFactor`) and the port/starboard direction sign.
|
|
177
|
-
* @property {number} rotDotAnimationFactor - Visual amplification factor applied only to the spinning-dot animation (not to bar extent). Default `18` keeps the legacy visual feel (≈1 rpm at 20°/min).
|
|
178
|
-
* @property {number} rotationsPerMinute - **Deprecated.** Spin speed of the ROT dot ring in rotations per minute. Sign controls direction (positive = clockwise). Use `rateOfTurnDegreesPerMinute` instead.
|
|
179
|
-
* @property {ZoomToFitArcFrame|undefined} arcFrame - Pre-computed zoom-to-fit arc frame. When set, the watch skips its own `computeZoomToFitArcFrame()` call and uses these values directly. Consumer instruments (e.g. rudder, instrument-radial) should compute the frame once and pass it here to avoid redundant computation. If you pass `arcFrame`, you own keeping it in sync with `areas` / `watchCircleType` — obc-watch will NOT recompute it, so a stale frame renders stale geometry.
|
|
180
164
|
* @experimental
|
|
181
165
|
*/
|
|
182
166
|
@customElement('obc-watch')
|
|
@@ -184,16 +168,23 @@ export class ObcWatch extends LitElement {
|
|
|
184
168
|
private _setpointId = `watch-setpoint-${Math.random().toString(36).slice(2, 9)}`;
|
|
185
169
|
private _newSetpointId = `watch-new-setpoint-${Math.random().toString(36).slice(2, 9)}`;
|
|
186
170
|
|
|
171
|
+
/** Instrument state (active, loading, off) */
|
|
187
172
|
@property({type: String}) state: InstrumentState = InstrumentState.active;
|
|
173
|
+
/** Color priority (enhanced = blue palette, regular = gray palette) */
|
|
188
174
|
@property({type: String}) priority: Priority = Priority.regular;
|
|
189
175
|
@property({type: String}) watchCircleType: WatchCircleType =
|
|
190
176
|
WatchCircleType.single;
|
|
191
177
|
@property({type: Boolean}) northArrow: boolean = false;
|
|
192
178
|
@property({type: Boolean}) northArrowInside: boolean | undefined;
|
|
179
|
+
/** Setpoint angle in degrees (0° = 12 o'clock) */
|
|
193
180
|
@property({type: Number}) angleSetpoint: number | undefined;
|
|
181
|
+
/** New setpoint being adjusted (focus mode) */
|
|
194
182
|
@property({type: Number}) newAngleSetpoint: number | undefined;
|
|
183
|
+
/** Whether value matches setpoint (within deadband) */
|
|
195
184
|
@property({type: Boolean}) atAngleSetpoint: boolean = false;
|
|
185
|
+
/** Deadband for zero detection (default 0.5°) */
|
|
196
186
|
@property({type: Number}) angleSetpointAtZeroDeadband: number = 0.5;
|
|
187
|
+
/** Override to derive setpoint color from priority regardless of state */
|
|
197
188
|
@property({type: Boolean}) setpointOverride: boolean = false;
|
|
198
189
|
@property({type: Boolean}) touching: boolean = false;
|
|
199
190
|
|
|
@@ -250,17 +241,25 @@ export class ObcWatch extends LitElement {
|
|
|
250
241
|
@property({type: Number}) scaleWindIcon: number = 1;
|
|
251
242
|
@property({type: Number}) rotation: number | undefined;
|
|
252
243
|
@property({type: Boolean}) zoomToFitArc: boolean = false;
|
|
244
|
+
/** Pre-computed zoom-to-fit arc frame. When set, the watch skips its own `computeZoomToFitArcFrame()` call and uses these values directly. Consumer instruments (e.g. rudder, instrument-radial) should compute the frame once and pass it here to avoid redundant computation. If you pass `arcFrame`, you own keeping it in sync with `areas` / `watchCircleType` — obc-watch will NOT recompute it, so a stale frame renders stale geometry. */
|
|
253
245
|
@property({attribute: false}) arcFrame: ZoomToFitArcFrame | undefined;
|
|
254
246
|
@property({type: Number}) tickFadeAngle: number = 0;
|
|
255
247
|
|
|
248
|
+
/** ROT visualization type: `'dots'` (spinning dots) or `'bar'` (arc bar with clipped dots). Undefined hides the ROT layer. */
|
|
256
249
|
@property({type: String}) rotType: RotType | undefined;
|
|
250
|
+
/** Track on which ROT elements are placed: `'scale'` (on the outer ring) or `'innerCircle'` (default, inside the inner ring) */
|
|
257
251
|
@property({type: String}) rotPosition: RotPosition = RotPosition.innerCircle;
|
|
252
|
+
/** Start angle of the ROT bar arc in degrees (0° = 12 o'clock, clockwise). Only used when `rotType` is `'bar'`. */
|
|
258
253
|
@property({type: Number}) rotStartAngle: number = 0;
|
|
254
|
+
/** End angle of the ROT bar arc in degrees. The bar is hidden when the difference from `rotStartAngle` is less than 0.1°. */
|
|
259
255
|
@property({type: Number}) rotEndAngle: number = 0;
|
|
256
|
+
/** Override priority for ROT color derivation. When set, ROT colors use this instead of the main `priority`. Useful when the ROT element has independent priority (e.g. compass per-element priority). */
|
|
260
257
|
@property({type: String}) rotPriority: Priority | undefined;
|
|
261
258
|
@property({type: Boolean}) rotPortStarboard: boolean = false;
|
|
262
259
|
@property({type: Number}) rotAtZeroDeadband: number = ROT_ZERO_DEADBAND_DEG;
|
|
260
|
+
/** Measured rate of turn in degrees per minute (the maritime/AIS convention, see ES-TRIN 2025/1 Art. 3.02 and ITU-R M.1371). Sign controls direction (positive = starboard/clockwise). When defined, this drives both the dot animation (multiplied by `rotDotAnimationFactor`) and the port/starboard direction sign. */
|
|
263
261
|
@property({type: Number}) rateOfTurnDegreesPerMinute: number | undefined;
|
|
262
|
+
/** Visual amplification factor applied only to the spinning-dot animation (not to bar extent). Default `18` keeps the legacy visual feel (≈1 rpm at 20°/min). */
|
|
264
263
|
@property({type: Number}) rotDotAnimationFactor: number = 18;
|
|
265
264
|
/**
|
|
266
265
|
* @deprecated Use `rateOfTurnDegreesPerMinute` (and optionally `rotDotAnimationFactor`) instead.
|
|
@@ -271,6 +270,7 @@ export class ObcWatch extends LitElement {
|
|
|
271
270
|
set rotationsPerMinute(value: number) {
|
|
272
271
|
this._legacyRotationsPerMinute = value;
|
|
273
272
|
}
|
|
273
|
+
/** Legacy spin speed of the ROT dot ring, in rotations per minute (sign controls direction; positive = clockwise). */
|
|
274
274
|
get rotationsPerMinute() {
|
|
275
275
|
return this._legacyRotationsPerMinute;
|
|
276
276
|
}
|