@quintype/arrow 3.15.1-perf.2 → 3.15.1-perf.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/atoms/Author/index.js +38 -29
- package/atoms/AuthorWithTime/index.js +83 -73
- package/atoms/CollectionName/index.js +40 -30
- package/atoms/ExtendedLoadMore/{index-d0f6c865.js → index-3976fac4.js} +59 -51
- package/atoms/ExtendedLoadMore/{index-1e444d20.js → index-3c4ac692.js} +243 -208
- package/atoms/ExtendedLoadMore/index-4ddfe28d.js +93 -0
- package/atoms/ExtendedLoadMore/{index-c61a16dc.js → index-5c8eda4a.js} +88 -80
- package/atoms/ExtendedLoadMore/{index-1256e453.js → index-6e083738.js} +60 -52
- package/atoms/ExtendedLoadMore/{index-fd651f70.js → index-6ecceae4.js} +58 -50
- package/atoms/ExtendedLoadMore/{index-4356ce04.js → index-9e0d32b7.js} +76 -68
- package/atoms/ExtendedLoadMore/{index-beed3a68.js → index-a5c95f84.js} +70 -62
- package/atoms/ExtendedLoadMore/{index-0519e570.js → index-b22f1843.js} +70 -62
- package/atoms/ExtendedLoadMore/{index-e4cf9cb7.js → index-b5936059.js} +72 -64
- package/atoms/ExtendedLoadMore/{index-aba6b278.js → index-bc129cb8.js} +57 -49
- package/atoms/ExtendedLoadMore/{index-ad3c83c3.js → index-e7cde739.js} +74 -46
- package/atoms/ExtendedLoadMore/{index-c2f73d18.js → index-fee73a14.js} +62 -54
- package/atoms/ExtendedLoadMore/index.js +13 -5
- package/atoms/ExtendedLoadMore/styles.arrow.css +1 -1
- package/atoms/Headline/index.js +85 -76
- package/atoms/HeroImage/index.js +69 -60
- package/atoms/LoadmoreButton/index.js +32 -23
- package/atoms/ScrollSnap/index.js +72 -63
- package/atoms/SectionTag/index.js +34 -25
- package/atoms/Subheadline/index.js +31 -22
- package/atoms/TimeStamp/index.js +34 -24
- package/molecules/KeyEvents/index.js +72 -61
- package/molecules/PageIntroductionCard/index.js +43 -34
- package/molecules/SocialShareTemplate/index.js +97 -88
- package/molecules/StoryCard/index.js +242 -232
- package/molecules/StoryElementCard/index.js +512 -483
- package/molecules/StorycardContent/index.js +172 -162
- package/package.json +1 -1
- package/rows/AlternateCollectionFilter/index.js +345 -333
- package/rows/AsideCollection/index.js +340 -328
- package/rows/AstrologyCollection/index.js +321 -309
- package/rows/AuthorIntroductionCard/index.js +157 -148
- package/rows/AuthorsList/index.js +184 -174
- package/rows/CollectionFilter/index.js +361 -349
- package/rows/ElevenStories/index.js +357 -346
- package/rows/FourColFiveStories/index.js +304 -274
- package/rows/FourColGrid/index.js +351 -321
- package/rows/FourColPortraitStories/index.js +357 -327
- package/rows/FourColSixteenStories/index.js +288 -277
- package/rows/FourColTwelveStories/index.js +315 -304
- package/rows/FourStorySlider/index.js +358 -347
- package/rows/FourStorySliderPortrait/index.js +359 -348
- package/rows/FourTabbedBigStorySlider/index.js +322 -311
- package/rows/FullScreenSlider/index.js +336 -325
- package/rows/HalfScreenSlider/index.js +308 -297
- package/rows/ListComponent/index.js +322 -311
- package/rows/Listicles/index.js +150 -139
- package/rows/MagazineEditions/index.js +104 -93
- package/rows/MagazineHeaderCard/index.js +104 -93
- package/rows/MagazineWidget/index.js +326 -315
- package/rows/OneColStoryList/index.js +365 -335
- package/rows/OpinionCollection/index.js +250 -220
- package/rows/SixColSixStories/index.js +333 -303
- package/rows/StoryCollection/index.js +340 -328
- package/rows/TagIntroductionCard/index.js +30 -21
- package/rows/ThreeColFlexStories/index.js +348 -318
- package/rows/ThreeColFourteenStories/index.js +285 -274
- package/rows/ThreeColGrid/index.js +352 -322
- package/rows/ThreeColSevenStory/index.js +322 -311
- package/rows/ThreeColSixStories/index.js +323 -312
- package/rows/ThreeColTwelveStories/index.js +302 -291
- package/rows/TwoColFourStories/index.js +316 -305
- package/rows/TwoColFourStoryHighlight/index.js +317 -306
- package/rows/TwoColSevenStories/index.js +322 -311
- package/rows/TwoColSixStories/index.js +316 -305
- package/rows/TwoColTenStoriesSidebar/index.js +338 -327
- package/rows/TwoColThreeStories/index.js +316 -305
- package/story-elements/AlsoRead/index.js +70 -61
- package/story-elements/Attachment/index.js +40 -31
- package/story-elements/BigFact/index.js +35 -26
- package/story-elements/BlockQuote/index.js +61 -51
- package/story-elements/Blurb/index.js +36 -27
- package/story-elements/Image/index.js +113 -86
- package/story-elements/ImageGallery/index.js +98 -71
- package/story-elements/ImageSlideshow/index.js +147 -120
- package/story-elements/QuestionAnswer/index.js +55 -46
- package/story-elements/Quote/index.js +37 -28
- package/story-elements/Reference/index.js +40 -31
- package/story-elements/StoryElement/index.js +28 -19
- package/story-elements/Summary/index.js +40 -31
- package/story-elements/Text/index.js +34 -25
- package/story-elements/Video/index.js +29 -20
- package/story-templates/ListicleStoryTemplate/index.js +937 -908
- package/story-templates/LiveBlogStoryTemplate/index.js +942 -913
- package/story-templates/PhotoStoryTemplate/index.js +912 -883
- package/story-templates/TextStoryTemplate/index.js +931 -902
- package/story-templates/VideoStoryTemplate/index.js +897 -868
- package/atoms/ExtendedLoadMore/index-81eb3978.js +0 -86
|
@@ -1,10 +1,39 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var React = require('react');
|
|
6
|
+
var reactRedux = require('react-redux');
|
|
7
|
+
var PropTypes = require('prop-types');
|
|
8
|
+
var components = require('@quintype/components');
|
|
9
|
+
var Timeago = require('react-timeago');
|
|
10
|
+
var dateFnsTz = require('date-fns-tz');
|
|
11
|
+
var ReactDOM = require('react-dom');
|
|
12
|
+
|
|
13
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
14
|
+
|
|
15
|
+
function _interopNamespace(e) {
|
|
16
|
+
if (e && e.__esModule) return e;
|
|
17
|
+
var n = Object.create(null);
|
|
18
|
+
if (e) {
|
|
19
|
+
Object.keys(e).forEach(function (k) {
|
|
20
|
+
if (k !== 'default') {
|
|
21
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
22
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
23
|
+
enumerable: true,
|
|
24
|
+
get: function () { return e[k]; }
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
n["default"] = e;
|
|
30
|
+
return Object.freeze(n);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
34
|
+
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
35
|
+
var Timeago__default = /*#__PURE__*/_interopDefaultLegacy(Timeago);
|
|
36
|
+
var ReactDOM__default = /*#__PURE__*/_interopDefaultLegacy(ReactDOM);
|
|
8
37
|
|
|
9
38
|
/**
|
|
10
39
|
* Checks if `value` is classified as an `Array` object.
|
|
@@ -1345,21 +1374,21 @@ exports["default"] = _default;
|
|
|
1345
1374
|
|
|
1346
1375
|
var _getClassName = /*@__PURE__*/getDefaultExportFromCjs(getClassName);
|
|
1347
1376
|
|
|
1348
|
-
var StateContext = /*#__PURE__*/createContext(); // eslint-disable-next-line react/display-name
|
|
1377
|
+
var StateContext = /*#__PURE__*/React.createContext(); // eslint-disable-next-line react/display-name
|
|
1349
1378
|
|
|
1350
1379
|
var StateProvider = function StateProvider(RowComponent) {
|
|
1351
1380
|
return function (props) {
|
|
1352
1381
|
return (
|
|
1353
1382
|
/*#__PURE__*/
|
|
1354
1383
|
// eslint-disable-next-line react/prop-types
|
|
1355
|
-
|
|
1384
|
+
React__default["default"].createElement(StateContext.Provider, {
|
|
1356
1385
|
value: props.config
|
|
1357
|
-
}, /*#__PURE__*/
|
|
1386
|
+
}, /*#__PURE__*/React__default["default"].createElement(RowComponent, props))
|
|
1358
1387
|
);
|
|
1359
1388
|
};
|
|
1360
1389
|
};
|
|
1361
1390
|
var useStateValue = function useStateValue() {
|
|
1362
|
-
return useContext(StateContext);
|
|
1391
|
+
return React.useContext(StateContext);
|
|
1363
1392
|
};
|
|
1364
1393
|
|
|
1365
1394
|
function _typeof(obj) {
|
|
@@ -2676,15 +2705,15 @@ var isEmpty = function isEmpty(value) {
|
|
|
2676
2705
|
return value == null || // From standard.js: Always use === - but value == null is allowed to check null || undefined
|
|
2677
2706
|
_typeof(value) === "object" && Object.entries(value).length === 0 && value.constructor === Object || typeof value === "string" && value.trim().length === 0;
|
|
2678
2707
|
};
|
|
2679
|
-
|
|
2680
|
-
"sketches-host":
|
|
2681
|
-
"cdn-name":
|
|
2682
|
-
"cdn-image":
|
|
2708
|
+
PropTypes__default["default"].shape({
|
|
2709
|
+
"sketches-host": PropTypes__default["default"].string,
|
|
2710
|
+
"cdn-name": PropTypes__default["default"].string,
|
|
2711
|
+
"cdn-image": PropTypes__default["default"].string
|
|
2683
2712
|
});
|
|
2684
|
-
|
|
2685
|
-
headline:
|
|
2686
|
-
"last-published-at":
|
|
2687
|
-
subheadline:
|
|
2713
|
+
PropTypes__default["default"].shape({
|
|
2714
|
+
headline: PropTypes__default["default"].string,
|
|
2715
|
+
"last-published-at": PropTypes__default["default"].number,
|
|
2716
|
+
subheadline: PropTypes__default["default"].string
|
|
2688
2717
|
});
|
|
2689
2718
|
var getStoryUrl = function getStoryUrl(story) {
|
|
2690
2719
|
var defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
|
|
@@ -2728,17 +2757,17 @@ var getTimeStamp = function getTimeStamp(date, _formatter) {
|
|
|
2728
2757
|
var timezone = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;
|
|
2729
2758
|
|
|
2730
2759
|
if (timezone && template === "story") {
|
|
2731
|
-
var zonedTime = timezone && utcToZonedTime(date, timezone);
|
|
2732
|
-
var formatZonedTime = zonedTime && format(zonedTime, "yyyy-MM-dd'T'HH:mm:ssXXX", {
|
|
2760
|
+
var zonedTime = timezone && dateFnsTz.utcToZonedTime(date, timezone);
|
|
2761
|
+
var formatZonedTime = zonedTime && dateFnsTz.format(zonedTime, "yyyy-MM-dd'T'HH:mm:ssXXX", {
|
|
2733
2762
|
timeZone: timezone
|
|
2734
2763
|
});
|
|
2735
2764
|
var timeStamp = timestampToFormat("", "", "", date, config);
|
|
2736
|
-
return /*#__PURE__*/
|
|
2765
|
+
return /*#__PURE__*/React__default["default"].createElement("time", {
|
|
2737
2766
|
dateTime: formatZonedTime
|
|
2738
2767
|
}, timeStamp);
|
|
2739
2768
|
}
|
|
2740
2769
|
|
|
2741
|
-
return /*#__PURE__*/
|
|
2770
|
+
return /*#__PURE__*/React__default["default"].createElement(Timeago__default["default"], {
|
|
2742
2771
|
date: date,
|
|
2743
2772
|
formatter: function formatter(value, unit, suffix, date) {
|
|
2744
2773
|
return _formatter(value, unit, suffix, date, config);
|
|
@@ -2782,7 +2811,7 @@ var CollectionNameBase = function CollectionNameBase(_ref) {
|
|
|
2782
2811
|
var borderBottomFullStyle = templateStyle.includes("collection-borderBottomFull") ? "4px solid ".concat(CollectionNameBorderColor) : "";
|
|
2783
2812
|
|
|
2784
2813
|
var borderBottomStyle = function borderBottomStyle() {
|
|
2785
|
-
return templateStyle.includes("collection-borderBottom") && !templateStyle.includes("collection-borderBottomFull") ? /*#__PURE__*/
|
|
2814
|
+
return templateStyle.includes("collection-borderBottom") && !templateStyle.includes("collection-borderBottomFull") ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2786
2815
|
className: "collection-name-m_border-bottom__1MnlV",
|
|
2787
2816
|
style: {
|
|
2788
2817
|
borderBottom: "4px solid ".concat(CollectionNameBorderColor)
|
|
@@ -2842,40 +2871,40 @@ var CollectionNameBase = function CollectionNameBase(_ref) {
|
|
|
2842
2871
|
}
|
|
2843
2872
|
};
|
|
2844
2873
|
|
|
2845
|
-
return /*#__PURE__*/
|
|
2874
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, showRowTitle && collectionName && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2846
2875
|
style: {
|
|
2847
2876
|
borderBottom: borderBottomFullStyle
|
|
2848
2877
|
},
|
|
2849
2878
|
"data-test-id": "collection-name",
|
|
2850
2879
|
className: ("arr--collection-name arrow-component ".concat(templateStyle) ? "arr--collection-name arrow-component ".concat(templateStyle) + " " : "") + _getClassName("collection ".concat(textColor, " ").concat(templateStyle), _styleModuleImportMap$d)
|
|
2851
|
-
}, templateStyle.includes("collection-borderLeft") && /*#__PURE__*/
|
|
2880
|
+
}, templateStyle.includes("collection-borderLeft") && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
2852
2881
|
className: "arr-collection-name-border-left collection-name-m_border-left__3_pYw",
|
|
2853
2882
|
style: {
|
|
2854
2883
|
color: CollectionNameBorderColor,
|
|
2855
2884
|
fontSize: getBorderHeight()
|
|
2856
2885
|
}
|
|
2857
|
-
}), slug && !slug.includes(undefined) ? /*#__PURE__*/
|
|
2886
|
+
}), slug && !slug.includes(undefined) ? /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
2858
2887
|
href: slug,
|
|
2859
2888
|
"aria-label": "collection-name"
|
|
2860
|
-
}, /*#__PURE__*/
|
|
2889
|
+
}, /*#__PURE__*/React__default["default"].createElement(HeaderTag, null, collectionName)) : /*#__PURE__*/React__default["default"].createElement(HeaderTag, null, collectionName), borderBottomStyle()));
|
|
2861
2890
|
};
|
|
2862
2891
|
CollectionNameBase.propTypes = {
|
|
2863
2892
|
/** Collection name border color */
|
|
2864
|
-
collectionNameBorderColor: PropTypes
|
|
2893
|
+
collectionNameBorderColor: PropTypes.PropTypes.string,
|
|
2865
2894
|
|
|
2866
2895
|
/** The Collection Object from the API response */
|
|
2867
|
-
collection: PropTypes
|
|
2896
|
+
collection: PropTypes.PropTypes.object,
|
|
2868
2897
|
|
|
2869
2898
|
/** The publisher config from the API response */
|
|
2870
|
-
config: PropTypes
|
|
2899
|
+
config: PropTypes.PropTypes.object,
|
|
2871
2900
|
|
|
2872
2901
|
/** The style template for the component */
|
|
2873
|
-
collectionNameTemplate: PropTypes
|
|
2902
|
+
collectionNameTemplate: PropTypes.PropTypes.oneOf(["", "borderLeft", "borderBottom", "crossLine", "borderBottomFull"]),
|
|
2874
2903
|
|
|
2875
2904
|
/** Header tags ranging h1-h6, where h[headerLevel] */
|
|
2876
|
-
headerLevel: PropTypes
|
|
2877
|
-
customCollectionName: PropTypes
|
|
2878
|
-
navigate: PropTypes
|
|
2905
|
+
headerLevel: PropTypes.PropTypes.string,
|
|
2906
|
+
customCollectionName: PropTypes.PropTypes.string,
|
|
2907
|
+
navigate: PropTypes.PropTypes.bool
|
|
2879
2908
|
};
|
|
2880
2909
|
CollectionNameBase.defaultProps = {
|
|
2881
2910
|
collectionNameTemplate: "",
|
|
@@ -2888,7 +2917,7 @@ function mapStateToProps$1(state) {
|
|
|
2888
2917
|
};
|
|
2889
2918
|
}
|
|
2890
2919
|
|
|
2891
|
-
var CollectionName = connect(mapStateToProps$1)(CollectionNameBase);
|
|
2920
|
+
var CollectionName = reactRedux.connect(mapStateToProps$1)(CollectionNameBase);
|
|
2892
2921
|
|
|
2893
2922
|
function _defineProperty(obj, key, value) {
|
|
2894
2923
|
if (key in obj) {
|
|
@@ -2937,26 +2966,26 @@ var LoadmoreButton = function LoadmoreButton(_ref) {
|
|
|
2937
2966
|
if (!showButton) return null;
|
|
2938
2967
|
var textColor = getTextColor(theme);
|
|
2939
2968
|
var slug = customUrlPath ? "/".concat(customUrlPath) : generateNavigateSlug(collection, _objectSpread(_objectSpread({}, qtConfig), config));
|
|
2940
|
-
return template === "SubsequentLoadCount" ? /*#__PURE__*/
|
|
2969
|
+
return template === "SubsequentLoadCount" ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2941
2970
|
onClick: onClick,
|
|
2942
2971
|
"data-test-id": "load-more",
|
|
2943
2972
|
className: "arr--button " + _getClassName("button ".concat(textColor, " default"), _styleModuleImportMap$c)
|
|
2944
|
-
}, buttonText) : /*#__PURE__*/
|
|
2973
|
+
}, buttonText) : /*#__PURE__*/React__default["default"].createElement(components.LinkBase, {
|
|
2945
2974
|
href: slug,
|
|
2946
2975
|
navigateTo: navigate,
|
|
2947
2976
|
"data-test-id": "load-more",
|
|
2948
2977
|
"aria-label": "load-more"
|
|
2949
|
-
}, /*#__PURE__*/
|
|
2978
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2950
2979
|
className: "arr--button " + _getClassName("button ".concat(textColor, " default"), _styleModuleImportMap$c)
|
|
2951
2980
|
}, buttonText));
|
|
2952
2981
|
};
|
|
2953
2982
|
LoadmoreButton.propTypes = {
|
|
2954
|
-
collection:
|
|
2955
|
-
template:
|
|
2956
|
-
config:
|
|
2957
|
-
onClick:
|
|
2958
|
-
navigate:
|
|
2959
|
-
qtConfig:
|
|
2983
|
+
collection: PropTypes__default["default"].object,
|
|
2984
|
+
template: PropTypes__default["default"].string,
|
|
2985
|
+
config: PropTypes__default["default"].object,
|
|
2986
|
+
onClick: PropTypes__default["default"].func,
|
|
2987
|
+
navigate: PropTypes__default["default"].func,
|
|
2988
|
+
qtConfig: PropTypes__default["default"].object
|
|
2960
2989
|
};
|
|
2961
2990
|
|
|
2962
2991
|
function _arrayWithHoles(arr) {
|
|
@@ -3029,7 +3058,7 @@ var hasIntersectionObserverSupport = function hasIntersectionObserverSupport() {
|
|
|
3029
3058
|
|
|
3030
3059
|
|
|
3031
3060
|
var getIntersectionObserver = function getIntersectionObserver() {
|
|
3032
|
-
return Promise.resolve(isClient && !hasIntersectionObserverSupport() &&
|
|
3061
|
+
return Promise.resolve(isClient && !hasIntersectionObserverSupport() && Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('intersection-observer')); }));
|
|
3033
3062
|
}; // options for intersection observer in order to improve the effect
|
|
3034
3063
|
|
|
3035
3064
|
|
|
@@ -3062,12 +3091,12 @@ var getObserver = function getObserver() {
|
|
|
3062
3091
|
var useNearScreen = (function (_ref) {
|
|
3063
3092
|
var ref = _ref.ref;
|
|
3064
3093
|
|
|
3065
|
-
var _useState = useState(false),
|
|
3094
|
+
var _useState = React.useState(false),
|
|
3066
3095
|
_useState2 = _slicedToArray(_useState, 2),
|
|
3067
3096
|
show = _useState2[0],
|
|
3068
3097
|
setShow = _useState2[1];
|
|
3069
3098
|
|
|
3070
|
-
useEffect(function () {
|
|
3099
|
+
React.useEffect(function () {
|
|
3071
3100
|
var current = ref.current;
|
|
3072
3101
|
if (!current) return; // get observer async and only when needed
|
|
3073
3102
|
|
|
@@ -3094,36 +3123,36 @@ var EMPTY_HTML = {
|
|
|
3094
3123
|
var isServer = typeof window === "undefined";
|
|
3095
3124
|
var ProgressiveHydration = function ProgressiveHydration(props) {
|
|
3096
3125
|
var children = props.children;
|
|
3097
|
-
var ref = useRef(null);
|
|
3126
|
+
var ref = React.useRef(null);
|
|
3098
3127
|
var isNearScreen = useNearScreen({
|
|
3099
3128
|
ref: ref
|
|
3100
3129
|
});
|
|
3101
|
-
useEffect(function () {
|
|
3130
|
+
React.useEffect(function () {
|
|
3102
3131
|
var el = ref.current; // CLIENT:
|
|
3103
3132
|
// If we want to force the hydration OR the element is near screen
|
|
3104
3133
|
// then we hydrate the content to get the functionality ready
|
|
3105
3134
|
|
|
3106
3135
|
if (isNearScreen) {
|
|
3107
3136
|
var action = el.hasChildNodes() ? "hydrate" : "render";
|
|
3108
|
-
|
|
3137
|
+
ReactDOM__default["default"][action](children, el);
|
|
3109
3138
|
}
|
|
3110
3139
|
}, [children, isNearScreen]); // SERVER: Just render the content as usual
|
|
3111
3140
|
|
|
3112
3141
|
if (isServer) {
|
|
3113
|
-
return /*#__PURE__*/
|
|
3142
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3114
3143
|
ref: ref
|
|
3115
3144
|
}, children);
|
|
3116
3145
|
} // CLIENT: Avoid hydration until we say so
|
|
3117
3146
|
|
|
3118
3147
|
|
|
3119
|
-
return /*#__PURE__*/
|
|
3148
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3120
3149
|
ref: ref,
|
|
3121
3150
|
suppressHydrationWarning: true,
|
|
3122
3151
|
dangerouslySetInnerHTML: EMPTY_HTML
|
|
3123
3152
|
});
|
|
3124
3153
|
};
|
|
3125
3154
|
ProgressiveHydration.propTypes = {
|
|
3126
|
-
children:
|
|
3155
|
+
children: PropTypes__default["default"].element
|
|
3127
3156
|
};
|
|
3128
3157
|
|
|
3129
3158
|
var LoadMoreTarget = function LoadMoreTarget(_ref) {
|
|
@@ -3131,7 +3160,7 @@ var LoadMoreTarget = function LoadMoreTarget(_ref) {
|
|
|
3131
3160
|
componentName = _ref.componentName,
|
|
3132
3161
|
offset = _ref.offset,
|
|
3133
3162
|
limit = _ref.limit;
|
|
3134
|
-
return /*#__PURE__*/
|
|
3163
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3135
3164
|
id: "ELM-".concat(collection.id),
|
|
3136
3165
|
"data-collection-slug": collection["slug"],
|
|
3137
3166
|
"data-component-name": componentName,
|
|
@@ -3140,13 +3169,13 @@ var LoadMoreTarget = function LoadMoreTarget(_ref) {
|
|
|
3140
3169
|
});
|
|
3141
3170
|
};
|
|
3142
3171
|
LoadMoreTarget.propTypes = {
|
|
3143
|
-
collection:
|
|
3144
|
-
id:
|
|
3145
|
-
slug:
|
|
3172
|
+
collection: PropTypes__default["default"].shape({
|
|
3173
|
+
id: PropTypes__default["default"].string,
|
|
3174
|
+
slug: PropTypes__default["default"].string
|
|
3146
3175
|
}),
|
|
3147
|
-
componentName:
|
|
3148
|
-
offset:
|
|
3149
|
-
limit:
|
|
3176
|
+
componentName: PropTypes__default["default"].string,
|
|
3177
|
+
offset: PropTypes__default["default"].number,
|
|
3178
|
+
limit: PropTypes__default["default"].number
|
|
3150
3179
|
};
|
|
3151
3180
|
|
|
3152
3181
|
var CrownIcon = function CrownIcon(_ref) {
|
|
@@ -3155,7 +3184,7 @@ var CrownIcon = function CrownIcon(_ref) {
|
|
|
3155
3184
|
_ref$color = _ref.color,
|
|
3156
3185
|
color = _ref$color === void 0 ? "#D8D8D8" : _ref$color,
|
|
3157
3186
|
positionTop = _ref.positionTop;
|
|
3158
|
-
return /*#__PURE__*/
|
|
3187
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3159
3188
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3160
3189
|
width: width,
|
|
3161
3190
|
height: height,
|
|
@@ -3164,28 +3193,28 @@ var CrownIcon = function CrownIcon(_ref) {
|
|
|
3164
3193
|
position: "relative",
|
|
3165
3194
|
top: positionTop
|
|
3166
3195
|
}
|
|
3167
|
-
}, /*#__PURE__*/
|
|
3196
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3168
3197
|
fill: "none",
|
|
3169
3198
|
fillRule: "evenodd",
|
|
3170
3199
|
stroke: "none",
|
|
3171
3200
|
strokeWidth: "1"
|
|
3172
|
-
}, /*#__PURE__*/
|
|
3201
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", null, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3173
3202
|
transform: "translate(8 8)"
|
|
3174
|
-
}, /*#__PURE__*/
|
|
3203
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3175
3204
|
d: "M0 0H24V24H0z"
|
|
3176
|
-
}), /*#__PURE__*/
|
|
3205
|
+
}), /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3177
3206
|
fill: color,
|
|
3178
3207
|
fillRule: "nonzero",
|
|
3179
3208
|
transform: "translate(0 2)"
|
|
3180
|
-
}, /*#__PURE__*/
|
|
3209
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3181
3210
|
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"
|
|
3182
3211
|
}))))));
|
|
3183
3212
|
};
|
|
3184
3213
|
CrownIcon.propTypes = {
|
|
3185
|
-
height:
|
|
3186
|
-
width:
|
|
3187
|
-
color:
|
|
3188
|
-
positionTop:
|
|
3214
|
+
height: PropTypes__default["default"].string,
|
|
3215
|
+
width: PropTypes__default["default"].string,
|
|
3216
|
+
color: PropTypes__default["default"].string,
|
|
3217
|
+
positionTop: PropTypes__default["default"].string
|
|
3189
3218
|
};
|
|
3190
3219
|
|
|
3191
3220
|
var KeyIcon = function KeyIcon(_ref) {
|
|
@@ -3194,7 +3223,7 @@ var KeyIcon = function KeyIcon(_ref) {
|
|
|
3194
3223
|
_ref$color = _ref.color,
|
|
3195
3224
|
color = _ref$color === void 0 ? "#D5D5D5" : _ref$color,
|
|
3196
3225
|
positionTop = _ref.positionTop;
|
|
3197
|
-
return /*#__PURE__*/
|
|
3226
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3198
3227
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3199
3228
|
width: width,
|
|
3200
3229
|
height: height,
|
|
@@ -3203,16 +3232,16 @@ var KeyIcon = function KeyIcon(_ref) {
|
|
|
3203
3232
|
position: "relative",
|
|
3204
3233
|
top: positionTop
|
|
3205
3234
|
}
|
|
3206
|
-
}, /*#__PURE__*/
|
|
3235
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3207
3236
|
fill: "none",
|
|
3208
3237
|
fillRule: "evenodd",
|
|
3209
3238
|
stroke: "none",
|
|
3210
3239
|
strokeWidth: "1"
|
|
3211
|
-
}, /*#__PURE__*/
|
|
3240
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", null, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3212
3241
|
transform: "translate(8 8)"
|
|
3213
|
-
}, /*#__PURE__*/
|
|
3242
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3214
3243
|
d: "M0 0H24V24H0z"
|
|
3215
|
-
}), /*#__PURE__*/
|
|
3244
|
+
}), /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3216
3245
|
fill: color,
|
|
3217
3246
|
fillRule: "nonzero",
|
|
3218
3247
|
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",
|
|
@@ -3220,10 +3249,10 @@ var KeyIcon = function KeyIcon(_ref) {
|
|
|
3220
3249
|
})))));
|
|
3221
3250
|
};
|
|
3222
3251
|
KeyIcon.propTypes = {
|
|
3223
|
-
height:
|
|
3224
|
-
width:
|
|
3225
|
-
color:
|
|
3226
|
-
positionTop:
|
|
3252
|
+
height: PropTypes__default["default"].string,
|
|
3253
|
+
width: PropTypes__default["default"].string,
|
|
3254
|
+
color: PropTypes__default["default"].string,
|
|
3255
|
+
positionTop: PropTypes__default["default"].string
|
|
3227
3256
|
};
|
|
3228
3257
|
|
|
3229
3258
|
var LockIcon = function LockIcon(_ref) {
|
|
@@ -3232,7 +3261,7 @@ var LockIcon = function LockIcon(_ref) {
|
|
|
3232
3261
|
_ref$color = _ref.color,
|
|
3233
3262
|
color = _ref$color === void 0 ? "#D5D5D5" : _ref$color,
|
|
3234
3263
|
positionTop = _ref.positionTop;
|
|
3235
|
-
return /*#__PURE__*/
|
|
3264
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3236
3265
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3237
3266
|
width: width,
|
|
3238
3267
|
height: height,
|
|
@@ -3241,28 +3270,28 @@ var LockIcon = function LockIcon(_ref) {
|
|
|
3241
3270
|
position: "relative",
|
|
3242
3271
|
top: positionTop
|
|
3243
3272
|
}
|
|
3244
|
-
}, /*#__PURE__*/
|
|
3273
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3245
3274
|
fill: "none",
|
|
3246
3275
|
fillRule: "evenodd",
|
|
3247
3276
|
stroke: "none",
|
|
3248
3277
|
strokeWidth: "1"
|
|
3249
|
-
}, /*#__PURE__*/
|
|
3278
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", null, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3250
3279
|
transform: "translate(8 8)"
|
|
3251
|
-
}, /*#__PURE__*/
|
|
3280
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3252
3281
|
d: "M0 0H24V24H0z"
|
|
3253
|
-
}), /*#__PURE__*/
|
|
3282
|
+
}), /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3254
3283
|
fill: color,
|
|
3255
3284
|
fillRule: "nonzero",
|
|
3256
3285
|
transform: "translate(3)"
|
|
3257
|
-
}, /*#__PURE__*/
|
|
3286
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3258
3287
|
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"
|
|
3259
3288
|
}))))));
|
|
3260
3289
|
};
|
|
3261
3290
|
LockIcon.propTypes = {
|
|
3262
|
-
height:
|
|
3263
|
-
width:
|
|
3264
|
-
color:
|
|
3265
|
-
positionTop:
|
|
3291
|
+
height: PropTypes__default["default"].string,
|
|
3292
|
+
width: PropTypes__default["default"].string,
|
|
3293
|
+
color: PropTypes__default["default"].string,
|
|
3294
|
+
positionTop: PropTypes__default["default"].string
|
|
3266
3295
|
};
|
|
3267
3296
|
|
|
3268
3297
|
var StarIcon = function StarIcon(_ref) {
|
|
@@ -3272,7 +3301,7 @@ var StarIcon = function StarIcon(_ref) {
|
|
|
3272
3301
|
color = _ref$color === void 0 ? "#D5D5D5" : _ref$color,
|
|
3273
3302
|
_ref$positionTop = _ref.positionTop,
|
|
3274
3303
|
positionTop = _ref$positionTop === void 0 ? "" : _ref$positionTop;
|
|
3275
|
-
return /*#__PURE__*/
|
|
3304
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3276
3305
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3277
3306
|
width: width,
|
|
3278
3307
|
height: height,
|
|
@@ -3281,21 +3310,21 @@ var StarIcon = function StarIcon(_ref) {
|
|
|
3281
3310
|
position: "relative",
|
|
3282
3311
|
top: positionTop
|
|
3283
3312
|
}
|
|
3284
|
-
}, /*#__PURE__*/
|
|
3313
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3285
3314
|
fill: "none",
|
|
3286
3315
|
fillRule: "evenodd",
|
|
3287
3316
|
stroke: "none",
|
|
3288
3317
|
strokeWidth: "1"
|
|
3289
|
-
}, /*#__PURE__*/
|
|
3318
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", null, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3290
3319
|
fill: color,
|
|
3291
3320
|
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"
|
|
3292
3321
|
}))));
|
|
3293
3322
|
};
|
|
3294
3323
|
StarIcon.propTypes = {
|
|
3295
|
-
height:
|
|
3296
|
-
width:
|
|
3297
|
-
color:
|
|
3298
|
-
positionTop:
|
|
3324
|
+
height: PropTypes__default["default"].string,
|
|
3325
|
+
width: PropTypes__default["default"].string,
|
|
3326
|
+
color: PropTypes__default["default"].string,
|
|
3327
|
+
positionTop: PropTypes__default["default"].string
|
|
3299
3328
|
};
|
|
3300
3329
|
|
|
3301
3330
|
var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
@@ -3307,7 +3336,7 @@ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
|
3307
3336
|
|
|
3308
3337
|
switch (iconType) {
|
|
3309
3338
|
case "crown":
|
|
3310
|
-
return /*#__PURE__*/
|
|
3339
|
+
return /*#__PURE__*/React__default["default"].createElement(CrownIcon, {
|
|
3311
3340
|
width: width,
|
|
3312
3341
|
height: height,
|
|
3313
3342
|
color: color,
|
|
@@ -3315,7 +3344,7 @@ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
|
3315
3344
|
});
|
|
3316
3345
|
|
|
3317
3346
|
case "lock":
|
|
3318
|
-
return /*#__PURE__*/
|
|
3347
|
+
return /*#__PURE__*/React__default["default"].createElement(LockIcon, {
|
|
3319
3348
|
width: width,
|
|
3320
3349
|
height: height,
|
|
3321
3350
|
color: color,
|
|
@@ -3323,7 +3352,7 @@ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
|
3323
3352
|
});
|
|
3324
3353
|
|
|
3325
3354
|
case "key":
|
|
3326
|
-
return /*#__PURE__*/
|
|
3355
|
+
return /*#__PURE__*/React__default["default"].createElement(KeyIcon, {
|
|
3327
3356
|
width: width,
|
|
3328
3357
|
height: height,
|
|
3329
3358
|
color: color,
|
|
@@ -3331,7 +3360,7 @@ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
|
3331
3360
|
});
|
|
3332
3361
|
|
|
3333
3362
|
default:
|
|
3334
|
-
return /*#__PURE__*/
|
|
3363
|
+
return /*#__PURE__*/React__default["default"].createElement(StarIcon, {
|
|
3335
3364
|
width: width,
|
|
3336
3365
|
height: height,
|
|
3337
3366
|
color: color,
|
|
@@ -3340,21 +3369,21 @@ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
|
3340
3369
|
}
|
|
3341
3370
|
};
|
|
3342
3371
|
PremiumStoryIcon.propTypes = {
|
|
3343
|
-
width:
|
|
3344
|
-
height:
|
|
3345
|
-
color:
|
|
3346
|
-
iconType:
|
|
3347
|
-
positionTop:
|
|
3372
|
+
width: PropTypes__default["default"].string,
|
|
3373
|
+
height: PropTypes__default["default"].string,
|
|
3374
|
+
color: PropTypes__default["default"].string,
|
|
3375
|
+
iconType: PropTypes__default["default"].string,
|
|
3376
|
+
positionTop: PropTypes__default["default"].string
|
|
3348
3377
|
};
|
|
3349
3378
|
|
|
3350
3379
|
function LiveIcon() {
|
|
3351
|
-
return /*#__PURE__*/
|
|
3380
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3352
3381
|
className: "live-icon",
|
|
3353
3382
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3354
3383
|
width: "25",
|
|
3355
3384
|
height: "24",
|
|
3356
3385
|
viewBox: "0 0 25 24"
|
|
3357
|
-
}, /*#__PURE__*/
|
|
3386
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3358
3387
|
fill: "#ff5858",
|
|
3359
3388
|
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"
|
|
3360
3389
|
}));
|
|
@@ -3411,37 +3440,37 @@ var Headline = function Headline(_ref) {
|
|
|
3411
3440
|
var wrapperClass = premiumStory ? "wrapper" : "";
|
|
3412
3441
|
var iconSize = "24px";
|
|
3413
3442
|
var enableLiveIcon = showLiveIcon && story["story-template"] === "live-blog" && !get_1(story, ["metadata", "is-closed"], false);
|
|
3414
|
-
return /*#__PURE__*/
|
|
3443
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3415
3444
|
"data-test-id": "headline",
|
|
3416
3445
|
className: "arrow-component arr--headline " + _getClassName(wrapperClass, _styleModuleImportMap$b)
|
|
3417
|
-
}, premiumStory && /*#__PURE__*/
|
|
3446
|
+
}, premiumStory && /*#__PURE__*/React__default["default"].createElement(PremiumStoryIcon, {
|
|
3418
3447
|
width: iconSize,
|
|
3419
3448
|
height: iconSize,
|
|
3420
3449
|
color: iconColor,
|
|
3421
3450
|
iconType: iconStyle,
|
|
3422
3451
|
positionTop: positionHeadline()
|
|
3423
|
-
}), isLink ? /*#__PURE__*/
|
|
3452
|
+
}), isLink ? /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
3424
3453
|
href: getStoryUrl(story, "/".concat(story.slug)),
|
|
3425
3454
|
externalLink: isExternalStory(story),
|
|
3426
3455
|
"aria-label": "headline"
|
|
3427
|
-
}, /*#__PURE__*/
|
|
3456
|
+
}, /*#__PURE__*/React__default["default"].createElement(HeaderTag, {
|
|
3428
3457
|
className: _getClassName("headline ".concat(textColor), _styleModuleImportMap$b)
|
|
3429
|
-
}, enableLiveIcon && /*#__PURE__*/
|
|
3458
|
+
}, enableLiveIcon && /*#__PURE__*/React__default["default"].createElement(LiveIcon, null), headline)) : /*#__PURE__*/React__default["default"].createElement(HeaderTag, {
|
|
3430
3459
|
className: _getClassName("headline ".concat(textColor), _styleModuleImportMap$b)
|
|
3431
|
-
}, enableLiveIcon && /*#__PURE__*/
|
|
3460
|
+
}, enableLiveIcon && /*#__PURE__*/React__default["default"].createElement(LiveIcon, null), headline));
|
|
3432
3461
|
};
|
|
3433
3462
|
Headline.propTypes = {
|
|
3434
3463
|
/** The Story Object from the API response */
|
|
3435
|
-
story:
|
|
3464
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
3436
3465
|
|
|
3437
3466
|
/** Header tags ranging h1-h6, where h[headerLevel] */
|
|
3438
|
-
headerLevel:
|
|
3439
|
-
premiumStoryIconConfig:
|
|
3440
|
-
iconColor:
|
|
3441
|
-
iconType:
|
|
3442
|
-
enablePremiumStoryIcon:
|
|
3467
|
+
headerLevel: PropTypes__default["default"].string,
|
|
3468
|
+
premiumStoryIconConfig: PropTypes__default["default"].shape({
|
|
3469
|
+
iconColor: PropTypes__default["default"].string,
|
|
3470
|
+
iconType: PropTypes__default["default"].string,
|
|
3471
|
+
enablePremiumStoryIcon: PropTypes__default["default"].bool
|
|
3443
3472
|
}),
|
|
3444
|
-
isLink:
|
|
3473
|
+
isLink: PropTypes__default["default"].bool
|
|
3445
3474
|
};
|
|
3446
3475
|
Headline.defaultProps = {
|
|
3447
3476
|
headerLevel: "6",
|
|
@@ -3468,7 +3497,7 @@ var Subheadline = function Subheadline(_ref) {
|
|
|
3468
3497
|
var subheadline = forceShowAtom || get_1(config, ["showSubheadline"], true);
|
|
3469
3498
|
if (!subheadline) return null;
|
|
3470
3499
|
var textColor = getTextColor(config.theme);
|
|
3471
|
-
return /*#__PURE__*/
|
|
3500
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3472
3501
|
style: {
|
|
3473
3502
|
WebkitLineClamp: lineClamp
|
|
3474
3503
|
},
|
|
@@ -3478,15 +3507,15 @@ var Subheadline = function Subheadline(_ref) {
|
|
|
3478
3507
|
};
|
|
3479
3508
|
Subheadline.propTypes = {
|
|
3480
3509
|
/** The Story Object from the API response */
|
|
3481
|
-
story:
|
|
3510
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
3482
3511
|
// Restricts the number of lines for subheadline.
|
|
3483
|
-
lineClamp:
|
|
3512
|
+
lineClamp: PropTypes__default["default"].number,
|
|
3484
3513
|
|
|
3485
3514
|
/** Number of characters to truncate the subheadline */
|
|
3486
|
-
truncateChars:
|
|
3487
|
-
clazzName:
|
|
3488
|
-
forceShowAtom:
|
|
3489
|
-
showFullContent:
|
|
3515
|
+
truncateChars: PropTypes__default["default"].number,
|
|
3516
|
+
clazzName: PropTypes__default["default"].string,
|
|
3517
|
+
forceShowAtom: PropTypes__default["default"].bool,
|
|
3518
|
+
showFullContent: PropTypes__default["default"].bool
|
|
3490
3519
|
};
|
|
3491
3520
|
Subheadline.defaultProps = {
|
|
3492
3521
|
forceShowAtom: false,
|
|
@@ -3512,18 +3541,18 @@ var TimeStamp = function TimeStamp(_ref) {
|
|
|
3512
3541
|
var time = story["last-published-at"] || story["first-published-at"];
|
|
3513
3542
|
var isBottomClasses = isBottom ? "bottom-fix" : "";
|
|
3514
3543
|
var textColor = getTextColor(configState.theme);
|
|
3515
|
-
return /*#__PURE__*/
|
|
3544
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isTime && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3516
3545
|
"data-test-id": "publish-time",
|
|
3517
3546
|
className: "time arr--publish-time " + _getClassName("time ".concat(textColor, " ").concat(isBottomClasses), _styleModuleImportMap$9)
|
|
3518
|
-
}, /*#__PURE__*/
|
|
3547
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3519
3548
|
className: "timestamp-m_time-wrapper__3O2lM"
|
|
3520
3549
|
}, getTimeStamp(time, formatter, config))));
|
|
3521
3550
|
};
|
|
3522
3551
|
TimeStamp.propTypes = {
|
|
3523
3552
|
/** The Story Object from the API response */
|
|
3524
|
-
story:
|
|
3525
|
-
isBottom:
|
|
3526
|
-
config:
|
|
3553
|
+
story: PropTypes__default["default"].object,
|
|
3554
|
+
isBottom: PropTypes__default["default"].bool,
|
|
3555
|
+
config: PropTypes__default["default"].object
|
|
3527
3556
|
};
|
|
3528
3557
|
|
|
3529
3558
|
var _styleModuleImportMap$8 = {
|
|
@@ -3566,10 +3595,10 @@ var AuthorBase = function AuthorBase(_ref) {
|
|
|
3566
3595
|
return null;
|
|
3567
3596
|
}
|
|
3568
3597
|
|
|
3569
|
-
return /*#__PURE__*/
|
|
3598
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3570
3599
|
"data-test-id": "author-image",
|
|
3571
3600
|
className: _getClassName("author-image ".concat(dir, "-image"), _styleModuleImportMap$8)
|
|
3572
|
-
}, /*#__PURE__*/
|
|
3601
|
+
}, /*#__PURE__*/React__default["default"].createElement("figure", null, avatarS3Key ? /*#__PURE__*/React__default["default"].createElement(components.ResponsiveImage, {
|
|
3573
3602
|
slug: avatarS3Key,
|
|
3574
3603
|
"aspect-ratio": [1, 1],
|
|
3575
3604
|
defaultWidth: 400,
|
|
@@ -3577,14 +3606,14 @@ var AuthorBase = function AuthorBase(_ref) {
|
|
|
3577
3606
|
auto: ["format", "compress"]
|
|
3578
3607
|
},
|
|
3579
3608
|
alt: authorName
|
|
3580
|
-
}) : /*#__PURE__*/
|
|
3609
|
+
}) : /*#__PURE__*/React__default["default"].createElement("img", {
|
|
3581
3610
|
src: avatarUrl
|
|
3582
3611
|
})));
|
|
3583
3612
|
};
|
|
3584
3613
|
|
|
3585
3614
|
var isPrefix = function isPrefix(dir) {
|
|
3586
3615
|
if (prefix) {
|
|
3587
|
-
return /*#__PURE__*/
|
|
3616
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3588
3617
|
className: "arr-author-prefix " + _getClassName("prefix ".concat(textColor), _styleModuleImportMap$8)
|
|
3589
3618
|
}, prefix);
|
|
3590
3619
|
}
|
|
@@ -3592,11 +3621,11 @@ var AuthorBase = function AuthorBase(_ref) {
|
|
|
3592
3621
|
return !hideAuthorImage && authorImage(dir);
|
|
3593
3622
|
};
|
|
3594
3623
|
|
|
3595
|
-
return /*#__PURE__*/
|
|
3624
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isAuthor && /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
3596
3625
|
href: "".concat(mountAt, "/author/") + slug,
|
|
3597
3626
|
"aria-label": "author-name",
|
|
3598
3627
|
className: "author-name arr-author-name arrow-component " + _getClassName("author ".concat(isBottomClasses), _styleModuleImportMap$8)
|
|
3599
|
-
}, isPrefix("ltr"), /*#__PURE__*/
|
|
3628
|
+
}, isPrefix("ltr"), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3600
3629
|
"data-test-id": "author-name",
|
|
3601
3630
|
className: "author-name " + _getClassName("author-name ".concat(textColor), _styleModuleImportMap$8)
|
|
3602
3631
|
}, authorName || story["author-name"]), !prefix && isPrefix("rtl")));
|
|
@@ -3608,18 +3637,18 @@ function mapStateToProps(state) {
|
|
|
3608
3637
|
};
|
|
3609
3638
|
}
|
|
3610
3639
|
|
|
3611
|
-
var Author = connect(mapStateToProps)(AuthorBase);
|
|
3640
|
+
var Author = reactRedux.connect(mapStateToProps)(AuthorBase);
|
|
3612
3641
|
AuthorBase.propTypes = {
|
|
3613
3642
|
/** The Story Object from the API response */
|
|
3614
|
-
story:
|
|
3643
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
3615
3644
|
|
|
3616
3645
|
/** Hide Author Avatar Image */
|
|
3617
|
-
hideAuthorImage:
|
|
3646
|
+
hideAuthorImage: PropTypes__default["default"].bool,
|
|
3618
3647
|
// fix Author bottom of the storyCard
|
|
3619
|
-
isBottom:
|
|
3648
|
+
isBottom: PropTypes__default["default"].bool,
|
|
3620
3649
|
// fix prefix before the author name
|
|
3621
|
-
prefix:
|
|
3622
|
-
config:
|
|
3650
|
+
prefix: PropTypes__default["default"].string,
|
|
3651
|
+
config: PropTypes__default["default"].object
|
|
3623
3652
|
};
|
|
3624
3653
|
AuthorBase.defaultProps = {
|
|
3625
3654
|
hideAuthorImage: false,
|
|
@@ -3640,14 +3669,14 @@ var Dot = function Dot(_ref) {
|
|
|
3640
3669
|
height = _ref$height === void 0 ? "3px" : _ref$height,
|
|
3641
3670
|
_ref$color = _ref.color,
|
|
3642
3671
|
color = _ref$color === void 0 ? "light" : _ref$color;
|
|
3643
|
-
return /*#__PURE__*/
|
|
3672
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3644
3673
|
className: _getClassName(color, _styleModuleImportMap$7)
|
|
3645
|
-
}, /*#__PURE__*/
|
|
3674
|
+
}, /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3646
3675
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3647
3676
|
width: width,
|
|
3648
3677
|
height: height,
|
|
3649
3678
|
viewBox: "0 0 3 3"
|
|
3650
|
-
}, /*#__PURE__*/
|
|
3679
|
+
}, /*#__PURE__*/React__default["default"].createElement("circle", {
|
|
3651
3680
|
cx: "87",
|
|
3652
3681
|
cy: "9",
|
|
3653
3682
|
r: "1",
|
|
@@ -3658,9 +3687,9 @@ var Dot = function Dot(_ref) {
|
|
|
3658
3687
|
};
|
|
3659
3688
|
Dot.propTypes = {
|
|
3660
3689
|
/** height , width and color of the dot icon */
|
|
3661
|
-
color:
|
|
3662
|
-
width:
|
|
3663
|
-
height:
|
|
3690
|
+
color: PropTypes__default["default"].string,
|
|
3691
|
+
width: PropTypes__default["default"].string,
|
|
3692
|
+
height: PropTypes__default["default"].string
|
|
3664
3693
|
};
|
|
3665
3694
|
|
|
3666
3695
|
var _styleModuleImportMap$6 = {
|
|
@@ -3676,22 +3705,22 @@ var Divider = function Divider(_ref) {
|
|
|
3676
3705
|
height = _ref$height === void 0 ? "10" : _ref$height,
|
|
3677
3706
|
_ref$color = _ref.color,
|
|
3678
3707
|
color = _ref$color === void 0 ? "light" : _ref$color;
|
|
3679
|
-
return /*#__PURE__*/
|
|
3708
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3680
3709
|
className: _getClassName(color, _styleModuleImportMap$6)
|
|
3681
|
-
}, /*#__PURE__*/
|
|
3710
|
+
}, /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3682
3711
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3683
3712
|
width: width,
|
|
3684
3713
|
height: height
|
|
3685
|
-
}, /*#__PURE__*/
|
|
3714
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3686
3715
|
fill: "inherit",
|
|
3687
3716
|
d: "M0 0h1v10H0z"
|
|
3688
3717
|
})));
|
|
3689
3718
|
};
|
|
3690
3719
|
Divider.propTypes = {
|
|
3691
3720
|
/** height , width and color of the dot icon */
|
|
3692
|
-
color:
|
|
3693
|
-
width:
|
|
3694
|
-
height:
|
|
3721
|
+
color: PropTypes__default["default"].string,
|
|
3722
|
+
width: PropTypes__default["default"].string,
|
|
3723
|
+
height: PropTypes__default["default"].string
|
|
3695
3724
|
};
|
|
3696
3725
|
|
|
3697
3726
|
var _styleModuleImportMap$5 = {
|
|
@@ -3714,23 +3743,23 @@ var ReadTime = function ReadTime(_ref) {
|
|
|
3714
3743
|
var textColor = isLightTheme ? "light" : getTextColor(config.theme);
|
|
3715
3744
|
if (!showReadTime || !readTime) return null;
|
|
3716
3745
|
var timeToRead = get_1(opts, ["localizedTimeToRead"]) || "min read";
|
|
3717
|
-
return /*#__PURE__*/
|
|
3746
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3718
3747
|
"data-test-id": "read-time",
|
|
3719
3748
|
className: "arrow-component arr--read-time " + _getClassName("read-time-wrapper ".concat(textColor), _styleModuleImportMap$5)
|
|
3720
|
-
}, /*#__PURE__*/
|
|
3749
|
+
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
3721
3750
|
className: "read-time-indicator read-time-m_dot-indicator__3Sqh2"
|
|
3722
|
-
}, /*#__PURE__*/
|
|
3751
|
+
}, /*#__PURE__*/React__default["default"].createElement(Dot, {
|
|
3723
3752
|
color: textColor
|
|
3724
|
-
})), /*#__PURE__*/
|
|
3753
|
+
})), /*#__PURE__*/React__default["default"].createElement("span", null, readTime, " ", timeToRead)));
|
|
3725
3754
|
};
|
|
3726
3755
|
ReadTime.propTypes = {
|
|
3727
|
-
story:
|
|
3728
|
-
"read-time":
|
|
3756
|
+
story: PropTypes__default["default"].shape({
|
|
3757
|
+
"read-time": PropTypes__default["default"].number
|
|
3729
3758
|
}),
|
|
3730
|
-
opts:
|
|
3731
|
-
showReadTime:
|
|
3759
|
+
opts: PropTypes__default["default"].shape({
|
|
3760
|
+
showReadTime: PropTypes__default["default"].bool
|
|
3732
3761
|
}),
|
|
3733
|
-
isLightTheme:
|
|
3762
|
+
isLightTheme: PropTypes__default["default"].bool
|
|
3734
3763
|
};
|
|
3735
3764
|
|
|
3736
3765
|
var _styleModuleImportMap$4 = {
|
|
@@ -3761,33 +3790,33 @@ var AuthorWithTime = function AuthorWithTime(_ref) {
|
|
|
3761
3790
|
|
|
3762
3791
|
var getSeparator = function getSeparator() {
|
|
3763
3792
|
if (separator === "divider") {
|
|
3764
|
-
return /*#__PURE__*/
|
|
3793
|
+
return /*#__PURE__*/React__default["default"].createElement(Divider, {
|
|
3765
3794
|
color: textColor
|
|
3766
3795
|
});
|
|
3767
3796
|
}
|
|
3768
3797
|
|
|
3769
|
-
return /*#__PURE__*/
|
|
3798
|
+
return /*#__PURE__*/React__default["default"].createElement(Dot, {
|
|
3770
3799
|
color: textColor
|
|
3771
3800
|
});
|
|
3772
3801
|
};
|
|
3773
3802
|
|
|
3774
3803
|
var getTimeStamp = function getTimeStamp() {
|
|
3775
3804
|
if (!isTime) return null;
|
|
3776
|
-
return /*#__PURE__*/
|
|
3805
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isAuthor && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
3777
3806
|
className: "arr-separator " + _getClassName("".concat(seperatorStyle), _styleModuleImportMap$4)
|
|
3778
|
-
}, getSeparator()), /*#__PURE__*/
|
|
3807
|
+
}, getSeparator()), /*#__PURE__*/React__default["default"].createElement(TimeStamp, {
|
|
3779
3808
|
story: story,
|
|
3780
3809
|
config: config
|
|
3781
|
-
}), isReadTime && /*#__PURE__*/
|
|
3810
|
+
}), isReadTime && /*#__PURE__*/React__default["default"].createElement(ReadTime, {
|
|
3782
3811
|
story: story,
|
|
3783
3812
|
opts: config,
|
|
3784
3813
|
isLightTheme: isLightTheme
|
|
3785
3814
|
}));
|
|
3786
3815
|
};
|
|
3787
3816
|
|
|
3788
|
-
return /*#__PURE__*/
|
|
3817
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3789
3818
|
className: "arr--author-time " + _getClassName("author-time-wrapper ".concat(isBottomClasses), _styleModuleImportMap$4)
|
|
3790
|
-
}, isAuthor ? /*#__PURE__*/
|
|
3819
|
+
}, isAuthor ? /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(Author, {
|
|
3791
3820
|
story: story,
|
|
3792
3821
|
isBottom: true,
|
|
3793
3822
|
hideAuthorImage: hideAuthorImage,
|
|
@@ -3795,19 +3824,19 @@ var AuthorWithTime = function AuthorWithTime(_ref) {
|
|
|
3795
3824
|
}), getTimeStamp()) : getTimeStamp());
|
|
3796
3825
|
};
|
|
3797
3826
|
AuthorWithTime.propTypes = {
|
|
3798
|
-
story:
|
|
3827
|
+
story: PropTypes__default["default"].object,
|
|
3799
3828
|
|
|
3800
3829
|
/** Style of separator between the Author & Timestamp */
|
|
3801
|
-
separator:
|
|
3830
|
+
separator: PropTypes__default["default"].oneOf(["dot", "divider"]),
|
|
3802
3831
|
|
|
3803
3832
|
/** hide the author image */
|
|
3804
|
-
hideAuthorImage:
|
|
3833
|
+
hideAuthorImage: PropTypes__default["default"].bool,
|
|
3805
3834
|
// fix author and time at the end
|
|
3806
|
-
isBottom:
|
|
3835
|
+
isBottom: PropTypes__default["default"].bool,
|
|
3807
3836
|
// fix prefix before the author name
|
|
3808
|
-
prefix:
|
|
3809
|
-
config:
|
|
3810
|
-
isLightTheme:
|
|
3837
|
+
prefix: PropTypes__default["default"].string,
|
|
3838
|
+
config: PropTypes__default["default"].object,
|
|
3839
|
+
isLightTheme: PropTypes__default["default"].bool
|
|
3811
3840
|
};
|
|
3812
3841
|
AuthorWithTime.defaultProps = {
|
|
3813
3842
|
separator: "dot",
|
|
@@ -3824,27 +3853,27 @@ var ImageFallbackIcon = function ImageFallbackIcon(_ref) {
|
|
|
3824
3853
|
height = _ref$height === void 0 ? 30 : _ref$height,
|
|
3825
3854
|
_ref$iconColor = _ref.iconColor,
|
|
3826
3855
|
iconColor = _ref$iconColor === void 0 ? "#99B0CB" : _ref$iconColor;
|
|
3827
|
-
return /*#__PURE__*/
|
|
3856
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3828
3857
|
width: width,
|
|
3829
3858
|
height: height,
|
|
3830
3859
|
viewBox: "0 0 102 76",
|
|
3831
3860
|
version: "1.1"
|
|
3832
|
-
}, /*#__PURE__*/
|
|
3861
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3833
3862
|
id: "demo-home-copy",
|
|
3834
3863
|
stroke: "none",
|
|
3835
3864
|
strokeWidth: "1",
|
|
3836
3865
|
fill: "none",
|
|
3837
3866
|
fillRule: "evenodd",
|
|
3838
3867
|
transform: "translate(-377.000000, -314.000000)"
|
|
3839
|
-
}, /*#__PURE__*/
|
|
3868
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3840
3869
|
id: "Group-13",
|
|
3841
3870
|
transform: "translate(377.000000, 314.000000)"
|
|
3842
|
-
}, /*#__PURE__*/
|
|
3871
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3843
3872
|
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",
|
|
3844
3873
|
id: "Combined-Shape",
|
|
3845
3874
|
fill: iconColor,
|
|
3846
3875
|
fillRule: "nonzero"
|
|
3847
|
-
}), /*#__PURE__*/
|
|
3876
|
+
}), /*#__PURE__*/React__default["default"].createElement("rect", {
|
|
3848
3877
|
id: "Rectangle-19",
|
|
3849
3878
|
stroke: iconColor,
|
|
3850
3879
|
strokeWidth: "3",
|
|
@@ -3856,24 +3885,24 @@ var ImageFallbackIcon = function ImageFallbackIcon(_ref) {
|
|
|
3856
3885
|
}))));
|
|
3857
3886
|
};
|
|
3858
3887
|
ImageFallbackIcon.propTypes = {
|
|
3859
|
-
width:
|
|
3860
|
-
height:
|
|
3861
|
-
iconColor:
|
|
3888
|
+
width: PropTypes__default["default"].object,
|
|
3889
|
+
height: PropTypes__default["default"].object,
|
|
3890
|
+
iconColor: PropTypes__default["default"].object
|
|
3862
3891
|
};
|
|
3863
3892
|
|
|
3864
3893
|
var imageFallback = function imageFallback() {
|
|
3865
|
-
return /*#__PURE__*/
|
|
3894
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3866
3895
|
className: "arr--fallback-image fallback-m_image__1GYCJ fallback-m_image-position__3KddP"
|
|
3867
|
-
}, /*#__PURE__*/
|
|
3896
|
+
}, /*#__PURE__*/React__default["default"].createElement("figure", {
|
|
3868
3897
|
className: "arr--fallback-svg fallback-m_fallback-svg__tK9fL"
|
|
3869
|
-
}, /*#__PURE__*/
|
|
3898
|
+
}, /*#__PURE__*/React__default["default"].createElement(ImageFallbackIcon, null)));
|
|
3870
3899
|
};
|
|
3871
3900
|
|
|
3872
3901
|
var FallbackImage = function FallbackImage(_ref) {
|
|
3873
3902
|
var slug = _ref.slug;
|
|
3874
3903
|
|
|
3875
3904
|
if (slug) {
|
|
3876
|
-
return /*#__PURE__*/
|
|
3905
|
+
return /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
3877
3906
|
href: slug,
|
|
3878
3907
|
"aria-label": "image-fallback"
|
|
3879
3908
|
}, imageFallback());
|
|
@@ -3882,23 +3911,23 @@ var FallbackImage = function FallbackImage(_ref) {
|
|
|
3882
3911
|
}
|
|
3883
3912
|
};
|
|
3884
3913
|
FallbackImage.propTypes = {
|
|
3885
|
-
slug:
|
|
3914
|
+
slug: PropTypes__default["default"].string
|
|
3886
3915
|
};
|
|
3887
3916
|
|
|
3888
3917
|
var HyperLinkIcon = function HyperLinkIcon() {
|
|
3889
|
-
return /*#__PURE__*/
|
|
3918
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3890
3919
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3891
3920
|
width: "36",
|
|
3892
3921
|
height: "28"
|
|
3893
|
-
}, /*#__PURE__*/
|
|
3922
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
3894
3923
|
fill: "none",
|
|
3895
3924
|
fillRule: "evenodd"
|
|
3896
|
-
}, /*#__PURE__*/
|
|
3925
|
+
}, /*#__PURE__*/React__default["default"].createElement("rect", {
|
|
3897
3926
|
width: "36",
|
|
3898
3927
|
height: "28",
|
|
3899
3928
|
fill: "#3D6FCF",
|
|
3900
3929
|
rx: "4"
|
|
3901
|
-
}), /*#__PURE__*/
|
|
3930
|
+
}), /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3902
3931
|
stroke: "#FFF",
|
|
3903
3932
|
strokeLinecap: "round",
|
|
3904
3933
|
strokeLinejoin: "round",
|
|
@@ -3911,16 +3940,16 @@ var HyperLink = function HyperLink(_ref) {
|
|
|
3911
3940
|
var _ref$hyperLink = _ref.hyperLink,
|
|
3912
3941
|
hyperLink = _ref$hyperLink === void 0 ? "" : _ref$hyperLink;
|
|
3913
3942
|
if (!hyperLink) return null;
|
|
3914
|
-
return /*#__PURE__*/
|
|
3943
|
+
return /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
3915
3944
|
href: hyperLink,
|
|
3916
3945
|
"aria-label": "hyperlink-button",
|
|
3917
3946
|
className: "arr--hyperlink-button hyperlink-m_hyperlink-button__1CqWx",
|
|
3918
3947
|
target: "_blank",
|
|
3919
3948
|
rel: "noopener noreferrer"
|
|
3920
|
-
}, /*#__PURE__*/
|
|
3949
|
+
}, /*#__PURE__*/React__default["default"].createElement(HyperLinkIcon, null));
|
|
3921
3950
|
};
|
|
3922
3951
|
HyperLink.propTypes = {
|
|
3923
|
-
hyperLink:
|
|
3952
|
+
hyperLink: PropTypes__default["default"].string
|
|
3924
3953
|
};
|
|
3925
3954
|
|
|
3926
3955
|
var _styleModuleImportMap$3 = {
|
|
@@ -3956,7 +3985,7 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
3956
3985
|
StoryTemplateIcon = _config$StoryTemplate === void 0 ? function () {
|
|
3957
3986
|
return null;
|
|
3958
3987
|
} : _config$StoryTemplate;
|
|
3959
|
-
var showImagePlaceholder = useSelector(function (state) {
|
|
3988
|
+
var showImagePlaceholder = reactRedux.useSelector(function (state) {
|
|
3960
3989
|
return get_1(state, ["qt", "config", "showPlaceholder"]);
|
|
3961
3990
|
});
|
|
3962
3991
|
var getPlaceholderStyleName = showImagePlaceholder ? "placeholder" : "";
|
|
@@ -3992,37 +4021,37 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
3992
4021
|
var fallbackImage = function fallbackImage() {
|
|
3993
4022
|
if (!slug) {
|
|
3994
4023
|
if (fallbackImageUrl && !isStoryPageImage) {
|
|
3995
|
-
return /*#__PURE__*/
|
|
4024
|
+
return /*#__PURE__*/React__default["default"].createElement("figure", {
|
|
3996
4025
|
style: {
|
|
3997
4026
|
paddingTop: imagePadding + "%"
|
|
3998
4027
|
},
|
|
3999
4028
|
className: "arr--responsive-hero-image " + _getClassName("image ".concat(getPlaceholderStyleName), _styleModuleImportMap$3)
|
|
4000
|
-
}, /*#__PURE__*/
|
|
4029
|
+
}, /*#__PURE__*/React__default["default"].createElement("img", {
|
|
4001
4030
|
className: "qt-image",
|
|
4002
4031
|
"data-src": "".concat(fallbackImageUrl),
|
|
4003
4032
|
alt: "image-fallback"
|
|
4004
4033
|
}));
|
|
4005
4034
|
}
|
|
4006
4035
|
|
|
4007
|
-
return /*#__PURE__*/
|
|
4036
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, defaultFallback ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4008
4037
|
"data-test-id": "arr--fallback-hero-image",
|
|
4009
4038
|
style: {
|
|
4010
4039
|
paddingTop: imagePadding + "%"
|
|
4011
4040
|
},
|
|
4012
4041
|
className: "arr--fallback-hero-image " + _getClassName("image ".concat(getPlaceholderStyleName), _styleModuleImportMap$3)
|
|
4013
|
-
}, /*#__PURE__*/
|
|
4042
|
+
}, /*#__PURE__*/React__default["default"].createElement(StoryTemplateIcon, {
|
|
4014
4043
|
storyTemplate: story["story-template"]
|
|
4015
|
-
}), /*#__PURE__*/
|
|
4044
|
+
}), /*#__PURE__*/React__default["default"].createElement(FallbackImage, null)) : null);
|
|
4016
4045
|
}
|
|
4017
4046
|
|
|
4018
|
-
return /*#__PURE__*/
|
|
4047
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("figure", {
|
|
4019
4048
|
style: {
|
|
4020
4049
|
paddingTop: imagePadding + "%"
|
|
4021
4050
|
},
|
|
4022
4051
|
className: "arr--responsive-hero-image " + _getClassName("image ".concat(getPlaceholderStyleName), _styleModuleImportMap$3)
|
|
4023
|
-
}, /*#__PURE__*/
|
|
4052
|
+
}, /*#__PURE__*/React__default["default"].createElement(StoryTemplateIcon, {
|
|
4024
4053
|
storyTemplate: story["story-template"]
|
|
4025
|
-
}), /*#__PURE__*/
|
|
4054
|
+
}), /*#__PURE__*/React__default["default"].createElement(components.ResponsiveHeroImage, {
|
|
4026
4055
|
story: story,
|
|
4027
4056
|
aspectRatio: imageAspectRatio,
|
|
4028
4057
|
defaultWidth: defaultWidth,
|
|
@@ -4031,15 +4060,15 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
4031
4060
|
auto: ["format", "compress"],
|
|
4032
4061
|
fit: "max"
|
|
4033
4062
|
}
|
|
4034
|
-
})), isStoryPageImage && hyperLink && /*#__PURE__*/
|
|
4063
|
+
})), isStoryPageImage && hyperLink && /*#__PURE__*/React__default["default"].createElement(HyperLink, {
|
|
4035
4064
|
hyperLink: hyperLink
|
|
4036
4065
|
}));
|
|
4037
4066
|
};
|
|
4038
4067
|
|
|
4039
|
-
return story && (isStoryPageImage ? /*#__PURE__*/
|
|
4068
|
+
return story && (isStoryPageImage ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4040
4069
|
"data-test-id": "arr--hero-image",
|
|
4041
4070
|
className: "arr--hero-image " + _getClassName("".concat(heroImageClass, " ").concat(fullBleed, " ").concat(heroImageMobClasses), _styleModuleImportMap$3)
|
|
4042
|
-
}, fallbackImage()) : /*#__PURE__*/
|
|
4071
|
+
}, fallbackImage()) : /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
4043
4072
|
"data-test-id": "arr--hero-image",
|
|
4044
4073
|
href: getStoryUrl(story, "/".concat(story.slug)),
|
|
4045
4074
|
externalLink: isExternalStory(story),
|
|
@@ -4049,30 +4078,30 @@ var HeroImage = function HeroImage(_ref) {
|
|
|
4049
4078
|
};
|
|
4050
4079
|
HeroImage.propTypes = {
|
|
4051
4080
|
/** The Story Object from the API response */
|
|
4052
|
-
story:
|
|
4081
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
4053
4082
|
|
|
4054
4083
|
/** Removes the Hero Image padding for the image to bleed over the margin */
|
|
4055
|
-
FullBleed:
|
|
4084
|
+
FullBleed: PropTypes__default["default"].bool,
|
|
4056
4085
|
|
|
4057
4086
|
/** The default width for the image, in case the browser does not support srcset */
|
|
4058
|
-
defaultWidth:
|
|
4087
|
+
defaultWidth: PropTypes__default["default"].number,
|
|
4059
4088
|
|
|
4060
4089
|
/** The list of available widths */
|
|
4061
|
-
widths:
|
|
4090
|
+
widths: PropTypes__default["default"].array,
|
|
4062
4091
|
// fatch the correct hero image
|
|
4063
|
-
aspectRatio:
|
|
4092
|
+
aspectRatio: PropTypes__default["default"].array,
|
|
4064
4093
|
// Hints for the browser to choose the best size
|
|
4065
4094
|
|
|
4066
4095
|
/** This prop is responsible for adding padding-right of the image and remove padding bottom of the image */
|
|
4067
|
-
isHorizontal:
|
|
4096
|
+
isHorizontal: PropTypes__default["default"].bool,
|
|
4068
4097
|
|
|
4069
4098
|
/** This prop is responsible for adding padding-bottom in desktop and padding-right in mobile */
|
|
4070
|
-
isHorizontalMobile:
|
|
4099
|
+
isHorizontalMobile: PropTypes__default["default"].bool,
|
|
4071
4100
|
// this prop is responsive for rendering fallback image on story page
|
|
4072
|
-
defaultFallback:
|
|
4073
|
-
isHorizontalWithImageLast:
|
|
4074
|
-
isStoryPageImage:
|
|
4075
|
-
config:
|
|
4101
|
+
defaultFallback: PropTypes__default["default"].bool,
|
|
4102
|
+
isHorizontalWithImageLast: PropTypes__default["default"].bool,
|
|
4103
|
+
isStoryPageImage: PropTypes__default["default"].bool,
|
|
4104
|
+
config: PropTypes__default["default"].object
|
|
4076
4105
|
};
|
|
4077
4106
|
HeroImage.defaultProps = {
|
|
4078
4107
|
FullBleed: true,
|
|
@@ -4122,22 +4151,22 @@ var SectionTag = function SectionTag(_ref) {
|
|
|
4122
4151
|
}
|
|
4123
4152
|
|
|
4124
4153
|
if (!isSection) return null;
|
|
4125
|
-
return /*#__PURE__*/
|
|
4154
|
+
return /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
4126
4155
|
href: getUrl,
|
|
4127
4156
|
className: "arrow-component arr--section-name",
|
|
4128
4157
|
"aria-label": "section-name"
|
|
4129
|
-
}, /*#__PURE__*/
|
|
4158
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4130
4159
|
"data-test-id": "sectionTag",
|
|
4131
4160
|
style: {
|
|
4132
4161
|
backgroundColor: templateStyle.includes("section-solid") ? sectionTagBorderColor : ""
|
|
4133
4162
|
},
|
|
4134
4163
|
className: "section-tag arrow-component " + _getClassName("".concat(textColor, " ").concat(templateStyle), _styleModuleImportMap$2)
|
|
4135
|
-
}, templateStyle.includes("section-borderLeft") && /*#__PURE__*/
|
|
4164
|
+
}, templateStyle.includes("section-borderLeft") && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
4136
4165
|
className: "section-m_border-left__2oUyp",
|
|
4137
4166
|
style: {
|
|
4138
4167
|
color: sectionTagBorderColor
|
|
4139
4168
|
}
|
|
4140
|
-
}), section["display-name"] || section["name"], /*#__PURE__*/
|
|
4169
|
+
}), section["display-name"] || section["name"], /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4141
4170
|
className: "section-m_border-bottom__3cRoD",
|
|
4142
4171
|
style: {
|
|
4143
4172
|
backgroundColor: "".concat(template === "solid" ? "" : sectionTagBorderColor)
|
|
@@ -4146,13 +4175,13 @@ var SectionTag = function SectionTag(_ref) {
|
|
|
4146
4175
|
};
|
|
4147
4176
|
SectionTag.propTypes = {
|
|
4148
4177
|
/** The Story Object from the API response */
|
|
4149
|
-
story:
|
|
4178
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
4150
4179
|
|
|
4151
4180
|
/** The style template for section tag */
|
|
4152
|
-
template:
|
|
4153
|
-
borderColor:
|
|
4154
|
-
solidBorderColor:
|
|
4155
|
-
isLightTheme:
|
|
4181
|
+
template: PropTypes__default["default"].oneOf(["", "borderBottomSml", "borderLeft", "solid"]),
|
|
4182
|
+
borderColor: PropTypes__default["default"].string,
|
|
4183
|
+
solidBorderColor: PropTypes__default["default"].string,
|
|
4184
|
+
isLightTheme: PropTypes__default["default"].bool
|
|
4156
4185
|
};
|
|
4157
4186
|
SectionTag.defaultProps = {
|
|
4158
4187
|
template: "",
|
|
@@ -4201,7 +4230,7 @@ var StoryCard = function StoryCard(_ref) {
|
|
|
4201
4230
|
prefix = _ref.prefix,
|
|
4202
4231
|
config = _ref.config,
|
|
4203
4232
|
isHorizontalWithImageLast = _ref.isHorizontalWithImageLast;
|
|
4204
|
-
if (!story || isEmpty(story)) return /*#__PURE__*/
|
|
4233
|
+
if (!story || isEmpty(story)) return /*#__PURE__*/React__default["default"].createElement("div", null);
|
|
4205
4234
|
var borderOptions = ["default", "full", "bottom", "boxShadow"];
|
|
4206
4235
|
var borderTemplate = borderOptions.includes(border) ? "border-".concat(border) : ""; // TODO optimize conditions
|
|
4207
4236
|
|
|
@@ -4211,7 +4240,7 @@ var StoryCard = function StoryCard(_ref) {
|
|
|
4211
4240
|
var bgImgContentOverlapClass = bgImgContentOverlap ? "content-overlap" : "";
|
|
4212
4241
|
var textColor = getTextColor(theme);
|
|
4213
4242
|
var horizontalMobileClasses = isHorizontalMobile ? "horizontal-mob" : "";
|
|
4214
|
-
var defaultStorycard = /*#__PURE__*/
|
|
4243
|
+
var defaultStorycard = /*#__PURE__*/React__default["default"].createElement(DefaultStoryCard, {
|
|
4215
4244
|
story: story,
|
|
4216
4245
|
aspectRatio: aspectRatio,
|
|
4217
4246
|
border: border,
|
|
@@ -4225,7 +4254,7 @@ var StoryCard = function StoryCard(_ref) {
|
|
|
4225
4254
|
config: config,
|
|
4226
4255
|
isHorizontalWithImageLast: isHorizontalWithImageLast
|
|
4227
4256
|
});
|
|
4228
|
-
return /*#__PURE__*/
|
|
4257
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4229
4258
|
"data-test-id": "story-card",
|
|
4230
4259
|
style: {
|
|
4231
4260
|
backgroundColor: theme,
|
|
@@ -4254,91 +4283,91 @@ var DefaultStoryCard = function DefaultStoryCard(_ref2) {
|
|
|
4254
4283
|
var SectionTagborderColor = rgbToHex(borderColor);
|
|
4255
4284
|
var _config$localizationC = config.localizationConfig,
|
|
4256
4285
|
localizationConfig = _config$localizationC === void 0 ? {} : _config$localizationC;
|
|
4257
|
-
return /*#__PURE__*/
|
|
4286
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isHorizontal ? /*#__PURE__*/React__default["default"].createElement(HeroImage, {
|
|
4258
4287
|
config: config,
|
|
4259
4288
|
story: story,
|
|
4260
4289
|
isHorizontal: true,
|
|
4261
4290
|
isHorizontalMobile: isHorizontalMobile,
|
|
4262
4291
|
aspectRatio: aspectRatio
|
|
4263
|
-
}) : isHorizontalWithImageLast ? /*#__PURE__*/
|
|
4292
|
+
}) : isHorizontalWithImageLast ? /*#__PURE__*/React__default["default"].createElement(HeroImage, {
|
|
4264
4293
|
config: config,
|
|
4265
4294
|
story: story,
|
|
4266
4295
|
isHorizontalWithImageLast: true,
|
|
4267
4296
|
isHorizontalMobile: isHorizontalMobile,
|
|
4268
4297
|
aspectRatio: aspectRatio
|
|
4269
|
-
}) : /*#__PURE__*/
|
|
4298
|
+
}) : /*#__PURE__*/React__default["default"].createElement(HeroImage, {
|
|
4270
4299
|
story: story,
|
|
4271
4300
|
config: config,
|
|
4272
4301
|
isHorizontalMobile: isHorizontalMobile,
|
|
4273
4302
|
aspectRatio: aspectRatio
|
|
4274
|
-
}), /*#__PURE__*/
|
|
4303
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4275
4304
|
className: "arr--story-content " + _getClassName("content ".concat(alignment), _styleModuleImportMap$1)
|
|
4276
|
-
}, /*#__PURE__*/
|
|
4305
|
+
}, /*#__PURE__*/React__default["default"].createElement(SectionTag, {
|
|
4277
4306
|
story: story,
|
|
4278
4307
|
borderColor: SectionTagborderColor
|
|
4279
|
-
}), /*#__PURE__*/
|
|
4308
|
+
}), /*#__PURE__*/React__default["default"].createElement(Headline, {
|
|
4280
4309
|
story: story,
|
|
4281
4310
|
headerLevel: headerLevel,
|
|
4282
4311
|
premiumStoryIconConfig: config
|
|
4283
|
-
}), /*#__PURE__*/
|
|
4312
|
+
}), /*#__PURE__*/React__default["default"].createElement(AuthorWithTime, {
|
|
4284
4313
|
config: localizationConfig,
|
|
4285
4314
|
story: story,
|
|
4286
4315
|
isBottom: true,
|
|
4287
4316
|
prefix: prefix,
|
|
4288
4317
|
hideAuthorImage: hideAuthorImage
|
|
4289
|
-
}), /*#__PURE__*/
|
|
4318
|
+
}), /*#__PURE__*/React__default["default"].createElement(Subheadline, {
|
|
4290
4319
|
story: story
|
|
4291
4320
|
})));
|
|
4292
4321
|
};
|
|
4293
4322
|
|
|
4294
4323
|
DefaultStoryCard.propTypes = {
|
|
4295
|
-
story:
|
|
4296
|
-
border:
|
|
4297
|
-
isBottom:
|
|
4298
|
-
isHorizontal:
|
|
4299
|
-
aspectRatio:
|
|
4300
|
-
isHorizontalMobile:
|
|
4301
|
-
centerAlign:
|
|
4302
|
-
headerLevel:
|
|
4303
|
-
borderColor:
|
|
4304
|
-
hideAuthorImage:
|
|
4305
|
-
prefix:
|
|
4306
|
-
config:
|
|
4307
|
-
isHorizontalWithImageLast:
|
|
4324
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
4325
|
+
border: PropTypes__default["default"].oneOfType([PropTypes__default["default"].string]),
|
|
4326
|
+
isBottom: PropTypes__default["default"].bool,
|
|
4327
|
+
isHorizontal: PropTypes__default["default"].bool,
|
|
4328
|
+
aspectRatio: PropTypes__default["default"].oneOfType([PropTypes__default["default"].array]),
|
|
4329
|
+
isHorizontalMobile: PropTypes__default["default"].bool,
|
|
4330
|
+
centerAlign: PropTypes__default["default"].bool,
|
|
4331
|
+
headerLevel: PropTypes__default["default"].string,
|
|
4332
|
+
borderColor: PropTypes__default["default"].string,
|
|
4333
|
+
hideAuthorImage: PropTypes__default["default"].bool,
|
|
4334
|
+
prefix: PropTypes__default["default"].string,
|
|
4335
|
+
config: PropTypes__default["default"].object,
|
|
4336
|
+
isHorizontalWithImageLast: PropTypes__default["default"].bool
|
|
4308
4337
|
};
|
|
4309
4338
|
StoryCard.propTypes = {
|
|
4310
4339
|
/** The Story Object from the API response */
|
|
4311
|
-
story:
|
|
4312
|
-
children:
|
|
4340
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
4341
|
+
children: PropTypes__default["default"].node,
|
|
4313
4342
|
|
|
4314
4343
|
/** Flip the Story Card to Horizonal mode */
|
|
4315
|
-
isHorizontal:
|
|
4344
|
+
isHorizontal: PropTypes__default["default"].bool,
|
|
4316
4345
|
|
|
4317
4346
|
/** Add border to the Story Card */
|
|
4318
|
-
border:
|
|
4347
|
+
border: PropTypes__default["default"].oneOfType([PropTypes__default["default"].string]),
|
|
4319
4348
|
// story card with background image
|
|
4320
|
-
useImageAsBackground:
|
|
4349
|
+
useImageAsBackground: PropTypes__default["default"].bool,
|
|
4321
4350
|
// story card content overlap with image
|
|
4322
|
-
bgImgContentOverlap:
|
|
4351
|
+
bgImgContentOverlap: PropTypes__default["default"].bool,
|
|
4323
4352
|
|
|
4324
4353
|
/** add aspect ratio for hero image */
|
|
4325
|
-
aspectRatio:
|
|
4354
|
+
aspectRatio: PropTypes__default["default"].oneOfType([PropTypes__default["default"].array]),
|
|
4326
4355
|
|
|
4327
4356
|
/** add theme(dark /light/custom color) for storycard */
|
|
4328
|
-
theme:
|
|
4357
|
+
theme: PropTypes__default["default"].string,
|
|
4329
4358
|
|
|
4330
4359
|
/** flip the story card mobile design horizontal */
|
|
4331
|
-
isHorizontalMobile:
|
|
4360
|
+
isHorizontalMobile: PropTypes__default["default"].bool,
|
|
4332
4361
|
// make content center align in desktop and left align in mobile
|
|
4333
|
-
centerAlign:
|
|
4334
|
-
headerLevel:
|
|
4335
|
-
borderColor:
|
|
4362
|
+
centerAlign: PropTypes__default["default"].bool,
|
|
4363
|
+
headerLevel: PropTypes__default["default"].string,
|
|
4364
|
+
borderColor: PropTypes__default["default"].string,
|
|
4336
4365
|
// handle author image through storycard
|
|
4337
|
-
hideAuthorImage:
|
|
4366
|
+
hideAuthorImage: PropTypes__default["default"].bool,
|
|
4338
4367
|
// handle author prefix through storycard
|
|
4339
|
-
prefix:
|
|
4340
|
-
config:
|
|
4341
|
-
isHorizontalWithImageLast:
|
|
4368
|
+
prefix: PropTypes__default["default"].string,
|
|
4369
|
+
config: PropTypes__default["default"].object,
|
|
4370
|
+
isHorizontalWithImageLast: PropTypes__default["default"].bool
|
|
4342
4371
|
};
|
|
4343
4372
|
StoryCard.defaultProps = {
|
|
4344
4373
|
isHorizontal: false,
|
|
@@ -4371,14 +4400,14 @@ var StorycardContent = function StorycardContent(_ref) {
|
|
|
4371
4400
|
var SectionTagborderColor = rgbToHex(borderColor);
|
|
4372
4401
|
var borderTemplate = borderOptions.includes(border) ? "border-".concat(border) : "";
|
|
4373
4402
|
var horizontalCard = isHorizontalMobile ? "horizontal-content-wrapper" : "";
|
|
4374
|
-
return /*#__PURE__*/
|
|
4403
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4375
4404
|
"data-test-id": "story-card-content",
|
|
4376
4405
|
style: {
|
|
4377
4406
|
backgroundColor: theme,
|
|
4378
4407
|
color: textColor
|
|
4379
4408
|
},
|
|
4380
4409
|
className: "arr--content-wrapper " + _getClassName("wrapper ".concat(borderTemplate, " ").concat(horizontalCard), _styleModuleImportMap)
|
|
4381
|
-
}, children || /*#__PURE__*/
|
|
4410
|
+
}, children || /*#__PURE__*/React__default["default"].createElement(DefaultStoryCardContent, {
|
|
4382
4411
|
story: story,
|
|
4383
4412
|
headerLevel: headerLevel,
|
|
4384
4413
|
isHorizontalMobile: isHorizontalMobile,
|
|
@@ -4396,37 +4425,37 @@ var DefaultStoryCardContent = function DefaultStoryCardContent(_ref2) {
|
|
|
4396
4425
|
var SectionTagborderColor = rgbToHex(borderColor);
|
|
4397
4426
|
var _config$localizationC = config.localizationConfig,
|
|
4398
4427
|
localizationConfig = _config$localizationC === void 0 ? {} : _config$localizationC;
|
|
4399
|
-
return /*#__PURE__*/
|
|
4428
|
+
return /*#__PURE__*/React__default["default"].createElement("div", null, /*#__PURE__*/React__default["default"].createElement(SectionTag, {
|
|
4400
4429
|
story: story,
|
|
4401
4430
|
borderColor: SectionTagborderColor
|
|
4402
|
-
}), /*#__PURE__*/
|
|
4431
|
+
}), /*#__PURE__*/React__default["default"].createElement(Headline, {
|
|
4403
4432
|
story: story,
|
|
4404
4433
|
headerLevel: headerLevel,
|
|
4405
4434
|
premiumStoryIconConfig: config
|
|
4406
|
-
}), /*#__PURE__*/
|
|
4435
|
+
}), /*#__PURE__*/React__default["default"].createElement(AuthorWithTime, {
|
|
4407
4436
|
config: localizationConfig,
|
|
4408
4437
|
story: story
|
|
4409
4438
|
}));
|
|
4410
4439
|
};
|
|
4411
4440
|
|
|
4412
4441
|
DefaultStoryCardContent.propTypes = {
|
|
4413
|
-
story:
|
|
4414
|
-
border:
|
|
4415
|
-
theme:
|
|
4416
|
-
isHorizontalMobile:
|
|
4417
|
-
headerLevel:
|
|
4418
|
-
borderColor:
|
|
4419
|
-
config:
|
|
4442
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
4443
|
+
border: PropTypes__default["default"].string,
|
|
4444
|
+
theme: PropTypes__default["default"].string,
|
|
4445
|
+
isHorizontalMobile: PropTypes__default["default"].bool,
|
|
4446
|
+
headerLevel: PropTypes__default["default"].string,
|
|
4447
|
+
borderColor: PropTypes__default["default"].string,
|
|
4448
|
+
config: PropTypes__default["default"].object
|
|
4420
4449
|
};
|
|
4421
4450
|
StorycardContent.propTypes = {
|
|
4422
|
-
story:
|
|
4423
|
-
children:
|
|
4424
|
-
theme:
|
|
4425
|
-
border:
|
|
4426
|
-
isHorizontalMobile:
|
|
4427
|
-
headerLevel:
|
|
4428
|
-
borderColor:
|
|
4429
|
-
config:
|
|
4451
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
4452
|
+
children: PropTypes__default["default"].node,
|
|
4453
|
+
theme: PropTypes__default["default"].string,
|
|
4454
|
+
border: PropTypes__default["default"].string,
|
|
4455
|
+
isHorizontalMobile: PropTypes__default["default"].bool,
|
|
4456
|
+
headerLevel: PropTypes__default["default"].string,
|
|
4457
|
+
borderColor: PropTypes__default["default"].string,
|
|
4458
|
+
config: PropTypes__default["default"].object
|
|
4430
4459
|
};
|
|
4431
4460
|
|
|
4432
4461
|
var PortraitStoryCardBase = function PortraitStoryCardBase(_ref) {
|
|
@@ -4444,18 +4473,18 @@ var PortraitStoryCardBase = function PortraitStoryCardBase(_ref) {
|
|
|
4444
4473
|
_ref$borderColor = _ref.borderColor,
|
|
4445
4474
|
borderColor = _ref$borderColor === void 0 ? "" : _ref$borderColor;
|
|
4446
4475
|
if (isEmpty(story)) return null;
|
|
4447
|
-
return /*#__PURE__*/
|
|
4476
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4448
4477
|
className: "portrait-story-card-m_wrapper__3nche"
|
|
4449
|
-
}, /*#__PURE__*/
|
|
4478
|
+
}, /*#__PURE__*/React__default["default"].createElement(StoryCard, {
|
|
4450
4479
|
story: story,
|
|
4451
4480
|
border: border,
|
|
4452
4481
|
theme: theme,
|
|
4453
4482
|
config: config,
|
|
4454
4483
|
useImageAsBackground: true
|
|
4455
|
-
}, /*#__PURE__*/
|
|
4484
|
+
}, /*#__PURE__*/React__default["default"].createElement(HeroImage, {
|
|
4456
4485
|
story: story,
|
|
4457
4486
|
aspectRatio: [[9, 16]]
|
|
4458
|
-
}), /*#__PURE__*/
|
|
4487
|
+
}), /*#__PURE__*/React__default["default"].createElement(StorycardContent, {
|
|
4459
4488
|
story: story,
|
|
4460
4489
|
config: config,
|
|
4461
4490
|
separator: separator,
|
|
@@ -4464,13 +4493,13 @@ var PortraitStoryCardBase = function PortraitStoryCardBase(_ref) {
|
|
|
4464
4493
|
})));
|
|
4465
4494
|
};
|
|
4466
4495
|
PortraitStoryCardBase.propTypes = {
|
|
4467
|
-
border:
|
|
4468
|
-
theme:
|
|
4469
|
-
headerLevel:
|
|
4470
|
-
separator:
|
|
4471
|
-
borderColor:
|
|
4472
|
-
config:
|
|
4473
|
-
story:
|
|
4496
|
+
border: PropTypes__default["default"].string,
|
|
4497
|
+
theme: PropTypes__default["default"].string,
|
|
4498
|
+
headerLevel: PropTypes__default["default"].string,
|
|
4499
|
+
separator: PropTypes__default["default"].string,
|
|
4500
|
+
borderColor: PropTypes__default["default"].string,
|
|
4501
|
+
config: PropTypes__default["default"].object,
|
|
4502
|
+
story: PropTypes__default["default"].object
|
|
4474
4503
|
};
|
|
4475
4504
|
var PortraitStoryCard = StateProvider(PortraitStoryCardBase);
|
|
4476
4505
|
|
|
@@ -4495,7 +4524,7 @@ var FourColPortraitStoriesBase = function FourColPortraitStoriesBase(_ref2) {
|
|
|
4495
4524
|
isLoadMoreVisible = _ref2.isLoadMoreVisible,
|
|
4496
4525
|
isLoading = _ref2.isLoading,
|
|
4497
4526
|
isolatedLoadMore = _ref2.isolatedLoadMore;
|
|
4498
|
-
var storyItems = collectionToStories(collection);
|
|
4527
|
+
var storyItems = components.collectionToStories(collection);
|
|
4499
4528
|
if (!storyItems.length) return null;
|
|
4500
4529
|
var _config$collectionNam = config.collectionNameBorderColor,
|
|
4501
4530
|
collectionNameBorderColor = _config$collectionNam === void 0 ? "" : _config$collectionNam,
|
|
@@ -4519,8 +4548,8 @@ var FourColPortraitStoriesBase = function FourColPortraitStoriesBase(_ref2) {
|
|
|
4519
4548
|
var footerSlot = footerSlotConfig.footerSlot;
|
|
4520
4549
|
var footerSlotComp = typeof footerSlot === "function" ? footerSlot() : null;
|
|
4521
4550
|
var textColor = getTextColor(theme);
|
|
4522
|
-
var dispatch = useDispatch();
|
|
4523
|
-
var qtConfig = useSelector(function (state) {
|
|
4551
|
+
var dispatch = reactRedux.useDispatch();
|
|
4552
|
+
var qtConfig = reactRedux.useSelector(function (state) {
|
|
4524
4553
|
return get_1(state, ["qt", "config"], {});
|
|
4525
4554
|
});
|
|
4526
4555
|
|
|
@@ -4528,7 +4557,7 @@ var FourColPortraitStoriesBase = function FourColPortraitStoriesBase(_ref2) {
|
|
|
4528
4557
|
if (!isLoadMoreVisible) return null;
|
|
4529
4558
|
|
|
4530
4559
|
if (isolatedLoadMore) {
|
|
4531
|
-
return /*#__PURE__*/
|
|
4560
|
+
return /*#__PURE__*/React__default["default"].createElement(LoadMoreTarget, {
|
|
4532
4561
|
collection: collection,
|
|
4533
4562
|
componentName: "FourColPortraitStories",
|
|
4534
4563
|
offset: storyItems.length,
|
|
@@ -4537,7 +4566,7 @@ var FourColPortraitStoriesBase = function FourColPortraitStoriesBase(_ref2) {
|
|
|
4537
4566
|
}
|
|
4538
4567
|
|
|
4539
4568
|
var url = generateNavigateSlug(collection, qtConfig);
|
|
4540
|
-
return /*#__PURE__*/
|
|
4569
|
+
return /*#__PURE__*/React__default["default"].createElement(ProgressiveHydration, null, /*#__PURE__*/React__default["default"].createElement(LoadmoreButton, {
|
|
4541
4570
|
config: config,
|
|
4542
4571
|
collection: collection,
|
|
4543
4572
|
template: footerButton,
|
|
@@ -4551,25 +4580,25 @@ var FourColPortraitStoriesBase = function FourColPortraitStoriesBase(_ref2) {
|
|
|
4551
4580
|
}));
|
|
4552
4581
|
};
|
|
4553
4582
|
|
|
4554
|
-
return /*#__PURE__*/
|
|
4583
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4555
4584
|
className: "full-width-with-padding arrow-component",
|
|
4556
4585
|
"data-test-id": "four-col-portrait-stories",
|
|
4557
4586
|
style: {
|
|
4558
4587
|
backgroundColor: theme,
|
|
4559
4588
|
color: textColor
|
|
4560
4589
|
}
|
|
4561
|
-
}, /*#__PURE__*/
|
|
4590
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4562
4591
|
className: "four-col-portrait-stories-m_four-col-portrait__AtWub"
|
|
4563
|
-
}, /*#__PURE__*/
|
|
4592
|
+
}, /*#__PURE__*/React__default["default"].createElement(CollectionName, {
|
|
4564
4593
|
collection: collection,
|
|
4565
4594
|
collectionNameTemplate: collectionNameTemplate,
|
|
4566
4595
|
collectionNameBorderColor: collectionNameBorderColor,
|
|
4567
4596
|
customCollectionName: customCollectionName,
|
|
4568
4597
|
navigate: navigate
|
|
4569
|
-
}), /*#__PURE__*/
|
|
4598
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4570
4599
|
className: "four-col-portrait-stories-m_wrapper__1BX02"
|
|
4571
4600
|
}, storyItems.map(function (story, index) {
|
|
4572
|
-
return /*#__PURE__*/
|
|
4601
|
+
return /*#__PURE__*/React__default["default"].createElement(PortraitStoryCard, {
|
|
4573
4602
|
story: story,
|
|
4574
4603
|
border: border,
|
|
4575
4604
|
theme: theme,
|
|
@@ -4590,22 +4619,22 @@ var FourColPortraitStoriesBase = function FourColPortraitStoriesBase(_ref2) {
|
|
|
4590
4619
|
};
|
|
4591
4620
|
FourColPortraitStoriesBase.propTypes = {
|
|
4592
4621
|
/** collection is the array of objects which is returning by API */
|
|
4593
|
-
collection:
|
|
4622
|
+
collection: PropTypes__default["default"].object.isRequired,
|
|
4594
4623
|
|
|
4595
4624
|
/** The config for the Row */
|
|
4596
|
-
config:
|
|
4597
|
-
borderColor:
|
|
4598
|
-
theme:
|
|
4599
|
-
border:
|
|
4600
|
-
collectionNameTemplate:
|
|
4601
|
-
footerButton:
|
|
4602
|
-
collectionNameBorderColor:
|
|
4603
|
-
subsequentLoadCount:
|
|
4625
|
+
config: PropTypes__default["default"].shape({
|
|
4626
|
+
borderColor: PropTypes__default["default"].string,
|
|
4627
|
+
theme: PropTypes__default["default"].string,
|
|
4628
|
+
border: PropTypes__default["default"].bool,
|
|
4629
|
+
collectionNameTemplate: PropTypes__default["default"].string,
|
|
4630
|
+
footerButton: PropTypes__default["default"].string,
|
|
4631
|
+
collectionNameBorderColor: PropTypes__default["default"].string,
|
|
4632
|
+
subsequentLoadCount: PropTypes__default["default"].number
|
|
4604
4633
|
}),
|
|
4605
|
-
getMoreStories:
|
|
4606
|
-
isLoadMoreVisible:
|
|
4607
|
-
isLoading:
|
|
4608
|
-
isolatedLoadMore:
|
|
4634
|
+
getMoreStories: PropTypes__default["default"].func,
|
|
4635
|
+
isLoadMoreVisible: PropTypes__default["default"].bool,
|
|
4636
|
+
isLoading: PropTypes__default["default"].bool,
|
|
4637
|
+
isolatedLoadMore: PropTypes__default["default"].bool
|
|
4609
4638
|
};
|
|
4610
4639
|
FourColPortraitStoriesBase.defaultProps = {
|
|
4611
4640
|
getMoreStories: function getMoreStories() {},
|
|
@@ -4614,4 +4643,5 @@ FourColPortraitStoriesBase.defaultProps = {
|
|
|
4614
4643
|
};
|
|
4615
4644
|
var FourColPortraitStories = StateProvider(FourColPortraitStoriesBase);
|
|
4616
4645
|
|
|
4617
|
-
|
|
4646
|
+
exports.FourColPortraitStories = FourColPortraitStories;
|
|
4647
|
+
exports.FourColPortraitStoriesBase = FourColPortraitStoriesBase;
|