@schukai/monster 3.66.0 → 3.67.0

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 CHANGED
@@ -2,6 +2,16 @@
2
2
 
3
3
 
4
4
 
5
+ ## [3.67.0] - 2024-06-22
6
+
7
+ ### Add Features
8
+
9
+ - new options to define the markers that are used for the label template. [#203](https://gitlab.schukai.com/oss/libraries/javascript/monster/issues/203) See merge request oss/libraries/javascript/monster[!53](https://gitlab.schukai.com/oss/libraries/javascript/monster/merge_requests/53)
10
+ - new options to define the markers that are used for the label template [#203](https://gitlab.schukai.com/oss/libraries/javascript/monster/issues/203)
11
+
12
+ ## 2024-06-22
13
+ - new options to define the markers that are used for the label template [#203](https://gitlab.schukai.com/oss/libraries/javascript/monster/issues/203)
14
+
5
15
  ## [3.66.0] - 2024-06-21
6
16
 
7
17
  ### Add Features
package/package.json CHANGED
@@ -1 +1 @@
1
- {"author":"schukai GmbH","dependencies":{"@floating-ui/dom":"^1.6.5","@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.66.0"}
1
+ {"author":"schukai GmbH","dependencies":{"@floating-ui/dom":"^1.6.5","@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.67.0"}
@@ -215,6 +215,10 @@ class Filter extends CustomElement {
215
215
  * @property {Object} templates Template definitions
216
216
  * @property {string} templates.main Main template
217
217
  * @property {Object} labels Label definitions
218
+ * @property {Object} formatter label Template Formatter definitions
219
+ * @property {Object} formatter.marker
220
+ * @property {Object} formatter.marker.open
221
+ * @property {Object} formatter.marker.close
218
222
  * @property {string} labels.search Search button label
219
223
  * @property {string} labels.reset Reset button label
220
224
  * @property {Object} queries Query definitions
@@ -227,8 +231,14 @@ class Filter extends CustomElement {
227
231
  templates: {
228
232
  main: getTemplate(),
229
233
  },
230
-
234
+ formatter: {
235
+ marker: {
236
+ open: null,
237
+ close: null
238
+ }
239
+ },
231
240
  labels: {
241
+
232
242
  search: "Search",
233
243
  reset: "Reset",
234
244
  save: "Save",
@@ -925,6 +935,7 @@ function buildSearchQuery(queries) {
925
935
  */
926
936
  function collectSearchQueries() {
927
937
  const currentHash = parseBracketedKeyValueHash(getGlobal().location.hash);
938
+ const self = this;
928
939
 
929
940
  return new Promise((resolve, reject) => {
930
941
  const query = [];
@@ -1001,6 +1012,10 @@ function collectSearchQueries() {
1001
1012
  },
1002
1013
  });
1003
1014
 
1015
+ if (self.getOption("formatter.marker.open")) {
1016
+ formatter.setMarker(self.getOption("formatter.marker.open"),self.getOption("formatter.marker.close"));
1017
+ }
1018
+
1004
1019
  let queryPart = formatter.format(template);
1005
1020
  if (queryPart) {
1006
1021
  if (isFunction(wrapCallback)) {