@redneckz/wildless-cms-uni-blocks 0.14.1023 → 0.14.1025

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 (102) hide show
  1. package/bin/migration-scripts/0.14.1013.js +3 -1
  2. package/bundle/bundle.umd.js +31 -19
  3. package/bundle/bundle.umd.min.js +1 -1
  4. package/bundle/components/ApplicationLeadForm/getLeadFormTaskData.d.ts +7 -1
  5. package/bundle/ui-kit/UserSurveyDialog/Star.d.ts +4 -5
  6. package/bundle/ui-kit/UserSurveyDialog/UserSurveyDialogContent.d.ts +1 -0
  7. package/dist/api/sendUserSurvey.js +1 -1
  8. package/dist/api/sendUserSurvey.js.map +1 -1
  9. package/dist/components/ApplicationLeadForm/getLeadFormTaskData.d.ts +7 -1
  10. package/dist/components/ApplicationLeadForm/getLeadFormTaskData.js.map +1 -1
  11. package/dist/components/Header/HeaderQuickActionsMenu.js +1 -3
  12. package/dist/components/Header/HeaderQuickActionsMenu.js.map +1 -1
  13. package/dist/ui-kit/UserSurveyDialog/FirstStep.js +2 -2
  14. package/dist/ui-kit/UserSurveyDialog/FirstStep.js.map +1 -1
  15. package/dist/ui-kit/UserSurveyDialog/SecondStep.js +2 -2
  16. package/dist/ui-kit/UserSurveyDialog/SecondStep.js.map +1 -1
  17. package/dist/ui-kit/UserSurveyDialog/Star.d.ts +4 -5
  18. package/dist/ui-kit/UserSurveyDialog/Star.js +12 -4
  19. package/dist/ui-kit/UserSurveyDialog/Star.js.map +1 -1
  20. package/dist/ui-kit/UserSurveyDialog/UserSurveyDialog.js +8 -2
  21. package/dist/ui-kit/UserSurveyDialog/UserSurveyDialog.js.map +1 -1
  22. package/dist/ui-kit/UserSurveyDialog/UserSurveyDialogContent.d.ts +1 -0
  23. package/dist/ui-kit/UserSurveyDialog/useUserSurveyDialog.js +4 -4
  24. package/dist/ui-kit/UserSurveyDialog/useUserSurveyDialog.js.map +1 -1
  25. package/lib/api/sendUserSurvey.js +1 -1
  26. package/lib/api/sendUserSurvey.js.map +1 -1
  27. package/lib/components/ApplicationLeadForm/getLeadFormTaskData.d.ts +7 -1
  28. package/lib/components/ApplicationLeadForm/getLeadFormTaskData.js.map +1 -1
  29. package/lib/components/Header/HeaderQuickActionsMenu.js +1 -3
  30. package/lib/components/Header/HeaderQuickActionsMenu.js.map +1 -1
  31. package/lib/ui-kit/UserSurveyDialog/FirstStep.js +2 -2
  32. package/lib/ui-kit/UserSurveyDialog/FirstStep.js.map +1 -1
  33. package/lib/ui-kit/UserSurveyDialog/SecondStep.js +2 -2
  34. package/lib/ui-kit/UserSurveyDialog/SecondStep.js.map +1 -1
  35. package/lib/ui-kit/UserSurveyDialog/Star.d.ts +4 -5
  36. package/lib/ui-kit/UserSurveyDialog/Star.js +12 -4
  37. package/lib/ui-kit/UserSurveyDialog/Star.js.map +1 -1
  38. package/lib/ui-kit/UserSurveyDialog/UserSurveyDialog.js +8 -2
  39. package/lib/ui-kit/UserSurveyDialog/UserSurveyDialog.js.map +1 -1
  40. package/lib/ui-kit/UserSurveyDialog/UserSurveyDialogContent.d.ts +1 -0
  41. package/lib/ui-kit/UserSurveyDialog/useUserSurveyDialog.js +4 -4
  42. package/lib/ui-kit/UserSurveyDialog/useUserSurveyDialog.js.map +1 -1
  43. package/mobile/bundle/bundle.umd.js +31 -19
  44. package/mobile/bundle/bundle.umd.min.js +1 -1
  45. package/mobile/bundle/components/ApplicationLeadForm/getLeadFormTaskData.d.ts +7 -1
  46. package/mobile/bundle/ui-kit/UserSurveyDialog/Star.d.ts +4 -5
  47. package/mobile/bundle/ui-kit/UserSurveyDialog/UserSurveyDialogContent.d.ts +1 -0
  48. package/mobile/dist/api/sendUserSurvey.js +1 -1
  49. package/mobile/dist/api/sendUserSurvey.js.map +1 -1
  50. package/mobile/dist/components/ApplicationLeadForm/getLeadFormTaskData.d.ts +7 -1
  51. package/mobile/dist/components/ApplicationLeadForm/getLeadFormTaskData.js.map +1 -1
  52. package/mobile/dist/components/Header/HeaderQuickActionsMenu.js +1 -3
  53. package/mobile/dist/components/Header/HeaderQuickActionsMenu.js.map +1 -1
  54. package/mobile/dist/ui-kit/UserSurveyDialog/FirstStep.js +2 -2
  55. package/mobile/dist/ui-kit/UserSurveyDialog/FirstStep.js.map +1 -1
  56. package/mobile/dist/ui-kit/UserSurveyDialog/SecondStep.js +2 -2
  57. package/mobile/dist/ui-kit/UserSurveyDialog/SecondStep.js.map +1 -1
  58. package/mobile/dist/ui-kit/UserSurveyDialog/Star.d.ts +4 -5
  59. package/mobile/dist/ui-kit/UserSurveyDialog/Star.js +12 -4
  60. package/mobile/dist/ui-kit/UserSurveyDialog/Star.js.map +1 -1
  61. package/mobile/dist/ui-kit/UserSurveyDialog/UserSurveyDialog.js +8 -2
  62. package/mobile/dist/ui-kit/UserSurveyDialog/UserSurveyDialog.js.map +1 -1
  63. package/mobile/dist/ui-kit/UserSurveyDialog/UserSurveyDialogContent.d.ts +1 -0
  64. package/mobile/dist/ui-kit/UserSurveyDialog/useUserSurveyDialog.js +4 -4
  65. package/mobile/dist/ui-kit/UserSurveyDialog/useUserSurveyDialog.js.map +1 -1
  66. package/mobile/lib/api/sendUserSurvey.js +1 -1
  67. package/mobile/lib/api/sendUserSurvey.js.map +1 -1
  68. package/mobile/lib/components/ApplicationLeadForm/getLeadFormTaskData.d.ts +7 -1
  69. package/mobile/lib/components/ApplicationLeadForm/getLeadFormTaskData.js.map +1 -1
  70. package/mobile/lib/components/Header/HeaderQuickActionsMenu.js +1 -3
  71. package/mobile/lib/components/Header/HeaderQuickActionsMenu.js.map +1 -1
  72. package/mobile/lib/ui-kit/UserSurveyDialog/FirstStep.js +2 -2
  73. package/mobile/lib/ui-kit/UserSurveyDialog/FirstStep.js.map +1 -1
  74. package/mobile/lib/ui-kit/UserSurveyDialog/SecondStep.js +2 -2
  75. package/mobile/lib/ui-kit/UserSurveyDialog/SecondStep.js.map +1 -1
  76. package/mobile/lib/ui-kit/UserSurveyDialog/Star.d.ts +4 -5
  77. package/mobile/lib/ui-kit/UserSurveyDialog/Star.js +12 -4
  78. package/mobile/lib/ui-kit/UserSurveyDialog/Star.js.map +1 -1
  79. package/mobile/lib/ui-kit/UserSurveyDialog/UserSurveyDialog.js +8 -2
  80. package/mobile/lib/ui-kit/UserSurveyDialog/UserSurveyDialog.js.map +1 -1
  81. package/mobile/lib/ui-kit/UserSurveyDialog/UserSurveyDialogContent.d.ts +1 -0
  82. package/mobile/lib/ui-kit/UserSurveyDialog/useUserSurveyDialog.js +4 -4
  83. package/mobile/lib/ui-kit/UserSurveyDialog/useUserSurveyDialog.js.map +1 -1
  84. package/mobile/src/api/sendUserSurvey.ts +1 -1
  85. package/mobile/src/components/ApplicationLeadForm/getLeadFormTaskData.ts +8 -4
  86. package/mobile/src/components/Header/HeaderQuickActionsMenu.tsx +1 -3
  87. package/mobile/src/ui-kit/UserSurveyDialog/FirstStep.tsx +3 -4
  88. package/mobile/src/ui-kit/UserSurveyDialog/SecondStep.tsx +2 -2
  89. package/mobile/src/ui-kit/UserSurveyDialog/Star.tsx +33 -18
  90. package/mobile/src/ui-kit/UserSurveyDialog/UserSurveyDialog.tsx +9 -2
  91. package/mobile/src/ui-kit/UserSurveyDialog/UserSurveyDialogContent.ts +1 -0
  92. package/mobile/src/ui-kit/UserSurveyDialog/useUserSurveyDialog.ts +4 -4
  93. package/package.json +1 -1
  94. package/src/api/sendUserSurvey.ts +1 -1
  95. package/src/components/ApplicationLeadForm/getLeadFormTaskData.ts +8 -4
  96. package/src/components/Header/HeaderQuickActionsMenu.tsx +1 -3
  97. package/src/ui-kit/UserSurveyDialog/FirstStep.tsx +3 -4
  98. package/src/ui-kit/UserSurveyDialog/SecondStep.tsx +2 -2
  99. package/src/ui-kit/UserSurveyDialog/Star.tsx +33 -18
  100. package/src/ui-kit/UserSurveyDialog/UserSurveyDialog.tsx +9 -2
  101. package/src/ui-kit/UserSurveyDialog/UserSurveyDialogContent.ts +1 -0
  102. package/src/ui-kit/UserSurveyDialog/useUserSurveyDialog.ts +4 -4
