@mjhls/mjh-framework 1.0.863-beta.0 → 1.0.863-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.
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var _commonjsHelpers = require('./_commonjsHelpers-06173234.js');
3
+ require('./_commonjsHelpers-06173234.js');
4
4
  require('./_to-object-329a650b.js');
5
5
  require('./es6.string.iterator-cc0bbaa4.js');
6
6
  require('./_library-dd23b178.js');
@@ -8,422 +8,9 @@ require('./_iter-detect-60b2f026.js');
8
8
  require('./core.get-iterator-method-f62321d4.js');
9
9
  require('./web.dom.iterable-a0e279c1.js');
10
10
  var asyncToGenerator = require('./asyncToGenerator-140e5f89.js');
11
- var index$6 = require('./index-bd6c9f56.js');
11
+ var nookies = require('nookies');
12
12
  var getQuery = require('./getQuery.js');
13
13
 
14
- var defaultParseOptions = {
15
- decodeValues: true,
16
- map: false,
17
- silent: false,
18
- };
19
-
20
- function isNonEmptyString(str) {
21
- return typeof str === "string" && !!str.trim();
22
- }
23
-
24
- function parseString(setCookieValue, options) {
25
- var parts = setCookieValue.split(";").filter(isNonEmptyString);
26
- var nameValue = parts.shift().split("=");
27
- var name = nameValue.shift();
28
- var value = nameValue.join("="); // everything after the first =, joined by a "=" if there was more than one part
29
-
30
- options = options
31
- ? Object.assign({}, defaultParseOptions, options)
32
- : defaultParseOptions;
33
-
34
- try {
35
- value = options.decodeValues ? decodeURIComponent(value) : value; // decode cookie value
36
- } catch (e) {
37
- console.error(
38
- "set-cookie-parser encountered an error while decoding a cookie with value '" +
39
- value +
40
- "'. Set options.decodeValues to false to disable this feature.",
41
- e
42
- );
43
- }
44
-
45
- var cookie = {
46
- name: name, // grab everything before the first =
47
- value: value,
48
- };
49
-
50
- parts.forEach(function (part) {
51
- var sides = part.split("=");
52
- var key = sides.shift().trimLeft().toLowerCase();
53
- var value = sides.join("=");
54
- if (key === "expires") {
55
- cookie.expires = new Date(value);
56
- } else if (key === "max-age") {
57
- cookie.maxAge = parseInt(value, 10);
58
- } else if (key === "secure") {
59
- cookie.secure = true;
60
- } else if (key === "httponly") {
61
- cookie.httpOnly = true;
62
- } else if (key === "samesite") {
63
- cookie.sameSite = value;
64
- } else {
65
- cookie[key] = value;
66
- }
67
- });
68
-
69
- return cookie;
70
- }
71
-
72
- function parse(input, options) {
73
- options = options
74
- ? Object.assign({}, defaultParseOptions, options)
75
- : defaultParseOptions;
76
-
77
- if (!input) {
78
- if (!options.map) {
79
- return [];
80
- } else {
81
- return {};
82
- }
83
- }
84
-
85
- if (input.headers && input.headers["set-cookie"]) {
86
- // fast-path for node.js (which automatically normalizes header names to lower-case
87
- input = input.headers["set-cookie"];
88
- } else if (input.headers) {
89
- // slow-path for other environments - see #25
90
- var sch =
91
- input.headers[
92
- Object.keys(input.headers).find(function (key) {
93
- return key.toLowerCase() === "set-cookie";
94
- })
95
- ];
96
- // warn if called on a request-like object with a cookie header rather than a set-cookie header - see #34, 36
97
- if (!sch && input.headers.cookie && !options.silent) {
98
- console.warn(
99
- "Warning: set-cookie-parser appears to have been called on a request object. It is designed to parse Set-Cookie headers from responses, not Cookie headers from requests. Set the option {silent: true} to suppress this warning."
100
- );
101
- }
102
- input = sch;
103
- }
104
- if (!Array.isArray(input)) {
105
- input = [input];
106
- }
107
-
108
- options = options
109
- ? Object.assign({}, defaultParseOptions, options)
110
- : defaultParseOptions;
111
-
112
- if (!options.map) {
113
- return input.filter(isNonEmptyString).map(function (str) {
114
- return parseString(str, options);
115
- });
116
- } else {
117
- var cookies = {};
118
- return input.filter(isNonEmptyString).reduce(function (cookies, str) {
119
- var cookie = parseString(str, options);
120
- cookies[cookie.name] = cookie;
121
- return cookies;
122
- }, cookies);
123
- }
124
- }
125
-
126
- /*
127
- Set-Cookie header field-values are sometimes comma joined in one string. This splits them without choking on commas
128
- that are within a single set-cookie field-value, such as in the Expires portion.
129
-
130
- This is uncommon, but explicitly allowed - see https://tools.ietf.org/html/rfc2616#section-4.2
131
- Node.js does this for every header *except* set-cookie - see https://github.com/nodejs/node/blob/d5e363b77ebaf1caf67cd7528224b651c86815c1/lib/_http_incoming.js#L128
132
- React Native's fetch does this for *every* header, including set-cookie.
133
-
134
- Based on: https://github.com/google/j2objc/commit/16820fdbc8f76ca0c33472810ce0cb03d20efe25
135
- Credits to: https://github.com/tomball for original and https://github.com/chrusart for JavaScript implementation
136
- */
137
- function splitCookiesString(cookiesString) {
138
- if (Array.isArray(cookiesString)) {
139
- return cookiesString;
140
- }
141
- if (typeof cookiesString !== "string") {
142
- return [];
143
- }
144
-
145
- var cookiesStrings = [];
146
- var pos = 0;
147
- var start;
148
- var ch;
149
- var lastComma;
150
- var nextStart;
151
- var cookiesSeparatorFound;
152
-
153
- function skipWhitespace() {
154
- while (pos < cookiesString.length && /\s/.test(cookiesString.charAt(pos))) {
155
- pos += 1;
156
- }
157
- return pos < cookiesString.length;
158
- }
159
-
160
- function notSpecialChar() {
161
- ch = cookiesString.charAt(pos);
162
-
163
- return ch !== "=" && ch !== ";" && ch !== ",";
164
- }
165
-
166
- while (pos < cookiesString.length) {
167
- start = pos;
168
- cookiesSeparatorFound = false;
169
-
170
- while (skipWhitespace()) {
171
- ch = cookiesString.charAt(pos);
172
- if (ch === ",") {
173
- // ',' is a cookie separator if we have later first '=', not ';' or ','
174
- lastComma = pos;
175
- pos += 1;
176
-
177
- skipWhitespace();
178
- nextStart = pos;
179
-
180
- while (pos < cookiesString.length && notSpecialChar()) {
181
- pos += 1;
182
- }
183
-
184
- // currently special character
185
- if (pos < cookiesString.length && cookiesString.charAt(pos) === "=") {
186
- // we found cookies separator
187
- cookiesSeparatorFound = true;
188
- // pos is inside the next cookie, so back up and return it.
189
- pos = nextStart;
190
- cookiesStrings.push(cookiesString.substring(start, lastComma));
191
- start = pos;
192
- } else {
193
- // in param ',' or param separator ';',
194
- // we continue from that comma
195
- pos = lastComma + 1;
196
- }
197
- } else {
198
- pos += 1;
199
- }
200
- }
201
-
202
- if (!cookiesSeparatorFound || pos >= cookiesString.length) {
203
- cookiesStrings.push(cookiesString.substring(start, cookiesString.length));
204
- }
205
- }
206
-
207
- return cookiesStrings;
208
- }
209
-
210
- var setCookie = parse;
211
- var parse_1 = parse;
212
- var parseString_1 = parseString;
213
- var splitCookiesString_1 = splitCookiesString;
214
- setCookie.parse = parse_1;
215
- setCookie.parseString = parseString_1;
216
- setCookie.splitCookiesString = splitCookiesString_1;
217
-
218
- var utils = _commonjsHelpers.createCommonjsModule(function (module, exports) {
219
- var __assign = (_commonjsHelpers.commonjsGlobal && _commonjsHelpers.commonjsGlobal.__assign) || function () {
220
- __assign = Object.assign || function(t) {
221
- for (var s, i = 1, n = arguments.length; i < n; i++) {
222
- s = arguments[i];
223
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
224
- t[p] = s[p];
225
- }
226
- return t;
227
- };
228
- return __assign.apply(this, arguments);
229
- };
230
- Object.defineProperty(exports, "__esModule", { value: true });
231
- exports.areCookiesEqual = exports.hasSameProperties = exports.createCookie = exports.isBrowser = void 0;
232
- /**
233
- * Tells whether we are in a browser or server.
234
- */
235
- function isBrowser() {
236
- return typeof window !== 'undefined';
237
- }
238
- exports.isBrowser = isBrowser;
239
- /**
240
- * Create an instance of the Cookie interface
241
- */
242
- function createCookie(name, value, options) {
243
- var sameSite = options.sameSite;
244
- if (sameSite === true) {
245
- sameSite = 'strict';
246
- }
247
- if (sameSite === undefined || sameSite === false) {
248
- sameSite = 'lax';
249
- }
250
- var cookieToSet = __assign(__assign({}, options), { sameSite: sameSite });
251
- delete cookieToSet.encode;
252
- return __assign({ name: name, value: value }, cookieToSet);
253
- }
254
- exports.createCookie = createCookie;
255
- /**
256
- * Tells whether given objects have the same properties.
257
- */
258
- function hasSameProperties(a, b) {
259
- var aProps = Object.getOwnPropertyNames(a);
260
- var bProps = Object.getOwnPropertyNames(b);
261
- if (aProps.length !== bProps.length) {
262
- return false;
263
- }
264
- for (var i = 0; i < aProps.length; i++) {
265
- var propName = aProps[i];
266
- if (a[propName] !== b[propName]) {
267
- return false;
268
- }
269
- }
270
- return true;
271
- }
272
- exports.hasSameProperties = hasSameProperties;
273
- /**
274
- * Compare the cookie and return true if the cookies have equivalent
275
- * options and the cookies would be overwritten in the browser storage.
276
- *
277
- * @param a first Cookie for comparison
278
- * @param b second Cookie for comparison
279
- */
280
- function areCookiesEqual(a, b) {
281
- var sameSiteSame = a.sameSite === b.sameSite;
282
- if (typeof a.sameSite === 'string' && typeof b.sameSite === 'string') {
283
- sameSiteSame = a.sameSite.toLowerCase() === b.sameSite.toLowerCase();
284
- }
285
- return (hasSameProperties(__assign(__assign({}, a), { sameSite: undefined }), __assign(__assign({}, b), { sameSite: undefined })) && sameSiteSame);
286
- }
287
- exports.areCookiesEqual = areCookiesEqual;
288
- /* Functions */
289
-
290
- });
291
-
292
- _commonjsHelpers.unwrapExports(utils);
293
- var utils_1 = utils.areCookiesEqual;
294
- var utils_2 = utils.hasSameProperties;
295
- var utils_3 = utils.createCookie;
296
- var utils_4 = utils.isBrowser;
297
-
298
- var dist = _commonjsHelpers.createCommonjsModule(function (module, exports) {
299
- var __assign = (_commonjsHelpers.commonjsGlobal && _commonjsHelpers.commonjsGlobal.__assign) || function () {
300
- __assign = Object.assign || function(t) {
301
- for (var s, i = 1, n = arguments.length; i < n; i++) {
302
- s = arguments[i];
303
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
304
- t[p] = s[p];
305
- }
306
- return t;
307
- };
308
- return __assign.apply(this, arguments);
309
- };
310
- Object.defineProperty(exports, "__esModule", { value: true });
311
- exports.destroyCookie = exports.setCookie = exports.parseCookies = void 0;
312
-
313
-
314
-
315
- /**
316
- * Parses cookies.
317
- *
318
- * @param ctx NextJS page or API context, express context, null or undefined.
319
- * @param options Options that we pass down to `cookie` library.
320
- */
321
- function parseCookies(ctx, options) {
322
- var _a, _b;
323
- if ((_b = (_a = ctx === null || ctx === void 0 ? void 0 : ctx.req) === null || _a === void 0 ? void 0 : _a.headers) === null || _b === void 0 ? void 0 : _b.cookie) {
324
- return index$6.cookie.parse(ctx.req.headers.cookie, options);
325
- }
326
- if (utils.isBrowser()) {
327
- return index$6.cookie.parse(document.cookie, options);
328
- }
329
- return {};
330
- }
331
- exports.parseCookies = parseCookies;
332
- /**
333
- * Sets a cookie.
334
- *
335
- * @param ctx NextJS page or API context, express context, null or undefined.
336
- * @param name The name of your cookie.
337
- * @param value The value of your cookie.
338
- * @param options Options that we pass down to `cookie` library.
339
- */
340
- function setCookie$1(ctx, name, value, options) {
341
- var _a, _b;
342
- if (options === void 0) { options = {}; }
343
- // SSR
344
- if (((_a = ctx === null || ctx === void 0 ? void 0 : ctx.res) === null || _a === void 0 ? void 0 : _a.getHeader) && ctx.res.setHeader) {
345
- // Check if response has finished and warn about it.
346
- if ((_b = ctx === null || ctx === void 0 ? void 0 : ctx.res) === null || _b === void 0 ? void 0 : _b.finished) {
347
- console.warn("Not setting \"" + name + "\" cookie. Response has finished.");
348
- console.warn("You should set cookie before res.send()");
349
- return {};
350
- }
351
- /**
352
- * Load existing cookies from the header and parse them.
353
- */
354
- var cookies = ctx.res.getHeader('Set-Cookie') || [];
355
- if (typeof cookies === 'string')
356
- cookies = [cookies];
357
- if (typeof cookies === 'number')
358
- cookies = [];
359
- /**
360
- * Parse cookies but ignore values - we've already encoded
361
- * them in the previous call.
362
- */
363
- var parsedCookies = setCookie.parse(cookies, {
364
- decodeValues: false,
365
- });
366
- /**
367
- * We create the new cookie and make sure that none of
368
- * the existing cookies match it.
369
- */
370
- var newCookie_1 = utils.createCookie(name, value, options);
371
- var cookiesToSet_1 = [];
372
- parsedCookies.forEach(function (parsedCookie) {
373
- if (!utils.areCookiesEqual(parsedCookie, newCookie_1)) {
374
- /**
375
- * We serialize the cookie back to the original format
376
- * if it isn't the same as the new one.
377
- */
378
- var serializedCookie = index$6.cookie.serialize(parsedCookie.name, parsedCookie.value, __assign({
379
- // we prevent reencoding by default, but you might override it
380
- encode: function (val) { return val; } }, parsedCookie));
381
- cookiesToSet_1.push(serializedCookie);
382
- }
383
- });
384
- cookiesToSet_1.push(index$6.cookie.serialize(name, value, options));
385
- // Update the header.
386
- ctx.res.setHeader('Set-Cookie', cookiesToSet_1);
387
- }
388
- // Browser
389
- if (utils.isBrowser()) {
390
- if (options && options.httpOnly) {
391
- throw new Error('Can not set a httpOnly cookie in the browser.');
392
- }
393
- document.cookie = index$6.cookie.serialize(name, value, options);
394
- }
395
- return {};
396
- }
397
- exports.setCookie = setCookie$1;
398
- /**
399
- * Destroys a cookie with a particular name.
400
- *
401
- * @param ctx NextJS page or API context, express context, null or undefined.
402
- * @param name Cookie name.
403
- * @param options Options that we pass down to `cookie` library.
404
- */
405
- function destroyCookie(ctx, name, options) {
406
- /**
407
- * We forward the request destroy to setCookie function
408
- * as it is the same function with modified maxAge value.
409
- */
410
- return setCookie$1(ctx, name, '', __assign(__assign({}, (options || {})), { maxAge: -1 }));
411
- }
412
- exports.destroyCookie = destroyCookie;
413
- /* Utility Exports */
414
- exports.default = {
415
- set: setCookie$1,
416
- get: parseCookies,
417
- destroy: destroyCookie,
418
- };
419
-
420
- });
421
-
422
- _commonjsHelpers.unwrapExports(dist);
423
- var dist_1 = dist.destroyCookie;
424
- var dist_2 = dist.setCookie;
425
- var dist_3 = dist.parseCookies;
426
-
427
14
  var _this = undefined;
