@oicl/openbridge-webcomponents-full-bundle 2.0.0-next.94 → 2.0.0-next.96

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 (115) hide show
  1. package/bundle/openbridge-webcomponents.bundle.js +15137 -14794
  2. package/bundle/openbridge-webcomponents.bundle.js.map +1 -1
  3. package/custom-elements.json +110 -70
  4. package/dist/alert-severity.d.ts +1 -1
  5. package/dist/alert-severity.d.ts.map +1 -1
  6. package/dist/alert-severity.js +4 -1
  7. package/dist/alert-severity.js.map +1 -1
  8. package/dist/building-blocks/chart-line/chart-line-base.d.ts +95 -33
  9. package/dist/building-blocks/chart-line/chart-line-base.d.ts.map +1 -1
  10. package/dist/building-blocks/chart-line/chart-line-base.js +88 -23
  11. package/dist/building-blocks/chart-line/chart-line-base.js.map +1 -1
  12. package/dist/charthelpers/index.d.ts +1 -0
  13. package/dist/charthelpers/index.d.ts.map +1 -1
  14. package/dist/charthelpers/index.js +4 -0
  15. package/dist/charthelpers/index.js.map +1 -1
  16. package/dist/charthelpers/x-value.d.ts +72 -0
  17. package/dist/charthelpers/x-value.d.ts.map +1 -0
  18. package/dist/charthelpers/x-value.js +60 -0
  19. package/dist/charthelpers/x-value.js.map +1 -0
  20. package/dist/components/alert-button/alert-button.js +1 -1
  21. package/dist/components/alert-button/alert-button.js.map +1 -1
  22. package/dist/components/alert-icon/alert-icon.d.ts +30 -7
  23. package/dist/components/alert-icon/alert-icon.d.ts.map +1 -1
  24. package/dist/components/alert-icon/alert-icon.js +234 -67
  25. package/dist/components/alert-icon/alert-icon.js.map +1 -1
  26. package/dist/components/alert-icon/icons/icon-critical-acknowledged.d.ts +2 -0
  27. package/dist/components/alert-icon/icons/icon-critical-acknowledged.d.ts.map +1 -0
  28. package/dist/components/alert-icon/icons/icon-critical-acknowledged.js +17 -0
  29. package/dist/components/alert-icon/icons/icon-critical-acknowledged.js.map +1 -0
  30. package/dist/components/alert-icon/icons/icon-critical-rectified.d.ts +3 -0
  31. package/dist/components/alert-icon/icons/icon-critical-rectified.d.ts.map +1 -0
  32. package/dist/components/alert-icon/icons/icon-critical-rectified.js +28 -0
  33. package/dist/components/alert-icon/icons/icon-critical-rectified.js.map +1 -0
  34. package/dist/components/alert-icon/icons/icon-critical-silenced.d.ts +3 -0
  35. package/dist/components/alert-icon/icons/icon-critical-silenced.d.ts.map +1 -0
  36. package/dist/components/alert-icon/icons/{icon-warning-silenced.js → icon-critical-silenced.js} +26 -13
  37. package/dist/components/alert-icon/icons/icon-critical-silenced.js.map +1 -0
  38. package/dist/components/alert-icon/icons/icon-critical-unacknowledged.d.ts +3 -0
  39. package/dist/components/alert-icon/icons/icon-critical-unacknowledged.d.ts.map +1 -0
  40. package/dist/components/alert-icon/icons/icon-critical-unacknowledged.js +28 -0
  41. package/dist/components/alert-icon/icons/icon-critical-unacknowledged.js.map +1 -0
  42. package/dist/components/alert-icon/icons/icon-low-acknowledged.d.ts +2 -0
  43. package/dist/components/alert-icon/icons/icon-low-acknowledged.d.ts.map +1 -0
  44. package/dist/components/alert-icon/icons/icon-low-acknowledged.js +11 -0
  45. package/dist/components/alert-icon/icons/icon-low-acknowledged.js.map +1 -0
  46. package/dist/components/alert-icon/icons/icon-low-rectified.d.ts +3 -0
  47. package/dist/components/alert-icon/icons/icon-low-rectified.d.ts.map +1 -0
  48. package/dist/components/alert-icon/icons/icon-low-rectified.js +16 -0
  49. package/dist/components/alert-icon/icons/icon-low-rectified.js.map +1 -0
  50. package/dist/components/alert-icon/icons/icon-low-silenced.d.ts +3 -0
  51. package/dist/components/alert-icon/icons/icon-low-silenced.d.ts.map +1 -0
  52. package/dist/components/alert-icon/icons/icon-low-silenced.js +18 -0
  53. package/dist/components/alert-icon/icons/icon-low-silenced.js.map +1 -0
  54. package/dist/components/alert-icon/icons/icon-low-unacknowledged.d.ts +3 -0
  55. package/dist/components/alert-icon/icons/icon-low-unacknowledged.d.ts.map +1 -0
  56. package/dist/components/alert-icon/icons/icon-low-unacknowledged.js +16 -0
  57. package/dist/components/alert-icon/icons/icon-low-unacknowledged.js.map +1 -0
  58. package/dist/navigation-instruments/gauge-trend/gauge-trend.d.ts +16 -1
  59. package/dist/navigation-instruments/gauge-trend/gauge-trend.d.ts.map +1 -1
  60. package/dist/navigation-instruments/gauge-trend/gauge-trend.js +12 -0
  61. package/dist/navigation-instruments/gauge-trend/gauge-trend.js.map +1 -1
  62. package/dist/pages/alert-detail-page/alert-detail-page.d.ts.map +1 -1
  63. package/dist/pages/alert-detail-page/alert-detail-page.js +1 -2
  64. package/dist/pages/alert-detail-page/alert-detail-page.js.map +1 -1
  65. package/package.json +1 -1
  66. package/src/alert-severity.ts +8 -1
  67. package/src/bars-graphs/area-graph/area-graph.stories.ts +83 -1
  68. package/src/bars-graphs/line-graph/line-graph.stories.ts +148 -1
  69. package/src/building-blocks/chart-line/chart-line-base.stories.ts +1 -1
  70. package/src/building-blocks/chart-line/chart-line-base.ts +198 -70
  71. package/src/charthelpers/index.ts +1 -0
  72. package/src/charthelpers/x-value.spec.ts +102 -0
  73. package/src/charthelpers/x-value.ts +134 -0
  74. package/src/components/alert-button/alert-button.ts +1 -1
  75. package/src/components/alert-icon/alert-icon.stories.ts +69 -11
  76. package/src/components/alert-icon/alert-icon.ts +214 -64
  77. package/src/components/alert-icon/icons/icon-critical-acknowledged.ts +14 -0
  78. package/src/components/alert-icon/icons/icon-critical-rectified.ts +25 -0
  79. package/src/components/alert-icon/icons/{icon-warning-silenced.ts → icon-critical-silenced.ts} +23 -10
  80. package/src/components/alert-icon/icons/icon-critical-unacknowledged.ts +25 -0
  81. package/src/components/alert-icon/icons/icon-low-acknowledged.ts +8 -0
  82. package/src/components/alert-icon/icons/icon-low-rectified.ts +13 -0
  83. package/src/components/alert-icon/icons/icon-low-silenced.ts +15 -0
  84. package/src/components/alert-icon/icons/icon-low-unacknowledged.ts +13 -0
  85. package/src/navigation-instruments/gauge-trend/gauge-trend.stories.ts +42 -0
  86. package/src/navigation-instruments/gauge-trend/gauge-trend.ts +38 -1
  87. package/src/pages/alert-detail-page/alert-detail-page.ts +0 -2
  88. package/dist/components/alert-icon/icons/icon-alarm-rectified.d.ts +0 -3
  89. package/dist/components/alert-icon/icons/icon-alarm-rectified.d.ts.map +0 -1
  90. package/dist/components/alert-icon/icons/icon-alarm-rectified.js +0 -15
  91. package/dist/components/alert-icon/icons/icon-alarm-rectified.js.map +0 -1
  92. package/dist/components/alert-icon/icons/icon-alarm-silenced.d.ts +0 -3
  93. package/dist/components/alert-icon/icons/icon-alarm-silenced.d.ts.map +0 -1
  94. package/dist/components/alert-icon/icons/icon-alarm-silenced.js +0 -17
  95. package/dist/components/alert-icon/icons/icon-alarm-silenced.js.map +0 -1
  96. package/dist/components/alert-icon/icons/icon-alarm-unack.d.ts +0 -3
  97. package/dist/components/alert-icon/icons/icon-alarm-unack.d.ts.map +0 -1
  98. package/dist/components/alert-icon/icons/icon-alarm-unack.js +0 -15
  99. package/dist/components/alert-icon/icons/icon-alarm-unack.js.map +0 -1
  100. package/dist/components/alert-icon/icons/icon-warning-rectified.d.ts +0 -3
  101. package/dist/components/alert-icon/icons/icon-warning-rectified.d.ts.map +0 -1
  102. package/dist/components/alert-icon/icons/icon-warning-rectified.js +0 -15
  103. package/dist/components/alert-icon/icons/icon-warning-rectified.js.map +0 -1
  104. package/dist/components/alert-icon/icons/icon-warning-silenced.d.ts +0 -3
  105. package/dist/components/alert-icon/icons/icon-warning-silenced.d.ts.map +0 -1
  106. package/dist/components/alert-icon/icons/icon-warning-silenced.js.map +0 -1
  107. package/dist/components/alert-icon/icons/icon-warning-unack.d.ts +0 -3
  108. package/dist/components/alert-icon/icons/icon-warning-unack.d.ts.map +0 -1
  109. package/dist/components/alert-icon/icons/icon-warning-unack.js +0 -15
  110. package/dist/components/alert-icon/icons/icon-warning-unack.js.map +0 -1
  111. package/src/components/alert-icon/icons/icon-alarm-rectified.ts +0 -12
  112. package/src/components/alert-icon/icons/icon-alarm-silenced.ts +0 -14
  113. package/src/components/alert-icon/icons/icon-alarm-unack.ts +0 -12
  114. package/src/components/alert-icon/icons/icon-warning-rectified.ts +0 -12
  115. package/src/components/alert-icon/icons/icon-warning-unack.ts +0 -12
