@gravity-ui/page-constructor 6.9.1 → 6.10.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/build/cjs/blocks/CardLayout/schema.d.ts +76 -0
- package/build/cjs/blocks/ContentLayout/schema.d.ts +76 -0
- package/build/cjs/components/BackgroundImage/BackgroundImage.js +2 -2
- package/build/cjs/components/BackgroundImage/BackgroundImage.js.map +1 -1
- package/build/cjs/components/Image/Image.d.ts +3 -1
- package/build/cjs/components/Image/Image.js +25 -8
- package/build/cjs/components/Image/Image.js.map +1 -1
- package/build/cjs/components/Image/schema.d.ts +95 -0
- package/build/cjs/components/Image/schema.js +15 -0
- package/build/cjs/components/Image/schema.js.map +1 -1
- package/build/cjs/models/constructor-items/common.d.ts +13 -6
- package/build/cjs/models/constructor-items/common.js +8 -1
- package/build/cjs/models/constructor-items/common.js.map +1 -1
- package/build/cjs/schema/constants.d.ts +19 -0
- package/build/cjs/sub-blocks/BackgroundCard/schema.d.ts +19 -0
- package/build/cjs/text-transform/config.js +5 -0
- package/build/cjs/text-transform/config.js.map +1 -1
- package/build/esm/blocks/CardLayout/schema.d.ts +76 -0
- package/build/esm/blocks/ContentLayout/schema.d.ts +76 -0
- package/build/esm/components/BackgroundImage/BackgroundImage.js +2 -2
- package/build/esm/components/BackgroundImage/BackgroundImage.js.map +1 -1
- package/build/esm/components/Image/Image.d.ts +3 -1
- package/build/esm/components/Image/Image.js +24 -8
- package/build/esm/components/Image/Image.js.map +1 -1
- package/build/esm/components/Image/schema.d.ts +95 -0
- package/build/esm/components/Image/schema.js +15 -0
- package/build/esm/components/Image/schema.js.map +1 -1
- package/build/esm/models/constructor-items/common.d.ts +13 -6
- package/build/esm/models/constructor-items/common.js +7 -0
- package/build/esm/models/constructor-items/common.js.map +1 -1
- package/build/esm/schema/constants.d.ts +19 -0
- package/build/esm/sub-blocks/BackgroundCard/schema.d.ts +19 -0
- package/build/esm/text-transform/config.js +5 -0
- package/build/esm/text-transform/config.js.map +1 -1
- package/package.json +1 -1
- package/schema/index.js +1 -1
- package/server/models/constructor-items/common.d.ts +13 -6
- package/server/models/constructor-items/common.js +8 -1
- package/server/text-transform/config.js +5 -0
- package/widget/index.js +1 -1
|
@@ -31,6 +31,25 @@ export declare const ImageDeviceProps: {
|
|
|
31
31
|
type: string;
|
|
32
32
|
enum: string[];
|
|
33
33
|
};
|
|
34
|
+
hide: {
|
|
35
|
+
oneOf: ({
|
|
36
|
+
type: string;
|
|
37
|
+
properties?: undefined;
|
|
38
|
+
} | {
|
|
39
|
+
type: string;
|
|
40
|
+
properties: {
|
|
41
|
+
mobile: {
|
|
42
|
+
type: string;
|
|
43
|
+
};
|
|
44
|
+
tablet: {
|
|
45
|
+
type: string;
|
|
46
|
+
};
|
|
47
|
+
desktop: {
|
|
48
|
+
type: string;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
})[];
|
|
52
|
+
};
|
|
34
53
|
};
|
|
35
54
|
};
|
|
36
55
|
export declare const ImageBaseObjectProps: {
|
|
@@ -75,6 +94,25 @@ export declare const ImageBaseObjectProps: {
|
|
|
75
94
|
type: string;
|
|
76
95
|
enum: string[];
|
|
77
96
|
};
|
|
97
|
+
hide: {
|
|
98
|
+
oneOf: ({
|
|
99
|
+
type: string;
|
|
100
|
+
properties?: undefined;
|
|
101
|
+
} | {
|
|
102
|
+
type: string;
|
|
103
|
+
properties: {
|
|
104
|
+
mobile: {
|
|
105
|
+
type: string;
|
|
106
|
+
};
|
|
107
|
+
tablet: {
|
|
108
|
+
type: string;
|
|
109
|
+
};
|
|
110
|
+
desktop: {
|
|
111
|
+
type: string;
|
|
112
|
+
};
|
|
113
|
+
};
|
|
114
|
+
})[];
|
|
115
|
+
};
|
|
78
116
|
};
|
|
79
117
|
};
|
|
80
118
|
export declare const ImageObjectProps: {
|
|
@@ -120,6 +158,25 @@ export declare const ImageObjectProps: {
|
|
|
120
158
|
type: string;
|
|
121
159
|
enum: string[];
|
|
122
160
|
};
|
|
161
|
+
hide: {
|
|
162
|
+
oneOf: ({
|
|
163
|
+
type: string;
|
|
164
|
+
properties?: undefined;
|
|
165
|
+
} | {
|
|
166
|
+
type: string;
|
|
167
|
+
properties: {
|
|
168
|
+
mobile: {
|
|
169
|
+
type: string;
|
|
170
|
+
};
|
|
171
|
+
tablet: {
|
|
172
|
+
type: string;
|
|
173
|
+
};
|
|
174
|
+
desktop: {
|
|
175
|
+
type: string;
|
|
176
|
+
};
|
|
177
|
+
};
|
|
178
|
+
})[];
|
|
179
|
+
};
|
|
123
180
|
};
|
|
124
181
|
};
|
|
125
182
|
export declare const ImageProps: {
|
|
@@ -193,6 +250,25 @@ export declare const BackgroundImageProps: {
|
|
|
193
250
|
type: string;
|
|
194
251
|
enum: string[];
|
|
195
252
|
};
|
|
253
|
+
hide: {
|
|
254
|
+
oneOf: ({
|
|
255
|
+
type: string;
|
|
256
|
+
properties?: undefined;
|
|
257
|
+
} | {
|
|
258
|
+
type: string;
|
|
259
|
+
properties: {
|
|
260
|
+
mobile: {
|
|
261
|
+
type: string;
|
|
262
|
+
};
|
|
263
|
+
tablet: {
|
|
264
|
+
type: string;
|
|
265
|
+
};
|
|
266
|
+
desktop: {
|
|
267
|
+
type: string;
|
|
268
|
+
};
|
|
269
|
+
};
|
|
270
|
+
})[];
|
|
271
|
+
};
|
|
196
272
|
};
|
|
197
273
|
} | {
|
|
198
274
|
optionName: string;
|
|
@@ -227,6 +303,25 @@ export declare const BackgroundImageProps: {
|
|
|
227
303
|
type: string;
|
|
228
304
|
enum: string[];
|
|
229
305
|
};
|
|
306
|
+
hide: {
|
|
307
|
+
oneOf: ({
|
|
308
|
+
type: string;
|
|
309
|
+
properties?: undefined;
|
|
310
|
+
} | {
|
|
311
|
+
type: string;
|
|
312
|
+
properties: {
|
|
313
|
+
mobile: {
|
|
314
|
+
type: string;
|
|
315
|
+
};
|
|
316
|
+
tablet: {
|
|
317
|
+
type: string;
|
|
318
|
+
};
|
|
319
|
+
desktop: {
|
|
320
|
+
type: string;
|
|
321
|
+
};
|
|
322
|
+
};
|
|
323
|
+
})[];
|
|
324
|
+
};
|
|
230
325
|
};
|
|
231
326
|
})[];
|
|
232
327
|
};
|
|
@@ -16,6 +16,21 @@ const ImageBase = {
|
|
|
16
16
|
type: 'string',
|
|
17
17
|
enum: ['high', 'low', 'auto'],
|
|
18
18
|
},
|
|
19
|
+
hide: {
|
|
20
|
+
oneOf: [
|
|
21
|
+
{
|
|
22
|
+
type: 'boolean',
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
type: 'object',
|
|
26
|
+
properties: {
|
|
27
|
+
mobile: { type: 'boolean' },
|
|
28
|
+
tablet: { type: 'boolean' },
|
|
29
|
+
desktop: { type: 'boolean' },
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
],
|
|
33
|
+
},
|
|
19
34
|
};
|
|
20
35
|
const StyleBase = {
|
|
21
36
|
type: 'object',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"../../../../src","sources":["components/Image/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,yCAAsC;AAE3D,MAAM,CAAC,MAAM,eAAe,GACxB,kGAAkG,CAAC;AAEvG,MAAM,SAAS,GAAG;IACd,GAAG,EAAE;QACD,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,MAAM;KACtB;IACD,eAAe,EAAE;QACb,IAAI,EAAE,SAAS;KAClB;IACD,OAAO,EAAE;QACL,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC;KAC1B;IACD,aAAa,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC;KAChC;CACJ,CAAC;AAEF,MAAM,SAAS,GAAG;IACd,IAAI,EAAE,QAAQ;IACd,oBAAoB,EAAE,KAAK;IAC3B,QAAQ,EAAE,EAAE;IACZ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,SAAS;SACxB,CAAC;QACF,YAAY,CAAC;YACT,GAAG,gBAAgB;YACnB,UAAU,EAAE,gBAAgB;SAC/B,CAAC;QACF;YACI,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,YAAY,CAAC;gBAChB,GAAG,gBAAgB;aACtB,CAAC;YACF,UAAU,EAAE,cAAc;SAC7B;QACD;YACI,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,YAAY,CAAC;gBAChB,GAAG,gBAAgB;aACtB,CAAC;YACF,UAAU,EAAE,qBAAqB;SACpC;KACJ;CACJ,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAChC,KAAK,EAAE;QACH;YACI,GAAG,oBAAoB;YACvB,UAAU,EAAE,SAAS;SACxB;QACD;YACI,GAAG,gBAAgB;YACnB,UAAU,EAAE,gBAAgB;SAC/B;KACJ;CACJ,CAAC","sourcesContent":["import {filteredItem} from '../../schema/validators/utils';\n\nexport const imageUrlPattern =\n '^((http[s]?|ftp):\\\\/)?\\\\/?([^:\\\\/\\\\s]+)((\\\\/\\\\w+)*\\\\/)([\\\\w\\\\-\\\\.]+[^#?\\\\s]+)(.*)?(#[\\\\w\\\\-]+)?$';\n\nconst ImageBase = {\n alt: {\n type: 'string',\n contentType: 'text',\n },\n disableCompress: {\n type: 'boolean',\n },\n loading: {\n type: 'string',\n enum: ['eager', 'lazy'],\n },\n fetchPriority: {\n type: 'string',\n enum: ['high', 'low', 'auto'],\n },\n};\n\nconst StyleBase = {\n type: 'object',\n additionalProperties: false,\n required: [],\n properties: {\n backgroundColor: {type: 'string'},\n height: {type: ['string', 'number']},\n width: {type: ['string', 'number']},\n color: {type: 'string'},\n },\n};\n\nexport const ImageDeviceProps = {\n type: 'object',\n additionalProperties: false,\n required: ['desktop', 'mobile'],\n properties: {\n ...ImageBase,\n desktop: {type: 'string', pattern: imageUrlPattern},\n tablet: {\n type: 'string',\n pattern: imageUrlPattern,\n },\n mobile: {\n type: 'string',\n pattern: imageUrlPattern,\n },\n },\n};\n\nexport const ImageBaseObjectProps = {\n type: 'object',\n additionalProperties: false,\n properties: {\n ...ImageBase,\n src: {\n type: 'string',\n pattern: imageUrlPattern,\n },\n style: StyleBase,\n },\n};\n\nexport const ImageObjectProps = {\n ...ImageBaseObjectProps,\n required: ['src'],\n};\n\nexport const ImageProps = {\n oneOf: [\n {\n type: 'string',\n pattern: imageUrlPattern,\n optionName: 'url',\n },\n filteredItem({\n ...ImageObjectProps,\n optionName: 'options',\n }),\n filteredItem({\n ...ImageDeviceProps,\n optionName: 'device options',\n }),\n {\n type: 'array',\n items: filteredItem({\n ...ImageObjectProps,\n }),\n optionName: 'options list',\n },\n {\n type: 'array',\n items: filteredItem({\n ...ImageDeviceProps,\n }),\n optionName: 'device options list',\n },\n ],\n};\n\nexport const BackgroundImageProps = {\n anyOf: [\n {\n ...ImageBaseObjectProps,\n optionName: 'options',\n },\n {\n ...ImageDeviceProps,\n optionName: 'device options',\n },\n ],\n};\n"]}
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"../../../../src","sources":["components/Image/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,yCAAsC;AAE3D,MAAM,CAAC,MAAM,eAAe,GACxB,kGAAkG,CAAC;AAEvG,MAAM,SAAS,GAAG;IACd,GAAG,EAAE;QACD,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,MAAM;KACtB;IACD,eAAe,EAAE;QACb,IAAI,EAAE,SAAS;KAClB;IACD,OAAO,EAAE;QACL,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC;KAC1B;IACD,aAAa,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC;KAChC;IACD,IAAI,EAAE;QACF,KAAK,EAAE;YACH;gBACI,IAAI,EAAE,SAAS;aAClB;YACD;gBACI,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;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M,CAAC,MAAM,gBAAgB,GAAG;IAC5B,GAAG,oBAAoB;IACvB,QAAQ,EAAE,CAAC,KAAK,CAAC;CACpB,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG;IACtB,KAAK,EAAE;QACH;YACI,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,eAAe;YACxB,UAAU,EAAE,KAAK;SACpB;QACD,YAAY,CAAC;YACT,GAAG,gBAAgB;YACnB,UAAU,EAAE,SAAS;SACxB,CAAC;QACF,YAAY,CAAC;YACT,GAAG,gBAAgB;YACnB,UAAU,EAAE,gBAAgB;SAC/B,CAAC;QACF;YACI,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,YAAY,CAAC;gBAChB,GAAG,gBAAgB;aACtB,CAAC;YACF,UAAU,EAAE,cAAc;SAC7B;QACD;YACI,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,YAAY,CAAC;gBAChB,GAAG,gBAAgB;aACtB,CAAC;YACF,UAAU,EAAE,qBAAqB;SACpC;KACJ;CACJ,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAChC,KAAK,EAAE;QACH;YACI,GAAG,oBAAoB;YACvB,UAAU,EAAE,SAAS;SACxB;QACD;YACI,GAAG,gBAAgB;YACnB,UAAU,EAAE,gBAAgB;SAC/B;KACJ;CACJ,CAAC","sourcesContent":["import {filteredItem} from '../../schema/validators/utils';\n\nexport const imageUrlPattern =\n '^((http[s]?|ftp):\\\\/)?\\\\/?([^:\\\\/\\\\s]+)((\\\\/\\\\w+)*\\\\/)([\\\\w\\\\-\\\\.]+[^#?\\\\s]+)(.*)?(#[\\\\w\\\\-]+)?$';\n\nconst ImageBase = {\n alt: {\n type: 'string',\n contentType: 'text',\n },\n disableCompress: {\n type: 'boolean',\n },\n loading: {\n type: 'string',\n enum: ['eager', 'lazy'],\n },\n fetchPriority: {\n type: 'string',\n enum: ['high', 'low', 'auto'],\n },\n hide: {\n oneOf: [\n {\n type: 'boolean',\n },\n {\n type: 'object',\n properties: {\n mobile: {type: 'boolean'},\n tablet: {type: 'boolean'},\n desktop: {type: 'boolean'},\n },\n },\n ],\n },\n};\n\nconst StyleBase = {\n type: 'object',\n additionalProperties: false,\n required: [],\n properties: {\n backgroundColor: {type: 'string'},\n height: {type: ['string', 'number']},\n width: {type: ['string', 'number']},\n color: {type: 'string'},\n },\n};\n\nexport const ImageDeviceProps = {\n type: 'object',\n additionalProperties: false,\n required: ['desktop', 'mobile'],\n properties: {\n ...ImageBase,\n desktop: {type: 'string', pattern: imageUrlPattern},\n tablet: {\n type: 'string',\n pattern: imageUrlPattern,\n },\n mobile: {\n type: 'string',\n pattern: imageUrlPattern,\n },\n },\n};\n\nexport const ImageBaseObjectProps = {\n type: 'object',\n additionalProperties: false,\n properties: {\n ...ImageBase,\n src: {\n type: 'string',\n pattern: imageUrlPattern,\n },\n style: StyleBase,\n },\n};\n\nexport const ImageObjectProps = {\n ...ImageBaseObjectProps,\n required: ['src'],\n};\n\nexport const ImageProps = {\n oneOf: [\n {\n type: 'string',\n pattern: imageUrlPattern,\n optionName: 'url',\n },\n filteredItem({\n ...ImageObjectProps,\n optionName: 'options',\n }),\n filteredItem({\n ...ImageDeviceProps,\n optionName: 'device options',\n }),\n {\n type: 'array',\n items: filteredItem({\n ...ImageObjectProps,\n }),\n optionName: 'options list',\n },\n {\n type: 'array',\n items: filteredItem({\n ...ImageDeviceProps,\n }),\n optionName: 'device options list',\n },\n ],\n};\n\nexport const BackgroundImageProps = {\n anyOf: [\n {\n ...ImageBaseObjectProps,\n optionName: 'options',\n },\n {\n ...ImageDeviceProps,\n optionName: 'device options',\n },\n ],\n};\n"]}
|
|
@@ -100,7 +100,12 @@ interface LoopProps {
|
|
|
100
100
|
start: number;
|
|
101
101
|
end?: number;
|
|
102
102
|
}
|
|
103
|
-
export
|
|
103
|
+
export declare enum Device {
|
|
104
|
+
Desktop = "desktop",
|
|
105
|
+
Mobile = "mobile",
|
|
106
|
+
Tablet = "tablet"
|
|
107
|
+
}
|
|
108
|
+
export interface ImageInfoProps extends Pick<React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, 'aria-describedby' | 'loading'>, ImageDevicesVisibleProps {
|
|
104
109
|
alt?: string;
|
|
105
110
|
fetchPriority?: 'high' | 'low' | 'auto';
|
|
106
111
|
disableCompress?: boolean;
|
|
@@ -109,16 +114,18 @@ export interface ImageObjectProps extends ImageInfoProps {
|
|
|
109
114
|
src: string;
|
|
110
115
|
}
|
|
111
116
|
export interface ImageDeviceProps extends ImageInfoProps {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
117
|
+
[Device.Desktop]: string;
|
|
118
|
+
[Device.Mobile]: string;
|
|
119
|
+
[Device.Tablet]?: string;
|
|
120
|
+
}
|
|
121
|
+
export interface ImageDevicesVisibleProps {
|
|
122
|
+
hide?: boolean | Partial<Record<Device, boolean>>;
|
|
115
123
|
}
|
|
116
124
|
export type ImageProps = string | ImageObjectProps | ImageDeviceProps;
|
|
117
125
|
export type ThemedImage = ThemeSupporting<ImageProps>;
|
|
118
|
-
export interface BackgroundImageProps extends React.HTMLProps<HTMLDivElement>, Partial<ImageDeviceProps>, Partial<ImageObjectProps>, QAProps {
|
|
126
|
+
export interface BackgroundImageProps extends React.HTMLProps<HTMLDivElement>, Partial<ImageDeviceProps>, Partial<ImageObjectProps>, QAProps, ImageDevicesVisibleProps {
|
|
119
127
|
style?: React.CSSProperties;
|
|
120
128
|
imageClassName?: string;
|
|
121
|
-
hide?: boolean;
|
|
122
129
|
}
|
|
123
130
|
export interface MediaVideoProps extends AnalyticsEventsBase {
|
|
124
131
|
src: string[];
|
|
@@ -53,4 +53,11 @@ export var QuoteType;
|
|
|
53
53
|
QuoteType["Chevron"] = "chevron";
|
|
54
54
|
QuoteType["EnglishDouble"] = "english-double";
|
|
55
55
|
})(QuoteType || (QuoteType = {}));
|
|
56
|
+
// images
|
|
57
|
+
export var Device;
|
|
58
|
+
(function (Device) {
|
|
59
|
+
Device["Desktop"] = "desktop";
|
|
60
|
+
Device["Mobile"] = "mobile";
|
|
61
|
+
Device["Tablet"] = "tablet";
|
|
62
|
+
})(Device || (Device = {}));
|
|
56
63
|
//# sourceMappingURL=common.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.js","sourceRoot":"../../../../src","sources":["models/constructor-items/common.ts"],"names":[],"mappings":"AAOA,QAAQ;AACR,MAAM,CAAN,IAAY,UAGX;AAHD,WAAY,UAAU;IAClB,+BAAiB,CAAA;IACjB,2BAAa,CAAA;AACjB,CAAC,EAHW,UAAU,KAAV,UAAU,QAGrB;AAED,MAAM,CAAN,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IACxB,+CAA2B,CAAA;IAC3B,yCAAqB,CAAA;AACzB,CAAC,EAHW,gBAAgB,KAAhB,gBAAgB,QAG3B;AAED,MAAM,CAAN,IAAY,eAMX;AAND,WAAY,eAAe;IACvB,gCAAa,CAAA;IACb,kCAAe,CAAA;IACf,oCAAiB,CAAA;IACjB,oCAAiB,CAAA;IACjB,8BAAW,CAAA;AACf,CAAC,EANW,eAAe,KAAf,eAAe,QAM1B;AAED,MAAM,CAAN,IAAY,cAGX;AAHD,WAAY,cAAc;IACtB,qCAAmB,CAAA;IACnB,+BAAa,CAAA;AACjB,CAAC,EAHW,cAAc,KAAd,cAAc,QAGzB;AAED,MAAM,CAAN,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IACxB,iCAAa,CAAA;IACb,iCAAa,CAAA;AACjB,CAAC,EAHW,gBAAgB,KAAhB,gBAAgB,QAG3B;AAED,MAAM,CAAN,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC1B,yDAAmC,CAAA;IACnC,oEAA8C,CAAA;AAClD,CAAC,EAHW,kBAAkB,KAAlB,kBAAkB,QAG7B;AAED,MAAM,CAAN,IAAY,+BAIX;AAJD,WAAY,+BAA+B;IACvC,gDAAa,CAAA;IACb,kDAAe,CAAA;IACf,oDAAiB,CAAA;AACrB,CAAC,EAJW,+BAA+B,KAA/B,+BAA+B,QAI1C;AAED,MAAM,CAAN,IAAY,cAGX;AAHD,WAAY,cAAc;IACtB,qCAAmB,CAAA;IACnB,mCAAiB,CAAA;AACrB,CAAC,EAHW,cAAc,KAAd,cAAc,QAGzB;AAED,MAAM,CAAN,IAAY,sBAGX;AAHD,WAAY,sBAAsB;IAC9B,6CAAmB,CAAA;IACnB,2CAAiB,CAAA;AACrB,CAAC,EAHW,sBAAsB,KAAtB,sBAAsB,QAGjC;AAED,MAAM,CAAN,IAAY,SAGX;AAHD,WAAY,SAAS;IACjB,gCAAmB,CAAA;IACnB,6CAAgC,CAAA;AACpC,CAAC,EAHW,SAAS,KAAT,SAAS,QAGpB","sourcesContent":["import * as React from 'react';\n\nimport {ButtonView, ButtonProps as UikitButtonProps} from '@gravity-ui/uikit';\n\nimport {ThemeSupporting} from '../../utils';\nimport {AnalyticsEventsBase, AnalyticsEventsProp, ClassNameProps, QAProps} from '../common';\n\n// enums\nexport enum AuthorType {\n Column = 'column',\n Line = 'line',\n}\n\nexport enum PriceDetailsType {\n MARKED_LIST = 'marked-list',\n SETTINGS = 'settings',\n}\n\nexport enum PriceLabelColor {\n BLUE = 'blue',\n GREEN = 'green',\n YELLOW = 'yellow',\n PURPLE = 'purple',\n RED = 'red',\n}\n\nexport enum PlayButtonType {\n Default = 'default',\n Text = 'text',\n}\n\nexport enum PlayButtonThemes {\n Blue = 'blue',\n Grey = 'grey',\n}\n\nexport enum CustomControlsType {\n WithMuteButton = 'with-mute-button',\n WithPlayPauseButton = 'with-play-pause-button',\n}\n\nexport enum CustomControlsButtonPositioning {\n Left = 'left',\n Right = 'right',\n Center = 'center',\n}\n\nexport enum MediaVideoType {\n Default = 'default',\n Player = 'player',\n}\n\nexport enum MediaVideoControlsType {\n Default = 'default',\n Custom = 'custom',\n}\n\nexport enum QuoteType {\n Chevron = 'chevron', // « »\n EnglishDouble = 'english-double', // “ ”\n}\n\n// types\nexport type TextTheme = 'light' | 'dark';\nexport type TextSize = 'xs' | 's' | 'sm' | 'm' | 'l';\nexport type DividerSize = '0' | 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl' | 'xxxl';\nexport type HeaderWidth = 's' | 'm' | 'l';\nexport type HeaderImageSize = 's' | 'm';\nexport type HeaderOffset = 'default' | 'large';\nexport type Justify = 'start' | 'center' | 'end';\nexport type ColumnsCount = 1 | 2 | 3 | 4;\nexport type LegendTableMarkerType = 'disk' | 'tick';\nexport type LinkTheme = 'file-link' | 'normal' | 'back' | 'underline';\nexport type MediaDirection = 'media-content' | 'content-media';\nexport type PriceDescriptionColor = 'cornflower' | 'black';\nexport type ContentSize = 's' | 'm' | 'l';\nexport type ContentTextSize = 's' | 'm' | 'l';\nexport type ContentTheme = 'default' | 'dark' | 'light';\nexport type FileLinkType = 'vertical' | 'horizontal';\nexport type ImageCardMargins = 's' | 'm';\nexport type LayoutItemContentMargin = 'm' | 'l';\n\n// modifiers\nexport interface Themable {\n theme?: TextTheme;\n}\n\nexport interface Justifyable {\n justify?: Justify;\n}\n\nexport interface Stylable {\n className?: string;\n}\n\nexport interface Animatable {\n animated?: boolean;\n}\n\nexport interface Tabbable {\n tabIndex?: number;\n}\n\nexport interface Roleable {\n role?: React.AriaRole;\n}\n\nexport interface AriaProps {\n ariaProps?: React.AriaAttributes;\n}\n\n//common props\nexport interface Background {\n image?: string;\n color?: string;\n}\n\nexport interface AnchorProps {\n text: string;\n url: string;\n}\n\n/**\n * @deprecated Component VideoBlock will be deleted, which uses this logic\n */\ninterface LoopProps {\n start: number;\n end?: number;\n}\n\n// images\n\nexport interface ImageInfoProps\n extends Pick<\n React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>,\n 'aria-describedby' | 'loading'\n > {\n alt?: string;\n fetchPriority?: 'high' | 'low' | 'auto';\n disableCompress?: boolean;\n}\n\nexport interface ImageObjectProps extends ImageInfoProps {\n src: string;\n}\n\nexport interface ImageDeviceProps extends ImageInfoProps {\n desktop: string;\n mobile: string;\n tablet?: string;\n}\n\nexport type ImageProps = string | ImageObjectProps | ImageDeviceProps;\nexport type ThemedImage = ThemeSupporting<ImageProps>;\n\nexport interface BackgroundImageProps\n extends React.HTMLProps<HTMLDivElement>,\n Partial<ImageDeviceProps>,\n Partial<ImageObjectProps>,\n QAProps {\n style?: React.CSSProperties;\n imageClassName?: string;\n hide?: boolean;\n}\n\n//components props\nexport interface MediaVideoProps extends AnalyticsEventsBase {\n src: string[];\n type?: MediaVideoType;\n loop?: LoopProps | boolean;\n muted?: boolean;\n autoplay?: boolean;\n elapsedTime?: number;\n playButton?: PlayButtonProps;\n controls?: MediaVideoControlsType;\n customControlsOptions?: CustomControlsOptions;\n ariaLabel?: string;\n contain?: boolean;\n}\n\n// links\nexport interface LinkProps extends AnalyticsEventsBase, Stylable, Tabbable {\n url: string;\n urlTitle?: string;\n text?: string;\n textSize?: TextSize;\n theme?: LinkTheme;\n colorTheme?: TextTheme;\n arrow?: boolean;\n target?: string;\n extraProps?: React.HTMLProps<HTMLAnchorElement>;\n}\n\nexport interface FileLinkProps extends ClassNameProps, Tabbable {\n href: string;\n text: React.ReactNode;\n type?: FileLinkType;\n textSize?: TextSize;\n theme?: ContentTheme;\n urlTitle?: string;\n onClick?: () => void;\n extraProps?: React.HTMLProps<HTMLAnchorElement>;\n}\n\n// buttons\nexport type ButtonTheme =\n | ButtonView\n | 'github'\n | 'app-store'\n | 'google-play'\n | 'scale'\n | 'monochrome';\n\nexport interface ButtonProps\n extends AnalyticsEventsBase,\n Pick<UikitButtonProps, 'size' | 'width' | 'extraProps'> {\n text: string;\n url: string;\n urlTitle?: string;\n primary?: boolean;\n theme?: ButtonTheme;\n img?: ButtonImageProps | string;\n target?: string;\n}\n\nexport type ButtonImagePosition = 'left' | 'right';\n\nexport interface ButtonImageProps {\n url: string;\n position?: ButtonImagePosition;\n alt?: string;\n}\n\nexport interface CustomControlsOptions {\n type?: CustomControlsType;\n muteButtonShown?: boolean;\n positioning?: CustomControlsButtonPositioning;\n}\n\nexport interface PlayButtonProps extends ClassNameProps {\n type?: PlayButtonType;\n theme?: PlayButtonThemes;\n text?: string;\n}\n\nexport type ThemedMediaVideoProps = ThemeSupporting<MediaVideoProps>;\n\nexport interface MediaComponentVideoProps extends AnalyticsEventsBase {\n video: MediaVideoProps;\n height?: number;\n ratio?: number | 'auto';\n previewImg?: string;\n}\n\nexport interface MediaComponentVideoIframeProps {\n videoIframe: string;\n}\n\nexport interface MediaComponentYoutubeProps {\n youtube: string;\n previewImg?: string;\n fullscreen?: boolean;\n}\n\nexport interface MediaComponentImageProps {\n image: ImageProps | ImageProps[] | ImageDeviceProps;\n video?: MediaVideoProps;\n parallax?: boolean;\n height?: number;\n disableImageSliderForArrayInput?: boolean;\n}\n\nexport interface MediaComponentDataLensProps {\n dataLens: DataLensProps;\n}\n\nexport interface MediaComponentIframeProps {\n iframe: IframeProps;\n margins?: boolean;\n}\n\nexport interface MediaProps\n extends Animatable,\n Partial<MediaComponentDataLensProps>,\n Partial<MediaComponentYoutubeProps>,\n Partial<MediaComponentVideoIframeProps>,\n Partial<MediaComponentImageProps>,\n Partial<MediaComponentIframeProps>,\n Partial<MediaComponentVideoProps> {\n color?: string;\n videoMicrodata?: {\n name?: string;\n description?: string;\n duration?: string;\n uploadDate?: string;\n contentUrl?: string;\n thumbnailUrl?: string;\n };\n}\n\nexport interface BackgroundMediaProps extends MediaProps, Animatable, QAProps {\n fullWidthMedia?: boolean;\n className?: string;\n mediaClassName?: string;\n}\n\nexport type Coordinate = number[];\n\nexport interface MapBaseProps {\n zoom?: number;\n className?: string;\n}\n\nexport interface GMapProps extends MapBaseProps {\n address: string;\n}\n\nexport interface YMapProps extends MapBaseProps {\n markers: YMapMarker[];\n id: string;\n}\n\nexport interface YMapMarker {\n address?: string;\n coordinate?: Coordinate;\n label?: YMapMarkerLabel;\n}\n\nexport interface YMapMarkerLabel {\n iconCaption?: string;\n iconContent?: string;\n iconColor?: string;\n preset?: string;\n}\n\nexport type MapProps = GMapProps | YMapProps;\n\nexport type ThemedMediaProps = ThemeSupporting<MediaProps>;\n\nexport interface DataLensObjectProps {\n id: string;\n theme: 'dark' | 'light';\n}\n\nexport interface IframeProps {\n src: string;\n width?: number;\n height?: number;\n title?: string;\n name?: string;\n}\n\nexport type DataLensProps = string | DataLensObjectProps;\n\nexport interface AuthorItem {\n firstName: string;\n secondName: string;\n description?: string;\n avatar?: ThemeSupporting<ImageProps> | JSX.Element;\n}\n\nexport interface HeaderBreadCrumbsProps extends ClassNameProps {\n items: {\n url: string;\n text: React.ReactNode;\n }[];\n theme?: TextTheme;\n analyticsEvents?: AnalyticsEventsProp;\n}\n\nexport interface TitleItemProps extends Justifyable, TitleItemBaseProps {\n navTitle?: string;\n anchor?: string;\n}\n\nexport interface TitleItemBaseProps {\n text: string;\n textSize?: TextSize;\n url?: string;\n urlTitle?: string;\n custom?: string | React.ReactNode;\n onClick?: () => void;\n}\n\nexport type MediaView = 'fit' | 'full';\n\n// card\nexport type MediaBorder = 'shadow' | 'line' | 'none';\nexport type CardBorder = MediaBorder;\nexport type ControlPosition = 'content' | 'footer';\n\nexport interface CardBaseProps {\n border?: CardBorder;\n}\n\nexport type CardLayoutProps = {\n controlPosition?: ControlPosition;\n};\n\n//price\nexport interface PriceDescriptionProps {\n title: string;\n detailedTitle?: string;\n description: string;\n label?: {\n color: PriceLabelColor;\n text?: string;\n size?: TextSize;\n };\n}\n\nexport interface PriceDetailsSettingsProps {\n title: string;\n description: string;\n}\n\nexport interface PriceDetailsListProps {\n text: string;\n}\n\nexport interface PriceDetailsProps {\n items?: PriceDetailsSettingsProps[] | PriceDetailsListProps[];\n}\n\nexport interface PriceItemProps\n extends PriceDetailsProps,\n PriceDescriptionProps,\n AnalyticsEventsBase {}\n\nexport interface PriceFoldableDetailsProps {\n title: string;\n size?: TextSize;\n titleColor?: PriceDescriptionColor;\n}\n\n/** @deprecated */\nexport interface PriceDetailedProps extends CardBaseProps {\n items: PriceItemProps[];\n description?: {\n titleSize?: TextSize;\n descriptionSize?: TextSize;\n titleColor?: PriceDescriptionColor;\n };\n details?: {\n titleSize?: TextSize;\n descriptionSize?: TextSize;\n };\n priceType?: PriceDetailsType;\n numberGroupItems?: 3 | 4 | 5;\n isCombined?: boolean;\n useMixedView?: boolean;\n foldable?: PriceFoldableDetailsProps;\n labelsDefaultText?: Record<PriceLabelColor, string>;\n}\n\nexport interface AuthorProps extends QAProps {\n author: AuthorItem;\n className?: string;\n authorContainerClassName?: string;\n type?: AuthorType;\n theme?: ContentTheme;\n}\n\nexport interface TitleProps {\n title?: TitleItemProps | string;\n subtitle?: string;\n}\n\nexport interface YandexFormProps extends AnalyticsEventsBase {\n id: number | string;\n containerId?: string;\n theme?: string;\n className?: string;\n headerHeight?: number;\n customFormOrigin?: string;\n customFormSection?: string;\n params?: {[key: string]: string};\n\n onSubmit?: () => void;\n onLoad?: () => void;\n}\n\nexport interface WithBorder {\n border?: MediaBorder;\n /**\n * @deprecated use custom class for media-component\n */\n disableShadow?: boolean;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"../../../../src","sources":["models/constructor-items/common.ts"],"names":[],"mappings":"AAOA,QAAQ;AACR,MAAM,CAAN,IAAY,UAGX;AAHD,WAAY,UAAU;IAClB,+BAAiB,CAAA;IACjB,2BAAa,CAAA;AACjB,CAAC,EAHW,UAAU,KAAV,UAAU,QAGrB;AAED,MAAM,CAAN,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IACxB,+CAA2B,CAAA;IAC3B,yCAAqB,CAAA;AACzB,CAAC,EAHW,gBAAgB,KAAhB,gBAAgB,QAG3B;AAED,MAAM,CAAN,IAAY,eAMX;AAND,WAAY,eAAe;IACvB,gCAAa,CAAA;IACb,kCAAe,CAAA;IACf,oCAAiB,CAAA;IACjB,oCAAiB,CAAA;IACjB,8BAAW,CAAA;AACf,CAAC,EANW,eAAe,KAAf,eAAe,QAM1B;AAED,MAAM,CAAN,IAAY,cAGX;AAHD,WAAY,cAAc;IACtB,qCAAmB,CAAA;IACnB,+BAAa,CAAA;AACjB,CAAC,EAHW,cAAc,KAAd,cAAc,QAGzB;AAED,MAAM,CAAN,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IACxB,iCAAa,CAAA;IACb,iCAAa,CAAA;AACjB,CAAC,EAHW,gBAAgB,KAAhB,gBAAgB,QAG3B;AAED,MAAM,CAAN,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC1B,yDAAmC,CAAA;IACnC,oEAA8C,CAAA;AAClD,CAAC,EAHW,kBAAkB,KAAlB,kBAAkB,QAG7B;AAED,MAAM,CAAN,IAAY,+BAIX;AAJD,WAAY,+BAA+B;IACvC,gDAAa,CAAA;IACb,kDAAe,CAAA;IACf,oDAAiB,CAAA;AACrB,CAAC,EAJW,+BAA+B,KAA/B,+BAA+B,QAI1C;AAED,MAAM,CAAN,IAAY,cAGX;AAHD,WAAY,cAAc;IACtB,qCAAmB,CAAA;IACnB,mCAAiB,CAAA;AACrB,CAAC,EAHW,cAAc,KAAd,cAAc,QAGzB;AAED,MAAM,CAAN,IAAY,sBAGX;AAHD,WAAY,sBAAsB;IAC9B,6CAAmB,CAAA;IACnB,2CAAiB,CAAA;AACrB,CAAC,EAHW,sBAAsB,KAAtB,sBAAsB,QAGjC;AAED,MAAM,CAAN,IAAY,SAGX;AAHD,WAAY,SAAS;IACjB,gCAAmB,CAAA;IACnB,6CAAgC,CAAA;AACpC,CAAC,EAHW,SAAS,KAAT,SAAS,QAGpB;AAsED,SAAS;AAET,MAAM,CAAN,IAAY,MAIX;AAJD,WAAY,MAAM;IACd,6BAAmB,CAAA;IACnB,2BAAiB,CAAA;IACjB,2BAAiB,CAAA;AACrB,CAAC,EAJW,MAAM,KAAN,MAAM,QAIjB","sourcesContent":["import * as React from 'react';\n\nimport {ButtonView, ButtonProps as UikitButtonProps} from '@gravity-ui/uikit';\n\nimport {ThemeSupporting} from '../../utils';\nimport {AnalyticsEventsBase, AnalyticsEventsProp, ClassNameProps, QAProps} from '../common';\n\n// enums\nexport enum AuthorType {\n Column = 'column',\n Line = 'line',\n}\n\nexport enum PriceDetailsType {\n MARKED_LIST = 'marked-list',\n SETTINGS = 'settings',\n}\n\nexport enum PriceLabelColor {\n BLUE = 'blue',\n GREEN = 'green',\n YELLOW = 'yellow',\n PURPLE = 'purple',\n RED = 'red',\n}\n\nexport enum PlayButtonType {\n Default = 'default',\n Text = 'text',\n}\n\nexport enum PlayButtonThemes {\n Blue = 'blue',\n Grey = 'grey',\n}\n\nexport enum CustomControlsType {\n WithMuteButton = 'with-mute-button',\n WithPlayPauseButton = 'with-play-pause-button',\n}\n\nexport enum CustomControlsButtonPositioning {\n Left = 'left',\n Right = 'right',\n Center = 'center',\n}\n\nexport enum MediaVideoType {\n Default = 'default',\n Player = 'player',\n}\n\nexport enum MediaVideoControlsType {\n Default = 'default',\n Custom = 'custom',\n}\n\nexport enum QuoteType {\n Chevron = 'chevron', // « »\n EnglishDouble = 'english-double', // “ ”\n}\n\n// types\nexport type TextTheme = 'light' | 'dark';\nexport type TextSize = 'xs' | 's' | 'sm' | 'm' | 'l';\nexport type DividerSize = '0' | 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl' | 'xxxl';\nexport type HeaderWidth = 's' | 'm' | 'l';\nexport type HeaderImageSize = 's' | 'm';\nexport type HeaderOffset = 'default' | 'large';\nexport type Justify = 'start' | 'center' | 'end';\nexport type ColumnsCount = 1 | 2 | 3 | 4;\nexport type LegendTableMarkerType = 'disk' | 'tick';\nexport type LinkTheme = 'file-link' | 'normal' | 'back' | 'underline';\nexport type MediaDirection = 'media-content' | 'content-media';\nexport type PriceDescriptionColor = 'cornflower' | 'black';\nexport type ContentSize = 's' | 'm' | 'l';\nexport type ContentTextSize = 's' | 'm' | 'l';\nexport type ContentTheme = 'default' | 'dark' | 'light';\nexport type FileLinkType = 'vertical' | 'horizontal';\nexport type ImageCardMargins = 's' | 'm';\nexport type LayoutItemContentMargin = 'm' | 'l';\n\n// modifiers\nexport interface Themable {\n theme?: TextTheme;\n}\n\nexport interface Justifyable {\n justify?: Justify;\n}\n\nexport interface Stylable {\n className?: string;\n}\n\nexport interface Animatable {\n animated?: boolean;\n}\n\nexport interface Tabbable {\n tabIndex?: number;\n}\n\nexport interface Roleable {\n role?: React.AriaRole;\n}\n\nexport interface AriaProps {\n ariaProps?: React.AriaAttributes;\n}\n\n//common props\nexport interface Background {\n image?: string;\n color?: string;\n}\n\nexport interface AnchorProps {\n text: string;\n url: string;\n}\n\n/**\n * @deprecated Component VideoBlock will be deleted, which uses this logic\n */\ninterface LoopProps {\n start: number;\n end?: number;\n}\n\n// images\n\nexport enum Device {\n Desktop = 'desktop',\n Mobile = 'mobile',\n Tablet = 'tablet',\n}\n\nexport interface ImageInfoProps\n extends Pick<\n React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>,\n 'aria-describedby' | 'loading'\n >,\n ImageDevicesVisibleProps {\n alt?: string;\n fetchPriority?: 'high' | 'low' | 'auto';\n disableCompress?: boolean;\n}\n\nexport interface ImageObjectProps extends ImageInfoProps {\n src: string;\n}\n\nexport interface ImageDeviceProps extends ImageInfoProps {\n [Device.Desktop]: string;\n [Device.Mobile]: string;\n [Device.Tablet]?: string;\n}\n\nexport interface ImageDevicesVisibleProps {\n hide?: boolean | Partial<Record<Device, boolean>>;\n}\n\nexport type ImageProps = string | ImageObjectProps | ImageDeviceProps;\nexport type ThemedImage = ThemeSupporting<ImageProps>;\n\nexport interface BackgroundImageProps\n extends React.HTMLProps<HTMLDivElement>,\n Partial<ImageDeviceProps>,\n Partial<ImageObjectProps>,\n QAProps,\n ImageDevicesVisibleProps {\n style?: React.CSSProperties;\n imageClassName?: string;\n}\n\n//components props\nexport interface MediaVideoProps extends AnalyticsEventsBase {\n src: string[];\n type?: MediaVideoType;\n loop?: LoopProps | boolean;\n muted?: boolean;\n autoplay?: boolean;\n elapsedTime?: number;\n playButton?: PlayButtonProps;\n controls?: MediaVideoControlsType;\n customControlsOptions?: CustomControlsOptions;\n ariaLabel?: string;\n contain?: boolean;\n}\n\n// links\nexport interface LinkProps extends AnalyticsEventsBase, Stylable, Tabbable {\n url: string;\n urlTitle?: string;\n text?: string;\n textSize?: TextSize;\n theme?: LinkTheme;\n colorTheme?: TextTheme;\n arrow?: boolean;\n target?: string;\n extraProps?: React.HTMLProps<HTMLAnchorElement>;\n}\n\nexport interface FileLinkProps extends ClassNameProps, Tabbable {\n href: string;\n text: React.ReactNode;\n type?: FileLinkType;\n textSize?: TextSize;\n theme?: ContentTheme;\n urlTitle?: string;\n onClick?: () => void;\n extraProps?: React.HTMLProps<HTMLAnchorElement>;\n}\n\n// buttons\nexport type ButtonTheme =\n | ButtonView\n | 'github'\n | 'app-store'\n | 'google-play'\n | 'scale'\n | 'monochrome';\n\nexport interface ButtonProps\n extends AnalyticsEventsBase,\n Pick<UikitButtonProps, 'size' | 'width' | 'extraProps'> {\n text: string;\n url: string;\n urlTitle?: string;\n primary?: boolean;\n theme?: ButtonTheme;\n img?: ButtonImageProps | string;\n target?: string;\n}\n\nexport type ButtonImagePosition = 'left' | 'right';\n\nexport interface ButtonImageProps {\n url: string;\n position?: ButtonImagePosition;\n alt?: string;\n}\n\nexport interface CustomControlsOptions {\n type?: CustomControlsType;\n muteButtonShown?: boolean;\n positioning?: CustomControlsButtonPositioning;\n}\n\nexport interface PlayButtonProps extends ClassNameProps {\n type?: PlayButtonType;\n theme?: PlayButtonThemes;\n text?: string;\n}\n\nexport type ThemedMediaVideoProps = ThemeSupporting<MediaVideoProps>;\n\nexport interface MediaComponentVideoProps extends AnalyticsEventsBase {\n video: MediaVideoProps;\n height?: number;\n ratio?: number | 'auto';\n previewImg?: string;\n}\n\nexport interface MediaComponentVideoIframeProps {\n videoIframe: string;\n}\n\nexport interface MediaComponentYoutubeProps {\n youtube: string;\n previewImg?: string;\n fullscreen?: boolean;\n}\n\nexport interface MediaComponentImageProps {\n image: ImageProps | ImageProps[] | ImageDeviceProps;\n video?: MediaVideoProps;\n parallax?: boolean;\n height?: number;\n disableImageSliderForArrayInput?: boolean;\n}\n\nexport interface MediaComponentDataLensProps {\n dataLens: DataLensProps;\n}\n\nexport interface MediaComponentIframeProps {\n iframe: IframeProps;\n margins?: boolean;\n}\n\nexport interface MediaProps\n extends Animatable,\n Partial<MediaComponentDataLensProps>,\n Partial<MediaComponentYoutubeProps>,\n Partial<MediaComponentVideoIframeProps>,\n Partial<MediaComponentImageProps>,\n Partial<MediaComponentIframeProps>,\n Partial<MediaComponentVideoProps> {\n color?: string;\n videoMicrodata?: {\n name?: string;\n description?: string;\n duration?: string;\n uploadDate?: string;\n contentUrl?: string;\n thumbnailUrl?: string;\n };\n}\n\nexport interface BackgroundMediaProps extends MediaProps, Animatable, QAProps {\n fullWidthMedia?: boolean;\n className?: string;\n mediaClassName?: string;\n}\n\nexport type Coordinate = number[];\n\nexport interface MapBaseProps {\n zoom?: number;\n className?: string;\n}\n\nexport interface GMapProps extends MapBaseProps {\n address: string;\n}\n\nexport interface YMapProps extends MapBaseProps {\n markers: YMapMarker[];\n id: string;\n}\n\nexport interface YMapMarker {\n address?: string;\n coordinate?: Coordinate;\n label?: YMapMarkerLabel;\n}\n\nexport interface YMapMarkerLabel {\n iconCaption?: string;\n iconContent?: string;\n iconColor?: string;\n preset?: string;\n}\n\nexport type MapProps = GMapProps | YMapProps;\n\nexport type ThemedMediaProps = ThemeSupporting<MediaProps>;\n\nexport interface DataLensObjectProps {\n id: string;\n theme: 'dark' | 'light';\n}\n\nexport interface IframeProps {\n src: string;\n width?: number;\n height?: number;\n title?: string;\n name?: string;\n}\n\nexport type DataLensProps = string | DataLensObjectProps;\n\nexport interface AuthorItem {\n firstName: string;\n secondName: string;\n description?: string;\n avatar?: ThemeSupporting<ImageProps> | JSX.Element;\n}\n\nexport interface HeaderBreadCrumbsProps extends ClassNameProps {\n items: {\n url: string;\n text: React.ReactNode;\n }[];\n theme?: TextTheme;\n analyticsEvents?: AnalyticsEventsProp;\n}\n\nexport interface TitleItemProps extends Justifyable, TitleItemBaseProps {\n navTitle?: string;\n anchor?: string;\n}\n\nexport interface TitleItemBaseProps {\n text: string;\n textSize?: TextSize;\n url?: string;\n urlTitle?: string;\n custom?: string | React.ReactNode;\n onClick?: () => void;\n}\n\nexport type MediaView = 'fit' | 'full';\n\n// card\nexport type MediaBorder = 'shadow' | 'line' | 'none';\nexport type CardBorder = MediaBorder;\nexport type ControlPosition = 'content' | 'footer';\n\nexport interface CardBaseProps {\n border?: CardBorder;\n}\n\nexport type CardLayoutProps = {\n controlPosition?: ControlPosition;\n};\n\n//price\nexport interface PriceDescriptionProps {\n title: string;\n detailedTitle?: string;\n description: string;\n label?: {\n color: PriceLabelColor;\n text?: string;\n size?: TextSize;\n };\n}\n\nexport interface PriceDetailsSettingsProps {\n title: string;\n description: string;\n}\n\nexport interface PriceDetailsListProps {\n text: string;\n}\n\nexport interface PriceDetailsProps {\n items?: PriceDetailsSettingsProps[] | PriceDetailsListProps[];\n}\n\nexport interface PriceItemProps\n extends PriceDetailsProps,\n PriceDescriptionProps,\n AnalyticsEventsBase {}\n\nexport interface PriceFoldableDetailsProps {\n title: string;\n size?: TextSize;\n titleColor?: PriceDescriptionColor;\n}\n\n/** @deprecated */\nexport interface PriceDetailedProps extends CardBaseProps {\n items: PriceItemProps[];\n description?: {\n titleSize?: TextSize;\n descriptionSize?: TextSize;\n titleColor?: PriceDescriptionColor;\n };\n details?: {\n titleSize?: TextSize;\n descriptionSize?: TextSize;\n };\n priceType?: PriceDetailsType;\n numberGroupItems?: 3 | 4 | 5;\n isCombined?: boolean;\n useMixedView?: boolean;\n foldable?: PriceFoldableDetailsProps;\n labelsDefaultText?: Record<PriceLabelColor, string>;\n}\n\nexport interface AuthorProps extends QAProps {\n author: AuthorItem;\n className?: string;\n authorContainerClassName?: string;\n type?: AuthorType;\n theme?: ContentTheme;\n}\n\nexport interface TitleProps {\n title?: TitleItemProps | string;\n subtitle?: string;\n}\n\nexport interface YandexFormProps extends AnalyticsEventsBase {\n id: number | string;\n containerId?: string;\n theme?: string;\n className?: string;\n headerHeight?: number;\n customFormOrigin?: string;\n customFormSection?: string;\n params?: {[key: string]: string};\n\n onSubmit?: () => void;\n onLoad?: () => void;\n}\n\nexport interface WithBorder {\n border?: MediaBorder;\n /**\n * @deprecated use custom class for media-component\n */\n disableShadow?: boolean;\n}\n"]}
|
|
@@ -804,6 +804,25 @@ export declare const cardSchemas: {
|
|
|
804
804
|
type: string;
|
|
805
805
|
enum: string[];
|
|
806
806
|
};
|
|
807
|
+
hide: {
|
|
808
|
+
oneOf: ({
|
|
809
|
+
type: string;
|
|
810
|
+
properties?: undefined;
|
|
811
|
+
} | {
|
|
812
|
+
type: string;
|
|
813
|
+
properties: {
|
|
814
|
+
mobile: {
|
|
815
|
+
type: string;
|
|
816
|
+
};
|
|
817
|
+
tablet: {
|
|
818
|
+
type: string;
|
|
819
|
+
};
|
|
820
|
+
desktop: {
|
|
821
|
+
type: string;
|
|
822
|
+
};
|
|
823
|
+
};
|
|
824
|
+
})[];
|
|
825
|
+
};
|
|
807
826
|
};
|
|
808
827
|
} & {
|
|
809
828
|
optionName: string;
|
|
@@ -53,6 +53,25 @@ export declare const BackgroundCard: {
|
|
|
53
53
|
type: string;
|
|
54
54
|
enum: string[];
|
|
55
55
|
};
|
|
56
|
+
hide: {
|
|
57
|
+
oneOf: ({
|
|
58
|
+
type: string;
|
|
59
|
+
properties?: undefined;
|
|
60
|
+
} | {
|
|
61
|
+
type: string;
|
|
62
|
+
properties: {
|
|
63
|
+
mobile: {
|
|
64
|
+
type: string;
|
|
65
|
+
};
|
|
66
|
+
tablet: {
|
|
67
|
+
type: string;
|
|
68
|
+
};
|
|
69
|
+
desktop: {
|
|
70
|
+
type: string;
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
})[];
|
|
74
|
+
};
|
|
56
75
|
};
|
|
57
76
|
} & {
|
|
58
77
|
optionName: string;
|
|
@@ -125,6 +125,11 @@ export const config = {
|
|
|
125
125
|
parser: parseBackgroundCardItems,
|
|
126
126
|
transformer: typografTransformer,
|
|
127
127
|
},
|
|
128
|
+
{
|
|
129
|
+
fields: ['list'],
|
|
130
|
+
transformer: yfmTransformer,
|
|
131
|
+
parser: createItemsParser(['text']),
|
|
132
|
+
},
|
|
128
133
|
],
|
|
129
134
|
[SubBlockType.ImageCard]: [
|
|
130
135
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"../../../src","sources":["text-transform/config.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,4EAA4E;AAE5E,OAAO,EACH,SAAS,EAQT,YAAY,GAGf,2BAAkB;AAEnB,OAAO,EAIH,iBAAiB,EACjB,mBAAmB,EACnB,cAAc,GACjB,oBAAiB;AAElB,SAAS,eAAe,CAAC,WAAwB,EAAE,OAAmB;IAClE,MAAM,MAAM,GAAG,OAAO,EAAE,MAAM,CAAC;IAE/B,OAAO;QACH,GAAG,CAAC,OAAO,IAAI,EAAE,CAAC;QAClB,MAAM,EAAE,MAAM,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;KAChE,CAAC;AACN,CAAC;AAED,SAAS,aAAa,CAAC,WAAwB,EAAE,KAA6B;IAC1E,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,EAAC,KAAK,EAAE,IAAI,EAAE,GAAG,IAAI,EAAC,EAAE,EAAE,CAAC,CAAC;QAC1C,KAAK,EAAE,KAAK,IAAI,WAAW,CAAC,KAAK,CAAC;QAClC,IAAI,EAAE,IAAI,IAAI,WAAW,CAAC,IAAI,CAAC;QAC/B,GAAG,IAAI;KACV,CAAC,CAAC,CAAC;AACR,CAAC;AAED,SAAS,kBAAkB,CAAC,WAAwB,EAAE,KAA0B;IAC5E,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,EAAC,IAAI,EAAE,GAAG,IAA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BAAsB;IACnD,CAAC,SAAS,CAAC,WAAW,CAAC,EAAE,sBAAsB;IAC/C,CAAC,SAAS,CAAC,UAAU,CAAC,EAAE,sBAAsB;IAC9C,CAAC,YAAY,CAAC,SAAS,CAAC,EAAE;QACtB;YACI,MAAM,EAAE,CAAC,OAAO,CAAC;YACjB,WAAW,EAAE,mBAAmB;SACnC;QACD;YACI,MAAM,EAAE,CAAC,MAAM,CAAC;YAChB,WAAW,EAAE,cAAc;YAC3B,MAAM,EAAE,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;SACtC;KACJ;IACD,CAAC,SAAS,CAAC,SAAS,CAAC,EAAE;QACnB;YACI,MAAM,EAAE,CAAC,aAAa,CAAC;YACvB,WAAW,EAAE,cAAc;YAC3B,MAAM,EAAE,kBAAkB;SAC7B;QACD;YACI,MAAM,EAAE,CAAC,aAAa,CAAC;YACvB,WAAW,EAAE,mBAAmB;YAChC,MAAM,EAAE,uBAAuB;SAClC;KACJ;CACJ,CAAC","sourcesContent":["/* eslint-disable no-param-reassign */\n/* eslint-disable no-not-accumulator-reassign/no-not-accumulator-reassign */\n\nimport {\n BlockType,\n ContentBlockProps,\n ContentItemProps,\n ExtendedFeaturesItem,\n PriceDetailedProps,\n PriceDetailsListProps,\n PriceDetailsSettingsProps,\n PromoFeaturesItem,\n SubBlockType,\n TableProps,\n TitleItemProps,\n} from '../models';\n\nimport {\n Parser,\n Transformer,\n TransformerRaw,\n createItemsParser,\n typografTransformer,\n yfmTransformer,\n} from './common';\n\nfunction parseTableBlock(transformer: Transformer, content: TableProps) {\n const legend = content?.legend;\n\n return {\n ...(content || {}),\n legend: legend && legend.map((string) => transformer(string)),\n };\n}\n\nfunction parseFeatures(transformer: Transformer, items: ExtendedFeaturesItem[]) {\n return items.map(({title, text, ...rest}) => ({\n title: title && transformer(title),\n text: text && transformer(text),\n ...rest,\n }));\n}\n\nfunction parsePromoFeatures(transformer: Transformer, items: PromoFeaturesItem[]) {\n return items.map(({text, ...rest}) => ({\n text: transformer(text),\n ...rest,\n }));\n}\n\nconst parseTitle = (transformer: Transformer, title: TitleItemProps | string) =>\n typeof title === 'object' && 'text' in title\n ? {...title, text: transformer(title.text)}\n : title && transformer(title);\n\nconst parseItemsTitle = (transformer: Transformer, items: ExtendedFeaturesItem[]) =>\n items.map(({title, ...rest}) => ({\n title: title && parseTitle(transformer, title),\n ...rest,\n }));\n\nfunction parsePriceDetailedBlock(transformer: Transformer, block: PriceDetailedProps) {\n const {priceType} = block;\n\n /* eslint-disable no-not-accumulator-reassign/no-not-accumulator-reassign */\n block.items = block.items.map((item) => {\n const {description, items: details = []} = item;\n\n if (priceType === 'marked-list') {\n item.items = (details as PriceDetailsListProps[]).map((detail) => {\n detail.text = detail.text && transformer(detail.text);\n\n return detail;\n });\n } else {\n item.items = (details as PriceDetailsSettingsProps[]).map((detail) => {\n detail.description = detail.description && transformer(detail.description);\n\n return detail;\n });\n }\n\n item.description = transformer(description);\n\n return item;\n });\n /* eslint-enable no-not-accumulator-reassign/no-not-accumulator-reassign */\n\n return block;\n}\n\nconst parseContentLayout = (transformer: Transformer, content: ContentBlockProps) => {\n if (content) {\n const {text, additionalInfo, list} = content;\n\n /* eslint-disable no-not-accumulator-reassign/no-not-accumulator-reassign */\n if (text) {\n content.text = transformer(text);\n }\n\n if (additionalInfo) {\n content.additionalInfo = transformer(additionalInfo);\n }\n\n if (list) {\n content.list = list.map((item) => {\n if (item?.text) {\n return {\n ...item,\n text: transformer(item.text),\n };\n }\n\n return item;\n });\n }\n /* eslint-enable no-not-accumulator-reassign/no-not-accumulator-reassign */\n }\n\n return content;\n};\n\nfunction parseContentLayoutTitle(transformer: Transformer, content: ContentBlockProps) {\n if (content?.title) {\n const {title} = content;\n\n // eslint-disable-next-line no-not-accumulator-reassign/no-not-accumulator-reassign\n content.title = title && parseTitle(transformer, title);\n }\n\n return content;\n}\n\nconst parseBackgroundCardItems = (transformer: Transformer, items: ContentItemProps[]) =>\n items.map(({text, ...rest}) => ({\n text: text && parseTitle(transformer, text),\n ...rest,\n }));\n\nexport const blockHeaderTransformer = [\n {\n fields: ['title'],\n transformer: typografTransformer,\n parser: parseTitle,\n },\n {\n fields: ['description'],\n transformer: yfmTransformer,\n },\n];\n\ninterface BlockConfig {\n transformer: TransformerRaw;\n fields?: string[];\n parser?: Parser;\n}\n\nexport type BlocksConfig = Record<string, BlockConfig | BlockConfig[]>;\n\nexport const config: BlocksConfig = {\n [SubBlockType.BasicCard]: [\n {\n fields: ['title'],\n transformer: typografTransformer,\n },\n {\n fields: ['text', 'additionalInfo'],\n transformer: yfmTransformer,\n },\n ],\n [SubBlockType.BackgroundCard]: [\n {\n fields: ['text', 'additionalInfo'],\n transformer: yfmTransformer,\n },\n {\n fields: ['title'],\n transformer: typografTransformer,\n },\n {\n fields: ['list'],\n parser: parseBackgroundCardItems,\n transformer: typografTransformer,\n },\n ],\n [SubBlockType.ImageCard]: [\n {\n fields: ['text', 'additionalInfo'],\n transformer: yfmTransformer,\n },\n {\n fields: ['title'],\n transformer: typografTransformer,\n },\n ],\n [SubBlockType.LayoutItem]: [\n {\n fields: ['content'],\n parser: parseContentLayout,\n transformer: yfmTransformer,\n },\n {\n fields: ['content'],\n parser: parseContentLayoutTitle,\n transformer: typografTransformer,\n },\n {\n fields: ['metaInfo'],\n parser: createItemsParser([]),\n transformer: yfmTransformer,\n },\n ],\n [SubBlockType.Quote]: [\n {\n fields: ['text'],\n transformer: typografTransformer,\n },\n {\n fields: ['yfmText'],\n transformer: yfmTransformer,\n },\n ],\n [BlockType.ExtendedFeaturesBlock]: [\n ...blockHeaderTransformer,\n {\n fields: ['items'],\n transformer: typografTransformer,\n parser: createItemsParser(['title']),\n },\n {\n fields: ['items'],\n transformer: yfmTransformer,\n parser: createItemsParser(['text', 'additionalInfo']),\n },\n ],\n [BlockType.PromoFeaturesBlock]: [\n ...blockHeaderTransformer,\n {\n fields: ['items'],\n transformer: yfmTransformer,\n parser: parsePromoFeatures,\n },\n ],\n [BlockType.SliderBlock]: blockHeaderTransformer,\n [BlockType.CompaniesBlock]: blockHeaderTransformer,\n [BlockType.QuestionsBlock]: [\n {\n fields: ['title'],\n transformer: typografTransformer,\n },\n {\n fields: ['text', 'additionalInfo'],\n transformer: yfmTransformer,\n },\n {\n fields: ['items'],\n transformer: yfmTransformer,\n parser: parseFeatures,\n },\n ],\n [BlockType.FoldableListBlock]: [\n {\n fields: ['title'],\n transformer: typografTransformer,\n },\n {\n fields: ['text', 'additionalInfo'],\n transformer: yfmTransformer,\n },\n {\n fields: ['items'],\n transformer: yfmTransformer,\n parser: parseFeatures,\n },\n ],\n\n [BlockType.BannerBlock]: [\n {\n fields: ['title'],\n transformer: typografTransformer,\n },\n {\n fields: ['subtitle'],\n transformer: yfmTransformer,\n },\n ],\n [SubBlockType.BannerCard]: [\n {\n fields: ['title'],\n transformer: typografTransformer,\n },\n {\n fields: ['subtitle'],\n transformer: yfmTransformer,\n },\n ],\n [BlockType.MediaBlock]: [\n ...blockHeaderTransformer,\n {\n fields: ['title', 'additionalInfo'],\n transformer: yfmTransformer,\n },\n {\n fields: ['list'],\n transformer: yfmTransformer,\n parser: createItemsParser(['text']),\n },\n ],\n [BlockType.MapBlock]: [\n ...blockHeaderTransformer,\n {\n fields: ['title', 'additionalInfo'],\n transformer: yfmTransformer,\n },\n ],\n [BlockType.TabsBlock]: [\n ...blockHeaderTransformer,\n {\n fields: ['items'],\n transformer: yfmTransformer,\n parser: createItemsParser(['text', 'additionalInfo', 'caption']),\n },\n {\n fields: ['items'],\n transformer: typografTransformer,\n parser: parseItemsTitle,\n },\n ],\n [BlockType.TableBlock]: [\n {\n fields: ['table'],\n transformer: yfmTransformer,\n parser: parseTableBlock,\n },\n ],\n [BlockType.HeaderSliderBlock]: [\n {\n fields: ['items'],\n transformer: typografTransformer,\n parser: createItemsParser(['title', 'overtitle']),\n },\n {\n fields: ['items'],\n transformer: yfmTransformer,\n parser: createItemsParser(['description']),\n },\n ],\n [SubBlockType.PriceDetailed]: [\n {\n transformer: yfmTransformer,\n parser: parsePriceDetailedBlock,\n },\n ],\n [BlockType.HeaderBlock]: [\n {\n fields: ['description', 'additionalInfo'],\n transformer: yfmTransformer,\n },\n ],\n [BlockType.ContentLayoutBlock]: [\n {\n fields: ['textContent'],\n transformer: yfmTransformer,\n parser: parseContentLayout,\n },\n {\n fields: ['textContent'],\n transformer: typografTransformer,\n parser: parseContentLayoutTitle,\n },\n ],\n [SubBlockType.Content]: [\n {\n fields: ['text', 'additionalInfo'],\n transformer: yfmTransformer,\n },\n {\n fields: ['title'],\n transformer: typografTransformer,\n parser: parseTitle,\n },\n {\n fields: ['list'],\n transformer: yfmTransformer,\n parser: createItemsParser(['title', 'text']),\n },\n ],\n [BlockType.InfoBlock]: [\n {\n fields: ['rightContent', 'leftContent'],\n transformer: yfmTransformer,\n parser: parseContentLayout,\n },\n {\n fields: ['rightContent', 'leftContent'],\n transformer: typografTransformer,\n parser: parseContentLayoutTitle,\n },\n ],\n [BlockType.ShareBlock]: [\n {\n fields: ['title'],\n transformer: typografTransformer,\n },\n ],\n [BlockType.CardLayoutBlock]: blockHeaderTransformer,\n [BlockType.FilterBlock]: blockHeaderTransformer,\n [BlockType.IconsBlock]: blockHeaderTransformer,\n [SubBlockType.PriceCard]: [\n {\n fields: ['title'],\n transformer: typografTransformer,\n },\n {\n fields: ['list'],\n transformer: yfmTransformer,\n parser: createItemsParser(['text']),\n },\n ],\n [BlockType.FormBlock]: [\n {\n fields: ['textContent'],\n transformer: yfmTransformer,\n parser: parseContentLayout,\n },\n {\n fields: ['textContent'],\n transformer: typografTransformer,\n parser: parseContentLayoutTitle,\n },\n ],\n};\n"]}
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"../../../src","sources":["text-transform/config.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,4EAA4E;AAE5E,OAAO,EACH,SAAS,EAQT,YAAY,GAGf,2BAAkB;AAEnB,OAAO,EAIH,iBAAiB,EACjB,mBAAmB,EACnB,cAAc,GACjB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AS,CAAC,SAAS,CAAC,EAAE;QACnB;YACI,MAAM,EAAE,CAAC,aAAa,CAAC;YACvB,WAAW,EAAE,cAAc;YAC3B,MAAM,EAAE,kBAAkB;SAC7B;QACD;YACI,MAAM,EAAE,CAAC,aAAa,CAAC;YACvB,WAAW,EAAE,mBAAmB;YAChC,MAAM,EAAE,uBAAuB;SAClC;KACJ;CACJ,CAAC","sourcesContent":["/* eslint-disable no-param-reassign */\n/* eslint-disable no-not-accumulator-reassign/no-not-accumulator-reassign */\n\nimport {\n BlockType,\n ContentBlockProps,\n ContentItemProps,\n ExtendedFeaturesItem,\n PriceDetailedProps,\n PriceDetailsListProps,\n PriceDetailsSettingsProps,\n PromoFeaturesItem,\n SubBlockType,\n TableProps,\n TitleItemProps,\n} from '../models';\n\nimport {\n Parser,\n Transformer,\n TransformerRaw,\n createItemsParser,\n typografTransformer,\n yfmTransformer,\n} from './common';\n\nfunction parseTableBlock(transformer: Transformer, content: TableProps) {\n const legend = content?.legend;\n\n return {\n ...(content || {}),\n legend: legend && legend.map((string) => transformer(string)),\n };\n}\n\nfunction parseFeatures(transformer: Transformer, items: ExtendedFeaturesItem[]) {\n return items.map(({title, text, ...rest}) => ({\n title: title && transformer(title),\n text: text && transformer(text),\n ...rest,\n }));\n}\n\nfunction parsePromoFeatures(transformer: Transformer, items: PromoFeaturesItem[]) {\n return items.map(({text, ...rest}) => ({\n text: transformer(text),\n ...rest,\n }));\n}\n\nconst parseTitle = (transformer: Transformer, title: TitleItemProps | string) =>\n typeof title === 'object' && 'text' in title\n ? {...title, text: transformer(title.text)}\n : title && transformer(title);\n\nconst parseItemsTitle = (transformer: Transformer, items: ExtendedFeaturesItem[]) =>\n items.map(({title, ...rest}) => ({\n title: title && parseTitle(transformer, title),\n ...rest,\n }));\n\nfunction parsePriceDetailedBlock(transformer: Transformer, block: PriceDetailedProps) {\n const {priceType} = block;\n\n /* eslint-disable no-not-accumulator-reassign/no-not-accumulator-reassign */\n block.items = block.items.map((item) => {\n const {description, items: details = []} = item;\n\n if (priceType === 'marked-list') {\n item.items = (details as PriceDetailsListProps[]).map((detail) => {\n detail.text = detail.text && transformer(detail.text);\n\n return detail;\n });\n } else {\n item.items = (details as PriceDetailsSettingsProps[]).map((detail) => {\n detail.description = detail.description && transformer(detail.description);\n\n return detail;\n });\n }\n\n item.description = transformer(description);\n\n return item;\n });\n /* eslint-enable no-not-accumulator-reassign/no-not-accumulator-reassign */\n\n return block;\n}\n\nconst parseContentLayout = (transformer: Transformer, content: ContentBlockProps) => {\n if (content) {\n const {text, additionalInfo, list} = content;\n\n /* eslint-disable no-not-accumulator-reassign/no-not-accumulator-reassign */\n if (text) {\n content.text = transformer(text);\n }\n\n if (additionalInfo) {\n content.additionalInfo = transformer(additionalInfo);\n }\n\n if (list) {\n content.list = list.map((item) => {\n if (item?.text) {\n return {\n ...item,\n text: transformer(item.text),\n };\n }\n\n return item;\n });\n }\n /* eslint-enable no-not-accumulator-reassign/no-not-accumulator-reassign */\n }\n\n return content;\n};\n\nfunction parseContentLayoutTitle(transformer: Transformer, content: ContentBlockProps) {\n if (content?.title) {\n const {title} = content;\n\n // eslint-disable-next-line no-not-accumulator-reassign/no-not-accumulator-reassign\n content.title = title && parseTitle(transformer, title);\n }\n\n return content;\n}\n\nconst parseBackgroundCardItems = (transformer: Transformer, items: ContentItemProps[]) =>\n items.map(({text, ...rest}) => ({\n text: text && parseTitle(transformer, text),\n ...rest,\n }));\n\nexport const blockHeaderTransformer = [\n {\n fields: ['title'],\n transformer: typografTransformer,\n parser: parseTitle,\n },\n {\n fields: ['description'],\n transformer: yfmTransformer,\n },\n];\n\ninterface BlockConfig {\n transformer: TransformerRaw;\n fields?: string[];\n parser?: Parser;\n}\n\nexport type BlocksConfig = Record<string, BlockConfig | BlockConfig[]>;\n\nexport const config: BlocksConfig = {\n [SubBlockType.BasicCard]: [\n {\n fields: ['title'],\n transformer: typografTransformer,\n },\n {\n fields: ['text', 'additionalInfo'],\n transformer: yfmTransformer,\n },\n ],\n [SubBlockType.BackgroundCard]: [\n {\n fields: ['text', 'additionalInfo'],\n transformer: yfmTransformer,\n },\n {\n fields: ['title'],\n transformer: typografTransformer,\n },\n {\n fields: ['list'],\n parser: parseBackgroundCardItems,\n transformer: typografTransformer,\n },\n {\n fields: ['list'],\n transformer: yfmTransformer,\n parser: createItemsParser(['text']),\n },\n ],\n [SubBlockType.ImageCard]: [\n {\n fields: ['text', 'additionalInfo'],\n transformer: yfmTransformer,\n },\n {\n fields: ['title'],\n transformer: typografTransformer,\n },\n ],\n [SubBlockType.LayoutItem]: [\n {\n fields: ['content'],\n parser: parseContentLayout,\n transformer: yfmTransformer,\n },\n {\n fields: ['content'],\n parser: parseContentLayoutTitle,\n transformer: typografTransformer,\n },\n {\n fields: ['metaInfo'],\n parser: createItemsParser([]),\n transformer: yfmTransformer,\n },\n ],\n [SubBlockType.Quote]: [\n {\n fields: ['text'],\n transformer: typografTransformer,\n },\n {\n fields: ['yfmText'],\n transformer: yfmTransformer,\n },\n ],\n [BlockType.ExtendedFeaturesBlock]: [\n ...blockHeaderTransformer,\n {\n fields: ['items'],\n transformer: typografTransformer,\n parser: createItemsParser(['title']),\n },\n {\n fields: ['items'],\n transformer: yfmTransformer,\n parser: createItemsParser(['text', 'additionalInfo']),\n },\n ],\n [BlockType.PromoFeaturesBlock]: [\n ...blockHeaderTransformer,\n {\n fields: ['items'],\n transformer: yfmTransformer,\n parser: parsePromoFeatures,\n },\n ],\n [BlockType.SliderBlock]: blockHeaderTransformer,\n [BlockType.CompaniesBlock]: blockHeaderTransformer,\n [BlockType.QuestionsBlock]: [\n {\n fields: ['title'],\n transformer: typografTransformer,\n },\n {\n fields: ['text', 'additionalInfo'],\n transformer: yfmTransformer,\n },\n {\n fields: ['items'],\n transformer: yfmTransformer,\n parser: parseFeatures,\n },\n ],\n [BlockType.FoldableListBlock]: [\n {\n fields: ['title'],\n transformer: typografTransformer,\n },\n {\n fields: ['text', 'additionalInfo'],\n transformer: yfmTransformer,\n },\n {\n fields: ['items'],\n transformer: yfmTransformer,\n parser: parseFeatures,\n },\n ],\n\n [BlockType.BannerBlock]: [\n {\n fields: ['title'],\n transformer: typografTransformer,\n },\n {\n fields: ['subtitle'],\n transformer: yfmTransformer,\n },\n ],\n [SubBlockType.BannerCard]: [\n {\n fields: ['title'],\n transformer: typografTransformer,\n },\n {\n fields: ['subtitle'],\n transformer: yfmTransformer,\n },\n ],\n [BlockType.MediaBlock]: [\n ...blockHeaderTransformer,\n {\n fields: ['title', 'additionalInfo'],\n transformer: yfmTransformer,\n },\n {\n fields: ['list'],\n transformer: yfmTransformer,\n parser: createItemsParser(['text']),\n },\n ],\n [BlockType.MapBlock]: [\n ...blockHeaderTransformer,\n {\n fields: ['title', 'additionalInfo'],\n transformer: yfmTransformer,\n },\n ],\n [BlockType.TabsBlock]: [\n ...blockHeaderTransformer,\n {\n fields: ['items'],\n transformer: yfmTransformer,\n parser: createItemsParser(['text', 'additionalInfo', 'caption']),\n },\n {\n fields: ['items'],\n transformer: typografTransformer,\n parser: parseItemsTitle,\n },\n ],\n [BlockType.TableBlock]: [\n {\n fields: ['table'],\n transformer: yfmTransformer,\n parser: parseTableBlock,\n },\n ],\n [BlockType.HeaderSliderBlock]: [\n {\n fields: ['items'],\n transformer: typografTransformer,\n parser: createItemsParser(['title', 'overtitle']),\n },\n {\n fields: ['items'],\n transformer: yfmTransformer,\n parser: createItemsParser(['description']),\n },\n ],\n [SubBlockType.PriceDetailed]: [\n {\n transformer: yfmTransformer,\n parser: parsePriceDetailedBlock,\n },\n ],\n [BlockType.HeaderBlock]: [\n {\n fields: ['description', 'additionalInfo'],\n transformer: yfmTransformer,\n },\n ],\n [BlockType.ContentLayoutBlock]: [\n {\n fields: ['textContent'],\n transformer: yfmTransformer,\n parser: parseContentLayout,\n },\n {\n fields: ['textContent'],\n transformer: typografTransformer,\n parser: parseContentLayoutTitle,\n },\n ],\n [SubBlockType.Content]: [\n {\n fields: ['text', 'additionalInfo'],\n transformer: yfmTransformer,\n },\n {\n fields: ['title'],\n transformer: typografTransformer,\n parser: parseTitle,\n },\n {\n fields: ['list'],\n transformer: yfmTransformer,\n parser: createItemsParser(['title', 'text']),\n },\n ],\n [BlockType.InfoBlock]: [\n {\n fields: ['rightContent', 'leftContent'],\n transformer: yfmTransformer,\n parser: parseContentLayout,\n },\n {\n fields: ['rightContent', 'leftContent'],\n transformer: typografTransformer,\n parser: parseContentLayoutTitle,\n },\n ],\n [BlockType.ShareBlock]: [\n {\n fields: ['title'],\n transformer: typografTransformer,\n },\n ],\n [BlockType.CardLayoutBlock]: blockHeaderTransformer,\n [BlockType.FilterBlock]: blockHeaderTransformer,\n [BlockType.IconsBlock]: blockHeaderTransformer,\n [SubBlockType.PriceCard]: [\n {\n fields: ['title'],\n transformer: typografTransformer,\n },\n {\n fields: ['list'],\n transformer: yfmTransformer,\n parser: createItemsParser(['text']),\n },\n ],\n [BlockType.FormBlock]: [\n {\n fields: ['textContent'],\n transformer: yfmTransformer,\n parser: parseContentLayout,\n },\n {\n fields: ['textContent'],\n transformer: typografTransformer,\n parser: parseContentLayoutTitle,\n },\n ],\n};\n"]}
|