@schukai/monster 3.74.0 → 3.75.0

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,22 @@
2
2
 
3
3
 
4
4
 
5
+ ## [3.75.0] - 2024-09-23
6
+
7
+ ### Add Features
8
+
9
+ - marker for select filter [#240](https://gitlab.schukai.com/oss/libraries/javascript/monster/issues/240)
10
+ ### Changes
11
+
12
+ - remove unused files
13
+ - run webtests
14
+ - new development cert
15
+ ### Documentation
16
+
17
+ - fix some small issues
18
+
19
+
20
+
5
21
  ## [3.74.0] - 2024-09-18
6
22
 
7
23
  ### Add Features
package/package.json CHANGED
@@ -1 +1 @@
1
- {"author":"schukai GmbH","dependencies":{"@floating-ui/dom":"^1.6.11","@popperjs/core":"^2.11.8"},"description":"Monster is a simple library for creating fast, robust and lightweight websites.","homepage":"https://monsterjs.org/","keywords":["framework","web","dom","css","sass","mobile-first","app","front-end","templates","schukai","core","shopcloud","alvine","monster","buildmap","stack","observer","observable","uuid","node","nodelist","css-in-js","logger","log","theme"],"license":"AGPL 3.0","main":"source/monster.mjs","module":"source/monster.mjs","name":"@schukai/monster","repository":{"type":"git","url":"https://gitlab.schukai.com/oss/libraries/javascript/monster.git"},"type":"module","version":"3.74.0"}
1
+ {"author":"schukai GmbH","dependencies":{"@floating-ui/dom":"^1.6.11","@popperjs/core":"^2.11.8"},"description":"Monster is a simple library for creating fast, robust and lightweight websites.","homepage":"https://monsterjs.org/","keywords":["framework","web","dom","css","sass","mobile-first","app","front-end","templates","schukai","core","shopcloud","alvine","monster","buildmap","stack","observer","observable","uuid","node","nodelist","css-in-js","logger","log","theme"],"license":"AGPL 3.0","main":"source/monster.mjs","module":"source/monster.mjs","name":"@schukai/monster","repository":{"type":"git","url":"https://gitlab.schukai.com/oss/libraries/javascript/monster.git"},"type":"module","version":"3.75.0"}
@@ -215,7 +215,6 @@ class Rest extends Datasource {
215
215
  * @returns {Promise<never>|*}
216
216
  */
217
217
  fetch() {
218
-
219
218
  const opt = clone(this.getOption("read"));
220
219
  this[dataSourceSymbol].setOption("read", opt);
221
220
 
@@ -204,7 +204,6 @@ class ApiButton extends ActionButton {
204
204
  /**
205
205
  * Import buttons from a map.
206
206
  *
207
- * @since 0.16.0
208
207
  * @param {array|object|Map|Set} data
209
208
  * @return {Monster.Components.Form.ApiButton}
210
209
  * @throws {Error} map is not iterable
@@ -81,7 +81,6 @@ class ContextError extends Popper {
81
81
  * This method is called by the `instanceof` operator.
82
82
  *
83
83
  * @returns {symbol}
84
- * @since 2.1.0
85
84
  */
86
85
  static get [instanceSymbol]() {
87
86
  return Symbol.for(
@@ -71,7 +71,6 @@ class ContextHelp extends Popper {
71
71
  /**
72
72
  * This method is called by the `instanceof` operator.
73
73
  * @returns {symbol}
74
- * @since 2.1.0
75
74
  */
76
75
  static get [instanceSymbol]() {
77
76
  return Symbol.for(
@@ -88,7 +88,6 @@ class MessageStateButton extends Popper {
88
88
  /**
89
89
  * This method is called by the `instanceof` operator.
90
90
  * @returns {symbol}
91
- * @since 2.1.0
92
91
  */
93
92
  static get [instanceSymbol]() {
94
93
  return Symbol.for(
@@ -331,7 +331,6 @@ class PopperButton extends Popper {
331
331
  * ```
332
332
  *
333
333
  * @property {string|array} value
334
- * @since 1.2.0
335
334
  * @throws {Error} unsupported type
336
335
  */
337
336
  set value(value) {
@@ -277,7 +277,6 @@ const FILTER_POSITION_INLINE = "inline";
277
277
  * @example /examples/components/form/select-simple
278
278
  * @example /examples/components/form/select-with-options
279
279
  *
280
- * @since 1.0.0
281
280
  * @copyright schukai GmbH
282
281
  * @summary A beautiful select control that can make your life easier and also looks good.
283
282
  * @fires monster-options-set
@@ -297,7 +296,6 @@ class Select extends CustomControl {
297
296
  /**
298
297
  * This method is called by the `instanceof` operator.
299
298
  * @returns {Symbol}
300
- * @since 2.1.0
301
299
  */
302
300
  static get [instanceSymbol]() {
303
301
  return Symbol.for("@schukai/monster/components/form/select@@instance");
@@ -336,7 +334,6 @@ class Select extends CustomControl {
336
334
  * ```
337
335
  *
338
336
  * @property {string|array} value
339
- * @since 1.2.0
340
337
  * @throws {Error} unsupported type
341
338
  */
342
339
  set value(value) {
@@ -458,6 +455,10 @@ class Select extends CustomControl {
458
455
  defaultValue: "*",
459
456
  mode: FILTER_MODE_DISABLED,
460
457
  position: FILTER_POSITION_INLINE,
458
+ marker: {
459
+ open: "{",
460
+ close: "}",
461
+ },
461
462
  },
462
463
  classes: {
463
464
  badge: "monster-badge-primary",
@@ -721,7 +722,6 @@ class Select extends CustomControl {
721
722
  * Import Select Options from dataset
722
723
  * Not to be confused with the control defaults/options
723
724
  *
724
- * @since 0.16.0
725
725
  * @param {array|object|Map|Set} data
726
726
  * @return {Select}
727
727
  * @throws {Error} map is not iterable
@@ -1473,7 +1473,18 @@ function filterFromRemote() {
1473
1473
  );
1474
1474
  let url = optionUrl;
1475
1475
  if (filterValue.length > 0) {
1476
- url = new Formatter({ filter: filterValue }).format(optionUrl);
1476
+ const formatter = new Formatter({ filter: filterValue });
1477
+ const openMarker = this.getOption("formatter.marker.open");
1478
+ let closeMarker = this.getOption("formatter.marker.close");
1479
+ if (!closeMarker) {
1480
+ closeMarker = openMarker;
1481
+ }
1482
+
1483
+ if (openMarker && closeMarker) {
1484
+ formatter.setMarker(openMarker, closeMarker);
1485
+ }
1486
+
1487
+ url = formatter.format(optionUrl);
1477
1488
  }
1478
1489
 
1479
1490
  this.fetch(url)
@@ -105,8 +105,6 @@ class ToggleSwitch extends CustomControl {
105
105
  * @property {string} actions.off=specifies the action for the off state.
106
106
  * @property {Object} templates
107
107
  * @property {string} templates.main=specifies the main template used by the control.
108
- *
109
- * @since 3.57.0
110
108
  */
111
109
  get defaults() {
112
110
  return Object.assign({}, super.defaults, {
@@ -317,7 +315,6 @@ class ToggleSwitch extends CustomControl {
317
315
  /**
318
316
  * This method is called by the `instanceof` operator.
319
317
  * @returns {symbol}
320
- * @since 2.1.0
321
318
  */
322
319
  static get [instanceSymbol]() {
323
320
  return Symbol.for(
@@ -133,7 +133,6 @@ class TreeSelect extends Select {
133
133
  * Import Select Options from dataset
134
134
  * Not to be confused with the control defaults/options
135
135
  *
136
- * @since 0.16.0
137
136
  * @param {array|object|Map|Set} data
138
137
  * @return {Select}
139
138
  * @throws {Error} map is not iterable