@redneckz/wildless-cms-uni-blocks 0.14.1083 → 0.14.1084
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 +15 -4
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/ui-kit/ResponseTypeDialog/ResponseTypeDialog.d.ts +1 -0
- package/dist/components/Header/HeaderQuickActionsMenu.js +11 -1
- package/dist/components/Header/HeaderQuickActionsMenu.js.map +1 -1
- package/dist/ui-kit/ResponseTypeDialog/ResponseTypeDialog.d.ts +1 -0
- package/dist/ui-kit/ResponseTypeDialog/ResponseTypeDialog.js +4 -2
- package/dist/ui-kit/ResponseTypeDialog/ResponseTypeDialog.js.map +1 -1
- package/lib/components/Header/HeaderQuickActionsMenu.js +11 -1
- package/lib/components/Header/HeaderQuickActionsMenu.js.map +1 -1
- package/lib/ui-kit/ResponseTypeDialog/ResponseTypeDialog.d.ts +1 -0
- package/lib/ui-kit/ResponseTypeDialog/ResponseTypeDialog.js +4 -2
- package/lib/ui-kit/ResponseTypeDialog/ResponseTypeDialog.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +15 -4
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/ui-kit/ResponseTypeDialog/ResponseTypeDialog.d.ts +1 -0
- package/mobile/dist/components/Header/HeaderQuickActionsMenu.js +11 -1
- package/mobile/dist/components/Header/HeaderQuickActionsMenu.js.map +1 -1
- package/mobile/dist/ui-kit/ResponseTypeDialog/ResponseTypeDialog.d.ts +1 -0
- package/mobile/dist/ui-kit/ResponseTypeDialog/ResponseTypeDialog.js +4 -2
- package/mobile/dist/ui-kit/ResponseTypeDialog/ResponseTypeDialog.js.map +1 -1
- package/mobile/lib/components/Header/HeaderQuickActionsMenu.js +11 -1
- package/mobile/lib/components/Header/HeaderQuickActionsMenu.js.map +1 -1
- package/mobile/lib/ui-kit/ResponseTypeDialog/ResponseTypeDialog.d.ts +1 -0
- package/mobile/lib/ui-kit/ResponseTypeDialog/ResponseTypeDialog.js +4 -2
- package/mobile/lib/ui-kit/ResponseTypeDialog/ResponseTypeDialog.js.map +1 -1
- package/mobile/src/components/Header/HeaderQuickActionsMenu.tsx +13 -1
- package/mobile/src/ui-kit/ResponseTypeDialog/ResponseTypeDialog.tsx +7 -2
- package/package.json +1 -1
- package/src/components/Header/HeaderQuickActionsMenu.tsx +13 -1
- package/src/icons/IconName.ts +4 -4
- package/src/ui-kit/ResponseTypeDialog/ResponseTypeDialog.tsx +7 -2
package/bundle/bundle.umd.js
CHANGED
|
@@ -1548,16 +1548,18 @@
|
|
|
1548
1548
|
return (jsxs("div", { className: style('bg-white p-lg pb-6xl my-6xl rounded-lg w-full', DIALOG_STYLE[maxWidth], DIALOG_POSITION[position], { 'mr-3xl': !isMobileMode && position === 'corner' }, { 'mb-12': isMobileMode }), role: "dialog", title: "\u0414\u0438\u0430\u043B\u043E\u0433", onClick: onClick, children: [jsxs("div", { className: "sticky py-xl top-0 bg-white z-10", children: [jsx(CloseButton, { className: "absolute top-0 right-0 z-10", onClose: onClose }), jsx("div", { className: "container", children: head })] }), jsx("div", { className: "container", children: children })] }));
|
|
1549
1549
|
});
|
|
1550
1550
|
|
|
1551
|
-
const ResponseTypeDialog = JSX(({ ok, typeForm, onClose, errorMessage }) => {
|
|
1551
|
+
const ResponseTypeDialog = JSX(({ ok, typeForm, onClose, errorMessage, errorTitle }) => {
|
|
1552
1552
|
const statusIcon = ok ? 'ResponseOKIcon' : 'ResponseFailIcon';
|
|
1553
|
+
const responseTitle = errorTitle ?? getDefaultTitle(ok);
|
|
1553
1554
|
const responseOKDescription = typeForm === 'ANTIFRAUD'
|
|
1554
1555
|
? `Сообщение отправлено. Для уточнения информации с Вами могут связаться работники Банка либо Вы
|
|
1555
1556
|
можете самостоятельно позвонить по номеру контакт-центра +78001000100. Будьте внимательны, работники Банка
|
|
1556
1557
|
не звонят с использованием мессенджеров.`
|
|
1557
1558
|
: 'Совсем скоро мы с вами свяжемся';
|
|
1558
1559
|
const responseFailDescription = errorMessage || 'Пожалуйста, повторите позднее';
|
|
1559
|
-
return (jsx(Dialog, { maxWidth: "lg", onClose: onClose, children: jsxs("div", { className: "flex flex-col gap-lg items-center rounded-md space-x-m", children: [jsx(Img, { image: { icon: statusIcon, iconVersion: 'normal' }, width: "136", height: "136" }), jsx(Headline, { className: "w-full", title:
|
|
1560
|
+
return (jsx(Dialog, { maxWidth: "lg", onClose: onClose, children: jsxs("div", { className: "flex flex-col gap-lg items-center rounded-md space-x-m", children: [jsx(Img, { image: { icon: statusIcon, iconVersion: 'normal' }, width: "136", height: "136" }), jsx(Headline, { className: "w-full", title: responseTitle, description: ok ? responseOKDescription : responseFailDescription, headlineVersion: "XS", isEmbedded: true }), jsx(Button, { type: "button", onClick: onClose, children: "\u0425\u043E\u0440\u043E\u0448\u043E" })] }) }));
|
|
1560
1561
|
});
|
|
1562
|
+
const getDefaultTitle = (ok = false) => ok ? 'Ваша заявка отправлена' : 'Не удалось отправить заявку';
|
|
1561
1563
|
|
|
1562
1564
|
const sessionStore = new Store(); // sessionStorage cache
|
|
1563
1565
|
replicate(sessionStore, new StorageAdapter(globalThis?.sessionStorage));
|
|
@@ -13871,6 +13873,7 @@
|
|
|
13871
13873
|
const transformQuickActions = (items) => items.map((item) => ({ text: item }));
|
|
13872
13874
|
const useHandlers = () => {
|
|
13873
13875
|
const phoneCallRequestDialog = useDialog(PhoneCallRequestDialog);
|
|
13876
|
+
const responseTypeDialog = useDialog(ResponseTypeDialog);
|
|
13874
13877
|
const handleCallClick = useCallback(() => {
|
|
13875
13878
|
phoneCallRequestDialog.open({ onClose: () => phoneCallRequestDialog.close() });
|
|
13876
13879
|
}, []);
|
|
@@ -13878,7 +13881,15 @@
|
|
|
13878
13881
|
const handleChatClick = useCallback((ev) => {
|
|
13879
13882
|
const openChatBot = aspects[CHAT_BOT_ASPECT_NAME];
|
|
13880
13883
|
if (openChatBot && ev) {
|
|
13881
|
-
openChatBot(ev)
|
|
13884
|
+
openChatBot(ev)
|
|
13885
|
+
.catch(() => {
|
|
13886
|
+
responseTypeDialog.open({
|
|
13887
|
+
onClose: () => responseTypeDialog.close(),
|
|
13888
|
+
errorMessage: 'Пожалуйста, попробуйте позднее',
|
|
13889
|
+
errorTitle: 'Ошибка загрузки чата',
|
|
13890
|
+
});
|
|
13891
|
+
})
|
|
13892
|
+
.finally();
|
|
13882
13893
|
}
|
|
13883
13894
|
}, []);
|
|
13884
13895
|
const handlePhoneClick = useCallback(() => {
|
|
@@ -15148,7 +15159,7 @@
|
|
|
15148
15159
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
15149
15160
|
});
|
|
15150
15161
|
|
|
15151
|
-
const packageVersion = "0.14.
|
|
15162
|
+
const packageVersion = "0.14.1083";
|
|
15152
15163
|
|
|
15153
15164
|
exports.Blocks = Blocks;
|
|
15154
15165
|
exports.ContentPage = ContentPage;
|