@mxtommy/kip 4.8.0-beta.1 → 4.8.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.
- package/CHANGELOG.md +32 -0
- package/LICENSE +3 -0
- package/README.md +56 -49
- package/package.json +24 -21
- package/plugin/history-series.service.js +108 -30
- package/plugin/index.js +157 -115
- package/plugin/kip-series-contract.js +12 -3
- package/plugin/openApi.json +64 -13
- package/plugin/sqlite-history-storage.service.js +4 -2
- package/plugin/src/history-series.service.js +634 -0
- package/plugin/src/index.js +1322 -0
- package/plugin/src/kip-series-contract.js +31 -0
- package/plugin/src/openApi.json +855 -0
- package/plugin/src/sqlite-history-storage.service.js +1122 -0
- package/public/3rdpartylicenses.txt +569 -727
- package/public/assets/help-docs/chartplotter.md +1 -1
- package/public/assets/help-docs/contributing-widgets.md +40 -0
- package/public/assets/help-docs/dashboards.md +6 -0
- package/public/assets/help-docs/history-api.md +69 -71
- package/public/assets/help-docs/menu.json +27 -7
- package/public/assets/help-docs/time-series.md +81 -0
- package/public/assets/help-docs/welcome.md +1 -1
- package/public/assets/svg/icons.svg +36 -1
- package/public/chunk-00hwknVI.js +1 -0
- package/public/chunk-5U8d2Ygo.js +14 -0
- package/public/chunk-AANk-NXH.js +1015 -0
- package/public/chunk-B6bEhzNR.js +1 -0
- package/public/chunk-B82ADJSs.js +1 -0
- package/public/chunk-BJz7Ij9E.js +1 -0
- package/public/chunk-BKj60jdq.js +1 -0
- package/public/chunk-BOAD0N2a.js +2 -0
- package/public/chunk-BQr-tSkv.js +1 -0
- package/public/chunk-BX6skw5k.js +1 -0
- package/public/chunk-BdokyhBM.js +1 -0
- package/public/chunk-Blokg6Ds.js +1 -0
- package/public/chunk-BoNDCNGE.js +1 -0
- package/public/chunk-Bp0MQwPM.js +1 -0
- package/public/chunk-BwOIef42.js +1 -0
- package/public/chunk-By8ZVvDx.js +2 -0
- package/public/chunk-C2VQxCXa.js +1 -0
- package/public/chunk-C6UXF7BI.js +1 -0
- package/public/chunk-CA6RRaxd.js +1 -0
- package/public/chunk-CIlfzV9R.js +1 -0
- package/public/chunk-CL2xiH57.js +1 -0
- package/public/chunk-CNMFlw_H.js +1 -0
- package/public/chunk-CNNTuNlM.js +1 -0
- package/public/chunk-CQNVyz8q.js +1 -0
- package/public/chunk-CXvG8mMq.js +1 -0
- package/public/chunk-CaD3zVfK.js +1 -0
- package/public/chunk-CkXTl3su.js +1 -0
- package/public/chunk-CpMCBDvH.js +1 -0
- package/public/chunk-CpuB_ZZz.js +2 -0
- package/public/chunk-CrBxxZCe.js +1 -0
- package/public/chunk-CwSa_BNV.js +1 -0
- package/public/chunk-D4xZ2tGB.js +39 -0
- package/public/chunk-DDqeRiB0.js +1 -0
- package/public/chunk-DE4ylhpq.js +1 -0
- package/public/chunk-DNS-qsFC.js +1 -0
- package/public/chunk-DQnoPLyC.js +1 -0
- package/public/chunk-DWLISAZi.js +1 -0
- package/public/chunk-DXkKj21H.js +1 -0
- package/public/chunk-DchvLV_Y.js +1 -0
- package/public/chunk-DjZgzSiH.js +1 -0
- package/public/chunk-DumLX5k_.js +1 -0
- package/public/chunk-Dxlia2NE.js +1 -0
- package/public/chunk-DzTTqoF_.js +1 -0
- package/public/chunk-H9_eqTYx.js +1 -0
- package/public/chunk-Ii9n-oiL.js +1 -0
- package/public/chunk-JbEkcxJm.js +2 -0
- package/public/chunk-MjWuPUhu.js +1 -0
- package/public/chunk-PheXEqie.js +1 -0
- package/public/chunk-TakPRI3t.js +2 -0
- package/public/chunk-VgxMqRPk.js +3 -0
- package/public/chunk-dgaOX1wC.js +382 -0
- package/public/chunk-hd2_AKwt.js +1 -0
- package/public/chunk-nu4vZg-z.js +1 -0
- package/public/chunk-sNakMDHi.js +1 -0
- package/public/chunk-tAiV3ARh.js +1 -0
- package/public/chunk-y1imvaA-.js +1 -0
- package/public/index.html +4 -4
- package/public/main-BAV5VDOD.js +7109 -0
- package/public/polyfills-5MJXXCNC.js +1 -0
- package/public/styles-JZSMCSRO.css +1 -0
- package/public/assets/help-docs/widget-historical-series.md +0 -110
- package/public/chunk-2TP7C66X.js +0 -5
- package/public/chunk-4KHUCTYN.js +0 -3
- package/public/chunk-6ISGIPNP.js +0 -1
- package/public/chunk-7JGTAL26.js +0 -10
- package/public/chunk-C23GLDFH.js +0 -62
- package/public/chunk-CB4E7PPA.js +0 -4
- package/public/chunk-DNM5XUIF.js +0 -1
- package/public/chunk-HF7V6XFA.js +0 -2
- package/public/chunk-HXR2BKDL.js +0 -4
- package/public/chunk-ILQQCGMJ.js +0 -5
- package/public/chunk-IXUKD73N.js +0 -5
- package/public/chunk-JMZYPL54.js +0 -2
- package/public/chunk-KJCBQE6W.js +0 -6
- package/public/chunk-LEY6MANN.js +0 -16
- package/public/chunk-O5BTKN5D.js +0 -1
- package/public/chunk-OH5KNIQ7.js +0 -50
- package/public/chunk-Q32FSCUX.js +0 -1
- package/public/chunk-RIX4VQJ2.js +0 -1
- package/public/chunk-SHJMXSDM.js +0 -1
- package/public/chunk-T4VTC6GW.js +0 -1
- package/public/chunk-VFJD3XKT.js +0 -1
- package/public/chunk-VFZSH4TC.js +0 -1
- package/public/chunk-W6MCE3GH.js +0 -6
- package/public/chunk-WAOG456B.js +0 -2
- package/public/chunk-XBOM6DMF.js +0 -9
- package/public/main-BECMST5R.js +0 -1
- package/public/polyfills-BWA36QKG.js +0 -1
- package/public/scripts-M6PHZBML.js +0 -14
- package/public/styles-DYEO23GZ.css +0 -1
|
@@ -39,7 +39,7 @@ The transition is automatic; no manual toggle is required. The per‑dashboard c
|
|
|
39
39
|
2. Drag the split divider and release.
|
|
40
40
|
3. Press **Save** (check icon) to persist globally, or **Cancel** (X) to revert to the previous ratio.
|
|
41
41
|
|
|
42
|
-
<img src="
|
|
42
|
+
<img src="assets/help-docs/img/splitdeviderhandle.png" alt="Resize the split" title="Split handle" width="100%">
|
|
43
43
|
|
|
44
44
|
>**Notes:**
|
|
45
45
|
>- Width changes are only committed on Save (prevents accidental layout shifts).
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
## Contributing Widgets
|
|
2
|
+
|
|
3
|
+
KIP widgets are community-powered. If you need a widget that does not exist yet, you can request one from the community or build and contribute it.
|
|
4
|
+
|
|
5
|
+
## For End Users
|
|
6
|
+
|
|
7
|
+
- Check [Dashboards and Layout](#/help/dashboards.md) to confirm the current widget catalog.
|
|
8
|
+
- Ask in the community first before building from scratch; someone may already have a branch or reusable approach.
|
|
9
|
+
- Use [The Embed Page Viewer](#/help/embedwidget.md) when your requirement is best served by an external web dashboard.
|
|
10
|
+
|
|
11
|
+
## For Developers
|
|
12
|
+
|
|
13
|
+
Widget creation follows a schematic-first workflow for Host2 widgets.
|
|
14
|
+
|
|
15
|
+
1. Scaffold with `npm run generate:widget`.
|
|
16
|
+
2. Follow schematic flags and examples in `docs/widget-schematic.md`.
|
|
17
|
+
3. Apply Host2 implementation patterns and stream wiring guardrails.
|
|
18
|
+
4. Add domain assertions to the generated spec before submitting a PR.
|
|
19
|
+
|
|
20
|
+
Developer references:
|
|
21
|
+
- `docs/widget-schematic.md`
|
|
22
|
+
- `.github/instructions/project.instructions.md`
|
|
23
|
+
- `.agents/skills/kip-widget-creation/SKILL.md`
|
|
24
|
+
- `.agents/skills/kip-host2-widget/SKILL.md`
|
|
25
|
+
|
|
26
|
+
## Contribution Flow
|
|
27
|
+
|
|
28
|
+
1. Create a feature branch.
|
|
29
|
+
2. Generate and implement the widget.
|
|
30
|
+
3. Generate and implement the widget test when necessary.
|
|
31
|
+
4. Add an svg icon
|
|
32
|
+
5. Update README.md and KIP documentation with your plugin information.
|
|
33
|
+
6. Validate with lint/tests (ng lint/ng test).
|
|
34
|
+
7. Submit a pull request with screenshots and a short behavior summary.
|
|
35
|
+
|
|
36
|
+
## Notes
|
|
37
|
+
|
|
38
|
+
- Keep new widget behavior deterministic and path-safe.
|
|
39
|
+
- Prefer theme roles and shared formatting helpers.
|
|
40
|
+
- Keep docs concise and link to canonical references rather than duplicating option tables.
|
|
@@ -83,6 +83,7 @@ KIP widgets turn Signal K data into readable visuals and controls. Available wid
|
|
|
83
83
|
- **Wind Trends** – Real-time True Wind trends with dual axes for direction and speed, live values, and averages.
|
|
84
84
|
- **Battery Monitor** - Display batteries or whole banks state State of Charge, remaining capacity, remaining time, voltage, current, power flow, and temperature.
|
|
85
85
|
- **Solar Charger**- Track solar generation and charging performance at a glance with live panel output, battery-side metrics, and clear charger and relay status indicators.
|
|
86
|
+
- **AC/DC Charger**- Monitor charging performance at a glance with a compact AC/DC Charger Widget. View single or multiple chargers with charge mode, voltage, current, power and temperature. Chargers are discovered automatically.
|
|
86
87
|
- **Freeboard-SK** – Adds the Freeboard-SK chart plotter as a widget with automatic sign-in.
|
|
87
88
|
- **Autopilot Head** – Typical autopilot controls for compatible Signal K Autopilot devices.
|
|
88
89
|
- **Realtime Data Chart** – Visualizes data on a real-time chart with actuals, averages, and min/max.
|
|
@@ -93,6 +94,11 @@ KIP widgets turn Signal K data into readable visuals and controls. Available wid
|
|
|
93
94
|
- **Racer - Start Timer** – Advanced racing countdown timer with OCS status and auto dashboard switching.
|
|
94
95
|
- **Countdown Timer** – Simple race start countdown timer with start, pause, sync, and reset options.
|
|
95
96
|
|
|
97
|
+
### Need a Widget Not Listed Here?
|
|
98
|
+
|
|
99
|
+
- Check the community first: someone may already have a reusable setup or branch.
|
|
100
|
+
- If you are a developer, see [Contributing Widgets](#/help/contributing-widgets.md) for the contribution path.
|
|
101
|
+
- If you only need external visuals, consider [The Embed Page Viewer](#/help/embedwidget.md) for web dashboards.
|
|
96
102
|
|
|
97
103
|
## Performance & Layout Tips
|
|
98
104
|
- Favor clarity over cramming: leave space around high‑priority values
|
|
@@ -1,126 +1,124 @@
|
|
|
1
|
-
## Using External History
|
|
1
|
+
## Using an External History API Provider
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
If you disable KIP's built-in Time-Series features and install a compatible History API provider plugin, you can still:
|
|
4
|
+
1. Pre-seed Data Chart and Wind Trends so they show recent trends immediately.
|
|
5
|
+
2. Populate historical views for widgets in your dashboards that use numeric value paths.
|
|
4
6
|
|
|
5
|
-
|
|
7
|
+
The tradeoff is that you must configure the provider plugin to capture the paths you want to chart, and it must have enough recorded data to cover your chart time span. This is not automatic when using an external provider.
|
|
6
8
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
-
|
|
11
|
-
- **Requirements**: Time scale = minutes or longer.
|
|
12
|
-
- See "Configure Time Scales" below for more details.
|
|
9
|
+
The benefit is greater control, including:
|
|
10
|
+
- Long-term record keeping.
|
|
11
|
+
- Custom retention and sampling rules.
|
|
12
|
+
- Analytics or integration with tools such as Grafana.
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
- **Supported**: Yes, uses fixed paths (True Wind Direction and Speed).
|
|
16
|
-
- **Requirements**: Time Span of `5 minutes` or `30 minutes`.
|
|
17
|
-
- See Wind Trends Fixed Paths below for configuration details.
|
|
14
|
+
## Which Widgets Support History?
|
|
18
15
|
|
|
19
|
-
|
|
20
|
-
NOTE: This is the optional chart that can be display in the background of the Numeric Widget.
|
|
21
|
-
- **Supported**: No. Mini charts use very short time windows (12 seconds) and skip history seeding.
|
|
22
|
-
- Mini charts start live-only for performance reasons.
|
|
16
|
+
As with KIP's built-in Time-Series, most widgets that use numeric paths support history when using an external History API provider, including Horizon, Battery Monitor, Solar, and similar numeric-based widgets. Your provider plugin must be configured to capture the paths you want to chart.
|
|
23
17
|
|
|
24
|
-
##
|
|
18
|
+
## Required Plugins and Signal K Version
|
|
25
19
|
|
|
26
|
-
You
|
|
20
|
+
You need:
|
|
21
|
+
- Signal K support for History API v2 (introduced in Signal K v2.22.1).
|
|
22
|
+
- A compatible History API provider plugin.
|
|
27
23
|
|
|
28
|
-
|
|
29
|
-
- **Purpose**: Records Signal K data to an InfluxDB v2 time-series database. Requires pre-installed InfluxDB v2.
|
|
30
|
-
- **Link**: [signalk-to-influxdb2](https://www.npmjs.com/package/signalk-to-influxdb2)
|
|
31
|
-
- **Setup**: Consult the plugin documentation for installation and configuration.
|
|
32
|
-
- **Path Configuration**: By default, records all paths. Configure filters, resolution, and other settings to match the paths you want available in KIP charts.
|
|
24
|
+
Currently, two plugins support History API v2:
|
|
33
25
|
|
|
34
|
-
###
|
|
35
|
-
- **Purpose
|
|
36
|
-
- **Link
|
|
37
|
-
- **Setup
|
|
38
|
-
- **Path Configuration
|
|
26
|
+
### 1. signalk-to-influxdb2 (v2.0.0+)
|
|
27
|
+
- **Purpose:** Records Signal K data to an InfluxDB v2 time-series database (requires InfluxDB v2).
|
|
28
|
+
- **Link:** [signalk-to-influxdb2](https://www.npmjs.com/package/signalk-to-influxdb2)
|
|
29
|
+
- **Setup:** Follow the plugin documentation for installation and configuration.
|
|
30
|
+
- **Path Configuration:** By default, records all paths. Configure filters, resolution, and related settings for the paths you want available in KIP charts.
|
|
39
31
|
|
|
32
|
+
### 2. signalk-parquet
|
|
33
|
+
- **Purpose:** Records Signal K data to Parquet files for efficient storage and querying (no external database required).
|
|
34
|
+
- **Link:** [signalk-parquet](https://www.npmjs.com/package/signalk-parquet)
|
|
35
|
+
- **Setup:** Follow the plugin documentation for installation and configuration.
|
|
36
|
+
- **Path Configuration:** You must specify which paths to record; none are recorded by default.
|
|
40
37
|
|
|
41
38
|
## How History Data Works in KIP
|
|
42
39
|
|
|
43
40
|
### History Seeding
|
|
44
41
|
When you open a chart widget with a larger time scale (minutes/hours):
|
|
45
|
-
1. KIP checks
|
|
46
|
-
2. If available and the time window allows (resolution >=
|
|
47
|
-
3. The chart
|
|
42
|
+
1. KIP checks whether history data is available through the History API.
|
|
43
|
+
2. If available and the time window allows it (resolution >= 1000 ms), KIP requests historical data points.
|
|
44
|
+
3. The chart displays the historical trend immediately.
|
|
48
45
|
|
|
49
46
|
### Live Updates
|
|
50
47
|
After history data loads:
|
|
51
|
-
- New data points arrive
|
|
52
|
-
- The chart smoothly
|
|
53
|
-
- Old
|
|
48
|
+
- New data points continue to arrive through Signal K's live WebSocket connection.
|
|
49
|
+
- The chart transitions smoothly from history to live updates.
|
|
50
|
+
- Old points are removed to maintain a rolling window based on the configured time scale.
|
|
54
51
|
|
|
55
52
|
### When History Is Not Available
|
|
56
|
-
- If
|
|
57
|
-
- The chart
|
|
58
|
-
- This is
|
|
53
|
+
- If no History API plugin is installed, or the provider reports that a path is not recorded, history requests are skipped silently.
|
|
54
|
+
- The chart shows live data only, starting from when it was opened.
|
|
55
|
+
- This is expected behavior and does not indicate an error.
|
|
59
56
|
|
|
60
|
-
## Provider Configuration
|
|
57
|
+
## Provider Plugin Configuration
|
|
61
58
|
|
|
62
|
-
For performance reasons,
|
|
59
|
+
For performance reasons, KIP charts display a maximum of 120 datapoints. KIP uses the chart's configured time window and asks the provider to return data for that window as up to 120 datapoints.
|
|
63
60
|
|
|
64
|
-
When configuring
|
|
61
|
+
When configuring provider sampling rates, ensure your rules support this behavior:
|
|
62
|
+
- Slower sampling rates produce fewer datapoints (lower visual resolution).
|
|
63
|
+
- Faster sampling rates do not produce more than 120 datapoints in KIP charts.
|
|
65
64
|
|
|
66
|
-
### Historical
|
|
65
|
+
### Widget Historical Charts
|
|
67
66
|
|
|
68
|
-
|
|
67
|
+
For the smallest fixed window (**last 15 minutes**), collect enough samples to provide useful resolution. A sampling interval around 7.5 seconds is ideal; 15 seconds is also usable.
|
|
69
68
|
|
|
70
69
|
### Wind Trends Fixed Paths
|
|
71
70
|
|
|
72
71
|
The Wind Trends widget uses two fixed Signal K paths:
|
|
73
|
-
- **True Wind Direction
|
|
74
|
-
- **True Wind Speed
|
|
72
|
+
- **True Wind Direction:** `environment.wind.directionTrue`
|
|
73
|
+
- **True Wind Speed:** `environment.wind.speedTrue`
|
|
75
74
|
|
|
76
|
-
|
|
75
|
+
To display Wind Trends history, both paths **must be captured by your selected History API plugin**.
|
|
77
76
|
|
|
78
|
-
|
|
77
|
+
Choose a sampling rate that supports chart durations of 5 and 30 minutes.
|
|
79
78
|
|
|
80
79
|
## Limitations
|
|
81
80
|
|
|
82
|
-
|
|
81
|
+
To seed charts with historical data, you usually need to manually configure your provider to collect the required paths. Unlike KIP's built-in Time-Series, this is not automatic.
|
|
83
82
|
|
|
84
83
|
## Troubleshooting
|
|
85
84
|
|
|
86
85
|
### History Data Is Not Showing
|
|
87
86
|
|
|
88
|
-
**Check 1: Are the
|
|
89
|
-
- Confirm
|
|
87
|
+
**Check 1: Are the technical requirements met?**
|
|
88
|
+
- Confirm Signal K server v2.22.1 or later is installed.
|
|
90
89
|
|
|
91
|
-
**Check 2: Is
|
|
92
|
-
- Confirm
|
|
93
|
-
- Verify
|
|
90
|
+
**Check 2: Is a History API plugin installed?**
|
|
91
|
+
- Confirm a History API plugin is installed and only one provider plugin is enabled.
|
|
92
|
+
- Verify the plugin is running without errors (check server logs).
|
|
94
93
|
|
|
95
|
-
**Check 3: Are
|
|
96
|
-
- Open
|
|
97
|
-
- Confirm
|
|
94
|
+
**Check 3: Are paths configured in the plugin?**
|
|
95
|
+
- Open plugin configuration.
|
|
96
|
+
- Confirm the paths you are charting (for example, `navigation.speedThroughWater`) are included in the capture list.
|
|
98
97
|
|
|
99
98
|
**Check 4: Is there historical data available?**
|
|
100
|
-
- If the plugin was
|
|
101
|
-
- Charts
|
|
102
|
-
- Allow
|
|
99
|
+
- If the plugin was installed recently, data is only available from that point onward.
|
|
100
|
+
- Charts cannot display history for periods before the plugin was enabled or before the path was configured.
|
|
101
|
+
- Allow time for data to accumulate before expecting deeper history.
|
|
103
102
|
|
|
104
103
|
**Check 5: Is the chart time scale eligible?**
|
|
105
104
|
- Very short time scales (seconds) skip history seeding for performance.
|
|
106
|
-
- Use time scales of **minutes or longer**
|
|
107
|
-
|
|
108
|
-
**Check 6: Are there any network or permission issues?**
|
|
109
|
-
- Confirm that KIP can reach the Signal K server's History-API endpoint. Use the OpenApi link in the Server Admin pages to the test.
|
|
110
|
-
- Check browser console logs (F12) for any HTTP errors from history requests.
|
|
105
|
+
- Use chart time scales of **minutes or longer** for history seeding.
|
|
111
106
|
|
|
107
|
+
**Check 6: Are there network or permission issues?**
|
|
108
|
+
- Confirm KIP can reach the Signal K server History API endpoint.
|
|
109
|
+
- Use the OpenAPI link in Signal K Server Admin pages to test endpoint availability.
|
|
110
|
+
- Check browser console logs (F12) for HTTP errors from history requests.
|
|
112
111
|
|
|
113
112
|
## Next Steps
|
|
114
113
|
|
|
115
|
-
1. Verify that a History
|
|
114
|
+
1. Verify that a History API plugin is installed on your Signal K server.
|
|
116
115
|
2. Configure the plugin to capture the paths you want to chart.
|
|
117
|
-
3. Wait for plugin to
|
|
116
|
+
3. Wait for the plugin to collect enough data to fill your chart time span.
|
|
118
117
|
4. Open a Data Chart or Wind Trends widget with a time scale of minutes or longer.
|
|
119
|
-
5.
|
|
120
|
-
6. For more details, consult
|
|
121
|
-
|
|
118
|
+
5. Let the chart load; history appears when available.
|
|
119
|
+
6. For more details, consult plugin documentation and Signal K community resources.
|
|
122
120
|
|
|
123
121
|
## Questions or Issues?
|
|
124
122
|
|
|
125
|
-
- Refer to
|
|
126
|
-
- For general questions or issues, see
|
|
123
|
+
- Refer to plugin and History API documentation for provider-specific setup and troubleshooting.
|
|
124
|
+
- For general questions or issues, see the Contact-Us help page. The Signal K community is active on Discord and GitHub.
|
|
@@ -6,21 +6,41 @@
|
|
|
6
6
|
{ "title": "Chartplotter Mode", "file": "chartplotter.md" },
|
|
7
7
|
{ "title": "Zones, Notifications and Highlights", "file": "zones.md" },
|
|
8
8
|
{ "title": "Digital Switching and PUT", "file": "putcontrols.md" },
|
|
9
|
-
{ "title": "Historical Widget Data", "file": "
|
|
9
|
+
{ "title": "Historical Widget Data", "file": "time-series.md" },
|
|
10
10
|
{
|
|
11
11
|
"title": "Integrations",
|
|
12
12
|
"items": [
|
|
13
|
-
{
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
{
|
|
13
|
+
{
|
|
14
|
+
"title": "Node-RED (Getting Started)",
|
|
15
|
+
"file": "nodered-control-flows.md"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"title": "The Embed Page Viewer",
|
|
19
|
+
"file": "embedwidget.md"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"title": "History-API Provider",
|
|
23
|
+
"file": "history-api.md"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"title": "InfluxDB and Signal K",
|
|
27
|
+
"file": "influxdb.md"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"title": "Using Grafana",
|
|
31
|
+
"file": "grafana.md"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"title": "Contributing Widgets",
|
|
35
|
+
"file": "contributing-widgets.md"
|
|
36
|
+
}
|
|
18
37
|
]
|
|
19
38
|
},
|
|
20
39
|
{
|
|
21
40
|
"title": "Advanced Features",
|
|
22
41
|
"items": [
|
|
23
|
-
{ "title": "Kiosk Mode", "file": "kiosk.md" }
|
|
42
|
+
{ "title": "Kiosk Mode", "file": "kiosk.md" },
|
|
43
|
+
{ "title": "Contributing Widgets", "file": "contributing-widgets.md" }
|
|
24
44
|
]
|
|
25
45
|
},
|
|
26
46
|
{ "title": "Online Community Content", "file": "community.md" },
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
## Historical Widget Data
|
|
2
|
+
|
|
3
|
+
KIP is primarily designed for live sailing data. To make charts useful immediately and provide easy access to recent widget history, KIP includes a purpose-built history feature called **Time-Series**.
|
|
4
|
+
|
|
5
|
+
The **Time-Series** feature manages data capture and pruning. It uses that data to:
|
|
6
|
+
1. Pre-seed Data Chart and Wind Trends so they show recent trends immediately.
|
|
7
|
+
2. Automatically provide a historical view for widgets in your dashboards that use numeric value paths.
|
|
8
|
+
|
|
9
|
+
It is meant for users who need simple, short-term history with:
|
|
10
|
+
* No extra configuration
|
|
11
|
+
* No plugin to install
|
|
12
|
+
* No data capture, storage rules, or retention policies to manage
|
|
13
|
+
|
|
14
|
+
It is designed for quick, hassle-free trend history, not data engineering.
|
|
15
|
+
|
|
16
|
+
## Time-Series
|
|
17
|
+
- Works automatically with your dashboards and widgets.
|
|
18
|
+
- Stores only the data KIP needs for widget history and chart startup.
|
|
19
|
+
- Keeps a small rolling history and removes older data.
|
|
20
|
+
- If you change widget configuration, KIP automatically adds, updates, or removes capture and retention rules.
|
|
21
|
+
|
|
22
|
+
### What Time-Series Does Not Do
|
|
23
|
+
- KIP’s built-in Time-Series is not a full data-logging solution. You cannot manually define capture paths, sampling policies, long-term retention, or advanced rules. For that, use another plugin with an external History API provider (see [History-API Provider](#/help/history-api.md).
|
|
24
|
+
- The widget history dialog offers **a fixed set** of time windows: the last 15 minutes, 1 hour, 8 hours, or 24 hours. If you need more flexible analytics, use purpose-built platforms such as Grafana.
|
|
25
|
+
|
|
26
|
+
## Accessing Time-Series
|
|
27
|
+
Access the Time-Series chart directly from a locked dashboard:
|
|
28
|
+
|
|
29
|
+
- **Touch devices:** Two-finger tap a numeric value widget.
|
|
30
|
+
- **Desktop / mouse:** Right-click a numeric value widget or two-finger click on trackpads.
|
|
31
|
+
|
|
32
|
+
The Time-Series chart displays recorded data only (no live stream overlay).
|
|
33
|
+
|
|
34
|
+
## Supported Widgets
|
|
35
|
+
Most widgets that use numeric paths support Time-Series, including Horizon, Battery Monitor, Solar, and similar numeric-based widgets.
|
|
36
|
+
|
|
37
|
+
### Chart Type Widgets Support
|
|
38
|
+
Time-Series automatically captures data according to each chart widget configuration and uses it to seed charts.
|
|
39
|
+
|
|
40
|
+
#### Data Chart Widget
|
|
41
|
+
- **Supported:** Yes, fully seeded with history data.
|
|
42
|
+
- **Requirements:** Time scale must be minutes or longer.
|
|
43
|
+
|
|
44
|
+
#### Wind Trends Widget
|
|
45
|
+
- **Supported:** Yes, fully seeded with history data.
|
|
46
|
+
- **Requirements:** Time span of `5 minutes` or `30 minutes`.
|
|
47
|
+
|
|
48
|
+
#### Numeric Widget's Mini Chart
|
|
49
|
+
- **Supported:** No. Mini charts use very short time windows (12 seconds) and skip history seeding.
|
|
50
|
+
- Mini charts start live-only for performance reasons.
|
|
51
|
+
|
|
52
|
+
## Time-Series Technical Requirements
|
|
53
|
+
- Node.js v20.5.0+: The built-in automatic Time-Series feature (integrated data management) uses `node:sqlite`, released in Node.js v20.5.0.
|
|
54
|
+
- Signal K v2.22.1+: The history query service uses History API v2, introduced in Signal K v2.22.1.
|
|
55
|
+
|
|
56
|
+
## Configuration Options
|
|
57
|
+
>The Time-Series feature is designed to work automatically without configuration. However, you can customize its behavior or disable it if you prefer not to use this feature or to use a different History API provider.
|
|
58
|
+
|
|
59
|
+
There are two sources of configuration:
|
|
60
|
+
1. KIP Plugin: found in Signal K's Admin, Server -> Plugin Config page under KIP. Use these options to manually toggle the server-side data capture and/or history provider features. Note that using the KIP Application options will also automatically turn off the server-side plugin features, so you don't need to configure both unless you are encountering issues.
|
|
61
|
+
2. KIP Application: Configuration options are found in **Settings → Options → Display** under the Widget Historical Data section.
|
|
62
|
+
|
|
63
|
+
You can:
|
|
64
|
+
- Disable KIP's automatic Time-Series in favor of a History API provider of your choice (see [History-API Provider](#/help/history-api.md) in the Integrations Help menu for details).
|
|
65
|
+
- Disable access to widget historical chart dialogs (disables two-finger tap, mouse right-click, or two-finger click on trackpads).
|
|
66
|
+
|
|
67
|
+
If you want to completely disable the history feature, under the **Settings → Options → Display** tab in the Widget Historical Data group:
|
|
68
|
+
- Select the "Other: Use a different History API provider and configure data logging manually" option. This stops the plugin's data capture and historical query services.
|
|
69
|
+
- Toggle the "Disable widget historical charts" switch. This disables pointer events that open the chart dialog window.
|
|
70
|
+
|
|
71
|
+
### Using Other History Provider For Greater Flexibility(advanced)
|
|
72
|
+
|
|
73
|
+
KIP's built-in Time-Series feature can be disabled, allowing you to register and use other History API provider-compatible plugin instead.
|
|
74
|
+
You then manually manage data capture and retention in that provider.
|
|
75
|
+
|
|
76
|
+
See [History-API Provider](#/help/history-api.md) for details.
|
|
77
|
+
|
|
78
|
+
## Questions or Issues?
|
|
79
|
+
|
|
80
|
+
- Refer to [History-API Provider](#/help/history-api.md) to learn how to use other History API providers.
|
|
81
|
+
- For general questions or issues, see the Contact-Us help page. The KIP community is active on Discord and GitHub.
|
|
@@ -13,7 +13,7 @@ KIP supports multiple input modes for seamless navigation across devices.
|
|
|
13
13
|
> Note that the words Touch and Tap are synonymous with mouse click.
|
|
14
14
|
|
|
15
15
|
## General Layout
|
|
16
|
-
<img src="
|
|
16
|
+
<img src="assets/help-docs/img/general-layout.png" alt="Sidebar Menus" title="Sidebar Menus" width="100%">
|
|
17
17
|
|
|
18
18
|
1. Actions menu
|
|
19
19
|
2. *Fullscreen toggle button
|
|
@@ -337,7 +337,7 @@
|
|
|
337
337
|
<path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="3" d="M44.999 20.501v6.9987"></path>
|
|
338
338
|
</svg>
|
|
339
339
|
<svg id="battery_charging" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 16 16">
|
|
340
|
-
<path fill="var(--mat-sys-primary)" d="M9.585 2.568a0.5 0.5 0 0 1 0.226 0.58L8.677 6.832h1.99a0.5 0.5 0 0 1 0.364 0.843l-5.334 5.667a0.5 0.5 0 0 1 -0.842 -0.49L5.99 9.167H4a0.5 0.5 0 0 1 -0.364 -0.843l5.333 -5.667a0.5 0.5 0 0 1 0.616 -0.09z"
|
|
340
|
+
<path fill="var(--mat-sys-primary)" stroke-width="1" d="M9.585 2.568a0.5 0.5 0 0 1 0.226 0.58L8.677 6.832h1.99a0.5 0.5 0 0 1 0.364 0.843l-5.334 5.667a0.5 0.5 0 0 1 -0.842 -0.49L5.99 9.167H4a0.5 0.5 0 0 1 -0.364 -0.843l5.333 -5.667a0.5 0.5 0 0 1 0.616 -0.09z" />
|
|
341
341
|
<path d="M2 4h4.332l-0.94 1H2a1 1 0 0 0 -1 1v4a1 1 0 0 0 1 1h2.38l-0.308 1H2a2 2 0 0 1 -2 -2V6a2 2 0 0 1 2 -2" stroke-width="1"></path>
|
|
342
342
|
<path d="M2 6h2.45L2.908 7.639A1.5 1.5 0 0 0 3.313 10H2zm8.595 -2 -0.308 1H12a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1H9.276l-0.942 1H12a2 2 0 0 0 2 -2V6a2 2 0 0 0 -2 -2z" stroke-width="1"></path>
|
|
343
343
|
<path d="M12 10h-1.783l1.542 -1.639q0.146 -0.156 0.241 -0.34zm0 -3.354V6h-0.646a1.5 1.5 0 0 1 0.646 0.646M16 8a1.5 1.5 0 0 1 -1.5 1.5v-3A1.5 1.5 0 0 1 16 8" stroke-width="1"></path>
|
|
@@ -348,6 +348,41 @@
|
|
|
348
348
|
<svg id="power_renewal" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
|
|
349
349
|
<path fill="currentColor" d="M4.06445 13C4.55672 16.9461 7.92051 20 12 20c2.3364 -0.0002 4.4372 -1.0031 5.8994 -2.6006L15.5 15h6v6l-2.1855 -2.1855C17.4894 20.7734 14.8887 21.9998 12 22c-5.18532 0 -9.44843 -3.9467 -9.9502 -9zM12.5 10H16l-4.5 9v-5H8l4.5 -9zM12 2c5.1851 0.00028 9.4485 3.94685 9.9502 9h-2.0147C19.4434 7.05399 16.0793 4.00027 12 4 9.66354 4 7.56264 5.00292 6.10059 6.60059L8.5 9h-6V3l2.18457 2.18457C6.50965 3.22563 9.11128 2 12 2" stroke-width="1"></path>
|
|
350
350
|
</svg>
|
|
351
|
+
<svg id="charger" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
352
|
+
<path fill="currentColor" fill-opacity="0.7" stroke="currentColor" stroke-opacity="0.5" stroke-width="0.2" d="m 18.526522,2.992101 c 0.580439,-0.01321 0.578699,0.00149 0.596108,-0.2465077 0.02012,-0.2470691 0.02494,-1.91517073 0.01988,-1.97978103 0.12148,-0.43521163 1.030866,-0.40307568 1.104701,-0.006281 -0.0061,0.0964339 0.0157,1.83374753 0.01125,1.99193083 0.01054,0.1942281 0.01127,0.1915155 0.236692,0.2282672 0.123095,0.0048 0.663877,0.046959 0.870775,0.071236 0.629908,0.078435 0.546705,0.7198795 0.184123,1.0560261 -0.280622,0.2614474 -0.478291,0.795547 -0.593006,1.6022987 -0.118811,0.8291615 -0.664733,1.3978094 -1.637762,1.7059437 -0.108951,0.033365 -0.182889,0.1266077 -0.184364,0.2325013 l -0.0092,1.3249778 c -6.99e-4,0.058661 -0.01761,0.1164398 -0.04916,0.1680732 -0.08194,0.1419286 -0.272448,0.211959 -0.571527,0.2100915 -0.301128,0 -0.491636,-0.070965 -0.571527,-0.2128928 -0.03157,-0.051631 -0.04849,-0.1094094 -0.0492,-0.1680731 V 7.6449295 C 17.884596,7.5387391 17.811826,7.4442875 17.703031,7.4096269 16.732051,7.0977576 16.189203,6.5263085 16.074488,5.6952795 15.965918,4.8885278 15.772337,4.3534946 15.493743,4.0901798 c -0.362582,-0.3389478 -0.427109,-0.949614 0.2028,-1.0224459 0.206897,-0.024278 0.524028,-0.032992 0.851764,-0.039526 0.236092,-0.013163 0.243529,-0.028409 0.250893,-0.2966214 -0.0019,-0.067609 0.02171,-1.91973584 0.01888,-1.9804634 0.130447,-0.40934157 1.03846,-0.42750873 1.115399,0.0164377 0.0056,0.0751203 -0.01932,1.7128202 -0.0031,1.9752302 0.02251,0.2158291 0.03941,0.2199654 0.596108,0.2493092 z" />
|
|
353
|
+
<path fill="currentColor" fill-opacity="0.7" stroke="currentColor" stroke-opacity="0.5" stroke-width="0.5" d="m 11.506042,7.8057483 c 0.107183,-0.0032 0.191857,-0.086257 0.190184,-0.1865545 C 11.687026,5.8381807 10.641016,5.6953499 8.8986916,5.68952 6.4569849,5.68174 4.6614917,5.709924 3.5122123,5.774052 2.0306237,5.858584 1.837373,6.8846346 1.8343055,8.1759419 c -0.00204,2.6001051 -6.194e-4,5.6507651 0.00427,9.8228741 -0.01077,0.569851 0.2418172,1.058016 0.5448099,1.265464 0.481593,0.32647 0.9904809,0.518667 1.0607401,0.771427 0.1216783,0.387457 0.1123871,0.577471 -0.1448346,0.903967 C 2.9574225,21.008744 2.5101741,20.797525 2.2238768,20.65178 0.61345188,19.829773 0.59403898,18.908625 0.60863288,16.952184 0.58951088,13.116111 0.58583788,10.506564 0.59449588,8.9828056 0.46872958,6.3214882 1.1379898,4.511894 4.183989,4.4914895 c 1.9999912,-0.013603 4.0050948,0.00292 6.015311,0.049553 1.83128,0.043724 2.558271,1.1397318 2.70551,2.7633394 0.02019,0.2208227 0.09035,0.4337311 0.205521,0.6237919 0.147238,0.2487394 0.24642,0.5120534 0.297544,0.7899419 0.03654,0.1905362 -0.118279,0.3656754 -0.322085,0.364365 L 9.1747636,9.0708215 C 8.8570456,9.0696334 8.6200346,8.7923263 8.6839686,8.4965832 l 0.0061,-0.023319 c 0.08615,-0.3642987 0.423096,-0.625504 0.815951,-0.632537 z" />
|
|
354
|
+
<path fill="currentColor" fill-opacity="1" stroke="var(--mat-sys-background)" stroke-opacity="0.5" stroke-width="1.25" d="m 23.341383,21.855011 a 2.148899,1.5884815 0 0 1 -2.148899,1.588482 H 6.8688978 A 2.148899,1.5884815 0 0 1 4.7199987,21.855011 V 12.345479 A 2.148899,1.5884815 0 0 1 6.8688978,10.756996 H 21.192484 a 2.148899,1.5884815 0 0 1 2.148899,1.588483 z" />
|
|
355
|
+
<path fill="var(--mat-sys-primary)" stroke="var(--mat-sys-background)" stroke-opacity="0.8" stroke-width="1.55" stroke-linejoin="round" stroke-linecap="butt" d="m 16.664469,10.746745 a 0.58489405,0.58489405 0 0 1 0.264373,0.678475 l -1.326539,4.309501 h 2.327878 a 0.58489405,0.58489405 0 0 1 0.425802,0.986131 l -6.239649,6.629189 a 0.58489405,0.58489405 0 0 1 -0.984963,-0.573196 l 1.32771,-4.310669 H 10.131203 A 0.58489405,0.58489405 0 0 1 9.7053994,17.480044 L 15.94388,10.850855 a 0.58489405,0.58489405 0 0 1 0.720589,-0.105283 z" />
|
|
356
|
+
</svg>
|
|
357
|
+
<svg id="inverter" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
358
|
+
<g transform="translate(-0.53766295,-0.11764124)">
|
|
359
|
+
<path fill="currentColor" stroke="none" stroke-width="1" d="M 5.2587761,0.79493449 A 1.6175304,1.6175304 0 0 0 3.6412457,2.4124751 H 1.2149499 V 3.22123 a 0.8087703,0.8087703 0 0 1 0,1.6175406 V 5.6475257 H 3.6412457 V 18.587757 H 1.2149499 v 0.808785 a 0.80876527,0.80876527 0 0 1 0,1.61751 v 0.808787 h 2.4262958 a 1.6175304,1.6175304 0 0 0 1.6175304,1.617509 H 19.81655 a 1.6175304,1.6175304 0 0 0 1.61753,-1.617509 h 2.426296 v -0.808787 a 0.80876527,0.80876527 0 0 1 0,-1.61751 V 18.587757 H 21.43408 V 5.6475257 h 2.426296 V 4.8387706 a 0.8087703,0.8087703 0 0 1 0,-1.6175406 V 2.4124751 H 21.43408 A 1.6175304,1.6175304 0 0 0 19.81655,0.79493449 Z" />
|
|
360
|
+
<rect fill="var(--mat-sys-background)" fill-opacity="0.7" width="14.700929" height="4.7658048" x="5.1283541" y="2.9362586" rx="0.22678168" ry="0.14382635" />
|
|
361
|
+
<path fill="var(--mat-sys-background)" fill-opacity="0.5" stroke="none" d="m 21.43408,19.396542 h 1.025175 a 1.6175304,1.6175304 0 0 0 0,1.61751 H 21.43408 Z" />
|
|
362
|
+
<path fill="var(--mat-sys-background)" fill-opacity="0.5" stroke="none" d="m 2.6160708,19.396542 h 1.0251749 v 1.61751 H 2.6160708 a 1.6175304,1.6175304 0 0 0 0,-1.61751 z" />
|
|
363
|
+
<path fill="var(--mat-sys-background)" fill-opacity="0.5" stroke="none" d="m 21.43408,3.22123 h 1.025175 a 1.6175304,1.6175304 0 0 0 0,1.6175406 H 21.43408 Z" />
|
|
364
|
+
<path fill="var(--mat-sys-background)" fill-opacity="0.5" stroke="none" d="M 2.6160708,3.22123 H 3.6412457 V 4.8387706 H 2.6160708 a 1.6175304,1.6175304 0 0 0 0,-1.6175406 z" />
|
|
365
|
+
</g>
|
|
366
|
+
<path fill="var(--mat-sys-primary)" stroke="var(--mat-sys-background)" stroke-opacity="0.8" stroke-width="0.5" stroke-linejoin="round" stroke-linecap="butt" d="m 16.222725,13.289851 c 1.434346,2.625425 0.01816,5.899677 -2.877292,6.652372 l 0.671063,2.291434 -3.478775,-2.821079 c -0.443589,-1.025432 0.349519,-1.629526 1.002288,-1.487952 1.980739,0.62225 4.065616,-1.282791 2.927928,-3.642059 z" />
|
|
367
|
+
<path fill="var(--mat-sys-primary)" stroke="var(--mat-sys-background)" stroke-opacity="0.8" stroke-width="0.5" stroke-linejoin="round" stroke-linecap="butt" d="m 8.1473717,17.739509 c -1.4343461,-2.625425 -0.01816,-5.899677 2.8772923,-6.652372 l -0.671063,-2.2914343 3.478775,2.8210793 c 0.443589,1.025432 -0.349519,1.629526 -1.002288,1.487952 -1.980739,-0.62225 -4.0656163,1.282791 -2.9279283,3.642059 z" />
|
|
368
|
+
</svg>
|
|
369
|
+
<svg id="alternator" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
370
|
+
<path fill="currentColor" d="m 4.1744266,0.22283685 c 0.8577487,0 1.6494163,0.28025712 2.2953397,0.74961596 0.017761,0.01097 0.036306,0.0195893 0.053283,0.0321264 L 21.148396,11.973263 c 0.01071,0.0081 0.01881,0.01802 0.02899,0.02664 1.570015,1.193901 2.586306,3.080217 2.586306,5.200298 0,3.600507 -2.929249,6.529756 -6.529756,6.529756 -2.122693,0 -4.011359,-1.018642 -5.204738,-2.592313 -0.0068,-0.0084 -0.01541,-0.01437 -0.02194,-0.02298 L 1.0385767,6.489574 C 1.0257784,6.4725967 1.0174203,6.4540522 1.0064503,6.4362912 0.53683027,5.7903678 0.25657315,4.998439 0.25657315,4.1406903 c 0,-2.1603044 1.75754905,-3.91785345 3.91785345,-3.91785345 z M 17.233938,21.771031 c 2.520225,0 4.570829,-2.050605 4.570829,-4.570829 0,-2.520225 -2.050604,-4.570829 -4.570829,-4.570829 -2.520224,0 -4.570829,2.050604 -4.570829,4.570829 0,2.520224 2.050605,4.570829 4.570829,4.570829 z m -6.529756,-4.570307 c 0,0 0,-5.22e-4 0,-5.22e-4 0,-3.600508 2.929249,-6.529756 6.529756,-6.529756 2.61e-4,0 5.22e-4,0 5.22e-4,0 L 8.0753027,3.801143 c 0.0094,0.1120506 0.016977,0.2248848 0.016977,0.3395473 0,2.1603044 -1.757549,3.9178535 -3.9178534,3.9178535 -0.1146625,0 -0.2274967,-0.00757 -0.3395473,-0.017239 z M 4.1744266,6.099617 c 1.0802828,0 1.9589267,-0.8786439 1.9589267,-1.9589267 0,-1.0802828 -0.8786439,-1.9589267 -1.9589267,-1.9589267 -1.0802828,0 -1.9589267,0.8786439 -1.9589267,1.9589267 0,1.0802828 0.8786439,1.9589267 1.9589267,1.9589267 z" />
|
|
371
|
+
<path fill="currentColor" d="m 17.233938,14.5883 c 1.440203,0 2.611902,1.171699 2.611902,2.611902 0,1.440203 -1.171699,2.611902 -2.611902,2.611902 -1.440203,0 -2.611902,-1.171699 -2.611902,-2.611902 0,-1.440203 1.171699,-2.611902 2.611902,-2.611902 z m 0,3.917853 c 0.720102,0 1.305951,-0.58585 1.305951,-1.305951 0,-0.720102 -0.585849,-1.305951 -1.305951,-1.305951 -0.720101,0 -1.305951,0.585849 -1.305951,1.305951 0,0.720101 0.58585,1.305951 1.305951,1.305951 z" />
|
|
372
|
+
<circle fill="currentColor" opacity="0.8" cx="-19.808893" cy="14.623878" r="0.51125419" transform="scale(-1,1)" />
|
|
373
|
+
<circle fill="currentColor" opacity="0.8" cx="-17.148212" cy="13.600105" r="0.51125419" transform="scale(-1,1)" />
|
|
374
|
+
<circle fill="currentColor" opacity="0.8" cx="-13.631804" cy="17.14979" r="0.51125419" transform="scale(-1,1)" />
|
|
375
|
+
<circle fill="currentColor" opacity="0.8" cx="-14.605977" cy="19.607031" r="0.51125419" transform="scale(-1,1)" />
|
|
376
|
+
<circle fill="currentColor" opacity="0.8" cx="-17.162188" cy="20.772921" r="0.51125419" transform="scale(-1,1)" />
|
|
377
|
+
<circle fill="currentColor" opacity="0.8" cx="-19.747438" cy="19.743822" r="0.51125419" transform="scale(-1,1)" />
|
|
378
|
+
<circle fill="currentColor" opacity="0.8" id="path3-02" cx="-20.833885" cy="17.123131" r="0.51125419" transform="scale(-1,1)" />
|
|
379
|
+
<path fill="var(--mat-sys-primary)" stroke="var(--mat-sys-background)" stroke-opacity="0.8" stroke-width="1.55" stroke-linejoin="round" stroke-linecap="butt" d="m 15.9823,2.3965923 a 0.88436594,0.88436594 0 0 1 0.399735,1.0258611 l -2.005742,6.5160113 h 3.519777 a 0.88436594,0.88436594 0 0 1 0.643817,1.4910403 L 9.1054724,21.452908 A 0.88436594,0.88436594 0 0 1 7.6161975,20.58623 L 9.6237097,14.068454 H 6.103933 A 0.88436594,0.88436594 0 0 1 5.4601144,12.577413 L 14.892762,2.5540075 A 0.88436594,0.88436594 0 0 1 15.9823,2.3948186 Z" />
|
|
380
|
+
<circle fill="currentColor" fill-opacity="0.5" stroke="var(--mat-sys-background)" stroke-width="1.5" cx="4.1754789" cy="4.0798988" r="2.6573768" />
|
|
381
|
+
</svg>
|
|
382
|
+
<svg id="acMonitor" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
383
|
+
<path fill="currentColor" stroke="currentColor" stroke-width="0.8" d="m 12.254583,10.347123 3.128436,0.134257 h 0.09626 a 0.82580589,0.82580589 0 0 1 0.595289,0.430635 0.81314015,0.81314015 0 0 1 0,0.734612 l -3.921311,7.523447 a 0.60542211,0.60542211 0 0 1 -1.137383,-0.372373 l 0.732079,-4.450739 -3.1335025,-0.144389 h -0.09626 a 0.82580589,0.82580589 0 0 1 -0.5902232,-0.428102 0.8156733,0.8156733 0 0 1 0,-0.734613 L 11.84168,5.5265444 a 0.6104884,0.6104884 0 0 1 1.142449,0.3749058 z M 1.5140397,13.207046 a 1.2057779,1.2057779 0 0 0 1.2083111,-1.205778 9.2890497,9.2890497 0 0 1 9.2789172,-9.2789172 1.2070445,1.2070445 0 0 0 0,-2.41408899 A 11.705672,11.705672 0 0 0 0.30826182,12.001268 1.2057779,1.2057779 0 0 0 1.5140397,13.207046 Z m 2.4571525,3.450146 A 1.2083111,1.2083111 0 1 0 3.535491,18.308804 1.2057779,1.2057779 0 0 0 3.9737254,16.659725 Z M 21.0826,7.9608986 a 1.2083111,1.2083111 0 1 0 -1.04619,-0.602889 1.2007116,1.2007116 0 0 0 1.04619,0.602889 z M 6.17503,22.133855 A 1.2057779,1.2057779 0 1 0 5.7291962,20.484777 1.2133774,1.2133774 0 0 0 6.17503,22.133855 Z M 21.280185,12.001268 a 1.2057779,1.2057779 0 1 0 1.203245,-1.208311 1.2057779,1.2057779 0 0 0 -1.203245,1.208311 z m -0.795408,6.279671 a 1.2057779,1.2057779 0 1 0 -0.443301,-1.646545 v 0 a 1.2032448,1.2032448 0 0 0 0.443301,1.646545 z m -3.832651,1.752938 a 1.2083111,1.2083111 0 1 0 1.649078,0.435701 1.2057779,1.2057779 0 0 0 -1.649078,-0.435701 z m -5.838904,2.454619 a 1.2057779,1.2057779 0 1 0 1.203245,-1.208311 1.2057779,1.2057779 0 0 0 -1.203245,1.208311 z M 16.63946,3.9610596 A 1.2057779,1.2057779 0 1 0 16.196159,2.3145142 1.2032448,1.2032448 0 0 0 16.63946,3.9610596 Z" />
|
|
384
|
+
<path fill="var(--mat-sys-primary)" stroke="var(--mat-sys-background)" stroke-opacity="0.8" stroke-width="1.55" stroke-linejoin="round" stroke-linecap="butt" d="m 16.273919,2.4799121 a 0.88436594,0.88436594 0 0 1 0.399735,1.0258611 l -2.005742,6.5160108 h 3.519777 a 0.88436594,0.88436594 0 0 1 0.643817,1.491041 L 9.3970913,21.536228 A 0.88436594,0.88436594 0 0 1 7.9078168,20.66955 L 9.9153293,14.151774 H 6.3955523 A 0.88436594,0.88436594 0 0 1 5.7517337,12.660733 L 15.184381,2.6373273 a 0.88436594,0.88436594 0 0 1 1.089538,-0.1591889 z" />
|
|
385
|
+
</svg>
|
|
351
386
|
<svg id="solar_charger" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" height="24" width="24">
|
|
352
387
|
<path fill="currentColor" stroke="currentColor" stroke-width="1" d="M7.666666666666667 2a3.8333333333333335 3.8333333333333335 0 0 0 7.666666666666667 0z"></path>
|
|
353
388
|
<path stroke="currentColor" d="M3.8333333333333335 2.875h0.9583333333333334" stroke-width="1.5"></path>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {C,e as e$1}from'./chunk-B6bEhzNR.js';import {g as ge$1}from'./chunk-TakPRI3t.js';import {e9 as a,d1 as Hj,w,du as p,aS as De,bu as ut,aY as xe,$ as $j,v as vt,D as Dt,F as Fa,dn as ge,a_ as Gp,cv as G,cw as z,dx as n$1,J as JD,dC as x,c as $h,cn as wd,_ as _w,B as Bh,e as EE,M as Mw,f as eg,K as Kw,P as Pi,T as TT,u as ul}from'./main-BAV5VDOD.js';import {c,e}from'./chunk-Dxlia2NE.js';var ie=["acSvg"];function re(l,e){l&1&&(Pi(0,"div",3)(1,"div",4),TT(2,"No AC buses detected"),ul(),Pi(3,"div",5),TT(4,"Check Signal K AC paths or select buses in widget settings."),ul()());}var Y=class l{static AC_DESCRIPTOR=a("widget-ac");static SELF_ROOT_PATH=(()=>{let e=l.AC_DESCRIPTOR?.selfRootPath;if(!e)throw new Error("[WidgetAcComponent] Descriptor missing or selfRootPath not set; check widget registration.");return e})();static ROOT_PATTERN=`${l.SELF_ROOT_PATH}.*`;static ROOT_PREFIX=`${l.SELF_ROOT_PATH}.`;static VIEWBOX_WIDTH=200;static CARD_HEIGHT=100;static COMPACT_CARD_HEIGHT=100;static CARD_GAP=8;static PATH_BATCH_WINDOW_MS=500;static RESERVED_AC_AGGREGATE_IDS=new Set(["totalCurrent","totalPower"]);static DEFAULT_CONFIG={color:"contrast",ignoreZones:false,ac:{trackedDevices:[],optionsById:{}}};id=Hj.required();type=Hj.required();theme=Hj.required();renderMode=Hj(null);runtime=w(p);data=w(De);units=w(ut);destroyRef=w(xe);svgRef=$j.required("acSvg");svg;layer;pendingPathUpdates=new Map;pathBatchTimerId=null;initialPathPaintDone=false;renderFrameId=null;pendingRenderSnapshot=null;discoveredBusIds=vt([]);trackedDevices=vt([]);optionsById=vt({});cardMode=vt({displayMode:"full",metrics:["line1Voltage","line1Current","line1Frequency","line2Voltage"]});busesByKey=vt({});visibleBusKeys=Dt(()=>{let e=this.trackedDevices();if(e.length)return e.map(r=>r.key);let i=this.busesByKey(),t=new Set(this.discoveredBusIds());return Object.keys(i).filter(r=>{let s=i[r];return !!s&&t.has(s.id)}).sort((r,s)=>r.localeCompare(s))});visibleBuses=Dt(()=>{let e=this.visibleBusKeys(),i=this.busesByKey();return e.map(t=>i[t]).filter(t=>!!t)});hasBuses=Dt(()=>this.visibleBuses().length>0);activeDisplayMode=Dt(()=>this.renderMode()??this.cardMode().displayMode??"full");isCompactCardMode=Dt(()=>this.activeDisplayMode()==="compact");colorRole=Dt(()=>this.runtime.options()?.color??"contrast");ignoreZones=Dt(()=>this.runtime.options()?.ignoreZones??false);displayLabel=Dt(()=>{let e=this.visibleBuses();return e.length!==1?"AC Buses":this.resolveTitleText(e[0])});labelColor=Dt(()=>{let e=this.theme();return e?c(this.colorRole(),e).dim:"var(--kip-contrast-dim-color)"});widgetColors=Dt(()=>{let e=this.theme();return e?c(this.colorRole(),e):null});displayModels=Dt(()=>{let e$1=this.visibleBuses(),i=this.theme(),t=this.widgetColors(),r=this.ignoreZones(),s=new Map;e$1.forEach(n=>s.set(n.id,(s.get(n.id)??0)+1));let c=new Set([...s.entries()].filter(([,n])=>n>1).map(([n])=>n)),a={};for(let n of e$1){let d=n.deviceKey??n.id,o=!!n.source&&c.has(n.id),h=this.resolveMostSevereState(n.line1VoltageState??null,n.line1CurrentState??null,n.line2VoltageState??null,n.line2CurrentState??null,n.line3VoltageState??null,n.line3CurrentState??null,n.modeState??null),v=this.resolveMostSevereState(n.line1VoltageState??null,n.line1CurrentState??null,n.line1FrequencyState??null),T=this.resolveMostSevereState(n.line2VoltageState??null,n.line2CurrentState??null,n.line3VoltageState??null,n.line3CurrentState??null),[M,I]=this.buildMetricRows(n);a[d]={id:n.id,titleText:this.resolveTitleText(n),modeText:this.isCompactCardMode()?"":this.resolveModeText(n),busText:this.isCompactCardMode()?"":o?n.source??"-":n.associatedBus||n.location||"-",metricsLineOne:M,metricsLineTwo:I,stateBarColor:e(h,t?.dim??"var(--kip-contrast-color)",i,r),titleTextColor:e(h,"var(--kip-contrast-color)",i,r),metaTextColor:e(n.modeState??null,"var(--kip-contrast-dim-color)",i,r),primaryMetricsTextColor:e(v,"var(--kip-contrast-color)",i,r),secondaryMetricsTextColor:e(T,"var(--kip-contrast-color)",i,r)};}return a});constructor(){Fa(()=>{let t=this.runtime.options();t&&ge(()=>this.applyConfig(t));}),Fa(()=>{let t=this.displayModels(),r=this.visibleBuses(),s=this.widgetColors();!this.svg||!s||this.requestRender({buses:r,displayModels:t,widgetColors:s});});let e=[this.data.subscribePathTreeWithInitial(l.ROOT_PATTERN)],i=false;for(let t of e)if(t.initial.length){i=true;for(let r of t.initial)this.enqueuePathUpdate(r,true);}i&&(this.flushPendingPathUpdates(),this.initialPathPaintDone=true);for(let t of e)t.live$.pipe(Gp(this.destroyRef)).subscribe(r=>this.enqueuePathUpdate(r));}ngAfterViewInit(){this.initializeSvg(),this.requestRender();}ngOnDestroy(){this.pathBatchTimerId!==null&&(clearTimeout(this.pathBatchTimerId),this.pathBatchTimerId=null),this.renderFrameId!==null&&(cancelAnimationFrame(this.renderFrameId),this.renderFrameId=null),this.pendingRenderSnapshot=null;}initializeSvg(){this.svg=ge$1(this.svgRef().nativeElement),this.svg.attr("viewBox",`0 0 ${l.VIEWBOX_WIDTH} ${l.CARD_HEIGHT}`).attr("preserveAspectRatio","xMidYMid meet").attr("role","img").attr("aria-label","AC View"),this.layer=this.svg.append("g").attr("class","ac-layer");}applyConfig(e){let i=this.resolveAcConfig(e);this.trackedDevices.set(i.trackedDevices??[]),this.reprojectSnapshotsToDeviceKeys(i.trackedDevices??[]),this.optionsById.set(i.optionsById),this.cardMode.set(this.normalizeCardMode(i.cardMode));}reprojectSnapshotsToDeviceKeys(e){if(!e.length)return;let i=new Map;e.forEach(t=>{let r=i.get(t.id)??[];r.push(t.key),i.set(t.id,r);}),this.busesByKey.update(t=>{let r=t,s=false;return i.forEach((c,a)=>{let n=t[a];if(n){for(let d of c){if(t[d])continue;let o=e.find(h=>h.key===d);s||(r=G({},t),s=true),r[d]=z(G({},n),{source:o?.source??null,deviceKey:d});}s&&r[a]?.deviceKey===void 0&&delete r[a];}}),s?r:t});}resolveAcConfig(e){let i=e.ac;return {trackedDevices:this.normalizeAcTrackedDevices(i?.trackedDevices),optionsById:this.normalizeOptionsById(i?.optionsById),cardMode:this.normalizeCardMode(i?.cardMode)}}normalizeAcTrackedDevices(e){if(!Array.isArray(e))return [];let i=new Map;return e.forEach(t=>{if(!t||typeof t!="object")return;let r=t,s=this.normalizeOptionalString(r.id),c=this.normalizeOptionalString(r.source);if(!s||!c||l.RESERVED_AC_AGGREGATE_IDS.has(s))return;let a=this.normalizeOptionalString(r.key)??`${s}||${c}`;i.set(a,{id:s,source:c,key:a});}),[...i.values()].sort((t,r)=>t.key.localeCompare(r.key))}buildIdToDeviceKeysMap(){let e=new Map;return this.trackedDevices().forEach(i=>{let t=e.get(i.id)??[];t.push(i.key),e.set(i.id,t);}),e}normalizeCardMode(e){let i=e&&typeof e=="object"?e:null,t=this.normalizeStringList(i?.metrics);return {displayMode:i?.displayMode==="compact"?"compact":"full",metrics:t.length?t:["line1Voltage","line1Current","line1Frequency","line2Voltage"]}}normalizeStringList(e){if(!Array.isArray(e))return [];let i=new Set;return e.forEach(t=>{if(typeof t!="string")return;let r=t.trim();r.length>0&&i.add(r);}),[...i].sort((t,r)=>t.localeCompare(r))}normalizeOptionsById(e){if(!e||typeof e!="object")return {};let i={};return Object.entries(e).forEach(([t])=>{let r=this.normalizeOptionalString(t);r&&(i[r]={});}),i}normalizeOptionalString(e){if(typeof e!="string")return null;let i=e.trim();return i.length>0?i:null}enqueuePathUpdate(e,i=false){let t=this.parsePath(e.path);if(!t)return;let r=e.update?.data?.value??null,s=e.update?.state??null;if(this.pendingPathUpdates.set(`${t.id}::${t.key}`,{id:t.id,key:t.key,value:r,state:s}),!i){if(!this.initialPathPaintDone){this.initialPathPaintDone=true,this.flushPendingPathUpdates();return}this.pathBatchTimerId===null&&(this.pathBatchTimerId=setTimeout(()=>{this.pathBatchTimerId=null,this.flushPendingPathUpdates();},l.PATH_BATCH_WINDOW_MS));}}flushPendingPathUpdates(){if(!this.pendingPathUpdates.size)return;let e=Array.from(this.pendingPathUpdates.values());this.pendingPathUpdates.clear(),new Set(e.map(r=>r.id)).forEach(r=>this.trackDiscoveredBus(r));let t=this.buildIdToDeviceKeysMap();this.busesByKey.update(r=>{let s=r,c=false;for(let a of e){let n=t.get(a.id),d=n?.length?n:[a.id];for(let o of d){let h=!!n?.length,v=h?this.trackedDevices().find(Z=>Z.key===o):null,T=s[o]??{id:a.id,source:v?.source??null,deviceKey:h?o:void 0},M=G({},T);this.applyValue(M,a.key,a.value,a.state)&&(c||(s=G({},s),c=true),s[o]=M);}}return c?s:r});}parsePath(e){if(!e.startsWith(l.ROOT_PREFIX))return null;let i=e.slice(l.ROOT_PREFIX.length),t=i.indexOf(".");return t<=0||t===i.length-1?null:{id:i.slice(0,t),key:i.slice(t+1)}}normalizeMetricKey(e){let i=e.match(/^phase\.([^.]+)\.(current|frequency|lineNeutralVoltage|realPower)$/);if(i){let t=this.resolveLineKey(i[1]);if(!t)return null;let r=i[2];return r==="current"?`${t}.current`:r==="frequency"?`${t}.frequency`:r==="lineNeutralVoltage"?`${t}.voltage`:`${t}.realPower`}return e==="total.realPower"?"power":e}resolveLineKey(e){let i=e.trim().toLowerCase();return ["0","1","l1","line1","phase1","a"].includes(i)?"line1":["2","l2","line2","phase2","b"].includes(i)?"line2":["3","l3","line3","phase3","c"].includes(i)?"line3":null}trackDiscoveredBus(e){let i=this.discoveredBusIds();i.includes(e)||this.discoveredBusIds.set([...i,e].sort((t,r)=>t.localeCompare(r)));}applyValue(e,i,t,r){let s=this.normalizeMetricKey(i);if(!s)return false;switch(s){case "name":return this.setValue(e,"name",this.toStringValue(t));case "location":return this.setValue(e,"location",this.toStringValue(t));case "associatedBus":return this.setValue(e,"associatedBus",this.toStringValue(t));case "mode":return this.setMetricValue(e,"mode","modeState",this.toStringValue(t),r);case "voltage":return this.setMetricValue(e,"line1Voltage","line1VoltageState",this.toNumber(t,"V"),r);case "current":return this.setMetricValue(e,"line1Current","line1CurrentState",this.toNumber(t,"A"),r);case "frequency":return this.setMetricValue(e,"line1Frequency","line1FrequencyState",this.toNumber(t,"Hz"),r);case "line1.voltage":return this.setMetricValue(e,"line1Voltage","line1VoltageState",this.toNumber(t,"V"),r);case "line1.current":return this.setMetricValue(e,"line1Current","line1CurrentState",this.toNumber(t,"A"),r);case "line1.frequency":return this.setMetricValue(e,"line1Frequency","line1FrequencyState",this.toNumber(t,"Hz"),r);case "line1.realPower":return this.setMetricValue(e,"power","line1CurrentState",this.toNumber(t,"W"),r);case "line2.voltage":return this.setMetricValue(e,"line2Voltage","line2VoltageState",this.toNumber(t,"V"),r);case "line2.current":return this.setMetricValue(e,"line2Current","line2CurrentState",this.toNumber(t,"A"),r);case "line2.frequency":return this.setMetricValue(e,"line2Frequency","line2FrequencyState",this.toNumber(t,"Hz"),r);case "line2.realPower":return this.setMetricValue(e,"power","line2CurrentState",this.toNumber(t,"W"),r);case "line3.voltage":return this.setMetricValue(e,"line3Voltage","line3VoltageState",this.toNumber(t,"V"),r);case "line3.current":return this.setMetricValue(e,"line3Current","line3CurrentState",this.toNumber(t,"A"),r);case "line3.frequency":return this.setMetricValue(e,"line3Frequency","line3FrequencyState",this.toNumber(t,"Hz"),r);case "line3.realPower":return this.setMetricValue(e,"power","line3CurrentState",this.toNumber(t,"W"),r);case "power":return this.setMetricValue(e,"power","line1CurrentState",this.toNumber(t,"W"),r);default:return false}}setValue(e,i,t){return Object.is(e[i],t)?false:(e[i]=t,true)}setMetricValue(e,i,t,r,s){let c=!Object.is(e[i],r),a=!Object.is(e[t],s);return !c&&!a?false:(e[i]=r,e[t]=s,true)}requestRender(e){let i=this.widgetColors();!this.svg||!i||(this.pendingRenderSnapshot=e??{buses:this.visibleBuses(),displayModels:this.displayModels(),widgetColors:i},this.renderFrameId===null&&(this.renderFrameId=requestAnimationFrame(()=>{this.renderFrameId=null;let t=this.pendingRenderSnapshot;this.pendingRenderSnapshot=null,t&&this.render(t);})));}render(e){if(!this.layer||!this.svg)return;let i=this.isCompactCardMode(),t=i?C:e$1,r=i?l.COMPACT_CARD_HEIGHT:l.CARD_HEIGHT,s=e.buses.map((o,h)=>({key:o.deviceKey??o.id,bus:o,y:h*(r+l.CARD_GAP)})),c=s.length?s[s.length-1].y+r:r;this.svg.attr("viewBox",`0 0 ${l.VIEWBOX_WIDTH} ${c}`);let a=this.layer.selectAll("g.ac-card").data(s,o=>o.key),n=a.enter().append("g").attr("class","ac-card");n.append("rect").attr("class","ac-state-bar"),n.append("text").attr("class","ac-title"),n.append("text").attr("class","ac-id"),n.append("text").attr("class","ac-mode"),n.append("text").attr("class","ac-bus"),n.append("text").attr("class","ac-metrics-1"),n.append("text").attr("class","ac-metrics-2");let d=n.merge(a);d.attr("transform",o=>`translate(0, ${o.y})`),d.select("rect.ac-state-bar").attr("x",1.5).attr("y",1.5).attr("rx",t.stateBarCornerRadius).attr("ry",t.stateBarCornerRadius).attr("width",3).attr("height",r-3).attr("fill",o=>e.displayModels[o.key]?.stateBarColor??e.widgetColors.dim),e.buses.length>1?d.select("text.ac-title").attr("x",t.titleX).attr("y",t.titleY).attr("font-size",t.titleFontSize).attr("fill",o=>e.displayModels[o.key]?.titleTextColor??"var(--kip-contrast-color)").text(o=>e.displayModels[o.key]?.titleText??this.resolveTitleText(o.bus)):d.select("text.ac-title").text(""),d.select("text.ac-id").attr("x",t.idX).attr("y",t.idY).attr("text-anchor","end").attr("font-size",t.idFontSize).attr("fill","var(--kip-contrast-dim-color)").text(o=>o.bus.id),d.select("text.ac-mode").attr("x",t.metaLeftX).attr("y",t.metaY).attr("font-size",t.metaFontSize).attr("opacity",.8).attr("fill",o=>e.displayModels[o.key]?.metaTextColor??"var(--kip-contrast-dim-color)").text(o=>e.displayModels[o.key]?.modeText??""),d.select("text.ac-bus").attr("x",t.metaRightX).attr("y",t.metaY).attr("text-anchor","end").attr("font-size",t.metaFontSize).attr("opacity",.8).attr("fill",o=>e.displayModels[o.key]?.metaTextColor??"var(--kip-contrast-dim-color)").text(o=>e.displayModels[o.key]?.busText??""),d.select("text.ac-metrics-1").attr("x",t.lineOneX).attr("y",t.lineOneY).attr("font-size",t.lineOneFontSize).attr("fill",o=>e.displayModels[o.key]?.primaryMetricsTextColor??"var(--kip-contrast-color)").text(o=>e.displayModels[o.key]?.metricsLineOne??""),d.select("text.ac-metrics-2").attr("x",t.lineTwoX).attr("y",t.lineTwoY).attr("font-size",t.lineTwoFontSize).attr("opacity",.85).attr("fill",o=>e.displayModels[o.key]?.secondaryMetricsTextColor??"var(--kip-contrast-color)").text(o=>e.displayModels[o.key]?.metricsLineTwo??""),a.exit().remove();}displayName(e){return e.name?.trim()||e.id}resolveTitleText(e){return e.name||`AC ${e.id}`}resolveModeText(e){return e.mode?`Mode ${e.mode}`:"Mode -"}buildMetricRows(e){let i=this.cardMode(),t=(i.metrics.length?i.metrics:l.DEFAULT_CONFIG.ac?.cardMode?.metrics??[]).map(c=>this.toMetricLabel(c,e)).filter(c=>!!c);if(!t.length)return ["L1 - - -","L2 - - L3 - -"];let r=t.slice(0,2).join(" "),s=t.slice(2,4).join(" ");return [r||" ",s||" "]}toMetricLabel(e,i){switch(e){case "line1Voltage":return `L1V ${this.formatValue(i.line1Voltage,"V")}`;case "line1Current":return `L1A ${this.formatValue(i.line1Current,"A")}`;case "line1Frequency":return `L1Hz ${this.formatValue(i.line1Frequency,"Hz")}`;case "line2Voltage":return `L2V ${this.formatValue(i.line2Voltage,"V")}`;case "line2Current":return `L2A ${this.formatValue(i.line2Current,"A")}`;case "line2Frequency":return `L2Hz ${this.formatValue(i.line2Frequency,"Hz")}`;case "line3Voltage":return `L3V ${this.formatValue(i.line3Voltage,"V")}`;case "line3Current":return `L3A ${this.formatValue(i.line3Current,"A")}`;case "line3Frequency":return `L3Hz ${this.formatValue(i.line3Frequency,"Hz")}`;default:return null}}formatValue(e,i){return e==null||Number.isNaN(e)?"-":`${e.toFixed(1)} ${i}`}toStringValue(e){return typeof e=="string"?e:null}resolveMostSevereState(...e){return e.some(i=>i===n$1.Alert)?n$1.Alert:e.some(i=>i===n$1.Alarm)?n$1.Alarm:e.some(i=>i===n$1.Warn)?n$1.Warn:e.some(i=>i===n$1.Normal)?n$1.Normal:null}toNumber(e,i){if(e==null||typeof e=="boolean")return null;let t=typeof e=="number"?e:Number(e);if(!Number.isFinite(t))return null;let r=this.units.convertToUnit(i,t);return typeof r=="number"&&Number.isFinite(r)?r:null}static \u0275fac=function(i){return new(i||l)};static \u0275cmp=JD({type:l,selectors:[["widget-ac"]],viewQuery:function(i,t){i&1&&eg(t.svgRef,ie,5),i&2&&Kw();},inputs:{id:[1,"id"],type:[1,"type"],theme:[1,"theme"],renderMode:[1,"renderMode"]},decls:4,vars:3,consts:[["acSvg",""],[3,"text","color"],["aria-hidden","false",1,"ac-svg"],[1,"ac-empty"],[1,"ac-empty-title"],[1,"ac-empty-sub"]],template:function(i,t){i&1&&($h(0,"widget-title",1),wd(),$h(1,"svg",2,0),_w(3,re,5,0,"div",3)),i&2&&(Bh("text",t.displayLabel())("color",t.labelColor()),EE(3),Mw(t.hasBuses()?-1:3));},dependencies:[x],styles:["[_nghost-%COMP%]{display:block;height:100%;width:100%;position:relative;overflow:hidden}.ac-svg[_ngcontent-%COMP%]{display:block;position:absolute;left:0;right:0;top:15%;height:85%;width:100%;overflow:hidden;z-index:20;padding:0 10px 10px}.ac-empty[_ngcontent-%COMP%]{position:absolute;inset:0;margin:10px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;text-align:center;color:var(--mat-sys-on-surface);background:color-mix(in srgb,var(--kip-widget-card-background-color) 92%,transparent)}.ac-empty-title[_ngcontent-%COMP%]{font-size:18px;font-weight:600}.ac-empty-sub[_ngcontent-%COMP%]{font-size:14px;opacity:.8}"]})};export{Y as WidgetAcComponent};
|