@redneckz/wildless-cms-uni-blocks 0.14.274 → 0.14.276
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/bin/migration-scripts/0.14.272.js +25 -0
- package/bundle/bundle.umd.js +5 -25
- package/bundle/bundle.umd.min.js +1 -1
- package/dist/components/ApplicationFormCustom/ApplicationFormCustom.js +2 -1
- package/dist/components/ApplicationFormCustom/ApplicationFormCustom.js.map +1 -1
- package/dist/components/ApplicationFormCustom/getFormatData.js +1 -0
- package/dist/components/ApplicationFormCustom/getFormatData.js.map +1 -1
- package/dist/ui-kit/YandexMap/YandexMap.js +2 -24
- package/dist/ui-kit/YandexMap/YandexMap.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/ApplicationFormCustom/ApplicationFormCustom.js +2 -1
- package/lib/components/ApplicationFormCustom/ApplicationFormCustom.js.map +1 -1
- package/lib/components/ApplicationFormCustom/getFormatData.js +1 -0
- package/lib/components/ApplicationFormCustom/getFormatData.js.map +1 -1
- package/lib/ui-kit/YandexMap/YandexMap.js +3 -25
- package/lib/ui-kit/YandexMap/YandexMap.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +5 -25
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/dist/components/ApplicationFormCustom/ApplicationFormCustom.js +2 -1
- package/mobile/dist/components/ApplicationFormCustom/ApplicationFormCustom.js.map +1 -1
- package/mobile/dist/components/ApplicationFormCustom/getFormatData.js +1 -0
- package/mobile/dist/components/ApplicationFormCustom/getFormatData.js.map +1 -1
- package/mobile/dist/ui-kit/YandexMap/YandexMap.js +2 -24
- package/mobile/dist/ui-kit/YandexMap/YandexMap.js.map +1 -1
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/ApplicationFormCustom/ApplicationFormCustom.js +2 -1
- package/mobile/lib/components/ApplicationFormCustom/ApplicationFormCustom.js.map +1 -1
- package/mobile/lib/components/ApplicationFormCustom/getFormatData.js +1 -0
- package/mobile/lib/components/ApplicationFormCustom/getFormatData.js.map +1 -1
- package/mobile/lib/ui-kit/YandexMap/YandexMap.js +3 -25
- package/mobile/lib/ui-kit/YandexMap/YandexMap.js.map +1 -1
- package/mobile/src/components/ApplicationFormCustom/ApplicationFormCustom.example.json +1 -1
- package/mobile/src/components/ApplicationFormCustom/ApplicationFormCustom.tsx +6 -1
- package/mobile/src/components/ApplicationFormCustom/getFormatData.tsx +1 -0
- package/mobile/src/ui-kit/YandexMap/YandexMap.tsx +3 -33
- package/package.json +1 -1
- package/src/components/ApplicationFormCustom/ApplicationFormCustom.example.json +1 -1
- package/src/components/ApplicationFormCustom/ApplicationFormCustom.fixture.tsx +1 -1
- package/src/components/ApplicationFormCustom/ApplicationFormCustom.tsx +6 -1
- package/src/components/ApplicationFormCustom/getFormatData.tsx +1 -0
- package/src/ui-kit/YandexMap/YandexMap.tsx +3 -33
|
@@ -3,6 +3,7 @@ import { useCallback, useEffect, useState } from '@redneckz/uni-jsx/lib/hooks';
|
|
|
3
3
|
import { LeadServiceAPI } from '../../api/LeadServiceAPI';
|
|
4
4
|
import { useForm } from '../../hooks/useForm';
|
|
5
5
|
import { ApplicationFormLayout } from '../../ui-kit/ApplicationFormLayout/ApplicationFormLayout';
|
|
6
|
+
import { Text } from '../../ui-kit/Text/Text';
|
|
6
7
|
import { type UniBlockProps } from '../../UniBlock/UniBlockProps';
|
|
7
8
|
import { style } from '../../utils/style';
|
|
8
9
|
import { objectValidator } from '../../validation/objectValidator';
|
|
@@ -74,7 +75,11 @@ export const ApplicationFormCustom = JSX<ApplicationFormCustomProps>(
|
|
|
74
75
|
key={`section-${i}`}
|
|
75
76
|
className={style(inputColumnStyles(_.columns), 'grid gap-x-m')}
|
|
76
77
|
>
|
|
77
|
-
{_?.title ?
|
|
78
|
+
{_?.title ? (
|
|
79
|
+
<div className="@xl:text-center @xl:col-span-2 mb-m">
|
|
80
|
+
<Text size="text-h6">{_.title}</Text>
|
|
81
|
+
</div>
|
|
82
|
+
) : null}
|
|
78
83
|
{(_?.inputs || [])?.map(getField(field, typeForm))}
|
|
79
84
|
</div>
|
|
80
85
|
))}
|
|
@@ -24,6 +24,7 @@ export const getFormatData = (data: Record<string, any>) => {
|
|
|
24
24
|
...getVedTypes(vedTypes as string),
|
|
25
25
|
...getRegion(region as Option),
|
|
26
26
|
...(partnerComments ? { partnerComments } : {}),
|
|
27
|
+
...(serviceType ? { typeForm: serviceType } : {}),
|
|
27
28
|
...(feedbackType ? { typeForm: feedbackType } : {}),
|
|
28
29
|
};
|
|
29
30
|
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
2
2
|
// @ts-nocheck
|
|
3
3
|
import { JSX } from '@redneckz/uni-jsx';
|
|
4
|
-
import { useEffect, useRef
|
|
4
|
+
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 { Icon } from '../Icon/Icon';
|
|
9
8
|
import { renderClusterer } from './renderClusterer';
|
|
10
9
|
import { renderUserGeolocation } from './renderUserGeolocation';
|
|
11
10
|
import { useYandexMaps } from './useYandexMaps';
|
|
@@ -17,17 +16,6 @@ interface YandexMapProps {
|
|
|
17
16
|
zoom?: number;
|
|
18
17
|
}
|
|
19
18
|
|
|
20
|
-
const FULLSCREEN_STYLES = {
|
|
21
|
-
border: 'border border-transparent rounded-md ',
|
|
22
|
-
position: 'absolute flex items-center justify-center',
|
|
23
|
-
size: 'w-12 h-12',
|
|
24
|
-
focus: 'focus:border-primary-text focus:border',
|
|
25
|
-
font: 'text-center font-sans',
|
|
26
|
-
active: 'active:bg-primary-active',
|
|
27
|
-
hover: 'hover:bg-primary-hover',
|
|
28
|
-
other: 'select-none cursor-pointer',
|
|
29
|
-
};
|
|
30
|
-
|
|
31
19
|
const DEFAULT_CENTER_COORDS = [55.753995, 37.614069];
|
|
32
20
|
|
|
33
21
|
// TODO: Поле для поиска: невыяснено среди каких данных делать поиск (искать в имени офиса, в адресе, метро и т.д.).
|
|
@@ -39,8 +27,6 @@ export const YandexMap = JSX<YandexMapProps>(({ points, className = '', zoom = 5
|
|
|
39
27
|
|
|
40
28
|
const yandexMaps = useYandexMaps();
|
|
41
29
|
|
|
42
|
-
const [isFullScreen, setIsFullScreen] = useState();
|
|
43
|
-
|
|
44
30
|
useEffect(() => {
|
|
45
31
|
if (!map?.current) {
|
|
46
32
|
yandexMaps?.ready(() => {
|
|
@@ -71,26 +57,10 @@ export const YandexMap = JSX<YandexMapProps>(({ points, className = '', zoom = 5
|
|
|
71
57
|
return null;
|
|
72
58
|
}
|
|
73
59
|
|
|
74
|
-
const
|
|
75
|
-
const container = map.current.container;
|
|
76
|
-
if (!isFullScreen) {
|
|
77
|
-
container.enterFullscreen();
|
|
78
|
-
} else {
|
|
79
|
-
container.exitFullscreen();
|
|
80
|
-
}
|
|
81
|
-
setIsFullScreen(container.isFullscreen());
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
const zIndex = isFullScreen ? 'z-[100000]' : 'z-10';
|
|
60
|
+
const zIndex = 'z-10';
|
|
85
61
|
|
|
86
62
|
return (
|
|
87
|
-
<div id="map" className={style(
|
|
88
|
-
<div
|
|
89
|
-
className={style(Object.values(FULLSCREEN_STYLES), zIndex, 'right-2 top-4 bg-white')}
|
|
90
|
-
onClick={toggleFullscreen}
|
|
91
|
-
>
|
|
92
|
-
<Icon name="FullScreenIcon" width="16" height="16" />
|
|
93
|
-
</div>
|
|
63
|
+
<div id="map" className={style('relative', 'w-full', className)}>
|
|
94
64
|
<div
|
|
95
65
|
className={style(
|
|
96
66
|
'absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md',
|