@redneckz/wildless-cms-uni-blocks 0.14.845 → 0.14.850
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 +27 -78
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/Header/HeaderChatBotButton.d.ts +0 -1
- package/bundle/hooks/useAspects/aspects/forwardQuery.d.ts +1 -1
- package/bundle/hooks/useAspects/handleAspects.d.ts +1 -1
- package/bundle/hooks/useAspects/useAspects.d.ts +1 -1
- package/bundle/retail/validator/validators.d.ts +1 -0
- package/bundle/ui-kit/DatePicker/DatePickerControl.d.ts +1 -0
- package/dist/components/Header/HeaderChatBotButton.d.ts +0 -1
- package/dist/components/Header/HeaderChatBotButton.js +15 -4
- package/dist/components/Header/HeaderChatBotButton.js.map +1 -1
- package/dist/components/Header/HeaderSubMenu.js +1 -1
- package/dist/components/Header/HeaderSubMenu.js.map +1 -1
- package/dist/components/Header/HeaderTop.js +1 -1
- package/dist/components/Header/HeaderTop.js.map +1 -1
- package/dist/hooks/useAspects/aspects/forwardQuery.d.ts +1 -1
- package/dist/hooks/useAspects/aspects/forwardQuery.js +1 -1
- package/dist/hooks/useAspects/aspects/forwardQuery.js.map +1 -1
- package/dist/hooks/useAspects/handleAspects.d.ts +1 -1
- package/dist/hooks/useAspects/handleAspects.js +5 -2
- package/dist/hooks/useAspects/handleAspects.js.map +1 -1
- package/dist/hooks/useAspects/useAspects.d.ts +1 -1
- package/dist/retail/components/Fields/BeginDateField.js +1 -1
- package/dist/retail/components/Fields/BeginDateField.js.map +1 -1
- package/dist/retail/components/Fields/ParticipantDateRegistrationField.js +1 -1
- package/dist/retail/components/Fields/ParticipantDateRegistrationField.js.map +1 -1
- package/dist/retail/utils/renderStep.js +3 -1
- package/dist/retail/utils/renderStep.js.map +1 -1
- package/dist/retail/validator/validatorObj.js +2 -2
- package/dist/retail/validator/validatorObj.js.map +1 -1
- package/dist/retail/validator/validators.d.ts +1 -0
- package/dist/retail/validator/validators.js +3 -1
- package/dist/retail/validator/validators.js.map +1 -1
- package/dist/ui-kit/DatePicker/DatePickerControl.d.ts +1 -0
- package/dist/ui-kit/DatePicker/DatePickerControl.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/Header/HeaderChatBotButton.d.ts +0 -1
- package/lib/components/Header/HeaderChatBotButton.js +15 -4
- package/lib/components/Header/HeaderChatBotButton.js.map +1 -1
- package/lib/components/Header/HeaderSubMenu.js +1 -1
- package/lib/components/Header/HeaderSubMenu.js.map +1 -1
- package/lib/components/Header/HeaderTop.js +1 -1
- package/lib/components/Header/HeaderTop.js.map +1 -1
- package/lib/hooks/useAspects/aspects/forwardQuery.d.ts +1 -1
- package/lib/hooks/useAspects/aspects/forwardQuery.js +1 -1
- package/lib/hooks/useAspects/aspects/forwardQuery.js.map +1 -1
- package/lib/hooks/useAspects/handleAspects.d.ts +1 -1
- package/lib/hooks/useAspects/handleAspects.js +5 -2
- package/lib/hooks/useAspects/handleAspects.js.map +1 -1
- package/lib/hooks/useAspects/useAspects.d.ts +1 -1
- package/lib/retail/components/Fields/BeginDateField.js +1 -1
- package/lib/retail/components/Fields/BeginDateField.js.map +1 -1
- package/lib/retail/components/Fields/ParticipantDateRegistrationField.js +1 -1
- package/lib/retail/components/Fields/ParticipantDateRegistrationField.js.map +1 -1
- package/lib/retail/utils/renderStep.js +3 -1
- package/lib/retail/utils/renderStep.js.map +1 -1
- package/lib/retail/validator/validatorObj.js +3 -3
- package/lib/retail/validator/validatorObj.js.map +1 -1
- package/lib/retail/validator/validators.d.ts +1 -0
- package/lib/retail/validator/validators.js +1 -0
- package/lib/retail/validator/validators.js.map +1 -1
- package/lib/ui-kit/DatePicker/DatePickerControl.d.ts +1 -0
- package/lib/ui-kit/DatePicker/DatePickerControl.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +27 -78
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/Header/HeaderChatBotButton.d.ts +0 -1
- package/mobile/bundle/hooks/useAspects/aspects/forwardQuery.d.ts +1 -1
- package/mobile/bundle/hooks/useAspects/handleAspects.d.ts +1 -1
- package/mobile/bundle/hooks/useAspects/useAspects.d.ts +1 -1
- package/mobile/bundle/retail/validator/validators.d.ts +1 -0
- package/mobile/bundle/ui-kit/DatePicker/DatePickerControl.d.ts +1 -0
- package/mobile/dist/components/Header/HeaderChatBotButton.d.ts +0 -1
- package/mobile/dist/components/Header/HeaderChatBotButton.js +15 -4
- package/mobile/dist/components/Header/HeaderChatBotButton.js.map +1 -1
- package/mobile/dist/components/Header/HeaderSubMenu.js +1 -1
- package/mobile/dist/components/Header/HeaderSubMenu.js.map +1 -1
- package/mobile/dist/components/Header/HeaderTop.js +1 -1
- package/mobile/dist/components/Header/HeaderTop.js.map +1 -1
- package/mobile/dist/hooks/useAspects/aspects/forwardQuery.d.ts +1 -1
- package/mobile/dist/hooks/useAspects/aspects/forwardQuery.js +1 -1
- package/mobile/dist/hooks/useAspects/aspects/forwardQuery.js.map +1 -1
- package/mobile/dist/hooks/useAspects/handleAspects.d.ts +1 -1
- package/mobile/dist/hooks/useAspects/handleAspects.js +5 -2
- package/mobile/dist/hooks/useAspects/handleAspects.js.map +1 -1
- package/mobile/dist/hooks/useAspects/useAspects.d.ts +1 -1
- package/mobile/dist/retail/components/Fields/BeginDateField.js +1 -1
- package/mobile/dist/retail/components/Fields/BeginDateField.js.map +1 -1
- package/mobile/dist/retail/components/Fields/ParticipantDateRegistrationField.js +1 -1
- package/mobile/dist/retail/components/Fields/ParticipantDateRegistrationField.js.map +1 -1
- package/mobile/dist/retail/utils/renderStep.js +3 -1
- package/mobile/dist/retail/utils/renderStep.js.map +1 -1
- package/mobile/dist/retail/validator/validatorObj.js +2 -2
- package/mobile/dist/retail/validator/validatorObj.js.map +1 -1
- package/mobile/dist/retail/validator/validators.d.ts +1 -0
- package/mobile/dist/retail/validator/validators.js +3 -1
- package/mobile/dist/retail/validator/validators.js.map +1 -1
- package/mobile/dist/ui-kit/DatePicker/DatePickerControl.d.ts +1 -0
- package/mobile/dist/ui-kit/DatePicker/DatePickerControl.js.map +1 -1
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/Header/HeaderChatBotButton.d.ts +0 -1
- package/mobile/lib/components/Header/HeaderChatBotButton.js +15 -4
- package/mobile/lib/components/Header/HeaderChatBotButton.js.map +1 -1
- package/mobile/lib/components/Header/HeaderSubMenu.js +1 -1
- package/mobile/lib/components/Header/HeaderSubMenu.js.map +1 -1
- package/mobile/lib/components/Header/HeaderTop.js +1 -1
- package/mobile/lib/components/Header/HeaderTop.js.map +1 -1
- package/mobile/lib/hooks/useAspects/aspects/forwardQuery.d.ts +1 -1
- package/mobile/lib/hooks/useAspects/aspects/forwardQuery.js +1 -1
- package/mobile/lib/hooks/useAspects/aspects/forwardQuery.js.map +1 -1
- package/mobile/lib/hooks/useAspects/handleAspects.d.ts +1 -1
- package/mobile/lib/hooks/useAspects/handleAspects.js +5 -2
- package/mobile/lib/hooks/useAspects/handleAspects.js.map +1 -1
- package/mobile/lib/hooks/useAspects/useAspects.d.ts +1 -1
- package/mobile/lib/retail/components/Fields/BeginDateField.js +1 -1
- package/mobile/lib/retail/components/Fields/BeginDateField.js.map +1 -1
- package/mobile/lib/retail/components/Fields/ParticipantDateRegistrationField.js +1 -1
- package/mobile/lib/retail/components/Fields/ParticipantDateRegistrationField.js.map +1 -1
- package/mobile/lib/retail/utils/renderStep.js +3 -1
- package/mobile/lib/retail/utils/renderStep.js.map +1 -1
- package/mobile/lib/retail/validator/validatorObj.js +3 -3
- package/mobile/lib/retail/validator/validatorObj.js.map +1 -1
- package/mobile/lib/retail/validator/validators.d.ts +1 -0
- package/mobile/lib/retail/validator/validators.js +1 -0
- package/mobile/lib/retail/validator/validators.js.map +1 -1
- package/mobile/lib/ui-kit/DatePicker/DatePickerControl.d.ts +1 -0
- package/mobile/lib/ui-kit/DatePicker/DatePickerControl.js.map +1 -1
- package/mobile/src/components/Header/HeaderChatBotButton.tsx +18 -12
- package/mobile/src/components/Header/HeaderSubMenu.tsx +0 -1
- package/mobile/src/components/Header/HeaderTop.tsx +1 -6
- package/mobile/src/hooks/useAspects/aspects/forwardQuery.ts +1 -1
- package/mobile/src/hooks/useAspects/handleAspects.ts +6 -2
- package/mobile/src/hooks/useAspects/useAspects.ts +1 -1
- package/mobile/src/retail/components/Fields/BeginDateField.tsx +1 -0
- package/mobile/src/retail/components/Fields/ParticipantDateRegistrationField.tsx +5 -1
- package/mobile/src/retail/utils/renderStep.tsx +3 -1
- package/mobile/src/retail/validator/validatorObj.ts +3 -2
- package/mobile/src/retail/validator/validators.ts +3 -0
- package/mobile/src/ui-kit/DatePicker/DatePickerControl.tsx +1 -0
- package/package.json +1 -1
- package/src/components/Header/HeaderChatBotButton.tsx +18 -12
- package/src/components/Header/HeaderSubMenu.tsx +0 -1
- package/src/components/Header/HeaderTop.tsx +1 -6
- package/src/hooks/useAspects/aspects/forwardQuery.ts +1 -1
- package/src/hooks/useAspects/handleAspects.ts +6 -2
- package/src/hooks/useAspects/useAspects.ts +1 -1
- package/src/retail/components/Fields/BeginDateField.tsx +1 -0
- package/src/retail/components/Fields/ParticipantDateRegistrationField.tsx +5 -1
- package/src/retail/utils/renderStep.tsx +3 -1
- package/src/retail/validator/validatorObj.ts +3 -2
- package/src/retail/validator/validators.ts +3 -0
- package/src/ui-kit/DatePicker/DatePickerControl.tsx +1 -0
- package/bundle/components/Header/useChatBot.d.ts +0 -5
- package/dist/components/Header/useChatBot.d.ts +0 -5
- package/dist/components/Header/useChatBot.js +0 -61
- package/dist/components/Header/useChatBot.js.map +0 -1
- package/lib/components/Header/useChatBot.d.ts +0 -5
- package/lib/components/Header/useChatBot.js +0 -58
- package/lib/components/Header/useChatBot.js.map +0 -1
- package/mobile/bundle/components/Header/useChatBot.d.ts +0 -5
- package/mobile/dist/components/Header/useChatBot.d.ts +0 -5
- package/mobile/dist/components/Header/useChatBot.js +0 -61
- package/mobile/dist/components/Header/useChatBot.js.map +0 -1
- package/mobile/lib/components/Header/useChatBot.d.ts +0 -5
- package/mobile/lib/components/Header/useChatBot.js +0 -58
- package/mobile/lib/components/Header/useChatBot.js.map +0 -1
- package/mobile/src/components/Header/useChatBot.ts +0 -86
- package/src/components/Header/useChatBot.ts +0 -86
|
@@ -1065,9 +1065,12 @@
|
|
|
1065
1065
|
: { secondaryPhoneNumber: formatPhone(secondaryPhone) };
|
|
1066
1066
|
};
|
|
1067
1067
|
|
|
1068
|
-
const handleAspects = ({ aspectsAttributes, aspects, ev }) => {
|
|
1068
|
+
const handleAspects = async ({ aspectsAttributes, aspects, ev }) => {
|
|
1069
1069
|
for (const { aspectName, params } of aspectsAttributes ?? []) {
|
|
1070
|
-
aspects[aspectName ?? '']
|
|
1070
|
+
const aspectFn = aspects[aspectName ?? ''];
|
|
1071
|
+
if (aspectFn) {
|
|
1072
|
+
await aspectFn(ev, params);
|
|
1073
|
+
}
|
|
1071
1074
|
}
|
|
1072
1075
|
};
|
|
1073
1076
|
|
|
@@ -1110,7 +1113,7 @@
|
|
|
1110
1113
|
return url.toString();
|
|
1111
1114
|
};
|
|
1112
1115
|
|
|
1113
|
-
const forwardQuery = (ev) => {
|
|
1116
|
+
const forwardQuery = async (ev) => {
|
|
1114
1117
|
const anchor = ev.target?.closest('a');
|
|
1115
1118
|
const navigator = locationNavigator();
|
|
1116
1119
|
if (isURL(anchor?.href) && !anchor?.href?.startsWith(navigator.origin)) {
|
|
@@ -2471,6 +2474,7 @@
|
|
|
2471
2474
|
return false;
|
|
2472
2475
|
})('Укажите дату выдачи паспорта');
|
|
2473
2476
|
const deliveryDateValidator = (errorMsg) => validator((_) => _?.getTime() >= new Date().getTime())(errorMsg);
|
|
2477
|
+
const notLaterDateValidator = (errorMsg) => validator((_) => _?.getTime() <= new Date().getTime())(errorMsg);
|
|
2474
2478
|
const numberValidator = (errorMsg) => validator((_) => typeof _ === 'string' && _.length === 6)(errorMsg);
|
|
2475
2479
|
const serieValidator = (errorMsg) => validator((_) => typeof _ === 'string' && _.length === 4)(errorMsg);
|
|
2476
2480
|
const snilsValidate = (snils) => {
|
|
@@ -2537,7 +2541,7 @@
|
|
|
2537
2541
|
lastJobExperience: jobNumberValidator('Укажите стаж на последнем месте работы'),
|
|
2538
2542
|
experience5Years: jobNumberValidator('Укажите общий стаж за последние 5 лет'),
|
|
2539
2543
|
jobsNumber: jobNumberValidator('Укажите количество мест работы за последние 5 лет'),
|
|
2540
|
-
beginDate:
|
|
2544
|
+
beginDate: notLaterDateValidator('Укажите дату заключения трудового договора'),
|
|
2541
2545
|
addressFact: addressDaDataValidator(),
|
|
2542
2546
|
addressRegistration: addressDaDataValidator(),
|
|
2543
2547
|
addressRetail: defaultSelectValidator('Выберите адрес банка'),
|
|
@@ -2564,7 +2568,7 @@
|
|
|
2564
2568
|
dulNumber: numberValidator('Укажите номер паспорта'),
|
|
2565
2569
|
dulSubdivisionCode: numberValidator('Укажите код подразделения'),
|
|
2566
2570
|
dulIssuedBy: defaultValidator('Укажите организацию, выдавшую паспорт'),
|
|
2567
|
-
participantDateRegistration:
|
|
2571
|
+
participantDateRegistration: notLaterDateValidator('Укажите дату регистрации'),
|
|
2568
2572
|
retirementIncome: defaultValidator(),
|
|
2569
2573
|
otherIncome: defaultValidator(),
|
|
2570
2574
|
wages: defaultValidator(),
|
|
@@ -3517,16 +3521,6 @@
|
|
|
3517
3521
|
});
|
|
3518
3522
|
}
|
|
3519
3523
|
};
|
|
3520
|
-
const initializeExternalStylesheet = (url = '') => {
|
|
3521
|
-
const link = globalThis.document.getElementById(url);
|
|
3522
|
-
if (!link) {
|
|
3523
|
-
const newLink = globalThis.document.createElement('link');
|
|
3524
|
-
newLink.href = url;
|
|
3525
|
-
newLink.id = url;
|
|
3526
|
-
newLink.rel = 'stylesheet';
|
|
3527
|
-
globalThis.document.head.appendChild(newLink);
|
|
3528
|
-
}
|
|
3529
|
-
};
|
|
3530
3524
|
function useExternalNS(namespaceName, url, unmountNS = true) {
|
|
3531
3525
|
const [externalNS, setExternalNS] = useState(undefined);
|
|
3532
3526
|
useEffect(() => {
|
|
@@ -3860,7 +3854,7 @@
|
|
|
3860
3854
|
|
|
3861
3855
|
const BankruptcyFlgField = JSX(({ field, input }) => (jsx(CheckboxWithError, { text: "\u0412 \u043E\u0442\u043D\u043E\u0448\u0435\u043D\u0438\u0438 \u043C\u0435\u043D\u044F \u0432\u0435\u0434\u0451\u0442\u0441\u044F \u043F\u0440\u043E\u0438\u0437\u0432\u043E\u0434\u0441\u0442\u0432\u043E \u043F\u043E \u0434\u0435\u043B\u0443 \u043E \u0431\u0430\u043D\u043A\u0440\u043E\u0442\u0441\u0442\u0432\u0435", ...field(input?.name ?? '') })));
|
|
3862
3856
|
|
|
3863
|
-
const BeginDateField = JSX(({ field, input }) => (jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u043D\u0430\u0447\u0430\u043B\u0430 \u0440\u0430\u0431\u043E\u0442\u044B \u043D\u0430 \u0442\u0435\u043A\u0443\u0449\u0435\u043C \u043C\u0435\u0441\u0442\u0435", ...field(input?.name ?? ''), ...input, disabled: isEsiaAuthorize(field, input) })));
|
|
3857
|
+
const BeginDateField = JSX(({ field, input }) => (jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u043D\u0430\u0447\u0430\u043B\u0430 \u0440\u0430\u0431\u043E\u0442\u044B \u043D\u0430 \u0442\u0435\u043A\u0443\u0449\u0435\u043C \u043C\u0435\u0441\u0442\u0435", ...field(input?.name ?? ''), ...input, disabled: isEsiaAuthorize(field, input), maxDate: new Date() })));
|
|
3864
3858
|
|
|
3865
3859
|
const BirthPlaceField = JSX(({ field, input }) => (jsx(DaDataInputControl, { label: "\u041C\u0435\u0441\u0442\u043E \u0440\u043E\u0436\u0434\u0435\u043D\u0438\u044F", ...field(input?.name ?? ''), ...input, disabled: isEsiaAuthorize(field, input) })));
|
|
3866
3860
|
|
|
@@ -4754,7 +4748,7 @@
|
|
|
4754
4748
|
|
|
4755
4749
|
const OtherIncomeField = JSX(({ field, input }) => (jsx(DaDataInputControl, { label: "\u0418\u043D\u044B\u0435 \u0434\u043E\u0445\u043E\u0434\u044B", placeholder: "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435", isInteger: true, ...field(input?.name ?? ''), ...input })));
|
|
4756
4750
|
|
|
4757
|
-
const ParticipantDateRegistrationField = JSX(({ field, input }) => (jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u043F\u043E \u043C\u0435\u0441\u0442\u0443 \u0436\u0438\u0442\u0435\u043B\u044C\u0441\u0442\u0432\u0430", ...field(input?.name ?? '') })));
|
|
4751
|
+
const ParticipantDateRegistrationField = JSX(({ field, input }) => (jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u043F\u043E \u043C\u0435\u0441\u0442\u0443 \u0436\u0438\u0442\u0435\u043B\u044C\u0441\u0442\u0432\u0430", ...field(input?.name ?? ''), maxDate: new Date() })));
|
|
4758
4752
|
|
|
4759
4753
|
const MAX_PART = 100;
|
|
4760
4754
|
const MIN_PART = 0;
|
|
@@ -7798,7 +7792,9 @@
|
|
|
7798
7792
|
const cleanElements = [
|
|
7799
7793
|
!checkCondition({ condition }, getValue(field)) ? renderTitle(title) : null,
|
|
7800
7794
|
...renderInputs({ field, inputs, params }),
|
|
7801
|
-
]
|
|
7795
|
+
]
|
|
7796
|
+
.filter(Boolean)
|
|
7797
|
+
.map((_, j) => ({ ..._, key: _.key ?? `elem-${j}` }));
|
|
7802
7798
|
return cleanElements.length ? (jsx("div", { className: style(inputColumnStyles(columns), 'grid gap-x-m'), children: cleanElements }, `section-${i}`)) : null;
|
|
7803
7799
|
});
|
|
7804
7800
|
const getValue = (field) => (name) => field(name)?.value;
|
|
@@ -9191,65 +9187,18 @@
|
|
|
9191
9187
|
});
|
|
9192
9188
|
const getDataTestIdAttribute = (dataTestId) => dataTestId ? { 'data-test-id': dataTestId } : null;
|
|
9193
9189
|
|
|
9194
|
-
const
|
|
9195
|
-
const
|
|
9196
|
-
|
|
9197
|
-
|
|
9198
|
-
|
|
9199
|
-
|
|
9200
|
-
|
|
9201
|
-
|
|
9202
|
-
|
|
9203
|
-
};
|
|
9204
|
-
const useChatBot = (chat) => {
|
|
9205
|
-
const [isLoading, setIsLoading] = useState(false);
|
|
9206
|
-
useEffect(() => globalThis.localStorage?.setItem(CHAT_STORAGE_NAME, String(Date.now())), []);
|
|
9207
|
-
const chatUrl = CHATBOT_URL[chat ?? ''];
|
|
9208
|
-
const load = useCallback((ev) => {
|
|
9209
|
-
if (!chatUrl) {
|
|
9210
|
-
return;
|
|
9211
|
-
}
|
|
9212
|
-
setIsLoading(true);
|
|
9213
|
-
if (chat === 'business') {
|
|
9214
|
-
renderBusinessChatBot(chatUrl).finally(() => setIsLoading(false));
|
|
9215
|
-
}
|
|
9216
|
-
else {
|
|
9217
|
-
renderPersonalChatBot(ev, chatUrl).finally(() => setIsLoading(false));
|
|
9190
|
+
const CHAT_BOT_ASPECT_NAME = 'openChatBot';
|
|
9191
|
+
const HeaderChatBotButton = JSX(({ iconVersion, className, ariaLabel = 'Чат', version, buttonSize = 'large' }) => {
|
|
9192
|
+
const [isLoading, { setTrue: startLoad, setFalse: endLoad }] = useBool(false);
|
|
9193
|
+
const aspects = useAspects();
|
|
9194
|
+
const handleClick = useCallback((ev) => {
|
|
9195
|
+
const openChatBot = aspects[CHAT_BOT_ASPECT_NAME];
|
|
9196
|
+
if (openChatBot) {
|
|
9197
|
+
startLoad();
|
|
9198
|
+
openChatBot(ev).finally(endLoad);
|
|
9218
9199
|
}
|
|
9219
|
-
}, [
|
|
9220
|
-
return {
|
|
9221
|
-
};
|
|
9222
|
-
const renderPersonalChatBot = async (ev, chatUrl) => {
|
|
9223
|
-
const target = ev.target;
|
|
9224
|
-
if (!target?.classList.contains(CHAT_BUTTON_EXTERNAL_NAME)) {
|
|
9225
|
-
target?.classList.add(CHAT_BUTTON_EXTERNAL_NAME);
|
|
9226
|
-
}
|
|
9227
|
-
const chatFrame = globalThis.document.getElementById(CHAT_FRAME_ID);
|
|
9228
|
-
if (!chatFrame) {
|
|
9229
|
-
await initializeExternalNS(CHAT_NAMESPACE, chatUrl);
|
|
9230
|
-
}
|
|
9231
|
-
};
|
|
9232
|
-
const renderBusinessChatBot = async (chatUrl) => {
|
|
9233
|
-
const businessChat = (await initializeExternalNS(CHAT_NAMESPACE, `${chatUrl}/bundle.js`, true));
|
|
9234
|
-
initializeExternalStylesheet(`${chatUrl}/bundle.css`);
|
|
9235
|
-
const chatFrame = globalThis.document.getElementById(CHAT_FRAME_ID);
|
|
9236
|
-
if (chatFrame) {
|
|
9237
|
-
businessChat?.chatOpen?.();
|
|
9238
|
-
}
|
|
9239
|
-
else {
|
|
9240
|
-
createChatFrame();
|
|
9241
|
-
businessChat?.render?.(CHAT_FRAME_ID, true, BUSINESS_CHAT_PREFIX, BUSINESS_CHAT_CLASSNAME);
|
|
9242
|
-
}
|
|
9243
|
-
};
|
|
9244
|
-
const createChatFrame = () => {
|
|
9245
|
-
const chatFrame = globalThis.document.createElement('div');
|
|
9246
|
-
chatFrame.id = CHAT_FRAME_ID;
|
|
9247
|
-
globalThis.document.body.appendChild(chatFrame);
|
|
9248
|
-
};
|
|
9249
|
-
|
|
9250
|
-
const HeaderChatBotButton = JSX(({ chat = 'personal', iconVersion, className, ariaLabel = 'Чат', version, buttonSize = 'large', }) => {
|
|
9251
|
-
const { load, isLoading } = useChatBot(chat);
|
|
9252
|
-
return (jsx(HeaderSecondaryMenuButton, { className: className, image: { icon: 'ChatBotIcon', iconVersion }, ariaLabel: ariaLabel, onClick: load, buttonSize: buttonSize, isGrayBg: true, version: version, isLoading: isLoading, dataTestId: "chat icon" }));
|
|
9200
|
+
}, []);
|
|
9201
|
+
return (jsx(HeaderSecondaryMenuButton, { className: className, image: { icon: 'ChatBotIcon', iconVersion }, ariaLabel: ariaLabel, onClick: handleClick, buttonSize: buttonSize, isGrayBg: true, version: version, isLoading: isLoading, disabled: isLoading, dataTestId: "chat icon" }));
|
|
9253
9202
|
});
|
|
9254
9203
|
|
|
9255
9204
|
const BUTTON_STYLE = {
|
|
@@ -9271,7 +9220,7 @@
|
|
|
9271
9220
|
const onClick = useCallback(() => {
|
|
9272
9221
|
router.back();
|
|
9273
9222
|
}, [router]);
|
|
9274
|
-
return (jsxs("div", { className: "flex items-center justify-between w-full", children: [alwaysShowLogo || isRootLocation ? (jsx("div", { children: jsx(Logo, { className: "my-2xs", bgColor: bgColor, logo: logoProps, data: dataHeader, showTitle: false }) })) : (renderBackButton(onClick, backwardButton)), jsxs("div", { className: "flex gap-lg items-center", children: [projectSettings.CHAT_BOT ? (jsx(HeaderChatBotButton, { version: version, iconVersion: iconVersion,
|
|
9223
|
+
return (jsxs("div", { className: "flex items-center justify-between w-full", children: [alwaysShowLogo || isRootLocation ? (jsx("div", { children: jsx(Logo, { className: "my-2xs", bgColor: bgColor, logo: logoProps, data: dataHeader, showTitle: false }) })) : (renderBackButton(onClick, backwardButton)), jsxs("div", { className: "flex gap-lg items-center", children: [projectSettings.CHAT_BOT ? (jsx(HeaderChatBotButton, { version: version, iconVersion: iconVersion, buttonSize: "medium" })) : null, jsx(InternetBankButton, { version: version, ...internetBankButton })] })] }));
|
|
9275
9224
|
});
|
|
9276
9225
|
const renderBackButton = (onClick, text) => text ? (jsxs("button", { className: "flex items-center text-l my-2xs", onClick: onClick, type: "button", "aria-label": "\u041A\u043D\u043E\u043F\u043A\u0430 \u043D\u0430\u0437\u0430\u0434", children: [jsx(Icon, { name: "ChevronLeftIcon", iconVersion: "black", width: "24", height: "24" }), text] })) : null;
|
|
9277
9226
|
|
|
@@ -10447,7 +10396,7 @@
|
|
|
10447
10396
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
10448
10397
|
});
|
|
10449
10398
|
|
|
10450
|
-
const packageVersion = "0.14.
|
|
10399
|
+
const packageVersion = "0.14.849";
|
|
10451
10400
|
|
|
10452
10401
|
exports.Blocks = Blocks;
|
|
10453
10402
|
exports.ContentPage = ContentPage;
|