428
15
 
429
16
  var getRelatedArticle = function () {
@@ -500,13 +87,13 @@ var getRelatedArticle = function () {
500
87
 
501
88
 
502
89
  if (ctx && url) {
503
- cookies = dist_3(ctx);
90
+ cookies = nookies.parseCookies(ctx);
504
91
  prevSlugs = cookies['prevSlugs'];
505
92
 
506
93
  if (!!prevSlugs) {
507
- if (!prevSlugs.includes(url)) dist_2(ctx, 'prevSlugs', prevSlugs + ',"' + url + '"', {});
94
+ if (!prevSlugs.includes(url)) nookies.setCookie(ctx, 'prevSlugs', prevSlugs + ',"' + url + '"', {});
508
95
  filters = filters + ' && !(url.current in [' + prevSlugs + '])';
509
- } else dist_2(ctx, 'prevSlugs', '"' + url + '"', {});
96
+ } else nookies.setCookie(ctx, 'prevSlugs', '"' + url + '"', {});
510
97
  }
511
98
 
512
99
  query = getQuery('related', filters, '', articleCount).replace('&& taxonomyMapping[]._ref in $taxonomy', '');
package/dist/cjs/index.js CHANGED
@@ -178,10 +178,11 @@ var ConferenceArticleCard = require('./ConferenceArticleCard.js');
178
178
  var KMTracker = require('./KMTracker.js');
179
179
  var getSeriesDetail = require('./getSeriesDetail.js');
180
180
  var SetCookie = require('./SetCookie.js');
181
- require('./index-bd6c9f56.js');
182
- var getRelatedArticle = require('./getRelatedArticle.js');
181
+ require('nookies');
183
182
  var getQuery = require('./getQuery.js');
183
+ var getRelatedArticle = require('./getRelatedArticle.js');
184
184
  var Auth = require('./Auth.js');
185
+ require('cookie');
185
186
  require('passport-local');
186
187
  require('mysql');
187
188
  require('./md5-5039b1a6.js');
@@ -357,8 +358,8 @@ exports.ConferenceArticleCard = ConferenceArticleCard;
357
358
  exports.KMTracker = KMTracker;
358
359
  exports.getSeriesDetail = getSeriesDetail;
359
360
  exports.SetCookie = SetCookie;
360
- exports.getRelatedArticle = getRelatedArticle;
361
361
  exports.getQuery = getQuery;
362
+ exports.getRelatedArticle = getRelatedArticle;
362
363
  exports.Auth = Auth.default;
363
364
  exports.getTargeting = getTargeting.getTargeting;
364
365
  exports.View = View;
@@ -1,10 +1,13 @@
1
1
  import './_commonjsHelpers-0c4b6f40.js';
2
2
  import './_to-object-a4107da3.js';
3
3
  import './es6.string.iterator-c990c18c.js';
4
+ import './_library-528f1934.js';
4
5
  import './core.get-iterator-method-e1de7503.js';
5
6
  import './_object-pie-33c40e79.js';
6
7
  import { _ as _extends } from './extends-6f2fcc99.js';
7
8
  import './web.dom.iterable-4439f05a.js';
9
+ import './typeof-6435ba1c.js';
10
+ import './_is-array-58e95429.js';
8
11
  import React__default from 'react';
9
12
  import 'prop-types';
10
13
  import 'react-dom';
package/dist/esm/Auth.js CHANGED
@@ -14,7 +14,7 @@ import { _ as _JSON$stringify } from './stringify-4330ccdc.js';
14
14
  import { a as _asyncToGenerator, r as regenerator } from './asyncToGenerator-fc1c2e29.js';
15
15
  import { Col, Form, Button, Spinner } from 'react-bootstrap';
16
16
  import { u as util } from './util-7700fc59.js';
17
- import { s as serialize_1, p as parse_1 } from './index-db3bb315.js';
17
+ import { serialize, parse } from 'cookie';
18
18
  import Local from 'passport-local';
19
19
  import mysql from 'mysql';
20
20
  import { m as md5 } from './md5-9be0e905.js';
@@ -2256,7 +2256,7 @@ var MAX_AGE = 60 * 60 * 8; // 8 hours
2256
2256
 
2257
2257
  function setTokenCookie(res, token, eKey) {
2258
2258
  var cookies_serailized = [];
2259
- cookies_serailized.push(serialize_1(TOKEN_NAME, token, {
2259
+ cookies_serailized.push(serialize(TOKEN_NAME, token, {
2260
2260
  //maxAge: MAX_AGE, // we want login cookie to expire when browser
2261
2261
  //expires: new Date(Date.now() + MAX_AGE * 1000),
2262
2262
  //httpOnly: true,
@@ -2265,7 +2265,7 @@ function setTokenCookie(res, token, eKey) {
2265
2265
  //sameSite: 'lax',
2266
2266
  }));
2267
2267
 
2268
- cookies_serailized.push(serialize_1('eKey', eKey, {
2268
+ cookies_serailized.push(serialize('eKey', eKey, {
2269
2269
  //maxAge: MAX_AGE, // we want login cookie to expire when browser
2270
2270
  //expires: new Date(Date.now() + MAX_AGE * 1000),
2271
2271
  //httpOnly: true,
@@ -2279,12 +2279,12 @@ function setTokenCookie(res, token, eKey) {
2279
2279
 
2280
2280
  function removeTokenCookie(res) {
2281
2281
  var cookies_serailized = [];
2282
- cookies_serailized.push(serialize_1(TOKEN_NAME, '', {
2282
+ cookies_serailized.push(serialize(TOKEN_NAME, '', {
2283
2283
  maxAge: -1,
2284
2284
  expires: new Date(Date.now() - MAX_AGE * 1000),
2285
2285
  path: '/'
2286
2286
  }));
2287
- cookies_serailized.push(serialize_1('eKey', '', {
2287
+ cookies_serailized.push(serialize('eKey', '', {
2288
2288
  maxAge: -1,
2289
2289
  expires: new Date(Date.now() - MAX_AGE * 1000),
2290
2290
  path: '/'
@@ -2299,7 +2299,7 @@ function parseCookies(req) {
2299
2299
 
2300
2300
  // For pages we do need to parse the cookies.
2301
2301
  var cookie = req.headers ? req.headers.cookie : null;
2302
- return parse_1(cookie || '');
2302
+ return parse(cookie || '');
2303
2303
  }
2304
2304
 
2305
2305
  function getTokenCookie(req) {
@@ -4046,6 +4046,11 @@ var ImageSlider = function ImageSlider(props) {
4046
4046
 
4047
4047
  var _this = undefined;
4048
4048
 
4049
+ var checkIsFacebookGroup = function checkIsFacebookGroup(url) {
4050
+ return (/www\.facebook\.com\/groups/.test(url)
4051
+ );
4052
+ };
4053
+
4049
4054
  var PartnerDetails = function PartnerDetails(_ref) {
4050
4055
  var posts = _ref.posts,
4051
4056
  query = _ref.query,
@@ -4077,7 +4082,8 @@ var PartnerDetails = function PartnerDetails(_ref) {
4077
4082
  React__default.createElement('img', {
4078
4083
  alt: partnerDetails.thumbnail && partnerDetails.thumbnail.alt ? partnerDetails.thumbnail.alt : partnerDetails.name,
4079
4084
  style: { maxWidth: '100%' },
4080
- src: partnerDetails.thumbnail ? urlFor({ client: client, source: partnerDetails.thumbnail.asset }) : '' }),
4085
+ src: partnerDetails.thumbnail ? urlFor({ client: client, source: partnerDetails.thumbnail.asset }) : ''
4086
+ }),
4081
4087
  partnerDetails.thumbnail && partnerDetails.thumbnail.caption && React__default.createElement(
4082
4088
  'figcaption',
4083
4089
  null,
@@ -4090,7 +4096,8 @@ var PartnerDetails = function PartnerDetails(_ref) {
4090
4096
  React__default.createElement('img', {
4091
4097
  alt: partnerDetails.thumbnail && partnerDetails.thumbnail.alt ? partnerDetails.thumbnail.alt : partnerDetails.name,
4092
4098
  style: { maxWidth: '100%' },
4093
- src: partnerDetails.thumbnail ? urlFor({ client: client, source: partnerDetails.thumbnail.asset }) : '' }),
4099
+ src: partnerDetails.thumbnail ? urlFor({ client: client, source: partnerDetails.thumbnail.asset }) : ''
4100
+ }),
4094
4101
  partnerDetails.thumbnail && partnerDetails.thumbnail.caption && React__default.createElement(
4095
4102
  'figcaption',
4096
4103
  null,
@@ -4102,16 +4109,16 @@ var PartnerDetails = function PartnerDetails(_ref) {
4102
4109
  { jsx: 'true' },
4103
4110
  '\n @media screen and (max-width: 768px) {\n .partners-logo {\n width: 100%;\n min-width: 100%;\n }\n .partner-logo-wrap {\n flex-wrap: wrap;\n }\n .block-content-partners {\n padding-left: 0 !important;\n }\n }\n '
4104
4111
  ),
4105
- (partnerDetails.description || partnerDetails.linkedin || partnerDetails.twitter && partnerDetails.facebook) && React__default.createElement(
4112
+ (partnerDetails.description || partnerDetails.linkedin || partnerDetails.twitter && partnerDetails.facebook || !partnerDetails.twitter && partnerDetails.facebook && checkIsFacebookGroup(partnerDetails.facebook)) && React__default.createElement(
4106
4113
  'div',
4107
4114
  { className: 'block-content-partners my-4', style: { maxWidth: '100%', paddingLeft: '2rem', flex: '1 1 auto' } },
4108
4115
  partnerDetails.description && React__default.createElement(BlockContent, _extends({ serializers: getSerializers(client), blocks: partnerDetails.description, imageOptions: { w: 320, h: 240, fit: 'max' } }, client.config())),
4109
- (partnerDetails.linkedin || partnerDetails.twitter && partnerDetails.facebook) && React__default.createElement(
4116
+ (partnerDetails.linkedin || partnerDetails.twitter && partnerDetails.facebook || !partnerDetails.twitter && partnerDetails.facebook && checkIsFacebookGroup(partnerDetails.facebook)) && React__default.createElement(
4110
4117
  'div',
4111
4118
  null,
4112
4119
  React__default.createElement(
4113
4120
  'p',
4114
- { 'class': 'd-inline-block font-weight-bold' },
4121
+ { className: 'd-inline-block font-weight-bold' },
4115
4122
  'Connect with us:'
4116
4123
  ),
4117
4124
  ' ',
@@ -4121,7 +4128,7 @@ var PartnerDetails = function PartnerDetails(_ref) {
4121
4128
  rel: 'noopener noreferrer',
4122
4129
  style: { height: 30, width: 30 }
4123
4130
  }),
4124
- partnerDetails.twitter && partnerDetails.facebook && React__default.createElement(reactSocialIcons_1, { url: partnerDetails.facebook, target: '_blank', rel: 'noopener noreferrer', style: { height: 30, width: 30, marginLeft: '0.25rem' } })
4131
+ (partnerDetails.twitter && partnerDetails.facebook || !partnerDetails.twitter && partnerDetails.facebook && checkIsFacebookGroup(partnerDetails.facebook)) && React__default.createElement(reactSocialIcons_1, { url: partnerDetails.facebook, target: '_blank', rel: 'noopener noreferrer', style: { height: 30, width: 30, marginLeft: '0.25rem' } })
4125
4132
  )
4126
4133
  )
4127
4134
  ),
@@ -4140,7 +4147,7 @@ var PartnerDetails = function PartnerDetails(_ref) {
4140
4147
  { className: ' mb-5' },
4141
4148
  React__default.createElement(Feature, { dataset: features, client: client })
4142
4149
  ),
4143
- (partnerDetails.twitter || partnerDetails.facebook) && React__default.createElement(
4150
+ (partnerDetails.twitter || partnerDetails.facebook && !checkIsFacebookGroup(partnerDetails.facebook)) && React__default.createElement(
4144
4151
  'div',
4145
4152
  { className: 'mb-5', style: { width: '100%', maxWidth: '100%', textAlign: 'center', padding: '15px', border: '2px solid #aaa', borderRadius: '15px' } },
4146
4153
  partnerDetails.twitter ? React__default.createElement(TwitterTimelineEmbed, { sourceType: 'url', url: partnerDetails.twitter, options: { height: 400 } }) : partnerDetails.facebook && React__default.createElement(
@@ -4201,8 +4208,8 @@ PartnerDetails.returnGetInitialProps = function () {
4201
4208
 
4202
4209
 
4203
4210
  if (category) {
4204
- //if partners page has a sub category such as onclive
4205
- //e.g. /sap-partner/[category]/[partner]
4211
+ // if partners page has a sub category such as onclive
4212
+ // e.g. /sap-partner/[category]/[partner]
4206
4213
 
4207
4214
  partnerQuery = '*[_type == \'documentGroup\' && !(_id in path("drafts.**")) && identifier.current == \'' + category + '\' && references(\'' + partnerDocumentGroupID + '\')] [0] {\n ...,\n \'partner\': *[_type == \'documentGroup\' && identifier.current == \'' + identifier + '\' && references(^._id)] [0] {\n description,\n name,\n identifier,\n thumbnail,\n twitter,\n facebook,\n linkedin,\n "affiliates": description[_type==\'slideshows\']{\n ...,\n slides->{...}\n }\n \n }\n }';
4208
4215
  }
@@ -4229,7 +4236,7 @@ PartnerDetails.returnGetInitialProps = function () {
4229
4236
  articles = _context.sent;
4230
4237
 
4231
4238
 
4232
- //need to exclude slideshows from body due to the affiliate slider
4239
+ // need to exclude slideshows from body due to the affiliate slider
4233
4240
  if (partnerDetails && partnerDetails.description) {
4234
4241
  partnerDetails.description = partnerDetails.description.filter(function (block) {
4235
4242
  return block._type !== 'slideshows';
package/dist/esm/View.js CHANGED
@@ -64,9 +64,9 @@ import { _ as _Object$keys } from './keys-8eda7a5c.js';
64
64
  import 'react-bootstrap/Dropdown';
65
65
  import { b as FaMinus, c as FaPlus } from './index.esm-cf08bf18.js';
66
66
  import getSeriesDetail from './getSeriesDetail.js';
67
- import './index-db3bb315.js';
68
- import getRelatedArticle from './getRelatedArticle.js';
67
+ import 'nookies';
69
68
  import getQuery from './getQuery.js';
69
+ import getRelatedArticle from './getRelatedArticle.js';
70
70
  import { S as SeriesSlider } from './SeriesSlider-a866bb21.js';
71
71
  import { g as getTargeting, a as getContentPlacementUrl } from './getTargeting-bd800589.js';
72
72
  import getKeywords from './getKeywords.js';