@gravity-ui/page-constructor 1.18.1 → 1.19.1
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/CHANGELOG.md +14 -0
- package/README.md +8 -0
- package/build/cjs/blocks/Map/Map.d.ts +3 -0
- package/build/cjs/blocks/Map/Map.js +15 -0
- package/build/cjs/blocks/Map/schema.d.ts +384 -0
- package/build/cjs/blocks/Map/schema.js +18 -0
- package/build/cjs/blocks/Media/Media.js +5 -27
- package/build/cjs/blocks/Media/schema.d.ts +265 -9
- package/build/cjs/blocks/Media/schema.js +18 -17
- package/build/cjs/blocks/index.d.ts +1 -0
- package/build/cjs/blocks/index.js +3 -1
- package/build/cjs/components/Map/GoogleMap.d.ts +4 -0
- package/build/cjs/components/Map/GoogleMap.js +42 -0
- package/build/cjs/components/Map/Map.css +20 -0
- package/build/cjs/components/Map/Map.d.ts +3 -0
- package/build/cjs/components/Map/Map.js +21 -0
- package/build/cjs/components/Map/YMap/YMap.d.ts +13 -0
- package/build/cjs/components/Map/YMap/YMap.js +97 -0
- package/build/cjs/components/Map/YMap/YandexMap.d.ts +4 -0
- package/build/cjs/components/Map/YMap/YandexMap.js +72 -0
- package/build/cjs/components/Map/YMap/YandexMapApiLoader.d.ts +11 -0
- package/build/cjs/components/Map/YMap/YandexMapApiLoader.js +37 -0
- package/build/cjs/components/Map/YMap/i18n/en.json +4 -0
- package/build/cjs/components/Map/YMap/i18n/index.d.ts +2 -0
- package/build/cjs/components/Map/YMap/i18n/index.js +8 -0
- package/build/cjs/components/Map/YMap/i18n/ru.json +4 -0
- package/build/cjs/components/Map/helpers.d.ts +1 -0
- package/build/cjs/components/Map/helpers.js +7 -0
- package/build/cjs/{blocks/Media/Media.css → components/MediaBase/MediaBase.css} +15 -14
- package/build/cjs/components/MediaBase/MediaBase.d.ts +13 -0
- package/build/cjs/components/MediaBase/MediaBase.js +39 -0
- package/build/{esm/blocks/Media/MediaContent.css → cjs/components/MediaBase/MediaBaseContent.css} +2 -2
- package/build/cjs/{blocks/Media/MediaContent.js → components/MediaBase/MediaBaseContent.js} +1 -1
- package/build/cjs/constructor-items.d.ts +1 -0
- package/build/cjs/constructor-items.js +1 -0
- package/build/cjs/containers/PageConstructor/Provider.d.ts +2 -0
- package/build/cjs/containers/PageConstructor/Provider.js +3 -1
- package/build/cjs/context/mapsContext/mapsContext.d.ts +22 -0
- package/build/cjs/context/mapsContext/mapsContext.js +20 -0
- package/build/cjs/context/mapsContext/mapsProvider.d.ts +10 -0
- package/build/cjs/context/mapsContext/mapsProvider.js +15 -0
- package/build/cjs/context/mapsContext/useMap.d.ts +2 -0
- package/build/cjs/context/mapsContext/useMap.js +11 -0
- package/build/cjs/internal-typings/global.d.ts +36 -0
- package/build/cjs/models/constructor-items/blocks.d.ts +18 -9
- package/build/cjs/models/constructor-items/blocks.js +1 -0
- package/build/cjs/models/constructor-items/common.d.ts +25 -0
- package/build/cjs/schema/index.js +1 -1
- package/build/cjs/schema/validators/blocks.d.ts +1 -0
- package/build/cjs/schema/validators/blocks.js +1 -0
- package/build/cjs/schema/validators/common.d.ts +108 -0
- package/build/cjs/schema/validators/common.js +53 -1
- package/build/cjs/utils/blocks.d.ts +1 -1
- package/build/cjs/utils/common.d.ts +6 -0
- package/build/cjs/utils/common.js +24 -0
- package/build/cjs/utils/index.d.ts +1 -0
- package/build/cjs/utils/index.js +1 -0
- package/build/esm/blocks/Map/Map.d.ts +3 -0
- package/build/esm/blocks/Map/Map.js +11 -0
- package/build/esm/blocks/Map/schema.d.ts +384 -0
- package/build/esm/blocks/Map/schema.js +15 -0
- package/build/esm/blocks/Media/Media.d.ts +0 -1
- package/build/esm/blocks/Media/Media.js +7 -31
- package/build/esm/blocks/Media/schema.d.ts +265 -9
- package/build/esm/blocks/Media/schema.js +17 -16
- package/build/esm/blocks/index.d.ts +1 -0
- package/build/esm/blocks/index.js +1 -0
- package/build/esm/components/Map/GoogleMap.d.ts +4 -0
- package/build/esm/components/Map/GoogleMap.js +39 -0
- package/build/esm/components/Map/Map.css +20 -0
- package/build/esm/components/Map/Map.d.ts +4 -0
- package/build/esm/components/Map/Map.js +17 -0
- package/build/esm/components/Map/YMap/YMap.d.ts +13 -0
- package/build/esm/components/Map/YMap/YMap.js +93 -0
- package/build/esm/components/Map/YMap/YandexMap.d.ts +4 -0
- package/build/esm/components/Map/YMap/YandexMap.js +69 -0
- package/build/esm/components/Map/YMap/YandexMapApiLoader.d.ts +11 -0
- package/build/esm/components/Map/YMap/YandexMapApiLoader.js +33 -0
- package/build/esm/components/Map/YMap/i18n/en.json +4 -0
- package/build/esm/components/Map/YMap/i18n/index.d.ts +2 -0
- package/build/esm/components/Map/YMap/i18n/index.js +5 -0
- package/build/esm/components/Map/YMap/i18n/ru.json +4 -0
- package/build/esm/components/Map/helpers.d.ts +1 -0
- package/build/esm/components/Map/helpers.js +3 -0
- package/build/esm/{blocks/Media/Media.css → components/MediaBase/MediaBase.css} +15 -14
- package/build/esm/components/MediaBase/MediaBase.d.ts +14 -0
- package/build/esm/components/MediaBase/MediaBase.js +36 -0
- package/build/{cjs/blocks/Media/MediaContent.css → esm/components/MediaBase/MediaBaseContent.css} +2 -2
- package/build/esm/{blocks/Media/MediaContent.d.ts → components/MediaBase/MediaBaseContent.d.ts} +1 -1
- package/build/esm/{blocks/Media/MediaContent.js → components/MediaBase/MediaBaseContent.js} +2 -2
- package/build/esm/constructor-items.d.ts +1 -0
- package/build/esm/constructor-items.js +2 -1
- package/build/esm/containers/PageConstructor/Provider.d.ts +2 -0
- package/build/esm/containers/PageConstructor/Provider.js +3 -1
- package/build/esm/context/mapsContext/mapsContext.d.ts +22 -0
- package/build/esm/context/mapsContext/mapsContext.js +16 -0
- package/build/esm/context/mapsContext/mapsProvider.d.ts +10 -0
- package/build/esm/context/mapsContext/mapsProvider.js +10 -0
- package/build/esm/context/mapsContext/useMap.d.ts +2 -0
- package/build/esm/context/mapsContext/useMap.js +6 -0
- package/build/esm/internal-typings/global.d.ts +36 -0
- package/build/esm/models/constructor-items/blocks.d.ts +18 -9
- package/build/esm/models/constructor-items/blocks.js +1 -0
- package/build/esm/models/constructor-items/common.d.ts +25 -0
- package/build/esm/schema/index.js +2 -2
- package/build/esm/schema/validators/blocks.d.ts +1 -0
- package/build/esm/schema/validators/blocks.js +1 -0
- package/build/esm/schema/validators/common.d.ts +108 -0
- package/build/esm/schema/validators/common.js +52 -0
- package/build/esm/utils/blocks.d.ts +1 -1
- package/build/esm/utils/common.d.ts +6 -0
- package/build/esm/utils/common.js +20 -0
- package/build/esm/utils/index.d.ts +1 -0
- package/build/esm/utils/index.js +1 -0
- package/package.json +1 -1
- package/server/models/constructor-items/blocks.d.ts +18 -9
- package/server/models/constructor-items/blocks.js +1 -0
- package/server/models/constructor-items/common.d.ts +25 -0
- package/server/utils/blocks.d.ts +1 -1
- package/server/utils/common.d.ts +6 -0
- package/server/utils/common.js +24 -0
- package/server/utils/index.d.ts +1 -0
- package/server/utils/index.js +1 -0
- /package/build/cjs/{blocks/Media/MediaContent.d.ts → components/MediaBase/MediaBaseContent.d.ts} +0 -0
|
@@ -863,6 +863,114 @@ export declare const MediaProps: {
|
|
|
863
863
|
})[];
|
|
864
864
|
};
|
|
865
865
|
};
|
|
866
|
+
export declare const YMapMarkerLabel: {
|
|
867
|
+
type: string;
|
|
868
|
+
required: never[];
|
|
869
|
+
properties: {
|
|
870
|
+
iconCaption: {
|
|
871
|
+
type: string;
|
|
872
|
+
};
|
|
873
|
+
iconContent: {
|
|
874
|
+
type: string;
|
|
875
|
+
};
|
|
876
|
+
iconColor: {
|
|
877
|
+
type: string;
|
|
878
|
+
};
|
|
879
|
+
preset: {
|
|
880
|
+
type: string;
|
|
881
|
+
};
|
|
882
|
+
};
|
|
883
|
+
};
|
|
884
|
+
export declare const YMapMarker: {
|
|
885
|
+
type: string;
|
|
886
|
+
additionalProperties: boolean;
|
|
887
|
+
required: never[];
|
|
888
|
+
properties: {
|
|
889
|
+
coordinate: {
|
|
890
|
+
type: string;
|
|
891
|
+
items: {
|
|
892
|
+
type: string;
|
|
893
|
+
};
|
|
894
|
+
};
|
|
895
|
+
address: {
|
|
896
|
+
type: string;
|
|
897
|
+
};
|
|
898
|
+
label: {
|
|
899
|
+
type: string;
|
|
900
|
+
required: never[];
|
|
901
|
+
properties: {
|
|
902
|
+
iconCaption: {
|
|
903
|
+
type: string;
|
|
904
|
+
};
|
|
905
|
+
iconContent: {
|
|
906
|
+
type: string;
|
|
907
|
+
};
|
|
908
|
+
iconColor: {
|
|
909
|
+
type: string;
|
|
910
|
+
};
|
|
911
|
+
preset: {
|
|
912
|
+
type: string;
|
|
913
|
+
};
|
|
914
|
+
};
|
|
915
|
+
};
|
|
916
|
+
};
|
|
917
|
+
};
|
|
918
|
+
export declare const MapProps: {
|
|
919
|
+
zoom: {
|
|
920
|
+
type: string;
|
|
921
|
+
};
|
|
922
|
+
center: {
|
|
923
|
+
type: string;
|
|
924
|
+
items: {
|
|
925
|
+
type: string;
|
|
926
|
+
};
|
|
927
|
+
};
|
|
928
|
+
address: {
|
|
929
|
+
type: string;
|
|
930
|
+
};
|
|
931
|
+
id: {
|
|
932
|
+
type: string;
|
|
933
|
+
};
|
|
934
|
+
markers: {
|
|
935
|
+
type: string;
|
|
936
|
+
items: {
|
|
937
|
+
type: {
|
|
938
|
+
type: string;
|
|
939
|
+
additionalProperties: boolean;
|
|
940
|
+
required: never[];
|
|
941
|
+
properties: {
|
|
942
|
+
coordinate: {
|
|
943
|
+
type: string;
|
|
944
|
+
items: {
|
|
945
|
+
type: string;
|
|
946
|
+
};
|
|
947
|
+
};
|
|
948
|
+
address: {
|
|
949
|
+
type: string;
|
|
950
|
+
};
|
|
951
|
+
label: {
|
|
952
|
+
type: string;
|
|
953
|
+
required: never[];
|
|
954
|
+
properties: {
|
|
955
|
+
iconCaption: {
|
|
956
|
+
type: string;
|
|
957
|
+
};
|
|
958
|
+
iconContent: {
|
|
959
|
+
type: string;
|
|
960
|
+
};
|
|
961
|
+
iconColor: {
|
|
962
|
+
type: string;
|
|
963
|
+
};
|
|
964
|
+
preset: {
|
|
965
|
+
type: string;
|
|
966
|
+
};
|
|
967
|
+
};
|
|
968
|
+
};
|
|
969
|
+
};
|
|
970
|
+
};
|
|
971
|
+
};
|
|
972
|
+
};
|
|
973
|
+
};
|
|
866
974
|
export declare const CardBase: {
|
|
867
975
|
border: {
|
|
868
976
|
type: string;
|
|
@@ -438,6 +438,58 @@ export const MediaProps = {
|
|
|
438
438
|
},
|
|
439
439
|
dataLens: DataLensProps,
|
|
440
440
|
};
|
|
441
|
+
export const YMapMarkerLabel = {
|
|
442
|
+
type: 'object',
|
|
443
|
+
required: [],
|
|
444
|
+
properties: {
|
|
445
|
+
iconCaption: {
|
|
446
|
+
type: 'string',
|
|
447
|
+
},
|
|
448
|
+
iconContent: {
|
|
449
|
+
type: 'string',
|
|
450
|
+
},
|
|
451
|
+
iconColor: {
|
|
452
|
+
type: 'string',
|
|
453
|
+
},
|
|
454
|
+
preset: {
|
|
455
|
+
type: 'string',
|
|
456
|
+
},
|
|
457
|
+
},
|
|
458
|
+
};
|
|
459
|
+
export const YMapMarker = {
|
|
460
|
+
type: 'object',
|
|
461
|
+
additionalProperties: false,
|
|
462
|
+
required: [],
|
|
463
|
+
properties: {
|
|
464
|
+
coordinate: {
|
|
465
|
+
type: 'array',
|
|
466
|
+
items: { type: 'number' },
|
|
467
|
+
},
|
|
468
|
+
address: {
|
|
469
|
+
type: 'string',
|
|
470
|
+
},
|
|
471
|
+
label: YMapMarkerLabel,
|
|
472
|
+
},
|
|
473
|
+
};
|
|
474
|
+
export const MapProps = {
|
|
475
|
+
zoom: {
|
|
476
|
+
type: 'number',
|
|
477
|
+
},
|
|
478
|
+
center: {
|
|
479
|
+
type: 'array',
|
|
480
|
+
items: { type: 'number' },
|
|
481
|
+
},
|
|
482
|
+
address: {
|
|
483
|
+
type: 'string',
|
|
484
|
+
},
|
|
485
|
+
id: {
|
|
486
|
+
type: 'string',
|
|
487
|
+
},
|
|
488
|
+
markers: {
|
|
489
|
+
type: 'array',
|
|
490
|
+
items: { type: YMapMarker },
|
|
491
|
+
},
|
|
492
|
+
};
|
|
441
493
|
export const CardBase = {
|
|
442
494
|
border: {
|
|
443
495
|
type: 'string',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ConstructorBlock } from '../models/constructor';
|
|
2
2
|
import { TextSize, CustomConfig, PCShareSocialNetwork } from '../models';
|
|
3
|
-
export declare function getHeaderTag(size: TextSize): "h1" | "
|
|
3
|
+
export declare function getHeaderTag(size: TextSize): "h1" | "h2" | "h4";
|
|
4
4
|
export declare function getBlockKey(block: ConstructorBlock, index: number): string;
|
|
5
5
|
export declare const getCustomBlockTypes: ({ blocks, headers }?: CustomConfig) => string[];
|
|
6
6
|
export declare const getCustomItems: ({ blocks, headers, subBlocks }?: CustomConfig) => {
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export async function loadScript(src, { id, defer = false, async = true }) {
|
|
2
|
+
// eslint-disable-next-line @typescript-eslint/no-shadow
|
|
3
|
+
return new Promise((resolve, reject) => {
|
|
4
|
+
const script = document.createElement('script');
|
|
5
|
+
script.src = src;
|
|
6
|
+
script.id = id;
|
|
7
|
+
script.defer = defer;
|
|
8
|
+
script.async = async;
|
|
9
|
+
script.onload = (event) => {
|
|
10
|
+
resolve(event);
|
|
11
|
+
};
|
|
12
|
+
script.onerror = (event) => {
|
|
13
|
+
var _a;
|
|
14
|
+
const element = document.getElementById(id);
|
|
15
|
+
(_a = element === null || element === void 0 ? void 0 : element.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(element);
|
|
16
|
+
reject(event);
|
|
17
|
+
};
|
|
18
|
+
document.head.appendChild(script);
|
|
19
|
+
});
|
|
20
|
+
}
|
package/build/esm/utils/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { BackgroundImageProps, ButtonProps, ContentSize, ContentTextSize, ContentTheme, FileLinkProps, HeaderBreadCrumbsProps, HeaderImageSize, HeaderOffset, HeaderWidth, Justify, LinkProps, LinkTheme, MediaDirection, MediaProps, PreviewItemProps, PreviewRatioMediaContent, TextSize, TextTheme, ThemedImage, ThemedMediaProps, ThemedMediaVideoProps, TitleProps, LegendTableMarkerType, AnchorProps, TitleBaseProps, Animatable, BlockHeaderProps, ImageDeviceProps } from './common';
|
|
2
|
+
import { BackgroundImageProps, ButtonProps, ContentSize, ContentTextSize, ContentTheme, FileLinkProps, HeaderBreadCrumbsProps, HeaderImageSize, HeaderOffset, HeaderWidth, Justify, LinkProps, LinkTheme, MediaDirection, MediaProps, MapProps, PreviewItemProps, PreviewRatioMediaContent, TextSize, TextTheme, ThemedImage, ThemedMediaProps, ThemedMediaVideoProps, TitleProps, LegendTableMarkerType, AnchorProps, TitleBaseProps, Animatable, BlockHeaderProps, ImageDeviceProps } from './common';
|
|
3
3
|
import { ThemeSupporting } from '../../utils';
|
|
4
4
|
import { GridColumnSize, GridColumnSizesType } from '../../grid/types';
|
|
5
5
|
import { BannerCardProps, SubBlock } from './sub-blocks';
|
|
@@ -25,7 +25,8 @@ export declare enum BlockType {
|
|
|
25
25
|
IconsBlock = "icons-block",
|
|
26
26
|
CardLayoutBlock = "card-layout-block",
|
|
27
27
|
ContentLayoutBlock = "content-layout-block",
|
|
28
|
-
ShareBlock = "share-block"
|
|
28
|
+
ShareBlock = "share-block",
|
|
29
|
+
MapBlock = "map-block"
|
|
29
30
|
}
|
|
30
31
|
export declare const BlockTypes: BlockType[];
|
|
31
32
|
export declare const HeaderBlockTypes: BlockType[];
|
|
@@ -155,6 +156,13 @@ export interface CompaniesBlockProps extends Animatable {
|
|
|
155
156
|
title: string;
|
|
156
157
|
images: ThemeSupporting<ImageDeviceProps>;
|
|
157
158
|
}
|
|
159
|
+
export interface MediaBaseBlockProps extends Animatable, MediaContentProps {
|
|
160
|
+
direction?: MediaDirection;
|
|
161
|
+
mobileDirection?: MediaDirection;
|
|
162
|
+
largeMedia?: boolean;
|
|
163
|
+
mediaOnly?: boolean;
|
|
164
|
+
disableShadow?: boolean;
|
|
165
|
+
}
|
|
158
166
|
export interface MediaContentProps {
|
|
159
167
|
title: string;
|
|
160
168
|
description?: string;
|
|
@@ -164,13 +172,11 @@ export interface MediaContentProps {
|
|
|
164
172
|
buttons?: ButtonProps[];
|
|
165
173
|
size?: ContentSize;
|
|
166
174
|
}
|
|
167
|
-
export interface MediaBlockProps extends
|
|
175
|
+
export interface MediaBlockProps extends MediaBaseBlockProps {
|
|
168
176
|
media: ThemeSupporting<MediaProps>;
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
mediaOnly?: boolean;
|
|
173
|
-
disableShadow?: boolean;
|
|
177
|
+
}
|
|
178
|
+
export interface MapBlockProps extends MediaBaseBlockProps {
|
|
179
|
+
map: MapProps;
|
|
174
180
|
}
|
|
175
181
|
export interface PreviewBlockProps extends Animatable {
|
|
176
182
|
title: string;
|
|
@@ -317,6 +323,9 @@ export type CompaniesBlockModel = {
|
|
|
317
323
|
export type MediaBlockModel = {
|
|
318
324
|
type: BlockType.MediaBlock;
|
|
319
325
|
} & MediaBlockProps;
|
|
326
|
+
export type MapBlockModel = {
|
|
327
|
+
type: BlockType.MapBlock;
|
|
328
|
+
} & MapBlockProps;
|
|
320
329
|
export type PreviewBlockModel = {
|
|
321
330
|
type: BlockType.PreviewBlock;
|
|
322
331
|
} & PreviewBlockProps;
|
|
@@ -353,6 +362,6 @@ export type ContentLayoutBlockModel = {
|
|
|
353
362
|
export type ShareBLockModel = {
|
|
354
363
|
type: BlockType.ShareBlock;
|
|
355
364
|
} & ShareBlockProps;
|
|
356
|
-
type BlockModels = SliderBlockModel | ServiceDemoBlockModel | ExtendedFeaturesBlockModel | PromoFeaturesBlockModel | QuestionsBlockModel | CalculatorBlockModel | BannerBlockModel | CompaniesBlockModel | MediaBlockModel | InfoBlockModel | SecurityBlockModel | TableBlockModel | TabsBlockModel | SimpleBlockModel | LinkTableBlockModel | HeaderBlockModel | PreviewBlockModel | IconsBlockModel | HeaderSliderBlockModel | CardLayoutBlockModel | ContentLayoutBlockModel | ShareBLockModel;
|
|
365
|
+
type BlockModels = SliderBlockModel | ServiceDemoBlockModel | ExtendedFeaturesBlockModel | PromoFeaturesBlockModel | QuestionsBlockModel | CalculatorBlockModel | BannerBlockModel | CompaniesBlockModel | MediaBlockModel | MapBlockModel | InfoBlockModel | SecurityBlockModel | TableBlockModel | TabsBlockModel | SimpleBlockModel | LinkTableBlockModel | HeaderBlockModel | PreviewBlockModel | IconsBlockModel | HeaderSliderBlockModel | CardLayoutBlockModel | ContentLayoutBlockModel | ShareBLockModel;
|
|
357
366
|
export type Block = BlockModels & BlockBaseProps;
|
|
358
367
|
export {};
|
|
@@ -25,6 +25,7 @@ var BlockType;
|
|
|
25
25
|
BlockType["CardLayoutBlock"] = "card-layout-block";
|
|
26
26
|
BlockType["ContentLayoutBlock"] = "content-layout-block";
|
|
27
27
|
BlockType["ShareBlock"] = "share-block";
|
|
28
|
+
BlockType["MapBlock"] = "map-block";
|
|
28
29
|
})(BlockType = exports.BlockType || (exports.BlockType = {}));
|
|
29
30
|
exports.BlockTypes = Object.values(BlockType);
|
|
30
31
|
exports.HeaderBlockTypes = [BlockType.HeaderBlock, BlockType.HeaderSliderBlock];
|
|
@@ -186,6 +186,31 @@ export interface MediaComponentDataLensProps {
|
|
|
186
186
|
export interface MediaProps extends Animatable, Partial<MediaComponentDataLensProps>, Partial<MediaComponentYoutubeProps>, Partial<MediaComponentImageProps>, Partial<MediaComponentVideoProps> {
|
|
187
187
|
color?: string;
|
|
188
188
|
}
|
|
189
|
+
export type Coordinate = number[];
|
|
190
|
+
export interface MapBaseProps {
|
|
191
|
+
zoom?: number;
|
|
192
|
+
center?: Coordinate;
|
|
193
|
+
}
|
|
194
|
+
export interface GMapProps extends MapBaseProps {
|
|
195
|
+
address: string;
|
|
196
|
+
}
|
|
197
|
+
export interface YMapProps extends MapBaseProps {
|
|
198
|
+
markers: YMapMarker[];
|
|
199
|
+
id: string;
|
|
200
|
+
center: Coordinate;
|
|
201
|
+
}
|
|
202
|
+
export interface YMapMarker {
|
|
203
|
+
address?: string;
|
|
204
|
+
coordinate?: Coordinate;
|
|
205
|
+
label?: YMapMarkerLabel;
|
|
206
|
+
}
|
|
207
|
+
export interface YMapMarkerLabel {
|
|
208
|
+
iconCaption?: string;
|
|
209
|
+
iconContent?: string;
|
|
210
|
+
iconColor?: string;
|
|
211
|
+
preset?: string;
|
|
212
|
+
}
|
|
213
|
+
export type MapProps = GMapProps | YMapProps;
|
|
189
214
|
export type ThemedMediaProps = ThemeSupporting<MediaProps>;
|
|
190
215
|
export interface NewMetrikaGoal {
|
|
191
216
|
name: string;
|
package/server/utils/blocks.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ConstructorBlock } from '../models/constructor';
|
|
2
2
|
import { TextSize, CustomConfig, PCShareSocialNetwork } from '../models';
|
|
3
|
-
export declare function getHeaderTag(size: TextSize): "h1" | "
|
|
3
|
+
export declare function getHeaderTag(size: TextSize): "h1" | "h2" | "h4";
|
|
4
4
|
export declare function getBlockKey(block: ConstructorBlock, index: number): string;
|
|
5
5
|
export declare const getCustomBlockTypes: ({ blocks, headers }?: CustomConfig) => string[];
|
|
6
6
|
export declare const getCustomItems: ({ blocks, headers, subBlocks }?: CustomConfig) => {
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.loadScript = void 0;
|
|
4
|
+
async function loadScript(src, { id, defer = false, async = true }) {
|
|
5
|
+
// eslint-disable-next-line @typescript-eslint/no-shadow
|
|
6
|
+
return new Promise((resolve, reject) => {
|
|
7
|
+
const script = document.createElement('script');
|
|
8
|
+
script.src = src;
|
|
9
|
+
script.id = id;
|
|
10
|
+
script.defer = defer;
|
|
11
|
+
script.async = async;
|
|
12
|
+
script.onload = (event) => {
|
|
13
|
+
resolve(event);
|
|
14
|
+
};
|
|
15
|
+
script.onerror = (event) => {
|
|
16
|
+
var _a;
|
|
17
|
+
const element = document.getElementById(id);
|
|
18
|
+
(_a = element === null || element === void 0 ? void 0 : element.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(element);
|
|
19
|
+
reject(event);
|
|
20
|
+
};
|
|
21
|
+
document.head.appendChild(script);
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
exports.loadScript = loadScript;
|
package/server/utils/index.d.ts
CHANGED
package/server/utils/index.js
CHANGED
|
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.isHubspotEventData = exports.configure = exports.Lang = void 0;
|
|
18
|
+
__exportStar(require("./common"), exports);
|
|
18
19
|
__exportStar(require("./blocks"), exports);
|
|
19
20
|
__exportStar(require("./scroll"), exports);
|
|
20
21
|
__exportStar(require("./url"), exports);
|
/package/build/cjs/{blocks/Media/MediaContent.d.ts → components/MediaBase/MediaBaseContent.d.ts}
RENAMED
|
File without changes
|