optimized-react-component-library-xyz123 0.1.45 → 0.1.47

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 CHANGED
@@ -222,7 +222,7 @@ declare const RenderQuestion: ({ question, isTouched, activatedLanguage, showPre
222
222
  declare const RenderQuestionGroup: ({ questionArray, wrapper, legend, isTouched, activatedLanguage, showPreview, AddQuestionDisplayed, hideValidationMessage, }: any) => react_jsx_runtime.JSX.Element;
223
223
 
224
224
  interface EditPreviewLinkProps {
225
- step: number;
225
+ step: IStepObject;
226
226
  changeStepHandler: any;
227
227
  activatedLanguage?: string;
228
228
  }
package/dist/index.d.ts CHANGED
@@ -222,7 +222,7 @@ declare const RenderQuestion: ({ question, isTouched, activatedLanguage, showPre
222
222
  declare const RenderQuestionGroup: ({ questionArray, wrapper, legend, isTouched, activatedLanguage, showPreview, AddQuestionDisplayed, hideValidationMessage, }: any) => react_jsx_runtime.JSX.Element;
223
223
 
224
224
  interface EditPreviewLinkProps {
225
- step: number;
225
+ step: IStepObject;
226
226
  changeStepHandler: any;
227
227
  activatedLanguage?: string;
228
228
  }
package/dist/index.js CHANGED
@@ -119,10 +119,17 @@ var RadioMultipleStandard_default = InputRadio;
119
119
  var PreviewRadio = ({ question }) => {
120
120
  var _a, _b;
121
121
  const previewId = `preview-${question.id}`;
122
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "pts-question-preview pts-radioMultiple-preview", id: `question-${previewId}`, children: [
123
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h3", { id: previewId, children: (_a = question.previewLabel) != null ? _a : question.questionLabel }),
124
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "pts-root-answer", "aria-labelledby": previewId, children: ((_b = question.answer) == null ? void 0 : _b.trim()) ? question.answer : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "no-answer-preview-page", children: "Inget svar" }) })
125
- ] }) });
122
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
123
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("dt", { id: `question-${previewId}`, children: (_a = question.previewLabel) != null ? _a : question.questionLabel }),
124
+ ((_b = question.answer) == null ? void 0 : _b.trim()) ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("dd", { className: "pts-radioMultiple-preview pts-root-answer", id: `answer-${previewId}`, children: question.answer }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
125
+ "dd",
126
+ {
127
+ className: "pts-radioMultiple-preview pts-root-answer no-answer-preview-page",
128
+ id: `answer-${previewId}`,
129
+ children: "Inget svar"
130
+ }
131
+ )
132
+ ] });
126
133
  };
127
134
 
128
135
  // src/NewInputComponentStandard/MultipleCheckboxesStandard/MultipleCheckboxesStandard.tsx
