@redneckz/wildless-cms-uni-blocks 0.14.287 → 0.14.289
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/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +137 -94
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/ApplicationFormCustom/ApplicationFormCustomContent.d.ts +11 -4
- package/bundle/components/ApplicationFormCustom/getFormatData.d.ts +2 -3
- package/bundle/components/ApplicationFormCustom/getInitialFormState.d.ts +4 -0
- package/bundle/components/ApplicationFormGrantSupport/ApplicationFormGrantSupportContent.d.ts +2 -0
- package/bundle/components/Header/HeaderSecondaryMenuButton.d.ts +2 -0
- package/bundle/components/Header/HeaderSubMenu.d.ts +2 -6
- package/bundle/data/SitemapData.d.ts +10 -4
- package/bundle/hooks/useAspects/handleAspects.d.ts +10 -0
- package/bundle/hooks/useForm.d.ts +4 -4
- package/bundle/model/AspectsProps.d.ts +1 -1
- package/bundle/model/LogoType.d.ts +4 -1
- package/bundle/ui-kit/LinkWrapper/LinkWrapper.d.ts +2 -0
- package/dist/components/ApplicationFormCustom/ApplicationFormCustom.js +13 -6
- package/dist/components/ApplicationFormCustom/ApplicationFormCustom.js.map +1 -1
- package/dist/components/ApplicationFormCustom/ApplicationFormCustomContent.d.ts +11 -4
- package/dist/components/ApplicationFormCustom/getFormatData.d.ts +2 -3
- package/dist/components/ApplicationFormCustom/getFormatData.js.map +1 -1
- package/dist/components/ApplicationFormCustom/getInitialFormState.d.ts +4 -0
- package/dist/components/ApplicationFormCustom/getInitialFormState.js.map +1 -1
- package/dist/components/ApplicationFormGrantSupport/ApplicationFormGrantSupport.js +2 -2
- package/dist/components/ApplicationFormGrantSupport/ApplicationFormGrantSupport.js.map +1 -1
- package/dist/components/ApplicationFormGrantSupport/ApplicationFormGrantSupportContent.d.ts +2 -0
- package/dist/components/Footer/Footer.mobile.js +1 -1
- package/dist/components/Footer/Footer.mobile.js.map +1 -1
- package/dist/components/Header/Header.js +1 -1
- package/dist/components/Header/Header.js.map +1 -1
- package/dist/components/Header/HeaderSecondaryMenu.js +22 -1
- package/dist/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/dist/components/Header/HeaderSecondaryMenuButton.d.ts +2 -0
- package/dist/components/Header/HeaderSecondaryMenuButton.js +3 -2
- package/dist/components/Header/HeaderSecondaryMenuButton.js.map +1 -1
- package/dist/components/Header/HeaderSubMenu.d.ts +2 -6
- package/dist/components/Header/HeaderSubMenu.js +1 -1
- package/dist/components/Header/HeaderSubMenu.js.map +1 -1
- package/dist/components/StickyBottomMenu/BurgerMenuDialog.js +9 -3
- package/dist/components/StickyBottomMenu/BurgerMenuDialog.js.map +1 -1
- package/dist/data/SitemapData.d.ts +10 -4
- package/dist/hooks/useAspects/applyAspects.js +2 -3
- package/dist/hooks/useAspects/applyAspects.js.map +1 -1
- package/dist/hooks/useAspects/handleAspects.d.ts +10 -0
- package/dist/hooks/useAspects/handleAspects.js +10 -0
- package/dist/hooks/useAspects/handleAspects.js.map +1 -0
- package/dist/hooks/useForm.d.ts +4 -4
- package/dist/hooks/useForm.js +4 -4
- package/dist/hooks/useForm.js.map +1 -1
- package/dist/model/AspectsProps.d.ts +1 -1
- package/dist/model/LogoType.d.ts +4 -1
- package/dist/ui-kit/HeaderItem/HeaderItem.js +3 -2
- package/dist/ui-kit/HeaderItem/HeaderItem.js.map +1 -1
- package/dist/ui-kit/InputRange/InputRange.js +2 -2
- package/dist/ui-kit/InputRange/InputRange.js.map +1 -1
- package/dist/ui-kit/InputRange/renderRangeWithTicks.js +2 -2
- package/dist/ui-kit/InputRange/renderRangeWithTicks.js.map +1 -1
- package/dist/ui-kit/LinkWrapper/LinkWrapper.d.ts +2 -0
- package/dist/ui-kit/LinkWrapper/LinkWrapper.js +3 -2
- package/dist/ui-kit/LinkWrapper/LinkWrapper.js.map +1 -1
- package/dist/ui-kit/LocationDialog/renderRegion.js +13 -1
- package/dist/ui-kit/LocationDialog/renderRegion.js.map +1 -1
- package/dist/ui-kit/Logo/Logo.js +2 -1
- package/dist/ui-kit/Logo/Logo.js.map +1 -1
- package/dist/ui-kit/PhoneInput/PhoneInput.js +1 -1
- package/dist/ui-kit/PhoneInput/PhoneInput.js.map +1 -1
- package/dist/ui-kit/TopItem/TopItem.js +3 -2
- package/dist/ui-kit/TopItem/TopItem.js.map +1 -1
- package/lib/components/ApplicationFormCustom/ApplicationFormCustom.js +14 -7
- package/lib/components/ApplicationFormCustom/ApplicationFormCustom.js.map +1 -1
- package/lib/components/ApplicationFormCustom/ApplicationFormCustomContent.d.ts +11 -4
- package/lib/components/ApplicationFormCustom/getFormatData.d.ts +2 -3
- package/lib/components/ApplicationFormCustom/getFormatData.js.map +1 -1
- package/lib/components/ApplicationFormCustom/getInitialFormState.d.ts +4 -0
- package/lib/components/ApplicationFormCustom/getInitialFormState.js.map +1 -1
- package/lib/components/ApplicationFormGrantSupport/ApplicationFormGrantSupport.js +2 -2
- package/lib/components/ApplicationFormGrantSupport/ApplicationFormGrantSupport.js.map +1 -1
- package/lib/components/ApplicationFormGrantSupport/ApplicationFormGrantSupportContent.d.ts +2 -0
- package/lib/components/Footer/Footer.mobile.js +1 -1
- package/lib/components/Footer/Footer.mobile.js.map +1 -1
- package/lib/components/Header/Header.js +1 -1
- package/lib/components/Header/Header.js.map +1 -1
- package/lib/components/Header/HeaderSecondaryMenu.js +22 -1
- package/lib/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/lib/components/Header/HeaderSecondaryMenuButton.d.ts +2 -0
- package/lib/components/Header/HeaderSecondaryMenuButton.js +3 -2
- package/lib/components/Header/HeaderSecondaryMenuButton.js.map +1 -1
- package/lib/components/Header/HeaderSubMenu.d.ts +2 -6
- package/lib/components/Header/HeaderSubMenu.js +1 -1
- package/lib/components/Header/HeaderSubMenu.js.map +1 -1
- package/lib/components/StickyBottomMenu/BurgerMenuDialog.js +9 -3
- package/lib/components/StickyBottomMenu/BurgerMenuDialog.js.map +1 -1
- package/lib/data/SitemapData.d.ts +10 -4
- package/lib/hooks/useAspects/applyAspects.js +2 -3
- package/lib/hooks/useAspects/applyAspects.js.map +1 -1
- package/lib/hooks/useAspects/handleAspects.d.ts +10 -0
- package/lib/hooks/useAspects/handleAspects.js +7 -0
- package/lib/hooks/useAspects/handleAspects.js.map +1 -0
- package/lib/hooks/useForm.d.ts +4 -4
- package/lib/hooks/useForm.js +4 -4
- package/lib/hooks/useForm.js.map +1 -1
- package/lib/model/AspectsProps.d.ts +1 -1
- package/lib/model/LogoType.d.ts +4 -1
- package/lib/ui-kit/HeaderItem/HeaderItem.js +3 -2
- package/lib/ui-kit/HeaderItem/HeaderItem.js.map +1 -1
- package/lib/ui-kit/InputRange/InputRange.js +2 -2
- package/lib/ui-kit/InputRange/InputRange.js.map +1 -1
- package/lib/ui-kit/InputRange/renderRangeWithTicks.js +2 -2
- package/lib/ui-kit/InputRange/renderRangeWithTicks.js.map +1 -1
- package/lib/ui-kit/LinkWrapper/LinkWrapper.d.ts +2 -0
- package/lib/ui-kit/LinkWrapper/LinkWrapper.js +3 -2
- package/lib/ui-kit/LinkWrapper/LinkWrapper.js.map +1 -1
- package/lib/ui-kit/LocationDialog/renderRegion.js +13 -1
- package/lib/ui-kit/LocationDialog/renderRegion.js.map +1 -1
- package/lib/ui-kit/Logo/Logo.js +2 -1
- package/lib/ui-kit/Logo/Logo.js.map +1 -1
- package/lib/ui-kit/PhoneInput/PhoneInput.js +1 -1
- package/lib/ui-kit/PhoneInput/PhoneInput.js.map +1 -1
- package/lib/ui-kit/TopItem/TopItem.js +3 -2
- package/lib/ui-kit/TopItem/TopItem.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +113 -87
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/ApplicationFormCustom/ApplicationFormCustomContent.d.ts +11 -4
- package/mobile/bundle/components/ApplicationFormCustom/getFormatData.d.ts +2 -3
- package/mobile/bundle/components/ApplicationFormCustom/getInitialFormState.d.ts +4 -0
- package/mobile/bundle/components/ApplicationFormGrantSupport/ApplicationFormGrantSupportContent.d.ts +2 -0
- package/mobile/bundle/components/Header/HeaderSecondaryMenuButton.d.ts +2 -0
- package/mobile/bundle/components/Header/HeaderSubMenu.d.ts +2 -6
- package/mobile/bundle/data/SitemapData.d.ts +10 -4
- package/mobile/bundle/hooks/useAspects/handleAspects.d.ts +10 -0
- package/mobile/bundle/hooks/useForm.d.ts +4 -4
- package/mobile/bundle/model/AspectsProps.d.ts +1 -1
- package/mobile/bundle/model/LogoType.d.ts +4 -1
- package/mobile/bundle/ui-kit/LinkWrapper/LinkWrapper.d.ts +2 -0
- package/mobile/dist/components/ApplicationFormCustom/ApplicationFormCustom.js +13 -6
- package/mobile/dist/components/ApplicationFormCustom/ApplicationFormCustom.js.map +1 -1
- package/mobile/dist/components/ApplicationFormCustom/ApplicationFormCustomContent.d.ts +11 -4
- package/mobile/dist/components/ApplicationFormCustom/getFormatData.d.ts +2 -3
- package/mobile/dist/components/ApplicationFormCustom/getFormatData.js.map +1 -1
- package/mobile/dist/components/ApplicationFormCustom/getInitialFormState.d.ts +4 -0
- package/mobile/dist/components/ApplicationFormCustom/getInitialFormState.js.map +1 -1
- package/mobile/dist/components/ApplicationFormGrantSupport/ApplicationFormGrantSupport.js +2 -2
- package/mobile/dist/components/ApplicationFormGrantSupport/ApplicationFormGrantSupport.js.map +1 -1
- package/mobile/dist/components/ApplicationFormGrantSupport/ApplicationFormGrantSupportContent.d.ts +2 -0
- package/mobile/dist/components/Footer/Footer.js +1 -1
- package/mobile/dist/components/Footer/Footer.js.map +1 -1
- package/mobile/dist/components/Header/HeaderSecondaryMenu.js +22 -1
- package/mobile/dist/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/mobile/dist/components/Header/HeaderSecondaryMenuButton.d.ts +2 -0
- package/mobile/dist/components/Header/HeaderSecondaryMenuButton.js +3 -2
- package/mobile/dist/components/Header/HeaderSecondaryMenuButton.js.map +1 -1
- package/mobile/dist/components/Header/HeaderSubMenu.d.ts +2 -6
- package/mobile/dist/components/Header/HeaderSubMenu.js +1 -1
- package/mobile/dist/components/Header/HeaderSubMenu.js.map +1 -1
- package/mobile/dist/components/StickyBottomMenu/BurgerMenuDialog.js +9 -3
- package/mobile/dist/components/StickyBottomMenu/BurgerMenuDialog.js.map +1 -1
- package/mobile/dist/data/SitemapData.d.ts +10 -4
- package/mobile/dist/hooks/useAspects/applyAspects.js +2 -3
- package/mobile/dist/hooks/useAspects/applyAspects.js.map +1 -1
- package/mobile/dist/hooks/useAspects/handleAspects.d.ts +10 -0
- package/mobile/dist/hooks/useAspects/handleAspects.js +10 -0
- package/mobile/dist/hooks/useAspects/handleAspects.js.map +1 -0
- package/mobile/dist/hooks/useForm.d.ts +4 -4
- package/mobile/dist/hooks/useForm.js +4 -4
- package/mobile/dist/hooks/useForm.js.map +1 -1
- package/mobile/dist/model/AspectsProps.d.ts +1 -1
- package/mobile/dist/model/LogoType.d.ts +4 -1
- package/mobile/dist/ui-kit/InputRange/InputRange.js +2 -2
- package/mobile/dist/ui-kit/InputRange/InputRange.js.map +1 -1
- package/mobile/dist/ui-kit/InputRange/renderRangeWithTicks.js +2 -2
- package/mobile/dist/ui-kit/InputRange/renderRangeWithTicks.js.map +1 -1
- package/mobile/dist/ui-kit/LinkWrapper/LinkWrapper.d.ts +2 -0
- package/mobile/dist/ui-kit/LinkWrapper/LinkWrapper.js +3 -2
- package/mobile/dist/ui-kit/LinkWrapper/LinkWrapper.js.map +1 -1
- package/mobile/dist/ui-kit/LocationDialog/renderRegion.js +13 -1
- package/mobile/dist/ui-kit/LocationDialog/renderRegion.js.map +1 -1
- package/mobile/dist/ui-kit/Logo/Logo.js +2 -1
- package/mobile/dist/ui-kit/Logo/Logo.js.map +1 -1
- package/mobile/dist/ui-kit/PhoneInput/PhoneInput.js +1 -1
- package/mobile/dist/ui-kit/PhoneInput/PhoneInput.js.map +1 -1
- package/mobile/dist/ui-kit/TopItem/TopItem.js +3 -2
- package/mobile/dist/ui-kit/TopItem/TopItem.js.map +1 -1
- package/mobile/lib/components/ApplicationFormCustom/ApplicationFormCustom.js +14 -7
- package/mobile/lib/components/ApplicationFormCustom/ApplicationFormCustom.js.map +1 -1
- package/mobile/lib/components/ApplicationFormCustom/ApplicationFormCustomContent.d.ts +11 -4
- package/mobile/lib/components/ApplicationFormCustom/getFormatData.d.ts +2 -3
- package/mobile/lib/components/ApplicationFormCustom/getFormatData.js.map +1 -1
- package/mobile/lib/components/ApplicationFormCustom/getInitialFormState.d.ts +4 -0
- package/mobile/lib/components/ApplicationFormCustom/getInitialFormState.js.map +1 -1
- package/mobile/lib/components/ApplicationFormGrantSupport/ApplicationFormGrantSupport.js +2 -2
- package/mobile/lib/components/ApplicationFormGrantSupport/ApplicationFormGrantSupport.js.map +1 -1
- package/mobile/lib/components/ApplicationFormGrantSupport/ApplicationFormGrantSupportContent.d.ts +2 -0
- package/mobile/lib/components/Footer/Footer.js +1 -1
- package/mobile/lib/components/Footer/Footer.js.map +1 -1
- package/mobile/lib/components/Header/HeaderSecondaryMenu.js +22 -1
- package/mobile/lib/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/mobile/lib/components/Header/HeaderSecondaryMenuButton.d.ts +2 -0
- package/mobile/lib/components/Header/HeaderSecondaryMenuButton.js +3 -2
- package/mobile/lib/components/Header/HeaderSecondaryMenuButton.js.map +1 -1
- package/mobile/lib/components/Header/HeaderSubMenu.d.ts +2 -6
- package/mobile/lib/components/Header/HeaderSubMenu.js +1 -1
- package/mobile/lib/components/Header/HeaderSubMenu.js.map +1 -1
- package/mobile/lib/components/StickyBottomMenu/BurgerMenuDialog.js +9 -3
- package/mobile/lib/components/StickyBottomMenu/BurgerMenuDialog.js.map +1 -1
- package/mobile/lib/data/SitemapData.d.ts +10 -4
- package/mobile/lib/hooks/useAspects/applyAspects.js +2 -3
- package/mobile/lib/hooks/useAspects/applyAspects.js.map +1 -1
- package/mobile/lib/hooks/useAspects/handleAspects.d.ts +10 -0
- package/mobile/lib/hooks/useAspects/handleAspects.js +7 -0
- package/mobile/lib/hooks/useAspects/handleAspects.js.map +1 -0
- package/mobile/lib/hooks/useForm.d.ts +4 -4
- package/mobile/lib/hooks/useForm.js +4 -4
- package/mobile/lib/hooks/useForm.js.map +1 -1
- package/mobile/lib/model/AspectsProps.d.ts +1 -1
- package/mobile/lib/model/LogoType.d.ts +4 -1
- package/mobile/lib/ui-kit/InputRange/InputRange.js +2 -2
- package/mobile/lib/ui-kit/InputRange/InputRange.js.map +1 -1
- package/mobile/lib/ui-kit/InputRange/renderRangeWithTicks.js +2 -2
- package/mobile/lib/ui-kit/InputRange/renderRangeWithTicks.js.map +1 -1
- package/mobile/lib/ui-kit/LinkWrapper/LinkWrapper.d.ts +2 -0
- package/mobile/lib/ui-kit/LinkWrapper/LinkWrapper.js +3 -2
- package/mobile/lib/ui-kit/LinkWrapper/LinkWrapper.js.map +1 -1
- package/mobile/lib/ui-kit/LocationDialog/renderRegion.js +13 -1
- package/mobile/lib/ui-kit/LocationDialog/renderRegion.js.map +1 -1
- package/mobile/lib/ui-kit/Logo/Logo.js +2 -1
- package/mobile/lib/ui-kit/Logo/Logo.js.map +1 -1
- package/mobile/lib/ui-kit/PhoneInput/PhoneInput.js +1 -1
- package/mobile/lib/ui-kit/PhoneInput/PhoneInput.js.map +1 -1
- package/mobile/lib/ui-kit/TopItem/TopItem.js +3 -2
- package/mobile/lib/ui-kit/TopItem/TopItem.js.map +1 -1
- package/mobile/src/components/ApplicationFormCustom/ApplicationFormCustom.example.json +0 -1
- package/mobile/src/components/ApplicationFormCustom/ApplicationFormCustom.tsx +31 -16
- package/mobile/src/components/ApplicationFormCustom/ApplicationFormCustomContent.ts +11 -4
- package/mobile/src/components/ApplicationFormCustom/getFormatData.tsx +6 -5
- package/mobile/src/components/ApplicationFormCustom/getInitialFormState.tsx +4 -0
- package/mobile/src/components/ApplicationFormGrantSupport/ApplicationFormGrantSupport.tsx +2 -1
- package/mobile/src/components/ApplicationFormGrantSupport/ApplicationFormGrantSupportContent.ts +2 -0
- package/mobile/src/components/Footer/Footer.tsx +1 -1
- package/mobile/src/components/Header/HeaderSecondaryMenu.tsx +26 -2
- package/mobile/src/components/Header/HeaderSecondaryMenuButton.tsx +6 -0
- package/mobile/src/components/Header/HeaderSubMenu.tsx +3 -6
- package/mobile/src/components/StickyBottomMenu/BurgerMenuDialog.tsx +18 -7
- package/mobile/src/data/SitemapData.ts +10 -3
- package/mobile/src/hooks/useAspects/applyAspects.ts +2 -4
- package/mobile/src/hooks/useAspects/handleAspects.ts +18 -0
- package/mobile/src/hooks/useForm.ts +12 -6
- package/mobile/src/model/AspectsProps.ts +1 -1
- package/mobile/src/model/LogoType.ts +2 -1
- package/mobile/src/ui-kit/InputRange/InputRange.tsx +2 -2
- package/mobile/src/ui-kit/InputRange/renderRangeWithTicks.tsx +2 -2
- package/mobile/src/ui-kit/LinkWrapper/LinkWrapper.tsx +6 -1
- package/mobile/src/ui-kit/LocationDialog/renderRegion.tsx +14 -0
- package/mobile/src/ui-kit/Logo/Logo.tsx +3 -0
- package/mobile/src/ui-kit/PhoneInput/PhoneInput.tsx +2 -2
- package/mobile/src/ui-kit/TopItem/TopItem.tsx +21 -16
- package/package.json +1 -1
- package/src/components/ApplicationFormCustom/ApplicationFormCustom.example.json +0 -1
- package/src/components/ApplicationFormCustom/ApplicationFormCustom.tsx +31 -16
- package/src/components/ApplicationFormCustom/ApplicationFormCustomContent.ts +11 -4
- package/src/components/ApplicationFormCustom/getFormatData.tsx +6 -5
- package/src/components/ApplicationFormCustom/getInitialFormState.tsx +4 -0
- package/src/components/ApplicationFormGrantSupport/ApplicationFormGrantSupport.fixture.tsx +8 -0
- package/src/components/ApplicationFormGrantSupport/ApplicationFormGrantSupport.tsx +2 -1
- package/src/components/ApplicationFormGrantSupport/ApplicationFormGrantSupportContent.ts +2 -0
- package/src/components/Footer/Footer.mobile.tsx +1 -1
- package/src/components/Header/Header.tsx +1 -1
- package/src/components/Header/HeaderSecondaryMenu.tsx +26 -2
- package/src/components/Header/HeaderSecondaryMenuButton.tsx +6 -0
- package/src/components/Header/HeaderSubMenu.tsx +3 -6
- package/src/components/StickyBottomMenu/BurgerMenuDialog.tsx +18 -7
- package/src/data/SitemapData.ts +10 -3
- package/src/hooks/useAspects/applyAspects.ts +2 -4
- package/src/hooks/useAspects/handleAspects.ts +18 -0
- package/src/hooks/useForm.ts +12 -6
- package/src/model/AspectsProps.ts +1 -1
- package/src/model/LogoType.ts +2 -1
- package/src/ui-kit/HeaderItem/HeaderItem.tsx +4 -1
- package/src/ui-kit/InputRange/InputRange.tsx +2 -2
- package/src/ui-kit/InputRange/renderRangeWithTicks.tsx +2 -2
- package/src/ui-kit/LinkWrapper/LinkWrapper.tsx +6 -1
- package/src/ui-kit/LocationDialog/renderRegion.tsx +14 -0
- package/src/ui-kit/Logo/Logo.tsx +3 -0
- package/src/ui-kit/PhoneInput/PhoneInput.tsx +2 -2
- package/src/ui-kit/TopItem/TopItem.tsx +21 -16
package/bundle/bundle.umd.js
CHANGED
|
@@ -881,9 +881,76 @@
|
|
|
881
881
|
: { secondaryPhoneNumber: formatPhone(secondaryPhone) };
|
|
882
882
|
};
|
|
883
883
|
|
|
884
|
+
const handleAspects = ({ aspectsAttributes, aspects, ev, formData }) => {
|
|
885
|
+
for (const { aspectName, params } of aspectsAttributes) {
|
|
886
|
+
const paramsData = aspectName === 'mindboxEvent' ? { ...params, eventJson: JSON.stringify(formData) } : params;
|
|
887
|
+
aspects[aspectName ?? '']?.(ev, paramsData);
|
|
888
|
+
}
|
|
889
|
+
};
|
|
890
|
+
|
|
891
|
+
const QUERY_STORAGE_KEY = 'rshb-query-params';
|
|
892
|
+
function saveSessionQuery() {
|
|
893
|
+
const result = globalThis.location?.search || globalThis.sessionStorage?.getItem(QUERY_STORAGE_KEY) || '';
|
|
894
|
+
if (result) {
|
|
895
|
+
globalThis.sessionStorage?.setItem(QUERY_STORAGE_KEY, result);
|
|
896
|
+
}
|
|
897
|
+
return result;
|
|
898
|
+
}
|
|
899
|
+
|
|
900
|
+
const adjustSessionQuery = (href) => {
|
|
901
|
+
const sessionQuery = saveSessionQuery();
|
|
902
|
+
if (!isURL(href) || !sessionQuery) {
|
|
903
|
+
return href;
|
|
904
|
+
}
|
|
905
|
+
const url = new URL(href);
|
|
906
|
+
for (const [key, value] of new URLSearchParams(sessionQuery)) {
|
|
907
|
+
url.searchParams.set(key, value);
|
|
908
|
+
}
|
|
909
|
+
return url.toString();
|
|
910
|
+
};
|
|
911
|
+
|
|
912
|
+
const tableFunc = (table) => (input) => {
|
|
913
|
+
const [, output] = table.find(([predicate]) => predicate(input)) || [];
|
|
914
|
+
return output;
|
|
915
|
+
};
|
|
916
|
+
|
|
917
|
+
const forwardQuery = (ev) => {
|
|
918
|
+
const anchor = ev.target?.closest('a');
|
|
919
|
+
if (isURL(anchor?.href) && !anchor?.href?.startsWith(globalThis.location?.origin)) {
|
|
920
|
+
ev.preventDefault();
|
|
921
|
+
ev.stopPropagation();
|
|
922
|
+
const url = adjustSessionQuery(anchor?.href) || anchor?.href;
|
|
923
|
+
if (url) {
|
|
924
|
+
const transition = getTransition(anchor?.target);
|
|
925
|
+
transition?.(url);
|
|
926
|
+
}
|
|
927
|
+
}
|
|
928
|
+
};
|
|
929
|
+
const getTransition = tableFunc([
|
|
930
|
+
[(_) => _ === '_blank', (url) => globalThis.open(url, '_blank')],
|
|
931
|
+
[(_) => _ === '_parent', (url) => globalThis.parent && (globalThis.parent.location.href = url)],
|
|
932
|
+
[
|
|
933
|
+
(_) => _ === '_top',
|
|
934
|
+
(url) => {
|
|
935
|
+
globalThis.top && (globalThis.top.location.href = url);
|
|
936
|
+
},
|
|
937
|
+
],
|
|
938
|
+
[() => true, (url) => globalThis.location && (globalThis.location.href = url)],
|
|
939
|
+
]);
|
|
940
|
+
|
|
941
|
+
function useAspects() {
|
|
942
|
+
return useAspects._impl();
|
|
943
|
+
}
|
|
944
|
+
useAspects._impl = () => ({
|
|
945
|
+
forwardQuery,
|
|
946
|
+
});
|
|
947
|
+
useAspects.setup = (impl) => {
|
|
948
|
+
useAspects._impl = impl;
|
|
949
|
+
};
|
|
950
|
+
|
|
884
951
|
const identity = (_) => _;
|
|
885
952
|
|
|
886
|
-
const useForm = (initialState, { resetOnSubmit, onSubmit } = {}) => {
|
|
953
|
+
const useForm = (initialState, { resetOnSubmit, onSubmit, } = {}) => {
|
|
887
954
|
const [formState, setFormState] = useState(initialState);
|
|
888
955
|
const [isDirtyForm, setDirtyForm] = useState(false);
|
|
889
956
|
const [dirtyFieldsMap, setDirtyFieldsMap] = useState({});
|
|
@@ -912,10 +979,10 @@
|
|
|
912
979
|
setDirtyForm(false);
|
|
913
980
|
setDirtyFieldsMap({});
|
|
914
981
|
}, [initialState]);
|
|
915
|
-
const handleSubmit = useCallback((
|
|
916
|
-
|
|
982
|
+
const handleSubmit = useCallback((ev) => {
|
|
983
|
+
ev.preventDefault();
|
|
917
984
|
resetOnSubmit ? reset() : setDirtyForm(true);
|
|
918
|
-
onSubmit && onSubmit(formState);
|
|
985
|
+
onSubmit && onSubmit(formState, ev);
|
|
919
986
|
}, [onSubmit, formState]);
|
|
920
987
|
return [
|
|
921
988
|
formState,
|
|
@@ -1283,7 +1350,7 @@
|
|
|
1283
1350
|
const handleBlur = useCallback((v) => {
|
|
1284
1351
|
v === '+7 (' ? onChange && onChange('') : null;
|
|
1285
1352
|
}, []);
|
|
1286
|
-
return (jsx(Input, { ...inputProps, onChange: handleChange, onFocus: (
|
|
1353
|
+
return (jsx(Input, { ...inputProps, onChange: handleChange, onFocus: (ev) => handleChange(ev?.target?.value || ''), onBlur: (ev) => handleBlur(ev?.target?.value || ''), children: children }));
|
|
1287
1354
|
});
|
|
1288
1355
|
|
|
1289
1356
|
const InputPhoneControl = JSX(({ className, label, value, error, onChange, onBlur, ...rest }) => (jsxs("div", { className: style('shrink-0 w-full', className), children: [jsx(PhoneInput, { "aria-label": label, label: rest?.errors ? `${label}*` : label, valid: Boolean(!error), value: value, onChange: onChange, onBlur: onBlur, placeholder: "+7 (___) ___-__-__" }), renderErrorText(error)] })));
|
|
@@ -1500,8 +1567,8 @@
|
|
|
1500
1567
|
const inputStyle = {
|
|
1501
1568
|
backgroundSize: `${percentage.toFixed(2)}% 100%`,
|
|
1502
1569
|
};
|
|
1503
|
-
return (jsxs("div", { children: [list.length ? (jsx("div", { className: "absolute w-full flex justify-between -bottom-[3px] px-m", children: list.map((_, i) => (jsx("div", { className: style('w-2 h-2 rounded-full', rangeValue <= i || disabled ? 'bg-gray' : 'bg-primary-main') }, String(i)))) })) : null, jsx("div", { className: "absolute inset-x-0 -bottom-1 px-m leading-[18px]", children: jsx("input", { className: "box-border w-full m-0 cursor-pointer slider relative z-10", style: inputStyle, type: "range", min: min, max: max, step: step, value: rangeValue, disabled: disabled, onInput: ((
|
|
1504
|
-
const rawValue = parseDecimal(
|
|
1570
|
+
return (jsxs("div", { children: [list.length ? (jsx("div", { className: "absolute w-full flex justify-between -bottom-[3px] px-m", children: list.map((_, i) => (jsx("div", { className: style('w-2 h-2 rounded-full', rangeValue <= i || disabled ? 'bg-gray' : 'bg-primary-main') }, String(i)))) })) : null, jsx("div", { className: "absolute inset-x-0 -bottom-1 px-m leading-[18px]", children: jsx("input", { className: "box-border w-full m-0 cursor-pointer slider relative z-10", style: inputStyle, type: "range", min: min, max: max, step: step, value: rangeValue, disabled: disabled, onInput: ((ev) => {
|
|
1571
|
+
const rawValue = parseDecimal(ev.target?.value);
|
|
1505
1572
|
const newValue = list.length ? list[rawValue] : rawValue;
|
|
1506
1573
|
onChange && onChange(newValue || 0);
|
|
1507
1574
|
}) }) })] }));
|
|
@@ -1516,8 +1583,8 @@
|
|
|
1516
1583
|
normalize: (_ = 0) => list.length ? closestValue(list)(_) : clamp(_, min, max),
|
|
1517
1584
|
format: toLocalNumberFormat(),
|
|
1518
1585
|
});
|
|
1519
|
-
const handleChange = useCallback((
|
|
1520
|
-
onChange && onChange(parseDecimal(
|
|
1586
|
+
const handleChange = useCallback((ev) => {
|
|
1587
|
+
onChange && onChange(parseDecimal(ev.target?.value));
|
|
1521
1588
|
}, [onChange]);
|
|
1522
1589
|
return (jsxs("div", { className: className, children: [jsxs("label", { className: "block relative", children: [title ? (jsx(Text, { size: "text-m", font: "font-light", color: "text-primary-text", children: title })) : null, jsx("input", { className: style('mt-xs font-sans text-h3 w-full h-14', 'border border-solid border-gray rounded-md outline-none', 'pl-m box-border', 'text-primary-text hover:border-primary-hover focus:border-primary-text', DISABLED_INPUT_CLASSES), disabled: disabled, onInput: handleChange, ...normalizedProps }), renderRangeWithTicks({ list, min, max, step, disabled, value, onChange })] }), renderRangeCaption(items)] }));
|
|
1523
1590
|
});
|
|
@@ -1784,19 +1851,23 @@
|
|
|
1784
1851
|
const renderContacts = () => (jsxs("div", { className: "space-y-m", children: [jsx(Heading, { headingType: "h6", title: "\u0418\u043B\u0438 \u0441\u0432\u044F\u0436\u0438\u0442\u0435\u0441\u044C \u0441 \u043D\u0430\u043C\u0438 \u0443\u0434\u043E\u0431\u043D\u044B\u043C \u0441\u043F\u043E\u0441\u043E\u0431\u043E\u043C", className: "@xl:text-center" }), jsxs("div", { className: "flex gap-xl", children: [jsxs("a", { className: "flex gap-s items-center text-primary-text no-underline", href: `tel:8 (800) 200-78-70`, "aria-label": "8 (800) 200-78-70", children: [jsx(Img, { image: { icon: 'PhoneIcon' }, width: "24", height: "24" }), jsx("span", { children: "8 (800) 200-78-70" })] }), jsxs("a", { className: "flex gap-s items-center text-primary-text no-underline", "aria-label": "ved@rshb.ru", href: `mailto:ved@rshb.ru`, children: [jsx(Img, { image: { icon: 'MailIcon' }, width: "24", height: "24" }), jsx("span", { children: "ved@rshb.ru" })] })] })] }));
|
|
1785
1852
|
|
|
1786
1853
|
const API = LeadServiceAPI();
|
|
1787
|
-
const ApplicationFormCustom = JSX(({ className, title, typeForm = '', sections = [], button, link, endpoint, additionalParams, isContacts, ...rest }) => {
|
|
1854
|
+
const ApplicationFormCustom = JSX(({ className, title, typeForm = '', sections = [], button, link, endpoint, additionalParams, isContacts, data, ...rest }) => {
|
|
1788
1855
|
const inputs = (sections?.flatMap((_) => _?.inputs) || []);
|
|
1789
1856
|
const initialFormState = getInitialFormState(inputs, typeForm);
|
|
1790
1857
|
const [responseType, setResponseType] = useState('');
|
|
1791
|
-
const handleSubmit = useCallback(async (
|
|
1792
|
-
const inputsFiltered = getFilteredInputs(inputs,
|
|
1858
|
+
const handleSubmit = useCallback(async (formData, ev) => {
|
|
1859
|
+
const inputsFiltered = getFilteredInputs(inputs, formData);
|
|
1793
1860
|
const feedbackValidator = objectValidator(getObjectValidator(inputsFiltered));
|
|
1794
|
-
if (!isValidationSuccess(feedbackValidator(
|
|
1861
|
+
if (!isValidationSuccess(feedbackValidator(formData))) {
|
|
1795
1862
|
return 'Fail';
|
|
1796
1863
|
}
|
|
1797
|
-
const formatData = getFormatData({ ...
|
|
1864
|
+
const formatData = getFormatData({ ...formData, ...additionalParams });
|
|
1798
1865
|
const status = (await API.send(formatData, endpoint === 'lead')) ? 'OK' : 'Fail';
|
|
1799
1866
|
setResponseType(status);
|
|
1867
|
+
if (status === 'OK' && data) {
|
|
1868
|
+
const aspects = useAspects();
|
|
1869
|
+
handleAspects({ aspectsAttributes: data, aspects, ev, formData: formatData });
|
|
1870
|
+
}
|
|
1800
1871
|
return status;
|
|
1801
1872
|
}, []);
|
|
1802
1873
|
const [, { field, onSubmit, reset }] = useForm(initialFormState, { onSubmit: handleSubmit });
|
|
@@ -1806,8 +1877,9 @@
|
|
|
1806
1877
|
reset();
|
|
1807
1878
|
}
|
|
1808
1879
|
}, [responseType]);
|
|
1809
|
-
return (jsxs(ApplicationFormLayout, { className: style('container space-y-m', className), title: title, responseType: responseType, ...rest, children: [jsxs("form", { onSubmit: onSubmit, children: [sections.map((_, i) => (jsxs("div", { className: style(inputColumnStyles(_.columns), 'grid gap-x-m'), children: [
|
|
1880
|
+
return (jsxs(ApplicationFormLayout, { className: style('container space-y-m', className), title: title, responseType: responseType, ...rest, children: [jsxs("form", { onSubmit: onSubmit, children: [sections.map((_, i) => (jsxs("div", { className: style(inputColumnStyles(_.columns), 'grid gap-x-m'), children: [renderTitle(_.title), (_?.inputs || [])?.map(getField(field, typeForm))] }, `section-${i}`))), renderAgreementSubmit(fieldName ? field('consentDataProcessing') : undefined, link, button)] }), isContacts ? renderContacts() : null] }));
|
|
1810
1881
|
});
|
|
1882
|
+
const renderTitle = (title) => title ? (jsx("div", { className: "@xl:text-center @xl:col-span-2 mb-m", children: jsx(Text, { size: "text-h6", children: title }) })) : null;
|
|
1811
1883
|
const inputColumnStyles = (column) => column === 2 ? '@xl:grid-cols-2' : '';
|
|
1812
1884
|
const getConsentDataProcessing = (inputs) => inputs?.find((_) => _?.name === 'consentDataProcessing');
|
|
1813
1885
|
const getFilteredInputs = (inputs, data) => inputs
|
|
@@ -1820,7 +1892,7 @@
|
|
|
1820
1892
|
: _ === (dataValue?.key ?? dataValue);
|
|
1821
1893
|
}));
|
|
1822
1894
|
|
|
1823
|
-
const ApplicationFormGrantSupport = UniBlock(({ className, title, button, regionSource, ...rest }) => {
|
|
1895
|
+
const ApplicationFormGrantSupport = UniBlock(({ className, title, button, regionSource, data, ...rest }) => {
|
|
1824
1896
|
const [region, setRegion] = useState({ key: '' });
|
|
1825
1897
|
const regions = regionSource?.regions ?? [];
|
|
1826
1898
|
const buttonStyle = getRegularButtonClasses({
|
|
@@ -1829,7 +1901,7 @@
|
|
|
1829
1901
|
});
|
|
1830
1902
|
const regionHref = regions?.find((_) => _.name === region.key)?.href;
|
|
1831
1903
|
const buttonText = button?.text ? button.text : 'Перейти';
|
|
1832
|
-
return (jsx(BlockWrapper, { className: className, defaultPadding: "p-6xl", ...rest, children: jsxs("div", { className: "container max-w-[978px] space-y-m", children: [title ? jsx(Heading, { headingType: "h3", title: title, className: "@xl:text-center" }) : null, regions ? (jsx(SelectControl, { label: "\u0412\u0430\u0448 \u0440\u0435\u0433\u0438\u043E\u043D", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0440\u0435\u0433\u0438\u043E\u043D", isSearch: true, options: regions.map(({ name = '' }) => ({ key: name, text: name })), value: region, onChange: setRegion })) : null, regionHref ? (jsx("div", { className: "text-center", children: jsx(LinkButton, { href: regionHref, target: "_blank", className: style('p-m w-full @xl:w-auto', buttonStyle), children: buttonText }) })) : null] }) }));
|
|
1904
|
+
return (jsx(BlockWrapper, { className: className, defaultPadding: "p-6xl", ...rest, children: jsxs("div", { className: "container max-w-[978px] space-y-m", children: [title ? jsx(Heading, { headingType: "h3", title: title, className: "@xl:text-center" }) : null, regions ? (jsx(SelectControl, { label: "\u0412\u0430\u0448 \u0440\u0435\u0433\u0438\u043E\u043D", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0440\u0435\u0433\u0438\u043E\u043D", isSearch: true, options: regions.map(({ name = '' }) => ({ key: name, text: name })), value: region, onChange: setRegion })) : null, regionHref ? (jsx("div", { className: "text-center", children: jsx(LinkButton, { href: regionHref, target: "_blank", className: style('p-m w-full @xl:w-auto', buttonStyle), data: data, children: buttonText }) })) : null] }) }));
|
|
1833
1905
|
});
|
|
1834
1906
|
|
|
1835
1907
|
const joinList = (sep) => (list) => list.reduce((acc, el, i) => (acc.length ? acc.concat({ ...sep, key: `sep-${i}` }, el) : [el]), []);
|
|
@@ -3202,11 +3274,11 @@
|
|
|
3202
3274
|
.map((link, index) => (jsx(CarouselLinkButton, { ...link }, String(index)))) }, String(groupIndex)))) }));
|
|
3203
3275
|
};
|
|
3204
3276
|
|
|
3205
|
-
const LinkWrapper = JSX(({ className = '', href, target, isRemote = false, onClick, children }) => {
|
|
3277
|
+
const LinkWrapper = JSX(({ className = '', href, target, isRemote = false, onClick, data, children }) => {
|
|
3206
3278
|
const link = useLink({ isRemote });
|
|
3207
3279
|
const linkProps = link({ href, target, onClick });
|
|
3208
3280
|
const Tag = href ? 'a' : 'div';
|
|
3209
|
-
return (jsx(Tag, { className: style('block', className), ...(href ? linkProps : {}), role: href ? 'link' : 'none', children: children }));
|
|
3281
|
+
return (jsx(Tag, { className: style('block', className), ...(href ? linkProps : {}), role: href ? 'link' : 'none', ...getAspectsAttributes(data), children: children }));
|
|
3210
3282
|
});
|
|
3211
3283
|
|
|
3212
3284
|
const ICONS_MAP = [
|
|
@@ -3697,11 +3769,6 @@
|
|
|
3697
3769
|
};
|
|
3698
3770
|
const formatValue = (value) => value.replace(/[^\d.,]/g, '').replace(',', '.');
|
|
3699
3771
|
|
|
3700
|
-
const tableFunc = (table) => (input) => {
|
|
3701
|
-
const [, output] = table.find(([predicate]) => predicate(input)) || [];
|
|
3702
|
-
return output;
|
|
3703
|
-
};
|
|
3704
|
-
|
|
3705
3772
|
const callbackCurrencySelect = (props) => tableFunc([
|
|
3706
3773
|
[
|
|
3707
3774
|
(_) => _.value !== Currency.RUB && _.oppositeValue !== Currency.RUB,
|
|
@@ -3835,7 +3902,7 @@
|
|
|
3835
3902
|
'bg-white': 'text-primary-text',
|
|
3836
3903
|
transparent: 'text-white',
|
|
3837
3904
|
};
|
|
3838
|
-
const Logo = JSX(({ className, href = '/', logo, children, targetBlank, bgColor = 'bg-white', showTitle = true, }) => (jsxs("a", { className: style('inline-flex items-center font-sans no-underline', className), href: href, target: targetBlank ? '_blank' : '_self', "aria-label": logo?.title ?? 'Россельхозбанк', children: [renderImage(bgColor, logo?.image, ICON_SIZE), showTitle
|
|
3905
|
+
const Logo = JSX(({ className, href = '/', logo, children, targetBlank, bgColor = 'bg-white', showTitle = true, }) => (jsxs("a", { className: style('inline-flex items-center font-sans no-underline', className), href: href, target: targetBlank ? '_blank' : '_self', "aria-label": logo?.title ?? 'Россельхозбанк', ...getAspectsAttributes(logo?.data), children: [renderImage(bgColor, logo?.image, ICON_SIZE), showTitle
|
|
3839
3906
|
? children ?? (jsx("div", { className: "ml-s", children: jsx(Text, { font: "font-medium", color: TEXT_COLOR[bgColor], size: logoTitleSizeStyle, children: logo?.title ?? 'Россельхозбанк' }) }))
|
|
3840
3907
|
: null] })));
|
|
3841
3908
|
|
|
@@ -4134,10 +4201,10 @@
|
|
|
4134
4201
|
return [activeIndex, items[activeIndex]];
|
|
4135
4202
|
}
|
|
4136
4203
|
|
|
4137
|
-
const TopItem = JSX(({ className = '', active, flat, children, ...rest }) => {
|
|
4204
|
+
const TopItem = JSX(({ className = '', active, flat, children, data, ...rest }) => {
|
|
4138
4205
|
const link = useLink({ isRemote: true });
|
|
4139
4206
|
const { href, target, text, onClick } = link(rest);
|
|
4140
|
-
return (jsx("a", { className: style(getLinkStyle(active, flat), className), href: href, target: target, onClick: onClick, rel: "noopener noreferrer", "aria-label": text, children: jsx("span", { className: getTextStyle$1(active, flat), children: text || children }) }));
|
|
4207
|
+
return (jsx("a", { className: style(getLinkStyle(active, flat), className), href: href, target: target, onClick: onClick, rel: "noopener noreferrer", "aria-label": text, ...getAspectsAttributes(data), children: jsx("span", { className: getTextStyle$1(active, flat), children: text || children }) }));
|
|
4141
4208
|
});
|
|
4142
4209
|
const getLinkStyle = (active = false, flat = false) => style('inline-block border border-solid bg-transparent text-center no-underline', active
|
|
4143
4210
|
? 'rounded-md border-primary-main group-data-transparent:border-white'
|
|
@@ -4163,9 +4230,21 @@
|
|
|
4163
4230
|
return (jsxs("div", { className: "flex gap-s items-center", children: [icon ? jsx(Img, { pathPrefix: "/wcms-resources/", image: icon }) : null, text ? (jsx("a", { className: "hover:text-primary-hover", href: href, target: target, onClick: onClick, children: jsx(Text, { size: "text-l", font: "font-light", color: "text-primary-text", children: text }) })) : null] }));
|
|
4164
4231
|
});
|
|
4165
4232
|
|
|
4233
|
+
const MINDBOX_ASPECT$1 = 'mindboxEvent';
|
|
4234
|
+
const MINDBOX_CATEGORY$1 = 'header';
|
|
4235
|
+
const MINDBOX_EVENT_REGION_NEW_CLICK = 'headerRegionNewSelect';
|
|
4166
4236
|
const renderRegion = (onChangeLocation) => (region) => region.name ? (jsx(LinkWrapper, { isRemote: true, href: `/branches/${region.slug}`, className: "mb-xs sm:mb-2xs hover:text-primary-hover", onClick: () => {
|
|
4167
4237
|
onChangeLocation && onChangeLocation(region);
|
|
4168
|
-
},
|
|
4238
|
+
}, data: [
|
|
4239
|
+
{
|
|
4240
|
+
aspectName: MINDBOX_ASPECT$1,
|
|
4241
|
+
params: {
|
|
4242
|
+
eventAction: MINDBOX_EVENT_REGION_NEW_CLICK,
|
|
4243
|
+
eventCategory: MINDBOX_CATEGORY$1,
|
|
4244
|
+
eventValueText: region.name,
|
|
4245
|
+
},
|
|
4246
|
+
},
|
|
4247
|
+
], children: jsx(Text, { size: "text-l", font: "font-light", children: region.name }) }, String(region.id))) : null;
|
|
4169
4248
|
|
|
4170
4249
|
const renderRegionGroup = (onChangeLocation) => ([letter, regions]) => (jsxs("div", { className: "break-inside-avoid mb-2xl w-56", children: [jsx("div", { className: "mb-s", children: jsx(Text, { size: "text-h6", children: letter }) }), regions.map(renderRegion(onChangeLocation))] }, letter));
|
|
4171
4250
|
|
|
@@ -4209,16 +4288,37 @@
|
|
|
4209
4288
|
default: 'w-6 h-6',
|
|
4210
4289
|
large: 'w-12 h-12',
|
|
4211
4290
|
};
|
|
4212
|
-
const HeaderSecondaryMenuButton = JSX(({ className, isRounded, buttonSize = 'default', isGrayBg = false, disabled, ariaLabel, image, onClick, }) => (jsx("button", { className: style('group/btn border-0 flex shrink-0 items-center', isGrayBg ? 'p-s rounded-full' : 'p-0 bg-inherit', isGrayBg && !isRounded ? 'bg-main-divider' : '', isRounded
|
|
4291
|
+
const HeaderSecondaryMenuButton = JSX(({ className, isRounded, buttonSize = 'default', isGrayBg = false, disabled, ariaLabel, image, data, onClick, }) => (jsx("button", { className: style('group/btn border-0 flex shrink-0 items-center', isGrayBg ? 'p-s rounded-full' : 'p-0 bg-inherit', isGrayBg && !isRounded ? 'bg-main-divider' : '', isRounded
|
|
4213
4292
|
? 'w-8 h-8 text-secondary-light hover:text-secondary-hove'
|
|
4214
|
-
: `${BUTTON_SIZE_STYLE[buttonSize]} text-primary-text hover:text-primary-main`, 'group-data-transparent:text-white', className), type: "button", disabled: disabled, "aria-label": ariaLabel, onClick: onClick, children: jsx(Img, { image: image, className: style('h-full', isRounded ? 'bg-main-divider/20 rounded-full' : ''), imageClassName: "group-hover/btn:text-primary-hover group-hover/btn:invert-0" }) })));
|
|
4293
|
+
: `${BUTTON_SIZE_STYLE[buttonSize]} text-primary-text hover:text-primary-main`, 'group-data-transparent:text-white', className), type: "button", disabled: disabled, "aria-label": ariaLabel, onClick: onClick, ...getAspectsAttributes(data), children: jsx(Img, { image: image, className: style('h-full', isRounded ? 'bg-main-divider/20 rounded-full' : ''), imageClassName: "group-hover/btn:text-primary-hover group-hover/btn:invert-0" }) })));
|
|
4215
4294
|
|
|
4295
|
+
const MINDBOX_ASPECT = 'mindboxEvent';
|
|
4296
|
+
const MINDBOX_CATEGORY = 'header';
|
|
4297
|
+
const MINDBOX_EVENT_REGION_CLICK = 'headerRegionClick';
|
|
4298
|
+
const MINDBOX_EVENT_SEARCH_CLICK = 'headerSearchClick';
|
|
4216
4299
|
const HeaderSecondaryMenu = JSX(({ className, version, ...rest }) => {
|
|
4217
4300
|
const iconVersion = version === 'transparent' ? 'white' : 'black';
|
|
4218
4301
|
const [currentLocation] = useLocation(rest.defaultLocation);
|
|
4219
4302
|
const searchDialog = useSearchDialog(rest);
|
|
4220
4303
|
const locationDialog = useLocationDialog(rest);
|
|
4221
|
-
return (jsxs("div", { className: style('flex items-center gap-lg', className), role: "navigation", children: [jsx(TopItem, { flat: true, href: "#", text: currentLocation?.name,
|
|
4304
|
+
return (jsxs("div", { className: style('flex items-center gap-lg', className), role: "navigation", children: [jsx(TopItem, { flat: true, href: "#", text: currentLocation?.name, data: [
|
|
4305
|
+
{
|
|
4306
|
+
aspectName: MINDBOX_ASPECT,
|
|
4307
|
+
params: {
|
|
4308
|
+
eventAction: MINDBOX_EVENT_REGION_CLICK,
|
|
4309
|
+
eventCategory: MINDBOX_CATEGORY,
|
|
4310
|
+
eventValueText: currentLocation?.name ?? '',
|
|
4311
|
+
},
|
|
4312
|
+
},
|
|
4313
|
+
], onClick: () => locationDialog.open() }), rest.officesAtms?.href ? (jsx(TopItem, { flat: true, text: "\u041E\u0444\u0438\u0441\u044B \u0438 \u0431\u0430\u043D\u043A\u043E\u043C\u0430\u0442\u044B", ...rest.officesAtms })) : null, jsx(HeaderSecondaryMenuButton, { image: { icon: 'LoupeIcon', iconVersion }, ariaLabel: "\u041F\u043E\u0438\u0441\u043A", onClick: () => searchDialog.open(), data: [
|
|
4314
|
+
{
|
|
4315
|
+
aspectName: MINDBOX_ASPECT,
|
|
4316
|
+
params: {
|
|
4317
|
+
eventAction: MINDBOX_EVENT_SEARCH_CLICK,
|
|
4318
|
+
eventCategory: MINDBOX_CATEGORY,
|
|
4319
|
+
},
|
|
4320
|
+
},
|
|
4321
|
+
] })] }));
|
|
4222
4322
|
});
|
|
4223
4323
|
|
|
4224
4324
|
const DropdownMenu = JSX(({ className = '', items, activeItem }) => {
|
|
@@ -4338,10 +4438,10 @@
|
|
|
4338
4438
|
return (jsx(HeaderSecondaryMenuButton, { className: className, image: { icon: 'HeadphonesIcon', iconVersion }, ariaLabel: "\u0427\u0430\u0442", onClick: load, buttonSize: "large", isGrayBg: true }));
|
|
4339
4439
|
});
|
|
4340
4440
|
|
|
4341
|
-
const HeaderItem = JSX(({ className = '', active, dataItemName, children, ...rest }) => {
|
|
4441
|
+
const HeaderItem = JSX(({ className = '', active, dataItemName, children, data, ...rest }) => {
|
|
4342
4442
|
const link = useLink();
|
|
4343
4443
|
const { href, target, text, onClick } = link(rest);
|
|
4344
|
-
return (jsxs("a", { className: style('relative inline-block bg-transparent text-center no-underline', className), href: href, target: target, "data-item-name": dataItemName, onClick: onClick, children: [jsx("span", { className: getTextStyle(active), children: text || children }), active ? (jsx("div", { className: "absolute left-0 right-0 -bottom-3 h-0.5 bg-primary-main group-data-transparent:bg-transparent" })) : null] }));
|
|
4444
|
+
return (jsxs("a", { className: style('relative inline-block bg-transparent text-center no-underline', className), href: href, target: target, "data-item-name": dataItemName, ...getAspectsAttributes(data), onClick: onClick, children: [jsx("span", { className: getTextStyle(active), children: text || children }), active ? (jsx("div", { className: "absolute left-0 right-0 -bottom-3 h-0.5 bg-primary-main group-data-transparent:bg-transparent" })) : null] }));
|
|
4345
4445
|
});
|
|
4346
4446
|
const getTextStyle = (active = false) => style('font-sans text-l font-light', active ? 'text-primary-main' : 'text-primary-text hover:text-primary-main', 'group-data-transparent:text-white group-data-transparent:hover:text-primary-hover');
|
|
4347
4447
|
|
|
@@ -4381,7 +4481,7 @@
|
|
|
4381
4481
|
? handleIntersectionActivation(index)
|
|
4382
4482
|
: handleIntersectionDeactivation(index));
|
|
4383
4483
|
}), [visibleSubItems]);
|
|
4384
|
-
return (jsxs("nav", { className: "relative mt-s flex items-center justify-between", children: [jsx("div", { ref: subItemsListRef, className: "overflow-hidden whitespace-nowrap pb-s mt-xs space-x-3xl", role: "menu", children: visibleSubItems.map((_, i) => (jsx(HeaderSubMenuItem, { className: visibleItemsCount - 1 < i ? 'invisible' : '', active: _ === activeSubItem, observerOptions: observerOptions, onVisibilityChange: subItemsVisibilityHandlers[i], ..._ }, String(i)))) }), dropDownMenuItems.length ? (jsx(DropdownMenu, { className: "relative w-auto z-40", items: dropDownMenuItems, activeItem: activeSubItem })) : null, jsxs("div", { className: "flex", children: [projectSettings.CHAT_BOT ? (jsx(HeaderChatBotButton, { className: "ml-4xl", iconVersion: iconVersion, chat: projectSettings.CHAT_BOT })) : null, jsx(InternetBankButton, { version: version, internetBankUrl: internetBankUrl })] })] }));
|
|
4484
|
+
return (jsxs("nav", { className: "relative mt-s flex items-center justify-between", children: [jsx("div", { ref: subItemsListRef, className: "overflow-hidden whitespace-nowrap pb-s mt-xs space-x-3xl", role: "menu", children: visibleSubItems.map((_, i) => (jsx(HeaderSubMenuItem, { className: visibleItemsCount - 1 < i ? 'invisible' : '', active: _ === activeSubItem, observerOptions: observerOptions, onVisibilityChange: subItemsVisibilityHandlers[i], data: _.dataHeader, ..._ }, String(i)))) }), dropDownMenuItems.length ? (jsx(DropdownMenu, { className: "relative w-auto z-40", items: dropDownMenuItems, activeItem: activeSubItem })) : null, jsxs("div", { className: "flex", children: [projectSettings.CHAT_BOT ? (jsx(HeaderChatBotButton, { className: "ml-4xl", iconVersion: iconVersion, chat: projectSettings.CHAT_BOT })) : null, jsx(InternetBankButton, { version: version, internetBankUrl: internetBankUrl })] })] }));
|
|
4385
4485
|
});
|
|
4386
4486
|
const handleIntersectionActivation = (index) => (prev) => Math.max(prev, index + 1);
|
|
4387
4487
|
const handleIntersectionDeactivation = (index) => (prev) => Math.min(prev, index);
|
|
@@ -4395,7 +4495,7 @@
|
|
|
4395
4495
|
const { topItems, logo } = sitemap;
|
|
4396
4496
|
const [, activeTopItem] = useActiveRoute(topItems);
|
|
4397
4497
|
const { internetBankUrl } = portal || {};
|
|
4398
|
-
return (jsx(BlockWrapper, { tag: "header", className: style('pt-3xl px-20', activeTopItem?.items?.length ? 'pb-m' : 'pb-lg', className), defaultPadding: "", version: version, ...rest, children: jsxs("div", { className: "container", children: [jsxs("div", { className: "flex items-center", children: [jsx(Logo, { className: "mr-3xl", bgColor: bgColor, logo: customLogo ?? logo }), topItems?.filter(isVisibleItem).map((_, i) => (jsx(TopItem, { active: _ === activeTopItem, ..._ }, String(i)))), jsx(HeaderSecondaryMenu, { version: version, className: "ml-auto", ...sitemap })] }), jsx("div", { className: style('mt-xl h-px bg-main-divider', version === 'transparent' ? 'opacity-30' : '') }), activeTopItem?.items?.length ? (jsx(HeaderSubMenu, { subItems: activeTopItem.items, version: version, internetBankUrl: internetBankUrl })) : null] }) }));
|
|
4498
|
+
return (jsx(BlockWrapper, { tag: "header", className: style('pt-3xl px-20', activeTopItem?.items?.length ? 'pb-m' : 'pb-lg', className), defaultPadding: "", version: version, ...rest, children: jsxs("div", { className: "container", children: [jsxs("div", { className: "flex items-center", children: [jsx(Logo, { className: "mr-3xl", bgColor: bgColor, logo: customLogo ?? logo }), topItems?.filter(isVisibleItem).map((_, i) => (jsx(TopItem, { active: _ === activeTopItem, data: _.dataHeader, ..._ }, String(i)))), jsx(HeaderSecondaryMenu, { version: version, className: "ml-auto", ...sitemap })] }), jsx("div", { className: style('mt-xl h-px bg-main-divider', version === 'transparent' ? 'opacity-30' : '') }), activeTopItem?.items?.length ? (jsx(HeaderSubMenu, { subItems: activeTopItem.items, version: version, internetBankUrl: internetBankUrl })) : null] }) }));
|
|
4399
4499
|
});
|
|
4400
4500
|
|
|
4401
4501
|
const getInnerPadding = (isPadding = false) => isPadding ? {} : { padding: 'p-0' };
|
|
@@ -5884,22 +5984,11 @@
|
|
|
5884
5984
|
Video,
|
|
5885
5985
|
};
|
|
5886
5986
|
|
|
5887
|
-
const QUERY_STORAGE_KEY = 'rshb-query-params';
|
|
5888
|
-
function saveSessionQuery() {
|
|
5889
|
-
const result = globalThis.location?.search || globalThis.sessionStorage?.getItem(QUERY_STORAGE_KEY) || '';
|
|
5890
|
-
if (result) {
|
|
5891
|
-
globalThis.sessionStorage?.setItem(QUERY_STORAGE_KEY, result);
|
|
5892
|
-
}
|
|
5893
|
-
return result;
|
|
5894
|
-
}
|
|
5895
|
-
|
|
5896
5987
|
const applyAspects = (aspects) => (ev) => {
|
|
5897
5988
|
const element = ev.target?.closest('[data-aspects]');
|
|
5898
5989
|
try {
|
|
5899
5990
|
const aspectsAttributes = JSON.parse(element?.dataset?.aspects ?? '[]');
|
|
5900
|
-
|
|
5901
|
-
aspects[aspectName ?? '']?.(ev, params);
|
|
5902
|
-
}
|
|
5991
|
+
handleAspects({ aspectsAttributes, aspects, ev });
|
|
5903
5992
|
}
|
|
5904
5993
|
catch (_) {
|
|
5905
5994
|
// Do nothing
|
|
@@ -5908,52 +5997,6 @@
|
|
|
5908
5997
|
aspects.forwardQuery?.(ev);
|
|
5909
5998
|
};
|
|
5910
5999
|
|
|
5911
|
-
const adjustSessionQuery = (href) => {
|
|
5912
|
-
const sessionQuery = saveSessionQuery();
|
|
5913
|
-
if (!isURL(href) || !sessionQuery) {
|
|
5914
|
-
return href;
|
|
5915
|
-
}
|
|
5916
|
-
const url = new URL(href);
|
|
5917
|
-
for (const [key, value] of new URLSearchParams(sessionQuery)) {
|
|
5918
|
-
url.searchParams.set(key, value);
|
|
5919
|
-
}
|
|
5920
|
-
return url.toString();
|
|
5921
|
-
};
|
|
5922
|
-
|
|
5923
|
-
const forwardQuery = (ev) => {
|
|
5924
|
-
const anchor = ev.target?.closest('a');
|
|
5925
|
-
if (isURL(anchor?.href) && !anchor?.href?.startsWith(globalThis.location?.origin)) {
|
|
5926
|
-
ev.preventDefault();
|
|
5927
|
-
ev.stopPropagation();
|
|
5928
|
-
const url = adjustSessionQuery(anchor?.href) || anchor?.href;
|
|
5929
|
-
if (url) {
|
|
5930
|
-
const transition = getTransition(anchor?.target);
|
|
5931
|
-
transition?.(url);
|
|
5932
|
-
}
|
|
5933
|
-
}
|
|
5934
|
-
};
|
|
5935
|
-
const getTransition = tableFunc([
|
|
5936
|
-
[(_) => _ === '_blank', (url) => globalThis.open(url, '_blank')],
|
|
5937
|
-
[(_) => _ === '_parent', (url) => globalThis.parent && (globalThis.parent.location.href = url)],
|
|
5938
|
-
[
|
|
5939
|
-
(_) => _ === '_top',
|
|
5940
|
-
(url) => {
|
|
5941
|
-
globalThis.top && (globalThis.top.location.href = url);
|
|
5942
|
-
},
|
|
5943
|
-
],
|
|
5944
|
-
[() => true, (url) => globalThis.location && (globalThis.location.href = url)],
|
|
5945
|
-
]);
|
|
5946
|
-
|
|
5947
|
-
function useAspects() {
|
|
5948
|
-
return useAspects._impl();
|
|
5949
|
-
}
|
|
5950
|
-
useAspects._impl = () => ({
|
|
5951
|
-
forwardQuery,
|
|
5952
|
-
});
|
|
5953
|
-
useAspects.setup = (impl) => {
|
|
5954
|
-
useAspects._impl = impl;
|
|
5955
|
-
};
|
|
5956
|
-
|
|
5957
6000
|
const useClickHandler = handlerDecorator(() => {
|
|
5958
6001
|
useEffect(() => {
|
|
5959
6002
|
saveSessionQuery(); //? Call first time for save query in sessionStorage
|
|
@@ -6112,7 +6155,7 @@
|
|
|
6112
6155
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
6113
6156
|
});
|
|
6114
6157
|
|
|
6115
|
-
const packageVersion = "0.14.
|
|
6158
|
+
const packageVersion = "0.14.288";
|
|
6116
6159
|
|
|
6117
6160
|
exports.Blocks = Blocks;
|
|
6118
6161
|
exports.ContentPage = ContentPage;
|