@schukai/monster 4.17.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 +19 -0
- package/package.json +1 -1
- package/source/components/datatable/filter.mjs +46 -2
package/CHANGELOG.md
CHANGED
@@ -2,6 +2,25 @@
|
|
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
|
+
|
13
|
+
## [4.18.0] - 2025-06-10
|
14
|
+
|
15
|
+
### Add Features
|
16
|
+
|
17
|
+
- Enhance filter functionality with new tag queries
|
18
|
+
### Bug Fixes
|
19
|
+
|
20
|
+
- remove s
|
21
|
+
|
22
|
+
|
23
|
+
|
5
24
|
## [4.17.0] - 2025-06-10
|
6
25
|
|
7
26
|
### 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.
|
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"}
|
@@ -1232,7 +1232,7 @@ function collectSearchQueries() {
|
|
1232
1232
|
.join(",")
|
1233
1233
|
);
|
1234
1234
|
},
|
1235
|
-
"
|
1235
|
+
"list-tag": (value, key) => {
|
1236
1236
|
if (isString(value)) {
|
1237
1237
|
value = value.split(",");
|
1238
1238
|
}
|
@@ -1241,16 +1241,60 @@ function collectSearchQueries() {
|
|
1241
1241
|
return "";
|
1242
1242
|
}
|
1243
1243
|
|
1244
|
+
return (
|
1245
|
+
value
|
1246
|
+
.map((v) => {
|
1247
|
+
return `"${encodeURIComponent(v)}"`;
|
1248
|
+
})
|
1249
|
+
.join(",") +
|
1250
|
+
" IN " +
|
1251
|
+
encodeURIComponent(key)
|
1252
|
+
);
|
1253
|
+
},
|
1254
|
+
"tags-in-list": (value, key, op) => {
|
1255
|
+
if (isString(value)) {
|
1256
|
+
value = value.split(",");
|
1257
|
+
}
|
1258
|
+
|
1259
|
+
if (!isArray(value)) {
|
1260
|
+
return "";
|
1261
|
+
}
|
1262
|
+
|
1263
|
+
if(!op || !isString(op)) op = "OR";
|
1264
|
+
op = " "+op.toUpperCase().trim()+" ";
|
1265
|
+
|
1244
1266
|
let query = "";
|
1245
1267
|
value.forEach((v) => {
|
1246
1268
|
if (query.length > 0) {
|
1247
|
-
query +=
|
1269
|
+
query += op;
|
1248
1270
|
}
|
1249
1271
|
query += `${encodeURIComponent(key)} IN "${encodeURIComponent(v)}"`;
|
1250
1272
|
});
|
1251
1273
|
|
1252
1274
|
return query;
|
1253
1275
|
},
|
1276
|
+
"list-in-tags": (value, key, op) => {
|
1277
|
+
if (isString(value)) {
|
1278
|
+
value = value.split(",");
|
1279
|
+
}
|
1280
|
+
|
1281
|
+
if (!isArray(value)) {
|
1282
|
+
return "";
|
1283
|
+
}
|
1284
|
+
|
1285
|
+
if(!op || !isString(op)) op = "OR";
|
1286
|
+
op = " "+op.toUpperCase().trim()+" ";
|
1287
|
+
|
1288
|
+
let query = "";
|
1289
|
+
value.forEach((v) => {
|
1290
|
+
if (query.length > 0) {
|
1291
|
+
query += op;
|
1292
|
+
}
|
1293
|
+
query += `"${encodeURIComponent(v)}" IN ${encodeURIComponent(key)}`;
|
1294
|
+
});
|
1295
|
+
|
1296
|
+
return query;
|
1297
|
+
},
|
1254
1298
|
"array-list": (value, key) => {
|
1255
1299
|
if (isString(value)) {
|
1256
1300
|
value = value.split(",");
|