@redneckz/wildless-cms-uni-blocks 0.14.753 → 0.14.755
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/draftTasksKZO.d.ts +1 -0
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +24 -16
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/hooks/useRetailFormStore.d.ts +1 -0
- package/bundle/icons/IconName.d.ts +6 -2
- package/cosmos-static/icons/BankColorIcon.svg +1 -0
- package/cosmos-static/icons/NewLoanIcon.svg +1 -0
- package/dist/api/RetailAPI/draftTasksKZO.d.ts +1 -0
- package/dist/api/RetailAPI/draftTasksKZO.js.map +1 -1
- package/dist/components/CreditCardForm/ReworkStatusContent.js +12 -2
- package/dist/components/CreditCardForm/ReworkStatusContent.js.map +1 -1
- package/dist/components/CreditCardForm/useCreditCardFormAPI.js +1 -0
- package/dist/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -1
- package/dist/hooks/useRetailFormStore.d.ts +1 -0
- package/dist/hooks/useRetailFormStore.js.map +1 -1
- package/dist/icons/IconName.d.ts +6 -2
- package/dist/icons/IconName.js +5 -1
- package/dist/icons/IconName.js.map +1 -1
- package/dist/ui-kit/DraftDialog/DraftActionButton.js +2 -3
- package/dist/ui-kit/DraftDialog/DraftActionButton.js.map +1 -1
- package/dist/ui-kit/DraftDialog/DraftDialog.js +4 -8
- package/dist/ui-kit/DraftDialog/DraftDialog.js.map +1 -1
- package/dist/ui-kit/FormField/Fields/CardCategoryField.js +3 -1
- package/dist/ui-kit/FormField/Fields/CardCategoryField.js.map +1 -1
- package/dist/ui-kit/FormField/validators.js +2 -2
- package/dist/ui-kit/FormField/validators.js.map +1 -1
- package/lib/api/RetailAPI/draftTasksKZO.d.ts +1 -0
- package/lib/api/RetailAPI/draftTasksKZO.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/CreditCardForm/ReworkStatusContent.js +12 -2
- package/lib/components/CreditCardForm/ReworkStatusContent.js.map +1 -1
- package/lib/components/CreditCardForm/useCreditCardFormAPI.js +1 -0
- package/lib/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -1
- package/lib/hooks/useRetailFormStore.d.ts +1 -0
- package/lib/hooks/useRetailFormStore.js.map +1 -1
- package/lib/icons/IconName.d.ts +6 -2
- package/lib/icons/IconName.js +5 -1
- package/lib/icons/IconName.js.map +1 -1
- package/lib/ui-kit/DraftDialog/DraftActionButton.js +2 -3
- package/lib/ui-kit/DraftDialog/DraftActionButton.js.map +1 -1
- package/lib/ui-kit/DraftDialog/DraftDialog.js +4 -8
- package/lib/ui-kit/DraftDialog/DraftDialog.js.map +1 -1
- package/lib/ui-kit/FormField/Fields/CardCategoryField.js +5 -3
- package/lib/ui-kit/FormField/Fields/CardCategoryField.js.map +1 -1
- package/lib/ui-kit/FormField/validators.js +2 -2
- package/lib/ui-kit/FormField/validators.js.map +1 -1
- package/mobile/bundle/api/RetailAPI/draftTasksKZO.d.ts +1 -0
- package/mobile/bundle/bundle.umd.js +24 -16
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/hooks/useRetailFormStore.d.ts +1 -0
- package/mobile/bundle/icons/IconName.d.ts +6 -2
- package/mobile/dist/api/RetailAPI/draftTasksKZO.d.ts +1 -0
- package/mobile/dist/api/RetailAPI/draftTasksKZO.js.map +1 -1
- package/mobile/dist/components/CreditCardForm/ReworkStatusContent.js +12 -2
- package/mobile/dist/components/CreditCardForm/ReworkStatusContent.js.map +1 -1
- package/mobile/dist/components/CreditCardForm/useCreditCardFormAPI.js +1 -0
- package/mobile/dist/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -1
- package/mobile/dist/hooks/useRetailFormStore.d.ts +1 -0
- package/mobile/dist/hooks/useRetailFormStore.js.map +1 -1
- package/mobile/dist/icons/IconName.d.ts +6 -2
- package/mobile/dist/icons/IconName.js +5 -1
- package/mobile/dist/icons/IconName.js.map +1 -1
- package/mobile/dist/ui-kit/DraftDialog/DraftActionButton.js +2 -3
- package/mobile/dist/ui-kit/DraftDialog/DraftActionButton.js.map +1 -1
- package/mobile/dist/ui-kit/DraftDialog/DraftDialog.js +4 -8
- package/mobile/dist/ui-kit/DraftDialog/DraftDialog.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/CardCategoryField.js +3 -1
- package/mobile/dist/ui-kit/FormField/Fields/CardCategoryField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/validators.js +2 -2
- package/mobile/dist/ui-kit/FormField/validators.js.map +1 -1
- package/mobile/lib/api/RetailAPI/draftTasksKZO.d.ts +1 -0
- package/mobile/lib/api/RetailAPI/draftTasksKZO.js.map +1 -1
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/CreditCardForm/ReworkStatusContent.js +12 -2
- package/mobile/lib/components/CreditCardForm/ReworkStatusContent.js.map +1 -1
- package/mobile/lib/components/CreditCardForm/useCreditCardFormAPI.js +1 -0
- package/mobile/lib/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -1
- package/mobile/lib/hooks/useRetailFormStore.d.ts +1 -0
- package/mobile/lib/hooks/useRetailFormStore.js.map +1 -1
- package/mobile/lib/icons/IconName.d.ts +6 -2
- package/mobile/lib/icons/IconName.js +5 -1
- package/mobile/lib/icons/IconName.js.map +1 -1
- package/mobile/lib/ui-kit/DraftDialog/DraftActionButton.js +2 -3
- package/mobile/lib/ui-kit/DraftDialog/DraftActionButton.js.map +1 -1
- package/mobile/lib/ui-kit/DraftDialog/DraftDialog.js +4 -8
- package/mobile/lib/ui-kit/DraftDialog/DraftDialog.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/CardCategoryField.js +5 -3
- package/mobile/lib/ui-kit/FormField/Fields/CardCategoryField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/validators.js +2 -2
- package/mobile/lib/ui-kit/FormField/validators.js.map +1 -1
- package/mobile/src/api/RetailAPI/draftTasksKZO.ts +1 -0
- package/mobile/src/components/CreditCardForm/ReworkStatusContent.tsx +21 -7
- package/mobile/src/components/CreditCardForm/useCreditCardFormAPI.tsx +1 -0
- package/mobile/src/hooks/useRetailFormStore.tsx +1 -0
- package/mobile/src/icons/BankColorIcon.svg +1 -0
- package/mobile/src/icons/IconName.ts +5 -5
- package/mobile/src/icons/NewLoanIcon.svg +1 -0
- package/mobile/src/ui-kit/DraftDialog/DraftActionButton.tsx +9 -8
- package/mobile/src/ui-kit/DraftDialog/DraftDialog.tsx +20 -34
- package/mobile/src/ui-kit/FormField/Fields/CardCategoryField.tsx +17 -8
- package/mobile/src/ui-kit/FormField/validators.ts +4 -4
- package/package.json +1 -1
- package/src/api/RetailAPI/draftTasksKZO.ts +1 -0
- package/src/components/CreditCardForm/ReworkStatusContent.tsx +21 -7
- package/src/components/CreditCardForm/useCreditCardFormAPI.tsx +1 -0
- package/src/hooks/useRetailFormStore.tsx +1 -0
- package/src/icons/BankColorIcon.svg +1 -0
- package/src/icons/IconName.ts +5 -5
- package/src/icons/NewLoanIcon.svg +1 -0
- package/src/ui-kit/DraftDialog/DraftActionButton.tsx +9 -8
- package/src/ui-kit/DraftDialog/DraftDialog.fixture.tsx +1 -0
- package/src/ui-kit/DraftDialog/DraftDialog.tsx +20 -34
- package/src/ui-kit/FormField/Fields/CardCategoryField.tsx +17 -8
- package/src/ui-kit/FormField/validators.ts +4 -4
package/bundle/bundle.umd.js
CHANGED
|
@@ -2620,9 +2620,9 @@
|
|
|
2620
2620
|
const snilsValidator = (errorMsg) => validator(snilsValidate)(errorMsg);
|
|
2621
2621
|
const emailValidate = (email) => /^[^\s@]+@[^\s@]+\.[a-zA-Z]{2,4}$/.test(email);
|
|
2622
2622
|
const emailValidator = (errorMsg) => validator((_) => emailValidate(_))(errorMsg);
|
|
2623
|
-
const addressDaDataValidate = (address) => Boolean(address.region && address.city && address.house);
|
|
2623
|
+
const addressDaDataValidate = (address) => Boolean(address.region && (address.city || address.locality) && address.house);
|
|
2624
2624
|
const addressDaDataValidator = () => validator(addressDaDataValidate)(ADDRESS_ERROR_MESSAGE);
|
|
2625
|
-
const addressOrganizationValidator = () => validator((address) => Boolean(address.fiasCode && address.city && address.house))(ADDRESS_ERROR_MESSAGE);
|
|
2625
|
+
const addressOrganizationValidator = () => validator((address) => Boolean(address.fiasCode && (address.city || address.locality) && address.house))(ADDRESS_ERROR_MESSAGE);
|
|
2626
2626
|
const codeWordValidator = (errorMsg) => validator((_) => typeof _ === 'string' && _.length >= 3 && _.length <= 21 && isCyrillic(_))(errorMsg ?? ERROR_MESSAGE);
|
|
2627
2627
|
const cyrillicPattern = /^[\u0400-\u04FF\d\s]+$/u;
|
|
2628
2628
|
const isCyrillic = (_ = '') => cyrillicPattern.test(_);
|
|
@@ -3727,6 +3727,8 @@
|
|
|
3727
3727
|
return [storedValue, setValue];
|
|
3728
3728
|
}
|
|
3729
3729
|
|
|
3730
|
+
const InfoCard = JSX(({ __html, icon = 'InfoCircleIcon', iconVersion = 'black', link }) => (jsxs("div", { className: "flex flex-row items-center w-full min-h-14 bg-main-gray rounded-lg gap-m p-m", children: [jsx("div", { className: "rounded-full bg-white p-xs", children: jsx(Icon, { name: icon, width: "24", height: "24", iconVersion: iconVersion }) }), jsxs("div", { className: "", children: [jsx(RichText, { __html: __html }), link?.text ? jsx(LinkButton, { className: "text-primary-main", children: link.text }) : null] })] })));
|
|
3731
|
+
|
|
3730
3732
|
const CardCategoryField = JSX(({ field, input }) => {
|
|
3731
3733
|
const [cardTypes, setCardTypes] = useState([]);
|
|
3732
3734
|
const [programId] = useLocalStorage('programId');
|
|
@@ -3743,7 +3745,8 @@
|
|
|
3743
3745
|
})();
|
|
3744
3746
|
}
|
|
3745
3747
|
}, [selectedPaymentSystem]);
|
|
3746
|
-
|
|
3748
|
+
const description = useMemo(() => cardTypes?.find((_) => _.key === selectedCardCategory?.key)?.description, [cardTypes, selectedCardCategory]);
|
|
3749
|
+
return (jsxs("div", { children: [jsx(SelectField, { field: field, source: cardTypes, label: "\u041A\u0430\u0442\u0435\u0433\u043E\u0440\u0438\u044F \u043A\u0430\u0440\u0442\u044B", fieldName: "cardCategory", input: input }), description ? jsx(InfoCard, { __html: description }) : null] }));
|
|
3747
3750
|
});
|
|
3748
3751
|
const isValidCardCategory = (cardTypes, selectedCardCategory) => cardTypes.some((cardType) => cardType.key === selectedCardCategory?.key);
|
|
3749
3752
|
|
|
@@ -4222,8 +4225,6 @@
|
|
|
4222
4225
|
return (jsx(SelectField, { field: field, source: housing, label: "\u0422\u0438\u043F \u0436\u0438\u043B\u044C\u044F", fieldName: "housing", input: input }));
|
|
4223
4226
|
});
|
|
4224
4227
|
|
|
4225
|
-
const InfoCard = JSX(({ __html, icon = 'InfoCircleIcon', iconVersion = 'black', link }) => (jsxs("div", { className: "flex flex-row items-center w-full min-h-14 bg-main-gray rounded-lg gap-m p-m", children: [jsx("div", { className: "rounded-full bg-white p-xs", children: jsx(Icon, { name: icon, width: "24", height: "24", iconVersion: iconVersion }) }), jsxs("div", { className: "", children: [jsx(RichText, { __html: __html }), link?.text ? jsx(LinkButton, { className: "text-primary-main", children: link.text }) : null] })] })));
|
|
4226
|
-
|
|
4227
4228
|
const InfoCardField = JSX(({ input }) => (jsx(InfoCard, { __html: input?.label })));
|
|
4228
4229
|
|
|
4229
4230
|
const JobsNumberField = JSX(({ field, input }) => (jsx(InputControl, { label: "\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043C\u0435\u0441\u0442 \u0440\u0430\u0431\u043E\u0442\u044B \u0437\u0430 \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435 5 \u043B\u0435\u0442", placeholder: "\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043C\u0435\u0441\u0442", isInteger: true, maxLength: 2, ...field(input?.name ?? ''), ...input })));
|
|
@@ -4808,7 +4809,7 @@
|
|
|
4808
4809
|
};
|
|
4809
4810
|
};
|
|
4810
4811
|
|
|
4811
|
-
const DraftActionButton = JSX(({ title, icon, description, onClick = noop }) => (jsxs("button", { className: "flex gap-lg items-center border border-gray rounded-
|
|
4812
|
+
const DraftActionButton = JSX(({ title, icon, description, onClick = noop }) => (jsxs("button", { className: "flex gap-lg items-center border border-gray/30 rounded-xl cursor-pointer p-4 hover:border-green", type: "button", onClick: onClick, children: [jsx(Img, { image: { icon, iconVersion: 'normal' }, width: "78", height: "78" }), jsxs("div", { className: "flex flex-col items-start gap-xs md:w-72 md:mr-lg", children: [jsx(Text, { font: "font-medium", size: "text-s", children: title }), description ? (jsx(Text, { color: "text-secondary-text", size: "text-xs", children: description })) : null] })] })));
|
|
4812
4813
|
|
|
4813
4814
|
const fieldsNamesToContactKeysMap = {
|
|
4814
4815
|
email: 'EMAIL',
|
|
@@ -5056,11 +5057,11 @@
|
|
|
5056
5057
|
const DraftDialog = JSX(function ({ task, isFromLead = false, onClose = noop, }) {
|
|
5057
5058
|
const retailFormStore = useRetailFormStore();
|
|
5058
5059
|
const navigator = locationNavigator();
|
|
5059
|
-
const { participants, creditProgram, id: taskId } = task;
|
|
5060
|
+
const { participants, creditProgram, createdDate = '', id: taskId } = task;
|
|
5060
5061
|
const programmId = creditProgramCodeToProductIdMap[creditProgram.code];
|
|
5061
5062
|
const isCredit = Boolean(creditCodesToProgrammIdMap[creditProgram.code]);
|
|
5062
5063
|
const nextStepLink = isCredit ? '/credit-lead' : '/credit-card-lead';
|
|
5063
|
-
const {
|
|
5064
|
+
const { id: participantId, profile } = participants[0];
|
|
5064
5065
|
const handleGoToDraft = useCallback(() => {
|
|
5065
5066
|
const taskFromDraft = parseDraftTask(task);
|
|
5066
5067
|
retailFormStore.participantId = participantId;
|
|
@@ -5073,11 +5074,7 @@
|
|
|
5073
5074
|
const handleGoToNewTask = useCallback(() => {
|
|
5074
5075
|
navigator.assign(isCredit ? '/natural/loans/all-goals' : '/natural/creditcards/svoya');
|
|
5075
5076
|
}, []);
|
|
5076
|
-
|
|
5077
|
-
navigator.assign('/');
|
|
5078
|
-
}, []);
|
|
5079
|
-
const appeal = name && midname ? `${name} ${midname}, ` : '';
|
|
5080
|
-
return (jsx(Dialog, { className: "my-6xl max-w-3xl w-full min-h-fit mx-auto rounded-lg py-0 px-5xl", onClose: onClose, children: jsxs("div", { className: "flex flex-col gap-lg mt-xs md:mt-0", children: [jsx(Heading, { className: "whitespace-pre-wrap text-center", title: `${appeal}мы нашли черновик вашей заявки.\nПродолжите заполнение?`, headingType: "h5" }), jsx(DraftActionButton, { title: "\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043A \u0447\u0435\u0440\u043D\u043E\u0432\u0438\u043A\u0443", icon: "BankIcon", description: "\u041F\u0440\u043E\u0434\u043E\u043B\u0436\u0430\u0439\u0442\u0435 \u0437\u0430\u043F\u043E\u043B\u043D\u044F\u0442\u044C \u0437\u0430\u044F\u0432\u043A\u0443 \u0438\u0437 \u0447\u0435\u0440\u043D\u043E\u0432\u0438\u043A\u0430", onClick: handleGoToDraft }), jsx(DraftActionButton, { title: isFromLead ? 'Продолжить заполнение текущей заявки' : 'Заполнить новую заявку', icon: "DocIcon", onClick: isFromLead ? onClose : handleGoToNewTask }), jsx(Button, { type: "button", version: "secondary", className: "w-full text-h5", onClick: handleGoToMainPage, children: "\u0412\u0435\u0440\u043D\u0443\u0442\u044C\u0441\u044F \u043D\u0430 \u0433\u043B\u0430\u0432\u043D\u0443\u044E" })] }) }));
|
|
5077
|
+
return (jsx(Dialog, { className: "my-6xl max-w-4xl w-full min-h-fit mx-auto rounded-xl py-0", onClose: onClose, children: jsxs("div", { className: "flex flex-col gap-lg items-center mt-xs md:mt-0 mx-6xl", children: [jsx(Heading, { className: "whitespace-pre-wrap text-center", title: "\u041D\u0430\u0448\u043B\u0438 \u0447\u0435\u0440\u043D\u043E\u0432\u0438\u043A \u0432\u0430\u0448\u0435\u0439 \u0437\u0430\u044F\u0432\u043A\u0438", headingType: "h5" }), jsxs("div", { className: "flex flex-col gap-m max-w-lg", children: [jsx(DraftActionButton, { title: "\u041F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u0442\u044C \u0437\u0430\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u0435 \u0447\u0435\u0440\u043D\u043E\u0432\u0438\u043A\u0430", icon: "BankColorIcon", description: createdDate ? `Черновик от ${formatDate(new Date(createdDate))}` : '', onClick: handleGoToDraft }), jsx(DraftActionButton, { title: isFromLead ? 'Продолжить заполнение текущей заявки' : 'Создать новую заявку', icon: "NewLoanIcon", description: "\u041D\u0430 \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u0438\u0435 \u043A\u0440\u0435\u0434\u0438\u0442\u0430", onClick: isFromLead ? onClose : handleGoToNewTask })] })] }) }));
|
|
5081
5078
|
});
|
|
5082
5079
|
|
|
5083
5080
|
const EmptyDraftDialog = JSX(function ({ onClose = noop }) {
|
|
@@ -6948,7 +6945,14 @@
|
|
|
6948
6945
|
|
|
6949
6946
|
const ReworkStatusContent$1 = JSX(() => {
|
|
6950
6947
|
const { statusInfo } = useRetailFormStore();
|
|
6951
|
-
|
|
6948
|
+
const isCourierDelivery = statusInfo?.methodObtain === 'courier';
|
|
6949
|
+
const infoAdditional = isCourierDelivery
|
|
6950
|
+
? [
|
|
6951
|
+
{
|
|
6952
|
+
description: statusInfo?.deliveryAddress,
|
|
6953
|
+
},
|
|
6954
|
+
]
|
|
6955
|
+
: [
|
|
6952
6956
|
{
|
|
6953
6957
|
label: 'Регион',
|
|
6954
6958
|
description: statusInfo?.regionRetail,
|
|
@@ -6957,7 +6961,10 @@
|
|
|
6957
6961
|
label: 'Адрес',
|
|
6958
6962
|
description: statusInfo?.addressRetail,
|
|
6959
6963
|
},
|
|
6960
|
-
]
|
|
6964
|
+
];
|
|
6965
|
+
return (jsx(CreditCardFormStatus, { title: "\u0411\u043B\u0430\u0433\u043E\u0434\u0430\u0440\u0438\u043C \u0432\u0430\u0441 \u0437\u0430 \u043E\u0436\u0438\u0434\u0430\u043D\u0438\u0435, \u043D\u043E \u043D\u0430\u043C \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044F \u0431\u043E\u043B\u044C\u0448\u0435 \u0432\u0440\u0435\u043C\u0435\u043D\u0438 \u0434\u043B\u044F \u043F\u0440\u0438\u043D\u044F\u0442\u0438\u044F \u0440\u0435\u0448\u0435\u043D\u0438\u044F", description: isCourierDelivery
|
|
6966
|
+
? ''
|
|
6967
|
+
: 'Посетите выбранное отделение банка с необходимыми документами и так завершите оформление кредита.', sectionAdditionalTitle: isCourierDelivery ? 'Адрес доставки' : 'В отделении Банка', sectionInfoAdditional: infoAdditional, sectionInfo: [
|
|
6961
6968
|
{
|
|
6962
6969
|
label: 'Основные документы:',
|
|
6963
6970
|
description: '- Паспорт РФ',
|
|
@@ -7354,6 +7361,7 @@
|
|
|
7354
7361
|
deliveryAddress: leadForm?.addressCourier?.fullAddress,
|
|
7355
7362
|
cardCategory: leadForm?.cardCategory?.text,
|
|
7356
7363
|
deliveryDate: leadForm?.deliveryDate,
|
|
7364
|
+
methodObtain: leadForm?.methodObtain,
|
|
7357
7365
|
};
|
|
7358
7366
|
retailFormStore.leadForm = initialState;
|
|
7359
7367
|
}
|
|
@@ -10465,7 +10473,7 @@
|
|
|
10465
10473
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
10466
10474
|
});
|
|
10467
10475
|
|
|
10468
|
-
const packageVersion = "0.14.
|
|
10476
|
+
const packageVersion = "0.14.754";
|
|
10469
10477
|
|
|
10470
10478
|
exports.Blocks = Blocks;
|
|
10471
10479
|
exports.ContentPage = ContentPage;
|