@salesgenterp/ui-components 0.4.198 → 0.4.200
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 +20 -9
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +20 -9
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -100,7 +100,7 @@ var CartDrawerBar = styled__default.div(_templateObject2 || (_templateObject2 =
|
|
|
100
100
|
var CartDrawerProductContainer = styled__default.div(_templateObject3 || (_templateObject3 = _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 position: relative;\n /* height: 900px; */\n padding: 1rem;\n min-height: 74vh;\n opacity: ", ";\n @media only screen and (max-width: 748px) {\n min-height: 75vh;\n }\n /* background-color: red; */\n"])), function (props) {
|
|
101
101
|
return props.opacity;
|
|
102
102
|
});
|
|
103
|
-
var CartDrawerBottomSection = styled__default.div(_templateObject4 || (_templateObject4 = _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 margin-top: auto;\n /* padding-bottom: 0.5rem; */\n\n /* left: 0; */\n align-items: center;\n .row {\n width: 100%;\n padding: 0rem 1rem;\n padding-top: 1rem;\n /* padding-left: 1rem; */\n h5 {\n font-weight: bold;\n font-size: 1.1rem;\n span {\n font-weight: 400;\n padding-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"])));
|
|
103
|
+
var CartDrawerBottomSection = styled__default.div(_templateObject4 || (_templateObject4 = _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 margin-top: auto;\n /* padding-bottom: 0.5rem; */\n\n /* left: 0; */\n align-items: center;\n .row {\n width: 100%;\n padding: 0rem 1rem;\n padding-top: 1rem;\n /* padding-left: 1rem; */\n h5 {\n font-weight: bold;\n font-size: 1.1rem;\n span {\n font-weight: 400;\n padding-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"])));
|
|
104
104
|
var CartDrawerOutlinedButton = styled__default.button(_templateObject5 || (_templateObject5 = _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"])), function (props) {
|
|
105
105
|
return props.color || 'black';
|
|
106
106
|
}, function (props) {
|
|
@@ -166,14 +166,18 @@ var CartDrawerProductCard = function CartDrawerProductCard(_ref) {
|
|
|
166
166
|
}), /*#__PURE__*/React__default.createElement(CartDrawerQtBox, null, /*#__PURE__*/React__default.createElement("span", {
|
|
167
167
|
onClick: function onClick() {
|
|
168
168
|
if (loading) return;
|
|
169
|
-
handleIncrementDecrement('decrement', product
|
|
169
|
+
handleIncrementDecrement('decrement', _extends({}, product, {
|
|
170
|
+
quantity: (product === null || product === void 0 ? void 0 : product.quantity) > (product === null || product === void 0 ? void 0 : product.availableQuantity) ? product === null || product === void 0 ? void 0 : product.availableQuantity : product === null || product === void 0 ? void 0 : product.quantity
|
|
171
|
+
}));
|
|
170
172
|
}
|
|
171
173
|
}, ' ', /*#__PURE__*/React__default.createElement(ai.AiOutlineMinus, null)), ' ', /*#__PURE__*/React__default.createElement("span", {
|
|
172
174
|
className: 'qt'
|
|
173
175
|
}, product === null || product === void 0 ? void 0 : product.quantity), /*#__PURE__*/React__default.createElement("span", {
|
|
174
176
|
onClick: function onClick() {
|
|
175
177
|
if (loading) return;
|
|
176
|
-
handleIncrementDecrement('increment', product
|
|
178
|
+
handleIncrementDecrement('increment', _extends({}, product, product, {
|
|
179
|
+
quantity: (product === null || product === void 0 ? void 0 : product.quantity) > (product === null || product === void 0 ? void 0 : product.availableQuantity) ? product === null || product === void 0 ? void 0 : product.availableQuantity : product === null || product === void 0 ? void 0 : product.quantity
|
|
180
|
+
}));
|
|
177
181
|
}
|
|
178
182
|
}, /*#__PURE__*/React__default.createElement(ai.AiOutlinePlus, null)))));
|
|
179
183
|
};
|
|
@@ -265,7 +269,7 @@ var CartHeading = styled__default.div(_templateObject4$1 || (_templateObject4$1
|
|
|
265
269
|
return props.h1 || 'inherit';
|
|
266
270
|
});
|
|
267
271
|
var Loader = styled__default.div(_templateObject5$1 || (_templateObject5$1 = _taggedTemplateLiteralLoose(["\n position: absolute;\n top: 40%;\n left: 47%;\n display: grid;\n place-items: center;\n z-index: 3;\n"])));
|
|
268
|
-
var CartTableCell = styled__default(material.TableCell)(_templateObject6$1 || (_templateObject6$1 = _taggedTemplateLiteralLoose(["\n && {\n padding-bottom: 1em !important;\n border: none !important;\n /* font-size: 0.75em; */\n font-size: 1em;\n color: rgba(98, 95, 95, 1);\n background: ", ";\n color: ", ";\n font-family: 'karla-fonts';\n }\n &.bg-transparent {\n background-color: transparent !important;\n text-transform: uppercase;\n z-index: 3 !important;\n span {\n font-size: 0.75em;\n font-weight: 600;\n }\n svg {\n color: ", ";\n }\n .MuiTableSortLabel-root {\n color: ", "!important;\n }\n }\n"])), function (props) {
|
|
272
|
+
var CartTableCell = styled__default(material.TableCell)(_templateObject6$1 || (_templateObject6$1 = _taggedTemplateLiteralLoose(["\n && {\n padding-bottom: 1em !important;\n border: none !important;\n /* font-size: 0.75em; */\n font-size: 1em;\n color: rgba(98, 95, 95, 1);\n background: ", ";\n color: ", ";\n font-family: 'karla-fonts';\n }\n &.bg-transparent {\n // background-color: transparent !important;\n text-transform: uppercase;\n z-index: 3 !important;\n span {\n font-size: 0.75em;\n font-weight: 600;\n }\n svg {\n color: ", ";\n }\n .MuiTableSortLabel-root {\n color: ", "!important;\n }\n }\n"])), function (props) {
|
|
269
273
|
return "" + props.bg;
|
|
270
274
|
}, function (props) {
|
|
271
275
|
return "" + props.color || 'inherit';
|
|
@@ -1449,15 +1453,18 @@ var CardRow = function CardRow(_ref) {
|
|
|
1449
1453
|
src: row.imageUrl && row.imageUrl !== 'null' ? row.imageUrl : imgnotfoundUrlcommon,
|
|
1450
1454
|
alt: 'no product image available',
|
|
1451
1455
|
width: (imgSize === null || imgSize === void 0 ? void 0 : imgSize.width) || 50,
|
|
1452
|
-
height: (imgSize === null || imgSize === void 0 ? void 0 : imgSize.height) ||
|
|
1456
|
+
height: (imgSize === null || imgSize === void 0 ? void 0 : imgSize.height) || 50
|
|
1453
1457
|
})), /*#__PURE__*/React__default.createElement(CartTableCell$1, {
|
|
1454
1458
|
component: "th",
|
|
1455
1459
|
id: row === null || row === void 0 ? void 0 : row.labelId,
|
|
1456
1460
|
scope: "row",
|
|
1457
1461
|
padding: "none"
|
|
1458
1462
|
}, /*#__PURE__*/React__default.createElement(ProductName, null, row.productName), row.quantity > row.availableQuantity && /*#__PURE__*/React__default.createElement("p", {
|
|
1459
|
-
|
|
1460
|
-
|
|
1463
|
+
style: {
|
|
1464
|
+
color: 'red',
|
|
1465
|
+
fontWeight: 500
|
|
1466
|
+
}
|
|
1467
|
+
}, "Maximum available quantity is ", row.availableQuantity)), /*#__PURE__*/React__default.createElement(CartTableCell$1, {
|
|
1461
1468
|
align: "center",
|
|
1462
1469
|
className: "CartnoBelowSm"
|
|
1463
1470
|
}, /*#__PURE__*/React__default.createElement("p", {
|
|
@@ -1468,7 +1475,9 @@ var CardRow = function CardRow(_ref) {
|
|
|
1468
1475
|
onClick: function onClick(e) {
|
|
1469
1476
|
e.stopPropagation();
|
|
1470
1477
|
if (loading) return;
|
|
1471
|
-
handleIncrementDecrement('decrement', row
|
|
1478
|
+
handleIncrementDecrement('decrement', _extends({}, row, {
|
|
1479
|
+
quantity: (row === null || row === void 0 ? void 0 : row.quantity) > (row === null || row === void 0 ? void 0 : row.availableQuantity) ? row === null || row === void 0 ? void 0 : row.availableQuantity : row === null || row === void 0 ? void 0 : row.quantity
|
|
1480
|
+
}));
|
|
1472
1481
|
}
|
|
1473
1482
|
}, /*#__PURE__*/React__default.createElement(ai.AiOutlineMinus, {
|
|
1474
1483
|
style: {
|
|
@@ -1481,7 +1490,9 @@ var CardRow = function CardRow(_ref) {
|
|
|
1481
1490
|
onClick: function onClick(e) {
|
|
1482
1491
|
e.stopPropagation();
|
|
1483
1492
|
if (loading) return;
|
|
1484
|
-
handleIncrementDecrement('increment', row
|
|
1493
|
+
handleIncrementDecrement('increment', _extends({}, row, {
|
|
1494
|
+
quantity: (row === null || row === void 0 ? void 0 : row.quantity) > (row === null || row === void 0 ? void 0 : row.availableQuantity) ? row === null || row === void 0 ? void 0 : row.availableQuantity : row === null || row === void 0 ? void 0 : row.quantity
|
|
1495
|
+
}));
|
|
1485
1496
|
}
|
|
1486
1497
|
}, /*#__PURE__*/React__default.createElement(ai.AiOutlinePlus, {
|
|
1487
1498
|
style: {
|