@@ -7,7 +7,9 @@ export default (uniPath, content) => {
7
7
  };
8
8
 
9
9
  function modifyBlock(data, uniPath) {
10
- if (!uniPath.includes('.page.json')) return;
10
+ if (!uniPath.includes('.page.json')) {
11
+ return;
12
+ }
11
13
 
12
14
  const slug = data?.slug;
13
15
  const canonical = data?.main?.canonical || '';
@@ -1748,7 +1748,7 @@
1748
1748
  const sendUserSurvey = async (body) => {
1749
1749
  try {
1750
1750
  const response = await LeadServiceFetch(`${API_BASE_URI}/survey`, body);
1751
- return await response;
1751
+ return response;
1752
1752
  }
1753
1753
  catch (e) {
1754
1754
  return null;
@@ -1765,12 +1765,20 @@
1765
1765
 
1766
1766
  const SubmitButton$1 = JSX(({ isLoading, disabled, children, className, ...rest }) => (jsxs(Button, { type: "submit", className: style('relative', className), disabled: isLoading || disabled, ...rest, children: [isLoading ? jsx(Loader, { blur: true, size: "small" }) : null, children] })));
1767
1767
 
1768
- const Star = JSX(({ value, hover, rating, setHover, setRating }) => {
1769
- const fillColor = value <= (hover || rating) ? '#42AB44' : '#C9CACC';
1770
- return (jsx("div", { onClick: () => setRating?.(value), onMouseEnter: () => setHover?.(value), onMouseLeave: () => setHover?.(null), children: jsx("svg", { "data-rating": value, fill: fillColor, width: "57", height: "57", viewBox: "0 0 57 57", children: jsx("path", { d: "M47.7803 18.2879L47.7836 18.2884C50.566 18.7521 53.0867 20.1374 53.9176 22.7226C54.7498 25.3116 53.5025 27.9027 51.4977 29.8954L51.4942 29.8989L45.7132 35.6799C45.5729 35.8202 45.3591 36.1532 45.2186 36.6438C45.0796 37.1295 45.0808 37.5314 45.1257 37.7381L45.1268 37.743L46.78 44.8909C47.4787 47.9228 47.3175 51.2217 44.8924 52.9896C42.4714 54.7546 39.2808 53.9093 36.5999 52.3257L29.6214 48.1946C29.4392 48.0866 29.0426 47.96 28.5087 47.96C27.9816 47.96 27.5736 48.0831 27.3687 48.2004L27.3634 48.2035L20.4041 52.3232L20.4019 52.3246C17.7218 53.9145 14.5351 54.7459 12.1155 52.9803C9.69339 51.213 9.51826 47.9236 10.22 44.8909L11.8731 37.743L11.8743 37.7379C11.9191 37.5311 11.9203 37.1293 11.7813 36.6438C11.6409 36.1532 11.4271 35.8202 11.2867 35.6799L5.50006 29.8932C3.50738 27.9006 2.26429 25.3118 3.08972 22.7269C3.91586 20.1398 6.43161 18.7525 9.21638 18.2884L16.6527 17.0529L16.6552 17.0525C16.8169 17.0243 17.1619 16.8935 17.5523 16.604C17.945 16.3128 18.1668 16.022 18.2378 15.877L18.2462 15.8598L22.3508 7.65087L22.352 7.6485C23.629 5.08222 25.7146 3.01416 28.4796 3.01416C31.2412 3.01416 33.3328 5.07832 34.6215 7.64213L34.6236 7.64649L38.7303 15.8598L38.75 15.9001C38.7884 15.9807 38.8225 16.0591 38.8511 16.1283C38.9197 16.1891 39.0148 16.2702 39.1464 16.3781C39.1829 16.394 39.242 16.4185 39.3288 16.4505C39.5779 16.5424 39.9286 16.6512 40.3732 16.7719C41.2573 17.0121 42.3688 17.2611 43.4823 17.4894C44.5886 17.7163 45.6648 17.9163 46.4667 18.0598C46.8669 18.1315 47.1972 18.1888 47.4266 18.2281L47.6909 18.2729L47.7589 18.2843L47.7803 18.2879Z" }) }) }));
1771
- });
1768
+ const GREY_COLOR = '#C9CACC';
1769
+ const GREEN_COLOR = '#42AB44';
1770
+ const Star = JSX(({ value, hover, rating, setHover, setRating }) => (jsx("div", { onClick: () => value && setRating?.(value), onMouseEnter: () => value && setHover?.(value), onMouseLeave: () => setHover?.(null), children: jsx("svg", { "data-rating": value, fill: getColor({ value, hover, rating }), width: "57", height: "57", viewBox: "0 0 57 57", children: jsx("path", { d: "M47.7803 18.2879L47.7836 18.2884C50.566 18.7521 53.0867 20.1374 53.9176 22.7226C54.7498 25.3116 53.5025 27.9027 51.4977 29.8954L51.4942 29.8989L45.7132 35.6799C45.5729 35.8202 45.3591 36.1532 45.2186 36.6438C45.0796 37.1295 45.0808 37.5314 45.1257 37.7381L45.1268 37.743L46.78 44.8909C47.4787 47.9228 47.3175 51.2217 44.8924 52.9896C42.4714 54.7546 39.2808 53.9093 36.5999 52.3257L29.6214 48.1946C29.4392 48.0866 29.0426 47.96 28.5087 47.96C27.9816 47.96 27.5736 48.0831 27.3687 48.2004L27.3634 48.2035L20.4041 52.3232L20.4019 52.3246C17.7218 53.9145 14.5351 54.7459 12.1155 52.9803C9.69339 51.213 9.51826 47.9236 10.22 44.8909L11.8731 37.743L11.8743 37.7379C11.9191 37.5311 11.9203 37.1293 11.7813 36.6438C11.6409 36.1532 11.4271 35.8202 11.2867 35.6799L5.50006 29.8932C3.50738 27.9006 2.26429 25.3118 3.08972 22.7269C3.91586 20.1398 6.43161 18.7525 9.21638 18.2884L16.6527 17.0529L16.6552 17.0525C16.8169 17.0243 17.1619 16.8935 17.5523 16.604C17.945 16.3128 18.1668 16.022 18.2378 15.877L18.2462 15.8598L22.3508 7.65087L22.352 7.6485C23.629 5.08222 25.7146 3.01416 28.4796 3.01416C31.2412 3.01416 33.3328 5.07832 34.6215 7.64213L34.6236 7.64649L38.7303 15.8598L38.75 15.9001C38.7884 15.9807 38.8225 16.0591 38.8511 16.1283C38.9197 16.1891 39.0148 16.2702 39.1464 16.3781C39.1829 16.394 39.242 16.4185 39.3288 16.4505C39.5779 16.5424 39.9286 16.6512 40.3732 16.7719C41.2573 17.0121 42.3688 17.2611 43.4823 17.4894C44.5886 17.7163 45.6648 17.9163 46.4667 18.0598C46.8669 18.1315 47.1972 18.1888 47.4266 18.2281L47.6909 18.2729L47.7589 18.2843L47.7803 18.2879Z" }) }) })));
1771
+ const getColor = ({ value, hover, rating }) => {
1772
+ if (value && hover) {
1773
+ return value <= hover ? GREEN_COLOR : GREY_COLOR;
1774
+ }
1775
+ if (value && rating) {
1776
+ return value <= rating ? GREEN_COLOR : GREY_COLOR;
1777
+ }
1778
+ return GREY_COLOR;
1779
+ };
1772
1780
 
1773
- const stars$1 = new Array(5).fill(Star);
1781
+ const stars$1 = Array.from('12345', () => Star);
1774
1782
  const TITLE$1 = {
1775
1783
  NPS: 'Оцените, пожалуйста, от 1 до 5,\nнасколько вероятно, что вы порекомендуете Россельхозбанк коллегам, друзьям и знакомым?',
1776
1784
  CSI: 'Оцените, пожалуйста, удовлетворённость пользования сайтом',
@@ -1783,7 +1791,7 @@
1783
1791
  onNextStep();
1784
1792
  }
1785
1793
  };
1786
- return (jsxs("div", { className: "flex flex-col gap-xl items-center", children: [jsx(Heading, { className: "text-center whitespace-pre-line", headingType: "h5", title: TITLE$1[surveyType] }), jsx("div", { className: "flex justify-center", children: stars$1.map((StarItem, index) => (jsx(StarItem, { value: index + 1, rating: currentRating, hover: currentHover, setRating: setRatingFn, setHover: setCurrentHover, className: "modal-feedback__star" }, index))) }), currentRating === 5 ? (jsx(SubmitButton$1, { onClick: () => onSubmit(), isLoading: isSending, children: "\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C" })) : null] }));
1794
+ return (jsxs("div", { className: "flex flex-col gap-xl items-center", children: [jsx(Heading, { className: "text-center whitespace-pre-line", headingType: "h5", title: TITLE$1[surveyType] }), jsx("div", { className: "flex justify-center", children: stars$1.map((StarItem, index) => (jsx(StarItem, { value: index + 1, rating: currentRating, hover: currentHover, setRating: setRatingFn, setHover: setCurrentHover }, index.toString()))) }), currentRating === 5 ? (jsx(SubmitButton$1, { onClick: () => onSubmit(), isLoading: isSending, children: "\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C" })) : null] }));
1787
1795
  });
