@redneckz/wildless-cms-uni-blocks 0.14.217 → 0.14.219
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 +61 -11
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/OfficesAtmsMap/OfficesAtmsMapProps.d.ts +7 -0
- package/bundle/components/OfficesAtmsMap/renderFiltrationForm.d.ts +3 -1
- package/bundle/hooks/useLocation.d.ts +1 -0
- package/bundle/ui-kit/LocationDialog/LocationDialog.d.ts +1 -0
- package/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +18 -1
- package/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
- package/dist/components/OfficesAtmsMap/OfficesAtmsMapProps.d.ts +7 -0
- package/dist/components/OfficesAtmsMap/OfficesMap.js +14 -2
- package/dist/components/OfficesAtmsMap/OfficesMap.js.map +1 -1
- package/dist/components/OfficesAtmsMap/renderFiltrationForm.d.ts +3 -1
- package/dist/components/OfficesAtmsMap/renderFiltrationForm.js +24 -2
- package/dist/components/OfficesAtmsMap/renderFiltrationForm.js.map +1 -1
- package/dist/components/SafeDepositRental/utils.js +3 -1
- package/dist/components/SafeDepositRental/utils.js.map +1 -1
- package/dist/hooks/useLocation.d.ts +1 -0
- package/dist/hooks/useLocation.js.map +1 -1
- package/dist/ui-kit/LocationDialog/LocationDialog.d.ts +1 -0
- package/dist/ui-kit/LocationDialog/LocationDialog.js +4 -2
- package/dist/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +19 -2
- package/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
- package/lib/components/OfficesAtmsMap/OfficesAtmsMapProps.d.ts +7 -0
- package/lib/components/OfficesAtmsMap/OfficesMap.js +14 -2
- package/lib/components/OfficesAtmsMap/OfficesMap.js.map +1 -1
- package/lib/components/OfficesAtmsMap/renderFiltrationForm.d.ts +3 -1
- package/lib/components/OfficesAtmsMap/renderFiltrationForm.js +22 -1
- package/lib/components/OfficesAtmsMap/renderFiltrationForm.js.map +1 -1
- package/lib/components/SafeDepositRental/utils.js +3 -1
- package/lib/components/SafeDepositRental/utils.js.map +1 -1
- package/lib/hooks/useLocation.d.ts +1 -0
- package/lib/hooks/useLocation.js.map +1 -1
- package/lib/ui-kit/LocationDialog/LocationDialog.d.ts +1 -0
- package/lib/ui-kit/LocationDialog/LocationDialog.js +4 -2
- package/lib/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +65 -15
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/OfficesAtmsMap/OfficesAtmsMapProps.d.ts +7 -0
- package/mobile/bundle/components/OfficesAtmsMap/renderFiltrationForm.d.ts +3 -1
- package/mobile/bundle/hooks/useLocation.d.ts +1 -0
- package/mobile/bundle/ui-kit/LocationDialog/LocationDialog.d.ts +1 -0
- package/mobile/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +18 -1
- package/mobile/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
- package/mobile/dist/components/OfficesAtmsMap/OfficesAtmsMapProps.d.ts +7 -0
- package/mobile/dist/components/OfficesAtmsMap/OfficesMap.js +14 -2
- package/mobile/dist/components/OfficesAtmsMap/OfficesMap.js.map +1 -1
- package/mobile/dist/components/OfficesAtmsMap/renderFiltrationForm.d.ts +3 -1
- package/mobile/dist/components/OfficesAtmsMap/renderFiltrationForm.js +24 -2
- package/mobile/dist/components/OfficesAtmsMap/renderFiltrationForm.js.map +1 -1
- package/mobile/dist/components/SafeDepositRental/utils.js +3 -1
- package/mobile/dist/components/SafeDepositRental/utils.js.map +1 -1
- package/mobile/dist/hooks/useLocation.d.ts +1 -0
- package/mobile/dist/hooks/useLocation.js.map +1 -1
- package/mobile/dist/ui-kit/LocationDialog/LocationDialog.d.ts +1 -0
- package/mobile/dist/ui-kit/LocationDialog/LocationDialog.js +4 -2
- package/mobile/dist/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +19 -2
- package/mobile/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
- package/mobile/lib/components/OfficesAtmsMap/OfficesAtmsMapProps.d.ts +7 -0
- package/mobile/lib/components/OfficesAtmsMap/OfficesMap.js +14 -2
- package/mobile/lib/components/OfficesAtmsMap/OfficesMap.js.map +1 -1
- package/mobile/lib/components/OfficesAtmsMap/renderFiltrationForm.d.ts +3 -1
- package/mobile/lib/components/OfficesAtmsMap/renderFiltrationForm.js +22 -1
- package/mobile/lib/components/OfficesAtmsMap/renderFiltrationForm.js.map +1 -1
- package/mobile/lib/components/SafeDepositRental/utils.js +3 -1
- package/mobile/lib/components/SafeDepositRental/utils.js.map +1 -1
- package/mobile/lib/hooks/useLocation.d.ts +1 -0
- package/mobile/lib/hooks/useLocation.js.map +1 -1
- package/mobile/lib/ui-kit/LocationDialog/LocationDialog.d.ts +1 -0
- package/mobile/lib/ui-kit/LocationDialog/LocationDialog.js +4 -2
- package/mobile/lib/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
- package/mobile/src/components/OfficesAtmsMap/OfficesAtmsMapLayout.tsx +56 -2
- package/mobile/src/components/OfficesAtmsMap/OfficesAtmsMapProps.tsx +7 -0
- package/mobile/src/components/OfficesAtmsMap/OfficesMap.tsx +15 -2
- package/mobile/src/components/OfficesAtmsMap/renderFiltrationForm.tsx +73 -17
- package/mobile/src/components/SafeDepositRental/utils.ts +4 -1
- package/mobile/src/hooks/useLocation.ts +1 -0
- package/mobile/src/ui-kit/LocationDialog/LocationDialog.tsx +63 -52
- package/package.json +1 -1
- package/src/components/OfficesAtmsMap/OfficesAtmsMapLayout.tsx +56 -2
- package/src/components/OfficesAtmsMap/OfficesAtmsMapProps.tsx +7 -0
- package/src/components/OfficesAtmsMap/OfficesMap.tsx +15 -2
- package/src/components/OfficesAtmsMap/renderFiltrationForm.tsx +73 -17
- package/src/components/SafeDepositRental/utils.ts +4 -1
- package/src/hooks/useLocation.ts +1 -0
- package/src/ui-kit/LocationDialog/LocationDialog.tsx +63 -52
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
2
|
import { JSX } from '@redneckz/uni-jsx';
|
|
3
|
-
import { useMemo } from '@redneckz/uni-jsx/lib/hooks';
|
|
3
|
+
import { useMemo, useState } from '@redneckz/uni-jsx/lib/hooks';
|
|
4
4
|
import { useForm } from '../../hooks/useForm.js';
|
|
5
|
+
import { Button } from '../../ui-kit/Button/Button.js';
|
|
5
6
|
import { ClientOnly } from '../../ui-kit/ClientOnly.js';
|
|
6
7
|
import { Heading } from '../../ui-kit/Heading/Heading.js';
|
|
7
8
|
import { Img } from '../../ui-kit/Img/Img.js';
|
|
@@ -12,6 +13,7 @@ import { style } from '../../utils/style.js';
|
|
|
12
13
|
import { renderFiltrationForm } from './renderFiltrationForm.js';
|
|
13
14
|
const defaultEmptyFunction = () => void 0;
|
|
14
15
|
const defaultFilterItems = () => [];
|
|
16
|
+
const filtersVisibleStyles = (activeButton) => activeButton === 'all' ? 'block' : 'hidden';
|
|
15
17
|
export const OfficesAtmsMapLayout = JSX(({ className, data = [], renderCard = defaultEmptyFunction, filterItems = defaultFilterItems, getBalloon = defaultEmptyFunction, initFilterState = {}, descriptionData, title, }) => {
|
|
16
18
|
const [filtrationState, { field, reset }] = useForm(initFilterState);
|
|
17
19
|
const [filteredItems, points, lengthItems] = useMemo(() => {
|
|
@@ -24,7 +26,22 @@ export const OfficesAtmsMapLayout = JSX(({ className, data = [], renderCard = de
|
|
|
24
26
|
.filter((_) => _.coords && _.coords.length === 2);
|
|
25
27
|
return [_filteredItems, _points, _filteredItems.length];
|
|
26
28
|
}, [data, filtrationState]);
|
|
27
|
-
|
|
29
|
+
const [activeButton, setActiveButton] = useState('all');
|
|
30
|
+
return (_jsxs("div", { className: style('space-y-1', className), children: [_jsxs("div", { className: "bg-white", children: [_jsxs("div", { className: "p-6xl pb-0", children: [_jsxs("div", { className: "flex flex-col sm:flex-row gap-xs mb-2xl", children: [_jsx(Heading, { headingType: "h2", children: title }), lengthItems ? (_jsx(Text, { size: "text-h2", color: "text-secondary-text", children: `(${lengthItems})` })) : null] }), descriptionData ? renderDescriptionBlock(descriptionData) : null, renderButtonsGroup(data, activeButton, setActiveButton), _jsx("div", { className: style('pb-2xl', filtersVisibleStyles(activeButton)), children: renderFiltrationForm(Object.keys(initFilterState), { field, reset }) })] }), _jsx("div", { className: "h-[600px]", children: _jsx(ClientOnly, { children: _jsx(YandexMap, { points: points, className: "h-full" }) }) })] }), filteredItems.map(renderCard)] }));
|
|
28
31
|
});
|
|
32
|
+
const renderButtonsGroup = (data, activeButton, setActiveButton) => {
|
|
33
|
+
const allButtonVersion = activeButton === 'all' ? 'primary' : 'secondary';
|
|
34
|
+
const businessButtonVersion = activeButton === 'business' ? 'primary' : 'secondary';
|
|
35
|
+
const handleOnClick = (e, key, branches) => {
|
|
36
|
+
if (e.currentTarget === e.target && key === 'business') {
|
|
37
|
+
branches.filter((branch) => branch.workSchedule &&
|
|
38
|
+
branch.workSchedule.businessScheduleVisibleTag &&
|
|
39
|
+
!branch.workSchedule.businessScheduleDescription);
|
|
40
|
+
}
|
|
41
|
+
setActiveButton(key);
|
|
42
|
+
return branches;
|
|
43
|
+
};
|
|
44
|
+
return (_jsxs("div", { className: "flex pb-lg", children: [_jsx(Button, { className: "mr-m", "data-id": "all", onClick: (e) => handleOnClick(e, 'all', data), version: allButtonVersion, children: "\u0414\u043B\u044F \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043A\u0438\u0445 \u043B\u0438\u0446" }), _jsx(Button, { "data-id": "business", onClick: (e) => handleOnClick(e, 'business', data), version: businessButtonVersion, children: "\u0414\u043B\u044F \u044E\u0440\u0438\u0434\u0438\u0447\u0435\u0441\u043A\u0438\u0445 \u043B\u0438\u0446" })] }));
|
|
45
|
+
};
|
|
29
46
|
const renderDescriptionBlock = ({ __html, list }) => __html || list?.length ? (_jsxs("div", { className: "mb-2xl border-b sm:border border-main-divider sm:rounded-md", children: [__html ? (_jsx("div", { className: "mb-2xl", children: _jsx(RichText, { __html: __html }) })) : null, list?.length ? (_jsx("div", { className: "flex flex-col sm:flex-row gap-2xl sm:flex-wrap pb-2xl sm:pb-xl", children: list.map((item, i) => (_jsxs("div", { className: "flex gap-xs items-center", children: [item?.image ? _jsx(Img, { image: item.image }) : null, item?.text ? (_jsx(Text, { size: "text-m", font: "font-light", children: item.text })) : null] }, String(i)))) })) : null] })) : null;
|
|
30
47
|
//# sourceMappingURL=OfficesAtmsMapLayout.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OfficesAtmsMapLayout.js","sourceRoot":"","sources":["../../../src/components/OfficesAtmsMap/OfficesAtmsMapLayout.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"OfficesAtmsMapLayout.js","sourceRoot":"","sources":["../../../src/components/OfficesAtmsMap/OfficesAtmsMapLayout.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAE9C,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAAE,GAAG,EAAE,M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M,sBAAsB,GAAG,CAAC,EAAE,MAAM,EAAE,IAAI,EAAW,EAAE,EAAE,CAC3D,MAAM,IAAI,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,CACvB,eAAK,SAAS,EAAC,6DAA6D,aACzE,MAAM,CAAC,CAAC,CAAC,CACR,cAAK,SAAS,EAAC,QAAQ,YACrB,KAAC,QAAQ,IAAC,MAAM,EAAE,MAAM,GAAI,GACxB,CACP,CAAC,CAAC,CAAC,IAAI,EACP,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,CACd,cAAK,SAAS,EAAC,gEAAgE,YAC5E,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CACrB,eAAqB,SAAS,EAAC,0BAA0B,aACtD,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,KAAC,GAAG,IAAC,KAAK,EAAE,IAAI,CAAC,KAAK,GAAI,CAAC,CAAC,CAAC,IAAI,EAC/C,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,CACZ,KAAC,IAAI,IAAC,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,YAAY,YAClC,IAAI,CAAC,IAAI,GACL,CACR,CAAC,CAAC,CAAC,IAAI,KANA,MAAM,CAAC,CAAC,CAAC,CAOb,CACP,CAAC,GACE,CACP,CAAC,CAAC,CAAC,IAAI,IACJ,CACP,CAAC,CAAC,CAAC,IAAI,CAAC"}
|
|
@@ -42,6 +42,13 @@ export declare type WorkSchedule = {
|
|
|
42
42
|
isMatchesPattern?: boolean;
|
|
43
43
|
businessScheduleVisibleTag?: boolean;
|
|
44
44
|
businessScheduleDescription?: string;
|
|
45
|
+
premiumService?: boolean;
|
|
46
|
+
privateBanking?: boolean;
|
|
47
|
+
sellingCoins?: boolean;
|
|
48
|
+
buyingCoins?: boolean;
|
|
49
|
+
bullionOperations?: boolean;
|
|
50
|
+
preciousMetalsOperations?: boolean;
|
|
51
|
+
transferringDataToBiometricSystem?: boolean;
|
|
45
52
|
};
|
|
46
53
|
export declare type SafeBoxCaseTariff = {
|
|
47
54
|
id?: number;
|
|
@@ -5,12 +5,24 @@ import { OfficesAtmsMapLayout } from './OfficesAtmsMapLayout.js';
|
|
|
5
5
|
import { getOfficePoint, renderOfficeCard } from './renderOfficeCard.js';
|
|
6
6
|
import { useOffices } from './useOffices.js';
|
|
7
7
|
const INITIAL_FILTRATION_STATE = {
|
|
8
|
-
//safeBoxCaseVolumes: false, //TODO: temp hide
|
|
9
8
|
workingSaturday: false,
|
|
9
|
+
premiumService: false,
|
|
10
|
+
privateBanking: false,
|
|
11
|
+
sellingCoins: false,
|
|
12
|
+
buyingCoins: false,
|
|
13
|
+
bullionOperations: false,
|
|
14
|
+
preciousMetalsOperations: false,
|
|
15
|
+
transferringDataToBiometricSystem: false,
|
|
10
16
|
};
|
|
11
17
|
const FILTRATION_PREDICATES = {
|
|
12
|
-
//safeBoxCaseVolumes: (item: Branch) => Boolean(item.safeBoxCaseVolumes), //TODO: temp hide
|
|
13
18
|
workingSaturday: (item) => Boolean(item.workSchedule?.workingSaturday),
|
|
19
|
+
premiumService: (item) => Boolean(item.workSchedule?.premiumService),
|
|
20
|
+
privateBanking: (item) => Boolean(item.workSchedule?.privateBanking),
|
|
21
|
+
sellingCoins: (item) => Boolean(item.workSchedule?.sellingCoins),
|
|
22
|
+
buyingCoins: (item) => Boolean(item.workSchedule?.buyingCoins),
|
|
23
|
+
bullionOperations: (item) => Boolean(item.workSchedule?.bullionOperations),
|
|
24
|
+
preciousMetalsOperations: (item) => Boolean(item.workSchedule?.preciousMetalsOperations),
|
|
25
|
+
transferringDataToBiometricSystem: (item) => Boolean(item.workSchedule?.transferringDataToBiometricSystem),
|
|
14
26
|
};
|
|
15
27
|
export const OfficesMap = JSX(({ className }) => {
|
|
16
28
|
const [currentLocation] = useLocation();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OfficesMap.js","sourceRoot":"","sources":["../../../src/components/OfficesAtmsMap/Of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CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC;IAEzF,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAC3F,CAAC,CAAC"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { type FormFieldRegisterer } from '../../hooks/useForm';
|
|
2
|
+
import { type FoldablePartProps } from '../../ui-kit/Foldable/FoldablePartProps';
|
|
2
3
|
export declare const renderFiltrationForm: (filters: string[], { field, reset }: {
|
|
3
4
|
field: FormFieldRegisterer<any>;
|
|
4
5
|
reset: () => void;
|
|
5
|
-
}) => JSX.Element;
|
|
6
|
+
}, visibleFiltersNum?: number) => JSX.Element;
|
|
7
|
+
export declare const renderFoldButton: (reset: () => void) => ({ isUnfolded, onToggle }: FoldablePartProps) => JSX.Element;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
2
|
import { Checkbox } from '../../ui-kit/Checkbox/Checkbox.js';
|
|
3
|
+
import { Foldable } from '../../ui-kit/Foldable/Foldable.js';
|
|
4
|
+
import { FoldableSection } from '../../ui-kit/Foldable/FoldableSection.js';
|
|
3
5
|
import { Icon } from '../../ui-kit/Icon/Icon.js';
|
|
4
6
|
import { LinkButton } from '../../ui-kit/LinkButton/LinkButton.js';
|
|
5
7
|
const FILTRATION_LABELS = {
|
|
@@ -9,6 +11,25 @@ const FILTRATION_LABELS = {
|
|
|
9
11
|
terminalTypeTerm: 'Терминалы',
|
|
10
12
|
workAllTime: 'Круглосуточно',
|
|
11
13
|
billAcceptorEnable: 'Прием наличных',
|
|
14
|
+
premiumService: 'Премиальное обслуживание',
|
|
15
|
+
privateBanking: 'Услуга Private banking',
|
|
16
|
+
sellingCoins: 'Продажа монет из драгоценных металлов',
|
|
17
|
+
buyingCoins: 'Покупка монет из драгоценных металлов',
|
|
18
|
+
bullionOperations: 'Операции со слитками',
|
|
19
|
+
preciousMetalsOperations: 'Операции с драгоценными металлами',
|
|
20
|
+
transferringDataToBiometricSystem: 'Передача фото и голоса в Единую биометрическую систему',
|
|
21
|
+
};
|
|
22
|
+
const COMMON_FILTERS_STYLES = 'flex flex-col sm:flex-row sm:flex-wrap gap-3xl pb-2xl';
|
|
23
|
+
export const renderFiltrationForm = (filters, { field, reset }, visibleFiltersNum = 3) => {
|
|
24
|
+
const filtersCheckbox = (filters || []).map((key) => (_jsx(Checkbox, { text: FILTRATION_LABELS[key], ...field(key) }, key)));
|
|
25
|
+
const [visibleFilters, hiddenFilters] = visibleFiltersNum > 0
|
|
26
|
+
? [filtersCheckbox.slice(0, visibleFiltersNum), filtersCheckbox.slice(visibleFiltersNum)]
|
|
27
|
+
: [filtersCheckbox, []];
|
|
28
|
+
return (_jsx("div", { children: filters?.length ? (_jsx("div", { children: hiddenFilters.length > 0 ? (_jsx(Foldable, { renderFoldableSection: ({ isUnfolded }) => (_jsxs("div", { children: [_jsx("div", { className: COMMON_FILTERS_STYLES, children: visibleFilters }), _jsx(FoldableSection, { className: COMMON_FILTERS_STYLES, isUnfolded: isUnfolded, children: hiddenFilters })] })), renderFoldButton: renderFoldButton(reset) })) : (_jsx("div", { className: COMMON_FILTERS_STYLES, children: visibleFilters })) })) : null }));
|
|
29
|
+
};
|
|
30
|
+
export const renderFoldButton = (reset) => ({ isUnfolded, onToggle }) => {
|
|
31
|
+
const labels = ['Больше фильтров', 'Меньше фильтров'];
|
|
32
|
+
const icons = ['ArrowDownIcon', 'ArrowUpIcon'];
|
|
33
|
+
return (_jsxs("div", { className: "flex", children: [_jsx(LinkButton, { version: "transparent", className: "text-secondary-text [&>*]:p-0 mr-lg", appendRight: _jsx(Icon, { name: icons[Number(isUnfolded)], width: "16", height: "16" }), text: labels[Number(isUnfolded)], onClick: onToggle }), _jsx(LinkButton, { version: "transparent", className: "text-secondary-text [&>*]:p-0", onClick: reset, text: "\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C \u0444\u0438\u043B\u044C\u0442\u0440", appendRight: _jsx(Icon, { name: "CloseIcon", width: "16", height: "16" }) })] }));
|
|
12
34
|
};
|
|
13
|
-
export const renderFiltrationForm = (filters, { field, reset }) => (_jsxs("div", { className: "pb-2xl", children: [filters?.length ? (_jsx("div", { className: "flex flex-col sm:flex-row sm:flex-wrap gap-3xl pb-2xl", children: filters.map((key) => (_jsx(Checkbox, { text: FILTRATION_LABELS[key], ...field(key) }, key))) })) : null, _jsx(LinkButton, { version: "transparent", className: "text-secondary-text [&>*]:p-0", onClick: reset, text: "\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C \u0444\u0438\u043B\u044C\u0442\u0440", appendRight: _jsx(Icon, { name: "CloseIcon", width: "16", height: "16" }) })] }));
|
|
14
35
|
//# sourceMappingURL=renderFiltrationForm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderFiltrationForm.js","sourceRoot":"","sources":["../../../src/components/OfficesAtmsMap/renderFiltrationForm.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"renderFiltrationForm.js","sourceRoot":"","sources":["../../../src/components/OfficesAtmsMap/renderFiltrationForm.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAE1D,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AACxE,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAE9C,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAEhE,MAAM,iBA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,8 +1,10 @@
|
|
|
1
1
|
export const getCoordinates = (data) => {
|
|
2
|
+
const getBalloon = () => void 0;
|
|
2
3
|
if (Array.isArray(data)) {
|
|
3
4
|
return data
|
|
4
5
|
.map((_) => ({
|
|
5
|
-
coords: [Number(_.gpsLatitude), Number(_.gpsLongitude)]
|
|
6
|
+
coords: [Number(_.gpsLatitude), Number(_.gpsLongitude)].filter(Boolean),
|
|
7
|
+
content: getBalloon(),
|
|
6
8
|
}))
|
|
7
9
|
.filter((_) => _.coords && _.coords.length === 2);
|
|
8
10
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/components/SafeDepositRental/utils.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,IAAwB,EAAmB,EAAE;IAC1E,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;QACvB,OAAO,IAAI;aACR,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;YACX,MAAM,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/components/SafeDepositRental/utils.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,IAAwB,EAAmB,EAAE;IAC1E,MAAM,UAAU,GAAG,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC;IAEhC,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;QACvB,OAAO,IAAI;aACR,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;YACX,MAAM,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC;YACvE,OAAO,EAAE,UAAU,EAAE;SACtB,CAAC,CAAC;aACF,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC;KACrD;IAED,IAAI,IAAI,EAAE,WAAW,IAAI,IAAI,EAAE,YAAY,EAAE;QAC3C,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;KAC5D;IAED,OAAO,EAAE,CAAC;AACZ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,QAAkB,EAAE,cAAsB,EAAE,EAAE,CACtE,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,KAAK,cAAc,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLocation.js","sourceRoot":"","sources":["../../src/hooks/useLocation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,YAAY,EAAE,MAAM,0CAA0C,CAAC;AACxE,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,eAAe,EAA4B,MAAM,oBAAoB,CAAC;AAE/E,MAAM,UAAU,GAAG,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"useLocation.js","sourceRoot":"","sources":["../../src/hooks/useLocation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,YAAY,EAAE,MAAM,0CAA0C,CAAC;AACxE,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC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IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;KACjC;IAAC,OAAO,EAAE,EAAE;QACX,OAAO,IAAI,CAAC;KACb;AACH,CAAC,CAAC;AAEF,MAAM,aAAa,GAAG,CAAC,CAAa,EAAE,EAAE;IACtC,IAAI;QACF,UAAU,CAAC,YAAY,EAAE,OAAO,CAAC,oBAAoB,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;KAC3E;IAAC,OAAO,EAAE,EAAE;QACX,aAAa;KACd;AACH,CAAC,CAAC"}
|
|
@@ -2,5 +2,6 @@ import { type ForeignOfficeProps } from '../../data/SitemapData';
|
|
|
2
2
|
export interface LocationDialogProps {
|
|
3
3
|
foreignOffices?: ForeignOfficeProps[];
|
|
4
4
|
defaultLocation?: string;
|
|
5
|
+
officesLink?: string;
|
|
5
6
|
}
|
|
6
7
|
export declare const LocationDialog: import("@redneckz/uni-jsx").UNIComponent<LocationDialogProps, any, any>;
|
|
@@ -3,6 +3,7 @@ import { JSX } from '@redneckz/uni-jsx';
|
|
|
3
3
|
import { useCallback, useState } from '@redneckz/uni-jsx/lib/hooks';
|
|
4
4
|
import { useLocation } from '../../hooks/useLocation.js';
|
|
5
5
|
import { useRegions } from '../../hooks/useRegions.js';
|
|
6
|
+
import { LinkButton } from '../../ui-kit/LinkButton/LinkButton.js';
|
|
6
7
|
import { groupBy } from '../../utils/groupBy.js';
|
|
7
8
|
import { jaroWinklerDistance } from '../../utils/jaroWinklerDistance.js';
|
|
8
9
|
import { Dialog } from '../DialogManager/Dialog.js';
|
|
@@ -13,7 +14,7 @@ import { renderRegion } from './renderRegion.js';
|
|
|
13
14
|
import { renderRegionGroup } from './renderRegionGroup.js';
|
|
14
15
|
import { SearchBar } from './SearchBar.js';
|
|
15
16
|
const SEARCH_TERM_MIN_LENGTH = 3;
|
|
16
|
-
export const LocationDialog = JSX(({ foreignOffices, defaultLocation }) => {
|
|
17
|
+
export const LocationDialog = JSX(({ foreignOffices, defaultLocation, officesLink }) => {
|
|
17
18
|
const [currentLocation, selectCurrentLocation] = useLocation(defaultLocation);
|
|
18
19
|
const [query, setQuery] = useState('');
|
|
19
20
|
const regions = cleanUpRegions(useRegions()).sort((a, b) => a.name.localeCompare(b.name));
|
|
@@ -23,7 +24,8 @@ export const LocationDialog = JSX(({ foreignOffices, defaultLocation }) => {
|
|
|
23
24
|
selectCurrentLocation(region);
|
|
24
25
|
close();
|
|
25
26
|
}, []);
|
|
26
|
-
|
|
27
|
+
const currentOfficeHref = `${officesLink}/${currentLocation.slug}`;
|
|
28
|
+
return (_jsxs(Dialog, { className: "pb-20", head: _jsxs("div", { children: [_jsx(Text, { size: "text-h4", color: "text-primary-text", children: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0444\u0438\u043B\u0438\u0430\u043B" }), currentLocation ? (_jsxs("div", { className: "mb-s", children: [_jsx(Text, { size: "text-l", font: "font-light", children: "\u0421\u0435\u0439\u0447\u0430\u0441 \u0432\u044B\u0431\u0440\u0430\u043D:\u00A0" }), _jsx(LinkButton, { href: currentOfficeHref, onClick: () => selectCurrentLocation(currentLocation), children: _jsx(Text, { color: "text-primary-main", children: currentLocation.name }) })] })) : null, _jsx(SearchBar, { onSearch: setQuery, searchTerm: query })] }), children: [query && query.length >= SEARCH_TERM_MIN_LENGTH ? (_jsx("div", { children: regions
|
|
27
29
|
.filter(({ name }) => name && jaroWinklerDistance(name.toLowerCase())(query.toLowerCase()) >= 0.8)
|
|
28
30
|
.map(renderRegion(handleChangeLocation)) })) : (_jsx("div", { className: "columns-1 sm:columns-5", children: Array.from(regionsGroupByLetter.entries()).map(renderRegionGroup(handleChangeLocation)) })), renderForeignOffices(foreignOffices)] }));
|
|
29
31
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LocationDialog.js","sourceRoot":"","sources":["../../../src/ui-kit/LocationDialog/LocationDialog.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAA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AAE,CAC3C,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IACvB,GAAG,MAAM;IACT,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,4BAA4B,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE;CAC1E,CAAC,CAAC,CAAC"}
|
|
@@ -2875,9 +2875,9 @@
|
|
|
2875
2875
|
if (isSingleTab) {
|
|
2876
2876
|
return renderCalculator(tabs[0]);
|
|
2877
2877
|
}
|
|
2878
|
-
return tabs.map((tab, index) => (jsx(Foldable, { isFoldButtonOnTop: true, unfoldedByDefault: index === 0, renderFoldableSection: ({ isUnfolded }) => (jsx(FoldableSection, { isUnfolded: isUnfolded, children: renderCalculator(tab) })), renderFoldButton: renderFoldButton$
|
|
2878
|
+
return tabs.map((tab, index) => (jsx(Foldable, { isFoldButtonOnTop: true, unfoldedByDefault: index === 0, renderFoldableSection: ({ isUnfolded }) => (jsx(FoldableSection, { isUnfolded: isUnfolded, children: renderCalculator(tab) })), renderFoldButton: renderFoldButton$4(tab) }, index.toString())));
|
|
2879
2879
|
};
|
|
2880
|
-
const renderFoldButton$
|
|
2880
|
+
const renderFoldButton$4 = (tab) => ({ isUnfolded, onToggle }) => {
|
|
2881
2881
|
const align = tab.nav?.align || 'text-left';
|
|
2882
2882
|
return (jsxs("button", { type: "button", onClick: onToggle, className: "w-full p-xl bg-primary-main flex items-center border-b border-white", children: [jsx("div", { className: "w-11 h-11 bg-white rounded-md flex justify-center items-center", children: jsx(Icon, { name: tab.nav?.icon?.icon, iconVersion: "color", width: "24", height: "24" }) }), jsxs("div", { className: "flex-1 flex flex-col pl-s", children: [jsx(Text, { align: align, color: "text-white", children: tab.nav?.title }), jsx(Text, { align: align, size: "text-s", color: "text-white", font: "font-light", children: tab.nav?.description })] }), jsx(Icon, { name: isUnfolded ? 'ArrowUpIcon' : 'ArrowDownIcon', iconVersion: "white", width: "24", height: "24" })] }));
|
|
2883
2883
|
};
|
|
@@ -3166,9 +3166,9 @@
|
|
|
3166
3166
|
const [visibleCells, hiddenCells] = visibleCellsCount > 0
|
|
3167
3167
|
? [cellsNode.slice(0, visibleCellsCount), cellsNode.slice(visibleCellsCount)]
|
|
3168
3168
|
: [cellsNode, []];
|
|
3169
|
-
return (jsxs(BlockWrapper, { className: style('flex flex-col', className), defaultPadding: "p-2xl", ...rest, children: [isIcon(icon) ? (jsx("div", { className: "self-center", children: jsx(Img, { image: icon }) })) : null, title ? (jsx(Heading, { className: style('pt-xs', align), headingType: "h5", title: title })) : null, button?.text ? jsx(LinkButton, { className: "w-full mt-m mb-lg", ...button }) : null, hiddenCells.length ? (jsx(Foldable, { renderFoldableSection: ({ isUnfolded }) => (jsxs("div", { children: [visibleCells, jsx(FoldableSection, { isUnfolded: isUnfolded, children: hiddenCells })] })), renderFoldButton: cardCells.length > 1 ? renderFoldButton$
|
|
3169
|
+
return (jsxs(BlockWrapper, { className: style('flex flex-col', className), defaultPadding: "p-2xl", ...rest, children: [isIcon(icon) ? (jsx("div", { className: "self-center", children: jsx(Img, { image: icon }) })) : null, title ? (jsx(Heading, { className: style('pt-xs', align), headingType: "h5", title: title })) : null, button?.text ? jsx(LinkButton, { className: "w-full mt-m mb-lg", ...button }) : null, hiddenCells.length ? (jsx(Foldable, { renderFoldableSection: ({ isUnfolded }) => (jsxs("div", { children: [visibleCells, jsx(FoldableSection, { isUnfolded: isUnfolded, children: hiddenCells })] })), renderFoldButton: cardCells.length > 1 ? renderFoldButton$3 : null })) : (jsx("div", { children: visibleCells }))] }));
|
|
3170
3170
|
});
|
|
3171
|
-
const renderFoldButton$
|
|
3171
|
+
const renderFoldButton$3 = ({ isUnfolded, onToggle }) => (jsxs("button", { className: "w-full cursor-pointer text-primary-main pt-lg flex justify-between items-center", onClick: onToggle, type: "button", children: [jsx("div", { children: isUnfolded ? 'Скрыть' : 'Подробнее о тарифе' }), jsx(Icon, { className: "text-primary-text", name: isUnfolded ? 'ArrowUpIcon' : 'ArrowDownIcon', width: "16", height: "16" })] }));
|
|
3172
3172
|
|
|
3173
3173
|
const gradientStyle = 'bg-gradient-to-r from-main-gradient-start to-main-gradient-end';
|
|
3174
3174
|
const dividerStyle$1 = 'border-main-divider border-b';
|
|
@@ -3610,7 +3610,7 @@
|
|
|
3610
3610
|
version, role, ...rest }) => (jsx(BlockWrapper, { className: style('w-full', rollupItemStyles, className), defaultPadding: "p-0", tag: "div", version: "transparent", role: role, ...rest, children: jsx(Foldable, { isFoldButtonOnTop: isFoldButtonOnTop, unfoldedByDefault: isExpanded, renderFoldableSection: ({ isUnfolded }) => (jsx(FoldableSection, { className: style('gap-lg', foldableSectionStyles), isUnfolded: isUnfolded, children: renderChildren({
|
|
3611
3611
|
...rest,
|
|
3612
3612
|
extraProps: { className: 'w-full', padding: 'p-0' },
|
|
3613
|
-
}) })), renderFoldButton: ({ isUnfolded, onToggle }) => renderFoldButton$
|
|
3613
|
+
}) })), renderFoldButton: ({ isUnfolded, onToggle }) => renderFoldButton$2({
|
|
3614
3614
|
foldButtonVersion,
|
|
3615
3615
|
label,
|
|
3616
3616
|
labelIcon,
|
|
@@ -3620,7 +3620,7 @@
|
|
|
3620
3620
|
}) }) })), {
|
|
3621
3621
|
childrenTypes: { exclude: ['RollupItem'] },
|
|
3622
3622
|
});
|
|
3623
|
-
const renderFoldButton$
|
|
3623
|
+
const renderFoldButton$2 = ({ foldButtonVersion, label: defaultLabel, labelIcon, labelIconBgVersion, isUnfolded, onToggle, }) => {
|
|
3624
3624
|
const label = defaultLabel || (isUnfolded ? 'Скрыть' : 'Развернуть');
|
|
3625
3625
|
const icon = getIconName(isUnfolded);
|
|
3626
3626
|
return foldButtonVersion === 'accordion' ? (jsx(AccordionFoldButton, { label: label, labelIcon: labelIcon, labelIconBgVersion: labelIconBgVersion, icon: icon, onToggle: onToggle })) : (jsx(DefaultFoldButton, { label: label, icon: isUnfolded ? 'ArrowUpIcon' : 'ArrowDownIcon', onClick: onToggle }));
|
|
@@ -4136,11 +4136,31 @@
|
|
|
4136
4136
|
terminalTypeTerm: 'Терминалы',
|
|
4137
4137
|
workAllTime: 'Круглосуточно',
|
|
4138
4138
|
billAcceptorEnable: 'Прием наличных',
|
|
4139
|
+
premiumService: 'Премиальное обслуживание',
|
|
4140
|
+
privateBanking: 'Услуга Private banking',
|
|
4141
|
+
sellingCoins: 'Продажа монет из драгоценных металлов',
|
|
4142
|
+
buyingCoins: 'Покупка монет из драгоценных металлов',
|
|
4143
|
+
bullionOperations: 'Операции со слитками',
|
|
4144
|
+
preciousMetalsOperations: 'Операции с драгоценными металлами',
|
|
4145
|
+
transferringDataToBiometricSystem: 'Передача фото и голоса в Единую биометрическую систему',
|
|
4146
|
+
};
|
|
4147
|
+
const COMMON_FILTERS_STYLES = 'flex flex-col sm:flex-row sm:flex-wrap gap-3xl pb-2xl';
|
|
4148
|
+
const renderFiltrationForm = (filters, { field, reset }, visibleFiltersNum = 3) => {
|
|
4149
|
+
const filtersCheckbox = (filters || []).map((key) => (jsx(Checkbox, { text: FILTRATION_LABELS[key], ...field(key) }, key)));
|
|
4150
|
+
const [visibleFilters, hiddenFilters] = visibleFiltersNum > 0
|
|
4151
|
+
? [filtersCheckbox.slice(0, visibleFiltersNum), filtersCheckbox.slice(visibleFiltersNum)]
|
|
4152
|
+
: [filtersCheckbox, []];
|
|
4153
|
+
return (jsx("div", { children: filters?.length ? (jsx("div", { children: hiddenFilters.length > 0 ? (jsx(Foldable, { renderFoldableSection: ({ isUnfolded }) => (jsxs("div", { children: [jsx("div", { className: COMMON_FILTERS_STYLES, children: visibleFilters }), jsx(FoldableSection, { className: COMMON_FILTERS_STYLES, isUnfolded: isUnfolded, children: hiddenFilters })] })), renderFoldButton: renderFoldButton$1(reset) })) : (jsx("div", { className: COMMON_FILTERS_STYLES, children: visibleFilters })) })) : null }));
|
|
4154
|
+
};
|
|
4155
|
+
const renderFoldButton$1 = (reset) => ({ isUnfolded, onToggle }) => {
|
|
4156
|
+
const labels = ['Больше фильтров', 'Меньше фильтров'];
|
|
4157
|
+
const icons = ['ArrowDownIcon', 'ArrowUpIcon'];
|
|
4158
|
+
return (jsxs("div", { className: "flex", children: [jsx(LinkButton, { version: "transparent", className: "text-secondary-text [&>*]:p-0 mr-lg", appendRight: jsx(Icon, { name: icons[Number(isUnfolded)], width: "16", height: "16" }), text: labels[Number(isUnfolded)], onClick: onToggle }), jsx(LinkButton, { version: "transparent", className: "text-secondary-text [&>*]:p-0", onClick: reset, text: "\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C \u0444\u0438\u043B\u044C\u0442\u0440", appendRight: jsx(Icon, { name: "CloseIcon", width: "16", height: "16" }) })] }));
|
|
4139
4159
|
};
|
|
4140
|
-
const renderFiltrationForm = (filters, { field, reset }) => (jsxs("div", { className: "pb-2xl", children: [filters?.length ? (jsx("div", { className: "flex flex-col sm:flex-row sm:flex-wrap gap-3xl pb-2xl", children: filters.map((key) => (jsx(Checkbox, { text: FILTRATION_LABELS[key], ...field(key) }, key))) })) : null, jsx(LinkButton, { version: "transparent", className: "text-secondary-text [&>*]:p-0", onClick: reset, text: "\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C \u0444\u0438\u043B\u044C\u0442\u0440", appendRight: jsx(Icon, { name: "CloseIcon", width: "16", height: "16" }) })] }));
|
|
4141
4160
|
|
|
4142
4161
|
const defaultEmptyFunction = () => void 0;
|
|
4143
4162
|
const defaultFilterItems = () => [];
|
|
4163
|
+
const filtersVisibleStyles = (activeButton) => activeButton === 'all' ? 'block' : 'hidden';
|
|
4144
4164
|
const OfficesAtmsMapLayout = JSX(({ className, data = [], renderCard = defaultEmptyFunction, filterItems = defaultFilterItems, getBalloon = defaultEmptyFunction, initFilterState = {}, descriptionData, title, }) => {
|
|
4145
4165
|
const [filtrationState, { field, reset }] = useForm(initFilterState);
|
|
4146
4166
|
const [filteredItems, points, lengthItems] = useMemo(() => {
|
|
@@ -4153,8 +4173,23 @@
|
|
|
4153
4173
|
.filter((_) => _.coords && _.coords.length === 2);
|
|
4154
4174
|
return [_filteredItems, _points, _filteredItems.length];
|
|
4155
4175
|
}, [data, filtrationState]);
|
|
4156
|
-
|
|
4157
|
-
|
|
4176
|
+
const [activeButton, setActiveButton] = useState('all');
|
|
4177
|
+
return (jsxs("div", { className: style('space-y-1', className), children: [jsxs("div", { className: "bg-white", children: [jsxs("div", { className: "p-6xl pb-0", children: [jsxs("div", { className: "flex flex-col sm:flex-row gap-xs mb-2xl", children: [jsx(Heading, { headingType: "h2", children: title }), lengthItems ? (jsx(Text, { size: "text-h2", color: "text-secondary-text", children: `(${lengthItems})` })) : null] }), descriptionData ? renderDescriptionBlock$1(descriptionData) : null, renderButtonsGroup(data, activeButton, setActiveButton), jsx("div", { className: style('pb-2xl', filtersVisibleStyles(activeButton)), children: renderFiltrationForm(Object.keys(initFilterState), { field, reset }) })] }), jsx("div", { className: "h-[600px]", children: jsx(ClientOnly, { children: jsx(YandexMap, { points: points, className: "h-full" }) }) })] }), filteredItems.map(renderCard)] }));
|
|
4178
|
+
});
|
|
4179
|
+
const renderButtonsGroup = (data, activeButton, setActiveButton) => {
|
|
4180
|
+
const allButtonVersion = activeButton === 'all' ? 'primary' : 'secondary';
|
|
4181
|
+
const businessButtonVersion = activeButton === 'business' ? 'primary' : 'secondary';
|
|
4182
|
+
const handleOnClick = (e, key, branches) => {
|
|
4183
|
+
if (e.currentTarget === e.target && key === 'business') {
|
|
4184
|
+
branches.filter((branch) => branch.workSchedule &&
|
|
4185
|
+
branch.workSchedule.businessScheduleVisibleTag &&
|
|
4186
|
+
!branch.workSchedule.businessScheduleDescription);
|
|
4187
|
+
}
|
|
4188
|
+
setActiveButton(key);
|
|
4189
|
+
return branches;
|
|
4190
|
+
};
|
|
4191
|
+
return (jsxs("div", { className: "flex pb-lg", children: [jsx(Button, { className: "mr-m", "data-id": "all", onClick: (e) => handleOnClick(e, 'all', data), version: allButtonVersion, children: "\u0414\u043B\u044F \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043A\u0438\u0445 \u043B\u0438\u0446" }), jsx(Button, { "data-id": "business", onClick: (e) => handleOnClick(e, 'business', data), version: businessButtonVersion, children: "\u0414\u043B\u044F \u044E\u0440\u0438\u0434\u0438\u0447\u0435\u0441\u043A\u0438\u0445 \u043B\u0438\u0446" })] }));
|
|
4192
|
+
};
|
|
4158
4193
|
const renderDescriptionBlock$1 = ({ __html, list }) => __html || list?.length ? (jsxs("div", { className: "mb-2xl border-b sm:border border-main-divider sm:rounded-md", children: [__html ? (jsx("div", { className: "mb-2xl", children: jsx(RichText, { __html: __html }) })) : null, list?.length ? (jsx("div", { className: "flex flex-col sm:flex-row gap-2xl sm:flex-wrap pb-2xl sm:pb-xl", children: list.map((item, i) => (jsxs("div", { className: "flex gap-xs items-center", children: [item?.image ? jsx(Img, { image: item.image }) : null, item?.text ? (jsx(Text, { size: "text-m", font: "font-light", children: item.text })) : null] }, String(i)))) })) : null] })) : null;
|
|
4159
4194
|
|
|
4160
4195
|
const colorStyle = {
|
|
@@ -4428,12 +4463,24 @@
|
|
|
4428
4463
|
};
|
|
4429
4464
|
|
|
4430
4465
|
const INITIAL_FILTRATION_STATE = {
|
|
4431
|
-
//safeBoxCaseVolumes: false, //TODO: temp hide
|
|
4432
4466
|
workingSaturday: false,
|
|
4467
|
+
premiumService: false,
|
|
4468
|
+
privateBanking: false,
|
|
4469
|
+
sellingCoins: false,
|
|
4470
|
+
buyingCoins: false,
|
|
4471
|
+
bullionOperations: false,
|
|
4472
|
+
preciousMetalsOperations: false,
|
|
4473
|
+
transferringDataToBiometricSystem: false,
|
|
4433
4474
|
};
|
|
4434
4475
|
const FILTRATION_PREDICATES = {
|
|
4435
|
-
//safeBoxCaseVolumes: (item: Branch) => Boolean(item.safeBoxCaseVolumes), //TODO: temp hide
|
|
4436
4476
|
workingSaturday: (item) => Boolean(item.workSchedule?.workingSaturday),
|
|
4477
|
+
premiumService: (item) => Boolean(item.workSchedule?.premiumService),
|
|
4478
|
+
privateBanking: (item) => Boolean(item.workSchedule?.privateBanking),
|
|
4479
|
+
sellingCoins: (item) => Boolean(item.workSchedule?.sellingCoins),
|
|
4480
|
+
buyingCoins: (item) => Boolean(item.workSchedule?.buyingCoins),
|
|
4481
|
+
bullionOperations: (item) => Boolean(item.workSchedule?.bullionOperations),
|
|
4482
|
+
preciousMetalsOperations: (item) => Boolean(item.workSchedule?.preciousMetalsOperations),
|
|
4483
|
+
transferringDataToBiometricSystem: (item) => Boolean(item.workSchedule?.transferringDataToBiometricSystem),
|
|
4437
4484
|
};
|
|
4438
4485
|
const OfficesMap = JSX(({ className }) => {
|
|
4439
4486
|
const [currentLocation] = useLocation();
|
|
@@ -4540,10 +4587,12 @@
|
|
|
4540
4587
|
};
|
|
4541
4588
|
|
|
4542
4589
|
const getCoordinates = (data) => {
|
|
4590
|
+
const getBalloon = () => void 0;
|
|
4543
4591
|
if (Array.isArray(data)) {
|
|
4544
4592
|
return data
|
|
4545
4593
|
.map((_) => ({
|
|
4546
|
-
coords: [Number(_.gpsLatitude), Number(_.gpsLongitude)]
|
|
4594
|
+
coords: [Number(_.gpsLatitude), Number(_.gpsLongitude)].filter(Boolean),
|
|
4595
|
+
content: getBalloon(),
|
|
4547
4596
|
}))
|
|
4548
4597
|
.filter((_) => _.coords && _.coords.length === 2);
|
|
4549
4598
|
}
|
|
@@ -4820,7 +4869,7 @@
|
|
|
4820
4869
|
});
|
|
4821
4870
|
|
|
4822
4871
|
const SEARCH_TERM_MIN_LENGTH = 3;
|
|
4823
|
-
const LocationDialog = JSX(({ foreignOffices, defaultLocation }) => {
|
|
4872
|
+
const LocationDialog = JSX(({ foreignOffices, defaultLocation, officesLink }) => {
|
|
4824
4873
|
const [currentLocation, selectCurrentLocation] = useLocation(defaultLocation);
|
|
4825
4874
|
const [query, setQuery] = useState('');
|
|
4826
4875
|
const regions = cleanUpRegions(useRegions()).sort((a, b) => a.name.localeCompare(b.name));
|
|
@@ -4830,7 +4879,8 @@
|
|
|
4830
4879
|
selectCurrentLocation(region);
|
|
4831
4880
|
close();
|
|
4832
4881
|
}, []);
|
|
4833
|
-
|
|
4882
|
+
const currentOfficeHref = `${officesLink}/${currentLocation.slug}`;
|
|
4883
|
+
return (jsxs(Dialog, { className: "pb-20", head: jsxs("div", { children: [jsx(Text, { size: "text-h4", color: "text-primary-text", children: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0444\u0438\u043B\u0438\u0430\u043B" }), currentLocation ? (jsxs("div", { className: "mb-s", children: [jsx(Text, { size: "text-l", font: "font-light", children: "\u0421\u0435\u0439\u0447\u0430\u0441 \u0432\u044B\u0431\u0440\u0430\u043D:\u00A0" }), jsx(LinkButton, { href: currentOfficeHref, onClick: () => selectCurrentLocation(currentLocation), children: jsx(Text, { color: "text-primary-main", children: currentLocation.name }) })] })) : null, jsx(SearchBar$1, { onSearch: setQuery, searchTerm: query })] }), children: [query && query.length >= SEARCH_TERM_MIN_LENGTH ? (jsx("div", { children: regions
|
|
4834
4884
|
.filter(({ name }) => name && jaroWinklerDistance(name.toLowerCase())(query.toLowerCase()) >= 0.8)
|
|
4835
4885
|
.map(renderRegion(handleChangeLocation)) })) : (jsx("div", { className: "columns-1 sm:columns-5", children: Array.from(regionsGroupByLetter.entries()).map(renderRegionGroup(handleChangeLocation)) })), renderForeignOffices(foreignOffices)] }));
|
|
4836
4886
|
});
|
|
@@ -5589,7 +5639,7 @@
|
|
|
5589
5639
|
|
|
5590
5640
|
const joinList = (sep) => (list) => list.reduce((acc, el, i) => (acc.length ? acc.concat({ ...sep, key: `sep-${i}` }, el) : [el]), []);
|
|
5591
5641
|
|
|
5592
|
-
const packageVersion = "0.14.
|
|
5642
|
+
const packageVersion = "0.14.218";
|
|
5593
5643
|
|
|
5594
5644
|
exports.Blocks = Blocks;
|
|
5595
5645
|
exports.ContentPage = ContentPage;
|