@pageboard/html 0.11.8 → 0.11.11

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/form.js CHANGED
@@ -66,6 +66,7 @@ exports.api_form = {
66
66
  group: 'block form',
67
67
  menu: "form",
68
68
  required: ["action"],
69
+ expressions: true,
69
70
  $lock: {
70
71
  'data.action.parameters': 'webmaster'
71
72
  },
@@ -115,7 +116,7 @@ exports.api_form = {
115
116
  nullable: true,
116
117
  type: "string",
117
118
  format: "pathname",
118
- $helper: "page"
119
+ $helper: "page" // isn't it pageUrl here ?
119
120
  },
120
121
  parameters: {
121
122
  title: 'Parameters',
@@ -52,8 +52,10 @@ exports.input_date_time = {
52
52
  title: 'Step',
53
53
  description: 'rounding/increment in seconds',
54
54
  type: 'integer',
55
- nullable: true,
56
55
  anyOf: [{
56
+ type: 'null',
57
+ title: 'minute'
58
+ }, {
57
59
  const: 60 * 5,
58
60
  title: '5 minutes'
59
61
  }, {
@@ -439,7 +439,8 @@ exports.input_select = {
439
439
  </div>`,
440
440
  stylesheets: [
441
441
  '../lib/components/dropdown.css',
442
- '../lib/components/label.css'
442
+ '../lib/components/label.css',
443
+ '../ui/select.css'
443
444
  ],
444
445
  scripts: [
445
446
  '../ui/select.js'
@@ -65,4 +65,4 @@ exports.sitemap = {
65
65
  };
66
66
 
67
67
  exports.sitepage = exports.sitemap.itemModel('page', false);
68
-
68
+ exports.siteredirection = exports.sitemap.itemModel('redirection', true);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pageboard/html",
3
- "version": "0.11.8",
3
+ "version": "0.11.11",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -62,7 +62,7 @@ class HTMLElementFieldsetList extends VirtualHTMLElement {
62
62
  const splits = Array.from(keys).map(name => name.split('.'));
63
63
  const coms = [];
64
64
  let pos = 0, com = null;
65
- while (splits.every(list => {
65
+ if (splits.length && splits.every(list => {
66
66
  if (com == null) {
67
67
  if (pos < list.length) {
68
68
  com = list[pos];
package/ui/fieldset.js CHANGED
@@ -11,7 +11,10 @@ class HTMLCustomFieldSetElement extends HTMLFieldSetElement {
11
11
  #update() {
12
12
  if (this.isContentEditable || !this.options.name) return;
13
13
  const val = this.form?.read(true)?.[this.options.name];
14
- this.disabled = this.hidden = val != this.options.value;
14
+ const disabled = this.disabled = this.hidden = val != this.options.value;
15
+ for (const node of this.querySelectorAll('[name]')) {
16
+ node.disabled = disabled;
17
+ }
15
18
  }
16
19
 
17
20
  patch(state) {
package/ui/form.js CHANGED
@@ -65,8 +65,8 @@ class HTMLCustomFormElement extends HTMLFormElement {
65
65
  // withDefaults: keep value if equals to its default
66
66
  // else unset value
67
67
  for (const node of this.elements) {
68
- const { name, type } = node;
69
- if (name == null || name == "" || type == "button") {
68
+ const { name, type, disabled } = node;
69
+ if (name == null || name == "" || type == "button" || disabled) {
70
70
  continue;
71
71
  }
72
72
  let val = node.value;
@@ -127,8 +127,11 @@ class HTMLCustomFormElement extends HTMLFormElement {
127
127
  if (v == null) {
128
128
  return "";
129
129
  } else if (Array.isArray(v)) {
130
- if (["radio", "checkbox"].includes(elem.type)) return v;
131
- else return v.shift();
130
+ if (["radio", "checkbox", "select-multiple"].includes(elem.type)) {
131
+ return v;
132
+ } else {
133
+ return v.shift();
134
+ }
132
135
  } else if (typeof v == "object") {
133
136
  return v;
134
137
  } else {
package/ui/select.css ADDED
@@ -0,0 +1,7 @@
1
+ element-select.ui.multiple.dropdown > .label > .icon {
2
+ vertical-align: middle;
3
+ }
4
+ element-select.ui.multiple.dropdown > .label {
5
+ vertical-align: baseline;
6
+ line-height: inherit;
7
+ }