@gravity-ui/page-constructor 7.15.1 → 7.16.0
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/build/cjs/blocks/Map/Map.js.map +1 -1
- package/build/cjs/blocks/Map/schema.d.ts +96 -0
- package/build/cjs/components/Map/GoogleMap.js +6 -2
- package/build/cjs/components/Map/GoogleMap.js.map +1 -1
- package/build/cjs/components/Map/YMap/YMap.d.ts +3 -3
- package/build/cjs/components/Map/YMap/YMap.js +13 -1
- package/build/cjs/components/Map/YMap/YMap.js.map +1 -1
- package/build/cjs/components/Map/YMap/YandexMap.js +35 -6
- package/build/cjs/components/Map/YMap/YandexMap.js.map +1 -1
- package/build/cjs/components/index.d.ts +1 -0
- package/build/cjs/components/index.js +3 -1
- package/build/cjs/components/index.js.map +1 -1
- package/build/cjs/internal-typings/global.d.ts +4 -2
- package/build/cjs/models/constructor-items/blocks.d.ts +1 -1
- package/build/cjs/models/constructor-items/blocks.js.map +1 -1
- package/build/cjs/models/constructor-items/common.d.ts +16 -0
- package/build/cjs/models/constructor-items/common.js.map +1 -1
- package/build/cjs/schema/validators/common.d.ts +126 -0
- package/build/cjs/schema/validators/common.js +33 -0
- package/build/cjs/schema/validators/common.js.map +1 -1
- package/build/esm/blocks/Map/Map.js.map +1 -1
- package/build/esm/blocks/Map/schema.d.ts +96 -0
- package/build/esm/components/Map/GoogleMap.js +6 -2
- package/build/esm/components/Map/GoogleMap.js.map +1 -1
- package/build/esm/components/Map/YMap/YMap.d.ts +3 -3
- package/build/esm/components/Map/YMap/YMap.js +13 -1
- package/build/esm/components/Map/YMap/YMap.js.map +1 -1
- package/build/esm/components/Map/YMap/YandexMap.js +35 -6
- package/build/esm/components/Map/YMap/YandexMap.js.map +1 -1
- package/build/esm/components/index.d.ts +1 -0
- package/build/esm/components/index.js +1 -0
- package/build/esm/components/index.js.map +1 -1
- package/build/esm/internal-typings/global.d.ts +4 -2
- package/build/esm/models/constructor-items/blocks.d.ts +1 -1
- package/build/esm/models/constructor-items/blocks.js.map +1 -1
- package/build/esm/models/constructor-items/common.d.ts +16 -0
- package/build/esm/models/constructor-items/common.js.map +1 -1
- package/build/esm/schema/validators/common.d.ts +126 -0
- package/build/esm/schema/validators/common.js +33 -0
- package/build/esm/schema/validators/common.js.map +1 -1
- package/package.json +1 -1
- package/schema/index.js +1 -1
- package/server/models/constructor-items/blocks.d.ts +1 -1
- package/server/models/constructor-items/common.d.ts +16 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Map.js","sourceRoot":"../../../../src","sources":["blocks/Map/Map.tsx"],"names":[],"mappings":";;;;;AAAA,8EAA2C;AAC3C,gGAA6D;AAE7D,gDAAkC;AAClC,kEAA0D;AAI1D,MAAM,CAAC,GAAG,IAAA,aAAK,EAAC,WAAW,CAAC,CAAC;AAEtB,MAAM,QAAQ,GAAG,CAAC,EAAC,GAAG,EAAE,MAAM,EAAE,aAAa,EAAE,GAAG,KAAK,EAAgB,EAAE,EAAE;IAC9E,MAAM,cAAc,GAAG,IAAA,+BAAc,EAAC;QAClC,MAAM;QACN,aAAa;KAChB,CAAC,CAAC;IAEH,OAAO,CACH,uBAAC,mBAAS,OAAK,KAAK,YAChB,uBAAC,mBAAS,CAAC,IAAI,cACX,uBAAC,aAAG,
|
|
1
|
+
{"version":3,"file":"Map.js","sourceRoot":"../../../../src","sources":["blocks/Map/Map.tsx"],"names":[],"mappings":";;;;;AAAA,8EAA2C;AAC3C,gGAA6D;AAE7D,gDAAkC;AAClC,kEAA0D;AAI1D,MAAM,CAAC,GAAG,IAAA,aAAK,EAAC,WAAW,CAAC,CAAC;AAEtB,MAAM,QAAQ,GAAG,CAAC,EAAC,GAAG,EAAE,MAAM,EAAE,aAAa,EAAE,GAAG,KAAK,EAAgB,EAAE,EAAE;IAC9E,MAAM,cAAc,GAAG,IAAA,+BAAc,EAAC;QAClC,MAAM;QACN,aAAa;KAChB,CAAC,CAAC;IAEH,OAAO,CACH,uBAAC,mBAAS,OAAK,KAAK,YAChB,uBAAC,mBAAS,CAAC,IAAI,cACX,uBAAC,aAAG,OAAM,GAAgB,EAAE,SAAS,EAAE,CAAC,CAAC,EAAC,MAAM,EAAE,cAAc,EAAC,CAAC,GAAI,GACzD,GACT,CACf,CAAC;AACN,CAAC,CAAC;AAbW,QAAA,QAAQ,YAanB;AAEF,kBAAe,gBAAQ,CAAC","sourcesContent":["import Map from '../../components/Map/Map';\nimport MediaBase from '../../components/MediaBase/MediaBase';\nimport {MapBlockProps, MapProps} from '../../models';\nimport {block} from '../../utils';\nimport {getMediaBorder} from '../../utils/borderSelector';\n\nimport './Map.scss';\n\nconst b = block('map-block');\n\nexport const MapBlock = ({map, border, disableShadow, ...props}: MapBlockProps) => {\n const borderSelected = getMediaBorder({\n border,\n disableShadow,\n });\n\n return (\n <MediaBase {...props}>\n <MediaBase.Card>\n <Map {...(map as MapProps)} className={b({border: borderSelected})} />\n </MediaBase.Card>\n </MediaBase>\n );\n};\n\nexport default MapBlock;\n"]}
|
|
@@ -41,6 +41,45 @@ export declare const Map: {
|
|
|
41
41
|
iconColor: {
|
|
42
42
|
type: string;
|
|
43
43
|
};
|
|
44
|
+
iconImageHref: {
|
|
45
|
+
type: string;
|
|
46
|
+
};
|
|
47
|
+
iconImageSize: {
|
|
48
|
+
type: string;
|
|
49
|
+
items: {
|
|
50
|
+
type: string;
|
|
51
|
+
};
|
|
52
|
+
minItems: number;
|
|
53
|
+
maxItems: number;
|
|
54
|
+
};
|
|
55
|
+
iconImageOffset: {
|
|
56
|
+
type: string;
|
|
57
|
+
items: {
|
|
58
|
+
type: string;
|
|
59
|
+
};
|
|
60
|
+
minItems: number;
|
|
61
|
+
maxItems: number;
|
|
62
|
+
};
|
|
63
|
+
iconImageClipRect: {
|
|
64
|
+
type: string;
|
|
65
|
+
items: {
|
|
66
|
+
type: string;
|
|
67
|
+
items: {
|
|
68
|
+
type: string;
|
|
69
|
+
};
|
|
70
|
+
minItems: number;
|
|
71
|
+
maxItems: number;
|
|
72
|
+
};
|
|
73
|
+
minItems: number;
|
|
74
|
+
maxItems: number;
|
|
75
|
+
};
|
|
76
|
+
iconLayout: {
|
|
77
|
+
type: string;
|
|
78
|
+
};
|
|
79
|
+
iconShape: {
|
|
80
|
+
type: string;
|
|
81
|
+
additionalProperties: boolean;
|
|
82
|
+
};
|
|
44
83
|
preset: {
|
|
45
84
|
type: string;
|
|
46
85
|
};
|
|
@@ -49,6 +88,15 @@ export declare const Map: {
|
|
|
49
88
|
};
|
|
50
89
|
};
|
|
51
90
|
};
|
|
91
|
+
forceAspectRatio: {
|
|
92
|
+
type: string;
|
|
93
|
+
};
|
|
94
|
+
disableControls: {
|
|
95
|
+
type: string;
|
|
96
|
+
};
|
|
97
|
+
disableBalloons: {
|
|
98
|
+
type: string;
|
|
99
|
+
};
|
|
52
100
|
};
|
|
53
101
|
};
|
|
54
102
|
export declare const MapBlock: {
|
|
@@ -99,6 +147,45 @@ export declare const MapBlock: {
|
|
|
99
147
|
iconColor: {
|
|
100
148
|
type: string;
|
|
101
149
|
};
|
|
150
|
+
iconImageHref: {
|
|
151
|
+
type: string;
|
|
152
|
+
};
|
|
153
|
+
iconImageSize: {
|
|
154
|
+
type: string;
|
|
155
|
+
items: {
|
|
156
|
+
type: string;
|
|
157
|
+
};
|
|
158
|
+
minItems: number;
|
|
159
|
+
maxItems: number;
|
|
160
|
+
};
|
|
161
|
+
iconImageOffset: {
|
|
162
|
+
type: string;
|
|
163
|
+
items: {
|
|
164
|
+
type: string;
|
|
165
|
+
};
|
|
166
|
+
minItems: number;
|
|
167
|
+
maxItems: number;
|
|
168
|
+
};
|
|
169
|
+
iconImageClipRect: {
|
|
170
|
+
type: string;
|
|
171
|
+
items: {
|
|
172
|
+
type: string;
|
|
173
|
+
items: {
|
|
174
|
+
type: string;
|
|
175
|
+
};
|
|
176
|
+
minItems: number;
|
|
177
|
+
maxItems: number;
|
|
178
|
+
};
|
|
179
|
+
minItems: number;
|
|
180
|
+
maxItems: number;
|
|
181
|
+
};
|
|
182
|
+
iconLayout: {
|
|
183
|
+
type: string;
|
|
184
|
+
};
|
|
185
|
+
iconShape: {
|
|
186
|
+
type: string;
|
|
187
|
+
additionalProperties: boolean;
|
|
188
|
+
};
|
|
102
189
|
preset: {
|
|
103
190
|
type: string;
|
|
104
191
|
};
|
|
@@ -107,6 +194,15 @@ export declare const MapBlock: {
|
|
|
107
194
|
};
|
|
108
195
|
};
|
|
109
196
|
};
|
|
197
|
+
forceAspectRatio: {
|
|
198
|
+
type: string;
|
|
199
|
+
};
|
|
200
|
+
disableControls: {
|
|
201
|
+
type: string;
|
|
202
|
+
};
|
|
203
|
+
disableBalloons: {
|
|
204
|
+
type: string;
|
|
205
|
+
};
|
|
110
206
|
};
|
|
111
207
|
};
|
|
112
208
|
description: {
|
|
@@ -16,7 +16,7 @@ function getScriptSrc(params) {
|
|
|
16
16
|
return `${scriptSrc}?key=${apiKey}&language=${lang}${zoom ? '&zoom=' + zoom : ''}&q=${encodeURI(address)}`;
|
|
17
17
|
}
|
|
18
18
|
const GoogleMap = (props) => {
|
|
19
|
-
const { address, zoom, className } = props;
|
|
19
|
+
const { address, zoom, className, forceAspectRatio = true } = props;
|
|
20
20
|
const { apiKey, scriptSrc } = React.useContext(mapsContext_1.MapsContext);
|
|
21
21
|
const { lang = uikit_1.Lang.Ru } = React.useContext(localeContext_1.LocaleContext);
|
|
22
22
|
const isMobile = React.useContext(mobileContext_1.MobileContext);
|
|
@@ -24,6 +24,9 @@ const GoogleMap = (props) => {
|
|
|
24
24
|
const ref = React.useRef(null);
|
|
25
25
|
const src = React.useMemo(() => getScriptSrc({ apiKey, scriptSrc, address, lang, zoom }), [apiKey, scriptSrc, address, lang, zoom]);
|
|
26
26
|
React.useEffect(() => {
|
|
27
|
+
if (!forceAspectRatio) {
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
27
30
|
const updateSize = (0, debounce_1.default)(() => {
|
|
28
31
|
if (ref.current) {
|
|
29
32
|
setHeight(Math.round((0, helpers_1.getMapHeight)(ref.current.offsetWidth, isMobile)));
|
|
@@ -31,10 +34,11 @@ const GoogleMap = (props) => {
|
|
|
31
34
|
}, 100);
|
|
32
35
|
updateSize();
|
|
33
36
|
window.addEventListener('resize', updateSize, { passive: true });
|
|
37
|
+
// eslint-disable-next-line consistent-return
|
|
34
38
|
return () => {
|
|
35
39
|
window.removeEventListener('resize', updateSize);
|
|
36
40
|
};
|
|
37
|
-
}, [isMobile]);
|
|
41
|
+
}, [forceAspectRatio, isMobile]);
|
|
38
42
|
if (!apiKey || !address) {
|
|
39
43
|
return null;
|
|
40
44
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GoogleMap.js","sourceRoot":"../../../../src","sources":["components/Map/GoogleMap.tsx"],"names":[],"mappings":";;;;AAAA,qDAA+B;AAE/B,6CAAuC;AACvC,0EAAuC;AAEvC,gFAAwE;AACxE,0EAAkE;AAClE,wEAA0D;AAE1D,gDAAkC;AAElC,0CAAuC;AAEvC,MAAM,CAAC,GAAG,IAAA,aAAK,EAAC,KAAK,CAAC,CAAC;AAUvB,SAAS,YAAY,CAAC,MAA2B;IAC7C,MAAM,EAAC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAC,GAAG,MAAM,CAAC;IAExD,OAAO,GAAG,SAAS,QAAQ,MAAM,aAAa,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,QAAQ,GAAG,IAAI,CAAC,CAAC,CAAC,EAAE,MAAM,SAAS,CAC3F,OAAO,CACV,EAAE,CAAC;AACR,CAAC;AAED,MAAM,SAAS,GAAG,CAAC,KAAgB,EAAE,EAAE;IACnC,MAAM,EAAC,OAAO,EAAE,IAAI,EAAE,SAAS,EAAC,GAAG,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"GoogleMap.js","sourceRoot":"../../../../src","sources":["components/Map/GoogleMap.tsx"],"names":[],"mappings":";;;;AAAA,qDAA+B;AAE/B,6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AAE,IAAI,EAAE,IAAI,CAAC,CAC3C,CAAC;IAEF,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACjB,IAAI,CAAC,gBAAgB,EAAE,CAAC;YACpB,OAAO;QACX,CAAC;QAED,MAAM,UAAU,GAAG,IAAA,kBAAQ,EAAC,GAAG,EAAE;YAC7B,IAAI,GAAG,CAAC,OAAO,EAAE,CAAC;gBACd,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,IAAA,sBAAY,EAAC,GAAG,CAAC,OAAO,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC;YAC3E,CAAC;QACL,CAAC,EAAE,GAAG,CAAC,CAAC;QAER,UAAU,EAAE,CAAC;QACb,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE,UAAU,EAAE,EAAC,OAAO,EAAE,IAAI,EAAC,CAAC,CAAC;QAE/D,6CAA6C;QAC7C,OAAO,GAAG,EAAE;YACR,MAAM,CAAC,mBAAmB,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;QACrD,CAAC,CAAC;IACN,CAAC,EAAE,CAAC,gBAAgB,EAAE,QAAQ,CAAC,CAAC,CAAC;IAEjC,IAAI,CAAC,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC;QACtB,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,OAAO,CACH,mCACI,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,SAAS,CAAC,EAC7B,GAAG,EAAE,GAAG,EACR,KAAK,EAAE;YACH,MAAM;SACT,EACD,KAAK,EAAC,YAAY,EAClB,OAAO,EAAC,MAAM,EACd,eAAe,QACf,cAAc,EAAC,4BAA4B,EAC3C,GAAG,EAAE,GAAG,GACV,CACL,CAAC;AACN,CAAC,CAAC;AAEF,kBAAe,SAAS,CAAC","sourcesContent":["import * as React from 'react';\n\nimport {Lang} from '@gravity-ui/uikit';\nimport debounce from 'lodash/debounce';\n\nimport {LocaleContext} from '../../context/localeContext/localeContext';\nimport {MapsContext} from '../../context/mapsContext/mapsContext';\nimport {MobileContext} from '../../context/mobileContext';\nimport {GMapProps} from '../../models';\nimport {block} from '../../utils';\n\nimport {getMapHeight} from './helpers';\n\nconst b = block('map');\n\ninterface GoogleMapLinkParams {\n apiKey: string;\n scriptSrc: string;\n address: string;\n lang: `${Lang}`;\n zoom?: number;\n}\n\nfunction getScriptSrc(params: GoogleMapLinkParams) {\n const {apiKey, scriptSrc, address, lang, zoom} = params;\n\n return `${scriptSrc}?key=${apiKey}&language=${lang}${zoom ? '&zoom=' + zoom : ''}&q=${encodeURI(\n address,\n )}`;\n}\n\nconst GoogleMap = (props: GMapProps) => {\n const {address, zoom, className, forceAspectRatio = true} = props;\n const {apiKey, scriptSrc} = React.useContext(MapsContext);\n const {lang = Lang.Ru} = React.useContext(LocaleContext);\n const isMobile = React.useContext(MobileContext);\n\n const [height, setHeight] = React.useState<number | undefined>(undefined);\n const ref = React.useRef<HTMLIFrameElement>(null);\n const src = React.useMemo(\n () => getScriptSrc({apiKey, scriptSrc, address, lang, zoom}),\n [apiKey, scriptSrc, address, lang, zoom],\n );\n\n React.useEffect(() => {\n if (!forceAspectRatio) {\n return;\n }\n\n const updateSize = debounce(() => {\n if (ref.current) {\n setHeight(Math.round(getMapHeight(ref.current.offsetWidth, isMobile)));\n }\n }, 100);\n\n updateSize();\n window.addEventListener('resize', updateSize, {passive: true});\n\n // eslint-disable-next-line consistent-return\n return () => {\n window.removeEventListener('resize', updateSize);\n };\n }, [forceAspectRatio, isMobile]);\n\n if (!apiKey || !address) {\n return null;\n }\n\n return (\n <iframe\n className={b(null, className)}\n ref={ref}\n style={{\n height,\n }}\n title=\"Google Map\"\n loading=\"lazy\"\n allowFullScreen\n referrerPolicy=\"no-referrer-when-downgrade\"\n src={src}\n />\n );\n};\n\nexport default GoogleMap;\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { YMapMarkerPrivate, YMapProps } from "../../../models/index.js";
|
|
2
2
|
type PlacemarksProps = Pick<YMapProps, 'zoom' | 'markers'>;
|
|
3
3
|
export declare class YMap {
|
|
4
4
|
private ymap;
|
|
@@ -6,8 +6,8 @@ export declare class YMap {
|
|
|
6
6
|
private coords;
|
|
7
7
|
constructor(ymap: Ymaps.Map, mapRef: HTMLDivElement | null);
|
|
8
8
|
showPlacemarks(props: PlacemarksProps): Promise<void>;
|
|
9
|
-
findAddress(marker:
|
|
10
|
-
findCoordinate(marker:
|
|
9
|
+
findAddress(marker: YMapMarkerPrivate): Promise<void>;
|
|
10
|
+
findCoordinate(marker: YMapMarkerPrivate): void;
|
|
11
11
|
private drawPlaceMarkStyle;
|
|
12
12
|
private recalcZoomAndCenter;
|
|
13
13
|
private clearOldPlacemarks;
|
|
@@ -11,9 +11,17 @@ const DEFAULT_PLACEMARKS_COLOR = '#dc534b';
|
|
|
11
11
|
const DEFAULT_PLACEMARKS_PRESET = 'islands#dotIcon';
|
|
12
12
|
const DEFAULT_MAP_CONTROL_BUTTON_HEIGHT = 30;
|
|
13
13
|
const geoObjectPropsAndOptions = {
|
|
14
|
+
cursor: GeoObjectTypes.Options,
|
|
14
15
|
iconCaption: GeoObjectTypes.Properties,
|
|
15
16
|
iconContent: GeoObjectTypes.Properties,
|
|
16
17
|
iconColor: GeoObjectTypes.Options,
|
|
18
|
+
iconImageHref: GeoObjectTypes.Options,
|
|
19
|
+
iconImageSize: GeoObjectTypes.Options,
|
|
20
|
+
iconImageOffset: GeoObjectTypes.Options,
|
|
21
|
+
iconImageClipRect: GeoObjectTypes.Options,
|
|
22
|
+
iconLayout: GeoObjectTypes.Options,
|
|
23
|
+
iconShape: GeoObjectTypes.Options,
|
|
24
|
+
interactivityModel: GeoObjectTypes.Options,
|
|
17
25
|
preset: GeoObjectTypes.Options,
|
|
18
26
|
};
|
|
19
27
|
class YMap {
|
|
@@ -60,7 +68,11 @@ class YMap {
|
|
|
60
68
|
if (!preset.includes('Stretchy') && !iconColor) {
|
|
61
69
|
localIconColor = DEFAULT_PLACEMARKS_COLOR;
|
|
62
70
|
}
|
|
63
|
-
Object.entries({
|
|
71
|
+
Object.entries({
|
|
72
|
+
...marker.label,
|
|
73
|
+
iconColor: localIconColor,
|
|
74
|
+
preset,
|
|
75
|
+
}).forEach(([key, value]) => {
|
|
64
76
|
const geoObjectParamType = geoObjectPropsAndOptions[key];
|
|
65
77
|
if (value && geoObjectParamType) {
|
|
66
78
|
geoObject[geoObjectParamType].set(key, value);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"YMap.js","sourceRoot":"../../../../../src","sources":["components/Map/YMap/YMap.ts"],"names":[],"mappings":";;;AAGA,IAAK,cAGJ;AAHD,WAAK,cAAc;IACf,2CAAyB,CAAA;IACzB,qCAAmB,CAAA;AACvB,CAAC,EAHI,cAAc,KAAd,cAAc,QAGlB;AAED,MAAM,wBAAwB,GAAG,SAAS,CAAC;AAC3C,mGAAmG;AACnG,MAAM,yBAAyB,GAAG,iBAAiB,CAAC;AACpD,MAAM,iCAAiC,GAAG,EAAE,CAAC;AAE7C,MAAM,wBAAwB,
|
|
1
|
+
{"version":3,"file":"YMap.js","sourceRoot":"../../../../../src","sources":["components/Map/YMap/YMap.ts"],"names":[],"mappings":";;;AAGA,IAAK,cAGJ;AAHD,WAAK,cAAc;IACf,2CAAyB,CAAA;IACzB,qCAAmB,CAAA;AACvB,CAAC,EAHI,cAAc,KAAd,cAAc,QAGlB;AAED,MAAM,wBAAwB,GAAG,SAAS,CAAC;AAC3C,mGAAmG;AACnG,MAAM,yBAAyB,GAAG,iBAAiB,CAAC;AACpD,MAAM,iCAAiC,GAAG,EAAE,CAAC;AAE7C,MAAM,wBAAwB,GAAyD;IACnF,MAAM,EAAE,cAAc,CAAC,OAAO;IAC9B,WAAW,EAAE,cAAc,CAAC,UAAU;IACtC,WAAW,EAAE,cAAc,CAAC,UAAU;IACtC,SAAS,EAAE,cAAc,CAAC,OAAO;IACjC,aAAa,EAAE,cAAc,CAAC,OAAO;IACrC,aAAa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AM,CAAC;YACJ,YAAY,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,gBAAgB,CACpD,CAAC,UAAU,EAAE,QAAQ,CAAC,EACtB,CAAC,IAAI,CAAC,MAAM,EAAE,WAAW,EAAE,IAAI,CAAC,MAAM,EAAE,YAAY,CAAC,EACrD,SAAS,EACT,EAAC,MAAM,EAAE,iCAAiC,EAAC,CAC9C,CAAC;QACN,CAAC;QAED,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;QAEzC,qCAAqC;QACrC,IAAI,YAAY,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;YAC5B,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;QACzC,CAAC;IACL,CAAC;IAEO,kBAAkB;QACtB,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC3B,OAAO;QACX,CAAC;QAED,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,SAAS,EAAE,CAAC;QACjC,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC;IACrB,CAAC;CACJ;AAtHD,oBAsHC","sourcesContent":["import {YMapMarkerLabelPrivate, YMapMarkerPrivate, YMapProps} from '../../../models';\nimport {Coordinate} from '../../../models/constructor-items/common';\n\nenum GeoObjectTypes {\n Properties = 'properties',\n Options = 'options',\n}\n\nconst DEFAULT_PLACEMARKS_COLOR = '#dc534b';\n// presetStorage: https://yandex.com/dev/maps/jsapi/doc/2.1/ref/reference/option.presetStorage.html\nconst DEFAULT_PLACEMARKS_PRESET = 'islands#dotIcon';\nconst DEFAULT_MAP_CONTROL_BUTTON_HEIGHT = 30;\n\nconst geoObjectPropsAndOptions: Record<keyof YMapMarkerLabelPrivate, GeoObjectTypes> = {\n cursor: GeoObjectTypes.Options,\n iconCaption: GeoObjectTypes.Properties,\n iconContent: GeoObjectTypes.Properties,\n iconColor: GeoObjectTypes.Options,\n iconImageHref: GeoObjectTypes.Options,\n iconImageSize: GeoObjectTypes.Options,\n iconImageOffset: GeoObjectTypes.Options,\n iconImageClipRect: GeoObjectTypes.Options,\n iconLayout: GeoObjectTypes.Options,\n iconShape: GeoObjectTypes.Options,\n interactivityModel: GeoObjectTypes.Options,\n preset: GeoObjectTypes.Options,\n};\n\ntype PlacemarksProps = Pick<YMapProps, 'zoom' | 'markers'>;\n\nexport class YMap {\n private ymap: Ymaps.Map;\n private mapRef: HTMLDivElement | null;\n private coords: Coordinate[] = [];\n\n constructor(ymap: Ymaps.Map, mapRef: HTMLDivElement | null) {\n this.ymap = ymap;\n this.mapRef = mapRef;\n }\n\n async showPlacemarks(props: PlacemarksProps) {\n this.clearOldPlacemarks();\n\n for (const marker of props.markers) {\n if (marker.address) {\n await this.findAddress(marker);\n } else if (marker.coordinate) {\n this.findCoordinate(marker);\n }\n }\n\n this.recalcZoomAndCenter(props);\n }\n\n async findAddress(marker: YMapMarkerPrivate) {\n try {\n const res = await window.ymaps.geocode(marker.address, {results: 1});\n const geoObject = res.geoObjects.get(0);\n const coordinate = geoObject.geometry.getCoordinates();\n\n this.coords.push(coordinate);\n\n this.drawPlaceMarkStyle(geoObject, marker);\n\n this.ymap.geoObjects.add(geoObject);\n } catch {} // If error - placemark will not be displayed\n }\n\n findCoordinate(marker: YMapMarkerPrivate) {\n const geoObject = new window.ymaps.Placemark(marker.coordinate, {});\n\n this.coords.push(marker.coordinate as Coordinate);\n this.drawPlaceMarkStyle(geoObject, marker);\n this.ymap.geoObjects.add(geoObject);\n }\n\n private drawPlaceMarkStyle(geoObject: Ymaps.GeoObject, marker: YMapMarkerPrivate) {\n const {iconColor, preset = DEFAULT_PLACEMARKS_PRESET} = marker.label || {};\n let localIconColor: string | undefined = iconColor;\n\n // You can set the preset option together with the iconColor option only if it not a 'Stretchy' preset\n if (!preset.includes('Stretchy') && !iconColor) {\n localIconColor = DEFAULT_PLACEMARKS_COLOR;\n }\n\n Object.entries({\n ...marker.label,\n iconColor: localIconColor,\n preset,\n }).forEach(([key, value]) => {\n const geoObjectParamType: GeoObjectTypes | undefined =\n geoObjectPropsAndOptions[key as keyof YMapMarkerLabelPrivate];\n\n if (value && geoObjectParamType) {\n geoObject[geoObjectParamType].set(key, value);\n }\n });\n }\n\n private recalcZoomAndCenter(props: PlacemarksProps) {\n const coordsLength = this.coords.length;\n const {zoom = 0} = props;\n\n if (!coordsLength) {\n return;\n }\n\n let leftBottom = [Infinity, Infinity],\n rightTop = [-Infinity, -Infinity];\n\n this.coords.forEach((point) => {\n leftBottom = [Math.min(leftBottom[0], point[0]), Math.min(leftBottom[1], point[1])];\n rightTop = [Math.max(rightTop[0], point[0]), Math.max(rightTop[1], point[1])];\n });\n\n let newMapParams = {\n zoom,\n center: [],\n };\n\n if (zoom) {\n // compute only the center\n newMapParams.center = window.ymaps.util.bounds.getCenter([leftBottom, rightTop]);\n } else {\n newMapParams = window.ymaps.util.bounds.getCenterAndZoom(\n [leftBottom, rightTop],\n [this.mapRef?.clientWidth, this.mapRef?.clientHeight],\n undefined,\n {margin: DEFAULT_MAP_CONTROL_BUTTON_HEIGHT},\n );\n }\n\n this.ymap.setCenter(newMapParams.center);\n\n // Use default zoom for one placemark\n if (coordsLength > 1 && !zoom) {\n this.ymap.setZoom(newMapParams.zoom);\n }\n }\n\n private clearOldPlacemarks() {\n if (this.coords.length === 0) {\n return;\n }\n\n this.ymap.geoObjects.removeAll();\n this.coords = [];\n }\n}\n"]}
|
|
@@ -21,8 +21,12 @@ const DEFAULT_ZOOM = 9;
|
|
|
21
21
|
// We use this init center to create a map
|
|
22
22
|
// The real center of the map will be calculated later, using the coordinates of the markers
|
|
23
23
|
const INITIAL_CENTER = [0, 0];
|
|
24
|
+
const BALLOON_DISABLING_MARKER_OPTIONS = {
|
|
25
|
+
cursor: 'drag',
|
|
26
|
+
interactivityModel: 'default#silent',
|
|
27
|
+
};
|
|
24
28
|
const YandexMap = (props) => {
|
|
25
|
-
const { markers, zoom, id, className } = props;
|
|
29
|
+
const { markers, zoom, id, disableControls = false, disableBalloons = false, className, forceAspectRatio = true, } = props;
|
|
26
30
|
const { apiKey, scriptSrc, nonce } = React.useContext(mapsContext_1.MapsContext);
|
|
27
31
|
const isMobile = React.useContext(mobileContext_1.MobileContext);
|
|
28
32
|
const { lang = 'ru' } = React.useContext(localeContext_1.LocaleContext);
|
|
@@ -44,12 +48,30 @@ const YandexMap = (props) => {
|
|
|
44
48
|
setYmaps(new YMap_1.YMap(new window.ymaps.Map(containerId, {
|
|
45
49
|
center: INITIAL_CENTER,
|
|
46
50
|
zoom: zoom || DEFAULT_ZOOM,
|
|
47
|
-
|
|
51
|
+
controls: disableControls ? [] : undefined,
|
|
52
|
+
}, {
|
|
53
|
+
autoFitToViewport: 'always',
|
|
54
|
+
suppressMapOpenBlock: disableControls,
|
|
55
|
+
yandexMapDisablePoiInteractivity: disableControls,
|
|
56
|
+
}), ref.current));
|
|
48
57
|
});
|
|
49
58
|
setLoading(false);
|
|
50
59
|
})();
|
|
51
|
-
}, [
|
|
60
|
+
}, [
|
|
61
|
+
apiKey,
|
|
62
|
+
lang,
|
|
63
|
+
scriptSrc,
|
|
64
|
+
containerId,
|
|
65
|
+
zoom,
|
|
66
|
+
nonce,
|
|
67
|
+
attemptsIndex,
|
|
68
|
+
setLoading,
|
|
69
|
+
disableControls,
|
|
70
|
+
]);
|
|
52
71
|
React.useEffect(() => {
|
|
72
|
+
if (!forceAspectRatio) {
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
53
75
|
const updateSize = (0, debounce_1.default)(() => {
|
|
54
76
|
if (ref.current) {
|
|
55
77
|
setHeight(Math.round((0, helpers_1.getMapHeight)(ref.current.offsetWidth, isMobile)));
|
|
@@ -57,20 +79,27 @@ const YandexMap = (props) => {
|
|
|
57
79
|
}, 100);
|
|
58
80
|
updateSize();
|
|
59
81
|
window.addEventListener('resize', updateSize, { passive: true });
|
|
82
|
+
// eslint-disable-next-line consistent-return
|
|
60
83
|
return () => {
|
|
61
84
|
window.removeEventListener('resize', updateSize);
|
|
62
85
|
};
|
|
63
|
-
}, [
|
|
86
|
+
}, [isMobile, forceAspectRatio]);
|
|
64
87
|
React.useEffect(() => {
|
|
65
88
|
if (ymap) {
|
|
66
89
|
// show with computed center and placemarks
|
|
67
90
|
const showPlacemarks = async () => {
|
|
68
|
-
|
|
91
|
+
const privateMarkers = disableBalloons
|
|
92
|
+
? markers.map(({ label, ...marker }) => ({
|
|
93
|
+
...marker,
|
|
94
|
+
label: { ...label, ...BALLOON_DISABLING_MARKER_OPTIONS },
|
|
95
|
+
}))
|
|
96
|
+
: markers;
|
|
97
|
+
await ymap.showPlacemarks({ markers: privateMarkers, zoom });
|
|
69
98
|
setReady(true);
|
|
70
99
|
};
|
|
71
100
|
showPlacemarks();
|
|
72
101
|
}
|
|
73
|
-
});
|
|
102
|
+
}, [ymap, markers, zoom, disableBalloons]);
|
|
74
103
|
if (!markers)
|
|
75
104
|
return null;
|
|
76
105
|
return ((0, jsx_runtime_1.jsx)(ErrorWrapper_1.default, { isError: YandexMapApiLoader_1.YMapsApiLoader.status === YandexMapApiLoader_1.MapApiStatus.Error, text: (0, i18n_1.i18n)('map-load-error'), buttonText: (0, i18n_1.i18n)('map-try-again'), handler: onTryAgain, className: b('wrapper'), children: (0, jsx_runtime_1.jsxs)("div", { className: b('wrapper'), children: [(0, jsx_runtime_1.jsx)("div", { id: containerId, className: b({ hidden: !ready }, className), ref: ref, style: { height } }), loading ? (0, jsx_runtime_1.jsx)(uikit_1.Spin, { size: "xl", className: b('spinner') }) : null] }) }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"YandexMap.js","sourceRoot":"../../../../../src","sources":["components/Map/YMap/YandexMap.tsx"],"names":[],"mappings":";;;;AAAA,qDAA+B;AAE/B,6CAAuC;AACvC,0EAAuC;AAEvC,mFAA2E;AAC3E,6EAAqE;AACrE,2EAA6D;AAE7D,mDAAqC;AACrC,8FAA2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EAAC,MAAM,EAAC,GACjB,EACD,OAAO,CAAC,CAAC,CAAC,uBAAC,YAAI,IAAC,IAAI,EAAC,IAAI,EAAC,SAAS,EAAE,CAAC,CAAC,SAAS,CAAC,GAAI,CAAC,CAAC,CAAC,IAAI,IAC3D,GACK,CAClB,CAAC;AACN,CAAC,CAAC;AAEF,kBAAe,SAAS,CAAC","sourcesContent":["import * as React from 'react';\n\nimport {Spin} from '@gravity-ui/uikit';\nimport debounce from 'lodash/debounce';\n\nimport {LocaleContext} from '../../../context/localeContext/localeContext';\nimport {MapsContext} from '../../../context/mapsContext/mapsContext';\nimport {MobileContext} from '../../../context/mobileContext';\nimport {YMapMarkerLabelPrivate, YMapMarkerPrivate, YMapProps} from '../../../models';\nimport {block} from '../../../utils';\nimport ErrorWrapper from '../../ErrorWrapper/ErrorWrapper';\nimport {getMapHeight} from '../helpers';\n\nimport {YMap} from './YMap';\nimport {MapApiStatus, YMapsApiLoader} from './YandexMapApiLoader';\nimport {i18n} from './i18n';\n\nconst b = block('map');\nconst DEFAULT_CONTAINER_ID = 'ymap';\nconst DEFAULT_ZOOM = 9;\n// Center - is a required parameter for creating a new map\n// We use this init center to create a map\n// The real center of the map will be calculated later, using the coordinates of the markers\nconst INITIAL_CENTER = [0, 0];\n\nconst BALLOON_DISABLING_MARKER_OPTIONS: YMapMarkerLabelPrivate = {\n cursor: 'drag',\n interactivityModel: 'default#silent',\n};\n\nconst YandexMap = (props: YMapProps) => {\n const {\n markers,\n zoom,\n id,\n disableControls = false,\n disableBalloons = false,\n className,\n forceAspectRatio = true,\n } = props;\n const {apiKey, scriptSrc, nonce} = React.useContext(MapsContext);\n const isMobile = React.useContext(MobileContext);\n\n const {lang = 'ru'} = React.useContext(LocaleContext);\n const containerId = `${DEFAULT_CONTAINER_ID}-${id}`;\n\n const [ymap, setYmaps] = React.useState<YMap | null>(null);\n const [height, setHeight] = React.useState<number | undefined>(undefined);\n const ref = React.useRef<HTMLDivElement>(null);\n\n const [loading, setLoading] = React.useState<boolean>(false);\n const [ready, setReady] = React.useState<boolean>(false);\n const [attemptsIndex, setAttemptsIndex] = React.useState<number>(0);\n const onTryAgain = React.useCallback(() => {\n setAttemptsIndex(attemptsIndex + 1);\n }, [attemptsIndex]);\n\n React.useEffect(() => {\n (async function () {\n setLoading(true);\n\n await YMapsApiLoader.loadApi(apiKey, scriptSrc, lang, nonce);\n\n window.ymaps?.ready(() => {\n setYmaps(\n new YMap(\n new window.ymaps.Map(\n containerId,\n {\n center: INITIAL_CENTER,\n zoom: zoom || DEFAULT_ZOOM,\n controls: disableControls ? [] : undefined,\n },\n {\n autoFitToViewport: 'always',\n suppressMapOpenBlock: disableControls,\n yandexMapDisablePoiInteractivity: disableControls,\n },\n ),\n ref.current,\n ),\n );\n });\n\n setLoading(false);\n })();\n }, [\n apiKey,\n lang,\n scriptSrc,\n containerId,\n zoom,\n nonce,\n attemptsIndex,\n setLoading,\n disableControls,\n ]);\n\n React.useEffect(() => {\n if (!forceAspectRatio) {\n return;\n }\n\n const updateSize = debounce(() => {\n if (ref.current) {\n setHeight(Math.round(getMapHeight(ref.current.offsetWidth, isMobile)));\n }\n }, 100);\n\n updateSize();\n window.addEventListener('resize', updateSize, {passive: true});\n\n // eslint-disable-next-line consistent-return\n return () => {\n window.removeEventListener('resize', updateSize);\n };\n }, [isMobile, forceAspectRatio]);\n\n React.useEffect(() => {\n if (ymap) {\n // show with computed center and placemarks\n const showPlacemarks = async () => {\n const privateMarkers: YMapMarkerPrivate[] = disableBalloons\n ? markers.map(({label, ...marker}) => ({\n ...marker,\n label: {...label, ...BALLOON_DISABLING_MARKER_OPTIONS},\n }))\n : markers;\n\n await ymap.showPlacemarks({markers: privateMarkers, zoom});\n\n setReady(true);\n };\n\n showPlacemarks();\n }\n }, [ymap, markers, zoom, disableBalloons]);\n\n if (!markers) return null;\n\n return (\n <ErrorWrapper\n isError={YMapsApiLoader.status === MapApiStatus.Error}\n text={i18n('map-load-error')}\n buttonText={i18n('map-try-again')}\n handler={onTryAgain}\n className={b('wrapper')}\n >\n <div className={b('wrapper')}>\n {/* hidden - to show the map after calculating the center */}\n <div\n id={containerId}\n className={b({hidden: !ready}, className)}\n ref={ref}\n style={{height}}\n />\n {loading ? <Spin size=\"xl\" className={b('spinner')} /> : null}\n </div>\n </ErrorWrapper>\n );\n};\n\nexport default YandexMap;\n"]}
|
|
@@ -26,6 +26,7 @@ export { default as ImageBase } from "./ImageBase/ImageBase.js";
|
|
|
26
26
|
export { default as InnerForm } from "./InnerForm/InnerForm.js";
|
|
27
27
|
export { default as Link } from "./Link/Link.js";
|
|
28
28
|
export { default as Links } from "./Links/Links.js";
|
|
29
|
+
export { default as Map } from "./Map/Map.js";
|
|
29
30
|
export { default as Media } from "./Media/Media.js";
|
|
30
31
|
export { default as MetaInfo } from "./MetaInfo/MetaInfo.js";
|
|
31
32
|
export { default as OutsideClick } from "./OutsideClick/OutsideClick.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.YandexForm = exports.YFMWrapper = exports.VideoBlock = exports.UnpublishedLabel = exports.ToggleArrow = exports.Title = exports.ButtonTabs = exports.Table = exports.RouterLink = exports.ReactPlayer = exports.OverflowScroller = exports.OutsideClick = exports.MetaInfo = exports.Media = exports.Links = exports.Link = exports.InnerForm = exports.ImageBase = exports.Image = exports.IconWrapper = exports.HTML = exports.HeaderBreadcrumbs = exports.FullWidthBackground = exports.FullscreenMedia = exports.FullscreenImage = exports.Foldable = exports.FileLink = exports.ErrorWrapper = exports.Control = exports.ContentList = exports.CardBase = exports.BrandFooter = exports.Buttons = exports.Button = exports.BlockBase = exports.BalancedMasonry = exports.BackLink = exports.BackgroundMedia = exports.BackgroundImage = exports.Author = exports.AnimateBlock = exports.Anchor = void 0;
|
|
3
|
+
exports.YandexForm = exports.YFMWrapper = exports.VideoBlock = exports.UnpublishedLabel = exports.ToggleArrow = exports.Title = exports.ButtonTabs = exports.Table = exports.RouterLink = exports.ReactPlayer = exports.OverflowScroller = exports.OutsideClick = exports.MetaInfo = exports.Media = exports.Map = exports.Links = exports.Link = exports.InnerForm = exports.ImageBase = exports.Image = exports.IconWrapper = exports.HTML = exports.HeaderBreadcrumbs = exports.FullWidthBackground = exports.FullscreenMedia = exports.FullscreenImage = exports.Foldable = exports.FileLink = exports.ErrorWrapper = exports.Control = exports.ContentList = exports.CardBase = exports.BrandFooter = exports.Buttons = exports.Button = exports.BlockBase = exports.BalancedMasonry = exports.BackLink = exports.BackgroundMedia = exports.BackgroundImage = exports.Author = exports.AnimateBlock = exports.Anchor = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
var Anchor_1 = require("./Anchor/Anchor.js");
|
|
6
6
|
Object.defineProperty(exports, "Anchor", { enumerable: true, get: function () { return tslib_1.__importDefault(Anchor_1).default; } });
|
|
@@ -58,6 +58,8 @@ var Link_1 = require("./Link/Link.js");
|
|
|
58
58
|
Object.defineProperty(exports, "Link", { enumerable: true, get: function () { return tslib_1.__importDefault(Link_1).default; } });
|
|
59
59
|
var Links_1 = require("./Links/Links.js");
|
|
60
60
|
Object.defineProperty(exports, "Links", { enumerable: true, get: function () { return tslib_1.__importDefault(Links_1).default; } });
|
|
61
|
+
var Map_1 = require("./Map/Map.js");
|
|
62
|
+
Object.defineProperty(exports, "Map", { enumerable: true, get: function () { return tslib_1.__importDefault(Map_1).default; } });
|
|
61
63
|
var Media_1 = require("./Media/Media.js");
|
|
62
64
|
Object.defineProperty(exports, "Media", { enumerable: true, get: function () { return tslib_1.__importDefault(Media_1).default; } });
|
|
63
65
|
var MetaInfo_1 = require("./MetaInfo/MetaInfo.js");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"../../../src","sources":["components/index.ts"],"names":[],"mappings":";;;;AAAA,6CAAkD;AAA1C,yHAAA,OAAO,OAAU;AACzB,+DAAoE;AAA5D,qIAAA,OAAO,OAAgB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,6IAAA,OAAO,OAAoB;AACnC,4DAAiE;AAAzD,mIAAA,OAAO,OAAe;AAC9B,yDAA8D;AAAtD,iIAAA,OAAO,OAAc;AAC7B,0CAA+C;AAAvC,uHAAA,OAAO,OAAS;AACxB,yDAA8D;AAAtD,iIAAA,OAAO,OAAc;AAC7B,0CAA+C;AAAvC,uHAAA,OAAO,OAAS;AACxB,4DAAiE;AAAzD,mIAAA,OAAO,OAAe;AAC9B,2EAAgF;AAAxE,6IAAA,OAAO,OAAoB;AACnC,yDAA8D;AAAtD,iIAAA,OAAO,OAAc;AAC7B,yDAA8D;AAAtD,iIAAA,OAAO,OAAc;AAC7B,yDAA8D;AAAtD,iIAAA,OAAO,OAAc","sourcesContent":["export {default as Anchor} from './Anchor/Anchor';\nexport {default as AnimateBlock} from './AnimateBlock/AnimateBlock';\nexport {default as Author} from './Author/Author';\nexport {default as BackgroundImage} from './BackgroundImage/BackgroundImage';\nexport {default as BackgroundMedia} from './BackgroundMedia/BackgroundMedia';\nexport {default as BackLink} from './BackLink/BackLink';\nexport {default as BalancedMasonry} from './BalancedMasonry/BalancedMasonry';\nexport {default as BlockBase} from './BlockBase/BlockBase';\nexport {default as Button} from './Button/Button';\nexport {default as Buttons} from './Buttons/Buttons';\nexport {default as BrandFooter} from './BrandFooter/BrandFooter';\nexport {default as CardBase} from './CardBase/CardBase';\nexport {default as ContentList} from './ContentList/ContentList';\nexport {default as Control} from './Control/Control';\nexport {default as ErrorWrapper} from './ErrorWrapper/ErrorWrapper';\nexport {default as FileLink} from './FileLink/FileLink';\nexport {default as Foldable} from './Foldable/Foldable';\nexport {default as FullscreenImage} from './FullscreenImage/FullscreenImage';\nexport {default as FullscreenMedia} from './FullscreenMedia/FullscreenMedia';\nexport {default as FullWidthBackground} from './FullWidthBackground/FullWidthBackground';\nexport {default as HeaderBreadcrumbs} from './HeaderBreadcrumbs/HeaderBreadcrumbs';\nexport {default as HTML} from './HTML/HTML';\nexport {default as IconWrapper} from './IconWrapper/IconWrapper';\nexport {default as Image} from './Image/Image';\nexport {default as ImageBase} from './ImageBase/ImageBase';\nexport {default as InnerForm} from './InnerForm/InnerForm';\nexport {default as Link} from './Link/Link';\nexport {default as Links} from './Links/Links';\nexport {default as Media} from './Media/Media';\nexport {default as MetaInfo} from './MetaInfo/MetaInfo';\nexport {default as OutsideClick} from './OutsideClick/OutsideClick';\nexport {default as OverflowScroller} from './OverflowScroller/OverflowScroller';\nexport {default as ReactPlayer} from './ReactPlayer/ReactPlayer';\nexport {default as RouterLink} from './RouterLink/RouterLink';\nexport {default as Table} from './Table/Table';\nexport {default as ButtonTabs} from './ButtonTabs/ButtonTabs';\nexport {default as Title} from './Title/Title';\nexport {default as ToggleArrow} from './ToggleArrow/ToggleArrow';\nexport {default as UnpublishedLabel} from './UnpublishedLabel/UnpublishedLabel';\nexport {default as VideoBlock} from './VideoBlock/VideoBlock';\nexport {default as YFMWrapper} from './YFMWrapper/YFMWrapper';\nexport {default as YandexForm} from './YandexForm/YandexForm';\n\nexport type {RouterLinkProps} from './RouterLink/RouterLink';\nexport type {ImageBaseProps} from './ImageBase/ImageBase';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../../../src","sources":["components/index.ts"],"names":[],"mappings":";;;;AAAA,6CAAkD;AAA1C,yHAAA,OAAO,OAAU;AACzB,+DAAoE;AAA5D,qIAAA,OAAO,OAAgB;AAC/B,6CAAkD;AAA1C,yHAAA,OAAO,OAAU;AACzB,wEAA6E;AAArE,2IAAA,OAAO,OAAmB;AAClC,wEAA6E;AAArE,2IAAA,OAAO,OAAmB;AAClC,mDAAwD;AAAhD,6HAAA,OAAO,OAAY;AAC3B,wEAA6E;AAArE,2IAAA,OAAO,OAAmB;AAClC,sDAA2D;AAAnD,+HAAA,OAAO,OAAa;AAC5B,6CAAkD;AAA1C,yHAAA,OAAO,OAAU;AACzB,gDAAqD;AAA7C,2HAAA,OAAO,OAAW;AAC1B,4DAAiE;AAAzD,mIAAA,OAAO,OAAe;AAC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IAAA,OAAO,OAAc;AAC7B,yDAA8D;AAAtD,iIAAA,OAAO,OAAc;AAC7B,yDAA8D;AAAtD,iIAAA,OAAO,OAAc","sourcesContent":["export {default as Anchor} from './Anchor/Anchor';\nexport {default as AnimateBlock} from './AnimateBlock/AnimateBlock';\nexport {default as Author} from './Author/Author';\nexport {default as BackgroundImage} from './BackgroundImage/BackgroundImage';\nexport {default as BackgroundMedia} from './BackgroundMedia/BackgroundMedia';\nexport {default as BackLink} from './BackLink/BackLink';\nexport {default as BalancedMasonry} from './BalancedMasonry/BalancedMasonry';\nexport {default as BlockBase} from './BlockBase/BlockBase';\nexport {default as Button} from './Button/Button';\nexport {default as Buttons} from './Buttons/Buttons';\nexport {default as BrandFooter} from './BrandFooter/BrandFooter';\nexport {default as CardBase} from './CardBase/CardBase';\nexport {default as ContentList} from './ContentList/ContentList';\nexport {default as Control} from './Control/Control';\nexport {default as ErrorWrapper} from './ErrorWrapper/ErrorWrapper';\nexport {default as FileLink} from './FileLink/FileLink';\nexport {default as Foldable} from './Foldable/Foldable';\nexport {default as FullscreenImage} from './FullscreenImage/FullscreenImage';\nexport {default as FullscreenMedia} from './FullscreenMedia/FullscreenMedia';\nexport {default as FullWidthBackground} from './FullWidthBackground/FullWidthBackground';\nexport {default as HeaderBreadcrumbs} from './HeaderBreadcrumbs/HeaderBreadcrumbs';\nexport {default as HTML} from './HTML/HTML';\nexport {default as IconWrapper} from './IconWrapper/IconWrapper';\nexport {default as Image} from './Image/Image';\nexport {default as ImageBase} from './ImageBase/ImageBase';\nexport {default as InnerForm} from './InnerForm/InnerForm';\nexport {default as Link} from './Link/Link';\nexport {default as Links} from './Links/Links';\nexport {default as Map} from './Map/Map';\nexport {default as Media} from './Media/Media';\nexport {default as MetaInfo} from './MetaInfo/MetaInfo';\nexport {default as OutsideClick} from './OutsideClick/OutsideClick';\nexport {default as OverflowScroller} from './OverflowScroller/OverflowScroller';\nexport {default as ReactPlayer} from './ReactPlayer/ReactPlayer';\nexport {default as RouterLink} from './RouterLink/RouterLink';\nexport {default as Table} from './Table/Table';\nexport {default as ButtonTabs} from './ButtonTabs/ButtonTabs';\nexport {default as Title} from './Title/Title';\nexport {default as ToggleArrow} from './ToggleArrow/ToggleArrow';\nexport {default as UnpublishedLabel} from './UnpublishedLabel/UnpublishedLabel';\nexport {default as VideoBlock} from './VideoBlock/VideoBlock';\nexport {default as YFMWrapper} from './YFMWrapper/YFMWrapper';\nexport {default as YandexForm} from './YandexForm/YandexForm';\n\nexport type {RouterLinkProps} from './RouterLink/RouterLink';\nexport type {ImageBaseProps} from './ImageBase/ImageBase';\n"]}
|
|
@@ -45,10 +45,12 @@ declare namespace Ymaps {
|
|
|
45
45
|
|
|
46
46
|
export class GeoObject {
|
|
47
47
|
properties: {
|
|
48
|
-
|
|
48
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
49
|
+
set: (objectName: string, value: any) => void;
|
|
49
50
|
};
|
|
50
51
|
options: {
|
|
51
|
-
|
|
52
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
53
|
+
set: (objectName: string, value: any) => void;
|
|
52
54
|
};
|
|
53
55
|
}
|
|
54
56
|
|
|
@@ -217,7 +217,7 @@ export interface MediaBlockProps extends MediaBaseBlockProps, WithBorder {
|
|
|
217
217
|
media: ThemeSupporting<MediaProps>;
|
|
218
218
|
}
|
|
219
219
|
export interface MapBlockProps extends MediaBaseBlockProps, WithBorder {
|
|
220
|
-
map: MapProps
|
|
220
|
+
map: Omit<MapProps, 'forceAspectRatio'>;
|
|
221
221
|
}
|
|
222
222
|
export interface InfoBlockProps {
|
|
223
223
|
theme?: TextTheme;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blocks.js","sourceRoot":"../../../../src","sources":["models/constructor-items/blocks.ts"],"names":[],"mappings":";;;AA4CA,IAAY,SAuBX;AAvBD,WAAY,SAAS;IACjB,wDAA2C,CAAA;IAC3C,8DAAiD,CAAA;IACjD,kBAAkB;IAClB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Y,kBAIX;AAJD,WAAY,kBAAkB;IAC1B,kDAA4B,CAAA;IAC5B,kDAA4B,CAAA;IAC5B,uCAAiB,CAAA;AACrB,CAAC,EAJW,kBAAkB,kCAAlB,kBAAkB,QAI7B","sourcesContent":["import * as React from 'react';\n\nimport {ButtonSize} from '@gravity-ui/uikit';\n\nimport {GridColumnSize, GridColumnSizesType, IndentValue} from '../../grid/types';\nimport {ThemeSupporting} from '../../utils';\nimport {AnalyticsEventsBase} from '../common';\n\nimport {\n AnchorProps,\n Animatable,\n BackgroundImageProps,\n ButtonProps,\n CardBorder,\n ContentSize,\n ContentTextSize,\n ContentTheme,\n FileLinkProps,\n GravityIconProps,\n HeaderBreadCrumbsProps,\n HeaderImageSize,\n HeaderOffset,\n HeaderWidth,\n ImageDeviceProps,\n ImageProps,\n Justify,\n LegendTableMarkerType,\n LinkProps,\n MapProps,\n MediaDirection,\n MediaProps,\n MediaView,\n TextSize,\n TextTheme,\n ThemedImage,\n ThemedMediaProps,\n ThemedMediaVideoProps,\n TitleItemBaseProps,\n TitleItemProps,\n WithBorder,\n YandexFormProps,\n} from './common';\nimport {BannerCardProps, HubspotFormProps, SubBlock, SubBlockModels} from './sub-blocks';\n\nexport enum BlockType {\n PromoFeaturesBlock = 'promo-features-block',\n ExtendedFeaturesBlock = 'extended-features-block',\n /** @deprecated */\n SliderOldBlock = 'slider-old-block',\n SliderBlock = 'slider-block',\n QuestionsBlock = 'questions-block',\n FoldableListBlock = 'foldable-list-block',\n BannerBlock = 'banner-block',\n CompaniesBlock = 'companies-block',\n MediaBlock = 'media-block',\n InfoBlock = 'info-block',\n TableBlock = 'table-block',\n TabsBlock = 'tabs-block',\n HeaderSliderBlock = 'header-slider-block',\n HeaderBlock = 'header-block',\n IconsBlock = 'icons-block',\n CardLayoutBlock = 'card-layout-block',\n ContentLayoutBlock = 'content-layout-block',\n ShareBlock = 'share-block',\n MapBlock = 'map-block',\n FilterBlock = 'filter-block',\n FormBlock = 'form-block',\n}\n\nexport const BlockTypes = Object.values(BlockType);\nexport const HeaderBlockTypes = [BlockType.HeaderBlock, BlockType.HeaderSliderBlock];\n\nexport interface Childable {\n children?: SubBlock[];\n}\n\n//block props\nexport interface BlockBaseProps {\n anchor?: AnchorProps;\n visible?: GridColumnSize;\n /** @deprecated */\n resetPaddings?: boolean;\n indent?: {\n top?: IndentValue;\n bottom?: IndentValue;\n };\n qa?: string;\n}\n\nexport interface LoadableProps {\n source: string;\n /**\n * @deprecated Will be moved to params\n */\n serviceId?: number;\n params?: Record<string, string | number | boolean | object>;\n}\n\nexport interface LoadableChildren {\n loadable?: LoadableProps;\n}\n\nexport enum SliderBreakpointNames {\n Sm = 'sm',\n Md = 'md',\n Lg = 'lg',\n Xl = 'xl',\n}\n\nexport enum SliderType {\n MediaCard = 'media-card',\n HeaderCard = 'header-card',\n FullscreenCard = 'fullscreen-card',\n}\n\nexport type SliderBreakpointParams = Record<SliderBreakpointNames, number>;\nexport type SlidesToShow = Partial<SliderBreakpointParams> | number;\n\nexport interface SliderOldProps extends Childable, Animatable, LoadableChildren {\n dots?: boolean;\n arrows?: boolean;\n slidesToShow?: SlidesToShow;\n disclaimer?: {\n text: string;\n size?: TextSize;\n };\n title?: TitleItemBaseProps | string;\n description?: string;\n autoplay?: number;\n //for server transforms\n randomOrder?: boolean;\n adaptive?: boolean;\n}\n\nexport interface SliderProps extends Childable, Animatable, LoadableChildren {\n dots?: boolean;\n arrows?: boolean;\n slidesToShow?: SlidesToShow;\n disclaimer?: {\n text: string;\n size?: TextSize;\n };\n title?: TitleItemBaseProps | string;\n description?: string;\n autoplay?: number;\n //for server transforms\n randomOrder?: boolean;\n adaptive?: boolean;\n}\n\nexport interface HeaderSliderBlockProps extends Omit<SliderOldProps, 'title' | 'description'> {\n items: HeaderBlockProps[];\n}\n\ninterface HeaderBackgroundProps {\n /** @deprecated replaced by Media Props image */\n url?: string;\n /** @deprecated replaced by Media Props image */\n disableCompress?: boolean;\n}\n\nexport interface HeaderBlockBackground extends Partial<HeaderBackgroundProps>, Partial<MediaProps> {\n fullWidth?: boolean;\n fullWidthMedia?: boolean;\n}\n\nexport type ThemedHeaderBlockBackground = ThemeSupporting<HeaderBlockBackground>;\n\nexport interface HeaderBlockVideoIframe {\n src: string;\n autoplay?: boolean;\n previewImg?: string;\n height?: number;\n}\n\nexport interface HeaderBlockProps {\n title: string;\n overtitle?: string | JSX.Element;\n description?: string;\n additionalInfo?: string;\n buttons?: Pick<ButtonProps, 'url' | 'text' | 'theme' | 'primary' | 'size' | 'extraProps'>[];\n width?: HeaderWidth;\n /** @deprecated imageSize now depends on width */\n imageSize?: HeaderImageSize;\n /**\n * @deprecated used only on the main page\n * TODO: delete after the possibility to remove padding-bottom in the block\n */\n offset?: HeaderOffset;\n image?: ThemedImage;\n video?: ThemedMediaVideoProps;\n videoIframe?: HeaderBlockVideoIframe;\n mediaView?: MediaView;\n centered?: boolean;\n background?: ThemedHeaderBlockBackground;\n theme?: 'light' | 'dark';\n verticalOffset?: '0' | 's' | 'm' | 'l' | 'xl';\n breadcrumbs?: HeaderBreadCrumbsProps;\n status?: JSX.Element;\n renderTitle?: (title: string) => React.ReactNode;\n}\n\nexport interface ExtendedFeaturesItem\n extends Omit<ContentBlockProps, 'theme' | 'centered' | 'colSizes' | 'size' | 'title'> {\n title: string;\n label?: string;\n icon?: ThemedImage;\n /** @deprecated **/\n link?: LinkProps;\n}\n\nexport interface ExtendedFeaturesProps extends Animatable {\n items: ExtendedFeaturesItem[];\n title?: TitleItemProps | string;\n description?: string;\n colSizes?: GridColumnSizesType;\n}\n\nexport interface PromoFeaturesItem {\n title: string;\n text: string;\n theme?: 'accent' | 'accent-light' | 'primary';\n media?: ThemeSupporting<MediaProps>;\n}\n\nexport interface PromoFeaturesProps extends Animatable {\n items: PromoFeaturesItem[];\n title?: TitleItemProps | string;\n description?: string;\n theme?: 'grey' | 'default';\n}\n\nexport interface QuestionItem {\n title: string;\n text: string;\n listStyle?: 'dash' | 'disk';\n link?: LinkProps;\n}\n\nexport interface QuestionsProps\n extends Omit<ContentBlockProps, 'colSizes' | 'centered' | 'size' | 'theme'> {\n items: QuestionItem[];\n}\n\nexport interface QuestionBlockItemProps extends QuestionItem {\n isOpened: boolean;\n onClick: () => void;\n}\n\nexport interface FoldableListItem {\n title: string;\n text: string;\n listStyle?: 'dash' | 'disk';\n link?: LinkProps;\n}\n\nexport interface FoldableListProps\n extends Omit<ContentBlockProps, 'colSizes' | 'centered' | 'size' | 'theme'> {\n items: FoldableListItem[];\n}\n\nexport interface FoldableListBlockItemProps extends FoldableListItem {\n isOpened: boolean;\n onClick: () => void;\n}\n\nexport interface BannerBlockProps extends BannerCardProps, Animatable {}\n\nexport interface CompaniesBlockProps extends Animatable {\n title: string;\n description?: string;\n images: ThemeSupporting<ImageDeviceProps>;\n}\n\nexport interface MediaBaseBlockProps extends Animatable, MediaContentProps {\n direction?: MediaDirection;\n mobileDirection?: MediaDirection;\n largeMedia?: boolean;\n mediaOnly?: boolean;\n mediaOnlyColSizes?: GridColumnSizesType;\n}\n\nexport interface MediaContentProps\n extends Omit<ContentBlockProps, 'colSizes' | 'text' | 'theme' | 'centered'> {\n description?: string;\n /** @deprecated Use array of buttons from ContentBlockProps instead**/\n button?: ButtonProps;\n}\n\nexport interface MediaBlockProps extends MediaBaseBlockProps, WithBorder {\n media: ThemeSupporting<MediaProps>;\n}\n\nexport interface MapBlockProps extends MediaBaseBlockProps, WithBorder {\n map: MapProps;\n}\n\nexport interface InfoBlockProps {\n theme?: TextTheme;\n backgroundColor?: ThemeSupporting<string>;\n /** @deprecated **/\n title?: string;\n /** @deprecated **/\n buttons?: Pick<ButtonProps, 'url' | 'text' | 'theme'>[];\n /** @deprecated **/\n sectionsTitle?: string;\n /** @deprecated **/\n links?: Pick<LinkProps, 'text' | 'url'>[];\n leftContent?: Omit<ContentBlockProps, 'colSizes' | 'theme' | 'size'>;\n rightContent?: Omit<ContentBlockProps, 'colSizes' | 'theme' | 'size'>;\n}\n\nexport interface TableProps {\n content: string[][];\n legend?: string[];\n hideLegend?: boolean;\n justify?: Justify[];\n marker?: LegendTableMarkerType;\n /**\n * Only as accessible name, not displayed explicitly\n */\n caption?: string;\n}\n\nexport interface TableBlockProps {\n title: string;\n table: TableProps;\n}\n\nexport interface TabsBlockItem\n extends Omit<ContentBlockProps, 'size' | 'colSizes' | 'centered' | 'theme'>,\n WithBorder {\n tabName: string;\n /**\n * @deprecated Use array links from ContentBlockProps instead\n */\n link?: LinkProps;\n image?: ThemedImage;\n caption?: string;\n media?: ThemedMediaProps;\n}\n\nexport interface TabsBlockProps extends Animatable {\n title?: TitleItemProps | string;\n description?: string;\n tabsColSizes?: GridColumnSizesType;\n centered?: boolean;\n direction?: MediaDirection;\n items: TabsBlockItem[];\n contentSize?: ContentSize;\n}\n\nexport interface CardLayoutBlockProps extends Childable, Animatable, LoadableChildren {\n title?: TitleItemProps | string;\n titleClassName?: string;\n description?: string;\n colSizes?: GridColumnSizesType;\n background?: ThemeSupporting<\n BackgroundImageProps & {\n border?: CardBorder;\n }\n >;\n}\n\nexport type FilterTag = {\n id: string;\n label: string;\n};\n\nexport type FilterItem = {\n tags: string[];\n card: SubBlockModels;\n};\n\nexport interface FilterBlockProps extends Animatable, LoadableChildren {\n title?: TitleItemProps | string;\n description?: string;\n tags: FilterTag[];\n items: FilterItem[];\n tagButtonSize?: ButtonSize;\n allTag?: boolean | string;\n colSizes?: GridColumnSizesType;\n centered?: boolean;\n}\n\nexport interface IconsBlockItemProps extends AnalyticsEventsBase {\n url: string;\n text: string;\n src: ThemeSupporting<string>;\n}\n\nexport interface IconsBlockProps {\n title?: string;\n description?: string;\n size?: 's' | 'm' | 'l';\n items: IconsBlockItemProps[];\n colSizes?: GridColumnSizesType;\n}\n\ninterface ContentLayoutBlockParams {\n size?: ContentSize;\n background?: ThemeSupporting<BackgroundImageProps>;\n centered?: boolean;\n theme?: ContentTheme;\n textWidth?: ContentTextSize;\n}\n\nexport interface ContentLayoutBlockProps extends ContentLayoutBlockParams {\n textContent: ContentBlockProps;\n fileContent?: FileLinkProps[];\n}\n\nexport type SVGIcon = (props: React.SVGProps<SVGSVGElement>) => React.ReactNode;\n\nexport interface ContentItemProps {\n title?: string;\n text?: string;\n icon?: ThemeSupporting<ImageProps | SVGIcon>;\n gravityIcon?: ThemeSupporting<GravityIconProps>;\n}\n\nexport interface ContentListProps {\n list: ContentItemProps[];\n size: ContentSize;\n theme?: ContentTheme;\n}\n\nexport interface ContentBlockProps {\n title?: TitleItemBaseProps | string;\n titleId?: string;\n text?: string;\n textId?: string;\n additionalInfo?: string;\n links?: LinkProps[];\n buttons?: ButtonProps[];\n size?: ContentSize;\n colSizes?: GridColumnSizesType;\n centered?: boolean;\n theme?: ContentTheme;\n list?: ContentItemProps[];\n controlPosition?: 'default' | 'bottom';\n}\n\nexport enum PCShareSocialNetwork {\n Vk = 'vk',\n Telegram = 'telegram',\n Twitter = 'twitter',\n Facebook = 'facebook',\n LinkedIn = 'linkedin',\n}\n\nexport interface ShareBlockProps {\n items: PCShareSocialNetwork[];\n title?: string;\n}\n\nexport enum FormBlockDataTypes {\n YANDEX = 'yandex',\n HUBSPOT = 'hubspot',\n}\n\nexport enum FormBlockDirection {\n FormContent = 'form-content',\n ContentForm = 'content-form',\n Center = 'center',\n}\n\nexport interface FormBlockYandexData {\n yandex: ThemeSupporting<YandexFormProps>;\n}\n\nexport interface FormBlockHubspotData {\n hubspot: ThemeSupporting<HubspotFormProps>;\n}\n\nexport type FormBlockData = FormBlockYandexData | FormBlockHubspotData;\n\nexport interface FormBlockProps {\n formData: FormBlockData;\n title?: string;\n textContent?: Omit<ContentBlockProps, 'centered' | 'colSizes' | 'size'>;\n direction?: FormBlockDirection;\n background?: ThemeSupporting<BackgroundImageProps>;\n}\n\n//block models\nexport type HeaderBlockModel = {\n type: BlockType.HeaderBlock;\n} & HeaderBlockProps;\n\nexport type SliderOldBlockModel = {\n type: BlockType.SliderOldBlock;\n} & SliderOldProps;\n\nexport type ExtendedFeaturesBlockModel = {\n type: BlockType.ExtendedFeaturesBlock;\n} & ExtendedFeaturesProps;\n\nexport type PromoFeaturesBlockModel = {\n type: BlockType.PromoFeaturesBlock;\n} & PromoFeaturesProps;\n\nexport type QuestionsBlockModel = {\n type: BlockType.QuestionsBlock;\n} & QuestionsProps;\n\nexport type FoldableListBlockModel = {\n type: BlockType.FoldableListBlock;\n} & FoldableListProps;\n\nexport type BannerBlockModel = {\n type: BlockType.BannerBlock;\n} & BannerBlockProps;\n\nexport type CompaniesBlockModel = {\n type: BlockType.CompaniesBlock;\n} & CompaniesBlockProps;\n\nexport type MediaBlockModel = {\n type: BlockType.MediaBlock;\n} & MediaBlockProps;\n\nexport type MapBlockModel = {\n type: BlockType.MapBlock;\n} & MapBlockProps;\n\nexport type InfoBlockModel = {\n type: BlockType.InfoBlock;\n} & InfoBlockProps;\n\nexport type TableBlockModel = {\n type: BlockType.TableBlock;\n} & TableBlockProps;\n\nexport type TabsBlockModel = {\n type: BlockType.TabsBlock;\n} & TabsBlockProps;\n\nexport type CardLayoutBlockModel = {\n type: BlockType.CardLayoutBlock;\n} & CardLayoutBlockProps;\n\nexport type FilterBlockModel = {\n type: BlockType.FilterBlock;\n} & FilterBlockProps;\n\nexport type IconsBlockModel = {\n type: BlockType.IconsBlock;\n} & IconsBlockProps;\n\nexport type HeaderSliderBlockModel = {\n type: BlockType.HeaderSliderBlock;\n} & HeaderSliderBlockProps;\n\nexport type ContentLayoutBlockModel = {\n type: BlockType.ContentLayoutBlock;\n} & ContentLayoutBlockProps;\n\nexport type ShareBLockModel = {\n type: BlockType.ShareBlock;\n} & ShareBlockProps;\n\nexport type FormBlockModel = {\n type: BlockType.FormBlock;\n} & FormBlockProps;\n\nexport type SliderBlockModel = {\n type: BlockType.SliderBlock;\n} & SliderProps;\n\ntype BlockModels =\n | SliderOldBlockModel\n | SliderBlockModel\n | ExtendedFeaturesBlockModel\n | PromoFeaturesBlockModel\n | QuestionsBlockModel\n | FoldableListBlockModel\n | BannerBlockModel\n | CompaniesBlockModel\n | MediaBlockModel\n | MapBlockModel\n | InfoBlockModel\n | TableBlockModel\n | TabsBlockModel\n | HeaderBlockModel\n | IconsBlockModel\n | HeaderSliderBlockModel\n | CardLayoutBlockModel\n | ContentLayoutBlockModel\n | ShareBLockModel\n | FilterBlockModel\n | FormBlockModel;\n\nexport type Block = BlockModels & BlockBaseProps;\n"]}
|
|
1
|
+
{"version":3,"file":"blocks.js","sourceRoot":"../../../../src","sources":["models/constructor-items/blocks.ts"],"names":[],"mappings":";;;AA4CA,IAAY,SAuBX;AAvBD,WAAY,SAAS;IACjB,wDAA2C,CAAA;IAC3C,8DAAiD,CAAA;IACjD,kBAAkB;IAClB,gDAAmC,CAAA;IACnC,yCAA4B,CAAA;IAC5B,+CAAkC,CAAA;IAClC,sDAAyC,CAAA;IACzC,yCAA4B,CAAA;IAC5B,+CAAkC,CAAA;IAClC,uCAA0B,CAAA;IAC1B,qCAAwB,CAAA;IACxB,uCAA0B,CAAA;IAC1B,qCAAwB,CAAA;IACxB,sDAAyC,CAAA;IACzC,yCAA4B,CAAA;IAC5B,uCAA0B,CAAA;IAC1B,kDAAqC,CAAA;IACrC,wDAA2C,CAAA;IAC3C,uCAA0B,CAAA;IAC1B,mCAAsB,CAAA;IACtB,yCAA4B,CAAA;IAC5B,qCAAwB,CAAA;AAC5B,CAAC,EAvBW,SAAS,yBAAT,SAAS,QAuBpB;AAEY,QAAA,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;AACtC,QAAA,gBAAgB,GAAG,CAAC,SAAS,CAAC,WAAW,EAAE,SAAS,CAAC,iBAAiB,CAAC,CAAC;AAgCrF,IAAY,qBAKX;AALD,WAAY,qBAAqB;IAC7B,kCAAS,CAAA;IACT,kCAAS,CAAA;IACT,kCAAS,CAAA;IACT,kCAAS,CAAA;AACb,CAAC,EALW,qBAAqB,qCAArB,qBAAqB,QAKhC;AAED,IAAY,UAIX;AAJD,WAAY,UAAU;IAClB,sCAAwB,CAAA;IACxB,wCAA0B,CAAA;IAC1B,gDAAkC,CAAA;AACtC,CAAC,EAJW,UAAU,0BAAV,UAAU,QAIrB;AA0UD,IAAY,oBAMX;AAND,WAAY,oBAAoB;IAC5B,iCAAS,CAAA;IACT,6CAAqB,CAAA;IACrB,2CAAmB,CAAA;IACnB,6CAAqB,CAAA;IACrB,6CAAqB,CAAA;AACzB,CAAC,EANW,oBAAoB,oCAApB,oBAAoB,QAM/B;AAOD,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC1B,uCAAiB,CAAA;IACjB,yCAAmB,CAAA;AACvB,CAAC,EAHW,kBAAkB,kCAAlB,kBAAkB,QAG7B;AAED,IAAY,kBAIX;AAJD,WAAY,kBAAkB;IAC1B,kDAA4B,CAAA;IAC5B,kDAA4B,CAAA;IAC5B,uCAAiB,CAAA;AACrB,CAAC,EAJW,kBAAkB,kCAAlB,kBAAkB,QAI7B","sourcesContent":["import * as React from 'react';\n\nimport {ButtonSize} from '@gravity-ui/uikit';\n\nimport {GridColumnSize, GridColumnSizesType, IndentValue} from '../../grid/types';\nimport {ThemeSupporting} from '../../utils';\nimport {AnalyticsEventsBase} from '../common';\n\nimport {\n AnchorProps,\n Animatable,\n BackgroundImageProps,\n ButtonProps,\n CardBorder,\n ContentSize,\n ContentTextSize,\n ContentTheme,\n FileLinkProps,\n GravityIconProps,\n HeaderBreadCrumbsProps,\n HeaderImageSize,\n HeaderOffset,\n HeaderWidth,\n ImageDeviceProps,\n ImageProps,\n Justify,\n LegendTableMarkerType,\n LinkProps,\n MapProps,\n MediaDirection,\n MediaProps,\n MediaView,\n TextSize,\n TextTheme,\n ThemedImage,\n ThemedMediaProps,\n ThemedMediaVideoProps,\n TitleItemBaseProps,\n TitleItemProps,\n WithBorder,\n YandexFormProps,\n} from './common';\nimport {BannerCardProps, HubspotFormProps, SubBlock, SubBlockModels} from './sub-blocks';\n\nexport enum BlockType {\n PromoFeaturesBlock = 'promo-features-block',\n ExtendedFeaturesBlock = 'extended-features-block',\n /** @deprecated */\n SliderOldBlock = 'slider-old-block',\n SliderBlock = 'slider-block',\n QuestionsBlock = 'questions-block',\n FoldableListBlock = 'foldable-list-block',\n BannerBlock = 'banner-block',\n CompaniesBlock = 'companies-block',\n MediaBlock = 'media-block',\n InfoBlock = 'info-block',\n TableBlock = 'table-block',\n TabsBlock = 'tabs-block',\n HeaderSliderBlock = 'header-slider-block',\n HeaderBlock = 'header-block',\n IconsBlock = 'icons-block',\n CardLayoutBlock = 'card-layout-block',\n ContentLayoutBlock = 'content-layout-block',\n ShareBlock = 'share-block',\n MapBlock = 'map-block',\n FilterBlock = 'filter-block',\n FormBlock = 'form-block',\n}\n\nexport const BlockTypes = Object.values(BlockType);\nexport const HeaderBlockTypes = [BlockType.HeaderBlock, BlockType.HeaderSliderBlock];\n\nexport interface Childable {\n children?: SubBlock[];\n}\n\n//block props\nexport interface BlockBaseProps {\n anchor?: AnchorProps;\n visible?: GridColumnSize;\n /** @deprecated */\n resetPaddings?: boolean;\n indent?: {\n top?: IndentValue;\n bottom?: IndentValue;\n };\n qa?: string;\n}\n\nexport interface LoadableProps {\n source: string;\n /**\n * @deprecated Will be moved to params\n */\n serviceId?: number;\n params?: Record<string, string | number | boolean | object>;\n}\n\nexport interface LoadableChildren {\n loadable?: LoadableProps;\n}\n\nexport enum SliderBreakpointNames {\n Sm = 'sm',\n Md = 'md',\n Lg = 'lg',\n Xl = 'xl',\n}\n\nexport enum SliderType {\n MediaCard = 'media-card',\n HeaderCard = 'header-card',\n FullscreenCard = 'fullscreen-card',\n}\n\nexport type SliderBreakpointParams = Record<SliderBreakpointNames, number>;\nexport type SlidesToShow = Partial<SliderBreakpointParams> | number;\n\nexport interface SliderOldProps extends Childable, Animatable, LoadableChildren {\n dots?: boolean;\n arrows?: boolean;\n slidesToShow?: SlidesToShow;\n disclaimer?: {\n text: string;\n size?: TextSize;\n };\n title?: TitleItemBaseProps | string;\n description?: string;\n autoplay?: number;\n //for server transforms\n randomOrder?: boolean;\n adaptive?: boolean;\n}\n\nexport interface SliderProps extends Childable, Animatable, LoadableChildren {\n dots?: boolean;\n arrows?: boolean;\n slidesToShow?: SlidesToShow;\n disclaimer?: {\n text: string;\n size?: TextSize;\n };\n title?: TitleItemBaseProps | string;\n description?: string;\n autoplay?: number;\n //for server transforms\n randomOrder?: boolean;\n adaptive?: boolean;\n}\n\nexport interface HeaderSliderBlockProps extends Omit<SliderOldProps, 'title' | 'description'> {\n items: HeaderBlockProps[];\n}\n\ninterface HeaderBackgroundProps {\n /** @deprecated replaced by Media Props image */\n url?: string;\n /** @deprecated replaced by Media Props image */\n disableCompress?: boolean;\n}\n\nexport interface HeaderBlockBackground extends Partial<HeaderBackgroundProps>, Partial<MediaProps> {\n fullWidth?: boolean;\n fullWidthMedia?: boolean;\n}\n\nexport type ThemedHeaderBlockBackground = ThemeSupporting<HeaderBlockBackground>;\n\nexport interface HeaderBlockVideoIframe {\n src: string;\n autoplay?: boolean;\n previewImg?: string;\n height?: number;\n}\n\nexport interface HeaderBlockProps {\n title: string;\n overtitle?: string | JSX.Element;\n description?: string;\n additionalInfo?: string;\n buttons?: Pick<ButtonProps, 'url' | 'text' | 'theme' | 'primary' | 'size' | 'extraProps'>[];\n width?: HeaderWidth;\n /** @deprecated imageSize now depends on width */\n imageSize?: HeaderImageSize;\n /**\n * @deprecated used only on the main page\n * TODO: delete after the possibility to remove padding-bottom in the block\n */\n offset?: HeaderOffset;\n image?: ThemedImage;\n video?: ThemedMediaVideoProps;\n videoIframe?: HeaderBlockVideoIframe;\n mediaView?: MediaView;\n centered?: boolean;\n background?: ThemedHeaderBlockBackground;\n theme?: 'light' | 'dark';\n verticalOffset?: '0' | 's' | 'm' | 'l' | 'xl';\n breadcrumbs?: HeaderBreadCrumbsProps;\n status?: JSX.Element;\n renderTitle?: (title: string) => React.ReactNode;\n}\n\nexport interface ExtendedFeaturesItem\n extends Omit<ContentBlockProps, 'theme' | 'centered' | 'colSizes' | 'size' | 'title'> {\n title: string;\n label?: string;\n icon?: ThemedImage;\n /** @deprecated **/\n link?: LinkProps;\n}\n\nexport interface ExtendedFeaturesProps extends Animatable {\n items: ExtendedFeaturesItem[];\n title?: TitleItemProps | string;\n description?: string;\n colSizes?: GridColumnSizesType;\n}\n\nexport interface PromoFeaturesItem {\n title: string;\n text: string;\n theme?: 'accent' | 'accent-light' | 'primary';\n media?: ThemeSupporting<MediaProps>;\n}\n\nexport interface PromoFeaturesProps extends Animatable {\n items: PromoFeaturesItem[];\n title?: TitleItemProps | string;\n description?: string;\n theme?: 'grey' | 'default';\n}\n\nexport interface QuestionItem {\n title: string;\n text: string;\n listStyle?: 'dash' | 'disk';\n link?: LinkProps;\n}\n\nexport interface QuestionsProps\n extends Omit<ContentBlockProps, 'colSizes' | 'centered' | 'size' | 'theme'> {\n items: QuestionItem[];\n}\n\nexport interface QuestionBlockItemProps extends QuestionItem {\n isOpened: boolean;\n onClick: () => void;\n}\n\nexport interface FoldableListItem {\n title: string;\n text: string;\n listStyle?: 'dash' | 'disk';\n link?: LinkProps;\n}\n\nexport interface FoldableListProps\n extends Omit<ContentBlockProps, 'colSizes' | 'centered' | 'size' | 'theme'> {\n items: FoldableListItem[];\n}\n\nexport interface FoldableListBlockItemProps extends FoldableListItem {\n isOpened: boolean;\n onClick: () => void;\n}\n\nexport interface BannerBlockProps extends BannerCardProps, Animatable {}\n\nexport interface CompaniesBlockProps extends Animatable {\n title: string;\n description?: string;\n images: ThemeSupporting<ImageDeviceProps>;\n}\n\nexport interface MediaBaseBlockProps extends Animatable, MediaContentProps {\n direction?: MediaDirection;\n mobileDirection?: MediaDirection;\n largeMedia?: boolean;\n mediaOnly?: boolean;\n mediaOnlyColSizes?: GridColumnSizesType;\n}\n\nexport interface MediaContentProps\n extends Omit<ContentBlockProps, 'colSizes' | 'text' | 'theme' | 'centered'> {\n description?: string;\n /** @deprecated Use array of buttons from ContentBlockProps instead**/\n button?: ButtonProps;\n}\n\nexport interface MediaBlockProps extends MediaBaseBlockProps, WithBorder {\n media: ThemeSupporting<MediaProps>;\n}\n\nexport interface MapBlockProps extends MediaBaseBlockProps, WithBorder {\n map: Omit<MapProps, 'forceAspectRatio'>;\n}\n\nexport interface InfoBlockProps {\n theme?: TextTheme;\n backgroundColor?: ThemeSupporting<string>;\n /** @deprecated **/\n title?: string;\n /** @deprecated **/\n buttons?: Pick<ButtonProps, 'url' | 'text' | 'theme'>[];\n /** @deprecated **/\n sectionsTitle?: string;\n /** @deprecated **/\n links?: Pick<LinkProps, 'text' | 'url'>[];\n leftContent?: Omit<ContentBlockProps, 'colSizes' | 'theme' | 'size'>;\n rightContent?: Omit<ContentBlockProps, 'colSizes' | 'theme' | 'size'>;\n}\n\nexport interface TableProps {\n content: string[][];\n legend?: string[];\n hideLegend?: boolean;\n justify?: Justify[];\n marker?: LegendTableMarkerType;\n /**\n * Only as accessible name, not displayed explicitly\n */\n caption?: string;\n}\n\nexport interface TableBlockProps {\n title: string;\n table: TableProps;\n}\n\nexport interface TabsBlockItem\n extends Omit<ContentBlockProps, 'size' | 'colSizes' | 'centered' | 'theme'>,\n WithBorder {\n tabName: string;\n /**\n * @deprecated Use array links from ContentBlockProps instead\n */\n link?: LinkProps;\n image?: ThemedImage;\n caption?: string;\n media?: ThemedMediaProps;\n}\n\nexport interface TabsBlockProps extends Animatable {\n title?: TitleItemProps | string;\n description?: string;\n tabsColSizes?: GridColumnSizesType;\n centered?: boolean;\n direction?: MediaDirection;\n items: TabsBlockItem[];\n contentSize?: ContentSize;\n}\n\nexport interface CardLayoutBlockProps extends Childable, Animatable, LoadableChildren {\n title?: TitleItemProps | string;\n titleClassName?: string;\n description?: string;\n colSizes?: GridColumnSizesType;\n background?: ThemeSupporting<\n BackgroundImageProps & {\n border?: CardBorder;\n }\n >;\n}\n\nexport type FilterTag = {\n id: string;\n label: string;\n};\n\nexport type FilterItem = {\n tags: string[];\n card: SubBlockModels;\n};\n\nexport interface FilterBlockProps extends Animatable, LoadableChildren {\n title?: TitleItemProps | string;\n description?: string;\n tags: FilterTag[];\n items: FilterItem[];\n tagButtonSize?: ButtonSize;\n allTag?: boolean | string;\n colSizes?: GridColumnSizesType;\n centered?: boolean;\n}\n\nexport interface IconsBlockItemProps extends AnalyticsEventsBase {\n url: string;\n text: string;\n src: ThemeSupporting<string>;\n}\n\nexport interface IconsBlockProps {\n title?: string;\n description?: string;\n size?: 's' | 'm' | 'l';\n items: IconsBlockItemProps[];\n colSizes?: GridColumnSizesType;\n}\n\ninterface ContentLayoutBlockParams {\n size?: ContentSize;\n background?: ThemeSupporting<BackgroundImageProps>;\n centered?: boolean;\n theme?: ContentTheme;\n textWidth?: ContentTextSize;\n}\n\nexport interface ContentLayoutBlockProps extends ContentLayoutBlockParams {\n textContent: ContentBlockProps;\n fileContent?: FileLinkProps[];\n}\n\nexport type SVGIcon = (props: React.SVGProps<SVGSVGElement>) => React.ReactNode;\n\nexport interface ContentItemProps {\n title?: string;\n text?: string;\n icon?: ThemeSupporting<ImageProps | SVGIcon>;\n gravityIcon?: ThemeSupporting<GravityIconProps>;\n}\n\nexport interface ContentListProps {\n list: ContentItemProps[];\n size: ContentSize;\n theme?: ContentTheme;\n}\n\nexport interface ContentBlockProps {\n title?: TitleItemBaseProps | string;\n titleId?: string;\n text?: string;\n textId?: string;\n additionalInfo?: string;\n links?: LinkProps[];\n buttons?: ButtonProps[];\n size?: ContentSize;\n colSizes?: GridColumnSizesType;\n centered?: boolean;\n theme?: ContentTheme;\n list?: ContentItemProps[];\n controlPosition?: 'default' | 'bottom';\n}\n\nexport enum PCShareSocialNetwork {\n Vk = 'vk',\n Telegram = 'telegram',\n Twitter = 'twitter',\n Facebook = 'facebook',\n LinkedIn = 'linkedin',\n}\n\nexport interface ShareBlockProps {\n items: PCShareSocialNetwork[];\n title?: string;\n}\n\nexport enum FormBlockDataTypes {\n YANDEX = 'yandex',\n HUBSPOT = 'hubspot',\n}\n\nexport enum FormBlockDirection {\n FormContent = 'form-content',\n ContentForm = 'content-form',\n Center = 'center',\n}\n\nexport interface FormBlockYandexData {\n yandex: ThemeSupporting<YandexFormProps>;\n}\n\nexport interface FormBlockHubspotData {\n hubspot: ThemeSupporting<HubspotFormProps>;\n}\n\nexport type FormBlockData = FormBlockYandexData | FormBlockHubspotData;\n\nexport interface FormBlockProps {\n formData: FormBlockData;\n title?: string;\n textContent?: Omit<ContentBlockProps, 'centered' | 'colSizes' | 'size'>;\n direction?: FormBlockDirection;\n background?: ThemeSupporting<BackgroundImageProps>;\n}\n\n//block models\nexport type HeaderBlockModel = {\n type: BlockType.HeaderBlock;\n} & HeaderBlockProps;\n\nexport type SliderOldBlockModel = {\n type: BlockType.SliderOldBlock;\n} & SliderOldProps;\n\nexport type ExtendedFeaturesBlockModel = {\n type: BlockType.ExtendedFeaturesBlock;\n} & ExtendedFeaturesProps;\n\nexport type PromoFeaturesBlockModel = {\n type: BlockType.PromoFeaturesBlock;\n} & PromoFeaturesProps;\n\nexport type QuestionsBlockModel = {\n type: BlockType.QuestionsBlock;\n} & QuestionsProps;\n\nexport type FoldableListBlockModel = {\n type: BlockType.FoldableListBlock;\n} & FoldableListProps;\n\nexport type BannerBlockModel = {\n type: BlockType.BannerBlock;\n} & BannerBlockProps;\n\nexport type CompaniesBlockModel = {\n type: BlockType.CompaniesBlock;\n} & CompaniesBlockProps;\n\nexport type MediaBlockModel = {\n type: BlockType.MediaBlock;\n} & MediaBlockProps;\n\nexport type MapBlockModel = {\n type: BlockType.MapBlock;\n} & MapBlockProps;\n\nexport type InfoBlockModel = {\n type: BlockType.InfoBlock;\n} & InfoBlockProps;\n\nexport type TableBlockModel = {\n type: BlockType.TableBlock;\n} & TableBlockProps;\n\nexport type TabsBlockModel = {\n type: BlockType.TabsBlock;\n} & TabsBlockProps;\n\nexport type CardLayoutBlockModel = {\n type: BlockType.CardLayoutBlock;\n} & CardLayoutBlockProps;\n\nexport type FilterBlockModel = {\n type: BlockType.FilterBlock;\n} & FilterBlockProps;\n\nexport type IconsBlockModel = {\n type: BlockType.IconsBlock;\n} & IconsBlockProps;\n\nexport type HeaderSliderBlockModel = {\n type: BlockType.HeaderSliderBlock;\n} & HeaderSliderBlockProps;\n\nexport type ContentLayoutBlockModel = {\n type: BlockType.ContentLayoutBlock;\n} & ContentLayoutBlockProps;\n\nexport type ShareBLockModel = {\n type: BlockType.ShareBlock;\n} & ShareBlockProps;\n\nexport type FormBlockModel = {\n type: BlockType.FormBlock;\n} & FormBlockProps;\n\nexport type SliderBlockModel = {\n type: BlockType.SliderBlock;\n} & SliderProps;\n\ntype BlockModels =\n | SliderOldBlockModel\n | SliderBlockModel\n | ExtendedFeaturesBlockModel\n | PromoFeaturesBlockModel\n | QuestionsBlockModel\n | FoldableListBlockModel\n | BannerBlockModel\n | CompaniesBlockModel\n | MediaBlockModel\n | MapBlockModel\n | InfoBlockModel\n | TableBlockModel\n | TabsBlockModel\n | HeaderBlockModel\n | IconsBlockModel\n | HeaderSliderBlockModel\n | CardLayoutBlockModel\n | ContentLayoutBlockModel\n | ShareBLockModel\n | FilterBlockModel\n | FormBlockModel;\n\nexport type Block = BlockModels & BlockBaseProps;\n"]}
|
|
@@ -249,12 +249,15 @@ export type Coordinate = number[];
|
|
|
249
249
|
export interface MapBaseProps {
|
|
250
250
|
zoom?: number;
|
|
251
251
|
className?: string;
|
|
252
|
+
forceAspectRatio?: boolean;
|
|
252
253
|
}
|
|
253
254
|
export interface GMapProps extends MapBaseProps {
|
|
254
255
|
address: string;
|
|
255
256
|
}
|
|
256
257
|
export interface YMapProps extends MapBaseProps {
|
|
257
258
|
markers: YMapMarker[];
|
|
259
|
+
disableControls?: boolean;
|
|
260
|
+
disableBalloons?: boolean;
|
|
258
261
|
id: string;
|
|
259
262
|
}
|
|
260
263
|
export interface YMapMarker {
|
|
@@ -266,8 +269,21 @@ export interface YMapMarkerLabel {
|
|
|
266
269
|
iconCaption?: string;
|
|
267
270
|
iconContent?: string;
|
|
268
271
|
iconColor?: string;
|
|
272
|
+
iconImageHref?: string;
|
|
273
|
+
iconImageSize?: [number, number];
|
|
274
|
+
iconImageOffset?: [number, number];
|
|
275
|
+
iconImageClipRect?: [[number, number], [number, number]];
|
|
276
|
+
iconLayout?: 'default#image';
|
|
277
|
+
iconShape?: Record<string, any>;
|
|
269
278
|
preset?: string;
|
|
270
279
|
}
|
|
280
|
+
export interface YMapMarkerPrivate extends YMapMarker {
|
|
281
|
+
label?: YMapMarkerLabelPrivate;
|
|
282
|
+
}
|
|
283
|
+
export interface YMapMarkerLabelPrivate extends YMapMarkerLabel {
|
|
284
|
+
cursor?: string;
|
|
285
|
+
interactivityModel?: string;
|
|
286
|
+
}
|
|
271
287
|
export type MapProps = GMapProps | YMapProps;
|
|
272
288
|
export type ThemedMediaProps = ThemeSupporting<MediaProps>;
|
|
273
289
|
export interface DataLensObjectProps {
|