@salesgenterp/ui-components 0.4.541 → 0.4.543

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.js CHANGED
@@ -16297,7 +16297,7 @@ var DEFAULT_GRID_SPAN = {
16297
16297
  sm: 6,
16298
16298
  xs: 6
16299
16299
  };
16300
- var WISHLIST_ITEM_OMIT_KEYS = ['id', 'createdBy', 'insertedTimestamp', 'updatedBy', 'updatedTimestamp'];
16300
+ var WISHLIST_ITEM_OMIT_KEYS = ['createdBy', 'insertedTimestamp', 'updatedBy', 'updatedTimestamp'];
16301
16301
  var getStyleOverride = function getStyleOverride(styleOverrides) {
16302
16302
  for (var _len = arguments.length, keys = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
16303
16303
  keys[_key - 1] = arguments[_key];
@@ -16323,6 +16323,7 @@ var WishlistComponent = function WishlistComponent(_ref) {
16323
16323
  primaryColor = _ref.primaryColor,
16324
16324
  apiEndPoint = _ref.apiEndPoint,
16325
16325
  onAddToCart = _ref.onAddToCart,
16326
+ onProductCardClick = _ref.onProductCardClick,
16326
16327
  _ref$doNotShowPrice = _ref.doNotShowPrice,
16327
16328
  doNotShowPrice = _ref$doNotShowPrice === void 0 ? false : _ref$doNotShowPrice;
16328
16329
  var _useAllSystemFeatureV = useAllSystemFeatureValues({
@@ -16417,7 +16418,8 @@ var WishlistComponent = function WishlistComponent(_ref) {
16417
16418
  imgNotFoundUrl: imgNotFoundUrl,
16418
16419
  onAddToCart: onAddToCart,
16419
16420
  allowToProcessInvoiceForOutOfStockProductsEcommerce: allowToProcessInvoiceForOutOfStockProductsEcommerce,
16420
- doNotShowPrice: doNotShowPrice
16421
+ doNotShowPrice: doNotShowPrice,
16422
+ onProductCardClick: onProductCardClick
16421
16423
  }));
16422
16424
  })));
16423
16425
  };
@@ -16444,7 +16446,8 @@ var ProductCard = function ProductCard(_ref3) {
16444
16446
  imgNotFoundUrl = _ref3.imgNotFoundUrl,
16445
16447
  allowToProcessInvoiceForOutOfStockProductsEcommerce = _ref3.allowToProcessInvoiceForOutOfStockProductsEcommerce,
16446
16448
  onAddToCart = _ref3.onAddToCart,
16447
- doNotShowPrice = _ref3.doNotShowPrice;
16449
+ doNotShowPrice = _ref3.doNotShowPrice,
16450
+ onProductCardClick = _ref3.onProductCardClick;
16448
16451
  var router$1 = router.useRouter();
16449
16452
  var _useState2 = React.useState(false),
16450
16453
  deleteLoading = _useState2[0],
@@ -16491,8 +16494,9 @@ var ProductCard = function ProductCard(_ref3) {
16491
16494
  return /*#__PURE__*/React__default.createElement(ProductCardWrapper, {
16492
16495
  style: getStyleOverride(styleOverrides, 'productCardWrapper', 'ProductCardWrapper'),
16493
16496
  onClick: function onClick() {
16494
- var _ref4, _product$urlAlias;
16495
- router$1.push("/product-details/" + paramCase.paramCase((_ref4 = (_product$urlAlias = product.urlAlias) != null ? _product$urlAlias : product.alias) != null ? _ref4 : product.productName) + "?id=" + (product === null || product === void 0 ? void 0 : product.productId));
16497
+ if (typeof onProductCardClick === 'function') {
16498
+ onProductCardClick(product);
16499
+ }
16496
16500
  }
16497
16501
  }, /*#__PURE__*/React__default.createElement(DeleteButton, {
16498
16502
  type: "button",
@@ -16536,8 +16540,10 @@ var ProductCard = function ProductCard(_ref3) {
16536
16540
  onClick: function onClick(e) {
16537
16541
  e.stopPropagation();
16538
16542
  e.preventDefault();
16539
- if (product !== null && product !== void 0 && product.hasChildProducts) {
16540
- router$1.push("/products/" + (product === null || product === void 0 ? void 0 : product.productId));
16543
+ if (product !== null && product !== void 0 && product.hasChildProduct) {
16544
+ if (typeof onProductCardClick === 'function') {
16545
+ onProductCardClick(product);
16546
+ }
16541
16547
  } else {
16542
16548
  if (onAddToCart) {
16543
16549
  var _product$quantity;
@@ -16551,7 +16557,7 @@ var ProductCard = function ProductCard(_ref3) {
16551
16557
  }
16552
16558
  }
16553
16559
  }
16554
- }, product !== null && product !== void 0 && product.hasChildProduct ? 'Select Options' : addToCartLoading ? 'Adding...' : 'Add to Cart') : /*#__PURE__*/React__default.createElement(OutOfStockButton, {
16560
+ }, product !== null && product !== void 0 && product.hasChildProduct ? 'Select Options' : addToCartLoading ? 'Moving...' : 'Move to Cart') : /*#__PURE__*/React__default.createElement(OutOfStockButton, {
16555
16561
  variant: "contained",
16556
16562
  color: "primary",
16557
16563
  disabled: true,