@gravity-ui/page-constructor 3.0.0 → 3.1.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 +19 -0
- package/README.md +15 -0
- package/build/cjs/blocks/Header/schema.d.ts +234 -0
- package/build/cjs/blocks/HeaderSlider/schema.d.ts +78 -0
- package/build/cjs/blocks/Media/schema.d.ts +156 -0
- package/build/cjs/blocks/PromoFeaturesBlock/schema.d.ts +78 -0
- package/build/cjs/blocks/Slider/Slider.js +1 -1
- package/build/cjs/blocks/Tabs/schema.d.ts +78 -0
- package/build/cjs/components/BlockBase/BlockBase.js +2 -2
- package/build/cjs/components/Media/Media.js +1 -1
- package/build/cjs/components/VideoBlock/VideoBlock.d.ts +2 -1
- package/build/cjs/components/VideoBlock/VideoBlock.js +6 -2
- package/build/cjs/containers/PageConstructor/components/ConstructorBlock/ConstructorBlock.d.ts +2 -2
- package/build/cjs/containers/PageConstructor/components/ConstructorBlock/ConstructorBlock.js +2 -2
- package/build/cjs/containers/PageConstructor/components/ConstructorBlocks/ConstructorBlocks.js +5 -3
- package/build/cjs/containers/PageConstructor/components/ConstructorItem/ConstructorItem.d.ts +1 -1
- package/build/cjs/containers/PageConstructor/components/ConstructorItem/ConstructorItem.js +4 -2
- package/build/cjs/customization/BlockDecoration.d.ts +1 -1
- package/build/cjs/customization/BlockDecoration.js +4 -8
- package/build/cjs/models/common.d.ts +2 -1
- package/build/cjs/models/common.js +1 -0
- package/build/cjs/models/constructor-items/blocks.d.ts +1 -0
- package/build/cjs/models/customization.d.ts +1 -1
- package/build/cjs/schema/validators/common.d.ts +78 -0
- package/build/cjs/schema/validators/common.js +3 -0
- package/build/cjs/sub-blocks/LayoutItem/schema.d.ts +78 -0
- package/build/cjs/sub-blocks/MediaCard/schema.d.ts +78 -0
- package/build/cjs/utils/blocks.d.ts +0 -1
- package/build/cjs/utils/blocks.js +1 -3
- package/build/esm/blocks/Header/schema.d.ts +234 -0
- package/build/esm/blocks/HeaderSlider/schema.d.ts +78 -0
- package/build/esm/blocks/Media/schema.d.ts +156 -0
- package/build/esm/blocks/PromoFeaturesBlock/schema.d.ts +78 -0
- package/build/esm/blocks/Slider/Slider.js +2 -2
- package/build/esm/blocks/Tabs/schema.d.ts +78 -0
- package/build/esm/components/BlockBase/BlockBase.js +2 -2
- package/build/esm/components/Media/Media.js +1 -1
- package/build/esm/components/VideoBlock/VideoBlock.d.ts +2 -1
- package/build/esm/components/VideoBlock/VideoBlock.js +6 -2
- package/build/esm/containers/PageConstructor/components/ConstructorBlock/ConstructorBlock.d.ts +2 -2
- package/build/esm/containers/PageConstructor/components/ConstructorBlock/ConstructorBlock.js +2 -2
- package/build/esm/containers/PageConstructor/components/ConstructorBlocks/ConstructorBlocks.js +5 -3
- package/build/esm/containers/PageConstructor/components/ConstructorItem/ConstructorItem.d.ts +1 -1
- package/build/esm/containers/PageConstructor/components/ConstructorItem/ConstructorItem.js +4 -2
- package/build/esm/customization/BlockDecoration.d.ts +1 -1
- package/build/esm/customization/BlockDecoration.js +4 -8
- package/build/esm/models/common.d.ts +2 -1
- package/build/esm/models/common.js +1 -0
- package/build/esm/models/constructor-items/blocks.d.ts +1 -0
- package/build/esm/models/customization.d.ts +1 -1
- package/build/esm/schema/validators/common.d.ts +78 -0
- package/build/esm/schema/validators/common.js +3 -0
- package/build/esm/sub-blocks/LayoutItem/schema.d.ts +78 -0
- package/build/esm/sub-blocks/MediaCard/schema.d.ts +78 -0
- package/build/esm/utils/blocks.d.ts +0 -1
- package/build/esm/utils/blocks.js +0 -1
- package/package.json +1 -1
- package/server/models/common.d.ts +2 -1
- package/server/models/common.js +1 -0
- package/server/models/constructor-items/blocks.d.ts +1 -0
- package/server/models/customization.d.ts +1 -1
- package/server/utils/blocks.d.ts +0 -1
- package/server/utils/blocks.js +1 -3
|
@@ -145,6 +145,84 @@ export declare const tabsItem: {
|
|
|
145
145
|
fullscreen: {
|
|
146
146
|
type: string;
|
|
147
147
|
};
|
|
148
|
+
analyticsEvents: {
|
|
149
|
+
anyOf: ({
|
|
150
|
+
type: string;
|
|
151
|
+
additionalProperties: {
|
|
152
|
+
type: string;
|
|
153
|
+
};
|
|
154
|
+
required: string[];
|
|
155
|
+
properties: {
|
|
156
|
+
name: {
|
|
157
|
+
type: string;
|
|
158
|
+
};
|
|
159
|
+
type: {
|
|
160
|
+
type: string;
|
|
161
|
+
};
|
|
162
|
+
counters: {
|
|
163
|
+
type: string;
|
|
164
|
+
additionalProperties: boolean;
|
|
165
|
+
required: never[];
|
|
166
|
+
properties: {
|
|
167
|
+
include: {
|
|
168
|
+
type: string;
|
|
169
|
+
items: {
|
|
170
|
+
type: string;
|
|
171
|
+
};
|
|
172
|
+
};
|
|
173
|
+
exclude: {
|
|
174
|
+
type: string;
|
|
175
|
+
items: {
|
|
176
|
+
type: string;
|
|
177
|
+
};
|
|
178
|
+
};
|
|
179
|
+
};
|
|
180
|
+
};
|
|
181
|
+
context: {
|
|
182
|
+
type: string;
|
|
183
|
+
};
|
|
184
|
+
};
|
|
185
|
+
} | {
|
|
186
|
+
type: string;
|
|
187
|
+
items: {
|
|
188
|
+
type: string;
|
|
189
|
+
additionalProperties: {
|
|
190
|
+
type: string;
|
|
191
|
+
};
|
|
192
|
+
required: string[];
|
|
193
|
+
properties: {
|
|
194
|
+
name: {
|
|
195
|
+
type: string;
|
|
196
|
+
};
|
|
197
|
+
type: {
|
|
198
|
+
type: string;
|
|
199
|
+
};
|
|
200
|
+
counters: {
|
|
201
|
+
type: string;
|
|
202
|
+
additionalProperties: boolean;
|
|
203
|
+
required: never[];
|
|
204
|
+
properties: {
|
|
205
|
+
include: {
|
|
206
|
+
type: string;
|
|
207
|
+
items: {
|
|
208
|
+
type: string;
|
|
209
|
+
};
|
|
210
|
+
};
|
|
211
|
+
exclude: {
|
|
212
|
+
type: string;
|
|
213
|
+
items: {
|
|
214
|
+
type: string;
|
|
215
|
+
};
|
|
216
|
+
};
|
|
217
|
+
};
|
|
218
|
+
};
|
|
219
|
+
context: {
|
|
220
|
+
type: string;
|
|
221
|
+
};
|
|
222
|
+
};
|
|
223
|
+
};
|
|
224
|
+
})[];
|
|
225
|
+
};
|
|
148
226
|
};
|
|
149
227
|
} | {
|
|
150
228
|
type: string;
|
|
@@ -8,9 +8,9 @@ const utils_1 = require("../../utils");
|
|
|
8
8
|
const Anchor_1 = tslib_1.__importDefault(require("../Anchor/Anchor"));
|
|
9
9
|
const b = (0, utils_1.block)('block-base');
|
|
10
10
|
const BlockBase = (props) => {
|
|
11
|
-
const { anchor, visible, children, className, resetPaddings, qa } = props;
|
|
11
|
+
const { anchor, visible, children, className, resetPaddings, qa, index = 0 } = props;
|
|
12
12
|
return (react_1.default.createElement(grid_1.Col, { className: b({ ['reset-paddings']: resetPaddings }, className), visible: visible, reset: true, dataQa: qa },
|
|
13
|
-
react_1.default.createElement(BlockDecoration_1.BlockDecoration,
|
|
13
|
+
react_1.default.createElement(BlockDecoration_1.BlockDecoration, { id: index },
|
|
14
14
|
anchor && react_1.default.createElement(Anchor_1.default, { id: anchor.url, className: b('anchor') }),
|
|
15
15
|
children)));
|
|
16
16
|
};
|
|
@@ -42,7 +42,7 @@ const Media = (props) => {
|
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
if (youtube) {
|
|
45
|
-
result = (react_1.default.createElement(VideoBlock_1.default, { className: b('youtube', youtubeClassName), record: youtube, attributes: { color: 'white', rel: '0' }, previewImg: previewImg, height: height, fullscreen: fullscreen }));
|
|
45
|
+
result = (react_1.default.createElement(VideoBlock_1.default, { className: b('youtube', youtubeClassName), record: youtube, attributes: { color: 'white', rel: '0' }, previewImg: previewImg, height: height, fullscreen: fullscreen, analyticsEvents: analyticsEvents }));
|
|
46
46
|
}
|
|
47
47
|
if (dataLens) {
|
|
48
48
|
result = react_1.default.createElement(DataLens_1.default, { dataLens: dataLens });
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { AnalyticsEventsBase } from '../../models/common';
|
|
2
3
|
export declare const AUTOPLAY_ATTRIBUTES: {
|
|
3
4
|
autoplay: number;
|
|
4
5
|
mute: number;
|
|
5
6
|
};
|
|
6
7
|
export declare function getHeight(width: number): number;
|
|
7
|
-
export interface VideoBlockProps {
|
|
8
|
+
export interface VideoBlockProps extends AnalyticsEventsBase {
|
|
8
9
|
id?: string;
|
|
9
10
|
stream?: string;
|
|
10
11
|
record?: string;
|
|
@@ -6,7 +6,9 @@ const react_1 = tslib_1.__importStar(require("react"));
|
|
|
6
6
|
const uikit_1 = require("@gravity-ui/uikit");
|
|
7
7
|
const lodash_1 = tslib_1.__importDefault(require("lodash"));
|
|
8
8
|
const uuid_1 = require("uuid");
|
|
9
|
+
const useAnalytics_1 = require("../../hooks/useAnalytics");
|
|
9
10
|
const icons_1 = require("../../icons");
|
|
11
|
+
const common_1 = require("../../models/common");
|
|
10
12
|
const utils_1 = require("../../utils");
|
|
11
13
|
const Image_1 = tslib_1.__importDefault(require("../Image/Image"));
|
|
12
14
|
const i18n_1 = tslib_1.__importDefault(require("./i18n"));
|
|
@@ -39,7 +41,8 @@ function getHeight(width) {
|
|
|
39
41
|
}
|
|
40
42
|
exports.getHeight = getHeight;
|
|
41
43
|
const VideoBlock = (props) => {
|
|
42
|
-
const { stream, record, attributes, className, id, previewImg, playButton, height, fullscreen } = props;
|
|
44
|
+
const { stream, record, attributes, className, id, previewImg, playButton, height, fullscreen, analyticsEvents, } = props;
|
|
45
|
+
const handleAnalytics = (0, useAnalytics_1.useAnalytics)(common_1.DefaultEventNames.VideoPreview);
|
|
43
46
|
const src = getVideoSrc(stream, record);
|
|
44
47
|
const ref = (0, react_1.useRef)(null);
|
|
45
48
|
const iframeRef = (0, react_1.useRef)();
|
|
@@ -48,11 +51,12 @@ const VideoBlock = (props) => {
|
|
|
48
51
|
const [currentHeight, setCurrentHeight] = (0, react_1.useState)(height || undefined);
|
|
49
52
|
const fullId = id || (0, uuid_1.v4)();
|
|
50
53
|
const onPreviewClick = (0, react_1.useCallback)(() => {
|
|
54
|
+
handleAnalytics(analyticsEvents);
|
|
51
55
|
if (iframeRef.current) {
|
|
52
56
|
iframeRef.current.src = `${src}?${(0, utils_1.getPageSearchParams)(Object.assign(Object.assign({}, exports.AUTOPLAY_ATTRIBUTES), (attributes || {})))}`;
|
|
53
57
|
}
|
|
54
58
|
setTimeout(() => setHidePreview(true), AUTOPLAY_DELAY);
|
|
55
|
-
}, [src, attributes]);
|
|
59
|
+
}, [handleAnalytics, analyticsEvents, src, attributes]);
|
|
56
60
|
(0, react_1.useEffect)(() => {
|
|
57
61
|
const updateSize = lodash_1.default.debounce(() => {
|
|
58
62
|
setCurrentHeight(ref.current ? Math.round(getHeight(ref.current.offsetWidth)) : undefined);
|
package/build/cjs/containers/PageConstructor/components/ConstructorBlock/ConstructorBlock.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Block, WithChildren } from '../../../../models';
|
|
3
|
-
interface ConstructorBlockProps {
|
|
2
|
+
import { Block, BlockBaseProps, WithChildren } from '../../../../models';
|
|
3
|
+
interface ConstructorBlockProps extends Pick<BlockBaseProps, 'index'> {
|
|
4
4
|
data: Block;
|
|
5
5
|
}
|
|
6
6
|
export declare const ConstructorBlock: React.FC<WithChildren<ConstructorBlockProps>>;
|
package/build/cjs/containers/PageConstructor/components/ConstructorBlock/ConstructorBlock.js
CHANGED
|
@@ -6,8 +6,8 @@ const react_1 = tslib_1.__importDefault(require("react"));
|
|
|
6
6
|
const BlockBase_1 = tslib_1.__importDefault(require("../../../../components/BlockBase/BlockBase"));
|
|
7
7
|
const utils_1 = require("../../../../utils");
|
|
8
8
|
const b = (0, utils_1.block)('constructor-block');
|
|
9
|
-
const ConstructorBlock = ({ data, children, }) => {
|
|
9
|
+
const ConstructorBlock = ({ index = 0, data, children, }) => {
|
|
10
10
|
const { anchor, visible, type } = data;
|
|
11
|
-
return (react_1.default.createElement(BlockBase_1.default, { className: b({ type }), anchor: anchor, visible: visible, resetPaddings: data.resetPaddings }, children));
|
|
11
|
+
return (react_1.default.createElement(BlockBase_1.default, { index: index, className: b({ type }), anchor: anchor, visible: visible, resetPaddings: data.resetPaddings }, children));
|
|
12
12
|
};
|
|
13
13
|
exports.ConstructorBlock = ConstructorBlock;
|
package/build/cjs/containers/PageConstructor/components/ConstructorBlocks/ConstructorBlocks.js
CHANGED
|
@@ -4,7 +4,6 @@ exports.ConstructorBlocks = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importStar(require("react"));
|
|
6
6
|
const lodash_1 = tslib_1.__importDefault(require("lodash"));
|
|
7
|
-
const blockIdContext_1 = require("../../../../context/blockIdContext");
|
|
8
7
|
const innerContext_1 = require("../../../../context/innerContext");
|
|
9
8
|
const utils_1 = require("../../../../utils");
|
|
10
9
|
const ConstructorBlock_1 = require("../ConstructorBlock/ConstructorBlock");
|
|
@@ -35,9 +34,12 @@ const ConstructorBlocks = ({ items }) => {
|
|
|
35
34
|
if ('children' in item && item.children) {
|
|
36
35
|
children = item.children.map(renderer.bind(null, blockId));
|
|
37
36
|
}
|
|
38
|
-
itemElement = (react_1.default.createElement(ConstructorItem_1.ConstructorItem, { data: item, blockKey: blockId }, children));
|
|
37
|
+
itemElement = (react_1.default.createElement(ConstructorItem_1.ConstructorItem, { data: item, key: blockId, blockKey: blockId }, children));
|
|
39
38
|
}
|
|
40
|
-
return
|
|
39
|
+
return blockTypes.includes(item.type) ? (
|
|
40
|
+
//TODO: replace ConstructorBlock (and delete it) with BlockBase when all
|
|
41
|
+
// components relying on constructor inner structure like Slider or blog-constructor will be refactored
|
|
42
|
+
react_1.default.createElement(ConstructorBlock_1.ConstructorBlock, { data: item, key: blockId, index: index }, itemElement)) : (itemElement);
|
|
41
43
|
};
|
|
42
44
|
return react_1.default.createElement(react_1.Fragment, null, items.map(renderer.bind(null, '')));
|
|
43
45
|
};
|
package/build/cjs/containers/PageConstructor/components/ConstructorItem/ConstructorItem.d.ts
CHANGED
|
@@ -3,5 +3,5 @@ export interface ConstructorItemProps {
|
|
|
3
3
|
data: ConstructorItemType;
|
|
4
4
|
blockKey: string;
|
|
5
5
|
}
|
|
6
|
-
export declare const ConstructorItem: ({ data, children }: WithChildren<ConstructorItemProps>) => JSX.Element;
|
|
6
|
+
export declare const ConstructorItem: ({ data, blockKey, children }: WithChildren<ConstructorItemProps>) => JSX.Element;
|
|
7
7
|
export declare const ConstructorHeader: ({ data, blockKey, }: Pick<ConstructorItemProps, 'data' | 'blockKey'>) => JSX.Element;
|
|
@@ -3,13 +3,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ConstructorHeader = exports.ConstructorItem = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importStar(require("react"));
|
|
6
|
+
const blockIdContext_1 = require("../../../../context/blockIdContext");
|
|
6
7
|
const innerContext_1 = require("../../../../context/innerContext");
|
|
7
8
|
const BlockDecoration_1 = require("../../../../customization/BlockDecoration");
|
|
8
|
-
const ConstructorItem = ({ data, children }) => {
|
|
9
|
+
const ConstructorItem = ({ data, blockKey, children }) => {
|
|
9
10
|
const { itemMap } = (0, react_1.useContext)(innerContext_1.InnerContext);
|
|
10
11
|
const { type } = data, rest = tslib_1.__rest(data, ["type"]);
|
|
11
12
|
const Component = itemMap[type];
|
|
12
|
-
return react_1.default.createElement(
|
|
13
|
+
return (react_1.default.createElement(blockIdContext_1.BlockIdContext.Provider, { value: blockKey },
|
|
14
|
+
react_1.default.createElement(Component, Object.assign({}, rest), children)));
|
|
13
15
|
};
|
|
14
16
|
exports.ConstructorItem = ConstructorItem;
|
|
15
17
|
const ConstructorHeader = ({ data, blockKey, }) => (react_1.default.createElement(BlockDecoration_1.BlockDecoration, { id: data.type },
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
2
|
import { BlockDecorationProps } from '../models';
|
|
3
|
-
export declare const BlockDecoration: (
|
|
3
|
+
export declare const BlockDecoration: ({ id, children: blockChildren, }: PropsWithChildren<BlockDecorationProps>) => JSX.Element;
|
|
@@ -3,20 +3,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.BlockDecoration = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importStar(require("react"));
|
|
6
|
-
const blockIdContext_1 = require("../context/blockIdContext");
|
|
7
6
|
const innerContext_1 = require("../context/innerContext");
|
|
8
|
-
const
|
|
9
|
-
const BlockDecoration = (props) => {
|
|
7
|
+
const BlockDecoration = ({ id, children: blockChildren, }) => {
|
|
10
8
|
var _a, _b;
|
|
11
|
-
const blockContenxtId = (0, utils_1.getBlockIndexFromId)((0, react_1.useContext)(blockIdContext_1.BlockIdContext));
|
|
12
9
|
const { headerBlockTypes } = (0, react_1.useContext)(innerContext_1.InnerContext);
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
const block = react_1.default.createElement(react_1.Fragment, null, props.children);
|
|
10
|
+
const isHeader = Boolean(typeof id === 'string' && headerBlockTypes.includes(id));
|
|
11
|
+
const block = react_1.default.createElement(react_1.Fragment, null, blockChildren);
|
|
16
12
|
const blockDecorators = (_b = (_a = (0, react_1.useContext)(innerContext_1.InnerContext).customization) === null || _a === void 0 ? void 0 : _a.decorators) === null || _b === void 0 ? void 0 : _b.block;
|
|
17
13
|
if (!blockDecorators) {
|
|
18
14
|
return block;
|
|
19
15
|
}
|
|
20
|
-
return blockDecorators.reduce((children, decorator) =>
|
|
16
|
+
return blockDecorators.reduce((children, decorator) => react_1.default.createElement(react_1.Fragment, null, decorator({ children, id, isHeader })), block);
|
|
21
17
|
};
|
|
22
18
|
exports.BlockDecoration = BlockDecoration;
|
|
@@ -79,7 +79,8 @@ export declare enum DefaultEventNames {
|
|
|
79
79
|
HubspotFormSubmit = "hubspot-form-submit",
|
|
80
80
|
QuoteButton = "quote-button-click",
|
|
81
81
|
BackLink = "back-link-click",
|
|
82
|
-
Breadcrumb = "breadcrumb-click"
|
|
82
|
+
Breadcrumb = "breadcrumb-click",
|
|
83
|
+
VideoPreview = "video-preview-click"
|
|
83
84
|
}
|
|
84
85
|
export type AnalyticsCounters = {
|
|
85
86
|
include?: string[];
|
|
@@ -48,4 +48,5 @@ var DefaultEventNames;
|
|
|
48
48
|
DefaultEventNames["QuoteButton"] = "quote-button-click";
|
|
49
49
|
DefaultEventNames["BackLink"] = "back-link-click";
|
|
50
50
|
DefaultEventNames["Breadcrumb"] = "breadcrumb-click";
|
|
51
|
+
DefaultEventNames["VideoPreview"] = "video-preview-click";
|
|
51
52
|
})(DefaultEventNames = exports.DefaultEventNames || (exports.DefaultEventNames = {}));
|
|
@@ -1117,6 +1117,84 @@ export declare const MediaProps: {
|
|
|
1117
1117
|
fullscreen: {
|
|
1118
1118
|
type: string;
|
|
1119
1119
|
};
|
|
1120
|
+
analyticsEvents: {
|
|
1121
|
+
anyOf: ({
|
|
1122
|
+
type: string;
|
|
1123
|
+
additionalProperties: {
|
|
1124
|
+
type: string;
|
|
1125
|
+
};
|
|
1126
|
+
required: string[];
|
|
1127
|
+
properties: {
|
|
1128
|
+
name: {
|
|
1129
|
+
type: string;
|
|
1130
|
+
};
|
|
1131
|
+
type: {
|
|
1132
|
+
type: string;
|
|
1133
|
+
};
|
|
1134
|
+
counters: {
|
|
1135
|
+
type: string;
|
|
1136
|
+
additionalProperties: boolean;
|
|
1137
|
+
required: never[];
|
|
1138
|
+
properties: {
|
|
1139
|
+
include: {
|
|
1140
|
+
type: string;
|
|
1141
|
+
items: {
|
|
1142
|
+
type: string;
|
|
1143
|
+
};
|
|
1144
|
+
};
|
|
1145
|
+
exclude: {
|
|
1146
|
+
type: string;
|
|
1147
|
+
items: {
|
|
1148
|
+
type: string;
|
|
1149
|
+
};
|
|
1150
|
+
};
|
|
1151
|
+
};
|
|
1152
|
+
};
|
|
1153
|
+
context: {
|
|
1154
|
+
type: string;
|
|
1155
|
+
};
|
|
1156
|
+
};
|
|
1157
|
+
} | {
|
|
1158
|
+
type: string;
|
|
1159
|
+
items: {
|
|
1160
|
+
type: string;
|
|
1161
|
+
additionalProperties: {
|
|
1162
|
+
type: string;
|
|
1163
|
+
};
|
|
1164
|
+
required: string[];
|
|
1165
|
+
properties: {
|
|
1166
|
+
name: {
|
|
1167
|
+
type: string;
|
|
1168
|
+
};
|
|
1169
|
+
type: {
|
|
1170
|
+
type: string;
|
|
1171
|
+
};
|
|
1172
|
+
counters: {
|
|
1173
|
+
type: string;
|
|
1174
|
+
additionalProperties: boolean;
|
|
1175
|
+
required: never[];
|
|
1176
|
+
properties: {
|
|
1177
|
+
include: {
|
|
1178
|
+
type: string;
|
|
1179
|
+
items: {
|
|
1180
|
+
type: string;
|
|
1181
|
+
};
|
|
1182
|
+
};
|
|
1183
|
+
exclude: {
|
|
1184
|
+
type: string;
|
|
1185
|
+
items: {
|
|
1186
|
+
type: string;
|
|
1187
|
+
};
|
|
1188
|
+
};
|
|
1189
|
+
};
|
|
1190
|
+
};
|
|
1191
|
+
context: {
|
|
1192
|
+
type: string;
|
|
1193
|
+
};
|
|
1194
|
+
};
|
|
1195
|
+
};
|
|
1196
|
+
})[];
|
|
1197
|
+
};
|
|
1120
1198
|
};
|
|
1121
1199
|
export declare const YMapMarkerLabel: {
|
|
1122
1200
|
type: string;
|
|
@@ -460,6 +460,9 @@ exports.MediaProps = {
|
|
|
460
460
|
fullscreen: {
|
|
461
461
|
type: 'boolean',
|
|
462
462
|
},
|
|
463
|
+
analyticsEvents: {
|
|
464
|
+
anyOf: [event_1.AnalyticsEventSchema, { type: 'array', items: event_1.AnalyticsEventSchema }],
|
|
465
|
+
},
|
|
463
466
|
};
|
|
464
467
|
exports.YMapMarkerLabel = {
|
|
465
468
|
type: 'object',
|
|
@@ -135,6 +135,84 @@ export declare const LayoutItem: {
|
|
|
135
135
|
fullscreen: {
|
|
136
136
|
type: string;
|
|
137
137
|
};
|
|
138
|
+
analyticsEvents: {
|
|
139
|
+
anyOf: ({
|
|
140
|
+
type: string;
|
|
141
|
+
additionalProperties: {
|
|
142
|
+
type: string;
|
|
143
|
+
};
|
|
144
|
+
required: string[];
|
|
145
|
+
properties: {
|
|
146
|
+
name: {
|
|
147
|
+
type: string;
|
|
148
|
+
};
|
|
149
|
+
type: {
|
|
150
|
+
type: string;
|
|
151
|
+
};
|
|
152
|
+
counters: {
|
|
153
|
+
type: string;
|
|
154
|
+
additionalProperties: boolean;
|
|
155
|
+
required: never[];
|
|
156
|
+
properties: {
|
|
157
|
+
include: {
|
|
158
|
+
type: string;
|
|
159
|
+
items: {
|
|
160
|
+
type: string;
|
|
161
|
+
};
|
|
162
|
+
};
|
|
163
|
+
exclude: {
|
|
164
|
+
type: string;
|
|
165
|
+
items: {
|
|
166
|
+
type: string;
|
|
167
|
+
};
|
|
168
|
+
};
|
|
169
|
+
};
|
|
170
|
+
};
|
|
171
|
+
context: {
|
|
172
|
+
type: string;
|
|
173
|
+
};
|
|
174
|
+
};
|
|
175
|
+
} | {
|
|
176
|
+
type: string;
|
|
177
|
+
items: {
|
|
178
|
+
type: string;
|
|
179
|
+
additionalProperties: {
|
|
180
|
+
type: string;
|
|
181
|
+
};
|
|
182
|
+
required: string[];
|
|
183
|
+
properties: {
|
|
184
|
+
name: {
|
|
185
|
+
type: string;
|
|
186
|
+
};
|
|
187
|
+
type: {
|
|
188
|
+
type: string;
|
|
189
|
+
};
|
|
190
|
+
counters: {
|
|
191
|
+
type: string;
|
|
192
|
+
additionalProperties: boolean;
|
|
193
|
+
required: never[];
|
|
194
|
+
properties: {
|
|
195
|
+
include: {
|
|
196
|
+
type: string;
|
|
197
|
+
items: {
|
|
198
|
+
type: string;
|
|
199
|
+
};
|
|
200
|
+
};
|
|
201
|
+
exclude: {
|
|
202
|
+
type: string;
|
|
203
|
+
items: {
|
|
204
|
+
type: string;
|
|
205
|
+
};
|
|
206
|
+
};
|
|
207
|
+
};
|
|
208
|
+
};
|
|
209
|
+
context: {
|
|
210
|
+
type: string;
|
|
211
|
+
};
|
|
212
|
+
};
|
|
213
|
+
};
|
|
214
|
+
})[];
|
|
215
|
+
};
|
|
138
216
|
};
|
|
139
217
|
content: Partial<{
|
|
140
218
|
title: {
|
|
@@ -137,6 +137,84 @@ export declare const MediaCardBlock: {
|
|
|
137
137
|
fullscreen: {
|
|
138
138
|
type: string;
|
|
139
139
|
};
|
|
140
|
+
analyticsEvents: {
|
|
141
|
+
anyOf: ({
|
|
142
|
+
type: string;
|
|
143
|
+
additionalProperties: {
|
|
144
|
+
type: string;
|
|
145
|
+
};
|
|
146
|
+
required: string[];
|
|
147
|
+
properties: {
|
|
148
|
+
name: {
|
|
149
|
+
type: string;
|
|
150
|
+
};
|
|
151
|
+
type: {
|
|
152
|
+
type: string;
|
|
153
|
+
};
|
|
154
|
+
counters: {
|
|
155
|
+
type: string;
|
|
156
|
+
additionalProperties: boolean;
|
|
157
|
+
required: never[];
|
|
158
|
+
properties: {
|
|
159
|
+
include: {
|
|
160
|
+
type: string;
|
|
161
|
+
items: {
|
|
162
|
+
type: string;
|
|
163
|
+
};
|
|
164
|
+
};
|
|
165
|
+
exclude: {
|
|
166
|
+
type: string;
|
|
167
|
+
items: {
|
|
168
|
+
type: string;
|
|
169
|
+
};
|
|
170
|
+
};
|
|
171
|
+
};
|
|
172
|
+
};
|
|
173
|
+
context: {
|
|
174
|
+
type: string;
|
|
175
|
+
};
|
|
176
|
+
};
|
|
177
|
+
} | {
|
|
178
|
+
type: string;
|
|
179
|
+
items: {
|
|
180
|
+
type: string;
|
|
181
|
+
additionalProperties: {
|
|
182
|
+
type: string;
|
|
183
|
+
};
|
|
184
|
+
required: string[];
|
|
185
|
+
properties: {
|
|
186
|
+
name: {
|
|
187
|
+
type: string;
|
|
188
|
+
};
|
|
189
|
+
type: {
|
|
190
|
+
type: string;
|
|
191
|
+
};
|
|
192
|
+
counters: {
|
|
193
|
+
type: string;
|
|
194
|
+
additionalProperties: boolean;
|
|
195
|
+
required: never[];
|
|
196
|
+
properties: {
|
|
197
|
+
include: {
|
|
198
|
+
type: string;
|
|
199
|
+
items: {
|
|
200
|
+
type: string;
|
|
201
|
+
};
|
|
202
|
+
};
|
|
203
|
+
exclude: {
|
|
204
|
+
type: string;
|
|
205
|
+
items: {
|
|
206
|
+
type: string;
|
|
207
|
+
};
|
|
208
|
+
};
|
|
209
|
+
};
|
|
210
|
+
};
|
|
211
|
+
context: {
|
|
212
|
+
type: string;
|
|
213
|
+
};
|
|
214
|
+
};
|
|
215
|
+
};
|
|
216
|
+
})[];
|
|
217
|
+
};
|
|
140
218
|
border: {
|
|
141
219
|
type: string;
|
|
142
220
|
enum: string[];
|
|
@@ -11,4 +11,3 @@ export declare const getCustomHeaderTypes: (customBlocks?: CustomConfig) => stri
|
|
|
11
11
|
export declare const getOrderedBlocks: (blocks: Block[], headerBlockTypes?: string[]) => Block[];
|
|
12
12
|
export declare const getHeaderBlock: (blocks: Block[], headerBlockTypes?: string[]) => Block | undefined;
|
|
13
13
|
export declare const getShareLink: (url: string, type: PCShareSocialNetwork, title?: string, text?: string) => string | undefined;
|
|
14
|
-
export declare const getBlockIndexFromId: (blockId?: string) => number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.getShareLink = exports.getHeaderBlock = exports.getOrderedBlocks = exports.getCustomHeaderTypes = exports.getCustomSubBlockTypes = exports.getCustomItems = exports.getCustomBlockTypes = exports.getBlockKey = exports.getHeaderTag = void 0;
|
|
4
4
|
const models_1 = require("../models");
|
|
5
5
|
function getHeaderTag(size) {
|
|
6
6
|
switch (size) {
|
|
@@ -83,5 +83,3 @@ const getShareLink = (url, type, title, text) => {
|
|
|
83
83
|
}
|
|
84
84
|
};
|
|
85
85
|
exports.getShareLink = getShareLink;
|
|
86
|
-
const getBlockIndexFromId = (blockId) => { var _a; return Number((_a = blockId === null || blockId === void 0 ? void 0 : blockId.split('-')) === null || _a === void 0 ? void 0 : _a.slice(-1).pop()); };
|
|
87
|
-
exports.getBlockIndexFromId = getBlockIndexFromId;
|