@redneckz/wildless-cms-uni-blocks 0.14.711 → 0.14.712

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 (93) hide show
  1. package/bundle/api/RetailAPI/draftTasksKZO.d.ts +7 -0
  2. package/bundle/api/RetailAPI/getPaymentSystems.d.ts +2 -2
  3. package/bundle/api/RetailAPI/updateUserTask.d.ts +1 -5
  4. package/bundle/bundle.umd.js +15 -9
  5. package/bundle/bundle.umd.min.js +1 -1
  6. package/bundle/components/ApplicationLeadForm/LeadFormState.d.ts +2 -2
  7. package/dist/api/RetailAPI/draftTasksKZO.d.ts +7 -0
  8. package/dist/api/RetailAPI/draftTasksKZO.js.map +1 -1
  9. package/dist/api/RetailAPI/getPaymentSystems.d.ts +2 -2
  10. package/dist/api/RetailAPI/getPaymentSystems.js +5 -1
  11. package/dist/api/RetailAPI/getPaymentSystems.js.map +1 -1
  12. package/dist/api/RetailAPI/updateUserTask.d.ts +1 -5
  13. package/dist/api/RetailAPI/updateUserTask.js.map +1 -1
  14. package/dist/components/ApplicationLeadForm/LeadFormState.d.ts +2 -2
  15. package/dist/components/CreditCardForm/formStateMap.js +1 -1
  16. package/dist/components/CreditCardForm/formStateMap.js.map +1 -1
  17. package/dist/ui-kit/DraftDialog/parseDraftTask.js +4 -2
  18. package/dist/ui-kit/DraftDialog/parseDraftTask.js.map +1 -1
  19. package/dist/ui-kit/FormField/Fields/CardCategoryField.js +1 -1
  20. package/dist/ui-kit/FormField/Fields/CardCategoryField.js.map +1 -1
  21. package/dist/ui-kit/FormField/Fields/PaymentSystemField.js +3 -3
  22. package/dist/ui-kit/FormField/Fields/PaymentSystemField.js.map +1 -1
  23. package/lib/api/RetailAPI/draftTasksKZO.d.ts +7 -0
  24. package/lib/api/RetailAPI/draftTasksKZO.js.map +1 -1
  25. package/lib/api/RetailAPI/getPaymentSystems.d.ts +2 -2
  26. package/lib/api/RetailAPI/getPaymentSystems.js +5 -1
  27. package/lib/api/RetailAPI/getPaymentSystems.js.map +1 -1
  28. package/lib/api/RetailAPI/updateUserTask.d.ts +1 -5
  29. package/lib/api/RetailAPI/updateUserTask.js.map +1 -1
  30. package/lib/components/ApplicationLeadForm/LeadFormState.d.ts +2 -2
  31. package/lib/components/CreditCardForm/formStateMap.js +1 -1
  32. package/lib/components/CreditCardForm/formStateMap.js.map +1 -1
  33. package/lib/ui-kit/DraftDialog/parseDraftTask.js +4 -2
  34. package/lib/ui-kit/DraftDialog/parseDraftTask.js.map +1 -1
  35. package/lib/ui-kit/FormField/Fields/CardCategoryField.js +1 -1
  36. package/lib/ui-kit/FormField/Fields/CardCategoryField.js.map +1 -1
  37. package/lib/ui-kit/FormField/Fields/PaymentSystemField.js +3 -3
  38. package/lib/ui-kit/FormField/Fields/PaymentSystemField.js.map +1 -1
  39. package/mobile/bundle/api/RetailAPI/draftTasksKZO.d.ts +7 -0
  40. package/mobile/bundle/api/RetailAPI/getPaymentSystems.d.ts +2 -2
  41. package/mobile/bundle/api/RetailAPI/updateUserTask.d.ts +1 -5
  42. package/mobile/bundle/bundle.umd.js +15 -9
  43. package/mobile/bundle/bundle.umd.min.js +1 -1
  44. package/mobile/bundle/components/ApplicationLeadForm/LeadFormState.d.ts +2 -2
  45. package/mobile/dist/api/RetailAPI/draftTasksKZO.d.ts +7 -0
  46. package/mobile/dist/api/RetailAPI/draftTasksKZO.js.map +1 -1
  47. package/mobile/dist/api/RetailAPI/getPaymentSystems.d.ts +2 -2
  48. package/mobile/dist/api/RetailAPI/getPaymentSystems.js +5 -1
  49. package/mobile/dist/api/RetailAPI/getPaymentSystems.js.map +1 -1
  50. package/mobile/dist/api/RetailAPI/updateUserTask.d.ts +1 -5
  51. package/mobile/dist/api/RetailAPI/updateUserTask.js.map +1 -1
  52. package/mobile/dist/components/ApplicationLeadForm/LeadFormState.d.ts +2 -2
  53. package/mobile/dist/components/CreditCardForm/formStateMap.js +1 -1
  54. package/mobile/dist/components/CreditCardForm/formStateMap.js.map +1 -1
  55. package/mobile/dist/ui-kit/DraftDialog/parseDraftTask.js +4 -2
  56. package/mobile/dist/ui-kit/DraftDialog/parseDraftTask.js.map +1 -1
  57. package/mobile/dist/ui-kit/FormField/Fields/CardCategoryField.js +1 -1
  58. package/mobile/dist/ui-kit/FormField/Fields/CardCategoryField.js.map +1 -1
  59. package/mobile/dist/ui-kit/FormField/Fields/PaymentSystemField.js +3 -3
  60. package/mobile/dist/ui-kit/FormField/Fields/PaymentSystemField.js.map +1 -1
  61. package/mobile/lib/api/RetailAPI/draftTasksKZO.d.ts +7 -0
  62. package/mobile/lib/api/RetailAPI/draftTasksKZO.js.map +1 -1
  63. package/mobile/lib/api/RetailAPI/getPaymentSystems.d.ts +2 -2
  64. package/mobile/lib/api/RetailAPI/getPaymentSystems.js +5 -1
  65. package/mobile/lib/api/RetailAPI/getPaymentSystems.js.map +1 -1
  66. package/mobile/lib/api/RetailAPI/updateUserTask.d.ts +1 -5
  67. package/mobile/lib/api/RetailAPI/updateUserTask.js.map +1 -1
  68. package/mobile/lib/components/ApplicationLeadForm/LeadFormState.d.ts +2 -2
  69. package/mobile/lib/components/CreditCardForm/formStateMap.js +1 -1
  70. package/mobile/lib/components/CreditCardForm/formStateMap.js.map +1 -1
  71. package/mobile/lib/ui-kit/DraftDialog/parseDraftTask.js +4 -2
  72. package/mobile/lib/ui-kit/DraftDialog/parseDraftTask.js.map +1 -1
  73. package/mobile/lib/ui-kit/FormField/Fields/CardCategoryField.js +1 -1
  74. package/mobile/lib/ui-kit/FormField/Fields/CardCategoryField.js.map +1 -1
  75. package/mobile/lib/ui-kit/FormField/Fields/PaymentSystemField.js +3 -3
  76. package/mobile/lib/ui-kit/FormField/Fields/PaymentSystemField.js.map +1 -1
  77. package/mobile/src/api/RetailAPI/draftTasksKZO.ts +5 -0
  78. package/mobile/src/api/RetailAPI/getPaymentSystems.ts +13 -2
  79. package/mobile/src/api/RetailAPI/updateUserTask.ts +1 -6
  80. package/mobile/src/components/ApplicationLeadForm/LeadFormState.ts +2 -2
  81. package/mobile/src/components/CreditCardForm/formStateMap.tsx +1 -1
  82. package/mobile/src/ui-kit/DraftDialog/parseDraftTask.ts +9 -5
  83. package/mobile/src/ui-kit/FormField/Fields/CardCategoryField.tsx +1 -1
  84. package/mobile/src/ui-kit/FormField/Fields/PaymentSystemField.tsx +6 -6
  85. package/package.json +1 -1
  86. package/src/api/RetailAPI/draftTasksKZO.ts +5 -0
  87. package/src/api/RetailAPI/getPaymentSystems.ts +13 -2
  88. package/src/api/RetailAPI/updateUserTask.ts +1 -6
  89. package/src/components/ApplicationLeadForm/LeadFormState.ts +2 -2
  90. package/src/components/CreditCardForm/formStateMap.tsx +1 -1
  91. package/src/ui-kit/DraftDialog/parseDraftTask.ts +9 -5
  92. package/src/ui-kit/FormField/Fields/CardCategoryField.tsx +1 -1
  93. package/src/ui-kit/FormField/Fields/PaymentSystemField.tsx +6 -6
