optimized-react-component-library-xyz123 0.1.65 → 0.1.66
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.css +330 -0
- package/dist/index.js +170 -78
- package/dist/index.mjs +237 -145
- package/package.json +1 -1
- package/src/css/styles.css +75 -3
package/dist/index.mjs
CHANGED
|
@@ -135,10 +135,10 @@ var PrevieMultipleCheckboxes = ({
|
|
|
135
135
|
const previewId = `preview-${question.id}`;
|
|
136
136
|
return /* @__PURE__ */ jsxs2(Fragment2, { children: [
|
|
137
137
|
/* @__PURE__ */ jsx2("dt", { id: `question-${previewId}`, children: (_a = question.previewLabel) != null ? _a : question.questionLabel }),
|
|
138
|
-
question.answer ? /* @__PURE__ */ jsx2(Fragment2, { children: (_b = question.options) == null ? void 0 : _b.filter((option) => {
|
|
138
|
+
question.answer ? /* @__PURE__ */ jsx2(Fragment2, { children: question.options && question.options.length === 1 ? /* @__PURE__ */ jsx2("dd", { children: question.options[0].label }) : /* @__PURE__ */ jsx2("ul", { className: "preview-answer-list", children: (_b = question.options) == null ? void 0 : _b.filter((option) => {
|
|
139
139
|
var _a2;
|
|
140
140
|
return (_a2 = question.answer) == null ? void 0 : _a2.includes(option.label);
|
|
141
|
-
}).map((option, index) => /* @__PURE__ */ jsx2("
|
|
141
|
+
}).map((option, index) => /* @__PURE__ */ jsx2("li", { children: option.label }, index)) }) }) : /* @__PURE__ */ jsx2("dd", { className: "no-answer-preview-page", children: activatedLanguage === "en" ? "No Answer" : "Inget svar" }),
|
|
142
142
|
" "
|
|
143
143
|
] });
|
|
144
144
|
};
|
|
@@ -756,15 +756,19 @@ var DropFiles = ({ FilesSelected, DropFilesText = "Dra och sl\xE4pp dina filer h
|
|
|
756
756
|
var DropFilesStandard_default = DropFiles;
|
|
757
757
|
|
|
758
758
|
// src/NewInputComponentStandard/AddFilesStandard/ExploreFilesStandard.tsx
|
|
759
|
-
import { useRef as useRef2 } from "react";
|
|
759
|
+
import React3, { useEffect as useEffect3, useRef as useRef2 } from "react";
|
|
760
760
|
import clsx2 from "clsx";
|
|
761
761
|
|
|
762
762
|
// src/NewInputComponentStandard/AddFilesStandard/ScreenReaderErrors.tsx
|
|
763
763
|
import React2 from "react";
|
|
764
|
-
import { Fragment as Fragment7, jsx as jsx7 } from "react/jsx-runtime";
|
|
764
|
+
import { Fragment as Fragment7, jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
765
765
|
var ScreenReaderErrors = ({
|
|
766
766
|
errorMessageAddingFile,
|
|
767
|
-
activatedLanguage
|
|
767
|
+
activatedLanguage,
|
|
768
|
+
removeUploadErrors,
|
|
769
|
+
putFocusOnButton = () => {
|
|
770
|
+
alert("no function");
|
|
771
|
+
}
|
|
768
772
|
}) => {
|
|
769
773
|
const [activateErrorMessagesForScreenReader, setActivateErrorMessagesForScreenReader] = React2.useState(false);
|
|
770
774
|
const [errorMessagesForScreenReader, setErrorMessagesForScreenReader] = React2.useState("");
|
|
@@ -780,14 +784,57 @@ var ScreenReaderErrors = ({
|
|
|
780
784
|
setActivateErrorMessagesForScreenReader(true);
|
|
781
785
|
}
|
|
782
786
|
}, [errorMessageAddingFile]);
|
|
783
|
-
|
|
787
|
+
const handleRemoveErrors = () => {
|
|
788
|
+
const errorMessages = activatedLanguage === "sv" ? `Felmeddelande raderat.` : `Error message deleted.`;
|
|
789
|
+
setErrorMessagesForScreenReader(errorMessages);
|
|
790
|
+
removeUploadErrors();
|
|
791
|
+
putFocusOnButton();
|
|
792
|
+
setTimeout(() => {
|
|
793
|
+
setActivateErrorMessagesForScreenReader(false);
|
|
794
|
+
}, 1e3);
|
|
795
|
+
};
|
|
796
|
+
return /* @__PURE__ */ jsxs7(Fragment7, { children: [
|
|
797
|
+
errorMessageAddingFile.length > 0 && /* @__PURE__ */ jsx7(
|
|
798
|
+
"button",
|
|
799
|
+
{
|
|
800
|
+
onClick: handleRemoveErrors,
|
|
801
|
+
style: {
|
|
802
|
+
marginRight: "8px",
|
|
803
|
+
backgroundColor: "transparent",
|
|
804
|
+
border: "none",
|
|
805
|
+
textDecoration: "underline",
|
|
806
|
+
cursor: "pointer"
|
|
807
|
+
},
|
|
808
|
+
className: "errorMessageAddingFile",
|
|
809
|
+
"aria-label": activatedLanguage === "sv" ? "Ta bort felmeddelande f\xF6r uppladdning av filer" : "Remove error message for file uploads",
|
|
810
|
+
children: "Ta bort fel! / Remove errors!"
|
|
811
|
+
}
|
|
812
|
+
),
|
|
813
|
+
activateErrorMessagesForScreenReader && /* @__PURE__ */ jsx7(
|
|
814
|
+
"p",
|
|
815
|
+
{
|
|
816
|
+
role: "alert",
|
|
817
|
+
style: {
|
|
818
|
+
position: "absolute",
|
|
819
|
+
left: "-9999px",
|
|
820
|
+
top: "auto",
|
|
821
|
+
width: "1px",
|
|
822
|
+
height: "1px",
|
|
823
|
+
overflow: "hidden"
|
|
824
|
+
},
|
|
825
|
+
"aria-atomic": "true",
|
|
826
|
+
children: errorMessagesForScreenReader
|
|
827
|
+
}
|
|
828
|
+
)
|
|
829
|
+
] });
|
|
784
830
|
};
|
|
785
831
|
var ScreenReaderErrors_default = ScreenReaderErrors;
|
|
786
832
|
|
|
787
833
|
// src/NewInputComponentStandard/AddFilesStandard/ExploreFilesStandard.tsx
|
|
788
|
-
import { Fragment as Fragment8, jsx as jsx8, jsxs as
|
|
834
|
+
import { Fragment as Fragment8, jsx as jsx8, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
789
835
|
var ExploreFiles = ({
|
|
790
836
|
FilesSelected,
|
|
837
|
+
//UploadButtonText = 'upload files',
|
|
791
838
|
numberOfFiles,
|
|
792
839
|
allowedNumberOfFiles,
|
|
793
840
|
activatedLanguage,
|
|
@@ -797,10 +844,28 @@ var ExploreFiles = ({
|
|
|
797
844
|
errorId,
|
|
798
845
|
questionObject,
|
|
799
846
|
showErrors,
|
|
800
|
-
errorMessageAddingFile
|
|
847
|
+
errorMessageAddingFile,
|
|
848
|
+
removeUploadErrors = () => {
|
|
849
|
+
alert("finns ingen funktion");
|
|
850
|
+
}
|
|
801
851
|
}) => {
|
|
802
852
|
const fileInputRef = useRef2(null);
|
|
803
853
|
const buttonInputRef = useRef2(null);
|
|
854
|
+
const [showErrorMessagesForScreenReader, setShowErrorMessagesForScreenReader] = React3.useState(false);
|
|
855
|
+
const [errorMessagesForScreenReader, setErrorMessagesForScreenReader] = React3.useState("");
|
|
856
|
+
useEffect3(() => {
|
|
857
|
+
const button = buttonInputRef.current;
|
|
858
|
+
if (!button) return;
|
|
859
|
+
const handleFocus = () => {
|
|
860
|
+
setShowErrorMessagesForScreenReader(!showErrorMessagesForScreenReader);
|
|
861
|
+
console.log("FOCUS!!");
|
|
862
|
+
console.log("Error messages for screen reader: " + errorMessageAddingFile);
|
|
863
|
+
};
|
|
864
|
+
button.addEventListener("focus", handleFocus);
|
|
865
|
+
return () => {
|
|
866
|
+
button.removeEventListener("focus", handleFocus);
|
|
867
|
+
};
|
|
868
|
+
}, []);
|
|
804
869
|
const handleFiles = (event) => {
|
|
805
870
|
const files = Array.from(event.target.files || []);
|
|
806
871
|
FilesSelected(files);
|
|
@@ -810,17 +875,32 @@ var ExploreFiles = ({
|
|
|
810
875
|
var _a;
|
|
811
876
|
(_a = fileInputRef.current) == null ? void 0 : _a.click();
|
|
812
877
|
};
|
|
878
|
+
const handleRemoveErrors = () => {
|
|
879
|
+
const errorMessages = activatedLanguage === "sv" ? `Felmeddelande raderat.` : `Error message deleted.`;
|
|
880
|
+
setErrorMessagesForScreenReader(errorMessages);
|
|
881
|
+
removeUploadErrors();
|
|
882
|
+
putFocusOnButton();
|
|
883
|
+
setTimeout(() => {
|
|
884
|
+
setShowErrorMessagesForScreenReader(false);
|
|
885
|
+
}, 1e3);
|
|
886
|
+
};
|
|
887
|
+
const putFocusOnButton = () => {
|
|
888
|
+
var _a;
|
|
889
|
+
(_a = buttonInputRef.current) == null ? void 0 : _a.focus();
|
|
890
|
+
};
|
|
813
891
|
let addFilesInfoText = numberOfFiles > 0 ? activatedLanguage === "sv" ? `${numberOfFiles} filer valda (max ${allowedNumberOfFiles})` : `${numberOfFiles} files chosed (max ${allowedNumberOfFiles})` : activatedLanguage === "sv" ? "Ingen fil vald" : "No file chosen";
|
|
814
|
-
return /* @__PURE__ */ jsx8(Fragment8, { children: /* @__PURE__ */
|
|
815
|
-
/* @__PURE__ */
|
|
816
|
-
"
|
|
892
|
+
return /* @__PURE__ */ jsx8(Fragment8, { children: /* @__PURE__ */ jsxs8("div", { className: "inputContainer", children: [
|
|
893
|
+
/* @__PURE__ */ jsxs8(
|
|
894
|
+
"label",
|
|
817
895
|
{
|
|
896
|
+
tabIndex: -1,
|
|
818
897
|
className: clsx2(
|
|
819
898
|
["form-control"],
|
|
820
899
|
"filePickLabel",
|
|
821
900
|
showErrors && questionObject.error ? ["form-control error"] : ""
|
|
822
901
|
),
|
|
823
902
|
id: labelId,
|
|
903
|
+
htmlFor: inputId,
|
|
824
904
|
children: [
|
|
825
905
|
/* @__PURE__ */ jsx8(
|
|
826
906
|
"button",
|
|
@@ -831,32 +911,34 @@ var ExploreFiles = ({
|
|
|
831
911
|
"filePickButton",
|
|
832
912
|
showErrors && questionObject.error ? "filePickButton error" : ""
|
|
833
913
|
),
|
|
834
|
-
"aria-describedby": `${aboutId} ${questionObject.
|
|
835
|
-
"aria-label": `${activatedLanguage === "sv" ? "
|
|
914
|
+
"aria-describedby": `${aboutId} ${showErrors && questionObject.error ? errorId : ""}`.trim(),
|
|
915
|
+
"aria-label": `${activatedLanguage === "sv" ? "V\xE4lj fil" : "Choose file"} ${addFilesInfoText}`,
|
|
836
916
|
children: activatedLanguage === "sv" ? "V\xE4lj fil" : "Choose file"
|
|
837
917
|
}
|
|
838
918
|
),
|
|
839
|
-
/* @__PURE__ */ jsx8(
|
|
919
|
+
/* @__PURE__ */ jsx8(
|
|
920
|
+
"input",
|
|
921
|
+
{
|
|
922
|
+
ref: fileInputRef,
|
|
923
|
+
type: "file",
|
|
924
|
+
className: "invisible",
|
|
925
|
+
multiple: true,
|
|
926
|
+
onChange: handleFiles,
|
|
927
|
+
tabIndex: -1,
|
|
928
|
+
id: inputId
|
|
929
|
+
}
|
|
930
|
+
),
|
|
931
|
+
/* @__PURE__ */ jsx8("span", { className: "filePickText", children: addFilesInfoText })
|
|
840
932
|
]
|
|
841
933
|
}
|
|
842
934
|
),
|
|
843
|
-
/* @__PURE__ */ jsx8(
|
|
844
|
-
"input",
|
|
845
|
-
{
|
|
846
|
-
ref: fileInputRef,
|
|
847
|
-
type: "file",
|
|
848
|
-
className: "invisible",
|
|
849
|
-
multiple: true,
|
|
850
|
-
onChange: handleFiles,
|
|
851
|
-
tabIndex: -1,
|
|
852
|
-
id: inputId
|
|
853
|
-
}
|
|
854
|
-
),
|
|
855
935
|
/* @__PURE__ */ jsx8(
|
|
856
936
|
ScreenReaderErrors_default,
|
|
857
937
|
{
|
|
858
938
|
errorMessageAddingFile,
|
|
859
|
-
|
|
939
|
+
removeUploadErrors,
|
|
940
|
+
activatedLanguage,
|
|
941
|
+
putFocusOnButton
|
|
860
942
|
}
|
|
861
943
|
)
|
|
862
944
|
] }) });
|
|
@@ -880,7 +962,7 @@ var IndicatorStandard_default = Indicator;
|
|
|
880
962
|
|
|
881
963
|
// src/NewInputComponentStandard/AddFilesStandard/SelectedFilesStandard.tsx
|
|
882
964
|
import clsx4 from "clsx";
|
|
883
|
-
import { Fragment as Fragment10, jsx as jsx10, jsxs as
|
|
965
|
+
import { Fragment as Fragment10, jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
884
966
|
var SelectedFiles = ({
|
|
885
967
|
questionObject,
|
|
886
968
|
isTouched,
|
|
@@ -890,12 +972,11 @@ var SelectedFiles = ({
|
|
|
890
972
|
errorMessageAddingFile,
|
|
891
973
|
activatedLanguage,
|
|
892
974
|
numberOfFiles,
|
|
893
|
-
setNumberOfFiles
|
|
894
|
-
removeUploadErrors
|
|
975
|
+
setNumberOfFiles
|
|
895
976
|
}) => {
|
|
896
977
|
const theDiv = useRef3(null);
|
|
897
978
|
const remove = (file) => {
|
|
898
|
-
let newFiles = questionObject.
|
|
979
|
+
let newFiles = questionObject.Files.filter((f) => f !== file);
|
|
899
980
|
const newCountOfFiles = newFiles.length;
|
|
900
981
|
setNumberOfFiles(newCountOfFiles);
|
|
901
982
|
const e = { target: { value: `${newCountOfFiles} files`, files: newFiles } };
|
|
@@ -920,62 +1001,66 @@ var SelectedFiles = ({
|
|
|
920
1001
|
return windowWidth2;
|
|
921
1002
|
};
|
|
922
1003
|
const windowWidth = useWindowWidth();
|
|
923
|
-
return /* @__PURE__ */
|
|
924
|
-
/* @__PURE__ */
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
/* @__PURE__ */
|
|
935
|
-
|
|
936
|
-
"span",
|
|
937
|
-
{
|
|
938
|
-
"aria-hidden": "true",
|
|
939
|
-
className: clsx4("uploadedDot", "uploadFailed"),
|
|
940
|
-
children: "!"
|
|
941
|
-
}
|
|
942
|
-
) }),
|
|
943
|
-
/* @__PURE__ */ jsx10(Col, { children: windowWidth < 768 ? /* @__PURE__ */ jsx10("span", { className: "mobileFirstFileName", children: mobileFirstFileName }) : /* @__PURE__ */ jsx10("span", { className: "desktopFileName", children: errorObj.FileName }) }),
|
|
944
|
-
/* @__PURE__ */ jsx10(Col, { className: "lastCol" })
|
|
945
|
-
] }),
|
|
946
|
-
/* @__PURE__ */ jsx10(Row, { children: /* @__PURE__ */ jsx10(
|
|
947
|
-
Col,
|
|
1004
|
+
return /* @__PURE__ */ jsxs9(Fragment10, { children: [
|
|
1005
|
+
/* @__PURE__ */ jsx10("div", { children: errorMessageAddingFile.length > 0 && /* @__PURE__ */ jsxs9("ul", { className: "fileListUnorderedList", "aria-label": "Valideringsfelmeddelanden f\xF6r uppladdade filer", children: [
|
|
1006
|
+
" ",
|
|
1007
|
+
errorMessageAddingFile.map((errorObj, index) => {
|
|
1008
|
+
const errorFileName = errorObj.FileName;
|
|
1009
|
+
let mobileFirstFileName = errorObj.FileName.split(".").shift();
|
|
1010
|
+
mobileFirstFileName = mobileFirstFileName.length > 8 ? mobileFirstFileName.substring(0, 8) + ".." : mobileFirstFileName;
|
|
1011
|
+
const fileType = errorObj.FileName.split(".").pop();
|
|
1012
|
+
mobileFirstFileName = mobileFirstFileName + "." + fileType;
|
|
1013
|
+
return /* @__PURE__ */ jsx10("li", { children: /* @__PURE__ */ jsx10(React5.Fragment, { children: /* @__PURE__ */ jsx10("div", { children: /* @__PURE__ */ jsx10("div", { className: "fileInListContainer", role: "alert", children: /* @__PURE__ */ jsxs9("div", { className: "fileInList", children: [
|
|
1014
|
+
/* @__PURE__ */ jsxs9(Row, { children: [
|
|
1015
|
+
/* @__PURE__ */ jsx10(Col, { style: { maxWidth: "30px" }, children: /* @__PURE__ */ jsx10(
|
|
1016
|
+
"span",
|
|
948
1017
|
{
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
},
|
|
953
|
-
className: "errorMessageAddingFile",
|
|
954
|
-
...activatedLanguage === "sv" ? {
|
|
955
|
-
"aria-label": `${errorFileName} ${errorObj.svMessage}`
|
|
956
|
-
} : {
|
|
957
|
-
"aria-label": `${errorFileName} ${errorObj.enMessage}`
|
|
958
|
-
},
|
|
959
|
-
children: activatedLanguage === "sv" ? errorObj.svMessage : errorObj.enMessage
|
|
1018
|
+
"aria-hidden": "true",
|
|
1019
|
+
className: clsx4("uploadedDot", "uploadFailed"),
|
|
1020
|
+
children: "!"
|
|
960
1021
|
}
|
|
961
1022
|
) }),
|
|
962
|
-
/* @__PURE__ */ jsx10(
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
1023
|
+
/* @__PURE__ */ jsx10(Col, { children: windowWidth < 768 ? /* @__PURE__ */ jsx10("span", { className: "mobileFirstFileName", children: mobileFirstFileName }) : /* @__PURE__ */ jsx10("span", { className: "desktopFileName", children: errorObj.FileName }) }),
|
|
1024
|
+
/* @__PURE__ */ jsx10(Col, { className: "lastCol", children: /* @__PURE__ */ jsx10(
|
|
1025
|
+
"button",
|
|
1026
|
+
{
|
|
1027
|
+
className: "selectedFilesLinkButton",
|
|
1028
|
+
onClick: () => {
|
|
1029
|
+
removeError(index);
|
|
1030
|
+
},
|
|
1031
|
+
"aria-label": activatedLanguage === "sv" ? `St\xE4ng felmeddelandet f\xF6r ${errorFileName}` : `Close error message for ${errorFileName}`,
|
|
1032
|
+
children: activatedLanguage === "sv" ? "St\xE4ng" : "Close"
|
|
1033
|
+
}
|
|
1034
|
+
) })
|
|
1035
|
+
] }),
|
|
1036
|
+
/* @__PURE__ */ jsx10(Row, { children: /* @__PURE__ */ jsx10(
|
|
1037
|
+
Col,
|
|
1038
|
+
{
|
|
1039
|
+
style: {
|
|
1040
|
+
width: "100%",
|
|
1041
|
+
color: "#8e0039"
|
|
1042
|
+
},
|
|
1043
|
+
className: "errorMessageAddingFile",
|
|
1044
|
+
...activatedLanguage === "sv" ? {
|
|
1045
|
+
"aria-label": `${errorFileName} ${errorObj.svMessage}`
|
|
1046
|
+
} : {
|
|
1047
|
+
"aria-label": `${errorFileName} ${errorObj.enMessage}`
|
|
1048
|
+
},
|
|
1049
|
+
children: activatedLanguage === "sv" ? errorObj.svMessage : errorObj.enMessage
|
|
1050
|
+
}
|
|
1051
|
+
) }),
|
|
1052
|
+
/* @__PURE__ */ jsx10(Row, { style: { marginTop: "12px", marginBottom: "12px" }, children: /* @__PURE__ */ jsx10(Col, { className: "makeSpace" }) })
|
|
1053
|
+
] }, index) }) }) }, `error-${errorObj.FileName}-${index}`) });
|
|
1054
|
+
})
|
|
1055
|
+
] }) }),
|
|
1056
|
+
questionObject.Files.length > 0 && /* @__PURE__ */ jsx10("ul", { className: "fileListUnorderedList", "aria-label": "Uppladdade filer", children: questionObject.Files.map((file, index) => {
|
|
972
1057
|
const indicatorfileName = file.FileName;
|
|
973
1058
|
let mobileFirstFileName = file.FileName.split(".").shift();
|
|
974
1059
|
mobileFirstFileName = mobileFirstFileName.length > 8 ? mobileFirstFileName.substring(0, 8) + ".." : mobileFirstFileName;
|
|
975
1060
|
const fileType = file.FileName.split(".").pop();
|
|
976
1061
|
mobileFirstFileName = mobileFirstFileName + "." + fileType;
|
|
977
|
-
return /* @__PURE__ */ jsx10("li", { children: /* @__PURE__ */ jsx10(React5.Fragment, { children: /* @__PURE__ */ jsx10("div", { children: /* @__PURE__ */ jsx10("div", { className: "fileInListContainer", children: /* @__PURE__ */
|
|
978
|
-
/* @__PURE__ */
|
|
1062
|
+
return /* @__PURE__ */ jsx10("li", { children: /* @__PURE__ */ jsx10(React5.Fragment, { children: /* @__PURE__ */ jsx10("div", { children: /* @__PURE__ */ jsx10("div", { className: "fileInListContainer", children: /* @__PURE__ */ jsxs9("div", { className: "fileInList", children: [
|
|
1063
|
+
/* @__PURE__ */ jsxs9(Row, { children: [
|
|
979
1064
|
/* @__PURE__ */ jsx10(Col, { style: { maxWidth: "30px" }, children: /* @__PURE__ */ jsx10("span", { "aria-hidden": "true", className: "uploadedDot", children: /* @__PURE__ */ jsx10(
|
|
980
1065
|
"svg",
|
|
981
1066
|
{
|
|
@@ -995,16 +1080,17 @@ var SelectedFiles = ({
|
|
|
995
1080
|
)
|
|
996
1081
|
}
|
|
997
1082
|
) }) }),
|
|
998
|
-
/* @__PURE__ */ jsx10(Col, { children: windowWidth < 768 ? /* @__PURE__ */
|
|
1083
|
+
/* @__PURE__ */ jsx10(Col, { children: windowWidth < 768 ? /* @__PURE__ */ jsxs9("span", { className: "mobileFirstFileName", children: [
|
|
999
1084
|
mobileFirstFileName,
|
|
1000
1085
|
" (",
|
|
1001
1086
|
Math.ceil(file.FileSize / (1024 * 1024)),
|
|
1002
|
-
" "
|
|
1003
|
-
|
|
1004
|
-
] }) : /* @__PURE__ */ jsxs8("span", { className: "desktopFileName", children: [
|
|
1087
|
+
" MB)"
|
|
1088
|
+
] }) : /* @__PURE__ */ jsxs9("span", { className: "desktopFileName", children: [
|
|
1005
1089
|
file.FileName,
|
|
1006
1090
|
" (",
|
|
1007
|
-
file.FileSize < 1024 * 1024 ? `${Math.round(file.FileSize / 1024)} kB` : `${(file.FileSize / (1024 * 1024)).toFixed(
|
|
1091
|
+
file.FileSize < 1024 * 1024 ? `${Math.round(file.FileSize / 1024)} kB` : `${(file.FileSize / (1024 * 1024)).toFixed(
|
|
1092
|
+
1
|
|
1093
|
+
)} MB`,
|
|
1008
1094
|
")"
|
|
1009
1095
|
] }) }),
|
|
1010
1096
|
/* @__PURE__ */ jsx10(Col, { className: "lastCol", children: /* @__PURE__ */ jsx10(
|
|
@@ -1027,7 +1113,7 @@ var SelectedFiles = ({
|
|
|
1027
1113
|
var SelectedFilesStandard_default = SelectedFiles;
|
|
1028
1114
|
|
|
1029
1115
|
// src/NewInputComponentStandard/AddFilesStandard/AddFilesStandard.tsx
|
|
1030
|
-
import { Fragment as Fragment11, jsx as jsx11, jsxs as
|
|
1116
|
+
import { Fragment as Fragment11, jsx as jsx11, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1031
1117
|
var AddFiles = ({
|
|
1032
1118
|
questionObject,
|
|
1033
1119
|
isTouched = (e, questionObject2) => {
|
|
@@ -1196,9 +1282,10 @@ var AddFiles = ({
|
|
|
1196
1282
|
const handleRemoveErrors = () => {
|
|
1197
1283
|
setErrorMessageAddingFile([]);
|
|
1198
1284
|
};
|
|
1199
|
-
return /* @__PURE__ */
|
|
1200
|
-
!showPreview && visible && /* @__PURE__ */ jsx11("div", { children: /* @__PURE__ */
|
|
1201
|
-
questionObject.
|
|
1285
|
+
return /* @__PURE__ */ jsxs10(Fragment11, { children: [
|
|
1286
|
+
!showPreview && visible && /* @__PURE__ */ jsx11("div", { children: /* @__PURE__ */ jsxs10("div", { role: "group", children: [
|
|
1287
|
+
!questionObject.hideQuestion && questionObject.questionLabel,
|
|
1288
|
+
questionObject.aboutText && /* @__PURE__ */ jsxs10(
|
|
1202
1289
|
"p",
|
|
1203
1290
|
{
|
|
1204
1291
|
id: aboutId,
|
|
@@ -1208,17 +1295,23 @@ var AddFiles = ({
|
|
|
1208
1295
|
),
|
|
1209
1296
|
children: [
|
|
1210
1297
|
questionObject.aboutText,
|
|
1211
|
-
questionObject.isQuestionMandatory && /* @__PURE__ */
|
|
1298
|
+
questionObject.isQuestionMandatory && /* @__PURE__ */ jsxs10("span", { className: "mandatoryAsterisk", "aria-hidden": "true", children: [
|
|
1212
1299
|
" ",
|
|
1213
1300
|
"*"
|
|
1214
1301
|
] })
|
|
1215
1302
|
]
|
|
1216
1303
|
}
|
|
1217
1304
|
),
|
|
1218
|
-
questionObject.hasValidationError && /* @__PURE__ */
|
|
1305
|
+
questionObject.hasValidationError && /* @__PURE__ */ jsxs10("div", { className: "error addfileserror", id: errorId, children: [
|
|
1219
1306
|
/* @__PURE__ */ jsx11("span", { "aria-hidden": true, className: "errorDot", children: "!" }),
|
|
1220
|
-
/* @__PURE__ */ jsx11(
|
|
1221
|
-
|
|
1307
|
+
/* @__PURE__ */ jsx11(
|
|
1308
|
+
"span",
|
|
1309
|
+
{
|
|
1310
|
+
"aria-label": `Felmeddelande. ${questionObject.validationDefaultMessesege}`,
|
|
1311
|
+
className: "errorText",
|
|
1312
|
+
children: questionObject.validationDefaultMessesege
|
|
1313
|
+
}
|
|
1314
|
+
)
|
|
1222
1315
|
] }),
|
|
1223
1316
|
/* @__PURE__ */ jsx11(
|
|
1224
1317
|
ExploreFilesStandard_default,
|
|
@@ -1247,8 +1340,7 @@ var AddFiles = ({
|
|
|
1247
1340
|
errorMessageAddingFile,
|
|
1248
1341
|
activatedLanguage,
|
|
1249
1342
|
numberOfFiles,
|
|
1250
|
-
setNumberOfFiles
|
|
1251
|
-
removeUploadErrors: handleRemoveErrors
|
|
1343
|
+
setNumberOfFiles
|
|
1252
1344
|
}
|
|
1253
1345
|
)
|
|
1254
1346
|
] }) }),
|
|
@@ -1261,7 +1353,7 @@ var PreviewAddFiles = ({
|
|
|
1261
1353
|
activatedLanguage
|
|
1262
1354
|
}) => {
|
|
1263
1355
|
const previewId = `preview-${questionObject.Id}`;
|
|
1264
|
-
return /* @__PURE__ */
|
|
1356
|
+
return /* @__PURE__ */ jsxs10("div", { className: "pts-question-preview pts-addFiles-preview", id: `question-${previewId}`, children: [
|
|
1265
1357
|
/* @__PURE__ */ jsx11("h3", { id: previewId, children: questionObject.Question }),
|
|
1266
1358
|
/* @__PURE__ */ jsx11("div", { className: "pts-root-answer", children: questionObject.Files && questionObject.Files.length > 0 ? /* @__PURE__ */ jsx11("ul", { "aria-labelledby": previewId, children: questionObject.Files.map((file, index) => {
|
|
1267
1359
|
return /* @__PURE__ */ jsx11("li", { children: file.FileName }, `file-${index}-${file.FileName}`);
|
|
@@ -1487,7 +1579,7 @@ function groupQuestionsByStepCategoryGroup(questions, steps, validationErrorsLis
|
|
|
1487
1579
|
var GroupQuestionsByStepCategoryGroup_default = groupQuestionsByStepCategoryGroup;
|
|
1488
1580
|
|
|
1489
1581
|
// src/NewRenderFormComponentStandard/RenderQuestion/RenderQuestion.tsx
|
|
1490
|
-
import { Fragment as Fragment12, jsx as jsx12, jsxs as
|
|
1582
|
+
import { Fragment as Fragment12, jsx as jsx12, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1491
1583
|
var RenderQuestion = ({
|
|
1492
1584
|
question,
|
|
1493
1585
|
isTouched,
|
|
@@ -1495,7 +1587,7 @@ var RenderQuestion = ({
|
|
|
1495
1587
|
showPreview = false,
|
|
1496
1588
|
hideValidationMessage
|
|
1497
1589
|
}) => {
|
|
1498
|
-
return /* @__PURE__ */
|
|
1590
|
+
return /* @__PURE__ */ jsxs11(Fragment12, { children: [
|
|
1499
1591
|
question.questionType === "Radio" && /* @__PURE__ */ jsx12(
|
|
1500
1592
|
RadioMultipleStandard_default,
|
|
1501
1593
|
{
|
|
@@ -1539,7 +1631,7 @@ var RenderQuestion_default = RenderQuestion;
|
|
|
1539
1631
|
|
|
1540
1632
|
// src/NewRenderFormComponentStandard/RenderQuestionGroup/RenderQuestionGroup.tsx
|
|
1541
1633
|
import React7 from "react";
|
|
1542
|
-
import { Fragment as Fragment13, jsx as jsx13, jsxs as
|
|
1634
|
+
import { Fragment as Fragment13, jsx as jsx13, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1543
1635
|
var RenderQuestionGroup = ({
|
|
1544
1636
|
questionArray,
|
|
1545
1637
|
wrapper,
|
|
@@ -1571,7 +1663,7 @@ var RenderQuestionGroup = ({
|
|
|
1571
1663
|
}) });
|
|
1572
1664
|
switch (wrapper) {
|
|
1573
1665
|
case "fieldset":
|
|
1574
|
-
return /* @__PURE__ */
|
|
1666
|
+
return /* @__PURE__ */ jsxs12(
|
|
1575
1667
|
"fieldset",
|
|
1576
1668
|
{
|
|
1577
1669
|
className: "pts-root-question-group-fieldset",
|
|
@@ -1580,14 +1672,14 @@ var RenderQuestionGroup = ({
|
|
|
1580
1672
|
"aria-errormessage": questionArray[0].hasValidationError ? `${questionArray[0].id}-error` : void 0,
|
|
1581
1673
|
"aria-describedby": questionArray[0].hasValidationError ? `${questionArray[0].id}-error` : void 0,
|
|
1582
1674
|
children: [
|
|
1583
|
-
legend && /* @__PURE__ */
|
|
1675
|
+
legend && /* @__PURE__ */ jsxs12("legend", { children: [
|
|
1584
1676
|
/* @__PURE__ */ jsx13("span", { children: legend }),
|
|
1585
|
-
questionArray[0].hasValidationError && /* @__PURE__ */
|
|
1677
|
+
questionArray[0].hasValidationError && /* @__PURE__ */ jsxs12("span", { className: "sr-only", children: [
|
|
1586
1678
|
"Valideringsfel. ",
|
|
1587
1679
|
questionArray[0].validationDefaultMessesege
|
|
1588
1680
|
] })
|
|
1589
1681
|
] }),
|
|
1590
|
-
questionArray[0].hasValidationError && /* @__PURE__ */
|
|
1682
|
+
questionArray[0].hasValidationError && /* @__PURE__ */ jsxs12("div", { className: "pts-root-error", id: questionArray[0].id + "-error", children: [
|
|
1591
1683
|
/* @__PURE__ */ jsx13("span", { "aria-label": "Valideringsfel", className: "errorDot", children: "!" }),
|
|
1592
1684
|
/* @__PURE__ */ jsx13("span", { className: "errorText", children: questionArray[0].validationDefaultMessesege })
|
|
1593
1685
|
] }),
|
|
@@ -1689,13 +1781,13 @@ var ILanguageSupportinitialState = {
|
|
|
1689
1781
|
};
|
|
1690
1782
|
|
|
1691
1783
|
// src/NewTextComponentStandard/EditPreviewLinkStandard/EditPreviewLinkStandard.tsx
|
|
1692
|
-
import { jsx as jsx14, jsxs as
|
|
1784
|
+
import { jsx as jsx14, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1693
1785
|
var EditPreviewLink = ({
|
|
1694
1786
|
step,
|
|
1695
1787
|
changeStepHandler,
|
|
1696
1788
|
activatedLanguage = "sv"
|
|
1697
1789
|
}) => {
|
|
1698
|
-
return /* @__PURE__ */ jsx14("div", { className: "pts-editPreviewLink-container", children: /* @__PURE__ */
|
|
1790
|
+
return /* @__PURE__ */ jsx14("div", { className: "pts-editPreviewLink-container", children: /* @__PURE__ */ jsxs13(
|
|
1699
1791
|
"a",
|
|
1700
1792
|
{
|
|
1701
1793
|
href: "#",
|
|
@@ -1733,10 +1825,10 @@ var EditPreviewLink = ({
|
|
|
1733
1825
|
var EditPreviewLinkStandard_default = EditPreviewLink;
|
|
1734
1826
|
|
|
1735
1827
|
// src/NewTextComponentStandard/FooterStandard/FooterStandard.tsx
|
|
1736
|
-
import { jsx as jsx15, jsxs as
|
|
1828
|
+
import { jsx as jsx15, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1737
1829
|
var Footer = ({ activatedLanguage = "sv" }) => {
|
|
1738
|
-
return /* @__PURE__ */
|
|
1739
|
-
/* @__PURE__ */
|
|
1830
|
+
return /* @__PURE__ */ jsxs14("footer", { className: "pts-footer-container", children: [
|
|
1831
|
+
/* @__PURE__ */ jsxs14(
|
|
1740
1832
|
"svg",
|
|
1741
1833
|
{
|
|
1742
1834
|
role: "img",
|
|
@@ -1770,8 +1862,8 @@ var Footer = ({ activatedLanguage = "sv" }) => {
|
|
|
1770
1862
|
{
|
|
1771
1863
|
className: "pts-footer-linkList",
|
|
1772
1864
|
"aria-label": activatedLanguage === "en" ? "Footer navigation" : "Sidfotsnavigering",
|
|
1773
|
-
children: /* @__PURE__ */
|
|
1774
|
-
/* @__PURE__ */ jsx15("li", { children: /* @__PURE__ */
|
|
1865
|
+
children: /* @__PURE__ */ jsxs14("ul", { children: [
|
|
1866
|
+
/* @__PURE__ */ jsx15("li", { children: /* @__PURE__ */ jsxs14(
|
|
1775
1867
|
"a",
|
|
1776
1868
|
{
|
|
1777
1869
|
href: activatedLanguage === "en" ? "https://pts.se/en/contact/" : "https://www.pts.se/kontakt/",
|
|
@@ -1783,7 +1875,7 @@ var Footer = ({ activatedLanguage = "sv" }) => {
|
|
|
1783
1875
|
]
|
|
1784
1876
|
}
|
|
1785
1877
|
) }),
|
|
1786
|
-
/* @__PURE__ */ jsx15("li", { children: /* @__PURE__ */
|
|
1878
|
+
/* @__PURE__ */ jsx15("li", { children: /* @__PURE__ */ jsxs14(
|
|
1787
1879
|
"a",
|
|
1788
1880
|
{
|
|
1789
1881
|
href: activatedLanguage === "en" ? "https://pts.se/en/gdpr" : "https://www.pts.se/gdpr/",
|
|
@@ -1795,7 +1887,7 @@ var Footer = ({ activatedLanguage = "sv" }) => {
|
|
|
1795
1887
|
]
|
|
1796
1888
|
}
|
|
1797
1889
|
) }),
|
|
1798
|
-
/* @__PURE__ */ jsx15("li", { children: /* @__PURE__ */
|
|
1890
|
+
/* @__PURE__ */ jsx15("li", { children: /* @__PURE__ */ jsxs14(
|
|
1799
1891
|
"a",
|
|
1800
1892
|
{
|
|
1801
1893
|
href: activatedLanguage === "en" ? "https://pts.se/en/accessibility-eservices" : "https://www.pts.se/tillganglighet-etjanster",
|
|
@@ -1807,7 +1899,7 @@ var Footer = ({ activatedLanguage = "sv" }) => {
|
|
|
1807
1899
|
]
|
|
1808
1900
|
}
|
|
1809
1901
|
) }),
|
|
1810
|
-
/* @__PURE__ */ jsx15("li", { children: /* @__PURE__ */
|
|
1902
|
+
/* @__PURE__ */ jsx15("li", { children: /* @__PURE__ */ jsxs14(
|
|
1811
1903
|
"a",
|
|
1812
1904
|
{
|
|
1813
1905
|
href: activatedLanguage === "en" ? "https://pts.se/en/cookies-eservices" : "https://www.pts.se/kakor-etjanster",
|
|
@@ -1827,7 +1919,7 @@ var Footer = ({ activatedLanguage = "sv" }) => {
|
|
|
1827
1919
|
var FooterStandard_default = Footer;
|
|
1828
1920
|
|
|
1829
1921
|
// src/NewTextComponentStandard/HeaderStandard/Icons.tsx
|
|
1830
|
-
import { jsx as jsx16, jsxs as
|
|
1922
|
+
import { jsx as jsx16, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1831
1923
|
var LanguageIcon = () => /* @__PURE__ */ jsx16("svg", { width: "15", height: "15", viewBox: "0 0 21 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx16(
|
|
1832
1924
|
"path",
|
|
1833
1925
|
{
|
|
@@ -1835,7 +1927,7 @@ var LanguageIcon = () => /* @__PURE__ */ jsx16("svg", { width: "15", height: "15
|
|
|
1835
1927
|
fill: "#6E3282"
|
|
1836
1928
|
}
|
|
1837
1929
|
) });
|
|
1838
|
-
var Logo_sv = () => /* @__PURE__ */
|
|
1930
|
+
var Logo_sv = () => /* @__PURE__ */ jsxs15("svg", { width: "168.8", height: "46.67", viewBox: "0 0 168.8 46.67", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
1839
1931
|
/* @__PURE__ */ jsx16(
|
|
1840
1932
|
"path",
|
|
1841
1933
|
{
|
|
@@ -1981,7 +2073,7 @@ var Logo_sv = () => /* @__PURE__ */ jsxs14("svg", { width: "168.8", height: "46.
|
|
|
1981
2073
|
),
|
|
1982
2074
|
/* @__PURE__ */ jsx16("path", { d: "M82.2223 18.3335V37.2224", stroke: "black", strokeWidth: "0.8", strokeMiterlimit: "10" })
|
|
1983
2075
|
] });
|
|
1984
|
-
var Logo_en = () => /* @__PURE__ */
|
|
2076
|
+
var Logo_en = () => /* @__PURE__ */ jsxs15("svg", { width: "189.0", height: "46.67", viewBox: "0 0 189 46.67", fill: "none", xmlns: "http://www.w3.org/2000/svg", role: "img", children: [
|
|
1985
2077
|
/* @__PURE__ */ jsx16(
|
|
1986
2078
|
"path",
|
|
1987
2079
|
{
|
|
@@ -2204,7 +2296,7 @@ var Logo_en = () => /* @__PURE__ */ jsxs14("svg", { width: "189.0", height: "46.
|
|
|
2204
2296
|
] });
|
|
2205
2297
|
|
|
2206
2298
|
// src/NewTextComponentStandard/HeaderStandard/HeaderStandard.tsx
|
|
2207
|
-
import { jsx as jsx17, jsxs as
|
|
2299
|
+
import { jsx as jsx17, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
2208
2300
|
var Header = ({
|
|
2209
2301
|
activatedLanguage = "sv",
|
|
2210
2302
|
useLanguage = true,
|
|
@@ -2223,7 +2315,7 @@ var Header = ({
|
|
|
2223
2315
|
if (activatedLanguage === "sv") return "English";
|
|
2224
2316
|
else return "Svenska";
|
|
2225
2317
|
};
|
|
2226
|
-
return /* @__PURE__ */
|
|
2318
|
+
return /* @__PURE__ */ jsxs16("header", { className: "pts-header-container", children: [
|
|
2227
2319
|
/* @__PURE__ */ jsx17(
|
|
2228
2320
|
"a",
|
|
2229
2321
|
{
|
|
@@ -2234,7 +2326,7 @@ var Header = ({
|
|
|
2234
2326
|
children: activatedLanguage === "en" ? /* @__PURE__ */ jsx17("span", { "aria-hidden": "true", children: /* @__PURE__ */ jsx17(Logo_en, {}) }) : /* @__PURE__ */ jsx17("span", { "aria-hidden": "true", children: /* @__PURE__ */ jsx17(Logo_sv, {}) })
|
|
2235
2327
|
}
|
|
2236
2328
|
),
|
|
2237
|
-
useLanguage && /* @__PURE__ */
|
|
2329
|
+
useLanguage && /* @__PURE__ */ jsxs16(
|
|
2238
2330
|
"button",
|
|
2239
2331
|
{
|
|
2240
2332
|
"aria-label": activatedLanguage === "en" ? "Change language to Svenska" : "\xC4ndra spr\xE5k till English",
|
|
@@ -2253,7 +2345,7 @@ var HeaderStandard_default = Header;
|
|
|
2253
2345
|
// src/NewTextComponentStandard/InfoOnlyStandard/InfoOnlyStandard.tsx
|
|
2254
2346
|
import { useEffect as useEffect6 } from "react";
|
|
2255
2347
|
import DOMPurify4 from "dompurify";
|
|
2256
|
-
import { Fragment as Fragment14, jsx as jsx18, jsxs as
|
|
2348
|
+
import { Fragment as Fragment14, jsx as jsx18, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
2257
2349
|
var cleanText = (text) => DOMPurify4.sanitize(text, { ADD_ATTR: ["target", "class"] });
|
|
2258
2350
|
var InfoOnly = ({
|
|
2259
2351
|
questionObject,
|
|
@@ -2273,7 +2365,7 @@ var InfoOnly = ({
|
|
|
2273
2365
|
const e = { target: { value: questionObject2.questionLabel + avoidBugInRedux } };
|
|
2274
2366
|
isTouched(e, questionObject2);
|
|
2275
2367
|
};
|
|
2276
|
-
return /* @__PURE__ */
|
|
2368
|
+
return /* @__PURE__ */ jsxs17(Fragment14, { children: [
|
|
2277
2369
|
showConfigure && visible && /* @__PURE__ */ jsx18("div", { className: "pts-infoOnly-container", children: /* @__PURE__ */ jsx18("div", { className: "InfoOnlyText", tabIndex, children: questionObject.questionLabel && /* @__PURE__ */ jsx18(
|
|
2278
2370
|
"p",
|
|
2279
2371
|
{
|
|
@@ -2298,7 +2390,7 @@ var PreviewInfoOnly = ({ questionObject }) => {
|
|
|
2298
2390
|
};
|
|
2299
2391
|
|
|
2300
2392
|
// src/NewTextComponentStandard/ModalStandard/ModalStandard.tsx
|
|
2301
|
-
import { jsx as jsx19, jsxs as
|
|
2393
|
+
import { jsx as jsx19, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
2302
2394
|
var CONTENT = {
|
|
2303
2395
|
en: {
|
|
2304
2396
|
heading: "Please wait",
|
|
@@ -2312,8 +2404,8 @@ var CONTENT = {
|
|
|
2312
2404
|
var Modal = ({ showModal: isOpen, activatedLanguage = "" }) => {
|
|
2313
2405
|
const currentContent = activatedLanguage === "en" ? CONTENT.en : CONTENT.sv;
|
|
2314
2406
|
if (!isOpen) return null;
|
|
2315
|
-
return /* @__PURE__ */
|
|
2316
|
-
/* @__PURE__ */
|
|
2407
|
+
return /* @__PURE__ */ jsxs18("div", { className: "pts-modal-overlay", children: [
|
|
2408
|
+
/* @__PURE__ */ jsxs18("div", { "aria-hidden": true, className: "pts-modal-content", children: [
|
|
2317
2409
|
/* @__PURE__ */ jsx19("h1", { children: currentContent.heading }),
|
|
2318
2410
|
/* @__PURE__ */ jsx19("p", { children: currentContent.message }),
|
|
2319
2411
|
/* @__PURE__ */ jsx19("div", { className: "pts-spinner-border" })
|
|
@@ -2326,9 +2418,9 @@ var ModalStandard_default = Modal;
|
|
|
2326
2418
|
// src/NewTextComponentStandard/TextHeadlineAndBodyStandard/TextHeadlineAndBodyStandard.tsx
|
|
2327
2419
|
import { createElement } from "react";
|
|
2328
2420
|
import DOMPurify5 from "dompurify";
|
|
2329
|
-
import { jsx as jsx20, jsxs as
|
|
2421
|
+
import { jsx as jsx20, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
2330
2422
|
var TextHeadlineAndBody = ({ data, headlineType = "h2" }) => {
|
|
2331
|
-
return /* @__PURE__ */
|
|
2423
|
+
return /* @__PURE__ */ jsxs19(
|
|
2332
2424
|
"section",
|
|
2333
2425
|
{
|
|
2334
2426
|
className: "pts-textHeadlineAndBody-container",
|
|
@@ -2336,7 +2428,7 @@ var TextHeadlineAndBody = ({ data, headlineType = "h2" }) => {
|
|
|
2336
2428
|
children: [
|
|
2337
2429
|
data.headline && createElement(headlineType, { id: "textHeadlineAndBody-headline" }, data.headline),
|
|
2338
2430
|
data.body && /* @__PURE__ */ jsx20("div", { dangerouslySetInnerHTML: { __html: DOMPurify5.sanitize(data.body) } }),
|
|
2339
|
-
data.linksForMoreInfo && data.linksForMoreInfo.length > 1 && /* @__PURE__ */ jsx20("ul", { className: "pts-moreinfo-list", children: data.linksForMoreInfo.map((link, index) => /* @__PURE__ */ jsx20("li", { className: index > 0 ? "notFirstInList" : "", children: /* @__PURE__ */
|
|
2431
|
+
data.linksForMoreInfo && data.linksForMoreInfo.length > 1 && /* @__PURE__ */ jsx20("ul", { className: "pts-moreinfo-list", children: data.linksForMoreInfo.map((link, index) => /* @__PURE__ */ jsx20("li", { className: index > 0 ? "notFirstInList" : "", children: /* @__PURE__ */ jsxs19(
|
|
2340
2432
|
"a",
|
|
2341
2433
|
{
|
|
2342
2434
|
href: link.url,
|
|
@@ -2366,7 +2458,7 @@ var TextHeadlineAndBody = ({ data, headlineType = "h2" }) => {
|
|
|
2366
2458
|
]
|
|
2367
2459
|
}
|
|
2368
2460
|
) }, `more-info-${index}`)) }),
|
|
2369
|
-
data.linksForMoreInfo && data.linksForMoreInfo.length === 1 && /* @__PURE__ */
|
|
2461
|
+
data.linksForMoreInfo && data.linksForMoreInfo.length === 1 && /* @__PURE__ */ jsxs19(
|
|
2370
2462
|
"a",
|
|
2371
2463
|
{
|
|
2372
2464
|
href: data.linksForMoreInfo[0].url,
|
|
@@ -2458,12 +2550,12 @@ var PrincipleOfPublicityStandard_default = PrincipleOfPublicity;
|
|
|
2458
2550
|
|
|
2459
2551
|
// src/NewTextComponentStandard/ServiceHeadlineAndBodyStandard/ServiceHeadlineAndBodyStandard.tsx
|
|
2460
2552
|
import DOMPurify6 from "dompurify";
|
|
2461
|
-
import { jsx as jsx22, jsxs as
|
|
2553
|
+
import { jsx as jsx22, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
2462
2554
|
var ServiceHeadlineAndBody = ({ data, activeStep = 1 }) => {
|
|
2463
|
-
return /* @__PURE__ */
|
|
2555
|
+
return /* @__PURE__ */ jsxs20("div", { className: "pts-serviceHeadlineAndBody-container", children: [
|
|
2464
2556
|
data.mainHeadline && /* @__PURE__ */ jsx22("h1", { id: "pts-main-service-headline", children: data.mainHeadline }),
|
|
2465
2557
|
activeStep === 1 && data.ingressBody && /* @__PURE__ */ jsx22("div", { dangerouslySetInnerHTML: { __html: DOMPurify6.sanitize(data.ingressBody) } }),
|
|
2466
|
-
activeStep === 1 && data.linksForMoreInfo && data.linksForMoreInfo.length > 1 && /* @__PURE__ */ jsx22("ul", { className: "pts-moreinfo-list", children: data.linksForMoreInfo.map((moreInfo, index) => /* @__PURE__ */ jsx22("li", { className: index > 0 ? "notFirstInList" : "", children: /* @__PURE__ */
|
|
2558
|
+
activeStep === 1 && data.linksForMoreInfo && data.linksForMoreInfo.length > 1 && /* @__PURE__ */ jsx22("ul", { className: "pts-moreinfo-list", children: data.linksForMoreInfo.map((moreInfo, index) => /* @__PURE__ */ jsx22("li", { className: index > 0 ? "notFirstInList" : "", children: /* @__PURE__ */ jsxs20("a", { href: moreInfo.url, target: "_blank", rel: "noopener noreferrer", children: [
|
|
2467
2559
|
/* @__PURE__ */ jsx22(
|
|
2468
2560
|
"svg",
|
|
2469
2561
|
{
|
|
@@ -2484,7 +2576,7 @@ var ServiceHeadlineAndBody = ({ data, activeStep = 1 }) => {
|
|
|
2484
2576
|
),
|
|
2485
2577
|
/* @__PURE__ */ jsx22("span", { className: "pts-moreinfo-link-text", children: moreInfo.title })
|
|
2486
2578
|
] }) }, moreInfo.title + index)) }),
|
|
2487
|
-
activeStep === 1 && data.linksForMoreInfo && data.linksForMoreInfo.length === 1 && /* @__PURE__ */
|
|
2579
|
+
activeStep === 1 && data.linksForMoreInfo && data.linksForMoreInfo.length === 1 && /* @__PURE__ */ jsxs20("a", { href: data.linksForMoreInfo[0].url, target: "_blank", rel: "noopener noreferrer", children: [
|
|
2488
2580
|
/* @__PURE__ */ jsx22(
|
|
2489
2581
|
"svg",
|
|
2490
2582
|
{
|
|
@@ -2517,7 +2609,7 @@ var SkipLink = () => {
|
|
|
2517
2609
|
var SkipLinkStandard_default = SkipLink;
|
|
2518
2610
|
|
|
2519
2611
|
// src/NewTextComponentStandard/StepperButtonsStandard/StepperButtonsStandard.tsx
|
|
2520
|
-
import { jsx as jsx24, jsxs as
|
|
2612
|
+
import { jsx as jsx24, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
2521
2613
|
var StepperButtons = ({
|
|
2522
2614
|
languageSupported,
|
|
2523
2615
|
handleActiveStep,
|
|
@@ -2527,7 +2619,7 @@ var StepperButtons = ({
|
|
|
2527
2619
|
activeStep
|
|
2528
2620
|
}) => {
|
|
2529
2621
|
const totalSteps = arraySteps ? arraySteps.length : "";
|
|
2530
|
-
return /* @__PURE__ */
|
|
2622
|
+
return /* @__PURE__ */ jsxs21("div", { className: "pts-stepperButtons-container", children: [
|
|
2531
2623
|
activeStep !== 0 && /* @__PURE__ */ jsx24(
|
|
2532
2624
|
"button",
|
|
2533
2625
|
{
|
|
@@ -2537,7 +2629,7 @@ var StepperButtons = ({
|
|
|
2537
2629
|
children: languageSupported ? languageSupported.backButton : "<<"
|
|
2538
2630
|
}
|
|
2539
2631
|
),
|
|
2540
|
-
/* @__PURE__ */
|
|
2632
|
+
/* @__PURE__ */ jsxs21(
|
|
2541
2633
|
"button",
|
|
2542
2634
|
{
|
|
2543
2635
|
type: activeStep === totalSteps ? "submit" : "button",
|
|
@@ -2555,14 +2647,14 @@ var StepperButtonsStandard_default = StepperButtons;
|
|
|
2555
2647
|
|
|
2556
2648
|
// src/NewTextComponentStandard/StepperStandard/StepperStandard.tsx
|
|
2557
2649
|
import React10 from "react";
|
|
2558
|
-
import { jsx as jsx25, jsxs as
|
|
2650
|
+
import { jsx as jsx25, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
2559
2651
|
var Stepper = ({ arraySteps = [], activeStep = 1 }) => {
|
|
2560
2652
|
return /* @__PURE__ */ jsx25("div", { className: "pts-stepper-container", "aria-hidden": "true", children: arraySteps.map((step, index) => {
|
|
2561
2653
|
const isActive = step.step === activeStep;
|
|
2562
2654
|
const lastElement = arraySteps.length;
|
|
2563
2655
|
const isDone = step.step < activeStep;
|
|
2564
|
-
return /* @__PURE__ */
|
|
2565
|
-
/* @__PURE__ */
|
|
2656
|
+
return /* @__PURE__ */ jsxs22(React10.Fragment, { children: [
|
|
2657
|
+
/* @__PURE__ */ jsxs22("div", { className: "pts-stepper-step", children: [
|
|
2566
2658
|
/* @__PURE__ */ jsx25(
|
|
2567
2659
|
"div",
|
|
2568
2660
|
{
|
|
@@ -2597,7 +2689,7 @@ var Stepper = ({ arraySteps = [], activeStep = 1 }) => {
|
|
|
2597
2689
|
var StepperStandard_default = Stepper;
|
|
2598
2690
|
|
|
2599
2691
|
// src/NewTextComponentStandard/ValidationErrorSummaryList/ValidationErrorSummaryList.tsx
|
|
2600
|
-
import { Fragment as Fragment15, jsx as jsx26, jsxs as
|
|
2692
|
+
import { Fragment as Fragment15, jsx as jsx26, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
2601
2693
|
var ValidationErrorSummaryList = ({
|
|
2602
2694
|
validationErrorsList,
|
|
2603
2695
|
formQuestions,
|
|
@@ -2645,9 +2737,9 @@ var ValidationErrorSummaryList = ({
|
|
|
2645
2737
|
const found = formQuestions.find((item) => item.id === id);
|
|
2646
2738
|
return (_a = found == null ? void 0 : found.validationSummaryLabel) != null ? _a : found == null ? void 0 : found.questionLabel;
|
|
2647
2739
|
}
|
|
2648
|
-
return /* @__PURE__ */
|
|
2740
|
+
return /* @__PURE__ */ jsxs23("div", { className: "pts-errorSummary-container pts-root-error", children: [
|
|
2649
2741
|
/* @__PURE__ */ jsx26("span", { "aria-hidden": "true", className: "errorDot", children: "!" }),
|
|
2650
|
-
/* @__PURE__ */
|
|
2742
|
+
/* @__PURE__ */ jsxs23("div", { className: "errorSummary-content", id: "pts-errorSummary-content", children: [
|
|
2651
2743
|
/* @__PURE__ */ jsx26("h2", { id: "errorSummary-headline", children: title }),
|
|
2652
2744
|
/* @__PURE__ */ jsx26("ul", { id: "errorSummary-ul", children: filteredIds.map((questionId, i) => /* @__PURE__ */ jsx26("li", { children: /* @__PURE__ */ jsx26(
|
|
2653
2745
|
"a",
|
|
@@ -2667,7 +2759,7 @@ var ValidationErrorSummaryList = ({
|
|
|
2667
2759
|
var ValidationErrorSummaryList_default = ValidationErrorSummaryList;
|
|
2668
2760
|
|
|
2669
2761
|
// src/NewTextComponentStandard/CookieBanner/CookieBanner.tsx
|
|
2670
|
-
import { jsx as jsx27, jsxs as
|
|
2762
|
+
import { jsx as jsx27, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
2671
2763
|
var CookieBanner = ({
|
|
2672
2764
|
visible = false,
|
|
2673
2765
|
onCookieStateChange,
|
|
@@ -2699,11 +2791,11 @@ var CookieBanner = ({
|
|
|
2699
2791
|
"aria-modal": "true",
|
|
2700
2792
|
id: "cookie-banner",
|
|
2701
2793
|
tabIndex: -1,
|
|
2702
|
-
children: /* @__PURE__ */
|
|
2794
|
+
children: /* @__PURE__ */ jsxs24("div", { className: "content", children: [
|
|
2703
2795
|
/* @__PURE__ */ jsx27("h3", { id: "cookie-banner-title", children: "Kakor (cookies)" }),
|
|
2704
2796
|
/* @__PURE__ */ jsx27("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." }),
|
|
2705
|
-
/* @__PURE__ */
|
|
2706
|
-
/* @__PURE__ */
|
|
2797
|
+
/* @__PURE__ */ jsxs24("div", { className: "pts-cookieBanner-Links", children: [
|
|
2798
|
+
/* @__PURE__ */ jsxs24(
|
|
2707
2799
|
"svg",
|
|
2708
2800
|
{
|
|
2709
2801
|
width: "27",
|
|
@@ -2726,7 +2818,7 @@ var CookieBanner = ({
|
|
|
2726
2818
|
),
|
|
2727
2819
|
/* @__PURE__ */ jsx27("a", { href: "www.pts.se", target: "_blank", rel: "noopener noreferrer", children: "Kakor (cookies) p\xE5 pts.se (\xD6ppnas i nytt f\xF6nster)" })
|
|
2728
2820
|
] }),
|
|
2729
|
-
/* @__PURE__ */
|
|
2821
|
+
/* @__PURE__ */ jsxs24("div", { className: "pts-cookieBanner-Buttons", children: [
|
|
2730
2822
|
/* @__PURE__ */ jsx27("button", { onClick: () => handleCookieChoice(true), children: "Ja, jag samtycker" }),
|
|
2731
2823
|
/* @__PURE__ */ jsx27("button", { onClick: () => handleCookieChoice(false), children: "Nej, jag samtycker inte" })
|
|
2732
2824
|
] })
|