@oicl/openbridge-webcomponents-full-bundle 2.0.0-next.158 → 2.0.0-next.159

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.
Files changed (60) hide show
  1. package/bundle/openbridge-webcomponents.bundle.js +0 -9
  2. package/bundle/openbridge-webcomponents.bundle.js.map +1 -1
  3. package/custom-elements.json +15 -33
  4. package/dist/automation/corner-line/corner-line.d.ts +2 -1
  5. package/dist/automation/corner-line/corner-line.d.ts.map +1 -1
  6. package/dist/automation/corner-line/corner-line.js.map +1 -1
  7. package/dist/automation/direction-line/direction-line.d.ts +2 -1
  8. package/dist/automation/direction-line/direction-line.d.ts.map +1 -1
  9. package/dist/automation/direction-line/direction-line.js.map +1 -1
  10. package/dist/automation/end-point-line/end-point-line.d.ts +2 -1
  11. package/dist/automation/end-point-line/end-point-line.d.ts.map +1 -1
  12. package/dist/automation/end-point-line/end-point-line.js.map +1 -1
  13. package/dist/automation/horizontal-line/horizontal-line.d.ts +2 -1
  14. package/dist/automation/horizontal-line/horizontal-line.d.ts.map +1 -1
  15. package/dist/automation/horizontal-line/horizontal-line.js.map +1 -1
  16. package/dist/automation/line-cross/line-cross.d.ts +2 -1
  17. package/dist/automation/line-cross/line-cross.d.ts.map +1 -1
  18. package/dist/automation/line-cross/line-cross.js.map +1 -1
  19. package/dist/automation/line-overlap/line-overlap.d.ts +2 -1
  20. package/dist/automation/line-overlap/line-overlap.d.ts.map +1 -1
  21. package/dist/automation/line-overlap/line-overlap.js.map +1 -1
  22. package/dist/automation/three-way-line/three-way-line.d.ts +2 -1
  23. package/dist/automation/three-way-line/three-way-line.d.ts.map +1 -1
  24. package/dist/automation/three-way-line/three-way-line.js.map +1 -1
  25. package/dist/automation/vertical-line/vertical-line.d.ts +2 -1
  26. package/dist/automation/vertical-line/vertical-line.d.ts.map +1 -1
  27. package/dist/automation/vertical-line/vertical-line.js.map +1 -1
  28. package/dist/components/command-menu/command-menu.d.ts.map +1 -1
  29. package/dist/components/command-menu/command-menu.js +0 -1
  30. package/dist/components/command-menu/command-menu.js.map +1 -1
  31. package/dist/components/notification-badge-button/notification-badge-button.d.ts +4 -1
  32. package/dist/components/notification-badge-button/notification-badge-button.d.ts.map +1 -1
  33. package/dist/components/notification-badge-button/notification-badge-button.js.map +1 -1
  34. package/dist/components/start-stop-switch/start-stop-switch.d.ts +0 -9
  35. package/dist/components/start-stop-switch/start-stop-switch.d.ts.map +1 -1
  36. package/dist/components/start-stop-switch/start-stop-switch.js +0 -8
  37. package/dist/components/start-stop-switch/start-stop-switch.js.map +1 -1
  38. package/dist/navigation-instruments/azimuth-thruster-labeled/azimuth-thruster-labeled.d.ts +2 -1
  39. package/dist/navigation-instruments/azimuth-thruster-labeled/azimuth-thruster-labeled.d.ts.map +1 -1
  40. package/dist/navigation-instruments/azimuth-thruster-labeled/azimuth-thruster-labeled.js.map +1 -1
  41. package/dist/navigation-instruments/instrument-field/instrument-field.d.ts +3 -1
  42. package/dist/navigation-instruments/instrument-field/instrument-field.d.ts.map +1 -1
  43. package/dist/navigation-instruments/instrument-field/instrument-field.js.map +1 -1
  44. package/package.json +1 -1
  45. package/script/eslint-property-docs-rule.mjs +18 -6
  46. package/script/eslint-property-docs-rule.test.ts +80 -59
  47. package/src/automation/corner-line/corner-line.ts +2 -1
  48. package/src/automation/direction-line/direction-line.ts +2 -1
  49. package/src/automation/end-point-line/end-point-line.ts +2 -1
  50. package/src/automation/horizontal-line/horizontal-line.ts +2 -1
  51. package/src/automation/line-cross/line-cross.ts +2 -1
  52. package/src/automation/line-overlap/line-overlap.ts +2 -1
  53. package/src/automation/three-way-line/three-way-line.ts +2 -1
  54. package/src/automation/vertical-line/vertical-line.ts +2 -1
  55. package/src/components/command-menu/command-menu.ts +0 -1
  56. package/src/components/notification-badge-button/notification-badge-button.ts +4 -1
  57. package/src/components/start-stop-switch/start-stop-switch.stories.ts +1 -8
  58. package/src/components/start-stop-switch/start-stop-switch.ts +0 -9
  59. package/src/navigation-instruments/azimuth-thruster-labeled/azimuth-thruster-labeled.ts +2 -1
  60. package/src/navigation-instruments/instrument-field/instrument-field.ts +3 -1
