@schukai/monster 3.107.0 → 3.108.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 +11 -0
- package/package.json +1 -1
- package/source/components/datatable/filter.mjs +21 -10
- package/source/components/datatable/save-button.mjs +8 -10
- package/source/components/form/select.mjs +2236 -2248
- package/source/components/form/tree-select.mjs +369 -370
- package/source/data/buildmap.mjs +1 -1
- package/source/data/datasource/server/restapi.mjs +3 -3
- package/source/data/transformer.mjs +34 -1
- package/source/dom/updater.mjs +858 -854
- package/source/i18n/internal.mjs +103 -109
- package/source/i18n/map/languages.mjs +1 -3
- package/source/monster.mjs +1 -0
- package/source/types/global.mjs +45 -46
- package/source/types/version.mjs +1 -1
- package/test/cases/monster.mjs +1 -1
- package/test/web/test.html +2 -2
- package/test/web/tests.js +478 -149
package/CHANGELOG.md
CHANGED
@@ -2,6 +2,17 @@
|
|
2
2
|
|
3
3
|
|
4
4
|
|
5
|
+
## [3.108.0] - 2025-02-11
|
6
|
+
|
7
|
+
### Add Features
|
8
|
+
|
9
|
+
- new transformer commands [#292](https://gitlab.schukai.com/oss/libraries/javascript/monster/issues/292)
|
10
|
+
### Changes
|
11
|
+
|
12
|
+
- update nix, node, code format
|
13
|
+
|
14
|
+
|
15
|
+
|
5
16
|
## [3.107.0] - 2025-02-09
|
6
17
|
|
7
18
|
### Add Features
|
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.
|
1
|
+
{"author":"schukai GmbH","dependencies":{"@floating-ui/dom":"^1.6.13","@popperjs/core":"^2.11.8","buffer":"^6.0.3"},"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.108.0"}
|
@@ -32,7 +32,13 @@ 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 {
|
35
|
+
import {
|
36
|
+
isInstance,
|
37
|
+
isFunction,
|
38
|
+
isObject,
|
39
|
+
isArray,
|
40
|
+
isString,
|
41
|
+
} from "../../types/is.mjs";
|
36
42
|
import { Host } from "../host/host.mjs";
|
37
43
|
import { addAttributeToken } from "../../dom/attributes.mjs";
|
38
44
|
import { ATTRIBUTE_ERRORMESSAGE } from "../../dom/constants.mjs";
|
@@ -1063,8 +1069,10 @@ function doSearch({ showEffect } = { showEffect: true }) {
|
|
1063
1069
|
return Promise.reject(new Error(msg));
|
1064
1070
|
}
|
1065
1071
|
|
1066
|
-
if (
|
1067
|
-
|
1072
|
+
if (
|
1073
|
+
this.getOption("features.preventSameQuery") &&
|
1074
|
+
buildQuery === this.getOption("query")
|
1075
|
+
) {
|
1068
1076
|
const msg = this.getOption("labels.query-not-changed");
|
1069
1077
|
|
1070
1078
|
if (showEffect) {
|
@@ -1205,8 +1213,7 @@ function collectSearchQueries() {
|
|
1205
1213
|
});
|
1206
1214
|
},
|
1207
1215
|
"tag-list": (value, key) => {
|
1208
|
-
|
1209
|
-
if(isString(value)) {
|
1216
|
+
if (isString(value)) {
|
1210
1217
|
value = value.split(",");
|
1211
1218
|
}
|
1212
1219
|
|
@@ -1214,11 +1221,15 @@ function collectSearchQueries() {
|
|
1214
1221
|
return "";
|
1215
1222
|
}
|
1216
1223
|
|
1217
|
-
return
|
1218
|
-
|
1219
|
-
|
1220
|
-
|
1221
|
-
|
1224
|
+
return (
|
1225
|
+
key +
|
1226
|
+
" IN " +
|
1227
|
+
value
|
1228
|
+
.map((v) => {
|
1229
|
+
return `"${encodeURIComponent(v)}"`;
|
1230
|
+
})
|
1231
|
+
.join(",")
|
1232
|
+
);
|
1222
1233
|
},
|
1223
1234
|
"date-range": (value, key) => {
|
1224
1235
|
const query = parseDateInput(value, key);
|
@@ -129,7 +129,6 @@ class SaveButton extends CustomElement {
|
|
129
129
|
disabled: false,
|
130
130
|
|
131
131
|
logLevel: "off",
|
132
|
-
|
133
132
|
});
|
134
133
|
|
135
134
|
updateOptionsFromArguments.call(this, obj);
|
@@ -204,18 +203,18 @@ class SaveButton extends CustomElement {
|
|
204
203
|
const ignoreChanges = self.getOption("ignoreChanges");
|
205
204
|
|
206
205
|
const result = diff(self[originValuesSymbol], currentValues);
|
207
|
-
if(self.getOption("logLevel") === "debug") {
|
206
|
+
if (self.getOption("logLevel") === "debug") {
|
208
207
|
console.groupCollapsed("SaveButton");
|
209
208
|
console.log(result);
|
210
209
|
|
211
|
-
if(isArray(result)&&result.length>0) {
|
212
|
-
const formattedDiff = result.map(change => ({
|
210
|
+
if (isArray(result) && result.length > 0) {
|
211
|
+
const formattedDiff = result.map((change) => ({
|
213
212
|
Operator: change?.operator,
|
214
213
|
Path: change?.path?.join("."),
|
215
214
|
"First Value": change?.first?.value,
|
216
215
|
"First Type": change?.first?.type,
|
217
216
|
"Second Value": change?.second?.value,
|
218
|
-
"Second Type": change?.second?.type
|
217
|
+
"Second Type": change?.second?.type,
|
219
218
|
}));
|
220
219
|
|
221
220
|
console.table(formattedDiff);
|
@@ -223,7 +222,6 @@ class SaveButton extends CustomElement {
|
|
223
222
|
console.log("There are no changes to save");
|
224
223
|
}
|
225
224
|
console.groupEnd();
|
226
|
-
|
227
225
|
}
|
228
226
|
|
229
227
|
if (isArray(ignoreChanges) && ignoreChanges.length > 0) {
|
@@ -359,9 +357,9 @@ function initControlReferences() {
|
|
359
357
|
changed: new State(
|
360
358
|
"changed",
|
361
359
|
'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-cloud-arrow-up" viewBox="0 0 16 16">' +
|
362
|
-
|
363
|
-
|
364
|
-
|
360
|
+
'<path fill-rule="evenodd" d="M7.646 5.146a.5.5 0 0 1 .708 0l2 2a.5.5 0 0 1-.708.708L8.5 6.707V10.5a.5.5 0 0 1-1 0V6.707L6.354 7.854a.5.5 0 1 1-.708-.708z"/>' +
|
361
|
+
'<path d="M4.406 3.342A5.53 5.53 0 0 1 8 2c2.69 0 4.923 2 5.166 4.579C14.758 6.804 16 8.137 16 9.773 16 11.569 14.502 13 12.687 13H3.781C1.708 13 0 11.366 0 9.318c0-1.763 1.266-3.223 2.942-3.593.143-.863.698-1.723 1.464-2.383m.653.757c-.757.653-1.153 1.44-1.153 2.056v.448l-.445.049C2.064 6.805 1 7.952 1 9.318 1 10.785 2.23 12 3.781 12h8.906C13.98 12 15 10.988 15 9.773c0-1.216-1.02-2.228-2.313-2.228h-.5v-.5C12.188 4.825 10.328 3 8 3a4.53 4.53 0 0 0-2.941 1.1z"/>' +
|
362
|
+
"</svg>",
|
365
363
|
),
|
366
364
|
};
|
367
365
|
|
@@ -433,4 +431,4 @@ function getTemplate() {
|
|
433
431
|
`;
|
434
432
|
}
|
435
433
|
|
436
|
-
registerCustomElement(SaveButton);
|
434
|
+
registerCustomElement(SaveButton);
|