@redneckz/wildless-cms-uni-blocks 0.14.795 → 0.14.797
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/bundle/bundle.umd.js +5 -6
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/Header/HeaderChatBotButton.d.ts +1 -0
- package/bundle/components/Header/HeaderSecondaryMenuButton.d.ts +1 -1
- package/dist/components/Header/HeaderChatBotButton.d.ts +1 -0
- package/dist/components/Header/HeaderChatBotButton.js +2 -2
- package/dist/components/Header/HeaderChatBotButton.js.map +1 -1
- package/dist/components/Header/HeaderSecondaryMenuButton.d.ts +1 -1
- package/dist/components/Header/HeaderSecondaryMenuButton.js +1 -0
- package/dist/components/Header/HeaderSecondaryMenuButton.js.map +1 -1
- package/dist/components/Header/HeaderTop.js +4 -1
- package/dist/components/Header/HeaderTop.js.map +1 -1
- package/dist/components/Header/useChatBot.js +1 -3
- package/dist/components/Header/useChatBot.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/Header/HeaderChatBotButton.d.ts +1 -0
- package/lib/components/Header/HeaderChatBotButton.js +2 -2
- package/lib/components/Header/HeaderChatBotButton.js.map +1 -1
- package/lib/components/Header/HeaderSecondaryMenuButton.d.ts +1 -1
- package/lib/components/Header/HeaderSecondaryMenuButton.js +1 -0
- package/lib/components/Header/HeaderSecondaryMenuButton.js.map +1 -1
- package/lib/components/Header/HeaderTop.js +4 -1
- package/lib/components/Header/HeaderTop.js.map +1 -1
- package/lib/components/Header/useChatBot.js +1 -3
- package/lib/components/Header/useChatBot.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +90 -2
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/Header/HeaderChatBotButton.d.ts +1 -0
- package/mobile/bundle/components/Header/HeaderSecondaryMenuButton.d.ts +1 -1
- package/mobile/dist/components/Header/HeaderChatBotButton.d.ts +1 -0
- package/mobile/dist/components/Header/HeaderChatBotButton.js +2 -2
- package/mobile/dist/components/Header/HeaderChatBotButton.js.map +1 -1
- package/mobile/dist/components/Header/HeaderSecondaryMenuButton.d.ts +1 -1
- package/mobile/dist/components/Header/HeaderSecondaryMenuButton.js +1 -0
- package/mobile/dist/components/Header/HeaderSecondaryMenuButton.js.map +1 -1
- package/mobile/dist/components/Header/HeaderTop.js +4 -1
- package/mobile/dist/components/Header/HeaderTop.js.map +1 -1
- package/mobile/dist/components/Header/useChatBot.js +1 -3
- package/mobile/dist/components/Header/useChatBot.js.map +1 -1
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/Header/HeaderChatBotButton.d.ts +1 -0
- package/mobile/lib/components/Header/HeaderChatBotButton.js +2 -2
- package/mobile/lib/components/Header/HeaderChatBotButton.js.map +1 -1
- package/mobile/lib/components/Header/HeaderSecondaryMenuButton.d.ts +1 -1
- package/mobile/lib/components/Header/HeaderSecondaryMenuButton.js +1 -0
- package/mobile/lib/components/Header/HeaderSecondaryMenuButton.js.map +1 -1
- package/mobile/lib/components/Header/HeaderTop.js +4 -1
- package/mobile/lib/components/Header/HeaderTop.js.map +1 -1
- package/mobile/lib/components/Header/useChatBot.js +1 -3
- package/mobile/lib/components/Header/useChatBot.js.map +1 -1
- package/mobile/src/components/Header/HeaderChatBotButton.tsx +10 -2
- package/mobile/src/components/Header/HeaderSecondaryMenuButton.tsx +2 -1
- package/mobile/src/components/Header/HeaderTop.tsx +15 -1
- package/mobile/src/components/Header/useChatBot.ts +1 -3
- package/package.json +1 -1
- package/src/components/Header/HeaderChatBotButton.tsx +10 -2
- package/src/components/Header/HeaderSecondaryMenuButton.tsx +2 -1
- package/src/components/Header/HeaderTop.tsx +15 -1
- package/src/components/Header/useChatBot.ts +1 -3
package/package.json
CHANGED
|
@@ -12,10 +12,18 @@ interface HeaderChatBotButtonProps {
|
|
|
12
12
|
onClick?: (ev: PreventableEventWithTarget) => void;
|
|
13
13
|
ariaLabel?: string;
|
|
14
14
|
version?: BlockVersion;
|
|
15
|
+
buttonSize?: 'default' | 'medium' | 'large';
|
|
15
16
|
}
|
|
16
17
|
|
|
17
18
|
export const HeaderChatBotButton = JSX<HeaderChatBotButtonProps>(
|
|
18
|
-
({
|
|
19
|
+
({
|
|
20
|
+
chat = 'personal',
|
|
21
|
+
iconVersion,
|
|
22
|
+
className,
|
|
23
|
+
ariaLabel = 'Чат',
|
|
24
|
+
version,
|
|
25
|
+
buttonSize = 'large',
|
|
26
|
+
}) => {
|
|
19
27
|
const { load, isLoading } = useChatBot(chat);
|
|
20
28
|
|
|
21
29
|
return (
|
|
@@ -24,7 +32,7 @@ export const HeaderChatBotButton = JSX<HeaderChatBotButtonProps>(
|
|
|
24
32
|
image={{ icon: 'HeadphonesIcon', iconVersion }}
|
|
25
33
|
ariaLabel={ariaLabel}
|
|
26
34
|
onClick={load}
|
|
27
|
-
buttonSize=
|
|
35
|
+
buttonSize={buttonSize}
|
|
28
36
|
isGrayBg={true}
|
|
29
37
|
version={version}
|
|
30
38
|
isLoading={isLoading}
|
|
@@ -10,7 +10,7 @@ import { style } from '../../utils/style';
|
|
|
10
10
|
export interface HeaderSecondaryMenuButtonProps extends ImageContent, AspectsProps {
|
|
11
11
|
className?: string;
|
|
12
12
|
isRounded?: boolean;
|
|
13
|
-
buttonSize?: 'default' | 'large';
|
|
13
|
+
buttonSize?: 'default' | 'medium' | 'large';
|
|
14
14
|
isGrayBg?: boolean;
|
|
15
15
|
disabled?: boolean;
|
|
16
16
|
ariaLabel?: string;
|
|
@@ -23,6 +23,7 @@ export interface HeaderSecondaryMenuButtonProps extends ImageContent, AspectsPro
|
|
|
23
23
|
|
|
24
24
|
const BUTTON_SIZE_STYLE = {
|
|
25
25
|
default: 'w-6 h-6',
|
|
26
|
+
medium: 'w-10 h-10',
|
|
26
27
|
large: 'w-12 h-12',
|
|
27
28
|
};
|
|
28
29
|
|
|
@@ -3,9 +3,12 @@ import { useCallback } from '@redneckz/uni-jsx/lib/hooks';
|
|
|
3
3
|
import { useRouter } from '../../external/useRouter';
|
|
4
4
|
import { type BgColorVersion } from '../../model/BgColorVersion';
|
|
5
5
|
import { type BlockVersion } from '../../model/BlockVersion';
|
|
6
|
+
import { type IconVersion } from '../../model/IconVersion';
|
|
6
7
|
import { type LogoType } from '../../model/LogoType';
|
|
8
|
+
import { projectSettings } from '../../ProjectSettings';
|
|
7
9
|
import { Icon } from '../../ui-kit/Icon/Icon';
|
|
8
10
|
import { Logo } from '../../ui-kit/Logo/Logo';
|
|
11
|
+
import { HeaderChatBotButton } from './HeaderChatBotButton';
|
|
9
12
|
import { type InternetButtonProps } from './HeaderProps';
|
|
10
13
|
import { InternetBankButton } from './InternetBankButton';
|
|
11
14
|
|
|
@@ -22,6 +25,7 @@ export const HeaderTop = JSX<HeaderTopProps>(
|
|
|
22
25
|
({ bgColor, logo, alwaysShowLogo, internetBankButton, version, backwardButton }) => {
|
|
23
26
|
const router = useRouter();
|
|
24
27
|
const isRootLocation = router.pathname === '/';
|
|
28
|
+
const iconVersion: IconVersion = version === 'transparent' ? 'white' : 'black';
|
|
25
29
|
|
|
26
30
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
27
31
|
const { dataFooter, dataHeader, ...logoProps } = logo ?? {};
|
|
@@ -45,7 +49,17 @@ export const HeaderTop = JSX<HeaderTopProps>(
|
|
|
45
49
|
) : (
|
|
46
50
|
renderBackButton(onClick, backwardButton)
|
|
47
51
|
)}
|
|
48
|
-
<
|
|
52
|
+
<div className="flex gap-lg items-center">
|
|
53
|
+
{projectSettings.CHAT_BOT ? (
|
|
54
|
+
<HeaderChatBotButton
|
|
55
|
+
version={version}
|
|
56
|
+
iconVersion={iconVersion}
|
|
57
|
+
chat={projectSettings.CHAT_BOT}
|
|
58
|
+
buttonSize="medium"
|
|
59
|
+
/>
|
|
60
|
+
) : null}
|
|
61
|
+
<InternetBankButton version={version} {...internetBankButton} />
|
|
62
|
+
</div>
|
|
49
63
|
</div>
|
|
50
64
|
);
|
|
51
65
|
},
|
|
@@ -79,9 +79,7 @@ const renderBusinessChatBot = async (chatUrl: string) => {
|
|
|
79
79
|
const createChatFrame = () => {
|
|
80
80
|
const chatFrame = globalThis.document.createElement('div');
|
|
81
81
|
chatFrame.id = CHAT_FRAME_ID;
|
|
82
|
-
chatFrame.
|
|
83
|
-
chatFrame.style.right = '0';
|
|
84
|
-
chatFrame.style.bottom = '0';
|
|
82
|
+
chatFrame.className = 'fixed right-0 bottom-0 h-full w-full z-10 @3xl:w-auto h-fit';
|
|
85
83
|
|
|
86
84
|
globalThis.document.body.appendChild(chatFrame);
|
|
87
85
|
};
|