@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.
Files changed (51) hide show
  1. package/build/cjs/blocks/Scroller/Scroller.js +119 -36
  2. package/build/cjs/blocks/Scroller/schema.d.ts +0 -6
  3. package/build/cjs/blocks/Scroller/schema.js +0 -3
  4. package/build/cjs/blocks/WhatsNew/WhatsNew.js +2 -2
  5. package/build/cjs/blocks/WhatsNew/schema.d.ts +0 -3
  6. package/build/cjs/constructor-items.d.ts +1 -0
  7. package/build/cjs/constructor-items.js +1 -0
  8. package/build/cjs/models/constructor-items/blocks.d.ts +1 -2
  9. package/build/cjs/models/constructor-items/sub-blocks.d.ts +25 -2
  10. package/build/cjs/models/constructor-items/sub-blocks.js +1 -0
  11. package/build/cjs/schema/constants.d.ts +211 -2
  12. package/build/cjs/schema/constants.js +2 -1
  13. package/build/cjs/schema/validators/sub-blocks.d.ts +1 -0
  14. package/build/cjs/schema/validators/sub-blocks.js +1 -0
  15. package/build/cjs/sub-blocks/MiniCaseCard/MiniCaseCard.css +149 -0
  16. package/build/cjs/sub-blocks/MiniCaseCard/MiniCaseCard.d.ts +4 -0
  17. package/build/cjs/sub-blocks/MiniCaseCard/MiniCaseCard.js +54 -0
  18. package/build/cjs/sub-blocks/MiniCaseCard/schema.d.ts +211 -0
  19. package/build/cjs/sub-blocks/MiniCaseCard/schema.js +28 -0
  20. package/build/cjs/sub-blocks/index.d.ts +1 -0
  21. package/build/cjs/sub-blocks/index.js +3 -1
  22. package/build/cjs/text-transform/config.js +11 -0
  23. package/build/esm/blocks/Scroller/Scroller.js +119 -36
  24. package/build/esm/blocks/Scroller/schema.d.ts +0 -6
  25. package/build/esm/blocks/Scroller/schema.js +0 -3
  26. package/build/esm/blocks/WhatsNew/WhatsNew.js +2 -2
  27. package/build/esm/blocks/WhatsNew/schema.d.ts +0 -3
  28. package/build/esm/constructor-items.d.ts +1 -0
  29. package/build/esm/constructor-items.js +2 -1
  30. package/build/esm/models/constructor-items/blocks.d.ts +1 -2
  31. package/build/esm/models/constructor-items/sub-blocks.d.ts +25 -2
  32. package/build/esm/models/constructor-items/sub-blocks.js +1 -0
  33. package/build/esm/schema/constants.d.ts +211 -2
  34. package/build/esm/schema/constants.js +3 -2
  35. package/build/esm/schema/validators/sub-blocks.d.ts +1 -0
  36. package/build/esm/schema/validators/sub-blocks.js +1 -0
  37. package/build/esm/sub-blocks/MiniCaseCard/MiniCaseCard.css +149 -0
  38. package/build/esm/sub-blocks/MiniCaseCard/MiniCaseCard.d.ts +5 -0
  39. package/build/esm/sub-blocks/MiniCaseCard/MiniCaseCard.js +52 -0
  40. package/build/esm/sub-blocks/MiniCaseCard/schema.d.ts +211 -0
  41. package/build/esm/sub-blocks/MiniCaseCard/schema.js +25 -0
  42. package/build/esm/sub-blocks/index.d.ts +1 -0
  43. package/build/esm/sub-blocks/index.js +1 -0
  44. package/build/esm/text-transform/config.js +11 -0
  45. package/package.json +1 -1
  46. package/schema/index.js +1 -1
  47. package/server/models/constructor-items/blocks.d.ts +1 -2
  48. package/server/models/constructor-items/sub-blocks.d.ts +25 -2
  49. package/server/models/constructor-items/sub-blocks.js +1 -0
  50. package/server/text-transform/config.js +11 -0
  51. package/widget/index.js +1 -1
