@c8y/ngx-components 1023.0.2 → 1023.4.1

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 (67) hide show
  1. package/ai/agent-chat/index.d.ts +114 -0
  2. package/ai/agent-chat/index.d.ts.map +1 -0
  3. package/ai/ai-chat/index.d.ts +145 -0
  4. package/ai/ai-chat/index.d.ts.map +1 -0
  5. package/ai/index.d.ts +203 -0
  6. package/ai/index.d.ts.map +1 -0
  7. package/context-dashboard/device/add/index.d.ts +15 -1
  8. package/context-dashboard/device/add/index.d.ts.map +1 -1
  9. package/context-dashboard/device/view/index.d.ts +14 -2
  10. package/context-dashboard/device/view/index.d.ts.map +1 -1
  11. package/context-dashboard/devicemanagement/index.d.ts +10 -0
  12. package/context-dashboard/devicemanagement/index.d.ts.map +1 -0
  13. package/context-dashboard/index.d.ts +6 -30
  14. package/context-dashboard/index.d.ts.map +1 -1
  15. package/fesm2022/c8y-ngx-components-ai-agent-chat.mjs +387 -0
  16. package/fesm2022/c8y-ngx-components-ai-agent-chat.mjs.map +1 -0
  17. package/fesm2022/c8y-ngx-components-ai-ai-chat.mjs +258 -0
  18. package/fesm2022/c8y-ngx-components-ai-ai-chat.mjs.map +1 -0
  19. package/fesm2022/c8y-ngx-components-ai.mjs +291 -0
  20. package/fesm2022/c8y-ngx-components-ai.mjs.map +1 -0
  21. package/fesm2022/c8y-ngx-components-context-dashboard-cockpit-home-dashboard.mjs +1 -1
  22. package/fesm2022/c8y-ngx-components-context-dashboard-cockpit-home-dashboard.mjs.map +1 -1
  23. package/fesm2022/c8y-ngx-components-context-dashboard-device-add.mjs +1 -1
  24. package/fesm2022/c8y-ngx-components-context-dashboard-device-view.mjs +2 -2
  25. package/fesm2022/c8y-ngx-components-context-dashboard-devicemanagement.mjs +68 -0
  26. package/fesm2022/c8y-ngx-components-context-dashboard-devicemanagement.mjs.map +1 -0
  27. package/fesm2022/c8y-ngx-components-context-dashboard.mjs +27 -45
  28. package/fesm2022/c8y-ngx-components-context-dashboard.mjs.map +1 -1
  29. package/fesm2022/c8y-ngx-components-global-context.mjs +10 -10
  30. package/fesm2022/c8y-ngx-components-global-context.mjs.map +1 -1
  31. package/fesm2022/c8y-ngx-components-register-device.mjs +4 -6
  32. package/fesm2022/c8y-ngx-components-register-device.mjs.map +1 -1
  33. package/fesm2022/c8y-ngx-components-sensor-phone-sensor-phone-modal.mjs +2 -2
  34. package/fesm2022/c8y-ngx-components-sensor-phone-sensor-phone-modal.mjs.map +1 -1
  35. package/fesm2022/c8y-ngx-components-widgets-definitions-html-widget-ai-config.mjs +574 -0
  36. package/fesm2022/c8y-ngx-components-widgets-definitions-html-widget-ai-config.mjs.map +1 -0
  37. package/fesm2022/c8y-ngx-components-widgets-exports.mjs +8 -1
  38. package/fesm2022/c8y-ngx-components-widgets-exports.mjs.map +1 -1
  39. package/fesm2022/c8y-ngx-components-widgets-implementations-html-widget.mjs +176 -41
  40. package/fesm2022/c8y-ngx-components-widgets-implementations-html-widget.mjs.map +1 -1
  41. package/fesm2022/c8y-ngx-components.mjs +96 -44
  42. package/fesm2022/c8y-ngx-components.mjs.map +1 -1
  43. package/index.d.ts +25 -4
  44. package/index.d.ts.map +1 -1
  45. package/locales/de.po +15 -15
  46. package/locales/es.po +15 -15
  47. package/locales/fr.po +14 -15
  48. package/locales/ja_JP.po +12 -12
  49. package/locales/ko.po +14 -15
  50. package/locales/locales.pot +144 -9
  51. package/locales/nl.po +15 -15
  52. package/locales/pl.po +14 -14
  53. package/locales/pt_BR.po +14 -15
  54. package/locales/zh_CN.po +14 -14
  55. package/locales/zh_TW.po +13 -13
  56. package/package.json +1 -1
  57. package/register-device/index.d.ts.map +1 -1
  58. package/widgets/cockpit-exports/index.d.ts +6 -0
  59. package/widgets/cockpit-exports/index.d.ts.map +1 -1
  60. package/widgets/definitions/html-widget-ai-config/index.d.ts +6 -0
  61. package/widgets/definitions/html-widget-ai-config/index.d.ts.map +1 -0
  62. package/widgets/device-management-exports/index.d.ts +6 -0
  63. package/widgets/device-management-exports/index.d.ts.map +1 -1
  64. package/widgets/exports/index.d.ts +8 -1
  65. package/widgets/exports/index.d.ts.map +1 -1
  66. package/widgets/implementations/html-widget/index.d.ts +72 -16
  67. package/widgets/implementations/html-widget/index.d.ts.map +1 -1
