@redneckz/wildless-cms-uni-blocks 0.14.699 → 0.14.700

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 (113) hide show
  1. package/bundle/api/RetailAPI/getPaymentSystems.d.ts +2 -4
  2. package/bundle/api/RetailAPI/updateUserTask.d.ts +5 -1
  3. package/bundle/bundle.umd.js +20 -21
  4. package/bundle/bundle.umd.min.js +1 -1
  5. package/bundle/components/ApplicationLeadForm/LeadFormState.d.ts +2 -2
  6. package/dist/api/RetailAPI/getPaymentSystems.d.ts +2 -4
  7. package/dist/api/RetailAPI/getPaymentSystems.js +1 -4
  8. package/dist/api/RetailAPI/getPaymentSystems.js.map +1 -1
  9. package/dist/api/RetailAPI/updateUserTask.d.ts +5 -1
  10. package/dist/api/RetailAPI/updateUserTask.js.map +1 -1
  11. package/dist/components/ApplicationLeadForm/LeadFormState.d.ts +2 -2
  12. package/dist/components/ApplicationLeadForm/getInitialFormState.js +1 -1
  13. package/dist/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
  14. package/dist/components/CreditCardForm/formStateMap.js +1 -1
  15. package/dist/components/CreditCardForm/formStateMap.js.map +1 -1
  16. package/dist/components/GrantSupport/GrantSupport.js +1 -1
  17. package/dist/components/GrantSupport/GrantSupport.js.map +1 -1
  18. package/dist/ui-kit/ApplicationFormLayout/ApplicationFormLayout.js +1 -1
  19. package/dist/ui-kit/ApplicationFormLayout/ApplicationFormLayout.js.map +1 -1
  20. package/dist/ui-kit/FormField/Fields/CardCategoryField.js +1 -1
  21. package/dist/ui-kit/FormField/Fields/CardCategoryField.js.map +1 -1
  22. package/dist/ui-kit/FormField/Fields/PaymentSystemField.js +3 -1
  23. package/dist/ui-kit/FormField/Fields/PaymentSystemField.js.map +1 -1
  24. package/dist/ui-kit/FormField/getObjectValidator.js +10 -10
  25. package/dist/ui-kit/FormField/getObjectValidator.js.map +1 -1
  26. package/lib/api/RetailAPI/getPaymentSystems.d.ts +2 -4
  27. package/lib/api/RetailAPI/getPaymentSystems.js +1 -4
  28. package/lib/api/RetailAPI/getPaymentSystems.js.map +1 -1
  29. package/lib/api/RetailAPI/updateUserTask.d.ts +5 -1
  30. package/lib/api/RetailAPI/updateUserTask.js.map +1 -1
  31. package/lib/common.css +1 -1
  32. package/lib/components/ApplicationLeadForm/LeadFormState.d.ts +2 -2
  33. package/lib/components/ApplicationLeadForm/getInitialFormState.js +1 -1
  34. package/lib/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
  35. package/lib/components/CreditCardForm/formStateMap.js +1 -1
  36. package/lib/components/CreditCardForm/formStateMap.js.map +1 -1
  37. package/lib/components/GrantSupport/GrantSupport.js +1 -1
  38. package/lib/components/GrantSupport/GrantSupport.js.map +1 -1
  39. package/lib/ui-kit/ApplicationFormLayout/ApplicationFormLayout.js +1 -1
  40. package/lib/ui-kit/ApplicationFormLayout/ApplicationFormLayout.js.map +1 -1
  41. package/lib/ui-kit/FormField/Fields/CardCategoryField.js +1 -1
  42. package/lib/ui-kit/FormField/Fields/CardCategoryField.js.map +1 -1
  43. package/lib/ui-kit/FormField/Fields/PaymentSystemField.js +4 -2
  44. package/lib/ui-kit/FormField/Fields/PaymentSystemField.js.map +1 -1
  45. package/lib/ui-kit/FormField/getObjectValidator.js +10 -10
  46. package/lib/ui-kit/FormField/getObjectValidator.js.map +1 -1
  47. package/mobile/bundle/api/RetailAPI/getPaymentSystems.d.ts +2 -4
  48. package/mobile/bundle/api/RetailAPI/updateUserTask.d.ts +5 -1
  49. package/mobile/bundle/bundle.umd.js +20 -21
  50. package/mobile/bundle/bundle.umd.min.js +1 -1
  51. package/mobile/bundle/components/ApplicationLeadForm/LeadFormState.d.ts +2 -2
  52. package/mobile/dist/api/RetailAPI/getPaymentSystems.d.ts +2 -4
  53. package/mobile/dist/api/RetailAPI/getPaymentSystems.js +1 -4
  54. package/mobile/dist/api/RetailAPI/getPaymentSystems.js.map +1 -1
  55. package/mobile/dist/api/RetailAPI/updateUserTask.d.ts +5 -1
  56. package/mobile/dist/api/RetailAPI/updateUserTask.js.map +1 -1
  57. package/mobile/dist/components/ApplicationLeadForm/LeadFormState.d.ts +2 -2
  58. package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.js +1 -1
  59. package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
  60. package/mobile/dist/components/CreditCardForm/formStateMap.js +1 -1
  61. package/mobile/dist/components/CreditCardForm/formStateMap.js.map +1 -1
  62. package/mobile/dist/components/GrantSupport/GrantSupport.js +1 -1
  63. package/mobile/dist/components/GrantSupport/GrantSupport.js.map +1 -1
  64. package/mobile/dist/ui-kit/ApplicationFormLayout/ApplicationFormLayout.js +1 -1
  65. package/mobile/dist/ui-kit/ApplicationFormLayout/ApplicationFormLayout.js.map +1 -1
  66. package/mobile/dist/ui-kit/FormField/Fields/CardCategoryField.js +1 -1
  67. package/mobile/dist/ui-kit/FormField/Fields/CardCategoryField.js.map +1 -1
  68. package/mobile/dist/ui-kit/FormField/Fields/PaymentSystemField.js +3 -1
  69. package/mobile/dist/ui-kit/FormField/Fields/PaymentSystemField.js.map +1 -1
  70. package/mobile/dist/ui-kit/FormField/getObjectValidator.js +10 -10
  71. package/mobile/dist/ui-kit/FormField/getObjectValidator.js.map +1 -1
  72. package/mobile/lib/api/RetailAPI/getPaymentSystems.d.ts +2 -4
  73. package/mobile/lib/api/RetailAPI/getPaymentSystems.js +1 -4
  74. package/mobile/lib/api/RetailAPI/getPaymentSystems.js.map +1 -1
  75. package/mobile/lib/api/RetailAPI/updateUserTask.d.ts +5 -1
  76. package/mobile/lib/api/RetailAPI/updateUserTask.js.map +1 -1
  77. package/mobile/lib/common.css +1 -1
  78. package/mobile/lib/components/ApplicationLeadForm/LeadFormState.d.ts +2 -2
  79. package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.js +1 -1
  80. package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
  81. package/mobile/lib/components/CreditCardForm/formStateMap.js +1 -1
  82. package/mobile/lib/components/CreditCardForm/formStateMap.js.map +1 -1
  83. package/mobile/lib/components/GrantSupport/GrantSupport.js +1 -1
  84. package/mobile/lib/components/GrantSupport/GrantSupport.js.map +1 -1
  85. package/mobile/lib/ui-kit/ApplicationFormLayout/ApplicationFormLayout.js +1 -1
  86. package/mobile/lib/ui-kit/ApplicationFormLayout/ApplicationFormLayout.js.map +1 -1
  87. package/mobile/lib/ui-kit/FormField/Fields/CardCategoryField.js +1 -1
  88. package/mobile/lib/ui-kit/FormField/Fields/CardCategoryField.js.map +1 -1
  89. package/mobile/lib/ui-kit/FormField/Fields/PaymentSystemField.js +4 -2
  90. package/mobile/lib/ui-kit/FormField/Fields/PaymentSystemField.js.map +1 -1
  91. package/mobile/lib/ui-kit/FormField/getObjectValidator.js +10 -10
  92. package/mobile/lib/ui-kit/FormField/getObjectValidator.js.map +1 -1
  93. package/mobile/src/api/RetailAPI/getPaymentSystems.ts +3 -10
  94. package/mobile/src/api/RetailAPI/updateUserTask.ts +6 -1
  95. package/mobile/src/components/ApplicationLeadForm/LeadFormState.ts +2 -2
  96. package/mobile/src/components/ApplicationLeadForm/getInitialFormState.tsx +1 -1
  97. package/mobile/src/components/CreditCardForm/formStateMap.tsx +1 -1
  98. package/mobile/src/components/GrantSupport/GrantSupport.tsx +1 -1
  99. package/mobile/src/ui-kit/ApplicationFormLayout/ApplicationFormLayout.tsx +1 -1
  100. package/mobile/src/ui-kit/FormField/Fields/CardCategoryField.tsx +1 -1
  101. package/mobile/src/ui-kit/FormField/Fields/PaymentSystemField.tsx +14 -6
  102. package/mobile/src/ui-kit/FormField/getObjectValidator.tsx +10 -10
  103. package/package.json +1 -1
  104. package/src/api/RetailAPI/getPaymentSystems.ts +3 -10
  105. package/src/api/RetailAPI/updateUserTask.ts +6 -1
  106. package/src/components/ApplicationLeadForm/LeadFormState.ts +2 -2
  107. package/src/components/ApplicationLeadForm/getInitialFormState.tsx +1 -1
  108. package/src/components/CreditCardForm/formStateMap.tsx +1 -1
  109. package/src/components/GrantSupport/GrantSupport.tsx +1 -1
  110. package/src/ui-kit/ApplicationFormLayout/ApplicationFormLayout.tsx +1 -1
  111. package/src/ui-kit/FormField/Fields/CardCategoryField.tsx +1 -1
  112. package/src/ui-kit/FormField/Fields/PaymentSystemField.tsx +14 -6
  113. package/src/ui-kit/FormField/getObjectValidator.tsx +10 -10
