@schukai/monster 4.25.4 → 4.26.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 +22 -0
- package/package.json +1 -1
- package/source/components/content/viewer/message.mjs +14 -4
- package/source/components/datatable/filter.mjs +7 -17
- package/source/components/datatable/stylesheet/datatable.mjs +13 -6
- package/source/components/datatable/stylesheet/filter.mjs +13 -6
- package/source/components/form/select.mjs +2793 -2798
- package/source/components/form/stylesheet/action-button.mjs +13 -6
- package/source/components/form/stylesheet/button-bar.mjs +13 -6
- package/source/components/form/stylesheet/field-set.mjs +13 -6
- package/source/components/form/stylesheet/popper-button.mjs +13 -6
- package/source/components/form/stylesheet/select.mjs +13 -6
- package/source/components/navigation/style/wizard-navigation.pcss +113 -0
- package/source/components/navigation/stylesheet/wizard-navigation.mjs +31 -0
- package/source/components/navigation/wizard-navigation.mjs +219 -0
- package/source/components/style/accessibility.css +32 -1
- package/source/components/stylesheet/accessibility.mjs +13 -6
- package/source/components/tree-menu/tree-menu.mjs +1 -1
- package/source/types/uuid.mjs +1 -1
package/CHANGELOG.md
CHANGED
@@ -2,6 +2,28 @@
|
|
2
2
|
|
3
3
|
|
4
4
|
|
5
|
+
## [4.26.0] - 2025-07-03
|
6
|
+
|
7
|
+
### Add Features
|
8
|
+
|
9
|
+
- Improve random UUID generation check [#330](https://gitlab.schukai.com/oss/libraries/javascript/monster/issues/330)
|
10
|
+
### Bug Fixes
|
11
|
+
|
12
|
+
- Add HTML escaping for message headers to prevent XSS
|
13
|
+
|
14
|
+
|
15
|
+
|
16
|
+
## [4.25.5] - 2025-07-03
|
17
|
+
|
18
|
+
### Bug Fixes
|
19
|
+
|
20
|
+
- anlage von wizard-navigation [#329](https://gitlab.schukai.com/oss/libraries/javascript/monster/issues/329)
|
21
|
+
### Changes
|
22
|
+
|
23
|
+
- update styles
|
24
|
+
|
25
|
+
|
26
|
+
|
5
27
|
## [4.25.4] - 2025-07-03
|
6
28
|
|
7
29
|
### Bug Fixes
|
package/package.json
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"author":"schukai GmbH","dependencies":{"@floating-ui/dom":"^1.7.
|
1
|
+
{"author":"schukai GmbH","dependencies":{"@floating-ui/dom":"^1.7.2","@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.26.0"}
|
@@ -193,6 +193,15 @@ class MessageContent extends CustomElement {
|
|
193
193
|
this.setOption("message.subject", message?.subject || null);
|
194
194
|
this.setOption("message.messageID", message?.messageID || null);
|
195
195
|
|
196
|
+
function escapeHTML(str) {
|
197
|
+
return str
|
198
|
+
.replace(/&/g, "&")
|
199
|
+
.replace(/</g, "<")
|
200
|
+
.replace(/>/g, ">")
|
201
|
+
.replace(/"/g, """)
|
202
|
+
.replace(/'/g, "'");
|
203
|
+
}
|
204
|
+
|
196
205
|
const headers = [];
|
197
206
|
for (const [key, value] of Object.entries(message?.headers || {})) {
|
198
207
|
if (key && value) {
|
@@ -200,7 +209,8 @@ class MessageContent extends CustomElement {
|
|
200
209
|
if (isArray(valueString)) {
|
201
210
|
valueString = "<ul>";
|
202
211
|
for (const item of value) {
|
203
|
-
|
212
|
+
const escapedItem = escapeHTML(item);
|
213
|
+
valueString += `<li>${escapedItem}</li>`;
|
204
214
|
}
|
205
215
|
valueString += "</ul>";
|
206
216
|
}
|
@@ -286,7 +296,6 @@ class MessageContent extends CustomElement {
|
|
286
296
|
}
|
287
297
|
|
288
298
|
for (const cid in embeddedImages) {
|
289
|
-
|
290
299
|
const imagePart = embeddedImages[cid];
|
291
300
|
if (imagePart.content && imagePart.contentType) {
|
292
301
|
try {
|
@@ -319,10 +328,11 @@ class MessageContent extends CustomElement {
|
|
319
328
|
const objectUrl = URL.createObjectURL(blob);
|
320
329
|
this[embeddedImageUrlsSymbol].push(objectUrl); // Speichern zur späteren Widerrufung
|
321
330
|
|
322
|
-
|
331
|
+
const imgRegex =
|
332
|
+
/(<img\b(?:(?!src\s*=)[^>])*?)(?:\s+src\s*=\s*(["'])(?:\s*cid:[^'"]*|\s*)\2)?([^>]*>)/gi;
|
323
333
|
htmlContent = htmlContent.replace(
|
324
334
|
imgRegex,
|
325
|
-
`$1 src="${objectUrl}"$3
|
335
|
+
`$1 src="${objectUrl}"$3`,
|
326
336
|
);
|
327
337
|
} catch (e) {
|
328
338
|
console.error(
|
@@ -320,7 +320,6 @@ class Filter extends CustomElement {
|
|
320
320
|
},
|
321
321
|
i18n: true,
|
322
322
|
},
|
323
|
-
|
324
323
|
});
|
325
324
|
}
|
326
325
|
|
@@ -553,8 +552,7 @@ function getTranslations() {
|
|
553
552
|
reset: "Сброс",
|
554
553
|
save: "Сохранить",
|
555
554
|
"filter-name": "Имя фильтра",
|
556
|
-
"empty-query-and-no-default":
|
557
|
-
"Запрос пуст и нет запроса по умолчанию.",
|
555
|
+
"empty-query-and-no-default": "Запрос пуст и нет запроса по умолчанию.",
|
558
556
|
"query-not-changed":
|
559
557
|
"Поисковый запрос не изменился, поэтому поиск не требуется.",
|
560
558
|
};
|
@@ -564,10 +562,8 @@ function getTranslations() {
|
|
564
562
|
reset: "重置",
|
565
563
|
save: "保存",
|
566
564
|
"filter-name": "过滤器名称",
|
567
|
-
"empty-query-and-no-default":
|
568
|
-
|
569
|
-
"query-not-changed":
|
570
|
-
"搜索请求没有更改,因此不需要进行搜索。",
|
565
|
+
"empty-query-and-no-default": "查询为空,且没有默认查询。",
|
566
|
+
"query-not-changed": "搜索请求没有更改,因此不需要进行搜索。",
|
571
567
|
};
|
572
568
|
case "hi":
|
573
569
|
return {
|
@@ -575,8 +571,7 @@ function getTranslations() {
|
|
575
571
|
reset: "रीसेट करें",
|
576
572
|
save: "सहेजें",
|
577
573
|
"filter-name": "फ़िल्टर नाम",
|
578
|
-
"empty-query-and-no-default":
|
579
|
-
"क्वेरी खाली है और कोई डिफ़ॉल्ट क्वेरी नहीं है।",
|
574
|
+
"empty-query-and-no-default": "क्वेरी खाली है और कोई डिफ़ॉल्ट क्वेरी नहीं है।",
|
580
575
|
"query-not-changed":
|
581
576
|
"खोज अनुरोध में कोई बदलाव नहीं हुआ है, इसलिए खोज आवश्यक नहीं है।",
|
582
577
|
};
|
@@ -586,8 +581,7 @@ function getTranslations() {
|
|
586
581
|
reset: "রিসেট",
|
587
582
|
save: "সংরক্ষণ করুন",
|
588
583
|
"filter-name": "ফিল্টারের নাম",
|
589
|
-
"empty-query-and-no-default":
|
590
|
-
"কোয়েরি খালি এবং কোনো ডিফল্ট কোয়েরি নেই।",
|
584
|
+
"empty-query-and-no-default": "কোয়েরি খালি এবং কোনো ডিফল্ট কোয়েরি নেই।",
|
591
585
|
"query-not-changed":
|
592
586
|
"অনুসন্ধানের অনুরোধ পরিবর্তন হয়নি, তাই অনুসন্ধান প্রয়োজন নয়।",
|
593
587
|
};
|
@@ -599,8 +593,7 @@ function getTranslations() {
|
|
599
593
|
"filter-name": "フィルター名",
|
600
594
|
"empty-query-and-no-default":
|
601
595
|
"クエリが空で、デフォルトクエリがありません。",
|
602
|
-
"query-not-changed":
|
603
|
-
"検索リクエストに変更がないため、検索は不要です。",
|
596
|
+
"query-not-changed": "検索リクエストに変更がないため、検索は不要です。",
|
604
597
|
};
|
605
598
|
case "pa":
|
606
599
|
return {
|
@@ -608,8 +601,7 @@ function getTranslations() {
|
|
608
601
|
reset: "ਰੀਸੈੱਟ ਕਰੋ",
|
609
602
|
save: "ਸੇਵ ਕਰੋ",
|
610
603
|
"filter-name": "ਫਿਲਟਰ ਦਾ ਨਾਂ",
|
611
|
-
"empty-query-and-no-default":
|
612
|
-
"ਕੁਐਰੀ ਖਾਲੀ ਹੈ ਅਤੇ ਕੋਈ ਡਿਫੌਲਟ ਕੁਐਰੀ ਨਹੀਂ ਹੈ।",
|
604
|
+
"empty-query-and-no-default": "ਕੁਐਰੀ ਖਾਲੀ ਹੈ ਅਤੇ ਕੋਈ ਡਿਫੌਲਟ ਕੁਐਰੀ ਨਹੀਂ ਹੈ।",
|
613
605
|
"query-not-changed":
|
614
606
|
"ਖੋਜ ਦੀ ਬੇਨਤੀ ਵਿੱਚ ਕੋਈ ਤਬਦੀਲੀ ਨਹੀਂ ਆਈ ਹੈ, ਇਸ ਲਈ ਖੋਜ ਦੀ ਲੋੜ ਨਹੀਂ ਹੈ।",
|
615
607
|
};
|
@@ -626,7 +618,6 @@ function getTranslations() {
|
|
626
618
|
"The search request has not changed, so no search is required.",
|
627
619
|
};
|
628
620
|
}
|
629
|
-
|
630
621
|
}
|
631
622
|
|
632
623
|
/**
|
@@ -1165,7 +1156,6 @@ function doSearch({ showEffect } = { showEffect: true }) {
|
|
1165
1156
|
return collectSearchQueries
|
1166
1157
|
.call(this)
|
1167
1158
|
.then((query) => {
|
1168
|
-
|
1169
1159
|
const buildQuery = buildSearchQuery.call(this, query);
|
1170
1160
|
if (buildQuery === null) {
|
1171
1161
|
const msg = this.getOption("labels.empty-query-and-no-default");
|