optimized-react-component-library-xyz123 0.19.14 → 0.19.15
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 -19
- package/dist/index.d.ts +10 -19
- package/dist/index.js +361 -440
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +372 -450
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/css/darkMode.css +38 -4
- package/src/css/mobileView.css +67 -5
- package/src/css/questions.css +44 -57
- package/src/css/styles.css +75 -23
package/dist/index.js
CHANGED
|
@@ -33,7 +33,6 @@ __export(index_exports, {
|
|
|
33
33
|
AddFilesStandard: () => AddFilesStandard_default,
|
|
34
34
|
CheckboxGroupStandard: () => CheckboxGroupStandard_default,
|
|
35
35
|
CookieBanner: () => CookieBanner_default,
|
|
36
|
-
DropdownStandard: () => DropdownStandard_default,
|
|
37
36
|
EditPreviewLinkStandard: () => EditPreviewLinkStandard_default,
|
|
38
37
|
FooterStandard: () => FooterStandard_default,
|
|
39
38
|
FormStatusMessagesScreenReader: () => FormStatusMessagesScreenReader_default,
|
|
@@ -81,14 +80,30 @@ __export(index_exports, {
|
|
|
81
80
|
});
|
|
82
81
|
module.exports = __toCommonJS(index_exports);
|
|
83
82
|
|
|
84
|
-
// src/components/
|
|
83
|
+
// src/components/layout/ValidationMessage/ValidationMessage.tsx
|
|
85
84
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
85
|
+
var ValidationSummary = ({
|
|
86
|
+
validationMessesege,
|
|
87
|
+
validationId,
|
|
88
|
+
activatedLanguage = "sv",
|
|
89
|
+
showValidationSummary = false
|
|
90
|
+
}) => {
|
|
91
|
+
return showValidationSummary && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "pts-root-error", id: validationId, children: [
|
|
92
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { "aria-hidden": true, className: "errorDot", children: "!" }),
|
|
93
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "sr-only", children: activatedLanguage === "sv" ? "Valideringsfel" : "Validation error" }),
|
|
94
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "errorText", children: validationMessesege })
|
|
95
|
+
] });
|
|
96
|
+
};
|
|
97
|
+
var ValidationMessage_default = ValidationSummary;
|
|
98
|
+
|
|
99
|
+
// src/components/input-components/RadioMultipleStandard/RadioMultipleStandard.tsx
|
|
100
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
86
101
|
var InputRadio = ({
|
|
87
102
|
question,
|
|
88
103
|
handleQuestionInputChange,
|
|
89
104
|
showPreview = false
|
|
90
105
|
}) => {
|
|
91
|
-
var _a;
|
|
106
|
+
var _a, _b, _c;
|
|
92
107
|
const questionId = `question-${question.id}`;
|
|
93
108
|
const groupId = `radio-group-${question.id}`;
|
|
94
109
|
const errorId = `error-${question.id}`;
|
|
@@ -96,21 +111,22 @@ var InputRadio = ({
|
|
|
96
111
|
const e = { target: { value: event.target.value } };
|
|
97
112
|
handleQuestionInputChange(e, question);
|
|
98
113
|
};
|
|
99
|
-
|
|
100
|
-
|
|
114
|
+
console.log("question", question);
|
|
115
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
116
|
+
!showPreview && question.visible && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "pts-root-question pts-radioMultiple-container", id: questionId, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
101
117
|
"fieldset",
|
|
102
118
|
{
|
|
103
119
|
"aria-required": question.isQuestionMandatory,
|
|
104
120
|
"aria-invalid": question.hasValidationError ? question.hasValidationError : void 0,
|
|
105
121
|
"aria-errormessage": question.hasValidationError ? errorId : void 0,
|
|
106
122
|
children: [
|
|
107
|
-
/* @__PURE__ */ (0,
|
|
123
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("legend", { id: `label-${groupId}`, children: [
|
|
108
124
|
question.questionLabel,
|
|
109
125
|
" ",
|
|
110
|
-
question.isQuestionMandatory && /* @__PURE__ */ (0,
|
|
126
|
+
question.isQuestionMandatory && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { "aria-hidden": true, className: "pts-root-mandatoryAsterisk", children: "*" })
|
|
111
127
|
] }),
|
|
112
|
-
(_a = question.options) == null ? void 0 : _a.map((option, index) => /* @__PURE__ */ (0,
|
|
113
|
-
/* @__PURE__ */ (0,
|
|
128
|
+
(_a = question.options) == null ? void 0 : _a.map((option, index) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "pts-radio-option", children: [
|
|
129
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
114
130
|
"input",
|
|
115
131
|
{
|
|
116
132
|
type: "radio",
|
|
@@ -121,27 +137,31 @@ var InputRadio = ({
|
|
|
121
137
|
onChange: handleInputChange
|
|
122
138
|
}
|
|
123
139
|
),
|
|
124
|
-
/* @__PURE__ */ (0,
|
|
140
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("label", { htmlFor: `${groupId}-option-${index}`, children: option.label }),
|
|
125
141
|
" "
|
|
126
142
|
] }, index)),
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
143
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
144
|
+
ValidationMessage_default,
|
|
145
|
+
{
|
|
146
|
+
showValidationSummary: (_b = question.hasValidationError) != null ? _b : false,
|
|
147
|
+
validationId: errorId,
|
|
148
|
+
validationMessesege: (_c = question.validationDefaultMessesege) != null ? _c : "",
|
|
149
|
+
activatedLanguage: "sv"
|
|
150
|
+
}
|
|
151
|
+
)
|
|
132
152
|
]
|
|
133
153
|
}
|
|
134
154
|
) }),
|
|
135
|
-
showPreview && /* @__PURE__ */ (0,
|
|
155
|
+
showPreview && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(PreviewRadio, { question })
|
|
136
156
|
] });
|
|
137
157
|
};
|
|
138
158
|
var RadioMultipleStandard_default = InputRadio;
|
|
139
159
|
var PreviewRadio = ({ question }) => {
|
|
140
160
|
var _a, _b;
|
|
141
161
|
const previewId = `preview-${question.id}`;
|
|
142
|
-
return /* @__PURE__ */ (0,
|
|
143
|
-
/* @__PURE__ */ (0,
|
|
144
|
-
((_b = question.answer) == null ? void 0 : _b.trim()) ? /* @__PURE__ */ (0,
|
|
162
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
163
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("dt", { id: `question-${previewId}`, children: (_a = question.previewLabel) != null ? _a : question.questionLabel }),
|
|
164
|
+
((_b = question.answer) == null ? void 0 : _b.trim()) ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("dd", { className: "pts-radioMultiple-preview pts-root-answer", id: `answer-${previewId}`, children: question.answer }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
145
165
|
"dd",
|
|
146
166
|
{
|
|
147
167
|
className: "pts-radioMultiple-preview pts-root-answer no-answer-preview-page",
|
|
@@ -152,9 +172,87 @@ var PreviewRadio = ({ question }) => {
|
|
|
152
172
|
] });
|
|
153
173
|
};
|
|
154
174
|
|
|
155
|
-
// src/components/input-components/
|
|
175
|
+
// src/components/input-components/MultipleCheckboxesStandard/MultipleCheckboxesStandard.tsx
|
|
156
176
|
var import_react = require("react");
|
|
157
|
-
var
|
|
177
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
178
|
+
var MultipleCheckboxes = ({
|
|
179
|
+
question,
|
|
180
|
+
handleQuestionInputChange,
|
|
181
|
+
showPreview = false,
|
|
182
|
+
activatedLanguage = "sv"
|
|
183
|
+
}) => {
|
|
184
|
+
var _a;
|
|
185
|
+
const questionId = `question-${question.id}`;
|
|
186
|
+
const [checkedValues, setCheckedValues] = (0, import_react.useState)([]);
|
|
187
|
+
(0, import_react.useEffect)(() => {
|
|
188
|
+
var _a2;
|
|
189
|
+
const initialValues = ((_a2 = question.options) == null ? void 0 : _a2.filter((option) => {
|
|
190
|
+
var _a3;
|
|
191
|
+
return (_a3 = question.answer) == null ? void 0 : _a3.includes(option.label);
|
|
192
|
+
}).map((option) => option.label)) || [];
|
|
193
|
+
console.log("Initial values:", initialValues);
|
|
194
|
+
setCheckedValues(initialValues);
|
|
195
|
+
}, [question.answer, question.options]);
|
|
196
|
+
const handleInputChange = (event, optionValue) => {
|
|
197
|
+
let updatedValues = [...checkedValues];
|
|
198
|
+
if (updatedValues.includes(optionValue)) {
|
|
199
|
+
updatedValues = updatedValues.filter((val) => val !== optionValue);
|
|
200
|
+
} else {
|
|
201
|
+
updatedValues.push(optionValue);
|
|
202
|
+
}
|
|
203
|
+
setCheckedValues(updatedValues);
|
|
204
|
+
const e = { target: { value: updatedValues.toString() } };
|
|
205
|
+
handleQuestionInputChange(e, question);
|
|
206
|
+
};
|
|
207
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
208
|
+
!showPreview && question.visible && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { id: questionId, className: "pts-root-question pts-multipleCheckboxes-container", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("fieldset", { children: [
|
|
209
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("legend", { className: "multipleCheckboxes-legend", id: `label-${questionId}`, children: [
|
|
210
|
+
question.questionLabel,
|
|
211
|
+
" ",
|
|
212
|
+
question.isQuestionMandatory && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { "aria-hidden": true, className: "pts-root-mandatoryAsterisk", children: "*" }),
|
|
213
|
+
" "
|
|
214
|
+
] }),
|
|
215
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("ul", { children: (_a = question.options) == null ? void 0 : _a.map((option, index) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
216
|
+
" ",
|
|
217
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
218
|
+
"input",
|
|
219
|
+
{
|
|
220
|
+
type: "checkbox",
|
|
221
|
+
name: `${question.id}-option`,
|
|
222
|
+
id: `${question.id}-option-${index}`,
|
|
223
|
+
value: option.label,
|
|
224
|
+
checked: checkedValues.includes(option.label),
|
|
225
|
+
onChange: (e) => handleInputChange(e, option.label),
|
|
226
|
+
className: question.hasValidationError ? "pts-root-question-input-error-border" : void 0
|
|
227
|
+
}
|
|
228
|
+
),
|
|
229
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("label", { htmlFor: `${question.id}-option-${index}`, children: option.label })
|
|
230
|
+
] }) }, index)) })
|
|
231
|
+
] }) }),
|
|
232
|
+
" ",
|
|
233
|
+
showPreview && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(PrevieMultipleCheckboxes, { activatedLanguage, question })
|
|
234
|
+
] });
|
|
235
|
+
};
|
|
236
|
+
var MultipleCheckboxesStandard_default = MultipleCheckboxes;
|
|
237
|
+
var PrevieMultipleCheckboxes = ({
|
|
238
|
+
question,
|
|
239
|
+
activatedLanguage
|
|
240
|
+
}) => {
|
|
241
|
+
var _a, _b;
|
|
242
|
+
const previewId = `preview-${question.id}`;
|
|
243
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
244
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("dt", { id: `question-${previewId}`, children: (_a = question.previewLabel) != null ? _a : question.questionLabel }),
|
|
245
|
+
question.answer ? question.options && question.options.length === 1 ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("dd", { children: question.options[0].label }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("dd", { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("ul", { className: "pts-preview-answer-list", children: (_b = question.options) == null ? void 0 : _b.filter((option) => {
|
|
246
|
+
var _a2;
|
|
247
|
+
return (_a2 = question.answer) == null ? void 0 : _a2.includes(option.label);
|
|
248
|
+
}).map((option, index) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("li", { children: option.label }, index)) }) }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("dd", { className: "no-answer-preview-page", children: activatedLanguage === "en" ? "No Answer" : "Inget svar" }),
|
|
249
|
+
" "
|
|
250
|
+
] });
|
|
251
|
+
};
|
|
252
|
+
|
|
253
|
+
// src/components/input-components/CheckboxGroupStandard/CheckboxGroupStandard.tsx
|
|
254
|
+
var import_react2 = require("react");
|
|
255
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
158
256
|
var CheckboxGroup = ({
|
|
159
257
|
question,
|
|
160
258
|
handleQuestionInputChange,
|
|
@@ -165,8 +263,8 @@ var CheckboxGroup = ({
|
|
|
165
263
|
const questionId = `question-${question.id}`;
|
|
166
264
|
const errorId = `error-${question.id}`;
|
|
167
265
|
const groupId = `checkbox-group-${question.id}`;
|
|
168
|
-
const [checkedValues, setCheckedValues] = (0,
|
|
169
|
-
(0,
|
|
266
|
+
const [checkedValues, setCheckedValues] = (0, import_react2.useState)([]);
|
|
267
|
+
(0, import_react2.useEffect)(() => {
|
|
170
268
|
var _a2;
|
|
171
269
|
const initialValues = ((_a2 = question.options) == null ? void 0 : _a2.filter((option) => {
|
|
172
270
|
var _a3;
|
|
@@ -185,21 +283,21 @@ var CheckboxGroup = ({
|
|
|
185
283
|
const e = { target: { value: updatedValues.toString() } };
|
|
186
284
|
handleQuestionInputChange(e, question);
|
|
187
285
|
};
|
|
188
|
-
return /* @__PURE__ */ (0,
|
|
189
|
-
!showPreview && question.visible && /* @__PURE__ */ (0,
|
|
286
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
|
|
287
|
+
!showPreview && question.visible && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { id: questionId, className: "pts-root-question pts-checkboxGroup-container", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
190
288
|
"fieldset",
|
|
191
289
|
{
|
|
192
290
|
"aria-required": question.isQuestionMandatory,
|
|
193
291
|
"aria-invalid": question.hasValidationError ? question.hasValidationError : void 0,
|
|
194
292
|
"aria-errormessage": question.hasValidationError ? errorId : void 0,
|
|
195
293
|
children: [
|
|
196
|
-
/* @__PURE__ */ (0,
|
|
294
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("legend", { className: "pts-checkboxGroup-legend", id: `label-${groupId}`, children: [
|
|
197
295
|
question.questionLabel,
|
|
198
296
|
" ",
|
|
199
|
-
question.isQuestionMandatory && /* @__PURE__ */ (0,
|
|
297
|
+
question.isQuestionMandatory && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { "aria-hidden": true, className: "pts-root-mandatoryAsterisk", children: "*" })
|
|
200
298
|
] }),
|
|
201
|
-
(_a = question.options) == null ? void 0 : _a.map((option, index) => /* @__PURE__ */ (0,
|
|
202
|
-
/* @__PURE__ */ (0,
|
|
299
|
+
(_a = question.options) == null ? void 0 : _a.map((option, index) => /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "pts-checkboxGroup-options", children: [
|
|
300
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
203
301
|
"input",
|
|
204
302
|
{
|
|
205
303
|
type: "checkbox",
|
|
@@ -211,17 +309,17 @@ var CheckboxGroup = ({
|
|
|
211
309
|
className: question.hasValidationError ? "pts-root-question-input-error-border" : void 0
|
|
212
310
|
}
|
|
213
311
|
),
|
|
214
|
-
/* @__PURE__ */ (0,
|
|
312
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("label", { htmlFor: `${groupId}-option-${index}`, children: option.label })
|
|
215
313
|
] }, index)),
|
|
216
|
-
question.hasValidationError && /* @__PURE__ */ (0,
|
|
217
|
-
/* @__PURE__ */ (0,
|
|
218
|
-
/* @__PURE__ */ (0,
|
|
219
|
-
/* @__PURE__ */ (0,
|
|
314
|
+
question.hasValidationError && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "pts-root-error", id: errorId, children: [
|
|
315
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { "aria-hidden": true, className: "errorDot", children: "!" }),
|
|
316
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "sr-only", children: "Valideringsfel" }),
|
|
317
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "errorText", children: question.validationDefaultMessesege })
|
|
220
318
|
] })
|
|
221
319
|
]
|
|
222
320
|
}
|
|
223
321
|
) }),
|
|
224
|
-
showPreview && /* @__PURE__ */ (0,
|
|
322
|
+
showPreview && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(PreviewCheckboxGroup, { activatedLanguage, question })
|
|
225
323
|
] });
|
|
226
324
|
};
|
|
227
325
|
var CheckboxGroupStandard_default = CheckboxGroup;
|
|
@@ -231,19 +329,19 @@ var PreviewCheckboxGroup = ({
|
|
|
231
329
|
}) => {
|
|
232
330
|
var _a, _b;
|
|
233
331
|
const previewId = `preview-${question.id}`;
|
|
234
|
-
return /* @__PURE__ */ (0,
|
|
235
|
-
/* @__PURE__ */ (0,
|
|
236
|
-
question.answer ? question.options && question.options.length === 1 ? /* @__PURE__ */ (0,
|
|
332
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
|
|
333
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("dt", { id: `question-${previewId}`, children: (_a = question.previewLabel) != null ? _a : question.questionLabel }),
|
|
334
|
+
question.answer ? question.options && question.options.length === 1 ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("dd", { children: question.options[0].label }) : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("dd", { children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("ul", { className: "pts-preview-answer-list", children: (_b = question.options) == null ? void 0 : _b.filter((option) => {
|
|
237
335
|
var _a2;
|
|
238
336
|
return (_a2 = question.answer) == null ? void 0 : _a2.includes(option.label);
|
|
239
|
-
}).map((option, index) => /* @__PURE__ */ (0,
|
|
337
|
+
}).map((option, index) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("li", { children: option.label }, index)) }) }) : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("dd", { className: "no-answer-preview-page", children: activatedLanguage === "en" ? "No Answer" : "Inget svar" }),
|
|
240
338
|
" "
|
|
241
339
|
] });
|
|
242
340
|
};
|
|
243
341
|
|
|
244
342
|
// src/components/input-components/TextAreaStandard/TextAreaStandard.tsx
|
|
245
343
|
var import_dompurify = __toESM(require("dompurify"));
|
|
246
|
-
var
|
|
344
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
247
345
|
var InputTextarea = ({
|
|
248
346
|
question,
|
|
249
347
|
handleQuestionInputChange,
|
|
@@ -256,19 +354,19 @@ var InputTextarea = ({
|
|
|
256
354
|
const aboutId = `about-${question.id}`;
|
|
257
355
|
const errorId = `error-${question.id}`;
|
|
258
356
|
const defaultMaxLength = 1e3;
|
|
259
|
-
return /* @__PURE__ */ (0,
|
|
260
|
-
!showPreview && question.visible && /* @__PURE__ */ (0,
|
|
357
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
|
|
358
|
+
!showPreview && question.visible && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
261
359
|
"div",
|
|
262
360
|
{
|
|
263
361
|
id: questionId,
|
|
264
362
|
className: `pts-root-question pts-textArea-container${question.aboutText ? " pts-question-hasAbout" : ""}`,
|
|
265
363
|
children: [
|
|
266
|
-
/* @__PURE__ */ (0,
|
|
364
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("label", { htmlFor: inputId, children: [
|
|
267
365
|
question.questionLabel,
|
|
268
366
|
" ",
|
|
269
|
-
question.isQuestionMandatory && /* @__PURE__ */ (0,
|
|
367
|
+
question.isQuestionMandatory && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "pts-root-mandatoryAsterisk", "aria-hidden": "true", children: "*" })
|
|
270
368
|
] }),
|
|
271
|
-
question.aboutText && /* @__PURE__ */ (0,
|
|
369
|
+
question.aboutText && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
272
370
|
"div",
|
|
273
371
|
{
|
|
274
372
|
id: aboutId,
|
|
@@ -278,7 +376,7 @@ var InputTextarea = ({
|
|
|
278
376
|
}
|
|
279
377
|
}
|
|
280
378
|
),
|
|
281
|
-
/* @__PURE__ */ (0,
|
|
379
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
282
380
|
"textarea",
|
|
283
381
|
{
|
|
284
382
|
className: question.hasValidationError ? "pts-root-question-input-error-border" : void 0,
|
|
@@ -292,12 +390,12 @@ var InputTextarea = ({
|
|
|
292
390
|
id: inputId
|
|
293
391
|
}
|
|
294
392
|
),
|
|
295
|
-
/* @__PURE__ */ (0,
|
|
296
|
-
question.hasValidationError && /* @__PURE__ */ (0,
|
|
297
|
-
/* @__PURE__ */ (0,
|
|
298
|
-
/* @__PURE__ */ (0,
|
|
393
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "pts-textarea-counter-error-container", children: [
|
|
394
|
+
question.hasValidationError && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "pts-root-error", id: errorId, children: [
|
|
395
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { "aria-label": "Felmeddelande.", className: "errorDot", children: "!" }),
|
|
396
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "errorText", children: question.validationDefaultMessesege })
|
|
299
397
|
] }),
|
|
300
|
-
!((_b = question.questionExtraAttribute) == null ? void 0 : _b.hideTextCounter) && /* @__PURE__ */ (0,
|
|
398
|
+
!((_b = question.questionExtraAttribute) == null ? void 0 : _b.hideTextCounter) && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
301
399
|
"div",
|
|
302
400
|
{
|
|
303
401
|
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" : ""}`,
|
|
@@ -314,7 +412,7 @@ var InputTextarea = ({
|
|
|
314
412
|
]
|
|
315
413
|
}
|
|
316
414
|
),
|
|
317
|
-
showPreview && /* @__PURE__ */ (0,
|
|
415
|
+
showPreview && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(PreviewTextarea, { activatedLanguage, question })
|
|
318
416
|
] });
|
|
319
417
|
};
|
|
320
418
|
var TextAreaStandard_default = InputTextarea;
|
|
@@ -324,9 +422,9 @@ var PreviewTextarea = ({
|
|
|
324
422
|
}) => {
|
|
325
423
|
var _a, _b;
|
|
326
424
|
const previewId = `preview-${question.id}`;
|
|
327
|
-
return /* @__PURE__ */ (0,
|
|
328
|
-
/* @__PURE__ */ (0,
|
|
329
|
-
((_b = question.answer) == null ? void 0 : _b.trim()) ? /* @__PURE__ */ (0,
|
|
425
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
|
|
426
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("dt", { id: `question-${previewId}`, children: (_a = question.previewLabel) != null ? _a : question.questionLabel }),
|
|
427
|
+
((_b = question.answer) == null ? void 0 : _b.trim()) ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("dd", { className: "pts-textArea-preview pts-root-answer", id: `answer-${previewId}`, children: question.answer }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
330
428
|
"dd",
|
|
331
429
|
{
|
|
332
430
|
className: "pts-textArea-preview pts-root-answer no-answer-preview-page",
|
|
@@ -339,7 +437,7 @@ var PreviewTextarea = ({
|
|
|
339
437
|
|
|
340
438
|
// src/components/input-components/TextFieldStandard/TextFieldStandard.tsx
|
|
341
439
|
var import_dompurify2 = __toESM(require("dompurify"));
|
|
342
|
-
var
|
|
440
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
343
441
|
var TextFieldStandard = ({
|
|
344
442
|
question,
|
|
345
443
|
handleQuestionInputChange,
|
|
@@ -352,19 +450,19 @@ var TextFieldStandard = ({
|
|
|
352
450
|
const aboutId = `about-${question.id}`;
|
|
353
451
|
const errorId = `error-${question.id}`;
|
|
354
452
|
const defaultMaxLength = 1e3;
|
|
355
|
-
return /* @__PURE__ */ (0,
|
|
356
|
-
!showPreview && question.visible && /* @__PURE__ */ (0,
|
|
453
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
454
|
+
!showPreview && question.visible && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
357
455
|
"div",
|
|
358
456
|
{
|
|
359
457
|
id: questionId,
|
|
360
458
|
className: `pts-root-question pts-textField-container${((_a = question.questionExtraAttribute) == null ? void 0 : _a.disabled) ? " pts-textField-disabled" : ""}${question.aboutText ? " pts-question-hasAbout" : ""}`.trim(),
|
|
361
459
|
children: [
|
|
362
|
-
/* @__PURE__ */ (0,
|
|
460
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("label", { htmlFor: inputId, children: [
|
|
363
461
|
question.questionLabel,
|
|
364
462
|
" ",
|
|
365
|
-
question.isQuestionMandatory && /* @__PURE__ */ (0,
|
|
463
|
+
question.isQuestionMandatory && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { "aria-hidden": "true", className: "pts-root-mandatoryAsterisk", children: "*" })
|
|
366
464
|
] }),
|
|
367
|
-
question.aboutText && /* @__PURE__ */ (0,
|
|
465
|
+
question.aboutText && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
368
466
|
"div",
|
|
369
467
|
{
|
|
370
468
|
id: aboutId,
|
|
@@ -374,7 +472,7 @@ var TextFieldStandard = ({
|
|
|
374
472
|
}
|
|
375
473
|
}
|
|
376
474
|
),
|
|
377
|
-
/* @__PURE__ */ (0,
|
|
475
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
378
476
|
"input",
|
|
379
477
|
{
|
|
380
478
|
type: (_c = (_b = question.questionExtraAttribute) == null ? void 0 : _b.inputType) != null ? _c : "text",
|
|
@@ -396,15 +494,15 @@ var TextFieldStandard = ({
|
|
|
396
494
|
autoCapitalize: (_m = (_l = question.questionExtraAttribute) == null ? void 0 : _l.autoCapitalize) != null ? _m : void 0
|
|
397
495
|
}
|
|
398
496
|
),
|
|
399
|
-
question.hasValidationError && /* @__PURE__ */ (0,
|
|
400
|
-
/* @__PURE__ */ (0,
|
|
401
|
-
/* @__PURE__ */ (0,
|
|
402
|
-
/* @__PURE__ */ (0,
|
|
497
|
+
question.hasValidationError && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "pts-root-error", id: errorId, children: [
|
|
498
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { "aria-hidden": true, className: "errorDot", children: "!" }),
|
|
499
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "sr-only", children: "Valideringsfel" }),
|
|
500
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "errorText", children: question.validationDefaultMessesege })
|
|
403
501
|
] })
|
|
404
502
|
]
|
|
405
503
|
}
|
|
406
504
|
),
|
|
407
|
-
showPreview && /* @__PURE__ */ (0,
|
|
505
|
+
showPreview && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PreviewTextField, { activatedLanguage, question })
|
|
408
506
|
] });
|
|
409
507
|
};
|
|
410
508
|
var TextFieldStandard_default = TextFieldStandard;
|
|
@@ -414,9 +512,9 @@ var PreviewTextField = ({
|
|
|
414
512
|
}) => {
|
|
415
513
|
var _a, _b;
|
|
416
514
|
const previewId = `preview-${question.id}`;
|
|
417
|
-
return /* @__PURE__ */ (0,
|
|
418
|
-
/* @__PURE__ */ (0,
|
|
419
|
-
((_b = question.answer) == null ? void 0 : _b.trim()) ? /* @__PURE__ */ (0,
|
|
515
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
516
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("dt", { id: `question-${previewId}`, children: (_a = question.previewLabel) != null ? _a : question.questionLabel }),
|
|
517
|
+
((_b = question.answer) == null ? void 0 : _b.trim()) ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("dd", { className: "pts-textField-preview pts-root-answer", id: `answer-${previewId}`, children: question.answer }) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
420
518
|
"dd",
|
|
421
519
|
{
|
|
422
520
|
className: "pts-textField-preview pts-root-answer no-answer-preview-page",
|
|
@@ -428,12 +526,12 @@ var PreviewTextField = ({
|
|
|
428
526
|
};
|
|
429
527
|
|
|
430
528
|
// src/components/input-components/AddFilesStandard/AddFilesStandard.tsx
|
|
431
|
-
var
|
|
529
|
+
var import_react7 = require("react");
|
|
432
530
|
var import_clsx3 = __toESM(require("clsx"));
|
|
433
531
|
|
|
434
532
|
// src/components/input-components/AddFilesStandard/DropFilesStandard.tsx
|
|
435
533
|
var import_react_dropzone = require("react-dropzone");
|
|
436
|
-
var
|
|
534
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
437
535
|
var DropFiles = ({ FilesSelected, DropFilesText = "Dra och sl\xE4pp dina filer h\xE4r", language }) => {
|
|
438
536
|
const onDrop = FilesSelected;
|
|
439
537
|
const { getRootProps, getInputProps, isDragActive } = (0, import_react_dropzone.useDropzone)({ onDrop, noKeyboard: true });
|
|
@@ -441,10 +539,10 @@ var DropFiles = ({ FilesSelected, DropFilesText = "Dra och sl\xE4pp dina filer h
|
|
|
441
539
|
event.preventDefault();
|
|
442
540
|
event.stopPropagation();
|
|
443
541
|
};
|
|
444
|
-
return /* @__PURE__ */ (0,
|
|
445
|
-
/* @__PURE__ */ (0,
|
|
542
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_jsx_runtime7.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "DropZoneContainer", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "DropZone", ...getRootProps(), onClick: handleFileExplorer, children: [
|
|
543
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("label", { htmlFor: "fileDropInput", hidden: true, children: [
|
|
446
544
|
"Dra och sl\xE4pp filer h\xE4r omr\xE5de",
|
|
447
|
-
/* @__PURE__ */ (0,
|
|
545
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
448
546
|
"input",
|
|
449
547
|
{
|
|
450
548
|
...getInputProps({
|
|
@@ -455,8 +553,8 @@ var DropFiles = ({ FilesSelected, DropFilesText = "Dra och sl\xE4pp dina filer h
|
|
|
455
553
|
}
|
|
456
554
|
)
|
|
457
555
|
] }),
|
|
458
|
-
isDragActive ? /* @__PURE__ */ (0,
|
|
459
|
-
/* @__PURE__ */ (0,
|
|
556
|
+
isDragActive ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("b", { className: "dropFilesNowText", children: language === "sv" ? "Sl\xE4pp filerna, nu ...!" : "Drop files here!" }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "DropZone-label-container", children: [
|
|
557
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
460
558
|
"svg",
|
|
461
559
|
{
|
|
462
560
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -464,7 +562,7 @@ var DropFiles = ({ FilesSelected, DropFilesText = "Dra och sl\xE4pp dina filer h
|
|
|
464
562
|
height: "2.4rem",
|
|
465
563
|
viewBox: "0 0 7 15",
|
|
466
564
|
fill: "#fff",
|
|
467
|
-
children: /* @__PURE__ */ (0,
|
|
565
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
468
566
|
"path",
|
|
469
567
|
{
|
|
470
568
|
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",
|
|
@@ -473,26 +571,26 @@ var DropFiles = ({ FilesSelected, DropFilesText = "Dra och sl\xE4pp dina filer h
|
|
|
473
571
|
)
|
|
474
572
|
}
|
|
475
573
|
),
|
|
476
|
-
/* @__PURE__ */ (0,
|
|
574
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: "dropFilesText", children: DropFilesText })
|
|
477
575
|
] })
|
|
478
576
|
] }) }) });
|
|
479
577
|
};
|
|
480
578
|
var DropFilesStandard_default = DropFiles;
|
|
481
579
|
|
|
482
580
|
// src/components/input-components/AddFilesStandard/ExploreFilesStandard.tsx
|
|
483
|
-
var
|
|
581
|
+
var import_react4 = require("react");
|
|
484
582
|
var import_clsx = __toESM(require("clsx"));
|
|
485
583
|
|
|
486
584
|
// src/components/input-components/AddFilesStandard/ScreenReaderErrors.tsx
|
|
487
|
-
var
|
|
488
|
-
var
|
|
585
|
+
var import_react3 = __toESM(require("react"));
|
|
586
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
489
587
|
var ScreenReaderErrors = ({
|
|
490
588
|
errorMessageAddingFile,
|
|
491
589
|
activatedLanguage
|
|
492
590
|
}) => {
|
|
493
|
-
const [activateErrorMessagesForScreenReader, setActivateErrorMessagesForScreenReader] =
|
|
494
|
-
const [errorMessagesForScreenReader, setErrorMessagesForScreenReader] =
|
|
495
|
-
|
|
591
|
+
const [activateErrorMessagesForScreenReader, setActivateErrorMessagesForScreenReader] = import_react3.default.useState(false);
|
|
592
|
+
const [errorMessagesForScreenReader, setErrorMessagesForScreenReader] = import_react3.default.useState("");
|
|
593
|
+
import_react3.default.useEffect(() => {
|
|
496
594
|
if (errorMessageAddingFile.length > 0) {
|
|
497
595
|
let errorMessages = "";
|
|
498
596
|
errorMessages += errorMessageAddingFile.length;
|
|
@@ -504,12 +602,12 @@ var ScreenReaderErrors = ({
|
|
|
504
602
|
setActivateErrorMessagesForScreenReader(true);
|
|
505
603
|
}
|
|
506
604
|
}, [errorMessageAddingFile]);
|
|
507
|
-
return /* @__PURE__ */ (0,
|
|
605
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_jsx_runtime8.Fragment, { children: activateErrorMessagesForScreenReader && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { role: "alert", className: "sr-only", "aria-atomic": "true", children: errorMessagesForScreenReader }) });
|
|
508
606
|
};
|
|
509
607
|
var ScreenReaderErrors_default = ScreenReaderErrors;
|
|
510
608
|
|
|
511
609
|
// src/components/input-components/AddFilesStandard/ExploreFilesStandard.tsx
|
|
512
|
-
var
|
|
610
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
513
611
|
var ExploreFiles = ({
|
|
514
612
|
FilesSelected,
|
|
515
613
|
numberOfFiles,
|
|
@@ -523,8 +621,8 @@ var ExploreFiles = ({
|
|
|
523
621
|
showErrors,
|
|
524
622
|
errorMessageAddingFile
|
|
525
623
|
}) => {
|
|
526
|
-
const fileInputRef = (0,
|
|
527
|
-
const buttonInputRef = (0,
|
|
624
|
+
const fileInputRef = (0, import_react4.useRef)(null);
|
|
625
|
+
const buttonInputRef = (0, import_react4.useRef)(null);
|
|
528
626
|
const handleFiles = (event) => {
|
|
529
627
|
const files = Array.from(event.target.files || []);
|
|
530
628
|
FilesSelected(files);
|
|
@@ -536,8 +634,8 @@ var ExploreFiles = ({
|
|
|
536
634
|
};
|
|
537
635
|
let addFilesInfoText = numberOfFiles > 0 ? activatedLanguage === "sv" ? `${numberOfFiles} filer valda (max ${allowedNumberOfFiles})` : `${numberOfFiles} files chosed (max ${allowedNumberOfFiles})` : activatedLanguage === "sv" ? "Ingen fil vald" : "No file chosen";
|
|
538
636
|
const ariaLabelText = `${activatedLanguage === "sv" ? "V\xE4lj fil" : "Choose file"} ${addFilesInfoText}`;
|
|
539
|
-
return /* @__PURE__ */ (0,
|
|
540
|
-
/* @__PURE__ */ (0,
|
|
637
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_jsx_runtime9.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "inputContainer", children: [
|
|
638
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
541
639
|
"div",
|
|
542
640
|
{
|
|
543
641
|
className: (0, import_clsx.default)(
|
|
@@ -547,7 +645,7 @@ var ExploreFiles = ({
|
|
|
547
645
|
),
|
|
548
646
|
id: labelId,
|
|
549
647
|
children: [
|
|
550
|
-
/* @__PURE__ */ (0,
|
|
648
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
551
649
|
"button",
|
|
552
650
|
{
|
|
553
651
|
ref: buttonInputRef,
|
|
@@ -562,12 +660,12 @@ var ExploreFiles = ({
|
|
|
562
660
|
children: activatedLanguage === "sv" ? "V\xE4lj fil" : "Choose file"
|
|
563
661
|
}
|
|
564
662
|
),
|
|
565
|
-
/* @__PURE__ */ (0,
|
|
566
|
-
/* @__PURE__ */ (0,
|
|
663
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { "aria-hidden": true, className: "filePickText", children: addFilesInfoText }),
|
|
664
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("label", { htmlFor: inputId, "aria-hidden": true, className: "invisible" })
|
|
567
665
|
]
|
|
568
666
|
}
|
|
569
667
|
),
|
|
570
|
-
/* @__PURE__ */ (0,
|
|
668
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
571
669
|
"input",
|
|
572
670
|
{
|
|
573
671
|
"aria-hidden": true,
|
|
@@ -580,7 +678,7 @@ var ExploreFiles = ({
|
|
|
580
678
|
id: inputId
|
|
581
679
|
}
|
|
582
680
|
),
|
|
583
|
-
/* @__PURE__ */ (0,
|
|
681
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
584
682
|
ScreenReaderErrors_default,
|
|
585
683
|
{
|
|
586
684
|
errorMessageAddingFile,
|
|
@@ -592,22 +690,22 @@ var ExploreFiles = ({
|
|
|
592
690
|
var ExploreFilesStandard_default = ExploreFiles;
|
|
593
691
|
|
|
594
692
|
// src/components/input-components/AddFilesStandard/SelectedFilesStandard.tsx
|
|
595
|
-
var
|
|
693
|
+
var import_react6 = __toESM(require("react"));
|
|
596
694
|
var import_react_bootstrap = require("react-bootstrap");
|
|
597
695
|
|
|
598
696
|
// src/components/input-components/AddFilesStandard/IndicatorStandard.tsx
|
|
599
|
-
var
|
|
697
|
+
var import_react5 = require("react");
|
|
600
698
|
var import_clsx2 = __toESM(require("clsx"));
|
|
601
|
-
var
|
|
699
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
602
700
|
var Indicator = (filename) => {
|
|
603
|
-
const [uploadPercentage, setUploadPercentage] = (0,
|
|
604
|
-
const [uploadDone, setUploadDone] = (0,
|
|
605
|
-
return /* @__PURE__ */ (0,
|
|
701
|
+
const [uploadPercentage, setUploadPercentage] = (0, import_react5.useState)(0);
|
|
702
|
+
const [uploadDone, setUploadDone] = (0, import_react5.useState)(false);
|
|
703
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_jsx_runtime10.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: (0, import_clsx2.default)("uploadIndicator", "uploadDone") }) });
|
|
606
704
|
};
|
|
607
705
|
var IndicatorStandard_default = Indicator;
|
|
608
706
|
|
|
609
707
|
// src/components/input-components/AddFilesStandard/SelectedFilesStandard.tsx
|
|
610
|
-
var
|
|
708
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
611
709
|
var SelectedFiles = ({
|
|
612
710
|
questionObject,
|
|
613
711
|
isTouched,
|
|
@@ -620,7 +718,7 @@ var SelectedFiles = ({
|
|
|
620
718
|
setNumberOfFiles,
|
|
621
719
|
removeUploadErrors
|
|
622
720
|
}) => {
|
|
623
|
-
const theDiv = (0,
|
|
721
|
+
const theDiv = (0, import_react6.useRef)(null);
|
|
624
722
|
const remove = (file) => {
|
|
625
723
|
let newFiles = questionObject.files.filter((f) => f !== file);
|
|
626
724
|
const newCountOfFiles = newFiles.length;
|
|
@@ -629,13 +727,13 @@ var SelectedFiles = ({
|
|
|
629
727
|
isTouched(e, questionObject);
|
|
630
728
|
removeFile(newCountOfFiles);
|
|
631
729
|
};
|
|
632
|
-
(0,
|
|
730
|
+
(0, import_react6.useEffect)(() => {
|
|
633
731
|
var _a;
|
|
634
732
|
numberOfFiles > 0 && ((_a = theDiv.current) == null ? void 0 : _a.scrollIntoView({ behavior: "smooth", block: "end" }));
|
|
635
733
|
}, [numberOfFiles]);
|
|
636
734
|
const useWindowWidth = () => {
|
|
637
|
-
const [windowWidth2, setWindowWidth] = (0,
|
|
638
|
-
(0,
|
|
735
|
+
const [windowWidth2, setWindowWidth] = (0, import_react6.useState)(window.innerWidth);
|
|
736
|
+
(0, import_react6.useEffect)(() => {
|
|
639
737
|
const handleResize = () => {
|
|
640
738
|
setWindowWidth(window.innerWidth);
|
|
641
739
|
};
|
|
@@ -647,10 +745,10 @@ var SelectedFiles = ({
|
|
|
647
745
|
return windowWidth2;
|
|
648
746
|
};
|
|
649
747
|
const windowWidth = useWindowWidth();
|
|
650
|
-
return /* @__PURE__ */ (0,
|
|
651
|
-
/* @__PURE__ */ (0,
|
|
652
|
-
/* @__PURE__ */ (0,
|
|
653
|
-
/* @__PURE__ */ (0,
|
|
748
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
|
|
749
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { children: errorMessageAddingFile.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "pts-errorSummary-container pts-addFile-error-container", children: [
|
|
750
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { "aria-hidden": "true", className: "errorDot", children: "!" }),
|
|
751
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "addFile-error-list-container", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("ul", { "aria-hidden": true, className: "fileListUnorderedList", id: "errorSummary-ul", children: [
|
|
654
752
|
" ",
|
|
655
753
|
errorMessageAddingFile.map((errorObj, index) => {
|
|
656
754
|
const errorFileName = errorObj.FileName;
|
|
@@ -658,9 +756,9 @@ var SelectedFiles = ({
|
|
|
658
756
|
mobileFirstFileName = mobileFirstFileName.length > 8 ? mobileFirstFileName.substring(0, 8) + ".." : mobileFirstFileName;
|
|
659
757
|
const fileType = errorObj.FileName.split(".").pop();
|
|
660
758
|
mobileFirstFileName = mobileFirstFileName + "." + fileType;
|
|
661
|
-
return /* @__PURE__ */ (0,
|
|
662
|
-
/* @__PURE__ */ (0,
|
|
663
|
-
/* @__PURE__ */ (0,
|
|
759
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react6.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "fileInListContainer", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "fileInList", children: [
|
|
760
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_bootstrap.Row, { children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_bootstrap.Col, { children: windowWidth < 768 ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "mobileFirstFileName", children: mobileFirstFileName }) : /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "desktopFileName", children: errorObj.FileName }) }) }),
|
|
761
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_bootstrap.Row, { children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
664
762
|
import_react_bootstrap.Col,
|
|
665
763
|
{
|
|
666
764
|
className: "errorMessageAddingFile",
|
|
@@ -675,7 +773,7 @@ var SelectedFiles = ({
|
|
|
675
773
|
] }, index) }) }) }, `error-${errorObj.FileName}-${index}`) });
|
|
676
774
|
})
|
|
677
775
|
] }) }),
|
|
678
|
-
/* @__PURE__ */ (0,
|
|
776
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "addFile-error-close-button", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
679
777
|
"button",
|
|
680
778
|
{
|
|
681
779
|
className: "selectedFilesLinkButton error-close",
|
|
@@ -683,7 +781,7 @@ var SelectedFiles = ({
|
|
|
683
781
|
removeError();
|
|
684
782
|
},
|
|
685
783
|
"aria-label": activatedLanguage === "sv" ? `St\xE4ng felmeddelande` : `Close error message`,
|
|
686
|
-
children: /* @__PURE__ */ (0,
|
|
784
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
687
785
|
"svg",
|
|
688
786
|
{
|
|
689
787
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -691,7 +789,7 @@ var SelectedFiles = ({
|
|
|
691
789
|
height: "14",
|
|
692
790
|
viewBox: "0 0 14 14",
|
|
693
791
|
fill: "none",
|
|
694
|
-
children: /* @__PURE__ */ (0,
|
|
792
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
695
793
|
"path",
|
|
696
794
|
{
|
|
697
795
|
d: "M0.75 12.75L12.75 0.75M0.75 0.75L12.75 12.75",
|
|
@@ -705,15 +803,15 @@ var SelectedFiles = ({
|
|
|
705
803
|
}
|
|
706
804
|
) })
|
|
707
805
|
] }) }),
|
|
708
|
-
questionObject.files.length > 0 && /* @__PURE__ */ (0,
|
|
806
|
+
questionObject.files.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("ul", { className: "fileListUnorderedList", "aria-label": "Uppladdade filer", children: questionObject.files.map((file, index) => {
|
|
709
807
|
const indicatorfileName = file.FileName;
|
|
710
808
|
let mobileFirstFileName = file.FileName.split(".").shift();
|
|
711
809
|
mobileFirstFileName = mobileFirstFileName.length > 8 ? mobileFirstFileName.substring(0, 8) + ".." : mobileFirstFileName;
|
|
712
810
|
const fileType = file.FileName.split(".").pop();
|
|
713
811
|
mobileFirstFileName = mobileFirstFileName + "." + fileType;
|
|
714
|
-
return /* @__PURE__ */ (0,
|
|
715
|
-
/* @__PURE__ */ (0,
|
|
716
|
-
/* @__PURE__ */ (0,
|
|
812
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react6.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "fileInListContainer", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "fileInList", children: [
|
|
813
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "fileItem", children: [
|
|
814
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_bootstrap.Col, { style: { maxWidth: "30px" }, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { "aria-hidden": "true", className: "uploadedDot", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
717
815
|
"svg",
|
|
718
816
|
{
|
|
719
817
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -721,7 +819,7 @@ var SelectedFiles = ({
|
|
|
721
819
|
height: "8",
|
|
722
820
|
viewBox: "0 0 8 8",
|
|
723
821
|
fill: "none",
|
|
724
|
-
children: /* @__PURE__ */ (0,
|
|
822
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
725
823
|
"path",
|
|
726
824
|
{
|
|
727
825
|
d: "M1 4.65913L2.8 6.45913L7 1.35913",
|
|
@@ -732,20 +830,20 @@ var SelectedFiles = ({
|
|
|
732
830
|
)
|
|
733
831
|
}
|
|
734
832
|
) }) }),
|
|
735
|
-
/* @__PURE__ */ (0,
|
|
833
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_bootstrap.Col, { children: windowWidth < 768 ? /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("span", { className: "mobileFirstFileName", children: [
|
|
736
834
|
mobileFirstFileName,
|
|
737
835
|
" (",
|
|
738
836
|
Math.ceil(file.FileSize / (1024 * 1024)),
|
|
739
837
|
" ",
|
|
740
838
|
"MB)"
|
|
741
|
-
] }) : /* @__PURE__ */ (0,
|
|
839
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("span", { className: "desktopFileName", children: [
|
|
742
840
|
file.FileName,
|
|
743
841
|
" (",
|
|
744
|
-
/* @__PURE__ */ (0,
|
|
842
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "fileSizeText", children: file.FileSize < 1024 * 1024 ? `${Math.round(file.FileSize / 1024)} kB` : `${(file.FileSize / (1024 * 1024)).toFixed(1)} MB` }),
|
|
745
843
|
" ",
|
|
746
844
|
")"
|
|
747
845
|
] }) }),
|
|
748
|
-
/* @__PURE__ */ (0,
|
|
846
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_bootstrap.Col, { className: "lastCol", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
749
847
|
"button",
|
|
750
848
|
{
|
|
751
849
|
className: "selectedFilesLinkButton",
|
|
@@ -755,17 +853,17 @@ var SelectedFiles = ({
|
|
|
755
853
|
}
|
|
756
854
|
) })
|
|
757
855
|
] }),
|
|
758
|
-
showIndicator && /* @__PURE__ */ (0,
|
|
759
|
-
/* @__PURE__ */ (0,
|
|
856
|
+
showIndicator && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_bootstrap.Row, { children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_bootstrap.Col, { style: { width: "100%", padding: 0 }, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(IndicatorStandard_default, { filename: indicatorfileName }) }) }),
|
|
857
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_bootstrap.Row, { style: { marginTop: "12px", marginBottom: "12px" }, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_bootstrap.Col, { className: "makeSpace" }) })
|
|
760
858
|
] }, index) }) }) }, `file-${file.FileName}-${index}`) });
|
|
761
859
|
}) }),
|
|
762
|
-
/* @__PURE__ */ (0,
|
|
860
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { ref: theDiv, className: "pts-clipboard-container" })
|
|
763
861
|
] });
|
|
764
862
|
};
|
|
765
863
|
var SelectedFilesStandard_default = SelectedFiles;
|
|
766
864
|
|
|
767
865
|
// src/components/input-components/AddFilesStandard/AddFilesStandard.tsx
|
|
768
|
-
var
|
|
866
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
769
867
|
var AddFiles = ({
|
|
770
868
|
questionObject,
|
|
771
869
|
handleQuestionInputChange = (e, questionObject2) => {
|
|
@@ -803,24 +901,24 @@ var AddFiles = ({
|
|
|
803
901
|
const errorId = `error-${questionObject.id}`;
|
|
804
902
|
const labelId = `label-${questionObject.id}`;
|
|
805
903
|
const maxSizeMB = Math.round(allowedTotalFileSize / 1048576);
|
|
806
|
-
const [numberOfFiles, setNumberOfFiles] = (0,
|
|
807
|
-
const [totalFileSize, setTotalFileSize] = (0,
|
|
808
|
-
const [errorMessageAddingFile, setErrorMessageAddingFile] = (0,
|
|
809
|
-
const [newFiles, setNewFiles] = (0,
|
|
810
|
-
const [dropFilesText, setDropFilesText] = (0,
|
|
811
|
-
(0,
|
|
904
|
+
const [numberOfFiles, setNumberOfFiles] = (0, import_react7.useState)(0);
|
|
905
|
+
const [totalFileSize, setTotalFileSize] = (0, import_react7.useState)(0);
|
|
906
|
+
const [errorMessageAddingFile, setErrorMessageAddingFile] = (0, import_react7.useState)([]);
|
|
907
|
+
const [newFiles, setNewFiles] = (0, import_react7.useState)([]);
|
|
908
|
+
const [dropFilesText, setDropFilesText] = (0, import_react7.useState)("Dra och sl\xE4pp dina filer h\xE4r");
|
|
909
|
+
(0, import_react7.useEffect)(() => {
|
|
812
910
|
if (activatedLanguage === "sv") {
|
|
813
911
|
setDropFilesText("Dra och sl\xE4pp dina filer h\xE4r");
|
|
814
912
|
} else {
|
|
815
913
|
setDropFilesText("Drag and drop your files here");
|
|
816
914
|
}
|
|
817
915
|
}, [activatedLanguage]);
|
|
818
|
-
(0,
|
|
916
|
+
(0, import_react7.useEffect)(() => {
|
|
819
917
|
if (questionObject.files && questionObject.files.length > 0) {
|
|
820
918
|
setNumberOfFiles(questionObject.files.length);
|
|
821
919
|
}
|
|
822
920
|
}, []);
|
|
823
|
-
const onDrop = (0,
|
|
921
|
+
const onDrop = (0, import_react7.useCallback)(
|
|
824
922
|
(acceptedFiles) => {
|
|
825
923
|
var _a, _b, _c;
|
|
826
924
|
const validationErrors = [];
|
|
@@ -910,7 +1008,7 @@ var AddFiles = ({
|
|
|
910
1008
|
reader.readAsDataURL(file);
|
|
911
1009
|
});
|
|
912
1010
|
};
|
|
913
|
-
(0,
|
|
1011
|
+
(0, import_react7.useEffect)(() => {
|
|
914
1012
|
if (newFiles.length > 0) {
|
|
915
1013
|
const currentFiles = questionObject.files ? questionObject.files : [];
|
|
916
1014
|
const e = {
|
|
@@ -937,9 +1035,9 @@ var AddFiles = ({
|
|
|
937
1035
|
const handleRemoveErrors = () => {
|
|
938
1036
|
setErrorMessageAddingFile([]);
|
|
939
1037
|
};
|
|
940
|
-
return /* @__PURE__ */ (0,
|
|
941
|
-
!showPreview && visible && /* @__PURE__ */ (0,
|
|
942
|
-
questionObject.aboutText && /* @__PURE__ */ (0,
|
|
1038
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
|
|
1039
|
+
!showPreview && visible && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "root-question addFile-question-container", id: `question-${questionObject.id}`, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { role: "group", children: [
|
|
1040
|
+
questionObject.aboutText && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
943
1041
|
"p",
|
|
944
1042
|
{
|
|
945
1043
|
id: aboutId,
|
|
@@ -949,19 +1047,19 @@ var AddFiles = ({
|
|
|
949
1047
|
),
|
|
950
1048
|
children: [
|
|
951
1049
|
questionObject.aboutText,
|
|
952
|
-
questionObject.isQuestionMandatory && /* @__PURE__ */ (0,
|
|
1050
|
+
questionObject.isQuestionMandatory && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { className: "pts-root-mandatoryAsterisk", "aria-label": "Obligatorisk fr\xE5ga", children: [
|
|
953
1051
|
" ",
|
|
954
1052
|
"*"
|
|
955
1053
|
] })
|
|
956
1054
|
]
|
|
957
1055
|
}
|
|
958
1056
|
),
|
|
959
|
-
questionObject.hasValidationError && /* @__PURE__ */ (0,
|
|
960
|
-
/* @__PURE__ */ (0,
|
|
961
|
-
/* @__PURE__ */ (0,
|
|
962
|
-
/* @__PURE__ */ (0,
|
|
1057
|
+
questionObject.hasValidationError && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "pts-root-error error addfileserror", id: errorId, children: [
|
|
1058
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { "aria-hidden": true, className: "errorDot", children: "!" }),
|
|
1059
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "sr-only", children: "Valideringsfel" }),
|
|
1060
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "errorText", children: questionObject.validationDefaultMessesege })
|
|
963
1061
|
] }),
|
|
964
|
-
/* @__PURE__ */ (0,
|
|
1062
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
965
1063
|
ExploreFilesStandard_default,
|
|
966
1064
|
{
|
|
967
1065
|
FilesSelected: onDrop,
|
|
@@ -977,7 +1075,7 @@ var AddFiles = ({
|
|
|
977
1075
|
removeUploadErrors: handleRemoveErrors
|
|
978
1076
|
}
|
|
979
1077
|
),
|
|
980
|
-
/* @__PURE__ */ (0,
|
|
1078
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
981
1079
|
DropFilesStandard_default,
|
|
982
1080
|
{
|
|
983
1081
|
FilesSelected: onDrop,
|
|
@@ -985,7 +1083,7 @@ var AddFiles = ({
|
|
|
985
1083
|
language: activatedLanguage
|
|
986
1084
|
}
|
|
987
1085
|
),
|
|
988
|
-
/* @__PURE__ */ (0,
|
|
1086
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
989
1087
|
SelectedFilesStandard_default,
|
|
990
1088
|
{
|
|
991
1089
|
questionObject,
|
|
@@ -1000,7 +1098,7 @@ var AddFiles = ({
|
|
|
1000
1098
|
}
|
|
1001
1099
|
)
|
|
1002
1100
|
] }) }),
|
|
1003
|
-
showPreview && /* @__PURE__ */ (0,
|
|
1101
|
+
showPreview && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(PreviewAddFiles, { activatedLanguage, questionObject })
|
|
1004
1102
|
] });
|
|
1005
1103
|
};
|
|
1006
1104
|
var AddFilesStandard_default = AddFiles;
|
|
@@ -1009,17 +1107,17 @@ var PreviewAddFiles = ({
|
|
|
1009
1107
|
activatedLanguage
|
|
1010
1108
|
}) => {
|
|
1011
1109
|
const previewId = `preview-${questionObject.Id}`;
|
|
1012
|
-
return /* @__PURE__ */ (0,
|
|
1013
|
-
/* @__PURE__ */ (0,
|
|
1014
|
-
questionObject.files && questionObject.files.length > 0 ? /* @__PURE__ */ (0,
|
|
1015
|
-
return /* @__PURE__ */ (0,
|
|
1016
|
-
}) }) }) : /* @__PURE__ */ (0,
|
|
1110
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
|
|
1111
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("dt", { id: `question-${previewId}`, children: questionObject.questionLabel ? questionObject.questionLabel : activatedLanguage === "en" ? "Attached files" : "Bifogade filer" }),
|
|
1112
|
+
questionObject.files && questionObject.files.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("dd", { className: "pts-addFiles-answer", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("ul", { "aria-labelledby": previewId, className: "pts-preview-answer-list", children: questionObject.files.map((file, index) => {
|
|
1113
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("li", { children: file.FileName }, `file-${index}-${file.FileName}`);
|
|
1114
|
+
}) }) }) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("dd", { className: "no-answer-preview-page", children: activatedLanguage === "en" ? "No attached files" : "Inga bifogade filer" })
|
|
1017
1115
|
] });
|
|
1018
1116
|
};
|
|
1019
1117
|
|
|
1020
1118
|
// src/components/input-components/SingleCheckboxStandard/SingleCheckboxStandard.tsx
|
|
1021
|
-
var
|
|
1022
|
-
var
|
|
1119
|
+
var import_react8 = require("react");
|
|
1120
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
1023
1121
|
var SingleCheckbox = ({
|
|
1024
1122
|
question,
|
|
1025
1123
|
handleQuestionInputChange,
|
|
@@ -1031,8 +1129,8 @@ var SingleCheckbox = ({
|
|
|
1031
1129
|
const inputId = `checkbox-${question.id}`;
|
|
1032
1130
|
const aboutId = `about-${question.id}`;
|
|
1033
1131
|
const errorId = `error-${question.id}`;
|
|
1034
|
-
const [checked, setChecked] = (0,
|
|
1035
|
-
(0,
|
|
1132
|
+
const [checked, setChecked] = (0, import_react8.useState)(false);
|
|
1133
|
+
(0, import_react8.useEffect)(() => {
|
|
1036
1134
|
if (question.answer && question.answer === "true") {
|
|
1037
1135
|
setChecked(true);
|
|
1038
1136
|
} else {
|
|
@@ -1045,10 +1143,10 @@ var SingleCheckbox = ({
|
|
|
1045
1143
|
const e = { target: { value: answer } };
|
|
1046
1144
|
handleQuestionInputChange(e, question);
|
|
1047
1145
|
};
|
|
1048
|
-
return /* @__PURE__ */ (0,
|
|
1049
|
-
!showPreview && question.visible && /* @__PURE__ */ (0,
|
|
1050
|
-
/* @__PURE__ */ (0,
|
|
1051
|
-
/* @__PURE__ */ (0,
|
|
1146
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
|
|
1147
|
+
!showPreview && question.visible && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { id: questionId, className: "pts-root-question pts-singleCheckbox-container", children: [
|
|
1148
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "pts-singleCheckbox-row", children: [
|
|
1149
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1052
1150
|
"input",
|
|
1053
1151
|
{
|
|
1054
1152
|
type: "checkbox",
|
|
@@ -1066,11 +1164,11 @@ var SingleCheckbox = ({
|
|
|
1066
1164
|
"aria-errormessage": question.hasValidationError ? errorId : void 0
|
|
1067
1165
|
}
|
|
1068
1166
|
),
|
|
1069
|
-
/* @__PURE__ */ (0,
|
|
1070
|
-
question.isQuestionMandatory && /* @__PURE__ */ (0,
|
|
1167
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("label", { htmlFor: `${inputId}`, children: question.questionLabel }),
|
|
1168
|
+
question.isQuestionMandatory && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { "aria-hidden": true, className: "pts-root-mandatoryAsterisk", children: "*" }),
|
|
1071
1169
|
" "
|
|
1072
1170
|
] }),
|
|
1073
|
-
question.aboutText && /* @__PURE__ */ (0,
|
|
1171
|
+
question.aboutText && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1074
1172
|
"div",
|
|
1075
1173
|
{
|
|
1076
1174
|
id: aboutId,
|
|
@@ -1079,15 +1177,15 @@ var SingleCheckbox = ({
|
|
|
1079
1177
|
}
|
|
1080
1178
|
),
|
|
1081
1179
|
" ",
|
|
1082
|
-
question.hasValidationError && /* @__PURE__ */ (0,
|
|
1083
|
-
/* @__PURE__ */ (0,
|
|
1084
|
-
/* @__PURE__ */ (0,
|
|
1085
|
-
/* @__PURE__ */ (0,
|
|
1180
|
+
question.hasValidationError && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "pts-root-error", id: errorId, children: [
|
|
1181
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { "aria-hidden": true, className: "errorDot", children: "!" }),
|
|
1182
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "sr-only", children: "Valideringsfel" }),
|
|
1183
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "errorText", children: question.validationDefaultMessesege })
|
|
1086
1184
|
] }),
|
|
1087
1185
|
" "
|
|
1088
1186
|
] }),
|
|
1089
1187
|
" ",
|
|
1090
|
-
showPreview && /* @__PURE__ */ (0,
|
|
1188
|
+
showPreview && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(PreviewSingleCheckbox, { activatedLanguage, question })
|
|
1091
1189
|
] });
|
|
1092
1190
|
};
|
|
1093
1191
|
var SingleCheckboxStandard_default = SingleCheckbox;
|
|
@@ -1097,9 +1195,9 @@ var PreviewSingleCheckbox = ({
|
|
|
1097
1195
|
}) => {
|
|
1098
1196
|
var _a, _b;
|
|
1099
1197
|
const previewId = `preview-${question.id}`;
|
|
1100
|
-
return /* @__PURE__ */ (0,
|
|
1101
|
-
/* @__PURE__ */ (0,
|
|
1102
|
-
((_b = question.answer) == null ? void 0 : _b.trim()) ? /* @__PURE__ */ (0,
|
|
1198
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
|
|
1199
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("dt", { id: `question-${previewId}`, children: (_a = question.previewLabel) != null ? _a : question.questionLabel }),
|
|
1200
|
+
((_b = question.answer) == null ? void 0 : _b.trim()) ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("dd", { className: "pts-singleCheckbox-preview pts-root-answer", id: `answer-${previewId}`, children: question.answer === "false" ? activatedLanguage === "sv" ? "Nej" : "No" : activatedLanguage === "sv" ? "Ja" : "Yes" }) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1103
1201
|
"dd",
|
|
1104
1202
|
{
|
|
1105
1203
|
className: "pts-singleCheckbox-preview pts-root-answer",
|
|
@@ -1110,154 +1208,6 @@ var PreviewSingleCheckbox = ({
|
|
|
1110
1208
|
] });
|
|
1111
1209
|
};
|
|
1112
1210
|
|
|
1113
|
-
// src/components/input-components/DropdownStandard/DropdownStandard.tsx
|
|
1114
|
-
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
1115
|
-
var CustomDropdownStandard = ({
|
|
1116
|
-
question,
|
|
1117
|
-
handleQuestionInputChange,
|
|
1118
|
-
showPreview = false
|
|
1119
|
-
}) => {
|
|
1120
|
-
var _a;
|
|
1121
|
-
const questionId = `question-${question.id}`;
|
|
1122
|
-
const selectId = `select-${question.id}`;
|
|
1123
|
-
const errorId = `error-${question.id}`;
|
|
1124
|
-
const handleInputChange = (event) => {
|
|
1125
|
-
const e = { target: { value: event.target.value } };
|
|
1126
|
-
handleQuestionInputChange(e, question);
|
|
1127
|
-
};
|
|
1128
|
-
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
|
|
1129
|
-
!showPreview && question.visible && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "pts-root-question pts-dropdown-container", id: questionId, children: [
|
|
1130
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("label", { htmlFor: selectId, children: [
|
|
1131
|
-
question.questionLabel,
|
|
1132
|
-
" ",
|
|
1133
|
-
question.isQuestionMandatory && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { "aria-hidden": true, className: "pts-root-mandatoryAsterisk", children: "*" })
|
|
1134
|
-
] }),
|
|
1135
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
1136
|
-
"select",
|
|
1137
|
-
{
|
|
1138
|
-
id: selectId,
|
|
1139
|
-
name: `name-${question.id}`,
|
|
1140
|
-
value: question.answer || "",
|
|
1141
|
-
onChange: handleInputChange,
|
|
1142
|
-
"aria-required": question.isQuestionMandatory,
|
|
1143
|
-
"aria-invalid": question.hasValidationError ? question.hasValidationError : void 0,
|
|
1144
|
-
"aria-errormessage": question.hasValidationError ? errorId : void 0,
|
|
1145
|
-
children: [
|
|
1146
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("option", { value: "", children: "V\xE4lj ett alternativ" }),
|
|
1147
|
-
(_a = question.options) == null ? void 0 : _a.map((option, index) => {
|
|
1148
|
-
if (option.value === question.answer) {
|
|
1149
|
-
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("option", { value: option.value, selected: true, children: option.label }, index);
|
|
1150
|
-
} else {
|
|
1151
|
-
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("option", { value: option.value, children: option.label }, index);
|
|
1152
|
-
}
|
|
1153
|
-
})
|
|
1154
|
-
]
|
|
1155
|
-
}
|
|
1156
|
-
),
|
|
1157
|
-
question.hasValidationError && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "pts-root-error", id: errorId, children: [
|
|
1158
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { "aria-hidden": true, className: "errorDot", children: "!" }),
|
|
1159
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "sr-only", children: "Valideringsfel" }),
|
|
1160
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "errorText", children: question.validationDefaultMessesege })
|
|
1161
|
-
] })
|
|
1162
|
-
] }),
|
|
1163
|
-
showPreview && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(PreviewDropdown, { question })
|
|
1164
|
-
] });
|
|
1165
|
-
};
|
|
1166
|
-
var DropdownStandard_default = CustomDropdownStandard;
|
|
1167
|
-
var PreviewDropdown = ({ question }) => {
|
|
1168
|
-
var _a, _b;
|
|
1169
|
-
const previewId = `preview-${question.id}`;
|
|
1170
|
-
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
|
|
1171
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("dt", { id: `question-${previewId}`, children: (_a = question.previewLabel) != null ? _a : question.questionLabel }),
|
|
1172
|
-
((_b = question.answer) == null ? void 0 : _b.trim()) ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("dd", { className: "pts-dropdown-preview pts-root-answer", id: `answer-${previewId}`, children: question.answer }) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1173
|
-
"dd",
|
|
1174
|
-
{
|
|
1175
|
-
className: "pts-dropdown-preview pts-root-answer no-answer-preview-page",
|
|
1176
|
-
id: `answer-${previewId}`,
|
|
1177
|
-
children: "Inget svar"
|
|
1178
|
-
}
|
|
1179
|
-
)
|
|
1180
|
-
] });
|
|
1181
|
-
};
|
|
1182
|
-
|
|
1183
|
-
// src/components/input-components/MultipleCheckboxesStandard/MultipleCheckboxesStandard.tsx
|
|
1184
|
-
var import_react8 = require("react");
|
|
1185
|
-
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
1186
|
-
var MultipleCheckboxes = ({
|
|
1187
|
-
question,
|
|
1188
|
-
handleQuestionInputChange,
|
|
1189
|
-
showPreview = false,
|
|
1190
|
-
activatedLanguage = "sv"
|
|
1191
|
-
}) => {
|
|
1192
|
-
var _a;
|
|
1193
|
-
const questionId = `question-${question.id}`;
|
|
1194
|
-
const [checkedValues, setCheckedValues] = (0, import_react8.useState)([]);
|
|
1195
|
-
(0, import_react8.useEffect)(() => {
|
|
1196
|
-
var _a2;
|
|
1197
|
-
const initialValues = ((_a2 = question.options) == null ? void 0 : _a2.filter((option) => {
|
|
1198
|
-
var _a3;
|
|
1199
|
-
return (_a3 = question.answer) == null ? void 0 : _a3.includes(option.label);
|
|
1200
|
-
}).map((option) => option.label)) || [];
|
|
1201
|
-
console.log("Initial values:", initialValues);
|
|
1202
|
-
setCheckedValues(initialValues);
|
|
1203
|
-
}, [question.answer, question.options]);
|
|
1204
|
-
const handleInputChange = (event, optionValue) => {
|
|
1205
|
-
let updatedValues = [...checkedValues];
|
|
1206
|
-
if (updatedValues.includes(optionValue)) {
|
|
1207
|
-
updatedValues = updatedValues.filter((val) => val !== optionValue);
|
|
1208
|
-
} else {
|
|
1209
|
-
updatedValues.push(optionValue);
|
|
1210
|
-
}
|
|
1211
|
-
setCheckedValues(updatedValues);
|
|
1212
|
-
const e = { target: { value: updatedValues.toString() } };
|
|
1213
|
-
handleQuestionInputChange(e, question);
|
|
1214
|
-
};
|
|
1215
|
-
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
|
|
1216
|
-
!showPreview && question.visible && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { id: questionId, className: "pts-root-question pts-multipleCheckboxes-container", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("fieldset", { children: [
|
|
1217
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("legend", { className: "multipleCheckboxes-legend", id: `label-${questionId}`, children: [
|
|
1218
|
-
question.questionLabel,
|
|
1219
|
-
" ",
|
|
1220
|
-
question.isQuestionMandatory && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { "aria-hidden": true, className: "pts-root-mandatoryAsterisk", children: "*" }),
|
|
1221
|
-
" "
|
|
1222
|
-
] }),
|
|
1223
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("ul", { children: (_a = question.options) == null ? void 0 : _a.map((option, index) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
|
|
1224
|
-
" ",
|
|
1225
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1226
|
-
"input",
|
|
1227
|
-
{
|
|
1228
|
-
type: "checkbox",
|
|
1229
|
-
name: `${question.id}-option`,
|
|
1230
|
-
id: `${question.id}-option-${index}`,
|
|
1231
|
-
value: option.label,
|
|
1232
|
-
checked: checkedValues.includes(option.label),
|
|
1233
|
-
onChange: (e) => handleInputChange(e, option.label),
|
|
1234
|
-
className: question.hasValidationError ? "pts-root-question-input-error-border" : void 0
|
|
1235
|
-
}
|
|
1236
|
-
),
|
|
1237
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("label", { htmlFor: `${question.id}-option-${index}`, children: option.label })
|
|
1238
|
-
] }) }, index)) })
|
|
1239
|
-
] }) }),
|
|
1240
|
-
" ",
|
|
1241
|
-
showPreview && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(PrevieMultipleCheckboxes, { activatedLanguage, question })
|
|
1242
|
-
] });
|
|
1243
|
-
};
|
|
1244
|
-
var MultipleCheckboxesStandard_default = MultipleCheckboxes;
|
|
1245
|
-
var PrevieMultipleCheckboxes = ({
|
|
1246
|
-
question,
|
|
1247
|
-
activatedLanguage
|
|
1248
|
-
}) => {
|
|
1249
|
-
var _a, _b;
|
|
1250
|
-
const previewId = `preview-${question.id}`;
|
|
1251
|
-
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
|
|
1252
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("dt", { id: `question-${previewId}`, children: (_a = question.previewLabel) != null ? _a : question.questionLabel }),
|
|
1253
|
-
question.answer ? question.options && question.options.length === 1 ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("dd", { children: question.options[0].label }) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("dd", { children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("ul", { className: "pts-preview-answer-list", children: (_b = question.options) == null ? void 0 : _b.filter((option) => {
|
|
1254
|
-
var _a2;
|
|
1255
|
-
return (_a2 = question.answer) == null ? void 0 : _a2.includes(option.label);
|
|
1256
|
-
}).map((option, index) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("li", { children: option.label }, index)) }) }) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("dd", { className: "no-answer-preview-page", children: activatedLanguage === "en" ? "No Answer" : "Inget svar" }),
|
|
1257
|
-
" "
|
|
1258
|
-
] });
|
|
1259
|
-
};
|
|
1260
|
-
|
|
1261
1211
|
// src/helpers/hasQuestionValidationError/hasQuestionValidationError.tsx
|
|
1262
1212
|
var import_date_fns = require("date-fns");
|
|
1263
1213
|
var hasQuestionValidationError = (question, questions) => {
|
|
@@ -2033,14 +1983,6 @@ var QuestionRenderer = ({
|
|
|
2033
1983
|
handleQuestionInputChange,
|
|
2034
1984
|
showPreview
|
|
2035
1985
|
}
|
|
2036
|
-
),
|
|
2037
|
-
question.questionType === "Dropdown" && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2038
|
-
DropdownStandard_default,
|
|
2039
|
-
{
|
|
2040
|
-
question,
|
|
2041
|
-
handleQuestionInputChange,
|
|
2042
|
-
showPreview
|
|
2043
|
-
}
|
|
2044
1986
|
)
|
|
2045
1987
|
] });
|
|
2046
1988
|
};
|
|
@@ -2094,7 +2036,7 @@ var QuestionGroup = ({
|
|
|
2094
2036
|
"aria-describedby": firstQuestion.hasValidationError ? `${firstQuestion.id}-error` : void 0,
|
|
2095
2037
|
children: [
|
|
2096
2038
|
legendLabel && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("legend", { children: [
|
|
2097
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", {
|
|
2039
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { children: [
|
|
2098
2040
|
legendLabel,
|
|
2099
2041
|
groupMandatory && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { "aria-hidden": true, className: "pts-root-mandatoryAsterisk", children: "*" })
|
|
2100
2042
|
] }),
|
|
@@ -2203,86 +2145,89 @@ var CookieBanner_default = CookieBanner;
|
|
|
2203
2145
|
// src/components/layout/FooterStandard/FooterStandard.tsx
|
|
2204
2146
|
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
2205
2147
|
var Footer = ({ activatedLanguage = "sv" }) => {
|
|
2206
|
-
return /* @__PURE__ */ (0, import_jsx_runtime17.
|
|
2207
|
-
/* @__PURE__ */ (0, import_jsx_runtime17.
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
"
|
|
2211
|
-
className: "pts-footer-logo",
|
|
2212
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
2213
|
-
width: "278",
|
|
2214
|
-
height: "72",
|
|
2215
|
-
viewBox: "0 0 278 72",
|
|
2216
|
-
fill: "none",
|
|
2217
|
-
children: [
|
|
2218
|
-
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2219
|
-
"path",
|
|
2220
|
-
{
|
|
2221
|
-
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",
|
|
2222
|
-
fill: "white"
|
|
2223
|
-
}
|
|
2224
|
-
),
|
|
2225
|
-
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2226
|
-
"path",
|
|
2227
|
-
{
|
|
2228
|
-
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",
|
|
2229
|
-
fill: "white"
|
|
2230
|
-
}
|
|
2231
|
-
)
|
|
2232
|
-
]
|
|
2233
|
-
}
|
|
2234
|
-
),
|
|
2235
|
-
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("nav", { className: "pts-footer-linkList", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("ul", { children: [
|
|
2236
|
-
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
2237
|
-
"a",
|
|
2238
|
-
{
|
|
2239
|
-
href: activatedLanguage === "en" ? "https://pts.se/en/contact/" : "https://www.pts.se/kontakt/",
|
|
2240
|
-
target: "_blank",
|
|
2241
|
-
rel: "noopener noreferrer",
|
|
2242
|
-
children: [
|
|
2243
|
-
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "sr-only", children: activatedLanguage === "en" ? "PTS Contact (opens in new tab)" : "PTS Kontakt (\xF6ppnas i ny flik)" }),
|
|
2244
|
-
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { "aria-hidden": "true", children: activatedLanguage === "en" ? "Contact" : "Kontakt" })
|
|
2245
|
-
]
|
|
2246
|
-
}
|
|
2247
|
-
) }),
|
|
2248
|
-
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
2249
|
-
"a",
|
|
2250
|
-
{
|
|
2251
|
-
href: activatedLanguage === "en" ? "https://pts.se/en/gdpr" : "https://www.pts.se/gdpr/",
|
|
2252
|
-
target: "_blank",
|
|
2253
|
-
rel: "noopener noreferrer",
|
|
2254
|
-
children: [
|
|
2255
|
-
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "sr-only", children: activatedLanguage === "en" ? "PTS Processing of personal data (opens in new tab)" : "PTS Behandling av personuppgifter (\xF6ppnas i ny flik)" }),
|
|
2256
|
-
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { "aria-hidden": "true", children: activatedLanguage === "en" ? "Processing of personal data" : "Behandling av personuppgifter" })
|
|
2257
|
-
]
|
|
2258
|
-
}
|
|
2259
|
-
) }),
|
|
2260
|
-
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
2261
|
-
"a",
|
|
2262
|
-
{
|
|
2263
|
-
href: activatedLanguage === "en" ? "https://pts.se/en/accessibility-eservices" : "https://www.pts.se/tillganglighet-etjanster",
|
|
2264
|
-
target: "_blank",
|
|
2265
|
-
rel: "noopener noreferrer",
|
|
2266
|
-
children: [
|
|
2267
|
-
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "sr-only", children: activatedLanguage === "en" ? "PTS Accessibility (opens in new tab)" : "PTS Tillg\xE4nglighetsredog\xF6relse (\xF6ppnas i ny flik)" }),
|
|
2268
|
-
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { "aria-hidden": "true", children: activatedLanguage === "en" ? "Accessibility" : "Tillg\xE4nglighetsredog\xF6relse" })
|
|
2269
|
-
]
|
|
2270
|
-
}
|
|
2271
|
-
) }),
|
|
2272
|
-
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
2273
|
-
"a",
|
|
2148
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("footer", { className: "pts-footer-container", children: [
|
|
2149
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "pts-footer-slogan-text-container", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "pts-footer-slogan-text", children: activatedLanguage === "sv" ? "S\xE4ker och tillg\xE4nglig kommunikation f\xF6r Sverige" : "Secure and accessible communication for Sweden" }) }),
|
|
2150
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "pts-footer-content", children: [
|
|
2151
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
2152
|
+
"svg",
|
|
2274
2153
|
{
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2154
|
+
"aria-label": activatedLanguage === "en" ? "PTS logotype" : "PTS logotyp",
|
|
2155
|
+
className: "pts-footer-logo",
|
|
2156
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2157
|
+
width: "278",
|
|
2158
|
+
height: "72",
|
|
2159
|
+
viewBox: "0 0 278 72",
|
|
2160
|
+
fill: "none",
|
|
2278
2161
|
children: [
|
|
2279
|
-
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2280
|
-
|
|
2162
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2163
|
+
"path",
|
|
2164
|
+
{
|
|
2165
|
+
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",
|
|
2166
|
+
fill: "white"
|
|
2167
|
+
}
|
|
2168
|
+
),
|
|
2169
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2170
|
+
"path",
|
|
2171
|
+
{
|
|
2172
|
+
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",
|
|
2173
|
+
fill: "white"
|
|
2174
|
+
}
|
|
2175
|
+
)
|
|
2281
2176
|
]
|
|
2282
2177
|
}
|
|
2283
|
-
)
|
|
2284
|
-
|
|
2285
|
-
|
|
2178
|
+
),
|
|
2179
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("nav", { className: "pts-footer-linkList", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("ul", { children: [
|
|
2180
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
2181
|
+
"a",
|
|
2182
|
+
{
|
|
2183
|
+
href: activatedLanguage === "en" ? "https://pts.se/en/contact/" : "https://www.pts.se/kontakt/",
|
|
2184
|
+
target: "_blank",
|
|
2185
|
+
rel: "noopener noreferrer",
|
|
2186
|
+
children: [
|
|
2187
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "sr-only", children: activatedLanguage === "en" ? "PTS Contact (opens in new tab)" : "PTS Kontakt (\xF6ppnas i ny flik)" }),
|
|
2188
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { "aria-hidden": "true", children: activatedLanguage === "en" ? "Contact" : "Kontakt" })
|
|
2189
|
+
]
|
|
2190
|
+
}
|
|
2191
|
+
) }),
|
|
2192
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
2193
|
+
"a",
|
|
2194
|
+
{
|
|
2195
|
+
href: activatedLanguage === "en" ? "https://pts.se/en/gdpr" : "https://www.pts.se/gdpr/",
|
|
2196
|
+
target: "_blank",
|
|
2197
|
+
rel: "noopener noreferrer",
|
|
2198
|
+
children: [
|
|
2199
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "sr-only", children: activatedLanguage === "en" ? "PTS Processing of personal data (opens in new tab)" : "PTS Behandling av personuppgifter (\xF6ppnas i ny flik)" }),
|
|
2200
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { "aria-hidden": "true", children: activatedLanguage === "en" ? "Processing of personal data" : "Behandling av personuppgifter" })
|
|
2201
|
+
]
|
|
2202
|
+
}
|
|
2203
|
+
) }),
|
|
2204
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
2205
|
+
"a",
|
|
2206
|
+
{
|
|
2207
|
+
href: activatedLanguage === "en" ? "https://pts.se/en/accessibility-eservices" : "https://www.pts.se/tillganglighet-etjanster",
|
|
2208
|
+
target: "_blank",
|
|
2209
|
+
rel: "noopener noreferrer",
|
|
2210
|
+
children: [
|
|
2211
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "sr-only", children: activatedLanguage === "en" ? "PTS Accessibility (opens in new tab)" : "PTS Tillg\xE4nglighetsredog\xF6relse (\xF6ppnas i ny flik)" }),
|
|
2212
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { "aria-hidden": "true", children: activatedLanguage === "en" ? "Accessibility" : "Tillg\xE4nglighetsredog\xF6relse" })
|
|
2213
|
+
]
|
|
2214
|
+
}
|
|
2215
|
+
) }),
|
|
2216
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
2217
|
+
"a",
|
|
2218
|
+
{
|
|
2219
|
+
href: activatedLanguage === "en" ? "https://pts.se/en/cookies-eservices" : "https://www.pts.se/kakor-etjanster",
|
|
2220
|
+
target: "_blank",
|
|
2221
|
+
rel: "noopener noreferrer",
|
|
2222
|
+
children: [
|
|
2223
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "sr-only", children: activatedLanguage === "en" ? "PTS Cookies (opens in new tab)" : "PTS Kakor (\xF6ppnas i ny flik)" }),
|
|
2224
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { "aria-hidden": "true", children: activatedLanguage === "en" ? "Cookies" : "Kakor" })
|
|
2225
|
+
]
|
|
2226
|
+
}
|
|
2227
|
+
) })
|
|
2228
|
+
] }) })
|
|
2229
|
+
] })
|
|
2230
|
+
] });
|
|
2286
2231
|
};
|
|
2287
2232
|
var FooterStandard_default = Footer;
|
|
2288
2233
|
|
|
@@ -2683,7 +2628,7 @@ var Header = ({
|
|
|
2683
2628
|
if (activatedLanguage === "sv") return "English";
|
|
2684
2629
|
else return "Svenska";
|
|
2685
2630
|
};
|
|
2686
|
-
return /* @__PURE__ */ (0, import_jsx_runtime19.
|
|
2631
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("header", { className: "pts-header-container", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "pts-header-content", children: [
|
|
2687
2632
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "pts-header-logo-container", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
2688
2633
|
"a",
|
|
2689
2634
|
{
|
|
@@ -2694,7 +2639,7 @@ var Header = ({
|
|
|
2694
2639
|
children: activatedLanguage === "en" ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Logo_en, {}) }) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Logo_sv, {}) })
|
|
2695
2640
|
}
|
|
2696
2641
|
) }),
|
|
2697
|
-
useLanguage && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
2642
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "pts-header-navigation-container", children: useLanguage && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
2698
2643
|
"button",
|
|
2699
2644
|
{
|
|
2700
2645
|
lang: activatedLanguage === "en" ? "en" : "sv",
|
|
@@ -2707,8 +2652,8 @@ var Header = ({
|
|
|
2707
2652
|
activatedLanguage === "sv" && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "sr-only", children: "Change language to English" })
|
|
2708
2653
|
]
|
|
2709
2654
|
}
|
|
2710
|
-
)
|
|
2711
|
-
] });
|
|
2655
|
+
) })
|
|
2656
|
+
] }) });
|
|
2712
2657
|
};
|
|
2713
2658
|
var HeaderStandard_default = Header;
|
|
2714
2659
|
|
|
@@ -2966,7 +2911,7 @@ var EditPreviewLink = ({
|
|
|
2966
2911
|
changeStepHandler,
|
|
2967
2912
|
activatedLanguage = "sv"
|
|
2968
2913
|
}) => {
|
|
2969
|
-
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "pts-editPreviewLink-container", children: /* @__PURE__ */ (0, import_jsx_runtime25.
|
|
2914
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "pts-editPreviewLink-container", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2970
2915
|
"a",
|
|
2971
2916
|
{
|
|
2972
2917
|
href: "#",
|
|
@@ -2975,30 +2920,7 @@ var EditPreviewLink = ({
|
|
|
2975
2920
|
e.preventDefault();
|
|
2976
2921
|
changeStepHandler(step.step);
|
|
2977
2922
|
},
|
|
2978
|
-
children:
|
|
2979
|
-
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2980
|
-
"svg",
|
|
2981
|
-
{
|
|
2982
|
-
"aria-hidden": "true",
|
|
2983
|
-
focusable: "false",
|
|
2984
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
2985
|
-
width: "16",
|
|
2986
|
-
height: "16",
|
|
2987
|
-
viewBox: "0 0 16 16",
|
|
2988
|
-
fill: "none",
|
|
2989
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2990
|
-
"path",
|
|
2991
|
-
{
|
|
2992
|
-
d: "M10.0001 3.99996L12.0001 5.99996M8.66675 13.3333H14.0001M3.33341 10.6666L2.66675 13.3333L5.33341 12.6666L13.0574 4.94263C13.3074 4.69259 13.4478 4.35351 13.4478 3.99996C13.4478 3.64641 13.3074 3.30733 13.0574 3.05729L12.9427 2.94263C12.6927 2.69267 12.3536 2.55225 12.0001 2.55225C11.6465 2.55225 11.3075 2.69267 11.0574 2.94263L3.33341 10.6666Z",
|
|
2993
|
-
stroke: "#6E3282",
|
|
2994
|
-
strokeLinecap: "round",
|
|
2995
|
-
strokeLinejoin: "round"
|
|
2996
|
-
}
|
|
2997
|
-
)
|
|
2998
|
-
}
|
|
2999
|
-
),
|
|
3000
|
-
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "pts-edit-step-text", children: activatedLanguage === "en" ? `Edit step ${step.step}` : `Redigera steg ${step.step}` })
|
|
3001
|
-
]
|
|
2923
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "pts-edit-step-text", children: activatedLanguage === "en" ? `Edit step ${step.step}` : `Redigera steg ${step.step}` })
|
|
3002
2924
|
}
|
|
3003
2925
|
) });
|
|
3004
2926
|
};
|
|
@@ -3134,7 +3056,7 @@ var ValidationErrorSummaryList = ({
|
|
|
3134
3056
|
if (container) {
|
|
3135
3057
|
container.scrollIntoView({ behavior: "smooth", block: "center" });
|
|
3136
3058
|
setTimeout(() => {
|
|
3137
|
-
const input = container.querySelector("input, textarea, select");
|
|
3059
|
+
const input = container.querySelector("input, textarea, select, button");
|
|
3138
3060
|
if (input) {
|
|
3139
3061
|
input.focus();
|
|
3140
3062
|
}
|
|
@@ -3178,7 +3100,7 @@ var ValidationErrorSummaryList_default = ValidationErrorSummaryList;
|
|
|
3178
3100
|
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
3179
3101
|
var FormStatusMessagesScreenReader = ({ formStatus }) => {
|
|
3180
3102
|
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_jsx_runtime30.Fragment, { children: [
|
|
3181
|
-
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { "aria-live": "assertive", children: formStatus === "failed" && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "mandatoryAsterisk", children: "N\xE5got gick fel, f\xF6rs\xF6k igen senare eller kontakta oss!" }) }),
|
|
3103
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { "aria-live": "assertive", children: formStatus === "failed" && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "pts-root-mandatoryAsterisk", children: "N\xE5got gick fel, f\xF6rs\xF6k igen senare eller kontakta oss!" }) }),
|
|
3182
3104
|
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { "aria-live": "polite", className: "visually-hidden", children: formStatus === "loading" ? "Ditt \xE4rende registreras. Uppdatera eller st\xE4ng inte sidan." : "" })
|
|
3183
3105
|
] });
|
|
3184
3106
|
};
|
|
@@ -3188,7 +3110,6 @@ var FormStatusMessagesScreenReader_default = FormStatusMessagesScreenReader;
|
|
|
3188
3110
|
AddFilesStandard,
|
|
3189
3111
|
CheckboxGroupStandard,
|
|
3190
3112
|
CookieBanner,
|
|
3191
|
-
DropdownStandard,
|
|
3192
3113
|
EditPreviewLinkStandard,
|
|
3193
3114
|
FooterStandard,
|
|
3194
3115
|
FormStatusMessagesScreenReader,
|