@quintype/arrow 3.15.1-perf.1 → 3.15.1-perf.4
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 +48 -2128
- package/atoms/Author/styles.arrow.css +1 -1
- package/atoms/AuthorWithTime/index.js +116 -2556
- package/atoms/AuthorWithTime/styles.arrow.css +1 -1
- package/atoms/CollectionName/index.js +48 -2127
- package/atoms/CollectionName/styles.arrow.css +1 -1
- package/atoms/ExtendedLoadMore/{index-6f8c780e.js → index-0f809dd9.js} +73 -62
- package/atoms/ExtendedLoadMore/index-142f015c.js +476 -0
- package/atoms/ExtendedLoadMore/{index-2d713010.js → index-37a9ccff.js} +63 -47
- package/atoms/ExtendedLoadMore/{index-8345922c.js → index-446679c8.js} +67 -51
- package/atoms/ExtendedLoadMore/{index-6daa674c.js → index-44f97338.js} +86 -68
- package/atoms/ExtendedLoadMore/{index-c8f346d0.js → index-57dd4870.js} +80 -64
- package/atoms/ExtendedLoadMore/{index-7eb05b3d.js → index-66dd4dbd.js} +70 -54
- package/atoms/ExtendedLoadMore/{index-6cb56d1a.js → index-8462c597.js} +93 -80
- package/atoms/ExtendedLoadMore/{index-aa8b8ab8.js → index-93cb06d1.js} +252 -226
- package/atoms/ExtendedLoadMore/index-afd44863.js +95 -0
- package/atoms/ExtendedLoadMore/{index-5a7900ba.js → index-b5754c5d.js} +67 -53
- package/atoms/ExtendedLoadMore/{index-4191a84c.js → index-bbaf526e.js} +78 -62
- package/atoms/ExtendedLoadMore/{index-99af722e.js → index-cfb262ef.js} +65 -48
- package/atoms/ExtendedLoadMore/index.js +20 -5
- package/atoms/ExtendedLoadMore/styles.arrow.css +1 -1
- package/atoms/Headline/index.js +95 -2175
- package/atoms/Headline/styles.arrow.css +1 -1
- package/atoms/HeroImage/index.js +91 -2230
- package/atoms/HeroImage/styles.arrow.css +1 -1
- package/atoms/LoadmoreButton/index.js +40 -2133
- package/atoms/LoadmoreButton/styles.arrow.css +1 -1
- package/atoms/ScrollSnap/index.js +89 -2241
- package/atoms/ScrollSnap/styles.arrow.css +1 -1
- package/atoms/SectionTag/index.js +40 -2120
- package/atoms/SectionTag/styles.arrow.css +1 -1
- package/atoms/Subheadline/index.js +35 -2115
- package/atoms/Subheadline/styles.arrow.css +1 -1
- package/atoms/TimeStamp/index.js +43 -2483
- package/atoms/TimeStamp/styles.arrow.css +1 -1
- package/molecules/KeyEvents/index.js +95 -2606
- package/molecules/KeyEvents/styles.arrow.css +1 -1
- package/molecules/PageIntroductionCard/index.js +59 -2487
- package/molecules/PageIntroductionCard/styles.arrow.css +1 -1
- package/molecules/SocialShareTemplate/index.js +213 -2800
- package/molecules/SocialShareTemplate/styles.arrow.css +1 -1
- package/molecules/StoryCard/index.js +308 -2816
- package/molecules/StoryCard/styles.arrow.css +1 -1
- package/molecules/StoryElementCard/index.js +611 -3352
- package/molecules/StoryElementCard/styles.arrow.css +1 -1
- package/molecules/StorycardContent/index.js +218 -2658
- package/molecules/StorycardContent/styles.arrow.css +1 -1
- package/package.json +1 -1
- package/rows/AlternateCollectionFilter/index.js +438 -2993
- package/rows/AlternateCollectionFilter/styles.arrow.css +1 -1
- package/rows/AsideCollection/index.js +432 -2987
- package/rows/AsideCollection/styles.arrow.css +1 -1
- package/rows/AstrologyCollection/index.js +411 -2966
- package/rows/AstrologyCollection/styles.arrow.css +1 -1
- package/rows/AuthorIntroductionCard/index.js +183 -2890
- package/rows/AuthorIntroductionCard/styles.arrow.css +1 -1
- package/rows/AuthorsList/index.js +217 -2936
- package/rows/AuthorsList/styles.arrow.css +1 -1
- package/rows/CollectionFilter/index.js +453 -3008
- package/rows/CollectionFilter/styles.arrow.css +1 -1
- package/rows/ElevenStories/index.js +439 -2959
- package/rows/ElevenStories/styles.arrow.css +1 -1
- package/rows/FourColFiveStories/index.js +374 -2872
- package/rows/FourColFiveStories/styles.arrow.css +1 -1
- package/rows/FourColGrid/index.js +426 -2927
- package/rows/FourColGrid/styles.arrow.css +1 -1
- package/rows/FourColPortraitStories/index.js +430 -2931
- package/rows/FourColPortraitStories/styles.arrow.css +1 -1
- package/rows/FourColSixteenStories/index.js +368 -2894
- package/rows/FourColSixteenStories/styles.arrow.css +1 -1
- package/rows/FourColTwelveStories/index.js +387 -2900
- package/rows/FourColTwelveStories/styles.arrow.css +1 -1
- package/rows/FourStorySlider/index.js +443 -2963
- package/rows/FourStorySlider/styles.arrow.css +1 -1
- package/rows/FourStorySliderPortrait/index.js +444 -2964
- package/rows/FourStorySliderPortrait/styles.arrow.css +1 -1
- package/rows/FourTabbedBigStorySlider/index.js +403 -2923
- package/rows/FourTabbedBigStorySlider/styles.arrow.css +1 -1
- package/rows/FullScreenSlider/index.js +422 -2942
- package/rows/FullScreenSlider/styles.arrow.css +1 -1
- package/rows/HalfScreenSlider/index.js +390 -2910
- package/rows/HalfScreenSlider/styles.arrow.css +1 -1
- package/rows/ListComponent/index.js +398 -2918
- package/rows/ListComponent/styles.arrow.css +1 -1
- package/rows/Listicles/index.js +189 -2375
- package/rows/Listicles/styles.arrow.css +1 -1
- package/rows/MagazineEditions/index.js +128 -2580
- package/rows/MagazineEditions/styles.arrow.css +1 -1
- package/rows/MagazineHeaderCard/index.js +125 -2577
- package/rows/MagazineHeaderCard/styles.arrow.css +1 -1
- package/rows/MagazineWidget/index.js +408 -2928
- package/rows/MagazineWidget/styles.arrow.css +1 -1
- package/rows/OneColStoryList/index.js +439 -2940
- package/rows/OneColStoryList/styles.arrow.css +1 -1
- package/rows/OpinionCollection/index.js +308 -2800
- package/rows/OpinionCollection/styles.arrow.css +1 -1
- package/rows/SixColSixStories/index.js +405 -2906
- package/rows/SixColSixStories/styles.arrow.css +1 -1
- package/rows/StoryCollection/index.js +432 -2987
- package/rows/StoryCollection/styles.arrow.css +1 -1
- package/rows/TagIntroductionCard/index.js +35 -1833
- package/rows/TagIntroductionCard/styles.arrow.css +1 -1
- package/rows/ThreeColFlexStories/index.js +421 -2922
- package/rows/ThreeColFlexStories/styles.arrow.css +1 -1
- package/rows/ThreeColFourteenStories/index.js +358 -2871
- package/rows/ThreeColFourteenStories/styles.arrow.css +1 -1
- package/rows/ThreeColGrid/index.js +428 -2929
- package/rows/ThreeColGrid/styles.arrow.css +1 -1
- package/rows/ThreeColSevenStory/index.js +406 -2926
- package/rows/ThreeColSevenStory/styles.arrow.css +1 -1
- package/rows/ThreeColSixStories/index.js +400 -2920
- package/rows/ThreeColSixStories/styles.arrow.css +1 -1
- package/rows/ThreeColTwelveStories/index.js +383 -2909
- package/rows/ThreeColTwelveStories/styles.arrow.css +1 -1
- package/rows/TwoColFourStories/index.js +395 -2915
- package/rows/TwoColFourStories/styles.arrow.css +1 -1
- package/rows/TwoColFourStoryHighlight/index.js +398 -2924
- package/rows/TwoColFourStoryHighlight/styles.arrow.css +1 -1
- package/rows/TwoColSevenStories/index.js +400 -2920
- package/rows/TwoColSevenStories/styles.arrow.css +1 -1
- package/rows/TwoColSixStories/index.js +398 -2924
- package/rows/TwoColSixStories/styles.arrow.css +1 -1
- package/rows/TwoColTenStoriesSidebar/index.js +418 -2938
- package/rows/TwoColTenStoriesSidebar/styles.arrow.css +1 -1
- package/rows/TwoColThreeStories/index.js +392 -2912
- package/rows/TwoColThreeStories/styles.arrow.css +1 -1
- package/story-elements/AlsoRead/index.js +92 -2229
- package/story-elements/AlsoRead/styles.arrow.css +1 -1
- package/story-elements/Attachment/index.js +53 -1899
- package/story-elements/Attachment/styles.arrow.css +1 -1
- package/story-elements/BigFact/index.js +49 -1895
- package/story-elements/BigFact/styles.arrow.css +1 -1
- package/story-elements/BlockQuote/index.js +79 -2206
- package/story-elements/BlockQuote/styles.arrow.css +1 -1
- package/story-elements/Blurb/index.js +52 -1957
- package/story-elements/Blurb/styles.arrow.css +1 -1
- package/story-elements/Image/index.js +147 -2329
- package/story-elements/Image/styles.arrow.css +1 -1
- package/story-elements/ImageGallery/index.js +135 -2317
- package/story-elements/ImageGallery/styles.arrow.css +1 -1
- package/story-elements/ImageSlideshow/index.js +173 -2355
- package/story-elements/ImageSlideshow/styles.arrow.css +1 -1
- package/story-elements/QuestionAnswer/index.js +79 -2207
- package/story-elements/QuestionAnswer/styles.arrow.css +1 -1
- package/story-elements/Quote/index.js +52 -1898
- package/story-elements/Quote/styles.arrow.css +1 -1
- package/story-elements/Reference/index.js +53 -1899
- package/story-elements/Reference/styles.arrow.css +1 -1
- package/story-elements/StoryElement/index.js +34 -1738
- package/story-elements/Summary/index.js +56 -1902
- package/story-elements/Summary/styles.arrow.css +1 -1
- package/story-elements/Text/index.js +48 -2176
- package/story-elements/Text/styles.arrow.css +1 -1
- package/story-elements/Video/index.js +35 -1739
- package/story-elements/Video/styles.arrow.css +1 -1
- package/story-templates/ListicleStoryTemplate/index.js +1182 -4038
- package/story-templates/ListicleStoryTemplate/styles.arrow.css +1 -1
- package/story-templates/LiveBlogStoryTemplate/index.js +1377 -4233
- package/story-templates/LiveBlogStoryTemplate/styles.arrow.css +1 -1
- package/story-templates/PhotoStoryTemplate/index.js +1162 -4018
- package/story-templates/PhotoStoryTemplate/styles.arrow.css +1 -1
- package/story-templates/TextStoryTemplate/index.js +1277 -4133
- package/story-templates/TextStoryTemplate/styles.arrow.css +1 -1
- package/story-templates/VideoStoryTemplate/index.js +1231 -4087
- package/story-templates/VideoStoryTemplate/styles.arrow.css +1 -1
- package/atoms/ExtendedLoadMore/index-e39b3ca8.js +0 -3023
- package/atoms/ExtendedLoadMore/index-f6e578e3.js +0 -86
|
@@ -0,0 +1,95 @@
|
|
|
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,18 +1,31 @@
|
|
|
1
|
-
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import PropTypes from 'prop-types';
|
|
4
|
-
import { useDispatch, useSelector } from 'react-redux';
|
|
5
|
-
import { H as HeroImage } from './index-6cb56d1a.js';
|
|
6
|
-
import { C as CollectionName, S as StateProvider, L as LoadMoreTarget, P as ProgressiveHydration, a as LoadmoreButton } from './index-aa8b8ab8.js';
|
|
7
|
-
import { collectionToStories } from '@quintype/components';
|
|
8
|
-
import { S as StorycardContent } from './index-f6e578e3.js';
|
|
9
|
-
import 'react-timeago';
|
|
10
|
-
import 'date-fns-tz';
|
|
11
|
-
import 'react-dom';
|
|
1
|
+
'use strict';
|
|
12
2
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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);
|
|
16
29
|
|
|
17
30
|
var loadMore = function loadMore(_ref) {
|
|
18
31
|
var isLoading = _ref.isLoading,
|
|
@@ -34,7 +47,7 @@ var FourColFiveStoriesBase = function FourColFiveStoriesBase(_ref2) {
|
|
|
34
47
|
isLoading = _ref2.isLoading,
|
|
35
48
|
isolatedLoadMore = _ref2.isolatedLoadMore,
|
|
36
49
|
hideFirstCard = _ref2.hideFirstCard;
|
|
37
|
-
var stories = collectionToStories(collection);
|
|
50
|
+
var stories = components.collectionToStories(collection);
|
|
38
51
|
if (!stories.length) return null;
|
|
39
52
|
var _config$collectionNam = config.collectionNameBorderColor,
|
|
40
53
|
collectionNameBorderColor = _config$collectionNam === void 0 ? "" : _config$collectionNam,
|
|
@@ -51,30 +64,30 @@ var FourColFiveStoriesBase = function FourColFiveStoriesBase(_ref2) {
|
|
|
51
64
|
_config$subsequentLoa = config.subsequentLoadCount,
|
|
52
65
|
subsequentLoadCount = _config$subsequentLoa === void 0 ? 4 : _config$subsequentLoa;
|
|
53
66
|
|
|
54
|
-
var _get =
|
|
67
|
+
var _get = lodash.get(slotConfig, [0], {}),
|
|
55
68
|
_get$type = _get.type,
|
|
56
69
|
type = _get$type === void 0 ? "story" : _get$type,
|
|
57
70
|
component = _get.component;
|
|
58
71
|
|
|
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
|
|
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"], {});
|
|
65
78
|
});
|
|
66
79
|
|
|
67
80
|
var _ref3 = stories || [],
|
|
68
|
-
_ref4 =
|
|
81
|
+
_ref4 = _toArray__default["default"](_ref3),
|
|
69
82
|
firstStory = _ref4[0],
|
|
70
83
|
otherStories = _ref4.slice(1);
|
|
71
84
|
|
|
72
85
|
var storyCard = function storyCard(story) {
|
|
73
|
-
return /*#__PURE__*/
|
|
86
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(index$2.HeroImage, {
|
|
74
87
|
config: config,
|
|
75
88
|
story: story,
|
|
76
89
|
aspectRatio: [[16, 9]]
|
|
77
|
-
}), /*#__PURE__*/
|
|
90
|
+
}), /*#__PURE__*/React__default["default"].createElement(index$3.StorycardContent, {
|
|
78
91
|
theme: theme,
|
|
79
92
|
story: story,
|
|
80
93
|
config: config,
|
|
@@ -84,10 +97,10 @@ var FourColFiveStoriesBase = function FourColFiveStoriesBase(_ref2) {
|
|
|
84
97
|
};
|
|
85
98
|
|
|
86
99
|
var otherCards = function otherCards(story, index) {
|
|
87
|
-
return /*#__PURE__*/
|
|
100
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
88
101
|
className: "four-col-five-stories-m_card__2lzhH",
|
|
89
102
|
"data-test-id": "story-card",
|
|
90
|
-
key: "four-col-five-story-".concat(index, "-").concat(
|
|
103
|
+
key: "four-col-five-story-".concat(index, "-").concat(lodash.get(story, ["id"], "0"))
|
|
91
104
|
}, storyCard(story));
|
|
92
105
|
};
|
|
93
106
|
|
|
@@ -95,7 +108,7 @@ var FourColFiveStoriesBase = function FourColFiveStoriesBase(_ref2) {
|
|
|
95
108
|
if (!isLoadMoreVisible) return null;
|
|
96
109
|
|
|
97
110
|
if (isolatedLoadMore) {
|
|
98
|
-
return /*#__PURE__*/
|
|
111
|
+
return /*#__PURE__*/React__default["default"].createElement(index$1.LoadMoreTarget, {
|
|
99
112
|
collection: collection,
|
|
100
113
|
componentName: "FourColFiveStories",
|
|
101
114
|
offset: stories.length,
|
|
@@ -103,8 +116,8 @@ var FourColFiveStoriesBase = function FourColFiveStoriesBase(_ref2) {
|
|
|
103
116
|
});
|
|
104
117
|
}
|
|
105
118
|
|
|
106
|
-
var url = generateNavigateSlug(collection, qtConfig);
|
|
107
|
-
return /*#__PURE__*/
|
|
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, {
|
|
108
121
|
config: config,
|
|
109
122
|
collection: collection,
|
|
110
123
|
template: footerButton,
|
|
@@ -112,33 +125,33 @@ var FourColFiveStoriesBase = function FourColFiveStoriesBase(_ref2) {
|
|
|
112
125
|
return loadMore(opts);
|
|
113
126
|
},
|
|
114
127
|
navigate: function navigate() {
|
|
115
|
-
return navigateTo(dispatch, url);
|
|
128
|
+
return index.navigateTo(dispatch, url);
|
|
116
129
|
},
|
|
117
130
|
qtConfig: qtConfig
|
|
118
131
|
}));
|
|
119
132
|
};
|
|
120
133
|
|
|
121
134
|
var renderStories = hideFirstCard ? stories : otherStories;
|
|
122
|
-
return /*#__PURE__*/
|
|
135
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
123
136
|
className: "full-width-with-padding arrow-component",
|
|
124
137
|
"data-test-id": "four-col-five-stories",
|
|
125
138
|
style: {
|
|
126
139
|
backgroundColor: theme,
|
|
127
140
|
color: textColor
|
|
128
141
|
}
|
|
129
|
-
}, /*#__PURE__*/
|
|
142
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
130
143
|
className: "four-col-five-stories-m_four-col-five-stories__16ja_"
|
|
131
|
-
}, /*#__PURE__*/
|
|
144
|
+
}, /*#__PURE__*/React__default["default"].createElement(index$1.CollectionName, {
|
|
132
145
|
collection: collection,
|
|
133
146
|
collectionNameTemplate: collectionNameTemplate,
|
|
134
147
|
collectionNameBorderColor: collectionNameBorderColor,
|
|
135
148
|
headerLevel: 2
|
|
136
|
-
}), /*#__PURE__*/
|
|
149
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
137
150
|
className: "four-col-five-stories-m_wrapper__31KAU"
|
|
138
|
-
}, !hideFirstCard && /*#__PURE__*/
|
|
151
|
+
}, !hideFirstCard && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
139
152
|
className: "first-card four-col-five-stories-m_first-card__3dXVH",
|
|
140
153
|
"data-test-id": "story-card"
|
|
141
|
-
}, storyCard(firstStory)), /*#__PURE__*/
|
|
154
|
+
}, storyCard(firstStory)), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
142
155
|
className: "other-cards four-col-five-stories-m_other-cards__1P4k5"
|
|
143
156
|
}, renderStories.slice(0, 3).map(function (story, index) {
|
|
144
157
|
return otherCards(story, index);
|
|
@@ -152,21 +165,21 @@ var FourColFiveStoriesBase = function FourColFiveStoriesBase(_ref2) {
|
|
|
152
165
|
})));
|
|
153
166
|
};
|
|
154
167
|
FourColFiveStoriesBase.propTypes = {
|
|
155
|
-
collection:
|
|
156
|
-
config:
|
|
157
|
-
collectionNameBorderColor:
|
|
158
|
-
theme:
|
|
159
|
-
slotConfig:
|
|
160
|
-
collectionNameTemplate:
|
|
161
|
-
footerButton:
|
|
162
|
-
borderColor:
|
|
163
|
-
subsequentLoadCount:
|
|
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
|
|
164
177
|
}),
|
|
165
|
-
getMoreStories:
|
|
166
|
-
isLoading:
|
|
167
|
-
hideFirstCard:
|
|
168
|
-
isLoadMoreVisible:
|
|
169
|
-
isolatedLoadMore:
|
|
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
|
|
170
183
|
};
|
|
171
184
|
FourColFiveStoriesBase.defaultProps = {
|
|
172
185
|
getMoreStories: function getMoreStories() {},
|
|
@@ -176,6 +189,7 @@ FourColFiveStoriesBase.defaultProps = {
|
|
|
176
189
|
config: {},
|
|
177
190
|
hideFirstCard: false
|
|
178
191
|
};
|
|
179
|
-
var FourColFiveStories = StateProvider(FourColFiveStoriesBase);
|
|
192
|
+
var FourColFiveStories = index$1.StateProvider(FourColFiveStoriesBase);
|
|
180
193
|
|
|
181
|
-
|
|
194
|
+
exports.FourColFiveStories = FourColFiveStories;
|
|
195
|
+
exports.FourColFiveStoriesBase = FourColFiveStoriesBase;
|
|
@@ -1,15 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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);
|
|
13
28
|
|
|
14
29
|
var loadMore = function loadMore(_ref) {
|
|
15
30
|
var isLoading = _ref.isLoading,
|
|
@@ -31,7 +46,7 @@ var OneColStoryListBase = function OneColStoryListBase(_ref2) {
|
|
|
31
46
|
isLoadMoreVisible = _ref2.isLoadMoreVisible,
|
|
32
47
|
isLoading = _ref2.isLoading,
|
|
33
48
|
isolatedLoadMore = _ref2.isolatedLoadMore;
|
|
34
|
-
var storyItems = collectionToStories(collection);
|
|
49
|
+
var storyItems = components.collectionToStories(collection);
|
|
35
50
|
if (!storyItems.length) return null;
|
|
36
51
|
var _config$collectionNam = config.collectionNameBorderColor,
|
|
37
52
|
collectionNameBorderColor = _config$collectionNam === void 0 ? "" : _config$collectionNam,
|
|
@@ -55,20 +70,20 @@ var OneColStoryListBase = function OneColStoryListBase(_ref2) {
|
|
|
55
70
|
subsequentLoadCount = _config$subsequentLoa === void 0 ? 8 : _config$subsequentLoa;
|
|
56
71
|
var footerSlot = footerSlotConfig.footerSlot;
|
|
57
72
|
|
|
58
|
-
var _get =
|
|
73
|
+
var _get = lodash.get(slotConfig, [0], {}),
|
|
59
74
|
type = _get.type,
|
|
60
75
|
component = _get.component;
|
|
61
76
|
|
|
62
|
-
var dispatch = useDispatch();
|
|
63
|
-
var qtConfig = useSelector(function (state) {
|
|
64
|
-
return
|
|
77
|
+
var dispatch = reactRedux.useDispatch();
|
|
78
|
+
var qtConfig = reactRedux.useSelector(function (state) {
|
|
79
|
+
return lodash.get(state, ["qt", "config"], {});
|
|
65
80
|
});
|
|
66
81
|
|
|
67
82
|
var getLoadMore = function getLoadMore(opts) {
|
|
68
83
|
if (!isLoadMoreVisible) return null;
|
|
69
84
|
|
|
70
85
|
if (isolatedLoadMore) {
|
|
71
|
-
return /*#__PURE__*/
|
|
86
|
+
return /*#__PURE__*/React__default["default"].createElement(index$1.LoadMoreTarget, {
|
|
72
87
|
collection: collection,
|
|
73
88
|
componentName: "OneColStoryList",
|
|
74
89
|
offset: storyItems.length,
|
|
@@ -76,8 +91,8 @@ var OneColStoryListBase = function OneColStoryListBase(_ref2) {
|
|
|
76
91
|
});
|
|
77
92
|
}
|
|
78
93
|
|
|
79
|
-
var url = generateNavigateSlug(collection, qtConfig);
|
|
80
|
-
return /*#__PURE__*/
|
|
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, {
|
|
81
96
|
config: config,
|
|
82
97
|
collection: collection,
|
|
83
98
|
template: footerButton,
|
|
@@ -85,7 +100,7 @@ var OneColStoryListBase = function OneColStoryListBase(_ref2) {
|
|
|
85
100
|
return loadMore(opts);
|
|
86
101
|
},
|
|
87
102
|
navigate: function navigate() {
|
|
88
|
-
return navigateTo(dispatch, url);
|
|
103
|
+
return index.navigateTo(dispatch, url);
|
|
89
104
|
},
|
|
90
105
|
qtConfig: qtConfig
|
|
91
106
|
}));
|
|
@@ -96,9 +111,9 @@ var OneColStoryListBase = function OneColStoryListBase(_ref2) {
|
|
|
96
111
|
var borderHandler = function borderHandler(story) {
|
|
97
112
|
switch (border) {
|
|
98
113
|
case "bottom":
|
|
99
|
-
return /*#__PURE__*/
|
|
114
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
100
115
|
className: "one-col-story-list-m_one-col-border-bottom__13nPb"
|
|
101
|
-
}, /*#__PURE__*/
|
|
116
|
+
}, /*#__PURE__*/React__default["default"].createElement(index$2.StoryCard, {
|
|
102
117
|
story: story,
|
|
103
118
|
theme: theme,
|
|
104
119
|
headerLevel: "4",
|
|
@@ -111,42 +126,42 @@ var OneColStoryListBase = function OneColStoryListBase(_ref2) {
|
|
|
111
126
|
}));
|
|
112
127
|
|
|
113
128
|
case "full":
|
|
114
|
-
return /*#__PURE__*/
|
|
129
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
115
130
|
className: "one-col-story-list-m_one-col-border-full__3PSl0"
|
|
116
|
-
}, /*#__PURE__*/
|
|
131
|
+
}, /*#__PURE__*/React__default["default"].createElement(index$2.StoryCard, {
|
|
117
132
|
story: story,
|
|
118
133
|
border: border,
|
|
119
134
|
theme: theme,
|
|
120
135
|
isHorizontal: true,
|
|
121
136
|
borderColor: borderColor
|
|
122
|
-
}, /*#__PURE__*/
|
|
137
|
+
}, /*#__PURE__*/React__default["default"].createElement(index$3.HeroImage, {
|
|
123
138
|
story: story,
|
|
124
139
|
isHorizontal: true,
|
|
125
140
|
aspectRatio: [[1, 1], [4, 3]]
|
|
126
|
-
}), /*#__PURE__*/
|
|
141
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
127
142
|
className: "one-col-story-list-m_story-card-content-wrapper__1baqS"
|
|
128
|
-
}, /*#__PURE__*/
|
|
143
|
+
}, /*#__PURE__*/React__default["default"].createElement(index$4.StorycardContent, {
|
|
129
144
|
story: story,
|
|
130
145
|
borderColor: borderColor,
|
|
131
146
|
config: config
|
|
132
|
-
}, /*#__PURE__*/
|
|
147
|
+
}, /*#__PURE__*/React__default["default"].createElement(index$3.SectionTag, {
|
|
133
148
|
story: story
|
|
134
|
-
}), /*#__PURE__*/
|
|
149
|
+
}), /*#__PURE__*/React__default["default"].createElement(index$1.Headline, {
|
|
135
150
|
story: story,
|
|
136
151
|
headerLevel: "4",
|
|
137
152
|
premiumStoryIconConfig: config
|
|
138
|
-
}), /*#__PURE__*/
|
|
153
|
+
}), /*#__PURE__*/React__default["default"].createElement(index$2.Subheadline, {
|
|
139
154
|
story: story
|
|
140
|
-
}), /*#__PURE__*/
|
|
155
|
+
}), /*#__PURE__*/React__default["default"].createElement(index$1.AuthorWithTime, {
|
|
141
156
|
config: localizationConfig,
|
|
142
157
|
story: story,
|
|
143
158
|
prefix: "By"
|
|
144
159
|
})))));
|
|
145
160
|
|
|
146
161
|
default:
|
|
147
|
-
return /*#__PURE__*/
|
|
162
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
148
163
|
className: "one-col-story-list-m_one-col-border-default__2BDg7"
|
|
149
|
-
}, /*#__PURE__*/
|
|
164
|
+
}, /*#__PURE__*/React__default["default"].createElement(index$2.StoryCard, {
|
|
150
165
|
story: story,
|
|
151
166
|
theme: theme,
|
|
152
167
|
headerLevel: "4",
|
|
@@ -160,81 +175,82 @@ var OneColStoryListBase = function OneColStoryListBase(_ref2) {
|
|
|
160
175
|
}
|
|
161
176
|
};
|
|
162
177
|
|
|
163
|
-
var textColor = getTextColor(theme);
|
|
164
|
-
return /*#__PURE__*/
|
|
178
|
+
var textColor = index.getTextColor(theme);
|
|
179
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
165
180
|
className: "full-width-with-padding arrow-component",
|
|
166
181
|
"data-test-id": "one-col-story-list",
|
|
167
182
|
style: {
|
|
168
183
|
backgroundColor: theme,
|
|
169
184
|
color: textColor
|
|
170
185
|
}
|
|
171
|
-
}, /*#__PURE__*/
|
|
186
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
172
187
|
className: "one-col-story-list-m_one-col-story-list-wrapper__ICvTq"
|
|
173
|
-
}, /*#__PURE__*/
|
|
188
|
+
}, /*#__PURE__*/React__default["default"].createElement(index$1.CollectionName, {
|
|
174
189
|
collection: collection,
|
|
175
190
|
collectionNameTemplate: collectionNameTemplate,
|
|
176
191
|
collectionNameBorderColor: collectionNameBorderColor
|
|
177
|
-
}), /*#__PURE__*/
|
|
192
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
178
193
|
className: "one-col-story-list-m_wrapper__38qTp",
|
|
179
194
|
style: {
|
|
180
195
|
backgroundColor: theme,
|
|
181
196
|
color: textColor
|
|
182
197
|
}
|
|
183
|
-
}, /*#__PURE__*/
|
|
198
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
184
199
|
className: "one-col-story-list-m_one-col-first-story__1aC6i"
|
|
185
200
|
}, storyItems.slice(0, 1).map(function (story, index) {
|
|
186
|
-
return /*#__PURE__*/
|
|
201
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
187
202
|
key: "default-".concat(index)
|
|
188
203
|
}, borderHandler(story));
|
|
189
|
-
})), /*#__PURE__*/
|
|
204
|
+
})), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
190
205
|
className: "one-col-story-list-m_one-col-story-list__3d6Bp"
|
|
191
206
|
}, storyItems.slice(1).map(function (story, index) {
|
|
192
|
-
return /*#__PURE__*/
|
|
207
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
193
208
|
key: "default-".concat(index)
|
|
194
209
|
}, borderHandler(story));
|
|
195
|
-
})), /*#__PURE__*/
|
|
210
|
+
})), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
196
211
|
className: "one-col-story-list-m_one-col-ads__UN_hF"
|
|
197
|
-
}, getSlot(type, component, function () {
|
|
212
|
+
}, index.getSlot(type, component, function () {
|
|
198
213
|
return null;
|
|
199
214
|
}, function () {
|
|
200
215
|
return null;
|
|
201
|
-
}))), /*#__PURE__*/
|
|
216
|
+
}))), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
202
217
|
className: "one-col-story-list-m_footer-ad-wrapper__NGgvp"
|
|
203
218
|
}, getLoadMore({
|
|
204
219
|
isLoading: isLoading,
|
|
205
220
|
storyItems: storyItems,
|
|
206
221
|
getMoreStories: getMoreStories,
|
|
207
222
|
subsequentLoadCount: subsequentLoadCount
|
|
208
|
-
}), /*#__PURE__*/
|
|
223
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
209
224
|
className: "one-col-story-list-m_ad-wrapper__3_cNc"
|
|
210
225
|
}, footerSlotComp))));
|
|
211
226
|
};
|
|
212
227
|
OneColStoryListBase.propTypes = {
|
|
213
228
|
/** collection is the array of objects which is returning by API */
|
|
214
|
-
collection:
|
|
229
|
+
collection: PropTypes__default["default"].object.isRequired,
|
|
215
230
|
|
|
216
231
|
/** The config for the Row */
|
|
217
|
-
config:
|
|
218
|
-
borderColor:
|
|
219
|
-
theme:
|
|
220
|
-
border:
|
|
221
|
-
footerButton:
|
|
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,
|
|
222
237
|
// row title style
|
|
223
|
-
collectionNameTemplate:
|
|
238
|
+
collectionNameTemplate: PropTypes__default["default"].string,
|
|
224
239
|
// row title style colour
|
|
225
|
-
collectionNameBorderColor:
|
|
226
|
-
subsequentLoadCount:
|
|
240
|
+
collectionNameBorderColor: PropTypes__default["default"].string,
|
|
241
|
+
subsequentLoadCount: PropTypes__default["default"].number
|
|
227
242
|
}),
|
|
228
|
-
getMoreStories:
|
|
229
|
-
isLoadMoreVisible:
|
|
230
|
-
isLoading:
|
|
231
|
-
isolatedLoadMore:
|
|
243
|
+
getMoreStories: PropTypes__default["default"].func,
|
|
244
|
+
isLoadMoreVisible: PropTypes__default["default"].bool,
|
|
245
|
+
isLoading: PropTypes__default["default"].bool,
|
|
246
|
+
isolatedLoadMore: PropTypes__default["default"].bool
|
|
232
247
|
};
|
|
233
248
|
OneColStoryListBase.defaultProps = {
|
|
234
249
|
getMoreStories: function getMoreStories() {},
|
|
235
250
|
isLoadMoreVisible: true,
|
|
236
251
|
isLoading: false
|
|
237
252
|
};
|
|
238
|
-
var OneColStoryList = StateProvider(OneColStoryListBase);
|
|
253
|
+
var OneColStoryList = index$1.StateProvider(OneColStoryListBase);
|
|
239
254
|
|
|
240
|
-
|
|
255
|
+
exports.OneColStoryList = OneColStoryList;
|
|
256
|
+
exports.OneColStoryListBase = OneColStoryListBase;
|