@mjhls/mjh-framework 1.0.683 → 1.0.684-beta.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.
Files changed (152) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/AD.js +1 -1
  3. package/dist/cjs/AD300x250.js +3 -3
  4. package/dist/cjs/AD300x250x600.js +3 -3
  5. package/dist/cjs/AD728x90.js +4 -4
  6. package/dist/cjs/ADFloatingFooter.js +2 -2
  7. package/dist/cjs/ADGutter.js +2 -2
  8. package/dist/cjs/ADSkyscraper.js +2 -2
  9. package/dist/cjs/ADSponsoredResources.js +2 -2
  10. package/dist/cjs/ADWebcast.js +2 -2
  11. package/dist/cjs/ADWelcome.js +2 -2
  12. package/dist/cjs/AdSlot.js +2 -2
  13. package/dist/cjs/AdSlotsProvider.js +1 -1
  14. package/dist/cjs/ArticleCarousel.js +1 -1
  15. package/dist/cjs/ArticleSeriesListing.js +4 -4
  16. package/dist/cjs/Auth.js +256 -507
  17. package/dist/cjs/{BlockContent-88f69acd.js → BlockContent-091a991f.js} +1 -1
  18. package/dist/cjs/BrowseVideosListing.js +1 -1
  19. package/dist/cjs/CMEDeck.js +5 -5
  20. package/dist/cjs/Column3.js +4 -4
  21. package/dist/cjs/ConferenceArticleCard.js +2 -2
  22. package/dist/cjs/DeckContent.js +7 -7
  23. package/dist/cjs/DeckQueue.js +6 -6
  24. package/dist/cjs/{Dfp-b2bc3b97.js → Dfp-f6a18ed2.js} +1 -1
  25. package/dist/cjs/EventsDeck.js +4 -4
  26. package/dist/cjs/ExternalResources.js +7 -7
  27. package/dist/cjs/Feature.js +3 -3
  28. package/dist/cjs/ForbesHero.js +2 -2
  29. package/dist/cjs/GridContent.js +10 -10
  30. package/dist/cjs/GridHero.js +2 -2
  31. package/dist/cjs/GroupDeck.js +1 -1
  32. package/dist/cjs/HamMagazine.js +4 -4
  33. package/dist/cjs/Hero.js +1 -1
  34. package/dist/cjs/HorizontalHero.js +2 -2
  35. package/dist/cjs/IssueContentDeck.js +2 -2
  36. package/dist/cjs/IssueDeck.js +2 -2
  37. package/dist/cjs/IssueLanding.js +8 -7
  38. package/dist/cjs/LeftNav.js +2 -2
  39. package/dist/cjs/MasterDeck.js +7 -7
  40. package/dist/cjs/NavMagazine.js +4 -4
  41. package/dist/cjs/NavNative.js +3 -3
  42. package/dist/cjs/OncliveHero.js +2 -2
  43. package/dist/cjs/OncliveLargeHero.js +2 -2
  44. package/dist/cjs/PartnerDetailListing.js +1213 -15
  45. package/dist/cjs/PublicationDeck.js +1 -1
  46. package/dist/cjs/QueueDeckExpanded.js +256 -18
  47. package/dist/cjs/RecentNews.js +2 -2
  48. package/dist/cjs/RelatedContent.js +2 -2
  49. package/dist/cjs/{SocialSearchComponent-6b5e5b47.js → SocialSearchComponent-9cd24578.js} +5 -5
  50. package/dist/cjs/TaxonomyCard.js +2 -2
  51. package/dist/cjs/TemplateNormal.js +3 -3
  52. package/dist/cjs/ThumbnailCard.js +1 -1
  53. package/dist/cjs/Ustream.js +2 -2
  54. package/dist/cjs/VerticalHero.js +2 -2
  55. package/dist/cjs/VideoSeriesCard.js +2 -2
  56. package/dist/cjs/VideoSeriesListing.js +3 -3
  57. package/dist/cjs/View.js +532 -137
  58. package/dist/cjs/YahooHero.js +2 -2
  59. package/dist/cjs/YoutubeGroup.js +1 -1
  60. package/dist/cjs/getQuery.js +2 -2
  61. package/dist/cjs/getRelatedArticle.js +354 -5
  62. package/dist/cjs/getSerializers.js +6 -6
  63. package/dist/cjs/{getTargeting-fee8c429.js → getTargeting-9af0ef69.js} +2 -2
  64. package/dist/cjs/getTargeting.js +1 -1
  65. package/dist/cjs/{index-5be2866f.js → index-3294d3bc.js} +1 -1
  66. package/dist/cjs/index-bd6c9f56.js +211 -0
  67. package/dist/cjs/{index-b5eb3ff8.js → index-be0c82be.js} +19 -20
  68. package/dist/cjs/{index-8c9e8ca7.js → index-c49c3b5e.js} +450 -462
  69. package/dist/cjs/{index-2d0a4911.js → index-fa8ed292.js} +27 -34
  70. package/dist/cjs/{index.es-ab3f2690.js → index.es-9110add6.js} +1 -3
  71. package/dist/cjs/index.js +16 -16
  72. package/dist/cjs/{main-b6c96c8d.js → main-a4cb15bb.js} +36 -67
  73. package/dist/cjs/{moment-66a6a284.js → moment-575fe24c.js} +1 -1
  74. package/dist/cjs/timeDifferenceCalc.js +41 -0
  75. package/dist/cjs/urlFor.js +1 -1
  76. package/dist/esm/AD.js +1 -1
  77. package/dist/esm/AD300x250.js +3 -3
  78. package/dist/esm/AD300x250x600.js +3 -3
  79. package/dist/esm/AD728x90.js +4 -4
  80. package/dist/esm/ADFloatingFooter.js +2 -2
  81. package/dist/esm/ADGutter.js +2 -2
  82. package/dist/esm/ADSkyscraper.js +2 -2
  83. package/dist/esm/ADSponsoredResources.js +2 -2
  84. package/dist/esm/ADWebcast.js +2 -2
  85. package/dist/esm/ADWelcome.js +2 -2
  86. package/dist/esm/AdSlot.js +2 -2
  87. package/dist/esm/AdSlotsProvider.js +1 -1
  88. package/dist/esm/ArticleCarousel.js +1 -1
  89. package/dist/esm/ArticleSeriesListing.js +4 -4
  90. package/dist/esm/Auth.js +248 -499
  91. package/dist/esm/{BlockContent-a614acdf.js → BlockContent-e9b4ddcf.js} +1 -1
  92. package/dist/esm/BrowseVideosListing.js +1 -1
  93. package/dist/esm/CMEDeck.js +5 -5
  94. package/dist/esm/Column3.js +4 -4
  95. package/dist/esm/ConferenceArticleCard.js +2 -2
  96. package/dist/esm/DeckContent.js +7 -7
  97. package/dist/esm/DeckQueue.js +6 -6
  98. package/dist/esm/{Dfp-8a8fca18.js → Dfp-96b49def.js} +1 -1
  99. package/dist/esm/EventsDeck.js +4 -4
  100. package/dist/esm/ExternalResources.js +7 -7
  101. package/dist/esm/Feature.js +3 -3
  102. package/dist/esm/ForbesHero.js +2 -2
  103. package/dist/esm/GridContent.js +10 -10
  104. package/dist/esm/GridHero.js +2 -2
  105. package/dist/esm/GroupDeck.js +1 -1
  106. package/dist/esm/HamMagazine.js +4 -4
  107. package/dist/esm/Hero.js +1 -1
  108. package/dist/esm/HorizontalHero.js +2 -2
  109. package/dist/esm/IssueContentDeck.js +2 -2
  110. package/dist/esm/IssueDeck.js +2 -2
  111. package/dist/esm/IssueLanding.js +8 -7
  112. package/dist/esm/LeftNav.js +2 -2
  113. package/dist/esm/MasterDeck.js +7 -7
  114. package/dist/esm/NavMagazine.js +4 -4
  115. package/dist/esm/NavNative.js +3 -3
  116. package/dist/esm/OncliveHero.js +2 -2
  117. package/dist/esm/OncliveLargeHero.js +2 -2
  118. package/dist/esm/PartnerDetailListing.js +1210 -13
  119. package/dist/esm/PublicationDeck.js +1 -1
  120. package/dist/esm/QueueDeckExpanded.js +256 -18
  121. package/dist/esm/RecentNews.js +2 -2
  122. package/dist/esm/RelatedContent.js +2 -2
  123. package/dist/esm/{SocialSearchComponent-7f14e0f3.js → SocialSearchComponent-93233334.js} +5 -5
  124. package/dist/esm/TaxonomyCard.js +2 -2
  125. package/dist/esm/TemplateNormal.js +3 -3
  126. package/dist/esm/ThumbnailCard.js +1 -1
  127. package/dist/esm/Ustream.js +2 -2
  128. package/dist/esm/VerticalHero.js +2 -2
  129. package/dist/esm/VideoSeriesCard.js +2 -2
  130. package/dist/esm/VideoSeriesListing.js +3 -3
  131. package/dist/esm/View.js +512 -117
  132. package/dist/esm/YahooHero.js +2 -2
  133. package/dist/esm/YoutubeGroup.js +1 -1
  134. package/dist/esm/getQuery.js +2 -2
  135. package/dist/esm/getRelatedArticle.js +354 -5
  136. package/dist/esm/getSerializers.js +6 -6
  137. package/dist/esm/{index-93ec3c59.js → index-0e45a0b2.js} +27 -34
  138. package/dist/esm/{index-51a80699.js → index-73819142.js} +19 -20
  139. package/dist/esm/{index-5505d4f9.js → index-85783f24.js} +450 -462
  140. package/dist/esm/index-db3bb315.js +207 -0
  141. package/dist/esm/{index-d2f90501.js → index-ef6d5dcf.js} +1 -1
  142. package/dist/esm/{index.es-938a3a58.js → index.es-29c1cef5.js} +1 -3
  143. package/dist/esm/index.js +14 -14
  144. package/dist/esm/{main-0465b2a0.js → main-5d1e4bd3.js} +34 -65
  145. package/dist/esm/{moment-12415288.js → moment-e2f9b20c.js} +1 -1
  146. package/dist/esm/timeDifferenceCalc.js +39 -0
  147. package/dist/esm/urlFor.js +1 -1
  148. package/package.json +1 -1
  149. /package/dist/cjs/{ADInfeed-c676389b.js → ADInfeed-f27bc4b5.js} +0 -0
  150. /package/dist/cjs/{ADlgInfeed-57d63c87.js → ADlgInfeed-8decfd9e.js} +0 -0
  151. /package/dist/esm/{ADInfeed-97b8cea7.js → ADInfeed-1e0ca5e0.js} +0 -0
  152. /package/dist/esm/{ADlgInfeed-3ab91c75.js → ADlgInfeed-979cf0d5.js} +0 -0
