optimized-react-component-library-xyz123 2.0.0 → 2.0.1

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
@@ -1,4 +1,4 @@
1
- import React$1, { FC } from 'react';
1
+ import React$1, { ComponentType, SVGProps, FC, ElementType, RefObject, ReactNode } from 'react';
2
2
  import * as reselect from 'reselect';
3
3
  import * as _reduxjs_toolkit from '@reduxjs/toolkit';
4
4
  import { PayloadAction, ActionReducerMapBuilder } from '@reduxjs/toolkit';
@@ -8,6 +8,7 @@ interface IApplicationContent {
8
8
  headline?: string;
9
9
  body?: string;
10
10
  linksForMoreInfo?: Array<IPTSLink>;
11
+ alertInTextList?: Array<any>;
11
12
  pageTitle?: string;
12
13
  textblocks?: Array<ITextBlock>;
13
14
  textAboveStartButton?: string;
@@ -28,6 +29,7 @@ interface ITextBlock {
28
29
  headline?: string;
29
30
  body?: string;
30
31
  linksForMoreInfo?: Array<IPTSLink>;
32
+ alertInTextList?: Array<any>;
31
33
  pageTitle?: string;
32
34
  textAboveStartButton?: string;
33
35
  }
@@ -46,7 +48,11 @@ interface IOption {
46
48
  interface IPTSLink {
47
49
  title: string;
48
50
  url: string;
49
- ariaLabel: string;
51
+ ariaLabel?: string;
52
+ activatedLanguage?: string;
53
+ openTarget?: string;
54
+ icon?: ComponentType<SVGProps<SVGSVGElement>>;
55
+ iconType?: string;
50
56
  }
51
57
  interface IStepObject {
52
58
  step: number;
@@ -137,6 +143,14 @@ interface IAppSettings {
137
143
  appUsesNavigation: boolean;
138
144
  appCookies?: IAppSettingsCookies;
139
145
  }
146
+ type INavigationItem = {
147
+ label: {
148
+ sv: string;
149
+ en: string;
150
+ };
151
+ href: string;
152
+ children?: INavigationItem[];
153
+ };
140
154
 
141
155
  interface RadioProps {
142
156
  question: IQuestion;
@@ -145,7 +159,16 @@ interface RadioProps {
145
159
  activatedLanguage?: string;
146
160
  }
147
161
 
148
- declare const InputRadio: FC<RadioProps>;
162
+ declare const InputRadio$1: FC<RadioProps>;
163
+
164
+ interface RadioWithInfoProps {
165
+ question: IQuestion;
166
+ handleQuestionInputChange: any;
167
+ showPreview?: boolean;
168
+ activatedLanguage?: string;
169
+ }
170
+
171
+ declare const InputRadio: FC<RadioWithInfoProps>;
149
172
 
150
173
  interface MultipleCheckboxesProps {
151
174
  question: IQuestion;
@@ -205,6 +228,15 @@ interface SingleCheckboxProps {
205
228
 
206
229
  declare const SingleCheckbox: FC<SingleCheckboxProps>;
207
230
 
231
+ interface InfoOnlyProps {
232
+ question: IQuestion;
233
+ handleQuestionInputChange: any;
234
+ showPreview?: boolean;
235
+ activatedLanguage?: string;
236
+ }
237
+
238
+ declare const InputInfoOnly: FC<InfoOnlyProps>;
239
+
208
240
  /**
209
241
  * Kontrollerar om en fråga har ett valideringsfel baserat på dess egenskaper och valideringstyper.
210
242
  *
@@ -779,6 +811,55 @@ interface HeaderProps {
779
811
 
780
812
  declare const Header: FC<HeaderProps>;
781
813
 
814
+ interface NavigationHeaderProps {
815
+ SetActivatedLanguage?: (language: string) => void;
816
+ headline?: string;
817
+ homelink?: string;
818
+ activatedLanguage?: string;
819
+ useLanguage?: boolean;
820
+ useNavigationMenu: boolean;
821
+ useSearch?: boolean;
822
+ useBreadCrumbs?: boolean;
823
+ showNavigationCloseButton?: boolean;
824
+ menuLinks: INavigationItem[];
825
+ linkComponent?: ElementType;
826
+ }
827
+
828
+ declare const NavigationHeader: FC<NavigationHeaderProps>;
829
+
830
+ interface NavigationProps {
831
+ setIsMenyOpen?: (open: boolean) => void;
832
+ showCloseButton?: boolean;
833
+ activatedLanguage?: string;
834
+ menuLinks?: INavigationLink[];
835
+ isOpen: boolean;
836
+ openButtonRef: RefObject<HTMLButtonElement | null>;
837
+ linkComponent?: ElementType;
838
+ }
839
+ type Locale = 'sv' | 'en';
840
+ type Label = Record<Locale, string>;
841
+ interface INavigationLink {
842
+ label: Label;
843
+ href: string;
844
+ children?: INavigationLink[];
845
+ openInNewWindow?: boolean;
846
+ }
847
+
848
+ declare const Navigation: FC<NavigationProps>;
849
+
850
+ interface BreadCrumbsProps {
851
+ activatedLanguage: string;
852
+ onLinkClick?: (e: React.MouseEvent) => void;
853
+ }
854
+
855
+ declare const BreadCrumbs: FC<BreadCrumbsProps>;
856
+
857
+ interface SearchBarProps {
858
+ activatedLanguage: string;
859
+ }
860
+
861
+ declare const SearchBar: FC<SearchBarProps>;
862
+
782
863
  interface ModalProps {
783
864
  showModal: boolean;
784
865
  activatedLanguage?: string;
@@ -791,6 +872,35 @@ type SkipLinkProps = {
791
872
  };
792
873
  declare const SkipLink: FC<SkipLinkProps>;
793
874
 
875
+ interface LinkProps extends IPTSLink {
876
+ customClass?: string;
877
+ openTarget?: string;
878
+ useDownLoad?: boolean;
879
+ linkComponent?: ElementType;
880
+ }
881
+
882
+ declare const LinkStandard: FC<LinkProps>;
883
+
884
+ interface LinkListProps {
885
+ linkArray: IPTSLink[];
886
+ activatedLanguage?: string;
887
+ customCss?: string;
888
+ linkComponent?: ElementType;
889
+ }
890
+
891
+ declare const LinkList: FC<LinkListProps>;
892
+
893
+ interface CollapseProps {
894
+ title: ReactNode;
895
+ children: ReactNode;
896
+ isOpen?: boolean;
897
+ defaultOpen?: boolean;
898
+ onToggle?: (open: boolean) => void;
899
+ id?: string;
900
+ }
901
+
902
+ declare const Collapse: FC<CollapseProps>;
903
+
794
904
  interface PrincipleOfPublicityProps {
795
905
  activatedLanguage?: string;
796
906
  }
@@ -897,4 +1007,4 @@ interface FormStatusMessagesProps {
897
1007
  */
898
1008
  declare const FormStatusMessagesScreenReader: React$1.FC<FormStatusMessagesProps>;
899
1009
 
900
- export { AddFiles as AddFilesStandard, CheckboxGroup as CheckboxGroupStandard, CookieBanner, type CookieConsentConfig, EditPreviewLink as EditPreviewLinkStandard, Footer as FooterStandard, FormStatusMessagesScreenReader, Header as HeaderStandard, type IAppSettings, type IAppSettingsCookies, type IApplicationContent, type IFormState, type IOption, type IPTSLink, type IQuestion, type IQuestionExtraAttribute, type IStepObject, type IStepQuestionData, type ITextBlock, type LanguageSupportConfig, Modal as ModalStandard, MultipleCheckboxes as MultipleCheckboxesStandard, PrincipleOfPublicity as PrincipleOfPublicityStandard, QuestionGroup, QuestionRenderer, InputRadio as RadioMultipleStandard, SingleCheckbox as SingleCheckboxStandard, SkipLink as SkipLinkStandard, StartApplicationButton, StepperButtons as StepperButtonsStandard, Stepper as StepperStandard, InputTextarea as TextAreaStandard, TextBody, TextFieldStandard, ValidationErrorSummaryList, buildStepCategoryGroupQuestionStructure, createApiDataObject, createCookieConsent, createFormSlice, createGlobalLanguageSlice, createGlobalLanguageSlice as createLanguageSlice, createFormSlice as createQuestionsSlice, findVisibleQuestionsWithValidationErrors, focusElement, getGroupCheckIds, hasQuestionValidationError, isQuestionDependencySatisfied, isScriptLoaded, makeFormSelectors, makeglobalLanguageSelectors as makeLanguageSelectors, makeFormSelectors as makeQuestionsSelectors, makeglobalLanguageSelectors, preparePreviewData, removeScriptById, toggleScriptByConsent, updateQuestionsAndCategoriesVisibilityAndErrors, useCookieConsent, useFormStatusModal, useInputMethodDetection, usePTSPageTitle };
1010
+ export { AddFiles as AddFilesStandard, BreadCrumbs, BreadCrumbs as BreadcrumbsAdaptive, CheckboxGroup as CheckboxGroupStandard, Collapse, CookieBanner, type CookieConsentConfig, EditPreviewLink as EditPreviewLinkStandard, Footer as FooterStandard, FormStatusMessagesScreenReader, Header as HeaderStandard, type IAppSettings, type IAppSettingsCookies, type IApplicationContent, type IFormState, type IOption, type IPTSLink, type IQuestion, type IQuestionExtraAttribute, type IStepObject, type IStepQuestionData, type ITextBlock, InputInfoOnly as InfoOnlyStandard, type LanguageSupportConfig, LinkList as LinkListStandard, LinkStandard, Modal as ModalStandard, MultipleCheckboxes as MultipleCheckboxesStandard, Navigation, NavigationHeader, PrincipleOfPublicity as PrincipleOfPublicityStandard, QuestionGroup, QuestionRenderer, InputRadio$1 as RadioMultipleStandard, InputRadio as RadioWithInfoStandard, SearchBar, SingleCheckbox as SingleCheckboxStandard, SkipLink as SkipLinkStandard, StartApplicationButton, StepperButtons as StepperButtonsStandard, Stepper as StepperStandard, InputTextarea as TextAreaStandard, TextBody, TextFieldStandard, ValidationErrorSummaryList, buildStepCategoryGroupQuestionStructure, createApiDataObject, createCookieConsent, createFormSlice, createGlobalLanguageSlice, createGlobalLanguageSlice as createLanguageSlice, createFormSlice as createQuestionsSlice, findVisibleQuestionsWithValidationErrors, focusElement, getGroupCheckIds, hasQuestionValidationError, isQuestionDependencySatisfied, isScriptLoaded, makeFormSelectors, makeglobalLanguageSelectors as makeLanguageSelectors, makeFormSelectors as makeQuestionsSelectors, makeglobalLanguageSelectors, preparePreviewData, removeScriptById, toggleScriptByConsent, updateQuestionsAndCategoriesVisibilityAndErrors, useCookieConsent, useFormStatusModal, useInputMethodDetection, usePTSPageTitle };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import React$1, { FC } from 'react';
1
+ import React$1, { ComponentType, SVGProps, FC, ElementType, RefObject, ReactNode } from 'react';
2
2
  import * as reselect from 'reselect';
3
3
  import * as _reduxjs_toolkit from '@reduxjs/toolkit';
4
4
  import { PayloadAction, ActionReducerMapBuilder } from '@reduxjs/toolkit';
@@ -8,6 +8,7 @@ interface IApplicationContent {
8
8
  headline?: string;
9
9
  body?: string;
10
10
  linksForMoreInfo?: Array<IPTSLink>;
11
+ alertInTextList?: Array<any>;
11
12
  pageTitle?: string;
12
13
  textblocks?: Array<ITextBlock>;
13
14
  textAboveStartButton?: string;
@@ -28,6 +29,7 @@ interface ITextBlock {
28
29
  headline?: string;
29
30
  body?: string;
30
31
  linksForMoreInfo?: Array<IPTSLink>;
32
+ alertInTextList?: Array<any>;
31
33
  pageTitle?: string;
32
34
  textAboveStartButton?: string;
33
35
  }
@@ -46,7 +48,11 @@ interface IOption {
46
48
  interface IPTSLink {
47
49
  title: string;
48
50
  url: string;
49
- ariaLabel: string;
51
+ ariaLabel?: string;
52
+ activatedLanguage?: string;
53
+ openTarget?: string;
54
+ icon?: ComponentType<SVGProps<SVGSVGElement>>;
55
+ iconType?: string;
50
56
  }
51
57
  interface IStepObject {
52
58
  step: number;
@@ -137,6 +143,14 @@ interface IAppSettings {
137
143
  appUsesNavigation: boolean;
138
144
  appCookies?: IAppSettingsCookies;
139
145
  }
146
+ type INavigationItem = {
147
+ label: {
148
+ sv: string;
149
+ en: string;
150
+ };
151
+ href: string;
152
+ children?: INavigationItem[];
153
+ };
140
154
 
141
155
  interface RadioProps {
142
156
  question: IQuestion;
@@ -145,7 +159,16 @@ interface RadioProps {
145
159
  activatedLanguage?: string;
146
160
  }
147
161
 
148
- declare const InputRadio: FC<RadioProps>;
162
+ declare const InputRadio$1: FC<RadioProps>;
163
+
164
+ interface RadioWithInfoProps {
165
+ question: IQuestion;
166
+ handleQuestionInputChange: any;
167
+ showPreview?: boolean;
168
+ activatedLanguage?: string;
169
+ }
170
+
171
+ declare const InputRadio: FC<RadioWithInfoProps>;
149
172
 
150
173
  interface MultipleCheckboxesProps {
151
174
  question: IQuestion;
@@ -205,6 +228,15 @@ interface SingleCheckboxProps {
205
228
 
206
229
  declare const SingleCheckbox: FC<SingleCheckboxProps>;
207
230
 
231
+ interface InfoOnlyProps {
232
+ question: IQuestion;
233
+ handleQuestionInputChange: any;
234
+ showPreview?: boolean;
235
+ activatedLanguage?: string;
236
+ }
237
+
238
+ declare const InputInfoOnly: FC<InfoOnlyProps>;
239
+
208
240
  /**
209
241
  * Kontrollerar om en fråga har ett valideringsfel baserat på dess egenskaper och valideringstyper.
210
242
  *
@@ -779,6 +811,55 @@ interface HeaderProps {
779
811
 
780
812
  declare const Header: FC<HeaderProps>;
781
813
 
814
+ interface NavigationHeaderProps {
815
+ SetActivatedLanguage?: (language: string) => void;
816
+ headline?: string;
817
+ homelink?: string;
818
+ activatedLanguage?: string;
819
+ useLanguage?: boolean;
820
+ useNavigationMenu: boolean;
821
+ useSearch?: boolean;
822
+ useBreadCrumbs?: boolean;
823
+ showNavigationCloseButton?: boolean;
824
+ menuLinks: INavigationItem[];
825
+ linkComponent?: ElementType;
826
+ }
827
+
828
+ declare const NavigationHeader: FC<NavigationHeaderProps>;
829
+
830
+ interface NavigationProps {
831
+ setIsMenyOpen?: (open: boolean) => void;
832
+ showCloseButton?: boolean;
833
+ activatedLanguage?: string;
834
+ menuLinks?: INavigationLink[];
835
+ isOpen: boolean;
836
+ openButtonRef: RefObject<HTMLButtonElement | null>;
837
+ linkComponent?: ElementType;
838
+ }
839
+ type Locale = 'sv' | 'en';
840
+ type Label = Record<Locale, string>;
841
+ interface INavigationLink {
842
+ label: Label;
843
+ href: string;
844
+ children?: INavigationLink[];
845
+ openInNewWindow?: boolean;
846
+ }
847
+
848
+ declare const Navigation: FC<NavigationProps>;
849
+
850
+ interface BreadCrumbsProps {
851
+ activatedLanguage: string;
852
+ onLinkClick?: (e: React.MouseEvent) => void;
853
+ }
854
+
855
+ declare const BreadCrumbs: FC<BreadCrumbsProps>;
856
+
857
+ interface SearchBarProps {
858
+ activatedLanguage: string;
859
+ }
860
+
861
+ declare const SearchBar: FC<SearchBarProps>;
862
+
782
863
  interface ModalProps {
783
864
  showModal: boolean;
784
865
  activatedLanguage?: string;
@@ -791,6 +872,35 @@ type SkipLinkProps = {
791
872
  };
792
873
  declare const SkipLink: FC<SkipLinkProps>;
793
874
 
875
+ interface LinkProps extends IPTSLink {
876
+ customClass?: string;
877
+ openTarget?: string;
878
+ useDownLoad?: boolean;
879
+ linkComponent?: ElementType;
880
+ }
881
+
882
+ declare const LinkStandard: FC<LinkProps>;
883
+
884
+ interface LinkListProps {
885
+ linkArray: IPTSLink[];
886
+ activatedLanguage?: string;
887
+ customCss?: string;
888
+ linkComponent?: ElementType;
889
+ }
890
+
891
+ declare const LinkList: FC<LinkListProps>;
892
+
893
+ interface CollapseProps {
894
+ title: ReactNode;
895
+ children: ReactNode;
896
+ isOpen?: boolean;
897
+ defaultOpen?: boolean;
898
+ onToggle?: (open: boolean) => void;
899
+ id?: string;
900
+ }
901
+
902
+ declare const Collapse: FC<CollapseProps>;
903
+
794
904
  interface PrincipleOfPublicityProps {
795
905
  activatedLanguage?: string;
796
906
  }
@@ -897,4 +1007,4 @@ interface FormStatusMessagesProps {
897
1007
  */
898
1008
  declare const FormStatusMessagesScreenReader: React$1.FC<FormStatusMessagesProps>;
899
1009
 
900
- export { AddFiles as AddFilesStandard, CheckboxGroup as CheckboxGroupStandard, CookieBanner, type CookieConsentConfig, EditPreviewLink as EditPreviewLinkStandard, Footer as FooterStandard, FormStatusMessagesScreenReader, Header as HeaderStandard, type IAppSettings, type IAppSettingsCookies, type IApplicationContent, type IFormState, type IOption, type IPTSLink, type IQuestion, type IQuestionExtraAttribute, type IStepObject, type IStepQuestionData, type ITextBlock, type LanguageSupportConfig, Modal as ModalStandard, MultipleCheckboxes as MultipleCheckboxesStandard, PrincipleOfPublicity as PrincipleOfPublicityStandard, QuestionGroup, QuestionRenderer, InputRadio as RadioMultipleStandard, SingleCheckbox as SingleCheckboxStandard, SkipLink as SkipLinkStandard, StartApplicationButton, StepperButtons as StepperButtonsStandard, Stepper as StepperStandard, InputTextarea as TextAreaStandard, TextBody, TextFieldStandard, ValidationErrorSummaryList, buildStepCategoryGroupQuestionStructure, createApiDataObject, createCookieConsent, createFormSlice, createGlobalLanguageSlice, createGlobalLanguageSlice as createLanguageSlice, createFormSlice as createQuestionsSlice, findVisibleQuestionsWithValidationErrors, focusElement, getGroupCheckIds, hasQuestionValidationError, isQuestionDependencySatisfied, isScriptLoaded, makeFormSelectors, makeglobalLanguageSelectors as makeLanguageSelectors, makeFormSelectors as makeQuestionsSelectors, makeglobalLanguageSelectors, preparePreviewData, removeScriptById, toggleScriptByConsent, updateQuestionsAndCategoriesVisibilityAndErrors, useCookieConsent, useFormStatusModal, useInputMethodDetection, usePTSPageTitle };
1010
+ export { AddFiles as AddFilesStandard, BreadCrumbs, BreadCrumbs as BreadcrumbsAdaptive, CheckboxGroup as CheckboxGroupStandard, Collapse, CookieBanner, type CookieConsentConfig, EditPreviewLink as EditPreviewLinkStandard, Footer as FooterStandard, FormStatusMessagesScreenReader, Header as HeaderStandard, type IAppSettings, type IAppSettingsCookies, type IApplicationContent, type IFormState, type IOption, type IPTSLink, type IQuestion, type IQuestionExtraAttribute, type IStepObject, type IStepQuestionData, type ITextBlock, InputInfoOnly as InfoOnlyStandard, type LanguageSupportConfig, LinkList as LinkListStandard, LinkStandard, Modal as ModalStandard, MultipleCheckboxes as MultipleCheckboxesStandard, Navigation, NavigationHeader, PrincipleOfPublicity as PrincipleOfPublicityStandard, QuestionGroup, QuestionRenderer, InputRadio$1 as RadioMultipleStandard, InputRadio as RadioWithInfoStandard, SearchBar, SingleCheckbox as SingleCheckboxStandard, SkipLink as SkipLinkStandard, StartApplicationButton, StepperButtons as StepperButtonsStandard, Stepper as StepperStandard, InputTextarea as TextAreaStandard, TextBody, TextFieldStandard, ValidationErrorSummaryList, buildStepCategoryGroupQuestionStructure, createApiDataObject, createCookieConsent, createFormSlice, createGlobalLanguageSlice, createGlobalLanguageSlice as createLanguageSlice, createFormSlice as createQuestionsSlice, findVisibleQuestionsWithValidationErrors, focusElement, getGroupCheckIds, hasQuestionValidationError, isQuestionDependencySatisfied, isScriptLoaded, makeFormSelectors, makeglobalLanguageSelectors as makeLanguageSelectors, makeFormSelectors as makeQuestionsSelectors, makeglobalLanguageSelectors, preparePreviewData, removeScriptById, toggleScriptByConsent, updateQuestionsAndCategoriesVisibilityAndErrors, useCookieConsent, useFormStatusModal, useInputMethodDetection, usePTSPageTitle };