@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 components = require('@quintype/components');
|
|
8
|
+
var Timeago = require('react-timeago');
|
|
9
|
+
var dateFnsTz = require('date-fns-tz');
|
|
10
|
+
var reactRedux = require('react-redux');
|
|
11
|
+
|
|
12
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
13
|
+
|
|
14
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
15
|
+
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
16
|
+
var Timeago__default = /*#__PURE__*/_interopDefaultLegacy(Timeago);
|
|
7
17
|
|
|
8
18
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
9
19
|
|
|
@@ -156,9 +166,9 @@ exports["default"] = _default;
|
|
|
156
166
|
|
|
157
167
|
var _getClassName = /*@__PURE__*/getDefaultExportFromCjs(getClassName);
|
|
158
168
|
|
|
159
|
-
var StateContext = /*#__PURE__*/createContext(); // eslint-disable-next-line react/display-name
|
|
169
|
+
var StateContext = /*#__PURE__*/React.createContext(); // eslint-disable-next-line react/display-name
|
|
160
170
|
var useStateValue = function useStateValue() {
|
|
161
|
-
return useContext(StateContext);
|
|
171
|
+
return React.useContext(StateContext);
|
|
162
172
|
};
|
|
163
173
|
|
|
164
174
|
/**
|
|
@@ -2601,15 +2611,15 @@ function isExternalStory() {
|
|
|
2601
2611
|
metadata = _story$metadata === void 0 ? {} : _story$metadata;
|
|
2602
2612
|
return storyTemplate === "news-elsewhere" ? get_1(metadata, ["reference-url"], "") : "";
|
|
2603
2613
|
} // Adds target='_blank' attribute to anchor tags if not present
|
|
2604
|
-
|
|
2605
|
-
"sketches-host":
|
|
2606
|
-
"cdn-name":
|
|
2607
|
-
"cdn-image":
|
|
2614
|
+
PropTypes__default["default"].shape({
|
|
2615
|
+
"sketches-host": PropTypes__default["default"].string,
|
|
2616
|
+
"cdn-name": PropTypes__default["default"].string,
|
|
2617
|
+
"cdn-image": PropTypes__default["default"].string
|
|
2608
2618
|
});
|
|
2609
|
-
|
|
2610
|
-
headline:
|
|
2611
|
-
"last-published-at":
|
|
2612
|
-
subheadline:
|
|
2619
|
+
PropTypes__default["default"].shape({
|
|
2620
|
+
headline: PropTypes__default["default"].string,
|
|
2621
|
+
"last-published-at": PropTypes__default["default"].number,
|
|
2622
|
+
subheadline: PropTypes__default["default"].string
|
|
2613
2623
|
});
|
|
2614
2624
|
var getStoryUrl = function getStoryUrl(story) {
|
|
2615
2625
|
var defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
|
|
@@ -2621,17 +2631,17 @@ var getTimeStamp = function getTimeStamp(date, _formatter) {
|
|
|
2621
2631
|
var timezone = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;
|
|
2622
2632
|
|
|
2623
2633
|
if (timezone && template === "story") {
|
|
2624
|
-
var zonedTime = timezone && utcToZonedTime(date, timezone);
|
|
2625
|
-
var formatZonedTime = zonedTime && format(zonedTime, "yyyy-MM-dd'T'HH:mm:ssXXX", {
|
|
2634
|
+
var zonedTime = timezone && dateFnsTz.utcToZonedTime(date, timezone);
|
|
2635
|
+
var formatZonedTime = zonedTime && dateFnsTz.format(zonedTime, "yyyy-MM-dd'T'HH:mm:ssXXX", {
|
|
2626
2636
|
timeZone: timezone
|
|
2627
2637
|
});
|
|
2628
2638
|
var timeStamp = timestampToFormat("", "", "", date, config);
|
|
2629
|
-
return /*#__PURE__*/
|
|
2639
|
+
return /*#__PURE__*/React__default["default"].createElement("time", {
|
|
2630
2640
|
dateTime: formatZonedTime
|
|
2631
2641
|
}, timeStamp);
|
|
2632
2642
|
}
|
|
2633
2643
|
|
|
2634
|
-
return /*#__PURE__*/
|
|
2644
|
+
return /*#__PURE__*/React__default["default"].createElement(Timeago__default["default"], {
|
|
2635
2645
|
date: date,
|
|
2636
2646
|
formatter: function formatter(value, unit, suffix, date) {
|
|
2637
2647
|
return _formatter(value, unit, suffix, date, config);
|
|
@@ -2645,7 +2655,7 @@ var CrownIcon = function CrownIcon(_ref) {
|
|
|
2645
2655
|
_ref$color = _ref.color,
|
|
2646
2656
|
color = _ref$color === void 0 ? "#D8D8D8" : _ref$color,
|
|
2647
2657
|
positionTop = _ref.positionTop;
|
|
2648
|
-
return /*#__PURE__*/
|
|
2658
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
2649
2659
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2650
2660
|
width: width,
|
|
2651
2661
|
height: height,
|
|
@@ -2654,28 +2664,28 @@ var CrownIcon = function CrownIcon(_ref) {
|
|
|
2654
2664
|
position: "relative",
|
|
2655
2665
|
top: positionTop
|
|
2656
2666
|
}
|
|
2657
|
-
}, /*#__PURE__*/
|
|
2667
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
2658
2668
|
fill: "none",
|
|
2659
2669
|
fillRule: "evenodd",
|
|
2660
2670
|
stroke: "none",
|
|
2661
2671
|
strokeWidth: "1"
|
|
2662
|
-
}, /*#__PURE__*/
|
|
2672
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", null, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
2663
2673
|
transform: "translate(8 8)"
|
|
2664
|
-
}, /*#__PURE__*/
|
|
2674
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
2665
2675
|
d: "M0 0H24V24H0z"
|
|
2666
|
-
}), /*#__PURE__*/
|
|
2676
|
+
}), /*#__PURE__*/React__default["default"].createElement("g", {
|
|
2667
2677
|
fill: color,
|
|
2668
2678
|
fillRule: "nonzero",
|
|
2669
2679
|
transform: "translate(0 2)"
|
|
2670
|
-
}, /*#__PURE__*/
|
|
2680
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
2671
2681
|
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"
|
|
2672
2682
|
}))))));
|
|
2673
2683
|
};
|
|
2674
2684
|
CrownIcon.propTypes = {
|
|
2675
|
-
height:
|
|
2676
|
-
width:
|
|
2677
|
-
color:
|
|
2678
|
-
positionTop:
|
|
2685
|
+
height: PropTypes__default["default"].string,
|
|
2686
|
+
width: PropTypes__default["default"].string,
|
|
2687
|
+
color: PropTypes__default["default"].string,
|
|
2688
|
+
positionTop: PropTypes__default["default"].string
|
|
2679
2689
|
};
|
|
2680
2690
|
|
|
2681
2691
|
var KeyIcon = function KeyIcon(_ref) {
|
|
@@ -2684,7 +2694,7 @@ var KeyIcon = function KeyIcon(_ref) {
|
|
|
2684
2694
|
_ref$color = _ref.color,
|
|
2685
2695
|
color = _ref$color === void 0 ? "#D5D5D5" : _ref$color,
|
|
2686
2696
|
positionTop = _ref.positionTop;
|
|
2687
|
-
return /*#__PURE__*/
|
|
2697
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
2688
2698
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2689
2699
|
width: width,
|
|
2690
2700
|
height: height,
|
|
@@ -2693,16 +2703,16 @@ var KeyIcon = function KeyIcon(_ref) {
|
|
|
2693
2703
|
position: "relative",
|
|
2694
2704
|
top: positionTop
|
|
2695
2705
|
}
|
|
2696
|
-
}, /*#__PURE__*/
|
|
2706
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
2697
2707
|
fill: "none",
|
|
2698
2708
|
fillRule: "evenodd",
|
|
2699
2709
|
stroke: "none",
|
|
2700
2710
|
strokeWidth: "1"
|
|
2701
|
-
}, /*#__PURE__*/
|
|
2711
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", null, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
2702
2712
|
transform: "translate(8 8)"
|
|
2703
|
-
}, /*#__PURE__*/
|
|
2713
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
2704
2714
|
d: "M0 0H24V24H0z"
|
|
2705
|
-
}), /*#__PURE__*/
|
|
2715
|
+
}), /*#__PURE__*/React__default["default"].createElement("path", {
|
|
2706
2716
|
fill: color,
|
|
2707
2717
|
fillRule: "nonzero",
|
|
2708
2718
|
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",
|
|
@@ -2710,10 +2720,10 @@ var KeyIcon = function KeyIcon(_ref) {
|
|
|
2710
2720
|
})))));
|
|
2711
2721
|
};
|
|
2712
2722
|
KeyIcon.propTypes = {
|
|
2713
|
-
height:
|
|
2714
|
-
width:
|
|
2715
|
-
color:
|
|
2716
|
-
positionTop:
|
|
2723
|
+
height: PropTypes__default["default"].string,
|
|
2724
|
+
width: PropTypes__default["default"].string,
|
|
2725
|
+
color: PropTypes__default["default"].string,
|
|
2726
|
+
positionTop: PropTypes__default["default"].string
|
|
2717
2727
|
};
|
|
2718
2728
|
|
|
2719
2729
|
var LockIcon = function LockIcon(_ref) {
|
|
@@ -2722,7 +2732,7 @@ var LockIcon = function LockIcon(_ref) {
|
|
|
2722
2732
|
_ref$color = _ref.color,
|
|
2723
2733
|
color = _ref$color === void 0 ? "#D5D5D5" : _ref$color,
|
|
2724
2734
|
positionTop = _ref.positionTop;
|
|
2725
|
-
return /*#__PURE__*/
|
|
2735
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
2726
2736
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2727
2737
|
width: width,
|
|
2728
2738
|
height: height,
|
|
@@ -2731,28 +2741,28 @@ var LockIcon = function LockIcon(_ref) {
|
|
|
2731
2741
|
position: "relative",
|
|
2732
2742
|
top: positionTop
|
|
2733
2743
|
}
|
|
2734
|
-
}, /*#__PURE__*/
|
|
2744
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
2735
2745
|
fill: "none",
|
|
2736
2746
|
fillRule: "evenodd",
|
|
2737
2747
|
stroke: "none",
|
|
2738
2748
|
strokeWidth: "1"
|
|
2739
|
-
}, /*#__PURE__*/
|
|
2749
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", null, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
2740
2750
|
transform: "translate(8 8)"
|
|
2741
|
-
}, /*#__PURE__*/
|
|
2751
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
2742
2752
|
d: "M0 0H24V24H0z"
|
|
2743
|
-
}), /*#__PURE__*/
|
|
2753
|
+
}), /*#__PURE__*/React__default["default"].createElement("g", {
|
|
2744
2754
|
fill: color,
|
|
2745
2755
|
fillRule: "nonzero",
|
|
2746
2756
|
transform: "translate(3)"
|
|
2747
|
-
}, /*#__PURE__*/
|
|
2757
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
2748
2758
|
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"
|
|
2749
2759
|
}))))));
|
|
2750
2760
|
};
|
|
2751
2761
|
LockIcon.propTypes = {
|
|
2752
|
-
height:
|
|
2753
|
-
width:
|
|
2754
|
-
color:
|
|
2755
|
-
positionTop:
|
|
2762
|
+
height: PropTypes__default["default"].string,
|
|
2763
|
+
width: PropTypes__default["default"].string,
|
|
2764
|
+
color: PropTypes__default["default"].string,
|
|
2765
|
+
positionTop: PropTypes__default["default"].string
|
|
2756
2766
|
};
|
|
2757
2767
|
|
|
2758
2768
|
var StarIcon = function StarIcon(_ref) {
|
|
@@ -2762,7 +2772,7 @@ var StarIcon = function StarIcon(_ref) {
|
|
|
2762
2772
|
color = _ref$color === void 0 ? "#D5D5D5" : _ref$color,
|
|
2763
2773
|
_ref$positionTop = _ref.positionTop,
|
|
2764
2774
|
positionTop = _ref$positionTop === void 0 ? "" : _ref$positionTop;
|
|
2765
|
-
return /*#__PURE__*/
|
|
2775
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
2766
2776
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2767
2777
|
width: width,
|
|
2768
2778
|
height: height,
|
|
@@ -2771,21 +2781,21 @@ var StarIcon = function StarIcon(_ref) {
|
|
|
2771
2781
|
position: "relative",
|
|
2772
2782
|
top: positionTop
|
|
2773
2783
|
}
|
|
2774
|
-
}, /*#__PURE__*/
|
|
2784
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
2775
2785
|
fill: "none",
|
|
2776
2786
|
fillRule: "evenodd",
|
|
2777
2787
|
stroke: "none",
|
|
2778
2788
|
strokeWidth: "1"
|
|
2779
|
-
}, /*#__PURE__*/
|
|
2789
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", null, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
2780
2790
|
fill: color,
|
|
2781
2791
|
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"
|
|
2782
2792
|
}))));
|
|
2783
2793
|
};
|
|
2784
2794
|
StarIcon.propTypes = {
|
|
2785
|
-
height:
|
|
2786
|
-
width:
|
|
2787
|
-
color:
|
|
2788
|
-
positionTop:
|
|
2795
|
+
height: PropTypes__default["default"].string,
|
|
2796
|
+
width: PropTypes__default["default"].string,
|
|
2797
|
+
color: PropTypes__default["default"].string,
|
|
2798
|
+
positionTop: PropTypes__default["default"].string
|
|
2789
2799
|
};
|
|
2790
2800
|
|
|
2791
2801
|
var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
@@ -2797,7 +2807,7 @@ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
|
2797
2807
|
|
|
2798
2808
|
switch (iconType) {
|
|
2799
2809
|
case "crown":
|
|
2800
|
-
return /*#__PURE__*/
|
|
2810
|
+
return /*#__PURE__*/React__default["default"].createElement(CrownIcon, {
|
|
2801
2811
|
width: width,
|
|
2802
2812
|
height: height,
|
|
2803
2813
|
color: color,
|
|
@@ -2805,7 +2815,7 @@ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
|
2805
2815
|
});
|
|
2806
2816
|
|
|
2807
2817
|
case "lock":
|
|
2808
|
-
return /*#__PURE__*/
|
|
2818
|
+
return /*#__PURE__*/React__default["default"].createElement(LockIcon, {
|
|
2809
2819
|
width: width,
|
|
2810
2820
|
height: height,
|
|
2811
2821
|
color: color,
|
|
@@ -2813,7 +2823,7 @@ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
|
2813
2823
|
});
|
|
2814
2824
|
|
|
2815
2825
|
case "key":
|
|
2816
|
-
return /*#__PURE__*/
|
|
2826
|
+
return /*#__PURE__*/React__default["default"].createElement(KeyIcon, {
|
|
2817
2827
|
width: width,
|
|
2818
2828
|
height: height,
|
|
2819
2829
|
color: color,
|
|
@@ -2821,7 +2831,7 @@ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
|
2821
2831
|
});
|
|
2822
2832
|
|
|
2823
2833
|
default:
|
|
2824
|
-
return /*#__PURE__*/
|
|
2834
|
+
return /*#__PURE__*/React__default["default"].createElement(StarIcon, {
|
|
2825
2835
|
width: width,
|
|
2826
2836
|
height: height,
|
|
2827
2837
|
color: color,
|
|
@@ -2830,21 +2840,21 @@ var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
|
|
|
2830
2840
|
}
|
|
2831
2841
|
};
|
|
2832
2842
|
PremiumStoryIcon.propTypes = {
|
|
2833
|
-
width:
|
|
2834
|
-
height:
|
|
2835
|
-
color:
|
|
2836
|
-
iconType:
|
|
2837
|
-
positionTop:
|
|
2843
|
+
width: PropTypes__default["default"].string,
|
|
2844
|
+
height: PropTypes__default["default"].string,
|
|
2845
|
+
color: PropTypes__default["default"].string,
|
|
2846
|
+
iconType: PropTypes__default["default"].string,
|
|
2847
|
+
positionTop: PropTypes__default["default"].string
|
|
2838
2848
|
};
|
|
2839
2849
|
|
|
2840
2850
|
function LiveIcon() {
|
|
2841
|
-
return /*#__PURE__*/
|
|
2851
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
2842
2852
|
className: "live-icon",
|
|
2843
2853
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2844
2854
|
width: "25",
|
|
2845
2855
|
height: "24",
|
|
2846
2856
|
viewBox: "0 0 25 24"
|
|
2847
|
-
}, /*#__PURE__*/
|
|
2857
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
2848
2858
|
fill: "#ff5858",
|
|
2849
2859
|
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"
|
|
2850
2860
|
}));
|
|
@@ -2901,37 +2911,37 @@ var Headline = function Headline(_ref) {
|
|
|
2901
2911
|
var wrapperClass = premiumStory ? "wrapper" : "";
|
|
2902
2912
|
var iconSize = "24px";
|
|
2903
2913
|
var enableLiveIcon = showLiveIcon && story["story-template"] === "live-blog" && !get_1(story, ["metadata", "is-closed"], false);
|
|
2904
|
-
return /*#__PURE__*/
|
|
2914
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2905
2915
|
"data-test-id": "headline",
|
|
2906
2916
|
className: "arrow-component arr--headline " + _getClassName(wrapperClass, _styleModuleImportMap$8)
|
|
2907
|
-
}, premiumStory && /*#__PURE__*/
|
|
2917
|
+
}, premiumStory && /*#__PURE__*/React__default["default"].createElement(PremiumStoryIcon, {
|
|
2908
2918
|
width: iconSize,
|
|
2909
2919
|
height: iconSize,
|
|
2910
2920
|
color: iconColor,
|
|
2911
2921
|
iconType: iconStyle,
|
|
2912
2922
|
positionTop: positionHeadline()
|
|
2913
|
-
}), isLink ? /*#__PURE__*/
|
|
2923
|
+
}), isLink ? /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
2914
2924
|
href: getStoryUrl(story, "/".concat(story.slug)),
|
|
2915
2925
|
externalLink: isExternalStory(story),
|
|
2916
2926
|
"aria-label": "headline"
|
|
2917
|
-
}, /*#__PURE__*/
|
|
2927
|
+
}, /*#__PURE__*/React__default["default"].createElement(HeaderTag, {
|
|
2918
2928
|
className: _getClassName("headline ".concat(textColor), _styleModuleImportMap$8)
|
|
2919
|
-
}, enableLiveIcon && /*#__PURE__*/
|
|
2929
|
+
}, enableLiveIcon && /*#__PURE__*/React__default["default"].createElement(LiveIcon, null), headline)) : /*#__PURE__*/React__default["default"].createElement(HeaderTag, {
|
|
2920
2930
|
className: _getClassName("headline ".concat(textColor), _styleModuleImportMap$8)
|
|
2921
|
-
}, enableLiveIcon && /*#__PURE__*/
|
|
2931
|
+
}, enableLiveIcon && /*#__PURE__*/React__default["default"].createElement(LiveIcon, null), headline));
|
|
2922
2932
|
};
|
|
2923
2933
|
Headline.propTypes = {
|
|
2924
2934
|
/** The Story Object from the API response */
|
|
2925
|
-
story:
|
|
2935
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
2926
2936
|
|
|
2927
2937
|
/** Header tags ranging h1-h6, where h[headerLevel] */
|
|
2928
|
-
headerLevel:
|
|
2929
|
-
premiumStoryIconConfig:
|
|
2930
|
-
iconColor:
|
|
2931
|
-
iconType:
|
|
2932
|
-
enablePremiumStoryIcon:
|
|
2938
|
+
headerLevel: PropTypes__default["default"].string,
|
|
2939
|
+
premiumStoryIconConfig: PropTypes__default["default"].shape({
|
|
2940
|
+
iconColor: PropTypes__default["default"].string,
|
|
2941
|
+
iconType: PropTypes__default["default"].string,
|
|
2942
|
+
enablePremiumStoryIcon: PropTypes__default["default"].bool
|
|
2933
2943
|
}),
|
|
2934
|
-
isLink:
|
|
2944
|
+
isLink: PropTypes__default["default"].bool
|
|
2935
2945
|
};
|
|
2936
2946
|
Headline.defaultProps = {
|
|
2937
2947
|
headerLevel: "6",
|
|
@@ -2973,22 +2983,22 @@ var SectionTag = function SectionTag(_ref) {
|
|
|
2973
2983
|
}
|
|
2974
2984
|
|
|
2975
2985
|
if (!isSection) return null;
|
|
2976
|
-
return /*#__PURE__*/
|
|
2986
|
+
return /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
2977
2987
|
href: getUrl,
|
|
2978
2988
|
className: "arrow-component arr--section-name",
|
|
2979
2989
|
"aria-label": "section-name"
|
|
2980
|
-
}, /*#__PURE__*/
|
|
2990
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2981
2991
|
"data-test-id": "sectionTag",
|
|
2982
2992
|
style: {
|
|
2983
2993
|
backgroundColor: templateStyle.includes("section-solid") ? sectionTagBorderColor : ""
|
|
2984
2994
|
},
|
|
2985
2995
|
className: "section-tag arrow-component " + _getClassName("".concat(textColor, " ").concat(templateStyle), _styleModuleImportMap$7)
|
|
2986
|
-
}, templateStyle.includes("section-borderLeft") && /*#__PURE__*/
|
|
2996
|
+
}, templateStyle.includes("section-borderLeft") && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
2987
2997
|
className: "section-m_border-left__2oUyp",
|
|
2988
2998
|
style: {
|
|
2989
2999
|
color: sectionTagBorderColor
|
|
2990
3000
|
}
|
|
2991
|
-
}), section["display-name"] || section["name"], /*#__PURE__*/
|
|
3001
|
+
}), section["display-name"] || section["name"], /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2992
3002
|
className: "section-m_border-bottom__3cRoD",
|
|
2993
3003
|
style: {
|
|
2994
3004
|
backgroundColor: "".concat(template === "solid" ? "" : sectionTagBorderColor)
|
|
@@ -2997,13 +3007,13 @@ var SectionTag = function SectionTag(_ref) {
|
|
|
2997
3007
|
};
|
|
2998
3008
|
SectionTag.propTypes = {
|
|
2999
3009
|
/** The Story Object from the API response */
|
|
3000
|
-
story:
|
|
3010
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
3001
3011
|
|
|
3002
3012
|
/** The style template for section tag */
|
|
3003
|
-
template:
|
|
3004
|
-
borderColor:
|
|
3005
|
-
solidBorderColor:
|
|
3006
|
-
isLightTheme:
|
|
3013
|
+
template: PropTypes__default["default"].oneOf(["", "borderBottomSml", "borderLeft", "solid"]),
|
|
3014
|
+
borderColor: PropTypes__default["default"].string,
|
|
3015
|
+
solidBorderColor: PropTypes__default["default"].string,
|
|
3016
|
+
isLightTheme: PropTypes__default["default"].bool
|
|
3007
3017
|
};
|
|
3008
3018
|
SectionTag.defaultProps = {
|
|
3009
3019
|
template: "",
|
|
@@ -3029,18 +3039,18 @@ var TimeStamp = function TimeStamp(_ref) {
|
|
|
3029
3039
|
var time = story["last-published-at"] || story["first-published-at"];
|
|
3030
3040
|
var isBottomClasses = isBottom ? "bottom-fix" : "";
|
|
3031
3041
|
var textColor = getTextColor(configState.theme);
|
|
3032
|
-
return /*#__PURE__*/
|
|
3042
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isTime && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3033
3043
|
"data-test-id": "publish-time",
|
|
3034
3044
|
className: "time arr--publish-time " + _getClassName("time ".concat(textColor, " ").concat(isBottomClasses), _styleModuleImportMap$6)
|
|
3035
|
-
}, /*#__PURE__*/
|
|
3045
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3036
3046
|
className: "timestamp-m_time-wrapper__3O2lM"
|
|
3037
3047
|
}, getTimeStamp(time, formatter, config))));
|
|
3038
3048
|
};
|
|
3039
3049
|
TimeStamp.propTypes = {
|
|
3040
3050
|
/** The Story Object from the API response */
|
|
3041
|
-
story:
|
|
3042
|
-
isBottom:
|
|
3043
|
-
config:
|
|
3051
|
+
story: PropTypes__default["default"].object,
|
|
3052
|
+
isBottom: PropTypes__default["default"].bool,
|
|
3053
|
+
config: PropTypes__default["default"].object
|
|
3044
3054
|
};
|
|
3045
3055
|
|
|
3046
3056
|
var _styleModuleImportMap$5 = {
|
|
@@ -3083,10 +3093,10 @@ var AuthorBase = function AuthorBase(_ref) {
|
|
|
3083
3093
|
return null;
|
|
3084
3094
|
}
|
|
3085
3095
|
|
|
3086
|
-
return /*#__PURE__*/
|
|
3096
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3087
3097
|
"data-test-id": "author-image",
|
|
3088
3098
|
className: _getClassName("author-image ".concat(dir, "-image"), _styleModuleImportMap$5)
|
|
3089
|
-
}, /*#__PURE__*/
|
|
3099
|
+
}, /*#__PURE__*/React__default["default"].createElement("figure", null, avatarS3Key ? /*#__PURE__*/React__default["default"].createElement(components.ResponsiveImage, {
|
|
3090
3100
|
slug: avatarS3Key,
|
|
3091
3101
|
"aspect-ratio": [1, 1],
|
|
3092
3102
|
defaultWidth: 400,
|
|
@@ -3094,14 +3104,14 @@ var AuthorBase = function AuthorBase(_ref) {
|
|
|
3094
3104
|
auto: ["format", "compress"]
|
|
3095
3105
|
},
|
|
3096
3106
|
alt: authorName
|
|
3097
|
-
}) : /*#__PURE__*/
|
|
3107
|
+
}) : /*#__PURE__*/React__default["default"].createElement("img", {
|
|
3098
3108
|
src: avatarUrl
|
|
3099
3109
|
})));
|
|
3100
3110
|
};
|
|
3101
3111
|
|
|
3102
3112
|
var isPrefix = function isPrefix(dir) {
|
|
3103
3113
|
if (prefix) {
|
|
3104
|
-
return /*#__PURE__*/
|
|
3114
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3105
3115
|
className: "arr-author-prefix " + _getClassName("prefix ".concat(textColor), _styleModuleImportMap$5)
|
|
3106
3116
|
}, prefix);
|
|
3107
3117
|
}
|
|
@@ -3109,11 +3119,11 @@ var AuthorBase = function AuthorBase(_ref) {
|
|
|
3109
3119
|
return !hideAuthorImage && authorImage(dir);
|
|
3110
3120
|
};
|
|
3111
3121
|
|
|
3112
|
-
return /*#__PURE__*/
|
|
3122
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isAuthor && /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
3113
3123
|
href: "".concat(mountAt, "/author/") + slug,
|
|
3114
3124
|
"aria-label": "author-name",
|
|
3115
3125
|
className: "author-name arr-author-name arrow-component " + _getClassName("author ".concat(isBottomClasses), _styleModuleImportMap$5)
|
|
3116
|
-
}, isPrefix("ltr"), /*#__PURE__*/
|
|
3126
|
+
}, isPrefix("ltr"), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3117
3127
|
"data-test-id": "author-name",
|
|
3118
3128
|
className: "author-name " + _getClassName("author-name ".concat(textColor), _styleModuleImportMap$5)
|
|
3119
3129
|
}, authorName || story["author-name"]), !prefix && isPrefix("rtl")));
|
|
@@ -3125,18 +3135,18 @@ function mapStateToProps(state) {
|
|
|
3125
3135
|
};
|
|
3126
3136
|
}
|
|
3127
3137
|
|
|
3128
|
-
var Author = connect(mapStateToProps)(AuthorBase);
|
|
3138
|
+
var Author = reactRedux.connect(mapStateToProps)(AuthorBase);
|
|
3129
3139
|
AuthorBase.propTypes = {
|
|
3130
3140
|
/** The Story Object from the API response */
|
|
3131
|
-
story:
|
|
3141
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
3132
3142
|
|
|
3133
3143
|
/** Hide Author Avatar Image */
|
|
3134
|
-
hideAuthorImage:
|
|
3144
|
+
hideAuthorImage: PropTypes__default["default"].bool,
|
|
3135
3145
|
// fix Author bottom of the storyCard
|
|
3136
|
-
isBottom:
|
|
3146
|
+
isBottom: PropTypes__default["default"].bool,
|
|
3137
3147
|
// fix prefix before the author name
|
|
3138
|
-
prefix:
|
|
3139
|
-
config:
|
|
3148
|
+
prefix: PropTypes__default["default"].string,
|
|
3149
|
+
config: PropTypes__default["default"].object
|
|
3140
3150
|
};
|
|
3141
3151
|
AuthorBase.defaultProps = {
|
|
3142
3152
|
hideAuthorImage: false,
|
|
@@ -3157,14 +3167,14 @@ var Dot = function Dot(_ref) {
|
|
|
3157
3167
|
height = _ref$height === void 0 ? "3px" : _ref$height,
|
|
3158
3168
|
_ref$color = _ref.color,
|
|
3159
3169
|
color = _ref$color === void 0 ? "light" : _ref$color;
|
|
3160
|
-
return /*#__PURE__*/
|
|
3170
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3161
3171
|
className: _getClassName(color, _styleModuleImportMap$4)
|
|
3162
|
-
}, /*#__PURE__*/
|
|
3172
|
+
}, /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3163
3173
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3164
3174
|
width: width,
|
|
3165
3175
|
height: height,
|
|
3166
3176
|
viewBox: "0 0 3 3"
|
|
3167
|
-
}, /*#__PURE__*/
|
|
3177
|
+
}, /*#__PURE__*/React__default["default"].createElement("circle", {
|
|
3168
3178
|
cx: "87",
|
|
3169
3179
|
cy: "9",
|
|
3170
3180
|
r: "1",
|
|
@@ -3175,9 +3185,9 @@ var Dot = function Dot(_ref) {
|
|
|
3175
3185
|
};
|
|
3176
3186
|
Dot.propTypes = {
|
|
3177
3187
|
/** height , width and color of the dot icon */
|
|
3178
|
-
color:
|
|
3179
|
-
width:
|
|
3180
|
-
height:
|
|
3188
|
+
color: PropTypes__default["default"].string,
|
|
3189
|
+
width: PropTypes__default["default"].string,
|
|
3190
|
+
height: PropTypes__default["default"].string
|
|
3181
3191
|
};
|
|
3182
3192
|
|
|
3183
3193
|
var _styleModuleImportMap$3 = {
|
|
@@ -3193,22 +3203,22 @@ var Divider = function Divider(_ref) {
|
|
|
3193
3203
|
height = _ref$height === void 0 ? "10" : _ref$height,
|
|
3194
3204
|
_ref$color = _ref.color,
|
|
3195
3205
|
color = _ref$color === void 0 ? "light" : _ref$color;
|
|
3196
|
-
return /*#__PURE__*/
|
|
3206
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3197
3207
|
className: _getClassName(color, _styleModuleImportMap$3)
|
|
3198
|
-
}, /*#__PURE__*/
|
|
3208
|
+
}, /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
3199
3209
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3200
3210
|
width: width,
|
|
3201
3211
|
height: height
|
|
3202
|
-
}, /*#__PURE__*/
|
|
3212
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3203
3213
|
fill: "inherit",
|
|
3204
3214
|
d: "M0 0h1v10H0z"
|
|
3205
3215
|
})));
|
|
3206
3216
|
};
|
|
3207
3217
|
Divider.propTypes = {
|
|
3208
3218
|
/** height , width and color of the dot icon */
|
|
3209
|
-
color:
|
|
3210
|
-
width:
|
|
3211
|
-
height:
|
|
3219
|
+
color: PropTypes__default["default"].string,
|
|
3220
|
+
width: PropTypes__default["default"].string,
|
|
3221
|
+
height: PropTypes__default["default"].string
|
|
3212
3222
|
};
|
|
3213
3223
|
|
|
3214
3224
|
var _styleModuleImportMap$2 = {
|
|
@@ -3231,23 +3241,23 @@ var ReadTime = function ReadTime(_ref) {
|
|
|
3231
3241
|
var textColor = isLightTheme ? "light" : getTextColor(config.theme);
|
|
3232
3242
|
if (!showReadTime || !readTime) return null;
|
|
3233
3243
|
var timeToRead = get_1(opts, ["localizedTimeToRead"]) || "min read";
|
|
3234
|
-
return /*#__PURE__*/
|
|
3244
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3235
3245
|
"data-test-id": "read-time",
|
|
3236
3246
|
className: "arrow-component arr--read-time " + _getClassName("read-time-wrapper ".concat(textColor), _styleModuleImportMap$2)
|
|
3237
|
-
}, /*#__PURE__*/
|
|
3247
|
+
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
3238
3248
|
className: "read-time-indicator read-time-m_dot-indicator__3Sqh2"
|
|
3239
|
-
}, /*#__PURE__*/
|
|
3249
|
+
}, /*#__PURE__*/React__default["default"].createElement(Dot, {
|
|
3240
3250
|
color: textColor
|
|
3241
|
-
})), /*#__PURE__*/
|
|
3251
|
+
})), /*#__PURE__*/React__default["default"].createElement("span", null, readTime, " ", timeToRead)));
|
|
3242
3252
|
};
|
|
3243
3253
|
ReadTime.propTypes = {
|
|
3244
|
-
story:
|
|
3245
|
-
"read-time":
|
|
3254
|
+
story: PropTypes__default["default"].shape({
|
|
3255
|
+
"read-time": PropTypes__default["default"].number
|
|
3246
3256
|
}),
|
|
3247
|
-
opts:
|
|
3248
|
-
showReadTime:
|
|
3257
|
+
opts: PropTypes__default["default"].shape({
|
|
3258
|
+
showReadTime: PropTypes__default["default"].bool
|
|
3249
3259
|
}),
|
|
3250
|
-
isLightTheme:
|
|
3260
|
+
isLightTheme: PropTypes__default["default"].bool
|
|
3251
3261
|
};
|
|
3252
3262
|
|
|
3253
3263
|
var _styleModuleImportMap$1 = {
|
|
@@ -3278,33 +3288,33 @@ var AuthorWithTime = function AuthorWithTime(_ref) {
|
|
|
3278
3288
|
|
|
3279
3289
|
var getSeparator = function getSeparator() {
|
|
3280
3290
|
if (separator === "divider") {
|
|
3281
|
-
return /*#__PURE__*/
|
|
3291
|
+
return /*#__PURE__*/React__default["default"].createElement(Divider, {
|
|
3282
3292
|
color: textColor
|
|
3283
3293
|
});
|
|
3284
3294
|
}
|
|
3285
3295
|
|
|
3286
|
-
return /*#__PURE__*/
|
|
3296
|
+
return /*#__PURE__*/React__default["default"].createElement(Dot, {
|
|
3287
3297
|
color: textColor
|
|
3288
3298
|
});
|
|
3289
3299
|
};
|
|
3290
3300
|
|
|
3291
3301
|
var getTimeStamp = function getTimeStamp() {
|
|
3292
3302
|
if (!isTime) return null;
|
|
3293
|
-
return /*#__PURE__*/
|
|
3303
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isAuthor && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
3294
3304
|
className: "arr-separator " + _getClassName("".concat(seperatorStyle), _styleModuleImportMap$1)
|
|
3295
|
-
}, getSeparator()), /*#__PURE__*/
|
|
3305
|
+
}, getSeparator()), /*#__PURE__*/React__default["default"].createElement(TimeStamp, {
|
|
3296
3306
|
story: story,
|
|
3297
3307
|
config: config
|
|
3298
|
-
}), isReadTime && /*#__PURE__*/
|
|
3308
|
+
}), isReadTime && /*#__PURE__*/React__default["default"].createElement(ReadTime, {
|
|
3299
3309
|
story: story,
|
|
3300
3310
|
opts: config,
|
|
3301
3311
|
isLightTheme: isLightTheme
|
|
3302
3312
|
}));
|
|
3303
3313
|
};
|
|
3304
3314
|
|
|
3305
|
-
return /*#__PURE__*/
|
|
3315
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3306
3316
|
className: "arr--author-time " + _getClassName("author-time-wrapper ".concat(isBottomClasses), _styleModuleImportMap$1)
|
|
3307
|
-
}, isAuthor ? /*#__PURE__*/
|
|
3317
|
+
}, isAuthor ? /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(Author, {
|
|
3308
3318
|
story: story,
|
|
3309
3319
|
isBottom: true,
|
|
3310
3320
|
hideAuthorImage: hideAuthorImage,
|
|
@@ -3312,19 +3322,19 @@ var AuthorWithTime = function AuthorWithTime(_ref) {
|
|
|
3312
3322
|
}), getTimeStamp()) : getTimeStamp());
|
|
3313
3323
|
};
|
|
3314
3324
|
AuthorWithTime.propTypes = {
|
|
3315
|
-
story:
|
|
3325
|
+
story: PropTypes__default["default"].object,
|
|
3316
3326
|
|
|
3317
3327
|
/** Style of separator between the Author & Timestamp */
|
|
3318
|
-
separator:
|
|
3328
|
+
separator: PropTypes__default["default"].oneOf(["dot", "divider"]),
|
|
3319
3329
|
|
|
3320
3330
|
/** hide the author image */
|
|
3321
|
-
hideAuthorImage:
|
|
3331
|
+
hideAuthorImage: PropTypes__default["default"].bool,
|
|
3322
3332
|
// fix author and time at the end
|
|
3323
|
-
isBottom:
|
|
3333
|
+
isBottom: PropTypes__default["default"].bool,
|
|
3324
3334
|
// fix prefix before the author name
|
|
3325
|
-
prefix:
|
|
3326
|
-
config:
|
|
3327
|
-
isLightTheme:
|
|
3335
|
+
prefix: PropTypes__default["default"].string,
|
|
3336
|
+
config: PropTypes__default["default"].object,
|
|
3337
|
+
isLightTheme: PropTypes__default["default"].bool
|
|
3328
3338
|
};
|
|
3329
3339
|
AuthorWithTime.defaultProps = {
|
|
3330
3340
|
separator: "dot",
|
|
@@ -3355,14 +3365,14 @@ var StorycardContent = function StorycardContent(_ref) {
|
|
|
3355
3365
|
var SectionTagborderColor = rgbToHex(borderColor);
|
|
3356
3366
|
var borderTemplate = borderOptions.includes(border) ? "border-".concat(border) : "";
|
|
3357
3367
|
var horizontalCard = isHorizontalMobile ? "horizontal-content-wrapper" : "";
|
|
3358
|
-
return /*#__PURE__*/
|
|
3368
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3359
3369
|
"data-test-id": "story-card-content",
|
|
3360
3370
|
style: {
|
|
3361
3371
|
backgroundColor: theme,
|
|
3362
3372
|
color: textColor
|
|
3363
3373
|
},
|
|
3364
3374
|
className: "arr--content-wrapper " + _getClassName("wrapper ".concat(borderTemplate, " ").concat(horizontalCard), _styleModuleImportMap)
|
|
3365
|
-
}, children || /*#__PURE__*/
|
|
3375
|
+
}, children || /*#__PURE__*/React__default["default"].createElement(DefaultStoryCardContent, {
|
|
3366
3376
|
story: story,
|
|
3367
3377
|
headerLevel: headerLevel,
|
|
3368
3378
|
isHorizontalMobile: isHorizontalMobile,
|
|
@@ -3380,37 +3390,37 @@ var DefaultStoryCardContent = function DefaultStoryCardContent(_ref2) {
|
|
|
3380
3390
|
var SectionTagborderColor = rgbToHex(borderColor);
|
|
3381
3391
|
var _config$localizationC = config.localizationConfig,
|
|
3382
3392
|
localizationConfig = _config$localizationC === void 0 ? {} : _config$localizationC;
|
|
3383
|
-
return /*#__PURE__*/
|
|
3393
|
+
return /*#__PURE__*/React__default["default"].createElement("div", null, /*#__PURE__*/React__default["default"].createElement(SectionTag, {
|
|
3384
3394
|
story: story,
|
|
3385
3395
|
borderColor: SectionTagborderColor
|
|
3386
|
-
}), /*#__PURE__*/
|
|
3396
|
+
}), /*#__PURE__*/React__default["default"].createElement(Headline, {
|
|
3387
3397
|
story: story,
|
|
3388
3398
|
headerLevel: headerLevel,
|
|
3389
3399
|
premiumStoryIconConfig: config
|
|
3390
|
-
}), /*#__PURE__*/
|
|
3400
|
+
}), /*#__PURE__*/React__default["default"].createElement(AuthorWithTime, {
|
|
3391
3401
|
config: localizationConfig,
|
|
3392
3402
|
story: story
|
|
3393
3403
|
}));
|
|
3394
3404
|
};
|
|
3395
3405
|
|
|
3396
3406
|
DefaultStoryCardContent.propTypes = {
|
|
3397
|
-
story:
|
|
3398
|
-
border:
|
|
3399
|
-
theme:
|
|
3400
|
-
isHorizontalMobile:
|
|
3401
|
-
headerLevel:
|
|
3402
|
-
borderColor:
|
|
3403
|
-
config:
|
|
3407
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
3408
|
+
border: PropTypes__default["default"].string,
|
|
3409
|
+
theme: PropTypes__default["default"].string,
|
|
3410
|
+
isHorizontalMobile: PropTypes__default["default"].bool,
|
|
3411
|
+
headerLevel: PropTypes__default["default"].string,
|
|
3412
|
+
borderColor: PropTypes__default["default"].string,
|
|
3413
|
+
config: PropTypes__default["default"].object
|
|
3404
3414
|
};
|
|
3405
3415
|
StorycardContent.propTypes = {
|
|
3406
|
-
story:
|
|
3407
|
-
children:
|
|
3408
|
-
theme:
|
|
3409
|
-
border:
|
|
3410
|
-
isHorizontalMobile:
|
|
3411
|
-
headerLevel:
|
|
3412
|
-
borderColor:
|
|
3413
|
-
config:
|
|
3416
|
+
story: PropTypes__default["default"].object.isRequired,
|
|
3417
|
+
children: PropTypes__default["default"].node,
|
|
3418
|
+
theme: PropTypes__default["default"].string,
|
|
3419
|
+
border: PropTypes__default["default"].string,
|
|
3420
|
+
isHorizontalMobile: PropTypes__default["default"].bool,
|
|
3421
|
+
headerLevel: PropTypes__default["default"].string,
|
|
3422
|
+
borderColor: PropTypes__default["default"].string,
|
|
3423
|
+
config: PropTypes__default["default"].object
|
|
3414
3424
|
};
|
|
3415
3425
|
|
|
3416
|
-
|
|
3426
|
+
exports.StorycardContent = StorycardContent;
|