@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.
- package/bin/migration-scripts/0.14.269.js +46 -0
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +61 -44
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/Header/HeaderChatBotButton.d.ts +2 -4
- package/bundle/components/Header/HeaderSecondaryMenuButton.d.ts +2 -4
- package/bundle/components/Header/useChatBot.d.ts +2 -4
- package/bundle/hooks/useAspects/applyAspects.d.ts +3 -0
- package/bundle/hooks/useAspects/aspects/forwardQuery.d.ts +2 -0
- package/bundle/hooks/useAspects/useAspects.d.ts +19 -0
- package/bundle/hooks/useClickHandler.d.ts +1 -0
- package/bundle/model/AspectsProps.d.ts +32 -0
- package/bundle/model/LinkProps.d.ts +2 -8
- package/bundle/ui-kit/LinkButton/LinkButtonContent.d.ts +1 -0
- package/bundle/utils/dataAttributes.d.ts +6 -2
- package/bundle/utils/getSessionQuery.d.ts +1 -1
- package/dist/components/ContentPage/ContentPage.js +2 -2
- package/dist/components/ContentPage/ContentPage.js.map +1 -1
- package/dist/components/ExchangeRateTile/CurrencyTable.js +7 -4
- package/dist/components/ExchangeRateTile/CurrencyTable.js.map +1 -1
- package/dist/components/ExchangeRateTile/CurrentLocation.js +2 -1
- package/dist/components/ExchangeRateTile/CurrentLocation.js.map +1 -1
- package/dist/components/ExchangeRateTile/ExchangeRateTile.js +1 -1
- package/dist/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
- package/dist/components/Header/HeaderChatBotButton.d.ts +2 -4
- package/dist/components/Header/HeaderSecondaryMenuButton.d.ts +2 -4
- package/dist/components/Header/useChatBot.d.ts +2 -4
- package/dist/components/Header/useChatBot.js.map +1 -1
- package/dist/hooks/useAspects/applyAspects.d.ts +3 -0
- package/dist/hooks/useAspects/applyAspects.js +18 -0
- package/dist/hooks/useAspects/applyAspects.js.map +1 -0
- package/dist/hooks/useAspects/aspects/forwardQuery.d.ts +2 -0
- package/dist/hooks/useAspects/aspects/forwardQuery.js +30 -0
- package/dist/hooks/useAspects/aspects/forwardQuery.js.map +1 -0
- package/dist/hooks/useAspects/useAspects.d.ts +19 -0
- package/dist/hooks/useAspects/useAspects.js +14 -0
- package/dist/hooks/useAspects/useAspects.js.map +1 -0
- package/dist/hooks/useClickHandler.d.ts +1 -0
- package/dist/hooks/useClickHandler.js +16 -0
- package/dist/hooks/useClickHandler.js.map +1 -0
- package/dist/model/AspectsProps.d.ts +32 -0
- package/dist/model/AspectsProps.js +2 -0
- package/dist/model/AspectsProps.js.map +1 -0
- package/dist/model/LinkProps.d.ts +2 -8
- package/dist/ui-kit/LinkButton/LinkButton.js +1 -1
- package/dist/ui-kit/LinkButton/LinkButton.js.map +1 -1
- package/dist/ui-kit/LinkButton/LinkButtonContent.d.ts +1 -0
- package/dist/utils/adjustSessionQuery.js +1 -1
- package/dist/utils/adjustSessionQuery.js.map +1 -1
- package/dist/utils/dataAttributes.d.ts +6 -2
- package/dist/utils/dataAttributes.js +12 -3
- package/dist/utils/dataAttributes.js.map +1 -1
- package/dist/utils/getSessionQuery.d.ts +1 -1
- package/dist/utils/getSessionQuery.js +3 -3
- package/dist/utils/getSessionQuery.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/ContentPage/ContentPage.js +2 -2
- package/lib/components/ContentPage/ContentPage.js.map +1 -1
- package/lib/components/ExchangeRateTile/CurrencyTable.js +7 -4
- package/lib/components/ExchangeRateTile/CurrencyTable.js.map +1 -1
- package/lib/components/ExchangeRateTile/CurrentLocation.js +2 -1
- package/lib/components/ExchangeRateTile/CurrentLocation.js.map +1 -1
- package/lib/components/ExchangeRateTile/ExchangeRateTile.js +1 -1
- package/lib/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
- package/lib/components/Header/HeaderChatBotButton.d.ts +2 -4
- package/lib/components/Header/HeaderSecondaryMenuButton.d.ts +2 -4
- package/lib/components/Header/useChatBot.d.ts +2 -4
- package/lib/components/Header/useChatBot.js.map +1 -1
- package/lib/hooks/useAspects/applyAspects.d.ts +3 -0
- package/lib/hooks/useAspects/applyAspects.js +15 -0
- package/lib/hooks/useAspects/applyAspects.js.map +1 -0
- package/lib/hooks/useAspects/aspects/forwardQuery.d.ts +2 -0
- package/lib/hooks/useAspects/aspects/forwardQuery.js +27 -0
- package/lib/hooks/useAspects/aspects/forwardQuery.js.map +1 -0
- package/lib/hooks/useAspects/useAspects.d.ts +19 -0
- package/lib/hooks/useAspects/useAspects.js +11 -0
- package/lib/hooks/useAspects/useAspects.js.map +1 -0
- package/lib/hooks/useClickHandler.d.ts +1 -0
- package/lib/hooks/useClickHandler.js +14 -0
- package/lib/hooks/useClickHandler.js.map +1 -0
- package/lib/model/AspectsProps.d.ts +32 -0
- package/lib/model/AspectsProps.js +2 -0
- package/lib/model/AspectsProps.js.map +1 -0
- package/lib/model/LinkProps.d.ts +2 -8
- package/lib/ui-kit/LinkButton/LinkButton.js +2 -2
- package/lib/ui-kit/LinkButton/LinkButton.js.map +1 -1
- package/lib/ui-kit/LinkButton/LinkButtonContent.d.ts +1 -0
- package/lib/utils/adjustSessionQuery.js +2 -2
- package/lib/utils/adjustSessionQuery.js.map +1 -1
- package/lib/utils/dataAttributes.d.ts +6 -2
- package/lib/utils/dataAttributes.js +10 -1
- package/lib/utils/dataAttributes.js.map +1 -1
- package/lib/utils/getSessionQuery.d.ts +1 -1
- package/lib/utils/getSessionQuery.js +1 -1
- package/lib/utils/getSessionQuery.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +61 -75
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/Header/HeaderChatBotButton.d.ts +2 -4
- package/mobile/bundle/components/Header/HeaderSecondaryMenuButton.d.ts +2 -4
- package/mobile/bundle/components/Header/useChatBot.d.ts +2 -4
- package/mobile/bundle/hooks/useAspects/applyAspects.d.ts +3 -0
- package/mobile/bundle/hooks/useAspects/aspects/forwardQuery.d.ts +2 -0
- package/mobile/bundle/hooks/useAspects/useAspects.d.ts +19 -0
- package/mobile/bundle/hooks/useClickHandler.d.ts +1 -0
- package/mobile/bundle/model/AspectsProps.d.ts +32 -0
- package/mobile/bundle/model/LinkProps.d.ts +2 -8
- package/mobile/bundle/ui-kit/LinkButton/LinkButtonContent.d.ts +1 -0
- package/mobile/bundle/utils/dataAttributes.d.ts +6 -2
- package/mobile/bundle/utils/getSessionQuery.d.ts +1 -1
- package/mobile/dist/components/ContentPage/ContentPage.js +2 -2
- package/mobile/dist/components/ContentPage/ContentPage.js.map +1 -1
- package/mobile/dist/components/ExchangeRateTile/CurrencyTable.js +7 -4
- package/mobile/dist/components/ExchangeRateTile/CurrencyTable.js.map +1 -1
- package/mobile/dist/components/ExchangeRateTile/CurrentLocation.js +2 -1
- package/mobile/dist/components/ExchangeRateTile/CurrentLocation.js.map +1 -1
- package/mobile/dist/components/ExchangeRateTile/ExchangeRateTile.js +1 -1
- package/mobile/dist/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
- package/mobile/dist/components/Header/HeaderChatBotButton.d.ts +2 -4
- package/mobile/dist/components/Header/HeaderSecondaryMenuButton.d.ts +2 -4
- package/mobile/dist/components/Header/useChatBot.d.ts +2 -4
- package/mobile/dist/components/Header/useChatBot.js.map +1 -1
- package/mobile/dist/hooks/useAspects/applyAspects.d.ts +3 -0
- package/mobile/dist/hooks/useAspects/applyAspects.js +18 -0
- package/mobile/dist/hooks/useAspects/applyAspects.js.map +1 -0
- package/mobile/dist/hooks/useAspects/aspects/forwardQuery.d.ts +2 -0
- package/mobile/dist/hooks/useAspects/aspects/forwardQuery.js +30 -0
- package/mobile/dist/hooks/useAspects/aspects/forwardQuery.js.map +1 -0
- package/mobile/dist/hooks/useAspects/useAspects.d.ts +19 -0
- package/mobile/dist/hooks/useAspects/useAspects.js +14 -0
- package/mobile/dist/hooks/useAspects/useAspects.js.map +1 -0
- package/mobile/dist/hooks/useClickHandler.d.ts +1 -0
- package/mobile/dist/hooks/useClickHandler.js +16 -0
- package/mobile/dist/hooks/useClickHandler.js.map +1 -0
- package/mobile/dist/model/AspectsProps.d.ts +32 -0
- package/mobile/dist/model/AspectsProps.js +2 -0
- package/mobile/dist/model/AspectsProps.js.map +1 -0
- package/mobile/dist/model/LinkProps.d.ts +2 -8
- package/mobile/dist/ui-kit/LinkButton/LinkButton.js +1 -1
- package/mobile/dist/ui-kit/LinkButton/LinkButton.js.map +1 -1
- package/mobile/dist/ui-kit/LinkButton/LinkButtonContent.d.ts +1 -0
- package/mobile/dist/utils/adjustSessionQuery.js +1 -1
- package/mobile/dist/utils/adjustSessionQuery.js.map +1 -1
- package/mobile/dist/utils/dataAttributes.d.ts +6 -2
- package/mobile/dist/utils/dataAttributes.js +12 -3
- package/mobile/dist/utils/dataAttributes.js.map +1 -1
- package/mobile/dist/utils/getSessionQuery.d.ts +1 -1
- package/mobile/dist/utils/getSessionQuery.js +3 -3
- package/mobile/dist/utils/getSessionQuery.js.map +1 -1
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/ContentPage/ContentPage.js +2 -2
- package/mobile/lib/components/ContentPage/ContentPage.js.map +1 -1
- package/mobile/lib/components/ExchangeRateTile/CurrencyTable.js +7 -4
- package/mobile/lib/components/ExchangeRateTile/CurrencyTable.js.map +1 -1
- package/mobile/lib/components/ExchangeRateTile/CurrentLocation.js +2 -1
- package/mobile/lib/components/ExchangeRateTile/CurrentLocation.js.map +1 -1
- package/mobile/lib/components/ExchangeRateTile/ExchangeRateTile.js +1 -1
- package/mobile/lib/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
- package/mobile/lib/components/Header/HeaderChatBotButton.d.ts +2 -4
- package/mobile/lib/components/Header/HeaderSecondaryMenuButton.d.ts +2 -4
- package/mobile/lib/components/Header/useChatBot.d.ts +2 -4
- package/mobile/lib/components/Header/useChatBot.js.map +1 -1
- package/mobile/lib/hooks/useAspects/applyAspects.d.ts +3 -0
- package/mobile/lib/hooks/useAspects/applyAspects.js +15 -0
- package/mobile/lib/hooks/useAspects/applyAspects.js.map +1 -0
- package/mobile/lib/hooks/useAspects/aspects/forwardQuery.d.ts +2 -0
- package/mobile/lib/hooks/useAspects/aspects/forwardQuery.js +27 -0
- package/mobile/lib/hooks/useAspects/aspects/forwardQuery.js.map +1 -0
- package/mobile/lib/hooks/useAspects/useAspects.d.ts +19 -0
- package/mobile/lib/hooks/useAspects/useAspects.js +11 -0
- package/mobile/lib/hooks/useAspects/useAspects.js.map +1 -0
- package/mobile/lib/hooks/useClickHandler.d.ts +1 -0
- package/mobile/lib/hooks/useClickHandler.js +14 -0
- package/mobile/lib/hooks/useClickHandler.js.map +1 -0
- package/mobile/lib/model/AspectsProps.d.ts +32 -0
- package/mobile/lib/model/AspectsProps.js +2 -0
- package/mobile/lib/model/AspectsProps.js.map +1 -0
- package/mobile/lib/model/LinkProps.d.ts +2 -8
- package/mobile/lib/ui-kit/LinkButton/LinkButton.js +2 -2
- package/mobile/lib/ui-kit/LinkButton/LinkButton.js.map +1 -1
- package/mobile/lib/ui-kit/LinkButton/LinkButtonContent.d.ts +1 -0
- package/mobile/lib/utils/adjustSessionQuery.js +2 -2
- package/mobile/lib/utils/adjustSessionQuery.js.map +1 -1
- package/mobile/lib/utils/dataAttributes.d.ts +6 -2
- package/mobile/lib/utils/dataAttributes.js +10 -1
- package/mobile/lib/utils/dataAttributes.js.map +1 -1
- package/mobile/lib/utils/getSessionQuery.d.ts +1 -1
- package/mobile/lib/utils/getSessionQuery.js +1 -1
- package/mobile/lib/utils/getSessionQuery.js.map +1 -1
- package/mobile/src/components/ContentPage/ContentPage.tsx +2 -2
- package/mobile/src/components/ExchangeRateTile/CurrencyTable.tsx +11 -8
- package/mobile/src/components/ExchangeRateTile/CurrentLocation.tsx +2 -1
- package/mobile/src/components/ExchangeRateTile/ExchangeRateTile.tsx +2 -2
- package/mobile/src/components/Header/HeaderChatBotButton.tsx +2 -2
- package/mobile/src/components/Header/HeaderSecondaryMenuButton.tsx +2 -2
- package/mobile/src/components/Header/useChatBot.ts +2 -2
- package/mobile/src/hooks/useAspects/applyAspects.ts +19 -0
- package/mobile/src/hooks/useAspects/aspects/forwardQuery.ts +32 -0
- package/mobile/src/hooks/useAspects/useAspects.ts +30 -0
- package/mobile/src/hooks/useClickHandler.ts +16 -0
- package/mobile/src/model/AspectsProps.ts +37 -0
- package/mobile/src/model/LinkProps.ts +2 -9
- package/mobile/src/ui-kit/LinkButton/LinkButton.tsx +2 -2
- package/mobile/src/ui-kit/LinkButton/LinkButtonContent.ts +1 -0
- package/mobile/src/utils/adjustSessionQuery.ts +2 -2
- package/mobile/src/utils/dataAttributes.ts +10 -3
- package/mobile/src/utils/getSessionQuery.ts +1 -1
- package/package.json +1 -1
- package/src/components/ContentPage/ContentPage.tsx +2 -2
- package/src/components/ExchangeRateTile/CurrencyTable.tsx +11 -8
- package/src/components/ExchangeRateTile/CurrentLocation.tsx +2 -1
- package/src/components/ExchangeRateTile/ExchangeRateTile.tsx +2 -2
- package/src/components/Header/HeaderChatBotButton.tsx +2 -2
- package/src/components/Header/HeaderSecondaryMenuButton.tsx +2 -2
- package/src/components/Header/useChatBot.ts +2 -2
- package/src/hooks/useAspects/applyAspects.ts +19 -0
- package/src/hooks/useAspects/aspects/forwardQuery.ts +32 -0
- package/src/hooks/useAspects/useAspects.ts +30 -0
- package/src/hooks/useClickHandler.ts +16 -0
- package/src/model/AspectsProps.ts +37 -0
- package/src/model/LinkProps.ts +2 -9
- package/src/ui-kit/LinkButton/LinkButton.tsx +2 -2
- package/src/ui-kit/LinkButton/LinkButtonContent.ts +1 -0
- package/src/utils/adjustSessionQuery.ts +2 -2
- package/src/utils/dataAttributes.ts +10 -3
- package/src/utils/getSessionQuery.ts +1 -1
- package/bundle/hooks/useNavigateHandler.d.ts +0 -3
- package/dist/hooks/useNavigateHandler.d.ts +0 -3
- package/dist/hooks/useNavigateHandler.js +0 -62
- package/dist/hooks/useNavigateHandler.js.map +0 -1
- package/lib/hooks/useNavigateHandler.d.ts +0 -3
- package/lib/hooks/useNavigateHandler.js +0 -60
- package/lib/hooks/useNavigateHandler.js.map +0 -1
- package/mobile/bundle/hooks/useNavigateHandler.d.ts +0 -3
- package/mobile/dist/hooks/useNavigateHandler.d.ts +0 -3
- package/mobile/dist/hooks/useNavigateHandler.js +0 -62
- package/mobile/dist/hooks/useNavigateHandler.js.map +0 -1
- package/mobile/lib/hooks/useNavigateHandler.d.ts +0 -3
- package/mobile/lib/hooks/useNavigateHandler.js +0 -60
- package/mobile/lib/hooks/useNavigateHandler.js.map +0 -1
- package/mobile/src/hooks/useNavigateHandler.ts +0 -78
- 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 @@
|
|
|
1
|
+
{"version":3,"file":"AspectsProps.js","sourceRoot":"","sources":["../../src/model/AspectsProps.ts"],"names":[],"mappings":""}
|
package/lib/model/LinkProps.d.ts
CHANGED
|
@@ -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?:
|
|
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 {
|
|
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, ...
|
|
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,
|
|
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,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAEpE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,kBAAkB;AAClB,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,CAC3B,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,IAAI,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE;IACzD,MAAM,gBAAgB,GAAG,aAAa,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;IAEzD,MAAM,IAAI,GAAG,OAAO,EAAE,CAAC;IACvB,MAAM,aAAa,GAAG,IAAI,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAE,IAAI,EAAE,GAAG,IAAI,EAAE,CAAC,CAAC;IACzE,MAAM,WAAW,GAAG,QAAQ,IAAI,KAAC,WAAW,OAAK,aAAa,GAAI,CAAC;IAEnE,OAAO,QAAQ,CAAC,CAAC,CAAC,CAChB,KAAC,cAAc,OAAK,aAAa,YAAG,WAAW,GAAkB,CAClE,CAAC,CAAC,CAAC,CACF,KAAC,aAAa,OAAK,aAAa,YAAG,WAAW,GAAiB,CAChE,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,MAAM,aAAa,GAAG,GAAG,CACvB,CAAC,EACC,SAAS,GAAG,EAAE,EACd,IAAI,EACJ,GAAG,EACH,MAAM,EACN,SAAS,EACT,OAAO,EACP,OAAO,EACP,OAAO,EACP,IAAI,EACJ,IAAI,EACJ,QAAQ,GACT,EAAE,EAAE,CAAC,CACJ,YACE,SAAS,EAAE,uBAAuB,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,EACnE,IAAI,EAAE,IAAI,EACV,GAAG,EAAE,GAAG,EACR,MAAM,EAAE,MAAM,gBACF,SAAS,EACrB,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,EAC9B,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,IAAI,KAEN,oBAAoB,CAAC,IAAI,CAAC,YAE7B,QAAQ,GACP,CACL,CACF,CAAC;AAEF,MAAM,cAAc,GAAG,GAAG,CACxB,CAAC,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CACxD,iBACE,IAAI,EAAC,QAAQ,mBACC,MAAM,gBACR,SAAS,EACrB,QAAQ,EAAE,CAAC,CAAC,EACZ,SAAS,EAAE,wBAAwB,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,YAEnE,QAAQ,GACF,CACV,CACF,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { saveSessionQuery } from './getSessionQuery.js';
|
|
2
2
|
import { isURL } from './url.js';
|
|
3
3
|
export const adjustSessionQuery = (href) => {
|
|
4
|
-
const sessionQuery =
|
|
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,
|
|
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
|
|
2
|
-
export declare const
|
|
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
|
|
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,
|
|
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
|
|
1
|
+
export declare function saveSessionQuery(): string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const QUERY_STORAGE_KEY = 'rshb-query-params';
|
|
2
|
-
export function
|
|
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,
|
|
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
|
|
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, ...
|
|
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
|
|
3433
|
-
const
|
|
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:
|
|
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:
|
|
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
|
|
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
|
|
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 =
|
|
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
|
|
5467
|
-
|
|
5468
|
-
|
|
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(
|
|
5466
|
+
const url = adjustSessionQuery(anchor?.href) || anchor?.href;
|
|
5488
5467
|
if (url) {
|
|
5489
|
-
const transition = getTransition(
|
|
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
|
-
|
|
5513
|
-
|
|
5514
|
-
|
|
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
|
-
|
|
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.
|
|
5610
|
+
const packageVersion = "0.14.269";
|
|
5625
5611
|
|
|
5626
5612
|
exports.Blocks = Blocks;
|
|
5627
5613
|
exports.ContentPage = ContentPage;
|