@mjhls/mjh-framework 1.0.886 → 1.0.887-search-test

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # mjh-framework v. 1.0.886
1
+ # mjh-framework v. 1.0.887
2
2
 
3
3
  [![NPM](https://img.shields.io/npm/v/mjh-framework.svg)](https://www.npmjs.com/package/mjh-framework) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
4
4
 
@@ -14271,7 +14271,20 @@ var AlgoliaSearch = function (_React$Component) {
14271
14271
  onSearchParameters: this.props.onSearchParameters
14272
14272
  }, this.props),
14273
14273
  React__default['default'].createElement(Configure, { hitsPerPage: this.props.hitsPerPage || 20 }),
14274
- React__default['default'].createElement(SearchBox, null),
14274
+ React__default['default'].createElement(
14275
+ 'div',
14276
+ { className: 'd-flex align-items-center' },
14277
+ this.props.searchIconUrl && React__default['default'].createElement(
14278
+ 'div',
14279
+ { className: 'custom-search-img mr-2' },
14280
+ React__default['default'].createElement('img', { className: 'img-fluid', src: this.props.searchIconUrl, alt: 'search icon' })
14281
+ ),
14282
+ React__default['default'].createElement(
14283
+ 'div',
14284
+ { style: { flex: '1 1 auto' } },
14285
+ React__default['default'].createElement(SearchBox, null)
14286
+ )
14287
+ ),
14275
14288
  this.props.refinementAttributes && React__default['default'].createElement(
14276
14289
  'div',
14277
14290
  { className: 'search_refinement' },
@@ -14295,7 +14308,7 @@ var AlgoliaSearch = function (_React$Component) {
14295
14308
  React__default['default'].createElement(
14296
14309
  'style',
14297
14310
  { jsx: 'true' },
14298
- '\n .hitResult {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n margin-bottom: 1rem;\n border-bottom: 1px solid #00000024;\n padding: 1rem 0;\n }\n .hitResult > a:first-child {\n width: 30%;\n }\n .hitResult > a:first-child > div{\n width: 100%;\n }\n .hitResult > div:last-child {\n width: 100%;\n }\n .hitResult > div:last-child > a {\n margin-bottom: .5rem;\n width: 100%;\n }\n @media only screen and (max-width: 568px) {\n .hitResult {\n flex-direction: column;\n align-items: center;\n border: none;\n padding: 0;\n }\n .hitResult > a:first-child {\n width: 100%;\n }\n .hitResult > div:last-child {\n width: 100%;\n }\n }\n .AlgoliaResults {\n padding-left: 15px;\n margin-top: 3rem;\n }\n\n .search_refinement {\n display: flex;\n margin: 2rem 0;\n }\n\n .search_refinement > div {\n padding-right: 1rem;\n max-height: 500px;\n }\n\n .ais-Hits-list {\n margin: 0;\n list-style: none;\n padding-inline-start: 0;\n }\n .ais-Pagination-list {\n list-style: none;\n }\n .ais-Pagination-list {\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n }\n .ais-Pagination-item + .ais-Pagination-item {\n margin-left: 0.3rem;\n }\n .ais-Pagination-link {\n padding: 0.3rem 0.6rem;\n display: block;\n border: 1px solid var(--search-primary);\n border-radius: 5px;\n transition: background-color 0.2s ease-out;\n }\n .ais-Pagination-link:focus,\n .ais-Pagination-link:hover {\n background-color: var(--search-secondary);\n color: #fff;\n }\n .ais-Pagination-item--disabled .ais-Pagination-link {\n opacity: 0.6;\n cursor: not-allowed;\n color: var(--search-secondary);\n }\n .ais-Pagination-item--disabled .ais-Pagination-link:focus,\n .ais-Pagination-item--disabled .ais-Pagination-link:hover {\n color: #fff;\n background-color: var(--search-secondary);\n }\n .ais-Pagination-item--selected .ais-Pagination-link {\n color: #fff;\n background-color: var(--search-primary);\n border-color: var(--search-primary);\n }\n .ais-Pagination-item--selected .ais-Pagination-link:focus,\n .ais-Pagination-item--selected .ais-Pagination-link:hover {\n color: #fff;\n }\n .ais-Pagination-list,\n .ais-Results-list {\n margin: 0;\n padding: 0;\n list-style: none;\n }\n .ais-Pagination-list,\n .ais-PoweredBy,\n .ais-RangeInput-form,\n .ais-RatingMenu-link {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n }\n\n .ais-RefinementList-item {\n list-style: none;\n margin: 0;\n padding: 0;\n }\n .ais-RefinementList-list {\n margin: 0;\n padding: 0 1rem;\n width: max-content;\n }\n .ais-SearchBox-form {\n width: 100%;\n border-radius: 5px;\n height: 48px;\n }\n .ais-SearchBox-input {\n padding: 0.5rem;\n border-radius: 5px;\n width: calc(100% - 150px);\n height: 48px;\n border: 0;\n border: 0.5px solid var(--search-secondary);\n }\n\n .ais-SearchBox-submit {\n width: 78px;\n border-radius: 5px;\n padding: 7px;\n margin-left: 5px;\n height: 48px;\n background-color: var(--search-primary);\n border: 0.5px solid var(--search-secondary);\n }\n\n .ais-SearchBox-submit > svg {\n fill: #fff;\n }\n .search_refinement > .dropdown > button {\n background-color: var(--search-primary);\n border-color: var(--search-primary);\n }\n\n .ais-SearchBox-reset {\n height: 48px;\n width: 48px;\n color: #fff;\n background-color: var(--search-primary);\n border: 0;\n margin-left: 5px;\n border-radius: 5px;\n border: 0.5px solid var(--search-secondary);\n }\n\n .ais-SearchBox-reset > svg {\n fill: #fff;\n }\n .ais-RefinementList-checkbox {\n margin-right: 5px;\n }\n\n .ais-RefinementList-showMore {\n padding: 0.5rem;\n border: 0;\n background-color: var(--search-primary);\n border-color: var(--search-primary);\n color: #fff;\n border: 1px solid;\n border-radius: 5px;\n margin-left: 1rem;\n }\n '
14311
+ '\n .hitResult {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n margin-bottom: 1rem;\n border-bottom: 1px solid #00000024;\n padding: 1rem 0;\n }\n .hitResult > a:first-child {\n width: 30%;\n }\n .hitResult > a:first-child > div {\n width: 100%;\n }\n .hitResult > div:last-child {\n width: 100%;\n }\n .hitResult > div:last-child > a {\n margin-bottom: 0.5rem;\n width: 100%;\n }\n .custom-search-img{\n max-width: 130px;\n }\n @media only screen and (max-width: 568px) {\n .custom-search-img {\n max-width: 80px;\n }\n .hitResult {\n flex-direction: column;\n align-items: center;\n border: none;\n padding: 0;\n }\n .hitResult > a:first-child {\n width: 100%;\n }\n .hitResult > div:last-child {\n width: 100%;\n }\n }\n .AlgoliaResults {\n padding-left: 15px;\n margin-top: 3rem;\n }\n\n .search_refinement {\n display: flex;\n margin: 2rem 0;\n }\n\n .search_refinement > div {\n padding-right: 1rem;\n max-height: 500px;\n }\n\n .ais-Hits-list {\n margin: 0;\n list-style: none;\n padding-inline-start: 0;\n }\n .ais-Pagination-list {\n list-style: none;\n }\n .ais-Pagination-list {\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n }\n .ais-Pagination-item + .ais-Pagination-item {\n margin-left: 0.3rem;\n }\n .ais-Pagination-link {\n padding: 0.3rem 0.6rem;\n display: block;\n border: 1px solid var(--search-primary);\n border-radius: 5px;\n transition: background-color 0.2s ease-out;\n }\n .ais-Pagination-link:focus,\n .ais-Pagination-link:hover {\n background-color: var(--search-secondary);\n color: #fff;\n }\n .ais-Pagination-item--disabled .ais-Pagination-link {\n opacity: 0.6;\n cursor: not-allowed;\n color: var(--search-secondary);\n }\n .ais-Pagination-item--disabled .ais-Pagination-link:focus,\n .ais-Pagination-item--disabled .ais-Pagination-link:hover {\n color: #fff;\n background-color: var(--search-secondary);\n }\n .ais-Pagination-item--selected .ais-Pagination-link {\n color: #fff;\n background-color: var(--search-primary);\n border-color: var(--search-primary);\n }\n .ais-Pagination-item--selected .ais-Pagination-link:focus,\n .ais-Pagination-item--selected .ais-Pagination-link:hover {\n color: #fff;\n }\n .ais-Pagination-list,\n .ais-Results-list {\n margin: 0;\n padding: 0;\n list-style: none;\n }\n .ais-Pagination-list,\n .ais-PoweredBy,\n .ais-RangeInput-form,\n .ais-RatingMenu-link {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n }\n\n .ais-RefinementList-item {\n list-style: none;\n margin: 0;\n padding: 0;\n }\n .ais-RefinementList-list {\n margin: 0;\n padding: 0 1rem;\n width: max-content;\n }\n .ais-SearchBox-form {\n width: 100%;\n border-radius: 5px;\n height: 48px;\n text-align: center\'\n }\n .ais-SearchBox-input {\n padding: 0.5rem;\n border-radius: 5px;\n width: calc(100% - ' + (this.props.searchIconUrl ? '110px' : '150px') + ');\n height: 48px;\n border: 0;\n border: 0.5px solid var(--search-secondary);\n }\n\n .ais-SearchBox-submit {\n width: ' + (this.props.searchIconUrl ? '48px' : '78px') + ';\n border-radius: 5px;\n padding: 7px;\n margin-left: 5px;\n height: 48px;\n background-color: var(--search-primary);\n border: 0.5px solid var(--search-secondary);\n }\n\n .ais-SearchBox-submit > svg {\n fill: #fff;\n }\n .search_refinement > .dropdown > button {\n background-color: var(--search-primary);\n border-color: var(--search-primary);\n }\n\n .ais-SearchBox-reset {\n height: 48px;\n width: 48px;\n color: #fff;\n background-color: var(--search-primary);\n border: 0;\n margin-left: 5px;\n border-radius: 5px;\n border: 0.5px solid var(--search-secondary);\n }\n\n .ais-SearchBox-reset > svg {\n fill: #fff;\n }\n .ais-RefinementList-checkbox {\n margin-right: 5px;\n }\n\n .ais-RefinementList-showMore {\n padding: 0.5rem;\n border: 0;\n background-color: var(--search-primary);\n border-color: var(--search-primary);\n color: #fff;\n border: 1px solid;\n border-radius: 5px;\n margin-left: 1rem;\n }\n '
14299
14312
  )
14300
14313
  );
14301
14314
  }
@@ -6,7 +6,7 @@ var slicedToArray = require('./slicedToArray-067dd3bc.js');
6
6
  var React = require('react');
7
7
  var NavFooter = require('./NavFooter-3dcd99a8.js');
8
8
  var index_esm$2 = require('./index.esm-2bb721c8.js');
9
- var SocialSearchComponent = require('./SocialSearchComponent-4942ddfc.js');
9
+ var SocialSearchComponent = require('./SocialSearchComponent-b7faaedc.js');
10
10
  require('react-bootstrap/Form');
11
11
  require('react-bootstrap/FormControl');
12
12
  require('react-bootstrap/Button');
@@ -64,6 +64,8 @@ var HamMagazine = function HamMagazine(props) {
64
64
  socialIconVariant = _props$socialIconVari === undefined ? 'light' : _props$socialIconVari,
65
65
  invertedLogo = props.invertedLogo;
66
66
  props.settings;
67
+ var _props$searchIconUrl = props.searchIconUrl,
68
+ searchIconUrl = _props$searchIconUrl === undefined ? null : _props$searchIconUrl;
67
69
 
68
70
  var navRef = React.useRef(null);
69
71
  var topNavRef = React.useRef(null);
@@ -381,7 +383,7 @@ var HamMagazine = function HamMagazine(props) {
381
383
  React__default['default'].createElement(
382
384
  'div',
383
385
  { className: 'is-mobile' },
384
- React__default['default'].createElement(SocialSearchComponent.SocialSearchComponent, { type: 'mobile', socialIconVariant: socialIconVariant, website: website, navID: 'navbar-ham' })
386
+ React__default['default'].createElement(SocialSearchComponent.SocialSearchComponent, { type: 'mobile', socialIconVariant: socialIconVariant, website: website, navID: 'navbar-ham', searchIconUrl: searchIconUrl })
385
387
  )
386
388
  ),
387
389
  React__default['default'].createElement(
@@ -559,7 +561,7 @@ var HamMagazine = function HamMagazine(props) {
559
561
  React__default['default'].createElement(
560
562
  'div',
561
563
  { className: 'is-desktop' },
562
- React__default['default'].createElement(SocialSearchComponent.SocialSearchComponent, { type: 'desktop', socialIconVariant: socialIconVariant, website: website, navID: 'navbar-ham' })
564
+ React__default['default'].createElement(SocialSearchComponent.SocialSearchComponent, { type: 'desktop', socialIconVariant: socialIconVariant, website: website, navID: 'navbar-ham', searchIconUrl: searchIconUrl })
563
565
  )
564
566
  ),
565
567
  website && React__default['default'].createElement(
@@ -403,7 +403,7 @@ MediaSeriesLanding.getInitialData = function () {
403
403
 
404
404
  case 9:
405
405
  docGroupID = _context2.sent;
406
- seriesQuery = '*[_type == \'documentGroup\' && references(\'' + docGroupID._id + '\') && isSeries != false && isShow != false && defined(published) && dateTime(published) <= dateTime(now()) ] | order(published desc) [$from...$to] {\n _id,\n name,\n identifier,\n published,\n thumbnail,\n description,\n topicMapping[]->,\n isGated,\n \'pageNumber\': ' + currentPage + ',\n \'parentUrl\': \'' + identifier + '\'\n }';
406
+ seriesQuery = '*[_type == \'documentGroup\' && references(\'' + docGroupID._id + '\') && isSeries != false && isShow != false && defined(published) && dateTime(published) <= dateTime(now()) ] | order(published desc) [$from...$to] {\n _id,\n name,\n identifier,\n published,\n thumbnail{ ..., asset-> },\n description,\n topicMapping[]->,\n isGated,\n \'pageNumber\': ' + currentPage + ',\n \'parentUrl\': \'' + identifier + '\'\n }';
407
407
  _context2.next = 13;
408
408
  return client.fetch(seriesQuery, params);
409
409
 
@@ -424,7 +424,7 @@ MediaSeriesLanding.getInitialData = function () {
424
424
  docGroupID = _context2.sent;
425
425
  seriesQueryFilters = '[\n _type == \'documentGroup\' \n && references(\'' + docGroupID._id + '\') \n && isSeries != false \n && isShow != false \n && defined(published) \n && published <= now()\n ]';
426
426
  seriesQuerySorts = 'order(published desc) [$from...$to]';
427
- seriesQueryProjection = '{\n _id,\n name,\n identifier,\n published,\n thumbnail,\n description,\n topicMapping[]->,\n isGated,\n \'parentUrl\': \'' + identifier + '\'\n }';
427
+ seriesQueryProjection = '{\n _id,\n name,\n identifier,\n published,\n thumbnail{ ..., asset-> },\n description,\n topicMapping[]->,\n isGated,\n \'parentUrl\': \'' + identifier + '\'\n }';
428
428
  seriesQuery = ['*'].concat(seriesQueryFilters).concat(seriesQuerySorts).concat(seriesQueryProjection).join('|');
429
429
  totalSeriesCountQuery = 'count(' + ['*'].concat(seriesQueryFilters).join('|') + ')';
430
430
  _context2.next = 17;
@@ -14,7 +14,7 @@ var NavFooter = require('./NavFooter-3dcd99a8.js');
14
14
  var index_esm$2 = require('./index.esm-2bb721c8.js');
15
15
  var main = require('./main-f1c77adb.js');
16
16
  var Segment = require('./Segment.js');
17
- var SocialSearchComponent = require('./SocialSearchComponent-4942ddfc.js');
17
+ var SocialSearchComponent = require('./SocialSearchComponent-b7faaedc.js');
18
18
  require('./_commonjsHelpers-06173234.js');
19
19
  require('./web.dom.iterable-d98303e0.js');
20
20
  require('./core.get-iterator-method-5643aa10.js');
@@ -238,15 +238,15 @@ PartnerDetails.returnGetInitialProps = function () {
238
238
  switch (_context.prev = _context.next) {
239
239
  case 0:
240
240
  today = moment.moment().utc().format();
241
- featureQuery = '*[_type == \'feature\' && is_active == true && feature_url == \'/' + partnerPageUrl + '/' + (category ? category + '/' : null) + identifier + '\'] | order(_updatedAt asc)[0..5]{\n ...,\n \'feature_img\' : feature_img.asset->url\n }';
242
- partnerQuery = '*[_type == \'documentGroup\' \n && !(_id in path("drafts.**"))\n && references(\'' + partnerDocumentGroupID + '\')\n && identifier.current == \'' + identifier + '\'] | order(name asc) [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 }';
241
+ featureQuery = '*[_type == \'feature\' && is_active == true && feature_url == \'/' + partnerPageUrl + '/' + (category ? category + '/' : null) + identifier + '\'] | order(_updatedAt asc)[0..5]{\n ...,\n \'feature_img\' : feature_img.asset->\n }';
242
+ partnerQuery = '*[_type == \'documentGroup\' \n && !(_id in path("drafts.**"))\n && references(\'' + partnerDocumentGroupID + '\')\n && identifier.current == \'' + identifier + '\'] | order(name asc) [0] {\n description,\n name,\n identifier,\n thumbnail{ ..., asset-> },\n twitter,\n facebook,\n linkedin,\n "affiliates": description[_type==\'slideshows\']{\n ...,\n slides->{...}\n }\n }';
243
243
 
244
244
 
245
245
  if (category) {
246
246
  // if partners page has a sub category such as onclive
247
247
  // e.g. /sap-partner/[category]/[partner]
248
248
 
249
- 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 }';
249
+ 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{ ..., asset-> },\n twitter,\n facebook,\n linkedin,\n "affiliates": description[_type==\'slideshows\']{\n ...,\n slides->{...}\n }\n \n }\n }';
250
250
  }
251
251
 
252
252
  taxonomyQuery = '*[_type == \'documentGroup\' \n && !(_id in path("drafts.**"))\n && references(\'' + partnerDocumentGroupID + '\')\n && isShow != false\n && identifier.current == \'' + identifier + '\'] [0] {\n \'id\': _id,\n \'title\': name\n }';
@@ -263,7 +263,7 @@ PartnerDetails.returnGetInitialProps = function () {
263
263
  features = _ref4[0];
264
264
  partnerDetails = _ref4[1];
265
265
  taxonomyDetails = _ref4[2];
266
- articlesQuery = '*[_type == \'article\' && !(_id in path("drafts.**")) && defined(title) && is_visible == true && defined(url) && dateTime(published) <= dateTime(\'' + today + '\') && passwordLocked != true && references(\'' + taxonomyDetails.id + '\')] | order(published desc)[$from...$to]{\n title,\n summary,\n thumbnail,\n url,\n published,\n contentCategory->,\n \'pageNumber\': ' + currentPage + '\n }';
266
+ articlesQuery = '*[_type == \'article\' && !(_id in path("drafts.**")) && defined(title) && is_visible == true && defined(url) && dateTime(published) <= dateTime(\'' + today + '\') && passwordLocked != true && references(\'' + taxonomyDetails.id + '\')] | order(published desc)[$from...$to]{\n title,\n summary,\n thumbnail{ ..., asset-> },\n url,\n published,\n contentCategory->,\n \'pageNumber\': ' + currentPage + '\n }';
267
267
  _context.next = 16;
268
268
  return client.fetch(articlesQuery, params);
269
269
 
@@ -239,15 +239,15 @@ PartnerDetails.returnGetInitialProps = function () {
239
239
  while (1) {
240
240
  switch (_context.prev = _context.next) {
241
241
  case 0:
242
- featureQuery = '*[_type == \'feature\' && is_active == true && feature_url == \'/' + partnerPageUrl + '/' + (category ? category + '/' : null) + identifier + '\'] | order(_updatedAt asc)[0..5]{\n ...,\n \'feature_img\' : feature_img.asset->url\n }';
243
- partnerQuery = '*[_type == \'documentGroup\' \n && !(_id in path("drafts.**"))\n && references(\'' + partnerDocumentGroupID + '\')\n && identifier.current == \'' + identifier + '\'] | order(name asc) [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 }';
242
+ featureQuery = '*[_type == \'feature\' && is_active == true && feature_url == \'/' + partnerPageUrl + '/' + (category ? category + '/' : null) + identifier + '\'] | order(_updatedAt asc)[0..5]{\n ...,\n \'feature_img\' : feature_img.asset->\n }';
243
+ partnerQuery = '*[_type == \'documentGroup\' \n && !(_id in path("drafts.**"))\n && references(\'' + partnerDocumentGroupID + '\')\n && identifier.current == \'' + identifier + '\'] | order(name asc) [0] {\n description,\n name,\n identifier,\n thumbnail{ ..., asset-> },\n twitter,\n facebook,\n linkedin,\n "affiliates": description[_type==\'slideshows\']{\n ...,\n slides->{...}\n }\n }';
244
244
 
245
245
 
246
246
  if (category) {
247
247
  // if partners page has a sub category such as onclive
248
248
  // e.g. /sap-partner/[category]/[partner]
249
249
 
250
- 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 }';
250
+ 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{ ..., asset-> },\n twitter,\n facebook,\n linkedin,\n "affiliates": description[_type==\'slideshows\']{\n ...,\n slides->{...}\n }\n \n }\n }';
251
251
  }
252
252
 
253
253
  taxonomyQuery = '*[_type == \'documentGroup\' \n && !(_id in path("drafts.**"))\n && references(\'' + partnerDocumentGroupID + '\')\n && isShow != false\n && identifier.current == \'' + identifier + '\'] [0] {\n \'id\': _id,\n \'title\': name\n }';
@@ -266,7 +266,7 @@ PartnerDetails.returnGetInitialProps = function () {
266
266
  taxonomyDetails = _ref4[2];
267
267
  articlesQueryFilters = '[\n _type == \'article\' \n && !(_id in path("drafts.**")) \n && defined(title) \n && is_visible == true \n && defined(url) \n && published <= now()\n && passwordLocked != true \n && references(\'' + taxonomyDetails.id + '\')\n ]';
268
268
  articlesQuerySorts = 'order(published desc)[$from...$to]';
269
- articlesQueryProjection = '{\n title,\n summary,\n thumbnail,\n url,\n published,\n contentCategory->\n }';
269
+ articlesQueryProjection = '{\n title,\n summary,\n thumbnail{ ..., asset-> },\n url,\n published,\n contentCategory->\n }';
270
270
  articlesQuery = ['*'].concat(articlesQueryFilters).concat(articlesQuerySorts).concat(articlesQueryProjection).join('|');
271
271
  totalArticlesCountQuery = 'count(' + ['*'].concat(articlesQueryFilters).join('|') + ')';
272
272
  _context.next = 19;
@@ -21,7 +21,9 @@ var SocialSearchComponent = function SocialSearchComponent(_ref) {
21
21
  var type = _ref.type,
22
22
  socialIconVariant = _ref.socialIconVariant,
23
23
  website = _ref.website,
24
- navID = _ref.navID;
24
+ navID = _ref.navID,
25
+ _ref$searchIconUrl = _ref.searchIconUrl,
26
+ searchIconUrl = _ref$searchIconUrl === undefined ? null : _ref$searchIconUrl;
25
27
 
26
28
  // Search Term
27
29
  var _useState = React.useState(''),
@@ -105,7 +107,12 @@ var SocialSearchComponent = function SocialSearchComponent(_ref) {
105
107
  { style: { padding: '6px' }, inline: true, onSubmit: function onSubmit(e) {
106
108
  return submitSearch(e);
107
109
  } },
108
- React__default['default'].createElement(FormControl__default['default'], { style: { width: '78%' }, placeholder: 'Search', type: 'text', value: searchKey, onChange: function onChange(e) {
110
+ searchIconUrl && React__default['default'].createElement(
111
+ 'div',
112
+ { style: { maxWidth: '90px', marginRight: '.5rem' } },
113
+ React__default['default'].createElement('img', { className: 'img-fluid', src: searchIconUrl, alt: 'search icon' })
114
+ ),
115
+ React__default['default'].createElement(FormControl__default['default'], { style: { width: '50%', flexGrow: '1' }, placeholder: 'Search', type: 'text', value: searchKey, onChange: function onChange(e) {
109
116
  return setSearchKey(e.target.value);
110
117
  } }),
111
118
  React__default['default'].createElement(
@@ -152,7 +159,12 @@ var SocialSearchComponent = function SocialSearchComponent(_ref) {
152
159
  { inline: true, style: { padding: '6px', width: '100%' }, onSubmit: function onSubmit(e) {
153
160
  return submitSearch(e);
154
161
  } },
155
- React__default['default'].createElement(FormControl__default['default'], { style: { width: '78%' }, placeholder: 'Search', type: 'text', value: searchKey, onChange: function onChange(e) {
162
+ searchIconUrl && React__default['default'].createElement(
163
+ 'div',
164
+ { style: { maxWidth: '90px', marginRight: '.5rem' } },
165
+ React__default['default'].createElement('img', { className: 'img-fluid', src: searchIconUrl, alt: 'search icon' })
166
+ ),
167
+ React__default['default'].createElement(FormControl__default['default'], { style: { width: '20%', flexGrow: '1' }, placeholder: 'Search', type: 'text', value: searchKey, onChange: function onChange(e) {
156
168
  return setSearchKey(e.target.value);
157
169
  } }),
158
170
  React__default['default'].createElement(
@@ -57,7 +57,7 @@ require('./iconBase-be4097c0.js');
57
57
  require('./index.esm-00a6aade.js');
58
58
  require('./NavFooter-3dcd99a8.js');
59
59
  require('./index.esm-2bb721c8.js');
60
- require('./SocialSearchComponent-4942ddfc.js');
60
+ require('./SocialSearchComponent-b7faaedc.js');
61
61
  require('./SocialIcons.js');
62
62
  require('react-bootstrap/Form');
63
63
  require('react-bootstrap/FormControl');
@@ -14,7 +14,7 @@ var getQuery = function getQuery(type) {
14
14
  case 'article':
15
15
  return '*[\n _type == "article"\n && !(_id in path("drafts.**"))\n && defined(title)\n && defined(url)\n && is_visible != false\n && url.current == $url\n ' + conditions + '\n ][0]{\n ' + params + '\n title,\n published,\n summary,\n thumbnail,\n ...,\n passwordLock,\n password,\n issueGroup-> { _id, name, identifier, parent-> },\n "authorDetails": authorMapping[]->{ displayName, url, profileImage, biography, showSocialShare },\n body[] {\n ...,\n asset->,\n images[]{\n ...,\n asset->\n },\n content[]{\n ...,\n asset->\n },\n videos[]{\n ...,\n thumbnail{\n _type,\n asset->\n }\n },\n response[]{\n ...,\n asset->\n },\n quizzes[]{\n ...,\n answer[]{\n ...,\n asset->\n },\n question[]{\n ...,\n asset->\n }\n },\n poster {\n _type,\n asset->\n },\n slides[]{\n ...,\n slideshowImage{\n ...,\n asset->\n }\n },\n upload_doc {\n _type,\n asset->\n },\n uploadAudio {\n _type,\n asset->\n },\n medias[]{\n ...,\n upload_doc {\n _type,\n asset-> \n },\n poster {\n _type,\n asset-> \n }\n },\n articles[]{\n ...,\n thumbnail{\n ...,\n asset-> \n },\n "authorDetails": authorMapping[]->{ displayName, url, profileImage, biography, showSocialShare },\n text[]{\n ...,\n upload_doc {\n _type,\n asset->\n },\n uploadAudio {\n _type,\n asset->\n },\n }\n }\n },\n \'content_placement\': taxonomyMapping[]-> {\n ...,\n \'ancestor\': parent->parent->identifier,\n \'parent\': parent->identifier,\n \'name\': name,\n \'path\': identifier,\n showSocialShare\n },\n documentGroup-> {\n _id,\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\n isSeries,\n showSocialShare,\n \'path\': identifier.current,\n adTargetingURL\n },\n documentGroupMapping[]-> {\n _id,\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\n showSocialShare,\n \'path\': identifier.current\n },\n \'category\':contentCategory->{\n name,\n disableAds\n },\n \'issue\' : *[_type == \'publication\' && !(_id in path("drafts.**")) && is_visible == true && _id == ^.issueGroup._ref][0] {\n name,\n volume,\n \'issueNumber\': number,\n \'articleSource\': source,\n \'path\': identifier.current,\n \'publication\' : *[_type == \'publication\' && !(_id in path("drafts.**")) && is_visible == true && _id == ^.parent._ref][0] {\n name,\n \'path\': identifier.current\n },\n \'url\' : pdf.asset-> url\n }\n\n }';
16
16
  case 'publication':
17
- return '*[_type == \'publication\'\n && identifier.current == $publication\n ' + conditions + '][0] {\n ' + params + '\n ...,\n \'issues\': *[_type == \'publication\'\n && is_visible\n && references(^._id)\n && defined(identifier)] {\n ...,\n taxonomyMapping[]->,\n pdf{asset->},\n } | order(year desc, month desc)\n }';
17
+ return '*[_type == \'publication\'\n && identifier.current == $publication\n ' + conditions + '][0] {\n ' + params + '\n ...,\n \'issues\': *[_type == \'publication\'\n && is_visible\n && references(^._id)\n && defined(identifier)] {\n ...,\n thumbnail{ ..., asset-> },\n taxonomyMapping[]->,\n pdf{asset->},\n } | order(year desc, month desc)\n }';
18
18
  case 'issue':
19
19
  return '*[_type == \'publication\'\n && identifier.current == $publication\n ' + conditions + '][0] {\n ' + params + '\n ...,\n \'issue\': *[_type == \'publication\'\n && references(^._id)\n && identifier.current == $issue][0] {\n ...,\n \'articles\': *[_type == \'article\'\n && !(_id in path("drafts.**"))\n && defined(title)\n && is_visible\n && defined(url)\n && defined(published) \n && dateTime(published) <= dateTime(now())\n && passwordLock != true\n && references(^._id)] | order(published desc) {\n ...,\n authorMapping[0]->,\n contentCategory->,\n issueSection-> {\n name\n }\n }\n }\n }';
20
20
  case 'externalResources':
package/dist/cjs/index.js CHANGED
@@ -170,7 +170,7 @@ require('react-bootstrap/NavDropdown');
170
170
  require('./index.esm-c1e16606.js');
171
171
  require('./NavFooter-3dcd99a8.js');
172
172
  require('./index.esm-2bb721c8.js');
173
- require('./SocialSearchComponent-4942ddfc.js');
173
+ require('./SocialSearchComponent-b7faaedc.js');
174
174
  require('react-bootstrap/FormControl');
175
175
  require('react-ga');
176
176
  require('react-bootstrap/Carousel');
@@ -14264,7 +14264,20 @@ var AlgoliaSearch = function (_React$Component) {
14264
14264
  onSearchParameters: this.props.onSearchParameters
14265
14265
  }, this.props),
14266
14266
  React__default.createElement(Configure, { hitsPerPage: this.props.hitsPerPage || 20 }),
14267
- React__default.createElement(SearchBox, null),
14267
+ React__default.createElement(
14268
+ 'div',
14269
+ { className: 'd-flex align-items-center' },
14270
+ this.props.searchIconUrl && React__default.createElement(
14271
+ 'div',
14272
+ { className: 'custom-search-img mr-2' },
14273
+ React__default.createElement('img', { className: 'img-fluid', src: this.props.searchIconUrl, alt: 'search icon' })
14274
+ ),
14275
+ React__default.createElement(
14276
+ 'div',
14277
+ { style: { flex: '1 1 auto' } },
14278
+ React__default.createElement(SearchBox, null)
14279
+ )
14280
+ ),
14268
14281
  this.props.refinementAttributes && React__default.createElement(
14269
14282
  'div',
14270
14283
  { className: 'search_refinement' },
@@ -14288,7 +14301,7 @@ var AlgoliaSearch = function (_React$Component) {
14288
14301
  React__default.createElement(
14289
14302
  'style',
14290
14303
  { jsx: 'true' },
14291
- '\n .hitResult {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n margin-bottom: 1rem;\n border-bottom: 1px solid #00000024;\n padding: 1rem 0;\n }\n .hitResult > a:first-child {\n width: 30%;\n }\n .hitResult > a:first-child > div{\n width: 100%;\n }\n .hitResult > div:last-child {\n width: 100%;\n }\n .hitResult > div:last-child > a {\n margin-bottom: .5rem;\n width: 100%;\n }\n @media only screen and (max-width: 568px) {\n .hitResult {\n flex-direction: column;\n align-items: center;\n border: none;\n padding: 0;\n }\n .hitResult > a:first-child {\n width: 100%;\n }\n .hitResult > div:last-child {\n width: 100%;\n }\n }\n .AlgoliaResults {\n padding-left: 15px;\n margin-top: 3rem;\n }\n\n .search_refinement {\n display: flex;\n margin: 2rem 0;\n }\n\n .search_refinement > div {\n padding-right: 1rem;\n max-height: 500px;\n }\n\n .ais-Hits-list {\n margin: 0;\n list-style: none;\n padding-inline-start: 0;\n }\n .ais-Pagination-list {\n list-style: none;\n }\n .ais-Pagination-list {\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n }\n .ais-Pagination-item + .ais-Pagination-item {\n margin-left: 0.3rem;\n }\n .ais-Pagination-link {\n padding: 0.3rem 0.6rem;\n display: block;\n border: 1px solid var(--search-primary);\n border-radius: 5px;\n transition: background-color 0.2s ease-out;\n }\n .ais-Pagination-link:focus,\n .ais-Pagination-link:hover {\n background-color: var(--search-secondary);\n color: #fff;\n }\n .ais-Pagination-item--disabled .ais-Pagination-link {\n opacity: 0.6;\n cursor: not-allowed;\n color: var(--search-secondary);\n }\n .ais-Pagination-item--disabled .ais-Pagination-link:focus,\n .ais-Pagination-item--disabled .ais-Pagination-link:hover {\n color: #fff;\n background-color: var(--search-secondary);\n }\n .ais-Pagination-item--selected .ais-Pagination-link {\n color: #fff;\n background-color: var(--search-primary);\n border-color: var(--search-primary);\n }\n .ais-Pagination-item--selected .ais-Pagination-link:focus,\n .ais-Pagination-item--selected .ais-Pagination-link:hover {\n color: #fff;\n }\n .ais-Pagination-list,\n .ais-Results-list {\n margin: 0;\n padding: 0;\n list-style: none;\n }\n .ais-Pagination-list,\n .ais-PoweredBy,\n .ais-RangeInput-form,\n .ais-RatingMenu-link {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n }\n\n .ais-RefinementList-item {\n list-style: none;\n margin: 0;\n padding: 0;\n }\n .ais-RefinementList-list {\n margin: 0;\n padding: 0 1rem;\n width: max-content;\n }\n .ais-SearchBox-form {\n width: 100%;\n border-radius: 5px;\n height: 48px;\n }\n .ais-SearchBox-input {\n padding: 0.5rem;\n border-radius: 5px;\n width: calc(100% - 150px);\n height: 48px;\n border: 0;\n border: 0.5px solid var(--search-secondary);\n }\n\n .ais-SearchBox-submit {\n width: 78px;\n border-radius: 5px;\n padding: 7px;\n margin-left: 5px;\n height: 48px;\n background-color: var(--search-primary);\n border: 0.5px solid var(--search-secondary);\n }\n\n .ais-SearchBox-submit > svg {\n fill: #fff;\n }\n .search_refinement > .dropdown > button {\n background-color: var(--search-primary);\n border-color: var(--search-primary);\n }\n\n .ais-SearchBox-reset {\n height: 48px;\n width: 48px;\n color: #fff;\n background-color: var(--search-primary);\n border: 0;\n margin-left: 5px;\n border-radius: 5px;\n border: 0.5px solid var(--search-secondary);\n }\n\n .ais-SearchBox-reset > svg {\n fill: #fff;\n }\n .ais-RefinementList-checkbox {\n margin-right: 5px;\n }\n\n .ais-RefinementList-showMore {\n padding: 0.5rem;\n border: 0;\n background-color: var(--search-primary);\n border-color: var(--search-primary);\n color: #fff;\n border: 1px solid;\n border-radius: 5px;\n margin-left: 1rem;\n }\n '
14304
+ '\n .hitResult {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n margin-bottom: 1rem;\n border-bottom: 1px solid #00000024;\n padding: 1rem 0;\n }\n .hitResult > a:first-child {\n width: 30%;\n }\n .hitResult > a:first-child > div {\n width: 100%;\n }\n .hitResult > div:last-child {\n width: 100%;\n }\n .hitResult > div:last-child > a {\n margin-bottom: 0.5rem;\n width: 100%;\n }\n .custom-search-img{\n max-width: 130px;\n }\n @media only screen and (max-width: 568px) {\n .custom-search-img {\n max-width: 80px;\n }\n .hitResult {\n flex-direction: column;\n align-items: center;\n border: none;\n padding: 0;\n }\n .hitResult > a:first-child {\n width: 100%;\n }\n .hitResult > div:last-child {\n width: 100%;\n }\n }\n .AlgoliaResults {\n padding-left: 15px;\n margin-top: 3rem;\n }\n\n .search_refinement {\n display: flex;\n margin: 2rem 0;\n }\n\n .search_refinement > div {\n padding-right: 1rem;\n max-height: 500px;\n }\n\n .ais-Hits-list {\n margin: 0;\n list-style: none;\n padding-inline-start: 0;\n }\n .ais-Pagination-list {\n list-style: none;\n }\n .ais-Pagination-list {\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n }\n .ais-Pagination-item + .ais-Pagination-item {\n margin-left: 0.3rem;\n }\n .ais-Pagination-link {\n padding: 0.3rem 0.6rem;\n display: block;\n border: 1px solid var(--search-primary);\n border-radius: 5px;\n transition: background-color 0.2s ease-out;\n }\n .ais-Pagination-link:focus,\n .ais-Pagination-link:hover {\n background-color: var(--search-secondary);\n color: #fff;\n }\n .ais-Pagination-item--disabled .ais-Pagination-link {\n opacity: 0.6;\n cursor: not-allowed;\n color: var(--search-secondary);\n }\n .ais-Pagination-item--disabled .ais-Pagination-link:focus,\n .ais-Pagination-item--disabled .ais-Pagination-link:hover {\n color: #fff;\n background-color: var(--search-secondary);\n }\n .ais-Pagination-item--selected .ais-Pagination-link {\n color: #fff;\n background-color: var(--search-primary);\n border-color: var(--search-primary);\n }\n .ais-Pagination-item--selected .ais-Pagination-link:focus,\n .ais-Pagination-item--selected .ais-Pagination-link:hover {\n color: #fff;\n }\n .ais-Pagination-list,\n .ais-Results-list {\n margin: 0;\n padding: 0;\n list-style: none;\n }\n .ais-Pagination-list,\n .ais-PoweredBy,\n .ais-RangeInput-form,\n .ais-RatingMenu-link {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n }\n\n .ais-RefinementList-item {\n list-style: none;\n margin: 0;\n padding: 0;\n }\n .ais-RefinementList-list {\n margin: 0;\n padding: 0 1rem;\n width: max-content;\n }\n .ais-SearchBox-form {\n width: 100%;\n border-radius: 5px;\n height: 48px;\n text-align: center\'\n }\n .ais-SearchBox-input {\n padding: 0.5rem;\n border-radius: 5px;\n width: calc(100% - ' + (this.props.searchIconUrl ? '110px' : '150px') + ');\n height: 48px;\n border: 0;\n border: 0.5px solid var(--search-secondary);\n }\n\n .ais-SearchBox-submit {\n width: ' + (this.props.searchIconUrl ? '48px' : '78px') + ';\n border-radius: 5px;\n padding: 7px;\n margin-left: 5px;\n height: 48px;\n background-color: var(--search-primary);\n border: 0.5px solid var(--search-secondary);\n }\n\n .ais-SearchBox-submit > svg {\n fill: #fff;\n }\n .search_refinement > .dropdown > button {\n background-color: var(--search-primary);\n border-color: var(--search-primary);\n }\n\n .ais-SearchBox-reset {\n height: 48px;\n width: 48px;\n color: #fff;\n background-color: var(--search-primary);\n border: 0;\n margin-left: 5px;\n border-radius: 5px;\n border: 0.5px solid var(--search-secondary);\n }\n\n .ais-SearchBox-reset > svg {\n fill: #fff;\n }\n .ais-RefinementList-checkbox {\n margin-right: 5px;\n }\n\n .ais-RefinementList-showMore {\n padding: 0.5rem;\n border: 0;\n background-color: var(--search-primary);\n border-color: var(--search-primary);\n color: #fff;\n border: 1px solid;\n border-radius: 5px;\n margin-left: 1rem;\n }\n '
14292
14305
  )
14293
14306
  );
14294
14307
  }
@@ -2,7 +2,7 @@ import { _ as _slicedToArray } from './slicedToArray-6ebcbfea.js';
2
2
  import React__default, { useRef, useState, useEffect } from 'react';
3
3
  import { N as NavFooter } from './NavFooter-e27bd93b.js';
4
4
  import { S as SocialNavFooter } from './index.esm-37268dca.js';
5
- import { S as SocialSearchComponent } from './SocialSearchComponent-8e0fcf66.js';
5
+ import { S as SocialSearchComponent } from './SocialSearchComponent-4b56cd8c.js';
6
6
  import 'react-bootstrap/Form';
7
7
  import 'react-bootstrap/FormControl';
8
8
  import 'react-bootstrap/Button';
@@ -52,6 +52,8 @@ var HamMagazine = function HamMagazine(props) {
52
52
  socialIconVariant = _props$socialIconVari === undefined ? 'light' : _props$socialIconVari,
53
53
  invertedLogo = props.invertedLogo;
54
54
  props.settings;
55
+ var _props$searchIconUrl = props.searchIconUrl,
56
+ searchIconUrl = _props$searchIconUrl === undefined ? null : _props$searchIconUrl;
55
57
 
56
58
  var navRef = useRef(null);
57
59
  var topNavRef = useRef(null);
@@ -369,7 +371,7 @@ var HamMagazine = function HamMagazine(props) {
369
371
  React__default.createElement(
370
372
  'div',
371
373
  { className: 'is-mobile' },
372
- React__default.createElement(SocialSearchComponent, { type: 'mobile', socialIconVariant: socialIconVariant, website: website, navID: 'navbar-ham' })
374
+ React__default.createElement(SocialSearchComponent, { type: 'mobile', socialIconVariant: socialIconVariant, website: website, navID: 'navbar-ham', searchIconUrl: searchIconUrl })
373
375
  )
374
376
  ),
375
377
  React__default.createElement(
@@ -547,7 +549,7 @@ var HamMagazine = function HamMagazine(props) {
547
549
  React__default.createElement(
548
550
  'div',
549
551
  { className: 'is-desktop' },
550
- React__default.createElement(SocialSearchComponent, { type: 'desktop', socialIconVariant: socialIconVariant, website: website, navID: 'navbar-ham' })
552
+ React__default.createElement(SocialSearchComponent, { type: 'desktop', socialIconVariant: socialIconVariant, website: website, navID: 'navbar-ham', searchIconUrl: searchIconUrl })
551
553
  )
552
554
  ),
553
555
  website && React__default.createElement(
@@ -396,7 +396,7 @@ MediaSeriesLanding.getInitialData = function () {
396
396
 
397
397
  case 9:
398
398
  docGroupID = _context2.sent;
399
- seriesQuery = '*[_type == \'documentGroup\' && references(\'' + docGroupID._id + '\') && isSeries != false && isShow != false && defined(published) && dateTime(published) <= dateTime(now()) ] | order(published desc) [$from...$to] {\n _id,\n name,\n identifier,\n published,\n thumbnail,\n description,\n topicMapping[]->,\n isGated,\n \'pageNumber\': ' + currentPage + ',\n \'parentUrl\': \'' + identifier + '\'\n }';
399
+ seriesQuery = '*[_type == \'documentGroup\' && references(\'' + docGroupID._id + '\') && isSeries != false && isShow != false && defined(published) && dateTime(published) <= dateTime(now()) ] | order(published desc) [$from...$to] {\n _id,\n name,\n identifier,\n published,\n thumbnail{ ..., asset-> },\n description,\n topicMapping[]->,\n isGated,\n \'pageNumber\': ' + currentPage + ',\n \'parentUrl\': \'' + identifier + '\'\n }';
400
400
  _context2.next = 13;
401
401
  return client.fetch(seriesQuery, params);
402
402
 
@@ -417,7 +417,7 @@ MediaSeriesLanding.getInitialData = function () {
417
417
  docGroupID = _context2.sent;
418
418
  seriesQueryFilters = '[\n _type == \'documentGroup\' \n && references(\'' + docGroupID._id + '\') \n && isSeries != false \n && isShow != false \n && defined(published) \n && published <= now()\n ]';
419
419
  seriesQuerySorts = 'order(published desc) [$from...$to]';
420
- seriesQueryProjection = '{\n _id,\n name,\n identifier,\n published,\n thumbnail,\n description,\n topicMapping[]->,\n isGated,\n \'parentUrl\': \'' + identifier + '\'\n }';
420
+ seriesQueryProjection = '{\n _id,\n name,\n identifier,\n published,\n thumbnail{ ..., asset-> },\n description,\n topicMapping[]->,\n isGated,\n \'parentUrl\': \'' + identifier + '\'\n }';
421
421
  seriesQuery = ['*'].concat(seriesQueryFilters).concat(seriesQuerySorts).concat(seriesQueryProjection).join('|');
422
422
  totalSeriesCountQuery = 'count(' + ['*'].concat(seriesQueryFilters).join('|') + ')';
423
423
  _context2.next = 17;
@@ -10,7 +10,7 @@ import { N as NavFooter } from './NavFooter-e27bd93b.js';
10
10
  import { S as SocialNavFooter } from './index.esm-37268dca.js';
11
11
  import { c as main_44 } from './main-1894c974.js';
12
12
  import Segment from './Segment.js';
13
- import { S as SocialSearchComponent } from './SocialSearchComponent-8e0fcf66.js';
13
+ import { S as SocialSearchComponent } from './SocialSearchComponent-4b56cd8c.js';
14
14
  import './_commonjsHelpers-0c4b6f40.js';
15
15
  import './web.dom.iterable-ab4dea5c.js';
16
16
  import './core.get-iterator-method-ea258bb1.js';
@@ -232,15 +232,15 @@ PartnerDetails.returnGetInitialProps = function () {
232
232
  switch (_context.prev = _context.next) {
233
233
  case 0:
234
234
  today = moment().utc().format();
235
- featureQuery = '*[_type == \'feature\' && is_active == true && feature_url == \'/' + partnerPageUrl + '/' + (category ? category + '/' : null) + identifier + '\'] | order(_updatedAt asc)[0..5]{\n ...,\n \'feature_img\' : feature_img.asset->url\n }';
236
- partnerQuery = '*[_type == \'documentGroup\' \n && !(_id in path("drafts.**"))\n && references(\'' + partnerDocumentGroupID + '\')\n && identifier.current == \'' + identifier + '\'] | order(name asc) [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 }';
235
+ featureQuery = '*[_type == \'feature\' && is_active == true && feature_url == \'/' + partnerPageUrl + '/' + (category ? category + '/' : null) + identifier + '\'] | order(_updatedAt asc)[0..5]{\n ...,\n \'feature_img\' : feature_img.asset->\n }';
236
+ partnerQuery = '*[_type == \'documentGroup\' \n && !(_id in path("drafts.**"))\n && references(\'' + partnerDocumentGroupID + '\')\n && identifier.current == \'' + identifier + '\'] | order(name asc) [0] {\n description,\n name,\n identifier,\n thumbnail{ ..., asset-> },\n twitter,\n facebook,\n linkedin,\n "affiliates": description[_type==\'slideshows\']{\n ...,\n slides->{...}\n }\n }';
237
237
 
238
238
 
239
239
  if (category) {
240
240
  // if partners page has a sub category such as onclive
241
241
  // e.g. /sap-partner/[category]/[partner]
242
242
 
243
- 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 }';
243
+ 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{ ..., asset-> },\n twitter,\n facebook,\n linkedin,\n "affiliates": description[_type==\'slideshows\']{\n ...,\n slides->{...}\n }\n \n }\n }';
244
244
  }
245
245
 
246
246
  taxonomyQuery = '*[_type == \'documentGroup\' \n && !(_id in path("drafts.**"))\n && references(\'' + partnerDocumentGroupID + '\')\n && isShow != false\n && identifier.current == \'' + identifier + '\'] [0] {\n \'id\': _id,\n \'title\': name\n }';
@@ -257,7 +257,7 @@ PartnerDetails.returnGetInitialProps = function () {
257
257
  features = _ref4[0];
258
258
  partnerDetails = _ref4[1];
259
259
  taxonomyDetails = _ref4[2];
260
- articlesQuery = '*[_type == \'article\' && !(_id in path("drafts.**")) && defined(title) && is_visible == true && defined(url) && dateTime(published) <= dateTime(\'' + today + '\') && passwordLocked != true && references(\'' + taxonomyDetails.id + '\')] | order(published desc)[$from...$to]{\n title,\n summary,\n thumbnail,\n url,\n published,\n contentCategory->,\n \'pageNumber\': ' + currentPage + '\n }';
260
+ articlesQuery = '*[_type == \'article\' && !(_id in path("drafts.**")) && defined(title) && is_visible == true && defined(url) && dateTime(published) <= dateTime(\'' + today + '\') && passwordLocked != true && references(\'' + taxonomyDetails.id + '\')] | order(published desc)[$from...$to]{\n title,\n summary,\n thumbnail{ ..., asset-> },\n url,\n published,\n contentCategory->,\n \'pageNumber\': ' + currentPage + '\n }';
261
261
  _context.next = 16;
262
262
  return client.fetch(articlesQuery, params);
263
263
 
@@ -233,15 +233,15 @@ PartnerDetails.returnGetInitialProps = function () {
233
233
  while (1) {
234
234
  switch (_context.prev = _context.next) {
235
235
  case 0:
236
- featureQuery = '*[_type == \'feature\' && is_active == true && feature_url == \'/' + partnerPageUrl + '/' + (category ? category + '/' : null) + identifier + '\'] | order(_updatedAt asc)[0..5]{\n ...,\n \'feature_img\' : feature_img.asset->url\n }';
237
- partnerQuery = '*[_type == \'documentGroup\' \n && !(_id in path("drafts.**"))\n && references(\'' + partnerDocumentGroupID + '\')\n && identifier.current == \'' + identifier + '\'] | order(name asc) [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 }';
236
+ featureQuery = '*[_type == \'feature\' && is_active == true && feature_url == \'/' + partnerPageUrl + '/' + (category ? category + '/' : null) + identifier + '\'] | order(_updatedAt asc)[0..5]{\n ...,\n \'feature_img\' : feature_img.asset->\n }';
237
+ partnerQuery = '*[_type == \'documentGroup\' \n && !(_id in path("drafts.**"))\n && references(\'' + partnerDocumentGroupID + '\')\n && identifier.current == \'' + identifier + '\'] | order(name asc) [0] {\n description,\n name,\n identifier,\n thumbnail{ ..., asset-> },\n twitter,\n facebook,\n linkedin,\n "affiliates": description[_type==\'slideshows\']{\n ...,\n slides->{...}\n }\n }';
238
238
 
239
239
 
240
240
  if (category) {
241
241
  // if partners page has a sub category such as onclive
242
242
  // e.g. /sap-partner/[category]/[partner]
243
243
 
244
- 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 }';
244
+ 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{ ..., asset-> },\n twitter,\n facebook,\n linkedin,\n "affiliates": description[_type==\'slideshows\']{\n ...,\n slides->{...}\n }\n \n }\n }';
245
245
  }
246
246
 
247
247
  taxonomyQuery = '*[_type == \'documentGroup\' \n && !(_id in path("drafts.**"))\n && references(\'' + partnerDocumentGroupID + '\')\n && isShow != false\n && identifier.current == \'' + identifier + '\'] [0] {\n \'id\': _id,\n \'title\': name\n }';
@@ -260,7 +260,7 @@ PartnerDetails.returnGetInitialProps = function () {
260
260
  taxonomyDetails = _ref4[2];
261
261
  articlesQueryFilters = '[\n _type == \'article\' \n && !(_id in path("drafts.**")) \n && defined(title) \n && is_visible == true \n && defined(url) \n && published <= now()\n && passwordLocked != true \n && references(\'' + taxonomyDetails.id + '\')\n ]';
262
262
  articlesQuerySorts = 'order(published desc)[$from...$to]';
263
- articlesQueryProjection = '{\n title,\n summary,\n thumbnail,\n url,\n published,\n contentCategory->\n }';
263
+ articlesQueryProjection = '{\n title,\n summary,\n thumbnail{ ..., asset-> },\n url,\n published,\n contentCategory->\n }';
264
264
  articlesQuery = ['*'].concat(articlesQueryFilters).concat(articlesQuerySorts).concat(articlesQueryProjection).join('|');
265
265
  totalArticlesCountQuery = 'count(' + ['*'].concat(articlesQueryFilters).join('|') + ')';
266
266
  _context.next = 19;
@@ -12,7 +12,9 @@ var SocialSearchComponent = function SocialSearchComponent(_ref) {
12
12
  var type = _ref.type,
13
13
  socialIconVariant = _ref.socialIconVariant,
14
14
  website = _ref.website,
15
- navID = _ref.navID;
15
+ navID = _ref.navID,
16
+ _ref$searchIconUrl = _ref.searchIconUrl,
17
+ searchIconUrl = _ref$searchIconUrl === undefined ? null : _ref$searchIconUrl;
16
18
 
17
19
  // Search Term
18
20
  var _useState = useState(''),
@@ -96,7 +98,12 @@ var SocialSearchComponent = function SocialSearchComponent(_ref) {
96
98
  { style: { padding: '6px' }, inline: true, onSubmit: function onSubmit(e) {
97
99
  return submitSearch(e);
98
100
  } },
99
- React__default.createElement(FormControl, { style: { width: '78%' }, placeholder: 'Search', type: 'text', value: searchKey, onChange: function onChange(e) {
101
+ searchIconUrl && React__default.createElement(
102
+ 'div',
103
+ { style: { maxWidth: '90px', marginRight: '.5rem' } },
104
+ React__default.createElement('img', { className: 'img-fluid', src: searchIconUrl, alt: 'search icon' })
105
+ ),
106
+ React__default.createElement(FormControl, { style: { width: '50%', flexGrow: '1' }, placeholder: 'Search', type: 'text', value: searchKey, onChange: function onChange(e) {
100
107
  return setSearchKey(e.target.value);
101
108
  } }),
102
109
  React__default.createElement(
@@ -143,7 +150,12 @@ var SocialSearchComponent = function SocialSearchComponent(_ref) {
143
150
  { inline: true, style: { padding: '6px', width: '100%' }, onSubmit: function onSubmit(e) {
144
151
  return submitSearch(e);
145
152
  } },
146
- React__default.createElement(FormControl, { style: { width: '78%' }, placeholder: 'Search', type: 'text', value: searchKey, onChange: function onChange(e) {
153
+ searchIconUrl && React__default.createElement(
154
+ 'div',
155
+ { style: { maxWidth: '90px', marginRight: '.5rem' } },
156
+ React__default.createElement('img', { className: 'img-fluid', src: searchIconUrl, alt: 'search icon' })
157
+ ),
158
+ React__default.createElement(FormControl, { style: { width: '20%', flexGrow: '1' }, placeholder: 'Search', type: 'text', value: searchKey, onChange: function onChange(e) {
147
159
  return setSearchKey(e.target.value);
148
160
  } }),
149
161
  React__default.createElement(
@@ -55,7 +55,7 @@ import './iconBase-ccc56b97.js';
55
55
  import './index.esm-f6156a57.js';
56
56
  import './NavFooter-e27bd93b.js';
57
57
  import './index.esm-37268dca.js';
58
- import './SocialSearchComponent-8e0fcf66.js';
58
+ import './SocialSearchComponent-4b56cd8c.js';
59
59
  import './SocialIcons.js';
60
60
  import 'react-bootstrap/Form';
61
61
  import 'react-bootstrap/FormControl';
@@ -12,7 +12,7 @@ var getQuery = function getQuery(type) {
12
12
  case 'article':
13
13
  return '*[\n _type == "article"\n && !(_id in path("drafts.**"))\n && defined(title)\n && defined(url)\n && is_visible != false\n && url.current == $url\n ' + conditions + '\n ][0]{\n ' + params + '\n title,\n published,\n summary,\n thumbnail,\n ...,\n passwordLock,\n password,\n issueGroup-> { _id, name, identifier, parent-> },\n "authorDetails": authorMapping[]->{ displayName, url, profileImage, biography, showSocialShare },\n body[] {\n ...,\n asset->,\n images[]{\n ...,\n asset->\n },\n content[]{\n ...,\n asset->\n },\n videos[]{\n ...,\n thumbnail{\n _type,\n asset->\n }\n },\n response[]{\n ...,\n asset->\n },\n quizzes[]{\n ...,\n answer[]{\n ...,\n asset->\n },\n question[]{\n ...,\n asset->\n }\n },\n poster {\n _type,\n asset->\n },\n slides[]{\n ...,\n slideshowImage{\n ...,\n asset->\n }\n },\n upload_doc {\n _type,\n asset->\n },\n uploadAudio {\n _type,\n asset->\n },\n medias[]{\n ...,\n upload_doc {\n _type,\n asset-> \n },\n poster {\n _type,\n asset-> \n }\n },\n articles[]{\n ...,\n thumbnail{\n ...,\n asset-> \n },\n "authorDetails": authorMapping[]->{ displayName, url, profileImage, biography, showSocialShare },\n text[]{\n ...,\n upload_doc {\n _type,\n asset->\n },\n uploadAudio {\n _type,\n asset->\n },\n }\n }\n },\n \'content_placement\': taxonomyMapping[]-> {\n ...,\n \'ancestor\': parent->parent->identifier,\n \'parent\': parent->identifier,\n \'name\': name,\n \'path\': identifier,\n showSocialShare\n },\n documentGroup-> {\n _id,\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\n isSeries,\n showSocialShare,\n \'path\': identifier.current,\n adTargetingURL\n },\n documentGroupMapping[]-> {\n _id,\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\n showSocialShare,\n \'path\': identifier.current\n },\n \'category\':contentCategory->{\n name,\n disableAds\n },\n \'issue\' : *[_type == \'publication\' && !(_id in path("drafts.**")) && is_visible == true && _id == ^.issueGroup._ref][0] {\n name,\n volume,\n \'issueNumber\': number,\n \'articleSource\': source,\n \'path\': identifier.current,\n \'publication\' : *[_type == \'publication\' && !(_id in path("drafts.**")) && is_visible == true && _id == ^.parent._ref][0] {\n name,\n \'path\': identifier.current\n },\n \'url\' : pdf.asset-> url\n }\n\n }';
14
14
  case 'publication':
15
- return '*[_type == \'publication\'\n && identifier.current == $publication\n ' + conditions + '][0] {\n ' + params + '\n ...,\n \'issues\': *[_type == \'publication\'\n && is_visible\n && references(^._id)\n && defined(identifier)] {\n ...,\n taxonomyMapping[]->,\n pdf{asset->},\n } | order(year desc, month desc)\n }';
15
+ return '*[_type == \'publication\'\n && identifier.current == $publication\n ' + conditions + '][0] {\n ' + params + '\n ...,\n \'issues\': *[_type == \'publication\'\n && is_visible\n && references(^._id)\n && defined(identifier)] {\n ...,\n thumbnail{ ..., asset-> },\n taxonomyMapping[]->,\n pdf{asset->},\n } | order(year desc, month desc)\n }';
16
16
  case 'issue':
17
17
  return '*[_type == \'publication\'\n && identifier.current == $publication\n ' + conditions + '][0] {\n ' + params + '\n ...,\n \'issue\': *[_type == \'publication\'\n && references(^._id)\n && identifier.current == $issue][0] {\n ...,\n \'articles\': *[_type == \'article\'\n && !(_id in path("drafts.**"))\n && defined(title)\n && is_visible\n && defined(url)\n && defined(published) \n && dateTime(published) <= dateTime(now())\n && passwordLock != true\n && references(^._id)] | order(published desc) {\n ...,\n authorMapping[0]->,\n contentCategory->,\n issueSection-> {\n name\n }\n }\n }\n }';
18
18
  case 'externalResources':
package/dist/esm/index.js CHANGED
@@ -167,7 +167,7 @@ import 'react-bootstrap/NavDropdown';
167
167
  import './index.esm-9b042655.js';
168
168
  import './NavFooter-e27bd93b.js';
169
169
  import './index.esm-37268dca.js';
170
- import './SocialSearchComponent-8e0fcf66.js';
170
+ import './SocialSearchComponent-4b56cd8c.js';
171
171
  import 'react-bootstrap/FormControl';
172
172
  import 'react-ga';
173
173
  import 'react-bootstrap/Carousel';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mjhls/mjh-framework",
3
- "version": "1.0.886",
3
+ "version": "1.0.887-search-test",
4
4
  "description": "Foundation Framework",
5
5
  "author": "mjh-framework",
6
6
  "license": "MIT",