@redneckz/wildless-cms-uni-blocks 0.14.238 → 0.14.240

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 (61) hide show
  1. package/bundle/bundle.umd.js +17 -6
  2. package/bundle/bundle.umd.min.js +1 -1
  3. package/bundle/components/ApplicationForm/validators.d.ts +1 -1
  4. package/dist/components/ApplicationForm/ApplicationFormFeedback.js +1 -1
  5. package/dist/components/ApplicationForm/ApplicationFormFeedback.js.map +1 -1
  6. package/dist/components/ApplicationForm/renderAgreementSubmit.js +1 -1
  7. package/dist/components/ApplicationForm/renderAgreementSubmit.js.map +1 -1
  8. package/dist/components/ApplicationForm/validators.d.ts +1 -1
  9. package/dist/components/ApplicationForm/validators.js +2 -2
  10. package/dist/components/ApplicationForm/validators.js.map +1 -1
  11. package/dist/components/ApplicationFormCustom/getObjectValidator.js +1 -1
  12. package/dist/components/ApplicationFormCustom/getObjectValidator.js.map +1 -1
  13. package/dist/hooks/useNavigateHandler.js +13 -1
  14. package/dist/hooks/useNavigateHandler.js.map +1 -1
  15. package/lib/components/ApplicationForm/ApplicationFormFeedback.js +2 -2
  16. package/lib/components/ApplicationForm/ApplicationFormFeedback.js.map +1 -1
  17. package/lib/components/ApplicationForm/renderAgreementSubmit.js +2 -2
  18. package/lib/components/ApplicationForm/renderAgreementSubmit.js.map +1 -1
  19. package/lib/components/ApplicationForm/validators.d.ts +1 -1
  20. package/lib/components/ApplicationForm/validators.js +1 -1
  21. package/lib/components/ApplicationForm/validators.js.map +1 -1
  22. package/lib/components/ApplicationFormCustom/getObjectValidator.js +2 -2
  23. package/lib/components/ApplicationFormCustom/getObjectValidator.js.map +1 -1
  24. package/lib/hooks/useNavigateHandler.js +13 -1
  25. package/lib/hooks/useNavigateHandler.js.map +1 -1
  26. package/mobile/bundle/bundle.umd.js +17 -6
  27. package/mobile/bundle/bundle.umd.min.js +1 -1
  28. package/mobile/bundle/components/ApplicationForm/validators.d.ts +1 -1
  29. package/mobile/dist/components/ApplicationForm/ApplicationFormFeedback.js +1 -1
  30. package/mobile/dist/components/ApplicationForm/ApplicationFormFeedback.js.map +1 -1
  31. package/mobile/dist/components/ApplicationForm/renderAgreementSubmit.js +1 -1
  32. package/mobile/dist/components/ApplicationForm/renderAgreementSubmit.js.map +1 -1
  33. package/mobile/dist/components/ApplicationForm/validators.d.ts +1 -1
  34. package/mobile/dist/components/ApplicationForm/validators.js +2 -2
  35. package/mobile/dist/components/ApplicationForm/validators.js.map +1 -1
  36. package/mobile/dist/components/ApplicationFormCustom/getObjectValidator.js +1 -1
  37. package/mobile/dist/components/ApplicationFormCustom/getObjectValidator.js.map +1 -1
  38. package/mobile/dist/hooks/useNavigateHandler.js +13 -1
  39. package/mobile/dist/hooks/useNavigateHandler.js.map +1 -1
  40. package/mobile/lib/components/ApplicationForm/ApplicationFormFeedback.js +2 -2
  41. package/mobile/lib/components/ApplicationForm/ApplicationFormFeedback.js.map +1 -1
  42. package/mobile/lib/components/ApplicationForm/renderAgreementSubmit.js +2 -2
  43. package/mobile/lib/components/ApplicationForm/renderAgreementSubmit.js.map +1 -1
  44. package/mobile/lib/components/ApplicationForm/validators.d.ts +1 -1
  45. package/mobile/lib/components/ApplicationForm/validators.js +1 -1
  46. package/mobile/lib/components/ApplicationForm/validators.js.map +1 -1
  47. package/mobile/lib/components/ApplicationFormCustom/getObjectValidator.js +2 -2
  48. package/mobile/lib/components/ApplicationFormCustom/getObjectValidator.js.map +1 -1
  49. package/mobile/lib/hooks/useNavigateHandler.js +13 -1
  50. package/mobile/lib/hooks/useNavigateHandler.js.map +1 -1
  51. package/mobile/src/components/ApplicationForm/ApplicationFormFeedback.tsx +2 -2
  52. package/mobile/src/components/ApplicationForm/renderAgreementSubmit.tsx +2 -2
  53. package/mobile/src/components/ApplicationForm/validators.ts +3 -1
  54. package/mobile/src/components/ApplicationFormCustom/getObjectValidator.tsx +2 -2
  55. package/mobile/src/hooks/useNavigateHandler.ts +15 -1
  56. package/package.json +2 -2
  57. package/src/components/ApplicationForm/ApplicationFormFeedback.tsx +2 -2
  58. package/src/components/ApplicationForm/renderAgreementSubmit.tsx +2 -2
  59. package/src/components/ApplicationForm/validators.ts +3 -1
  60. package/src/components/ApplicationFormCustom/getObjectValidator.tsx +2 -2
  61. package/src/hooks/useNavigateHandler.ts +15 -1
