@redneckz/wildless-cms-uni-blocks 0.14.268 → 0.14.270

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 (241) hide show
  1. package/bin/migration-scripts/0.14.269.js +46 -0
  2. package/bundle/blocks.schema.json +1 -1
  3. package/bundle/bundle.umd.js +61 -44
  4. package/bundle/bundle.umd.min.js +1 -1
  5. package/bundle/components/Header/HeaderChatBotButton.d.ts +2 -4
  6. package/bundle/components/Header/HeaderSecondaryMenuButton.d.ts +2 -4
  7. package/bundle/components/Header/useChatBot.d.ts +2 -4
  8. package/bundle/hooks/useAspects/applyAspects.d.ts +3 -0
  9. package/bundle/hooks/useAspects/aspects/forwardQuery.d.ts +2 -0
  10. package/bundle/hooks/useAspects/useAspects.d.ts +19 -0
  11. package/bundle/hooks/useClickHandler.d.ts +1 -0
  12. package/bundle/model/AspectsProps.d.ts +32 -0
  13. package/bundle/model/LinkProps.d.ts +2 -8
  14. package/bundle/ui-kit/LinkButton/LinkButtonContent.d.ts +1 -0
  15. package/bundle/utils/dataAttributes.d.ts +6 -2
  16. package/bundle/utils/getSessionQuery.d.ts +1 -1
  17. package/dist/components/ContentPage/ContentPage.js +2 -2
  18. package/dist/components/ContentPage/ContentPage.js.map +1 -1
  19. package/dist/components/ExchangeRateTile/CurrencyTable.js +7 -4
  20. package/dist/components/ExchangeRateTile/CurrencyTable.js.map +1 -1
  21. package/dist/components/ExchangeRateTile/CurrentLocation.js +2 -1
  22. package/dist/components/ExchangeRateTile/CurrentLocation.js.map +1 -1
  23. package/dist/components/ExchangeRateTile/ExchangeRateTile.js +1 -1
  24. package/dist/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
  25. package/dist/components/Header/HeaderChatBotButton.d.ts +2 -4
  26. package/dist/components/Header/HeaderSecondaryMenuButton.d.ts +2 -4
  27. package/dist/components/Header/useChatBot.d.ts +2 -4
  28. package/dist/components/Header/useChatBot.js.map +1 -1
  29. package/dist/hooks/useAspects/applyAspects.d.ts +3 -0
  30. package/dist/hooks/useAspects/applyAspects.js +18 -0
  31. package/dist/hooks/useAspects/applyAspects.js.map +1 -0
  32. package/dist/hooks/useAspects/aspects/forwardQuery.d.ts +2 -0
  33. package/dist/hooks/useAspects/aspects/forwardQuery.js +30 -0
  34. package/dist/hooks/useAspects/aspects/forwardQuery.js.map +1 -0
  35. package/dist/hooks/useAspects/useAspects.d.ts +19 -0
  36. package/dist/hooks/useAspects/useAspects.js +14 -0
  37. package/dist/hooks/useAspects/useAspects.js.map +1 -0
  38. package/dist/hooks/useClickHandler.d.ts +1 -0
  39. package/dist/hooks/useClickHandler.js +16 -0
  40. package/dist/hooks/useClickHandler.js.map +1 -0
  41. package/dist/model/AspectsProps.d.ts +32 -0
  42. package/dist/model/AspectsProps.js +2 -0
  43. package/dist/model/AspectsProps.js.map +1 -0
  44. package/dist/model/LinkProps.d.ts +2 -8
  45. package/dist/ui-kit/LinkButton/LinkButton.js +1 -1
  46. package/dist/ui-kit/LinkButton/LinkButton.js.map +1 -1
  47. package/dist/ui-kit/LinkButton/LinkButtonContent.d.ts +1 -0
  48. package/dist/utils/adjustSessionQuery.js +1 -1
  49. package/dist/utils/adjustSessionQuery.js.map +1 -1
  50. package/dist/utils/dataAttributes.d.ts +6 -2
  51. package/dist/utils/dataAttributes.js +12 -3
  52. package/dist/utils/dataAttributes.js.map +1 -1
  53. package/dist/utils/getSessionQuery.d.ts +1 -1
  54. package/dist/utils/getSessionQuery.js +3 -3
  55. package/dist/utils/getSessionQuery.js.map +1 -1
  56. package/lib/common.css +1 -1
  57. package/lib/components/ContentPage/ContentPage.js +2 -2
  58. package/lib/components/ContentPage/ContentPage.js.map +1 -1
  59. package/lib/components/ExchangeRateTile/CurrencyTable.js +7 -4
  60. package/lib/components/ExchangeRateTile/CurrencyTable.js.map +1 -1
  61. package/lib/components/ExchangeRateTile/CurrentLocation.js +2 -1
  62. package/lib/components/ExchangeRateTile/CurrentLocation.js.map +1 -1
  63. package/lib/components/ExchangeRateTile/ExchangeRateTile.js +1 -1
  64. package/lib/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
  65. package/lib/components/Header/HeaderChatBotButton.d.ts +2 -4
  66. package/lib/components/Header/HeaderSecondaryMenuButton.d.ts +2 -4
  67. package/lib/components/Header/useChatBot.d.ts +2 -4
  68. package/lib/components/Header/useChatBot.js.map +1 -1
  69. package/lib/hooks/useAspects/applyAspects.d.ts +3 -0
  70. package/lib/hooks/useAspects/applyAspects.js +15 -0
  71. package/lib/hooks/useAspects/applyAspects.js.map +1 -0
  72. package/lib/hooks/useAspects/aspects/forwardQuery.d.ts +2 -0
  73. package/lib/hooks/useAspects/aspects/forwardQuery.js +27 -0
  74. package/lib/hooks/useAspects/aspects/forwardQuery.js.map +1 -0
  75. package/lib/hooks/useAspects/useAspects.d.ts +19 -0
  76. package/lib/hooks/useAspects/useAspects.js +11 -0
  77. package/lib/hooks/useAspects/useAspects.js.map +1 -0
  78. package/lib/hooks/useClickHandler.d.ts +1 -0
  79. package/lib/hooks/useClickHandler.js +14 -0
  80. package/lib/hooks/useClickHandler.js.map +1 -0
  81. package/lib/model/AspectsProps.d.ts +32 -0
  82. package/lib/model/AspectsProps.js +2 -0
  83. package/lib/model/AspectsProps.js.map +1 -0
  84. package/lib/model/LinkProps.d.ts +2 -8
  85. package/lib/ui-kit/LinkButton/LinkButton.js +2 -2
  86. package/lib/ui-kit/LinkButton/LinkButton.js.map +1 -1
  87. package/lib/ui-kit/LinkButton/LinkButtonContent.d.ts +1 -0
  88. package/lib/utils/adjustSessionQuery.js +2 -2
  89. package/lib/utils/adjustSessionQuery.js.map +1 -1
  90. package/lib/utils/dataAttributes.d.ts +6 -2
  91. package/lib/utils/dataAttributes.js +10 -1
  92. package/lib/utils/dataAttributes.js.map +1 -1
  93. package/lib/utils/getSessionQuery.d.ts +1 -1
  94. package/lib/utils/getSessionQuery.js +1 -1
  95. package/lib/utils/getSessionQuery.js.map +1 -1
  96. package/mobile/bundle/bundle.umd.js +61 -75
  97. package/mobile/bundle/bundle.umd.min.js +1 -1
  98. package/mobile/bundle/components/Header/HeaderChatBotButton.d.ts +2 -4
  99. package/mobile/bundle/components/Header/HeaderSecondaryMenuButton.d.ts +2 -4
  100. package/mobile/bundle/components/Header/useChatBot.d.ts +2 -4
  101. package/mobile/bundle/hooks/useAspects/applyAspects.d.ts +3 -0
  102. package/mobile/bundle/hooks/useAspects/aspects/forwardQuery.d.ts +2 -0
  103. package/mobile/bundle/hooks/useAspects/useAspects.d.ts +19 -0
  104. package/mobile/bundle/hooks/useClickHandler.d.ts +1 -0
  105. package/mobile/bundle/model/AspectsProps.d.ts +32 -0
  106. package/mobile/bundle/model/LinkProps.d.ts +2 -8
  107. package/mobile/bundle/ui-kit/LinkButton/LinkButtonContent.d.ts +1 -0
  108. package/mobile/bundle/utils/dataAttributes.d.ts +6 -2
  109. package/mobile/bundle/utils/getSessionQuery.d.ts +1 -1
  110. package/mobile/dist/components/ContentPage/ContentPage.js +2 -2
  111. package/mobile/dist/components/ContentPage/ContentPage.js.map +1 -1
  112. package/mobile/dist/components/ExchangeRateTile/CurrencyTable.js +7 -4
  113. package/mobile/dist/components/ExchangeRateTile/CurrencyTable.js.map +1 -1
  114. package/mobile/dist/components/ExchangeRateTile/CurrentLocation.js +2 -1
  115. package/mobile/dist/components/ExchangeRateTile/CurrentLocation.js.map +1 -1
  116. package/mobile/dist/components/ExchangeRateTile/ExchangeRateTile.js +1 -1
  117. package/mobile/dist/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
  118. package/mobile/dist/components/Header/HeaderChatBotButton.d.ts +2 -4
  119. package/mobile/dist/components/Header/HeaderSecondaryMenuButton.d.ts +2 -4
  120. package/mobile/dist/components/Header/useChatBot.d.ts +2 -4
  121. package/mobile/dist/components/Header/useChatBot.js.map +1 -1
  122. package/mobile/dist/hooks/useAspects/applyAspects.d.ts +3 -0
  123. package/mobile/dist/hooks/useAspects/applyAspects.js +18 -0
  124. package/mobile/dist/hooks/useAspects/applyAspects.js.map +1 -0
  125. package/mobile/dist/hooks/useAspects/aspects/forwardQuery.d.ts +2 -0
  126. package/mobile/dist/hooks/useAspects/aspects/forwardQuery.js +30 -0
  127. package/mobile/dist/hooks/useAspects/aspects/forwardQuery.js.map +1 -0
  128. package/mobile/dist/hooks/useAspects/useAspects.d.ts +19 -0
  129. package/mobile/dist/hooks/useAspects/useAspects.js +14 -0
  130. package/mobile/dist/hooks/useAspects/useAspects.js.map +1 -0
  131. package/mobile/dist/hooks/useClickHandler.d.ts +1 -0
  132. package/mobile/dist/hooks/useClickHandler.js +16 -0
  133. package/mobile/dist/hooks/useClickHandler.js.map +1 -0
  134. package/mobile/dist/model/AspectsProps.d.ts +32 -0
  135. package/mobile/dist/model/AspectsProps.js +2 -0
  136. package/mobile/dist/model/AspectsProps.js.map +1 -0
  137. package/mobile/dist/model/LinkProps.d.ts +2 -8
  138. package/mobile/dist/ui-kit/LinkButton/LinkButton.js +1 -1
  139. package/mobile/dist/ui-kit/LinkButton/LinkButton.js.map +1 -1
  140. package/mobile/dist/ui-kit/LinkButton/LinkButtonContent.d.ts +1 -0
  141. package/mobile/dist/utils/adjustSessionQuery.js +1 -1
  142. package/mobile/dist/utils/adjustSessionQuery.js.map +1 -1
  143. package/mobile/dist/utils/dataAttributes.d.ts +6 -2
  144. package/mobile/dist/utils/dataAttributes.js +12 -3
  145. package/mobile/dist/utils/dataAttributes.js.map +1 -1
  146. package/mobile/dist/utils/getSessionQuery.d.ts +1 -1
  147. package/mobile/dist/utils/getSessionQuery.js +3 -3
  148. package/mobile/dist/utils/getSessionQuery.js.map +1 -1
  149. package/mobile/lib/common.css +1 -1
  150. package/mobile/lib/components/ContentPage/ContentPage.js +2 -2
  151. package/mobile/lib/components/ContentPage/ContentPage.js.map +1 -1
  152. package/mobile/lib/components/ExchangeRateTile/CurrencyTable.js +7 -4
  153. package/mobile/lib/components/ExchangeRateTile/CurrencyTable.js.map +1 -1
  154. package/mobile/lib/components/ExchangeRateTile/CurrentLocation.js +2 -1
  155. package/mobile/lib/components/ExchangeRateTile/CurrentLocation.js.map +1 -1
  156. package/mobile/lib/components/ExchangeRateTile/ExchangeRateTile.js +1 -1
  157. package/mobile/lib/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
  158. package/mobile/lib/components/Header/HeaderChatBotButton.d.ts +2 -4
  159. package/mobile/lib/components/Header/HeaderSecondaryMenuButton.d.ts +2 -4
  160. package/mobile/lib/components/Header/useChatBot.d.ts +2 -4
  161. package/mobile/lib/components/Header/useChatBot.js.map +1 -1
  162. package/mobile/lib/hooks/useAspects/applyAspects.d.ts +3 -0
  163. package/mobile/lib/hooks/useAspects/applyAspects.js +15 -0
  164. package/mobile/lib/hooks/useAspects/applyAspects.js.map +1 -0
  165. package/mobile/lib/hooks/useAspects/aspects/forwardQuery.d.ts +2 -0
  166. package/mobile/lib/hooks/useAspects/aspects/forwardQuery.js +27 -0
  167. package/mobile/lib/hooks/useAspects/aspects/forwardQuery.js.map +1 -0
  168. package/mobile/lib/hooks/useAspects/useAspects.d.ts +19 -0
  169. package/mobile/lib/hooks/useAspects/useAspects.js +11 -0
  170. package/mobile/lib/hooks/useAspects/useAspects.js.map +1 -0
  171. package/mobile/lib/hooks/useClickHandler.d.ts +1 -0
  172. package/mobile/lib/hooks/useClickHandler.js +14 -0
  173. package/mobile/lib/hooks/useClickHandler.js.map +1 -0
  174. package/mobile/lib/model/AspectsProps.d.ts +32 -0
  175. package/mobile/lib/model/AspectsProps.js +2 -0
  176. package/mobile/lib/model/AspectsProps.js.map +1 -0
  177. package/mobile/lib/model/LinkProps.d.ts +2 -8
  178. package/mobile/lib/ui-kit/LinkButton/LinkButton.js +2 -2
  179. package/mobile/lib/ui-kit/LinkButton/LinkButton.js.map +1 -1
  180. package/mobile/lib/ui-kit/LinkButton/LinkButtonContent.d.ts +1 -0
  181. package/mobile/lib/utils/adjustSessionQuery.js +2 -2
  182. package/mobile/lib/utils/adjustSessionQuery.js.map +1 -1
  183. package/mobile/lib/utils/dataAttributes.d.ts +6 -2
  184. package/mobile/lib/utils/dataAttributes.js +10 -1
  185. package/mobile/lib/utils/dataAttributes.js.map +1 -1
  186. package/mobile/lib/utils/getSessionQuery.d.ts +1 -1
  187. package/mobile/lib/utils/getSessionQuery.js +1 -1
  188. package/mobile/lib/utils/getSessionQuery.js.map +1 -1
  189. package/mobile/src/components/ContentPage/ContentPage.tsx +2 -2
  190. package/mobile/src/components/ExchangeRateTile/CurrencyTable.tsx +11 -8
  191. package/mobile/src/components/ExchangeRateTile/CurrentLocation.tsx +2 -1
  192. package/mobile/src/components/ExchangeRateTile/ExchangeRateTile.tsx +2 -2
  193. package/mobile/src/components/Header/HeaderChatBotButton.tsx +2 -2
  194. package/mobile/src/components/Header/HeaderSecondaryMenuButton.tsx +2 -2
  195. package/mobile/src/components/Header/useChatBot.ts +2 -2
  196. package/mobile/src/hooks/useAspects/applyAspects.ts +19 -0
  197. package/mobile/src/hooks/useAspects/aspects/forwardQuery.ts +32 -0
  198. package/mobile/src/hooks/useAspects/useAspects.ts +30 -0
  199. package/mobile/src/hooks/useClickHandler.ts +16 -0
  200. package/mobile/src/model/AspectsProps.ts +37 -0
  201. package/mobile/src/model/LinkProps.ts +2 -9
  202. package/mobile/src/ui-kit/LinkButton/LinkButton.tsx +2 -2
  203. package/mobile/src/ui-kit/LinkButton/LinkButtonContent.ts +1 -0
  204. package/mobile/src/utils/adjustSessionQuery.ts +2 -2
  205. package/mobile/src/utils/dataAttributes.ts +10 -3
  206. package/mobile/src/utils/getSessionQuery.ts +1 -1
  207. package/package.json +1 -1
  208. package/src/components/ContentPage/ContentPage.tsx +2 -2
  209. package/src/components/ExchangeRateTile/CurrencyTable.tsx +11 -8
  210. package/src/components/ExchangeRateTile/CurrentLocation.tsx +2 -1
  211. package/src/components/ExchangeRateTile/ExchangeRateTile.tsx +2 -2
  212. package/src/components/Header/HeaderChatBotButton.tsx +2 -2
  213. package/src/components/Header/HeaderSecondaryMenuButton.tsx +2 -2
  214. package/src/components/Header/useChatBot.ts +2 -2
  215. package/src/hooks/useAspects/applyAspects.ts +19 -0
  216. package/src/hooks/useAspects/aspects/forwardQuery.ts +32 -0
  217. package/src/hooks/useAspects/useAspects.ts +30 -0
  218. package/src/hooks/useClickHandler.ts +16 -0
  219. package/src/model/AspectsProps.ts +37 -0
  220. package/src/model/LinkProps.ts +2 -9
  221. package/src/ui-kit/LinkButton/LinkButton.tsx +2 -2
  222. package/src/ui-kit/LinkButton/LinkButtonContent.ts +1 -0
  223. package/src/utils/adjustSessionQuery.ts +2 -2
  224. package/src/utils/dataAttributes.ts +10 -3
  225. package/src/utils/getSessionQuery.ts +1 -1
  226. package/bundle/hooks/useNavigateHandler.d.ts +0 -3
  227. package/dist/hooks/useNavigateHandler.d.ts +0 -3
  228. package/dist/hooks/useNavigateHandler.js +0 -62
  229. package/dist/hooks/useNavigateHandler.js.map +0 -1
  230. package/lib/hooks/useNavigateHandler.d.ts +0 -3
  231. package/lib/hooks/useNavigateHandler.js +0 -60
  232. package/lib/hooks/useNavigateHandler.js.map +0 -1
  233. package/mobile/bundle/hooks/useNavigateHandler.d.ts +0 -3
  234. package/mobile/dist/hooks/useNavigateHandler.d.ts +0 -3
  235. package/mobile/dist/hooks/useNavigateHandler.js +0 -62
  236. package/mobile/dist/hooks/useNavigateHandler.js.map +0 -1
  237. package/mobile/lib/hooks/useNavigateHandler.d.ts +0 -3
  238. package/mobile/lib/hooks/useNavigateHandler.js +0 -60
  239. package/mobile/lib/hooks/useNavigateHandler.js.map +0 -1
  240. package/mobile/src/hooks/useNavigateHandler.ts +0 -78
  241. package/src/hooks/useNavigateHandler.ts +0 -78
