@nebularstreams/libmui 2.5.115 → 2.5.117
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/dist/libui.esm.js +1 -1
- package/dist/libui.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/widgets/InputWidget.js +31 -27
package/package.json
CHANGED
|
@@ -69,11 +69,36 @@ const
|
|
|
69
69
|
InputWidget = {
|
|
70
70
|
view: ({attrs, state}) => {
|
|
71
71
|
const reset = (redraw) => {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
72
|
+
// if (state.value !== undefined && state.showInput) delete state.showInput;
|
|
73
|
+
if (state.value && state.showInput) delete state.showInput;
|
|
74
|
+
delete state.value;
|
|
75
|
+
if (redraw) m.redraw();
|
|
76
|
+
},
|
|
77
|
+
inputActions = [
|
|
78
|
+
...(attrs.multi && !attrs.alwaysmulti && (!attrs.type || attrs.type === "text"))
|
|
79
|
+
? [
|
|
80
|
+
m(ButtonNew, {
|
|
81
|
+
icon: state.multi ? "angle-double-up" : "angle-double-down",
|
|
82
|
+
class: "pad-2 transp inputaction",
|
|
83
|
+
onClick: () => {
|
|
84
|
+
state.multi = !state.multi;
|
|
85
|
+
m.redraw();
|
|
86
|
+
}
|
|
87
|
+
})
|
|
88
|
+
]
|
|
89
|
+
: [],
|
|
90
|
+
|
|
91
|
+
...attrs.actions ? attrs.actions.map((action) => m(ButtonNew, {
|
|
92
|
+
...action,
|
|
93
|
+
class: "inputaction transp pad-2"
|
|
94
|
+
})) : [],
|
|
95
|
+
|
|
96
|
+
...attrs.action
|
|
97
|
+
? [
|
|
98
|
+
m(ButtonNew, {...attrs.action, class: "inputaction transp pad-2"})
|
|
99
|
+
] : []
|
|
100
|
+
];
|
|
101
|
+
|
|
77
102
|
return m(
|
|
78
103
|
".textfield.flexcol.relative",
|
|
79
104
|
{
|
|
@@ -215,28 +240,7 @@ const
|
|
|
215
240
|
},
|
|
216
241
|
}),
|
|
217
242
|
|
|
218
|
-
m(".span.actions.absolute.right.bottom", [
|
|
219
|
-
...(attrs.multi && !attrs.alwaysmulti && (!attrs.type || attrs.type === "text"))
|
|
220
|
-
? [
|
|
221
|
-
m(ButtonNew, {
|
|
222
|
-
icon: state.multi ? "angle-double-up" : "angle-double-down",
|
|
223
|
-
class: "pad-2 transp",
|
|
224
|
-
onClick: () => {
|
|
225
|
-
state.multi = !state.multi;
|
|
226
|
-
m.redraw();
|
|
227
|
-
}
|
|
228
|
-
})
|
|
229
|
-
]
|
|
230
|
-
: [],
|
|
231
|
-
...attrs.actions ? attrs.actions.map((action) => m(ButtonNew, {
|
|
232
|
-
...action,
|
|
233
|
-
class: "transp pad-2"
|
|
234
|
-
})) : [],
|
|
235
|
-
...attrs.action
|
|
236
|
-
? [
|
|
237
|
-
m(ButtonNew, {...attrs.action, class: "transp pad-2"})
|
|
238
|
-
] : []
|
|
239
|
-
])
|
|
243
|
+
...inputActions.length ? [m(".span.actions.absolute.right.bottom", inputActions)] : [],
|
|
240
244
|
]);
|
|
241
245
|
},
|
|
242
246
|
oninit: ({attrs, state}) => {
|