@quintype/arrow 3.15.1-perf.4 → 3.15.1-perf.5
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/cjs/index.js +14589 -0
- package/package.json +1 -1
- package/atoms/Author/index.js +0 -170
- package/atoms/Author/styles.arrow.css +0 -1
- package/atoms/AuthorWithTime/index.js +0 -514
- package/atoms/AuthorWithTime/styles.arrow.css +0 -1
- package/atoms/CollectionName/index.js +0 -255
- package/atoms/CollectionName/styles.arrow.css +0 -1
- package/atoms/ExtendedLoadMore/index-0f809dd9.js +0 -254
- package/atoms/ExtendedLoadMore/index-142f015c.js +0 -476
- package/atoms/ExtendedLoadMore/index-37a9ccff.js +0 -182
- package/atoms/ExtendedLoadMore/index-446679c8.js +0 -191
- package/atoms/ExtendedLoadMore/index-44f97338.js +0 -300
- package/atoms/ExtendedLoadMore/index-57dd4870.js +0 -239
- package/atoms/ExtendedLoadMore/index-66dd4dbd.js +0 -215
- package/atoms/ExtendedLoadMore/index-8462c597.js +0 -363
- package/atoms/ExtendedLoadMore/index-93cb06d1.js +0 -1016
- package/atoms/ExtendedLoadMore/index-afd44863.js +0 -95
- package/atoms/ExtendedLoadMore/index-b5754c5d.js +0 -195
- package/atoms/ExtendedLoadMore/index-bbaf526e.js +0 -256
- package/atoms/ExtendedLoadMore/index-cfb262ef.js +0 -192
- package/atoms/ExtendedLoadMore/index.js +0 -20
- package/atoms/ExtendedLoadMore/styles.arrow.css +0 -1
- package/atoms/Headline/index.js +0 -379
- package/atoms/Headline/styles.arrow.css +0 -1
- package/atoms/HeroImage/index.js +0 -336
- package/atoms/HeroImage/styles.arrow.css +0 -1
- package/atoms/LoadmoreButton/index.js +0 -175
- package/atoms/LoadmoreButton/styles.arrow.css +0 -1
- package/atoms/ScrollSnap/index.js +0 -379
- package/atoms/ScrollSnap/styles.arrow.css +0 -1
- package/atoms/SectionTag/index.js +0 -140
- package/atoms/SectionTag/styles.arrow.css +0 -1
- package/atoms/Subheadline/index.js +0 -120
- package/atoms/Subheadline/styles.arrow.css +0 -1
- package/atoms/TimeStamp/index.js +0 -221
- package/atoms/TimeStamp/styles.arrow.css +0 -1
- package/molecules/KeyEvents/index.js +0 -457
- package/molecules/KeyEvents/styles.arrow.css +0 -1
- package/molecules/PageIntroductionCard/index.js +0 -248
- package/molecules/PageIntroductionCard/styles.arrow.css +0 -1
- package/molecules/SocialShareTemplate/index.js +0 -506
- package/molecules/SocialShareTemplate/styles.arrow.css +0 -1
- package/molecules/StoryCard/index.js +0 -1430
- package/molecules/StoryCard/styles.arrow.css +0 -1
- package/molecules/StoryElementCard/index.js +0 -3091
- package/molecules/StoryElementCard/styles.arrow.css +0 -1
- package/molecules/StorycardContent/index.js +0 -976
- package/molecules/StorycardContent/styles.arrow.css +0 -1
- package/rows/AlternateCollectionFilter/index.js +0 -2189
- package/rows/AlternateCollectionFilter/styles.arrow.css +0 -1
- package/rows/AsideCollection/index.js +0 -2135
- package/rows/AsideCollection/styles.arrow.css +0 -1
- package/rows/AstrologyCollection/index.js +0 -2106
- package/rows/AstrologyCollection/styles.arrow.css +0 -1
- package/rows/AuthorIntroductionCard/index.js +0 -813
- package/rows/AuthorIntroductionCard/styles.arrow.css +0 -1
- package/rows/AuthorsList/index.js +0 -996
- package/rows/AuthorsList/styles.arrow.css +0 -1
- package/rows/CollectionFilter/index.js +0 -2279
- package/rows/CollectionFilter/styles.arrow.css +0 -1
- package/rows/ElevenStories/index.js +0 -2118
- package/rows/ElevenStories/styles.arrow.css +0 -1
- package/rows/FourColFiveStories/index.js +0 -1861
- package/rows/FourColFiveStories/styles.arrow.css +0 -1
- package/rows/FourColGrid/index.js +0 -2083
- package/rows/FourColGrid/styles.arrow.css +0 -1
- package/rows/FourColPortraitStories/index.js +0 -2116
- package/rows/FourColPortraitStories/styles.arrow.css +0 -1
- package/rows/FourColSixteenStories/index.js +0 -1849
- package/rows/FourColSixteenStories/styles.arrow.css +0 -1
- package/rows/FourColTwelveStories/index.js +0 -1822
- package/rows/FourColTwelveStories/styles.arrow.css +0 -1
- package/rows/FourStorySlider/index.js +0 -2223
- package/rows/FourStorySlider/styles.arrow.css +0 -1
- package/rows/FourStorySliderPortrait/index.js +0 -2226
- package/rows/FourStorySliderPortrait/styles.arrow.css +0 -1
- package/rows/FourTabbedBigStorySlider/index.js +0 -1985
- package/rows/FourTabbedBigStorySlider/styles.arrow.css +0 -1
- package/rows/FullScreenSlider/index.js +0 -2141
- package/rows/FullScreenSlider/styles.arrow.css +0 -1
- package/rows/HalfScreenSlider/index.js +0 -1994
- package/rows/HalfScreenSlider/styles.arrow.css +0 -1
- package/rows/ListComponent/index.js +0 -1942
- package/rows/ListComponent/styles.arrow.css +0 -1
- package/rows/Listicles/index.js +0 -945
- package/rows/Listicles/styles.arrow.css +0 -1
- package/rows/MagazineEditions/index.js +0 -690
- package/rows/MagazineEditions/styles.arrow.css +0 -1
- package/rows/MagazineHeaderCard/index.js +0 -684
- package/rows/MagazineHeaderCard/styles.arrow.css +0 -1
- package/rows/MagazineWidget/index.js +0 -1994
- package/rows/MagazineWidget/styles.arrow.css +0 -1
- package/rows/OneColStoryList/index.js +0 -2169
- package/rows/OneColStoryList/styles.arrow.css +0 -1
- package/rows/OpinionCollection/index.js +0 -1545
- package/rows/OpinionCollection/styles.arrow.css +0 -1
- package/rows/SixColSixStories/index.js +0 -2014
- package/rows/SixColSixStories/styles.arrow.css +0 -1
- package/rows/StoryCollection/index.js +0 -2135
- package/rows/StoryCollection/styles.arrow.css +0 -1
- package/rows/TagIntroductionCard/index.js +0 -103
- package/rows/TagIntroductionCard/styles.arrow.css +0 -1
- package/rows/ThreeColFlexStories/index.js +0 -2074
- package/rows/ThreeColFlexStories/styles.arrow.css +0 -1
- package/rows/ThreeColFourteenStories/index.js +0 -1770
- package/rows/ThreeColFourteenStories/styles.arrow.css +0 -1
- package/rows/ThreeColGrid/index.js +0 -2104
- package/rows/ThreeColGrid/styles.arrow.css +0 -1
- package/rows/ThreeColSevenStory/index.js +0 -1982
- package/rows/ThreeColSevenStory/styles.arrow.css +0 -1
- package/rows/ThreeColSixStories/index.js +0 -1965
- package/rows/ThreeColSixStories/styles.arrow.css +0 -1
- package/rows/ThreeColTwelveStories/index.js +0 -1854
- package/rows/ThreeColTwelveStories/styles.arrow.css +0 -1
- package/rows/TwoColFourStories/index.js +0 -1943
- package/rows/TwoColFourStories/styles.arrow.css +0 -1
- package/rows/TwoColFourStoryHighlight/index.js +0 -1930
- package/rows/TwoColFourStoryHighlight/styles.arrow.css +0 -1
- package/rows/TwoColSevenStories/index.js +0 -1970
- package/rows/TwoColSevenStories/styles.arrow.css +0 -1
- package/rows/TwoColSixStories/index.js +0 -1963
- package/rows/TwoColSixStories/styles.arrow.css +0 -1
- package/rows/TwoColTenStoriesSidebar/index.js +0 -2029
- package/rows/TwoColTenStoriesSidebar/styles.arrow.css +0 -1
- package/rows/TwoColThreeStories/index.js +0 -1916
- package/rows/TwoColThreeStories/styles.arrow.css +0 -1
- package/story-elements/AlsoRead/index.js +0 -320
- package/story-elements/AlsoRead/styles.arrow.css +0 -1
- package/story-elements/Attachment/index.js +0 -167
- package/story-elements/Attachment/styles.arrow.css +0 -1
- package/story-elements/BigFact/index.js +0 -137
- package/story-elements/BigFact/styles.arrow.css +0 -1
- package/story-elements/BlockQuote/index.js +0 -304
- package/story-elements/BlockQuote/styles.arrow.css +0 -1
- package/story-elements/Blurb/index.js +0 -189
- package/story-elements/Blurb/styles.arrow.css +0 -1
- package/story-elements/Image/index.js +0 -529
- package/story-elements/Image/styles.arrow.css +0 -1
- package/story-elements/ImageGallery/index.js +0 -462
- package/story-elements/ImageGallery/styles.arrow.css +0 -1
- package/story-elements/ImageSlideshow/index.js +0 -773
- package/story-elements/ImageSlideshow/styles.arrow.css +0 -1
- package/story-elements/QuestionAnswer/index.js +0 -267
- package/story-elements/QuestionAnswer/styles.arrow.css +0 -1
- package/story-elements/Quote/index.js +0 -166
- package/story-elements/Quote/styles.arrow.css +0 -1
- package/story-elements/Reference/index.js +0 -160
- package/story-elements/Reference/styles.arrow.css +0 -1
- package/story-elements/StoryElement/index.js +0 -75
- package/story-elements/Summary/index.js +0 -190
- package/story-elements/Summary/styles.arrow.css +0 -1
- package/story-elements/Text/index.js +0 -165
- package/story-elements/Text/styles.arrow.css +0 -1
- package/story-elements/Video/index.js +0 -81
- package/story-elements/Video/styles.arrow.css +0 -1
- package/story-templates/ListicleStoryTemplate/index.js +0 -5586
- package/story-templates/ListicleStoryTemplate/styles.arrow.css +0 -1
- package/story-templates/LiveBlogStoryTemplate/index.js +0 -5762
- package/story-templates/LiveBlogStoryTemplate/styles.arrow.css +0 -1
- package/story-templates/PhotoStoryTemplate/index.js +0 -5564
- package/story-templates/PhotoStoryTemplate/styles.arrow.css +0 -1
- package/story-templates/TextStoryTemplate/index.js +0 -5637
- package/story-templates/TextStoryTemplate/styles.arrow.css +0 -1
- package/story-templates/VideoStoryTemplate/index.js +0 -5496
- package/story-templates/VideoStoryTemplate/styles.arrow.css +0 -1
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var _getClassName = require('babel-plugin-react-css-modules/dist/browser/getClassName');
|
|
4
|
-
var React = require('react');
|
|
5
|
-
var index$2 = require('./index-93cb06d1.js');
|
|
6
|
-
var index$1 = require('./index-8462c597.js');
|
|
7
|
-
var index = require('./index-142f015c.js');
|
|
8
|
-
var PropTypes = require('prop-types');
|
|
9
|
-
|
|
10
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
11
|
-
|
|
12
|
-
var _getClassName__default = /*#__PURE__*/_interopDefaultLegacy(_getClassName);
|
|
13
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
14
|
-
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
15
|
-
|
|
16
|
-
var _styleModuleImportMap = {
|
|
17
|
-
"./storycardContent.m.css": {
|
|
18
|
-
"wrapper": "storycardContent-m_wrapper__TEmfA",
|
|
19
|
-
"horizontal-content-wrapper": "storycardContent-m_horizontal-content-wrapper__NgpuC",
|
|
20
|
-
"border-full": "storycardContent-m_border-full__2km37"
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
var StorycardContent = function StorycardContent(_ref) {
|
|
24
|
-
var story = _ref.story,
|
|
25
|
-
children = _ref.children,
|
|
26
|
-
theme = _ref.theme,
|
|
27
|
-
border = _ref.border,
|
|
28
|
-
isHorizontalMobile = _ref.isHorizontalMobile,
|
|
29
|
-
headerLevel = _ref.headerLevel,
|
|
30
|
-
borderColor = _ref.borderColor,
|
|
31
|
-
config = _ref.config;
|
|
32
|
-
var textColor = index.getTextColor(theme);
|
|
33
|
-
var borderOptions = ["full"];
|
|
34
|
-
var SectionTagborderColor = index.rgbToHex(borderColor);
|
|
35
|
-
var borderTemplate = borderOptions.includes(border) ? "border-".concat(border) : "";
|
|
36
|
-
var horizontalCard = isHorizontalMobile ? "horizontal-content-wrapper" : "";
|
|
37
|
-
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
38
|
-
"data-test-id": "story-card-content",
|
|
39
|
-
style: {
|
|
40
|
-
backgroundColor: theme,
|
|
41
|
-
color: textColor
|
|
42
|
-
},
|
|
43
|
-
className: "arr--content-wrapper " + _getClassName__default["default"]("wrapper ".concat(borderTemplate, " ").concat(horizontalCard), _styleModuleImportMap)
|
|
44
|
-
}, children || /*#__PURE__*/React__default["default"].createElement(DefaultStoryCardContent, {
|
|
45
|
-
story: story,
|
|
46
|
-
headerLevel: headerLevel,
|
|
47
|
-
isHorizontalMobile: isHorizontalMobile,
|
|
48
|
-
borderColor: SectionTagborderColor,
|
|
49
|
-
config: config
|
|
50
|
-
}));
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
var DefaultStoryCardContent = function DefaultStoryCardContent(_ref2) {
|
|
54
|
-
var story = _ref2.story,
|
|
55
|
-
headerLevel = _ref2.headerLevel,
|
|
56
|
-
borderColor = _ref2.borderColor,
|
|
57
|
-
_ref2$config = _ref2.config,
|
|
58
|
-
config = _ref2$config === void 0 ? {} : _ref2$config;
|
|
59
|
-
var SectionTagborderColor = index.rgbToHex(borderColor);
|
|
60
|
-
var _config$localizationC = config.localizationConfig,
|
|
61
|
-
localizationConfig = _config$localizationC === void 0 ? {} : _config$localizationC;
|
|
62
|
-
return /*#__PURE__*/React__default["default"].createElement("div", null, /*#__PURE__*/React__default["default"].createElement(index$1.SectionTag, {
|
|
63
|
-
story: story,
|
|
64
|
-
borderColor: SectionTagborderColor
|
|
65
|
-
}), /*#__PURE__*/React__default["default"].createElement(index$2.Headline, {
|
|
66
|
-
story: story,
|
|
67
|
-
headerLevel: headerLevel,
|
|
68
|
-
premiumStoryIconConfig: config
|
|
69
|
-
}), /*#__PURE__*/React__default["default"].createElement(index$2.AuthorWithTime, {
|
|
70
|
-
config: localizationConfig,
|
|
71
|
-
story: story
|
|
72
|
-
}));
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
DefaultStoryCardContent.propTypes = {
|
|
76
|
-
story: PropTypes__default["default"].object.isRequired,
|
|
77
|
-
border: PropTypes__default["default"].string,
|
|
78
|
-
theme: PropTypes__default["default"].string,
|
|
79
|
-
isHorizontalMobile: PropTypes__default["default"].bool,
|
|
80
|
-
headerLevel: PropTypes__default["default"].string,
|
|
81
|
-
borderColor: PropTypes__default["default"].string,
|
|
82
|
-
config: PropTypes__default["default"].object
|
|
83
|
-
};
|
|
84
|
-
StorycardContent.propTypes = {
|
|
85
|
-
story: PropTypes__default["default"].object.isRequired,
|
|
86
|
-
children: PropTypes__default["default"].node,
|
|
87
|
-
theme: PropTypes__default["default"].string,
|
|
88
|
-
border: PropTypes__default["default"].string,
|
|
89
|
-
isHorizontalMobile: PropTypes__default["default"].bool,
|
|
90
|
-
headerLevel: PropTypes__default["default"].string,
|
|
91
|
-
borderColor: PropTypes__default["default"].string,
|
|
92
|
-
config: PropTypes__default["default"].object
|
|
93
|
-
};
|
|
94
|
-
|
|
95
|
-
exports.StorycardContent = StorycardContent;
|
|
@@ -1,195 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var _toArray = require('@babel/runtime/helpers/toArray');
|
|
4
|
-
var React = require('react');
|
|
5
|
-
var lodash = require('lodash');
|
|
6
|
-
var PropTypes = require('prop-types');
|
|
7
|
-
var reactRedux = require('react-redux');
|
|
8
|
-
var index$2 = require('./index-8462c597.js');
|
|
9
|
-
var index$1 = require('./index-93cb06d1.js');
|
|
10
|
-
var components = require('@quintype/components');
|
|
11
|
-
var index$3 = require('./index-afd44863.js');
|
|
12
|
-
var index = require('./index-142f015c.js');
|
|
13
|
-
require('@babel/runtime/helpers/slicedToArray');
|
|
14
|
-
require('babel-plugin-react-css-modules/dist/browser/getClassName');
|
|
15
|
-
require('@babel/runtime/helpers/defineProperty');
|
|
16
|
-
require('react-dom');
|
|
17
|
-
require('@babel/runtime/helpers/toConsumableArray');
|
|
18
|
-
require('@babel/runtime/helpers/asyncToGenerator');
|
|
19
|
-
require('@babel/runtime/regenerator');
|
|
20
|
-
require('@babel/runtime/helpers/typeof');
|
|
21
|
-
require('react-timeago');
|
|
22
|
-
require('date-fns-tz');
|
|
23
|
-
|
|
24
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
25
|
-
|
|
26
|
-
var _toArray__default = /*#__PURE__*/_interopDefaultLegacy(_toArray);
|
|
27
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
28
|
-
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
29
|
-
|
|
30
|
-
var loadMore = function loadMore(_ref) {
|
|
31
|
-
var isLoading = _ref.isLoading,
|
|
32
|
-
renderStories = _ref.renderStories,
|
|
33
|
-
getMoreStories = _ref.getMoreStories,
|
|
34
|
-
_ref$subsequentLoadCo = _ref.subsequentLoadCount,
|
|
35
|
-
subsequentLoadCount = _ref$subsequentLoadCo === void 0 ? 4 : _ref$subsequentLoadCo;
|
|
36
|
-
if (isLoading) return;
|
|
37
|
-
var limit = subsequentLoadCount;
|
|
38
|
-
var offset = renderStories.length + 1;
|
|
39
|
-
getMoreStories(offset, limit);
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
var FourColFiveStoriesBase = function FourColFiveStoriesBase(_ref2) {
|
|
43
|
-
var collection = _ref2.collection,
|
|
44
|
-
config = _ref2.config,
|
|
45
|
-
getMoreStories = _ref2.getMoreStories,
|
|
46
|
-
isLoadMoreVisible = _ref2.isLoadMoreVisible,
|
|
47
|
-
isLoading = _ref2.isLoading,
|
|
48
|
-
isolatedLoadMore = _ref2.isolatedLoadMore,
|
|
49
|
-
hideFirstCard = _ref2.hideFirstCard;
|
|
50
|
-
var stories = components.collectionToStories(collection);
|
|
51
|
-
if (!stories.length) return null;
|
|
52
|
-
var _config$collectionNam = config.collectionNameBorderColor,
|
|
53
|
-
collectionNameBorderColor = _config$collectionNam === void 0 ? "" : _config$collectionNam,
|
|
54
|
-
_config$theme = config.theme,
|
|
55
|
-
theme = _config$theme === void 0 ? "" : _config$theme,
|
|
56
|
-
_config$slotConfig = config.slotConfig,
|
|
57
|
-
slotConfig = _config$slotConfig === void 0 ? [] : _config$slotConfig,
|
|
58
|
-
_config$collectionNam2 = config.collectionNameTemplate,
|
|
59
|
-
collectionNameTemplate = _config$collectionNam2 === void 0 ? "" : _config$collectionNam2,
|
|
60
|
-
_config$footerButton = config.footerButton,
|
|
61
|
-
footerButton = _config$footerButton === void 0 ? "" : _config$footerButton,
|
|
62
|
-
_config$borderColor = config.borderColor,
|
|
63
|
-
borderColor = _config$borderColor === void 0 ? "" : _config$borderColor,
|
|
64
|
-
_config$subsequentLoa = config.subsequentLoadCount,
|
|
65
|
-
subsequentLoadCount = _config$subsequentLoa === void 0 ? 4 : _config$subsequentLoa;
|
|
66
|
-
|
|
67
|
-
var _get = lodash.get(slotConfig, [0], {}),
|
|
68
|
-
_get$type = _get.type,
|
|
69
|
-
type = _get$type === void 0 ? "story" : _get$type,
|
|
70
|
-
component = _get.component;
|
|
71
|
-
|
|
72
|
-
var textColor = index.getTextColor(theme);
|
|
73
|
-
var sectionTagBorderColor = index.rgbToHex(borderColor);
|
|
74
|
-
var adWidgetSlot = type === "ad" || type === "widget" ? index.getSlot(type, component) : null;
|
|
75
|
-
var dispatch = reactRedux.useDispatch();
|
|
76
|
-
var qtConfig = reactRedux.useSelector(function (state) {
|
|
77
|
-
return lodash.get(state, ["qt", "config"], {});
|
|
78
|
-
});
|
|
79
|
-
|
|
80
|
-
var _ref3 = stories || [],
|
|
81
|
-
_ref4 = _toArray__default["default"](_ref3),
|
|
82
|
-
firstStory = _ref4[0],
|
|
83
|
-
otherStories = _ref4.slice(1);
|
|
84
|
-
|
|
85
|
-
var storyCard = function storyCard(story) {
|
|
86
|
-
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(index$2.HeroImage, {
|
|
87
|
-
config: config,
|
|
88
|
-
story: story,
|
|
89
|
-
aspectRatio: [[16, 9]]
|
|
90
|
-
}), /*#__PURE__*/React__default["default"].createElement(index$3.StorycardContent, {
|
|
91
|
-
theme: theme,
|
|
92
|
-
story: story,
|
|
93
|
-
config: config,
|
|
94
|
-
headerLevel: 6,
|
|
95
|
-
borderColor: sectionTagBorderColor
|
|
96
|
-
}));
|
|
97
|
-
};
|
|
98
|
-
|
|
99
|
-
var otherCards = function otherCards(story, index) {
|
|
100
|
-
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
101
|
-
className: "four-col-five-stories-m_card__2lzhH",
|
|
102
|
-
"data-test-id": "story-card",
|
|
103
|
-
key: "four-col-five-story-".concat(index, "-").concat(lodash.get(story, ["id"], "0"))
|
|
104
|
-
}, storyCard(story));
|
|
105
|
-
};
|
|
106
|
-
|
|
107
|
-
var getLoadMore = function getLoadMore(opts) {
|
|
108
|
-
if (!isLoadMoreVisible) return null;
|
|
109
|
-
|
|
110
|
-
if (isolatedLoadMore) {
|
|
111
|
-
return /*#__PURE__*/React__default["default"].createElement(index$1.LoadMoreTarget, {
|
|
112
|
-
collection: collection,
|
|
113
|
-
componentName: "FourColFiveStories",
|
|
114
|
-
offset: stories.length,
|
|
115
|
-
limit: subsequentLoadCount
|
|
116
|
-
});
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
var url = index.generateNavigateSlug(collection, qtConfig);
|
|
120
|
-
return /*#__PURE__*/React__default["default"].createElement(index$1.ProgressiveHydration, null, /*#__PURE__*/React__default["default"].createElement(index$1.LoadmoreButton, {
|
|
121
|
-
config: config,
|
|
122
|
-
collection: collection,
|
|
123
|
-
template: footerButton,
|
|
124
|
-
onClick: function onClick() {
|
|
125
|
-
return loadMore(opts);
|
|
126
|
-
},
|
|
127
|
-
navigate: function navigate() {
|
|
128
|
-
return index.navigateTo(dispatch, url);
|
|
129
|
-
},
|
|
130
|
-
qtConfig: qtConfig
|
|
131
|
-
}));
|
|
132
|
-
};
|
|
133
|
-
|
|
134
|
-
var renderStories = hideFirstCard ? stories : otherStories;
|
|
135
|
-
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
136
|
-
className: "full-width-with-padding arrow-component",
|
|
137
|
-
"data-test-id": "four-col-five-stories",
|
|
138
|
-
style: {
|
|
139
|
-
backgroundColor: theme,
|
|
140
|
-
color: textColor
|
|
141
|
-
}
|
|
142
|
-
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
143
|
-
className: "four-col-five-stories-m_four-col-five-stories__16ja_"
|
|
144
|
-
}, /*#__PURE__*/React__default["default"].createElement(index$1.CollectionName, {
|
|
145
|
-
collection: collection,
|
|
146
|
-
collectionNameTemplate: collectionNameTemplate,
|
|
147
|
-
collectionNameBorderColor: collectionNameBorderColor,
|
|
148
|
-
headerLevel: 2
|
|
149
|
-
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
150
|
-
className: "four-col-five-stories-m_wrapper__31KAU"
|
|
151
|
-
}, !hideFirstCard && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
152
|
-
className: "first-card four-col-five-stories-m_first-card__3dXVH",
|
|
153
|
-
"data-test-id": "story-card"
|
|
154
|
-
}, storyCard(firstStory)), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
155
|
-
className: "other-cards four-col-five-stories-m_other-cards__1P4k5"
|
|
156
|
-
}, renderStories.slice(0, 3).map(function (story, index) {
|
|
157
|
-
return otherCards(story, index);
|
|
158
|
-
}), adWidgetSlot, renderStories.slice(3).map(function (story, index) {
|
|
159
|
-
return otherCards(story, index);
|
|
160
|
-
}))), getLoadMore({
|
|
161
|
-
isLoading: isLoading,
|
|
162
|
-
renderStories: renderStories,
|
|
163
|
-
getMoreStories: getMoreStories,
|
|
164
|
-
subsequentLoadCount: subsequentLoadCount
|
|
165
|
-
})));
|
|
166
|
-
};
|
|
167
|
-
FourColFiveStoriesBase.propTypes = {
|
|
168
|
-
collection: PropTypes__default["default"].object,
|
|
169
|
-
config: PropTypes__default["default"].shape({
|
|
170
|
-
collectionNameBorderColor: PropTypes__default["default"].string,
|
|
171
|
-
theme: PropTypes__default["default"].string,
|
|
172
|
-
slotConfig: PropTypes__default["default"].array,
|
|
173
|
-
collectionNameTemplate: PropTypes__default["default"].string,
|
|
174
|
-
footerButton: PropTypes__default["default"].string,
|
|
175
|
-
borderColor: PropTypes__default["default"].string,
|
|
176
|
-
subsequentLoadCount: PropTypes__default["default"].number
|
|
177
|
-
}),
|
|
178
|
-
getMoreStories: PropTypes__default["default"].func,
|
|
179
|
-
isLoading: PropTypes__default["default"].bool,
|
|
180
|
-
hideFirstCard: PropTypes__default["default"].bool,
|
|
181
|
-
isLoadMoreVisible: PropTypes__default["default"].bool,
|
|
182
|
-
isolatedLoadMore: PropTypes__default["default"].bool
|
|
183
|
-
};
|
|
184
|
-
FourColFiveStoriesBase.defaultProps = {
|
|
185
|
-
getMoreStories: function getMoreStories() {},
|
|
186
|
-
isLoadMoreVisible: true,
|
|
187
|
-
isLoading: false,
|
|
188
|
-
collection: {},
|
|
189
|
-
config: {},
|
|
190
|
-
hideFirstCard: false
|
|
191
|
-
};
|
|
192
|
-
var FourColFiveStories = index$1.StateProvider(FourColFiveStoriesBase);
|
|
193
|
-
|
|
194
|
-
exports.FourColFiveStories = FourColFiveStories;
|
|
195
|
-
exports.FourColFiveStoriesBase = FourColFiveStoriesBase;
|
|
@@ -1,256 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var components = require('@quintype/components');
|
|
4
|
-
var lodash = require('lodash');
|
|
5
|
-
var PropTypes = require('prop-types');
|
|
6
|
-
var React = require('react');
|
|
7
|
-
var reactRedux = require('react-redux');
|
|
8
|
-
var index$1 = require('./index-93cb06d1.js');
|
|
9
|
-
var index = require('./index-142f015c.js');
|
|
10
|
-
var index$3 = require('./index-8462c597.js');
|
|
11
|
-
var index$2 = require('./index-0f809dd9.js');
|
|
12
|
-
var index$4 = require('./index-afd44863.js');
|
|
13
|
-
require('babel-plugin-react-css-modules/dist/browser/getClassName');
|
|
14
|
-
require('@babel/runtime/helpers/defineProperty');
|
|
15
|
-
require('react-dom');
|
|
16
|
-
require('@babel/runtime/helpers/slicedToArray');
|
|
17
|
-
require('@babel/runtime/helpers/toConsumableArray');
|
|
18
|
-
require('@babel/runtime/helpers/asyncToGenerator');
|
|
19
|
-
require('@babel/runtime/regenerator');
|
|
20
|
-
require('@babel/runtime/helpers/typeof');
|
|
21
|
-
require('react-timeago');
|
|
22
|
-
require('date-fns-tz');
|
|
23
|
-
|
|
24
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
25
|
-
|
|
26
|
-
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
27
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
28
|
-
|
|
29
|
-
var loadMore = function loadMore(_ref) {
|
|
30
|
-
var isLoading = _ref.isLoading,
|
|
31
|
-
storyItems = _ref.storyItems,
|
|
32
|
-
getMoreStories = _ref.getMoreStories,
|
|
33
|
-
_ref$subsequentLoadCo = _ref.subsequentLoadCount,
|
|
34
|
-
subsequentLoadCount = _ref$subsequentLoadCo === void 0 ? 8 : _ref$subsequentLoadCo;
|
|
35
|
-
if (isLoading) return;
|
|
36
|
-
var limit = subsequentLoadCount;
|
|
37
|
-
var offset = storyItems.length;
|
|
38
|
-
getMoreStories(offset, limit);
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
var OneColStoryListBase = function OneColStoryListBase(_ref2) {
|
|
42
|
-
var collection = _ref2.collection,
|
|
43
|
-
_ref2$config = _ref2.config,
|
|
44
|
-
config = _ref2$config === void 0 ? {} : _ref2$config,
|
|
45
|
-
getMoreStories = _ref2.getMoreStories,
|
|
46
|
-
isLoadMoreVisible = _ref2.isLoadMoreVisible,
|
|
47
|
-
isLoading = _ref2.isLoading,
|
|
48
|
-
isolatedLoadMore = _ref2.isolatedLoadMore;
|
|
49
|
-
var storyItems = components.collectionToStories(collection);
|
|
50
|
-
if (!storyItems.length) return null;
|
|
51
|
-
var _config$collectionNam = config.collectionNameBorderColor,
|
|
52
|
-
collectionNameBorderColor = _config$collectionNam === void 0 ? "" : _config$collectionNam,
|
|
53
|
-
_config$borderColor = config.borderColor,
|
|
54
|
-
borderColor = _config$borderColor === void 0 ? "" : _config$borderColor,
|
|
55
|
-
_config$theme = config.theme,
|
|
56
|
-
theme = _config$theme === void 0 ? "" : _config$theme,
|
|
57
|
-
_config$border = config.border,
|
|
58
|
-
border = _config$border === void 0 ? "" : _config$border,
|
|
59
|
-
_config$slotConfig = config.slotConfig,
|
|
60
|
-
slotConfig = _config$slotConfig === void 0 ? [] : _config$slotConfig,
|
|
61
|
-
_config$collectionNam2 = config.collectionNameTemplate,
|
|
62
|
-
collectionNameTemplate = _config$collectionNam2 === void 0 ? "" : _config$collectionNam2,
|
|
63
|
-
_config$footerSlotCon = config.footerSlotConfig,
|
|
64
|
-
footerSlotConfig = _config$footerSlotCon === void 0 ? {} : _config$footerSlotCon,
|
|
65
|
-
_config$footerButton = config.footerButton,
|
|
66
|
-
footerButton = _config$footerButton === void 0 ? "" : _config$footerButton,
|
|
67
|
-
_config$localizationC = config.localizationConfig,
|
|
68
|
-
localizationConfig = _config$localizationC === void 0 ? {} : _config$localizationC,
|
|
69
|
-
_config$subsequentLoa = config.subsequentLoadCount,
|
|
70
|
-
subsequentLoadCount = _config$subsequentLoa === void 0 ? 8 : _config$subsequentLoa;
|
|
71
|
-
var footerSlot = footerSlotConfig.footerSlot;
|
|
72
|
-
|
|
73
|
-
var _get = lodash.get(slotConfig, [0], {}),
|
|
74
|
-
type = _get.type,
|
|
75
|
-
component = _get.component;
|
|
76
|
-
|
|
77
|
-
var dispatch = reactRedux.useDispatch();
|
|
78
|
-
var qtConfig = reactRedux.useSelector(function (state) {
|
|
79
|
-
return lodash.get(state, ["qt", "config"], {});
|
|
80
|
-
});
|
|
81
|
-
|
|
82
|
-
var getLoadMore = function getLoadMore(opts) {
|
|
83
|
-
if (!isLoadMoreVisible) return null;
|
|
84
|
-
|
|
85
|
-
if (isolatedLoadMore) {
|
|
86
|
-
return /*#__PURE__*/React__default["default"].createElement(index$1.LoadMoreTarget, {
|
|
87
|
-
collection: collection,
|
|
88
|
-
componentName: "OneColStoryList",
|
|
89
|
-
offset: storyItems.length,
|
|
90
|
-
limit: subsequentLoadCount
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
var url = index.generateNavigateSlug(collection, qtConfig);
|
|
95
|
-
return /*#__PURE__*/React__default["default"].createElement(index$1.ProgressiveHydration, null, /*#__PURE__*/React__default["default"].createElement(index$1.LoadmoreButton, {
|
|
96
|
-
config: config,
|
|
97
|
-
collection: collection,
|
|
98
|
-
template: footerButton,
|
|
99
|
-
onClick: function onClick() {
|
|
100
|
-
return loadMore(opts);
|
|
101
|
-
},
|
|
102
|
-
navigate: function navigate() {
|
|
103
|
-
return index.navigateTo(dispatch, url);
|
|
104
|
-
},
|
|
105
|
-
qtConfig: qtConfig
|
|
106
|
-
}));
|
|
107
|
-
};
|
|
108
|
-
|
|
109
|
-
var footerSlotComp = footerSlot ? footerSlot() : null;
|
|
110
|
-
|
|
111
|
-
var borderHandler = function borderHandler(story) {
|
|
112
|
-
switch (border) {
|
|
113
|
-
case "bottom":
|
|
114
|
-
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
115
|
-
className: "one-col-story-list-m_one-col-border-bottom__13nPb"
|
|
116
|
-
}, /*#__PURE__*/React__default["default"].createElement(index$2.StoryCard, {
|
|
117
|
-
story: story,
|
|
118
|
-
theme: theme,
|
|
119
|
-
headerLevel: "4",
|
|
120
|
-
isHorizontal: true,
|
|
121
|
-
border: border,
|
|
122
|
-
aspectRatio: [[1, 1], [4, 3]],
|
|
123
|
-
borderColor: borderColor,
|
|
124
|
-
prefix: "By",
|
|
125
|
-
config: config
|
|
126
|
-
}));
|
|
127
|
-
|
|
128
|
-
case "full":
|
|
129
|
-
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
130
|
-
className: "one-col-story-list-m_one-col-border-full__3PSl0"
|
|
131
|
-
}, /*#__PURE__*/React__default["default"].createElement(index$2.StoryCard, {
|
|
132
|
-
story: story,
|
|
133
|
-
border: border,
|
|
134
|
-
theme: theme,
|
|
135
|
-
isHorizontal: true,
|
|
136
|
-
borderColor: borderColor
|
|
137
|
-
}, /*#__PURE__*/React__default["default"].createElement(index$3.HeroImage, {
|
|
138
|
-
story: story,
|
|
139
|
-
isHorizontal: true,
|
|
140
|
-
aspectRatio: [[1, 1], [4, 3]]
|
|
141
|
-
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
142
|
-
className: "one-col-story-list-m_story-card-content-wrapper__1baqS"
|
|
143
|
-
}, /*#__PURE__*/React__default["default"].createElement(index$4.StorycardContent, {
|
|
144
|
-
story: story,
|
|
145
|
-
borderColor: borderColor,
|
|
146
|
-
config: config
|
|
147
|
-
}, /*#__PURE__*/React__default["default"].createElement(index$3.SectionTag, {
|
|
148
|
-
story: story
|
|
149
|
-
}), /*#__PURE__*/React__default["default"].createElement(index$1.Headline, {
|
|
150
|
-
story: story,
|
|
151
|
-
headerLevel: "4",
|
|
152
|
-
premiumStoryIconConfig: config
|
|
153
|
-
}), /*#__PURE__*/React__default["default"].createElement(index$2.Subheadline, {
|
|
154
|
-
story: story
|
|
155
|
-
}), /*#__PURE__*/React__default["default"].createElement(index$1.AuthorWithTime, {
|
|
156
|
-
config: localizationConfig,
|
|
157
|
-
story: story,
|
|
158
|
-
prefix: "By"
|
|
159
|
-
})))));
|
|
160
|
-
|
|
161
|
-
default:
|
|
162
|
-
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
163
|
-
className: "one-col-story-list-m_one-col-border-default__2BDg7"
|
|
164
|
-
}, /*#__PURE__*/React__default["default"].createElement(index$2.StoryCard, {
|
|
165
|
-
story: story,
|
|
166
|
-
theme: theme,
|
|
167
|
-
headerLevel: "4",
|
|
168
|
-
isHorizontal: true,
|
|
169
|
-
border: border,
|
|
170
|
-
aspectRatio: [[1, 1], [4, 3]],
|
|
171
|
-
borderColor: borderColor,
|
|
172
|
-
prefix: "By",
|
|
173
|
-
config: config
|
|
174
|
-
}));
|
|
175
|
-
}
|
|
176
|
-
};
|
|
177
|
-
|
|
178
|
-
var textColor = index.getTextColor(theme);
|
|
179
|
-
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
180
|
-
className: "full-width-with-padding arrow-component",
|
|
181
|
-
"data-test-id": "one-col-story-list",
|
|
182
|
-
style: {
|
|
183
|
-
backgroundColor: theme,
|
|
184
|
-
color: textColor
|
|
185
|
-
}
|
|
186
|
-
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
187
|
-
className: "one-col-story-list-m_one-col-story-list-wrapper__ICvTq"
|
|
188
|
-
}, /*#__PURE__*/React__default["default"].createElement(index$1.CollectionName, {
|
|
189
|
-
collection: collection,
|
|
190
|
-
collectionNameTemplate: collectionNameTemplate,
|
|
191
|
-
collectionNameBorderColor: collectionNameBorderColor
|
|
192
|
-
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
193
|
-
className: "one-col-story-list-m_wrapper__38qTp",
|
|
194
|
-
style: {
|
|
195
|
-
backgroundColor: theme,
|
|
196
|
-
color: textColor
|
|
197
|
-
}
|
|
198
|
-
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
199
|
-
className: "one-col-story-list-m_one-col-first-story__1aC6i"
|
|
200
|
-
}, storyItems.slice(0, 1).map(function (story, index) {
|
|
201
|
-
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
202
|
-
key: "default-".concat(index)
|
|
203
|
-
}, borderHandler(story));
|
|
204
|
-
})), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
205
|
-
className: "one-col-story-list-m_one-col-story-list__3d6Bp"
|
|
206
|
-
}, storyItems.slice(1).map(function (story, index) {
|
|
207
|
-
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
208
|
-
key: "default-".concat(index)
|
|
209
|
-
}, borderHandler(story));
|
|
210
|
-
})), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
211
|
-
className: "one-col-story-list-m_one-col-ads__UN_hF"
|
|
212
|
-
}, index.getSlot(type, component, function () {
|
|
213
|
-
return null;
|
|
214
|
-
}, function () {
|
|
215
|
-
return null;
|
|
216
|
-
}))), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
217
|
-
className: "one-col-story-list-m_footer-ad-wrapper__NGgvp"
|
|
218
|
-
}, getLoadMore({
|
|
219
|
-
isLoading: isLoading,
|
|
220
|
-
storyItems: storyItems,
|
|
221
|
-
getMoreStories: getMoreStories,
|
|
222
|
-
subsequentLoadCount: subsequentLoadCount
|
|
223
|
-
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
224
|
-
className: "one-col-story-list-m_ad-wrapper__3_cNc"
|
|
225
|
-
}, footerSlotComp))));
|
|
226
|
-
};
|
|
227
|
-
OneColStoryListBase.propTypes = {
|
|
228
|
-
/** collection is the array of objects which is returning by API */
|
|
229
|
-
collection: PropTypes__default["default"].object.isRequired,
|
|
230
|
-
|
|
231
|
-
/** The config for the Row */
|
|
232
|
-
config: PropTypes__default["default"].shape({
|
|
233
|
-
borderColor: PropTypes__default["default"].string,
|
|
234
|
-
theme: PropTypes__default["default"].string,
|
|
235
|
-
border: PropTypes__default["default"].string,
|
|
236
|
-
footerButton: PropTypes__default["default"].string,
|
|
237
|
-
// row title style
|
|
238
|
-
collectionNameTemplate: PropTypes__default["default"].string,
|
|
239
|
-
// row title style colour
|
|
240
|
-
collectionNameBorderColor: PropTypes__default["default"].string,
|
|
241
|
-
subsequentLoadCount: PropTypes__default["default"].number
|
|
242
|
-
}),
|
|
243
|
-
getMoreStories: PropTypes__default["default"].func,
|
|
244
|
-
isLoadMoreVisible: PropTypes__default["default"].bool,
|
|
245
|
-
isLoading: PropTypes__default["default"].bool,
|
|
246
|
-
isolatedLoadMore: PropTypes__default["default"].bool
|
|
247
|
-
};
|
|
248
|
-
OneColStoryListBase.defaultProps = {
|
|
249
|
-
getMoreStories: function getMoreStories() {},
|
|
250
|
-
isLoadMoreVisible: true,
|
|
251
|
-
isLoading: false
|
|
252
|
-
};
|
|
253
|
-
var OneColStoryList = index$1.StateProvider(OneColStoryListBase);
|
|
254
|
-
|
|
255
|
-
exports.OneColStoryList = OneColStoryList;
|
|
256
|
-
exports.OneColStoryListBase = OneColStoryListBase;
|