@redneckz/wildless-cms-uni-blocks 0.14.333 → 0.14.335
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 +118 -56
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/OfficesAtmsMap/OfficesAtmsMapLayout.d.ts +5 -2
- package/bundle/components/OfficesAtmsMap/OfficesAtmsMapProps.d.ts +15 -0
- package/bundle/components/OfficesAtmsMap/YandexMapProps.d.ts +1 -0
- package/bundle/components/OfficesAtmsMap/renderDescriptionBlock.d.ts +3 -0
- package/bundle/components/OfficesAtmsMap/renderRemoteWorkplaceCard.d.ts +7 -0
- package/bundle/components/OfficesAtmsMap/useOffices.d.ts +5 -2
- package/bundle/components/ProductGallery/ProductGallery.d.ts +1 -1
- package/bundle/icons/IconName.d.ts +4 -2
- package/bundle/ui-kit/YandexMap/YandexMap.d.ts +1 -1
- package/bundle/ui-kit/YandexMap/renderClusterer.d.ts +5 -1
- package/cosmos-static/icons/MapMarkerClusterYellowIcon.svg +1 -0
- package/cosmos-static/icons/sprites.svg +1 -0
- package/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.d.ts +5 -2
- package/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +27 -18
- package/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
- package/dist/components/OfficesAtmsMap/OfficesAtmsMapProps.d.ts +15 -0
- package/dist/components/OfficesAtmsMap/OfficesMap.js +12 -9
- package/dist/components/OfficesAtmsMap/OfficesMap.js.map +1 -1
- package/dist/components/OfficesAtmsMap/YandexMapProps.d.ts +1 -0
- package/dist/components/OfficesAtmsMap/renderDescriptionBlock.d.ts +3 -0
- package/dist/components/OfficesAtmsMap/renderDescriptionBlock.js +9 -0
- package/dist/components/OfficesAtmsMap/renderDescriptionBlock.js.map +1 -0
- package/dist/components/OfficesAtmsMap/renderFiltrationForm.js +2 -1
- package/dist/components/OfficesAtmsMap/renderFiltrationForm.js.map +1 -1
- package/dist/components/OfficesAtmsMap/renderRemoteWorkplaceCard.d.ts +7 -0
- package/dist/components/OfficesAtmsMap/renderRemoteWorkplaceCard.js +35 -0
- package/dist/components/OfficesAtmsMap/renderRemoteWorkplaceCard.js.map +1 -0
- package/dist/components/OfficesAtmsMap/useOffices.d.ts +5 -2
- package/dist/components/OfficesAtmsMap/useOffices.js +4 -2
- package/dist/components/OfficesAtmsMap/useOffices.js.map +1 -1
- package/dist/components/ProductGallery/ProductGallery.d.ts +1 -1
- package/dist/components/ProductGallery/ProductGallery.js +12 -5
- package/dist/components/ProductGallery/ProductGallery.js.map +1 -1
- package/dist/icons/IconName.d.ts +4 -2
- package/dist/icons/IconName.js +3 -1
- package/dist/icons/IconName.js.map +1 -1
- package/dist/ui-kit/YandexMap/YandexMap.d.ts +1 -1
- package/dist/ui-kit/YandexMap/YandexMap.js +2 -2
- package/dist/ui-kit/YandexMap/YandexMap.js.map +1 -1
- package/dist/ui-kit/YandexMap/renderClusterer.d.ts +5 -1
- package/dist/ui-kit/YandexMap/renderClusterer.js +33 -14
- package/dist/ui-kit/YandexMap/renderClusterer.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.d.ts +5 -2
- package/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +27 -18
- package/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
- package/lib/components/OfficesAtmsMap/OfficesAtmsMapProps.d.ts +15 -0
- package/lib/components/OfficesAtmsMap/OfficesMap.js +12 -9
- package/lib/components/OfficesAtmsMap/OfficesMap.js.map +1 -1
- package/lib/components/OfficesAtmsMap/YandexMapProps.d.ts +1 -0
- package/lib/components/OfficesAtmsMap/renderDescriptionBlock.d.ts +2 -0
- package/lib/components/OfficesAtmsMap/renderDescriptionBlock.js +6 -0
- package/lib/components/OfficesAtmsMap/renderDescriptionBlock.js.map +1 -0
- package/lib/components/OfficesAtmsMap/renderFiltrationForm.js +2 -1
- package/lib/components/OfficesAtmsMap/renderFiltrationForm.js.map +1 -1
- package/lib/components/OfficesAtmsMap/renderRemoteWorkplaceCard.d.ts +6 -0
- package/lib/components/OfficesAtmsMap/renderRemoteWorkplaceCard.js +31 -0
- package/lib/components/OfficesAtmsMap/renderRemoteWorkplaceCard.js.map +1 -0
- package/lib/components/OfficesAtmsMap/useOffices.d.ts +5 -2
- package/lib/components/OfficesAtmsMap/useOffices.js +4 -2
- package/lib/components/OfficesAtmsMap/useOffices.js.map +1 -1
- package/lib/components/ProductGallery/ProductGallery.d.ts +1 -1
- package/lib/components/ProductGallery/ProductGallery.js +12 -5
- package/lib/components/ProductGallery/ProductGallery.js.map +1 -1
- package/lib/icons/IconName.d.ts +4 -2
- package/lib/icons/IconName.js +3 -1
- package/lib/icons/IconName.js.map +1 -1
- package/lib/ui-kit/YandexMap/YandexMap.d.ts +1 -1
- package/lib/ui-kit/YandexMap/YandexMap.js +2 -2
- package/lib/ui-kit/YandexMap/YandexMap.js.map +1 -1
- package/lib/ui-kit/YandexMap/renderClusterer.d.ts +5 -1
- package/lib/ui-kit/YandexMap/renderClusterer.js +32 -13
- package/lib/ui-kit/YandexMap/renderClusterer.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +108 -50
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/OfficesAtmsMap/OfficesAtmsMapLayout.d.ts +5 -2
- package/mobile/bundle/components/OfficesAtmsMap/OfficesAtmsMapProps.d.ts +15 -0
- package/mobile/bundle/components/OfficesAtmsMap/YandexMapProps.d.ts +1 -0
- package/mobile/bundle/components/OfficesAtmsMap/renderDescriptionBlock.d.ts +3 -0
- package/mobile/bundle/components/OfficesAtmsMap/renderRemoteWorkplaceCard.d.ts +7 -0
- package/mobile/bundle/components/OfficesAtmsMap/useOffices.d.ts +5 -2
- package/mobile/bundle/icons/IconName.d.ts +4 -2
- package/mobile/bundle/ui-kit/YandexMap/YandexMap.d.ts +1 -1
- package/mobile/bundle/ui-kit/YandexMap/renderClusterer.d.ts +5 -1
- package/mobile/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.d.ts +5 -2
- package/mobile/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +27 -18
- package/mobile/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
- package/mobile/dist/components/OfficesAtmsMap/OfficesAtmsMapProps.d.ts +15 -0
- package/mobile/dist/components/OfficesAtmsMap/OfficesMap.js +12 -9
- package/mobile/dist/components/OfficesAtmsMap/OfficesMap.js.map +1 -1
- package/mobile/dist/components/OfficesAtmsMap/YandexMapProps.d.ts +1 -0
- package/mobile/dist/components/OfficesAtmsMap/renderDescriptionBlock.d.ts +3 -0
- package/mobile/dist/components/OfficesAtmsMap/renderDescriptionBlock.js +9 -0
- package/mobile/dist/components/OfficesAtmsMap/renderDescriptionBlock.js.map +1 -0
- package/mobile/dist/components/OfficesAtmsMap/renderFiltrationForm.js +2 -1
- package/mobile/dist/components/OfficesAtmsMap/renderFiltrationForm.js.map +1 -1
- package/mobile/dist/components/OfficesAtmsMap/renderRemoteWorkplaceCard.d.ts +7 -0
- package/mobile/dist/components/OfficesAtmsMap/renderRemoteWorkplaceCard.js +35 -0
- package/mobile/dist/components/OfficesAtmsMap/renderRemoteWorkplaceCard.js.map +1 -0
- package/mobile/dist/components/OfficesAtmsMap/useOffices.d.ts +5 -2
- package/mobile/dist/components/OfficesAtmsMap/useOffices.js +4 -2
- package/mobile/dist/components/OfficesAtmsMap/useOffices.js.map +1 -1
- package/mobile/dist/icons/IconName.d.ts +4 -2
- package/mobile/dist/icons/IconName.js +3 -1
- package/mobile/dist/icons/IconName.js.map +1 -1
- package/mobile/dist/ui-kit/YandexMap/YandexMap.d.ts +1 -1
- package/mobile/dist/ui-kit/YandexMap/YandexMap.js +2 -2
- package/mobile/dist/ui-kit/YandexMap/YandexMap.js.map +1 -1
- package/mobile/dist/ui-kit/YandexMap/renderClusterer.d.ts +5 -1
- package/mobile/dist/ui-kit/YandexMap/renderClusterer.js +33 -14
- package/mobile/dist/ui-kit/YandexMap/renderClusterer.js.map +1 -1
- package/mobile/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.d.ts +5 -2
- package/mobile/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +27 -18
- package/mobile/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
- package/mobile/lib/components/OfficesAtmsMap/OfficesAtmsMapProps.d.ts +15 -0
- package/mobile/lib/components/OfficesAtmsMap/OfficesMap.js +12 -9
- package/mobile/lib/components/OfficesAtmsMap/OfficesMap.js.map +1 -1
- package/mobile/lib/components/OfficesAtmsMap/YandexMapProps.d.ts +1 -0
- package/mobile/lib/components/OfficesAtmsMap/renderDescriptionBlock.d.ts +3 -0
- package/mobile/lib/components/OfficesAtmsMap/renderDescriptionBlock.js +6 -0
- package/mobile/lib/components/OfficesAtmsMap/renderDescriptionBlock.js.map +1 -0
- package/mobile/lib/components/OfficesAtmsMap/renderFiltrationForm.js +2 -1
- package/mobile/lib/components/OfficesAtmsMap/renderFiltrationForm.js.map +1 -1
- package/mobile/lib/components/OfficesAtmsMap/renderRemoteWorkplaceCard.d.ts +7 -0
- package/mobile/lib/components/OfficesAtmsMap/renderRemoteWorkplaceCard.js +31 -0
- package/mobile/lib/components/OfficesAtmsMap/renderRemoteWorkplaceCard.js.map +1 -0
- package/mobile/lib/components/OfficesAtmsMap/useOffices.d.ts +5 -2
- package/mobile/lib/components/OfficesAtmsMap/useOffices.js +4 -2
- package/mobile/lib/components/OfficesAtmsMap/useOffices.js.map +1 -1
- package/mobile/lib/icons/IconName.d.ts +4 -2
- package/mobile/lib/icons/IconName.js +3 -1
- package/mobile/lib/icons/IconName.js.map +1 -1
- package/mobile/lib/ui-kit/YandexMap/YandexMap.d.ts +1 -1
- package/mobile/lib/ui-kit/YandexMap/YandexMap.js +2 -2
- package/mobile/lib/ui-kit/YandexMap/YandexMap.js.map +1 -1
- package/mobile/lib/ui-kit/YandexMap/renderClusterer.d.ts +5 -1
- package/mobile/lib/ui-kit/YandexMap/renderClusterer.js +32 -13
- package/mobile/lib/ui-kit/YandexMap/renderClusterer.js.map +1 -1
- package/mobile/src/components/OfficesAtmsMap/OfficesAtmsMapLayout.tsx +34 -45
- package/mobile/src/components/OfficesAtmsMap/OfficesAtmsMapProps.tsx +15 -0
- package/mobile/src/components/OfficesAtmsMap/OfficesMap.tsx +28 -12
- package/mobile/src/components/OfficesAtmsMap/YandexMapProps.ts +1 -0
- package/mobile/src/components/OfficesAtmsMap/renderDescriptionBlock.tsx +29 -0
- package/mobile/src/components/OfficesAtmsMap/renderFiltrationForm.tsx +2 -1
- package/mobile/src/components/OfficesAtmsMap/renderRemoteWorkplaceCard.tsx +86 -0
- package/mobile/src/components/OfficesAtmsMap/useOffices.ts +11 -4
- package/mobile/src/icons/IconName.ts +5 -5
- package/mobile/src/icons/MapMarkerClusterYellowIcon.svg +1 -0
- package/mobile/src/ui-kit/YandexMap/YandexMap.tsx +3 -3
- package/mobile/src/ui-kit/YandexMap/renderClusterer.ts +62 -16
- package/package.json +1 -1
- package/src/components/OfficesAtmsMap/OfficesAtmsMapLayout.tsx +34 -45
- package/src/components/OfficesAtmsMap/OfficesAtmsMapProps.tsx +15 -0
- package/src/components/OfficesAtmsMap/OfficesMap.tsx +28 -12
- package/src/components/OfficesAtmsMap/YandexMapProps.ts +1 -0
- package/src/components/OfficesAtmsMap/renderDescriptionBlock.tsx +29 -0
- package/src/components/OfficesAtmsMap/renderFiltrationForm.tsx +2 -1
- package/src/components/OfficesAtmsMap/renderRemoteWorkplaceCard.tsx +86 -0
- package/src/components/OfficesAtmsMap/useOffices.ts +11 -4
- package/src/components/ProductGallery/ProductGallery.tsx +37 -7
- package/src/icons/IconName.ts +5 -1
- package/src/icons/MapMarkerClusterYellowIcon.svg +1 -0
- package/src/ui-kit/YandexMap/YandexMap.tsx +3 -3
- package/src/ui-kit/YandexMap/renderClusterer.ts +62 -16
|
@@ -1,10 +1,34 @@
|
|
|
1
|
-
|
|
1
|
+
const MapMarkerClusterIcon = '/icons/MapMarkerClusterIcon.svg';
|
|
2
|
+
const MapMarkerClusterYellowIcon = '/icons/MapMarkerClusterYellowIcon.svg';
|
|
3
|
+
export function renderClusterer({ yandexMaps, map, points, }) {
|
|
2
4
|
map.geoObjects.removeAll();
|
|
3
5
|
const clusterIconContentLayout = yandexMaps.templateLayoutFactory.createClass('<div style="margin-top: -3px;">{{properties.geoObjects.length}}</div>');
|
|
4
|
-
const
|
|
6
|
+
const officeClusterer = defineClusterer('offices', yandexMaps, clusterIconContentLayout);
|
|
7
|
+
if (points.length && points.every((_) => 'type' in _)) {
|
|
8
|
+
const remoteWorkplaceClusterer = defineClusterer('workplaces', yandexMaps, clusterIconContentLayout);
|
|
9
|
+
const remoteWorkplaceGeoObjects = defineGeoObjects(points.filter((_) => _.type === 'workplaces'), 'workplaces', yandexMaps);
|
|
10
|
+
const officesGeoObjects = defineGeoObjects(points.filter((_) => _.type === 'offices'), 'offices', yandexMaps);
|
|
11
|
+
officeClusterer.add(officesGeoObjects);
|
|
12
|
+
remoteWorkplaceClusterer.add(remoteWorkplaceGeoObjects);
|
|
13
|
+
map.geoObjects.add(remoteWorkplaceClusterer);
|
|
14
|
+
map.geoObjects.add(officeClusterer);
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
const geoObjects = defineGeoObjects(points, 'offices', yandexMaps);
|
|
18
|
+
officeClusterer.add(geoObjects);
|
|
19
|
+
map.geoObjects.add(officeClusterer);
|
|
20
|
+
}
|
|
21
|
+
map.setBounds(yandexMaps.util.bounds.fromPoints(points.map((_) => _.coords))).then(() => {
|
|
22
|
+
if (map.getZoom() > 10) {
|
|
23
|
+
map.setZoom(10);
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
const defineClusterer = (type, yandexMaps, clusterIconContentLayout) => {
|
|
28
|
+
return new yandexMaps.Clusterer({
|
|
5
29
|
clusterIcons: [
|
|
6
30
|
{
|
|
7
|
-
href: '
|
|
31
|
+
href: type === 'offices' ? MapMarkerClusterIcon : MapMarkerClusterYellowIcon,
|
|
8
32
|
size: [78, 84],
|
|
9
33
|
offset: [-35, -50],
|
|
10
34
|
},
|
|
@@ -13,23 +37,18 @@ export function renderClusterer(yandexMaps, map, points) {
|
|
|
13
37
|
clusterHideIconOnBalloonOpen: false,
|
|
14
38
|
geoObjectHideIconOnBalloonOpen: false,
|
|
15
39
|
});
|
|
16
|
-
|
|
40
|
+
};
|
|
41
|
+
const defineGeoObjects = (pointArr, type, yandexMaps) => {
|
|
42
|
+
return pointArr.map(({ coords, content }) => new yandexMaps.Placemark(coords, {
|
|
17
43
|
balloonContentHeader: content?.header,
|
|
18
44
|
balloonContentBody: content?.body,
|
|
19
45
|
balloonContentFooter: content?.footer,
|
|
20
46
|
hintContent: content?.hint,
|
|
21
47
|
}, {
|
|
22
48
|
iconLayout: 'default#image',
|
|
23
|
-
iconImageHref: '
|
|
49
|
+
iconImageHref: type === 'offices' ? MapMarkerClusterIcon : MapMarkerClusterYellowIcon,
|
|
24
50
|
iconImageSize: [78, 84],
|
|
25
51
|
iconImageOffset: [-35, -50],
|
|
26
52
|
}));
|
|
27
|
-
|
|
28
|
-
map.geoObjects.add(clusterer);
|
|
29
|
-
map.setBounds(yandexMaps.util.bounds.fromPoints(points.map((_) => _.coords))).then(() => {
|
|
30
|
-
if (map.getZoom() > 10) {
|
|
31
|
-
map.setZoom(10);
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
}
|
|
53
|
+
};
|
|
35
54
|
//# sourceMappingURL=renderClusterer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderClusterer.js","sourceRoot":"","sources":["../../../src/ui-kit/YandexMap/renderClusterer.ts"],"names":[],"mappings":"AAMA,MAAM,UAAU,eAAe,CAAC,
|
|
1
|
+
{"version":3,"file":"renderClusterer.js","sourceRoot":"","sources":["../../../src/ui-kit/YandexMap/renderClusterer.ts"],"names":[],"mappings":"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"}
|
|
@@ -4130,13 +4130,37 @@
|
|
|
4130
4130
|
childSchema: (content) => content?.filtrationSchema || {},
|
|
4131
4131
|
});
|
|
4132
4132
|
|
|
4133
|
-
|
|
4133
|
+
const MapMarkerClusterIcon = '/icons/MapMarkerClusterIcon.svg';
|
|
4134
|
+
const MapMarkerClusterYellowIcon = '/icons/MapMarkerClusterYellowIcon.svg';
|
|
4135
|
+
function renderClusterer({ yandexMaps, map, points, }) {
|
|
4134
4136
|
map.geoObjects.removeAll();
|
|
4135
4137
|
const clusterIconContentLayout = yandexMaps.templateLayoutFactory.createClass('<div style="margin-top: -3px;">{{properties.geoObjects.length}}</div>');
|
|
4136
|
-
const
|
|
4138
|
+
const officeClusterer = defineClusterer('offices', yandexMaps, clusterIconContentLayout);
|
|
4139
|
+
if (points.length && points.every((_) => 'type' in _)) {
|
|
4140
|
+
const remoteWorkplaceClusterer = defineClusterer('workplaces', yandexMaps, clusterIconContentLayout);
|
|
4141
|
+
const remoteWorkplaceGeoObjects = defineGeoObjects(points.filter((_) => _.type === 'workplaces'), 'workplaces', yandexMaps);
|
|
4142
|
+
const officesGeoObjects = defineGeoObjects(points.filter((_) => _.type === 'offices'), 'offices', yandexMaps);
|
|
4143
|
+
officeClusterer.add(officesGeoObjects);
|
|
4144
|
+
remoteWorkplaceClusterer.add(remoteWorkplaceGeoObjects);
|
|
4145
|
+
map.geoObjects.add(remoteWorkplaceClusterer);
|
|
4146
|
+
map.geoObjects.add(officeClusterer);
|
|
4147
|
+
}
|
|
4148
|
+
else {
|
|
4149
|
+
const geoObjects = defineGeoObjects(points, 'offices', yandexMaps);
|
|
4150
|
+
officeClusterer.add(geoObjects);
|
|
4151
|
+
map.geoObjects.add(officeClusterer);
|
|
4152
|
+
}
|
|
4153
|
+
map.setBounds(yandexMaps.util.bounds.fromPoints(points.map((_) => _.coords))).then(() => {
|
|
4154
|
+
if (map.getZoom() > 10) {
|
|
4155
|
+
map.setZoom(10);
|
|
4156
|
+
}
|
|
4157
|
+
});
|
|
4158
|
+
}
|
|
4159
|
+
const defineClusterer = (type, yandexMaps, clusterIconContentLayout) => {
|
|
4160
|
+
return new yandexMaps.Clusterer({
|
|
4137
4161
|
clusterIcons: [
|
|
4138
4162
|
{
|
|
4139
|
-
href: '
|
|
4163
|
+
href: type === 'offices' ? MapMarkerClusterIcon : MapMarkerClusterYellowIcon,
|
|
4140
4164
|
size: [78, 84],
|
|
4141
4165
|
offset: [-35, -50],
|
|
4142
4166
|
},
|
|
@@ -4145,25 +4169,20 @@
|
|
|
4145
4169
|
clusterHideIconOnBalloonOpen: false,
|
|
4146
4170
|
geoObjectHideIconOnBalloonOpen: false,
|
|
4147
4171
|
});
|
|
4148
|
-
|
|
4172
|
+
};
|
|
4173
|
+
const defineGeoObjects = (pointArr, type, yandexMaps) => {
|
|
4174
|
+
return pointArr.map(({ coords, content }) => new yandexMaps.Placemark(coords, {
|
|
4149
4175
|
balloonContentHeader: content?.header,
|
|
4150
4176
|
balloonContentBody: content?.body,
|
|
4151
4177
|
balloonContentFooter: content?.footer,
|
|
4152
4178
|
hintContent: content?.hint,
|
|
4153
4179
|
}, {
|
|
4154
4180
|
iconLayout: 'default#image',
|
|
4155
|
-
iconImageHref: '
|
|
4181
|
+
iconImageHref: type === 'offices' ? MapMarkerClusterIcon : MapMarkerClusterYellowIcon,
|
|
4156
4182
|
iconImageSize: [78, 84],
|
|
4157
4183
|
iconImageOffset: [-35, -50],
|
|
4158
4184
|
}));
|
|
4159
|
-
|
|
4160
|
-
map.geoObjects.add(clusterer);
|
|
4161
|
-
map.setBounds(yandexMaps.util.bounds.fromPoints(points.map((_) => _.coords))).then(() => {
|
|
4162
|
-
if (map.getZoom() > 10) {
|
|
4163
|
-
map.setZoom(10);
|
|
4164
|
-
}
|
|
4165
|
-
});
|
|
4166
|
-
}
|
|
4185
|
+
};
|
|
4167
4186
|
|
|
4168
4187
|
const styles$1 = {
|
|
4169
4188
|
focus: 'focus:border-primary-text focus:border',
|
|
@@ -4295,11 +4314,11 @@
|
|
|
4295
4314
|
controls: [],
|
|
4296
4315
|
suppressMapOpenBlock: true,
|
|
4297
4316
|
});
|
|
4298
|
-
renderClusterer(yandexMaps, map.current, points);
|
|
4317
|
+
renderClusterer({ yandexMaps, map: map.current, points });
|
|
4299
4318
|
});
|
|
4300
4319
|
}
|
|
4301
4320
|
else if (yandexMaps) {
|
|
4302
|
-
renderClusterer(yandexMaps, map.current, points);
|
|
4321
|
+
renderClusterer({ yandexMaps, map: map.current, points });
|
|
4303
4322
|
if (!points?.length) {
|
|
4304
4323
|
map.current.setCenter(DEFAULT_CENTER_COORDS);
|
|
4305
4324
|
}
|
|
@@ -4318,6 +4337,8 @@
|
|
|
4318
4337
|
const mapByIndex = (points, index) => points.map((_) => _.coords[index]);
|
|
4319
4338
|
const getArraySumAndAverage = (arr) => arr.length && arr.reduce((a, b) => a + b) / arr.length;
|
|
4320
4339
|
|
|
4340
|
+
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;
|
|
4341
|
+
|
|
4321
4342
|
const FILTRATION_LABELS = {
|
|
4322
4343
|
safeBoxCaseVolumes: 'Аренда индивидуальных сейфовых ячеек',
|
|
4323
4344
|
workingSaturday: 'Открыты по субботам',
|
|
@@ -4332,14 +4353,14 @@
|
|
|
4332
4353
|
bullionOperations: 'Операции со слитками',
|
|
4333
4354
|
preciousMetalsOperations: 'Операции с драгоценными металлами',
|
|
4334
4355
|
transferringDataToBiometricSystem: 'Передача фото и голоса в Единую биометрическую систему',
|
|
4356
|
+
remoteWorkplace: 'Удаленное рабочее место',
|
|
4335
4357
|
};
|
|
4336
4358
|
const COMMON_FILTERS_STYLES = 'flex flex-col sm:flex-row sm:flex-wrap gap-3xl pb-2xl';
|
|
4337
4359
|
const renderFiltrationForm = (filters, { field, reset }, onlyOffice) => {
|
|
4338
|
-
const visibleFiltersNum =
|
|
4360
|
+
const visibleFiltersNum = 4;
|
|
4339
4361
|
const filtersCheckbox = (filters || []).map((key) => (jsx(Checkbox, { text: FILTRATION_LABELS[key], ...field(key) }, key)));
|
|
4340
|
-
const [visibleFilters, hiddenFilters] = visibleFiltersNum
|
|
4341
|
-
|
|
4342
|
-
: [filtersCheckbox, []];
|
|
4362
|
+
const [visibleFilters, hiddenFilters] = [filtersCheckbox.slice(0, visibleFiltersNum), filtersCheckbox.slice(visibleFiltersNum)]
|
|
4363
|
+
;
|
|
4343
4364
|
return (jsx("div", { children: filters?.length ? (jsx("div", { children: 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, onlyOffice) }) })) : null }));
|
|
4344
4365
|
};
|
|
4345
4366
|
const renderFoldButton$1 = (reset, onlyOffice) => ({ isUnfolded, onToggle }) => {
|
|
@@ -4351,37 +4372,47 @@
|
|
|
4351
4372
|
const defaultEmptyFunction = () => void 0;
|
|
4352
4373
|
const defaultFilterItems = () => [];
|
|
4353
4374
|
const filtersVisibleStyles = (activeButton) => activeButton === 'all' ? 'block' : 'hidden';
|
|
4354
|
-
const OfficesAtmsMapLayout = JSX(({ className, data = [], renderCard = defaultEmptyFunction, filterItems = defaultFilterItems, getBalloon = defaultEmptyFunction, initFilterState = {}, descriptionData, title, }) => {
|
|
4375
|
+
const OfficesAtmsMapLayout = JSX(({ className, data = [], remoteWorkplaces = [], renderCard = defaultEmptyFunction, renderRemoteWorkplaceCard = defaultEmptyFunction, filterItems = defaultFilterItems, getBalloon = defaultEmptyFunction, getBalloonRemoteWorkplaces = defaultEmptyFunction, initFilterState = {}, descriptionData, title, }) => {
|
|
4355
4376
|
const onlyOffice = title?.includes('Офис');
|
|
4356
4377
|
const [filtrationState, { field, reset }] = useForm(initFilterState);
|
|
4357
|
-
const [filteredItems, points, lengthItems] = useMemo(() => {
|
|
4378
|
+
const [filteredItems, points, filteredRemoteWorkplaces, lengthItems] = useMemo(() => {
|
|
4358
4379
|
const _filteredItems = filterItems(data, filtrationState);
|
|
4359
|
-
const
|
|
4360
|
-
|
|
4361
|
-
|
|
4362
|
-
|
|
4363
|
-
|
|
4364
|
-
|
|
4365
|
-
|
|
4366
|
-
|
|
4380
|
+
const _filteredRemoteWorkplaces = filterItems(remoteWorkplaces, filtrationState);
|
|
4381
|
+
const _points = [
|
|
4382
|
+
..._filteredItems.map((_) => ({
|
|
4383
|
+
type: 'offices',
|
|
4384
|
+
coords: [Number(_.gpsLatitude), Number(_.gpsLongitude)]?.filter(Boolean),
|
|
4385
|
+
content: getBalloon(_),
|
|
4386
|
+
})),
|
|
4387
|
+
..._filteredRemoteWorkplaces.map((_) => ({
|
|
4388
|
+
type: 'workplaces',
|
|
4389
|
+
coords: [Number(_.gpsLatitude), Number(_.gpsLongitude)]?.filter(Boolean),
|
|
4390
|
+
content: getBalloonRemoteWorkplaces({
|
|
4391
|
+
address: _.address,
|
|
4392
|
+
workScheduleDescription: _.workScheduleDescription,
|
|
4393
|
+
}),
|
|
4394
|
+
})),
|
|
4395
|
+
].filter((_) => _.coords && _.coords.length === 2);
|
|
4396
|
+
const itemsLength = _filteredItems.length + _filteredRemoteWorkplaces?.length;
|
|
4397
|
+
return [_filteredItems, _points, _filteredRemoteWorkplaces, itemsLength];
|
|
4398
|
+
}, [data, remoteWorkplaces, filtrationState]);
|
|
4367
4399
|
const [activeButton, setActiveButton] = useState('all');
|
|
4368
|
-
return (jsxs("div", { className: style('space-y-1', className), children: [jsxs("div", { className: "bg-white", children: [jsxs("div", { className: "p-6xl pb-0", children: [jsx("div", { className: "flex flex-col sm:flex-row gap-xs mb-2xl", children: jsxs(Heading, { headingType: "h2", children: [title, lengthItems ? (jsx(Text, { size: "text-h2", color: "text-secondary-text", children: ` (${lengthItems})` })) : null] }) }), descriptionData ? renderDescriptionBlock$1(descriptionData) : null, onlyOffice && renderButtonsGroup(data, activeButton, setActiveButton), jsx("div", { className: style('pb-2xl', filtersVisibleStyles(activeButton)), children: renderFiltrationForm(Object.keys(initFilterState), { field, reset }, onlyOffice) })] }), jsx("div", { className: "h-[600px]", children: jsx(ClientOnly, { children: jsx(YandexMap, { points: points, className: "h-full" }) }) })] }), filteredItems.map(renderCard)] }));
|
|
4400
|
+
return (jsxs("div", { className: style('space-y-1', className), children: [jsxs("div", { className: "bg-white", children: [jsxs("div", { className: "p-6xl pb-0", children: [jsx("div", { className: "flex flex-col sm:flex-row gap-xs mb-2xl", children: jsxs(Heading, { headingType: "h2", children: [title, lengthItems ? (jsx(Text, { size: "text-h2", color: "text-secondary-text", children: ` (${lengthItems})` })) : null] }) }), descriptionData ? renderDescriptionBlock$1(descriptionData) : null, onlyOffice && renderButtonsGroup(data, activeButton, setActiveButton), jsx("div", { className: style('pb-2xl', filtersVisibleStyles(activeButton)), children: renderFiltrationForm(Object.keys(initFilterState), { field, reset }, onlyOffice) })] }), jsx("div", { className: "h-[600px]", children: jsx(ClientOnly, { children: jsx(YandexMap, { points: points, className: "h-full" }) }) })] }), filteredItems.map(renderCard), filteredRemoteWorkplaces.map(renderRemoteWorkplaceCard)] }));
|
|
4369
4401
|
});
|
|
4370
|
-
const renderButtonsGroup = (data, activeButton,
|
|
4402
|
+
const renderButtonsGroup = (data, activeButton, onButtonClick) => {
|
|
4371
4403
|
const allButtonVersion = activeButton === 'all' ? 'primary' : 'secondary';
|
|
4372
4404
|
const businessButtonVersion = activeButton === 'business' ? 'primary' : 'secondary';
|
|
4373
|
-
const
|
|
4405
|
+
const handleClick = (e, key, branches) => {
|
|
4374
4406
|
if (e.currentTarget === e.target && key === 'business') {
|
|
4375
4407
|
branches.filter((branch) => branch.workSchedule &&
|
|
4376
4408
|
branch.workSchedule.businessScheduleVisibleTag &&
|
|
4377
4409
|
!branch.workSchedule.businessScheduleDescription);
|
|
4378
4410
|
}
|
|
4379
|
-
|
|
4411
|
+
onButtonClick(key);
|
|
4380
4412
|
return branches;
|
|
4381
4413
|
};
|
|
4382
|
-
return (jsxs("div", { className: "flex gap-lg flex-col sm:flex-row pb-lg", children: [jsx(Button, { "data-id": "all", onClick: (e) =>
|
|
4414
|
+
return (jsxs("div", { className: "flex gap-lg flex-col sm:flex-row pb-lg", children: [jsx(Button, { "data-id": "all", onClick: (e) => handleClick(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) => handleClick(e, 'business', data), version: businessButtonVersion, children: "\u0414\u043B\u044F \u044E\u0440\u0438\u0434\u0438\u0447\u0435\u0441\u043A\u0438\u0445 \u043B\u0438\u0446" })] }));
|
|
4383
4415
|
};
|
|
4384
|
-
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;
|
|
4385
4416
|
|
|
4386
4417
|
const colorStyle = {
|
|
4387
4418
|
yellow: { border: 'border-yellow-light', text: 'text-yellow' },
|
|
@@ -4605,7 +4636,7 @@
|
|
|
4605
4636
|
return null;
|
|
4606
4637
|
}
|
|
4607
4638
|
const workScheduleWeek = getWorkScheduleWeek(workSchedule);
|
|
4608
|
-
return (jsxs("div", { className: "bg-white col-span-12 p-3xl sm:border-green sm:border", children: [jsxs("div", { className: "sm:flex sm:justify-between", children: [jsxs("div", { children: [jsx(Text, { size: "text-h4", children: name }), address ? (jsxs("div", { className: "flex pb-xl pt-xs gap-2xs", children: [jsx(Icon, { name: "GeolocationIcon", width: "24", height: "24" }), jsx(Text, { size: "text-l", children: address })] })) : null] }), renderCurrentDaySchedule(workScheduleWeek)] }), jsx("div", { className: "hidden sm:block", children: renderCardContent({
|
|
4639
|
+
return (jsxs("div", { className: "bg-white col-span-12 p-3xl sm:border-green sm:border", children: [jsxs("div", { className: "sm:flex sm:justify-between", children: [jsxs("div", { children: [jsx(Text, { size: "text-h4", children: name }), address ? (jsxs("div", { className: "flex pb-xl pt-xs gap-2xs", children: [jsx(Icon, { name: "GeolocationIcon", width: "24", height: "24" }), jsx(Text, { size: "text-l", children: address })] })) : null] }), renderCurrentDaySchedule(workScheduleWeek)] }), jsx("div", { className: "hidden sm:block", children: renderCardContent$1({
|
|
4609
4640
|
phone,
|
|
4610
4641
|
fax,
|
|
4611
4642
|
phoneBusiness,
|
|
@@ -4615,7 +4646,7 @@
|
|
|
4615
4646
|
workSchedule,
|
|
4616
4647
|
exchangeRate,
|
|
4617
4648
|
}) }), jsx(Foldable, { className: "block sm:hidden", renderFoldableSection: ({ isUnfolded }) => {
|
|
4618
|
-
return (jsx(FoldableSection, { isUnfolded: isUnfolded, children: renderCardContent({
|
|
4649
|
+
return (jsx(FoldableSection, { isUnfolded: isUnfolded, children: renderCardContent$1({
|
|
4619
4650
|
phone,
|
|
4620
4651
|
fax,
|
|
4621
4652
|
phoneBusiness,
|
|
@@ -4629,7 +4660,7 @@
|
|
|
4629
4660
|
//** TODO: remove styles with refactoring DefaultFoldButton*/
|
|
4630
4661
|
renderFoldButton: ({ isUnfolded, onToggle }) => renderFoldButton({ isUnfolded, onToggle }) })] }, String(index)));
|
|
4631
4662
|
};
|
|
4632
|
-
const renderCardContent = ({ phone, fax, phoneBusiness, phoneNatural, phoneCallCentre, phoneCurrencyControl, workSchedule, exchangeRate, }) => {
|
|
4663
|
+
const renderCardContent$1 = ({ phone, fax, phoneBusiness, phoneNatural, phoneCallCentre, phoneCurrencyControl, workSchedule, exchangeRate, }) => {
|
|
4633
4664
|
const workScheduleWeek = getWorkScheduleWeek(workSchedule);
|
|
4634
4665
|
const labelSchedule = workSchedule?.businessScheduleVisibleTag
|
|
4635
4666
|
? 'Для физических лиц'
|
|
@@ -4645,13 +4676,38 @@
|
|
|
4645
4676
|
return { header, body };
|
|
4646
4677
|
};
|
|
4647
4678
|
|
|
4679
|
+
const renderRemoteWorkplaceCard = ({ address, workScheduleDescription }, index) => {
|
|
4680
|
+
if (!workScheduleDescription) {
|
|
4681
|
+
return null;
|
|
4682
|
+
}
|
|
4683
|
+
return (jsxs("div", { className: "bg-white col-span-12 p-3xl sm:border-green sm:border", children: [jsx("div", { className: "sm:flex sm:justify-between", children: jsxs("div", { children: [jsx(Text, { size: "text-h4", children: "\u0423\u0434\u0430\u043B\u0435\u043D\u043D\u043E\u0435 \u0440\u0430\u0431\u043E\u0447\u0435\u0435 \u043C\u0435\u0441\u0442\u043E" }), address ? (jsxs("div", { className: "flex pb-xl pt-xs gap-2xs", children: [jsx(Icon, { name: "GeolocationIcon", width: "24", height: "24" }), jsx(Text, { size: "text-l", children: address })] })) : null] }) }), jsx("div", { className: "hidden sm:block", children: renderCardContent({
|
|
4684
|
+
workScheduleDescription,
|
|
4685
|
+
}) }), jsx(Foldable, { className: "block sm:hidden", renderFoldableSection: ({ isUnfolded }) => {
|
|
4686
|
+
return (jsx(FoldableSection, { isUnfolded: isUnfolded, children: renderCardContent({
|
|
4687
|
+
workScheduleDescription,
|
|
4688
|
+
}) }));
|
|
4689
|
+
},
|
|
4690
|
+
//** TODO: remove styles with refactoring DefaultFoldButton*/
|
|
4691
|
+
renderFoldButton: ({ isUnfolded, onToggle }) => renderFoldButton({ isUnfolded, onToggle }) })] }, String(index)));
|
|
4692
|
+
};
|
|
4693
|
+
const renderCardContent = ({ workScheduleDescription }) => {
|
|
4694
|
+
return (jsxs("div", { children: [jsxs(CardRow, { className: "flex", children: [jsx(CardCell, { label: "\u041E\u043F\u0435\u0440\u0430\u0446\u0438\u0438 \u0434\u043B\u044F \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043A\u0438\u0445 \u043B\u0438\u0446", children: jsx(Text, { children: "\u041E\u0444\u043E\u0440\u043C\u043B\u0435\u043D\u0438\u0435 \u0438 \u043E\u0431\u0441\u043B\u0443\u0436\u0438\u0432\u0430\u043D\u0438\u0435 \u043A\u0440\u0435\u0434\u0438\u0442\u043E\u0432, \u0441\u0447\u0435\u0442\u043E\u0432, \u0432\u043A\u043B\u0430\u0434\u043E\u0432" }) }), jsx(CardCell, { label: "\u041E\u043F\u0435\u0440\u0430\u0446\u0438\u0438 \u0434\u043B\u044F \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043A\u0438\u0445 \u043B\u0438\u0446", children: jsx(Text, { children: "\u041E\u0444\u043E\u0440\u043C\u043B\u0435\u043D\u0438\u0435 \u0438 \u043E\u0431\u0441\u043B\u0443\u0436\u0438\u0432\u0430\u043D\u0438\u0435 \u0431\u0430\u043D\u043A\u043E\u0432\u0441\u043A\u0438\u0445 \u043A\u0430\u0440\u0442" }) }), jsx(CardCell, { label: "\u041E\u043F\u0435\u0440\u0430\u0446\u0438\u0438 \u0434\u043B\u044F \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043A\u0438\u0445 \u043B\u0438\u0446", children: jsx(Text, { children: "\u0418\u043D\u0432\u0435\u0441\u0442\u0438\u0446\u0438\u043E\u043D\u043D\u043E\u0435 \u0438 \u043D\u0430\u043A\u043E\u043F\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0435 \u0441\u0442\u0440\u0430\u0445\u043E\u0432\u0430\u043D\u0438\u0435" }) }), jsx(CardCell, { label: "\u041E\u043F\u0435\u0440\u0430\u0446\u0438\u0438 \u0434\u043B\u044F \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043A\u0438\u0445 \u043B\u0438\u0446", children: jsx(Text, { children: "\u0411\u0435\u0437\u043D\u0430\u043B\u0438\u0447\u043D\u044B\u0435 \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u0438 \u0432 \u0440\u0443\u0431\u043B\u044F\u0445, \u043F\u0435\u0440\u0435\u0432\u043E\u0434\u044B \u0431\u0435\u0437 \u043E\u0442\u043A\u0440\u044B\u0442\u0438\u044F \u0441\u0447\u0451\u0442\u0430" }) })] }), jsx(CardCell, { label: "\u0420\u0435\u0436\u0438\u043C \u0440\u0430\u0431\u043E\u0442\u044B", className: "max-w-none", children: jsx(Text, { children: workScheduleDescription }) })] }));
|
|
4695
|
+
};
|
|
4696
|
+
const getRemoteWorkplacePoint = ({ address = '', workScheduleDescription, }) => {
|
|
4697
|
+
const header = 'Удаленное рабочее место';
|
|
4698
|
+
const body = `${address} ${workScheduleDescription}`;
|
|
4699
|
+
return { header, body };
|
|
4700
|
+
};
|
|
4701
|
+
|
|
4648
4702
|
const EMPTY_VALUE$1 = [];
|
|
4649
4703
|
function useOffices(regionCode) {
|
|
4650
|
-
const { data = EMPTY_VALUE$1 } = useAsyncData(`/api/v1/
|
|
4704
|
+
const { data = EMPTY_VALUE$1 } = useAsyncData(`/api/v1/branchesAndRemoteWorkplaces?regionCode=${regionCode}`, fetchMap);
|
|
4651
4705
|
return data;
|
|
4652
4706
|
}
|
|
4653
4707
|
const fetchMap = async (url) => {
|
|
4654
|
-
const result = await fetchJSON(url, {
|
|
4708
|
+
const result = await fetchJSON(url, {
|
|
4709
|
+
method: 'GET',
|
|
4710
|
+
});
|
|
4655
4711
|
return Array.isArray(result) ? result : EMPTY_VALUE$1;
|
|
4656
4712
|
};
|
|
4657
4713
|
|
|
@@ -4659,6 +4715,7 @@
|
|
|
4659
4715
|
workingSaturday: false,
|
|
4660
4716
|
premiumService: false,
|
|
4661
4717
|
privateBanking: false,
|
|
4718
|
+
remoteWorkplace: false,
|
|
4662
4719
|
sellingCoins: false,
|
|
4663
4720
|
buyingCoins: false,
|
|
4664
4721
|
bullionOperations: false,
|
|
@@ -4666,20 +4723,21 @@
|
|
|
4666
4723
|
transferringDataToBiometricSystem: false,
|
|
4667
4724
|
};
|
|
4668
4725
|
const FILTRATION_PREDICATES = {
|
|
4669
|
-
workingSaturday: (item) => Boolean(item.workSchedule?.workingSaturday),
|
|
4670
|
-
premiumService: (item) => Boolean(item.premiumService),
|
|
4671
|
-
privateBanking: (item) => Boolean(item.privateBanking),
|
|
4672
|
-
|
|
4673
|
-
|
|
4674
|
-
|
|
4675
|
-
|
|
4676
|
-
|
|
4726
|
+
workingSaturday: (item) => Boolean('workSchedule' in item && item.workSchedule?.workingSaturday),
|
|
4727
|
+
premiumService: (item) => Boolean('premiumService' in item && item.premiumService),
|
|
4728
|
+
privateBanking: (item) => Boolean('privateBanking' in item && item.privateBanking),
|
|
4729
|
+
remoteWorkplace: (item) => Boolean('workScheduleDescription' in item),
|
|
4730
|
+
sellingCoins: (item) => Boolean('sellingCoins' in item && item.sellingCoins),
|
|
4731
|
+
buyingCoins: (item) => Boolean('buyingCoins' in item && item.buyingCoins),
|
|
4732
|
+
bullionOperations: (item) => Boolean('bullionOperations' in item && item.bullionOperations),
|
|
4733
|
+
preciousMetalsOperations: (item) => Boolean('preciousMetalsOperations' in item && item.preciousMetalsOperations),
|
|
4734
|
+
transferringDataToBiometricSystem: (item) => Boolean('transferringDataToBiometricSystem' in item && item.transferringDataToBiometricSystem),
|
|
4677
4735
|
};
|
|
4678
4736
|
const OfficesMap = JSX(({ className }) => {
|
|
4679
4737
|
const [currentLocation] = useLocation();
|
|
4680
4738
|
const regionCode = currentLocation?.code ?? '000';
|
|
4681
4739
|
const officesData = useOffices(regionCode);
|
|
4682
|
-
return (jsx(OfficesAtmsMapLayout, { className: className, filterItems: filterItems, data: officesData, initFilterState: INITIAL_FILTRATION_STATE, renderCard: renderOfficeCard, getBalloon: getOfficePoint, title: `Офисы филиала ${currentLocation?.name}` }));
|
|
4740
|
+
return (jsx(OfficesAtmsMapLayout, { className: className, filterItems: filterItems, data: officesData[0]?.branches, remoteWorkplaces: officesData[0]?.remoteWorkplaces, initFilterState: INITIAL_FILTRATION_STATE, renderCard: renderOfficeCard, renderRemoteWorkplaceCard: renderRemoteWorkplaceCard, getBalloon: getOfficePoint, getBalloonRemoteWorkplaces: getRemoteWorkplacePoint, title: `Офисы филиала ${currentLocation?.name}` }));
|
|
4683
4741
|
});
|
|
4684
4742
|
const filterItems = (data, filtrationState) => {
|
|
4685
4743
|
const truthyFilters = Object.keys(filtrationState).filter((key) => filtrationState[key]);
|
|
@@ -5732,7 +5790,7 @@
|
|
|
5732
5790
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
5733
5791
|
});
|
|
5734
5792
|
|
|
5735
|
-
const packageVersion = "0.14.
|
|
5793
|
+
const packageVersion = "0.14.334";
|
|
5736
5794
|
|
|
5737
5795
|
exports.Blocks = Blocks;
|
|
5738
5796
|
exports.ContentPage = ContentPage;
|