@pageboard/html 0.16.15 → 0.16.17
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/table.js +33 -8
- package/package.json +2 -2
- package/ui/input-date.js +1 -0
package/elements/table.js
CHANGED
|
@@ -113,7 +113,7 @@ exports.table_row = {
|
|
|
113
113
|
title: "Row",
|
|
114
114
|
menu: 'widget',
|
|
115
115
|
icon: '<b class="icon">row</b>',
|
|
116
|
-
contents: 'table_cell+',
|
|
116
|
+
contents: '(table_cell|table_head_cell)+',
|
|
117
117
|
inplace: true,
|
|
118
118
|
html: '<tr></tr>'
|
|
119
119
|
};
|
|
@@ -125,9 +125,8 @@ exports.table_cell = {
|
|
|
125
125
|
properties: {
|
|
126
126
|
align: {
|
|
127
127
|
title: 'Align',
|
|
128
|
-
default: "",
|
|
129
128
|
anyOf: [{
|
|
130
|
-
const:
|
|
129
|
+
const: null,
|
|
131
130
|
title: "Left",
|
|
132
131
|
icon: '<i class="icon align left"></i>'
|
|
133
132
|
}, {
|
|
@@ -166,16 +165,18 @@ exports.table_cell = {
|
|
|
166
165
|
tag: 'td',
|
|
167
166
|
parse: function(dom) {
|
|
168
167
|
const d = {};
|
|
169
|
-
if (dom.
|
|
170
|
-
else if (dom.
|
|
171
|
-
if (dom.
|
|
168
|
+
if (dom.classList.contains('center')) d.align = 'center';
|
|
169
|
+
else if (dom.classList.contains('right')) d.align = 'right';
|
|
170
|
+
if (dom.classList.contains('selectable')) d.selectable = true;
|
|
171
|
+
if (dom.rowspan) d.rowspan = dom.rowspan;
|
|
172
|
+
if (dom.colspan) d.colspan = dom.colspan;
|
|
172
173
|
return d;
|
|
173
174
|
},
|
|
174
175
|
html: '<td class="[align|post: aligned] [selectable]" rowspan="[rowspan]" colspan="[colspan]"></td>'
|
|
175
176
|
};
|
|
176
177
|
|
|
177
178
|
exports.table_head_cell = {
|
|
178
|
-
title: "Cell",
|
|
179
|
+
title: "Head Cell",
|
|
179
180
|
menu: 'widget',
|
|
180
181
|
icon: '<i class="icons"><b class="icon">head</b><i class="corner add icon"></i></i>',
|
|
181
182
|
properties: {
|
|
@@ -201,12 +202,36 @@ exports.table_head_cell = {
|
|
|
201
202
|
minimum: 1,
|
|
202
203
|
maximum: 1000,
|
|
203
204
|
default: 1
|
|
205
|
+
},
|
|
206
|
+
scope: {
|
|
207
|
+
title: 'Scope',
|
|
208
|
+
anyOf: [{
|
|
209
|
+
const: null,
|
|
210
|
+
title: 'None'
|
|
211
|
+
}, {
|
|
212
|
+
const: 'row',
|
|
213
|
+
title: 'Row'
|
|
214
|
+
}, {
|
|
215
|
+
const: 'col',
|
|
216
|
+
title: 'Column'
|
|
217
|
+
}]
|
|
204
218
|
}
|
|
205
219
|
},
|
|
220
|
+
parse: function (dom) {
|
|
221
|
+
const d = {};
|
|
222
|
+
if (dom.classList.contains('center')) d.align = 'center';
|
|
223
|
+
else if (dom.classList.contains('right')) d.align = 'right';
|
|
224
|
+
if (dom.classList.contains('selectable')) d.selectable = true;
|
|
225
|
+
if (dom.rowspan) d.rowspan = dom.rowspan;
|
|
226
|
+
if (dom.colspan) d.colspan = dom.colspan;
|
|
227
|
+
if (dom.scope) d.scope = dom.scope;
|
|
228
|
+
if (dom.dataset.width) d.width = parseInt(dom.dataset.width) || null;
|
|
229
|
+
return d;
|
|
230
|
+
},
|
|
206
231
|
contents: "block+",
|
|
207
232
|
tag: 'th',
|
|
208
233
|
inplace: true,
|
|
209
|
-
html: '<th class="[align|post: aligned] [width|as:colnums|post: wide]" rowspan="[rowspan]" colspan="[colspan]"></th>',
|
|
234
|
+
html: '<th class="[align|post: aligned] [width|as:colnums|post: wide]" data-width="[width]" rowspan="[rowspan]" colspan="[colspan]" scope="[scope]"></th>',
|
|
210
235
|
stylesheets: [
|
|
211
236
|
"../ui/table.css"
|
|
212
237
|
]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pageboard/html",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.17",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"repository": {
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"homepage": "https://github.com/pageboard/client#readme",
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"nouislider": "^15.8.1",
|
|
18
|
-
"postinstall": "^0.11.
|
|
18
|
+
"postinstall": "^0.11.1"
|
|
19
19
|
},
|
|
20
20
|
"postinstall": {
|
|
21
21
|
"nouislider/dist/nouislider.js": "link lib/",
|
package/ui/input-date.js
CHANGED