@redneckz/wildless-cms-uni-blocks 0.14.917 → 0.14.919
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/bundle.umd.js +440 -367
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/retail/api/getDictionaries.d.ts +2 -0
- package/bundle/retail/components/Fields/BankEmployeeCodeField.d.ts +3 -1
- package/bundle/retail/hooks/useIFrameMode.d.ts +4 -0
- package/bundle/retail/model/LeadFormState.d.ts +1 -1
- package/bundle/retail/model/NameFieldDef.d.ts +1 -1
- package/bundle/retail/utils/getOrganizationParams.d.ts +6 -0
- package/bundle/retail/validator/validators.d.ts +2 -0
- package/bundle/ui-kit/FormField/validators.d.ts +1 -0
- package/bundle/utils/isIFrame.d.ts +1 -0
- package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +2 -0
- package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/dist/components/ApplicationLeadForm/EsiaLoginBanner.js +8 -3
- package/dist/components/ApplicationLeadForm/EsiaLoginBanner.js.map +1 -1
- package/dist/components/ContentPage/ContentPage.js +5 -2
- package/dist/components/ContentPage/ContentPage.js.map +1 -1
- package/dist/components/CreditCardForm/CreditCardFormStep.js +2 -0
- package/dist/components/CreditCardForm/CreditCardFormStep.js.map +1 -1
- package/dist/components/CreditCardForm/creditCardFormStepsData.js +21 -18
- package/dist/components/CreditCardForm/creditCardFormStepsData.js.map +1 -1
- package/dist/components/CreditCardForm/formStateMap.js +6 -0
- package/dist/components/CreditCardForm/formStateMap.js.map +1 -1
- package/dist/components/CreditForm/CreditFormStep.js +2 -0
- package/dist/components/CreditForm/CreditFormStep.js.map +1 -1
- package/dist/components/CreditForm/creditFormStepsData.js +14 -17
- package/dist/components/CreditForm/creditFormStepsData.js.map +1 -1
- package/dist/components/DebitForm/DebitFormStep.js +2 -0
- package/dist/components/DebitForm/DebitFormStep.js.map +1 -1
- package/dist/retail/adaptors/getPersonalInfoData.js +1 -9
- package/dist/retail/adaptors/getPersonalInfoData.js.map +1 -1
- package/dist/retail/api/getDictionaries.d.ts +2 -0
- package/dist/retail/api/getDictionaries.js +13 -0
- package/dist/retail/api/getDictionaries.js.map +1 -0
- package/dist/retail/components/DraftDialog/parseDraftTask.js +1 -0
- package/dist/retail/components/DraftDialog/parseDraftTask.js.map +1 -1
- package/dist/retail/components/Fields/AmountWorkersField.js +0 -8
- package/dist/retail/components/Fields/AmountWorkersField.js.map +1 -1
- package/dist/retail/components/Fields/BankEmployeeCodeField.d.ts +3 -1
- package/dist/retail/components/Fields/BankEmployeeCodeField.js +17 -2
- package/dist/retail/components/Fields/BankEmployeeCodeField.js.map +1 -1
- package/dist/retail/components/Fields/DaDataInnField.js +21 -8
- package/dist/retail/components/Fields/DaDataInnField.js.map +1 -1
- package/dist/retail/components/Fields/EmployerActivitiesField.js +0 -8
- package/dist/retail/components/Fields/EmployerActivitiesField.js.map +1 -1
- package/dist/retail/components/Fields/EmployerOrganizationField.js +0 -8
- package/dist/retail/components/Fields/EmployerOrganizationField.js.map +1 -1
- package/dist/retail/components/Fields/OrganizationField.js +0 -8
- package/dist/retail/components/Fields/OrganizationField.js.map +1 -1
- package/dist/retail/components/Fields/OrganizationNameField.js +12 -2
- package/dist/retail/components/Fields/OrganizationNameField.js.map +1 -1
- package/dist/retail/content.js +4 -11
- package/dist/retail/content.js.map +1 -1
- package/dist/retail/hooks/useIFrameMode.d.ts +4 -0
- package/dist/retail/hooks/useIFrameMode.js +39 -0
- package/dist/retail/hooks/useIFrameMode.js.map +1 -0
- package/dist/retail/inputs.js +1 -1
- package/dist/retail/inputs.js.map +1 -1
- package/dist/retail/model/LeadFormState.d.ts +1 -1
- package/dist/retail/model/NameFieldDef.d.ts +1 -1
- package/dist/retail/utils/getMainFormStateMap.js +1 -6
- package/dist/retail/utils/getMainFormStateMap.js.map +1 -1
- package/dist/retail/utils/getOrganizationParams.d.ts +6 -0
- package/dist/retail/utils/getOrganizationParams.js +7 -1
- package/dist/retail/utils/getOrganizationParams.js.map +1 -1
- package/dist/retail/utils/updateOrganizationFields.js +2 -0
- package/dist/retail/utils/updateOrganizationFields.js.map +1 -1
- package/dist/retail/validator/getRetailFormValidator.js +2 -0
- package/dist/retail/validator/getRetailFormValidator.js.map +1 -1
- package/dist/retail/validator/validators.d.ts +2 -0
- package/dist/retail/validator/validators.js +6 -1
- package/dist/retail/validator/validators.js.map +1 -1
- package/dist/ui-kit/DatePicker/DatePickerInput.js +1 -1
- package/dist/ui-kit/DatePicker/DatePickerInput.js.map +1 -1
- package/dist/ui-kit/FormField/validators.d.ts +1 -0
- package/dist/ui-kit/FormField/validators.js +4 -3
- package/dist/ui-kit/FormField/validators.js.map +1 -1
- package/dist/ui-kit/TabsControl/TabItemInner.js +1 -1
- package/dist/ui-kit/TabsControl/TabItemInner.js.map +1 -1
- package/dist/utils/isIFrame.d.ts +1 -0
- package/dist/utils/isIFrame.js +5 -0
- package/dist/utils/isIFrame.js.map +1 -0
- package/lib/common.css +1 -1
- package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +2 -0
- package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/lib/components/ApplicationLeadForm/EsiaLoginBanner.js +8 -3
- package/lib/components/ApplicationLeadForm/EsiaLoginBanner.js.map +1 -1
- package/lib/components/ContentPage/ContentPage.js +5 -2
- package/lib/components/ContentPage/ContentPage.js.map +1 -1
- package/lib/components/CreditCardForm/CreditCardFormStep.js +2 -0
- package/lib/components/CreditCardForm/CreditCardFormStep.js.map +1 -1
- package/lib/components/CreditCardForm/creditCardFormStepsData.js +21 -18
- package/lib/components/CreditCardForm/creditCardFormStepsData.js.map +1 -1
- package/lib/components/CreditCardForm/formStateMap.js +6 -0
- package/lib/components/CreditCardForm/formStateMap.js.map +1 -1
- package/lib/components/CreditForm/CreditFormStep.js +2 -0
- package/lib/components/CreditForm/CreditFormStep.js.map +1 -1
- package/lib/components/CreditForm/creditFormStepsData.js +14 -17
- package/lib/components/CreditForm/creditFormStepsData.js.map +1 -1
- package/lib/components/DebitForm/DebitFormStep.js +2 -0
- package/lib/components/DebitForm/DebitFormStep.js.map +1 -1
- package/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.d.ts +1 -1
- package/lib/retail/adaptors/getPersonalInfoData.js +2 -10
- package/lib/retail/adaptors/getPersonalInfoData.js.map +1 -1
- package/lib/retail/api/getDictionaries.d.ts +2 -0
- package/lib/retail/api/getDictionaries.js +10 -0
- package/lib/retail/api/getDictionaries.js.map +1 -0
- package/lib/retail/components/DraftDialog/parseDraftTask.js +1 -0
- package/lib/retail/components/DraftDialog/parseDraftTask.js.map +1 -1
- package/lib/retail/components/Fields/AmountWorkersField.js +0 -8
- package/lib/retail/components/Fields/AmountWorkersField.js.map +1 -1
- package/lib/retail/components/Fields/BankEmployeeCodeField.d.ts +3 -1
- package/lib/retail/components/Fields/BankEmployeeCodeField.js +17 -2
- package/lib/retail/components/Fields/BankEmployeeCodeField.js.map +1 -1
- package/lib/retail/components/Fields/DaDataInnField.js +22 -9
- package/lib/retail/components/Fields/DaDataInnField.js.map +1 -1
- package/lib/retail/components/Fields/EmployerActivitiesField.js +0 -8
- package/lib/retail/components/Fields/EmployerActivitiesField.js.map +1 -1
- package/lib/retail/components/Fields/EmployerOrganizationField.js +0 -8
- package/lib/retail/components/Fields/EmployerOrganizationField.js.map +1 -1
- package/lib/retail/components/Fields/OrganizationField.js +0 -8
- package/lib/retail/components/Fields/OrganizationField.js.map +1 -1
- package/lib/retail/components/Fields/OrganizationNameField.js +13 -3
- package/lib/retail/components/Fields/OrganizationNameField.js.map +1 -1
- package/lib/retail/content.js +4 -11
- package/lib/retail/content.js.map +1 -1
- package/lib/retail/hooks/useIFrameMode.d.ts +4 -0
- package/lib/retail/hooks/useIFrameMode.js +36 -0
- package/lib/retail/hooks/useIFrameMode.js.map +1 -0
- package/lib/retail/inputs.js +2 -2
- package/lib/retail/inputs.js.map +1 -1
- package/lib/retail/model/LeadFormState.d.ts +1 -1
- package/lib/retail/model/NameFieldDef.d.ts +1 -1
- package/lib/retail/utils/getMainFormStateMap.js +1 -6
- package/lib/retail/utils/getMainFormStateMap.js.map +1 -1
- package/lib/retail/utils/getOrganizationParams.d.ts +6 -0
- package/lib/retail/utils/getOrganizationParams.js +6 -0
- package/lib/retail/utils/getOrganizationParams.js.map +1 -1
- package/lib/retail/utils/updateOrganizationFields.js +2 -0
- package/lib/retail/utils/updateOrganizationFields.js.map +1 -1
- package/lib/retail/validator/getRetailFormValidator.js +3 -1
- package/lib/retail/validator/getRetailFormValidator.js.map +1 -1
- package/lib/retail/validator/validators.d.ts +2 -0
- package/lib/retail/validator/validators.js +3 -0
- package/lib/retail/validator/validators.js.map +1 -1
- package/lib/ui-kit/DatePicker/DatePickerInput.js +1 -1
- package/lib/ui-kit/DatePicker/DatePickerInput.js.map +1 -1
- package/lib/ui-kit/FormField/validators.d.ts +1 -0
- package/lib/ui-kit/FormField/validators.js +1 -1
- package/lib/ui-kit/FormField/validators.js.map +1 -1
- package/lib/ui-kit/TabsControl/TabItemInner.js +1 -1
- package/lib/ui-kit/TabsControl/TabItemInner.js.map +1 -1
- package/lib/utils/isIFrame.d.ts +1 -0
- package/lib/utils/isIFrame.js +2 -0
- package/lib/utils/isIFrame.js.map +1 -0
- package/mobile/bundle/bundle.umd.js +444 -371
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/retail/api/getDictionaries.d.ts +2 -0
- package/mobile/bundle/retail/components/Fields/BankEmployeeCodeField.d.ts +3 -1
- package/mobile/bundle/retail/hooks/useIFrameMode.d.ts +4 -0
- package/mobile/bundle/retail/model/LeadFormState.d.ts +1 -1
- package/mobile/bundle/retail/model/NameFieldDef.d.ts +1 -1
- package/mobile/bundle/retail/utils/getOrganizationParams.d.ts +6 -0
- package/mobile/bundle/retail/validator/validators.d.ts +2 -0
- package/mobile/bundle/ui-kit/FormField/validators.d.ts +1 -0
- package/mobile/bundle/utils/isIFrame.d.ts +1 -0
- package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +2 -0
- package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/EsiaLoginBanner.js +8 -3
- package/mobile/dist/components/ApplicationLeadForm/EsiaLoginBanner.js.map +1 -1
- package/mobile/dist/components/ContentPage/ContentPage.js +5 -2
- package/mobile/dist/components/ContentPage/ContentPage.js.map +1 -1
- package/mobile/dist/components/CreditCardForm/CreditCardFormStep.js +2 -0
- package/mobile/dist/components/CreditCardForm/CreditCardFormStep.js.map +1 -1
- package/mobile/dist/components/CreditCardForm/creditCardFormStepsData.js +21 -18
- package/mobile/dist/components/CreditCardForm/creditCardFormStepsData.js.map +1 -1
- package/mobile/dist/components/CreditCardForm/formStateMap.js +6 -0
- package/mobile/dist/components/CreditCardForm/formStateMap.js.map +1 -1
- package/mobile/dist/components/CreditForm/CreditFormStep.js +2 -0
- package/mobile/dist/components/CreditForm/CreditFormStep.js.map +1 -1
- package/mobile/dist/components/CreditForm/creditFormStepsData.js +14 -17
- package/mobile/dist/components/CreditForm/creditFormStepsData.js.map +1 -1
- package/mobile/dist/components/DebitForm/DebitFormStep.js +2 -0
- package/mobile/dist/components/DebitForm/DebitFormStep.js.map +1 -1
- package/mobile/dist/retail/adaptors/getPersonalInfoData.js +1 -9
- package/mobile/dist/retail/adaptors/getPersonalInfoData.js.map +1 -1
- package/mobile/dist/retail/api/getDictionaries.d.ts +2 -0
- package/mobile/dist/retail/api/getDictionaries.js +13 -0
- package/mobile/dist/retail/api/getDictionaries.js.map +1 -0
- package/mobile/dist/retail/components/DraftDialog/parseDraftTask.js +1 -0
- package/mobile/dist/retail/components/DraftDialog/parseDraftTask.js.map +1 -1
- package/mobile/dist/retail/components/Fields/AmountWorkersField.js +0 -8
- package/mobile/dist/retail/components/Fields/AmountWorkersField.js.map +1 -1
- package/mobile/dist/retail/components/Fields/BankEmployeeCodeField.d.ts +3 -1
- package/mobile/dist/retail/components/Fields/BankEmployeeCodeField.js +17 -2
- package/mobile/dist/retail/components/Fields/BankEmployeeCodeField.js.map +1 -1
- package/mobile/dist/retail/components/Fields/DaDataInnField.js +21 -8
- package/mobile/dist/retail/components/Fields/DaDataInnField.js.map +1 -1
- package/mobile/dist/retail/components/Fields/EmployerActivitiesField.js +0 -8
- package/mobile/dist/retail/components/Fields/EmployerActivitiesField.js.map +1 -1
- package/mobile/dist/retail/components/Fields/EmployerOrganizationField.js +0 -8
- package/mobile/dist/retail/components/Fields/EmployerOrganizationField.js.map +1 -1
- package/mobile/dist/retail/components/Fields/OrganizationField.js +0 -8
- package/mobile/dist/retail/components/Fields/OrganizationField.js.map +1 -1
- package/mobile/dist/retail/components/Fields/OrganizationNameField.js +12 -2
- package/mobile/dist/retail/components/Fields/OrganizationNameField.js.map +1 -1
- package/mobile/dist/retail/content.js +4 -11
- package/mobile/dist/retail/content.js.map +1 -1
- package/mobile/dist/retail/hooks/useIFrameMode.d.ts +4 -0
- package/mobile/dist/retail/hooks/useIFrameMode.js +39 -0
- package/mobile/dist/retail/hooks/useIFrameMode.js.map +1 -0
- package/mobile/dist/retail/inputs.js +1 -1
- package/mobile/dist/retail/inputs.js.map +1 -1
- package/mobile/dist/retail/model/LeadFormState.d.ts +1 -1
- package/mobile/dist/retail/model/NameFieldDef.d.ts +1 -1
- package/mobile/dist/retail/utils/getMainFormStateMap.js +1 -6
- package/mobile/dist/retail/utils/getMainFormStateMap.js.map +1 -1
- package/mobile/dist/retail/utils/getOrganizationParams.d.ts +6 -0
- package/mobile/dist/retail/utils/getOrganizationParams.js +7 -1
- package/mobile/dist/retail/utils/getOrganizationParams.js.map +1 -1
- package/mobile/dist/retail/utils/updateOrganizationFields.js +2 -0
- package/mobile/dist/retail/utils/updateOrganizationFields.js.map +1 -1
- package/mobile/dist/retail/validator/getRetailFormValidator.js +2 -0
- package/mobile/dist/retail/validator/getRetailFormValidator.js.map +1 -1
- package/mobile/dist/retail/validator/validators.d.ts +2 -0
- package/mobile/dist/retail/validator/validators.js +6 -1
- package/mobile/dist/retail/validator/validators.js.map +1 -1
- package/mobile/dist/ui-kit/DatePicker/DatePickerInput.js +1 -1
- package/mobile/dist/ui-kit/DatePicker/DatePickerInput.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/validators.d.ts +1 -0
- package/mobile/dist/ui-kit/FormField/validators.js +4 -3
- package/mobile/dist/ui-kit/FormField/validators.js.map +1 -1
- package/mobile/dist/ui-kit/TabsControl/TabItemInner.js +1 -1
- package/mobile/dist/ui-kit/TabsControl/TabItemInner.js.map +1 -1
- package/mobile/dist/utils/isIFrame.d.ts +1 -0
- package/mobile/dist/utils/isIFrame.js +5 -0
- package/mobile/dist/utils/isIFrame.js.map +1 -0
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +2 -0
- package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/EsiaLoginBanner.js +8 -3
- package/mobile/lib/components/ApplicationLeadForm/EsiaLoginBanner.js.map +1 -1
- package/mobile/lib/components/ContentPage/ContentPage.js +5 -2
- package/mobile/lib/components/ContentPage/ContentPage.js.map +1 -1
- package/mobile/lib/components/CreditCardForm/CreditCardFormStep.js +2 -0
- package/mobile/lib/components/CreditCardForm/CreditCardFormStep.js.map +1 -1
- package/mobile/lib/components/CreditCardForm/creditCardFormStepsData.js +21 -18
- package/mobile/lib/components/CreditCardForm/creditCardFormStepsData.js.map +1 -1
- package/mobile/lib/components/CreditCardForm/formStateMap.js +6 -0
- package/mobile/lib/components/CreditCardForm/formStateMap.js.map +1 -1
- package/mobile/lib/components/CreditForm/CreditFormStep.js +2 -0
- package/mobile/lib/components/CreditForm/CreditFormStep.js.map +1 -1
- package/mobile/lib/components/CreditForm/creditFormStepsData.js +14 -17
- package/mobile/lib/components/CreditForm/creditFormStepsData.js.map +1 -1
- package/mobile/lib/components/DebitForm/DebitFormStep.js +2 -0
- package/mobile/lib/components/DebitForm/DebitFormStep.js.map +1 -1
- package/mobile/lib/retail/adaptors/getPersonalInfoData.js +2 -10
- package/mobile/lib/retail/adaptors/getPersonalInfoData.js.map +1 -1
- package/mobile/lib/retail/api/getDictionaries.d.ts +2 -0
- package/mobile/lib/retail/api/getDictionaries.js +10 -0
- package/mobile/lib/retail/api/getDictionaries.js.map +1 -0
- package/mobile/lib/retail/components/DraftDialog/parseDraftTask.js +1 -0
- package/mobile/lib/retail/components/DraftDialog/parseDraftTask.js.map +1 -1
- package/mobile/lib/retail/components/Fields/AmountWorkersField.js +0 -8
- package/mobile/lib/retail/components/Fields/AmountWorkersField.js.map +1 -1
- package/mobile/lib/retail/components/Fields/BankEmployeeCodeField.d.ts +3 -1
- package/mobile/lib/retail/components/Fields/BankEmployeeCodeField.js +17 -2
- package/mobile/lib/retail/components/Fields/BankEmployeeCodeField.js.map +1 -1
- package/mobile/lib/retail/components/Fields/DaDataInnField.js +22 -9
- package/mobile/lib/retail/components/Fields/DaDataInnField.js.map +1 -1
- package/mobile/lib/retail/components/Fields/EmployerActivitiesField.js +0 -8
- package/mobile/lib/retail/components/Fields/EmployerActivitiesField.js.map +1 -1
- package/mobile/lib/retail/components/Fields/EmployerOrganizationField.js +0 -8
- package/mobile/lib/retail/components/Fields/EmployerOrganizationField.js.map +1 -1
- package/mobile/lib/retail/components/Fields/OrganizationField.js +0 -8
- package/mobile/lib/retail/components/Fields/OrganizationField.js.map +1 -1
- package/mobile/lib/retail/components/Fields/OrganizationNameField.js +13 -3
- package/mobile/lib/retail/components/Fields/OrganizationNameField.js.map +1 -1
- package/mobile/lib/retail/content.js +4 -11
- package/mobile/lib/retail/content.js.map +1 -1
- package/mobile/lib/retail/hooks/useIFrameMode.d.ts +4 -0
- package/mobile/lib/retail/hooks/useIFrameMode.js +36 -0
- package/mobile/lib/retail/hooks/useIFrameMode.js.map +1 -0
- package/mobile/lib/retail/inputs.js +2 -2
- package/mobile/lib/retail/inputs.js.map +1 -1
- package/mobile/lib/retail/model/LeadFormState.d.ts +1 -1
- package/mobile/lib/retail/model/NameFieldDef.d.ts +1 -1
- package/mobile/lib/retail/utils/getMainFormStateMap.js +1 -6
- package/mobile/lib/retail/utils/getMainFormStateMap.js.map +1 -1
- package/mobile/lib/retail/utils/getOrganizationParams.d.ts +6 -0
- package/mobile/lib/retail/utils/getOrganizationParams.js +6 -0
- package/mobile/lib/retail/utils/getOrganizationParams.js.map +1 -1
- package/mobile/lib/retail/utils/updateOrganizationFields.js +2 -0
- package/mobile/lib/retail/utils/updateOrganizationFields.js.map +1 -1
- package/mobile/lib/retail/validator/getRetailFormValidator.js +3 -1
- package/mobile/lib/retail/validator/getRetailFormValidator.js.map +1 -1
- package/mobile/lib/retail/validator/validators.d.ts +2 -0
- package/mobile/lib/retail/validator/validators.js +3 -0
- package/mobile/lib/retail/validator/validators.js.map +1 -1
- package/mobile/lib/ui-kit/DatePicker/DatePickerInput.js +1 -1
- package/mobile/lib/ui-kit/DatePicker/DatePickerInput.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/validators.d.ts +1 -0
- package/mobile/lib/ui-kit/FormField/validators.js +1 -1
- package/mobile/lib/ui-kit/FormField/validators.js.map +1 -1
- package/mobile/lib/ui-kit/TabsControl/TabItemInner.js +1 -1
- package/mobile/lib/ui-kit/TabsControl/TabItemInner.js.map +1 -1
- package/mobile/lib/utils/isIFrame.d.ts +1 -0
- package/mobile/lib/utils/isIFrame.js +2 -0
- package/mobile/lib/utils/isIFrame.js.map +1 -0
- package/mobile/src/common.css +3 -0
- package/mobile/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +2 -1
- package/mobile/src/components/ApplicationLeadForm/EsiaLoginBanner.tsx +9 -4
- package/mobile/src/components/ContentPage/ContentPage.tsx +6 -4
- package/mobile/src/components/CreditCardForm/CreditCardFormStep.tsx +2 -0
- package/mobile/src/components/CreditCardForm/creditCardFormStepsData.tsx +21 -18
- package/mobile/src/components/CreditCardForm/formStateMap.tsx +6 -0
- package/mobile/src/components/CreditForm/CreditFormStep.tsx +2 -0
- package/mobile/src/components/CreditForm/creditFormStepsData.tsx +14 -17
- package/mobile/src/components/DebitForm/DebitFormStep.tsx +2 -0
- package/mobile/src/retail/adaptors/getPersonalInfoData.tsx +1 -14
- package/mobile/src/retail/api/getDictionaries.ts +21 -0
- package/mobile/src/retail/components/DraftDialog/parseDraftTask.ts +1 -0
- package/mobile/src/retail/components/Fields/AmountWorkersField.tsx +0 -10
- package/mobile/src/retail/components/Fields/BankEmployeeCodeField.tsx +41 -9
- package/mobile/src/retail/components/Fields/DaDataInnField.tsx +28 -10
- package/mobile/src/retail/components/Fields/EmployerActivitiesField.tsx +0 -10
- package/mobile/src/retail/components/Fields/EmployerOrganizationField.tsx +0 -10
- package/mobile/src/retail/components/Fields/OrganizationField.tsx +0 -10
- package/mobile/src/retail/components/Fields/OrganizationNameField.tsx +17 -2
- package/mobile/src/retail/content.tsx +4 -11
- package/mobile/src/retail/hooks/useIFrameMode.ts +45 -0
- package/mobile/src/retail/inputs.tsx +2 -2
- package/mobile/src/retail/model/LeadFormState.ts +1 -1
- package/mobile/src/retail/model/NameFieldDef.ts +1 -0
- package/mobile/src/retail/utils/getMainFormStateMap.ts +1 -6
- package/mobile/src/retail/utils/getOrganizationParams.ts +7 -0
- package/mobile/src/retail/utils/updateOrganizationFields.ts +2 -0
- package/mobile/src/retail/validator/getRetailFormValidator.ts +4 -0
- package/mobile/src/retail/validator/validators.ts +9 -0
- package/mobile/src/ui-kit/DatePicker/DatePickerInput.tsx +1 -1
- package/mobile/src/ui-kit/FormField/validators.ts +1 -1
- package/mobile/src/ui-kit/TabsControl/TabItemInner.tsx +1 -0
- package/mobile/src/utils/isIFrame.ts +1 -0
- package/package.json +1 -1
- package/src/common.css +3 -0
- package/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +2 -1
- package/src/components/ApplicationLeadForm/EsiaLoginBanner.tsx +9 -4
- package/src/components/ContentPage/ContentPage.tsx +6 -4
- package/src/components/CreditCardForm/CreditCardFormStep.tsx +2 -0
- package/src/components/CreditCardForm/creditCardFormStepsData.tsx +21 -18
- package/src/components/CreditCardForm/formStateMap.tsx +6 -0
- package/src/components/CreditForm/CreditFormStep.tsx +2 -0
- package/src/components/CreditForm/creditFormStepsData.tsx +14 -17
- package/src/components/DebitForm/DebitFormStep.tsx +2 -0
- package/src/retail/adaptors/getPersonalInfoData.tsx +1 -14
- package/src/retail/api/getDictionaries.ts +21 -0
- package/src/retail/components/DraftDialog/parseDraftTask.ts +1 -0
- package/src/retail/components/Fields/AmountWorkersField.tsx +0 -10
- package/src/retail/components/Fields/BankEmployeeCodeField.tsx +41 -9
- package/src/retail/components/Fields/DaDataInnField.tsx +28 -10
- package/src/retail/components/Fields/EmployerActivitiesField.tsx +0 -10
- package/src/retail/components/Fields/EmployerOrganizationField.tsx +0 -10
- package/src/retail/components/Fields/OrganizationField.tsx +0 -10
- package/src/retail/components/Fields/OrganizationNameField.tsx +17 -2
- package/src/retail/content.tsx +4 -11
- package/src/retail/hooks/useIFrameMode.ts +45 -0
- package/src/retail/inputs.tsx +2 -2
- package/src/retail/model/LeadFormState.ts +1 -1
- package/src/retail/model/NameFieldDef.ts +1 -0
- package/src/retail/utils/getMainFormStateMap.ts +1 -6
- package/src/retail/utils/getOrganizationParams.ts +7 -0
- package/src/retail/utils/updateOrganizationFields.ts +2 -0
- package/src/retail/validator/getRetailFormValidator.ts +4 -0
- package/src/retail/validator/validators.ts +9 -0
- package/src/ui-kit/DatePicker/DatePickerInput.tsx +1 -1
- package/src/ui-kit/FormField/validators.ts +1 -1
- package/src/ui-kit/TabsControl/TabItemInner.tsx +1 -0
- package/src/utils/isIFrame.ts +1 -0
- package/tailwind.config.cjs +3 -0
|
@@ -1890,7 +1890,7 @@
|
|
|
1890
1890
|
useEffect(() => {
|
|
1891
1891
|
updateSelectedDate({ inputValue, setSelectedMonth, setSelectedYear, onChange });
|
|
1892
1892
|
}, [inputValue]);
|
|
1893
|
-
return (jsxs("div", { onClick: onInputClick, className: style('relative', className), children: [jsx("input", { ref: ref, className: "h-full w-full px-m text-l text-black focus-visible:outline-none", value: inputValue, type: "text", onChange: handleChange, onBlur: onBlur, disabled: disabled }), disabled ? null : jsx(Icon, { className: "mr-s", ...ICON_PROPS$1 })] }));
|
|
1893
|
+
return (jsxs("div", { onClick: onInputClick, className: style('relative', className), children: [jsx("input", { ref: ref, className: "h-full w-full px-m text-l text-black focus-visible:outline-none rounded-none", value: inputValue, type: "text", onChange: handleChange, onBlur: onBlur, disabled: disabled }), disabled ? null : jsx(Icon, { className: "mr-s", ...ICON_PROPS$1 })] }));
|
|
1894
1894
|
});
|
|
1895
1895
|
const isValidYear = (year) => Number(year) >= START_YEAR && Number(year) <= new Date().getFullYear();
|
|
1896
1896
|
const isValidMonth = (month) => Number(month) > 0 && Number(month) < 13;
|
|
@@ -2986,6 +2986,256 @@
|
|
|
2986
2986
|
return (jsx(Dialog, { onClose: handleClose, children: jsxs("div", { className: "flex flex-col gap-xl items-center", children: [jsx(Paragraph, { align: "text-center", children: "\u0423\u0432\u0430\u0436\u0430\u0435\u043C\u044B\u0439 \u043A\u043B\u0438\u0435\u043D\u0442!" }), jsx(Paragraph, { align: "text-center", children: "\u0414\u043B\u044F \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u0438\u044F \u043A\u0440\u0435\u0434\u0438\u0442\u0430 \u0412\u0430\u043C \u043D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u043E \u043E\u0431\u0440\u0430\u0442\u0438\u0442\u044C\u0441\u044F \u0432 \u043E\u0444\u0438\u0441 \u0411\u0430\u043D\u043A\u0430" }), jsxs("div", { className: "flex flex-col sm:flex-row gap-xl items-center", children: [jsx(Button, { type: "button", version: "secondary", onClick: returnToMainPage, children: "\u0417\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u044C" }), isMaxAttempts ? null : (jsx(Button, { type: "button", onClick: onClose, children: "\u041F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u0442\u044C" }))] })] }) }));
|
|
2987
2987
|
});
|
|
2988
2988
|
|
|
2989
|
+
function copy(source, target) {
|
|
2990
|
+
for (const [k, v] of source.entries()) {
|
|
2991
|
+
if (v !== null && v !== undefined) {
|
|
2992
|
+
target.setItem(k, v);
|
|
2993
|
+
}
|
|
2994
|
+
else {
|
|
2995
|
+
target.removeItem(k);
|
|
2996
|
+
}
|
|
2997
|
+
}
|
|
2998
|
+
}
|
|
2999
|
+
|
|
3000
|
+
function replicate(primary, secondary) {
|
|
3001
|
+
copy(primary, secondary);
|
|
3002
|
+
copy(secondary, primary);
|
|
3003
|
+
return primary.bus.watch(({ type, event }) => {
|
|
3004
|
+
if (event !== null && event !== undefined) {
|
|
3005
|
+
secondary.setItem(type, event);
|
|
3006
|
+
}
|
|
3007
|
+
else {
|
|
3008
|
+
secondary.removeItem(type);
|
|
3009
|
+
}
|
|
3010
|
+
});
|
|
3011
|
+
}
|
|
3012
|
+
|
|
3013
|
+
class StorageAdapter {
|
|
3014
|
+
storage;
|
|
3015
|
+
bus;
|
|
3016
|
+
get size() {
|
|
3017
|
+
return this.storage?.length ?? 0;
|
|
3018
|
+
}
|
|
3019
|
+
constructor(storage, bus = new EventBus()) {
|
|
3020
|
+
this.storage = storage;
|
|
3021
|
+
this.bus = bus;
|
|
3022
|
+
}
|
|
3023
|
+
hasItem(key) {
|
|
3024
|
+
return Boolean(this.storage?.getItem(String(key)));
|
|
3025
|
+
}
|
|
3026
|
+
getItem(key) {
|
|
3027
|
+
const _ = this.storage?.getItem(String(key)) ?? null;
|
|
3028
|
+
try {
|
|
3029
|
+
return JSON.parse(String(_));
|
|
3030
|
+
}
|
|
3031
|
+
catch (ex) {
|
|
3032
|
+
return null;
|
|
3033
|
+
}
|
|
3034
|
+
}
|
|
3035
|
+
entries() {
|
|
3036
|
+
return Array.from({ length: this.size }, (_, i) => {
|
|
3037
|
+
const k = String(this.storage?.key(i));
|
|
3038
|
+
return [k, this.getItem(k)];
|
|
3039
|
+
});
|
|
3040
|
+
}
|
|
3041
|
+
setItem(key, value) {
|
|
3042
|
+
if (value !== null) {
|
|
3043
|
+
this.storage?.setItem(String(key), JSON.stringify(value));
|
|
3044
|
+
}
|
|
3045
|
+
else {
|
|
3046
|
+
this.storage?.removeItem(String(key));
|
|
3047
|
+
}
|
|
3048
|
+
this.bus?.subject(key, value);
|
|
3049
|
+
}
|
|
3050
|
+
removeItem(key) {
|
|
3051
|
+
this.storage?.removeItem(String(key));
|
|
3052
|
+
this.bus?.subject(key, null);
|
|
3053
|
+
}
|
|
3054
|
+
}
|
|
3055
|
+
|
|
3056
|
+
class Store {
|
|
3057
|
+
bus;
|
|
3058
|
+
store = new Map();
|
|
3059
|
+
get size() {
|
|
3060
|
+
return this.store.size;
|
|
3061
|
+
}
|
|
3062
|
+
constructor(bus = new EventBus()) {
|
|
3063
|
+
this.bus = bus;
|
|
3064
|
+
}
|
|
3065
|
+
hasItem(key) {
|
|
3066
|
+
return this.store.has(key);
|
|
3067
|
+
}
|
|
3068
|
+
getItem(key) {
|
|
3069
|
+
return this.store.get(key);
|
|
3070
|
+
}
|
|
3071
|
+
entries() {
|
|
3072
|
+
return this.store.entries();
|
|
3073
|
+
}
|
|
3074
|
+
setItem(key, value) {
|
|
3075
|
+
this.store.set(key, value);
|
|
3076
|
+
this.bus.subject(key, value);
|
|
3077
|
+
}
|
|
3078
|
+
removeItem(key) {
|
|
3079
|
+
this.store.delete(key);
|
|
3080
|
+
this.bus.subject(key, null);
|
|
3081
|
+
}
|
|
3082
|
+
}
|
|
3083
|
+
|
|
3084
|
+
function useRerender() {
|
|
3085
|
+
const [, setCount] = useState(0);
|
|
3086
|
+
return useCallback(() => setCount(_ => (_ + 1) % (1 << 16)), []);
|
|
3087
|
+
}
|
|
3088
|
+
|
|
3089
|
+
const DEFAULT_METHODS = {};
|
|
3090
|
+
/**
|
|
3091
|
+
* MobX like reactivity (simplified).
|
|
3092
|
+
* Can be used to migrate from Redux/MobX or something else
|
|
3093
|
+
*
|
|
3094
|
+
* @param store
|
|
3095
|
+
* @returns reactive proxy backed by store
|
|
3096
|
+
*/
|
|
3097
|
+
function useStore(store, methods = DEFAULT_METHODS) {
|
|
3098
|
+
const deps = useRef(null);
|
|
3099
|
+
const render = useRerender();
|
|
3100
|
+
useEffect(() => store.bus.watch(ev => {
|
|
3101
|
+
if (deps.current?.has(String(ev.type))) {
|
|
3102
|
+
render();
|
|
3103
|
+
}
|
|
3104
|
+
}), [store, render]);
|
|
3105
|
+
return useMemo(() => new Proxy(methods, {
|
|
3106
|
+
get(_, key) {
|
|
3107
|
+
deps.current ||= new Set();
|
|
3108
|
+
deps.current.add(key);
|
|
3109
|
+
return store.getItem(key);
|
|
3110
|
+
},
|
|
3111
|
+
has(_, key) {
|
|
3112
|
+
deps.current ||= new Set();
|
|
3113
|
+
deps.current.add(key);
|
|
3114
|
+
return store.hasItem(key);
|
|
3115
|
+
},
|
|
3116
|
+
set(_, key, value) {
|
|
3117
|
+
store.setItem(key, value);
|
|
3118
|
+
return true;
|
|
3119
|
+
},
|
|
3120
|
+
deleteProperty(_, key) {
|
|
3121
|
+
store.removeItem(key);
|
|
3122
|
+
return true;
|
|
3123
|
+
}
|
|
3124
|
+
}), [store]);
|
|
3125
|
+
}
|
|
3126
|
+
|
|
3127
|
+
const sessionStore = new Store(); // sessionStorage cache
|
|
3128
|
+
replicate(sessionStore, new StorageAdapter(globalThis?.sessionStorage));
|
|
3129
|
+
function useSessionStore() {
|
|
3130
|
+
return useStore(sessionStore);
|
|
3131
|
+
}
|
|
3132
|
+
|
|
3133
|
+
const getNS = (_) => globalThis[_];
|
|
3134
|
+
const initializeExternalNS = (namespaceName, url, isModule = false) => {
|
|
3135
|
+
const script = globalThis.document.getElementById(url);
|
|
3136
|
+
if (script) {
|
|
3137
|
+
const ns = getNS(namespaceName);
|
|
3138
|
+
if (ns) {
|
|
3139
|
+
return Promise.resolve(ns);
|
|
3140
|
+
}
|
|
3141
|
+
else {
|
|
3142
|
+
return new Promise((resolve) => {
|
|
3143
|
+
script.addEventListener('load', () => {
|
|
3144
|
+
resolve(getNS(namespaceName));
|
|
3145
|
+
});
|
|
3146
|
+
});
|
|
3147
|
+
}
|
|
3148
|
+
}
|
|
3149
|
+
else {
|
|
3150
|
+
return new Promise((resolve, reject) => {
|
|
3151
|
+
const newScript = globalThis.document.createElement('script');
|
|
3152
|
+
newScript.src = url;
|
|
3153
|
+
newScript.async = true;
|
|
3154
|
+
newScript.id = url;
|
|
3155
|
+
if (isModule) {
|
|
3156
|
+
newScript.type = 'module';
|
|
3157
|
+
}
|
|
3158
|
+
newScript.addEventListener('load', () => {
|
|
3159
|
+
resolve(getNS(namespaceName));
|
|
3160
|
+
});
|
|
3161
|
+
newScript.addEventListener('error', (error) => {
|
|
3162
|
+
reject(error);
|
|
3163
|
+
});
|
|
3164
|
+
globalThis.document.head.appendChild(newScript);
|
|
3165
|
+
});
|
|
3166
|
+
}
|
|
3167
|
+
};
|
|
3168
|
+
const initializeExternalStylesheet = (url = '') => {
|
|
3169
|
+
const link = globalThis.document.getElementById(url);
|
|
3170
|
+
if (!link) {
|
|
3171
|
+
const newLink = globalThis.document.createElement('link');
|
|
3172
|
+
newLink.href = url;
|
|
3173
|
+
newLink.id = url;
|
|
3174
|
+
newLink.rel = 'stylesheet';
|
|
3175
|
+
globalThis.document.head.appendChild(newLink);
|
|
3176
|
+
}
|
|
3177
|
+
};
|
|
3178
|
+
function useExternalNS(namespaceName, url, unmountNS = true) {
|
|
3179
|
+
const [externalNS, setExternalNS] = useState(undefined);
|
|
3180
|
+
useEffect(() => {
|
|
3181
|
+
let isMounted = true;
|
|
3182
|
+
initializeExternalNS(namespaceName, url)
|
|
3183
|
+
.then((ns) => {
|
|
3184
|
+
if (isMounted) {
|
|
3185
|
+
setExternalNS(ns);
|
|
3186
|
+
}
|
|
3187
|
+
})
|
|
3188
|
+
.catch((error) => {
|
|
3189
|
+
console.error(`Failed to initialize external namespace: ${error}`);
|
|
3190
|
+
});
|
|
3191
|
+
return () => {
|
|
3192
|
+
isMounted = false;
|
|
3193
|
+
if (unmountNS) {
|
|
3194
|
+
const script = globalThis.document.getElementById(url);
|
|
3195
|
+
if (script) {
|
|
3196
|
+
globalThis.document.head.removeChild(script);
|
|
3197
|
+
}
|
|
3198
|
+
setExternalNS(undefined);
|
|
3199
|
+
}
|
|
3200
|
+
};
|
|
3201
|
+
}, [namespaceName, url, unmountNS]);
|
|
3202
|
+
return externalNS;
|
|
3203
|
+
}
|
|
3204
|
+
|
|
3205
|
+
const isIFrame = () => globalThis.location !== globalThis?.top?.location;
|
|
3206
|
+
|
|
3207
|
+
const useIFrameMode = () => {
|
|
3208
|
+
const isFrame = isIFrame();
|
|
3209
|
+
const height = globalThis.document?.body?.scrollHeight;
|
|
3210
|
+
const sessionStore = useSessionStore();
|
|
3211
|
+
const params = new URLSearchParams(decodeURIComponent(globalThis.location?.search));
|
|
3212
|
+
const styles = params.get('styles');
|
|
3213
|
+
if (styles) {
|
|
3214
|
+
initializeExternalStylesheet(styles);
|
|
3215
|
+
}
|
|
3216
|
+
useEffect(() => {
|
|
3217
|
+
if (isFrame) {
|
|
3218
|
+
globalThis.parent.postMessage({ height: document.body.scrollHeight }, '*');
|
|
3219
|
+
}
|
|
3220
|
+
}, [height, isFrame]);
|
|
3221
|
+
useEffect(() => {
|
|
3222
|
+
const handlePostMessage = (event) => {
|
|
3223
|
+
if (!event.data?.location) {
|
|
3224
|
+
return;
|
|
3225
|
+
}
|
|
3226
|
+
sessionStore.frameLocation = event.data?.location;
|
|
3227
|
+
};
|
|
3228
|
+
if (isFrame) {
|
|
3229
|
+
globalThis.addEventListener('message', handlePostMessage);
|
|
3230
|
+
}
|
|
3231
|
+
return () => {
|
|
3232
|
+
if (isFrame) {
|
|
3233
|
+
globalThis.removeEventListener('message', handlePostMessage);
|
|
3234
|
+
}
|
|
3235
|
+
};
|
|
3236
|
+
}, [isFrame]);
|
|
3237
|
+
};
|
|
3238
|
+
|
|
2989
3239
|
const ERROR_MESSAGE = 'Некорректно заполненное поле';
|
|
2990
3240
|
const ADDRESS_ERROR_MESSAGE = 'Укажите регион, город/населенный пункт, улицу, дом';
|
|
2991
3241
|
const retailCyrillicPattern = /^[\u0400-\u04FF-\s]+$/u;
|
|
@@ -3048,6 +3298,8 @@
|
|
|
3048
3298
|
}
|
|
3049
3299
|
return false;
|
|
3050
3300
|
});
|
|
3301
|
+
const organizationNameValidator = (isDadataOrganization) => validator((_) => Boolean(_) && Boolean(isDadataOrganization))('Укажите наименование организации');
|
|
3302
|
+
const organizationInnValidator = (isDadataOrganization) => validator((_) => isValidInnLength(_) && Boolean(isDadataOrganization))('Укажите ИНН');
|
|
3051
3303
|
|
|
3052
3304
|
const limitedBirthdayValidationData = {
|
|
3053
3305
|
credit: {
|
|
@@ -3283,19 +3535,23 @@
|
|
|
3283
3535
|
|
|
3284
3536
|
const EsiaLoginBanner = JSX(({ onChangeEsiaStatus, productType }) => {
|
|
3285
3537
|
const navigator = locationNavigator();
|
|
3538
|
+
const sessionStore = useSessionStore();
|
|
3539
|
+
const frameLocation = sessionStore.frameLocation;
|
|
3286
3540
|
const handleAuth = useCallback(async () => {
|
|
3287
3541
|
try {
|
|
3288
3542
|
const resp = await getLink({
|
|
3289
|
-
redirectUri: globalThis.location.origin + globalThis.location.pathname,
|
|
3543
|
+
redirectUri: frameLocation || globalThis.location.origin + globalThis.location.pathname,
|
|
3290
3544
|
});
|
|
3291
3545
|
if (resp?.link) {
|
|
3292
|
-
|
|
3546
|
+
frameLocation
|
|
3547
|
+
? window.parent.postMessage({ redirectUri: resp?.link }, '*')
|
|
3548
|
+
: navigator.assign(resp.link);
|
|
3293
3549
|
}
|
|
3294
3550
|
}
|
|
3295
3551
|
catch {
|
|
3296
3552
|
onChangeEsiaStatus(EsiaStatuses.Error);
|
|
3297
3553
|
}
|
|
3298
|
-
}, []);
|
|
3554
|
+
}, [frameLocation]);
|
|
3299
3555
|
return (jsxs("div", { className: "flex items-center rounded-md bg-main-gray p-4xl", children: [jsxs("div", { className: "flex gap-m flex-col justify-around w-full", children: [jsx("p", { className: "text-xl", children: `Заполните данные через Госуслуги${productType === 'debitCard' ? ' - это значительно сократит время оформления заявки' : ''}` }), productType === 'debitCard' ? null : (jsxs("ul", { className: "list-disc list-inside", children: [jsx("li", { children: "\u0412\u0435\u0440\u043E\u044F\u0442\u043D\u043E\u0441\u0442\u044C \u043E\u0434\u043E\u0431\u0440\u0435\u043D\u0438\u044F \u0432\u044B\u0448\u0435" }), jsx("li", { children: "\u0411\u0435\u0437 \u0441\u043F\u0440\u0430\u0432\u043E\u043A \u043E \u0434\u043E\u0445\u043E\u0434\u0430\u0445 \u0438 \u0442\u0440\u0443\u0434\u043E\u0443\u0441\u0442\u0440\u043E\u0439\u0441\u0442\u0432\u0435" }), jsx("li", { children: "\u0421 \u0437\u0430\u0449\u0438\u0442\u043E\u0439 \u0412\u0430\u0448\u0438\u0445 \u0434\u0430\u043D\u043D\u044B\u0445" })] })), jsx(Img, { className: "block self-center @md:hidden", image: { icon: 'GosUslugiIcon', iconVersion: 'normal' }, height: "80", width: "80" }), jsx(Button, { type: "button", onClick: handleAuth, className: "w-full @md:w-fit", children: "\u0417\u0430\u043F\u043E\u043B\u043D\u0438\u0442\u044C" })] }), jsx(Img, { className: "hidden @md:block", image: { icon: 'GosUslugiIcon', iconVersion: 'normal' }, height: "164" })] }));
|
|
3300
3556
|
});
|
|
3301
3557
|
|
|
@@ -4061,68 +4317,6 @@
|
|
|
4061
4317
|
return (jsx("div", { className: `select-none cursor-pointer py-m w-12 bg-white ${Object.values(styles$1).join(' ')} ${className}`, onClick: setUserGeoLocation, children: jsx(Icon, { name: "UserGeoLocationIcon", width: "20", height: "16" }) }));
|
|
4062
4318
|
};
|
|
4063
4319
|
|
|
4064
|
-
const getNS = (_) => globalThis[_];
|
|
4065
|
-
const initializeExternalNS = (namespaceName, url, isModule = false) => {
|
|
4066
|
-
const script = globalThis.document.getElementById(url);
|
|
4067
|
-
if (script) {
|
|
4068
|
-
const ns = getNS(namespaceName);
|
|
4069
|
-
if (ns) {
|
|
4070
|
-
return Promise.resolve(ns);
|
|
4071
|
-
}
|
|
4072
|
-
else {
|
|
4073
|
-
return new Promise((resolve) => {
|
|
4074
|
-
script.addEventListener('load', () => {
|
|
4075
|
-
resolve(getNS(namespaceName));
|
|
4076
|
-
});
|
|
4077
|
-
});
|
|
4078
|
-
}
|
|
4079
|
-
}
|
|
4080
|
-
else {
|
|
4081
|
-
return new Promise((resolve, reject) => {
|
|
4082
|
-
const newScript = globalThis.document.createElement('script');
|
|
4083
|
-
newScript.src = url;
|
|
4084
|
-
newScript.async = true;
|
|
4085
|
-
newScript.id = url;
|
|
4086
|
-
if (isModule) {
|
|
4087
|
-
newScript.type = 'module';
|
|
4088
|
-
}
|
|
4089
|
-
newScript.addEventListener('load', () => {
|
|
4090
|
-
resolve(getNS(namespaceName));
|
|
4091
|
-
});
|
|
4092
|
-
newScript.addEventListener('error', (error) => {
|
|
4093
|
-
reject(error);
|
|
4094
|
-
});
|
|
4095
|
-
globalThis.document.head.appendChild(newScript);
|
|
4096
|
-
});
|
|
4097
|
-
}
|
|
4098
|
-
};
|
|
4099
|
-
function useExternalNS(namespaceName, url, unmountNS = true) {
|
|
4100
|
-
const [externalNS, setExternalNS] = useState(undefined);
|
|
4101
|
-
useEffect(() => {
|
|
4102
|
-
let isMounted = true;
|
|
4103
|
-
initializeExternalNS(namespaceName, url)
|
|
4104
|
-
.then((ns) => {
|
|
4105
|
-
if (isMounted) {
|
|
4106
|
-
setExternalNS(ns);
|
|
4107
|
-
}
|
|
4108
|
-
})
|
|
4109
|
-
.catch((error) => {
|
|
4110
|
-
console.error(`Failed to initialize external namespace: ${error}`);
|
|
4111
|
-
});
|
|
4112
|
-
return () => {
|
|
4113
|
-
isMounted = false;
|
|
4114
|
-
if (unmountNS) {
|
|
4115
|
-
const script = globalThis.document.getElementById(url);
|
|
4116
|
-
if (script) {
|
|
4117
|
-
globalThis.document.head.removeChild(script);
|
|
4118
|
-
}
|
|
4119
|
-
setExternalNS(undefined);
|
|
4120
|
-
}
|
|
4121
|
-
};
|
|
4122
|
-
}, [namespaceName, url, unmountNS]);
|
|
4123
|
-
return externalNS;
|
|
4124
|
-
}
|
|
4125
|
-
|
|
4126
4320
|
const YMAPS_NAMESPACE = 'ymaps';
|
|
4127
4321
|
const useYandexMaps = () => {
|
|
4128
4322
|
const url = `https://api-maps.yandex.ru/2.1/?apikey=${projectSettings.YANDEX_MAP_API_KEY || ''}&lang=ru_RU`;
|
|
@@ -4191,206 +4385,68 @@
|
|
|
4191
4385
|
return (jsxs("div", { ref: parentDiv, className: style('relative', 'w-full', className), children: [isLoad ? jsx(Loader, {}) : null, jsxs("div", { className: style('absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md', zIndex), children: [jsx(ZoomButton, { yandexMaps: map }), jsx(ZoomButton, { yandexMaps: map, direction: "out" })] }), renderUserGeolocation(map, yandexMaps, style('right-2 top-80', zIndex))] }));
|
|
4192
4386
|
});
|
|
4193
4387
|
const getCenterPoint = (points) => {
|
|
4194
|
-
const centerCoords = [
|
|
4195
|
-
getArraySumAndAverage(mapByIndex(points, 0)),
|
|
4196
|
-
getArraySumAndAverage(mapByIndex(points, 1)),
|
|
4197
|
-
];
|
|
4198
|
-
return centerCoords.every((_) => _) ? centerCoords : DEFAULT_CENTER_COORDS;
|
|
4199
|
-
};
|
|
4200
|
-
const mapByIndex = (points, index) => points.map((_) => _.coords?.[index]);
|
|
4201
|
-
const getArraySumAndAverage = (arr) => arr.length && arr.reduce((a, b) => a + b) / arr.length;
|
|
4202
|
-
|
|
4203
|
-
const fetchRegionOffices = async (regionKey) => {
|
|
4204
|
-
const response = await fetchRetailJSON('/public-data/regionOffices', 'POST', {
|
|
4205
|
-
regionRfCd: {
|
|
4206
|
-
key: regionKey,
|
|
4207
|
-
},
|
|
4208
|
-
cashCardFlg: true,
|
|
4209
|
-
});
|
|
4210
|
-
return (response?.offices?.map((office) => ({
|
|
4211
|
-
...office,
|
|
4212
|
-
gpsLatitude: formatCoordinate(office.latitude ?? DEFAULT_CENTER_COORDS[0]),
|
|
4213
|
-
gpsLongitude: formatCoordinate(office.longitude ?? DEFAULT_CENTER_COORDS[1]),
|
|
4214
|
-
})) || []);
|
|
4215
|
-
};
|
|
4216
|
-
const formatCoordinate = (coordinate) => Number(coordinate.toString().replace(',', '.'));
|
|
4217
|
-
|
|
4218
|
-
const API_BASE_URI = '/light-api-cash/v1';
|
|
4219
|
-
|
|
4220
|
-
const useLeadFormData = (typeField) => {
|
|
4221
|
-
const { data, error } = useAsyncData(`${API_BASE_URI}/dictionary?dictionaryType=${encodeURIComponent(typeField)}`, fetchData);
|
|
4222
|
-
if (data && 'errorMessage' in data) {
|
|
4223
|
-
return { error };
|
|
4224
|
-
}
|
|
4225
|
-
return { data: data, error };
|
|
4226
|
-
};
|
|
4227
|
-
const fetchData = async (url) => {
|
|
4228
|
-
const result = await fetchJSON(url, { method: 'POST' });
|
|
4229
|
-
return result || [];
|
|
4230
|
-
};
|
|
4231
|
-
|
|
4232
|
-
const AddressRetailField = JSX(({ field, input }) => {
|
|
4233
|
-
const [offices, setOffices] = useState([]);
|
|
4234
|
-
const { data } = useLeadFormData('REGION_RF');
|
|
4235
|
-
const regionValue = field('regionRetail')?.value || {};
|
|
4236
|
-
const addressField = field(input?.name ?? '');
|
|
4237
|
-
useEffect(() => {
|
|
4238
|
-
(async () => {
|
|
4239
|
-
const officesList = await fetchRegionOffices(regionValue?.key ?? '');
|
|
4240
|
-
setOffices(officesList);
|
|
4241
|
-
})();
|
|
4242
|
-
if (regionValue?.key) {
|
|
4243
|
-
addressField.onChange?.('');
|
|
4244
|
-
}
|
|
4245
|
-
}, [regionValue.key]);
|
|
4246
|
-
const { points } = useOfficesAtmsMapData({
|
|
4247
|
-
data: offices,
|
|
4248
|
-
filtrationState: {},
|
|
4249
|
-
getBalloon: getOfficePoint,
|
|
4250
|
-
});
|
|
4251
|
-
return (jsxs("div", { children: [jsx(SelectControl, { label: "\u0410\u0434\u0440\u0435\u0441 \u043E\u0442\u0434\u0435\u043B\u0435\u043D\u0438\u044F", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u043E\u0442\u0434\u0435\u043B\u0435\u043D\u0438\u0435", options: offices.map(({ id, address = '' }) => ({
|
|
4252
|
-
key: id?.toString() || '',
|
|
4253
|
-
text: address,
|
|
4254
|
-
})), ...addressField, isSearch: true }), jsx("div", { className: "h-[600px]", children: jsx(ClientOnly, { children: jsx(YandexMap, { points: points, isLoad: !data, className: "h-full", selectedAddress: addressField?.value?.text }) }) })] }));
|
|
4255
|
-
});
|
|
4256
|
-
|
|
4257
|
-
function copy(source, target) {
|
|
4258
|
-
for (const [k, v] of source.entries()) {
|
|
4259
|
-
if (v !== null && v !== undefined) {
|
|
4260
|
-
target.setItem(k, v);
|
|
4261
|
-
}
|
|
4262
|
-
else {
|
|
4263
|
-
target.removeItem(k);
|
|
4264
|
-
}
|
|
4265
|
-
}
|
|
4266
|
-
}
|
|
4267
|
-
|
|
4268
|
-
function replicate(primary, secondary) {
|
|
4269
|
-
copy(primary, secondary);
|
|
4270
|
-
copy(secondary, primary);
|
|
4271
|
-
return primary.bus.watch(({ type, event }) => {
|
|
4272
|
-
if (event !== null && event !== undefined) {
|
|
4273
|
-
secondary.setItem(type, event);
|
|
4274
|
-
}
|
|
4275
|
-
else {
|
|
4276
|
-
secondary.removeItem(type);
|
|
4277
|
-
}
|
|
4278
|
-
});
|
|
4279
|
-
}
|
|
4280
|
-
|
|
4281
|
-
class StorageAdapter {
|
|
4282
|
-
storage;
|
|
4283
|
-
bus;
|
|
4284
|
-
get size() {
|
|
4285
|
-
return this.storage?.length ?? 0;
|
|
4286
|
-
}
|
|
4287
|
-
constructor(storage, bus = new EventBus()) {
|
|
4288
|
-
this.storage = storage;
|
|
4289
|
-
this.bus = bus;
|
|
4290
|
-
}
|
|
4291
|
-
hasItem(key) {
|
|
4292
|
-
return Boolean(this.storage?.getItem(String(key)));
|
|
4293
|
-
}
|
|
4294
|
-
getItem(key) {
|
|
4295
|
-
const _ = this.storage?.getItem(String(key)) ?? null;
|
|
4296
|
-
try {
|
|
4297
|
-
return JSON.parse(String(_));
|
|
4298
|
-
}
|
|
4299
|
-
catch (ex) {
|
|
4300
|
-
return null;
|
|
4301
|
-
}
|
|
4302
|
-
}
|
|
4303
|
-
entries() {
|
|
4304
|
-
return Array.from({ length: this.size }, (_, i) => {
|
|
4305
|
-
const k = String(this.storage?.key(i));
|
|
4306
|
-
return [k, this.getItem(k)];
|
|
4307
|
-
});
|
|
4308
|
-
}
|
|
4309
|
-
setItem(key, value) {
|
|
4310
|
-
if (value !== null) {
|
|
4311
|
-
this.storage?.setItem(String(key), JSON.stringify(value));
|
|
4312
|
-
}
|
|
4313
|
-
else {
|
|
4314
|
-
this.storage?.removeItem(String(key));
|
|
4315
|
-
}
|
|
4316
|
-
this.bus?.subject(key, value);
|
|
4317
|
-
}
|
|
4318
|
-
removeItem(key) {
|
|
4319
|
-
this.storage?.removeItem(String(key));
|
|
4320
|
-
this.bus?.subject(key, null);
|
|
4321
|
-
}
|
|
4322
|
-
}
|
|
4388
|
+
const centerCoords = [
|
|
4389
|
+
getArraySumAndAverage(mapByIndex(points, 0)),
|
|
4390
|
+
getArraySumAndAverage(mapByIndex(points, 1)),
|
|
4391
|
+
];
|
|
4392
|
+
return centerCoords.every((_) => _) ? centerCoords : DEFAULT_CENTER_COORDS;
|
|
4393
|
+
};
|
|
4394
|
+
const mapByIndex = (points, index) => points.map((_) => _.coords?.[index]);
|
|
4395
|
+
const getArraySumAndAverage = (arr) => arr.length && arr.reduce((a, b) => a + b) / arr.length;
|
|
4323
4396
|
|
|
4324
|
-
|
|
4325
|
-
|
|
4326
|
-
|
|
4327
|
-
|
|
4328
|
-
|
|
4329
|
-
|
|
4330
|
-
|
|
4331
|
-
|
|
4332
|
-
|
|
4333
|
-
|
|
4334
|
-
|
|
4335
|
-
}
|
|
4336
|
-
|
|
4337
|
-
|
|
4338
|
-
}
|
|
4339
|
-
entries() {
|
|
4340
|
-
return this.store.entries();
|
|
4341
|
-
}
|
|
4342
|
-
setItem(key, value) {
|
|
4343
|
-
this.store.set(key, value);
|
|
4344
|
-
this.bus.subject(key, value);
|
|
4345
|
-
}
|
|
4346
|
-
removeItem(key) {
|
|
4347
|
-
this.store.delete(key);
|
|
4348
|
-
this.bus.subject(key, null);
|
|
4349
|
-
}
|
|
4350
|
-
}
|
|
4397
|
+
const fetchRegionOffices = async (regionKey) => {
|
|
4398
|
+
const response = await fetchRetailJSON('/public-data/regionOffices', 'POST', {
|
|
4399
|
+
regionRfCd: {
|
|
4400
|
+
key: regionKey,
|
|
4401
|
+
},
|
|
4402
|
+
cashCardFlg: true,
|
|
4403
|
+
});
|
|
4404
|
+
return (response?.offices?.map((office) => ({
|
|
4405
|
+
...office,
|
|
4406
|
+
gpsLatitude: formatCoordinate(office.latitude ?? DEFAULT_CENTER_COORDS[0]),
|
|
4407
|
+
gpsLongitude: formatCoordinate(office.longitude ?? DEFAULT_CENTER_COORDS[1]),
|
|
4408
|
+
})) || []);
|
|
4409
|
+
};
|
|
4410
|
+
const formatCoordinate = (coordinate) => Number(coordinate.toString().replace(',', '.'));
|
|
4351
4411
|
|
|
4352
|
-
|
|
4353
|
-
const [, setCount] = useState(0);
|
|
4354
|
-
return useCallback(() => setCount(_ => (_ + 1) % (1 << 16)), []);
|
|
4355
|
-
}
|
|
4412
|
+
const API_BASE_URI = '/light-api-cash/v1';
|
|
4356
4413
|
|
|
4357
|
-
const
|
|
4358
|
-
|
|
4359
|
-
|
|
4360
|
-
|
|
4361
|
-
|
|
4362
|
-
|
|
4363
|
-
|
|
4364
|
-
|
|
4365
|
-
|
|
4366
|
-
|
|
4367
|
-
|
|
4368
|
-
|
|
4369
|
-
|
|
4370
|
-
|
|
4371
|
-
|
|
4372
|
-
|
|
4373
|
-
|
|
4374
|
-
|
|
4375
|
-
|
|
4376
|
-
|
|
4377
|
-
|
|
4378
|
-
}
|
|
4379
|
-
|
|
4380
|
-
|
|
4381
|
-
|
|
4382
|
-
|
|
4383
|
-
|
|
4384
|
-
|
|
4385
|
-
|
|
4386
|
-
|
|
4387
|
-
|
|
4388
|
-
|
|
4389
|
-
|
|
4390
|
-
|
|
4391
|
-
|
|
4392
|
-
|
|
4393
|
-
}
|
|
4414
|
+
const useLeadFormData = (typeField) => {
|
|
4415
|
+
const { data, error } = useAsyncData(`${API_BASE_URI}/dictionary?dictionaryType=${encodeURIComponent(typeField)}`, fetchData);
|
|
4416
|
+
if (data && 'errorMessage' in data) {
|
|
4417
|
+
return { error };
|
|
4418
|
+
}
|
|
4419
|
+
return { data: data, error };
|
|
4420
|
+
};
|
|
4421
|
+
const fetchData = async (url) => {
|
|
4422
|
+
const result = await fetchJSON(url, { method: 'POST' });
|
|
4423
|
+
return result || [];
|
|
4424
|
+
};
|
|
4425
|
+
|
|
4426
|
+
const AddressRetailField = JSX(({ field, input }) => {
|
|
4427
|
+
const [offices, setOffices] = useState([]);
|
|
4428
|
+
const { data } = useLeadFormData('REGION_RF');
|
|
4429
|
+
const regionValue = field('regionRetail')?.value || {};
|
|
4430
|
+
const addressField = field(input?.name ?? '');
|
|
4431
|
+
useEffect(() => {
|
|
4432
|
+
(async () => {
|
|
4433
|
+
const officesList = await fetchRegionOffices(regionValue?.key ?? '');
|
|
4434
|
+
setOffices(officesList);
|
|
4435
|
+
})();
|
|
4436
|
+
if (regionValue?.key) {
|
|
4437
|
+
addressField.onChange?.('');
|
|
4438
|
+
}
|
|
4439
|
+
}, [regionValue.key]);
|
|
4440
|
+
const { points } = useOfficesAtmsMapData({
|
|
4441
|
+
data: offices,
|
|
4442
|
+
filtrationState: {},
|
|
4443
|
+
getBalloon: getOfficePoint,
|
|
4444
|
+
});
|
|
4445
|
+
return (jsxs("div", { children: [jsx(SelectControl, { label: "\u0410\u0434\u0440\u0435\u0441 \u043E\u0442\u0434\u0435\u043B\u0435\u043D\u0438\u044F", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u043E\u0442\u0434\u0435\u043B\u0435\u043D\u0438\u0435", options: offices.map(({ id, address = '' }) => ({
|
|
4446
|
+
key: id?.toString() || '',
|
|
4447
|
+
text: address,
|
|
4448
|
+
})), ...addressField, isSearch: true }), jsx("div", { className: "h-[600px]", children: jsx(ClientOnly, { children: jsx(YandexMap, { points: points, isLoad: !data, className: "h-full", selectedAddress: addressField?.value?.text }) }) })] }));
|
|
4449
|
+
});
|
|
4394
4450
|
|
|
4395
4451
|
const localStore = new Store(); // localStorage cache
|
|
4396
4452
|
replicate(localStore, new StorageAdapter(globalThis?.localStorage));
|
|
@@ -4413,19 +4469,28 @@
|
|
|
4413
4469
|
});
|
|
4414
4470
|
|
|
4415
4471
|
const AmountWorkersField = JSX(({ field, input }) => {
|
|
4416
|
-
const { data } = useLeadFormData('EMPLOYEES_NUMBER');
|
|
4417
4472
|
const store = useRetailFormStore();
|
|
4418
|
-
useEffect(() => {
|
|
4419
|
-
if (data) {
|
|
4420
|
-
store.amountWorkers = data;
|
|
4421
|
-
}
|
|
4422
|
-
}, [data]);
|
|
4423
4473
|
return (jsx(SelectField, { field: field, source: store.amountWorkers ?? [], label: "\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u0440\u0430\u0431\u043E\u0442\u0430\u044E\u0449\u0438\u0445 \u0432 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", fieldName: "amountWorkers", input: input }));
|
|
4424
4474
|
});
|
|
4425
4475
|
|
|
4426
4476
|
const ArmyIdFlgField = JSX(({ field, input }) => (jsx(CheckboxWithError, { text: "\u041D\u0430\u043B\u0438\u0447\u0438\u0435 \u0432\u043E\u0435\u043D\u043D\u043E\u0433\u043E \u0431\u0438\u043B\u0435\u0442\u0430", ...field(input?.name ?? '') })));
|
|
4427
4477
|
|
|
4428
|
-
const
|
|
4478
|
+
const RadioButtonGroupControl = JSX(({ className, label, error, ...rest }) => (jsxs("div", { className: style('shrink-0 w-full', className), children: [jsx(RadioButtonGroup, { label: getRequiredLabel({ label, errors: rest?.errors }), ...rest }), renderErrorText(error)] })));
|
|
4479
|
+
|
|
4480
|
+
const BUTTON_TYPES = [
|
|
4481
|
+
{ id: 'true', text: 'Да' },
|
|
4482
|
+
{ id: 'false', text: 'Нет' },
|
|
4483
|
+
];
|
|
4484
|
+
const BankEmployeeCodeField = JSX(({ field, input }) => {
|
|
4485
|
+
const [bankEmployeeFlg, setBankEmployeeFlg] = useState('');
|
|
4486
|
+
const handleBankEmployeeFlgChange = useCallback((value) => {
|
|
4487
|
+
setBankEmployeeFlg(value);
|
|
4488
|
+
if (value === 'false') {
|
|
4489
|
+
field('bankEmployeeCode')?.onChange?.(null);
|
|
4490
|
+
}
|
|
4491
|
+
}, []);
|
|
4492
|
+
return (jsxs("div", { className: "flex flex-col md:flex-row", children: [jsx(RadioButtonGroupControl, { label: "\u041C\u043D\u0435 \u043F\u043E\u043C\u043E\u0433 \u0441\u043E\u0442\u0440\u0443\u0434\u043D\u0438\u043A \u0411\u0430\u043D\u043A\u0430", orientation: "horizontal", items: BUTTON_TYPES, value: bankEmployeeFlg, onChange: handleBankEmployeeFlgChange }), bankEmployeeFlg === 'true' ? (jsx(DaDataInputControl, { label: "\u041A\u043E\u0434 \u043F\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u0435\u043B\u044F \u0411\u0430\u043D\u043A\u0430", placeholder: "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043A\u043E\u0434", isInteger: true, maxLength: 8, ...field(input?.name ?? ''), ...input })) : null] }));
|
|
4493
|
+
});
|
|
4429
4494
|
|
|
4430
4495
|
const BankruptcyFlgField = JSX(({ field, input }) => (jsx(CheckboxWithError, { text: "\u0412 \u043E\u0442\u043D\u043E\u0448\u0435\u043D\u0438\u0438 \u043C\u0435\u043D\u044F \u0432\u0435\u0434\u0451\u0442\u0441\u044F \u043F\u0440\u043E\u0438\u0437\u0432\u043E\u0434\u0441\u0442\u0432\u043E \u043F\u043E \u0434\u0435\u043B\u0443 \u043E \u0431\u0430\u043D\u043A\u0440\u043E\u0442\u0441\u0442\u0432\u0435", ...field(input?.name ?? '') })));
|
|
4431
4496
|
|
|
@@ -4890,8 +4955,6 @@
|
|
|
4890
4955
|
47: 'owner_debit_card_pens_plus',
|
|
4891
4956
|
};
|
|
4892
4957
|
|
|
4893
|
-
const RadioButtonGroupControl = JSX(({ className, label, error, ...rest }) => (jsxs("div", { className: style('shrink-0 w-full', className), children: [jsx(RadioButtonGroup, { label: getRequiredLabel({ label, errors: rest?.errors }), ...rest }), renderErrorText(error)] })));
|
|
4894
|
-
|
|
4895
4958
|
const RUBLE = [{ id: '810', text: 'Рубли' }];
|
|
4896
4959
|
const CurrencyField = JSX(({ field, input }) => {
|
|
4897
4960
|
const { data } = useLeadFormData('CURRENCY');
|
|
@@ -4901,6 +4964,15 @@
|
|
|
4901
4964
|
return (jsx(RadioButtonGroupControl, { label: "\u0412\u0430\u043B\u044E\u0442\u0430", orientation: "horizontal", items: currencies, ...field(input?.name ?? '') }));
|
|
4902
4965
|
});
|
|
4903
4966
|
|
|
4967
|
+
const getDictionaries = (dictionaries, store) => {
|
|
4968
|
+
Promise.all(Object.entries(dictionaries).map((dictionary) => {
|
|
4969
|
+
const [fieldName, dictionaryName] = dictionary;
|
|
4970
|
+
fetchRetailJSON(`/dictionary?dictionaryType=${encodeURIComponent(dictionaryName)}`, 'POST').then((res) => {
|
|
4971
|
+
store[fieldName] = res;
|
|
4972
|
+
});
|
|
4973
|
+
}));
|
|
4974
|
+
};
|
|
4975
|
+
|
|
4904
4976
|
const getOrganizationFromInn = async (inn) => {
|
|
4905
4977
|
const res = await getDaDataHints({
|
|
4906
4978
|
url: 'suggest/party',
|
|
@@ -5008,6 +5080,12 @@
|
|
|
5008
5080
|
const getOptionOp = (options) => (key) => options
|
|
5009
5081
|
.map((_) => ({ key: _.key, text: _.value }))
|
|
5010
5082
|
.find((_) => _.key === key) ?? null;
|
|
5083
|
+
const organizationDictionaries = {
|
|
5084
|
+
amountWorkers: 'EMPLOYEES_NUMBER',
|
|
5085
|
+
employerOrganization: 'ORGANIZATION_KIND',
|
|
5086
|
+
employerActivities: 'ORGANIZATION_ACTIVITY_TYPE',
|
|
5087
|
+
organization: 'ORGANIZATION_TYPE',
|
|
5088
|
+
};
|
|
5011
5089
|
|
|
5012
5090
|
const updateOrganizationFields = (store, field, item) => {
|
|
5013
5091
|
const { okved, okopf, inn, organizationName } = getOrganizationRequisites(item);
|
|
@@ -5019,6 +5097,8 @@
|
|
|
5019
5097
|
organization: getOrganizationType(store?.organization ?? [], okopf, inn),
|
|
5020
5098
|
employerOrganization: getOrganizationKind(store?.employerOrganization ?? [], okopf),
|
|
5021
5099
|
organizationName,
|
|
5100
|
+
inn,
|
|
5101
|
+
isDadataOrganization: true,
|
|
5022
5102
|
};
|
|
5023
5103
|
for (const fieldName in organizationData) {
|
|
5024
5104
|
field?.(fieldName)?.onChange?.(organizationData[fieldName]);
|
|
@@ -5031,14 +5111,26 @@
|
|
|
5031
5111
|
organizationName: item.data?.name?.short_with_opf ?? '',
|
|
5032
5112
|
});
|
|
5033
5113
|
|
|
5114
|
+
const NO_DADATA_ERROR_TEXT$1 = 'Необходимо выбрать ИНН из выпадающего списка';
|
|
5034
5115
|
const DaDataInnField = JSX(({ field, input }) => {
|
|
5035
5116
|
const store = useRetailFormStore();
|
|
5117
|
+
const [errorText, setErrorText] = useState('');
|
|
5036
5118
|
const { employerActivities, employerOrganization, organization, amountWorkers } = store;
|
|
5037
5119
|
const esiaAccountTypeCd = field?.('esiaAccountTypeCd')?.value;
|
|
5038
5120
|
const inn = field?.('inn')?.value;
|
|
5121
|
+
const fieldError = field?.('organizationName')?.error;
|
|
5122
|
+
const isDadataOrganization = field('isDadataOrganization')?.value;
|
|
5123
|
+
useEffect(() => {
|
|
5124
|
+
setErrorText(fieldError && !isDadataOrganization ? NO_DADATA_ERROR_TEXT$1 : '');
|
|
5125
|
+
}, [isDadataOrganization, fieldError]);
|
|
5039
5126
|
const onDaDataChange = useCallback((item) => {
|
|
5040
5127
|
updateOrganizationFields(store, field, item);
|
|
5041
5128
|
}, []);
|
|
5129
|
+
useEffect(() => {
|
|
5130
|
+
(async () => {
|
|
5131
|
+
await getDictionaries(organizationDictionaries, store);
|
|
5132
|
+
})();
|
|
5133
|
+
}, []);
|
|
5042
5134
|
useEffect(() => {
|
|
5043
5135
|
if (!esiaAccountTypeCd || !inn || !isDictionariesAlreadyLoad(store)) {
|
|
5044
5136
|
return;
|
|
@@ -5050,16 +5142,15 @@
|
|
|
5050
5142
|
}
|
|
5051
5143
|
})();
|
|
5052
5144
|
}, [employerActivities, employerOrganization, organization, amountWorkers]);
|
|
5053
|
-
|
|
5145
|
+
const onChange = useCallback((value) => {
|
|
5146
|
+
field?.('inn')?.onChange?.(value);
|
|
5147
|
+
field?.('isDadataOrganization')?.onChange?.(false);
|
|
5148
|
+
}, []);
|
|
5149
|
+
return (jsx(DaDataInputControl, { label: "\u0418\u041D\u041D", isInteger: true, maxLength: 12, ...input, ...field(input?.name ?? ''), onDaDataChange: onDaDataChange, disabled: isEsiaAuthorize(field, input), onChange: onChange, error: errorText || field('inn')?.error }));
|
|
5054
5150
|
});
|
|
5055
5151
|
const isDictionariesAlreadyLoad = (store) => {
|
|
5056
|
-
const { employerActivities, employerOrganization, organization, amountWorkers
|
|
5057
|
-
return [
|
|
5058
|
-
employerOrganization,
|
|
5059
|
-
organization,
|
|
5060
|
-
amountWorkers,
|
|
5061
|
-
productType === 'creditCard' ? employerActivities : true,
|
|
5062
|
-
].every(Boolean);
|
|
5152
|
+
const { employerActivities, employerOrganization, organization, amountWorkers } = store;
|
|
5153
|
+
return [employerOrganization, organization, amountWorkers, employerActivities].every(Boolean);
|
|
5063
5154
|
};
|
|
5064
5155
|
|
|
5065
5156
|
const DeliveryDateFiels = JSX(({ field, input }) => (jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u0434\u043E\u0441\u0442\u0430\u0432\u043A\u0438", ...field(input?.name ?? ''), minDate: new Date() })));
|
|
@@ -5127,24 +5218,12 @@
|
|
|
5127
5218
|
});
|
|
5128
5219
|
|
|
5129
5220
|
const EmployerActivitiesField = JSX(({ field, input }) => {
|
|
5130
|
-
const { data } = useLeadFormData('ORGANIZATION_ACTIVITY_TYPE');
|
|
5131
5221
|
const store = useRetailFormStore();
|
|
5132
|
-
useEffect(() => {
|
|
5133
|
-
if (data) {
|
|
5134
|
-
store.employerActivities = data;
|
|
5135
|
-
}
|
|
5136
|
-
}, [data]);
|
|
5137
5222
|
return (jsx(SelectField, { field: field, source: store.employerActivities ?? [], label: "\u0412\u0438\u0434 \u0434\u0435\u044F\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u0438 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438-\u0440\u0430\u0431\u043E\u0442\u043E\u0434\u0430\u0442\u0435\u043B\u044F", fieldName: "employerActivities", input: input }));
|
|
5138
5223
|
});
|
|
5139
5224
|
|
|
5140
5225
|
const EmployerOrganizationField = JSX(({ field, input }) => {
|
|
5141
|
-
const { data } = useLeadFormData('ORGANIZATION_KIND');
|
|
5142
5226
|
const store = useRetailFormStore();
|
|
5143
|
-
useEffect(() => {
|
|
5144
|
-
if (data) {
|
|
5145
|
-
store.employerOrganization = data;
|
|
5146
|
-
}
|
|
5147
|
-
}, [data]);
|
|
5148
5227
|
return (jsx(SelectField, { field: field, source: store.employerOrganization ?? [], label: "\u0412\u0438\u0434 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438 \u0440\u0430\u0431\u043E\u0442\u043E\u0434\u0430\u0442\u0435\u043B\u044F", fieldName: "employerOrganization", input: input }));
|
|
5149
5228
|
});
|
|
5150
5229
|
|
|
@@ -5348,23 +5427,27 @@
|
|
|
5348
5427
|
});
|
|
5349
5428
|
|
|
5350
5429
|
const OrganizationField = JSX(({ field, input }) => {
|
|
5351
|
-
const { data } = useLeadFormData('ORGANIZATION_TYPE');
|
|
5352
5430
|
const store = useRetailFormStore();
|
|
5353
|
-
useEffect(() => {
|
|
5354
|
-
if (data) {
|
|
5355
|
-
store.organization = data;
|
|
5356
|
-
}
|
|
5357
|
-
}, [data]);
|
|
5358
5431
|
return (jsx(SelectField, { field: field, source: store.organization ?? [], label: "\u0422\u0438\u043F \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", fieldName: "organization", input: input }));
|
|
5359
5432
|
});
|
|
5360
5433
|
|
|
5434
|
+
const NO_DADATA_ERROR_TEXT = 'Необходимо выбрать организацию из выпадающего списка';
|
|
5361
5435
|
const OrganizationNameField = JSX(({ field, input }) => {
|
|
5362
5436
|
const store = useRetailFormStore();
|
|
5437
|
+
const [errorText, setErrorText] = useState('');
|
|
5438
|
+
const fieldError = field?.('organizationName')?.error;
|
|
5439
|
+
const isDadataOrganization = field('isDadataOrganization')?.value;
|
|
5440
|
+
useEffect(() => {
|
|
5441
|
+
setErrorText(fieldError && !isDadataOrganization ? NO_DADATA_ERROR_TEXT : '');
|
|
5442
|
+
}, [isDadataOrganization, fieldError]);
|
|
5363
5443
|
const onDaDataChange = useCallback((item) => {
|
|
5364
|
-
field?.('inn')?.onChange?.(item.data?.inn);
|
|
5365
5444
|
updateOrganizationFields(store, field, item);
|
|
5366
5445
|
}, []);
|
|
5367
|
-
|
|
5446
|
+
const onChange = useCallback((value) => {
|
|
5447
|
+
field?.('organizationName')?.onChange?.(value);
|
|
5448
|
+
field?.('isDadataOrganization')?.onChange?.(false);
|
|
5449
|
+
}, []);
|
|
5450
|
+
return (jsx(DaDataInputControl, { label: "\u041D\u0430\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", ...input, ...field(input?.name ?? ''), disabled: isEsiaAuthorize(field, input), onDaDataChange: onDaDataChange, onChange: onChange, error: errorText || field('organizationName')?.error }));
|
|
5368
5451
|
});
|
|
5369
5452
|
|
|
5370
5453
|
const OtherIncomeField = JSX(({ field, input }) => (jsx(DaDataInputControl, { label: "\u0418\u043D\u044B\u0435 \u0434\u043E\u0445\u043E\u0434\u044B", placeholder: "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435", isInteger: true, ...field(input?.name ?? ''), ...input })));
|
|
@@ -5569,7 +5652,7 @@
|
|
|
5569
5652
|
shareholderFlg: ShareholderFlgField,
|
|
5570
5653
|
legalEntityName: LegalEntityNameField,
|
|
5571
5654
|
creditInRshbCd: CreditInRshbCdField,
|
|
5572
|
-
bankEmployeeCode:
|
|
5655
|
+
bankEmployeeCode: BankEmployeeCodeField,
|
|
5573
5656
|
partInBusiness: PartInBusinessField,
|
|
5574
5657
|
regionRetail: RegionRetailField,
|
|
5575
5658
|
infoCard: InfoCardField,
|
|
@@ -5619,12 +5702,6 @@
|
|
|
5619
5702
|
|
|
5620
5703
|
const renderSubmitButton = (button, isSending = false) => (jsx(SubmitButton$1, { className: "w-full @xl:w-auto", isLoading: isSending, children: button?.text ? button.text : 'Отправить заявку' }));
|
|
5621
5704
|
|
|
5622
|
-
const sessionStore = new Store(); // sessionStorage cache
|
|
5623
|
-
replicate(sessionStore, new StorageAdapter(globalThis?.sessionStorage));
|
|
5624
|
-
function useSessionStore() {
|
|
5625
|
-
return useStore(sessionStore);
|
|
5626
|
-
}
|
|
5627
|
-
|
|
5628
5705
|
const createDraftTask = async (body) => {
|
|
5629
5706
|
const res = await fetchRetailJSON('/user-data/createDraftTask', 'POST', body);
|
|
5630
5707
|
return res || {};
|
|
@@ -6123,6 +6200,7 @@
|
|
|
6123
6200
|
employment: getSelectValue(employment, EMPLOYMENT_TYPE),
|
|
6124
6201
|
organizationName,
|
|
6125
6202
|
inn,
|
|
6203
|
+
isDadataOrganization: Boolean(inn),
|
|
6126
6204
|
employerActivities: getSelectValue(employerActivities),
|
|
6127
6205
|
organization: getSelectValue(organization),
|
|
6128
6206
|
employerOrganization: getSelectValue(employerOrganization),
|
|
@@ -6859,6 +6937,7 @@
|
|
|
6859
6937
|
const applicationFormData = useMemo(() => getApplicationFormData(productType), [productType]);
|
|
6860
6938
|
const inputs = useMemo(() => getInputs(applicationFormData), [applicationFormData]);
|
|
6861
6939
|
const noConsentDialog = useDialog(NoConsentDialog);
|
|
6940
|
+
useIFrameMode();
|
|
6862
6941
|
const extendedValidatorObj = useMemo(() => getExtendedValidatorObj(productType), [productType]);
|
|
6863
6942
|
const formValidator = useMemo(() => getFormValidator(inputs, extendedValidatorObj), [inputs, extendedValidatorObj]);
|
|
6864
6943
|
const initialFormState = useInitApplicationLead({
|
|
@@ -8470,6 +8549,8 @@
|
|
|
8470
8549
|
generalSeniority: generalSeniorityValidator(formState.lastJobExperience),
|
|
8471
8550
|
beginDate: workBeginDateValidator(formState.limitedBirthday),
|
|
8472
8551
|
participantDateRegistration: dateRegistrationValidator(formState.limitedBirthday),
|
|
8552
|
+
organizationName: organizationNameValidator(formState.isDadataOrganization),
|
|
8553
|
+
inn: organizationInnValidator(formState.isDadataOrganization),
|
|
8473
8554
|
})(formState);
|
|
8474
8555
|
|
|
8475
8556
|
const StepsNavigationButtons$2 = JSX(({ step, isSending, onPrevStep }) => {
|
|
@@ -8539,6 +8620,7 @@
|
|
|
8539
8620
|
fiasCode: '',
|
|
8540
8621
|
},
|
|
8541
8622
|
organizationName: '',
|
|
8623
|
+
isDadataOrganization: false,
|
|
8542
8624
|
organizationPhone: '',
|
|
8543
8625
|
partInBusiness: undefined,
|
|
8544
8626
|
positionOrganization: { key: '', text: '' },
|
|
@@ -8555,12 +8637,6 @@
|
|
|
8555
8637
|
esiaAccountTypeCd: { key: '', text: '' },
|
|
8556
8638
|
initiateBankruptcyFlg: isCredit ? false : undefined,
|
|
8557
8639
|
},
|
|
8558
|
-
{
|
|
8559
|
-
bankruptcyFlg: false,
|
|
8560
|
-
shareholderFlg: false,
|
|
8561
|
-
legalEntityName: '',
|
|
8562
|
-
creditInRshbCd: undefined,
|
|
8563
|
-
},
|
|
8564
8640
|
];
|
|
8565
8641
|
|
|
8566
8642
|
const formStateMap$2 = [
|
|
@@ -8570,6 +8646,12 @@
|
|
|
8570
8646
|
codeWord: '',
|
|
8571
8647
|
},
|
|
8572
8648
|
...getMainFormStateMap(),
|
|
8649
|
+
{
|
|
8650
|
+
bankruptcyFlg: false,
|
|
8651
|
+
shareholderFlg: false,
|
|
8652
|
+
legalEntityName: '',
|
|
8653
|
+
creditInRshbCd: undefined,
|
|
8654
|
+
},
|
|
8573
8655
|
{
|
|
8574
8656
|
regionRetail: { key: '', text: '' },
|
|
8575
8657
|
addressRetail: { key: '', text: '' },
|
|
@@ -8629,12 +8711,9 @@
|
|
|
8629
8711
|
};
|
|
8630
8712
|
|
|
8631
8713
|
const getPersonalInfoData = (formData) => {
|
|
8632
|
-
const {
|
|
8714
|
+
const { limitedBirthday = '', sex, birthPlace, dulIssueDate = '', dulIssuedBy, dulNumber, dulSerie, dulSubdivisionCode, education, participantDateRegistration, housing, addressRegistration, addressFact, addressMatch, } = formData;
|
|
8633
8715
|
return {
|
|
8634
8716
|
birthDate: formatDate(limitedBirthday, true),
|
|
8635
|
-
midname: middleName,
|
|
8636
|
-
name,
|
|
8637
|
-
surname,
|
|
8638
8717
|
birthPlace,
|
|
8639
8718
|
dulIssueDate: formatDate(dulIssueDate, true),
|
|
8640
8719
|
dulIssuedBy,
|
|
@@ -8647,10 +8726,6 @@
|
|
|
8647
8726
|
: undefined,
|
|
8648
8727
|
homeMatchFlg: addressMatch,
|
|
8649
8728
|
houseTypeCd: housing,
|
|
8650
|
-
participantContacts: getParticipantContacts$1({
|
|
8651
|
-
phone: formatPhone(phone),
|
|
8652
|
-
email,
|
|
8653
|
-
}),
|
|
8654
8729
|
participantAddresses: getParticipantAddresses$1({
|
|
8655
8730
|
addressRegistration,
|
|
8656
8731
|
addressFact: addressMatch ? addressRegistration : addressFact,
|
|
@@ -8794,6 +8869,7 @@
|
|
|
8794
8869
|
|
|
8795
8870
|
const PRODUCT_TYPE$2 = 'creditCard';
|
|
8796
8871
|
const CreditCardFormStep = JSX(({ step, sections, onPrevStep, onNextStep, onFinish }) => {
|
|
8872
|
+
useIFrameMode();
|
|
8797
8873
|
const inputs = useMemo(() => sections?.flatMap((_) => _?.inputs || []), [sections]);
|
|
8798
8874
|
const formValidator = useCallback((formState) => getRetailFormValidator({
|
|
8799
8875
|
formState,
|
|
@@ -8818,21 +8894,14 @@
|
|
|
8818
8894
|
title: 'Персональные данные',
|
|
8819
8895
|
columns: 2,
|
|
8820
8896
|
inputs: [
|
|
8821
|
-
{
|
|
8822
|
-
name: 'surname',
|
|
8823
|
-
required: true,
|
|
8824
|
-
dadata: true,
|
|
8825
|
-
filledByEsia: true,
|
|
8826
|
-
},
|
|
8827
|
-
{ name: 'name', required: true, dadata: true, filledByEsia: true },
|
|
8828
|
-
{ name: 'middleName', dadata: true, filledByEsia: true },
|
|
8829
|
-
{ name: 'sex', required: true },
|
|
8830
8897
|
{ name: 'limitedBirthday', required: true, filledByEsia: true },
|
|
8831
8898
|
{ name: 'birthPlace', required: true, filledByEsia: true },
|
|
8832
|
-
{ name: 'phone', disabled: true, required: true },
|
|
8833
|
-
{ name: 'email', required: true, dadata: true },
|
|
8834
8899
|
],
|
|
8835
8900
|
},
|
|
8901
|
+
{
|
|
8902
|
+
columns: 2,
|
|
8903
|
+
inputs: [{ name: 'sex', required: true }],
|
|
8904
|
+
},
|
|
8836
8905
|
{
|
|
8837
8906
|
title: 'Паспортные данные',
|
|
8838
8907
|
columns: 2,
|
|
@@ -9027,29 +9096,32 @@
|
|
|
9027
9096
|
],
|
|
9028
9097
|
},
|
|
9029
9098
|
{
|
|
9030
|
-
inputs: [
|
|
9031
|
-
{ name: 'employment', required: true },
|
|
9032
|
-
{ name: 'organizationName', required: true, dadata: true, filledByEsia: true },
|
|
9033
|
-
],
|
|
9099
|
+
inputs: [{ name: 'employment', required: true }],
|
|
9034
9100
|
},
|
|
9035
9101
|
{
|
|
9036
9102
|
columns: 2,
|
|
9037
9103
|
inputs: [
|
|
9104
|
+
{ name: 'organizationName', required: true, dadata: true, filledByEsia: true },
|
|
9038
9105
|
{ name: 'inn', required: true, dadata: true, filledByEsia: true },
|
|
9039
|
-
{ name: 'legalForm', required: true },
|
|
9040
9106
|
],
|
|
9041
9107
|
},
|
|
9042
9108
|
{
|
|
9109
|
+
inputs: [{ name: 'amountWorkers', required: true }],
|
|
9110
|
+
},
|
|
9111
|
+
{
|
|
9112
|
+
columns: 2,
|
|
9043
9113
|
inputs: [
|
|
9044
|
-
{ name: '
|
|
9045
|
-
{
|
|
9114
|
+
{ name: 'employerActivities', required: true },
|
|
9115
|
+
{
|
|
9116
|
+
name: 'organizationPhone',
|
|
9117
|
+
label: 'Телефон работодателя',
|
|
9118
|
+
required: true,
|
|
9119
|
+
},
|
|
9046
9120
|
],
|
|
9047
9121
|
},
|
|
9048
9122
|
{
|
|
9049
9123
|
columns: 2,
|
|
9050
9124
|
inputs: [
|
|
9051
|
-
{ name: 'employerActivities', required: true },
|
|
9052
|
-
{ name: 'employerOrganization', required: true },
|
|
9053
9125
|
{ name: 'generalSeniority', required: true, filledByEsia: true },
|
|
9054
9126
|
{ name: 'lastJobExperience', required: true, filledByEsia: true },
|
|
9055
9127
|
{ name: 'experience5Years', required: true, filledByEsia: true },
|
|
@@ -9057,14 +9129,7 @@
|
|
|
9057
9129
|
],
|
|
9058
9130
|
},
|
|
9059
9131
|
{
|
|
9060
|
-
inputs: [
|
|
9061
|
-
{
|
|
9062
|
-
name: 'organizationPhone',
|
|
9063
|
-
label: 'Телефон работодателя',
|
|
9064
|
-
required: true,
|
|
9065
|
-
},
|
|
9066
|
-
{ name: 'beginDate', required: true, filledByEsia: true },
|
|
9067
|
-
],
|
|
9132
|
+
inputs: [{ name: 'beginDate', required: true, filledByEsia: true }],
|
|
9068
9133
|
},
|
|
9069
9134
|
{
|
|
9070
9135
|
columns: 2,
|
|
@@ -9198,13 +9263,20 @@
|
|
|
9198
9263
|
values: ['office'],
|
|
9199
9264
|
},
|
|
9200
9265
|
},
|
|
9266
|
+
],
|
|
9267
|
+
},
|
|
9268
|
+
{
|
|
9269
|
+
columns: 2,
|
|
9270
|
+
inputs: [
|
|
9201
9271
|
{
|
|
9202
|
-
name: 'bankEmployeeCode',
|
|
9203
9272
|
condition: {
|
|
9204
9273
|
name: 'methodObtain',
|
|
9205
9274
|
values: ['office'],
|
|
9206
9275
|
},
|
|
9207
9276
|
},
|
|
9277
|
+
{
|
|
9278
|
+
name: 'bankEmployeeCode',
|
|
9279
|
+
},
|
|
9208
9280
|
],
|
|
9209
9281
|
},
|
|
9210
9282
|
];
|
|
@@ -9511,6 +9583,7 @@
|
|
|
9511
9583
|
const PRODUCT_TYPE$1 = 'credit';
|
|
9512
9584
|
const CreditFormStep = JSX(({ step, sections, programsSource, onPrevStep, onNextStep, onFinish }) => {
|
|
9513
9585
|
const { programId } = useRetailFormStore();
|
|
9586
|
+
useIFrameMode();
|
|
9514
9587
|
const calcData = programsSource?.[programId ?? '']; // Need normalizator useForm, to be save defaultParams
|
|
9515
9588
|
const inputs = useMemo(() => sections?.flatMap((_) => _?.inputs ?? []), [sections]);
|
|
9516
9589
|
const formValidator = useCallback((formState) => getRetailFormValidator({
|
|
@@ -9573,38 +9646,30 @@
|
|
|
9573
9646
|
],
|
|
9574
9647
|
},
|
|
9575
9648
|
{
|
|
9576
|
-
inputs: [
|
|
9577
|
-
{ name: 'employment', required: true },
|
|
9578
|
-
{ name: 'organizationName', required: true, dadata: true, filledByEsia: true },
|
|
9579
|
-
],
|
|
9649
|
+
inputs: [{ name: 'employment', required: true }],
|
|
9580
9650
|
},
|
|
9581
9651
|
{
|
|
9582
9652
|
columns: 2,
|
|
9583
9653
|
inputs: [
|
|
9654
|
+
{ name: 'organizationName', required: true, dadata: true, filledByEsia: true },
|
|
9584
9655
|
{ name: 'inn', required: true, dadata: true, filledByEsia: true },
|
|
9585
|
-
{ name: 'legalForm', required: true },
|
|
9586
9656
|
],
|
|
9587
9657
|
},
|
|
9588
9658
|
{
|
|
9659
|
+
columns: 2,
|
|
9589
9660
|
inputs: [
|
|
9590
|
-
{ name: 'organization', required: true },
|
|
9591
9661
|
{ name: 'amountWorkers', required: true },
|
|
9662
|
+
{
|
|
9663
|
+
name: 'organizationPhone',
|
|
9664
|
+
label: 'Телефон работодателя',
|
|
9665
|
+
required: true,
|
|
9666
|
+
},
|
|
9592
9667
|
],
|
|
9593
9668
|
},
|
|
9594
9669
|
{
|
|
9595
9670
|
columns: 2,
|
|
9596
9671
|
inputs: [
|
|
9597
|
-
{ name: 'employerOrganization', required: true },
|
|
9598
9672
|
{ name: 'jobsNumber', required: true, filledByEsia: true },
|
|
9599
|
-
],
|
|
9600
|
-
},
|
|
9601
|
-
{
|
|
9602
|
-
inputs: [
|
|
9603
|
-
{
|
|
9604
|
-
name: 'organizationPhone',
|
|
9605
|
-
label: 'Телефон работодателя',
|
|
9606
|
-
required: true,
|
|
9607
|
-
},
|
|
9608
9673
|
{ name: 'beginDate', required: true, filledByEsia: true },
|
|
9609
9674
|
],
|
|
9610
9675
|
},
|
|
@@ -9705,7 +9770,12 @@
|
|
|
9705
9770
|
],
|
|
9706
9771
|
},
|
|
9707
9772
|
{
|
|
9708
|
-
|
|
9773
|
+
columns: 2,
|
|
9774
|
+
inputs: [
|
|
9775
|
+
{
|
|
9776
|
+
name: 'bankEmployeeCode',
|
|
9777
|
+
},
|
|
9778
|
+
],
|
|
9709
9779
|
},
|
|
9710
9780
|
];
|
|
9711
9781
|
const CALCULATOR_CONTENT = [
|
|
@@ -10017,6 +10087,7 @@
|
|
|
10017
10087
|
|
|
10018
10088
|
const PRODUCT_TYPE = 'debitCard';
|
|
10019
10089
|
const DebitFormStep = JSX(({ step, sections, onPrevStep, onNextStep, onFinish }) => {
|
|
10090
|
+
useIFrameMode();
|
|
10020
10091
|
const inputs = useMemo(() => sections?.flatMap((_) => _?.inputs ?? []), [sections]);
|
|
10021
10092
|
const formValidator = useCallback((formState) => getRetailFormValidator({
|
|
10022
10093
|
formState,
|
|
@@ -11443,7 +11514,7 @@
|
|
|
11443
11514
|
const Tag = tag;
|
|
11444
11515
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
11445
11516
|
const { text, description, icon, count, tabName, ...link } = item;
|
|
11446
|
-
return (jsx(Tag, { className: style('h-12', 'block flex-1', 'cursor-pointer', tabPaddingStyleMap[type], isActive ? activeTabBgStyleMap[type] : tabBgStyleMap[type]), "aria-label": "\u0421\u043F\u0438\u0441\u043E\u043A \u0442\u0430\u0431\u043E\u0432", onClick: onClick, ...link, children: jsxs("div", { className: style('h-full', 'flex justify-center items-center', 'text-center whitespace-nowrap', isActive ? activeTabTextStyleMap[type] : tabTextStyle), role: "tab", "aria-label": `Таб ${text}`, children: [renderTabItemInner({
|
|
11517
|
+
return (jsx(Tag, { className: style('h-12', 'block flex-1', 'cursor-pointer', 'rounded-none', tabPaddingStyleMap[type], isActive ? activeTabBgStyleMap[type] : tabBgStyleMap[type]), "aria-label": "\u0421\u043F\u0438\u0441\u043E\u043A \u0442\u0430\u0431\u043E\u0432", onClick: onClick, ...link, children: jsxs("div", { className: style('h-full', 'flex justify-center items-center', 'text-center whitespace-nowrap', isActive ? activeTabTextStyleMap[type] : tabTextStyle), role: "tab", "aria-label": `Таб ${text}`, children: [renderTabItemInner({
|
|
11447
11518
|
text,
|
|
11448
11519
|
description,
|
|
11449
11520
|
icon,
|
|
@@ -11832,6 +11903,7 @@
|
|
|
11832
11903
|
const ContentPage = JSX(({ className, data = EMPTY_DATA, blocksRegistry, blockDecorator }) => {
|
|
11833
11904
|
const { slots, blocks, fallback, ...pageContent } = data;
|
|
11834
11905
|
const resolvedPageContent = useJSONRef(pageContent, fallback);
|
|
11906
|
+
const isFrame = isIFrame();
|
|
11835
11907
|
useClickHandler();
|
|
11836
11908
|
useDefaultLocation();
|
|
11837
11909
|
const options = {
|
|
@@ -11841,11 +11913,12 @@
|
|
|
11841
11913
|
blockDecorator,
|
|
11842
11914
|
parent: data,
|
|
11843
11915
|
};
|
|
11844
|
-
return (jsxs("div", { "data-theme": data.colorPalette || 'pc', children: [jsxs("section", { className: style('@container relative', data.style, className), children: [slots?.[HEADER_SLOT]?.length ? (jsx("div", { className: "relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]", children: renderBlocksList(slots?.[HEADER_SLOT], { ...options, slotName: HEADER_SLOT }) })) : null, jsxs("div", { className: "container space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs", children: [renderChildren({
|
|
11916
|
+
return (jsxs("div", { "data-theme": data.colorPalette || 'pc', children: [jsxs("section", { className: style('@container relative', data.style, className), children: [!isFrame && slots?.[HEADER_SLOT]?.length ? (jsx("div", { className: "relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]", children: renderBlocksList(slots?.[HEADER_SLOT], { ...options, slotName: HEADER_SLOT }) })) : null, jsxs("div", { className: "container space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs", children: [renderChildren({
|
|
11845
11917
|
block: data,
|
|
11846
11918
|
options,
|
|
11847
11919
|
extraProps: { className: 'scroll-mt-12' },
|
|
11848
|
-
}),
|
|
11920
|
+
}), !isFrame &&
|
|
11921
|
+
renderBlocksList(slots?.[FOOTER_SLOT], { ...options, slotName: FOOTER_SLOT })] })] }), !isFrame && slots?.[STICKY_FOOTER_SLOT]?.length ? (jsx("div", { className: "fixed w-full bottom-0 left-0 z-[100]", children: renderBlocksList(slots?.[STICKY_FOOTER_SLOT], {
|
|
11849
11922
|
...options,
|
|
11850
11923
|
slotName: STICKY_FOOTER_SLOT,
|
|
11851
11924
|
}) })) : null, jsx(DialogManager, {}), jsx(PopupManager, {}), jsx(CookiePopup, { __html: resolvedPageContent?.cookieContent?.__html })] }));
|
|
@@ -11855,7 +11928,7 @@
|
|
|
11855
11928
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
11856
11929
|
});
|
|
11857
11930
|
|
|
11858
|
-
const packageVersion = "0.14.
|
|
11931
|
+
const packageVersion = "0.14.918";
|
|
11859
11932
|
|
|
11860
11933
|
exports.Blocks = Blocks;
|
|
11861
11934
|
exports.ContentPage = ContentPage;
|