@@ -0,0 +1,32 @@
1
+ import { type AspectData } from '../hooks/useAspects/useAspects';
2
+ /**
3
+ * @title Отправить цель Яндекс Метрики
4
+ * @default {"aspectName": "ymReachGoal", "params": {"yandexId": "", "targetName": ""}}
5
+ */
6
+ export declare type YandexReachGoalAspect = {
7
+ aspectName: 'ymReachGoal';
8
+ params?: AspectData;
9
+ };
10
+ /**
11
+ * @title Открыть чат-бот
12
+ * @default {"aspectName": "openChatBot"}
13
+ */
14
+ export declare type ChatBotAspect = {
15
+ aspectName: 'openChatBot';
16
+ };
17
+ /**
18
+ * @title Не выбрано
19
+ */
20
+ export declare type EmptyAspect = {
21
+ /** @default "" */
22
+ aspectName: '';
23
+ };
24
+ /**
25
+ * @title Параметр
26
+ * @default { "aspectName": "" }
27
+ */
28
+ export declare type AspectsDef = EmptyAspect | ChatBotAspect | YandexReachGoalAspect;
29
+ /**
30
+ * @title Дополнительные параметры
31
+ */
32
+ export declare type AspectsProps = AspectsDef[];
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=AspectsProps.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AspectsProps.js","sourceRoot":"","sources":["../../src/model/AspectsProps.ts"],"names":[],"mappings":""}
@@ -1,3 +1,4 @@
1
+ import { type AspectsProps } from './AspectsProps';
1
2
  import { type TextProps } from './HeadlineType';
