@quintype/arrow 3.15.1-perf.4 → 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.
Files changed (166) hide show
  1. package/cjs/index.js +14589 -0
  2. package/package.json +1 -1
  3. package/atoms/Author/index.js +0 -170
  4. package/atoms/Author/styles.arrow.css +0 -1
  5. package/atoms/AuthorWithTime/index.js +0 -514
  6. package/atoms/AuthorWithTime/styles.arrow.css +0 -1
  7. package/atoms/CollectionName/index.js +0 -255
  8. package/atoms/CollectionName/styles.arrow.css +0 -1
  9. package/atoms/ExtendedLoadMore/index-0f809dd9.js +0 -254
  10. package/atoms/ExtendedLoadMore/index-142f015c.js +0 -476
  11. package/atoms/ExtendedLoadMore/index-37a9ccff.js +0 -182
  12. package/atoms/ExtendedLoadMore/index-446679c8.js +0 -191
  13. package/atoms/ExtendedLoadMore/index-44f97338.js +0 -300
  14. package/atoms/ExtendedLoadMore/index-57dd4870.js +0 -239
  15. package/atoms/ExtendedLoadMore/index-66dd4dbd.js +0 -215
  16. package/atoms/ExtendedLoadMore/index-8462c597.js +0 -363
  17. package/atoms/ExtendedLoadMore/index-93cb06d1.js +0 -1016
  18. package/atoms/ExtendedLoadMore/index-afd44863.js +0 -95
  19. package/atoms/ExtendedLoadMore/index-b5754c5d.js +0 -195
  20. package/atoms/ExtendedLoadMore/index-bbaf526e.js +0 -256
  21. package/atoms/ExtendedLoadMore/index-cfb262ef.js +0 -192
  22. package/atoms/ExtendedLoadMore/index.js +0 -20
  23. package/atoms/ExtendedLoadMore/styles.arrow.css +0 -1
  24. package/atoms/Headline/index.js +0 -379
  25. package/atoms/Headline/styles.arrow.css +0 -1
  26. package/atoms/HeroImage/index.js +0 -336
  27. package/atoms/HeroImage/styles.arrow.css +0 -1
  28. package/atoms/LoadmoreButton/index.js +0 -175
  29. package/atoms/LoadmoreButton/styles.arrow.css +0 -1
  30. package/atoms/ScrollSnap/index.js +0 -379
  31. package/atoms/ScrollSnap/styles.arrow.css +0 -1
  32. package/atoms/SectionTag/index.js +0 -140
  33. package/atoms/SectionTag/styles.arrow.css +0 -1
  34. package/atoms/Subheadline/index.js +0 -120
  35. package/atoms/Subheadline/styles.arrow.css +0 -1
  36. package/atoms/TimeStamp/index.js +0 -221
  37. package/atoms/TimeStamp/styles.arrow.css +0 -1
  38. package/molecules/KeyEvents/index.js +0 -457
  39. package/molecules/KeyEvents/styles.arrow.css +0 -1
  40. package/molecules/PageIntroductionCard/index.js +0 -248
  41. package/molecules/PageIntroductionCard/styles.arrow.css +0 -1
  42. package/molecules/SocialShareTemplate/index.js +0 -506
  43. package/molecules/SocialShareTemplate/styles.arrow.css +0 -1
  44. package/molecules/StoryCard/index.js +0 -1430
  45. package/molecules/StoryCard/styles.arrow.css +0 -1
  46. package/molecules/StoryElementCard/index.js +0 -3091
  47. package/molecules/StoryElementCard/styles.arrow.css +0 -1
  48. package/molecules/StorycardContent/index.js +0 -976
  49. package/molecules/StorycardContent/styles.arrow.css +0 -1
  50. package/rows/AlternateCollectionFilter/index.js +0 -2189
  51. package/rows/AlternateCollectionFilter/styles.arrow.css +0 -1
  52. package/rows/AsideCollection/index.js +0 -2135
  53. package/rows/AsideCollection/styles.arrow.css +0 -1
  54. package/rows/AstrologyCollection/index.js +0 -2106
  55. package/rows/AstrologyCollection/styles.arrow.css +0 -1
  56. package/rows/AuthorIntroductionCard/index.js +0 -813
  57. package/rows/AuthorIntroductionCard/styles.arrow.css +0 -1
  58. package/rows/AuthorsList/index.js +0 -996
  59. package/rows/AuthorsList/styles.arrow.css +0 -1
  60. package/rows/CollectionFilter/index.js +0 -2279
  61. package/rows/CollectionFilter/styles.arrow.css +0 -1
  62. package/rows/ElevenStories/index.js +0 -2118
  63. package/rows/ElevenStories/styles.arrow.css +0 -1
  64. package/rows/FourColFiveStories/index.js +0 -1861
  65. package/rows/FourColFiveStories/styles.arrow.css +0 -1
  66. package/rows/FourColGrid/index.js +0 -2083
  67. package/rows/FourColGrid/styles.arrow.css +0 -1
  68. package/rows/FourColPortraitStories/index.js +0 -2116
  69. package/rows/FourColPortraitStories/styles.arrow.css +0 -1
  70. package/rows/FourColSixteenStories/index.js +0 -1849
  71. package/rows/FourColSixteenStories/styles.arrow.css +0 -1
  72. package/rows/FourColTwelveStories/index.js +0 -1822
  73. package/rows/FourColTwelveStories/styles.arrow.css +0 -1
  74. package/rows/FourStorySlider/index.js +0 -2223
  75. package/rows/FourStorySlider/styles.arrow.css +0 -1
  76. package/rows/FourStorySliderPortrait/index.js +0 -2226
  77. package/rows/FourStorySliderPortrait/styles.arrow.css +0 -1
  78. package/rows/FourTabbedBigStorySlider/index.js +0 -1985
  79. package/rows/FourTabbedBigStorySlider/styles.arrow.css +0 -1
  80. package/rows/FullScreenSlider/index.js +0 -2141
  81. package/rows/FullScreenSlider/styles.arrow.css +0 -1
  82. package/rows/HalfScreenSlider/index.js +0 -1994
  83. package/rows/HalfScreenSlider/styles.arrow.css +0 -1
  84. package/rows/ListComponent/index.js +0 -1942
  85. package/rows/ListComponent/styles.arrow.css +0 -1
  86. package/rows/Listicles/index.js +0 -945
  87. package/rows/Listicles/styles.arrow.css +0 -1
  88. package/rows/MagazineEditions/index.js +0 -690
  89. package/rows/MagazineEditions/styles.arrow.css +0 -1
  90. package/rows/MagazineHeaderCard/index.js +0 -684
  91. package/rows/MagazineHeaderCard/styles.arrow.css +0 -1
  92. package/rows/MagazineWidget/index.js +0 -1994
  93. package/rows/MagazineWidget/styles.arrow.css +0 -1
  94. package/rows/OneColStoryList/index.js +0 -2169
  95. package/rows/OneColStoryList/styles.arrow.css +0 -1
  96. package/rows/OpinionCollection/index.js +0 -1545
  97. package/rows/OpinionCollection/styles.arrow.css +0 -1
  98. package/rows/SixColSixStories/index.js +0 -2014
  99. package/rows/SixColSixStories/styles.arrow.css +0 -1
  100. package/rows/StoryCollection/index.js +0 -2135
  101. package/rows/StoryCollection/styles.arrow.css +0 -1
  102. package/rows/TagIntroductionCard/index.js +0 -103
  103. package/rows/TagIntroductionCard/styles.arrow.css +0 -1
  104. package/rows/ThreeColFlexStories/index.js +0 -2074
  105. package/rows/ThreeColFlexStories/styles.arrow.css +0 -1
  106. package/rows/ThreeColFourteenStories/index.js +0 -1770
  107. package/rows/ThreeColFourteenStories/styles.arrow.css +0 -1
  108. package/rows/ThreeColGrid/index.js +0 -2104
  109. package/rows/ThreeColGrid/styles.arrow.css +0 -1
  110. package/rows/ThreeColSevenStory/index.js +0 -1982
  111. package/rows/ThreeColSevenStory/styles.arrow.css +0 -1
  112. package/rows/ThreeColSixStories/index.js +0 -1965
  113. package/rows/ThreeColSixStories/styles.arrow.css +0 -1
  114. package/rows/ThreeColTwelveStories/index.js +0 -1854
  115. package/rows/ThreeColTwelveStories/styles.arrow.css +0 -1
  116. package/rows/TwoColFourStories/index.js +0 -1943
  117. package/rows/TwoColFourStories/styles.arrow.css +0 -1
  118. package/rows/TwoColFourStoryHighlight/index.js +0 -1930
  119. package/rows/TwoColFourStoryHighlight/styles.arrow.css +0 -1
  120. package/rows/TwoColSevenStories/index.js +0 -1970
  121. package/rows/TwoColSevenStories/styles.arrow.css +0 -1
  122. package/rows/TwoColSixStories/index.js +0 -1963
  123. package/rows/TwoColSixStories/styles.arrow.css +0 -1
  124. package/rows/TwoColTenStoriesSidebar/index.js +0 -2029
  125. package/rows/TwoColTenStoriesSidebar/styles.arrow.css +0 -1
  126. package/rows/TwoColThreeStories/index.js +0 -1916
  127. package/rows/TwoColThreeStories/styles.arrow.css +0 -1
  128. package/story-elements/AlsoRead/index.js +0 -320
  129. package/story-elements/AlsoRead/styles.arrow.css +0 -1
  130. package/story-elements/Attachment/index.js +0 -167
  131. package/story-elements/Attachment/styles.arrow.css +0 -1
  132. package/story-elements/BigFact/index.js +0 -137
  133. package/story-elements/BigFact/styles.arrow.css +0 -1
  134. package/story-elements/BlockQuote/index.js +0 -304
  135. package/story-elements/BlockQuote/styles.arrow.css +0 -1
  136. package/story-elements/Blurb/index.js +0 -189
  137. package/story-elements/Blurb/styles.arrow.css +0 -1
  138. package/story-elements/Image/index.js +0 -529
  139. package/story-elements/Image/styles.arrow.css +0 -1
  140. package/story-elements/ImageGallery/index.js +0 -462
  141. package/story-elements/ImageGallery/styles.arrow.css +0 -1
  142. package/story-elements/ImageSlideshow/index.js +0 -773
  143. package/story-elements/ImageSlideshow/styles.arrow.css +0 -1
  144. package/story-elements/QuestionAnswer/index.js +0 -267
  145. package/story-elements/QuestionAnswer/styles.arrow.css +0 -1
  146. package/story-elements/Quote/index.js +0 -166
  147. package/story-elements/Quote/styles.arrow.css +0 -1
  148. package/story-elements/Reference/index.js +0 -160
  149. package/story-elements/Reference/styles.arrow.css +0 -1
  150. package/story-elements/StoryElement/index.js +0 -75
  151. package/story-elements/Summary/index.js +0 -190
  152. package/story-elements/Summary/styles.arrow.css +0 -1
  153. package/story-elements/Text/index.js +0 -165
  154. package/story-elements/Text/styles.arrow.css +0 -1
  155. package/story-elements/Video/index.js +0 -81
  156. package/story-elements/Video/styles.arrow.css +0 -1
  157. package/story-templates/ListicleStoryTemplate/index.js +0 -5586
  158. package/story-templates/ListicleStoryTemplate/styles.arrow.css +0 -1
  159. package/story-templates/LiveBlogStoryTemplate/index.js +0 -5762
  160. package/story-templates/LiveBlogStoryTemplate/styles.arrow.css +0 -1
  161. package/story-templates/PhotoStoryTemplate/index.js +0 -5564
  162. package/story-templates/PhotoStoryTemplate/styles.arrow.css +0 -1
  163. package/story-templates/TextStoryTemplate/index.js +0 -5637
  164. package/story-templates/TextStoryTemplate/styles.arrow.css +0 -1
  165. package/story-templates/VideoStoryTemplate/index.js +0 -5496
  166. package/story-templates/VideoStoryTemplate/styles.arrow.css +0 -1