@@ -72,12 +72,66 @@ describe('property-docs-in-class-jsdoc — reports', () => {
72
72
  {
73
73
  code: cls(
74
74
  ' * Thing.\n * @stable',
75
- ' /**\n * The value.\n * @deprecated use other\n */\n @property({type: Number}) value = 0;'
75
+ ' /**\n * The value.\n * @see other\n */\n @property({type: Number}) value = 0;'
76
76
  ),
77
- errors: [{messageId: 'manual'}],
77
+ errors: [
78
+ {
79
+ messageId: 'manual',
80
+ data: {name: 'value', reason: 'contains @see'},
81
+ },
82
+ ],
78
83
  output: null,
79
84
  },
85
+ {
86
+ // cem reads the default from a literal initializer, so a tag that
87
+ // disagrees with it is a contradiction to report, not data to keep.
88
+ code: cls(
89
+ ' * Thing.\n * @stable',
90
+ ' /**\n * Size.\n * @default 385\n */\n @property({type: Number}) size = 384;'
91
+ ),
92
+ errors: [
93
+ {
94
+ messageId: 'manual',
95
+ data: {
96
+ name: 'size',
97
+ reason: '@default differs from the initializer',
98
+ },
99
+ },
100
+ ],
101
+ output: null,
102
+ },
103
+ ],
104
+ });
105
+ });
106
+
107
+ it('does not report an inline doc the manifest can only read inline', () => {
108
+ tester.run('property-docs', propertyDocsRule, {
109
+ valid: [
110
+ // cem lifts a member @deprecated into the manifest; the class JSDoc
111
+ // has no tag for it, so the doc stays where it is.
112
+ cls(
113
+ ' * Thing.\n * @stable',
114
+ ' /**\n * The value.\n * @deprecated use other\n */\n @property({type: Number}) value = 0;'
115
+ ),
116
+ // Wherever @deprecated sits among the tags.
117
+ cls(
118
+ ' * Thing.\n * @stable',
119
+ ' /**\n * The value.\n * @see other\n * @deprecated use other\n */\n @property({type: Number}) value = 0;'
120
+ ),
121
+ // A class without a JSDoc does not turn it back into a report.
122
+ "import {LitElement} from 'lit';\n@customElement('obc-x')\nexport class ObcX extends LitElement {\n /** @deprecated use other */\n @property({type: Number}) value = 0;\n}\n",
123
+ // cem reads `default` only from a literal initializer, so the tag is
124
+ // the manifest's only source here.
125
+ cls(
126
+ ' * Thing.\n * @stable',
127
+ ' /**\n * Size.\n * @default Size.normal\n */\n @property({type: String}) size = Size.normal;'
128
+ ),
129
+ cls(
130
+ ' * Thing.\n * @stable',
131
+ " /**\n * Size.\n * @default 'normal'\n */\n @property({type: String}) size = Size.normal;"
132
+ ),
80
133
  ],
134
+ invalid: [],
81
135
  });
82
136
  });
83
137
 
@@ -152,33 +206,6 @@ describe('property-docs-in-class-jsdoc — reports', () => {
152
206
  });
153
207
  });
154
208
 
