@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,32 +1,39 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index$1 = require('./index-3c4ac692.js');
|
|
4
|
+
var index = require('./index-e7cde739.js');
|
|
5
|
+
var React = require('react');
|
|
6
|
+
var reactRedux = require('react-redux');
|
|
7
|
+
var PropTypes = require('prop-types');
|
|
8
|
+
var components = require('@quintype/components');
|
|
9
|
+
require('react-dom');
|
|
10
|
+
require('react-timeago');
|
|
11
|
+
require('date-fns-tz');
|
|
12
|
+
|
|
13
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
14
|
+
|
|
15
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
16
|
+
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
10
17
|
|
|
11
18
|
var UserFallbackIcon = function UserFallbackIcon(_ref) {
|
|
12
19
|
var _ref$width = _ref.width,
|
|
13
20
|
width = _ref$width === void 0 ? 120 : _ref$width,
|
|
14
21
|
_ref$height = _ref.height,
|
|
15
22
|
height = _ref$height === void 0 ? 120 : _ref$height;
|
|
16
|
-
return /*#__PURE__*/
|
|
23
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
17
24
|
width: width,
|
|
18
25
|
height: height,
|
|
19
26
|
viewBox: "0 0 120 120",
|
|
20
27
|
xmlns: "http://www.w3.org/2000/svg"
|
|
21
|
-
}, /*#__PURE__*/
|
|
28
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
22
29
|
d: "M93.28 108.98c-1.055-17.675-15.47-31.678-33.098-31.678-17.708 0-32.173 14.129-33.11 31.916 9.415 6.311 20.741 9.993 32.927 9.993 12.338 0 23.795-3.774 33.28-10.23l.001-.001zM58.584 73.283c9.928 0 17.977-8.275 17.977-18.483 0-10.209-8.049-18.484-17.977-18.484-9.929 0-17.977 8.275-17.977 18.484 0 10.208 8.048 18.483 17.977 18.483zM60 120C26.863 120 0 93.137 0 60S26.863 0 60 0s60 26.863 60 60-26.863 60-60 60z",
|
|
23
30
|
fill: "#DADADA",
|
|
24
31
|
fillRule: "nonzero"
|
|
25
32
|
}));
|
|
26
33
|
};
|
|
27
34
|
UserFallbackIcon.propTypes = {
|
|
28
|
-
width:
|
|
29
|
-
height:
|
|
35
|
+
width: PropTypes__default["default"].object,
|
|
36
|
+
height: PropTypes__default["default"].object
|
|
30
37
|
};
|
|
31
38
|
|
|
32
39
|
var _styleModuleImportMap$1 = {
|
|
@@ -46,12 +53,12 @@ var authorWithImage = function authorWithImage(author, templateStyle) {
|
|
|
46
53
|
var avatarUrl = author["avatar-url"],
|
|
47
54
|
avatarS3Key = author["avatar-s3-key"],
|
|
48
55
|
name = author.name;
|
|
49
|
-
return /*#__PURE__*/
|
|
56
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
50
57
|
"data-test-id": "author-image",
|
|
51
|
-
className: "arr--author-image " + _getClassName("author-image ".concat(templateStyle), _styleModuleImportMap$1)
|
|
52
|
-
}, /*#__PURE__*/
|
|
58
|
+
className: "arr--author-image " + index._getClassName("author-image ".concat(templateStyle), _styleModuleImportMap$1)
|
|
59
|
+
}, /*#__PURE__*/React__default["default"].createElement("figure", {
|
|
53
60
|
className: "author-image-m_image-container__19WNd"
|
|
54
|
-
}, avatarS3Key ? /*#__PURE__*/
|
|
61
|
+
}, avatarS3Key ? /*#__PURE__*/React__default["default"].createElement(components.ResponsiveImage, {
|
|
55
62
|
slug: avatarS3Key,
|
|
56
63
|
alt: name,
|
|
57
64
|
defaultWidth: 250,
|
|
@@ -61,9 +68,9 @@ var authorWithImage = function authorWithImage(author, templateStyle) {
|
|
|
61
68
|
imgParams: {
|
|
62
69
|
auto: ["format", "compress"]
|
|
63
70
|
}
|
|
64
|
-
}) : avatarUrl ? /*#__PURE__*/
|
|
71
|
+
}) : avatarUrl ? /*#__PURE__*/React__default["default"].createElement("img", {
|
|
65
72
|
src: avatarUrl
|
|
66
|
-
}) : /*#__PURE__*/
|
|
73
|
+
}) : /*#__PURE__*/React__default["default"].createElement(UserFallbackIcon, null)));
|
|
67
74
|
};
|
|
68
75
|
|
|
69
76
|
var AuthorImage = function AuthorImage(_ref) {
|
|
@@ -77,19 +84,19 @@ var AuthorImage = function AuthorImage(_ref) {
|
|
|
77
84
|
var mountAt = config.mountAt || "";
|
|
78
85
|
var templateStyle = "";
|
|
79
86
|
if (template === "smallerCircle") templateStyle = "smaller-circle";else if (template === "smallCircle") templateStyle = "small-circle";else if (template === "square") templateStyle = "square";
|
|
80
|
-
if (slug) return /*#__PURE__*/
|
|
87
|
+
if (slug) return /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
81
88
|
href: "".concat(mountAt, "/author/") + slug
|
|
82
89
|
}, authorWithImage(author, templateStyle));else return authorWithImage(author, templateStyle);
|
|
83
90
|
};
|
|
84
91
|
|
|
85
92
|
AuthorImage.propTypes = {
|
|
86
|
-
author:
|
|
87
|
-
"avatar-url":
|
|
88
|
-
"avatar-s3-key":
|
|
89
|
-
name:
|
|
90
|
-
slug:
|
|
93
|
+
author: PropTypes__default["default"].shape({
|
|
94
|
+
"avatar-url": PropTypes__default["default"].string,
|
|
95
|
+
"avatar-s3-key": PropTypes__default["default"].string,
|
|
96
|
+
name: PropTypes__default["default"].string,
|
|
97
|
+
slug: PropTypes__default["default"].string
|
|
91
98
|
}),
|
|
92
|
-
template:
|
|
99
|
+
template: PropTypes__default["default"].string
|
|
93
100
|
};
|
|
94
101
|
|
|
95
102
|
var _styleModuleImportMap = {
|
|
@@ -113,7 +120,7 @@ var _styleModuleImportMap = {
|
|
|
113
120
|
|
|
114
121
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
115
122
|
|
|
116
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
123
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { index$1._defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
117
124
|
|
|
118
125
|
var loadMore = function loadMore(_ref) {
|
|
119
126
|
var isLoading = _ref.isLoading,
|
|
@@ -134,7 +141,7 @@ var OpinionCollectionBase = function OpinionCollectionBase(_ref2) {
|
|
|
134
141
|
isLoadMoreVisible = _ref2.isLoadMoreVisible,
|
|
135
142
|
isLoading = _ref2.isLoading,
|
|
136
143
|
isolatedLoadMore = _ref2.isolatedLoadMore;
|
|
137
|
-
var stories = collectionToStories(collection);
|
|
144
|
+
var stories = components.collectionToStories(collection);
|
|
138
145
|
var _config$theme = config.theme,
|
|
139
146
|
theme = _config$theme === void 0 ? "" : _config$theme,
|
|
140
147
|
_config$footerButton = config.footerButton,
|
|
@@ -150,27 +157,27 @@ var OpinionCollectionBase = function OpinionCollectionBase(_ref2) {
|
|
|
150
157
|
_config$subsequentLoa = config.subsequentLoadCount,
|
|
151
158
|
subsequentLoadCount = _config$subsequentLoa === void 0 ? 3 : _config$subsequentLoa;
|
|
152
159
|
|
|
153
|
-
var _get = get_1(slotConfig, [0], {}),
|
|
160
|
+
var _get = index.get_1(slotConfig, [0], {}),
|
|
154
161
|
_get$type = _get.type,
|
|
155
162
|
type = _get$type === void 0 ? "story" : _get$type,
|
|
156
163
|
_get$component = _get.component,
|
|
157
164
|
component = _get$component === void 0 ? null : _get$component;
|
|
158
165
|
|
|
159
|
-
var dispatch = useDispatch();
|
|
160
|
-
var qtConfig = useSelector(function (state) {
|
|
161
|
-
return get_1(state, ["qt", "config"], {});
|
|
166
|
+
var dispatch = reactRedux.useDispatch();
|
|
167
|
+
var qtConfig = reactRedux.useSelector(function (state) {
|
|
168
|
+
return index.get_1(state, ["qt", "config"], {});
|
|
162
169
|
});
|
|
163
170
|
if (!stories.length) return null;
|
|
164
|
-
var textColor = getTextColor(theme);
|
|
171
|
+
var textColor = index.getTextColor(theme);
|
|
165
172
|
var borderStyle = border === "fullBorder" ? "border" : "";
|
|
166
|
-
var slot = type === "ad" ? getSlot(type, component) : null;
|
|
173
|
+
var slot = type === "ad" ? index.getSlot(type, component) : null;
|
|
167
174
|
var adStyle = slot ? "custom-grid" : "";
|
|
168
175
|
|
|
169
176
|
var getLoadMore = function getLoadMore(opts) {
|
|
170
177
|
if (!isLoadMoreVisible) return null;
|
|
171
178
|
|
|
172
179
|
if (isolatedLoadMore) {
|
|
173
|
-
return /*#__PURE__*/
|
|
180
|
+
return /*#__PURE__*/React__default["default"].createElement(index$1.LoadMoreTarget, {
|
|
174
181
|
collection: collection,
|
|
175
182
|
componentName: "OpinionCollection",
|
|
176
183
|
offset: stories.length,
|
|
@@ -178,8 +185,8 @@ var OpinionCollectionBase = function OpinionCollectionBase(_ref2) {
|
|
|
178
185
|
});
|
|
179
186
|
}
|
|
180
187
|
|
|
181
|
-
var url = generateNavigateSlug(collection, qtConfig);
|
|
182
|
-
return /*#__PURE__*/
|
|
188
|
+
var url = index.generateNavigateSlug(collection, qtConfig);
|
|
189
|
+
return /*#__PURE__*/React__default["default"].createElement(index$1.ProgressiveHydration, null, /*#__PURE__*/React__default["default"].createElement(index$1.LoadmoreButton, {
|
|
183
190
|
config: config,
|
|
184
191
|
collection: collection,
|
|
185
192
|
template: footerButton,
|
|
@@ -187,28 +194,28 @@ var OpinionCollectionBase = function OpinionCollectionBase(_ref2) {
|
|
|
187
194
|
return loadMore(opts);
|
|
188
195
|
},
|
|
189
196
|
navigate: function navigate() {
|
|
190
|
-
return navigateTo(dispatch, url);
|
|
197
|
+
return index.navigateTo(dispatch, url);
|
|
191
198
|
},
|
|
192
199
|
qtConfig: qtConfig
|
|
193
200
|
}));
|
|
194
201
|
};
|
|
195
202
|
|
|
196
203
|
var getAuthorCard = function getAuthorCard(story) {
|
|
197
|
-
var authorData = get_1(story, ["authors", "0"]);
|
|
198
|
-
return /*#__PURE__*/
|
|
204
|
+
var authorData = index.get_1(story, ["authors", "0"]);
|
|
205
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
199
206
|
"data-test-id": "story-card"
|
|
200
|
-
}, /*#__PURE__*/
|
|
207
|
+
}, /*#__PURE__*/React__default["default"].createElement(index$1.Author, {
|
|
201
208
|
story: story,
|
|
202
209
|
hideAuthorImage: true
|
|
203
|
-
}), /*#__PURE__*/
|
|
210
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
204
211
|
className: "opinion-collection-m_headline-author__2H6Tv"
|
|
205
|
-
}, /*#__PURE__*/
|
|
212
|
+
}, /*#__PURE__*/React__default["default"].createElement(index$1.Headline, {
|
|
206
213
|
story: story
|
|
207
|
-
}), /*#__PURE__*/
|
|
214
|
+
}), /*#__PURE__*/React__default["default"].createElement(AuthorImage, {
|
|
208
215
|
author: authorData,
|
|
209
216
|
template: "smallerCircle",
|
|
210
217
|
config: config
|
|
211
|
-
})), /*#__PURE__*/
|
|
218
|
+
})), /*#__PURE__*/React__default["default"].createElement(index$1.AuthorWithTime, {
|
|
212
219
|
story: story,
|
|
213
220
|
config: _objectSpread(_objectSpread({}, config), {}, {
|
|
214
221
|
disableMeridiem: true,
|
|
@@ -218,31 +225,31 @@ var OpinionCollectionBase = function OpinionCollectionBase(_ref2) {
|
|
|
218
225
|
};
|
|
219
226
|
|
|
220
227
|
var countStyleName = stories.length === 2 || stories.length === 3 ? "count-".concat(stories.length) : "";
|
|
221
|
-
return /*#__PURE__*/
|
|
228
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
222
229
|
className: "full-width-with-padding arrow-component",
|
|
223
230
|
"data-test-id": "opinion-collection",
|
|
224
231
|
style: {
|
|
225
232
|
backgroundColor: theme,
|
|
226
233
|
color: textColor
|
|
227
234
|
}
|
|
228
|
-
}, /*#__PURE__*/
|
|
235
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
229
236
|
className: "opinion-collection-m_opinion-collection__1Bc7h",
|
|
230
237
|
style: {
|
|
231
238
|
backgroundColor: theme,
|
|
232
239
|
color: textColor
|
|
233
240
|
}
|
|
234
|
-
}, /*#__PURE__*/
|
|
241
|
+
}, /*#__PURE__*/React__default["default"].createElement(index$1.CollectionName, {
|
|
235
242
|
collection: collection,
|
|
236
243
|
collectionNameTemplate: collectionNameTemplate,
|
|
237
244
|
collectionNameBorderColor: collectionNameBorderColor,
|
|
238
245
|
headerLevel: 2
|
|
239
|
-
}), /*#__PURE__*/
|
|
240
|
-
className: ("content-wrapper ".concat(borderStyle, " ").concat(textColor) ? "content-wrapper ".concat(borderStyle, " ").concat(textColor) + " " : "") + _getClassName("content-wrapper ".concat(borderStyle, " ").concat(textColor, " ").concat(adStyle), _styleModuleImportMap)
|
|
241
|
-
}, slot ? /*#__PURE__*/
|
|
242
|
-
className: "wrapper-with-ads " + _getClassName("wrapper-with-ads ".concat(countStyleName), _styleModuleImportMap)
|
|
246
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
247
|
+
className: ("content-wrapper ".concat(borderStyle, " ").concat(textColor) ? "content-wrapper ".concat(borderStyle, " ").concat(textColor) + " " : "") + index._getClassName("content-wrapper ".concat(borderStyle, " ").concat(textColor, " ").concat(adStyle), _styleModuleImportMap)
|
|
248
|
+
}, slot ? /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
249
|
+
className: "wrapper-with-ads " + index._getClassName("wrapper-with-ads ".concat(countStyleName), _styleModuleImportMap)
|
|
243
250
|
}, stories.slice(0, 4).map(function (story) {
|
|
244
251
|
return getAuthorCard(story);
|
|
245
|
-
})), /*#__PURE__*/
|
|
252
|
+
})), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
246
253
|
className: "opinion-collection-m_ad-slot__2ZpaC"
|
|
247
254
|
}, slot)) : stories.map(function (story) {
|
|
248
255
|
return getAuthorCard(story);
|
|
@@ -254,20 +261,20 @@ var OpinionCollectionBase = function OpinionCollectionBase(_ref2) {
|
|
|
254
261
|
})));
|
|
255
262
|
};
|
|
256
263
|
OpinionCollectionBase.propTypes = {
|
|
257
|
-
collection:
|
|
258
|
-
config:
|
|
259
|
-
collectionNameBorderColor:
|
|
260
|
-
theme:
|
|
261
|
-
collectionNameTemplate:
|
|
262
|
-
footerButton:
|
|
263
|
-
border:
|
|
264
|
-
slotConfig:
|
|
265
|
-
subsequentLoadCount:
|
|
264
|
+
collection: PropTypes__default["default"].object,
|
|
265
|
+
config: PropTypes__default["default"].shape({
|
|
266
|
+
collectionNameBorderColor: PropTypes__default["default"].string,
|
|
267
|
+
theme: PropTypes__default["default"].string,
|
|
268
|
+
collectionNameTemplate: PropTypes__default["default"].string,
|
|
269
|
+
footerButton: PropTypes__default["default"].string,
|
|
270
|
+
border: PropTypes__default["default"].string,
|
|
271
|
+
slotConfig: PropTypes__default["default"].array,
|
|
272
|
+
subsequentLoadCount: PropTypes__default["default"].number
|
|
266
273
|
}),
|
|
267
|
-
getMoreStories:
|
|
268
|
-
isLoading:
|
|
269
|
-
isLoadMoreVisible:
|
|
270
|
-
isolatedLoadMore:
|
|
274
|
+
getMoreStories: PropTypes__default["default"].func,
|
|
275
|
+
isLoading: PropTypes__default["default"].bool,
|
|
276
|
+
isLoadMoreVisible: PropTypes__default["default"].bool,
|
|
277
|
+
isolatedLoadMore: PropTypes__default["default"].bool
|
|
271
278
|
};
|
|
272
279
|
OpinionCollectionBase.defaultProps = {
|
|
273
280
|
getMoreStories: function getMoreStories() {},
|
|
@@ -277,6 +284,7 @@ OpinionCollectionBase.defaultProps = {
|
|
|
277
284
|
config: {},
|
|
278
285
|
hideFirstCard: false
|
|
279
286
|
};
|
|
280
|
-
var OpinionCollection = StateProvider(OpinionCollectionBase);
|
|
287
|
+
var OpinionCollection = index$1.StateProvider(OpinionCollectionBase);
|
|
281
288
|
|
|
282
|
-
|
|
289
|
+
exports.OpinionCollection = OpinionCollection;
|
|
290
|
+
exports.OpinionCollectionBase = OpinionCollectionBase;
|
|
@@ -1,15 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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
|
+
var index$4 = require('./index-4ddfe28d.js');
|
|
12
|
+
require('react-timeago');
|
|
13
|
+
require('date-fns-tz');
|
|
14
|
+
require('react-dom');
|
|
15
|
+
|
|
16
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
17
|
+
|
|
18
|
+
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
19
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
13
20
|
|
|
14
21
|
var loadMore = function loadMore(_ref) {
|
|
15
22
|
var isLoading = _ref.isLoading,
|
|
@@ -31,7 +38,7 @@ var OneColStoryListBase = function OneColStoryListBase(_ref2) {
|
|
|
31
38
|
isLoadMoreVisible = _ref2.isLoadMoreVisible,
|
|
32
39
|
isLoading = _ref2.isLoading,
|
|
33
40
|
isolatedLoadMore = _ref2.isolatedLoadMore;
|
|
34
|
-
var storyItems = collectionToStories(collection);
|
|
41
|
+
var storyItems = components.collectionToStories(collection);
|
|
35
42
|
if (!storyItems.length) return null;
|
|
36
43
|
var _config$collectionNam = config.collectionNameBorderColor,
|
|
37
44
|
collectionNameBorderColor = _config$collectionNam === void 0 ? "" : _config$collectionNam,
|
|
@@ -55,20 +62,20 @@ var OneColStoryListBase = function OneColStoryListBase(_ref2) {
|
|
|
55
62
|
subsequentLoadCount = _config$subsequentLoa === void 0 ? 8 : _config$subsequentLoa;
|
|
56
63
|
var footerSlot = footerSlotConfig.footerSlot;
|
|
57
64
|
|
|
58
|
-
var _get = get_1(slotConfig, [0], {}),
|
|
65
|
+
var _get = index.get_1(slotConfig, [0], {}),
|
|
59
66
|
type = _get.type,
|
|
60
67
|
component = _get.component;
|
|
61
68
|
|
|
62
|
-
var dispatch = useDispatch();
|
|
63
|
-
var qtConfig = useSelector(function (state) {
|
|
64
|
-
return get_1(state, ["qt", "config"], {});
|
|
69
|
+
var dispatch = reactRedux.useDispatch();
|
|
70
|
+
var qtConfig = reactRedux.useSelector(function (state) {
|
|
71
|
+
return index.get_1(state, ["qt", "config"], {});
|
|
65
72
|
});
|
|
66
73
|
|
|
67
74
|
var getLoadMore = function getLoadMore(opts) {
|
|
68
75
|
if (!isLoadMoreVisible) return null;
|
|
69
76
|
|
|
70
77
|
if (isolatedLoadMore) {
|
|
71
|
-
return /*#__PURE__*/
|
|
78
|
+
return /*#__PURE__*/React__default["default"].createElement(index$1.LoadMoreTarget, {
|
|
72
79
|
collection: collection,
|
|
73
80
|
componentName: "OneColStoryList",
|
|
74
81
|
offset: storyItems.length,
|
|
@@ -76,8 +83,8 @@ var OneColStoryListBase = function OneColStoryListBase(_ref2) {
|
|
|
76
83
|
});
|
|
77
84
|
}
|
|
78
85
|
|
|
79
|
-
var url = generateNavigateSlug(collection, qtConfig);
|
|
80
|
-
return /*#__PURE__*/
|
|
86
|
+
var url = index.generateNavigateSlug(collection, qtConfig);
|
|
87
|
+
return /*#__PURE__*/React__default["default"].createElement(index$1.ProgressiveHydration, null, /*#__PURE__*/React__default["default"].createElement(index$1.LoadmoreButton, {
|
|
81
88
|
config: config,
|
|
82
89
|
collection: collection,
|
|
83
90
|
template: footerButton,
|
|
@@ -85,7 +92,7 @@ var OneColStoryListBase = function OneColStoryListBase(_ref2) {
|
|
|
85
92
|
return loadMore(opts);
|
|
86
93
|
},
|
|
87
94
|
navigate: function navigate() {
|
|
88
|
-
return navigateTo(dispatch, url);
|
|
95
|
+
return index.navigateTo(dispatch, url);
|
|
89
96
|
},
|
|
90
97
|
qtConfig: qtConfig
|
|
91
98
|
}));
|
|
@@ -96,9 +103,9 @@ var OneColStoryListBase = function OneColStoryListBase(_ref2) {
|
|
|
96
103
|
var borderHandler = function borderHandler(story) {
|
|
97
104
|
switch (border) {
|
|
98
105
|
case "bottom":
|
|
99
|
-
return /*#__PURE__*/
|
|
106
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
100
107
|
className: "one-col-story-list-m_one-col-border-bottom__13nPb"
|
|
101
|
-
}, /*#__PURE__*/
|
|
108
|
+
}, /*#__PURE__*/React__default["default"].createElement(index$2.StoryCard, {
|
|
102
109
|
story: story,
|
|
103
110
|
theme: theme,
|
|
104
111
|
headerLevel: "4",
|
|
@@ -111,42 +118,42 @@ var OneColStoryListBase = function OneColStoryListBase(_ref2) {
|
|
|
111
118
|
}));
|
|
112
119
|
|
|
113
120
|
case "full":
|
|
114
|
-
return /*#__PURE__*/
|
|
121
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
115
122
|
className: "one-col-story-list-m_one-col-border-full__3PSl0"
|
|
116
|
-
}, /*#__PURE__*/
|
|
123
|
+
}, /*#__PURE__*/React__default["default"].createElement(index$2.StoryCard, {
|
|
117
124
|
story: story,
|
|
118
125
|
border: border,
|
|
119
126
|
theme: theme,
|
|
120
127
|
isHorizontal: true,
|
|
121
128
|
borderColor: borderColor
|
|
122
|
-
}, /*#__PURE__*/
|
|
129
|
+
}, /*#__PURE__*/React__default["default"].createElement(index$3.HeroImage, {
|
|
123
130
|
story: story,
|
|
124
131
|
isHorizontal: true,
|
|
125
132
|
aspectRatio: [[1, 1], [4, 3]]
|
|
126
|
-
}), /*#__PURE__*/
|
|
133
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
127
134
|
className: "one-col-story-list-m_story-card-content-wrapper__1baqS"
|
|
128
|
-
}, /*#__PURE__*/
|
|
135
|
+
}, /*#__PURE__*/React__default["default"].createElement(index$4.StorycardContent, {
|
|
129
136
|
story: story,
|
|
130
137
|
borderColor: borderColor,
|
|
131
138
|
config: config
|
|
132
|
-
}, /*#__PURE__*/
|
|
139
|
+
}, /*#__PURE__*/React__default["default"].createElement(index$3.SectionTag, {
|
|
133
140
|
story: story
|
|
134
|
-
}), /*#__PURE__*/
|
|
141
|
+
}), /*#__PURE__*/React__default["default"].createElement(index$1.Headline, {
|
|
135
142
|
story: story,
|
|
136
143
|
headerLevel: "4",
|
|
137
144
|
premiumStoryIconConfig: config
|
|
138
|
-
}), /*#__PURE__*/
|
|
145
|
+
}), /*#__PURE__*/React__default["default"].createElement(index$2.Subheadline, {
|
|
139
146
|
story: story
|
|
140
|
-
}), /*#__PURE__*/
|
|
147
|
+
}), /*#__PURE__*/React__default["default"].createElement(index$1.AuthorWithTime, {
|
|
141
148
|
config: localizationConfig,
|
|
142
149
|
story: story,
|
|
143
150
|
prefix: "By"
|
|
144
151
|
})))));
|
|
145
152
|
|
|
146
153
|
default:
|
|
147
|
-
return /*#__PURE__*/
|
|
154
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
148
155
|
className: "one-col-story-list-m_one-col-border-default__2BDg7"
|
|
149
|
-
}, /*#__PURE__*/
|
|
156
|
+
}, /*#__PURE__*/React__default["default"].createElement(index$2.StoryCard, {
|
|
150
157
|
story: story,
|
|
151
158
|
theme: theme,
|
|
152
159
|
headerLevel: "4",
|
|
@@ -160,81 +167,82 @@ var OneColStoryListBase = function OneColStoryListBase(_ref2) {
|
|
|
160
167
|
}
|
|
161
168
|
};
|
|
162
169
|
|
|
163
|
-
var textColor = getTextColor(theme);
|
|
164
|
-
return /*#__PURE__*/
|
|
170
|
+
var textColor = index.getTextColor(theme);
|
|
171
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
165
172
|
className: "full-width-with-padding arrow-component",
|
|
166
173
|
"data-test-id": "one-col-story-list",
|
|
167
174
|
style: {
|
|
168
175
|
backgroundColor: theme,
|
|
169
176
|
color: textColor
|
|
170
177
|
}
|
|
171
|
-
}, /*#__PURE__*/
|
|
178
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
172
179
|
className: "one-col-story-list-m_one-col-story-list-wrapper__ICvTq"
|
|
173
|
-
}, /*#__PURE__*/
|
|
180
|
+
}, /*#__PURE__*/React__default["default"].createElement(index$1.CollectionName, {
|
|
174
181
|
collection: collection,
|
|
175
182
|
collectionNameTemplate: collectionNameTemplate,
|
|
176
183
|
collectionNameBorderColor: collectionNameBorderColor
|
|
177
|
-
}), /*#__PURE__*/
|
|
184
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
178
185
|
className: "one-col-story-list-m_wrapper__38qTp",
|
|
179
186
|
style: {
|
|
180
187
|
backgroundColor: theme,
|
|
181
188
|
color: textColor
|
|
182
189
|
}
|
|
183
|
-
}, /*#__PURE__*/
|
|
190
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
184
191
|
className: "one-col-story-list-m_one-col-first-story__1aC6i"
|
|
185
192
|
}, storyItems.slice(0, 1).map(function (story, index) {
|
|
186
|
-
return /*#__PURE__*/
|
|
193
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
187
194
|
key: "default-".concat(index)
|
|
188
195
|
}, borderHandler(story));
|
|
189
|
-
})), /*#__PURE__*/
|
|
196
|
+
})), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
190
197
|
className: "one-col-story-list-m_one-col-story-list__3d6Bp"
|
|
191
198
|
}, storyItems.slice(1).map(function (story, index) {
|
|
192
|
-
return /*#__PURE__*/
|
|
199
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
193
200
|
key: "default-".concat(index)
|
|
194
201
|
}, borderHandler(story));
|
|
195
|
-
})), /*#__PURE__*/
|
|
202
|
+
})), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
196
203
|
className: "one-col-story-list-m_one-col-ads__UN_hF"
|
|
197
|
-
}, getSlot(type, component, function () {
|
|
204
|
+
}, index.getSlot(type, component, function () {
|
|
198
205
|
return null;
|
|
199
206
|
}, function () {
|
|
200
207
|
return null;
|
|
201
|
-
}))), /*#__PURE__*/
|
|
208
|
+
}))), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
202
209
|
className: "one-col-story-list-m_footer-ad-wrapper__NGgvp"
|
|
203
210
|
}, getLoadMore({
|
|
204
211
|
isLoading: isLoading,
|
|
205
212
|
storyItems: storyItems,
|
|
206
213
|
getMoreStories: getMoreStories,
|
|
207
214
|
subsequentLoadCount: subsequentLoadCount
|
|
208
|
-
}), /*#__PURE__*/
|
|
215
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
209
216
|
className: "one-col-story-list-m_ad-wrapper__3_cNc"
|
|
210
217
|
}, footerSlotComp))));
|
|
211
218
|
};
|
|
212
219
|
OneColStoryListBase.propTypes = {
|
|
213
220
|
/** collection is the array of objects which is returning by API */
|
|
214
|
-
collection:
|
|
221
|
+
collection: PropTypes__default["default"].object.isRequired,
|
|
215
222
|
|
|
216
223
|
/** The config for the Row */
|
|
217
|
-
config:
|
|
218
|
-
borderColor:
|
|
219
|
-
theme:
|
|
220
|
-
border:
|
|
221
|
-
footerButton:
|
|
224
|
+
config: PropTypes__default["default"].shape({
|
|
225
|
+
borderColor: PropTypes__default["default"].string,
|
|
226
|
+
theme: PropTypes__default["default"].string,
|
|
227
|
+
border: PropTypes__default["default"].string,
|
|
228
|
+
footerButton: PropTypes__default["default"].string,
|
|
222
229
|
// row title style
|
|
223
|
-
collectionNameTemplate:
|
|
230
|
+
collectionNameTemplate: PropTypes__default["default"].string,
|
|
224
231
|
// row title style colour
|
|
225
|
-
collectionNameBorderColor:
|
|
226
|
-
subsequentLoadCount:
|
|
232
|
+
collectionNameBorderColor: PropTypes__default["default"].string,
|
|
233
|
+
subsequentLoadCount: PropTypes__default["default"].number
|
|
227
234
|
}),
|
|
228
|
-
getMoreStories:
|
|
229
|
-
isLoadMoreVisible:
|
|
230
|
-
isLoading:
|
|
231
|
-
isolatedLoadMore:
|
|
235
|
+
getMoreStories: PropTypes__default["default"].func,
|
|
236
|
+
isLoadMoreVisible: PropTypes__default["default"].bool,
|
|
237
|
+
isLoading: PropTypes__default["default"].bool,
|
|
238
|
+
isolatedLoadMore: PropTypes__default["default"].bool
|
|
232
239
|
};
|
|
233
240
|
OneColStoryListBase.defaultProps = {
|
|
234
241
|
getMoreStories: function getMoreStories() {},
|
|
235
242
|
isLoadMoreVisible: true,
|
|
236
243
|
isLoading: false
|
|
237
244
|
};
|
|
238
|
-
var OneColStoryList = StateProvider(OneColStoryListBase);
|
|
245
|
+
var OneColStoryList = index$1.StateProvider(OneColStoryListBase);
|
|
239
246
|
|
|
240
|
-
|
|
247
|
+
exports.OneColStoryList = OneColStoryList;
|
|
248
|
+
exports.OneColStoryListBase = OneColStoryListBase;
|