@schukai/monster 4.18.0 → 4.19.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,14 @@
2
2
 
3
3
 
4
4
 
5
+ ## [4.19.0] - 2025-06-10
6
+
7
+ ### Add Features
8
+
9
+ - Enhance query operation flexibility in filter component
10
+
11
+
12
+
5
13
  ## [4.18.0] - 2025-06-10
6
14
 
7
15
  ### Add Features
package/package.json CHANGED
@@ -1 +1 @@
1
- {"author":"schukai GmbH","dependencies":{"@floating-ui/dom":"^1.7.1","@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":"4.18.0"}
1
+ {"author":"schukai GmbH","dependencies":{"@floating-ui/dom":"^1.7.1","@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":"4.19.0"}
@@ -1251,7 +1251,7 @@ function collectSearchQueries() {
1251
1251
  encodeURIComponent(key)
1252
1252
  );
1253
1253
  },
1254
- "tags-in-list": (value, key) => {
1254
+ "tags-in-list": (value, key, op) => {
1255
1255
  if (isString(value)) {
1256
1256
  value = value.split(",");
1257
1257
  }
@@ -1260,17 +1260,20 @@ function collectSearchQueries() {
1260
1260
  return "";
1261
1261
  }
1262
1262
 
1263
+ if(!op || !isString(op)) op = "OR";
1264
+ op = " "+op.toUpperCase().trim()+" ";
1265
+
1263
1266
  let query = "";
1264
1267
  value.forEach((v) => {
1265
1268
  if (query.length > 0) {
1266
- query += " OR ";
1269
+ query += op;
1267
1270
  }
1268
1271
  query += `${encodeURIComponent(key)} IN "${encodeURIComponent(v)}"`;
1269
1272
  });
1270
1273
 
1271
1274
  return query;
1272
1275
  },
1273
- "list-in-tags": (value, key) => {
1276
+ "list-in-tags": (value, key, op) => {
1274
1277
  if (isString(value)) {
1275
1278
  value = value.split(",");
1276
1279
  }
@@ -1279,10 +1282,13 @@ function collectSearchQueries() {
1279
1282
  return "";
1280
1283
  }
1281
1284
 
1285
+ if(!op || !isString(op)) op = "OR";
1286
+ op = " "+op.toUpperCase().trim()+" ";
1287
+
1282
1288
  let query = "";
1283
1289
  value.forEach((v) => {
1284
1290
  if (query.length > 0) {
1285
- query += " OR ";
1291
+ query += op;
1286
1292
  }
1287
1293
  query += `"${encodeURIComponent(v)}" IN ${encodeURIComponent(key)}`;
1288
1294
  });