@quintype/arrow 3.15.1-perf.2 → 3.15.1-perf.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/atoms/Author/index.js +38 -29
- package/atoms/AuthorWithTime/index.js +83 -73
- package/atoms/CollectionName/index.js +40 -30
- package/atoms/ExtendedLoadMore/{index-d0f6c865.js → index-3976fac4.js} +59 -51
- package/atoms/ExtendedLoadMore/{index-1e444d20.js → index-3c4ac692.js} +243 -208
- package/atoms/ExtendedLoadMore/index-4ddfe28d.js +93 -0
- package/atoms/ExtendedLoadMore/{index-c61a16dc.js → index-5c8eda4a.js} +88 -80
- package/atoms/ExtendedLoadMore/{index-1256e453.js → index-6e083738.js} +60 -52
- package/atoms/ExtendedLoadMore/{index-fd651f70.js → index-6ecceae4.js} +58 -50
- package/atoms/ExtendedLoadMore/{index-4356ce04.js → index-9e0d32b7.js} +76 -68
- package/atoms/ExtendedLoadMore/{index-beed3a68.js → index-a5c95f84.js} +70 -62
- package/atoms/ExtendedLoadMore/{index-0519e570.js → index-b22f1843.js} +70 -62
- package/atoms/ExtendedLoadMore/{index-e4cf9cb7.js → index-b5936059.js} +72 -64
- package/atoms/ExtendedLoadMore/{index-aba6b278.js → index-bc129cb8.js} +57 -49
- package/atoms/ExtendedLoadMore/{index-ad3c83c3.js → index-e7cde739.js} +74 -46
- package/atoms/ExtendedLoadMore/{index-c2f73d18.js → index-fee73a14.js} +62 -54
- package/atoms/ExtendedLoadMore/index.js +13 -5
- package/atoms/ExtendedLoadMore/styles.arrow.css +1 -1
- package/atoms/Headline/index.js +85 -76
- package/atoms/HeroImage/index.js +69 -60
- package/atoms/LoadmoreButton/index.js +32 -23
- package/atoms/ScrollSnap/index.js +72 -63
- package/atoms/SectionTag/index.js +34 -25
- package/atoms/Subheadline/index.js +31 -22
- package/atoms/TimeStamp/index.js +34 -24
- package/molecules/KeyEvents/index.js +72 -61
- package/molecules/PageIntroductionCard/index.js +43 -34
- package/molecules/SocialShareTemplate/index.js +97 -88
- package/molecules/StoryCard/index.js +242 -232
- package/molecules/StoryElementCard/index.js +512 -483
- package/molecules/StorycardContent/index.js +172 -162
- package/package.json +1 -1
- package/rows/AlternateCollectionFilter/index.js +345 -333
- package/rows/AsideCollection/index.js +340 -328
- package/rows/AstrologyCollection/index.js +321 -309
- package/rows/AuthorIntroductionCard/index.js +157 -148
- package/rows/AuthorsList/index.js +184 -174
- package/rows/CollectionFilter/index.js +361 -349
- package/rows/ElevenStories/index.js +357 -346
- package/rows/FourColFiveStories/index.js +304 -274
- package/rows/FourColGrid/index.js +351 -321
- package/rows/FourColPortraitStories/index.js +357 -327
- package/rows/FourColSixteenStories/index.js +288 -277
- package/rows/FourColTwelveStories/index.js +315 -304
- package/rows/FourStorySlider/index.js +358 -347
- package/rows/FourStorySliderPortrait/index.js +359 -348
- package/rows/FourTabbedBigStorySlider/index.js +322 -311
- package/rows/FullScreenSlider/index.js +336 -325
- package/rows/HalfScreenSlider/index.js +308 -297
- package/rows/ListComponent/index.js +322 -311
- package/rows/Listicles/index.js +150 -139
- package/rows/MagazineEditions/index.js +104 -93
- package/rows/MagazineHeaderCard/index.js +104 -93
- package/rows/MagazineWidget/index.js +326 -315
- package/rows/OneColStoryList/index.js +365 -335
- package/rows/OpinionCollection/index.js +250 -220
- package/rows/SixColSixStories/index.js +333 -303
- package/rows/StoryCollection/index.js +340 -328
- package/rows/TagIntroductionCard/index.js +30 -21
- package/rows/ThreeColFlexStories/index.js +348 -318
- package/rows/ThreeColFourteenStories/index.js +285 -274
- package/rows/ThreeColGrid/index.js +352 -322
- package/rows/ThreeColSevenStory/index.js +322 -311
- package/rows/ThreeColSixStories/index.js +323 -312
- package/rows/ThreeColTwelveStories/index.js +302 -291
- package/rows/TwoColFourStories/index.js +316 -305
- package/rows/TwoColFourStoryHighlight/index.js +317 -306
- package/rows/TwoColSevenStories/index.js +322 -311
- package/rows/TwoColSixStories/index.js +316 -305
- package/rows/TwoColTenStoriesSidebar/index.js +338 -327
- package/rows/TwoColThreeStories/index.js +316 -305
- package/story-elements/AlsoRead/index.js +70 -61
- package/story-elements/Attachment/index.js +40 -31
- package/story-elements/BigFact/index.js +35 -26
- package/story-elements/BlockQuote/index.js +61 -51
- package/story-elements/Blurb/index.js +36 -27
- package/story-elements/Image/index.js +113 -86
- package/story-elements/ImageGallery/index.js +98 -71
- package/story-elements/ImageSlideshow/index.js +147 -120
- package/story-elements/QuestionAnswer/index.js +55 -46
- package/story-elements/Quote/index.js +37 -28
- package/story-elements/Reference/index.js +40 -31
- package/story-elements/StoryElement/index.js +28 -19
- package/story-elements/Summary/index.js +40 -31
- package/story-elements/Text/index.js +34 -25
- package/story-elements/Video/index.js +29 -20
- package/story-templates/ListicleStoryTemplate/index.js +937 -908
- package/story-templates/LiveBlogStoryTemplate/index.js +942 -913
- package/story-templates/PhotoStoryTemplate/index.js +912 -883
- package/story-templates/TextStoryTemplate/index.js +931 -902
- package/story-templates/VideoStoryTemplate/index.js +897 -868
- package/atoms/ExtendedLoadMore/index-81eb3978.js +0 -86
|
@@ -1,9 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var React = require('react');
|
|
6
|
+
var PropTypes = require('prop-types');
|
|
7
|
+
var reactRedux = require('react-redux');
|
|
8
|
+
var components = require('@quintype/components');
|
|
9
|
+
var Timeago = require('react-timeago');
|
|
10
|
+
var dateFnsTz = require('date-fns-tz');
|
|
11
|
+
|
|
12
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
13
|
+
|
|
14
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
15
|
+
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
16
|
+
var Timeago__default = /*#__PURE__*/_interopDefaultLegacy(Timeago);
|
|
7
17
|
|
|
8
18
|
function _defineProperty(obj, key, value) {
|
|
9
19
|
if (key in obj) {
|
|
@@ -2627,15 +2637,15 @@ var getSlug = function getSlug(collection) {
|
|
|
2627
2637
|
|
|
2628
2638
|
return "/collection/".concat(collection.slug);
|
|
2629
2639
|
};
|
|
2630
|
-
|
|
2631
|
-
"sketches-host":
|
|
2632
|
-
"cdn-name":
|
|
2633
|
-
"cdn-image":
|
|
2640
|
+
PropTypes__default["default"].shape({
|
|
2641
|
+
"sketches-host": PropTypes__default["default"].string,
|
|
2642
|
+
"cdn-name": PropTypes__default["default"].string,
|
|
2643
|
+
"cdn-image": PropTypes__default["default"].string
|
|
2634
2644
|
});
|
|
2635
|
-
|
|
2636
|
-
headline:
|
|
2637
|
-
"last-published-at":
|
|
2638
|
-
subheadline:
|
|
2645
|
+
PropTypes__default["default"].shape({
|
|
2646
|
+
headline: PropTypes__default["default"].string,
|
|
2647
|
+
"last-published-at": PropTypes__default["default"].number,
|
|
2648
|
+
subheadline: PropTypes__default["default"].string
|
|
2639
2649
|
});
|
|
2640
2650
|
var navigateTo = function navigateTo(dispatch) {
|
|
2641
2651
|
var url = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
|
|
@@ -2675,17 +2685,17 @@ var getTimeStamp = function getTimeStamp(date, _formatter) {
|
|
|
2675
2685
|
var timezone = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;
|
|
2676
2686
|
|
|
2677
2687
|
if (timezone && template === "story") {
|
|
2678
|
-
var zonedTime = timezone && utcToZonedTime(date, timezone);
|
|
2679
|
-
var formatZonedTime = zonedTime && format(zonedTime, "yyyy-MM-dd'T'HH:mm:ssXXX", {
|
|
2688
|
+
var zonedTime = timezone && dateFnsTz.utcToZonedTime(date, timezone);
|
|
2689
|
+
var formatZonedTime = zonedTime && dateFnsTz.format(zonedTime, "yyyy-MM-dd'T'HH:mm:ssXXX", {
|
|
2680
2690
|
timeZone: timezone
|
|
2681
2691
|
});
|
|
2682
2692
|
var timeStamp = timestampToFormat("", "", "", date, config);
|
|
2683
|
-
return /*#__PURE__*/
|
|
2693
|
+
return /*#__PURE__*/React__default["default"].createElement("time", {
|
|
2684
2694
|
dateTime: formatZonedTime
|
|
2685
2695
|
}, timeStamp);
|
|
2686
2696
|
}
|
|
2687
2697
|
|
|
2688
|
-
return /*#__PURE__*/
|
|
2698
|
+
return /*#__PURE__*/React__default["default"].createElement(Timeago__default["default"], {
|
|
2689
2699
|
date: date,
|
|
2690
2700
|
formatter: function formatter(value, unit, suffix, date) {
|
|
2691
2701
|
return _formatter(value, unit, suffix, date, config);
|
|
@@ -2700,27 +2710,27 @@ var ImageFallbackIcon = function ImageFallbackIcon(_ref) {
|
|
|
2700
2710
|
height = _ref$height === void 0 ? 30 : _ref$height,
|
|
2701
2711
|
_ref$iconColor = _ref.iconColor,
|
|
2702
2712
|
iconColor = _ref$iconColor === void 0 ? "#99B0CB" : _ref$iconColor;
|
|
2703
|
-
return /*#__PURE__*/
|
|
2713
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
2704
2714
|
width: width,
|
|
2705
2715
|
height: height,
|
|
2706
2716
|
viewBox: "0 0 102 76",
|
|
2707
2717
|
version: "1.1"
|
|
2708
|
-
}, /*#__PURE__*/
|
|
2718
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
2709
2719
|
id: "demo-home-copy",
|
|
2710
2720
|
stroke: "none",
|
|
2711
2721
|
strokeWidth: "1",
|
|
2712
2722
|
fill: "none",
|
|
2713
2723
|
fillRule: "evenodd",
|
|
2714
2724
|
transform: "translate(-377.000000, -314.000000)"
|
|
2715
|
-
}, /*#__PURE__*/
|
|
2725
|
+
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
2716
2726
|
id: "Group-13",
|
|
2717
2727
|
transform: "translate(377.000000, 314.000000)"
|
|
2718
|
-
}, /*#__PURE__*/
|
|
2728
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
2719
2729
|
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",
|
|
2720
2730
|
id: "Combined-Shape",
|
|
2721
2731
|
fill: iconColor,
|
|
2722
2732
|
fillRule: "nonzero"
|
|
2723
|
-
}), /*#__PURE__*/
|
|
2733
|
+
}), /*#__PURE__*/React__default["default"].createElement("rect", {
|
|
2724
2734
|
id: "Rectangle-19",
|
|
2725
2735
|
stroke: iconColor,
|
|
2726
2736
|
strokeWidth: "3",
|
|
@@ -2732,24 +2742,24 @@ var ImageFallbackIcon = function ImageFallbackIcon(_ref) {
|
|
|
2732
2742
|
}))));
|
|
2733
2743
|
};
|
|
2734
2744
|
ImageFallbackIcon.propTypes = {
|
|
2735
|
-
width:
|
|
2736
|
-
height:
|
|
2737
|
-
iconColor:
|
|
2745
|
+
width: PropTypes__default["default"].object,
|
|
2746
|
+
height: PropTypes__default["default"].object,
|
|
2747
|
+
iconColor: PropTypes__default["default"].object
|
|
2738
2748
|
};
|
|
2739
2749
|
|
|
2740
2750
|
var imageFallback = function imageFallback() {
|
|
2741
|
-
return /*#__PURE__*/
|
|
2751
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2742
2752
|
className: "arr--fallback-image fallback-m_image__1GYCJ fallback-m_image-position__3KddP"
|
|
2743
|
-
}, /*#__PURE__*/
|
|
2753
|
+
}, /*#__PURE__*/React__default["default"].createElement("figure", {
|
|
2744
2754
|
className: "arr--fallback-svg fallback-m_fallback-svg__tK9fL"
|
|
2745
|
-
}, /*#__PURE__*/
|
|
2755
|
+
}, /*#__PURE__*/React__default["default"].createElement(ImageFallbackIcon, null)));
|
|
2746
2756
|
};
|
|
2747
2757
|
|
|
2748
2758
|
var FallbackImage = function FallbackImage(_ref) {
|
|
2749
2759
|
var slug = _ref.slug;
|
|
2750
2760
|
|
|
2751
2761
|
if (slug) {
|
|
2752
|
-
return /*#__PURE__*/
|
|
2762
|
+
return /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
2753
2763
|
href: slug,
|
|
2754
2764
|
"aria-label": "image-fallback"
|
|
2755
2765
|
}, imageFallback());
|
|
@@ -2758,7 +2768,7 @@ var FallbackImage = function FallbackImage(_ref) {
|
|
|
2758
2768
|
}
|
|
2759
2769
|
};
|
|
2760
2770
|
FallbackImage.propTypes = {
|
|
2761
|
-
slug:
|
|
2771
|
+
slug: PropTypes__default["default"].string
|
|
2762
2772
|
};
|
|
2763
2773
|
|
|
2764
2774
|
var MagazineCoverImageCard = function MagazineCoverImageCard(_ref) {
|
|
@@ -2773,14 +2783,14 @@ var MagazineCoverImageCard = function MagazineCoverImageCard(_ref) {
|
|
|
2773
2783
|
covers3Key = coverImageData["cover-image-s3-key"],
|
|
2774
2784
|
coverImageMetaData = coverImageData["cover-image-metadata"];
|
|
2775
2785
|
var slug = magazineSlug && collection && getSlug(collection, config);
|
|
2776
|
-
return /*#__PURE__*/
|
|
2786
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2777
2787
|
className: "arr--magazine-cover-img magazine-cover-image-m_cover-image__1McI_"
|
|
2778
|
-
}, covers3Key || coverUrl ? /*#__PURE__*/
|
|
2788
|
+
}, covers3Key || coverUrl ? /*#__PURE__*/React__default["default"].createElement("figure", {
|
|
2779
2789
|
className: "magazine-cover-image-m_image__3-ZtB"
|
|
2780
|
-
}, covers3Key ? /*#__PURE__*/
|
|
2790
|
+
}, covers3Key ? /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
2781
2791
|
href: slug,
|
|
2782
2792
|
"aria-label": "magazine-cover-image"
|
|
2783
|
-
}, /*#__PURE__*/
|
|
2793
|
+
}, /*#__PURE__*/React__default["default"].createElement(components.LazyLoadImages, null, /*#__PURE__*/React__default["default"].createElement(components.ResponsiveImage, {
|
|
2784
2794
|
slug: covers3Key,
|
|
2785
2795
|
aspectRatio: [1, 2],
|
|
2786
2796
|
metadata: {
|
|
@@ -2791,43 +2801,43 @@ var MagazineCoverImageCard = function MagazineCoverImageCard(_ref) {
|
|
|
2791
2801
|
auto: ["format", "compress"]
|
|
2792
2802
|
},
|
|
2793
2803
|
alt: imgAltText
|
|
2794
|
-
}))) : /*#__PURE__*/
|
|
2804
|
+
}))) : /*#__PURE__*/React__default["default"].createElement("img", {
|
|
2795
2805
|
src: coverUrl,
|
|
2796
2806
|
alt: "cover-image",
|
|
2797
2807
|
loading: "lazy"
|
|
2798
|
-
})) : /*#__PURE__*/
|
|
2808
|
+
})) : /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2799
2809
|
className: "magazine-cover-image-m_fallback-img__cyAjK"
|
|
2800
|
-
}, /*#__PURE__*/
|
|
2810
|
+
}, /*#__PURE__*/React__default["default"].createElement(FallbackImage, {
|
|
2801
2811
|
slug: slug
|
|
2802
2812
|
})));
|
|
2803
2813
|
};
|
|
2804
2814
|
MagazineCoverImageCard.propTypes = {
|
|
2805
|
-
collection:
|
|
2806
|
-
"cover-image-url":
|
|
2807
|
-
"cover-image-s3-key":
|
|
2808
|
-
"cover-image-metadata":
|
|
2809
|
-
slug:
|
|
2815
|
+
collection: PropTypes__default["default"].shape({
|
|
2816
|
+
"cover-image-url": PropTypes__default["default"].string,
|
|
2817
|
+
"cover-image-s3-key": PropTypes__default["default"].string,
|
|
2818
|
+
"cover-image-metadata": PropTypes__default["default"].string,
|
|
2819
|
+
slug: PropTypes__default["default"].string
|
|
2810
2820
|
}),
|
|
2811
|
-
config:
|
|
2812
|
-
magazineSlug:
|
|
2821
|
+
config: PropTypes__default["default"].shape({
|
|
2822
|
+
magazineSlug: PropTypes__default["default"].string
|
|
2813
2823
|
})
|
|
2814
2824
|
};
|
|
2815
2825
|
|
|
2816
|
-
var StateContext = /*#__PURE__*/createContext(); // eslint-disable-next-line react/display-name
|
|
2826
|
+
var StateContext = /*#__PURE__*/React.createContext(); // eslint-disable-next-line react/display-name
|
|
2817
2827
|
|
|
2818
2828
|
var StateProvider = function StateProvider(RowComponent) {
|
|
2819
2829
|
return function (props) {
|
|
2820
2830
|
return (
|
|
2821
2831
|
/*#__PURE__*/
|
|
2822
2832
|
// eslint-disable-next-line react/prop-types
|
|
2823
|
-
|
|
2833
|
+
React__default["default"].createElement(StateContext.Provider, {
|
|
2824
2834
|
value: props.config
|
|
2825
|
-
}, /*#__PURE__*/
|
|
2835
|
+
}, /*#__PURE__*/React__default["default"].createElement(RowComponent, props))
|
|
2826
2836
|
);
|
|
2827
2837
|
};
|
|
2828
2838
|
};
|
|
2829
2839
|
var useStateValue = function useStateValue() {
|
|
2830
|
-
return useContext(StateContext);
|
|
2840
|
+
return React.useContext(StateContext);
|
|
2831
2841
|
};
|
|
2832
2842
|
|
|
2833
2843
|
var _styleModuleImportMap$2 = {
|
|
@@ -2866,7 +2876,7 @@ var CollectionNameBase = function CollectionNameBase(_ref) {
|
|
|
2866
2876
|
var borderBottomFullStyle = templateStyle.includes("collection-borderBottomFull") ? "4px solid ".concat(CollectionNameBorderColor) : "";
|
|
2867
2877
|
|
|
2868
2878
|
var borderBottomStyle = function borderBottomStyle() {
|
|
2869
|
-
return templateStyle.includes("collection-borderBottom") && !templateStyle.includes("collection-borderBottomFull") ? /*#__PURE__*/
|
|
2879
|
+
return templateStyle.includes("collection-borderBottom") && !templateStyle.includes("collection-borderBottomFull") ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2870
2880
|
className: "collection-name-m_border-bottom__1MnlV",
|
|
2871
2881
|
style: {
|
|
2872
2882
|
borderBottom: "4px solid ".concat(CollectionNameBorderColor)
|
|
@@ -2926,40 +2936,40 @@ var CollectionNameBase = function CollectionNameBase(_ref) {
|
|
|
2926
2936
|
}
|
|
2927
2937
|
};
|
|
2928
2938
|
|
|
2929
|
-
return /*#__PURE__*/
|
|
2939
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, showRowTitle && collectionName && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2930
2940
|
style: {
|
|
2931
2941
|
borderBottom: borderBottomFullStyle
|
|
2932
2942
|
},
|
|
2933
2943
|
"data-test-id": "collection-name",
|
|
2934
2944
|
className: ("arr--collection-name arrow-component ".concat(templateStyle) ? "arr--collection-name arrow-component ".concat(templateStyle) + " " : "") + _getClassName("collection ".concat(textColor, " ").concat(templateStyle), _styleModuleImportMap$2)
|
|
2935
|
-
}, templateStyle.includes("collection-borderLeft") && /*#__PURE__*/
|
|
2945
|
+
}, templateStyle.includes("collection-borderLeft") && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
2936
2946
|
className: "arr-collection-name-border-left collection-name-m_border-left__3_pYw",
|
|
2937
2947
|
style: {
|
|
2938
2948
|
color: CollectionNameBorderColor,
|
|
2939
2949
|
fontSize: getBorderHeight()
|
|
2940
2950
|
}
|
|
2941
|
-
}), slug && !slug.includes(undefined) ? /*#__PURE__*/
|
|
2951
|
+
}), slug && !slug.includes(undefined) ? /*#__PURE__*/React__default["default"].createElement(components.Link, {
|
|
2942
2952
|
href: slug,
|
|
2943
2953
|
"aria-label": "collection-name"
|
|
2944
|
-
}, /*#__PURE__*/
|
|
2954
|
+
}, /*#__PURE__*/React__default["default"].createElement(HeaderTag, null, collectionName)) : /*#__PURE__*/React__default["default"].createElement(HeaderTag, null, collectionName), borderBottomStyle()));
|
|
2945
2955
|
};
|
|
2946
2956
|
CollectionNameBase.propTypes = {
|
|
2947
2957
|
/** Collection name border color */
|
|
2948
|
-
collectionNameBorderColor: PropTypes
|
|
2958
|
+
collectionNameBorderColor: PropTypes.PropTypes.string,
|
|
2949
2959
|
|
|
2950
2960
|
/** The Collection Object from the API response */
|
|
2951
|
-
collection: PropTypes
|
|
2961
|
+
collection: PropTypes.PropTypes.object,
|
|
2952
2962
|
|
|
2953
2963
|
/** The publisher config from the API response */
|
|
2954
|
-
config: PropTypes
|
|
2964
|
+
config: PropTypes.PropTypes.object,
|
|
2955
2965
|
|
|
2956
2966
|
/** The style template for the component */
|
|
2957
|
-
collectionNameTemplate: PropTypes
|
|
2967
|
+
collectionNameTemplate: PropTypes.PropTypes.oneOf(["", "borderLeft", "borderBottom", "crossLine", "borderBottomFull"]),
|
|
2958
2968
|
|
|
2959
2969
|
/** Header tags ranging h1-h6, where h[headerLevel] */
|
|
2960
|
-
headerLevel: PropTypes
|
|
2961
|
-
customCollectionName: PropTypes
|
|
2962
|
-
navigate: PropTypes
|
|
2970
|
+
headerLevel: PropTypes.PropTypes.string,
|
|
2971
|
+
customCollectionName: PropTypes.PropTypes.string,
|
|
2972
|
+
navigate: PropTypes.PropTypes.bool
|
|
2963
2973
|
};
|
|
2964
2974
|
CollectionNameBase.defaultProps = {
|
|
2965
2975
|
collectionNameTemplate: "",
|
|
@@ -2972,7 +2982,7 @@ function mapStateToProps(state) {
|
|
|
2972
2982
|
};
|
|
2973
2983
|
}
|
|
2974
2984
|
|
|
2975
|
-
var CollectionName = connect(mapStateToProps)(CollectionNameBase);
|
|
2985
|
+
var CollectionName = reactRedux.connect(mapStateToProps)(CollectionNameBase);
|
|
2976
2986
|
|
|
2977
2987
|
var _styleModuleImportMap$1 = {
|
|
2978
2988
|
"./load-more.m.css": {
|
|
@@ -3006,26 +3016,26 @@ var LoadmoreButton = function LoadmoreButton(_ref) {
|
|
|
3006
3016
|
if (!showButton) return null;
|
|
3007
3017
|
var textColor = getTextColor(theme);
|
|
3008
3018
|
var slug = customUrlPath ? "/".concat(customUrlPath) : generateNavigateSlug(collection, _objectSpread$1(_objectSpread$1({}, qtConfig), config));
|
|
3009
|
-
return template === "SubsequentLoadCount" ? /*#__PURE__*/
|
|
3019
|
+
return template === "SubsequentLoadCount" ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3010
3020
|
onClick: onClick,
|
|
3011
3021
|
"data-test-id": "load-more",
|
|
3012
3022
|
className: "arr--button " + _getClassName("button ".concat(textColor, " default"), _styleModuleImportMap$1)
|
|
3013
|
-
}, buttonText) : /*#__PURE__*/
|
|
3023
|
+
}, buttonText) : /*#__PURE__*/React__default["default"].createElement(components.LinkBase, {
|
|
3014
3024
|
href: slug,
|
|
3015
3025
|
navigateTo: navigate,
|
|
3016
3026
|
"data-test-id": "load-more",
|
|
3017
3027
|
"aria-label": "load-more"
|
|
3018
|
-
}, /*#__PURE__*/
|
|
3028
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3019
3029
|
className: "arr--button " + _getClassName("button ".concat(textColor, " default"), _styleModuleImportMap$1)
|
|
3020
3030
|
}, buttonText));
|
|
3021
3031
|
};
|
|
3022
3032
|
LoadmoreButton.propTypes = {
|
|
3023
|
-
collection:
|
|
3024
|
-
template:
|
|
3025
|
-
config:
|
|
3026
|
-
onClick:
|
|
3027
|
-
navigate:
|
|
3028
|
-
qtConfig:
|
|
3033
|
+
collection: PropTypes__default["default"].object,
|
|
3034
|
+
template: PropTypes__default["default"].string,
|
|
3035
|
+
config: PropTypes__default["default"].object,
|
|
3036
|
+
onClick: PropTypes__default["default"].func,
|
|
3037
|
+
navigate: PropTypes__default["default"].func,
|
|
3038
|
+
qtConfig: PropTypes__default["default"].object
|
|
3029
3039
|
};
|
|
3030
3040
|
|
|
3031
3041
|
var _styleModuleImportMap = {
|
|
@@ -3071,26 +3081,26 @@ var MagazineEditionsBase = function MagazineEditionsBase(_ref) {
|
|
|
3071
3081
|
var issues = collection.map(function (issue) {
|
|
3072
3082
|
return issue.collection;
|
|
3073
3083
|
}) || [];
|
|
3074
|
-
var qtConfig = useSelector(function (state) {
|
|
3084
|
+
var qtConfig = reactRedux.useSelector(function (state) {
|
|
3075
3085
|
return get_1(state, ["qt", "config"], {});
|
|
3076
3086
|
});
|
|
3077
|
-
var dispatch = useDispatch();
|
|
3087
|
+
var dispatch = reactRedux.useDispatch();
|
|
3078
3088
|
var url = generateNavigateSlug(collection, _objectSpread(_objectSpread({}, qtConfig), config));
|
|
3079
|
-
return /*#__PURE__*/
|
|
3089
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3080
3090
|
className: "full-width-with-padding arrow-component arr-magazine-issues",
|
|
3081
3091
|
style: {
|
|
3082
3092
|
backgroundColor: theme,
|
|
3083
3093
|
color: textColor
|
|
3084
3094
|
},
|
|
3085
3095
|
"data-test-id": "editions"
|
|
3086
|
-
}, /*#__PURE__*/
|
|
3096
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3087
3097
|
className: _getClassName("container ".concat(textColor), _styleModuleImportMap)
|
|
3088
|
-
}, showRowTitle && /*#__PURE__*/
|
|
3098
|
+
}, showRowTitle && /*#__PURE__*/React__default["default"].createElement(CollectionName, {
|
|
3089
3099
|
collection: issues,
|
|
3090
3100
|
collectionNameTemplate: collectionNameTemplate,
|
|
3091
3101
|
customCollectionName: rowTitle,
|
|
3092
3102
|
navigate: false
|
|
3093
|
-
}), /*#__PURE__*/
|
|
3103
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3094
3104
|
className: "magazine-editions-m_issues__3uAxC"
|
|
3095
3105
|
}, issues.slice(0, limit).map(function (issue, index) {
|
|
3096
3106
|
var name = issue.name,
|
|
@@ -3101,19 +3111,19 @@ var MagazineEditionsBase = function MagazineEditionsBase(_ref) {
|
|
|
3101
3111
|
isUpperCase: true,
|
|
3102
3112
|
disableMeridiem: true
|
|
3103
3113
|
};
|
|
3104
|
-
return /*#__PURE__*/
|
|
3114
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3105
3115
|
key: index,
|
|
3106
3116
|
"data-test-id": "current-issue-".concat(index)
|
|
3107
|
-
}, /*#__PURE__*/
|
|
3117
|
+
}, /*#__PURE__*/React__default["default"].createElement(MagazineCoverImageCard, {
|
|
3108
3118
|
collection: issue,
|
|
3109
3119
|
config: _objectSpread(_objectSpread({}, config), {}, {
|
|
3110
3120
|
isArchivePage: false
|
|
3111
3121
|
})
|
|
3112
|
-
}), /*#__PURE__*/
|
|
3122
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3113
3123
|
className: "magazine-editions-m_date__3Pk-s",
|
|
3114
3124
|
"data-test-id": "issue-label"
|
|
3115
3125
|
}, editionNameFormat === "magazineTitle" ? name : getTimeStamp(date, timestampToFormat, timeStampConfig)));
|
|
3116
|
-
})), showLoadmore && /*#__PURE__*/
|
|
3126
|
+
})), showLoadmore && /*#__PURE__*/React__default["default"].createElement(LoadmoreButton, {
|
|
3117
3127
|
onClick: onClick,
|
|
3118
3128
|
template: template,
|
|
3119
3129
|
config: config,
|
|
@@ -3124,19 +3134,20 @@ var MagazineEditionsBase = function MagazineEditionsBase(_ref) {
|
|
|
3124
3134
|
})));
|
|
3125
3135
|
};
|
|
3126
3136
|
MagazineEditionsBase.propTypes = {
|
|
3127
|
-
collection:
|
|
3128
|
-
config:
|
|
3129
|
-
rowTitle:
|
|
3130
|
-
collectionNameTemplate:
|
|
3131
|
-
collectionNameBorderColor:
|
|
3132
|
-
theme:
|
|
3133
|
-
editionNameFormat:
|
|
3134
|
-
showRowTitle:
|
|
3137
|
+
collection: PropTypes__default["default"].array,
|
|
3138
|
+
config: PropTypes__default["default"].shape({
|
|
3139
|
+
rowTitle: PropTypes__default["default"].string,
|
|
3140
|
+
collectionNameTemplate: PropTypes__default["default"].string,
|
|
3141
|
+
collectionNameBorderColor: PropTypes__default["default"].string,
|
|
3142
|
+
theme: PropTypes__default["default"].string,
|
|
3143
|
+
editionNameFormat: PropTypes__default["default"].string,
|
|
3144
|
+
showRowTitle: PropTypes__default["default"].bool
|
|
3135
3145
|
}),
|
|
3136
|
-
onClick:
|
|
3137
|
-
limit:
|
|
3138
|
-
showLoadmore:
|
|
3146
|
+
onClick: PropTypes__default["default"].func,
|
|
3147
|
+
limit: PropTypes__default["default"].number,
|
|
3148
|
+
showLoadmore: PropTypes__default["default"].bool
|
|
3139
3149
|
};
|
|
3140
3150
|
var MagazineEditions = StateProvider(MagazineEditionsBase);
|
|
3141
3151
|
|
|
3142
|
-
|
|
3152
|
+
exports.MagazineEditions = MagazineEditions;
|
|
3153
|
+
exports.MagazineEditionsBase = MagazineEditionsBase;
|