@redneckz/wildless-cms-uni-blocks 0.14.572 → 0.14.574
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 +76 -64
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/OfficesAtmsMap/OfficesAtmsMapLayout.d.ts +2 -0
- package/bundle/components/OfficesAtmsMap/filters.d.ts +44 -0
- package/bundle/components/OfficesAtmsMap/renderButtonsGroup.d.ts +3 -0
- package/bundle/components/OfficesAtmsMap/renderFiltrationForm.d.ts +10 -4
- package/bundle/components/OfficesAtmsMap/renderHeading.d.ts +2 -0
- package/bundle/ui-kit/Checkbox/CheckboxProps.d.ts +0 -1
- package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +1 -1
- package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.d.ts +2 -0
- package/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +21 -25
- package/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
- package/dist/components/OfficesAtmsMap/OfficesMap.js +1 -29
- package/dist/components/OfficesAtmsMap/OfficesMap.js.map +1 -1
- package/dist/components/OfficesAtmsMap/filters.d.ts +44 -0
- package/dist/components/OfficesAtmsMap/filters.js +46 -0
- package/dist/components/OfficesAtmsMap/filters.js.map +1 -0
- package/dist/components/OfficesAtmsMap/renderButtonsGroup.d.ts +3 -0
- package/dist/components/OfficesAtmsMap/renderButtonsGroup.js +21 -0
- package/dist/components/OfficesAtmsMap/renderButtonsGroup.js.map +1 -0
- package/dist/components/OfficesAtmsMap/renderFiltrationForm.d.ts +10 -4
- package/dist/components/OfficesAtmsMap/renderFiltrationForm.js +2 -21
- package/dist/components/OfficesAtmsMap/renderFiltrationForm.js.map +1 -1
- package/dist/components/OfficesAtmsMap/renderHeading.d.ts +2 -0
- package/dist/components/OfficesAtmsMap/renderHeading.js +8 -0
- package/dist/components/OfficesAtmsMap/renderHeading.js.map +1 -0
- package/dist/ui-kit/Checkbox/CheckboxGroup.js +1 -2
- package/dist/ui-kit/Checkbox/CheckboxGroup.js.map +1 -1
- package/dist/ui-kit/Checkbox/CheckboxProps.d.ts +0 -1
- package/dist/ui-kit/FormField/getField.js +1 -1
- package/dist/ui-kit/YandexMap/renderClusterer.js +4 -1
- package/dist/ui-kit/YandexMap/renderClusterer.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +1 -1
- package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.d.ts +2 -0
- package/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +16 -22
- package/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
- package/lib/components/OfficesAtmsMap/OfficesMap.js +1 -29
- package/lib/components/OfficesAtmsMap/OfficesMap.js.map +1 -1
- package/lib/components/OfficesAtmsMap/filters.d.ts +44 -0
- package/lib/components/OfficesAtmsMap/filters.js +44 -0
- package/lib/components/OfficesAtmsMap/filters.js.map +1 -0
- package/lib/components/OfficesAtmsMap/renderButtonsGroup.d.ts +2 -0
- package/lib/components/OfficesAtmsMap/renderButtonsGroup.js +18 -0
- package/lib/components/OfficesAtmsMap/renderButtonsGroup.js.map +1 -0
- package/lib/components/OfficesAtmsMap/renderFiltrationForm.d.ts +10 -4
- package/lib/components/OfficesAtmsMap/renderFiltrationForm.js +2 -21
- package/lib/components/OfficesAtmsMap/renderFiltrationForm.js.map +1 -1
- package/lib/components/OfficesAtmsMap/renderHeading.d.ts +1 -0
- package/lib/components/OfficesAtmsMap/renderHeading.js +5 -0
- package/lib/components/OfficesAtmsMap/renderHeading.js.map +1 -0
- package/lib/ui-kit/Checkbox/CheckboxGroup.js +1 -2
- package/lib/ui-kit/Checkbox/CheckboxGroup.js.map +1 -1
- package/lib/ui-kit/Checkbox/CheckboxProps.d.ts +0 -1
- package/lib/ui-kit/FormField/getField.js +1 -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 +76 -64
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/OfficesAtmsMap/OfficesAtmsMapLayout.d.ts +2 -0
- package/mobile/bundle/components/OfficesAtmsMap/filters.d.ts +44 -0
- package/mobile/bundle/components/OfficesAtmsMap/renderButtonsGroup.d.ts +3 -0
- package/mobile/bundle/components/OfficesAtmsMap/renderFiltrationForm.d.ts +10 -4
- package/mobile/bundle/components/OfficesAtmsMap/renderHeading.d.ts +2 -0
- package/mobile/bundle/ui-kit/Checkbox/CheckboxProps.d.ts +0 -1
- package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +1 -1
- package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/mobile/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.d.ts +2 -0
- package/mobile/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +21 -25
- package/mobile/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
- package/mobile/dist/components/OfficesAtmsMap/OfficesMap.js +1 -29
- package/mobile/dist/components/OfficesAtmsMap/OfficesMap.js.map +1 -1
- package/mobile/dist/components/OfficesAtmsMap/filters.d.ts +44 -0
- package/mobile/dist/components/OfficesAtmsMap/filters.js +46 -0
- package/mobile/dist/components/OfficesAtmsMap/filters.js.map +1 -0
- package/mobile/dist/components/OfficesAtmsMap/renderButtonsGroup.d.ts +3 -0
- package/mobile/dist/components/OfficesAtmsMap/renderButtonsGroup.js +21 -0
- package/mobile/dist/components/OfficesAtmsMap/renderButtonsGroup.js.map +1 -0
- package/mobile/dist/components/OfficesAtmsMap/renderFiltrationForm.d.ts +10 -4
- package/mobile/dist/components/OfficesAtmsMap/renderFiltrationForm.js +2 -21
- package/mobile/dist/components/OfficesAtmsMap/renderFiltrationForm.js.map +1 -1
- package/mobile/dist/components/OfficesAtmsMap/renderHeading.d.ts +2 -0
- package/mobile/dist/components/OfficesAtmsMap/renderHeading.js +8 -0
- package/mobile/dist/components/OfficesAtmsMap/renderHeading.js.map +1 -0
- package/mobile/dist/ui-kit/Checkbox/CheckboxGroup.js +1 -2
- package/mobile/dist/ui-kit/Checkbox/CheckboxGroup.js.map +1 -1
- package/mobile/dist/ui-kit/Checkbox/CheckboxProps.d.ts +0 -1
- package/mobile/dist/ui-kit/FormField/getField.js +1 -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/common.css +1 -1
- package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +1 -1
- package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/mobile/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.d.ts +2 -0
- package/mobile/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +16 -22
- package/mobile/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
- package/mobile/lib/components/OfficesAtmsMap/OfficesMap.js +1 -29
- package/mobile/lib/components/OfficesAtmsMap/OfficesMap.js.map +1 -1
- package/mobile/lib/components/OfficesAtmsMap/filters.d.ts +44 -0
- package/mobile/lib/components/OfficesAtmsMap/filters.js +44 -0
- package/mobile/lib/components/OfficesAtmsMap/filters.js.map +1 -0
- package/mobile/lib/components/OfficesAtmsMap/renderButtonsGroup.d.ts +3 -0
- package/mobile/lib/components/OfficesAtmsMap/renderButtonsGroup.js +18 -0
- package/mobile/lib/components/OfficesAtmsMap/renderButtonsGroup.js.map +1 -0
- package/mobile/lib/components/OfficesAtmsMap/renderFiltrationForm.d.ts +10 -4
- package/mobile/lib/components/OfficesAtmsMap/renderFiltrationForm.js +2 -21
- package/mobile/lib/components/OfficesAtmsMap/renderFiltrationForm.js.map +1 -1
- package/mobile/lib/components/OfficesAtmsMap/renderHeading.d.ts +2 -0
- package/mobile/lib/components/OfficesAtmsMap/renderHeading.js +5 -0
- package/mobile/lib/components/OfficesAtmsMap/renderHeading.js.map +1 -0
- package/mobile/lib/ui-kit/Checkbox/CheckboxGroup.js +1 -2
- package/mobile/lib/ui-kit/Checkbox/CheckboxGroup.js.map +1 -1
- package/mobile/lib/ui-kit/Checkbox/CheckboxProps.d.ts +0 -1
- package/mobile/lib/ui-kit/FormField/getField.js +1 -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/components/ApplicationLeadForm/ApplicationLeadForm.tsx +1 -1
- package/mobile/src/components/OfficesAtmsMap/OfficesAtmsMapLayout.tsx +22 -58
- package/mobile/src/components/OfficesAtmsMap/OfficesMap.tsx +0 -47
- package/mobile/src/components/OfficesAtmsMap/filters.ts +56 -0
- package/mobile/src/components/OfficesAtmsMap/renderButtonsGroup.tsx +43 -0
- package/mobile/src/components/OfficesAtmsMap/renderFiltrationForm.tsx +14 -26
- package/mobile/src/components/OfficesAtmsMap/renderHeading.tsx +15 -0
- package/mobile/src/ui-kit/Checkbox/CheckboxGroup.tsx +2 -8
- package/mobile/src/ui-kit/Checkbox/CheckboxProps.ts +0 -1
- package/mobile/src/ui-kit/FormField/getField.tsx +1 -1
- package/mobile/src/ui-kit/YandexMap/renderClusterer.ts +6 -2
- package/package.json +1 -1
- package/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +1 -1
- package/src/components/OfficesAtmsMap/OfficesAtmsMapLayout.tsx +22 -58
- package/src/components/OfficesAtmsMap/OfficesMap.tsx +0 -47
- package/src/components/OfficesAtmsMap/filters.ts +56 -0
- package/src/components/OfficesAtmsMap/renderButtonsGroup.tsx +43 -0
- package/src/components/OfficesAtmsMap/renderFiltrationForm.tsx +14 -26
- package/src/components/OfficesAtmsMap/renderHeading.tsx +15 -0
- package/src/ui-kit/Checkbox/CheckboxGroup.tsx +2 -8
- package/src/ui-kit/Checkbox/CheckboxProps.ts +0 -1
- package/src/ui-kit/FormField/getField.tsx +1 -1
- package/src/ui-kit/YandexMap/renderClusterer.ts +6 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderFiltrationForm.js","sourceRoot":"","sources":["../../../src/components/OfficesAtmsMap/renderFiltrationForm.tsx"],"names":[],"mappings":";AAEA,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,
|
|
1
|
+
{"version":3,"file":"renderFiltrationForm.js","sourceRoot":"","sources":["../../../src/components/OfficesAtmsMap/renderFiltrationForm.tsx"],"names":[],"mappings":";AAEA,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,qBAAqB,GAAG,uDAAuD,CAAC;AAStF,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,EACnC,OAAO,EACP,KAAK,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,EACvB,UAAU,EACV,MAAM,GACsB,EAAE,EAAE;IAChC,MAAM,iBAAiB,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAE7C,MAAM,e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CAAC,CACZ,KAAC,UAAU,IACT,OAAO,EAAC,aAAa,EACrB,SAAS,EAAC,+BAA+B,EACzC,WAAW,EAAE,KAAC,IAAI,IAAC,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,EAAE,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,GAAG,EAC7E,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,EAChC,OAAO,EAAE,QAAQ,GACjB,CACH,CAAC,CAAC,CAAC,IAAI,EACR,KAAC,UAAU,IAAC,OAAO,EAAC,aAAa,EAAC,SAAS,EAAC,+BAA+B,EAAC,OAAO,EAAE,KAAK,YACvF,cAAc,EAAE,GACN,IACT,CACP,CAAC;AACJ,CAAC,CAAC;AAEJ,MAAM,cAAc,GAAG,GAAU,EAAE,CAAC,CAClC,eAAK,SAAS,EAAC,mBAAmB,sGAEhC,KAAC,IAAI,IAAC,IAAI,EAAC,WAAW,EAAC,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,SAAS,EAAC,QAAQ,GAAG,IAC/D,CACP,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
|
+
import { Heading } from '../../ui-kit/Heading/Heading.js';
|
|
3
|
+
import { Text } from '../../ui-kit/Text/Text.js';
|
|
4
|
+
export const renderHeading = (title, lengthItems) => (_jsx("div", { className: "flex flex-col sm:flex-row gap-xs mb-2xl", children: _jsxs(Heading, { headingType: "h3", children: [_jsx("span", { suppressHydrationWarning: true, children: title }), lengthItems ? (_jsx(Text, { size: "text-h2", color: "text-secondary-text", children: _jsx("span", { suppressHydrationWarning: true, children: ` (${lengthItems})` }) })) : null] }) }));
|
|
5
|
+
//# sourceMappingURL=renderHeading.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"renderHeading.js","sourceRoot":"","sources":["../../../src/components/OfficesAtmsMap/renderHeading.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAE9C,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,KAAc,EAAE,WAAoB,EAAE,EAAE,CAAC,CACrE,cAAK,SAAS,EAAC,yCAAyC,YACtD,MAAC,OAAO,IAAC,WAAW,EAAC,IAAI,aACvB,eAAM,wBAAwB,EAAE,IAAI,YAAG,KAAK,GAAQ,EACnD,WAAW,CAAC,CAAC,CAAC,CACb,KAAC,IAAI,IAAC,IAAI,EAAC,SAAS,EAAC,KAAK,EAAC,qBAAqB,YAC9C,eAAM,wBAAwB,EAAE,IAAI,YAAG,KAAK,WAAW,GAAG,GAAQ,GAC7D,CACR,CAAC,CAAC,CAAC,IAAI,IACA,GACN,CACP,CAAC"}
|
|
@@ -5,7 +5,6 @@ import { Foldable } from '../Foldable/Foldable.js';
|
|
|
5
5
|
import { FoldableSection } from '../Foldable/FoldableSection.js';
|
|
6
6
|
import { Icon } from '../Icon/Icon.js';
|
|
7
7
|
import { Checkbox } from './Checkbox.js';
|
|
8
|
-
import { CheckboxWithError } from './CheckboxWithError.js';
|
|
9
8
|
export const CheckboxGroup = JSX(({ className, items = [], ...props }) => {
|
|
10
9
|
const isChecked = items.every((_) => _?.value);
|
|
11
10
|
const handleGeneralToggle = (value) => {
|
|
@@ -13,7 +12,7 @@ export const CheckboxGroup = JSX(({ className, items = [], ...props }) => {
|
|
|
13
12
|
item?.onChange && item.onChange(value);
|
|
14
13
|
}
|
|
15
14
|
};
|
|
16
|
-
return (_jsx("div", { className: style('w-
|
|
15
|
+
return (_jsx("div", { className: style('w-fit', className), children: _jsx(Foldable, { isFoldButtonOnTop: true, renderFoldableSection: ({ isUnfolded }) => (_jsx(FoldableSection, { isUnfolded: isUnfolded, className: "flex flex-col gap-lg pl-2xl py-xs", children: items.map(Checkbox) })), renderFoldButton: renderGeneralCheckbox(_jsx(Checkbox, { value: isChecked, onChange: handleGeneralToggle, ...props })) }) }));
|
|
17
16
|
});
|
|
18
17
|
const renderGeneralCheckbox = (generalCheckBox) => (foldableData) => (_jsxs("div", { className: "flex items-center", children: [generalCheckBox, _jsx("button", { onClick: foldableData.onToggle, className: "p-m", children: _jsx(Icon, { className: "text-primary-text", name: foldableData.isUnfolded ? 'ArrowUpIcon' : 'ArrowDownIcon', width: "16", height: "16" }) })] }));
|
|
19
18
|
//# sourceMappingURL=CheckboxGroup.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckboxGroup.js","sourceRoot":"","sources":["../../../src/ui-kit/Checkbox/CheckboxGroup.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAExC,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEhD,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"CheckboxGroup.js","sourceRoot":"","sources":["../../../src/ui-kit/Checkbox/CheckboxGroup.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAExC,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEhD,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAGtC,MAAM,CAAC,MAAM,aAAa,GAAG,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GACX,GACK,IACL,CACP,CAAC"}
|
|
@@ -71,7 +71,7 @@ export const getField =
|
|
|
71
71
|
bankEmpolee: (_jsx(InputControl, { label: "\u0424\u0418\u041E \u0438\u043B\u0438 \u0434\u043E\u043B\u0436\u043D\u043E\u0441\u0442\u044C \u043E\u0431\u0441\u043B\u0443\u0436\u0438\u0432\u0430\u0432\u0448\u0435\u0433\u043E \u0412\u0430\u0441 \u0441\u043E\u0442\u0440\u0443\u0434\u043D\u0438\u043A\u0430 \u0411\u0430\u043D\u043A\u0430", ...field('bankEmpolee') })),
|
|
72
72
|
applicationDate: (_jsx(InputControl, { label: "\u0414\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F \u043E\u0431\u0440\u0430\u0449\u0435\u043D\u0438\u044F \u0432 \u0411\u0430\u043D\u043A", ...field('applicationDate') })),
|
|
73
73
|
secondaryPhone: _jsx(SecondaryPhoneField, { field: field }),
|
|
74
|
-
|
|
74
|
+
consentToAllDocs: _jsx(ConsentToAllDocsField, { field: field }),
|
|
75
75
|
};
|
|
76
76
|
return isRenderField({ input, field }) ? (_jsx("div", { children: InputsMap[input?.name] }, String(i))) : null;
|
|
77
77
|
};
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
const MapMarkerClusterIcon = '/icons/MapMarkerClusterIcon.svg';
|
|
2
2
|
const MapMarkerClusterYellowIcon = '/icons/MapMarkerClusterYellowIcon.svg';
|
|
3
3
|
export function renderClusterer({ yandexMaps, map, points, isLoad, }) {
|
|
4
|
-
if (isLoad || !points
|
|
4
|
+
if (isLoad || !points) {
|
|
5
5
|
return;
|
|
6
6
|
}
|
|
7
7
|
map.geoObjects.removeAll();
|
|
8
|
+
if (!points.length) {
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
8
11
|
const clusterIconContentLayout = yandexMaps.templateLayoutFactory.createClass('<div style="margin-top: -3px;">{{properties.geoObjects.length}}</div>');
|
|
9
12
|
const officeClusterer = defineClusterer('offices', yandexMaps, clusterIconContentLayout);
|
|
10
13
|
if (points.length && points.every((_) => 'type' in _)) {
|
|
@@ -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,EACN,MAAM,GAMP;IACC,IAAI,MAAM,IAAI,CAAC,MAAM,EAAE
|
|
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;QACrB,OAAO;KACR;IAED,GAAG,CAAC,UAAU,CAAC,SAAS,EAAE,CAAC;IAE3B,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE;QAClB,OAAO;KACR;IAED,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,CA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AAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,0BAA0B;gBAC5E,IAAI,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC;gBACd,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC;aACnB;SACF;QACD,wBAAwB;QACxB,4BAA4B,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"}
|
|
@@ -2,21 +2,19 @@ import { JSX } from '@redneckz/uni-jsx';
|
|
|
2
2
|
import { useMemo, useState } from '@redneckz/uni-jsx/lib/hooks';
|
|
3
3
|
import { useForm } from '../../hooks/useForm';
|
|
4
4
|
import { type VNode } from '../../model/VNode';
|
|
5
|
-
import { Button } from '../../ui-kit/Button/Button';
|
|
6
5
|
import { ClientOnly } from '../../ui-kit/ClientOnly';
|
|
7
|
-
import { Heading } from '../../ui-kit/Heading/Heading';
|
|
8
|
-
import { Text } from '../../ui-kit/Text/Text';
|
|
9
6
|
import { YandexMap } from '../../ui-kit/YandexMap/YandexMap';
|
|
10
|
-
import { getVersion } from '../../utils/getVersion';
|
|
11
7
|
import { style } from '../../utils/style';
|
|
8
|
+
import { FILTRATION_LABELS, FILTRATION_PREDICATES, INITIAL_FILTRATION_STATE } from './filters';
|
|
12
9
|
import { type AtmsDef } from './OfficesAtmsMapContent';
|
|
13
10
|
import { type Atm, type Branch, type RemoteWorkplace } from './OfficesAtmsMapProps';
|
|
11
|
+
import { renderButtonsGroup } from './renderButtonsGroup';
|
|
14
12
|
import { renderDescriptionBlock } from './renderDescriptionBlock';
|
|
15
|
-
import { renderFiltrationForm } from './renderFiltrationForm';
|
|
13
|
+
import { renderFiltrationForm, type RenderFiltrationFormOptions } from './renderFiltrationForm';
|
|
14
|
+
import { renderHeading } from './renderHeading';
|
|
16
15
|
import { type BalloonContent } from './YandexMapProps';
|
|
17
16
|
|
|
18
17
|
const defaultEmptyFunction = () => void 0;
|
|
19
|
-
const defaultFilterItems = () => [];
|
|
20
18
|
|
|
21
19
|
export type InitFilterState = Record<string, boolean>;
|
|
22
20
|
|
|
@@ -46,15 +44,13 @@ export const OfficesAtmsMapLayout = JSX<OfficesAtmsMapLayoutProps<Branch | Atm |
|
|
|
46
44
|
remoteWorkplaces = [],
|
|
47
45
|
renderCard = defaultEmptyFunction,
|
|
48
46
|
renderRemoteWorkplaceCard = defaultEmptyFunction,
|
|
49
|
-
filterItems = defaultFilterItems,
|
|
50
47
|
getBalloon = defaultEmptyFunction,
|
|
51
48
|
getBalloonRemoteWorkplaces = defaultEmptyFunction,
|
|
52
|
-
initFilterState = {},
|
|
53
49
|
descriptionData,
|
|
54
50
|
title,
|
|
55
51
|
}) => {
|
|
56
52
|
const onlyOffice = title?.includes('Офис');
|
|
57
|
-
const [filtrationState, { field, reset }] = useForm(
|
|
53
|
+
const [filtrationState, { field, reset }] = useForm(INITIAL_FILTRATION_STATE);
|
|
58
54
|
|
|
59
55
|
const [filteredItems, points, filteredRemoteWorkplaces, lengthItems] = useMemo(() => {
|
|
60
56
|
const _filteredItems = filterItems(data, filtrationState);
|
|
@@ -83,6 +79,13 @@ export const OfficesAtmsMapLayout = JSX<OfficesAtmsMapLayoutProps<Branch | Atm |
|
|
|
83
79
|
|
|
84
80
|
const [activeButton, setActiveButton] = useState('all');
|
|
85
81
|
|
|
82
|
+
const filterOptions: RenderFiltrationFormOptions = {
|
|
83
|
+
filters: getFiltersWithNonEmptyData([...data, ...remoteWorkplaces]),
|
|
84
|
+
field: { field, reset },
|
|
85
|
+
onlyOffice,
|
|
86
|
+
labels: FILTRATION_LABELS,
|
|
87
|
+
};
|
|
88
|
+
|
|
86
89
|
return (
|
|
87
90
|
<div className={style('space-y-1', className)}>
|
|
88
91
|
<div className="bg-white">
|
|
@@ -91,7 +94,7 @@ export const OfficesAtmsMapLayout = JSX<OfficesAtmsMapLayoutProps<Branch | Atm |
|
|
|
91
94
|
{descriptionData ? renderDescriptionBlock(descriptionData) : null}
|
|
92
95
|
{onlyOffice && renderButtonsGroup(data, activeButton, setActiveButton)}
|
|
93
96
|
<div className={style('pb-3xl', filtersVisibleStyles(activeButton))}>
|
|
94
|
-
{renderFiltrationForm(
|
|
97
|
+
{renderFiltrationForm(filterOptions)}
|
|
95
98
|
</div>
|
|
96
99
|
</div>
|
|
97
100
|
<div className="h-[600px]">
|
|
@@ -109,55 +112,16 @@ export const OfficesAtmsMapLayout = JSX<OfficesAtmsMapLayoutProps<Branch | Atm |
|
|
|
109
112
|
},
|
|
110
113
|
);
|
|
111
114
|
|
|
112
|
-
const
|
|
113
|
-
|
|
114
|
-
|
|
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
|
-
|
|
125
|
-
const renderButtonsGroup = (
|
|
126
|
-
data: Branch[],
|
|
127
|
-
activeButton: string,
|
|
128
|
-
onButtonClick: (item: string) => void,
|
|
115
|
+
export const filterItems = (
|
|
116
|
+
data: (Branch | RemoteWorkplace)[],
|
|
117
|
+
filtrationState: Record<string, boolean>,
|
|
129
118
|
) => {
|
|
130
|
-
const
|
|
131
|
-
|
|
132
|
-
const businessButtonVersion = getVersion(activeButton === 'business');
|
|
119
|
+
const truthyFilters = Object.keys(filtrationState).filter((key) => filtrationState[key]);
|
|
133
120
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
branches.filter(
|
|
137
|
-
(branch) =>
|
|
138
|
-
branch.workSchedule &&
|
|
139
|
-
branch.workSchedule.businessScheduleVisibleTag &&
|
|
140
|
-
!branch.workSchedule.businessScheduleDescription,
|
|
141
|
-
);
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
onButtonClick(key);
|
|
145
|
-
|
|
146
|
-
return branches;
|
|
147
|
-
};
|
|
121
|
+
return data.filter((item) => truthyFilters.every((_) => FILTRATION_PREDICATES[_](item)));
|
|
122
|
+
};
|
|
148
123
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
Для физических лиц
|
|
153
|
-
</Button>
|
|
154
|
-
<Button
|
|
155
|
-
data-id="business"
|
|
156
|
-
onClick={(e) => handleClick(e, 'business', data)}
|
|
157
|
-
version={businessButtonVersion}
|
|
158
|
-
>
|
|
159
|
-
Для юридических лиц
|
|
160
|
-
</Button>
|
|
161
|
-
</div>
|
|
124
|
+
export const getFiltersWithNonEmptyData = (data: (Branch | Atm | RemoteWorkplace)[]) =>
|
|
125
|
+
Object.keys(INITIAL_FILTRATION_STATE).filter(
|
|
126
|
+
(_) => data.filter((item) => FILTRATION_PREDICATES[_](item)).length,
|
|
162
127
|
);
|
|
163
|
-
};
|
|
@@ -1,46 +1,10 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
2
|
import { useLocation } from '../../hooks/useLocation';
|
|
3
3
|
import { OfficesAtmsMapLayout } from './OfficesAtmsMapLayout';
|
|
4
|
-
import { type Branch, type RemoteWorkplace } from './OfficesAtmsMapProps';
|
|
5
4
|
import { getOfficePoint, renderOfficeCard } from './renderOfficeCard';
|
|
6
5
|
import { getRemoteWorkplacePoint, renderRemoteWorkplaceCard } from './renderRemoteWorkplaceCard';
|
|
7
6
|
import { useOffices } from './useOffices';
|
|
8
7
|
|
|
9
|
-
const INITIAL_FILTRATION_STATE = {
|
|
10
|
-
workingSaturday: false,
|
|
11
|
-
premiumService: false,
|
|
12
|
-
privateBanking: false,
|
|
13
|
-
remoteWorkplace: false,
|
|
14
|
-
serviceDisabledPeople: false,
|
|
15
|
-
sellingCoins: false,
|
|
16
|
-
buyingCoins: false,
|
|
17
|
-
bullionOperations: false,
|
|
18
|
-
preciousMetalsOperations: false,
|
|
19
|
-
transferringDataToBiometricSystem: false,
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
const FILTRATION_PREDICATES = {
|
|
23
|
-
workingSaturday: (item: Branch | RemoteWorkplace) =>
|
|
24
|
-
Boolean('workSchedule' in item && item.workSchedule?.workingSaturday),
|
|
25
|
-
premiumService: (item: Branch | RemoteWorkplace) =>
|
|
26
|
-
Boolean('premiumService' in item && item.premiumService),
|
|
27
|
-
privateBanking: (item: Branch | RemoteWorkplace) =>
|
|
28
|
-
Boolean('privateBanking' in item && item.privateBanking),
|
|
29
|
-
remoteWorkplace: (item: Branch | RemoteWorkplace) => Boolean('workScheduleDescription' in item),
|
|
30
|
-
serviceDisabledPeople: (item: Branch | RemoteWorkplace) =>
|
|
31
|
-
Boolean('serviceDisabledPeople' in item && item.serviceDisabledPeople),
|
|
32
|
-
sellingCoins: (item: Branch | RemoteWorkplace) =>
|
|
33
|
-
Boolean('sellingCoins' in item && item.sellingCoins),
|
|
34
|
-
buyingCoins: (item: Branch | RemoteWorkplace) =>
|
|
35
|
-
Boolean('buyingCoins' in item && item.buyingCoins),
|
|
36
|
-
bullionOperations: (item: Branch | RemoteWorkplace) =>
|
|
37
|
-
Boolean('bullionOperations' in item && item.bullionOperations),
|
|
38
|
-
preciousMetalsOperations: (item: Branch | RemoteWorkplace) =>
|
|
39
|
-
Boolean('preciousMetalsOperations' in item && item.preciousMetalsOperations),
|
|
40
|
-
transferringDataToBiometricSystem: (item: Branch | RemoteWorkplace) =>
|
|
41
|
-
Boolean('transferringDataToBiometricSystem' in item && item.transferringDataToBiometricSystem),
|
|
42
|
-
};
|
|
43
|
-
|
|
44
8
|
export interface OfficesMapProps {
|
|
45
9
|
className?: string;
|
|
46
10
|
}
|
|
@@ -53,11 +17,9 @@ export const OfficesMap = JSX<OfficesMapProps>(({ className }) => {
|
|
|
53
17
|
return (
|
|
54
18
|
<OfficesAtmsMapLayout
|
|
55
19
|
className={className}
|
|
56
|
-
filterItems={filterItems}
|
|
57
20
|
data={data?.branches}
|
|
58
21
|
isLoad={isLoad}
|
|
59
22
|
remoteWorkplaces={data?.remoteWorkplaces}
|
|
60
|
-
initFilterState={INITIAL_FILTRATION_STATE}
|
|
61
23
|
renderCard={renderOfficeCard}
|
|
62
24
|
renderRemoteWorkplaceCard={renderRemoteWorkplaceCard}
|
|
63
25
|
getBalloon={getOfficePoint}
|
|
@@ -66,12 +28,3 @@ export const OfficesMap = JSX<OfficesMapProps>(({ className }) => {
|
|
|
66
28
|
/>
|
|
67
29
|
);
|
|
68
30
|
});
|
|
69
|
-
|
|
70
|
-
const filterItems = (
|
|
71
|
-
data: (Branch | RemoteWorkplace)[],
|
|
72
|
-
filtrationState: Record<string, boolean>,
|
|
73
|
-
) => {
|
|
74
|
-
const truthyFilters = Object.keys(filtrationState).filter((key) => filtrationState[key]);
|
|
75
|
-
|
|
76
|
-
return data.filter((item) => truthyFilters.every((_) => FILTRATION_PREDICATES[_](item)));
|
|
77
|
-
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { Branch, RemoteWorkplace } from './OfficesAtmsMapProps';
|
|
2
|
+
|
|
3
|
+
export const INITIAL_FILTRATION_STATE = {
|
|
4
|
+
workingSaturday: false,
|
|
5
|
+
premiumService: false,
|
|
6
|
+
privateBanking: false,
|
|
7
|
+
remoteWorkplace: false,
|
|
8
|
+
serviceDisabledPeople: false,
|
|
9
|
+
sellingCoins: false,
|
|
10
|
+
buyingCoins: false,
|
|
11
|
+
bullionOperations: false,
|
|
12
|
+
preciousMetalsOperations: false,
|
|
13
|
+
transferringDataToBiometricSystem: false,
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export const FILTRATION_LABELS = {
|
|
17
|
+
safeBoxCaseVolumes: 'Аренда индивидуальных сейфовых ячеек',
|
|
18
|
+
workingSaturday: 'Открыты по субботам',
|
|
19
|
+
terminalTypeAtms: 'Банкоматы',
|
|
20
|
+
terminalTypeTerm: 'Терминалы',
|
|
21
|
+
workAllTime: 'Круглосуточно',
|
|
22
|
+
billAcceptorEnable: 'Прием наличных',
|
|
23
|
+
premiumService: 'Премиальное обслуживание',
|
|
24
|
+
privateBanking: 'Услуга Private banking',
|
|
25
|
+
sellingCoins: 'Продажа монет из драгоценных металлов',
|
|
26
|
+
buyingCoins: 'Покупка монет из драгоценных металлов',
|
|
27
|
+
bullionOperations: 'Операции со слитками',
|
|
28
|
+
preciousMetalsOperations: 'Операции с драгоценными металлами',
|
|
29
|
+
transferringDataToBiometricSystem: 'Передача фото и голоса в Единую биометрическую систему',
|
|
30
|
+
locationDisabledPeople: 'Для маломобильных',
|
|
31
|
+
designDisabledPeople: 'Для слабовидящих',
|
|
32
|
+
remoteWorkplace: 'Удаленное рабочее место',
|
|
33
|
+
serviceDisabledPeople: 'Для маломобильных граждан',
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export const FILTRATION_PREDICATES = {
|
|
37
|
+
workingSaturday: (item: Branch | RemoteWorkplace) =>
|
|
38
|
+
Boolean('workSchedule' in item && item.workSchedule?.workingSaturday),
|
|
39
|
+
premiumService: (item: Branch | RemoteWorkplace) =>
|
|
40
|
+
Boolean('premiumService' in item && item.premiumService),
|
|
41
|
+
privateBanking: (item: Branch | RemoteWorkplace) =>
|
|
42
|
+
Boolean('privateBanking' in item && item.privateBanking),
|
|
43
|
+
remoteWorkplace: (item: Branch | RemoteWorkplace) => Boolean('workScheduleDescription' in item),
|
|
44
|
+
serviceDisabledPeople: (item: Branch | RemoteWorkplace) =>
|
|
45
|
+
Boolean('serviceDisabledPeople' in item && item.serviceDisabledPeople),
|
|
46
|
+
sellingCoins: (item: Branch | RemoteWorkplace) =>
|
|
47
|
+
Boolean('sellingCoins' in item && item.sellingCoins),
|
|
48
|
+
buyingCoins: (item: Branch | RemoteWorkplace) =>
|
|
49
|
+
Boolean('buyingCoins' in item && item.buyingCoins),
|
|
50
|
+
bullionOperations: (item: Branch | RemoteWorkplace) =>
|
|
51
|
+
Boolean('bullionOperations' in item && item.bullionOperations),
|
|
52
|
+
preciousMetalsOperations: (item: Branch | RemoteWorkplace) =>
|
|
53
|
+
Boolean('preciousMetalsOperations' in item && item.preciousMetalsOperations),
|
|
54
|
+
transferringDataToBiometricSystem: (item: Branch | RemoteWorkplace) =>
|
|
55
|
+
Boolean('transferringDataToBiometricSystem' in item && item.transferringDataToBiometricSystem),
|
|
56
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Button } from '../../ui-kit/Button/Button';
|
|
2
|
+
import { getVersion } from '../../utils/getVersion';
|
|
3
|
+
import type { Branch } from './OfficesAtmsMapProps';
|
|
4
|
+
|
|
5
|
+
export const renderButtonsGroup = (
|
|
6
|
+
data: Branch[],
|
|
7
|
+
activeButton: string,
|
|
8
|
+
onButtonClick: (item: string) => void,
|
|
9
|
+
) => {
|
|
10
|
+
const allButtonVersion = getVersion(activeButton === 'all');
|
|
11
|
+
|
|
12
|
+
const businessButtonVersion = getVersion(activeButton === 'business');
|
|
13
|
+
|
|
14
|
+
const handleClick = (e: any, key: string, branches: Branch[]) => {
|
|
15
|
+
if (e.currentTarget === e.target && key === 'business') {
|
|
16
|
+
branches.filter(
|
|
17
|
+
(branch) =>
|
|
18
|
+
branch.workSchedule &&
|
|
19
|
+
branch.workSchedule.businessScheduleVisibleTag &&
|
|
20
|
+
!branch.workSchedule.businessScheduleDescription,
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
onButtonClick(key);
|
|
25
|
+
|
|
26
|
+
return branches;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
return (
|
|
30
|
+
<div className="flex gap-lg flex-col sm:flex-row pb-lg">
|
|
31
|
+
<Button data-id="all" onClick={(e) => handleClick(e, 'all', data)} version={allButtonVersion}>
|
|
32
|
+
Для физических лиц
|
|
33
|
+
</Button>
|
|
34
|
+
<Button
|
|
35
|
+
data-id="business"
|
|
36
|
+
onClick={(e) => handleClick(e, 'business', data)}
|
|
37
|
+
version={businessButtonVersion}
|
|
38
|
+
>
|
|
39
|
+
Для юридических лиц
|
|
40
|
+
</Button>
|
|
41
|
+
</div>
|
|
42
|
+
);
|
|
43
|
+
};
|
|
@@ -8,37 +8,25 @@ import { Icon } from '../../ui-kit/Icon/Icon';
|
|
|
8
8
|
import { type IconName } from '../../ui-kit/Icon/IconProps';
|
|
9
9
|
import { LinkButton } from '../../ui-kit/LinkButton/LinkButton';
|
|
10
10
|
|
|
11
|
-
const FILTRATION_LABELS = {
|
|
12
|
-
safeBoxCaseVolumes: 'Аренда индивидуальных сейфовых ячеек',
|
|
13
|
-
workingSaturday: 'Открыты по субботам',
|
|
14
|
-
terminalTypeAtms: 'Банкоматы',
|
|
15
|
-
terminalTypeTerm: 'Терминалы',
|
|
16
|
-
workAllTime: 'Круглосуточно',
|
|
17
|
-
billAcceptorEnable: 'Прием наличных',
|
|
18
|
-
premiumService: 'Премиальное обслуживание',
|
|
19
|
-
privateBanking: 'Услуга Private banking',
|
|
20
|
-
sellingCoins: 'Продажа монет из драгоценных металлов',
|
|
21
|
-
buyingCoins: 'Покупка монет из драгоценных металлов',
|
|
22
|
-
bullionOperations: 'Операции со слитками',
|
|
23
|
-
preciousMetalsOperations: 'Операции с драгоценными металлами',
|
|
24
|
-
transferringDataToBiometricSystem: 'Передача фото и голоса в Единую биометрическую систему',
|
|
25
|
-
locationDisabledPeople: 'Для маломобильных',
|
|
26
|
-
designDisabledPeople: 'Для слабовидящих',
|
|
27
|
-
remoteWorkplace: 'Удаленное рабочее место',
|
|
28
|
-
serviceDisabledPeople: 'Для маломобильных граждан',
|
|
29
|
-
};
|
|
30
|
-
|
|
31
11
|
const COMMON_FILTERS_STYLES = 'flex flex-col sm:flex-row sm:flex-wrap gap-3xl pb-2xl';
|
|
32
12
|
|
|
33
|
-
export
|
|
34
|
-
filters: string[]
|
|
35
|
-
|
|
36
|
-
onlyOffice?: boolean
|
|
37
|
-
|
|
13
|
+
export interface RenderFiltrationFormOptions {
|
|
14
|
+
filters: string[];
|
|
15
|
+
field: { field: FormFieldRegisterer<any>; reset: () => void };
|
|
16
|
+
onlyOffice?: boolean;
|
|
17
|
+
labels: Record<string, string>;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export const renderFiltrationForm = ({
|
|
21
|
+
filters,
|
|
22
|
+
field: { field, reset },
|
|
23
|
+
onlyOffice,
|
|
24
|
+
labels,
|
|
25
|
+
}: RenderFiltrationFormOptions) => {
|
|
38
26
|
const visibleFiltersNum = onlyOffice ? 5 : 6;
|
|
39
27
|
|
|
40
28
|
const filtersCheckbox = (filters || []).map((key) => (
|
|
41
|
-
<Checkbox key={key} text={
|
|
29
|
+
<Checkbox key={key} text={labels[key]} {...field(key)} />
|
|
42
30
|
));
|
|
43
31
|
|
|
44
32
|
const [visibleFilters, hiddenFilters] =
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Heading } from '../../ui-kit/Heading/Heading';
|
|
2
|
+
import { Text } from '../../ui-kit/Text/Text';
|
|
3
|
+
|
|
4
|
+
export const renderHeading = (title?: string, lengthItems?: number) => (
|
|
5
|
+
<div className="flex flex-col sm:flex-row gap-xs mb-2xl">
|
|
6
|
+
<Heading headingType="h3">
|
|
7
|
+
<span suppressHydrationWarning={true}>{title}</span>
|
|
8
|
+
{lengthItems ? (
|
|
9
|
+
<Text size="text-h2" color="text-secondary-text">
|
|
10
|
+
<span suppressHydrationWarning={true}>{` (${lengthItems})`}</span>
|
|
11
|
+
</Text>
|
|
12
|
+
) : null}
|
|
13
|
+
</Heading>
|
|
14
|
+
</div>
|
|
15
|
+
);
|
|
@@ -7,7 +7,6 @@ import { FoldableSection } from '../Foldable/FoldableSection';
|
|
|
7
7
|
import { Icon } from '../Icon/Icon';
|
|
8
8
|
import { Checkbox } from './Checkbox';
|
|
9
9
|
import { type CheckboxGroupProps } from './CheckboxProps';
|
|
10
|
-
import { CheckboxWithError } from './CheckboxWithError';
|
|
11
10
|
|
|
12
11
|
export const CheckboxGroup = JSX<CheckboxGroupProps>(({ className, items = [], ...props }) => {
|
|
13
12
|
const isChecked = items.every((_) => _?.value);
|
|
@@ -19,7 +18,7 @@ export const CheckboxGroup = JSX<CheckboxGroupProps>(({ className, items = [], .
|
|
|
19
18
|
};
|
|
20
19
|
|
|
21
20
|
return (
|
|
22
|
-
<div className={style('w-
|
|
21
|
+
<div className={style('w-fit', className)}>
|
|
23
22
|
<Foldable
|
|
24
23
|
isFoldButtonOnTop
|
|
25
24
|
renderFoldableSection={({ isUnfolded }) => (
|
|
@@ -28,12 +27,7 @@ export const CheckboxGroup = JSX<CheckboxGroupProps>(({ className, items = [], .
|
|
|
28
27
|
</FoldableSection>
|
|
29
28
|
)}
|
|
30
29
|
renderFoldButton={renderGeneralCheckbox(
|
|
31
|
-
<
|
|
32
|
-
required={true}
|
|
33
|
-
value={isChecked}
|
|
34
|
-
onChange={handleGeneralToggle}
|
|
35
|
-
{...props}
|
|
36
|
-
/>,
|
|
30
|
+
<Checkbox value={isChecked} onChange={handleGeneralToggle} {...props} />,
|
|
37
31
|
)}
|
|
38
32
|
/>
|
|
39
33
|
</div>
|
|
@@ -130,7 +130,7 @@ export const getField =
|
|
|
130
130
|
<InputControl label="Дата и время обращения в Банк" {...field('applicationDate')} />
|
|
131
131
|
),
|
|
132
132
|
secondaryPhone: <SecondaryPhoneField field={field} />,
|
|
133
|
-
|
|
133
|
+
consentToAllDocs: <ConsentToAllDocsField field={field} />,
|
|
134
134
|
};
|
|
135
135
|
|
|
136
136
|
return isRenderField({ input, field }) ? (
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/* eslint-disable @typescript-eslint/ban-ts-comment */
|
|
3
3
|
/* eslint-disable @typescript-eslint/no-unsafe-argument */
|
|
4
4
|
import type ymaps from 'yandex-maps';
|
|
5
|
-
import { type BalloonPoints } from '../../components/OfficesAtmsMap/YandexMapProps';
|
|
5
|
+
import { type BalloonPoints } from '../../components/OfficesAtmsMap/YandexMapProps';
|
|
6
6
|
|
|
7
7
|
const MapMarkerClusterIcon = '/icons/MapMarkerClusterIcon.svg';
|
|
8
8
|
const MapMarkerClusterYellowIcon = '/icons/MapMarkerClusterYellowIcon.svg';
|
|
@@ -18,12 +18,16 @@ export function renderClusterer({
|
|
|
18
18
|
points: BalloonPoints[];
|
|
19
19
|
isLoad: boolean;
|
|
20
20
|
}) {
|
|
21
|
-
if (isLoad || !points
|
|
21
|
+
if (isLoad || !points) {
|
|
22
22
|
return;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
map.geoObjects.removeAll();
|
|
26
26
|
|
|
27
|
+
if (!points.length) {
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
|
|
27
31
|
const clusterIconContentLayout = yandexMaps.templateLayoutFactory.createClass(
|
|
28
32
|
'<div style="margin-top: -3px;">{{properties.geoObjects.length}}</div>',
|
|
29
33
|
);
|
package/package.json
CHANGED