optimized-react-component-library-xyz123 2.5.9 → 2.5.10
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 +43 -12
- package/dist/index.d.ts +43 -12
- package/dist/index.js +1048 -1196
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +790 -938
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/css/darkMode.css +0 -14
- package/src/css/mobileView.css +1 -9
- package/src/css/questions.css +4 -82
- package/src/css/styles.css +1 -2
package/dist/index.d.mts
CHANGED
|
@@ -44,8 +44,6 @@ interface IOption {
|
|
|
44
44
|
label: string;
|
|
45
45
|
value?: string;
|
|
46
46
|
id?: string;
|
|
47
|
-
info?: string;
|
|
48
|
-
optionCategory?: string;
|
|
49
47
|
}
|
|
50
48
|
interface IPTSLink {
|
|
51
49
|
title: string;
|
|
@@ -147,6 +145,8 @@ interface IAppSettings {
|
|
|
147
145
|
appCookies?: IAppSettingsCookies;
|
|
148
146
|
appUsesPreview?: boolean;
|
|
149
147
|
appUsesAsterisk?: boolean;
|
|
148
|
+
appUsesResetButton?: boolean;
|
|
149
|
+
appUsesApi?: boolean;
|
|
150
150
|
}
|
|
151
151
|
type INavigationItem = {
|
|
152
152
|
label: {
|
|
@@ -233,15 +233,6 @@ interface InfoOnlyProps {
|
|
|
233
233
|
|
|
234
234
|
declare const InputInfoOnly: FC<InfoOnlyProps>;
|
|
235
235
|
|
|
236
|
-
interface RadioMultipleWithInfoProps {
|
|
237
|
-
question: IQuestion;
|
|
238
|
-
handleQuestionInputChange: any;
|
|
239
|
-
showPreview?: boolean;
|
|
240
|
-
activatedLanguage?: string;
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
declare const RadioWithInfo: FC<RadioMultipleWithInfoProps>;
|
|
244
|
-
|
|
245
236
|
/**
|
|
246
237
|
* Kontrollerar om en fråga har ett valideringsfel baserat på dess egenskaper och valideringstyper.
|
|
247
238
|
*
|
|
@@ -365,6 +356,7 @@ interface LanguageEntry {
|
|
|
365
356
|
backButton: string;
|
|
366
357
|
forwardButton: string;
|
|
367
358
|
sendButton: string;
|
|
359
|
+
restartButton: string;
|
|
368
360
|
}
|
|
369
361
|
interface LanguageSupportConfig {
|
|
370
362
|
activatedLanguage: string;
|
|
@@ -377,6 +369,7 @@ interface LanguageState {
|
|
|
377
369
|
backButton: string;
|
|
378
370
|
forwardButton: string;
|
|
379
371
|
sendButton: string;
|
|
372
|
+
restartButton: string;
|
|
380
373
|
}
|
|
381
374
|
declare const createGlobalLanguageSlice: (initialConfig: LanguageSupportConfig, options?: {
|
|
382
375
|
name?: string;
|
|
@@ -395,6 +388,7 @@ declare const makeglobalLanguageSelectors: <TState>(selectSlice: (state: TState)
|
|
|
395
388
|
backButton: string;
|
|
396
389
|
forwardButton: string;
|
|
397
390
|
sendButton: string;
|
|
391
|
+
restartButton: string;
|
|
398
392
|
}) & {
|
|
399
393
|
clearCache: () => void;
|
|
400
394
|
resultsCount: () => number;
|
|
@@ -407,6 +401,7 @@ declare const makeglobalLanguageSelectors: <TState>(selectSlice: (state: TState)
|
|
|
407
401
|
backButton: string;
|
|
408
402
|
forwardButton: string;
|
|
409
403
|
sendButton: string;
|
|
404
|
+
restartButton: string;
|
|
410
405
|
};
|
|
411
406
|
memoizedResultFunc: ((resultFuncArgs_0: LanguageState, resultFuncArgs_1: string) => {
|
|
412
407
|
activatedLanguage: string;
|
|
@@ -415,6 +410,7 @@ declare const makeglobalLanguageSelectors: <TState>(selectSlice: (state: TState)
|
|
|
415
410
|
backButton: string;
|
|
416
411
|
forwardButton: string;
|
|
417
412
|
sendButton: string;
|
|
413
|
+
restartButton: string;
|
|
418
414
|
}) & {
|
|
419
415
|
clearCache: () => void;
|
|
420
416
|
resultsCount: () => number;
|
|
@@ -427,6 +423,7 @@ declare const makeglobalLanguageSelectors: <TState>(selectSlice: (state: TState)
|
|
|
427
423
|
backButton: string;
|
|
428
424
|
forwardButton: string;
|
|
429
425
|
sendButton: string;
|
|
426
|
+
restartButton: string;
|
|
430
427
|
};
|
|
431
428
|
dependencies: [(state: TState) => LanguageState, (_: TState, activatedLanguage: string) => string];
|
|
432
429
|
recomputations: () => number;
|
|
@@ -982,6 +979,40 @@ interface StepperProps {
|
|
|
982
979
|
|
|
983
980
|
declare const Stepper: FC<StepperProps>;
|
|
984
981
|
|
|
982
|
+
interface StepperButtonsNoApiProps {
|
|
983
|
+
globalLanguageState?: any;
|
|
984
|
+
changeStepHandler: (activeStep: number) => void;
|
|
985
|
+
nextStepButtonHandler?: (e: any) => void;
|
|
986
|
+
onSubmitHandler?: (e: any) => void;
|
|
987
|
+
steps?: any[];
|
|
988
|
+
activeStep: number;
|
|
989
|
+
appUsesResetButton?: boolean;
|
|
990
|
+
}
|
|
991
|
+
|
|
992
|
+
/**
|
|
993
|
+
* Renderar navigationsknappar för steg-navigering i ett flerstegsformulär.
|
|
994
|
+
*
|
|
995
|
+
* Funktionalitet:
|
|
996
|
+
* Visar en "Tillbaka"-knapp när activeStep > 0.
|
|
997
|
+
* Visar "Nästa"-knappen fram tills sista steget.
|
|
998
|
+
* Byter "Nästa"-knappen till "Skicka" vid sista steget.
|
|
999
|
+
*
|
|
1000
|
+
* @param {Object} globalLanguageState Objekt med språksträngar för knapparna.
|
|
1001
|
+
* Förväntas innehålla: backButton, forwardButton, sendButton.
|
|
1002
|
+
*
|
|
1003
|
+
* @param {Function} changeStepHandler Callback när användaren går bakåt i stegen.
|
|
1004
|
+
*
|
|
1005
|
+
* @param {Function} nextStepButtonHandler Callback när användaren går till nästa steg.
|
|
1006
|
+
*
|
|
1007
|
+
* @param {Function} onSubmitHandler Callback när sista steget nås och formuläret ska skickas in.
|
|
1008
|
+
*
|
|
1009
|
+
* @param {Array} steps Lista över alla steg i formuläret.
|
|
1010
|
+
* Används för att räkna ut sista stegnumret.
|
|
1011
|
+
*
|
|
1012
|
+
* @param {number} activeStep Det aktuella steget i flerstegsformuläret.
|
|
1013
|
+
*/
|
|
1014
|
+
declare const StepperButtonsNoApi: FC<StepperButtonsNoApiProps>;
|
|
1015
|
+
|
|
985
1016
|
interface ValidationErrorSummaryListProps {
|
|
986
1017
|
questions: any[];
|
|
987
1018
|
activatedLanguage: string;
|
|
@@ -1011,4 +1042,4 @@ interface FormStatusMessagesProps {
|
|
|
1011
1042
|
*/
|
|
1012
1043
|
declare const FormStatusMessagesScreenReader: React$1.FC<FormStatusMessagesProps>;
|
|
1013
1044
|
|
|
1014
|
-
export { AddFiles as AddFilesStandard, AlertInTextStandard, 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 as RadioMultipleStandard,
|
|
1045
|
+
export { AddFiles as AddFilesStandard, AlertInTextStandard, 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 as RadioMultipleStandard, SearchBar, SingleCheckbox as SingleCheckboxStandard, SkipLink as SkipLinkStandard, StartApplicationButton, StepperButtonsNoApi as StepperButtonsNoApiStandard, 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
|
@@ -44,8 +44,6 @@ interface IOption {
|
|
|
44
44
|
label: string;
|
|
45
45
|
value?: string;
|
|
46
46
|
id?: string;
|
|
47
|
-
info?: string;
|
|
48
|
-
optionCategory?: string;
|
|
49
47
|
}
|
|
50
48
|
interface IPTSLink {
|
|
51
49
|
title: string;
|
|
@@ -147,6 +145,8 @@ interface IAppSettings {
|
|
|
147
145
|
appCookies?: IAppSettingsCookies;
|
|
148
146
|
appUsesPreview?: boolean;
|
|
149
147
|
appUsesAsterisk?: boolean;
|
|
148
|
+
appUsesResetButton?: boolean;
|
|
149
|
+
appUsesApi?: boolean;
|
|
150
150
|
}
|
|
151
151
|
type INavigationItem = {
|
|
152
152
|
label: {
|
|
@@ -233,15 +233,6 @@ interface InfoOnlyProps {
|
|
|
233
233
|
|
|
234
234
|
declare const InputInfoOnly: FC<InfoOnlyProps>;
|
|
235
235
|
|
|
236
|
-
interface RadioMultipleWithInfoProps {
|
|
237
|
-
question: IQuestion;
|
|
238
|
-
handleQuestionInputChange: any;
|
|
239
|
-
showPreview?: boolean;
|
|
240
|
-
activatedLanguage?: string;
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
declare const RadioWithInfo: FC<RadioMultipleWithInfoProps>;
|
|
244
|
-
|
|
245
236
|
/**
|
|
246
237
|
* Kontrollerar om en fråga har ett valideringsfel baserat på dess egenskaper och valideringstyper.
|
|
247
238
|
*
|
|
@@ -365,6 +356,7 @@ interface LanguageEntry {
|
|
|
365
356
|
backButton: string;
|
|
366
357
|
forwardButton: string;
|
|
367
358
|
sendButton: string;
|
|
359
|
+
restartButton: string;
|
|
368
360
|
}
|
|
369
361
|
interface LanguageSupportConfig {
|
|
370
362
|
activatedLanguage: string;
|
|
@@ -377,6 +369,7 @@ interface LanguageState {
|
|
|
377
369
|
backButton: string;
|
|
378
370
|
forwardButton: string;
|
|
379
371
|
sendButton: string;
|
|
372
|
+
restartButton: string;
|
|
380
373
|
}
|
|
381
374
|
declare const createGlobalLanguageSlice: (initialConfig: LanguageSupportConfig, options?: {
|
|
382
375
|
name?: string;
|
|
@@ -395,6 +388,7 @@ declare const makeglobalLanguageSelectors: <TState>(selectSlice: (state: TState)
|
|
|
395
388
|
backButton: string;
|
|
396
389
|
forwardButton: string;
|
|
397
390
|
sendButton: string;
|
|
391
|
+
restartButton: string;
|
|
398
392
|
}) & {
|
|
399
393
|
clearCache: () => void;
|
|
400
394
|
resultsCount: () => number;
|
|
@@ -407,6 +401,7 @@ declare const makeglobalLanguageSelectors: <TState>(selectSlice: (state: TState)
|
|
|
407
401
|
backButton: string;
|
|
408
402
|
forwardButton: string;
|
|
409
403
|
sendButton: string;
|
|
404
|
+
restartButton: string;
|
|
410
405
|
};
|
|
411
406
|
memoizedResultFunc: ((resultFuncArgs_0: LanguageState, resultFuncArgs_1: string) => {
|
|
412
407
|
activatedLanguage: string;
|
|
@@ -415,6 +410,7 @@ declare const makeglobalLanguageSelectors: <TState>(selectSlice: (state: TState)
|
|
|
415
410
|
backButton: string;
|
|
416
411
|
forwardButton: string;
|
|
417
412
|
sendButton: string;
|
|
413
|
+
restartButton: string;
|
|
418
414
|
}) & {
|
|
419
415
|
clearCache: () => void;
|
|
420
416
|
resultsCount: () => number;
|
|
@@ -427,6 +423,7 @@ declare const makeglobalLanguageSelectors: <TState>(selectSlice: (state: TState)
|
|
|
427
423
|
backButton: string;
|
|
428
424
|
forwardButton: string;
|
|
429
425
|
sendButton: string;
|
|
426
|
+
restartButton: string;
|
|
430
427
|
};
|
|
431
428
|
dependencies: [(state: TState) => LanguageState, (_: TState, activatedLanguage: string) => string];
|
|
432
429
|
recomputations: () => number;
|
|
@@ -982,6 +979,40 @@ interface StepperProps {
|
|
|
982
979
|
|
|
983
980
|
declare const Stepper: FC<StepperProps>;
|
|
984
981
|
|
|
982
|
+
interface StepperButtonsNoApiProps {
|
|
983
|
+
globalLanguageState?: any;
|
|
984
|
+
changeStepHandler: (activeStep: number) => void;
|
|
985
|
+
nextStepButtonHandler?: (e: any) => void;
|
|
986
|
+
onSubmitHandler?: (e: any) => void;
|
|
987
|
+
steps?: any[];
|
|
988
|
+
activeStep: number;
|
|
989
|
+
appUsesResetButton?: boolean;
|
|
990
|
+
}
|
|
991
|
+
|
|
992
|
+
/**
|
|
993
|
+
* Renderar navigationsknappar för steg-navigering i ett flerstegsformulär.
|
|
994
|
+
*
|
|
995
|
+
* Funktionalitet:
|
|
996
|
+
* Visar en "Tillbaka"-knapp när activeStep > 0.
|
|
997
|
+
* Visar "Nästa"-knappen fram tills sista steget.
|
|
998
|
+
* Byter "Nästa"-knappen till "Skicka" vid sista steget.
|
|
999
|
+
*
|
|
1000
|
+
* @param {Object} globalLanguageState Objekt med språksträngar för knapparna.
|
|
1001
|
+
* Förväntas innehålla: backButton, forwardButton, sendButton.
|
|
1002
|
+
*
|
|
1003
|
+
* @param {Function} changeStepHandler Callback när användaren går bakåt i stegen.
|
|
1004
|
+
*
|
|
1005
|
+
* @param {Function} nextStepButtonHandler Callback när användaren går till nästa steg.
|
|
1006
|
+
*
|
|
1007
|
+
* @param {Function} onSubmitHandler Callback när sista steget nås och formuläret ska skickas in.
|
|
1008
|
+
*
|
|
1009
|
+
* @param {Array} steps Lista över alla steg i formuläret.
|
|
1010
|
+
* Används för att räkna ut sista stegnumret.
|
|
1011
|
+
*
|
|
1012
|
+
* @param {number} activeStep Det aktuella steget i flerstegsformuläret.
|
|
1013
|
+
*/
|
|
1014
|
+
declare const StepperButtonsNoApi: FC<StepperButtonsNoApiProps>;
|
|
1015
|
+
|
|
985
1016
|
interface ValidationErrorSummaryListProps {
|
|
986
1017
|
questions: any[];
|
|
987
1018
|
activatedLanguage: string;
|
|
@@ -1011,4 +1042,4 @@ interface FormStatusMessagesProps {
|
|
|
1011
1042
|
*/
|
|
1012
1043
|
declare const FormStatusMessagesScreenReader: React$1.FC<FormStatusMessagesProps>;
|
|
1013
1044
|
|
|
1014
|
-
export { AddFiles as AddFilesStandard, AlertInTextStandard, 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 as RadioMultipleStandard,
|
|
1045
|
+
export { AddFiles as AddFilesStandard, AlertInTextStandard, 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 as RadioMultipleStandard, SearchBar, SingleCheckbox as SingleCheckboxStandard, SkipLink as SkipLinkStandard, StartApplicationButton, StepperButtonsNoApi as StepperButtonsNoApiStandard, 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 };
|