@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.
@@ -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
- let lookupUrl = self.getOption("lookup.url");
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
- show.call(this);
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
- BoardStyleSheet.insertRule(`
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
- }`, 0);
29
+ }`,
30
+ 0,
31
+ );
29
32
  } catch (e) {
30
- addAttributeToken(document.getRootNode().querySelector('html'), ATTRIBUTE_ERRORMESSAGE, e + "");
33
+ addAttributeToken(
34
+ document.getRootNode().querySelector("html"),
35
+ ATTRIBUTE_ERRORMESSAGE,
36
+ e + "",
37
+ );
31
38
  }
@@ -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}
@@ -156,7 +156,7 @@ function getMonsterVersion() {
156
156
  }
157
157
 
158
158
  /** don't touch, replaced by make with package.json version */
159
- monsterVersion = new Version("3.115.4");
159
+ monsterVersion = new Version("3.117.2");
160
160
 
161
161
  return monsterVersion;
162
162
  }
@@ -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;
@@ -7,7 +7,7 @@ describe('Monster', function () {
7
7
  let monsterVersion
8
8
 
9
9
  /** don´t touch, replaced by make with package.json version */
10
- monsterVersion = new Version("3.115.4")
10
+ monsterVersion = new Version("3.117.2")
11
11
 
12
12
  let m = getMonsterVersion();
13
13
 
@@ -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.115.4</h1>
13
- <div id="lastupdate" style='font-size:0.7em'>last update Mo 14. Apr 11:15:31 CEST 2025</div>
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>