@quintype/arrow 3.15.1-fallback-support.1 → 3.15.1-perf.1
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 +2250 -0
- package/{Author → atoms/Author}/styles.arrow.css +0 -0
- package/atoms/AuthorWithTime/index.js +2954 -0
- package/{AuthorWithTime → atoms/AuthorWithTime}/styles.arrow.css +0 -0
- package/atoms/CollectionName/index.js +2334 -0
- package/{CollectionName → atoms/CollectionName}/styles.arrow.css +0 -0
- package/atoms/ExtendedLoadMore/index-2d713010.js +166 -0
- package/atoms/ExtendedLoadMore/index-4191a84c.js +240 -0
- package/atoms/ExtendedLoadMore/index-5a7900ba.js +181 -0
- package/atoms/ExtendedLoadMore/index-6cb56d1a.js +350 -0
- package/atoms/ExtendedLoadMore/index-6daa674c.js +282 -0
- package/atoms/ExtendedLoadMore/index-6f8c780e.js +243 -0
- package/atoms/ExtendedLoadMore/index-7eb05b3d.js +199 -0
- package/atoms/ExtendedLoadMore/index-8345922c.js +175 -0
- package/atoms/ExtendedLoadMore/index-99af722e.js +175 -0
- package/atoms/ExtendedLoadMore/index-aa8b8ab8.js +990 -0
- package/atoms/ExtendedLoadMore/index-c8f346d0.js +223 -0
- package/atoms/ExtendedLoadMore/index-e39b3ca8.js +3023 -0
- package/atoms/ExtendedLoadMore/index-f6e578e3.js +86 -0
- package/atoms/ExtendedLoadMore/index.js +5 -0
- package/atoms/ExtendedLoadMore/styles.arrow.css +1 -0
- package/atoms/Headline/index.js +2459 -0
- package/{Headline → atoms/Headline}/styles.arrow.css +0 -0
- package/atoms/HeroImage/index.js +2475 -0
- package/{HeroImage → atoms/HeroImage}/styles.arrow.css +0 -0
- package/atoms/LoadmoreButton/index.js +2268 -0
- package/{LoadmoreButton → atoms/LoadmoreButton}/styles.arrow.css +0 -0
- package/atoms/ScrollSnap/index.js +2531 -0
- package/{ScrollSnap → atoms/ScrollSnap}/styles.arrow.css +0 -0
- package/atoms/SectionTag/index.js +2220 -0
- package/{SectionTag → atoms/SectionTag}/styles.arrow.css +0 -0
- package/atoms/Subheadline/index.js +2200 -0
- package/{Subheadline → atoms/Subheadline}/styles.arrow.css +0 -0
- package/atoms/TimeStamp/index.js +2661 -0
- package/{TimeStamp → atoms/TimeStamp}/styles.arrow.css +0 -0
- package/molecules/KeyEvents/index.js +2968 -0
- package/{KeyEvents → molecules/KeyEvents}/styles.arrow.css +0 -0
- package/molecules/PageIntroductionCard/index.js +2676 -0
- package/{PageIntroductionCard → molecules/PageIntroductionCard}/styles.arrow.css +0 -0
- package/molecules/SocialShareTemplate/index.js +3093 -0
- package/{SocialShareTemplate → molecules/SocialShareTemplate}/styles.arrow.css +0 -0
- package/molecules/StoryCard/index.js +3938 -0
- package/{StoryCard → molecules/StoryCard}/styles.arrow.css +0 -0
- package/molecules/StoryElementCard/index.js +5832 -0
- package/{StoryElementCard → molecules/StoryElementCard}/styles.arrow.css +0 -0
- package/molecules/StorycardContent/index.js +3416 -0
- package/{StorycardContent → molecules/StorycardContent}/styles.arrow.css +0 -0
- package/package.json +1 -1
- package/rows/AlternateCollectionFilter/index.js +4744 -0
- package/{AlternateCollectionFilter → rows/AlternateCollectionFilter}/styles.arrow.css +0 -0
- package/rows/AsideCollection/index.js +4690 -0
- package/{AsideCollection → rows/AsideCollection}/styles.arrow.css +0 -0
- package/rows/AstrologyCollection/index.js +4661 -0
- package/{AstrologyCollection → rows/AstrologyCollection}/styles.arrow.css +0 -0
- package/rows/AuthorIntroductionCard/index.js +3520 -0
- package/{AuthorIntroductionCard → rows/AuthorIntroductionCard}/styles.arrow.css +0 -0
- package/rows/AuthorsList/index.js +3715 -0
- package/{AuthorsList → rows/AuthorsList}/styles.arrow.css +0 -0
- package/rows/CollectionFilter/index.js +4834 -0
- package/{CollectionFilter → rows/CollectionFilter}/styles.arrow.css +0 -0
- package/rows/ElevenStories/index.js +4638 -0
- package/{ElevenStories → rows/ElevenStories}/styles.arrow.css +0 -0
- package/rows/FourColFiveStories/index.js +4359 -0
- package/{FourColFiveStories → rows/FourColFiveStories}/styles.arrow.css +0 -0
- package/rows/FourColGrid/index.js +4584 -0
- package/{FourColGrid → rows/FourColGrid}/styles.arrow.css +0 -0
- package/rows/FourColPortraitStories/index.js +4617 -0
- package/{FourColPortraitStories → rows/FourColPortraitStories}/styles.arrow.css +0 -0
- package/rows/FourColSixteenStories/index.js +4375 -0
- package/{FourColSixteenStories → rows/FourColSixteenStories}/styles.arrow.css +0 -0
- package/rows/FourColTwelveStories/index.js +4335 -0
- package/{FourColTwelveStories → rows/FourColTwelveStories}/styles.arrow.css +0 -0
- package/rows/FourStorySlider/index.js +4743 -0
- package/{FourStorySlider → rows/FourStorySlider}/styles.arrow.css +0 -0
- package/rows/FourStorySliderPortrait/index.js +4746 -0
- package/{FourStorySliderPortrait → rows/FourStorySliderPortrait}/styles.arrow.css +1 -1
- package/rows/FourTabbedBigStorySlider/index.js +4505 -0
- package/{FourTabbedBigStorySlider → rows/FourTabbedBigStorySlider}/styles.arrow.css +0 -0
- package/rows/FullScreenSlider/index.js +4661 -0
- package/{FullScreenSlider → rows/FullScreenSlider}/styles.arrow.css +0 -0
- package/rows/HalfScreenSlider/index.js +4514 -0
- package/{HalfScreenSlider → rows/HalfScreenSlider}/styles.arrow.css +0 -0
- package/rows/ListComponent/index.js +4462 -0
- package/{ListComponent → rows/ListComponent}/styles.arrow.css +0 -0
- package/rows/Listicles/index.js +3131 -0
- package/{Listicles → rows/Listicles}/styles.arrow.css +0 -0
- package/rows/MagazineEditions/index.js +3142 -0
- package/{MagazineEditions → rows/MagazineEditions}/styles.arrow.css +0 -0
- package/rows/MagazineHeaderCard/index.js +3136 -0
- package/{MagazineHeaderCard → rows/MagazineHeaderCard}/styles.arrow.css +0 -0
- package/rows/MagazineWidget/index.js +4514 -0
- package/{MagazineWidget → rows/MagazineWidget}/styles.arrow.css +0 -0
- package/rows/OneColStoryList/index.js +4670 -0
- package/{OneColStoryList → rows/OneColStoryList}/styles.arrow.css +0 -0
- package/rows/OpinionCollection/index.js +4037 -0
- package/{OpinionCollection → rows/OpinionCollection}/styles.arrow.css +0 -0
- package/rows/SixColSixStories/index.js +4515 -0
- package/{SixColSixStories → rows/SixColSixStories}/styles.arrow.css +0 -0
- package/rows/StoryCollection/index.js +4690 -0
- package/{StoryCollection → rows/StoryCollection}/styles.arrow.css +0 -0
- package/rows/TagIntroductionCard/index.js +1901 -0
- package/{TagIntroductionCard → rows/TagIntroductionCard}/styles.arrow.css +0 -0
- package/rows/ThreeColFlexStories/index.js +4575 -0
- package/{ThreeColFlexStories → rows/ThreeColFlexStories}/styles.arrow.css +0 -0
- package/rows/ThreeColFourteenStories/index.js +4283 -0
- package/{ThreeColFourteenStories → rows/ThreeColFourteenStories}/styles.arrow.css +0 -0
- package/rows/ThreeColGrid/index.js +4605 -0
- package/{ThreeColGrid → rows/ThreeColGrid}/styles.arrow.css +0 -0
- package/rows/ThreeColSevenStory/index.js +4502 -0
- package/{ThreeColSevenStory → rows/ThreeColSevenStory}/styles.arrow.css +0 -0
- package/rows/ThreeColSixStories/index.js +4485 -0
- package/{ThreeColSixStories → rows/ThreeColSixStories}/styles.arrow.css +0 -0
- package/rows/ThreeColTwelveStories/index.js +4380 -0
- package/{ThreeColTwelveStories → rows/ThreeColTwelveStories}/styles.arrow.css +0 -0
- package/rows/TwoColFourStories/index.js +4463 -0
- package/{TwoColFourStories → rows/TwoColFourStories}/styles.arrow.css +0 -0
- package/rows/TwoColFourStoryHighlight/index.js +4456 -0
- package/{TwoColFourStoryHighlight → rows/TwoColFourStoryHighlight}/styles.arrow.css +0 -0
- package/rows/TwoColSevenStories/index.js +4490 -0
- package/{TwoColSevenStories → rows/TwoColSevenStories}/styles.arrow.css +0 -0
- package/rows/TwoColSixStories/index.js +4489 -0
- package/{TwoColSixStories → rows/TwoColSixStories}/styles.arrow.css +0 -0
- package/rows/TwoColTenStoriesSidebar/index.js +4549 -0
- package/{TwoColTenStoriesSidebar → rows/TwoColTenStoriesSidebar}/styles.arrow.css +0 -0
- package/rows/TwoColThreeStories/index.js +4436 -0
- package/{TwoColThreeStories → rows/TwoColThreeStories}/styles.arrow.css +0 -0
- package/story-elements/AlsoRead/index.js +2457 -0
- package/{AlsoRead → story-elements/AlsoRead}/styles.arrow.css +0 -0
- package/story-elements/Attachment/index.js +2013 -0
- package/{Attachment → story-elements/Attachment}/styles.arrow.css +0 -0
- package/story-elements/BigFact/index.js +1983 -0
- package/{BigFact → story-elements/BigFact}/styles.arrow.css +0 -0
- package/story-elements/BlockQuote/index.js +2431 -0
- package/{BlockQuote → story-elements/BlockQuote}/styles.arrow.css +0 -0
- package/story-elements/Blurb/index.js +2094 -0
- package/{Blurb → story-elements/Blurb}/styles.arrow.css +0 -0
- package/story-elements/Image/index.js +2711 -0
- package/{Image → story-elements/Image}/styles.arrow.css +0 -0
- package/story-elements/ImageGallery/index.js +2644 -0
- package/{ImageGallery → story-elements/ImageGallery}/styles.arrow.css +0 -0
- package/story-elements/ImageSlideshow/index.js +2955 -0
- package/{ImageSlideshow → story-elements/ImageSlideshow}/styles.arrow.css +0 -0
- package/story-elements/QuestionAnswer/index.js +2395 -0
- package/{QuestionAnswer → story-elements/QuestionAnswer}/styles.arrow.css +0 -0
- package/story-elements/Quote/index.js +2012 -0
- package/{Quote → story-elements/Quote}/styles.arrow.css +0 -0
- package/story-elements/Reference/index.js +2006 -0
- package/{Reference → story-elements/Reference}/styles.arrow.css +0 -0
- package/story-elements/StoryElement/index.js +1779 -0
- package/story-elements/Summary/index.js +2036 -0
- package/{Summary → story-elements/Summary}/styles.arrow.css +0 -0
- package/story-elements/Text/index.js +2293 -0
- package/{Text → story-elements/Text}/styles.arrow.css +0 -0
- package/story-elements/Video/index.js +1785 -0
- package/{Video → story-elements/Video}/styles.arrow.css +0 -0
- package/story-templates/ListicleStoryTemplate/index.js +8442 -0
- package/{ListicleStoryTemplate → story-templates/ListicleStoryTemplate}/styles.arrow.css +0 -0
- package/story-templates/LiveBlogStoryTemplate/index.js +8618 -0
- package/{LiveBlogStoryTemplate → story-templates/LiveBlogStoryTemplate}/styles.arrow.css +0 -0
- package/story-templates/PhotoStoryTemplate/index.js +8420 -0
- package/{PhotoStoryTemplate → story-templates/PhotoStoryTemplate}/styles.arrow.css +0 -0
- package/story-templates/TextStoryTemplate/index.js +8493 -0
- package/{TextStoryTemplate → story-templates/TextStoryTemplate}/styles.arrow.css +0 -0
- package/story-templates/VideoStoryTemplate/index.js +8352 -0
- package/{VideoStoryTemplate → story-templates/VideoStoryTemplate}/styles.arrow.css +0 -0
- package/cjs/index.js +0 -1
- package/esm/index.js +0 -1
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import { g as getTextColor, a as get_1, _ as _getClassName, b as generateNavigateSlug, n as navigateTo } from './index-e39b3ca8.js';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
4
|
+
import { collectionToStories } from '@quintype/components';
|
|
5
|
+
import { C as CollectionName, H as Headline, A as AuthorWithTime, S as StateProvider, L as LoadMoreTarget, P as ProgressiveHydration, a as LoadmoreButton } from './index-aa8b8ab8.js';
|
|
6
|
+
import { H as HeroImage, S as SectionTag } from './index-6cb56d1a.js';
|
|
7
|
+
import { S as StoryCard } from './index-6f8c780e.js';
|
|
8
|
+
import { useDispatch, useSelector } from 'react-redux';
|
|
9
|
+
import 'react-timeago';
|
|
10
|
+
import 'date-fns-tz';
|
|
11
|
+
import 'react-dom';
|
|
12
|
+
|
|
13
|
+
var _styleModuleImportMap = {
|
|
14
|
+
"./six-col-six-stories.m.css": {
|
|
15
|
+
"viewports": "\"../../../../assets/stylesheets/viewports.m.css\"",
|
|
16
|
+
"mobile": "768px",
|
|
17
|
+
"desktop": "1025px",
|
|
18
|
+
"wrapper": "six-col-six-stories-m_wrapper__2k2bf",
|
|
19
|
+
"row-wrapper": "six-col-six-stories-m_row-wrapper__2YNUO",
|
|
20
|
+
"card-wrapper": "six-col-six-stories-m_card-wrapper__1B5FM",
|
|
21
|
+
"vertical-border": "six-col-six-stories-m_vertical-border__3iwon",
|
|
22
|
+
"light": "six-col-six-stories-m_light__2wu4e",
|
|
23
|
+
"dark": "six-col-six-stories-m_dark__2y_No",
|
|
24
|
+
"content-wrapper": "six-col-six-stories-m_content-wrapper__3n5nT"
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
var loadMore = function loadMore(_ref) {
|
|
29
|
+
var isLoading = _ref.isLoading,
|
|
30
|
+
stories = _ref.stories,
|
|
31
|
+
getMoreStories = _ref.getMoreStories,
|
|
32
|
+
_ref$subsequentLoadCo = _ref.subsequentLoadCount,
|
|
33
|
+
subsequentLoadCount = _ref$subsequentLoadCo === void 0 ? 6 : _ref$subsequentLoadCo;
|
|
34
|
+
if (isLoading) return;
|
|
35
|
+
var limit = subsequentLoadCount;
|
|
36
|
+
var offset = stories.length;
|
|
37
|
+
getMoreStories(offset, limit);
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
var SixColSixStoriesBase = function SixColSixStoriesBase(_ref2) {
|
|
41
|
+
var _ref2$collection = _ref2.collection,
|
|
42
|
+
collection = _ref2$collection === void 0 ? {} : _ref2$collection,
|
|
43
|
+
_ref2$config = _ref2.config,
|
|
44
|
+
config = _ref2$config === void 0 ? {} : _ref2$config,
|
|
45
|
+
getMoreStories = _ref2.getMoreStories,
|
|
46
|
+
isLoadMoreVisible = _ref2.isLoadMoreVisible,
|
|
47
|
+
isLoading = _ref2.isLoading,
|
|
48
|
+
isolatedLoadMore = _ref2.isolatedLoadMore;
|
|
49
|
+
var stories = collectionToStories(collection);
|
|
50
|
+
if (!stories.length) return null;
|
|
51
|
+
var _config$collectionNam = config.collectionNameBorderColor,
|
|
52
|
+
collectionNameBorderColor = _config$collectionNam === void 0 ? "" : _config$collectionNam,
|
|
53
|
+
_config$borderColor = config.borderColor,
|
|
54
|
+
borderColor = _config$borderColor === void 0 ? "" : _config$borderColor,
|
|
55
|
+
_config$theme = config.theme,
|
|
56
|
+
theme = _config$theme === void 0 ? "" : _config$theme,
|
|
57
|
+
_config$collectionNam2 = config.collectionNameTemplate,
|
|
58
|
+
collectionNameTemplate = _config$collectionNam2 === void 0 ? "" : _config$collectionNam2,
|
|
59
|
+
_config$footerButton = config.footerButton,
|
|
60
|
+
footerButton = _config$footerButton === void 0 ? "" : _config$footerButton,
|
|
61
|
+
_config$border = config.border,
|
|
62
|
+
border = _config$border === void 0 ? "" : _config$border,
|
|
63
|
+
_config$localizationC = config.localizationConfig,
|
|
64
|
+
localizationConfig = _config$localizationC === void 0 ? {} : _config$localizationC,
|
|
65
|
+
_config$subsequentLoa = config.subsequentLoadCount,
|
|
66
|
+
subsequentLoadCount = _config$subsequentLoa === void 0 ? 6 : _config$subsequentLoa;
|
|
67
|
+
var textColor = getTextColor(theme);
|
|
68
|
+
var borderStyle = border === "fullBorder" ? "vertical-border" : "";
|
|
69
|
+
var dispatch = useDispatch();
|
|
70
|
+
var qtConfig = useSelector(function (state) {
|
|
71
|
+
return get_1(state, ["qt", "config"], {});
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
var getLoadMore = function getLoadMore(opts) {
|
|
75
|
+
if (!isLoadMoreVisible) return null;
|
|
76
|
+
|
|
77
|
+
if (isolatedLoadMore) {
|
|
78
|
+
return /*#__PURE__*/React.createElement(LoadMoreTarget, {
|
|
79
|
+
collection: collection,
|
|
80
|
+
componentName: "SixColSixStories",
|
|
81
|
+
offset: stories.length,
|
|
82
|
+
limit: subsequentLoadCount
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
var url = generateNavigateSlug(collection, qtConfig);
|
|
87
|
+
return /*#__PURE__*/React.createElement(ProgressiveHydration, null, /*#__PURE__*/React.createElement(LoadmoreButton, {
|
|
88
|
+
config: config,
|
|
89
|
+
collection: collection,
|
|
90
|
+
template: footerButton,
|
|
91
|
+
onClick: function onClick() {
|
|
92
|
+
return loadMore(opts);
|
|
93
|
+
},
|
|
94
|
+
navigate: function navigate() {
|
|
95
|
+
return navigateTo(dispatch, url);
|
|
96
|
+
},
|
|
97
|
+
qtConfig: qtConfig
|
|
98
|
+
}));
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
102
|
+
className: "full-width-with-padding arrow-component",
|
|
103
|
+
"data-test-id": "six-col-six-stories",
|
|
104
|
+
style: {
|
|
105
|
+
backgroundColor: theme,
|
|
106
|
+
color: textColor
|
|
107
|
+
}
|
|
108
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
109
|
+
className: "six-col-six-stories-m_wrapper__2k2bf"
|
|
110
|
+
}, /*#__PURE__*/React.createElement(CollectionName, {
|
|
111
|
+
collection: collection,
|
|
112
|
+
collectionNameTemplate: collectionNameTemplate,
|
|
113
|
+
collectionNameBorderColor: collectionNameBorderColor,
|
|
114
|
+
headerLevel: "2"
|
|
115
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
116
|
+
className: "six-col-six-stories-m_row-wrapper__2YNUO"
|
|
117
|
+
}, stories.map(function (story, index) {
|
|
118
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
119
|
+
key: "six-col-six-stories-".concat(index),
|
|
120
|
+
className: _getClassName("card-wrapper ".concat(borderStyle, " ").concat(textColor), _styleModuleImportMap)
|
|
121
|
+
}, /*#__PURE__*/React.createElement(StoryCard, {
|
|
122
|
+
story: story,
|
|
123
|
+
theme: theme,
|
|
124
|
+
config: config
|
|
125
|
+
}, /*#__PURE__*/React.createElement(HeroImage, {
|
|
126
|
+
story: story,
|
|
127
|
+
aspectRatio: [[16, 9], [16, 9]]
|
|
128
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
129
|
+
className: "six-col-six-stories-m_content-wrapper__3n5nT"
|
|
130
|
+
}, /*#__PURE__*/React.createElement(SectionTag, {
|
|
131
|
+
story: story,
|
|
132
|
+
borderColor: borderColor
|
|
133
|
+
}), /*#__PURE__*/React.createElement(Headline, {
|
|
134
|
+
story: story,
|
|
135
|
+
headerLevel: "6",
|
|
136
|
+
premiumStoryIconConfig: config
|
|
137
|
+
})), /*#__PURE__*/React.createElement(AuthorWithTime, {
|
|
138
|
+
config: localizationConfig,
|
|
139
|
+
story: story
|
|
140
|
+
})));
|
|
141
|
+
})), getLoadMore({
|
|
142
|
+
isLoading: isLoading,
|
|
143
|
+
stories: stories,
|
|
144
|
+
getMoreStories: getMoreStories,
|
|
145
|
+
subsequentLoadCount: subsequentLoadCount
|
|
146
|
+
})));
|
|
147
|
+
};
|
|
148
|
+
SixColSixStoriesBase.propTypes = {
|
|
149
|
+
/** collection is the array of objects which is returning by API */
|
|
150
|
+
collection: PropTypes.object.isRequired,
|
|
151
|
+
|
|
152
|
+
/** The config for the Row */
|
|
153
|
+
config: PropTypes.shape({
|
|
154
|
+
borderColor: PropTypes.string,
|
|
155
|
+
theme: PropTypes.string,
|
|
156
|
+
border: PropTypes.string,
|
|
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
|
+
SixColSixStoriesBase.defaultProps = {
|
|
169
|
+
getMoreStories: function getMoreStories() {},
|
|
170
|
+
isLoadMoreVisible: true,
|
|
171
|
+
isLoading: false
|
|
172
|
+
};
|
|
173
|
+
var SixColSixStories = StateProvider(SixColSixStoriesBase);
|
|
174
|
+
|
|
175
|
+
export { SixColSixStories, SixColSixStoriesBase };
|