@schukai/monster 4.16.0 → 4.18.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 +57 -0
package/CHANGELOG.md
CHANGED
@@ -2,6 +2,25 @@
|
|
2
2
|
|
3
3
|
|
4
4
|
|
5
|
+
## [4.18.0] - 2025-06-10
|
6
|
+
|
7
|
+
### Add Features
|
8
|
+
|
9
|
+
- Enhance filter functionality with new tag queries
|
10
|
+
### Bug Fixes
|
11
|
+
|
12
|
+
- remove s
|
13
|
+
|
14
|
+
|
15
|
+
|
16
|
+
## [4.17.0] - 2025-06-10
|
17
|
+
|
18
|
+
### Add Features
|
19
|
+
|
20
|
+
- Add new filtering option for tags in datatable
|
21
|
+
|
22
|
+
|
23
|
+
|
5
24
|
## [4.16.0] - 2025-06-08
|
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.18.0"}
|
@@ -1232,6 +1232,63 @@ function collectSearchQueries() {
|
|
1232
1232
|
.join(",")
|
1233
1233
|
);
|
1234
1234
|
},
|
1235
|
+
"list-tag": (value, key) => {
|
1236
|
+
if (isString(value)) {
|
1237
|
+
value = value.split(",");
|
1238
|
+
}
|
1239
|
+
|
1240
|
+
if (!isArray(value)) {
|
1241
|
+
return "";
|
1242
|
+
}
|
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) => {
|
1255
|
+
if (isString(value)) {
|
1256
|
+
value = value.split(",");
|
1257
|
+
}
|
1258
|
+
|
1259
|
+
if (!isArray(value)) {
|
1260
|
+
return "";
|
1261
|
+
}
|
1262
|
+
|
1263
|
+
let query = "";
|
1264
|
+
value.forEach((v) => {
|
1265
|
+
if (query.length > 0) {
|
1266
|
+
query += " OR ";
|
1267
|
+
}
|
1268
|
+
query += `${encodeURIComponent(key)} IN "${encodeURIComponent(v)}"`;
|
1269
|
+
});
|
1270
|
+
|
1271
|
+
return query;
|
1272
|
+
},
|
1273
|
+
"list-in-tags": (value, key) => {
|
1274
|
+
if (isString(value)) {
|
1275
|
+
value = value.split(",");
|
1276
|
+
}
|
1277
|
+
|
1278
|
+
if (!isArray(value)) {
|
1279
|
+
return "";
|
1280
|
+
}
|
1281
|
+
|
1282
|
+
let query = "";
|
1283
|
+
value.forEach((v) => {
|
1284
|
+
if (query.length > 0) {
|
1285
|
+
query += " OR ";
|
1286
|
+
}
|
1287
|
+
query += `"${encodeURIComponent(v)}" IN ${encodeURIComponent(key)}`;
|
1288
|
+
});
|
1289
|
+
|
1290
|
+
return query;
|
1291
|
+
},
|
1235
1292
|
"array-list": (value, key) => {
|
1236
1293
|
if (isString(value)) {
|
1237
1294
|
value = value.split(",");
|