@@ -159,7 +166,7 @@ var MultipleCheckboxes = ({
159
166
  };
160
167
  return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
161
168
  !showPreview && question.visible && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { id: questionId, className: "pts-root-question pts-multipleCheckboxes-container", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("section", { role: "group", "aria-labelledby": `label-${questionId}`, children: [
162
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("h4", { id: `label-${questionId}`, children: [
169
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("h3", { id: `label-${questionId}`, children: [
163
170
  question.questionLabel,
164
171
  " ",
165
172
  question.isQuestionMandatory && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { "aria-hidden": true, className: "pts-root-mandatoryAsterisk", children: "*" }),
@@ -194,20 +201,14 @@ var PrevieMultipleCheckboxes = ({
194
201
  }) => {
195
202
  var _a, _b;
196
203
  const previewId = `preview-${question.id}`;
197
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_jsx_runtime2.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
198
- "div",
199
- {
200
- className: "pts-question-preview pts-multipleCheckboxes-preview",
201
- id: `question-${previewId}`,
202
- children: [
203
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("h3", { id: previewId, children: (_a = question.previewLabel) != null ? _a : question.questionLabel }),
204
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "pts-root-answer", children: question.answer ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("ul", { "aria-labelledby": previewId, children: (_b = question.options) == null ? void 0 : _b.filter((option) => {
205
- var _a2;
206
- return (_a2 = question.answer) == null ? void 0 : _a2.includes(option.label);
207
- }).map((option, index) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("li", { children: option.label }, index)) }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "no-answer-preview-page", children: activatedLanguage === "en" ? "No Answer" : "Inget svar" }) })
208
- ]
209
- }
210
- ) });
204
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
205
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("dt", { id: `question-${previewId}`, children: (_a = question.previewLabel) != null ? _a : question.questionLabel }),
206
+ question.answer ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_jsx_runtime2.Fragment, { children: (_b = question.options) == null ? void 0 : _b.filter((option) => {
207
+ var _a2;
208
+ return (_a2 = question.answer) == null ? void 0 : _a2.includes(option.label);
209
+ }).map((option, index) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("dd", { children: option.label }, index)) }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("dd", { className: "no-answer-preview-page", children: activatedLanguage === "en" ? "No Answer" : "Inget svar" }),
210
+ " "
211
+ ] });
211
212
  };
212
213
 
213
214
  // src/NewInputComponentStandard/TextAreaStandard/TextAreaStandard.tsx
@@ -257,7 +258,7 @@ var InputTextarea = ({
257
258
  "aria-required": question.isQuestionMandatory,
258
259
  "aria-invalid": question.hasValidationError,
259
260
  maxLength: ((_a = question.questionExtraAttribute) == null ? void 0 : _a.answerMaxLength) || defaultMaxLength,
260
- "aria-describedby": `${question.aboutText ? aboutId : ""} ${question.hasValidationError ? errorId : ""}`.trim(),
261
+ "aria-describedby": [question.aboutText ? aboutId : null, question.hasValidationError ? errorId : null].filter(Boolean).join(" ") || void 0,
261
262
  id: inputId
262
263
  }
263
264
  ),
@@ -293,10 +294,17 @@ var PreviewTextarea = ({
293
294
  }) => {
294
295
  var _a, _b;
295
296
  const previewId = `preview-${question.id}`;
296
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_jsx_runtime3.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "pts-question-preview pts-textArea-preview", id: `question-${previewId}`, children: [
297
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("h3", { id: previewId, children: (_a = question.previewLabel) != null ? _a : question.questionLabel }),
298
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "pts-root-answer", "aria-labelledby": previewId, children: ((_b = question.answer) == null ? void 0 : _b.trim()) ? question.answer : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "no-answer-preview-page", children: activatedLanguage === "en" ? "No Answer" : "Inget svar" }) })
299
- ] }) });
297
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
298
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("dt", { id: `question-${previewId}`, children: (_a = question.previewLabel) != null ? _a : question.questionLabel }),
299
+ ((_b = question.answer) == null ? void 0 : _b.trim()) ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("dd", { className: "pts-textArea-preview pts-root-answer", id: `answer-${previewId}`, children: question.answer }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
300
+ "dd",
301
+ {
302
+ className: "pts-textArea-preview pts-root-answer no-answer-preview-page",
303
+ id: `answer-${previewId}`,
304
+ children: activatedLanguage === "en" ? "No Answer" : "Inget svar"
305
+ }
306
+ )
307
+ ] });
300
308
  };
301
309
 
302
310
  // src/NewInputComponentStandard/TextFieldStandard/TextFieldStandard.tsx
