optimized-react-component-library-xyz123 0.40.1 → 0.40.2

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
@@ -40,7 +40,8 @@ interface IFormState {
40
40
  }
41
41
  interface IOption {
42
42
  label: string;
43
- value: string;
43
+ value?: string;
44
+ id?: string;
44
45
  }
45
46
  interface IPTSLink {
46
47
  title: string;
@@ -68,11 +69,10 @@ interface IQuestion {
68
69
  validationSummaryLabel?: string;
69
70
  hideQuestion?: boolean;
70
71
  answer?: string;
71
- files?: Array<File | {
72
- file: File;
73
- dataURL: string;
74
- id?: string;
75
- }>;
72
+ files?: IUploadedFile[];
73
+ allowedTotalFileSize?: number;
74
+ allowedNumberOfFiles?: number;
75
+ allowedFileTypes?: string[];
76
76
  aboutText?: string;
77
77
  isQuestionMandatory?: boolean;
78
78
  questionType?: string;
@@ -100,6 +100,13 @@ 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
+ }
103
110
  interface IStepQuestionData {
104
111
  step: number;
105
112
  stepHeadline?: string;
@@ -801,11 +808,12 @@ interface EditPreviewLinkProps {
801
808
  declare const EditPreviewLink: FC<EditPreviewLinkProps>;
802
809
 
803
810
  interface StartApplicationButtonProps {
804
- onClick: (event: React$1.MouseEvent<HTMLButtonElement>) => void;
811
+ onClick: () => void;
805
812
  label?: string;
806
813
  className?: string;
807
814
  activatedLanguage?: string;
808
815
  }
816
+
809
817
  /**
810
818
  * En standardiserad knapp för att starta e-tjänsten.
811
819
  *
package/dist/index.d.ts CHANGED
@@ -40,7 +40,8 @@ interface IFormState {
40
40
  }
41
41
  interface IOption {
42
42
  label: string;
43
- value: string;
43
+ value?: string;
44
+ id?: string;
44
45
  }
45
46
  interface IPTSLink {
46
47
  title: string;
@@ -68,11 +69,10 @@ interface IQuestion {
68
69
  validationSummaryLabel?: string;
69
70
  hideQuestion?: boolean;
70
71
  answer?: string;
71
- files?: Array<File | {
72
- file: File;
73
- dataURL: string;
74
- id?: string;
75
- }>;
72
+ files?: IUploadedFile[];
73
+ allowedTotalFileSize?: number;
74
+ allowedNumberOfFiles?: number;
75
+ allowedFileTypes?: string[];
76
76
  aboutText?: string;
77
77
  isQuestionMandatory?: boolean;
78
78
  questionType?: string;
@@ -100,6 +100,13 @@ 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
+ }
103
110
  interface IStepQuestionData {
104
111
  step: number;
105
112
  stepHeadline?: string;
@@ -801,11 +808,12 @@ interface EditPreviewLinkProps {
801
808
  declare const EditPreviewLink: FC<EditPreviewLinkProps>;
802
809
 
803
810
  interface StartApplicationButtonProps {
804
- onClick: (event: React$1.MouseEvent<HTMLButtonElement>) => void;
811
+ onClick: () => void;
805
812
  label?: string;
806
813
  className?: string;
807
814
  activatedLanguage?: string;
808
815
  }
816
+
809
817
  /**
810
818
  * En standardiserad knapp för att starta e-tjänsten.
811
819
  *
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 inte vara l\xE4ngre \xE4n ${maxLength} tecken`;
369
+ const maxLengthErrorText = activatedLanguage === "en" ? `The text must be ${maxLength} characters or less` : `Texten f\xE5r max vara ${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 inte vara l\xE4ngre \xE4n ${maxLength} tecken`;
469
+ const maxLengthErrorText = activatedLanguage === "en" ? `The text must be ${maxLength} characters or less` : `Texten f\xE5r max vara ${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,12 +1434,11 @@ 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);
1438
1437
  questionGroups.push({
1439
1438
  questionGroupId: groupId,
1440
1439
  questionGroupType: questions2[0].questionGroupType,
1441
1440
  questions: questions2,
1442
- legend: firstVisibleQuestion == null ? void 0 : firstVisibleQuestion.legend
1441
+ legend: questions2[0].legend
1443
1442
  });
1444
1443
  }
1445
1444
  const isVisible = questionGroups.some(
@@ -2846,26 +2845,32 @@ var TextHeadlineAndBodyStandard_default = TextHeadlineAndBody;
2846
2845
  var import_jsx_runtime23 = require("react/jsx-runtime");
2847
2846
  var CONTENT2 = {
2848
2847
  en: {
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:",
2848
+ headline: "The principle of publicity and processing of personal data",
2849
+ paragraph1: "The principle of publicity means that everyone has the right to access public documents from authorities. Since PTS is an authority, the messages you send to us will, as a main rule, be public documents that we will disclose upon request if the information is not covered by confidentiality. The Data Protection Regulation does not prevent personal data in public documents from being disclosed.",
2850
+ paragraph2: "You can find more information about the principle of publicity on the Government's website and more information about PTS processing of personal data on pts.se:",
2853
2851
  links: [
2854
2852
  {
2855
- url: "https://pts.se/en/about-us/processing-of-personal-data/",
2856
- title: "Processing of personal data (opens in new tab)"
2853
+ url: "https://www.regeringen.se/sa-styrs-sverige/grundlagar-och-demokratiskt-deltagande/offentlighetsprincipen/",
2854
+ title: "The principle of publicity (opens in new tab)"
2855
+ },
2856
+ {
2857
+ url: "https://www.pts.se/om-oss/behandling-av-personuppgifter/",
2858
+ title: "PTS processing of personal data (opens in new tab)"
2857
2859
  }
2858
2860
  ]
2859
2861
  },
2860
2862
  sv: {
2861
2863
  headline: "Offentlighetsprincipen och behandling av personuppgifter",
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:",
2864
+ paragraph1: "Offentlighetsprincipen inneb\xE4r att var och en har r\xE4tt att ta del av allm\xE4nna handlingar hos myndigheter. Eftersom PTS \xE4r en myndighet blir de meddelanden du skickar till oss som huvudregel allm\xE4nna handlingar som vi vid en beg\xE4ran kommer att l\xE4mna ut om uppgifterna inte omfattas av sekretess. Dataskyddsf\xF6rordningen hindrar inte att personuppgifter i allm\xE4nna handlingar l\xE4mnas ut.",
2865
+ paragraph2: "Du hittar mer information om offentlighetsprincipen p\xE5 regeringens webbplats och mer information om PTS behandling av personuppgifter p\xE5 pts.se:",
2865
2866
  links: [
2866
2867
  {
2867
- url: "https://www.pts.se/gdpr/",
2868
- title: "Behandling av personuppgifter (\xF6ppnas i ny flik)"
2868
+ url: "https://www.regeringen.se/sa-styrs-sverige/grundlagar-och-demokratiskt-deltagande/offentlighetsprincipen/",
2869
+ title: "Offentlighetsprincipen (\xF6ppnas i ny flik)"
2870
+ },
2871
+ {
2872
+ url: "https://www.pts.se/om-oss/behandling-av-personuppgifter/",
2873
+ title: "PTS behandling av personuppgifter (\xF6ppnas i ny flik)"
2869
2874
  }
2870
2875
  ]
2871
2876
  }
@@ -2877,7 +2882,7 @@ var PrincipleOfPublicity = ({ activatedLanguage = "" }) => {
2877
2882
  {
2878
2883
  data: {
2879
2884
  headline: currentContent.headline,
2880
- body: `<p class="first-paragraph">${currentContent.paragraph1}</p><p>${currentContent.paragraph2}</p><p>${currentContent.paragraph3}</p>`,
2885
+ body: `<p class="first-paragraph">${currentContent.paragraph1}</p><p>${currentContent.paragraph2}</p>`,
2881
2886
  linksForMoreInfo: currentContent.links.map((link) => ({
2882
2887
  url: link.url,
2883
2888
  title: link.title,