optimized-react-component-library-xyz123 2.6.1 → 2.8.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 +51 -1
- package/dist/index.d.ts +51 -1
- package/dist/index.js +504 -256
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +494 -248
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/css/darkMode.css +14 -0
- package/src/css/mobileView.css +9 -1
- package/src/css/questions.css +79 -4
- package/src/css/styles.css +2 -1
package/dist/index.d.mts
CHANGED
|
@@ -44,6 +44,8 @@ interface IOption {
|
|
|
44
44
|
label: string;
|
|
45
45
|
value?: string;
|
|
46
46
|
id?: string;
|
|
47
|
+
info?: string;
|
|
48
|
+
optionCategory?: string;
|
|
47
49
|
}
|
|
48
50
|
interface IPTSLink {
|
|
49
51
|
title: string;
|
|
@@ -233,6 +235,15 @@ interface InfoOnlyProps {
|
|
|
233
235
|
|
|
234
236
|
declare const InputInfoOnly: FC<InfoOnlyProps>;
|
|
235
237
|
|
|
238
|
+
interface RadioMultipleWithInfo2Props {
|
|
239
|
+
question: IQuestion;
|
|
240
|
+
handleQuestionInputChange: any;
|
|
241
|
+
showPreview?: boolean;
|
|
242
|
+
activatedLanguage?: string;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
declare const RadioWithInfo: FC<RadioMultipleWithInfo2Props>;
|
|
246
|
+
|
|
236
247
|
/**
|
|
237
248
|
* Kontrollerar om en fråga har ett valideringsfel baserat på dess egenskaper och valideringstyper.
|
|
238
249
|
*
|
|
@@ -356,6 +367,7 @@ interface LanguageEntry {
|
|
|
356
367
|
backButton: string;
|
|
357
368
|
forwardButton: string;
|
|
358
369
|
sendButton: string;
|
|
370
|
+
restartButton: string;
|
|
359
371
|
}
|
|
360
372
|
interface LanguageSupportConfig {
|
|
361
373
|
activatedLanguage: string;
|
|
@@ -368,6 +380,7 @@ interface LanguageState {
|
|
|
368
380
|
backButton: string;
|
|
369
381
|
forwardButton: string;
|
|
370
382
|
sendButton: string;
|
|
383
|
+
restartButton: string;
|
|
371
384
|
}
|
|
372
385
|
declare const createGlobalLanguageSlice: (initialConfig: LanguageSupportConfig, options?: {
|
|
373
386
|
name?: string;
|
|
@@ -386,6 +399,7 @@ declare const makeglobalLanguageSelectors: <TState>(selectSlice: (state: TState)
|
|
|
386
399
|
backButton: string;
|
|
387
400
|
forwardButton: string;
|
|
388
401
|
sendButton: string;
|
|
402
|
+
restartButton: string;
|
|
389
403
|
}) & {
|
|
390
404
|
clearCache: () => void;
|
|
391
405
|
resultsCount: () => number;
|
|
@@ -398,6 +412,7 @@ declare const makeglobalLanguageSelectors: <TState>(selectSlice: (state: TState)
|
|
|
398
412
|
backButton: string;
|
|
399
413
|
forwardButton: string;
|
|
400
414
|
sendButton: string;
|
|
415
|
+
restartButton: string;
|
|
401
416
|
};
|
|
402
417
|
memoizedResultFunc: ((resultFuncArgs_0: LanguageState, resultFuncArgs_1: string) => {
|
|
403
418
|
activatedLanguage: string;
|
|
@@ -406,6 +421,7 @@ declare const makeglobalLanguageSelectors: <TState>(selectSlice: (state: TState)
|
|
|
406
421
|
backButton: string;
|
|
407
422
|
forwardButton: string;
|
|
408
423
|
sendButton: string;
|
|
424
|
+
restartButton: string;
|
|
409
425
|
}) & {
|
|
410
426
|
clearCache: () => void;
|
|
411
427
|
resultsCount: () => number;
|
|
@@ -418,6 +434,7 @@ declare const makeglobalLanguageSelectors: <TState>(selectSlice: (state: TState)
|
|
|
418
434
|
backButton: string;
|
|
419
435
|
forwardButton: string;
|
|
420
436
|
sendButton: string;
|
|
437
|
+
restartButton: string;
|
|
421
438
|
};
|
|
422
439
|
dependencies: [(state: TState) => LanguageState, (_: TState, activatedLanguage: string) => string];
|
|
423
440
|
recomputations: () => number;
|
|
@@ -455,6 +472,8 @@ declare const createFormSlice: (initialState: IFormState, options?: {
|
|
|
455
472
|
* Uppdaterar svaret (answer) för en specifik fråga i global state.
|
|
456
473
|
*/
|
|
457
474
|
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;
|
|
458
477
|
/** Uppdaterar filer (files) för en specifik fråga i global state */
|
|
459
478
|
addFiles: (state: immer.WritableDraft<IFormState>, action: PayloadAction<any>) => void;
|
|
460
479
|
/**
|
|
@@ -973,6 +992,37 @@ interface StepperProps {
|
|
|
973
992
|
|
|
974
993
|
declare const Stepper: FC<StepperProps>;
|
|
975
994
|
|
|
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
|
+
|
|
976
1026
|
interface ValidationErrorSummaryListProps {
|
|
977
1027
|
questions: any[];
|
|
978
1028
|
activatedLanguage: string;
|
|
@@ -1002,4 +1052,4 @@ interface FormStatusMessagesProps {
|
|
|
1002
1052
|
*/
|
|
1003
1053
|
declare const FormStatusMessagesScreenReader: React$1.FC<FormStatusMessagesProps>;
|
|
1004
1054
|
|
|
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 };
|
|
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, RadioWithInfo as RadioMultipleWithInfo2Standard, 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,6 +44,8 @@ interface IOption {
|
|
|
44
44
|
label: string;
|
|
45
45
|
value?: string;
|
|
46
46
|
id?: string;
|
|
47
|
+
info?: string;
|
|
48
|
+
optionCategory?: string;
|
|
47
49
|
}
|
|
48
50
|
interface IPTSLink {
|
|
49
51
|
title: string;
|
|
@@ -233,6 +235,15 @@ interface InfoOnlyProps {
|
|
|
233
235
|
|
|
234
236
|
declare const InputInfoOnly: FC<InfoOnlyProps>;
|
|
235
237
|
|
|
238
|
+
interface RadioMultipleWithInfo2Props {
|
|
239
|
+
question: IQuestion;
|
|
240
|
+
handleQuestionInputChange: any;
|
|
241
|
+
showPreview?: boolean;
|
|
242
|
+
activatedLanguage?: string;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
declare const RadioWithInfo: FC<RadioMultipleWithInfo2Props>;
|
|
246
|
+
|
|
236
247
|
/**
|
|
237
248
|
* Kontrollerar om en fråga har ett valideringsfel baserat på dess egenskaper och valideringstyper.
|
|
238
249
|
*
|
|
@@ -356,6 +367,7 @@ interface LanguageEntry {
|
|
|
356
367
|
backButton: string;
|
|
357
368
|
forwardButton: string;
|
|
358
369
|
sendButton: string;
|
|
370
|
+
restartButton: string;
|
|
359
371
|
}
|
|
360
372
|
interface LanguageSupportConfig {
|
|
361
373
|
activatedLanguage: string;
|
|
@@ -368,6 +380,7 @@ interface LanguageState {
|
|
|
368
380
|
backButton: string;
|
|
369
381
|
forwardButton: string;
|
|
370
382
|
sendButton: string;
|
|
383
|
+
restartButton: string;
|
|
371
384
|
}
|
|
372
385
|
declare const createGlobalLanguageSlice: (initialConfig: LanguageSupportConfig, options?: {
|
|
373
386
|
name?: string;
|
|
@@ -386,6 +399,7 @@ declare const makeglobalLanguageSelectors: <TState>(selectSlice: (state: TState)
|
|
|
386
399
|
backButton: string;
|
|
387
400
|
forwardButton: string;
|
|
388
401
|
sendButton: string;
|
|
402
|
+
restartButton: string;
|
|
389
403
|
}) & {
|
|
390
404
|
clearCache: () => void;
|
|
391
405
|
resultsCount: () => number;
|
|
@@ -398,6 +412,7 @@ declare const makeglobalLanguageSelectors: <TState>(selectSlice: (state: TState)
|
|
|
398
412
|
backButton: string;
|
|
399
413
|
forwardButton: string;
|
|
400
414
|
sendButton: string;
|
|
415
|
+
restartButton: string;
|
|
401
416
|
};
|
|
402
417
|
memoizedResultFunc: ((resultFuncArgs_0: LanguageState, resultFuncArgs_1: string) => {
|
|
403
418
|
activatedLanguage: string;
|
|
@@ -406,6 +421,7 @@ declare const makeglobalLanguageSelectors: <TState>(selectSlice: (state: TState)
|
|
|
406
421
|
backButton: string;
|
|
407
422
|
forwardButton: string;
|
|
408
423
|
sendButton: string;
|
|
424
|
+
restartButton: string;
|
|
409
425
|
}) & {
|
|
410
426
|
clearCache: () => void;
|
|
411
427
|
resultsCount: () => number;
|
|
@@ -418,6 +434,7 @@ declare const makeglobalLanguageSelectors: <TState>(selectSlice: (state: TState)
|
|
|
418
434
|
backButton: string;
|
|
419
435
|
forwardButton: string;
|
|
420
436
|
sendButton: string;
|
|
437
|
+
restartButton: string;
|
|
421
438
|
};
|
|
422
439
|
dependencies: [(state: TState) => LanguageState, (_: TState, activatedLanguage: string) => string];
|
|
423
440
|
recomputations: () => number;
|
|
@@ -455,6 +472,8 @@ declare const createFormSlice: (initialState: IFormState, options?: {
|
|
|
455
472
|
* Uppdaterar svaret (answer) för en specifik fråga i global state.
|
|
456
473
|
*/
|
|
457
474
|
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;
|
|
458
477
|
/** Uppdaterar filer (files) för en specifik fråga i global state */
|
|
459
478
|
addFiles: (state: immer.WritableDraft<IFormState>, action: PayloadAction<any>) => void;
|
|
460
479
|
/**
|
|
@@ -973,6 +992,37 @@ interface StepperProps {
|
|
|
973
992
|
|
|
974
993
|
declare const Stepper: FC<StepperProps>;
|
|
975
994
|
|
|
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
|
+
|
|
976
1026
|
interface ValidationErrorSummaryListProps {
|
|
977
1027
|
questions: any[];
|
|
978
1028
|
activatedLanguage: string;
|
|
@@ -1002,4 +1052,4 @@ interface FormStatusMessagesProps {
|
|
|
1002
1052
|
*/
|
|
1003
1053
|
declare const FormStatusMessagesScreenReader: React$1.FC<FormStatusMessagesProps>;
|
|
1004
1054
|
|
|
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 };
|
|
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, RadioWithInfo as RadioMultipleWithInfo2Standard, 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 };
|