Skip to content

Commit 256b526

Browse files
dceejaySteve-Mcl
andauthored
Merge V3 back to master (#730)
* Redo package updates - add npmrc to force node engine check * try later chart.js * add optional class option to ui items (#708) * fix unexpected line break of widget size input popup (#705) * add optional class option to ui items * cleanup * Apply remaining changes for supporting "Class" field (#722) * add optional class option to ui items * Apply changes requested to Class feature PR... -- update readme -- set placeholder to indicate class is optional -- updated built in help of all nodes * update changelog and contributors * bump version * Merge branch 'ddresch-master' into v3 Fix merge manually to close #717 * Update dashboard.appcache * slightly better positioning for 1x1 colour picker to close #724 * Fix form to return false for switch and checkbox on reset to close #725 * Fix form widget not accepting preset time to close #711 * catch button parse error (and switch) to close #726 * re-re-fix dropdown output types.. again to close #723 * bump version for beta release * tidy up before release also address #583 * Ready for release v3 Co-authored-by: Stephen McLaughlin <[email protected]>
1 parent 28bb6e6 commit 256b526

File tree

102 files changed

+322
-91
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+322
-91
lines changed

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
engine-strict=true

CHANGELOG.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11

2-
### 2.30.0: Milestone Release
2+
### 3.0.4: Major Release
33

44
**Enhancements**
55

6-
- Add site option to allow swipe to open/close side menu, instead of moving tabs.
6+
- Set minimum requirement to be Node12 (in line with core)
7+
- Bump libraries to latest including socketIO - this also drops node 8 support, Node10 is also EOL
8+
- Add optional CSS Class field to core widgets
79

8-
**Fixes**
10+
**Fixes**
911

10-
- Fix dropdown to allow use of id property if selecting an object. Issue #707
11-
- Activate deploy button on any change to site options (even a non-change)
12-
- Fix spacer node to be on tab so can be exported as part of the tab (needs Node-RED v2)
13-
- Try to handle disabled groups and tabs more cleanly.
14-
- Disable mouse for swipe actions - only use touch events.
12+
- Fix dropdown string types (again)
13+
- Fix button and switch invalid buffer to not crash NR
14+
- Fix form to correctly send false on reset of checkbox and switch
15+
- Better position for 1x1 colour picker
1516

1617
### 2.29.3: Maintenance Release
1718

@@ -22,7 +23,7 @@
2223
- Adjust CSS for better alignment of icons in ui-list
2324
- Fix color-picker z layer to be behind dropdown if necessary
2425

25-
### 2.29.1: Maintenance Release
26+
### 2.29.1: Maintenance Release
2627

2728
**Fixes**
2829

README.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,26 @@ Each node may parse the `msg.payload` to make it suitable for display. This conv
144144

145145
Any widget can be disabled by passing in a `msg.enabled` property set to `false;`. *Note:* this doesn't stop the widget receiving messages but does stop inputs being active and does re-style the widget.
146146

147+
Most widgets and the ui **group** can have a CSS class or multiple CSS class names. This permits the user to override styles one or more widgets and their inner contents. e.g to colourise a warning toast, add the CSS class `notification-warn` to the **notification** widget and add a **ui-template** (set to "Add to site head section")...
148+
```html
149+
<style>
150+
md-toast.notification-warn {
151+
border-width: 10px;
152+
border-color: darkorange;
153+
}
154+
md-toast.notification-warn > h3 {
155+
background-color: orange;
156+
}
157+
md-toast.notification-warn > div {
158+
background: rgba(245, 173, 66, 0.5);
159+
color: darkorange;
160+
}
161+
</style>
162+
```
163+
Additionally, any widget that has a Class field can be dynamically updated by passing in a `msg.className` string property set to one or more class names.
164+
147165
Most ui widgets can also be configured by using a `msg.ui_control` message - see **[config-fields.md](https://github.com/node-red/node-red-dashboard/blob/master/config-fields.md)**
148-
for futher details.
166+
for further details.
149167

150168
- **Audio out** - a widget that will let you play audio (wav or mp3) or send Text to Speech (TTS) to the client.
151169
- **Button** - the icon can be set using either Material or fa-icons - the colour and background colour may also be set. If the widget is sized to 1 wide the icon has precedence.

angular-chart.js-1.1.1-patched.tgz

484 KB
Binary file not shown.

config-fields.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ node to set msg.ui_control to JSON `{ "min":10, "max":50 }`
1414
| |icon |string | on refresh
1515
| |format |string | not needed
1616
| |tooltip |string | on refresh
17+
| |className |string | (Note 4)
1718
|ui_chart |look |string |"line","bar","horizontalBar","pie","polar-area","radar"
1819
| |legend |boolean |&nbsp;
1920
| |interpolate |string |"linear","step","bezier"
@@ -28,38 +29,48 @@ node to set msg.ui_control to JSON `{ "min":10, "max":50 }`
2829
| |spanGaps |boolean | n/a
2930
| |animation |string | (Note 1), {duration:1000, easing:"easeInOutSine"}
3031
| |options |object | (Note 2), {scales: {yAxes: [{ticks: {fontSize: 20}}]}}
32+
| |className |string | (Note 4)
3133
|ui_colour_picker |format |string | on refresh
3234
| |showPicker |boolean | on refresh
3335
| |showSwatch |boolean | on refresh
3436
| |showValue |boolean | on refresh
3537
| |showAlpha |boolean | on refresh
3638
| |showLightness |boolean | on refresh
39+
| |className |string | (Note 4)
3740
|ui_dropdown |place |string |"placeholder text"
3841
| |options |array |[{"label":"foo","value":"0","type":"str"}]
42+
| |className |string | (Note 4)
3943
|ui_gauge |gtype |string |"gage", "donut", "compass", "wave"
4044
| |min |number |&nbsp;
4145
| |seg1 |number |segment 1 limit
4246
| |seg2 |number |segment 2 limit
4347
| |max |number |&nbsp;
4448
| |colors |array |["blue","#00ff00","#f00"]
4549
| |options |object |(see Note 3 below)
50+
| |className |string | (Note 4)
4651
|ui_numeric |min |number |&nbsp;
4752
| |max |number |&nbsp;
4853
| |step |number |&nbsp;
4954
| |format |string |"{{value}}"
55+
| |className |string | (Note 4)
5056
|ui_slider |min |number |&nbsp;
5157
| |max |number |&nbsp;
5258
| |step |number |&nbsp;
59+
| |className |string | (Note 4)
5360
|ui_switch |onicon |string | all or nothing
5461
| |officon |string | all or nothing
5562
| |oncolor |string | all or nothing
5663
| |offcolor |string | all or nothing
64+
| |className |string | (Note 4)
5765
|ui_template |format |string | the script
5866
| |templateScope |string | "local" or "global"
67+
| |className |string | (Note 4)
5968
|ui_text |format |string |"{{value}}"
6069
| |layout |string | "row-left", "row-right", etc
70+
| |className |string | (Note 4)
6171
|ui_text_input |mode |string | "text", "email", "password", "color"
6272
| |delay |number |&nbsp;
73+
| |className |string | (Note 4)
6374

6475
**Notes**:
6576

@@ -72,6 +83,9 @@ node to set msg.ui_control to JSON `{ "min":10, "max":50 }`
7283
{"options":{"pointer":false,"gaugeWidthScale":1.5}}
7384
{"options":{"pointer":true,"gaugeWidthScale":0.4,"reverse":true}}
7485

86+
4. when a className is specified, it is added to the parent element. E.g for a button, the class is added to the `md-card`
87+
This permits overriding of styles in all sub elements e.g. `md-card.my-button button { color: red }`
88+
7589
Likewise the Wave type gauge can accept [liquidfillgauge config](http://bl.ocks.org/brattonc/5e5ce9beee483220e2f6) options for example:
7690

7791
{options:{circleColor:"#FF7777", textColor:"#FF4444", waveTextColor:"#FFAAAA", waveColor:"#FFDDDD", circleThickness:0.3, textVertPosition:0.2, waveHeight:0.05, waveCount:8}}

dist/css/app.min.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32305,6 +32305,10 @@ reason: https://github.com/angular/material/issues/6214
3230532305
border-width: 0px;
3230632306
}
3230732307

32308+
.color-picker-wrapper .color-picker-input-wrapper {
32309+
display: flex;
32310+
}
32311+
3230832312
color-picker {
3230932313
z-index: 2;
3231032314
}

dist/dashboard.appcache

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
CACHE MANIFEST
2-
# Time: Tue Aug 03 2021 17:48:58 GMT+0100 (British Summer Time)
2+
# Time: Thu Sep 16 2021 11:45:54 GMT+0100 (British Summer Time)
33

44
CACHE:
55
i18n.js
@@ -26,4 +26,4 @@ loading.html
2626
NETWORK:
2727
*
2828

29-
# hash: 936560a0d1d1485a62afc5652a5003895f7563032b45441ca5b3ebbcf9e3dc7a
29+
# hash: f1b244f0828b19c2a33e49b084fec0db1cb548db24b36db833e840bec675d173

dist/js/app.min.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

nodes/locales/de/ui_button.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616
"whenClicked": "Sende beim Klicken:",
1717
"payload": "Payload",
1818
"topic": "Topic",
19-
"emulateClick": "Emuliere einen Klick bei einer eingehenden Nachricht:"
19+
"emulateClick": "Emuliere einen Klick bei einer eingehenden Nachricht:",
20+
"className": "Klasse",
21+
"classNamePlaceholder": "Optionale(r) CSS-Klassenname(n) für das Widget"
2022
}
2123
}
2224
}

nodes/locales/de/ui_chart.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,5 @@
2121
Dazu muss der Name der Eigenschaft in das Feld eingetragen werden, zum Beispiel <code>{{msg.topic}}</code>.</p>
2222
<p>Der Node-Ausgang enthält ein Array des Diagrammstatus, das bei Bedarf gespeichert werden kann.
2323
Wird dieses zum <code>ui_chart</code>-Node gesendet, so werden die gespeicherten Daten erneut angezeigt.</p>
24+
<p>Wenn eine <b>Klasse</b> angegeben ist, wird sie der übergeordneten Karte hinzugefügt. Auf diese Weise können Sie CSS-Stile auf die ui-card und ihre untergeordneten Elemente anwenden. Die Klasse kann zur Laufzeit festgelegt werden, indem eine Zeichenfolgeneigenschaft <code>msg.className</code> festgelegt wird.</p>
2425
</script>

0 commit comments

Comments
 (0)