@pageboard/html 0.17.2 → 0.17.4
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/package.json +1 -1
- package/ui/form.css +1 -0
- package/ui/form.js +7 -1
- package/ui/image.js +5 -2
- package/ui/layout.js +1 -1
package/package.json
CHANGED
package/ui/form.css
CHANGED
package/ui/form.js
CHANGED
|
@@ -82,8 +82,14 @@ class HTMLElementForm extends Page.create(HTMLFormElement) {
|
|
|
82
82
|
if (this.hidden) toggles.push(submit);
|
|
83
83
|
state.vars.submit = true;
|
|
84
84
|
}
|
|
85
|
+
// these are merged after the fact, so merge now to collect state.vars
|
|
86
|
+
for (const n of [200, 400, 401, 403, 404, 500]) {
|
|
87
|
+
const attr = this.getRedirect(n);
|
|
88
|
+
if (attr) Page.parse(attr).fuse({}, state.scope);
|
|
89
|
+
}
|
|
90
|
+
|
|
85
91
|
const actionLoc = Page.parse(this.getAttribute('action'));
|
|
86
|
-
Object.assign(actionLoc.query, state.templatesQuery(this));
|
|
92
|
+
Object.assign(actionLoc.query, state.templatesQuery(this.getAttribute('parameters')));
|
|
87
93
|
this.setAttribute('action', Page.format(actionLoc));
|
|
88
94
|
this.restore(state.scope);
|
|
89
95
|
} else {
|
package/ui/image.js
CHANGED
|
@@ -96,7 +96,7 @@ const HTMLElementImageConstructor = Superclass => class extends Superclass {
|
|
|
96
96
|
return this.image?.currentSrc;
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
-
requestSrc(srcLoc) {
|
|
99
|
+
requestSrc(srcLoc, self) {
|
|
100
100
|
const { crop, fit } = this;
|
|
101
101
|
const { w, h } = this.dimensions;
|
|
102
102
|
const r = {};
|
|
@@ -105,7 +105,10 @@ const HTMLElementImageConstructor = Superclass => class extends Superclass {
|
|
|
105
105
|
r.width = w;
|
|
106
106
|
r.height = h;
|
|
107
107
|
} else {
|
|
108
|
-
const {
|
|
108
|
+
const {
|
|
109
|
+
clientWidth,
|
|
110
|
+
clientHeight
|
|
111
|
+
} = self ? this : (this.offsetParent ?? {});
|
|
109
112
|
r.width = clientWidth;
|
|
110
113
|
r.height = clientHeight;
|
|
111
114
|
}
|
package/ui/layout.js
CHANGED
|
@@ -15,7 +15,7 @@ class HTMLElementLayout extends Page.create(HTMLDivElement) {
|
|
|
15
15
|
return;
|
|
16
16
|
}
|
|
17
17
|
const srcLoc = Page.parse(this.options.src);
|
|
18
|
-
const reqSrc = this.requestSrc(srcLoc);
|
|
18
|
+
const reqSrc = this.requestSrc(srcLoc, true);
|
|
19
19
|
if (!reqSrc) {
|
|
20
20
|
this.style.backgroundImage = '';
|
|
21
21
|
} else if (reqSrc != this.currentSrc) {
|