@nebularstreams/libmui 2.5.110 → 2.5.112

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nebularstreams/libmui",
3
3
  "description": "Micro UI based on Mithril",
4
- "version": "2.5.110",
4
+ "version": "2.5.112",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
7
7
  "scripts": {
@@ -197,7 +197,7 @@ const
197
197
  }
198
198
  },
199
199
  onbeforeinput: (e) => {
200
- if (attrs.subtype === "number" && e.data && !/^[0-9.]$/.test(e.data)) {
200
+ if (attrs.subtype === "number" && e.data && !/^[0-9.\-]$/.test(e.data)) {
201
201
  e.preventDefault(); // nothing but 0-9 or “.” gets through
202
202
  }
203
203
  },
@@ -435,7 +435,11 @@ const
435
435
  m(ButtonNew, {
436
436
  ...metaDef.addAction,
437
437
  onClick: (e) => {
438
- metaDef.addAction.onClick(e, parameters, auxParameters);
438
+ if (metaDef.addAction.onClick) {
439
+ metaDef.addAction.onClick(e, parameters, auxParameters);
440
+ } else if (metaDef.addAction.template) {
441
+ rawValue.push(clone(metaDef.addAction.template));
442
+ }
439
443
  m.redraw();
440
444
  }
441
445
  })