@doyourjob/gravity-ui-page-constructor 5.31.224 → 5.31.226
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 +3 -0
- package/build/cjs/blocks/BannerMinify/schema.d.ts +3 -0
- package/build/cjs/blocks/Benchmark/schema.d.ts +3 -0
- package/build/cjs/blocks/CardLayout/schema.d.ts +6 -0
- package/build/cjs/blocks/Cat/schema.d.ts +3 -0
- package/build/cjs/blocks/ContentLayout/ContentLayout.js +2 -3
- package/build/cjs/blocks/ContentLayout/schema.d.ts +12 -1
- package/build/cjs/blocks/ContentLayout/schema.js +3 -0
- package/build/cjs/blocks/ExtendedFeatures/schema.d.ts +3 -0
- package/build/cjs/blocks/FilterBlock/schema.d.ts +6 -0
- package/build/cjs/blocks/FilterCardLayout/schema.d.ts +3 -0
- package/build/cjs/blocks/Form/schema.d.ts +3 -0
- package/build/cjs/blocks/Header/schema.d.ts +3 -0
- package/build/cjs/blocks/HeaderMinify/schema.d.ts +3 -0
- package/build/cjs/blocks/HeaderSlider/schema.d.ts +3 -0
- package/build/cjs/blocks/HighlightTable/schema.d.ts +3 -0
- package/build/cjs/blocks/Icons/schema.d.ts +6 -0
- package/build/cjs/blocks/Layout/schema.d.ts +3 -0
- package/build/cjs/blocks/Map/schema.d.ts +3 -0
- package/build/cjs/blocks/Media/schema.d.ts +6 -0
- package/build/cjs/blocks/OnetrustCookieList/schema.d.ts +3 -0
- package/build/cjs/blocks/PromoFeaturesBlock/schema.d.ts +3 -0
- package/build/cjs/blocks/Questions/schema.d.ts +3 -0
- package/build/cjs/blocks/Scroller/Scroller.css +4 -19
- package/build/cjs/blocks/Scroller/Scroller.js +6 -8
- package/build/cjs/blocks/Scroller/schema.d.ts +0 -6
- package/build/cjs/blocks/Scroller/schema.js +1 -5
- package/build/cjs/blocks/SidebarWidget/schema.d.ts +3 -0
- package/build/cjs/blocks/Slider/schema.d.ts +3 -0
- package/build/cjs/blocks/SliderNew/schema.d.ts +3 -0
- package/build/cjs/blocks/TabLinks/schema.d.ts +3 -0
- package/build/cjs/blocks/Table/schema.d.ts +3 -0
- package/build/cjs/blocks/Tabs/schema.d.ts +3 -0
- package/build/cjs/blocks/TabsHighlightTable/schema.d.ts +3 -0
- package/build/cjs/blocks/UnicornCards/Item/Item.d.ts +1 -1
- package/build/cjs/blocks/UnicornCards/Item/Item.js +3 -3
- package/build/cjs/blocks/UnicornCards/UnicornCards.js +2 -2
- package/build/cjs/blocks/UnicornCards/schema.d.ts +6 -0
- package/build/cjs/blocks/UnicornCards/schema.js +2 -1
- package/build/cjs/blocks/WhatsNew/WhatsNew.css +83 -0
- package/build/cjs/blocks/WhatsNew/WhatsNew.d.ts +4 -0
- package/build/cjs/blocks/WhatsNew/WhatsNew.js +21 -0
- package/build/cjs/blocks/WhatsNew/schema.d.ts +365 -0
- package/build/cjs/blocks/WhatsNew/schema.js +53 -0
- package/build/cjs/blocks/YFM/schema.d.ts +3 -0
- package/build/cjs/blocks/index.d.ts +1 -0
- package/build/cjs/blocks/index.js +3 -1
- package/build/cjs/blocks/validators.d.ts +1 -0
- package/build/cjs/blocks/validators.js +1 -0
- package/build/cjs/components/BackgroundUnicorn/BackgroundUnicorn.js +4 -3
- package/build/cjs/components/UnicornScene/UnicornScene.d.ts +5 -0
- package/build/cjs/components/UnicornScene/UnicornScene.js +12 -0
- package/build/cjs/components/index.d.ts +2 -0
- package/build/cjs/components/index.js +3 -1
- package/build/cjs/constructor-items.d.ts +2 -0
- package/build/cjs/constructor-items.js +2 -0
- package/build/cjs/models/constructor-items/blocks.d.ts +22 -6
- package/build/cjs/models/constructor-items/blocks.js +1 -0
- package/build/cjs/models/constructor-items/sub-blocks.d.ts +14 -1
- package/build/cjs/models/constructor-items/sub-blocks.js +1 -0
- package/build/cjs/schema/constants.d.ts +47 -0
- package/build/cjs/schema/constants.js +4 -2
- 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 +3 -0
- package/build/cjs/schema/validators/common.js +2 -0
- 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/ContentLayoutCard/schema.d.ts +9 -0
- package/build/cjs/sub-blocks/NewsCard/NewsCard.css +61 -0
- package/build/cjs/sub-blocks/NewsCard/NewsCard.d.ts +3 -0
- package/build/cjs/sub-blocks/NewsCard/NewsCard.js +16 -0
- package/build/cjs/sub-blocks/NewsCard/schema.d.ts +37 -0
- package/build/cjs/sub-blocks/NewsCard/schema.js +28 -0
- package/build/cjs/sub-blocks/StoryCard/schema.d.ts +3 -0
- package/build/cjs/sub-blocks/index.d.ts +1 -0
- package/build/cjs/sub-blocks/index.js +3 -1
- package/build/esm/blocks/Audio/schema.d.ts +3 -0
- package/build/esm/blocks/BannerMinify/schema.d.ts +3 -0
- package/build/esm/blocks/Benchmark/schema.d.ts +3 -0
- package/build/esm/blocks/CardLayout/schema.d.ts +6 -0
- package/build/esm/blocks/Cat/schema.d.ts +3 -0
- package/build/esm/blocks/ContentLayout/ContentLayout.js +3 -4
- package/build/esm/blocks/ContentLayout/schema.d.ts +12 -1
- package/build/esm/blocks/ContentLayout/schema.js +3 -0
- package/build/esm/blocks/ExtendedFeatures/schema.d.ts +3 -0
- package/build/esm/blocks/FilterBlock/schema.d.ts +6 -0
- package/build/esm/blocks/FilterCardLayout/schema.d.ts +3 -0
- package/build/esm/blocks/Form/schema.d.ts +3 -0
- package/build/esm/blocks/Header/schema.d.ts +3 -0
- package/build/esm/blocks/HeaderMinify/schema.d.ts +3 -0
- package/build/esm/blocks/HeaderSlider/schema.d.ts +3 -0
- package/build/esm/blocks/HighlightTable/schema.d.ts +3 -0
- package/build/esm/blocks/Icons/schema.d.ts +6 -0
- package/build/esm/blocks/Layout/schema.d.ts +3 -0
- package/build/esm/blocks/Map/schema.d.ts +3 -0
- package/build/esm/blocks/Media/schema.d.ts +6 -0
- package/build/esm/blocks/OnetrustCookieList/schema.d.ts +3 -0
- package/build/esm/blocks/PromoFeaturesBlock/schema.d.ts +3 -0
- package/build/esm/blocks/Questions/schema.d.ts +3 -0
- package/build/esm/blocks/Scroller/Scroller.css +4 -19
- package/build/esm/blocks/Scroller/Scroller.js +6 -8
- package/build/esm/blocks/Scroller/schema.d.ts +0 -6
- package/build/esm/blocks/Scroller/schema.js +1 -5
- package/build/esm/blocks/SidebarWidget/schema.d.ts +3 -0
- package/build/esm/blocks/Slider/schema.d.ts +3 -0
- package/build/esm/blocks/SliderNew/schema.d.ts +3 -0
- package/build/esm/blocks/TabLinks/schema.d.ts +3 -0
- package/build/esm/blocks/Table/schema.d.ts +3 -0
- package/build/esm/blocks/Tabs/schema.d.ts +3 -0
- package/build/esm/blocks/TabsHighlightTable/schema.d.ts +3 -0
- package/build/esm/blocks/UnicornCards/Item/Item.d.ts +1 -1
- package/build/esm/blocks/UnicornCards/Item/Item.js +3 -3
- package/build/esm/blocks/UnicornCards/UnicornCards.js +2 -2
- package/build/esm/blocks/UnicornCards/schema.d.ts +6 -0
- package/build/esm/blocks/UnicornCards/schema.js +2 -1
- package/build/esm/blocks/WhatsNew/WhatsNew.css +83 -0
- package/build/esm/blocks/WhatsNew/WhatsNew.d.ts +5 -0
- package/build/esm/blocks/WhatsNew/WhatsNew.js +19 -0
- package/build/esm/blocks/WhatsNew/schema.d.ts +365 -0
- package/build/esm/blocks/WhatsNew/schema.js +50 -0
- package/build/esm/blocks/YFM/schema.d.ts +3 -0
- package/build/esm/blocks/index.d.ts +1 -0
- package/build/esm/blocks/index.js +1 -0
- package/build/esm/blocks/validators.d.ts +1 -0
- package/build/esm/blocks/validators.js +1 -0
- package/build/esm/components/BackgroundUnicorn/BackgroundUnicorn.js +4 -3
- package/build/esm/components/UnicornScene/UnicornScene.d.ts +5 -0
- package/build/esm/components/UnicornScene/UnicornScene.js +9 -0
- package/build/esm/components/index.d.ts +2 -0
- package/build/esm/components/index.js +1 -0
- package/build/esm/constructor-items.d.ts +2 -0
- package/build/esm/constructor-items.js +4 -2
- package/build/esm/models/constructor-items/blocks.d.ts +22 -6
- package/build/esm/models/constructor-items/blocks.js +1 -0
- package/build/esm/models/constructor-items/sub-blocks.d.ts +14 -1
- package/build/esm/models/constructor-items/sub-blocks.js +1 -0
- package/build/esm/schema/constants.d.ts +47 -0
- package/build/esm/schema/constants.js +6 -4
- 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 +3 -0
- package/build/esm/schema/validators/common.js +2 -0
- 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/ContentLayoutCard/schema.d.ts +9 -0
- package/build/esm/sub-blocks/NewsCard/NewsCard.css +61 -0
- package/build/esm/sub-blocks/NewsCard/NewsCard.d.ts +4 -0
- package/build/esm/sub-blocks/NewsCard/NewsCard.js +14 -0
- package/build/esm/sub-blocks/NewsCard/schema.d.ts +37 -0
- package/build/esm/sub-blocks/NewsCard/schema.js +25 -0
- package/build/esm/sub-blocks/StoryCard/schema.d.ts +3 -0
- package/build/esm/sub-blocks/index.d.ts +1 -0
- package/build/esm/sub-blocks/index.js +1 -0
- package/package.json +2 -2
- package/schema/index.js +1 -1
- package/server/models/constructor-items/blocks.d.ts +22 -6
- package/server/models/constructor-items/blocks.js +1 -0
- package/server/models/constructor-items/sub-blocks.d.ts +14 -1
- package/server/models/constructor-items/sub-blocks.js +1 -0
- package/widget/index.js +1 -1
|
@@ -371,6 +371,9 @@ export declare const CardLayoutProps: {
|
|
|
371
371
|
blockUnicorn: {
|
|
372
372
|
type: string;
|
|
373
373
|
};
|
|
374
|
+
blockUnicornSdkUrl: {
|
|
375
|
+
type: string;
|
|
376
|
+
};
|
|
374
377
|
blockBackground: {
|
|
375
378
|
oneOf: ({
|
|
376
379
|
type: string;
|
|
@@ -794,6 +797,9 @@ export declare const CardLayoutBlock: {
|
|
|
794
797
|
blockUnicorn: {
|
|
795
798
|
type: string;
|
|
796
799
|
};
|
|
800
|
+
blockUnicornSdkUrl: {
|
|
801
|
+
type: string;
|
|
802
|
+
};
|
|
797
803
|
blockBackground: {
|
|
798
804
|
oneOf: ({
|
|
799
805
|
type: string;
|
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ContentLayoutBlock = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importStar(require("react"));
|
|
6
|
-
const unicornstudio_react_1 = tslib_1.__importDefault(require("unicornstudio-react"));
|
|
7
6
|
const components_1 = require("../../components");
|
|
8
7
|
const mobileContext_1 = require("../../context/mobileContext");
|
|
9
8
|
const theme_1 = require("../../context/theme");
|
|
@@ -33,7 +32,7 @@ function getTextWidth(size) {
|
|
|
33
32
|
}
|
|
34
33
|
const ContentLayoutBlock = (props) => {
|
|
35
34
|
const isMobile = (0, react_1.useContext)(mobileContext_1.MobileContext);
|
|
36
|
-
const { animated, textContent, fileContent, tags, size = 'l', background, unicorn, centered, theme = 'default', textWidth = 'm', } = props;
|
|
35
|
+
const { animated, textContent, fileContent, tags, size = 'l', background, unicorn, unicornSdkUrl, centered, theme = 'default', textWidth = 'm', } = props;
|
|
37
36
|
const colSizes = (0, react_1.useMemo)(() => getTextWidth(textWidth), [textWidth]);
|
|
38
37
|
const globalTheme = (0, theme_1.useTheme)();
|
|
39
38
|
const themedBackground = (0, utils_1.getThemedValue)(background, globalTheme);
|
|
@@ -45,7 +44,7 @@ const ContentLayoutBlock = (props) => {
|
|
|
45
44
|
background && (react_1.default.createElement("div", { className: b('background') },
|
|
46
45
|
react_1.default.createElement(components_1.BackgroundImage, Object.assign({ className: b('background-item') }, themedBackground, { hide: isMobile })))),
|
|
47
46
|
unicorn && (react_1.default.createElement("div", { className: b('background') },
|
|
48
|
-
react_1.default.createElement(
|
|
47
|
+
react_1.default.createElement(components_1.UnicornScene, { className: b('background-item'), jsonFilePath: unicorn, sdkUrl: unicornSdkUrl, width: "100%" }))))));
|
|
49
48
|
};
|
|
50
49
|
exports.ContentLayoutBlock = ContentLayoutBlock;
|
|
51
50
|
exports.default = exports.ContentLayoutBlock;
|
|
@@ -90,6 +90,9 @@ export declare const ContentLayoutBlock: {
|
|
|
90
90
|
unicorn: {
|
|
91
91
|
type: string;
|
|
92
92
|
};
|
|
93
|
+
unicornSdkUrl: {
|
|
94
|
+
type: string;
|
|
95
|
+
};
|
|
93
96
|
centered: {
|
|
94
97
|
type: string;
|
|
95
98
|
};
|
|
@@ -283,7 +286,9 @@ export declare const ContentLayoutBlock: {
|
|
|
283
286
|
contentType: string;
|
|
284
287
|
};
|
|
285
288
|
size: {
|
|
286
|
-
type: string;
|
|
289
|
+
type: string; /**
|
|
290
|
+
* @deprecated Use params on top level instead
|
|
291
|
+
*/
|
|
287
292
|
enum: string[];
|
|
288
293
|
};
|
|
289
294
|
links: {
|
|
@@ -446,6 +451,9 @@ export declare const ContentLayoutBlock: {
|
|
|
446
451
|
unicorn: {
|
|
447
452
|
type: string;
|
|
448
453
|
};
|
|
454
|
+
unicornSdkUrl: {
|
|
455
|
+
type: string;
|
|
456
|
+
};
|
|
449
457
|
centered: {
|
|
450
458
|
type: string;
|
|
451
459
|
};
|
|
@@ -559,6 +567,9 @@ export declare const ContentLayoutBlock: {
|
|
|
559
567
|
blockUnicorn: {
|
|
560
568
|
type: string;
|
|
561
569
|
};
|
|
570
|
+
blockUnicornSdkUrl: {
|
|
571
|
+
type: string;
|
|
572
|
+
};
|
|
562
573
|
blockBackground: {
|
|
563
574
|
oneOf: ({
|
|
564
575
|
type: string;
|
|
@@ -323,6 +323,9 @@ export declare const FilterProps: {
|
|
|
323
323
|
blockUnicorn: {
|
|
324
324
|
type: string;
|
|
325
325
|
};
|
|
326
|
+
blockUnicornSdkUrl: {
|
|
327
|
+
type: string;
|
|
328
|
+
};
|
|
326
329
|
blockBackground: {
|
|
327
330
|
oneOf: ({
|
|
328
331
|
type: string;
|
|
@@ -671,6 +674,9 @@ export declare const FilterBlock: {
|
|
|
671
674
|
blockUnicorn: {
|
|
672
675
|
type: string;
|
|
673
676
|
};
|
|
677
|
+
blockUnicornSdkUrl: {
|
|
678
|
+
type: string;
|
|
679
|
+
};
|
|
674
680
|
blockBackground: {
|
|
675
681
|
oneOf: ({
|
|
676
682
|
type: string;
|
|
@@ -368,6 +368,9 @@ export declare const IconsProps: {
|
|
|
368
368
|
blockUnicorn: {
|
|
369
369
|
type: string;
|
|
370
370
|
};
|
|
371
|
+
blockUnicornSdkUrl: {
|
|
372
|
+
type: string;
|
|
373
|
+
};
|
|
371
374
|
blockBackground: {
|
|
372
375
|
oneOf: ({
|
|
373
376
|
type: string;
|
|
@@ -788,6 +791,9 @@ export declare const IconsBlock: {
|
|
|
788
791
|
blockUnicorn: {
|
|
789
792
|
type: string;
|
|
790
793
|
};
|
|
794
|
+
blockUnicornSdkUrl: {
|
|
795
|
+
type: string;
|
|
796
|
+
};
|
|
791
797
|
blockBackground: {
|
|
792
798
|
oneOf: ({
|
|
793
799
|
type: string;
|
|
@@ -814,6 +814,9 @@ export declare const MediaBlockBaseProps: {
|
|
|
814
814
|
blockUnicorn: {
|
|
815
815
|
type: string;
|
|
816
816
|
};
|
|
817
|
+
blockUnicornSdkUrl: {
|
|
818
|
+
type: string;
|
|
819
|
+
};
|
|
817
820
|
blockBackground: {
|
|
818
821
|
oneOf: ({
|
|
819
822
|
type: string;
|
|
@@ -1692,6 +1695,9 @@ export declare const MediaBlock: {
|
|
|
1692
1695
|
blockUnicorn: {
|
|
1693
1696
|
type: string;
|
|
1694
1697
|
};
|
|
1698
|
+
blockUnicornSdkUrl: {
|
|
1699
|
+
type: string;
|
|
1700
|
+
};
|
|
1695
1701
|
blockBackground: {
|
|
1696
1702
|
oneOf: ({
|
|
1697
1703
|
type: string;
|
|
@@ -13,36 +13,21 @@ unpredictable css rules order in build */
|
|
|
13
13
|
transition-delay: 0s;
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
|
-
.pc-scroller-block__header {
|
|
17
|
-
margin-bottom: 72px;
|
|
18
|
-
}
|
|
19
|
-
.pc-scroller-block__title {
|
|
20
|
-
color: #001a2b;
|
|
21
|
-
font-size: 48px;
|
|
22
|
-
line-height: 52px;
|
|
23
|
-
font-weight: 600;
|
|
24
|
-
text-align: center;
|
|
25
|
-
}
|
|
26
|
-
.pc-scroller-block__text {
|
|
27
|
-
color: #001a2b;
|
|
28
|
-
margin-top: 16px;
|
|
29
|
-
font-size: 24px;
|
|
30
|
-
line-height: 28px;
|
|
31
|
-
text-align: center;
|
|
32
|
-
}
|
|
33
16
|
.pc-scroller-block__content {
|
|
34
17
|
position: relative;
|
|
35
18
|
gap: 16px;
|
|
36
19
|
display: flex;
|
|
37
20
|
flex-wrap: nowrap;
|
|
38
|
-
|
|
39
|
-
overflow: scroll;
|
|
21
|
+
overflow-x: auto;
|
|
40
22
|
-webkit-overflow-scrolling: touch;
|
|
41
23
|
scrollbar-width: none;
|
|
42
24
|
}
|
|
43
25
|
.pc-scroller-block__content::-webkit-scrollbar {
|
|
44
26
|
display: none;
|
|
45
27
|
}
|
|
28
|
+
.pc-scroller-block__content_fullWidth {
|
|
29
|
+
width: 100vw;
|
|
30
|
+
}
|
|
46
31
|
.pc-scroller-block__content_gapLong {
|
|
47
32
|
gap: 48px;
|
|
48
33
|
}
|
|
@@ -7,16 +7,17 @@ const components_1 = require("../../components");
|
|
|
7
7
|
const utils_1 = require("../../utils");
|
|
8
8
|
const b = (0, utils_1.block)('scroller-block');
|
|
9
9
|
const ScrollerBlock = (props) => {
|
|
10
|
-
const { animated,
|
|
10
|
+
const { animated, widths, gapLong, fullWidth, children } = props;
|
|
11
11
|
const rootRef = (0, react_1.useRef)(null);
|
|
12
12
|
const contentRef = (0, react_1.useRef)(null);
|
|
13
13
|
(0, react_1.useEffect)(() => {
|
|
14
14
|
const updateSize = () => {
|
|
15
|
-
if (contentRef.current && rootRef.current) {
|
|
15
|
+
if (contentRef.current && rootRef.current && fullWidth) {
|
|
16
16
|
const space = (window.innerWidth - rootRef.current.clientWidth) / 2;
|
|
17
17
|
contentRef.current.style.setProperty('padding-left', `${space}px`);
|
|
18
18
|
contentRef.current.style.setProperty('padding-right', `${space}px`);
|
|
19
19
|
contentRef.current.style.setProperty('left', `${-space}px`);
|
|
20
|
+
contentRef.current.style.setProperty('width', `calc(100% + ${2 * space}px)`);
|
|
20
21
|
}
|
|
21
22
|
};
|
|
22
23
|
updateSize();
|
|
@@ -24,13 +25,10 @@ const ScrollerBlock = (props) => {
|
|
|
24
25
|
return () => {
|
|
25
26
|
window.removeEventListener('resize', updateSize);
|
|
26
27
|
};
|
|
27
|
-
}, []);
|
|
28
|
-
return (react_1.default.createElement(components_1.AnimateBlock, { className: b(), animate: animated },
|
|
28
|
+
}, [fullWidth]);
|
|
29
|
+
return (react_1.default.createElement(components_1.AnimateBlock, { className: b({ fullWidth }), animate: animated },
|
|
29
30
|
react_1.default.createElement("div", { className: b('root'), ref: rootRef },
|
|
30
|
-
(
|
|
31
|
-
title && react_1.default.createElement("div", { className: b('title') }, title),
|
|
32
|
-
text && react_1.default.createElement("div", { className: b('text') }, text))),
|
|
33
|
-
react_1.default.createElement("div", { className: b('content', { gapLong }), ref: contentRef }, react_1.default.Children.map(children, (child, index) => (react_1.default.createElement("div", { key: index, className: b('item'), style: { width: (widths === null || widths === void 0 ? void 0 : widths[index]) || '100%' } }, child)))))));
|
|
31
|
+
react_1.default.createElement("div", { className: b('content', { gapLong, fullWidth }), ref: contentRef }, react_1.default.Children.map(children, (child, index) => (react_1.default.createElement("div", { key: index, className: b('item'), style: { width: (widths === null || widths === void 0 ? void 0 : widths[index]) || 'auto' } }, child)))))));
|
|
34
32
|
};
|
|
35
33
|
exports.ScrollerBlock = ScrollerBlock;
|
|
36
34
|
exports.default = exports.ScrollerBlock;
|
|
@@ -6,11 +6,7 @@ exports.ScrollerBlock = {
|
|
|
6
6
|
'scroller-block': {
|
|
7
7
|
additionalProperties: false,
|
|
8
8
|
required: false,
|
|
9
|
-
properties: Object.assign(Object.assign(Object.assign({}, common_1.BaseProps), common_1.AnimatableProps), {
|
|
10
|
-
type: 'string',
|
|
11
|
-
}, text: {
|
|
12
|
-
type: 'string',
|
|
13
|
-
}, widths: {
|
|
9
|
+
properties: Object.assign(Object.assign(Object.assign({}, common_1.BaseProps), common_1.AnimatableProps), { widths: {
|
|
14
10
|
type: 'array',
|
|
15
11
|
items: {
|
|
16
12
|
type: 'string',
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { UnicornCardsItemProps } from '../../../models';
|
|
2
|
-
export declare const Item: ({ title, text, unicorn }: UnicornCardsItemProps) => JSX.Element;
|
|
2
|
+
export declare const Item: ({ title, text, unicorn, unicornSdkUrl }: UnicornCardsItemProps) => JSX.Element;
|
|
3
3
|
export default Item;
|
|
@@ -3,15 +3,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Item = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
-
const
|
|
6
|
+
const components_1 = require("../../../components");
|
|
7
7
|
const utils_1 = require("../../../utils");
|
|
8
8
|
const b = (0, utils_1.block)('unicorn-cards-item');
|
|
9
|
-
const Item = ({ title, text, unicorn }) => {
|
|
9
|
+
const Item = ({ title, text, unicorn, unicornSdkUrl }) => {
|
|
10
10
|
return (react_1.default.createElement("div", { className: b() },
|
|
11
11
|
title && react_1.default.createElement("div", { className: b('title') }, title),
|
|
12
12
|
text && react_1.default.createElement("div", { className: b('text') }, text),
|
|
13
13
|
unicorn && (react_1.default.createElement("div", { className: b('background') },
|
|
14
|
-
react_1.default.createElement(
|
|
14
|
+
react_1.default.createElement(components_1.UnicornScene, { className: b('background-item'), jsonFilePath: unicorn, sdkUrl: unicornSdkUrl, width: "100%" })))));
|
|
15
15
|
};
|
|
16
16
|
exports.Item = Item;
|
|
17
17
|
exports.default = exports.Item;
|
|
@@ -11,7 +11,7 @@ const Item_1 = tslib_1.__importDefault(require("./Item/Item"));
|
|
|
11
11
|
const b = (0, utils_1.block)('unicorn-cards-block');
|
|
12
12
|
const colSizes = { all: 12, xl: 3, lg: 4, md: 6 };
|
|
13
13
|
const UnicornCardsBlock = (props) => {
|
|
14
|
-
const { animated, title, items } = props;
|
|
14
|
+
const { animated, title, items, unicornSdkUrl } = props;
|
|
15
15
|
const titleProps = !title || typeof title === 'string'
|
|
16
16
|
? { text: title, textSize: 'l' }
|
|
17
17
|
: title;
|
|
@@ -21,7 +21,7 @@ const UnicornCardsBlock = (props) => {
|
|
|
21
21
|
hasTitle && (react_1.default.createElement(components_1.Title, { title: titleProps, className: b('title'), colSizes: { all: 12 } })),
|
|
22
22
|
react_1.default.createElement(grid_1.Grid, null,
|
|
23
23
|
react_1.default.createElement(grid_1.Row, { className: b('items') }, items === null || items === void 0 ? void 0 : items.map((item, index) => (react_1.default.createElement(grid_1.Col, { key: index, sizes: colSizes },
|
|
24
|
-
react_1.default.createElement(Item_1.default, Object.assign({}, item))))))))));
|
|
24
|
+
react_1.default.createElement(Item_1.default, Object.assign({ unicornSdkUrl: unicornSdkUrl }, item))))))))));
|
|
25
25
|
};
|
|
26
26
|
exports.UnicornCardsBlock = UnicornCardsBlock;
|
|
27
27
|
exports.default = exports.UnicornCardsBlock;
|
|
@@ -159,6 +159,9 @@ export declare const UnicornCardsBlock: {
|
|
|
159
159
|
contentType?: undefined;
|
|
160
160
|
})[];
|
|
161
161
|
};
|
|
162
|
+
unicornSdkUrl: {
|
|
163
|
+
type: string;
|
|
164
|
+
};
|
|
162
165
|
items: {
|
|
163
166
|
type: string;
|
|
164
167
|
items: {
|
|
@@ -175,6 +178,9 @@ export declare const UnicornCardsBlock: {
|
|
|
175
178
|
unicorn: {
|
|
176
179
|
type: string;
|
|
177
180
|
};
|
|
181
|
+
unicornSdkUrl: {
|
|
182
|
+
type: string;
|
|
183
|
+
};
|
|
178
184
|
};
|
|
179
185
|
};
|
|
180
186
|
};
|
|
@@ -15,7 +15,7 @@ exports.UnicornCardsBlock = {
|
|
|
15
15
|
},
|
|
16
16
|
Object.assign(Object.assign({}, common_1.TitleProps), { optionName: 'options' }),
|
|
17
17
|
],
|
|
18
|
-
}, items: {
|
|
18
|
+
}, unicornSdkUrl: { type: 'string' }, items: {
|
|
19
19
|
type: 'array',
|
|
20
20
|
items: {
|
|
21
21
|
type: 'object',
|
|
@@ -25,6 +25,7 @@ exports.UnicornCardsBlock = {
|
|
|
25
25
|
title: { type: 'string' },
|
|
26
26
|
text: { type: 'string' },
|
|
27
27
|
unicorn: { type: 'string' },
|
|
28
|
+
unicornSdkUrl: { type: 'string' },
|
|
28
29
|
},
|
|
29
30
|
},
|
|
30
31
|
} }),
|