@redneckz/wildless-cms-uni-blocks 0.14.620 → 0.14.622
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/feedbackById.d.ts +1 -1
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +54 -44
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +1 -1
- package/bundle/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +1 -1
- package/bundle/components/CreditForm/CreditFormStep.d.ts +1 -2
- package/bundle/components/CreditForm/StepsNavigationButtons.d.ts +0 -1
- package/bundle/components/CreditForm/creditFormStepsData.d.ts +2 -178
- package/bundle/ui-kit/Checkbox/getDocument.d.ts +1 -1
- package/bundle/ui-kit/DialogManager/openDocument.d.ts +1 -1
- package/bundle/ui-kit/FormField/getNamesFromInput.d.ts +1 -1
- package/dist/api/RetailAPI/feedbackById.d.ts +1 -1
- package/dist/api/RetailAPI/feedbackById.js +2 -2
- package/dist/api/RetailAPI/feedbackById.js.map +1 -1
- package/dist/components/ApplicationForm/ApplicationFormContent.d.ts +1 -1
- package/dist/components/ApplicationForm/getInitialFormState.js +1 -1
- package/dist/components/ApplicationForm/getInitialFormState.js.map +1 -1
- package/dist/components/ApplicationForm/renderInputs.js +2 -2
- package/dist/components/ApplicationForm/renderInputs.js.map +1 -1
- package/dist/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +1 -1
- package/dist/components/ApplicationLeadForm/GroupedConsents.js.map +1 -1
- package/dist/components/ApplicationLeadForm/consents.js +8 -8
- package/dist/components/ApplicationLeadForm/consents.js.map +1 -1
- package/dist/components/ApplicationLeadForm/getInitialFormState.js +1 -1
- package/dist/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
- package/dist/components/ApplicationLeadForm/useInitApplicationLead.js +1 -1
- package/dist/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
- package/dist/components/CreditForm/CreditForm.js +3 -3
- package/dist/components/CreditForm/CreditForm.js.map +1 -1
- package/dist/components/CreditForm/CreditFormProgress.js +3 -3
- package/dist/components/CreditForm/CreditFormProgress.js.map +1 -1
- package/dist/components/CreditForm/CreditFormStep.d.ts +1 -2
- package/dist/components/CreditForm/CreditFormStep.js +3 -3
- package/dist/components/CreditForm/CreditFormStep.js.map +1 -1
- package/dist/components/CreditForm/StepsNavigationButtons.d.ts +0 -1
- package/dist/components/CreditForm/StepsNavigationButtons.js +2 -1
- package/dist/components/CreditForm/StepsNavigationButtons.js.map +1 -1
- package/dist/components/CreditForm/creditFormStepsData.d.ts +2 -178
- package/dist/components/CreditForm/creditFormStepsData.js +7 -8
- package/dist/components/CreditForm/creditFormStepsData.js.map +1 -1
- package/dist/ui-kit/Checkbox/CheckboxWithDoc.js +3 -1
- package/dist/ui-kit/Checkbox/CheckboxWithDoc.js.map +1 -1
- package/dist/ui-kit/Checkbox/getDocument.d.ts +1 -1
- package/dist/ui-kit/Checkbox/getDocument.js +2 -2
- package/dist/ui-kit/Checkbox/getDocument.js.map +1 -1
- package/dist/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js +3 -1
- package/dist/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js.map +1 -1
- package/dist/ui-kit/DialogManager/openDocument.d.ts +1 -1
- package/dist/ui-kit/DialogManager/openDocument.js +3 -3
- package/dist/ui-kit/DialogManager/openDocument.js.map +1 -1
- package/dist/ui-kit/FormField/Fields/PartInBusinessField.js +9 -1
- package/dist/ui-kit/FormField/Fields/PartInBusinessField.js.map +1 -1
- package/dist/ui-kit/FormField/getField.js +1 -1
- package/dist/ui-kit/FormField/getField.js.map +1 -1
- package/dist/ui-kit/FormField/getNamesFromInput.d.ts +1 -1
- package/dist/ui-kit/FormField/getObjectValidator.js +1 -1
- package/dist/ui-kit/FormField/getObjectValidator.js.map +1 -1
- package/lib/api/RetailAPI/feedbackById.d.ts +1 -1
- package/lib/api/RetailAPI/feedbackById.js +2 -2
- package/lib/api/RetailAPI/feedbackById.js.map +1 -1
- package/lib/components/ApplicationForm/ApplicationFormContent.d.ts +1 -1
- package/lib/components/ApplicationForm/getInitialFormState.js +1 -1
- package/lib/components/ApplicationForm/getInitialFormState.js.map +1 -1
- package/lib/components/ApplicationForm/renderInputs.js +2 -2
- package/lib/components/ApplicationForm/renderInputs.js.map +1 -1
- package/lib/components/ApplicationLeadForm/ApplicationLeadForm.fixture.d.ts +0 -2
- package/lib/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +1 -1
- package/lib/components/ApplicationLeadForm/GroupedConsents.js.map +1 -1
- package/lib/components/ApplicationLeadForm/consents.js +8 -8
- package/lib/components/ApplicationLeadForm/consents.js.map +1 -1
- package/lib/components/ApplicationLeadForm/getInitialFormState.js +1 -1
- package/lib/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
- package/lib/components/ApplicationLeadForm/useInitApplicationLead.js +1 -1
- package/lib/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
- package/lib/components/CreditForm/CreditForm.js +3 -3
- package/lib/components/CreditForm/CreditForm.js.map +1 -1
- package/lib/components/CreditForm/CreditFormProgress.js +3 -3
- package/lib/components/CreditForm/CreditFormProgress.js.map +1 -1
- package/lib/components/CreditForm/CreditFormStep.d.ts +1 -2
- package/lib/components/CreditForm/CreditFormStep.js +3 -3
- package/lib/components/CreditForm/CreditFormStep.js.map +1 -1
- package/lib/components/CreditForm/StepsNavigationButtons.d.ts +0 -1
- package/lib/components/CreditForm/StepsNavigationButtons.js +2 -1
- package/lib/components/CreditForm/StepsNavigationButtons.js.map +1 -1
- package/lib/components/CreditForm/creditFormStepsData.d.ts +2 -178
- package/lib/components/CreditForm/creditFormStepsData.js +7 -8
- package/lib/components/CreditForm/creditFormStepsData.js.map +1 -1
- package/lib/ui-kit/Checkbox/CheckboxWithDoc.js +3 -1
- package/lib/ui-kit/Checkbox/CheckboxWithDoc.js.map +1 -1
- package/lib/ui-kit/Checkbox/getDocument.d.ts +1 -1
- package/lib/ui-kit/Checkbox/getDocument.js +2 -2
- package/lib/ui-kit/Checkbox/getDocument.js.map +1 -1
- package/lib/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js +3 -1
- package/lib/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js.map +1 -1
- package/lib/ui-kit/DialogManager/openDocument.d.ts +1 -1
- package/lib/ui-kit/DialogManager/openDocument.js +3 -3
- package/lib/ui-kit/DialogManager/openDocument.js.map +1 -1
- package/lib/ui-kit/FormField/Fields/PartInBusinessField.js +9 -1
- package/lib/ui-kit/FormField/Fields/PartInBusinessField.js.map +1 -1
- package/lib/ui-kit/FormField/getField.js +1 -1
- package/lib/ui-kit/FormField/getField.js.map +1 -1
- package/lib/ui-kit/FormField/getNamesFromInput.d.ts +1 -1
- package/lib/ui-kit/FormField/getObjectValidator.js +1 -1
- package/lib/ui-kit/FormField/getObjectValidator.js.map +1 -1
- package/mobile/bundle/api/RetailAPI/feedbackById.d.ts +1 -1
- package/mobile/bundle/bundle.umd.js +54 -44
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +1 -1
- package/mobile/bundle/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +1 -1
- package/mobile/bundle/components/CreditForm/CreditFormStep.d.ts +1 -2
- package/mobile/bundle/components/CreditForm/StepsNavigationButtons.d.ts +0 -1
- package/mobile/bundle/components/CreditForm/creditFormStepsData.d.ts +2 -178
- package/mobile/bundle/ui-kit/Checkbox/getDocument.d.ts +1 -1
- package/mobile/bundle/ui-kit/DialogManager/openDocument.d.ts +1 -1
- package/mobile/bundle/ui-kit/FormField/getNamesFromInput.d.ts +1 -1
- package/mobile/dist/api/RetailAPI/feedbackById.d.ts +1 -1
- package/mobile/dist/api/RetailAPI/feedbackById.js +2 -2
- package/mobile/dist/api/RetailAPI/feedbackById.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormContent.d.ts +1 -1
- package/mobile/dist/components/ApplicationForm/getInitialFormState.js +1 -1
- package/mobile/dist/components/ApplicationForm/getInitialFormState.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/renderInputs.js +2 -2
- package/mobile/dist/components/ApplicationForm/renderInputs.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +1 -1
- package/mobile/dist/components/ApplicationLeadForm/GroupedConsents.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/consents.js +8 -8
- package/mobile/dist/components/ApplicationLeadForm/consents.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.js +1 -1
- package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.js +1 -1
- package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
- package/mobile/dist/components/CreditForm/CreditForm.js +3 -3
- package/mobile/dist/components/CreditForm/CreditForm.js.map +1 -1
- package/mobile/dist/components/CreditForm/CreditFormProgress.js +3 -3
- package/mobile/dist/components/CreditForm/CreditFormProgress.js.map +1 -1
- package/mobile/dist/components/CreditForm/CreditFormStep.d.ts +1 -2
- package/mobile/dist/components/CreditForm/CreditFormStep.js +3 -3
- package/mobile/dist/components/CreditForm/CreditFormStep.js.map +1 -1
- package/mobile/dist/components/CreditForm/StepsNavigationButtons.d.ts +0 -1
- package/mobile/dist/components/CreditForm/StepsNavigationButtons.js +2 -1
- package/mobile/dist/components/CreditForm/StepsNavigationButtons.js.map +1 -1
- package/mobile/dist/components/CreditForm/creditFormStepsData.d.ts +2 -178
- package/mobile/dist/components/CreditForm/creditFormStepsData.js +7 -8
- package/mobile/dist/components/CreditForm/creditFormStepsData.js.map +1 -1
- package/mobile/dist/ui-kit/Checkbox/CheckboxWithDoc.js +3 -1
- package/mobile/dist/ui-kit/Checkbox/CheckboxWithDoc.js.map +1 -1
- package/mobile/dist/ui-kit/Checkbox/getDocument.d.ts +1 -1
- package/mobile/dist/ui-kit/Checkbox/getDocument.js +2 -2
- package/mobile/dist/ui-kit/Checkbox/getDocument.js.map +1 -1
- package/mobile/dist/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js +3 -1
- package/mobile/dist/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js.map +1 -1
- package/mobile/dist/ui-kit/DialogManager/openDocument.d.ts +1 -1
- package/mobile/dist/ui-kit/DialogManager/openDocument.js +3 -3
- package/mobile/dist/ui-kit/DialogManager/openDocument.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/PartInBusinessField.js +9 -1
- package/mobile/dist/ui-kit/FormField/Fields/PartInBusinessField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/getField.js +1 -1
- package/mobile/dist/ui-kit/FormField/getField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/getNamesFromInput.d.ts +1 -1
- package/mobile/dist/ui-kit/FormField/getObjectValidator.js +1 -1
- package/mobile/dist/ui-kit/FormField/getObjectValidator.js.map +1 -1
- package/mobile/lib/api/RetailAPI/feedbackById.d.ts +1 -1
- package/mobile/lib/api/RetailAPI/feedbackById.js +2 -2
- package/mobile/lib/api/RetailAPI/feedbackById.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormContent.d.ts +1 -1
- package/mobile/lib/components/ApplicationForm/getInitialFormState.js +1 -1
- package/mobile/lib/components/ApplicationForm/getInitialFormState.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/renderInputs.js +2 -2
- package/mobile/lib/components/ApplicationForm/renderInputs.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +1 -1
- package/mobile/lib/components/ApplicationLeadForm/GroupedConsents.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/consents.js +8 -8
- package/mobile/lib/components/ApplicationLeadForm/consents.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.js +1 -1
- package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.js +1 -1
- package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
- package/mobile/lib/components/CreditForm/CreditForm.js +3 -3
- package/mobile/lib/components/CreditForm/CreditForm.js.map +1 -1
- package/mobile/lib/components/CreditForm/CreditFormProgress.js +3 -3
- package/mobile/lib/components/CreditForm/CreditFormProgress.js.map +1 -1
- package/mobile/lib/components/CreditForm/CreditFormStep.d.ts +1 -2
- package/mobile/lib/components/CreditForm/CreditFormStep.js +3 -3
- package/mobile/lib/components/CreditForm/CreditFormStep.js.map +1 -1
- package/mobile/lib/components/CreditForm/StepsNavigationButtons.d.ts +0 -1
- package/mobile/lib/components/CreditForm/StepsNavigationButtons.js +2 -1
- package/mobile/lib/components/CreditForm/StepsNavigationButtons.js.map +1 -1
- package/mobile/lib/components/CreditForm/creditFormStepsData.d.ts +2 -178
- package/mobile/lib/components/CreditForm/creditFormStepsData.js +7 -8
- package/mobile/lib/components/CreditForm/creditFormStepsData.js.map +1 -1
- package/mobile/lib/ui-kit/Checkbox/CheckboxWithDoc.js +3 -1
- package/mobile/lib/ui-kit/Checkbox/CheckboxWithDoc.js.map +1 -1
- package/mobile/lib/ui-kit/Checkbox/getDocument.d.ts +1 -1
- package/mobile/lib/ui-kit/Checkbox/getDocument.js +2 -2
- package/mobile/lib/ui-kit/Checkbox/getDocument.js.map +1 -1
- package/mobile/lib/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js +3 -1
- package/mobile/lib/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js.map +1 -1
- package/mobile/lib/ui-kit/DialogManager/openDocument.d.ts +1 -1
- package/mobile/lib/ui-kit/DialogManager/openDocument.js +3 -3
- package/mobile/lib/ui-kit/DialogManager/openDocument.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/PartInBusinessField.js +9 -1
- package/mobile/lib/ui-kit/FormField/Fields/PartInBusinessField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/getField.js +1 -1
- package/mobile/lib/ui-kit/FormField/getField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/getNamesFromInput.d.ts +1 -1
- package/mobile/lib/ui-kit/FormField/getObjectValidator.js +1 -1
- package/mobile/lib/ui-kit/FormField/getObjectValidator.js.map +1 -1
- package/mobile/src/api/RetailAPI/feedbackById.ts +5 -2
- package/mobile/src/components/ApplicationForm/ApplicationFormContent.ts +1 -1
- package/mobile/src/components/ApplicationForm/getInitialFormState.tsx +1 -1
- package/mobile/src/components/ApplicationForm/renderInputs.tsx +2 -2
- package/mobile/src/components/ApplicationLeadForm/ApplicationLeadFormContent.ts +1 -1
- package/mobile/src/components/ApplicationLeadForm/GroupedConsents.tsx +9 -2
- package/mobile/src/components/ApplicationLeadForm/consents.ts +8 -8
- package/mobile/src/components/ApplicationLeadForm/getInitialFormState.tsx +1 -1
- package/mobile/src/components/ApplicationLeadForm/useInitApplicationLead.ts +1 -1
- package/mobile/src/components/CreditForm/CreditForm.tsx +7 -5
- package/mobile/src/components/CreditForm/CreditFormProgress.tsx +5 -5
- package/mobile/src/components/CreditForm/CreditFormStep.tsx +4 -5
- package/mobile/src/components/CreditForm/StepsNavigationButtons.tsx +3 -2
- package/mobile/src/components/CreditForm/creditFormStepsData.tsx +9 -8
- package/mobile/src/ui-kit/Checkbox/CheckboxWithDoc.tsx +6 -1
- package/mobile/src/ui-kit/Checkbox/getDocument.ts +2 -2
- package/mobile/src/ui-kit/ConsentBkiDialog/ConsentBkiDialog.tsx +3 -1
- package/mobile/src/ui-kit/DialogManager/openDocument.tsx +11 -3
- package/mobile/src/ui-kit/FormField/Fields/PartInBusinessField.tsx +25 -9
- package/mobile/src/ui-kit/FormField/getField.tsx +1 -1
- package/mobile/src/ui-kit/FormField/getObjectValidator.tsx +1 -1
- package/package.json +2 -2
- package/src/api/RetailAPI/feedbackById.ts +5 -2
- package/src/components/ApplicationForm/ApplicationFormContent.ts +1 -1
- package/src/components/ApplicationForm/getInitialFormState.tsx +1 -1
- package/src/components/ApplicationForm/renderInputs.tsx +2 -2
- package/src/components/ApplicationLeadForm/ApplicationLeadForm.fixture.tsx +0 -121
- package/src/components/ApplicationLeadForm/ApplicationLeadFormContent.ts +1 -1
- package/src/components/ApplicationLeadForm/GroupedConsents.tsx +9 -2
- package/src/components/ApplicationLeadForm/consents.ts +8 -8
- package/src/components/ApplicationLeadForm/getInitialFormState.tsx +1 -1
- package/src/components/ApplicationLeadForm/useInitApplicationLead.ts +1 -1
- package/src/components/CreditForm/CreditForm.tsx +7 -5
- package/src/components/CreditForm/CreditFormProgress.tsx +5 -5
- package/src/components/CreditForm/CreditFormStep.tsx +4 -5
- package/src/components/CreditForm/StepsNavigationButtons.tsx +3 -2
- package/src/components/CreditForm/creditFormStepsData.tsx +9 -8
- package/src/icons/IconName.ts +6 -360
- package/src/ui-kit/Checkbox/CheckboxWithDoc.tsx +6 -1
- package/src/ui-kit/Checkbox/getDocument.ts +2 -2
- package/src/ui-kit/ConsentBkiDialog/ConsentBkiDialog.tsx +3 -1
- package/src/ui-kit/DialogManager/openDocument.tsx +11 -3
- package/src/ui-kit/FormField/Fields/PartInBusinessField.tsx +25 -9
- package/src/ui-kit/FormField/getField.tsx +1 -1
- package/src/ui-kit/FormField/getObjectValidator.tsx +1 -1
package/bundle/bundle.umd.js
CHANGED
|
@@ -1518,7 +1518,7 @@
|
|
|
1518
1518
|
};
|
|
1519
1519
|
const getObjectValidator = (inputs) => {
|
|
1520
1520
|
const requiredInputs = getNamesFromInput(inputs.filter((_) => Boolean(_?.required)));
|
|
1521
|
-
return Object.fromEntries(requiredInputs.map((_) => [_, validatorObj?.[_]]));
|
|
1521
|
+
return Object.fromEntries(requiredInputs.map((_) => [_, validatorObj?.[_ || '']]));
|
|
1522
1522
|
};
|
|
1523
1523
|
|
|
1524
1524
|
const withValidator = (props, validator) => {
|
|
@@ -2084,25 +2084,25 @@
|
|
|
2084
2084
|
text: 'Согласие на обработку персональных данных',
|
|
2085
2085
|
docId: 4,
|
|
2086
2086
|
},
|
|
2087
|
+
consentInformFlg: {
|
|
2088
|
+
text: 'Согласие на информирование о продуктах и услугах Банка',
|
|
2089
|
+
docId: 14,
|
|
2090
|
+
},
|
|
2087
2091
|
consentProviderFlg: {
|
|
2088
2092
|
text: 'Согласие об использовании простой электронной подписи',
|
|
2089
2093
|
docId: 5,
|
|
2090
2094
|
},
|
|
2095
|
+
consentOthersFlg: {
|
|
2096
|
+
text: 'Прочие согласия',
|
|
2097
|
+
docId: 1,
|
|
2098
|
+
},
|
|
2091
2099
|
consentPfrFlg: {
|
|
2092
2100
|
text: 'Согласие на запрос в ПФР',
|
|
2093
2101
|
docId: 3,
|
|
2094
2102
|
},
|
|
2095
|
-
consentInformFlg: {
|
|
2096
|
-
text: 'Согласие на информирование о продуктах и услугах Банка',
|
|
2097
|
-
docId: 14,
|
|
2098
|
-
},
|
|
2099
2103
|
consentToReceiveMaterials: {
|
|
2100
2104
|
text: 'Согласен на получение информационных и аналитических материалов по электронной почте',
|
|
2101
2105
|
},
|
|
2102
|
-
consentOthersFlg: {
|
|
2103
|
-
text: 'Прочие согласия',
|
|
2104
|
-
docId: 1,
|
|
2105
|
-
},
|
|
2106
2106
|
};
|
|
2107
2107
|
|
|
2108
2108
|
async function doRequest(url, method, body) {
|
|
@@ -2124,13 +2124,13 @@
|
|
|
2124
2124
|
return token ? { Authorization: `Bearer ${token}` } : null;
|
|
2125
2125
|
};
|
|
2126
2126
|
|
|
2127
|
-
const feedbackById = async (id) => {
|
|
2128
|
-
const response = await doRequest(`/feedback/file?id=${encodeURIComponent(id)}`, 'GET');
|
|
2127
|
+
const feedbackById = async (id, convertToPng = false) => {
|
|
2128
|
+
const response = await doRequest(`/feedback/file?id=${encodeURIComponent(id)}&convertToPngFlg=${convertToPng}`, 'GET');
|
|
2129
2129
|
return await response.blob();
|
|
2130
2130
|
};
|
|
2131
2131
|
|
|
2132
|
-
const getDocument = async (id) => {
|
|
2133
|
-
const response = await feedbackById(id);
|
|
2132
|
+
const getDocument = async (id, convertToPng = false) => {
|
|
2133
|
+
const response = await feedbackById(id, convertToPng);
|
|
2134
2134
|
return URL.createObjectURL(response);
|
|
2135
2135
|
};
|
|
2136
2136
|
|
|
@@ -2145,15 +2145,16 @@
|
|
|
2145
2145
|
return (jsxs("div", { onClick: onClick, className: style('relative min-h-full bg-white pt-0 p-lg', className), role: "dialog", children: [jsxs("div", { className: "sticky py-xl top-0 bg-white z-10", children: [jsx(CloseButton, { className: "absolute top-0 right-0", onClose: handleClose }), jsx("div", { className: "container", children: head })] }), jsx("div", { className: "container pb-6xl", children: children })] }));
|
|
2146
2146
|
});
|
|
2147
2147
|
|
|
2148
|
-
const openDocument = async (id,
|
|
2149
|
-
const document = await getDocument(id);
|
|
2150
|
-
open(jsx(Dialog, { className: "my-6xl max-w-4xl mx-auto px-0 min-h-0 pb-0", children: jsx("iframe", { src: `${document}#toolbar=0`, className: "w-full h-[80vh]", id: "iframe-dialog" }) }));
|
|
2148
|
+
const openDocument = async (open, id, convertToPng = false) => {
|
|
2149
|
+
const document = await getDocument(id, convertToPng);
|
|
2150
|
+
open(jsx(Dialog, { className: "my-6xl max-w-4xl mx-auto px-0 min-h-0 pb-0", children: convertToPng ? (jsx("img", { src: document })) : (jsx("iframe", { src: `${document}#toolbar=0`, className: "w-full h-[80vh]", id: "iframe-dialog" })) }));
|
|
2151
2151
|
};
|
|
2152
2152
|
|
|
2153
2153
|
const OPEN_DOC_BUTTON_TEXT = 'Ознакомиться';
|
|
2154
2154
|
const CheckboxWithDoc = JSX(({ className, error, docId, ...props }) => {
|
|
2155
2155
|
const { open } = useDialogManager();
|
|
2156
|
-
|
|
2156
|
+
const isMobile = useMobileMode();
|
|
2157
|
+
return (jsxs("div", { className: className, children: [jsxs("div", { className: "flex flex-wrap gap-x-m", children: [jsx(Checkbox, { ...props }), docId ? (jsx(LinkButton, { className: "text-primary-main", onClick: () => openDocument(open, docId, isMobile), children: jsx(Text, { children: OPEN_DOC_BUTTON_TEXT }) })) : null] }), renderErrorText(error)] }));
|
|
2157
2158
|
});
|
|
2158
2159
|
|
|
2159
2160
|
const ConsentField = JSX(({ field, input }) => input && input.name ? (jsx(CheckboxWithDoc, { text: CONSENTS[input.name]?.text, docId: CONSENTS[input.name]?.docId, ...getValidation(field(input.name), validatorObj[input.name], input?.required) })) : null);
|
|
@@ -2328,7 +2329,15 @@
|
|
|
2328
2329
|
|
|
2329
2330
|
const ParticipantDateRegistrationField = JSX(({ field, input }) => (jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u043F\u043E \u043C\u0435\u0441\u0442\u0443 \u0436\u0438\u0442\u0435\u043B\u044C\u0441\u0442\u0432\u0430", ...getValidation(field('participantDateRegistration'), validatorObj.participantDateRegistration, input?.required) })));
|
|
2330
2331
|
|
|
2331
|
-
const
|
|
2332
|
+
const MAX_PART = 100;
|
|
2333
|
+
const PartInBusinessField = JSX(({ field, input }) => {
|
|
2334
|
+
const partInBusinessField = {
|
|
2335
|
+
...getValidation(field('partInBusiness'), validatorObj.partInBusiness, input?.required),
|
|
2336
|
+
};
|
|
2337
|
+
const handleChange = (value) => partInBusinessField?.onChange &&
|
|
2338
|
+
partInBusinessField?.onChange(String(Number(value) > MAX_PART ? MAX_PART : Number(value) || ''));
|
|
2339
|
+
return (jsx(InputControl, { label: "\u0414\u043E\u043B\u044F \u0443\u0447\u0430\u0441\u0442\u0438\u044F \u0432 \u0431\u0438\u0437\u043D\u0435\u0441\u0435", placeholder: "\u0432 %", inputLength: 3, type: "number", ...partInBusinessField, ...input, onChange: handleChange }));
|
|
2340
|
+
});
|
|
2332
2341
|
|
|
2333
2342
|
const PartnerCommentsField = JSX(({ field, input }) => {
|
|
2334
2343
|
const { required, ...rest } = input;
|
|
@@ -2559,7 +2568,7 @@
|
|
|
2559
2568
|
bankEmployeeCode: jsx(BankEmpoleeCodeField, { field: field, input: input }),
|
|
2560
2569
|
partInBusiness: jsx(PartInBusinessField, { field: field, input: input }),
|
|
2561
2570
|
};
|
|
2562
|
-
return isRenderField({ input, field }) ? (jsx("div", { children: InputsMap[input?.name] }, String(i))) : null;
|
|
2571
|
+
return isRenderField({ input, field }) ? (jsx("div", { children: InputsMap[input?.name || ''] }, String(i))) : null;
|
|
2563
2572
|
};
|
|
2564
2573
|
|
|
2565
2574
|
const inputColumnStyles = (column) => column === 2 ? '@xl:grid-cols-2' : '';
|
|
@@ -2686,7 +2695,7 @@
|
|
|
2686
2695
|
const getInitialFormState$2 = (inputs, typeForm = '') => {
|
|
2687
2696
|
const formState = Object.fromEntries(inputs.map((_) => [
|
|
2688
2697
|
_.name,
|
|
2689
|
-
(_.fieldType === 'ved' && _?.defaultValue) || initialFormState$1[_.name],
|
|
2698
|
+
(_.fieldType === 'ved' && _?.defaultValue) || initialFormState$1[_.name || ''],
|
|
2690
2699
|
]));
|
|
2691
2700
|
if (formState?.serviceType && typeForm === 'PREMIUMSERVICE') {
|
|
2692
2701
|
formState.serviceType = SERVICE_TYPES[1];
|
|
@@ -2822,8 +2831,8 @@
|
|
|
2822
2831
|
return consentInputs.length > 2 ? (jsxs("div", { children: [restInputs.map(getField(field, typeForm)), jsx(GroupedConsents, { inputs: consentInputs, field: field })] })) : ((inputs || [])?.map(getField(field, typeForm)));
|
|
2823
2832
|
};
|
|
2824
2833
|
const splitInputs = (inputs) => ({
|
|
2825
|
-
consentInputs: inputs?.filter((_) => Object.keys(CONSENTS).includes(_.name)) || [],
|
|
2826
|
-
restInputs: inputs?.filter((_) => !Object.keys(CONSENTS).includes(_.name)) || [],
|
|
2834
|
+
consentInputs: inputs?.filter((_) => Object.keys(CONSENTS).includes(_.name || '')) || [],
|
|
2835
|
+
restInputs: inputs?.filter((_) => !Object.keys(CONSENTS).includes(_.name || '')) || [],
|
|
2827
2836
|
});
|
|
2828
2837
|
|
|
2829
2838
|
/* eslint-disable max-lines */
|
|
@@ -2867,7 +2876,7 @@
|
|
|
2867
2876
|
}
|
|
2868
2877
|
const formState = Object.fromEntries(inputs.map((_) => [
|
|
2869
2878
|
_.name,
|
|
2870
|
-
(_.fieldType === 'ved' && _?.defaultValue) || initialFormState[_.name],
|
|
2879
|
+
(_.fieldType === 'ved' && _?.defaultValue) || initialFormState[_.name || ''],
|
|
2871
2880
|
]));
|
|
2872
2881
|
return { ...formState, typeForm: { key: typeForm, text: '' } };
|
|
2873
2882
|
};
|
|
@@ -3199,6 +3208,7 @@
|
|
|
3199
3208
|
const [confirmStatus, setConfirmStatus] = useState('');
|
|
3200
3209
|
const [showRefuceContent, setShowRefuceContent] = useState(false);
|
|
3201
3210
|
const { open, close } = useDialogManager();
|
|
3211
|
+
const isMobile = useMobileMode();
|
|
3202
3212
|
const handleClose = useCallback(() => {
|
|
3203
3213
|
close();
|
|
3204
3214
|
handleSubmit(confirmStatus);
|
|
@@ -3210,7 +3220,7 @@
|
|
|
3210
3220
|
}
|
|
3211
3221
|
}, []);
|
|
3212
3222
|
const consentText = showRefuceContent ? refuseConsentText : defaultConsentText;
|
|
3213
|
-
return (jsx(Dialog, { className: "my-6xl max-w-3xl w-full min-h-fit mx-auto rounded-lg", onClose: onClose, children: jsxs("div", { className: "flex flex-col gap-lg items-center", children: [jsx("div", { role: "button", onClick: () => openDocument(CONSENT_BKI_ID,
|
|
3223
|
+
return (jsx(Dialog, { className: "my-6xl max-w-3xl w-full min-h-fit mx-auto rounded-lg", onClose: onClose, children: jsxs("div", { className: "flex flex-col gap-lg items-center", children: [jsx("div", { role: "button", onClick: () => openDocument(open, CONSENT_BKI_ID, isMobile), children: jsx(Heading, { className: "text-center text-balance", title: consentText.title }) }), jsx(Paragraph, { align: "text-center", children: consentText.description }), jsx(RadioButtonGroup, { className: "whitespace-normal", orientation: "horizontal", items: ITEMS$1, value: confirmStatus, onChange: handleConfirmChange }), jsx(Button, { disabled: !confirmStatus, type: "button", onClick: handleClose, children: "\u041F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u0442\u044C" })] }) }));
|
|
3214
3224
|
});
|
|
3215
3225
|
const ITEMS$1 = [
|
|
3216
3226
|
{ id: 'SIGNED', text: 'Подписать' },
|
|
@@ -3375,7 +3385,7 @@
|
|
|
3375
3385
|
const [isLoading, setIsLoading] = useState(false);
|
|
3376
3386
|
const [profileId] = useLocalStorage('profileId');
|
|
3377
3387
|
const [, setEsiaData] = useLocalStorage('esiaData');
|
|
3378
|
-
const params = new URLSearchParams(decodeURIComponent(
|
|
3388
|
+
const params = new URLSearchParams(decodeURIComponent(globalThis.location.search));
|
|
3379
3389
|
const esiaAuth = params.get('esiaAuth');
|
|
3380
3390
|
const updateEsiaProfile = useCallback(async () => {
|
|
3381
3391
|
const code = params.get('code');
|
|
@@ -5093,9 +5103,9 @@
|
|
|
5093
5103
|
|
|
5094
5104
|
const ProgressBar = JSX(({ step = 10, description, showPercentage = true }) => (jsxs("div", { children: [jsx("div", { className: "h-4 w-full bg-gray relative", children: jsx("div", { className: "h-4 bg-green", style: { width: `${step}%` } }) }), jsxs("div", { className: "relative", children: [showPercentage ? jsxs("div", { className: "absolute left-2/4 text-green", children: [step, "%"] }) : null, description ? jsx("div", { className: "text-right mr-4 text-gray", children: description }) : null] })] })));
|
|
5095
5105
|
|
|
5096
|
-
const CreditFormProgress = JSX(({ step =
|
|
5097
|
-
const progress = useMemo(() => (step / totalSteps) * 100, [step, totalSteps]);
|
|
5098
|
-
return (jsx("div", { className: "py-lg px-5xl bg-white col-span-12", children: jsxs("div", { children: [jsxs("span", { className: "font-bold", children: ["\u0428\u0430\u0433 ", step, " \u0438\u0437 ", totalSteps, "."] }),
|
|
5106
|
+
const CreditFormProgress = JSX(({ step = 0, totalSteps = 5, stepsTitles = [] }) => {
|
|
5107
|
+
const progress = useMemo(() => ((step + 1) / totalSteps) * 100, [step, totalSteps]);
|
|
5108
|
+
return (jsx("div", { className: "py-lg px-5xl bg-white col-span-12", children: jsxs("div", { children: [jsxs("span", { className: "font-bold", children: ["\u0428\u0430\u0433 ", step + 1, " \u0438\u0437 ", totalSteps, "."] }), stepsTitles[step] || null, jsx(ProgressBar, { step: progress, showPercentage: false })] }) }));
|
|
5099
5109
|
});
|
|
5100
5110
|
|
|
5101
5111
|
const formStateMap = {
|
|
@@ -5177,7 +5187,8 @@
|
|
|
5177
5187
|
};
|
|
5178
5188
|
|
|
5179
5189
|
const StepsNavigationButtons = JSX(({ step, onPrevStep }) => {
|
|
5180
|
-
|
|
5190
|
+
const isFirstStep = step === 0;
|
|
5191
|
+
return (jsxs("div", { className: 'flex justify-between', children: [jsx(Button, { onClick: onPrevStep, className: style('w-full @xl:w-auto'), type: "button", version: "secondary", disabled: isFirstStep, children: "\u041D\u0430\u0437\u0430\u0434" }), jsx(Button, { className: style('w-full @xl:w-auto'), type: "submit", children: "\u0414\u0430\u043B\u0435\u0435" })] }));
|
|
5181
5192
|
});
|
|
5182
5193
|
|
|
5183
5194
|
const useCreditFormApi = ({ inputs, onNextStep, saveStep }) => {
|
|
@@ -5195,7 +5206,7 @@
|
|
|
5195
5206
|
};
|
|
5196
5207
|
};
|
|
5197
5208
|
|
|
5198
|
-
const CreditFormStep = JSX(({
|
|
5209
|
+
const CreditFormStep = JSX(({ step, sections, onPrevStep, onNextStep, inputs }) => {
|
|
5199
5210
|
const [localStorageData, saveStep] = useLocalStorage('leadForm');
|
|
5200
5211
|
const initialState = getInitialFormState(step, localStorageData);
|
|
5201
5212
|
const { handleSubmit } = useCreditFormApi({
|
|
@@ -5204,10 +5215,10 @@
|
|
|
5204
5215
|
saveStep,
|
|
5205
5216
|
});
|
|
5206
5217
|
const [, { field, onSubmit }] = useForm(initialState, { onSubmit: handleSubmit });
|
|
5207
|
-
return (jsxs("form", { onSubmit: onSubmit, className: "space-y-m", children: [renderStep$1({ sections, field }), jsx(StepsNavigationButtons, { step: step,
|
|
5218
|
+
return (jsxs("form", { onSubmit: onSubmit, className: "space-y-m", children: [renderStep$1({ sections, field }), jsx(StepsNavigationButtons, { step: step, onPrevStep: onPrevStep })] }));
|
|
5208
5219
|
});
|
|
5209
5220
|
const renderStep$1 = ({ sections, field }) => {
|
|
5210
|
-
return sections
|
|
5221
|
+
return sections?.map((_, i) => (jsxs("div", { className: style(inputColumnStyles(_.columns), 'grid gap-x-m'), children: [renderInfo$1(_?.inputs), renderTitle(_?.title), renderInputs({ field, inputs: _?.inputs })] }, `section-${i}`)));
|
|
5211
5222
|
};
|
|
5212
5223
|
const renderInfo$1 = (inputs = []) => {
|
|
5213
5224
|
const infoInputs = inputs.filter((_) => _.fieldType === 'info');
|
|
@@ -5216,9 +5227,8 @@
|
|
|
5216
5227
|
|
|
5217
5228
|
/* eslint-disable max-lines */
|
|
5218
5229
|
/* eslint-disable max-len */
|
|
5219
|
-
|
|
5220
|
-
|
|
5221
|
-
1: [
|
|
5230
|
+
const stepsSectionsMap = [
|
|
5231
|
+
[
|
|
5222
5232
|
{
|
|
5223
5233
|
title: 'Персональные данные',
|
|
5224
5234
|
columns: 2,
|
|
@@ -5273,7 +5283,7 @@
|
|
|
5273
5283
|
],
|
|
5274
5284
|
},
|
|
5275
5285
|
],
|
|
5276
|
-
|
|
5286
|
+
[
|
|
5277
5287
|
{
|
|
5278
5288
|
title: 'Данные о трудоустройстве',
|
|
5279
5289
|
inputs: [],
|
|
@@ -5337,7 +5347,7 @@
|
|
|
5337
5347
|
inputs: [{ fieldType: 'common', name: 'fullAddress', required: true }],
|
|
5338
5348
|
},
|
|
5339
5349
|
],
|
|
5340
|
-
|
|
5350
|
+
[
|
|
5341
5351
|
{
|
|
5342
5352
|
title: 'Семейное положение',
|
|
5343
5353
|
},
|
|
@@ -5381,7 +5391,7 @@
|
|
|
5381
5391
|
inputs: [{ fieldType: 'common', name: 'armyIdFlg' }],
|
|
5382
5392
|
},
|
|
5383
5393
|
],
|
|
5384
|
-
|
|
5394
|
+
[
|
|
5385
5395
|
{
|
|
5386
5396
|
title: 'Дополнительные сведения',
|
|
5387
5397
|
columns: 1,
|
|
@@ -5403,7 +5413,7 @@
|
|
|
5403
5413
|
inputs: [{ fieldType: 'common', name: 'creditInRshbCd' }],
|
|
5404
5414
|
},
|
|
5405
5415
|
],
|
|
5406
|
-
|
|
5416
|
+
[
|
|
5407
5417
|
{
|
|
5408
5418
|
title: 'Отделение Банка',
|
|
5409
5419
|
columns: 1,
|
|
@@ -5432,7 +5442,7 @@
|
|
|
5432
5442
|
inputs: [{ fieldType: 'common', name: 'bankEmployeeCode' }],
|
|
5433
5443
|
},
|
|
5434
5444
|
],
|
|
5435
|
-
|
|
5445
|
+
];
|
|
5436
5446
|
|
|
5437
5447
|
const STEPS_COUNT = 5;
|
|
5438
5448
|
const STEPS_TITLES = [
|
|
@@ -5443,17 +5453,17 @@
|
|
|
5443
5453
|
'Отделение Банка',
|
|
5444
5454
|
];
|
|
5445
5455
|
const CreditForm = JSX(({ className, ...rest }) => {
|
|
5446
|
-
const [step, setStep] = useState(
|
|
5456
|
+
const [step, setStep] = useState(0);
|
|
5447
5457
|
const sections = useMemo(() => stepsSectionsMap[step], [step]);
|
|
5448
5458
|
const inputs = (sections?.flatMap((_) => _?.inputs) || []);
|
|
5449
5459
|
const handleNextStep = useCallback(() => {
|
|
5450
|
-
setStep((_) => Math.min(_ + 1, STEPS_COUNT));
|
|
5460
|
+
setStep((_) => Math.min(_ + 1, STEPS_COUNT - 1));
|
|
5451
5461
|
}, []);
|
|
5452
5462
|
const handlePrevStep = useCallback(() => {
|
|
5453
5463
|
//TODO search hook - 1,
|
|
5454
5464
|
setStep((_) => Math.max(_ - 1, 0));
|
|
5455
5465
|
}, []);
|
|
5456
|
-
return (jsx(BlockWrapper, { className: style('bg-transparent', className), defaultPadding: "p-6xl", ...rest, children: jsxs("div", { className: "container grid grid-cols-12", children: [jsx(CreditFormProgress, { stepsTitles: STEPS_TITLES, step: step, totalSteps: STEPS_COUNT }), jsx("div", { className: "py-lg px-5xl mt-2xs bg-white col-span-12", children: jsx(CreditFormStep, { inputs: inputs,
|
|
5466
|
+
return (jsx(BlockWrapper, { className: style('bg-transparent', className), defaultPadding: "p-6xl", ...rest, children: jsxs("div", { className: "container grid grid-cols-12", children: [jsx(CreditFormProgress, { stepsTitles: STEPS_TITLES, step: step, totalSteps: STEPS_COUNT }), jsx("div", { className: "py-lg px-5xl mt-2xs bg-white col-span-12", children: jsx(CreditFormStep, { inputs: inputs, step: step, sections: sections, onNextStep: handleNextStep, onPrevStep: handlePrevStep }, String(step)) })] }) }));
|
|
5457
5467
|
});
|
|
5458
5468
|
|
|
5459
5469
|
const isRateRow = (rateRow) => typeof rateRow?.minMonths === 'number' && typeof rateRow?.maxMonths === 'number';
|
|
@@ -8247,7 +8257,7 @@
|
|
|
8247
8257
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
8248
8258
|
});
|
|
8249
8259
|
|
|
8250
|
-
const packageVersion = "0.14.
|
|
8260
|
+
const packageVersion = "0.14.621";
|
|
8251
8261
|
|
|
8252
8262
|
exports.Blocks = Blocks;
|
|
8253
8263
|
exports.ContentPage = ContentPage;
|