@@ -1,4 +1,2 @@
1
- export declare const getPaymentSystems: (creditProgramId: string) => Promise<{
2
- id: string;
3
- text: string;
4
- }[]>;
1
+ import { type PaymentSystem } from './updateUserTask';
2
+ export declare const getPaymentSystems: (creditProgramId: string) => Promise<PaymentSystem[]>;
@@ -28,6 +28,10 @@ export declare type PaymentType = {
28
28
  key: 'ANNUITY' | 'DIFFERENTIAL';
29
29
  value: string;
30
30
  };
31
+ export declare type PaymentSystem = {
32
+ name: string;
33
+ type: string;
34
+ };
31
35
  export declare type Participant = {
32
36
  birthDate?: string;
33
37
  id: number;
@@ -94,7 +98,7 @@ export declare type Participant = {
94
98
  currencyCode?: {
95
99
  key: string;
96
100
  };
97
- paymentSystemTypeCd?: string;
101
+ paymentSystemTypeCd?: PaymentSystem;
98
102
  classCard?: Option;
99
103
  codeWord?: string;
100
104
  };
@@ -1202,7 +1202,7 @@
1202
1202
 
1203
1203
  const ApplicationFormLayout = JSX((props) => {
1204
1204
  const { className, title, children, ...rest } = props;
1205
- return (jsx(BlockWrapper, { className: className, defaultPadding: "p-6xl", ...rest, children: jsxs("div", { className: "container max-w-[978px] space-y-lg", children: [title ? jsx(Heading, { headingType: "h3", title: title, className: "@xl:text-center" }) : null, children] }) }));
1205
+ return (jsx(BlockWrapper, { className: className, defaultPadding: "p-6xl", ...rest, children: jsxs("div", { className: "container space-y-lg", children: [title ? jsx(Heading, { headingType: "h3", title: title, className: "@xl:text-center" }) : null, children] }) }));
1206
1206
  });
1207
1207
 
1208
1208
  function useDialog(Dialog, initialProps = {}) {
@@ -1624,14 +1624,14 @@
1624
1624
  birthday: defaultValidator('Укажите дату рождения'),
1625
1625
  limitedBirthday: limitedBirthdayValidator(),
1626
1626
  birthPlace: defaultValidator('Укажите место рождения'),
1627
- education: defaultValidator('Выберите ваше образование'),
1628
- housing: defaultValidator('Выберите тип жилья'),
1629
- employment: defaultValidator('Выберите информацию о трудоустройстве'),
1630
- organization: defaultValidator('Выберите тип организации'),
1631
- amountWorkers: defaultValidator('Выберите информацию о количестве сотрудников'),
1632
- employerActivities: defaultValidator('Выберите вид деятельности организации'),
1633
- employerOrganization: defaultValidator('Выберите вид организации'),
1634
- positionOrganization: defaultValidator('Выберите вашу должность'),
1627
+ education: defaultSelectValidator('Выберите ваше образование'),
1628
+ housing: defaultSelectValidator('Выберите тип жилья'),
1629
+ employment: defaultSelectValidator('Выберите информацию о трудоустройстве'),
1630
+ organization: defaultSelectValidator('Выберите тип организации'),
1631
+ amountWorkers: defaultSelectValidator('Выберите информацию о количестве сотрудников'),
1632
+ employerActivities: defaultSelectValidator('Выберите вид деятельности организации'),
1633
+ employerOrganization: defaultSelectValidator('Выберите вид организации'),
1634
+ positionOrganization: defaultSelectValidator('Выберите вашу должность'),
1635
1635
  dulSerie: serieValidator('Укажите серию паспорта'),
1636
1636
  dulNumber: numberValidator('Укажите номер паспорта'),
1637
1637
  dulIssueDateField: defaultValidator('Укажите дату выдачи паспорта'),
@@ -1667,7 +1667,7 @@
1667
1667
  consentPfrFlg: agreementValidator,
1668
1668
  consentOthersFlg: agreementValidator,
1669
1669
  consentInformFlg: agreementValidator,
1670
- familyStatus: defaultValidator('Выберите семейное положение'),
1670
+ familyStatus: defaultSelectValidator('Выберите семейное положение'),
1671
1671
  children: lengthStringValidator(2, 'Укажите количество детей'),
1672
1672
  familyMembers: lengthStringValidator(2, 'Укажите количество членов семьи'),
1673
1673
  dependents: lengthStringValidator(2, 'Укажите количество иждивенцев'),
@@ -1693,7 +1693,7 @@
1693
1693
  addressRetail: defaultSelectValidator('Выберите адрес банка'),
1694
1694
  addressMatch: defaultValidator(),
1695
1695
  codeWord: codeWordValidator('Необходимо ввести кодовое слово'),
1696
- confirmationIncome: defaultValidator(),
1696
+ confirmationIncome: defaultSelectValidator(),
1697
1697
  deliveryDate: defaultValidator('Укажите дату доставки'),
1698
1698
  addressCourier: addressDaDataValidator(),
1699
1699
  cardCategory: defaultValidator('Укажите категорию карты'),
@@ -3157,7 +3157,7 @@
3157
3157
  const [cardTypes, setCardTypes] = useState([]);
3158
3158
  const [programId] = useLocalStorage('programId');
3159
3159
  const { value: selectedCardCategory, onChange: cardCategoryChange } = field('cardCategory');
3160
- const selectedPaymentSystem = field('paymentSystem').value;
3160
+ const selectedPaymentSystem = field('paymentSystem')?.value?.type;
3161
3161
  useEffect(() => {
3162
3162
  if (selectedPaymentSystem && programId) {
3163
3163
  (async () => {
@@ -3939,10 +3939,7 @@
3939
3939
  const data = await fetchRetailJSON('/public-data/creditProgramConditions', 'POST', {
3940
3940
  creditProgramId,
3941
3941
  });
3942
- return (data?.paymentSystems?.map((paymentSystem) => ({
3943
- id: paymentSystem.type,
3944
- text: paymentSystem.name,
3945
- })) ?? []);
3942
+ return data?.paymentSystems || [];
3946
3943
  };
3947
3944
 
3948
3945
  const PaymentSystemField = JSX(({ field, input }) => {
@@ -3957,8 +3954,10 @@
3957
3954
  })();
3958
3955
  }
3959
3956
  }, []);
3960
- return (jsx(RadioButtonGroupControl, { label: "\u041F\u043B\u0430\u0442\u0435\u0436\u043D\u0430\u044F \u0441\u0438\u0441\u0442\u0435\u043C\u0430", orientation: "horizontal", items: paymentSystemOptions, value: value, onChange: (_) => onChange?.(_), ...getValidation(field('paymentSystem'), validatorObj.paymentSystem, input?.required) }));
3957
+ const handleChange = useCallback((type) => onChange?.(paymentSystemOptions?.find((_) => _.type === type)), [paymentSystemOptions, onChange]);
3958
+ return (jsx(RadioButtonGroupControl, { label: "\u041F\u043B\u0430\u0442\u0435\u0436\u043D\u0430\u044F \u0441\u0438\u0441\u0442\u0435\u043C\u0430", orientation: "horizontal", items: formatPaymentSystems(paymentSystemOptions), ...getValidation(field('paymentSystem'), validatorObj.paymentSystem, input?.required), value: value?.type, onChange: handleChange }));
3961
3959
  });
3960
+ const formatPaymentSystems = (paymentSystems) => paymentSystems?.map((_) => ({ id: _.type, text: _.name })) ?? [];
3962
3961
 
3963
3962
  const isPlaceholder = (_) => _ === '_';
3964
3963
  const isDigit = (_) => /\d/.test(_);
@@ -5019,7 +5018,7 @@
5019
5018
  addressRegistration: '',
5020
5019
  participantDateRegistration: undefined,
5021
5020
  currency: '',
5022
- paymentSystem: '',
5021
+ paymentSystem: { name: '', type: '' },
5023
5022
  cardCategory: { key: '', text: '' },
5024
5023
  codeWord: '',
5025
5024
  addressRetail: { key: '', text: '' },
@@ -6680,7 +6679,7 @@
6680
6679
 
6681
6680
  const formStateMap$1 = [
6682
6681
  {
6683
- paymentSystem: '',
6682
+ paymentSystem: { name: '', type: '' },
6684
6683
  currency: '810',
6685
6684
  codeWord: '',
6686
6685
  },
@@ -8921,7 +8920,7 @@
8921
8920
  });
