optimized-react-component-library-xyz123 0.28.6 → 0.28.7
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/dist/index.js +125 -133
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +125 -133
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/css/darkMode.css +0 -9
- package/src/css/questions.css +0 -9
package/dist/index.mjs
CHANGED
|
@@ -1,22 +1,29 @@
|
|
|
1
|
-
// src/components/
|
|
1
|
+
// src/components/input-components/InfoTextStandard/InfoTextStandard.tsx
|
|
2
|
+
import DOMPurify from "dompurify";
|
|
2
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
4
|
+
var InfoTextStandard = ({ infoText, selectedValue, questionId, activatedLanguage }) => {
|
|
5
|
+
return /* @__PURE__ */ jsx(
|
|
6
|
+
"div",
|
|
7
|
+
{
|
|
8
|
+
id: `textinfo-${questionId}-${selectedValue}`,
|
|
9
|
+
"aria-live": "polite",
|
|
10
|
+
"aria-atomic": "true",
|
|
11
|
+
children: infoText.length > 0 && /* @__PURE__ */ jsxs("div", { id: questionId, className: "pts-root-question pts-infoTextdStandard-container", children: [
|
|
12
|
+
/* @__PURE__ */ jsx("h2", { className: "sr-only", children: activatedLanguage === "en" ? `Information about selected alternative - ${selectedValue}` : `Information om valt alternativ - ${selectedValue}` }),
|
|
13
|
+
/* @__PURE__ */ jsx(
|
|
14
|
+
"div",
|
|
15
|
+
{
|
|
16
|
+
id: questionId,
|
|
17
|
+
dangerouslySetInnerHTML: {
|
|
18
|
+
__html: DOMPurify.sanitize(infoText != null ? infoText : "")
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
)
|
|
22
|
+
] })
|
|
23
|
+
}
|
|
24
|
+
);
|
|
18
25
|
};
|
|
19
|
-
var
|
|
26
|
+
var InfoTextStandard_default = InfoTextStandard;
|
|
20
27
|
|
|
21
28
|
// src/components/input-components/RadioMultipleStandard/RadioMultipleStandard.tsx
|
|
22
29
|
import { Fragment, jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
@@ -26,7 +33,7 @@ var InputRadio = ({
|
|
|
26
33
|
showPreview = false,
|
|
27
34
|
activatedLanguage = "sv"
|
|
28
35
|
}) => {
|
|
29
|
-
var _a, _b, _c;
|
|
36
|
+
var _a, _b, _c, _d;
|
|
30
37
|
const questionId = `question-${question.id}`;
|
|
31
38
|
const groupId = `radio-group-${question.id}`;
|
|
32
39
|
const errorId = `error-${question.id}`;
|
|
@@ -34,46 +41,59 @@ var InputRadio = ({
|
|
|
34
41
|
const e = { target: { value: event.target.value } };
|
|
35
42
|
handleQuestionInputChange(e, question);
|
|
36
43
|
};
|
|
44
|
+
const languageObj = question.languageSupport[0];
|
|
45
|
+
var optionsInfoText = [];
|
|
46
|
+
if ("optionsInfoText" in languageObj) {
|
|
47
|
+
optionsInfoText = languageObj.optionsInfoText;
|
|
48
|
+
}
|
|
49
|
+
console.log(optionsInfoText);
|
|
37
50
|
return /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
38
|
-
!showPreview && question.visible && /* @__PURE__ */
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
/* @__PURE__ */
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
51
|
+
!showPreview && question.visible && /* @__PURE__ */ jsxs2("div", { className: "pts-root-question pts-radioMultiple-container", id: questionId, children: [
|
|
52
|
+
/* @__PURE__ */ jsxs2(
|
|
53
|
+
"fieldset",
|
|
54
|
+
{
|
|
55
|
+
"aria-required": question.isQuestionMandatory,
|
|
56
|
+
"aria-invalid": question.hasValidationError ? question.hasValidationError : void 0,
|
|
57
|
+
"aria-errormessage": question.hasValidationError ? errorId : void 0,
|
|
58
|
+
children: [
|
|
59
|
+
/* @__PURE__ */ jsxs2("legend", { id: `label-${groupId}`, children: [
|
|
60
|
+
question.questionLabel,
|
|
61
|
+
" ",
|
|
62
|
+
question.isQuestionMandatory && /* @__PURE__ */ jsx2("span", { "aria-hidden": true, className: "pts-root-mandatoryAsterisk", children: "*" })
|
|
63
|
+
] }),
|
|
64
|
+
(_a = question.options) == null ? void 0 : _a.map((option, index) => /* @__PURE__ */ jsxs2("div", { className: "pts-radio-option", children: [
|
|
65
|
+
/* @__PURE__ */ jsx2(
|
|
66
|
+
"input",
|
|
67
|
+
{
|
|
68
|
+
type: "radio",
|
|
69
|
+
name: `name-${question.id}`,
|
|
70
|
+
id: `${groupId}-option-${index}`,
|
|
71
|
+
value: option.value,
|
|
72
|
+
checked: question.answer === option.value,
|
|
73
|
+
onChange: handleInputChange
|
|
74
|
+
}
|
|
75
|
+
),
|
|
76
|
+
/* @__PURE__ */ jsx2("label", { htmlFor: `${groupId}-option-${index}`, children: option.label }),
|
|
77
|
+
" "
|
|
78
|
+
] }, index)),
|
|
79
|
+
question.hasValidationError && /* @__PURE__ */ jsxs2("div", { className: "pts-root-error", id: errorId, children: [
|
|
80
|
+
/* @__PURE__ */ jsx2("span", { "aria-hidden": true, className: "errorDot", children: "!" }),
|
|
81
|
+
/* @__PURE__ */ jsx2("span", { className: "sr-only", children: "Valideringsfel" }),
|
|
82
|
+
/* @__PURE__ */ jsx2("span", { className: "errorText", children: question.validationDefaultMessesege })
|
|
83
|
+
] })
|
|
84
|
+
]
|
|
85
|
+
}
|
|
86
|
+
),
|
|
87
|
+
optionsInfoText.length > 0 && /* @__PURE__ */ jsx2(
|
|
88
|
+
InfoTextStandard_default,
|
|
89
|
+
{
|
|
90
|
+
infoText: (_c = (_b = optionsInfoText.find((op) => op.selectedValue === question.answer)) == null ? void 0 : _b.infoText) != null ? _c : "",
|
|
91
|
+
selectedValue: (_d = question.answer) != null ? _d : "",
|
|
92
|
+
questionId,
|
|
93
|
+
activatedLanguage: activatedLanguage != null ? activatedLanguage : "sv"
|
|
94
|
+
}
|
|
95
|
+
)
|
|
96
|
+
] }),
|
|
77
97
|
showPreview && /* @__PURE__ */ jsx2(PreviewRadio, { question })
|
|
78
98
|
] });
|
|
79
99
|
};
|
|
@@ -181,7 +201,7 @@ var CheckboxGroup = ({
|
|
|
181
201
|
showPreview = false,
|
|
182
202
|
activatedLanguage = "sv"
|
|
183
203
|
}) => {
|
|
184
|
-
var _a
|
|
204
|
+
var _a;
|
|
185
205
|
const questionId = `question-${question.id}`;
|
|
186
206
|
const errorId = `error-${question.id}`;
|
|
187
207
|
const groupId = `checkbox-group-${question.id}`;
|
|
@@ -233,15 +253,11 @@ var CheckboxGroup = ({
|
|
|
233
253
|
),
|
|
234
254
|
/* @__PURE__ */ jsx4("label", { htmlFor: `${groupId}-option-${index}`, children: option.label })
|
|
235
255
|
] }, index)),
|
|
236
|
-
/* @__PURE__ */
|
|
237
|
-
|
|
238
|
-
{
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
validationMessesege: (_c = question.validationDefaultMessesege) != null ? _c : "",
|
|
242
|
-
activatedLanguage
|
|
243
|
-
}
|
|
244
|
-
)
|
|
256
|
+
question.hasValidationError && /* @__PURE__ */ jsxs4("div", { className: "pts-root-error", id: errorId, children: [
|
|
257
|
+
/* @__PURE__ */ jsx4("span", { "aria-hidden": true, className: "errorDot", children: "!" }),
|
|
258
|
+
/* @__PURE__ */ jsx4("span", { className: "sr-only", children: "Valideringsfel" }),
|
|
259
|
+
/* @__PURE__ */ jsx4("span", { className: "errorText", children: question.validationDefaultMessesege })
|
|
260
|
+
] })
|
|
245
261
|
]
|
|
246
262
|
}
|
|
247
263
|
) }),
|
|
@@ -266,7 +282,7 @@ var PreviewCheckboxGroup = ({
|
|
|
266
282
|
};
|
|
267
283
|
|
|
268
284
|
// src/components/input-components/TextAreaStandard/TextAreaStandard.tsx
|
|
269
|
-
import
|
|
285
|
+
import DOMPurify2 from "dompurify";
|
|
270
286
|
import { Fragment as Fragment4, jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
271
287
|
var InputTextarea = ({
|
|
272
288
|
question,
|
|
@@ -274,7 +290,7 @@ var InputTextarea = ({
|
|
|
274
290
|
showPreview = false,
|
|
275
291
|
activatedLanguage
|
|
276
292
|
}) => {
|
|
277
|
-
var _a, _b, _c, _d, _e
|
|
293
|
+
var _a, _b, _c, _d, _e;
|
|
278
294
|
const questionId = `question-${question.id}`;
|
|
279
295
|
const inputId = `textarea-${question.id}`;
|
|
280
296
|
const aboutId = `about-${question.id}`;
|
|
@@ -298,7 +314,7 @@ var InputTextarea = ({
|
|
|
298
314
|
id: aboutId,
|
|
299
315
|
className: "pts-about",
|
|
300
316
|
dangerouslySetInnerHTML: {
|
|
301
|
-
__html:
|
|
317
|
+
__html: DOMPurify2.sanitize(question.aboutText)
|
|
302
318
|
}
|
|
303
319
|
}
|
|
304
320
|
),
|
|
@@ -317,24 +333,19 @@ var InputTextarea = ({
|
|
|
317
333
|
}
|
|
318
334
|
),
|
|
319
335
|
/* @__PURE__ */ jsxs5("div", { className: "pts-textarea-counter-error-container", children: [
|
|
320
|
-
/* @__PURE__ */
|
|
321
|
-
|
|
322
|
-
{
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
validationMessesege: (_c = question.validationDefaultMessesege) != null ? _c : "",
|
|
326
|
-
activatedLanguage: activatedLanguage != null ? activatedLanguage : "sv"
|
|
327
|
-
}
|
|
328
|
-
),
|
|
329
|
-
!((_d = question.questionExtraAttribute) == null ? void 0 : _d.hideTextCounter) && /* @__PURE__ */ jsxs5(
|
|
336
|
+
question.hasValidationError && /* @__PURE__ */ jsxs5("div", { className: "pts-root-error", id: errorId, children: [
|
|
337
|
+
/* @__PURE__ */ jsx5("span", { "aria-label": "Felmeddelande.", className: "errorDot", children: "!" }),
|
|
338
|
+
/* @__PURE__ */ jsx5("span", { className: "errorText", children: question.validationDefaultMessesege })
|
|
339
|
+
] }),
|
|
340
|
+
!((_b = question.questionExtraAttribute) == null ? void 0 : _b.hideTextCounter) && /* @__PURE__ */ jsxs5(
|
|
330
341
|
"div",
|
|
331
342
|
{
|
|
332
|
-
className: `pts-character-counter ${question.answer && (((
|
|
343
|
+
className: `pts-character-counter ${question.answer && (((_c = question.questionExtraAttribute) == null ? void 0 : _c.answerMaxLength) || defaultMaxLength) && question.answer.length > (((_d = question.questionExtraAttribute) == null ? void 0 : _d.answerMaxLength) || defaultMaxLength) ? "error" : ""}`,
|
|
333
344
|
children: [
|
|
334
345
|
question.answer ? question.answer.length : 0,
|
|
335
346
|
" av",
|
|
336
347
|
" ",
|
|
337
|
-
((
|
|
348
|
+
((_e = question.questionExtraAttribute) == null ? void 0 : _e.answerMaxLength) || defaultMaxLength,
|
|
338
349
|
" tecken"
|
|
339
350
|
]
|
|
340
351
|
}
|
|
@@ -367,7 +378,7 @@ var PreviewTextarea = ({
|
|
|
367
378
|
};
|
|
368
379
|
|
|
369
380
|
// src/components/input-components/TextFieldStandard/TextFieldStandard.tsx
|
|
370
|
-
import
|
|
381
|
+
import DOMPurify3 from "dompurify";
|
|
371
382
|
import { Fragment as Fragment5, jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
372
383
|
var TextFieldStandard = ({
|
|
373
384
|
question,
|
|
@@ -375,7 +386,7 @@ var TextFieldStandard = ({
|
|
|
375
386
|
showPreview = false,
|
|
376
387
|
activatedLanguage
|
|
377
388
|
}) => {
|
|
378
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m
|
|
389
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
|
|
379
390
|
const questionId = `question-${question.id}`;
|
|
380
391
|
const inputId = `textField-${question.id}`;
|
|
381
392
|
const aboutId = `about-${question.id}`;
|
|
@@ -399,7 +410,7 @@ var TextFieldStandard = ({
|
|
|
399
410
|
id: aboutId,
|
|
400
411
|
className: "pts-about",
|
|
401
412
|
dangerouslySetInnerHTML: {
|
|
402
|
-
__html:
|
|
413
|
+
__html: DOMPurify3.sanitize(question.aboutText)
|
|
403
414
|
}
|
|
404
415
|
}
|
|
405
416
|
),
|
|
@@ -425,15 +436,11 @@ var TextFieldStandard = ({
|
|
|
425
436
|
autoCapitalize: (_m = (_l = question.questionExtraAttribute) == null ? void 0 : _l.autoCapitalize) != null ? _m : void 0
|
|
426
437
|
}
|
|
427
438
|
),
|
|
428
|
-
/* @__PURE__ */
|
|
429
|
-
|
|
430
|
-
{
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
validationMessesege: (_o = question.validationDefaultMessesege) != null ? _o : "",
|
|
434
|
-
activatedLanguage: activatedLanguage != null ? activatedLanguage : "sv"
|
|
435
|
-
}
|
|
436
|
-
)
|
|
439
|
+
question.hasValidationError && /* @__PURE__ */ jsxs6("div", { className: "pts-root-error", id: errorId, children: [
|
|
440
|
+
/* @__PURE__ */ jsx6("span", { "aria-hidden": true, className: "errorDot", children: "!" }),
|
|
441
|
+
/* @__PURE__ */ jsx6("span", { className: "sr-only", children: "Valideringsfel" }),
|
|
442
|
+
/* @__PURE__ */ jsx6("span", { className: "errorText", children: question.validationDefaultMessesege })
|
|
443
|
+
] })
|
|
437
444
|
]
|
|
438
445
|
}
|
|
439
446
|
),
|
|
@@ -812,7 +819,6 @@ var AddFiles = ({
|
|
|
812
819
|
allowedTotalFileSize = 20971520
|
|
813
820
|
// 20MB = (1024 * 1024) * 20
|
|
814
821
|
}) => {
|
|
815
|
-
var _a, _b;
|
|
816
822
|
if (allowedFileTypes.length < 1) {
|
|
817
823
|
allowedFileTypes = [
|
|
818
824
|
"pdf",
|
|
@@ -856,7 +862,7 @@ var AddFiles = ({
|
|
|
856
862
|
}, []);
|
|
857
863
|
const onDrop = useCallback(
|
|
858
864
|
(acceptedFiles) => {
|
|
859
|
-
var
|
|
865
|
+
var _a, _b, _c;
|
|
860
866
|
const validationErrors = [];
|
|
861
867
|
const validFiles = [];
|
|
862
868
|
const currentTotalFileSize = (questionObject.files || []).reduce(
|
|
@@ -864,7 +870,7 @@ var AddFiles = ({
|
|
|
864
870
|
0
|
|
865
871
|
);
|
|
866
872
|
setTotalFileSize(currentTotalFileSize);
|
|
867
|
-
if ((((
|
|
873
|
+
if ((((_a = questionObject.files) == null ? void 0 : _a.length) || 0) >= allowedNumberOfFiles) {
|
|
868
874
|
acceptedFiles.forEach((file) => {
|
|
869
875
|
validationErrors.push({
|
|
870
876
|
FileName: file.name,
|
|
@@ -877,7 +883,7 @@ var AddFiles = ({
|
|
|
877
883
|
}
|
|
878
884
|
let accumulatedNewSize = 0;
|
|
879
885
|
for (const file of acceptedFiles) {
|
|
880
|
-
const fileExtension = ((
|
|
886
|
+
const fileExtension = ((_b = file.name.split(".").pop()) == null ? void 0 : _b.toLowerCase()) || "";
|
|
881
887
|
if (!allowedFileTypes.includes(fileExtension)) {
|
|
882
888
|
validationErrors.push({
|
|
883
889
|
FileName: file.name,
|
|
@@ -990,16 +996,11 @@ var AddFiles = ({
|
|
|
990
996
|
]
|
|
991
997
|
}
|
|
992
998
|
),
|
|
993
|
-
/* @__PURE__ */
|
|
994
|
-
|
|
995
|
-
{
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
validationMessesege: (_b = questionObject.validationDefaultMessesege) != null ? _b : "",
|
|
999
|
-
activatedLanguage,
|
|
1000
|
-
extraCssClass: "error addfileserror"
|
|
1001
|
-
}
|
|
1002
|
-
),
|
|
999
|
+
questionObject.hasValidationError && /* @__PURE__ */ jsxs10("div", { className: "pts-root-error error addfileserror", id: errorId, children: [
|
|
1000
|
+
/* @__PURE__ */ jsx12("span", { "aria-hidden": true, className: "errorDot", children: "!" }),
|
|
1001
|
+
/* @__PURE__ */ jsx12("span", { className: "sr-only", children: "Valideringsfel" }),
|
|
1002
|
+
/* @__PURE__ */ jsx12("span", { className: "errorText", children: questionObject.validationDefaultMessesege })
|
|
1003
|
+
] }),
|
|
1003
1004
|
/* @__PURE__ */ jsx12(
|
|
1004
1005
|
ExploreFilesStandard_default,
|
|
1005
1006
|
{
|
|
@@ -1065,7 +1066,7 @@ var SingleCheckbox = ({
|
|
|
1065
1066
|
showPreview = false,
|
|
1066
1067
|
activatedLanguage = "sv"
|
|
1067
1068
|
}) => {
|
|
1068
|
-
var _a, _b
|
|
1069
|
+
var _a, _b;
|
|
1069
1070
|
const questionId = `question-${question.id}`;
|
|
1070
1071
|
const inputId = `checkbox-${question.id}`;
|
|
1071
1072
|
const aboutId = `about-${question.id}`;
|
|
@@ -1118,15 +1119,12 @@ var SingleCheckbox = ({
|
|
|
1118
1119
|
}
|
|
1119
1120
|
),
|
|
1120
1121
|
" ",
|
|
1121
|
-
/* @__PURE__ */
|
|
1122
|
-
|
|
1123
|
-
{
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
activatedLanguage
|
|
1128
|
-
}
|
|
1129
|
-
)
|
|
1122
|
+
question.hasValidationError && /* @__PURE__ */ jsxs11("div", { className: "pts-root-error", id: errorId, children: [
|
|
1123
|
+
/* @__PURE__ */ jsx13("span", { "aria-hidden": true, className: "errorDot", children: "!" }),
|
|
1124
|
+
/* @__PURE__ */ jsx13("span", { className: "sr-only", children: "Valideringsfel" }),
|
|
1125
|
+
/* @__PURE__ */ jsx13("span", { className: "errorText", children: question.validationDefaultMessesege })
|
|
1126
|
+
] }),
|
|
1127
|
+
" "
|
|
1130
1128
|
] }),
|
|
1131
1129
|
" ",
|
|
1132
1130
|
showPreview && /* @__PURE__ */ jsx13(PreviewSingleCheckbox, { activatedLanguage, question })
|
|
@@ -1947,12 +1945,11 @@ var QuestionGroup = ({
|
|
|
1947
1945
|
showPreview = false,
|
|
1948
1946
|
markQuestionAsDisplayed
|
|
1949
1947
|
}) => {
|
|
1950
|
-
var _a
|
|
1948
|
+
var _a;
|
|
1951
1949
|
if (!questions || questions.length === 0) {
|
|
1952
1950
|
return null;
|
|
1953
1951
|
}
|
|
1954
1952
|
const firstQuestion = questions[0];
|
|
1955
|
-
const errorId = firstQuestion.id + "-error";
|
|
1956
1953
|
const groupMandatory = (_a = firstQuestion.validationType) == null ? void 0 : _a.find((e) => e.startsWith("groupCheck-"));
|
|
1957
1954
|
useEffect11(() => {
|
|
1958
1955
|
questions.forEach((question) => {
|
|
@@ -1993,15 +1990,10 @@ var QuestionGroup = ({
|
|
|
1993
1990
|
firstQuestion.validationDefaultMessesege
|
|
1994
1991
|
] })
|
|
1995
1992
|
] }),
|
|
1996
|
-
/* @__PURE__ */
|
|
1997
|
-
|
|
1998
|
-
{
|
|
1999
|
-
|
|
2000
|
-
validationId: errorId,
|
|
2001
|
-
validationMessesege: (_c = firstQuestion.validationDefaultMessesege) != null ? _c : "",
|
|
2002
|
-
activatedLanguage: activatedLanguage != null ? activatedLanguage : "sv"
|
|
2003
|
-
}
|
|
2004
|
-
),
|
|
1993
|
+
firstQuestion.hasValidationError && /* @__PURE__ */ jsxs13("div", { className: "pts-root-error", id: firstQuestion.id + "-error", children: [
|
|
1994
|
+
/* @__PURE__ */ jsx15("span", { "aria-label": "Valideringsfel", className: "errorDot", children: "!" }),
|
|
1995
|
+
/* @__PURE__ */ jsx15("span", { className: "errorText", children: firstQuestion.validationDefaultMessesege })
|
|
1996
|
+
] }),
|
|
2005
1997
|
groupQuestions
|
|
2006
1998
|
]
|
|
2007
1999
|
}
|
|
@@ -2659,7 +2651,7 @@ var SkipLinkStandard_default = SkipLink;
|
|
|
2659
2651
|
|
|
2660
2652
|
// src/components/text-blocks/TextHeadlineAndBodyStandard/TextHeadlineAndBodyStandard.tsx
|
|
2661
2653
|
import { createElement } from "react";
|
|
2662
|
-
import
|
|
2654
|
+
import DOMPurify4 from "dompurify";
|
|
2663
2655
|
import { jsx as jsx22, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
2664
2656
|
var TextHeadlineAndBody = ({ data, headlineType = "h2" }) => {
|
|
2665
2657
|
return /* @__PURE__ */ jsxs19(
|
|
@@ -2668,7 +2660,7 @@ var TextHeadlineAndBody = ({ data, headlineType = "h2" }) => {
|
|
|
2668
2660
|
className: "pts-textHeadlineAndBody-container",
|
|
2669
2661
|
children: [
|
|
2670
2662
|
data.headline && createElement(headlineType, { id: "textHeadlineAndBody-headline" }, data.headline),
|
|
2671
|
-
data.body && /* @__PURE__ */ jsx22("div", { dangerouslySetInnerHTML: { __html:
|
|
2663
|
+
data.body && /* @__PURE__ */ jsx22("div", { dangerouslySetInnerHTML: { __html: DOMPurify4.sanitize(data.body) } }),
|
|
2672
2664
|
data.linksForMoreInfo && data.linksForMoreInfo.length > 1 && /* @__PURE__ */ jsx22("ul", { className: "pts-moreinfo-list", children: data.linksForMoreInfo.map((link, index) => /* @__PURE__ */ jsx22("li", { className: index > 0 ? "notFirstInList" : "", children: /* @__PURE__ */ jsxs19(
|
|
2673
2665
|
"a",
|
|
2674
2666
|
{
|
|
@@ -2789,11 +2781,11 @@ var PrincipleOfPublicity = ({ activatedLanguage = "" }) => {
|
|
|
2789
2781
|
var PrincipleOfPublicityStandard_default = PrincipleOfPublicity;
|
|
2790
2782
|
|
|
2791
2783
|
// src/components/text-blocks/TextBody/TextBody.tsx
|
|
2792
|
-
import
|
|
2784
|
+
import DOMPurify5 from "dompurify";
|
|
2793
2785
|
import { jsx as jsx24, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
2794
2786
|
var TextBody = ({ data }) => {
|
|
2795
2787
|
return /* @__PURE__ */ jsxs20("div", { className: "pts-textBody-container", children: [
|
|
2796
|
-
data.body && /* @__PURE__ */ jsx24("div", { dangerouslySetInnerHTML: { __html:
|
|
2788
|
+
data.body && /* @__PURE__ */ jsx24("div", { dangerouslySetInnerHTML: { __html: DOMPurify5.sanitize(data.body) } }),
|
|
2797
2789
|
data.linksForMoreInfo && data.linksForMoreInfo.length > 1 && /* @__PURE__ */ jsx24("ul", { className: "pts-moreinfo-list", children: data.linksForMoreInfo.map((link, index) => /* @__PURE__ */ jsx24("li", { className: index > 0 ? "notFirstInList" : "", children: /* @__PURE__ */ jsxs20(
|
|
2798
2790
|
"a",
|
|
2799
2791
|
{
|