@salesgenterp/ui-components 0.1.4 → 0.1.6

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
@@ -2886,7 +2886,7 @@ function _templateObject6$1() {
2886
2886
  }
2887
2887
 
2888
2888
  function _templateObject5$2() {
2889
- var data = _taggedTemplateLiteralLoose(["\n width: 90%;\n height: 3.55rem;\n border: 2px solid;\n border-radius: 1rem;\n display: grid;\n place-items: center;\n font-weight: 500;\n font-size: 1rem;\n transition: 0.5s;\n outline: none;\n text-transform: capitalize;\n border-color: ", ";\n color: ", ";\n text-transform: capitalize;\n margin: 0.6rem 0;\n cursor: pointer;\n background: white;\n &:hover,\n &:focus {\n opacity: 0.8;\n letter-spacing: 1px;\n outline: none;\n }\n @media only screen and (max-width: 640px) {\n height: 3rem;\n }\n"]);
2889
+ var data = _taggedTemplateLiteralLoose(["\n width: 90%;\n height: 3.55rem;\n border: 2px solid;\n border-radius: 1rem;\n display: grid;\n place-items: center;\n font-weight: 500;\n font-size: 1rem;\n transition: 0.5s;\n outline: none;\n text-transform: capitalize;\n border-color: ", ";\n color: ", ";\n text-transform: capitalize;\n margin: 0.6rem 0;\n cursor: pointer;\n background: white;\n &:hover,\n &:focus {\n opacity: 0.8;\n letter-spacing: 1px;\n outline: none;\n }\n @media only screen and (max-width: 640px) {\n height: 2.9rem;\n }\n @media only screen and (max-width: 340px) {\n height: 2.2rem;\n margin: 0.3rem 0;\n }\n"]);
2890
2890
 
2891
2891
  _templateObject5$2 = function _templateObject5() {
2892
2892
  return data;
@@ -2896,7 +2896,7 @@ function _templateObject5$2() {
2896
2896
  }
2897
2897
 
2898
2898
  function _templateObject4$3() {
2899
- var data = _taggedTemplateLiteralLoose(["\n width: 100%;\n /* height: 8rem; */\n background-color: white;\n box-shadow: 3px -2px 10px #b1b1b1;\n display: flex;\n flex-direction: column;\n min-height: 7rem;\n position: sticky;\n bottom: 0;\n /* left: 0; */\n align-items: center;\n .row {\n width: 90%;\n margin: 0rem auto;\n margin-top: 0.3rem;\n h5 {\n font-weight: bold;\n font-size: 1.1rem;\n span {\n font-weight: 400;\n margin-left: 0.5rem;\n }\n }\n }\n"]);
2899
+ var data = _taggedTemplateLiteralLoose(["\n width: 100%;\n /* height: 8rem; */\n background-color: white;\n box-shadow: 3px -2px 10px #b1b1b1;\n display: flex;\n flex-direction: column;\n min-height: 7rem;\n position: sticky;\n bottom: 0;\n /* padding-bottom: 0.5rem; */\n\n /* left: 0; */\n align-items: center;\n .row {\n width: 90%;\n margin: 0rem auto;\n margin-top: 0.3rem;\n h5 {\n font-weight: bold;\n font-size: 1.1rem;\n span {\n font-weight: 400;\n margin-left: 0.5rem;\n }\n }\n }\n @media only screen and (max-width: 340px) {\n min-height: 6rem;\n .row h5 {\n font-size: 0.8rem;\n }\n }\n"]);
2900
2900
 
2901
2901
  _templateObject4$3 = function _templateObject4() {
2902
2902
  return data;
@@ -2906,7 +2906,7 @@ function _templateObject4$3() {
2906
2906
  }
2907
2907
 
2908
2908
  function _templateObject3$3() {
2909
- var data = _taggedTemplateLiteralLoose(["\n width: 100%;\n height: max-content;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: flex-start;\n /* height: 900px; */\n padding: 1rem;\n min-height: 73vh;\n /* background-color: red; */\n"]);
2909
+ var data = _taggedTemplateLiteralLoose(["\n width: 100%;\n height: max-content;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: flex-start;\n /* height: 900px; */\n padding: 1rem;\n min-height: 74vh;\n\n @media only screen and (max-width: 748px) {\n min-height: 75vh;\n }\n /* background-color: red; */\n"]);
2910
2910
 
2911
2911
  _templateObject3$3 = function _templateObject3() {
2912
2912
  return data;
@@ -2926,7 +2926,7 @@ function _templateObject2$3() {
2926
2926
  }
2927
2927
 
2928
2928
  function _templateObject$7() {
2929
- var data = _taggedTemplateLiteralLoose(["\n width: 100%;\n max-width: ", ";\n height: 100%;\n font-family: ", ";\n /* padding: 1em;\n padding-top: 0rem; */\n position: relative;\n /* min-width: 100%; */\n min-height: 100vh;\n max-height: 100vh;\n overflow-y: auto;\n /* background-color: grey; */\n border: 1px solid;\n"]);
2929
+ var data = _taggedTemplateLiteralLoose(["\n width: 100%;\n max-width: ", ";\n height: 100%;\n font-family: ", ";\n /* padding: 1em;\n padding-top: 0rem; */\n position: relative;\n /* min-width: 100%; */\n min-height: 100vh;\n max-height: 100vh;\n overflow-y: auto;\n /* background-color: grey; */\n /* border: 1px solid; */\n"]);
2930
2930
 
2931
2931
  _templateObject$7 = function _templateObject() {
2932
2932
  return data;
@@ -2977,7 +2977,7 @@ function _templateObject2$4() {
2977
2977
  }
2978
2978
 
2979
2979
  function _templateObject$8() {
2980
- var data = _taggedTemplateLiteralLoose(["\n width: 100%;\n display: flex;\n flex-direction: row;\n height: 100px;\n justify-content: space-around;\n align-items: center;\n overflow: hidden;\n margin-bottom: 2rem;\n img {\n width: 20%;\n /* aspect-ratio: 1; */\n object-fit: cover;\n }\n .middleSection {\n width: 60%;\n padding-left: 0.8rem;\n height: 100%;\n h6 {\n font-size: 1.1rem;\n font-weight: bold;\n margin: 0;\n\n span {\n font-size: 0.8rem;\n color: grey;\n text-decoration: line-through;\n margin-right: 0.5rem;\n }\n }\n .name {\n font-size: 0.9rem;\n max-height: 50px;\n width: 100%;\n word-wrap: break-word;\n overflow: hidden;\n text-overflow: ellipsis;\n transition: 0.3s;\n cursor: pointer;\n &:hover {\n color: ", ";\n }\n }\n }\n .endSection {\n width: 20%;\n height: 100%;\n .icon {\n cursor: pointer;\n transition: 0.4s;\n &:hover {\n opacity: 0.7;\n }\n }\n }\n @media only screen and (max-width: 340px) {\n height: 80px;\n .middleSection {\n h6 {\n font-size: 0.9rem;\n }\n .name {\n font-size: 0.7rem;\n height: 2rem;\n }\n }\n }\n"]);
2980
+ var data = _taggedTemplateLiteralLoose(["\n width: 100%;\n display: flex;\n flex-direction: row;\n height: 100px;\n justify-content: space-around;\n align-items: center;\n overflow: hidden;\n margin-bottom: 2rem;\n img {\n width: 20%;\n /* aspect-ratio: 1; */\n object-fit: cover;\n }\n .middleSection {\n width: 60%;\n padding-left: 0.8rem;\n height: 100%;\n h6 {\n font-size: 1.1rem;\n font-weight: bold;\n margin: 0;\n\n span {\n font-size: 0.8rem;\n color: grey;\n text-decoration: line-through;\n margin-right: 0.5rem;\n }\n }\n .name {\n font-size: 0.9rem;\n max-height: 1.85rem;\n width: 100%;\n word-wrap: break-word;\n overflow: hidden;\n text-overflow: ellipsis;\n transition: 0.3s;\n cursor: pointer;\n &:hover {\n color: ", ";\n }\n }\n }\n .endSection {\n width: 20%;\n height: 100%;\n .icon {\n cursor: pointer;\n transition: 0.4s;\n &:hover {\n opacity: 0.7;\n }\n }\n }\n @media only screen and (max-width: 340px) {\n height: 80px;\n .middleSection {\n h6 {\n font-size: 0.9rem;\n }\n .name {\n font-size: 0.7rem;\n height: 1.45rem;\n }\n }\n }\n"]);
2981
2981
 
2982
2982
  _templateObject$8 = function _templateObject() {
2983
2983
  return data;
@@ -2991,7 +2991,7 @@ var CartDrawerProduct = styled__default.div(_templateObject$8(), function (props
2991
2991
  var CartDrawerQtBox = styled__default.div(_templateObject2$4());
2992
2992
 
2993
2993
  var CartDrawerProductCard = function CartDrawerProductCard(_ref) {
2994
- var _product$standardPric, _product$standardPric2;
2994
+ var _product$cartStandard, _product$standardPric;
2995
2995
 
2996
2996
  var product = _ref.product,
2997
2997
  color = _ref.color,
@@ -3001,7 +3001,7 @@ var CartDrawerProductCard = function CartDrawerProductCard(_ref) {
3001
3001
  return /*#__PURE__*/React__default.createElement(CartDrawerProduct, {
3002
3002
  color: color
3003
3003
  }, /*#__PURE__*/React__default.createElement("img", {
3004
- src: product.imageUrl && product.imageUrl !== 'null' ? product.imageUrl : '',
3004
+ src: product.imageUrl && product.imageUrl !== 'null' ? product.imageUrl : '/images/imgnotfound.jpeg',
3005
3005
  alt: 'no product image available'
3006
3006
  }), /*#__PURE__*/React__default.createElement(material.Stack, {
3007
3007
  flexDirection: "column",
@@ -3011,9 +3011,9 @@ var CartDrawerProductCard = function CartDrawerProductCard(_ref) {
3011
3011
  }, /*#__PURE__*/React__default.createElement("h6", {
3012
3012
  className: "name",
3013
3013
  onClick: function onClick() {
3014
- return handleRedirect(product.aliase, product.productId);
3014
+ return handleRedirect(product);
3015
3015
  }
3016
- }, product === null || product === void 0 ? void 0 : product.productName), /*#__PURE__*/React__default.createElement("h6", null, (product === null || product === void 0 ? void 0 : product.standardPrice) === (product === null || product === void 0 ? void 0 : product.standardPriceWithoutDiscount) ? "$" + (product === null || product === void 0 ? void 0 : product.standardPrice) : /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("span", null, "$", product === null || product === void 0 ? void 0 : (_product$standardPric = product.standardPriceWithoutDiscount) === null || _product$standardPric === void 0 ? void 0 : _product$standardPric.toFixed(2)), "$", product === null || product === void 0 ? void 0 : (_product$standardPric2 = product.standardPrice) === null || _product$standardPric2 === void 0 ? void 0 : _product$standardPric2.toFixed(2)))), /*#__PURE__*/React__default.createElement(material.Stack, {
3016
+ }, product === null || product === void 0 ? void 0 : product.productName), /*#__PURE__*/React__default.createElement("h6", null, (product === null || product === void 0 ? void 0 : product.standardPrice) === (product === null || product === void 0 ? void 0 : product.cartStandardPrice) ? "$" + (product === null || product === void 0 ? void 0 : product.standardPrice) : /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("span", null, "$", product === null || product === void 0 ? void 0 : (_product$cartStandard = product.cartStandardPrice) === null || _product$cartStandard === void 0 ? void 0 : _product$cartStandard.toFixed(2)), "$", product === null || product === void 0 ? void 0 : (_product$standardPric = product.standardPrice) === null || _product$standardPric === void 0 ? void 0 : _product$standardPric.toFixed(2)))), /*#__PURE__*/React__default.createElement(material.Stack, {
3017
3017
  flexDirection: "column",
3018
3018
  justifyContent: "space-between",
3019
3019
  alignItems: "flex-end",
@@ -3021,17 +3021,17 @@ var CartDrawerProductCard = function CartDrawerProductCard(_ref) {
3021
3021
  }, /*#__PURE__*/React__default.createElement(RiDeleteBin5Line, {
3022
3022
  className: "icon",
3023
3023
  onClick: function onClick() {
3024
- handleRemoveProduct(product.productId);
3024
+ handleRemoveProduct(product);
3025
3025
  }
3026
3026
  }), /*#__PURE__*/React__default.createElement(CartDrawerQtBox, null, /*#__PURE__*/React__default.createElement("span", {
3027
3027
  onClick: function onClick() {
3028
- handleIncrementDecrement('decrement', product.productId);
3028
+ handleIncrementDecrement('decrement', product);
3029
3029
  }
3030
3030
  }, ' ', /*#__PURE__*/React__default.createElement(AiOutlineMinus, null)), ' ', /*#__PURE__*/React__default.createElement("span", {
3031
3031
  className: 'qt'
3032
3032
  }, product === null || product === void 0 ? void 0 : product.quantity), /*#__PURE__*/React__default.createElement("span", {
3033
3033
  onClick: function onClick() {
3034
- handleIncrementDecrement('increment', product.productId);
3034
+ handleIncrementDecrement('increment', product);
3035
3035
  }
3036
3036
  }, /*#__PURE__*/React__default.createElement(AiOutlinePlus, null)))));
3037
3037
  };
@@ -3053,7 +3053,7 @@ var CartDrawer = function CartDrawer(_ref) {
3053
3053
  onClick: function onClick() {
3054
3054
  handleClose();
3055
3055
  }
3056
- })), cartData && (cartData === null || cartData === void 0 ? void 0 : cartData.totalCartQuantity) > 0 ? /*#__PURE__*/React__default.createElement(CartDrawerProductContainer, null, cartData === null || cartData === void 0 ? void 0 : (_cartData$cartLineIte = cartData.cartLineItems) === null || _cartData$cartLineIte === void 0 ? void 0 : _cartData$cartLineIte.map(function (product, i) {
3056
+ })), cartData && (cartData === null || cartData === void 0 ? void 0 : cartData.totalCartQuantity) > 0 ? /*#__PURE__*/React__default.createElement(CartDrawerProductContainer, null, cartData === null || cartData === void 0 ? void 0 : (_cartData$cartLineIte = cartData.cartLineItemDtoList) === null || _cartData$cartLineIte === void 0 ? void 0 : _cartData$cartLineIte.map(function (product, i) {
3057
3057
  return /*#__PURE__*/React__default.createElement(CartDrawerProductCard, {
3058
3058
  product: product,
3059
3059
  handleRedirect: handleRedirect,