@@ -1337,7 +1337,7 @@
1337
1337
  const nameValidator = validator((_) => typeof _ === 'string' && _.length > 1)(ERROR_MESSAGE);
1338
1338
  const innValidator = validator((_) => typeof _ === 'string' && (_.length === 10 || _.length === 12))(ERROR_MESSAGE);
1339
1339
  const phoneValidator = pattern(/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/)(ERROR_MESSAGE);
1340
- const checkboxValidator = validator((_) => typeof _ === 'boolean' && _)(ERROR_MESSAGE);
1340
+ const agreementValidator = validator((_) => typeof _ === 'boolean' && _)('Согласие обязательно');
1341
1341
 
1342
1342
  const getNamesFromInput = (inputs) => Object.values(inputs.filter((_) => _))?.map((_) => _.name);
1343
1343
 
@@ -1357,7 +1357,7 @@
1357
1357
  comment: defaultValidator,
1358
1358
  acquiringType: defaultSelectValidator,
1359
1359
  serviceType: defaultSelectValidator,
1360
- consentDataProcessing: checkboxValidator,
1360
+ consentDataProcessing: agreementValidator,
1361
1361
  annualRevenue: defaultValidator,
1362
1362
  };
1363
1363
  const getObjectValidator = (inputs) => {
@@ -1483,7 +1483,7 @@
1483
1483
  const renderSubmitButton = (button, className) => (jsx(Button, { className: style('w-full @xl:w-auto', className), type: "submit", children: button?.text ? button.text : 'Отправить заявку' }));
1484
1484
 
1485
1485
  const agreementText = 'Нажимая кнопку, вы подтверждаете согласие с ';
1486
- const renderAgreementSubmit = (consentDataProcessing, link, button) => (jsxs("div", { className: "flex col-span-2 gap-m flex-col lg:flex-row w-full justify-between items-baseline", children: [consentDataProcessing ? (jsxs("div", { children: [jsxs("div", { className: "flex gap-3", children: [jsx(Checkbox, { ...consentDataProcessing }), jsx(Footnote, { link: link })] }), renderErrorText(withValidator(consentDataProcessing, checkboxValidator).error)] })) : (jsx(Footnote, { text: agreementText, link: link })), renderSubmitButton(button)] }));
1486
+ const renderAgreementSubmit = (consentDataProcessing, link, button) => (jsxs("div", { className: "flex col-span-2 gap-m flex-col lg:flex-row w-full justify-between items-baseline", children: [consentDataProcessing ? (jsxs("div", { children: [jsxs("div", { className: "flex gap-3", children: [jsx(Checkbox, { ...consentDataProcessing }), jsx(Footnote, { link: link })] }), renderErrorText(withValidator(consentDataProcessing, agreementValidator).error)] })) : (jsx(Footnote, { text: agreementText, link: link })), renderSubmitButton(button)] }));
1487
1487
 
1488
1488
  const initialFormState$1 = {
1489
1489
  surname: '',
@@ -1507,7 +1507,7 @@
1507
1507
  phone: phoneValidator,
1508
1508
  email: defaultValidator,
1509
1509
  comment: defaultValidator,
1510
- consentDataProcessing: checkboxValidator,
1510
+ consentDataProcessing: agreementValidator,
1511
1511
  };
1512
1512
  const ApplicationFormFeedback = JSX(({ button, link, onSubmit }) => {
1513
1513
  const handleSubmit = useCallback((feedbackFormState) => {
@@ -5862,7 +5862,7 @@
5862
5862
  ev.stopPropagation();
5863
5863
  const url = adjustSessionQuery(element?.href) || element?.href;
5864
5864
  if (url) {
5865
- globalThis.location.href = url;
5865
+ goTransition(element?.target)?.(url);
5866
5866
  }
5867
5867
  }
5868
5868
  };
@@ -5873,6 +5873,17 @@
5873
5873
  }
5874
5874
  return _target;
5875
5875
  };
5876
+ const goTransition = tableFunc([
5877
+ [(_) => _ === '_blank', (url) => globalThis.open(url, '_blank')],
5878
+ [(_) => _ === '_parent', (url) => globalThis.parent && (globalThis.parent.location.href = url)],
5879
+ [
5880
+ (_) => _ === '_top',
5881
+ (url) => {
5882
+ globalThis.top && (globalThis.top.location.href = url);
5883
+ },
5884
+ ],
5885
+ [() => true, (url) => globalThis.location && (globalThis.location.href = url)],
5886
+ ]);
5876
5887
 
5877
5888
  const COOKIE_DIALOG_ID = 'cookie';
5878
5889
  const DIALOG_INITIAL_DELAY = 3 * 1000;
@@ -6024,7 +6035,7 @@
6024
6035
  slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
6025
6036
  });
6026
6037
 
6027
- const packageVersion = "0.14.237";
6038
+ const packageVersion = "0.14.239";
6028
6039
 
6029
6040
  exports.Blocks = Blocks;
6030
6041
  exports.ContentPage = ContentPage;