1788
1796
 
1789
1797
  const SVG = JSX(({ className, viewBox, fill = 'none', width, height, paths, ...commonOptions }) => {
@@ -1900,7 +1908,7 @@
1900
1908
  return jsx(InputWrapper, { isOpen: isOpen, onOpen: open, onClose: close, ...props });
1901
1909
  });
1902
1910
 
1903
- const stars = new Array(5).fill(Star);
1911
+ const stars = Array.from('12345', () => Star);
1904
1912
  const TITLE = 'Что бы мы могли улучшить?';
1905
1913
  const SecondStep = JSX(({ currentRating, currentReason, reasons = [], isSending, setCurrentReason, onSubmit }) => {
1906
1914
  const [comment, setComment] = useState();
@@ -1910,12 +1918,12 @@
1910
1918
  text,
1911
1919
  });
1912
1920
  };
1913
- return (jsxs("div", { className: "flex flex-col gap-xl items-center", children: [jsx(Heading, { className: "text-center", headingType: "h5", title: TITLE }), jsx("div", { className: "flex justify-center", children: stars.map((StarItem, index) => (jsx(StarItem, { value: index + 1, rating: currentRating }, index))) }), jsx(RadioButtonGroup, { className: "w-full text-wrap", orientation: "vertical", items: reasons, value: currentReason?.id, onChange: handleReasonChange }), currentReason?.text === 'Другое' ? (jsx(InputControl, { className: "w-full", placeholder: "\u041D\u0430\u043F\u0438\u0448\u0438\u0442\u0435, \u043F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430, \u0441\u0432\u043E\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442 \u043E\u0442\u0432\u0435\u0442\u0430", isTextarea: true, value: comment, onChange: setComment, maxLength: 255 })) : null, currentReason ? (jsx(SubmitButton$1, { onClick: () => onSubmit(comment), isLoading: isSending, children: "\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C" })) : null] }));
1921
+ return (jsxs("div", { className: "flex flex-col gap-xl items-center", children: [jsx(Heading, { className: "text-center", headingType: "h5", title: TITLE }), jsx("div", { className: "flex justify-center", children: stars.map((StarItem, index) => (jsx(StarItem, { value: index + 1, rating: currentRating }, index.toString()))) }), jsx(RadioButtonGroup, { className: "w-full text-wrap", orientation: "vertical", items: reasons, value: currentReason?.id, onChange: handleReasonChange }), currentReason?.text === 'Другое' ? (jsx(InputControl, { className: "w-full", placeholder: "\u041D\u0430\u043F\u0438\u0448\u0438\u0442\u0435, \u043F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430, \u0441\u0432\u043E\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442 \u043E\u0442\u0432\u0435\u0442\u0430", isTextarea: true, value: comment, onChange: setComment, maxLength: 255 })) : null, currentReason ? (jsx(SubmitButton$1, { onClick: () => onSubmit(comment), isLoading: isSending, children: "\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C" })) : null] }));
1914
1922
  });