@@ -1,5 +1,12 @@
1
+ import { type Option } from '../../ui-kit/Select/Option';
1
2
  import { type Participant, type PaymentType } from './updateUserTask';
2
3
  export declare type Task = {
4
+ currencyCode?: {
5
+ key: string;
6
+ };
7
+ paymentSystemTypeCd?: Option;
8
+ classCard?: Option;
9
+ codeWord?: string;
3
10
  courierDeliveryFlg?: boolean;
4
11
  creditPeriod?: number;
5
12
  creditProgram: {
@@ -1,2 +1,2 @@
1
- import { type PaymentSystem } from './updateUserTask';
2
- export declare const getPaymentSystems: (creditProgramId: string) => Promise<PaymentSystem[]>;
1
+ import { type Option } from '../../ui-kit/Select/Option';
2
+ export declare const getPaymentSystems: (creditProgramId: string) => Promise<Option[]>;
@@ -28,10 +28,6 @@ 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
- };
35
31
  export declare type Participant = {
36
32
  birthDate?: string;
37
33
  id: number;
@@ -98,7 +94,7 @@ export declare type Participant = {
98
94
  currencyCode?: {
99
95
  key: string;
100
96
  };
101
- paymentSystemTypeCd?: PaymentSystem;
97
+ paymentSystemTypeCd?: Option;
102
98
  classCard?: Option;
103
99
  codeWord?: string;
104
100
  };
@@ -3160,7 +3160,7 @@
3160
3160
  const [cardTypes, setCardTypes] = useState([]);
3161
3161
  const [programId] = useLocalStorage('programId');
3162
3162
  const { value: selectedCardCategory, onChange: cardCategoryChange } = field('cardCategory');
3163
- const selectedPaymentSystem = field('paymentSystem')?.value?.type;
3163
+ const selectedPaymentSystem = field('paymentSystem')?.value?.key;
3164
3164
  useEffect(() => {
3165
3165
  if (selectedPaymentSystem && programId) {
3166
3166
  (async () => {
@@ -3955,8 +3955,12 @@
3955
3955
  const data = await fetchRetailJSON('/public-data/creditProgramConditions', 'POST', {
3956
3956
  creditProgramId,
3957
3957
  });
3958
- return data?.paymentSystems || [];
3958
+ return formatData(data?.paymentSystems || []);
3959
3959
  };
3960
+ const formatData = (paymentSystems) => paymentSystems.map((_) => ({
3961
+ key: _.type,
3962
+ text: _.name,
3963
+ }));
3960
3964
 
3961
3965
  const PaymentSystemField = JSX(({ field, input }) => {
3962
3966
  const { value, onChange } = field('paymentSystem');
@@ -3970,10 +3974,10 @@
3970
3974
  })();
3971
3975
  }
3972
3976
  }, []);
3973
- const handleChange = useCallback((type) => onChange?.(paymentSystemOptions?.find((_) => _.type === type)), [paymentSystemOptions, onChange]);
3974
- 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 }));
3977
+ const handleChange = useCallback((type) => onChange?.(paymentSystemOptions?.find((_) => _.key === type)), [paymentSystemOptions, onChange]);
3978
+ 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?.key, onChange: handleChange }));
3975
3979
  });
