@redneckz/wildless-cms-uni-blocks 0.14.619 → 0.14.621
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/api/RetailAPI/getLink.d.ts +7 -0
- package/bundle/api/RetailAPI/updateProfileEsia.d.ts +66 -0
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +119 -56
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -0
- package/bundle/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +2 -1
- package/bundle/components/ApplicationLeadForm/useInitApplicationLead.d.ts +3 -1
- package/bundle/icons/IconName.d.ts +4 -2
- package/bundle/ui-kit/Checkbox/getDocument.d.ts +1 -1
- package/bundle/ui-kit/ConsentBkiDialog/useConsentBkiDialog.d.ts +1 -1
- package/bundle/ui-kit/DialogManager/openDocument.d.ts +1 -1
- package/bundle/ui-kit/EsiaLoginDialog/EsiaLoginDialog.d.ts +4 -0
- package/bundle/ui-kit/EsiaLoginDialog/useEsiaLoginDialog.d.ts +9 -0
- package/cosmos-static/icons/GosUslugiIcon.svg +1 -0
- 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/api/RetailAPI/getLink.d.ts +7 -0
- package/dist/api/RetailAPI/getLink.js +6 -0
- package/dist/api/RetailAPI/getLink.js.map +1 -0
- package/dist/api/RetailAPI/updateProfileEsia.d.ts +66 -0
- package/dist/api/RetailAPI/updateProfileEsia.js +6 -0
- package/dist/api/RetailAPI/updateProfileEsia.js.map +1 -0
- package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +5 -3
- package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/dist/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -0
- package/dist/components/ApplicationLeadForm/consents.js +8 -8
- package/dist/components/ApplicationLeadForm/consents.js.map +1 -1
- package/dist/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +2 -1
- package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +28 -21
- package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/dist/components/ApplicationLeadForm/useInitApplicationLead.d.ts +3 -1
- package/dist/components/ApplicationLeadForm/useInitApplicationLead.js +34 -3
- package/dist/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
- package/dist/icons/IconName.d.ts +4 -2
- package/dist/icons/IconName.js +3 -1
- package/dist/icons/IconName.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/ConsentBkiDialog/useConsentBkiDialog.d.ts +1 -1
- package/dist/ui-kit/ConsentBkiDialog/useConsentBkiDialog.js +4 -7
- package/dist/ui-kit/ConsentBkiDialog/useConsentBkiDialog.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/EsiaLoginDialog/EsiaLoginDialog.d.ts +4 -0
- package/dist/ui-kit/EsiaLoginDialog/EsiaLoginDialog.js +21 -0
- package/dist/ui-kit/EsiaLoginDialog/EsiaLoginDialog.js.map +1 -0
- package/dist/ui-kit/EsiaLoginDialog/useEsiaLoginDialog.d.ts +9 -0
- package/dist/ui-kit/EsiaLoginDialog/useEsiaLoginDialog.js +19 -0
- package/dist/ui-kit/EsiaLoginDialog/useEsiaLoginDialog.js.map +1 -0
- 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/api/RetailAPI/getLink.d.ts +7 -0
- package/lib/api/RetailAPI/getLink.js +3 -0
- package/lib/api/RetailAPI/getLink.js.map +1 -0
- package/lib/api/RetailAPI/updateProfileEsia.d.ts +66 -0
- package/lib/api/RetailAPI/updateProfileEsia.js +3 -0
- package/lib/api/RetailAPI/updateProfileEsia.js.map +1 -0
- package/lib/common.css +1 -1
- package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +6 -4
- package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/lib/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -0
- package/lib/components/ApplicationLeadForm/consents.js +8 -8
- package/lib/components/ApplicationLeadForm/consents.js.map +1 -1
- package/lib/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +2 -1
- package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +28 -21
- package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/lib/components/ApplicationLeadForm/useInitApplicationLead.d.ts +3 -1
- package/lib/components/ApplicationLeadForm/useInitApplicationLead.js +35 -4
- package/lib/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
- package/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.d.ts +1 -1
- package/lib/icons/IconName.d.ts +4 -2
- package/lib/icons/IconName.js +3 -1
- package/lib/icons/IconName.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/ConsentBkiDialog/useConsentBkiDialog.d.ts +1 -1
- package/lib/ui-kit/ConsentBkiDialog/useConsentBkiDialog.js +4 -7
- package/lib/ui-kit/ConsentBkiDialog/useConsentBkiDialog.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/EsiaLoginDialog/EsiaLoginDialog.d.ts +4 -0
- package/lib/ui-kit/EsiaLoginDialog/EsiaLoginDialog.fixture.d.ts +6 -0
- package/lib/ui-kit/EsiaLoginDialog/EsiaLoginDialog.js +19 -0
- package/lib/ui-kit/EsiaLoginDialog/EsiaLoginDialog.js.map +1 -0
- package/lib/ui-kit/EsiaLoginDialog/useEsiaLoginDialog.d.ts +9 -0
- package/lib/ui-kit/EsiaLoginDialog/useEsiaLoginDialog.js +16 -0
- package/lib/ui-kit/EsiaLoginDialog/useEsiaLoginDialog.js.map +1 -0
- package/mobile/bundle/api/RetailAPI/feedbackById.d.ts +1 -1
- package/mobile/bundle/api/RetailAPI/getLink.d.ts +7 -0
- package/mobile/bundle/api/RetailAPI/updateProfileEsia.d.ts +66 -0
- package/mobile/bundle/bundle.umd.js +119 -56
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -0
- package/mobile/bundle/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +2 -1
- package/mobile/bundle/components/ApplicationLeadForm/useInitApplicationLead.d.ts +3 -1
- package/mobile/bundle/icons/IconName.d.ts +4 -2
- package/mobile/bundle/ui-kit/Checkbox/getDocument.d.ts +1 -1
- package/mobile/bundle/ui-kit/ConsentBkiDialog/useConsentBkiDialog.d.ts +1 -1
- package/mobile/bundle/ui-kit/DialogManager/openDocument.d.ts +1 -1
- package/mobile/bundle/ui-kit/EsiaLoginDialog/EsiaLoginDialog.d.ts +4 -0
- package/mobile/bundle/ui-kit/EsiaLoginDialog/useEsiaLoginDialog.d.ts +9 -0
- 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/api/RetailAPI/getLink.d.ts +7 -0
- package/mobile/dist/api/RetailAPI/getLink.js +6 -0
- package/mobile/dist/api/RetailAPI/getLink.js.map +1 -0
- package/mobile/dist/api/RetailAPI/updateProfileEsia.d.ts +66 -0
- package/mobile/dist/api/RetailAPI/updateProfileEsia.js +6 -0
- package/mobile/dist/api/RetailAPI/updateProfileEsia.js.map +1 -0
- package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +5 -3
- package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -0
- package/mobile/dist/components/ApplicationLeadForm/consents.js +8 -8
- package/mobile/dist/components/ApplicationLeadForm/consents.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +2 -1
- package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +28 -21
- package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.d.ts +3 -1
- package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.js +34 -3
- package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
- package/mobile/dist/icons/IconName.d.ts +4 -2
- package/mobile/dist/icons/IconName.js +3 -1
- package/mobile/dist/icons/IconName.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/ConsentBkiDialog/useConsentBkiDialog.d.ts +1 -1
- package/mobile/dist/ui-kit/ConsentBkiDialog/useConsentBkiDialog.js +4 -7
- package/mobile/dist/ui-kit/ConsentBkiDialog/useConsentBkiDialog.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/EsiaLoginDialog/EsiaLoginDialog.d.ts +4 -0
- package/mobile/dist/ui-kit/EsiaLoginDialog/EsiaLoginDialog.js +21 -0
- package/mobile/dist/ui-kit/EsiaLoginDialog/EsiaLoginDialog.js.map +1 -0
- package/mobile/dist/ui-kit/EsiaLoginDialog/useEsiaLoginDialog.d.ts +9 -0
- package/mobile/dist/ui-kit/EsiaLoginDialog/useEsiaLoginDialog.js +19 -0
- package/mobile/dist/ui-kit/EsiaLoginDialog/useEsiaLoginDialog.js.map +1 -0
- 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/api/RetailAPI/getLink.d.ts +7 -0
- package/mobile/lib/api/RetailAPI/getLink.js +3 -0
- package/mobile/lib/api/RetailAPI/getLink.js.map +1 -0
- package/mobile/lib/api/RetailAPI/updateProfileEsia.d.ts +66 -0
- package/mobile/lib/api/RetailAPI/updateProfileEsia.js +3 -0
- package/mobile/lib/api/RetailAPI/updateProfileEsia.js.map +1 -0
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +6 -4
- package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -0
- package/mobile/lib/components/ApplicationLeadForm/consents.js +8 -8
- package/mobile/lib/components/ApplicationLeadForm/consents.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +2 -1
- package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +28 -21
- package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.d.ts +3 -1
- package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.js +35 -4
- package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
- package/mobile/lib/icons/IconName.d.ts +4 -2
- package/mobile/lib/icons/IconName.js +3 -1
- package/mobile/lib/icons/IconName.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/ConsentBkiDialog/useConsentBkiDialog.d.ts +1 -1
- package/mobile/lib/ui-kit/ConsentBkiDialog/useConsentBkiDialog.js +4 -7
- package/mobile/lib/ui-kit/ConsentBkiDialog/useConsentBkiDialog.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/EsiaLoginDialog/EsiaLoginDialog.d.ts +4 -0
- package/mobile/lib/ui-kit/EsiaLoginDialog/EsiaLoginDialog.js +19 -0
- package/mobile/lib/ui-kit/EsiaLoginDialog/EsiaLoginDialog.js.map +1 -0
- package/mobile/lib/ui-kit/EsiaLoginDialog/useEsiaLoginDialog.d.ts +9 -0
- package/mobile/lib/ui-kit/EsiaLoginDialog/useEsiaLoginDialog.js +16 -0
- package/mobile/lib/ui-kit/EsiaLoginDialog/useEsiaLoginDialog.js.map +1 -0
- package/mobile/src/api/RetailAPI/feedbackById.ts +5 -2
- package/mobile/src/api/RetailAPI/getLink.ts +12 -0
- package/mobile/src/api/RetailAPI/updateProfileEsia.ts +71 -0
- package/mobile/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +16 -3
- package/mobile/src/components/ApplicationLeadForm/ApplicationLeadFormContent.ts +2 -0
- package/mobile/src/components/ApplicationLeadForm/consents.ts +8 -8
- package/mobile/src/components/ApplicationLeadForm/useApplicationLeadApi.ts +53 -26
- package/mobile/src/components/ApplicationLeadForm/useInitApplicationLead.ts +40 -4
- package/mobile/src/icons/GosUslugiIcon.svg +11 -0
- package/mobile/src/icons/IconName.ts +5 -5
- 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/ConsentBkiDialog/useConsentBkiDialog.tsx +4 -8
- package/mobile/src/ui-kit/DialogManager/openDocument.tsx +11 -3
- package/mobile/src/ui-kit/EsiaLoginDialog/EsiaLoginDialog.tsx +44 -0
- package/mobile/src/ui-kit/EsiaLoginDialog/useEsiaLoginDialog.tsx +23 -0
- package/package.json +2 -2
- package/src/api/RetailAPI/feedbackById.ts +5 -2
- package/src/api/RetailAPI/getLink.ts +12 -0
- package/src/api/RetailAPI/updateProfileEsia.ts +71 -0
- package/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +16 -3
- package/src/components/ApplicationLeadForm/ApplicationLeadFormContent.ts +2 -0
- package/src/components/ApplicationLeadForm/consents.ts +8 -8
- package/src/components/ApplicationLeadForm/useApplicationLeadApi.ts +53 -26
- package/src/components/ApplicationLeadForm/useInitApplicationLead.ts +40 -4
- package/src/icons/GosUslugiIcon.svg +11 -0
- package/src/icons/IconName.ts +360 -6
- 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/ConsentBkiDialog/useConsentBkiDialog.tsx +4 -8
- package/src/ui-kit/DialogManager/openDocument.tsx +11 -3
- package/src/ui-kit/EsiaLoginDialog/EsiaLoginDialog.fixture.tsx +7 -0
- package/src/ui-kit/EsiaLoginDialog/EsiaLoginDialog.tsx +44 -0
- package/src/ui-kit/EsiaLoginDialog/useEsiaLoginDialog.tsx +23 -0
|
@@ -2092,25 +2092,25 @@
|
|
|
2092
2092
|
text: 'Согласие на обработку персональных данных',
|
|
2093
2093
|
docId: 4,
|
|
2094
2094
|
},
|
|
2095
|
+
consentInformFlg: {
|
|
2096
|
+
text: 'Согласие на информирование о продуктах и услугах Банка',
|
|
2097
|
+
docId: 14,
|
|
2098
|
+
},
|
|
2095
2099
|
consentProviderFlg: {
|
|
2096
2100
|
text: 'Согласие об использовании простой электронной подписи',
|
|
2097
2101
|
docId: 5,
|
|
2098
2102
|
},
|
|
2103
|
+
consentOthersFlg: {
|
|
2104
|
+
text: 'Прочие согласия',
|
|
2105
|
+
docId: 1,
|
|
2106
|
+
},
|
|
2099
2107
|
consentPfrFlg: {
|
|
2100
2108
|
text: 'Согласие на запрос в ПФР',
|
|
2101
2109
|
docId: 3,
|
|
2102
2110
|
},
|
|
2103
|
-
consentInformFlg: {
|
|
2104
|
-
text: 'Согласие на информирование о продуктах и услугах Банка',
|
|
2105
|
-
docId: 14,
|
|
2106
|
-
},
|
|
2107
2111
|
consentToReceiveMaterials: {
|
|
2108
2112
|
text: 'Согласен на получение информационных и аналитических материалов по электронной почте',
|
|
2109
2113
|
},
|
|
2110
|
-
consentOthersFlg: {
|
|
2111
|
-
text: 'Прочие согласия',
|
|
2112
|
-
docId: 1,
|
|
2113
|
-
},
|
|
2114
2114
|
};
|
|
2115
2115
|
|
|
2116
2116
|
async function doRequest(url, method, body) {
|
|
@@ -2132,13 +2132,13 @@
|
|
|
2132
2132
|
return token ? { Authorization: `Bearer ${token}` } : null;
|
|
2133
2133
|
};
|
|
2134
2134
|
|
|
2135
|
-
const feedbackById = async (id) => {
|
|
2136
|
-
const response = await doRequest(`/feedback/file?id=${encodeURIComponent(id)}`, 'GET');
|
|
2135
|
+
const feedbackById = async (id, convertToPng = false) => {
|
|
2136
|
+
const response = await doRequest(`/feedback/file?id=${encodeURIComponent(id)}&convertToPngFlg=${convertToPng}`, 'GET');
|
|
2137
2137
|
return await response.blob();
|
|
2138
2138
|
};
|
|
2139
2139
|
|
|
2140
|
-
const getDocument = async (id) => {
|
|
2141
|
-
const response = await feedbackById(id);
|
|
2140
|
+
const getDocument = async (id, convertToPng = false) => {
|
|
2141
|
+
const response = await feedbackById(id, convertToPng);
|
|
2142
2142
|
return URL.createObjectURL(response);
|
|
2143
2143
|
};
|
|
2144
2144
|
|
|
@@ -2153,15 +2153,16 @@
|
|
|
2153
2153
|
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 })] }));
|
|
2154
2154
|
});
|
|
2155
2155
|
|
|
2156
|
-
const openDocument = async (id,
|
|
2157
|
-
const document = await getDocument(id);
|
|
2158
|
-
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" }) }));
|
|
2156
|
+
const openDocument = async (open, id, convertToPng = false) => {
|
|
2157
|
+
const document = await getDocument(id, convertToPng);
|
|
2158
|
+
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" })) }));
|
|
2159
2159
|
};
|
|
2160
2160
|
|
|
2161
2161
|
const OPEN_DOC_BUTTON_TEXT = 'Ознакомиться';
|
|
2162
2162
|
const CheckboxWithDoc = JSX(({ className, error, docId, ...props }) => {
|
|
2163
2163
|
const { open } = useDialogManager();
|
|
2164
|
-
|
|
2164
|
+
const isMobile = useMobileMode();
|
|
2165
|
+
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)] }));
|
|
2165
2166
|
});
|
|
2166
2167
|
|
|
2167
2168
|
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);
|
|
@@ -2764,6 +2765,10 @@
|
|
|
2764
2765
|
return [storedValue, setValue];
|
|
2765
2766
|
}
|
|
2766
2767
|
|
|
2768
|
+
const Loader = JSX(({ color = 'text-primary-main', position = 'absolute', blur = true }) => (jsx("div", { className: style('flex justify-center items-center h-full w-full z-50', position, {
|
|
2769
|
+
'backdrop-blur': blur,
|
|
2770
|
+
}), children: jsx("div", { className: style('inline-block h-28 w-28', 'animate-spin rounded-full', 'border-8 border-solid border-current', 'border-r-transparent', color), role: "status" }) })));
|
|
2771
|
+
|
|
2767
2772
|
const Foldable = JSX(({ className = '', isFoldButtonOnTop = false, unfoldedByDefault = false, renderFoldableSection, renderFoldButton, }) => {
|
|
2768
2773
|
const [isUnfolded, setIsUnfolded] = useState(unfoldedByDefault);
|
|
2769
2774
|
const onToggle = useCallback(() => {
|
|
@@ -3019,10 +3024,6 @@
|
|
|
3019
3024
|
};
|
|
3020
3025
|
};
|
|
3021
3026
|
|
|
3022
|
-
const Loader = JSX(({ color = 'text-primary-main', position = 'absolute', blur = true }) => (jsx("div", { className: style('flex justify-center items-center h-full w-full z-50', position, {
|
|
3023
|
-
'backdrop-blur': blur,
|
|
3024
|
-
}), children: jsx("div", { className: style('inline-block h-28 w-28', 'animate-spin rounded-full', 'border-8 border-solid border-current', 'border-r-transparent', color), role: "status" }) })));
|
|
3025
|
-
|
|
3026
3027
|
const Timer = JSX(({ time, setTime, className }) => {
|
|
3027
3028
|
useEffect(() => {
|
|
3028
3029
|
const timer = setInterval(() => {
|
|
@@ -3207,6 +3208,7 @@
|
|
|
3207
3208
|
const [confirmStatus, setConfirmStatus] = useState('');
|
|
3208
3209
|
const [showRefuceContent, setShowRefuceContent] = useState(false);
|
|
3209
3210
|
const { open, close } = useDialogManager();
|
|
3211
|
+
const isMobile = useMobileMode();
|
|
3210
3212
|
const handleClose = useCallback(() => {
|
|
3211
3213
|
close();
|
|
3212
3214
|
handleSubmit(confirmStatus);
|
|
@@ -3218,7 +3220,7 @@
|
|
|
3218
3220
|
}
|
|
3219
3221
|
}, []);
|
|
3220
3222
|
const consentText = showRefuceContent ? refuseConsentText : defaultConsentText;
|
|
3221
|
-
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" })] }) }));
|
|
3222
3224
|
});
|
|
3223
3225
|
const ITEMS$1 = [
|
|
3224
3226
|
{ id: 'SIGNED', text: 'Подписать' },
|
|
@@ -3226,12 +3228,9 @@
|
|
|
3226
3228
|
];
|
|
3227
3229
|
const CONSENT_BKI_ID = 2;
|
|
3228
3230
|
|
|
3229
|
-
const useConsentBkiDialog = () => {
|
|
3231
|
+
const useConsentBkiDialog = (onClose) => {
|
|
3230
3232
|
const { open, closeAll } = useDialogManager();
|
|
3231
3233
|
const verifyPhoneDialog = useVerifyPhoneDialog();
|
|
3232
|
-
const redirectToCreditForm = () => {
|
|
3233
|
-
globalThis.location.href = '/credit-lead';
|
|
3234
|
-
};
|
|
3235
3234
|
const handleSuccessVerify = (profileId) => async (smsCode) => {
|
|
3236
3235
|
if (profileId) {
|
|
3237
3236
|
await updateUserProfile({
|
|
@@ -3242,7 +3241,7 @@
|
|
|
3242
3241
|
},
|
|
3243
3242
|
});
|
|
3244
3243
|
}
|
|
3245
|
-
|
|
3244
|
+
onClose();
|
|
3246
3245
|
};
|
|
3247
3246
|
const handleSubmitBkiConstent = (phone, profileId) => async (confirmStatus) => {
|
|
3248
3247
|
await closeAll();
|
|
@@ -3250,11 +3249,11 @@
|
|
|
3250
3249
|
verifyPhoneDialog.open(handleSuccessVerify(profileId), verifyPhoneContent$1(phone));
|
|
3251
3250
|
}
|
|
3252
3251
|
else {
|
|
3253
|
-
|
|
3252
|
+
onClose();
|
|
3254
3253
|
}
|
|
3255
3254
|
};
|
|
3256
3255
|
return {
|
|
3257
|
-
open: (phone, profileId) => open(jsx(ConsentBkiDialog, { handleSubmit: handleSubmitBkiConstent(phone, profileId), onClose:
|
|
3256
|
+
open: (phone, profileId) => open(jsx(ConsentBkiDialog, { handleSubmit: handleSubmitBkiConstent(phone, profileId), onClose: onClose })),
|
|
3258
3257
|
};
|
|
3259
3258
|
};
|
|
3260
3259
|
const verifyPhoneContent$1 = (phone) => ({
|
|
@@ -3266,12 +3265,39 @@
|
|
|
3266
3265
|
<ul><li>согласие на запрос информации в БКИ</li></ul>`,
|
|
3267
3266
|
});
|
|
3268
3267
|
|
|
3269
|
-
const
|
|
3268
|
+
const getLink = (body) => doRequest('/esia/getLink', 'POST', body);
|
|
3269
|
+
|
|
3270
|
+
const EsiaLoginDialog = JSX(function ({ handleClose }) {
|
|
3271
|
+
const handleAuth = useCallback(async () => {
|
|
3272
|
+
const resp = await getLink({
|
|
3273
|
+
redirectUri: globalThis.location.href + '&esiaAuth=true',
|
|
3274
|
+
});
|
|
3275
|
+
if (resp) {
|
|
3276
|
+
globalThis.location.href = resp.link;
|
|
3277
|
+
}
|
|
3278
|
+
}, []);
|
|
3279
|
+
return (jsx(Dialog, { className: "my-6xl max-w-lg w-full min-h-fit mx-auto rounded-lg", onClose: handleClose, children: jsxs("div", { className: "flex flex-col gap-lg items-center rounded-md", children: [jsxs("div", { className: "flex items-center justify-around w-full", children: [jsxs("ul", { className: "list-disc", 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, { image: { icon: 'GosUslugiIcon', iconVersion: 'normal' }, height: "70" })] }), jsxs("div", { className: "flex items-center justify-between w-full m-0", children: [jsx(Button, { type: "button", onClick: handleAuth, children: "\u0417\u0430\u043F\u043E\u043B\u043D\u0438\u0442\u044C \u0447\u0435\u0440\u0435\u0437 \u0413\u043E\u0441\u0443\u0441\u043B\u0443\u0433\u0438" }), jsx(Button, { type: "button", version: "secondary", onClick: handleClose, children: "\u041F\u0440\u043E\u043F\u0443\u0441\u0442\u0438\u0442\u044C" })] })] }) }));
|
|
3280
|
+
});
|
|
3281
|
+
|
|
3282
|
+
const useEsiaLoginDialog = (nextStepLink) => {
|
|
3283
|
+
const { open, close } = useDialogManager();
|
|
3284
|
+
const handleClose = useCallback(() => {
|
|
3285
|
+
close();
|
|
3286
|
+
globalThis.location.href = nextStepLink;
|
|
3287
|
+
}, []);
|
|
3288
|
+
return {
|
|
3289
|
+
open: (options = {}) => open(jsx(EsiaLoginDialog, { handleClose: handleClose }), options),
|
|
3290
|
+
close,
|
|
3291
|
+
};
|
|
3292
|
+
};
|
|
3293
|
+
|
|
3294
|
+
const useApplicationLeadApi = ({ inputs, programId, nextStepLink, saveForm, }) => {
|
|
3270
3295
|
const [responseStatus, setResponseStatus] = useState('');
|
|
3271
3296
|
const [, setTaskId] = useLocalStorage('taskId');
|
|
3272
3297
|
const [, setProfileId] = useLocalStorage('profileId');
|
|
3273
3298
|
const [, setParticipantId] = useLocalStorage('participantId');
|
|
3274
|
-
const
|
|
3299
|
+
const esiaLoginDialog = useEsiaLoginDialog(nextStepLink);
|
|
3300
|
+
const consentBkiDialog = useConsentBkiDialog(esiaLoginDialog.open);
|
|
3275
3301
|
const verifyPhoneDialog = useVerifyPhoneDialog();
|
|
3276
3302
|
const saveUserData = useCallback((participantId, taskId, profileId) => {
|
|
3277
3303
|
setParticipantId(participantId);
|
|
@@ -3285,40 +3311,29 @@
|
|
|
3285
3311
|
return 'Fail';
|
|
3286
3312
|
}
|
|
3287
3313
|
try {
|
|
3288
|
-
const { profile } = await createUserProfile({
|
|
3314
|
+
const { profile: { id: profileId }, } = await createUserProfile({
|
|
3289
3315
|
profile: { phone: formatPhone(formData.phone) },
|
|
3290
3316
|
});
|
|
3291
|
-
const profileId = profile?.id;
|
|
3292
|
-
const transformedForm = transformOtherConsentsField(formData);
|
|
3293
3317
|
if (profileId && formData?.phone) {
|
|
3294
3318
|
const handleSuccessVerify = async () => {
|
|
3295
3319
|
try {
|
|
3296
|
-
await
|
|
3297
|
-
const { taskId, participantId } = await createDraftTask({
|
|
3298
|
-
profileId,
|
|
3320
|
+
await updateUserData({
|
|
3299
3321
|
programId,
|
|
3300
|
-
});
|
|
3301
|
-
await updateUserTask(getUpdateUserTaskData({
|
|
3302
|
-
participantId,
|
|
3303
|
-
taskId,
|
|
3304
3322
|
profileId,
|
|
3305
|
-
formData
|
|
3306
|
-
|
|
3307
|
-
|
|
3308
|
-
|
|
3323
|
+
formData,
|
|
3324
|
+
saveUserData,
|
|
3325
|
+
saveForm,
|
|
3326
|
+
});
|
|
3327
|
+
consentBkiDialog.open(formData.phone, profileId);
|
|
3309
3328
|
}
|
|
3310
3329
|
catch {
|
|
3311
3330
|
setResponseStatus('Fail');
|
|
3312
3331
|
}
|
|
3313
3332
|
};
|
|
3314
|
-
const handleCloseVerify = async () => {
|
|
3315
|
-
await handleSuccessVerify();
|
|
3316
|
-
consentBkiDialog.open(formData.phone, profileId);
|
|
3317
|
-
};
|
|
3318
3333
|
const acceptedConsents = Object.keys(CONSENTS)
|
|
3319
3334
|
.filter((_) => formData[_])
|
|
3320
3335
|
.map((_) => CONSENTS[_]?.text);
|
|
3321
|
-
verifyPhoneDialog.open(
|
|
3336
|
+
verifyPhoneDialog.open(handleSuccessVerify, verifyPhoneContent(formData?.phone, acceptedConsents));
|
|
3322
3337
|
}
|
|
3323
3338
|
}
|
|
3324
3339
|
catch {
|
|
@@ -3330,6 +3345,22 @@
|
|
|
3330
3345
|
responseStatus,
|
|
3331
3346
|
};
|
|
3332
3347
|
};
|
|
3348
|
+
const updateUserData = async ({ programId, profileId, formData, saveUserData, saveForm, }) => {
|
|
3349
|
+
const transformedForm = transformOtherConsentsField(formData);
|
|
3350
|
+
await updateUserProfile(getUpdateUserProfileData(profileId, transformedForm));
|
|
3351
|
+
const { taskId, participantId } = await createDraftTask({
|
|
3352
|
+
profileId,
|
|
3353
|
+
programId,
|
|
3354
|
+
});
|
|
3355
|
+
await updateUserTask(getUpdateUserTaskData({
|
|
3356
|
+
participantId,
|
|
3357
|
+
taskId,
|
|
3358
|
+
profileId,
|
|
3359
|
+
formData: transformedForm,
|
|
3360
|
+
}));
|
|
3361
|
+
saveUserData(participantId, taskId, profileId);
|
|
3362
|
+
saveForm(formData);
|
|
3363
|
+
};
|
|
3333
3364
|
const verifyPhoneContent = (phone, consents) => ({
|
|
3334
3365
|
title: 'Подтвердите номер телефона',
|
|
3335
3366
|
description: `Мы отправили код на ${phone}`,
|
|
@@ -3348,22 +3379,54 @@
|
|
|
3348
3379
|
};
|
|
3349
3380
|
};
|
|
3350
3381
|
|
|
3351
|
-
const
|
|
3382
|
+
const updateProfileEsia = (body) => doRequest('/esia/updateProfileEsia', 'POST', body);
|
|
3383
|
+
|
|
3384
|
+
const useInitApplicationLead = (nextStepLink) => {
|
|
3385
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
3386
|
+
const [profileId] = useLocalStorage('profileId');
|
|
3387
|
+
const [, setEsiaData] = useLocalStorage('esiaData');
|
|
3388
|
+
const params = new URLSearchParams(decodeURIComponent(window.location.search));
|
|
3389
|
+
const esiaAuth = params.get('esiaAuth');
|
|
3390
|
+
const updateEsiaProfile = useCallback(async () => {
|
|
3391
|
+
const code = params.get('code');
|
|
3392
|
+
const state = params.get('state');
|
|
3393
|
+
if (profileId && code && state) {
|
|
3394
|
+
const data = await updateProfileEsia({
|
|
3395
|
+
profileId: profileId,
|
|
3396
|
+
code,
|
|
3397
|
+
state,
|
|
3398
|
+
redirectUri: globalThis.location.href,
|
|
3399
|
+
});
|
|
3400
|
+
setEsiaData(JSON.stringify(data));
|
|
3401
|
+
globalThis.location.href = nextStepLink;
|
|
3402
|
+
}
|
|
3403
|
+
}, []);
|
|
3352
3404
|
useEffect(() => {
|
|
3353
|
-
|
|
3354
|
-
|
|
3405
|
+
if (esiaAuth) {
|
|
3406
|
+
setIsLoading(true);
|
|
3407
|
+
updateEsiaProfile();
|
|
3408
|
+
}
|
|
3409
|
+
else {
|
|
3410
|
+
setEsiaData('');
|
|
3411
|
+
sessionStorage.removeItem('accessToken');
|
|
3412
|
+
sessionStorage.removeItem('refreshToken');
|
|
3413
|
+
}
|
|
3355
3414
|
}, []);
|
|
3415
|
+
return {
|
|
3416
|
+
isLoading,
|
|
3417
|
+
};
|
|
3356
3418
|
};
|
|
3357
3419
|
|
|
3358
|
-
const ApplicationLeadForm = JSX(({ className, title, programId = '', typeForm = '', sections = [], button, ...rest }) => {
|
|
3420
|
+
const ApplicationLeadForm = JSX(({ className, title, programId = '', nextStepLink = '/credit-lead', typeForm = '', sections = [], button, ...rest }) => {
|
|
3359
3421
|
const inputs = (sections?.flatMap((_) => _?.inputs) || []);
|
|
3360
3422
|
const [responseType, setResponseType] = useState('');
|
|
3361
|
-
useInitApplicationLead();
|
|
3423
|
+
const { isLoading } = useInitApplicationLead(nextStepLink);
|
|
3362
3424
|
const [leadForm, setLeadForm] = useLocalStorage('leadForm');
|
|
3363
3425
|
const initialFormState = getInitialFormState$1(inputs, leadForm, typeForm);
|
|
3364
3426
|
const { handleSubmit, responseStatus } = useApplicationLeadApi({
|
|
3365
3427
|
inputs,
|
|
3366
3428
|
programId,
|
|
3429
|
+
nextStepLink,
|
|
3367
3430
|
saveForm: setLeadForm,
|
|
3368
3431
|
});
|
|
3369
3432
|
if (responseStatus) {
|
|
@@ -3377,7 +3440,7 @@
|
|
|
3377
3440
|
reset();
|
|
3378
3441
|
}
|
|
3379
3442
|
}, [responseType]);
|
|
3380
|
-
return (jsx(ApplicationFormLayout, { className: style('container space-y-m', className), title: title, ...rest, children: jsxs("form", { onSubmit: onSubmit, className: "space-y-m", children: [sections.map((_, i) => (jsxs("div", { className: style(inputColumnStyles(_.columns), 'grid gap-x-m'), children: [renderTitle(_.title), renderInputs$1({ field, inputs: _?.inputs })] }, `section-${i}`))), renderSubmitButton(button)] }) }));
|
|
3443
|
+
return (jsx(ApplicationFormLayout, { className: style('container space-y-m', className), title: title, ...rest, children: jsxs("form", { onSubmit: onSubmit, className: "space-y-m relative", children: [isLoading ? jsx(Loader, { blur: false }) : null, sections.map((_, i) => (jsxs("div", { className: style(inputColumnStyles(_.columns), 'grid gap-x-m'), children: [renderTitle(_.title), renderInputs$1({ field, inputs: _?.inputs })] }, `section-${i}`))), renderSubmitButton(button)] }) }));
|
|
3381
3444
|
});
|
|
3382
3445
|
|
|
3383
3446
|
const NotFound = JSX(({ title, description }) => {
|
|
@@ -7792,7 +7855,7 @@
|
|
|
7792
7855
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
7793
7856
|
});
|
|
7794
7857
|
|
|
7795
|
-
const packageVersion = "0.14.
|
|
7858
|
+
const packageVersion = "0.14.620";
|
|
7796
7859
|
|
|
7797
7860
|
exports.Blocks = Blocks;
|
|
7798
7861
|
exports.ContentPage = ContentPage;
|