@redneckz/wildless-cms-uni-blocks 0.14.708 → 0.14.710
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/bundle/api/RetailAPI/utils/getOrganizationParams.d.ts +1 -1
- package/bundle/bundle.umd.js +345 -364
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/ApplicationLeadForm/useSaveUserData.d.ts +1 -1
- package/bundle/components/CreditCardForm/CreditCardFormStep.d.ts +2 -2
- package/bundle/components/CreditCardForm/getInitialFormState.d.ts +1 -1
- package/bundle/components/CreditCardForm/useCreditCardFormAPI.d.ts +4 -17
- package/bundle/components/CreditForm/CreditFormStep.d.ts +3 -3
- package/bundle/components/CreditForm/getInitialFormState.d.ts +1 -1
- package/bundle/components/CreditForm/useCreditFormAPI.d.ts +4 -17
- package/bundle/hooks/useRetailFormStore.d.ts +33 -0
- package/bundle/ui-kit/FormField/updateOrganizationFields.d.ts +2 -2
- package/dist/api/RetailAPI/utils/getOrganizationParams.d.ts +1 -1
- package/dist/api/RetailAPI/utils/getOrganizationParams.js +7 -2
- package/dist/api/RetailAPI/utils/getOrganizationParams.js.map +1 -1
- package/dist/components/ApplicationLeadForm/useSaveUserData.d.ts +1 -1
- package/dist/components/ApplicationLeadForm/useSaveUserData.js +2 -4
- package/dist/components/ApplicationLeadForm/useSaveUserData.js.map +1 -1
- package/dist/components/CreditCardForm/CreditCardForm.js +3 -2
- package/dist/components/CreditCardForm/CreditCardForm.js.map +1 -1
- package/dist/components/CreditCardForm/CreditCardFormStatusTracker.js +2 -2
- package/dist/components/CreditCardForm/CreditCardFormStatusTracker.js.map +1 -1
- package/dist/components/CreditCardForm/CreditCardFormStep.d.ts +2 -2
- package/dist/components/CreditCardForm/CreditCardFormStep.js +7 -13
- package/dist/components/CreditCardForm/CreditCardFormStep.js.map +1 -1
- package/dist/components/CreditCardForm/PendingStatusContent.js +2 -2
- package/dist/components/CreditCardForm/PendingStatusContent.js.map +1 -1
- package/dist/components/CreditCardForm/ReworkStatusContent.js +2 -2
- package/dist/components/CreditCardForm/ReworkStatusContent.js.map +1 -1
- package/dist/components/CreditCardForm/SuccessStatusContent.js +2 -2
- package/dist/components/CreditCardForm/SuccessStatusContent.js.map +1 -1
- package/dist/components/CreditCardForm/formStateMap.js +1 -4
- package/dist/components/CreditCardForm/formStateMap.js.map +1 -1
- package/dist/components/CreditCardForm/getInitialFormState.d.ts +1 -1
- package/dist/components/CreditCardForm/getInitialFormState.js +8 -11
- package/dist/components/CreditCardForm/getInitialFormState.js.map +1 -1
- package/dist/components/CreditCardForm/useCreditCardFormAPI.d.ts +4 -17
- package/dist/components/CreditCardForm/useCreditCardFormAPI.js +32 -34
- package/dist/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -1
- package/dist/components/CreditForm/CreditForm.js +3 -2
- package/dist/components/CreditForm/CreditForm.js.map +1 -1
- package/dist/components/CreditForm/CreditFormStatusTracker.js +2 -2
- package/dist/components/CreditForm/CreditFormStatusTracker.js.map +1 -1
- package/dist/components/CreditForm/CreditFormStep.d.ts +3 -3
- package/dist/components/CreditForm/CreditFormStep.js +9 -14
- package/dist/components/CreditForm/CreditFormStep.js.map +1 -1
- package/dist/components/CreditForm/PendingStatusContent.js +2 -2
- package/dist/components/CreditForm/PendingStatusContent.js.map +1 -1
- package/dist/components/CreditForm/ReworkStatusContent.js +2 -2
- package/dist/components/CreditForm/ReworkStatusContent.js.map +1 -1
- package/dist/components/CreditForm/SuccessStatusContent.js +2 -2
- package/dist/components/CreditForm/SuccessStatusContent.js.map +1 -1
- package/dist/components/CreditForm/getInitialFormState.d.ts +1 -1
- package/dist/components/CreditForm/getInitialFormState.js +8 -11
- package/dist/components/CreditForm/getInitialFormState.js.map +1 -1
- package/dist/components/CreditForm/useCreditFormAPI.d.ts +4 -17
- package/dist/components/CreditForm/useCreditFormAPI.js +32 -39
- package/dist/components/CreditForm/useCreditFormAPI.js.map +1 -1
- package/dist/hooks/useRetailFormStore.d.ts +33 -0
- package/{mobile/dist/hooks/useCreditFormStore.js → dist/hooks/useRetailFormStore.js} +4 -4
- package/dist/hooks/useRetailFormStore.js.map +1 -0
- package/dist/ui-kit/DraftDialog/DraftDialog.js +7 -9
- package/dist/ui-kit/DraftDialog/DraftDialog.js.map +1 -1
- package/dist/ui-kit/EsiaLoginDialog/EsiaLoginDialog.js +6 -6
- package/dist/ui-kit/EsiaLoginDialog/EsiaLoginDialog.js.map +1 -1
- package/dist/ui-kit/FormField/Fields/AmountWorkersField.js +2 -2
- package/dist/ui-kit/FormField/Fields/AmountWorkersField.js.map +1 -1
- package/dist/ui-kit/FormField/Fields/EmployerActivitiesField.js +2 -2
- package/dist/ui-kit/FormField/Fields/EmployerActivitiesField.js.map +1 -1
- package/dist/ui-kit/FormField/Fields/EmployerOrganizationField.js +2 -2
- package/dist/ui-kit/FormField/Fields/EmployerOrganizationField.js.map +1 -1
- package/dist/ui-kit/FormField/Fields/InnField.js +2 -2
- package/dist/ui-kit/FormField/Fields/OrganizationField.js +2 -2
- package/dist/ui-kit/FormField/Fields/OrganizationField.js.map +1 -1
- package/dist/ui-kit/FormField/Fields/OrganizationNameField.js +2 -2
- package/dist/ui-kit/FormField/updateOrganizationFields.d.ts +2 -2
- package/dist/ui-kit/FormField/updateOrganizationFields.js +15 -7
- package/dist/ui-kit/FormField/updateOrganizationFields.js.map +1 -1
- package/lib/api/RetailAPI/utils/getOrganizationParams.d.ts +1 -1
- package/lib/api/RetailAPI/utils/getOrganizationParams.js +7 -2
- package/lib/api/RetailAPI/utils/getOrganizationParams.js.map +1 -1
- package/lib/components/ApplicationLeadForm/useSaveUserData.d.ts +1 -1
- package/lib/components/ApplicationLeadForm/useSaveUserData.js +2 -4
- package/lib/components/ApplicationLeadForm/useSaveUserData.js.map +1 -1
- package/lib/components/CreditCardForm/CreditCardForm.js +3 -2
- package/lib/components/CreditCardForm/CreditCardForm.js.map +1 -1
- package/lib/components/CreditCardForm/CreditCardFormStatusTracker.js +2 -2
- package/lib/components/CreditCardForm/CreditCardFormStatusTracker.js.map +1 -1
- package/lib/components/CreditCardForm/CreditCardFormStep.d.ts +2 -2
- package/lib/components/CreditCardForm/CreditCardFormStep.js +7 -13
- package/lib/components/CreditCardForm/CreditCardFormStep.js.map +1 -1
- package/lib/components/CreditCardForm/PendingStatusContent.js +2 -2
- package/lib/components/CreditCardForm/PendingStatusContent.js.map +1 -1
- package/lib/components/CreditCardForm/ReworkStatusContent.js +2 -2
- package/lib/components/CreditCardForm/ReworkStatusContent.js.map +1 -1
- package/lib/components/CreditCardForm/SuccessStatusContent.js +2 -2
- package/lib/components/CreditCardForm/SuccessStatusContent.js.map +1 -1
- package/lib/components/CreditCardForm/formStateMap.js +1 -4
- package/lib/components/CreditCardForm/formStateMap.js.map +1 -1
- package/lib/components/CreditCardForm/getInitialFormState.d.ts +1 -1
- package/lib/components/CreditCardForm/getInitialFormState.js +8 -11
- package/lib/components/CreditCardForm/getInitialFormState.js.map +1 -1
- package/lib/components/CreditCardForm/useCreditCardFormAPI.d.ts +4 -17
- package/lib/components/CreditCardForm/useCreditCardFormAPI.js +33 -35
- package/lib/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -1
- package/lib/components/CreditForm/CreditForm.js +3 -2
- package/lib/components/CreditForm/CreditForm.js.map +1 -1
- package/lib/components/CreditForm/CreditFormStatusTracker.js +2 -2
- package/lib/components/CreditForm/CreditFormStatusTracker.js.map +1 -1
- package/lib/components/CreditForm/CreditFormStep.d.ts +3 -3
- package/lib/components/CreditForm/CreditFormStep.js +9 -14
- package/lib/components/CreditForm/CreditFormStep.js.map +1 -1
- package/lib/components/CreditForm/PendingStatusContent.js +2 -2
- package/lib/components/CreditForm/PendingStatusContent.js.map +1 -1
- package/lib/components/CreditForm/ReworkStatusContent.js +2 -2
- package/lib/components/CreditForm/ReworkStatusContent.js.map +1 -1
- package/lib/components/CreditForm/SuccessStatusContent.js +2 -2
- package/lib/components/CreditForm/SuccessStatusContent.js.map +1 -1
- package/lib/components/CreditForm/getInitialFormState.d.ts +1 -1
- package/lib/components/CreditForm/getInitialFormState.js +8 -11
- package/lib/components/CreditForm/getInitialFormState.js.map +1 -1
- package/lib/components/CreditForm/useCreditFormAPI.d.ts +4 -17
- package/lib/components/CreditForm/useCreditFormAPI.js +33 -40
- package/lib/components/CreditForm/useCreditFormAPI.js.map +1 -1
- package/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.d.ts +1 -1
- package/lib/hooks/useRetailFormStore.d.ts +33 -0
- package/lib/hooks/{useCreditFormStore.js → useRetailFormStore.js} +2 -2
- package/lib/hooks/useRetailFormStore.js.map +1 -0
- package/lib/ui-kit/DraftDialog/DraftDialog.js +7 -9
- package/lib/ui-kit/DraftDialog/DraftDialog.js.map +1 -1
- package/lib/ui-kit/EsiaLoginDialog/EsiaLoginDialog.js +6 -6
- package/lib/ui-kit/EsiaLoginDialog/EsiaLoginDialog.js.map +1 -1
- package/lib/ui-kit/FormField/Fields/AmountWorkersField.js +2 -2
- package/lib/ui-kit/FormField/Fields/AmountWorkersField.js.map +1 -1
- package/lib/ui-kit/FormField/Fields/EmployerActivitiesField.js +2 -2
- package/lib/ui-kit/FormField/Fields/EmployerActivitiesField.js.map +1 -1
- package/lib/ui-kit/FormField/Fields/EmployerOrganizationField.js +2 -2
- package/lib/ui-kit/FormField/Fields/EmployerOrganizationField.js.map +1 -1
- package/lib/ui-kit/FormField/Fields/InnField.js +2 -2
- package/lib/ui-kit/FormField/Fields/OrganizationField.js +2 -2
- package/lib/ui-kit/FormField/Fields/OrganizationField.js.map +1 -1
- package/lib/ui-kit/FormField/Fields/OrganizationNameField.js +2 -2
- package/lib/ui-kit/FormField/updateOrganizationFields.d.ts +2 -2
- package/lib/ui-kit/FormField/updateOrganizationFields.js +15 -7
- package/lib/ui-kit/FormField/updateOrganizationFields.js.map +1 -1
- package/mobile/bundle/api/RetailAPI/utils/getOrganizationParams.d.ts +1 -1
- package/mobile/bundle/bundle.umd.js +345 -364
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/ApplicationLeadForm/useSaveUserData.d.ts +1 -1
- package/mobile/bundle/components/CreditCardForm/CreditCardFormStep.d.ts +2 -2
- package/mobile/bundle/components/CreditCardForm/getInitialFormState.d.ts +1 -1
- package/mobile/bundle/components/CreditCardForm/useCreditCardFormAPI.d.ts +4 -17
- package/mobile/bundle/components/CreditForm/CreditFormStep.d.ts +3 -3
- package/mobile/bundle/components/CreditForm/getInitialFormState.d.ts +1 -1
- package/mobile/bundle/components/CreditForm/useCreditFormAPI.d.ts +4 -17
- package/mobile/bundle/hooks/useRetailFormStore.d.ts +33 -0
- package/mobile/bundle/ui-kit/FormField/updateOrganizationFields.d.ts +2 -2
- package/mobile/dist/api/RetailAPI/utils/getOrganizationParams.d.ts +1 -1
- package/mobile/dist/api/RetailAPI/utils/getOrganizationParams.js +7 -2
- package/mobile/dist/api/RetailAPI/utils/getOrganizationParams.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/useSaveUserData.d.ts +1 -1
- package/mobile/dist/components/ApplicationLeadForm/useSaveUserData.js +2 -4
- package/mobile/dist/components/ApplicationLeadForm/useSaveUserData.js.map +1 -1
- package/mobile/dist/components/CreditCardForm/CreditCardForm.js +3 -2
- package/mobile/dist/components/CreditCardForm/CreditCardForm.js.map +1 -1
- package/mobile/dist/components/CreditCardForm/CreditCardFormStatusTracker.js +2 -2
- package/mobile/dist/components/CreditCardForm/CreditCardFormStatusTracker.js.map +1 -1
- package/mobile/dist/components/CreditCardForm/CreditCardFormStep.d.ts +2 -2
- package/mobile/dist/components/CreditCardForm/CreditCardFormStep.js +7 -13
- package/mobile/dist/components/CreditCardForm/CreditCardFormStep.js.map +1 -1
- package/mobile/dist/components/CreditCardForm/PendingStatusContent.js +2 -2
- package/mobile/dist/components/CreditCardForm/PendingStatusContent.js.map +1 -1
- package/mobile/dist/components/CreditCardForm/ReworkStatusContent.js +2 -2
- package/mobile/dist/components/CreditCardForm/ReworkStatusContent.js.map +1 -1
- package/mobile/dist/components/CreditCardForm/SuccessStatusContent.js +2 -2
- package/mobile/dist/components/CreditCardForm/SuccessStatusContent.js.map +1 -1
- package/mobile/dist/components/CreditCardForm/formStateMap.js +1 -4
- package/mobile/dist/components/CreditCardForm/formStateMap.js.map +1 -1
- package/mobile/dist/components/CreditCardForm/getInitialFormState.d.ts +1 -1
- package/mobile/dist/components/CreditCardForm/getInitialFormState.js +8 -11
- package/mobile/dist/components/CreditCardForm/getInitialFormState.js.map +1 -1
- package/mobile/dist/components/CreditCardForm/useCreditCardFormAPI.d.ts +4 -17
- package/mobile/dist/components/CreditCardForm/useCreditCardFormAPI.js +32 -34
- package/mobile/dist/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -1
- package/mobile/dist/components/CreditForm/CreditForm.js +3 -2
- package/mobile/dist/components/CreditForm/CreditForm.js.map +1 -1
- package/mobile/dist/components/CreditForm/CreditFormStatusTracker.js +2 -2
- package/mobile/dist/components/CreditForm/CreditFormStatusTracker.js.map +1 -1
- package/mobile/dist/components/CreditForm/CreditFormStep.d.ts +3 -3
- package/mobile/dist/components/CreditForm/CreditFormStep.js +9 -14
- package/mobile/dist/components/CreditForm/CreditFormStep.js.map +1 -1
- package/mobile/dist/components/CreditForm/PendingStatusContent.js +2 -2
- package/mobile/dist/components/CreditForm/PendingStatusContent.js.map +1 -1
- package/mobile/dist/components/CreditForm/ReworkStatusContent.js +2 -2
- package/mobile/dist/components/CreditForm/ReworkStatusContent.js.map +1 -1
- package/mobile/dist/components/CreditForm/SuccessStatusContent.js +2 -2
- package/mobile/dist/components/CreditForm/SuccessStatusContent.js.map +1 -1
- package/mobile/dist/components/CreditForm/getInitialFormState.d.ts +1 -1
- package/mobile/dist/components/CreditForm/getInitialFormState.js +8 -11
- package/mobile/dist/components/CreditForm/getInitialFormState.js.map +1 -1
- package/mobile/dist/components/CreditForm/useCreditFormAPI.d.ts +4 -17
- package/mobile/dist/components/CreditForm/useCreditFormAPI.js +32 -39
- package/mobile/dist/components/CreditForm/useCreditFormAPI.js.map +1 -1
- package/mobile/dist/hooks/useRetailFormStore.d.ts +33 -0
- package/{dist/hooks/useCreditFormStore.js → mobile/dist/hooks/useRetailFormStore.js} +4 -4
- package/mobile/dist/hooks/useRetailFormStore.js.map +1 -0
- package/mobile/dist/ui-kit/DraftDialog/DraftDialog.js +7 -9
- package/mobile/dist/ui-kit/DraftDialog/DraftDialog.js.map +1 -1
- package/mobile/dist/ui-kit/EsiaLoginDialog/EsiaLoginDialog.js +6 -6
- package/mobile/dist/ui-kit/EsiaLoginDialog/EsiaLoginDialog.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/AmountWorkersField.js +2 -2
- package/mobile/dist/ui-kit/FormField/Fields/AmountWorkersField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/EmployerActivitiesField.js +2 -2
- package/mobile/dist/ui-kit/FormField/Fields/EmployerActivitiesField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/EmployerOrganizationField.js +2 -2
- package/mobile/dist/ui-kit/FormField/Fields/EmployerOrganizationField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/InnField.js +2 -2
- package/mobile/dist/ui-kit/FormField/Fields/OrganizationField.js +2 -2
- package/mobile/dist/ui-kit/FormField/Fields/OrganizationField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/OrganizationNameField.js +2 -2
- package/mobile/dist/ui-kit/FormField/updateOrganizationFields.d.ts +2 -2
- package/mobile/dist/ui-kit/FormField/updateOrganizationFields.js +15 -7
- package/mobile/dist/ui-kit/FormField/updateOrganizationFields.js.map +1 -1
- package/mobile/lib/api/RetailAPI/utils/getOrganizationParams.d.ts +1 -1
- package/mobile/lib/api/RetailAPI/utils/getOrganizationParams.js +7 -2
- package/mobile/lib/api/RetailAPI/utils/getOrganizationParams.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/useSaveUserData.d.ts +1 -1
- package/mobile/lib/components/ApplicationLeadForm/useSaveUserData.js +2 -4
- package/mobile/lib/components/ApplicationLeadForm/useSaveUserData.js.map +1 -1
- package/mobile/lib/components/CreditCardForm/CreditCardForm.js +3 -2
- package/mobile/lib/components/CreditCardForm/CreditCardForm.js.map +1 -1
- package/mobile/lib/components/CreditCardForm/CreditCardFormStatusTracker.js +2 -2
- package/mobile/lib/components/CreditCardForm/CreditCardFormStatusTracker.js.map +1 -1
- package/mobile/lib/components/CreditCardForm/CreditCardFormStep.d.ts +2 -2
- package/mobile/lib/components/CreditCardForm/CreditCardFormStep.js +7 -13
- package/mobile/lib/components/CreditCardForm/CreditCardFormStep.js.map +1 -1
- package/mobile/lib/components/CreditCardForm/PendingStatusContent.js +2 -2
- package/mobile/lib/components/CreditCardForm/PendingStatusContent.js.map +1 -1
- package/mobile/lib/components/CreditCardForm/ReworkStatusContent.js +2 -2
- package/mobile/lib/components/CreditCardForm/ReworkStatusContent.js.map +1 -1
- package/mobile/lib/components/CreditCardForm/SuccessStatusContent.js +2 -2
- package/mobile/lib/components/CreditCardForm/SuccessStatusContent.js.map +1 -1
- package/mobile/lib/components/CreditCardForm/formStateMap.js +1 -4
- package/mobile/lib/components/CreditCardForm/formStateMap.js.map +1 -1
- package/mobile/lib/components/CreditCardForm/getInitialFormState.d.ts +1 -1
- package/mobile/lib/components/CreditCardForm/getInitialFormState.js +8 -11
- package/mobile/lib/components/CreditCardForm/getInitialFormState.js.map +1 -1
- package/mobile/lib/components/CreditCardForm/useCreditCardFormAPI.d.ts +4 -17
- package/mobile/lib/components/CreditCardForm/useCreditCardFormAPI.js +33 -35
- package/mobile/lib/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -1
- package/mobile/lib/components/CreditForm/CreditForm.js +3 -2
- package/mobile/lib/components/CreditForm/CreditForm.js.map +1 -1
- package/mobile/lib/components/CreditForm/CreditFormStatusTracker.js +2 -2
- package/mobile/lib/components/CreditForm/CreditFormStatusTracker.js.map +1 -1
- package/mobile/lib/components/CreditForm/CreditFormStep.d.ts +3 -3
- package/mobile/lib/components/CreditForm/CreditFormStep.js +9 -14
- package/mobile/lib/components/CreditForm/CreditFormStep.js.map +1 -1
- package/mobile/lib/components/CreditForm/PendingStatusContent.js +2 -2
- package/mobile/lib/components/CreditForm/PendingStatusContent.js.map +1 -1
- package/mobile/lib/components/CreditForm/ReworkStatusContent.js +2 -2
- package/mobile/lib/components/CreditForm/ReworkStatusContent.js.map +1 -1
- package/mobile/lib/components/CreditForm/SuccessStatusContent.js +2 -2
- package/mobile/lib/components/CreditForm/SuccessStatusContent.js.map +1 -1
- package/mobile/lib/components/CreditForm/getInitialFormState.d.ts +1 -1
- package/mobile/lib/components/CreditForm/getInitialFormState.js +8 -11
- package/mobile/lib/components/CreditForm/getInitialFormState.js.map +1 -1
- package/mobile/lib/components/CreditForm/useCreditFormAPI.d.ts +4 -17
- package/mobile/lib/components/CreditForm/useCreditFormAPI.js +33 -40
- package/mobile/lib/components/CreditForm/useCreditFormAPI.js.map +1 -1
- package/mobile/lib/hooks/useRetailFormStore.d.ts +33 -0
- package/mobile/lib/hooks/{useCreditFormStore.js → useRetailFormStore.js} +2 -2
- package/mobile/lib/hooks/useRetailFormStore.js.map +1 -0
- package/mobile/lib/ui-kit/DraftDialog/DraftDialog.js +7 -9
- package/mobile/lib/ui-kit/DraftDialog/DraftDialog.js.map +1 -1
- package/mobile/lib/ui-kit/EsiaLoginDialog/EsiaLoginDialog.js +6 -6
- package/mobile/lib/ui-kit/EsiaLoginDialog/EsiaLoginDialog.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/AmountWorkersField.js +2 -2
- package/mobile/lib/ui-kit/FormField/Fields/AmountWorkersField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/EmployerActivitiesField.js +2 -2
- package/mobile/lib/ui-kit/FormField/Fields/EmployerActivitiesField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/EmployerOrganizationField.js +2 -2
- package/mobile/lib/ui-kit/FormField/Fields/EmployerOrganizationField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/InnField.js +2 -2
- package/mobile/lib/ui-kit/FormField/Fields/OrganizationField.js +2 -2
- package/mobile/lib/ui-kit/FormField/Fields/OrganizationField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/OrganizationNameField.js +2 -2
- package/mobile/lib/ui-kit/FormField/updateOrganizationFields.d.ts +2 -2
- package/mobile/lib/ui-kit/FormField/updateOrganizationFields.js +15 -7
- package/mobile/lib/ui-kit/FormField/updateOrganizationFields.js.map +1 -1
- package/mobile/src/api/RetailAPI/utils/getOrganizationParams.ts +9 -3
- package/mobile/src/components/ApplicationLeadForm/useSaveUserData.ts +2 -4
- package/mobile/src/components/CreditCardForm/CreditCardForm.tsx +4 -3
- package/mobile/src/components/CreditCardForm/CreditCardFormStatusTracker.tsx +2 -2
- package/mobile/src/components/CreditCardForm/CreditCardFormStep.tsx +12 -16
- package/mobile/src/components/CreditCardForm/PendingStatusContent.tsx +2 -3
- package/mobile/src/components/CreditCardForm/ReworkStatusContent.tsx +2 -3
- package/mobile/src/components/CreditCardForm/SuccessStatusContent.tsx +2 -3
- package/mobile/src/components/CreditCardForm/formStateMap.tsx +1 -4
- package/mobile/src/components/CreditCardForm/getInitialFormState.tsx +8 -12
- package/mobile/src/components/CreditCardForm/useCreditCardFormAPI.tsx +65 -84
- package/mobile/src/components/CreditForm/CreditForm.tsx +5 -4
- package/mobile/src/components/CreditForm/CreditFormStatusTracker.tsx +2 -2
- package/mobile/src/components/CreditForm/CreditFormStep.tsx +15 -19
- package/mobile/src/components/CreditForm/PendingStatusContent.tsx +2 -3
- package/mobile/src/components/CreditForm/ReworkStatusContent.tsx +2 -3
- package/mobile/src/components/CreditForm/SuccessStatusContent.tsx +2 -3
- package/mobile/src/components/CreditForm/getInitialFormState.tsx +8 -12
- package/mobile/src/components/CreditForm/useCreditFormAPI.tsx +65 -88
- package/mobile/src/hooks/useRetailFormStore.tsx +29 -0
- package/mobile/src/ui-kit/DraftDialog/DraftDialog.tsx +7 -9
- package/mobile/src/ui-kit/EsiaLoginDialog/EsiaLoginDialog.tsx +7 -7
- package/mobile/src/ui-kit/FormField/Fields/AmountWorkersField.tsx +2 -2
- package/mobile/src/ui-kit/FormField/Fields/EmployerActivitiesField.tsx +2 -2
- package/mobile/src/ui-kit/FormField/Fields/EmployerOrganizationField.tsx +2 -2
- package/mobile/src/ui-kit/FormField/Fields/InnField.tsx +2 -2
- package/mobile/src/ui-kit/FormField/Fields/OrganizationField.tsx +2 -2
- package/mobile/src/ui-kit/FormField/Fields/OrganizationNameField.tsx +2 -2
- package/mobile/src/ui-kit/FormField/updateOrganizationFields.ts +18 -17
- package/package.json +1 -1
- package/src/api/RetailAPI/utils/getOrganizationParams.ts +9 -3
- package/src/components/ApplicationLeadForm/useSaveUserData.ts +2 -4
- package/src/components/CreditCardForm/CreditCardForm.tsx +4 -3
- package/src/components/CreditCardForm/CreditCardFormStatusTracker.tsx +2 -2
- package/src/components/CreditCardForm/CreditCardFormStep.tsx +12 -16
- package/src/components/CreditCardForm/PendingStatusContent.tsx +2 -3
- package/src/components/CreditCardForm/ReworkStatusContent.tsx +2 -3
- package/src/components/CreditCardForm/SuccessStatusContent.tsx +2 -3
- package/src/components/CreditCardForm/formStateMap.tsx +1 -4
- package/src/components/CreditCardForm/getInitialFormState.tsx +8 -12
- package/src/components/CreditCardForm/useCreditCardFormAPI.tsx +65 -84
- package/src/components/CreditForm/CreditForm.tsx +5 -4
- package/src/components/CreditForm/CreditFormStatusTracker.tsx +2 -2
- package/src/components/CreditForm/CreditFormStep.tsx +15 -19
- package/src/components/CreditForm/PendingStatusContent.tsx +2 -3
- package/src/components/CreditForm/ReworkStatusContent.tsx +2 -3
- package/src/components/CreditForm/SuccessStatusContent.tsx +2 -3
- package/src/components/CreditForm/getInitialFormState.tsx +8 -12
- package/src/components/CreditForm/useCreditFormAPI.tsx +65 -88
- package/src/hooks/useRetailFormStore.tsx +29 -0
- package/src/icons/IconName.ts +4 -4
- package/src/ui-kit/DraftDialog/DraftDialog.tsx +7 -9
- package/src/ui-kit/EsiaLoginDialog/EsiaLoginDialog.tsx +7 -7
- package/src/ui-kit/FormField/Fields/AmountWorkersField.tsx +2 -2
- package/src/ui-kit/FormField/Fields/EmployerActivitiesField.tsx +2 -2
- package/src/ui-kit/FormField/Fields/EmployerOrganizationField.tsx +2 -2
- package/src/ui-kit/FormField/Fields/InnField.tsx +2 -2
- package/src/ui-kit/FormField/Fields/OrganizationField.tsx +2 -2
- package/src/ui-kit/FormField/Fields/OrganizationNameField.tsx +2 -2
- package/src/ui-kit/FormField/updateOrganizationFields.ts +18 -17
- package/bundle/hooks/useCreditFormStore.d.ts +0 -13
- package/dist/hooks/useCreditFormStore.d.ts +0 -13
- package/dist/hooks/useCreditFormStore.js.map +0 -1
- package/lib/hooks/useCreditFormStore.d.ts +0 -13
- package/lib/hooks/useCreditFormStore.js.map +0 -1
- package/mobile/bundle/hooks/useCreditFormStore.d.ts +0 -13
- package/mobile/dist/hooks/useCreditFormStore.d.ts +0 -13
- package/mobile/dist/hooks/useCreditFormStore.js.map +0 -1
- package/mobile/lib/hooks/useCreditFormStore.d.ts +0 -13
- package/mobile/lib/hooks/useCreditFormStore.js.map +0 -1
- package/mobile/src/hooks/useCreditFormStore.tsx +0 -13
- package/src/hooks/useCreditFormStore.tsx +0 -13
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DraftDialog.js","sourceRoot":"","sources":["../../../src/ui-kit/DraftDialog/DraftDialog.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,uDAA0D;AAE1D,
|
|
1
|
+
{"version":3,"file":"DraftDialog.js","sourceRoot":"","sources":["../../../src/ui-kit/DraftDialog/DraftDialog.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,uDAA0D;AAE1D,wEAAqE;AACrE,uEAAoE;AACpE,2CAAwC;AACxC,6CAA0C;AAC1C,oDAAiD;AACjD,gDAA6C;AAC7C,2DAAwD;AACxD,qDAAk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AC,CAAC,CAAC,4BAA4B,CAAC,CAAC;IACzF,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,MAAM,kBAAkB,GAAG,IAAA,mBAAW,EAAC,GAAG,EAAE;QAC1C,SAAS,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IACxB,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,MAAM,MAAM,GAAG,IAAI,IAAI,OAAO,CAAC,CAAC,CAAC,GAAG,IAAI,IAAI,OAAO,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;IAE7D,OAAO,CACL,uBAAC,eAAM,IACL,SAAS,EAAC,kEAAkE,EAC5E,OAAO,EAAE,OAAO,YAEhB,iCAAK,SAAS,EAAC,sBAAsB,aACnC,uBAAC,iBAAO,IACN,SAAS,EAAC,qBAAqB,EAC/B,KAAK,EAAE,GAAG,MAAM,yDAAyD,EACzE,WAAW,EAAC,IAAI,GAChB,EACF,uBAAC,qCAAiB,IAChB,KAAK,EAAC,0GAAqB,EAC3B,IAAI,EAAC,UAAU,EACf,WAAW,EAAC,oOAA2C,EACvD,OAAO,EAAE,eAAe,GACxB,EACF,uBAAC,qCAAiB,IAChB,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,sCAAsC,CAAC,CAAC,CAAC,wBAAwB,EACrF,IAAI,EAAC,SAAS,EACd,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,iBAAiB,GACjD,EACF,uBAAC,eAAM,IACL,IAAI,EAAC,QAAQ,EACb,OAAO,EAAC,WAAW,EACnB,SAAS,EAAC,gBAAgB,EAC1B,OAAO,EAAE,kBAAkB,+HAGpB,IACL,GACC,CACV,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -5,13 +5,13 @@ const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
|
5
5
|
const hooks_1 = require("@redneckz/uni-jsx/lib/hooks");
|
|
6
6
|
const getLink_1 = require("../../api/RetailAPI/getLink");
|
|
7
7
|
const locationNavigator_1 = require("../../external/locationNavigator");
|
|
8
|
-
const
|
|
8
|
+
const useRetailFormStore_1 = require("../../hooks/useRetailFormStore");
|
|
9
9
|
const Button_1 = require("../Button/Button");
|
|
10
10
|
const Dialog_1 = require("../DialogManager/Dialog");
|
|
11
11
|
const Img_1 = require("../Img/Img");
|
|
12
12
|
exports.EsiaLoginDialog = (0, uni_jsx_1.JSX)(({ onClose }) => {
|
|
13
13
|
const navigator = (0, locationNavigator_1.locationNavigator)();
|
|
14
|
-
const
|
|
14
|
+
const retailFormStore = (0, useRetailFormStore_1.useRetailFormStore)();
|
|
15
15
|
const handleAuth = (0, hooks_1.useCallback)(async () => {
|
|
16
16
|
const resp = await (0, getLink_1.getLink)({
|
|
17
17
|
redirectUri: navigator.href,
|
|
@@ -21,10 +21,10 @@ exports.EsiaLoginDialog = (0, uni_jsx_1.JSX)(({ onClose }) => {
|
|
|
21
21
|
}
|
|
22
22
|
}, []);
|
|
23
23
|
const handleClose = (0, hooks_1.useCallback)(() => {
|
|
24
|
-
if (leadForm
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
if (retailFormStore.leadForm) {
|
|
25
|
+
const leadForm = { ...retailFormStore.leadForm };
|
|
26
|
+
delete leadForm.esiaAccountTypeCd;
|
|
27
|
+
retailFormStore.leadForm = leadForm;
|
|
28
28
|
}
|
|
29
29
|
onClose?.();
|
|
30
30
|
}, []);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EsiaLoginDialog.js","sourceRoot":"","sources":["../../../src/ui-kit/EsiaLoginDialog/EsiaLoginDialog.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,uDAA0D;AAC1D,yDAAsD;
|
|
1
|
+
{"version":3,"file":"EsiaLoginDialog.js","sourceRoot":"","sources":["../../../src/ui-kit/EsiaLoginDialog/EsiaLoginDialog.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,uDAA0D;AAC1D,yDAAsD;AACt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,EACN,iCAAK,SAAS,EAAC,8BAA8B,aAC3C,uBAAC,eAAM,IAAC,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAE,UAAU,6JAEhC,EACT,uBAAC,eAAM,IAAC,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAC,WAAW,EAAC,OAAO,EAAE,WAAW,6EAErD,IACL,IACF,GACC,CACV,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -3,12 +3,12 @@ exports.AmountWorkersField = void 0;
|
|
|
3
3
|
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
4
|
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
5
|
const hooks_1 = require("@redneckz/uni-jsx/lib/hooks");
|
|
6
|
-
const useCreditFormStore_1 = require("../../../hooks/useCreditFormStore");
|
|
7
6
|
const useLeadFormData_1 = require("../../../hooks/useLeadFormData");
|
|
7
|
+
const useRetailFormStore_1 = require("../../../hooks/useRetailFormStore");
|
|
8
8
|
const SelectField_1 = require("../SelectField");
|
|
9
9
|
exports.AmountWorkersField = (0, uni_jsx_1.JSX)(({ field, input }) => {
|
|
10
10
|
const { data } = (0, useLeadFormData_1.useLeadFormData)('EMPLOYEES_NUMBER');
|
|
11
|
-
const store = (0,
|
|
11
|
+
const store = (0, useRetailFormStore_1.useRetailFormStore)();
|
|
12
12
|
(0, hooks_1.useEffect)(() => {
|
|
13
13
|
if (data) {
|
|
14
14
|
store.amountWorkers = data;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AmountWorkersField.js","sourceRoot":"","sources":["../../../../src/ui-kit/FormField/Fields/AmountWorkersField.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,uDAAwD;AACxD,
|
|
1
|
+
{"version":3,"file":"AmountWorkersField.js","sourceRoot":"","sources":["../../../../src/ui-kit/FormField/Fields/AmountWorkersField.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,uDAAwD;AACxD,oEAAiE;AACjE,0EAAuE;AAEvE,gDAA6C;AAEhC,QAAA,kBAAkB,GAAG,IAAA,aAAG,EAAmB,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE;IAC3E,MAAM,EAAE,IAAI,EAAE,GAAG,IAAA,iCAAe,EAAC,kBAAkB,CAAC,CAAC;IAErD,MAAM,KAAK,GAAG,IAAA,uCAAkB,GAAE,CAAC;IAEnC,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,IAAI,IAAI,EAAE;YACR,KAAK,CAAC,aAAa,GAAG,IAAI,CAAC;SAC5B;IACH,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;IAEX,OAAO,CACL,uBAAC,yBAAW,IACV,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,KAAK,CAAC,aAAa,IAAI,EAAE,EACjC,KAAK,EAAC,qMAAqC,EAC3C,SAAS,EAAC,eAAe,EACzB,KAAK,EAAE,KAAK,GACZ,CACH,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -3,12 +3,12 @@ exports.EmployerActivitiesField = void 0;
|
|
|
3
3
|
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
4
|
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
5
|
const hooks_1 = require("@redneckz/uni-jsx/lib/hooks");
|
|
6
|
-
const useCreditFormStore_1 = require("../../../hooks/useCreditFormStore");
|
|
7
6
|
const useLeadFormData_1 = require("../../../hooks/useLeadFormData");
|
|
7
|
+
const useRetailFormStore_1 = require("../../../hooks/useRetailFormStore");
|
|
8
8
|
const SelectField_1 = require("../SelectField");
|
|
9
9
|
exports.EmployerActivitiesField = (0, uni_jsx_1.JSX)(({ field, input }) => {
|
|
10
10
|
const { data } = (0, useLeadFormData_1.useLeadFormData)('ORGANIZATION_ACTIVITY_TYPE');
|
|
11
|
-
const store = (0,
|
|
11
|
+
const store = (0, useRetailFormStore_1.useRetailFormStore)();
|
|
12
12
|
(0, hooks_1.useEffect)(() => {
|
|
13
13
|
if (data) {
|
|
14
14
|
store.employerActivities = data;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmployerActivitiesField.js","sourceRoot":"","sources":["../../../../src/ui-kit/FormField/Fields/EmployerActivitiesField.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,uDAAwD;AACxD,
|
|
1
|
+
{"version":3,"file":"EmployerActivitiesField.js","sourceRoot":"","sources":["../../../../src/ui-kit/FormField/Fields/EmployerActivitiesField.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,uDAAwD;AACxD,oEAAiE;AACjE,0EAAuE;AAEvE,gDAA6C;AAEhC,QAAA,uBAAuB,GAAG,IAAA,aAAG,EAAmB,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE;IAChF,MAAM,EAAE,IAAI,EAAE,GAAG,IAAA,iCAAe,EAAC,4BAA4B,CAAC,CAAC;IAE/D,MAAM,KAAK,GAAG,IAAA,uCAAkB,GAAE,CAAC;IAEnC,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,IAAI,IAAI,EAAE;YACR,KAAK,CAAC,kBAAkB,GAAG,IAAI,CAAC;SACjC;IACH,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;IAEX,OAAO,CACL,uBAAC,yBAAW,IACV,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,KAAK,CAAC,kBAAkB,IAAI,EAAE,EACtC,KAAK,EAAC,yOAA2C,EACjD,SAAS,EAAC,oBAAoB,EAC9B,KAAK,EAAE,KAAK,GACZ,CACH,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -3,12 +3,12 @@ exports.EmployerOrganizationField = void 0;
|
|
|
3
3
|
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
4
|
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
5
|
const hooks_1 = require("@redneckz/uni-jsx/lib/hooks");
|
|
6
|
-
const useCreditFormStore_1 = require("../../../hooks/useCreditFormStore");
|
|
7
6
|
const useLeadFormData_1 = require("../../../hooks/useLeadFormData");
|
|
7
|
+
const useRetailFormStore_1 = require("../../../hooks/useRetailFormStore");
|
|
8
8
|
const SelectField_1 = require("../SelectField");
|
|
9
9
|
exports.EmployerOrganizationField = (0, uni_jsx_1.JSX)(({ field, input }) => {
|
|
10
10
|
const { data } = (0, useLeadFormData_1.useLeadFormData)('ORGANIZATION_KIND');
|
|
11
|
-
const store = (0,
|
|
11
|
+
const store = (0, useRetailFormStore_1.useRetailFormStore)();
|
|
12
12
|
(0, hooks_1.useEffect)(() => {
|
|
13
13
|
if (data) {
|
|
14
14
|
store.employerOrganization = data;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmployerOrganizationField.js","sourceRoot":"","sources":["../../../../src/ui-kit/FormField/Fields/EmployerOrganizationField.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,uDAAwD;AACxD,
|
|
1
|
+
{"version":3,"file":"EmployerOrganizationField.js","sourceRoot":"","sources":["../../../../src/ui-kit/FormField/Fields/EmployerOrganizationField.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,uDAAwD;AACxD,oEAAiE;AACjE,0EAAuE;AAEvE,gDAA6C;AAEhC,QAAA,yBAAyB,GAAG,IAAA,aAAG,EAAmB,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE;IAClF,MAAM,EAAE,IAAI,EAAE,GAAG,IAAA,iCAAe,EAAC,mBAAmB,CAAC,CAAC;IAEtD,MAAM,KAAK,GAAG,IAAA,uCAAkB,GAAE,CAAC;IAEnC,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,IAAI,IAAI,EAAE;YACR,KAAK,CAAC,oBAAoB,GAAG,IAAI,CAAC;SACnC;IACH,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;IAEX,OAAO,CACL,uBAAC,yBAAW,IACV,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,KAAK,CAAC,oBAAoB,IAAI,EAAE,EACxC,KAAK,EAAC,gKAA8B,EACpC,SAAS,EAAC,sBAAsB,EAChC,KAAK,EAAE,KAAK,GACZ,CACH,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -3,13 +3,13 @@ exports.InnField = void 0;
|
|
|
3
3
|
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
4
|
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
5
|
const hooks_1 = require("@redneckz/uni-jsx/lib/hooks");
|
|
6
|
-
const
|
|
6
|
+
const useRetailFormStore_1 = require("../../../hooks/useRetailFormStore");
|
|
7
7
|
const InputControl_1 = require("../../Input/InputControl");
|
|
8
8
|
const getObjectValidator_1 = require("../getObjectValidator");
|
|
9
9
|
const getValidation_1 = require("../getValidation");
|
|
10
10
|
const updateOrganizationFields_1 = require("../updateOrganizationFields");
|
|
11
11
|
exports.InnField = (0, uni_jsx_1.JSX)(({ field, input }) => {
|
|
12
|
-
const store = (0,
|
|
12
|
+
const store = (0, useRetailFormStore_1.useRetailFormStore)();
|
|
13
13
|
const onDaDataChange = (0, hooks_1.useCallback)((item) => {
|
|
14
14
|
field?.('organizationName')?.onChange?.(item.data?.name?.short_with_opf);
|
|
15
15
|
(0, updateOrganizationFields_1.updateOrganizationFields)(store, field, item);
|
|
@@ -3,12 +3,12 @@ exports.OrganizationField = void 0;
|
|
|
3
3
|
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
4
|
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
5
|
const hooks_1 = require("@redneckz/uni-jsx/lib/hooks");
|
|
6
|
-
const useCreditFormStore_1 = require("../../../hooks/useCreditFormStore");
|
|
7
6
|
const useLeadFormData_1 = require("../../../hooks/useLeadFormData");
|
|
7
|
+
const useRetailFormStore_1 = require("../../../hooks/useRetailFormStore");
|
|
8
8
|
const SelectField_1 = require("../SelectField");
|
|
9
9
|
exports.OrganizationField = (0, uni_jsx_1.JSX)(({ field, input }) => {
|
|
10
10
|
const { data } = (0, useLeadFormData_1.useLeadFormData)('ORGANIZATION_TYPE');
|
|
11
|
-
const store = (0,
|
|
11
|
+
const store = (0, useRetailFormStore_1.useRetailFormStore)();
|
|
12
12
|
(0, hooks_1.useEffect)(() => {
|
|
13
13
|
if (data) {
|
|
14
14
|
store.organization = data;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OrganizationField.js","sourceRoot":"","sources":["../../../../src/ui-kit/FormField/Fields/OrganizationField.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,uDAAwD;AACxD,
|
|
1
|
+
{"version":3,"file":"OrganizationField.js","sourceRoot":"","sources":["../../../../src/ui-kit/FormField/Fields/OrganizationField.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,uDAAwD;AACxD,oEAAiE;AACjE,0EAAuE;AAEvE,gDAA6C;AAEhC,QAAA,iBAAiB,GAAG,IAAA,aAAG,EAAmB,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE;IAC1E,MAAM,EAAE,IAAI,EAAE,GAAG,IAAA,iCAAe,EAAC,mBAAmB,CAAC,CAAC;IAEtD,MAAM,KAAK,GAAG,IAAA,uCAAkB,GAAE,CAAC;IAEnC,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,IAAI,IAAI,EAAE;YACR,KAAK,CAAC,YAAY,GAAG,IAAI,CAAC;SAC3B;IACH,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;IAEX,OAAO,CACL,uBAAC,yBAAW,IACV,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,KAAK,CAAC,YAAY,IAAI,EAAE,EAChC,KAAK,EAAC,uFAAiB,EACvB,SAAS,EAAC,cAAc,EACxB,KAAK,EAAE,KAAK,GACZ,CACH,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -3,13 +3,13 @@ exports.OrganizationNameField = void 0;
|
|
|
3
3
|
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
4
|
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
5
|
const hooks_1 = require("@redneckz/uni-jsx/lib/hooks");
|
|
6
|
-
const
|
|
6
|
+
const useRetailFormStore_1 = require("../../../hooks/useRetailFormStore");
|
|
7
7
|
const InputControl_1 = require("../../Input/InputControl");
|
|
8
8
|
const getObjectValidator_1 = require("../getObjectValidator");
|
|
9
9
|
const getValidation_1 = require("../getValidation");
|
|
10
10
|
const updateOrganizationFields_1 = require("../updateOrganizationFields");
|
|
11
11
|
exports.OrganizationNameField = (0, uni_jsx_1.JSX)(({ field, input }) => {
|
|
12
|
-
const store = (0,
|
|
12
|
+
const store = (0, useRetailFormStore_1.useRetailFormStore)();
|
|
13
13
|
const onDaDataChange = (0, hooks_1.useCallback)((item) => {
|
|
14
14
|
field?.('inn')?.onChange?.(item.data?.inn);
|
|
15
15
|
(0, updateOrganizationFields_1.updateOrganizationFields)(store, field, item);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { type DaDataSuggestion } from '../../api/dadataHints/dadataHintsType';
|
|
2
|
-
import { type CreditFormStore } from '../../hooks/useCreditFormStore';
|
|
3
2
|
import { type FormFieldRegisterer } from '../../hooks/useForm';
|
|
4
|
-
|
|
3
|
+
import { type CreditFormDictionarySlice } from '../../hooks/useRetailFormStore';
|
|
4
|
+
export declare const updateOrganizationFields: (store: CreditFormDictionarySlice, field: FormFieldRegisterer<any>, item: DaDataSuggestion) => void;
|
|
@@ -3,15 +3,23 @@ exports.updateOrganizationFields = void 0;
|
|
|
3
3
|
const getOrganizationParams_1 = require("../../api/RetailAPI/utils/getOrganizationParams");
|
|
4
4
|
const AddressField_1 = require("./Fields/AddressField");
|
|
5
5
|
const updateOrganizationFields = (store, field, item) => {
|
|
6
|
-
const inn = item
|
|
7
|
-
const okopf = Number(item.data?.opf?.code);
|
|
8
|
-
const okved = item.data?.okved ?? '';
|
|
6
|
+
const { okved, okopf, inn } = getOrganizationRequisites(item);
|
|
9
7
|
field?.('legalForm')?.onChange?.(item.data?.opf?.short);
|
|
10
8
|
field?.('organizationAddress')?.onChange?.((0, AddressField_1.getAddressFromDaDataItem)(item.data?.address));
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
const organizationData = {
|
|
10
|
+
amountWorkers: (0, getOrganizationParams_1.getEmployeesNumberOption)(store?.amountWorkers, item.data?.employee_count),
|
|
11
|
+
employerActivities: (0, getOrganizationParams_1.getOrganizationActivityType)(store?.employerActivities ?? [], okved),
|
|
12
|
+
organization: (0, getOrganizationParams_1.getOrganizationType)(store?.organization ?? [], okopf, inn),
|
|
13
|
+
employerOrganization: (0, getOrganizationParams_1.getOrganizationKind)(store?.employerOrganization ?? [], okopf),
|
|
14
|
+
};
|
|
15
|
+
for (const fieldName in organizationData) {
|
|
16
|
+
organizationData[fieldName] && field?.(fieldName)?.onChange?.(organizationData[fieldName]);
|
|
17
|
+
}
|
|
15
18
|
};
|
|
16
19
|
exports.updateOrganizationFields = updateOrganizationFields;
|
|
20
|
+
const getOrganizationRequisites = (item) => ({
|
|
21
|
+
inn: item.data?.inn ?? '',
|
|
22
|
+
okopf: Number(item.data?.opf?.code),
|
|
23
|
+
okved: item.data?.okved ?? '',
|
|
24
|
+
});
|
|
17
25
|
//# sourceMappingURL=updateOrganizationFields.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updateOrganizationFields.js","sourceRoot":"","sources":["../../../src/ui-kit/FormField/updateOrganizationFields.ts"],"names":[],"mappings":";;AACA,2FAKyD;AAGzD,wDAAiE;AAE1D,MAAM,wBAAwB,GAAG,CACtC,
|
|
1
|
+
{"version":3,"file":"updateOrganizationFields.js","sourceRoot":"","sources":["../../../src/ui-kit/FormField/updateOrganizationFields.ts"],"names":[],"mappings":";;AACA,2FAKyD;AAGzD,wDAAiE;AAE1D,M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IAAI,EAAE,GAAG,EAAE,IAAI,CAAC;IACnC,KAAK,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,IAAI,EAAE;CAC9B,CAAC,CAAC"}
|
|
@@ -6,7 +6,7 @@ export declare const getOrganizationActivityType: (options: LeadProps[], okved:
|
|
|
6
6
|
export declare const getEmployeesNumberOption: (options: LeadProps[] | null, count?: number) => {
|
|
7
7
|
key: string;
|
|
8
8
|
text: string;
|
|
9
|
-
};
|
|
9
|
+
} | null;
|
|
10
10
|
export declare const getOrganizationKind: (options: LeadProps[], okopf: number) => {
|
|
11
11
|
key: string;
|
|
12
12
|
text: string;
|
|
@@ -65,7 +65,10 @@ export const getOrganizationActivityType = (options, okved) => {
|
|
|
65
65
|
}
|
|
66
66
|
};
|
|
67
67
|
export const getEmployeesNumberOption = (options, count) => {
|
|
68
|
-
|
|
68
|
+
if (!count) {
|
|
69
|
+
return null;
|
|
70
|
+
}
|
|
71
|
+
const [option] = [options?.find((_) => count <= Number(_.description))].map((_) => ({
|
|
69
72
|
key: _?.key ?? '',
|
|
70
73
|
text: _?.value ?? '',
|
|
71
74
|
}));
|
|
@@ -91,5 +94,7 @@ export const getOrganizationType = (options, okopf, inn) => {
|
|
|
91
94
|
}
|
|
92
95
|
return getOptionByKey('COMMERCIAL');
|
|
93
96
|
};
|
|
94
|
-
const getOptionOp = (options) => (key) => options
|
|
97
|
+
const getOptionOp = (options) => (key) => options
|
|
98
|
+
.map((_) => ({ key: _.key, text: _.value }))
|
|
99
|
+
.find((_) => _.key === key) ?? null;
|
|
95
100
|
//# sourceMappingURL=getOrganizationParams.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getOrganizationParams.js","sourceRoot":"","sources":["../../../../src/api/RetailAPI/utils/getOrganizationParams.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,MAAM,2BAA2B,GAAG,CACzC,OAAoB,EACpB,KAAa,EACyB,EAAE;IACxC,IAAI,CAAC,KAAK,EAAE;QACV,O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E;YACL,OAAO,cAAc,wDAAsC,CAAC;QAC9D,KAAK,EAAE;YACL,OAAO,cAAc,0DAAuC,CAAC;QAC/D,KAAK,EAAE;YACL,OAAO,cAAc,gEAA0C,CAAC;QAClE,OAAO,CAAC,CAAC;YACP,IAAI,SAAS,IAAI,EAAE,IAAI,SAAS,IAAI,EAAE,EAAE;gBACtC,OAAO,cAAc,sDAAqC,CAAC;aAC5D;YACD,IAAI,SAAS,IAAI,CAAC,IAAI,SAAS,IAAI,CAAC,EAAE;gBACpC,OAAO,cAAc,oEAA4C,CAAC;aACnE;YACD,IAAI,SAAS,IAAI,EAAE,IAAI,SAAS,IAAI,EAAE,EAAE;gBACtC,OAAO,cAAc,wDAAsC,CAAC;aAC7D;YAED,OAAO,cAAc,gEAA0C,CAAC;SACjE;KACF;AACH,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,wBAAwB,GAAG,CACtC,OAA2B,EAC3B,KAAc,
|
|
1
|
+
{"version":3,"file":"getOrganizationParams.js","sourceRoot":"","sources":["../../../../src/api/RetailAPI/utils/getOrganizationParams.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,MAAM,2BAA2B,GAAG,CACzC,OAAoB,EACpB,KAAa,EACyB,EAAE;IACxC,IAAI,CAAC,KAAK,EAAE;QACV,OAAO,IAAI,CAAC;KACb;IACD,MAAM,cAAc,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC;IAC5C,MAAM,SAAS,GAAG,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IACxC,MAAM,eAAe,GAAG,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IAE9C,QAAQ,SAAS,EAAE;QACjB,KAAK,CAAC;YACJ,OAAO,cAAc,4DAAwC,CAAC;QAChE,KAAK,EAAE;YACL,OAAO,cAAc,oEAA4C,CAAC;QACpE,KAAK,EAAE,CAAC;QACR,KAAK,EAAE,CAAC;QACR,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AED,IAAI,KAAK,IAAI,KAAK,IAAI,KAAK,IAAI,KAAK,IAAI,KAAK,KAAK,KAAK,EAAE;QACvD,OAAO,cAAc,CAAC,WAAW,CAAC,CAAC;KACpC;IAED,OAAO,cAAc,CAAC,YAAY,CAAC,CAAC;AACtC,CAAC,CAAC;AAEF,MAAM,WAAW,GAAG,CAAC,OAAoB,EAAE,EAAE,CAAC,CAAC,GAAW,EAAE,EAAE,CAC5D,OAAO;KACJ,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,GAAa,EAAE,IAAI,EAAE,CAAC,CAAC,KAAe,EAAE,CAAC,CAAC;KAC/D,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,KAAK,GAAG,CAAC,IAAI,IAAI,CAAC"}
|
|
@@ -6,4 +6,4 @@ export interface UserData {
|
|
|
6
6
|
programId: string;
|
|
7
7
|
formData: LeadFormState;
|
|
8
8
|
}
|
|
9
|
-
export declare const useSaveUserData: () => ({ participantId, taskId, profileId,
|
|
9
|
+
export declare const useSaveUserData: () => ({ participantId, taskId, profileId, programId: programNumber, formData }: UserData) => void;
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import { useCallback } from '@redneckz/uni-jsx/lib/hooks';
|
|
2
|
-
import { useSetter } from '../../hooks/useSetter.js';
|
|
3
2
|
import { useLeadFormStore } from './useLeadFormStore.js';
|
|
4
3
|
export const useSaveUserData = () => {
|
|
5
4
|
const leadFormStore = useLeadFormStore();
|
|
6
|
-
const
|
|
7
|
-
const saveUserData = useCallback(({ participantId, taskId, profileId, formData, programId: programNumber }) => {
|
|
5
|
+
const saveUserData = useCallback(({ participantId, taskId, profileId, programId: programNumber, formData }) => {
|
|
8
6
|
leadFormStore.participantId = participantId;
|
|
9
7
|
leadFormStore.taskId = taskId;
|
|
10
8
|
leadFormStore.profileId = profileId;
|
|
11
9
|
leadFormStore.programId = programNumber;
|
|
12
|
-
|
|
10
|
+
leadFormStore.leadForm = formData;
|
|
13
11
|
}, []);
|
|
14
12
|
return saveUserData;
|
|
15
13
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSaveUserData.js","sourceRoot":"","sources":["../../../src/components/ApplicationLeadForm/useSaveUserData.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"useSaveUserData.js","sourceRoot":"","sources":["../../../src/components/ApplicationLeadForm/useSaveUserData.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAE1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAStD,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,EAAE;IAClC,MAAM,aAAa,GAAG,gBAAgB,EAAE,CAAC;IAEzC,MAAM,YAAY,GAAG,WAAW,CAC9B,CAAC,EAAE,aAAa,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,aAAa,EAAE,QAAQ,EAAY,EAAE,EAAE;QACrF,aAAa,CAAC,aAAa,GAAG,aAAa,CAAC;QAC5C,aAAa,CAAC,MAAM,GAAG,MAAM,CAAC;QAC9B,aAAa,CAAC,SAAS,GAAG,SAAS,CAAC;QACpC,aAAa,CAAC,SAAS,GAAG,aAAa,CAAC;QACxC,aAAa,CAAC,QAAQ,GAAG,QAAQ,CAAC;IACpC,CAAC,EACD,EAAE,CACH,CAAC;IAEF,OAAO,YAAY,CAAC;AACtB,CAAC,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
2
|
import { JSX } from '@redneckz/uni-jsx';
|
|
3
3
|
import { useCallback, useEffect, useMemo, useRef, useState } from '@redneckz/uni-jsx/lib/hooks';
|
|
4
|
+
import { useBool } from '@redneckz/uni-jsx/lib/hooks/useBool';
|
|
4
5
|
import { updateRefreshToken } from '../../api/RetailAPI/updateRefreshToken.js';
|
|
5
6
|
import { BlockWrapper } from '../../ui-kit/BlockWrapper.js';
|
|
6
7
|
import { CreditCardFormProgress } from './CreditCardFormProgress.js';
|
|
@@ -30,7 +31,7 @@ export const CreditCardForm = JSX(({ className, ...rest }) => {
|
|
|
30
31
|
scrollToTop();
|
|
31
32
|
}, []);
|
|
32
33
|
const sections = useMemo(() => stepsSectionsMap[step], [step]);
|
|
33
|
-
const [isFormFinished,
|
|
34
|
-
return (_jsx(BlockWrapper, { className: className, ...rest, children: _jsxs("div", { ref: formContainerRef, className: "container grid grid-cols-12", children: [isFormFinished ? null : (_jsx(CreditCardFormProgress, { stepsTitles: TITLES, step: step, totalSteps: STEPS })), _jsx("div", { className: "py-lg px-5xl mt-2xs bg-white col-span-12", children: _jsx(CreditCardFormStep, { step: step, sections: sections, onNextStep: handleNextStep, onPrevStep: handlePrevStep,
|
|
34
|
+
const [isFormFinished, { setTrue: handleFinish }] = useBool(false);
|
|
35
|
+
return (_jsx(BlockWrapper, { className: className, ...rest, children: _jsxs("div", { ref: formContainerRef, className: "container grid grid-cols-12", children: [isFormFinished ? null : (_jsx(CreditCardFormProgress, { stepsTitles: TITLES, step: step, totalSteps: STEPS })), _jsx("div", { className: "py-lg px-5xl mt-2xs bg-white col-span-12", children: _jsx(CreditCardFormStep, { step: step, sections: sections, isFormFinished: isFormFinished, onNextStep: handleNextStep, onPrevStep: handlePrevStep, onFinish: handleFinish }, String(step)) })] }) }));
|
|
35
36
|
});
|
|
36
37
|
//# sourceMappingURL=CreditCardForm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CreditCardForm.js","sourceRoot":"","sources":["../../../src/components/CreditCardForm/CreditCardForm.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,OA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EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,GAAI,CAC/E,EACD,cAAK,SAAS,EAAC,0CAA0C,YACvD,KAAC,kBAAkB,IAEjB,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,QAAQ,EAClB,cAAc,EAAE,cAAc,EAC9B,UAAU,EAAE,cAAc,EAC1B,UAAU,EAAE,cAAc,EAC1B,QAAQ,EAAE,YAAY,IANjB,MAAM,CAAC,IAAI,CAAC,CAOjB,GACE,IACF,GACO,CAChB,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -4,7 +4,7 @@ import { useCallback, useEffect, useState } from '@redneckz/uni-jsx/lib/hooks';
|
|
|
4
4
|
import { getTaskStatus, STATUS_TYPE } from '../../api/RetailAPI/getTaskStatus.js';
|
|
5
5
|
import { sendSignalToProcess } from '../../api/RetailAPI/sendSignalToProcess.js';
|
|
6
6
|
import { useInterval } from '../../hooks/useInterval.js';
|
|
7
|
-
import {
|
|
7
|
+
import { useRetailFormStore } from '../../hooks/useRetailFormStore.js';
|
|
8
8
|
import { FailedStatusContent } from './FailedStatusContent.js';
|
|
9
9
|
import { PendingStatusContent } from './PendingStatusContent.js';
|
|
10
10
|
import { ReworkStatusContent } from './ReworkStatusContent.js';
|
|
@@ -15,7 +15,7 @@ const SIGNAL_TYPES = [
|
|
|
15
15
|
];
|
|
16
16
|
export const CreditCardFormStatusTracker = JSX(() => {
|
|
17
17
|
const [status, setStatus] = useState(STATUS_TYPE.process);
|
|
18
|
-
const
|
|
18
|
+
const { taskId } = useRetailFormStore();
|
|
19
19
|
useEffect(() => {
|
|
20
20
|
(async () => {
|
|
21
21
|
for (const signalType of SIGNAL_TYPES) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CreditCardFormStatusTracker.js","sourceRoot":"","sources":["../../../src/components/CreditCardForm/CreditCardFormStatusTracker.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,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
2
2
|
export interface CreditCardFormStepProps {
|
|
3
3
|
step: number;
|
|
4
4
|
sections: SectionsProps[];
|
|
5
|
+
isFormFinished: boolean;
|
|
5
6
|
onNextStep: () => void;
|
|
6
7
|
onPrevStep: () => void;
|
|
7
|
-
|
|
8
|
-
finishForm?: (bool: boolean) => void;
|
|
8
|
+
onFinish?: () => void;
|
|
9
9
|
}
|
|
10
10
|
export declare const CreditCardFormStep: import("@redneckz/uni-jsx").UNIComponent<CreditCardFormStepProps, any, any>;
|
|
@@ -1,26 +1,20 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
2
|
import { JSX } from '@redneckz/uni-jsx';
|
|
3
|
+
import { useMemo } from '@redneckz/uni-jsx/lib/hooks';
|
|
3
4
|
import { useForm } from '../../hooks/useForm.js';
|
|
4
|
-
import { useLocalStorage } from '../../hooks/useLocalStorage.js';
|
|
5
5
|
import { CreditCardFormStatusTracker } from './CreditCardFormStatusTracker.js';
|
|
6
|
-
import { getInitialFormState } from './getInitialFormState.js';
|
|
7
6
|
import { renderStep } from './renderStep.js';
|
|
8
7
|
import { StepsNavigationButtons } from './StepsNavigationButtons.js';
|
|
9
8
|
import { useCreditCardFormAPI } from './useCreditCardFormAPI.js';
|
|
10
|
-
export const CreditCardFormStep = JSX(({ step, sections, onPrevStep, onNextStep,
|
|
11
|
-
const
|
|
12
|
-
const initialState =
|
|
13
|
-
const inputs = (sections?.flatMap((_) => _?.inputs) || []);
|
|
14
|
-
const { handleSubmit } = useCreditCardFormAPI({
|
|
9
|
+
export const CreditCardFormStep = JSX(({ step, sections, isFormFinished, onPrevStep, onNextStep, onFinish }) => {
|
|
10
|
+
const inputs = useMemo(() => (sections?.flatMap((_) => _?.inputs) || []), [sections]);
|
|
11
|
+
const [initialState, onSubmit] = useCreditCardFormAPI({
|
|
15
12
|
step,
|
|
16
13
|
inputs,
|
|
17
14
|
onNextStep,
|
|
18
|
-
|
|
19
|
-
finishForm,
|
|
15
|
+
onFinish,
|
|
20
16
|
});
|
|
21
|
-
const [, { field, onSubmit }] = useForm(initialState, {
|
|
22
|
-
|
|
23
|
-
});
|
|
24
|
-
return isFormFinished ? (_jsx(CreditCardFormStatusTracker, {})) : (_jsxs("form", { onSubmit: onSubmit, className: "space-y-m", children: [renderStep({ sections, field, step }), _jsx(StepsNavigationButtons, { step: step, onPrevStep: onPrevStep })] }));
|
|
17
|
+
const [, { field, onSubmit: handleSubmit }] = useForm(initialState, { onSubmit });
|
|
18
|
+
return isFormFinished ? (_jsx(CreditCardFormStatusTracker, {})) : (_jsxs("form", { onSubmit: handleSubmit, className: "space-y-m", children: [renderStep({ sections, field, step }), _jsx(StepsNavigationButtons, { step: step, onPrevStep: onPrevStep })] }));
|
|
25
19
|
});
|
|
26
20
|
//# sourceMappingURL=CreditCardFormStep.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CreditCardFormStep.js","sourceRoot":"","sources":["../../../src/components/CreditCardForm/CreditCardFormStep.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"CreditCardFormStep.js","sourceRoot":"","sources":["../../../src/components/CreditCardForm/CreditCardFormStep.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAG9C,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAW9D,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,CACnC,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,cAAc,EAAE,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,EAAE,EAAE;IACvE,MAAM,MAAM,GAAG,OAAO,CACpB,GAAG,EAAE,CAAC,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAgB,EAAE,EAAE,CAAC,CAAC,EAAE,MAAM,CAAC,IAAI,EAAE,CAAe,EAC9E,CAAC,QAAQ,CAAC,CACX,CAAC;IAEF,MAAM,CAAC,YAAY,EAAE,QAAQ,CAAC,GAAG,oBAAoB,CAAC;QACpD,IAAI;QACJ,MAAM;QACN,UAAU;QACV,QAAQ;KACT,CAAC,CAAC;IAEH,MAAM,CAAC,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,CAAC,GAAG,OAAO,CAAC,YAAY,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC;IAElF,OAAO,cAAc,CAAC,CAAC,CAAC,CACtB,KAAC,2BAA2B,KAAG,CAChC,CAAC,CAAC,CAAC,CACF,gBAAM,QAAQ,EAAE,YAAY,EAAE,SAAS,EAAC,WAAW,aAChD,UAAU,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,EACtC,KAAC,sBAAsB,IAAC,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,UAAU,GAAI,IACzD,CACR,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
2
|
import { JSX } from '@redneckz/uni-jsx';
|
|
3
|
-
import {
|
|
3
|
+
import { useRetailFormStore } from '../../hooks/useRetailFormStore.js';
|
|
4
4
|
import { CreditCardFormStatus } from './CreditCardFormStatus.js';
|
|
5
5
|
export const PendingStatusContent = JSX(({ handleExpireTimer }) => {
|
|
6
|
-
const
|
|
6
|
+
const { statusInfo } = useRetailFormStore();
|
|
7
7
|
return (_jsx(CreditCardFormStatus, { interval: 300, intervalExpireAction: handleExpireTimer, title: "\u0417\u0430\u044F\u0432\u043A\u0430 \u0443\u0441\u043F\u0435\u0448\u043D\u043E \u043E\u0442\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0430", description: "\u041D\u0435 \u0437\u0430\u043A\u0440\u044B\u0432\u0430\u0439\u0442\u0435 \u043E\u043A\u043D\u043E, \u0441\u043A\u043E\u0440\u043E \u0441\u043E\u043E\u0431\u0449\u0438\u043C \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442", sectionInfoTitle: "\u0417\u0430\u044F\u0432\u043B\u0435\u043D\u043D\u044B\u0435 \u0443\u0441\u043B\u043E\u0432\u0438\u044F \u043F\u043E \u043A\u0440\u0435\u0434\u0438\u0442\u0443", sectionInfo: [
|
|
8
8
|
{
|
|
9
9
|
label: 'Название продукта',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PendingStatusContent.js","sourceRoot":"","sources":["../../../src/components/CreditCardForm/PendingStatusContent.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"PendingStatusContent.js","sourceRoot":"","sources":["../../../src/components/CreditCardForm/PendingStatusContent.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,CACrC,CAAC,EAAE,iBAAiB,EAAqC,EAAE,EAAE;IAC3D,MAAM,EAAE,UAAU,EAAE,GAAG,kBAAkB,EAAE,CAAC;IAE5C,OAAO,CACL,KAAC,oBAAoB,IACnB,QAAQ,EAAE,GAAG,EACb,oBAAoB,EAAE,iBAAiB,EACvC,KAAK,EAAC,8IAA2B,EACjC,WAAW,EAAC,sOAA6C,EACzD,gBAAgB,EAAC,iKAA+B,EAChD,WAAW,EAAE;YACX;gBACE,KAAK,EAAE,mBAAmB;gBAC1B,WAAW,EAAE,iBAAiB;aAC/B;YACD;gBACE,KAAK,EAAE,WAAW;gBAClB,WAAW,EAAE,UAAU,EAAE,YAAY;aACtC;SACF,GACD,CACH,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
2
|
import { JSX } from '@redneckz/uni-jsx';
|
|
3
|
-
import {
|
|
3
|
+
import { useRetailFormStore } from '../../hooks/useRetailFormStore.js';
|
|
4
4
|
import { CreditCardFormStatus } from './CreditCardFormStatus.js';
|
|
5
5
|
export const ReworkStatusContent = JSX(() => {
|
|
6
|
-
const
|
|
6
|
+
const { statusInfo } = useRetailFormStore();
|
|
7
7
|
return (_jsx(CreditCardFormStatus, { title: "\u0411\u043B\u0430\u0433\u043E\u0434\u0430\u0440\u0438\u043C \u0432\u0430\u0441 \u0437\u0430 \u043E\u0436\u0438\u0434\u0430\u043D\u0438\u0435, \u043D\u043E \u043D\u0430\u043C \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044F \u0431\u043E\u043B\u044C\u0448\u0435 \u0432\u0440\u0435\u043C\u0435\u043D\u0438 \u0434\u043B\u044F \u043F\u0440\u0438\u043D\u044F\u0442\u0438\u044F \u0440\u0435\u0448\u0435\u043D\u0438\u044F", description: "\u041F\u043E\u0441\u0435\u0442\u0438\u0442\u0435 \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u043E\u0435 \u043E\u0442\u0434\u0435\u043B\u0435\u043D\u0438\u0435 \u0431\u0430\u043D\u043A\u0430 \u0441 \u043D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u044B\u043C\u0438 \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430\u043C\u0438 \u0438 \u0442\u0430\u043A \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u0435 \u043E\u0444\u043E\u0440\u043C\u043B\u0435\u043D\u0438\u0435 \u043A\u0440\u0435\u0434\u0438\u0442\u0430.", sectionAdditionalTitle: "\u0412 \u043E\u0442\u0434\u0435\u043B\u0435\u043D\u0438\u0438 \u0411\u0430\u043D\u043A\u0430", sectionInfoAdditional: [
|
|
8
8
|
{
|
|
9
9
|
label: 'Регион',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReworkStatusContent.js","sourceRoot":"","sources":["../../../src/components/CreditCardForm/ReworkStatusContent.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"ReworkStatusContent.js","sourceRoot":"","sources":["../../../src/components/CreditCardForm/ReworkStatusContent.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAG,CAAC,GAAG,EAAE;IAC1C,MAAM,EAAE,UAAU,EAAE,GAAG,kBAAkB,EAAE,CAAC;IAE5C,OAAO,CACL,KAAC,oBAAoB,IACnB,KAAK,EAAC,saAAkF,EACxF,WAAW,EAAC,4gBAAmG,EAC/G,sBAAsB,EAAC,8FAAmB,EAC1C,qBAAqB,EAAE;YACrB;gBACE,KAAK,EAAE,QAAQ;gBACf,WAAW,EAAE,UAAU,EAAE,YAAY;aACtC;YACD;gBACE,KAAK,EAAE,OAAO;gBACd,WAAW,EAAE,UAAU,EAAE,aAAa;aACvC;SACF,EACD,WAAW,EAAE;YACX;gBACE,KAAK,EAAE,qBAAqB;gBAC5B,WAAW,EAAE,cAAc;aAC5B;SACF,EACD,UAAU,EAAC,gHAAsB,GACjC,CACH,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
2
|
import { JSX } from '@redneckz/uni-jsx';
|
|
3
|
-
import {
|
|
3
|
+
import { useRetailFormStore } from '../../hooks/useRetailFormStore.js';
|
|
4
4
|
import { CreditCardFormStatus } from './CreditCardFormStatus.js';
|
|
5
5
|
export const SuccessStatusContent = JSX(() => {
|
|
6
|
-
const
|
|
6
|
+
const { statusInfo } = useRetailFormStore();
|
|
7
7
|
return (_jsx(CreditCardFormStatus, { title: "\u0411\u0430\u043D\u043A \u043E\u0434\u043E\u0431\u0440\u0438\u043B \u0432\u0430\u043C \u043A\u0440\u0435\u0434\u0438\u0442", description: "\u041E\u0431\u0440\u0430\u0442\u0438\u0442\u0435\u0441\u044C \u0432 \u043E\u0442\u0434\u0435\u043B\u0435\u043D\u0438\u0435 \u0431\u0430\u043D\u043A\u0430, \u0447\u0442\u043E\u0431\u044B \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u044C \u043E\u0444\u043E\u0440\u043C\u043B\u0435\u043D\u0438\u0435 \u0438 \u043F\u043E\u043B\u0443\u0447\u0438\u0442 \u0432\u0430\u0448 \u043A\u0440\u0435\u0434\u0438\u0442", sectionInfo: [
|
|
8
8
|
{
|
|
9
9
|
label: 'Название продукта',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SuccessStatusContent.js","sourceRoot":"","sources":["../../../src/components/CreditCardForm/SuccessStatusContent.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"SuccessStatusContent.js","sourceRoot":"","sources":["../../../src/components/CreditCardForm/SuccessStatusContent.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,CAAC,GAAG,EAAE;IAC3C,MAAM,EAAE,UAAU,EAAE,GAAG,kBAAkB,EAAE,CAAC;IAE5C,OAAO,CACL,KAAC,oBAAoB,IACnB,KAAK,EAAC,6HAAyB,EAC/B,WAAW,EAAC,yZAA+E,EAC3F,WAAW,EAAE;YACX;gBACE,KAAK,EAAE,mBAAmB;gBAC1B,WAAW,EAAE,sBAAsB;aACpC;YACD;gBACE,KAAK,EAAE,QAAQ;gBACf,WAAW,EAAE,OAAO;aACrB;YACD;gBACE,KAAK,EAAE,oBAAoB;gBAC3B,WAAW,EAAE,UAAU;aACxB;YACD;gBACE,KAAK,EAAE,cAAc;gBACrB,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,GAAG,MAAM;aAC1D;YACD;gBACE,KAAK,EAAE,aAAa;gBACpB,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,oBAAoB;aACtF;SACF,EACD,UAAU,EAAC,gHAAsB,GACjC,CACH,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formStateMap.js","sourceRoot":"","sources":["../../../src/components/CreditCardForm/formStateMap.tsx"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,YAAY,GAA6B;IACpD;QACE,aAAa,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;QACrC,QAAQ,EAAE,KAAK;QACf,QAAQ,EAAE,EAAE;KACb;IACD;QACE,OAAO,EAAE,EAAE;QACX,IAAI,EAA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;QACzB,oBAAoB,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;KAC5C;IACD;QACE,YAAY,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;QACnC,UAAU,EAAE,SAAS;QACrB,aAAa,EAAE,SAAS;QACxB,kBAAkB,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;QACzC,KAAK,EAAE,SAAS;QAChB,iBAAiB,EAAE,SAAS;QAC5B,KAAK,EAAE,EAAE;QACT,SAAS,EAAE,KAAK;KACjB;IACD;QACE,gBAAgB,EAAE,KAAK;QACvB,aAAa,EAAE,KAAK;QACpB,cAAc,EAAE,KAAK;QACrB,eAAe,EAAE,EAAE;QACnB,cAAc,EAAE,SAAS;KAC1B;IACD;QACE,YAAY,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;QACnC,aAAa,EAAE
|
|
1
|
+
{"version":3,"file":"formStateMap.js","sourceRoot":"","sources":["../../../src/components/CreditCardForm/formStateMap.tsx"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,YAAY,GAA6B;IACpD;QACE,aAAa,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;QACrC,QAAQ,EAAE,KAAK;QACf,QAAQ,EAAE,EAAE;KACb;IACD;QACE,OAAO,EAAE,EAAE;QACX,IAAI,EAAE,EAAE;QACR,UAAU,EAAE,EAAE;QACd,GAAG,EAAE,EAAE;QACP,eAAe,EAAE,SAAS;QAC1B,UAAU,EAAE,EAAE;QACd,KAAK,EAAE,EAAE;QACT,KAAK,EAAE,EAAE;QACT,QAAQ,EAAE,SAAS;QACnB,SAAS,EAAE,SAAS;QACpB,iBAAiB,EAAE,SAAS;QAC5B,kBAAkB,EAAE,EAAE;QACtB,WAAW,EAAE,EAAE;QACf,mBAAmB,EAAE;YACnB,WAAW,EAAE,EA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AAiB,EAAE,SAAS;QAC5B,KAAK,EAAE,EAAE;QACT,SAAS,EAAE,KAAK;KACjB;IACD;QACE,gBAAgB,EAAE,KAAK;QACvB,aAAa,EAAE,KAAK;QACpB,cAAc,EAAE,KAAK;QACrB,eAAe,EAAE,EAAE;QACnB,cAAc,EAAE,SAAS;KAC1B;IACD;QACE,YAAY,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;QACnC,aAAa,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;QACpC,gBAAgB,EAAE,SAAS;QAC3B,cAAc,EAAE;YACd,WAAW,EAAE,EAAE;YACf,QAAQ,EAAE,EAAE;SACb;QACD,YAAY,EAAE,QAAQ;QACtB,YAAY,EAAE,SAAS;KACxB;CACF,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { type LeadFormState } from '../ApplicationLeadForm/LeadFormState';
|
|
2
|
-
export declare const getInitialFormState: (step: number,
|
|
2
|
+
export declare const getInitialFormState: (step: number, formState: LeadFormState | null) => LeadFormState;
|
|
@@ -1,19 +1,16 @@
|
|
|
1
1
|
import { formStateMap } from './formStateMap.js';
|
|
2
|
-
export const getInitialFormState = (step,
|
|
2
|
+
export const getInitialFormState = (step, formState) => ({
|
|
3
3
|
...formStateMap[step],
|
|
4
|
-
...
|
|
5
|
-
limitedBirthday: transformStringToData(
|
|
6
|
-
dulIssueDateField: transformStringToData(
|
|
7
|
-
participantDateRegistration: transformStringToData(
|
|
8
|
-
beginDate: transformStringToData(
|
|
9
|
-
deliveryDate: transformStringToData(
|
|
4
|
+
...formState,
|
|
5
|
+
limitedBirthday: transformStringToData(formState?.limitedBirthday),
|
|
6
|
+
dulIssueDateField: transformStringToData(formState?.dulIssueDateField),
|
|
7
|
+
participantDateRegistration: transformStringToData(formState?.participantDateRegistration),
|
|
8
|
+
beginDate: transformStringToData(formState?.beginDate),
|
|
9
|
+
deliveryDate: transformStringToData(formState?.deliveryDate),
|
|
10
10
|
});
|
|
11
11
|
const transformStringToData = (text) => {
|
|
12
|
-
if (!text) {
|
|
13
|
-
return undefined;
|
|
14
|
-
}
|
|
15
12
|
try {
|
|
16
|
-
return new Date(text);
|
|
13
|
+
return text ? new Date(text) : undefined;
|
|
17
14
|
}
|
|
18
15
|
catch (_) {
|
|
19
16
|
return undefined;
|