@gravity-ui/page-constructor 1.26.0-alpha.1 → 2.0.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/build/cjs/blocks/Icons/Icons.js +1 -1
- package/build/cjs/blocks/Map/schema.d.ts +0 -12
- package/build/cjs/blocks/Share/Share.js +1 -2
- package/build/cjs/components/BackLink/BackLink.js +1 -2
- package/build/cjs/components/Button/Button.js +1 -2
- package/build/cjs/components/FileLink/FileLink.js +1 -2
- package/build/cjs/components/HeaderBreadcrumbs/HeaderBreadcrumbs.js +1 -2
- package/build/cjs/components/Link/Link.js +1 -2
- package/build/cjs/components/Map/GoogleMap.js +7 -5
- package/build/cjs/components/Map/Map.css +5 -0
- package/build/cjs/components/Map/YMap/YMap.d.ts +4 -2
- package/build/cjs/components/Map/YMap/YMap.js +18 -10
- package/build/cjs/components/Map/YMap/YandexMap.js +18 -9
- package/build/cjs/components/Title/Title.js +1 -2
- package/build/cjs/components/index.d.ts +0 -1
- package/build/cjs/components/index.js +1 -3
- package/build/cjs/constructor-items.d.ts +0 -1
- package/build/cjs/constructor-items.js +0 -1
- package/build/cjs/models/constructor-items/common.d.ts +0 -79
- package/build/cjs/models/constructor-items/common.js +1 -14
- package/build/cjs/models/constructor-items/sub-blocks.d.ts +2 -6
- package/build/cjs/models/constructor-items/sub-blocks.js +0 -1
- package/build/cjs/navigation/components/NavigationItem/components/GithubButton/GithubButton.js +1 -2
- package/build/cjs/navigation/components/SocialIcon/SocialIcon.js +1 -1
- package/build/cjs/schema/index.js +1 -3
- package/build/cjs/schema/validators/common.d.ts +0 -6
- package/build/cjs/schema/validators/common.js +0 -4
- package/build/cjs/schema/validators/sub-blocks.d.ts +0 -1
- package/build/cjs/schema/validators/sub-blocks.js +0 -1
- package/build/cjs/sub-blocks/Quote/Quote.js +1 -1
- package/build/cjs/sub-blocks/index.d.ts +0 -1
- package/build/cjs/sub-blocks/index.js +1 -3
- package/build/cjs/text-transform/blocks.js +0 -27
- package/build/esm/blocks/Icons/Icons.js +2 -2
- package/build/esm/blocks/Map/schema.d.ts +0 -12
- package/build/esm/blocks/Share/Share.js +1 -2
- package/build/esm/components/BackLink/BackLink.js +1 -2
- package/build/esm/components/Button/Button.js +1 -2
- package/build/esm/components/FileLink/FileLink.js +1 -2
- package/build/esm/components/HeaderBreadcrumbs/HeaderBreadcrumbs.js +1 -2
- package/build/esm/components/Link/Link.js +1 -2
- package/build/esm/components/Map/GoogleMap.js +7 -5
- package/build/esm/components/Map/Map.css +5 -0
- package/build/esm/components/Map/YMap/YMap.d.ts +4 -2
- package/build/esm/components/Map/YMap/YMap.js +18 -10
- package/build/esm/components/Map/YMap/YandexMap.js +18 -9
- package/build/esm/components/Title/Title.js +1 -2
- package/build/esm/components/index.d.ts +0 -1
- package/build/esm/components/index.js +0 -1
- package/build/esm/constructor-items.d.ts +0 -1
- package/build/esm/constructor-items.js +1 -2
- package/build/esm/models/constructor-items/common.d.ts +0 -79
- package/build/esm/models/constructor-items/common.js +0 -13
- package/build/esm/models/constructor-items/sub-blocks.d.ts +2 -6
- package/build/esm/models/constructor-items/sub-blocks.js +0 -1
- package/build/esm/navigation/components/NavigationItem/components/GithubButton/GithubButton.js +1 -2
- package/build/esm/navigation/components/SocialIcon/SocialIcon.js +2 -2
- package/build/esm/schema/index.js +2 -4
- package/build/esm/schema/validators/common.d.ts +0 -6
- package/build/esm/schema/validators/common.js +0 -4
- package/build/esm/schema/validators/sub-blocks.d.ts +0 -1
- package/build/esm/schema/validators/sub-blocks.js +0 -1
- package/build/esm/sub-blocks/Quote/Quote.js +2 -2
- package/build/esm/sub-blocks/index.d.ts +0 -1
- package/build/esm/sub-blocks/index.js +0 -1
- package/build/esm/text-transform/blocks.js +0 -27
- package/package.json +10 -6
- package/server/models/constructor-items/common.d.ts +0 -79
- package/server/models/constructor-items/common.js +1 -14
- package/server/models/constructor-items/sub-blocks.d.ts +2 -6
- package/server/models/constructor-items/sub-blocks.js +0 -1
- package/server/text-transform/blocks.js +0 -27
- package/build/cjs/components/LinkBase/LinkBase.d.ts +0 -3
- package/build/cjs/components/LinkBase/LinkBase.js +0 -18
- package/build/cjs/sub-blocks/PriceDetailed/CombinedPriceDetailed/CombinedPriceDetailed.css +0 -35
- package/build/cjs/sub-blocks/PriceDetailed/CombinedPriceDetailed/CombinedPriceDetailed.d.ts +0 -12
- package/build/cjs/sub-blocks/PriceDetailed/CombinedPriceDetailed/CombinedPriceDetailed.js +0 -60
- package/build/cjs/sub-blocks/PriceDetailed/PriceDescription/PriceDescription.css +0 -62
- package/build/cjs/sub-blocks/PriceDetailed/PriceDescription/PriceDescription.d.ts +0 -10
- package/build/cjs/sub-blocks/PriceDetailed/PriceDescription/PriceDescription.js +0 -54
- package/build/cjs/sub-blocks/PriceDetailed/PriceDetailed.d.ts +0 -3
- package/build/cjs/sub-blocks/PriceDetailed/PriceDetailed.js +0 -22
- package/build/cjs/sub-blocks/PriceDetailed/PriceDetails/Details/List.css +0 -11
- package/build/cjs/sub-blocks/PriceDetailed/PriceDetails/Details/List.d.ts +0 -7
- package/build/cjs/sub-blocks/PriceDetailed/PriceDetails/Details/List.js +0 -15
- package/build/cjs/sub-blocks/PriceDetailed/PriceDetails/Details/Settings.css +0 -20
- package/build/cjs/sub-blocks/PriceDetailed/PriceDetails/Details/Settings.d.ts +0 -8
- package/build/cjs/sub-blocks/PriceDetailed/PriceDetails/Details/Settings.js +0 -15
- package/build/cjs/sub-blocks/PriceDetailed/PriceDetails/PriceDetails.css +0 -43
- package/build/cjs/sub-blocks/PriceDetailed/PriceDetails/PriceDetails.d.ts +0 -11
- package/build/cjs/sub-blocks/PriceDetailed/PriceDetails/PriceDetails.js +0 -56
- package/build/cjs/sub-blocks/PriceDetailed/SeparatePriceDetailed/SeparatePriceDetailed.css +0 -9
- package/build/cjs/sub-blocks/PriceDetailed/SeparatePriceDetailed/SeparatePriceDetailed.d.ts +0 -10
- package/build/cjs/sub-blocks/PriceDetailed/SeparatePriceDetailed/SeparatePriceDetailed.js +0 -15
- package/build/cjs/sub-blocks/PriceDetailed/schema.d.ts +0 -93
- package/build/cjs/sub-blocks/PriceDetailed/schema.js +0 -155
- package/build/esm/components/LinkBase/LinkBase.d.ts +0 -3
- package/build/esm/components/LinkBase/LinkBase.js +0 -16
- package/build/esm/sub-blocks/PriceDetailed/CombinedPriceDetailed/CombinedPriceDetailed.css +0 -35
- package/build/esm/sub-blocks/PriceDetailed/CombinedPriceDetailed/CombinedPriceDetailed.d.ts +0 -13
- package/build/esm/sub-blocks/PriceDetailed/CombinedPriceDetailed/CombinedPriceDetailed.js +0 -58
- package/build/esm/sub-blocks/PriceDetailed/PriceDescription/PriceDescription.css +0 -62
- package/build/esm/sub-blocks/PriceDetailed/PriceDescription/PriceDescription.d.ts +0 -11
- package/build/esm/sub-blocks/PriceDetailed/PriceDescription/PriceDescription.js +0 -52
- package/build/esm/sub-blocks/PriceDetailed/PriceDetailed.d.ts +0 -3
- package/build/esm/sub-blocks/PriceDetailed/PriceDetailed.js +0 -19
- package/build/esm/sub-blocks/PriceDetailed/PriceDetails/Details/List.css +0 -11
- package/build/esm/sub-blocks/PriceDetailed/PriceDetails/Details/List.d.ts +0 -8
- package/build/esm/sub-blocks/PriceDetailed/PriceDetails/Details/List.js +0 -13
- package/build/esm/sub-blocks/PriceDetailed/PriceDetails/Details/Settings.css +0 -20
- package/build/esm/sub-blocks/PriceDetailed/PriceDetails/Details/Settings.d.ts +0 -9
- package/build/esm/sub-blocks/PriceDetailed/PriceDetails/Details/Settings.js +0 -13
- package/build/esm/sub-blocks/PriceDetailed/PriceDetails/PriceDetails.css +0 -43
- package/build/esm/sub-blocks/PriceDetailed/PriceDetails/PriceDetails.d.ts +0 -12
- package/build/esm/sub-blocks/PriceDetailed/PriceDetails/PriceDetails.js +0 -54
- package/build/esm/sub-blocks/PriceDetailed/SeparatePriceDetailed/SeparatePriceDetailed.css +0 -9
- package/build/esm/sub-blocks/PriceDetailed/SeparatePriceDetailed/SeparatePriceDetailed.d.ts +0 -11
- package/build/esm/sub-blocks/PriceDetailed/SeparatePriceDetailed/SeparatePriceDetailed.js +0 -13
- package/build/esm/sub-blocks/PriceDetailed/schema.d.ts +0 -93
- package/build/esm/sub-blocks/PriceDetailed/schema.js +0 -152
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React, { Fragment } from 'react';
|
|
2
|
-
import { block } from '../../../utils';
|
|
3
|
-
import { CardBase } from '../../../components';
|
|
4
|
-
import './SeparatePriceDetailed.css';
|
|
5
|
-
const b = block('separate-price-detailed-block');
|
|
6
|
-
const SeparatePriceDetailed = (props) => {
|
|
7
|
-
const { items, border, getDescriptionComponent, getDetailsComponent } = props;
|
|
8
|
-
return (React.createElement(Fragment, null, items.map((item, id) => (React.createElement(CardBase, { key: id, className: b(), border: border },
|
|
9
|
-
React.createElement(CardBase.Content, null,
|
|
10
|
-
getDescriptionComponent(item),
|
|
11
|
-
getDetailsComponent(item.items)))))));
|
|
12
|
-
};
|
|
13
|
-
export default SeparatePriceDetailed;
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
export declare const PriceDetailedBlock: {
|
|
2
|
-
'price-detailed': {
|
|
3
|
-
additionalProperties: boolean;
|
|
4
|
-
required: string[];
|
|
5
|
-
properties: {
|
|
6
|
-
items: {
|
|
7
|
-
type: string;
|
|
8
|
-
items: {
|
|
9
|
-
type: string;
|
|
10
|
-
properties: {
|
|
11
|
-
when: {
|
|
12
|
-
type: string;
|
|
13
|
-
};
|
|
14
|
-
};
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
description: {
|
|
18
|
-
additionalProperties: boolean;
|
|
19
|
-
required: never[];
|
|
20
|
-
properties: {
|
|
21
|
-
titleSize: {
|
|
22
|
-
type: string;
|
|
23
|
-
enum: string[];
|
|
24
|
-
};
|
|
25
|
-
descriptionSize: {
|
|
26
|
-
type: string;
|
|
27
|
-
enum: string[];
|
|
28
|
-
};
|
|
29
|
-
titleColor: {
|
|
30
|
-
type: string;
|
|
31
|
-
enum: string[];
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
};
|
|
35
|
-
details: {
|
|
36
|
-
additionalProperties: boolean;
|
|
37
|
-
required: never[];
|
|
38
|
-
properties: {
|
|
39
|
-
titleSize: {
|
|
40
|
-
type: string;
|
|
41
|
-
enum: string[];
|
|
42
|
-
};
|
|
43
|
-
descriptionSize: {
|
|
44
|
-
type: string;
|
|
45
|
-
enum: string[];
|
|
46
|
-
};
|
|
47
|
-
};
|
|
48
|
-
};
|
|
49
|
-
priceType: {
|
|
50
|
-
type: string;
|
|
51
|
-
enum: string[];
|
|
52
|
-
};
|
|
53
|
-
numberGroupItems: {
|
|
54
|
-
type: string;
|
|
55
|
-
enum: number[];
|
|
56
|
-
};
|
|
57
|
-
isCombined: {
|
|
58
|
-
type: string;
|
|
59
|
-
};
|
|
60
|
-
useMixedView: {
|
|
61
|
-
type: string;
|
|
62
|
-
};
|
|
63
|
-
foldable: {
|
|
64
|
-
additionalProperties: boolean;
|
|
65
|
-
required: string[];
|
|
66
|
-
properties: {
|
|
67
|
-
title: {
|
|
68
|
-
type: string;
|
|
69
|
-
contentType: string;
|
|
70
|
-
};
|
|
71
|
-
size: {
|
|
72
|
-
type: string;
|
|
73
|
-
enum: string[];
|
|
74
|
-
};
|
|
75
|
-
titleColor: {
|
|
76
|
-
type: string;
|
|
77
|
-
enum: string[];
|
|
78
|
-
};
|
|
79
|
-
};
|
|
80
|
-
};
|
|
81
|
-
labelsDefaultText: {
|
|
82
|
-
additionalProperties: boolean;
|
|
83
|
-
required: never[];
|
|
84
|
-
properties: {};
|
|
85
|
-
};
|
|
86
|
-
animated: {
|
|
87
|
-
type: string;
|
|
88
|
-
};
|
|
89
|
-
type: {};
|
|
90
|
-
when: {};
|
|
91
|
-
};
|
|
92
|
-
};
|
|
93
|
-
};
|
|
@@ -1,152 +0,0 @@
|
|
|
1
|
-
import { BaseProps, AnimatableProps, textSize } from '../../schema/validators/common';
|
|
2
|
-
import { filteredArray } from '../../schema/validators/utils';
|
|
3
|
-
const PriceDetailedDetailsType = ['marked-list', 'settings'];
|
|
4
|
-
const PriceDetailedDescriptionColor = ['cornflower', 'black'];
|
|
5
|
-
const PriceLabelColor = ['blue', 'green', 'yellow', 'purple', 'red'];
|
|
6
|
-
const LabelsDefaultTextProp = PriceLabelColor.reduce((result, labelColor) => {
|
|
7
|
-
return Object.assign(Object.assign({}, result), { [labelColor]: {
|
|
8
|
-
type: 'string',
|
|
9
|
-
} });
|
|
10
|
-
}, {});
|
|
11
|
-
const PriceDetailedLabelsDefaultTextProps = {
|
|
12
|
-
additionalProperties: false,
|
|
13
|
-
required: [],
|
|
14
|
-
properties: LabelsDefaultTextProp,
|
|
15
|
-
};
|
|
16
|
-
const PriceDetailedFoldableDetailsProps = {
|
|
17
|
-
additionalProperties: false,
|
|
18
|
-
required: ['title'],
|
|
19
|
-
properties: {
|
|
20
|
-
title: {
|
|
21
|
-
type: 'string',
|
|
22
|
-
contentType: 'text',
|
|
23
|
-
},
|
|
24
|
-
size: {
|
|
25
|
-
type: 'string',
|
|
26
|
-
enum: textSize,
|
|
27
|
-
},
|
|
28
|
-
titleColor: {
|
|
29
|
-
type: 'string',
|
|
30
|
-
enum: PriceDetailedDescriptionColor,
|
|
31
|
-
},
|
|
32
|
-
},
|
|
33
|
-
};
|
|
34
|
-
const PriceDetailedDetailsProps = {
|
|
35
|
-
additionalProperties: false,
|
|
36
|
-
required: [],
|
|
37
|
-
properties: {
|
|
38
|
-
titleSize: {
|
|
39
|
-
type: 'string',
|
|
40
|
-
enum: textSize,
|
|
41
|
-
},
|
|
42
|
-
descriptionSize: {
|
|
43
|
-
type: 'string',
|
|
44
|
-
enum: textSize,
|
|
45
|
-
},
|
|
46
|
-
},
|
|
47
|
-
};
|
|
48
|
-
const PriceDetailedDescriptionProps = {
|
|
49
|
-
additionalProperties: false,
|
|
50
|
-
required: [],
|
|
51
|
-
properties: {
|
|
52
|
-
titleSize: {
|
|
53
|
-
type: 'string',
|
|
54
|
-
enum: textSize,
|
|
55
|
-
},
|
|
56
|
-
descriptionSize: {
|
|
57
|
-
type: 'string',
|
|
58
|
-
enum: textSize,
|
|
59
|
-
},
|
|
60
|
-
titleColor: {
|
|
61
|
-
type: 'string',
|
|
62
|
-
enum: PriceDetailedDescriptionColor,
|
|
63
|
-
},
|
|
64
|
-
},
|
|
65
|
-
};
|
|
66
|
-
const PriceDescriptionLabelProps = {
|
|
67
|
-
additionalProperties: false,
|
|
68
|
-
required: ['color'],
|
|
69
|
-
properties: {
|
|
70
|
-
color: {
|
|
71
|
-
type: 'string',
|
|
72
|
-
enum: PriceLabelColor,
|
|
73
|
-
},
|
|
74
|
-
text: {
|
|
75
|
-
type: 'string',
|
|
76
|
-
contentType: 'text',
|
|
77
|
-
},
|
|
78
|
-
size: {
|
|
79
|
-
type: 'string',
|
|
80
|
-
enum: textSize,
|
|
81
|
-
},
|
|
82
|
-
},
|
|
83
|
-
};
|
|
84
|
-
const PriceDescriptionProps = {
|
|
85
|
-
title: {
|
|
86
|
-
type: 'string',
|
|
87
|
-
contentType: 'text',
|
|
88
|
-
},
|
|
89
|
-
description: {
|
|
90
|
-
type: 'string',
|
|
91
|
-
contentType: 'yfm',
|
|
92
|
-
},
|
|
93
|
-
detailedTitle: {
|
|
94
|
-
type: 'string',
|
|
95
|
-
contentType: 'text',
|
|
96
|
-
},
|
|
97
|
-
label: PriceDescriptionLabelProps,
|
|
98
|
-
};
|
|
99
|
-
const PriceDetailsSettingsProps = {
|
|
100
|
-
type: 'object',
|
|
101
|
-
additionalProperties: false,
|
|
102
|
-
required: ['title', 'description'],
|
|
103
|
-
properties: {
|
|
104
|
-
title: {
|
|
105
|
-
type: 'string',
|
|
106
|
-
contentType: 'text',
|
|
107
|
-
},
|
|
108
|
-
description: {
|
|
109
|
-
type: 'string',
|
|
110
|
-
contentType: 'yfm',
|
|
111
|
-
},
|
|
112
|
-
},
|
|
113
|
-
};
|
|
114
|
-
const PriceDetailsListProps = {
|
|
115
|
-
type: 'object',
|
|
116
|
-
additionalProperties: false,
|
|
117
|
-
required: ['text'],
|
|
118
|
-
properties: {
|
|
119
|
-
text: {
|
|
120
|
-
type: 'string',
|
|
121
|
-
contentType: 'yfm',
|
|
122
|
-
},
|
|
123
|
-
},
|
|
124
|
-
};
|
|
125
|
-
const PriceDetailsProps = {
|
|
126
|
-
items: {
|
|
127
|
-
anyOf: [filteredArray(PriceDetailsListProps), filteredArray(PriceDetailsSettingsProps)],
|
|
128
|
-
},
|
|
129
|
-
};
|
|
130
|
-
const PriceItem = {
|
|
131
|
-
type: 'object',
|
|
132
|
-
additionalProperties: false,
|
|
133
|
-
required: ['title', 'description'],
|
|
134
|
-
properties: Object.assign(Object.assign({}, PriceDetailsProps), PriceDescriptionProps),
|
|
135
|
-
};
|
|
136
|
-
export const PriceDetailedBlock = {
|
|
137
|
-
'price-detailed': {
|
|
138
|
-
additionalProperties: false,
|
|
139
|
-
required: ['items'],
|
|
140
|
-
properties: Object.assign(Object.assign(Object.assign({}, BaseProps), AnimatableProps), { items: filteredArray(PriceItem), description: PriceDetailedDescriptionProps, details: PriceDetailedDetailsProps, priceType: {
|
|
141
|
-
type: 'string',
|
|
142
|
-
enum: PriceDetailedDetailsType,
|
|
143
|
-
}, numberGroupItems: {
|
|
144
|
-
type: 'number',
|
|
145
|
-
enum: [3, 4, 5],
|
|
146
|
-
}, isCombined: {
|
|
147
|
-
type: 'boolean',
|
|
148
|
-
}, useMixedView: {
|
|
149
|
-
type: 'boolean',
|
|
150
|
-
}, foldable: PriceDetailedFoldableDetailsProps, labelsDefaultText: PriceDetailedLabelsDefaultTextProps }),
|
|
151
|
-
},
|
|
152
|
-
};
|