@redneckz/wildless-cms-uni-blocks 0.14.235 → 0.14.237

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 (110) hide show
  1. package/bundle/blocks.schema.json +1 -1
  2. package/bundle/bundle.umd.js +16 -7
  3. package/bundle/bundle.umd.min.js +1 -1
  4. package/bundle/components/ApplicationFormCustom/ApplicationFormCustomContent.d.ts +4 -4
  5. package/bundle/hooks/{usePremiumBranchesByRegions.d.ts → useBranchesByRegions.d.ts} +1 -1
  6. package/dist/api/LeadServiceAPI.js +2 -1
  7. package/dist/api/LeadServiceAPI.js.map +1 -1
  8. package/dist/components/ApplicationFormCustom/AddressBranchField.js +2 -2
  9. package/dist/components/ApplicationFormCustom/AddressBranchField.js.map +1 -1
  10. package/dist/components/ApplicationFormCustom/ApplicationFormCustomContent.d.ts +4 -4
  11. package/dist/components/ApplicationFormCustom/PosTerminalField.js +1 -1
  12. package/dist/components/ApplicationFormCustom/PosTerminalField.js.map +1 -1
  13. package/dist/components/ApplicationFormCustom/RegionPremiumField.js +2 -2
  14. package/dist/components/ApplicationFormCustom/RegionPremiumField.js.map +1 -1
  15. package/dist/components/ApplicationFormCustom/VedField.js +7 -0
  16. package/dist/components/ApplicationFormCustom/VedField.js.map +1 -1
  17. package/dist/components/ApplicationFormCustom/getField.js +1 -0
  18. package/dist/components/ApplicationFormCustom/getField.js.map +1 -1
  19. package/dist/components/ApplicationFormCustom/getInitialFormState.js +1 -0
  20. package/dist/components/ApplicationFormCustom/getInitialFormState.js.map +1 -1
  21. package/dist/hooks/{usePremiumBranchesByRegions.d.ts → useBranchesByRegions.d.ts} +1 -1
  22. package/{mobile/dist/hooks/usePremiumBranchesByRegions.js → dist/hooks/useBranchesByRegions.js} +5 -5
  23. package/dist/hooks/useBranchesByRegions.js.map +1 -0
  24. package/lib/api/LeadServiceAPI.js +2 -1
  25. package/lib/api/LeadServiceAPI.js.map +1 -1
  26. package/lib/components/ApplicationFormCustom/AddressBranchField.js +2 -2
  27. package/lib/components/ApplicationFormCustom/AddressBranchField.js.map +1 -1
  28. package/lib/components/ApplicationFormCustom/ApplicationFormCustom.fixture.d.ts +1 -0
  29. package/lib/components/ApplicationFormCustom/ApplicationFormCustomContent.d.ts +4 -4
  30. package/lib/components/ApplicationFormCustom/PosTerminalField.js +1 -1
  31. package/lib/components/ApplicationFormCustom/PosTerminalField.js.map +1 -1
  32. package/lib/components/ApplicationFormCustom/RegionPremiumField.js +2 -2
  33. package/lib/components/ApplicationFormCustom/RegionPremiumField.js.map +1 -1
  34. package/lib/components/ApplicationFormCustom/VedField.js +7 -0
  35. package/lib/components/ApplicationFormCustom/VedField.js.map +1 -1
  36. package/lib/components/ApplicationFormCustom/getField.js +1 -0
  37. package/lib/components/ApplicationFormCustom/getField.js.map +1 -1
  38. package/lib/components/ApplicationFormCustom/getInitialFormState.js +1 -0
  39. package/lib/components/ApplicationFormCustom/getInitialFormState.js.map +1 -1
  40. package/lib/hooks/{usePremiumBranchesByRegions.d.ts → useBranchesByRegions.d.ts} +1 -1
  41. package/lib/hooks/{usePremiumBranchesByRegions.js → useBranchesByRegions.js} +3 -3
  42. package/lib/hooks/useBranchesByRegions.js.map +1 -0
  43. package/mobile/bundle/bundle.umd.js +16 -7
  44. package/mobile/bundle/bundle.umd.min.js +1 -1
  45. package/mobile/bundle/components/ApplicationFormCustom/ApplicationFormCustomContent.d.ts +4 -4
  46. package/mobile/bundle/hooks/{usePremiumBranchesByRegions.d.ts → useBranchesByRegions.d.ts} +1 -1
  47. package/mobile/dist/api/LeadServiceAPI.js +2 -1
  48. package/mobile/dist/api/LeadServiceAPI.js.map +1 -1
  49. package/mobile/dist/components/ApplicationFormCustom/AddressBranchField.js +2 -2
  50. package/mobile/dist/components/ApplicationFormCustom/AddressBranchField.js.map +1 -1
  51. package/mobile/dist/components/ApplicationFormCustom/ApplicationFormCustomContent.d.ts +4 -4
  52. package/mobile/dist/components/ApplicationFormCustom/PosTerminalField.js +1 -1
  53. package/mobile/dist/components/ApplicationFormCustom/PosTerminalField.js.map +1 -1
  54. package/mobile/dist/components/ApplicationFormCustom/RegionPremiumField.js +2 -2
  55. package/mobile/dist/components/ApplicationFormCustom/RegionPremiumField.js.map +1 -1
  56. package/mobile/dist/components/ApplicationFormCustom/VedField.js +7 -0
  57. package/mobile/dist/components/ApplicationFormCustom/VedField.js.map +1 -1
  58. package/mobile/dist/components/ApplicationFormCustom/getField.js +1 -0
  59. package/mobile/dist/components/ApplicationFormCustom/getField.js.map +1 -1
  60. package/mobile/dist/components/ApplicationFormCustom/getInitialFormState.js +1 -0
  61. package/mobile/dist/components/ApplicationFormCustom/getInitialFormState.js.map +1 -1
  62. package/mobile/dist/hooks/useBranchesByRegions.d.ts +8 -0
  63. package/{dist/hooks/usePremiumBranchesByRegions.js → mobile/dist/hooks/useBranchesByRegions.js} +5 -5
  64. package/mobile/dist/hooks/useBranchesByRegions.js.map +1 -0
  65. package/mobile/lib/api/LeadServiceAPI.js +2 -1
  66. package/mobile/lib/api/LeadServiceAPI.js.map +1 -1
  67. package/mobile/lib/components/ApplicationFormCustom/AddressBranchField.js +2 -2
  68. package/mobile/lib/components/ApplicationFormCustom/AddressBranchField.js.map +1 -1
  69. package/mobile/lib/components/ApplicationFormCustom/ApplicationFormCustomContent.d.ts +4 -4
  70. package/mobile/lib/components/ApplicationFormCustom/PosTerminalField.js +1 -1
  71. package/mobile/lib/components/ApplicationFormCustom/PosTerminalField.js.map +1 -1
  72. package/mobile/lib/components/ApplicationFormCustom/RegionPremiumField.js +2 -2
  73. package/mobile/lib/components/ApplicationFormCustom/RegionPremiumField.js.map +1 -1
  74. package/mobile/lib/components/ApplicationFormCustom/VedField.js +7 -0
  75. package/mobile/lib/components/ApplicationFormCustom/VedField.js.map +1 -1
  76. package/mobile/lib/components/ApplicationFormCustom/getField.js +1 -0
  77. package/mobile/lib/components/ApplicationFormCustom/getField.js.map +1 -1
  78. package/mobile/lib/components/ApplicationFormCustom/getInitialFormState.js +1 -0
  79. package/mobile/lib/components/ApplicationFormCustom/getInitialFormState.js.map +1 -1
  80. package/mobile/lib/hooks/useBranchesByRegions.d.ts +8 -0
  81. package/mobile/lib/hooks/{usePremiumBranchesByRegions.js → useBranchesByRegions.js} +3 -3
  82. package/mobile/lib/hooks/useBranchesByRegions.js.map +1 -0
  83. package/mobile/src/api/LeadServiceAPI.ts +5 -1
  84. package/mobile/src/components/ApplicationFormCustom/AddressBranchField.tsx +2 -2
  85. package/mobile/src/components/ApplicationFormCustom/ApplicationFormCustom.example.json +33 -0
  86. package/mobile/src/components/ApplicationFormCustom/ApplicationFormCustomContent.ts +4 -2
  87. package/mobile/src/components/ApplicationFormCustom/PosTerminalField.tsx +1 -1
  88. package/mobile/src/components/ApplicationFormCustom/RegionPremiumField.tsx +2 -2
  89. package/mobile/src/components/ApplicationFormCustom/VedField.tsx +7 -0
  90. package/mobile/src/components/ApplicationFormCustom/getField.tsx +6 -0
  91. package/mobile/src/components/ApplicationFormCustom/getInitialFormState.tsx +1 -0
  92. package/mobile/src/hooks/{usePremiumBranchesByRegions.ts → useBranchesByRegions.ts} +2 -2
  93. package/package.json +1 -1
  94. package/src/api/LeadServiceAPI.ts +5 -1
  95. package/src/components/ApplicationFormCustom/AddressBranchField.tsx +2 -2
  96. package/src/components/ApplicationFormCustom/ApplicationFormCustom.example.json +33 -0
  97. package/src/components/ApplicationFormCustom/ApplicationFormCustom.fixture.tsx +28 -0
  98. package/src/components/ApplicationFormCustom/ApplicationFormCustomContent.ts +4 -2
  99. package/src/components/ApplicationFormCustom/PosTerminalField.tsx +1 -1
  100. package/src/components/ApplicationFormCustom/RegionPremiumField.tsx +2 -2
  101. package/src/components/ApplicationFormCustom/VedField.tsx +7 -0
  102. package/src/components/ApplicationFormCustom/getField.tsx +6 -0
  103. package/src/components/ApplicationFormCustom/getInitialFormState.tsx +1 -0
  104. package/src/hooks/{usePremiumBranchesByRegions.ts → useBranchesByRegions.ts} +2 -2
  105. package/dist/hooks/usePremiumBranchesByRegions.js.map +0 -1
  106. package/lib/hooks/usePremiumBranchesByRegions.js.map +0 -1
  107. package/mobile/dist/hooks/usePremiumBranchesByRegions.d.ts +0 -8
  108. package/mobile/dist/hooks/usePremiumBranchesByRegions.js.map +0 -1
  109. package/mobile/lib/hooks/usePremiumBranchesByRegions.d.ts +0 -8
  110. package/mobile/lib/hooks/usePremiumBranchesByRegions.js.map +0 -1
