optimized-react-component-library-xyz123 2.0.0 → 2.0.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
@@ -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;
@@ -136,7 +142,16 @@ interface IAppSettings {
136
142
  appUsesLanguage: boolean;
137
143
  appUsesNavigation: boolean;
138
144
  appCookies?: IAppSettingsCookies;
145
+ appUsesPreview?: boolean;
139
146
  }
147
+ type INavigationItem = {
148
+ label: {
149
+ sv: string;
150
+ en: string;
151
+ };
152
+ href: string;
153
+ children?: INavigationItem[];
154
+ };
140
155
 
141
156
  interface RadioProps {
142
157
  question: IQuestion;
@@ -145,7 +160,16 @@ interface RadioProps {
145
160
  activatedLanguage?: string;
146
161
  }
147
162
 
148
- declare const InputRadio: FC<RadioProps>;
163
+ declare const InputRadio$1: FC<RadioProps>;
164
+
165
+ interface RadioWithInfoProps {
166
+ question: IQuestion;
167
+ handleQuestionInputChange: any;
168
+ showPreview?: boolean;
169
+ activatedLanguage?: string;
170
+ }
171
+
172
+ declare const InputRadio: FC<RadioWithInfoProps>;
149
173
 
150
174
  interface MultipleCheckboxesProps {
151
175
  question: IQuestion;
@@ -205,6 +229,15 @@ interface SingleCheckboxProps {
205
229
 
206
230
  declare const SingleCheckbox: FC<SingleCheckboxProps>;
207
231
 
232
+ interface InfoOnlyProps {
233
+ question: IQuestion;
234
+ handleQuestionInputChange: any;
235
+ showPreview?: boolean;
236
+ activatedLanguage?: string;
237
+ }
238
+
239
+ declare const InputInfoOnly: FC<InfoOnlyProps>;
240
+
208
241
  /**
209
242
  * Kontrollerar om en fråga har ett valideringsfel baserat på dess egenskaper och valideringstyper.
210
243
  *
@@ -779,6 +812,55 @@ interface HeaderProps {
779
812
 
780
813
  declare const Header: FC<HeaderProps>;
781
814
 
815
+ interface NavigationHeaderProps {
816
+ SetActivatedLanguage?: (language: string) => void;
817
+ headline?: string;
818
+ homelink?: string;
819
+ activatedLanguage?: string;
820
+ useLanguage?: boolean;
821
+ useNavigationMenu: boolean;
822
+ useSearch?: boolean;
823
+ useBreadCrumbs?: boolean;
824
+ showNavigationCloseButton?: boolean;
825
+ menuLinks: INavigationItem[];
826
+ linkComponent?: ElementType;
827
+ }
828
+
829
+ declare const NavigationHeader: FC<NavigationHeaderProps>;
830
+
831
+ interface NavigationProps {
832
+ setIsMenyOpen?: (open: boolean) => void;
833
+ showCloseButton?: boolean;
834
+ activatedLanguage?: string;
835
+ menuLinks?: INavigationLink[];
836
+ isOpen: boolean;
837
+ openButtonRef: RefObject<HTMLButtonElement | null>;
838
+ linkComponent?: ElementType;
839
+ }
840
+ type Locale = 'sv' | 'en';
841
+ type Label = Record<Locale, string>;
842
+ interface INavigationLink {
843
+ label: Label;
844
+ href: string;
845
+ children?: INavigationLink[];
846
+ openInNewWindow?: boolean;
847
+ }
848
+
849
+ declare const Navigation: FC<NavigationProps>;
850
+
851
+ interface BreadCrumbsProps {
852
+ activatedLanguage: string;
853
+ onLinkClick?: (e: React.MouseEvent) => void;
854
+ }
855
+
856
+ declare const BreadCrumbs: FC<BreadCrumbsProps>;
857
+
858
+ interface SearchBarProps {
859
+ activatedLanguage: string;
860
+ }
861
+
862
+ declare const SearchBar: FC<SearchBarProps>;
863
+
782
864
  interface ModalProps {
783
865
  showModal: boolean;
784
866
  activatedLanguage?: string;
@@ -791,6 +873,35 @@ type SkipLinkProps = {
791
873
  };
792
874
  declare const SkipLink: FC<SkipLinkProps>;
793
875
 
876
+ interface LinkProps extends IPTSLink {
877
+ customClass?: string;
878
+ openTarget?: string;
879
+ useDownLoad?: boolean;
880
+ linkComponent?: ElementType;
881
+ }
882
+
883
+ declare const LinkStandard: FC<LinkProps>;
884
+
885
+ interface LinkListProps {
886
+ linkArray: IPTSLink[];
887
+ activatedLanguage?: string;
888
+ customCss?: string;
889
+ linkComponent?: ElementType;
890
+ }
891
+
892
+ declare const LinkList: FC<LinkListProps>;
893
+
894
+ interface CollapseProps {
895
+ title: ReactNode;
896
+ children: ReactNode;
897
+ isOpen?: boolean;
898
+ defaultOpen?: boolean;
899
+ onToggle?: (open: boolean) => void;
900
+ id?: string;
901
+ }
902
+
903
+ declare const Collapse: FC<CollapseProps>;
904
+
794
905
  interface PrincipleOfPublicityProps {
795
906
  activatedLanguage?: string;
796
907
  }
@@ -897,4 +1008,4 @@ interface FormStatusMessagesProps {
897
1008
  */
898
1009
  declare const FormStatusMessagesScreenReader: React$1.FC<FormStatusMessagesProps>;
899
1010
 
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 };
1011
+ 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;
@@ -136,7 +142,16 @@ interface IAppSettings {
136
142
  appUsesLanguage: boolean;
137
143
  appUsesNavigation: boolean;
138
144
  appCookies?: IAppSettingsCookies;
145
+ appUsesPreview?: boolean;
139
146
  }
147
+ type INavigationItem = {
148
+ label: {
149
+ sv: string;
150
+ en: string;
151
+ };
152
+ href: string;
153
+ children?: INavigationItem[];
154
+ };
140
155
 
141
156
  interface RadioProps {
142
157
  question: IQuestion;
@@ -145,7 +160,16 @@ interface RadioProps {
145
160
  activatedLanguage?: string;
146
161
  }
147
162
 
148
- declare const InputRadio: FC<RadioProps>;
163
+ declare const InputRadio$1: FC<RadioProps>;
164
+
165
+ interface RadioWithInfoProps {
166
+ question: IQuestion;
167
+ handleQuestionInputChange: any;
168
+ showPreview?: boolean;
169
+ activatedLanguage?: string;
170
+ }
171
+
172
+ declare const InputRadio: FC<RadioWithInfoProps>;
149
173
 
150
174
  interface MultipleCheckboxesProps {
151
175
  question: IQuestion;
@@ -205,6 +229,15 @@ interface SingleCheckboxProps {
205
229
 
206
230
  declare const SingleCheckbox: FC<SingleCheckboxProps>;
207
231
 
232
+ interface InfoOnlyProps {
233
+ question: IQuestion;
234
+ handleQuestionInputChange: any;
235
+ showPreview?: boolean;
236
+ activatedLanguage?: string;
237
+ }
238
+
239
+ declare const InputInfoOnly: FC<InfoOnlyProps>;
240
+
208
241
  /**
209
242
  * Kontrollerar om en fråga har ett valideringsfel baserat på dess egenskaper och valideringstyper.
210
243
  *
@@ -779,6 +812,55 @@ interface HeaderProps {
779
812
 
780
813
  declare const Header: FC<HeaderProps>;
781
814
 
815
+ interface NavigationHeaderProps {
816
+ SetActivatedLanguage?: (language: string) => void;
817
+ headline?: string;
818
+ homelink?: string;
819
+ activatedLanguage?: string;
820
+ useLanguage?: boolean;
821
+ useNavigationMenu: boolean;
822
+ useSearch?: boolean;
823
+ useBreadCrumbs?: boolean;
824
+ showNavigationCloseButton?: boolean;
825
+ menuLinks: INavigationItem[];
826
+ linkComponent?: ElementType;
827
+ }
828
+
829
+ declare const NavigationHeader: FC<NavigationHeaderProps>;
830
+
831
+ interface NavigationProps {
832
+ setIsMenyOpen?: (open: boolean) => void;
833
+ showCloseButton?: boolean;
834
+ activatedLanguage?: string;
835
+ menuLinks?: INavigationLink[];
836
+ isOpen: boolean;
837
+ openButtonRef: RefObject<HTMLButtonElement | null>;
838
+ linkComponent?: ElementType;
839
+ }
840
+ type Locale = 'sv' | 'en';
841
+ type Label = Record<Locale, string>;
842
+ interface INavigationLink {
843
+ label: Label;
844
+ href: string;
845
+ children?: INavigationLink[];
846
+ openInNewWindow?: boolean;
847
+ }
848
+
849
+ declare const Navigation: FC<NavigationProps>;
850
+
851
+ interface BreadCrumbsProps {
852
+ activatedLanguage: string;
853
+ onLinkClick?: (e: React.MouseEvent) => void;
854
+ }
855
+
856
+ declare const BreadCrumbs: FC<BreadCrumbsProps>;
857
+
858
+ interface SearchBarProps {
859
+ activatedLanguage: string;
860
+ }
861
+
862
+ declare const SearchBar: FC<SearchBarProps>;
863
+
782
864
  interface ModalProps {
783
865
  showModal: boolean;
784
866
  activatedLanguage?: string;
@@ -791,6 +873,35 @@ type SkipLinkProps = {
791
873
  };
792
874
  declare const SkipLink: FC<SkipLinkProps>;
793
875
 
876
+ interface LinkProps extends IPTSLink {
877
+ customClass?: string;
878
+ openTarget?: string;
879
+ useDownLoad?: boolean;
880
+ linkComponent?: ElementType;
881
+ }
882
+
883
+ declare const LinkStandard: FC<LinkProps>;
884
+
885
+ interface LinkListProps {
886
+ linkArray: IPTSLink[];
887
+ activatedLanguage?: string;
888
+ customCss?: string;
889
+ linkComponent?: ElementType;
890
+ }
891
+
892
+ declare const LinkList: FC<LinkListProps>;
893
+
894
+ interface CollapseProps {
895
+ title: ReactNode;
896
+ children: ReactNode;
897
+ isOpen?: boolean;
898
+ defaultOpen?: boolean;
899
+ onToggle?: (open: boolean) => void;
900
+ id?: string;
901
+ }
902
+
903
+ declare const Collapse: FC<CollapseProps>;
904
+
794
905
  interface PrincipleOfPublicityProps {
795
906
  activatedLanguage?: string;
796
907
  }
@@ -897,4 +1008,4 @@ interface FormStatusMessagesProps {
897
1008
  */
898
1009
  declare const FormStatusMessagesScreenReader: React$1.FC<FormStatusMessagesProps>;
899
1010
 
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 };
1011
+ 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 };