@salesgenterp/ui-components 0.4.547 → 0.4.548
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 +9 -53
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +9 -53
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -2830,7 +2830,7 @@ var InfoContainer = styled.div(_templateObject$9 || (_templateObject$9 = _tagged
|
|
|
2830
2830
|
return props.fontColor;
|
|
2831
2831
|
});
|
|
2832
2832
|
|
|
2833
|
-
var _templateObject$a, _templateObject2$5, _templateObject3$3, _templateObject4$2, _templateObject5$1, _templateObject6$1, _templateObject7$1, _templateObject8$1, _templateObject9$1, _templateObject10$1, _templateObject11$1, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19
|
|
2833
|
+
var _templateObject$a, _templateObject2$5, _templateObject3$3, _templateObject4$2, _templateObject5$1, _templateObject6$1, _templateObject7$1, _templateObject8$1, _templateObject9$1, _templateObject10$1, _templateObject11$1, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19;
|
|
2834
2834
|
var totalIcons = [{
|
|
2835
2835
|
name: '',
|
|
2836
2836
|
icon: /*#__PURE__*/React__default.createElement(AiOutlineShoppingCart, null)
|
|
@@ -2909,38 +2909,6 @@ var Dashboard = function Dashboard(_ref) {
|
|
|
2909
2909
|
var _useState7 = useState(0),
|
|
2910
2910
|
value = _useState7[0],
|
|
2911
2911
|
setValue = _useState7[1];
|
|
2912
|
-
var isTablet = useMediaQuery('(hover: none) and (pointer: coarse) and (min-width: 768px) and (min-height: 768px)');
|
|
2913
|
-
var handleInvoiceIframeLoad = function handleInvoiceIframeLoad(event) {
|
|
2914
|
-
if (!isTablet) return;
|
|
2915
|
-
var iframe = event.currentTarget;
|
|
2916
|
-
try {
|
|
2917
|
-
var _iframe$contentWindow, _doc$body, _doc$documentElement;
|
|
2918
|
-
var doc = iframe.contentDocument || ((_iframe$contentWindow = iframe.contentWindow) === null || _iframe$contentWindow === void 0 ? void 0 : _iframe$contentWindow.document);
|
|
2919
|
-
var contentHeight = Math.max((doc === null || doc === void 0 ? void 0 : (_doc$body = doc.body) === null || _doc$body === void 0 ? void 0 : _doc$body.offsetHeight) || 0, (doc === null || doc === void 0 ? void 0 : (_doc$documentElement = doc.documentElement) === null || _doc$documentElement === void 0 ? void 0 : _doc$documentElement.offsetHeight) || 0);
|
|
2920
|
-
if (contentHeight) {
|
|
2921
|
-
iframe.style.height = contentHeight + "px";
|
|
2922
|
-
}
|
|
2923
|
-
} catch (_unused) {}
|
|
2924
|
-
};
|
|
2925
|
-
useEffect(function () {
|
|
2926
|
-
if (!isTablet || !invoiceModal.open) return;
|
|
2927
|
-
var scrollY = window.scrollY;
|
|
2928
|
-
document.body.style.position = 'fixed';
|
|
2929
|
-
document.body.style.top = "-" + scrollY + "px";
|
|
2930
|
-
document.body.style.left = '0';
|
|
2931
|
-
document.body.style.right = '0';
|
|
2932
|
-
document.body.style.width = '100%';
|
|
2933
|
-
document.body.style.overflow = 'hidden';
|
|
2934
|
-
return function () {
|
|
2935
|
-
document.body.style.position = '';
|
|
2936
|
-
document.body.style.top = '';
|
|
2937
|
-
document.body.style.left = '';
|
|
2938
|
-
document.body.style.right = '';
|
|
2939
|
-
document.body.style.width = '';
|
|
2940
|
-
document.body.style.overflow = '';
|
|
2941
|
-
window.scrollTo(0, scrollY);
|
|
2942
|
-
};
|
|
2943
|
-
}, [isTablet, invoiceModal.open]);
|
|
2944
2912
|
useEffect(function () {
|
|
2945
2913
|
if (hideSalesOrderTab) {
|
|
2946
2914
|
setValue(1);
|
|
@@ -3348,24 +3316,16 @@ var Dashboard = function Dashboard(_ref) {
|
|
|
3348
3316
|
})))))), /*#__PURE__*/React__default.createElement(TableContainer, null, /*#__PURE__*/React__default.createElement(InvoiceDialog, {
|
|
3349
3317
|
onClose: function onClose() {
|
|
3350
3318
|
return setInvoiceModal({
|
|
3351
|
-
open: false
|
|
3352
|
-
url: ''
|
|
3319
|
+
open: false
|
|
3353
3320
|
});
|
|
3354
3321
|
},
|
|
3355
3322
|
"aria-labelledby": "customized-dialog-title",
|
|
3356
3323
|
open: invoiceModal === null || invoiceModal === void 0 ? void 0 : invoiceModal.open,
|
|
3357
|
-
maxWidth: "lg"
|
|
3358
|
-
|
|
3359
|
-
$tablet: isTablet
|
|
3360
|
-
}, isTablet ? /*#__PURE__*/React__default.createElement(InvoiceScrollArea, null, /*#__PURE__*/React__default.createElement("iframe", {
|
|
3361
|
-
src: invoiceModal.url,
|
|
3362
|
-
title: "Invoice preview",
|
|
3363
|
-
onLoad: handleInvoiceIframeLoad
|
|
3364
|
-
})) : /*#__PURE__*/React__default.createElement(DialogContent, {
|
|
3324
|
+
maxWidth: "lg"
|
|
3325
|
+
}, /*#__PURE__*/React__default.createElement(DialogContent, {
|
|
3365
3326
|
dividers: true
|
|
3366
3327
|
}, /*#__PURE__*/React__default.createElement("iframe", {
|
|
3367
|
-
src: invoiceModal.url
|
|
3368
|
-
title: "Invoice preview"
|
|
3328
|
+
src: invoiceModal.url
|
|
3369
3329
|
}))), /*#__PURE__*/React__default.createElement(APITable, {
|
|
3370
3330
|
key: value,
|
|
3371
3331
|
cacheFilters: true,
|
|
@@ -3632,12 +3592,8 @@ var StatusContainer = styled(Stack)(_templateObject16 || (_templateObject16 = _t
|
|
|
3632
3592
|
return props.primaryColor;
|
|
3633
3593
|
});
|
|
3634
3594
|
var TableContainer = styled.div(_templateObject17 || (_templateObject17 = _taggedTemplateLiteralLoose(["\n margin-top: 2rem;\n border-radius: 14px;\n"])));
|
|
3635
|
-
var InvoiceDialog = styled(Dialog)(_templateObject18 || (_templateObject18 = _taggedTemplateLiteralLoose(["\n iframe {\n width: 900px;\n border: none;\n height: 600px;\n
|
|
3636
|
-
|
|
3637
|
-
return $tablet && "\n .MuiDialog-container {\n overscroll-behavior: none;\n }\n\n .MuiDialog-paper {\n display: flex;\n flex-direction: column;\n overflow: hidden;\n height: 100%;\n max-height: 100%;\n margin: 0;\n }\n ";
|
|
3638
|
-
});
|
|
3639
|
-
var InvoiceScrollArea = styled.div(_templateObject19 || (_templateObject19 = _taggedTemplateLiteralLoose(["\n overflow-y: auto;\n overflow-x: hidden;\n -webkit-overflow-scrolling: touch;\n overscroll-behavior: contain;\n touch-action: pan-y;\n flex: 1;\n min-height: 0;\n width: 100%;\n height: 100%;\n\n iframe {\n width: 100%;\n border: none;\n display: block;\n pointer-events: none;\n }\n"])));
|
|
3640
|
-
var TabsContainer = styled(Tabs)(_templateObject20 || (_templateObject20 = _taggedTemplateLiteralLoose(["\n button {\n color: ", " !important;\n font-size: 1.1rem;\n font-weight: 600;\n }\n .Mui-selected {\n color: ", " !important;\n }\n .MuiTabs-indicator {\n background-color: ", " !important;\n }\n"])), function (props) {
|
|
3595
|
+
var InvoiceDialog = styled(Dialog)(_templateObject18 || (_templateObject18 = _taggedTemplateLiteralLoose(["\n iframe {\n width: 900px;\n border: none;\n height: 600px;\n }\n"])));
|
|
3596
|
+
var TabsContainer = styled(Tabs)(_templateObject19 || (_templateObject19 = _taggedTemplateLiteralLoose(["\n button {\n color: ", " !important;\n font-size: 1.1rem;\n font-weight: 600;\n }\n .Mui-selected {\n color: ", " !important;\n }\n .MuiTabs-indicator {\n background-color: ", " !important;\n }\n"])), function (props) {
|
|
3641
3597
|
return props.fontColor;
|
|
3642
3598
|
}, function (props) {
|
|
3643
3599
|
return props.primaryColor;
|
|
@@ -4951,7 +4907,7 @@ var getDropzoneRejectionError = function getDropzoneRejectionError(fileRejection
|
|
|
4951
4907
|
return (error === null || error === void 0 ? void 0 : error.message) || 'Invalid file';
|
|
4952
4908
|
};
|
|
4953
4909
|
|
|
4954
|
-
var _templateObject$k, _templateObject2$c, _templateObject3$8, _templateObject4$6, _templateObject5$4, _templateObject6$3, _templateObject7$2, _templateObject8$2, _templateObject9$2, _templateObject10$2, _templateObject11$2, _templateObject12$1, _templateObject13$1, _templateObject14$1, _templateObject15$1, _templateObject16$1, _templateObject17$1, _templateObject18$1, _templateObject19$1, _templateObject20
|
|
4910
|
+
var _templateObject$k, _templateObject2$c, _templateObject3$8, _templateObject4$6, _templateObject5$4, _templateObject6$3, _templateObject7$2, _templateObject8$2, _templateObject9$2, _templateObject10$2, _templateObject11$2, _templateObject12$1, _templateObject13$1, _templateObject14$1, _templateObject15$1, _templateObject16$1, _templateObject17$1, _templateObject18$1, _templateObject19$1, _templateObject20, _templateObject21, _templateObject22, _templateObject23, _templateObject24, _templateObject25, _templateObject26, _templateObject27, _templateObject28, _templateObject29, _templateObject30, _templateObject31, _templateObject32, _templateObject33, _templateObject34;
|
|
4955
4911
|
var DEFAULT_PRIMARY_COLOR = "#437c0f";
|
|
4956
4912
|
var Container = styled.div(_templateObject$k || (_templateObject$k = _taggedTemplateLiteralLoose(["\n width: 100%;\n min-height: 80vh;\n display: flex;\n justify-content: center;\n align-items: center;\n background: #f6f6f6;\n padding: 2rem 1rem;\n"])));
|
|
4957
4913
|
var Card = styled.div(_templateObject2$c || (_templateObject2$c = _taggedTemplateLiteralLoose(["\n width: min(100%, 720px);\n background: #fff;\n border: 1px solid #cac8c8;\n border-radius: 8px;\n padding: 1.5rem;\n"])));
|
|
@@ -4991,7 +4947,7 @@ var DropzoneBtn = styled.span(_templateObject16$1 || (_templateObject16$1 = _tag
|
|
|
4991
4947
|
var DropzoneText = styled.span(_templateObject17$1 || (_templateObject17$1 = _taggedTemplateLiteralLoose(["\n font-size: 0.875rem;\n color: #666;\n"])));
|
|
4992
4948
|
var DropzoneError = styled.p(_templateObject18$1 || (_templateObject18$1 = _taggedTemplateLiteralLoose(["\n margin: 0.5rem 0 0;\n font-size: 0.8rem;\n color: #c62828;\n"])));
|
|
4993
4949
|
var SelectedFileRow = styled.div(_templateObject19$1 || (_templateObject19$1 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 1rem;\n padding: 0.6rem 0.75rem;\n border: 1px solid #e0e0e0;\n border-radius: 6px;\n background: #fafafa;\n"])));
|
|
4994
|
-
var SelectedFileInfo = styled.div(_templateObject20
|
|
4950
|
+
var SelectedFileInfo = styled.div(_templateObject20 || (_templateObject20 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n gap: 0.5rem;\n min-width: 0;\n flex: 1;\n"])));
|
|
4995
4951
|
var SelectedFileName = styled.span(_templateObject21 || (_templateObject21 = _taggedTemplateLiteralLoose(["\n font-size: 0.875rem;\n color: #333;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n"])));
|
|
4996
4952
|
var ClearFileBtn = styled.button(_templateObject22 || (_templateObject22 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0;\n border: none;\n background: none;\n color: #c62828;\n font-size: 1.1rem;\n cursor: pointer;\n flex-shrink: 0;\n\n &:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n"])));
|
|
4997
4953
|
var UploadedFiles = styled.ul(_templateObject23 || (_templateObject23 = _taggedTemplateLiteralLoose(["\n margin: 0;\n padding: 0;\n list-style: none;\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n\n li {\n display: flex;\n align-items: center;\n gap: 0.75rem;\n font-size: 0.875rem;\n color: #555;\n padding: 0.65rem 0.75rem;\n background: #fff;\n border: 1px solid #eee;\n border-radius: 4px;\n }\n"])));
|