3976
- const formatPaymentSystems = (paymentSystems) => paymentSystems?.map((_) => ({ id: _.type, text: _.name })) ?? [];
3980
+ const formatPaymentSystems = (paymentSystems) => paymentSystems?.map((_) => ({ id: _.key, text: _.text })) ?? [];
3977
3981
 
3978
3982
  const isPlaceholder = (_) => _ === '_';
3979
3983
  const isDigit = (_) => /\d/.test(_);
@@ -4867,11 +4871,12 @@
4867
4871
 
4868
4872
  const parseDraftTask = (task) => {
4869
4873
  const participant = task.participants[0];
4874
+ const { classCard: cardCategory, codeWord, paymentSystemTypeCd: paymentSystem, currencyCode: currency, } = task;
4870
4875
  const { loanAmount: moneyValue, creditPeriod: monthsValue, paymentTypeCd } = task;
4871
- const { currencyCode: currency, paymentSystemTypeCd: paymentSystem, classCard: cardCategory, codeWord, birthDate: limitedBirthday, midname: middleName, name, surname, birthPlace, dulIssueDate: dulIssueDateField, dulIssuedBy, dulNumber, dulSerie, dulSubdivisionCode, educationLevelCd: education, registrationDate: participantDateRegistration, houseTypeCd: housing, genderCd, participantContacts = [], participantAddresses = [], employmentContractDate: beginDate, employmentTypeCd: employment, organizationName, organizationInn: inn, organizationActivityTypeCd: employerActivities, organizationTypeCd: organization, organizationKindCd: employerOrganization, employeesNumberCd: amountWorkers, opf: legalForm, seniority: generalSeniority, generalSeniority: experience5Years, jobsNumber, lastWorkDuration: lastJobExperience, positionCd: positionOrganization, maritalStatusCd: familyStatus, childrenDependents: children, totalDependents: familyMembers, otherDependents: dependents, militaryStatusCd: conscription, participantIncomes, snils, armyIdFlg, bankruptcyFlg, shareholderFlg, nameLegalEntity: legalEntityName, creditInRshbCd, payrollCardRshbFlg: isInsurance, consentInsuranceFlg: isSalaryClient, } = participant;
4876
+ const { birthDate: limitedBirthday, midname: middleName, name, surname, birthPlace, dulIssueDate: dulIssueDateField, dulIssuedBy, dulNumber, dulSerie, dulSubdivisionCode, educationLevelCd: education, registrationDate: participantDateRegistration, houseTypeCd: housing, genderCd, participantContacts = [], participantAddresses = [], employmentContractDate: beginDate, employmentTypeCd: employment, organizationName, organizationInn: inn, organizationActivityTypeCd: employerActivities, organizationTypeCd: organization, organizationKindCd: employerOrganization, employeesNumberCd: amountWorkers, opf: legalForm, seniority: generalSeniority, generalSeniority: experience5Years, jobsNumber, lastWorkDuration: lastJobExperience, positionCd: positionOrganization, maritalStatusCd: familyStatus, childrenDependents: children, totalDependents: familyMembers, otherDependents: dependents, militaryStatusCd: conscription, participantIncomes, snils, armyIdFlg, bankruptcyFlg, shareholderFlg, nameLegalEntity: legalEntityName, creditInRshbCd, payrollCardRshbFlg: isInsurance, consentInsuranceFlg: isSalaryClient, incomeCertificateCd, } = participant;
4872
4877
  return {
4873
4878
  currency: currency?.key,
4874
- paymentSystem,
4879
+ paymentSystem: getSelectValue(paymentSystem),
4875
4880
  cardCategory: getSelectValue(cardCategory),
4876
4881
  codeWord,
4877
4882
  limitedBirthday,
@@ -4906,6 +4911,7 @@
4906
4911
  familyMembers: familyMembers?.toString(),
4907
4912
  dependents: dependents?.toString(),
4908
4913
  conscription: getSelectValue(conscription),
4914
+ confirmationIncome: getSelectValue(incomeCertificateCd),
4909
4915
  snils,
4910
4916
  armyIdFlg,
4911
4917
  bankruptcyFlg,
@@ -7154,7 +7160,7 @@
7154
7160
 
7155
7161
  const formStateMap$1 = [
7156
7162
  {
7157
- paymentSystem: { name: '', type: '' },
7163
+ paymentSystem: { key: '', text: '' },
7158
7164
  currency: '810',
7159
7165
  codeWord: '',
7160
7166
  },
@@ -10467,7 +10473,7 @@
10467
10473
  slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
10468
10474
  });
10469
10475
 
10470
- const packageVersion = "0.14.710";
10476
+ const packageVersion = "0.14.711";
10471
10477
 
10472
10478
  exports.Blocks = Blocks;
10473
10479
  exports.ContentPage = ContentPage;