@c8y/style 1023.90.1 → 1023.96.0

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.
Binary file
@@ -0,0 +1,73 @@
1
+  
2
+
3
+ ### SCADA widget v2
4
+
5
+  
6
+
7
+ We're excited to introduce the **SCADA widget v2** for the Cumulocity IoT platform — a full Angular rewrite of the previous AngularJS-based SCADA widget, now with AI-assisted SVG generation, interactive placeholder creation, an in-platform code editor, and a modern web component rendering engine.
8
+ If you've been using the original SCADA widget, your existing configurations will continue to work in **legacy mode**, which preserves current rendering but does not support all of the new v2 features. To take full advantage of everything v2 offers, you can re-configure the widget using the new tools.
9
+
10
+ <div class="p-16 m-auto col-lg-max">
11
+ <img src="./c8y-style-assets/scada-widget-preview.png" alt="SCADA Widget" class="border-all fit-w">
12
+ </div>
13
+
14
+ &nbsp;
15
+
16
+ ### Key features
17
+
18
+ &nbsp;
19
+
20
+ #### AI-assisted SVG generation
21
+
22
+ ✅ **Generate with AI**: Describe your industrial system and let the AI agent generate an SVG visualization with placeholder mappings suggested based on the selected device's properties and measurements.\
23
+ ✅ **Context-aware suggestions**: The agent analyzes the device context (name, properties, supported measurements) and proposes relevant visualization options.\
24
+ ✅ **Analyze and suggest / Best guess**: Use the built-in prompt suggestions to either explore multiple visualization ideas or let the AI pick the most suitable one automatically.
25
+
26
+ &nbsp;
27
+
28
+ #### Interactive placeholder creation
29
+
30
+ ✅ **Automatic placeholder detection**: When uploading or pasting an SVG, all text and tspan elements are automatically marked as potential placeholders, ready to bind to device data.\
31
+ ✅ **Click-to-placeholder**: In the live widget preview, simply click a text or tspan element in the SVG to instantly convert it into a dynamic placeholder.\
32
+ ✅ **Copy placeholder expression**: Each mapping entry can be easily copied as a template expression to be pasted into SVG code.
33
+
34
+ &nbsp;
35
+
36
+ #### Modern web component rendering
37
+
38
+ ✅ **Lit-based web components**: SVG visualizations are rendered as isolated web components with full support for JavaScript template literals and reactive expressions.\
39
+ ✅ **`c8yScadaValues` API**: Access all mapped placeholder values directly in SVG expressions (e.g., `${this.c8yScadaValues?.temperature}`).\
40
+ ✅ **`c8yScadaFunctions` API**: Built-in helpers for navigation (`goToDeviceDetails`, `goToGroupDetails`) and alarm visualization (`getActiveAlarmsStatusClass`).\
41
+ ✅ **Conditional styling and dynamic calculations**: Apply CSS classes or compute values based on live data — colour-coded alarm indicators, progress bars, or threshold-based text colours work out of the box.
42
+
43
+ &nbsp;
44
+
45
+ #### Flexible SVG configuration
46
+
47
+ ✅ **Multiple input methods**: Upload an `.svg` file via drag-and-drop, paste SVG code directly, or generate it with AI — all from the same configuration section.\
48
+ ✅ **Display options**: Choose between *Full width* (stretches to widget width, overflowing area is scrollable) or *Contain* (entire SVG fits in the widget preserving aspect ratio) display modes.\
49
+ ✅ **Alignment controls**: When using the *Contain* mode, independently control horizontal and vertical alignment of the SVG within the widget.
50
+
51
+ &nbsp;
52
+
53
+ #### Advanced editor
54
+
55
+ ✅ **Edit SVG code directly on the platform**: The original SCADA widget required preparing and editing SVG files outside of Cumulocity IoT. The new *Advanced editor* lets you write and modify SVG code directly within the widget configuration — no external tooling needed.\
56
+ ✅ **Syntax highlighting and code completion**: The editor provides syntax highlighting and property key suggestions derived from the current placeholder mappings.\
57
+ ✅ **Live preview**: Changes in the editor are reflected immediately in the widget preview without saving.
58
+
59
+ &nbsp;
60
+
61
+ #### Compatibility with the classic SCADA widget
62
+
63
+ ✅ **Automatic legacy detection**: Existing SCADA widget configurations (including binary SVG files, per-device mappings, computed properties, and fieldbus mappings) are automatically recognized and run in legacy mode — no manual migration or data loss. Configurations running in legacy mode are clearly indicated.\
64
+ ✅ **Upgrade path**: You can re-configure any widget using the new v2 tools to leave legacy mode and unlock the full feature set.
65
+
66
+ &nbsp;
67
+
68
+ The **SCADA widget v2** is currently available in preview mode behind a feature flag.
69
+ We encourage you to explore it with your existing SVG assets, try generating a visualization with AI, and experience the new interactive placeholder workflow firsthand.
70
+
71
+ &nbsp;
72
+
73
+ ---
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@c8y/style",
3
- "version": "1023.90.1",
3
+ "version": "1023.96.0",
4
4
  "license": "Apache-2.0",
