@doyourjob/gravity-ui-page-constructor 5.31.210 → 5.31.211
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/Audio/schema.d.ts +4 -0
- package/build/cjs/blocks/BannerMinify/schema.d.ts +4 -0
- package/build/cjs/blocks/Benchmark/schema.d.ts +4 -0
- package/build/cjs/blocks/CardLayout/schema.d.ts +8 -0
- package/build/cjs/blocks/Cat/schema.d.ts +4 -0
- package/build/cjs/blocks/ContentLayout/schema.d.ts +4 -0
- package/build/cjs/blocks/ExtendedFeatures/schema.d.ts +4 -0
- package/build/cjs/blocks/FilterBlock/schema.d.ts +8 -0
- package/build/cjs/blocks/FilterCardLayout/schema.d.ts +4 -0
- package/build/cjs/blocks/Form/schema.d.ts +4 -0
- package/build/cjs/blocks/Header/schema.d.ts +4 -0
- package/build/cjs/blocks/HeaderMinify/schema.d.ts +4 -0
- package/build/cjs/blocks/HeaderSlider/schema.d.ts +4 -0
- package/build/cjs/blocks/HighlightTable/schema.d.ts +4 -0
- package/build/cjs/blocks/Icons/schema.d.ts +8 -0
- package/build/cjs/blocks/Layout/Layout.css +22 -0
- package/build/cjs/blocks/Layout/Layout.d.ts +4 -0
- package/build/cjs/blocks/Layout/Layout.js +66 -0
- package/build/cjs/blocks/Layout/schema.d.ts +161 -0
- package/build/cjs/blocks/Layout/schema.js +17 -0
- package/build/cjs/blocks/Map/schema.d.ts +4 -0
- package/build/cjs/blocks/Media/schema.d.ts +8 -0
- package/build/cjs/blocks/OnetrustCookieList/schema.d.ts +4 -0
- package/build/cjs/blocks/PromoFeaturesBlock/schema.d.ts +4 -0
- package/build/cjs/blocks/Questions/schema.d.ts +4 -0
- package/build/cjs/blocks/SidebarWidget/schema.d.ts +4 -0
- package/build/cjs/blocks/Slider/schema.d.ts +4 -0
- package/build/cjs/blocks/SliderNew/schema.d.ts +4 -0
- package/build/cjs/blocks/TabLinks/schema.d.ts +4 -0
- package/build/cjs/blocks/Table/schema.d.ts +4 -0
- package/build/cjs/blocks/Tabs/schema.d.ts +4 -0
- package/build/cjs/blocks/TabsHighlightTable/schema.d.ts +4 -0
- package/build/cjs/blocks/index.d.ts +1 -0
- package/build/cjs/blocks/index.js +4 -2
- package/build/cjs/constructor-items.d.ts +1 -0
- package/build/cjs/constructor-items.js +1 -0
- package/build/cjs/models/constructor-items/blocks.d.ts +12 -2
- package/build/cjs/models/constructor-items/blocks.js +1 -0
- package/build/cjs/schema/constants.d.ts +8 -0
- package/build/cjs/schema/constants.js +2 -1
- package/build/cjs/schema/validators/blocks.d.ts +1 -0
- package/build/cjs/schema/validators/blocks.js +1 -0
- package/build/cjs/schema/validators/common.d.ts +4 -0
- package/build/cjs/schema/validators/common.js +3 -0
- package/build/cjs/sub-blocks/ContentLayoutCard/schema.d.ts +4 -0
- package/build/cjs/sub-blocks/StoryCard/schema.d.ts +4 -0
- package/build/esm/blocks/Audio/schema.d.ts +4 -0
- package/build/esm/blocks/BannerMinify/schema.d.ts +4 -0
- package/build/esm/blocks/Benchmark/schema.d.ts +4 -0
- package/build/esm/blocks/CardLayout/schema.d.ts +8 -0
- package/build/esm/blocks/Cat/schema.d.ts +4 -0
- package/build/esm/blocks/ContentLayout/schema.d.ts +4 -0
- package/build/esm/blocks/ExtendedFeatures/schema.d.ts +4 -0
- package/build/esm/blocks/FilterBlock/schema.d.ts +8 -0
- package/build/esm/blocks/FilterCardLayout/schema.d.ts +4 -0
- package/build/esm/blocks/Form/schema.d.ts +4 -0
- package/build/esm/blocks/Header/schema.d.ts +4 -0
- package/build/esm/blocks/HeaderMinify/schema.d.ts +4 -0
- package/build/esm/blocks/HeaderSlider/schema.d.ts +4 -0
- package/build/esm/blocks/HighlightTable/schema.d.ts +4 -0
- package/build/esm/blocks/Icons/schema.d.ts +8 -0
- package/build/esm/blocks/Layout/Layout.css +22 -0
- package/build/esm/blocks/Layout/Layout.d.ts +5 -0
- package/build/esm/blocks/Layout/Layout.js +62 -0
- package/build/esm/blocks/Layout/schema.d.ts +161 -0
- package/build/esm/blocks/Layout/schema.js +14 -0
- package/build/esm/blocks/Map/schema.d.ts +4 -0
- package/build/esm/blocks/Media/schema.d.ts +8 -0
- package/build/esm/blocks/OnetrustCookieList/schema.d.ts +4 -0
- package/build/esm/blocks/PromoFeaturesBlock/schema.d.ts +4 -0
- package/build/esm/blocks/Questions/schema.d.ts +4 -0
- package/build/esm/blocks/SidebarWidget/schema.d.ts +4 -0
- package/build/esm/blocks/Slider/schema.d.ts +4 -0
- package/build/esm/blocks/SliderNew/schema.d.ts +4 -0
- package/build/esm/blocks/TabLinks/schema.d.ts +4 -0
- package/build/esm/blocks/Table/schema.d.ts +4 -0
- package/build/esm/blocks/Tabs/schema.d.ts +4 -0
- package/build/esm/blocks/TabsHighlightTable/schema.d.ts +4 -0
- package/build/esm/blocks/index.d.ts +1 -0
- package/build/esm/blocks/index.js +1 -0
- package/build/esm/constructor-items.d.ts +1 -0
- package/build/esm/constructor-items.js +2 -1
- package/build/esm/models/constructor-items/blocks.d.ts +12 -2
- package/build/esm/models/constructor-items/blocks.js +1 -0
- package/build/esm/schema/constants.d.ts +8 -0
- package/build/esm/schema/constants.js +3 -2
- package/build/esm/schema/validators/blocks.d.ts +1 -0
- package/build/esm/schema/validators/blocks.js +1 -0
- package/build/esm/schema/validators/common.d.ts +4 -0
- package/build/esm/schema/validators/common.js +3 -0
- package/build/esm/sub-blocks/ContentLayoutCard/schema.d.ts +4 -0
- package/build/esm/sub-blocks/StoryCard/schema.d.ts +4 -0
- package/package.json +1 -1
- package/schema/index.js +1 -1
- package/server/models/constructor-items/blocks.d.ts +12 -2
- package/server/models/constructor-items/blocks.js +1 -0
- package/widget/index.js +1 -1
|
@@ -410,6 +410,10 @@ export declare const CardLayoutProps: {
|
|
|
410
410
|
};
|
|
411
411
|
})[];
|
|
412
412
|
};
|
|
413
|
+
column: {
|
|
414
|
+
type: string;
|
|
415
|
+
enum: string[];
|
|
416
|
+
};
|
|
413
417
|
type: {};
|
|
414
418
|
when: {
|
|
415
419
|
type: string;
|
|
@@ -829,6 +833,10 @@ export declare const CardLayoutBlock: {
|
|
|
829
833
|
};
|
|
830
834
|
})[];
|
|
831
835
|
};
|
|
836
|
+
column: {
|
|
837
|
+
type: string;
|
|
838
|
+
enum: string[];
|
|
839
|
+
};
|
|
832
840
|
type: {};
|
|
833
841
|
when: {
|
|
834
842
|
type: string;
|
|
@@ -362,6 +362,10 @@ export declare const FilterProps: {
|
|
|
362
362
|
};
|
|
363
363
|
})[];
|
|
364
364
|
};
|
|
365
|
+
column: {
|
|
366
|
+
type: string;
|
|
367
|
+
enum: string[];
|
|
368
|
+
};
|
|
365
369
|
type: {};
|
|
366
370
|
when: {
|
|
367
371
|
type: string;
|
|
@@ -706,6 +710,10 @@ export declare const FilterBlock: {
|
|
|
706
710
|
};
|
|
707
711
|
})[];
|
|
708
712
|
};
|
|
713
|
+
column: {
|
|
714
|
+
type: string;
|
|
715
|
+
enum: string[];
|
|
716
|
+
};
|
|
709
717
|
type: {};
|
|
710
718
|
when: {
|
|
711
719
|
type: string;
|
|
@@ -407,6 +407,10 @@ export declare const IconsProps: {
|
|
|
407
407
|
};
|
|
408
408
|
})[];
|
|
409
409
|
};
|
|
410
|
+
column: {
|
|
411
|
+
type: string;
|
|
412
|
+
enum: string[];
|
|
413
|
+
};
|
|
410
414
|
type: {};
|
|
411
415
|
when: {
|
|
412
416
|
type: string;
|
|
@@ -823,6 +827,10 @@ export declare const IconsBlock: {
|
|
|
823
827
|
};
|
|
824
828
|
})[];
|
|
825
829
|
};
|
|
830
|
+
column: {
|
|
831
|
+
type: string;
|
|
832
|
+
enum: string[];
|
|
833
|
+
};
|
|
826
834
|
type: {};
|
|
827
835
|
when: {
|
|
828
836
|
type: string;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/* use this for style redefinitions to awoid problems with
|
|
2
|
+
unpredictable css rules order in build */
|
|
3
|
+
.pc-layout-block {
|
|
4
|
+
margin: 0;
|
|
5
|
+
padding: 0;
|
|
6
|
+
}
|
|
7
|
+
.pc-layout-block__left-col.pc-layout-block__left-col {
|
|
8
|
+
padding: 0;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.pc-layout-block__right-col.pc-layout-block__right-col {
|
|
12
|
+
padding: 0;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.pc-layout-block__row {
|
|
16
|
+
padding: 0;
|
|
17
|
+
margin: 0;
|
|
18
|
+
}
|
|
19
|
+
.pc-layout-block__item {
|
|
20
|
+
margin: 0;
|
|
21
|
+
padding: 0 8px;
|
|
22
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LayoutBlock = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const react_1 = tslib_1.__importStar(require("react"));
|
|
6
|
+
const grid_1 = require("../../grid");
|
|
7
|
+
const cn_1 = require("../../utils/cn");
|
|
8
|
+
const b = (0, cn_1.block)('layout-block');
|
|
9
|
+
const LayoutBlock = ({ fullWidth, mobileOrder, revertMode, children, }) => {
|
|
10
|
+
const layout = (0, react_1.useMemo)(() => {
|
|
11
|
+
const layoutConfig = revertMode
|
|
12
|
+
? {
|
|
13
|
+
leftCol: {
|
|
14
|
+
sizes: { all: 12, lg: 4 },
|
|
15
|
+
orders: { all: 1, lg: 1 },
|
|
16
|
+
},
|
|
17
|
+
rightCol: {
|
|
18
|
+
sizes: { all: 12, lg: 6 },
|
|
19
|
+
offsets: {
|
|
20
|
+
all: 0,
|
|
21
|
+
lg: 1,
|
|
22
|
+
},
|
|
23
|
+
orders: { all: 2, lg: 2 },
|
|
24
|
+
},
|
|
25
|
+
}
|
|
26
|
+
: {
|
|
27
|
+
leftCol: {
|
|
28
|
+
sizes: { all: 12, lg: 8 },
|
|
29
|
+
orders: { all: 1, lg: 1 },
|
|
30
|
+
},
|
|
31
|
+
rightCol: {
|
|
32
|
+
sizes: { all: 12, lg: 3 },
|
|
33
|
+
offsets: {
|
|
34
|
+
all: 0,
|
|
35
|
+
lg: 1,
|
|
36
|
+
},
|
|
37
|
+
orders: { all: 2, lg: 2 },
|
|
38
|
+
},
|
|
39
|
+
};
|
|
40
|
+
if (fullWidth) {
|
|
41
|
+
layoutConfig.leftCol.sizes = { all: 12 };
|
|
42
|
+
layoutConfig.rightCol.sizes = { all: 12 };
|
|
43
|
+
layoutConfig.rightCol.offsets = { all: 0 };
|
|
44
|
+
}
|
|
45
|
+
if (mobileOrder === 'reverse') {
|
|
46
|
+
layoutConfig.leftCol.orders = { all: 3, lg: 1 };
|
|
47
|
+
}
|
|
48
|
+
return layoutConfig;
|
|
49
|
+
}, [fullWidth, mobileOrder, revertMode]);
|
|
50
|
+
const renderChildren = (blockChildren) => react_1.default.Children.map(blockChildren, (child, i) => (react_1.default.createElement("div", { key: i, className: b('item') }, child)));
|
|
51
|
+
const { left, right } = (0, react_1.useMemo)(() => children === null || children === void 0 ? void 0 : children.reduce((sortedChildren, child) => {
|
|
52
|
+
var _a, _b;
|
|
53
|
+
if (((_b = (_a = child === null || child === void 0 ? void 0 : child.props) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.column) === 'left') {
|
|
54
|
+
sortedChildren.left.push(child);
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
sortedChildren.right.push(child);
|
|
58
|
+
}
|
|
59
|
+
return sortedChildren;
|
|
60
|
+
}, { left: [], right: [] }), [children]);
|
|
61
|
+
return (react_1.default.createElement(grid_1.Row, { className: b('row'), noGutter: true },
|
|
62
|
+
react_1.default.createElement(grid_1.Col, Object.assign({ className: b('left-col') }, layout.leftCol), left && renderChildren(left)),
|
|
63
|
+
react_1.default.createElement(grid_1.Col, Object.assign({ className: b('right-col') }, layout.rightCol), right && renderChildren(right))));
|
|
64
|
+
};
|
|
65
|
+
exports.LayoutBlock = LayoutBlock;
|
|
66
|
+
exports.default = exports.LayoutBlock;
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
export declare const LayoutBlock: {
|
|
2
|
+
"layout-block": {
|
|
3
|
+
type: string;
|
|
4
|
+
additionalProperties: boolean;
|
|
5
|
+
required: string[];
|
|
6
|
+
properties: {
|
|
7
|
+
children: {
|
|
8
|
+
type: string;
|
|
9
|
+
items: {
|
|
10
|
+
$ref: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
mobileOrder: {
|
|
14
|
+
type: string;
|
|
15
|
+
enum: string[];
|
|
16
|
+
};
|
|
17
|
+
revertMode: {
|
|
18
|
+
type: string;
|
|
19
|
+
};
|
|
20
|
+
anchor: {
|
|
21
|
+
type: string;
|
|
22
|
+
additionalProperties: boolean;
|
|
23
|
+
required: string[];
|
|
24
|
+
properties: {
|
|
25
|
+
text: {
|
|
26
|
+
type: string;
|
|
27
|
+
contentType: string;
|
|
28
|
+
};
|
|
29
|
+
url: {
|
|
30
|
+
type: string;
|
|
31
|
+
};
|
|
32
|
+
urlTitle: {
|
|
33
|
+
type: string;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
visibility: {
|
|
38
|
+
oneOf: ({
|
|
39
|
+
type: string;
|
|
40
|
+
enum: string[];
|
|
41
|
+
additionalProperties?: undefined;
|
|
42
|
+
properties?: undefined;
|
|
43
|
+
} | {
|
|
44
|
+
type: string;
|
|
45
|
+
additionalProperties: boolean;
|
|
46
|
+
properties: {
|
|
47
|
+
xs: {
|
|
48
|
+
type: string;
|
|
49
|
+
};
|
|
50
|
+
sm: {
|
|
51
|
+
type: string;
|
|
52
|
+
};
|
|
53
|
+
md: {
|
|
54
|
+
type: string;
|
|
55
|
+
};
|
|
56
|
+
lg: {
|
|
57
|
+
type: string;
|
|
58
|
+
};
|
|
59
|
+
xl: {
|
|
60
|
+
type: string;
|
|
61
|
+
};
|
|
62
|
+
xxl: {
|
|
63
|
+
type: string;
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
enum?: undefined;
|
|
67
|
+
})[];
|
|
68
|
+
};
|
|
69
|
+
visible: {
|
|
70
|
+
type: string;
|
|
71
|
+
enum: string[];
|
|
72
|
+
};
|
|
73
|
+
hidden: {
|
|
74
|
+
type: string;
|
|
75
|
+
enum: string[];
|
|
76
|
+
};
|
|
77
|
+
resetPaddings: {
|
|
78
|
+
type: string;
|
|
79
|
+
};
|
|
80
|
+
context: {
|
|
81
|
+
type: string;
|
|
82
|
+
};
|
|
83
|
+
indent: {
|
|
84
|
+
type: string;
|
|
85
|
+
additionalProperties: boolean;
|
|
86
|
+
properties: {
|
|
87
|
+
top: {
|
|
88
|
+
enum: string[];
|
|
89
|
+
};
|
|
90
|
+
bottom: {
|
|
91
|
+
enum: string[];
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
backgroundFull: {
|
|
96
|
+
type: string;
|
|
97
|
+
};
|
|
98
|
+
visibilityFilter: {
|
|
99
|
+
oneOf: ({
|
|
100
|
+
type: string;
|
|
101
|
+
items?: undefined;
|
|
102
|
+
} | {
|
|
103
|
+
type: string;
|
|
104
|
+
items: {
|
|
105
|
+
type: string;
|
|
106
|
+
};
|
|
107
|
+
})[];
|
|
108
|
+
};
|
|
109
|
+
blockUnicorn: {
|
|
110
|
+
type: string;
|
|
111
|
+
};
|
|
112
|
+
blockBackground: {
|
|
113
|
+
oneOf: ({
|
|
114
|
+
type: string;
|
|
115
|
+
additionalProperties?: undefined;
|
|
116
|
+
properties?: undefined;
|
|
117
|
+
} | {
|
|
118
|
+
type: string;
|
|
119
|
+
additionalProperties: boolean;
|
|
120
|
+
properties: {
|
|
121
|
+
color: {
|
|
122
|
+
type: string;
|
|
123
|
+
};
|
|
124
|
+
image: {
|
|
125
|
+
type: string;
|
|
126
|
+
};
|
|
127
|
+
size: {
|
|
128
|
+
type: string;
|
|
129
|
+
};
|
|
130
|
+
repeat: {
|
|
131
|
+
type: string;
|
|
132
|
+
};
|
|
133
|
+
position: {
|
|
134
|
+
type: string;
|
|
135
|
+
};
|
|
136
|
+
attachment: {
|
|
137
|
+
type: string;
|
|
138
|
+
};
|
|
139
|
+
clip: {
|
|
140
|
+
type: string;
|
|
141
|
+
};
|
|
142
|
+
origin: {
|
|
143
|
+
type: string;
|
|
144
|
+
};
|
|
145
|
+
blendMode: {
|
|
146
|
+
type: string;
|
|
147
|
+
};
|
|
148
|
+
};
|
|
149
|
+
})[];
|
|
150
|
+
};
|
|
151
|
+
column: {
|
|
152
|
+
type: string;
|
|
153
|
+
enum: string[];
|
|
154
|
+
};
|
|
155
|
+
type: {};
|
|
156
|
+
when: {
|
|
157
|
+
type: string;
|
|
158
|
+
};
|
|
159
|
+
};
|
|
160
|
+
};
|
|
161
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LayoutBlock = void 0;
|
|
4
|
+
const common_1 = require("../../schema/validators/common");
|
|
5
|
+
exports.LayoutBlock = {
|
|
6
|
+
['layout-block']: {
|
|
7
|
+
type: 'object',
|
|
8
|
+
additionalProperties: false,
|
|
9
|
+
required: ['children'],
|
|
10
|
+
properties: Object.assign(Object.assign({}, common_1.BlockBaseProps), { children: common_1.ChildrenProps, mobileOrder: {
|
|
11
|
+
type: 'string',
|
|
12
|
+
enum: ['reverse', 'straight'],
|
|
13
|
+
}, revertMode: {
|
|
14
|
+
type: 'boolean',
|
|
15
|
+
} }),
|
|
16
|
+
},
|
|
17
|
+
};
|
|
@@ -853,6 +853,10 @@ export declare const MediaBlockBaseProps: {
|
|
|
853
853
|
};
|
|
854
854
|
})[];
|
|
855
855
|
};
|
|
856
|
+
column: {
|
|
857
|
+
type: string;
|
|
858
|
+
enum: string[];
|
|
859
|
+
};
|
|
856
860
|
type: {};
|
|
857
861
|
when: {
|
|
858
862
|
type: string;
|
|
@@ -1727,6 +1731,10 @@ export declare const MediaBlock: {
|
|
|
1727
1731
|
};
|
|
1728
1732
|
})[];
|
|
1729
1733
|
};
|
|
1734
|
+
column: {
|
|
1735
|
+
type: string;
|
|
1736
|
+
enum: string[];
|
|
1737
|
+
};
|
|
1730
1738
|
type: {};
|
|
1731
1739
|
when: {
|
|
1732
1740
|
type: string;
|
|
@@ -34,6 +34,7 @@ export { default as QuotesBlock } from './Quotes/Quotes';
|
|
|
34
34
|
export { default as ReportsBlock } from './Reports/Reports';
|
|
35
35
|
export { default as ScienceHeaderBlock } from './ScienceHeader/ScienceHeader';
|
|
36
36
|
export { default as AboutHeaderBlock } from './AboutHeader/AboutHeader';
|
|
37
|
+
export { default as LayoutBlock } from './Layout/Layout';
|
|
37
38
|
export { default as PartnerHeaderBlock } from './PartnerHeader/PartnerHeader';
|
|
38
39
|
export { default as ReportsCardsBlock } from './ReportsCards/ReportsCards';
|
|
39
40
|
export { default as ReportsSectionsBlock } from './ReportsSections/ReportsSections';
|