@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,9 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var PropTypes = require('prop-types');
|
|
6
|
+
var React = require('react');
|
|
7
|
+
var Timeago = require('react-timeago');
|
|
8
|
+
var dateFnsTz = require('date-fns-tz');
|
|
9
|
+
var components = require('@quintype/components');
|
|
10
|
+
var reactRedux = require('react-redux');
|
|
11
|
+
|
|
12
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
13
|
+
|
|
14
|
+
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
15
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
16
|
+
var Timeago__default = /*#__PURE__*/_interopDefaultLegacy(Timeago);
|
|
7
17
|
|
|
8
18
|
function _defineProperty(obj, key, value) {
|
|
9
19
|
if (key in obj) {
|
|
@@ -2772,15 +2782,15 @@ var isEmpty = function isEmpty(value) {
|
|
|
2772
2782
|
return value == null || // From standard.js: Always use === - but value == null is allowed to check null || undefined
|
|
2773
2783
|
_typeof(value) === "object" && Object.entries(value).length === 0 && value.constructor === Object || typeof value === "string" && value.trim().length === 0;
|
|
2774
2784
|
};
|
|
2775
|
-
|
|
2776
|
-
"sketches-host":
|
|
2777
|
-
"cdn-name":
|
|
2778
|
-
"cdn-image":
|
|
2785
|
+
PropTypes__default["default"].shape({
|
|
2786
|
+
"sketches-host": PropTypes__default["default"].string,
|
|
2787
|
+
"cdn-name": PropTypes__default["default"].string,
|
|
2788
|
+
"cdn-image": PropTypes__default["default"].string
|
|
2779
2789
|
});
|
|
2780
|
-
|
|
2781
|
-
headline:
|
|
2782
|
-
"last-published-at":
|
|
2783
|
-
subheadline:
|
|
2790
|
+
PropTypes__default["default"].shape({
|
|
2791
|
+
headline: PropTypes__default["default"].string,
|
|
2792
|
+
"last-published-at": PropTypes__default["default"].number,
|
|
2793
|
+
subheadline: PropTypes__default["default"].string
|
|
2784
2794
|
});
|
|
2785
2795
|
var getStoryUrl = function getStoryUrl(story) {
|
|
2786
2796
|
var defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
|
|
@@ -2859,17 +2869,17 @@ var getTimeStamp = function getTimeStamp(date, _formatter) {
|
|
|
2859
2869
|
var timezone = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;
|
|
2860
2870
|
|
|
2861
2871
|
if (timezone && template === "story") {
|
|
2862
|
-
var zonedTime = timezone && utcToZonedTime(date, timezone);
|
|
2863
|
-
var formatZonedTime = zonedTime && format(zonedTime, "yyyy-MM-dd'T'HH:mm:ssXXX", {
|
|
2872
|
+
var zonedTime = timezone && dateFnsTz.utcToZonedTime(date, timezone);
|
|
2873
|
+
var formatZonedTime = zonedTime && dateFnsTz.format(zonedTime, "yyyy-MM-dd'T'HH:mm:ssXXX", {
|
|
2864
2874
|
timeZone: timezone
|
|
2865
2875
|
});
|
|
2866
2876
|
var timeStamp = timestampToFormat("", "", "", date, config);
|
|
2867
|
-
return /*#__PURE__*/
|
|
2877
|
+
return /*#__PURE__*/React__default["default"].createElement("time", {
|
|
2868
2878
|
dateTime: formatZonedTime
|
|
2869
2879
|
}, timeStamp);
|
|
2870
2880
|
}
|
|
2871
2881
|
|
|
2872
|
-
return /*#__PURE__*/
|
|
2882
|
+
return /*#__PURE__*/React__default["default"].createElement(Timeago__default["default"], {
|
|
2873
2883
|
date: date,
|
|
2874
2884
|
formatter: function formatter(value, unit, suffix, date) {
|
|
2875
2885
|
return _formatter(value, unit, suffix, date, config);
|
|
@@ -2877,21 +2887,21 @@ var getTimeStamp = function getTimeStamp(date, _formatter) {
|
|
|
2877
2887
|
});
|
|
2878
2888
|
};
|
|
2879
2889
|
|
|
2880
|
-
var StateContext = /*#__PURE__*/createContext(); // eslint-disable-next-line react/display-name
|
|
2890
|
+
var StateContext = /*#__PURE__*/React.createContext(); // eslint-disable-next-line react/display-name
|
|
2881
2891
|
|
|
2882
2892
|
var StateProvider = function StateProvider(RowComponent) {
|
|
2883
2893
|
return function (props) {
|
|
2884
2894
|
return (
|
|
2885
2895
|
/*#__PURE__*/
|
|
2886
2896
|
// eslint-disable-next-line react/prop-types
|
|
2887
|
-
|
|
2897
|
+
React__default["default"].createElement(StateContext.Provider, {
|
|
2888
2898
|
value: props.config
|
|
2889
|
-
}, /*#__PURE__*/
|
|
2899
|
+
}, /*#__PURE__*/React__default["default"].createElement(RowComponent, props))
|
|
2890
2900
|
);
|
|
2891
2901
|
};
|
|
2892
2902
|
};
|
|
2893
2903
|
var useStateValue = function useStateValue() {
|
|
2894
|
-
return useContext(StateContext);
|
|
2904
|
+
return React.useContext(StateContext);
|
|
2895
2905
|
};
|
|
2896
2906
|
|
|
2897
2907
|
var _styleModuleImportMap$e = {
|
|
@@ -2913,18 +2923,18 @@ var TimeStamp = function TimeStamp(_ref) {
|
|
|
2913
2923
|
var time = story["last-published-at"] || story["first-published-at"];
|
|
2914
2924
|
var isBottomClasses = isBottom ? "bottom-fix" : "";
|
|
2915
2925
|
var textColor = getTextColor(configState.theme);
|
|
2916
|
-
return /*#__PURE__*/
|
|
2926
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isTime && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2917
2927
|
"data-test-id": "publish-time",
|
|
2918
2928
|
className: "time arr--publish-time " + _getClassName("time ".concat(textColor, " ").concat(isBottomClasses), _styleModuleImportMap$e)
|
|
2919
|
-
}, /*#__PURE__*/
|
|
2929
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2920
2930
|
className: "timestamp-m_time-wrapper__3O2lM"
|
|
2921
2931
|
}, getTimeStamp(time, formatter, config))));
|
|
2922
2932
|
};
|
|
2923
2933
|
TimeStamp.propTypes = {
|
|
2924
2934
|
/** The Story Object from the API response */
|
|
2925
|
-
story:
|
|
2926
|
-
isBottom:
|
|
2927
|
-
config:
|
|
2935
|
+
story: PropTypes__default["default"].object,
|
|
2936
|
+
isBottom: PropTypes__default["default"].bool,
|
|
2937
|
+
config: PropTypes__default["default"].object
|
|
2928
2938
|
};
|
|
2929
2939
|
|
|
2930
2940
|
var _styleModuleImportMap$d = {
|
|
@@ -2967,10 +2977,10 @@ var AuthorBase = function AuthorBase(_ref) {
|
|
|
2967
2977
|
return null;
|
|
2968
2978
|
}
|
|
2969
2979
|
|
|
2970
|
-
return /*#__PURE__*/
|
|
2980
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2971
2981
|
"data-test-id": "author-image",
|
|
2972
2982
|
className: _getClassName("author-image ".concat(dir, "-image"), _styleModuleImportMap$d)
|
|
2973
|
-
}, /*#__PURE__*/
|
|
2983
|
+
}, /*#__PURE__*/React__default["default"].createElement("figure", null, avatarS3Key ? /*#__PURE__*/React__default["default"].createElement(components.ResponsiveImage, {
|
|
2974
2984
|
slug: avatarS3Key,
|
|
2975
2985
|
"aspect-ratio": [1, 1],
|
|
2976
2986
|
defaultWidth: 400,
|
|
@@ -2978,14 +2988,14 @@ var AuthorBase = function AuthorBase(_ref) {
|
|
|
2978
2988
|
auto: ["format", "compress"]
|
|
2979
2989
|
},
|
|
2980
2990
|
alt: authorName
|
|
2981
|
-
}) : /*#__PURE__*/
|
|
2991
|
+
}) : /*#__PURE__*/React__default["default"].createElement("img", {
|
|
2982
2992
|
src: avatarUrl
|
|
2983
2993
|
})));
|
|
2984
2994
|
};
|
|
2985
2995
|
|
|
2986
2996
|
var isPrefix = function isPrefix(dir) {
|
|
2987
2997
|
if (prefix) {
|
|
2988
|
-
return /*#__PURE__*/
|
|
2998
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2989
2999
|
className: "arr-author-prefix " + _getClassName("prefix ".concat(textColor), _styleModuleImportMap$d)
|
|
2990
3000
|
}, prefix);
|
|
2991
3001
|
}
|
|
@@ -2993,11 +3003,11 @@ var AuthorBase = function AuthorBase(_ref) {
|
|
|
2993
3003
|
return !hideAuthorImage && authorImage(dir);
|
|
2994
3004
|
};
|
|
2995
3005
|
|
|
2996
|
-
return /*#__PURE__*/
|
|
3006
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isAuthor && /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
2997
3007
|
href: "".concat(mountAt, "/author/") + slug,
|
|
2998
3008
|
"aria-label": "author-name",
|
|
2999
3009
|
className: "author-name arr-author-name arrow-component " + _getClassName("author ".concat(isBottomClasses), _styleModuleImportMap$d)
|
|
3000
|
-
}, isPrefix("ltr"), /*#__PURE__*/
|
|
3010
|
+
}, isPrefix("ltr"), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3001
3011
|
"data-test-id": "author-name",
|
|
3002
3012
|
className: "author-name " + _getClassName("author-name ".concat(textColor), _styleModuleImportMap$d)
|
|
3003
3013
|
}, authorName || story["author-name"]), !prefix && isPrefix("rtl")));
|
|
@@ -3009,18 +3019,18 @@ function mapStateToProps$1(state) {
|
|
|
3009
3019
|
};
|
|
3010
3020
|
}
|
|
3011
3021
|
|
|
3012
|
-
var Author = connect(mapStateToProps$1)(AuthorBase);
|
|
3022
|
+
var Author = reactRedux.connect(mapStateToProps$1)(AuthorBase);
|
|
3013
3023
|
AuthorBase.propTypes = {
|
|
3014
3024
|
/** The Story Object from the API response */
|
|
3015
|
-
story:
|
|
3025
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
3016
3026
|
|
|
3017
3027
|
/** Hide Author Avatar Image */
|
|
3018
|
-
hideAuthorImage:
|
|
3028
|
+
hideAuthorImage: PropTypes__default["default"].bool,
|
|
3019
3029
|
// fix Author bottom of the storyCard
|
|
3020
|
-
isBottom:
|
|
3030
|
+
isBottom: PropTypes__default["default"].bool,
|
|
3021
3031
|
// fix prefix before the author name
|
|
3022
|
-
prefix:
|
|
3023
|
-
config:
|
|
3032
|
+
prefix: PropTypes__default["default"].string,
|
|
3033
|
+
config: PropTypes__default["default"].object
|
|
3024
3034
|
};
|
|
3025
3035
|
AuthorBase.defaultProps = {
|
|
3026
3036
|
hideAuthorImage: false,
|
|
@@ -3041,14 +3051,14 @@ var Dot = function Dot(_ref) {
|
|
|
3041
3051
|
height = _ref$height === void 0 ? "3px" : _ref$height,
|
|
3042
3052
|
_ref$color = _ref.color,
|
|
3043
3053
|
color = _ref$color === void 0 ? "light" : _ref$color;
|
|
3044
|
-
return /*#__PURE__*/
|
|
3054
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3045
3055
|
className: _getClassName(color, _styleModuleImportMap$c)
|
|
3046
|
-
}, /*#__PURE__*/
|
|
3056
|
+
}, /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3047
3057
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3048
3058
|
width: width,
|
|
3049
3059
|
height: height,
|
|
3050
3060
|
viewBox: "0 0 3 3"
|
|
3051
|
-
}, /*#__PURE__*/
|
|
3061
|
+
}, /*#__PURE__*/React__default["default"].createElement("circle", {
|
|
3052
3062
|
cx: "87",
|
|
3053
3063
|
cy: "9",
|
|
3054
3064
|
r: "1",
|
|
@@ -3059,9 +3069,9 @@ var Dot = function Dot(_ref) {
|
|
|
3059
3069
|
};
|
|
3060
3070
|
Dot.propTypes = {
|
|
3061
3071
|
/** height , width and color of the dot icon */
|
|
3062
|
-
color:
|
|
3063
|
-
width:
|
|
3064
|
-
height:
|
|
3072
|
+
color: PropTypes__default["default"].string,
|
|
3073
|
+
width: PropTypes__default["default"].string,
|
|
3074
|
+
height: PropTypes__default["default"].string
|
|
3065
3075
|
};
|
|
3066
3076
|
|
|
3067
3077
|
var _styleModuleImportMap$b = {
|
|
@@ -3077,22 +3087,22 @@ var Divider = function Divider(_ref) {
|
|
|
3077
3087
|
height = _ref$height === void 0 ? "10" : _ref$height,
|
|
3078
3088
|
_ref$color = _ref.color,
|
|
3079
3089
|
color = _ref$color === void 0 ? "light" : _ref$color;
|
|
3080
|
-
return /*#__PURE__*/
|
|
3090
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3081
3091
|
className: _getClassName(color, _styleModuleImportMap$b)
|
|
3082
|
-
}, /*#__PURE__*/
|
|
3092
|
+
}, /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3083
3093
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3084
3094
|
width: width,
|
|
3085
3095
|
height: height
|
|
3086
|
-
}, /*#__PURE__*/
|
|
3096
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3087
3097
|
fill: "inherit",
|
|
3088
3098
|
d: "M0 0h1v10H0z"
|
|
3089
3099
|
})));
|
|
3090
3100
|
};
|
|
3091
3101
|
Divider.propTypes = {
|
|
3092
3102
|
/** height , width and color of the dot icon */
|
|
3093
|
-
color:
|
|
3094
|
-
width:
|
|
3095
|
-
height:
|
|
3103
|
+
color: PropTypes__default["default"].string,
|
|
3104
|
+
width: PropTypes__default["default"].string,
|
|
3105
|
+
height: PropTypes__default["default"].string
|
|
3096
3106
|
};
|
|
3097
3107
|
|
|
3098
3108
|
var _styleModuleImportMap$a = {
|
|
@@ -3115,23 +3125,23 @@ var ReadTime = function ReadTime(_ref) {
|
|
|
3115
3125
|
var textColor = isLightTheme ? "light" : getTextColor(config.theme);
|
|
3116
3126
|
if (!showReadTime || !readTime) return null;
|
|
3117
3127
|
var timeToRead = get_1(opts, ["localizedTimeToRead"]) || "min read";
|
|
3118
|
-
return /*#__PURE__*/
|
|
3128
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3119
3129
|
"data-test-id": "read-time",
|
|
3120
3130
|
className: "arrow-component arr--read-time " + _getClassName("read-time-wrapper ".concat(textColor), _styleModuleImportMap$a)
|
|
3121
|
-
}, /*#__PURE__*/
|
|
3131
|
+
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
3122
3132
|
className: "read-time-indicator read-time-m_dot-indicator__3Sqh2"
|
|
3123
|
-
}, /*#__PURE__*/
|
|
3133
|
+
}, /*#__PURE__*/React__default["default"].createElement(Dot, {
|
|
3124
3134
|
color: textColor
|
|
3125
|
-
})), /*#__PURE__*/
|
|
3135
|
+
})), /*#__PURE__*/React__default["default"].createElement("span", null, readTime, " ", timeToRead)));
|
|
3126
3136
|
};
|
|
3127
3137
|
ReadTime.propTypes = {
|
|
3128
|
-
story:
|
|
3129
|
-
"read-time":
|
|
3138
|
+
story: PropTypes__default["default"].shape({
|
|
3139
|
+
"read-time": PropTypes__default["default"].number
|
|
3130
3140
|
}),
|
|
3131
|
-
opts:
|
|
3132
|
-
showReadTime:
|
|
3141
|
+
opts: PropTypes__default["default"].shape({
|
|
3142
|
+
showReadTime: PropTypes__default["default"].bool
|
|
3133
3143
|
}),
|
|
3134
|
-
isLightTheme:
|
|
3144
|
+
isLightTheme: PropTypes__default["default"].bool
|
|
3135
3145
|
};
|
|
3136
3146
|
|
|
3137
3147
|
var _styleModuleImportMap$9 = {
|
|
@@ -3162,33 +3172,33 @@ var AuthorWithTime = function AuthorWithTime(_ref) {
|
|
|
3162
3172
|
|
|
3163
3173
|
var getSeparator = function getSeparator() {
|
|
3164
3174
|
if (separator === "divider") {
|
|
3165
|
-
return /*#__PURE__*/
|
|
3175
|
+
return /*#__PURE__*/React__default["default"].createElement(Divider, {
|
|
3166
3176
|
color: textColor
|
|
3167
3177
|
});
|
|
3168
3178
|
}
|
|
3169
3179
|
|
|
3170
|
-
return /*#__PURE__*/
|
|
3180
|
+
return /*#__PURE__*/React__default["default"].createElement(Dot, {
|
|
3171
3181
|
color: textColor
|
|
3172
3182
|
});
|
|
3173
3183
|
};
|
|
3174
3184
|
|
|
3175
3185
|
var getTimeStamp = function getTimeStamp() {
|
|
3176
3186
|
if (!isTime) return null;
|
|
3177
|
-
return /*#__PURE__*/
|
|
3187
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isAuthor && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
3178
3188
|
className: "arr-separator " + _getClassName("".concat(seperatorStyle), _styleModuleImportMap$9)
|
|
3179
|
-
}, getSeparator()), /*#__PURE__*/
|
|
3189
|
+
}, getSeparator()), /*#__PURE__*/React__default["default"].createElement(TimeStamp, {
|
|
3180
3190
|
story: story,
|
|
3181
3191
|
config: config
|
|
3182
|
-
}), isReadTime && /*#__PURE__*/
|
|
3192
|
+
}), isReadTime && /*#__PURE__*/React__default["default"].createElement(ReadTime, {
|
|
3183
3193
|
story: story,
|
|
3184
3194
|
opts: config,
|
|
3185
3195
|
isLightTheme: isLightTheme
|
|
3186
3196
|
}));
|
|
3187
3197
|
};
|
|
3188
3198
|
|
|
3189
|
-
return /*#__PURE__*/
|
|
3199
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3190
3200
|
className: "arr--author-time " + _getClassName("author-time-wrapper ".concat(isBottomClasses), _styleModuleImportMap$9)
|
|
3191
|
-
}, isAuthor ? /*#__PURE__*/
|
|
3201
|
+
}, isAuthor ? /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(Author, {
|
|
3192
3202
|
story: story,
|
|
3193
3203
|
isBottom: true,
|
|
3194
3204
|
hideAuthorImage: hideAuthorImage,
|
|
@@ -3196,19 +3206,19 @@ var AuthorWithTime = function AuthorWithTime(_ref) {
|
|
|
3196
3206
|
}), getTimeStamp()) : getTimeStamp());
|
|
3197
3207
|
};
|
|
3198
3208
|
AuthorWithTime.propTypes = {
|
|
3199
|
-
story:
|
|
3209
|
+
story: PropTypes__default["default"].object,
|
|
3200
3210
|
|
|
3201
3211
|
/** Style of separator between the Author & Timestamp */
|
|
3202
|
-
separator:
|
|
3212
|
+
separator: PropTypes__default["default"].oneOf(["dot", "divider"]),
|
|
3203
3213
|
|
|
3204
3214
|
/** hide the author image */
|
|
3205
|
-
hideAuthorImage:
|
|
3215
|
+
hideAuthorImage: PropTypes__default["default"].bool,
|
|
3206
3216
|
// fix author and time at the end
|
|
3207
|
-
isBottom:
|
|
3217
|
+
isBottom: PropTypes__default["default"].bool,
|
|
3208
3218
|
// fix prefix before the author name
|
|
3209
|
-
prefix:
|
|
3210
|
-
config:
|
|
3211
|
-
isLightTheme:
|
|
3219
|
+
prefix: PropTypes__default["default"].string,
|
|
3220
|
+
config: PropTypes__default["default"].object,
|
|
3221
|
+
isLightTheme: PropTypes__default["default"].bool
|
|
3212
3222
|
};
|
|
3213
3223
|
AuthorWithTime.defaultProps = {
|
|
3214
3224
|
separator: "dot",
|
|
@@ -3254,7 +3264,7 @@ var CollectionNameBase = function CollectionNameBase(_ref) {
|
|
|
3254
3264
|
var borderBottomFullStyle = templateStyle.includes("collection-borderBottomFull") ? "4px solid ".concat(CollectionNameBorderColor) : "";
|
|
3255
3265
|
|
|
3256
3266
|
var borderBottomStyle = function borderBottomStyle() {
|
|
3257
|
-
return templateStyle.includes("collection-borderBottom") && !templateStyle.includes("collection-borderBottomFull") ? /*#__PURE__*/
|
|
3267
|
+
return templateStyle.includes("collection-borderBottom") && !templateStyle.includes("collection-borderBottomFull") ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3258
3268
|
className: "collection-name-m_border-bottom__1MnlV",
|
|
3259
3269
|
style: {
|
|
3260
3270
|
borderBottom: "4px solid ".concat(CollectionNameBorderColor)
|
|
@@ -3314,40 +3324,40 @@ var CollectionNameBase = function CollectionNameBase(_ref) {
|
|
|
3314
3324
|
}
|
|
3315
3325
|
};
|
|
3316
3326
|
|
|
3317
|
-
return /*#__PURE__*/
|
|
3327
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, showRowTitle && collectionName && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3318
3328
|
style: {
|
|
3319
3329
|
borderBottom: borderBottomFullStyle
|
|
3320
3330
|
},
|
|
3321
3331
|
"data-test-id": "collection-name",
|
|
3322
3332
|
className: ("arr--collection-name arrow-component ".concat(templateStyle) ? "arr--collection-name arrow-component ".concat(templateStyle) + " " : "") + _getClassName("collection ".concat(textColor, " ").concat(templateStyle), _styleModuleImportMap$8)
|
|
3323
|
-
}, templateStyle.includes("collection-borderLeft") && /*#__PURE__*/
|
|
3333
|
+
}, templateStyle.includes("collection-borderLeft") && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
3324
3334
|
className: "arr-collection-name-border-left collection-name-m_border-left__3_pYw",
|
|
3325
3335
|
style: {
|
|
3326
3336
|
color: CollectionNameBorderColor,
|
|
3327
3337
|
fontSize: getBorderHeight()
|
|
3328
3338
|
}
|
|
3329
|
-
}), slug && !slug.includes(undefined) ? /*#__PURE__*/
|
|
3339
|
+
}), slug && !slug.includes(undefined) ? /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
3330
3340
|
href: slug,
|
|
3331
3341
|
"aria-label": "collection-name"
|
|
3332
|
-
}, /*#__PURE__*/
|
|
3342
|
+
}, /*#__PURE__*/React__default["default"].createElement(HeaderTag, null, collectionName)) : /*#__PURE__*/React__default["default"].createElement(HeaderTag, null, collectionName), borderBottomStyle()));
|
|
3333
3343
|
};
|
|
3334
3344
|
CollectionNameBase.propTypes = {
|
|
3335
3345
|
/** Collection name border color */
|
|
3336
|
-
collectionNameBorderColor: PropTypes
|
|
3346
|
+
collectionNameBorderColor: PropTypes.PropTypes.string,
|
|
3337
3347
|
|
|
3338
3348
|
/** The Collection Object from the API response */
|
|
3339
|
-
collection: PropTypes
|
|
3349
|
+
collection: PropTypes.PropTypes.object,
|
|
3340
3350
|
|
|
3341
3351
|
/** The publisher config from the API response */
|
|
3342
|
-
config: PropTypes
|
|
3352
|
+
config: PropTypes.PropTypes.object,
|
|
3343
3353
|
|
|
3344
3354
|
/** The style template for the component */
|
|
3345
|
-
collectionNameTemplate: PropTypes
|
|
3355
|
+
collectionNameTemplate: PropTypes.PropTypes.oneOf(["", "borderLeft", "borderBottom", "crossLine", "borderBottomFull"]),
|
|
3346
3356
|
|
|
3347
3357
|
/** Header tags ranging h1-h6, where h[headerLevel] */
|
|
3348
|
-
headerLevel: PropTypes
|
|
3349
|
-
customCollectionName: PropTypes
|
|
3350
|
-
navigate: PropTypes
|
|
3358
|
+
headerLevel: PropTypes.PropTypes.string,
|
|
3359
|
+
customCollectionName: PropTypes.PropTypes.string,
|
|
3360
|
+
navigate: PropTypes.PropTypes.bool
|
|
3351
3361
|
};
|
|
3352
3362
|
CollectionNameBase.defaultProps = {
|
|
3353
3363
|
collectionNameTemplate: "",
|
|
@@ -3360,7 +3370,7 @@ function mapStateToProps(state) {
|
|
|
3360
3370
|
};
|
|
3361
3371
|
}
|
|
3362
3372
|
|
|
3363
|
-
var CollectionName = connect(mapStateToProps)(CollectionNameBase);
|
|
3373
|
+
var CollectionName = reactRedux.connect(mapStateToProps)(CollectionNameBase);
|
|
3364
3374
|
|
|
3365
3375
|
var CrownIcon = function CrownIcon(_ref) {
|
|
3366
3376
|
var height = _ref.height,
|
|
@@ -3368,7 +3378,7 @@ var CrownIcon = function CrownIcon(_ref) {
|
|
|
3368
3378
|
_ref$color = _ref.color,
|
|
3369
3379
|
color = _ref$color === void 0 ? "#D8D8D8" : _ref$color,
|
|
3370
3380
|
positionTop = _ref.positionTop;
|
|
3371
|
-
return /*#__PURE__*/
|
|
3381
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3372
3382
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3373
3383
|
width: width,
|
|
3374
3384
|
height: height,
|
|
@@ -3377,28 +3387,28 @@ var CrownIcon = function CrownIcon(_ref) {
|
|
|
3377
3387
|
position: "relative",
|
|
3378
3388
|
top: positionTop
|
|
3379
3389
|
}
|
|
3380
|
-
}, /*#__PURE__*/
|
|
3390
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3381
3391
|
fill: "none",
|
|
3382
3392
|
fillRule: "evenodd",
|
|
3383
3393
|
stroke: "none",
|
|
3384
3394
|
strokeWidth: "1"
|
|
3385
|
-
}, /*#__PURE__*/
|
|
3395
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", null, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3386
3396
|
transform: "translate(8 8)"
|
|
3387
|
-
}, /*#__PURE__*/
|
|
3397
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3388
3398
|
d: "M0 0H24V24H0z"
|
|
3389
|
-
}), /*#__PURE__*/
|
|
3399
|
+
}), /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3390
3400
|
fill: color,
|
|
3391
3401
|
fillRule: "nonzero",
|
|
3392
3402
|
transform: "translate(0 2)"
|
|
3393
|
-
}, /*#__PURE__*/
|
|
3403
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3394
3404
|
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"
|
|
3395
3405
|
}))))));
|
|
3396
3406
|
};
|
|
3397
3407
|
CrownIcon.propTypes = {
|
|
3398
|
-
height:
|
|
3399
|
-
width:
|
|
3400
|
-
color:
|
|
3401
|
-
positionTop:
|
|
3408
|
+
height: PropTypes__default["default"].string,
|
|
3409
|
+
width: PropTypes__default["default"].string,
|
|
3410
|
+
color: PropTypes__default["default"].string,
|
|
3411
|
+
positionTop: PropTypes__default["default"].string
|
|
3402
3412
|
};
|
|
3403
3413
|
|
|
3404
3414
|
var KeyIcon = function KeyIcon(_ref) {
|
|
@@ -3407,7 +3417,7 @@ var KeyIcon = function KeyIcon(_ref) {
|
|
|
3407
3417
|
_ref$color = _ref.color,
|
|
3408
3418
|
color = _ref$color === void 0 ? "#D5D5D5" : _ref$color,
|
|
3409
3419
|
positionTop = _ref.positionTop;
|
|
3410
|
-
return /*#__PURE__*/
|
|
3420
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3411
3421
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3412
3422
|
width: width,
|
|
3413
3423
|
height: height,
|
|
@@ -3416,16 +3426,16 @@ var KeyIcon = function KeyIcon(_ref) {
|
|
|
3416
3426
|
position: "relative",
|
|
3417
3427
|
top: positionTop
|
|
3418
3428
|
}
|
|
3419
|
-
}, /*#__PURE__*/
|
|
3429
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3420
3430
|
fill: "none",
|
|
3421
3431
|
fillRule: "evenodd",
|
|
3422
3432
|
stroke: "none",
|
|
3423
3433
|
strokeWidth: "1"
|
|
3424
|
-
}, /*#__PURE__*/
|
|
3434
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", null, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3425
3435
|
transform: "translate(8 8)"
|
|
3426
|
-
}, /*#__PURE__*/
|
|
3436
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3427
3437
|
d: "M0 0H24V24H0z"
|
|
3428
|
-
}), /*#__PURE__*/
|
|
3438
|
+
}), /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3429
3439
|
fill: color,
|
|
3430
3440
|
fillRule: "nonzero",
|
|
3431
3441
|
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",
|
|
@@ -3433,10 +3443,10 @@ var KeyIcon = function KeyIcon(_ref) {
|
|
|
3433
3443
|
})))));
|
|
3434
3444
|
};
|
|
3435
3445
|
KeyIcon.propTypes = {
|
|
3436
|
-
height:
|
|
3437
|
-
width:
|
|
3438
|
-
color:
|
|
3439
|
-
positionTop:
|
|
3446
|
+
height: PropTypes__default["default"].string,
|
|
3447
|
+
width: PropTypes__default["default"].string,
|
|
3448
|
+
color: PropTypes__default["default"].string,
|
|
3449
|
+
positionTop: PropTypes__default["default"].string
|
|
3440
3450
|
};
|
|
3441
3451
|
|
|
3442
3452
|
var LockIcon = function LockIcon(_ref) {
|
|
@@ -3445,7 +3455,7 @@ var LockIcon = function LockIcon(_ref) {
|
|
|
3445
3455
|
_ref$color = _ref.color,
|
|
3446
3456
|
color = _ref$color === void 0 ? "#D5D5D5" : _ref$color,
|
|
3447
3457
|
positionTop = _ref.positionTop;
|
|
3448
|
-
return /*#__PURE__*/
|
|
3458
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3449
3459
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3450
3460
|
width: width,
|
|
3451
3461
|
height: height,
|
|
@@ -3454,28 +3464,28 @@ var LockIcon = function LockIcon(_ref) {
|
|
|
3454
3464
|
position: "relative",
|
|
3455
3465
|
top: positionTop
|
|
3456
3466
|
}
|
|
3457
|
-
}, /*#__PURE__*/
|
|
3467
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3458
3468
|
fill: "none",
|
|
3459
3469
|
fillRule: "evenodd",
|
|
3460
3470
|
stroke: "none",
|
|
3461
3471
|
strokeWidth: "1"
|
|
3462
|
-
}, /*#__PURE__*/
|
|
3472
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", null, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3463
3473
|
transform: "translate(8 8)"
|
|
3464
|
-
}, /*#__PURE__*/
|
|
3474
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3465
3475
|
d: "M0 0H24V24H0z"
|
|
3466
|
-
}), /*#__PURE__*/
|
|
3476
|
+
}), /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3467
3477
|
fill: color,
|
|
3468
3478
|
fillRule: "nonzero",
|
|
3469
3479
|
transform: "translate(3)"
|
|
3470
|
-
}, /*#__PURE__*/
|
|
3480
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3471
3481
|
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"
|
|
3472
3482
|
}))))));
|
|
3473
3483
|
};
|
|
3474
3484
|
LockIcon.propTypes = {
|
|
3475
|
-
height:
|
|
3476
|
-
width:
|
|
3477
|
-
color:
|
|
3478
|
-
positionTop:
|
|
3485
|
+
height: PropTypes__default["default"].string,
|
|
3486
|
+
width: PropTypes__default["default"].string,
|
|
3487
|
+
color: PropTypes__default["default"].string,
|
|
3488
|
+
positionTop: PropTypes__default["default"].string
|
|
3479
3489
|
};
|
|
3480
3490
|
|
|
3481
3491
|
var StarIcon = function StarIcon(_ref) {
|
|
@@ -3485,7 +3495,7 @@ var StarIcon = function StarIcon(_ref) {
|
|
|
3485
3495
|
color = _ref$color === void 0 ? "#D5D5D5" : _ref$color,
|
|
3486
3496
|
_ref$positionTop = _ref.positionTop,
|
|
3487
3497
|
positionTop = _ref$positionTop === void 0 ? "" : _ref$positionTop;
|
|
3488
|
-
return /*#__PURE__*/
|
|
3498
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3489
3499
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3490
3500
|
width: width,
|
|
3491
3501
|
height: height,
|
|
@@ -3494,21 +3504,21 @@ var StarIcon = function StarIcon(_ref) {
|
|
|
3494
3504
|
position: "relative",
|
|
3495
3505
|
top: positionTop
|
|
3496
3506
|
}
|
|
3497
|
-
}, /*#__PURE__*/
|
|
3507
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3498
3508
|
fill: "none",
|
|
3499
3509
|
fillRule: "evenodd",
|
|
3500
3510
|
stroke: "none",
|
|
3501
3511
|
strokeWidth: "1"
|
|
3502
|
-
}, /*#__PURE__*/
|
|
3512
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", null, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3503
3513
|
fill: color,
|
|
3504
3514
|
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"
|
|
3505
3515
|
}))));
|
|
3506
3516
|
};
|
|
3507
3517
|
StarIcon.propTypes = {
|
|
3508
|
-
height:
|
|
3509
|
-
width:
|
|
3510
|
-
color:
|
|
3511
|
-
positionTop:
|
|
3518
|
+
height: PropTypes__default["default"].string,
|
|
3519
|
+
width: PropTypes__default["default"].string,
|
|
3520
|
+
color: PropTypes__default["default"].string,
|
|
3521
|
+
positionTop: PropTypes__default["default"].string
|
|
3512
3522
|
};
|
|
3513
3523
|
|
|
3514
3524
|
var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
@@ -3520,7 +3530,7 @@ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
|
3520
3530
|
|
|
3521
3531
|
switch (iconType) {
|
|
3522
3532
|
case "crown":
|
|
3523
|
-
return /*#__PURE__*/
|
|
3533
|
+
return /*#__PURE__*/React__default["default"].createElement(CrownIcon, {
|
|
3524
3534
|
width: width,
|
|
3525
3535
|
height: height,
|
|
3526
3536
|
color: color,
|
|
@@ -3528,7 +3538,7 @@ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
|
3528
3538
|
});
|
|
3529
3539
|
|
|
3530
3540
|
case "lock":
|
|
3531
|
-
return /*#__PURE__*/
|
|
3541
|
+
return /*#__PURE__*/React__default["default"].createElement(LockIcon, {
|
|
3532
3542
|
width: width,
|
|
3533
3543
|
height: height,
|
|
3534
3544
|
color: color,
|
|
@@ -3536,7 +3546,7 @@ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
|
3536
3546
|
});
|
|
3537
3547
|
|
|
3538
3548
|
case "key":
|
|
3539
|
-
return /*#__PURE__*/
|
|
3549
|
+
return /*#__PURE__*/React__default["default"].createElement(KeyIcon, {
|
|
3540
3550
|
width: width,
|
|
3541
3551
|
height: height,
|
|
3542
3552
|
color: color,
|
|
@@ -3544,7 +3554,7 @@ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
|
3544
3554
|
});
|
|
3545
3555
|
|
|
3546
3556
|
default:
|
|
3547
|
-
return /*#__PURE__*/
|
|
3557
|
+
return /*#__PURE__*/React__default["default"].createElement(StarIcon, {
|
|
3548
3558
|
width: width,
|
|
3549
3559
|
height: height,
|
|
3550
3560
|
color: color,
|
|
@@ -3553,21 +3563,21 @@ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
|
3553
3563
|
}
|
|
3554
3564
|
};
|
|
3555
3565
|
PremiumStoryIcon.propTypes = {
|
|
3556
|
-
width:
|
|
3557
|
-
height:
|
|
3558
|
-
color:
|
|
3559
|
-
iconType:
|
|
3560
|
-
positionTop:
|
|
3566
|
+
width: PropTypes__default["default"].string,
|
|
3567
|
+
height: PropTypes__default["default"].string,
|
|
3568
|
+
color: PropTypes__default["default"].string,
|
|
3569
|
+
iconType: PropTypes__default["default"].string,
|
|
3570
|
+
positionTop: PropTypes__default["default"].string
|
|
3561
3571
|
};
|
|
3562
3572
|
|
|
3563
3573
|
function LiveIcon() {
|
|
3564
|
-
return /*#__PURE__*/
|
|
3574
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3565
3575
|
className: "live-icon",
|
|
3566
3576
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3567
3577
|
width: "25",
|
|
3568
3578
|
height: "24",
|
|
3569
3579
|
viewBox: "0 0 25 24"
|
|
3570
|
-
}, /*#__PURE__*/
|
|
3580
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3571
3581
|
fill: "#ff5858",
|
|
3572
3582
|
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"
|
|
3573
3583
|
}));
|
|
@@ -3624,37 +3634,37 @@ var Headline = function Headline(_ref) {
|
|
|
3624
3634
|
var wrapperClass = premiumStory ? "wrapper" : "";
|
|
3625
3635
|
var iconSize = "24px";
|
|
3626
3636
|
var enableLiveIcon = showLiveIcon && story["story-template"] === "live-blog" && !get_1(story, ["metadata", "is-closed"], false);
|
|
3627
|
-
return /*#__PURE__*/
|
|
3637
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3628
3638
|
"data-test-id": "headline",
|
|
3629
3639
|
className: "arrow-component arr--headline " + _getClassName(wrapperClass, _styleModuleImportMap$7)
|
|
3630
|
-
}, premiumStory && /*#__PURE__*/
|
|
3640
|
+
}, premiumStory && /*#__PURE__*/React__default["default"].createElement(PremiumStoryIcon, {
|
|
3631
3641
|
width: iconSize,
|
|
3632
3642
|
height: iconSize,
|
|
3633
3643
|
color: iconColor,
|
|
3634
3644
|
iconType: iconStyle,
|
|
3635
3645
|
positionTop: positionHeadline()
|
|
3636
|
-
}), isLink ? /*#__PURE__*/
|
|
3646
|
+
}), isLink ? /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
3637
3647
|
href: getStoryUrl(story, "/".concat(story.slug)),
|
|
3638
3648
|
externalLink: isExternalStory(story),
|
|
3639
3649
|
"aria-label": "headline"
|
|
3640
|
-
}, /*#__PURE__*/
|
|
3650
|
+
}, /*#__PURE__*/React__default["default"].createElement(HeaderTag, {
|
|
3641
3651
|
className: _getClassName("headline ".concat(textColor), _styleModuleImportMap$7)
|
|
3642
|
-
}, enableLiveIcon && /*#__PURE__*/
|
|
3652
|
+
}, enableLiveIcon && /*#__PURE__*/React__default["default"].createElement(LiveIcon, null), headline)) : /*#__PURE__*/React__default["default"].createElement(HeaderTag, {
|
|
3643
3653
|
className: _getClassName("headline ".concat(textColor), _styleModuleImportMap$7)
|
|
3644
|
-
}, enableLiveIcon && /*#__PURE__*/
|
|
3654
|
+
}, enableLiveIcon && /*#__PURE__*/React__default["default"].createElement(LiveIcon, null), headline));
|
|
3645
3655
|
};
|
|
3646
3656
|
Headline.propTypes = {
|
|
3647
3657
|
/** The Story Object from the API response */
|
|
3648
|
-
story:
|
|
3658
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
3649
3659
|
|
|
3650
3660
|
/** Header tags ranging h1-h6, where h[headerLevel] */
|
|
3651
|
-
headerLevel:
|
|
3652
|
-
premiumStoryIconConfig:
|
|
3653
|
-
iconColor:
|
|
3654
|
-
iconType:
|
|
3655
|
-
enablePremiumStoryIcon:
|
|
3661
|
+
headerLevel: PropTypes__default["default"].string,
|
|
3662
|
+
premiumStoryIconConfig: PropTypes__default["default"].shape({
|
|
3663
|
+
iconColor: PropTypes__default["default"].string,
|
|
3664
|
+
iconType: PropTypes__default["default"].string,
|
|
3665
|
+
enablePremiumStoryIcon: PropTypes__default["default"].bool
|
|
3656
3666
|
}),
|
|
3657
|
-
isLink:
|
|
3667
|
+
isLink: PropTypes__default["default"].bool
|
|
3658
3668
|
};
|
|
3659
3669
|
Headline.defaultProps = {
|
|
3660
3670
|
headerLevel: "6",
|
|
@@ -3668,27 +3678,27 @@ var ImageFallbackIcon = function ImageFallbackIcon(_ref) {
|
|
|
3668
3678
|
height = _ref$height === void 0 ? 30 : _ref$height,
|
|
3669
3679
|
_ref$iconColor = _ref.iconColor,
|
|
3670
3680
|
iconColor = _ref$iconColor === void 0 ? "#99B0CB" : _ref$iconColor;
|
|
3671
|
-
return /*#__PURE__*/
|
|
3681
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3672
3682
|
width: width,
|
|
3673
3683
|
height: height,
|
|
3674
3684
|
viewBox: "0 0 102 76",
|
|
3675
3685
|
version: "1.1"
|
|
3676
|
-
}, /*#__PURE__*/
|
|
3686
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3677
3687
|
id: "demo-home-copy",
|
|
3678
3688
|
stroke: "none",
|
|
3679
3689
|
strokeWidth: "1",
|
|
3680
3690
|
fill: "none",
|
|
3681
3691
|
fillRule: "evenodd",
|
|
3682
3692
|
transform: "translate(-377.000000, -314.000000)"
|
|
3683
|
-
}, /*#__PURE__*/
|
|
3693
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3684
3694
|
id: "Group-13",
|
|
3685
3695
|
transform: "translate(377.000000, 314.000000)"
|
|
3686
|
-
}, /*#__PURE__*/
|
|
3696
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3687
3697
|
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",
|
|
3688
3698
|
id: "Combined-Shape",
|
|
3689
3699
|
fill: iconColor,
|
|
3690
3700
|
fillRule: "nonzero"
|
|
3691
|
-
}), /*#__PURE__*/
|
|
3701
|
+
}), /*#__PURE__*/React__default["default"].createElement("rect", {
|
|
3692
3702
|
id: "Rectangle-19",
|
|
3693
3703
|
stroke: iconColor,
|
|
3694
3704
|
strokeWidth: "3",
|
|
@@ -3700,24 +3710,24 @@ var ImageFallbackIcon = function ImageFallbackIcon(_ref) {
|
|
|
3700
3710
|
}))));
|
|
3701
3711
|
};
|
|
3702
3712
|
ImageFallbackIcon.propTypes = {
|
|
3703
|
-
width:
|
|
3704
|
-
height:
|
|
3705
|
-
iconColor:
|
|
3713
|
+
width: PropTypes__default["default"].object,
|
|
3714
|
+
height: PropTypes__default["default"].object,
|
|
3715
|
+
iconColor: PropTypes__default["default"].object
|
|
3706
3716
|
};
|
|
3707
3717
|
|
|
3708
3718
|
var imageFallback = function imageFallback() {
|
|
3709
|
-
return /*#__PURE__*/
|
|
3719
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3710
3720
|
className: "arr--fallback-image fallback-m_image__1GYCJ fallback-m_image-position__3KddP"
|
|
3711
|
-
}, /*#__PURE__*/
|
|
3721
|
+
}, /*#__PURE__*/React__default["default"].createElement("figure", {
|
|
3712
3722
|
className: "arr--fallback-svg fallback-m_fallback-svg__tK9fL"
|
|
3713
|
-
}, /*#__PURE__*/
|
|
3723
|
+
}, /*#__PURE__*/React__default["default"].createElement(ImageFallbackIcon, null)));
|
|
3714
3724
|
};
|
|
3715
3725
|
|
|
3716
3726
|
var FallbackImage = function FallbackImage(_ref) {
|
|
3717
3727
|
var slug = _ref.slug;
|
|
3718
3728
|
|
|
3719
3729
|
if (slug) {
|
|
3720
|
-
return /*#__PURE__*/
|
|
3730
|
+
return /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
3721
3731
|
href: slug,
|
|
3722
3732
|
"aria-label": "image-fallback"
|
|
3723
3733
|
}, imageFallback());
|
|
@@ -3726,23 +3736,23 @@ var FallbackImage = function FallbackImage(_ref) {
|
|
|
3726
3736
|
}
|
|
3727
3737
|
};
|
|
3728
3738
|
FallbackImage.propTypes = {
|
|
3729
|
-
slug:
|
|
3739
|
+
slug: PropTypes__default["default"].string
|
|
3730
3740
|
};
|
|
3731
3741
|
|
|
3732
3742
|
var HyperLinkIcon = function HyperLinkIcon() {
|
|
3733
|
-
return /*#__PURE__*/
|
|
3743
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3734
3744
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3735
3745
|
width: "36",
|
|
3736
3746
|
height: "28"
|
|
3737
|
-
}, /*#__PURE__*/
|
|
3747
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3738
3748
|
fill: "none",
|
|
3739
3749
|
fillRule: "evenodd"
|
|
3740
|
-
}, /*#__PURE__*/
|
|
3750
|
+
}, /*#__PURE__*/React__default["default"].createElement("rect", {
|
|
3741
3751
|
width: "36",
|
|
3742
3752
|
height: "28",
|
|
3743
3753
|
fill: "#3D6FCF",
|
|
3744
3754
|
rx: "4"
|
|
3745
|
-
}), /*#__PURE__*/
|
|
3755
|
+
}), /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3746
3756
|
stroke: "#FFF",
|
|
3747
3757
|
strokeLinecap: "round",
|
|
3748
3758
|
strokeLinejoin: "round",
|
|
@@ -3755,16 +3765,16 @@ var HyperLink = function HyperLink(_ref) {
|
|
|
3755
3765
|
var _ref$hyperLink = _ref.hyperLink,
|
|
3756
3766
|
hyperLink = _ref$hyperLink === void 0 ? "" : _ref$hyperLink;
|
|
3757
3767
|
if (!hyperLink) return null;
|
|
3758
|
-
return /*#__PURE__*/
|
|
3768
|
+
return /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
3759
3769
|
href: hyperLink,
|
|
3760
3770
|
"aria-label": "hyperlink-button",
|
|
3761
3771
|
className: "arr--hyperlink-button hyperlink-m_hyperlink-button__1CqWx",
|
|
3762
3772
|
target: "_blank",
|
|
3763
3773
|
rel: "noopener noreferrer"
|
|
3764
|
-
}, /*#__PURE__*/
|
|
3774
|
+
}, /*#__PURE__*/React__default["default"].createElement(HyperLinkIcon, null));
|
|
3765
3775
|
};
|
|
3766
3776
|
HyperLink.propTypes = {
|
|
3767
|
-
hyperLink:
|
|
3777
|
+
hyperLink: PropTypes__default["default"].string
|
|
3768
3778
|
};
|
|
3769
3779
|
|
|
3770
3780
|
var _styleModuleImportMap$6 = {
|
|
@@ -3800,7 +3810,7 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
3800
3810
|
StoryTemplateIcon = _config$StoryTemplate === void 0 ? function () {
|
|
3801
3811
|
return null;
|
|
3802
3812
|
} : _config$StoryTemplate;
|
|
3803
|
-
var showImagePlaceholder = useSelector(function (state) {
|
|
3813
|
+
var showImagePlaceholder = reactRedux.useSelector(function (state) {
|
|
3804
3814
|
return get_1(state, ["qt", "config", "showPlaceholder"]);
|
|
3805
3815
|
});
|
|
3806
3816
|
var getPlaceholderStyleName = showImagePlaceholder ? "placeholder" : "";
|
|
@@ -3836,37 +3846,37 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
3836
3846
|
var fallbackImage = function fallbackImage() {
|
|
3837
3847
|
if (!slug) {
|
|
3838
3848
|
if (fallbackImageUrl && !isStoryPageImage) {
|
|
3839
|
-
return /*#__PURE__*/
|
|
3849
|
+
return /*#__PURE__*/React__default["default"].createElement("figure", {
|
|
3840
3850
|
style: {
|
|
3841
3851
|
paddingTop: imagePadding + "%"
|
|
3842
3852
|
},
|
|
3843
3853
|
className: "arr--responsive-hero-image " + _getClassName("image ".concat(getPlaceholderStyleName), _styleModuleImportMap$6)
|
|
3844
|
-
}, /*#__PURE__*/
|
|
3854
|
+
}, /*#__PURE__*/React__default["default"].createElement("img", {
|
|
3845
3855
|
className: "qt-image",
|
|
3846
3856
|
"data-src": "".concat(fallbackImageUrl),
|
|
3847
3857
|
alt: "image-fallback"
|
|
3848
3858
|
}));
|
|
3849
3859
|
}
|
|
3850
3860
|
|
|
3851
|
-
return /*#__PURE__*/
|
|
3861
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, defaultFallback ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3852
3862
|
"data-test-id": "arr--fallback-hero-image",
|
|
3853
3863
|
style: {
|
|
3854
3864
|
paddingTop: imagePadding + "%"
|
|
3855
3865
|
},
|
|
3856
3866
|
className: "arr--fallback-hero-image " + _getClassName("image ".concat(getPlaceholderStyleName), _styleModuleImportMap$6)
|
|
3857
|
-
}, /*#__PURE__*/
|
|
3867
|
+
}, /*#__PURE__*/React__default["default"].createElement(StoryTemplateIcon, {
|
|
3858
3868
|
storyTemplate: story["story-template"]
|
|
3859
|
-
}), /*#__PURE__*/
|
|
3869
|
+
}), /*#__PURE__*/React__default["default"].createElement(FallbackImage, null)) : null);
|
|
3860
3870
|
}
|
|
3861
3871
|
|
|
3862
|
-
return /*#__PURE__*/
|
|
3872
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("figure", {
|
|
3863
3873
|
style: {
|
|
3864
3874
|
paddingTop: imagePadding + "%"
|
|
3865
3875
|
},
|
|
3866
3876
|
className: "arr--responsive-hero-image " + _getClassName("image ".concat(getPlaceholderStyleName), _styleModuleImportMap$6)
|
|
3867
|
-
}, /*#__PURE__*/
|
|
3877
|
+
}, /*#__PURE__*/React__default["default"].createElement(StoryTemplateIcon, {
|
|
3868
3878
|
storyTemplate: story["story-template"]
|
|
3869
|
-
}), /*#__PURE__*/
|
|
3879
|
+
}), /*#__PURE__*/React__default["default"].createElement(components.ResponsiveHeroImage, {
|
|
3870
3880
|
story: story,
|
|
3871
3881
|
aspectRatio: imageAspectRatio,
|
|
3872
3882
|
defaultWidth: defaultWidth,
|
|
@@ -3875,15 +3885,15 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
3875
3885
|
auto: ["format", "compress"],
|
|
3876
3886
|
fit: "max"
|
|
3877
3887
|
}
|
|
3878
|
-
})), isStoryPageImage && hyperLink && /*#__PURE__*/
|
|
3888
|
+
})), isStoryPageImage && hyperLink && /*#__PURE__*/React__default["default"].createElement(HyperLink, {
|
|
3879
3889
|
hyperLink: hyperLink
|
|
3880
3890
|
}));
|
|
3881
3891
|
};
|
|
3882
3892
|
|
|
3883
|
-
return story && (isStoryPageImage ? /*#__PURE__*/
|
|
3893
|
+
return story && (isStoryPageImage ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3884
3894
|
"data-test-id": "arr--hero-image",
|
|
3885
3895
|
className: "arr--hero-image " + _getClassName("".concat(heroImageClass, " ").concat(fullBleed, " ").concat(heroImageMobClasses), _styleModuleImportMap$6)
|
|
3886
|
-
}, fallbackImage()) : /*#__PURE__*/
|
|
3896
|
+
}, fallbackImage()) : /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
3887
3897
|
"data-test-id": "arr--hero-image",
|
|
3888
3898
|
href: getStoryUrl(story, "/".concat(story.slug)),
|
|
3889
3899
|
externalLink: isExternalStory(story),
|
|
@@ -3893,30 +3903,30 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
3893
3903
|
};
|
|
3894
3904
|
HeroImage.propTypes = {
|
|
3895
3905
|
/** The Story Object from the API response */
|
|
3896
|
-
story:
|
|
3906
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
3897
3907
|
|
|
3898
3908
|
/** Removes the Hero Image padding for the image to bleed over the margin */
|
|
3899
|
-
FullBleed:
|
|
3909
|
+
FullBleed: PropTypes__default["default"].bool,
|
|
3900
3910
|
|
|
3901
3911
|
/** The default width for the image, in case the browser does not support srcset */
|
|
3902
|
-
defaultWidth:
|
|
3912
|
+
defaultWidth: PropTypes__default["default"].number,
|
|
3903
3913
|
|
|
3904
3914
|
/** The list of available widths */
|
|
3905
|
-
widths:
|
|
3915
|
+
widths: PropTypes__default["default"].array,
|
|
3906
3916
|
// fatch the correct hero image
|
|
3907
|
-
aspectRatio:
|
|
3917
|
+
aspectRatio: PropTypes__default["default"].array,
|
|
3908
3918
|
// Hints for the browser to choose the best size
|
|
3909
3919
|
|
|
3910
3920
|
/** This prop is responsible for adding padding-right of the image and remove padding bottom of the image */
|
|
3911
|
-
isHorizontal:
|
|
3921
|
+
isHorizontal: PropTypes__default["default"].bool,
|
|
3912
3922
|
|
|
3913
3923
|
/** This prop is responsible for adding padding-bottom in desktop and padding-right in mobile */
|
|
3914
|
-
isHorizontalMobile:
|
|
3924
|
+
isHorizontalMobile: PropTypes__default["default"].bool,
|
|
3915
3925
|
// this prop is responsive for rendering fallback image on story page
|
|
3916
|
-
defaultFallback:
|
|
3917
|
-
isHorizontalWithImageLast:
|
|
3918
|
-
isStoryPageImage:
|
|
3919
|
-
config:
|
|
3926
|
+
defaultFallback: PropTypes__default["default"].bool,
|
|
3927
|
+
isHorizontalWithImageLast: PropTypes__default["default"].bool,
|
|
3928
|
+
isStoryPageImage: PropTypes__default["default"].bool,
|
|
3929
|
+
config: PropTypes__default["default"].object
|
|
3920
3930
|
};
|
|
3921
3931
|
HeroImage.defaultProps = {
|
|
3922
3932
|
FullBleed: true,
|
|
@@ -3966,22 +3976,22 @@ var SectionTag = function SectionTag(_ref) {
|
|
|
3966
3976
|
}
|
|
3967
3977
|
|
|
3968
3978
|
if (!isSection) return null;
|
|
3969
|
-
return /*#__PURE__*/
|
|
3979
|
+
return /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
3970
3980
|
href: getUrl,
|
|
3971
3981
|
className: "arrow-component arr--section-name",
|
|
3972
3982
|
"aria-label": "section-name"
|
|
3973
|
-
}, /*#__PURE__*/
|
|
3983
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3974
3984
|
"data-test-id": "sectionTag",
|
|
3975
3985
|
style: {
|
|
3976
3986
|
backgroundColor: templateStyle.includes("section-solid") ? sectionTagBorderColor : ""
|
|
3977
3987
|
},
|
|
3978
3988
|
className: "section-tag arrow-component " + _getClassName("".concat(textColor, " ").concat(templateStyle), _styleModuleImportMap$5)
|
|
3979
|
-
}, templateStyle.includes("section-borderLeft") && /*#__PURE__*/
|
|
3989
|
+
}, templateStyle.includes("section-borderLeft") && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
3980
3990
|
className: "section-m_border-left__2oUyp",
|
|
3981
3991
|
style: {
|
|
3982
3992
|
color: sectionTagBorderColor
|
|
3983
3993
|
}
|
|
3984
|
-
}), section["display-name"] || section["name"], /*#__PURE__*/
|
|
3994
|
+
}), section["display-name"] || section["name"], /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3985
3995
|
className: "section-m_border-bottom__3cRoD",
|
|
3986
3996
|
style: {
|
|
3987
3997
|
backgroundColor: "".concat(template === "solid" ? "" : sectionTagBorderColor)
|
|
@@ -3990,13 +4000,13 @@ var SectionTag = function SectionTag(_ref) {
|
|
|
3990
4000
|
};
|
|
3991
4001
|
SectionTag.propTypes = {
|
|
3992
4002
|
/** The Story Object from the API response */
|
|
3993
|
-
story:
|
|
4003
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
3994
4004
|
|
|
3995
4005
|
/** The style template for section tag */
|
|
3996
|
-
template:
|
|
3997
|
-
borderColor:
|
|
3998
|
-
solidBorderColor:
|
|
3999
|
-
isLightTheme:
|
|
4006
|
+
template: PropTypes__default["default"].oneOf(["", "borderBottomSml", "borderLeft", "solid"]),
|
|
4007
|
+
borderColor: PropTypes__default["default"].string,
|
|
4008
|
+
solidBorderColor: PropTypes__default["default"].string,
|
|
4009
|
+
isLightTheme: PropTypes__default["default"].bool
|
|
4000
4010
|
};
|
|
4001
4011
|
SectionTag.defaultProps = {
|
|
4002
4012
|
template: "",
|
|
@@ -4023,7 +4033,7 @@ var Subheadline = function Subheadline(_ref) {
|
|
|
4023
4033
|
var subheadline = forceShowAtom || get_1(config, ["showSubheadline"], true);
|
|
4024
4034
|
if (!subheadline) return null;
|
|
4025
4035
|
var textColor = getTextColor(config.theme);
|
|
4026
|
-
return /*#__PURE__*/
|
|
4036
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4027
4037
|
style: {
|
|
4028
4038
|
WebkitLineClamp: lineClamp
|
|
4029
4039
|
},
|
|
@@ -4033,15 +4043,15 @@ var Subheadline = function Subheadline(_ref) {
|
|
|
4033
4043
|
};
|
|
4034
4044
|
Subheadline.propTypes = {
|
|
4035
4045
|
/** The Story Object from the API response */
|
|
4036
|
-
story:
|
|
4046
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
4037
4047
|
// Restricts the number of lines for subheadline.
|
|
4038
|
-
lineClamp:
|
|
4048
|
+
lineClamp: PropTypes__default["default"].number,
|
|
4039
4049
|
|
|
4040
4050
|
/** Number of characters to truncate the subheadline */
|
|
4041
|
-
truncateChars:
|
|
4042
|
-
clazzName:
|
|
4043
|
-
forceShowAtom:
|
|
4044
|
-
showFullContent:
|
|
4051
|
+
truncateChars: PropTypes__default["default"].number,
|
|
4052
|
+
clazzName: PropTypes__default["default"].string,
|
|
4053
|
+
forceShowAtom: PropTypes__default["default"].bool,
|
|
4054
|
+
showFullContent: PropTypes__default["default"].bool
|
|
4045
4055
|
};
|
|
4046
4056
|
Subheadline.defaultProps = {
|
|
4047
4057
|
forceShowAtom: false,
|
|
@@ -4090,7 +4100,7 @@ var StoryCard = function StoryCard(_ref) {
|
|
|
4090
4100
|
prefix = _ref.prefix,
|
|
4091
4101
|
config = _ref.config,
|
|
4092
4102
|
isHorizontalWithImageLast = _ref.isHorizontalWithImageLast;
|
|
4093
|
-
if (!story || isEmpty(story)) return /*#__PURE__*/
|
|
4103
|
+
if (!story || isEmpty(story)) return /*#__PURE__*/React__default["default"].createElement("div", null);
|
|
4094
4104
|
var borderOptions = ["default", "full", "bottom", "boxShadow"];
|
|
4095
4105
|
var borderTemplate = borderOptions.includes(border) ? "border-".concat(border) : ""; // TODO optimize conditions
|
|
4096
4106
|
|
|
@@ -4100,7 +4110,7 @@ var StoryCard = function StoryCard(_ref) {
|
|
|
4100
4110
|
var bgImgContentOverlapClass = bgImgContentOverlap ? "content-overlap" : "";
|
|
4101
4111
|
var textColor = getTextColor(theme);
|
|
4102
4112
|
var horizontalMobileClasses = isHorizontalMobile ? "horizontal-mob" : "";
|
|
4103
|
-
var defaultStorycard = /*#__PURE__*/
|
|
4113
|
+
var defaultStorycard = /*#__PURE__*/React__default["default"].createElement(DefaultStoryCard, {
|
|
4104
4114
|
story: story,
|
|
4105
4115
|
aspectRatio: aspectRatio,
|
|
4106
4116
|
border: border,
|
|
@@ -4114,7 +4124,7 @@ var StoryCard = function StoryCard(_ref) {
|
|
|
4114
4124
|
config: config,
|
|
4115
4125
|
isHorizontalWithImageLast: isHorizontalWithImageLast
|
|
4116
4126
|
});
|
|
4117
|
-
return /*#__PURE__*/
|
|
4127
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4118
4128
|
"data-test-id": "story-card",
|
|
4119
4129
|
style: {
|
|
4120
4130
|
backgroundColor: theme,
|
|
@@ -4143,91 +4153,91 @@ var DefaultStoryCard = function DefaultStoryCard(_ref2) {
|
|
|
4143
4153
|
var SectionTagborderColor = rgbToHex(borderColor);
|
|
4144
4154
|
var _config$localizationC = config.localizationConfig,
|
|
4145
4155
|
localizationConfig = _config$localizationC === void 0 ? {} : _config$localizationC;
|
|
4146
|
-
return /*#__PURE__*/
|
|
4156
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isHorizontal ? /*#__PURE__*/React__default["default"].createElement(HeroImage, {
|
|
4147
4157
|
config: config,
|
|
4148
4158
|
story: story,
|
|
4149
4159
|
isHorizontal: true,
|
|
4150
4160
|
isHorizontalMobile: isHorizontalMobile,
|
|
4151
4161
|
aspectRatio: aspectRatio
|
|
4152
|
-
}) : isHorizontalWithImageLast ? /*#__PURE__*/
|
|
4162
|
+
}) : isHorizontalWithImageLast ? /*#__PURE__*/React__default["default"].createElement(HeroImage, {
|
|
4153
4163
|
config: config,
|
|
4154
4164
|
story: story,
|
|
4155
4165
|
isHorizontalWithImageLast: true,
|
|
4156
4166
|
isHorizontalMobile: isHorizontalMobile,
|
|
4157
4167
|
aspectRatio: aspectRatio
|
|
4158
|
-
}) : /*#__PURE__*/
|
|
4168
|
+
}) : /*#__PURE__*/React__default["default"].createElement(HeroImage, {
|
|
4159
4169
|
story: story,
|
|
4160
4170
|
config: config,
|
|
4161
4171
|
isHorizontalMobile: isHorizontalMobile,
|
|
4162
4172
|
aspectRatio: aspectRatio
|
|
4163
|
-
}), /*#__PURE__*/
|
|
4173
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4164
4174
|
className: "arr--story-content " + _getClassName("content ".concat(alignment), _styleModuleImportMap$3)
|
|
4165
|
-
}, /*#__PURE__*/
|
|
4175
|
+
}, /*#__PURE__*/React__default["default"].createElement(SectionTag, {
|
|
4166
4176
|
story: story,
|
|
4167
4177
|
borderColor: SectionTagborderColor
|
|
4168
|
-
}), /*#__PURE__*/
|
|
4178
|
+
}), /*#__PURE__*/React__default["default"].createElement(Headline, {
|
|
4169
4179
|
story: story,
|
|
4170
4180
|
headerLevel: headerLevel,
|
|
4171
4181
|
premiumStoryIconConfig: config
|
|
4172
|
-
}), /*#__PURE__*/
|
|
4182
|
+
}), /*#__PURE__*/React__default["default"].createElement(AuthorWithTime, {
|
|
4173
4183
|
config: localizationConfig,
|
|
4174
4184
|
story: story,
|
|
4175
4185
|
isBottom: true,
|
|
4176
4186
|
prefix: prefix,
|
|
4177
4187
|
hideAuthorImage: hideAuthorImage
|
|
4178
|
-
}), /*#__PURE__*/
|
|
4188
|
+
}), /*#__PURE__*/React__default["default"].createElement(Subheadline, {
|
|
4179
4189
|
story: story
|
|
4180
4190
|
})));
|
|
4181
4191
|
};
|
|
4182
4192
|
|
|
4183
4193
|
DefaultStoryCard.propTypes = {
|
|
4184
|
-
story:
|
|
4185
|
-
border:
|
|
4186
|
-
isBottom:
|
|
4187
|
-
isHorizontal:
|
|
4188
|
-
aspectRatio:
|
|
4189
|
-
isHorizontalMobile:
|
|
4190
|
-
centerAlign:
|
|
4191
|
-
headerLevel:
|
|
4192
|
-
borderColor:
|
|
4193
|
-
hideAuthorImage:
|
|
4194
|
-
prefix:
|
|
4195
|
-
config:
|
|
4196
|
-
isHorizontalWithImageLast:
|
|
4194
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
4195
|
+
border: PropTypes__default["default"].oneOfType([PropTypes__default["default"].string]),
|
|
4196
|
+
isBottom: PropTypes__default["default"].bool,
|
|
4197
|
+
isHorizontal: PropTypes__default["default"].bool,
|
|
4198
|
+
aspectRatio: PropTypes__default["default"].oneOfType([PropTypes__default["default"].array]),
|
|
4199
|
+
isHorizontalMobile: PropTypes__default["default"].bool,
|
|
4200
|
+
centerAlign: PropTypes__default["default"].bool,
|
|
4201
|
+
headerLevel: PropTypes__default["default"].string,
|
|
4202
|
+
borderColor: PropTypes__default["default"].string,
|
|
4203
|
+
hideAuthorImage: PropTypes__default["default"].bool,
|
|
4204
|
+
prefix: PropTypes__default["default"].string,
|
|
4205
|
+
config: PropTypes__default["default"].object,
|
|
4206
|
+
isHorizontalWithImageLast: PropTypes__default["default"].bool
|
|
4197
4207
|
};
|
|
4198
4208
|
StoryCard.propTypes = {
|
|
4199
4209
|
/** The Story Object from the API response */
|
|
4200
|
-
story:
|
|
4201
|
-
children:
|
|
4210
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
4211
|
+
children: PropTypes__default["default"].node,
|
|
4202
4212
|
|
|
4203
4213
|
/** Flip the Story Card to Horizonal mode */
|
|
4204
|
-
isHorizontal:
|
|
4214
|
+
isHorizontal: PropTypes__default["default"].bool,
|
|
4205
4215
|
|
|
4206
4216
|
/** Add border to the Story Card */
|
|
4207
|
-
border:
|
|
4217
|
+
border: PropTypes__default["default"].oneOfType([PropTypes__default["default"].string]),
|
|
4208
4218
|
// story card with background image
|
|
4209
|
-
useImageAsBackground:
|
|
4219
|
+
useImageAsBackground: PropTypes__default["default"].bool,
|
|
4210
4220
|
// story card content overlap with image
|
|
4211
|
-
bgImgContentOverlap:
|
|
4221
|
+
bgImgContentOverlap: PropTypes__default["default"].bool,
|
|
4212
4222
|
|
|
4213
4223
|
/** add aspect ratio for hero image */
|
|
4214
|
-
aspectRatio:
|
|
4224
|
+
aspectRatio: PropTypes__default["default"].oneOfType([PropTypes__default["default"].array]),
|
|
4215
4225
|
|
|
4216
4226
|
/** add theme(dark /light/custom color) for storycard */
|
|
4217
|
-
theme:
|
|
4227
|
+
theme: PropTypes__default["default"].string,
|
|
4218
4228
|
|
|
4219
4229
|
/** flip the story card mobile design horizontal */
|
|
4220
|
-
isHorizontalMobile:
|
|
4230
|
+
isHorizontalMobile: PropTypes__default["default"].bool,
|
|
4221
4231
|
// make content center align in desktop and left align in mobile
|
|
4222
|
-
centerAlign:
|
|
4223
|
-
headerLevel:
|
|
4224
|
-
borderColor:
|
|
4232
|
+
centerAlign: PropTypes__default["default"].bool,
|
|
4233
|
+
headerLevel: PropTypes__default["default"].string,
|
|
4234
|
+
borderColor: PropTypes__default["default"].string,
|
|
4225
4235
|
// handle author image through storycard
|
|
4226
|
-
hideAuthorImage:
|
|
4236
|
+
hideAuthorImage: PropTypes__default["default"].bool,
|
|
4227
4237
|
// handle author prefix through storycard
|
|
4228
|
-
prefix:
|
|
4229
|
-
config:
|
|
4230
|
-
isHorizontalWithImageLast:
|
|
4238
|
+
prefix: PropTypes__default["default"].string,
|
|
4239
|
+
config: PropTypes__default["default"].object,
|
|
4240
|
+
isHorizontalWithImageLast: PropTypes__default["default"].bool
|
|
4231
4241
|
};
|
|
4232
4242
|
StoryCard.defaultProps = {
|
|
4233
4243
|
isHorizontal: false,
|
|
@@ -4242,19 +4252,19 @@ StoryCard.defaultProps = {
|
|
|
4242
4252
|
var ClockIcon = function ClockIcon(_ref) {
|
|
4243
4253
|
var _ref$color = _ref.color,
|
|
4244
4254
|
color = _ref$color === void 0 ? "#333" : _ref$color;
|
|
4245
|
-
return /*#__PURE__*/
|
|
4255
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
4246
4256
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4247
4257
|
width: "24",
|
|
4248
4258
|
height: "24",
|
|
4249
4259
|
viewBox: "0 0 24 24"
|
|
4250
|
-
}, /*#__PURE__*/
|
|
4260
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
4251
4261
|
fill: color,
|
|
4252
4262
|
fillRule: "evenodd",
|
|
4253
4263
|
d: "M12 19.75a7.513 7.513 0 003.875-1.047 7.832 7.832 0 002.828-2.828A7.513 7.513 0 0019.75 12a7.513 7.513 0 00-1.047-3.875c-.698-1.187-1.64-2.13-2.828-2.828S13.395 4.25 12 4.25a7.51 7.51 0 00-3.875 1.047c-1.188.698-2.13 1.64-2.828 2.828S4.25 10.605 4.25 12a7.51 7.51 0 001.047 3.875 7.824 7.824 0 002.828 2.828A7.513 7.513 0 0012 19.75zm.016-1a6.64 6.64 0 01-3.391-.906 6.716 6.716 0 01-2.469-2.453 6.563 6.563 0 01-.906-3.375c0-1.22.302-2.35.906-3.391A6.711 6.711 0 018.61 6.156a6.563 6.563 0 013.375-.906c1.22 0 2.35.302 3.391.906a6.716 6.716 0 012.469 2.453A6.592 6.592 0 0118.751 12a6.616 6.616 0 01-.906 3.375 6.716 6.716 0 01-2.453 2.469 6.563 6.563 0 01-3.375.906zm2.283-3.92l.076-.002a.343.343 0 00.25-.14l.25-.375a.365.365 0 00.078-.266.328.328 0 00-.14-.234l-2.22-1.625V7.625a.362.362 0 00-.109-.266.36.36 0 00-.265-.109h-.438a.357.357 0 00-.265.11.358.358 0 00-.11.265v5c0 .125.052.219.156.281l2.532 1.844a.383.383 0 00.281.078l-.076.001z"
|
|
4254
4264
|
}));
|
|
4255
4265
|
};
|
|
4256
4266
|
ClockIcon.propTypes = {
|
|
4257
|
-
color:
|
|
4267
|
+
color: PropTypes__default["default"].string
|
|
4258
4268
|
};
|
|
4259
4269
|
|
|
4260
4270
|
var _styleModuleImportMap$2 = {
|
|
@@ -4289,26 +4299,26 @@ var LoadmoreButton = function LoadmoreButton(_ref) {
|
|
|
4289
4299
|
if (!showButton) return null;
|
|
4290
4300
|
var textColor = getTextColor(theme);
|
|
4291
4301
|
var slug = customUrlPath ? "/".concat(customUrlPath) : generateNavigateSlug(collection, _objectSpread$1(_objectSpread$1({}, qtConfig), config));
|
|
4292
|
-
return template === "SubsequentLoadCount" ? /*#__PURE__*/
|
|
4302
|
+
return template === "SubsequentLoadCount" ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4293
4303
|
onClick: onClick,
|
|
4294
4304
|
"data-test-id": "load-more",
|
|
4295
4305
|
className: "arr--button " + _getClassName("button ".concat(textColor, " default"), _styleModuleImportMap$2)
|
|
4296
|
-
}, buttonText) : /*#__PURE__*/
|
|
4306
|
+
}, buttonText) : /*#__PURE__*/React__default["default"].createElement(components.LinkBase, {
|
|
4297
4307
|
href: slug,
|
|
4298
4308
|
navigateTo: navigate,
|
|
4299
4309
|
"data-test-id": "load-more",
|
|
4300
4310
|
"aria-label": "load-more"
|
|
4301
|
-
}, /*#__PURE__*/
|
|
4311
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4302
4312
|
className: "arr--button " + _getClassName("button ".concat(textColor, " default"), _styleModuleImportMap$2)
|
|
4303
4313
|
}, buttonText));
|
|
4304
4314
|
};
|
|
4305
4315
|
LoadmoreButton.propTypes = {
|
|
4306
|
-
collection:
|
|
4307
|
-
template:
|
|
4308
|
-
config:
|
|
4309
|
-
onClick:
|
|
4310
|
-
navigate:
|
|
4311
|
-
qtConfig:
|
|
4316
|
+
collection: PropTypes__default["default"].object,
|
|
4317
|
+
template: PropTypes__default["default"].string,
|
|
4318
|
+
config: PropTypes__default["default"].object,
|
|
4319
|
+
onClick: PropTypes__default["default"].func,
|
|
4320
|
+
navigate: PropTypes__default["default"].func,
|
|
4321
|
+
qtConfig: PropTypes__default["default"].object
|
|
4312
4322
|
};
|
|
4313
4323
|
|
|
4314
4324
|
var _styleModuleImportMap$1 = {
|
|
@@ -4346,23 +4356,23 @@ var KeyEventCards = function KeyEventCards(props) {
|
|
|
4346
4356
|
var updateColor = textColor === "dark" ? dark : light;
|
|
4347
4357
|
var lastElement = index === cardLength - 1;
|
|
4348
4358
|
var borderLeft = lastElement ? "borderNone" : "";
|
|
4349
|
-
return /*#__PURE__*/
|
|
4359
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4350
4360
|
className: _getClassName("time-wrapper ".concat(textColor), _styleModuleImportMap$1)
|
|
4351
|
-
}, /*#__PURE__*/
|
|
4361
|
+
}, /*#__PURE__*/React__default["default"].createElement(ClockIcon, {
|
|
4352
4362
|
color: updateColor
|
|
4353
4363
|
}), getTimeStamp(cardAddedAt, timestampToFormat, {
|
|
4354
4364
|
showTime: true,
|
|
4355
4365
|
isTimeFirst: true
|
|
4356
|
-
})), /*#__PURE__*/
|
|
4366
|
+
})), /*#__PURE__*/React__default["default"].createElement("a", {
|
|
4357
4367
|
href: "".concat(mountAt, "/").concat(slug, "#").concat(id),
|
|
4358
4368
|
"aria-label": "event-title"
|
|
4359
|
-
}, /*#__PURE__*/
|
|
4369
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4360
4370
|
className: _getClassName("event-title ".concat(textColor, " ").concat(borderLeft), _styleModuleImportMap$1)
|
|
4361
4371
|
}, storyElements.map(function (element, index) {
|
|
4362
|
-
return element.type === "title" && /*#__PURE__*/
|
|
4372
|
+
return element.type === "title" && /*#__PURE__*/React__default["default"].createElement("h3", {
|
|
4363
4373
|
key: index
|
|
4364
4374
|
}, element.text);
|
|
4365
|
-
}), showLoadMore && lastElement && loadCards && /*#__PURE__*/
|
|
4375
|
+
}), showLoadMore && lastElement && loadCards && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4366
4376
|
className: "key-events-m_fade-out__11jv_",
|
|
4367
4377
|
style: {
|
|
4368
4378
|
backgroundImage: "linear-gradient(to bottom, transparent, ".concat(theme, ")")
|
|
@@ -4371,19 +4381,19 @@ var KeyEventCards = function KeyEventCards(props) {
|
|
|
4371
4381
|
};
|
|
4372
4382
|
|
|
4373
4383
|
KeyEventCards.propTypes = {
|
|
4374
|
-
card:
|
|
4375
|
-
"card-added-at":
|
|
4376
|
-
"story-elements":
|
|
4377
|
-
id:
|
|
4384
|
+
card: PropTypes__default["default"].shape({
|
|
4385
|
+
"card-added-at": PropTypes__default["default"].number,
|
|
4386
|
+
"story-elements": PropTypes__default["default"].array,
|
|
4387
|
+
id: PropTypes__default["default"].string
|
|
4378
4388
|
}),
|
|
4379
|
-
config:
|
|
4380
|
-
slug:
|
|
4381
|
-
story:
|
|
4382
|
-
elements:
|
|
4383
|
-
index:
|
|
4384
|
-
cardLength:
|
|
4385
|
-
loadCards:
|
|
4386
|
-
showLoadMore:
|
|
4389
|
+
config: PropTypes__default["default"].object,
|
|
4390
|
+
slug: PropTypes__default["default"].string,
|
|
4391
|
+
story: PropTypes__default["default"].object,
|
|
4392
|
+
elements: PropTypes__default["default"].array,
|
|
4393
|
+
index: PropTypes__default["default"].number,
|
|
4394
|
+
cardLength: PropTypes__default["default"].number,
|
|
4395
|
+
loadCards: PropTypes__default["default"].bool,
|
|
4396
|
+
showLoadMore: PropTypes__default["default"].bool
|
|
4387
4397
|
};
|
|
4388
4398
|
var KeyEventsBase = function KeyEventsBase(_ref) {
|
|
4389
4399
|
var _ref$story = _ref.story,
|
|
@@ -4398,7 +4408,7 @@ var KeyEventsBase = function KeyEventsBase(_ref) {
|
|
|
4398
4408
|
initialLoadCount = _config$initialLoadCo === void 0 ? 4 : _config$initialLoadCo;
|
|
4399
4409
|
var textColor = getTextColor(theme);
|
|
4400
4410
|
|
|
4401
|
-
var _useState = useState(initialLoadCount),
|
|
4411
|
+
var _useState = React.useState(initialLoadCount),
|
|
4402
4412
|
_useState2 = _slicedToArray(_useState, 2),
|
|
4403
4413
|
initialCount = _useState2[0],
|
|
4404
4414
|
updatedCount = _useState2[1];
|
|
@@ -4407,7 +4417,7 @@ var KeyEventsBase = function KeyEventsBase(_ref) {
|
|
|
4407
4417
|
return get_1(card.metadata, ["attributes", "key-event"]);
|
|
4408
4418
|
});
|
|
4409
4419
|
var lastElement = cardsWithKeyEvents.length > initialCount;
|
|
4410
|
-
var qtConfig = useSelector(function (state) {
|
|
4420
|
+
var qtConfig = reactRedux.useSelector(function (state) {
|
|
4411
4421
|
return get_1(state, ["qt", "config"], {});
|
|
4412
4422
|
});
|
|
4413
4423
|
|
|
@@ -4421,7 +4431,7 @@ var KeyEventsBase = function KeyEventsBase(_ref) {
|
|
|
4421
4431
|
|
|
4422
4432
|
var showAllCards = !showLoadMore ? cardsWithKeyEvents.slice(0, 4) : cardsWithKeyEvents.slice(0, initialCount);
|
|
4423
4433
|
var keyEvents = showAllCards.map(function (card, index, source) {
|
|
4424
|
-
return /*#__PURE__*/
|
|
4434
|
+
return /*#__PURE__*/React__default["default"].createElement(KeyEventCards, {
|
|
4425
4435
|
cardLength: source.length,
|
|
4426
4436
|
card: card,
|
|
4427
4437
|
key: card.id,
|
|
@@ -4432,14 +4442,14 @@ var KeyEventsBase = function KeyEventsBase(_ref) {
|
|
|
4432
4442
|
showLoadMore: showLoadMore
|
|
4433
4443
|
});
|
|
4434
4444
|
});
|
|
4435
|
-
return /*#__PURE__*/
|
|
4445
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4436
4446
|
style: {
|
|
4437
4447
|
background: theme
|
|
4438
4448
|
},
|
|
4439
4449
|
className: "arrow-component " + _getClassName("container ".concat(textColor), _styleModuleImportMap$1)
|
|
4440
|
-
}, /*#__PURE__*/
|
|
4450
|
+
}, /*#__PURE__*/React__default["default"].createElement("h3", null, "Key Events"), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4441
4451
|
className: "key-events-m_cards-wrapper__3f8aB"
|
|
4442
|
-
}, keyEvents), showLoadMore && lastElement && /*#__PURE__*/
|
|
4452
|
+
}, keyEvents), showLoadMore && lastElement && /*#__PURE__*/React__default["default"].createElement(LoadmoreButton, {
|
|
4443
4453
|
onClick: onClick,
|
|
4444
4454
|
template: "SubsequentLoadCount",
|
|
4445
4455
|
config: config,
|
|
@@ -4447,9 +4457,9 @@ var KeyEventsBase = function KeyEventsBase(_ref) {
|
|
|
4447
4457
|
}));
|
|
4448
4458
|
};
|
|
4449
4459
|
KeyEventsBase.propTypes = {
|
|
4450
|
-
story:
|
|
4451
|
-
config:
|
|
4452
|
-
showLoadMore:
|
|
4460
|
+
story: PropTypes__default["default"].object,
|
|
4461
|
+
config: PropTypes__default["default"].object,
|
|
4462
|
+
showLoadMore: PropTypes__default["default"].bool
|
|
4453
4463
|
};
|
|
4454
4464
|
var KeyEvents = StateProvider(KeyEventsBase);
|
|
4455
4465
|
|
|
@@ -4490,12 +4500,12 @@ var StoryCollection = function StoryCollection(_ref) {
|
|
|
4490
4500
|
var isHorizontal = horizontal ? "horizontal-wrapper" : "";
|
|
4491
4501
|
var mountAt = get_1(config, ["mountAtPrefix"], "");
|
|
4492
4502
|
|
|
4493
|
-
var _useState = useState([]),
|
|
4503
|
+
var _useState = React.useState([]),
|
|
4494
4504
|
_useState2 = _slicedToArray(_useState, 2),
|
|
4495
4505
|
storyList = _useState2[0],
|
|
4496
4506
|
updateStoryList = _useState2[1];
|
|
4497
4507
|
|
|
4498
|
-
var _useState3 = useState([]),
|
|
4508
|
+
var _useState3 = React.useState([]),
|
|
4499
4509
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
4500
4510
|
collectionData = _useState4[0],
|
|
4501
4511
|
updateCollectionData = _useState4[1];
|
|
@@ -4529,59 +4539,59 @@ var StoryCollection = function StoryCollection(_ref) {
|
|
|
4529
4539
|
};
|
|
4530
4540
|
}();
|
|
4531
4541
|
|
|
4532
|
-
useEffect(function () {
|
|
4542
|
+
React.useEffect(function () {
|
|
4533
4543
|
if (collectionSlug) {
|
|
4534
4544
|
updateStoryListItems(collectionSlug);
|
|
4535
4545
|
}
|
|
4536
4546
|
}, [collectionSlug]);
|
|
4537
|
-
useEffect(function () {
|
|
4547
|
+
React.useEffect(function () {
|
|
4538
4548
|
if (!collectionSlug && data) {
|
|
4539
4549
|
var storyItems = data.items || data;
|
|
4540
4550
|
updateStoryList(storyItems);
|
|
4541
4551
|
}
|
|
4542
4552
|
}, [data, collectionSlug]);
|
|
4543
|
-
return /*#__PURE__*/
|
|
4553
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(CollectionName, {
|
|
4544
4554
|
customCollectionName: heading,
|
|
4545
4555
|
textColor: true,
|
|
4546
4556
|
collection: collectionData
|
|
4547
|
-
}), /*#__PURE__*/
|
|
4557
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4548
4558
|
className: "aside-collection-m_stories__9wfUs"
|
|
4549
4559
|
}, storyList && storyList.length > 0 ? storyList.slice(0, 4).map(function (item) {
|
|
4550
4560
|
var story = item.story || item;
|
|
4551
|
-
return /*#__PURE__*/
|
|
4561
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4552
4562
|
className: "aside-collection-m_story__17Jdm",
|
|
4553
4563
|
key: story.id
|
|
4554
|
-
}, /*#__PURE__*/
|
|
4564
|
+
}, /*#__PURE__*/React__default["default"].createElement(StoryCard, {
|
|
4555
4565
|
story: story,
|
|
4556
4566
|
isHorizontal: true,
|
|
4557
4567
|
theme: theme,
|
|
4558
4568
|
config: config
|
|
4559
|
-
}, /*#__PURE__*/
|
|
4569
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4560
4570
|
className: "aside-collection-m_story-hero-image__13nFY"
|
|
4561
|
-
}, /*#__PURE__*/
|
|
4571
|
+
}, /*#__PURE__*/React__default["default"].createElement(HeroImage, {
|
|
4562
4572
|
story: story,
|
|
4563
4573
|
aspectRatio: [[4, 3]]
|
|
4564
|
-
})), /*#__PURE__*/
|
|
4574
|
+
})), /*#__PURE__*/React__default["default"].createElement("div", null, isHorizontal && /*#__PURE__*/React__default["default"].createElement(SectionTag, {
|
|
4565
4575
|
story: story
|
|
4566
|
-
}), /*#__PURE__*/
|
|
4576
|
+
}), /*#__PURE__*/React__default["default"].createElement(Headline, {
|
|
4567
4577
|
story: story
|
|
4568
|
-
}), /*#__PURE__*/
|
|
4578
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4569
4579
|
className: "aside-collection-m_story-byline__37KRG"
|
|
4570
|
-
}, /*#__PURE__*/
|
|
4580
|
+
}, /*#__PURE__*/React__default["default"].createElement(AuthorWithTime, {
|
|
4571
4581
|
config: opts,
|
|
4572
4582
|
story: story
|
|
4573
4583
|
})))));
|
|
4574
|
-
}) : /*#__PURE__*/
|
|
4584
|
+
}) : /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4575
4585
|
"data-test-id": "no-stories",
|
|
4576
4586
|
className: "aside-collection-m_info__3p4zt"
|
|
4577
4587
|
}, "No stories found.")));
|
|
4578
4588
|
};
|
|
4579
4589
|
StoryCollection.propTypes = {
|
|
4580
|
-
data:
|
|
4581
|
-
config:
|
|
4582
|
-
horizontal:
|
|
4583
|
-
slotData:
|
|
4584
|
-
opts:
|
|
4590
|
+
data: PropTypes__default["default"].oneOfType([PropTypes__default["default"].object, PropTypes__default["default"].array]),
|
|
4591
|
+
config: PropTypes__default["default"].object,
|
|
4592
|
+
horizontal: PropTypes__default["default"].bool,
|
|
4593
|
+
slotData: PropTypes__default["default"].object,
|
|
4594
|
+
opts: PropTypes__default["default"].object
|
|
4585
4595
|
};
|
|
4586
4596
|
var AsideCollectionBase = function AsideCollectionBase(_ref4) {
|
|
4587
4597
|
var _ref4$data = _ref4.data,
|
|
@@ -4608,14 +4618,14 @@ var AsideCollectionBase = function AsideCollectionBase(_ref4) {
|
|
|
4608
4618
|
var isHorizontal = horizontal ? "horizontal-wrapper" : "";
|
|
4609
4619
|
|
|
4610
4620
|
if (horizontal) {
|
|
4611
|
-
return /*#__PURE__*/
|
|
4621
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4612
4622
|
style: {
|
|
4613
4623
|
backgroundColor: theme
|
|
4614
4624
|
},
|
|
4615
4625
|
"data-test-id": "aside-collection",
|
|
4616
4626
|
id: "aside-collection-".concat(storyId),
|
|
4617
4627
|
className: "arrow-component arr--aside-collection " + _getClassName("wrapper ".concat(isHorizontal), _styleModuleImportMap)
|
|
4618
|
-
}, /*#__PURE__*/
|
|
4628
|
+
}, /*#__PURE__*/React__default["default"].createElement(StoryCollection, {
|
|
4619
4629
|
data: data,
|
|
4620
4630
|
horizontal: horizontal,
|
|
4621
4631
|
config: config,
|
|
@@ -4628,23 +4638,23 @@ var AsideCollectionBase = function AsideCollectionBase(_ref4) {
|
|
|
4628
4638
|
var asideSlot = function asideSlot(type, slot, index) {
|
|
4629
4639
|
switch (type) {
|
|
4630
4640
|
case "ad":
|
|
4631
|
-
return /*#__PURE__*/
|
|
4641
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4632
4642
|
className: "aside-collection-ad-slot aside-collection-m_ad-slot__28nE2"
|
|
4633
4643
|
}, adComponent(_objectSpread(_objectSpread({}, slot), {}, {
|
|
4634
4644
|
id: "ad-".concat(index, "_").concat(storyId)
|
|
4635
4645
|
})));
|
|
4636
4646
|
|
|
4637
4647
|
case "widget":
|
|
4638
|
-
return /*#__PURE__*/
|
|
4648
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4639
4649
|
className: "aside-collection-ad-slot aside-collection-m_ad-slot__28nE2"
|
|
4640
4650
|
}, widgetComp(_objectSpread(_objectSpread({}, slot), {}, {
|
|
4641
4651
|
id: "widget-".concat(index, "_").concat(storyId)
|
|
4642
4652
|
})));
|
|
4643
4653
|
|
|
4644
4654
|
case "collection":
|
|
4645
|
-
return /*#__PURE__*/
|
|
4655
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4646
4656
|
id: "aside-collection-".concat(index, "_").concat(storyId)
|
|
4647
|
-
}, /*#__PURE__*/
|
|
4657
|
+
}, /*#__PURE__*/React__default["default"].createElement(StoryCollection, {
|
|
4648
4658
|
slotData: slot,
|
|
4649
4659
|
data: data,
|
|
4650
4660
|
horizontal: horizontal,
|
|
@@ -4654,13 +4664,13 @@ var AsideCollectionBase = function AsideCollectionBase(_ref4) {
|
|
|
4654
4664
|
}
|
|
4655
4665
|
};
|
|
4656
4666
|
|
|
4657
|
-
return /*#__PURE__*/
|
|
4667
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4658
4668
|
style: {
|
|
4659
4669
|
backgroundColor: theme
|
|
4660
4670
|
},
|
|
4661
4671
|
"data-test-id": "aside-collection",
|
|
4662
4672
|
className: "arrow-component arr--aside-collection " + _getClassName(["wrapper", isHorizontal, isSticky].join(" "), _styleModuleImportMap)
|
|
4663
|
-
}, enableKeyEvents && /*#__PURE__*/
|
|
4673
|
+
}, enableKeyEvents && /*#__PURE__*/React__default["default"].createElement(KeyEvents, {
|
|
4664
4674
|
story: keyEventsData.story,
|
|
4665
4675
|
showLoadMore: keyEventsData.showLoadMore,
|
|
4666
4676
|
config: keyEventsData.config
|
|
@@ -4669,22 +4679,24 @@ var AsideCollectionBase = function AsideCollectionBase(_ref4) {
|
|
|
4669
4679
|
}));
|
|
4670
4680
|
};
|
|
4671
4681
|
AsideCollectionBase.propTypes = {
|
|
4672
|
-
data:
|
|
4673
|
-
config:
|
|
4674
|
-
opts:
|
|
4675
|
-
horizontal:
|
|
4676
|
-
slots:
|
|
4677
|
-
adComponent:
|
|
4678
|
-
widgetComp:
|
|
4679
|
-
sticky:
|
|
4680
|
-
keyEventsData:
|
|
4681
|
-
story:
|
|
4682
|
-
config:
|
|
4683
|
-
showLoadMore:
|
|
4682
|
+
data: PropTypes__default["default"].oneOfType([PropTypes__default["default"].object, PropTypes__default["default"].array]),
|
|
4683
|
+
config: PropTypes__default["default"].object,
|
|
4684
|
+
opts: PropTypes__default["default"].object,
|
|
4685
|
+
horizontal: PropTypes__default["default"].bool,
|
|
4686
|
+
slots: PropTypes__default["default"].array,
|
|
4687
|
+
adComponent: PropTypes__default["default"].func,
|
|
4688
|
+
widgetComp: PropTypes__default["default"].func,
|
|
4689
|
+
sticky: PropTypes__default["default"].bool,
|
|
4690
|
+
keyEventsData: PropTypes__default["default"].shape({
|
|
4691
|
+
story: PropTypes__default["default"].object,
|
|
4692
|
+
config: PropTypes__default["default"].object,
|
|
4693
|
+
showLoadMore: PropTypes__default["default"]["boolean"]
|
|
4684
4694
|
}),
|
|
4685
|
-
enableKeyEvents:
|
|
4686
|
-
storyId:
|
|
4695
|
+
enableKeyEvents: PropTypes__default["default"]["boolean"],
|
|
4696
|
+
storyId: PropTypes__default["default"].string
|
|
4687
4697
|
};
|
|
4688
4698
|
var AsideCollection = StateProvider(AsideCollectionBase);
|
|
4689
4699
|
|
|
4690
|
-
|
|
4700
|
+
exports.AsideCollection = AsideCollection;
|
|
4701
|
+
exports.AsideCollectionBase = AsideCollectionBase;
|
|
4702
|
+
exports.StoryCollection = StoryCollection;
|