@nebularstreams/libmui 2.5.49 → 2.5.51

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.49",
4
+ "version": "2.5.51",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
7
7
  "scripts": {
package/src/index.js CHANGED
@@ -31,7 +31,6 @@ import tainter from "./util/tainter"
31
31
  import MainState, {implement} from "./app/MainState";
32
32
 
33
33
  import {
34
- VideoUploadButton,
35
34
  FileSelectButton,
36
35
  ImageDataButton,
37
36
  ImageSelectButton,
@@ -46,8 +45,6 @@ import {
46
45
 
47
46
  import "./style.js"
48
47
 
49
- const MainStateImplement = implement;
50
-
51
48
  export {
52
49
  Button,
53
50
  ButtonChoiceWidget,
@@ -82,7 +79,6 @@ export {
82
79
  ImageSelectButton,
83
80
  ImageProcessButton,
84
81
  MediaSelectButton,
85
- VideoUploadButton,
86
82
 
87
83
  // TemplatedInputWidhet
88
84
  TemplatedInputWidget,
@@ -120,30 +120,6 @@ const
120
120
  })
121
121
  ),
122
122
 
123
- VideoUploadButton = defineWidget(
124
- ({attrs}) => m(FileSelectButton, {
125
- class: attrs.class,
126
- accept: attrs.accept || ".mp4,.webm",
127
- icon: attrs.icon || "video",
128
- iconClass: attrs.iconClass,
129
- textClass: attrs.textClass,
130
- text: attrs.text,
131
-
132
- onFile: (file) => {
133
- if (file) {
134
- attrs.entity.saveBlob(file.name, file, "video", undefined, false)
135
- .then(() => {
136
- if (attrs.onVideo) {
137
- attrs.onVideo(attrs.path);
138
- } else {
139
- m.redraw();
140
- }
141
- })
142
- .catch((e) => Notification.add(e.message));
143
- }
144
- }
145
- })
146
- ),
147
123
 
148
124
  ImageProcessButton = defineWidget(
149
125
  ({attrs}) => m(ImageSelectButton, {
@@ -185,7 +161,6 @@ const
185
161
  );
186
162
 
187
163
  export {
188
- VideoUploadButton,
189
164
  FileSelectButton,
190
165
  ImageDataButton,
191
166
  ImageSelectButton,
@@ -437,9 +437,13 @@ const
437
437
  })
438
438
  ]
439
439
  : isText
440
- ? [
441
- m(".innertext", {class: metaDef.class, title: metaDef.hint}, rawValue)
442
- ]
440
+ ? metaDef.icon
441
+ ? [
442
+ m(Icon, {icon: metaDef.icon, class: metaDef.iconClass}),
443
+ m(".innertext", {class: metaDef.class, title: metaDef.hint}, rawValue)
444
+ ] : [
445
+ m(".innertext", {class: metaDef.class, title: metaDef.hint}, rawValue)
446
+ ]
443
447
  : isWidget
444
448
  ? [
445
449
  m(
@@ -927,7 +931,7 @@ const
927
931
  {
928
932
  busy, parameters, auxParameters, cardid, size, index,
929
933
  titleWidget, parametersTitle, parametersBody, rootUpdate, global, layer,
930
- tableChildren, cols, onLayerReset, onAction, nofold, bodyClass,
934
+ tableChildren, cols, onLayerReset, onAction, nofold, bodyClass, titleAction,
931
935
  AssetButton
932
936
  } = attrs;
933
937
 
@@ -958,6 +962,7 @@ const
958
962
  clone: true,
959
963
  global, layer,
960
964
  AssetButton,
965
+ action: titleAction,
961
966
  onAction,
962
967
  onchange: (realtime, targetParameters, metaKey, wasDeleted, metaDef) => {
963
968