@@ -825,8 +825,8 @@
825
825
  const submitBody = {
826
826
  typeForm,
827
827
  [isIndividualType ? 'regionBranch' : 'region']: region,
828
- [isIndividualType ? 'phoneNumber' : 'phone']: formatPhone(phone),
829
828
  [isIndividualType ? 'email' : 'mail']: email,
829
+ ...getPhone(phone),
830
830
  ...(isIndividualType ? { birthday: birthday?.toLocaleString() } : { inn, fullName }),
831
831
  ...(typeForm === 'FEEDBACK'
832
832
  ? {}
@@ -859,6 +859,7 @@
859
859
  send,
860
860
  };
861
861
  }
862
+ const getPhone = (phone, isIndividual) => phone ? { [isIndividual ? 'phoneNumber' : 'phone']: formatPhone(phone) } : {};
862
863
  const getSecondaryPhone = (secondaryPhone) => !secondaryPhone || secondaryPhone === '+7 ('
863
864
  ? {}
864
865
  : { secondaryPhoneNumber: formatPhone(secondaryPhone) };
@@ -1320,8 +1321,8 @@
1320
1321
  return result || EMPTY_VALUE$3;
1321
1322
  };
1322
1323
 
1323
- const REGIONS_URL$1 = '/api/v1/premiumBranchesByRegions';
1324
- function usePremiumBranchesByRegions() {
1324
+ const REGIONS_URL$1 = '/api/v1/branchesByRegions';
1325
+ function useBranchesByRegions() {
1325
1326
  const { data } = useAsyncData(REGIONS_URL$1, fetchJSONUnsafe);
1326
1327
  return Array.isArray(data) ? data : [];
1327
1328
  }
@@ -1370,7 +1371,7 @@
1370
1371
  const regionKey = field('region')?.value?.key;
1371
1372
  const regionText = field('region')?.value?.text;
1372
1373
  const addressBranch = isPremium
1373
- ? usePremiumBranchesByRegions()?.find((_) => _?.region === regionText)?.branches
1374
+ ? useBranchesByRegions()?.find((_) => _?.region === regionText)?.branches
1374
1375
  : useBranches(regionKey)?.filter((branch) => branch?.address);
1375
1376
  useEffect(() => {
1376
1377
  if (field('region')?.value?.key !== '') {
@@ -1677,10 +1678,10 @@
1677
1678
 
1678
1679
  const OnlineCheckoutField = JSX(({ field }) => isAcquiringTrade(field('acquiringType')?.value?.key) ? (jsx(SlideCheckbox, { type: "radio", text: "\u0425\u043E\u0447\u0443 \u043E\u043D\u043B\u0430\u0439\u043D-\u043A\u0430\u0441\u0441\u0443", ...field('onlineCheckout') })) : null);
1679
1680
 
1680
- const PosTerminalField = JSX(({ field }) => isAcquiringTrade(field('acquiringType')?.value?.key) ? (jsx(SlideCheckbox, { type: "radio", text: "\u0425\u043E\u0447\u0443 \u043A\u0443\u043F\u0438\u0442\u044C POS-\u0442\u0435\u0440\u043C\u0438\u043D\u0430\u043B", ...field('posTerminal') })) : null);
1681
+ const PosTerminalField = JSX(({ field }) => isAcquiringTrade(field('acquiringType')?.value?.key) ? (jsx(SlideCheckbox, { type: "radio", text: "\u0425\u043E\u0447\u0443 POS-\u0442\u0435\u0440\u043C\u0438\u043D\u0430\u043B", ...field('posTerminal') })) : null);
1681
1682
 
1682
1683
  const RegionPremiumField = JSX(({ field, input }) => {
1683
- const branchByRegions = usePremiumBranchesByRegions();
1684
+ const branchByRegions = useBranchesByRegions();
1684
1685
  const regions = useMemo(() => branchByRegions?.map(({ region }) => ({
1685
1686
  key: region,
1686
1687
  text: region,
@@ -1709,6 +1710,12 @@
1709
1710
  ];
1710
1711
  const VedField = JSX(({ field }) => {
1711
1712
  const { value, onChange } = field('vedTypes');
1713
+ useEffect(() => {
1714
+ if (value !== 'currencyControl') {
1715
+ field?.('inn')?.onChange?.('');
1716
+ field?.('region')?.onChange?.('');
1717
+ }
1718
+ }, [value]);
1712
1719
  return (jsxs("div", { className: "py-m space-x-m grid @xl:flex @xl:items-center", children: [jsx(Radio, { name: "vedTypes", text: "\u0412\u0430\u043B\u044E\u0442\u043D\u044B\u0439 \u043A\u043E\u043D\u0442\u0440\u043E\u043B\u044C", value: "currencyControl", checked: value === 'currencyControl', onChange: onChange }), jsx(Radio, { name: "vedTypes", text: "\u0414\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430\u0440\u043D\u044B\u0435 \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u0438", value: "documentOperations", checked: value === 'documentOperations', onChange: onChange }), jsx(Radio, { name: "vedTypes", text: "\u041A\u043E\u043D\u0432\u0435\u0440\u0441\u0438\u043E\u043D\u043D\u044B\u0435 \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u0438", value: "conversionTransactions", checked: value === 'conversionTransactions', onChange: onChange }), jsx(Radio, { name: "vedTypes", text: "\u0418\u043D\u044B\u0435 \u0432\u043E\u043F\u0440\u043E\u0441\u044B \u0412\u042D\u0414", value: "otherIssues", checked: value === 'otherIssues', onChange: onChange })] }));
1713
1720
  });
1714
1721
 
@@ -1730,6 +1737,7 @@
1730
1737
  addressBranch: jsx(AddressBranchField, { field: field, input: input, isPremium: isPremium }),
1731
1738
  birthday: (jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u0440\u043E\u0436\u0434\u0435\u043D\u0438\u044F", ...getValidation(field('birthday'), validatorObj.birthday, required) })),
1732
1739
  isClient: (jsx(CheckboxWithError, { ...field('isClient'), text: '\u042F\u0432\u043B\u044F\u044E\u0441\u044C \u043A\u043B\u0438\u0435\u043D\u0442\u043E\u043C \u0431\u0430\u043D\u043A\u0430 \u0410\u041E "\u0420\u043E\u0441\u0441\u0435\u043B\u044C\u0445\u043E\u0437\u0431\u0430\u043D\u043A"' })),
1740
+ consentToReceiveMaterials: (jsx(CheckboxWithError, { ...field('consentToReceiveMaterials'), text: "\u0421\u043E\u0433\u043B\u0430\u0441\u0435\u043D \u043D\u0430 \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u0438\u0435 \u0438\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u043E\u043D\u043D\u044B\u0445 \u0438 \u0430\u043D\u0430\u043B\u0438\u0442\u0438\u0447\u0435\u0441\u043A\u0438\u0445 \u043C\u0430\u0442\u0435\u0440\u0438\u0430\u043B\u043E\u0432 \u043F\u043E \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u0435" })),
1733
1741
  partnerComments: (jsx(InputControl, { ...getValidation(field('partnerComments'), validatorObj.partnerComments, required), placeholder: "\u0423\u043A\u0430\u0436\u0438\u0442\u0435 \u0438\u043D\u0442\u0435\u0440\u0435\u0441\u0443\u044E\u0449\u0438\u0439 \u0432\u0430\u0441 \u0432\u043E\u043F\u0440\u043E\u0441", isTextarea: true, ...rest })),
1734
1742
  collectionCount: (jsx(InputControl, { label: "\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043E\u0431\u044A\u0435\u043A\u0442\u043E\u0432 \u0438\u043D\u043A\u0430\u0441\u0441\u0430\u0446\u0438\u0438", type: "number", ...getValidation(field('partnerComments'), validatorObj.collectionCount, required) })),
1735
1743
  acquiringType: jsx(AcquiringField, { field: field, input: input }),
@@ -1801,6 +1809,7 @@
1801
1809
  isClient: false,
1802
1810
  onlineCheckout: false,
1803
1811
  posTerminal: false,
1812
+ consentToReceiveMaterials: false,
1804
1813
  consentDataProcessing: false,
1805
1814
  };
1806
1815
  const getInitialFormState = (inputs, typeForm = '') => {
@@ -6015,7 +6024,7 @@
6015
6024
  slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
6016
6025
  });
6017
6026
 
6018
- const packageVersion = "0.14.234";
6027
+ const packageVersion = "0.14.236";
6019
6028
 
6020
6029
  exports.Blocks = Blocks;
6021
6030
  exports.ContentPage = ContentPage;