@redneckz/wildless-cms-uni-blocks 0.14.310 → 0.14.311
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 +10 -8
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/OfficesAtmsMap/renderFiltrationForm.d.ts +2 -2
- package/dist/components/OfficesAtmsMap/Badge.js +1 -1
- package/dist/components/OfficesAtmsMap/Badge.js.map +1 -1
- package/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +2 -1
- package/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
- package/dist/components/OfficesAtmsMap/renderAtmCard.js +1 -1
- package/dist/components/OfficesAtmsMap/renderAtmCard.js.map +1 -1
- package/dist/components/OfficesAtmsMap/renderFiltrationForm.d.ts +2 -2
- package/dist/components/OfficesAtmsMap/renderFiltrationForm.js +5 -4
- package/dist/components/OfficesAtmsMap/renderFiltrationForm.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/OfficesAtmsMap/Badge.js +1 -1
- package/lib/components/OfficesAtmsMap/Badge.js.map +1 -1
- package/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +2 -1
- package/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
- package/lib/components/OfficesAtmsMap/renderAtmCard.js +1 -1
- package/lib/components/OfficesAtmsMap/renderAtmCard.js.map +1 -1
- package/lib/components/OfficesAtmsMap/renderFiltrationForm.d.ts +2 -2
- package/lib/components/OfficesAtmsMap/renderFiltrationForm.js +5 -4
- package/lib/components/OfficesAtmsMap/renderFiltrationForm.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +10 -8
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/OfficesAtmsMap/renderFiltrationForm.d.ts +2 -2
- package/mobile/dist/components/OfficesAtmsMap/Badge.js +1 -1
- package/mobile/dist/components/OfficesAtmsMap/Badge.js.map +1 -1
- package/mobile/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +2 -1
- package/mobile/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
- package/mobile/dist/components/OfficesAtmsMap/renderAtmCard.js +1 -1
- package/mobile/dist/components/OfficesAtmsMap/renderAtmCard.js.map +1 -1
- package/mobile/dist/components/OfficesAtmsMap/renderFiltrationForm.d.ts +2 -2
- package/mobile/dist/components/OfficesAtmsMap/renderFiltrationForm.js +5 -4
- package/mobile/dist/components/OfficesAtmsMap/renderFiltrationForm.js.map +1 -1
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/OfficesAtmsMap/Badge.js +1 -1
- package/mobile/lib/components/OfficesAtmsMap/Badge.js.map +1 -1
- package/mobile/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +2 -1
- package/mobile/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
- package/mobile/lib/components/OfficesAtmsMap/renderAtmCard.js +1 -1
- package/mobile/lib/components/OfficesAtmsMap/renderAtmCard.js.map +1 -1
- package/mobile/lib/components/OfficesAtmsMap/renderFiltrationForm.d.ts +2 -2
- package/mobile/lib/components/OfficesAtmsMap/renderFiltrationForm.js +5 -4
- package/mobile/lib/components/OfficesAtmsMap/renderFiltrationForm.js.map +1 -1
- package/mobile/src/components/OfficesAtmsMap/Badge.tsx +1 -1
- package/mobile/src/components/OfficesAtmsMap/OfficesAtmsMap.example.json +26 -6
- package/mobile/src/components/OfficesAtmsMap/OfficesAtmsMapLayout.tsx +4 -2
- package/mobile/src/components/OfficesAtmsMap/renderAtmCard.tsx +3 -1
- package/mobile/src/components/OfficesAtmsMap/renderFiltrationForm.tsx +25 -25
- package/package.json +1 -1
- package/src/components/OfficesAtmsMap/Badge.tsx +1 -1
- package/src/components/OfficesAtmsMap/OfficesAtmsMap.example.json +26 -6
- package/src/components/OfficesAtmsMap/OfficesAtmsMapLayout.tsx +4 -2
- package/src/components/OfficesAtmsMap/renderAtmCard.tsx +3 -1
- package/src/components/OfficesAtmsMap/renderFiltrationForm.tsx +25 -25
|
@@ -50,7 +50,9 @@ export const renderAtmCard = (
|
|
|
50
50
|
</div>
|
|
51
51
|
) : null}
|
|
52
52
|
</div>
|
|
53
|
-
<
|
|
53
|
+
<div className="whitespace-nowrap">
|
|
54
|
+
<Badge color="green">{capitalizedFirstLetter(workTime)}</Badge>
|
|
55
|
+
</div>
|
|
54
56
|
</div>
|
|
55
57
|
<div className="hidden sm:block">
|
|
56
58
|
<CardRow className="flex-wrap">{additionalInfo?.map(renderInfo)}</CardRow>
|
|
@@ -28,8 +28,10 @@ const COMMON_FILTERS_STYLES = 'flex flex-col sm:flex-row sm:flex-wrap gap-3xl pb
|
|
|
28
28
|
export const renderFiltrationForm = (
|
|
29
29
|
filters: string[],
|
|
30
30
|
{ field, reset }: { field: FormFieldRegisterer<any>; reset: () => void },
|
|
31
|
-
|
|
31
|
+
onlyOffice?: boolean,
|
|
32
32
|
) => {
|
|
33
|
+
const visibleFiltersNum = onlyOffice ? 3 : 4;
|
|
34
|
+
|
|
33
35
|
const filtersCheckbox = (filters || []).map((key) => (
|
|
34
36
|
<Checkbox key={key} text={FILTRATION_LABELS[key]} {...field(key)} />
|
|
35
37
|
));
|
|
@@ -43,21 +45,17 @@ export const renderFiltrationForm = (
|
|
|
43
45
|
<div>
|
|
44
46
|
{filters?.length ? (
|
|
45
47
|
<div>
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
<div>
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
/>
|
|
58
|
-
) : (
|
|
59
|
-
<div className={COMMON_FILTERS_STYLES}>{visibleFilters}</div>
|
|
60
|
-
)}
|
|
48
|
+
<Foldable
|
|
49
|
+
renderFoldableSection={({ isUnfolded }) => (
|
|
50
|
+
<div>
|
|
51
|
+
<div className={COMMON_FILTERS_STYLES}>{visibleFilters}</div>
|
|
52
|
+
<FoldableSection className={COMMON_FILTERS_STYLES} isUnfolded={isUnfolded}>
|
|
53
|
+
{hiddenFilters}
|
|
54
|
+
</FoldableSection>
|
|
55
|
+
</div>
|
|
56
|
+
)}
|
|
57
|
+
renderFoldButton={renderFoldButton(reset, onlyOffice)}
|
|
58
|
+
/>
|
|
61
59
|
</div>
|
|
62
60
|
) : null}
|
|
63
61
|
</div>
|
|
@@ -65,20 +63,22 @@ export const renderFiltrationForm = (
|
|
|
65
63
|
};
|
|
66
64
|
|
|
67
65
|
export const renderFoldButton =
|
|
68
|
-
(reset: () => void) =>
|
|
66
|
+
(reset: () => void, onlyOffice?: boolean) =>
|
|
69
67
|
({ isUnfolded, onToggle }: FoldablePartProps) => {
|
|
70
68
|
const labels = ['Больше фильтров', 'Меньше фильтров'];
|
|
71
69
|
const icons: IconName[] = ['ArrowDownIcon', 'ArrowUpIcon'];
|
|
72
70
|
|
|
73
71
|
return (
|
|
74
|
-
<div className="flex">
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
72
|
+
<div className="flex space-x-lg">
|
|
73
|
+
{onlyOffice ? (
|
|
74
|
+
<LinkButton
|
|
75
|
+
version="transparent"
|
|
76
|
+
className="text-secondary-text [&>*]:p-0"
|
|
77
|
+
appendRight={<Icon name={icons[Number(isUnfolded)]} width="16" height="16" />}
|
|
78
|
+
text={labels[Number(isUnfolded)]}
|
|
79
|
+
onClick={onToggle}
|
|
80
|
+
/>
|
|
81
|
+
) : null}
|
|
82
82
|
<LinkButton
|
|
83
83
|
version="transparent"
|
|
84
84
|
className="text-secondary-text [&>*]:p-0"
|
package/package.json
CHANGED
|
@@ -19,7 +19,7 @@ export interface BadgeProps {
|
|
|
19
19
|
export const Badge = JSX<BadgeProps>(({ className, children, color = 'gray' }) => (
|
|
20
20
|
<div
|
|
21
21
|
className={style(
|
|
22
|
-
'sm:p-s sm:border sm:border-
|
|
22
|
+
'sm:p-s sm:border sm:border-green rounded-md flex items-center',
|
|
23
23
|
colorStyle[color].border,
|
|
24
24
|
className,
|
|
25
25
|
)}
|
|
@@ -1,6 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
"
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
[
|
|
2
|
+
[
|
|
3
|
+
"Офисы",
|
|
4
|
+
{
|
|
5
|
+
"content": {
|
|
6
|
+
"version": "primary",
|
|
7
|
+
"padding": "",
|
|
8
|
+
"data": {
|
|
9
|
+
"dataType": "offices"
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
[
|
|
15
|
+
"Банкоматы",
|
|
16
|
+
{
|
|
17
|
+
"content": {
|
|
18
|
+
"version": "primary",
|
|
19
|
+
"padding": "",
|
|
20
|
+
"data": {
|
|
21
|
+
"dataType": "atms"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
]
|
|
@@ -45,6 +45,8 @@ export const OfficesAtmsMapLayout = JSX<OfficesAtmsMapLayoutProps<Branch | Atm>>
|
|
|
45
45
|
descriptionData,
|
|
46
46
|
title,
|
|
47
47
|
}) => {
|
|
48
|
+
const onlyOffice = title?.includes('Офис');
|
|
49
|
+
|
|
48
50
|
const [filtrationState, { field, reset }] = useForm(initFilterState);
|
|
49
51
|
|
|
50
52
|
const [filteredItems, points, lengthItems] = useMemo(() => {
|
|
@@ -73,9 +75,9 @@ export const OfficesAtmsMapLayout = JSX<OfficesAtmsMapLayoutProps<Branch | Atm>>
|
|
|
73
75
|
) : null}
|
|
74
76
|
</div>
|
|
75
77
|
{descriptionData ? renderDescriptionBlock(descriptionData) : null}
|
|
76
|
-
{renderButtonsGroup(data, activeButton, setActiveButton)}
|
|
78
|
+
{onlyOffice && renderButtonsGroup(data, activeButton, setActiveButton)}
|
|
77
79
|
<div className={style('pb-2xl', filtersVisibleStyles(activeButton))}>
|
|
78
|
-
{renderFiltrationForm(Object.keys(initFilterState), { field, reset })}
|
|
80
|
+
{renderFiltrationForm(Object.keys(initFilterState), { field, reset }, onlyOffice)}
|
|
79
81
|
</div>
|
|
80
82
|
</div>
|
|
81
83
|
<div className="h-[600px]">
|
|
@@ -50,7 +50,9 @@ export const renderAtmCard = (
|
|
|
50
50
|
</div>
|
|
51
51
|
) : null}
|
|
52
52
|
</div>
|
|
53
|
-
<
|
|
53
|
+
<div className="whitespace-nowrap">
|
|
54
|
+
<Badge color="green">{capitalizedFirstLetter(workTime)}</Badge>
|
|
55
|
+
</div>
|
|
54
56
|
</div>
|
|
55
57
|
<div className="hidden sm:block">
|
|
56
58
|
<CardRow className="flex-wrap">{additionalInfo?.map(renderInfo)}</CardRow>
|
|
@@ -28,8 +28,10 @@ const COMMON_FILTERS_STYLES = 'flex flex-col sm:flex-row sm:flex-wrap gap-3xl pb
|
|
|
28
28
|
export const renderFiltrationForm = (
|
|
29
29
|
filters: string[],
|
|
30
30
|
{ field, reset }: { field: FormFieldRegisterer<any>; reset: () => void },
|
|
31
|
-
|
|
31
|
+
onlyOffice?: boolean,
|
|
32
32
|
) => {
|
|
33
|
+
const visibleFiltersNum = onlyOffice ? 3 : 4;
|
|
34
|
+
|
|
33
35
|
const filtersCheckbox = (filters || []).map((key) => (
|
|
34
36
|
<Checkbox key={key} text={FILTRATION_LABELS[key]} {...field(key)} />
|
|
35
37
|
));
|
|
@@ -43,21 +45,17 @@ export const renderFiltrationForm = (
|
|
|
43
45
|
<div>
|
|
44
46
|
{filters?.length ? (
|
|
45
47
|
<div>
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
<div>
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
/>
|
|
58
|
-
) : (
|
|
59
|
-
<div className={COMMON_FILTERS_STYLES}>{visibleFilters}</div>
|
|
60
|
-
)}
|
|
48
|
+
<Foldable
|
|
49
|
+
renderFoldableSection={({ isUnfolded }) => (
|
|
50
|
+
<div>
|
|
51
|
+
<div className={COMMON_FILTERS_STYLES}>{visibleFilters}</div>
|
|
52
|
+
<FoldableSection className={COMMON_FILTERS_STYLES} isUnfolded={isUnfolded}>
|
|
53
|
+
{hiddenFilters}
|
|
54
|
+
</FoldableSection>
|
|
55
|
+
</div>
|
|
56
|
+
)}
|
|
57
|
+
renderFoldButton={renderFoldButton(reset, onlyOffice)}
|
|
58
|
+
/>
|
|
61
59
|
</div>
|
|
62
60
|
) : null}
|
|
63
61
|
</div>
|
|
@@ -65,20 +63,22 @@ export const renderFiltrationForm = (
|
|
|
65
63
|
};
|
|
66
64
|
|
|
67
65
|
export const renderFoldButton =
|
|
68
|
-
(reset: () => void) =>
|
|
66
|
+
(reset: () => void, onlyOffice?: boolean) =>
|
|
69
67
|
({ isUnfolded, onToggle }: FoldablePartProps) => {
|
|
70
68
|
const labels = ['Больше фильтров', 'Меньше фильтров'];
|
|
71
69
|
const icons: IconName[] = ['ArrowDownIcon', 'ArrowUpIcon'];
|
|
72
70
|
|
|
73
71
|
return (
|
|
74
|
-
<div className="flex">
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
72
|
+
<div className="flex space-x-lg">
|
|
73
|
+
{onlyOffice ? (
|
|
74
|
+
<LinkButton
|
|
75
|
+
version="transparent"
|
|
76
|
+
className="text-secondary-text [&>*]:p-0"
|
|
77
|
+
appendRight={<Icon name={icons[Number(isUnfolded)]} width="16" height="16" />}
|
|
78
|
+
text={labels[Number(isUnfolded)]}
|
|
79
|
+
onClick={onToggle}
|
|
80
|
+
/>
|
|
81
|
+
) : null}
|
|
82
82
|
<LinkButton
|
|
83
83
|
version="transparent"
|
|
84
84
|
className="text-secondary-text [&>*]:p-0"
|