2
3
  /**
3
4
  * @title Таргет (target)
@@ -10,19 +11,12 @@ import { type TextProps } from './HeadlineType';
10
11
  * ]
11
12
  */
12
13
  export declare type Target = '' | '_self' | '_blank' | '_parent' | '_top';
13
- /** @title Дата аттрибуты */
14
- export declare type DataAttributes = {
15
- /** @title Имя цели для Яндекс Метрики */
16
- ymTarget?: string;
17
- /** @title Открыть чат бот */
18
- chatbot?: boolean;
19
- };
20
14
  export interface LinkCommonProps {
21
15
  /** @title URL (href) */
22
16
  href?: string;
23
17
  /** @default "" */
24
18
  target?: Target;
25
- data?: DataAttributes;
19
+ data?: AspectsProps;
26
20
  }
27
21
  /**
28
22
  * @title Ссылка
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx } from "@redneckz/uni-jsx/jsx-runtime";
2
2
  import { JSX } from '@redneckz/uni-jsx';
3
3
  import { useLink } from '../../hooks/useLink.js';
4
- import { dataAttributes } from '../../utils/dataAttributes.js';
4
+ import { getAspectsAttributes } from '../../utils/dataAttributes.js';
5
5
  import { ButtonInner } from './ButtonInner.js';
6
6
  import { getDisabledButtonClasses } from './getDisabledButtonClasses.js';
7
7
  import { getRegularButtonClasses } from './getRegularButtonClasses.js';
@@ -14,6 +14,6 @@ export const LinkButton = JSX(({ disabled, children, method = 'LINK', href, ...r
14
14
  const buttonInner = children ?? _jsx(ButtonInner, { ...adjustedProps });
15
15
  return disabled ? (_jsx(DisabledButton, { ...adjustedProps, children: buttonInner })) : (_jsx(RegularButton, { ...adjustedProps, children: buttonInner }));
16
16
  });
17
- const RegularButton = JSX(({ className = '', href, rel, target, ariaLabel, version, rounded, onClick, type, data, children, }) => (_jsx("a", { className: getRegularButtonClasses({ className, version, rounded }), href: href, rel: rel, target: target, "aria-label": ariaLabel, role: href ? 'link' : 'button', onClick: onClick, type: type, ...dataAttributes(data), children: children })));
17
+ const RegularButton = JSX(({ className = '', href, rel, target, ariaLabel, version, rounded, onClick, type, data, children, }) => (_jsx("a", { className: getRegularButtonClasses({ className, version, rounded }), href: href, rel: rel, target: target, "aria-label": ariaLabel, role: href ? 'link' : 'button', onClick: onClick, type: type, ...getAspectsAttributes(data), children: children })));
18
18
  const DisabledButton = JSX(({ className, ariaLabel, version, rounded, children }) => (_jsx("button", { type: "button", "aria-disabled": "true", "aria-label": ariaLabel, tabIndex: -1, className: getDisabledButtonClasses({ className, rounded, version }), children: children })));
19
19
  //# sourceMappingURL=LinkButton.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"LinkButton.js","sourceRoot":"","sources":["../../../src/ui-kit/LinkButton/LinkButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,wBAAwB,E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CAAC"}
@@ -4,6 +4,7 @@ import { type Picture } from '../../model/Picture';
4
4
  /** @deprecated */
