@pageboard/html 0.14.9 → 0.14.10

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.
@@ -48,11 +48,23 @@ exports.fieldset_list = {
48
48
  context: 'form//',
49
49
  priority: 0,
50
50
  properties: {
51
- size: {
52
- title: 'Minimum size',
51
+ min: {
52
+ title: 'Min items',
53
53
  type: "integer",
54
54
  minimum: 0,
55
55
  default: 1
56
+ },
57
+ max: {
58
+ title: 'Max items',
59
+ type: "integer",
60
+ minimum: 1,
61
+ default: 100
62
+ },
63
+ at: {
64
+ title: 'Repeat selector',
65
+ description: 'css selector',
66
+ type: "string",
67
+ format: 'singleline'
56
68
  }
57
69
  },
58
70
  contents: [{
@@ -60,7 +72,7 @@ exports.fieldset_list = {
60
72
  nodes: 'block+',
61
73
  expressions: true
62
74
  }],
63
- html: `<element-fieldset-list data-size="[size]">
75
+ html: `<element-fieldset-list data-max="[max]" data-min="[min]" data-at="[at]">
64
76
  <template block-content="template"></template>
65
77
  <div class="view"></div>
66
78
  </element-fieldset-list>`,
@@ -97,13 +109,37 @@ exports.fieldlist_button = {
97
109
  title: 'Full width',
98
110
  type: 'boolean',
99
111
  default: false
112
+ },
113
+ icon: {
114
+ title: 'Icon',
115
+ type: 'boolean',
116
+ default: false
117
+ },
118
+ compact: {
119
+ title: 'Compact',
120
+ type: 'boolean',
121
+ default: false
122
+ },
123
+ float: {
124
+ title: 'Float',
125
+ anyOf: [{
126
+ type: 'null',
127
+ title: 'No'
128
+ }, {
129
+ const: 'left',
130
+ title: 'Left'
131
+ }, {
132
+ const: 'right',
133
+ title: 'Right'
134
+ }],
135
+ default: null
100
136
  }
101
137
  },
102
138
  contents: {
103
139
  nodes: "inline*",
104
140
  marks: "nolink"
105
141
  },
106
- html: '<button type="button" class="ui [full|alt:fluid:] button" value="[type]">Label</button>',
142
+ html: '<button type="button" class="ui [full|alt:fluid:] [icon] [compact] [float|post:%20floated] button" value="[type]">Label</button>',
107
143
  stylesheets: [
108
144
  '../lib/components/button.css',
109
145
  ]
package/elements/form.js CHANGED
@@ -60,10 +60,9 @@ exports.query_form = {
60
60
  '../ui/form.css'
61
61
  ],
62
62
  scripts: [ // for asynchronous submits and automatic triggers
63
- '../lib/formdata.js',
64
63
  '../ui/form.js'
65
64
  ],
66
- polyfills: ['fetch'] // unfortunately there is no formdata polyfill available right now
65
+ polyfills: ['fetch']
67
66
  };
68
67
 
69
68
  exports.api_form = {
@@ -191,9 +190,8 @@ exports.api_form = {
191
190
  '../ui/form.css'
192
191
  ],
193
192
  scripts: [ // for asynchronous submits and automatic triggers
194
- '../lib/formdata.js',
195
193
  '../ui/form.js'
196
194
  ],
197
- polyfills: ['fetch'] // unfortunately there is no formdata polyfill available right now
195
+ polyfills: ['fetch']
198
196
  };
199
197
 
package/elements/grid.js CHANGED
@@ -43,7 +43,7 @@ exports.grid = {
43
43
  maximum: 16
44
44
  }
45
45
  },
46
- html: '<div class="ui [responsive] [width|eq:min|alt::equal width] [columns|as:colnums|post: columns] grid [width|switch:contained:container]"></div>',
46
+ html: '<div class="ui [responsive] [width|neq:min|alt:equal width] [columns|as:colnums|post: columns] grid [width|switch:contained:container]"></div>',
47
47
  stylesheets: [
48
48
  '../lib/components/grid.css'
49
49
  ]
package/elements/image.js CHANGED
@@ -11,7 +11,6 @@ exports.image = {
11
11
  },
12
12
  url: {
13
13
  title: 'Address',
14
- description: 'Local or remote URL',
15
14
  anyOf: [{
16
15
  type: "null"
17
16
  }, {
@@ -141,7 +140,6 @@ exports.image = {
141
140
  '../ui/image.css'
142
141
  ],
143
142
  scripts: [
144
- '../lib/object-fit-images.js',
145
143
  '../ui/image.js'
146
144
  ]
147
145
  };
@@ -153,7 +151,6 @@ exports.inlineImage = {
153
151
  properties: {
154
152
  url: {
155
153
  title: 'Address',
156
- description: 'Local or remote URL',
157
154
  anyOf: [{
158
155
  type: "null"
159
156
  }, {
@@ -19,12 +19,6 @@ exports.input_date_time = {
19
19
  type: "string",
20
20
  format: "singleline"
21
21
  },
22
- placeholder: {
23
- title: "Placeholder",
24
- nullable: true,
25
- type: "string",
26
- format: "singleline"
27
- },
28
22
  required: {
29
23
  title: 'Required',
30
24
  type: 'boolean',
@@ -83,7 +77,7 @@ exports.input_date_time = {
83
77
  html: `<div class="field">
84
78
  <label block-content="label">Label</label>
85
79
  <input is="element-input-date"
86
- name="[name]" disabled="[disabled]" placeholder="[placeholder]"
80
+ name="[name]" disabled="[disabled]"
87
81
  required="[required]" value="[value]" step="[step]"
88
82
  type="[format|switch:datetime:datetime-local]"
89
83
  />
@@ -13,12 +13,6 @@ exports.input_file = {
13
13
  format: "singleline",
14
14
  $helper: 'element-property'
15
15
  },
16
- placeholder: {
17
- title: "Placeholder",
18
- nullable: true,
19
- type: "string",
20
- format: "singleline"
21
- },
22
16
  required: {
23
17
  title: 'Required',
24
18
  type: 'boolean',
@@ -59,7 +53,7 @@ exports.input_file = {
59
53
  <label block-content="label">Label</label>
60
54
  <div class="ui basic label"></div>
61
55
  <input is="element-input-file" type="file" id="[$id]" required="[required]"
62
- disabled="[disabled]" accept="[limits.types|join:,]" name="[name]" placeholder="[placeholder]" />
56
+ disabled="[disabled]" accept="[limits.types|join:,]" name="[name]" />
63
57
  </div>`,
64
58
  stylesheets: [
65
59
  '../lib/components/input.css',
@@ -183,7 +183,6 @@ exports.input_property = {
183
183
  data: {
184
184
  name: name,
185
185
  multiple: multiple,
186
- placeholder: prop.description,
187
186
  disabled: d.disabled,
188
187
  required: required
189
188
  },
@@ -312,7 +311,6 @@ exports.input_property = {
312
311
  data: {
313
312
  name: name,
314
313
  disabled: d.disabled,
315
- placeholder: propType.description,
316
314
  required: required,
317
315
  limits: limits
318
316
  },
@@ -328,8 +326,7 @@ exports.input_property = {
328
326
  data: {
329
327
  name, type, required,
330
328
  disabled: d.disabled,
331
- default: propType.default,
332
- placeholder: propType.description
329
+ default: propType.default
333
330
  },
334
331
  content: {
335
332
  label: prop.title
@@ -44,14 +44,39 @@ exports.input_button = {
44
44
  default: false
45
45
  },
46
46
  full: {
47
- title: 'Full width',
47
+ title: 'Fluid',
48
+ type: 'boolean',
49
+ default: false
50
+ },
51
+ icon: {
52
+ title: 'Icon',
53
+ type: 'boolean',
54
+ default: false
55
+ },
56
+ compact: {
57
+ title: 'Compact',
48
58
  type: 'boolean',
49
59
  default: false
60
+ },
61
+ float: {
62
+ title: 'Float',
63
+ anyOf: [{
64
+ type: 'null',
65
+ title: 'No'
66
+ }, {
67
+ const: 'left',
68
+ title: 'Left'
69
+ }, {
70
+ const: 'right',
71
+ title: 'Right'
72
+ }],
73
+ default: null
50
74
  }
51
75
  },
52
- html: '<button type="[type]" disabled="[disabled]" class="ui [full|alt:fluid:] button" name="[name]" value="[value]">[type|schema:title]</button>',
76
+ html: '<button type="[type]" disabled="[disabled]" class="ui [full|alt:fluid:] [icon] [compact] [float|post:%20floated] button" name="[name]" value="[value]">[type|schema:title]</button>',
53
77
  stylesheets: [
54
78
  '../lib/components/button.css',
79
+ '../ui/button.css'
55
80
  ]
56
81
  };
57
82
 
@@ -113,12 +138,6 @@ exports.input_text = {
113
138
  type: "string",
114
139
  format: "singleline"
115
140
  },
116
- placeholder: {
117
- title: "Placeholder",
118
- nullable: true,
119
- type: "string",
120
- format: "singleline"
121
- },
122
141
  required: {
123
142
  title: 'Required',
124
143
  type: 'boolean',
@@ -180,7 +199,7 @@ exports.input_text = {
180
199
  tel: /^(\(\d+\))? *\d+([ .-]?\d+)*$/.source,
181
200
  email: /^[\w.!#$%&'*+/=?^`{|}~-]+@\w(?:[\w-]{0,61}\w)?(?:\.\w(?:[\w-]{0,61}\w)?)*$/.source
182
201
  },
183
- html: `<div class="[width|as:colnums|post: wide] field [type|eq:hidden]">
202
+ html: `<div class="[width|as:colnums|post: wide] field [type|if:eq:hidden]">
184
203
  <label block-content="label">Label</label>
185
204
  [type|eq:textarea|prune:*:1]<textarea
186
205
  is="element-textarea"
@@ -188,17 +207,15 @@ exports.input_text = {
188
207
  required="[required]"
189
208
  readonly="[readonly]"
190
209
  disabled="[disabled]"
191
- placeholder="[placeholder]"
192
210
  >[value|as:text]</textarea>
193
211
  [type|neq:textarea|prune:*:1]<input name="[name]"
194
212
  required="[required]"
195
213
  readonly="[readonly]"
196
214
  disabled="[disabled]"
197
- placeholder="[placeholder]"
198
215
  type="[type|switch:new-password:password]"
199
216
  pattern="[$element.patterns.[type]]"
200
217
  value="[value]"
201
- autocomplete="[type|eq:new-password|fail:]" />
218
+ autocomplete="[type|if:eq:new-password]" />
202
219
  </div>`,
203
220
  scripts: ['../ui/textarea.js'],
204
221
  stylesheets: ['../ui/textarea.css']
@@ -242,7 +259,6 @@ exports.input_number = {
242
259
  required="[required]"
243
260
  readonly="[readonly]"
244
261
  disabled="[disabled]"
245
- placeholder="[placeholder]"
246
262
  type="number"
247
263
  value="[value]"
248
264
  min="[minimum]"
@@ -429,12 +445,6 @@ exports.input_select = {
429
445
  format: "singleline",
430
446
  $helper: 'element-property'
431
447
  },
432
- placeholder: {
433
- title: "Placeholder",
434
- nullable: true,
435
- type: "string",
436
- format: "singleline"
437
- },
438
448
  disabled: {
439
449
  title: 'Disabled',
440
450
  type: 'boolean',
@@ -469,10 +479,11 @@ exports.input_select = {
469
479
  html: `<div class="field">
470
480
  <label block-content="label">Label</label>
471
481
  <element-select class="ui selection dropdown [multiple]"
472
- data-name="[name]" data-disabled="[disabled]" data-required="[required]"
473
- data-multiple="[multiple]" data-placeholder="[placeholder]"
474
- data-value="[value]"
482
+ name="[name]" disabled="[disabled]" required="[required]"
483
+ multiple="[multiple]"
484
+ value="[value]"
475
485
  >
486
+ <i class="dropdown icon"></i><div class="text"></div><select></select>
476
487
  <div class="menu" block-content="options"></div>
477
488
  </element-select>
478
489
  </div>`,
@@ -116,7 +116,8 @@ exports.layout = {
116
116
  nullable: true,
117
117
  properties: {
118
118
  inline: {
119
- title: 'Inline (em)',
119
+ title: 'Inline',
120
+ description: 'Units: em',
120
121
  type: 'number',
121
122
  default: 0,
122
123
  multipleOf: 0.01,
@@ -126,7 +127,8 @@ exports.layout = {
126
127
  const: 'em'
127
128
  },
128
129
  block: {
129
- title: 'Block (rem)',
130
+ title: 'Block',
131
+ description: 'Units: rem',
130
132
  type: 'number',
131
133
  default: 0,
132
134
  multipleOf: 0.01,
@@ -143,7 +145,8 @@ exports.layout = {
143
145
  nullable: true,
144
146
  properties: {
145
147
  inline: {
146
- title: 'Inline (em)',
148
+ title: 'Inline',
149
+ description: 'Units: em',
147
150
  type: 'number',
148
151
  default: 0,
149
152
  minimum: 0,
@@ -154,7 +157,8 @@ exports.layout = {
154
157
  const: 'em'
155
158
  },
156
159
  block: {
157
- title: 'Block (rem)',
160
+ title: 'Block',
161
+ description: 'Units: rem',
158
162
  type: 'number',
159
163
  default: 0,
160
164
  minimum: 0,
@@ -172,8 +176,7 @@ exports.layout = {
172
176
  nullable: true,
173
177
  properties: {
174
178
  invert: {
175
- title: 'Invert',
176
- description: 'Invert background',
179
+ title: 'Toggle inverted theme',
177
180
  default: false,
178
181
  type: 'boolean'
179
182
  },
@@ -181,11 +184,13 @@ exports.layout = {
181
184
  title: 'Color',
182
185
  type: 'string',
183
186
  format: 'hex-color',
184
- $helper: 'color'
187
+ $helper: {
188
+ name: 'color',
189
+ alpha: true
190
+ }
185
191
  },
186
192
  image: {
187
193
  title: 'Image',
188
- description: 'Local or remote URL',
189
194
  anyOf: [{
190
195
  type: "null"
191
196
  }, {
package/elements/link.js CHANGED
@@ -43,3 +43,69 @@ exports.link = {
43
43
  ]
44
44
  };
45
45
 
46
+ exports.link_button = {
47
+ priority: 11,
48
+ title: "Link Btn",
49
+ icon: '<i class="icons"><i class="linkify icon"></i><i class="corner hand pointer icon"></i></i>',
50
+ properties: {
51
+ url: {
52
+ title: 'Address',
53
+ description: 'Path without query or full url',
54
+ nullable: true,
55
+ type: 'string',
56
+ format: 'uri-reference',
57
+ $helper: {
58
+ name: 'href',
59
+ filter: {
60
+ type: ["link", "file", "archive"]
61
+ }
62
+ }
63
+ },
64
+ lang: {
65
+ title: 'Language',
66
+ type: 'string',
67
+ format: 'lang',
68
+ nullable: true,
69
+ $helper: {
70
+ name: 'datalist',
71
+ url: '/.api/languages'
72
+ }
73
+ },
74
+ full: {
75
+ title: 'Fluid',
76
+ type: 'boolean',
77
+ default: false
78
+ },
79
+ icon: {
80
+ title: 'Icon',
81
+ type: 'boolean',
82
+ default: false
83
+ },
84
+ compact: {
85
+ title: 'Compact',
86
+ type: 'boolean',
87
+ default: false
88
+ },
89
+ float: {
90
+ title: 'Float',
91
+ anyOf: [{
92
+ type: 'null',
93
+ title: 'No'
94
+ }, {
95
+ const: 'left',
96
+ title: 'Left'
97
+ }, {
98
+ const: 'right',
99
+ title: 'Right'
100
+ }],
101
+ default: null
102
+ }
103
+ },
104
+ contents: "text*",
105
+ group: "block",
106
+ tag: 'a.ui.button',
107
+ html: '<a href="[url]" hreflang="[lang]" class="ui [full|alt:fluid:] [icon] [compact] [float|post:%20floated] button"></a>',
108
+ stylesheets: [
109
+ '../lib/components/button.css'
110
+ ]
111
+ };
package/elements/media.js CHANGED
@@ -7,7 +7,7 @@ exports.video = {
7
7
  properties: {
8
8
  url: {
9
9
  title: 'Address',
10
- description: 'Local or remote URL',
10
+ description: 'Local or remote',
11
11
  anyOf: [{
12
12
  type: "null"
13
13
  }, {
@@ -88,7 +88,7 @@ exports.audio = {
88
88
  properties: {
89
89
  url: {
90
90
  title: 'Address',
91
- description: 'Local or remote URL',
91
+ description: 'Local or remote',
92
92
  anyOf: [{
93
93
  type: "null"
94
94
  }, {
package/elements/menu.js CHANGED
@@ -87,7 +87,7 @@ exports.menu_item_link = {
87
87
  properties: {
88
88
  url: {
89
89
  title: 'Address',
90
- description: 'Local or remote URL',
90
+ description: 'Local or remote',
91
91
  nullable: true,
92
92
  type: 'string',
93
93
  format: 'uri-reference',
@@ -58,7 +58,7 @@ exports.breadcrumb = {
58
58
  <div class="divider"></div>
59
59
  <a href="[$links.up|nth:-1|at:a::1|repeat:link]" class="section">[link.title]</a>
60
60
  <div class="divider"></div>
61
- <div class="active section">[$page.data.title|fail:div::1]</div>
61
+ <div class="active section">[$page.content.title|fail:div::1]</div>
62
62
  </nav>`,
63
63
  stylesheets: [
64
64
  '../lib/components/breadcrumb.css'
@@ -9,7 +9,7 @@ exports.pagination = {
9
9
  fetch: {
10
10
  title: 'Fetch block',
11
11
  type: 'string',
12
- format: 'id',
12
+ format: 'id', // FIXME this cannot work because fetch id changes on copy
13
13
  $filter: {
14
14
  name: 'action',
15
15
  action: 'read'
@@ -1,61 +1,6 @@
1
1
  exports.sitemap = {
2
- title: "Sitemap",
3
2
  group: "block",
4
- bundle: true,
5
3
  icon: '<i class="sitemap icon"></i>',
6
4
  menu: 'link',
7
- contents: {
8
- id: 'children',
9
- nodes: "sitemap_item*",
10
- virtual: true
11
- },
12
- html: `<element-sitemap>
13
- <element-accordion class="ui accordion" block-content="children"></element-accordion>
14
- </element-sitemap>`,
15
- stylesheets: [
16
- '../lib/components/accordion.css',
17
- '../ui/sitemap.css'
18
- ],
19
- scripts: [
20
- '../ui/sitemap.js'
21
- ],
22
- itemModel: function(name) {
23
- const schema = exports[name];
24
- return {
25
- title: schema.title,
26
- icon: schema.icon,
27
- properties: schema.properties,
28
- standalone: true,
29
- menu: "link",
30
- bundle: 'sitemap',
31
- group: 'sitemap_item',
32
- virtual: true,
33
- contents: {
34
- id: 'children',
35
- nodes: "sitemap_item*",
36
- virtual: true
37
- },
38
- alias: name,
39
- context: 'sitemap/ | sitemap_item/',
40
- html: `<element-sitepage class="item fold" data-url="[url]" data-index="[index]">
41
- <div class="title caret-icon">
42
- <span class="header">[title|or:-]</span>
43
- <span class="ui mini type label">[$grants.webmaster|prune:*][$type|slice:4]</span>
44
- <span class="ui mini grey label">[$grants.webmaster|prune:*][nositemap|prune:*]no sitemap</span>
45
- <span class="ui mini orange label">[$grants.webmaster|prune:*][noindex|prune:*]no index</span>
46
- <span class="ui mini red label">[$grants.webmaster|prune:*][$lock|fail:*]</span>
47
- <br>
48
- <a href="[url]" class="description">[url|or:-]</a>
49
- <a href="[redirect|fail:*]" class="redirection"> ➜ [redirect]</a>
50
- </div>
51
- <div class="list content" block-content="children"></div>
52
- </element-sitepage>`
53
- };
54
- }
5
+ html: `<element-sitemap>DEPRECATED</element-sitemap>`
55
6
  };
56
-
57
- if (exports.page) exports.sitepage = exports.sitemap.itemModel('page');
58
- if (exports.redirection) exports.siteredirection = exports.sitemap.itemModel('redirection');
59
-
60
- exports.editor?.scripts.push('../ui/sitemap-helper.js');
61
-
@@ -1,7 +1,10 @@
1
- this.window = this.window || {};
2
- this.window.objectFitImages = (function () {
1
+ var objectFitImages = (function () {
3
2
  'use strict';
4
3
 
4
+ function getDefaultExportFromCjs (x) {
5
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
6
+ }
7
+
5
8
  /*! npm.im/object-fit-images 3.2.4 */
6
9
 
7
10
  var OFI = 'bfred-it:object-fit-images';
@@ -233,6 +236,8 @@ this.window.objectFitImages = (function () {
233
236
 
234
237
  var ofi_commonJs = fix;
235
238
 
236
- return ofi_commonJs;
239
+ var ofi_commonJs$1 = /*@__PURE__*/getDefaultExportFromCjs(ofi_commonJs);
240
+
241
+ return ofi_commonJs$1;
237
242
 
238
243
  })();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pageboard/html",
3
- "version": "0.14.9",
3
+ "version": "0.14.10",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -14,22 +14,17 @@
14
14
  },
15
15
  "homepage": "https://github.com/pageboard/client#readme",
16
16
  "dependencies": {
17
- "postinstall": "^0.8.0",
18
17
  "semantic-ui-css": "^2.4.1"
19
18
  },
20
19
  "devDependencies": {
21
- "formdata-polyfill": "^4.0.10",
22
20
  "nouislider": "^15.7.1",
23
- "object-fit-images": "^3.2.4",
24
- "postinstall-bundle": "^0.8.0"
21
+ "postinstall": "^0.8.0"
25
22
  },
26
23
  "postinstall": {
27
24
  "semantic-ui-css/components": "link lib/components",
28
25
  "semantic-ui-css/themes": "link lib/themes"
29
26
  },
30
27
  "prepare": {
31
- "object-fit-images": "bundle --name=window.objectFitImages lib/object-fit-images.js",
32
- "formdata-polyfill": "copy lib/formdata.js",
33
28
  "nouislider/dist/nouislider.js": "copy lib/",
34
29
  "nouislider/dist/nouislider.css": "copy lib/"
35
30
  },
package/ui/button.css ADDED
@@ -0,0 +1,11 @@
1
+ .ui.button:not(.right) + .ui.button.right {
2
+ margin-left:auto;
3
+ }
4
+
5
+ [contenteditable] .ui.buttons .disabled.button,
6
+ [contenteditable] .ui.disabled.button,
7
+ [contenteditable] .ui.button:disabled,
8
+ [contenteditable] .ui.disabled.button:hover,
9
+ [contenteditable] .ui.disabled.active.button {
10
+ pointer-events: auto !important;
11
+ }