optimized-react-component-library-xyz123 2.3.2 → 2.4.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 +83 -17
- package/dist/index.d.ts +83 -17
- package/dist/index.js +1304 -475
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1322 -491
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -2
- package/src/css/darkMode.css +119 -2
- package/src/css/e-tjanst-root.css +6 -8
- package/src/css/mobileView.css +84 -0
- package/src/css/questions.css +0 -1
- package/src/css/styles.css +349 -44
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
|
-
alertInText?: string;
|
|
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
|
-
alertInText?: string;
|
|
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;
|
|
@@ -92,7 +94,6 @@ interface IQuestion {
|
|
|
92
94
|
questionGroupType?: string;
|
|
93
95
|
dependsOnOtherQuestion?: Array<any>;
|
|
94
96
|
questionExtraAttribute?: IQuestionExtraAttribute;
|
|
95
|
-
infoOnly?: ITextBlock;
|
|
96
97
|
languageSupport: Array<any>;
|
|
97
98
|
}
|
|
98
99
|
interface IQuestionExtraAttribute {
|
|
@@ -140,7 +141,16 @@ interface IAppSettings {
|
|
|
140
141
|
appUsesNavigation: boolean;
|
|
141
142
|
appCookies?: IAppSettingsCookies;
|
|
142
143
|
appUsesPreview?: boolean;
|
|
144
|
+
appUsesAsterisk?: boolean;
|
|
143
145
|
}
|
|
146
|
+
type INavigationItem = {
|
|
147
|
+
label: {
|
|
148
|
+
sv: string;
|
|
149
|
+
en: string;
|
|
150
|
+
};
|
|
151
|
+
href: string;
|
|
152
|
+
children?: INavigationItem[];
|
|
153
|
+
};
|
|
144
154
|
|
|
145
155
|
interface RadioProps {
|
|
146
156
|
question: IQuestion;
|
|
@@ -209,15 +219,6 @@ interface SingleCheckboxProps {
|
|
|
209
219
|
|
|
210
220
|
declare const SingleCheckbox: FC<SingleCheckboxProps>;
|
|
211
221
|
|
|
212
|
-
interface InfoOnlyProps {
|
|
213
|
-
question: IQuestion;
|
|
214
|
-
handleQuestionInputChange: any;
|
|
215
|
-
showPreview?: boolean;
|
|
216
|
-
activatedLanguage?: string;
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
declare const InputInfoOnly: FC<InfoOnlyProps>;
|
|
220
|
-
|
|
221
222
|
/**
|
|
222
223
|
* Kontrollerar om en fråga har ett valideringsfel baserat på dess egenskaper och valideringstyper.
|
|
223
224
|
*
|
|
@@ -792,6 +793,46 @@ interface HeaderProps {
|
|
|
792
793
|
|
|
793
794
|
declare const Header: FC<HeaderProps>;
|
|
794
795
|
|
|
796
|
+
interface NavigationHeaderProps {
|
|
797
|
+
SetActivatedLanguage?: (language: string) => void;
|
|
798
|
+
headline?: string;
|
|
799
|
+
homelink?: string;
|
|
800
|
+
activatedLanguage?: string;
|
|
801
|
+
useLanguage?: boolean;
|
|
802
|
+
useNavigationMenu: boolean;
|
|
803
|
+
useSearch?: boolean;
|
|
804
|
+
menuLinks: INavigationItem[];
|
|
805
|
+
linkComponent?: ElementType;
|
|
806
|
+
noLogoLink?: boolean;
|
|
807
|
+
}
|
|
808
|
+
|
|
809
|
+
declare const NavigationHeader: FC<NavigationHeaderProps>;
|
|
810
|
+
|
|
811
|
+
interface NavigationProps {
|
|
812
|
+
setIsMenyOpen?: (open: boolean) => void;
|
|
813
|
+
activatedLanguage?: string;
|
|
814
|
+
menuLinks?: INavigationLink[];
|
|
815
|
+
isOpen: boolean;
|
|
816
|
+
openButtonRef: RefObject<HTMLButtonElement | null>;
|
|
817
|
+
linkComponent?: ElementType;
|
|
818
|
+
}
|
|
819
|
+
type Locale = 'sv' | 'en';
|
|
820
|
+
type Label = Record<Locale, string>;
|
|
821
|
+
interface INavigationLink {
|
|
822
|
+
label: Label;
|
|
823
|
+
href: string;
|
|
824
|
+
children?: INavigationLink[];
|
|
825
|
+
openInNewWindow?: boolean;
|
|
826
|
+
}
|
|
827
|
+
|
|
828
|
+
declare const Navigation: FC<NavigationProps>;
|
|
829
|
+
|
|
830
|
+
interface SearchBarProps {
|
|
831
|
+
activatedLanguage: string;
|
|
832
|
+
}
|
|
833
|
+
|
|
834
|
+
declare const SearchBar: FC<SearchBarProps>;
|
|
835
|
+
|
|
795
836
|
interface ModalProps {
|
|
796
837
|
showModal: boolean;
|
|
797
838
|
activatedLanguage?: string;
|
|
@@ -804,11 +845,36 @@ type SkipLinkProps = {
|
|
|
804
845
|
};
|
|
805
846
|
declare const SkipLink: FC<SkipLinkProps>;
|
|
806
847
|
|
|
807
|
-
interface
|
|
808
|
-
|
|
848
|
+
interface LinkProps extends IPTSLink {
|
|
849
|
+
customClass?: string;
|
|
850
|
+
openTarget?: string;
|
|
851
|
+
useDownLoad?: boolean;
|
|
852
|
+
linkComponent?: ElementType;
|
|
853
|
+
}
|
|
854
|
+
|
|
855
|
+
declare const LinkStandard: FC<LinkProps>;
|
|
856
|
+
|
|
857
|
+
interface LinkListProps {
|
|
858
|
+
linkArray: IPTSLink[];
|
|
859
|
+
activatedLanguage?: string;
|
|
860
|
+
customCss?: string;
|
|
861
|
+
linkComponent?: ElementType;
|
|
862
|
+
}
|
|
863
|
+
|
|
864
|
+
declare const LinkList: FC<LinkListProps>;
|
|
865
|
+
|
|
866
|
+
interface CollapseProps {
|
|
867
|
+
title: ReactNode;
|
|
868
|
+
children: ReactNode;
|
|
869
|
+
isOpen?: boolean;
|
|
870
|
+
defaultOpen?: boolean;
|
|
871
|
+
onToggle?: (open: boolean) => void;
|
|
872
|
+
id?: string;
|
|
873
|
+
activatedLanguage?: string;
|
|
874
|
+
customClass?: string;
|
|
809
875
|
}
|
|
810
876
|
|
|
811
|
-
declare const
|
|
877
|
+
declare const Collapse: FC<CollapseProps>;
|
|
812
878
|
|
|
813
879
|
interface PrincipleOfPublicityProps {
|
|
814
880
|
activatedLanguage?: string;
|
|
@@ -916,4 +982,4 @@ interface FormStatusMessagesProps {
|
|
|
916
982
|
*/
|
|
917
983
|
declare const FormStatusMessagesScreenReader: React$1.FC<FormStatusMessagesProps>;
|
|
918
984
|
|
|
919
|
-
export { AddFiles as AddFilesStandard,
|
|
985
|
+
export { AddFiles as AddFilesStandard, 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
|
-
alertInText?: string;
|
|
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
|
-
alertInText?: string;
|
|
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;
|
|
@@ -92,7 +94,6 @@ interface IQuestion {
|
|
|
92
94
|
questionGroupType?: string;
|
|
93
95
|
dependsOnOtherQuestion?: Array<any>;
|
|
94
96
|
questionExtraAttribute?: IQuestionExtraAttribute;
|
|
95
|
-
infoOnly?: ITextBlock;
|
|
96
97
|
languageSupport: Array<any>;
|
|
97
98
|
}
|
|
98
99
|
interface IQuestionExtraAttribute {
|
|
@@ -140,7 +141,16 @@ interface IAppSettings {
|
|
|
140
141
|
appUsesNavigation: boolean;
|
|
141
142
|
appCookies?: IAppSettingsCookies;
|
|
142
143
|
appUsesPreview?: boolean;
|
|
144
|
+
appUsesAsterisk?: boolean;
|
|
143
145
|
}
|
|
146
|
+
type INavigationItem = {
|
|
147
|
+
label: {
|
|
148
|
+
sv: string;
|
|
149
|
+
en: string;
|
|
150
|
+
};
|
|
151
|
+
href: string;
|
|
152
|
+
children?: INavigationItem[];
|
|
153
|
+
};
|
|
144
154
|
|
|
145
155
|
interface RadioProps {
|
|
146
156
|
question: IQuestion;
|
|
@@ -209,15 +219,6 @@ interface SingleCheckboxProps {
|
|
|
209
219
|
|
|
210
220
|
declare const SingleCheckbox: FC<SingleCheckboxProps>;
|
|
211
221
|
|
|
212
|
-
interface InfoOnlyProps {
|
|
213
|
-
question: IQuestion;
|
|
214
|
-
handleQuestionInputChange: any;
|
|
215
|
-
showPreview?: boolean;
|
|
216
|
-
activatedLanguage?: string;
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
declare const InputInfoOnly: FC<InfoOnlyProps>;
|
|
220
|
-
|
|
221
222
|
/**
|
|
222
223
|
* Kontrollerar om en fråga har ett valideringsfel baserat på dess egenskaper och valideringstyper.
|
|
223
224
|
*
|
|
@@ -792,6 +793,46 @@ interface HeaderProps {
|
|
|
792
793
|
|
|
793
794
|
declare const Header: FC<HeaderProps>;
|
|
794
795
|
|
|
796
|
+
interface NavigationHeaderProps {
|
|
797
|
+
SetActivatedLanguage?: (language: string) => void;
|
|
798
|
+
headline?: string;
|
|
799
|
+
homelink?: string;
|
|
800
|
+
activatedLanguage?: string;
|
|
801
|
+
useLanguage?: boolean;
|
|
802
|
+
useNavigationMenu: boolean;
|
|
803
|
+
useSearch?: boolean;
|
|
804
|
+
menuLinks: INavigationItem[];
|
|
805
|
+
linkComponent?: ElementType;
|
|
806
|
+
noLogoLink?: boolean;
|
|
807
|
+
}
|
|
808
|
+
|
|
809
|
+
declare const NavigationHeader: FC<NavigationHeaderProps>;
|
|
810
|
+
|
|
811
|
+
interface NavigationProps {
|
|
812
|
+
setIsMenyOpen?: (open: boolean) => void;
|
|
813
|
+
activatedLanguage?: string;
|
|
814
|
+
menuLinks?: INavigationLink[];
|
|
815
|
+
isOpen: boolean;
|
|
816
|
+
openButtonRef: RefObject<HTMLButtonElement | null>;
|
|
817
|
+
linkComponent?: ElementType;
|
|
818
|
+
}
|
|
819
|
+
type Locale = 'sv' | 'en';
|
|
820
|
+
type Label = Record<Locale, string>;
|
|
821
|
+
interface INavigationLink {
|
|
822
|
+
label: Label;
|
|
823
|
+
href: string;
|
|
824
|
+
children?: INavigationLink[];
|
|
825
|
+
openInNewWindow?: boolean;
|
|
826
|
+
}
|
|
827
|
+
|
|
828
|
+
declare const Navigation: FC<NavigationProps>;
|
|
829
|
+
|
|
830
|
+
interface SearchBarProps {
|
|
831
|
+
activatedLanguage: string;
|
|
832
|
+
}
|
|
833
|
+
|
|
834
|
+
declare const SearchBar: FC<SearchBarProps>;
|
|
835
|
+
|
|
795
836
|
interface ModalProps {
|
|
796
837
|
showModal: boolean;
|
|
797
838
|
activatedLanguage?: string;
|
|
@@ -804,11 +845,36 @@ type SkipLinkProps = {
|
|
|
804
845
|
};
|
|
805
846
|
declare const SkipLink: FC<SkipLinkProps>;
|
|
806
847
|
|
|
807
|
-
interface
|
|
808
|
-
|
|
848
|
+
interface LinkProps extends IPTSLink {
|
|
849
|
+
customClass?: string;
|
|
850
|
+
openTarget?: string;
|
|
851
|
+
useDownLoad?: boolean;
|
|
852
|
+
linkComponent?: ElementType;
|
|
853
|
+
}
|
|
854
|
+
|
|
855
|
+
declare const LinkStandard: FC<LinkProps>;
|
|
856
|
+
|
|
857
|
+
interface LinkListProps {
|
|
858
|
+
linkArray: IPTSLink[];
|
|
859
|
+
activatedLanguage?: string;
|
|
860
|
+
customCss?: string;
|
|
861
|
+
linkComponent?: ElementType;
|
|
862
|
+
}
|
|
863
|
+
|
|
864
|
+
declare const LinkList: FC<LinkListProps>;
|
|
865
|
+
|
|
866
|
+
interface CollapseProps {
|
|
867
|
+
title: ReactNode;
|
|
868
|
+
children: ReactNode;
|
|
869
|
+
isOpen?: boolean;
|
|
870
|
+
defaultOpen?: boolean;
|
|
871
|
+
onToggle?: (open: boolean) => void;
|
|
872
|
+
id?: string;
|
|
873
|
+
activatedLanguage?: string;
|
|
874
|
+
customClass?: string;
|
|
809
875
|
}
|
|
810
876
|
|
|
811
|
-
declare const
|
|
877
|
+
declare const Collapse: FC<CollapseProps>;
|
|
812
878
|
|
|
813
879
|
interface PrincipleOfPublicityProps {
|
|
814
880
|
activatedLanguage?: string;
|
|
@@ -916,4 +982,4 @@ interface FormStatusMessagesProps {
|
|
|
916
982
|
*/
|
|
917
983
|
declare const FormStatusMessagesScreenReader: React$1.FC<FormStatusMessagesProps>;
|
|
918
984
|
|
|
919
|
-
export { AddFiles as AddFilesStandard,
|
|
985
|
+
export { AddFiles as AddFilesStandard, 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 };
|