@quintype/arrow 3.15.1-fallback-support.1 → 3.15.1-perf.1
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/atoms/Author/index.js +2250 -0
- package/{Author → atoms/Author}/styles.arrow.css +0 -0
- package/atoms/AuthorWithTime/index.js +2954 -0
- package/{AuthorWithTime → atoms/AuthorWithTime}/styles.arrow.css +0 -0
- package/atoms/CollectionName/index.js +2334 -0
- package/{CollectionName → atoms/CollectionName}/styles.arrow.css +0 -0
- package/atoms/ExtendedLoadMore/index-2d713010.js +166 -0
- package/atoms/ExtendedLoadMore/index-4191a84c.js +240 -0
- package/atoms/ExtendedLoadMore/index-5a7900ba.js +181 -0
- package/atoms/ExtendedLoadMore/index-6cb56d1a.js +350 -0
- package/atoms/ExtendedLoadMore/index-6daa674c.js +282 -0
- package/atoms/ExtendedLoadMore/index-6f8c780e.js +243 -0
- package/atoms/ExtendedLoadMore/index-7eb05b3d.js +199 -0
- package/atoms/ExtendedLoadMore/index-8345922c.js +175 -0
- package/atoms/ExtendedLoadMore/index-99af722e.js +175 -0
- package/atoms/ExtendedLoadMore/index-aa8b8ab8.js +990 -0
- package/atoms/ExtendedLoadMore/index-c8f346d0.js +223 -0
- package/atoms/ExtendedLoadMore/index-e39b3ca8.js +3023 -0
- package/atoms/ExtendedLoadMore/index-f6e578e3.js +86 -0
- package/atoms/ExtendedLoadMore/index.js +5 -0
- package/atoms/ExtendedLoadMore/styles.arrow.css +1 -0
- package/atoms/Headline/index.js +2459 -0
- package/{Headline → atoms/Headline}/styles.arrow.css +0 -0
- package/atoms/HeroImage/index.js +2475 -0
- package/{HeroImage → atoms/HeroImage}/styles.arrow.css +0 -0
- package/atoms/LoadmoreButton/index.js +2268 -0
- package/{LoadmoreButton → atoms/LoadmoreButton}/styles.arrow.css +0 -0
- package/atoms/ScrollSnap/index.js +2531 -0
- package/{ScrollSnap → atoms/ScrollSnap}/styles.arrow.css +0 -0
- package/atoms/SectionTag/index.js +2220 -0
- package/{SectionTag → atoms/SectionTag}/styles.arrow.css +0 -0
- package/atoms/Subheadline/index.js +2200 -0
- package/{Subheadline → atoms/Subheadline}/styles.arrow.css +0 -0
- package/atoms/TimeStamp/index.js +2661 -0
- package/{TimeStamp → atoms/TimeStamp}/styles.arrow.css +0 -0
- package/molecules/KeyEvents/index.js +2968 -0
- package/{KeyEvents → molecules/KeyEvents}/styles.arrow.css +0 -0
- package/molecules/PageIntroductionCard/index.js +2676 -0
- package/{PageIntroductionCard → molecules/PageIntroductionCard}/styles.arrow.css +0 -0
- package/molecules/SocialShareTemplate/index.js +3093 -0
- package/{SocialShareTemplate → molecules/SocialShareTemplate}/styles.arrow.css +0 -0
- package/molecules/StoryCard/index.js +3938 -0
- package/{StoryCard → molecules/StoryCard}/styles.arrow.css +0 -0
- package/molecules/StoryElementCard/index.js +5832 -0
- package/{StoryElementCard → molecules/StoryElementCard}/styles.arrow.css +0 -0
- package/molecules/StorycardContent/index.js +3416 -0
- package/{StorycardContent → molecules/StorycardContent}/styles.arrow.css +0 -0
- package/package.json +1 -1
- package/rows/AlternateCollectionFilter/index.js +4744 -0
- package/{AlternateCollectionFilter → rows/AlternateCollectionFilter}/styles.arrow.css +0 -0
- package/rows/AsideCollection/index.js +4690 -0
- package/{AsideCollection → rows/AsideCollection}/styles.arrow.css +0 -0
- package/rows/AstrologyCollection/index.js +4661 -0
- package/{AstrologyCollection → rows/AstrologyCollection}/styles.arrow.css +0 -0
- package/rows/AuthorIntroductionCard/index.js +3520 -0
- package/{AuthorIntroductionCard → rows/AuthorIntroductionCard}/styles.arrow.css +0 -0
- package/rows/AuthorsList/index.js +3715 -0
- package/{AuthorsList → rows/AuthorsList}/styles.arrow.css +0 -0
- package/rows/CollectionFilter/index.js +4834 -0
- package/{CollectionFilter → rows/CollectionFilter}/styles.arrow.css +0 -0
- package/rows/ElevenStories/index.js +4638 -0
- package/{ElevenStories → rows/ElevenStories}/styles.arrow.css +0 -0
- package/rows/FourColFiveStories/index.js +4359 -0
- package/{FourColFiveStories → rows/FourColFiveStories}/styles.arrow.css +0 -0
- package/rows/FourColGrid/index.js +4584 -0
- package/{FourColGrid → rows/FourColGrid}/styles.arrow.css +0 -0
- package/rows/FourColPortraitStories/index.js +4617 -0
- package/{FourColPortraitStories → rows/FourColPortraitStories}/styles.arrow.css +0 -0
- package/rows/FourColSixteenStories/index.js +4375 -0
- package/{FourColSixteenStories → rows/FourColSixteenStories}/styles.arrow.css +0 -0
- package/rows/FourColTwelveStories/index.js +4335 -0
- package/{FourColTwelveStories → rows/FourColTwelveStories}/styles.arrow.css +0 -0
- package/rows/FourStorySlider/index.js +4743 -0
- package/{FourStorySlider → rows/FourStorySlider}/styles.arrow.css +0 -0
- package/rows/FourStorySliderPortrait/index.js +4746 -0
- package/{FourStorySliderPortrait → rows/FourStorySliderPortrait}/styles.arrow.css +1 -1
- package/rows/FourTabbedBigStorySlider/index.js +4505 -0
- package/{FourTabbedBigStorySlider → rows/FourTabbedBigStorySlider}/styles.arrow.css +0 -0
- package/rows/FullScreenSlider/index.js +4661 -0
- package/{FullScreenSlider → rows/FullScreenSlider}/styles.arrow.css +0 -0
- package/rows/HalfScreenSlider/index.js +4514 -0
- package/{HalfScreenSlider → rows/HalfScreenSlider}/styles.arrow.css +0 -0
- package/rows/ListComponent/index.js +4462 -0
- package/{ListComponent → rows/ListComponent}/styles.arrow.css +0 -0
- package/rows/Listicles/index.js +3131 -0
- package/{Listicles → rows/Listicles}/styles.arrow.css +0 -0
- package/rows/MagazineEditions/index.js +3142 -0
- package/{MagazineEditions → rows/MagazineEditions}/styles.arrow.css +0 -0
- package/rows/MagazineHeaderCard/index.js +3136 -0
- package/{MagazineHeaderCard → rows/MagazineHeaderCard}/styles.arrow.css +0 -0
- package/rows/MagazineWidget/index.js +4514 -0
- package/{MagazineWidget → rows/MagazineWidget}/styles.arrow.css +0 -0
- package/rows/OneColStoryList/index.js +4670 -0
- package/{OneColStoryList → rows/OneColStoryList}/styles.arrow.css +0 -0
- package/rows/OpinionCollection/index.js +4037 -0
- package/{OpinionCollection → rows/OpinionCollection}/styles.arrow.css +0 -0
- package/rows/SixColSixStories/index.js +4515 -0
- package/{SixColSixStories → rows/SixColSixStories}/styles.arrow.css +0 -0
- package/rows/StoryCollection/index.js +4690 -0
- package/{StoryCollection → rows/StoryCollection}/styles.arrow.css +0 -0
- package/rows/TagIntroductionCard/index.js +1901 -0
- package/{TagIntroductionCard → rows/TagIntroductionCard}/styles.arrow.css +0 -0
- package/rows/ThreeColFlexStories/index.js +4575 -0
- package/{ThreeColFlexStories → rows/ThreeColFlexStories}/styles.arrow.css +0 -0
- package/rows/ThreeColFourteenStories/index.js +4283 -0
- package/{ThreeColFourteenStories → rows/ThreeColFourteenStories}/styles.arrow.css +0 -0
- package/rows/ThreeColGrid/index.js +4605 -0
- package/{ThreeColGrid → rows/ThreeColGrid}/styles.arrow.css +0 -0
- package/rows/ThreeColSevenStory/index.js +4502 -0
- package/{ThreeColSevenStory → rows/ThreeColSevenStory}/styles.arrow.css +0 -0
- package/rows/ThreeColSixStories/index.js +4485 -0
- package/{ThreeColSixStories → rows/ThreeColSixStories}/styles.arrow.css +0 -0
- package/rows/ThreeColTwelveStories/index.js +4380 -0
- package/{ThreeColTwelveStories → rows/ThreeColTwelveStories}/styles.arrow.css +0 -0
- package/rows/TwoColFourStories/index.js +4463 -0
- package/{TwoColFourStories → rows/TwoColFourStories}/styles.arrow.css +0 -0
- package/rows/TwoColFourStoryHighlight/index.js +4456 -0
- package/{TwoColFourStoryHighlight → rows/TwoColFourStoryHighlight}/styles.arrow.css +0 -0
- package/rows/TwoColSevenStories/index.js +4490 -0
- package/{TwoColSevenStories → rows/TwoColSevenStories}/styles.arrow.css +0 -0
- package/rows/TwoColSixStories/index.js +4489 -0
- package/{TwoColSixStories → rows/TwoColSixStories}/styles.arrow.css +0 -0
- package/rows/TwoColTenStoriesSidebar/index.js +4549 -0
- package/{TwoColTenStoriesSidebar → rows/TwoColTenStoriesSidebar}/styles.arrow.css +0 -0
- package/rows/TwoColThreeStories/index.js +4436 -0
- package/{TwoColThreeStories → rows/TwoColThreeStories}/styles.arrow.css +0 -0
- package/story-elements/AlsoRead/index.js +2457 -0
- package/{AlsoRead → story-elements/AlsoRead}/styles.arrow.css +0 -0
- package/story-elements/Attachment/index.js +2013 -0
- package/{Attachment → story-elements/Attachment}/styles.arrow.css +0 -0
- package/story-elements/BigFact/index.js +1983 -0
- package/{BigFact → story-elements/BigFact}/styles.arrow.css +0 -0
- package/story-elements/BlockQuote/index.js +2431 -0
- package/{BlockQuote → story-elements/BlockQuote}/styles.arrow.css +0 -0
- package/story-elements/Blurb/index.js +2094 -0
- package/{Blurb → story-elements/Blurb}/styles.arrow.css +0 -0
- package/story-elements/Image/index.js +2711 -0
- package/{Image → story-elements/Image}/styles.arrow.css +0 -0
- package/story-elements/ImageGallery/index.js +2644 -0
- package/{ImageGallery → story-elements/ImageGallery}/styles.arrow.css +0 -0
- package/story-elements/ImageSlideshow/index.js +2955 -0
- package/{ImageSlideshow → story-elements/ImageSlideshow}/styles.arrow.css +0 -0
- package/story-elements/QuestionAnswer/index.js +2395 -0
- package/{QuestionAnswer → story-elements/QuestionAnswer}/styles.arrow.css +0 -0
- package/story-elements/Quote/index.js +2012 -0
- package/{Quote → story-elements/Quote}/styles.arrow.css +0 -0
- package/story-elements/Reference/index.js +2006 -0
- package/{Reference → story-elements/Reference}/styles.arrow.css +0 -0
- package/story-elements/StoryElement/index.js +1779 -0
- package/story-elements/Summary/index.js +2036 -0
- package/{Summary → story-elements/Summary}/styles.arrow.css +0 -0
- package/story-elements/Text/index.js +2293 -0
- package/{Text → story-elements/Text}/styles.arrow.css +0 -0
- package/story-elements/Video/index.js +1785 -0
- package/{Video → story-elements/Video}/styles.arrow.css +0 -0
- package/story-templates/ListicleStoryTemplate/index.js +8442 -0
- package/{ListicleStoryTemplate → story-templates/ListicleStoryTemplate}/styles.arrow.css +0 -0
- package/story-templates/LiveBlogStoryTemplate/index.js +8618 -0
- package/{LiveBlogStoryTemplate → story-templates/LiveBlogStoryTemplate}/styles.arrow.css +0 -0
- package/story-templates/PhotoStoryTemplate/index.js +8420 -0
- package/{PhotoStoryTemplate → story-templates/PhotoStoryTemplate}/styles.arrow.css +0 -0
- package/story-templates/TextStoryTemplate/index.js +8493 -0
- package/{TextStoryTemplate → story-templates/TextStoryTemplate}/styles.arrow.css +0 -0
- package/story-templates/VideoStoryTemplate/index.js +8352 -0
- package/{VideoStoryTemplate → story-templates/VideoStoryTemplate}/styles.arrow.css +0 -0
- package/cjs/index.js +0 -1
- package/esm/index.js +0 -1
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
import { a as get_1, g as getTextColor, _ as _getClassName, t as truncate, i as isEmpty, r as rgbToHex } from './index-e39b3ca8.js';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { u as useStateValue, H as Headline, A as AuthorWithTime } from './index-aa8b8ab8.js';
|
|
4
|
+
import PropTypes from 'prop-types';
|
|
5
|
+
import { H as HeroImage, S as SectionTag } from './index-6cb56d1a.js';
|
|
6
|
+
|
|
7
|
+
var _styleModuleImportMap$1 = {
|
|
8
|
+
"./subheadline.m.css": {
|
|
9
|
+
"subheadline": "subheadline-m_subheadline__3fd7z",
|
|
10
|
+
"dark": "subheadline-m_dark__28u00",
|
|
11
|
+
"light": "subheadline-m_light__2YUOe"
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
var Subheadline = function Subheadline(_ref) {
|
|
15
|
+
var story = _ref.story,
|
|
16
|
+
_ref$truncateChars = _ref.truncateChars,
|
|
17
|
+
truncateChars = _ref$truncateChars === void 0 ? 200 : _ref$truncateChars,
|
|
18
|
+
lineClamp = _ref.lineClamp,
|
|
19
|
+
_ref$clazzName = _ref.clazzName,
|
|
20
|
+
clazzName = _ref$clazzName === void 0 ? "" : _ref$clazzName,
|
|
21
|
+
forceShowAtom = _ref.forceShowAtom,
|
|
22
|
+
showFullContent = _ref.showFullContent;
|
|
23
|
+
var config = useStateValue() || {};
|
|
24
|
+
var subheadline = forceShowAtom || get_1(config, ["showSubheadline"], true);
|
|
25
|
+
if (!subheadline) return null;
|
|
26
|
+
var textColor = getTextColor(config.theme);
|
|
27
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
28
|
+
style: {
|
|
29
|
+
WebkitLineClamp: lineClamp
|
|
30
|
+
},
|
|
31
|
+
"data-test-id": "subheadline",
|
|
32
|
+
className: ("p-alt arr--sub-headline arrow-component ".concat(clazzName) ? "p-alt arr--sub-headline arrow-component ".concat(clazzName) + " " : "") + _getClassName("subheadline ".concat(textColor), _styleModuleImportMap$1)
|
|
33
|
+
}, showFullContent || typeof lineClamp === "number" ? story.subheadline : truncate(story.subheadline, truncateChars, true));
|
|
34
|
+
};
|
|
35
|
+
Subheadline.propTypes = {
|
|
36
|
+
/** The Story Object from the API response */
|
|
37
|
+
story: PropTypes.object.isRequired,
|
|
38
|
+
// Restricts the number of lines for subheadline.
|
|
39
|
+
lineClamp: PropTypes.number,
|
|
40
|
+
|
|
41
|
+
/** Number of characters to truncate the subheadline */
|
|
42
|
+
truncateChars: PropTypes.number,
|
|
43
|
+
clazzName: PropTypes.string,
|
|
44
|
+
forceShowAtom: PropTypes.bool,
|
|
45
|
+
showFullContent: PropTypes.bool
|
|
46
|
+
};
|
|
47
|
+
Subheadline.defaultProps = {
|
|
48
|
+
forceShowAtom: false,
|
|
49
|
+
showFullContent: false
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
var _styleModuleImportMap = {
|
|
53
|
+
"./storycard.m.css": {
|
|
54
|
+
"author-timestamp-wrapper": "storycard-m_author-timestamp-wrapper__20yjp",
|
|
55
|
+
"default-card": "storycard-m_default-card__1-POn",
|
|
56
|
+
"horizontal-card": "storycard-m_horizontal-card___7afz",
|
|
57
|
+
"backgroung-img": "storycard-m_backgroung-img__1FMJT",
|
|
58
|
+
"content-overlap": "storycard-m_content-overlap__1yNHR",
|
|
59
|
+
"border-full": "storycard-m_border-full__1nhy7",
|
|
60
|
+
"light": "storycard-m_light__3EhXN",
|
|
61
|
+
"dark": "storycard-m_dark__2wCTq",
|
|
62
|
+
"border-bottom": "storycard-m_border-bottom__2_E-I",
|
|
63
|
+
"border-boxShadow": "storycard-m_border-boxShadow__2-k3Z",
|
|
64
|
+
"center-align": "storycard-m_center-align__1Sn8-",
|
|
65
|
+
"content-bottom": "storycard-m_content-bottom__1QHeC",
|
|
66
|
+
"content-full": "storycard-m_content-full__2zJmU",
|
|
67
|
+
"content-boxShadow": "storycard-m_content-boxShadow__2IAWZ",
|
|
68
|
+
"hero-image": "storycard-m_hero-image__1H3MB",
|
|
69
|
+
"right-padding": "storycard-m_right-padding__12-lQ",
|
|
70
|
+
"horizontal-mob": "storycard-m_horizontal-mob__17JG2",
|
|
71
|
+
"content": "storycard-m_content__1Q9vq",
|
|
72
|
+
"border-default": "storycard-m_border-default__PEZ1x",
|
|
73
|
+
"card": "storycard-m_card__KJwRa",
|
|
74
|
+
"horizontal-image-last": "storycard-m_horizontal-image-last__3o6LY"
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
var StoryCard = function StoryCard(_ref) {
|
|
78
|
+
var story = _ref.story,
|
|
79
|
+
children = _ref.children,
|
|
80
|
+
isHorizontal = _ref.isHorizontal,
|
|
81
|
+
aspectRatio = _ref.aspectRatio,
|
|
82
|
+
border = _ref.border,
|
|
83
|
+
useImageAsBackground = _ref.useImageAsBackground,
|
|
84
|
+
bgImgContentOverlap = _ref.bgImgContentOverlap,
|
|
85
|
+
theme = _ref.theme,
|
|
86
|
+
borderColor = _ref.borderColor,
|
|
87
|
+
isHorizontalMobile = _ref.isHorizontalMobile,
|
|
88
|
+
centerAlign = _ref.centerAlign,
|
|
89
|
+
headerLevel = _ref.headerLevel,
|
|
90
|
+
hideAuthorImage = _ref.hideAuthorImage,
|
|
91
|
+
prefix = _ref.prefix,
|
|
92
|
+
config = _ref.config,
|
|
93
|
+
isHorizontalWithImageLast = _ref.isHorizontalWithImageLast;
|
|
94
|
+
if (!story || isEmpty(story)) return /*#__PURE__*/React.createElement("div", null);
|
|
95
|
+
var borderOptions = ["default", "full", "bottom", "boxShadow"];
|
|
96
|
+
var borderTemplate = borderOptions.includes(border) ? "border-".concat(border) : ""; // TODO optimize conditions
|
|
97
|
+
|
|
98
|
+
var horizontalCardStyle = "default-card";
|
|
99
|
+
if (isHorizontal) horizontalCardStyle = "horizontal-card";else if (isHorizontalWithImageLast) horizontalCardStyle = "horizontal-image-last";
|
|
100
|
+
var bgImageClasses = useImageAsBackground ? "backgroung-img" : "";
|
|
101
|
+
var bgImgContentOverlapClass = bgImgContentOverlap ? "content-overlap" : "";
|
|
102
|
+
var textColor = getTextColor(theme);
|
|
103
|
+
var horizontalMobileClasses = isHorizontalMobile ? "horizontal-mob" : "";
|
|
104
|
+
var defaultStorycard = /*#__PURE__*/React.createElement(DefaultStoryCard, {
|
|
105
|
+
story: story,
|
|
106
|
+
aspectRatio: aspectRatio,
|
|
107
|
+
border: border,
|
|
108
|
+
isHorizontalMobile: isHorizontalMobile,
|
|
109
|
+
isHorizontal: isHorizontal,
|
|
110
|
+
centerAlign: centerAlign,
|
|
111
|
+
headerLevel: headerLevel,
|
|
112
|
+
borderColor: borderColor,
|
|
113
|
+
hideAuthorImage: hideAuthorImage,
|
|
114
|
+
prefix: prefix,
|
|
115
|
+
config: config,
|
|
116
|
+
isHorizontalWithImageLast: isHorizontalWithImageLast
|
|
117
|
+
});
|
|
118
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
119
|
+
"data-test-id": "story-card",
|
|
120
|
+
style: {
|
|
121
|
+
backgroundColor: theme,
|
|
122
|
+
color: textColor
|
|
123
|
+
},
|
|
124
|
+
className: "arr--story-card " + _getClassName("card ".concat(horizontalCardStyle, " ").concat(borderTemplate, " ").concat(textColor, " ").concat(bgImageClasses, " ").concat(bgImgContentOverlapClass, " ").concat(horizontalMobileClasses), _styleModuleImportMap)
|
|
125
|
+
}, children || defaultStorycard);
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
var DefaultStoryCard = function DefaultStoryCard(_ref2) {
|
|
129
|
+
var story = _ref2.story;
|
|
130
|
+
_ref2.border;
|
|
131
|
+
var isHorizontal = _ref2.isHorizontal,
|
|
132
|
+
aspectRatio = _ref2.aspectRatio,
|
|
133
|
+
headerLevel = _ref2.headerLevel,
|
|
134
|
+
_ref2$isHorizontalMob = _ref2.isHorizontalMobile,
|
|
135
|
+
isHorizontalMobile = _ref2$isHorizontalMob === void 0 ? false : _ref2$isHorizontalMob,
|
|
136
|
+
_ref2$centerAlign = _ref2.centerAlign,
|
|
137
|
+
centerAlign = _ref2$centerAlign === void 0 ? false : _ref2$centerAlign,
|
|
138
|
+
borderColor = _ref2.borderColor,
|
|
139
|
+
hideAuthorImage = _ref2.hideAuthorImage,
|
|
140
|
+
prefix = _ref2.prefix,
|
|
141
|
+
isHorizontalWithImageLast = _ref2.isHorizontalWithImageLast,
|
|
142
|
+
config = _ref2.config;
|
|
143
|
+
var alignment = centerAlign ? "center-align" : "";
|
|
144
|
+
var SectionTagborderColor = rgbToHex(borderColor);
|
|
145
|
+
var _config$localizationC = config.localizationConfig,
|
|
146
|
+
localizationConfig = _config$localizationC === void 0 ? {} : _config$localizationC;
|
|
147
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, isHorizontal ? /*#__PURE__*/React.createElement(HeroImage, {
|
|
148
|
+
config: config,
|
|
149
|
+
story: story,
|
|
150
|
+
isHorizontal: true,
|
|
151
|
+
isHorizontalMobile: isHorizontalMobile,
|
|
152
|
+
aspectRatio: aspectRatio
|
|
153
|
+
}) : isHorizontalWithImageLast ? /*#__PURE__*/React.createElement(HeroImage, {
|
|
154
|
+
config: config,
|
|
155
|
+
story: story,
|
|
156
|
+
isHorizontalWithImageLast: true,
|
|
157
|
+
isHorizontalMobile: isHorizontalMobile,
|
|
158
|
+
aspectRatio: aspectRatio
|
|
159
|
+
}) : /*#__PURE__*/React.createElement(HeroImage, {
|
|
160
|
+
story: story,
|
|
161
|
+
config: config,
|
|
162
|
+
isHorizontalMobile: isHorizontalMobile,
|
|
163
|
+
aspectRatio: aspectRatio
|
|
164
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
165
|
+
className: "arr--story-content " + _getClassName("content ".concat(alignment), _styleModuleImportMap)
|
|
166
|
+
}, /*#__PURE__*/React.createElement(SectionTag, {
|
|
167
|
+
story: story,
|
|
168
|
+
borderColor: SectionTagborderColor
|
|
169
|
+
}), /*#__PURE__*/React.createElement(Headline, {
|
|
170
|
+
story: story,
|
|
171
|
+
headerLevel: headerLevel,
|
|
172
|
+
premiumStoryIconConfig: config
|
|
173
|
+
}), /*#__PURE__*/React.createElement(AuthorWithTime, {
|
|
174
|
+
config: localizationConfig,
|
|
175
|
+
story: story,
|
|
176
|
+
isBottom: true,
|
|
177
|
+
prefix: prefix,
|
|
178
|
+
hideAuthorImage: hideAuthorImage
|
|
179
|
+
}), /*#__PURE__*/React.createElement(Subheadline, {
|
|
180
|
+
story: story
|
|
181
|
+
})));
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
DefaultStoryCard.propTypes = {
|
|
185
|
+
story: PropTypes.object.isRequired,
|
|
186
|
+
border: PropTypes.oneOfType([PropTypes.string]),
|
|
187
|
+
isBottom: PropTypes.bool,
|
|
188
|
+
isHorizontal: PropTypes.bool,
|
|
189
|
+
aspectRatio: PropTypes.oneOfType([PropTypes.array]),
|
|
190
|
+
isHorizontalMobile: PropTypes.bool,
|
|
191
|
+
centerAlign: PropTypes.bool,
|
|
192
|
+
headerLevel: PropTypes.string,
|
|
193
|
+
borderColor: PropTypes.string,
|
|
194
|
+
hideAuthorImage: PropTypes.bool,
|
|
195
|
+
prefix: PropTypes.string,
|
|
196
|
+
config: PropTypes.object,
|
|
197
|
+
isHorizontalWithImageLast: PropTypes.bool
|
|
198
|
+
};
|
|
199
|
+
StoryCard.propTypes = {
|
|
200
|
+
/** The Story Object from the API response */
|
|
201
|
+
story: PropTypes.object.isRequired,
|
|
202
|
+
children: PropTypes.node,
|
|
203
|
+
|
|
204
|
+
/** Flip the Story Card to Horizonal mode */
|
|
205
|
+
isHorizontal: PropTypes.bool,
|
|
206
|
+
|
|
207
|
+
/** Add border to the Story Card */
|
|
208
|
+
border: PropTypes.oneOfType([PropTypes.string]),
|
|
209
|
+
// story card with background image
|
|
210
|
+
useImageAsBackground: PropTypes.bool,
|
|
211
|
+
// story card content overlap with image
|
|
212
|
+
bgImgContentOverlap: PropTypes.bool,
|
|
213
|
+
|
|
214
|
+
/** add aspect ratio for hero image */
|
|
215
|
+
aspectRatio: PropTypes.oneOfType([PropTypes.array]),
|
|
216
|
+
|
|
217
|
+
/** add theme(dark /light/custom color) for storycard */
|
|
218
|
+
theme: PropTypes.string,
|
|
219
|
+
|
|
220
|
+
/** flip the story card mobile design horizontal */
|
|
221
|
+
isHorizontalMobile: PropTypes.bool,
|
|
222
|
+
// make content center align in desktop and left align in mobile
|
|
223
|
+
centerAlign: PropTypes.bool,
|
|
224
|
+
headerLevel: PropTypes.string,
|
|
225
|
+
borderColor: PropTypes.string,
|
|
226
|
+
// handle author image through storycard
|
|
227
|
+
hideAuthorImage: PropTypes.bool,
|
|
228
|
+
// handle author prefix through storycard
|
|
229
|
+
prefix: PropTypes.string,
|
|
230
|
+
config: PropTypes.object,
|
|
231
|
+
isHorizontalWithImageLast: PropTypes.bool
|
|
232
|
+
};
|
|
233
|
+
StoryCard.defaultProps = {
|
|
234
|
+
isHorizontal: false,
|
|
235
|
+
isHorizontalMobile: false,
|
|
236
|
+
border: "default",
|
|
237
|
+
theme: "",
|
|
238
|
+
centerAlign: false,
|
|
239
|
+
borderColor: "",
|
|
240
|
+
isHorizontalWithImageLast: false
|
|
241
|
+
};
|
|
242
|
+
|
|
243
|
+
export { StoryCard as S, Subheadline as a };
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useDispatch, useSelector } from 'react-redux';
|
|
3
|
+
import { i as isEmpty, g as getTextColor, a as get_1, b as generateNavigateSlug, n as navigateTo } from './index-e39b3ca8.js';
|
|
4
|
+
import PropTypes from 'prop-types';
|
|
5
|
+
import { collectionToStories } from '@quintype/components';
|
|
6
|
+
import { S as StateProvider, C as CollectionName, L as LoadMoreTarget, P as ProgressiveHydration, a as LoadmoreButton } from './index-aa8b8ab8.js';
|
|
7
|
+
import { S as StoryCard } from './index-6f8c780e.js';
|
|
8
|
+
import { S as StorycardContent } from './index-f6e578e3.js';
|
|
9
|
+
import { H as HeroImage } from './index-6cb56d1a.js';
|
|
10
|
+
import 'react-timeago';
|
|
11
|
+
import 'date-fns-tz';
|
|
12
|
+
import 'react-dom';
|
|
13
|
+
|
|
14
|
+
var PortraitStoryCardBase = function PortraitStoryCardBase(_ref) {
|
|
15
|
+
var story = _ref.story,
|
|
16
|
+
_ref$border = _ref.border,
|
|
17
|
+
border = _ref$border === void 0 ? "" : _ref$border,
|
|
18
|
+
_ref$theme = _ref.theme,
|
|
19
|
+
theme = _ref$theme === void 0 ? "" : _ref$theme,
|
|
20
|
+
_ref$headerLevel = _ref.headerLevel,
|
|
21
|
+
headerLevel = _ref$headerLevel === void 0 ? "6" : _ref$headerLevel,
|
|
22
|
+
_ref$separator = _ref.separator,
|
|
23
|
+
separator = _ref$separator === void 0 ? "" : _ref$separator,
|
|
24
|
+
_ref$config = _ref.config,
|
|
25
|
+
config = _ref$config === void 0 ? {} : _ref$config,
|
|
26
|
+
_ref$borderColor = _ref.borderColor,
|
|
27
|
+
borderColor = _ref$borderColor === void 0 ? "" : _ref$borderColor;
|
|
28
|
+
if (isEmpty(story)) return null;
|
|
29
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
30
|
+
className: "portrait-story-card-m_wrapper__3nche"
|
|
31
|
+
}, /*#__PURE__*/React.createElement(StoryCard, {
|
|
32
|
+
story: story,
|
|
33
|
+
border: border,
|
|
34
|
+
theme: theme,
|
|
35
|
+
config: config,
|
|
36
|
+
useImageAsBackground: true
|
|
37
|
+
}, /*#__PURE__*/React.createElement(HeroImage, {
|
|
38
|
+
story: story,
|
|
39
|
+
aspectRatio: [[9, 16]]
|
|
40
|
+
}), /*#__PURE__*/React.createElement(StorycardContent, {
|
|
41
|
+
story: story,
|
|
42
|
+
config: config,
|
|
43
|
+
separator: separator,
|
|
44
|
+
borderColor: borderColor,
|
|
45
|
+
headerLevel: headerLevel
|
|
46
|
+
})));
|
|
47
|
+
};
|
|
48
|
+
PortraitStoryCardBase.propTypes = {
|
|
49
|
+
border: PropTypes.string,
|
|
50
|
+
theme: PropTypes.string,
|
|
51
|
+
headerLevel: PropTypes.string,
|
|
52
|
+
separator: PropTypes.string,
|
|
53
|
+
borderColor: PropTypes.string,
|
|
54
|
+
config: PropTypes.object,
|
|
55
|
+
story: PropTypes.object
|
|
56
|
+
};
|
|
57
|
+
var PortraitStoryCard = StateProvider(PortraitStoryCardBase);
|
|
58
|
+
|
|
59
|
+
var loadMore = function loadMore(_ref) {
|
|
60
|
+
var isLoading = _ref.isLoading,
|
|
61
|
+
storyItems = _ref.storyItems,
|
|
62
|
+
getMoreStories = _ref.getMoreStories,
|
|
63
|
+
_ref$subsequentLoadCo = _ref.subsequentLoadCount,
|
|
64
|
+
subsequentLoadCount = _ref$subsequentLoadCo === void 0 ? 4 : _ref$subsequentLoadCo;
|
|
65
|
+
if (isLoading) return; // prevent multiple clicks/calls
|
|
66
|
+
|
|
67
|
+
var limit = subsequentLoadCount;
|
|
68
|
+
var offset = storyItems.length;
|
|
69
|
+
getMoreStories(offset, limit);
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
var FourColPortraitStoriesBase = function FourColPortraitStoriesBase(_ref2) {
|
|
73
|
+
var collection = _ref2.collection,
|
|
74
|
+
_ref2$config = _ref2.config,
|
|
75
|
+
config = _ref2$config === void 0 ? {} : _ref2$config,
|
|
76
|
+
getMoreStories = _ref2.getMoreStories,
|
|
77
|
+
isLoadMoreVisible = _ref2.isLoadMoreVisible,
|
|
78
|
+
isLoading = _ref2.isLoading,
|
|
79
|
+
isolatedLoadMore = _ref2.isolatedLoadMore;
|
|
80
|
+
var storyItems = collectionToStories(collection);
|
|
81
|
+
if (!storyItems.length) return null;
|
|
82
|
+
var _config$collectionNam = config.collectionNameBorderColor,
|
|
83
|
+
collectionNameBorderColor = _config$collectionNam === void 0 ? "" : _config$collectionNam,
|
|
84
|
+
_config$borderColor = config.borderColor,
|
|
85
|
+
borderColor = _config$borderColor === void 0 ? "" : _config$borderColor,
|
|
86
|
+
_config$theme = config.theme,
|
|
87
|
+
theme = _config$theme === void 0 ? "" : _config$theme,
|
|
88
|
+
_config$border = config.border,
|
|
89
|
+
border = _config$border === void 0 ? "" : _config$border,
|
|
90
|
+
_config$collectionNam2 = config.collectionNameTemplate,
|
|
91
|
+
collectionNameTemplate = _config$collectionNam2 === void 0 ? "" : _config$collectionNam2,
|
|
92
|
+
_config$footerSlotCon = config.footerSlotConfig,
|
|
93
|
+
footerSlotConfig = _config$footerSlotCon === void 0 ? {} : _config$footerSlotCon,
|
|
94
|
+
_config$footerButton = config.footerButton,
|
|
95
|
+
footerButton = _config$footerButton === void 0 ? "" : _config$footerButton,
|
|
96
|
+
customCollectionName = config.customCollectionName,
|
|
97
|
+
_config$navigate = config.navigate,
|
|
98
|
+
navigate = _config$navigate === void 0 ? true : _config$navigate,
|
|
99
|
+
_config$subsequentLoa = config.subsequentLoadCount,
|
|
100
|
+
subsequentLoadCount = _config$subsequentLoa === void 0 ? 4 : _config$subsequentLoa;
|
|
101
|
+
var footerSlot = footerSlotConfig.footerSlot;
|
|
102
|
+
var footerSlotComp = typeof footerSlot === "function" ? footerSlot() : null;
|
|
103
|
+
var textColor = getTextColor(theme);
|
|
104
|
+
var dispatch = useDispatch();
|
|
105
|
+
var qtConfig = useSelector(function (state) {
|
|
106
|
+
return get_1(state, ["qt", "config"], {});
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
var getLoadMore = function getLoadMore(opts) {
|
|
110
|
+
if (!isLoadMoreVisible) return null;
|
|
111
|
+
|
|
112
|
+
if (isolatedLoadMore) {
|
|
113
|
+
return /*#__PURE__*/React.createElement(LoadMoreTarget, {
|
|
114
|
+
collection: collection,
|
|
115
|
+
componentName: "FourColPortraitStories",
|
|
116
|
+
offset: storyItems.length,
|
|
117
|
+
limit: subsequentLoadCount
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
var url = generateNavigateSlug(collection, qtConfig);
|
|
122
|
+
return /*#__PURE__*/React.createElement(ProgressiveHydration, null, /*#__PURE__*/React.createElement(LoadmoreButton, {
|
|
123
|
+
config: config,
|
|
124
|
+
collection: collection,
|
|
125
|
+
template: footerButton,
|
|
126
|
+
onClick: function onClick() {
|
|
127
|
+
return loadMore(opts);
|
|
128
|
+
},
|
|
129
|
+
navigate: function navigate() {
|
|
130
|
+
return navigateTo(dispatch, url);
|
|
131
|
+
},
|
|
132
|
+
qtConfig: qtConfig
|
|
133
|
+
}));
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
137
|
+
className: "full-width-with-padding arrow-component",
|
|
138
|
+
"data-test-id": "four-col-portrait-stories",
|
|
139
|
+
style: {
|
|
140
|
+
backgroundColor: theme,
|
|
141
|
+
color: textColor
|
|
142
|
+
}
|
|
143
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
144
|
+
className: "four-col-portrait-stories-m_four-col-portrait__AtWub"
|
|
145
|
+
}, /*#__PURE__*/React.createElement(CollectionName, {
|
|
146
|
+
collection: collection,
|
|
147
|
+
collectionNameTemplate: collectionNameTemplate,
|
|
148
|
+
collectionNameBorderColor: collectionNameBorderColor,
|
|
149
|
+
customCollectionName: customCollectionName,
|
|
150
|
+
navigate: navigate
|
|
151
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
152
|
+
className: "four-col-portrait-stories-m_wrapper__1BX02"
|
|
153
|
+
}, storyItems.map(function (story, index) {
|
|
154
|
+
return /*#__PURE__*/React.createElement(PortraitStoryCard, {
|
|
155
|
+
story: story,
|
|
156
|
+
border: border,
|
|
157
|
+
theme: theme,
|
|
158
|
+
config: Object.assign({
|
|
159
|
+
showSection: false,
|
|
160
|
+
showAuthor: false,
|
|
161
|
+
showReadTime: false
|
|
162
|
+
}, config),
|
|
163
|
+
borderColor: borderColor,
|
|
164
|
+
key: "story-card-".concat(index)
|
|
165
|
+
});
|
|
166
|
+
})), getLoadMore({
|
|
167
|
+
isLoading: isLoading,
|
|
168
|
+
storyItems: storyItems,
|
|
169
|
+
getMoreStories: getMoreStories,
|
|
170
|
+
subsequentLoadCount: subsequentLoadCount
|
|
171
|
+
}), footerSlotComp));
|
|
172
|
+
};
|
|
173
|
+
FourColPortraitStoriesBase.propTypes = {
|
|
174
|
+
/** collection is the array of objects which is returning by API */
|
|
175
|
+
collection: PropTypes.object.isRequired,
|
|
176
|
+
|
|
177
|
+
/** The config for the Row */
|
|
178
|
+
config: PropTypes.shape({
|
|
179
|
+
borderColor: PropTypes.string,
|
|
180
|
+
theme: PropTypes.string,
|
|
181
|
+
border: PropTypes.bool,
|
|
182
|
+
collectionNameTemplate: PropTypes.string,
|
|
183
|
+
footerButton: PropTypes.string,
|
|
184
|
+
collectionNameBorderColor: PropTypes.string,
|
|
185
|
+
subsequentLoadCount: PropTypes.number
|
|
186
|
+
}),
|
|
187
|
+
getMoreStories: PropTypes.func,
|
|
188
|
+
isLoadMoreVisible: PropTypes.bool,
|
|
189
|
+
isLoading: PropTypes.bool,
|
|
190
|
+
isolatedLoadMore: PropTypes.bool
|
|
191
|
+
};
|
|
192
|
+
FourColPortraitStoriesBase.defaultProps = {
|
|
193
|
+
getMoreStories: function getMoreStories() {},
|
|
194
|
+
isLoadMoreVisible: true,
|
|
195
|
+
isLoading: false
|
|
196
|
+
};
|
|
197
|
+
var FourColPortraitStories = StateProvider(FourColPortraitStoriesBase);
|
|
198
|
+
|
|
199
|
+
export { FourColPortraitStories, FourColPortraitStoriesBase };
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import React, { Fragment } from 'react';
|
|
2
|
+
import { g as getTextColor, a as get_1, l as getSlot, b as generateNavigateSlug, n as navigateTo } from './index-e39b3ca8.js';
|
|
3
|
+
import { S as StoryCard } from './index-6f8c780e.js';
|
|
4
|
+
import { H as HeroImage } from './index-6cb56d1a.js';
|
|
5
|
+
import { S as StorycardContent } from './index-f6e578e3.js';
|
|
6
|
+
import { C as CollectionName, S as StateProvider, L as LoadMoreTarget, P as ProgressiveHydration, a as LoadmoreButton } from './index-aa8b8ab8.js';
|
|
7
|
+
import { collectionToStories } from '@quintype/components';
|
|
8
|
+
import PropTypes from 'prop-types';
|
|
9
|
+
import { useDispatch, useSelector } from 'react-redux';
|
|
10
|
+
import 'react-timeago';
|
|
11
|
+
import 'date-fns-tz';
|
|
12
|
+
import 'react-dom';
|
|
13
|
+
|
|
14
|
+
var loadMore = function loadMore(_ref) {
|
|
15
|
+
var isLoading = _ref.isLoading,
|
|
16
|
+
storyItems = _ref.storyItems,
|
|
17
|
+
getMoreStories = _ref.getMoreStories,
|
|
18
|
+
_ref$subsequentLoadCo = _ref.subsequentLoadCount,
|
|
19
|
+
subsequentLoadCount = _ref$subsequentLoadCo === void 0 ? 3 : _ref$subsequentLoadCo;
|
|
20
|
+
if (isLoading) return;
|
|
21
|
+
var limit = subsequentLoadCount;
|
|
22
|
+
var offset = storyItems.length;
|
|
23
|
+
getMoreStories(offset, limit);
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
var ThreeColGridBase = function ThreeColGridBase(_ref2) {
|
|
27
|
+
var collection = _ref2.collection,
|
|
28
|
+
_ref2$config = _ref2.config,
|
|
29
|
+
config = _ref2$config === void 0 ? {} : _ref2$config,
|
|
30
|
+
getMoreStories = _ref2.getMoreStories,
|
|
31
|
+
isLoadMoreVisible = _ref2.isLoadMoreVisible,
|
|
32
|
+
isLoading = _ref2.isLoading,
|
|
33
|
+
isolatedLoadMore = _ref2.isolatedLoadMore;
|
|
34
|
+
var _config$collectionNam = config.collectionNameBorderColor,
|
|
35
|
+
collectionNameBorderColor = _config$collectionNam === void 0 ? "" : _config$collectionNam,
|
|
36
|
+
_config$borderColor = config.borderColor,
|
|
37
|
+
borderColor = _config$borderColor === void 0 ? "" : _config$borderColor,
|
|
38
|
+
_config$theme = config.theme,
|
|
39
|
+
theme = _config$theme === void 0 ? "" : _config$theme,
|
|
40
|
+
_config$slotConfig = config.slotConfig,
|
|
41
|
+
slotConfig = _config$slotConfig === void 0 ? [] : _config$slotConfig,
|
|
42
|
+
_config$border = config.border,
|
|
43
|
+
border = _config$border === void 0 ? "" : _config$border,
|
|
44
|
+
_config$collectionNam2 = config.collectionNameTemplate,
|
|
45
|
+
collectionNameTemplate = _config$collectionNam2 === void 0 ? "" : _config$collectionNam2,
|
|
46
|
+
_config$footerSlotCon = config.footerSlotConfig,
|
|
47
|
+
footerSlotConfig = _config$footerSlotCon === void 0 ? {} : _config$footerSlotCon,
|
|
48
|
+
_config$footerButton = config.footerButton,
|
|
49
|
+
footerButton = _config$footerButton === void 0 ? "" : _config$footerButton,
|
|
50
|
+
_config$subsequentLoa = config.subsequentLoadCount,
|
|
51
|
+
subsequentLoadCount = _config$subsequentLoa === void 0 ? 3 : _config$subsequentLoa;
|
|
52
|
+
var storyItems = collectionToStories(collection);
|
|
53
|
+
if (!storyItems.length) return null;
|
|
54
|
+
var textColor = getTextColor(theme);
|
|
55
|
+
var footerSlot = footerSlotConfig.footerSlot;
|
|
56
|
+
var footerSlotComp = footerSlot ? footerSlot() : null;
|
|
57
|
+
|
|
58
|
+
var _get = get_1(slotConfig, [0], {}),
|
|
59
|
+
_get$type = _get.type,
|
|
60
|
+
type = _get$type === void 0 ? "" : _get$type,
|
|
61
|
+
component = _get.component;
|
|
62
|
+
|
|
63
|
+
var adWidgetSlot = type === "ad" || type === "widget" ? getSlot(type, component) : null;
|
|
64
|
+
var dispatch = useDispatch();
|
|
65
|
+
var qtConfig = useSelector(function (state) {
|
|
66
|
+
return get_1(state, ["qt", "config"], {});
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
var getLoadMore = function getLoadMore(opts) {
|
|
70
|
+
if (!isLoadMoreVisible) return null;
|
|
71
|
+
|
|
72
|
+
if (isolatedLoadMore) {
|
|
73
|
+
return /*#__PURE__*/React.createElement(LoadMoreTarget, {
|
|
74
|
+
collection: collection,
|
|
75
|
+
componentName: "ThreeColGrid",
|
|
76
|
+
offset: storyItems.length,
|
|
77
|
+
limit: subsequentLoadCount
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
var url = generateNavigateSlug(collection, qtConfig);
|
|
82
|
+
return /*#__PURE__*/React.createElement(ProgressiveHydration, null, /*#__PURE__*/React.createElement(LoadmoreButton, {
|
|
83
|
+
config: config,
|
|
84
|
+
collection: collection,
|
|
85
|
+
template: footerButton,
|
|
86
|
+
onClick: function onClick() {
|
|
87
|
+
return loadMore(opts);
|
|
88
|
+
},
|
|
89
|
+
navigate: function navigate() {
|
|
90
|
+
return navigateTo(dispatch, url);
|
|
91
|
+
},
|
|
92
|
+
qtConfig: qtConfig
|
|
93
|
+
}));
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
var storyCard = function storyCard(story) {
|
|
97
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
98
|
+
className: "three-col-m_cards__2HyyK"
|
|
99
|
+
}, /*#__PURE__*/React.createElement(StoryCard, {
|
|
100
|
+
story: story,
|
|
101
|
+
border: border,
|
|
102
|
+
theme: theme,
|
|
103
|
+
isHorizontalMobile: true,
|
|
104
|
+
config: config
|
|
105
|
+
}, /*#__PURE__*/React.createElement(HeroImage, {
|
|
106
|
+
aspectRatio: [[16, 9]],
|
|
107
|
+
story: story,
|
|
108
|
+
isHorizontalMobile: true
|
|
109
|
+
}), /*#__PURE__*/React.createElement(StorycardContent, {
|
|
110
|
+
theme: theme,
|
|
111
|
+
border: border,
|
|
112
|
+
story: story,
|
|
113
|
+
isHorizontalMobile: true,
|
|
114
|
+
borderColor: borderColor,
|
|
115
|
+
config: config
|
|
116
|
+
})));
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
120
|
+
className: "full-width-with-padding arrow-component",
|
|
121
|
+
"data-test-id": "three-col-grid",
|
|
122
|
+
style: {
|
|
123
|
+
backgroundColor: theme,
|
|
124
|
+
color: textColor
|
|
125
|
+
}
|
|
126
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
127
|
+
className: "three-col-m_three-col-grid__y7rZK"
|
|
128
|
+
}, /*#__PURE__*/React.createElement(CollectionName, {
|
|
129
|
+
collection: collection,
|
|
130
|
+
collectionNameTemplate: collectionNameTemplate,
|
|
131
|
+
collectionNameBorderColor: collectionNameBorderColor
|
|
132
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
133
|
+
className: "three-col-m_wrapper__20m5m"
|
|
134
|
+
}, storyItems.slice(0, 2).map(function (story, index) {
|
|
135
|
+
return /*#__PURE__*/React.createElement(Fragment, {
|
|
136
|
+
key: "story-3col1-".concat(index, "-").concat(get_1(story, ["id"], "0"))
|
|
137
|
+
}, storyCard(story));
|
|
138
|
+
}), storyItems.length < 2 && /*#__PURE__*/React.createElement("div", null), adWidgetSlot, storyItems.slice(2).map(function (story, index) {
|
|
139
|
+
return /*#__PURE__*/React.createElement(Fragment, {
|
|
140
|
+
key: "story-3col1-".concat(index, "-").concat(get_1(story, ["id"], "0"))
|
|
141
|
+
}, storyCard(story));
|
|
142
|
+
})), getLoadMore({
|
|
143
|
+
isLoading: isLoading,
|
|
144
|
+
storyItems: storyItems,
|
|
145
|
+
getMoreStories: getMoreStories,
|
|
146
|
+
subsequentLoadCount: subsequentLoadCount
|
|
147
|
+
}), footerSlotComp));
|
|
148
|
+
};
|
|
149
|
+
ThreeColGridBase.propTypes = {
|
|
150
|
+
/** collection is the array of objects which is returning by API */
|
|
151
|
+
collection: PropTypes.object.isRequired,
|
|
152
|
+
|
|
153
|
+
/** The config for the Row */
|
|
154
|
+
config: PropTypes.shape({
|
|
155
|
+
theme: PropTypes.string,
|
|
156
|
+
border: PropTypes.bool,
|
|
157
|
+
slotConfig: PropTypes.array,
|
|
158
|
+
footerButton: PropTypes.string,
|
|
159
|
+
collectionNameTemplate: PropTypes.string,
|
|
160
|
+
collectionNameBorderColor: PropTypes.string,
|
|
161
|
+
subsequentLoadCount: PropTypes.number
|
|
162
|
+
}),
|
|
163
|
+
getMoreStories: PropTypes.func,
|
|
164
|
+
isLoadMoreVisible: PropTypes.bool,
|
|
165
|
+
isLoading: PropTypes.bool,
|
|
166
|
+
isolatedLoadMore: PropTypes.bool
|
|
167
|
+
};
|
|
168
|
+
ThreeColGridBase.defaultProps = {
|
|
169
|
+
getMoreStories: function getMoreStories() {},
|
|
170
|
+
isLoadMoreVisible: true,
|
|
171
|
+
isLoading: false
|
|
172
|
+
};
|
|
173
|
+
var ThreeColGrid = StateProvider(ThreeColGridBase);
|
|
174
|
+
|
|
175
|
+
export { ThreeColGrid, ThreeColGridBase };
|