optimized-react-component-library-xyz123 2.5.13 → 2.6.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 +1 -51
- package/dist/index.d.ts +1 -51
- package/dist/index.js +756 -867
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +748 -857
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/css/darkMode.css +22 -14
- package/src/css/mobileView.css +1 -9
- package/src/css/questions.css +4 -79
- package/src/css/styles.css +2 -3
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;
|
|
@@ -235,15 +233,6 @@ interface InfoOnlyProps {
|
|
|
235
233
|
|
|
236
234
|
declare const InputInfoOnly: FC<InfoOnlyProps>;
|
|
237
235
|
|
|
238
|
-
interface RadioMultipleWithInfo2Props {
|
|
239
|
-
question: IQuestion;
|
|
240
|
-
handleQuestionInputChange: any;
|
|
241
|
-
showPreview?: boolean;
|
|
242
|
-
activatedLanguage?: string;
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
declare const RadioWithInfo: FC<RadioMultipleWithInfo2Props>;
|
|
246
|
-
|
|
247
236
|
/**
|
|
248
237
|
* Kontrollerar om en fråga har ett valideringsfel baserat på dess egenskaper och valideringstyper.
|
|
249
238
|
*
|
|
@@ -367,7 +356,6 @@ interface LanguageEntry {
|
|
|
367
356
|
backButton: string;
|
|
368
357
|
forwardButton: string;
|
|
369
358
|
sendButton: string;
|
|
370
|
-
restartButton: string;
|
|
371
359
|
}
|
|
372
360
|
interface LanguageSupportConfig {
|
|
373
361
|
activatedLanguage: string;
|
|
@@ -380,7 +368,6 @@ interface LanguageState {
|
|
|
380
368
|
backButton: string;
|
|
381
369
|
forwardButton: string;
|
|
382
370
|
sendButton: string;
|
|
383
|
-
restartButton: string;
|
|
384
371
|
}
|
|
385
372
|
declare const createGlobalLanguageSlice: (initialConfig: LanguageSupportConfig, options?: {
|
|
386
373
|
name?: string;
|
|
@@ -399,7 +386,6 @@ declare const makeglobalLanguageSelectors: <TState>(selectSlice: (state: TState)
|
|
|
399
386
|
backButton: string;
|
|
400
387
|
forwardButton: string;
|
|
401
388
|
sendButton: string;
|
|
402
|
-
restartButton: string;
|
|
403
389
|
}) & {
|
|
404
390
|
clearCache: () => void;
|
|
405
391
|
resultsCount: () => number;
|
|
@@ -412,7 +398,6 @@ declare const makeglobalLanguageSelectors: <TState>(selectSlice: (state: TState)
|
|
|
412
398
|
backButton: string;
|
|
413
399
|
forwardButton: string;
|
|
414
400
|
sendButton: string;
|
|
415
|
-
restartButton: string;
|
|
416
401
|
};
|
|
417
402
|
memoizedResultFunc: ((resultFuncArgs_0: LanguageState, resultFuncArgs_1: string) => {
|
|
418
403
|
activatedLanguage: string;
|
|
@@ -421,7 +406,6 @@ declare const makeglobalLanguageSelectors: <TState>(selectSlice: (state: TState)
|
|
|
421
406
|
backButton: string;
|
|
422
407
|
forwardButton: string;
|
|
423
408
|
sendButton: string;
|
|
424
|
-
restartButton: string;
|
|
425
409
|
}) & {
|
|
426
410
|
clearCache: () => void;
|
|
427
411
|
resultsCount: () => number;
|
|
@@ -434,7 +418,6 @@ declare const makeglobalLanguageSelectors: <TState>(selectSlice: (state: TState)
|
|
|
434
418
|
backButton: string;
|
|
435
419
|
forwardButton: string;
|
|
436
420
|
sendButton: string;
|
|
437
|
-
restartButton: string;
|
|
438
421
|
};
|
|
439
422
|
dependencies: [(state: TState) => LanguageState, (_: TState, activatedLanguage: string) => string];
|
|
440
423
|
recomputations: () => number;
|
|
@@ -472,8 +455,6 @@ declare const createFormSlice: (initialState: IFormState, options?: {
|
|
|
472
455
|
* Uppdaterar svaret (answer) för en specifik fråga i global state.
|
|
473
456
|
*/
|
|
474
457
|
updateAnswer: (state: immer.WritableDraft<IFormState>, action: PayloadAction<any>) => void;
|
|
475
|
-
/** Tar bort alla svar (answer) i global state. Används när man startar om formuläret. */
|
|
476
|
-
removeAllAnswers: (state: immer.WritableDraft<IFormState>) => void;
|
|
477
458
|
/** Uppdaterar filer (files) för en specifik fråga i global state */
|
|
478
459
|
addFiles: (state: immer.WritableDraft<IFormState>, action: PayloadAction<any>) => void;
|
|
479
460
|
/**
|
|
@@ -992,37 +973,6 @@ interface StepperProps {
|
|
|
992
973
|
|
|
993
974
|
declare const Stepper: FC<StepperProps>;
|
|
994
975
|
|
|
995
|
-
interface StepperButtonsNoApiProps {
|
|
996
|
-
globalLanguageState?: any;
|
|
997
|
-
changeStepHandler: (activeStep: number) => void;
|
|
998
|
-
nextStepButtonHandler?: (e: any) => void;
|
|
999
|
-
steps?: any[];
|
|
1000
|
-
activeStep: number;
|
|
1001
|
-
appUsesResetButton?: boolean;
|
|
1002
|
-
}
|
|
1003
|
-
|
|
1004
|
-
/**
|
|
1005
|
-
* Renderar navigationsknappar för steg-navigering i ett flerstegsformulär.
|
|
1006
|
-
*
|
|
1007
|
-
* Funktionalitet:
|
|
1008
|
-
* Visar en "Tillbaka"-knapp när activeStep > 0.
|
|
1009
|
-
* Visar "Nästa"-knappen fram tills sista steget.
|
|
1010
|
-
* Byter "Nästa"-knappen till "Skicka" vid sista steget.
|
|
1011
|
-
*
|
|
1012
|
-
* @param {Object} globalLanguageState Objekt med språksträngar för knapparna.
|
|
1013
|
-
* Förväntas innehålla: backButton, forwardButton, sendButton.
|
|
1014
|
-
*
|
|
1015
|
-
* @param {Function} changeStepHandler Callback när användaren går bakåt i stegen.
|
|
1016
|
-
*
|
|
1017
|
-
* @param {Function} nextStepButtonHandler Callback när användaren går till nästa steg.
|
|
1018
|
-
*
|
|
1019
|
-
* @param {Array} steps Lista över alla steg i formuläret.
|
|
1020
|
-
* Används för att räkna ut sista stegnumret.
|
|
1021
|
-
*
|
|
1022
|
-
* @param {number} activeStep Det aktuella steget i flerstegsformuläret.
|
|
1023
|
-
*/
|
|
1024
|
-
declare const StepperButtonsNoApi: FC<StepperButtonsNoApiProps>;
|
|
1025
|
-
|
|
1026
976
|
interface ValidationErrorSummaryListProps {
|
|
1027
977
|
questions: any[];
|
|
1028
978
|
activatedLanguage: string;
|
|
@@ -1052,4 +1002,4 @@ interface FormStatusMessagesProps {
|
|
|
1052
1002
|
*/
|
|
1053
1003
|
declare const FormStatusMessagesScreenReader: React$1.FC<FormStatusMessagesProps>;
|
|
1054
1004
|
|
|
1055
|
-
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,
|
|
1005
|
+
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, 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;
|
|
@@ -235,15 +233,6 @@ interface InfoOnlyProps {
|
|
|
235
233
|
|
|
236
234
|
declare const InputInfoOnly: FC<InfoOnlyProps>;
|
|
237
235
|
|
|
238
|
-
interface RadioMultipleWithInfo2Props {
|
|
239
|
-
question: IQuestion;
|
|
240
|
-
handleQuestionInputChange: any;
|
|
241
|
-
showPreview?: boolean;
|
|
242
|
-
activatedLanguage?: string;
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
declare const RadioWithInfo: FC<RadioMultipleWithInfo2Props>;
|
|
246
|
-
|
|
247
236
|
/**
|
|
248
237
|
* Kontrollerar om en fråga har ett valideringsfel baserat på dess egenskaper och valideringstyper.
|
|
249
238
|
*
|
|
@@ -367,7 +356,6 @@ interface LanguageEntry {
|
|
|
367
356
|
backButton: string;
|
|
368
357
|
forwardButton: string;
|
|
369
358
|
sendButton: string;
|
|
370
|
-
restartButton: string;
|
|
371
359
|
}
|
|
372
360
|
interface LanguageSupportConfig {
|
|
373
361
|
activatedLanguage: string;
|
|
@@ -380,7 +368,6 @@ interface LanguageState {
|
|
|
380
368
|
backButton: string;
|
|
381
369
|
forwardButton: string;
|
|
382
370
|
sendButton: string;
|
|
383
|
-
restartButton: string;
|
|
384
371
|
}
|
|
385
372
|
declare const createGlobalLanguageSlice: (initialConfig: LanguageSupportConfig, options?: {
|
|
386
373
|
name?: string;
|
|
@@ -399,7 +386,6 @@ declare const makeglobalLanguageSelectors: <TState>(selectSlice: (state: TState)
|
|
|
399
386
|
backButton: string;
|
|
400
387
|
forwardButton: string;
|
|
401
388
|
sendButton: string;
|
|
402
|
-
restartButton: string;
|
|
403
389
|
}) & {
|
|
404
390
|
clearCache: () => void;
|
|
405
391
|
resultsCount: () => number;
|
|
@@ -412,7 +398,6 @@ declare const makeglobalLanguageSelectors: <TState>(selectSlice: (state: TState)
|
|
|
412
398
|
backButton: string;
|
|
413
399
|
forwardButton: string;
|
|
414
400
|
sendButton: string;
|
|
415
|
-
restartButton: string;
|
|
416
401
|
};
|
|
417
402
|
memoizedResultFunc: ((resultFuncArgs_0: LanguageState, resultFuncArgs_1: string) => {
|
|
418
403
|
activatedLanguage: string;
|
|
@@ -421,7 +406,6 @@ declare const makeglobalLanguageSelectors: <TState>(selectSlice: (state: TState)
|
|
|
421
406
|
backButton: string;
|
|
422
407
|
forwardButton: string;
|
|
423
408
|
sendButton: string;
|
|
424
|
-
restartButton: string;
|
|
425
409
|
}) & {
|
|
426
410
|
clearCache: () => void;
|
|
427
411
|
resultsCount: () => number;
|
|
@@ -434,7 +418,6 @@ declare const makeglobalLanguageSelectors: <TState>(selectSlice: (state: TState)
|
|
|
434
418
|
backButton: string;
|
|
435
419
|
forwardButton: string;
|
|
436
420
|
sendButton: string;
|
|
437
|
-
restartButton: string;
|
|
438
421
|
};
|
|
439
422
|
dependencies: [(state: TState) => LanguageState, (_: TState, activatedLanguage: string) => string];
|
|
440
423
|
recomputations: () => number;
|
|
@@ -472,8 +455,6 @@ declare const createFormSlice: (initialState: IFormState, options?: {
|
|
|
472
455
|
* Uppdaterar svaret (answer) för en specifik fråga i global state.
|
|
473
456
|
*/
|
|
474
457
|
updateAnswer: (state: immer.WritableDraft<IFormState>, action: PayloadAction<any>) => void;
|
|
475
|
-
/** Tar bort alla svar (answer) i global state. Används när man startar om formuläret. */
|
|
476
|
-
removeAllAnswers: (state: immer.WritableDraft<IFormState>) => void;
|
|
477
458
|
/** Uppdaterar filer (files) för en specifik fråga i global state */
|
|
478
459
|
addFiles: (state: immer.WritableDraft<IFormState>, action: PayloadAction<any>) => void;
|
|
479
460
|
/**
|
|
@@ -992,37 +973,6 @@ interface StepperProps {
|
|
|
992
973
|
|
|
993
974
|
declare const Stepper: FC<StepperProps>;
|
|
994
975
|
|
|
995
|
-
interface StepperButtonsNoApiProps {
|
|
996
|
-
globalLanguageState?: any;
|
|
997
|
-
changeStepHandler: (activeStep: number) => void;
|
|
998
|
-
nextStepButtonHandler?: (e: any) => void;
|
|
999
|
-
steps?: any[];
|
|
1000
|
-
activeStep: number;
|
|
1001
|
-
appUsesResetButton?: boolean;
|
|
1002
|
-
}
|
|
1003
|
-
|
|
1004
|
-
/**
|
|
1005
|
-
* Renderar navigationsknappar för steg-navigering i ett flerstegsformulär.
|
|
1006
|
-
*
|
|
1007
|
-
* Funktionalitet:
|
|
1008
|
-
* Visar en "Tillbaka"-knapp när activeStep > 0.
|
|
1009
|
-
* Visar "Nästa"-knappen fram tills sista steget.
|
|
1010
|
-
* Byter "Nästa"-knappen till "Skicka" vid sista steget.
|
|
1011
|
-
*
|
|
1012
|
-
* @param {Object} globalLanguageState Objekt med språksträngar för knapparna.
|
|
1013
|
-
* Förväntas innehålla: backButton, forwardButton, sendButton.
|
|
1014
|
-
*
|
|
1015
|
-
* @param {Function} changeStepHandler Callback när användaren går bakåt i stegen.
|
|
1016
|
-
*
|
|
1017
|
-
* @param {Function} nextStepButtonHandler Callback när användaren går till nästa steg.
|
|
1018
|
-
*
|
|
1019
|
-
* @param {Array} steps Lista över alla steg i formuläret.
|
|
1020
|
-
* Används för att räkna ut sista stegnumret.
|
|
1021
|
-
*
|
|
1022
|
-
* @param {number} activeStep Det aktuella steget i flerstegsformuläret.
|
|
1023
|
-
*/
|
|
1024
|
-
declare const StepperButtonsNoApi: FC<StepperButtonsNoApiProps>;
|
|
1025
|
-
|
|
1026
976
|
interface ValidationErrorSummaryListProps {
|
|
1027
977
|
questions: any[];
|
|
1028
978
|
activatedLanguage: string;
|
|
@@ -1052,4 +1002,4 @@ interface FormStatusMessagesProps {
|
|
|
1052
1002
|
*/
|
|
1053
1003
|
declare const FormStatusMessagesScreenReader: React$1.FC<FormStatusMessagesProps>;
|
|
1054
1004
|
|
|
1055
|
-
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,
|
|
1005
|
+
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, 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 };
|