@redneckz/wildless-cms-uni-blocks 0.14.1082 → 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 +17 -16
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/ui-kit/ResponseTypeDialog/ResponseTypeDialog.d.ts +1 -0
- package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +2 -14
- package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- 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/ApplicationLeadForm/useApplicationLeadApi.js +2 -14
- package/lib/components/ApplicationLeadForm/useApplicationLeadApi.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 +17 -16
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/ui-kit/ResponseTypeDialog/ResponseTypeDialog.d.ts +1 -0
- package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +2 -14
- package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- 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/ApplicationLeadForm/useApplicationLeadApi.js +2 -14
- package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.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/ApplicationLeadForm/useApplicationLeadApi.tsx +2 -21
- 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/ApplicationLeadForm/useApplicationLeadApi.tsx +2 -21
- 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));
|
|
@@ -8018,13 +8020,8 @@
|
|
|
8018
8020
|
});
|
|
8019
8021
|
};
|
|
8020
8022
|
const createHandleSuccessVerifyNew = ({ common, taskData, draftDialog, consentBkiDialog, }) => async () => {
|
|
8021
|
-
const { verifyPhoneDialog, sendAspects, handleFailSendForm, programId, productType
|
|
8023
|
+
const { verifyPhoneDialog, sendAspects, handleFailSendForm, programId, productType } = common;
|
|
8022
8024
|
const { formData } = taskData;
|
|
8023
|
-
handleAspects({
|
|
8024
|
-
aspectsAttributes: getAspects('leadForm', productType),
|
|
8025
|
-
aspects,
|
|
8026
|
-
ev: {},
|
|
8027
|
-
});
|
|
8028
8025
|
try {
|
|
8029
8026
|
const participantData = await createParticipant({
|
|
8030
8027
|
phone: formatPhone(formData.phone),
|
|
@@ -8100,13 +8097,8 @@
|
|
|
8100
8097
|
};
|
|
8101
8098
|
const createHandleSuccessVerifyOld = (props, sendCurrentTask) => async () => {
|
|
8102
8099
|
const { common, draftDialog } = props;
|
|
8103
|
-
const {
|
|
8100
|
+
const { programId, sendAspects, verifyPhoneDialog, handleFailSendForm, profileId } = common;
|
|
8104
8101
|
const productType = common.productType;
|
|
8105
|
-
handleAspects({
|
|
8106
|
-
aspectsAttributes: getAspects('leadForm', productType),
|
|
8107
|
-
aspects,
|
|
8108
|
-
ev: {},
|
|
8109
|
-
});
|
|
8110
8102
|
try {
|
|
8111
8103
|
const lastTaskId = await getLastTaskStatus({ profileId, programId });
|
|
8112
8104
|
if (lastTaskId) {
|
|
@@ -13881,6 +13873,7 @@
|
|
|
13881
13873
|
const transformQuickActions = (items) => items.map((item) => ({ text: item }));
|
|
13882
13874
|
const useHandlers = () => {
|
|
13883
13875
|
const phoneCallRequestDialog = useDialog(PhoneCallRequestDialog);
|
|
13876
|
+
const responseTypeDialog = useDialog(ResponseTypeDialog);
|
|
13884
13877
|
const handleCallClick = useCallback(() => {
|
|
13885
13878
|
phoneCallRequestDialog.open({ onClose: () => phoneCallRequestDialog.close() });
|
|
13886
13879
|
}, []);
|
|
@@ -13888,7 +13881,15 @@
|
|
|
13888
13881
|
const handleChatClick = useCallback((ev) => {
|
|
13889
13882
|
const openChatBot = aspects[CHAT_BOT_ASPECT_NAME];
|
|
13890
13883
|
if (openChatBot && ev) {
|
|
13891
|
-
openChatBot(ev)
|
|
13884
|
+
openChatBot(ev)
|
|
13885
|
+
.catch(() => {
|
|
13886
|
+
responseTypeDialog.open({
|
|
13887
|
+
onClose: () => responseTypeDialog.close(),
|
|
13888
|
+
errorMessage: 'Пожалуйста, попробуйте позднее',
|
|
13889
|
+
errorTitle: 'Ошибка загрузки чата',
|
|
13890
|
+
});
|
|
13891
|
+
})
|
|
13892
|
+
.finally();
|
|
13892
13893
|
}
|
|
13893
13894
|
}, []);
|
|
13894
13895
|
const handlePhoneClick = useCallback(() => {
|
|
@@ -15158,7 +15159,7 @@
|
|
|
15158
15159
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
15159
15160
|
});
|
|
15160
15161
|
|
|
15161
|
-
const packageVersion = "0.14.
|
|
15162
|
+
const packageVersion = "0.14.1083";
|
|
15162
15163
|
|
|
15163
15164
|
exports.Blocks = Blocks;
|
|
15164
15165
|
exports.ContentPage = ContentPage;
|