@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,17 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-e7cde739.js');
|
|
4
|
+
var React = require('react');
|
|
5
|
+
var PropTypes = require('prop-types');
|
|
6
|
+
var reactRedux = require('react-redux');
|
|
7
|
+
var index$2 = require('./index-5c8eda4a.js');
|
|
8
|
+
var index$1 = require('./index-3c4ac692.js');
|
|
9
|
+
var components = require('@quintype/components');
|
|
10
|
+
var index$3 = require('./index-4ddfe28d.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 React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
18
|
+
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
12
19
|
|
|
13
20
|
function _toArray(arr) {
|
|
14
|
-
return _arrayWithHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableRest();
|
|
21
|
+
return index._arrayWithHoles(arr) || index._iterableToArray(arr) || index._unsupportedIterableToArray(arr) || index._nonIterableRest();
|
|
15
22
|
}
|
|
16
23
|
|
|
17
24
|
var loadMore = function loadMore(_ref) {
|
|
@@ -34,7 +41,7 @@ var FourColFiveStoriesBase = function FourColFiveStoriesBase(_ref2) {
|
|
|
34
41
|
isLoading = _ref2.isLoading,
|
|
35
42
|
isolatedLoadMore = _ref2.isolatedLoadMore,
|
|
36
43
|
hideFirstCard = _ref2.hideFirstCard;
|
|
37
|
-
var stories = collectionToStories(collection);
|
|
44
|
+
var stories = components.collectionToStories(collection);
|
|
38
45
|
if (!stories.length) return null;
|
|
39
46
|
var _config$collectionNam = config.collectionNameBorderColor,
|
|
40
47
|
collectionNameBorderColor = _config$collectionNam === void 0 ? "" : _config$collectionNam,
|
|
@@ -51,17 +58,17 @@ var FourColFiveStoriesBase = function FourColFiveStoriesBase(_ref2) {
|
|
|
51
58
|
_config$subsequentLoa = config.subsequentLoadCount,
|
|
52
59
|
subsequentLoadCount = _config$subsequentLoa === void 0 ? 4 : _config$subsequentLoa;
|
|
53
60
|
|
|
54
|
-
var _get = get_1(slotConfig, [0], {}),
|
|
61
|
+
var _get = index.get_1(slotConfig, [0], {}),
|
|
55
62
|
_get$type = _get.type,
|
|
56
63
|
type = _get$type === void 0 ? "story" : _get$type,
|
|
57
64
|
component = _get.component;
|
|
58
65
|
|
|
59
|
-
var textColor = getTextColor(theme);
|
|
60
|
-
var sectionTagBorderColor = rgbToHex(borderColor);
|
|
61
|
-
var adWidgetSlot = type === "ad" || type === "widget" ? getSlot(type, component) : null;
|
|
62
|
-
var dispatch = useDispatch();
|
|
63
|
-
var qtConfig = useSelector(function (state) {
|
|
64
|
-
return get_1(state, ["qt", "config"], {});
|
|
66
|
+
var textColor = index.getTextColor(theme);
|
|
67
|
+
var sectionTagBorderColor = index.rgbToHex(borderColor);
|
|
68
|
+
var adWidgetSlot = type === "ad" || type === "widget" ? index.getSlot(type, component) : null;
|
|
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 _ref3 = stories || [],
|
|
@@ -70,11 +77,11 @@ var FourColFiveStoriesBase = function FourColFiveStoriesBase(_ref2) {
|
|
|
70
77
|
otherStories = _ref4.slice(1);
|
|
71
78
|
|
|
72
79
|
var storyCard = function storyCard(story) {
|
|
73
|
-
return /*#__PURE__*/
|
|
80
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(index$2.HeroImage, {
|
|
74
81
|
config: config,
|
|
75
82
|
story: story,
|
|
76
83
|
aspectRatio: [[16, 9]]
|
|
77
|
-
}), /*#__PURE__*/
|
|
84
|
+
}), /*#__PURE__*/React__default["default"].createElement(index$3.StorycardContent, {
|
|
78
85
|
theme: theme,
|
|
79
86
|
story: story,
|
|
80
87
|
config: config,
|
|
@@ -83,11 +90,11 @@ var FourColFiveStoriesBase = function FourColFiveStoriesBase(_ref2) {
|
|
|
83
90
|
}));
|
|
84
91
|
};
|
|
85
92
|
|
|
86
|
-
var otherCards = function otherCards(story, index) {
|
|
87
|
-
return /*#__PURE__*/
|
|
93
|
+
var otherCards = function otherCards(story, index$1) {
|
|
94
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
88
95
|
className: "four-col-five-stories-m_card__2lzhH",
|
|
89
96
|
"data-test-id": "story-card",
|
|
90
|
-
key: "four-col-five-story-".concat(index, "-").concat(get_1(story, ["id"], "0"))
|
|
97
|
+
key: "four-col-five-story-".concat(index$1, "-").concat(index.get_1(story, ["id"], "0"))
|
|
91
98
|
}, storyCard(story));
|
|
92
99
|
};
|
|
93
100
|
|
|
@@ -95,7 +102,7 @@ var FourColFiveStoriesBase = function FourColFiveStoriesBase(_ref2) {
|
|
|
95
102
|
if (!isLoadMoreVisible) return null;
|
|
96
103
|
|
|
97
104
|
if (isolatedLoadMore) {
|
|
98
|
-
return /*#__PURE__*/
|
|
105
|
+
return /*#__PURE__*/React__default["default"].createElement(index$1.LoadMoreTarget, {
|
|
99
106
|
collection: collection,
|
|
100
107
|
componentName: "FourColFiveStories",
|
|
101
108
|
offset: stories.length,
|
|
@@ -103,8 +110,8 @@ var FourColFiveStoriesBase = function FourColFiveStoriesBase(_ref2) {
|
|
|
103
110
|
});
|
|
104
111
|
}
|
|
105
112
|
|
|
106
|
-
var url = generateNavigateSlug(collection, qtConfig);
|
|
107
|
-
return /*#__PURE__*/
|
|
113
|
+
var url = index.generateNavigateSlug(collection, qtConfig);
|
|
114
|
+
return /*#__PURE__*/React__default["default"].createElement(index$1.ProgressiveHydration, null, /*#__PURE__*/React__default["default"].createElement(index$1.LoadmoreButton, {
|
|
108
115
|
config: config,
|
|
109
116
|
collection: collection,
|
|
110
117
|
template: footerButton,
|
|
@@ -112,33 +119,33 @@ var FourColFiveStoriesBase = function FourColFiveStoriesBase(_ref2) {
|
|
|
112
119
|
return loadMore(opts);
|
|
113
120
|
},
|
|
114
121
|
navigate: function navigate() {
|
|
115
|
-
return navigateTo(dispatch, url);
|
|
122
|
+
return index.navigateTo(dispatch, url);
|
|
116
123
|
},
|
|
117
124
|
qtConfig: qtConfig
|
|
118
125
|
}));
|
|
119
126
|
};
|
|
120
127
|
|
|
121
128
|
var renderStories = hideFirstCard ? stories : otherStories;
|
|
122
|
-
return /*#__PURE__*/
|
|
129
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
123
130
|
className: "full-width-with-padding arrow-component",
|
|
124
131
|
"data-test-id": "four-col-five-stories",
|
|
125
132
|
style: {
|
|
126
133
|
backgroundColor: theme,
|
|
127
134
|
color: textColor
|
|
128
135
|
}
|
|
129
|
-
}, /*#__PURE__*/
|
|
136
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
130
137
|
className: "four-col-five-stories-m_four-col-five-stories__16ja_"
|
|
131
|
-
}, /*#__PURE__*/
|
|
138
|
+
}, /*#__PURE__*/React__default["default"].createElement(index$1.CollectionName, {
|
|
132
139
|
collection: collection,
|
|
133
140
|
collectionNameTemplate: collectionNameTemplate,
|
|
134
141
|
collectionNameBorderColor: collectionNameBorderColor,
|
|
135
142
|
headerLevel: 2
|
|
136
|
-
}), /*#__PURE__*/
|
|
143
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
137
144
|
className: "four-col-five-stories-m_wrapper__31KAU"
|
|
138
|
-
}, !hideFirstCard && /*#__PURE__*/
|
|
145
|
+
}, !hideFirstCard && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
139
146
|
className: "first-card four-col-five-stories-m_first-card__3dXVH",
|
|
140
147
|
"data-test-id": "story-card"
|
|
141
|
-
}, storyCard(firstStory)), /*#__PURE__*/
|
|
148
|
+
}, storyCard(firstStory)), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
142
149
|
className: "other-cards four-col-five-stories-m_other-cards__1P4k5"
|
|
143
150
|
}, renderStories.slice(0, 3).map(function (story, index) {
|
|
144
151
|
return otherCards(story, index);
|
|
@@ -152,21 +159,21 @@ var FourColFiveStoriesBase = function FourColFiveStoriesBase(_ref2) {
|
|
|
152
159
|
})));
|
|
153
160
|
};
|
|
154
161
|
FourColFiveStoriesBase.propTypes = {
|
|
155
|
-
collection:
|
|
156
|
-
config:
|
|
157
|
-
collectionNameBorderColor:
|
|
158
|
-
theme:
|
|
159
|
-
slotConfig:
|
|
160
|
-
collectionNameTemplate:
|
|
161
|
-
footerButton:
|
|
162
|
-
borderColor:
|
|
163
|
-
subsequentLoadCount:
|
|
162
|
+
collection: PropTypes__default["default"].object,
|
|
163
|
+
config: PropTypes__default["default"].shape({
|
|
164
|
+
collectionNameBorderColor: PropTypes__default["default"].string,
|
|
165
|
+
theme: PropTypes__default["default"].string,
|
|
166
|
+
slotConfig: PropTypes__default["default"].array,
|
|
167
|
+
collectionNameTemplate: PropTypes__default["default"].string,
|
|
168
|
+
footerButton: PropTypes__default["default"].string,
|
|
169
|
+
borderColor: PropTypes__default["default"].string,
|
|
170
|
+
subsequentLoadCount: PropTypes__default["default"].number
|
|
164
171
|
}),
|
|
165
|
-
getMoreStories:
|
|
166
|
-
isLoading:
|
|
167
|
-
hideFirstCard:
|
|
168
|
-
isLoadMoreVisible:
|
|
169
|
-
isolatedLoadMore:
|
|
172
|
+
getMoreStories: PropTypes__default["default"].func,
|
|
173
|
+
isLoading: PropTypes__default["default"].bool,
|
|
174
|
+
hideFirstCard: PropTypes__default["default"].bool,
|
|
175
|
+
isLoadMoreVisible: PropTypes__default["default"].bool,
|
|
176
|
+
isolatedLoadMore: PropTypes__default["default"].bool
|
|
170
177
|
};
|
|
171
178
|
FourColFiveStoriesBase.defaultProps = {
|
|
172
179
|
getMoreStories: function getMoreStories() {},
|
|
@@ -176,6 +183,7 @@ FourColFiveStoriesBase.defaultProps = {
|
|
|
176
183
|
config: {},
|
|
177
184
|
hideFirstCard: false
|
|
178
185
|
};
|
|
179
|
-
var FourColFiveStories = StateProvider(FourColFiveStoriesBase);
|
|
186
|
+
var FourColFiveStories = index$1.StateProvider(FourColFiveStoriesBase);
|
|
180
187
|
|
|
181
|
-
|
|
188
|
+
exports.FourColFiveStories = FourColFiveStories;
|
|
189
|
+
exports.FourColFiveStoriesBase = FourColFiveStoriesBase;
|