1915
1923
 
1916
1924
  const STEPS$3 = [FirstStep, SecondStep, FinalStep];
1917
1925
  const LAST_STEP_INDEX = 2;
1918
- const UserSurveyDialog = UniBlock(({ onClose = noop, isAfterTargetAction = false, reasonsSource = {} }) => {
1926
+ const UserSurveyDialog = UniBlock(({ onClose = noop, isAfterTargetAction = false, reasonsSource = {}, onSkip = noop }) => {
1919
1927
  const [isSending, { setTrue: startSending, setFalse: endSending }] = useBool(false);
1920
1928
  const [currentRating, setCurrentRating] = useState(0);
1921
1929
  const [currentReason, setCurrentReason] = useState();
@@ -1944,7 +1952,13 @@
1944
1952
  };
1945
1953
  setStep(LAST_STEP_INDEX);
1946
1954
  }, [currentRating, currentReason]);
1947
- return (jsx(Dialog, { maxWidth: "xl", onClose: onClose, children: jsx(ActiveStep, { currentRating: currentRating, currentReason: currentReason, reasons: reasons, surveyType: surveyType, isSending: isSending, setCurrentReason: setCurrentReason, setCurrentRating: setCurrentRating, onSubmit: handleSubmit, onNextStep: handleNextStep }) }));
1955
+ const handleClose = useCallback(() => {
1956
+ if (step !== LAST_STEP_INDEX) {
1957
+ onSkip();
1958
+ }
1959
+ onClose();
1960
+ }, [step]);
1961
+ return (jsx(Dialog, { maxWidth: "xl", onClose: handleClose, children: jsx(ActiveStep, { currentRating: currentRating, currentReason: currentReason, reasons: reasons, surveyType: surveyType, isSending: isSending, setCurrentReason: setCurrentReason, setCurrentRating: setCurrentRating, onSubmit: handleSubmit, onNextStep: handleNextStep }) }));
1948
1962
  });
