@quintype/arrow 3.15.1-perf.2 → 3.15.1-perf.5
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/cjs/index.js +14589 -0
- package/package.json +1 -1
- package/atoms/Author/index.js +0 -2250
- package/atoms/Author/styles.arrow.css +0 -1
- package/atoms/AuthorWithTime/index.js +0 -2954
- package/atoms/AuthorWithTime/styles.arrow.css +0 -1
- package/atoms/CollectionName/index.js +0 -2334
- package/atoms/CollectionName/styles.arrow.css +0 -1
- package/atoms/ExtendedLoadMore/index-0519e570.js +0 -243
- package/atoms/ExtendedLoadMore/index-1256e453.js +0 -175
- package/atoms/ExtendedLoadMore/index-1e444d20.js +0 -990
- package/atoms/ExtendedLoadMore/index-4356ce04.js +0 -282
- package/atoms/ExtendedLoadMore/index-81eb3978.js +0 -86
- package/atoms/ExtendedLoadMore/index-aba6b278.js +0 -166
- package/atoms/ExtendedLoadMore/index-ad3c83c3.js +0 -3023
- package/atoms/ExtendedLoadMore/index-beed3a68.js +0 -240
- package/atoms/ExtendedLoadMore/index-c2f73d18.js +0 -199
- package/atoms/ExtendedLoadMore/index-c61a16dc.js +0 -350
- package/atoms/ExtendedLoadMore/index-d0f6c865.js +0 -181
- package/atoms/ExtendedLoadMore/index-e4cf9cb7.js +0 -223
- package/atoms/ExtendedLoadMore/index-fd651f70.js +0 -175
- package/atoms/ExtendedLoadMore/index.js +0 -5
- package/atoms/ExtendedLoadMore/styles.arrow.css +0 -1
- package/atoms/Headline/index.js +0 -2459
- package/atoms/Headline/styles.arrow.css +0 -1
- package/atoms/HeroImage/index.js +0 -2475
- package/atoms/HeroImage/styles.arrow.css +0 -1
- package/atoms/LoadmoreButton/index.js +0 -2268
- package/atoms/LoadmoreButton/styles.arrow.css +0 -1
- package/atoms/ScrollSnap/index.js +0 -2531
- package/atoms/ScrollSnap/styles.arrow.css +0 -1
- package/atoms/SectionTag/index.js +0 -2220
- package/atoms/SectionTag/styles.arrow.css +0 -1
- package/atoms/Subheadline/index.js +0 -2200
- package/atoms/Subheadline/styles.arrow.css +0 -1
- package/atoms/TimeStamp/index.js +0 -2661
- package/atoms/TimeStamp/styles.arrow.css +0 -1
- package/molecules/KeyEvents/index.js +0 -2968
- package/molecules/KeyEvents/styles.arrow.css +0 -1
- package/molecules/PageIntroductionCard/index.js +0 -2676
- package/molecules/PageIntroductionCard/styles.arrow.css +0 -1
- package/molecules/SocialShareTemplate/index.js +0 -3093
- package/molecules/SocialShareTemplate/styles.arrow.css +0 -1
- package/molecules/StoryCard/index.js +0 -3938
- package/molecules/StoryCard/styles.arrow.css +0 -1
- package/molecules/StoryElementCard/index.js +0 -5832
- package/molecules/StoryElementCard/styles.arrow.css +0 -1
- package/molecules/StorycardContent/index.js +0 -3416
- package/molecules/StorycardContent/styles.arrow.css +0 -1
- package/rows/AlternateCollectionFilter/index.js +0 -4744
- package/rows/AlternateCollectionFilter/styles.arrow.css +0 -1
- package/rows/AsideCollection/index.js +0 -4690
- package/rows/AsideCollection/styles.arrow.css +0 -1
- package/rows/AstrologyCollection/index.js +0 -4661
- package/rows/AstrologyCollection/styles.arrow.css +0 -1
- package/rows/AuthorIntroductionCard/index.js +0 -3520
- package/rows/AuthorIntroductionCard/styles.arrow.css +0 -1
- package/rows/AuthorsList/index.js +0 -3715
- package/rows/AuthorsList/styles.arrow.css +0 -1
- package/rows/CollectionFilter/index.js +0 -4834
- package/rows/CollectionFilter/styles.arrow.css +0 -1
- package/rows/ElevenStories/index.js +0 -4638
- package/rows/ElevenStories/styles.arrow.css +0 -1
- package/rows/FourColFiveStories/index.js +0 -4359
- package/rows/FourColFiveStories/styles.arrow.css +0 -1
- package/rows/FourColGrid/index.js +0 -4584
- package/rows/FourColGrid/styles.arrow.css +0 -1
- package/rows/FourColPortraitStories/index.js +0 -4617
- package/rows/FourColPortraitStories/styles.arrow.css +0 -1
- package/rows/FourColSixteenStories/index.js +0 -4375
- package/rows/FourColSixteenStories/styles.arrow.css +0 -1
- package/rows/FourColTwelveStories/index.js +0 -4335
- package/rows/FourColTwelveStories/styles.arrow.css +0 -1
- package/rows/FourStorySlider/index.js +0 -4743
- package/rows/FourStorySlider/styles.arrow.css +0 -1
- package/rows/FourStorySliderPortrait/index.js +0 -4746
- package/rows/FourStorySliderPortrait/styles.arrow.css +0 -1
- package/rows/FourTabbedBigStorySlider/index.js +0 -4505
- package/rows/FourTabbedBigStorySlider/styles.arrow.css +0 -1
- package/rows/FullScreenSlider/index.js +0 -4661
- package/rows/FullScreenSlider/styles.arrow.css +0 -1
- package/rows/HalfScreenSlider/index.js +0 -4514
- package/rows/HalfScreenSlider/styles.arrow.css +0 -1
- package/rows/ListComponent/index.js +0 -4462
- package/rows/ListComponent/styles.arrow.css +0 -1
- package/rows/Listicles/index.js +0 -3131
- package/rows/Listicles/styles.arrow.css +0 -1
- package/rows/MagazineEditions/index.js +0 -3142
- package/rows/MagazineEditions/styles.arrow.css +0 -1
- package/rows/MagazineHeaderCard/index.js +0 -3136
- package/rows/MagazineHeaderCard/styles.arrow.css +0 -1
- package/rows/MagazineWidget/index.js +0 -4514
- package/rows/MagazineWidget/styles.arrow.css +0 -1
- package/rows/OneColStoryList/index.js +0 -4670
- package/rows/OneColStoryList/styles.arrow.css +0 -1
- package/rows/OpinionCollection/index.js +0 -4037
- package/rows/OpinionCollection/styles.arrow.css +0 -1
- package/rows/SixColSixStories/index.js +0 -4515
- package/rows/SixColSixStories/styles.arrow.css +0 -1
- package/rows/StoryCollection/index.js +0 -4690
- package/rows/StoryCollection/styles.arrow.css +0 -1
- package/rows/TagIntroductionCard/index.js +0 -1901
- package/rows/TagIntroductionCard/styles.arrow.css +0 -1
- package/rows/ThreeColFlexStories/index.js +0 -4575
- package/rows/ThreeColFlexStories/styles.arrow.css +0 -1
- package/rows/ThreeColFourteenStories/index.js +0 -4283
- package/rows/ThreeColFourteenStories/styles.arrow.css +0 -1
- package/rows/ThreeColGrid/index.js +0 -4605
- package/rows/ThreeColGrid/styles.arrow.css +0 -1
- package/rows/ThreeColSevenStory/index.js +0 -4502
- package/rows/ThreeColSevenStory/styles.arrow.css +0 -1
- package/rows/ThreeColSixStories/index.js +0 -4485
- package/rows/ThreeColSixStories/styles.arrow.css +0 -1
- package/rows/ThreeColTwelveStories/index.js +0 -4380
- package/rows/ThreeColTwelveStories/styles.arrow.css +0 -1
- package/rows/TwoColFourStories/index.js +0 -4463
- package/rows/TwoColFourStories/styles.arrow.css +0 -1
- package/rows/TwoColFourStoryHighlight/index.js +0 -4456
- package/rows/TwoColFourStoryHighlight/styles.arrow.css +0 -1
- package/rows/TwoColSevenStories/index.js +0 -4490
- package/rows/TwoColSevenStories/styles.arrow.css +0 -1
- package/rows/TwoColSixStories/index.js +0 -4489
- package/rows/TwoColSixStories/styles.arrow.css +0 -1
- package/rows/TwoColTenStoriesSidebar/index.js +0 -4549
- package/rows/TwoColTenStoriesSidebar/styles.arrow.css +0 -1
- package/rows/TwoColThreeStories/index.js +0 -4436
- package/rows/TwoColThreeStories/styles.arrow.css +0 -1
- package/story-elements/AlsoRead/index.js +0 -2457
- package/story-elements/AlsoRead/styles.arrow.css +0 -1
- package/story-elements/Attachment/index.js +0 -2013
- package/story-elements/Attachment/styles.arrow.css +0 -1
- package/story-elements/BigFact/index.js +0 -1983
- package/story-elements/BigFact/styles.arrow.css +0 -1
- package/story-elements/BlockQuote/index.js +0 -2431
- package/story-elements/BlockQuote/styles.arrow.css +0 -1
- package/story-elements/Blurb/index.js +0 -2094
- package/story-elements/Blurb/styles.arrow.css +0 -1
- package/story-elements/Image/index.js +0 -2711
- package/story-elements/Image/styles.arrow.css +0 -1
- package/story-elements/ImageGallery/index.js +0 -2644
- package/story-elements/ImageGallery/styles.arrow.css +0 -1
- package/story-elements/ImageSlideshow/index.js +0 -2955
- package/story-elements/ImageSlideshow/styles.arrow.css +0 -1
- package/story-elements/QuestionAnswer/index.js +0 -2395
- package/story-elements/QuestionAnswer/styles.arrow.css +0 -1
- package/story-elements/Quote/index.js +0 -2012
- package/story-elements/Quote/styles.arrow.css +0 -1
- package/story-elements/Reference/index.js +0 -2006
- package/story-elements/Reference/styles.arrow.css +0 -1
- package/story-elements/StoryElement/index.js +0 -1779
- package/story-elements/Summary/index.js +0 -2036
- package/story-elements/Summary/styles.arrow.css +0 -1
- package/story-elements/Text/index.js +0 -2293
- package/story-elements/Text/styles.arrow.css +0 -1
- package/story-elements/Video/index.js +0 -1785
- package/story-elements/Video/styles.arrow.css +0 -1
- package/story-templates/ListicleStoryTemplate/index.js +0 -8442
- package/story-templates/ListicleStoryTemplate/styles.arrow.css +0 -1
- package/story-templates/LiveBlogStoryTemplate/index.js +0 -8618
- package/story-templates/LiveBlogStoryTemplate/styles.arrow.css +0 -1
- package/story-templates/PhotoStoryTemplate/index.js +0 -8420
- package/story-templates/PhotoStoryTemplate/styles.arrow.css +0 -1
- package/story-templates/TextStoryTemplate/index.js +0 -8493
- package/story-templates/TextStoryTemplate/styles.arrow.css +0 -1
- package/story-templates/VideoStoryTemplate/index.js +0 -8352
- package/story-templates/VideoStoryTemplate/styles.arrow.css +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.collection-name-m_collection__JD6sx{font-size:var(--arrow-fs-m);font-weight:var(--arrow-fw-bold);margin-bottom:var(--arrow-spacing-m)}@media (min-width:768px){.collection-name-m_collection__JD6sx{font-size:var(--arrow-fs-l);margin-bottom:var(--arrow-spacing-l)}}.collection-name-m_collection-borderLeft__3Dznk{align-items:baseline;display:flex}.collection-name-m_collection-borderLeft__3Dznk .collection-name-m_border-left__3_pYw{margin-right:var(--arrow-spacing-xs);min-width:5px;overflow:hidden;width:5px}.collection-name-m_collection-borderLeft__3Dznk .collection-name-m_border-left__3_pYw:before{content:"I";font-family:var(--arrow-sans-serif)}.collection-name-m_collection-borderBottomFull__Dkq3K{display:inline-block}.collection-name-m_collection-borderBottom__2rdQM{display:block}.collection-name-m_collection-crossLine__1sIpN{align-items:center;display:flex}.collection-name-m_collection-crossLine__1sIpN:before{border-top:1px solid var(--arrow-c-mono5);content:" ";flex:1 1 auto;margin-right:var(--arrow-spacing-l);position:relative}.collection-name-m_collection-crossLine__1sIpN:after{border-top:1px solid var(--arrow-c-mono5);content:" ";flex:1 1 auto;margin-left:var(--arrow-spacing-l);position:relative}html[dir=rtl] .collection-name-m_collection-borderLeft__3Dznk .collection-name-m_border-left__3_pYw{margin-left:var(--arrow-spacing-xs);margin-right:0}html[dir=rtl] .collection-name-m_collection-crossLine__1sIpN:before{margin-left:var(--arrow-spacing-l);margin-right:0}html[dir=rtl] .collection-name-m_collection-crossLine__1sIpN:after{margin-left:0;margin-right:var(--arrow-spacing-l)}.collection-name-m_border-bottom__1MnlV{height:4px;margin-top:var(--arrow-spacing-xxs);width:20px}.collection-name-m_collection-crossLine__1sIpN .collection-name-m_border-bottom__1MnlV{visibility:hidden}.collection-name-m_dark__nMe5H a,.collection-name-m_dark__nMe5H h2,.collection-name-m_dark__nMe5H h3,.collection-name-m_dark__nMe5H h5{color:var(--arrow-c-mono2)}.collection-name-m_light__1vFDN a,.collection-name-m_light__1vFDN h2,.collection-name-m_light__1vFDN h3,.collection-name-m_light__1vFDN h5{color:var(--arrow-c-invert-mono2)}
|
|
@@ -1,243 +0,0 @@
|
|
|
1
|
-
import { a as get_1, g as getTextColor, _ as _getClassName, t as truncate, i as isEmpty, r as rgbToHex } from './index-ad3c83c3.js';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { u as useStateValue, H as Headline, A as AuthorWithTime } from './index-1e444d20.js';
|
|
4
|
-
import PropTypes from 'prop-types';
|
|
5
|
-
import { H as HeroImage, S as SectionTag } from './index-c61a16dc.js';
|
|
6
|
-
|
|
7
|
-
var _styleModuleImportMap$1 = {
|
|
8
|
-
"./subheadline.m.css": {
|
|
9
|
-
"subheadline": "subheadline-m_subheadline__3fd7z",
|
|
10
|
-
"dark": "subheadline-m_dark__28u00",
|
|
11
|
-
"light": "subheadline-m_light__2YUOe"
|
|
12
|
-
}
|
|
13
|
-
};
|
|
14
|
-
var Subheadline = function Subheadline(_ref) {
|
|
15
|
-
var story = _ref.story,
|
|
16
|
-
_ref$truncateChars = _ref.truncateChars,
|
|
17
|
-
truncateChars = _ref$truncateChars === void 0 ? 200 : _ref$truncateChars,
|
|
18
|
-
lineClamp = _ref.lineClamp,
|
|
19
|
-
_ref$clazzName = _ref.clazzName,
|
|
20
|
-
clazzName = _ref$clazzName === void 0 ? "" : _ref$clazzName,
|
|
21
|
-
forceShowAtom = _ref.forceShowAtom,
|
|
22
|
-
showFullContent = _ref.showFullContent;
|
|
23
|
-
var config = useStateValue() || {};
|
|
24
|
-
var subheadline = forceShowAtom || get_1(config, ["showSubheadline"], true);
|
|
25
|
-
if (!subheadline) return null;
|
|
26
|
-
var textColor = getTextColor(config.theme);
|
|
27
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
28
|
-
style: {
|
|
29
|
-
WebkitLineClamp: lineClamp
|
|
30
|
-
},
|
|
31
|
-
"data-test-id": "subheadline",
|
|
32
|
-
className: ("p-alt arr--sub-headline arrow-component ".concat(clazzName) ? "p-alt arr--sub-headline arrow-component ".concat(clazzName) + " " : "") + _getClassName("subheadline ".concat(textColor), _styleModuleImportMap$1)
|
|
33
|
-
}, showFullContent || typeof lineClamp === "number" ? story.subheadline : truncate(story.subheadline, truncateChars, true));
|
|
34
|
-
};
|
|
35
|
-
Subheadline.propTypes = {
|
|
36
|
-
/** The Story Object from the API response */
|
|
37
|
-
story: PropTypes.object.isRequired,
|
|
38
|
-
// Restricts the number of lines for subheadline.
|
|
39
|
-
lineClamp: PropTypes.number,
|
|
40
|
-
|
|
41
|
-
/** Number of characters to truncate the subheadline */
|
|
42
|
-
truncateChars: PropTypes.number,
|
|
43
|
-
clazzName: PropTypes.string,
|
|
44
|
-
forceShowAtom: PropTypes.bool,
|
|
45
|
-
showFullContent: PropTypes.bool
|
|
46
|
-
};
|
|
47
|
-
Subheadline.defaultProps = {
|
|
48
|
-
forceShowAtom: false,
|
|
49
|
-
showFullContent: false
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
var _styleModuleImportMap = {
|
|
53
|
-
"./storycard.m.css": {
|
|
54
|
-
"author-timestamp-wrapper": "storycard-m_author-timestamp-wrapper__20yjp",
|
|
55
|
-
"default-card": "storycard-m_default-card__1-POn",
|
|
56
|
-
"horizontal-card": "storycard-m_horizontal-card___7afz",
|
|
57
|
-
"backgroung-img": "storycard-m_backgroung-img__1FMJT",
|
|
58
|
-
"content-overlap": "storycard-m_content-overlap__1yNHR",
|
|
59
|
-
"border-full": "storycard-m_border-full__1nhy7",
|
|
60
|
-
"light": "storycard-m_light__3EhXN",
|
|
61
|
-
"dark": "storycard-m_dark__2wCTq",
|
|
62
|
-
"border-bottom": "storycard-m_border-bottom__2_E-I",
|
|
63
|
-
"border-boxShadow": "storycard-m_border-boxShadow__2-k3Z",
|
|
64
|
-
"center-align": "storycard-m_center-align__1Sn8-",
|
|
65
|
-
"content-bottom": "storycard-m_content-bottom__1QHeC",
|
|
66
|
-
"content-full": "storycard-m_content-full__2zJmU",
|
|
67
|
-
"content-boxShadow": "storycard-m_content-boxShadow__2IAWZ",
|
|
68
|
-
"hero-image": "storycard-m_hero-image__1H3MB",
|
|
69
|
-
"right-padding": "storycard-m_right-padding__12-lQ",
|
|
70
|
-
"horizontal-mob": "storycard-m_horizontal-mob__17JG2",
|
|
71
|
-
"content": "storycard-m_content__1Q9vq",
|
|
72
|
-
"border-default": "storycard-m_border-default__PEZ1x",
|
|
73
|
-
"card": "storycard-m_card__KJwRa",
|
|
74
|
-
"horizontal-image-last": "storycard-m_horizontal-image-last__3o6LY"
|
|
75
|
-
}
|
|
76
|
-
};
|
|
77
|
-
var StoryCard = function StoryCard(_ref) {
|
|
78
|
-
var story = _ref.story,
|
|
79
|
-
children = _ref.children,
|
|
80
|
-
isHorizontal = _ref.isHorizontal,
|
|
81
|
-
aspectRatio = _ref.aspectRatio,
|
|
82
|
-
border = _ref.border,
|
|
83
|
-
useImageAsBackground = _ref.useImageAsBackground,
|
|
84
|
-
bgImgContentOverlap = _ref.bgImgContentOverlap,
|
|
85
|
-
theme = _ref.theme,
|
|
86
|
-
borderColor = _ref.borderColor,
|
|
87
|
-
isHorizontalMobile = _ref.isHorizontalMobile,
|
|
88
|
-
centerAlign = _ref.centerAlign,
|
|
89
|
-
headerLevel = _ref.headerLevel,
|
|
90
|
-
hideAuthorImage = _ref.hideAuthorImage,
|
|
91
|
-
prefix = _ref.prefix,
|
|
92
|
-
config = _ref.config,
|
|
93
|
-
isHorizontalWithImageLast = _ref.isHorizontalWithImageLast;
|
|
94
|
-
if (!story || isEmpty(story)) return /*#__PURE__*/React.createElement("div", null);
|
|
95
|
-
var borderOptions = ["default", "full", "bottom", "boxShadow"];
|
|
96
|
-
var borderTemplate = borderOptions.includes(border) ? "border-".concat(border) : ""; // TODO optimize conditions
|
|
97
|
-
|
|
98
|
-
var horizontalCardStyle = "default-card";
|
|
99
|
-
if (isHorizontal) horizontalCardStyle = "horizontal-card";else if (isHorizontalWithImageLast) horizontalCardStyle = "horizontal-image-last";
|
|
100
|
-
var bgImageClasses = useImageAsBackground ? "backgroung-img" : "";
|
|
101
|
-
var bgImgContentOverlapClass = bgImgContentOverlap ? "content-overlap" : "";
|
|
102
|
-
var textColor = getTextColor(theme);
|
|
103
|
-
var horizontalMobileClasses = isHorizontalMobile ? "horizontal-mob" : "";
|
|
104
|
-
var defaultStorycard = /*#__PURE__*/React.createElement(DefaultStoryCard, {
|
|
105
|
-
story: story,
|
|
106
|
-
aspectRatio: aspectRatio,
|
|
107
|
-
border: border,
|
|
108
|
-
isHorizontalMobile: isHorizontalMobile,
|
|
109
|
-
isHorizontal: isHorizontal,
|
|
110
|
-
centerAlign: centerAlign,
|
|
111
|
-
headerLevel: headerLevel,
|
|
112
|
-
borderColor: borderColor,
|
|
113
|
-
hideAuthorImage: hideAuthorImage,
|
|
114
|
-
prefix: prefix,
|
|
115
|
-
config: config,
|
|
116
|
-
isHorizontalWithImageLast: isHorizontalWithImageLast
|
|
117
|
-
});
|
|
118
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
119
|
-
"data-test-id": "story-card",
|
|
120
|
-
style: {
|
|
121
|
-
backgroundColor: theme,
|
|
122
|
-
color: textColor
|
|
123
|
-
},
|
|
124
|
-
className: "arr--story-card " + _getClassName("card ".concat(horizontalCardStyle, " ").concat(borderTemplate, " ").concat(textColor, " ").concat(bgImageClasses, " ").concat(bgImgContentOverlapClass, " ").concat(horizontalMobileClasses), _styleModuleImportMap)
|
|
125
|
-
}, children || defaultStorycard);
|
|
126
|
-
};
|
|
127
|
-
|
|
128
|
-
var DefaultStoryCard = function DefaultStoryCard(_ref2) {
|
|
129
|
-
var story = _ref2.story;
|
|
130
|
-
_ref2.border;
|
|
131
|
-
var isHorizontal = _ref2.isHorizontal,
|
|
132
|
-
aspectRatio = _ref2.aspectRatio,
|
|
133
|
-
headerLevel = _ref2.headerLevel,
|
|
134
|
-
_ref2$isHorizontalMob = _ref2.isHorizontalMobile,
|
|
135
|
-
isHorizontalMobile = _ref2$isHorizontalMob === void 0 ? false : _ref2$isHorizontalMob,
|
|
136
|
-
_ref2$centerAlign = _ref2.centerAlign,
|
|
137
|
-
centerAlign = _ref2$centerAlign === void 0 ? false : _ref2$centerAlign,
|
|
138
|
-
borderColor = _ref2.borderColor,
|
|
139
|
-
hideAuthorImage = _ref2.hideAuthorImage,
|
|
140
|
-
prefix = _ref2.prefix,
|
|
141
|
-
isHorizontalWithImageLast = _ref2.isHorizontalWithImageLast,
|
|
142
|
-
config = _ref2.config;
|
|
143
|
-
var alignment = centerAlign ? "center-align" : "";
|
|
144
|
-
var SectionTagborderColor = rgbToHex(borderColor);
|
|
145
|
-
var _config$localizationC = config.localizationConfig,
|
|
146
|
-
localizationConfig = _config$localizationC === void 0 ? {} : _config$localizationC;
|
|
147
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, isHorizontal ? /*#__PURE__*/React.createElement(HeroImage, {
|
|
148
|
-
config: config,
|
|
149
|
-
story: story,
|
|
150
|
-
isHorizontal: true,
|
|
151
|
-
isHorizontalMobile: isHorizontalMobile,
|
|
152
|
-
aspectRatio: aspectRatio
|
|
153
|
-
}) : isHorizontalWithImageLast ? /*#__PURE__*/React.createElement(HeroImage, {
|
|
154
|
-
config: config,
|
|
155
|
-
story: story,
|
|
156
|
-
isHorizontalWithImageLast: true,
|
|
157
|
-
isHorizontalMobile: isHorizontalMobile,
|
|
158
|
-
aspectRatio: aspectRatio
|
|
159
|
-
}) : /*#__PURE__*/React.createElement(HeroImage, {
|
|
160
|
-
story: story,
|
|
161
|
-
config: config,
|
|
162
|
-
isHorizontalMobile: isHorizontalMobile,
|
|
163
|
-
aspectRatio: aspectRatio
|
|
164
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
165
|
-
className: "arr--story-content " + _getClassName("content ".concat(alignment), _styleModuleImportMap)
|
|
166
|
-
}, /*#__PURE__*/React.createElement(SectionTag, {
|
|
167
|
-
story: story,
|
|
168
|
-
borderColor: SectionTagborderColor
|
|
169
|
-
}), /*#__PURE__*/React.createElement(Headline, {
|
|
170
|
-
story: story,
|
|
171
|
-
headerLevel: headerLevel,
|
|
172
|
-
premiumStoryIconConfig: config
|
|
173
|
-
}), /*#__PURE__*/React.createElement(AuthorWithTime, {
|
|
174
|
-
config: localizationConfig,
|
|
175
|
-
story: story,
|
|
176
|
-
isBottom: true,
|
|
177
|
-
prefix: prefix,
|
|
178
|
-
hideAuthorImage: hideAuthorImage
|
|
179
|
-
}), /*#__PURE__*/React.createElement(Subheadline, {
|
|
180
|
-
story: story
|
|
181
|
-
})));
|
|
182
|
-
};
|
|
183
|
-
|
|
184
|
-
DefaultStoryCard.propTypes = {
|
|
185
|
-
story: PropTypes.object.isRequired,
|
|
186
|
-
border: PropTypes.oneOfType([PropTypes.string]),
|
|
187
|
-
isBottom: PropTypes.bool,
|
|
188
|
-
isHorizontal: PropTypes.bool,
|
|
189
|
-
aspectRatio: PropTypes.oneOfType([PropTypes.array]),
|
|
190
|
-
isHorizontalMobile: PropTypes.bool,
|
|
191
|
-
centerAlign: PropTypes.bool,
|
|
192
|
-
headerLevel: PropTypes.string,
|
|
193
|
-
borderColor: PropTypes.string,
|
|
194
|
-
hideAuthorImage: PropTypes.bool,
|
|
195
|
-
prefix: PropTypes.string,
|
|
196
|
-
config: PropTypes.object,
|
|
197
|
-
isHorizontalWithImageLast: PropTypes.bool
|
|
198
|
-
};
|
|
199
|
-
StoryCard.propTypes = {
|
|
200
|
-
/** The Story Object from the API response */
|
|
201
|
-
story: PropTypes.object.isRequired,
|
|
202
|
-
children: PropTypes.node,
|
|
203
|
-
|
|
204
|
-
/** Flip the Story Card to Horizonal mode */
|
|
205
|
-
isHorizontal: PropTypes.bool,
|
|
206
|
-
|
|
207
|
-
/** Add border to the Story Card */
|
|
208
|
-
border: PropTypes.oneOfType([PropTypes.string]),
|
|
209
|
-
// story card with background image
|
|
210
|
-
useImageAsBackground: PropTypes.bool,
|
|
211
|
-
// story card content overlap with image
|
|
212
|
-
bgImgContentOverlap: PropTypes.bool,
|
|
213
|
-
|
|
214
|
-
/** add aspect ratio for hero image */
|
|
215
|
-
aspectRatio: PropTypes.oneOfType([PropTypes.array]),
|
|
216
|
-
|
|
217
|
-
/** add theme(dark /light/custom color) for storycard */
|
|
218
|
-
theme: PropTypes.string,
|
|
219
|
-
|
|
220
|
-
/** flip the story card mobile design horizontal */
|
|
221
|
-
isHorizontalMobile: PropTypes.bool,
|
|
222
|
-
// make content center align in desktop and left align in mobile
|
|
223
|
-
centerAlign: PropTypes.bool,
|
|
224
|
-
headerLevel: PropTypes.string,
|
|
225
|
-
borderColor: PropTypes.string,
|
|
226
|
-
// handle author image through storycard
|
|
227
|
-
hideAuthorImage: PropTypes.bool,
|
|
228
|
-
// handle author prefix through storycard
|
|
229
|
-
prefix: PropTypes.string,
|
|
230
|
-
config: PropTypes.object,
|
|
231
|
-
isHorizontalWithImageLast: PropTypes.bool
|
|
232
|
-
};
|
|
233
|
-
StoryCard.defaultProps = {
|
|
234
|
-
isHorizontal: false,
|
|
235
|
-
isHorizontalMobile: false,
|
|
236
|
-
border: "default",
|
|
237
|
-
theme: "",
|
|
238
|
-
centerAlign: false,
|
|
239
|
-
borderColor: "",
|
|
240
|
-
isHorizontalWithImageLast: false
|
|
241
|
-
};
|
|
242
|
-
|
|
243
|
-
export { StoryCard as S, Subheadline as a };
|
|
@@ -1,175 +0,0 @@
|
|
|
1
|
-
import React, { Fragment } from 'react';
|
|
2
|
-
import { g as getTextColor, a as get_1, l as getSlot, b as generateNavigateSlug, n as navigateTo } from './index-ad3c83c3.js';
|
|
3
|
-
import { S as StoryCard } from './index-0519e570.js';
|
|
4
|
-
import { H as HeroImage } from './index-c61a16dc.js';
|
|
5
|
-
import { S as StorycardContent } from './index-81eb3978.js';
|
|
6
|
-
import { C as CollectionName, S as StateProvider, L as LoadMoreTarget, P as ProgressiveHydration, a as LoadmoreButton } from './index-1e444d20.js';
|
|
7
|
-
import { collectionToStories } from '@quintype/components';
|
|
8
|
-
import PropTypes from 'prop-types';
|
|
9
|
-
import { useDispatch, useSelector } from 'react-redux';
|
|
10
|
-
import 'react-timeago';
|
|
11
|
-
import 'date-fns-tz';
|
|
12
|
-
import 'react-dom';
|
|
13
|
-
|
|
14
|
-
var loadMore = function loadMore(_ref) {
|
|
15
|
-
var isLoading = _ref.isLoading,
|
|
16
|
-
storyItems = _ref.storyItems,
|
|
17
|
-
getMoreStories = _ref.getMoreStories,
|
|
18
|
-
_ref$subsequentLoadCo = _ref.subsequentLoadCount,
|
|
19
|
-
subsequentLoadCount = _ref$subsequentLoadCo === void 0 ? 3 : _ref$subsequentLoadCo;
|
|
20
|
-
if (isLoading) return;
|
|
21
|
-
var limit = subsequentLoadCount;
|
|
22
|
-
var offset = storyItems.length;
|
|
23
|
-
getMoreStories(offset, limit);
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
var ThreeColGridBase = function ThreeColGridBase(_ref2) {
|
|
27
|
-
var collection = _ref2.collection,
|
|
28
|
-
_ref2$config = _ref2.config,
|
|
29
|
-
config = _ref2$config === void 0 ? {} : _ref2$config,
|
|
30
|
-
getMoreStories = _ref2.getMoreStories,
|
|
31
|
-
isLoadMoreVisible = _ref2.isLoadMoreVisible,
|
|
32
|
-
isLoading = _ref2.isLoading,
|
|
33
|
-
isolatedLoadMore = _ref2.isolatedLoadMore;
|
|
34
|
-
var _config$collectionNam = config.collectionNameBorderColor,
|
|
35
|
-
collectionNameBorderColor = _config$collectionNam === void 0 ? "" : _config$collectionNam,
|
|
36
|
-
_config$borderColor = config.borderColor,
|
|
37
|
-
borderColor = _config$borderColor === void 0 ? "" : _config$borderColor,
|
|
38
|
-
_config$theme = config.theme,
|
|
39
|
-
theme = _config$theme === void 0 ? "" : _config$theme,
|
|
40
|
-
_config$slotConfig = config.slotConfig,
|
|
41
|
-
slotConfig = _config$slotConfig === void 0 ? [] : _config$slotConfig,
|
|
42
|
-
_config$border = config.border,
|
|
43
|
-
border = _config$border === void 0 ? "" : _config$border,
|
|
44
|
-
_config$collectionNam2 = config.collectionNameTemplate,
|
|
45
|
-
collectionNameTemplate = _config$collectionNam2 === void 0 ? "" : _config$collectionNam2,
|
|
46
|
-
_config$footerSlotCon = config.footerSlotConfig,
|
|
47
|
-
footerSlotConfig = _config$footerSlotCon === void 0 ? {} : _config$footerSlotCon,
|
|
48
|
-
_config$footerButton = config.footerButton,
|
|
49
|
-
footerButton = _config$footerButton === void 0 ? "" : _config$footerButton,
|
|
50
|
-
_config$subsequentLoa = config.subsequentLoadCount,
|
|
51
|
-
subsequentLoadCount = _config$subsequentLoa === void 0 ? 3 : _config$subsequentLoa;
|
|
52
|
-
var storyItems = collectionToStories(collection);
|
|
53
|
-
if (!storyItems.length) return null;
|
|
54
|
-
var textColor = getTextColor(theme);
|
|
55
|
-
var footerSlot = footerSlotConfig.footerSlot;
|
|
56
|
-
var footerSlotComp = footerSlot ? footerSlot() : null;
|
|
57
|
-
|
|
58
|
-
var _get = get_1(slotConfig, [0], {}),
|
|
59
|
-
_get$type = _get.type,
|
|
60
|
-
type = _get$type === void 0 ? "" : _get$type,
|
|
61
|
-
component = _get.component;
|
|
62
|
-
|
|
63
|
-
var adWidgetSlot = type === "ad" || type === "widget" ? getSlot(type, component) : null;
|
|
64
|
-
var dispatch = useDispatch();
|
|
65
|
-
var qtConfig = useSelector(function (state) {
|
|
66
|
-
return get_1(state, ["qt", "config"], {});
|
|
67
|
-
});
|
|
68
|
-
|
|
69
|
-
var getLoadMore = function getLoadMore(opts) {
|
|
70
|
-
if (!isLoadMoreVisible) return null;
|
|
71
|
-
|
|
72
|
-
if (isolatedLoadMore) {
|
|
73
|
-
return /*#__PURE__*/React.createElement(LoadMoreTarget, {
|
|
74
|
-
collection: collection,
|
|
75
|
-
componentName: "ThreeColGrid",
|
|
76
|
-
offset: storyItems.length,
|
|
77
|
-
limit: subsequentLoadCount
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
var url = generateNavigateSlug(collection, qtConfig);
|
|
82
|
-
return /*#__PURE__*/React.createElement(ProgressiveHydration, null, /*#__PURE__*/React.createElement(LoadmoreButton, {
|
|
83
|
-
config: config,
|
|
84
|
-
collection: collection,
|
|
85
|
-
template: footerButton,
|
|
86
|
-
onClick: function onClick() {
|
|
87
|
-
return loadMore(opts);
|
|
88
|
-
},
|
|
89
|
-
navigate: function navigate() {
|
|
90
|
-
return navigateTo(dispatch, url);
|
|
91
|
-
},
|
|
92
|
-
qtConfig: qtConfig
|
|
93
|
-
}));
|
|
94
|
-
};
|
|
95
|
-
|
|
96
|
-
var storyCard = function storyCard(story) {
|
|
97
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
98
|
-
className: "three-col-m_cards__2HyyK"
|
|
99
|
-
}, /*#__PURE__*/React.createElement(StoryCard, {
|
|
100
|
-
story: story,
|
|
101
|
-
border: border,
|
|
102
|
-
theme: theme,
|
|
103
|
-
isHorizontalMobile: true,
|
|
104
|
-
config: config
|
|
105
|
-
}, /*#__PURE__*/React.createElement(HeroImage, {
|
|
106
|
-
aspectRatio: [[16, 9]],
|
|
107
|
-
story: story,
|
|
108
|
-
isHorizontalMobile: true
|
|
109
|
-
}), /*#__PURE__*/React.createElement(StorycardContent, {
|
|
110
|
-
theme: theme,
|
|
111
|
-
border: border,
|
|
112
|
-
story: story,
|
|
113
|
-
isHorizontalMobile: true,
|
|
114
|
-
borderColor: borderColor,
|
|
115
|
-
config: config
|
|
116
|
-
})));
|
|
117
|
-
};
|
|
118
|
-
|
|
119
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
120
|
-
className: "full-width-with-padding arrow-component",
|
|
121
|
-
"data-test-id": "three-col-grid",
|
|
122
|
-
style: {
|
|
123
|
-
backgroundColor: theme,
|
|
124
|
-
color: textColor
|
|
125
|
-
}
|
|
126
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
127
|
-
className: "three-col-m_three-col-grid__y7rZK"
|
|
128
|
-
}, /*#__PURE__*/React.createElement(CollectionName, {
|
|
129
|
-
collection: collection,
|
|
130
|
-
collectionNameTemplate: collectionNameTemplate,
|
|
131
|
-
collectionNameBorderColor: collectionNameBorderColor
|
|
132
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
133
|
-
className: "three-col-m_wrapper__20m5m"
|
|
134
|
-
}, storyItems.slice(0, 2).map(function (story, index) {
|
|
135
|
-
return /*#__PURE__*/React.createElement(Fragment, {
|
|
136
|
-
key: "story-3col1-".concat(index, "-").concat(get_1(story, ["id"], "0"))
|
|
137
|
-
}, storyCard(story));
|
|
138
|
-
}), storyItems.length < 2 && /*#__PURE__*/React.createElement("div", null), adWidgetSlot, storyItems.slice(2).map(function (story, index) {
|
|
139
|
-
return /*#__PURE__*/React.createElement(Fragment, {
|
|
140
|
-
key: "story-3col1-".concat(index, "-").concat(get_1(story, ["id"], "0"))
|
|
141
|
-
}, storyCard(story));
|
|
142
|
-
})), getLoadMore({
|
|
143
|
-
isLoading: isLoading,
|
|
144
|
-
storyItems: storyItems,
|
|
145
|
-
getMoreStories: getMoreStories,
|
|
146
|
-
subsequentLoadCount: subsequentLoadCount
|
|
147
|
-
}), footerSlotComp));
|
|
148
|
-
};
|
|
149
|
-
ThreeColGridBase.propTypes = {
|
|
150
|
-
/** collection is the array of objects which is returning by API */
|
|
151
|
-
collection: PropTypes.object.isRequired,
|
|
152
|
-
|
|
153
|
-
/** The config for the Row */
|
|
154
|
-
config: PropTypes.shape({
|
|
155
|
-
theme: PropTypes.string,
|
|
156
|
-
border: PropTypes.bool,
|
|
157
|
-
slotConfig: PropTypes.array,
|
|
158
|
-
footerButton: PropTypes.string,
|
|
159
|
-
collectionNameTemplate: PropTypes.string,
|
|
160
|
-
collectionNameBorderColor: PropTypes.string,
|
|
161
|
-
subsequentLoadCount: PropTypes.number
|
|
162
|
-
}),
|
|
163
|
-
getMoreStories: PropTypes.func,
|
|
164
|
-
isLoadMoreVisible: PropTypes.bool,
|
|
165
|
-
isLoading: PropTypes.bool,
|
|
166
|
-
isolatedLoadMore: PropTypes.bool
|
|
167
|
-
};
|
|
168
|
-
ThreeColGridBase.defaultProps = {
|
|
169
|
-
getMoreStories: function getMoreStories() {},
|
|
170
|
-
isLoadMoreVisible: true,
|
|
171
|
-
isLoading: false
|
|
172
|
-
};
|
|
173
|
-
var ThreeColGrid = StateProvider(ThreeColGridBase);
|
|
174
|
-
|
|
175
|
-
export { ThreeColGrid, ThreeColGridBase };
|