@@ -0,0 +1,574 @@
1
+ import { hookWidgetConfig } from '@c8y/ngx-components/context-dashboard';
2
+ import * as i0 from '@angular/core';
3
+ import { inject, Injectable } from '@angular/core';
4
+ import { PreviewService } from '@c8y/ngx-components';
5
+ import { gettext } from '@c8y/ngx-components/gettext';
6
+ import { AIService } from '@c8y/ngx-components/ai';
7
+ import { defaultWidgetIds } from '@c8y/ngx-components/widgets/definitions';
8
+ import { combineLatest, from, first, map } from 'rxjs';
9
+
10
+ // This file contains the definitions for the various AI agents used in the application.
11
+ const EXTRACT_TAG_NAME = 'c8y-code-extract';
12
+ const WIDGET_CODE_INSTRUCTIONS = `You are responsible for creating a Web component that is rendered on the Dashboard of the Cumulocity IoT Platform. It is written as a lit-element. The following is a very basic example:
13
+
14
+ <${EXTRACT_TAG_NAME}>
15
+ import { LitElement, html, css} from 'lit';
16
+ import { styleImports } from 'styles';
17
+
18
+ export default class DefaultWebComponent extends LitElement {
19
+ static styles = css\`
20
+
21
+ :host > div {
22
+ padding-left: var(--c8y-root-component-padding);
23
+ padding-right: var(--c8y-root-component-padding);
24
+ }
25
+ span.branded {
26
+ color: var(--c8y-brand-primary);
27
+ }
28
+ \`;
29
+
30
+ static properties = {
31
+ // The managed object this widget is assigned to. Can be null.
32
+ c8yContext: { type: Object },
33
+ };
34
+
35
+ constructor() {
36
+ super();
37
+ }
38
+
39
+ render() {
40
+ return html\`
41
+ <style>
42
+ \${styleImports}
43
+ </style>
44
+ <div>
45
+ <h1>Hello from HTML widget</h1>
46
+ <p>
47
+ You can use HTML and Javascript template literals here:
48
+ \${this.c8yContext ? this.c8yContext.name : 'No device selected'}
49
+ </p>
50
+
51
+ <a class="btn btn-primary" href="#/group">Go to groups</a>
52
+
53
+ <p>
54
+ Use the CSS editor to add CSS. You can use <span class="branded">any design-token CSS variable</span> in there.
55
+ </p>
56
+ </div>
57
+ \`;
58
+ }
59
+ }
60
+ </${EXTRACT_TAG_NAME}>
61
+
62
+ You are allowed to use the following ESM imports and libs:
63
+
64
+ javascript
65
+ import { L } from 'leaflet';
66
+ import * as echarts from 'echarts'
67
+ import { fetch } from 'fetch'
68
+
69
+
70
+ Remember to not use any leflet plugin. You are only allowed to use pure leaftlet. Always use the imported fetch function to make API calls authenticated to the Cumulocity instance.
71
+
72
+ Do not include any emoji characters or Unicode symbols in the output - replace any decorative icons with plain text descriptions.
73
+
74
+ Among the UI elements that you are allowed to build on your own using HTML and CSS, here are components that you are encouraged to use in your answer:
75
+
76
+ ## Buttons
77
+ You can apply button classes to any <a>, <input>, or <button> element to style them as buttons. When using a button inside a <form> without a defined type, it defaults to type="submit". To prevent accidental form submissions, always explicitly define the button's type as type="button".
78
+
79
+ Available button variants:
80
+ - .btn-default (standard button)
81
+ - .btn-primary (primary action)
82
+ - .btn-success (positive action)
83
+ - .btn-warning (caution action)
84
+ - .btn-danger (destructive action)
85
+ - .btn-link (text-only button)
86
+
87
+ Button sizes:
88
+ - .btn-lg (large)
89
+ - .btn-sm (small)
90
+ - .btn-xs (extra small)
91
+
92
+ \`\`\`html
93
+ <button class="btn btn-primary" type="button">Primary Button</button>
94
+ <button class="btn btn-default" type="button">Default Button</button>
95
+ <button class="btn btn-success" type="button">Success Button</button>
96
+ <button class="btn btn-warning" type="button">Warning Button</button>
97
+ <button class="btn btn-danger" type="button">Danger Button</button>
98
+ <a class="btn btn-link" href="javascript:void(0);">Link Button</a>
99
+ \`\`\`
100
+
101
+ ### Pending/Loading Buttons
102
+ Add .btn-pending to display an active process. The pointer-events are set to none, making the button unclickable.
103
+
104
+ \`\`\`html
105
+ <button type="button" aria-busy="true" class="btn btn-primary btn-pending">
106
+ Processing...
107
+ </button>
108
+ \`\`\`
109
+
110
+ ### Button Groups
111
+ Group a series of buttons together with .btn-group. Can be used for toolbars or action groups.
112
+
113
+ \`\`\`html
114
+ <div class="btn-group" role="group">
115
+ <button type="button" class="btn btn-default">Left</button>
116
+ <button type="button" class="btn btn-default">Middle</button>
117
+ <button type="button" class="btn btn-default">Right</button>
118
+ </div>
119
+ \`\`\`
120
+
121
+ ## Alerts
122
+ Wrap your message in a <div> with .alert class and a modifier class. Always add appropriate ARIA roles:
123
+
124
+ - Use role="status" for informational messages
125
+ - Use role="alert" for errors or messages
126
+ requiring immediate attention
127
+
128
+ \`\`\`html
129
+ <div class="alert alert-success" role="status">
130
+ <strong>Success!</strong> Operation completed successfully.
131
+ </div>
132
+ <div class="alert alert-warning" role="alert">
133
+ <strong>Warning!</strong> Please review your settings.
134
+ </div>
135
+ <div class="alert alert-danger" role="alert">
136
+ <strong>Error!</strong> Failed to save data.
137
+ </div>
138
+ <div class="alert alert-info" role="status">
139
+ <strong>Info:</strong> New updates available.
140
+ </div>
141
+ <div class="alert alert-system" role="alert">
142
+ <strong>System:</strong> Maintenance scheduled.
143
+ </div>
144
+ \`\`\`
145
+
146
+ ### Dismissible Alerts
147
+ For dismissible alerts, add a close button with proper accessibility:
148
+
149
+ \`\`\`html
150
+ <div class="alert alert-danger alert-dismissible" role="alert">
151
+ <button class="close" type="button" @click="\${() => this.dismissAlert()}" aria-label="Close alert">
152
+ <span aria-hidden="true">&times;</span>
153
+ </button>
154
+ <strong>Error:</strong> Invalid credentials provided.
155
+ </div>
156
+ \`\`\`
157
+
158
+ ## Badges
159
+ Badges indicate states with specific color schemes. Add .badge with a modifier class:
160
+
161
+ \`\`\`html
162
+ <span class="badge badge-default">3</span>
163
+ <span class="badge badge-success">Active</span>
164
+ <span class="badge badge-warning">Pending</span>
165
+ <span class="badge badge-danger">Critical</span>
166
+ <span class="badge badge-system">System</span>
167
+ <span class="badge badge-info">72</span>
168
+ \`\`\`
169
+ ### Icon Badges
170
+ Combine badges with icons using .c8y-icon-badge wrapper:
171
+
172
+ \`\`\`html
173
+ <span class="c8y-icon-badge" title="14 Critical alarms">
174
+ <i class="dlt-c8y-icon-exclamation-circle status critical"></i>
175
+ <span class="badge badge-danger" aria-live="assertive">14</span>
176
+ </span>
177
+ \`\`\`
178
+
179
+ ## Loading Spinner
180
+ Shows content is being loaded or processed:
181
+
182
+ \`\`\`html
183
+ <div class="spinner">
184
+ <div class="rect1"></div>
185
+ <div class="rect2"></div>
186
+ <div class="rect3"></div>
187
+ <div class="rect4"></div>
188
+ <div class="rect5"></div>
189
+ </div>
190
+ \`\`\`
191
+
192
+ ## Tag
193
+ Tags highlight small pieces of information inline. They are commonly used to display categories, filters, or selected options in a visually appealing and compact manner.
194
+
195
+ Add the .tag class to any <span> or <div> together with any of the modifier classes mentioned below to change the appearance of an inline label. Add the .font-size-inherit class to inherit the font size.
196
+
197
+ \`\`\`html
198
+ <h1>heading 1
199
+ <span class="tag tag--default">Default</span>
200
+ </h1>
201
+ <br>
202
+ <h2>heading 2
203
+ <span class="tag tag--primary">Primary</span>
204
+ </h2>
205
+ <br>
206
+ <h3>heading 3
207
+ <span class="tag tag--danger">Danger</span>
208
+ </h3>
209
+ <br>
210
+ <h4>heading 4
211
+ <span class="tag tag--success font-size-inherit">Success</span>
212
+ </h4>
213
+ <br>
214
+ <h5>heading 5
215
+ <span class="tag tag--warning">Warning</span>
216
+ </h5>
217
+ <br>
218
+ <h6>heading 6
219
+ <span class="tag tag--info">Info</span>
220
+ </h6>
221
+ \`\`\`
222
+
223
+ ## Table
224
+ Tables help you see and process great amounts of data in a tabular form. Designed for simplicity and clarity, they are an efficient way to organize and present information.
225
+
226
+
227
+ ### Default table
228
+
229
+ For basic styling—light padding and only horizontal dividers—add the base class .table to any table tag. It may seem redundant, but given the widespread use of tables for other plugins like calendars and date pickers, we have opted to isolate our custom table styles.
230
+
231
+ \`\`\`html
232
+ <div class="container-fluid">
233
+ <table class="table" role="table" aria-label="Basic data table">
234
+ <caption>Optional table caption.</caption>
235
+ <colgroup>
236
+ <col width="20px">
237
+ <col width="33%">
238
+ <col width="33%">
239
+ <col width="33%">
240
+ </colgroup>
241
+ <thead>
242
+ <tr>
243
+ <th scope="col">#</th>
244
+ <th scope="col">First Name</th>
245
+ <th scope="col">Last Name</th>
246
+ <th scope="col">Username</th>
247
+ </tr>
248
+ </thead>
249
+ <tbody>
250
+ <tr>
251
+ <th scope="row">1</th>
252
+ <td>Mark</td>
253
+ <td>Field</td>
254
+ <td>mod22755</td>
255
+ </tr>
256
+ <tr>
257
+ <th scope="row">2</th>
258
+ <td>Jacob</td>
259
+ <td>Diom</td>
260
+ <td>2weet22</td>
261
+ </tr>
262
+ <tr>
263
+ <th scope="row">3</th>
264
+ <td>Larry</td>
265
+ <td>the Clam</td>
266
+ <td>art36552</td>
267
+ </tr>
268
+ </tbody>
269
+ </table>
270
+ </div>
271
+ \`\`\`
272
+
273
+ ### Striped rows
274
+ Use .table-striped to add zebra-striping to any table row within the tbody tag.
275
+
276
+ \`\`\`html
277
+ <div class="container-fluid">
278
+ <table class="table table-striped" role="table" aria-label="Striped data table">
279
+ <thead>
280
+ <tr>
281
+ <th scope="col">#</th>
282
+ <th scope="col">First Name</th>
283
+ <th scope="col">Last Name</th>
284
+ <th scope="col">Username</th>
285
+ </tr>
286
+ </thead>
287
+ <tbody>
288
+ <tr>
289
+ <th scope="row">1</th>
290
+ <td>Mark</td>
291
+ <td>Field</td>
292
+ <td>mod22755</td>
293
+ </tr>
294
+ <tr>
295
+ <th scope="row">2</th>
296
+ <td>Jacob</td>
297
+ <td>Diom</td>
298
+ <td>2weet22</td>
299
+ </tr>
300
+ <tr>
301
+ <th scope="row">3</th>
302
+ <td>Larry</td>
303
+ <td>the Clam</td>
304
+ <td>art36552</td>
305
+ </tr>
306
+ </tbody>
307
+ </table>
308
+ </div>
309
+ \`\`\`
310
+
311
+ ### Bordered tables
312
+ Add .table-bordered for borders on all sides of the table and cells.
313
+
314
+ \`\`\`html
315
+ <div class="container-fluid">
316
+ <table class="table table-bordered" role="table" aria-label="Bordered data table">
317
+ <thead>
318
+ <tr>
319
+ <th scope="col">#</th>
320
+ <th scope="col">First Name</th>
321
+ <th scope="col">Last Name</th>
322
+ <th scope="col">Username</th>
323
+ </tr>
324
+ </thead>
325
+ <tbody>
326
+ <tr>
327
+ <th scope="row">1</th>
328
+ <td>Mark</td>
329
+ <td>Field</td>
330
+ <td>mod22755</td>
331
+ </tr>
332
+ <tr>
333
+ <th scope="row">2</th>
334
+ <td>Jacob</td>
335
+ <td>Diom</td>
336
+ <td>2weet22</td>
337
+ </tr>
338
+ <tr>
339
+ <th scope="row">3</th>
340
+ <td>Larry</td>
341
+ <td>the Clam</td>
342
+ <td>art36552</td>
343
+ </tr>
344
+ </tbody>
345
+ </table>
346
+ </div>
347
+ \`\`\`
348
+
349
+
350
+ ### Hover rows
351
+ Add .table-hover to enable a hover state on table rows within a tbody tag.
352
+
353
+ \`\`\`html
354
+ <div class="container-fluid">
355
+ <table class="table table-hover" role="table" aria-label="Hoverable data table">
356
+ <thead>
357
+ <tr>
358
+ <th scope="col">#</th>
359
+ <th scope="col">First Name</th>
360
+ <th scope="col">Last Name</th>
361
+ <th scope="col">Username</th>
362
+ </tr>
363
+ </thead>
364
+ <tbody>
365
+ <tr>
366
+ <th scope="row">1</th>
367
+ <td>Mark</td>
368
+ <td>Field</td>
369
+ <td>mod22755</td>
370
+ </tr>
371
+ <tr>
372
+ <th scope="row">2</th>
373
+ <td>Jacob</td>
374
+ <td>Diom</td>
375
+ <td>2weet22</td>
376
+ </tr>
377
+ <tr>
378
+ <th scope="row">3</th>
379
+ <td>Larry</td>
380
+ <td>the Clam</td>
381
+ <td>art36552</td>
382
+ </tr>
383
+ </tbody>
384
+ </table>
385
+ </div>
386
+ \`\`\`
387
+
388
+
389
+ ### Condensed tables
390
+ When in need of showing tables in a more compact way, add .table-condensed to reduce font size and cut cell padding in half.
391
+
392
+ \`\`\`html
393
+ <div class="container-fluid">
394
+ <table class="table table-condensed" role="table" aria-label="Condensed data table">
395
+ <thead>
396
+ <tr>
397
+ <th scope="col">#</th>
398
+ <th scope="col">First Name</th>
399
+ <th scope="col">Last Name</th>
400
+ <th scope="col">Username</th>
401
+ </tr>
402
+ </thead>
403
+ <tbody>
404
+ <tr>
405
+ <th scope="row">1</th>
406
+ <td>Mark</td>
407
+ <td>Field</td>
408
+ <td>mod22755</td>
409
+ </tr>
410
+ <tr>
411
+ <th scope="row">2</th>
412
+ <td>Jacob</td>
413
+ <td>Diom</td>
414
+ <td>2weet22</td>
415
+ </tr>
416
+ <tr>
417
+ <th scope="row">3</th>
418
+ <td colspan="2">Larry the Clam</td>
419
+ <td>art36552</td>
420
+ </tr>
421
+ </tbody>
422
+ </table>
423
+ </div>
424
+ \`\`\`
425
+
426
+ ## Alarms
427
+ Alarms indicate device or system issues with varying levels of severity. Each alarm has both a severity level and a status to track its lifecycle.
428
+
429
+ ### Alarm Severities
430
+
431
+ Alarms are classified into four severity levels, each with its own icon and use case:
432
+
433
+ - **CRITICAL**: Device is out of service and requires immediate attention
434
+ - **MAJOR**: Device has a significant problem that should be fixed
435
+ - **MINOR**: Device has a problem that may need attention
436
+ - **WARNING**: Informational warning that should be noted
437
+
438
+ \`\`\`html
439
+ <!-- Critical Alarm -->
440
+ <i class="status stroked-icon c8y-icon dlt-c8y-icon-exclamation-circle critical"></i>
441
+ <span>Critical: System failure detected</span>
442
+
443
+ <!-- Major Alarm -->
444
+ <i class="status stroked-icon c8y-icon dlt-c8y-icon-warning major"></i>
445
+ <span>Major: Service degradation</span>
446
+
447
+ <!-- Minor Alarm -->
448
+ <i class="status stroked-icon c8y-icon dlt-c8y-icon-high-priority minor"></i>
449
+ <span>Minor: Performance threshold exceeded</span>
450
+
451
+ <!-- Warning Alarm -->
452
+ <i class="status stroked-icon c8y-icon dlt-c8y-icon-circle warning"></i>
453
+ <span>Warning: Maintenance required soon</span>
454
+
455
+ ### Alarm Statuses
456
+ Alarms progress through three possible statuses during their lifecycle:
457
+
458
+ - Active: Alarm has been raised and no one is currently addressing it
459
+ - Acknowledged: Someone has acknowledged the alarm and is working on resolution
460
+ - Cleared: The issue has been resolved (either manually cleared or auto-resolved by the device)
461
+
462
+ \`\`\`html
463
+ <!-- Active Status -->
464
+ <i class="c8y-icon dlt-c8y-icon-bell"></i>
465
+ <span>Active alarm</span>
466
+
467
+ <!-- Acknowledged Status -->
468
+ <i class="c8y-icon dlt-c8y-icon-bell-slash"></i>
469
+ <span>Acknowledged by technician</span>
470
+
471
+ <!-- Cleared Status -->
472
+ <i class="c8y-icon c8y-icon-alert-idle"></i>
473
+ <span>Alarm cleared</span>
474
+ \`\`\`\``;
475
+ const HTML_WIDGET_AGENT = {
476
+ snapshot: __MODE__ !== 'production',
477
+ label: gettext('HTML Widget Code assistant'),
478
+ definitions: [
479
+ {
480
+ name: 'c8y-html-widget',
481
+ agent: {
482
+ system: `1. **Analyze the user request**
483
+ - Extract specific data requirements
484
+ - Identify visualization needs
485
+ - Note any context dependencies
486
+
487
+ 2. **API Verification**
488
+ - Use the "cumulocity-api-request" tool to verify needed APIs
489
+ - Document the exact API endpoints, parameters, and expected responses
490
+
491
+ 3. **Coding**
492
+ - Put out one code block with only the code, wrap it in a <${EXTRACT_TAG_NAME}> block
493
+ - IMPORTANT: And no other text or markdown formatting inside the <${EXTRACT_TAG_NAME}> block
494
+ - build the widget code using the following rules: ${WIDGET_CODE_INSTRUCTIONS}
495
+
496
+ 4. **Quality Validation**
497
+ - Analyze if the widget fulfills the user request
498
+ - Check for mock data usage vs real API integration
499
+ - If inadequate, ask user for specific clarifications needed
500
+ `,
501
+ maxTokens: 20000
502
+ },
503
+ type: 'text',
504
+ mcp: [
505
+ {
506
+ serverName: 'cumulocity-default',
507
+ tools: ['cumulocity-api-request']
508
+ }
509
+ ]
510
+ }
511
+ ]
512
+ };
513
+
514
+ class AIHtmlWidgetConfigFactory {
515
+ constructor() {
516
+ this.betaPreviewService = inject(PreviewService);
517
+ this.aiService = inject(AIService);
518
+ this.aiWidgetConfigDefinition = {
519
+ widgetId: defaultWidgetIds.HTML,
520
+ label: gettext('AI Code Assistant'),
521
+ loadComponent: () => import('@c8y/ngx-components/ai/agent-chat').then(m => m.WidgetAiChatSectionComponent),
522
+ initialState: {
523
+ agent: HTML_WIDGET_AGENT,
524
+ title: gettext('I’m your AI Code Assistant, here to help you build powerful widgets for your dashboard.'),
525
+ welcomeText: gettext('Describe the widget you want or select one of the options below to get started.'),
526
+ loadRenderStepComponent: () => import('@c8y/ngx-components/widgets/implementations/html-widget').then(m => m.HtmlAiChatFeedbackComponent),
527
+ suggestions: [
528
+ {
529
+ label: gettext('Measurement widget'),
530
+ prompt: gettext('Create a widget that shows the current measurement of this device.')
531
+ },
532
+ {
533
+ label: gettext('Device status widget'),
534
+ prompt: gettext('Create a widget that shows the status of my devices.')
535
+ },
536
+ {
537
+ label: gettext('Critical alarm widget'),
538
+ prompt: gettext('Create a widget that shows all critical alarms.')
539
+ }
540
+ ]
541
+ },
542
+ priority: 100
543
+ };
544
+ }
545
+ get() {
546
+ return combineLatest([
547
+ from(this.aiService.getAgentHealth(HTML_WIDGET_AGENT.definitions[0].name)),
548
+ this.betaPreviewService.getState$('ui.html-widget.v2').pipe(first())
549
+ ]).pipe(map(([aiExists, state]) => {
550
+ const shouldIncludeAi = aiExists.exists || aiExists.isProviderConfigured;
551
+ if (state && shouldIncludeAi) {
552
+ return [this.aiWidgetConfigDefinition];
553
+ }
554
+ return [];
555
+ }));
556
+ }
557
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AIHtmlWidgetConfigFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
558
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AIHtmlWidgetConfigFactory, providedIn: 'root' }); }
559
+ }
560
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AIHtmlWidgetConfigFactory, decorators: [{
561
+ type: Injectable,
562
+ args: [{
563
+ providedIn: 'root'
564
+ }]
565
+ }] });
566
+
567
+ const htmlWidgetAIChatProviders = [hookWidgetConfig(AIHtmlWidgetConfigFactory)];
568
+
569
+ /**
570
+ * Generated bundle index. Do not edit.
571
+ */
572
+
573
+ export { htmlWidgetAIChatProviders };
574
+ //# sourceMappingURL=c8y-ngx-components-widgets-definitions-html-widget-ai-config.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"c8y-ngx-components-widgets-definitions-html-widget-ai-config.mjs","sources":["../../widgets/definitions/html-widget-ai-config/html-widget.agent.ts","../../widgets/definitions/html-widget-ai-config/ai-html-widget-config.factory.ts","../../widgets/definitions/html-widget-ai-config/index.ts","../../widgets/definitions/html-widget-ai-config/c8y-ngx-components-widgets-definitions-html-widget-ai-config.ts"],"sourcesContent":["// This file contains the definitions for the various AI agents used in the application.\n\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport type { ClientAgentDefinition } from '@c8y/ngx-components/ai';\n\ndeclare const __MODE__: string;\n\nexport const EXTRACT_TAG_NAME = 'c8y-code-extract';\n\nconst WIDGET_CODE_INSTRUCTIONS = `You are responsible for creating a Web component that is rendered on the Dashboard of the Cumulocity IoT Platform. It is written as a lit-element. The following is a very basic example: \n\n<${EXTRACT_TAG_NAME}>\nimport { LitElement, html, css} from 'lit';\nimport { styleImports } from 'styles';\n\nexport default class DefaultWebComponent extends LitElement {\n static styles = css\\`\n \n:host > div {\n padding-left: var(--c8y-root-component-padding);\n padding-right: var(--c8y-root-component-padding);\n}\nspan.branded { \n color: var(--c8y-brand-primary); \n}\n \\`;\n\n static properties = {\n // The managed object this widget is assigned to. Can be null.\n c8yContext: { type: Object },\n };\n\n constructor() {\n super();\n }\n\n render() {\n return html\\`\n <style>\n \\${styleImports}\n </style>\n <div>\n <h1>Hello from HTML widget</h1>\n <p>\n You can use HTML and Javascript template literals here:\n \\${this.c8yContext ? this.c8yContext.name : 'No device selected'}\n </p>\n\n <a class=\"btn btn-primary\" href=\"#/group\">Go to groups</a>\n\n <p>\n Use the CSS editor to add CSS. You can use <span class=\"branded\">any design-token CSS variable</span> in there.\n </p>\n</div>\n \\`;\n }\n}\n</${EXTRACT_TAG_NAME}>\n\nYou are allowed to use the following ESM imports and libs:\n\njavascript\nimport { L } from 'leaflet';\nimport * as echarts from 'echarts'\nimport { fetch } from 'fetch'\n\n\nRemember to not use any leflet plugin. You are only allowed to use pure leaftlet. Always use the imported fetch function to make API calls authenticated to the Cumulocity instance.\n\nDo not include any emoji characters or Unicode symbols in the output - replace any decorative icons with plain text descriptions.\n\nAmong the UI elements that you are allowed to build on your own using HTML and CSS, here are components that you are encouraged to use in your answer:\n\n## Buttons\nYou can apply button classes to any <a>, <input>, or <button> element to style them as buttons. When using a button inside a <form> without a defined type, it defaults to type=\"submit\". To prevent accidental form submissions, always explicitly define the button's type as type=\"button\".\n\nAvailable button variants:\n- .btn-default (standard button)\n- .btn-primary (primary action)\n- .btn-success (positive action)\n- .btn-warning (caution action)\n- .btn-danger (destructive action)\n- .btn-link (text-only button)\n\nButton sizes:\n- .btn-lg (large)\n- .btn-sm (small)\n- .btn-xs (extra small)\n\n\\`\\`\\`html\n<button class=\"btn btn-primary\" type=\"button\">Primary Button</button>\n<button class=\"btn btn-default\" type=\"button\">Default Button</button>\n<button class=\"btn btn-success\" type=\"button\">Success Button</button>\n<button class=\"btn btn-warning\" type=\"button\">Warning Button</button>\n<button class=\"btn btn-danger\" type=\"button\">Danger Button</button>\n<a class=\"btn btn-link\" href=\"javascript:void(0);\">Link Button</a>\n\\`\\`\\`\n\n### Pending/Loading Buttons\nAdd .btn-pending to display an active process. The pointer-events are set to none, making the button unclickable.\n\n\\`\\`\\`html\n<button type=\"button\" aria-busy=\"true\" class=\"btn btn-primary btn-pending\">\n Processing...\n</button>\n\\`\\`\\`\n\n### Button Groups\nGroup a series of buttons together with .btn-group. Can be used for toolbars or action groups.\n\n\\`\\`\\`html\n<div class=\"btn-group\" role=\"group\">\n <button type=\"button\" class=\"btn btn-default\">Left</button>\n <button type=\"button\" class=\"btn btn-default\">Middle</button>\n <button type=\"button\" class=\"btn btn-default\">Right</button>\n</div>\n\\`\\`\\`\n\n## Alerts\nWrap your message in a <div> with .alert class and a modifier class. Always add appropriate ARIA roles:\n\n- Use role=\"status\" for informational messages\n- Use role=\"alert\" for errors or messages \nrequiring immediate attention\n\n\\`\\`\\`html\n<div class=\"alert alert-success\" role=\"status\">\n <strong>Success!</strong> Operation completed successfully.\n</div>\n<div class=\"alert alert-warning\" role=\"alert\">\n <strong>Warning!</strong> Please review your settings.\n</div>\n<div class=\"alert alert-danger\" role=\"alert\">\n <strong>Error!</strong> Failed to save data.\n</div>\n<div class=\"alert alert-info\" role=\"status\">\n <strong>Info:</strong> New updates available.\n</div>\n<div class=\"alert alert-system\" role=\"alert\">\n <strong>System:</strong> Maintenance scheduled.\n</div>\n\\`\\`\\`\n\n### Dismissible Alerts\nFor dismissible alerts, add a close button with proper accessibility:\n\n\\`\\`\\`html\n<div class=\"alert alert-danger alert-dismissible\" role=\"alert\">\n <button class=\"close\" type=\"button\" @click=\"\\${() => this.dismissAlert()}\" aria-label=\"Close alert\">\n <span aria-hidden=\"true\">&times;</span>\n </button>\n <strong>Error:</strong> Invalid credentials provided.\n</div>\n\\`\\`\\`\n\n## Badges\nBadges indicate states with specific color schemes. Add .badge with a modifier class:\n\n\\`\\`\\`html\n<span class=\"badge badge-default\">3</span>\n<span class=\"badge badge-success\">Active</span>\n<span class=\"badge badge-warning\">Pending</span>\n<span class=\"badge badge-danger\">Critical</span>\n<span class=\"badge badge-system\">System</span>\n<span class=\"badge badge-info\">72</span>\n\\`\\`\\`\n### Icon Badges\nCombine badges with icons using .c8y-icon-badge wrapper:\n\n\\`\\`\\`html\n<span class=\"c8y-icon-badge\" title=\"14 Critical alarms\">\n <i class=\"dlt-c8y-icon-exclamation-circle status critical\"></i>\n <span class=\"badge badge-danger\" aria-live=\"assertive\">14</span>\n</span>\n\\`\\`\\`\n\n## Loading Spinner\nShows content is being loaded or processed:\n\n\\`\\`\\`html\n<div class=\"spinner\">\n <div class=\"rect1\"></div>\n <div class=\"rect2\"></div>\n <div class=\"rect3\"></div>\n <div class=\"rect4\"></div>\n <div class=\"rect5\"></div>\n</div>\n\\`\\`\\`\n\n## Tag\nTags highlight small pieces of information inline. They are commonly used to display categories, filters, or selected options in a visually appealing and compact manner.\n\nAdd the .tag class to any <span> or <div> together with any of the modifier classes mentioned below to change the appearance of an inline label. Add the .font-size-inherit class to inherit the font size.\n\n\\`\\`\\`html\n<h1>heading 1\n<span class=\"tag tag--default\">Default</span>\n</h1>\n<br>\n<h2>heading 2\n<span class=\"tag tag--primary\">Primary</span>\n</h2>\n<br>\n<h3>heading 3\n<span class=\"tag tag--danger\">Danger</span>\n</h3>\n<br>\n<h4>heading 4\n<span class=\"tag tag--success font-size-inherit\">Success</span>\n</h4>\n<br>\n<h5>heading 5\n<span class=\"tag tag--warning\">Warning</span>\n</h5>\n<br>\n<h6>heading 6\n<span class=\"tag tag--info\">Info</span>\n</h6>\n\\`\\`\\`\n\n## Table\nTables help you see and process great amounts of data in a tabular form. Designed for simplicity and clarity, they are an efficient way to organize and present information.\n\n\n### Default table\n\nFor basic styling—light padding and only horizontal dividers—add the base class .table to any table tag. It may seem redundant, but given the widespread use of tables for other plugins like calendars and date pickers, we have opted to isolate our custom table styles.\n\n\\`\\`\\`html\n<div class=\"container-fluid\">\n <table class=\"table\" role=\"table\" aria-label=\"Basic data table\">\n <caption>Optional table caption.</caption>\n <colgroup>\n <col width=\"20px\">\n <col width=\"33%\">\n <col width=\"33%\">\n <col width=\"33%\">\n </colgroup>\n <thead>\n <tr>\n <th scope=\"col\">#</th>\n <th scope=\"col\">First Name</th>\n <th scope=\"col\">Last Name</th>\n <th scope=\"col\">Username</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <th scope=\"row\">1</th>\n <td>Mark</td>\n <td>Field</td>\n <td>mod22755</td>\n </tr>\n <tr>\n <th scope=\"row\">2</th>\n <td>Jacob</td>\n <td>Diom</td>\n <td>2weet22</td>\n </tr>\n <tr>\n <th scope=\"row\">3</th>\n <td>Larry</td>\n <td>the Clam</td>\n <td>art36552</td>\n </tr>\n </tbody>\n </table>\n</div>\n\\`\\`\\`\n\n### Striped rows\nUse .table-striped to add zebra-striping to any table row within the tbody tag.\n\n\\`\\`\\`html\n<div class=\"container-fluid\">\n <table class=\"table table-striped\" role=\"table\" aria-label=\"Striped data table\">\n <thead>\n <tr>\n <th scope=\"col\">#</th>\n <th scope=\"col\">First Name</th>\n <th scope=\"col\">Last Name</th>\n <th scope=\"col\">Username</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <th scope=\"row\">1</th>\n <td>Mark</td>\n <td>Field</td>\n <td>mod22755</td>\n </tr>\n <tr>\n <th scope=\"row\">2</th>\n <td>Jacob</td>\n <td>Diom</td>\n <td>2weet22</td>\n </tr>\n <tr>\n <th scope=\"row\">3</th>\n <td>Larry</td>\n <td>the Clam</td>\n <td>art36552</td>\n </tr>\n </tbody>\n </table>\n</div>\n\\`\\`\\`\n\n### Bordered tables\nAdd .table-bordered for borders on all sides of the table and cells.\n\n\\`\\`\\`html\n<div class=\"container-fluid\">\n <table class=\"table table-bordered\" role=\"table\" aria-label=\"Bordered data table\">\n <thead>\n <tr>\n <th scope=\"col\">#</th>\n <th scope=\"col\">First Name</th>\n <th scope=\"col\">Last Name</th>\n <th scope=\"col\">Username</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <th scope=\"row\">1</th>\n <td>Mark</td>\n <td>Field</td>\n <td>mod22755</td>\n </tr>\n <tr>\n <th scope=\"row\">2</th>\n <td>Jacob</td>\n <td>Diom</td>\n <td>2weet22</td>\n </tr>\n <tr>\n <th scope=\"row\">3</th>\n <td>Larry</td>\n <td>the Clam</td>\n <td>art36552</td>\n </tr>\n </tbody>\n </table>\n</div>\n\\`\\`\\`\n\n\n### Hover rows\nAdd .table-hover to enable a hover state on table rows within a tbody tag.\n\n\\`\\`\\`html\n<div class=\"container-fluid\">\n <table class=\"table table-hover\" role=\"table\" aria-label=\"Hoverable data table\">\n <thead>\n <tr>\n <th scope=\"col\">#</th>\n <th scope=\"col\">First Name</th>\n <th scope=\"col\">Last Name</th>\n <th scope=\"col\">Username</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <th scope=\"row\">1</th>\n <td>Mark</td>\n <td>Field</td>\n <td>mod22755</td>\n </tr>\n <tr>\n <th scope=\"row\">2</th>\n <td>Jacob</td>\n <td>Diom</td>\n <td>2weet22</td>\n </tr>\n <tr>\n <th scope=\"row\">3</th>\n <td>Larry</td>\n <td>the Clam</td>\n <td>art36552</td>\n </tr>\n </tbody>\n </table>\n</div>\n\\`\\`\\`\n\n\n### Condensed tables\nWhen in need of showing tables in a more compact way, add .table-condensed to reduce font size and cut cell padding in half.\n\n\\`\\`\\`html\n<div class=\"container-fluid\">\n <table class=\"table table-condensed\" role=\"table\" aria-label=\"Condensed data table\">\n <thead>\n <tr>\n <th scope=\"col\">#</th>\n <th scope=\"col\">First Name</th>\n <th scope=\"col\">Last Name</th>\n <th scope=\"col\">Username</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <th scope=\"row\">1</th>\n <td>Mark</td>\n <td>Field</td>\n <td>mod22755</td>\n </tr>\n <tr>\n <th scope=\"row\">2</th>\n <td>Jacob</td>\n <td>Diom</td>\n <td>2weet22</td>\n </tr>\n <tr>\n <th scope=\"row\">3</th>\n <td colspan=\"2\">Larry the Clam</td>\n <td>art36552</td>\n </tr>\n </tbody>\n </table>\n</div>\n\\`\\`\\`\n\n## Alarms\nAlarms indicate device or system issues with varying levels of severity. Each alarm has both a severity level and a status to track its lifecycle.\n\n### Alarm Severities\n\nAlarms are classified into four severity levels, each with its own icon and use case:\n\n- **CRITICAL**: Device is out of service and requires immediate attention\n- **MAJOR**: Device has a significant problem that should be fixed\n- **MINOR**: Device has a problem that may need attention\n- **WARNING**: Informational warning that should be noted\n\n\\`\\`\\`html\n<!-- Critical Alarm -->\n<i class=\"status stroked-icon c8y-icon dlt-c8y-icon-exclamation-circle critical\"></i>\n<span>Critical: System failure detected</span>\n\n<!-- Major Alarm -->\n<i class=\"status stroked-icon c8y-icon dlt-c8y-icon-warning major\"></i>\n<span>Major: Service degradation</span>\n\n<!-- Minor Alarm -->\n<i class=\"status stroked-icon c8y-icon dlt-c8y-icon-high-priority minor\"></i>\n<span>Minor: Performance threshold exceeded</span>\n\n<!-- Warning Alarm -->\n<i class=\"status stroked-icon c8y-icon dlt-c8y-icon-circle warning\"></i>\n<span>Warning: Maintenance required soon</span>\n\n### Alarm Statuses\nAlarms progress through three possible statuses during their lifecycle:\n\n- Active: Alarm has been raised and no one is currently addressing it\n- Acknowledged: Someone has acknowledged the alarm and is working on resolution\n- Cleared: The issue has been resolved (either manually cleared or auto-resolved by the device)\n\n\\`\\`\\`html\n<!-- Active Status -->\n<i class=\"c8y-icon dlt-c8y-icon-bell\"></i>\n<span>Active alarm</span>\n\n<!-- Acknowledged Status -->\n<i class=\"c8y-icon dlt-c8y-icon-bell-slash\"></i>\n<span>Acknowledged by technician</span>\n\n<!-- Cleared Status -->\n<i class=\"c8y-icon c8y-icon-alert-idle\"></i>\n<span>Alarm cleared</span>\n\\`\\`\\`\\``;\n\nexport const HTML_WIDGET_AGENT: ClientAgentDefinition = {\n snapshot: __MODE__ !== 'production',\n label: gettext('HTML Widget Code assistant'),\n definitions: [\n {\n name: 'c8y-html-widget',\n agent: {\n system: `1. **Analyze the user request**\n - Extract specific data requirements\n - Identify visualization needs\n - Note any context dependencies\n\n2. **API Verification**\n - Use the \"cumulocity-api-request\" tool to verify needed APIs\n - Document the exact API endpoints, parameters, and expected responses\n\n3. **Coding**\n - Put out one code block with only the code, wrap it in a <${EXTRACT_TAG_NAME}> block\n - IMPORTANT: And no other text or markdown formatting inside the <${EXTRACT_TAG_NAME}> block\n - build the widget code using the following rules: ${WIDGET_CODE_INSTRUCTIONS}\n\n4. **Quality Validation**\n - Analyze if the widget fulfills the user request\n - Check for mock data usage vs real API integration\n - If inadequate, ask user for specific clarifications needed\n`,\n maxTokens: 20000\n },\n type: 'text',\n mcp: [\n {\n serverName: 'cumulocity-default',\n tools: ['cumulocity-api-request']\n }\n ]\n }\n ]\n};\n","import { inject, Injectable } from '@angular/core';\nimport { ExtensionFactory, PreviewService } from '@c8y/ngx-components';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport { AIService } from '@c8y/ngx-components/ai';\nimport type { WidgetAiChatSectionComponent } from '@c8y/ngx-components/ai/agent-chat';\nimport type { WidgetConfigSectionDefinition } from '@c8y/ngx-components/context-dashboard';\nimport { defaultWidgetIds } from '@c8y/ngx-components/widgets/definitions';\nimport { combineLatest, first, from, map, Observable } from 'rxjs';\nimport { HTML_WIDGET_AGENT } from './html-widget.agent';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class AIHtmlWidgetConfigFactory implements ExtensionFactory<WidgetConfigSectionDefinition> {\n private readonly betaPreviewService = inject(PreviewService);\n private readonly aiService = inject(AIService);\n private readonly aiWidgetConfigDefinition: WidgetConfigSectionDefinition<WidgetAiChatSectionComponent> =\n {\n widgetId: defaultWidgetIds.HTML,\n label: gettext('AI Code Assistant'),\n loadComponent: () =>\n import('@c8y/ngx-components/ai/agent-chat').then(m => m.WidgetAiChatSectionComponent),\n initialState: {\n agent: HTML_WIDGET_AGENT,\n title: gettext(\n 'I’m your AI Code Assistant, here to help you build powerful widgets for your dashboard.'\n ),\n welcomeText: gettext(\n 'Describe the widget you want or select one of the options below to get started.'\n ),\n\n loadRenderStepComponent: () =>\n import('@c8y/ngx-components/widgets/implementations/html-widget').then(\n m => m.HtmlAiChatFeedbackComponent\n ),\n\n suggestions: [\n {\n label: gettext('Measurement widget'),\n prompt: gettext('Create a widget that shows the current measurement of this device.')\n },\n {\n label: gettext('Device status widget'),\n prompt: gettext('Create a widget that shows the status of my devices.')\n },\n {\n label: gettext('Critical alarm widget'),\n prompt: gettext('Create a widget that shows all critical alarms.')\n }\n ]\n },\n priority: 100\n };\n\n get(): Observable<WidgetConfigSectionDefinition[]> {\n return combineLatest([\n from(this.aiService.getAgentHealth(HTML_WIDGET_AGENT.definitions[0].name)),\n this.betaPreviewService.getState$('ui.html-widget.v2').pipe(first())\n ]).pipe(\n map(([aiExists, state]) => {\n const shouldIncludeAi = aiExists.exists || aiExists.isProviderConfigured;\n if (state && shouldIncludeAi) {\n return [this.aiWidgetConfigDefinition];\n }\n return [];\n })\n );\n }\n}\n","import { hookWidgetConfig } from '@c8y/ngx-components/context-dashboard';\nimport { AIHtmlWidgetConfigFactory } from './ai-html-widget-config.factory';\n\nexport const htmlWidgetAIChatProviders = [hookWidgetConfig(AIHtmlWidgetConfigFactory)];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"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"}
@@ -159,10 +159,17 @@ const assetNotesWidgetExport = {
159
159
  description: 'Asset notes widget',
160
160
  scope: 'self'
161
161
  };
