@arquimedes.co/eureka-forms 3.0.0-refactor → 3.0.2-refactor
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/@Types/@Types.d.ts +2 -0
- package/dist/@Types/AYFFormStep.d.ts +19 -0
- package/dist/@Types/Branding.d.ts +13 -0
- package/dist/@Types/CBRFormStep.d.ts +74 -0
- package/dist/@Types/Condition.d.ts +143 -0
- package/dist/@Types/Draft/Draft.d.ts +12 -0
- package/dist/@Types/Draft/DraftEntityData.d.ts +54 -0
- package/dist/@Types/Entity.d.ts +36 -0
- package/dist/@Types/Form.d.ts +75 -0
- package/dist/@Types/FormStep.d.ts +219 -0
- package/dist/@Types/GenericFormSteps.d.ts +84 -0
- package/dist/@Types/MapperElement.d.ts +8 -0
- package/dist/@Types/Organization.d.ts +11 -0
- package/dist/@Types/Time.d.ts +6 -0
- package/dist/@Types/index.d.ts +1 -0
- package/dist/App/App.d.ts +57 -0
- package/dist/App/AppFunctions.d.ts +23 -0
- package/dist/App/AppHooks.d.ts +10 -0
- package/dist/App/AppHooks.test.d.ts +1 -0
- package/dist/Contexts/CustomContext.d.ts +11 -0
- package/dist/Contexts/FormContext.d.ts +6 -0
- package/dist/Contexts/SectionContext.d.ts +2 -0
- package/dist/Form/ConfirmationDialog/ConfirmationDialog.d.ts +11 -0
- package/dist/Form/Form.d.ts +39 -0
- package/dist/Form/FormFunctions.d.ts +12 -0
- package/dist/Form/FormFunctions.test.d.ts +1 -0
- package/dist/Form/FormHooks.d.ts +2 -0
- package/dist/Form/FormTypes/ColumnForm/ColumnForm.d.ts +3 -0
- package/dist/Form/FormTypes/StepperForm/StepperForm.d.ts +3 -0
- package/dist/Form/Section/MaterialSection/MaterialSection.d.ts +3 -0
- package/dist/Form/Section/Section.d.ts +5 -0
- package/dist/Form/Terms/Term/MaterialTerm/MaterialTerm.d.ts +3 -0
- package/dist/Form/Terms/Term/Term.d.ts +7 -0
- package/dist/Form/Terms/Terms.d.ts +2 -0
- package/dist/FormSteps/@Construction/CBRElementStep/CBRElementStep.d.ts +7 -0
- package/dist/FormSteps/@Construction/CBRIncidentsStep/CBRIncidentsStep.d.ts +8 -0
- package/dist/FormSteps/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/Incident/Incident.d.ts +7 -0
- package/dist/FormSteps/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/MaterialCBRIncidentsStep.d.ts +10 -0
- package/dist/FormSteps/@Construction/CBRPropertyStep/CBRPropertyStep.d.ts +7 -0
- package/dist/FormSteps/AYFStepMapper.d.ts +11 -0
- package/dist/FormSteps/AYFStepMapper.js +2 -12
- package/dist/FormSteps/ApiSelectorStep/ApiSelectorStep.d.ts +14 -0
- package/dist/FormSteps/ApiSelectorStep/MaterialApiSelectorStep/MaterialApiSelectorStep.d.ts +3 -0
- package/dist/FormSteps/CBRStepMapper.d.ts +12 -0
- package/dist/FormSteps/CBRStepMapper.js +1 -7
- package/dist/FormSteps/CheckBoxStep/CheckBoxStep.d.ts +8 -0
- package/dist/FormSteps/CheckBoxStep/MaterialCheckBoxStep/MaterialCheckBoxStep.d.ts +3 -0
- package/dist/FormSteps/ClassifierSelectorStep/ClassifierSelectorStep.d.ts +8 -0
- package/dist/FormSteps/ClassifierSelectorStep/MaterialClassifierSelectorStep/MaterialClassifierSelectorStep.d.ts +3 -0
- package/dist/FormSteps/CollapsibleStep/CollapsibleStep.d.ts +8 -0
- package/dist/FormSteps/CollapsibleStep/MaterialTitleStep/MaterialCollapsibleStep.d.ts +3 -0
- package/dist/FormSteps/CustomStep.d.ts +26 -0
- package/dist/FormSteps/DatePickerStep/DatePickerStep.d.ts +10 -0
- package/dist/FormSteps/DatePickerStep/MaterialDatePickerStep/MaterialDatePickerStep.d.ts +3 -0
- package/dist/FormSteps/EntityValueStep/EntityValuePickerStep.d.ts +14 -0
- package/dist/FormSteps/EntityValueStep/MaterialEntityValuePickerStep/MaterialEntityValueDialog/MaterialEntityValueDialog.d.ts +11 -0
- package/dist/FormSteps/EntityValueStep/MaterialEntityValuePickerStep/MaterialEntityValuePickerStep.d.ts +3 -0
- package/dist/FormSteps/FileUploadStep/FileUploadStep.d.ts +8 -0
- package/dist/FormSteps/FileUploadStep/MaterialFileUploadStep/FileComponent/FileComponent.d.ts +13 -0
- package/dist/FormSteps/FileUploadStep/MaterialFileUploadStep/FileFunctions.d.ts +2 -0
- package/dist/FormSteps/FileUploadStep/MaterialFileUploadStep/MaterialFileUploadStep.d.ts +16 -0
- package/dist/FormSteps/MapperStep/MapperStep.d.ts +17 -0
- package/dist/FormSteps/MapperStep/MaterialMapperStep/Element/ListMapperElement/ListMapperElement.d.ts +4 -0
- package/dist/FormSteps/MapperStep/MaterialMapperStep/Element/MapperElementComponent.d.ts +15 -0
- package/dist/FormSteps/MapperStep/MaterialMapperStep/Element/PagedMapperElement/PagedMapperElement.d.ts +4 -0
- package/dist/FormSteps/MapperStep/MaterialMapperStep/Element/PillMapperElement/PillMapperElement.d.ts +4 -0
- package/dist/FormSteps/MapperStep/MaterialMapperStep/MaterialMapperStep.d.ts +20 -0
- package/dist/FormSteps/PhoneInputStep/MaterialTextInputStep/MaterialPhoneInputStep.d.ts +3 -0
- package/dist/FormSteps/PhoneInputStep/PhoneInputStep.d.ts +10 -0
- package/dist/FormSteps/RatingStep/MaterialRatingStep/MaterialRatingStep.d.ts +3 -0
- package/dist/FormSteps/RatingStep/RatingStep.d.ts +8 -0
- package/dist/FormSteps/SelectorStep/MaterialSelectorStep/MaterialSelectorStep.d.ts +3 -0
- package/dist/FormSteps/SelectorStep/SelectorStep.d.ts +8 -0
- package/dist/FormSteps/SeparatorStep/MaterialSeparatorStep/MaterialSeparatorStep.d.ts +3 -0
- package/dist/FormSteps/SeparatorStep/SeparatorStep.d.ts +8 -0
- package/dist/FormSteps/SmartSelectStep/MaterialSmartSelectStep/MaterialSmartSelectStep.d.ts +4 -0
- package/dist/FormSteps/SmartSelectStep/SmartSelectStep.d.ts +35 -0
- package/dist/FormSteps/Step.d.ts +7 -0
- package/dist/FormSteps/StepFunctions.d.ts +27 -0
- package/dist/FormSteps/StepFunctions.test.d.ts +1 -0
- package/dist/FormSteps/StepHooks.d.ts +109 -0
- package/dist/FormSteps/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaEditorStep.d.ts +9 -0
- package/dist/FormSteps/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaStep.d.ts +7 -0
- package/dist/FormSteps/TextAreaStep/TextAreaStep.d.ts +9 -0
- package/dist/FormSteps/TextInputStep/MaterialTextInputStep/MaterialTextInputStep.d.ts +3 -0
- package/dist/FormSteps/TextInputStep/TextInputStep.d.ts +16 -0
- package/dist/FormSteps/TimePickerStep/MaterialTimePickerStep/MaterialTimePickerStep.d.ts +3 -0
- package/dist/FormSteps/TimePickerStep/TimePickerStep.d.ts +11 -0
- package/dist/FormSteps/TitleStep/MaterialTitleStep/MaterialTitleStep.d.ts +3 -0
- package/dist/FormSteps/TitleStep/TitleStep.d.ts +8 -0
- package/dist/FormSteps/Utils/@StepFiller/StepFiller.d.ts +9 -0
- package/dist/FormSteps/Utils/MaterialInputContainer/MaterialInputContainer.d.ts +11 -0
- package/dist/Icons/@ErkIcon.d.ts +14 -0
- package/dist/Icons/@ErkIcon.js +10 -0
- package/dist/Icons/ArrowLeftIcon.d.ts +3 -0
- package/dist/Icons/ArrowLeftIcon.js +4 -3
- package/dist/Icons/ArrowRightIcon.d.ts +3 -0
- package/dist/Icons/ArrowRightIcon.js +4 -3
- package/dist/Icons/CalendarIcon.d.ts +3 -0
- package/dist/Icons/CalendarIcon.js +4 -3
- package/dist/Icons/CheckCircleIcon.d.ts +3 -0
- package/dist/Icons/CheckCircleIcon.js +4 -3
- package/dist/Icons/CheckboxCheckedIcon.d.ts +3 -0
- package/dist/Icons/CheckboxCheckedIcon.js +4 -3
- package/dist/Icons/CheckboxUncheckedIcon.d.ts +3 -0
- package/dist/Icons/CheckboxUncheckedIcon.js +4 -3
- package/dist/Icons/ClockIcon.d.ts +3 -0
- package/dist/Icons/ClockIcon.js +4 -3
- package/dist/Icons/CloseIcon.d.ts +3 -0
- package/dist/Icons/CloseIcon.js +4 -3
- package/dist/Icons/Construction/LeakIcon.d.ts +3 -0
- package/dist/Icons/Construction/LeakIcon.js +4 -3
- package/dist/Icons/Construction/ProjectIcon.d.ts +3 -0
- package/dist/Icons/Construction/ProjectIcon.js +4 -3
- package/dist/Icons/Construction/PropertyIcon.d.ts +3 -0
- package/dist/Icons/Construction/PropertyIcon.js +5 -4
- package/dist/Icons/Construction/SpaceIcon.d.ts +3 -0
- package/dist/Icons/Construction/SpaceIcon.js +4 -3
- package/dist/Icons/DeleteIcon.d.ts +3 -0
- package/dist/Icons/DeleteIcon.js +4 -3
- package/dist/Icons/DocumentIcon.d.ts +3 -0
- package/dist/Icons/DocumentIcon.js +4 -3
- package/dist/Icons/Entities/CheckListIcon.d.ts +3 -0
- package/dist/Icons/Entities/CheckListIcon.js +4 -3
- package/dist/Icons/Entities/GenericEntityIcon.d.ts +3 -0
- package/dist/Icons/Entities/GenericEntityIcon.js +4 -3
- package/dist/Icons/Entities/HandshakeIcon.d.ts +3 -0
- package/dist/Icons/Entities/HandshakeIcon.js +4 -3
- package/dist/Icons/Entities/SupplierIcon.d.ts +3 -0
- package/dist/Icons/Entities/SupplierIcon.js +4 -3
- package/dist/Icons/ErrorIcon.d.ts +3 -0
- package/dist/Icons/ErrorIcon.js +4 -3
- package/dist/Icons/ExpandLessIcon.d.ts +3 -0
- package/dist/Icons/ExpandLessIcon.js +4 -3
- package/dist/Icons/ExpandMoreIcon.d.ts +3 -0
- package/dist/Icons/ExpandMoreIcon.js +4 -3
- package/dist/Icons/FileIcon.d.ts +3 -0
- package/dist/Icons/FileIcon.js +4 -3
- package/dist/Icons/InfoIcon.d.ts +3 -0
- package/dist/Icons/InfoIcon.js +4 -3
- package/dist/Icons/LocationIcon.d.ts +3 -0
- package/dist/Icons/LocationIcon.js +4 -3
- package/dist/Icons/PersonIcon.d.ts +3 -0
- package/dist/Icons/PersonIcon.js +5 -4
- package/dist/Icons/Ratings/DislikeIcon.d.ts +3 -0
- package/dist/Icons/Ratings/DislikeIcon.js +4 -3
- package/dist/Icons/Ratings/DissatisfiedIcon.d.ts +3 -0
- package/dist/Icons/Ratings/DissatisfiedIcon.js +4 -3
- package/dist/Icons/Ratings/LikeIcon.d.ts +3 -0
- package/dist/Icons/Ratings/LikeIcon.js +4 -3
- package/dist/Icons/Ratings/SatisfiedIcon.d.ts +3 -0
- package/dist/Icons/Ratings/SatisfiedIcon.js +4 -3
- package/dist/Icons/Ratings/StarIcon.d.ts +3 -0
- package/dist/Icons/Ratings/StarIcon.js +4 -3
- package/dist/Icons/Ratings/VeryDissatisfiedIcon.d.ts +3 -0
- package/dist/Icons/Ratings/VeryDissatisfiedIcon.js +4 -3
- package/dist/Icons/Ratings/VerySatisfiedIcon.d.ts +3 -0
- package/dist/Icons/Ratings/VerySatisfiedIcon.js +4 -3
- package/dist/Icons/WarningIcon.d.ts +3 -0
- package/dist/Icons/WarningIcon.js +4 -3
- package/dist/Init.d.ts +1 -0
- package/dist/Services/FileService.d.ts +5 -0
- package/dist/Services/FormService.d.ts +5 -0
- package/dist/Services/OrganizationService.d.ts +2 -0
- package/dist/Shared/CustomBtn/CustomBtn.d.ts +17 -0
- package/dist/Shared/ErkButton/ErkButton.d.ts +31 -0
- package/dist/Shared/ErkButton/ErkButton.stories.d.ts +23 -0
- package/dist/Shared/ErkCheckbox/ErkCheckBox.d.ts +19 -0
- package/dist/Shared/ErkCheckbox/ErkCheckBox.stories.d.ts +16 -0
- package/dist/Shared/ErkDatePicker/ErkDatePicker.d.ts +16 -0
- package/dist/Shared/ErkDatePicker/ErkDatePicker.js +3 -9
- package/dist/Shared/ErkDatePicker/ErkDatePicker.stories.d.ts +23 -0
- package/dist/Shared/ErkPhoneInput/EkrPhoneInput.d.ts +16 -0
- package/dist/Shared/ErkSelect/ErkSelect.d.ts +39 -0
- package/dist/Shared/ErkSelect/ErkSelect.stories.d.ts +18 -0
- package/dist/Shared/ErkSmartSelect/ErkSmartSelect.d.ts +28 -0
- package/dist/Shared/ErkSmartSelect/ErkSmartSelect.stories.d.ts +26 -0
- package/dist/Shared/ErkTextField/ErkTextField.d.ts +26 -0
- package/dist/Shared/ErkTextField/ErkTextField.js +1 -0
- package/dist/Shared/ErkTextField/ErkTextField.stories.d.ts +24 -0
- package/dist/Shared/ErkTimePicker/ErkTimePicker.d.ts +31 -0
- package/dist/Shared/InputIcon/InputIcon.d.ts +7 -0
- package/dist/Shared/InputIcon/InputIcon.js +2 -10
- package/dist/Shared/Loader/Loader.d.ts +17 -0
- package/dist/Shared/Navbar/Navbar.d.ts +8 -0
- package/dist/Shared/Navbar/Navbar.stories.d.ts +13 -0
- package/dist/Shared/Rating/Rating.d.ts +13 -0
- package/dist/Shared/Rating/Rating.stories.d.ts +15 -0
- package/dist/Shared/Rating/Ratings/LikeRating.d.ts +3 -0
- package/dist/Shared/Rating/Ratings/SatisfactionRating.d.ts +3 -0
- package/dist/Shared/Rating/Ratings/ScaleRating.d.ts +3 -0
- package/dist/Shared/Toggle/Toggle.d.ts +8 -0
- package/dist/States/GlobalSlice.d.ts +46 -0
- package/dist/States/SiteSlice.d.ts +77 -0
- package/dist/States/WidthStatsSlice.d.ts +7 -0
- package/dist/Utils/AxiosAPI.d.ts +2 -0
- package/dist/Utils/AxiosWidget.d.ts +2 -0
- package/dist/Utils/CBRFunctions.d.ts +8 -0
- package/dist/Utils/DraftFunctions.d.ts +56 -0
- package/dist/Utils/FormStepFunctions.d.ts +15 -0
- package/dist/Utils/LocaleUtils.d.ts +2 -0
- package/dist/Utils/MaterialProviders.d.ts +24 -0
- package/dist/Utils/MaterialProviders.js +0 -1
- package/dist/Utils/MuiClassnameSetup.d.ts +1 -0
- package/dist/Utils/PhoneFunctions.d.ts +2 -0
- package/dist/Utils/TestUtils.d.ts +70 -0
- package/dist/Utils/store.d.ts +29 -0
- package/dist/Widget.d.ts +1 -0
- package/dist/Widget.js +1 -0
- package/dist/__tests__/setup.d.ts +1 -0
- package/dist/constants/AYFFormStepTypes.d.ts +9 -0
- package/dist/constants/CBRFormStepTypes.d.ts +21 -0
- package/dist/constants/ConditionTypes.d.ts +27 -0
- package/dist/constants/Draft/DraftEntityDataTypes.d.ts +11 -0
- package/dist/constants/Draft/DraftEntityTypes.d.ts +3 -0
- package/dist/constants/Draft/DraftStyleTypes.d.ts +7 -0
- package/dist/constants/EntityPropertyTypes.d.ts +10 -0
- package/dist/constants/Files/FileExtensions.d.ts +3 -0
- package/dist/constants/Files/FileMaxSize.d.ts +2 -0
- package/dist/constants/FormStepTypes.d.ts +64 -0
- package/dist/constants/IconTypes.d.ts +15 -0
- package/dist/constants/InternalFormStyle.d.ts +3 -0
- package/dist/constants/TicketPropertyTypes.d.ts +3 -0
- package/dist/hooks.d.ts +7 -0
- package/dist/index.lib.d.ts +7 -0
- package/dist/main.d.ts +3 -0
- package/dist/main.js +2 -1
- package/package.json +27 -27
- package/dist/{Icons/@IconTypes.js → App/AppFunctions.test.d.ts} +0 -0
- package/dist/Icons/{ErkIcon.module.css → @ErkIcon.css} +1 -1
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { DependencyStore, StepDependency } from '../Form/Form';
|
|
2
|
+
import { GBaseStep } from '../@Types/GenericFormSteps';
|
|
3
|
+
import { FormStep } from '../@Types/FormStep';
|
|
4
|
+
import { CustomStep } from '../FormSteps/CustomStep';
|
|
5
|
+
import { CBRFormStep } from '../@Types/CBRFormStep';
|
|
6
|
+
import type { PayloadAction } from '@reduxjs/toolkit';
|
|
7
|
+
import { FieldValues } from 'react-hook-form';
|
|
8
|
+
import { Form } from '../@Types';
|
|
9
|
+
export interface SiteState {
|
|
10
|
+
dependencies: DependencyStore;
|
|
11
|
+
values: ValuesStore;
|
|
12
|
+
idCurrentSection: string | null;
|
|
13
|
+
previousSections: string[];
|
|
14
|
+
nextSections: string[];
|
|
15
|
+
focusStep?: string;
|
|
16
|
+
}
|
|
17
|
+
export interface ValuesStore {
|
|
18
|
+
global: Record<string, any>;
|
|
19
|
+
sections: Record<string, Record<string, any>>;
|
|
20
|
+
}
|
|
21
|
+
export declare const SiteSlice: import("@reduxjs/toolkit").Slice<SiteState, {
|
|
22
|
+
setStepDependency: (state: import("immer").WritableDraft<SiteState>, { payload: { step: { id, type, idSection }, value, }, }: PayloadAction<{
|
|
23
|
+
step: GBaseStep;
|
|
24
|
+
value: StepDependency["value"];
|
|
25
|
+
}>) => void;
|
|
26
|
+
clearDependency: (state: import("immer").WritableDraft<SiteState>, { payload: { id, idSection } }: PayloadAction<GBaseStep>) => void;
|
|
27
|
+
setEmptyDependency: (state: import("immer").WritableDraft<SiteState>, { payload: { step: { id }, empty, }, }: PayloadAction<{
|
|
28
|
+
step: GBaseStep;
|
|
29
|
+
empty: StepDependency["empty"];
|
|
30
|
+
}>) => void;
|
|
31
|
+
addStepsDependencies: (state: import("immer").WritableDraft<SiteState>, { payload: { steps, customSteps, allSteps }, }: PayloadAction<{
|
|
32
|
+
steps: Record<string, FormStep | CBRFormStep>;
|
|
33
|
+
customSteps: Record<string, CustomStep>;
|
|
34
|
+
allSteps: Record<string, FormStep | CBRFormStep>;
|
|
35
|
+
}>) => void;
|
|
36
|
+
handlePrevious: (state: import("immer").WritableDraft<SiteState>, { payload: { values, form } }: PayloadAction<{
|
|
37
|
+
values: Record<string, any>;
|
|
38
|
+
form: Form;
|
|
39
|
+
}>) => void;
|
|
40
|
+
handleNext: (state: import("immer").WritableDraft<SiteState>, { payload: { values, form } }: PayloadAction<{
|
|
41
|
+
values: Record<string, any>;
|
|
42
|
+
form: Form;
|
|
43
|
+
}>) => void;
|
|
44
|
+
updateNestedValues: (state: import("immer").WritableDraft<SiteState>, { payload: { key, values } }: PayloadAction<{
|
|
45
|
+
key: string;
|
|
46
|
+
values: Record<string, any>;
|
|
47
|
+
}>) => void;
|
|
48
|
+
focusStep: (state: import("immer").WritableDraft<SiteState>, { payload }: PayloadAction<{
|
|
49
|
+
step: FormStep;
|
|
50
|
+
values: FieldValues;
|
|
51
|
+
} | undefined>) => void;
|
|
52
|
+
}, "site", "site", import("@reduxjs/toolkit").SliceSelectors<SiteState>>;
|
|
53
|
+
export declare const focusStep: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<{
|
|
54
|
+
step: FormStep;
|
|
55
|
+
values: FieldValues;
|
|
56
|
+
} | undefined, "site/focusStep">, clearDependency: import("@reduxjs/toolkit").ActionCreatorWithPayload<GBaseStep, "site/clearDependency">, setStepDependency: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
57
|
+
step: GBaseStep;
|
|
58
|
+
value: StepDependency["value"];
|
|
59
|
+
}, "site/setStepDependency">, addStepsDependencies: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
60
|
+
steps: Record<string, FormStep | CBRFormStep>;
|
|
61
|
+
customSteps: Record<string, CustomStep>;
|
|
62
|
+
allSteps: Record<string, FormStep | CBRFormStep>;
|
|
63
|
+
}, "site/addStepsDependencies">, setEmptyDependency: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
64
|
+
step: GBaseStep;
|
|
65
|
+
empty: StepDependency["empty"];
|
|
66
|
+
}, "site/setEmptyDependency">, handlePrevious: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
67
|
+
values: Record<string, any>;
|
|
68
|
+
form: Form;
|
|
69
|
+
}, "site/handlePrevious">, handleNext: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
70
|
+
values: Record<string, any>;
|
|
71
|
+
form: Form;
|
|
72
|
+
}, "site/handleNext">, updateNestedValues: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
73
|
+
key: string;
|
|
74
|
+
values: Record<string, any>;
|
|
75
|
+
}, "site/updateNestedValues">;
|
|
76
|
+
export default SiteSlice;
|
|
77
|
+
export declare function addPagedValues(steps: Record<string, FormStep>, values: Record<string, any>, original: Record<string, any>, path?: string): void;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { WidthStats } from '../Form/Form';
|
|
2
|
+
import type { PayloadAction } from '@reduxjs/toolkit';
|
|
3
|
+
export declare const WidthStatsSlice: import("@reduxjs/toolkit").Slice<WidthStats, {
|
|
4
|
+
updateWidthStats: (state: import("immer").WritableDraft<WidthStats>, { payload }: PayloadAction<WidthStats>) => WidthStats;
|
|
5
|
+
}, "widthStats", "widthStats", import("@reduxjs/toolkit").SliceSelectors<WidthStats>>;
|
|
6
|
+
export declare const updateWidthStats: import("@reduxjs/toolkit").ActionCreatorWithPayload<WidthStats, "widthStats/updateWidthStats">;
|
|
7
|
+
export default WidthStatsSlice;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { RawDraftContentBlock, RawDraftContentState } from 'draft-js';
|
|
2
|
+
import { EurekaDraft } from '../@Types/Draft/Draft';
|
|
3
|
+
import { DraftEntityData } from '../@Types/Draft/DraftEntityData';
|
|
4
|
+
import { DependencyStore } from '../Form/Form';
|
|
5
|
+
import { FormStep } from '../@Types/FormStep';
|
|
6
|
+
import { Form } from '../@Types';
|
|
7
|
+
interface FormCache {
|
|
8
|
+
form: Form;
|
|
9
|
+
dependencies: DependencyStore;
|
|
10
|
+
ticket?: {
|
|
11
|
+
caseNumber: string;
|
|
12
|
+
};
|
|
13
|
+
entityValue?: {
|
|
14
|
+
_id: string;
|
|
15
|
+
label: string;
|
|
16
|
+
[key: string]: any;
|
|
17
|
+
};
|
|
18
|
+
company?: {
|
|
19
|
+
_id: string;
|
|
20
|
+
label: string;
|
|
21
|
+
[key: string]: any;
|
|
22
|
+
};
|
|
23
|
+
entity?: Record<string, any>;
|
|
24
|
+
}
|
|
25
|
+
export declare function stringToDraft(text: string): RawDraftContentState;
|
|
26
|
+
export declare const getRawText: (draft?: RawDraftContentState, text?: string) => RawDraftContentState;
|
|
27
|
+
export declare function mapDraftEntities(cache: FormCache, draft: EurekaDraft, mapToId?: boolean): RawDraftContentState;
|
|
28
|
+
interface MappedBlock {
|
|
29
|
+
text: string;
|
|
30
|
+
inlineStyleRanges?: RawDraftContentBlock['inlineStyleRanges'];
|
|
31
|
+
}
|
|
32
|
+
export declare const draftEntityMapper: (cache: FormCache, entityData: DraftEntityData, mapToId?: boolean) => MappedBlock;
|
|
33
|
+
type DraftBlock = EurekaDraft['blocks'][0];
|
|
34
|
+
/**
|
|
35
|
+
* The function will generate text for given draftjs editorContent.
|
|
36
|
+
*/
|
|
37
|
+
export declare function draftToString(cache: FormCache, draft: EurekaDraft, mapToId?: boolean): string;
|
|
38
|
+
/**
|
|
39
|
+
* Function to check if a block is of type list.
|
|
40
|
+
*/
|
|
41
|
+
export declare function isList(blockType: DraftBlock['type']): boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Function will return text for Entity.
|
|
44
|
+
*/
|
|
45
|
+
export declare function getEntityText(entityMap: EurekaDraft['entityMap'], entityKey: number, blockText: string): string;
|
|
46
|
+
/**
|
|
47
|
+
* Function to check if the block is an atomic entity block.
|
|
48
|
+
*/
|
|
49
|
+
export declare function isAtomicBlock(block: DraftBlock): boolean;
|
|
50
|
+
/**
|
|
51
|
+
* The function returns true if the string passed to it has no content.
|
|
52
|
+
*/
|
|
53
|
+
export declare function isEmptyString(str: string): boolean;
|
|
54
|
+
export declare function getDepthPadding(depth: number): string;
|
|
55
|
+
export declare function formStepToString(step: FormStep, value: any, mapToId?: boolean): string | null;
|
|
56
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { AYFFormStep } from '../@Types/AYFFormStep';
|
|
2
|
+
import { CBRFormStep } from '../@Types/CBRFormStep';
|
|
3
|
+
import { Condition } from '../@Types/Condition';
|
|
4
|
+
import { FormStep } from '../@Types/FormStep';
|
|
5
|
+
import { MapperElement } from '../@Types/MapperElement';
|
|
6
|
+
import { CustomStep } from '../FormSteps/CustomStep';
|
|
7
|
+
export declare function calcRecursiveData<Type>(element: Readonly<MapperElement<Type>>, newSteps: Record<string, FormStep>, customSteps: Record<string, CustomStep>): void;
|
|
8
|
+
export declare const calcRecursiveCondition: (condition: Condition, ids: Record<string, string>) => void;
|
|
9
|
+
/**
|
|
10
|
+
* Utility function to calc the substeps of a step
|
|
11
|
+
* @param step step to calc the substeps
|
|
12
|
+
* @param idModifier optional modifier for the ids of the substeps and all other properties
|
|
13
|
+
* @returns list of the ids of the substeps of the step, if modifier returns modified steps
|
|
14
|
+
*/
|
|
15
|
+
export declare const calcSubSteps: (idStep: string, allSteps: Record<string, FormStep | CBRFormStep | AYFFormStep>, idModifier?: (idSubStep: string) => string) => string[];
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FormStyle } from '../@Types/Form';
|
|
3
|
+
import { Palette, PaletteColor } from '@mui/material/styles/createPalette';
|
|
4
|
+
declare module '@mui/material/styles' {
|
|
5
|
+
interface Palette {
|
|
6
|
+
outline: Palette['primary'];
|
|
7
|
+
helperText: Palette['text'];
|
|
8
|
+
stepBackgroundColor: Palette['background'];
|
|
9
|
+
}
|
|
10
|
+
interface PaletteOptions {
|
|
11
|
+
outline: PaletteOptions['primary'];
|
|
12
|
+
helperText: PaletteOptions['text'];
|
|
13
|
+
stepBackgroundColor: PaletteOptions['background'];
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
export type PaletteKey = keyof {
|
|
17
|
+
[Key in keyof Palette as Palette[Key] extends PaletteColor ? Key : never]: true;
|
|
18
|
+
};
|
|
19
|
+
interface MaterialProvidersProps {
|
|
20
|
+
children: React.ReactNode;
|
|
21
|
+
formStyle: FormStyle;
|
|
22
|
+
}
|
|
23
|
+
declare function MaterialProviders({ children, formStyle }: MaterialProvidersProps): JSX.Element;
|
|
24
|
+
export default MaterialProviders;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import '../Utils/MuiClassnameSetup';
|
|
3
2
|
import { esES as DatePickersEs } from '@mui/x-date-pickers/locales';
|
|
4
3
|
import { createTheme, ThemeProvider } from '@mui/material';
|
|
5
4
|
import { AdapterDateFns } from '@mui/x-date-pickers/AdapterDateFnsV3';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const SEED = "EF";
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { RenderHookOptions, RenderHookResult, RenderOptions } from '@testing-library/react';
|
|
3
|
+
import { AppStore } from './store';
|
|
4
|
+
interface ExtendedRenderOptions extends Omit<RenderOptions, 'queries'> {
|
|
5
|
+
store?: AppStore;
|
|
6
|
+
}
|
|
7
|
+
export declare function renderWithProviders(ui: React.ReactElement, { store, ...renderOptions }?: ExtendedRenderOptions): {
|
|
8
|
+
container: HTMLElement;
|
|
9
|
+
baseElement: HTMLElement;
|
|
10
|
+
debug: (baseElement?: import("react-dom/client").Container | (Document | Element) | Array<import("react-dom/client").Container | (Document | Element)> | undefined, maxLength?: number | undefined, options?: import("pretty-format").OptionsReceived | undefined) => void;
|
|
11
|
+
rerender: (ui: React.ReactNode) => void;
|
|
12
|
+
unmount: () => void;
|
|
13
|
+
asFragment: () => DocumentFragment;
|
|
14
|
+
getByLabelText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined) => HTMLElement;
|
|
15
|
+
getAllByLabelText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined) => HTMLElement[];
|
|
16
|
+
queryByLabelText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined) => HTMLElement | null;
|
|
17
|
+
queryAllByLabelText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined) => HTMLElement[];
|
|
18
|
+
findByLabelText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement>;
|
|
19
|
+
findAllByLabelText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement[]>;
|
|
20
|
+
getByPlaceholderText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement;
|
|
21
|
+
getAllByPlaceholderText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement[];
|
|
22
|
+
queryByPlaceholderText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement | null;
|
|
23
|
+
queryAllByPlaceholderText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement[];
|
|
24
|
+
findByPlaceholderText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement>;
|
|
25
|
+
findAllByPlaceholderText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement[]>;
|
|
26
|
+
getByText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined) => HTMLElement;
|
|
27
|
+
getAllByText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined) => HTMLElement[];
|
|
28
|
+
queryByText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined) => HTMLElement | null;
|
|
29
|
+
queryAllByText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined) => HTMLElement[];
|
|
30
|
+
findByText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement>;
|
|
31
|
+
findAllByText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement[]>;
|
|
32
|
+
getByAltText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement;
|
|
33
|
+
getAllByAltText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement[];
|
|
34
|
+
queryByAltText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement | null;
|
|
35
|
+
queryAllByAltText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement[];
|
|
36
|
+
findByAltText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement>;
|
|
37
|
+
findAllByAltText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement[]>;
|
|
38
|
+
getByTitle: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement;
|
|
39
|
+
getAllByTitle: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement[];
|
|
40
|
+
queryByTitle: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement | null;
|
|
41
|
+
queryAllByTitle: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement[];
|
|
42
|
+
findByTitle: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement>;
|
|
43
|
+
findAllByTitle: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement[]>;
|
|
44
|
+
getByDisplayValue: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement;
|
|
45
|
+
getAllByDisplayValue: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement[];
|
|
46
|
+
queryByDisplayValue: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement | null;
|
|
47
|
+
queryAllByDisplayValue: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement[];
|
|
48
|
+
findByDisplayValue: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement>;
|
|
49
|
+
findAllByDisplayValue: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement[]>;
|
|
50
|
+
getByRole: (role: import("@testing-library/dom").ByRoleMatcher, options?: import("@testing-library/dom").ByRoleOptions | undefined) => HTMLElement;
|
|
51
|
+
getAllByRole: (role: import("@testing-library/dom").ByRoleMatcher, options?: import("@testing-library/dom").ByRoleOptions | undefined) => HTMLElement[];
|
|
52
|
+
queryByRole: (role: import("@testing-library/dom").ByRoleMatcher, options?: import("@testing-library/dom").ByRoleOptions | undefined) => HTMLElement | null;
|
|
53
|
+
queryAllByRole: (role: import("@testing-library/dom").ByRoleMatcher, options?: import("@testing-library/dom").ByRoleOptions | undefined) => HTMLElement[];
|
|
54
|
+
findByRole: (role: import("@testing-library/dom").ByRoleMatcher, options?: import("@testing-library/dom").ByRoleOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement>;
|
|
55
|
+
findAllByRole: (role: import("@testing-library/dom").ByRoleMatcher, options?: import("@testing-library/dom").ByRoleOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement[]>;
|
|
56
|
+
getByTestId: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement;
|
|
57
|
+
getAllByTestId: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement[];
|
|
58
|
+
queryByTestId: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement | null;
|
|
59
|
+
queryAllByTestId: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement[];
|
|
60
|
+
findByTestId: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement>;
|
|
61
|
+
findAllByTestId: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement[]>;
|
|
62
|
+
store: import("@reduxjs/toolkit").EnhancedStore<import("./store").EurekaFormsState, import("redux").AnyAction, import("@reduxjs/toolkit").Tuple<[import("redux").StoreEnhancer<{
|
|
63
|
+
dispatch: import("redux-thunk").ThunkDispatch<import("./store").EurekaFormsState, undefined, import("redux").UnknownAction>;
|
|
64
|
+
}>, import("redux").StoreEnhancer]>>;
|
|
65
|
+
};
|
|
66
|
+
interface ExtendedRenderHookOptions<TProps> extends Omit<RenderHookOptions<TProps>, 'wrapper'> {
|
|
67
|
+
store?: AppStore;
|
|
68
|
+
}
|
|
69
|
+
export declare function renderHookWithProviders<TProps, TResult>(callback: (props: TProps) => TResult, { store, ...renderHookOptions }?: ExtendedRenderHookOptions<TProps>): RenderHookResult<TResult, TProps>;
|
|
70
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { AnyAction } from '@reduxjs/toolkit';
|
|
2
|
+
import { GlobalState } from '../States/GlobalSlice';
|
|
3
|
+
import { SiteState } from '../States/SiteSlice';
|
|
4
|
+
import { WidthStats } from '../Form/Form';
|
|
5
|
+
export interface RootState {
|
|
6
|
+
global: GlobalState;
|
|
7
|
+
site: SiteState;
|
|
8
|
+
widthStats: WidthStats;
|
|
9
|
+
}
|
|
10
|
+
export declare const defaultRootState: RootState;
|
|
11
|
+
export type EurekaFormsState = Record<string, RootState>;
|
|
12
|
+
export declare function EurekaFormsReducer(state: EurekaFormsState | undefined, action: AnyAction): EurekaFormsState;
|
|
13
|
+
export declare const store: import("@reduxjs/toolkit").EnhancedStore<EurekaFormsState, AnyAction, import("@reduxjs/toolkit").Tuple<[import("redux").StoreEnhancer<{
|
|
14
|
+
dispatch: import("redux-thunk").ThunkDispatch<EurekaFormsState, undefined, import("redux").UnknownAction>;
|
|
15
|
+
}>, import("redux").StoreEnhancer]>>;
|
|
16
|
+
export type AppDispatch = typeof store.dispatch;
|
|
17
|
+
export type AppStore = typeof store;
|
|
18
|
+
export declare const getAppState: import("@reduxjs/toolkit").AsyncThunk<RootState, {
|
|
19
|
+
idForm: string;
|
|
20
|
+
}, {
|
|
21
|
+
state?: unknown;
|
|
22
|
+
dispatch?: import("redux-thunk").ThunkDispatch<unknown, unknown, import("redux").UnknownAction>;
|
|
23
|
+
extra?: unknown;
|
|
24
|
+
rejectValue?: unknown;
|
|
25
|
+
serializedErrorType?: unknown;
|
|
26
|
+
pendingMeta?: unknown;
|
|
27
|
+
fulfilledMeta?: unknown;
|
|
28
|
+
rejectedMeta?: unknown;
|
|
29
|
+
}>;
|
package/dist/Widget.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import './Utils/MuiClassnameSetup';
|
package/dist/Widget.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import ReactDOM from 'react-dom';
|
|
3
3
|
import App from './App/App';
|
|
4
|
+
import './Utils/MuiClassnameSetup';
|
|
4
5
|
const WIDGET_ID = document.currentScript?.getAttribute('data-id') ?? 'widget:eureka';
|
|
5
6
|
const element = document.getElementById(WIDGET_ID);
|
|
6
7
|
const props = {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare enum AYFFormStepTypes {
|
|
2
|
+
AYF_START_MONTH = "AYF_START_MONTH",
|
|
3
|
+
AYF_END_MONTH = "AYF_END_MONTH",
|
|
4
|
+
AYF_YEAR = "AYF_YEAR",
|
|
5
|
+
AYF_BILL_NUM = "AYF_BILL_NUM",
|
|
6
|
+
AYF_CUT_OFF_DATE = "AYF_CUT_OFF_DATE",
|
|
7
|
+
AYF_ICA_CITY = "AYF_ICA_CITY"
|
|
8
|
+
}
|
|
9
|
+
export default AYFFormStepTypes;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
declare enum CBRFormStepTypes {
|
|
2
|
+
CBR_MACRO_PROYECTO = "CBR_MACRO_PROYECTO",
|
|
3
|
+
CBR_POSTVENTA = "CBR_POSTVENTA",
|
|
4
|
+
CBR_FIRST_NAME = "CBR_FIRST_NAME",
|
|
5
|
+
CBR_MIDDLE_NAME = "CBR_MIDDLE_NAME",
|
|
6
|
+
CBR_LAST_NAME = "CBR_LAST_NAME",
|
|
7
|
+
CBR_SECOND_LAST_NAME = "CBR_SECOND_LAST_NAME",
|
|
8
|
+
CBR_DOC = "CBR_DOC",
|
|
9
|
+
CBR_CEL = "CBR_CEL",
|
|
10
|
+
CBR_PHONE = "CBR_PHONE",
|
|
11
|
+
CBR_EMAIL = "CBR_EMAIL",
|
|
12
|
+
CBR_PROYECTO = "CBR_PROYECTO",
|
|
13
|
+
CBR_TIPO_DOC = "CBR_TIPO_DOC",
|
|
14
|
+
CBR_TIPO_SOLICITANTE = "CBR_TIPO_SOLICITANTE",
|
|
15
|
+
CBR_INMUEBLE = "CBR_INMUEBLE",
|
|
16
|
+
CBR_TIPO_ESPACIO = "CBR_TIPO_ESPACIO",
|
|
17
|
+
CBR_LOCATIVAS = "CBR_LOCATIVAS",
|
|
18
|
+
CBR_INCIDENCIAS = "CBR_INCIDENCIAS",
|
|
19
|
+
CBR_COMENTARIO = "CBR_COMENTARIO"
|
|
20
|
+
}
|
|
21
|
+
export default CBRFormStepTypes;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export declare enum ConditionTypes {
|
|
2
|
+
EXPRESSION = "EXPRESSION",
|
|
3
|
+
FORM_STEP = "FORM_STEP",
|
|
4
|
+
ENTITYVALUE = "ENTITYVALUE"
|
|
5
|
+
}
|
|
6
|
+
export default ConditionTypes;
|
|
7
|
+
export declare enum ExpressionTypes {
|
|
8
|
+
'OR' = "OR",
|
|
9
|
+
'AND' = "AND"
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Operators available to all conditions
|
|
13
|
+
*/
|
|
14
|
+
export declare enum OperatorTypes {
|
|
15
|
+
EQUAL = "EQUAL",
|
|
16
|
+
NOTEQUAL = "NOTEQUAL",
|
|
17
|
+
INCLUDES = "INCLUDES",
|
|
18
|
+
NOTINCLUDES = "NOTINCLUDES",
|
|
19
|
+
LESS = "LESS",
|
|
20
|
+
MORE = "MORE",
|
|
21
|
+
PAST_RELATIVE_LESS = "PAST_RELATIVE_LESS",
|
|
22
|
+
PAST_RELATIVE_MORE = "PAST_RELATIVE_MORE",
|
|
23
|
+
FUTURE_RELATIVE_LESS = "FUTURE_RELATIVE_LESS",
|
|
24
|
+
FUTURE_RELATIVE_MORE = "FUTURE_RELATIVE_MORE",
|
|
25
|
+
EXISTS = "EXISTS",
|
|
26
|
+
NOTEXISTS = "NOTEXISTS"
|
|
27
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare enum DraftEntityDataTypes {
|
|
2
|
+
DATE = "DATE",//Utils
|
|
3
|
+
NESTED = "NESTED",// Toca renderizar un subdraft
|
|
4
|
+
TICKET = "TICKET",
|
|
5
|
+
COMPANY = "COMPANY",
|
|
6
|
+
CONDITION_MET = "CONDITION_MET",//Utils
|
|
7
|
+
FORM_STEP = "FORM_STEP"
|
|
8
|
+
}
|
|
9
|
+
export declare enum DraftEntityDataMappingTypes {
|
|
10
|
+
ENTITYVALUE_MAPPING = "ENTITYVALUE_MAPPING"
|
|
11
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
export declare enum FormTypes {
|
|
2
|
+
STEPPER = "STEPPER",
|
|
3
|
+
COLUMN = "COLUMN"
|
|
4
|
+
}
|
|
5
|
+
export declare enum FormStyleTypes {
|
|
6
|
+
MATERIAL = "MATERIAL"
|
|
7
|
+
}
|
|
8
|
+
export declare enum FormStepTypes {
|
|
9
|
+
TIMEPICKER = "TIMEPICKER",
|
|
10
|
+
TITLE = "TITLE",
|
|
11
|
+
RATING = "RATING",
|
|
12
|
+
CHECKBOX = "CHECKBOX",
|
|
13
|
+
TEXTAREA = "TEXTAREA",
|
|
14
|
+
DATEPICKER = "DATEPICKER",
|
|
15
|
+
FILEUPLOAD = "FILEUPLOAD",
|
|
16
|
+
TEXTINPUT = "TEXTINPUT",
|
|
17
|
+
SEPARATOR = "SEPARATOR",
|
|
18
|
+
SELECTOR = "SELECTOR",
|
|
19
|
+
CLASSIFIER_SELECTOR = "CLASSIFIER_SELECTOR",
|
|
20
|
+
COLLAPSIBLE = "COLLAPSIBLE",
|
|
21
|
+
MAPPER = "MAPPER",
|
|
22
|
+
ENTITYVALUEPICKER = "ENTITYVALUEPICKER",
|
|
23
|
+
API_SELECTOR = "API_SELECTOR"
|
|
24
|
+
}
|
|
25
|
+
export declare enum OptionTypes {
|
|
26
|
+
DEFAULT = "DEFAULT",
|
|
27
|
+
NESTED = "NESTED",
|
|
28
|
+
ADD_SECTION = "ADD_SECTION"
|
|
29
|
+
}
|
|
30
|
+
export declare enum ClassifierOptionTypes {
|
|
31
|
+
DEFAULT = "CLASSIFIER_DEFAULT",
|
|
32
|
+
HIDE = "CLASSIFIER_HIDE",
|
|
33
|
+
NESTED = "CLASSIFIER_NESTED"
|
|
34
|
+
}
|
|
35
|
+
export declare enum EntityValueOptionTypes {
|
|
36
|
+
DEFAULT = "ENTITY_VALUE_DEFAULT",
|
|
37
|
+
HIDE = "ENTITY_VALUE_HIDE",
|
|
38
|
+
NESTED = "ENTITY_VALUE_NESTED"
|
|
39
|
+
}
|
|
40
|
+
export declare enum ApiSelectorOptionTypes {
|
|
41
|
+
DEFAULT = "API_SELECTOR_DEFAULT",
|
|
42
|
+
HIDE = "API_SELECTOR_HIDE",
|
|
43
|
+
NESTED = "API_SELECTOR_NESTED"
|
|
44
|
+
}
|
|
45
|
+
export declare enum RatingTypes {
|
|
46
|
+
SCALE = "SCALE",
|
|
47
|
+
SATISFACTION = "SATISFACTION",
|
|
48
|
+
LIKE = "LIKE"
|
|
49
|
+
}
|
|
50
|
+
export default FormStepTypes;
|
|
51
|
+
export declare enum MapperStyleTypes {
|
|
52
|
+
PILL = "PILL",
|
|
53
|
+
LIST = "LIST",
|
|
54
|
+
PAGED = "PAGED",
|
|
55
|
+
INLINE = "INLINE"
|
|
56
|
+
}
|
|
57
|
+
export declare enum EntityValueDataTypes {
|
|
58
|
+
STEP = "STEP",
|
|
59
|
+
VALUE = "VALUE"
|
|
60
|
+
}
|
|
61
|
+
export declare enum ApiSelectorParamTypes {
|
|
62
|
+
STEP = "STEP",
|
|
63
|
+
VALUE = "VALUE"
|
|
64
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare enum IconTypes {
|
|
2
|
+
PROJECT = "PROJECT",
|
|
3
|
+
PROPERTY = "PROPERTY",
|
|
4
|
+
SPACE = "SPACE",
|
|
5
|
+
LEAK = "LEAK",
|
|
6
|
+
PERSON = "PERSON",
|
|
7
|
+
DOCUMENT = "DOCUMENT",
|
|
8
|
+
HANDSHAKE = "HANDSHAKE",
|
|
9
|
+
CHECKLIST = "CHECKLIST",
|
|
10
|
+
SUPPLIER = "SUPPLIER",
|
|
11
|
+
GENERIC = "GENERIC",
|
|
12
|
+
LOCATION = "LOCATION",
|
|
13
|
+
CALENDAR = "CALENDAR"
|
|
14
|
+
}
|
|
15
|
+
export default IconTypes;
|
package/dist/hooks.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { TypedUseSelectorHook } from 'react-redux';
|
|
2
|
+
import { type RootState, type AppDispatch } from './Utils/store';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
export declare const StoreContext: React.Context<any>;
|
|
5
|
+
export declare const useAppDispatch: () => AppDispatch;
|
|
6
|
+
export declare const useAppSelector: TypedUseSelectorHook<RootState>;
|
|
7
|
+
export declare const selectBreakPoint: (state: RootState) => number;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import EurekaForm, { AppProps as EurekaFormProps } from './App/App';
|
|
2
|
+
import { StepProps } from './FormSteps/Step';
|
|
3
|
+
import * as StepFunctions from './FormSteps/StepFunctions';
|
|
4
|
+
export type { StepProps, EurekaFormProps };
|
|
5
|
+
export { EurekaForm, StepFunctions };
|
|
6
|
+
export default EurekaForm;
|
|
7
|
+
export { default as ReactFromModule } from 'react';
|
package/dist/main.d.ts
ADDED
package/dist/main.js
CHANGED
|
@@ -4,6 +4,7 @@ import ReactDOM from 'react-dom/client';
|
|
|
4
4
|
import styles from './index.module.css';
|
|
5
5
|
import App from './App/App';
|
|
6
6
|
import './index.css';
|
|
7
|
+
import './Utils/MuiClassnameSetup';
|
|
7
8
|
const urlParams = new URLSearchParams(window.location.search);
|
|
8
9
|
const values = urlParams.get('data-values');
|
|
9
10
|
let dataValues = undefined;
|
|
@@ -15,7 +16,7 @@ if (values) {
|
|
|
15
16
|
console.error('Invalid data-values JSON', error);
|
|
16
17
|
}
|
|
17
18
|
}
|
|
18
|
-
ReactDOM.createRoot(document.getElementById('eureka-root')).render(_jsx("div", { className: styles.eurekaForm, children: _jsx(App, { isWidget: false, apiKey: window.location.pathname.replace('/', ''), valuesData: dataValues, scrollToTop: () => {
|
|
19
|
+
ReactDOM.createRoot(document.getElementById('eureka-root')).render(_jsx("div", { className: styles.eurekaForm, children: _jsx(App, { isWidget: false, idOrganization: urlParams.get('idOrganization') ?? undefined, apiKey: window.location.pathname.replace('/', ''), valuesData: dataValues, scrollToTop: () => {
|
|
19
20
|
location.href = '#';
|
|
20
21
|
location.href = '#eureka-root';
|
|
21
22
|
location.href = '#';
|