@@ -350,7 +358,7 @@ var TextFieldStandard = ({
350
358
  disabled: (_g = question.questionExtraAttribute) == null ? void 0 : _g.disabled,
351
359
  required: question.isQuestionMandatory,
352
360
  "aria-required": question.isQuestionMandatory,
353
- "aria-describedby": `${question.aboutText ? aboutId : ""} ${question.hasValidationError ? errorId : ""}`.trim(),
361
+ "aria-describedby": [question.aboutText ? aboutId : null, question.hasValidationError ? errorId : null].filter(Boolean).join(" ") || void 0,
354
362
  "aria-invalid": question.hasValidationError,
355
363
  "aria-errormessage": question.hasValidationError ? errorId : void 0
356
364
  }
@@ -372,10 +380,17 @@ var PreviewTextField = ({
372
380
  }) => {
373
381
  var _a, _b;
374
382
  const previewId = `preview-${question.id}`;
375
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_jsx_runtime4.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "pts-question-preview pts-textField-preview", id: `question-${previewId}`, children: [
376
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("h3", { id: previewId, children: (_a = question.previewLabel) != null ? _a : question.questionLabel }),
377
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "pts-root-answer", "aria-labelledby": previewId, children: ((_b = question.answer) == null ? void 0 : _b.trim()) ? question.answer : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "no-answer-preview-page", children: activatedLanguage === "en" ? "No Answer" : "Inget svar" }) })
378
- ] }) });
383
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
384
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("dt", { id: `question-${previewId}`, children: (_a = question.previewLabel) != null ? _a : question.questionLabel }),
385
+ ((_b = question.answer) == null ? void 0 : _b.trim()) ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("dd", { className: "pts-textField-preview pts-root-answer", id: `answer-${previewId}`, children: question.answer }) : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
386
+ "dd",
387
+ {
388
+ className: "pts-textField-preview pts-root-answer no-answer-preview-page",
389
+ id: `answer-${previewId}`,
390
+ children: activatedLanguage === "en" ? "No Answer" : "Inget svar"
391
+ }
392
+ )
393
+ ] });
379
394
  };
380
395
 
381
396
  // src/NewInputComponentStandard/FilesUploadStandard/FilesUploadStandard.tsx
@@ -1836,7 +1851,7 @@ var EditPreviewLink = ({
1836
1851
  changeStepHandler,
1837
1852
  activatedLanguage = "sv"
1838
1853
  }) => {
1839
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "pts-editPreviewLink-container", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("button", { type: "button", onClick: () => changeStepHandler(step), role: "link", children: [
1854
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "pts-editPreviewLink-container", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("a", { onClick: () => changeStepHandler(step), children: [
1840
1855
  /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1841
1856
  "svg",
1842
1857
  {
@@ -1858,7 +1873,7 @@ var EditPreviewLink = ({
1858
1873
  )
1859
1874
  }
1860
1875
  ),
1861
- activatedLanguage === "en" ? `Edit step ${step}` : `Redigera steg ${step}`
1876
+ activatedLanguage === "en" ? `Edit step ${step.step}` : `Redigera steg ${step.step}`
1862
1877
  ] }) });
1863
1878
  };
1864
1879
  var EditPreviewLinkStandard_default = EditPreviewLink;
@@ -1897,7 +1912,7 @@ var Footer = ({ activatedLanguage = "sv" }) => {
1897
1912
  }
1898
1913
  ),
1899
1914
  /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1900