1949
1963
  const getMessage = (currentReason, message) => {
1950
1964
  if (currentReason?.text !== 'Другое') {
@@ -1965,7 +1979,7 @@
1965
1979
 
1966
1980
  const DELAY = 5 * 60 * 1000;
1967
1981
  // Хук отвечает за показ пользователю опроса
1968
- const useUserSurveyDialog = (withoutTimer) => {
1982
+ const useUserSurveyDialog = (withoutTimer = false) => {
1969
1983
  const userSurveyDialog = useDialog(UserSurveyDialog);
1970
1984
  const userSurveyStore = useLocalStore();
1971
1985
  const sessionStore = useSessionStore();
@@ -1976,16 +1990,16 @@
1976
1990
  : 0;
1977
1991
  const isShowSurvey = !isSurveySkipped &&
1978
1992
  (!userSurveyStore.userSurvey || userSurveyStore.userSurvey?.nextDueAt <= Date.now());
1979
- const handleCloseSurvey = useCallback(() => {
1993
+ const handleSkipSurvey = useCallback(() => {
1980
1994
  sessionStore.isSurveySkipped = true;
1981
1995
  }, []);
1982
- const openUserSurveyDialog = useCallback((isAfterTargetAction) => {
1996
+ const openUserSurveyDialog = useCallback((isAfterTargetAction = false) => {
1983
1997
  userSurveyDialog.open({
1984
1998
  reasonsSource: {
1985
1999
  $ref: '/wcms-resources/user-survey-reasons.json',
1986
2000
  },
1987
2001
  isAfterTargetAction,
1988
- onClose: handleCloseSurvey,
2002
+ onSkip: handleSkipSurvey,
1989
2003
  });
1990
2004
  }, []);
1991
2005
  const handleOpenSurveyAction = useCallback(() => {
@@ -13244,9 +13258,7 @@
13244
13258
  const handleChatClick = useCallback((ev) => {
13245
13259
  const openChatBot = aspects[CHAT_BOT_ASPECT_NAME];
13246
13260
  if (openChatBot && ev) {
13247
- if (openChatBot) {
13248
- openChatBot(ev).finally();
13249
- }
13261
+ openChatBot(ev).finally();
13250
13262
  }
13251
13263
  }, []);
13252
13264
  return {
@@ -14364,7 +14376,7 @@
14364
14376
  slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
14365
14377
  });
14366
14378
 
14367
- const packageVersion = "0.14.1022";
14379
+ const packageVersion = "0.14.1024";
14368
14380
 
14369
14381
  exports.Blocks = Blocks;
14370
14382
  exports.ContentPage = ContentPage;