optimized-react-component-library-xyz123 0.40.2 → 0.40.4
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 +7 -15
- package/dist/index.d.ts +7 -15
- package/dist/index.js +16 -21
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +16 -21
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/css/darkMode.css +2 -2
- package/src/css/mobileView.css +33 -36
- package/src/css/questions.css +2 -17
- package/src/css/styles.css +7 -4
package/dist/index.d.mts
CHANGED
|
@@ -40,8 +40,7 @@ interface IFormState {
|
|
|
40
40
|
}
|
|
41
41
|
interface IOption {
|
|
42
42
|
label: string;
|
|
43
|
-
value
|
|
44
|
-
id?: string;
|
|
43
|
+
value: string;
|
|
45
44
|
}
|
|
46
45
|
interface IPTSLink {
|
|
47
46
|
title: string;
|
|
@@ -69,10 +68,11 @@ interface IQuestion {
|
|
|
69
68
|
validationSummaryLabel?: string;
|
|
70
69
|
hideQuestion?: boolean;
|
|
71
70
|
answer?: string;
|
|
72
|
-
files?:
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
71
|
+
files?: Array<File | {
|
|
72
|
+
file: File;
|
|
73
|
+
dataURL: string;
|
|
74
|
+
id?: string;
|
|
75
|
+
}>;
|
|
76
76
|
aboutText?: string;
|
|
77
77
|
isQuestionMandatory?: boolean;
|
|
78
78
|
questionType?: string;
|
|
@@ -100,13 +100,6 @@ interface IQuestionExtraAttribute {
|
|
|
100
100
|
spellCheck?: boolean;
|
|
101
101
|
autoCapitalize?: string;
|
|
102
102
|
}
|
|
103
|
-
interface IUploadedFile {
|
|
104
|
-
FileName: string;
|
|
105
|
-
FileSize: number;
|
|
106
|
-
FileType: string;
|
|
107
|
-
dataURL: string | ArrayBuffer | null;
|
|
108
|
-
id?: string;
|
|
109
|
-
}
|
|
110
103
|
interface IStepQuestionData {
|
|
111
104
|
step: number;
|
|
112
105
|
stepHeadline?: string;
|
|
@@ -808,12 +801,11 @@ interface EditPreviewLinkProps {
|
|
|
808
801
|
declare const EditPreviewLink: FC<EditPreviewLinkProps>;
|
|
809
802
|
|
|
810
803
|
interface StartApplicationButtonProps {
|
|
811
|
-
onClick: () => void;
|
|
804
|
+
onClick: (event: React$1.MouseEvent<HTMLButtonElement>) => void;
|
|
812
805
|
label?: string;
|
|
813
806
|
className?: string;
|
|
814
807
|
activatedLanguage?: string;
|
|
815
808
|
}
|
|
816
|
-
|
|
817
809
|
/**
|
|
818
810
|
* En standardiserad knapp för att starta e-tjänsten.
|
|
819
811
|
*
|
package/dist/index.d.ts
CHANGED
|
@@ -40,8 +40,7 @@ interface IFormState {
|
|
|
40
40
|
}
|
|
41
41
|
interface IOption {
|
|
42
42
|
label: string;
|
|
43
|
-
value
|
|
44
|
-
id?: string;
|
|
43
|
+
value: string;
|
|
45
44
|
}
|
|
46
45
|
interface IPTSLink {
|
|
47
46
|
title: string;
|
|
@@ -69,10 +68,11 @@ interface IQuestion {
|
|
|
69
68
|
validationSummaryLabel?: string;
|
|
70
69
|
hideQuestion?: boolean;
|
|
71
70
|
answer?: string;
|
|
72
|
-
files?:
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
71
|
+
files?: Array<File | {
|
|
72
|
+
file: File;
|
|
73
|
+
dataURL: string;
|
|
74
|
+
id?: string;
|
|
75
|
+
}>;
|
|
76
76
|
aboutText?: string;
|
|
77
77
|
isQuestionMandatory?: boolean;
|
|
78
78
|
questionType?: string;
|
|
@@ -100,13 +100,6 @@ interface IQuestionExtraAttribute {
|
|
|
100
100
|
spellCheck?: boolean;
|
|
101
101
|
autoCapitalize?: string;
|
|
102
102
|
}
|
|
103
|
-
interface IUploadedFile {
|
|
104
|
-
FileName: string;
|
|
105
|
-
FileSize: number;
|
|
106
|
-
FileType: string;
|
|
107
|
-
dataURL: string | ArrayBuffer | null;
|
|
108
|
-
id?: string;
|
|
109
|
-
}
|
|
110
103
|
interface IStepQuestionData {
|
|
111
104
|
step: number;
|
|
112
105
|
stepHeadline?: string;
|
|
@@ -808,12 +801,11 @@ interface EditPreviewLinkProps {
|
|
|
808
801
|
declare const EditPreviewLink: FC<EditPreviewLinkProps>;
|
|
809
802
|
|
|
810
803
|
interface StartApplicationButtonProps {
|
|
811
|
-
onClick: () => void;
|
|
804
|
+
onClick: (event: React$1.MouseEvent<HTMLButtonElement>) => void;
|
|
812
805
|
label?: string;
|
|
813
806
|
className?: string;
|
|
814
807
|
activatedLanguage?: string;
|
|
815
808
|
}
|
|
816
|
-
|
|
817
809
|
/**
|
|
818
810
|
* En standardiserad knapp för att starta e-tjänsten.
|
|
819
811
|
*
|
package/dist/index.js
CHANGED
|
@@ -366,7 +366,7 @@ var InputTextarea = ({
|
|
|
366
366
|
const maxLength = (_d = (_c = question.questionExtraAttribute) == null ? void 0 : _c.answerMaxLength) != null ? _d : defaultMaxLength;
|
|
367
367
|
const isTooLong = answerLength > maxLength;
|
|
368
368
|
const counterText = activatedLanguage === "en" ? `${answerLength} of ${maxLength} characters` : `${answerLength} av ${maxLength} tecken`;
|
|
369
|
-
const maxLengthErrorText = activatedLanguage === "en" ? `The text must be ${maxLength} characters or less` : `Texten f\xE5r
|
|
369
|
+
const maxLengthErrorText = activatedLanguage === "en" ? `The text must be ${maxLength} characters or less` : `Texten f\xE5r inte vara l\xE4ngre \xE4n ${maxLength} tecken`;
|
|
370
370
|
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
|
|
371
371
|
!showPreview && question.visible && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
372
372
|
"div",
|
|
@@ -466,7 +466,7 @@ var TextFieldStandard = ({
|
|
|
466
466
|
const answerLength = (_b = (_a = question.answer) == null ? void 0 : _a.length) != null ? _b : 0;
|
|
467
467
|
const maxLength = 100;
|
|
468
468
|
const isTooLong = answerLength > maxLength;
|
|
469
|
-
const maxLengthErrorText = activatedLanguage === "en" ? `The text must be ${maxLength} characters or less` : `Texten f\xE5r
|
|
469
|
+
const maxLengthErrorText = activatedLanguage === "en" ? `The text must be ${maxLength} characters or less` : `Texten f\xE5r inte vara l\xE4ngre \xE4n ${maxLength} tecken`;
|
|
470
470
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
471
471
|
!showPreview && question.visible && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
472
472
|
"div",
|
|
@@ -1434,11 +1434,12 @@ function buildStepCategoryGroupQuestionStructure(questions, steps, validationErr
|
|
|
1434
1434
|
for (const [category, groupMap] of Array.from(categoryMap.entries())) {
|
|
1435
1435
|
const questionGroups = [];
|
|
1436
1436
|
for (const [groupId, questions2] of Array.from(groupMap.entries())) {
|
|
1437
|
+
const firstVisibleQuestion = questions2.find((q) => q.visible);
|
|
1437
1438
|
questionGroups.push({
|
|
1438
1439
|
questionGroupId: groupId,
|
|
1439
1440
|
questionGroupType: questions2[0].questionGroupType,
|
|
1440
1441
|
questions: questions2,
|
|
1441
|
-
legend:
|
|
1442
|
+
legend: firstVisibleQuestion == null ? void 0 : firstVisibleQuestion.legend
|
|
1442
1443
|
});
|
|
1443
1444
|
}
|
|
1444
1445
|
const isVisible = questionGroups.some(
|
|
@@ -2845,32 +2846,26 @@ var TextHeadlineAndBodyStandard_default = TextHeadlineAndBody;
|
|
|
2845
2846
|
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
2846
2847
|
var CONTENT2 = {
|
|
2847
2848
|
en: {
|
|
2848
|
-
headline: "The principle of
|
|
2849
|
-
paragraph1: "The principle of
|
|
2850
|
-
paragraph2: "
|
|
2849
|
+
headline: "The principle of public access and the processing of personal data",
|
|
2850
|
+
paragraph1: "The principle of public access to information means that everyone has the right to access public documents heldby authorities. The Data Protection Regulation does not prevent personal data in public documents from being disclosed.",
|
|
2851
|
+
paragraph2: "Since PTS is an authority, messages sent to us are generally public documents that are recorded and registered. Upon request, the messages will be disclosed if the information is not subject to confidentiality.",
|
|
2852
|
+
paragraph3: "More information can be found at pts.se:",
|
|
2851
2853
|
links: [
|
|
2852
2854
|
{
|
|
2853
|
-
url: "https://
|
|
2854
|
-
title: "
|
|
2855
|
-
},
|
|
2856
|
-
{
|
|
2857
|
-
url: "https://www.pts.se/om-oss/behandling-av-personuppgifter/",
|
|
2858
|
-
title: "PTS processing of personal data (opens in new tab)"
|
|
2855
|
+
url: "https://pts.se/en/about-us/processing-of-personal-data/",
|
|
2856
|
+
title: "Processing of personal data (opens in new tab)"
|
|
2859
2857
|
}
|
|
2860
2858
|
]
|
|
2861
2859
|
},
|
|
2862
2860
|
sv: {
|
|
2863
2861
|
headline: "Offentlighetsprincipen och behandling av personuppgifter",
|
|
2864
|
-
paragraph1: "Offentlighetsprincipen inneb\xE4r att var och en har r\xE4tt att ta del av allm\xE4nna handlingar hos myndigheter.
|
|
2865
|
-
paragraph2: "
|
|
2862
|
+
paragraph1: "Offentlighetsprincipen inneb\xE4r att var och en har r\xE4tt att ta del av allm\xE4nna handlingar hos myndigheter. Dataskyddsf\xF6rordningen hindrar inte att personuppgifter i allm\xE4nna handlingar l\xE4mnas ut.",
|
|
2863
|
+
paragraph2: "Eftersom PTS \xE4r en myndighet blir meddelanden som skickas till oss som huvudregel allm\xE4nna handlingar som diarief\xF6rs och registreras. Vid en beg\xE4ran kommer meddelandena att l\xE4mnas ut om uppgifterna inte omfattas av sekretess.",
|
|
2864
|
+
paragraph3: "Mer information finns p\xE5 pts.se:",
|
|
2866
2865
|
links: [
|
|
2867
2866
|
{
|
|
2868
|
-
url: "https://www.
|
|
2869
|
-
title: "
|
|
2870
|
-
},
|
|
2871
|
-
{
|
|
2872
|
-
url: "https://www.pts.se/om-oss/behandling-av-personuppgifter/",
|
|
2873
|
-
title: "PTS behandling av personuppgifter (\xF6ppnas i ny flik)"
|
|
2867
|
+
url: "https://www.pts.se/gdpr/",
|
|
2868
|
+
title: "Behandling av personuppgifter (\xF6ppnas i ny flik)"
|
|
2874
2869
|
}
|
|
2875
2870
|
]
|
|
2876
2871
|
}
|
|
@@ -2882,7 +2877,7 @@ var PrincipleOfPublicity = ({ activatedLanguage = "" }) => {
|
|
|
2882
2877
|
{
|
|
2883
2878
|
data: {
|
|
2884
2879
|
headline: currentContent.headline,
|
|
2885
|
-
body: `<p class="first-paragraph">${currentContent.paragraph1}</p><p>${currentContent.paragraph2}</p>`,
|
|
2880
|
+
body: `<p class="first-paragraph">${currentContent.paragraph1}</p><p>${currentContent.paragraph2}</p><p>${currentContent.paragraph3}</p>`,
|
|
2886
2881
|
linksForMoreInfo: currentContent.links.map((link) => ({
|
|
2887
2882
|
url: link.url,
|
|
2888
2883
|
title: link.title,
|