@quintype/arrow 3.15.1-perf.2 → 3.15.1-perf.3
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 +38 -29
- package/atoms/AuthorWithTime/index.js +83 -73
- package/atoms/CollectionName/index.js +40 -30
- package/atoms/ExtendedLoadMore/{index-d0f6c865.js → index-3976fac4.js} +59 -51
- package/atoms/ExtendedLoadMore/{index-1e444d20.js → index-3c4ac692.js} +243 -208
- package/atoms/ExtendedLoadMore/index-4ddfe28d.js +93 -0
- package/atoms/ExtendedLoadMore/{index-c61a16dc.js → index-5c8eda4a.js} +88 -80
- package/atoms/ExtendedLoadMore/{index-1256e453.js → index-6e083738.js} +60 -52
- package/atoms/ExtendedLoadMore/{index-fd651f70.js → index-6ecceae4.js} +58 -50
- package/atoms/ExtendedLoadMore/{index-4356ce04.js → index-9e0d32b7.js} +76 -68
- package/atoms/ExtendedLoadMore/{index-beed3a68.js → index-a5c95f84.js} +70 -62
- package/atoms/ExtendedLoadMore/{index-0519e570.js → index-b22f1843.js} +70 -62
- package/atoms/ExtendedLoadMore/{index-e4cf9cb7.js → index-b5936059.js} +72 -64
- package/atoms/ExtendedLoadMore/{index-aba6b278.js → index-bc129cb8.js} +57 -49
- package/atoms/ExtendedLoadMore/{index-ad3c83c3.js → index-e7cde739.js} +74 -46
- package/atoms/ExtendedLoadMore/{index-c2f73d18.js → index-fee73a14.js} +62 -54
- package/atoms/ExtendedLoadMore/index.js +13 -5
- package/atoms/ExtendedLoadMore/styles.arrow.css +1 -1
- package/atoms/Headline/index.js +85 -76
- package/atoms/HeroImage/index.js +69 -60
- package/atoms/LoadmoreButton/index.js +32 -23
- package/atoms/ScrollSnap/index.js +72 -63
- package/atoms/SectionTag/index.js +34 -25
- package/atoms/Subheadline/index.js +31 -22
- package/atoms/TimeStamp/index.js +34 -24
- package/molecules/KeyEvents/index.js +72 -61
- package/molecules/PageIntroductionCard/index.js +43 -34
- package/molecules/SocialShareTemplate/index.js +97 -88
- package/molecules/StoryCard/index.js +242 -232
- package/molecules/StoryElementCard/index.js +512 -483
- package/molecules/StorycardContent/index.js +172 -162
- package/package.json +1 -1
- package/rows/AlternateCollectionFilter/index.js +345 -333
- package/rows/AsideCollection/index.js +340 -328
- package/rows/AstrologyCollection/index.js +321 -309
- package/rows/AuthorIntroductionCard/index.js +157 -148
- package/rows/AuthorsList/index.js +184 -174
- package/rows/CollectionFilter/index.js +361 -349
- package/rows/ElevenStories/index.js +357 -346
- package/rows/FourColFiveStories/index.js +304 -274
- package/rows/FourColGrid/index.js +351 -321
- package/rows/FourColPortraitStories/index.js +357 -327
- package/rows/FourColSixteenStories/index.js +288 -277
- package/rows/FourColTwelveStories/index.js +315 -304
- package/rows/FourStorySlider/index.js +358 -347
- package/rows/FourStorySliderPortrait/index.js +359 -348
- package/rows/FourTabbedBigStorySlider/index.js +322 -311
- package/rows/FullScreenSlider/index.js +336 -325
- package/rows/HalfScreenSlider/index.js +308 -297
- package/rows/ListComponent/index.js +322 -311
- package/rows/Listicles/index.js +150 -139
- package/rows/MagazineEditions/index.js +104 -93
- package/rows/MagazineHeaderCard/index.js +104 -93
- package/rows/MagazineWidget/index.js +326 -315
- package/rows/OneColStoryList/index.js +365 -335
- package/rows/OpinionCollection/index.js +250 -220
- package/rows/SixColSixStories/index.js +333 -303
- package/rows/StoryCollection/index.js +340 -328
- package/rows/TagIntroductionCard/index.js +30 -21
- package/rows/ThreeColFlexStories/index.js +348 -318
- package/rows/ThreeColFourteenStories/index.js +285 -274
- package/rows/ThreeColGrid/index.js +352 -322
- package/rows/ThreeColSevenStory/index.js +322 -311
- package/rows/ThreeColSixStories/index.js +323 -312
- package/rows/ThreeColTwelveStories/index.js +302 -291
- package/rows/TwoColFourStories/index.js +316 -305
- package/rows/TwoColFourStoryHighlight/index.js +317 -306
- package/rows/TwoColSevenStories/index.js +322 -311
- package/rows/TwoColSixStories/index.js +316 -305
- package/rows/TwoColTenStoriesSidebar/index.js +338 -327
- package/rows/TwoColThreeStories/index.js +316 -305
- package/story-elements/AlsoRead/index.js +70 -61
- package/story-elements/Attachment/index.js +40 -31
- package/story-elements/BigFact/index.js +35 -26
- package/story-elements/BlockQuote/index.js +61 -51
- package/story-elements/Blurb/index.js +36 -27
- package/story-elements/Image/index.js +113 -86
- package/story-elements/ImageGallery/index.js +98 -71
- package/story-elements/ImageSlideshow/index.js +147 -120
- package/story-elements/QuestionAnswer/index.js +55 -46
- package/story-elements/Quote/index.js +37 -28
- package/story-elements/Reference/index.js +40 -31
- package/story-elements/StoryElement/index.js +28 -19
- package/story-elements/Summary/index.js +40 -31
- package/story-elements/Text/index.js +34 -25
- package/story-elements/Video/index.js +29 -20
- package/story-templates/ListicleStoryTemplate/index.js +937 -908
- package/story-templates/LiveBlogStoryTemplate/index.js +942 -913
- package/story-templates/PhotoStoryTemplate/index.js +912 -883
- package/story-templates/TextStoryTemplate/index.js +931 -902
- package/story-templates/VideoStoryTemplate/index.js +897 -868
- package/atoms/ExtendedLoadMore/index-81eb3978.js +0 -86
|
@@ -1,8 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index$1 = require('./index-e7cde739.js');
|
|
4
|
+
var React = require('react');
|
|
5
|
+
var index = require('./index-3c4ac692.js');
|
|
6
|
+
var PropTypes = require('prop-types');
|
|
7
|
+
var index$2 = require('./index-5c8eda4a.js');
|
|
8
|
+
|
|
9
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
10
|
+
|
|
11
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
12
|
+
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
6
13
|
|
|
7
14
|
var _styleModuleImportMap$1 = {
|
|
8
15
|
"./subheadline.m.css": {
|
|
@@ -20,29 +27,29 @@ var Subheadline = function Subheadline(_ref) {
|
|
|
20
27
|
clazzName = _ref$clazzName === void 0 ? "" : _ref$clazzName,
|
|
21
28
|
forceShowAtom = _ref.forceShowAtom,
|
|
22
29
|
showFullContent = _ref.showFullContent;
|
|
23
|
-
var config = useStateValue() || {};
|
|
24
|
-
var subheadline = forceShowAtom || get_1(config, ["showSubheadline"], true);
|
|
30
|
+
var config = index.useStateValue() || {};
|
|
31
|
+
var subheadline = forceShowAtom || index$1.get_1(config, ["showSubheadline"], true);
|
|
25
32
|
if (!subheadline) return null;
|
|
26
|
-
var textColor = getTextColor(config.theme);
|
|
27
|
-
return /*#__PURE__*/
|
|
33
|
+
var textColor = index$1.getTextColor(config.theme);
|
|
34
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
28
35
|
style: {
|
|
29
36
|
WebkitLineClamp: lineClamp
|
|
30
37
|
},
|
|
31
38
|
"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));
|
|
39
|
+
className: ("p-alt arr--sub-headline arrow-component ".concat(clazzName) ? "p-alt arr--sub-headline arrow-component ".concat(clazzName) + " " : "") + index$1._getClassName("subheadline ".concat(textColor), _styleModuleImportMap$1)
|
|
40
|
+
}, showFullContent || typeof lineClamp === "number" ? story.subheadline : index$1.truncate(story.subheadline, truncateChars, true));
|
|
34
41
|
};
|
|
35
42
|
Subheadline.propTypes = {
|
|
36
43
|
/** The Story Object from the API response */
|
|
37
|
-
story:
|
|
44
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
38
45
|
// Restricts the number of lines for subheadline.
|
|
39
|
-
lineClamp:
|
|
46
|
+
lineClamp: PropTypes__default["default"].number,
|
|
40
47
|
|
|
41
48
|
/** Number of characters to truncate the subheadline */
|
|
42
|
-
truncateChars:
|
|
43
|
-
clazzName:
|
|
44
|
-
forceShowAtom:
|
|
45
|
-
showFullContent:
|
|
49
|
+
truncateChars: PropTypes__default["default"].number,
|
|
50
|
+
clazzName: PropTypes__default["default"].string,
|
|
51
|
+
forceShowAtom: PropTypes__default["default"].bool,
|
|
52
|
+
showFullContent: PropTypes__default["default"].bool
|
|
46
53
|
};
|
|
47
54
|
Subheadline.defaultProps = {
|
|
48
55
|
forceShowAtom: false,
|
|
@@ -91,7 +98,7 @@ var StoryCard = function StoryCard(_ref) {
|
|
|
91
98
|
prefix = _ref.prefix,
|
|
92
99
|
config = _ref.config,
|
|
93
100
|
isHorizontalWithImageLast = _ref.isHorizontalWithImageLast;
|
|
94
|
-
if (!story || isEmpty(story)) return /*#__PURE__*/
|
|
101
|
+
if (!story || index$1.isEmpty(story)) return /*#__PURE__*/React__default["default"].createElement("div", null);
|
|
95
102
|
var borderOptions = ["default", "full", "bottom", "boxShadow"];
|
|
96
103
|
var borderTemplate = borderOptions.includes(border) ? "border-".concat(border) : ""; // TODO optimize conditions
|
|
97
104
|
|
|
@@ -99,9 +106,9 @@ var StoryCard = function StoryCard(_ref) {
|
|
|
99
106
|
if (isHorizontal) horizontalCardStyle = "horizontal-card";else if (isHorizontalWithImageLast) horizontalCardStyle = "horizontal-image-last";
|
|
100
107
|
var bgImageClasses = useImageAsBackground ? "backgroung-img" : "";
|
|
101
108
|
var bgImgContentOverlapClass = bgImgContentOverlap ? "content-overlap" : "";
|
|
102
|
-
var textColor = getTextColor(theme);
|
|
109
|
+
var textColor = index$1.getTextColor(theme);
|
|
103
110
|
var horizontalMobileClasses = isHorizontalMobile ? "horizontal-mob" : "";
|
|
104
|
-
var defaultStorycard = /*#__PURE__*/
|
|
111
|
+
var defaultStorycard = /*#__PURE__*/React__default["default"].createElement(DefaultStoryCard, {
|
|
105
112
|
story: story,
|
|
106
113
|
aspectRatio: aspectRatio,
|
|
107
114
|
border: border,
|
|
@@ -115,13 +122,13 @@ var StoryCard = function StoryCard(_ref) {
|
|
|
115
122
|
config: config,
|
|
116
123
|
isHorizontalWithImageLast: isHorizontalWithImageLast
|
|
117
124
|
});
|
|
118
|
-
return /*#__PURE__*/
|
|
125
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
119
126
|
"data-test-id": "story-card",
|
|
120
127
|
style: {
|
|
121
128
|
backgroundColor: theme,
|
|
122
129
|
color: textColor
|
|
123
130
|
},
|
|
124
|
-
className: "arr--story-card " + _getClassName("card ".concat(horizontalCardStyle, " ").concat(borderTemplate, " ").concat(textColor, " ").concat(bgImageClasses, " ").concat(bgImgContentOverlapClass, " ").concat(horizontalMobileClasses), _styleModuleImportMap)
|
|
131
|
+
className: "arr--story-card " + index$1._getClassName("card ".concat(horizontalCardStyle, " ").concat(borderTemplate, " ").concat(textColor, " ").concat(bgImageClasses, " ").concat(bgImgContentOverlapClass, " ").concat(horizontalMobileClasses), _styleModuleImportMap)
|
|
125
132
|
}, children || defaultStorycard);
|
|
126
133
|
};
|
|
127
134
|
|
|
@@ -141,94 +148,94 @@ var DefaultStoryCard = function DefaultStoryCard(_ref2) {
|
|
|
141
148
|
isHorizontalWithImageLast = _ref2.isHorizontalWithImageLast,
|
|
142
149
|
config = _ref2.config;
|
|
143
150
|
var alignment = centerAlign ? "center-align" : "";
|
|
144
|
-
var SectionTagborderColor = rgbToHex(borderColor);
|
|
151
|
+
var SectionTagborderColor = index$1.rgbToHex(borderColor);
|
|
145
152
|
var _config$localizationC = config.localizationConfig,
|
|
146
153
|
localizationConfig = _config$localizationC === void 0 ? {} : _config$localizationC;
|
|
147
|
-
return /*#__PURE__*/
|
|
154
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isHorizontal ? /*#__PURE__*/React__default["default"].createElement(index$2.HeroImage, {
|
|
148
155
|
config: config,
|
|
149
156
|
story: story,
|
|
150
157
|
isHorizontal: true,
|
|
151
158
|
isHorizontalMobile: isHorizontalMobile,
|
|
152
159
|
aspectRatio: aspectRatio
|
|
153
|
-
}) : isHorizontalWithImageLast ? /*#__PURE__*/
|
|
160
|
+
}) : isHorizontalWithImageLast ? /*#__PURE__*/React__default["default"].createElement(index$2.HeroImage, {
|
|
154
161
|
config: config,
|
|
155
162
|
story: story,
|
|
156
163
|
isHorizontalWithImageLast: true,
|
|
157
164
|
isHorizontalMobile: isHorizontalMobile,
|
|
158
165
|
aspectRatio: aspectRatio
|
|
159
|
-
}) : /*#__PURE__*/
|
|
166
|
+
}) : /*#__PURE__*/React__default["default"].createElement(index$2.HeroImage, {
|
|
160
167
|
story: story,
|
|
161
168
|
config: config,
|
|
162
169
|
isHorizontalMobile: isHorizontalMobile,
|
|
163
170
|
aspectRatio: aspectRatio
|
|
164
|
-
}), /*#__PURE__*/
|
|
165
|
-
className: "arr--story-content " + _getClassName("content ".concat(alignment), _styleModuleImportMap)
|
|
166
|
-
}, /*#__PURE__*/
|
|
171
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
172
|
+
className: "arr--story-content " + index$1._getClassName("content ".concat(alignment), _styleModuleImportMap)
|
|
173
|
+
}, /*#__PURE__*/React__default["default"].createElement(index$2.SectionTag, {
|
|
167
174
|
story: story,
|
|
168
175
|
borderColor: SectionTagborderColor
|
|
169
|
-
}), /*#__PURE__*/
|
|
176
|
+
}), /*#__PURE__*/React__default["default"].createElement(index.Headline, {
|
|
170
177
|
story: story,
|
|
171
178
|
headerLevel: headerLevel,
|
|
172
179
|
premiumStoryIconConfig: config
|
|
173
|
-
}), /*#__PURE__*/
|
|
180
|
+
}), /*#__PURE__*/React__default["default"].createElement(index.AuthorWithTime, {
|
|
174
181
|
config: localizationConfig,
|
|
175
182
|
story: story,
|
|
176
183
|
isBottom: true,
|
|
177
184
|
prefix: prefix,
|
|
178
185
|
hideAuthorImage: hideAuthorImage
|
|
179
|
-
}), /*#__PURE__*/
|
|
186
|
+
}), /*#__PURE__*/React__default["default"].createElement(Subheadline, {
|
|
180
187
|
story: story
|
|
181
188
|
})));
|
|
182
189
|
};
|
|
183
190
|
|
|
184
191
|
DefaultStoryCard.propTypes = {
|
|
185
|
-
story:
|
|
186
|
-
border:
|
|
187
|
-
isBottom:
|
|
188
|
-
isHorizontal:
|
|
189
|
-
aspectRatio:
|
|
190
|
-
isHorizontalMobile:
|
|
191
|
-
centerAlign:
|
|
192
|
-
headerLevel:
|
|
193
|
-
borderColor:
|
|
194
|
-
hideAuthorImage:
|
|
195
|
-
prefix:
|
|
196
|
-
config:
|
|
197
|
-
isHorizontalWithImageLast:
|
|
192
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
193
|
+
border: PropTypes__default["default"].oneOfType([PropTypes__default["default"].string]),
|
|
194
|
+
isBottom: PropTypes__default["default"].bool,
|
|
195
|
+
isHorizontal: PropTypes__default["default"].bool,
|
|
196
|
+
aspectRatio: PropTypes__default["default"].oneOfType([PropTypes__default["default"].array]),
|
|
197
|
+
isHorizontalMobile: PropTypes__default["default"].bool,
|
|
198
|
+
centerAlign: PropTypes__default["default"].bool,
|
|
199
|
+
headerLevel: PropTypes__default["default"].string,
|
|
200
|
+
borderColor: PropTypes__default["default"].string,
|
|
201
|
+
hideAuthorImage: PropTypes__default["default"].bool,
|
|
202
|
+
prefix: PropTypes__default["default"].string,
|
|
203
|
+
config: PropTypes__default["default"].object,
|
|
204
|
+
isHorizontalWithImageLast: PropTypes__default["default"].bool
|
|
198
205
|
};
|
|
199
206
|
StoryCard.propTypes = {
|
|
200
207
|
/** The Story Object from the API response */
|
|
201
|
-
story:
|
|
202
|
-
children:
|
|
208
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
209
|
+
children: PropTypes__default["default"].node,
|
|
203
210
|
|
|
204
211
|
/** Flip the Story Card to Horizonal mode */
|
|
205
|
-
isHorizontal:
|
|
212
|
+
isHorizontal: PropTypes__default["default"].bool,
|
|
206
213
|
|
|
207
214
|
/** Add border to the Story Card */
|
|
208
|
-
border:
|
|
215
|
+
border: PropTypes__default["default"].oneOfType([PropTypes__default["default"].string]),
|
|
209
216
|
// story card with background image
|
|
210
|
-
useImageAsBackground:
|
|
217
|
+
useImageAsBackground: PropTypes__default["default"].bool,
|
|
211
218
|
// story card content overlap with image
|
|
212
|
-
bgImgContentOverlap:
|
|
219
|
+
bgImgContentOverlap: PropTypes__default["default"].bool,
|
|
213
220
|
|
|
214
221
|
/** add aspect ratio for hero image */
|
|
215
|
-
aspectRatio:
|
|
222
|
+
aspectRatio: PropTypes__default["default"].oneOfType([PropTypes__default["default"].array]),
|
|
216
223
|
|
|
217
224
|
/** add theme(dark /light/custom color) for storycard */
|
|
218
|
-
theme:
|
|
225
|
+
theme: PropTypes__default["default"].string,
|
|
219
226
|
|
|
220
227
|
/** flip the story card mobile design horizontal */
|
|
221
|
-
isHorizontalMobile:
|
|
228
|
+
isHorizontalMobile: PropTypes__default["default"].bool,
|
|
222
229
|
// make content center align in desktop and left align in mobile
|
|
223
|
-
centerAlign:
|
|
224
|
-
headerLevel:
|
|
225
|
-
borderColor:
|
|
230
|
+
centerAlign: PropTypes__default["default"].bool,
|
|
231
|
+
headerLevel: PropTypes__default["default"].string,
|
|
232
|
+
borderColor: PropTypes__default["default"].string,
|
|
226
233
|
// handle author image through storycard
|
|
227
|
-
hideAuthorImage:
|
|
234
|
+
hideAuthorImage: PropTypes__default["default"].bool,
|
|
228
235
|
// handle author prefix through storycard
|
|
229
|
-
prefix:
|
|
230
|
-
config:
|
|
231
|
-
isHorizontalWithImageLast:
|
|
236
|
+
prefix: PropTypes__default["default"].string,
|
|
237
|
+
config: PropTypes__default["default"].object,
|
|
238
|
+
isHorizontalWithImageLast: PropTypes__default["default"].bool
|
|
232
239
|
};
|
|
233
240
|
StoryCard.defaultProps = {
|
|
234
241
|
isHorizontal: false,
|
|
@@ -240,4 +247,5 @@ StoryCard.defaultProps = {
|
|
|
240
247
|
isHorizontalWithImageLast: false
|
|
241
248
|
};
|
|
242
249
|
|
|
243
|
-
|
|
250
|
+
exports.StoryCard = StoryCard;
|
|
251
|
+
exports.Subheadline = Subheadline;
|
|
@@ -1,14 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var components = require('@quintype/components');
|
|
4
|
+
var index = require('./index-e7cde739.js');
|
|
5
|
+
var PropTypes = require('prop-types');
|
|
6
|
+
var React = require('react');
|
|
7
|
+
var reactRedux = require('react-redux');
|
|
8
|
+
var index$1 = require('./index-3c4ac692.js');
|
|
9
|
+
var index$3 = require('./index-5c8eda4a.js');
|
|
10
|
+
var index$2 = require('./index-b22f1843.js');
|
|
11
|
+
require('react-timeago');
|
|
12
|
+
require('date-fns-tz');
|
|
13
|
+
require('react-dom');
|
|
14
|
+
|
|
15
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
16
|
+
|
|
17
|
+
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
18
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
12
19
|
|
|
13
20
|
var FlexCard = function FlexCard(_ref) {
|
|
14
21
|
var _ref$story = _ref.story,
|
|
@@ -23,28 +30,28 @@ var FlexCard = function FlexCard(_ref) {
|
|
|
23
30
|
theme = _config$theme === void 0 ? "" : _config$theme,
|
|
24
31
|
_config$localizationC = config.localizationConfig,
|
|
25
32
|
localizationConfig = _config$localizationC === void 0 ? {} : _config$localizationC;
|
|
26
|
-
return /*#__PURE__*/
|
|
33
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
27
34
|
className: "three-col-flex-stories-m_card__2uZ3Q"
|
|
28
|
-
}, /*#__PURE__*/
|
|
35
|
+
}, /*#__PURE__*/React__default["default"].createElement(index$2.StoryCard, {
|
|
29
36
|
story: story,
|
|
30
37
|
isHorizontal: true,
|
|
31
38
|
theme: theme,
|
|
32
39
|
border: border,
|
|
33
40
|
borderColor: borderColor,
|
|
34
41
|
config: config
|
|
35
|
-
}, /*#__PURE__*/
|
|
42
|
+
}, /*#__PURE__*/React__default["default"].createElement(index$3.HeroImage, {
|
|
36
43
|
story: story,
|
|
37
44
|
aspectRatio: [[9, 5], [9, 5]]
|
|
38
|
-
}), /*#__PURE__*/
|
|
45
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
39
46
|
className: "small-card-container three-col-flex-stories-m_card-content__1z9nt"
|
|
40
|
-
}, /*#__PURE__*/
|
|
47
|
+
}, /*#__PURE__*/React__default["default"].createElement(index$3.SectionTag, {
|
|
41
48
|
story: story,
|
|
42
49
|
borderColor: borderColor
|
|
43
|
-
}), /*#__PURE__*/
|
|
50
|
+
}), /*#__PURE__*/React__default["default"].createElement(index$1.Headline, {
|
|
44
51
|
story: story,
|
|
45
52
|
headerLevel: "6",
|
|
46
53
|
premiumStoryIconConfig: config
|
|
47
|
-
}), /*#__PURE__*/
|
|
54
|
+
}), /*#__PURE__*/React__default["default"].createElement(index$1.AuthorWithTime, {
|
|
48
55
|
config: localizationConfig,
|
|
49
56
|
story: story,
|
|
50
57
|
prefix: "By"
|
|
@@ -73,7 +80,7 @@ var ThreeColFlexStoriesBase = function ThreeColFlexStoriesBase(_ref3) {
|
|
|
73
80
|
isLoading = _ref3.isLoading,
|
|
74
81
|
isolatedLoadMore = _ref3.isolatedLoadMore,
|
|
75
82
|
hideFirstCard = _ref3.hideFirstCard;
|
|
76
|
-
var collectionItems = collectionToStories(collection);
|
|
83
|
+
var collectionItems = components.collectionToStories(collection);
|
|
77
84
|
|
|
78
85
|
if (collectionItems.length < 1) {
|
|
79
86
|
return null;
|
|
@@ -92,25 +99,25 @@ var ThreeColFlexStoriesBase = function ThreeColFlexStoriesBase(_ref3) {
|
|
|
92
99
|
_config$subsequentLoa = config.subsequentLoadCount,
|
|
93
100
|
subsequentLoadCount = _config$subsequentLoa === void 0 ? 3 : _config$subsequentLoa;
|
|
94
101
|
|
|
95
|
-
var _get = get_1(slotConfig, [0], {}),
|
|
102
|
+
var _get = index.get_1(slotConfig, [0], {}),
|
|
96
103
|
_get$type = _get.type,
|
|
97
104
|
type = _get$type === void 0 ? "story" : _get$type,
|
|
98
105
|
component = _get.component;
|
|
99
106
|
|
|
100
107
|
var isAdWidgetEnabled = type === "ad" || type === "widget";
|
|
101
|
-
var adWidgetSlot = isAdWidgetEnabled ? getSlot(type, component) : null;
|
|
102
|
-
var textColor = getTextColor(theme);
|
|
103
|
-
var stories = type !== "story" ? collectionItems : collectionToStories(collection);
|
|
104
|
-
var dispatch = useDispatch();
|
|
105
|
-
var qtConfig = useSelector(function (state) {
|
|
106
|
-
return get_1(state, ["qt", "config"], {});
|
|
108
|
+
var adWidgetSlot = isAdWidgetEnabled ? index.getSlot(type, component) : null;
|
|
109
|
+
var textColor = index.getTextColor(theme);
|
|
110
|
+
var stories = type !== "story" ? collectionItems : components.collectionToStories(collection);
|
|
111
|
+
var dispatch = reactRedux.useDispatch();
|
|
112
|
+
var qtConfig = reactRedux.useSelector(function (state) {
|
|
113
|
+
return index.get_1(state, ["qt", "config"], {});
|
|
107
114
|
});
|
|
108
115
|
|
|
109
116
|
var getLoadMore = function getLoadMore(opts) {
|
|
110
117
|
if (!isLoadMoreVisible) return null;
|
|
111
118
|
|
|
112
119
|
if (isolatedLoadMore) {
|
|
113
|
-
return /*#__PURE__*/
|
|
120
|
+
return /*#__PURE__*/React__default["default"].createElement(index$1.LoadMoreTarget, {
|
|
114
121
|
collection: collection,
|
|
115
122
|
componentName: "ThreeColFlexStories",
|
|
116
123
|
offset: stories.length,
|
|
@@ -118,8 +125,8 @@ var ThreeColFlexStoriesBase = function ThreeColFlexStoriesBase(_ref3) {
|
|
|
118
125
|
});
|
|
119
126
|
}
|
|
120
127
|
|
|
121
|
-
var url = generateNavigateSlug(collection, qtConfig);
|
|
122
|
-
return /*#__PURE__*/
|
|
128
|
+
var url = index.generateNavigateSlug(collection, qtConfig);
|
|
129
|
+
return /*#__PURE__*/React__default["default"].createElement(index$1.ProgressiveHydration, null, /*#__PURE__*/React__default["default"].createElement(index$1.LoadmoreButton, {
|
|
123
130
|
config: config,
|
|
124
131
|
collection: collection,
|
|
125
132
|
template: footerButton,
|
|
@@ -127,50 +134,50 @@ var ThreeColFlexStoriesBase = function ThreeColFlexStoriesBase(_ref3) {
|
|
|
127
134
|
return loadMore(opts);
|
|
128
135
|
},
|
|
129
136
|
navigate: function navigate() {
|
|
130
|
-
return navigateTo(dispatch, url);
|
|
137
|
+
return index.navigateTo(dispatch, url);
|
|
131
138
|
},
|
|
132
139
|
qtConfig: qtConfig
|
|
133
140
|
}));
|
|
134
141
|
};
|
|
135
142
|
|
|
136
|
-
return /*#__PURE__*/
|
|
143
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
137
144
|
className: "full-width-with-padding arrow-component",
|
|
138
145
|
"data-test-id": "three-col-flex-stories",
|
|
139
146
|
style: {
|
|
140
147
|
backgroundColor: theme,
|
|
141
148
|
color: textColor
|
|
142
149
|
}
|
|
143
|
-
}, /*#__PURE__*/
|
|
150
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
144
151
|
className: "three-col-flex-stories-m_wrapper__3SQMq"
|
|
145
|
-
}, /*#__PURE__*/
|
|
152
|
+
}, /*#__PURE__*/React__default["default"].createElement(index$1.CollectionName, {
|
|
146
153
|
collection: collection,
|
|
147
154
|
collectionNameTemplate: collectionNameTemplate,
|
|
148
155
|
collectionNameBorderColor: collectionNameBorderColor,
|
|
149
156
|
headerLevel: "2"
|
|
150
|
-
}), isAdWidgetEnabled && !hideFirstCard ? /*#__PURE__*/
|
|
157
|
+
}), isAdWidgetEnabled && !hideFirstCard ? /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
151
158
|
className: "three-col-flex-stories-m_row-with-ad__1gPPN"
|
|
152
|
-
}, /*#__PURE__*/
|
|
159
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
153
160
|
className: "three-col-flex-stories-m_card-with-ad__32z5M"
|
|
154
161
|
}, stories.slice(0, 4).map(function (story) {
|
|
155
|
-
return /*#__PURE__*/
|
|
162
|
+
return /*#__PURE__*/React__default["default"].createElement(FlexCard, {
|
|
156
163
|
story: story,
|
|
157
164
|
config: config,
|
|
158
165
|
key: story.id
|
|
159
166
|
});
|
|
160
|
-
})), /*#__PURE__*/
|
|
167
|
+
})), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
161
168
|
className: "three-col-flex-stories-m_ad-wrapper__3dmfM"
|
|
162
|
-
}, adWidgetSlot)), /*#__PURE__*/
|
|
169
|
+
}, adWidgetSlot)), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
163
170
|
className: "three-col-flex-stories-m_card-row__3WMb3"
|
|
164
171
|
}, stories.slice(4).map(function (story) {
|
|
165
|
-
return /*#__PURE__*/
|
|
172
|
+
return /*#__PURE__*/React__default["default"].createElement(FlexCard, {
|
|
166
173
|
story: story,
|
|
167
174
|
config: config,
|
|
168
175
|
key: story.id
|
|
169
176
|
});
|
|
170
|
-
}))) : /*#__PURE__*/
|
|
177
|
+
}))) : /*#__PURE__*/React__default["default"].createElement("div", {
|
|
171
178
|
className: "three-col-flex-stories-m_card-row__3WMb3"
|
|
172
179
|
}, stories.map(function (story) {
|
|
173
|
-
return /*#__PURE__*/
|
|
180
|
+
return /*#__PURE__*/React__default["default"].createElement(FlexCard, {
|
|
174
181
|
story: story,
|
|
175
182
|
config: config,
|
|
176
183
|
key: story.id
|
|
@@ -184,32 +191,32 @@ var ThreeColFlexStoriesBase = function ThreeColFlexStoriesBase(_ref3) {
|
|
|
184
191
|
};
|
|
185
192
|
ThreeColFlexStoriesBase.propTypes = {
|
|
186
193
|
/** collection is the array of objects which is returning by API */
|
|
187
|
-
collection:
|
|
194
|
+
collection: PropTypes__default["default"].object.isRequired,
|
|
188
195
|
|
|
189
196
|
/** The config for the Row */
|
|
190
|
-
config:
|
|
191
|
-
borderColor:
|
|
192
|
-
theme:
|
|
193
|
-
border:
|
|
194
|
-
slotConfig:
|
|
195
|
-
footerButton:
|
|
196
|
-
collectionNameTemplate:
|
|
197
|
-
collectionNameBorderColor:
|
|
198
|
-
subsequentLoadCount:
|
|
197
|
+
config: PropTypes__default["default"].shape({
|
|
198
|
+
borderColor: PropTypes__default["default"].string,
|
|
199
|
+
theme: PropTypes__default["default"].string,
|
|
200
|
+
border: PropTypes__default["default"].string,
|
|
201
|
+
slotConfig: PropTypes__default["default"].array,
|
|
202
|
+
footerButton: PropTypes__default["default"].string,
|
|
203
|
+
collectionNameTemplate: PropTypes__default["default"].string,
|
|
204
|
+
collectionNameBorderColor: PropTypes__default["default"].string,
|
|
205
|
+
subsequentLoadCount: PropTypes__default["default"].number
|
|
199
206
|
}),
|
|
200
|
-
getMoreStories:
|
|
201
|
-
isLoadMoreVisible:
|
|
202
|
-
isLoading:
|
|
203
|
-
isolatedLoadMore:
|
|
204
|
-
hideFirstCard:
|
|
207
|
+
getMoreStories: PropTypes__default["default"].func,
|
|
208
|
+
isLoadMoreVisible: PropTypes__default["default"].bool,
|
|
209
|
+
isLoading: PropTypes__default["default"].bool,
|
|
210
|
+
isolatedLoadMore: PropTypes__default["default"].bool,
|
|
211
|
+
hideFirstCard: PropTypes__default["default"].bool
|
|
205
212
|
};
|
|
206
213
|
FlexCard.propTypes = {
|
|
207
|
-
story:
|
|
208
|
-
config:
|
|
209
|
-
borderColor:
|
|
210
|
-
theme:
|
|
211
|
-
border:
|
|
212
|
-
localizationConfig:
|
|
214
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
215
|
+
config: PropTypes__default["default"].shape({
|
|
216
|
+
borderColor: PropTypes__default["default"].string,
|
|
217
|
+
theme: PropTypes__default["default"].string,
|
|
218
|
+
border: PropTypes__default["default"].string,
|
|
219
|
+
localizationConfig: PropTypes__default["default"].object
|
|
213
220
|
})
|
|
214
221
|
};
|
|
215
222
|
ThreeColFlexStoriesBase.defaultProps = {
|
|
@@ -218,6 +225,7 @@ ThreeColFlexStoriesBase.defaultProps = {
|
|
|
218
225
|
isLoading: false,
|
|
219
226
|
hideFirstCard: false
|
|
220
227
|
};
|
|
221
|
-
var ThreeColFlexStories = StateProvider(ThreeColFlexStoriesBase);
|
|
228
|
+
var ThreeColFlexStories = index$1.StateProvider(ThreeColFlexStoriesBase);
|
|
222
229
|
|
|
223
|
-
|
|
230
|
+
exports.ThreeColFlexStories = ThreeColFlexStories;
|
|
231
|
+
exports.ThreeColFlexStoriesBase = ThreeColFlexStoriesBase;
|