@arquimedes.co/eureka-forms 2.0.32 → 2.0.34-test
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/.babelrc.json +18 -0
- package/.dockerignore +1 -0
- package/.env +4 -0
- package/.eslintrc.js +40 -0
- package/.gitattributes +1 -0
- package/.github/workflows/CI-CD.yml +76 -0
- package/.github/workflows/Deploy-Forms.yml +253 -0
- package/.github/workflows/Test-Forms.yml +193 -0
- package/.prettierrc.yaml +11 -0
- package/.storybook/main.ts +55 -0
- package/.storybook/preview-head.html +1 -0
- package/.storybook/preview.tsx +29 -0
- package/.vscode/settings.json +7 -0
- package/ContentTemplate.yaml +92 -0
- package/Embeddables/.env +3 -0
- package/Embeddables/package-lock.json +45340 -0
- package/Embeddables/package.json +38 -0
- package/Embeddables/public/favicon.ico +0 -0
- package/Embeddables/public/index.html +22 -0
- package/Embeddables/src/App.module.css +30 -0
- package/Embeddables/src/App.tsx +21 -0
- package/Embeddables/src/LibComponent.tsx +20 -0
- package/Embeddables/src/WidgetComponent.tsx +38 -0
- package/Embeddables/src/index.tsx +10 -0
- package/Embeddables/tsconfig.json +4 -0
- package/LocalEmbeddables.sh +26 -0
- package/README +1 -1
- package/base.tsconfig.json +44 -0
- package/cjs.tsconfig.json +8 -0
- package/content/Capta/Capta.svg +1 -0
- package/content/Capta/CaptaIcon.png +0 -0
- package/content/Capta/CaptaSmall.svg +1 -0
- package/content/Capta/CaptaSqr.png +0 -0
- package/content/Capta/CaptaSqrIcon.png +0 -0
- package/content/Capta/CaptaWhite.png +0 -0
- package/content/Capta/CaptaWhite.svg +1 -0
- package/content/Capta/CaptaWhiteSmall.svg +1 -0
- package/content/Capta/Ratings/like-0.png +0 -0
- package/content/Capta/Ratings/like-1.png +0 -0
- package/content/Capta/Ratings/satisfaction-1.png +0 -0
- package/content/Capta/Ratings/satisfaction-2.png +0 -0
- package/content/Capta/Ratings/satisfaction-3.png +0 -0
- package/content/Capta/Ratings/satisfaction-4.png +0 -0
- package/content/Capta/Ratings/scale.png +0 -0
- package/content/LogosClientes/A&A-SF.png +0 -0
- package/content/LogosClientes/ASS-SF.png +0 -0
- package/content/LogosClientes/Arias.png +0 -0
- package/content/LogosClientes/Arqui y Conc.png +0 -0
- package/content/LogosClientes/Arqui&Conc.png +0 -0
- package/content/LogosClientes/GTC-SF.png +0 -0
- package/content/LogosClientes/GTC.png +0 -0
- package/content/LogosClientes/LVP-SF.png +0 -0
- package/content/LogosClientes/LVP2.png +0 -0
- package/content/LogosClientes/LogoAC.png +0 -0
- package/content/LogosClientes/LogoLVP.png +0 -0
- package/content/LogosClientes/LogoMelendez.png +0 -0
- package/content/LogosClientes/LogoOspinas.png +0 -0
- package/content/LogosClientes/LogoServimercadeo.png +0 -0
- package/content/LogosClientes/LogoSinco.png +0 -0
- package/content/LogosClientes/Melendez-SF.png +0 -0
- package/content/LogosClientes/Melendez.png +0 -0
- package/content/LogosClientes/Ospina-SF.png +0 -0
- package/content/LogosClientes/Ospinas.png +0 -0
- package/content/LogosClientes/Prodesa-SF.png +0 -0
- package/content/LogosClientes/Prodesa.png +0 -0
- package/content/LogosClientes/SINCO-SF.png +0 -0
- package/content/LogosClientes/SM-SF.png +0 -0
- package/content/LogosClientes/Servi.png +0 -0
- package/content/LogosClientes/Sinco.png +0 -0
- package/cypress/@Types.ts +8 -0
- package/cypress/e2e/Lib.cy.ts +95 -0
- package/cypress/e2e/Standalone.cy.ts +94 -0
- package/cypress/e2e/Widget.cy.ts +95 -0
- package/cypress/fixtures/Capta.png +0 -0
- package/cypress/fixtures/example.json +5 -0
- package/cypress/fixtures/example.txt +1 -0
- package/cypress/support/commands.ts +88 -0
- package/cypress/support/e2e.ts +20 -0
- package/cypress/temp.tsconfig.json +7 -0
- package/cypress/utils/checkInvalidStep.ts +148 -0
- package/cypress/utils/checkValidStep.ts +359 -0
- package/cypress/utils/validateRequest.ts +83 -0
- package/cypress.config.ts +13 -0
- package/dist/cjs/@Types/@Types.js +2 -0
- package/dist/cjs/@Types/AYFFormStep.js +2 -0
- package/dist/cjs/@Types/Branding.js +2 -0
- package/dist/cjs/@Types/CBRFormStep.js +2 -0
- package/dist/cjs/@Types/Form.js +2 -0
- package/dist/cjs/@Types/FormStep.js +2 -0
- package/dist/cjs/@Types/GenericFormSteps.js +2 -0
- package/dist/cjs/@Types/MapperElement.js +2 -0
- package/dist/cjs/@Types/Organization.js +2 -0
- package/dist/cjs/@Types/index.js +17 -0
- package/dist/cjs/App/App.js +97 -0
- package/dist/cjs/App/AppFunctions.js +217 -0
- package/dist/cjs/App/AppHooks.js +191 -0
- package/dist/cjs/Contexts/CustomContext.js +8 -0
- package/dist/cjs/Contexts/FormContext.js +21 -0
- package/dist/cjs/Contexts/SectionContext.js +5 -0
- package/dist/cjs/Form/ConfirmationDialog/ConfirmationDialog.js +26 -0
- package/dist/cjs/Form/Form.js +185 -0
- package/dist/cjs/Form/FormFunctions.js +223 -0
- package/dist/cjs/Form/FormHooks.js +51 -0
- package/dist/cjs/Form/FormTypes/ColumnForm/ColumnForm.js +50 -0
- package/dist/cjs/Form/FormTypes/StepperForm/StepperForm.js +96 -0
- package/dist/cjs/Form/Section/MaterialSection/MaterialSection.js +34 -0
- package/dist/cjs/Form/Section/Section.js +23 -0
- package/dist/cjs/Form/Terms/Term/MaterialTerm/MaterialTerm.js +92 -0
- package/dist/cjs/Form/Terms/Term/Term.js +19 -0
- package/dist/cjs/Form/Terms/Terms.js +37 -0
- package/dist/cjs/FormSteps/@Construction/CBRElementStep/CBRElementStep.js +95 -0
- package/dist/cjs/FormSteps/@Construction/CBRIncidentsStep/CBRIncidentsStep.js +19 -0
- package/dist/cjs/FormSteps/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/Incident/Incident.js +49 -0
- package/dist/cjs/FormSteps/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/MaterialCBRIncidentsStep.js +111 -0
- package/dist/cjs/FormSteps/@Construction/CBRPropertyStep/CBRPropertyStep.js +128 -0
- package/dist/cjs/FormSteps/AYFStepMapper.js +111 -0
- package/dist/cjs/FormSteps/ApiSelectorStep/ApiSelectorStep.js +19 -0
- package/dist/cjs/FormSteps/ApiSelectorStep/MaterialApiSelectorStep/MaterialApiSelectorStep.js +135 -0
- package/dist/cjs/FormSteps/CBRStepMapper.js +131 -0
- package/dist/cjs/FormSteps/CheckBoxStep/CheckBoxStep.js +19 -0
- package/dist/cjs/FormSteps/CheckBoxStep/MaterialCheckBoxStep/MaterialCheckBoxStep.js +63 -0
- package/dist/cjs/FormSteps/ClassifierSelectorStep/ClassifierSelectorStep.js +19 -0
- package/dist/cjs/FormSteps/ClassifierSelectorStep/MaterialClassifierSelectorStep/MaterialClassifierSelectorStep.js +89 -0
- package/dist/cjs/FormSteps/CollapsibleStep/CollapsibleStep.js +33 -0
- package/dist/cjs/FormSteps/CollapsibleStep/MaterialTitleStep/MaterialCollapsibleStep.js +97 -0
- package/dist/cjs/FormSteps/CustomStep.js +36 -0
- package/dist/cjs/FormSteps/DatePickerStep/DatePickerStep.js +19 -0
- package/dist/cjs/FormSteps/DatePickerStep/MaterialDatePickerStep/MaterialDatePickerStep.js +22 -0
- package/dist/cjs/FormSteps/EntityValueStep/EntityValuePickerStep.js +19 -0
- package/dist/cjs/FormSteps/EntityValueStep/MaterialEntityValuePickerStep/MaterialEntityValuePickerStep.js +122 -0
- package/dist/cjs/FormSteps/FileUploadStep/FileUploadStep.js +19 -0
- package/dist/cjs/FormSteps/FileUploadStep/MaterialFileUploadStep/FileComponent/FileComponent.js +85 -0
- package/dist/cjs/FormSteps/FileUploadStep/MaterialFileUploadStep/MaterialFileUploadStep.js +193 -0
- package/dist/cjs/FormSteps/MapperStep/MapperStep.js +19 -0
- package/dist/cjs/FormSteps/MapperStep/MaterialMapperStep/Element/ListMapperElement/ListMapperElement.js +45 -0
- package/dist/cjs/FormSteps/MapperStep/MaterialMapperStep/Element/MapperElementComponent.js +68 -0
- package/dist/cjs/FormSteps/MapperStep/MaterialMapperStep/Element/PillMapperElement/PillMapperElement.js +45 -0
- package/dist/cjs/FormSteps/MapperStep/MaterialMapperStep/MaterialMapperStep.js +163 -0
- package/dist/cjs/FormSteps/RatingStep/MaterialRatingStep/MaterialRatingStep.js +77 -0
- package/dist/cjs/FormSteps/RatingStep/RatingStep.js +19 -0
- package/dist/cjs/FormSteps/SelectorStep/MaterialSelectorStep/MaterialSelectorStep.js +76 -0
- package/dist/cjs/FormSteps/SelectorStep/SelectorStep.js +19 -0
- package/dist/cjs/FormSteps/SeparatorStep/MaterialSeparatorStep/MaterialSeparatorStep.js +17 -0
- package/dist/cjs/FormSteps/SeparatorStep/SeparatorStep.js +19 -0
- package/dist/cjs/FormSteps/SmartSelectStep/MaterialSmartSelectStep/MaterialSmartSelectStep.js +139 -0
- package/dist/cjs/FormSteps/SmartSelectStep/SmartSelectStep.js +19 -0
- package/dist/cjs/FormSteps/Step.js +114 -0
- package/dist/cjs/FormSteps/StepFunctions.js +257 -0
- package/dist/cjs/FormSteps/StepHooks.js +131 -0
- package/dist/cjs/FormSteps/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaEditorStep.js +142 -0
- package/dist/cjs/FormSteps/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaStep.js +31 -0
- package/dist/cjs/FormSteps/TextAreaStep/TextAreaStep.js +23 -0
- package/dist/cjs/FormSteps/TextInputStep/MaterialTextInputStep/MaterialTextInputStep.js +45 -0
- package/dist/cjs/FormSteps/TextInputStep/TextInputStep.js +19 -0
- package/dist/cjs/FormSteps/TitleStep/MaterialTitleStep/MaterialTitleStep.js +38 -0
- package/dist/cjs/FormSteps/TitleStep/TitleStep.js +19 -0
- package/dist/cjs/FormSteps/Utils/@StepFiller/StepFiller.js +41 -0
- package/dist/cjs/FormSteps/Utils/MaterialInputContainer/MaterialInputContainer.js +25 -0
- package/dist/cjs/Icons/Construction/LeakIcon.js +8 -0
- package/dist/cjs/Icons/Construction/ProjectIcon.js +8 -0
- package/dist/cjs/Icons/Construction/PropertyIcon.js +8 -0
- package/dist/cjs/Icons/Construction/SpaceIcon.js +8 -0
- package/dist/cjs/Icons/DocumentIcon.js +8 -0
- package/dist/cjs/Icons/Entities/CheckListIcon.js +8 -0
- package/dist/cjs/Icons/Entities/GenericEntityIcon.js +8 -0
- package/dist/cjs/Icons/Entities/HandshakeIcon.js +8 -0
- package/dist/cjs/Icons/Entities/SupplierIcon.js +8 -0
- package/dist/cjs/Services/FileService.js +57 -0
- package/dist/cjs/Services/FormService.js +31 -0
- package/dist/cjs/Services/OrganizationService.js +31 -0
- package/dist/cjs/Shared/CustomBtn/CustomBtn.js +58 -0
- package/dist/cjs/Shared/InputIcon/InputIcon.js +88 -0
- package/dist/cjs/Shared/Loader/Loader.js +19 -0
- package/dist/cjs/Shared/Navbar/Navbar.js +11 -0
- package/dist/cjs/Shared/Navbar/Navbar.stories.js +19 -0
- package/dist/cjs/Shared/Rating/Rating.js +35 -0
- package/dist/cjs/Shared/Rating/Rating.stories.js +65 -0
- package/dist/cjs/Shared/Rating/Ratings/LikeRating.js +36 -0
- package/dist/cjs/Shared/Rating/Ratings/SatisfactionRating.js +54 -0
- package/dist/cjs/Shared/Rating/Ratings/ScaleRating.js +53 -0
- package/dist/cjs/Shared/RoundedButton/RoundedButton.js +35 -0
- package/dist/cjs/Shared/RoundedButton/RoundedButton.stories.js +42 -0
- package/dist/cjs/Shared/RoundedCheckBox/RoundedCheckBox.js +73 -0
- package/dist/cjs/Shared/RoundedCheckBox/RoundedCheckBox.stories.js +56 -0
- package/dist/cjs/Shared/RoundedDatePicker/RoundedDatePicker.js +337 -0
- package/dist/cjs/Shared/RoundedDatePicker/RoundedDatePicker.stories.js +153 -0
- package/dist/cjs/Shared/RoundedSelect/RoundedSelect.js +207 -0
- package/dist/cjs/Shared/RoundedSelect/RoundedSelect.stories.js +86 -0
- package/dist/cjs/Shared/RoundedSmartSelect/RoundedSmartSelect.js +245 -0
- package/dist/cjs/Shared/RoundedSmartSelect/RoundedSmartSelect.stories.js +198 -0
- package/dist/cjs/Shared/RoundedTextField/RoundedTextField.js +147 -0
- package/dist/cjs/Shared/RoundedTextField/RoundedTextField.stories.js +154 -0
- package/dist/cjs/States/GlobalSlice.js +29 -0
- package/dist/cjs/States/SiteSlice.js +112 -0
- package/dist/cjs/States/WidthStatsSlice.js +25 -0
- package/dist/cjs/Utils/AxiosAPI.js +13 -0
- package/dist/cjs/Utils/AxiosWidget.js +13 -0
- package/dist/cjs/Utils/CBRFunctions.js +47 -0
- package/dist/cjs/Utils/DraftFunctions.js +48 -0
- package/dist/cjs/Utils/MaterialProviders.js +24 -0
- package/dist/cjs/Utils/TestUtils.js +56 -0
- package/dist/cjs/Utils/store.js +46 -0
- package/dist/cjs/Widget.js +57 -0
- package/dist/cjs/__mocks__/axios.js +7 -0
- package/dist/cjs/constants/AYFFormStepTypes.js +13 -0
- package/dist/cjs/constants/CBRFormStepTypes.js +24 -0
- package/dist/cjs/constants/Files/FileExtensions.js +72 -0
- package/dist/cjs/constants/Files/FileMaxSize.js +4 -0
- package/dist/cjs/constants/FormStepTypes.js +73 -0
- package/dist/cjs/constants/IconTypes.js +16 -0
- package/dist/cjs/constants/InternalFormStyle.js +18 -0
- package/dist/cjs/constants/MaterialClassNameSeed.js +4 -0
- package/dist/cjs/hooks.js +32 -0
- package/dist/cjs/index.js +48 -0
- package/dist/cjs/index.lib.js +36 -0
- package/dist/cjs/package.json +3 -0
- package/dist/cjs/setupTests.js +7 -0
- package/dist/mjs/@Types/@Types.d.ts +2 -0
- package/dist/mjs/@Types/AYFFormStep.d.ts +19 -0
- package/dist/mjs/@Types/Branding.d.ts +13 -0
- package/dist/mjs/@Types/CBRFormStep.d.ts +74 -0
- package/dist/mjs/@Types/Form.d.ts +68 -0
- package/dist/mjs/@Types/FormStep.d.ts +195 -0
- package/dist/mjs/@Types/GenericFormSteps.d.ts +61 -0
- package/dist/mjs/@Types/MapperElement.d.ts +8 -0
- package/dist/mjs/@Types/Organization.d.ts +9 -0
- package/dist/mjs/@Types/index.js +1 -0
- package/dist/mjs/App/App.css +6 -0
- package/dist/mjs/App/App.d.ts +47 -0
- package/dist/mjs/App/App.js +54 -0
- package/dist/mjs/App/App.module.css +34 -0
- package/dist/mjs/App/AppFunctions.d.ts +16 -0
- package/dist/mjs/App/AppFunctions.js +188 -0
- package/dist/mjs/App/AppHooks.d.ts +10 -0
- package/dist/mjs/App/AppHooks.js +152 -0
- package/dist/mjs/Contexts/CustomContext.d.ts +11 -0
- package/dist/mjs/Contexts/CustomContext.js +6 -0
- package/dist/mjs/Contexts/FormContext.d.ts +4 -0
- package/dist/mjs/Contexts/FormContext.js +19 -0
- package/dist/mjs/Contexts/SectionContext.d.ts +3 -0
- package/dist/mjs/Contexts/SectionContext.js +3 -0
- package/dist/mjs/Form/ConfirmationDialog/ConfirmationDialog.d.ts +10 -0
- package/dist/mjs/Form/ConfirmationDialog/ConfirmationDialog.js +21 -0
- package/dist/mjs/Form/ConfirmationDialog/ConfirmationDialog.module.css +64 -0
- package/dist/mjs/Form/Form.d.ts +40 -0
- package/dist/mjs/Form/Form.js +149 -0
- package/dist/mjs/Form/Form.module.css +39 -0
- package/dist/mjs/Form/FormFunctions.d.ts +12 -0
- package/dist/mjs/Form/FormFunctions.js +189 -0
- package/dist/mjs/Form/FormHooks.d.ts +9 -0
- package/dist/mjs/Form/FormHooks.js +46 -0
- package/dist/mjs/Form/FormTypes/ColumnForm/ColumnForm.d.ts +4 -0
- package/dist/mjs/Form/FormTypes/ColumnForm/ColumnForm.js +36 -0
- package/dist/mjs/Form/FormTypes/ColumnForm/ColumnForm.module.css +19 -0
- package/dist/mjs/Form/FormTypes/StepperForm/StepperForm.d.ts +4 -0
- package/dist/mjs/Form/FormTypes/StepperForm/StepperForm.js +62 -0
- package/dist/mjs/Form/FormTypes/StepperForm/StepperForm.module.css +26 -0
- package/dist/mjs/Form/Section/MaterialSection/MaterialSection.d.ts +4 -0
- package/dist/mjs/Form/Section/MaterialSection/MaterialSection.js +28 -0
- package/dist/mjs/Form/Section/MaterialSection/MaterialSection.module.css +8 -0
- package/dist/mjs/Form/Section/Section.d.ts +6 -0
- package/dist/mjs/Form/Section/Section.js +18 -0
- package/dist/mjs/Form/Terms/Term/MaterialTerm/MaterialTerm.d.ts +4 -0
- package/dist/mjs/Form/Terms/Term/MaterialTerm/MaterialTerm.js +75 -0
- package/dist/mjs/Form/Terms/Term/MaterialTerm/MaterialTerm.module.css +83 -0
- package/dist/mjs/Form/Terms/Term/Term.d.ts +8 -0
- package/dist/mjs/Form/Terms/Term/Term.js +14 -0
- package/dist/mjs/Form/Terms/Terms.d.ts +3 -0
- package/dist/mjs/Form/Terms/Terms.js +32 -0
- package/dist/mjs/Form/Terms/Terms.module.css +3 -0
- package/dist/mjs/FormSteps/@Construction/CBRElementStep/CBRElementStep.d.ts +8 -0
- package/dist/mjs/FormSteps/@Construction/CBRElementStep/CBRElementStep.js +67 -0
- package/dist/mjs/FormSteps/@Construction/CBRIncidentsStep/CBRIncidentsStep.d.ts +9 -0
- package/dist/mjs/FormSteps/@Construction/CBRIncidentsStep/CBRIncidentsStep.js +14 -0
- package/dist/mjs/FormSteps/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/Incident/Incident.d.ts +8 -0
- package/dist/mjs/FormSteps/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/Incident/Incident.js +32 -0
- package/dist/mjs/FormSteps/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/Incident/Incident.module.css +60 -0
- package/dist/mjs/FormSteps/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/MaterialCBRIncidentsStep.d.ts +11 -0
- package/dist/mjs/FormSteps/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/MaterialCBRIncidentsStep.js +113 -0
- package/dist/mjs/FormSteps/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/MaterialCBRIncidentsStep.module.css +34 -0
- package/dist/mjs/FormSteps/@Construction/CBRPropertyStep/CBRPropertyStep.d.ts +8 -0
- package/dist/mjs/FormSteps/@Construction/CBRPropertyStep/CBRPropertyStep.js +90 -0
- package/dist/mjs/FormSteps/@Construction/CBRPropertyStep/CBRPropertyStep.module.css +54 -0
- package/dist/mjs/FormSteps/AYFStepMapper.d.ts +12 -0
- package/dist/mjs/FormSteps/AYFStepMapper.js +96 -0
- package/dist/mjs/FormSteps/ApiSelectorStep/ApiSelectorStep.d.ts +15 -0
- package/dist/mjs/FormSteps/ApiSelectorStep/ApiSelectorStep.js +14 -0
- package/dist/mjs/FormSteps/ApiSelectorStep/MaterialApiSelectorStep/MaterialApiSelectorStep.d.ts +4 -0
- package/dist/mjs/FormSteps/ApiSelectorStep/MaterialApiSelectorStep/MaterialApiSelectorStep.js +79 -0
- package/dist/mjs/FormSteps/ApiSelectorStep/MaterialApiSelectorStep/MaterialApiSelectorStep.module.css +0 -0
- package/dist/mjs/FormSteps/CBRStepMapper.d.ts +13 -0
- package/dist/mjs/FormSteps/CBRStepMapper.js +115 -0
- package/dist/mjs/FormSteps/CheckBoxStep/CheckBoxStep.d.ts +9 -0
- package/dist/mjs/FormSteps/CheckBoxStep/CheckBoxStep.js +14 -0
- package/dist/mjs/FormSteps/CheckBoxStep/MaterialCheckBoxStep/MaterialCheckBoxStep.d.ts +4 -0
- package/dist/mjs/FormSteps/CheckBoxStep/MaterialCheckBoxStep/MaterialCheckBoxStep.js +34 -0
- package/dist/mjs/FormSteps/CheckBoxStep/MaterialCheckBoxStep/MaterialCheckBoxStep.module.css +26 -0
- package/dist/mjs/FormSteps/ClassifierSelectorStep/ClassifierSelectorStep.d.ts +9 -0
- package/dist/mjs/FormSteps/ClassifierSelectorStep/ClassifierSelectorStep.js +14 -0
- package/dist/mjs/FormSteps/ClassifierSelectorStep/MaterialClassifierSelectorStep/MaterialClassifierSelectorStep.d.ts +4 -0
- package/dist/mjs/FormSteps/ClassifierSelectorStep/MaterialClassifierSelectorStep/MaterialClassifierSelectorStep.js +57 -0
- package/dist/mjs/FormSteps/CollapsibleStep/CollapsibleStep.d.ts +9 -0
- package/dist/mjs/FormSteps/CollapsibleStep/CollapsibleStep.js +16 -0
- package/dist/mjs/FormSteps/CollapsibleStep/MaterialTitleStep/MaterialCollapsibleStep.d.ts +4 -0
- package/dist/mjs/FormSteps/CollapsibleStep/MaterialTitleStep/MaterialCollapsibleStep.js +53 -0
- package/dist/mjs/FormSteps/CollapsibleStep/MaterialTitleStep/MaterialCollapsibleStep.module.css +62 -0
- package/dist/mjs/FormSteps/CustomStep.d.ts +26 -0
- package/dist/mjs/FormSteps/CustomStep.js +24 -0
- package/dist/mjs/FormSteps/DatePickerStep/DatePickerStep.d.ts +11 -0
- package/dist/mjs/FormSteps/DatePickerStep/DatePickerStep.js +14 -0
- package/dist/mjs/FormSteps/DatePickerStep/MaterialDatePickerStep/MaterialDatePickerStep.d.ts +4 -0
- package/dist/mjs/FormSteps/DatePickerStep/MaterialDatePickerStep/MaterialDatePickerStep.js +16 -0
- package/dist/mjs/FormSteps/EntityValueStep/EntityValuePickerStep.d.ts +15 -0
- package/dist/mjs/FormSteps/EntityValueStep/EntityValuePickerStep.js +14 -0
- package/dist/mjs/FormSteps/EntityValueStep/MaterialEntityValuePickerStep/MaterialEntityValuePickerStep.d.ts +4 -0
- package/dist/mjs/FormSteps/EntityValueStep/MaterialEntityValuePickerStep/MaterialEntityValuePickerStep.js +84 -0
- package/dist/mjs/FormSteps/FileUploadStep/FileUploadStep.d.ts +9 -0
- package/dist/mjs/FormSteps/FileUploadStep/FileUploadStep.js +14 -0
- package/dist/mjs/FormSteps/FileUploadStep/MaterialFileUploadStep/FileComponent/FileComponent.d.ts +13 -0
- package/dist/mjs/FormSteps/FileUploadStep/MaterialFileUploadStep/FileComponent/FileComponent.js +70 -0
- package/dist/mjs/FormSteps/FileUploadStep/MaterialFileUploadStep/FileComponent/FileComponent.module.css +53 -0
- package/dist/mjs/FormSteps/FileUploadStep/MaterialFileUploadStep/MaterialFileUploadStep.d.ts +18 -0
- package/dist/mjs/FormSteps/FileUploadStep/MaterialFileUploadStep/MaterialFileUploadStep.js +179 -0
- package/dist/mjs/FormSteps/FileUploadStep/MaterialFileUploadStep/MaterialFileUploadStep.module.css +52 -0
- package/dist/mjs/FormSteps/MapperStep/MapperStep.d.ts +17 -0
- package/dist/mjs/FormSteps/MapperStep/MapperStep.js +14 -0
- package/dist/mjs/FormSteps/MapperStep/MaterialMapperStep/Element/ListMapperElement/ListMapperElement.d.ts +5 -0
- package/dist/mjs/FormSteps/MapperStep/MaterialMapperStep/Element/ListMapperElement/ListMapperElement.js +39 -0
- package/dist/mjs/FormSteps/MapperStep/MaterialMapperStep/Element/ListMapperElement/ListMapperElement.module.css +72 -0
- package/dist/mjs/FormSteps/MapperStep/MaterialMapperStep/Element/MapperElementComponent.d.ts +12 -0
- package/dist/mjs/FormSteps/MapperStep/MaterialMapperStep/Element/MapperElementComponent.js +41 -0
- package/dist/mjs/FormSteps/MapperStep/MaterialMapperStep/Element/PillMapperElement/PillMapperElement.d.ts +5 -0
- package/dist/mjs/FormSteps/MapperStep/MaterialMapperStep/Element/PillMapperElement/PillMapperElement.js +38 -0
- package/dist/mjs/FormSteps/MapperStep/MaterialMapperStep/Element/PillMapperElement/PillMapperElement.module.css +71 -0
- package/dist/mjs/FormSteps/MapperStep/MaterialMapperStep/MaterialMapperStep.d.ts +17 -0
- package/dist/mjs/FormSteps/MapperStep/MaterialMapperStep/MaterialMapperStep.js +123 -0
- package/dist/mjs/FormSteps/MapperStep/MaterialMapperStep/MaterialMapperStep.module.css +41 -0
- package/dist/mjs/FormSteps/RatingStep/MaterialRatingStep/MaterialRatingStep.d.ts +4 -0
- package/dist/mjs/FormSteps/RatingStep/MaterialRatingStep/MaterialRatingStep.js +49 -0
- package/dist/mjs/FormSteps/RatingStep/MaterialRatingStep/MaterialRatingStep.module.css +30 -0
- package/dist/mjs/FormSteps/RatingStep/RatingStep.d.ts +9 -0
- package/dist/mjs/FormSteps/RatingStep/RatingStep.js +14 -0
- package/dist/mjs/FormSteps/SelectorStep/MaterialSelectorStep/MaterialSelectorStep.d.ts +4 -0
- package/dist/mjs/FormSteps/SelectorStep/MaterialSelectorStep/MaterialSelectorStep.js +47 -0
- package/dist/mjs/FormSteps/SelectorStep/MaterialSelectorStep/MaterialSelectorStep.module.css +9 -0
- package/dist/mjs/FormSteps/SelectorStep/SelectorStep.d.ts +9 -0
- package/dist/mjs/FormSteps/SelectorStep/SelectorStep.js +14 -0
- package/dist/mjs/FormSteps/SeparatorStep/MaterialSeparatorStep/MaterialSeparatorStep.d.ts +4 -0
- package/dist/mjs/FormSteps/SeparatorStep/MaterialSeparatorStep/MaterialSeparatorStep.js +12 -0
- package/dist/mjs/FormSteps/SeparatorStep/MaterialSeparatorStep/MaterialSeparatorStep.module.css +7 -0
- package/dist/mjs/FormSteps/SeparatorStep/SeparatorStep.d.ts +9 -0
- package/dist/mjs/FormSteps/SeparatorStep/SeparatorStep.js +14 -0
- package/dist/mjs/FormSteps/SmartSelectStep/MaterialSmartSelectStep/MaterialSmartSelectStep.d.ts +5 -0
- package/dist/mjs/FormSteps/SmartSelectStep/MaterialSmartSelectStep/MaterialSmartSelectStep.js +128 -0
- package/dist/mjs/FormSteps/SmartSelectStep/SmartSelectStep.d.ts +31 -0
- package/dist/mjs/FormSteps/SmartSelectStep/SmartSelectStep.js +14 -0
- package/dist/mjs/FormSteps/Step.d.ts +8 -0
- package/dist/mjs/FormSteps/Step.js +96 -0
- package/dist/mjs/FormSteps/StepFunctions.d.ts +16 -0
- package/dist/mjs/FormSteps/StepFunctions.js +243 -0
- package/dist/mjs/FormSteps/StepHooks.d.ts +43 -0
- package/dist/mjs/FormSteps/StepHooks.js +114 -0
- package/dist/mjs/FormSteps/TextAreaStep/MaterialTextAreaStep/DraftEditor.css +96 -0
- package/dist/mjs/FormSteps/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaEditorStep.d.ts +10 -0
- package/dist/mjs/FormSteps/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaEditorStep.js +125 -0
- package/dist/mjs/FormSteps/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaStep.d.ts +8 -0
- package/dist/mjs/FormSteps/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaStep.js +27 -0
- package/dist/mjs/FormSteps/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaStep.module.css +84 -0
- package/dist/mjs/FormSteps/TextAreaStep/TextAreaStep.d.ts +10 -0
- package/dist/mjs/FormSteps/TextAreaStep/TextAreaStep.js +18 -0
- package/dist/mjs/FormSteps/TextInputStep/MaterialTextInputStep/MaterialTextInputStep.d.ts +4 -0
- package/dist/mjs/FormSteps/TextInputStep/MaterialTextInputStep/MaterialTextInputStep.js +39 -0
- package/dist/mjs/FormSteps/TextInputStep/MaterialTextInputStep/MaterialTextInputStep.module.css +9 -0
- package/dist/mjs/FormSteps/TextInputStep/TextInputStep.d.ts +17 -0
- package/dist/mjs/FormSteps/TextInputStep/TextInputStep.js +14 -0
- package/dist/mjs/FormSteps/TitleStep/MaterialTitleStep/MaterialTitleStep.d.ts +4 -0
- package/dist/mjs/FormSteps/TitleStep/MaterialTitleStep/MaterialTitleStep.js +32 -0
- package/dist/mjs/FormSteps/TitleStep/MaterialTitleStep/MaterialTitleStep.module.css +18 -0
- package/dist/mjs/FormSteps/TitleStep/TitleStep.d.ts +9 -0
- package/dist/mjs/FormSteps/TitleStep/TitleStep.js +14 -0
- package/dist/mjs/FormSteps/Utils/@StepFiller/StepFiller.d.ts +9 -0
- package/dist/mjs/FormSteps/Utils/@StepFiller/StepFiller.js +35 -0
- package/dist/mjs/FormSteps/Utils/@StepFiller/StepFiller.module.css +16 -0
- package/dist/mjs/FormSteps/Utils/MaterialInputContainer/MaterialInputContainer.d.ts +11 -0
- package/dist/mjs/FormSteps/Utils/MaterialInputContainer/MaterialInputContainer.js +20 -0
- package/dist/mjs/FormSteps/Utils/MaterialInputContainer/MaterialInputContainer.module.css +9 -0
- package/dist/mjs/Icons/Construction/LeakIcon.d.ts +3 -0
- package/dist/mjs/Icons/Construction/LeakIcon.js +5 -0
- package/dist/mjs/Icons/Construction/ProjectIcon.d.ts +3 -0
- package/dist/mjs/Icons/Construction/ProjectIcon.js +5 -0
- package/dist/mjs/Icons/Construction/PropertyIcon.d.ts +3 -0
- package/dist/mjs/Icons/Construction/PropertyIcon.js +5 -0
- package/dist/mjs/Icons/Construction/SpaceIcon.d.ts +3 -0
- package/dist/mjs/Icons/Construction/SpaceIcon.js +5 -0
- package/dist/mjs/Icons/DocumentIcon.d.ts +3 -0
- package/dist/mjs/Icons/DocumentIcon.js +5 -0
- package/dist/mjs/Icons/Entities/CheckListIcon.d.ts +3 -0
- package/dist/mjs/Icons/Entities/CheckListIcon.js +5 -0
- package/dist/mjs/Icons/Entities/GenericEntityIcon.d.ts +3 -0
- package/dist/mjs/Icons/Entities/GenericEntityIcon.js +3 -0
- package/dist/mjs/Icons/Entities/HandshakeIcon.d.ts +3 -0
- package/dist/mjs/Icons/Entities/HandshakeIcon.js +3 -0
- package/dist/mjs/Icons/Entities/SupplierIcon.d.ts +3 -0
- package/dist/mjs/Icons/Entities/SupplierIcon.js +3 -0
- package/dist/mjs/Services/FileService.d.ts +5 -0
- package/dist/mjs/Services/FileService.js +35 -0
- package/dist/mjs/Services/FormService.d.ts +5 -0
- package/dist/mjs/Services/FormService.js +13 -0
- package/dist/mjs/Services/OrganizationService.d.ts +2 -0
- package/dist/mjs/Services/OrganizationService.js +13 -0
- package/dist/mjs/Shared/CustomBtn/CustomBtn.d.ts +13 -0
- package/dist/mjs/Shared/CustomBtn/CustomBtn.js +32 -0
- package/dist/mjs/Shared/CustomBtn/CustomBtn.module.css +61 -0
- package/dist/mjs/Shared/InputIcon/InputIcon.d.ts +7 -0
- package/dist/mjs/Shared/InputIcon/InputIcon.js +71 -0
- package/dist/mjs/Shared/Loader/Loader.d.ts +18 -0
- package/dist/mjs/Shared/Loader/Loader.js +14 -0
- package/dist/mjs/Shared/Loader/Loader.module.css +12 -0
- package/dist/mjs/Shared/Navbar/Navbar.d.ts +9 -0
- package/dist/mjs/Shared/Navbar/Navbar.js +6 -0
- package/dist/mjs/Shared/Navbar/Navbar.module.css +8 -0
- package/dist/mjs/Shared/Navbar/Navbar.stories.d.ts +13 -0
- package/dist/mjs/Shared/Navbar/Navbar.stories.js +13 -0
- package/dist/mjs/Shared/Rating/Rating.d.ts +16 -0
- package/dist/mjs/Shared/Rating/Rating.js +18 -0
- package/dist/mjs/Shared/Rating/Rating.module.css +18 -0
- package/dist/mjs/Shared/Rating/Rating.stories.d.ts +15 -0
- package/dist/mjs/Shared/Rating/Rating.stories.js +59 -0
- package/dist/mjs/Shared/Rating/Ratings/LikeRating.d.ts +4 -0
- package/dist/mjs/Shared/Rating/Ratings/LikeRating.js +31 -0
- package/dist/mjs/Shared/Rating/Ratings/SatisfactionRating.d.ts +4 -0
- package/dist/mjs/Shared/Rating/Ratings/SatisfactionRating.js +49 -0
- package/dist/mjs/Shared/Rating/Ratings/ScaleRating.d.ts +4 -0
- package/dist/mjs/Shared/Rating/Ratings/ScaleRating.js +35 -0
- package/dist/mjs/Shared/RoundedButton/RoundedButton.d.ts +30 -0
- package/dist/mjs/Shared/RoundedButton/RoundedButton.js +33 -0
- package/dist/mjs/Shared/RoundedButton/RoundedButton.stories.d.ts +23 -0
- package/dist/mjs/Shared/RoundedButton/RoundedButton.stories.js +36 -0
- package/dist/mjs/Shared/RoundedCheckBox/RoundedCheckBox.d.ts +24 -0
- package/dist/mjs/Shared/RoundedCheckBox/RoundedCheckBox.js +56 -0
- package/dist/mjs/Shared/RoundedCheckBox/RoundedCheckBox.stories.d.ts +21 -0
- package/dist/mjs/Shared/RoundedCheckBox/RoundedCheckBox.stories.js +50 -0
- package/dist/mjs/Shared/RoundedDatePicker/RoundedDatePicker.d.ts +49 -0
- package/dist/mjs/Shared/RoundedDatePicker/RoundedDatePicker.js +297 -0
- package/dist/mjs/Shared/RoundedDatePicker/RoundedDatePicker.stories.d.ts +36 -0
- package/dist/mjs/Shared/RoundedDatePicker/RoundedDatePicker.stories.js +137 -0
- package/dist/mjs/Shared/RoundedSelect/RoundedSelect.d.ts +68 -0
- package/dist/mjs/Shared/RoundedSelect/RoundedSelect.js +160 -0
- package/dist/mjs/Shared/RoundedSelect/RoundedSelect.stories.d.ts +28 -0
- package/dist/mjs/Shared/RoundedSelect/RoundedSelect.stories.js +79 -0
- package/dist/mjs/Shared/RoundedSmartSelect/RoundedSmartSelect.d.ts +63 -0
- package/dist/mjs/Shared/RoundedSmartSelect/RoundedSmartSelect.js +197 -0
- package/dist/mjs/Shared/RoundedSmartSelect/RoundedSmartSelect.stories.d.ts +36 -0
- package/dist/mjs/Shared/RoundedSmartSelect/RoundedSmartSelect.stories.js +182 -0
- package/dist/mjs/Shared/RoundedTextField/RoundedTextField.d.ts +45 -0
- package/dist/mjs/Shared/RoundedTextField/RoundedTextField.js +129 -0
- package/dist/mjs/Shared/RoundedTextField/RoundedTextField.stories.d.ts +37 -0
- package/dist/mjs/Shared/RoundedTextField/RoundedTextField.stories.js +138 -0
- package/dist/mjs/States/GlobalSlice.d.ts +34 -0
- package/dist/mjs/States/GlobalSlice.js +23 -0
- package/dist/mjs/States/SiteSlice.d.ts +65 -0
- package/dist/mjs/States/SiteSlice.js +116 -0
- package/dist/mjs/States/WidthStatsSlice.d.ts +7 -0
- package/dist/mjs/States/WidthStatsSlice.js +22 -0
- package/dist/mjs/Utils/AxiosAPI.d.ts +2 -0
- package/dist/mjs/Utils/AxiosAPI.js +8 -0
- package/dist/mjs/Utils/AxiosWidget.d.ts +2 -0
- package/dist/mjs/Utils/AxiosWidget.js +8 -0
- package/dist/mjs/Utils/CBRFunctions.d.ts +8 -0
- package/dist/mjs/Utils/CBRFunctions.js +52 -0
- package/dist/mjs/Utils/DraftFunctions.d.ts +3 -0
- package/dist/mjs/Utils/DraftFunctions.js +43 -0
- package/dist/mjs/Utils/MaterialProviders.d.ts +6 -0
- package/dist/mjs/Utils/MaterialProviders.js +19 -0
- package/dist/mjs/Utils/TestUtils.d.ts +77 -0
- package/dist/mjs/Utils/TestUtils.js +41 -0
- package/dist/mjs/Utils/store.d.ts +27 -0
- package/dist/mjs/Utils/store.js +29 -0
- package/dist/mjs/Widget.d.ts +1 -0
- package/dist/mjs/Widget.js +51 -0
- package/dist/mjs/__mocks__/axios.js +2 -0
- package/dist/mjs/constants/AYFFormStepTypes.d.ts +9 -0
- package/dist/mjs/constants/CBRFormStepTypes.d.ts +21 -0
- package/dist/mjs/constants/Files/FileExtensions.d.ts +3 -0
- package/dist/mjs/constants/Files/FileExtensions.js +68 -0
- package/dist/mjs/constants/Files/FileMaxSize.d.ts +2 -0
- package/dist/mjs/constants/Files/FileMaxSize.js +2 -0
- package/dist/mjs/constants/FormStepTypes.d.ts +59 -0
- package/dist/mjs/constants/IconTypes.d.ts +12 -0
- package/dist/mjs/constants/InternalFormStyle.d.ts +3 -0
- package/dist/mjs/constants/InternalFormStyle.js +16 -0
- package/dist/mjs/constants/MaterialClassNameSeed.d.ts +1 -0
- package/dist/mjs/constants/MaterialClassNameSeed.js +1 -0
- package/dist/mjs/hooks.d.ts +7 -0
- package/dist/mjs/hooks.js +23 -0
- package/dist/mjs/index.d.ts +1 -0
- package/dist/mjs/index.js +20 -0
- package/dist/mjs/index.lib.d.ts +7 -0
- package/dist/mjs/index.module.css +14 -0
- package/dist/mjs/setupTests.d.ts +1 -0
- package/fixup.sh +5 -0
- package/jest.config.js +5 -0
- package/package.json +10 -6
- package/public/favicon.ico +0 -0
- package/public/index.html +22 -0
- package/src/@Types/@Types.ts +2 -0
- package/src/@Types/AYFFormStep.ts +29 -0
- package/src/@Types/Branding.ts +13 -0
- package/src/@Types/CBRFormStep.ts +110 -0
- package/src/@Types/Form.ts +73 -0
- package/src/@Types/FormStep.ts +257 -0
- package/src/@Types/GenericFormSteps.ts +66 -0
- package/src/@Types/MapperElement.ts +8 -0
- package/src/@Types/Organization.ts +10 -0
- package/src/@Types/index.ts +1 -0
- package/src/App/App.css +6 -0
- package/src/App/App.module.css +34 -0
- package/src/App/App.tsx +160 -0
- package/src/App/AppFunctions.test.ts +747 -0
- package/src/App/AppFunctions.ts +240 -0
- package/src/App/AppHooks.test.ts +139 -0
- package/src/App/AppHooks.ts +217 -0
- package/src/Contexts/CustomContext.ts +16 -0
- package/src/Contexts/FormContext.ts +22 -0
- package/src/Contexts/SectionContext.ts +5 -0
- package/src/Form/ConfirmationDialog/ConfirmationDialog.module.css +64 -0
- package/src/Form/ConfirmationDialog/ConfirmationDialog.tsx +79 -0
- package/src/Form/Form.module.css +39 -0
- package/src/Form/Form.tsx +295 -0
- package/src/Form/FormFunctions.test.ts +583 -0
- package/src/Form/FormFunctions.ts +263 -0
- package/src/Form/FormHooks.ts +68 -0
- package/src/Form/FormTypes/ColumnForm/ColumnForm.module.css +19 -0
- package/src/Form/FormTypes/ColumnForm/ColumnForm.tsx +85 -0
- package/src/Form/FormTypes/StepperForm/StepperForm.module.css +26 -0
- package/src/Form/FormTypes/StepperForm/StepperForm.tsx +120 -0
- package/src/Form/Section/MaterialSection/MaterialSection.module.css +8 -0
- package/src/Form/Section/MaterialSection/MaterialSection.tsx +44 -0
- package/src/Form/Section/Section.tsx +25 -0
- package/src/Form/Terms/Term/MaterialTerm/MaterialTerm.module.css +83 -0
- package/src/Form/Terms/Term/MaterialTerm/MaterialTerm.tsx +160 -0
- package/src/Form/Terms/Term/Term.tsx +20 -0
- package/src/Form/Terms/Terms.module.css +3 -0
- package/src/Form/Terms/Terms.tsx +54 -0
- package/src/FormSteps/@Construction/CBRElementStep/CBRElementStep.tsx +129 -0
- package/src/FormSteps/@Construction/CBRIncidentsStep/CBRIncidentsStep.tsx +20 -0
- package/src/FormSteps/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/Incident/Incident.module.css +60 -0
- package/src/FormSteps/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/Incident/Incident.tsx +81 -0
- package/src/FormSteps/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/MaterialCBRIncidentsStep.module.css +34 -0
- package/src/FormSteps/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/MaterialCBRIncidentsStep.tsx +210 -0
- package/src/FormSteps/@Construction/CBRPropertyStep/CBRPropertyStep.module.css +54 -0
- package/src/FormSteps/@Construction/CBRPropertyStep/CBRPropertyStep.tsx +183 -0
- package/src/FormSteps/AYFStepMapper.tsx +177 -0
- package/src/FormSteps/ApiSelectorStep/ApiSelectorStep.tsx +28 -0
- package/src/FormSteps/ApiSelectorStep/MaterialApiSelectorStep/MaterialApiSelectorStep.module.css +0 -0
- package/src/FormSteps/ApiSelectorStep/MaterialApiSelectorStep/MaterialApiSelectorStep.tsx +126 -0
- package/src/FormSteps/CBRStepMapper.tsx +256 -0
- package/src/FormSteps/CheckBoxStep/CheckBoxStep.tsx +20 -0
- package/src/FormSteps/CheckBoxStep/MaterialCheckBoxStep/MaterialCheckBoxStep.module.css +26 -0
- package/src/FormSteps/CheckBoxStep/MaterialCheckBoxStep/MaterialCheckBoxStep.tsx +83 -0
- package/src/FormSteps/ClassifierSelectorStep/ClassifierSelectorStep.tsx +22 -0
- package/src/FormSteps/ClassifierSelectorStep/MaterialClassifierSelectorStep/MaterialClassifierSelectorStep.tsx +120 -0
- package/src/FormSteps/CollapsibleStep/CollapsibleStep.tsx +24 -0
- package/src/FormSteps/CollapsibleStep/MaterialTitleStep/MaterialCollapsibleStep.module.css +62 -0
- package/src/FormSteps/CollapsibleStep/MaterialTitleStep/MaterialCollapsibleStep.tsx +129 -0
- package/src/FormSteps/CustomStep.tsx +57 -0
- package/src/FormSteps/DatePickerStep/DatePickerStep.tsx +22 -0
- package/src/FormSteps/DatePickerStep/MaterialDatePickerStep/MaterialDatePickerStep.tsx +51 -0
- package/src/FormSteps/EntityValueStep/EntityValuePickerStep.tsx +28 -0
- package/src/FormSteps/EntityValueStep/MaterialEntityValuePickerStep/MaterialEntityValuePickerStep.tsx +132 -0
- package/src/FormSteps/FileUploadStep/FileUploadStep.tsx +20 -0
- package/src/FormSteps/FileUploadStep/MaterialFileUploadStep/FileComponent/FileComponent.module.css +53 -0
- package/src/FormSteps/FileUploadStep/MaterialFileUploadStep/FileComponent/FileComponent.tsx +142 -0
- package/src/FormSteps/FileUploadStep/MaterialFileUploadStep/MaterialFileUploadStep.module.css +52 -0
- package/src/FormSteps/FileUploadStep/MaterialFileUploadStep/MaterialFileUploadStep.tsx +294 -0
- package/src/FormSteps/MapperStep/MapperStep.tsx +40 -0
- package/src/FormSteps/MapperStep/MaterialMapperStep/Element/ListMapperElement/ListMapperElement.module.css +72 -0
- package/src/FormSteps/MapperStep/MaterialMapperStep/Element/ListMapperElement/ListMapperElement.tsx +108 -0
- package/src/FormSteps/MapperStep/MaterialMapperStep/Element/MapperElementComponent.tsx +76 -0
- package/src/FormSteps/MapperStep/MaterialMapperStep/Element/PillMapperElement/PillMapperElement.module.css +71 -0
- package/src/FormSteps/MapperStep/MaterialMapperStep/Element/PillMapperElement/PillMapperElement.tsx +95 -0
- package/src/FormSteps/MapperStep/MaterialMapperStep/MaterialMapperStep.module.css +41 -0
- package/src/FormSteps/MapperStep/MaterialMapperStep/MaterialMapperStep.tsx +296 -0
- package/src/FormSteps/RatingStep/MaterialRatingStep/MaterialRatingStep.module.css +30 -0
- package/src/FormSteps/RatingStep/MaterialRatingStep/MaterialRatingStep.tsx +98 -0
- package/src/FormSteps/RatingStep/RatingStep.tsx +20 -0
- package/src/FormSteps/SelectorStep/MaterialSelectorStep/MaterialSelectorStep.module.css +9 -0
- package/src/FormSteps/SelectorStep/MaterialSelectorStep/MaterialSelectorStep.tsx +105 -0
- package/src/FormSteps/SelectorStep/SelectorStep.tsx +20 -0
- package/src/FormSteps/SeparatorStep/MaterialSeparatorStep/MaterialSeparatorStep.module.css +7 -0
- package/src/FormSteps/SeparatorStep/MaterialSeparatorStep/MaterialSeparatorStep.tsx +20 -0
- package/src/FormSteps/SeparatorStep/SeparatorStep.tsx +21 -0
- package/src/FormSteps/SmartSelectStep/MaterialSmartSelectStep/MaterialSmartSelectStep.tsx +216 -0
- package/src/FormSteps/SmartSelectStep/SmartSelectStep.tsx +48 -0
- package/src/FormSteps/Step.tsx +228 -0
- package/src/FormSteps/StepFunctions.test.ts +882 -0
- package/src/FormSteps/StepFunctions.ts +315 -0
- package/src/FormSteps/StepHooks.ts +204 -0
- package/src/FormSteps/TextAreaStep/MaterialTextAreaStep/DraftEditor.css +96 -0
- package/src/FormSteps/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaEditorStep.tsx +209 -0
- package/src/FormSteps/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaStep.module.css +84 -0
- package/src/FormSteps/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaStep.tsx +89 -0
- package/src/FormSteps/TextAreaStep/TextAreaStep.tsx +23 -0
- package/src/FormSteps/TextInputStep/MaterialTextInputStep/MaterialTextInputStep.module.css +9 -0
- package/src/FormSteps/TextInputStep/MaterialTextInputStep/MaterialTextInputStep.tsx +80 -0
- package/src/FormSteps/TextInputStep/TextInputStep.tsx +28 -0
- package/src/FormSteps/TitleStep/MaterialTitleStep/MaterialTitleStep.module.css +18 -0
- package/src/FormSteps/TitleStep/MaterialTitleStep/MaterialTitleStep.tsx +64 -0
- package/src/FormSteps/TitleStep/TitleStep.tsx +21 -0
- package/src/FormSteps/Utils/@StepFiller/StepFiller.module.css +16 -0
- package/src/FormSteps/Utils/@StepFiller/StepFiller.tsx +69 -0
- package/src/FormSteps/Utils/MaterialInputContainer/MaterialInputContainer.module.css +9 -0
- package/src/FormSteps/Utils/MaterialInputContainer/MaterialInputContainer.tsx +55 -0
- package/src/Icons/Construction/LeakIcon.tsx +21 -0
- package/src/Icons/Construction/ProjectIcon.tsx +17 -0
- package/src/Icons/Construction/PropertyIcon.tsx +22 -0
- package/src/Icons/Construction/SpaceIcon.tsx +25 -0
- package/src/Icons/DocumentIcon.tsx +19 -0
- package/src/Icons/Entities/CheckListIcon.tsx +30 -0
- package/src/Icons/Entities/GenericEntityIcon.tsx +19 -0
- package/src/Icons/Entities/HandshakeIcon.tsx +20 -0
- package/src/Icons/Entities/SupplierIcon.tsx +21 -0
- package/src/Services/FileService.ts +50 -0
- package/src/Services/FormService.ts +20 -0
- package/src/Services/OrganizationService.ts +19 -0
- package/src/Shared/CustomBtn/CustomBtn.module.css +61 -0
- package/src/Shared/CustomBtn/CustomBtn.tsx +83 -0
- package/src/Shared/InputIcon/InputIcon.tsx +134 -0
- package/src/Shared/Loader/Loader.module.css +12 -0
- package/src/Shared/Loader/Loader.tsx +40 -0
- package/src/Shared/Navbar/Navbar.module.css +8 -0
- package/src/Shared/Navbar/Navbar.stories.tsx +20 -0
- package/src/Shared/Navbar/Navbar.tsx +21 -0
- package/src/Shared/Rating/Rating.module.css +18 -0
- package/src/Shared/Rating/Rating.stories.tsx +70 -0
- package/src/Shared/Rating/Rating.tsx +33 -0
- package/src/Shared/Rating/Ratings/LikeRating.tsx +75 -0
- package/src/Shared/Rating/Ratings/SatisfactionRating.tsx +115 -0
- package/src/Shared/Rating/Ratings/ScaleRating.tsx +85 -0
- package/src/Shared/RoundedButton/RoundedButton.stories.tsx +45 -0
- package/src/Shared/RoundedButton/RoundedButton.tsx +80 -0
- package/src/Shared/RoundedCheckBox/RoundedCheckBox.stories.tsx +61 -0
- package/src/Shared/RoundedCheckBox/RoundedCheckBox.tsx +102 -0
- package/src/Shared/RoundedDatePicker/RoundedDatePicker.stories.tsx +156 -0
- package/src/Shared/RoundedDatePicker/RoundedDatePicker.tsx +453 -0
- package/src/Shared/RoundedSelect/RoundedSelect.stories.tsx +102 -0
- package/src/Shared/RoundedSelect/RoundedSelect.tsx +297 -0
- package/src/Shared/RoundedSmartSelect/RoundedSmartSelect.stories.tsx +206 -0
- package/src/Shared/RoundedSmartSelect/RoundedSmartSelect.tsx +420 -0
- package/src/Shared/RoundedTextField/RoundedTextField.stories.tsx +165 -0
- package/src/Shared/RoundedTextField/RoundedTextField.tsx +226 -0
- package/src/States/GlobalSlice.ts +45 -0
- package/src/States/SiteSlice.ts +205 -0
- package/src/States/WidthStatsSlice.ts +29 -0
- package/src/Utils/AxiosAPI.ts +11 -0
- package/src/Utils/AxiosWidget.ts +11 -0
- package/src/Utils/CBRFunctions.ts +105 -0
- package/src/Utils/DraftFunctions.ts +47 -0
- package/src/Utils/MaterialProviders.tsx +42 -0
- package/src/Utils/TestUtils.tsx +74 -0
- package/src/Utils/store.ts +56 -0
- package/src/Widget.tsx +58 -0
- package/src/__mocks__/axios.ts +2 -0
- package/src/constants/AYFFormStepTypes.ts +10 -0
- package/src/constants/CBRFormStepTypes.ts +21 -0
- package/src/constants/Files/FileExtensions.ts +70 -0
- package/src/constants/Files/FileMaxSize.ts +2 -0
- package/src/constants/FormStepTypes.ts +70 -0
- package/src/constants/IconTypes.ts +12 -0
- package/src/constants/InternalFormStyle.ts +18 -0
- package/src/constants/MaterialClassNameSeed.ts +1 -0
- package/src/hooks.ts +47 -0
- package/src/index.lib.ts +7 -0
- package/src/index.module.css +14 -0
- package/src/index.tsx +28 -0
- package/src/setupTests.ts +5 -0
- package/src/types.d.ts +1 -0
- package/template.yaml +137 -0
- package/tsconfig.json +8 -0
- package/webpack.config.cjs +17 -0
- package/dist/App/App.js +0 -79
- package/dist/App/AppFunctions.js +0 -210
- package/dist/App/AppHooks.js +0 -242
- package/dist/Contexts/CustomContext.js +0 -6
- package/dist/Contexts/FormContext.js +0 -19
- package/dist/Contexts/SectionContext.js +0 -3
- package/dist/Form/ConfirmationDialog/ConfirmationDialog.js +0 -33
- package/dist/Form/Form.js +0 -216
- package/dist/Form/FormFunctions.js +0 -229
- package/dist/Form/FormHooks.js +0 -49
- package/dist/Form/FormTypes/ColumnForm/ColumnForm.js +0 -95
- package/dist/Form/FormTypes/StepperForm/StepperForm.js +0 -122
- package/dist/Form/Section/MaterialSection/MaterialSection.js +0 -41
- package/dist/Form/Section/Section.js +0 -29
- package/dist/Form/Terms/Term/MaterialTerm/MaterialTerm.js +0 -101
- package/dist/Form/Terms/Term/Term.js +0 -25
- package/dist/Form/Terms/Terms.js +0 -45
- package/dist/FormSteps/@Construction/CBRElementStep/CBRElementStep.js +0 -137
- package/dist/FormSteps/@Construction/CBRIncidentsStep/CBRIncidentsStep.js +0 -25
- package/dist/FormSteps/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/Incident/Incident.js +0 -55
- package/dist/FormSteps/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/MaterialCBRIncidentsStep.js +0 -129
- package/dist/FormSteps/@Construction/CBRPropertyStep/CBRPropertyStep.js +0 -146
- package/dist/FormSteps/AYFStepMapper.js +0 -160
- package/dist/FormSteps/ApiSelectorStep/ApiSelectorStep.js +0 -25
- package/dist/FormSteps/ApiSelectorStep/MaterialApiSelectorStep/MaterialApiSelectorStep.js +0 -157
- package/dist/FormSteps/CBRStepMapper.js +0 -206
- package/dist/FormSteps/CheckBoxStep/CheckBoxStep.js +0 -25
- package/dist/FormSteps/CheckBoxStep/MaterialCheckBoxStep/MaterialCheckBoxStep.js +0 -47
- package/dist/FormSteps/ClassifierSelectorStep/ClassifierSelectorStep.js +0 -25
- package/dist/FormSteps/ClassifierSelectorStep/MaterialClassifierSelectorStep/MaterialClassifierSelectorStep.js +0 -73
- package/dist/FormSteps/CollapsibleStep/CollapsibleStep.js +0 -39
- package/dist/FormSteps/CollapsibleStep/MaterialTitleStep/MaterialCollapsibleStep.js +0 -83
- package/dist/FormSteps/CustomStep.js +0 -39
- package/dist/FormSteps/DatePickerStep/DatePickerStep.js +0 -25
- package/dist/FormSteps/DatePickerStep/MaterialDatePickerStep/MaterialDatePickerStep.js +0 -29
- package/dist/FormSteps/EntityValueStep/EntityValuePickerStep.js +0 -25
- package/dist/FormSteps/EntityValueStep/MaterialEntityValuePickerStep/MaterialEntityValuePickerStep.js +0 -146
- package/dist/FormSteps/FileUploadStep/FileUploadStep.js +0 -25
- package/dist/FormSteps/FileUploadStep/MaterialFileUploadStep/FileComponent/FileComponent.js +0 -131
- package/dist/FormSteps/FileUploadStep/MaterialFileUploadStep/MaterialFileUploadStep.js +0 -266
- package/dist/FormSteps/MapperStep/MapperStep.js +0 -25
- package/dist/FormSteps/MapperStep/MaterialMapperStep/Element/ListMapperElement/ListMapperElement.js +0 -52
- package/dist/FormSteps/MapperStep/MaterialMapperStep/Element/MapperElementComponent.js +0 -51
- package/dist/FormSteps/MapperStep/MaterialMapperStep/Element/PillMapperElement/PillMapperElement.js +0 -50
- package/dist/FormSteps/MapperStep/MaterialMapperStep/MaterialMapperStep.js +0 -157
- package/dist/FormSteps/RatingStep/MaterialRatingStep/MaterialRatingStep.js +0 -61
- package/dist/FormSteps/RatingStep/RatingStep.js +0 -25
- package/dist/FormSteps/SelectorStep/MaterialSelectorStep/MaterialSelectorStep.js +0 -60
- package/dist/FormSteps/SelectorStep/SelectorStep.js +0 -25
- package/dist/FormSteps/SeparatorStep/MaterialSeparatorStep/MaterialSeparatorStep.js +0 -13
- package/dist/FormSteps/SeparatorStep/SeparatorStep.js +0 -25
- package/dist/FormSteps/SmartSelectStep/MaterialSmartSelectStep/MaterialSmartSelectStep.js +0 -195
- package/dist/FormSteps/SmartSelectStep/SmartSelectStep.js +0 -25
- package/dist/FormSteps/Step.js +0 -122
- package/dist/FormSteps/StepFunctions.js +0 -268
- package/dist/FormSteps/StepHooks.js +0 -143
- package/dist/FormSteps/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaEditorStep.js +0 -150
- package/dist/FormSteps/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaStep.js +0 -38
- package/dist/FormSteps/TextAreaStep/TextAreaStep.js +0 -29
- package/dist/FormSteps/TextInputStep/MaterialTextInputStep/MaterialTextInputStep.js +0 -52
- package/dist/FormSteps/TextInputStep/TextInputStep.js +0 -25
- package/dist/FormSteps/TitleStep/MaterialTitleStep/MaterialTitleStep.js +0 -45
- package/dist/FormSteps/TitleStep/TitleStep.js +0 -25
- package/dist/FormSteps/Utils/@StepFiller/StepFiller.js +0 -48
- package/dist/FormSteps/Utils/MaterialInputContainer/MaterialInputContainer.js +0 -32
- package/dist/Icons/Construction/LeakIcon.js +0 -17
- package/dist/Icons/Construction/ProjectIcon.js +0 -17
- package/dist/Icons/Construction/PropertyIcon.js +0 -17
- package/dist/Icons/Construction/SpaceIcon.js +0 -17
- package/dist/Icons/DocumentIcon.js +0 -17
- package/dist/Icons/Entities/CheckListIcon.js +0 -17
- package/dist/Icons/Entities/GenericEntityIcon.js +0 -17
- package/dist/Icons/Entities/HandshakeIcon.js +0 -17
- package/dist/Icons/Entities/SupplierIcon.js +0 -17
- package/dist/Services/FileService.js +0 -92
- package/dist/Services/FormService.js +0 -59
- package/dist/Services/OrganizationService.js +0 -65
- package/dist/Shared/CustomBtn/CustomBtn.js +0 -96
- package/dist/Shared/InputIcon/InputIcon.js +0 -94
- package/dist/Shared/Loader/Loader.js +0 -26
- package/dist/Shared/Navbar/Navbar.js +0 -18
- package/dist/Shared/Navbar/Navbar.stories.js +0 -13
- package/dist/Shared/Rating/Rating.js +0 -41
- package/dist/Shared/Rating/Rating.stories.js +0 -59
- package/dist/Shared/Rating/Ratings/LikeRating.js +0 -43
- package/dist/Shared/Rating/Ratings/SatisfactionRating.js +0 -61
- package/dist/Shared/Rating/Ratings/ScaleRating.js +0 -62
- package/dist/Shared/RoundedButton/RoundedButton.js +0 -45
- package/dist/Shared/RoundedButton/RoundedButton.stories.js +0 -36
- package/dist/Shared/RoundedCheckBox/RoundedCheckBox.js +0 -101
- package/dist/Shared/RoundedCheckBox/RoundedCheckBox.stories.js +0 -50
- package/dist/Shared/RoundedDatePicker/RoundedDatePicker.js +0 -348
- package/dist/Shared/RoundedDatePicker/RoundedDatePicker.stories.js +0 -223
- package/dist/Shared/RoundedSelect/RoundedSelect.js +0 -214
- package/dist/Shared/RoundedSelect/RoundedSelect.stories.js +0 -91
- package/dist/Shared/RoundedSmartSelect/RoundedSmartSelect.js +0 -236
- package/dist/Shared/RoundedSmartSelect/RoundedSmartSelect.stories.js +0 -318
- package/dist/Shared/RoundedTextField/RoundedTextField.js +0 -175
- package/dist/Shared/RoundedTextField/RoundedTextField.stories.js +0 -224
- package/dist/States/GlobalSlice.js +0 -34
- package/dist/States/SiteSlice.js +0 -129
- package/dist/States/WidthStatsSlice.js +0 -23
- package/dist/Utils/AxiosAPI.js +0 -8
- package/dist/Utils/AxiosWidget.js +0 -8
- package/dist/Utils/CBRFunctions.js +0 -53
- package/dist/Utils/DraftFunctions.js +0 -43
- package/dist/Utils/MaterialProviders.js +0 -31
- package/dist/Utils/TestUtils.js +0 -65
- package/dist/Utils/store.js +0 -84
- package/dist/Widget.js +0 -59
- package/dist/constants/Files/FileExtensions.js +0 -68
- package/dist/constants/Files/FileMaxSize.js +0 -2
- package/dist/constants/InternalFormStyle.js +0 -16
- package/dist/constants/MaterialClassNameSeed.js +0 -1
- package/dist/hooks.js +0 -25
- package/dist/index.js +0 -31
- /package/dist/{@Types → cjs/@Types}/@Types.d.ts +0 -0
- /package/dist/{@Types → cjs/@Types}/AYFFormStep.d.ts +0 -0
- /package/dist/{@Types → cjs/@Types}/Branding.d.ts +0 -0
- /package/dist/{@Types → cjs/@Types}/CBRFormStep.d.ts +0 -0
- /package/dist/{@Types → cjs/@Types}/Form.d.ts +0 -0
- /package/dist/{@Types → cjs/@Types}/FormStep.d.ts +0 -0
- /package/dist/{@Types → cjs/@Types}/GenericFormSteps.d.ts +0 -0
- /package/dist/{@Types → cjs/@Types}/MapperElement.d.ts +0 -0
- /package/dist/{@Types → cjs/@Types}/Organization.d.ts +0 -0
- /package/dist/{@Types → cjs/@Types}/index.d.ts +0 -0
- /package/dist/{App → cjs/App}/App.css +0 -0
- /package/dist/{App → cjs/App}/App.d.ts +0 -0
- /package/dist/{App → cjs/App}/App.module.css +0 -0
- /package/dist/{App → cjs/App}/AppFunctions.d.ts +0 -0
- /package/dist/{App → cjs/App}/AppHooks.d.ts +0 -0
- /package/dist/{Contexts → cjs/Contexts}/CustomContext.d.ts +0 -0
- /package/dist/{Contexts → cjs/Contexts}/FormContext.d.ts +0 -0
- /package/dist/{Contexts → cjs/Contexts}/SectionContext.d.ts +0 -0
- /package/dist/{Form → cjs/Form}/ConfirmationDialog/ConfirmationDialog.d.ts +0 -0
- /package/dist/{Form → cjs/Form}/ConfirmationDialog/ConfirmationDialog.module.css +0 -0
- /package/dist/{Form → cjs/Form}/Form.d.ts +0 -0
- /package/dist/{Form → cjs/Form}/Form.module.css +0 -0
- /package/dist/{Form → cjs/Form}/FormFunctions.d.ts +0 -0
- /package/dist/{Form → cjs/Form}/FormHooks.d.ts +0 -0
- /package/dist/{Form → cjs/Form}/FormTypes/ColumnForm/ColumnForm.d.ts +0 -0
- /package/dist/{Form → cjs/Form}/FormTypes/ColumnForm/ColumnForm.module.css +0 -0
- /package/dist/{Form → cjs/Form}/FormTypes/StepperForm/StepperForm.d.ts +0 -0
- /package/dist/{Form → cjs/Form}/FormTypes/StepperForm/StepperForm.module.css +0 -0
- /package/dist/{Form → cjs/Form}/Section/MaterialSection/MaterialSection.d.ts +0 -0
- /package/dist/{Form → cjs/Form}/Section/MaterialSection/MaterialSection.module.css +0 -0
- /package/dist/{Form → cjs/Form}/Section/Section.d.ts +0 -0
- /package/dist/{Form → cjs/Form}/Terms/Term/MaterialTerm/MaterialTerm.d.ts +0 -0
- /package/dist/{Form → cjs/Form}/Terms/Term/MaterialTerm/MaterialTerm.module.css +0 -0
- /package/dist/{Form → cjs/Form}/Terms/Term/Term.d.ts +0 -0
- /package/dist/{Form → cjs/Form}/Terms/Terms.d.ts +0 -0
- /package/dist/{Form → cjs/Form}/Terms/Terms.module.css +0 -0
- /package/dist/{FormSteps → cjs/FormSteps}/@Construction/CBRElementStep/CBRElementStep.d.ts +0 -0
- /package/dist/{FormSteps → cjs/FormSteps}/@Construction/CBRIncidentsStep/CBRIncidentsStep.d.ts +0 -0
- /package/dist/{FormSteps → cjs/FormSteps}/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/Incident/Incident.d.ts +0 -0
- /package/dist/{FormSteps → cjs/FormSteps}/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/Incident/Incident.module.css +0 -0
- /package/dist/{FormSteps → cjs/FormSteps}/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/MaterialCBRIncidentsStep.d.ts +0 -0
- /package/dist/{FormSteps → cjs/FormSteps}/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/MaterialCBRIncidentsStep.module.css +0 -0
- /package/dist/{FormSteps → cjs/FormSteps}/@Construction/CBRPropertyStep/CBRPropertyStep.d.ts +0 -0
- /package/dist/{FormSteps → cjs/FormSteps}/@Construction/CBRPropertyStep/CBRPropertyStep.module.css +0 -0
- /package/dist/{FormSteps → cjs/FormSteps}/AYFStepMapper.d.ts +0 -0
- /package/dist/{FormSteps → cjs/FormSteps}/ApiSelectorStep/ApiSelectorStep.d.ts +0 -0
- /package/dist/{FormSteps → cjs/FormSteps}/ApiSelectorStep/MaterialApiSelectorStep/MaterialApiSelectorStep.d.ts +0 -0
- /package/dist/{FormSteps → cjs/FormSteps}/ApiSelectorStep/MaterialApiSelectorStep/MaterialApiSelectorStep.module.css +0 -0
- /package/dist/{FormSteps → cjs/FormSteps}/CBRStepMapper.d.ts +0 -0
- /package/dist/{FormSteps → cjs/FormSteps}/CheckBoxStep/CheckBoxStep.d.ts +0 -0
- /package/dist/{FormSteps → cjs/FormSteps}/CheckBoxStep/MaterialCheckBoxStep/MaterialCheckBoxStep.d.ts +0 -0
- /package/dist/{FormSteps → cjs/FormSteps}/CheckBoxStep/MaterialCheckBoxStep/MaterialCheckBoxStep.module.css +0 -0
- /package/dist/{FormSteps → cjs/FormSteps}/ClassifierSelectorStep/ClassifierSelectorStep.d.ts +0 -0
- /package/dist/{FormSteps → cjs/FormSteps}/ClassifierSelectorStep/MaterialClassifierSelectorStep/MaterialClassifierSelectorStep.d.ts +0 -0
- /package/dist/{FormSteps → cjs/FormSteps}/CollapsibleStep/CollapsibleStep.d.ts +0 -0
- /package/dist/{FormSteps → cjs/FormSteps}/CollapsibleStep/MaterialTitleStep/MaterialCollapsibleStep.d.ts +0 -0
- /package/dist/{FormSteps → cjs/FormSteps}/CollapsibleStep/MaterialTitleStep/MaterialCollapsibleStep.module.css +0 -0
- /package/dist/{FormSteps → cjs/FormSteps}/CustomStep.d.ts +0 -0
- /package/dist/{FormSteps → cjs/FormSteps}/DatePickerStep/DatePickerStep.d.ts +0 -0
- /package/dist/{FormSteps → cjs/FormSteps}/DatePickerStep/MaterialDatePickerStep/MaterialDatePickerStep.d.ts +0 -0
- /package/dist/{FormSteps → cjs/FormSteps}/EntityValueStep/EntityValuePickerStep.d.ts +0 -0
- /package/dist/{FormSteps → cjs/FormSteps}/EntityValueStep/MaterialEntityValuePickerStep/MaterialEntityValuePickerStep.d.ts +0 -0
- /package/dist/{FormSteps → cjs/FormSteps}/FileUploadStep/FileUploadStep.d.ts +0 -0
- /package/dist/{FormSteps → cjs/FormSteps}/FileUploadStep/MaterialFileUploadStep/FileComponent/FileComponent.d.ts +0 -0
- /package/dist/{FormSteps → cjs/FormSteps}/FileUploadStep/MaterialFileUploadStep/FileComponent/FileComponent.module.css +0 -0
- /package/dist/{FormSteps → cjs/FormSteps}/FileUploadStep/MaterialFileUploadStep/MaterialFileUploadStep.d.ts +0 -0
- /package/dist/{FormSteps → cjs/FormSteps}/FileUploadStep/MaterialFileUploadStep/MaterialFileUploadStep.module.css +0 -0
- /package/dist/{FormSteps → cjs/FormSteps}/MapperStep/MapperStep.d.ts +0 -0
- /package/dist/{FormSteps → cjs/FormSteps}/MapperStep/MaterialMapperStep/Element/ListMapperElement/ListMapperElement.d.ts +0 -0
- /package/dist/{FormSteps → cjs/FormSteps}/MapperStep/MaterialMapperStep/Element/ListMapperElement/ListMapperElement.module.css +0 -0
- /package/dist/{FormSteps → cjs/FormSteps}/MapperStep/MaterialMapperStep/Element/MapperElementComponent.d.ts +0 -0
- /package/dist/{FormSteps → cjs/FormSteps}/MapperStep/MaterialMapperStep/Element/PillMapperElement/PillMapperElement.d.ts +0 -0
- /package/dist/{FormSteps → cjs/FormSteps}/MapperStep/MaterialMapperStep/Element/PillMapperElement/PillMapperElement.module.css +0 -0
- /package/dist/{FormSteps → cjs/FormSteps}/MapperStep/MaterialMapperStep/MaterialMapperStep.d.ts +0 -0
- /package/dist/{FormSteps → cjs/FormSteps}/MapperStep/MaterialMapperStep/MaterialMapperStep.module.css +0 -0
- /package/dist/{FormSteps → cjs/FormSteps}/RatingStep/MaterialRatingStep/MaterialRatingStep.d.ts +0 -0
- /package/dist/{FormSteps → cjs/FormSteps}/RatingStep/MaterialRatingStep/MaterialRatingStep.module.css +0 -0
- /package/dist/{FormSteps → cjs/FormSteps}/RatingStep/RatingStep.d.ts +0 -0
- /package/dist/{FormSteps → cjs/FormSteps}/SelectorStep/MaterialSelectorStep/MaterialSelectorStep.d.ts +0 -0
- /package/dist/{FormSteps → cjs/FormSteps}/SelectorStep/MaterialSelectorStep/MaterialSelectorStep.module.css +0 -0
- /package/dist/{FormSteps → cjs/FormSteps}/SelectorStep/SelectorStep.d.ts +0 -0
- /package/dist/{FormSteps → cjs/FormSteps}/SeparatorStep/MaterialSeparatorStep/MaterialSeparatorStep.d.ts +0 -0
- /package/dist/{FormSteps → cjs/FormSteps}/SeparatorStep/MaterialSeparatorStep/MaterialSeparatorStep.module.css +0 -0
- /package/dist/{FormSteps → cjs/FormSteps}/SeparatorStep/SeparatorStep.d.ts +0 -0
- /package/dist/{FormSteps → cjs/FormSteps}/SmartSelectStep/MaterialSmartSelectStep/MaterialSmartSelectStep.d.ts +0 -0
- /package/dist/{FormSteps → cjs/FormSteps}/SmartSelectStep/SmartSelectStep.d.ts +0 -0
- /package/dist/{FormSteps → cjs/FormSteps}/Step.d.ts +0 -0
- /package/dist/{FormSteps → cjs/FormSteps}/StepFunctions.d.ts +0 -0
- /package/dist/{FormSteps → cjs/FormSteps}/StepHooks.d.ts +0 -0
- /package/dist/{FormSteps → cjs/FormSteps}/TextAreaStep/MaterialTextAreaStep/DraftEditor.css +0 -0
- /package/dist/{FormSteps → cjs/FormSteps}/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaEditorStep.d.ts +0 -0
- /package/dist/{FormSteps → cjs/FormSteps}/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaStep.d.ts +0 -0
- /package/dist/{FormSteps → cjs/FormSteps}/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaStep.module.css +0 -0
- /package/dist/{FormSteps → cjs/FormSteps}/TextAreaStep/TextAreaStep.d.ts +0 -0
- /package/dist/{FormSteps → cjs/FormSteps}/TextInputStep/MaterialTextInputStep/MaterialTextInputStep.d.ts +0 -0
- /package/dist/{FormSteps → cjs/FormSteps}/TextInputStep/MaterialTextInputStep/MaterialTextInputStep.module.css +0 -0
- /package/dist/{FormSteps → cjs/FormSteps}/TextInputStep/TextInputStep.d.ts +0 -0
- /package/dist/{FormSteps → cjs/FormSteps}/TitleStep/MaterialTitleStep/MaterialTitleStep.d.ts +0 -0
- /package/dist/{FormSteps → cjs/FormSteps}/TitleStep/MaterialTitleStep/MaterialTitleStep.module.css +0 -0
- /package/dist/{FormSteps → cjs/FormSteps}/TitleStep/TitleStep.d.ts +0 -0
- /package/dist/{FormSteps → cjs/FormSteps}/Utils/@StepFiller/StepFiller.d.ts +0 -0
- /package/dist/{FormSteps → cjs/FormSteps}/Utils/@StepFiller/StepFiller.module.css +0 -0
- /package/dist/{FormSteps → cjs/FormSteps}/Utils/MaterialInputContainer/MaterialInputContainer.d.ts +0 -0
- /package/dist/{FormSteps → cjs/FormSteps}/Utils/MaterialInputContainer/MaterialInputContainer.module.css +0 -0
- /package/dist/{Icons → cjs/Icons}/Construction/LeakIcon.d.ts +0 -0
- /package/dist/{Icons → cjs/Icons}/Construction/ProjectIcon.d.ts +0 -0
- /package/dist/{Icons → cjs/Icons}/Construction/PropertyIcon.d.ts +0 -0
- /package/dist/{Icons → cjs/Icons}/Construction/SpaceIcon.d.ts +0 -0
- /package/dist/{Icons → cjs/Icons}/DocumentIcon.d.ts +0 -0
- /package/dist/{Icons → cjs/Icons}/Entities/CheckListIcon.d.ts +0 -0
- /package/dist/{Icons → cjs/Icons}/Entities/GenericEntityIcon.d.ts +0 -0
- /package/dist/{Icons → cjs/Icons}/Entities/HandshakeIcon.d.ts +0 -0
- /package/dist/{Icons → cjs/Icons}/Entities/SupplierIcon.d.ts +0 -0
- /package/dist/{Services → cjs/Services}/FileService.d.ts +0 -0
- /package/dist/{Services → cjs/Services}/FormService.d.ts +0 -0
- /package/dist/{Services → cjs/Services}/OrganizationService.d.ts +0 -0
- /package/dist/{Shared → cjs/Shared}/CustomBtn/CustomBtn.d.ts +0 -0
- /package/dist/{Shared → cjs/Shared}/CustomBtn/CustomBtn.module.css +0 -0
- /package/dist/{Shared → cjs/Shared}/InputIcon/InputIcon.d.ts +0 -0
- /package/dist/{Shared → cjs/Shared}/Loader/Loader.d.ts +0 -0
- /package/dist/{Shared → cjs/Shared}/Loader/Loader.module.css +0 -0
- /package/dist/{Shared → cjs/Shared}/Navbar/Navbar.d.ts +0 -0
- /package/dist/{Shared → cjs/Shared}/Navbar/Navbar.module.css +0 -0
- /package/dist/{Shared → cjs/Shared}/Navbar/Navbar.stories.d.ts +0 -0
- /package/dist/{Shared → cjs/Shared}/Rating/Rating.d.ts +0 -0
- /package/dist/{Shared → cjs/Shared}/Rating/Rating.module.css +0 -0
- /package/dist/{Shared → cjs/Shared}/Rating/Rating.stories.d.ts +0 -0
- /package/dist/{Shared → cjs/Shared}/Rating/Ratings/LikeRating.d.ts +0 -0
- /package/dist/{Shared → cjs/Shared}/Rating/Ratings/SatisfactionRating.d.ts +0 -0
- /package/dist/{Shared → cjs/Shared}/Rating/Ratings/ScaleRating.d.ts +0 -0
- /package/dist/{Shared → cjs/Shared}/RoundedButton/RoundedButton.d.ts +0 -0
- /package/dist/{Shared → cjs/Shared}/RoundedButton/RoundedButton.stories.d.ts +0 -0
- /package/dist/{Shared → cjs/Shared}/RoundedCheckBox/RoundedCheckBox.d.ts +0 -0
- /package/dist/{Shared → cjs/Shared}/RoundedCheckBox/RoundedCheckBox.stories.d.ts +0 -0
- /package/dist/{Shared → cjs/Shared}/RoundedDatePicker/RoundedDatePicker.d.ts +0 -0
- /package/dist/{Shared → cjs/Shared}/RoundedDatePicker/RoundedDatePicker.stories.d.ts +0 -0
- /package/dist/{Shared → cjs/Shared}/RoundedSelect/RoundedSelect.d.ts +0 -0
- /package/dist/{Shared → cjs/Shared}/RoundedSelect/RoundedSelect.stories.d.ts +0 -0
- /package/dist/{Shared → cjs/Shared}/RoundedSmartSelect/RoundedSmartSelect.d.ts +0 -0
- /package/dist/{Shared → cjs/Shared}/RoundedSmartSelect/RoundedSmartSelect.stories.d.ts +0 -0
- /package/dist/{Shared → cjs/Shared}/RoundedTextField/RoundedTextField.d.ts +0 -0
- /package/dist/{Shared → cjs/Shared}/RoundedTextField/RoundedTextField.stories.d.ts +0 -0
- /package/dist/{States → cjs/States}/GlobalSlice.d.ts +0 -0
- /package/dist/{States → cjs/States}/SiteSlice.d.ts +0 -0
- /package/dist/{States → cjs/States}/WidthStatsSlice.d.ts +0 -0
- /package/dist/{Utils → cjs/Utils}/AxiosAPI.d.ts +0 -0
- /package/dist/{Utils → cjs/Utils}/AxiosWidget.d.ts +0 -0
- /package/dist/{Utils → cjs/Utils}/CBRFunctions.d.ts +0 -0
- /package/dist/{Utils → cjs/Utils}/DraftFunctions.d.ts +0 -0
- /package/dist/{Utils → cjs/Utils}/MaterialProviders.d.ts +0 -0
- /package/dist/{Utils → cjs/Utils}/TestUtils.d.ts +0 -0
- /package/dist/{Utils → cjs/Utils}/store.d.ts +0 -0
- /package/dist/{Widget.d.ts → cjs/Widget.d.ts} +0 -0
- /package/dist/{__mocks__ → cjs/__mocks__}/axios.d.ts +0 -0
- /package/dist/{constants → cjs/constants}/AYFFormStepTypes.d.ts +0 -0
- /package/dist/{constants → cjs/constants}/CBRFormStepTypes.d.ts +0 -0
- /package/dist/{constants → cjs/constants}/Files/FileExtensions.d.ts +0 -0
- /package/dist/{constants → cjs/constants}/Files/FileMaxSize.d.ts +0 -0
- /package/dist/{constants → cjs/constants}/FormStepTypes.d.ts +0 -0
- /package/dist/{constants → cjs/constants}/IconTypes.d.ts +0 -0
- /package/dist/{constants → cjs/constants}/InternalFormStyle.d.ts +0 -0
- /package/dist/{constants → cjs/constants}/MaterialClassNameSeed.d.ts +0 -0
- /package/dist/{hooks.d.ts → cjs/hooks.d.ts} +0 -0
- /package/dist/{index.d.ts → cjs/index.d.ts} +0 -0
- /package/dist/{index.lib.d.ts → cjs/index.lib.d.ts} +0 -0
- /package/dist/{index.module.css → cjs/index.module.css} +0 -0
- /package/dist/{setupTests.d.ts → cjs/setupTests.d.ts} +0 -0
- /package/dist/{@Types → mjs/@Types}/@Types.js +0 -0
- /package/dist/{@Types → mjs/@Types}/AYFFormStep.js +0 -0
- /package/dist/{@Types → mjs/@Types}/Branding.js +0 -0
- /package/dist/{@Types → mjs/@Types}/CBRFormStep.js +0 -0
- /package/dist/{@Types → mjs/@Types}/Form.js +0 -0
- /package/dist/{@Types → mjs/@Types}/FormStep.js +0 -0
- /package/dist/{@Types → mjs/@Types}/GenericFormSteps.js +0 -0
- /package/dist/{@Types → mjs/@Types}/MapperElement.js +0 -0
- /package/dist/{@Types → mjs/@Types}/Organization.js +0 -0
- /package/dist/{@Types/index.js → mjs/@Types/index.d.ts} +0 -0
- /package/dist/{__mocks__/axios.js → mjs/__mocks__/axios.d.ts} +0 -0
- /package/dist/{constants → mjs/constants}/AYFFormStepTypes.js +0 -0
- /package/dist/{constants → mjs/constants}/CBRFormStepTypes.js +0 -0
- /package/dist/{constants → mjs/constants}/FormStepTypes.js +0 -0
- /package/dist/{constants → mjs/constants}/IconTypes.js +0 -0
- /package/dist/{index.lib.js → mjs/index.lib.js} +0 -0
- /package/dist/{setupTests.js → mjs/setupTests.js} +0 -0
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
import { RawDraftContentState, convertFromRaw, convertToRaw } from 'draft-js';
|
|
2
|
+
import { FormStep, Mapper } from '../@Types/FormStep';
|
|
3
|
+
import StepTypes, { EntityValueDataTypes } from '../constants/FormStepTypes';
|
|
4
|
+
import { DependencyStore, StepDependency } from './Form';
|
|
5
|
+
import { CustomStep } from '../FormSteps/CustomStep';
|
|
6
|
+
import { CBRFormStep } from '../@Types/CBRFormStep';
|
|
7
|
+
import { MapperElement } from '../@Types/MapperElement';
|
|
8
|
+
import { ValuesStore } from '../States/SiteSlice';
|
|
9
|
+
import { calcRecursiveData } from '../App/AppFunctions';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Function that cals the value of a step to output on submit
|
|
13
|
+
*/
|
|
14
|
+
export const calcValue = (
|
|
15
|
+
idStep: string,
|
|
16
|
+
steps: Record<string, FormStep>,
|
|
17
|
+
values: Record<string, any>,
|
|
18
|
+
customSteps: Record<string, CustomStep> | undefined,
|
|
19
|
+
deleteIds: string[],
|
|
20
|
+
value = values[idStep]
|
|
21
|
+
): any => {
|
|
22
|
+
const step = steps[idStep];
|
|
23
|
+
if (!step) return value;
|
|
24
|
+
const custom = customSteps?.[step?.type];
|
|
25
|
+
if (custom !== undefined) {
|
|
26
|
+
return custom.calcValue?.(step, value) ?? value;
|
|
27
|
+
} else {
|
|
28
|
+
switch (step.type) {
|
|
29
|
+
case StepTypes.TEXTAREA: {
|
|
30
|
+
if (step.hasTextEditor) {
|
|
31
|
+
const currentContent = value.getCurrentContent();
|
|
32
|
+
return {
|
|
33
|
+
value: currentContent.getPlainText(),
|
|
34
|
+
draft: convertToRaw(currentContent),
|
|
35
|
+
};
|
|
36
|
+
} else {
|
|
37
|
+
return {
|
|
38
|
+
value,
|
|
39
|
+
draft: stringToDraft(value),
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
case StepTypes.FILEUPLOAD: {
|
|
44
|
+
return value.map((val: any) => ({
|
|
45
|
+
fileName: val.fileName,
|
|
46
|
+
S3Key: val.S3Key,
|
|
47
|
+
}));
|
|
48
|
+
}
|
|
49
|
+
case StepTypes.SELECTOR:
|
|
50
|
+
case StepTypes.CLASSIFIER_SELECTOR: {
|
|
51
|
+
return value.value;
|
|
52
|
+
}
|
|
53
|
+
case StepTypes.MAPPER: {
|
|
54
|
+
const elements: MapperElement<any>[] = value?.filter(
|
|
55
|
+
(element: any) => element.deleted !== true
|
|
56
|
+
);
|
|
57
|
+
|
|
58
|
+
const mappedValues: Record<string, any>[] = [];
|
|
59
|
+
for (const element of elements) {
|
|
60
|
+
const newValue: Record<string, any> = {
|
|
61
|
+
id: element.id,
|
|
62
|
+
};
|
|
63
|
+
for (const key of Object.keys(element.originalValues)) {
|
|
64
|
+
newValue[key] = element.originalValues[key];
|
|
65
|
+
}
|
|
66
|
+
if (element.value) newValue.value = element.value;
|
|
67
|
+
for (const idStep of Object.keys(step.steps)) {
|
|
68
|
+
const mappedId = element.ids[idStep];
|
|
69
|
+
if (values[mappedId] !== undefined) {
|
|
70
|
+
newValue[idStep] = calcValue(
|
|
71
|
+
idStep,
|
|
72
|
+
step.steps,
|
|
73
|
+
values,
|
|
74
|
+
customSteps,
|
|
75
|
+
deleteIds,
|
|
76
|
+
values[mappedId]
|
|
77
|
+
);
|
|
78
|
+
deleteIds.push(mappedId);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
mappedValues.push(newValue);
|
|
82
|
+
}
|
|
83
|
+
return mappedValues;
|
|
84
|
+
}
|
|
85
|
+
case StepTypes.TITLE: {
|
|
86
|
+
return value ?? undefined;
|
|
87
|
+
}
|
|
88
|
+
case StepTypes.COLLAPSIBLE:
|
|
89
|
+
deleteIds.push(idStep);
|
|
90
|
+
return;
|
|
91
|
+
default:
|
|
92
|
+
if ((step?.type as any) === 'CBR_INCIDENCIAS') {
|
|
93
|
+
return value?.filter(
|
|
94
|
+
(incidencia: any) => incidencia.deleted !== true
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
return value;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
function stringToDraft(text: string): any {
|
|
103
|
+
const draftStructure = {
|
|
104
|
+
blocks: [] as any[],
|
|
105
|
+
entityMap: {},
|
|
106
|
+
};
|
|
107
|
+
text.split('\n').forEach((element, index) => {
|
|
108
|
+
draftStructure.blocks.push({
|
|
109
|
+
key: String(index),
|
|
110
|
+
text: element,
|
|
111
|
+
type: 'unstyled',
|
|
112
|
+
depth: 0,
|
|
113
|
+
inlineStyleRanges: [],
|
|
114
|
+
entityRanges: [],
|
|
115
|
+
data: {},
|
|
116
|
+
});
|
|
117
|
+
});
|
|
118
|
+
return draftStructure as RawDraftContentState;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export function calcDependencies(
|
|
122
|
+
steps: Record<string, FormStep | CBRFormStep>,
|
|
123
|
+
customSteps: Record<string, CustomStep> = {},
|
|
124
|
+
allSteps: Record<string, FormStep | CBRFormStep> = steps,
|
|
125
|
+
dependencies: DependencyStore = {},
|
|
126
|
+
values: ValuesStore = {
|
|
127
|
+
global: {},
|
|
128
|
+
sections: {},
|
|
129
|
+
},
|
|
130
|
+
addDependents = true
|
|
131
|
+
): DependencyStore {
|
|
132
|
+
for (const step of Object.values(steps)) {
|
|
133
|
+
if (step.dependencies) {
|
|
134
|
+
for (const idDep of step.dependencies) {
|
|
135
|
+
if (
|
|
136
|
+
dependencies[idDep] === undefined &&
|
|
137
|
+
(addDependents || allSteps[idDep])
|
|
138
|
+
)
|
|
139
|
+
dependencies[idDep] = calcStepDependency(
|
|
140
|
+
idDep,
|
|
141
|
+
allSteps,
|
|
142
|
+
values,
|
|
143
|
+
customSteps
|
|
144
|
+
);
|
|
145
|
+
if (addDependents) dependencies[idDep].dependents.push(step);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
if (step.type === StepTypes.ENTITYVALUEPICKER) {
|
|
149
|
+
for (const dep of [...step.path, ...step.filters]) {
|
|
150
|
+
if (dep.type !== EntityValueDataTypes.STEP) continue;
|
|
151
|
+
if (step.dependencies?.includes(dep.idStep)) continue;
|
|
152
|
+
if (
|
|
153
|
+
dependencies[dep.idStep] === undefined &&
|
|
154
|
+
(addDependents || allSteps[dep.idStep])
|
|
155
|
+
) {
|
|
156
|
+
dependencies[dep.idStep] = calcStepDependency(
|
|
157
|
+
dep.idStep,
|
|
158
|
+
allSteps,
|
|
159
|
+
values,
|
|
160
|
+
customSteps
|
|
161
|
+
);
|
|
162
|
+
}
|
|
163
|
+
if (addDependents)
|
|
164
|
+
dependencies[dep.idStep].dependents.push(step);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
if (step.type === StepTypes.MAPPER) {
|
|
168
|
+
const subSteps = calcMapperSubSteps(
|
|
169
|
+
step,
|
|
170
|
+
values.sections[step.idSection]?.[step.id],
|
|
171
|
+
customSteps
|
|
172
|
+
);
|
|
173
|
+
const hasSubSteps = Object.keys(subSteps).length > 0;
|
|
174
|
+
calcDependencies(
|
|
175
|
+
hasSubSteps ? subSteps : step.steps,
|
|
176
|
+
customSteps,
|
|
177
|
+
{ ...allSteps, ...subSteps },
|
|
178
|
+
dependencies,
|
|
179
|
+
values,
|
|
180
|
+
hasSubSteps
|
|
181
|
+
);
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
return dependencies;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
export const calcMapperSubSteps = (
|
|
188
|
+
step: Mapper,
|
|
189
|
+
elements: MapperElement<any>[] = [],
|
|
190
|
+
customSteps: Record<string, CustomStep>
|
|
191
|
+
): Record<string, FormStep> => {
|
|
192
|
+
const newSteps: Record<string, FormStep> = {};
|
|
193
|
+
for (const element of elements) {
|
|
194
|
+
const elemSteps: Record<string, FormStep> = {};
|
|
195
|
+
for (const idSubStep of Object.keys(step.steps)) {
|
|
196
|
+
const baseStep = JSON.parse(
|
|
197
|
+
JSON.stringify(step.steps[idSubStep] ?? '{}')
|
|
198
|
+
);
|
|
199
|
+
const newIdStep = element.ids[idSubStep];
|
|
200
|
+
baseStep.id = newIdStep;
|
|
201
|
+
elemSteps[newIdStep] = baseStep;
|
|
202
|
+
newSteps[newIdStep] = baseStep;
|
|
203
|
+
}
|
|
204
|
+
calcRecursiveData(element, elemSteps, customSteps);
|
|
205
|
+
}
|
|
206
|
+
return newSteps;
|
|
207
|
+
};
|
|
208
|
+
|
|
209
|
+
function calcStepDependency(
|
|
210
|
+
idStep: string,
|
|
211
|
+
steps: Record<string, FormStep | CBRFormStep>,
|
|
212
|
+
values: ValuesStore,
|
|
213
|
+
customSteps: Record<string, CustomStep>
|
|
214
|
+
): StepDependency {
|
|
215
|
+
const depStep = steps[idStep];
|
|
216
|
+
if (!depStep) {
|
|
217
|
+
console.error('Missing Step Dependency:', idStep);
|
|
218
|
+
const originalValue = values.global[idStep];
|
|
219
|
+
return {
|
|
220
|
+
type: originalValue ? 'ORIGINAL' : ('MISSING' as any),
|
|
221
|
+
value: originalValue ?? null,
|
|
222
|
+
dependents: [],
|
|
223
|
+
};
|
|
224
|
+
}
|
|
225
|
+
const originalValue = values.sections[depStep.idSection]?.[depStep.id];
|
|
226
|
+
return {
|
|
227
|
+
type: depStep.type,
|
|
228
|
+
value: calcStepDependencyValue(depStep, originalValue, customSteps),
|
|
229
|
+
dependents: [],
|
|
230
|
+
};
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
function calcStepDependencyValue(
|
|
234
|
+
depStep: FormStep | CBRFormStep,
|
|
235
|
+
originalValue: any,
|
|
236
|
+
customSteps: Record<string, CustomStep>
|
|
237
|
+
): StepDependency['value'] {
|
|
238
|
+
const custom = customSteps[depStep?.type];
|
|
239
|
+
if (custom?.calcDependencyValue) {
|
|
240
|
+
return custom.calcDependencyValue(depStep, originalValue);
|
|
241
|
+
}
|
|
242
|
+
switch (depStep.type) {
|
|
243
|
+
case StepTypes.TEXTAREA: {
|
|
244
|
+
if (depStep.hasTextEditor) {
|
|
245
|
+
return originalValue
|
|
246
|
+
? convertFromRaw(originalValue).getPlainText()
|
|
247
|
+
: null;
|
|
248
|
+
} else {
|
|
249
|
+
return originalValue ?? null;
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
case StepTypes.MAPPER: {
|
|
253
|
+
//TODO: Esto aun no se usa
|
|
254
|
+
return (
|
|
255
|
+
originalValue?.map(
|
|
256
|
+
(mapperValue: any) => mapperValue.value ?? mapperValue
|
|
257
|
+
) ?? null
|
|
258
|
+
);
|
|
259
|
+
}
|
|
260
|
+
default:
|
|
261
|
+
return originalValue ?? null;
|
|
262
|
+
}
|
|
263
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { createSelector } from 'reselect';
|
|
2
|
+
import { RootState } from '../Utils/store';
|
|
3
|
+
import { useCallback, useLayoutEffect } from 'react';
|
|
4
|
+
import { updateWidthStats } from '../States/WidthStatsSlice';
|
|
5
|
+
import { useAppDispatch } from '../hooks';
|
|
6
|
+
import { WidthStats } from './Form';
|
|
7
|
+
import { Form } from '../@Types';
|
|
8
|
+
|
|
9
|
+
export const selectCurrentValues = createSelector(
|
|
10
|
+
[
|
|
11
|
+
(state: RootState): string | null => state.site.idCurrentSection,
|
|
12
|
+
(state: RootState): Record<string, Record<string, any>> =>
|
|
13
|
+
state.site.values.sections,
|
|
14
|
+
],
|
|
15
|
+
(idCurrent, values) => values[idCurrent ?? ''] ?? {}
|
|
16
|
+
);
|
|
17
|
+
|
|
18
|
+
export function useWidthStats(
|
|
19
|
+
containerRef: React.RefObject<HTMLDivElement>,
|
|
20
|
+
form: Form,
|
|
21
|
+
postview: boolean,
|
|
22
|
+
internal: boolean
|
|
23
|
+
): void {
|
|
24
|
+
const calcWidthStats = useCallback(
|
|
25
|
+
(currentWidth: number): WidthStats => {
|
|
26
|
+
let currentBreakPoint = form.size.blockNum;
|
|
27
|
+
const padding = postview || internal || !form.isStandAlone ? 0 : 40;
|
|
28
|
+
while (
|
|
29
|
+
currentWidth <
|
|
30
|
+
(form.size.blockSize + form.size.spacingSize) *
|
|
31
|
+
currentBreakPoint +
|
|
32
|
+
padding
|
|
33
|
+
) {
|
|
34
|
+
currentBreakPoint--;
|
|
35
|
+
}
|
|
36
|
+
return {
|
|
37
|
+
isResponsive:
|
|
38
|
+
currentWidth <
|
|
39
|
+
(form.size.blockSize + form.size.spacingSize) *
|
|
40
|
+
form.size.blockNum +
|
|
41
|
+
padding,
|
|
42
|
+
isMobile:
|
|
43
|
+
currentWidth <
|
|
44
|
+
(form.size.blockSize + form.size.spacingSize) * 2 + padding,
|
|
45
|
+
currentBreakPoint,
|
|
46
|
+
};
|
|
47
|
+
},
|
|
48
|
+
[form, postview, internal]
|
|
49
|
+
);
|
|
50
|
+
const dispatch = useAppDispatch();
|
|
51
|
+
|
|
52
|
+
/** Calcs the currentBreakPoint and if is mobile */
|
|
53
|
+
useLayoutEffect(() => {
|
|
54
|
+
const handleResize = (): void => {
|
|
55
|
+
const currentWidth = containerRef?.current?.offsetWidth;
|
|
56
|
+
if (currentWidth !== undefined) {
|
|
57
|
+
const current = calcWidthStats(currentWidth);
|
|
58
|
+
dispatch(updateWidthStats(current));
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
/** On load add a resize listener to calc the currentBreakpoint */
|
|
62
|
+
window.addEventListener('resize', handleResize);
|
|
63
|
+
handleResize();
|
|
64
|
+
return (): void => {
|
|
65
|
+
window.removeEventListener('resize', handleResize);
|
|
66
|
+
};
|
|
67
|
+
}, []);
|
|
68
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
.container {
|
|
2
|
+
width: fit-content;
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
align-items: center;
|
|
6
|
+
max-width: 100%;
|
|
7
|
+
position: relative;
|
|
8
|
+
}
|
|
9
|
+
.curtain {
|
|
10
|
+
position: absolute;
|
|
11
|
+
width: 100%;
|
|
12
|
+
height: 100%;
|
|
13
|
+
z-index: 2;
|
|
14
|
+
}
|
|
15
|
+
.submitBtnContainer {
|
|
16
|
+
margin-top: 10px;
|
|
17
|
+
width: 200px;
|
|
18
|
+
max-width: calc(100% - 40px);
|
|
19
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { useCallback, useContext, useState } from 'react';
|
|
2
|
+
import { FormComponentProps } from '../../Form';
|
|
3
|
+
import styles from './ColumnForm.module.css';
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import Terms from '../../Terms/Terms';
|
|
6
|
+
import { useFormContext } from 'react-hook-form';
|
|
7
|
+
import { useAppSelector } from '../../../hooks';
|
|
8
|
+
import Section from '../../Section/Section';
|
|
9
|
+
import CustomContext from '../../../Contexts/CustomContext';
|
|
10
|
+
import CustomBtn from '../../../Shared/CustomBtn/CustomBtn';
|
|
11
|
+
|
|
12
|
+
function ColumnForm({
|
|
13
|
+
onSubmit,
|
|
14
|
+
customSubmitBtns,
|
|
15
|
+
}: FormComponentProps): JSX.Element {
|
|
16
|
+
const [loading, setLoading] = useState(false);
|
|
17
|
+
const { postview, editable, formStyle } = useAppSelector(
|
|
18
|
+
(state) => state.global
|
|
19
|
+
);
|
|
20
|
+
const { trigger, getValues, handleSubmit } = useFormContext();
|
|
21
|
+
const { sendLabel } = useContext(CustomContext);
|
|
22
|
+
const previous = useAppSelector((state) => state.site.previousSections);
|
|
23
|
+
const next = useAppSelector((state) => state.site.nextSections);
|
|
24
|
+
|
|
25
|
+
/** Esto se usa para no tener que escuchar todo el tiempo los errores del formulario */
|
|
26
|
+
const handleErrors = handleSubmit(
|
|
27
|
+
() => {},
|
|
28
|
+
(errors) => {
|
|
29
|
+
console.error('Errors:', errors);
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
|
|
33
|
+
const submit = useCallback(async (): Promise<Record<
|
|
34
|
+
string,
|
|
35
|
+
any
|
|
36
|
+
> | void> => {
|
|
37
|
+
setLoading(true);
|
|
38
|
+
const valid = await trigger(undefined, { shouldFocus: true });
|
|
39
|
+
/** Imprimir errores si no es valido */
|
|
40
|
+
if (!valid) {
|
|
41
|
+
handleErrors();
|
|
42
|
+
return setLoading(false);
|
|
43
|
+
}
|
|
44
|
+
const values = await onSubmit(getValues());
|
|
45
|
+
setLoading(false);
|
|
46
|
+
return values;
|
|
47
|
+
}, []);
|
|
48
|
+
|
|
49
|
+
return (
|
|
50
|
+
<div
|
|
51
|
+
className={styles.container}
|
|
52
|
+
style={{ color: formStyle.textColor }}
|
|
53
|
+
>
|
|
54
|
+
{loading && <div className={styles.curtain}></div>}
|
|
55
|
+
{previous.map((idSection) => (
|
|
56
|
+
<Section key={idSection} idSection={idSection} />
|
|
57
|
+
))}
|
|
58
|
+
{next.map((idSection) => (
|
|
59
|
+
<Section key={idSection} idSection={idSection} />
|
|
60
|
+
))}
|
|
61
|
+
{/* MAP term & cond */}
|
|
62
|
+
<Terms />
|
|
63
|
+
{!postview && editable && (
|
|
64
|
+
<React.Fragment>
|
|
65
|
+
{!customSubmitBtns && (
|
|
66
|
+
<div className={styles.submitBtnContainer}>
|
|
67
|
+
<CustomBtn
|
|
68
|
+
onClick={submit}
|
|
69
|
+
width="calc(100% - 70px)"
|
|
70
|
+
label={sendLabel ?? 'Enviar'}
|
|
71
|
+
backgroundColor={formStyle.primaryColor}
|
|
72
|
+
color={formStyle.primaryContrastColor}
|
|
73
|
+
loading={loading}
|
|
74
|
+
data-testid="form__submit"
|
|
75
|
+
></CustomBtn>
|
|
76
|
+
</div>
|
|
77
|
+
)}
|
|
78
|
+
{customSubmitBtns?.(submit, loading)}
|
|
79
|
+
</React.Fragment>
|
|
80
|
+
)}
|
|
81
|
+
</div>
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export default ColumnForm;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
.container {
|
|
2
|
+
width: fit-content;
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
align-items: center;
|
|
6
|
+
max-width: 100%;
|
|
7
|
+
position: relative;
|
|
8
|
+
}
|
|
9
|
+
.curtain {
|
|
10
|
+
position: absolute;
|
|
11
|
+
width: 100%;
|
|
12
|
+
height: 100%;
|
|
13
|
+
z-index: 2;
|
|
14
|
+
}
|
|
15
|
+
.btnsContainer {
|
|
16
|
+
margin-top: 10px;
|
|
17
|
+
max-width: calc(100% - 40px);
|
|
18
|
+
display: -webkit-box; /* OLD - iOS 6-, Safari 3.1-6 */
|
|
19
|
+
display: -moz-box; /* OLD - Firefox 19- (buggy but mostly works) */
|
|
20
|
+
display: -ms-flexbox; /* TWEENER - IE 10 */
|
|
21
|
+
display: -webkit-flex; /* NEW - Chrome */
|
|
22
|
+
display: flex;
|
|
23
|
+
flex-wrap: wrap;
|
|
24
|
+
justify-content: center;
|
|
25
|
+
gap: 10px 20px;
|
|
26
|
+
}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { useCallback, useContext, useState } from 'react';
|
|
2
|
+
import { FormComponentProps } from '../../Form';
|
|
3
|
+
import styles from './StepperForm.module.css';
|
|
4
|
+
import Terms from '../../Terms/Terms';
|
|
5
|
+
import { useFormContext } from 'react-hook-form';
|
|
6
|
+
import { useAppDispatch, useAppSelector } from '../../../hooks';
|
|
7
|
+
import Section from '../../Section/Section';
|
|
8
|
+
import CustomContext from '../../../Contexts/CustomContext';
|
|
9
|
+
import * as SiteReducer from '../../../States/SiteSlice';
|
|
10
|
+
import { getAppState } from '../../../Utils/store';
|
|
11
|
+
import { IdFormContext } from '../../../App/App';
|
|
12
|
+
import CustomBtn from '../../../Shared/CustomBtn/CustomBtn';
|
|
13
|
+
|
|
14
|
+
function StepperForm({
|
|
15
|
+
onSubmit,
|
|
16
|
+
scrollToTop,
|
|
17
|
+
}: FormComponentProps): JSX.Element {
|
|
18
|
+
const [loading, setLoading] = useState<undefined | 'BACK' | 'NEXT'>(
|
|
19
|
+
undefined
|
|
20
|
+
);
|
|
21
|
+
const { postview, editable, formStyle } = useAppSelector(
|
|
22
|
+
(state) => state.global
|
|
23
|
+
);
|
|
24
|
+
const { trigger, getValues, handleSubmit } = useFormContext();
|
|
25
|
+
const { sendLabel } = useContext(CustomContext);
|
|
26
|
+
|
|
27
|
+
const dispatch = useAppDispatch();
|
|
28
|
+
const previous = useAppSelector((state) => state.site.previousSections);
|
|
29
|
+
const idCurrent = useAppSelector((state) => state.site.idCurrentSection);
|
|
30
|
+
const idForm = useContext(IdFormContext);
|
|
31
|
+
const next = useAppSelector((state) => state.site.nextSections);
|
|
32
|
+
|
|
33
|
+
/** Esto se usa para no tener que escuchar todo el tiempo los errores del formulario */
|
|
34
|
+
const handleErrors = handleSubmit(
|
|
35
|
+
() => {},
|
|
36
|
+
(errors) => {
|
|
37
|
+
console.error('Errors:', errors);
|
|
38
|
+
}
|
|
39
|
+
);
|
|
40
|
+
|
|
41
|
+
const handlePrevious = useCallback(async (): Promise<void> => {
|
|
42
|
+
dispatch(SiteReducer.handlePrevious(getValues()));
|
|
43
|
+
scrollToTop?.();
|
|
44
|
+
}, []);
|
|
45
|
+
|
|
46
|
+
const handleNext = useCallback(async (): Promise<Record<
|
|
47
|
+
string,
|
|
48
|
+
any
|
|
49
|
+
> | void> => {
|
|
50
|
+
setLoading('NEXT');
|
|
51
|
+
const valid = await trigger(undefined, { shouldFocus: true });
|
|
52
|
+
/** Imprimir errores si no es valido */
|
|
53
|
+
if (!valid) {
|
|
54
|
+
handleErrors();
|
|
55
|
+
return setLoading(undefined);
|
|
56
|
+
}
|
|
57
|
+
if (next.length > 0) {
|
|
58
|
+
dispatch(SiteReducer.handleNext(getValues()));
|
|
59
|
+
scrollToTop?.();
|
|
60
|
+
return setLoading(undefined);
|
|
61
|
+
}
|
|
62
|
+
const state = await dispatch(getAppState({ idForm })).unwrap();
|
|
63
|
+
/** put all the values of the previous sections into a single object */
|
|
64
|
+
let values = state.site.previousSections.reduce(
|
|
65
|
+
(v, idSection) => ({
|
|
66
|
+
...v,
|
|
67
|
+
...state.site.values.sections[idSection],
|
|
68
|
+
}),
|
|
69
|
+
{}
|
|
70
|
+
);
|
|
71
|
+
/** Add the current section's values */
|
|
72
|
+
values = { ...values, ...getValues() };
|
|
73
|
+
const response = await onSubmit(values);
|
|
74
|
+
setLoading(undefined);
|
|
75
|
+
return response;
|
|
76
|
+
}, [next]);
|
|
77
|
+
|
|
78
|
+
if (!idCurrent) return <></>;
|
|
79
|
+
|
|
80
|
+
return (
|
|
81
|
+
<div
|
|
82
|
+
className={styles.container}
|
|
83
|
+
style={{ color: formStyle.textColor }}
|
|
84
|
+
>
|
|
85
|
+
{loading && <div className={styles.curtain}></div>}
|
|
86
|
+
<Section key={idCurrent} idSection={idCurrent} />
|
|
87
|
+
{next.length === 0 && <Terms />}
|
|
88
|
+
<div className={styles.btnsContainer}>
|
|
89
|
+
{previous.length > 0 && (
|
|
90
|
+
<CustomBtn
|
|
91
|
+
label="Volver"
|
|
92
|
+
data-testid="form__back"
|
|
93
|
+
onClick={handlePrevious}
|
|
94
|
+
backgroundColor={formStyle.primaryColor}
|
|
95
|
+
color={formStyle.primaryContrastColor}
|
|
96
|
+
disabled={!!loading}
|
|
97
|
+
loading={loading === 'BACK'}
|
|
98
|
+
/>
|
|
99
|
+
)}
|
|
100
|
+
{(next.length > 0 || (!postview && editable)) && (
|
|
101
|
+
<CustomBtn
|
|
102
|
+
label={
|
|
103
|
+
next.length > 0
|
|
104
|
+
? 'Siguiente'
|
|
105
|
+
: sendLabel ?? 'Enviar'
|
|
106
|
+
}
|
|
107
|
+
data-testid="form__submit"
|
|
108
|
+
onClick={handleNext}
|
|
109
|
+
backgroundColor={formStyle.primaryColor}
|
|
110
|
+
color={formStyle.primaryContrastColor}
|
|
111
|
+
disabled={!!loading}
|
|
112
|
+
loading={loading === 'NEXT'}
|
|
113
|
+
/>
|
|
114
|
+
)}
|
|
115
|
+
</div>
|
|
116
|
+
</div>
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export default StepperForm;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import StepComponent from '../../../FormSteps/Step';
|
|
2
|
+
import { SectionComponentProps } from '../Section';
|
|
3
|
+
import styles from './MaterialSection.module.css';
|
|
4
|
+
import { selectBreakPoint, useAppSelector } from '../../../hooks';
|
|
5
|
+
import { useContext } from 'react';
|
|
6
|
+
import CustomContext from '../../../Contexts/CustomContext';
|
|
7
|
+
import FormContext from '../../../Contexts/FormContext';
|
|
8
|
+
|
|
9
|
+
function MaterialSection({ idSection }: SectionComponentProps): JSX.Element {
|
|
10
|
+
const currentBreakPoint = useAppSelector(selectBreakPoint);
|
|
11
|
+
const { editable } = useAppSelector((state) => state.global);
|
|
12
|
+
const form = useContext(FormContext);
|
|
13
|
+
const { sendLabel } = useContext(CustomContext);
|
|
14
|
+
const section = form.sections[idSection];
|
|
15
|
+
if (!section) return <></>;
|
|
16
|
+
return (
|
|
17
|
+
<div
|
|
18
|
+
className={styles.container}
|
|
19
|
+
style={{
|
|
20
|
+
width:
|
|
21
|
+
(form.size.blockSize + form.size.spacingSize) *
|
|
22
|
+
form.size.blockNum,
|
|
23
|
+
justifyContent:
|
|
24
|
+
sendLabel !== undefined &&
|
|
25
|
+
currentBreakPoint < form.size.blockNum
|
|
26
|
+
? 'center'
|
|
27
|
+
: 'normal',
|
|
28
|
+
}}
|
|
29
|
+
>
|
|
30
|
+
{section.steps?.map((idStep: string) => {
|
|
31
|
+
const step = form.steps[idStep];
|
|
32
|
+
return (
|
|
33
|
+
<StepComponent
|
|
34
|
+
editable={editable}
|
|
35
|
+
step={step}
|
|
36
|
+
key={idStep}
|
|
37
|
+
/>
|
|
38
|
+
);
|
|
39
|
+
})}
|
|
40
|
+
</div>
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export default MaterialSection;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { FormStyleTypes } from '../../constants/FormStepTypes';
|
|
2
|
+
import MaterialSection from './MaterialSection/MaterialSection';
|
|
3
|
+
import SectionContext from '../../Contexts/SectionContext';
|
|
4
|
+
import { useAppSelector } from '../../hooks';
|
|
5
|
+
|
|
6
|
+
export interface SectionComponentProps {
|
|
7
|
+
idSection: string;
|
|
8
|
+
}
|
|
9
|
+
function SectionComponent(props: SectionComponentProps): JSX.Element {
|
|
10
|
+
const formStyle = useAppSelector((state) => state.global.formStyle);
|
|
11
|
+
const renderSectionType = (): JSX.Element => {
|
|
12
|
+
switch (formStyle.type) {
|
|
13
|
+
case FormStyleTypes.MATERIAL:
|
|
14
|
+
default: {
|
|
15
|
+
return <MaterialSection {...props} />;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
return (
|
|
20
|
+
<SectionContext.Provider value={props.idSection}>
|
|
21
|
+
{renderSectionType()}
|
|
22
|
+
</SectionContext.Provider>
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
export default SectionComponent;
|