@penskemediacorp/larva-patterns 1.67.0 → 1.69.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/algorithms/a-carousel-grid/a-carousel-grid.overlay.js +1 -0
  2. package/algorithms/a-term-content-grid/a-term-content-grid.prototype.js +13 -9
  3. package/components/c-button/c-button.twig +10 -2
  4. package/modules/age-gate/age-gate.prototype.js +4 -4
  5. package/modules/author/author.prototype.js +1 -1
  6. package/modules/author-blurb/author-blurb.prototype.js +6 -1
  7. package/modules/author-details/author-details.prototype.js +1 -1
  8. package/modules/authors-bio/authors-bio.prototype.js +23 -15
  9. package/modules/authors-bio-item/authors-bio-item.prototype.js +44 -23
  10. package/modules/brands-most-popular/brands-most-popular.prototype.js +0 -2
  11. package/modules/carousel-slider/carousel-slider.prototype.js +0 -6
  12. package/modules/fact-list/fact-list.prototype.js +12 -5
  13. package/modules/fact-list-item/fact-list-item.prototype.js +19 -8
  14. package/modules/fact-list-item/fact-list-item.thumbnail.js +3 -1
  15. package/modules/faq/faq.prototype.js +3 -7
  16. package/modules/header-sticky/header-sticky.article.js +5 -1
  17. package/modules/how-we-test-products/how-we-test-products.prototype.js +35 -22
  18. package/modules/mega-menu-footer/mega-menu-footer.prototype.js +2 -1
  19. package/modules/multiple-products/multiple-products.prototype.js +5 -2
  20. package/modules/newsletter/newsletter.prototype.js +2 -1
  21. package/modules/page-404/page-404.smart.js +6 -3
  22. package/modules/pmc-footer/pmc-footer.prototype.js +5 -5
  23. package/modules/product-card/product-card.prototype.js +35 -18
  24. package/modules/product-grid/product-grid.prototype.js +6 -10
  25. package/modules/profile-blurb/profile-blurb.prototype.js +1 -0
  26. package/modules/profile-browse-by/profile-browse-by.prototype.js +1 -0
  27. package/modules/profile-related-stories/profile-related-stories.prototype.js +1 -0
  28. package/modules/pros-and-cons/pros-and-cons.prototype.js +9 -6
  29. package/modules/social-share/social-share.prototype.js +7 -1
  30. package/modules/special-coverage/special-coverage.prototype.js +2 -2
  31. package/modules/table-of-contents/table-of-contents.prototype.js +25 -15
  32. package/modules/tag-list/tag-list.prototype.js +10 -7
  33. package/modules/tag-list/tag-list.thumbnail.js +41 -31
  34. package/modules/term-content-top/term-content-top.heading-tags.js +6 -4
  35. package/modules/term-content-top/term-content-top.prototype.js +31 -15
  36. package/modules/top-stories/top-stories.xl.js +1 -0
  37. package/modules/vlanding-video-showcase/vlanding-video-showcase.prototype.js +1 -0
  38. package/objects/o-faq-item/o-faq-item.prototype.js +2 -4
  39. package/objects/o-multiple-product-item/o-multiple-product-item.prototype.js +15 -5
  40. package/objects/o-product-card/o-product-card.primary.js +6 -3
  41. package/objects/o-product-card/o-product-card.prototype.js +9 -4
  42. package/objects/o-video-card/o-video-card.prototype.js +0 -6
  43. package/package.json +4 -4
  44. package/utils/getDataSet.js +4 -5
  45. package/utils/getSocialPlatforms.js +8 -4
@@ -1,11 +1,11 @@
1
1
  /**
2
2
  * Helper function to get larva-patterns/_data array by property
3
3
  *
4
- * @param {String} filename JSON filenames in ../_data.
5
- * @param {String} orderKey Object property name to sort/order by.
4
+ * @param {string} filename JSON filenames in ../_data.
5
+ * @param {string} orderKey Object property name to sort/order by.
6
6
  * @param {Array} orderValues Desired items from data file(s) (by orderKey property).
7
7
  */
8
- module.exports = function( filename, orderKey, orderValues ) {
8
+ module.exports = function ( filename, orderKey, orderValues ) {
9
9
  const data = require( `../_data/${ filename }.json` );
10
10
 
11
11
  if ( orderKey && orderValues ) {
@@ -18,7 +18,6 @@ module.exports = function( filename, orderKey, orderValues ) {
18
18
  } );
19
19
 
20
20
  return sortedData;
21
- } else {
22
- return data;
23
21
  }
22
+ return data;
24
23
  };
@@ -3,8 +3,12 @@
3
3
  *
4
4
  * @param {Array} platforms "name" property values of desired platforms (see ../_data/social-platforms.json).
5
5
  */
6
- module.exports = function( platforms ) {
7
- return require( './getDataSet' )( 'social-platforms', 'name',
8
- undefined === platforms ? [ 'instagram', 'pinit', 'twitter', 'facebook', 'youtube' ] : platforms
6
+ module.exports = function ( platforms ) {
7
+ return require( './getDataSet' )(
8
+ 'social-platforms',
9
+ 'name',
10
+ undefined === platforms
11
+ ? [ 'instagram', 'pinit', 'twitter', 'facebook', 'youtube' ]
12
+ : platforms
9
13
  );
10
- }
14
+ };