155
- it('treats a mismatched @default as manual, not hoistable', () => {
156
- tester.run('property-docs', propertyDocsRule, {
157
- valid: [],
158
- invalid: [
159
- {
160
- // The doc's @default text ('normal') doesn't match the field's
161
- // actual initializer (Size.normal) — don't trust the doc's word
162
- // for what the manifest should show; leave it for a human.
163
- code: cls(
164
- ' * Thing.\n * @stable',
165
- " /**\n * Size.\n * @default 'normal'\n */\n @property({type: String}) size = Size.normal;"
166
- ),
167
- errors: [
168
- {
169
- messageId: 'manual',
170
- data: {
171
- name: 'size',
172
- reason: '@default differs from the initializer',
173
- },
174
- },
175
- ],
176
- output: null,
177
- },
178
- ],
179
- });
180
- });
181
-
182
209
  it('treats a class JSDoc containing @typedef as unusable for hoisting', () => {
183
210
  tester.run('property-docs', propertyDocsRule, {
184
211
  valid: [],
@@ -202,35 +229,6 @@ describe('property-docs-in-class-jsdoc — reports', () => {
202
229
  });
203
230
  });
204
231
 
205
- it('treats a matching @default on a non-literal initializer as manual', () => {
206
- tester.run('property-docs', propertyDocsRule, {
207
- valid: [],
208
- invalid: [
209
- {
210
- // The tag text matches the initializer verbatim, so it's not a
211
- // *wrong* @default — but cem only reads `default` from a literal
212
- // declaration, so dropping this tag would lose it from the
213
- // manifest entirely (unlike `@default 384` over `= 384`, where
214
- // cem reads the literal `384` itself once the tag is gone).
215
- code: cls(
216
- ' * Thing.\n * @stable',
217
- ' /**\n * Size.\n * @default Size.normal\n */\n @property({type: String}) size = Size.normal;'
218
- ),
219
- errors: [
220
- {
221
- messageId: 'manual',
222
- data: {
223
- name: 'size',
224
- reason: '@default on a non-literal initializer',
225
- },
226
- },
227
- ],
228
- output: null,
229
- },
230
- ],
231
- });
232
- });
233
-
234
232
  it('treats a description containing {@link} as manual, not hoistable', () => {
235
233
  tester.run('property-docs', propertyDocsRule, {
236
234
  valid: [],
@@ -326,9 +324,25 @@ describe('classifyFieldDoc', () => {
326
324
  expect(classifyFieldDoc(['Modes:', '- `a`: one', '- `b`: two']).ok).toBe(
327
325
  false
328
326
  );
329
- expect(classifyFieldDoc(['Old.', '@deprecated use x']).ok).toBe(false);
327
+ expect(classifyFieldDoc(['Old.', '@see x'])).toEqual({
328
+ ok: false,
329
+ reason: 'contains @see',
330
+ });
330
331
  expect(classifyFieldDoc(['Para one.', '', 'Para two.']).ok).toBe(false);
331
332
  });
333
+ it('marks a doc the manifest can only read inline as one to keep', () => {
334
+ expect(classifyFieldDoc(['Old.', '@deprecated use x'])).toEqual({
335
+ ok: false,
336
+ reason: 'contains @deprecated',
337
+ keep: true,
338
+ });
339
+ // @deprecated wins over an earlier foreign tag.
340
+ expect(classifyFieldDoc(['Old.', '@see x', '@deprecated use x'])).toEqual({
341
+ ok: false,
342
+ reason: 'contains @deprecated',
343
+ keep: true,
344
+ });
345
+ });
332
346
  it('splits a same-line @availableWhen or @default off the description', () => {
333
347
  expect(classifyFieldDoc(['Desc. @availableWhen off==true'])).toEqual({
334
348
  ok: true,
@@ -347,6 +361,12 @@ describe('classifyFieldDoc', () => {
347
361
  ).toEqual({
348
362
  ok: false,
349
363
  reason: '@default differs from the initializer',
364
+ keep: true,
365
+ });
366
+ // A literal initializer is what cem reads, so the mismatch is reported.
367
+ expect(classifyFieldDoc(['Desc.', '@default 385'], '384', true)).toEqual({
368
+ ok: false,
369
+ reason: '@default differs from the initializer',
350
370
  });
351
371
  expect(classifyFieldDoc(['Desc.', '@default 384'], '384', true)).toEqual({
352
372
  ok: true,
@@ -363,6 +383,7 @@ describe('classifyFieldDoc', () => {
363
383
  ).toEqual({
364
384
  ok: false,
365
385
  reason: '@default on a non-literal initializer',
386
+ keep: true,
366
387
  });
367
388
  expect(classifyFieldDoc(['Desc.', '@default 384'], '384', true)).toEqual({
368
389
  ok: true,
@@ -11,7 +11,8 @@ export enum CornerLineDirection {
11
11
  }
12
12
 
13
13
  /**
14
- * @deprecated
14
+ * @deprecated The line components are deprecated and will be removed in future releases.
15
+ * Please use the `@oicl/connector-diagram` package instead.
15
16
  */
16
17
  @customElement('obc-corner-line')
17
18
  export class ObcCornerLine extends LitElement {
@@ -4,7 +4,8 @@ import {LineMedium, LineType, lineColor, lineWidth} from '../index.js';
4
4
  import {customElement} from '../../decorator.js';
5
5
 
6
6
  /**
7
- * @deprecated
7
+ * @deprecated The line components are deprecated and will be removed in future releases.
8
+ * Please use the `@oicl/connector-diagram` package instead.
8
9
  */
9
10
  @customElement('obc-direction-line')
10
11
  export class ObcDirectionLine extends LitElement {
@@ -10,7 +10,8 @@ export enum EndPointDirection {
10
10
  }
11
11
 
12
12
  /**
13
- * @deprecated
13
+ * @deprecated The line components are deprecated and will be removed in future releases.
14
+ * Please use the `@oicl/connector-diagram` package instead.
14
15
  */
15
16
  @customElement('obc-end-point-line')
16
17
  export class ObcEndPointLine extends LitElement {
@@ -4,7 +4,8 @@ import {LineMedium, lineColor, LineType, lineWidth} from '../index.js';
4
4
  import {customElement} from '../../decorator.js';
5
5
 
6
6
  /**
7
- * @deprecated
7
+ * @deprecated The line components are deprecated and will be removed in future releases.
8
+ * Please use the `@oicl/connector-diagram` package instead.
8
9
  */
9
10
  @customElement('obc-horizontal-line')
10
11
  export class ObcHorizontalLine extends LitElement {
@@ -4,7 +4,8 @@ import {LineMedium, LineType, lineColor, lineWidth} from '../index.js';
4
4
  import {customElement} from '../../decorator.js';
5
5
 
6
6
  /**
7
- * @deprecated
7
+ * @deprecated The line components are deprecated and will be removed in future releases.
8
+ * Please use the `@oicl/connector-diagram` package instead.
8
9
  */
9
10
  @customElement('obc-line-cross')
10
11
  export class ObcLineCross extends LitElement {
@@ -4,7 +4,8 @@ import {LineMedium, LineType, lineColor, lineWidth} from '../index.js';
4
4
  import {customElement} from '../../decorator.js';
5
5
 
6
6
  /**
7
- * @deprecated
7
+ * @deprecated The line components are deprecated and will be removed in future releases.
8
+ * Please use the `@oicl/connector-diagram` package instead.
8
9
  */
9
10
  @customElement('obc-line-overlap')
10
11
  export class ObcLineOverlap extends LitElement {
@@ -11,7 +11,8 @@ export enum ThreeWayLineDirection {
11
11
  }
12
12
 
13
13
  /**
14
- * @deprecated
14
+ * @deprecated The line components are deprecated and will be removed in future releases.
15
+ * Please use the `@oicl/connector-diagram` package instead.
15
16
  */
16
17
  @customElement('obc-three-way-line')
17
18
  export class ObcThreeWayLine extends LitElement {
@@ -7,7 +7,8 @@ import {customElement} from '../../decorator.js';
7
7
  * Vertical line component
8
8
  *
9
9
  * The vertical line is 24px * length + 1px. +1 px to make sure that connecting lines are overlapping, to hide the gap between them.
10
- * @deprecated
10
+ * @deprecated The line components are deprecated and will be removed in future releases.
11
+ * Please use the `@oicl/connector-diagram` package instead.
11
12
  */
12
13
  @customElement('obc-vertical-line')
13
14
  export class ObcVerticalLine extends LitElement {
@@ -141,7 +141,6 @@ export class ObcCommandMenu extends LitElement {
141
141
  <obc-start-stop-switch
142
142
  @change=${this.onChange}
143
143
  .checked=${this.inCommand}
144
- showCheckedStateIcon
145
144
  .size=${'large'}
146
145
  >
147
146
  <div slot="to-checked-action-label">
@@ -64,7 +64,10 @@ import {customElement} from '../../decorator.js';
64
64
  * Useful for visually separating the button from others or indicating a secondary action.
65
65
  * @slot - Main content slot for icon or text label.
66
66
  * @fires click - Fired when the button is clicked (if not disabled).
67
- * @deprecated
67
+ * @deprecated The notification-badge-button component is deprecated and will be removed in future releases.
68
+ * Use `obc-icon-button` instead; `openLeft`, `openRight` and `indent` have no
69
+ * equivalent, and its default slot takes the icon while text goes in the `label`
70
+ * slot behind `hasLabel`.
68
71
  */
69
72
  @customElement('obc-notification-badge-button')
70
73
  export class ObcNotificationBadgeButton extends LitElement {
@@ -16,8 +16,6 @@ const meta: Meta<ObcStartStopSwitch> = {
16
16
  tags: ['6.0'],
17
17
  component: 'obc-start-stop-switch',
18
18
  args: {
19
- showUncheckedStateIcon: false,
20
- showCheckedStateIcon: false,
21
19
  checked: false,
22
20
  variant: 'normal',
23
21
  size: 'regular',
@@ -61,8 +59,6 @@ const meta: Meta<ObcStartStopSwitch> = {
61
59
  render: (args) => {
62
60
  return html`<obc-start-stop-switch
63
61
  .checked=${args.checked}
64
- .showUncheckedStateIcon=${args.showUncheckedStateIcon}
65
- .showCheckedStateIcon=${args.showCheckedStateIcon}
66
62
  .variant=${args.variant}
67
63
  .size=${args.size}
68
64
  .disabled=${args.disabled}
@@ -321,10 +317,7 @@ export const CmdExample: Story = {
321
317
  checked: true,
322
318
  },
323
319
  render: (args) => {
324
- return html`<obc-start-stop-switch
325
- .checked=${args.checked}
326
- showCheckedStateIcon
327
- >
320
+ return html`<obc-start-stop-switch .checked=${args.checked}>
328
321
  <div slot="checked-state-icon">
329
322
  <obi-command-in></obi-command-in>
330
323
  </div>
@@ -124,10 +124,6 @@ export class ObcStartStopSwitch extends LitElement {
124
124
  * - `running`: Green appearance indicating motor/process is running
125
125
  * - `loading`: Light blue appearance indicating a pending/loading state
126
126
  *
127
- * If `true`, the content of the `checked-state-icon` slot will be displayed when checked.
128
- */
129
- @property({type: Boolean}) showUncheckedStateIcon = false;
130
- /**
131
127
  * This only affects the visual style, not the switch position.
132
128
  *
133
129
  * Defaults to `'normal'`.
@@ -137,11 +133,6 @@ export class ObcStartStopSwitch extends LitElement {
137
133
 
138
134
  /**
139
135
  * The size of the switch.
140
- *
141
- * If `true`, the content of the `unchecked-state-icon` slot will be displayed when unchecked.
142
- */
143
- @property({type: Boolean}) showCheckedStateIcon = false;
144
- /**
145
136
  * - `regular`: Standard size with 32px track height
146
137
  * - `large`: Larger size with 48px track height
147
138
  *
@@ -33,7 +33,8 @@ export enum AzimuthThrusterLabeledSize {
33
33
  * @availableWhen autoAtThrustSetpointDeadband thrustSetpoint!=undefined && autoAtThrustSetpoint==true
34
34
  * @availableWhen thrustSetpointAtZeroDeadband thrustSetpoint!=undefined
35
35
  * @availableWhen thrustSetpointOverride thrustSetpoint!=undefined
36
- * @deprecated
36
+ * @deprecated The azimuth-thruster-labeled component is deprecated and will be removed in future releases.
37
+ * Please make a combined component by using <obc-azimuth-thruster> in combination with <obc-readout> instead.
37
38
  */
38
39
  @customElement('obc-azimuth-thruster-labeled')
39
40
  export class ObcAzimuthThrusterLabeled extends LitElement {
@@ -59,7 +59,9 @@ export enum InstrumentFieldSize {
59
59
  *
60
60
  * @csspart label - The container for the tag and unit.
61
61
  * @csspart tag - The tag text element.
62
- * @deprecated
62
+ * @deprecated The instrument-field component is deprecated and will be removed in future releases.
63
+ * Please use the <obc-readout> component instead. See storybook for migration details.
64
+ * https://openbridge-next-storybook.web.app/?path=/docs/instruments-instrument-field-deprecated--docs
63
65
  */
64
66
  @customElement('obc-instrument-field')
65
67
  export class ObcInstrumentField extends LitElement {