@schukai/monster 3.117.1 → 3.117.3
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/CHANGELOG.md +23 -0
- package/package.json +1 -1
- package/source/components/form/login.mjs +1397 -1399
- package/source/components/form/select.mjs +10 -5
- package/source/components/layout/stylesheet/board.mjs +13 -6
- package/source/types/dataurl.mjs +9 -0
- package/source/types/version.mjs +1 -1
- package/source/util/clone.mjs +5 -0
- package/test/cases/monster.mjs +1 -1
- package/test/web/test.html +2 -2
- package/test/web/tests.js +213 -191
@@ -370,7 +370,7 @@ class Select extends CustomControl {
|
|
370
370
|
* @property {string} name Name of the form field
|
371
371
|
* @property {string} url Load options from server per url
|
372
372
|
* @property {object} lookup Load options from server per url
|
373
|
-
* @property {string} lookup.url Load options from server per url
|
373
|
+
* @property {string} lookup.url Load options from server per url, the playceholder ${filter} is replaced with the value of the selected option
|
374
374
|
* @property {boolean} lookup.grouping Load all selected options from server per url at once (true) or one by one (false)
|
375
375
|
* @property {Object} fetch Fetch [see Using Fetch mozilla.org](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch)
|
376
376
|
* @property {String} fetch.redirect
|
@@ -995,7 +995,7 @@ function lookupSelection() {
|
|
995
995
|
}
|
996
996
|
|
997
997
|
let url = self.getOption("url");
|
998
|
-
|
998
|
+
const lookupUrl = self.getOption("lookup.url");
|
999
999
|
if (lookupUrl !== null) {
|
1000
1000
|
url = lookupUrl;
|
1001
1001
|
}
|
@@ -1774,12 +1774,14 @@ function filterFromRemote() {
|
|
1774
1774
|
}
|
1775
1775
|
|
1776
1776
|
let filterValue;
|
1777
|
+
let showFlag = false;
|
1777
1778
|
|
1778
1779
|
switch (this.getOption("filter.position")) {
|
1779
1780
|
case FILTER_POSITION_INLINE:
|
1780
1781
|
if (this[inlineFilterElementSymbol] instanceof HTMLElement) {
|
1781
1782
|
filterValue = this[inlineFilterElementSymbol].value.toLowerCase();
|
1782
1783
|
}
|
1784
|
+
showFlag = true;
|
1783
1785
|
|
1784
1786
|
break;
|
1785
1787
|
case FILTER_POSITION_POPPER:
|
@@ -1789,7 +1791,7 @@ function filterFromRemote() {
|
|
1789
1791
|
}
|
1790
1792
|
}
|
1791
1793
|
|
1792
|
-
return filterFromRemoteByValue.call(this, url, filterValue);
|
1794
|
+
return filterFromRemoteByValue.call(this, url, filterValue, showFlag);
|
1793
1795
|
}
|
1794
1796
|
|
1795
1797
|
function formatURL(url, value) {
|
@@ -1818,9 +1820,10 @@ function formatURL(url, value) {
|
|
1818
1820
|
* @private
|
1819
1821
|
* @param optionUrl
|
1820
1822
|
* @param value
|
1823
|
+
* @param openPopper
|
1821
1824
|
* @returns {Promise<unknown>}
|
1822
1825
|
*/
|
1823
|
-
function filterFromRemoteByValue(optionUrl, value) {
|
1826
|
+
function filterFromRemoteByValue(optionUrl, value, openPopper) {
|
1824
1827
|
return new Processing(() => {
|
1825
1828
|
let url = formatURL.call(this, optionUrl, value);
|
1826
1829
|
if (url.indexOf(disabledRequestMarker.toString()) !== -1) {
|
@@ -1833,7 +1836,9 @@ function filterFromRemoteByValue(optionUrl, value) {
|
|
1833
1836
|
})
|
1834
1837
|
.then(() => {
|
1835
1838
|
checkOptionState.call(this);
|
1836
|
-
|
1839
|
+
if (openPopper === true) {
|
1840
|
+
show.call(this);
|
1841
|
+
}
|
1837
1842
|
})
|
1838
1843
|
.catch((e) => {
|
1839
1844
|
throw e;
|
@@ -10,10 +10,10 @@
|
|
10
10
|
* For more information about purchasing a commercial license, please contact schukai GmbH.
|
11
11
|
*/
|
12
12
|
|
13
|
-
import {addAttributeToken} from "../../../dom/attributes.mjs";
|
14
|
-
import {ATTRIBUTE_ERRORMESSAGE} from "../../../dom/constants.mjs";
|
13
|
+
import { addAttributeToken } from "../../../dom/attributes.mjs";
|
14
|
+
import { ATTRIBUTE_ERRORMESSAGE } from "../../../dom/constants.mjs";
|
15
15
|
|
16
|
-
export {BoardStyleSheet}
|
16
|
+
export { BoardStyleSheet };
|
17
17
|
|
18
18
|
/**
|
19
19
|
* @private
|
@@ -22,10 +22,17 @@ export {BoardStyleSheet}
|
|
22
22
|
const BoardStyleSheet = new CSSStyleSheet();
|
23
23
|
|
24
24
|
try {
|
25
|
-
|
25
|
+
BoardStyleSheet.insertRule(
|
26
|
+
`
|
26
27
|
@layer board {
|
27
28
|
:host{display:block;height:100%;width:100%}[data-monster-role=control]{container-name:board;container-type:inline-size}[data-monster-role=control],[data-monster-role=grid]{box-sizing:border-box;height:100%;margin:0;padding:0;width:100%}[data-monster-role=grid]{display:grid}.dragging{opacity:.5;visibility:hidden}
|
28
|
-
}`,
|
29
|
+
}`,
|
30
|
+
0,
|
31
|
+
);
|
29
32
|
} catch (e) {
|
30
|
-
|
33
|
+
addAttributeToken(
|
34
|
+
document.getRootNode().querySelector("html"),
|
35
|
+
ATTRIBUTE_ERRORMESSAGE,
|
36
|
+
e + "",
|
37
|
+
);
|
31
38
|
}
|
package/source/types/dataurl.mjs
CHANGED
@@ -78,6 +78,15 @@ class DataUrl extends Base {
|
|
78
78
|
return this[internal].mediatype;
|
79
79
|
}
|
80
80
|
|
81
|
+
/**
|
82
|
+
* Converts the current object to a URL instance.
|
83
|
+
*
|
84
|
+
* @return {URL} A URL instance created from the string representation of the object.
|
85
|
+
*/
|
86
|
+
toURL() {
|
87
|
+
return new URL(this.toString());
|
88
|
+
}
|
89
|
+
|
81
90
|
/**
|
82
91
|
*
|
83
92
|
* @return {string}
|
package/source/types/version.mjs
CHANGED
package/source/util/clone.mjs
CHANGED
@@ -75,6 +75,11 @@ function clone(obj) {
|
|
75
75
|
return copy;
|
76
76
|
}
|
77
77
|
|
78
|
+
// Handle URL
|
79
|
+
if (obj instanceof URL) {
|
80
|
+
return new URL(obj.toString());
|
81
|
+
}
|
82
|
+
|
78
83
|
/** Do not clone DOM nodes */
|
79
84
|
if (typeof Element !== "undefined" && obj instanceof Element) return obj;
|
80
85
|
if (typeof Document !== "undefined" && obj instanceof Document) return obj;
|
package/test/cases/monster.mjs
CHANGED
package/test/web/test.html
CHANGED
@@ -9,8 +9,8 @@
|
|
9
9
|
</head>
|
10
10
|
<body>
|
11
11
|
<div id="headline" style="display: flex;align-items: center;justify-content: center;flex-direction: column;">
|
12
|
-
<h1 style='margin-bottom: 0.1em;'>Monster 3.
|
13
|
-
<div id="lastupdate" style='font-size:0.7em'>last update
|
12
|
+
<h1 style='margin-bottom: 0.1em;'>Monster 3.117.2</h1>
|
13
|
+
<div id="lastupdate" style='font-size:0.7em'>last update Mi 30. Apr 18:21:58 CEST 2025</div>
|
14
14
|
</div>
|
15
15
|
<div id="mocha-errors"
|
16
16
|
style="color: red;font-weight: bold;display: flex;align-items: center;justify-content: center;flex-direction: column;margin:20px;"></div>
|