@pelcro/react-pelcro-js 3.20.2 → 3.20.3

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/dist/index.cjs.js CHANGED
@@ -13944,6 +13944,13 @@ function SelectModalWithHook(props) {
13944
13944
  matchingEntitlements: view === "_plan-select-entitlements" ? entitlements : null
13945
13945
  });
13946
13946
  }
13947
+ function productsWithMatchedTaggedFirst() {
13948
+ var _window$Pelcro$produc;
13949
+ const allProducts = (_window$Pelcro$produc = window.Pelcro.product.list()) !== null && _window$Pelcro$produc !== void 0 ? _window$Pelcro$produc : [];
13950
+ const productsThatMatchArticleTag = window.Pelcro.product.getByMatchingPageTags();
13951
+ const allProductsMinusMatched = allProducts.filter(product => !productsThatMatchArticleTag.some(matchedProduct => matchedProduct.id === product.id));
13952
+ return [productsThatMatchArticleTag, allProductsMinusMatched];
13953
+ }
13947
13954
  SelectModalWithHook.viewId = "plan-select";
13948
13955
  class SelectModal extends React.Component {
13949
13956
  constructor(props) {
@@ -14000,12 +14007,19 @@ class SelectModal extends React.Component {
14000
14007
  }).length === 0 : false;
14001
14008
  notifyBugsnag(() => {
14002
14009
  Bugsnag.notify("SelectModal - No data viewed", event => {
14003
- var _window$Pelcro5, _window$Pelcro5$site, _window$Pelcro6, _window$Pelcro6$user, _window$Pelcro7, _window$Pelcro7$uiSet, _window$Pelcro8, _window$Pelcro9, _window$Pelcro9$helpe, _window$Pelcro10, _window$Pelcro10$site, _window$Pelcro11, _window$Pelcro11$site;
14010
+ var _window$Pelcro5, _window$Pelcro5$site, _window$Pelcro6, _window$Pelcro6$user, _window$Pelcro7, _window$Pelcro7$uiSet, _window$Pelcro8, _this$props, _window$Pelcro9, _window$Pelcro9$helpe, _window$Pelcro10, _window$Pelcro10$site, _window$Pelcro11, _window$Pelcro11$site;
14004
14011
  event.addMetadata("MetaData", {
14005
14012
  site: (_window$Pelcro5 = window.Pelcro) === null || _window$Pelcro5 === void 0 ? void 0 : (_window$Pelcro5$site = _window$Pelcro5.site) === null || _window$Pelcro5$site === void 0 ? void 0 : _window$Pelcro5$site.read(),
14006
14013
  user: (_window$Pelcro6 = window.Pelcro) === null || _window$Pelcro6 === void 0 ? void 0 : (_window$Pelcro6$user = _window$Pelcro6.user) === null || _window$Pelcro6$user === void 0 ? void 0 : _window$Pelcro6$user.read(),
14007
14014
  uiVersion: (_window$Pelcro7 = window.Pelcro) === null || _window$Pelcro7 === void 0 ? void 0 : (_window$Pelcro7$uiSet = _window$Pelcro7.uiSettings) === null || _window$Pelcro7$uiSet === void 0 ? void 0 : _window$Pelcro7$uiSet.uiVersion,
14008
14015
  environment: (_window$Pelcro8 = window.Pelcro) === null || _window$Pelcro8 === void 0 ? void 0 : _window$Pelcro8.environment,
14016
+ matchingEntitlementsProps: (_this$props = this.props) === null || _this$props === void 0 ? void 0 : _this$props.matchingEntitlements,
14017
+ productListState: this.state.productList,
14018
+ methods: {
14019
+ productsWithMatchedTaggedFirst: productsWithMatchedTaggedFirst(),
14020
+ pelcroSDKProductsListMethod: window.Pelcro.product.list(),
14021
+ pelcroSDKGetByEntitlements: this.props.matchingEntitlements ? window.Pelcro.product.getByEntitlements(this.props.matchingEntitlements) : null
14022
+ },
14009
14023
  userCurrency: userCurrency,
14010
14024
  userCountry: userCountry,
14011
14025
  userLanguage: userLanguage,
@@ -14113,13 +14127,6 @@ class SelectModal extends React.Component {
14113
14127
  }), /*#__PURE__*/React__default['default'].createElement("h3", {
14114
14128
  className: "plc-text-sm plc-font-semibold"
14115
14129
  }, this.locale("labels.restrictiveArticles.or")), allProductsMinusMatched.map((product, index) => this.renderOneProduct(product, index))));
14116
- function productsWithMatchedTaggedFirst() {
14117
- var _window$Pelcro$produc;
14118
- const allProducts = (_window$Pelcro$produc = window.Pelcro.product.list()) !== null && _window$Pelcro$produc !== void 0 ? _window$Pelcro$produc : [];
14119
- const productsThatMatchArticleTag = window.Pelcro.product.getByMatchingPageTags();
14120
- const allProductsMinusMatched = allProducts.filter(product => !productsThatMatchArticleTag.some(matchedProduct => matchedProduct.id === product.id));
14121
- return [productsThatMatchArticleTag, allProductsMinusMatched];
14122
- }
14123
14130
  });
14124
14131
  _defineProperty$3(this, "renderPlans", () => {
14125
14132
  return this.state.planList.map(plan => {
package/dist/index.esm.js CHANGED
@@ -13914,6 +13914,13 @@ function SelectModalWithHook(props) {
13914
13914
  matchingEntitlements: view === "_plan-select-entitlements" ? entitlements : null
13915
13915
  });
13916
13916
  }
13917
+ function productsWithMatchedTaggedFirst() {
13918
+ var _window$Pelcro$produc;
13919
+ const allProducts = (_window$Pelcro$produc = window.Pelcro.product.list()) !== null && _window$Pelcro$produc !== void 0 ? _window$Pelcro$produc : [];
13920
+ const productsThatMatchArticleTag = window.Pelcro.product.getByMatchingPageTags();
13921
+ const allProductsMinusMatched = allProducts.filter(product => !productsThatMatchArticleTag.some(matchedProduct => matchedProduct.id === product.id));
13922
+ return [productsThatMatchArticleTag, allProductsMinusMatched];
13923
+ }
13917
13924
  SelectModalWithHook.viewId = "plan-select";
13918
13925
  class SelectModal extends Component {
13919
13926
  constructor(props) {
@@ -13970,12 +13977,19 @@ class SelectModal extends Component {
13970
13977
  }).length === 0 : false;
13971
13978
  notifyBugsnag(() => {
13972
13979
  Bugsnag.notify("SelectModal - No data viewed", event => {
13973
- var _window$Pelcro5, _window$Pelcro5$site, _window$Pelcro6, _window$Pelcro6$user, _window$Pelcro7, _window$Pelcro7$uiSet, _window$Pelcro8, _window$Pelcro9, _window$Pelcro9$helpe, _window$Pelcro10, _window$Pelcro10$site, _window$Pelcro11, _window$Pelcro11$site;
13980
+ var _window$Pelcro5, _window$Pelcro5$site, _window$Pelcro6, _window$Pelcro6$user, _window$Pelcro7, _window$Pelcro7$uiSet, _window$Pelcro8, _this$props, _window$Pelcro9, _window$Pelcro9$helpe, _window$Pelcro10, _window$Pelcro10$site, _window$Pelcro11, _window$Pelcro11$site;
13974
13981
  event.addMetadata("MetaData", {
13975
13982
  site: (_window$Pelcro5 = window.Pelcro) === null || _window$Pelcro5 === void 0 ? void 0 : (_window$Pelcro5$site = _window$Pelcro5.site) === null || _window$Pelcro5$site === void 0 ? void 0 : _window$Pelcro5$site.read(),
13976
13983
  user: (_window$Pelcro6 = window.Pelcro) === null || _window$Pelcro6 === void 0 ? void 0 : (_window$Pelcro6$user = _window$Pelcro6.user) === null || _window$Pelcro6$user === void 0 ? void 0 : _window$Pelcro6$user.read(),
13977
13984
  uiVersion: (_window$Pelcro7 = window.Pelcro) === null || _window$Pelcro7 === void 0 ? void 0 : (_window$Pelcro7$uiSet = _window$Pelcro7.uiSettings) === null || _window$Pelcro7$uiSet === void 0 ? void 0 : _window$Pelcro7$uiSet.uiVersion,
13978
13985
  environment: (_window$Pelcro8 = window.Pelcro) === null || _window$Pelcro8 === void 0 ? void 0 : _window$Pelcro8.environment,
13986
+ matchingEntitlementsProps: (_this$props = this.props) === null || _this$props === void 0 ? void 0 : _this$props.matchingEntitlements,
13987
+ productListState: this.state.productList,
13988
+ methods: {
13989
+ productsWithMatchedTaggedFirst: productsWithMatchedTaggedFirst(),
13990
+ pelcroSDKProductsListMethod: window.Pelcro.product.list(),
13991
+ pelcroSDKGetByEntitlements: this.props.matchingEntitlements ? window.Pelcro.product.getByEntitlements(this.props.matchingEntitlements) : null
13992
+ },
13979
13993
  userCurrency: userCurrency,
13980
13994
  userCountry: userCountry,
13981
13995
  userLanguage: userLanguage,
@@ -14083,13 +14097,6 @@ class SelectModal extends Component {
14083
14097
  }), /*#__PURE__*/React__default.createElement("h3", {
14084
14098
  className: "plc-text-sm plc-font-semibold"
14085
14099
  }, this.locale("labels.restrictiveArticles.or")), allProductsMinusMatched.map((product, index) => this.renderOneProduct(product, index))));
14086
- function productsWithMatchedTaggedFirst() {
14087
- var _window$Pelcro$produc;
14088
- const allProducts = (_window$Pelcro$produc = window.Pelcro.product.list()) !== null && _window$Pelcro$produc !== void 0 ? _window$Pelcro$produc : [];
14089
- const productsThatMatchArticleTag = window.Pelcro.product.getByMatchingPageTags();
14090
- const allProductsMinusMatched = allProducts.filter(product => !productsThatMatchArticleTag.some(matchedProduct => matchedProduct.id === product.id));
14091
- return [productsThatMatchArticleTag, allProductsMinusMatched];
14092
- }
14093
14100
  });
14094
14101
  _defineProperty$3(this, "renderPlans", () => {
14095
14102
  return this.state.planList.map(plan => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pelcro/react-pelcro-js",
3
3
  "description": "Pelcro's React UI Elements",
4
- "version": "3.20.2",
4
+ "version": "3.20.3",
5
5
  "license": "MIT",
6
6
  "private": false,
7
7
  "main": "dist/index.cjs.js",