@redneckz/wildless-cms-uni-blocks 0.14.836 → 0.14.838
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 +24 -24
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/ApplicationLeadForm/EsiaLoginBanner.d.ts +2 -1
- package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +1 -1
- package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/dist/components/ApplicationLeadForm/EsiaLoginBanner.d.ts +2 -1
- package/dist/components/ApplicationLeadForm/EsiaLoginBanner.js +12 -6
- package/dist/components/ApplicationLeadForm/EsiaLoginBanner.js.map +1 -1
- package/dist/components/ApplicationLeadForm/parseEsiaProfile.js +3 -13
- package/dist/components/ApplicationLeadForm/parseEsiaProfile.js.map +1 -1
- package/dist/retail/components/Fields/RegionRetailField.js +8 -3
- package/dist/retail/components/Fields/RegionRetailField.js.map +1 -1
- package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +1 -1
- package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/lib/components/ApplicationLeadForm/EsiaLoginBanner.d.ts +2 -1
- package/lib/components/ApplicationLeadForm/EsiaLoginBanner.js +12 -6
- package/lib/components/ApplicationLeadForm/EsiaLoginBanner.js.map +1 -1
- package/lib/components/ApplicationLeadForm/parseEsiaProfile.js +3 -13
- package/lib/components/ApplicationLeadForm/parseEsiaProfile.js.map +1 -1
- package/lib/retail/components/Fields/RegionRetailField.js +8 -3
- package/lib/retail/components/Fields/RegionRetailField.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +24 -24
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/ApplicationLeadForm/EsiaLoginBanner.d.ts +2 -1
- package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +1 -1
- package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/EsiaLoginBanner.d.ts +2 -1
- package/mobile/dist/components/ApplicationLeadForm/EsiaLoginBanner.js +12 -6
- package/mobile/dist/components/ApplicationLeadForm/EsiaLoginBanner.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/parseEsiaProfile.js +3 -13
- package/mobile/dist/components/ApplicationLeadForm/parseEsiaProfile.js.map +1 -1
- package/mobile/dist/retail/components/Fields/RegionRetailField.js +8 -3
- package/mobile/dist/retail/components/Fields/RegionRetailField.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +1 -1
- package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/EsiaLoginBanner.d.ts +2 -1
- package/mobile/lib/components/ApplicationLeadForm/EsiaLoginBanner.js +12 -6
- package/mobile/lib/components/ApplicationLeadForm/EsiaLoginBanner.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/parseEsiaProfile.js +3 -13
- package/mobile/lib/components/ApplicationLeadForm/parseEsiaProfile.js.map +1 -1
- package/mobile/lib/retail/components/Fields/RegionRetailField.js +8 -3
- package/mobile/lib/retail/components/Fields/RegionRetailField.js.map +1 -1
- package/mobile/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +1 -1
- package/mobile/src/components/ApplicationLeadForm/EsiaLoginBanner.tsx +12 -7
- package/mobile/src/components/ApplicationLeadForm/parseEsiaProfile.ts +3 -13
- package/mobile/src/retail/components/Fields/RegionRetailField.tsx +12 -3
- package/package.json +1 -1
- package/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +1 -1
- package/src/components/ApplicationLeadForm/EsiaLoginBanner.tsx +12 -7
- package/src/components/ApplicationLeadForm/parseEsiaProfile.ts +3 -13
- package/src/retail/components/Fields/RegionRetailField.tsx +12 -3
package/bundle/bundle.umd.js
CHANGED
|
@@ -2725,14 +2725,19 @@
|
|
|
2725
2725
|
|
|
2726
2726
|
const getLink = (body) => fetchRetailJSON('/esia/getLink', 'POST', body);
|
|
2727
2727
|
|
|
2728
|
-
const EsiaLoginBanner = JSX(() => {
|
|
2728
|
+
const EsiaLoginBanner = JSX(({ onChangeEsiaStatus }) => {
|
|
2729
2729
|
const navigator = locationNavigator();
|
|
2730
2730
|
const handleAuth = useCallback(async () => {
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2731
|
+
try {
|
|
2732
|
+
const resp = await getLink({
|
|
2733
|
+
redirectUri: globalThis.location.origin + globalThis.location.pathname,
|
|
2734
|
+
});
|
|
2735
|
+
if (resp?.link) {
|
|
2736
|
+
navigator.assign(resp.link);
|
|
2737
|
+
}
|
|
2738
|
+
}
|
|
2739
|
+
catch {
|
|
2740
|
+
onChangeEsiaStatus(EsiaStatuses.Error);
|
|
2736
2741
|
}
|
|
2737
2742
|
}, []);
|
|
2738
2743
|
return (jsxs("div", { className: "flex gap-lg items-center rounded-md bg-main-gray p-4xl", children: [jsxs("div", { className: "flex flex-col justify-around w-full", children: [jsx("p", { className: "mb-m text-xl", children: "\u0417\u0430\u043F\u043E\u043B\u043D\u0438\u0442\u0435 \u0434\u0430\u043D\u043D\u044B\u0435 \u0447\u0435\u0440\u0435\u0437 \u0413\u043E\u0441\u0443\u0441\u043B\u0443\u0433\u0438" }), jsxs("ul", { className: "list-disc list-inside mb-4xl", 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 mb-xl 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" })] }));
|
|
@@ -4807,22 +4812,27 @@
|
|
|
4807
4812
|
};
|
|
4808
4813
|
|
|
4809
4814
|
const RegionRetailField = JSX(({ field, input }) => {
|
|
4815
|
+
const { programId, productType } = useRetailFormStore();
|
|
4810
4816
|
const { data: regions } = useLeadFormData('REGION_RF');
|
|
4811
4817
|
const { data: regionsDelivery } = useAsyncData('regionsDelivery', getRegionsCardDelivery);
|
|
4812
|
-
const {
|
|
4818
|
+
const { data: productSettings } = useLeadFormData(getCurrentProductSettings(productType));
|
|
4813
4819
|
const isSalaryCard = programId === '38';
|
|
4814
4820
|
const formatRegions = regions?.map(({ key, value }) => ({ key, text: value }));
|
|
4821
|
+
const isDeliveryActive = productSettings?.find((_) => _?.key === 'DELIVERY_ACTIVE')?.value === 'true';
|
|
4815
4822
|
const handleChangeRegion = field('regionRetail')?.onChange;
|
|
4816
4823
|
const handleChangeRegionHasDelivery = field('regionHasDelivery')?.onChange;
|
|
4817
4824
|
const handleChangeMethodObtain = field('methodObtain')?.onChange;
|
|
4818
4825
|
const onChange = useCallback((value) => {
|
|
4819
|
-
const regionHasDelivery =
|
|
4826
|
+
const regionHasDelivery = isDeliveryActive &&
|
|
4827
|
+
regionsDelivery?.find((_) => _.regionCode === value.key)?.deliveryFlg &&
|
|
4828
|
+
!isSalaryCard;
|
|
4820
4829
|
handleChangeRegionHasDelivery?.(regionHasDelivery);
|
|
4821
4830
|
handleChangeMethodObtain?.(regionHasDelivery ? 'courier' : 'office');
|
|
4822
4831
|
handleChangeRegion?.(value);
|
|
4823
|
-
}, [regionsDelivery]);
|
|
4832
|
+
}, [regionsDelivery, isDeliveryActive]);
|
|
4824
4833
|
return (jsx(SelectControl, { label: "\u0420\u0435\u0433\u0438\u043E\u043D", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0440\u0435\u0433\u0438\u043E\u043D", isSearch: true, options: formatRegions, ...field(input?.name ?? ''), onChange: onChange }));
|
|
4825
4834
|
});
|
|
4835
|
+
const getCurrentProductSettings = (productType) => productType === 'debitCard' ? 'DEBIT_CARD_LEAD_PROCESS_SETTINGS' : 'CREDIT_LEAD_PROCESS_SETTINGS';
|
|
4826
4836
|
|
|
4827
4837
|
const RetirementIncomeField = JSX(({ field, input }) => (jsx(DaDataInputControl, { label: "\u041F\u0435\u043D\u0441\u0438\u043E\u043D\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 })));
|
|
4828
4838
|
|
|
@@ -5982,8 +5992,10 @@
|
|
|
5982
5992
|
dulSubdivisionCode: document.dulSubdivisionCode,
|
|
5983
5993
|
birthPlace: addInfo.birthPlace,
|
|
5984
5994
|
addressRegistration: buildAddress(addressRegistration),
|
|
5985
|
-
addressFact: buildAddress(addressFact),
|
|
5986
5995
|
esiaAccountTypeCd: isDebit ? profile.esiaAccountType : { key: '' },
|
|
5996
|
+
...(addressFact && {
|
|
5997
|
+
addressFact: buildAddress(addressFact),
|
|
5998
|
+
}),
|
|
5987
5999
|
};
|
|
5988
6000
|
return {
|
|
5989
6001
|
...mainData,
|
|
@@ -6062,16 +6074,6 @@
|
|
|
6062
6074
|
category: 'CONFIRMING_INCOME_DOC',
|
|
6063
6075
|
isPDF: false,
|
|
6064
6076
|
},
|
|
6065
|
-
{
|
|
6066
|
-
file: esiaAdditionalDocument.pdfFileSigWorkbook,
|
|
6067
|
-
category: 'CONFIRMING_INCOME_DOC',
|
|
6068
|
-
isPDF: true,
|
|
6069
|
-
},
|
|
6070
|
-
{
|
|
6071
|
-
file: esiaAdditionalDocument.xmlFileSigWorkbook,
|
|
6072
|
-
category: 'CONFIRMING_INCOME_DOC',
|
|
6073
|
-
isPDF: false,
|
|
6074
|
-
},
|
|
6075
6077
|
];
|
|
6076
6078
|
for (const doc of documents) {
|
|
6077
6079
|
const contentType = doc.isPDF ? 'data:application/pdf;base64' : 'data:application/xml;base64';
|
|
@@ -6118,8 +6120,6 @@
|
|
|
6118
6120
|
esiaAdditionalDocument?.xmlFilePayout,
|
|
6119
6121
|
esiaAdditionalDocument?.xmlFileSigPayout,
|
|
6120
6122
|
esiaAdditionalDocument?.xmlFileWorkbook,
|
|
6121
|
-
esiaAdditionalDocument?.pdfFileSigWorkbook,
|
|
6122
|
-
esiaAdditionalDocument?.xmlFileSigWorkbook,
|
|
6123
6123
|
];
|
|
6124
6124
|
return data.every(Boolean);
|
|
6125
6125
|
};
|
|
@@ -6206,7 +6206,7 @@
|
|
|
6206
6206
|
reset();
|
|
6207
6207
|
}
|
|
6208
6208
|
}, [leadForm?.current, esiaStatus]);
|
|
6209
|
-
return (jsxs(ApplicationFormLayout, { className: style('container space-y-m', className), title: title, ...rest, children: [!esiaStatus ? jsx(EsiaLoginBanner, {}) : null, jsxs("form", { onSubmit: onSubmit, className: "space-y-m relative", ref: leadForm, children: [esiaStatus === EsiaStatuses.Pending ? jsx(Loader, { blur: false }) : null, applicationFormData.map((_, i) => (jsxs("div", { className: style(inputColumnStyles(_.columns), 'grid gap-x-m'), children: [renderTitle(_.title), renderInputs$1({ field, inputs: _?.inputs }, productType)] }, `section-${i}`))), renderSubmitButton(button, isSending), esiaStatus === EsiaStatuses.Error ? (jsx(Text, { size: "text-m", font: "font-medium", color: "text-error", children: "\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u0413\u043E\u0441\u0443\u0441\u043B\u0443\u0433\u0438 \u0434\u043B\u044F \u043E\u0444\u043E\u0440\u043C\u043B\u0435\u043D\u0438\u044F \u0437\u0430\u044F\u0432\u043A\u0438 \u043D\u0435\u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E, \u043D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u043E \u0437\u0430\u043F\u043E\u043B\u043D\u0438\u0442\u044C \u043F\u043E\u043B\u044F \u0432\u0440\u0443\u0447\u043D\u0443\u044E." })) : null] })] }));
|
|
6209
|
+
return (jsxs(ApplicationFormLayout, { className: style('container space-y-m', className), title: title, ...rest, children: [!esiaStatus ? jsx(EsiaLoginBanner, { onChangeEsiaStatus: setEsiaStatus }) : null, jsxs("form", { onSubmit: onSubmit, className: "space-y-m relative", ref: leadForm, children: [esiaStatus === EsiaStatuses.Pending ? jsx(Loader, { blur: false }) : null, applicationFormData.map((_, i) => (jsxs("div", { className: style(inputColumnStyles(_.columns), 'grid gap-x-m'), children: [renderTitle(_.title), renderInputs$1({ field, inputs: _?.inputs }, productType)] }, `section-${i}`))), renderSubmitButton(button, isSending), esiaStatus === EsiaStatuses.Error ? (jsx(Text, { size: "text-m", font: "font-medium", color: "text-error", children: "\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u0413\u043E\u0441\u0443\u0441\u043B\u0443\u0433\u0438 \u0434\u043B\u044F \u043E\u0444\u043E\u0440\u043C\u043B\u0435\u043D\u0438\u044F \u0437\u0430\u044F\u0432\u043A\u0438 \u043D\u0435\u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E, \u043D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u043E \u0437\u0430\u043F\u043E\u043B\u043D\u0438\u0442\u044C \u043F\u043E\u043B\u044F \u0432\u0440\u0443\u0447\u043D\u0443\u044E." })) : null] })] }));
|
|
6210
6210
|
});
|
|
6211
6211
|
const getInputs = (applicationFormData) => (applicationFormData?.flatMap((_) => _?.inputs) || []);
|
|
6212
6212
|
const getExtendedValidatorObj = (productType) => ({
|
|
@@ -11439,7 +11439,7 @@
|
|
|
11439
11439
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
11440
11440
|
});
|
|
11441
11441
|
|
|
11442
|
-
const packageVersion = "0.14.
|
|
11442
|
+
const packageVersion = "0.14.837";
|
|
11443
11443
|
|
|
11444
11444
|
exports.Blocks = Blocks;
|
|
11445
11445
|
exports.ContentPage = ContentPage;
|