5
5
  export interface ButtonCommonContent extends LinkProps {
6
6
  version?: LinkButtonVersion;
7
+ /** @title Метод */
7
8
  method?: 'LINK' | 'POST';
8
9
  }
9
10
  /** @deprecated */
@@ -1,7 +1,7 @@
1
- import { getSessionQuery } from './getSessionQuery.js';
1
+ import { saveSessionQuery } from './getSessionQuery.js';
2
2
  import { isURL } from './url.js';
3
3
  export const adjustSessionQuery = (href) => {
4
- const sessionQuery = getSessionQuery();
4
+ const sessionQuery = saveSessionQuery();
5
5
  if (!isURL(href) || !sessionQuery) {
6
6
  return href;
7
7
  }
@@ -1 +1 @@
1
- {"version":3,"file":"adjustSessionQuery.js","sourceRoot":"","sources":["../../src/utils/adjustSessionQuery.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAE9B,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,IAAa,EAAE,EAAE;IAClD,MAAM,YAAY,GAAG,eAAe,EAAE,CAAC;IAEvC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE;QACjC,OAAO,IAAI,CAAC;KACb;IAED,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,CAAC;IAE1B,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,IAAI,eAAe,CAAC,YAAY,CAAC,EAAE;QAC5D,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;KAClC;IAED,OAAO,GAAG,CAAC,QAAQ,EAAE,CAAC;AACxB,CAAC,CAAC"}
1
+ {"version":3,"file":"adjustSessionQuery.js","sourceRoot":"","sources":["../../src/utils/adjustSessionQuery.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAE9B,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,IAAa,EAAE,EAAE;IAClD,MAAM,YAAY,GAAG,gBAAgB,EAAE,CAAC;IAExC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE;QACjC,OAAO,IAAI,CAAC;KACb;IAED,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,CAAC;IAE1B,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,IAAI,eAAe,CAAC,YAAY,CAAC,EAAE;QAC5D,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;KAClC;IAED,OAAO,GAAG,CAAC,QAAQ,EAAE,CAAC;AACxB,CAAC,CAAC"}
@@ -1,2 +1,6 @@
1
- import { type DataAttributes } from '../model/LinkProps';
2
- export declare const dataAttributes: (data?: DataAttributes) => {};
1
+ import { type AspectsProps } from '../model/AspectsProps';
2
+ export declare const getAspectsAttributes: (data?: AspectsProps) => {
3
+ 'data-aspects': string;
4
+ } | {
5
+ 'data-aspects'?: undefined;
6
+ };
@@ -1,2 +1,11 @@
1
- export const dataAttributes = (data = {}) => Object.entries(data).reduce((res, [k, v]) => ({ ...res, [`data-${k.toLowerCase()}`]: v }), {});
1
+ export const getAspectsAttributes = (data) => {
2
+ try {
3
+ return {
4
+ 'data-aspects': JSON.stringify(data),
5
+ };
6
+ }
7
+ catch (_) {
8
+ return {};
9
+ }
10
+ };
2
11
  //# sourceMappingURL=dataAttributes.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dataAttributes.js","sourceRoot":"","sources":["../../src/utils/dataAttributes.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,OAAuB,EAAE,EAAE,EAAE,CAC1D,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,GAAG,EAAE,CAAC,QAAQ,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC"}
1
+ {"version":3,"file":"dataAttributes.js","sourceRoot":"","sources":["../../src/utils/dataAttributes.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,IAAmB,EAAE,EAAE;IAC1D,IAAI;QACF,OAAO;YACL,cAAc,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;SACrC,CAAC;KACH;IAAC,OAAO,CAAC,EAAE;QACV,OAAO,EAAE,CAAC;KACX;AACH,CAAC,CAAC"}
@@ -1 +1 @@
1
- export declare function getSessionQuery(): string;
1
+ export declare function saveSessionQuery(): string;
@@ -1,5 +1,5 @@
1
1
  const QUERY_STORAGE_KEY = 'rshb-query-params';
2
- export function getSessionQuery() {
2
+ export function saveSessionQuery() {
3
3
  const result = globalThis.location?.search || globalThis.sessionStorage?.getItem(QUERY_STORAGE_KEY) || '';
4
4
  if (result) {
5
5
  globalThis.sessionStorage?.setItem(QUERY_STORAGE_KEY, result);
@@ -1 +1 @@
1
- {"version":3,"file":"getSessionQuery.js","sourceRoot":"","sources":["../../src/utils/getSessionQuery.ts"],"names":[],"mappings":"AAAA,MAAM,iBAAiB,GAAG,mBAAmB,CAAC;AAE9C,MAAM,UAAU,eAAe;IAC7B,MAAM,MAAM,GACV,UAAU,CAAC,QAAQ,EAAE,MAAM,IAAI,UAAU,CAAC,cAAc,EAAE,OAAO,CAAC,iBAAiB,CAAC,IAAI,EAAE,CAAC;IAE7F,IAAI,MAAM,EAAE;QACV,UAAU,CAAC,cAAc,EAAE,OAAO,CAAC,iBAAiB,EAAE,MAAM,CAAC,CAAC;KAC/D;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
1
+ {"version":3,"file":"getSessionQuery.js","sourceRoot":"","sources":["../../src/utils/getSessionQuery.ts"],"names":[],"mappings":"AAAA,MAAM,iBAAiB,GAAG,mBAAmB,CAAC;AAE9C,MAAM,UAAU,gBAAgB;IAC9B,MAAM,MAAM,GACV,UAAU,CAAC,QAAQ,EAAE,MAAM,IAAI,UAAU,CAAC,cAAc,EAAE,OAAO,CAAC,iBAAiB,CAAC,IAAI,EAAE,CAAC;IAE7F,IAAI,MAAM,EAAE;QACV,UAAU,CAAC,cAAc,EAAE,OAAO,CAAC,iBAAiB,EAAE,MAAM,CAAC,CAAC;KAC/D;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -475,7 +475,16 @@
475
475
  }
476
476
  }
477
477
 
478
- const dataAttributes = (data = {}) => Object.entries(data).reduce((res, [k, v]) => ({ ...res, [`data-${k.toLowerCase()}`]: v }), {});
478
+ const getAspectsAttributes = (data) => {
479
+ try {
480
+ return {
481
+ 'data-aspects': JSON.stringify(data),
482
+ };
483
+ }
484
+ catch (_) {
485
+ return {};
486
+ }
487
+ };
479
488
 
480
489
  /** @deprecated */
481
490
  const ButtonInner = JSX((props) => {
@@ -532,7 +541,7 @@
532
541
  const buttonInner = children ?? jsx(ButtonInner, { ...adjustedProps });
533
542
  return disabled ? (jsx(DisabledButton, { ...adjustedProps, children: buttonInner })) : (jsx(RegularButton, { ...adjustedProps, children: buttonInner }));
534
543
  });
535
- const RegularButton = JSX(({ className = '', href, rel, target, ariaLabel, version, rounded, onClick, type, data, children, }) => (jsx("a", { className: getRegularButtonClasses({ className, version, rounded }), href: href, rel: rel, target: target, "aria-label": ariaLabel, role: href ? 'link' : 'button', onClick: onClick, type: type, ...dataAttributes(data), children: children })));
544
+ const RegularButton = JSX(({ className = '', href, rel, target, ariaLabel, version, rounded, onClick, type, data, children, }) => (jsx("a", { className: getRegularButtonClasses({ className, version, rounded }), href: href, rel: rel, target: target, "aria-label": ariaLabel, role: href ? 'link' : 'button', onClick: onClick, type: type, ...getAspectsAttributes(data), children: children })));
536
545
  const DisabledButton = JSX(({ className, ariaLabel, version, rounded, children }) => (jsx("button", { type: "button", "aria-disabled": "true", "aria-label": ariaLabel, tabIndex: -1, className: getDisabledButtonClasses({ className, rounded, version }), children: children })));
537
546
 
538
547
  function renderBackwardButton(version, handleClick, alwaysVisible = false) {
@@ -3429,21 +3438,23 @@
3429
3438
  });
3430
3439
  const formatCurrency = (value) => (value ? currencyNumberFormat.format(value) : '');
3431
3440
 
3432
- const TABLE_HEAD_STYLE = 'text-left text-m font-light text-secondary-text';
3433
- const TABLE_HEAD_STYLE_WITH_PADDING = `${TABLE_HEAD_STYLE} pl-5xl`;
3441
+ const TABLE_STYLE_BASE = 'text-m font-light text-secondary-text ';
3442
+ const TABLE_HEAD_STYLE = `${TABLE_STYLE_BASE} text-left`;
3443
+ const TABLE_HEAD_STYLE_CENTER = `${TABLE_STYLE_BASE} pl-5xl text-center`;
3444
+ const TABLE_HEAD_STYLE_RIGHT = `${TABLE_STYLE_BASE} pl-5xl text-right`;
3434
3445
  const CURRENCY_ICONS_MAP = {
3435
3446
  USD: 'DollarIcon',
3436
3447
  EUR: 'EuroIcon',
3437
3448
  CNY: 'ChineseYuanRenminbiIcon',
3438
3449
  };
3439
- const CurrencyTable = JSX(({ className, exchangeCurrencyItems }) => (jsxs("table", { className: `h-fit w-fit ${className}`, children: [jsx("thead", { children: jsxs("tr", { children: [jsx("th", { className: TABLE_HEAD_STYLE, children: jsx(Text, { size: "text-m", children: "\u0412\u0430\u043B\u044E\u0442\u0430" }) }), jsx("th", { className: TABLE_HEAD_STYLE_WITH_PADDING, children: jsx(Text, { size: "text-m", children: "\u041A\u0443\u043F\u0438\u0442\u044C" }) }), jsx("th", { className: TABLE_HEAD_STYLE_WITH_PADDING, children: jsx(Text, { size: "text-m", children: "\u041F\u0440\u043E\u0434\u0430\u0442\u044C" }) })] }) }), jsx("tbody", { children: exchangeCurrencyItems.map(renderCurrencyRow) })] })));
3450
+ const CurrencyTable = JSX(({ className, exchangeCurrencyItems }) => (jsxs("table", { className: style('h-fit w-full', className), children: [jsx("thead", { children: jsxs("tr", { children: [jsx("th", { className: TABLE_HEAD_STYLE, children: jsx(Text, { size: "text-m", children: "\u0412\u0430\u043B\u044E\u0442\u0430" }) }), jsx("th", { className: TABLE_HEAD_STYLE_CENTER, children: jsx(Text, { size: "text-m", children: "\u041A\u0443\u043F\u0438\u0442\u044C" }) }), jsx("th", { className: TABLE_HEAD_STYLE_RIGHT, children: jsx(Text, { size: "text-m", children: "\u041F\u0440\u043E\u0434\u0430\u0442\u044C" }) })] }) }), jsx("tbody", { children: exchangeCurrencyItems.map(renderCurrencyRow) })] })));
3440
3451
  const renderCurrencyRow = (exchangeCurrencyItem) => {
3441
3452
  const currency = exchangeCurrencyItem?.currency?.currency;
3442
- return (jsxs("tr", { className: "pb-2xs text-h6", children: [jsx("td", { className: "pt-m", children: jsxs("div", { className: "flex items-center gap-xs", children: [currency ? (jsx(Img, { image: { icon: CURRENCY_ICONS_MAP[currency] }, width: "24", height: "24" })) : null, jsx(Text, { size: "text-h6", children: currency })] }) }), jsx("td", { className: "pt-m pl-5xl", children: jsx(Text, { size: "text-h6", children: formatCurrency(exchangeCurrencyItem?.saleExchangeRate) }) }), jsx("td", { className: "pt-m pl-5xl", children: jsx(Text, { size: "text-h6", children: formatCurrency(exchangeCurrencyItem?.buyExchangeRate) }) })] }, currency));
3453
+ return (jsxs("tr", { className: "pb-2xs text-h6", children: [jsx("td", { className: "pt-m m-auto flex text-left", children: jsxs("div", { className: "flex items-center gap-xs", children: [currency ? (jsx(Img, { image: { icon: CURRENCY_ICONS_MAP[currency] }, width: "24", height: "24" })) : null, jsx(Text, { size: "text-h6", children: currency })] }) }), jsx("td", { className: "pt-m pl-5xl text-center", children: jsx(Text, { size: "text-h6", children: formatCurrency(exchangeCurrencyItem?.saleExchangeRate) }) }), jsx("td", { className: "pt-m pl-5xl text-right", children: jsx(Text, { size: "text-h6", children: formatCurrency(exchangeCurrencyItem?.buyExchangeRate) }) })] }, currency));
3443
3454
  };
3444
3455
 
3445
3456
  const icon = { icon: 'GpsIcon' };
3446
- const CurrentLocation = JSX(({ className = '', address }) => (jsxs("div", { className: `flex gap-s ${className}`, children: [jsx(RoundedIcon, { ...icon, iconBgVersion: "primary", className: "shrink-0" }), jsxs("div", { className: "space-y-2xs whitespace-pre-wrap", children: [address ? (jsx(Paragraph, { size: "text-l", color: "text-primary-main", children: address })) : null, jsx(Paragraph, { size: "text-m", color: "text-secondary-text", children: "\u041A\u0443\u0440\u0441 \u0443\u043A\u0430\u0437\u0430\u043D \u0434\u043B\u044F \u0437\u0430\u0434\u0430\u043D\u043D\u043E\u0433\u043E \u043E\u0444\u0438\u0441\u0430" })] })] })));
3457
+ const CurrentLocation = JSX(({ className = '', address }) => (jsxs("div", { className: style('flex gap-s w-full justify-between @sm:justify-center', className), children: [jsx(RoundedIcon, { ...icon, iconBgVersion: "primary", className: "shrink-0" }), jsxs("div", { className: "space-y-2xs whitespace-pre-wrap", children: [address ? (jsx(Paragraph, { size: "text-l", color: "text-primary-main", children: address })) : null, jsx(Paragraph, { size: "text-m", color: "text-secondary-text", children: "\u041A\u0443\u0440\u0441 \u0443\u043A\u0430\u0437\u0430\u043D \u0434\u043B\u044F \u0437\u0430\u0434\u0430\u043D\u043D\u043E\u0433\u043E \u043E\u0444\u0438\u0441\u0430" })] })] })));
3447
3458
 
3448
3459
  const roundTo = (value, precision = 2) => {
3449
3460
  const factor = 10 ** precision;
@@ -3565,7 +3576,7 @@
3565
3576
  currencyRatesBuy.unshift({ currency: { currency: Currency.RUB } });
3566
3577
  const currencyRatesSell = currencyRates.filter((_) => _.saleExchangeRate);
3567
3578
  currencyRatesSell.push({ currency: { currency: Currency.RUB } });
3568
- return (jsx(BlockWrapper, { className: style('box-border min-h-80', className), ...rest, children: jsx(BaseTile, { className: "h-full", title: jsx(Heading, { headingType: "h4", title: title, className: "whitespace-pre-wrap" }), children: jsxs("div", { className: "flex w-full gap-6xl flex-wrap sm:flex-nowrap", children: [jsxs("div", { className: "max-w-1/2", children: [currencyRates ? (jsx(CurrencyTable, { className: "mb-xl", exchangeCurrencyItems: currencyRates })) : null, jsx(CurrentLocation, { address: exchangeRates?.address })] }), currencyRates.length && currencyRatesBuy.length && currencyRatesSell.length ? (jsx(ExchangeCurrencyCalculator, { className: "grow w-1/2", currencyRatesBuy: currencyRatesBuy, currencyRatesSell: currencyRatesSell, button: button })) : null] }) }) }));
3579
+ return (jsx(BlockWrapper, { className: style('box-border min-h-80', className), ...rest, children: jsx(BaseTile, { className: "h-full", title: jsx(Heading, { headingType: "h4", title: title, className: "whitespace-pre-wrap" }), children: jsxs("div", { className: "flex w-full gap-6xl flex-wrap @lg:flex-nowrap", children: [jsxs("div", { className: "w-full @2xl:w-auto @5xl:w-1/2", children: [currencyRates ? (jsx(CurrencyTable, { className: "mb-xl", exchangeCurrencyItems: currencyRates })) : null, jsx(CurrentLocation, { address: exchangeRates?.address })] }), currencyRates.length && currencyRatesBuy.length && currencyRatesSell.length ? (jsx(ExchangeCurrencyCalculator, { className: "grow w-1/2", currencyRatesBuy: currencyRatesBuy, currencyRatesSell: currencyRatesSell, button: button })) : null] }) }) }));
3569
3580
  });
3570
3581
  const getCurrencyRates = (currencies) => {
3571
3582
  return currencies?.filter((_) => [1, 2, 3].includes(_?.currency?.id)) || [];
@@ -5411,39 +5422,8 @@
5411
5422
  VerticalLayout,
5412
5423
  };
5413
5424
 
5414
- const CHAT_NAMESPACE = 'chatbot';
5415
- const CHAT_BUTTON_EXTERNAL_NAME = 'text-page__btn-chat';
5416
- const CHAT_FRAME_ID = 'webchat-js-container:webchat_rshb';
5417
- const CHAT_STORAGE_NAME = 'webchat-keep-open';
5418
- const CHATBOT_URL = {
5419
- personal: '//chat.mes.rshb.ru/assets/js/webchat_rshb',
5420
- business: '', //TODO: add url business chat
5421
- };
5422
- const useChatBot = (chat) => {
5423
- useEffect(() => globalThis.localStorage?.setItem(CHAT_STORAGE_NAME, String(Date.now())), []);
5424
- const chatUrl = CHATBOT_URL[chat ?? ''];
5425
- return (ev) => {
5426
- if (!chatUrl) {
5427
- return;
5428
- }
5429
- if (chat !== 'personal') {
5430
- initializeExternalNS(CHAT_NAMESPACE, chatUrl);
5431
- }
5432
- else {
5433
- const target = ev.target;
5434
- if (!target?.classList.contains(CHAT_BUTTON_EXTERNAL_NAME)) {
5435
- target?.classList.add(CHAT_BUTTON_EXTERNAL_NAME);
5436
- }
5437
- const chatFrame = document.getElementById(CHAT_FRAME_ID);
5438
- if (!chatFrame) {
5439
- initializeExternalNS(CHAT_NAMESPACE, chatUrl);
5440
- }
5441
- }
5442
- };
5443
- };
5444
-
5445
5425
  const QUERY_STORAGE_KEY = 'rshb-query-params';
5446
- function getSessionQuery() {
5426
+ function saveSessionQuery() {
5447
5427
  const result = globalThis.location?.search || globalThis.sessionStorage?.getItem(QUERY_STORAGE_KEY) || '';
5448
5428
  if (result) {
5449
5429
  globalThis.sessionStorage?.setItem(QUERY_STORAGE_KEY, result);
@@ -5451,8 +5431,23 @@
5451
5431
  return result;
5452
5432
  }
5453
5433
 
5434
+ const applyAspects = (aspects) => (ev) => {
5435
+ const element = ev.target?.closest('[data-aspects]');
5436
+ try {
5437
+ const aspectsAttributes = JSON.parse(element?.dataset?.aspects ?? '[]');
5438
+ for (const { aspectName, params } of aspectsAttributes) {
5439
+ aspects[aspectName ?? '']?.(ev, params);
5440
+ }
5441
+ }
5442
+ catch (_) {
5443
+ // Do nothing
5444
+ }
5445
+ // legal aspect, use always
5446
+ aspects.forwardQuery?.(ev);
5447
+ };
5448
+
5454
5449
  const adjustSessionQuery = (href) => {
5455
- const sessionQuery = getSessionQuery();
5450
+ const sessionQuery = saveSessionQuery();
5456
5451
  if (!isURL(href) || !sessionQuery) {
5457
5452
  return href;
5458
5453
  }
@@ -5463,41 +5458,18 @@
5463
5458
  return url.toString();
5464
5459
  };
5465
5460
 
5466
- const useNavigateHandler = handlerDecorator(() => {
5467
- useEffect(() => {
5468
- getSessionQuery(); //? Call first time for save query in sessionStorage
5469
- }, []);
5470
- const loadBot = useChatBot(projectSettings.CHAT_BOT);
5471
- const reachGoalYM = (targetName) => {
5472
- const [ymID] = projectSettings.YANDEX_METRIKA_ID?.split(',').reverse() ?? [];
5473
- if ([ymID, targetName, globalThis.ym].every(Boolean)) {
5474
- globalThis.ym(ymID, 'reachGoal', targetName);
5475
- }
5476
- };
5477
- useEventListener(globalThis, 'click', navigationHandler({ loadBot, reachGoalYM }));
5478
- });
5479
- const navigationHandler = (methods) => (ev) => {
5480
- const element = getAnchorElement(ev.target);
5481
- for (const key in element?.dataset) {
5482
- getScenario(key)?.(element, methods);
5483
- }
5484
- if (isURL(element?.href) && !element?.href?.startsWith(globalThis.location?.origin)) {
5461
+ const forwardQuery = (ev) => {
5462
+ const anchor = ev.target?.closest('a');
5463
+ if (isURL(anchor?.href) && !anchor?.href?.startsWith(globalThis.location?.origin)) {
5485
5464
  ev.preventDefault();
5486
5465
  ev.stopPropagation();
5487
- const url = adjustSessionQuery(element?.href) || element?.href;
5466
+ const url = adjustSessionQuery(anchor?.href) || anchor?.href;
5488
5467
  if (url) {
5489
- const transition = getTransition(element?.target);
5468
+ const transition = getTransition(anchor?.target);
5490
5469
  transition?.(url);
5491
5470
  }
5492
5471
  }
5493
5472
  };
5494
- const getAnchorElement = (target) => {
5495
- let _target = target;
5496
- while (Boolean(_target) && _target.tagName !== 'A') {
5497
- _target = _target?.parentNode;
5498
- }
5499
- return _target;
5500
- };
5501
5473
  const getTransition = tableFunc([
5502
5474
  [(_) => _ === '_blank', (url) => globalThis.open(url, '_blank')],
5503
5475
  [(_) => _ === '_parent', (url) => globalThis.parent && (globalThis.parent.location.href = url)],
@@ -5509,10 +5481,24 @@
5509
5481
  ],
5510
5482
  [() => true, (url) => globalThis.location && (globalThis.location.href = url)],
5511
5483
  ]);
5512
- const getScenario = tableFunc([
5513
- [(_) => _ === 'ymtarget', (target, methods) => methods?.reachGoalYM(target?.dataset?.ymtarget)],
5514
- [(_) => _ === 'chatbot', (target, methods) => methods?.loadBot({ target })],
5515
- ]);
5484
+
5485
+ function useAspects() {
5486
+ return useAspects._impl();
5487
+ }
5488
+ useAspects._impl = () => ({
5489
+ forwardQuery,
5490
+ });
5491
+ useAspects.setup = (impl) => {
5492
+ useAspects._impl = impl;
5493
+ };
5494
+
5495
+ const useClickHandler = handlerDecorator(() => {
5496
+ useEffect(() => {
5497
+ saveSessionQuery(); //? Call first time for save query in sessionStorage
5498
+ }, []);
5499
+ const aspects = useAspects();
5500
+ useEventListener(globalThis, 'click', applyAspects(aspects));
5501
+ });
5516
5502
 
5517
5503
  const COOKIE_DIALOG_ID = 'cookie';
5518
5504
  const DIALOG_INITIAL_DELAY = 3 * 1000;
@@ -5599,7 +5585,7 @@
5599
5585
  const ContentPage = JSX(({ className, data = EMPTY_DATA, blocksRegistry, blockDecorator }) => {
5600
5586
  const { slots, blocks, fallback, ...pageContent } = data;
5601
5587
  const resolvedPageContent = useJSONRef(pageContent, fallback);
5602
- useNavigateHandler();
5588
+ useClickHandler();
5603
5589
  const options = {
5604
5590
  key: '',
5605
5591
  page: { slots, blocks, fallback, ...resolvedPageContent },
@@ -5621,7 +5607,7 @@
5621
5607
  slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
5622
5608
  });
5623
5609
 
5624
- const packageVersion = "0.14.267";
5610
+ const packageVersion = "0.14.269";
5625
5611
 
5626
5612
  exports.Blocks = Blocks;
5627
5613
  exports.ContentPage = ContentPage;