@ironflock/widget-value 0.0.0-stage → 1.1.34
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/README.md +49 -2
- package/dist/widget-value.js +948 -0
- package/dist/widget-value.js.map +1 -0
- package/package.json +65 -5
- package/src/default-data.json +15 -0
- package/src/definition-schema.d.ts +121 -0
- package/src/definition-schema.json +172 -0
- package/src/widget-value.ts +449 -0
- package/thumbnail.png +0 -0
- package/thumbnail.webp +0 -0
package/README.md
CHANGED
|
@@ -1,3 +1,50 @@
|
|
|
1
|
-
#
|
|
1
|
+
# \<widget-value>
|
|
2
2
|
|
|
3
|
-
This
|
|
3
|
+
This webcomponent follows the [open-wc](https://github.com/open-wc/open-wc) recommendation.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm i @ironflock/widget-value
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```html
|
|
14
|
+
<script type="module">
|
|
15
|
+
import '@ironflock/widget-value/widget-value.js'
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<widget-value-1.1.24></widget-value-1.1.24>
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Expected data format
|
|
22
|
+
|
|
23
|
+
Please take a look at the src/default-data.json to see what data is expected to make the widget show content.
|
|
24
|
+
|
|
25
|
+
The following format represents the available data :
|
|
26
|
+
|
|
27
|
+
```js
|
|
28
|
+
data: {
|
|
29
|
+
settings: {
|
|
30
|
+
title: string,
|
|
31
|
+
subTitle: string,
|
|
32
|
+
minGauge: number,
|
|
33
|
+
maxGauge: number,
|
|
34
|
+
style: {
|
|
35
|
+
needleColor: string,
|
|
36
|
+
sections: number,
|
|
37
|
+
backgroundColor: string[]
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
gaugeValue: Number
|
|
41
|
+
}
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Local Demo
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
npm start
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
To run a local development server that serves the basic demo located in `demo/index.html`
|