162
+ const htmlWidgetAIChat = {
163
+ name: 'Widgets: HTML Widget AI Code Assistant',
164
+ module: 'htmlWidgetAIChatProviders',
165
+ path: '@c8y/ngx-components/widgets/definitions/html-widget-ai-config',
166
+ description: 'Adds AI Code Assistant capabilities to the HTML Widget',
167
+ scope: 'self'
168
+ };
162
169
 
163
170
  /**
164
171
  * Generated bundle index. Do not edit.
165
172
  */
166
173
 
167
- export { alarmListWidgetExport, applicationsWidgetExport, assetNotesWidgetExport, cockpitWelcomeWidgetExport, criticalAlarmsWidgetExport, dataPointsTableWidgetExport, datapointGraphWidgetExport, deviceControlMessageWidgetExport, deviceManagementWelcomeWidgetExport, helpAndServiceWidgetExport, htmlWidgetExport, imageWidgetExport, infoGaugeWidgetExport, kpiWidgetExport, legacyCockpitWelcomeWidgetExport, linearGaugeWidgetExport, mapWidgetExport, markdownWidgetExport, quickLinksWidgetExport, radialGaugeWidgetExport, recentAlarmsWidgetExport, siloWidgetExport, threeDRotationWidgetExport };
174
+ export { alarmListWidgetExport, applicationsWidgetExport, assetNotesWidgetExport, cockpitWelcomeWidgetExport, criticalAlarmsWidgetExport, dataPointsTableWidgetExport, datapointGraphWidgetExport, deviceControlMessageWidgetExport, deviceManagementWelcomeWidgetExport, helpAndServiceWidgetExport, htmlWidgetAIChat, htmlWidgetExport, imageWidgetExport, infoGaugeWidgetExport, kpiWidgetExport, legacyCockpitWelcomeWidgetExport, linearGaugeWidgetExport, mapWidgetExport, markdownWidgetExport, quickLinksWidgetExport, radialGaugeWidgetExport, recentAlarmsWidgetExport, siloWidgetExport, threeDRotationWidgetExport };
168
175
  //# sourceMappingURL=c8y-ngx-components-widgets-exports.mjs.map