@@ -1,1770 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var _toArray = require('@babel/runtime/helpers/toArray');
6
- var React = require('react');
7
- var PropTypes = require('prop-types');
8
- var lodash = require('lodash');
9
- var components = require('@quintype/components');
10
- var _getClassName = require('babel-plugin-react-css-modules/dist/browser/getClassName');
11
- var reactRedux = require('react-redux');
12
- require('@babel/runtime/helpers/asyncToGenerator');
13
- var _typeof = require('@babel/runtime/helpers/typeof');
14
- require('@babel/runtime/regenerator');
15
- var Timeago = require('react-timeago');
16
- var dateFnsTz = require('date-fns-tz');
17
- var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
18
-
19
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
20
-
21
- var _toArray__default = /*#__PURE__*/_interopDefaultLegacy(_toArray);
22
- var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
23
- var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
24
- var _getClassName__default = /*#__PURE__*/_interopDefaultLegacy(_getClassName);
25
- var _typeof__default = /*#__PURE__*/_interopDefaultLegacy(_typeof);
26
- var Timeago__default = /*#__PURE__*/_interopDefaultLegacy(Timeago);
27
- var _slicedToArray__default = /*#__PURE__*/_interopDefaultLegacy(_slicedToArray);
28
-
29
- var StateContext = /*#__PURE__*/React.createContext(); // eslint-disable-next-line react/display-name
30
-
31
- var StateProvider = function StateProvider(RowComponent) {
32
- return function (props) {
33
- return (
34
- /*#__PURE__*/
35
- // eslint-disable-next-line react/prop-types
36
- React__default["default"].createElement(StateContext.Provider, {
37
- value: props.config
38
- }, /*#__PURE__*/React__default["default"].createElement(RowComponent, props))
39
- );
40
- };
41
- };
42
- var useStateValue = function useStateValue() {
43
- return React.useContext(StateContext);
44
- };
45
-
46
- function truncate() {
47
- var string = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
48
- var limit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 60;
49
- var ellipsis = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
50
- var putEllipsis = ellipsis ? " ..." : "";
51
- return typeof string === "string" && string.length > limit ? string.substring(0, limit) + putEllipsis : string;
52
- }
53
- var timestampToFormat = function timestampToFormat(value, unit, suffix, timestamp) {
54
- var config = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
55
- var _config$showTime = config.showTime,
56
- showTime = _config$showTime === void 0 ? false : _config$showTime,
57
- _config$isTimeFirst = config.isTimeFirst,
58
- isTimeFirst = _config$isTimeFirst === void 0 ? false : _config$isTimeFirst,
59
- _config$isUpperCase = config.isUpperCase,
60
- isUpperCase = _config$isUpperCase === void 0 ? false : _config$isUpperCase,
61
- _config$disableMeridi = config.disableMeridiem,
62
- disableMeridiem = _config$disableMeridi === void 0 ? false : _config$disableMeridi,
63
- _config$timeFormat = config.timeFormat,
64
- timeFormat = _config$timeFormat === void 0 ? "12hours" : _config$timeFormat;
65
- var monthList = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
66
- var dateTime = new Date(timestamp);
67
- var date = dateTime.getDate().toString().padStart(2, 0);
68
- var month = monthList[dateTime.getMonth()];
69
- var localizedMonth = month;
70
-
71
- if (isUpperCase) {
72
- localizedMonth = lodash.upperCase(month);
73
- }
74
-
75
- var year = dateTime.getFullYear();
76
- var localizedMeridiem = config.localizedMeridiem,
77
- localizedMonths = config.localizedMonths,
78
- _config$direction = config.direction,
79
- direction = _config$direction === void 0 ? "ltr" : _config$direction;
80
- var time = formatAMPM(timestamp, timeFormat);
81
- var timeWithLocalizedMeridiem = time;
82
- var timetoShow;
83
-
84
- if (localizedMonths) {
85
- localizedMonth = lodash.get(localizedMonths, [lodash.lowerCase(month)]) || month;
86
- }
87
-
88
- if (localizedMeridiem) {
89
- var isAm = time.includes("am");
90
- var _localizedMeridiem$am = localizedMeridiem.am,
91
- am = _localizedMeridiem$am === void 0 ? "am" : _localizedMeridiem$am,
92
- _localizedMeridiem$pm = localizedMeridiem.pm,
93
- pm = _localizedMeridiem$pm === void 0 ? "pm" : _localizedMeridiem$pm;
94
- timeWithLocalizedMeridiem = (isAm ? time.replace("am", am) : time.replace("pm", pm)) || time;
95
- }
96
-
97
- if (direction === "rtl") {
98
- timetoShow = showTime ? "".concat(timeWithLocalizedMeridiem) : "";
99
- return "".concat(date, " ").concat(localizedMonth, ", ").concat(year, " ").concat(timetoShow, " ");
100
- } else {
101
- if (disableMeridiem) {
102
- return "".concat(localizedMonth, " ").concat(date, ", ").concat(year);
103
- } else if (isTimeFirst) {
104
- return "".concat(timeWithLocalizedMeridiem, ", ").concat(date, " ").concat(localizedMonth, " ").concat(year);
105
- } else {
106
- timetoShow = showTime ? ", ".concat(timeWithLocalizedMeridiem) : "";
107
- return "".concat(date, " ").concat(localizedMonth, ", ").concat(year).concat(timetoShow);
108
- }
109
- }
110
- };
111
- function formatter(value, unit, suffix, date, config) {
112
- var showDateForUnits = ["day", "week", "month", "year"]; // suffix here refers to ago
113
- // unit here refers to seconds, minute, minutes,...
114
-
115
- var localizedSuffix = lodash.get(config, ["localizedPublishTime", suffix]) || suffix;
116
- var localizedUnitOfTime;
117
-
118
- if (unit === "hour" && value > 23 || showDateForUnits.indexOf(unit) !== -1) {
119
- return timestampToFormat(value, unit, suffix, date, config);
120
- } else if (value > 1) {
121
- localizedUnitOfTime = lodash.get(config, ["localizedPublishTime", "".concat(unit, "s")]) || "".concat(unit, "s");
122
- return "".concat(value, " ").concat(localizedUnitOfTime, " ").concat(localizedSuffix);
123
- }
124
-
125
- localizedUnitOfTime = lodash.get(config, ["localizedPublishTime", unit]) || unit;
126
- return "".concat(value, " ").concat(localizedUnitOfTime, " ").concat(localizedSuffix, " ");
127
- }
128
-
129
- function formatAMPM(timestamp) {
130
- var timeFormat = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "12hours";
131
- var dateTime = new Date(timestamp);
132
- var hours = dateTime.getHours();
133
- var minutes = dateTime.getMinutes();
134
- var ampm = hours >= 12 ? "pm" : "am";
135
- hours = hours % 12;
136
- hours = hours || 12;
137
- minutes = minutes < 10 ? "0" + minutes : minutes;
138
- var strTime = hours + ":" + minutes + " " + ampm;
139
-
140
- if (timeFormat === "24hours") {
141
- return dateTime.toLocaleTimeString([], {
142
- hour: "2-digit",
143
- minute: "2-digit"
144
- });
145
- }
146
-
147
- return strTime;
148
- }
149
-
150
- var hexToRGB = function hexToRGB(hex) {
151
- var r = parseInt(hex.slice(1, 3), 16);
152
- var g = parseInt(hex.slice(3, 5), 16);
153
- var b = parseInt(hex.slice(5, 7), 16);
154
- return {
155
- r: r,
156
- g: g,
157
- b: b
158
- };
159
- };
160
- var getLuminanceOfColor = function getLuminanceOfColor(hex) {
161
- var _hexToRGB = hexToRGB(hex),
162
- r = _hexToRGB.r,
163
- g = _hexToRGB.g,
164
- b = _hexToRGB.b;
165
-
166
- return r * 0.299 + g * 0.587 + b * 0.114;
167
- };
168
- var rgbToHex = function rgbToHex() {
169
- var color = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "rgba(255, 255, 255, 0)";
170
- var rgba = color.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i);
171
- return rgba && rgba.length === 4 ? "#" + ("0" + parseInt(rgba[1], 10).toString(16)).slice(-2) + ("0" + parseInt(rgba[2], 10).toString(16)).slice(-2) + ("0" + parseInt(rgba[3], 10).toString(16)).slice(-2) : color;
172
- };
173
- var clientWidths = {
174
- mobile: 767,
175
- tablet: 1024
176
- };
177
- var clientWidth = function clientWidth(device) {
178
- var foundDeviceWidth = lodash.get(clientWidths, device);
179
-
180
- if (foundDeviceWidth) {
181
- return lodash.get(global, "document.documentElement.clientWidth") <= foundDeviceWidth;
182
- }
183
-
184
- return false;
185
- };
186
- var getTextColor = function getTextColor() {
187
- var theme = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "rgb(255,255,255)";
188
- var isRegexCheck = /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(theme);
189
- var getHexValue = !isRegexCheck ? rgbToHex(theme) : theme;
190
- var textColor = getLuminanceOfColor(getHexValue) < 155 ? "light" : "dark";
191
- return textColor;
192
- };
193
- var getSlot = function getSlot(type, component, storyCallback, collectionCallback) {
194
- switch (type) {
195
- case "story":
196
- return storyCallback();
197
-
198
- case "collection":
199
- return collectionCallback();
200
-
201
- default:
202
- return component ? component() : null;
203
- }
204
- };
205
- var getSlug = function getSlug(collection) {
206
- var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
207
- var _config$magazineSlug = config.magazineSlug,
208
- magazineSlug = _config$magazineSlug === void 0 ? "" : _config$magazineSlug,
209
- _config$isArchivePage = config.isArchivePage,
210
- isArchivePage = _config$isArchivePage === void 0 ? false : _config$isArchivePage;
211
-
212
- if (isArchivePage) {
213
- return "/magazine/archive/".concat(magazineSlug);
214
- }
215
-
216
- if (magazineSlug) {
217
- return "/magazine/".concat(magazineSlug, "/").concat(collection.slug);
218
- }
219
-
220
- var isSection = collection.template === "section";
221
-
222
- if (isSection) {
223
- var sectionId = lodash.get(collection, ["metadata", "section", "0", "id"], "");
224
- var sections = config.sections;
225
- var section = sections && sections.find(function (section) {
226
- return section.id === sectionId;
227
- });
228
- return section ? section["section-url"] : "/";
229
- }
230
-
231
- return "/collection/".concat(collection.slug);
232
- };
233
- function isExternalStory() {
234
- var story = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
235
- var _story$storyTemplate = story["story-template"],
236
- storyTemplate = _story$storyTemplate === void 0 ? "" : _story$storyTemplate,
237
- _story$metadata = story.metadata,
238
- metadata = _story$metadata === void 0 ? {} : _story$metadata;
239
- return storyTemplate === "news-elsewhere" ? lodash.get(metadata, ["reference-url"], "") : "";
240
- } // Adds target='_blank' attribute to anchor tags if not present
241
- var isEmpty = function isEmpty(value) {
242
- return value == null || // From standard.js: Always use === - but value == null is allowed to check null || undefined
243
- _typeof__default["default"](value) === "object" && Object.entries(value).length === 0 && value.constructor === Object || typeof value === "string" && value.trim().length === 0;
244
- };
245
- PropTypes__default["default"].shape({
246
- "sketches-host": PropTypes__default["default"].string,
247
- "cdn-name": PropTypes__default["default"].string,
248
- "cdn-image": PropTypes__default["default"].string
249
- });
250
- PropTypes__default["default"].shape({
251
- headline: PropTypes__default["default"].string,
252
- "last-published-at": PropTypes__default["default"].number,
253
- subheadline: PropTypes__default["default"].string
254
- });
255
- var getStoryUrl = function getStoryUrl(story) {
256
- var defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
257
- return lodash.get(story, ["story-template"]) === "news-elsewhere" ? lodash.get(story, ["metadata", "reference-url"], "") : story.url || defaultValue;
258
- };
259
- var getTimeStamp = function getTimeStamp(date, _formatter) {
260
- var config = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
261
- var template = arguments.length > 3 ? arguments[3] : undefined;
262
- var timezone = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;
263
-
264
- if (timezone && template === "story") {
265
- var zonedTime = timezone && dateFnsTz.utcToZonedTime(date, timezone);
266
- var formatZonedTime = zonedTime && dateFnsTz.format(zonedTime, "yyyy-MM-dd'T'HH:mm:ssXXX", {
267
- timeZone: timezone
268
- });
269
- var timeStamp = timestampToFormat("", "", "", date, config);
270
- return /*#__PURE__*/React__default["default"].createElement("time", {
271
- dateTime: formatZonedTime
272
- }, timeStamp);
273
- }
274
-
275
- return /*#__PURE__*/React__default["default"].createElement(Timeago__default["default"], {
276
- date: date,
277
- formatter: function formatter(value, unit, suffix, date) {
278
- return _formatter(value, unit, suffix, date, config);
279
- }
280
- });
281
- };
282
-
283
- var _styleModuleImportMap$b = {
284
- "./collection-name.m.css": {
285
- "collection": "collection-name-m_collection__JD6sx",
286
- "collection-borderLeft": "collection-name-m_collection-borderLeft__3Dznk",
287
- "border-left": "collection-name-m_border-left__3_pYw",
288
- "collection-borderBottomFull": "collection-name-m_collection-borderBottomFull__Dkq3K",
289
- "collection-borderBottom": "collection-name-m_collection-borderBottom__2rdQM",
290
- "collection-crossLine": "collection-name-m_collection-crossLine__1sIpN",
291
- "border-bottom": "collection-name-m_border-bottom__1MnlV",
292
- "dark": "collection-name-m_dark__nMe5H",
293
- "light": "collection-name-m_light__1vFDN"
294
- }
295
- };
296
- var CollectionNameBase = function CollectionNameBase(_ref) {
297
- var _ref$collectionNameBo = _ref.collectionNameBorderColor,
298
- collectionNameBorderColor = _ref$collectionNameBo === void 0 ? "" : _ref$collectionNameBo,
299
- collection = _ref.collection,
300
- config = _ref.config,
301
- collectionNameTemplate = _ref.collectionNameTemplate,
302
- headerLevel = _ref.headerLevel,
303
- _ref$customCollection = _ref.customCollectionName,
304
- customCollectionName = _ref$customCollection === void 0 ? "" : _ref$customCollection,
305
- _ref$navigate = _ref.navigate,
306
- navigate = _ref$navigate === void 0 ? true : _ref$navigate;
307
- var collectionTitle = useStateValue() || {};
308
- var showRowTitle = lodash.get(collectionTitle, ["showRowTitle"], true);
309
- var supportedTemplates = ["borderLeft", "borderBottom", "crossLine", "borderBottomFull"];
310
- var templateStyle = supportedTemplates.includes(collectionNameTemplate) ? " collection-".concat(collectionNameTemplate) : "";
311
- var slug = navigate && collection && getSlug(collection, config) || "";
312
- var collectionName = customCollectionName || collection.name || "";
313
- var textColor = getTextColor(collectionTitle.theme);
314
- var HeaderTag = "h" + headerLevel;
315
- var CollectionNameBorderColor = rgbToHex(collectionNameBorderColor);
316
- var borderBottomFullStyle = templateStyle.includes("collection-borderBottomFull") ? "4px solid ".concat(CollectionNameBorderColor) : "";
317
-
318
- var borderBottomStyle = function borderBottomStyle() {
319
- return templateStyle.includes("collection-borderBottom") && !templateStyle.includes("collection-borderBottomFull") ? /*#__PURE__*/React__default["default"].createElement("div", {
320
- className: "collection-name-m_border-bottom__1MnlV",
321
- style: {
322
- borderBottom: "4px solid ".concat(CollectionNameBorderColor)
323
- }
324
- }) : "";
325
- };
326
-
327
- var isMobile = clientWidth("mobile");
328
-
329
- var getBorderHeight = function getBorderHeight() {
330
- if (isMobile) {
331
- switch (headerLevel) {
332
- case "1":
333
- return "32px";
334
-
335
- case "2":
336
- return "24px";
337
-
338
- case "3":
339
- return "20px";
340
-
341
- case "4":
342
- return "18px";
343
-
344
- case "5":
345
- return "16px";
346
-
347
- case "6":
348
- return "16px";
349
-
350
- default:
351
- return "20px";
352
- }
353
- }
354
-
355
- switch (headerLevel) {
356
- case "1":
357
- return "40px";
358
-
359
- case "2":
360
- return "32px";
361
-
362
- case "3":
363
- return "24px";
364
-
365
- case "4":
366
- return "20px";
367
-
368
- case "5":
369
- return "18px";
370
-
371
- case "6":
372
- return "16px";
373
-
374
- default:
375
- return "24px";
376
- }
377
- };
378
-
379
- return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, showRowTitle && collectionName && /*#__PURE__*/React__default["default"].createElement("div", {
380
- style: {
381
- borderBottom: borderBottomFullStyle
382
- },
383
- "data-test-id": "collection-name",
384
- className: ("arr--collection-name arrow-component ".concat(templateStyle) ? "arr--collection-name arrow-component ".concat(templateStyle) + " " : "") + _getClassName__default["default"]("collection ".concat(textColor, " ").concat(templateStyle), _styleModuleImportMap$b)
385
- }, templateStyle.includes("collection-borderLeft") && /*#__PURE__*/React__default["default"].createElement("span", {
386
- className: "arr-collection-name-border-left collection-name-m_border-left__3_pYw",
387
- style: {
388
- color: CollectionNameBorderColor,
389
- fontSize: getBorderHeight()
390
- }
391
- }), slug && !slug.includes(undefined) ? /*#__PURE__*/React__default["default"].createElement(components.Link, {
392
- href: slug,
393
- "aria-label": "collection-name"
394
- }, /*#__PURE__*/React__default["default"].createElement(HeaderTag, null, collectionName)) : /*#__PURE__*/React__default["default"].createElement(HeaderTag, null, collectionName), borderBottomStyle()));
395
- };
396
- CollectionNameBase.propTypes = {
397
- /** Collection name border color */
398
- collectionNameBorderColor: PropTypes.PropTypes.string,
399
-
400
- /** The Collection Object from the API response */
401
- collection: PropTypes.PropTypes.object,
402
-
403
- /** The publisher config from the API response */
404
- config: PropTypes.PropTypes.object,
405
-
406
- /** The style template for the component */
407
- collectionNameTemplate: PropTypes.PropTypes.oneOf(["", "borderLeft", "borderBottom", "crossLine", "borderBottomFull"]),
408
-
409
- /** Header tags ranging h1-h6, where h[headerLevel] */
410
- headerLevel: PropTypes.PropTypes.string,
411
- customCollectionName: PropTypes.PropTypes.string,
412
- navigate: PropTypes.PropTypes.bool
413
- };
414
- CollectionNameBase.defaultProps = {
415
- collectionNameTemplate: "",
416
- headerLevel: "3"
417
- };
418
-
419
- function mapStateToProps$1(state) {
420
- return {
421
- config: lodash.get(state, ["qt", "config"], {})
422
- };
423
- }
424
-
425
- var CollectionName = reactRedux.connect(mapStateToProps$1)(CollectionNameBase);
426
-
427
- var ImageFallbackIcon = function ImageFallbackIcon(_ref) {
428
- var _ref$width = _ref.width,
429
- width = _ref$width === void 0 ? 40 : _ref$width,
430
- _ref$height = _ref.height,
431
- height = _ref$height === void 0 ? 30 : _ref$height,
432
- _ref$iconColor = _ref.iconColor,
433
- iconColor = _ref$iconColor === void 0 ? "#99B0CB" : _ref$iconColor;
434
- return /*#__PURE__*/React__default["default"].createElement("svg", {
435
- width: width,
436
- height: height,
437
- viewBox: "0 0 102 76",
438
- version: "1.1"
439
- }, /*#__PURE__*/React__default["default"].createElement("g", {
440
- id: "demo-home-copy",
441
- stroke: "none",
442
- strokeWidth: "1",
443
- fill: "none",
444
- fillRule: "evenodd",
445
- transform: "translate(-377.000000, -314.000000)"
446
- }, /*#__PURE__*/React__default["default"].createElement("g", {
447
- id: "Group-13",
448
- transform: "translate(377.000000, 314.000000)"
449
- }, /*#__PURE__*/React__default["default"].createElement("path", {
450
- 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",
451
- id: "Combined-Shape",
452
- fill: iconColor,
453
- fillRule: "nonzero"
454
- }), /*#__PURE__*/React__default["default"].createElement("rect", {
455
- id: "Rectangle-19",
456
- stroke: iconColor,
457
- strokeWidth: "3",
458
- x: "1.5",
459
- y: "1.5",
460
- width: "99",
461
- height: "73",
462
- rx: "3"
463
- }))));
464
- };
465
- ImageFallbackIcon.propTypes = {
466
- width: PropTypes__default["default"].object,
467
- height: PropTypes__default["default"].object,
468
- iconColor: PropTypes__default["default"].object
469
- };
470
-
471
- var imageFallback = function imageFallback() {
472
- return /*#__PURE__*/React__default["default"].createElement("div", {
473
- className: "arr--fallback-image fallback-m_image__1GYCJ fallback-m_image-position__3KddP"
474
- }, /*#__PURE__*/React__default["default"].createElement("figure", {
475
- className: "arr--fallback-svg fallback-m_fallback-svg__tK9fL"
476
- }, /*#__PURE__*/React__default["default"].createElement(ImageFallbackIcon, null)));
477
- };
478
-
479
- var FallbackImage = function FallbackImage(_ref) {
480
- var slug = _ref.slug;
481
-
482
- if (slug) {
483
- return /*#__PURE__*/React__default["default"].createElement(components.Link, {
484
- href: slug,
485
- "aria-label": "image-fallback"
486
- }, imageFallback());
487
- } else {
488
- return imageFallback();
489
- }
490
- };
491
- FallbackImage.propTypes = {
492
- slug: PropTypes__default["default"].string
493
- };
494
-
495
- var HyperLinkIcon = function HyperLinkIcon() {
496
- return /*#__PURE__*/React__default["default"].createElement("svg", {
497
- xmlns: "http://www.w3.org/2000/svg",
498
- width: "36",
499
- height: "28"
500
- }, /*#__PURE__*/React__default["default"].createElement("g", {
501
- fill: "none",
502
- fillRule: "evenodd"
503
- }, /*#__PURE__*/React__default["default"].createElement("rect", {
504
- width: "36",
505
- height: "28",
506
- fill: "#3D6FCF",
507
- rx: "4"
508
- }), /*#__PURE__*/React__default["default"].createElement("path", {
509
- stroke: "#FFF",
510
- strokeLinecap: "round",
511
- strokeLinejoin: "round",
512
- strokeWidth: "2",
513
- d: "M22 14.667v4c0 .736-.597 1.333-1.333 1.333h-7.334A1.333 1.333 0 0112 18.667v-7.334c0-.736.597-1.333 1.333-1.333h4M20 8h4v4m-7.333 3.333L24 8"
514
- })));
515
- };
516
-
517
- var HyperLink = function HyperLink(_ref) {
518
- var _ref$hyperLink = _ref.hyperLink,
519
- hyperLink = _ref$hyperLink === void 0 ? "" : _ref$hyperLink;
520
- if (!hyperLink) return null;
521
- return /*#__PURE__*/React__default["default"].createElement(components.Link, {
522
- href: hyperLink,
523
- "aria-label": "hyperlink-button",
524
- className: "arr--hyperlink-button hyperlink-m_hyperlink-button__1CqWx",
525
- target: "_blank",
526
- rel: "noopener noreferrer"
527
- }, /*#__PURE__*/React__default["default"].createElement(HyperLinkIcon, null));
528
- };
529
- HyperLink.propTypes = {
530
- hyperLink: PropTypes__default["default"].string
531
- };
532
-
533
- var _styleModuleImportMap$a = {
534
- "./hero-image.m.css": {
535
- "hero-image": "hero-image-m_hero-image__3lraV",
536
- "right-padding": "hero-image-m_right-padding__1LkCe",
537
- "left-padding": "hero-image-m_left-padding__pYRAj",
538
- "right-padding-mob": "hero-image-m_right-padding-mob__3-uOU",
539
- "placeholder": "hero-image-m_placeholder__1omCm",
540
- "hero-image-mob": "hero-image-m_hero-image-mob__13JJp",
541
- "with-padding": "hero-image-m_with-padding__324G_",
542
- "image": "hero-image-m_image__1mz0U"
543
- }
544
- };
545
- var HeroImage = function HeroImage(_ref) {
546
- var story = _ref.story,
547
- FullBleed = _ref.FullBleed,
548
- aspectRatio = _ref.aspectRatio,
549
- defaultWidth = _ref.defaultWidth,
550
- widths = _ref.widths,
551
- isHorizontal = _ref.isHorizontal,
552
- isHorizontalMobile = _ref.isHorizontalMobile,
553
- isHorizontalWithImageLast = _ref.isHorizontalWithImageLast,
554
- defaultFallback = _ref.defaultFallback,
555
- isStoryPageImage = _ref.isStoryPageImage,
556
- config = _ref.config;
557
-
558
- var _ref2 = useStateValue() || {},
559
- _ref2$fallbackImageUr = _ref2.fallbackImageUrl,
560
- fallbackImageUrl = _ref2$fallbackImageUr === void 0 ? "" : _ref2$fallbackImageUr;
561
-
562
- var _config$StoryTemplate = config.StoryTemplateIcon,
563
- StoryTemplateIcon = _config$StoryTemplate === void 0 ? function () {
564
- return null;
565
- } : _config$StoryTemplate;
566
- var showImagePlaceholder = reactRedux.useSelector(function (state) {
567
- return lodash.get(state, ["qt", "config", "showPlaceholder"]);
568
- });
569
- var getPlaceholderStyleName = showImagePlaceholder ? "placeholder" : "";
570
- var fullBleed = FullBleed ? "" : "with-padding";
571
- var heroImageClass = "hero-image";
572
- if (isHorizontal) heroImageClass = "right-padding";else if (isHorizontalWithImageLast) heroImageClass = "left-padding";
573
- var heroImageMobClasses = isHorizontalMobile ? "right-padding-mob" : "";
574
-
575
- var getPadding = function getPadding(aspectRatio) {
576
- var _aspectRatio = _slicedToArray__default["default"](aspectRatio, 2),
577
- height = _aspectRatio[0],
578
- width = _aspectRatio[1];
579
-
580
- if (height > 0 && width > 0) {
581
- var padding = width / height * 100;
582
- return padding;
583
- }
584
-
585
- return 0;
586
- };
587
-
588
- var _aspectRatio2 = _slicedToArray__default["default"](aspectRatio, 2),
589
- mobileAspectRatio = _aspectRatio2[0],
590
- _aspectRatio2$ = _aspectRatio2[1],
591
- desktopAspectRatio = _aspectRatio2$ === void 0 ? mobileAspectRatio : _aspectRatio2$;
592
-
593
- var isMobile = clientWidth("mobile");
594
- var imageAspectRatio = isMobile ? mobileAspectRatio : desktopAspectRatio;
595
- var imagePadding = isMobile ? getPadding(mobileAspectRatio) : getPadding(desktopAspectRatio);
596
- var slug = lodash.get(story, ["hero-image-s3-key"]) || lodash.get(story, ["alternative", "home", "default", "hero-image", "hero-image-s3-key"]);
597
- var hyperLink = lodash.get(story, ["hero-image-hyperlink"], "");
598
-
599
- var fallbackImage = function fallbackImage() {
600
- if (!slug) {
601
- if (fallbackImageUrl && !isStoryPageImage) {
602
- return /*#__PURE__*/React__default["default"].createElement("figure", {
603
- style: {
604
- paddingTop: imagePadding + "%"
605
- },
606
- className: "arr--responsive-hero-image " + _getClassName__default["default"]("image ".concat(getPlaceholderStyleName), _styleModuleImportMap$a)
607
- }, /*#__PURE__*/React__default["default"].createElement("img", {
608
- className: "qt-image",
609
- "data-src": "".concat(fallbackImageUrl),
610
- alt: "image-fallback"
611
- }));
612
- }
613
-
614
- return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, defaultFallback ? /*#__PURE__*/React__default["default"].createElement("div", {
615
- "data-test-id": "arr--fallback-hero-image",
616
- style: {
617
- paddingTop: imagePadding + "%"
618
- },
619
- className: "arr--fallback-hero-image " + _getClassName__default["default"]("image ".concat(getPlaceholderStyleName), _styleModuleImportMap$a)
620
- }, /*#__PURE__*/React__default["default"].createElement(StoryTemplateIcon, {
621
- storyTemplate: story["story-template"]
622
- }), /*#__PURE__*/React__default["default"].createElement(FallbackImage, null)) : null);
623
- }
624
-
625
- return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("figure", {
626
- style: {
627
- paddingTop: imagePadding + "%"
628
- },
629
- className: "arr--responsive-hero-image " + _getClassName__default["default"]("image ".concat(getPlaceholderStyleName), _styleModuleImportMap$a)
630
- }, /*#__PURE__*/React__default["default"].createElement(StoryTemplateIcon, {
631
- storyTemplate: story["story-template"]
632
- }), /*#__PURE__*/React__default["default"].createElement(components.ResponsiveHeroImage, {
633
- story: story,
634
- aspectRatio: imageAspectRatio,
635
- defaultWidth: defaultWidth,
636
- widths: widths,
637
- imgParams: {
638
- auto: ["format", "compress"],
639
- fit: "max"
640
- }
641
- })), isStoryPageImage && hyperLink && /*#__PURE__*/React__default["default"].createElement(HyperLink, {
642
- hyperLink: hyperLink
643
- }));
644
- };
645
-
646
- return story && (isStoryPageImage ? /*#__PURE__*/React__default["default"].createElement("div", {
647
- "data-test-id": "arr--hero-image",
648
- className: "arr--hero-image " + _getClassName__default["default"]("".concat(heroImageClass, " ").concat(fullBleed, " ").concat(heroImageMobClasses), _styleModuleImportMap$a)
649
- }, fallbackImage()) : /*#__PURE__*/React__default["default"].createElement(components.Link, {
650
- "data-test-id": "arr--hero-image",
651
- href: getStoryUrl(story, "/".concat(story.slug)),
652
- externalLink: isExternalStory(story),
653
- "aria-label": "fallback-hero-image",
654
- className: "arr--hero-image " + _getClassName__default["default"]("".concat(heroImageClass, " ").concat(fullBleed, " ").concat(heroImageMobClasses), _styleModuleImportMap$a)
655
- }, fallbackImage()));
656
- };
657
- HeroImage.propTypes = {
658
- /** The Story Object from the API response */
659
- story: PropTypes__default["default"].object.isRequired,
660
-
661
- /** Removes the Hero Image padding for the image to bleed over the margin */
662
- FullBleed: PropTypes__default["default"].bool,
663
-
664
- /** The default width for the image, in case the browser does not support srcset */
665
- defaultWidth: PropTypes__default["default"].number,
666
-
667
- /** The list of available widths */
668
- widths: PropTypes__default["default"].array,
669
- // fatch the correct hero image
670
- aspectRatio: PropTypes__default["default"].array,
671
- // Hints for the browser to choose the best size
672
-
673
- /** This prop is responsible for adding padding-right of the image and remove padding bottom of the image */
674
- isHorizontal: PropTypes__default["default"].bool,
675
-
676
- /** This prop is responsible for adding padding-bottom in desktop and padding-right in mobile */
677
- isHorizontalMobile: PropTypes__default["default"].bool,
678
- // this prop is responsive for rendering fallback image on story page
679
- defaultFallback: PropTypes__default["default"].bool,
680
- isHorizontalWithImageLast: PropTypes__default["default"].bool,
681
- isStoryPageImage: PropTypes__default["default"].bool,
682
- config: PropTypes__default["default"].object
683
- };
684
- HeroImage.defaultProps = {
685
- FullBleed: true,
686
- aspectRatio: [[1, 1], [16, 9]],
687
- defaultWidth: 480,
688
- widths: [250, 480, 640],
689
- isHorizontal: false,
690
- isHorizontalMobile: false,
691
- defaultFallback: true,
692
- isStoryPageImage: false,
693
- isHorizontalWithImageLast: false,
694
- config: {}
695
- };
696
-
697
- var CrownIcon = function CrownIcon(_ref) {
698
- var height = _ref.height,
699
- width = _ref.width,
700
- _ref$color = _ref.color,
701
- color = _ref$color === void 0 ? "#D8D8D8" : _ref$color,
702
- positionTop = _ref.positionTop;
703
- return /*#__PURE__*/React__default["default"].createElement("svg", {
704
- xmlns: "http://www.w3.org/2000/svg",
705
- width: width,
706
- height: height,
707
- viewBox: "0 0 40 40",
708
- style: {
709
- position: "relative",
710
- top: positionTop
711
- }
712
- }, /*#__PURE__*/React__default["default"].createElement("g", {
713
- fill: "none",
714
- fillRule: "evenodd",
715
- stroke: "none",
716
- strokeWidth: "1"
717
- }, /*#__PURE__*/React__default["default"].createElement("g", null, /*#__PURE__*/React__default["default"].createElement("g", {
718
- transform: "translate(8 8)"
719
- }, /*#__PURE__*/React__default["default"].createElement("path", {
720
- d: "M0 0H24V24H0z"
721
- }), /*#__PURE__*/React__default["default"].createElement("g", {
722
- fill: color,
723
- fillRule: "nonzero",
724
- transform: "translate(0 2)"
725
- }, /*#__PURE__*/React__default["default"].createElement("path", {
726
- 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"
727
- }))))));
728
- };
729
- CrownIcon.propTypes = {
730
- height: PropTypes__default["default"].string,
731
- width: PropTypes__default["default"].string,
732
- color: PropTypes__default["default"].string,
733
- positionTop: PropTypes__default["default"].string
734
- };
735
-
736
- var KeyIcon = function KeyIcon(_ref) {
737
- var height = _ref.height,
738
- width = _ref.width,
739
- _ref$color = _ref.color,
740
- color = _ref$color === void 0 ? "#D5D5D5" : _ref$color,
741
- positionTop = _ref.positionTop;
742
- return /*#__PURE__*/React__default["default"].createElement("svg", {
743
- xmlns: "http://www.w3.org/2000/svg",
744
- width: width,
745
- height: height,
746
- viewBox: "0 0 40 40",
747
- style: {
748
- position: "relative",
749
- top: positionTop
750
- }
751
- }, /*#__PURE__*/React__default["default"].createElement("g", {
752
- fill: "none",
753
- fillRule: "evenodd",
754
- stroke: "none",
755
- strokeWidth: "1"
756
- }, /*#__PURE__*/React__default["default"].createElement("g", null, /*#__PURE__*/React__default["default"].createElement("g", {
757
- transform: "translate(8 8)"
758
- }, /*#__PURE__*/React__default["default"].createElement("path", {
759
- d: "M0 0H24V24H0z"
760
- }), /*#__PURE__*/React__default["default"].createElement("path", {
761
- fill: color,
762
- fillRule: "nonzero",
763
- 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",
764
- transform: "translate(0 5)"
765
- })))));
766
- };
767
- KeyIcon.propTypes = {
768
- height: PropTypes__default["default"].string,
769
- width: PropTypes__default["default"].string,
770
- color: PropTypes__default["default"].string,
771
- positionTop: PropTypes__default["default"].string
772
- };
773
-
774
- var LockIcon = function LockIcon(_ref) {
775
- var height = _ref.height,
776
- width = _ref.width,
777
- _ref$color = _ref.color,
778
- color = _ref$color === void 0 ? "#D5D5D5" : _ref$color,
779
- positionTop = _ref.positionTop;
780
- return /*#__PURE__*/React__default["default"].createElement("svg", {
781
- xmlns: "http://www.w3.org/2000/svg",
782
- width: width,
783
- height: height,
784
- viewBox: "0 0 40 40",
785
- style: {
786
- position: "relative",
787
- top: positionTop
788
- }
789
- }, /*#__PURE__*/React__default["default"].createElement("g", {
790
- fill: "none",
791
- fillRule: "evenodd",
792
- stroke: "none",
793
- strokeWidth: "1"
794
- }, /*#__PURE__*/React__default["default"].createElement("g", null, /*#__PURE__*/React__default["default"].createElement("g", {
795
- transform: "translate(8 8)"
796
- }, /*#__PURE__*/React__default["default"].createElement("path", {
797
- d: "M0 0H24V24H0z"
798
- }), /*#__PURE__*/React__default["default"].createElement("g", {
799
- fill: color,
800
- fillRule: "nonzero",
801
- transform: "translate(3)"
802
- }, /*#__PURE__*/React__default["default"].createElement("path", {
803
- 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"
804
- }))))));
805
- };
806
- LockIcon.propTypes = {
807
- height: PropTypes__default["default"].string,
808
- width: PropTypes__default["default"].string,
809
- color: PropTypes__default["default"].string,
810
- positionTop: PropTypes__default["default"].string
811
- };
812
-
813
- var StarIcon = function StarIcon(_ref) {
814
- var width = _ref.width,
815
- height = _ref.height,
816
- _ref$color = _ref.color,
817
- color = _ref$color === void 0 ? "#D5D5D5" : _ref$color,
818
- _ref$positionTop = _ref.positionTop,
819
- positionTop = _ref$positionTop === void 0 ? "" : _ref$positionTop;
820
- return /*#__PURE__*/React__default["default"].createElement("svg", {
821
- xmlns: "http://www.w3.org/2000/svg",
822
- width: width,
823
- height: height,
824
- viewBox: "0 0 40 40",
825
- style: {
826
- position: "relative",
827
- top: positionTop
828
- }
829
- }, /*#__PURE__*/React__default["default"].createElement("g", {
830
- fill: "none",
831
- fillRule: "evenodd",
832
- stroke: "none",
833
- strokeWidth: "1"
834
- }, /*#__PURE__*/React__default["default"].createElement("g", null, /*#__PURE__*/React__default["default"].createElement("path", {
835
- fill: color,
836
- 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"
837
- }))));
838
- };
839
- StarIcon.propTypes = {
840
- height: PropTypes__default["default"].string,
841
- width: PropTypes__default["default"].string,
842
- color: PropTypes__default["default"].string,
843
- positionTop: PropTypes__default["default"].string
844
- };
845
-
846
- var PremiumStoryIcon = function PremiumStoryIcon(_ref) {
847
- var width = _ref.width,
848
- height = _ref.height,
849
- color = _ref.color,
850
- iconType = _ref.iconType,
851
- positionTop = _ref.positionTop;
852
-
853
- switch (iconType) {
854
- case "crown":
855
- return /*#__PURE__*/React__default["default"].createElement(CrownIcon, {
856
- width: width,
857
- height: height,
858
- color: color,
859
- positionTop: positionTop
860
- });
861
-
862
- case "lock":
863
- return /*#__PURE__*/React__default["default"].createElement(LockIcon, {
864
- width: width,
865
- height: height,
866
- color: color,
867
- positionTop: positionTop
868
- });
869
-
870
- case "key":
871
- return /*#__PURE__*/React__default["default"].createElement(KeyIcon, {
872
- width: width,
873
- height: height,
874
- color: color,
875
- positionTop: positionTop
876
- });
877
-
878
- default:
879
- return /*#__PURE__*/React__default["default"].createElement(StarIcon, {
880
- width: width,
881
- height: height,
882
- color: color,
883
- positionTop: positionTop
884
- });
885
- }
886
- };
887
- PremiumStoryIcon.propTypes = {
888
- width: PropTypes__default["default"].string,
889
- height: PropTypes__default["default"].string,
890
- color: PropTypes__default["default"].string,
891
- iconType: PropTypes__default["default"].string,
892
- positionTop: PropTypes__default["default"].string
893
- };
894
-
895
- function LiveIcon() {
896
- return /*#__PURE__*/React__default["default"].createElement("svg", {
897
- className: "live-icon",
898
- xmlns: "http://www.w3.org/2000/svg",
899
- width: "25",
900
- height: "24",
901
- viewBox: "0 0 25 24"
902
- }, /*#__PURE__*/React__default["default"].createElement("path", {
903
- fill: "#ff5858",
904
- 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"
905
- }));
906
- }
907
-
908
- var _styleModuleImportMap$9 = {
909
- "./headline.m.css": {
910
- "wrapper": "headline-m_wrapper__3nUmh",
911
- "headline": "headline-m_headline__3_NhV",
912
- "dark": "headline-m_dark__en3hW",
913
- "light": "headline-m_light__3lKJB"
914
- }
915
- };
916
- var Headline = function Headline(_ref) {
917
- var story = _ref.story,
918
- headerLevel = _ref.headerLevel,
919
- _ref$premiumStoryIcon = _ref.premiumStoryIconConfig,
920
- premiumStoryIconConfig = _ref$premiumStoryIcon === void 0 ? {} : _ref$premiumStoryIcon,
921
- isLink = _ref.isLink;
922
- var configData = useStateValue() || {};
923
- var _premiumStoryIconConf = premiumStoryIconConfig.iconColor,
924
- iconColor = _premiumStoryIconConf === void 0 ? "#F7B500" : _premiumStoryIconConf,
925
- _premiumStoryIconConf2 = premiumStoryIconConfig.iconStyle,
926
- iconStyle = _premiumStoryIconConf2 === void 0 ? "star" : _premiumStoryIconConf2,
927
- _premiumStoryIconConf3 = premiumStoryIconConfig.enablePremiumStoryIcon,
928
- enablePremiumStoryIcon = _premiumStoryIconConf3 === void 0 ? false : _premiumStoryIconConf3,
929
- _premiumStoryIconConf4 = premiumStoryIconConfig.showLiveIcon,
930
- showLiveIcon = _premiumStoryIconConf4 === void 0 ? false : _premiumStoryIconConf4;
931
- var alternateHeadline = lodash.get(story, ["alternative", "home", "default", "headline"]);
932
- var premiumStory = enablePremiumStoryIcon && lodash.get(story, ["access"]) === "subscription";
933
- var headline = alternateHeadline || story.headline;
934
- var HeaderTag = "h" + headerLevel;
935
-
936
- var positionHeadline = function positionHeadline() {
937
- switch (parseInt(headerLevel)) {
938
- case 1:
939
- return "-2px";
940
-
941
- case 2:
942
- return "2px";
943
-
944
- case 3:
945
- return "4px";
946
-
947
- case 4:
948
- return "5px";
949
-
950
- default:
951
- return "6px";
952
- }
953
- };
954
-
955
- var textColor = getTextColor(configData.theme);
956
- var wrapperClass = premiumStory ? "wrapper" : "";
957
- var iconSize = "24px";
958
- var enableLiveIcon = showLiveIcon && story["story-template"] === "live-blog" && !lodash.get(story, ["metadata", "is-closed"], false);
959
- return /*#__PURE__*/React__default["default"].createElement("div", {
960
- "data-test-id": "headline",
961
- className: "arrow-component arr--headline " + _getClassName__default["default"](wrapperClass, _styleModuleImportMap$9)
962
- }, premiumStory && /*#__PURE__*/React__default["default"].createElement(PremiumStoryIcon, {
963
- width: iconSize,
964
- height: iconSize,
965
- color: iconColor,
966
- iconType: iconStyle,
967
- positionTop: positionHeadline()
968
- }), isLink ? /*#__PURE__*/React__default["default"].createElement(components.Link, {
969
- href: getStoryUrl(story, "/".concat(story.slug)),
970
- externalLink: isExternalStory(story),
971
- "aria-label": "headline"
972
- }, /*#__PURE__*/React__default["default"].createElement(HeaderTag, {
973
- className: _getClassName__default["default"]("headline ".concat(textColor), _styleModuleImportMap$9)
974
- }, enableLiveIcon && /*#__PURE__*/React__default["default"].createElement(LiveIcon, null), headline)) : /*#__PURE__*/React__default["default"].createElement(HeaderTag, {
975
- className: _getClassName__default["default"]("headline ".concat(textColor), _styleModuleImportMap$9)
976
- }, enableLiveIcon && /*#__PURE__*/React__default["default"].createElement(LiveIcon, null), headline));
977
- };
978
- Headline.propTypes = {
979
- /** The Story Object from the API response */
980
- story: PropTypes__default["default"].object.isRequired,
981
-
982
- /** Header tags ranging h1-h6, where h[headerLevel] */
983
- headerLevel: PropTypes__default["default"].string,
984
- premiumStoryIconConfig: PropTypes__default["default"].shape({
985
- iconColor: PropTypes__default["default"].string,
986
- iconType: PropTypes__default["default"].string,
987
- enablePremiumStoryIcon: PropTypes__default["default"].bool
988
- }),
989
- isLink: PropTypes__default["default"].bool
990
- };
991
- Headline.defaultProps = {
992
- headerLevel: "6",
993
- isLink: true
994
- };
995
-
996
- var _styleModuleImportMap$8 = {
997
- "./subheadline.m.css": {
998
- "subheadline": "subheadline-m_subheadline__3fd7z",
999
- "dark": "subheadline-m_dark__28u00",
1000
- "light": "subheadline-m_light__2YUOe"
1001
- }
1002
- };
1003
- var Subheadline = function Subheadline(_ref) {
1004
- var story = _ref.story,
1005
- _ref$truncateChars = _ref.truncateChars,
1006
- truncateChars = _ref$truncateChars === void 0 ? 200 : _ref$truncateChars,
1007
- lineClamp = _ref.lineClamp,
1008
- _ref$clazzName = _ref.clazzName,
1009
- clazzName = _ref$clazzName === void 0 ? "" : _ref$clazzName,
1010
- forceShowAtom = _ref.forceShowAtom,
1011
- showFullContent = _ref.showFullContent;
1012
- var config = useStateValue() || {};
1013
- var subheadline = forceShowAtom || lodash.get(config, ["showSubheadline"], true);
1014
- if (!subheadline) return null;
1015
- var textColor = getTextColor(config.theme);
1016
- return /*#__PURE__*/React__default["default"].createElement("div", {
1017
- style: {
1018
- WebkitLineClamp: lineClamp
1019
- },
1020
- "data-test-id": "subheadline",
1021
- className: ("p-alt arr--sub-headline arrow-component ".concat(clazzName) ? "p-alt arr--sub-headline arrow-component ".concat(clazzName) + " " : "") + _getClassName__default["default"]("subheadline ".concat(textColor), _styleModuleImportMap$8)
1022
- }, showFullContent || typeof lineClamp === "number" ? story.subheadline : truncate(story.subheadline, truncateChars, true));
1023
- };
1024
- Subheadline.propTypes = {
1025
- /** The Story Object from the API response */
1026
- story: PropTypes__default["default"].object.isRequired,
1027
- // Restricts the number of lines for subheadline.
1028
- lineClamp: PropTypes__default["default"].number,
1029
-
1030
- /** Number of characters to truncate the subheadline */
1031
- truncateChars: PropTypes__default["default"].number,
1032
- clazzName: PropTypes__default["default"].string,
1033
- forceShowAtom: PropTypes__default["default"].bool,
1034
- showFullContent: PropTypes__default["default"].bool
1035
- };
1036
- Subheadline.defaultProps = {
1037
- forceShowAtom: false,
1038
- showFullContent: false
1039
- };
1040
-
1041
- var _styleModuleImportMap$7 = {
1042
- "./timestamp.m.css": {
1043
- "time": "timestamp-m_time__2v46i",
1044
- "time-wrapper": "timestamp-m_time-wrapper__3O2lM",
1045
- "bottom-fix": "timestamp-m_bottom-fix__1Zh8r",
1046
- "dark": "timestamp-m_dark__2lk9E",
1047
- "light": "timestamp-m_light__2QlrI"
1048
- }
1049
- };
1050
- var TimeStamp = function TimeStamp(_ref) {
1051
- var story = _ref.story,
1052
- isBottom = _ref.isBottom,
1053
- _ref$config = _ref.config,
1054
- config = _ref$config === void 0 ? {} : _ref$config;
1055
- var configState = useStateValue() || {};
1056
- var isTime = lodash.get(config, ["showTime"], lodash.get(configState, ["showTime"], true));
1057
- var time = story["last-published-at"] || story["first-published-at"];
1058
- var isBottomClasses = isBottom ? "bottom-fix" : "";
1059
- var textColor = getTextColor(configState.theme);
1060
- return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isTime && /*#__PURE__*/React__default["default"].createElement("div", {
1061
- "data-test-id": "publish-time",
1062
- className: "time arr--publish-time " + _getClassName__default["default"]("time ".concat(textColor, " ").concat(isBottomClasses), _styleModuleImportMap$7)
1063
- }, /*#__PURE__*/React__default["default"].createElement("div", {
1064
- className: "timestamp-m_time-wrapper__3O2lM"
1065
- }, getTimeStamp(time, formatter, config))));
1066
- };
1067
- TimeStamp.propTypes = {
1068
- /** The Story Object from the API response */
1069
- story: PropTypes__default["default"].object,
1070
- isBottom: PropTypes__default["default"].bool,
1071
- config: PropTypes__default["default"].object
1072
- };
1073
-
1074
- var _styleModuleImportMap$6 = {
1075
- "./author.m.css": {
1076
- "author": "author-m_author__WRuLm",
1077
- "author-image": "author-m_author-image__3q2oc",
1078
- "author-name": "author-m_author-name__3WP-O",
1079
- "bottom-fix": "author-m_bottom-fix__223TT",
1080
- "prefix": "author-m_prefix__YSInK",
1081
- "rtl-image": "author-m_rtl-image__2nglD",
1082
- "ltr-image": "author-m_ltr-image__3bc0L",
1083
- "dark": "author-m_dark__2TTlp",
1084
- "light": "author-m_light__3y8_x"
1085
- }
1086
- };
1087
-
1088
- var AuthorBase = function AuthorBase(_ref) {
1089
- var story = _ref.story,
1090
- hideAuthorImage = _ref.hideAuthorImage,
1091
- isBottom = _ref.isBottom,
1092
- _ref$prefix = _ref.prefix,
1093
- prefix = _ref$prefix === void 0 ? "" : _ref$prefix,
1094
- _ref$config = _ref.config,
1095
- config = _ref$config === void 0 ? {} : _ref$config;
1096
- var configData = useStateValue() || {};
1097
- var isAuthor = lodash.get(configData, ["showAuthor"], true);
1098
-
1099
- var _get = lodash.get(story, ["authors", "0"], ""),
1100
- avatarUrl = _get["avatar-url"],
1101
- avatarS3Key = _get["avatar-s3-key"],
1102
- authorName = _get.name,
1103
- slug = _get.slug;
1104
-
1105
- var isBottomClasses = isBottom ? "bottom-fix" : "";
1106
- var textColor = getTextColor(configData.theme);
1107
- var mountAt = lodash.get(config, ["mountAt"], "");
1108
-
1109
- var authorImage = function authorImage(dir) {
1110
- if (!avatarUrl && !avatarS3Key) {
1111
- return null;
1112
- }
1113
-
1114
- return /*#__PURE__*/React__default["default"].createElement("div", {
1115
- "data-test-id": "author-image",
1116
- className: _getClassName__default["default"]("author-image ".concat(dir, "-image"), _styleModuleImportMap$6)
1117
- }, /*#__PURE__*/React__default["default"].createElement("figure", null, avatarS3Key ? /*#__PURE__*/React__default["default"].createElement(components.ResponsiveImage, {
1118
- slug: avatarS3Key,
1119
- "aspect-ratio": [1, 1],
1120
- defaultWidth: 400,
1121
- imgParams: {
1122
- auto: ["format", "compress"]
1123
- },
1124
- alt: authorName
1125
- }) : /*#__PURE__*/React__default["default"].createElement("img", {
1126
- src: avatarUrl
1127
- })));
1128
- };
1129
-
1130
- var isPrefix = function isPrefix(dir) {
1131
- if (prefix) {
1132
- return /*#__PURE__*/React__default["default"].createElement("div", {
1133
- className: "arr-author-prefix " + _getClassName__default["default"]("prefix ".concat(textColor), _styleModuleImportMap$6)
1134
- }, prefix);
1135
- }
1136
-
1137
- return !hideAuthorImage && authorImage(dir);
1138
- };
1139
-
1140
- return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isAuthor && /*#__PURE__*/React__default["default"].createElement(components.Link, {
1141
- href: "".concat(mountAt, "/author/") + slug,
1142
- "aria-label": "author-name",
1143
- className: "author-name arr-author-name arrow-component " + _getClassName__default["default"]("author ".concat(isBottomClasses), _styleModuleImportMap$6)
1144
- }, isPrefix("ltr"), /*#__PURE__*/React__default["default"].createElement("div", {
1145
- "data-test-id": "author-name",
1146
- className: "author-name " + _getClassName__default["default"]("author-name ".concat(textColor), _styleModuleImportMap$6)
1147
- }, authorName || story["author-name"]), !prefix && isPrefix("rtl")));
1148
- };
1149
-
1150
- function mapStateToProps(state) {
1151
- return {
1152
- config: lodash.get(state, ["qt", "config"], {})
1153
- };
1154
- }
1155
-
1156
- var Author = reactRedux.connect(mapStateToProps)(AuthorBase);
1157
- AuthorBase.propTypes = {
1158
- /** The Story Object from the API response */
1159
- story: PropTypes__default["default"].object.isRequired,
1160
-
1161
- /** Hide Author Avatar Image */
1162
- hideAuthorImage: PropTypes__default["default"].bool,
1163
- // fix Author bottom of the storyCard
1164
- isBottom: PropTypes__default["default"].bool,
1165
- // fix prefix before the author name
1166
- prefix: PropTypes__default["default"].string,
1167
- config: PropTypes__default["default"].object
1168
- };
1169
- AuthorBase.defaultProps = {
1170
- hideAuthorImage: false,
1171
- isBottom: false,
1172
- prefix: ""
1173
- };
1174
-
1175
- var _styleModuleImportMap$5 = {
1176
- "./dot.m.css": {
1177
- "dark": "dot-m_dark__1Njxl",
1178
- "light": "dot-m_light__27IA3"
1179
- }
1180
- };
1181
- var Dot = function Dot(_ref) {
1182
- var _ref$width = _ref.width,
1183
- width = _ref$width === void 0 ? "3px" : _ref$width,
1184
- _ref$height = _ref.height,
1185
- height = _ref$height === void 0 ? "3px" : _ref$height,
1186
- _ref$color = _ref.color,
1187
- color = _ref$color === void 0 ? "light" : _ref$color;
1188
- return /*#__PURE__*/React__default["default"].createElement("div", {
1189
- className: _getClassName__default["default"](color, _styleModuleImportMap$5)
1190
- }, /*#__PURE__*/React__default["default"].createElement("svg", {
1191
- xmlns: "http://www.w3.org/2000/svg",
1192
- width: width,
1193
- height: height,
1194
- viewBox: "0 0 3 3"
1195
- }, /*#__PURE__*/React__default["default"].createElement("circle", {
1196
- cx: "87",
1197
- cy: "9",
1198
- r: "1",
1199
- fill: "inherit",
1200
- fillRule: "nonzero",
1201
- transform: "translate(-86 -8)"
1202
- })));
1203
- };
1204
- Dot.propTypes = {
1205
- /** height , width and color of the dot icon */
1206
- color: PropTypes__default["default"].string,
1207
- width: PropTypes__default["default"].string,
1208
- height: PropTypes__default["default"].string
1209
- };
1210
-
1211
- var _styleModuleImportMap$4 = {
1212
- "./divider.m.css": {
1213
- "dark": "divider-m_dark__26FRi",
1214
- "light": "divider-m_light__w-7sy"
1215
- }
1216
- };
1217
- var Divider = function Divider(_ref) {
1218
- var _ref$width = _ref.width,
1219
- width = _ref$width === void 0 ? "1" : _ref$width,
1220
- _ref$height = _ref.height,
1221
- height = _ref$height === void 0 ? "10" : _ref$height,
1222
- _ref$color = _ref.color,
1223
- color = _ref$color === void 0 ? "light" : _ref$color;
1224
- return /*#__PURE__*/React__default["default"].createElement("div", {
1225
- className: _getClassName__default["default"](color, _styleModuleImportMap$4)
1226
- }, /*#__PURE__*/React__default["default"].createElement("svg", {
1227
- xmlns: "http://www.w3.org/2000/svg",
1228
- width: width,
1229
- height: height
1230
- }, /*#__PURE__*/React__default["default"].createElement("path", {
1231
- fill: "inherit",
1232
- d: "M0 0h1v10H0z"
1233
- })));
1234
- };
1235
- Divider.propTypes = {
1236
- /** height , width and color of the dot icon */
1237
- color: PropTypes__default["default"].string,
1238
- width: PropTypes__default["default"].string,
1239
- height: PropTypes__default["default"].string
1240
- };
1241
-
1242
- var _styleModuleImportMap$3 = {
1243
- "./read-time.m.css": {
1244
- "read-time-wrapper": "read-time-m_read-time-wrapper__3GyC_",
1245
- "dot-indicator": "read-time-m_dot-indicator__3Sqh2",
1246
- "dark": "read-time-m_dark__3yRaK",
1247
- "light": "read-time-m_light__1GAZu"
1248
- }
1249
- };
1250
- var ReadTime = function ReadTime(_ref) {
1251
- var story = _ref.story,
1252
- _ref$opts = _ref.opts,
1253
- opts = _ref$opts === void 0 ? {} : _ref$opts,
1254
- _ref$isLightTheme = _ref.isLightTheme,
1255
- isLightTheme = _ref$isLightTheme === void 0 ? false : _ref$isLightTheme;
1256
- var config = useStateValue() || {};
1257
- var showReadTime = lodash.get(config, ["showReadTime"]) || lodash.get(opts, ["showReadTime"], true);
1258
- var readTime = lodash.get(story, ["read-time"], 0);
1259
- var textColor = isLightTheme ? "light" : getTextColor(config.theme);
1260
- if (!showReadTime || !readTime) return null;
1261
- var timeToRead = lodash.get(opts, ["localizedTimeToRead"]) || "min read";
1262
- return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
1263
- "data-test-id": "read-time",
1264
- className: "arrow-component arr--read-time " + _getClassName__default["default"]("read-time-wrapper ".concat(textColor), _styleModuleImportMap$3)
1265
- }, /*#__PURE__*/React__default["default"].createElement("span", {
1266
- className: "read-time-indicator read-time-m_dot-indicator__3Sqh2"
1267
- }, /*#__PURE__*/React__default["default"].createElement(Dot, {
1268
- color: textColor
1269
- })), /*#__PURE__*/React__default["default"].createElement("span", null, readTime, " ", timeToRead)));
1270
- };
1271
- ReadTime.propTypes = {
1272
- story: PropTypes__default["default"].shape({
1273
- "read-time": PropTypes__default["default"].number
1274
- }),
1275
- opts: PropTypes__default["default"].shape({
1276
- showReadTime: PropTypes__default["default"].bool
1277
- }),
1278
- isLightTheme: PropTypes__default["default"].bool
1279
- };
1280
-
1281
- var _styleModuleImportMap$2 = {
1282
- "./author-with-timestamp.m.css": {
1283
- "author-time-wrapper": "author-with-timestamp-m_author-time-wrapper__G7_eI",
1284
- "author-image": "author-with-timestamp-m_author-image__24xrD",
1285
- "dot": "author-with-timestamp-m_dot__1LHXD",
1286
- "bottom-fix": "author-with-timestamp-m_bottom-fix__1rWGv",
1287
- "dash": "author-with-timestamp-m_dash__2L5XC"
1288
- }
1289
- };
1290
- var AuthorWithTime = function AuthorWithTime(_ref) {
1291
- var story = _ref.story,
1292
- separator = _ref.separator,
1293
- isBottom = _ref.isBottom,
1294
- hideAuthorImage = _ref.hideAuthorImage,
1295
- prefix = _ref.prefix,
1296
- _ref$config = _ref.config,
1297
- config = _ref$config === void 0 ? {} : _ref$config,
1298
- isLightTheme = _ref.isLightTheme;
1299
- var configState = useStateValue() || {};
1300
- var isAuthor = lodash.get(config, ["showAuthor"], lodash.get(configState, ["showAuthor"], true));
1301
- var isTime = lodash.get(config, ["showTime"], lodash.get(configState, ["showTime"], true));
1302
- var isReadTime = lodash.get(configState, ["showReadTime"], true);
1303
- var isBottomClasses = isBottom ? "bottom-fix" : "";
1304
- var seperatorStyle = separator === "dot" ? "dot" : "dash";
1305
- var textColor = isLightTheme ? "light" : getTextColor(configState.theme);
1306
-
1307
- var getSeparator = function getSeparator() {
1308
- if (separator === "divider") {
1309
- return /*#__PURE__*/React__default["default"].createElement(Divider, {
1310
- color: textColor
1311
- });
1312
- }
1313
-
1314
- return /*#__PURE__*/React__default["default"].createElement(Dot, {
1315
- color: textColor
1316
- });
1317
- };
1318
-
1319
- var getTimeStamp = function getTimeStamp() {
1320
- if (!isTime) return null;
1321
- return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isAuthor && /*#__PURE__*/React__default["default"].createElement("span", {
1322
- className: "arr-separator " + _getClassName__default["default"]("".concat(seperatorStyle), _styleModuleImportMap$2)
1323
- }, getSeparator()), /*#__PURE__*/React__default["default"].createElement(TimeStamp, {
1324
- story: story,
1325
- config: config
1326
- }), isReadTime && /*#__PURE__*/React__default["default"].createElement(ReadTime, {
1327
- story: story,
1328
- opts: config,
1329
- isLightTheme: isLightTheme
1330
- }));
1331
- };
1332
-
1333
- return /*#__PURE__*/React__default["default"].createElement("div", {
1334
- className: "arr--author-time " + _getClassName__default["default"]("author-time-wrapper ".concat(isBottomClasses), _styleModuleImportMap$2)
1335
- }, isAuthor ? /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(Author, {
1336
- story: story,
1337
- isBottom: true,
1338
- hideAuthorImage: hideAuthorImage,
1339
- prefix: prefix
1340
- }), getTimeStamp()) : getTimeStamp());
1341
- };
1342
- AuthorWithTime.propTypes = {
1343
- story: PropTypes__default["default"].object,
1344
-
1345
- /** Style of separator between the Author & Timestamp */
1346
- separator: PropTypes__default["default"].oneOf(["dot", "divider"]),
1347
-
1348
- /** hide the author image */
1349
- hideAuthorImage: PropTypes__default["default"].bool,
1350
- // fix author and time at the end
1351
- isBottom: PropTypes__default["default"].bool,
1352
- // fix prefix before the author name
1353
- prefix: PropTypes__default["default"].string,
1354
- config: PropTypes__default["default"].object,
1355
- isLightTheme: PropTypes__default["default"].bool
1356
- };
1357
- AuthorWithTime.defaultProps = {
1358
- separator: "dot",
1359
- isBottom: false,
1360
- hideAuthorImage: true,
1361
- prefix: "",
1362
- isLightTheme: false
1363
- };
1364
-
1365
- var _styleModuleImportMap$1 = {
1366
- "./section.m.css": {
1367
- "section": "section-m_section__2N4S3",
1368
- "section-borderBottomSml": "section-m_section-borderBottomSml__2GNbo",
1369
- "border-bottom": "section-m_border-bottom__3cRoD",
1370
- "section-borderLeft": "section-m_section-borderLeft__3hKVj",
1371
- "border-left": "section-m_border-left__2oUyp",
1372
- "section-solid": "section-m_section-solid__1vB1Q",
1373
- "dark": "section-m_dark__1r3C4",
1374
- "light": "section-m_light__306hW"
1375
- }
1376
- };
1377
- var SectionTag = function SectionTag(_ref) {
1378
- var story = _ref.story,
1379
- _ref$template = _ref.template,
1380
- template = _ref$template === void 0 ? "" : _ref$template,
1381
- _ref$borderColor = _ref.borderColor,
1382
- borderColor = _ref$borderColor === void 0 ? "" : _ref$borderColor,
1383
- isLightTheme = _ref.isLightTheme;
1384
- var config = useStateValue() || {};
1385
- var isSection = lodash.get(config, ["showSection"], true);
1386
- var templateFromRowContext = lodash.get(config, ["sectionTagTemplate"]);
1387
- var section = lodash.get(story, ["sections", 0], "");
1388
- var supportedTemplates = ["borderBottomSml", "borderLeft", "solid"];
1389
- var getUrl = section ? section["section-url"] : "/";
1390
- var colorToApplyContrast = template === "solid" || templateFromRowContext === "solid" ? borderColor : config.theme;
1391
- var textColor = isLightTheme ? "light" : getTextColor(colorToApplyContrast);
1392
- var sectionTagBorderColor = rgbToHex(borderColor);
1393
- var templateStyle = supportedTemplates.includes(template) ? "section section-".concat(template) : "section";
1394
-
1395
- if (templateFromRowContext) {
1396
- templateStyle = supportedTemplates.includes(templateFromRowContext) ? "section section-".concat(templateFromRowContext) : "section";
1397
- }
1398
-
1399
- if (!isSection) return null;
1400
- return /*#__PURE__*/React__default["default"].createElement(components.Link, {
1401
- href: getUrl,
1402
- className: "arrow-component arr--section-name",
1403
- "aria-label": "section-name"
1404
- }, /*#__PURE__*/React__default["default"].createElement("div", {
1405
- "data-test-id": "sectionTag",
1406
- style: {
1407
- backgroundColor: templateStyle.includes("section-solid") ? sectionTagBorderColor : ""
1408
- },
1409
- className: "section-tag arrow-component " + _getClassName__default["default"]("".concat(textColor, " ").concat(templateStyle), _styleModuleImportMap$1)
1410
- }, templateStyle.includes("section-borderLeft") && /*#__PURE__*/React__default["default"].createElement("span", {
1411
- className: "section-m_border-left__2oUyp",
1412
- style: {
1413
- color: sectionTagBorderColor
1414
- }
1415
- }), section["display-name"] || section["name"], /*#__PURE__*/React__default["default"].createElement("div", {
1416
- className: "section-m_border-bottom__3cRoD",
1417
- style: {
1418
- backgroundColor: "".concat(template === "solid" ? "" : sectionTagBorderColor)
1419
- }
1420
- })));
1421
- };
1422
- SectionTag.propTypes = {
1423
- /** The Story Object from the API response */
1424
- story: PropTypes__default["default"].object.isRequired,
1425
-
1426
- /** The style template for section tag */
1427
- template: PropTypes__default["default"].oneOf(["", "borderBottomSml", "borderLeft", "solid"]),
1428
- borderColor: PropTypes__default["default"].string,
1429
- solidBorderColor: PropTypes__default["default"].string,
1430
- isLightTheme: PropTypes__default["default"].bool
1431
- };
1432
- SectionTag.defaultProps = {
1433
- template: "",
1434
- isLightTheme: false
1435
- };
1436
-
1437
- var _styleModuleImportMap = {
1438
- "./storycard.m.css": {
1439
- "author-timestamp-wrapper": "storycard-m_author-timestamp-wrapper__20yjp",
1440
- "default-card": "storycard-m_default-card__1-POn",
1441
- "horizontal-card": "storycard-m_horizontal-card___7afz",
1442
- "backgroung-img": "storycard-m_backgroung-img__1FMJT",
1443
- "content-overlap": "storycard-m_content-overlap__1yNHR",
1444
- "border-full": "storycard-m_border-full__1nhy7",
1445
- "light": "storycard-m_light__3EhXN",
1446
- "dark": "storycard-m_dark__2wCTq",
1447
- "border-bottom": "storycard-m_border-bottom__2_E-I",
1448
- "border-boxShadow": "storycard-m_border-boxShadow__2-k3Z",
1449
- "center-align": "storycard-m_center-align__1Sn8-",
1450
- "content-bottom": "storycard-m_content-bottom__1QHeC",
1451
- "content-full": "storycard-m_content-full__2zJmU",
1452
- "content-boxShadow": "storycard-m_content-boxShadow__2IAWZ",
1453
- "hero-image": "storycard-m_hero-image__1H3MB",
1454
- "right-padding": "storycard-m_right-padding__12-lQ",
1455
- "horizontal-mob": "storycard-m_horizontal-mob__17JG2",
1456
- "content": "storycard-m_content__1Q9vq",
1457
- "border-default": "storycard-m_border-default__PEZ1x",
1458
- "card": "storycard-m_card__KJwRa",
1459
- "horizontal-image-last": "storycard-m_horizontal-image-last__3o6LY"
1460
- }
1461
- };
1462
- var StoryCard = function StoryCard(_ref) {
1463
- var story = _ref.story,
1464
- children = _ref.children,
1465
- isHorizontal = _ref.isHorizontal,
1466
- aspectRatio = _ref.aspectRatio,
1467
- border = _ref.border,
1468
- useImageAsBackground = _ref.useImageAsBackground,
1469
- bgImgContentOverlap = _ref.bgImgContentOverlap,
1470
- theme = _ref.theme,
1471
- borderColor = _ref.borderColor,
1472
- isHorizontalMobile = _ref.isHorizontalMobile,
1473
- centerAlign = _ref.centerAlign,
1474
- headerLevel = _ref.headerLevel,
1475
- hideAuthorImage = _ref.hideAuthorImage,
1476
- prefix = _ref.prefix,
1477
- config = _ref.config,
1478
- isHorizontalWithImageLast = _ref.isHorizontalWithImageLast;
1479
- if (!story || isEmpty(story)) return /*#__PURE__*/React__default["default"].createElement("div", null);
1480
- var borderOptions = ["default", "full", "bottom", "boxShadow"];
1481
- var borderTemplate = borderOptions.includes(border) ? "border-".concat(border) : ""; // TODO optimize conditions
1482
-
1483
- var horizontalCardStyle = "default-card";
1484
- if (isHorizontal) horizontalCardStyle = "horizontal-card";else if (isHorizontalWithImageLast) horizontalCardStyle = "horizontal-image-last";
1485
- var bgImageClasses = useImageAsBackground ? "backgroung-img" : "";
1486
- var bgImgContentOverlapClass = bgImgContentOverlap ? "content-overlap" : "";
1487
- var textColor = getTextColor(theme);
1488
- var horizontalMobileClasses = isHorizontalMobile ? "horizontal-mob" : "";
1489
- var defaultStorycard = /*#__PURE__*/React__default["default"].createElement(DefaultStoryCard, {
1490
- story: story,
1491
- aspectRatio: aspectRatio,
1492
- border: border,
1493
- isHorizontalMobile: isHorizontalMobile,
1494
- isHorizontal: isHorizontal,
1495
- centerAlign: centerAlign,
1496
- headerLevel: headerLevel,
1497
- borderColor: borderColor,
1498
- hideAuthorImage: hideAuthorImage,
1499
- prefix: prefix,
1500
- config: config,
1501
- isHorizontalWithImageLast: isHorizontalWithImageLast
1502
- });
1503
- return /*#__PURE__*/React__default["default"].createElement("div", {
1504
- "data-test-id": "story-card",
1505
- style: {
1506
- backgroundColor: theme,
1507
- color: textColor
1508
- },
1509
- className: "arr--story-card " + _getClassName__default["default"]("card ".concat(horizontalCardStyle, " ").concat(borderTemplate, " ").concat(textColor, " ").concat(bgImageClasses, " ").concat(bgImgContentOverlapClass, " ").concat(horizontalMobileClasses), _styleModuleImportMap)
1510
- }, children || defaultStorycard);
1511
- };
1512
-
1513
- var DefaultStoryCard = function DefaultStoryCard(_ref2) {
1514
- var story = _ref2.story;
1515
- _ref2.border;
1516
- var isHorizontal = _ref2.isHorizontal,
1517
- aspectRatio = _ref2.aspectRatio,
1518
- headerLevel = _ref2.headerLevel,
1519
- _ref2$isHorizontalMob = _ref2.isHorizontalMobile,
1520
- isHorizontalMobile = _ref2$isHorizontalMob === void 0 ? false : _ref2$isHorizontalMob,
1521
- _ref2$centerAlign = _ref2.centerAlign,
1522
- centerAlign = _ref2$centerAlign === void 0 ? false : _ref2$centerAlign,
1523
- borderColor = _ref2.borderColor,
1524
- hideAuthorImage = _ref2.hideAuthorImage,
1525
- prefix = _ref2.prefix,
1526
- isHorizontalWithImageLast = _ref2.isHorizontalWithImageLast,
1527
- config = _ref2.config;
1528
- var alignment = centerAlign ? "center-align" : "";
1529
- var SectionTagborderColor = rgbToHex(borderColor);
1530
- var _config$localizationC = config.localizationConfig,
1531
- localizationConfig = _config$localizationC === void 0 ? {} : _config$localizationC;
1532
- return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isHorizontal ? /*#__PURE__*/React__default["default"].createElement(HeroImage, {
1533
- config: config,
1534
- story: story,
1535
- isHorizontal: true,
1536
- isHorizontalMobile: isHorizontalMobile,
1537
- aspectRatio: aspectRatio
1538
- }) : isHorizontalWithImageLast ? /*#__PURE__*/React__default["default"].createElement(HeroImage, {
1539
- config: config,
1540
- story: story,
1541
- isHorizontalWithImageLast: true,
1542
- isHorizontalMobile: isHorizontalMobile,
1543
- aspectRatio: aspectRatio
1544
- }) : /*#__PURE__*/React__default["default"].createElement(HeroImage, {
1545
- story: story,
1546
- config: config,
1547
- isHorizontalMobile: isHorizontalMobile,
1548
- aspectRatio: aspectRatio
1549
- }), /*#__PURE__*/React__default["default"].createElement("div", {
1550
- className: "arr--story-content " + _getClassName__default["default"]("content ".concat(alignment), _styleModuleImportMap)
1551
- }, /*#__PURE__*/React__default["default"].createElement(SectionTag, {
1552
- story: story,
1553
- borderColor: SectionTagborderColor
1554
- }), /*#__PURE__*/React__default["default"].createElement(Headline, {
1555
- story: story,
1556
- headerLevel: headerLevel,
1557
- premiumStoryIconConfig: config
1558
- }), /*#__PURE__*/React__default["default"].createElement(AuthorWithTime, {
1559
- config: localizationConfig,
1560
- story: story,
1561
- isBottom: true,
1562
- prefix: prefix,
1563
- hideAuthorImage: hideAuthorImage
1564
- }), /*#__PURE__*/React__default["default"].createElement(Subheadline, {
1565
- story: story
1566
- })));
1567
- };
1568
-
1569
- DefaultStoryCard.propTypes = {
1570
- story: PropTypes__default["default"].object.isRequired,
1571
- border: PropTypes__default["default"].oneOfType([PropTypes__default["default"].string]),
1572
- isBottom: PropTypes__default["default"].bool,
1573
- isHorizontal: PropTypes__default["default"].bool,
1574
- aspectRatio: PropTypes__default["default"].oneOfType([PropTypes__default["default"].array]),
1575
- isHorizontalMobile: PropTypes__default["default"].bool,
1576
- centerAlign: PropTypes__default["default"].bool,
1577
- headerLevel: PropTypes__default["default"].string,
1578
- borderColor: PropTypes__default["default"].string,
1579
- hideAuthorImage: PropTypes__default["default"].bool,
1580
- prefix: PropTypes__default["default"].string,
1581
- config: PropTypes__default["default"].object,
1582
- isHorizontalWithImageLast: PropTypes__default["default"].bool
1583
- };
1584
- StoryCard.propTypes = {
1585
- /** The Story Object from the API response */
1586
- story: PropTypes__default["default"].object.isRequired,
1587
- children: PropTypes__default["default"].node,
1588
-
1589
- /** Flip the Story Card to Horizonal mode */
1590
- isHorizontal: PropTypes__default["default"].bool,
1591
-
1592
- /** Add border to the Story Card */
1593
- border: PropTypes__default["default"].oneOfType([PropTypes__default["default"].string]),
1594
- // story card with background image
1595
- useImageAsBackground: PropTypes__default["default"].bool,
1596
- // story card content overlap with image
1597
- bgImgContentOverlap: PropTypes__default["default"].bool,
1598
-
1599
- /** add aspect ratio for hero image */
1600
- aspectRatio: PropTypes__default["default"].oneOfType([PropTypes__default["default"].array]),
1601
-
1602
- /** add theme(dark /light/custom color) for storycard */
1603
- theme: PropTypes__default["default"].string,
1604
-
1605
- /** flip the story card mobile design horizontal */
1606
- isHorizontalMobile: PropTypes__default["default"].bool,
1607
- // make content center align in desktop and left align in mobile
1608
- centerAlign: PropTypes__default["default"].bool,
1609
- headerLevel: PropTypes__default["default"].string,
1610
- borderColor: PropTypes__default["default"].string,
1611
- // handle author image through storycard
1612
- hideAuthorImage: PropTypes__default["default"].bool,
1613
- // handle author prefix through storycard
1614
- prefix: PropTypes__default["default"].string,
1615
- config: PropTypes__default["default"].object,
1616
- isHorizontalWithImageLast: PropTypes__default["default"].bool
1617
- };
1618
- StoryCard.defaultProps = {
1619
- isHorizontal: false,
1620
- isHorizontalMobile: false,
1621
- border: "default",
1622
- theme: "",
1623
- centerAlign: false,
1624
- borderColor: "",
1625
- isHorizontalWithImageLast: false
1626
- };
1627
-
1628
- var ThreeColFourteenStoriesBase = function ThreeColFourteenStoriesBase(_ref) {
1629
- var _ref$collection = _ref.collection,
1630
- collection = _ref$collection === void 0 ? {} : _ref$collection,
1631
- _ref$config = _ref.config,
1632
- config = _ref$config === void 0 ? {} : _ref$config;
1633
- var items = components.collectionToStories(collection);
1634
- var _config$collectionNam = config.collectionNameBorderColor,
1635
- collectionNameBorderColor = _config$collectionNam === void 0 ? "" : _config$collectionNam,
1636
- _config$borderColor = config.borderColor,
1637
- borderColor = _config$borderColor === void 0 ? "" : _config$borderColor,
1638
- _config$border = config.border,
1639
- border = _config$border === void 0 ? "" : _config$border,
1640
- _config$theme = config.theme,
1641
- theme = _config$theme === void 0 ? "" : _config$theme,
1642
- _config$collectionNam2 = config.collectionNameTemplate,
1643
- collectionNameTemplate = _config$collectionNam2 === void 0 ? "" : _config$collectionNam2,
1644
- _config$slotConfig = config.slotConfig,
1645
- slotConfig = _config$slotConfig === void 0 ? [] : _config$slotConfig;
1646
-
1647
- var _get = lodash.get(slotConfig, [0], {}),
1648
- type = _get.type,
1649
- component = _get.component;
1650
-
1651
- if (items.length < 1) {
1652
- return null;
1653
- }
1654
-
1655
- var textColor = getTextColor(theme);
1656
-
1657
- var _ref2 = items || [],
1658
- _ref3 = _toArray__default["default"](_ref2),
1659
- firstStory = _ref3[0],
1660
- secondStory = _ref3[1],
1661
- restOftheStories = _ref3.slice(2);
1662
-
1663
- var storyCallBack = function storyCallBack() {
1664
- var restOftheStories = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
1665
- return restOftheStories.slice(10, 13).map(function (item) {
1666
- return /*#__PURE__*/React__default["default"].createElement(StoryCard, {
1667
- key: item,
1668
- story: item,
1669
- isHorizontal: true,
1670
- aspectRatio: [[1, 1], [4, 3]],
1671
- border: border
1672
- });
1673
- });
1674
- };
1675
-
1676
- return /*#__PURE__*/React__default["default"].createElement("div", {
1677
- className: "full-width-with-padding arrow-component",
1678
- "data-test-id": "three-col-fourteen-stories",
1679
- style: {
1680
- backgroundColor: theme,
1681
- color: textColor
1682
- }
1683
- }, /*#__PURE__*/React__default["default"].createElement("div", {
1684
- className: "three-col-fourteen-story-m_wrapper__1aJe1"
1685
- }, /*#__PURE__*/React__default["default"].createElement(CollectionName, {
1686
- collection: collection,
1687
- collectionNameTemplate: collectionNameTemplate,
1688
- collectionNameBorderColor: collectionNameBorderColor
1689
- }), /*#__PURE__*/React__default["default"].createElement("div", {
1690
- className: "three-col-fourteen-story-m_storycards-row__2ANrZ"
1691
- }, /*#__PURE__*/React__default["default"].createElement("div", {
1692
- className: "first-card three-col-fourteen-story-m_card-with-separator__3MQHS three-col-fourteen-story-m_first-card__1nakj"
1693
- }, /*#__PURE__*/React__default["default"].createElement(StoryCard, {
1694
- story: firstStory,
1695
- headerLevel: "2",
1696
- theme: theme,
1697
- aspectRatio: [[16, 9], [16, 9]],
1698
- config: config
1699
- }, /*#__PURE__*/React__default["default"].createElement(HeroImage, {
1700
- story: firstStory,
1701
- aspectRatio: [[16, 9], [16, 9]]
1702
- }), /*#__PURE__*/React__default["default"].createElement("div", {
1703
- className: "card-content"
1704
- }, /*#__PURE__*/React__default["default"].createElement(SectionTag, {
1705
- story: firstStory,
1706
- borderColor: borderColor
1707
- }), /*#__PURE__*/React__default["default"].createElement(Headline, {
1708
- story: firstStory,
1709
- headerLevel: "2",
1710
- premiumStoryIconConfig: config
1711
- })), /*#__PURE__*/React__default["default"].createElement(Subheadline, {
1712
- story: firstStory,
1713
- forceShowAtom: true
1714
- })), secondStory && /*#__PURE__*/React__default["default"].createElement(StoryCard, {
1715
- border: border,
1716
- story: secondStory,
1717
- isHorizontal: true,
1718
- aspectRatio: [[1, 1], [4, 3]],
1719
- borderColor: borderColor,
1720
- config: config
1721
- })), /*#__PURE__*/React__default["default"].createElement("div", {
1722
- className: "second-card three-col-fourteen-story-m_card-with-separator__3MQHS three-col-fourteen-story-m_second-card__3u49K"
1723
- }, restOftheStories.length > 0 && restOftheStories.slice(0, 6).map(function (item) {
1724
- return /*#__PURE__*/React__default["default"].createElement(StoryCard, {
1725
- key: item,
1726
- story: item,
1727
- isHorizontal: true,
1728
- theme: theme,
1729
- aspectRatio: [[1, 1], [4, 3]],
1730
- border: border,
1731
- borderColor: borderColor,
1732
- config: config
1733
- });
1734
- })), /*#__PURE__*/React__default["default"].createElement("div", {
1735
- className: "third-card three-col-fourteen-story-m_card-with-separator__3MQHS three-col-fourteen-story-m_third-card__wA-vu"
1736
- }, restOftheStories.length > 0 && restOftheStories.slice(6, 10).map(function (item) {
1737
- return /*#__PURE__*/React__default["default"].createElement(StoryCard, {
1738
- key: items,
1739
- story: item,
1740
- isHorizontal: true,
1741
- theme: theme,
1742
- aspectRatio: [[1, 1], [4, 3]],
1743
- border: border,
1744
- borderColor: borderColor,
1745
- config: config
1746
- });
1747
- }), /*#__PURE__*/React__default["default"].createElement("div", {
1748
- className: "three-col-fourteen-story-m_ad-slot__1XHTV"
1749
- }, getSlot(type, component, function () {
1750
- return storyCallBack(restOftheStories);
1751
- }))))));
1752
- };
1753
- ThreeColFourteenStoriesBase.propTypes = {
1754
- /** collection is the array of objects which is returning by API */
1755
- collection: PropTypes__default["default"].object.isRequired,
1756
-
1757
- /** The config for the Row */
1758
- config: PropTypes__default["default"].shape({
1759
- theme: PropTypes__default["default"].string,
1760
- border: PropTypes__default["default"].string,
1761
- slotConfig: PropTypes__default["default"].array,
1762
- collectionNameTemplate: PropTypes__default["default"].string,
1763
- collectionNameBorderColor: PropTypes__default["default"].string,
1764
- borderColor: PropTypes__default["default"].string
1765
- })
1766
- };
1767
- var ThreeColFourteenStories = StateProvider(ThreeColFourteenStoriesBase);
1768
-
1769
- exports.ThreeColFourteenStories = ThreeColFourteenStories;
1770
- exports.ThreeColFourteenStoriesBase = ThreeColFourteenStoriesBase;