8922
8921
  const regionHref = regions?.find((_) => _.name === region.key)?.href;
8923
8922
  const buttonText = button?.text ? button.text : 'Перейти';
8924
- return (jsx(BlockWrapper, { className: className, defaultPadding: "p-6xl", ...rest, children: jsxs("div", { className: "container max-w-[978px] space-y-m", children: [title ? jsx(Heading, { headingType: "h3", title: title, className: "@xl:text-center" }) : null, regions ? (jsx(SelectControl, { label: "\u0412\u0430\u0448 \u0440\u0435\u0433\u0438\u043E\u043D", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0440\u0435\u0433\u0438\u043E\u043D", isSearch: true, options: regions.map(({ name = '' }) => ({ key: name, text: name })), value: region, onChange: setRegion })) : null, regionHref ? (jsx("div", { className: "text-center", children: jsx(LinkButton, { href: regionHref, target: "_blank", className: style('p-m w-full @xl:w-auto', buttonStyle), data: getAspectsWithInclude(data, region?.key), children: buttonText }) })) : null] }) }));
8923
+ return (jsx(BlockWrapper, { className: className, defaultPadding: "p-6xl", ...rest, children: jsxs("div", { className: "container space-y-m", children: [title ? jsx(Heading, { headingType: "h3", title: title, className: "@xl:text-center" }) : null, regions ? (jsx(SelectControl, { label: "\u0412\u0430\u0448 \u0440\u0435\u0433\u0438\u043E\u043D", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0440\u0435\u0433\u0438\u043E\u043D", isSearch: true, options: regions.map(({ name = '' }) => ({ key: name, text: name })), value: region, onChange: setRegion })) : null, regionHref ? (jsx("div", { className: "text-center", children: jsx(LinkButton, { href: regionHref, target: "_blank", className: style('p-m w-full @xl:w-auto', buttonStyle), data: getAspectsWithInclude(data, region?.key), children: buttonText }) })) : null] }) }));
8925
8924
  });
8926
8925
 
8927
8926
  function useActiveRoute(items = []) {
@@ -10545,7 +10544,7 @@
10545
10544
  slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
10546
10545
  });
10547
10546
 
10548
- const packageVersion = "0.14.698";
10547
+ const packageVersion = "0.14.699";
10549
10548
 
10550
10549
  exports.Blocks = Blocks;
10551
10550
  exports.ContentPage = ContentPage;