@redneckz/wildless-cms-uni-blocks 0.14.1020 → 0.14.1021

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 (39) hide show
  1. package/bundle/bundle.umd.js +18 -9
  2. package/bundle/bundle.umd.min.js +1 -1
  3. package/bundle/components/ApplicationForm/VerifyPhoneDialog.d.ts +1 -1
  4. package/bundle/components/ApplicationForm/useVerifyPhoneDialogSubmit.d.ts +1 -1
  5. package/dist/components/ApplicationForm/VerifyPhoneDialog.d.ts +1 -1
  6. package/dist/components/ApplicationForm/handlers.js +12 -2
  7. package/dist/components/ApplicationForm/handlers.js.map +1 -1
  8. package/dist/components/ApplicationForm/useVerifyPhoneDialogSubmit.d.ts +1 -1
  9. package/dist/components/ApplicationForm/useVerifyPhoneDialogSubmit.js +1 -1
  10. package/dist/components/ApplicationForm/useVerifyPhoneDialogSubmit.js.map +1 -1
  11. package/lib/components/ApplicationForm/VerifyPhoneDialog.d.ts +1 -1
  12. package/lib/components/ApplicationForm/handlers.js +12 -2
  13. package/lib/components/ApplicationForm/handlers.js.map +1 -1
  14. package/lib/components/ApplicationForm/useVerifyPhoneDialogSubmit.d.ts +1 -1
  15. package/lib/components/ApplicationForm/useVerifyPhoneDialogSubmit.js +1 -1
  16. package/lib/components/ApplicationForm/useVerifyPhoneDialogSubmit.js.map +1 -1
  17. package/mobile/bundle/bundle.umd.js +18 -9
  18. package/mobile/bundle/bundle.umd.min.js +1 -1
  19. package/mobile/bundle/components/ApplicationForm/VerifyPhoneDialog.d.ts +1 -1
  20. package/mobile/bundle/components/ApplicationForm/useVerifyPhoneDialogSubmit.d.ts +1 -1
  21. package/mobile/dist/components/ApplicationForm/VerifyPhoneDialog.d.ts +1 -1
  22. package/mobile/dist/components/ApplicationForm/handlers.js +12 -2
  23. package/mobile/dist/components/ApplicationForm/handlers.js.map +1 -1
  24. package/mobile/dist/components/ApplicationForm/useVerifyPhoneDialogSubmit.d.ts +1 -1
  25. package/mobile/dist/components/ApplicationForm/useVerifyPhoneDialogSubmit.js +1 -1
  26. package/mobile/dist/components/ApplicationForm/useVerifyPhoneDialogSubmit.js.map +1 -1
  27. package/mobile/lib/components/ApplicationForm/VerifyPhoneDialog.d.ts +1 -1
  28. package/mobile/lib/components/ApplicationForm/handlers.js +12 -2
  29. package/mobile/lib/components/ApplicationForm/handlers.js.map +1 -1
  30. package/mobile/lib/components/ApplicationForm/useVerifyPhoneDialogSubmit.d.ts +1 -1
  31. package/mobile/lib/components/ApplicationForm/useVerifyPhoneDialogSubmit.js +1 -1
  32. package/mobile/lib/components/ApplicationForm/useVerifyPhoneDialogSubmit.js.map +1 -1
  33. package/mobile/src/components/ApplicationForm/VerifyPhoneDialog.tsx +1 -1
  34. package/mobile/src/components/ApplicationForm/handlers.ts +13 -2
  35. package/mobile/src/components/ApplicationForm/useVerifyPhoneDialogSubmit.tsx +2 -2
  36. package/package.json +1 -1
  37. package/src/components/ApplicationForm/VerifyPhoneDialog.tsx +1 -1
  38. package/src/components/ApplicationForm/handlers.ts +13 -2
  39. package/src/components/ApplicationForm/useVerifyPhoneDialogSubmit.tsx +2 -2
@@ -2003,6 +2003,11 @@
2003
2003
  return endpoint;
2004
2004
  };
2005
2005
 
2006
+ const getAspectsWithInclude = (data, include) => data?.map(({ aspectName, params }) => ({
2007
+ aspectName,
2008
+ params: aspectName === 'snowplowEvent' ? { ...params, eventJSON: include } : params,
2009
+ }));
2010
+
2006
2011
  const handleAspects = async ({ aspectsAttributes, aspects, ev }) => {
2007
2012
  for (const { aspectName, params } of aspectsAttributes ?? []) {
2008
2013
  const aspectFn = aspects[aspectName ?? ''];
@@ -2024,10 +2029,19 @@
2024
2029
  phone,
2025
2030
  formatData,
2026
2031
  reqId: String(response),
2027
- onSuccess: () => {
2032
+ onSuccess: (id) => {
2028
2033
  verifyPhoneDialog.close();
2029
2034
  responseTypeDialog.open({ ok: true, typeForm });
2030
- handleAspects({ aspectsAttributes: data, aspects, ev });
2035
+ const snowplowParams = JSON.stringify({
2036
+ inn: formatData?.inn,
2037
+ phone,
2038
+ id,
2039
+ });
2040
+ handleAspects({
2041
+ aspectsAttributes: getAspectsWithInclude(data, snowplowParams),
2042
+ aspects,
2043
+ ev,
2044
+ });
2031
2045
  },
2032
2046
  });
2033
2047
  };
@@ -3567,7 +3581,7 @@
3567
3581
  }
3568
3582
  setTimeNextReq(0);
3569
3583
  resetError();
3570
- onSuccess?.(values.join(''));
3584
+ onSuccess?.(response?.reqId);
3571
3585
  }
3572
3586
  catch {
3573
3587
  setErrorText('Неверный код');
@@ -7384,11 +7398,6 @@
7384
7398
  }, []);
7385
7399
  };
7386
7400
 
7387
- const getAspectsWithInclude = (data, include) => data?.map(({ aspectName, params }) => ({
7388
- aspectName,
7389
- params: aspectName === 'snowplowEvent' ? { ...params, eventJSON: include } : params,
7390
- }));
7391
-
7392
7401
  const useSendLeadFormAspects = ({ data }) => {
7393
7402
  const aspects = useAspects();
7394
7403
  return useCallback((ProfileId, TaskId) => {
@@ -14314,7 +14323,7 @@
14314
14323
  slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
14315
14324
  });
14316
14325
 
14317
- const packageVersion = "0.14.1019";
14326
+ const packageVersion = "0.14.1020";
14318
14327
 
14319
14328
  exports.Blocks = Blocks;
14320
14329
  exports.ContentPage = ContentPage;