@pageboard/html 0.10.14 → 0.11.0
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/card.js +8 -9
- package/elements/fieldsets.js +46 -11
- package/elements/form.js +1 -1
- package/elements/grid.js +4 -3
- package/elements/image.js +4 -2
- package/elements/input-date.js +2 -2
- package/elements/input-property.js +10 -1
- package/elements/inputs.js +6 -5
- package/elements/layout.js +6 -5
- package/elements/media.js +4 -2
- package/elements/menu.js +2 -5
- package/elements/page.js +5 -6
- package/elements/paragraph.js +7 -8
- package/elements/rating.js +1 -1
- package/elements/sitemap.js +5 -4
- package/lib/nouislider.js +31 -31
- package/package.json +2 -2
- package/ui/fieldset-list.js +160 -61
- package/ui/fieldset.js +2 -2
- package/ui/form.js +81 -74
- package/ui/input-file.js +1 -2
- package/ui/input-range.js +8 -6
- package/ui/menu.js +9 -7
- package/ui/pagination.js +3 -2
- package/ui/query-tags.js +4 -3
- package/ui/tab.js +1 -1
package/elements/card.js
CHANGED
|
@@ -18,7 +18,7 @@ exports.cards = {
|
|
|
18
18
|
shape: {
|
|
19
19
|
title: 'Shape',
|
|
20
20
|
anyOf: [{
|
|
21
|
-
|
|
21
|
+
const: null,
|
|
22
22
|
title: 'Default',
|
|
23
23
|
}, {
|
|
24
24
|
const: "square",
|
|
@@ -33,9 +33,8 @@ exports.cards = {
|
|
|
33
33
|
},
|
|
34
34
|
responsive: {
|
|
35
35
|
title: 'Responsive',
|
|
36
|
-
nullable: true,
|
|
37
36
|
anyOf: [{
|
|
38
|
-
title: '
|
|
37
|
+
title: 'No',
|
|
39
38
|
const: null
|
|
40
39
|
}, {
|
|
41
40
|
title: 'Stackable',
|
|
@@ -160,14 +159,14 @@ exports.card_header = {
|
|
|
160
159
|
contents: "inline*",
|
|
161
160
|
html: '<div class="header">Header</div>'
|
|
162
161
|
};
|
|
163
|
-
exports.card_header_nolink =
|
|
162
|
+
exports.card_header_nolink = { ...exports.card_header,
|
|
164
163
|
context: 'cardlink//',
|
|
165
164
|
contents: {
|
|
166
165
|
nodes: "inline*",
|
|
167
166
|
marks: "nolink"
|
|
168
167
|
},
|
|
169
168
|
html: '<div class="header">Header</div>'
|
|
170
|
-
}
|
|
169
|
+
};
|
|
171
170
|
|
|
172
171
|
exports.card_meta = {
|
|
173
172
|
title: 'meta',
|
|
@@ -178,14 +177,14 @@ exports.card_meta = {
|
|
|
178
177
|
contents: "inline*",
|
|
179
178
|
html: '<div class="meta">Meta</div>'
|
|
180
179
|
};
|
|
181
|
-
exports.card_meta_nolink =
|
|
180
|
+
exports.card_meta_nolink = { ...exports.card_meta,
|
|
182
181
|
context: 'cardlink//',
|
|
183
182
|
contents: {
|
|
184
183
|
nodes: "inline*",
|
|
185
184
|
marks: "nolink"
|
|
186
185
|
},
|
|
187
186
|
html: '<div class="meta">Meta</div>'
|
|
188
|
-
}
|
|
187
|
+
};
|
|
189
188
|
|
|
190
189
|
exports.card_description = {
|
|
191
190
|
title: 'description',
|
|
@@ -196,9 +195,9 @@ exports.card_description = {
|
|
|
196
195
|
contents: "paragraph+",
|
|
197
196
|
html: '<div class="description"></div>'
|
|
198
197
|
};
|
|
199
|
-
exports.card_description_nolink =
|
|
198
|
+
exports.card_description_nolink = { ...exports.card_description,
|
|
200
199
|
context: 'cardlink//',
|
|
201
200
|
contents: "paragraph_nolink+",
|
|
202
201
|
html: '<div class="description"></div>'
|
|
203
|
-
}
|
|
202
|
+
};
|
|
204
203
|
|
package/elements/fieldsets.js
CHANGED
|
@@ -42,10 +42,10 @@ exports.fieldset_legend = {
|
|
|
42
42
|
};
|
|
43
43
|
|
|
44
44
|
exports.fieldset_list = {
|
|
45
|
-
title: '
|
|
45
|
+
title: 'Field List',
|
|
46
46
|
menu: "form",
|
|
47
47
|
icon: '<i class="icons"><i class="folder outline icon"></i><i class="corner add icon"></i></i>',
|
|
48
|
-
group:
|
|
48
|
+
group: 'block template',
|
|
49
49
|
context: 'form//',
|
|
50
50
|
priority: 0,
|
|
51
51
|
properties: {
|
|
@@ -54,23 +54,58 @@ exports.fieldset_list = {
|
|
|
54
54
|
type: "integer",
|
|
55
55
|
minimum: 0,
|
|
56
56
|
default: 1
|
|
57
|
-
},
|
|
58
|
-
prefix: {
|
|
59
|
-
title: 'Prefix',
|
|
60
|
-
description: '',
|
|
61
|
-
type: "string",
|
|
62
|
-
format: 'singleline',
|
|
63
|
-
nullable: true
|
|
64
57
|
}
|
|
65
58
|
},
|
|
66
59
|
contents: [{
|
|
67
60
|
id: 'template',
|
|
68
|
-
nodes: 'block+'
|
|
61
|
+
nodes: 'block+',
|
|
62
|
+
expressions: true
|
|
69
63
|
}],
|
|
70
|
-
html: `<element-fieldset-list data-size="[size]"
|
|
64
|
+
html: `<element-fieldset-list data-size="[size]">
|
|
71
65
|
<template block-content="template"></template>
|
|
72
66
|
<div class="view"></div>
|
|
73
67
|
</element-fieldset-list>`,
|
|
74
68
|
scripts: ['../ui/fieldset-list.js'],
|
|
75
69
|
stylesheets: ['../ui/fieldset-list.css']
|
|
76
70
|
};
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
exports.fieldlist_button = {
|
|
74
|
+
title: 'Field List Button',
|
|
75
|
+
menu: "form",
|
|
76
|
+
icon: '<i class="icons"><i class="folder outline icon"></i><i class="corner hand pointer icon"></i></i>',
|
|
77
|
+
group: 'block',
|
|
78
|
+
context: 'fieldset_list//',
|
|
79
|
+
properties: {
|
|
80
|
+
type: {
|
|
81
|
+
title: 'Type',
|
|
82
|
+
default: 'add',
|
|
83
|
+
anyOf: [{
|
|
84
|
+
title: 'Add',
|
|
85
|
+
const: 'add'
|
|
86
|
+
}, {
|
|
87
|
+
title: 'Delete',
|
|
88
|
+
const: 'del'
|
|
89
|
+
}, {
|
|
90
|
+
title: 'Up',
|
|
91
|
+
const: 'up'
|
|
92
|
+
}, {
|
|
93
|
+
title: 'Down',
|
|
94
|
+
const: 'down'
|
|
95
|
+
}]
|
|
96
|
+
},
|
|
97
|
+
full: {
|
|
98
|
+
title: 'Full width',
|
|
99
|
+
type: 'boolean',
|
|
100
|
+
default: false
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
contents: {
|
|
104
|
+
nodes: "inline*",
|
|
105
|
+
marks: "nolink"
|
|
106
|
+
},
|
|
107
|
+
html: '<button type="button" class="ui [full|?:fluid:] button" value="[type]">Label</button>',
|
|
108
|
+
stylesheets: [
|
|
109
|
+
'../lib/components/button.css',
|
|
110
|
+
]
|
|
111
|
+
};
|
package/elements/form.js
CHANGED
package/elements/grid.js
CHANGED
|
@@ -17,8 +17,10 @@ exports.grid = {
|
|
|
17
17
|
},
|
|
18
18
|
responsive: {
|
|
19
19
|
title: 'Responsive',
|
|
20
|
-
nullable: true,
|
|
21
20
|
anyOf: [{
|
|
21
|
+
title: 'No',
|
|
22
|
+
const: null
|
|
23
|
+
}, {
|
|
22
24
|
title: 'Stackable',
|
|
23
25
|
const: 'stackable'
|
|
24
26
|
}, {
|
|
@@ -67,9 +69,8 @@ exports.grid_row = {
|
|
|
67
69
|
properties: {
|
|
68
70
|
responsive: {
|
|
69
71
|
title: 'Responsive',
|
|
70
|
-
nullable: true,
|
|
71
72
|
anyOf: [{
|
|
72
|
-
title: '
|
|
73
|
+
title: 'No',
|
|
73
74
|
const: null
|
|
74
75
|
}, {
|
|
75
76
|
title: 'Stackable',
|
package/elements/image.js
CHANGED
|
@@ -12,8 +12,9 @@ exports.image = {
|
|
|
12
12
|
url: {
|
|
13
13
|
title: 'Address',
|
|
14
14
|
description: 'Local or remote URL',
|
|
15
|
-
nullable: true,
|
|
16
15
|
anyOf: [{
|
|
16
|
+
type: "null"
|
|
17
|
+
}, {
|
|
17
18
|
type: "string",
|
|
18
19
|
format: "uri"
|
|
19
20
|
}, {
|
|
@@ -156,8 +157,9 @@ exports.inlineImage = {
|
|
|
156
157
|
url: {
|
|
157
158
|
title: 'Address',
|
|
158
159
|
description: 'Local or remote URL',
|
|
159
|
-
nullable: true,
|
|
160
160
|
anyOf: [{
|
|
161
|
+
type: "null"
|
|
162
|
+
}, {
|
|
161
163
|
type: "string",
|
|
162
164
|
format: "uri"
|
|
163
165
|
}, {
|
package/elements/input-date.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
exports.input_date_time = {
|
|
2
|
-
title: '
|
|
2
|
+
title: 'Date Time',
|
|
3
3
|
icon: '<i class="calendar outline icon"></i>',
|
|
4
4
|
menu: "form",
|
|
5
5
|
required: ["name"],
|
|
@@ -89,7 +89,7 @@ exports.input_date_time = {
|
|
|
89
89
|
};
|
|
90
90
|
|
|
91
91
|
exports.input_date_slot = {
|
|
92
|
-
title: '
|
|
92
|
+
title: 'Date Slot',
|
|
93
93
|
icon: '<i class="calendar outline icon"></i>',
|
|
94
94
|
menu: "form",
|
|
95
95
|
required: ["nameStart", "nameEnd"],
|
|
@@ -59,16 +59,25 @@ exports.input_property = {
|
|
|
59
59
|
let propKey;
|
|
60
60
|
let required = false;
|
|
61
61
|
let cases = null;
|
|
62
|
+
let discKey = null;
|
|
62
63
|
for (let i = 0; i < list.length; i++) {
|
|
63
64
|
propKey = list[i];
|
|
64
65
|
required = prop.required && prop.required.indexOf(propKey) >= 0;
|
|
65
66
|
if (cases) {
|
|
66
|
-
|
|
67
|
+
if (Array.isArray(cases)) {
|
|
68
|
+
prop = cases.find(obj => obj.properties?.[discKey]?.const == propKey);
|
|
69
|
+
} else {
|
|
70
|
+
prop = cases[propKey];
|
|
71
|
+
}
|
|
67
72
|
name = list.slice(0, i - 1).concat(list.slice(i + 1)).join('.');
|
|
68
73
|
cases = null;
|
|
74
|
+
discKey = null;
|
|
69
75
|
} else {
|
|
70
76
|
if (prop.select && prop.select.$data == `0/${propKey}`) {
|
|
71
77
|
cases = prop.selectCases;
|
|
78
|
+
} else if (prop.discriminator && prop.discriminator.propertyName == propKey) {
|
|
79
|
+
cases = prop.oneOf;
|
|
80
|
+
discKey = propKey;
|
|
72
81
|
}
|
|
73
82
|
prop = (prop.items && prop.items.properties || prop.properties || {})[propKey] || null;
|
|
74
83
|
}
|
package/elements/inputs.js
CHANGED
|
@@ -156,8 +156,8 @@ exports.input_text = {
|
|
|
156
156
|
nodes: 'inline*'
|
|
157
157
|
},
|
|
158
158
|
patterns: {
|
|
159
|
-
tel:
|
|
160
|
-
email:
|
|
159
|
+
tel: /^(\(\d+\))? *\d+([ .-]?\d+)*$/.source,
|
|
160
|
+
email: /^[\w.!#$%&'*+/=?^`{|}~-]+@\w(?:[\w-]{0,61}\w)?(?:\.\w(?:[\w-]{0,61}\w)?)*$/.source
|
|
161
161
|
},
|
|
162
162
|
html: `<div class="[width|num: wide] field [type|eq:hidden:hidden:]">
|
|
163
163
|
<label block-content="label">Label</label>
|
|
@@ -233,7 +233,7 @@ exports.input_range = {
|
|
|
233
233
|
menu: "form",
|
|
234
234
|
group: "block",
|
|
235
235
|
context: 'form//',
|
|
236
|
-
properties:
|
|
236
|
+
properties: {
|
|
237
237
|
multiple: {
|
|
238
238
|
title: 'Multiple',
|
|
239
239
|
type: 'boolean',
|
|
@@ -243,8 +243,9 @@ exports.input_range = {
|
|
|
243
243
|
title: 'Pips',
|
|
244
244
|
type: 'boolean',
|
|
245
245
|
default: true
|
|
246
|
-
}
|
|
247
|
-
|
|
246
|
+
},
|
|
247
|
+
...exports.input_number.properties
|
|
248
|
+
},
|
|
248
249
|
contents: {
|
|
249
250
|
id: 'label',
|
|
250
251
|
nodes: 'inline*'
|
package/elements/layout.js
CHANGED
|
@@ -106,8 +106,9 @@ exports.layout = {
|
|
|
106
106
|
image: {
|
|
107
107
|
title: 'Image',
|
|
108
108
|
description: 'Local or remote URL',
|
|
109
|
-
nullable: true,
|
|
110
109
|
anyOf: [{
|
|
110
|
+
type: "null"
|
|
111
|
+
}, {
|
|
111
112
|
type: "string",
|
|
112
113
|
format: "uri"
|
|
113
114
|
}, {
|
|
@@ -168,7 +169,7 @@ exports.layout = {
|
|
|
168
169
|
size: {
|
|
169
170
|
title: 'Size',
|
|
170
171
|
anyOf: [{
|
|
171
|
-
|
|
172
|
+
const: null,
|
|
172
173
|
title: 'Auto'
|
|
173
174
|
}, {
|
|
174
175
|
const: 'cover',
|
|
@@ -181,7 +182,7 @@ exports.layout = {
|
|
|
181
182
|
position: {
|
|
182
183
|
title: 'Position',
|
|
183
184
|
anyOf: [{
|
|
184
|
-
|
|
185
|
+
const: null,
|
|
185
186
|
title: 'Top Left'
|
|
186
187
|
}, {
|
|
187
188
|
const: 'top center',
|
|
@@ -212,7 +213,7 @@ exports.layout = {
|
|
|
212
213
|
repeat: {
|
|
213
214
|
title: 'Repeat',
|
|
214
215
|
anyOf: [{
|
|
215
|
-
|
|
216
|
+
const: null,
|
|
216
217
|
title: 'Repeat'
|
|
217
218
|
}, {
|
|
218
219
|
const: 'no-repeat',
|
|
@@ -234,7 +235,7 @@ exports.layout = {
|
|
|
234
235
|
attachment: {
|
|
235
236
|
title: 'Attachment',
|
|
236
237
|
anyOf: [{
|
|
237
|
-
|
|
238
|
+
const: null,
|
|
238
239
|
title: 'Local'
|
|
239
240
|
}, {
|
|
240
241
|
const: 'scroll',
|
package/elements/media.js
CHANGED
|
@@ -8,8 +8,9 @@ exports.video = {
|
|
|
8
8
|
url: {
|
|
9
9
|
title: 'Address',
|
|
10
10
|
description: 'Local or remote URL',
|
|
11
|
-
nullable: true,
|
|
12
11
|
anyOf: [{
|
|
12
|
+
type: "null"
|
|
13
|
+
}, {
|
|
13
14
|
type: "string",
|
|
14
15
|
format: "uri"
|
|
15
16
|
}, {
|
|
@@ -88,8 +89,9 @@ exports.audio = {
|
|
|
88
89
|
url: {
|
|
89
90
|
title: 'Address',
|
|
90
91
|
description: 'Local or remote URL',
|
|
91
|
-
nullable: true,
|
|
92
92
|
anyOf: [{
|
|
93
|
+
type: "null"
|
|
94
|
+
}, {
|
|
93
95
|
type: "string",
|
|
94
96
|
format: "uri"
|
|
95
97
|
}, {
|
package/elements/menu.js
CHANGED
|
@@ -9,7 +9,6 @@ exports.menu = {
|
|
|
9
9
|
properties: {
|
|
10
10
|
direction: {
|
|
11
11
|
title: 'Direction',
|
|
12
|
-
nullable: true,
|
|
13
12
|
anyOf: [{
|
|
14
13
|
const: null,
|
|
15
14
|
title: "Horizontal"
|
|
@@ -37,7 +36,6 @@ exports.menu_group = {
|
|
|
37
36
|
properties: {
|
|
38
37
|
position: {
|
|
39
38
|
title: 'Position',
|
|
40
|
-
nullable: true,
|
|
41
39
|
anyOf: [{
|
|
42
40
|
const: null,
|
|
43
41
|
title: "Left"
|
|
@@ -104,14 +102,14 @@ exports.menu_item_link = {
|
|
|
104
102
|
html: '<a class="[labeled|?] item" href="[url|autolink]">Link</a>'
|
|
105
103
|
};
|
|
106
104
|
|
|
107
|
-
exports.menu_item_block =
|
|
105
|
+
exports.menu_item_block = { ...exports.menu_item_link,
|
|
108
106
|
title: 'Block',
|
|
109
107
|
priority: 11,
|
|
110
108
|
contents: {
|
|
111
109
|
nodes: "block+",
|
|
112
110
|
marks: "nolink"
|
|
113
111
|
}
|
|
114
|
-
}
|
|
112
|
+
};
|
|
115
113
|
|
|
116
114
|
exports.menu_item_text = {
|
|
117
115
|
priority: 11,
|
|
@@ -153,7 +151,6 @@ exports.menu_item_dropdown = {
|
|
|
153
151
|
properties: {
|
|
154
152
|
position: {
|
|
155
153
|
title: 'Position',
|
|
156
|
-
nullable: true,
|
|
157
154
|
anyOf: [{
|
|
158
155
|
const: null,
|
|
159
156
|
title: "Left"
|
package/elements/page.js
CHANGED
|
@@ -5,9 +5,10 @@ exports.page.stylesheets = [
|
|
|
5
5
|
'../ui/transition.css'
|
|
6
6
|
];
|
|
7
7
|
|
|
8
|
-
exports.page.scripts =
|
|
8
|
+
exports.page.scripts = [
|
|
9
|
+
...exports.page.scripts,
|
|
9
10
|
'../ui/transition.js'
|
|
10
|
-
]
|
|
11
|
+
];
|
|
11
12
|
|
|
12
13
|
exports.page.properties.transition = {
|
|
13
14
|
title: 'Transition',
|
|
@@ -16,9 +17,8 @@ exports.page.properties.transition = {
|
|
|
16
17
|
properties: {
|
|
17
18
|
close: {
|
|
18
19
|
title: 'Close',
|
|
19
|
-
nullable: true,
|
|
20
20
|
anyOf: [{
|
|
21
|
-
|
|
21
|
+
const: null,
|
|
22
22
|
title: 'None'
|
|
23
23
|
}, {
|
|
24
24
|
const: 'tr-up',
|
|
@@ -39,9 +39,8 @@ exports.page.properties.transition = {
|
|
|
39
39
|
},
|
|
40
40
|
open: {
|
|
41
41
|
title: 'Open',
|
|
42
|
-
nullable: true,
|
|
43
42
|
anyOf: [{
|
|
44
|
-
|
|
43
|
+
const: null,
|
|
45
44
|
title: 'None'
|
|
46
45
|
}, {
|
|
47
46
|
const: 'tr-up',
|
package/elements/paragraph.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
exports.paragraph_nolink =
|
|
1
|
+
exports.paragraph_nolink = { ...exports.paragraph,
|
|
2
2
|
priority: exports.paragraph.priority - 1,
|
|
3
3
|
group: null,
|
|
4
4
|
contents: {
|
|
5
5
|
nodes: "inline*",
|
|
6
6
|
marks: "nolink"
|
|
7
7
|
}
|
|
8
|
-
}
|
|
8
|
+
};
|
|
9
9
|
|
|
10
10
|
exports.segment = {
|
|
11
11
|
title: "Segment",
|
|
@@ -128,7 +128,7 @@ exports.heading = {
|
|
|
128
128
|
id: {
|
|
129
129
|
nullable: true,
|
|
130
130
|
type: 'string',
|
|
131
|
-
pattern:
|
|
131
|
+
pattern: /^[a-z0-9-]*$/.source
|
|
132
132
|
}
|
|
133
133
|
},
|
|
134
134
|
contents: {
|
|
@@ -159,13 +159,12 @@ exports.heading = {
|
|
|
159
159
|
};
|
|
160
160
|
|
|
161
161
|
|
|
162
|
-
exports.heading_nolink =
|
|
162
|
+
exports.heading_nolink = {
|
|
163
|
+
...exports.heading,
|
|
163
164
|
priority: exports.heading.priority - 1,
|
|
164
165
|
group: null,
|
|
165
|
-
contents:
|
|
166
|
-
|
|
167
|
-
})
|
|
168
|
-
});
|
|
166
|
+
contents: { ...exports.heading.contents, marks: "nolink" }
|
|
167
|
+
};
|
|
169
168
|
|
|
170
169
|
exports.divider = {
|
|
171
170
|
title: "Divider",
|
package/elements/rating.js
CHANGED
package/elements/sitemap.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
exports.sitemap = {
|
|
2
|
-
title: "
|
|
2
|
+
title: "Sitemap",
|
|
3
3
|
group: "block",
|
|
4
4
|
icon: '<i class="sitemap icon"></i>',
|
|
5
5
|
menu: 'link',
|
|
@@ -30,12 +30,13 @@ exports.sitemap = {
|
|
|
30
30
|
title: schema.title,
|
|
31
31
|
icon: schema.icon,
|
|
32
32
|
standalone: true,
|
|
33
|
-
properties:
|
|
33
|
+
properties: {
|
|
34
34
|
leaf: {
|
|
35
35
|
type: 'boolean',
|
|
36
36
|
default: Boolean(leaf)
|
|
37
|
-
}
|
|
38
|
-
|
|
37
|
+
},
|
|
38
|
+
...schema.properties
|
|
39
|
+
},
|
|
39
40
|
menu: "link",
|
|
40
41
|
group: 'sitemap_item',
|
|
41
42
|
virtual: true,
|