- "div",
1915
+ "nav",
1901
1916
  {
1902
1917
  className: "pts-footer-linkList",
1903
1918
  "aria-label": activatedLanguage === "en" ? "Footer navigation" : "Sidfotsnavigering",
@@ -2459,40 +2474,77 @@ var import_react10 = require("react");
2459
2474
  var import_dompurify5 = __toESM(require("dompurify"));
2460
2475
  var import_jsx_runtime20 = require("react/jsx-runtime");
2461
2476
  var TextHeadlineAndBody = ({ data, headlineType = "h2" }) => {
2462
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("section", { className: "pts-textHeadlineAndBody-container", children: [
2463
- data.headline && (0, import_react10.createElement)(headlineType, {}, data.headline),
2464
- data.body && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { dangerouslySetInnerHTML: { __html: import_dompurify5.default.sanitize(data.body) } }),
2465
- data.linksForMoreInfo && data.linksForMoreInfo.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("ul", { className: "pts-moreinfo-list", children: data.linksForMoreInfo.map((link, index) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("li", { className: index > 0 ? "notFirstInList" : "", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
2466
- "a",
2467
- {
2468
- href: link.url,
2469
- target: "_blank",
2470
- rel: "noopener noreferrer",
2471
- "aria-label": link.ariaLabel,
2472
- children: [
2473
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "MoreInfoIcon", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2474
- "svg",
2475
- {
2476
- "aria-hidden": "true",
2477
- xmlns: "http://www.w3.org/2000/svg",
2478
- width: "12",
2479
- height: "10",
2480
- viewBox: "0 0 12 10",
2481
- fill: "none",
2482
- children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2483
- "path",
2477
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
2478
+ "section",
2479
+ {
2480
+ className: "pts-textHeadlineAndBody-container",
2481
+ "aria-labelledby": "textHeadlineAndBody-headline",
2482
+ children: [
2483
+ data.headline && (0, import_react10.createElement)(headlineType, { id: "textHeadlineAndBody-headline" }, data.headline),
2484
+ data.body && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { dangerouslySetInnerHTML: { __html: import_dompurify5.default.sanitize(data.body) } }),
2485
+ data.linksForMoreInfo && data.linksForMoreInfo.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("ul", { className: "pts-moreinfo-list", children: data.linksForMoreInfo.map((link, index) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("li", { className: index > 0 ? "notFirstInList" : "", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
2486
+ "a",
2487
+ {
2488
+ href: link.url,
2489
+ target: "_blank",
2490
+ rel: "noopener noreferrer",
2491
+ "aria-label": link.ariaLabel,
2492
+ children: [
2493
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "MoreInfoIcon", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2494
+ "svg",
2484
2495
  {
2485
- d: "M6.00001 9.63253L5.10321 8.82184L8.62749 5.57905H0.965332V4.42091H8.62749L5.10321 1.17813L6.00001 0.367432L11.0347 4.99998L6.00001 9.63253Z",
2486
- fill: "#ffffff"
2496
+ "aria-hidden": "true",
2497
+ xmlns: "http://www.w3.org/2000/svg",
2498
+ width: "12",
2499
+ height: "10",
2500
+ viewBox: "0 0 12 10",
2501
+ fill: "none",
2502
+ children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2503
+ "path",
2504
+ {
2505
+ d: "M6.00001 9.63253L5.10321 8.82184L8.62749 5.57905H0.965332V4.42091H8.62749L5.10321 1.17813L6.00001 0.367432L11.0347 4.99998L6.00001 9.63253Z",
2506
+ fill: "#ffffff"
2507
+ }
2508
+ )
2487
2509
  }
2488
- )
2489
- }
2490
- ) }),
2491
- link.title
2492
- ]
2493
- }
2494
- ) }, `more-info-${index}`)) })
2495
- ] });
2510
+ ) }),
2511
+ link.title
2512
+ ]
2513
+ }
2514
+ ) }, `more-info-${index}`)) }),
2515
+ data.linksForMoreInfo && data.linksForMoreInfo.length === 1 && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
2516
+ "a",
2517
+ {
2518
+ href: data.linksForMoreInfo[0].url,
2519
+ target: "_blank",
2520
+ rel: "noopener noreferrer",
2521
+ "aria-label": data.linksForMoreInfo[0].ariaLabel,
2522
+ children: [
2523
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "MoreInfoIcon", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2524
+ "svg",
2525
+ {
2526
+ "aria-hidden": "true",
2527
+ xmlns: "http://www.w3.org/2000/svg",
2528
+ width: "12",
2529
+ height: "10",
2530
+ viewBox: "0 0 12 10",
2531
+ fill: "none",
2532
+ children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2533
+ "path",
2534
+ {
2535
+ d: "M6.00001 9.63253L5.10321 8.82184L8.62749 5.57905H0.965332V4.42091H8.62749L5.10321 1.17813L6.00001 0.367432L11.0347 4.99998L6.00001 9.63253Z",
2536
+ fill: "#ffffff"
2537
+ }
2538
+ )
2539
+ }
2540
+ ) }),
2541
+ data.linksForMoreInfo[0].title
2542
+ ]
2543
+ }
2544
+ )
2545
+ ]
2546
+ }
2547
+ );
2496
2548
  };
