optimized-react-component-library-xyz123 0.2.4 → 0.2.6
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.d.mts +10 -10
- package/dist/index.d.ts +10 -10
- package/dist/index.js +287 -294
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +277 -284
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/css/darkMode.css +10 -7
- package/src/css/mobileView.css +0 -9
- package/src/css/questions.css +33 -32
- package/src/css/styles.css +2 -16
package/dist/index.mjs
CHANGED
|
@@ -147,9 +147,98 @@ var PrevieMultipleCheckboxes = ({
|
|
|
147
147
|
] });
|
|
148
148
|
};
|
|
149
149
|
|
|
150
|
+
// src/components/input-components/CheckboxGroupStandard/CheckboxGroupStandard.tsx
|
|
151
|
+
import { useEffect as useEffect2, useState as useState2 } from "react";
|
|
152
|
+
import { Fragment as Fragment3, jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
153
|
+
var CheckboxGroup = ({
|
|
154
|
+
question,
|
|
155
|
+
handleQuestionInputChange,
|
|
156
|
+
showPreview = false,
|
|
157
|
+
activatedLanguage = "sv"
|
|
158
|
+
}) => {
|
|
159
|
+
var _a;
|
|
160
|
+
const questionId = `question-${question.id}`;
|
|
161
|
+
const errorId = `error-${question.id}`;
|
|
162
|
+
const groupId = `checkbox-group-${question.id}`;
|
|
163
|
+
const [checkedValues, setCheckedValues] = useState2([]);
|
|
164
|
+
useEffect2(() => {
|
|
165
|
+
var _a2;
|
|
166
|
+
const initialValues = ((_a2 = question.options) == null ? void 0 : _a2.filter((option) => {
|
|
167
|
+
var _a3;
|
|
168
|
+
return (_a3 = question.answer) == null ? void 0 : _a3.includes(option.label);
|
|
169
|
+
}).map((option) => option.label)) || [];
|
|
170
|
+
setCheckedValues(initialValues);
|
|
171
|
+
}, [question.answer, question.options]);
|
|
172
|
+
const handleInputChange = (event, optionValue) => {
|
|
173
|
+
let updatedValues = [...checkedValues];
|
|
174
|
+
if (updatedValues.includes(optionValue)) {
|
|
175
|
+
updatedValues = updatedValues.filter((val) => val !== optionValue);
|
|
176
|
+
} else {
|
|
177
|
+
updatedValues.push(optionValue);
|
|
178
|
+
}
|
|
179
|
+
setCheckedValues(updatedValues);
|
|
180
|
+
const e = { target: { value: updatedValues.toString() } };
|
|
181
|
+
handleQuestionInputChange(e, question);
|
|
182
|
+
};
|
|
183
|
+
return /* @__PURE__ */ jsxs3(Fragment3, { children: [
|
|
184
|
+
!showPreview && question.visible && /* @__PURE__ */ jsx3("div", { id: questionId, className: "pts-root-question pts-checkboxGroup-container", children: /* @__PURE__ */ jsxs3(
|
|
185
|
+
"fieldset",
|
|
186
|
+
{
|
|
187
|
+
"aria-required": question.isQuestionMandatory,
|
|
188
|
+
"aria-invalid": question.hasValidationError ? question.hasValidationError : void 0,
|
|
189
|
+
"aria-errormessage": question.hasValidationError ? errorId : void 0,
|
|
190
|
+
children: [
|
|
191
|
+
/* @__PURE__ */ jsxs3("legend", { className: "pts-checkboxGroup-legend", id: `label-${groupId}`, children: [
|
|
192
|
+
question.questionLabel,
|
|
193
|
+
" ",
|
|
194
|
+
question.isQuestionMandatory && /* @__PURE__ */ jsx3("span", { "aria-hidden": true, className: "pts-root-mandatoryAsterisk", children: "*" })
|
|
195
|
+
] }),
|
|
196
|
+
(_a = question.options) == null ? void 0 : _a.map((option, index) => /* @__PURE__ */ jsxs3("div", { className: "pts-checkboxGroup-options", children: [
|
|
197
|
+
/* @__PURE__ */ jsx3(
|
|
198
|
+
"input",
|
|
199
|
+
{
|
|
200
|
+
type: "checkbox",
|
|
201
|
+
name: `name-${question.id}`,
|
|
202
|
+
id: `${groupId}-option-${index}`,
|
|
203
|
+
value: option.label,
|
|
204
|
+
checked: checkedValues.includes(option.label),
|
|
205
|
+
onChange: (e) => handleInputChange(e, option.label),
|
|
206
|
+
className: question.hasValidationError ? "pts-root-question-input-error-border" : void 0
|
|
207
|
+
}
|
|
208
|
+
),
|
|
209
|
+
/* @__PURE__ */ jsx3("label", { htmlFor: `${groupId}-option-${index}`, children: option.label })
|
|
210
|
+
] }, index)),
|
|
211
|
+
question.hasValidationError && /* @__PURE__ */ jsxs3("div", { className: "pts-root-error", id: errorId, children: [
|
|
212
|
+
/* @__PURE__ */ jsx3("span", { "aria-hidden": true, className: "errorDot", children: "!" }),
|
|
213
|
+
/* @__PURE__ */ jsx3("span", { className: "sr-only", children: "Valideringsfel" }),
|
|
214
|
+
/* @__PURE__ */ jsx3("span", { className: "errorText", children: question.validationDefaultMessesege })
|
|
215
|
+
] })
|
|
216
|
+
]
|
|
217
|
+
}
|
|
218
|
+
) }),
|
|
219
|
+
showPreview && /* @__PURE__ */ jsx3(PreviewCheckboxGroup, { activatedLanguage, question })
|
|
220
|
+
] });
|
|
221
|
+
};
|
|
222
|
+
var CheckboxGroupStandard_default = CheckboxGroup;
|
|
223
|
+
var PreviewCheckboxGroup = ({
|
|
224
|
+
question,
|
|
225
|
+
activatedLanguage
|
|
226
|
+
}) => {
|
|
227
|
+
var _a, _b;
|
|
228
|
+
const previewId = `preview-${question.id}`;
|
|
229
|
+
return /* @__PURE__ */ jsxs3(Fragment3, { children: [
|
|
230
|
+
/* @__PURE__ */ jsx3("dt", { id: `question-${previewId}`, children: (_a = question.previewLabel) != null ? _a : question.questionLabel }),
|
|
231
|
+
question.answer ? question.options && question.options.length === 1 ? /* @__PURE__ */ jsx3("dd", { children: question.options[0].label }) : /* @__PURE__ */ jsx3("dd", { children: /* @__PURE__ */ jsx3("ul", { className: "pts-preview-answer-list", children: (_b = question.options) == null ? void 0 : _b.filter((option) => {
|
|
232
|
+
var _a2;
|
|
233
|
+
return (_a2 = question.answer) == null ? void 0 : _a2.includes(option.label);
|
|
234
|
+
}).map((option, index) => /* @__PURE__ */ jsx3("li", { children: option.label }, index)) }) }) : /* @__PURE__ */ jsx3("dd", { className: "no-answer-preview-page", children: activatedLanguage === "en" ? "No Answer" : "Inget svar" }),
|
|
235
|
+
" "
|
|
236
|
+
] });
|
|
237
|
+
};
|
|
238
|
+
|
|
150
239
|
// src/components/input-components/TextAreaStandard/TextAreaStandard.tsx
|
|
151
240
|
import DOMPurify from "dompurify";
|
|
152
|
-
import { Fragment as
|
|
241
|
+
import { Fragment as Fragment4, jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
153
242
|
var InputTextarea = ({
|
|
154
243
|
question,
|
|
155
244
|
handleQuestionInputChange,
|
|
@@ -162,19 +251,19 @@ var InputTextarea = ({
|
|
|
162
251
|
const aboutId = `about-${question.id}`;
|
|
163
252
|
const errorId = `error-${question.id}`;
|
|
164
253
|
const defaultMaxLength = 1e3;
|
|
165
|
-
return /* @__PURE__ */
|
|
166
|
-
!showPreview && question.visible && /* @__PURE__ */
|
|
254
|
+
return /* @__PURE__ */ jsxs4(Fragment4, { children: [
|
|
255
|
+
!showPreview && question.visible && /* @__PURE__ */ jsxs4(
|
|
167
256
|
"div",
|
|
168
257
|
{
|
|
169
258
|
id: questionId,
|
|
170
259
|
className: `pts-root-question pts-textArea-container${question.aboutText ? " pts-question-hasAbout" : ""}`,
|
|
171
260
|
children: [
|
|
172
|
-
/* @__PURE__ */
|
|
261
|
+
/* @__PURE__ */ jsxs4("label", { htmlFor: inputId, children: [
|
|
173
262
|
question.questionLabel,
|
|
174
263
|
" ",
|
|
175
|
-
question.isQuestionMandatory && /* @__PURE__ */
|
|
264
|
+
question.isQuestionMandatory && /* @__PURE__ */ jsx4("span", { className: "pts-root-mandatoryAsterisk", "aria-hidden": "true", children: "*" })
|
|
176
265
|
] }),
|
|
177
|
-
question.aboutText && /* @__PURE__ */
|
|
266
|
+
question.aboutText && /* @__PURE__ */ jsx4(
|
|
178
267
|
"div",
|
|
179
268
|
{
|
|
180
269
|
id: aboutId,
|
|
@@ -184,7 +273,7 @@ var InputTextarea = ({
|
|
|
184
273
|
}
|
|
185
274
|
}
|
|
186
275
|
),
|
|
187
|
-
/* @__PURE__ */
|
|
276
|
+
/* @__PURE__ */ jsx4(
|
|
188
277
|
"textarea",
|
|
189
278
|
{
|
|
190
279
|
className: question.hasValidationError ? "pts-root-question-input-error-border" : void 0,
|
|
@@ -198,12 +287,12 @@ var InputTextarea = ({
|
|
|
198
287
|
id: inputId
|
|
199
288
|
}
|
|
200
289
|
),
|
|
201
|
-
/* @__PURE__ */
|
|
202
|
-
question.hasValidationError && /* @__PURE__ */
|
|
203
|
-
/* @__PURE__ */
|
|
204
|
-
/* @__PURE__ */
|
|
290
|
+
/* @__PURE__ */ jsxs4("div", { className: "pts-textarea-counter-error-container", children: [
|
|
291
|
+
question.hasValidationError && /* @__PURE__ */ jsxs4("div", { className: "pts-root-error", id: errorId, children: [
|
|
292
|
+
/* @__PURE__ */ jsx4("span", { "aria-label": "Felmeddelande.", className: "errorDot", children: "!" }),
|
|
293
|
+
/* @__PURE__ */ jsx4("span", { className: "errorText", children: question.validationDefaultMessesege })
|
|
205
294
|
] }),
|
|
206
|
-
!((_b = question.questionExtraAttribute) == null ? void 0 : _b.hideTextCounter) && /* @__PURE__ */
|
|
295
|
+
!((_b = question.questionExtraAttribute) == null ? void 0 : _b.hideTextCounter) && /* @__PURE__ */ jsxs4(
|
|
207
296
|
"div",
|
|
208
297
|
{
|
|
209
298
|
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" : ""}`,
|
|
@@ -220,7 +309,7 @@ var InputTextarea = ({
|
|
|
220
309
|
]
|
|
221
310
|
}
|
|
222
311
|
),
|
|
223
|
-
showPreview && /* @__PURE__ */
|
|
312
|
+
showPreview && /* @__PURE__ */ jsx4(PreviewTextarea, { activatedLanguage, question })
|
|
224
313
|
] });
|
|
225
314
|
};
|
|
226
315
|
var TextAreaStandard_default = InputTextarea;
|
|
@@ -230,9 +319,9 @@ var PreviewTextarea = ({
|
|
|
230
319
|
}) => {
|
|
231
320
|
var _a, _b;
|
|
232
321
|
const previewId = `preview-${question.id}`;
|
|
233
|
-
return /* @__PURE__ */
|
|
234
|
-
/* @__PURE__ */
|
|
235
|
-
((_b = question.answer) == null ? void 0 : _b.trim()) ? /* @__PURE__ */
|
|
322
|
+
return /* @__PURE__ */ jsxs4(Fragment4, { children: [
|
|
323
|
+
/* @__PURE__ */ jsx4("dt", { id: `question-${previewId}`, children: (_a = question.previewLabel) != null ? _a : question.questionLabel }),
|
|
324
|
+
((_b = question.answer) == null ? void 0 : _b.trim()) ? /* @__PURE__ */ jsx4("dd", { className: "pts-textArea-preview pts-root-answer", id: `answer-${previewId}`, children: question.answer }) : /* @__PURE__ */ jsx4(
|
|
236
325
|
"dd",
|
|
237
326
|
{
|
|
238
327
|
className: "pts-textArea-preview pts-root-answer no-answer-preview-page",
|
|
@@ -245,7 +334,7 @@ var PreviewTextarea = ({
|
|
|
245
334
|
|
|
246
335
|
// src/components/input-components/TextFieldStandard/TextFieldStandard.tsx
|
|
247
336
|
import DOMPurify2 from "dompurify";
|
|
248
|
-
import { Fragment as
|
|
337
|
+
import { Fragment as Fragment5, jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
249
338
|
var TextFieldStandard = ({
|
|
250
339
|
question,
|
|
251
340
|
handleQuestionInputChange,
|
|
@@ -258,19 +347,19 @@ var TextFieldStandard = ({
|
|
|
258
347
|
const aboutId = `about-${question.id}`;
|
|
259
348
|
const errorId = `error-${question.id}`;
|
|
260
349
|
const defaultMaxLength = 1e3;
|
|
261
|
-
return /* @__PURE__ */
|
|
262
|
-
!showPreview && question.visible && /* @__PURE__ */
|
|
350
|
+
return /* @__PURE__ */ jsxs5(Fragment5, { children: [
|
|
351
|
+
!showPreview && question.visible && /* @__PURE__ */ jsxs5(
|
|
263
352
|
"div",
|
|
264
353
|
{
|
|
265
354
|
id: questionId,
|
|
266
355
|
className: `pts-root-question pts-textField-container${((_a = question.questionExtraAttribute) == null ? void 0 : _a.disabled) ? " pts-textField-disabled" : ""}${question.aboutText ? " pts-question-hasAbout" : ""}`.trim(),
|
|
267
356
|
children: [
|
|
268
|
-
/* @__PURE__ */
|
|
357
|
+
/* @__PURE__ */ jsxs5("label", { htmlFor: inputId, children: [
|
|
269
358
|
question.questionLabel,
|
|
270
359
|
" ",
|
|
271
|
-
question.isQuestionMandatory && /* @__PURE__ */
|
|
360
|
+
question.isQuestionMandatory && /* @__PURE__ */ jsx5("span", { "aria-hidden": "true", className: "pts-root-mandatoryAsterisk", children: "*" })
|
|
272
361
|
] }),
|
|
273
|
-
question.aboutText && /* @__PURE__ */
|
|
362
|
+
question.aboutText && /* @__PURE__ */ jsx5(
|
|
274
363
|
"div",
|
|
275
364
|
{
|
|
276
365
|
id: aboutId,
|
|
@@ -280,7 +369,7 @@ var TextFieldStandard = ({
|
|
|
280
369
|
}
|
|
281
370
|
}
|
|
282
371
|
),
|
|
283
|
-
/* @__PURE__ */
|
|
372
|
+
/* @__PURE__ */ jsx5(
|
|
284
373
|
"input",
|
|
285
374
|
{
|
|
286
375
|
type: (_c = (_b = question.questionExtraAttribute) == null ? void 0 : _b.inputType) != null ? _c : "text",
|
|
@@ -302,15 +391,15 @@ var TextFieldStandard = ({
|
|
|
302
391
|
autoCapitalize: (_m = (_l = question.questionExtraAttribute) == null ? void 0 : _l.autoCapitalize) != null ? _m : void 0
|
|
303
392
|
}
|
|
304
393
|
),
|
|
305
|
-
question.hasValidationError && /* @__PURE__ */
|
|
306
|
-
/* @__PURE__ */
|
|
307
|
-
/* @__PURE__ */
|
|
308
|
-
/* @__PURE__ */
|
|
394
|
+
question.hasValidationError && /* @__PURE__ */ jsxs5("div", { className: "pts-root-error", id: errorId, children: [
|
|
395
|
+
/* @__PURE__ */ jsx5("span", { "aria-hidden": true, className: "errorDot", children: "!" }),
|
|
396
|
+
/* @__PURE__ */ jsx5("span", { className: "sr-only", children: "Valideringsfel" }),
|
|
397
|
+
/* @__PURE__ */ jsx5("span", { className: "errorText", children: question.validationDefaultMessesege })
|
|
309
398
|
] })
|
|
310
399
|
]
|
|
311
400
|
}
|
|
312
401
|
),
|
|
313
|
-
showPreview && /* @__PURE__ */
|
|
402
|
+
showPreview && /* @__PURE__ */ jsx5(PreviewTextField, { activatedLanguage, question })
|
|
314
403
|
] });
|
|
315
404
|
};
|
|
316
405
|
var TextFieldStandard_default = TextFieldStandard;
|
|
@@ -320,9 +409,9 @@ var PreviewTextField = ({
|
|
|
320
409
|
}) => {
|
|
321
410
|
var _a, _b;
|
|
322
411
|
const previewId = `preview-${question.id}`;
|
|
323
|
-
return /* @__PURE__ */
|
|
324
|
-
/* @__PURE__ */
|
|
325
|
-
((_b = question.answer) == null ? void 0 : _b.trim()) ? /* @__PURE__ */
|
|
412
|
+
return /* @__PURE__ */ jsxs5(Fragment5, { children: [
|
|
413
|
+
/* @__PURE__ */ jsx5("dt", { id: `question-${previewId}`, children: (_a = question.previewLabel) != null ? _a : question.questionLabel }),
|
|
414
|
+
((_b = question.answer) == null ? void 0 : _b.trim()) ? /* @__PURE__ */ jsx5("dd", { className: "pts-textField-preview pts-root-answer", id: `answer-${previewId}`, children: question.answer }) : /* @__PURE__ */ jsx5(
|
|
326
415
|
"dd",
|
|
327
416
|
{
|
|
328
417
|
className: "pts-textField-preview pts-root-answer no-answer-preview-page",
|
|
@@ -334,12 +423,12 @@ var PreviewTextField = ({
|
|
|
334
423
|
};
|
|
335
424
|
|
|
336
425
|
// src/components/input-components/AddFilesStandard/AddFilesStandard.tsx
|
|
337
|
-
import { useCallback, useEffect as
|
|
426
|
+
import { useCallback, useEffect as useEffect5, useState as useState5 } from "react";
|
|
338
427
|
import clsx3 from "clsx";
|
|
339
428
|
|
|
340
429
|
// src/components/input-components/AddFilesStandard/DropFilesStandard.tsx
|
|
341
430
|
import { useDropzone } from "react-dropzone";
|
|
342
|
-
import { Fragment as
|
|
431
|
+
import { Fragment as Fragment6, jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
343
432
|
var DropFiles = ({ FilesSelected, DropFilesText = "Dra och sl\xE4pp dina filer h\xE4r", language }) => {
|
|
344
433
|
const onDrop = FilesSelected;
|
|
345
434
|
const { getRootProps, getInputProps, isDragActive } = useDropzone({ onDrop, noKeyboard: true });
|
|
@@ -347,10 +436,10 @@ var DropFiles = ({ FilesSelected, DropFilesText = "Dra och sl\xE4pp dina filer h
|
|
|
347
436
|
event.preventDefault();
|
|
348
437
|
event.stopPropagation();
|
|
349
438
|
};
|
|
350
|
-
return /* @__PURE__ */
|
|
351
|
-
/* @__PURE__ */
|
|
439
|
+
return /* @__PURE__ */ jsx6(Fragment6, { children: /* @__PURE__ */ jsx6("div", { className: "DropZoneContainer", children: /* @__PURE__ */ jsxs6("div", { className: "DropZone", ...getRootProps(), onClick: handleFileExplorer, children: [
|
|
440
|
+
/* @__PURE__ */ jsxs6("label", { htmlFor: "fileDropInput", hidden: true, children: [
|
|
352
441
|
"Dra och sl\xE4pp filer h\xE4r omr\xE5de",
|
|
353
|
-
/* @__PURE__ */
|
|
442
|
+
/* @__PURE__ */ jsx6(
|
|
354
443
|
"input",
|
|
355
444
|
{
|
|
356
445
|
...getInputProps({
|
|
@@ -361,8 +450,8 @@ var DropFiles = ({ FilesSelected, DropFilesText = "Dra och sl\xE4pp dina filer h
|
|
|
361
450
|
}
|
|
362
451
|
)
|
|
363
452
|
] }),
|
|
364
|
-
isDragActive ? /* @__PURE__ */
|
|
365
|
-
/* @__PURE__ */
|
|
453
|
+
isDragActive ? /* @__PURE__ */ jsx6("b", { className: "dropFilesNowText", children: language === "sv" ? "Sl\xE4pp filerna, nu ...!" : "Drop files here!" }) : /* @__PURE__ */ jsxs6("div", { className: "DropZone-label-container", children: [
|
|
454
|
+
/* @__PURE__ */ jsx6(
|
|
366
455
|
"svg",
|
|
367
456
|
{
|
|
368
457
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -370,7 +459,7 @@ var DropFiles = ({ FilesSelected, DropFilesText = "Dra och sl\xE4pp dina filer h
|
|
|
370
459
|
height: "2.4rem",
|
|
371
460
|
viewBox: "0 0 7 15",
|
|
372
461
|
fill: "#fff",
|
|
373
|
-
children: /* @__PURE__ */
|
|
462
|
+
children: /* @__PURE__ */ jsx6(
|
|
374
463
|
"path",
|
|
375
464
|
{
|
|
376
465
|
d: "M0 2.5C0 1.83696 0.263392 1.20107 0.732233 0.732233C1.20107 0.263392 1.83696 0 2.5 0C3.16304 0 3.79893 0.263392 4.26777 0.732233C4.73661 1.20107 5 1.83696 5 2.5V11.5C5 11.8978 4.84196 12.2794 4.56066 12.5607C4.27936 12.842 3.89782 13 3.5 13C3.10218 13 2.72064 12.842 2.43934 12.5607C2.15804 12.2794 2 11.8978 2 11.5V4.5C2 4.36739 2.05268 4.24021 2.14645 4.14645C2.24021 4.05268 2.36739 4 2.5 4C2.63261 4 2.75979 4.05268 2.85355 4.14645C2.94732 4.24021 3 4.36739 3 4.5V11.5C3 11.6326 3.05268 11.7598 3.14645 11.8536C3.24021 11.9473 3.36739 12 3.5 12C3.63261 12 3.75979 11.9473 3.85355 11.8536C3.94732 11.7598 4 11.6326 4 11.5V2.5C4 2.30302 3.9612 2.10796 3.88582 1.92597C3.81044 1.74399 3.69995 1.57863 3.56066 1.43934C3.42137 1.30005 3.25601 1.18956 3.07403 1.11418C2.89204 1.0388 2.69698 1 2.5 1C2.30302 1 2.10796 1.0388 1.92597 1.11418C1.74399 1.18956 1.57863 1.30005 1.43934 1.43934C1.30005 1.57863 1.18956 1.74399 1.11418 1.92597C1.0388 2.10796 1 2.30302 1 2.5V11.5C1 12.163 1.26339 12.7989 1.73223 13.2678C2.20107 13.7366 2.83696 14 3.5 14C4.16304 14 4.79893 13.7366 5.26777 13.2678C5.73661 12.7989 6 12.163 6 11.5V4.5C6 4.36739 6.05268 4.24021 6.14645 4.14645C6.24021 4.05268 6.36739 4 6.5 4C6.63261 4 6.75979 4.05268 6.85355 4.14645C6.94732 4.24021 7 4.36739 7 4.5V11.5C7 12.4283 6.63125 13.3185 5.97487 13.9749C5.3185 14.6313 4.42826 15 3.5 15C2.57174 15 1.6815 14.6313 1.02513 13.9749C0.368749 13.3185 0 12.4283 0 11.5V2.5Z",
|
|
@@ -379,7 +468,7 @@ var DropFiles = ({ FilesSelected, DropFilesText = "Dra och sl\xE4pp dina filer h
|
|
|
379
468
|
)
|
|
380
469
|
}
|
|
381
470
|
),
|
|
382
|
-
/* @__PURE__ */
|
|
471
|
+
/* @__PURE__ */ jsx6("p", { className: "dropFilesText", children: DropFilesText })
|
|
383
472
|
] })
|
|
384
473
|
] }) }) });
|
|
385
474
|
};
|
|
@@ -391,7 +480,7 @@ import clsx from "clsx";
|
|
|
391
480
|
|
|
392
481
|
// src/components/input-components/AddFilesStandard/ScreenReaderErrors.tsx
|
|
393
482
|
import React from "react";
|
|
394
|
-
import { Fragment as
|
|
483
|
+
import { Fragment as Fragment7, jsx as jsx7 } from "react/jsx-runtime";
|
|
395
484
|
var ScreenReaderErrors = ({
|
|
396
485
|
errorMessageAddingFile,
|
|
397
486
|
activatedLanguage
|
|
@@ -410,12 +499,12 @@ var ScreenReaderErrors = ({
|
|
|
410
499
|
setActivateErrorMessagesForScreenReader(true);
|
|
411
500
|
}
|
|
412
501
|
}, [errorMessageAddingFile]);
|
|
413
|
-
return /* @__PURE__ */
|
|
502
|
+
return /* @__PURE__ */ jsx7(Fragment7, { children: activateErrorMessagesForScreenReader && /* @__PURE__ */ jsx7("p", { role: "alert", className: "sr-only", "aria-atomic": "true", children: errorMessagesForScreenReader }) });
|
|
414
503
|
};
|
|
415
504
|
var ScreenReaderErrors_default = ScreenReaderErrors;
|
|
416
505
|
|
|
417
506
|
// src/components/input-components/AddFilesStandard/ExploreFilesStandard.tsx
|
|
418
|
-
import { Fragment as
|
|
507
|
+
import { Fragment as Fragment8, jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
419
508
|
var ExploreFiles = ({
|
|
420
509
|
FilesSelected,
|
|
421
510
|
numberOfFiles,
|
|
@@ -442,8 +531,8 @@ var ExploreFiles = ({
|
|
|
442
531
|
};
|
|
443
532
|
let addFilesInfoText = numberOfFiles > 0 ? activatedLanguage === "sv" ? `${numberOfFiles} filer valda (max ${allowedNumberOfFiles})` : `${numberOfFiles} files chosed (max ${allowedNumberOfFiles})` : activatedLanguage === "sv" ? "Ingen fil vald" : "No file chosen";
|
|
444
533
|
const ariaLabelText = `${activatedLanguage === "sv" ? "V\xE4lj fil" : "Choose file"} ${addFilesInfoText}`;
|
|
445
|
-
return /* @__PURE__ */
|
|
446
|
-
/* @__PURE__ */
|
|
534
|
+
return /* @__PURE__ */ jsx8(Fragment8, { children: /* @__PURE__ */ jsxs7("div", { className: "inputContainer", children: [
|
|
535
|
+
/* @__PURE__ */ jsxs7(
|
|
447
536
|
"div",
|
|
448
537
|
{
|
|
449
538
|
className: clsx(
|
|
@@ -453,7 +542,7 @@ var ExploreFiles = ({
|
|
|
453
542
|
),
|
|
454
543
|
id: labelId,
|
|
455
544
|
children: [
|
|
456
|
-
/* @__PURE__ */
|
|
545
|
+
/* @__PURE__ */ jsx8(
|
|
457
546
|
"button",
|
|
458
547
|
{
|
|
459
548
|
ref: buttonInputRef,
|
|
@@ -467,12 +556,12 @@ var ExploreFiles = ({
|
|
|
467
556
|
children: activatedLanguage === "sv" ? "V\xE4lj fil" : "Choose file"
|
|
468
557
|
}
|
|
469
558
|
),
|
|
470
|
-
/* @__PURE__ */
|
|
471
|
-
/* @__PURE__ */
|
|
559
|
+
/* @__PURE__ */ jsx8("span", { "aria-hidden": true, className: "filePickText", children: addFilesInfoText }),
|
|
560
|
+
/* @__PURE__ */ jsx8("label", { htmlFor: inputId, "aria-hidden": true, className: "invisible" })
|
|
472
561
|
]
|
|
473
562
|
}
|
|
474
563
|
),
|
|
475
|
-
/* @__PURE__ */
|
|
564
|
+
/* @__PURE__ */ jsx8(
|
|
476
565
|
"input",
|
|
477
566
|
{
|
|
478
567
|
"aria-hidden": true,
|
|
@@ -485,7 +574,7 @@ var ExploreFiles = ({
|
|
|
485
574
|
id: inputId
|
|
486
575
|
}
|
|
487
576
|
),
|
|
488
|
-
/* @__PURE__ */
|
|
577
|
+
/* @__PURE__ */ jsx8(
|
|
489
578
|
ScreenReaderErrors_default,
|
|
490
579
|
{
|
|
491
580
|
errorMessageAddingFile,
|
|
@@ -497,22 +586,22 @@ var ExploreFiles = ({
|
|
|
497
586
|
var ExploreFilesStandard_default = ExploreFiles;
|
|
498
587
|
|
|
499
588
|
// src/components/input-components/AddFilesStandard/SelectedFilesStandard.tsx
|
|
500
|
-
import React4, { useEffect as
|
|
589
|
+
import React4, { useEffect as useEffect4, useState as useState4, useRef as useRef2 } from "react";
|
|
501
590
|
import { Col, Row } from "react-bootstrap";
|
|
502
591
|
|
|
503
592
|
// src/components/input-components/AddFilesStandard/IndicatorStandard.tsx
|
|
504
|
-
import { useState as
|
|
593
|
+
import { useState as useState3 } from "react";
|
|
505
594
|
import clsx2 from "clsx";
|
|
506
|
-
import { Fragment as
|
|
595
|
+
import { Fragment as Fragment9, jsx as jsx9 } from "react/jsx-runtime";
|
|
507
596
|
var Indicator = (filename) => {
|
|
508
|
-
const [uploadPercentage, setUploadPercentage] =
|
|
509
|
-
const [uploadDone, setUploadDone] =
|
|
510
|
-
return /* @__PURE__ */
|
|
597
|
+
const [uploadPercentage, setUploadPercentage] = useState3(0);
|
|
598
|
+
const [uploadDone, setUploadDone] = useState3(false);
|
|
599
|
+
return /* @__PURE__ */ jsx9(Fragment9, { children: /* @__PURE__ */ jsx9("div", { className: clsx2("uploadIndicator", "uploadDone") }) });
|
|
511
600
|
};
|
|
512
601
|
var IndicatorStandard_default = Indicator;
|
|
513
602
|
|
|
514
603
|
// src/components/input-components/AddFilesStandard/SelectedFilesStandard.tsx
|
|
515
|
-
import { Fragment as
|
|
604
|
+
import { Fragment as Fragment10, jsx as jsx10, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
516
605
|
var SelectedFiles = ({
|
|
517
606
|
questionObject,
|
|
518
607
|
isTouched,
|
|
@@ -534,13 +623,13 @@ var SelectedFiles = ({
|
|
|
534
623
|
isTouched(e, questionObject);
|
|
535
624
|
removeFile(newCountOfFiles);
|
|
536
625
|
};
|
|
537
|
-
|
|
626
|
+
useEffect4(() => {
|
|
538
627
|
var _a;
|
|
539
628
|
numberOfFiles > 0 && ((_a = theDiv.current) == null ? void 0 : _a.scrollIntoView({ behavior: "smooth", block: "end" }));
|
|
540
629
|
}, [numberOfFiles]);
|
|
541
630
|
const useWindowWidth = () => {
|
|
542
|
-
const [windowWidth2, setWindowWidth] =
|
|
543
|
-
|
|
631
|
+
const [windowWidth2, setWindowWidth] = useState4(window.innerWidth);
|
|
632
|
+
useEffect4(() => {
|
|
544
633
|
const handleResize = () => {
|
|
545
634
|
setWindowWidth(window.innerWidth);
|
|
546
635
|
};
|
|
@@ -552,10 +641,10 @@ var SelectedFiles = ({
|
|
|
552
641
|
return windowWidth2;
|
|
553
642
|
};
|
|
554
643
|
const windowWidth = useWindowWidth();
|
|
555
|
-
return /* @__PURE__ */
|
|
556
|
-
/* @__PURE__ */
|
|
557
|
-
/* @__PURE__ */
|
|
558
|
-
/* @__PURE__ */
|
|
644
|
+
return /* @__PURE__ */ jsxs8(Fragment10, { children: [
|
|
645
|
+
/* @__PURE__ */ jsx10("div", { children: errorMessageAddingFile.length > 0 && /* @__PURE__ */ jsxs8("div", { className: "pts-errorSummary-container pts-addFile-error-container", children: [
|
|
646
|
+
/* @__PURE__ */ jsx10("span", { "aria-hidden": "true", className: "errorDot", children: "!" }),
|
|
647
|
+
/* @__PURE__ */ jsx10("div", { className: "addFile-error-list-container", children: /* @__PURE__ */ jsxs8("ul", { "aria-hidden": true, className: "fileListUnorderedList", id: "errorSummary-ul", children: [
|
|
559
648
|
" ",
|
|
560
649
|
errorMessageAddingFile.map((errorObj, index) => {
|
|
561
650
|
const errorFileName = errorObj.FileName;
|
|
@@ -563,9 +652,9 @@ var SelectedFiles = ({
|
|
|
563
652
|
mobileFirstFileName = mobileFirstFileName.length > 8 ? mobileFirstFileName.substring(0, 8) + ".." : mobileFirstFileName;
|
|
564
653
|
const fileType = errorObj.FileName.split(".").pop();
|
|
565
654
|
mobileFirstFileName = mobileFirstFileName + "." + fileType;
|
|
566
|
-
return /* @__PURE__ */
|
|
567
|
-
/* @__PURE__ */
|
|
568
|
-
/* @__PURE__ */
|
|
655
|
+
return /* @__PURE__ */ jsx10("li", { children: /* @__PURE__ */ jsx10(React4.Fragment, { children: /* @__PURE__ */ jsx10("div", { children: /* @__PURE__ */ jsx10("div", { className: "fileInListContainer", children: /* @__PURE__ */ jsxs8("div", { className: "fileInList", children: [
|
|
656
|
+
/* @__PURE__ */ jsx10(Row, { children: /* @__PURE__ */ jsx10(Col, { children: windowWidth < 768 ? /* @__PURE__ */ jsx10("span", { className: "mobileFirstFileName", children: mobileFirstFileName }) : /* @__PURE__ */ jsx10("span", { className: "desktopFileName", children: errorObj.FileName }) }) }),
|
|
657
|
+
/* @__PURE__ */ jsx10(Row, { children: /* @__PURE__ */ jsx10(
|
|
569
658
|
Col,
|
|
570
659
|
{
|
|
571
660
|
className: "errorMessageAddingFile",
|
|
@@ -580,7 +669,7 @@ var SelectedFiles = ({
|
|
|
580
669
|
] }, index) }) }) }, `error-${errorObj.FileName}-${index}`) });
|
|
581
670
|
})
|
|
582
671
|
] }) }),
|
|
583
|
-
/* @__PURE__ */
|
|
672
|
+
/* @__PURE__ */ jsx10("div", { className: "addFile-error-close-button", children: /* @__PURE__ */ jsx10(
|
|
584
673
|
"button",
|
|
585
674
|
{
|
|
586
675
|
className: "selectedFilesLinkButton error-close",
|
|
@@ -588,7 +677,7 @@ var SelectedFiles = ({
|
|
|
588
677
|
removeError();
|
|
589
678
|
},
|
|
590
679
|
"aria-label": activatedLanguage === "sv" ? `St\xE4ng felmeddelande` : `Close error message`,
|
|
591
|
-
children: /* @__PURE__ */
|
|
680
|
+
children: /* @__PURE__ */ jsx10(
|
|
592
681
|
"svg",
|
|
593
682
|
{
|
|
594
683
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -596,7 +685,7 @@ var SelectedFiles = ({
|
|
|
596
685
|
height: "14",
|
|
597
686
|
viewBox: "0 0 14 14",
|
|
598
687
|
fill: "none",
|
|
599
|
-
children: /* @__PURE__ */
|
|
688
|
+
children: /* @__PURE__ */ jsx10(
|
|
600
689
|
"path",
|
|
601
690
|
{
|
|
602
691
|
d: "M0.75 12.75L12.75 0.75M0.75 0.75L12.75 12.75",
|
|
@@ -610,15 +699,15 @@ var SelectedFiles = ({
|
|
|
610
699
|
}
|
|
611
700
|
) })
|
|
612
701
|
] }) }),
|
|
613
|
-
questionObject.files.length > 0 && /* @__PURE__ */
|
|
702
|
+
questionObject.files.length > 0 && /* @__PURE__ */ jsx10("ul", { className: "fileListUnorderedList", "aria-label": "Uppladdade filer", children: questionObject.files.map((file, index) => {
|
|
614
703
|
const indicatorfileName = file.FileName;
|
|
615
704
|
let mobileFirstFileName = file.FileName.split(".").shift();
|
|
616
705
|
mobileFirstFileName = mobileFirstFileName.length > 8 ? mobileFirstFileName.substring(0, 8) + ".." : mobileFirstFileName;
|
|
617
706
|
const fileType = file.FileName.split(".").pop();
|
|
618
707
|
mobileFirstFileName = mobileFirstFileName + "." + fileType;
|
|
619
|
-
return /* @__PURE__ */
|
|
620
|
-
/* @__PURE__ */
|
|
621
|
-
/* @__PURE__ */
|
|
708
|
+
return /* @__PURE__ */ jsx10("li", { children: /* @__PURE__ */ jsx10(React4.Fragment, { children: /* @__PURE__ */ jsx10("div", { children: /* @__PURE__ */ jsx10("div", { className: "fileInListContainer", children: /* @__PURE__ */ jsxs8("div", { className: "fileInList", children: [
|
|
709
|
+
/* @__PURE__ */ jsxs8("div", { className: "fileItem", children: [
|
|
710
|
+
/* @__PURE__ */ jsx10(Col, { style: { maxWidth: "30px" }, children: /* @__PURE__ */ jsx10("span", { "aria-hidden": "true", className: "uploadedDot", children: /* @__PURE__ */ jsx10(
|
|
622
711
|
"svg",
|
|
623
712
|
{
|
|
624
713
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -626,7 +715,7 @@ var SelectedFiles = ({
|
|
|
626
715
|
height: "8",
|
|
627
716
|
viewBox: "0 0 8 8",
|
|
628
717
|
fill: "none",
|
|
629
|
-
children: /* @__PURE__ */
|
|
718
|
+
children: /* @__PURE__ */ jsx10(
|
|
630
719
|
"path",
|
|
631
720
|
{
|
|
632
721
|
d: "M1 4.65913L2.8 6.45913L7 1.35913",
|
|
@@ -637,20 +726,20 @@ var SelectedFiles = ({
|
|
|
637
726
|
)
|
|
638
727
|
}
|
|
639
728
|
) }) }),
|
|
640
|
-
/* @__PURE__ */
|
|
729
|
+
/* @__PURE__ */ jsx10(Col, { children: windowWidth < 768 ? /* @__PURE__ */ jsxs8("span", { className: "mobileFirstFileName", children: [
|
|
641
730
|
mobileFirstFileName,
|
|
642
731
|
" (",
|
|
643
732
|
Math.ceil(file.FileSize / (1024 * 1024)),
|
|
644
733
|
" ",
|
|
645
734
|
"MB)"
|
|
646
|
-
] }) : /* @__PURE__ */
|
|
735
|
+
] }) : /* @__PURE__ */ jsxs8("span", { className: "desktopFileName", children: [
|
|
647
736
|
file.FileName,
|
|
648
737
|
" (",
|
|
649
|
-
/* @__PURE__ */
|
|
738
|
+
/* @__PURE__ */ jsx10("span", { className: "fileSizeText", children: file.FileSize < 1024 * 1024 ? `${Math.round(file.FileSize / 1024)} kB` : `${(file.FileSize / (1024 * 1024)).toFixed(1)} MB` }),
|
|
650
739
|
" ",
|
|
651
740
|
")"
|
|
652
741
|
] }) }),
|
|
653
|
-
/* @__PURE__ */
|
|
742
|
+
/* @__PURE__ */ jsx10(Col, { className: "lastCol", children: /* @__PURE__ */ jsx10(
|
|
654
743
|
"button",
|
|
655
744
|
{
|
|
656
745
|
className: "selectedFilesLinkButton",
|
|
@@ -660,17 +749,17 @@ var SelectedFiles = ({
|
|
|
660
749
|
}
|
|
661
750
|
) })
|
|
662
751
|
] }),
|
|
663
|
-
showIndicator && /* @__PURE__ */
|
|
664
|
-
/* @__PURE__ */
|
|
752
|
+
showIndicator && /* @__PURE__ */ jsx10(Row, { children: /* @__PURE__ */ jsx10(Col, { style: { width: "100%", padding: 0 }, children: /* @__PURE__ */ jsx10(IndicatorStandard_default, { filename: indicatorfileName }) }) }),
|
|
753
|
+
/* @__PURE__ */ jsx10(Row, { style: { marginTop: "12px", marginBottom: "12px" }, children: /* @__PURE__ */ jsx10(Col, { className: "makeSpace" }) })
|
|
665
754
|
] }, index) }) }) }, `file-${file.FileName}-${index}`) });
|
|
666
755
|
}) }),
|
|
667
|
-
/* @__PURE__ */
|
|
756
|
+
/* @__PURE__ */ jsx10("div", { ref: theDiv, className: "pts-clipboard-container" })
|
|
668
757
|
] });
|
|
669
758
|
};
|
|
670
759
|
var SelectedFilesStandard_default = SelectedFiles;
|
|
671
760
|
|
|
672
761
|
// src/components/input-components/AddFilesStandard/AddFilesStandard.tsx
|
|
673
|
-
import { Fragment as
|
|
762
|
+
import { Fragment as Fragment11, jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
674
763
|
var AddFiles = ({
|
|
675
764
|
questionObject,
|
|
676
765
|
handleQuestionInputChange = (e, questionObject2) => {
|
|
@@ -708,19 +797,19 @@ var AddFiles = ({
|
|
|
708
797
|
const errorId = `error-${questionObject.id}`;
|
|
709
798
|
const labelId = `label-${questionObject.id}`;
|
|
710
799
|
const maxSizeMB = Math.round(allowedTotalFileSize / 1048576);
|
|
711
|
-
const [numberOfFiles, setNumberOfFiles] =
|
|
712
|
-
const [totalFileSize, setTotalFileSize] =
|
|
713
|
-
const [errorMessageAddingFile, setErrorMessageAddingFile] =
|
|
714
|
-
const [newFiles, setNewFiles] =
|
|
715
|
-
const [dropFilesText, setDropFilesText] =
|
|
716
|
-
|
|
800
|
+
const [numberOfFiles, setNumberOfFiles] = useState5(0);
|
|
801
|
+
const [totalFileSize, setTotalFileSize] = useState5(0);
|
|
802
|
+
const [errorMessageAddingFile, setErrorMessageAddingFile] = useState5([]);
|
|
803
|
+
const [newFiles, setNewFiles] = useState5([]);
|
|
804
|
+
const [dropFilesText, setDropFilesText] = useState5("Dra och sl\xE4pp dina filer h\xE4r");
|
|
805
|
+
useEffect5(() => {
|
|
717
806
|
if (activatedLanguage === "sv") {
|
|
718
807
|
setDropFilesText("Dra och sl\xE4pp dina filer h\xE4r");
|
|
719
808
|
} else {
|
|
720
809
|
setDropFilesText("Drag and drop your files here");
|
|
721
810
|
}
|
|
722
811
|
}, [activatedLanguage]);
|
|
723
|
-
|
|
812
|
+
useEffect5(() => {
|
|
724
813
|
if (questionObject.files && questionObject.files.length > 0) {
|
|
725
814
|
setNumberOfFiles(questionObject.files.length);
|
|
726
815
|
}
|
|
@@ -815,7 +904,7 @@ var AddFiles = ({
|
|
|
815
904
|
reader.readAsDataURL(file);
|
|
816
905
|
});
|
|
817
906
|
};
|
|
818
|
-
|
|
907
|
+
useEffect5(() => {
|
|
819
908
|
if (newFiles.length > 0) {
|
|
820
909
|
const currentFiles = questionObject.files ? questionObject.files : [];
|
|
821
910
|
const e = {
|
|
@@ -842,9 +931,9 @@ var AddFiles = ({
|
|
|
842
931
|
const handleRemoveErrors = () => {
|
|
843
932
|
setErrorMessageAddingFile([]);
|
|
844
933
|
};
|
|
845
|
-
return /* @__PURE__ */
|
|
846
|
-
!showPreview && visible && /* @__PURE__ */
|
|
847
|
-
questionObject.aboutText && /* @__PURE__ */
|
|
934
|
+
return /* @__PURE__ */ jsxs9(Fragment11, { children: [
|
|
935
|
+
!showPreview && visible && /* @__PURE__ */ jsx11("div", { className: "root-question addFile-question-container", children: /* @__PURE__ */ jsxs9("div", { role: "group", children: [
|
|
936
|
+
questionObject.aboutText && /* @__PURE__ */ jsxs9(
|
|
848
937
|
"p",
|
|
849
938
|
{
|
|
850
939
|
id: aboutId,
|
|
@@ -854,19 +943,19 @@ var AddFiles = ({
|
|
|
854
943
|
),
|
|
855
944
|
children: [
|
|
856
945
|
questionObject.aboutText,
|
|
857
|
-
questionObject.isQuestionMandatory && /* @__PURE__ */
|
|
946
|
+
questionObject.isQuestionMandatory && /* @__PURE__ */ jsxs9("span", { className: "pts-root-mandatoryAsterisk", "aria-hidden": "true", children: [
|
|
858
947
|
" ",
|
|
859
948
|
"*"
|
|
860
949
|
] })
|
|
861
950
|
]
|
|
862
951
|
}
|
|
863
952
|
),
|
|
864
|
-
questionObject.hasValidationError && /* @__PURE__ */
|
|
865
|
-
/* @__PURE__ */
|
|
866
|
-
/* @__PURE__ */
|
|
867
|
-
/* @__PURE__ */
|
|
953
|
+
questionObject.hasValidationError && /* @__PURE__ */ jsxs9("div", { className: "pts-root-error error addfileserror", id: errorId, children: [
|
|
954
|
+
/* @__PURE__ */ jsx11("span", { "aria-hidden": true, className: "errorDot", children: "!" }),
|
|
955
|
+
/* @__PURE__ */ jsx11("span", { className: "sr-only", children: "Valideringsfel" }),
|
|
956
|
+
/* @__PURE__ */ jsx11("span", { className: "errorText", children: questionObject.validationDefaultMessesege })
|
|
868
957
|
] }),
|
|
869
|
-
/* @__PURE__ */
|
|
958
|
+
/* @__PURE__ */ jsx11(
|
|
870
959
|
ExploreFilesStandard_default,
|
|
871
960
|
{
|
|
872
961
|
FilesSelected: onDrop,
|
|
@@ -882,7 +971,7 @@ var AddFiles = ({
|
|
|
882
971
|
removeUploadErrors: handleRemoveErrors
|
|
883
972
|
}
|
|
884
973
|
),
|
|
885
|
-
/* @__PURE__ */
|
|
974
|
+
/* @__PURE__ */ jsx11(
|
|
886
975
|
DropFilesStandard_default,
|
|
887
976
|
{
|
|
888
977
|
FilesSelected: onDrop,
|
|
@@ -890,7 +979,7 @@ var AddFiles = ({
|
|
|
890
979
|
language: activatedLanguage
|
|
891
980
|
}
|
|
892
981
|
),
|
|
893
|
-
/* @__PURE__ */
|
|
982
|
+
/* @__PURE__ */ jsx11(
|
|
894
983
|
SelectedFilesStandard_default,
|
|
895
984
|
{
|
|
896
985
|
questionObject,
|
|
@@ -905,7 +994,7 @@ var AddFiles = ({
|
|
|
905
994
|
}
|
|
906
995
|
)
|
|
907
996
|
] }) }),
|
|
908
|
-
showPreview && /* @__PURE__ */
|
|
997
|
+
showPreview && /* @__PURE__ */ jsx11(PreviewAddFiles, { activatedLanguage, questionObject })
|
|
909
998
|
] });
|
|
910
999
|
};
|
|
911
1000
|
var AddFilesStandard_default = AddFiles;
|
|
@@ -914,104 +1003,11 @@ var PreviewAddFiles = ({
|
|
|
914
1003
|
activatedLanguage
|
|
915
1004
|
}) => {
|
|
916
1005
|
const previewId = `preview-${questionObject.Id}`;
|
|
917
|
-
return /* @__PURE__ */ jsxs8(Fragment10, { children: [
|
|
918
|
-
/* @__PURE__ */ jsx10("dt", { id: `question-${previewId}`, children: questionObject.questionLabel ? questionObject.questionLabel : activatedLanguage === "en" ? "Attached files" : "Bifogade filer" }),
|
|
919
|
-
questionObject.files && questionObject.files.length > 0 ? /* @__PURE__ */ jsx10("dd", { className: "pts-addFiles-answer", children: /* @__PURE__ */ jsx10("ul", { "aria-labelledby": previewId, className: "pts-preview-answer-list", children: questionObject.files.map((file, index) => {
|
|
920
|
-
return /* @__PURE__ */ jsx10("li", { children: file.FileName }, `file-${index}-${file.FileName}`);
|
|
921
|
-
}) }) }) : /* @__PURE__ */ jsx10("dd", { className: "no-answer-preview-page", children: activatedLanguage === "en" ? "No attached files" : "Inga bifogade filer" })
|
|
922
|
-
] });
|
|
923
|
-
};
|
|
924
|
-
|
|
925
|
-
// src/components/input-components/SingleCheckboxStandard/SingleCheckboxStandard.tsx
|
|
926
|
-
import { useEffect as useEffect5, useState as useState5 } from "react";
|
|
927
|
-
import { Fragment as Fragment11, jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
928
|
-
var SingleCheckbox = ({
|
|
929
|
-
question,
|
|
930
|
-
handleQuestionInputChange,
|
|
931
|
-
showPreview = false,
|
|
932
|
-
activatedLanguage = "sv"
|
|
933
|
-
}) => {
|
|
934
|
-
var _a, _b;
|
|
935
|
-
const questionId = `question-${question.id}`;
|
|
936
|
-
const inputId = `checkbox-${question.id}`;
|
|
937
|
-
const aboutId = `about-${question.id}`;
|
|
938
|
-
const errorId = `error-${question.id}`;
|
|
939
|
-
const [checked, setChecked] = useState5(false);
|
|
940
|
-
useEffect5(() => {
|
|
941
|
-
if (question.answer && question.answer === "true") {
|
|
942
|
-
setChecked(true);
|
|
943
|
-
} else {
|
|
944
|
-
setChecked(false);
|
|
945
|
-
}
|
|
946
|
-
}, [question.answer]);
|
|
947
|
-
const handleInputChange = (event) => {
|
|
948
|
-
setChecked(event.target.checked);
|
|
949
|
-
let answer = event.target.checked ? "true" : "false";
|
|
950
|
-
const e = { target: { value: answer } };
|
|
951
|
-
handleQuestionInputChange(e, question);
|
|
952
|
-
};
|
|
953
|
-
return /* @__PURE__ */ jsxs9(Fragment11, { children: [
|
|
954
|
-
!showPreview && question.visible && /* @__PURE__ */ jsxs9("div", { id: questionId, className: "pts-root-question pts-singleCheckbox-container", children: [
|
|
955
|
-
/* @__PURE__ */ jsxs9("div", { className: "pts-singleCheckbox-row", children: [
|
|
956
|
-
/* @__PURE__ */ jsx11(
|
|
957
|
-
"input",
|
|
958
|
-
{
|
|
959
|
-
type: "checkbox",
|
|
960
|
-
name: `question-name-${question.id}`,
|
|
961
|
-
id: `${inputId}`,
|
|
962
|
-
value: (_a = question.questionLabel) != null ? _a : "",
|
|
963
|
-
checked,
|
|
964
|
-
onChange: (e) => handleInputChange(e),
|
|
965
|
-
className: question.hasValidationError ? "pts-root-question-input-error-border" : void 0,
|
|
966
|
-
disabled: (_b = question.questionExtraAttribute) == null ? void 0 : _b.disabled,
|
|
967
|
-
required: question.isQuestionMandatory,
|
|
968
|
-
"aria-required": question.isQuestionMandatory,
|
|
969
|
-
"aria-describedby": [question.aboutText ? aboutId : null].filter(Boolean).join(" ") || void 0,
|
|
970
|
-
"aria-invalid": question.hasValidationError,
|
|
971
|
-
"aria-errormessage": question.hasValidationError ? errorId : void 0
|
|
972
|
-
}
|
|
973
|
-
),
|
|
974
|
-
/* @__PURE__ */ jsx11("label", { htmlFor: `${inputId}`, children: question.questionLabel }),
|
|
975
|
-
question.isQuestionMandatory && /* @__PURE__ */ jsx11("span", { "aria-hidden": true, className: "pts-root-mandatoryAsterisk", children: "*" }),
|
|
976
|
-
" "
|
|
977
|
-
] }),
|
|
978
|
-
question.aboutText && /* @__PURE__ */ jsx11(
|
|
979
|
-
"div",
|
|
980
|
-
{
|
|
981
|
-
id: aboutId,
|
|
982
|
-
className: "pts-about",
|
|
983
|
-
dangerouslySetInnerHTML: { __html: question.aboutText }
|
|
984
|
-
}
|
|
985
|
-
),
|
|
986
|
-
" ",
|
|
987
|
-
question.hasValidationError && /* @__PURE__ */ jsxs9("div", { className: "pts-root-error", id: errorId, children: [
|
|
988
|
-
/* @__PURE__ */ jsx11("span", { "aria-hidden": true, className: "errorDot", children: "!" }),
|
|
989
|
-
/* @__PURE__ */ jsx11("span", { className: "sr-only", children: "Valideringsfel" }),
|
|
990
|
-
/* @__PURE__ */ jsx11("span", { className: "errorText", children: question.validationDefaultMessesege })
|
|
991
|
-
] }),
|
|
992
|
-
" "
|
|
993
|
-
] }),
|
|
994
|
-
" ",
|
|
995
|
-
showPreview && /* @__PURE__ */ jsx11(PreviewSingleCheckbox, { activatedLanguage, question })
|
|
996
|
-
] });
|
|
997
|
-
};
|
|
998
|
-
var SingleCheckboxStandard_default = SingleCheckbox;
|
|
999
|
-
var PreviewSingleCheckbox = ({
|
|
1000
|
-
question,
|
|
1001
|
-
activatedLanguage
|
|
1002
|
-
}) => {
|
|
1003
|
-
var _a, _b;
|
|
1004
|
-
const previewId = `preview-${question.id}`;
|
|
1005
1006
|
return /* @__PURE__ */ jsxs9(Fragment11, { children: [
|
|
1006
|
-
/* @__PURE__ */ jsx11("dt", { id: `question-${previewId}`, children:
|
|
1007
|
-
|
|
1008
|
-
"
|
|
1009
|
-
|
|
1010
|
-
className: "pts-singleCheckbox-preview pts-root-answer",
|
|
1011
|
-
id: `answer-${previewId}`,
|
|
1012
|
-
children: activatedLanguage === "sv" ? "Nej" : "No"
|
|
1013
|
-
}
|
|
1014
|
-
)
|
|
1007
|
+
/* @__PURE__ */ jsx11("dt", { id: `question-${previewId}`, children: questionObject.questionLabel ? questionObject.questionLabel : activatedLanguage === "en" ? "Attached files" : "Bifogade filer" }),
|
|
1008
|
+
questionObject.files && questionObject.files.length > 0 ? /* @__PURE__ */ jsx11("dd", { className: "pts-addFiles-answer", children: /* @__PURE__ */ jsx11("ul", { "aria-labelledby": previewId, className: "pts-preview-answer-list", children: questionObject.files.map((file, index) => {
|
|
1009
|
+
return /* @__PURE__ */ jsx11("li", { children: file.FileName }, `file-${index}-${file.FileName}`);
|
|
1010
|
+
}) }) }) : /* @__PURE__ */ jsx11("dd", { className: "no-answer-preview-page", children: activatedLanguage === "en" ? "No attached files" : "Inga bifogade filer" })
|
|
1015
1011
|
] });
|
|
1016
1012
|
};
|
|
1017
1013
|
|
|
@@ -1757,8 +1753,8 @@ var QuestionRenderer = ({
|
|
|
1757
1753
|
visible: question.visible
|
|
1758
1754
|
}
|
|
1759
1755
|
),
|
|
1760
|
-
question.questionType === "
|
|
1761
|
-
|
|
1756
|
+
question.questionType === "Checkbox" && /* @__PURE__ */ jsx12(
|
|
1757
|
+
MultipleCheckboxesStandard_default,
|
|
1762
1758
|
{
|
|
1763
1759
|
question,
|
|
1764
1760
|
handleQuestionInputChange,
|
|
@@ -1766,8 +1762,8 @@ var QuestionRenderer = ({
|
|
|
1766
1762
|
activatedLanguage
|
|
1767
1763
|
}
|
|
1768
1764
|
),
|
|
1769
|
-
question.questionType === "
|
|
1770
|
-
|
|
1765
|
+
question.questionType === "CheckboxGroup" && /* @__PURE__ */ jsx12(
|
|
1766
|
+
CheckboxGroupStandard_default,
|
|
1771
1767
|
{
|
|
1772
1768
|
question,
|
|
1773
1769
|
handleQuestionInputChange,
|
|
@@ -1931,89 +1927,86 @@ var CookieBanner_default = CookieBanner;
|
|
|
1931
1927
|
// src/components/layout/FooterStandard/FooterStandard.tsx
|
|
1932
1928
|
import { jsx as jsx15, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1933
1929
|
var Footer = ({ activatedLanguage = "sv" }) => {
|
|
1934
|
-
return /* @__PURE__ */
|
|
1935
|
-
/* @__PURE__ */
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
"
|
|
1930
|
+
return /* @__PURE__ */ jsx15("footer", { className: "pts-footer-container", children: /* @__PURE__ */ jsxs13("div", { className: "pts-footer-content", children: [
|
|
1931
|
+
/* @__PURE__ */ jsxs13(
|
|
1932
|
+
"svg",
|
|
1933
|
+
{
|
|
1934
|
+
"aria-label": activatedLanguage === "en" ? "PTS logotype" : "PTS logotyp",
|
|
1935
|
+
className: "pts-footer-logo",
|
|
1936
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1937
|
+
width: "278",
|
|
1938
|
+
height: "72",
|
|
1939
|
+
viewBox: "0 0 278 72",
|
|
1940
|
+
fill: "none",
|
|
1941
|
+
children: [
|
|
1942
|
+
/* @__PURE__ */ jsx15(
|
|
1943
|
+
"path",
|
|
1944
|
+
{
|
|
1945
|
+
d: "M54 43C54 47.2 51.5 51.1 47.6 52.3C45.8 52.8 44 53 41 53H24.5C21.4 53 21 53.5 21 56.5V63C21 65.4 19.5 67 17.5 67C15.5 67 14 65.4 14 63V58.5C14 56.5 14 54.8 14.2 53.9C14.8 50.5 16.8 47.9 20.1 46.7C21.4 46.2 23.6 45.9 27.9 45.9H42C43.2 45.9 44.4 45.8 44.9 45.6C46.4 45 46.9 44 46.9 42.9C46.9 41.8 46.5 40.7 44.9 40.2C44.4 40 43.2 39.9 42 39.9H19.4C18.5 39.9 17.7 39.9 17.3 39.7C15.8 39.2 14.9 37.8 14.9 36.4C14.9 35 15.8 33.6 17.3 33.1C17.8 32.9 18.3 32.9 19.3 32.9H40.9C44 32.9 46.4 33.1 47.9 33.7C51.8 35.2 53.9 38.4 53.9 42.9L54 43ZM95.7 33.3C95.2 33.1 94.4 33 93.3 33H61.6C60.8 33 60.1 33 59.7 33.2C58 33.7 57 35 57 36.5C57 38 57.8 39.2 59.4 39.7C59.9 39.9 60.7 40 61.6 40H74V63.4C74 65.8 75.6 67 77.5 67C79.4 67 81 65.8 81 63.4V40H93.3C94.5 40 95.1 40 95.5 39.8C97.1 39.3 98 38 98 36.5C98 35 97.2 33.8 95.7 33.3ZM133.5 47.4C131.8 46.5 129.6 46 124.1 46H113.5C111.8 46 110.9 45.9 110.3 45.7C108.6 45.1 108 44 108 43C108 42 108.4 40.8 110.2 40.2C110.7 40 111.6 40 112.5 40H132C132.4 40 133.5 40 133.8 40C135.6 39.7 137 38.6 137 36.6C137 34.6 135.6 33.6 133.9 33.2C133.6 33.2 132.9 33.1 132 33.1H113.5C110.2 33.1 107.8 33.5 106.2 34.2C102.9 35.8 101 39.2 101 43.1C101 47 102.8 50.5 106.4 52.1C108 52.8 110.4 53.1 113.5 53.1H127C128.7 53.1 129.6 53.3 130.2 53.5C131.6 54 132 55.4 132 56.6C132 57.8 131.6 59.3 129.9 59.8C129.3 60 128.1 60.1 126.1 60.1H106.5C105.7 60.1 104.9 60.1 104.5 60.3C102.9 60.7 102 62 102 63.6C102 65.2 103 66.2 104.3 66.7C104.8 66.9 105.9 67.1 106.7 67.1H124C127.7 67.1 130.7 66.9 132.5 66.3C136.6 65.1 138.9 61.2 138.9 56.6C138.9 52 136.8 49.2 133.4 47.5L133.5 47.4Z",
|
|
1946
|
+
fill: "white"
|
|
1947
|
+
}
|
|
1948
|
+
),
|
|
1949
|
+
/* @__PURE__ */ jsx15(
|
|
1950
|
+
"path",
|
|
1951
|
+
{
|
|
1952
|
+
d: "M92.1 15.7L92.5 15C90 11.6 84.1 9.2 78.1 9H76.9C70.9 9.2 65 11.6 62.5 15L62.9 15.7C61.8 15.7 61 16.4 61 17.3L63.3 27C63.5 27.6 63.7 27.9 64.5 27.9H90.5C91.2 27.9 91.5 27.5 91.6 27L93.9 17.3C93.9 16.4 93.1 15.7 92 15.7H92.1ZM69.3 18.8C69.1 18.8 68.8 18.7 68.6 18.7C67.6 18.7 66.9 19.4 66.9 20.3C66.9 21.2 67.6 21.8 68.5 21.8C69.4 21.8 69.3 21.7 69.5 21.4C69.5 22.2 68.6 24 67.4 24H64.9C63.2 24 63 21.7 63 21.5C63.2 21.7 63.7 21.8 64.1 21.8C64.9 21.8 65.6 21.2 65.6 20.3C65.6 19.4 64.9 18.7 63.9 18.7C62.9 18.7 63.5 18.7 63.4 18.7C63.8 18.4 64.2 17.9 64.2 17.3C64.2 16.7 63.9 16.4 63.5 16.1L65.8 15C67.3 12.5 70 10.7 73.3 10C71.5 11.3 70 12.9 68.8 15L69.6 15.7C68.8 15.8 68.2 16.5 68.2 17.3C68.2 18.1 68.6 18.5 69.2 18.8H69.3ZM76.8 18.9C76.6 18.8 76.2 18.7 76 18.7C75 18.7 74.3 19.4 74.3 20.3C74.3 21.2 75 21.8 75.9 21.8C76.8 21.8 76.7 21.7 77 21.5C77 22.3 76.4 24 75 24H72.5C70.9 24 70.5 22 70.5 21.4C70.7 21.6 71.1 21.8 71.6 21.8C72.4 21.8 73.2 21.2 73.2 20.3C73.2 19.4 72.5 18.7 71.5 18.7C70.5 18.7 70.9 18.7 70.8 18.8C71.4 18.5 71.8 18 71.8 17.3C71.8 16.6 71.4 16.1 70.8 15.9L72.6 15C73.1 13.2 74.7 10.6 76.4 9.7C76.2 10.6 76.1 12.5 76.1 15C76.1 15 76.6 15.5 77.1 15.8C76.4 16 75.9 16.6 75.9 17.3C75.9 18 76.3 18.5 76.9 18.8L76.8 18.9ZM82.5 24H80C78.6 24 78 22.3 78 21.5C78.2 21.7 78.6 21.8 79.1 21.8C80 21.8 80.7 21.2 80.7 20.3C80.7 19.4 80 18.7 79 18.7C78 18.7 78.4 18.7 78.2 18.9C78.8 18.7 79.3 18.1 79.3 17.4C79.3 16.7 78.8 16.1 78.1 15.9C78.6 15.6 79.1 15.1 79.1 15.1C79.1 12.6 79 10.7 78.7 9.8C80.5 10.7 82.1 13.2 82.6 15.1L84.4 16C83.9 16.2 83.4 16.8 83.4 17.4C83.4 18 83.8 18.6 84.4 18.9C84.2 18.9 83.9 18.8 83.7 18.8C82.7 18.8 82 19.5 82 20.4C82 21.3 82.7 21.9 83.6 21.9C84.5 21.9 84.4 21.8 84.7 21.5C84.7 22 84.3 24.1 82.7 24.1L82.5 24ZM90 24H87.5C86.2 24 85.4 22.3 85.4 21.4C85.6 21.7 86 21.8 86.5 21.8C87.3 21.8 88 21.2 88 20.3C88 19.4 87.3 18.7 86.3 18.7C85.3 18.7 85.7 18.7 85.6 18.8C86.2 18.5 86.6 18 86.6 17.3C86.6 16.6 86 15.8 85.1 15.7L86 15C84.8 12.9 83.3 11.4 81.5 10C84.7 10.7 87.5 12.4 89 15L91.4 16.1C91 16.4 90.7 16.8 90.7 17.4C90.7 18 91.1 18.6 91.6 18.9C91.5 18.9 91.2 18.8 91 18.8C90 18.8 89.3 19.5 89.3 20.4C89.3 21.3 90 21.9 90.8 21.9C91.6 21.9 91.7 21.8 91.9 21.6C91.9 21.8 91.6 24.1 90 24.1V24ZM77.5 9C76.1 9 75 7.9 75 6.5C75 5.1 75.9 4.3 77 4.1V3H76V2H77V1H78V2H79V3H78V4.1C79.1 4.3 80 5.3 80 6.6C80 7.9 78.9 9.1 77.5 9.1V9Z",
|
|
1953
|
+
fill: "white"
|
|
1954
|
+
}
|
|
1955
|
+
)
|
|
1956
|
+
]
|
|
1957
|
+
}
|
|
1958
|
+
),
|
|
1959
|
+
/* @__PURE__ */ jsx15("nav", { className: "pts-footer-linkList", children: /* @__PURE__ */ jsxs13("ul", { children: [
|
|
1960
|
+
/* @__PURE__ */ jsx15("li", { children: /* @__PURE__ */ jsxs13(
|
|
1961
|
+
"a",
|
|
1939
1962
|
{
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
width: "278",
|
|
1944
|
-
height: "72",
|
|
1945
|
-
viewBox: "0 0 278 72",
|
|
1946
|
-
fill: "none",
|
|
1963
|
+
href: activatedLanguage === "en" ? "https://pts.se/en/contact/" : "https://www.pts.se/kontakt/",
|
|
1964
|
+
target: "_blank",
|
|
1965
|
+
rel: "noopener noreferrer",
|
|
1947
1966
|
children: [
|
|
1948
|
-
/* @__PURE__ */ jsx15(
|
|
1949
|
-
|
|
1950
|
-
{
|
|
1951
|
-
d: "M54 43C54 47.2 51.5 51.1 47.6 52.3C45.8 52.8 44 53 41 53H24.5C21.4 53 21 53.5 21 56.5V63C21 65.4 19.5 67 17.5 67C15.5 67 14 65.4 14 63V58.5C14 56.5 14 54.8 14.2 53.9C14.8 50.5 16.8 47.9 20.1 46.7C21.4 46.2 23.6 45.9 27.9 45.9H42C43.2 45.9 44.4 45.8 44.9 45.6C46.4 45 46.9 44 46.9 42.9C46.9 41.8 46.5 40.7 44.9 40.2C44.4 40 43.2 39.9 42 39.9H19.4C18.5 39.9 17.7 39.9 17.3 39.7C15.8 39.2 14.9 37.8 14.9 36.4C14.9 35 15.8 33.6 17.3 33.1C17.8 32.9 18.3 32.9 19.3 32.9H40.9C44 32.9 46.4 33.1 47.9 33.7C51.8 35.2 53.9 38.4 53.9 42.9L54 43ZM95.7 33.3C95.2 33.1 94.4 33 93.3 33H61.6C60.8 33 60.1 33 59.7 33.2C58 33.7 57 35 57 36.5C57 38 57.8 39.2 59.4 39.7C59.9 39.9 60.7 40 61.6 40H74V63.4C74 65.8 75.6 67 77.5 67C79.4 67 81 65.8 81 63.4V40H93.3C94.5 40 95.1 40 95.5 39.8C97.1 39.3 98 38 98 36.5C98 35 97.2 33.8 95.7 33.3ZM133.5 47.4C131.8 46.5 129.6 46 124.1 46H113.5C111.8 46 110.9 45.9 110.3 45.7C108.6 45.1 108 44 108 43C108 42 108.4 40.8 110.2 40.2C110.7 40 111.6 40 112.5 40H132C132.4 40 133.5 40 133.8 40C135.6 39.7 137 38.6 137 36.6C137 34.6 135.6 33.6 133.9 33.2C133.6 33.2 132.9 33.1 132 33.1H113.5C110.2 33.1 107.8 33.5 106.2 34.2C102.9 35.8 101 39.2 101 43.1C101 47 102.8 50.5 106.4 52.1C108 52.8 110.4 53.1 113.5 53.1H127C128.7 53.1 129.6 53.3 130.2 53.5C131.6 54 132 55.4 132 56.6C132 57.8 131.6 59.3 129.9 59.8C129.3 60 128.1 60.1 126.1 60.1H106.5C105.7 60.1 104.9 60.1 104.5 60.3C102.9 60.7 102 62 102 63.6C102 65.2 103 66.2 104.3 66.7C104.8 66.9 105.9 67.1 106.7 67.1H124C127.7 67.1 130.7 66.9 132.5 66.3C136.6 65.1 138.9 61.2 138.9 56.6C138.9 52 136.8 49.2 133.4 47.5L133.5 47.4Z",
|
|
1952
|
-
fill: "white"
|
|
1953
|
-
}
|
|
1954
|
-
),
|
|
1955
|
-
/* @__PURE__ */ jsx15(
|
|
1956
|
-
"path",
|
|
1957
|
-
{
|
|
1958
|
-
d: "M92.1 15.7L92.5 15C90 11.6 84.1 9.2 78.1 9H76.9C70.9 9.2 65 11.6 62.5 15L62.9 15.7C61.8 15.7 61 16.4 61 17.3L63.3 27C63.5 27.6 63.7 27.9 64.5 27.9H90.5C91.2 27.9 91.5 27.5 91.6 27L93.9 17.3C93.9 16.4 93.1 15.7 92 15.7H92.1ZM69.3 18.8C69.1 18.8 68.8 18.7 68.6 18.7C67.6 18.7 66.9 19.4 66.9 20.3C66.9 21.2 67.6 21.8 68.5 21.8C69.4 21.8 69.3 21.7 69.5 21.4C69.5 22.2 68.6 24 67.4 24H64.9C63.2 24 63 21.7 63 21.5C63.2 21.7 63.7 21.8 64.1 21.8C64.9 21.8 65.6 21.2 65.6 20.3C65.6 19.4 64.9 18.7 63.9 18.7C62.9 18.7 63.5 18.7 63.4 18.7C63.8 18.4 64.2 17.9 64.2 17.3C64.2 16.7 63.9 16.4 63.5 16.1L65.8 15C67.3 12.5 70 10.7 73.3 10C71.5 11.3 70 12.9 68.8 15L69.6 15.7C68.8 15.8 68.2 16.5 68.2 17.3C68.2 18.1 68.6 18.5 69.2 18.8H69.3ZM76.8 18.9C76.6 18.8 76.2 18.7 76 18.7C75 18.7 74.3 19.4 74.3 20.3C74.3 21.2 75 21.8 75.9 21.8C76.8 21.8 76.7 21.7 77 21.5C77 22.3 76.4 24 75 24H72.5C70.9 24 70.5 22 70.5 21.4C70.7 21.6 71.1 21.8 71.6 21.8C72.4 21.8 73.2 21.2 73.2 20.3C73.2 19.4 72.5 18.7 71.5 18.7C70.5 18.7 70.9 18.7 70.8 18.8C71.4 18.5 71.8 18 71.8 17.3C71.8 16.6 71.4 16.1 70.8 15.9L72.6 15C73.1 13.2 74.7 10.6 76.4 9.7C76.2 10.6 76.1 12.5 76.1 15C76.1 15 76.6 15.5 77.1 15.8C76.4 16 75.9 16.6 75.9 17.3C75.9 18 76.3 18.5 76.9 18.8L76.8 18.9ZM82.5 24H80C78.6 24 78 22.3 78 21.5C78.2 21.7 78.6 21.8 79.1 21.8C80 21.8 80.7 21.2 80.7 20.3C80.7 19.4 80 18.7 79 18.7C78 18.7 78.4 18.7 78.2 18.9C78.8 18.7 79.3 18.1 79.3 17.4C79.3 16.7 78.8 16.1 78.1 15.9C78.6 15.6 79.1 15.1 79.1 15.1C79.1 12.6 79 10.7 78.7 9.8C80.5 10.7 82.1 13.2 82.6 15.1L84.4 16C83.9 16.2 83.4 16.8 83.4 17.4C83.4 18 83.8 18.6 84.4 18.9C84.2 18.9 83.9 18.8 83.7 18.8C82.7 18.8 82 19.5 82 20.4C82 21.3 82.7 21.9 83.6 21.9C84.5 21.9 84.4 21.8 84.7 21.5C84.7 22 84.3 24.1 82.7 24.1L82.5 24ZM90 24H87.5C86.2 24 85.4 22.3 85.4 21.4C85.6 21.7 86 21.8 86.5 21.8C87.3 21.8 88 21.2 88 20.3C88 19.4 87.3 18.7 86.3 18.7C85.3 18.7 85.7 18.7 85.6 18.8C86.2 18.5 86.6 18 86.6 17.3C86.6 16.6 86 15.8 85.1 15.7L86 15C84.8 12.9 83.3 11.4 81.5 10C84.7 10.7 87.5 12.4 89 15L91.4 16.1C91 16.4 90.7 16.8 90.7 17.4C90.7 18 91.1 18.6 91.6 18.9C91.5 18.9 91.2 18.8 91 18.8C90 18.8 89.3 19.5 89.3 20.4C89.3 21.3 90 21.9 90.8 21.9C91.6 21.9 91.7 21.8 91.9 21.6C91.9 21.8 91.6 24.1 90 24.1V24ZM77.5 9C76.1 9 75 7.9 75 6.5C75 5.1 75.9 4.3 77 4.1V3H76V2H77V1H78V2H79V3H78V4.1C79.1 4.3 80 5.3 80 6.6C80 7.9 78.9 9.1 77.5 9.1V9Z",
|
|
1959
|
-
fill: "white"
|
|
1960
|
-
}
|
|
1961
|
-
)
|
|
1967
|
+
/* @__PURE__ */ jsx15("span", { className: "sr-only", children: activatedLanguage === "en" ? "PTS Contact (opens in new tab)" : "PTS Kontakt (\xF6ppnas i ny flik)" }),
|
|
1968
|
+
/* @__PURE__ */ jsx15("span", { "aria-hidden": "true", children: activatedLanguage === "en" ? "Contact" : "Kontakt" })
|
|
1962
1969
|
]
|
|
1963
1970
|
}
|
|
1964
|
-
),
|
|
1965
|
-
/* @__PURE__ */ jsx15("
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
children:
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
children:
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
children:
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
"a",
|
|
2004
|
-
{
|
|
2005
|
-
href: activatedLanguage === "en" ? "https://pts.se/en/cookies-eservices" : "https://www.pts.se/kakor-etjanster",
|
|
2006
|
-
target: "_blank",
|
|
2007
|
-
rel: "noopener noreferrer",
|
|
2008
|
-
children: [
|
|
2009
|
-
/* @__PURE__ */ jsx15("span", { className: "sr-only", children: activatedLanguage === "en" ? "PTS Cookies (opens in new tab)" : "PTS Kakor (\xF6ppnas i ny flik)" }),
|
|
2010
|
-
/* @__PURE__ */ jsx15("span", { "aria-hidden": "true", children: activatedLanguage === "en" ? "Cookies" : "Kakor" })
|
|
2011
|
-
]
|
|
2012
|
-
}
|
|
2013
|
-
) })
|
|
2014
|
-
] }) })
|
|
2015
|
-
] })
|
|
2016
|
-
] });
|
|
1971
|
+
) }),
|
|
1972
|
+
/* @__PURE__ */ jsx15("li", { children: /* @__PURE__ */ jsxs13(
|
|
1973
|
+
"a",
|
|
1974
|
+
{
|
|
1975
|
+
href: activatedLanguage === "en" ? "https://pts.se/en/gdpr" : "https://www.pts.se/gdpr/",
|
|
1976
|
+
target: "_blank",
|
|
1977
|
+
rel: "noopener noreferrer",
|
|
1978
|
+
children: [
|
|
1979
|
+
/* @__PURE__ */ jsx15("span", { className: "sr-only", children: activatedLanguage === "en" ? "PTS Processing of personal data (opens in new tab)" : "PTS Behandling av personuppgifter (\xF6ppnas i ny flik)" }),
|
|
1980
|
+
/* @__PURE__ */ jsx15("span", { "aria-hidden": "true", children: activatedLanguage === "en" ? "Processing of personal data" : "Behandling av personuppgifter" })
|
|
1981
|
+
]
|
|
1982
|
+
}
|
|
1983
|
+
) }),
|
|
1984
|
+
/* @__PURE__ */ jsx15("li", { children: /* @__PURE__ */ jsxs13(
|
|
1985
|
+
"a",
|
|
1986
|
+
{
|
|
1987
|
+
href: activatedLanguage === "en" ? "https://pts.se/en/accessibility-eservices" : "https://www.pts.se/tillganglighet-etjanster",
|
|
1988
|
+
target: "_blank",
|
|
1989
|
+
rel: "noopener noreferrer",
|
|
1990
|
+
children: [
|
|
1991
|
+
/* @__PURE__ */ jsx15("span", { className: "sr-only", children: activatedLanguage === "en" ? "PTS Accessibility (opens in new tab)" : "PTS Tillg\xE4nglighetsredog\xF6relse (\xF6ppnas i ny flik)" }),
|
|
1992
|
+
/* @__PURE__ */ jsx15("span", { "aria-hidden": "true", children: activatedLanguage === "en" ? "Accessibility" : "Tillg\xE4nglighetsredog\xF6relse" })
|
|
1993
|
+
]
|
|
1994
|
+
}
|
|
1995
|
+
) }),
|
|
1996
|
+
/* @__PURE__ */ jsx15("li", { children: /* @__PURE__ */ jsxs13(
|
|
1997
|
+
"a",
|
|
1998
|
+
{
|
|
1999
|
+
href: activatedLanguage === "en" ? "https://pts.se/en/cookies-eservices" : "https://www.pts.se/kakor-etjanster",
|
|
2000
|
+
target: "_blank",
|
|
2001
|
+
rel: "noopener noreferrer",
|
|
2002
|
+
children: [
|
|
2003
|
+
/* @__PURE__ */ jsx15("span", { className: "sr-only", children: activatedLanguage === "en" ? "PTS Cookies (opens in new tab)" : "PTS Kakor (\xF6ppnas i ny flik)" }),
|
|
2004
|
+
/* @__PURE__ */ jsx15("span", { "aria-hidden": "true", children: activatedLanguage === "en" ? "Cookies" : "Kakor" })
|
|
2005
|
+
]
|
|
2006
|
+
}
|
|
2007
|
+
) })
|
|
2008
|
+
] }) })
|
|
2009
|
+
] }) });
|
|
2017
2010
|
};
|
|
2018
2011
|
var FooterStandard_default = Footer;
|
|
2019
2012
|
|
|
@@ -2916,6 +2909,7 @@ var FormStatusMessagesScreenReader = ({ formStatus }) => {
|
|
|
2916
2909
|
var FormStatusMessagesScreenReader_default = FormStatusMessagesScreenReader;
|
|
2917
2910
|
export {
|
|
2918
2911
|
AddFilesStandard_default as AddFilesStandard,
|
|
2912
|
+
CheckboxGroupStandard_default as CheckboxGroupStandard,
|
|
2919
2913
|
CookieBanner_default as CookieBanner,
|
|
2920
2914
|
EditPreviewLinkStandard_default as EditPreviewLinkStandard,
|
|
2921
2915
|
FooterStandard_default as FooterStandard,
|
|
@@ -2927,7 +2921,6 @@ export {
|
|
|
2927
2921
|
QuestionGroup_default as QuestionGroup,
|
|
2928
2922
|
QuestionRenderer_default as QuestionRenderer,
|
|
2929
2923
|
RadioMultipleStandard_default as RadioMultipleStandard,
|
|
2930
|
-
SingleCheckboxStandard_default as SingleCheckboxStandard,
|
|
2931
2924
|
SkipLinkStandard_default as SkipLinkStandard,
|
|
2932
2925
|
StartApplicationButton_default as StartApplicationButton,
|
|
2933
2926
|
StepperButtonsStandard_default as StepperButtonsStandard,
|