@@ -0,0 +1,207 @@
1
+ /*!
2
+ * cookie
3
+ * Copyright(c) 2012-2014 Roman Shtylman
4
+ * Copyright(c) 2015 Douglas Christopher Wilson
5
+ * MIT Licensed
6
+ */
7
+
8
+ /**
9
+ * Module exports.
10
+ * @public
11
+ */
12
+
13
+ var parse_1 = parse;
14
+ var serialize_1 = serialize;
15
+
16
+ /**
17
+ * Module variables.
18
+ * @private
19
+ */
20
+
21
+ var decode = decodeURIComponent;
22
+ var encode = encodeURIComponent;
23
+ var pairSplitRegExp = /; */;
24
+
25
+ /**
26
+ * RegExp to match field-content in RFC 7230 sec 3.2
27
+ *
28
+ * field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ]
29
+ * field-vchar = VCHAR / obs-text
30
+ * obs-text = %x80-FF
31
+ */
32
+
33
+ var fieldContentRegExp = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;
34
+
35
+ /**
36
+ * Parse a cookie header.
37
+ *
38
+ * Parse the given cookie header string into an object
39
+ * The object has the various cookies as keys(names) => values
40
+ *
41
+ * @param {string} str
42
+ * @param {object} [options]
43
+ * @return {object}
44
+ * @public
45
+ */
46
+
47
+ function parse(str, options) {
48
+ if (typeof str !== 'string') {
49
+ throw new TypeError('argument str must be a string');
50
+ }
51
+
52
+ var obj = {};
53
+ var opt = options || {};
54
+ var pairs = str.split(pairSplitRegExp);
55
+ var dec = opt.decode || decode;
56
+
57
+ for (var i = 0; i < pairs.length; i++) {
58
+ var pair = pairs[i];
59
+ var eq_idx = pair.indexOf('=');
60
+
61
+ // skip things that don't look like key=value
62
+ if (eq_idx < 0) {
63
+ continue;
64
+ }
65
+
66
+ var key = pair.substr(0, eq_idx).trim();
67
+ var val = pair.substr(++eq_idx, pair.length).trim();
68
+
69
+ // quoted values
70
+ if ('"' == val[0]) {
71
+ val = val.slice(1, -1);
72
+ }
73
+
74
+ // only assign once
75
+ if (undefined == obj[key]) {
76
+ obj[key] = tryDecode(val, dec);
77
+ }
78
+ }
79
+
80
+ return obj;
81
+ }
82
+
83
+ /**
84
+ * Serialize data into a cookie header.
85
+ *
86
+ * Serialize the a name value pair into a cookie string suitable for
87
+ * http headers. An optional options object specified cookie parameters.
88
+ *
89
+ * serialize('foo', 'bar', { httpOnly: true })
90
+ * => "foo=bar; httpOnly"
91
+ *
92
+ * @param {string} name
93
+ * @param {string} val
94
+ * @param {object} [options]
95
+ * @return {string}
96
+ * @public
97
+ */
98
+
99
+ function serialize(name, val, options) {
100
+ var opt = options || {};
101
+ var enc = opt.encode || encode;
102
+
103
+ if (typeof enc !== 'function') {
104
+ throw new TypeError('option encode is invalid');
105
+ }
106
+
107
+ if (!fieldContentRegExp.test(name)) {
108
+ throw new TypeError('argument name is invalid');
109
+ }
110
+
111
+ var value = enc(val);
112
+
113
+ if (value && !fieldContentRegExp.test(value)) {
114
+ throw new TypeError('argument val is invalid');
115
+ }
116
+
117
+ var str = name + '=' + value;
118
+
119
+ if (null != opt.maxAge) {
120
+ var maxAge = opt.maxAge - 0;
121
+
122
+ if (isNaN(maxAge) || !isFinite(maxAge)) {
123
+ throw new TypeError('option maxAge is invalid')
124
+ }
125
+
126
+ str += '; Max-Age=' + Math.floor(maxAge);
127
+ }
128
+
129
+ if (opt.domain) {
130
+ if (!fieldContentRegExp.test(opt.domain)) {
131
+ throw new TypeError('option domain is invalid');
132
+ }
133
+
134
+ str += '; Domain=' + opt.domain;
135
+ }
136
+
137
+ if (opt.path) {
138
+ if (!fieldContentRegExp.test(opt.path)) {
139
+ throw new TypeError('option path is invalid');
140
+ }
141
+
142
+ str += '; Path=' + opt.path;
143
+ }
144
+
145
+ if (opt.expires) {
146
+ if (typeof opt.expires.toUTCString !== 'function') {
147
+ throw new TypeError('option expires is invalid');
148
+ }
149
+
150
+ str += '; Expires=' + opt.expires.toUTCString();
151
+ }
152
+
153
+ if (opt.httpOnly) {
154
+ str += '; HttpOnly';
155
+ }
156
+
157
+ if (opt.secure) {
158
+ str += '; Secure';
159
+ }
160
+
161
+ if (opt.sameSite) {
162
+ var sameSite = typeof opt.sameSite === 'string'
163
+ ? opt.sameSite.toLowerCase() : opt.sameSite;
164
+
165
+ switch (sameSite) {
166
+ case true:
167
+ str += '; SameSite=Strict';
168
+ break;
169
+ case 'lax':
170
+ str += '; SameSite=Lax';
171
+ break;
172
+ case 'strict':
173
+ str += '; SameSite=Strict';
174
+ break;
175
+ case 'none':
176
+ str += '; SameSite=None';
177
+ break;
178
+ default:
179
+ throw new TypeError('option sameSite is invalid');
180
+ }
181
+ }
182
+
183
+ return str;
184
+ }
185
+
186
+ /**
187
+ * Try decoding a string using a decoding function.
188
+ *
189
+ * @param {string} str
190
+ * @param {function} decode
191
+ * @private
192
+ */
193
+
194
+ function tryDecode(str, decode) {
195
+ try {
196
+ return decode(str);
197
+ } catch (e) {
198
+ return str;
199
+ }
200
+ }
201
+
202
+ var cookie = {
203
+ parse: parse_1,
204
+ serialize: serialize_1
205
+ };
206
+
207
+ export { cookie as c, parse_1 as p, serialize_1 as s };
@@ -1,5 +1,5 @@
1
1
  import { c as createCommonjsModule, a as commonjsGlobal, g as getCjsExportFromNamespace } from './_commonjsHelpers-0c4b6f40.js';