2497
2549
  var TextHeadlineAndBodyStandard_default = TextHeadlineAndBody;
2498
2550
 
@@ -2557,7 +2609,7 @@ var ServiceHeadlineAndBody = ({ data, activeStep = 1 }) => {
2557
2609
  return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "pts-serviceHeadlineAndBody-container", children: [
2558
2610
  data.mainHeadline && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("h1", { id: "pts-main-service-headline", children: data.mainHeadline }),
2559
2611
  activeStep === 1 && data.ingressBody && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { dangerouslySetInnerHTML: { __html: import_dompurify6.default.sanitize(data.ingressBody) } }),
2560
- activeStep === 1 && data.linksForMoreInfo && data.linksForMoreInfo.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("ul", { className: "pts-moreinfo-list", children: data.linksForMoreInfo.map((moreInfo, index) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("li", { className: index > 0 ? "notFirstInList" : "", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("a", { href: moreInfo.url, target: "_blank", rel: "noopener noreferrer", children: [
2612
+ activeStep === 1 && data.linksForMoreInfo && data.linksForMoreInfo.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("ul", { className: "pts-moreinfo-list", children: data.linksForMoreInfo.map((moreInfo, index) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("li", { className: index > 0 ? "notFirstInList" : "", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("a", { href: moreInfo.url, target: "_blank", rel: "noopener noreferrer", children: [
2561
2613
  /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2562
2614
  "svg",
2563
2615
  {
@@ -2577,7 +2629,28 @@ var ServiceHeadlineAndBody = ({ data, activeStep = 1 }) => {
2577
2629
  }
2578
2630
  ),
2579
2631
  /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "pts-moreinfo-link-text", children: moreInfo.title })
2580
- ] }) }, moreInfo.title + index)) })
2632
+ ] }) }, moreInfo.title + index)) }),
2633
+ activeStep === 1 && data.linksForMoreInfo && data.linksForMoreInfo.length === 1 && /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("a", { href: data.linksForMoreInfo[0].url, target: "_blank", rel: "noopener noreferrer", children: [
2634
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2635
+ "svg",
2636
+ {
2637
+ xmlns: "http://www.w3.org/2000/svg",
2638
+ width: "12",
2639
+ height: "10",
2640
+ viewBox: "0 0 12 10",
2641
+ fill: "none",
2642
+ "aria-hidden": "true",
2643
+ children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2644
+ "path",
2645
+ {
2646
+ d: "M6.00001 9.63253L5.10321 8.82184L8.62749 5.57905H0.965332V4.42091H8.62749L5.10321 1.17813L6.00001 0.367432L11.0347 4.99998L6.00001 9.63253Z",
2647
+ fill: "#ffffff"
2648
+ }
2649
+ )
2650
+ }
2651
+ ),
2652
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "pts-moreinfo-link-text", children: data.linksForMoreInfo[0].title })
2653
+ ] })
2581
2654
  ] });
2582
2655
  };
2583
2656
  var ServiceHeadlineAndBodyStandard_default = ServiceHeadlineAndBody;
