@mjhls/mjh-framework 1.0.441 → 1.0.442

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,5 +1,5 @@
1
1
 
2
- # mjh-framework v. 1.0.441
2
+ # mjh-framework v. 1.0.442
3
3
 
4
4
  > Foundation Framework
5
5
 
@@ -640,6 +640,23 @@ var QueueDeckExpanded = function QueueDeckExpanded(props) {
640
640
  var itemsPerPage = params && params.itemsPerPage ? params.itemsPerPage : 10;
641
641
 
642
642
  var prevValues = usePrevious(values);
643
+
644
+ //check for change in filter parameters from client side and refresh the page
645
+ React.useEffect(function () {
646
+ if (initialData && data !== initialData && initialData.length >= 0) {
647
+ setData(initialData);
648
+ setCurrentPage(initialCurrentPage ? initialCurrentPage : 1);
649
+ setValues({
650
+ from: params ? params.from : 0,
651
+ to: params ? params.to : 0,
652
+ page: 1
653
+ });
654
+ if (initialData.length > 0) {
655
+ setScrolling(true);
656
+ }
657
+ }
658
+ }, [initialData]);
659
+
643
660
  React.useEffect(function () {
644
661
  if (lgInfeedAd && window && window.innerWidth >= 1200) {
645
662
  setDesktopView(true);
package/dist/cjs/index.js CHANGED
@@ -17310,11 +17310,12 @@ var Article = function Article(props) {
17310
17310
  contextualAD: _extends$2._extends({}, payload.contextualAD, {
17311
17311
  slotId: (payload.contextualAD.slotId || 'contextual_ad') + '-' + payload._id,
17312
17312
  className: 'ADFluid',
17313
- sizes: lgContextAd ? [[728, 90], ['fluid'], [300, 100]] : [['fluid'], [300, 100]],
17314
- sizeMapping: [{
17315
- viewport: [7680, 4320],
17316
- sizes: lgContextAd ? [[728, 90], ['fluid'], [300, 100]] : [['fluid'], [300, 100]]
17317
- }, { viewport: [1024, 768], sizes: [['fluid'], [300, 100]] }]
17313
+ // Adding new ad size for large contextual ad for desktop screens >= 1200x768
17314
+ sizes: lgContextAd ? [[728, 90], 'fluid', [300, 100]] : ['fluid', [300, 100]],
17315
+ sizeMapping: lgContextAd ? [{
17316
+ viewport: [1200, 768],
17317
+ sizes: [[728, 90], 'fluid', [300, 100]]
17318
+ }, { viewport: [0, 0], sizes: ['fluid', [300, 100]] }] : ['fluid', [300, 100]]
17318
17319
  })
17319
17320
  });
17320
17321
  var _selectedIndex = indexes[1] + 1;
@@ -17328,8 +17329,15 @@ var Article = function Article(props) {
17328
17329
  } else {
17329
17330
  var _parent = document.getElementById('contextual-native-ad-' + payload._id);
17330
17331
  if (adData && adData.event && adData.event.size && _parent) {
17331
- _parent.style.width = adData.event.size[0] + 'px';
17332
- _parent.style.height = adData.event.size[1] + 'px';
17332
+ // Adding fix for fluid contextual ad to avoid from collapsing when size is [0,0]
17333
+ var fluidSizes = [[0, 0]];
17334
+ var checkAdSize = function checkAdSize(size) {
17335
+ return AdSlot._JSON$stringify(size) === AdSlot._JSON$stringify(adData.event.size);
17336
+ };
17337
+ if (!fluidSizes.some(checkAdSize)) {
17338
+ _parent.style.width = adData.event.size[0] + 'px';
17339
+ _parent.style.height = adData.event.size[1] + 'px';
17340
+ }
17333
17341
  _parent.style.margin = 'auto';
17334
17342
  }
17335
17343
  if (body[0]._type === 'figure' || body[1]._type === 'figure' || body[2]._type === 'figure' || body[3]._type === 'figure') {
@@ -17593,7 +17601,7 @@ var Article = function Article(props) {
17593
17601
  React__default['default'].createElement(
17594
17602
  'style',
17595
17603
  { jsx: 'true' },
17596
- '\n .sanityDisplayLabel {\n margin: .5rem 0;\n border: 1px solid black;\n width: fit-content;\n padding: 5px;\n }\n '
17604
+ '\n .sanityDisplayLabel {\n margin: 0.5rem 0;\n border: 1px solid black;\n width: fit-content;\n padding: 5px;\n }\n '
17597
17605
  )
17598
17606
  );
17599
17607
  };
@@ -634,6 +634,23 @@ var QueueDeckExpanded = function QueueDeckExpanded(props) {
634
634
  var itemsPerPage = params && params.itemsPerPage ? params.itemsPerPage : 10;
635
635
 
636
636
  var prevValues = usePrevious(values);
637
+
638
+ //check for change in filter parameters from client side and refresh the page
639
+ useEffect(function () {
640
+ if (initialData && data !== initialData && initialData.length >= 0) {
641
+ setData(initialData);
642
+ setCurrentPage(initialCurrentPage ? initialCurrentPage : 1);
643
+ setValues({
644
+ from: params ? params.from : 0,
645
+ to: params ? params.to : 0,
646
+ page: 1
647
+ });
648
+ if (initialData.length > 0) {
649
+ setScrolling(true);
650
+ }
651
+ }
652
+ }, [initialData]);
653
+
637
654
  useEffect(function () {
638
655
  if (lgInfeedAd && window && window.innerWidth >= 1200) {
639
656
  setDesktopView(true);
package/dist/esm/index.js CHANGED
@@ -17286,11 +17286,12 @@ var Article = function Article(props) {
17286
17286
  contextualAD: _extends$2({}, payload.contextualAD, {
17287
17287
  slotId: (payload.contextualAD.slotId || 'contextual_ad') + '-' + payload._id,
17288
17288
  className: 'ADFluid',
17289
- sizes: lgContextAd ? [[728, 90], ['fluid'], [300, 100]] : [['fluid'], [300, 100]],
17290
- sizeMapping: [{
17291
- viewport: [7680, 4320],
17292
- sizes: lgContextAd ? [[728, 90], ['fluid'], [300, 100]] : [['fluid'], [300, 100]]
17293
- }, { viewport: [1024, 768], sizes: [['fluid'], [300, 100]] }]
17289
+ // Adding new ad size for large contextual ad for desktop screens >= 1200x768
17290
+ sizes: lgContextAd ? [[728, 90], 'fluid', [300, 100]] : ['fluid', [300, 100]],
17291
+ sizeMapping: lgContextAd ? [{
17292
+ viewport: [1200, 768],
17293
+ sizes: [[728, 90], 'fluid', [300, 100]]
17294
+ }, { viewport: [0, 0], sizes: ['fluid', [300, 100]] }] : ['fluid', [300, 100]]
17294
17295
  })
17295
17296
  });
17296
17297
  var _selectedIndex = indexes[1] + 1;
@@ -17304,8 +17305,15 @@ var Article = function Article(props) {
17304
17305
  } else {
17305
17306
  var _parent = document.getElementById('contextual-native-ad-' + payload._id);
17306
17307
  if (adData && adData.event && adData.event.size && _parent) {
17307
- _parent.style.width = adData.event.size[0] + 'px';
17308
- _parent.style.height = adData.event.size[1] + 'px';
17308
+ // Adding fix for fluid contextual ad to avoid from collapsing when size is [0,0]
17309
+ var fluidSizes = [[0, 0]];
17310
+ var checkAdSize = function checkAdSize(size) {
17311
+ return _JSON$stringify(size) === _JSON$stringify(adData.event.size);
17312
+ };
17313
+ if (!fluidSizes.some(checkAdSize)) {
17314
+ _parent.style.width = adData.event.size[0] + 'px';
17315
+ _parent.style.height = adData.event.size[1] + 'px';
17316
+ }
17309
17317
  _parent.style.margin = 'auto';
17310
17318
  }
17311
17319
  if (body[0]._type === 'figure' || body[1]._type === 'figure' || body[2]._type === 'figure' || body[3]._type === 'figure') {
@@ -17569,7 +17577,7 @@ var Article = function Article(props) {
17569
17577
  React.createElement(
17570
17578
  'style',
17571
17579
  { jsx: 'true' },
17572
- '\n .sanityDisplayLabel {\n margin: .5rem 0;\n border: 1px solid black;\n width: fit-content;\n padding: 5px;\n }\n '
17580
+ '\n .sanityDisplayLabel {\n margin: 0.5rem 0;\n border: 1px solid black;\n width: fit-content;\n padding: 5px;\n }\n '
17573
17581
  )
17574
17582
  );
17575
17583
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mjhls/mjh-framework",
3
- "version": "1.0.441",
3
+ "version": "1.0.442",
4
4
  "description": "Foundation Framework",
5
5
  "author": "mjh-framework",
6
6
  "license": "MIT",