5
5
  "author": "Cumulocity GmbH",
6
6
  "description": "Styles for Cumulocity IoT applications",
@@ -75,7 +75,6 @@ c8y-asset-selector{
75
75
  &__node {
76
76
  display: flex;
77
77
  max-height: @size-32;
78
- min-width:fit-content;
79
78
  .collapse-btn {
80
79
  height: @size-32;
81
80
  width: @size-32;
@@ -190,6 +190,14 @@
190
190
  }
191
191
  }
192
192
 
193
+ td,th{
194
+ >.btn-dot, .d-flex > .btn-dot{
195
+ margin-top: 0;
196
+ margin-bottom: 0;
197
+ height: @form-control-height-base!important;
198
+ }
199
+ }
200
+
193
201
  .btn-icon-dot {
194
202
  display: flex;
195
203
  background: @component-background-default;
@@ -193,6 +193,14 @@
193
193
  }
194
194
  }
195
195
 
196
+ td,th{
197
+ >.btn-dot, .d-flex > .btn-dot{
198
+ margin-top: 0;
199
+ margin-bottom: 0;
200
+ height: $form-control-height-base!important;
201
+ }
202
+ }
203
+
196
204
  .btn-icon-dot {
197
205
  display: flex;
198
206
  background: $component-background-default;
@@ -421,12 +421,6 @@ body fieldset > .dashboard-preview-slot {
421
421
  }
422
422
  }
423
423
 
424
- // Prevent interactions in dashboard preview slots except for maps
425
- .dashboard-preview-slot:not(:has(c8y-map)) {
426
- pointer-events: none;
427
- cursor: forbidden;
428
- }
429
-
430
424
  // data-grid--custom-column-header- styles
431
425
  .dashboard-preview-slot,
432
426
  .card-dashboard {
@@ -425,7 +425,6 @@ body fieldset > .dashboard-preview-slot {
425
425
  }
426
426
  }
427
427
 
428
-
429
428
  // data-grid--custom-column-header- styles
430
429
  .dashboard-preview-slot,
431
430
  .card-dashboard{
@@ -67,4 +67,4 @@ c8y-bottom-drawer + c8y-bottom-drawer + c8y-bottom-drawer {
67
67
  .bottom-drawer {
68
68
  margin-top: 80px;
69
69
  }
70
- }
70
+ }
@@ -57,3 +57,15 @@
57
57
  }
58
58
  }
59
59
  }
60
+
61
+ // for when there are two bottom drawers open
62
+ c8y-bottom-drawer + c8y-bottom-drawer {
63
+ .bottom-drawer {
64
+ margin-top: 40px;
65
+ }
66
+ }
67
+ c8y-bottom-drawer + c8y-bottom-drawer + c8y-bottom-drawer {
68
+ .bottom-drawer {
69
+ margin-top: 80px;
70
+ }
71
+ }