@redneckz/wildless-cms-uni-blocks 0.14.521 → 0.14.523
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 +30 -26
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/OfficesAtmsMap/AtmsMap.d.ts +1 -1
- package/bundle/components/OfficesAtmsMap/OfficesAtmsMapLayout.d.ts +1 -0
- package/bundle/components/OfficesAtmsMap/useAtms.d.ts +4 -1
- package/bundle/components/OfficesAtmsMap/useOffices.d.ts +5 -2
- package/bundle/ui-kit/YandexMap/YandexMap.d.ts +2 -1
- package/bundle/ui-kit/YandexMap/renderClusterer.d.ts +2 -1
- package/dist/api/FileStorage.js +1 -1
- package/dist/api/FileStorage.js.map +1 -1
- package/dist/components/OfficesAtmsMap/AtmsMap.d.ts +1 -1
- package/dist/components/OfficesAtmsMap/AtmsMap.js +3 -3
- package/dist/components/OfficesAtmsMap/AtmsMap.js.map +1 -1
- package/dist/components/OfficesAtmsMap/OfficesAtmsMap.js +1 -1
- package/dist/components/OfficesAtmsMap/OfficesAtmsMap.js.map +1 -1
- package/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.d.ts +1 -0
- package/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +3 -3
- package/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
- package/dist/components/OfficesAtmsMap/OfficesMap.js +2 -2
- package/dist/components/OfficesAtmsMap/OfficesMap.js.map +1 -1
- package/dist/components/OfficesAtmsMap/useAtms.d.ts +4 -1
- package/dist/components/OfficesAtmsMap/useAtms.js +3 -2
- package/dist/components/OfficesAtmsMap/useAtms.js.map +1 -1
- package/dist/components/OfficesAtmsMap/useOffices.d.ts +5 -2
- package/dist/components/OfficesAtmsMap/useOffices.js +3 -2
- package/dist/components/OfficesAtmsMap/useOffices.js.map +1 -1
- package/dist/ui-kit/YandexMap/YandexMap.d.ts +2 -1
- package/dist/ui-kit/YandexMap/YandexMap.js +11 -12
- package/dist/ui-kit/YandexMap/YandexMap.js.map +1 -1
- package/dist/ui-kit/YandexMap/renderClusterer.d.ts +2 -1
- package/dist/ui-kit/YandexMap/renderClusterer.js +4 -1
- package/dist/ui-kit/YandexMap/renderClusterer.js.map +1 -1
- package/lib/api/FileStorage.js +1 -1
- package/lib/api/FileStorage.js.map +1 -1
- package/lib/components/OfficesAtmsMap/AtmsMap.d.ts +1 -1
- package/lib/components/OfficesAtmsMap/AtmsMap.js +3 -3
- package/lib/components/OfficesAtmsMap/AtmsMap.js.map +1 -1
- package/lib/components/OfficesAtmsMap/OfficesAtmsMap.js +1 -1
- package/lib/components/OfficesAtmsMap/OfficesAtmsMap.js.map +1 -1
- package/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.d.ts +1 -0
- package/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +3 -3
- package/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
- package/lib/components/OfficesAtmsMap/OfficesMap.js +2 -2
- package/lib/components/OfficesAtmsMap/OfficesMap.js.map +1 -1
- package/lib/components/OfficesAtmsMap/useAtms.d.ts +4 -1
- package/lib/components/OfficesAtmsMap/useAtms.js +3 -2
- package/lib/components/OfficesAtmsMap/useAtms.js.map +1 -1
- package/lib/components/OfficesAtmsMap/useOffices.d.ts +5 -2
- package/lib/components/OfficesAtmsMap/useOffices.js +3 -2
- package/lib/components/OfficesAtmsMap/useOffices.js.map +1 -1
- package/lib/ui-kit/YandexMap/YandexMap.d.ts +2 -1
- package/lib/ui-kit/YandexMap/YandexMap.js +11 -12
- package/lib/ui-kit/YandexMap/YandexMap.js.map +1 -1
- package/lib/ui-kit/YandexMap/renderClusterer.d.ts +2 -1
- package/lib/ui-kit/YandexMap/renderClusterer.js +4 -1
- package/lib/ui-kit/YandexMap/renderClusterer.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +30 -26
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/OfficesAtmsMap/AtmsMap.d.ts +1 -1
- package/mobile/bundle/components/OfficesAtmsMap/OfficesAtmsMapLayout.d.ts +1 -0
- package/mobile/bundle/components/OfficesAtmsMap/useAtms.d.ts +4 -1
- package/mobile/bundle/components/OfficesAtmsMap/useOffices.d.ts +5 -2
- package/mobile/bundle/ui-kit/YandexMap/YandexMap.d.ts +2 -1
- package/mobile/bundle/ui-kit/YandexMap/renderClusterer.d.ts +2 -1
- package/mobile/dist/api/FileStorage.js +1 -1
- package/mobile/dist/api/FileStorage.js.map +1 -1
- package/mobile/dist/components/OfficesAtmsMap/AtmsMap.d.ts +1 -1
- package/mobile/dist/components/OfficesAtmsMap/AtmsMap.js +3 -3
- package/mobile/dist/components/OfficesAtmsMap/AtmsMap.js.map +1 -1
- package/mobile/dist/components/OfficesAtmsMap/OfficesAtmsMap.js +1 -1
- package/mobile/dist/components/OfficesAtmsMap/OfficesAtmsMap.js.map +1 -1
- package/mobile/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.d.ts +1 -0
- package/mobile/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +3 -3
- package/mobile/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
- package/mobile/dist/components/OfficesAtmsMap/OfficesMap.js +2 -2
- package/mobile/dist/components/OfficesAtmsMap/OfficesMap.js.map +1 -1
- package/mobile/dist/components/OfficesAtmsMap/useAtms.d.ts +4 -1
- package/mobile/dist/components/OfficesAtmsMap/useAtms.js +3 -2
- package/mobile/dist/components/OfficesAtmsMap/useAtms.js.map +1 -1
- package/mobile/dist/components/OfficesAtmsMap/useOffices.d.ts +5 -2
- package/mobile/dist/components/OfficesAtmsMap/useOffices.js +3 -2
- package/mobile/dist/components/OfficesAtmsMap/useOffices.js.map +1 -1
- package/mobile/dist/ui-kit/YandexMap/YandexMap.d.ts +2 -1
- package/mobile/dist/ui-kit/YandexMap/YandexMap.js +11 -12
- package/mobile/dist/ui-kit/YandexMap/YandexMap.js.map +1 -1
- package/mobile/dist/ui-kit/YandexMap/renderClusterer.d.ts +2 -1
- package/mobile/dist/ui-kit/YandexMap/renderClusterer.js +4 -1
- package/mobile/dist/ui-kit/YandexMap/renderClusterer.js.map +1 -1
- package/mobile/lib/api/FileStorage.js +1 -1
- package/mobile/lib/api/FileStorage.js.map +1 -1
- package/mobile/lib/components/OfficesAtmsMap/AtmsMap.d.ts +1 -1
- package/mobile/lib/components/OfficesAtmsMap/AtmsMap.js +3 -3
- package/mobile/lib/components/OfficesAtmsMap/AtmsMap.js.map +1 -1
- package/mobile/lib/components/OfficesAtmsMap/OfficesAtmsMap.js +1 -1
- package/mobile/lib/components/OfficesAtmsMap/OfficesAtmsMap.js.map +1 -1
- package/mobile/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.d.ts +1 -0
- package/mobile/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +3 -3
- package/mobile/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
- package/mobile/lib/components/OfficesAtmsMap/OfficesMap.js +2 -2
- package/mobile/lib/components/OfficesAtmsMap/OfficesMap.js.map +1 -1
- package/mobile/lib/components/OfficesAtmsMap/useAtms.d.ts +4 -1
- package/mobile/lib/components/OfficesAtmsMap/useAtms.js +3 -2
- package/mobile/lib/components/OfficesAtmsMap/useAtms.js.map +1 -1
- package/mobile/lib/components/OfficesAtmsMap/useOffices.d.ts +5 -2
- package/mobile/lib/components/OfficesAtmsMap/useOffices.js +3 -2
- package/mobile/lib/components/OfficesAtmsMap/useOffices.js.map +1 -1
- package/mobile/lib/ui-kit/YandexMap/YandexMap.d.ts +2 -1
- package/mobile/lib/ui-kit/YandexMap/YandexMap.js +11 -12
- package/mobile/lib/ui-kit/YandexMap/YandexMap.js.map +1 -1
- package/mobile/lib/ui-kit/YandexMap/renderClusterer.d.ts +2 -1
- package/mobile/lib/ui-kit/YandexMap/renderClusterer.js +4 -1
- package/mobile/lib/ui-kit/YandexMap/renderClusterer.js.map +1 -1
- package/mobile/src/api/FileStorage.ts +1 -1
- package/mobile/src/components/OfficesAtmsMap/AtmsMap.tsx +5 -4
- package/mobile/src/components/OfficesAtmsMap/OfficesAtmsMap.tsx +1 -1
- package/mobile/src/components/OfficesAtmsMap/OfficesAtmsMapLayout.tsx +17 -13
- package/mobile/src/components/OfficesAtmsMap/OfficesMap.tsx +4 -5
- package/mobile/src/components/OfficesAtmsMap/useAtms.ts +3 -2
- package/mobile/src/components/OfficesAtmsMap/useOffices.ts +3 -2
- package/mobile/src/ui-kit/YandexMap/YandexMap.tsx +14 -13
- package/mobile/src/ui-kit/YandexMap/renderClusterer.ts +6 -0
- package/package.json +1 -1
- package/src/api/FileStorage.ts +1 -1
- package/src/components/OfficesAtmsMap/AtmsMap.tsx +5 -4
- package/src/components/OfficesAtmsMap/OfficesAtmsMap.tsx +1 -1
- package/src/components/OfficesAtmsMap/OfficesAtmsMapLayout.tsx +17 -13
- package/src/components/OfficesAtmsMap/OfficesMap.tsx +4 -5
- package/src/components/OfficesAtmsMap/useAtms.ts +3 -2
- package/src/components/OfficesAtmsMap/useOffices.ts +3 -2
- package/src/ui-kit/YandexMap/YandexMap.tsx +14 -13
- package/src/ui-kit/YandexMap/renderClusterer.ts +6 -0
|
@@ -32,8 +32,8 @@ const FILTRATION_PREDICATES = {
|
|
|
32
32
|
export const OfficesMap = JSX(({ className }) => {
|
|
33
33
|
const [currentLocation] = useLocation();
|
|
34
34
|
const regionCode = currentLocation?.code ?? '000';
|
|
35
|
-
const
|
|
36
|
-
return (_jsx(OfficesAtmsMapLayout, { className: className, filterItems: filterItems, data:
|
|
35
|
+
const { data, isLoad } = useOffices(regionCode);
|
|
36
|
+
return (_jsx(OfficesAtmsMapLayout, { className: className, filterItems: filterItems, data: data?.branches, isLoad: isLoad, remoteWorkplaces: data?.remoteWorkplaces, initFilterState: INITIAL_FILTRATION_STATE, renderCard: renderOfficeCard, renderRemoteWorkplaceCard: renderRemoteWorkplaceCard, getBalloon: getOfficePoint, getBalloonRemoteWorkplaces: getRemoteWorkplacePoint, title: `Офисы филиала ${currentLocation?.name}` }));
|
|
37
37
|
});
|
|
38
38
|
const filterItems = (data, filtrationState) => {
|
|
39
39
|
const truthyFilters = Object.keys(filtrationState).filter((key) => filtrationState[key]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OfficesMap.js","sourceRoot":"","sources":["../../../src/components/OfficesAtmsMap/OfficesMap.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtE,OAAO,EAAE,uBAAuB,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AACjG,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,MAAM,wBAAwB,GAAG;IAC/B,eAAe,EAAE,KAAK;IACtB,cAAc,EAAE,KAAK;IACrB,cAAc,EAAE,KAAK;IACrB,eAAe,EAAE,KAAK;IACtB,qBAAqB,EAAE,KAAK;IAC5B,YAAY,EAAE,KAAK;IACnB,WAAW,EAAE,KAAK;IAClB,iBAAiB,EAAE,KAAK;IACxB,wBAAwB,EAAE,KAAK;IAC/B,iCAAiC,EAAE,KAAK;CACzC,CAAC;AAEF,MAAM,qBAAqB,GAAG;IAC5B,eAAe,EAAE,CAAC,IAA8B,EAAE,EAAE,CAClD,OAAO,CAAC,cAAc,IAAI,IAAI,IAAI,IAAI,CAAC,YAAY,EAAE,eAAe,CAAC;IACvE,cAAc,EAAE,CAAC,IAA8B,EAAE,EAAE,CACjD,OAAO,CAAC,gBAAgB,IAAI,IAAI,IAAI,IAAI,CAAC,cAAc,CAAC;IAC1D,cAAc,EAAE,CAAC,IAA8B,EAAE,EAA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CAAC,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,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"}
|
|
@@ -2,8 +2,9 @@ import { useAsyncData } from '@redneckz/uni-jsx/lib/hooks/useAsyncData';
|
|
|
2
2
|
import { fetchJSON } from '../../utils/fetchJSON.js';
|
|
3
3
|
const EMPTY_VALUE = [];
|
|
4
4
|
export function useAtms(regionCode) {
|
|
5
|
-
const { data
|
|
6
|
-
|
|
5
|
+
const { data, error } = useAsyncData(`/api/v1/atms?regionCode=${regionCode}`, fetchMap);
|
|
6
|
+
const isLoad = !data && !error;
|
|
7
|
+
return { data: data || EMPTY_VALUE, isLoad };
|
|
7
8
|
}
|
|
8
9
|
const fetchMap = async (url) => {
|
|
9
10
|
const result = await fetchJSON(url, { method: 'GET' });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAtms.js","sourceRoot":"","sources":["../../../src/components/OfficesAtmsMap/useAtms.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,0CAA0C,CAAC;AACxE,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAGlD,MAAM,WAAW,GAAG,EAAE,CAAC;AAEvB,MAAM,UAAU,OAAO,CAAC,UAAmB;IACzC,MAAM,EAAE,IAAI,
|
|
1
|
+
{"version":3,"file":"useAtms.js","sourceRoot":"","sources":["../../../src/components/OfficesAtmsMap/useAtms.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,0CAA0C,CAAC;AACxE,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAGlD,MAAM,WAAW,GAAG,EAAE,CAAC;AAEvB,MAAM,UAAU,OAAO,CAAC,UAAmB;IACzC,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,YAAY,CAAC,2BAA2B,UAAU,EAAE,EAAE,QAAQ,CAAC,CAAC;IACxF,MAAM,MAAM,GAAG,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC;IAE/B,OAAO,EAAE,IAAI,EAAE,IAAI,IAAI,WAAW,EAAE,MAAM,EAAE,CAAC;AAC/C,CAAC;AAED,MAAM,QAAQ,GAAG,KAAK,EAAE,GAAW,EAAkB,EAAE;IACrD,MAAM,MAAM,GAAG,MAAM,SAAS,CAAQ,GAAG,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC;IAE9D,OAAO,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,WAAW,CAAC;AACtD,CAAC,CAAC"}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { type Branch, type RemoteWorkplace } from './OfficesAtmsMapProps';
|
|
2
2
|
export declare function useOffices(regionCode?: string): {
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
data: {
|
|
4
|
+
branches: Branch[];
|
|
5
|
+
remoteWorkplaces: RemoteWorkplace[];
|
|
6
|
+
};
|
|
7
|
+
isLoad: boolean;
|
|
5
8
|
};
|
|
@@ -2,8 +2,9 @@ import { useAsyncData } from '@redneckz/uni-jsx/lib/hooks/useAsyncData';
|
|
|
2
2
|
import { fetchJSON } from '../../utils/fetchJSON.js';
|
|
3
3
|
const EMPTY_VALUE = { branches: [], remoteWorkplaces: [] };
|
|
4
4
|
export function useOffices(regionCode) {
|
|
5
|
-
const { data
|
|
6
|
-
|
|
5
|
+
const { data, error } = useAsyncData(`/api/v1/branchesAndRemoteWorkplaces?regionCode=${regionCode}`, fetchMap);
|
|
6
|
+
const isLoad = !data && !error;
|
|
7
|
+
return { data: data || EMPTY_VALUE, isLoad };
|
|
7
8
|
}
|
|
8
9
|
const fetchMap = async (url) => {
|
|
9
10
|
const result = await fetchJSON(url, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useOffices.js","sourceRoot":"","sources":["../../../src/components/OfficesAtmsMap/useOffices.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,0CAA0C,CAAC;AACxE,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAGlD,MAAM,WAAW,GAAG,EAAE,QAAQ,EAAE,EAAE,EAAE,gBAAgB,EAAE,EAAE,EAAE,CAAC;AAE3D,MAAM,UAAU,UAAU,CAAC,UAAmB;IAC5C,MAAM,EAAE,IAAI,
|
|
1
|
+
{"version":3,"file":"useOffices.js","sourceRoot":"","sources":["../../../src/components/OfficesAtmsMap/useOffices.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,0CAA0C,CAAC;AACxE,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAGlD,MAAM,WAAW,GAAG,EAAE,QAAQ,EAAE,EAAE,EAAE,gBAAgB,EAAE,EAAE,EAAE,CAAC;AAE3D,MAAM,UAAU,UAAU,CAAC,UAAmB;IAC5C,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,YAAY,CAClC,kDAAkD,UAAU,EAAE,EAC9D,QAAQ,CACT,CAAC;IACF,MAAM,MAAM,GAAG,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC;IAE/B,OAAO,EAAE,IAAI,EAAE,IAAI,IAAI,WAAW,EAAE,MAAM,EAAE,CAAC;AAC/C,CAAC;AAED,MAAM,QAAQ,GAAG,KAAK,EACpB,GAAW,EAC2D,EAAE;IACxE,MAAM,MAAM,GAAG,MAAM,SAAS,CAA8D,GAAG,EAAE;QAC/F,MAAM,EAAE,KAAK;KACd,CAAC,CAAC;IAEH,OAAO,MAAM,IAAI,WAAW,CAAC;AAC/B,CAAC,CAAC"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { type BalloonPoints } from '../../components/OfficesAtmsMap/YandexMapProps';
|
|
2
2
|
interface YandexMapProps {
|
|
3
|
-
points
|
|
3
|
+
points?: BalloonPoints[];
|
|
4
4
|
className?: string;
|
|
5
5
|
zoom?: number;
|
|
6
|
+
isLoad?: boolean;
|
|
6
7
|
}
|
|
7
8
|
export declare const YandexMap: import("@redneckz/uni-jsx").UNIComponent<YandexMapProps, any, any>;
|
|
8
9
|
export {};
|
|
@@ -4,6 +4,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
|
|
|
4
4
|
import { JSX } from '@redneckz/uni-jsx';
|
|
5
5
|
import { useEffect, useRef } from '@redneckz/uni-jsx/lib/hooks';
|
|
6
6
|
import { style } from '../../utils/style.js';
|
|
7
|
+
import { Loader } from '../Loader/Loader.js';
|
|
7
8
|
import { renderClusterer } from './renderClusterer.js';
|
|
8
9
|
import { renderUserGeolocation } from './renderUserGeolocation.js';
|
|
9
10
|
import { useYandexMaps } from './useYandexMaps.js';
|
|
@@ -13,17 +14,19 @@ const DEFAULT_CENTER_COORDS = [55.753995, 37.614069];
|
|
|
13
14
|
// Сейчас реализован поиск среди тестовых данных
|
|
14
15
|
// TODO: Также выяснить что делать когда ничего не найдено
|
|
15
16
|
// TODO: На макетах также когда есть поле поиска нет кнопки открыть на карте.
|
|
16
|
-
export const YandexMap = JSX(({ points, className = '', zoom = 5 }) => {
|
|
17
|
+
export const YandexMap = JSX(({ points, className = '', zoom = 5, isLoad }) => {
|
|
17
18
|
const map = useRef(null);
|
|
18
19
|
const yandexMaps = useYandexMaps();
|
|
19
20
|
useEffect(() => {
|
|
20
|
-
if (
|
|
21
|
-
|
|
21
|
+
if (map.current) {
|
|
22
|
+
renderClusterer({ yandexMaps, map: map.current, points, isLoad });
|
|
23
|
+
map.current.setCenter(getCenterPoint(points));
|
|
22
24
|
}
|
|
23
|
-
|
|
25
|
+
else {
|
|
24
26
|
yandexMaps?.ready(() => {
|
|
25
27
|
// Ready function may be called few times, but must be called once
|
|
26
28
|
if (map.current) {
|
|
29
|
+
renderClusterer({ yandexMaps, map: map.current, points, isLoad });
|
|
27
30
|
return;
|
|
28
31
|
}
|
|
29
32
|
map.current = new yandexMaps.Map('map', {
|
|
@@ -32,19 +35,15 @@ export const YandexMap = JSX(({ points, className = '', zoom = 5 }) => {
|
|
|
32
35
|
controls: [],
|
|
33
36
|
suppressMapOpenBlock: true,
|
|
34
37
|
});
|
|
35
|
-
renderClusterer({ yandexMaps, map: map.current, points });
|
|
38
|
+
renderClusterer({ yandexMaps, map: map.current, points, isLoad });
|
|
36
39
|
});
|
|
37
40
|
}
|
|
38
|
-
|
|
39
|
-
renderClusterer({ yandexMaps, map: map.current, points });
|
|
40
|
-
map.current.setCenter(getCenterPoint(points));
|
|
41
|
-
}
|
|
42
|
-
}, [yandexMaps, points, zoom]);
|
|
41
|
+
}, [yandexMaps, points, zoom, isLoad]);
|
|
43
42
|
if (!yandexMaps) {
|
|
44
43
|
return null;
|
|
45
44
|
}
|
|
46
45
|
const zIndex = 'z-10';
|
|
47
|
-
return (_jsxs("div", { id: "map", className: style('relative', 'w-full', className), children: [_jsxs("div", { className: style('absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md', zIndex), children: [_jsx(ZoomButton, { yandexMaps: map }), _jsx(ZoomButton, { yandexMaps: map, direction: "out" })] }), renderUserGeolocation(map, yandexMaps, style('right-2 top-80', zIndex))] }));
|
|
46
|
+
return (_jsxs("div", { id: "map", className: style('relative', 'w-full', className), children: [isLoad ? _jsx(Loader, {}) : null, _jsxs("div", { className: style('absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md', zIndex), children: [_jsx(ZoomButton, { yandexMaps: map }), _jsx(ZoomButton, { yandexMaps: map, direction: "out" })] }), renderUserGeolocation(map, yandexMaps, style('right-2 top-80', zIndex))] }));
|
|
48
47
|
});
|
|
49
48
|
const getCenterPoint = (points) => {
|
|
50
49
|
const centerCoords = [
|
|
@@ -53,6 +52,6 @@ const getCenterPoint = (points) => {
|
|
|
53
52
|
];
|
|
54
53
|
return centerCoords.every((_) => _) ? centerCoords : DEFAULT_CENTER_COORDS;
|
|
55
54
|
};
|
|
56
|
-
const mapByIndex = (points, index) => points.map((_) => _.coords[index]);
|
|
55
|
+
const mapByIndex = (points, index) => points.map((_) => _.coords?.[index]);
|
|
57
56
|
const getArraySumAndAverage = (arr) => arr.length && arr.reduce((a, b) => a + b) / arr.length;
|
|
58
57
|
//# sourceMappingURL=YandexMap.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"YandexMap.js","sourceRoot":"","sources":["../../../src/ui-kit/YandexMap/YandexMap.tsx"],"names":[],"mappings":";AAAA,6DAA6D;AAC7D,cAAc;AACd,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAGhE,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"YandexMap.js","sourceRoot":"","sources":["../../../src/ui-kit/YandexMap/YandexMap.tsx"],"names":[],"mappings":";AAAA,6DAA6D;AAC7D,cAAc;AACd,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAGhE,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,k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,MAAM,UAAU,GAAG,CAAC,MAAuB,EAAE,KAAa,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;AAEpG,MAAM,qBAAqB,GAAG,CAAC,GAAa,EAAE,EAAE,CAC9C,GAAG,CAAC,MAAM,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type ymaps from 'yandex-maps';
|
|
2
2
|
import { type BalloonPoints } from '../../components/OfficesAtmsMap/YandexMapProps';
|
|
3
|
-
export declare function renderClusterer({ yandexMaps, map, points, }: {
|
|
3
|
+
export declare function renderClusterer({ yandexMaps, map, points, isLoad, }: {
|
|
4
4
|
yandexMaps: typeof ymaps;
|
|
5
5
|
map: ymaps.Map;
|
|
6
6
|
points: BalloonPoints[];
|
|
7
|
+
isLoad: boolean;
|
|
7
8
|
}): void;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
const MapMarkerClusterIcon = '/icons/MapMarkerClusterIcon.svg';
|
|
2
2
|
const MapMarkerClusterYellowIcon = '/icons/MapMarkerClusterYellowIcon.svg';
|
|
3
|
-
export function renderClusterer({ yandexMaps, map, points, }) {
|
|
3
|
+
export function renderClusterer({ yandexMaps, map, points, isLoad, }) {
|
|
4
|
+
if (isLoad || !points?.length) {
|
|
5
|
+
return;
|
|
6
|
+
}
|
|
4
7
|
map.geoObjects.removeAll();
|
|
5
8
|
const clusterIconContentLayout = yandexMaps.templateLayoutFactory.createClass('<div style="margin-top: -3px;">{{properties.geoObjects.length}}</div>');
|
|
6
9
|
const officeClusterer = defineClusterer('offices', yandexMaps, clusterIconContentLayout);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderClusterer.js","sourceRoot":"","sources":["../../../src/ui-kit/YandexMap/renderClusterer.ts"],"names":[],"mappings":"AAMA,MAAM,oBAAoB,GAAG,iCAAiC,CAAC;AAC/D,MAAM,0BAA0B,GAAG,uCAAuC,CAAC;AAE3E,MAAM,UAAU,eAAe,CAAC,EAC9B,UAAU,EACV,GAAG,EACH,MAAM,
|
|
1
|
+
{"version":3,"file":"renderClusterer.js","sourceRoot":"","sources":["../../../src/ui-kit/YandexMap/renderClusterer.ts"],"names":[],"mappings":"AAMA,MAAM,oBAAoB,GAAG,iCAAiC,CAAC;AAC/D,MAAM,0BAA0B,GAAG,uCAAuC,CAAC;AAE3E,MAAM,UAAU,eAAe,CAAC,EAC9B,UAAU,EACV,GAAG,EACH,MAAM,EACN,MAAM,GAMP;IACC,IAAI,MAAM,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE;QAC7B,OAAO;KACR;IAED,GAAG,CAAC,UAAU,CAAC,SAAS,EAAE,CAAC;IAE3B,MAAM,wBAAwB,GAAG,UAAU,CAAC,qBAAqB,CAAC,WAAW,CAC3E,uEAAuE,CACxE,CAAC;IAEF,MAAM,eAAe,GAAG,eAAe,CAAC,SAAS,EAAE,UAAU,EAAE,wBAAwB,CAAC,CAAC;IAEzF,IAAI,MAAM,CAAC,MAAM,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,IAAI,CAAC,CAAC,EAAE;QACrD,MAAM,wBAAwB,GAAG,eAAe,CAC9C,YAAY,EACZ,UAAU,EACV,wBAAwB,CACzB,CAAC;QAEF,MAAM,yBAAyB,GAAG,gBAAgB,CAChD,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,YAAY,CAAC,EAC7C,YAAY,EACZ,UAAU,CACX,CAAC;QAEF,MAAM,iBAAiB,GAAG,gBAAgB,CACxC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,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EAAE,KAAK;QACnC,8BAA8B,EAAE,KAAK;KACX,CAAC,CAAC;AAChC,CAAC,CAAC;AAEF,MAAM,gBAAgB,GAAG,CAAC,QAAyB,EAAE,IAAY,EAAE,UAAwB,EAAE,EAAE;IAC7F,OAAO,QAAQ,CAAC,GAAG,CACjB,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,EAAE,CACtB,IAAI,UAAU,CAAC,SAAS,CACtB,MAAM,EACN;QACE,oBAAoB,EAAE,OAAO,EAAE,MAAM;QACrC,kBAAkB,EAAE,OAAO,EAAE,IAAI;QACjC,oBAAoB,EAAE,OAAO,EAAE,MAAM;QACrC,WAAW,EAAE,OAAO,EAAE,IAAI;KAC3B,EACD;QACE,UAAU,EAAE,eAAe;QAC3B,aAAa,EAAE,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,0BAA0B;QACrF,aAAa,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC;QACvB,eAAe,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC;KAC5B,CACF,CACJ,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -25,27 +25,28 @@ const FILTRATION_PREDICATES = {
|
|
|
25
25
|
};
|
|
26
26
|
|
|
27
27
|
export interface AtmsMapProps {
|
|
28
|
-
|
|
28
|
+
descriptionData?: AtmsDef;
|
|
29
29
|
className?: string;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
export const AtmsMap = JSX<AtmsMapProps>(({
|
|
32
|
+
export const AtmsMap = JSX<AtmsMapProps>(({ descriptionData, className }) => {
|
|
33
33
|
const [currentLocation] = useLocation();
|
|
34
34
|
|
|
35
35
|
const regionCode = currentLocation?.code ?? '000';
|
|
36
36
|
|
|
37
|
-
const officesData = useAtms(regionCode);
|
|
37
|
+
const { data: officesData, isLoad } = useAtms(regionCode);
|
|
38
38
|
|
|
39
39
|
return (
|
|
40
40
|
<OfficesAtmsMapLayout
|
|
41
41
|
className={className}
|
|
42
42
|
filterItems={filterItems}
|
|
43
43
|
data={officesData}
|
|
44
|
+
isLoad={isLoad}
|
|
44
45
|
initFilterState={INITIAL_FILTRATION_STATE}
|
|
45
46
|
renderCard={renderAtmCard}
|
|
46
47
|
getBalloon={getAtmPoint}
|
|
47
48
|
title={`Банкоматы филиала ${currentLocation?.name}`}
|
|
48
|
-
descriptionData={
|
|
49
|
+
descriptionData={descriptionData}
|
|
49
50
|
/>
|
|
50
51
|
);
|
|
51
52
|
});
|
|
@@ -13,7 +13,7 @@ export const OfficesAtmsMap = JSX<OfficesAtmsMapProps>(({ data, className, ...re
|
|
|
13
13
|
|
|
14
14
|
return (
|
|
15
15
|
<BlockWrapper version="transparent" className={style(className)} defaultPadding="p-0" {...rest}>
|
|
16
|
-
{dataType === 'offices' ? <OfficesMap /> : <AtmsMap
|
|
16
|
+
{dataType === 'offices' ? <OfficesMap /> : <AtmsMap descriptionData={data as AtmsDef} />}
|
|
17
17
|
</BlockWrapper>
|
|
18
18
|
);
|
|
19
19
|
});
|
|
@@ -5,7 +5,6 @@ import { type VNode } from '../../model/VNode';
|
|
|
5
5
|
import { Button } from '../../ui-kit/Button/Button';
|
|
6
6
|
import { ClientOnly } from '../../ui-kit/ClientOnly';
|
|
7
7
|
import { Heading } from '../../ui-kit/Heading/Heading';
|
|
8
|
-
import { Loader } from '../../ui-kit/Loader/Loader';
|
|
9
8
|
import { Text } from '../../ui-kit/Text/Text';
|
|
10
9
|
import { YandexMap } from '../../ui-kit/YandexMap/YandexMap';
|
|
11
10
|
import { getVersion } from '../../utils/getVersion';
|
|
@@ -24,6 +23,7 @@ export type InitFilterState = Record<string, boolean>;
|
|
|
24
23
|
export interface OfficesAtmsMapLayoutProps<T> {
|
|
25
24
|
className?: string;
|
|
26
25
|
data?: T[];
|
|
26
|
+
isLoad: boolean;
|
|
27
27
|
remoteWorkplaces?: T[];
|
|
28
28
|
renderCard?: (item: T, index: number) => VNode;
|
|
29
29
|
renderRemoteWorkplaceCard?: (item: T, index: number) => VNode;
|
|
@@ -42,6 +42,7 @@ export const OfficesAtmsMapLayout = JSX<OfficesAtmsMapLayoutProps<Branch | Atm |
|
|
|
42
42
|
({
|
|
43
43
|
className,
|
|
44
44
|
data = [],
|
|
45
|
+
isLoad,
|
|
45
46
|
remoteWorkplaces = [],
|
|
46
47
|
renderCard = defaultEmptyFunction,
|
|
47
48
|
renderRemoteWorkplaceCard = defaultEmptyFunction,
|
|
@@ -53,7 +54,6 @@ export const OfficesAtmsMapLayout = JSX<OfficesAtmsMapLayoutProps<Branch | Atm |
|
|
|
53
54
|
title,
|
|
54
55
|
}) => {
|
|
55
56
|
const onlyOffice = title?.includes('Офис');
|
|
56
|
-
|
|
57
57
|
const [filtrationState, { field, reset }] = useForm(initFilterState);
|
|
58
58
|
|
|
59
59
|
const [filteredItems, points, filteredRemoteWorkplaces, lengthItems] = useMemo(() => {
|
|
@@ -87,16 +87,7 @@ export const OfficesAtmsMapLayout = JSX<OfficesAtmsMapLayoutProps<Branch | Atm |
|
|
|
87
87
|
<div className={style('space-y-1', className)}>
|
|
88
88
|
<div className="bg-white">
|
|
89
89
|
<div className="p-3xl pb-0">
|
|
90
|
-
|
|
91
|
-
<Heading headingType="h3">
|
|
92
|
-
<span suppressHydrationWarning={true}>{title}</span>
|
|
93
|
-
{lengthItems ? (
|
|
94
|
-
<Text size="text-h2" color="text-secondary-text">
|
|
95
|
-
<span suppressHydrationWarning={true}>{` (${lengthItems})`}</span>
|
|
96
|
-
</Text>
|
|
97
|
-
) : null}
|
|
98
|
-
</Heading>
|
|
99
|
-
</div>
|
|
90
|
+
{renderHeading(title, lengthItems)}
|
|
100
91
|
{descriptionData ? renderDescriptionBlock(descriptionData) : null}
|
|
101
92
|
{onlyOffice && renderButtonsGroup(data, activeButton, setActiveButton)}
|
|
102
93
|
<div className={style('pb-3xl', filtersVisibleStyles(activeButton))}>
|
|
@@ -105,7 +96,7 @@ export const OfficesAtmsMapLayout = JSX<OfficesAtmsMapLayoutProps<Branch | Atm |
|
|
|
105
96
|
</div>
|
|
106
97
|
<div className="h-[600px]">
|
|
107
98
|
<ClientOnly>
|
|
108
|
-
|
|
99
|
+
<YandexMap points={points} isLoad={isLoad} className="h-full" />
|
|
109
100
|
</ClientOnly>
|
|
110
101
|
</div>
|
|
111
102
|
</div>
|
|
@@ -118,6 +109,19 @@ export const OfficesAtmsMapLayout = JSX<OfficesAtmsMapLayoutProps<Branch | Atm |
|
|
|
118
109
|
},
|
|
119
110
|
);
|
|
120
111
|
|
|
112
|
+
const renderHeading = (title?: string, lengthItems?: number) => (
|
|
113
|
+
<div className="flex flex-col sm:flex-row gap-xs mb-2xl">
|
|
114
|
+
<Heading headingType="h3">
|
|
115
|
+
<span suppressHydrationWarning={true}>{title}</span>
|
|
116
|
+
{lengthItems ? (
|
|
117
|
+
<Text size="text-h2" color="text-secondary-text">
|
|
118
|
+
<span suppressHydrationWarning={true}>{` (${lengthItems})`}</span>
|
|
119
|
+
</Text>
|
|
120
|
+
) : null}
|
|
121
|
+
</Heading>
|
|
122
|
+
</div>
|
|
123
|
+
);
|
|
124
|
+
|
|
121
125
|
const renderButtonsGroup = (
|
|
122
126
|
data: Branch[],
|
|
123
127
|
activeButton: string,
|
|
@@ -47,17 +47,16 @@ export interface OfficesMapProps {
|
|
|
47
47
|
|
|
48
48
|
export const OfficesMap = JSX<OfficesMapProps>(({ className }) => {
|
|
49
49
|
const [currentLocation] = useLocation();
|
|
50
|
-
|
|
51
50
|
const regionCode = currentLocation?.code ?? '000';
|
|
52
|
-
|
|
53
|
-
const officesData = useOffices(regionCode);
|
|
51
|
+
const { data, isLoad } = useOffices(regionCode);
|
|
54
52
|
|
|
55
53
|
return (
|
|
56
54
|
<OfficesAtmsMapLayout
|
|
57
55
|
className={className}
|
|
58
56
|
filterItems={filterItems}
|
|
59
|
-
data={
|
|
60
|
-
|
|
57
|
+
data={data?.branches}
|
|
58
|
+
isLoad={isLoad}
|
|
59
|
+
remoteWorkplaces={data?.remoteWorkplaces}
|
|
61
60
|
initFilterState={INITIAL_FILTRATION_STATE}
|
|
62
61
|
renderCard={renderOfficeCard}
|
|
63
62
|
renderRemoteWorkplaceCard={renderRemoteWorkplaceCard}
|
|
@@ -5,9 +5,10 @@ import { type Atm } from './OfficesAtmsMapProps';
|
|
|
5
5
|
const EMPTY_VALUE = [];
|
|
6
6
|
|
|
7
7
|
export function useAtms(regionCode?: string) {
|
|
8
|
-
const { data
|
|
8
|
+
const { data, error } = useAsyncData(`/api/v1/atms?regionCode=${regionCode}`, fetchMap);
|
|
9
|
+
const isLoad = !data && !error;
|
|
9
10
|
|
|
10
|
-
return data;
|
|
11
|
+
return { data: data || EMPTY_VALUE, isLoad };
|
|
11
12
|
}
|
|
12
13
|
|
|
13
14
|
const fetchMap = async (url: string): Promise<Atm[]> => {
|
|
@@ -5,12 +5,13 @@ import { type Branch, type RemoteWorkplace } from './OfficesAtmsMapProps';
|
|
|
5
5
|
const EMPTY_VALUE = { branches: [], remoteWorkplaces: [] };
|
|
6
6
|
|
|
7
7
|
export function useOffices(regionCode?: string) {
|
|
8
|
-
const { data
|
|
8
|
+
const { data, error } = useAsyncData(
|
|
9
9
|
`/api/v1/branchesAndRemoteWorkplaces?regionCode=${regionCode}`,
|
|
10
10
|
fetchMap,
|
|
11
11
|
);
|
|
12
|
+
const isLoad = !data && !error;
|
|
12
13
|
|
|
13
|
-
return data;
|
|
14
|
+
return { data: data || EMPTY_VALUE, isLoad };
|
|
14
15
|
}
|
|
15
16
|
|
|
16
17
|
const fetchMap = async (
|
|
@@ -5,15 +5,17 @@ import { useEffect, useRef } from '@redneckz/uni-jsx/lib/hooks';
|
|
|
5
5
|
import type ymaps from 'yandex-maps';
|
|
6
6
|
import { type BalloonPoints } from '../../components/OfficesAtmsMap/YandexMapProps';
|
|
7
7
|
import { style } from '../../utils/style';
|
|
8
|
+
import { Loader } from '../Loader/Loader';
|
|
8
9
|
import { renderClusterer } from './renderClusterer';
|
|
9
10
|
import { renderUserGeolocation } from './renderUserGeolocation';
|
|
10
11
|
import { useYandexMaps } from './useYandexMaps';
|
|
11
12
|
import { ZoomButton } from './ZoomButton';
|
|
12
13
|
|
|
13
14
|
interface YandexMapProps {
|
|
14
|
-
points
|
|
15
|
+
points?: BalloonPoints[];
|
|
15
16
|
className?: string;
|
|
16
17
|
zoom?: number;
|
|
18
|
+
isLoad?: boolean;
|
|
17
19
|
}
|
|
18
20
|
|
|
19
21
|
const DEFAULT_CENTER_COORDS = [55.753995, 37.614069];
|
|
@@ -22,20 +24,22 @@ const DEFAULT_CENTER_COORDS = [55.753995, 37.614069];
|
|
|
22
24
|
// Сейчас реализован поиск среди тестовых данных
|
|
23
25
|
// TODO: Также выяснить что делать когда ничего не найдено
|
|
24
26
|
// TODO: На макетах также когда есть поле поиска нет кнопки открыть на карте.
|
|
25
|
-
export const YandexMap = JSX<YandexMapProps>(({ points, className = '', zoom = 5 }) => {
|
|
27
|
+
export const YandexMap = JSX<YandexMapProps>(({ points, className = '', zoom = 5, isLoad }) => {
|
|
26
28
|
const map = useRef<ymaps.Map | null>(null);
|
|
27
29
|
|
|
28
30
|
const yandexMaps = useYandexMaps();
|
|
29
31
|
|
|
30
32
|
useEffect(() => {
|
|
31
|
-
if (
|
|
32
|
-
|
|
33
|
-
}
|
|
33
|
+
if (map.current) {
|
|
34
|
+
renderClusterer({ yandexMaps, map: map.current, points, isLoad });
|
|
34
35
|
|
|
35
|
-
|
|
36
|
+
map.current.setCenter(getCenterPoint(points));
|
|
37
|
+
} else {
|
|
36
38
|
yandexMaps?.ready(() => {
|
|
37
39
|
// Ready function may be called few times, but must be called once
|
|
38
40
|
if (map.current) {
|
|
41
|
+
renderClusterer({ yandexMaps, map: map.current, points, isLoad });
|
|
42
|
+
|
|
39
43
|
return;
|
|
40
44
|
}
|
|
41
45
|
|
|
@@ -46,14 +50,10 @@ export const YandexMap = JSX<YandexMapProps>(({ points, className = '', zoom = 5
|
|
|
46
50
|
suppressMapOpenBlock: true,
|
|
47
51
|
});
|
|
48
52
|
|
|
49
|
-
renderClusterer({ yandexMaps, map: map.current, points });
|
|
53
|
+
renderClusterer({ yandexMaps, map: map.current, points, isLoad });
|
|
50
54
|
});
|
|
51
|
-
} else if (yandexMaps) {
|
|
52
|
-
renderClusterer({ yandexMaps, map: map.current, points });
|
|
53
|
-
|
|
54
|
-
map.current.setCenter(getCenterPoint(points));
|
|
55
55
|
}
|
|
56
|
-
}, [yandexMaps, points, zoom]);
|
|
56
|
+
}, [yandexMaps, points, zoom, isLoad]);
|
|
57
57
|
|
|
58
58
|
if (!yandexMaps) {
|
|
59
59
|
return null;
|
|
@@ -63,6 +63,7 @@ export const YandexMap = JSX<YandexMapProps>(({ points, className = '', zoom = 5
|
|
|
63
63
|
|
|
64
64
|
return (
|
|
65
65
|
<div id="map" className={style('relative', 'w-full', className)}>
|
|
66
|
+
{isLoad ? <Loader /> : null}
|
|
66
67
|
<div
|
|
67
68
|
className={style(
|
|
68
69
|
'absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md',
|
|
@@ -86,7 +87,7 @@ const getCenterPoint = (points?: BalloonPoints[]) => {
|
|
|
86
87
|
return centerCoords.every((_) => _) ? centerCoords : DEFAULT_CENTER_COORDS;
|
|
87
88
|
};
|
|
88
89
|
|
|
89
|
-
const mapByIndex = (points: BalloonPoints[], index: number) => points.map((_) => _.coords[index]);
|
|
90
|
+
const mapByIndex = (points: BalloonPoints[], index: number) => points.map((_) => _.coords?.[index]);
|
|
90
91
|
|
|
91
92
|
const getArraySumAndAverage = (arr: number[]) =>
|
|
92
93
|
arr.length && arr.reduce((a, b) => a + b) / arr.length;
|
|
@@ -11,11 +11,17 @@ export function renderClusterer({
|
|
|
11
11
|
yandexMaps,
|
|
12
12
|
map,
|
|
13
13
|
points,
|
|
14
|
+
isLoad,
|
|
14
15
|
}: {
|
|
15
16
|
yandexMaps: typeof ymaps;
|
|
16
17
|
map: ymaps.Map;
|
|
17
18
|
points: BalloonPoints[];
|
|
19
|
+
isLoad: boolean;
|
|
18
20
|
}) {
|
|
21
|
+
if (isLoad || !points?.length) {
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
|
|
19
25
|
map.geoObjects.removeAll();
|
|
20
26
|
|
|
21
27
|
const clusterIconContentLayout = yandexMaps.templateLayoutFactory.createClass(
|
package/package.json
CHANGED
package/src/api/FileStorage.ts
CHANGED
|
@@ -25,27 +25,28 @@ const FILTRATION_PREDICATES = {
|
|
|
25
25
|
};
|
|
26
26
|
|
|
27
27
|
export interface AtmsMapProps {
|
|
28
|
-
|
|
28
|
+
descriptionData?: AtmsDef;
|
|
29
29
|
className?: string;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
export const AtmsMap = JSX<AtmsMapProps>(({
|
|
32
|
+
export const AtmsMap = JSX<AtmsMapProps>(({ descriptionData, className }) => {
|
|
33
33
|
const [currentLocation] = useLocation();
|
|
34
34
|
|
|
35
35
|
const regionCode = currentLocation?.code ?? '000';
|
|
36
36
|
|
|
37
|
-
const officesData = useAtms(regionCode);
|
|
37
|
+
const { data: officesData, isLoad } = useAtms(regionCode);
|
|
38
38
|
|
|
39
39
|
return (
|
|
40
40
|
<OfficesAtmsMapLayout
|
|
41
41
|
className={className}
|
|
42
42
|
filterItems={filterItems}
|
|
43
43
|
data={officesData}
|
|
44
|
+
isLoad={isLoad}
|
|
44
45
|
initFilterState={INITIAL_FILTRATION_STATE}
|
|
45
46
|
renderCard={renderAtmCard}
|
|
46
47
|
getBalloon={getAtmPoint}
|
|
47
48
|
title={`Банкоматы филиала ${currentLocation?.name}`}
|
|
48
|
-
descriptionData={
|
|
49
|
+
descriptionData={descriptionData}
|
|
49
50
|
/>
|
|
50
51
|
);
|
|
51
52
|
});
|
|
@@ -13,7 +13,7 @@ export const OfficesAtmsMap = JSX<OfficesAtmsMapProps>(({ data, className, ...re
|
|
|
13
13
|
|
|
14
14
|
return (
|
|
15
15
|
<BlockWrapper version="transparent" className={style(className)} defaultPadding="p-0" {...rest}>
|
|
16
|
-
{dataType === 'offices' ? <OfficesMap /> : <AtmsMap
|
|
16
|
+
{dataType === 'offices' ? <OfficesMap /> : <AtmsMap descriptionData={data as AtmsDef} />}
|
|
17
17
|
</BlockWrapper>
|
|
18
18
|
);
|
|
19
19
|
});
|
|
@@ -5,7 +5,6 @@ import { type VNode } from '../../model/VNode';
|
|
|
5
5
|
import { Button } from '../../ui-kit/Button/Button';
|
|
6
6
|
import { ClientOnly } from '../../ui-kit/ClientOnly';
|
|
7
7
|
import { Heading } from '../../ui-kit/Heading/Heading';
|
|
8
|
-
import { Loader } from '../../ui-kit/Loader/Loader';
|
|
9
8
|
import { Text } from '../../ui-kit/Text/Text';
|
|
10
9
|
import { YandexMap } from '../../ui-kit/YandexMap/YandexMap';
|
|
11
10
|
import { getVersion } from '../../utils/getVersion';
|
|
@@ -24,6 +23,7 @@ export type InitFilterState = Record<string, boolean>;
|
|
|
24
23
|
export interface OfficesAtmsMapLayoutProps<T> {
|
|
25
24
|
className?: string;
|
|
26
25
|
data?: T[];
|
|
26
|
+
isLoad: boolean;
|
|
27
27
|
remoteWorkplaces?: T[];
|
|
28
28
|
renderCard?: (item: T, index: number) => VNode;
|
|
29
29
|
renderRemoteWorkplaceCard?: (item: T, index: number) => VNode;
|
|
@@ -42,6 +42,7 @@ export const OfficesAtmsMapLayout = JSX<OfficesAtmsMapLayoutProps<Branch | Atm |
|
|
|
42
42
|
({
|
|
43
43
|
className,
|
|
44
44
|
data = [],
|
|
45
|
+
isLoad,
|
|
45
46
|
remoteWorkplaces = [],
|
|
46
47
|
renderCard = defaultEmptyFunction,
|
|
47
48
|
renderRemoteWorkplaceCard = defaultEmptyFunction,
|
|
@@ -53,7 +54,6 @@ export const OfficesAtmsMapLayout = JSX<OfficesAtmsMapLayoutProps<Branch | Atm |
|
|
|
53
54
|
title,
|
|
54
55
|
}) => {
|
|
55
56
|
const onlyOffice = title?.includes('Офис');
|
|
56
|
-
|
|
57
57
|
const [filtrationState, { field, reset }] = useForm(initFilterState);
|
|
58
58
|
|
|
59
59
|
const [filteredItems, points, filteredRemoteWorkplaces, lengthItems] = useMemo(() => {
|
|
@@ -87,16 +87,7 @@ export const OfficesAtmsMapLayout = JSX<OfficesAtmsMapLayoutProps<Branch | Atm |
|
|
|
87
87
|
<div className={style('space-y-1', className)}>
|
|
88
88
|
<div className="bg-white">
|
|
89
89
|
<div className="p-3xl pb-0">
|
|
90
|
-
|
|
91
|
-
<Heading headingType="h3">
|
|
92
|
-
<span suppressHydrationWarning={true}>{title}</span>
|
|
93
|
-
{lengthItems ? (
|
|
94
|
-
<Text size="text-h2" color="text-secondary-text">
|
|
95
|
-
<span suppressHydrationWarning={true}>{` (${lengthItems})`}</span>
|
|
96
|
-
</Text>
|
|
97
|
-
) : null}
|
|
98
|
-
</Heading>
|
|
99
|
-
</div>
|
|
90
|
+
{renderHeading(title, lengthItems)}
|
|
100
91
|
{descriptionData ? renderDescriptionBlock(descriptionData) : null}
|
|
101
92
|
{onlyOffice && renderButtonsGroup(data, activeButton, setActiveButton)}
|
|
102
93
|
<div className={style('pb-3xl', filtersVisibleStyles(activeButton))}>
|
|
@@ -105,7 +96,7 @@ export const OfficesAtmsMapLayout = JSX<OfficesAtmsMapLayoutProps<Branch | Atm |
|
|
|
105
96
|
</div>
|
|
106
97
|
<div className="h-[600px]">
|
|
107
98
|
<ClientOnly>
|
|
108
|
-
|
|
99
|
+
<YandexMap points={points} isLoad={isLoad} className="h-full" />
|
|
109
100
|
</ClientOnly>
|
|
110
101
|
</div>
|
|
111
102
|
</div>
|
|
@@ -118,6 +109,19 @@ export const OfficesAtmsMapLayout = JSX<OfficesAtmsMapLayoutProps<Branch | Atm |
|
|
|
118
109
|
},
|
|
119
110
|
);
|
|
120
111
|
|
|
112
|
+
const renderHeading = (title?: string, lengthItems?: number) => (
|
|
113
|
+
<div className="flex flex-col sm:flex-row gap-xs mb-2xl">
|
|
114
|
+
<Heading headingType="h3">
|
|
115
|
+
<span suppressHydrationWarning={true}>{title}</span>
|
|
116
|
+
{lengthItems ? (
|
|
117
|
+
<Text size="text-h2" color="text-secondary-text">
|
|
118
|
+
<span suppressHydrationWarning={true}>{` (${lengthItems})`}</span>
|
|
119
|
+
</Text>
|
|
120
|
+
) : null}
|
|
121
|
+
</Heading>
|
|
122
|
+
</div>
|
|
123
|
+
);
|
|
124
|
+
|
|
121
125
|
const renderButtonsGroup = (
|
|
122
126
|
data: Branch[],
|
|
123
127
|
activeButton: string,
|