2
- import { m as moment } from './moment-12415288.js';
2
+ import { m as moment } from './moment-e2f9b20c.js';
3
3
 
4
4
  var momentTimezone = createCommonjsModule(function (module) {
5
5
  //! moment-timezone.js
@@ -263,9 +263,6 @@ var InfiniteScroll = /** @class */ (function (_super) {
263
263
  _this.dragging = false;
264
264
  if (_this.state.pullToRefreshThresholdBreached) {
265
265
  _this.props.refreshFunction && _this.props.refreshFunction();
266
- _this.setState({
267
- pullToRefreshThresholdBreached: false,
268
- });
269
266
  }
270
267
  requestAnimationFrame(function () {
271
268
  // this._infScroll
@@ -372,6 +369,7 @@ var InfiniteScroll = /** @class */ (function (_super) {
372
369
  // update state when new data was sent in
373
370
  this.setState({
374
371
  showLoader: false,
372
+ pullToRefreshThresholdBreached: false,
375
373
  });
376
374
  };
377
375
  InfiniteScroll.prototype.isElementAtBottom = function (target, scrollThreshold) {
package/dist/esm/index.js CHANGED
@@ -14,22 +14,22 @@ import './web.dom.iterable-8956f9a5.js';
14
14
  import './typeof-08f2c380.js';
15
15
  import './_is-array-49698029.js';
16
16
  import 'react';
17
- import './index-93ec3c59.js';
17
+ import './index-0e45a0b2.js';
18
18
  import 'prop-types';
19
19
  import 'react-bootstrap/Container';
20
20
  import 'react-bootstrap/Row';
21
21
  import 'react-bootstrap/Col';
22
22
  import 'react-bootstrap/Card';
23
- import './moment-12415288.js';
23
+ import './moment-e2f9b20c.js';
24
24
  import 'next/router';
25
25
  import './isSymbol-807e927e.js';
26
26
  import './debounce-1a993acf.js';
27
- import './index.es-938a3a58.js';
27
+ import './index.es-29c1cef5.js';
28
28
  import 'react-dom';
29
29
  import './visibility-sensor-0baa4eea.js';
30
- import './index-51a80699.js';
30
+ import './index-73819142.js';
31
31
  import './index-5f9f807a.js';
32
- import './main-0465b2a0.js';
32
+ import './main-5d1e4bd3.js';
33
33
  import './entities-7cc3bf45.js';
34
34
  import './stringify-008c8802.js';
35
35
  import './slicedToArray-7021e5df.js';
@@ -37,10 +37,10 @@ import './asyncToGenerator-7c654f36.js';
37
37
  import './_set-species-cede29f8.js';
38
38
  export { B as Beam, S as Segment } from './beam-681a9749.js';
39
39
  export { default as AdSlot } from './AdSlot.js';
40
- import './ADInfeed-97b8cea7.js';
40
+ import './ADInfeed-1e0ca5e0.js';
41
41
  export { default as DeckContent } from './DeckContent.js';
42
42
  import './lodash-17fdfebb.js';
43
- import './ADlgInfeed-3ab91c75.js';
43
+ import './ADlgInfeed-979cf0d5.js';
44
44
  import './getContentCategory-15dcc413.js';
45
45
  import './get-5ee14cda.js';
46
46
  export { default as AD } from './AD.js';
@@ -49,7 +49,7 @@ export { default as GridContent } from './GridContent.js';
49
49
  export { default as DeckQueue } from './DeckQueue.js';
50
50
  import 'react-bootstrap/Media';
51
51
  export { default as ThumbnailCard } from './ThumbnailCard.js';
52
- import './BlockContent-a614acdf.js';
52
+ import './BlockContent-e9b4ddcf.js';
53
53
  import './react-social-icons-a7d5c5c7.js';
54
54
  export { default as TaxonomyCard } from './TaxonomyCard.js';
55
55
  export { default as RolesDeck } from './RolesDeck.js';
@@ -57,6 +57,7 @@ import './smoothscroll-4b699764.js';
57
57
  export { default as GroupDeck } from './GroupDeck.js';
58
58
  export { default as YoutubeGroup } from './YoutubeGroup.js';
59
59
  import 'react-bootstrap';
60
+ import './timeDifferenceCalc.js';
60
61
  export { default as QueueDeckExpanded } from './QueueDeckExpanded.js';
61
62
  import './iconBase-602d52fe.js';
62
63
  import './index.esm-85cb09e6.js';
@@ -74,10 +75,10 @@ import './defineProperty-b798470d.js';
74
75
  export { default as EventsDeck } from './EventsDeck.js';
75
76
  import 'react-bootstrap/Spinner';
76
77
  import 'react-bootstrap/Form';
77
- import './index-d2f90501.js';
78
+ import './index-ef6d5dcf.js';
78
79
  import './js.cookie-6874175c.js';
79
80
  export { default as CMEDeck } from './CMEDeck.js';
80
- export { g as getSerializers } from './index-5505d4f9.js';
81
+ export { g as getSerializers } from './index-85783f24.js';
81
82
  import './util-7700fc59.js';
82
83
  import './brightcove-react-player-loader.es-83f53e4e.js';
83
84
  import 'react-bootstrap/Pagination';
@@ -108,7 +109,7 @@ import './NavFooter-e27bd93b.js';
108
109
  import './index.esm-fd746768.js';
109
110
  export { default as SocialIcons } from './SocialIcons.js';
110
111
  import 'react-bootstrap/FormControl';
111
- import './SocialSearchComponent-7f14e0f3.js';
112
+ import './SocialSearchComponent-93233334.js';
112
113
  export { default as NavMagazine } from './NavMagazine.js';
113
114
  export { NavNative } from './NavNative.js';
114
115
  export { default as Search } from './Search.js';
@@ -155,9 +156,9 @@ export { default as ConferenceArticleCard } from './ConferenceArticleCard.js';
155
156
  export { default as KMTracker } from './KMTracker.js';
156
157
  export { default as getSeriesDetail } from './getSeriesDetail.js';
157
158
  export { default as SetCookie } from './SetCookie.js';
158
- import 'nookies';
159
- export { default as getQuery } from './getQuery.js';
159
+ import './index-db3bb315.js';
160
160
  export { default as getRelatedArticle } from './getRelatedArticle.js';
161
+ export { default as getQuery } from './getQuery.js';
161
162
  export { default as Auth } from './Auth.js';
162
163
  import 'swr';
163
164
  import 'passport-local';
@@ -167,5 +168,4 @@ export { default as View } from './View.js';
167
168
  export { default as getKeywords } from './getKeywords.js';
168
169
  export { default as urlFor } from './urlFor.js';
169
170
  import './style-inject.es-1f59c1d0.js';
170
- import 'react-twitter-embed';
171
171
  export { default as PartnerDetailListing } from './PartnerDetailListing.js';
@@ -48,7 +48,7 @@ var getNavigatorInstance = function getNavigatorInstance() {
48
48
  };
49
49
  var isIOS13Check = function isIOS13Check(type) {
50
50
  var nav = getNavigatorInstance();
51
- return nav && nav.platform && (nav.platform.indexOf(type) !== -1 || nav.platform === 'MacIntel' && nav.maxTouchPoints > 1 && !window.MSStream);
51
+ return nav && (nav.platform.includes(type) || nav.platform === 'MacIntel' && nav.maxTouchPoints > 1 && !window.MSStream);
52
52
  };
53
53
 
54
54
  function _typeof(obj) {
@@ -219,15 +219,12 @@ var BROWSER_TYPES = {
219
219
  EDGE: "Edge",
220
220
  CHROMIUM: "Chromium",
221
221
  IE: 'IE',
222
- MOBILE_SAFARI: "Mobile Safari",
223
- EDGE_CHROMIUM: "Edge Chromium"
222
+ MOBILE_SAFARI: "Mobile Safari"
224
223
  };
225
224
  var OS_TYPES = {
226
225
  IOS: 'iOS',
227
226
  ANDROID: "Android",
228
- WINDOWS_PHONE: "Windows Phone",
229
- WINDOWS: 'Windows',
230
- MAC_OS: 'Mac OS'
227
+ WINDOWS_PHONE: "Windows Phone"
231
228
  };
232
229
  var initialData = {
233
230
  isMobile: false,
@@ -380,14 +377,6 @@ var isMobileAndTabletType = function isMobileAndTabletType() {
380
377
  }
381
378
  };
382
379
 
383
- var isEdgeChromiumType = function isEdgeChromiumType() {
384
- if (os.name === OS_TYPES.WINDOWS && os.version === '10') {
385
- return typeof ua === 'string' && ua.indexOf('Edg/') !== -1;
386
- }
387
-
388
- return false;
389
- };
390
-
391
380
  var isSmartTVType = function isSmartTVType() {
392
381
  return device.type === DEVICE_TYPES.SMART_TV;
393
382
  };
@@ -408,14 +397,6 @@ var isAndroidType = function isAndroidType() {
408
397
  return os.name === OS_TYPES.ANDROID;
409
398
  };
410
399
 
411
- var isWindowsType = function isWindowsType() {
412
- return os.name === OS_TYPES.WINDOWS;
413
- };
414
-
415
- var isMacOsType = function isMacOsType() {
416
- return os.name === OS_TYPES.MAC_OS;
417
- };
418
-
419
400
  var isWinPhoneType = function isWinPhoneType() {
420
401
  return os.name === OS_TYPES.WINDOWS_PHONE;
421
402
  };
@@ -463,7 +444,7 @@ var isIEType = function isIEType() {
463
444
  var isElectronType = function isElectronType() {
464
445
  var nav = getNavigatorInstance();
465
446
  var ua = nav && nav.userAgent.toLowerCase();
466
- return typeof ua === 'string' ? /electron/.test(ua) : false;
447
+ return typeof ua === 'string' ? ua.includes('electron') : false;
467
448
  };
468
449
 
469
450
  var getIOS13 = function getIOS13() {
@@ -530,15 +511,15 @@ var getDeviceType = function getDeviceType() {
530
511
  var isSmartTV = isSmartTVType();
531
512
  var isConsole = isConsoleType();
532
513
  var isWearable = isWearableType();
533
- var isMobileSafari = isMobileSafariType() || getIPad13();
514
+ var isMobileSafari = isMobileSafariType();
534
515
  var isChromium = isChromiumType();
535
- var isMobile = isMobileAndTabletType() || getIPad13();
516
+ var isMobile = isMobileAndTabletType();
536
517
  var isMobileOnly = isMobileType();
537
- var isTablet = isTabletType() || getIPad13();
518
+ var isTablet = isTabletType();
538
519
  var isBrowser = isBrowserType();
539
520
  var isAndroid = isAndroidType();
540
521
  var isWinPhone = isWinPhoneType();
541
- var isIOS = isIOSType() || getIPad13();
522
+ var isIOS = isIOSType();
542
523
  var isChrome = isChromeType();
543
524
  var isFirefox = isFirefoxType();
544
525
  var isSafari = isSafariType();
@@ -554,7 +535,7 @@ var mobileModel = getMobileModel();
554
535
  var engineName = getEngineName();
555
536
  var engineVersion = getEngineVersion();
556
537
  var getUA = getUseragent();
557
- var isEdge = isEdgeType() || isEdgeChromiumType();
538
+ var isEdge = isEdgeType();
558
539
  var isYandex = isYandexType();
559
540
  var deviceType = getDeviceType();
560
541
  var isIOS13 = getIOS13();
@@ -562,10 +543,6 @@ var isIPad13 = getIPad13();
562
543
  var isIPhone13 = getIphone13();
563
544
  var isIPod13 = getIPod13();
564
545
  var isElectron = isElectronType();
565
- var isEdgeChromium = isEdgeChromiumType();
566
- var isLegacyEdge = isEdgeType();
567
- var isWindows = isWindowsType();
568
- var isMacOs = isMacOsType();
569
546
 
570
547
  var AndroidView = function AndroidView(_ref) {
571
548
  var renderWithFragment = _ref.renderWithFragment,
@@ -795,7 +772,6 @@ exports.isChrome = isChrome;
795
772
  exports.isChromium = isChromium;
796
773
  exports.isConsole = isConsole;
797
774
  exports.isEdge = isEdge;
798
- exports.isEdgeChromium = isEdgeChromium;
799
775
  exports.isElectron = isElectron;
800
776
  exports.isFirefox = isFirefox;
801
777
  exports.isIE = isIE;
@@ -804,8 +780,6 @@ exports.isIOS13 = isIOS13;
804
780
  exports.isIPad13 = isIPad13;
805
781
  exports.isIPhone13 = isIPhone13;
806
782
  exports.isIPod13 = isIPod13;
807
- exports.isLegacyEdge = isLegacyEdge;
808
- exports.isMacOs = isMacOs;
809
783
  exports.isMobile = isMobile;
810
784
  exports.isMobileOnly = isMobileOnly;
811
785
  exports.isMobileSafari = isMobileSafari;
@@ -815,7 +789,6 @@ exports.isSmartTV = isSmartTV;
815
789
  exports.isTablet = isTablet;
816
790
  exports.isWearable = isWearable;
817
791
  exports.isWinPhone = isWinPhone;
818
- exports.isWindows = isWindows;
819
792
  exports.isYandex = isYandex;
820
793
  exports.mobileModel = mobileModel;
821
794
  exports.mobileVendor = mobileVendor;
@@ -851,32 +824,28 @@ var main_23 = main.isChrome;
851
824
  var main_24 = main.isChromium;
852
825
  var main_25 = main.isConsole;
853
826
  var main_26 = main.isEdge;
854
- var main_27 = main.isEdgeChromium;
855
- var main_28 = main.isElectron;
856
- var main_29 = main.isFirefox;
857
- var main_30 = main.isIE;
858
- var main_31 = main.isIOS;
859
- var main_32 = main.isIOS13;
860
- var main_33 = main.isIPad13;
861
- var main_34 = main.isIPhone13;
862
- var main_35 = main.isIPod13;
863
- var main_36 = main.isLegacyEdge;
864
- var main_37 = main.isMacOs;
865
- var main_38 = main.isMobile;
866
- var main_39 = main.isMobileOnly;
867
- var main_40 = main.isMobileSafari;
868
- var main_41 = main.isOpera;
869
- var main_42 = main.isSafari;
870
- var main_43 = main.isSmartTV;
871
- var main_44 = main.isTablet;
872
- var main_45 = main.isWearable;
873
- var main_46 = main.isWinPhone;
874
- var main_47 = main.isWindows;
875
- var main_48 = main.isYandex;
876
- var main_49 = main.mobileModel;
877
- var main_50 = main.mobileVendor;
878
- var main_51 = main.osName;
879
- var main_52 = main.osVersion;
880
- var main_53 = main.withOrientationChange;
881
-
882
- export { main_40 as a, main_16 as b, main_38 as c, main_31 as d, main_39 as m };
827
+ var main_27 = main.isElectron;
828
+ var main_28 = main.isFirefox;
829
+ var main_29 = main.isIE;
830
+ var main_30 = main.isIOS;
831
+ var main_31 = main.isIOS13;
832
+ var main_32 = main.isIPad13;
833
+ var main_33 = main.isIPhone13;
834
+ var main_34 = main.isIPod13;
835
+ var main_35 = main.isMobile;
836
+ var main_36 = main.isMobileOnly;
837
+ var main_37 = main.isMobileSafari;
838
+ var main_38 = main.isOpera;
839
+ var main_39 = main.isSafari;
840
+ var main_40 = main.isSmartTV;
841
+ var main_41 = main.isTablet;
842
+ var main_42 = main.isWearable;
843
+ var main_43 = main.isWinPhone;
844
+ var main_44 = main.isYandex;
845
+ var main_45 = main.mobileModel;
846
+ var main_46 = main.mobileVendor;
847
+ var main_47 = main.osName;
848
+ var main_48 = main.osVersion;
849
+ var main_49 = main.withOrientationChange;
850
+
851
+ export { main_37 as a, main_16 as b, main_35 as c, main_30 as d, main_36 as m };
@@ -5612,7 +5612,7 @@ var moment = createCommonjsModule(function (module, exports) {
5612
5612
 
5613
5613
  //! moment.js
5614
5614
 
5615
- hooks.version = '2.27.0';
5615
+ hooks.version = '2.26.0';
5616
5616
 
5617
5617
  setHookCallback(createLocal);
5618
5618
 
@@ -0,0 +1,39 @@
1
+ import './_commonjsHelpers-0c4b6f40.js';
2
+ import { m as moment } from './moment-e2f9b20c.js';
3
+
4
+ var timeDifferenceCalc = function timeDifferenceCalc(articlePublishedDate) {
5
+ var dateNow = new Date();
6
+ var articleDate = new Date(articlePublishedDate);
7
+
8
+ var diffInMilliSeconds = Math.abs(articleDate - dateNow) / 1000;
9
+
10
+ // calculate days
11
+ var days = Math.floor(diffInMilliSeconds / 86400);
12
+ diffInMilliSeconds -= days * 86400;
13
+
14
+ // calculate hours
15
+ var hours = Math.floor(diffInMilliSeconds / 3600) % 24;
16
+ diffInMilliSeconds -= hours * 3600;
17
+
18
+ // calculate minutes
19
+ var minutes = Math.floor(diffInMilliSeconds / 60) % 60;
20
+ diffInMilliSeconds -= minutes * 60;
21
+
22
+ var difference = '';
23
+ if (days > 0 && days < 8) {
24
+ difference = days === 1 ? days + ' day ago ' : days + ' days ago';
25
+ }
26
+ if (days == 0 && hours > 0) {
27
+ difference = hours === 0 || hours === 1 ? hours + ' hour ago ' : hours + ' hours ago';
28
+ }
29
+ if (days == 0 && hours == 0 && minutes > 0) {
30
+ difference = minutes === 0 || hours === 1 ? minutes + ' minute ago' : minutes + ' minutes ago';
31
+ }
32
+ if (days > 7) {
33
+ difference = moment(articlePublishedDate).format('MMMM DD, YYYY');
34
+ }
35
+
36
+ return difference;
37
+ };
38
+
39
+ export default timeDifferenceCalc;
@@ -1,5 +1,5 @@
1
1
  import './_commonjsHelpers-0c4b6f40.js';
2
- import { i as imageUrlBuilder } from './index-51a80699.js';
2
+ import { i as imageUrlBuilder } from './index-73819142.js';
3
3
 
4
4
  // Sanity image auto formating
5
5
  function urlFor(client, source) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mjhls/mjh-framework",
3
- "version": "1.0.683",
3
+ "version": "1.0.684-beta.1",
4
4
  "description": "Foundation Framework",
5
5
  "author": "mjh-framework",
6
6
  "license": "MIT",