@@ -21,6 +21,65 @@ const scrollToChild = (content, child, behavior = 'smooth') => {
21
21
  const left = child.offsetLeft - (content.offsetWidth - child.offsetWidth) / 2;
22
22
  content.scrollTo({ left, behavior });
23
23
  };
24
+ const MIDDLE_COPY = 1;
25
+ const normalizeToMiddleCopy = (content, childCount) => {
26
+ const centeredIndex = getCenteredChildIndex(content);
27
+ const logicalIndex = centeredIndex % childCount;
28
+ const currentCopy = Math.floor(centeredIndex / childCount);
29
+ if (currentCopy === MIDDLE_COPY) {
30
+ return false;
31
+ }
32
+ const middleChild = getChild(content, childCount + logicalIndex);
33
+ if (middleChild) {
34
+ scrollToChild(content, middleChild, 'auto');
35
+ }
36
+ return true;
37
+ };
38
+ const getTargetPhysicalIndex = (centeredPhysicalIndex, targetLogicalIndex, childCount, preferForward) => {
39
+ const currentLogical = centeredPhysicalIndex % childCount;
40
+ const forwardSteps = (targetLogicalIndex - currentLogical + childCount) % childCount;
41
+ const backwardSteps = (currentLogical - targetLogicalIndex + childCount) % childCount;
42
+ if (preferForward || forwardSteps <= backwardSteps) {
43
+ if (forwardSteps === 0) {
44
+ return MIDDLE_COPY * childCount + targetLogicalIndex;
45
+ }
46
+ return centeredPhysicalIndex + forwardSteps;
47
+ }
48
+ if (backwardSteps === 0) {
49
+ return MIDDLE_COPY * childCount + targetLogicalIndex;
50
+ }
51
+ return centeredPhysicalIndex - backwardSteps;
52
+ };
53
+ const SCROLL_IDLE_MS = 200;
54
+ const NORMALIZE_BEFORE_SNAP_MS = 100;
55
+ const scrollToMiddleCopyIndex = (content, targetLogicalIndex, childCount) => {
56
+ const runScroll = () => {
57
+ const targetChild = getChild(content, childCount + targetLogicalIndex);
58
+ if (targetChild) {
59
+ scrollToChild(content, targetChild);
60
+ }
61
+ };
62
+ if (normalizeToMiddleCopy(content, childCount)) {
63
+ requestAnimationFrame(runScroll);
64
+ return;
65
+ }
66
+ runScroll();
67
+ };
68
+ const scrollToLogicalIndex = (content, targetLogicalIndex, childCount, preferForward) => {
69
+ const runScroll = () => {
70
+ const centeredIndex = getCenteredChildIndex(content);
71
+ const targetPhysical = getTargetPhysicalIndex(centeredIndex, targetLogicalIndex, childCount, preferForward);
72
+ const targetChild = getChild(content, targetPhysical);
73
+ if (targetChild) {
74
+ scrollToChild(content, targetChild);
75
+ }
76
+ };
77
+ if (normalizeToMiddleCopy(content, childCount)) {
78
+ requestAnimationFrame(runScroll);
79
+ return;
80
+ }
81
+ runScroll();
82
+ };
24
83
  const PlayIcon = () => {
25
84
  return (React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "30", height: "30", viewBox: "0 0 30 30", fill: "none" },
26
85
  React.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" })));
@@ -30,14 +89,17 @@ const PauseIcon = () => {
30
89
  React.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" })));
31
90
  };
32
91
  export const ScrollerBlock = (props) => {
33
- const { animated, widths, gapLong, fullWidth, scrollSnapCenter, children, autoScroll = true, autoScrollInterval = 3000, infinite = false, } = props;
92
+ const { animated, widths, gapLong, fullWidth, children, autoScroll = true, autoScrollInterval = 3000, infinite = false, } = props;
34
93
  const childCount = React.Children.count(children);
35
94
  const rootRef = useRef(null);
36
95
  const contentRef = useRef(null);
37
96
  const [currentElement, setCurrentElement] = useState(0);
38
97
  const [isPaused, setIsPaused] = useState(true);
39
98
  const [scrollInProgress, setScrollInProgress] = useState(false);
40
- const scrollIntervalRef = useRef(null);
99
+ const scrollIdleTimeoutRef = useRef(null);
100
+ const normalizeSettleTimeoutRef = useRef(null);
101
+ const scrollInProgressRef = useRef(false);
102
+ const isNormalizingRef = useRef(false);
41
103
  useEffect(() => {
42
104
  const content = contentRef.current;
43
105
  const root = rootRef.current;
@@ -83,6 +145,15 @@ export const ScrollerBlock = (props) => {
83
145
  }
84
146
  };
85
147
  const handleInfiniteScroll = () => {
148
+ if (isNormalizingRef.current) {
149
+ return;
150
+ }
151
+ const wasNotInProgress = !scrollInProgressRef.current;
152
+ if (wasNotInProgress) {
153
+ isNormalizingRef.current = true;
154
+ normalizeToMiddleCopy(content, childCount);
155
+ isNormalizingRef.current = false;
156
+ }
86
157
  const scrollLeft = content.scrollLeft;
87
158
  const endCopyChild = getChild(content, endCopyStartIndex);
88
159
  const copyStartChild = getChild(content, copyStartIndex);
@@ -99,18 +170,34 @@ export const ScrollerBlock = (props) => {
99
170
  content.scrollTo(endChild.offsetLeft - content.clientWidth, 0);
100
171
  }
101
172
  }
173
+ scrollInProgressRef.current = true;
102
174
  setScrollInProgress(true);
103
- if (scrollIntervalRef.current) {
104
- clearTimeout(scrollIntervalRef.current);
175
+ if (scrollIdleTimeoutRef.current) {
176
+ clearTimeout(scrollIdleTimeoutRef.current);
105
177
  }
106
- scrollIntervalRef.current = setTimeout(() => {
107
- setScrollInProgress(false);
108
- }, 200);
178
+ if (normalizeSettleTimeoutRef.current) {
179
+ clearTimeout(normalizeSettleTimeoutRef.current);
180
+ }
181
+ scrollIdleTimeoutRef.current = setTimeout(() => {
182
+ isNormalizingRef.current = true;
183
+ normalizeToMiddleCopy(content, childCount);
184
+ isNormalizingRef.current = false;
185
+ normalizeSettleTimeoutRef.current = setTimeout(() => {
186
+ scrollInProgressRef.current = false;
187
+ setScrollInProgress(false);
188
+ }, NORMALIZE_BEFORE_SNAP_MS);
189
+ }, SCROLL_IDLE_MS);
109
190
  };
110
191
  content.addEventListener('scroll', handleInfiniteScroll, { passive: true });
111
192
  scrollToMiddle();
112
193
  return () => {
113
194
  content.removeEventListener('scroll', handleInfiniteScroll);
195
+ if (scrollIdleTimeoutRef.current) {
196
+ clearTimeout(scrollIdleTimeoutRef.current);
197
+ }
198
+ if (normalizeSettleTimeoutRef.current) {
199
+ clearTimeout(normalizeSettleTimeoutRef.current);
200
+ }
114
201
  };
115
202
  }, [infinite, childCount]);
116
203
  useEffect(() => {
@@ -124,11 +211,8 @@ export const ScrollerBlock = (props) => {
124
211
  return;
125
212
  }
126
213
  if (infinite) {
127
- const centeredIndex = getCenteredChildIndex(content);
128
- const nextElement = getChild(content, centeredIndex + 1);
129
- if (nextElement) {
130
- scrollToChild(content, nextElement);
131
- }
214
+ const nextLogical = ((getCenteredChildIndex(content) % childCount) + 1) % childCount;
215
+ scrollToLogicalIndex(content, nextLogical, childCount, true);
132
216
  return;
133
217
  }
134
218
  const nextIndex = (currentElement + 1) % childCount;
@@ -137,7 +221,7 @@ export const ScrollerBlock = (props) => {
137
221
  scrollToChild(content, nextElement);
138
222
  }
139
223
  }, [childCount, currentElement, infinite]);
140
- const scrollToIndex = useCallback((targetIndex) => {
224
+ const scrollToPaginationIndex = useCallback((targetIndex) => {
141
225
  if (autoScroll) {
142
226
  setIsPaused(true);
143
227
  }
@@ -152,27 +236,26 @@ export const ScrollerBlock = (props) => {
152
236
  }
153
237
  return;
154
238
  }
155
- const centeredIndex = getCenteredChildIndex(content);
156
- const currentCopy = Math.floor(centeredIndex / childCount);
157
- const logicalIndex = centeredIndex % childCount;
158
- const middleCopy = 1;
159
- const scrollToTargetInMiddleCopy = () => {
160
- const targetChild = getChild(content, childCount + targetIndex);
161
- if (targetChild) {
162
- scrollToChild(content, targetChild);
163
- }
164
- };
165
- if (currentCopy !== middleCopy) {
166
- const middleChild = getChild(content, childCount + logicalIndex);
167
- if (middleChild) {
168
- const left = middleChild.offsetLeft -
169
- (content.offsetWidth - middleChild.offsetWidth) / 2;
170
- content.scrollTo({ left, behavior: 'auto' });
239
+ scrollToMiddleCopyIndex(content, targetIndex, childCount);
240
+ }, [autoScroll, childCount, infinite]);
241
+ const scrollToItemIndex = useCallback((targetIndex) => {
242
+ if (autoScroll) {
243
+ setIsPaused(true);
244
+ }
245
+ const content = contentRef.current;
246
+ if (!content || childCount <= 1 || targetIndex < 0 || targetIndex >= childCount) {
247
+ return;
248
+ }
249
+ if (!infinite) {
250
+ const child = getChild(content, targetIndex);
251
+ if (child) {
252
+ scrollToChild(content, child);
171
253
  }
172
- requestAnimationFrame(scrollToTargetInMiddleCopy);
173
254
  return;
174
255
  }
175
- scrollToTargetInMiddleCopy();
256
+ const logicalIndex = getCenteredChildIndex(content) % childCount;
257
+ const isNext = targetIndex === (logicalIndex + 1) % childCount;
258
+ scrollToLogicalIndex(content, targetIndex, childCount, isNext);
176
259
  }, [autoScroll, childCount, infinite]);
177
260
  useEffect(() => {
178
261
  let timeout = null;
@@ -192,23 +275,23 @@ export const ScrollerBlock = (props) => {
192
275
  React.createElement("div", { className: b('content', {
193
276
  gapLong,
194
277
  fullWidth,
195
- 'scroll-snap-center': infinite ? !scrollInProgress : scrollSnapCenter,
278
+ 'scroll-snap-center': infinite ? !scrollInProgress : true,
196
279
  }), ref: contentRef }, (infinite ? [0, 1, 2] : [0])
197
280
  .map((mi) => React.Children.map(children, (child, index) => {
198
281
  const physicalIndex = mi * childCount + index;
199
- return (React.createElement("div", { key: physicalIndex, role: "button", tabIndex: 0, className: b('item'), style: { width: (widths === null || widths === void 0 ? void 0 : widths[index]) || 'auto' }, onClick: () => scrollToIndex(index), onKeyDown: (event) => {
282
+ return (React.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) => {
200
283
  if (event.key === 'Enter' || event.key === ' ') {
201
284
  event.preventDefault();
202
- scrollToIndex(index);
285
+ scrollToItemIndex(index);
203
286
  }
204
287
  } }, child));
205
288
  }))
206
289
  .flat())),
207
290
  childCount > 0 && (React.createElement("div", { className: b('pagination-container') },
208
- React.createElement("div", { className: b('pagination') }, Array.from({ length: childCount }, (_, index) => (React.createElement("div", { key: index, role: "button", tabIndex: 0, className: b('pip', { active: index === currentElement }), onClick: () => scrollToIndex(index), onKeyDown: (event) => {
291
+ React.createElement("div", { className: b('pagination') }, Array.from({ length: childCount }, (_, index) => (React.createElement("div", { key: index, role: "button", tabIndex: 0, className: b('pip', { active: index === currentElement }), onClick: () => scrollToPaginationIndex(index), onKeyDown: (event) => {
209
292
  if (event.key === 'Enter' || event.key === ' ') {
210
293
  event.preventDefault();
211
- scrollToIndex(index);
294
+ scrollToPaginationIndex(index);
212
295
  }
213
296
  } }, autoScroll && (React.createElement("div", { style: {
214
297
  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
  };
@@ -3,9 +3,6 @@ export const ScrollerControlsProps = {
3
3
  infinite: {
4
4
  type: 'boolean',
5
5
  },
6
- scrollSnapCenter: {
7
- type: 'boolean',
8
- },
9
6
  autoScroll: {
10
7
  type: 'boolean',
11
8
  },
@@ -5,12 +5,12 @@ import { block } from '../../utils';
5
5
  import ScrollerBlock from '../Scroller/Scroller';
6
6
  import './WhatsNew.css';
7
7
  const b = block('whats-new-block');
8
- const WhatsNew = ({ title, items, footnote, links, animated, infinite, scrollSnapCenter, autoScroll, autoScrollInterval, }) => {
8
+ const WhatsNew = ({ title, items, footnote, links, animated, infinite, autoScroll, autoScrollInterval, }) => {
9
9
  return (React.createElement(AnimateBlock, { className: b(), animate: animated },
10
10
  React.createElement("div", { className: b('root') },
11
11
  title && (React.createElement("div", { className: b('head') },
12
12
  React.createElement("h2", { className: b('title') }, title))),
13
- React.createElement(ScrollerBlock, { fullWidth: true, infinite: infinite, scrollSnapCenter: scrollSnapCenter, autoScroll: autoScroll !== null && autoScroll !== void 0 ? autoScroll : true, autoScrollInterval: autoScrollInterval }, items.map((item, index) => (React.createElement(NewsCard, Object.assign({ key: index }, item))))),
13
+ React.createElement(ScrollerBlock, { fullWidth: true, infinite: infinite, autoScroll: autoScroll !== null && autoScroll !== void 0 ? autoScroll : true, autoScrollInterval: autoScrollInterval }, items.map((item, index) => (React.createElement(NewsCard, Object.assign({ key: index }, item))))),
14
14
  (footnote || (links === null || links === void 0 ? void 0 : links.length)) && (React.createElement("div", { className: b('footer') },
15
15
  footnote && React.createElement("div", { className: b('footnote') }, footnote),
16
16
  (links === null || links === void 0 ? void 0 : links.length) ? (React.createElement("div", { className: b('links') }, links.map((link, index) => (React.createElement("a", { key: index, href: link.url, className: b('link'), target: "_blank", rel: "noopener noreferrer" },
@@ -59,9 +59,6 @@ export declare const WhatsNewBlock: {
59
59
  infinite: {
60
60
  type: string;
61
61
  };
62
- scrollSnapCenter: {
63
- type: string;
64
- };
65
62
  autoScroll: {
66
63
  type: string;
67
64
  };
@@ -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>;
@@ -2,7 +2,7 @@ import { AboutHeaderBlock, AdvantagesBlock, AudioBlock, BannerBlock, BannerMinif
2
2
  import { BlockType, NavigationItemType, SubBlockType } from './models';
3
3
  import { GithubButton, NavigationButton, NavigationDropdown, NavigationLink, } from './navigation/components/NavigationItem';
4
4
  import SocialIcon from './navigation/components/SocialIcon/SocialIcon';
5
- import { AttachmentCard, BackgroundCard, BannerCard, BasicCard, Card, CaseStudyCard, Content, ContentLayoutCard, Divider, EventPersonCard, FeedCard, FeedPartner, ImageCard, LayoutItem, MediaCard, NewPostCard, NewsCard, PostCard, PriceCard, PriceDetailed, Quote, StoryCard, } from './sub-blocks';
5
+ import { AttachmentCard, BackgroundCard, BannerCard, BasicCard, Card, CaseStudyCard, Content, ContentLayoutCard, Divider, EventPersonCard, FeedCard, FeedPartner, ImageCard, LayoutItem, MediaCard, MiniCaseCard, NewPostCard, NewsCard, PostCard, PriceCard, PriceDetailed, Quote, StoryCard, } from './sub-blocks';
6
6
  export const blockMap = {
7
7
  [BlockType.SliderBlock]: SliderBlock,
8
8
  [BlockType.ExtendedFeaturesBlock]: ExtendedFeaturesBlock,
@@ -92,6 +92,7 @@ export const subBlockMap = {
92
92
  [SubBlockType.FeedPartner]: FeedPartner,
93
93
  [SubBlockType.CaseStudyCard]: CaseStudyCard,
94
94
  [SubBlockType.StoryCard]: StoryCard,
95
+ [SubBlockType.MiniCaseCard]: MiniCaseCard,
95
96
  };
96
97
  export const navItemMap = {
97
98
  [NavigationItemType.Button]: 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' | 'scrollSnapCenter' | 'autoScroll' | 'autoScrollInterval'> {
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 SubBlockModels = DividerModel | QuoteModel | PriceDetailedModel | MediaCardModel | BackgroundCardModel | HubspotFormModel | BannerCardModel | BasicCardModel | PriceCardModel | LayoutItemModel | NewsCardModel | ImageCardModel | PostCardModel | NewPostCardModel | FeedCardModel | EventPersonCardModel | AttachmentCardModel | FeedPartnerModel | CaseStudyCardModel | StoryCardModel;
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 {};
@@ -26,6 +26,7 @@ export var SubBlockType;
26
26
  SubBlockType["FeedCard"] = "feed-card";
27
27
  SubBlockType["EventPersonCard"] = "event-person-card";
28
28
  SubBlockType["StoryCard"] = "story-card";
29
+ SubBlockType["MiniCaseCard"] = "mini-case-card";
29
30
  })(SubBlockType || (SubBlockType = {}));
30
31
  export var IconPosition;
31
32
  (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
  };
@@ -1,7 +1,7 @@
1
1
  import { AboutHeaderBlock, AdvantagesBlock, AudioBlock, BannerBlock, BannerCard, BannerMinifyBlock, BenchmarkBlock, BenefitsBlock, BlogFeedBlock, CardLayoutBlock, CatBlock, CompaniesBlock, ContentLayoutBlock, CustomerStoriesFeedBlock, EventsFeedBlock, EventsSectionBlock, ExtendedFeaturesBlock, FilterBlock, FilterCardLayoutBlock, FormBlock, FormWallBlock, HeaderBlock, HeaderMinifyBlock, HeaderSliderBlock, HighlightTableBlock, IconsBlock, InfoBlock, LayoutBlock, LinkTableBlock, LogoRotatorBlock, MapBlock, MarqueeLinksBlock, MediaBlock, MiniCaseBlock, OnetrustCookieListBlock, PartnerHeaderBlock, PartnersFeedBlock, PressReleasesBlock, PromoFeaturesBlock, QuestionsBlock, QuotesBlock, RelevantPostsBlock, RelevantReportsBlock, RelevantReportsCardsBlock, ReportsBlock, ReportsCardsBlock, ReportsSectionsBlock, ResourceHubPostsBlock, ScienceFeedBlock, ScienceHeaderBlock, ScienceSuggestBlock, ScrollerBlock, ServicesBlock, ShareBlock, SidebarWidgetBlock, SliderBlock, SliderNewBlock, SolutionsBlock, TabLinksBlock, TableBlock, TabsBlock, TabsHighlightTableBlock, UnicornCardsBlock, WhatsNewBlock, YFMBlock, } from './validators/blocks';
2
- import { AttachmentCard, BackgroundCard, BasicCard, Card, CaseStudyCard, ContentLayoutCard, Divider, EventPersonCard, FeedCard, FeedPartner, ImageCard, MediaCardBlock, NewPostCard, NewsCard, PostCard, PriceCardBlock, PriceDetailedBlock, Quote, StoryCard, } from './validators/sub-blocks';
2
+ import { AttachmentCard, BackgroundCard, BasicCard, Card, CaseStudyCard, ContentLayoutCard, Divider, EventPersonCard, FeedCard, FeedPartner, ImageCard, MediaCardBlock, MiniCaseCard, NewPostCard, NewsCard, PostCard, PriceCardBlock, PriceDetailedBlock, Quote, StoryCard, } from './validators/sub-blocks';
3
3
  export const 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({}, Divider), ExtendedFeaturesBlock), PromoFeaturesBlock), AdvantagesBlock), BenefitsBlock), ScrollerBlock), SliderBlock), QuestionsBlock), HeaderBlock), HeaderMinifyBlock), BannerBlock), LogoRotatorBlock), UnicornCardsBlock), CompaniesBlock), MediaBlock), MapBlock), InfoBlock), TableBlock), HighlightTableBlock), MiniCaseBlock), TabsBlock), TabsHighlightTableBlock), TabLinksBlock), HeaderSliderBlock), IconsBlock), CardLayoutBlock), ContentLayoutBlock), BannerMinifyBlock), ShareBlock), FilterBlock), FilterCardLayoutBlock), FormBlock), SliderNewBlock), MarqueeLinksBlock), SolutionsBlock), ServicesBlock), QuotesBlock), ReportsBlock), ScienceHeaderBlock), AboutHeaderBlock), LayoutBlock), YFMBlock), PartnerHeaderBlock), SidebarWidgetBlock), ReportsCardsBlock), ReportsSectionsBlock), LinkTableBlock), EventsFeedBlock), PartnersFeedBlock), ResourceHubPostsBlock), BenchmarkBlock), EventsSectionBlock), BlogFeedBlock), ScienceFeedBlock), CustomerStoriesFeedBlock), RelevantPostsBlock), RelevantReportsCardsBlock), RelevantReportsBlock), PressReleasesBlock), FormWallBlock), CatBlock), AudioBlock), OnetrustCookieListBlock), WhatsNewBlock), ScienceSuggestBlock);
4
- export const 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({}, MediaCardBlock), BannerCard), PriceDetailedBlock), BackgroundCard), Quote), BasicCard), PriceCardBlock), ImageCard), ContentLayoutCard), Card), PostCard), NewPostCard), FeedCard), EventPersonCard), AttachmentCard), FeedPartner), CaseStudyCard), StoryCard), NewsCard);
4
+ export const 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({}, MediaCardBlock), BannerCard), PriceDetailedBlock), BackgroundCard), Quote), BasicCard), PriceCardBlock), ImageCard), ContentLayoutCard), Card), PostCard), NewPostCard), FeedCard), EventPersonCard), AttachmentCard), FeedPartner), CaseStudyCard), StoryCard), MiniCaseCard), NewsCard);
5
5
  export const constructorBlockSchemaNames = [
6
6
  'divider',
7
7
  'quote',
@@ -92,5 +92,6 @@ export const constructorCardSchemaNames = [
92
92
  'event-person-card',
93
93
  'case-study-card',
94
94
  'story-card',
95
+ 'mini-case-card',
95
96
  'news-card',
96
97
  ];
@@ -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';
@@ -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';