@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 React = require('react');
|
|
6
|
+
var PropTypes = require('prop-types');
|
|
7
|
+
var reactRedux = require('react-redux');
|
|
8
|
+
var components = require('@quintype/components');
|
|
9
|
+
var Timeago = require('react-timeago');
|
|
10
|
+
var dateFnsTz = require('date-fns-tz');
|
|
11
|
+
|
|
12
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
13
|
+
|
|
14
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
15
|
+
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
16
|
+
var Timeago__default = /*#__PURE__*/_interopDefaultLegacy(Timeago);
|
|
7
17
|
|
|
8
18
|
function _defineProperty(obj, key, value) {
|
|
9
19
|
if (key in obj) {
|
|
@@ -171,21 +181,21 @@ exports["default"] = _default;
|
|
|
171
181
|
|
|
172
182
|
var _getClassName = /*@__PURE__*/getDefaultExportFromCjs(getClassName);
|
|
173
183
|
|
|
174
|
-
var StateContext = /*#__PURE__*/createContext(); // eslint-disable-next-line react/display-name
|
|
184
|
+
var StateContext = /*#__PURE__*/React.createContext(); // eslint-disable-next-line react/display-name
|
|
175
185
|
|
|
176
186
|
var StateProvider = function StateProvider(RowComponent) {
|
|
177
187
|
return function (props) {
|
|
178
188
|
return (
|
|
179
189
|
/*#__PURE__*/
|
|
180
190
|
// eslint-disable-next-line react/prop-types
|
|
181
|
-
|
|
191
|
+
React__default["default"].createElement(StateContext.Provider, {
|
|
182
192
|
value: props.config
|
|
183
|
-
}, /*#__PURE__*/
|
|
193
|
+
}, /*#__PURE__*/React__default["default"].createElement(RowComponent, props))
|
|
184
194
|
);
|
|
185
195
|
};
|
|
186
196
|
};
|
|
187
197
|
var useStateValue = function useStateValue() {
|
|
188
|
-
return useContext(StateContext);
|
|
198
|
+
return React.useContext(StateContext);
|
|
189
199
|
};
|
|
190
200
|
|
|
191
201
|
/**
|
|
@@ -2690,15 +2700,15 @@ var isEmpty = function isEmpty(value) {
|
|
|
2690
2700
|
return value == null || // From standard.js: Always use === - but value == null is allowed to check null || undefined
|
|
2691
2701
|
_typeof(value) === "object" && Object.entries(value).length === 0 && value.constructor === Object || typeof value === "string" && value.trim().length === 0;
|
|
2692
2702
|
};
|
|
2693
|
-
|
|
2694
|
-
"sketches-host":
|
|
2695
|
-
"cdn-name":
|
|
2696
|
-
"cdn-image":
|
|
2703
|
+
PropTypes__default["default"].shape({
|
|
2704
|
+
"sketches-host": PropTypes__default["default"].string,
|
|
2705
|
+
"cdn-name": PropTypes__default["default"].string,
|
|
2706
|
+
"cdn-image": PropTypes__default["default"].string
|
|
2697
2707
|
});
|
|
2698
|
-
|
|
2699
|
-
headline:
|
|
2700
|
-
"last-published-at":
|
|
2701
|
-
subheadline:
|
|
2708
|
+
PropTypes__default["default"].shape({
|
|
2709
|
+
headline: PropTypes__default["default"].string,
|
|
2710
|
+
"last-published-at": PropTypes__default["default"].number,
|
|
2711
|
+
subheadline: PropTypes__default["default"].string
|
|
2702
2712
|
});
|
|
2703
2713
|
var getStoryUrl = function getStoryUrl(story) {
|
|
2704
2714
|
var defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
|
|
@@ -2742,17 +2752,17 @@ var getTimeStamp = function getTimeStamp(date, _formatter) {
|
|
|
2742
2752
|
var timezone = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;
|
|
2743
2753
|
|
|
2744
2754
|
if (timezone && template === "story") {
|
|
2745
|
-
var zonedTime = timezone && utcToZonedTime(date, timezone);
|
|
2746
|
-
var formatZonedTime = zonedTime && format(zonedTime, "yyyy-MM-dd'T'HH:mm:ssXXX", {
|
|
2755
|
+
var zonedTime = timezone && dateFnsTz.utcToZonedTime(date, timezone);
|
|
2756
|
+
var formatZonedTime = zonedTime && dateFnsTz.format(zonedTime, "yyyy-MM-dd'T'HH:mm:ssXXX", {
|
|
2747
2757
|
timeZone: timezone
|
|
2748
2758
|
});
|
|
2749
2759
|
var timeStamp = timestampToFormat("", "", "", date, config);
|
|
2750
|
-
return /*#__PURE__*/
|
|
2760
|
+
return /*#__PURE__*/React__default["default"].createElement("time", {
|
|
2751
2761
|
dateTime: formatZonedTime
|
|
2752
2762
|
}, timeStamp);
|
|
2753
2763
|
}
|
|
2754
2764
|
|
|
2755
|
-
return /*#__PURE__*/
|
|
2765
|
+
return /*#__PURE__*/React__default["default"].createElement(Timeago__default["default"], {
|
|
2756
2766
|
date: date,
|
|
2757
2767
|
formatter: function formatter(value, unit, suffix, date) {
|
|
2758
2768
|
return _formatter(value, unit, suffix, date, config);
|
|
@@ -2796,7 +2806,7 @@ var CollectionNameBase = function CollectionNameBase(_ref) {
|
|
|
2796
2806
|
var borderBottomFullStyle = templateStyle.includes("collection-borderBottomFull") ? "4px solid ".concat(CollectionNameBorderColor) : "";
|
|
2797
2807
|
|
|
2798
2808
|
var borderBottomStyle = function borderBottomStyle() {
|
|
2799
|
-
return templateStyle.includes("collection-borderBottom") && !templateStyle.includes("collection-borderBottomFull") ? /*#__PURE__*/
|
|
2809
|
+
return templateStyle.includes("collection-borderBottom") && !templateStyle.includes("collection-borderBottomFull") ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2800
2810
|
className: "collection-name-m_border-bottom__1MnlV",
|
|
2801
2811
|
style: {
|
|
2802
2812
|
borderBottom: "4px solid ".concat(CollectionNameBorderColor)
|
|
@@ -2856,40 +2866,40 @@ var CollectionNameBase = function CollectionNameBase(_ref) {
|
|
|
2856
2866
|
}
|
|
2857
2867
|
};
|
|
2858
2868
|
|
|
2859
|
-
return /*#__PURE__*/
|
|
2869
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, showRowTitle && collectionName && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2860
2870
|
style: {
|
|
2861
2871
|
borderBottom: borderBottomFullStyle
|
|
2862
2872
|
},
|
|
2863
2873
|
"data-test-id": "collection-name",
|
|
2864
2874
|
className: ("arr--collection-name arrow-component ".concat(templateStyle) ? "arr--collection-name arrow-component ".concat(templateStyle) + " " : "") + _getClassName("collection ".concat(textColor, " ").concat(templateStyle), _styleModuleImportMap$e)
|
|
2865
|
-
}, templateStyle.includes("collection-borderLeft") && /*#__PURE__*/
|
|
2875
|
+
}, templateStyle.includes("collection-borderLeft") && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
2866
2876
|
className: "arr-collection-name-border-left collection-name-m_border-left__3_pYw",
|
|
2867
2877
|
style: {
|
|
2868
2878
|
color: CollectionNameBorderColor,
|
|
2869
2879
|
fontSize: getBorderHeight()
|
|
2870
2880
|
}
|
|
2871
|
-
}), slug && !slug.includes(undefined) ? /*#__PURE__*/
|
|
2881
|
+
}), slug && !slug.includes(undefined) ? /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
2872
2882
|
href: slug,
|
|
2873
2883
|
"aria-label": "collection-name"
|
|
2874
|
-
}, /*#__PURE__*/
|
|
2884
|
+
}, /*#__PURE__*/React__default["default"].createElement(HeaderTag, null, collectionName)) : /*#__PURE__*/React__default["default"].createElement(HeaderTag, null, collectionName), borderBottomStyle()));
|
|
2875
2885
|
};
|
|
2876
2886
|
CollectionNameBase.propTypes = {
|
|
2877
2887
|
/** Collection name border color */
|
|
2878
|
-
collectionNameBorderColor: PropTypes
|
|
2888
|
+
collectionNameBorderColor: PropTypes.PropTypes.string,
|
|
2879
2889
|
|
|
2880
2890
|
/** The Collection Object from the API response */
|
|
2881
|
-
collection: PropTypes
|
|
2891
|
+
collection: PropTypes.PropTypes.object,
|
|
2882
2892
|
|
|
2883
2893
|
/** The publisher config from the API response */
|
|
2884
|
-
config: PropTypes
|
|
2894
|
+
config: PropTypes.PropTypes.object,
|
|
2885
2895
|
|
|
2886
2896
|
/** The style template for the component */
|
|
2887
|
-
collectionNameTemplate: PropTypes
|
|
2897
|
+
collectionNameTemplate: PropTypes.PropTypes.oneOf(["", "borderLeft", "borderBottom", "crossLine", "borderBottomFull"]),
|
|
2888
2898
|
|
|
2889
2899
|
/** Header tags ranging h1-h6, where h[headerLevel] */
|
|
2890
|
-
headerLevel: PropTypes
|
|
2891
|
-
customCollectionName: PropTypes
|
|
2892
|
-
navigate: PropTypes
|
|
2900
|
+
headerLevel: PropTypes.PropTypes.string,
|
|
2901
|
+
customCollectionName: PropTypes.PropTypes.string,
|
|
2902
|
+
navigate: PropTypes.PropTypes.bool
|
|
2893
2903
|
};
|
|
2894
2904
|
CollectionNameBase.defaultProps = {
|
|
2895
2905
|
collectionNameTemplate: "",
|
|
@@ -2902,7 +2912,7 @@ function mapStateToProps$1(state) {
|
|
|
2902
2912
|
};
|
|
2903
2913
|
}
|
|
2904
2914
|
|
|
2905
|
-
var CollectionName = connect(mapStateToProps$1)(CollectionNameBase);
|
|
2915
|
+
var CollectionName = reactRedux.connect(mapStateToProps$1)(CollectionNameBase);
|
|
2906
2916
|
|
|
2907
2917
|
var _styleModuleImportMap$d = {
|
|
2908
2918
|
"./load-more.m.css": {
|
|
@@ -2936,26 +2946,26 @@ var LoadmoreButton = function LoadmoreButton(_ref) {
|
|
|
2936
2946
|
if (!showButton) return null;
|
|
2937
2947
|
var textColor = getTextColor(theme);
|
|
2938
2948
|
var slug = customUrlPath ? "/".concat(customUrlPath) : generateNavigateSlug(collection, _objectSpread$1(_objectSpread$1({}, qtConfig), config));
|
|
2939
|
-
return template === "SubsequentLoadCount" ? /*#__PURE__*/
|
|
2949
|
+
return template === "SubsequentLoadCount" ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2940
2950
|
onClick: onClick,
|
|
2941
2951
|
"data-test-id": "load-more",
|
|
2942
2952
|
className: "arr--button " + _getClassName("button ".concat(textColor, " default"), _styleModuleImportMap$d)
|
|
2943
|
-
}, buttonText) : /*#__PURE__*/
|
|
2953
|
+
}, buttonText) : /*#__PURE__*/React__default["default"].createElement(components.LinkBase, {
|
|
2944
2954
|
href: slug,
|
|
2945
2955
|
navigateTo: navigate,
|
|
2946
2956
|
"data-test-id": "load-more",
|
|
2947
2957
|
"aria-label": "load-more"
|
|
2948
|
-
}, /*#__PURE__*/
|
|
2958
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2949
2959
|
className: "arr--button " + _getClassName("button ".concat(textColor, " default"), _styleModuleImportMap$d)
|
|
2950
2960
|
}, buttonText));
|
|
2951
2961
|
};
|
|
2952
2962
|
LoadmoreButton.propTypes = {
|
|
2953
|
-
collection:
|
|
2954
|
-
template:
|
|
2955
|
-
config:
|
|
2956
|
-
onClick:
|
|
2957
|
-
navigate:
|
|
2958
|
-
qtConfig:
|
|
2963
|
+
collection: PropTypes__default["default"].object,
|
|
2964
|
+
template: PropTypes__default["default"].string,
|
|
2965
|
+
config: PropTypes__default["default"].object,
|
|
2966
|
+
onClick: PropTypes__default["default"].func,
|
|
2967
|
+
navigate: PropTypes__default["default"].func,
|
|
2968
|
+
qtConfig: PropTypes__default["default"].object
|
|
2959
2969
|
};
|
|
2960
2970
|
|
|
2961
2971
|
var CrownIcon = function CrownIcon(_ref) {
|
|
@@ -2964,7 +2974,7 @@ var CrownIcon = function CrownIcon(_ref) {
|
|
|
2964
2974
|
_ref$color = _ref.color,
|
|
2965
2975
|
color = _ref$color === void 0 ? "#D8D8D8" : _ref$color,
|
|
2966
2976
|
positionTop = _ref.positionTop;
|
|
2967
|
-
return /*#__PURE__*/
|
|
2977
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
2968
2978
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2969
2979
|
width: width,
|
|
2970
2980
|
height: height,
|
|
@@ -2973,28 +2983,28 @@ var CrownIcon = function CrownIcon(_ref) {
|
|
|
2973
2983
|
position: "relative",
|
|
2974
2984
|
top: positionTop
|
|
2975
2985
|
}
|
|
2976
|
-
}, /*#__PURE__*/
|
|
2986
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
2977
2987
|
fill: "none",
|
|
2978
2988
|
fillRule: "evenodd",
|
|
2979
2989
|
stroke: "none",
|
|
2980
2990
|
strokeWidth: "1"
|
|
2981
|
-
}, /*#__PURE__*/
|
|
2991
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", null, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
2982
2992
|
transform: "translate(8 8)"
|
|
2983
|
-
}, /*#__PURE__*/
|
|
2993
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
2984
2994
|
d: "M0 0H24V24H0z"
|
|
2985
|
-
}), /*#__PURE__*/
|
|
2995
|
+
}), /*#__PURE__*/React__default["default"].createElement("g", {
|
|
2986
2996
|
fill: color,
|
|
2987
2997
|
fillRule: "nonzero",
|
|
2988
2998
|
transform: "translate(0 2)"
|
|
2989
|
-
}, /*#__PURE__*/
|
|
2999
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
2990
3000
|
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"
|
|
2991
3001
|
}))))));
|
|
2992
3002
|
};
|
|
2993
3003
|
CrownIcon.propTypes = {
|
|
2994
|
-
height:
|
|
2995
|
-
width:
|
|
2996
|
-
color:
|
|
2997
|
-
positionTop:
|
|
3004
|
+
height: PropTypes__default["default"].string,
|
|
3005
|
+
width: PropTypes__default["default"].string,
|
|
3006
|
+
color: PropTypes__default["default"].string,
|
|
3007
|
+
positionTop: PropTypes__default["default"].string
|
|
2998
3008
|
};
|
|
2999
3009
|
|
|
3000
3010
|
var KeyIcon = function KeyIcon(_ref) {
|
|
@@ -3003,7 +3013,7 @@ var KeyIcon = function KeyIcon(_ref) {
|
|
|
3003
3013
|
_ref$color = _ref.color,
|
|
3004
3014
|
color = _ref$color === void 0 ? "#D5D5D5" : _ref$color,
|
|
3005
3015
|
positionTop = _ref.positionTop;
|
|
3006
|
-
return /*#__PURE__*/
|
|
3016
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3007
3017
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3008
3018
|
width: width,
|
|
3009
3019
|
height: height,
|
|
@@ -3012,16 +3022,16 @@ var KeyIcon = function KeyIcon(_ref) {
|
|
|
3012
3022
|
position: "relative",
|
|
3013
3023
|
top: positionTop
|
|
3014
3024
|
}
|
|
3015
|
-
}, /*#__PURE__*/
|
|
3025
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3016
3026
|
fill: "none",
|
|
3017
3027
|
fillRule: "evenodd",
|
|
3018
3028
|
stroke: "none",
|
|
3019
3029
|
strokeWidth: "1"
|
|
3020
|
-
}, /*#__PURE__*/
|
|
3030
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", null, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3021
3031
|
transform: "translate(8 8)"
|
|
3022
|
-
}, /*#__PURE__*/
|
|
3032
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3023
3033
|
d: "M0 0H24V24H0z"
|
|
3024
|
-
}), /*#__PURE__*/
|
|
3034
|
+
}), /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3025
3035
|
fill: color,
|
|
3026
3036
|
fillRule: "nonzero",
|
|
3027
3037
|
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",
|
|
@@ -3029,10 +3039,10 @@ var KeyIcon = function KeyIcon(_ref) {
|
|
|
3029
3039
|
})))));
|
|
3030
3040
|
};
|
|
3031
3041
|
KeyIcon.propTypes = {
|
|
3032
|
-
height:
|
|
3033
|
-
width:
|
|
3034
|
-
color:
|
|
3035
|
-
positionTop:
|
|
3042
|
+
height: PropTypes__default["default"].string,
|
|
3043
|
+
width: PropTypes__default["default"].string,
|
|
3044
|
+
color: PropTypes__default["default"].string,
|
|
3045
|
+
positionTop: PropTypes__default["default"].string
|
|
3036
3046
|
};
|
|
3037
3047
|
|
|
3038
3048
|
var LockIcon = function LockIcon(_ref) {
|
|
@@ -3041,7 +3051,7 @@ var LockIcon = function LockIcon(_ref) {
|
|
|
3041
3051
|
_ref$color = _ref.color,
|
|
3042
3052
|
color = _ref$color === void 0 ? "#D5D5D5" : _ref$color,
|
|
3043
3053
|
positionTop = _ref.positionTop;
|
|
3044
|
-
return /*#__PURE__*/
|
|
3054
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3045
3055
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3046
3056
|
width: width,
|
|
3047
3057
|
height: height,
|
|
@@ -3050,28 +3060,28 @@ var LockIcon = function LockIcon(_ref) {
|
|
|
3050
3060
|
position: "relative",
|
|
3051
3061
|
top: positionTop
|
|
3052
3062
|
}
|
|
3053
|
-
}, /*#__PURE__*/
|
|
3063
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3054
3064
|
fill: "none",
|
|
3055
3065
|
fillRule: "evenodd",
|
|
3056
3066
|
stroke: "none",
|
|
3057
3067
|
strokeWidth: "1"
|
|
3058
|
-
}, /*#__PURE__*/
|
|
3068
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", null, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3059
3069
|
transform: "translate(8 8)"
|
|
3060
|
-
}, /*#__PURE__*/
|
|
3070
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3061
3071
|
d: "M0 0H24V24H0z"
|
|
3062
|
-
}), /*#__PURE__*/
|
|
3072
|
+
}), /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3063
3073
|
fill: color,
|
|
3064
3074
|
fillRule: "nonzero",
|
|
3065
3075
|
transform: "translate(3)"
|
|
3066
|
-
}, /*#__PURE__*/
|
|
3076
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3067
3077
|
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"
|
|
3068
3078
|
}))))));
|
|
3069
3079
|
};
|
|
3070
3080
|
LockIcon.propTypes = {
|
|
3071
|
-
height:
|
|
3072
|
-
width:
|
|
3073
|
-
color:
|
|
3074
|
-
positionTop:
|
|
3081
|
+
height: PropTypes__default["default"].string,
|
|
3082
|
+
width: PropTypes__default["default"].string,
|
|
3083
|
+
color: PropTypes__default["default"].string,
|
|
3084
|
+
positionTop: PropTypes__default["default"].string
|
|
3075
3085
|
};
|
|
3076
3086
|
|
|
3077
3087
|
var StarIcon = function StarIcon(_ref) {
|
|
@@ -3081,7 +3091,7 @@ var StarIcon = function StarIcon(_ref) {
|
|
|
3081
3091
|
color = _ref$color === void 0 ? "#D5D5D5" : _ref$color,
|
|
3082
3092
|
_ref$positionTop = _ref.positionTop,
|
|
3083
3093
|
positionTop = _ref$positionTop === void 0 ? "" : _ref$positionTop;
|
|
3084
|
-
return /*#__PURE__*/
|
|
3094
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3085
3095
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3086
3096
|
width: width,
|
|
3087
3097
|
height: height,
|
|
@@ -3090,21 +3100,21 @@ var StarIcon = function StarIcon(_ref) {
|
|
|
3090
3100
|
position: "relative",
|
|
3091
3101
|
top: positionTop
|
|
3092
3102
|
}
|
|
3093
|
-
}, /*#__PURE__*/
|
|
3103
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3094
3104
|
fill: "none",
|
|
3095
3105
|
fillRule: "evenodd",
|
|
3096
3106
|
stroke: "none",
|
|
3097
3107
|
strokeWidth: "1"
|
|
3098
|
-
}, /*#__PURE__*/
|
|
3108
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", null, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3099
3109
|
fill: color,
|
|
3100
3110
|
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"
|
|
3101
3111
|
}))));
|
|
3102
3112
|
};
|
|
3103
3113
|
StarIcon.propTypes = {
|
|
3104
|
-
height:
|
|
3105
|
-
width:
|
|
3106
|
-
color:
|
|
3107
|
-
positionTop:
|
|
3114
|
+
height: PropTypes__default["default"].string,
|
|
3115
|
+
width: PropTypes__default["default"].string,
|
|
3116
|
+
color: PropTypes__default["default"].string,
|
|
3117
|
+
positionTop: PropTypes__default["default"].string
|
|
3108
3118
|
};
|
|
3109
3119
|
|
|
3110
3120
|
var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
@@ -3116,7 +3126,7 @@ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
|
3116
3126
|
|
|
3117
3127
|
switch (iconType) {
|
|
3118
3128
|
case "crown":
|
|
3119
|
-
return /*#__PURE__*/
|
|
3129
|
+
return /*#__PURE__*/React__default["default"].createElement(CrownIcon, {
|
|
3120
3130
|
width: width,
|
|
3121
3131
|
height: height,
|
|
3122
3132
|
color: color,
|
|
@@ -3124,7 +3134,7 @@ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
|
3124
3134
|
});
|
|
3125
3135
|
|
|
3126
3136
|
case "lock":
|
|
3127
|
-
return /*#__PURE__*/
|
|
3137
|
+
return /*#__PURE__*/React__default["default"].createElement(LockIcon, {
|
|
3128
3138
|
width: width,
|
|
3129
3139
|
height: height,
|
|
3130
3140
|
color: color,
|
|
@@ -3132,7 +3142,7 @@ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
|
3132
3142
|
});
|
|
3133
3143
|
|
|
3134
3144
|
case "key":
|
|
3135
|
-
return /*#__PURE__*/
|
|
3145
|
+
return /*#__PURE__*/React__default["default"].createElement(KeyIcon, {
|
|
3136
3146
|
width: width,
|
|
3137
3147
|
height: height,
|
|
3138
3148
|
color: color,
|
|
@@ -3140,7 +3150,7 @@ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
|
3140
3150
|
});
|
|
3141
3151
|
|
|
3142
3152
|
default:
|
|
3143
|
-
return /*#__PURE__*/
|
|
3153
|
+
return /*#__PURE__*/React__default["default"].createElement(StarIcon, {
|
|
3144
3154
|
width: width,
|
|
3145
3155
|
height: height,
|
|
3146
3156
|
color: color,
|
|
@@ -3149,21 +3159,21 @@ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
|
3149
3159
|
}
|
|
3150
3160
|
};
|
|
3151
3161
|
PremiumStoryIcon.propTypes = {
|
|
3152
|
-
width:
|
|
3153
|
-
height:
|
|
3154
|
-
color:
|
|
3155
|
-
iconType:
|
|
3156
|
-
positionTop:
|
|
3162
|
+
width: PropTypes__default["default"].string,
|
|
3163
|
+
height: PropTypes__default["default"].string,
|
|
3164
|
+
color: PropTypes__default["default"].string,
|
|
3165
|
+
iconType: PropTypes__default["default"].string,
|
|
3166
|
+
positionTop: PropTypes__default["default"].string
|
|
3157
3167
|
};
|
|
3158
3168
|
|
|
3159
3169
|
function LiveIcon() {
|
|
3160
|
-
return /*#__PURE__*/
|
|
3170
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3161
3171
|
className: "live-icon",
|
|
3162
3172
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3163
3173
|
width: "25",
|
|
3164
3174
|
height: "24",
|
|
3165
3175
|
viewBox: "0 0 25 24"
|
|
3166
|
-
}, /*#__PURE__*/
|
|
3176
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3167
3177
|
fill: "#ff5858",
|
|
3168
3178
|
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"
|
|
3169
3179
|
}));
|
|
@@ -3220,37 +3230,37 @@ var Headline = function Headline(_ref) {
|
|
|
3220
3230
|
var wrapperClass = premiumStory ? "wrapper" : "";
|
|
3221
3231
|
var iconSize = "24px";
|
|
3222
3232
|
var enableLiveIcon = showLiveIcon && story["story-template"] === "live-blog" && !get_1(story, ["metadata", "is-closed"], false);
|
|
3223
|
-
return /*#__PURE__*/
|
|
3233
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3224
3234
|
"data-test-id": "headline",
|
|
3225
3235
|
className: "arrow-component arr--headline " + _getClassName(wrapperClass, _styleModuleImportMap$c)
|
|
3226
|
-
}, premiumStory && /*#__PURE__*/
|
|
3236
|
+
}, premiumStory && /*#__PURE__*/React__default["default"].createElement(PremiumStoryIcon, {
|
|
3227
3237
|
width: iconSize,
|
|
3228
3238
|
height: iconSize,
|
|
3229
3239
|
color: iconColor,
|
|
3230
3240
|
iconType: iconStyle,
|
|
3231
3241
|
positionTop: positionHeadline()
|
|
3232
|
-
}), isLink ? /*#__PURE__*/
|
|
3242
|
+
}), isLink ? /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
3233
3243
|
href: getStoryUrl(story, "/".concat(story.slug)),
|
|
3234
3244
|
externalLink: isExternalStory(story),
|
|
3235
3245
|
"aria-label": "headline"
|
|
3236
|
-
}, /*#__PURE__*/
|
|
3246
|
+
}, /*#__PURE__*/React__default["default"].createElement(HeaderTag, {
|
|
3237
3247
|
className: _getClassName("headline ".concat(textColor), _styleModuleImportMap$c)
|
|
3238
|
-
}, enableLiveIcon && /*#__PURE__*/
|
|
3248
|
+
}, enableLiveIcon && /*#__PURE__*/React__default["default"].createElement(LiveIcon, null), headline)) : /*#__PURE__*/React__default["default"].createElement(HeaderTag, {
|
|
3239
3249
|
className: _getClassName("headline ".concat(textColor), _styleModuleImportMap$c)
|
|
3240
|
-
}, enableLiveIcon && /*#__PURE__*/
|
|
3250
|
+
}, enableLiveIcon && /*#__PURE__*/React__default["default"].createElement(LiveIcon, null), headline));
|
|
3241
3251
|
};
|
|
3242
3252
|
Headline.propTypes = {
|
|
3243
3253
|
/** The Story Object from the API response */
|
|
3244
|
-
story:
|
|
3254
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
3245
3255
|
|
|
3246
3256
|
/** Header tags ranging h1-h6, where h[headerLevel] */
|
|
3247
|
-
headerLevel:
|
|
3248
|
-
premiumStoryIconConfig:
|
|
3249
|
-
iconColor:
|
|
3250
|
-
iconType:
|
|
3251
|
-
enablePremiumStoryIcon:
|
|
3257
|
+
headerLevel: PropTypes__default["default"].string,
|
|
3258
|
+
premiumStoryIconConfig: PropTypes__default["default"].shape({
|
|
3259
|
+
iconColor: PropTypes__default["default"].string,
|
|
3260
|
+
iconType: PropTypes__default["default"].string,
|
|
3261
|
+
enablePremiumStoryIcon: PropTypes__default["default"].bool
|
|
3252
3262
|
}),
|
|
3253
|
-
isLink:
|
|
3263
|
+
isLink: PropTypes__default["default"].bool
|
|
3254
3264
|
};
|
|
3255
3265
|
Headline.defaultProps = {
|
|
3256
3266
|
headerLevel: "6",
|
|
@@ -3277,7 +3287,7 @@ var Subheadline = function Subheadline(_ref) {
|
|
|
3277
3287
|
var subheadline = forceShowAtom || get_1(config, ["showSubheadline"], true);
|
|
3278
3288
|
if (!subheadline) return null;
|
|
3279
3289
|
var textColor = getTextColor(config.theme);
|
|
3280
|
-
return /*#__PURE__*/
|
|
3290
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3281
3291
|
style: {
|
|
3282
3292
|
WebkitLineClamp: lineClamp
|
|
3283
3293
|
},
|
|
@@ -3287,15 +3297,15 @@ var Subheadline = function Subheadline(_ref) {
|
|
|
3287
3297
|
};
|
|
3288
3298
|
Subheadline.propTypes = {
|
|
3289
3299
|
/** The Story Object from the API response */
|
|
3290
|
-
story:
|
|
3300
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
3291
3301
|
// Restricts the number of lines for subheadline.
|
|
3292
|
-
lineClamp:
|
|
3302
|
+
lineClamp: PropTypes__default["default"].number,
|
|
3293
3303
|
|
|
3294
3304
|
/** Number of characters to truncate the subheadline */
|
|
3295
|
-
truncateChars:
|
|
3296
|
-
clazzName:
|
|
3297
|
-
forceShowAtom:
|
|
3298
|
-
showFullContent:
|
|
3305
|
+
truncateChars: PropTypes__default["default"].number,
|
|
3306
|
+
clazzName: PropTypes__default["default"].string,
|
|
3307
|
+
forceShowAtom: PropTypes__default["default"].bool,
|
|
3308
|
+
showFullContent: PropTypes__default["default"].bool
|
|
3299
3309
|
};
|
|
3300
3310
|
Subheadline.defaultProps = {
|
|
3301
3311
|
forceShowAtom: false,
|
|
@@ -3321,18 +3331,18 @@ var TimeStamp = function TimeStamp(_ref) {
|
|
|
3321
3331
|
var time = story["last-published-at"] || story["first-published-at"];
|
|
3322
3332
|
var isBottomClasses = isBottom ? "bottom-fix" : "";
|
|
3323
3333
|
var textColor = getTextColor(configState.theme);
|
|
3324
|
-
return /*#__PURE__*/
|
|
3334
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isTime && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3325
3335
|
"data-test-id": "publish-time",
|
|
3326
3336
|
className: "time arr--publish-time " + _getClassName("time ".concat(textColor, " ").concat(isBottomClasses), _styleModuleImportMap$a)
|
|
3327
|
-
}, /*#__PURE__*/
|
|
3337
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3328
3338
|
className: "timestamp-m_time-wrapper__3O2lM"
|
|
3329
3339
|
}, getTimeStamp(time, formatter, config))));
|
|
3330
3340
|
};
|
|
3331
3341
|
TimeStamp.propTypes = {
|
|
3332
3342
|
/** The Story Object from the API response */
|
|
3333
|
-
story:
|
|
3334
|
-
isBottom:
|
|
3335
|
-
config:
|
|
3343
|
+
story: PropTypes__default["default"].object,
|
|
3344
|
+
isBottom: PropTypes__default["default"].bool,
|
|
3345
|
+
config: PropTypes__default["default"].object
|
|
3336
3346
|
};
|
|
3337
3347
|
|
|
3338
3348
|
var _styleModuleImportMap$9 = {
|
|
@@ -3375,10 +3385,10 @@ var AuthorBase = function AuthorBase(_ref) {
|
|
|
3375
3385
|
return null;
|
|
3376
3386
|
}
|
|
3377
3387
|
|
|
3378
|
-
return /*#__PURE__*/
|
|
3388
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3379
3389
|
"data-test-id": "author-image",
|
|
3380
3390
|
className: _getClassName("author-image ".concat(dir, "-image"), _styleModuleImportMap$9)
|
|
3381
|
-
}, /*#__PURE__*/
|
|
3391
|
+
}, /*#__PURE__*/React__default["default"].createElement("figure", null, avatarS3Key ? /*#__PURE__*/React__default["default"].createElement(components.ResponsiveImage, {
|
|
3382
3392
|
slug: avatarS3Key,
|
|
3383
3393
|
"aspect-ratio": [1, 1],
|
|
3384
3394
|
defaultWidth: 400,
|
|
@@ -3386,14 +3396,14 @@ var AuthorBase = function AuthorBase(_ref) {
|
|
|
3386
3396
|
auto: ["format", "compress"]
|
|
3387
3397
|
},
|
|
3388
3398
|
alt: authorName
|
|
3389
|
-
}) : /*#__PURE__*/
|
|
3399
|
+
}) : /*#__PURE__*/React__default["default"].createElement("img", {
|
|
3390
3400
|
src: avatarUrl
|
|
3391
3401
|
})));
|
|
3392
3402
|
};
|
|
3393
3403
|
|
|
3394
3404
|
var isPrefix = function isPrefix(dir) {
|
|
3395
3405
|
if (prefix) {
|
|
3396
|
-
return /*#__PURE__*/
|
|
3406
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3397
3407
|
className: "arr-author-prefix " + _getClassName("prefix ".concat(textColor), _styleModuleImportMap$9)
|
|
3398
3408
|
}, prefix);
|
|
3399
3409
|
}
|
|
@@ -3401,11 +3411,11 @@ var AuthorBase = function AuthorBase(_ref) {
|
|
|
3401
3411
|
return !hideAuthorImage && authorImage(dir);
|
|
3402
3412
|
};
|
|
3403
3413
|
|
|
3404
|
-
return /*#__PURE__*/
|
|
3414
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isAuthor && /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
3405
3415
|
href: "".concat(mountAt, "/author/") + slug,
|
|
3406
3416
|
"aria-label": "author-name",
|
|
3407
3417
|
className: "author-name arr-author-name arrow-component " + _getClassName("author ".concat(isBottomClasses), _styleModuleImportMap$9)
|
|
3408
|
-
}, isPrefix("ltr"), /*#__PURE__*/
|
|
3418
|
+
}, isPrefix("ltr"), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3409
3419
|
"data-test-id": "author-name",
|
|
3410
3420
|
className: "author-name " + _getClassName("author-name ".concat(textColor), _styleModuleImportMap$9)
|
|
3411
3421
|
}, authorName || story["author-name"]), !prefix && isPrefix("rtl")));
|
|
@@ -3417,18 +3427,18 @@ function mapStateToProps(state) {
|
|
|
3417
3427
|
};
|
|
3418
3428
|
}
|
|
3419
3429
|
|
|
3420
|
-
var Author = connect(mapStateToProps)(AuthorBase);
|
|
3430
|
+
var Author = reactRedux.connect(mapStateToProps)(AuthorBase);
|
|
3421
3431
|
AuthorBase.propTypes = {
|
|
3422
3432
|
/** The Story Object from the API response */
|
|
3423
|
-
story:
|
|
3433
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
3424
3434
|
|
|
3425
3435
|
/** Hide Author Avatar Image */
|
|
3426
|
-
hideAuthorImage:
|
|
3436
|
+
hideAuthorImage: PropTypes__default["default"].bool,
|
|
3427
3437
|
// fix Author bottom of the storyCard
|
|
3428
|
-
isBottom:
|
|
3438
|
+
isBottom: PropTypes__default["default"].bool,
|
|
3429
3439
|
// fix prefix before the author name
|
|
3430
|
-
prefix:
|
|
3431
|
-
config:
|
|
3440
|
+
prefix: PropTypes__default["default"].string,
|
|
3441
|
+
config: PropTypes__default["default"].object
|
|
3432
3442
|
};
|
|
3433
3443
|
AuthorBase.defaultProps = {
|
|
3434
3444
|
hideAuthorImage: false,
|
|
@@ -3449,14 +3459,14 @@ var Dot = function Dot(_ref) {
|
|
|
3449
3459
|
height = _ref$height === void 0 ? "3px" : _ref$height,
|
|
3450
3460
|
_ref$color = _ref.color,
|
|
3451
3461
|
color = _ref$color === void 0 ? "light" : _ref$color;
|
|
3452
|
-
return /*#__PURE__*/
|
|
3462
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3453
3463
|
className: _getClassName(color, _styleModuleImportMap$8)
|
|
3454
|
-
}, /*#__PURE__*/
|
|
3464
|
+
}, /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3455
3465
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3456
3466
|
width: width,
|
|
3457
3467
|
height: height,
|
|
3458
3468
|
viewBox: "0 0 3 3"
|
|
3459
|
-
}, /*#__PURE__*/
|
|
3469
|
+
}, /*#__PURE__*/React__default["default"].createElement("circle", {
|
|
3460
3470
|
cx: "87",
|
|
3461
3471
|
cy: "9",
|
|
3462
3472
|
r: "1",
|
|
@@ -3467,9 +3477,9 @@ var Dot = function Dot(_ref) {
|
|
|
3467
3477
|
};
|
|
3468
3478
|
Dot.propTypes = {
|
|
3469
3479
|
/** height , width and color of the dot icon */
|
|
3470
|
-
color:
|
|
3471
|
-
width:
|
|
3472
|
-
height:
|
|
3480
|
+
color: PropTypes__default["default"].string,
|
|
3481
|
+
width: PropTypes__default["default"].string,
|
|
3482
|
+
height: PropTypes__default["default"].string
|
|
3473
3483
|
};
|
|
3474
3484
|
|
|
3475
3485
|
var _styleModuleImportMap$7 = {
|
|
@@ -3485,22 +3495,22 @@ var Divider = function Divider(_ref) {
|
|
|
3485
3495
|
height = _ref$height === void 0 ? "10" : _ref$height,
|
|
3486
3496
|
_ref$color = _ref.color,
|
|
3487
3497
|
color = _ref$color === void 0 ? "light" : _ref$color;
|
|
3488
|
-
return /*#__PURE__*/
|
|
3498
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3489
3499
|
className: _getClassName(color, _styleModuleImportMap$7)
|
|
3490
|
-
}, /*#__PURE__*/
|
|
3500
|
+
}, /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3491
3501
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3492
3502
|
width: width,
|
|
3493
3503
|
height: height
|
|
3494
|
-
}, /*#__PURE__*/
|
|
3504
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3495
3505
|
fill: "inherit",
|
|
3496
3506
|
d: "M0 0h1v10H0z"
|
|
3497
3507
|
})));
|
|
3498
3508
|
};
|
|
3499
3509
|
Divider.propTypes = {
|
|
3500
3510
|
/** height , width and color of the dot icon */
|
|
3501
|
-
color:
|
|
3502
|
-
width:
|
|
3503
|
-
height:
|
|
3511
|
+
color: PropTypes__default["default"].string,
|
|
3512
|
+
width: PropTypes__default["default"].string,
|
|
3513
|
+
height: PropTypes__default["default"].string
|
|
3504
3514
|
};
|
|
3505
3515
|
|
|
3506
3516
|
var _styleModuleImportMap$6 = {
|
|
@@ -3523,23 +3533,23 @@ var ReadTime = function ReadTime(_ref) {
|
|
|
3523
3533
|
var textColor = isLightTheme ? "light" : getTextColor(config.theme);
|
|
3524
3534
|
if (!showReadTime || !readTime) return null;
|
|
3525
3535
|
var timeToRead = get_1(opts, ["localizedTimeToRead"]) || "min read";
|
|
3526
|
-
return /*#__PURE__*/
|
|
3536
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3527
3537
|
"data-test-id": "read-time",
|
|
3528
3538
|
className: "arrow-component arr--read-time " + _getClassName("read-time-wrapper ".concat(textColor), _styleModuleImportMap$6)
|
|
3529
|
-
}, /*#__PURE__*/
|
|
3539
|
+
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
3530
3540
|
className: "read-time-indicator read-time-m_dot-indicator__3Sqh2"
|
|
3531
|
-
}, /*#__PURE__*/
|
|
3541
|
+
}, /*#__PURE__*/React__default["default"].createElement(Dot, {
|
|
3532
3542
|
color: textColor
|
|
3533
|
-
})), /*#__PURE__*/
|
|
3543
|
+
})), /*#__PURE__*/React__default["default"].createElement("span", null, readTime, " ", timeToRead)));
|
|
3534
3544
|
};
|
|
3535
3545
|
ReadTime.propTypes = {
|
|
3536
|
-
story:
|
|
3537
|
-
"read-time":
|
|
3546
|
+
story: PropTypes__default["default"].shape({
|
|
3547
|
+
"read-time": PropTypes__default["default"].number
|
|
3538
3548
|
}),
|
|
3539
|
-
opts:
|
|
3540
|
-
showReadTime:
|
|
3549
|
+
opts: PropTypes__default["default"].shape({
|
|
3550
|
+
showReadTime: PropTypes__default["default"].bool
|
|
3541
3551
|
}),
|
|
3542
|
-
isLightTheme:
|
|
3552
|
+
isLightTheme: PropTypes__default["default"].bool
|
|
3543
3553
|
};
|
|
3544
3554
|
|
|
3545
3555
|
var _styleModuleImportMap$5 = {
|
|
@@ -3570,33 +3580,33 @@ var AuthorWithTime = function AuthorWithTime(_ref) {
|
|
|
3570
3580
|
|
|
3571
3581
|
var getSeparator = function getSeparator() {
|
|
3572
3582
|
if (separator === "divider") {
|
|
3573
|
-
return /*#__PURE__*/
|
|
3583
|
+
return /*#__PURE__*/React__default["default"].createElement(Divider, {
|
|
3574
3584
|
color: textColor
|
|
3575
3585
|
});
|
|
3576
3586
|
}
|
|
3577
3587
|
|
|
3578
|
-
return /*#__PURE__*/
|
|
3588
|
+
return /*#__PURE__*/React__default["default"].createElement(Dot, {
|
|
3579
3589
|
color: textColor
|
|
3580
3590
|
});
|
|
3581
3591
|
};
|
|
3582
3592
|
|
|
3583
3593
|
var getTimeStamp = function getTimeStamp() {
|
|
3584
3594
|
if (!isTime) return null;
|
|
3585
|
-
return /*#__PURE__*/
|
|
3595
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isAuthor && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
3586
3596
|
className: "arr-separator " + _getClassName("".concat(seperatorStyle), _styleModuleImportMap$5)
|
|
3587
|
-
}, getSeparator()), /*#__PURE__*/
|
|
3597
|
+
}, getSeparator()), /*#__PURE__*/React__default["default"].createElement(TimeStamp, {
|
|
3588
3598
|
story: story,
|
|
3589
3599
|
config: config
|
|
3590
|
-
}), isReadTime && /*#__PURE__*/
|
|
3600
|
+
}), isReadTime && /*#__PURE__*/React__default["default"].createElement(ReadTime, {
|
|
3591
3601
|
story: story,
|
|
3592
3602
|
opts: config,
|
|
3593
3603
|
isLightTheme: isLightTheme
|
|
3594
3604
|
}));
|
|
3595
3605
|
};
|
|
3596
3606
|
|
|
3597
|
-
return /*#__PURE__*/
|
|
3607
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3598
3608
|
className: "arr--author-time " + _getClassName("author-time-wrapper ".concat(isBottomClasses), _styleModuleImportMap$5)
|
|
3599
|
-
}, isAuthor ? /*#__PURE__*/
|
|
3609
|
+
}, isAuthor ? /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(Author, {
|
|
3600
3610
|
story: story,
|
|
3601
3611
|
isBottom: true,
|
|
3602
3612
|
hideAuthorImage: hideAuthorImage,
|
|
@@ -3604,19 +3614,19 @@ var AuthorWithTime = function AuthorWithTime(_ref) {
|
|
|
3604
3614
|
}), getTimeStamp()) : getTimeStamp());
|
|
3605
3615
|
};
|
|
3606
3616
|
AuthorWithTime.propTypes = {
|
|
3607
|
-
story:
|
|
3617
|
+
story: PropTypes__default["default"].object,
|
|
3608
3618
|
|
|
3609
3619
|
/** Style of separator between the Author & Timestamp */
|
|
3610
|
-
separator:
|
|
3620
|
+
separator: PropTypes__default["default"].oneOf(["dot", "divider"]),
|
|
3611
3621
|
|
|
3612
3622
|
/** hide the author image */
|
|
3613
|
-
hideAuthorImage:
|
|
3623
|
+
hideAuthorImage: PropTypes__default["default"].bool,
|
|
3614
3624
|
// fix author and time at the end
|
|
3615
|
-
isBottom:
|
|
3625
|
+
isBottom: PropTypes__default["default"].bool,
|
|
3616
3626
|
// fix prefix before the author name
|
|
3617
|
-
prefix:
|
|
3618
|
-
config:
|
|
3619
|
-
isLightTheme:
|
|
3627
|
+
prefix: PropTypes__default["default"].string,
|
|
3628
|
+
config: PropTypes__default["default"].object,
|
|
3629
|
+
isLightTheme: PropTypes__default["default"].bool
|
|
3620
3630
|
};
|
|
3621
3631
|
AuthorWithTime.defaultProps = {
|
|
3622
3632
|
separator: "dot",
|
|
@@ -3694,27 +3704,27 @@ var ImageFallbackIcon = function ImageFallbackIcon(_ref) {
|
|
|
3694
3704
|
height = _ref$height === void 0 ? 30 : _ref$height,
|
|
3695
3705
|
_ref$iconColor = _ref.iconColor,
|
|
3696
3706
|
iconColor = _ref$iconColor === void 0 ? "#99B0CB" : _ref$iconColor;
|
|
3697
|
-
return /*#__PURE__*/
|
|
3707
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3698
3708
|
width: width,
|
|
3699
3709
|
height: height,
|
|
3700
3710
|
viewBox: "0 0 102 76",
|
|
3701
3711
|
version: "1.1"
|
|
3702
|
-
}, /*#__PURE__*/
|
|
3712
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3703
3713
|
id: "demo-home-copy",
|
|
3704
3714
|
stroke: "none",
|
|
3705
3715
|
strokeWidth: "1",
|
|
3706
3716
|
fill: "none",
|
|
3707
3717
|
fillRule: "evenodd",
|
|
3708
3718
|
transform: "translate(-377.000000, -314.000000)"
|
|
3709
|
-
}, /*#__PURE__*/
|
|
3719
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3710
3720
|
id: "Group-13",
|
|
3711
3721
|
transform: "translate(377.000000, 314.000000)"
|
|
3712
|
-
}, /*#__PURE__*/
|
|
3722
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3713
3723
|
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",
|
|
3714
3724
|
id: "Combined-Shape",
|
|
3715
3725
|
fill: iconColor,
|
|
3716
3726
|
fillRule: "nonzero"
|
|
3717
|
-
}), /*#__PURE__*/
|
|
3727
|
+
}), /*#__PURE__*/React__default["default"].createElement("rect", {
|
|
3718
3728
|
id: "Rectangle-19",
|
|
3719
3729
|
stroke: iconColor,
|
|
3720
3730
|
strokeWidth: "3",
|
|
@@ -3726,24 +3736,24 @@ var ImageFallbackIcon = function ImageFallbackIcon(_ref) {
|
|
|
3726
3736
|
}))));
|
|
3727
3737
|
};
|
|
3728
3738
|
ImageFallbackIcon.propTypes = {
|
|
3729
|
-
width:
|
|
3730
|
-
height:
|
|
3731
|
-
iconColor:
|
|
3739
|
+
width: PropTypes__default["default"].object,
|
|
3740
|
+
height: PropTypes__default["default"].object,
|
|
3741
|
+
iconColor: PropTypes__default["default"].object
|
|
3732
3742
|
};
|
|
3733
3743
|
|
|
3734
3744
|
var imageFallback = function imageFallback() {
|
|
3735
|
-
return /*#__PURE__*/
|
|
3745
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3736
3746
|
className: "arr--fallback-image fallback-m_image__1GYCJ fallback-m_image-position__3KddP"
|
|
3737
|
-
}, /*#__PURE__*/
|
|
3747
|
+
}, /*#__PURE__*/React__default["default"].createElement("figure", {
|
|
3738
3748
|
className: "arr--fallback-svg fallback-m_fallback-svg__tK9fL"
|
|
3739
|
-
}, /*#__PURE__*/
|
|
3749
|
+
}, /*#__PURE__*/React__default["default"].createElement(ImageFallbackIcon, null)));
|
|
3740
3750
|
};
|
|
3741
3751
|
|
|
3742
3752
|
var FallbackImage = function FallbackImage(_ref) {
|
|
3743
3753
|
var slug = _ref.slug;
|
|
3744
3754
|
|
|
3745
3755
|
if (slug) {
|
|
3746
|
-
return /*#__PURE__*/
|
|
3756
|
+
return /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
3747
3757
|
href: slug,
|
|
3748
3758
|
"aria-label": "image-fallback"
|
|
3749
3759
|
}, imageFallback());
|
|
@@ -3752,23 +3762,23 @@ var FallbackImage = function FallbackImage(_ref) {
|
|
|
3752
3762
|
}
|
|
3753
3763
|
};
|
|
3754
3764
|
FallbackImage.propTypes = {
|
|
3755
|
-
slug:
|
|
3765
|
+
slug: PropTypes__default["default"].string
|
|
3756
3766
|
};
|
|
3757
3767
|
|
|
3758
3768
|
var HyperLinkIcon = function HyperLinkIcon() {
|
|
3759
|
-
return /*#__PURE__*/
|
|
3769
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3760
3770
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3761
3771
|
width: "36",
|
|
3762
3772
|
height: "28"
|
|
3763
|
-
}, /*#__PURE__*/
|
|
3773
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3764
3774
|
fill: "none",
|
|
3765
3775
|
fillRule: "evenodd"
|
|
3766
|
-
}, /*#__PURE__*/
|
|
3776
|
+
}, /*#__PURE__*/React__default["default"].createElement("rect", {
|
|
3767
3777
|
width: "36",
|
|
3768
3778
|
height: "28",
|
|
3769
3779
|
fill: "#3D6FCF",
|
|
3770
3780
|
rx: "4"
|
|
3771
|
-
}), /*#__PURE__*/
|
|
3781
|
+
}), /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3772
3782
|
stroke: "#FFF",
|
|
3773
3783
|
strokeLinecap: "round",
|
|
3774
3784
|
strokeLinejoin: "round",
|
|
@@ -3781,16 +3791,16 @@ var HyperLink = function HyperLink(_ref) {
|
|
|
3781
3791
|
var _ref$hyperLink = _ref.hyperLink,
|
|
3782
3792
|
hyperLink = _ref$hyperLink === void 0 ? "" : _ref$hyperLink;
|
|
3783
3793
|
if (!hyperLink) return null;
|
|
3784
|
-
return /*#__PURE__*/
|
|
3794
|
+
return /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
3785
3795
|
href: hyperLink,
|
|
3786
3796
|
"aria-label": "hyperlink-button",
|
|
3787
3797
|
className: "arr--hyperlink-button hyperlink-m_hyperlink-button__1CqWx",
|
|
3788
3798
|
target: "_blank",
|
|
3789
3799
|
rel: "noopener noreferrer"
|
|
3790
|
-
}, /*#__PURE__*/
|
|
3800
|
+
}, /*#__PURE__*/React__default["default"].createElement(HyperLinkIcon, null));
|
|
3791
3801
|
};
|
|
3792
3802
|
HyperLink.propTypes = {
|
|
3793
|
-
hyperLink:
|
|
3803
|
+
hyperLink: PropTypes__default["default"].string
|
|
3794
3804
|
};
|
|
3795
3805
|
|
|
3796
3806
|
var _styleModuleImportMap$4 = {
|
|
@@ -3826,7 +3836,7 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
3826
3836
|
StoryTemplateIcon = _config$StoryTemplate === void 0 ? function () {
|
|
3827
3837
|
return null;
|
|
3828
3838
|
} : _config$StoryTemplate;
|
|
3829
|
-
var showImagePlaceholder = useSelector(function (state) {
|
|
3839
|
+
var showImagePlaceholder = reactRedux.useSelector(function (state) {
|
|
3830
3840
|
return get_1(state, ["qt", "config", "showPlaceholder"]);
|
|
3831
3841
|
});
|
|
3832
3842
|
var getPlaceholderStyleName = showImagePlaceholder ? "placeholder" : "";
|
|
@@ -3862,37 +3872,37 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
3862
3872
|
var fallbackImage = function fallbackImage() {
|
|
3863
3873
|
if (!slug) {
|
|
3864
3874
|
if (fallbackImageUrl && !isStoryPageImage) {
|
|
3865
|
-
return /*#__PURE__*/
|
|
3875
|
+
return /*#__PURE__*/React__default["default"].createElement("figure", {
|
|
3866
3876
|
style: {
|
|
3867
3877
|
paddingTop: imagePadding + "%"
|
|
3868
3878
|
},
|
|
3869
3879
|
className: "arr--responsive-hero-image " + _getClassName("image ".concat(getPlaceholderStyleName), _styleModuleImportMap$4)
|
|
3870
|
-
}, /*#__PURE__*/
|
|
3880
|
+
}, /*#__PURE__*/React__default["default"].createElement("img", {
|
|
3871
3881
|
className: "qt-image",
|
|
3872
3882
|
"data-src": "".concat(fallbackImageUrl),
|
|
3873
3883
|
alt: "image-fallback"
|
|
3874
3884
|
}));
|
|
3875
3885
|
}
|
|
3876
3886
|
|
|
3877
|
-
return /*#__PURE__*/
|
|
3887
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, defaultFallback ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3878
3888
|
"data-test-id": "arr--fallback-hero-image",
|
|
3879
3889
|
style: {
|
|
3880
3890
|
paddingTop: imagePadding + "%"
|
|
3881
3891
|
},
|
|
3882
3892
|
className: "arr--fallback-hero-image " + _getClassName("image ".concat(getPlaceholderStyleName), _styleModuleImportMap$4)
|
|
3883
|
-
}, /*#__PURE__*/
|
|
3893
|
+
}, /*#__PURE__*/React__default["default"].createElement(StoryTemplateIcon, {
|
|
3884
3894
|
storyTemplate: story["story-template"]
|
|
3885
|
-
}), /*#__PURE__*/
|
|
3895
|
+
}), /*#__PURE__*/React__default["default"].createElement(FallbackImage, null)) : null);
|
|
3886
3896
|
}
|
|
3887
3897
|
|
|
3888
|
-
return /*#__PURE__*/
|
|
3898
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("figure", {
|
|
3889
3899
|
style: {
|
|
3890
3900
|
paddingTop: imagePadding + "%"
|
|
3891
3901
|
},
|
|
3892
3902
|
className: "arr--responsive-hero-image " + _getClassName("image ".concat(getPlaceholderStyleName), _styleModuleImportMap$4)
|
|
3893
|
-
}, /*#__PURE__*/
|
|
3903
|
+
}, /*#__PURE__*/React__default["default"].createElement(StoryTemplateIcon, {
|
|
3894
3904
|
storyTemplate: story["story-template"]
|
|
3895
|
-
}), /*#__PURE__*/
|
|
3905
|
+
}), /*#__PURE__*/React__default["default"].createElement(components.ResponsiveHeroImage, {
|
|
3896
3906
|
story: story,
|
|
3897
3907
|
aspectRatio: imageAspectRatio,
|
|
3898
3908
|
defaultWidth: defaultWidth,
|
|
@@ -3901,15 +3911,15 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
3901
3911
|
auto: ["format", "compress"],
|
|
3902
3912
|
fit: "max"
|
|
3903
3913
|
}
|
|
3904
|
-
})), isStoryPageImage && hyperLink && /*#__PURE__*/
|
|
3914
|
+
})), isStoryPageImage && hyperLink && /*#__PURE__*/React__default["default"].createElement(HyperLink, {
|
|
3905
3915
|
hyperLink: hyperLink
|
|
3906
3916
|
}));
|
|
3907
3917
|
};
|
|
3908
3918
|
|
|
3909
|
-
return story && (isStoryPageImage ? /*#__PURE__*/
|
|
3919
|
+
return story && (isStoryPageImage ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3910
3920
|
"data-test-id": "arr--hero-image",
|
|
3911
3921
|
className: "arr--hero-image " + _getClassName("".concat(heroImageClass, " ").concat(fullBleed, " ").concat(heroImageMobClasses), _styleModuleImportMap$4)
|
|
3912
|
-
}, fallbackImage()) : /*#__PURE__*/
|
|
3922
|
+
}, fallbackImage()) : /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
3913
3923
|
"data-test-id": "arr--hero-image",
|
|
3914
3924
|
href: getStoryUrl(story, "/".concat(story.slug)),
|
|
3915
3925
|
externalLink: isExternalStory(story),
|
|
@@ -3919,30 +3929,30 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
3919
3929
|
};
|
|
3920
3930
|
HeroImage.propTypes = {
|
|
3921
3931
|
/** The Story Object from the API response */
|
|
3922
|
-
story:
|
|
3932
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
3923
3933
|
|
|
3924
3934
|
/** Removes the Hero Image padding for the image to bleed over the margin */
|
|
3925
|
-
FullBleed:
|
|
3935
|
+
FullBleed: PropTypes__default["default"].bool,
|
|
3926
3936
|
|
|
3927
3937
|
/** The default width for the image, in case the browser does not support srcset */
|
|
3928
|
-
defaultWidth:
|
|
3938
|
+
defaultWidth: PropTypes__default["default"].number,
|
|
3929
3939
|
|
|
3930
3940
|
/** The list of available widths */
|
|
3931
|
-
widths:
|
|
3941
|
+
widths: PropTypes__default["default"].array,
|
|
3932
3942
|
// fatch the correct hero image
|
|
3933
|
-
aspectRatio:
|
|
3943
|
+
aspectRatio: PropTypes__default["default"].array,
|
|
3934
3944
|
// Hints for the browser to choose the best size
|
|
3935
3945
|
|
|
3936
3946
|
/** This prop is responsible for adding padding-right of the image and remove padding bottom of the image */
|
|
3937
|
-
isHorizontal:
|
|
3947
|
+
isHorizontal: PropTypes__default["default"].bool,
|
|
3938
3948
|
|
|
3939
3949
|
/** This prop is responsible for adding padding-bottom in desktop and padding-right in mobile */
|
|
3940
|
-
isHorizontalMobile:
|
|
3950
|
+
isHorizontalMobile: PropTypes__default["default"].bool,
|
|
3941
3951
|
// this prop is responsive for rendering fallback image on story page
|
|
3942
|
-
defaultFallback:
|
|
3943
|
-
isHorizontalWithImageLast:
|
|
3944
|
-
isStoryPageImage:
|
|
3945
|
-
config:
|
|
3952
|
+
defaultFallback: PropTypes__default["default"].bool,
|
|
3953
|
+
isHorizontalWithImageLast: PropTypes__default["default"].bool,
|
|
3954
|
+
isStoryPageImage: PropTypes__default["default"].bool,
|
|
3955
|
+
config: PropTypes__default["default"].object
|
|
3946
3956
|
};
|
|
3947
3957
|
HeroImage.defaultProps = {
|
|
3948
3958
|
FullBleed: true,
|
|
@@ -3992,22 +4002,22 @@ var SectionTag = function SectionTag(_ref) {
|
|
|
3992
4002
|
}
|
|
3993
4003
|
|
|
3994
4004
|
if (!isSection) return null;
|
|
3995
|
-
return /*#__PURE__*/
|
|
4005
|
+
return /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
3996
4006
|
href: getUrl,
|
|
3997
4007
|
className: "arrow-component arr--section-name",
|
|
3998
4008
|
"aria-label": "section-name"
|
|
3999
|
-
}, /*#__PURE__*/
|
|
4009
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4000
4010
|
"data-test-id": "sectionTag",
|
|
4001
4011
|
style: {
|
|
4002
4012
|
backgroundColor: templateStyle.includes("section-solid") ? sectionTagBorderColor : ""
|
|
4003
4013
|
},
|
|
4004
4014
|
className: "section-tag arrow-component " + _getClassName("".concat(textColor, " ").concat(templateStyle), _styleModuleImportMap$3)
|
|
4005
|
-
}, templateStyle.includes("section-borderLeft") && /*#__PURE__*/
|
|
4015
|
+
}, templateStyle.includes("section-borderLeft") && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
4006
4016
|
className: "section-m_border-left__2oUyp",
|
|
4007
4017
|
style: {
|
|
4008
4018
|
color: sectionTagBorderColor
|
|
4009
4019
|
}
|
|
4010
|
-
}), section["display-name"] || section["name"], /*#__PURE__*/
|
|
4020
|
+
}), section["display-name"] || section["name"], /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4011
4021
|
className: "section-m_border-bottom__3cRoD",
|
|
4012
4022
|
style: {
|
|
4013
4023
|
backgroundColor: "".concat(template === "solid" ? "" : sectionTagBorderColor)
|
|
@@ -4016,13 +4026,13 @@ var SectionTag = function SectionTag(_ref) {
|
|
|
4016
4026
|
};
|
|
4017
4027
|
SectionTag.propTypes = {
|
|
4018
4028
|
/** The Story Object from the API response */
|
|
4019
|
-
story:
|
|
4029
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
4020
4030
|
|
|
4021
4031
|
/** The style template for section tag */
|
|
4022
|
-
template:
|
|
4023
|
-
borderColor:
|
|
4024
|
-
solidBorderColor:
|
|
4025
|
-
isLightTheme:
|
|
4032
|
+
template: PropTypes__default["default"].oneOf(["", "borderBottomSml", "borderLeft", "solid"]),
|
|
4033
|
+
borderColor: PropTypes__default["default"].string,
|
|
4034
|
+
solidBorderColor: PropTypes__default["default"].string,
|
|
4035
|
+
isLightTheme: PropTypes__default["default"].bool
|
|
4026
4036
|
};
|
|
4027
4037
|
SectionTag.defaultProps = {
|
|
4028
4038
|
template: "",
|
|
@@ -4071,7 +4081,7 @@ var StoryCard = function StoryCard(_ref) {
|
|
|
4071
4081
|
prefix = _ref.prefix,
|
|
4072
4082
|
config = _ref.config,
|
|
4073
4083
|
isHorizontalWithImageLast = _ref.isHorizontalWithImageLast;
|
|
4074
|
-
if (!story || isEmpty(story)) return /*#__PURE__*/
|
|
4084
|
+
if (!story || isEmpty(story)) return /*#__PURE__*/React__default["default"].createElement("div", null);
|
|
4075
4085
|
var borderOptions = ["default", "full", "bottom", "boxShadow"];
|
|
4076
4086
|
var borderTemplate = borderOptions.includes(border) ? "border-".concat(border) : ""; // TODO optimize conditions
|
|
4077
4087
|
|
|
@@ -4081,7 +4091,7 @@ var StoryCard = function StoryCard(_ref) {
|
|
|
4081
4091
|
var bgImgContentOverlapClass = bgImgContentOverlap ? "content-overlap" : "";
|
|
4082
4092
|
var textColor = getTextColor(theme);
|
|
4083
4093
|
var horizontalMobileClasses = isHorizontalMobile ? "horizontal-mob" : "";
|
|
4084
|
-
var defaultStorycard = /*#__PURE__*/
|
|
4094
|
+
var defaultStorycard = /*#__PURE__*/React__default["default"].createElement(DefaultStoryCard, {
|
|
4085
4095
|
story: story,
|
|
4086
4096
|
aspectRatio: aspectRatio,
|
|
4087
4097
|
border: border,
|
|
@@ -4095,7 +4105,7 @@ var StoryCard = function StoryCard(_ref) {
|
|
|
4095
4105
|
config: config,
|
|
4096
4106
|
isHorizontalWithImageLast: isHorizontalWithImageLast
|
|
4097
4107
|
});
|
|
4098
|
-
return /*#__PURE__*/
|
|
4108
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4099
4109
|
"data-test-id": "story-card",
|
|
4100
4110
|
style: {
|
|
4101
4111
|
backgroundColor: theme,
|
|
@@ -4124,91 +4134,91 @@ var DefaultStoryCard = function DefaultStoryCard(_ref2) {
|
|
|
4124
4134
|
var SectionTagborderColor = rgbToHex(borderColor);
|
|
4125
4135
|
var _config$localizationC = config.localizationConfig,
|
|
4126
4136
|
localizationConfig = _config$localizationC === void 0 ? {} : _config$localizationC;
|
|
4127
|
-
return /*#__PURE__*/
|
|
4137
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isHorizontal ? /*#__PURE__*/React__default["default"].createElement(HeroImage, {
|
|
4128
4138
|
config: config,
|
|
4129
4139
|
story: story,
|
|
4130
4140
|
isHorizontal: true,
|
|
4131
4141
|
isHorizontalMobile: isHorizontalMobile,
|
|
4132
4142
|
aspectRatio: aspectRatio
|
|
4133
|
-
}) : isHorizontalWithImageLast ? /*#__PURE__*/
|
|
4143
|
+
}) : isHorizontalWithImageLast ? /*#__PURE__*/React__default["default"].createElement(HeroImage, {
|
|
4134
4144
|
config: config,
|
|
4135
4145
|
story: story,
|
|
4136
4146
|
isHorizontalWithImageLast: true,
|
|
4137
4147
|
isHorizontalMobile: isHorizontalMobile,
|
|
4138
4148
|
aspectRatio: aspectRatio
|
|
4139
|
-
}) : /*#__PURE__*/
|
|
4149
|
+
}) : /*#__PURE__*/React__default["default"].createElement(HeroImage, {
|
|
4140
4150
|
story: story,
|
|
4141
4151
|
config: config,
|
|
4142
4152
|
isHorizontalMobile: isHorizontalMobile,
|
|
4143
4153
|
aspectRatio: aspectRatio
|
|
4144
|
-
}), /*#__PURE__*/
|
|
4154
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4145
4155
|
className: "arr--story-content " + _getClassName("content ".concat(alignment), _styleModuleImportMap$2)
|
|
4146
|
-
}, /*#__PURE__*/
|
|
4156
|
+
}, /*#__PURE__*/React__default["default"].createElement(SectionTag, {
|
|
4147
4157
|
story: story,
|
|
4148
4158
|
borderColor: SectionTagborderColor
|
|
4149
|
-
}), /*#__PURE__*/
|
|
4159
|
+
}), /*#__PURE__*/React__default["default"].createElement(Headline, {
|
|
4150
4160
|
story: story,
|
|
4151
4161
|
headerLevel: headerLevel,
|
|
4152
4162
|
premiumStoryIconConfig: config
|
|
4153
|
-
}), /*#__PURE__*/
|
|
4163
|
+
}), /*#__PURE__*/React__default["default"].createElement(AuthorWithTime, {
|
|
4154
4164
|
config: localizationConfig,
|
|
4155
4165
|
story: story,
|
|
4156
4166
|
isBottom: true,
|
|
4157
4167
|
prefix: prefix,
|
|
4158
4168
|
hideAuthorImage: hideAuthorImage
|
|
4159
|
-
}), /*#__PURE__*/
|
|
4169
|
+
}), /*#__PURE__*/React__default["default"].createElement(Subheadline, {
|
|
4160
4170
|
story: story
|
|
4161
4171
|
})));
|
|
4162
4172
|
};
|
|
4163
4173
|
|
|
4164
4174
|
DefaultStoryCard.propTypes = {
|
|
4165
|
-
story:
|
|
4166
|
-
border:
|
|
4167
|
-
isBottom:
|
|
4168
|
-
isHorizontal:
|
|
4169
|
-
aspectRatio:
|
|
4170
|
-
isHorizontalMobile:
|
|
4171
|
-
centerAlign:
|
|
4172
|
-
headerLevel:
|
|
4173
|
-
borderColor:
|
|
4174
|
-
hideAuthorImage:
|
|
4175
|
-
prefix:
|
|
4176
|
-
config:
|
|
4177
|
-
isHorizontalWithImageLast:
|
|
4175
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
4176
|
+
border: PropTypes__default["default"].oneOfType([PropTypes__default["default"].string]),
|
|
4177
|
+
isBottom: PropTypes__default["default"].bool,
|
|
4178
|
+
isHorizontal: PropTypes__default["default"].bool,
|
|
4179
|
+
aspectRatio: PropTypes__default["default"].oneOfType([PropTypes__default["default"].array]),
|
|
4180
|
+
isHorizontalMobile: PropTypes__default["default"].bool,
|
|
4181
|
+
centerAlign: PropTypes__default["default"].bool,
|
|
4182
|
+
headerLevel: PropTypes__default["default"].string,
|
|
4183
|
+
borderColor: PropTypes__default["default"].string,
|
|
4184
|
+
hideAuthorImage: PropTypes__default["default"].bool,
|
|
4185
|
+
prefix: PropTypes__default["default"].string,
|
|
4186
|
+
config: PropTypes__default["default"].object,
|
|
4187
|
+
isHorizontalWithImageLast: PropTypes__default["default"].bool
|
|
4178
4188
|
};
|
|
4179
4189
|
StoryCard.propTypes = {
|
|
4180
4190
|
/** The Story Object from the API response */
|
|
4181
|
-
story:
|
|
4182
|
-
children:
|
|
4191
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
4192
|
+
children: PropTypes__default["default"].node,
|
|
4183
4193
|
|
|
4184
4194
|
/** Flip the Story Card to Horizonal mode */
|
|
4185
|
-
isHorizontal:
|
|
4195
|
+
isHorizontal: PropTypes__default["default"].bool,
|
|
4186
4196
|
|
|
4187
4197
|
/** Add border to the Story Card */
|
|
4188
|
-
border:
|
|
4198
|
+
border: PropTypes__default["default"].oneOfType([PropTypes__default["default"].string]),
|
|
4189
4199
|
// story card with background image
|
|
4190
|
-
useImageAsBackground:
|
|
4200
|
+
useImageAsBackground: PropTypes__default["default"].bool,
|
|
4191
4201
|
// story card content overlap with image
|
|
4192
|
-
bgImgContentOverlap:
|
|
4202
|
+
bgImgContentOverlap: PropTypes__default["default"].bool,
|
|
4193
4203
|
|
|
4194
4204
|
/** add aspect ratio for hero image */
|
|
4195
|
-
aspectRatio:
|
|
4205
|
+
aspectRatio: PropTypes__default["default"].oneOfType([PropTypes__default["default"].array]),
|
|
4196
4206
|
|
|
4197
4207
|
/** add theme(dark /light/custom color) for storycard */
|
|
4198
|
-
theme:
|
|
4208
|
+
theme: PropTypes__default["default"].string,
|
|
4199
4209
|
|
|
4200
4210
|
/** flip the story card mobile design horizontal */
|
|
4201
|
-
isHorizontalMobile:
|
|
4211
|
+
isHorizontalMobile: PropTypes__default["default"].bool,
|
|
4202
4212
|
// make content center align in desktop and left align in mobile
|
|
4203
|
-
centerAlign:
|
|
4204
|
-
headerLevel:
|
|
4205
|
-
borderColor:
|
|
4213
|
+
centerAlign: PropTypes__default["default"].bool,
|
|
4214
|
+
headerLevel: PropTypes__default["default"].string,
|
|
4215
|
+
borderColor: PropTypes__default["default"].string,
|
|
4206
4216
|
// handle author image through storycard
|
|
4207
|
-
hideAuthorImage:
|
|
4217
|
+
hideAuthorImage: PropTypes__default["default"].bool,
|
|
4208
4218
|
// handle author prefix through storycard
|
|
4209
|
-
prefix:
|
|
4210
|
-
config:
|
|
4211
|
-
isHorizontalWithImageLast:
|
|
4219
|
+
prefix: PropTypes__default["default"].string,
|
|
4220
|
+
config: PropTypes__default["default"].object,
|
|
4221
|
+
isHorizontalWithImageLast: PropTypes__default["default"].bool
|
|
4212
4222
|
};
|
|
4213
4223
|
StoryCard.defaultProps = {
|
|
4214
4224
|
isHorizontal: false,
|
|
@@ -4241,14 +4251,14 @@ var StorycardContent = function StorycardContent(_ref) {
|
|
|
4241
4251
|
var SectionTagborderColor = rgbToHex(borderColor);
|
|
4242
4252
|
var borderTemplate = borderOptions.includes(border) ? "border-".concat(border) : "";
|
|
4243
4253
|
var horizontalCard = isHorizontalMobile ? "horizontal-content-wrapper" : "";
|
|
4244
|
-
return /*#__PURE__*/
|
|
4254
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4245
4255
|
"data-test-id": "story-card-content",
|
|
4246
4256
|
style: {
|
|
4247
4257
|
backgroundColor: theme,
|
|
4248
4258
|
color: textColor
|
|
4249
4259
|
},
|
|
4250
4260
|
className: "arr--content-wrapper " + _getClassName("wrapper ".concat(borderTemplate, " ").concat(horizontalCard), _styleModuleImportMap$1)
|
|
4251
|
-
}, children || /*#__PURE__*/
|
|
4261
|
+
}, children || /*#__PURE__*/React__default["default"].createElement(DefaultStoryCardContent, {
|
|
4252
4262
|
story: story,
|
|
4253
4263
|
headerLevel: headerLevel,
|
|
4254
4264
|
isHorizontalMobile: isHorizontalMobile,
|
|
@@ -4266,37 +4276,37 @@ var DefaultStoryCardContent = function DefaultStoryCardContent(_ref2) {
|
|
|
4266
4276
|
var SectionTagborderColor = rgbToHex(borderColor);
|
|
4267
4277
|
var _config$localizationC = config.localizationConfig,
|
|
4268
4278
|
localizationConfig = _config$localizationC === void 0 ? {} : _config$localizationC;
|
|
4269
|
-
return /*#__PURE__*/
|
|
4279
|
+
return /*#__PURE__*/React__default["default"].createElement("div", null, /*#__PURE__*/React__default["default"].createElement(SectionTag, {
|
|
4270
4280
|
story: story,
|
|
4271
4281
|
borderColor: SectionTagborderColor
|
|
4272
|
-
}), /*#__PURE__*/
|
|
4282
|
+
}), /*#__PURE__*/React__default["default"].createElement(Headline, {
|
|
4273
4283
|
story: story,
|
|
4274
4284
|
headerLevel: headerLevel,
|
|
4275
4285
|
premiumStoryIconConfig: config
|
|
4276
|
-
}), /*#__PURE__*/
|
|
4286
|
+
}), /*#__PURE__*/React__default["default"].createElement(AuthorWithTime, {
|
|
4277
4287
|
config: localizationConfig,
|
|
4278
4288
|
story: story
|
|
4279
4289
|
}));
|
|
4280
4290
|
};
|
|
4281
4291
|
|
|
4282
4292
|
DefaultStoryCardContent.propTypes = {
|
|
4283
|
-
story:
|
|
4284
|
-
border:
|
|
4285
|
-
theme:
|
|
4286
|
-
isHorizontalMobile:
|
|
4287
|
-
headerLevel:
|
|
4288
|
-
borderColor:
|
|
4289
|
-
config:
|
|
4293
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
4294
|
+
border: PropTypes__default["default"].string,
|
|
4295
|
+
theme: PropTypes__default["default"].string,
|
|
4296
|
+
isHorizontalMobile: PropTypes__default["default"].bool,
|
|
4297
|
+
headerLevel: PropTypes__default["default"].string,
|
|
4298
|
+
borderColor: PropTypes__default["default"].string,
|
|
4299
|
+
config: PropTypes__default["default"].object
|
|
4290
4300
|
};
|
|
4291
4301
|
StorycardContent.propTypes = {
|
|
4292
|
-
story:
|
|
4293
|
-
children:
|
|
4294
|
-
theme:
|
|
4295
|
-
border:
|
|
4296
|
-
isHorizontalMobile:
|
|
4297
|
-
headerLevel:
|
|
4298
|
-
borderColor:
|
|
4299
|
-
config:
|
|
4302
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
4303
|
+
children: PropTypes__default["default"].node,
|
|
4304
|
+
theme: PropTypes__default["default"].string,
|
|
4305
|
+
border: PropTypes__default["default"].string,
|
|
4306
|
+
isHorizontalMobile: PropTypes__default["default"].bool,
|
|
4307
|
+
headerLevel: PropTypes__default["default"].string,
|
|
4308
|
+
borderColor: PropTypes__default["default"].string,
|
|
4309
|
+
config: PropTypes__default["default"].object
|
|
4300
4310
|
};
|
|
4301
4311
|
|
|
4302
4312
|
var MagazineCoverImageCard = function MagazineCoverImageCard(_ref) {
|
|
@@ -4311,14 +4321,14 @@ var MagazineCoverImageCard = function MagazineCoverImageCard(_ref) {
|
|
|
4311
4321
|
covers3Key = coverImageData["cover-image-s3-key"],
|
|
4312
4322
|
coverImageMetaData = coverImageData["cover-image-metadata"];
|
|
4313
4323
|
var slug = magazineSlug && collection && getSlug(collection, config);
|
|
4314
|
-
return /*#__PURE__*/
|
|
4324
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4315
4325
|
className: "arr--magazine-cover-img magazine-cover-image-m_cover-image__1McI_"
|
|
4316
|
-
}, covers3Key || coverUrl ? /*#__PURE__*/
|
|
4326
|
+
}, covers3Key || coverUrl ? /*#__PURE__*/React__default["default"].createElement("figure", {
|
|
4317
4327
|
className: "magazine-cover-image-m_image__3-ZtB"
|
|
4318
|
-
}, covers3Key ? /*#__PURE__*/
|
|
4328
|
+
}, covers3Key ? /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
4319
4329
|
href: slug,
|
|
4320
4330
|
"aria-label": "magazine-cover-image"
|
|
4321
|
-
}, /*#__PURE__*/
|
|
4331
|
+
}, /*#__PURE__*/React__default["default"].createElement(components.LazyLoadImages, null, /*#__PURE__*/React__default["default"].createElement(components.ResponsiveImage, {
|
|
4322
4332
|
slug: covers3Key,
|
|
4323
4333
|
aspectRatio: [1, 2],
|
|
4324
4334
|
metadata: {
|
|
@@ -4329,25 +4339,25 @@ var MagazineCoverImageCard = function MagazineCoverImageCard(_ref) {
|
|
|
4329
4339
|
auto: ["format", "compress"]
|
|
4330
4340
|
},
|
|
4331
4341
|
alt: imgAltText
|
|
4332
|
-
}))) : /*#__PURE__*/
|
|
4342
|
+
}))) : /*#__PURE__*/React__default["default"].createElement("img", {
|
|
4333
4343
|
src: coverUrl,
|
|
4334
4344
|
alt: "cover-image",
|
|
4335
4345
|
loading: "lazy"
|
|
4336
|
-
})) : /*#__PURE__*/
|
|
4346
|
+
})) : /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4337
4347
|
className: "magazine-cover-image-m_fallback-img__cyAjK"
|
|
4338
|
-
}, /*#__PURE__*/
|
|
4348
|
+
}, /*#__PURE__*/React__default["default"].createElement(FallbackImage, {
|
|
4339
4349
|
slug: slug
|
|
4340
4350
|
})));
|
|
4341
4351
|
};
|
|
4342
4352
|
MagazineCoverImageCard.propTypes = {
|
|
4343
|
-
collection:
|
|
4344
|
-
"cover-image-url":
|
|
4345
|
-
"cover-image-s3-key":
|
|
4346
|
-
"cover-image-metadata":
|
|
4347
|
-
slug:
|
|
4353
|
+
collection: PropTypes__default["default"].shape({
|
|
4354
|
+
"cover-image-url": PropTypes__default["default"].string,
|
|
4355
|
+
"cover-image-s3-key": PropTypes__default["default"].string,
|
|
4356
|
+
"cover-image-metadata": PropTypes__default["default"].string,
|
|
4357
|
+
slug: PropTypes__default["default"].string
|
|
4348
4358
|
}),
|
|
4349
|
-
config:
|
|
4350
|
-
magazineSlug:
|
|
4359
|
+
config: PropTypes__default["default"].shape({
|
|
4360
|
+
magazineSlug: PropTypes__default["default"].string
|
|
4351
4361
|
})
|
|
4352
4362
|
};
|
|
4353
4363
|
|
|
@@ -4395,8 +4405,8 @@ var MagazineWidgetBase = function MagazineWidgetBase(_ref) {
|
|
|
4395
4405
|
_config$magazineSlug = config.magazineSlug,
|
|
4396
4406
|
magazineSlug = _config$magazineSlug === void 0 ? "" : _config$magazineSlug;
|
|
4397
4407
|
var textColor = getTextColor(theme);
|
|
4398
|
-
var dispatch = useDispatch();
|
|
4399
|
-
var qtConfig = useSelector(function (state) {
|
|
4408
|
+
var dispatch = reactRedux.useDispatch();
|
|
4409
|
+
var qtConfig = reactRedux.useSelector(function (state) {
|
|
4400
4410
|
return get_1(state, ["qt", "config"], {});
|
|
4401
4411
|
});
|
|
4402
4412
|
var updatedMagazineSlug = magazineSlug || get_1(metadata, ["entities", "collectionEntities", "magazine", 0, "slug"], "");
|
|
@@ -4415,7 +4425,7 @@ var MagazineWidgetBase = function MagazineWidgetBase(_ref) {
|
|
|
4415
4425
|
var date = issueDate || createdAt;
|
|
4416
4426
|
|
|
4417
4427
|
var storyCards = function storyCards(items) {
|
|
4418
|
-
return /*#__PURE__*/
|
|
4428
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4419
4429
|
className: "magazine-cards-m_story-cards__1mNHC"
|
|
4420
4430
|
}, items.slice(0, sliceValue).map(function (storyItems, index) {
|
|
4421
4431
|
var story = storyItems.story;
|
|
@@ -4435,22 +4445,22 @@ var MagazineWidgetBase = function MagazineWidgetBase(_ref) {
|
|
|
4435
4445
|
};
|
|
4436
4446
|
|
|
4437
4447
|
var borderSettings = border === "borderBottom" ? borderBottom() : "";
|
|
4438
|
-
return /*#__PURE__*/
|
|
4448
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(StoryCard, {
|
|
4439
4449
|
story: story,
|
|
4440
4450
|
border: borderSettings,
|
|
4441
4451
|
isHorizontal: true,
|
|
4442
4452
|
config: config
|
|
4443
|
-
}, /*#__PURE__*/
|
|
4453
|
+
}, /*#__PURE__*/React__default["default"].createElement(HeroImage, {
|
|
4444
4454
|
story: story,
|
|
4445
4455
|
isHorizontal: true,
|
|
4446
4456
|
aspectRatio: [[4, 3]]
|
|
4447
|
-
}), /*#__PURE__*/
|
|
4457
|
+
}), /*#__PURE__*/React__default["default"].createElement(StorycardContent, {
|
|
4448
4458
|
story: story,
|
|
4449
4459
|
config: config
|
|
4450
|
-
}, /*#__PURE__*/
|
|
4460
|
+
}, /*#__PURE__*/React__default["default"].createElement(Headline, {
|
|
4451
4461
|
story: story,
|
|
4452
4462
|
premiumStoryIconConfig: config
|
|
4453
|
-
}), /*#__PURE__*/
|
|
4463
|
+
}), /*#__PURE__*/React__default["default"].createElement(AuthorWithTime, {
|
|
4454
4464
|
config: localizationConfig,
|
|
4455
4465
|
story: story,
|
|
4456
4466
|
prefix: "By"
|
|
@@ -4459,9 +4469,9 @@ var MagazineWidgetBase = function MagazineWidgetBase(_ref) {
|
|
|
4459
4469
|
};
|
|
4460
4470
|
|
|
4461
4471
|
var bottomCard = function bottomCard() {
|
|
4462
|
-
return /*#__PURE__*/
|
|
4472
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4463
4473
|
className: "magazine-cards-m_widget__2aE9g"
|
|
4464
|
-
}, storyCards(items), /*#__PURE__*/
|
|
4474
|
+
}, storyCards(items), /*#__PURE__*/React__default["default"].createElement(LoadmoreButton, {
|
|
4465
4475
|
collection: collection,
|
|
4466
4476
|
template: footerButton,
|
|
4467
4477
|
config: updatedConfig,
|
|
@@ -4472,43 +4482,44 @@ var MagazineWidgetBase = function MagazineWidgetBase(_ref) {
|
|
|
4472
4482
|
}));
|
|
4473
4483
|
};
|
|
4474
4484
|
|
|
4475
|
-
return /*#__PURE__*/
|
|
4485
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4476
4486
|
className: "full-width-with-padding arrow-component",
|
|
4477
4487
|
style: {
|
|
4478
4488
|
backgroundColor: theme
|
|
4479
4489
|
},
|
|
4480
4490
|
"data-test-id": "magazine-widget"
|
|
4481
|
-
}, /*#__PURE__*/
|
|
4491
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4482
4492
|
className: "arr-magazine-widget magazine-cards-m_magazine-header__2pSI3 magazine-cards-m_widget-button__3P7F7"
|
|
4483
|
-
}, /*#__PURE__*/
|
|
4493
|
+
}, /*#__PURE__*/React__default["default"].createElement(MagazineCoverImageCard, {
|
|
4484
4494
|
collection: collection,
|
|
4485
4495
|
config: updatedConfig
|
|
4486
|
-
}), /*#__PURE__*/
|
|
4496
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4487
4497
|
className: "magazine-cards-m_content__16_KC"
|
|
4488
|
-
}, /*#__PURE__*/
|
|
4498
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4489
4499
|
"data-test-id": "widget-date",
|
|
4490
4500
|
className: _getClassName("time ".concat(textColor), _styleModuleImportMap)
|
|
4491
|
-
}, getTimeStamp(date, timestampToFormat, timeStampConfig)), /*#__PURE__*/
|
|
4501
|
+
}, getTimeStamp(date, timestampToFormat, timeStampConfig)), /*#__PURE__*/React__default["default"].createElement(CollectionName, {
|
|
4492
4502
|
collection: collection,
|
|
4493
4503
|
config: config,
|
|
4494
4504
|
navigate: navigate
|
|
4495
|
-
}), /*#__PURE__*/
|
|
4505
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4496
4506
|
"data-test-id": "widget-summary",
|
|
4497
4507
|
className: _getClassName("summary ".concat(textColor), _styleModuleImportMap)
|
|
4498
4508
|
}, summary), !isTablet && bottomCard()), isTablet && bottomCard()));
|
|
4499
4509
|
};
|
|
4500
4510
|
MagazineWidgetBase.propTypes = {
|
|
4501
|
-
collection:
|
|
4502
|
-
"created-at":
|
|
4503
|
-
summary:
|
|
4504
|
-
items:
|
|
4511
|
+
collection: PropTypes__default["default"].shape({
|
|
4512
|
+
"created-at": PropTypes__default["default"].number,
|
|
4513
|
+
summary: PropTypes__default["default"].string,
|
|
4514
|
+
items: PropTypes__default["default"].array
|
|
4505
4515
|
}),
|
|
4506
|
-
config:
|
|
4507
|
-
theme:
|
|
4508
|
-
footerButton:
|
|
4509
|
-
border:
|
|
4516
|
+
config: PropTypes__default["default"].shape({
|
|
4517
|
+
theme: PropTypes__default["default"].string,
|
|
4518
|
+
footerButton: PropTypes__default["default"].string,
|
|
4519
|
+
border: PropTypes__default["default"].string
|
|
4510
4520
|
})
|
|
4511
4521
|
};
|
|
4512
4522
|
var MagazineWidget = StateProvider(MagazineWidgetBase);
|
|
4513
4523
|
|
|
4514
|
-
|
|
4524
|
+
exports.MagazineWidget = MagazineWidget;
|
|
4525
|
+
exports.MagazineWidgetBase = MagazineWidgetBase;
|