@redneckz/wildless-cms-uni-blocks 0.14.754 → 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.
Files changed (73) hide show
  1. package/bundle/api/RetailAPI/draftTasksKZO.d.ts +1 -0
  2. package/bundle/blocks.schema.json +1 -1
  3. package/bundle/bundle.umd.js +9 -12
  4. package/bundle/bundle.umd.min.js +1 -1
  5. package/bundle/icons/IconName.d.ts +6 -2
  6. package/cosmos-static/icons/BankColorIcon.svg +1 -0
  7. package/cosmos-static/icons/NewLoanIcon.svg +1 -0
  8. package/dist/api/RetailAPI/draftTasksKZO.d.ts +1 -0
  9. package/dist/api/RetailAPI/draftTasksKZO.js.map +1 -1
  10. package/dist/icons/IconName.d.ts +6 -2
  11. package/dist/icons/IconName.js +5 -1
  12. package/dist/icons/IconName.js.map +1 -1
  13. package/dist/ui-kit/DraftDialog/DraftActionButton.js +2 -3
  14. package/dist/ui-kit/DraftDialog/DraftActionButton.js.map +1 -1
  15. package/dist/ui-kit/DraftDialog/DraftDialog.js +4 -8
  16. package/dist/ui-kit/DraftDialog/DraftDialog.js.map +1 -1
  17. package/dist/ui-kit/FormField/Fields/CardCategoryField.js +3 -1
  18. package/dist/ui-kit/FormField/Fields/CardCategoryField.js.map +1 -1
  19. package/lib/api/RetailAPI/draftTasksKZO.d.ts +1 -0
  20. package/lib/api/RetailAPI/draftTasksKZO.js.map +1 -1
  21. package/lib/common.css +1 -1
  22. package/lib/icons/IconName.d.ts +6 -2
  23. package/lib/icons/IconName.js +5 -1
  24. package/lib/icons/IconName.js.map +1 -1
  25. package/lib/ui-kit/DraftDialog/DraftActionButton.js +2 -3
  26. package/lib/ui-kit/DraftDialog/DraftActionButton.js.map +1 -1
  27. package/lib/ui-kit/DraftDialog/DraftDialog.js +4 -8
  28. package/lib/ui-kit/DraftDialog/DraftDialog.js.map +1 -1
  29. package/lib/ui-kit/FormField/Fields/CardCategoryField.js +5 -3
  30. package/lib/ui-kit/FormField/Fields/CardCategoryField.js.map +1 -1
  31. package/mobile/bundle/api/RetailAPI/draftTasksKZO.d.ts +1 -0
  32. package/mobile/bundle/bundle.umd.js +9 -12
  33. package/mobile/bundle/bundle.umd.min.js +1 -1
  34. package/mobile/bundle/icons/IconName.d.ts +6 -2
  35. package/mobile/dist/api/RetailAPI/draftTasksKZO.d.ts +1 -0
  36. package/mobile/dist/api/RetailAPI/draftTasksKZO.js.map +1 -1
  37. package/mobile/dist/icons/IconName.d.ts +6 -2
  38. package/mobile/dist/icons/IconName.js +5 -1
  39. package/mobile/dist/icons/IconName.js.map +1 -1
  40. package/mobile/dist/ui-kit/DraftDialog/DraftActionButton.js +2 -3
  41. package/mobile/dist/ui-kit/DraftDialog/DraftActionButton.js.map +1 -1
  42. package/mobile/dist/ui-kit/DraftDialog/DraftDialog.js +4 -8
  43. package/mobile/dist/ui-kit/DraftDialog/DraftDialog.js.map +1 -1
  44. package/mobile/dist/ui-kit/FormField/Fields/CardCategoryField.js +3 -1
  45. package/mobile/dist/ui-kit/FormField/Fields/CardCategoryField.js.map +1 -1
  46. package/mobile/lib/api/RetailAPI/draftTasksKZO.d.ts +1 -0
  47. package/mobile/lib/api/RetailAPI/draftTasksKZO.js.map +1 -1
  48. package/mobile/lib/common.css +1 -1
  49. package/mobile/lib/icons/IconName.d.ts +6 -2
  50. package/mobile/lib/icons/IconName.js +5 -1
  51. package/mobile/lib/icons/IconName.js.map +1 -1
  52. package/mobile/lib/ui-kit/DraftDialog/DraftActionButton.js +2 -3
  53. package/mobile/lib/ui-kit/DraftDialog/DraftActionButton.js.map +1 -1
  54. package/mobile/lib/ui-kit/DraftDialog/DraftDialog.js +4 -8
  55. package/mobile/lib/ui-kit/DraftDialog/DraftDialog.js.map +1 -1
  56. package/mobile/lib/ui-kit/FormField/Fields/CardCategoryField.js +5 -3
  57. package/mobile/lib/ui-kit/FormField/Fields/CardCategoryField.js.map +1 -1
  58. package/mobile/src/api/RetailAPI/draftTasksKZO.ts +1 -0
  59. package/mobile/src/icons/BankColorIcon.svg +1 -0
  60. package/mobile/src/icons/IconName.ts +5 -5
  61. package/mobile/src/icons/NewLoanIcon.svg +1 -0
  62. package/mobile/src/ui-kit/DraftDialog/DraftActionButton.tsx +9 -8
  63. package/mobile/src/ui-kit/DraftDialog/DraftDialog.tsx +20 -34
  64. package/mobile/src/ui-kit/FormField/Fields/CardCategoryField.tsx +17 -8
  65. package/package.json +1 -1
  66. package/src/api/RetailAPI/draftTasksKZO.ts +1 -0
  67. package/src/icons/BankColorIcon.svg +1 -0
  68. package/src/icons/IconName.ts +5 -5
  69. package/src/icons/NewLoanIcon.svg +1 -0
  70. package/src/ui-kit/DraftDialog/DraftActionButton.tsx +9 -8
  71. package/src/ui-kit/DraftDialog/DraftDialog.fixture.tsx +1 -0
  72. package/src/ui-kit/DraftDialog/DraftDialog.tsx +20 -34
  73. package/src/ui-kit/FormField/Fields/CardCategoryField.tsx +17 -8
@@ -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
- return (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 }));
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-md cursor-pointer p-4 hover:border-green", type: "button", onClick: onClick, children: [jsx(Img, { image: { icon: icon, iconVersion: 'black' }, width: "78", height: "78" }), jsxs("div", { className: "w-full md:w-auto", children: [jsx(Heading, { className: "text-center md:text-left", title: title, headingType: "h5" }), description ? (jsx(Paragraph, { color: "text-secondary-text", size: "text-m", children: description })) : null] })] })));
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 { name, midname, id: participantId, profile } = participants[0];
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
- const handleGoToMainPage = useCallback(() => {
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 }) {
@@ -10476,7 +10473,7 @@
10476
10473
  slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
10477
10474
  });
10478
10475
 
10479
- const packageVersion = "0.14.753";
10476
+ const packageVersion = "0.14.754";
10480
10477
 
10481
10478
  exports.Blocks = Blocks;
10482
10479
  exports.ContentPage = ContentPage;