@schukai/monster 3.102.5 → 3.103.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,55 @@
2
2
 
3
3
 
4
4
 
5
+ ## [3.103.0] - 2025-02-02
6
+
7
+ ### Add Features
8
+
9
+ - **datatable:** new tag-list callback
10
+ - **datatable:** new feature flag preventSameQuery
11
+ ### Changes
12
+
13
+ - update node
14
+ - update node
15
+ - update node
16
+ - update node
17
+ - update node
18
+ - update node
19
+ - update node
20
+ - update node
21
+ - update node
22
+ - update node
23
+ - update node
24
+ - update node
25
+ - update node
26
+ - update node
27
+ - update node
28
+ - update node
29
+ - update node
30
+ - update nix
31
+ - update node
32
+ - integrate gitleaks
33
+
34
+
35
+
36
+ ## [3.102.6] - 2025-02-01
37
+
38
+ ### Bug Fixes
39
+
40
+ - update updater bind values and select logic [#291](https://gitlab.schukai.com/oss/libraries/javascript/monster/issues/291)
41
+ ### Changes
42
+
43
+ - update nix flake
44
+ - update nix flake
45
+ - update nix flake
46
+ - debug gitlab
47
+ - debug gitlab
48
+ - update flake
49
+ - debug gitlab
50
+ - update nix
51
+
52
+
53
+
5
54
  ## [3.102.5] - 2025-01-30
6
55
 
7
56
  ### Bug Fixes
package/package.json CHANGED
@@ -1 +1 @@
1
- {"author":"schukai GmbH","dependencies":{"@floating-ui/dom":"^1.6.13","@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.102.5"}
1
+ {"author":"schukai GmbH","dependencies":{"@floating-ui/dom":"^1.6.13","@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.103.0"}
@@ -278,7 +278,7 @@ class DataSet extends CustomElement {
278
278
  }
279
279
 
280
280
  initEventHandler.call(this);
281
- },10);
281
+ }, 10);
282
282
  }
283
283
 
284
284
  /**
@@ -45,9 +45,9 @@ class FilterSelect extends Select {
45
45
  get defaults() {
46
46
  return Object.assign({}, super.defaults, {
47
47
  type: "checkbox",
48
- templateMapping: {
49
- selected: getSummaryTemplate(),
50
- },
48
+ // templateMapping: {
49
+ // selected: getSummaryTemplate(),
50
+ // },
51
51
  });
52
52
  }
53
53
 
@@ -32,7 +32,7 @@ import { Settings } from "./filter/settings.mjs";
32
32
  import { FilterStyleSheet } from "./stylesheet/filter.mjs";
33
33
  import { getDocument, getWindow } from "../../dom/util.mjs";
34
34
  import { getGlobal } from "../../types/global.mjs";
35
- import { isInstance, isFunction, isObject, isArray } from "../../types/is.mjs";
35
+ import {isInstance, isFunction, isObject, isArray, isString} from "../../types/is.mjs";
36
36
  import { Host } from "../host/host.mjs";
37
37
  import { addAttributeToken } from "../../dom/attributes.mjs";
38
38
  import { ATTRIBUTE_ERRORMESSAGE } from "../../dom/constants.mjs";
@@ -242,6 +242,7 @@ class Filter extends CustomElement {
242
242
  * @property {Object} features Feature definitions
243
243
  * @property {boolean} features.storedConfig Stored configuration, this replaces the setting `storedConfig.enabled` @since 3.97.0
244
244
  * @property {boolean} features.autoFilter Auto filter @since 3.100.0
245
+ * @property {boolean} features.preventSameQuery Prevent same query @since 3.103.0
245
246
  * @property {Object} storedConfig Stored configuration
246
247
  * @property {boolean} storedConfig.enabled The store has been enabled, this option will no longer have any effect. @deprecated 20250101
247
248
  * @property {string} storedConfig.selector Selector
@@ -277,6 +278,7 @@ class Filter extends CustomElement {
277
278
  features: {
278
279
  storedConfig: false,
279
280
  autoFilter: true,
281
+ preventSameQuery: false,
280
282
  },
281
283
 
282
284
  storedConfig: {
@@ -1061,7 +1063,8 @@ function doSearch({ showEffect } = { showEffect: true }) {
1061
1063
  return Promise.reject(new Error(msg));
1062
1064
  }
1063
1065
 
1064
- if (buildQuery === this.getOption("query")) {
1066
+ if (this.getOption("features.preventSameQuery") &&
1067
+ buildQuery === this.getOption("query")) {
1065
1068
  const msg = this.getOption("labels.query-not-changed");
1066
1069
 
1067
1070
  if (showEffect) {
@@ -1201,6 +1204,22 @@ function collectSearchQueries() {
1201
1204
  ltOp: "<",
1202
1205
  });
1203
1206
  },
1207
+ "tag-list": (value, key) => {
1208
+
1209
+ if(isString(value)) {
1210
+ value = value.split(",");
1211
+ }
1212
+
1213
+ if (!isArray(value)) {
1214
+ return "";
1215
+ }
1216
+
1217
+ return key+" IN "+value
1218
+ .map((v) => {
1219
+ return `"${encodeURIComponent(v)}"`;
1220
+ })
1221
+ .join(",");
1222
+ },
1204
1223
  "date-range": (value, key) => {
1205
1224
  const query = parseDateInput(value, key);
1206
1225
  if (!query || query === "false") {
@@ -199,6 +199,7 @@ class SaveButton extends CustomElement {
199
199
  const ignoreChanges = self.getOption("ignoreChanges");
200
200
 
201
201
  const result = diff(self[originValuesSymbol], currentValues);
202
+
202
203
  if (isArray(ignoreChanges) && ignoreChanges.length > 0) {
203
204
  const itemsToRemove = [];
204
205
  for (const item of result) {