@@ -2679,6 +2752,24 @@ var ValidationErrorSummaryList = ({
2679
2752
  }) => {
2680
2753
  console.log(formQuestions);
2681
2754
  console.log(validationErrorsList);
2755
+ function filterIdsByGroupCheck(ids, questions) {
2756
+ var _a;
2757
+ const tailIds = /* @__PURE__ */ new Set();
2758
+ for (const q of questions) {
2759
+ const rules = (_a = q.validationType) != null ? _a : [];
2760
+ for (const rule of rules) {
2761
+ const m = /^groupCheck-(\d+(?:-\d+)*)$/.exec(rule.trim());
2762
+ if (!m) continue;
2763
+ const nums = m[1].split("-").map((s) => Number(s)).filter((n) => Number.isFinite(n));
2764
+ if (nums.length > 1) {
2765
+ for (let i = 1; i < nums.length; i++) {
2766
+ tailIds.add(nums[i]);
2767
+ }
2768
+ }
2769
+ }
2770
+ }
2771
+ return ids.filter((id) => !tailIds.has(id));
2772
+ }
2682
2773
  function scrollToQuestion(questionId) {
2683
2774
  const container = document.getElementById(`question-${questionId}`);
2684
2775
  if (container) {
@@ -2692,35 +2783,31 @@ var ValidationErrorSummaryList = ({
2692
2783
  }
2693
2784
  }
2694
2785
  if (!validationErrorsList.length) return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_jsx_runtime26.Fragment, {});
2695
- const count = validationErrorsList.length;
2786
+ const filteredIds = filterIdsByGroupCheck(validationErrorsList, formQuestions);
2787
+ const count = filteredIds.length;
2696
2788
  const title = summaryText.replace("{count}", count.toString()).replace("{plural}", count === 1 ? "sak" : "saker");
2697
2789
  function getQuestionLabelById(id) {
2698
2790
  const found = formQuestions.find((item) => item.id === id);
2699
2791
  return found == null ? void 0 : found.questionLabel;
2700
2792
  }
2701
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
2702
- "div",
2703
- {
2704
- id: "pts-form-id-error-summary",
2705
- className: "pts-errorSummary-container pts-root-error",
2706
- tabIndex: -1,
2707
- children: [
2708
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { "aria-hidden": "true", className: "errorDot", children: "!" }),
2709
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "errorSummary-content", children: [
2710
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("h2", { children: title }),
2711
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("ul", { children: validationErrorsList.map((questionId, i) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2712
- "a",
2713
- {
2714
- href: "#",
2715
- onClick: (e) => scrollToQuestion(questionId),
2716
- className: "errorSummary-text",
2717
- children: getQuestionLabelById(questionId)
2718
- }
2719
- ) }, questionId || i)) })
2720
- ] })
2721
- ]
2722
- }
2723
- );
2793
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "pts-errorSummary-container pts-root-error", children: [
2794
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { "aria-hidden": "true", className: "errorDot", children: "!" }),
2795
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "errorSummary-content", id: "pts-errorSummary-content", children: [
2796
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("h2", { children: title }),
2797
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("ul", { children: filteredIds.map((questionId, i) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2798
+ "a",
2799
+ {
2800
+ href: `#question-${questionId}`,
2801
+ onClick: (e) => {
2802
+ e.preventDefault();
2803
+ scrollToQuestion(questionId);
2804
+ },
2805
+ className: "errorSummary-text",
2806
+ children: getQuestionLabelById(questionId)
2807
+ }
2808
+ ) }, questionId || i)) })
2809
+ ] })
2810
+ ] });
2724
2811
  };
2725
2812
  var ValidationErrorSummaryList_default = ValidationErrorSummaryList;
2726
2813
 
@@ -2760,7 +2847,7 @@ var CookieBanner = ({
2760
2847
  children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "content", children: [
2761
2848
  /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("h3", { id: "cookie-banner-title", children: "Kakor (cookies)" }),
2762
2849
  /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { id: "cookie-banner-description", children: "PTS skulle vilja anv\xE4nda en statistikkaka i syfte att l\xF6pande f\xF6rb\xE4ttra webbplatsen. Samtycker du till det? Du kan n\xE4r som helst \xE4ndra ditt val. F\xF6r att \xE5terkalla ditt samtycke klickar du p\xE5 \u201DKakor\u201D i avsnittet l\xE4ngst ned p\xE5 webbplatsen." }),
2763
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { id: "cookie-banner-description", className: "pts-cookieBanner-Links", children: [
2850
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "pts-cookieBanner-Links", children: [
2764
2851
  /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
2765
2852
  "svg",
2766
2853
  {