@doyourjob/gravity-ui-page-constructor 5.31.249 → 5.31.252
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/Scroller/Scroller.js +119 -36
- package/build/cjs/blocks/Scroller/schema.d.ts +0 -6
- package/build/cjs/blocks/Scroller/schema.js +0 -3
- package/build/cjs/blocks/WhatsNew/WhatsNew.js +2 -2
- package/build/cjs/blocks/WhatsNew/schema.d.ts +0 -3
- 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 +1 -2
- package/build/cjs/models/constructor-items/sub-blocks.d.ts +25 -2
- package/build/cjs/models/constructor-items/sub-blocks.js +1 -0
- package/build/cjs/schema/constants.d.ts +211 -2
- package/build/cjs/schema/constants.js +2 -1
- package/build/cjs/schema/validators/sub-blocks.d.ts +1 -0
- package/build/cjs/schema/validators/sub-blocks.js +1 -0
- package/build/cjs/sub-blocks/MiniCaseCard/MiniCaseCard.css +149 -0
- package/build/cjs/sub-blocks/MiniCaseCard/MiniCaseCard.d.ts +4 -0
- package/build/cjs/sub-blocks/MiniCaseCard/MiniCaseCard.js +54 -0
- package/build/cjs/sub-blocks/MiniCaseCard/schema.d.ts +211 -0
- package/build/cjs/sub-blocks/MiniCaseCard/schema.js +28 -0
- package/build/cjs/sub-blocks/index.d.ts +1 -0
- package/build/cjs/sub-blocks/index.js +3 -1
- package/build/cjs/text-transform/config.js +11 -0
- package/build/esm/blocks/Scroller/Scroller.js +119 -36
- package/build/esm/blocks/Scroller/schema.d.ts +0 -6
- package/build/esm/blocks/Scroller/schema.js +0 -3
- package/build/esm/blocks/WhatsNew/WhatsNew.js +2 -2
- package/build/esm/blocks/WhatsNew/schema.d.ts +0 -3
- 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 +1 -2
- package/build/esm/models/constructor-items/sub-blocks.d.ts +25 -2
- package/build/esm/models/constructor-items/sub-blocks.js +1 -0
- package/build/esm/schema/constants.d.ts +211 -2
- package/build/esm/schema/constants.js +3 -2
- package/build/esm/schema/validators/sub-blocks.d.ts +1 -0
- package/build/esm/schema/validators/sub-blocks.js +1 -0
- package/build/esm/sub-blocks/MiniCaseCard/MiniCaseCard.css +149 -0
- package/build/esm/sub-blocks/MiniCaseCard/MiniCaseCard.d.ts +5 -0
- package/build/esm/sub-blocks/MiniCaseCard/MiniCaseCard.js +52 -0
- package/build/esm/sub-blocks/MiniCaseCard/schema.d.ts +211 -0
- package/build/esm/sub-blocks/MiniCaseCard/schema.js +25 -0
- package/build/esm/sub-blocks/index.d.ts +1 -0
- package/build/esm/sub-blocks/index.js +1 -0
- package/build/esm/text-transform/config.js +11 -0
- package/package.json +1 -1
- package/schema/index.js +1 -1
- package/server/models/constructor-items/blocks.d.ts +1 -2
- package/server/models/constructor-items/sub-blocks.d.ts +25 -2
- package/server/models/constructor-items/sub-blocks.js +1 -0
- package/server/text-transform/config.js +11 -0
- package/widget/index.js +1 -1
|
@@ -24,6 +24,65 @@ const scrollToChild = (content, child, behavior = 'smooth') => {
|
|
|
24
24
|
const left = child.offsetLeft - (content.offsetWidth - child.offsetWidth) / 2;
|
|
25
25
|
content.scrollTo({ left, behavior });
|
|
26
26
|
};
|
|
27
|
+
const MIDDLE_COPY = 1;
|
|
28
|
+
const normalizeToMiddleCopy = (content, childCount) => {
|
|
29
|
+
const centeredIndex = getCenteredChildIndex(content);
|
|
30
|
+
const logicalIndex = centeredIndex % childCount;
|
|
31
|
+
const currentCopy = Math.floor(centeredIndex / childCount);
|
|
32
|
+
if (currentCopy === MIDDLE_COPY) {
|
|
33
|
+
return false;
|
|
34
|
+
}
|
|
35
|
+
const middleChild = getChild(content, childCount + logicalIndex);
|
|
36
|
+
if (middleChild) {
|
|
37
|
+
scrollToChild(content, middleChild, 'auto');
|
|
38
|
+
}
|
|
39
|
+
return true;
|
|
40
|
+
};
|
|
41
|
+
const getTargetPhysicalIndex = (centeredPhysicalIndex, targetLogicalIndex, childCount, preferForward) => {
|
|
42
|
+
const currentLogical = centeredPhysicalIndex % childCount;
|
|
43
|
+
const forwardSteps = (targetLogicalIndex - currentLogical + childCount) % childCount;
|
|
44
|
+
const backwardSteps = (currentLogical - targetLogicalIndex + childCount) % childCount;
|
|
45
|
+
if (preferForward || forwardSteps <= backwardSteps) {
|
|
46
|
+
if (forwardSteps === 0) {
|
|
47
|
+
return MIDDLE_COPY * childCount + targetLogicalIndex;
|
|
48
|
+
}
|
|
49
|
+
return centeredPhysicalIndex + forwardSteps;
|
|
50
|
+
}
|
|
51
|
+
if (backwardSteps === 0) {
|
|
52
|
+
return MIDDLE_COPY * childCount + targetLogicalIndex;
|
|
53
|
+
}
|
|
54
|
+
return centeredPhysicalIndex - backwardSteps;
|
|
55
|
+
};
|
|
56
|
+
const SCROLL_IDLE_MS = 200;
|
|
57
|
+
const NORMALIZE_BEFORE_SNAP_MS = 100;
|
|
58
|
+
const scrollToMiddleCopyIndex = (content, targetLogicalIndex, childCount) => {
|
|
59
|
+
const runScroll = () => {
|
|
60
|
+
const targetChild = getChild(content, childCount + targetLogicalIndex);
|
|
61
|
+
if (targetChild) {
|
|
62
|
+
scrollToChild(content, targetChild);
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
if (normalizeToMiddleCopy(content, childCount)) {
|
|
66
|
+
requestAnimationFrame(runScroll);
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
runScroll();
|
|
70
|
+
};
|
|
71
|
+
const scrollToLogicalIndex = (content, targetLogicalIndex, childCount, preferForward) => {
|
|
72
|
+
const runScroll = () => {
|
|
73
|
+
const centeredIndex = getCenteredChildIndex(content);
|
|
74
|
+
const targetPhysical = getTargetPhysicalIndex(centeredIndex, targetLogicalIndex, childCount, preferForward);
|
|
75
|
+
const targetChild = getChild(content, targetPhysical);
|
|
76
|
+
if (targetChild) {
|
|
77
|
+
scrollToChild(content, targetChild);
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
if (normalizeToMiddleCopy(content, childCount)) {
|
|
81
|
+
requestAnimationFrame(runScroll);
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
runScroll();
|
|
85
|
+
};
|
|
27
86
|
const PlayIcon = () => {
|
|
28
87
|
return (react_1.default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "30", height: "30", viewBox: "0 0 30 30", fill: "none" },
|
|
29
88
|
react_1.default.createElement("path", { d: "M13.765 9.83831L20.3154 13.7086C21.2977 14.289 21.298 15.7102 20.3159 16.2911L13.7714 20.1618C12.7719 20.7529 11.5086 20.033 11.5078 18.8718L11.502 11.1309C11.5011 9.96894 12.7646 9.24725 13.765 9.83831Z", fill: "currentColor" })));
|
|
@@ -33,14 +92,17 @@ const PauseIcon = () => {
|
|
|
33
92
|
react_1.default.createElement("path", { d: "M12.5 10C13.3284 10 14 10.6716 14 11.5V18.5C14 19.3284 13.3284 20 12.5 20C11.6716 20 11 19.3284 11 18.5V11.5C11 10.6716 11.6716 10 12.5 10ZM17.5 10C18.3284 10 19 10.6716 19 11.5V18.5C19 19.3284 18.3284 20 17.5 20C16.6716 20 16 19.3284 16 18.5V11.5C16 10.6716 16.6716 10 17.5 10Z", fill: "currentColor" })));
|
|
34
93
|
};
|
|
35
94
|
const ScrollerBlock = (props) => {
|
|
36
|
-
const { animated, widths, gapLong, fullWidth,
|
|
95
|
+
const { animated, widths, gapLong, fullWidth, children, autoScroll = true, autoScrollInterval = 3000, infinite = false, } = props;
|
|
37
96
|
const childCount = react_1.default.Children.count(children);
|
|
38
97
|
const rootRef = (0, react_1.useRef)(null);
|
|
39
98
|
const contentRef = (0, react_1.useRef)(null);
|
|
40
99
|
const [currentElement, setCurrentElement] = (0, react_1.useState)(0);
|
|
41
100
|
const [isPaused, setIsPaused] = (0, react_1.useState)(true);
|
|
42
101
|
const [scrollInProgress, setScrollInProgress] = (0, react_1.useState)(false);
|
|
43
|
-
const
|
|
102
|
+
const scrollIdleTimeoutRef = (0, react_1.useRef)(null);
|
|
103
|
+
const normalizeSettleTimeoutRef = (0, react_1.useRef)(null);
|
|
104
|
+
const scrollInProgressRef = (0, react_1.useRef)(false);
|
|
105
|
+
const isNormalizingRef = (0, react_1.useRef)(false);
|
|
44
106
|
(0, react_1.useEffect)(() => {
|
|
45
107
|
const content = contentRef.current;
|
|
46
108
|
const root = rootRef.current;
|
|
@@ -86,6 +148,15 @@ const ScrollerBlock = (props) => {
|
|
|
86
148
|
}
|
|
87
149
|
};
|
|
88
150
|
const handleInfiniteScroll = () => {
|
|
151
|
+
if (isNormalizingRef.current) {
|
|
152
|
+
return;
|
|
153
|
+
}
|
|
154
|
+
const wasNotInProgress = !scrollInProgressRef.current;
|
|
155
|
+
if (wasNotInProgress) {
|
|
156
|
+
isNormalizingRef.current = true;
|
|
157
|
+
normalizeToMiddleCopy(content, childCount);
|
|
158
|
+
isNormalizingRef.current = false;
|
|
159
|
+
}
|
|
89
160
|
const scrollLeft = content.scrollLeft;
|
|
90
161
|
const endCopyChild = getChild(content, endCopyStartIndex);
|
|
91
162
|
const copyStartChild = getChild(content, copyStartIndex);
|
|
@@ -102,18 +173,34 @@ const ScrollerBlock = (props) => {
|
|
|
102
173
|
content.scrollTo(endChild.offsetLeft - content.clientWidth, 0);
|
|
103
174
|
}
|
|
104
175
|
}
|
|
176
|
+
scrollInProgressRef.current = true;
|
|
105
177
|
setScrollInProgress(true);
|
|
106
|
-
if (
|
|
107
|
-
clearTimeout(
|
|
178
|
+
if (scrollIdleTimeoutRef.current) {
|
|
179
|
+
clearTimeout(scrollIdleTimeoutRef.current);
|
|
108
180
|
}
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
}
|
|
181
|
+
if (normalizeSettleTimeoutRef.current) {
|
|
182
|
+
clearTimeout(normalizeSettleTimeoutRef.current);
|
|
183
|
+
}
|
|
184
|
+
scrollIdleTimeoutRef.current = setTimeout(() => {
|
|
185
|
+
isNormalizingRef.current = true;
|
|
186
|
+
normalizeToMiddleCopy(content, childCount);
|
|
187
|
+
isNormalizingRef.current = false;
|
|
188
|
+
normalizeSettleTimeoutRef.current = setTimeout(() => {
|
|
189
|
+
scrollInProgressRef.current = false;
|
|
190
|
+
setScrollInProgress(false);
|
|
191
|
+
}, NORMALIZE_BEFORE_SNAP_MS);
|
|
192
|
+
}, SCROLL_IDLE_MS);
|
|
112
193
|
};
|
|
113
194
|
content.addEventListener('scroll', handleInfiniteScroll, { passive: true });
|
|
114
195
|
scrollToMiddle();
|
|
115
196
|
return () => {
|
|
116
197
|
content.removeEventListener('scroll', handleInfiniteScroll);
|
|
198
|
+
if (scrollIdleTimeoutRef.current) {
|
|
199
|
+
clearTimeout(scrollIdleTimeoutRef.current);
|
|
200
|
+
}
|
|
201
|
+
if (normalizeSettleTimeoutRef.current) {
|
|
202
|
+
clearTimeout(normalizeSettleTimeoutRef.current);
|
|
203
|
+
}
|
|
117
204
|
};
|
|
118
205
|
}, [infinite, childCount]);
|
|
119
206
|
(0, react_1.useEffect)(() => {
|
|
@@ -127,11 +214,8 @@ const ScrollerBlock = (props) => {
|
|
|
127
214
|
return;
|
|
128
215
|
}
|
|
129
216
|
if (infinite) {
|
|
130
|
-
const
|
|
131
|
-
|
|
132
|
-
if (nextElement) {
|
|
133
|
-
scrollToChild(content, nextElement);
|
|
134
|
-
}
|
|
217
|
+
const nextLogical = ((getCenteredChildIndex(content) % childCount) + 1) % childCount;
|
|
218
|
+
scrollToLogicalIndex(content, nextLogical, childCount, true);
|
|
135
219
|
return;
|
|
136
220
|
}
|
|
137
221
|
const nextIndex = (currentElement + 1) % childCount;
|
|
@@ -140,7 +224,7 @@ const ScrollerBlock = (props) => {
|
|
|
140
224
|
scrollToChild(content, nextElement);
|
|
141
225
|
}
|
|
142
226
|
}, [childCount, currentElement, infinite]);
|
|
143
|
-
const
|
|
227
|
+
const scrollToPaginationIndex = (0, react_1.useCallback)((targetIndex) => {
|
|
144
228
|
if (autoScroll) {
|
|
145
229
|
setIsPaused(true);
|
|
146
230
|
}
|
|
@@ -155,27 +239,26 @@ const ScrollerBlock = (props) => {
|
|
|
155
239
|
}
|
|
156
240
|
return;
|
|
157
241
|
}
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
}
|
|
168
|
-
if (
|
|
169
|
-
const
|
|
170
|
-
if (
|
|
171
|
-
|
|
172
|
-
(content.offsetWidth - middleChild.offsetWidth) / 2;
|
|
173
|
-
content.scrollTo({ left, behavior: 'auto' });
|
|
242
|
+
scrollToMiddleCopyIndex(content, targetIndex, childCount);
|
|
243
|
+
}, [autoScroll, childCount, infinite]);
|
|
244
|
+
const scrollToItemIndex = (0, react_1.useCallback)((targetIndex) => {
|
|
245
|
+
if (autoScroll) {
|
|
246
|
+
setIsPaused(true);
|
|
247
|
+
}
|
|
248
|
+
const content = contentRef.current;
|
|
249
|
+
if (!content || childCount <= 1 || targetIndex < 0 || targetIndex >= childCount) {
|
|
250
|
+
return;
|
|
251
|
+
}
|
|
252
|
+
if (!infinite) {
|
|
253
|
+
const child = getChild(content, targetIndex);
|
|
254
|
+
if (child) {
|
|
255
|
+
scrollToChild(content, child);
|
|
174
256
|
}
|
|
175
|
-
requestAnimationFrame(scrollToTargetInMiddleCopy);
|
|
176
257
|
return;
|
|
177
258
|
}
|
|
178
|
-
|
|
259
|
+
const logicalIndex = getCenteredChildIndex(content) % childCount;
|
|
260
|
+
const isNext = targetIndex === (logicalIndex + 1) % childCount;
|
|
261
|
+
scrollToLogicalIndex(content, targetIndex, childCount, isNext);
|
|
179
262
|
}, [autoScroll, childCount, infinite]);
|
|
180
263
|
(0, react_1.useEffect)(() => {
|
|
181
264
|
let timeout = null;
|
|
@@ -195,23 +278,23 @@ const ScrollerBlock = (props) => {
|
|
|
195
278
|
react_1.default.createElement("div", { className: b('content', {
|
|
196
279
|
gapLong,
|
|
197
280
|
fullWidth,
|
|
198
|
-
'scroll-snap-center': infinite ? !scrollInProgress :
|
|
281
|
+
'scroll-snap-center': infinite ? !scrollInProgress : true,
|
|
199
282
|
}), ref: contentRef }, (infinite ? [0, 1, 2] : [0])
|
|
200
283
|
.map((mi) => react_1.default.Children.map(children, (child, index) => {
|
|
201
284
|
const physicalIndex = mi * childCount + index;
|
|
202
|
-
return (react_1.default.createElement("div", { key: physicalIndex, role: "button", tabIndex: 0, className: b('item'), style: { width: (widths === null || widths === void 0 ? void 0 : widths[index]) || 'auto' }, onClick: () =>
|
|
285
|
+
return (react_1.default.createElement("div", { key: physicalIndex, role: "button", tabIndex: 0, className: b('item'), style: { width: (widths === null || widths === void 0 ? void 0 : widths[index]) || 'auto' }, onClick: () => scrollToItemIndex(index), onKeyDown: (event) => {
|
|
203
286
|
if (event.key === 'Enter' || event.key === ' ') {
|
|
204
287
|
event.preventDefault();
|
|
205
|
-
|
|
288
|
+
scrollToItemIndex(index);
|
|
206
289
|
}
|
|
207
290
|
} }, child));
|
|
208
291
|
}))
|
|
209
292
|
.flat())),
|
|
210
293
|
childCount > 0 && (react_1.default.createElement("div", { className: b('pagination-container') },
|
|
211
|
-
react_1.default.createElement("div", { className: b('pagination') }, Array.from({ length: childCount }, (_, index) => (react_1.default.createElement("div", { key: index, role: "button", tabIndex: 0, className: b('pip', { active: index === currentElement }), onClick: () =>
|
|
294
|
+
react_1.default.createElement("div", { className: b('pagination') }, Array.from({ length: childCount }, (_, index) => (react_1.default.createElement("div", { key: index, role: "button", tabIndex: 0, className: b('pip', { active: index === currentElement }), onClick: () => scrollToPaginationIndex(index), onKeyDown: (event) => {
|
|
212
295
|
if (event.key === 'Enter' || event.key === ' ') {
|
|
213
296
|
event.preventDefault();
|
|
214
|
-
|
|
297
|
+
scrollToPaginationIndex(index);
|
|
215
298
|
}
|
|
216
299
|
} }, autoScroll && (react_1.default.createElement("div", { style: {
|
|
217
300
|
transition: `width ${autoScrollInterval}ms, opacity 0.5s ease`,
|
|
@@ -2,9 +2,6 @@ export declare const ScrollerControlsProps: {
|
|
|
2
2
|
infinite: {
|
|
3
3
|
type: string;
|
|
4
4
|
};
|
|
5
|
-
scrollSnapCenter: {
|
|
6
|
-
type: string;
|
|
7
|
-
};
|
|
8
5
|
autoScroll: {
|
|
9
6
|
type: string;
|
|
10
7
|
};
|
|
@@ -26,9 +23,6 @@ export declare const ScrollerBlock: {
|
|
|
26
23
|
infinite: {
|
|
27
24
|
type: string;
|
|
28
25
|
};
|
|
29
|
-
scrollSnapCenter: {
|
|
30
|
-
type: string;
|
|
31
|
-
};
|
|
32
26
|
autoScroll: {
|
|
33
27
|
type: string;
|
|
34
28
|
};
|
|
@@ -7,12 +7,12 @@ const NewsCard_1 = tslib_1.__importDefault(require("../../sub-blocks/NewsCard/Ne
|
|
|
7
7
|
const utils_1 = require("../../utils");
|
|
8
8
|
const Scroller_1 = tslib_1.__importDefault(require("../Scroller/Scroller"));
|
|
9
9
|
const b = (0, utils_1.block)('whats-new-block');
|
|
10
|
-
const WhatsNew = ({ title, items, footnote, links, animated, infinite,
|
|
10
|
+
const WhatsNew = ({ title, items, footnote, links, animated, infinite, autoScroll, autoScrollInterval, }) => {
|
|
11
11
|
return (react_1.default.createElement(components_1.AnimateBlock, { className: b(), animate: animated },
|
|
12
12
|
react_1.default.createElement("div", { className: b('root') },
|
|
13
13
|
title && (react_1.default.createElement("div", { className: b('head') },
|
|
14
14
|
react_1.default.createElement("h2", { className: b('title') }, title))),
|
|
15
|
-
react_1.default.createElement(Scroller_1.default, { fullWidth: true, infinite: infinite,
|
|
15
|
+
react_1.default.createElement(Scroller_1.default, { fullWidth: true, infinite: infinite, autoScroll: autoScroll !== null && autoScroll !== void 0 ? autoScroll : true, autoScrollInterval: autoScrollInterval }, items.map((item, index) => (react_1.default.createElement(NewsCard_1.default, Object.assign({ key: index }, item))))),
|
|
16
16
|
(footnote || (links === null || links === void 0 ? void 0 : links.length)) && (react_1.default.createElement("div", { className: b('footer') },
|
|
17
17
|
footnote && react_1.default.createElement("div", { className: b('footnote') }, footnote),
|
|
18
18
|
(links === null || links === void 0 ? void 0 : links.length) ? (react_1.default.createElement("div", { className: b('links') }, links.map((link, index) => (react_1.default.createElement("a", { key: index, href: link.url, className: b('link'), target: "_blank", rel: "noopener noreferrer" },
|
|
@@ -87,6 +87,7 @@ export declare const subBlockMap: {
|
|
|
87
87
|
"feed-partner": ({ url, label, level, levelColorText, levelColorBackground, background, image, title, subtitle, className, tags, jumpOnHover, }: import("./models").FeedPartnerProps) => JSX.Element;
|
|
88
88
|
"case-study-card": import("react").MemoExoticComponent<(props: import("./models").CaseStudyCardProps) => JSX.Element>;
|
|
89
89
|
"story-card": import("react").FC<import("./models").StoryCardProps>;
|
|
90
|
+
"mini-case-card": import("react").FC<import("./models").MiniCaseCardProps>;
|
|
90
91
|
};
|
|
91
92
|
export declare const navItemMap: {
|
|
92
93
|
button: import("react").FC<Pick<import("./navigation").NavigationItemProps, "className"> & import("./models").ButtonProps>;
|
|
@@ -96,6 +96,7 @@ exports.subBlockMap = {
|
|
|
96
96
|
[models_1.SubBlockType.FeedPartner]: sub_blocks_1.FeedPartner,
|
|
97
97
|
[models_1.SubBlockType.CaseStudyCard]: sub_blocks_1.CaseStudyCard,
|
|
98
98
|
[models_1.SubBlockType.StoryCard]: sub_blocks_1.StoryCard,
|
|
99
|
+
[models_1.SubBlockType.MiniCaseCard]: sub_blocks_1.MiniCaseCard,
|
|
99
100
|
};
|
|
100
101
|
exports.navItemMap = {
|
|
101
102
|
[models_1.NavigationItemType.Button]: NavigationItem_1.NavigationButton,
|
|
@@ -363,7 +363,6 @@ export interface ScrollerBlockProps extends Animatable {
|
|
|
363
363
|
gapLong?: boolean;
|
|
364
364
|
fullWidth?: boolean;
|
|
365
365
|
infinite?: boolean;
|
|
366
|
-
scrollSnapCenter?: boolean;
|
|
367
366
|
autoScroll?: boolean;
|
|
368
367
|
autoScrollInterval?: number;
|
|
369
368
|
}
|
|
@@ -647,7 +646,7 @@ export interface BenchmarkBlockProps extends Animatable {
|
|
|
647
646
|
postfix?: string;
|
|
648
647
|
}[];
|
|
649
648
|
}
|
|
650
|
-
export interface WhatsNewBlockProps extends Animatable, Pick<ScrollerBlockProps, 'infinite' | '
|
|
649
|
+
export interface WhatsNewBlockProps extends Animatable, Pick<ScrollerBlockProps, 'infinite' | 'autoScroll' | 'autoScrollInterval'> {
|
|
651
650
|
title?: string;
|
|
652
651
|
items: NewsCardProps[];
|
|
653
652
|
footnote?: string;
|
|
@@ -30,7 +30,8 @@ export declare enum SubBlockType {
|
|
|
30
30
|
NewPostCard = "new-post-card",
|
|
31
31
|
FeedCard = "feed-card",
|
|
32
32
|
EventPersonCard = "event-person-card",
|
|
33
|
-
StoryCard = "story-card"
|
|
33
|
+
StoryCard = "story-card",
|
|
34
|
+
MiniCaseCard = "mini-case-card"
|
|
34
35
|
}
|
|
35
36
|
export declare enum IconPosition {
|
|
36
37
|
Top = "top",
|
|
@@ -322,6 +323,25 @@ export interface StoryCardProps {
|
|
|
322
323
|
}[];
|
|
323
324
|
background?: string;
|
|
324
325
|
}
|
|
326
|
+
export interface MiniCaseCardProps {
|
|
327
|
+
title?: string;
|
|
328
|
+
tagUsecase?: string[];
|
|
329
|
+
tagIndustry?: string[];
|
|
330
|
+
showStory?: boolean;
|
|
331
|
+
showQuote?: boolean;
|
|
332
|
+
text?: string;
|
|
333
|
+
quote?: string;
|
|
334
|
+
logo?: string;
|
|
335
|
+
avatar?: string;
|
|
336
|
+
author?: string;
|
|
337
|
+
position?: string;
|
|
338
|
+
data?: {
|
|
339
|
+
value: string;
|
|
340
|
+
label?: string;
|
|
341
|
+
}[];
|
|
342
|
+
background?: string;
|
|
343
|
+
backgroundData?: string;
|
|
344
|
+
}
|
|
325
345
|
export type DividerModel = {
|
|
326
346
|
type: SubBlockType.Divider;
|
|
327
347
|
} & DividerProps;
|
|
@@ -383,6 +403,9 @@ export type CaseStudyCardModel = {
|
|
|
383
403
|
export type StoryCardModel = {
|
|
384
404
|
type: SubBlockType.StoryCard;
|
|
385
405
|
} & StoryCardProps;
|
|
386
|
-
export type
|
|
406
|
+
export type MiniCaseCardModel = {
|
|
407
|
+
type: SubBlockType.MiniCaseCard;
|
|
408
|
+
} & MiniCaseCardProps;
|
|
409
|
+
export type SubBlockModels = DividerModel | QuoteModel | PriceDetailedModel | MediaCardModel | BackgroundCardModel | HubspotFormModel | BannerCardModel | BasicCardModel | PriceCardModel | LayoutItemModel | NewsCardModel | ImageCardModel | PostCardModel | NewPostCardModel | FeedCardModel | EventPersonCardModel | AttachmentCardModel | FeedPartnerModel | CaseStudyCardModel | StoryCardModel | MiniCaseCardModel;
|
|
387
410
|
export type SubBlock = SubBlockModels;
|
|
388
411
|
export {};
|
|
@@ -29,6 +29,7 @@ var SubBlockType;
|
|
|
29
29
|
SubBlockType["FeedCard"] = "feed-card";
|
|
30
30
|
SubBlockType["EventPersonCard"] = "event-person-card";
|
|
31
31
|
SubBlockType["StoryCard"] = "story-card";
|
|
32
|
+
SubBlockType["MiniCaseCard"] = "mini-case-card";
|
|
32
33
|
})(SubBlockType = exports.SubBlockType || (exports.SubBlockType = {}));
|
|
33
34
|
var IconPosition;
|
|
34
35
|
(function (IconPosition) {
|
|
@@ -36,6 +36,215 @@ export declare const cardSchemas: {
|
|
|
36
36
|
};
|
|
37
37
|
};
|
|
38
38
|
};
|
|
39
|
+
'mini-case-card': {
|
|
40
|
+
additionalProperties: boolean;
|
|
41
|
+
required: never[];
|
|
42
|
+
properties: {
|
|
43
|
+
title: {
|
|
44
|
+
type: string;
|
|
45
|
+
};
|
|
46
|
+
tagUsecase: {
|
|
47
|
+
type: string;
|
|
48
|
+
items: {
|
|
49
|
+
type: string;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
tagIndustry: {
|
|
53
|
+
type: string;
|
|
54
|
+
items: {
|
|
55
|
+
type: string;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
showStory: {
|
|
59
|
+
type: string;
|
|
60
|
+
};
|
|
61
|
+
showQuote: {
|
|
62
|
+
type: string;
|
|
63
|
+
};
|
|
64
|
+
text: {
|
|
65
|
+
type: string;
|
|
66
|
+
};
|
|
67
|
+
quote: {
|
|
68
|
+
type: string;
|
|
69
|
+
};
|
|
70
|
+
logo: {
|
|
71
|
+
type: string;
|
|
72
|
+
};
|
|
73
|
+
avatar: {
|
|
74
|
+
type: string;
|
|
75
|
+
};
|
|
76
|
+
author: {
|
|
77
|
+
type: string;
|
|
78
|
+
};
|
|
79
|
+
position: {
|
|
80
|
+
type: string;
|
|
81
|
+
};
|
|
82
|
+
data: {
|
|
83
|
+
type: string;
|
|
84
|
+
items: {
|
|
85
|
+
type: string;
|
|
86
|
+
additionalProperties: boolean;
|
|
87
|
+
required: string[];
|
|
88
|
+
properties: {
|
|
89
|
+
value: {
|
|
90
|
+
type: string;
|
|
91
|
+
};
|
|
92
|
+
label: {
|
|
93
|
+
type: string;
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
background: {
|
|
99
|
+
type: string;
|
|
100
|
+
};
|
|
101
|
+
backgroundData: {
|
|
102
|
+
type: string;
|
|
103
|
+
};
|
|
104
|
+
anchor: {
|
|
105
|
+
type: string;
|
|
106
|
+
additionalProperties: boolean;
|
|
107
|
+
required: string[];
|
|
108
|
+
properties: {
|
|
109
|
+
text: {
|
|
110
|
+
type: string;
|
|
111
|
+
contentType: string;
|
|
112
|
+
};
|
|
113
|
+
url: {
|
|
114
|
+
type: string;
|
|
115
|
+
};
|
|
116
|
+
urlTitle: {
|
|
117
|
+
type: string;
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
};
|
|
121
|
+
visibility: {
|
|
122
|
+
oneOf: ({
|
|
123
|
+
type: string;
|
|
124
|
+
enum: string[];
|
|
125
|
+
additionalProperties?: undefined;
|
|
126
|
+
properties?: undefined;
|
|
127
|
+
} | {
|
|
128
|
+
type: string;
|
|
129
|
+
additionalProperties: boolean;
|
|
130
|
+
properties: {
|
|
131
|
+
xs: {
|
|
132
|
+
type: string;
|
|
133
|
+
};
|
|
134
|
+
sm: {
|
|
135
|
+
type: string;
|
|
136
|
+
};
|
|
137
|
+
md: {
|
|
138
|
+
type: string;
|
|
139
|
+
};
|
|
140
|
+
lg: {
|
|
141
|
+
type: string;
|
|
142
|
+
};
|
|
143
|
+
xl: {
|
|
144
|
+
type: string;
|
|
145
|
+
};
|
|
146
|
+
xxl: {
|
|
147
|
+
type: string;
|
|
148
|
+
};
|
|
149
|
+
};
|
|
150
|
+
enum?: undefined;
|
|
151
|
+
})[];
|
|
152
|
+
};
|
|
153
|
+
visible: {
|
|
154
|
+
type: string;
|
|
155
|
+
enum: string[];
|
|
156
|
+
};
|
|
157
|
+
hidden: {
|
|
158
|
+
type: string;
|
|
159
|
+
enum: string[];
|
|
160
|
+
};
|
|
161
|
+
resetPaddings: {
|
|
162
|
+
type: string;
|
|
163
|
+
};
|
|
164
|
+
context: {
|
|
165
|
+
type: string;
|
|
166
|
+
};
|
|
167
|
+
indent: {
|
|
168
|
+
type: string;
|
|
169
|
+
additionalProperties: boolean;
|
|
170
|
+
properties: {
|
|
171
|
+
top: {
|
|
172
|
+
enum: string[];
|
|
173
|
+
};
|
|
174
|
+
bottom: {
|
|
175
|
+
enum: string[];
|
|
176
|
+
};
|
|
177
|
+
};
|
|
178
|
+
};
|
|
179
|
+
backgroundFull: {
|
|
180
|
+
type: string;
|
|
181
|
+
};
|
|
182
|
+
visibilityFilter: {
|
|
183
|
+
oneOf: ({
|
|
184
|
+
type: string;
|
|
185
|
+
items?: undefined;
|
|
186
|
+
} | {
|
|
187
|
+
type: string;
|
|
188
|
+
items: {
|
|
189
|
+
type: string;
|
|
190
|
+
};
|
|
191
|
+
})[];
|
|
192
|
+
};
|
|
193
|
+
blockUnicorn: {
|
|
194
|
+
type: string;
|
|
195
|
+
};
|
|
196
|
+
blockUnicornSdkUrl: {
|
|
197
|
+
type: string;
|
|
198
|
+
};
|
|
199
|
+
blockBackground: {
|
|
200
|
+
oneOf: ({
|
|
201
|
+
type: string;
|
|
202
|
+
additionalProperties?: undefined;
|
|
203
|
+
properties?: undefined;
|
|
204
|
+
} | {
|
|
205
|
+
type: string;
|
|
206
|
+
additionalProperties: boolean;
|
|
207
|
+
properties: {
|
|
208
|
+
color: {
|
|
209
|
+
type: string;
|
|
210
|
+
};
|
|
211
|
+
image: {
|
|
212
|
+
type: string;
|
|
213
|
+
};
|
|
214
|
+
size: {
|
|
215
|
+
type: string;
|
|
216
|
+
};
|
|
217
|
+
repeat: {
|
|
218
|
+
type: string;
|
|
219
|
+
};
|
|
220
|
+
position: {
|
|
221
|
+
type: string;
|
|
222
|
+
};
|
|
223
|
+
attachment: {
|
|
224
|
+
type: string;
|
|
225
|
+
};
|
|
226
|
+
clip: {
|
|
227
|
+
type: string;
|
|
228
|
+
};
|
|
229
|
+
origin: {
|
|
230
|
+
type: string;
|
|
231
|
+
};
|
|
232
|
+
blendMode: {
|
|
233
|
+
type: string;
|
|
234
|
+
};
|
|
235
|
+
};
|
|
236
|
+
})[];
|
|
237
|
+
};
|
|
238
|
+
column: {
|
|
239
|
+
type: string;
|
|
240
|
+
enum: string[];
|
|
241
|
+
};
|
|
242
|
+
type: {};
|
|
243
|
+
when: {
|
|
244
|
+
type: string;
|
|
245
|
+
};
|
|
246
|
+
};
|
|
247
|
+
};
|
|
39
248
|
'story-card': {
|
|
40
249
|
additionalProperties: boolean;
|
|
41
250
|
required: never[];
|
|
@@ -3358,7 +3567,7 @@ export declare const cardSchemas: {
|
|
|
3358
3567
|
};
|
|
3359
3568
|
};
|
|
3360
3569
|
};
|
|
3361
|
-
};
|
|
3570
|
+
}; /** @deprecated */
|
|
3362
3571
|
description: {
|
|
3363
3572
|
additionalProperties: boolean;
|
|
3364
3573
|
required: never[];
|
|
@@ -3887,7 +4096,7 @@ export declare const cardSchemas: {
|
|
|
3887
4096
|
};
|
|
3888
4097
|
autoplay: {
|
|
3889
4098
|
type: string;
|
|
3890
|
-
};
|
|
4099
|
+
}; /** @deprecated */
|
|
3891
4100
|
elapsedTime: {
|
|
3892
4101
|
type: string;
|
|
3893
4102
|
};
|
|
@@ -4,7 +4,7 @@ exports.constructorCardSchemaNames = exports.constructorBlockSchemaNames = expor
|
|
|
4
4
|
const blocks_1 = require("./validators/blocks");
|
|
5
5
|
const sub_blocks_1 = require("./validators/sub-blocks");
|
|
6
6
|
exports.blockSchemas = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, sub_blocks_1.Divider), blocks_1.ExtendedFeaturesBlock), blocks_1.PromoFeaturesBlock), blocks_1.AdvantagesBlock), blocks_1.BenefitsBlock), blocks_1.ScrollerBlock), blocks_1.SliderBlock), blocks_1.QuestionsBlock), blocks_1.HeaderBlock), blocks_1.HeaderMinifyBlock), blocks_1.BannerBlock), blocks_1.LogoRotatorBlock), blocks_1.UnicornCardsBlock), blocks_1.CompaniesBlock), blocks_1.MediaBlock), blocks_1.MapBlock), blocks_1.InfoBlock), blocks_1.TableBlock), blocks_1.HighlightTableBlock), blocks_1.MiniCaseBlock), blocks_1.TabsBlock), blocks_1.TabsHighlightTableBlock), blocks_1.TabLinksBlock), blocks_1.HeaderSliderBlock), blocks_1.IconsBlock), blocks_1.CardLayoutBlock), blocks_1.ContentLayoutBlock), blocks_1.BannerMinifyBlock), blocks_1.ShareBlock), blocks_1.FilterBlock), blocks_1.FilterCardLayoutBlock), blocks_1.FormBlock), blocks_1.SliderNewBlock), blocks_1.MarqueeLinksBlock), blocks_1.SolutionsBlock), blocks_1.ServicesBlock), blocks_1.QuotesBlock), blocks_1.ReportsBlock), blocks_1.ScienceHeaderBlock), blocks_1.AboutHeaderBlock), blocks_1.LayoutBlock), blocks_1.YFMBlock), blocks_1.PartnerHeaderBlock), blocks_1.SidebarWidgetBlock), blocks_1.ReportsCardsBlock), blocks_1.ReportsSectionsBlock), blocks_1.LinkTableBlock), blocks_1.EventsFeedBlock), blocks_1.PartnersFeedBlock), blocks_1.ResourceHubPostsBlock), blocks_1.BenchmarkBlock), blocks_1.EventsSectionBlock), blocks_1.BlogFeedBlock), blocks_1.ScienceFeedBlock), blocks_1.CustomerStoriesFeedBlock), blocks_1.RelevantPostsBlock), blocks_1.RelevantReportsCardsBlock), blocks_1.RelevantReportsBlock), blocks_1.PressReleasesBlock), blocks_1.FormWallBlock), blocks_1.CatBlock), blocks_1.AudioBlock), blocks_1.OnetrustCookieListBlock), blocks_1.WhatsNewBlock), blocks_1.ScienceSuggestBlock);
|
|
7
|
-
exports.cardSchemas = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, sub_blocks_1.MediaCardBlock), blocks_1.BannerCard), sub_blocks_1.PriceDetailedBlock), sub_blocks_1.BackgroundCard), sub_blocks_1.Quote), sub_blocks_1.BasicCard), sub_blocks_1.PriceCardBlock), sub_blocks_1.ImageCard), sub_blocks_1.ContentLayoutCard), sub_blocks_1.Card), sub_blocks_1.PostCard), sub_blocks_1.NewPostCard), sub_blocks_1.FeedCard), sub_blocks_1.EventPersonCard), sub_blocks_1.AttachmentCard), sub_blocks_1.FeedPartner), sub_blocks_1.CaseStudyCard), sub_blocks_1.StoryCard), sub_blocks_1.NewsCard);
|
|
7
|
+
exports.cardSchemas = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, sub_blocks_1.MediaCardBlock), blocks_1.BannerCard), sub_blocks_1.PriceDetailedBlock), sub_blocks_1.BackgroundCard), sub_blocks_1.Quote), sub_blocks_1.BasicCard), sub_blocks_1.PriceCardBlock), sub_blocks_1.ImageCard), sub_blocks_1.ContentLayoutCard), sub_blocks_1.Card), sub_blocks_1.PostCard), sub_blocks_1.NewPostCard), sub_blocks_1.FeedCard), sub_blocks_1.EventPersonCard), sub_blocks_1.AttachmentCard), sub_blocks_1.FeedPartner), sub_blocks_1.CaseStudyCard), sub_blocks_1.StoryCard), sub_blocks_1.MiniCaseCard), sub_blocks_1.NewsCard);
|
|
8
8
|
exports.constructorBlockSchemaNames = [
|
|
9
9
|
'divider',
|
|
10
10
|
'quote',
|
|
@@ -95,5 +95,6 @@ exports.constructorCardSchemaNames = [
|
|
|
95
95
|
'event-person-card',
|
|
96
96
|
'case-study-card',
|
|
97
97
|
'story-card',
|
|
98
|
+
'mini-case-card',
|
|
98
99
|
'news-card',
|
|
99
100
|
];
|
|
@@ -20,3 +20,4 @@ export * from '../../sub-blocks/AttachmentCard/schema';
|
|
|
20
20
|
export * from '../../sub-blocks/FeedPartner/schema';
|
|
21
21
|
export * from '../../sub-blocks/CaseStudyCard/schema';
|
|
22
22
|
export * from '../../sub-blocks/StoryCard/schema';
|
|
23
|
+
export * from '../../sub-blocks/MiniCaseCard/schema';
|
|
@@ -23,3 +23,4 @@ tslib_1.__exportStar(require("../../sub-blocks/AttachmentCard/schema"), exports)
|
|
|
23
23
|
tslib_1.__exportStar(require("../../sub-blocks/FeedPartner/schema"), exports);
|
|
24
24
|
tslib_1.__exportStar(require("../../sub-blocks/CaseStudyCard/schema"), exports);
|
|
25
25
|
tslib_1.__exportStar(require("../../sub-blocks/StoryCard/schema"), exports);
|
|
26
|
+
tslib_1.__exportStar(require("../../sub-blocks/MiniCaseCard/schema"), exports);
|