@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,10 +1,39 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var components = require('@quintype/components');
|
|
6
|
+
var PropTypes = require('prop-types');
|
|
7
|
+
var React = require('react');
|
|
8
|
+
var reactRedux = require('react-redux');
|
|
9
|
+
var ReactDOM = require('react-dom');
|
|
10
|
+
var Timeago = require('react-timeago');
|
|
11
|
+
var dateFnsTz = require('date-fns-tz');
|
|
12
|
+
|
|
13
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
14
|
+
|
|
15
|
+
function _interopNamespace(e) {
|
|
16
|
+
if (e && e.__esModule) return e;
|
|
17
|
+
var n = Object.create(null);
|
|
18
|
+
if (e) {
|
|
19
|
+
Object.keys(e).forEach(function (k) {
|
|
20
|
+
if (k !== 'default') {
|
|
21
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
22
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
23
|
+
enumerable: true,
|
|
24
|
+
get: function () { return e[k]; }
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
n["default"] = e;
|
|
30
|
+
return Object.freeze(n);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
34
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
35
|
+
var ReactDOM__default = /*#__PURE__*/_interopDefaultLegacy(ReactDOM);
|
|
36
|
+
var Timeago__default = /*#__PURE__*/_interopDefaultLegacy(Timeago);
|
|
8
37
|
|
|
9
38
|
/**
|
|
10
39
|
* Checks if `value` is classified as an `Array` object.
|
|
@@ -1275,7 +1304,7 @@ var hasIntersectionObserverSupport = function hasIntersectionObserverSupport() {
|
|
|
1275
1304
|
|
|
1276
1305
|
|
|
1277
1306
|
var getIntersectionObserver = function getIntersectionObserver() {
|
|
1278
|
-
return Promise.resolve(isClient && !hasIntersectionObserverSupport() &&
|
|
1307
|
+
return Promise.resolve(isClient && !hasIntersectionObserverSupport() && Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('intersection-observer')); }));
|
|
1279
1308
|
}; // options for intersection observer in order to improve the effect
|
|
1280
1309
|
|
|
1281
1310
|
|
|
@@ -1308,12 +1337,12 @@ var getObserver = function getObserver() {
|
|
|
1308
1337
|
var useNearScreen = (function (_ref) {
|
|
1309
1338
|
var ref = _ref.ref;
|
|
1310
1339
|
|
|
1311
|
-
var _useState = useState(false),
|
|
1340
|
+
var _useState = React.useState(false),
|
|
1312
1341
|
_useState2 = _slicedToArray(_useState, 2),
|
|
1313
1342
|
show = _useState2[0],
|
|
1314
1343
|
setShow = _useState2[1];
|
|
1315
1344
|
|
|
1316
|
-
useEffect(function () {
|
|
1345
|
+
React.useEffect(function () {
|
|
1317
1346
|
var current = ref.current;
|
|
1318
1347
|
if (!current) return; // get observer async and only when needed
|
|
1319
1348
|
|
|
@@ -1340,36 +1369,36 @@ var EMPTY_HTML = {
|
|
|
1340
1369
|
var isServer = typeof window === "undefined";
|
|
1341
1370
|
var ProgressiveHydration = function ProgressiveHydration(props) {
|
|
1342
1371
|
var children = props.children;
|
|
1343
|
-
var ref = useRef(null);
|
|
1372
|
+
var ref = React.useRef(null);
|
|
1344
1373
|
var isNearScreen = useNearScreen({
|
|
1345
1374
|
ref: ref
|
|
1346
1375
|
});
|
|
1347
|
-
useEffect(function () {
|
|
1376
|
+
React.useEffect(function () {
|
|
1348
1377
|
var el = ref.current; // CLIENT:
|
|
1349
1378
|
// If we want to force the hydration OR the element is near screen
|
|
1350
1379
|
// then we hydrate the content to get the functionality ready
|
|
1351
1380
|
|
|
1352
1381
|
if (isNearScreen) {
|
|
1353
1382
|
var action = el.hasChildNodes() ? "hydrate" : "render";
|
|
1354
|
-
|
|
1383
|
+
ReactDOM__default["default"][action](children, el);
|
|
1355
1384
|
}
|
|
1356
1385
|
}, [children, isNearScreen]); // SERVER: Just render the content as usual
|
|
1357
1386
|
|
|
1358
1387
|
if (isServer) {
|
|
1359
|
-
return /*#__PURE__*/
|
|
1388
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1360
1389
|
ref: ref
|
|
1361
1390
|
}, children);
|
|
1362
1391
|
} // CLIENT: Avoid hydration until we say so
|
|
1363
1392
|
|
|
1364
1393
|
|
|
1365
|
-
return /*#__PURE__*/
|
|
1394
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1366
1395
|
ref: ref,
|
|
1367
1396
|
suppressHydrationWarning: true,
|
|
1368
1397
|
dangerouslySetInnerHTML: EMPTY_HTML
|
|
1369
1398
|
});
|
|
1370
1399
|
};
|
|
1371
1400
|
ProgressiveHydration.propTypes = {
|
|
1372
|
-
children:
|
|
1401
|
+
children: PropTypes__default["default"].element
|
|
1373
1402
|
};
|
|
1374
1403
|
|
|
1375
1404
|
function _typeof(obj) {
|
|
@@ -2698,15 +2727,15 @@ var isEmpty = function isEmpty(value) {
|
|
|
2698
2727
|
return value == null || // From standard.js: Always use === - but value == null is allowed to check null || undefined
|
|
2699
2728
|
_typeof(value) === "object" && Object.entries(value).length === 0 && value.constructor === Object || typeof value === "string" && value.trim().length === 0;
|
|
2700
2729
|
};
|
|
2701
|
-
|
|
2702
|
-
"sketches-host":
|
|
2703
|
-
"cdn-name":
|
|
2704
|
-
"cdn-image":
|
|
2730
|
+
PropTypes__default["default"].shape({
|
|
2731
|
+
"sketches-host": PropTypes__default["default"].string,
|
|
2732
|
+
"cdn-name": PropTypes__default["default"].string,
|
|
2733
|
+
"cdn-image": PropTypes__default["default"].string
|
|
2705
2734
|
});
|
|
2706
|
-
|
|
2707
|
-
headline:
|
|
2708
|
-
"last-published-at":
|
|
2709
|
-
subheadline:
|
|
2735
|
+
PropTypes__default["default"].shape({
|
|
2736
|
+
headline: PropTypes__default["default"].string,
|
|
2737
|
+
"last-published-at": PropTypes__default["default"].number,
|
|
2738
|
+
subheadline: PropTypes__default["default"].string
|
|
2710
2739
|
});
|
|
2711
2740
|
var getStoryUrl = function getStoryUrl(story) {
|
|
2712
2741
|
var defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
|
|
@@ -2750,17 +2779,17 @@ var getTimeStamp = function getTimeStamp(date, _formatter) {
|
|
|
2750
2779
|
var timezone = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;
|
|
2751
2780
|
|
|
2752
2781
|
if (timezone && template === "story") {
|
|
2753
|
-
var zonedTime = timezone && utcToZonedTime(date, timezone);
|
|
2754
|
-
var formatZonedTime = zonedTime && format(zonedTime, "yyyy-MM-dd'T'HH:mm:ssXXX", {
|
|
2782
|
+
var zonedTime = timezone && dateFnsTz.utcToZonedTime(date, timezone);
|
|
2783
|
+
var formatZonedTime = zonedTime && dateFnsTz.format(zonedTime, "yyyy-MM-dd'T'HH:mm:ssXXX", {
|
|
2755
2784
|
timeZone: timezone
|
|
2756
2785
|
});
|
|
2757
2786
|
var timeStamp = timestampToFormat("", "", "", date, config);
|
|
2758
|
-
return /*#__PURE__*/
|
|
2787
|
+
return /*#__PURE__*/React__default["default"].createElement("time", {
|
|
2759
2788
|
dateTime: formatZonedTime
|
|
2760
2789
|
}, timeStamp);
|
|
2761
2790
|
}
|
|
2762
2791
|
|
|
2763
|
-
return /*#__PURE__*/
|
|
2792
|
+
return /*#__PURE__*/React__default["default"].createElement(Timeago__default["default"], {
|
|
2764
2793
|
date: date,
|
|
2765
2794
|
formatter: function formatter(value, unit, suffix, date) {
|
|
2766
2795
|
return _formatter(value, unit, suffix, date, config);
|
|
@@ -2908,21 +2937,21 @@ exports["default"] = _default;
|
|
|
2908
2937
|
|
|
2909
2938
|
var _getClassName = /*@__PURE__*/getDefaultExportFromCjs(getClassName);
|
|
2910
2939
|
|
|
2911
|
-
var StateContext = /*#__PURE__*/createContext(); // eslint-disable-next-line react/display-name
|
|
2940
|
+
var StateContext = /*#__PURE__*/React.createContext(); // eslint-disable-next-line react/display-name
|
|
2912
2941
|
|
|
2913
2942
|
var StateProvider = function StateProvider(RowComponent) {
|
|
2914
2943
|
return function (props) {
|
|
2915
2944
|
return (
|
|
2916
2945
|
/*#__PURE__*/
|
|
2917
2946
|
// eslint-disable-next-line react/prop-types
|
|
2918
|
-
|
|
2947
|
+
React__default["default"].createElement(StateContext.Provider, {
|
|
2919
2948
|
value: props.config
|
|
2920
|
-
}, /*#__PURE__*/
|
|
2949
|
+
}, /*#__PURE__*/React__default["default"].createElement(RowComponent, props))
|
|
2921
2950
|
);
|
|
2922
2951
|
};
|
|
2923
2952
|
};
|
|
2924
2953
|
var useStateValue = function useStateValue() {
|
|
2925
|
-
return useContext(StateContext);
|
|
2954
|
+
return React.useContext(StateContext);
|
|
2926
2955
|
};
|
|
2927
2956
|
|
|
2928
2957
|
var _styleModuleImportMap$c = {
|
|
@@ -2944,18 +2973,18 @@ var TimeStamp = function TimeStamp(_ref) {
|
|
|
2944
2973
|
var time = story["last-published-at"] || story["first-published-at"];
|
|
2945
2974
|
var isBottomClasses = isBottom ? "bottom-fix" : "";
|
|
2946
2975
|
var textColor = getTextColor(configState.theme);
|
|
2947
|
-
return /*#__PURE__*/
|
|
2976
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isTime && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2948
2977
|
"data-test-id": "publish-time",
|
|
2949
2978
|
className: "time arr--publish-time " + _getClassName("time ".concat(textColor, " ").concat(isBottomClasses), _styleModuleImportMap$c)
|
|
2950
|
-
}, /*#__PURE__*/
|
|
2979
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2951
2980
|
className: "timestamp-m_time-wrapper__3O2lM"
|
|
2952
2981
|
}, getTimeStamp(time, formatter, config))));
|
|
2953
2982
|
};
|
|
2954
2983
|
TimeStamp.propTypes = {
|
|
2955
2984
|
/** The Story Object from the API response */
|
|
2956
|
-
story:
|
|
2957
|
-
isBottom:
|
|
2958
|
-
config:
|
|
2985
|
+
story: PropTypes__default["default"].object,
|
|
2986
|
+
isBottom: PropTypes__default["default"].bool,
|
|
2987
|
+
config: PropTypes__default["default"].object
|
|
2959
2988
|
};
|
|
2960
2989
|
|
|
2961
2990
|
var _styleModuleImportMap$b = {
|
|
@@ -2998,10 +3027,10 @@ var AuthorBase = function AuthorBase(_ref) {
|
|
|
2998
3027
|
return null;
|
|
2999
3028
|
}
|
|
3000
3029
|
|
|
3001
|
-
return /*#__PURE__*/
|
|
3030
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3002
3031
|
"data-test-id": "author-image",
|
|
3003
3032
|
className: _getClassName("author-image ".concat(dir, "-image"), _styleModuleImportMap$b)
|
|
3004
|
-
}, /*#__PURE__*/
|
|
3033
|
+
}, /*#__PURE__*/React__default["default"].createElement("figure", null, avatarS3Key ? /*#__PURE__*/React__default["default"].createElement(components.ResponsiveImage, {
|
|
3005
3034
|
slug: avatarS3Key,
|
|
3006
3035
|
"aspect-ratio": [1, 1],
|
|
3007
3036
|
defaultWidth: 400,
|
|
@@ -3009,14 +3038,14 @@ var AuthorBase = function AuthorBase(_ref) {
|
|
|
3009
3038
|
auto: ["format", "compress"]
|
|
3010
3039
|
},
|
|
3011
3040
|
alt: authorName
|
|
3012
|
-
}) : /*#__PURE__*/
|
|
3041
|
+
}) : /*#__PURE__*/React__default["default"].createElement("img", {
|
|
3013
3042
|
src: avatarUrl
|
|
3014
3043
|
})));
|
|
3015
3044
|
};
|
|
3016
3045
|
|
|
3017
3046
|
var isPrefix = function isPrefix(dir) {
|
|
3018
3047
|
if (prefix) {
|
|
3019
|
-
return /*#__PURE__*/
|
|
3048
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3020
3049
|
className: "arr-author-prefix " + _getClassName("prefix ".concat(textColor), _styleModuleImportMap$b)
|
|
3021
3050
|
}, prefix);
|
|
3022
3051
|
}
|
|
@@ -3024,11 +3053,11 @@ var AuthorBase = function AuthorBase(_ref) {
|
|
|
3024
3053
|
return !hideAuthorImage && authorImage(dir);
|
|
3025
3054
|
};
|
|
3026
3055
|
|
|
3027
|
-
return /*#__PURE__*/
|
|
3056
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isAuthor && /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
3028
3057
|
href: "".concat(mountAt, "/author/") + slug,
|
|
3029
3058
|
"aria-label": "author-name",
|
|
3030
3059
|
className: "author-name arr-author-name arrow-component " + _getClassName("author ".concat(isBottomClasses), _styleModuleImportMap$b)
|
|
3031
|
-
}, isPrefix("ltr"), /*#__PURE__*/
|
|
3060
|
+
}, isPrefix("ltr"), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3032
3061
|
"data-test-id": "author-name",
|
|
3033
3062
|
className: "author-name " + _getClassName("author-name ".concat(textColor), _styleModuleImportMap$b)
|
|
3034
3063
|
}, authorName || story["author-name"]), !prefix && isPrefix("rtl")));
|
|
@@ -3040,18 +3069,18 @@ function mapStateToProps$1(state) {
|
|
|
3040
3069
|
};
|
|
3041
3070
|
}
|
|
3042
3071
|
|
|
3043
|
-
var Author = connect(mapStateToProps$1)(AuthorBase);
|
|
3072
|
+
var Author = reactRedux.connect(mapStateToProps$1)(AuthorBase);
|
|
3044
3073
|
AuthorBase.propTypes = {
|
|
3045
3074
|
/** The Story Object from the API response */
|
|
3046
|
-
story:
|
|
3075
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
3047
3076
|
|
|
3048
3077
|
/** Hide Author Avatar Image */
|
|
3049
|
-
hideAuthorImage:
|
|
3078
|
+
hideAuthorImage: PropTypes__default["default"].bool,
|
|
3050
3079
|
// fix Author bottom of the storyCard
|
|
3051
|
-
isBottom:
|
|
3080
|
+
isBottom: PropTypes__default["default"].bool,
|
|
3052
3081
|
// fix prefix before the author name
|
|
3053
|
-
prefix:
|
|
3054
|
-
config:
|
|
3082
|
+
prefix: PropTypes__default["default"].string,
|
|
3083
|
+
config: PropTypes__default["default"].object
|
|
3055
3084
|
};
|
|
3056
3085
|
AuthorBase.defaultProps = {
|
|
3057
3086
|
hideAuthorImage: false,
|
|
@@ -3072,14 +3101,14 @@ var Dot = function Dot(_ref) {
|
|
|
3072
3101
|
height = _ref$height === void 0 ? "3px" : _ref$height,
|
|
3073
3102
|
_ref$color = _ref.color,
|
|
3074
3103
|
color = _ref$color === void 0 ? "light" : _ref$color;
|
|
3075
|
-
return /*#__PURE__*/
|
|
3104
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3076
3105
|
className: _getClassName(color, _styleModuleImportMap$a)
|
|
3077
|
-
}, /*#__PURE__*/
|
|
3106
|
+
}, /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3078
3107
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3079
3108
|
width: width,
|
|
3080
3109
|
height: height,
|
|
3081
3110
|
viewBox: "0 0 3 3"
|
|
3082
|
-
}, /*#__PURE__*/
|
|
3111
|
+
}, /*#__PURE__*/React__default["default"].createElement("circle", {
|
|
3083
3112
|
cx: "87",
|
|
3084
3113
|
cy: "9",
|
|
3085
3114
|
r: "1",
|
|
@@ -3090,9 +3119,9 @@ var Dot = function Dot(_ref) {
|
|
|
3090
3119
|
};
|
|
3091
3120
|
Dot.propTypes = {
|
|
3092
3121
|
/** height , width and color of the dot icon */
|
|
3093
|
-
color:
|
|
3094
|
-
width:
|
|
3095
|
-
height:
|
|
3122
|
+
color: PropTypes__default["default"].string,
|
|
3123
|
+
width: PropTypes__default["default"].string,
|
|
3124
|
+
height: PropTypes__default["default"].string
|
|
3096
3125
|
};
|
|
3097
3126
|
|
|
3098
3127
|
var _styleModuleImportMap$9 = {
|
|
@@ -3108,22 +3137,22 @@ var Divider = function Divider(_ref) {
|
|
|
3108
3137
|
height = _ref$height === void 0 ? "10" : _ref$height,
|
|
3109
3138
|
_ref$color = _ref.color,
|
|
3110
3139
|
color = _ref$color === void 0 ? "light" : _ref$color;
|
|
3111
|
-
return /*#__PURE__*/
|
|
3140
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3112
3141
|
className: _getClassName(color, _styleModuleImportMap$9)
|
|
3113
|
-
}, /*#__PURE__*/
|
|
3142
|
+
}, /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3114
3143
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3115
3144
|
width: width,
|
|
3116
3145
|
height: height
|
|
3117
|
-
}, /*#__PURE__*/
|
|
3146
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3118
3147
|
fill: "inherit",
|
|
3119
3148
|
d: "M0 0h1v10H0z"
|
|
3120
3149
|
})));
|
|
3121
3150
|
};
|
|
3122
3151
|
Divider.propTypes = {
|
|
3123
3152
|
/** height , width and color of the dot icon */
|
|
3124
|
-
color:
|
|
3125
|
-
width:
|
|
3126
|
-
height:
|
|
3153
|
+
color: PropTypes__default["default"].string,
|
|
3154
|
+
width: PropTypes__default["default"].string,
|
|
3155
|
+
height: PropTypes__default["default"].string
|
|
3127
3156
|
};
|
|
3128
3157
|
|
|
3129
3158
|
var _styleModuleImportMap$8 = {
|
|
@@ -3146,23 +3175,23 @@ var ReadTime = function ReadTime(_ref) {
|
|
|
3146
3175
|
var textColor = isLightTheme ? "light" : getTextColor(config.theme);
|
|
3147
3176
|
if (!showReadTime || !readTime) return null;
|
|
3148
3177
|
var timeToRead = get_1(opts, ["localizedTimeToRead"]) || "min read";
|
|
3149
|
-
return /*#__PURE__*/
|
|
3178
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3150
3179
|
"data-test-id": "read-time",
|
|
3151
3180
|
className: "arrow-component arr--read-time " + _getClassName("read-time-wrapper ".concat(textColor), _styleModuleImportMap$8)
|
|
3152
|
-
}, /*#__PURE__*/
|
|
3181
|
+
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
3153
3182
|
className: "read-time-indicator read-time-m_dot-indicator__3Sqh2"
|
|
3154
|
-
}, /*#__PURE__*/
|
|
3183
|
+
}, /*#__PURE__*/React__default["default"].createElement(Dot, {
|
|
3155
3184
|
color: textColor
|
|
3156
|
-
})), /*#__PURE__*/
|
|
3185
|
+
})), /*#__PURE__*/React__default["default"].createElement("span", null, readTime, " ", timeToRead)));
|
|
3157
3186
|
};
|
|
3158
3187
|
ReadTime.propTypes = {
|
|
3159
|
-
story:
|
|
3160
|
-
"read-time":
|
|
3188
|
+
story: PropTypes__default["default"].shape({
|
|
3189
|
+
"read-time": PropTypes__default["default"].number
|
|
3161
3190
|
}),
|
|
3162
|
-
opts:
|
|
3163
|
-
showReadTime:
|
|
3191
|
+
opts: PropTypes__default["default"].shape({
|
|
3192
|
+
showReadTime: PropTypes__default["default"].bool
|
|
3164
3193
|
}),
|
|
3165
|
-
isLightTheme:
|
|
3194
|
+
isLightTheme: PropTypes__default["default"].bool
|
|
3166
3195
|
};
|
|
3167
3196
|
|
|
3168
3197
|
var _styleModuleImportMap$7 = {
|
|
@@ -3193,33 +3222,33 @@ var AuthorWithTime = function AuthorWithTime(_ref) {
|
|
|
3193
3222
|
|
|
3194
3223
|
var getSeparator = function getSeparator() {
|
|
3195
3224
|
if (separator === "divider") {
|
|
3196
|
-
return /*#__PURE__*/
|
|
3225
|
+
return /*#__PURE__*/React__default["default"].createElement(Divider, {
|
|
3197
3226
|
color: textColor
|
|
3198
3227
|
});
|
|
3199
3228
|
}
|
|
3200
3229
|
|
|
3201
|
-
return /*#__PURE__*/
|
|
3230
|
+
return /*#__PURE__*/React__default["default"].createElement(Dot, {
|
|
3202
3231
|
color: textColor
|
|
3203
3232
|
});
|
|
3204
3233
|
};
|
|
3205
3234
|
|
|
3206
3235
|
var getTimeStamp = function getTimeStamp() {
|
|
3207
3236
|
if (!isTime) return null;
|
|
3208
|
-
return /*#__PURE__*/
|
|
3237
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isAuthor && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
3209
3238
|
className: "arr-separator " + _getClassName("".concat(seperatorStyle), _styleModuleImportMap$7)
|
|
3210
|
-
}, getSeparator()), /*#__PURE__*/
|
|
3239
|
+
}, getSeparator()), /*#__PURE__*/React__default["default"].createElement(TimeStamp, {
|
|
3211
3240
|
story: story,
|
|
3212
3241
|
config: config
|
|
3213
|
-
}), isReadTime && /*#__PURE__*/
|
|
3242
|
+
}), isReadTime && /*#__PURE__*/React__default["default"].createElement(ReadTime, {
|
|
3214
3243
|
story: story,
|
|
3215
3244
|
opts: config,
|
|
3216
3245
|
isLightTheme: isLightTheme
|
|
3217
3246
|
}));
|
|
3218
3247
|
};
|
|
3219
3248
|
|
|
3220
|
-
return /*#__PURE__*/
|
|
3249
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3221
3250
|
className: "arr--author-time " + _getClassName("author-time-wrapper ".concat(isBottomClasses), _styleModuleImportMap$7)
|
|
3222
|
-
}, isAuthor ? /*#__PURE__*/
|
|
3251
|
+
}, isAuthor ? /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(Author, {
|
|
3223
3252
|
story: story,
|
|
3224
3253
|
isBottom: true,
|
|
3225
3254
|
hideAuthorImage: hideAuthorImage,
|
|
@@ -3227,19 +3256,19 @@ var AuthorWithTime = function AuthorWithTime(_ref) {
|
|
|
3227
3256
|
}), getTimeStamp()) : getTimeStamp());
|
|
3228
3257
|
};
|
|
3229
3258
|
AuthorWithTime.propTypes = {
|
|
3230
|
-
story:
|
|
3259
|
+
story: PropTypes__default["default"].object,
|
|
3231
3260
|
|
|
3232
3261
|
/** Style of separator between the Author & Timestamp */
|
|
3233
|
-
separator:
|
|
3262
|
+
separator: PropTypes__default["default"].oneOf(["dot", "divider"]),
|
|
3234
3263
|
|
|
3235
3264
|
/** hide the author image */
|
|
3236
|
-
hideAuthorImage:
|
|
3265
|
+
hideAuthorImage: PropTypes__default["default"].bool,
|
|
3237
3266
|
// fix author and time at the end
|
|
3238
|
-
isBottom:
|
|
3267
|
+
isBottom: PropTypes__default["default"].bool,
|
|
3239
3268
|
// fix prefix before the author name
|
|
3240
|
-
prefix:
|
|
3241
|
-
config:
|
|
3242
|
-
isLightTheme:
|
|
3269
|
+
prefix: PropTypes__default["default"].string,
|
|
3270
|
+
config: PropTypes__default["default"].object,
|
|
3271
|
+
isLightTheme: PropTypes__default["default"].bool
|
|
3243
3272
|
};
|
|
3244
3273
|
AuthorWithTime.defaultProps = {
|
|
3245
3274
|
separator: "dot",
|
|
@@ -3285,7 +3314,7 @@ var CollectionNameBase = function CollectionNameBase(_ref) {
|
|
|
3285
3314
|
var borderBottomFullStyle = templateStyle.includes("collection-borderBottomFull") ? "4px solid ".concat(CollectionNameBorderColor) : "";
|
|
3286
3315
|
|
|
3287
3316
|
var borderBottomStyle = function borderBottomStyle() {
|
|
3288
|
-
return templateStyle.includes("collection-borderBottom") && !templateStyle.includes("collection-borderBottomFull") ? /*#__PURE__*/
|
|
3317
|
+
return templateStyle.includes("collection-borderBottom") && !templateStyle.includes("collection-borderBottomFull") ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3289
3318
|
className: "collection-name-m_border-bottom__1MnlV",
|
|
3290
3319
|
style: {
|
|
3291
3320
|
borderBottom: "4px solid ".concat(CollectionNameBorderColor)
|
|
@@ -3345,40 +3374,40 @@ var CollectionNameBase = function CollectionNameBase(_ref) {
|
|
|
3345
3374
|
}
|
|
3346
3375
|
};
|
|
3347
3376
|
|
|
3348
|
-
return /*#__PURE__*/
|
|
3377
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, showRowTitle && collectionName && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3349
3378
|
style: {
|
|
3350
3379
|
borderBottom: borderBottomFullStyle
|
|
3351
3380
|
},
|
|
3352
3381
|
"data-test-id": "collection-name",
|
|
3353
3382
|
className: ("arr--collection-name arrow-component ".concat(templateStyle) ? "arr--collection-name arrow-component ".concat(templateStyle) + " " : "") + _getClassName("collection ".concat(textColor, " ").concat(templateStyle), _styleModuleImportMap$6)
|
|
3354
|
-
}, templateStyle.includes("collection-borderLeft") && /*#__PURE__*/
|
|
3383
|
+
}, templateStyle.includes("collection-borderLeft") && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
3355
3384
|
className: "arr-collection-name-border-left collection-name-m_border-left__3_pYw",
|
|
3356
3385
|
style: {
|
|
3357
3386
|
color: CollectionNameBorderColor,
|
|
3358
3387
|
fontSize: getBorderHeight()
|
|
3359
3388
|
}
|
|
3360
|
-
}), slug && !slug.includes(undefined) ? /*#__PURE__*/
|
|
3389
|
+
}), slug && !slug.includes(undefined) ? /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
3361
3390
|
href: slug,
|
|
3362
3391
|
"aria-label": "collection-name"
|
|
3363
|
-
}, /*#__PURE__*/
|
|
3392
|
+
}, /*#__PURE__*/React__default["default"].createElement(HeaderTag, null, collectionName)) : /*#__PURE__*/React__default["default"].createElement(HeaderTag, null, collectionName), borderBottomStyle()));
|
|
3364
3393
|
};
|
|
3365
3394
|
CollectionNameBase.propTypes = {
|
|
3366
3395
|
/** Collection name border color */
|
|
3367
|
-
collectionNameBorderColor: PropTypes
|
|
3396
|
+
collectionNameBorderColor: PropTypes.PropTypes.string,
|
|
3368
3397
|
|
|
3369
3398
|
/** The Collection Object from the API response */
|
|
3370
|
-
collection: PropTypes
|
|
3399
|
+
collection: PropTypes.PropTypes.object,
|
|
3371
3400
|
|
|
3372
3401
|
/** The publisher config from the API response */
|
|
3373
|
-
config: PropTypes
|
|
3402
|
+
config: PropTypes.PropTypes.object,
|
|
3374
3403
|
|
|
3375
3404
|
/** The style template for the component */
|
|
3376
|
-
collectionNameTemplate: PropTypes
|
|
3405
|
+
collectionNameTemplate: PropTypes.PropTypes.oneOf(["", "borderLeft", "borderBottom", "crossLine", "borderBottomFull"]),
|
|
3377
3406
|
|
|
3378
3407
|
/** Header tags ranging h1-h6, where h[headerLevel] */
|
|
3379
|
-
headerLevel: PropTypes
|
|
3380
|
-
customCollectionName: PropTypes
|
|
3381
|
-
navigate: PropTypes
|
|
3408
|
+
headerLevel: PropTypes.PropTypes.string,
|
|
3409
|
+
customCollectionName: PropTypes.PropTypes.string,
|
|
3410
|
+
navigate: PropTypes.PropTypes.bool
|
|
3382
3411
|
};
|
|
3383
3412
|
CollectionNameBase.defaultProps = {
|
|
3384
3413
|
collectionNameTemplate: "",
|
|
@@ -3391,7 +3420,7 @@ function mapStateToProps(state) {
|
|
|
3391
3420
|
};
|
|
3392
3421
|
}
|
|
3393
3422
|
|
|
3394
|
-
var CollectionName = connect(mapStateToProps)(CollectionNameBase);
|
|
3423
|
+
var CollectionName = reactRedux.connect(mapStateToProps)(CollectionNameBase);
|
|
3395
3424
|
|
|
3396
3425
|
var CrownIcon = function CrownIcon(_ref) {
|
|
3397
3426
|
var height = _ref.height,
|
|
@@ -3399,7 +3428,7 @@ var CrownIcon = function CrownIcon(_ref) {
|
|
|
3399
3428
|
_ref$color = _ref.color,
|
|
3400
3429
|
color = _ref$color === void 0 ? "#D8D8D8" : _ref$color,
|
|
3401
3430
|
positionTop = _ref.positionTop;
|
|
3402
|
-
return /*#__PURE__*/
|
|
3431
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3403
3432
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3404
3433
|
width: width,
|
|
3405
3434
|
height: height,
|
|
@@ -3408,28 +3437,28 @@ var CrownIcon = function CrownIcon(_ref) {
|
|
|
3408
3437
|
position: "relative",
|
|
3409
3438
|
top: positionTop
|
|
3410
3439
|
}
|
|
3411
|
-
}, /*#__PURE__*/
|
|
3440
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3412
3441
|
fill: "none",
|
|
3413
3442
|
fillRule: "evenodd",
|
|
3414
3443
|
stroke: "none",
|
|
3415
3444
|
strokeWidth: "1"
|
|
3416
|
-
}, /*#__PURE__*/
|
|
3445
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", null, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3417
3446
|
transform: "translate(8 8)"
|
|
3418
|
-
}, /*#__PURE__*/
|
|
3447
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3419
3448
|
d: "M0 0H24V24H0z"
|
|
3420
|
-
}), /*#__PURE__*/
|
|
3449
|
+
}), /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3421
3450
|
fill: color,
|
|
3422
3451
|
fillRule: "nonzero",
|
|
3423
3452
|
transform: "translate(0 2)"
|
|
3424
|
-
}, /*#__PURE__*/
|
|
3453
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3425
3454
|
d: "M21.043 19.553c0-.743-.601-1.344-1.344-1.344h-15.4a1.343 1.343 0 100 2.688h15.4c.743 0 1.344-.603 1.344-1.344zM1.598 8.673c.022 0 .042 0 .064-.003l2.131 7.713h16.411l2.132-7.713c.022 0 .041.003.063.003a1.599 1.599 0 10-1.52-1.108L17.025 9.82 12.882 2.95a1.599 1.599 0 10-1.765 0L6.976 9.82 3.121 7.565a1.599 1.599 0 10-1.523 1.107z"
|
|
3426
3455
|
}))))));
|
|
3427
3456
|
};
|
|
3428
3457
|
CrownIcon.propTypes = {
|
|
3429
|
-
height:
|
|
3430
|
-
width:
|
|
3431
|
-
color:
|
|
3432
|
-
positionTop:
|
|
3458
|
+
height: PropTypes__default["default"].string,
|
|
3459
|
+
width: PropTypes__default["default"].string,
|
|
3460
|
+
color: PropTypes__default["default"].string,
|
|
3461
|
+
positionTop: PropTypes__default["default"].string
|
|
3433
3462
|
};
|
|
3434
3463
|
|
|
3435
3464
|
var KeyIcon = function KeyIcon(_ref) {
|
|
@@ -3438,7 +3467,7 @@ var KeyIcon = function KeyIcon(_ref) {
|
|
|
3438
3467
|
_ref$color = _ref.color,
|
|
3439
3468
|
color = _ref$color === void 0 ? "#D5D5D5" : _ref$color,
|
|
3440
3469
|
positionTop = _ref.positionTop;
|
|
3441
|
-
return /*#__PURE__*/
|
|
3470
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3442
3471
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3443
3472
|
width: width,
|
|
3444
3473
|
height: height,
|
|
@@ -3447,16 +3476,16 @@ var KeyIcon = function KeyIcon(_ref) {
|
|
|
3447
3476
|
position: "relative",
|
|
3448
3477
|
top: positionTop
|
|
3449
3478
|
}
|
|
3450
|
-
}, /*#__PURE__*/
|
|
3479
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3451
3480
|
fill: "none",
|
|
3452
3481
|
fillRule: "evenodd",
|
|
3453
3482
|
stroke: "none",
|
|
3454
3483
|
strokeWidth: "1"
|
|
3455
|
-
}, /*#__PURE__*/
|
|
3484
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", null, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3456
3485
|
transform: "translate(8 8)"
|
|
3457
|
-
}, /*#__PURE__*/
|
|
3486
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3458
3487
|
d: "M0 0H24V24H0z"
|
|
3459
|
-
}), /*#__PURE__*/
|
|
3488
|
+
}), /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3460
3489
|
fill: color,
|
|
3461
3490
|
fillRule: "nonzero",
|
|
3462
3491
|
d: "M12.71 4.364A6.54 6.54 0 000 6.545a6.54 6.54 0 0012.71 2.182h4.745v4.364h4.363V8.727H24V4.364H12.71zM6.544 8.727a2.181 2.181 0 110-4.362 2.181 2.181 0 010 4.362z",
|
|
@@ -3464,10 +3493,10 @@ var KeyIcon = function KeyIcon(_ref) {
|
|
|
3464
3493
|
})))));
|
|
3465
3494
|
};
|
|
3466
3495
|
KeyIcon.propTypes = {
|
|
3467
|
-
height:
|
|
3468
|
-
width:
|
|
3469
|
-
color:
|
|
3470
|
-
positionTop:
|
|
3496
|
+
height: PropTypes__default["default"].string,
|
|
3497
|
+
width: PropTypes__default["default"].string,
|
|
3498
|
+
color: PropTypes__default["default"].string,
|
|
3499
|
+
positionTop: PropTypes__default["default"].string
|
|
3471
3500
|
};
|
|
3472
3501
|
|
|
3473
3502
|
var LockIcon = function LockIcon(_ref) {
|
|
@@ -3476,7 +3505,7 @@ var LockIcon = function LockIcon(_ref) {
|
|
|
3476
3505
|
_ref$color = _ref.color,
|
|
3477
3506
|
color = _ref$color === void 0 ? "#D5D5D5" : _ref$color,
|
|
3478
3507
|
positionTop = _ref.positionTop;
|
|
3479
|
-
return /*#__PURE__*/
|
|
3508
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3480
3509
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3481
3510
|
width: width,
|
|
3482
3511
|
height: height,
|
|
@@ -3485,28 +3514,28 @@ var LockIcon = function LockIcon(_ref) {
|
|
|
3485
3514
|
position: "relative",
|
|
3486
3515
|
top: positionTop
|
|
3487
3516
|
}
|
|
3488
|
-
}, /*#__PURE__*/
|
|
3517
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3489
3518
|
fill: "none",
|
|
3490
3519
|
fillRule: "evenodd",
|
|
3491
3520
|
stroke: "none",
|
|
3492
3521
|
strokeWidth: "1"
|
|
3493
|
-
}, /*#__PURE__*/
|
|
3522
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", null, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3494
3523
|
transform: "translate(8 8)"
|
|
3495
|
-
}, /*#__PURE__*/
|
|
3524
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3496
3525
|
d: "M0 0H24V24H0z"
|
|
3497
|
-
}), /*#__PURE__*/
|
|
3526
|
+
}), /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3498
3527
|
fill: color,
|
|
3499
3528
|
fillRule: "nonzero",
|
|
3500
3529
|
transform: "translate(3)"
|
|
3501
|
-
}, /*#__PURE__*/
|
|
3530
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3502
3531
|
d: "M15.692 9h-.747V6c0-3.31-2.681-6-5.978-6C5.67 0 2.989 2.69 2.989 6v3h-.747A2.249 2.249 0 000 11.25v10.5A2.249 2.249 0 002.242 24h13.45a2.249 2.249 0 002.242-2.25v-10.5A2.249 2.249 0 0015.692 9zM4.982 6c0-2.206 1.787-4 3.985-4s3.985 1.794 3.985 4v3h-7.97V6z"
|
|
3503
3532
|
}))))));
|
|
3504
3533
|
};
|
|
3505
3534
|
LockIcon.propTypes = {
|
|
3506
|
-
height:
|
|
3507
|
-
width:
|
|
3508
|
-
color:
|
|
3509
|
-
positionTop:
|
|
3535
|
+
height: PropTypes__default["default"].string,
|
|
3536
|
+
width: PropTypes__default["default"].string,
|
|
3537
|
+
color: PropTypes__default["default"].string,
|
|
3538
|
+
positionTop: PropTypes__default["default"].string
|
|
3510
3539
|
};
|
|
3511
3540
|
|
|
3512
3541
|
var StarIcon = function StarIcon(_ref) {
|
|
@@ -3516,7 +3545,7 @@ var StarIcon = function StarIcon(_ref) {
|
|
|
3516
3545
|
color = _ref$color === void 0 ? "#D5D5D5" : _ref$color,
|
|
3517
3546
|
_ref$positionTop = _ref.positionTop,
|
|
3518
3547
|
positionTop = _ref$positionTop === void 0 ? "" : _ref$positionTop;
|
|
3519
|
-
return /*#__PURE__*/
|
|
3548
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3520
3549
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3521
3550
|
width: width,
|
|
3522
3551
|
height: height,
|
|
@@ -3525,21 +3554,21 @@ var StarIcon = function StarIcon(_ref) {
|
|
|
3525
3554
|
position: "relative",
|
|
3526
3555
|
top: positionTop
|
|
3527
3556
|
}
|
|
3528
|
-
}, /*#__PURE__*/
|
|
3557
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3529
3558
|
fill: "none",
|
|
3530
3559
|
fillRule: "evenodd",
|
|
3531
3560
|
stroke: "none",
|
|
3532
3561
|
strokeWidth: "1"
|
|
3533
|
-
}, /*#__PURE__*/
|
|
3562
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", null, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3534
3563
|
fill: color,
|
|
3535
3564
|
d: "M20 26L12.946577 29.7082039 14.2936609 21.854102 8.5873218 16.2917961 16.4732885 15.145898 20 8 23.5267115 15.145898 31.4126782 16.2917961 25.7063391 21.854102 27.053423 29.7082039z"
|
|
3536
3565
|
}))));
|
|
3537
3566
|
};
|
|
3538
3567
|
StarIcon.propTypes = {
|
|
3539
|
-
height:
|
|
3540
|
-
width:
|
|
3541
|
-
color:
|
|
3542
|
-
positionTop:
|
|
3568
|
+
height: PropTypes__default["default"].string,
|
|
3569
|
+
width: PropTypes__default["default"].string,
|
|
3570
|
+
color: PropTypes__default["default"].string,
|
|
3571
|
+
positionTop: PropTypes__default["default"].string
|
|
3543
3572
|
};
|
|
3544
3573
|
|
|
3545
3574
|
var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
@@ -3551,7 +3580,7 @@ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
|
3551
3580
|
|
|
3552
3581
|
switch (iconType) {
|
|
3553
3582
|
case "crown":
|
|
3554
|
-
return /*#__PURE__*/
|
|
3583
|
+
return /*#__PURE__*/React__default["default"].createElement(CrownIcon, {
|
|
3555
3584
|
width: width,
|
|
3556
3585
|
height: height,
|
|
3557
3586
|
color: color,
|
|
@@ -3559,7 +3588,7 @@ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
|
3559
3588
|
});
|
|
3560
3589
|
|
|
3561
3590
|
case "lock":
|
|
3562
|
-
return /*#__PURE__*/
|
|
3591
|
+
return /*#__PURE__*/React__default["default"].createElement(LockIcon, {
|
|
3563
3592
|
width: width,
|
|
3564
3593
|
height: height,
|
|
3565
3594
|
color: color,
|
|
@@ -3567,7 +3596,7 @@ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
|
3567
3596
|
});
|
|
3568
3597
|
|
|
3569
3598
|
case "key":
|
|
3570
|
-
return /*#__PURE__*/
|
|
3599
|
+
return /*#__PURE__*/React__default["default"].createElement(KeyIcon, {
|
|
3571
3600
|
width: width,
|
|
3572
3601
|
height: height,
|
|
3573
3602
|
color: color,
|
|
@@ -3575,7 +3604,7 @@ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
|
3575
3604
|
});
|
|
3576
3605
|
|
|
3577
3606
|
default:
|
|
3578
|
-
return /*#__PURE__*/
|
|
3607
|
+
return /*#__PURE__*/React__default["default"].createElement(StarIcon, {
|
|
3579
3608
|
width: width,
|
|
3580
3609
|
height: height,
|
|
3581
3610
|
color: color,
|
|
@@ -3584,21 +3613,21 @@ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
|
3584
3613
|
}
|
|
3585
3614
|
};
|
|
3586
3615
|
PremiumStoryIcon.propTypes = {
|
|
3587
|
-
width:
|
|
3588
|
-
height:
|
|
3589
|
-
color:
|
|
3590
|
-
iconType:
|
|
3591
|
-
positionTop:
|
|
3616
|
+
width: PropTypes__default["default"].string,
|
|
3617
|
+
height: PropTypes__default["default"].string,
|
|
3618
|
+
color: PropTypes__default["default"].string,
|
|
3619
|
+
iconType: PropTypes__default["default"].string,
|
|
3620
|
+
positionTop: PropTypes__default["default"].string
|
|
3592
3621
|
};
|
|
3593
3622
|
|
|
3594
3623
|
function LiveIcon() {
|
|
3595
|
-
return /*#__PURE__*/
|
|
3624
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3596
3625
|
className: "live-icon",
|
|
3597
3626
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3598
3627
|
width: "25",
|
|
3599
3628
|
height: "24",
|
|
3600
3629
|
viewBox: "0 0 25 24"
|
|
3601
|
-
}, /*#__PURE__*/
|
|
3630
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3602
3631
|
fill: "#ff5858",
|
|
3603
3632
|
d: "M12 18a6 6 0 110-12 6 6 0 010 12zm0 2.5a8.5 8.5 0 110-17 8.5 8.5 0 010 17zm0-1a7.5 7.5 0 100-15 7.5 7.5 0 000 15z"
|
|
3604
3633
|
}));
|
|
@@ -3655,37 +3684,37 @@ var Headline = function Headline(_ref) {
|
|
|
3655
3684
|
var wrapperClass = premiumStory ? "wrapper" : "";
|
|
3656
3685
|
var iconSize = "24px";
|
|
3657
3686
|
var enableLiveIcon = showLiveIcon && story["story-template"] === "live-blog" && !get_1(story, ["metadata", "is-closed"], false);
|
|
3658
|
-
return /*#__PURE__*/
|
|
3687
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3659
3688
|
"data-test-id": "headline",
|
|
3660
3689
|
className: "arrow-component arr--headline " + _getClassName(wrapperClass, _styleModuleImportMap$5)
|
|
3661
|
-
}, premiumStory && /*#__PURE__*/
|
|
3690
|
+
}, premiumStory && /*#__PURE__*/React__default["default"].createElement(PremiumStoryIcon, {
|
|
3662
3691
|
width: iconSize,
|
|
3663
3692
|
height: iconSize,
|
|
3664
3693
|
color: iconColor,
|
|
3665
3694
|
iconType: iconStyle,
|
|
3666
3695
|
positionTop: positionHeadline()
|
|
3667
|
-
}), isLink ? /*#__PURE__*/
|
|
3696
|
+
}), isLink ? /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
3668
3697
|
href: getStoryUrl(story, "/".concat(story.slug)),
|
|
3669
3698
|
externalLink: isExternalStory(story),
|
|
3670
3699
|
"aria-label": "headline"
|
|
3671
|
-
}, /*#__PURE__*/
|
|
3700
|
+
}, /*#__PURE__*/React__default["default"].createElement(HeaderTag, {
|
|
3672
3701
|
className: _getClassName("headline ".concat(textColor), _styleModuleImportMap$5)
|
|
3673
|
-
}, enableLiveIcon && /*#__PURE__*/
|
|
3702
|
+
}, enableLiveIcon && /*#__PURE__*/React__default["default"].createElement(LiveIcon, null), headline)) : /*#__PURE__*/React__default["default"].createElement(HeaderTag, {
|
|
3674
3703
|
className: _getClassName("headline ".concat(textColor), _styleModuleImportMap$5)
|
|
3675
|
-
}, enableLiveIcon && /*#__PURE__*/
|
|
3704
|
+
}, enableLiveIcon && /*#__PURE__*/React__default["default"].createElement(LiveIcon, null), headline));
|
|
3676
3705
|
};
|
|
3677
3706
|
Headline.propTypes = {
|
|
3678
3707
|
/** The Story Object from the API response */
|
|
3679
|
-
story:
|
|
3708
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
3680
3709
|
|
|
3681
3710
|
/** Header tags ranging h1-h6, where h[headerLevel] */
|
|
3682
|
-
headerLevel:
|
|
3683
|
-
premiumStoryIconConfig:
|
|
3684
|
-
iconColor:
|
|
3685
|
-
iconType:
|
|
3686
|
-
enablePremiumStoryIcon:
|
|
3711
|
+
headerLevel: PropTypes__default["default"].string,
|
|
3712
|
+
premiumStoryIconConfig: PropTypes__default["default"].shape({
|
|
3713
|
+
iconColor: PropTypes__default["default"].string,
|
|
3714
|
+
iconType: PropTypes__default["default"].string,
|
|
3715
|
+
enablePremiumStoryIcon: PropTypes__default["default"].bool
|
|
3687
3716
|
}),
|
|
3688
|
-
isLink:
|
|
3717
|
+
isLink: PropTypes__default["default"].bool
|
|
3689
3718
|
};
|
|
3690
3719
|
Headline.defaultProps = {
|
|
3691
3720
|
headerLevel: "6",
|
|
@@ -3699,27 +3728,27 @@ var ImageFallbackIcon = function ImageFallbackIcon(_ref) {
|
|
|
3699
3728
|
height = _ref$height === void 0 ? 30 : _ref$height,
|
|
3700
3729
|
_ref$iconColor = _ref.iconColor,
|
|
3701
3730
|
iconColor = _ref$iconColor === void 0 ? "#99B0CB" : _ref$iconColor;
|
|
3702
|
-
return /*#__PURE__*/
|
|
3731
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3703
3732
|
width: width,
|
|
3704
3733
|
height: height,
|
|
3705
3734
|
viewBox: "0 0 102 76",
|
|
3706
3735
|
version: "1.1"
|
|
3707
|
-
}, /*#__PURE__*/
|
|
3736
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3708
3737
|
id: "demo-home-copy",
|
|
3709
3738
|
stroke: "none",
|
|
3710
3739
|
strokeWidth: "1",
|
|
3711
3740
|
fill: "none",
|
|
3712
3741
|
fillRule: "evenodd",
|
|
3713
3742
|
transform: "translate(-377.000000, -314.000000)"
|
|
3714
|
-
}, /*#__PURE__*/
|
|
3743
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3715
3744
|
id: "Group-13",
|
|
3716
3745
|
transform: "translate(377.000000, 314.000000)"
|
|
3717
|
-
}, /*#__PURE__*/
|
|
3746
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3718
3747
|
d: "M43.2,49.7 L62.2,19.2 L87.2,59.4 L17,59.4 L32.8,39.4 L43.2,49.7 Z M29.9,28.6 C25.8683213,28.6 22.6,25.3316787 22.6,21.3 C22.6,17.2683213 25.8683213,14 29.9,14 C33.9316787,14 37.2,17.2683213 37.2,21.3 C37.2,25.3316787 33.9316787,28.6 29.9,28.6 Z",
|
|
3719
3748
|
id: "Combined-Shape",
|
|
3720
3749
|
fill: iconColor,
|
|
3721
3750
|
fillRule: "nonzero"
|
|
3722
|
-
}), /*#__PURE__*/
|
|
3751
|
+
}), /*#__PURE__*/React__default["default"].createElement("rect", {
|
|
3723
3752
|
id: "Rectangle-19",
|
|
3724
3753
|
stroke: iconColor,
|
|
3725
3754
|
strokeWidth: "3",
|
|
@@ -3731,24 +3760,24 @@ var ImageFallbackIcon = function ImageFallbackIcon(_ref) {
|
|
|
3731
3760
|
}))));
|
|
3732
3761
|
};
|
|
3733
3762
|
ImageFallbackIcon.propTypes = {
|
|
3734
|
-
width:
|
|
3735
|
-
height:
|
|
3736
|
-
iconColor:
|
|
3763
|
+
width: PropTypes__default["default"].object,
|
|
3764
|
+
height: PropTypes__default["default"].object,
|
|
3765
|
+
iconColor: PropTypes__default["default"].object
|
|
3737
3766
|
};
|
|
3738
3767
|
|
|
3739
3768
|
var imageFallback = function imageFallback() {
|
|
3740
|
-
return /*#__PURE__*/
|
|
3769
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3741
3770
|
className: "arr--fallback-image fallback-m_image__1GYCJ fallback-m_image-position__3KddP"
|
|
3742
|
-
}, /*#__PURE__*/
|
|
3771
|
+
}, /*#__PURE__*/React__default["default"].createElement("figure", {
|
|
3743
3772
|
className: "arr--fallback-svg fallback-m_fallback-svg__tK9fL"
|
|
3744
|
-
}, /*#__PURE__*/
|
|
3773
|
+
}, /*#__PURE__*/React__default["default"].createElement(ImageFallbackIcon, null)));
|
|
3745
3774
|
};
|
|
3746
3775
|
|
|
3747
3776
|
var FallbackImage = function FallbackImage(_ref) {
|
|
3748
3777
|
var slug = _ref.slug;
|
|
3749
3778
|
|
|
3750
3779
|
if (slug) {
|
|
3751
|
-
return /*#__PURE__*/
|
|
3780
|
+
return /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
3752
3781
|
href: slug,
|
|
3753
3782
|
"aria-label": "image-fallback"
|
|
3754
3783
|
}, imageFallback());
|
|
@@ -3757,23 +3786,23 @@ var FallbackImage = function FallbackImage(_ref) {
|
|
|
3757
3786
|
}
|
|
3758
3787
|
};
|
|
3759
3788
|
FallbackImage.propTypes = {
|
|
3760
|
-
slug:
|
|
3789
|
+
slug: PropTypes__default["default"].string
|
|
3761
3790
|
};
|
|
3762
3791
|
|
|
3763
3792
|
var HyperLinkIcon = function HyperLinkIcon() {
|
|
3764
|
-
return /*#__PURE__*/
|
|
3793
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3765
3794
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3766
3795
|
width: "36",
|
|
3767
3796
|
height: "28"
|
|
3768
|
-
}, /*#__PURE__*/
|
|
3797
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3769
3798
|
fill: "none",
|
|
3770
3799
|
fillRule: "evenodd"
|
|
3771
|
-
}, /*#__PURE__*/
|
|
3800
|
+
}, /*#__PURE__*/React__default["default"].createElement("rect", {
|
|
3772
3801
|
width: "36",
|
|
3773
3802
|
height: "28",
|
|
3774
3803
|
fill: "#3D6FCF",
|
|
3775
3804
|
rx: "4"
|
|
3776
|
-
}), /*#__PURE__*/
|
|
3805
|
+
}), /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3777
3806
|
stroke: "#FFF",
|
|
3778
3807
|
strokeLinecap: "round",
|
|
3779
3808
|
strokeLinejoin: "round",
|
|
@@ -3786,16 +3815,16 @@ var HyperLink = function HyperLink(_ref) {
|
|
|
3786
3815
|
var _ref$hyperLink = _ref.hyperLink,
|
|
3787
3816
|
hyperLink = _ref$hyperLink === void 0 ? "" : _ref$hyperLink;
|
|
3788
3817
|
if (!hyperLink) return null;
|
|
3789
|
-
return /*#__PURE__*/
|
|
3818
|
+
return /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
3790
3819
|
href: hyperLink,
|
|
3791
3820
|
"aria-label": "hyperlink-button",
|
|
3792
3821
|
className: "arr--hyperlink-button hyperlink-m_hyperlink-button__1CqWx",
|
|
3793
3822
|
target: "_blank",
|
|
3794
3823
|
rel: "noopener noreferrer"
|
|
3795
|
-
}, /*#__PURE__*/
|
|
3824
|
+
}, /*#__PURE__*/React__default["default"].createElement(HyperLinkIcon, null));
|
|
3796
3825
|
};
|
|
3797
3826
|
HyperLink.propTypes = {
|
|
3798
|
-
hyperLink:
|
|
3827
|
+
hyperLink: PropTypes__default["default"].string
|
|
3799
3828
|
};
|
|
3800
3829
|
|
|
3801
3830
|
var _styleModuleImportMap$4 = {
|
|
@@ -3831,7 +3860,7 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
3831
3860
|
StoryTemplateIcon = _config$StoryTemplate === void 0 ? function () {
|
|
3832
3861
|
return null;
|
|
3833
3862
|
} : _config$StoryTemplate;
|
|
3834
|
-
var showImagePlaceholder = useSelector(function (state) {
|
|
3863
|
+
var showImagePlaceholder = reactRedux.useSelector(function (state) {
|
|
3835
3864
|
return get_1(state, ["qt", "config", "showPlaceholder"]);
|
|
3836
3865
|
});
|
|
3837
3866
|
var getPlaceholderStyleName = showImagePlaceholder ? "placeholder" : "";
|
|
@@ -3867,37 +3896,37 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
3867
3896
|
var fallbackImage = function fallbackImage() {
|
|
3868
3897
|
if (!slug) {
|
|
3869
3898
|
if (fallbackImageUrl && !isStoryPageImage) {
|
|
3870
|
-
return /*#__PURE__*/
|
|
3899
|
+
return /*#__PURE__*/React__default["default"].createElement("figure", {
|
|
3871
3900
|
style: {
|
|
3872
3901
|
paddingTop: imagePadding + "%"
|
|
3873
3902
|
},
|
|
3874
3903
|
className: "arr--responsive-hero-image " + _getClassName("image ".concat(getPlaceholderStyleName), _styleModuleImportMap$4)
|
|
3875
|
-
}, /*#__PURE__*/
|
|
3904
|
+
}, /*#__PURE__*/React__default["default"].createElement("img", {
|
|
3876
3905
|
className: "qt-image",
|
|
3877
3906
|
"data-src": "".concat(fallbackImageUrl),
|
|
3878
3907
|
alt: "image-fallback"
|
|
3879
3908
|
}));
|
|
3880
3909
|
}
|
|
3881
3910
|
|
|
3882
|
-
return /*#__PURE__*/
|
|
3911
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, defaultFallback ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3883
3912
|
"data-test-id": "arr--fallback-hero-image",
|
|
3884
3913
|
style: {
|
|
3885
3914
|
paddingTop: imagePadding + "%"
|
|
3886
3915
|
},
|
|
3887
3916
|
className: "arr--fallback-hero-image " + _getClassName("image ".concat(getPlaceholderStyleName), _styleModuleImportMap$4)
|
|
3888
|
-
}, /*#__PURE__*/
|
|
3917
|
+
}, /*#__PURE__*/React__default["default"].createElement(StoryTemplateIcon, {
|
|
3889
3918
|
storyTemplate: story["story-template"]
|
|
3890
|
-
}), /*#__PURE__*/
|
|
3919
|
+
}), /*#__PURE__*/React__default["default"].createElement(FallbackImage, null)) : null);
|
|
3891
3920
|
}
|
|
3892
3921
|
|
|
3893
|
-
return /*#__PURE__*/
|
|
3922
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("figure", {
|
|
3894
3923
|
style: {
|
|
3895
3924
|
paddingTop: imagePadding + "%"
|
|
3896
3925
|
},
|
|
3897
3926
|
className: "arr--responsive-hero-image " + _getClassName("image ".concat(getPlaceholderStyleName), _styleModuleImportMap$4)
|
|
3898
|
-
}, /*#__PURE__*/
|
|
3927
|
+
}, /*#__PURE__*/React__default["default"].createElement(StoryTemplateIcon, {
|
|
3899
3928
|
storyTemplate: story["story-template"]
|
|
3900
|
-
}), /*#__PURE__*/
|
|
3929
|
+
}), /*#__PURE__*/React__default["default"].createElement(components.ResponsiveHeroImage, {
|
|
3901
3930
|
story: story,
|
|
3902
3931
|
aspectRatio: imageAspectRatio,
|
|
3903
3932
|
defaultWidth: defaultWidth,
|
|
@@ -3906,15 +3935,15 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
3906
3935
|
auto: ["format", "compress"],
|
|
3907
3936
|
fit: "max"
|
|
3908
3937
|
}
|
|
3909
|
-
})), isStoryPageImage && hyperLink && /*#__PURE__*/
|
|
3938
|
+
})), isStoryPageImage && hyperLink && /*#__PURE__*/React__default["default"].createElement(HyperLink, {
|
|
3910
3939
|
hyperLink: hyperLink
|
|
3911
3940
|
}));
|
|
3912
3941
|
};
|
|
3913
3942
|
|
|
3914
|
-
return story && (isStoryPageImage ? /*#__PURE__*/
|
|
3943
|
+
return story && (isStoryPageImage ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3915
3944
|
"data-test-id": "arr--hero-image",
|
|
3916
3945
|
className: "arr--hero-image " + _getClassName("".concat(heroImageClass, " ").concat(fullBleed, " ").concat(heroImageMobClasses), _styleModuleImportMap$4)
|
|
3917
|
-
}, fallbackImage()) : /*#__PURE__*/
|
|
3946
|
+
}, fallbackImage()) : /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
3918
3947
|
"data-test-id": "arr--hero-image",
|
|
3919
3948
|
href: getStoryUrl(story, "/".concat(story.slug)),
|
|
3920
3949
|
externalLink: isExternalStory(story),
|
|
@@ -3924,30 +3953,30 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
3924
3953
|
};
|
|
3925
3954
|
HeroImage.propTypes = {
|
|
3926
3955
|
/** The Story Object from the API response */
|
|
3927
|
-
story:
|
|
3956
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
3928
3957
|
|
|
3929
3958
|
/** Removes the Hero Image padding for the image to bleed over the margin */
|
|
3930
|
-
FullBleed:
|
|
3959
|
+
FullBleed: PropTypes__default["default"].bool,
|
|
3931
3960
|
|
|
3932
3961
|
/** The default width for the image, in case the browser does not support srcset */
|
|
3933
|
-
defaultWidth:
|
|
3962
|
+
defaultWidth: PropTypes__default["default"].number,
|
|
3934
3963
|
|
|
3935
3964
|
/** The list of available widths */
|
|
3936
|
-
widths:
|
|
3965
|
+
widths: PropTypes__default["default"].array,
|
|
3937
3966
|
// fatch the correct hero image
|
|
3938
|
-
aspectRatio:
|
|
3967
|
+
aspectRatio: PropTypes__default["default"].array,
|
|
3939
3968
|
// Hints for the browser to choose the best size
|
|
3940
3969
|
|
|
3941
3970
|
/** This prop is responsible for adding padding-right of the image and remove padding bottom of the image */
|
|
3942
|
-
isHorizontal:
|
|
3971
|
+
isHorizontal: PropTypes__default["default"].bool,
|
|
3943
3972
|
|
|
3944
3973
|
/** This prop is responsible for adding padding-bottom in desktop and padding-right in mobile */
|
|
3945
|
-
isHorizontalMobile:
|
|
3974
|
+
isHorizontalMobile: PropTypes__default["default"].bool,
|
|
3946
3975
|
// this prop is responsive for rendering fallback image on story page
|
|
3947
|
-
defaultFallback:
|
|
3948
|
-
isHorizontalWithImageLast:
|
|
3949
|
-
isStoryPageImage:
|
|
3950
|
-
config:
|
|
3976
|
+
defaultFallback: PropTypes__default["default"].bool,
|
|
3977
|
+
isHorizontalWithImageLast: PropTypes__default["default"].bool,
|
|
3978
|
+
isStoryPageImage: PropTypes__default["default"].bool,
|
|
3979
|
+
config: PropTypes__default["default"].object
|
|
3951
3980
|
};
|
|
3952
3981
|
HeroImage.defaultProps = {
|
|
3953
3982
|
FullBleed: true,
|
|
@@ -4009,26 +4038,26 @@ var LoadmoreButton = function LoadmoreButton(_ref) {
|
|
|
4009
4038
|
if (!showButton) return null;
|
|
4010
4039
|
var textColor = getTextColor(theme);
|
|
4011
4040
|
var slug = customUrlPath ? "/".concat(customUrlPath) : generateNavigateSlug(collection, _objectSpread(_objectSpread({}, qtConfig), config));
|
|
4012
|
-
return template === "SubsequentLoadCount" ? /*#__PURE__*/
|
|
4041
|
+
return template === "SubsequentLoadCount" ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4013
4042
|
onClick: onClick,
|
|
4014
4043
|
"data-test-id": "load-more",
|
|
4015
4044
|
className: "arr--button " + _getClassName("button ".concat(textColor, " default"), _styleModuleImportMap$3)
|
|
4016
|
-
}, buttonText) : /*#__PURE__*/
|
|
4045
|
+
}, buttonText) : /*#__PURE__*/React__default["default"].createElement(components.LinkBase, {
|
|
4017
4046
|
href: slug,
|
|
4018
4047
|
navigateTo: navigate,
|
|
4019
4048
|
"data-test-id": "load-more",
|
|
4020
4049
|
"aria-label": "load-more"
|
|
4021
|
-
}, /*#__PURE__*/
|
|
4050
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4022
4051
|
className: "arr--button " + _getClassName("button ".concat(textColor, " default"), _styleModuleImportMap$3)
|
|
4023
4052
|
}, buttonText));
|
|
4024
4053
|
};
|
|
4025
4054
|
LoadmoreButton.propTypes = {
|
|
4026
|
-
collection:
|
|
4027
|
-
template:
|
|
4028
|
-
config:
|
|
4029
|
-
onClick:
|
|
4030
|
-
navigate:
|
|
4031
|
-
qtConfig:
|
|
4055
|
+
collection: PropTypes__default["default"].object,
|
|
4056
|
+
template: PropTypes__default["default"].string,
|
|
4057
|
+
config: PropTypes__default["default"].object,
|
|
4058
|
+
onClick: PropTypes__default["default"].func,
|
|
4059
|
+
navigate: PropTypes__default["default"].func,
|
|
4060
|
+
qtConfig: PropTypes__default["default"].object
|
|
4032
4061
|
};
|
|
4033
4062
|
|
|
4034
4063
|
var LoadMoreTarget = function LoadMoreTarget(_ref) {
|
|
@@ -4036,7 +4065,7 @@ var LoadMoreTarget = function LoadMoreTarget(_ref) {
|
|
|
4036
4065
|
componentName = _ref.componentName,
|
|
4037
4066
|
offset = _ref.offset,
|
|
4038
4067
|
limit = _ref.limit;
|
|
4039
|
-
return /*#__PURE__*/
|
|
4068
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4040
4069
|
id: "ELM-".concat(collection.id),
|
|
4041
4070
|
"data-collection-slug": collection["slug"],
|
|
4042
4071
|
"data-component-name": componentName,
|
|
@@ -4045,13 +4074,13 @@ var LoadMoreTarget = function LoadMoreTarget(_ref) {
|
|
|
4045
4074
|
});
|
|
4046
4075
|
};
|
|
4047
4076
|
LoadMoreTarget.propTypes = {
|
|
4048
|
-
collection:
|
|
4049
|
-
id:
|
|
4050
|
-
slug:
|
|
4077
|
+
collection: PropTypes__default["default"].shape({
|
|
4078
|
+
id: PropTypes__default["default"].string,
|
|
4079
|
+
slug: PropTypes__default["default"].string
|
|
4051
4080
|
}),
|
|
4052
|
-
componentName:
|
|
4053
|
-
offset:
|
|
4054
|
-
limit:
|
|
4081
|
+
componentName: PropTypes__default["default"].string,
|
|
4082
|
+
offset: PropTypes__default["default"].number,
|
|
4083
|
+
limit: PropTypes__default["default"].number
|
|
4055
4084
|
};
|
|
4056
4085
|
|
|
4057
4086
|
var _styleModuleImportMap$2 = {
|
|
@@ -4089,22 +4118,22 @@ var SectionTag = function SectionTag(_ref) {
|
|
|
4089
4118
|
}
|
|
4090
4119
|
|
|
4091
4120
|
if (!isSection) return null;
|
|
4092
|
-
return /*#__PURE__*/
|
|
4121
|
+
return /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
4093
4122
|
href: getUrl,
|
|
4094
4123
|
className: "arrow-component arr--section-name",
|
|
4095
4124
|
"aria-label": "section-name"
|
|
4096
|
-
}, /*#__PURE__*/
|
|
4125
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4097
4126
|
"data-test-id": "sectionTag",
|
|
4098
4127
|
style: {
|
|
4099
4128
|
backgroundColor: templateStyle.includes("section-solid") ? sectionTagBorderColor : ""
|
|
4100
4129
|
},
|
|
4101
4130
|
className: "section-tag arrow-component " + _getClassName("".concat(textColor, " ").concat(templateStyle), _styleModuleImportMap$2)
|
|
4102
|
-
}, templateStyle.includes("section-borderLeft") && /*#__PURE__*/
|
|
4131
|
+
}, templateStyle.includes("section-borderLeft") && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
4103
4132
|
className: "section-m_border-left__2oUyp",
|
|
4104
4133
|
style: {
|
|
4105
4134
|
color: sectionTagBorderColor
|
|
4106
4135
|
}
|
|
4107
|
-
}), section["display-name"] || section["name"], /*#__PURE__*/
|
|
4136
|
+
}), section["display-name"] || section["name"], /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4108
4137
|
className: "section-m_border-bottom__3cRoD",
|
|
4109
4138
|
style: {
|
|
4110
4139
|
backgroundColor: "".concat(template === "solid" ? "" : sectionTagBorderColor)
|
|
@@ -4113,13 +4142,13 @@ var SectionTag = function SectionTag(_ref) {
|
|
|
4113
4142
|
};
|
|
4114
4143
|
SectionTag.propTypes = {
|
|
4115
4144
|
/** The Story Object from the API response */
|
|
4116
|
-
story:
|
|
4145
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
4117
4146
|
|
|
4118
4147
|
/** The style template for section tag */
|
|
4119
|
-
template:
|
|
4120
|
-
borderColor:
|
|
4121
|
-
solidBorderColor:
|
|
4122
|
-
isLightTheme:
|
|
4148
|
+
template: PropTypes__default["default"].oneOf(["", "borderBottomSml", "borderLeft", "solid"]),
|
|
4149
|
+
borderColor: PropTypes__default["default"].string,
|
|
4150
|
+
solidBorderColor: PropTypes__default["default"].string,
|
|
4151
|
+
isLightTheme: PropTypes__default["default"].bool
|
|
4123
4152
|
};
|
|
4124
4153
|
SectionTag.defaultProps = {
|
|
4125
4154
|
template: "",
|
|
@@ -4146,7 +4175,7 @@ var Subheadline = function Subheadline(_ref) {
|
|
|
4146
4175
|
var subheadline = forceShowAtom || get_1(config, ["showSubheadline"], true);
|
|
4147
4176
|
if (!subheadline) return null;
|
|
4148
4177
|
var textColor = getTextColor(config.theme);
|
|
4149
|
-
return /*#__PURE__*/
|
|
4178
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4150
4179
|
style: {
|
|
4151
4180
|
WebkitLineClamp: lineClamp
|
|
4152
4181
|
},
|
|
@@ -4156,15 +4185,15 @@ var Subheadline = function Subheadline(_ref) {
|
|
|
4156
4185
|
};
|
|
4157
4186
|
Subheadline.propTypes = {
|
|
4158
4187
|
/** The Story Object from the API response */
|
|
4159
|
-
story:
|
|
4188
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
4160
4189
|
// Restricts the number of lines for subheadline.
|
|
4161
|
-
lineClamp:
|
|
4190
|
+
lineClamp: PropTypes__default["default"].number,
|
|
4162
4191
|
|
|
4163
4192
|
/** Number of characters to truncate the subheadline */
|
|
4164
|
-
truncateChars:
|
|
4165
|
-
clazzName:
|
|
4166
|
-
forceShowAtom:
|
|
4167
|
-
showFullContent:
|
|
4193
|
+
truncateChars: PropTypes__default["default"].number,
|
|
4194
|
+
clazzName: PropTypes__default["default"].string,
|
|
4195
|
+
forceShowAtom: PropTypes__default["default"].bool,
|
|
4196
|
+
showFullContent: PropTypes__default["default"].bool
|
|
4168
4197
|
};
|
|
4169
4198
|
Subheadline.defaultProps = {
|
|
4170
4199
|
forceShowAtom: false,
|
|
@@ -4213,7 +4242,7 @@ var StoryCard = function StoryCard(_ref) {
|
|
|
4213
4242
|
prefix = _ref.prefix,
|
|
4214
4243
|
config = _ref.config,
|
|
4215
4244
|
isHorizontalWithImageLast = _ref.isHorizontalWithImageLast;
|
|
4216
|
-
if (!story || isEmpty(story)) return /*#__PURE__*/
|
|
4245
|
+
if (!story || isEmpty(story)) return /*#__PURE__*/React__default["default"].createElement("div", null);
|
|
4217
4246
|
var borderOptions = ["default", "full", "bottom", "boxShadow"];
|
|
4218
4247
|
var borderTemplate = borderOptions.includes(border) ? "border-".concat(border) : ""; // TODO optimize conditions
|
|
4219
4248
|
|
|
@@ -4223,7 +4252,7 @@ var StoryCard = function StoryCard(_ref) {
|
|
|
4223
4252
|
var bgImgContentOverlapClass = bgImgContentOverlap ? "content-overlap" : "";
|
|
4224
4253
|
var textColor = getTextColor(theme);
|
|
4225
4254
|
var horizontalMobileClasses = isHorizontalMobile ? "horizontal-mob" : "";
|
|
4226
|
-
var defaultStorycard = /*#__PURE__*/
|
|
4255
|
+
var defaultStorycard = /*#__PURE__*/React__default["default"].createElement(DefaultStoryCard, {
|
|
4227
4256
|
story: story,
|
|
4228
4257
|
aspectRatio: aspectRatio,
|
|
4229
4258
|
border: border,
|
|
@@ -4237,7 +4266,7 @@ var StoryCard = function StoryCard(_ref) {
|
|
|
4237
4266
|
config: config,
|
|
4238
4267
|
isHorizontalWithImageLast: isHorizontalWithImageLast
|
|
4239
4268
|
});
|
|
4240
|
-
return /*#__PURE__*/
|
|
4269
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4241
4270
|
"data-test-id": "story-card",
|
|
4242
4271
|
style: {
|
|
4243
4272
|
backgroundColor: theme,
|
|
@@ -4266,91 +4295,91 @@ var DefaultStoryCard = function DefaultStoryCard(_ref2) {
|
|
|
4266
4295
|
var SectionTagborderColor = rgbToHex(borderColor);
|
|
4267
4296
|
var _config$localizationC = config.localizationConfig,
|
|
4268
4297
|
localizationConfig = _config$localizationC === void 0 ? {} : _config$localizationC;
|
|
4269
|
-
return /*#__PURE__*/
|
|
4298
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isHorizontal ? /*#__PURE__*/React__default["default"].createElement(HeroImage, {
|
|
4270
4299
|
config: config,
|
|
4271
4300
|
story: story,
|
|
4272
4301
|
isHorizontal: true,
|
|
4273
4302
|
isHorizontalMobile: isHorizontalMobile,
|
|
4274
4303
|
aspectRatio: aspectRatio
|
|
4275
|
-
}) : isHorizontalWithImageLast ? /*#__PURE__*/
|
|
4304
|
+
}) : isHorizontalWithImageLast ? /*#__PURE__*/React__default["default"].createElement(HeroImage, {
|
|
4276
4305
|
config: config,
|
|
4277
4306
|
story: story,
|
|
4278
4307
|
isHorizontalWithImageLast: true,
|
|
4279
4308
|
isHorizontalMobile: isHorizontalMobile,
|
|
4280
4309
|
aspectRatio: aspectRatio
|
|
4281
|
-
}) : /*#__PURE__*/
|
|
4310
|
+
}) : /*#__PURE__*/React__default["default"].createElement(HeroImage, {
|
|
4282
4311
|
story: story,
|
|
4283
4312
|
config: config,
|
|
4284
4313
|
isHorizontalMobile: isHorizontalMobile,
|
|
4285
4314
|
aspectRatio: aspectRatio
|
|
4286
|
-
}), /*#__PURE__*/
|
|
4315
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4287
4316
|
className: "arr--story-content " + _getClassName("content ".concat(alignment), _styleModuleImportMap)
|
|
4288
|
-
}, /*#__PURE__*/
|
|
4317
|
+
}, /*#__PURE__*/React__default["default"].createElement(SectionTag, {
|
|
4289
4318
|
story: story,
|
|
4290
4319
|
borderColor: SectionTagborderColor
|
|
4291
|
-
}), /*#__PURE__*/
|
|
4320
|
+
}), /*#__PURE__*/React__default["default"].createElement(Headline, {
|
|
4292
4321
|
story: story,
|
|
4293
4322
|
headerLevel: headerLevel,
|
|
4294
4323
|
premiumStoryIconConfig: config
|
|
4295
|
-
}), /*#__PURE__*/
|
|
4324
|
+
}), /*#__PURE__*/React__default["default"].createElement(AuthorWithTime, {
|
|
4296
4325
|
config: localizationConfig,
|
|
4297
4326
|
story: story,
|
|
4298
4327
|
isBottom: true,
|
|
4299
4328
|
prefix: prefix,
|
|
4300
4329
|
hideAuthorImage: hideAuthorImage
|
|
4301
|
-
}), /*#__PURE__*/
|
|
4330
|
+
}), /*#__PURE__*/React__default["default"].createElement(Subheadline, {
|
|
4302
4331
|
story: story
|
|
4303
4332
|
})));
|
|
4304
4333
|
};
|
|
4305
4334
|
|
|
4306
4335
|
DefaultStoryCard.propTypes = {
|
|
4307
|
-
story:
|
|
4308
|
-
border:
|
|
4309
|
-
isBottom:
|
|
4310
|
-
isHorizontal:
|
|
4311
|
-
aspectRatio:
|
|
4312
|
-
isHorizontalMobile:
|
|
4313
|
-
centerAlign:
|
|
4314
|
-
headerLevel:
|
|
4315
|
-
borderColor:
|
|
4316
|
-
hideAuthorImage:
|
|
4317
|
-
prefix:
|
|
4318
|
-
config:
|
|
4319
|
-
isHorizontalWithImageLast:
|
|
4336
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
4337
|
+
border: PropTypes__default["default"].oneOfType([PropTypes__default["default"].string]),
|
|
4338
|
+
isBottom: PropTypes__default["default"].bool,
|
|
4339
|
+
isHorizontal: PropTypes__default["default"].bool,
|
|
4340
|
+
aspectRatio: PropTypes__default["default"].oneOfType([PropTypes__default["default"].array]),
|
|
4341
|
+
isHorizontalMobile: PropTypes__default["default"].bool,
|
|
4342
|
+
centerAlign: PropTypes__default["default"].bool,
|
|
4343
|
+
headerLevel: PropTypes__default["default"].string,
|
|
4344
|
+
borderColor: PropTypes__default["default"].string,
|
|
4345
|
+
hideAuthorImage: PropTypes__default["default"].bool,
|
|
4346
|
+
prefix: PropTypes__default["default"].string,
|
|
4347
|
+
config: PropTypes__default["default"].object,
|
|
4348
|
+
isHorizontalWithImageLast: PropTypes__default["default"].bool
|
|
4320
4349
|
};
|
|
4321
4350
|
StoryCard.propTypes = {
|
|
4322
4351
|
/** The Story Object from the API response */
|
|
4323
|
-
story:
|
|
4324
|
-
children:
|
|
4352
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
4353
|
+
children: PropTypes__default["default"].node,
|
|
4325
4354
|
|
|
4326
4355
|
/** Flip the Story Card to Horizonal mode */
|
|
4327
|
-
isHorizontal:
|
|
4356
|
+
isHorizontal: PropTypes__default["default"].bool,
|
|
4328
4357
|
|
|
4329
4358
|
/** Add border to the Story Card */
|
|
4330
|
-
border:
|
|
4359
|
+
border: PropTypes__default["default"].oneOfType([PropTypes__default["default"].string]),
|
|
4331
4360
|
// story card with background image
|
|
4332
|
-
useImageAsBackground:
|
|
4361
|
+
useImageAsBackground: PropTypes__default["default"].bool,
|
|
4333
4362
|
// story card content overlap with image
|
|
4334
|
-
bgImgContentOverlap:
|
|
4363
|
+
bgImgContentOverlap: PropTypes__default["default"].bool,
|
|
4335
4364
|
|
|
4336
4365
|
/** add aspect ratio for hero image */
|
|
4337
|
-
aspectRatio:
|
|
4366
|
+
aspectRatio: PropTypes__default["default"].oneOfType([PropTypes__default["default"].array]),
|
|
4338
4367
|
|
|
4339
4368
|
/** add theme(dark /light/custom color) for storycard */
|
|
4340
|
-
theme:
|
|
4369
|
+
theme: PropTypes__default["default"].string,
|
|
4341
4370
|
|
|
4342
4371
|
/** flip the story card mobile design horizontal */
|
|
4343
|
-
isHorizontalMobile:
|
|
4372
|
+
isHorizontalMobile: PropTypes__default["default"].bool,
|
|
4344
4373
|
// make content center align in desktop and left align in mobile
|
|
4345
|
-
centerAlign:
|
|
4346
|
-
headerLevel:
|
|
4347
|
-
borderColor:
|
|
4374
|
+
centerAlign: PropTypes__default["default"].bool,
|
|
4375
|
+
headerLevel: PropTypes__default["default"].string,
|
|
4376
|
+
borderColor: PropTypes__default["default"].string,
|
|
4348
4377
|
// handle author image through storycard
|
|
4349
|
-
hideAuthorImage:
|
|
4378
|
+
hideAuthorImage: PropTypes__default["default"].bool,
|
|
4350
4379
|
// handle author prefix through storycard
|
|
4351
|
-
prefix:
|
|
4352
|
-
config:
|
|
4353
|
-
isHorizontalWithImageLast:
|
|
4380
|
+
prefix: PropTypes__default["default"].string,
|
|
4381
|
+
config: PropTypes__default["default"].object,
|
|
4382
|
+
isHorizontalWithImageLast: PropTypes__default["default"].bool
|
|
4354
4383
|
};
|
|
4355
4384
|
StoryCard.defaultProps = {
|
|
4356
4385
|
isHorizontal: false,
|
|
@@ -4375,28 +4404,28 @@ var FlexCard = function FlexCard(_ref) {
|
|
|
4375
4404
|
theme = _config$theme === void 0 ? "" : _config$theme,
|
|
4376
4405
|
_config$localizationC = config.localizationConfig,
|
|
4377
4406
|
localizationConfig = _config$localizationC === void 0 ? {} : _config$localizationC;
|
|
4378
|
-
return /*#__PURE__*/
|
|
4407
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4379
4408
|
className: "three-col-flex-stories-m_card__2uZ3Q"
|
|
4380
|
-
}, /*#__PURE__*/
|
|
4409
|
+
}, /*#__PURE__*/React__default["default"].createElement(StoryCard, {
|
|
4381
4410
|
story: story,
|
|
4382
4411
|
isHorizontal: true,
|
|
4383
4412
|
theme: theme,
|
|
4384
4413
|
border: border,
|
|
4385
4414
|
borderColor: borderColor,
|
|
4386
4415
|
config: config
|
|
4387
|
-
}, /*#__PURE__*/
|
|
4416
|
+
}, /*#__PURE__*/React__default["default"].createElement(HeroImage, {
|
|
4388
4417
|
story: story,
|
|
4389
4418
|
aspectRatio: [[9, 5], [9, 5]]
|
|
4390
|
-
}), /*#__PURE__*/
|
|
4419
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4391
4420
|
className: "small-card-container three-col-flex-stories-m_card-content__1z9nt"
|
|
4392
|
-
}, /*#__PURE__*/
|
|
4421
|
+
}, /*#__PURE__*/React__default["default"].createElement(SectionTag, {
|
|
4393
4422
|
story: story,
|
|
4394
4423
|
borderColor: borderColor
|
|
4395
|
-
}), /*#__PURE__*/
|
|
4424
|
+
}), /*#__PURE__*/React__default["default"].createElement(Headline, {
|
|
4396
4425
|
story: story,
|
|
4397
4426
|
headerLevel: "6",
|
|
4398
4427
|
premiumStoryIconConfig: config
|
|
4399
|
-
}), /*#__PURE__*/
|
|
4428
|
+
}), /*#__PURE__*/React__default["default"].createElement(AuthorWithTime, {
|
|
4400
4429
|
config: localizationConfig,
|
|
4401
4430
|
story: story,
|
|
4402
4431
|
prefix: "By"
|
|
@@ -4425,7 +4454,7 @@ var ThreeColFlexStoriesBase = function ThreeColFlexStoriesBase(_ref3) {
|
|
|
4425
4454
|
isLoading = _ref3.isLoading,
|
|
4426
4455
|
isolatedLoadMore = _ref3.isolatedLoadMore,
|
|
4427
4456
|
hideFirstCard = _ref3.hideFirstCard;
|
|
4428
|
-
var collectionItems = collectionToStories(collection);
|
|
4457
|
+
var collectionItems = components.collectionToStories(collection);
|
|
4429
4458
|
|
|
4430
4459
|
if (collectionItems.length < 1) {
|
|
4431
4460
|
return null;
|
|
@@ -4452,9 +4481,9 @@ var ThreeColFlexStoriesBase = function ThreeColFlexStoriesBase(_ref3) {
|
|
|
4452
4481
|
var isAdWidgetEnabled = type === "ad" || type === "widget";
|
|
4453
4482
|
var adWidgetSlot = isAdWidgetEnabled ? getSlot(type, component) : null;
|
|
4454
4483
|
var textColor = getTextColor(theme);
|
|
4455
|
-
var stories = type !== "story" ? collectionItems : collectionToStories(collection);
|
|
4456
|
-
var dispatch = useDispatch();
|
|
4457
|
-
var qtConfig = useSelector(function (state) {
|
|
4484
|
+
var stories = type !== "story" ? collectionItems : components.collectionToStories(collection);
|
|
4485
|
+
var dispatch = reactRedux.useDispatch();
|
|
4486
|
+
var qtConfig = reactRedux.useSelector(function (state) {
|
|
4458
4487
|
return get_1(state, ["qt", "config"], {});
|
|
4459
4488
|
});
|
|
4460
4489
|
|
|
@@ -4462,7 +4491,7 @@ var ThreeColFlexStoriesBase = function ThreeColFlexStoriesBase(_ref3) {
|
|
|
4462
4491
|
if (!isLoadMoreVisible) return null;
|
|
4463
4492
|
|
|
4464
4493
|
if (isolatedLoadMore) {
|
|
4465
|
-
return /*#__PURE__*/
|
|
4494
|
+
return /*#__PURE__*/React__default["default"].createElement(LoadMoreTarget, {
|
|
4466
4495
|
collection: collection,
|
|
4467
4496
|
componentName: "ThreeColFlexStories",
|
|
4468
4497
|
offset: stories.length,
|
|
@@ -4471,7 +4500,7 @@ var ThreeColFlexStoriesBase = function ThreeColFlexStoriesBase(_ref3) {
|
|
|
4471
4500
|
}
|
|
4472
4501
|
|
|
4473
4502
|
var url = generateNavigateSlug(collection, qtConfig);
|
|
4474
|
-
return /*#__PURE__*/
|
|
4503
|
+
return /*#__PURE__*/React__default["default"].createElement(ProgressiveHydration, null, /*#__PURE__*/React__default["default"].createElement(LoadmoreButton, {
|
|
4475
4504
|
config: config,
|
|
4476
4505
|
collection: collection,
|
|
4477
4506
|
template: footerButton,
|
|
@@ -4485,44 +4514,44 @@ var ThreeColFlexStoriesBase = function ThreeColFlexStoriesBase(_ref3) {
|
|
|
4485
4514
|
}));
|
|
4486
4515
|
};
|
|
4487
4516
|
|
|
4488
|
-
return /*#__PURE__*/
|
|
4517
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4489
4518
|
className: "full-width-with-padding arrow-component",
|
|
4490
4519
|
"data-test-id": "three-col-flex-stories",
|
|
4491
4520
|
style: {
|
|
4492
4521
|
backgroundColor: theme,
|
|
4493
4522
|
color: textColor
|
|
4494
4523
|
}
|
|
4495
|
-
}, /*#__PURE__*/
|
|
4524
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4496
4525
|
className: "three-col-flex-stories-m_wrapper__3SQMq"
|
|
4497
|
-
}, /*#__PURE__*/
|
|
4526
|
+
}, /*#__PURE__*/React__default["default"].createElement(CollectionName, {
|
|
4498
4527
|
collection: collection,
|
|
4499
4528
|
collectionNameTemplate: collectionNameTemplate,
|
|
4500
4529
|
collectionNameBorderColor: collectionNameBorderColor,
|
|
4501
4530
|
headerLevel: "2"
|
|
4502
|
-
}), isAdWidgetEnabled && !hideFirstCard ? /*#__PURE__*/
|
|
4531
|
+
}), isAdWidgetEnabled && !hideFirstCard ? /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4503
4532
|
className: "three-col-flex-stories-m_row-with-ad__1gPPN"
|
|
4504
|
-
}, /*#__PURE__*/
|
|
4533
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4505
4534
|
className: "three-col-flex-stories-m_card-with-ad__32z5M"
|
|
4506
4535
|
}, stories.slice(0, 4).map(function (story) {
|
|
4507
|
-
return /*#__PURE__*/
|
|
4536
|
+
return /*#__PURE__*/React__default["default"].createElement(FlexCard, {
|
|
4508
4537
|
story: story,
|
|
4509
4538
|
config: config,
|
|
4510
4539
|
key: story.id
|
|
4511
4540
|
});
|
|
4512
|
-
})), /*#__PURE__*/
|
|
4541
|
+
})), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4513
4542
|
className: "three-col-flex-stories-m_ad-wrapper__3dmfM"
|
|
4514
|
-
}, adWidgetSlot)), /*#__PURE__*/
|
|
4543
|
+
}, adWidgetSlot)), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4515
4544
|
className: "three-col-flex-stories-m_card-row__3WMb3"
|
|
4516
4545
|
}, stories.slice(4).map(function (story) {
|
|
4517
|
-
return /*#__PURE__*/
|
|
4546
|
+
return /*#__PURE__*/React__default["default"].createElement(FlexCard, {
|
|
4518
4547
|
story: story,
|
|
4519
4548
|
config: config,
|
|
4520
4549
|
key: story.id
|
|
4521
4550
|
});
|
|
4522
|
-
}))) : /*#__PURE__*/
|
|
4551
|
+
}))) : /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4523
4552
|
className: "three-col-flex-stories-m_card-row__3WMb3"
|
|
4524
4553
|
}, stories.map(function (story) {
|
|
4525
|
-
return /*#__PURE__*/
|
|
4554
|
+
return /*#__PURE__*/React__default["default"].createElement(FlexCard, {
|
|
4526
4555
|
story: story,
|
|
4527
4556
|
config: config,
|
|
4528
4557
|
key: story.id
|
|
@@ -4536,32 +4565,32 @@ var ThreeColFlexStoriesBase = function ThreeColFlexStoriesBase(_ref3) {
|
|
|
4536
4565
|
};
|
|
4537
4566
|
ThreeColFlexStoriesBase.propTypes = {
|
|
4538
4567
|
/** collection is the array of objects which is returning by API */
|
|
4539
|
-
collection:
|
|
4568
|
+
collection: PropTypes__default["default"].object.isRequired,
|
|
4540
4569
|
|
|
4541
4570
|
/** The config for the Row */
|
|
4542
|
-
config:
|
|
4543
|
-
borderColor:
|
|
4544
|
-
theme:
|
|
4545
|
-
border:
|
|
4546
|
-
slotConfig:
|
|
4547
|
-
footerButton:
|
|
4548
|
-
collectionNameTemplate:
|
|
4549
|
-
collectionNameBorderColor:
|
|
4550
|
-
subsequentLoadCount:
|
|
4571
|
+
config: PropTypes__default["default"].shape({
|
|
4572
|
+
borderColor: PropTypes__default["default"].string,
|
|
4573
|
+
theme: PropTypes__default["default"].string,
|
|
4574
|
+
border: PropTypes__default["default"].string,
|
|
4575
|
+
slotConfig: PropTypes__default["default"].array,
|
|
4576
|
+
footerButton: PropTypes__default["default"].string,
|
|
4577
|
+
collectionNameTemplate: PropTypes__default["default"].string,
|
|
4578
|
+
collectionNameBorderColor: PropTypes__default["default"].string,
|
|
4579
|
+
subsequentLoadCount: PropTypes__default["default"].number
|
|
4551
4580
|
}),
|
|
4552
|
-
getMoreStories:
|
|
4553
|
-
isLoadMoreVisible:
|
|
4554
|
-
isLoading:
|
|
4555
|
-
isolatedLoadMore:
|
|
4556
|
-
hideFirstCard:
|
|
4581
|
+
getMoreStories: PropTypes__default["default"].func,
|
|
4582
|
+
isLoadMoreVisible: PropTypes__default["default"].bool,
|
|
4583
|
+
isLoading: PropTypes__default["default"].bool,
|
|
4584
|
+
isolatedLoadMore: PropTypes__default["default"].bool,
|
|
4585
|
+
hideFirstCard: PropTypes__default["default"].bool
|
|
4557
4586
|
};
|
|
4558
4587
|
FlexCard.propTypes = {
|
|
4559
|
-
story:
|
|
4560
|
-
config:
|
|
4561
|
-
borderColor:
|
|
4562
|
-
theme:
|
|
4563
|
-
border:
|
|
4564
|
-
localizationConfig:
|
|
4588
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
4589
|
+
config: PropTypes__default["default"].shape({
|
|
4590
|
+
borderColor: PropTypes__default["default"].string,
|
|
4591
|
+
theme: PropTypes__default["default"].string,
|
|
4592
|
+
border: PropTypes__default["default"].string,
|
|
4593
|
+
localizationConfig: PropTypes__default["default"].object
|
|
4565
4594
|
})
|
|
4566
4595
|
};
|
|
4567
4596
|
ThreeColFlexStoriesBase.defaultProps = {
|
|
@@ -4572,4 +4601,5 @@ ThreeColFlexStoriesBase.defaultProps = {
|
|
|
4572
4601
|
};
|
|
4573
4602
|
var ThreeColFlexStories = StateProvider(ThreeColFlexStoriesBase);
|
|
4574
4603
|
|
|
4575
|
-
|
|
4604
|
+
exports.ThreeColFlexStories = ThreeColFlexStories;
|
|
4605
|
+
exports.ThreeColFlexStoriesBase = ThreeColFlexStoriesBase;
|