@pageboard/html 0.14.20 → 0.14.22
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/elements/input-property.js +11 -12
- package/package.json +1 -1
- package/ui/layout.css +1 -2
|
@@ -38,7 +38,6 @@ exports.input_property = {
|
|
|
38
38
|
},
|
|
39
39
|
html: '<div><code>select property name</code></div>',
|
|
40
40
|
fuse: function(node, d, scope) {
|
|
41
|
-
const view = scope.$view;
|
|
42
41
|
const doc = scope.$doc;
|
|
43
42
|
const dateFormats = ["date", "time", "date-time"];
|
|
44
43
|
let name = d.name;
|
|
@@ -151,7 +150,7 @@ exports.input_property = {
|
|
|
151
150
|
node.appendChild(content);
|
|
152
151
|
content = content.lastElementChild;
|
|
153
152
|
for (const item of listOf) {
|
|
154
|
-
content.appendChild(
|
|
153
|
+
content.appendChild(scope.render({
|
|
155
154
|
type: multiple ? 'input_checkbox' : 'input_radio',
|
|
156
155
|
id,
|
|
157
156
|
data: {
|
|
@@ -167,7 +166,7 @@ exports.input_property = {
|
|
|
167
166
|
} else {
|
|
168
167
|
const frag = doc.createDocumentFragment();
|
|
169
168
|
for (const item of listOf) {
|
|
170
|
-
frag.appendChild(
|
|
169
|
+
frag.appendChild(scope.render({
|
|
171
170
|
type: 'input_select_option',
|
|
172
171
|
data: {
|
|
173
172
|
value: item.type == "null" ? null : item.const
|
|
@@ -177,7 +176,7 @@ exports.input_property = {
|
|
|
177
176
|
}
|
|
178
177
|
}));
|
|
179
178
|
}
|
|
180
|
-
node.appendChild(
|
|
179
|
+
node.appendChild(scope.render({
|
|
181
180
|
id,
|
|
182
181
|
type: 'input_select',
|
|
183
182
|
data: {
|
|
@@ -196,7 +195,7 @@ exports.input_property = {
|
|
|
196
195
|
const step = propType.multipleOf || (propType.type == "integer" ? 1 : 0.001);
|
|
197
196
|
if (propType.minimum != null && propType.maximum != null) {
|
|
198
197
|
if (propType.maximum - propType.minimum <= d.range) {
|
|
199
|
-
return node.appendChild(
|
|
198
|
+
return node.appendChild(scope.render({
|
|
200
199
|
id,
|
|
201
200
|
type: 'input_range',
|
|
202
201
|
data: {
|
|
@@ -215,7 +214,7 @@ exports.input_property = {
|
|
|
215
214
|
}));
|
|
216
215
|
}
|
|
217
216
|
}
|
|
218
|
-
node.appendChild(
|
|
217
|
+
node.appendChild(scope.render({
|
|
219
218
|
id,
|
|
220
219
|
type: 'input_number',
|
|
221
220
|
data: {
|
|
@@ -232,7 +231,7 @@ exports.input_property = {
|
|
|
232
231
|
}
|
|
233
232
|
}));
|
|
234
233
|
} else if (propType.type == "boolean") {
|
|
235
|
-
node.appendChild(
|
|
234
|
+
node.appendChild(scope.render({
|
|
236
235
|
id,
|
|
237
236
|
type: 'input_checkbox',
|
|
238
237
|
data: {
|
|
@@ -246,7 +245,7 @@ exports.input_property = {
|
|
|
246
245
|
}
|
|
247
246
|
}));
|
|
248
247
|
} else if (propType.type == "object" && Object.keys(propType.properties).sort().join(' ') == "end start" && dateFormats.includes(propType.properties.start.format) && dateFormats.includes(propType.properties.end.format)) {
|
|
249
|
-
node.appendChild(
|
|
248
|
+
node.appendChild(scope.render({
|
|
250
249
|
id,
|
|
251
250
|
type: 'input_date_slot',
|
|
252
251
|
data: {
|
|
@@ -262,7 +261,7 @@ exports.input_property = {
|
|
|
262
261
|
}
|
|
263
262
|
}));
|
|
264
263
|
} else if (propType.type == "string" && dateFormats.includes(propType.format)) {
|
|
265
|
-
if (d.multiple) node.appendChild(
|
|
264
|
+
if (d.multiple) node.appendChild(scope.render({
|
|
266
265
|
id,
|
|
267
266
|
type: 'input_date_slot',
|
|
268
267
|
data: {
|
|
@@ -278,7 +277,7 @@ exports.input_property = {
|
|
|
278
277
|
label: prop.title
|
|
279
278
|
}
|
|
280
279
|
}));
|
|
281
|
-
else node.appendChild(
|
|
280
|
+
else node.appendChild(scope.render({
|
|
282
281
|
id,
|
|
283
282
|
type: 'input_date_time',
|
|
284
283
|
data: {
|
|
@@ -305,7 +304,7 @@ exports.input_property = {
|
|
|
305
304
|
else return "*/*";
|
|
306
305
|
});
|
|
307
306
|
}
|
|
308
|
-
node.appendChild(
|
|
307
|
+
node.appendChild(scope.render({
|
|
309
308
|
id,
|
|
310
309
|
type: 'input_file',
|
|
311
310
|
data: {
|
|
@@ -320,7 +319,7 @@ exports.input_property = {
|
|
|
320
319
|
}));
|
|
321
320
|
} else {
|
|
322
321
|
const type = (propType.format || propType.pattern) ? 'text' : 'textarea';
|
|
323
|
-
node.appendChild(
|
|
322
|
+
node.appendChild(scope.render({
|
|
324
323
|
id,
|
|
325
324
|
type: 'input_text',
|
|
326
325
|
data: {
|
package/package.json
CHANGED