@@ -112,7 +112,10 @@ const meta: Meta = {
112
112
  labels: {control: 'object'},
113
113
 
114
114
  // Axis and layout
115
- xAxisType: {control: {type: 'radio'}, options: ['category', 'time']},
115
+ xAxisType: {
116
+ control: {type: 'radio'},
117
+ options: ['category', 'time', 'number'],
118
+ },
116
119
  yAxisPosition: {control: {type: 'radio'}, options: ['left', 'right']},
117
120
  showGrid: {control: 'boolean'},
118
121
  showGridX: {control: 'boolean'},
@@ -177,6 +180,85 @@ export const Semitransparent: Story = {
177
180
  name: 'Semitransparent Area Graph (default)',
178
181
  };
179
182
 
183
+ const UNEVEN_TIME_DATA = [
184
+ {x: '2026-07-06T10:00:00Z', value: 10},
185
+ {x: '2026-07-06T10:02:00Z', value: 14},
186
+ {x: '2026-07-06T10:03:00Z', value: 12},
187
+ {x: '2026-07-06T10:10:00Z', value: 18},
188
+ {x: '2026-07-06T10:30:00Z', value: 8},
189
+ {x: '2026-07-06T11:00:00Z', value: 15},
190
+ ];
191
+
192
+ export const UnevenTimeIntervals: Story = {
193
+ name: 'Uneven Time Intervals (Time Axis)',
194
+ play: async ({canvasElement}) => {
195
+ await document.fonts.ready;
196
+ const chart = canvasElement.querySelector('obc-area-graph') as
197
+ | (HTMLElement & {chart?: {update(): void}})
198
+ | null;
199
+ chart?.chart?.update();
200
+ },
201
+ args: {
202
+ xAxisType: 'time',
203
+ timeDisplay: 'minutes',
204
+ },
205
+ render: (_args) => html`
206
+ <obc-area-graph
207
+ .data=${UNEVEN_TIME_DATA}
208
+ .lineMode=${_args.lineMode}
209
+ .xAxisType=${_args.xAxisType}
210
+ .timeDisplay=${_args.timeDisplay}
211
+ .showGrid=${_args.showGrid}
212
+ .showGridX=${_args.showGridX}
213
+ .showGridY=${_args.showGridY}
214
+ .showTickMarks=${_args.showTickMarks}
215
+ .showPoints=${_args.showPoints}
216
+ .fillMode=${_args.fillMode}
217
+ .priority=${_args.priority}
218
+ .width=${_args.width}
219
+ .height=${_args.height}
220
+ ></obc-area-graph>
221
+ `,
222
+ };
223
+
224
+ const NUMBER_AXIS_DATA = [
225
+ {x: 0, value: 2},
226
+ {x: 1, value: 5},
227
+ {x: 2.5, value: 3},
228
+ {x: 7, value: 9},
229
+ {x: 10, value: 6},
230
+ ];
231
+
232
+ export const NumberAxis: Story = {
233
+ name: 'Number X-Axis',
234
+ play: async ({canvasElement}) => {
235
+ await document.fonts.ready;
236
+ const chart = canvasElement.querySelector('obc-area-graph') as
237
+ | (HTMLElement & {chart?: {update(): void}})
238
+ | null;
239
+ chart?.chart?.update();
240
+ },
241
+ args: {
242
+ xAxisType: 'number',
243
+ },
244
+ render: (_args) => html`
245
+ <obc-area-graph
246
+ .data=${NUMBER_AXIS_DATA}
247
+ .lineMode=${_args.lineMode}
248
+ .xAxisType=${_args.xAxisType}
249
+ .showGrid=${_args.showGrid}
250
+ .showGridX=${_args.showGridX}
251
+ .showGridY=${_args.showGridY}
252
+ .showTickMarks=${_args.showTickMarks}
253
+ .showPoints=${_args.showPoints}
254
+ .fillMode=${_args.fillMode}
255
+ .priority=${_args.priority}
256
+ .width=${_args.width}
257
+ .height=${_args.height}
258
+ ></obc-area-graph>
259
+ `,
260
+ };
261
+
180
262
  export const SemitransparentExternalScales: Story = {
181
263
  name: 'Semitransparent Area Graph (with external scales)',
182
264
  tags: ['skip-test'],
@@ -93,7 +93,7 @@ const meta: Meta = {
93
93
  // Axis and layout
94
94
  xAxisType: {
95
95
  control: {type: 'radio'},
96
- options: [XAxisType.category, XAxisType.time],
96
+ options: [XAxisType.category, XAxisType.time, XAxisType.number],
97
97
  },
98
98
  yAxisPosition: {
99
99
  control: {type: 'radio'},
@@ -188,6 +188,153 @@ export const SingleSeries: Story = {
188
188
  `,
189
189
  };
190
190
 
191
+ const UNEVEN_TIME_DATA = [
192
+ {x: '2026-07-06T10:00:00Z', value: 10},
193
+ {x: '2026-07-06T10:02:00Z', value: 14},
194
+ {x: '2026-07-06T10:03:00Z', value: 12},
195
+ {x: '2026-07-06T10:10:00Z', value: 18},
196
+ {x: '2026-07-06T10:30:00Z', value: 8},
197
+ {x: '2026-07-06T11:00:00Z', value: 15},
198
+ ];
199
+
200
+ export const UnevenTimeIntervals: Story = {
201
+ name: 'Uneven Time Intervals (Time Axis)',
202
+ play: async ({canvasElement}) => {
203
+ await document.fonts.ready;
204
+ const chart = canvasElement.querySelector('obc-line-graph') as
205
+ | (HTMLElement & {chart?: {update(): void}})
206
+ | null;
207
+ chart?.chart?.update();
208
+ },
209
+ args: {
210
+ xAxisType: XAxisType.time,
211
+ timeDisplay: TimeDisplay.minutes,
212
+ },
213
+ render: (_args) => html`
214
+ <obc-line-graph
215
+ .data=${UNEVEN_TIME_DATA}
216
+ .lineMode=${_args.lineMode}
217
+ .xAxisType=${_args.xAxisType}
218
+ .timeDisplay=${_args.timeDisplay}
219
+ .showGrid=${_args.showGrid}
220
+ .showGridX=${_args.showGridX}
221
+ .showGridY=${_args.showGridY}
222
+ .showTickMarks=${_args.showTickMarks}
223
+ .showPoints=${_args.showPoints}
224
+ .priority=${_args.priority}
225
+ .width=${_args.width}
226
+ .height=${_args.height}
227
+ ></obc-line-graph>
228
+ `,
229
+ };
230
+
231
+ const DATE_OBJECT_TIME_DATA = [
232
+ {x: new Date('2026-07-06T10:00:00Z'), value: 10},
233
+ {x: new Date('2026-07-06T10:04:00Z'), value: 14},
234
+ {x: '2026-07-06T10:12:00Z', value: 12},
235
+ {x: Date.parse('2026-07-06T10:30:00Z'), value: 18},
236
+ ];
237
+
238
+ export const DateObjectsTimeAxis: Story = {
239
+ name: 'Date Objects (Time Axis)',
240
+ play: async ({canvasElement}) => {
241
+ await document.fonts.ready;
242
+ const chart = canvasElement.querySelector('obc-line-graph') as
243
+ | (HTMLElement & {chart?: {update(): void}})
244
+ | null;
245
+ chart?.chart?.update();
246
+ },
247
+ args: {
248
+ xAxisType: XAxisType.time,
249
+ timeDisplay: TimeDisplay.minutes,
250
+ },
251
+ render: (_args) => html`
252
+ <obc-line-graph
253
+ .data=${DATE_OBJECT_TIME_DATA}
254
+ .lineMode=${_args.lineMode}
255
+ .xAxisType=${_args.xAxisType}
256
+ .timeDisplay=${_args.timeDisplay}
257
+ .showGrid=${_args.showGrid}
258
+ .showGridX=${_args.showGridX}
259
+ .showGridY=${_args.showGridY}
260
+ .showTickMarks=${_args.showTickMarks}
261
+ .showPoints=${_args.showPoints}
262
+ .priority=${_args.priority}
263
+ .width=${_args.width}
264
+ .height=${_args.height}
265
+ ></obc-line-graph>
266
+ `,
267
+ };
268
+
269
+ const NUMBER_AXIS_DATA = [
270
+ {x: 0, value: 2},
271
+ {x: 1, value: 5},
272
+ {x: 2.5, value: 3},
273
+ {x: 7, value: 9},
274
+ {x: 10, value: 6},
275
+ ];
276
+
277
+ export const NumberAxis: Story = {
278
+ name: 'Number X-Axis',
279
+ play: async ({canvasElement}) => {
280
+ await document.fonts.ready;
281
+ const chart = canvasElement.querySelector('obc-line-graph') as
282
+ | (HTMLElement & {chart?: {update(): void}})
283
+ | null;
284
+ chart?.chart?.update();
285
+ },
286
+ args: {
287
+ xAxisType: XAxisType.number,
288
+ },
289
+ render: (_args) => html`
290
+ <obc-line-graph
291
+ .data=${NUMBER_AXIS_DATA}
292
+ .lineMode=${_args.lineMode}
293
+ .xAxisType=${_args.xAxisType}
294
+ .showGrid=${_args.showGrid}
295
+ .showGridX=${_args.showGridX}
296
+ .showGridY=${_args.showGridY}
297
+ .showTickMarks=${_args.showTickMarks}
298
+ .showPoints=${_args.showPoints}
299
+ .priority=${_args.priority}
300
+ .width=${_args.width}
301
+ .height=${_args.height}
302
+ ></obc-line-graph>
303
+ `,
304
+ };
305
+
306
+ export const TemporalInput: Story = {
307
+ name: 'Temporal API Input',
308
+ tags: ['skip-test'],
309
+ render: () => {
310
+ const T = (
311
+ globalThis as {
312
+ Temporal?: {Instant: {from(s: string): {epochMilliseconds: number}}};
313
+ }
314
+ ).Temporal;
315
+ if (!T) {
316
+ return html`<p>
317
+ Temporal API is not available in this browser — pass ISO strings, Date
318
+ objects or epoch milliseconds instead.
319
+ </p>`;
320
+ }
321
+ const chart = document.createElement('obc-line-graph');
322
+ chart.xAxisType = XAxisType.time;
323
+ chart.timeDisplay = TimeDisplay.minutes;
324
+ chart.showGrid = true;
325
+ chart.showGridX = true;
326
+ chart.showGridY = true;
327
+ chart.showTickMarks = true;
328
+ chart.data = [
329
+ {x: T.Instant.from('2026-07-06T10:00:00Z'), value: 10},
330
+ {x: T.Instant.from('2026-07-06T10:04:00Z'), value: 14},
331
+ {x: T.Instant.from('2026-07-06T10:05:00Z'), value: 12},
332
+ {x: T.Instant.from('2026-07-06T10:20:00Z'), value: 18},
333
+ ];
334
+ return chart;
335
+ },
336
+ };
337
+
191
338
  export const SingleSeriesExternalScales: Story = {
192
339
  name: 'Single-Series Line Graph (with external scales)',
193
340
  tags: ['skip-test'],
@@ -210,7 +210,7 @@ Abstract base class for line and area chart components built on Chart.js.
210
210
  // Axis and layout
211
211
  xAxisType: {
212
212
  control: {type: 'radio'},
213
- options: [XAxisType.category, XAxisType.time],
213
+ options: [XAxisType.category, XAxisType.time, XAxisType.number],
214
214
  },
215
215
  yAxisPosition: {
216
216
  control: {type: 'radio'},