@gravity-ui/page-constructor 1.20.1 → 1.20.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/build/cjs/blocks/Map/schema.d.ts +50 -54
- package/build/cjs/containers/PageConstructor/components/ConstructorBlocks/ConstructorBlocks.js +3 -3
- package/build/cjs/schema/index.js +1 -0
- package/build/cjs/schema/validators/common.d.ts +25 -27
- package/build/cjs/schema/validators/common.js +1 -1
- package/build/esm/blocks/Map/schema.d.ts +50 -54
- package/build/esm/containers/PageConstructor/components/ConstructorBlocks/ConstructorBlocks.js +3 -3
- package/build/esm/schema/index.js +1 -0
- package/build/esm/schema/validators/common.d.ts +25 -27
- package/build/esm/schema/validators/common.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.20.3](https://github.com/gravity-ui/page-constructor/compare/v1.20.2...v1.20.3) (2023-03-02)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* add uniqueness to children key prop ([#192](https://github.com/gravity-ui/page-constructor/issues/192)) ([8cbb720](https://github.com/gravity-ui/page-constructor/commit/8cbb720a4e60ccab8a3440141b3e4f5998c26a9b))
|
|
9
|
+
|
|
10
|
+
## [1.20.2](https://github.com/gravity-ui/page-constructor/compare/v1.20.1...v1.20.2) (2023-03-01)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* fix map block scheme ([#190](https://github.com/gravity-ui/page-constructor/issues/190)) ([c75ae30](https://github.com/gravity-ui/page-constructor/commit/c75ae30bc168fcd9e39c71f71501ec1b87446ef1))
|
|
16
|
+
|
|
3
17
|
## [1.20.1](https://github.com/gravity-ui/page-constructor/compare/v1.20.0...v1.20.1) (2023-03-01)
|
|
4
18
|
|
|
5
19
|
|
|
@@ -21,36 +21,34 @@ export declare const Map: {
|
|
|
21
21
|
markers: {
|
|
22
22
|
type: string;
|
|
23
23
|
items: {
|
|
24
|
-
type:
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
24
|
+
type: string;
|
|
25
|
+
additionalProperties: boolean;
|
|
26
|
+
required: never[];
|
|
27
|
+
properties: {
|
|
28
|
+
coordinate: {
|
|
29
|
+
type: string;
|
|
30
|
+
items: {
|
|
30
31
|
type: string;
|
|
31
|
-
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
address: {
|
|
35
|
+
type: string;
|
|
36
|
+
};
|
|
37
|
+
label: {
|
|
38
|
+
type: string;
|
|
39
|
+
required: never[];
|
|
40
|
+
properties: {
|
|
41
|
+
iconCaption: {
|
|
32
42
|
type: string;
|
|
33
43
|
};
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
iconCaption: {
|
|
43
|
-
type: string;
|
|
44
|
-
};
|
|
45
|
-
iconContent: {
|
|
46
|
-
type: string;
|
|
47
|
-
};
|
|
48
|
-
iconColor: {
|
|
49
|
-
type: string;
|
|
50
|
-
};
|
|
51
|
-
preset: {
|
|
52
|
-
type: string;
|
|
53
|
-
};
|
|
44
|
+
iconContent: {
|
|
45
|
+
type: string;
|
|
46
|
+
};
|
|
47
|
+
iconColor: {
|
|
48
|
+
type: string;
|
|
49
|
+
};
|
|
50
|
+
preset: {
|
|
51
|
+
type: string;
|
|
54
52
|
};
|
|
55
53
|
};
|
|
56
54
|
};
|
|
@@ -87,36 +85,34 @@ export declare const MapBlock: {
|
|
|
87
85
|
markers: {
|
|
88
86
|
type: string;
|
|
89
87
|
items: {
|
|
90
|
-
type:
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
88
|
+
type: string;
|
|
89
|
+
additionalProperties: boolean;
|
|
90
|
+
required: never[];
|
|
91
|
+
properties: {
|
|
92
|
+
coordinate: {
|
|
93
|
+
type: string;
|
|
94
|
+
items: {
|
|
96
95
|
type: string;
|
|
97
|
-
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
address: {
|
|
99
|
+
type: string;
|
|
100
|
+
};
|
|
101
|
+
label: {
|
|
102
|
+
type: string;
|
|
103
|
+
required: never[];
|
|
104
|
+
properties: {
|
|
105
|
+
iconCaption: {
|
|
98
106
|
type: string;
|
|
99
107
|
};
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
iconCaption: {
|
|
109
|
-
type: string;
|
|
110
|
-
};
|
|
111
|
-
iconContent: {
|
|
112
|
-
type: string;
|
|
113
|
-
};
|
|
114
|
-
iconColor: {
|
|
115
|
-
type: string;
|
|
116
|
-
};
|
|
117
|
-
preset: {
|
|
118
|
-
type: string;
|
|
119
|
-
};
|
|
108
|
+
iconContent: {
|
|
109
|
+
type: string;
|
|
110
|
+
};
|
|
111
|
+
iconColor: {
|
|
112
|
+
type: string;
|
|
113
|
+
};
|
|
114
|
+
preset: {
|
|
115
|
+
type: string;
|
|
120
116
|
};
|
|
121
117
|
};
|
|
122
118
|
};
|
package/build/cjs/containers/PageConstructor/components/ConstructorBlocks/ConstructorBlocks.js
CHANGED
|
@@ -20,7 +20,7 @@ const ConstructorBlocks = ({ items, shouldRenderBlock }) => {
|
|
|
20
20
|
let itemElement;
|
|
21
21
|
const key = (0, utils_1.getBlockKey)(item, index);
|
|
22
22
|
const blockId = parentId ? `${parentId}_${key}` : key;
|
|
23
|
-
if (shouldRenderBlock && !shouldRenderBlock(item,
|
|
23
|
+
if (shouldRenderBlock && !shouldRenderBlock(item, blockId)) {
|
|
24
24
|
return null;
|
|
25
25
|
}
|
|
26
26
|
if ('loadable' in item && item.loadable) {
|
|
@@ -29,14 +29,14 @@ const ConstructorBlocks = ({ items, shouldRenderBlock }) => {
|
|
|
29
29
|
if (!config) {
|
|
30
30
|
return null;
|
|
31
31
|
}
|
|
32
|
-
itemElement = (react_1.default.createElement(ConstructorLoadable_1.ConstructorLoadable, { block: item, key:
|
|
32
|
+
itemElement = (react_1.default.createElement(ConstructorLoadable_1.ConstructorLoadable, { block: item, key: blockId, blockKey: blockId, config: config, serviceId: serviceId, params: params }));
|
|
33
33
|
}
|
|
34
34
|
else {
|
|
35
35
|
if ('children' in item && item.children) {
|
|
36
36
|
children = item.children.map(renderer.bind(null, blockId));
|
|
37
37
|
}
|
|
38
38
|
itemElement = (react_1.default.createElement(blockIdContext_1.BlockIdContext.Provider, { value: blockId },
|
|
39
|
-
react_1.default.createElement(ConstructorItem_1.ConstructorItem, { data: item, key:
|
|
39
|
+
react_1.default.createElement(ConstructorItem_1.ConstructorItem, { data: item, key: blockId }, children)));
|
|
40
40
|
}
|
|
41
41
|
return blockTypes.includes(item.type) ? (react_1.default.createElement(ConstructorBlock_1.ConstructorBlock, { data: item, key: key, Component: itemElement })) : (itemElement);
|
|
42
42
|
};
|
|
@@ -1183,36 +1183,34 @@ export declare const MapProps: {
|
|
|
1183
1183
|
markers: {
|
|
1184
1184
|
type: string;
|
|
1185
1185
|
items: {
|
|
1186
|
-
type:
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1186
|
+
type: string;
|
|
1187
|
+
additionalProperties: boolean;
|
|
1188
|
+
required: never[];
|
|
1189
|
+
properties: {
|
|
1190
|
+
coordinate: {
|
|
1191
|
+
type: string;
|
|
1192
|
+
items: {
|
|
1192
1193
|
type: string;
|
|
1193
|
-
|
|
1194
|
+
};
|
|
1195
|
+
};
|
|
1196
|
+
address: {
|
|
1197
|
+
type: string;
|
|
1198
|
+
};
|
|
1199
|
+
label: {
|
|
1200
|
+
type: string;
|
|
1201
|
+
required: never[];
|
|
1202
|
+
properties: {
|
|
1203
|
+
iconCaption: {
|
|
1194
1204
|
type: string;
|
|
1195
1205
|
};
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
iconCaption: {
|
|
1205
|
-
type: string;
|
|
1206
|
-
};
|
|
1207
|
-
iconContent: {
|
|
1208
|
-
type: string;
|
|
1209
|
-
};
|
|
1210
|
-
iconColor: {
|
|
1211
|
-
type: string;
|
|
1212
|
-
};
|
|
1213
|
-
preset: {
|
|
1214
|
-
type: string;
|
|
1215
|
-
};
|
|
1206
|
+
iconContent: {
|
|
1207
|
+
type: string;
|
|
1208
|
+
};
|
|
1209
|
+
iconColor: {
|
|
1210
|
+
type: string;
|
|
1211
|
+
};
|
|
1212
|
+
preset: {
|
|
1213
|
+
type: string;
|
|
1216
1214
|
};
|
|
1217
1215
|
};
|
|
1218
1216
|
};
|
|
@@ -21,36 +21,34 @@ export declare const Map: {
|
|
|
21
21
|
markers: {
|
|
22
22
|
type: string;
|
|
23
23
|
items: {
|
|
24
|
-
type:
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
24
|
+
type: string;
|
|
25
|
+
additionalProperties: boolean;
|
|
26
|
+
required: never[];
|
|
27
|
+
properties: {
|
|
28
|
+
coordinate: {
|
|
29
|
+
type: string;
|
|
30
|
+
items: {
|
|
30
31
|
type: string;
|
|
31
|
-
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
address: {
|
|
35
|
+
type: string;
|
|
36
|
+
};
|
|
37
|
+
label: {
|
|
38
|
+
type: string;
|
|
39
|
+
required: never[];
|
|
40
|
+
properties: {
|
|
41
|
+
iconCaption: {
|
|
32
42
|
type: string;
|
|
33
43
|
};
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
iconCaption: {
|
|
43
|
-
type: string;
|
|
44
|
-
};
|
|
45
|
-
iconContent: {
|
|
46
|
-
type: string;
|
|
47
|
-
};
|
|
48
|
-
iconColor: {
|
|
49
|
-
type: string;
|
|
50
|
-
};
|
|
51
|
-
preset: {
|
|
52
|
-
type: string;
|
|
53
|
-
};
|
|
44
|
+
iconContent: {
|
|
45
|
+
type: string;
|
|
46
|
+
};
|
|
47
|
+
iconColor: {
|
|
48
|
+
type: string;
|
|
49
|
+
};
|
|
50
|
+
preset: {
|
|
51
|
+
type: string;
|
|
54
52
|
};
|
|
55
53
|
};
|
|
56
54
|
};
|
|
@@ -87,36 +85,34 @@ export declare const MapBlock: {
|
|
|
87
85
|
markers: {
|
|
88
86
|
type: string;
|
|
89
87
|
items: {
|
|
90
|
-
type:
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
88
|
+
type: string;
|
|
89
|
+
additionalProperties: boolean;
|
|
90
|
+
required: never[];
|
|
91
|
+
properties: {
|
|
92
|
+
coordinate: {
|
|
93
|
+
type: string;
|
|
94
|
+
items: {
|
|
96
95
|
type: string;
|
|
97
|
-
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
address: {
|
|
99
|
+
type: string;
|
|
100
|
+
};
|
|
101
|
+
label: {
|
|
102
|
+
type: string;
|
|
103
|
+
required: never[];
|
|
104
|
+
properties: {
|
|
105
|
+
iconCaption: {
|
|
98
106
|
type: string;
|
|
99
107
|
};
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
iconCaption: {
|
|
109
|
-
type: string;
|
|
110
|
-
};
|
|
111
|
-
iconContent: {
|
|
112
|
-
type: string;
|
|
113
|
-
};
|
|
114
|
-
iconColor: {
|
|
115
|
-
type: string;
|
|
116
|
-
};
|
|
117
|
-
preset: {
|
|
118
|
-
type: string;
|
|
119
|
-
};
|
|
108
|
+
iconContent: {
|
|
109
|
+
type: string;
|
|
110
|
+
};
|
|
111
|
+
iconColor: {
|
|
112
|
+
type: string;
|
|
113
|
+
};
|
|
114
|
+
preset: {
|
|
115
|
+
type: string;
|
|
120
116
|
};
|
|
121
117
|
};
|
|
122
118
|
};
|
package/build/esm/containers/PageConstructor/components/ConstructorBlocks/ConstructorBlocks.js
CHANGED
|
@@ -16,7 +16,7 @@ export const ConstructorBlocks = ({ items, shouldRenderBlock }) => {
|
|
|
16
16
|
let itemElement;
|
|
17
17
|
const key = getBlockKey(item, index);
|
|
18
18
|
const blockId = parentId ? `${parentId}_${key}` : key;
|
|
19
|
-
if (shouldRenderBlock && !shouldRenderBlock(item,
|
|
19
|
+
if (shouldRenderBlock && !shouldRenderBlock(item, blockId)) {
|
|
20
20
|
return null;
|
|
21
21
|
}
|
|
22
22
|
if ('loadable' in item && item.loadable) {
|
|
@@ -25,14 +25,14 @@ export const ConstructorBlocks = ({ items, shouldRenderBlock }) => {
|
|
|
25
25
|
if (!config) {
|
|
26
26
|
return null;
|
|
27
27
|
}
|
|
28
|
-
itemElement = (React.createElement(ConstructorLoadable, { block: item, key:
|
|
28
|
+
itemElement = (React.createElement(ConstructorLoadable, { block: item, key: blockId, blockKey: blockId, config: config, serviceId: serviceId, params: params }));
|
|
29
29
|
}
|
|
30
30
|
else {
|
|
31
31
|
if ('children' in item && item.children) {
|
|
32
32
|
children = item.children.map(renderer.bind(null, blockId));
|
|
33
33
|
}
|
|
34
34
|
itemElement = (React.createElement(BlockIdContext.Provider, { value: blockId },
|
|
35
|
-
React.createElement(ConstructorItem, { data: item, key:
|
|
35
|
+
React.createElement(ConstructorItem, { data: item, key: blockId }, children)));
|
|
36
36
|
}
|
|
37
37
|
return blockTypes.includes(item.type) ? (React.createElement(ConstructorBlock, { data: item, key: key, Component: itemElement })) : (itemElement);
|
|
38
38
|
};
|
|
@@ -1183,36 +1183,34 @@ export declare const MapProps: {
|
|
|
1183
1183
|
markers: {
|
|
1184
1184
|
type: string;
|
|
1185
1185
|
items: {
|
|
1186
|
-
type:
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1186
|
+
type: string;
|
|
1187
|
+
additionalProperties: boolean;
|
|
1188
|
+
required: never[];
|
|
1189
|
+
properties: {
|
|
1190
|
+
coordinate: {
|
|
1191
|
+
type: string;
|
|
1192
|
+
items: {
|
|
1192
1193
|
type: string;
|
|
1193
|
-
|
|
1194
|
+
};
|
|
1195
|
+
};
|
|
1196
|
+
address: {
|
|
1197
|
+
type: string;
|
|
1198
|
+
};
|
|
1199
|
+
label: {
|
|
1200
|
+
type: string;
|
|
1201
|
+
required: never[];
|
|
1202
|
+
properties: {
|
|
1203
|
+
iconCaption: {
|
|
1194
1204
|
type: string;
|
|
1195
1205
|
};
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
iconCaption: {
|
|
1205
|
-
type: string;
|
|
1206
|
-
};
|
|
1207
|
-
iconContent: {
|
|
1208
|
-
type: string;
|
|
1209
|
-
};
|
|
1210
|
-
iconColor: {
|
|
1211
|
-
type: string;
|
|
1212
|
-
};
|
|
1213
|
-
preset: {
|
|
1214
|
-
type: string;
|
|
1215
|
-
};
|
|
1206
|
+
iconContent: {
|
|
1207
|
+
type: string;
|
|
1208
|
+
};
|
|
1209
|
+
iconColor: {
|
|
1210
|
+
type: string;
|
|
1211
|
+
};
|
|
1212
|
+
preset: {
|
|
1213
|
+
type: string;
|
|
1216
1214
|
};
|
|
1217
1215
|
};
|
|
1218
1216
|
};
|