optimized-react-component-library-xyz123 2.2.2 → 2.2.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 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,7 +8,6 @@ interface IApplicationContent {
8
8
  headline?: string;
9
9
  body?: string;
10
10
  linksForMoreInfo?: Array<IPTSLink>;
11
- alertInTextList?: Array<any>;
12
11
  pageTitle?: string;
13
12
  textblocks?: Array<ITextBlock>;
14
13
  textAboveStartButton?: string;
@@ -29,7 +28,6 @@ interface ITextBlock {
29
28
  headline?: string;
30
29
  body?: string;
31
30
  linksForMoreInfo?: Array<IPTSLink>;
32
- alertInTextList?: Array<any>;
33
31
  pageTitle?: string;
34
32
  textAboveStartButton?: string;
35
33
  }
@@ -49,6 +47,10 @@ interface IPTSLink {
49
47
  title: string;
50
48
  url: string;
51
49
  ariaLabel?: string;
50
+ activatedLanguage?: string;
51
+ openTarget?: string;
52
+ icon?: ComponentType<SVGProps<SVGSVGElement>>;
53
+ iconType?: string;
52
54
  }
53
55
  interface IStepObject {
54
56
  step: number;
@@ -138,8 +140,15 @@ interface IAppSettings {
138
140
  appUsesLanguage: boolean;
139
141
  appUsesNavigation: boolean;
140
142
  appCookies?: IAppSettingsCookies;
141
- appUsesPreview?: boolean;
142
143
  }
144
+ type INavigationItem = {
145
+ label: {
146
+ sv: string;
147
+ en: string;
148
+ };
149
+ href: string;
150
+ children?: INavigationItem[];
151
+ };
143
152
 
144
153
  interface RadioProps {
145
154
  question: IQuestion;
@@ -782,6 +791,54 @@ interface HeaderProps {
782
791
 
783
792
  declare const Header: FC<HeaderProps>;
784
793
 
794
+ interface NavigationHeaderProps {
795
+ SetActivatedLanguage?: (language: string) => void;
796
+ headline?: string;
797
+ homelink?: string;
798
+ activatedLanguage?: string;
799
+ useLanguage?: boolean;
800
+ useNavigationMenu: boolean;
801
+ useSearch?: boolean;
802
+ useBreadCrumbs?: boolean;
803
+ menuLinks: INavigationItem[];
804
+ linkComponent?: ElementType;
805
+ noLogoLink?: boolean;
806
+ }
807
+
808
+ declare const NavigationHeader: FC<NavigationHeaderProps>;
809
+
810
+ interface NavigationProps {
811
+ setIsMenyOpen?: (open: boolean) => void;
812
+ activatedLanguage?: string;
813
+ menuLinks?: INavigationLink[];
814
+ isOpen: boolean;
815
+ openButtonRef: RefObject<HTMLButtonElement | null>;
816
+ linkComponent?: ElementType;
817
+ }
818
+ type Locale = 'sv' | 'en';
819
+ type Label = Record<Locale, string>;
820
+ interface INavigationLink {
821
+ label: Label;
822
+ href: string;
823
+ children?: INavigationLink[];
824
+ openInNewWindow?: boolean;
825
+ }
826
+
827
+ declare const Navigation: FC<NavigationProps>;
828
+
829
+ interface BreadCrumbsProps {
830
+ activatedLanguage: string;
831
+ onLinkClick?: (e: React.MouseEvent) => void;
832
+ }
833
+
834
+ declare const BreadCrumbs: FC<BreadCrumbsProps>;
835
+
836
+ interface SearchBarProps {
837
+ activatedLanguage: string;
838
+ }
839
+
840
+ declare const SearchBar: FC<SearchBarProps>;
841
+
785
842
  interface ModalProps {
786
843
  showModal: boolean;
787
844
  activatedLanguage?: string;
@@ -794,12 +851,36 @@ type SkipLinkProps = {
794
851
  };
795
852
  declare const SkipLink: FC<SkipLinkProps>;
796
853
 
797
- interface AlertInTextProps {
798
- type?: string;
799
- content: string;
854
+ interface LinkProps extends IPTSLink {
855
+ customClass?: string;
856
+ openTarget?: string;
857
+ useDownLoad?: boolean;
858
+ linkComponent?: ElementType;
859
+ }
860
+
861
+ declare const LinkStandard: FC<LinkProps>;
862
+
863
+ interface LinkListProps {
864
+ linkArray: IPTSLink[];
865
+ activatedLanguage?: string;
866
+ customCss?: string;
867
+ linkComponent?: ElementType;
868
+ }
869
+
870
+ declare const LinkList: FC<LinkListProps>;
871
+
872
+ interface CollapseProps {
873
+ title: ReactNode;
874
+ children: ReactNode;
875
+ isOpen?: boolean;
876
+ defaultOpen?: boolean;
877
+ onToggle?: (open: boolean) => void;
878
+ id?: string;
879
+ activatedLanguage?: string;
880
+ customClass?: string;
800
881
  }
801
882
 
802
- declare const AlertInTextStandard: FC<AlertInTextProps>;
883
+ declare const Collapse: FC<CollapseProps>;
803
884
 
804
885
  interface PrincipleOfPublicityProps {
805
886
  activatedLanguage?: string;
@@ -907,4 +988,4 @@ interface FormStatusMessagesProps {
907
988
  */
908
989
  declare const FormStatusMessagesScreenReader: React$1.FC<FormStatusMessagesProps>;
909
990
 
910
- export { AddFiles as AddFilesStandard, AlertInTextStandard, 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 };
991
+ 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, type LanguageSupportConfig, LinkList as LinkListStandard, LinkStandard, Modal as ModalStandard, MultipleCheckboxes as MultipleCheckboxesStandard, Navigation, NavigationHeader, PrincipleOfPublicity as PrincipleOfPublicityStandard, QuestionGroup, QuestionRenderer, InputRadio as RadioMultipleStandard, 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,7 +8,6 @@ interface IApplicationContent {
8
8
  headline?: string;
9
9
  body?: string;
10
10
  linksForMoreInfo?: Array<IPTSLink>;
11
- alertInTextList?: Array<any>;
12
11
  pageTitle?: string;
13
12
  textblocks?: Array<ITextBlock>;
14
13
  textAboveStartButton?: string;
@@ -29,7 +28,6 @@ interface ITextBlock {
29
28
  headline?: string;
30
29
  body?: string;
31
30
  linksForMoreInfo?: Array<IPTSLink>;
32
- alertInTextList?: Array<any>;
33
31
  pageTitle?: string;
34
32
  textAboveStartButton?: string;
35
33
  }
@@ -49,6 +47,10 @@ interface IPTSLink {
49
47
  title: string;
50
48
  url: string;
51
49
  ariaLabel?: string;
50
+ activatedLanguage?: string;
51
+ openTarget?: string;
52
+ icon?: ComponentType<SVGProps<SVGSVGElement>>;
53
+ iconType?: string;
52
54
  }
53
55
  interface IStepObject {
54
56
  step: number;
@@ -138,8 +140,15 @@ interface IAppSettings {
138
140
  appUsesLanguage: boolean;
139
141
  appUsesNavigation: boolean;
140
142
  appCookies?: IAppSettingsCookies;
141
- appUsesPreview?: boolean;
142
143
  }
144
+ type INavigationItem = {
145
+ label: {
146
+ sv: string;
147
+ en: string;
148
+ };
149
+ href: string;
150
+ children?: INavigationItem[];
151
+ };
143
152
 
144
153
  interface RadioProps {
145
154
  question: IQuestion;
@@ -782,6 +791,54 @@ interface HeaderProps {
782
791
 
783
792
  declare const Header: FC<HeaderProps>;
784
793
 
794
+ interface NavigationHeaderProps {
795
+ SetActivatedLanguage?: (language: string) => void;
796
+ headline?: string;
797
+ homelink?: string;
798
+ activatedLanguage?: string;
799
+ useLanguage?: boolean;
800
+ useNavigationMenu: boolean;
801
+ useSearch?: boolean;
802
+ useBreadCrumbs?: boolean;
803
+ menuLinks: INavigationItem[];
804
+ linkComponent?: ElementType;
805
+ noLogoLink?: boolean;
806
+ }
807
+
808
+ declare const NavigationHeader: FC<NavigationHeaderProps>;
809
+
810
+ interface NavigationProps {
811
+ setIsMenyOpen?: (open: boolean) => void;
812
+ activatedLanguage?: string;
813
+ menuLinks?: INavigationLink[];
814
+ isOpen: boolean;
815
+ openButtonRef: RefObject<HTMLButtonElement | null>;
816
+ linkComponent?: ElementType;
817
+ }
818
+ type Locale = 'sv' | 'en';
819
+ type Label = Record<Locale, string>;
820
+ interface INavigationLink {
821
+ label: Label;
822
+ href: string;
823
+ children?: INavigationLink[];
824
+ openInNewWindow?: boolean;
825
+ }
826
+
827
+ declare const Navigation: FC<NavigationProps>;
828
+
829
+ interface BreadCrumbsProps {
830
+ activatedLanguage: string;
831
+ onLinkClick?: (e: React.MouseEvent) => void;
832
+ }
833
+
834
+ declare const BreadCrumbs: FC<BreadCrumbsProps>;
835
+
836
+ interface SearchBarProps {
837
+ activatedLanguage: string;
838
+ }
839
+
840
+ declare const SearchBar: FC<SearchBarProps>;
841
+
785
842
  interface ModalProps {
786
843
  showModal: boolean;
787
844
  activatedLanguage?: string;
@@ -794,12 +851,36 @@ type SkipLinkProps = {
794
851
  };
795
852
  declare const SkipLink: FC<SkipLinkProps>;
796
853
 
797
- interface AlertInTextProps {
798
- type?: string;
799
- content: string;
854
+ interface LinkProps extends IPTSLink {
855
+ customClass?: string;
856
+ openTarget?: string;
857
+ useDownLoad?: boolean;
858
+ linkComponent?: ElementType;
859
+ }
860
+
861
+ declare const LinkStandard: FC<LinkProps>;
862
+
863
+ interface LinkListProps {
864
+ linkArray: IPTSLink[];
865
+ activatedLanguage?: string;
866
+ customCss?: string;
867
+ linkComponent?: ElementType;
868
+ }
869
+
870
+ declare const LinkList: FC<LinkListProps>;
871
+
872
+ interface CollapseProps {
873
+ title: ReactNode;
874
+ children: ReactNode;
875
+ isOpen?: boolean;
876
+ defaultOpen?: boolean;
877
+ onToggle?: (open: boolean) => void;
878
+ id?: string;
879
+ activatedLanguage?: string;
880
+ customClass?: string;
800
881
  }
801
882
 
802
- declare const AlertInTextStandard: FC<AlertInTextProps>;
883
+ declare const Collapse: FC<CollapseProps>;
803
884
 
804
885
  interface PrincipleOfPublicityProps {
805
886
  activatedLanguage?: string;
@@ -907,4 +988,4 @@ interface FormStatusMessagesProps {
907
988
  */
908
989
  declare const FormStatusMessagesScreenReader: React$1.FC<FormStatusMessagesProps>;
909
990
 
910
- export { AddFiles as AddFilesStandard, AlertInTextStandard, 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 };
991
+ 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, type LanguageSupportConfig, LinkList as LinkListStandard, LinkStandard, Modal as ModalStandard, MultipleCheckboxes as MultipleCheckboxesStandard, Navigation, NavigationHeader, PrincipleOfPublicity as PrincipleOfPublicityStandard, QuestionGroup, QuestionRenderer, InputRadio as RadioMultipleStandard, 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 };