@salesgenterp/ui-components 0.4.546 → 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 +4 -25
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +4 -25
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -2909,19 +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.scrollHeight) || 0, (doc === null || doc === void 0 ? void 0 : (_doc$documentElement = doc.documentElement) === null || _doc$documentElement === void 0 ? void 0 : _doc$documentElement.scrollHeight) || 0);
|
|
2920
|
-
if (contentHeight) {
|
|
2921
|
-
iframe.style.height = contentHeight + "px";
|
|
2922
|
-
}
|
|
2923
|
-
} catch (_unused) {}
|
|
2924
|
-
};
|
|
2925
2912
|
useEffect(function () {
|
|
2926
2913
|
if (hideSalesOrderTab) {
|
|
2927
2914
|
setValue(1);
|
|
@@ -3329,21 +3316,16 @@ var Dashboard = function Dashboard(_ref) {
|
|
|
3329
3316
|
})))))), /*#__PURE__*/React__default.createElement(TableContainer, null, /*#__PURE__*/React__default.createElement(InvoiceDialog, {
|
|
3330
3317
|
onClose: function onClose() {
|
|
3331
3318
|
return setInvoiceModal({
|
|
3332
|
-
open: false
|
|
3333
|
-
url: ''
|
|
3319
|
+
open: false
|
|
3334
3320
|
});
|
|
3335
3321
|
},
|
|
3336
3322
|
"aria-labelledby": "customized-dialog-title",
|
|
3337
3323
|
open: invoiceModal === null || invoiceModal === void 0 ? void 0 : invoiceModal.open,
|
|
3338
|
-
maxWidth: "lg"
|
|
3339
|
-
fullScreen: isTablet,
|
|
3340
|
-
$tablet: isTablet
|
|
3324
|
+
maxWidth: "lg"
|
|
3341
3325
|
}, /*#__PURE__*/React__default.createElement(DialogContent, {
|
|
3342
3326
|
dividers: true
|
|
3343
3327
|
}, /*#__PURE__*/React__default.createElement("iframe", {
|
|
3344
|
-
src: invoiceModal.url
|
|
3345
|
-
title: "Invoice preview",
|
|
3346
|
-
onLoad: handleInvoiceIframeLoad
|
|
3328
|
+
src: invoiceModal.url
|
|
3347
3329
|
}))), /*#__PURE__*/React__default.createElement(APITable, {
|
|
3348
3330
|
key: value,
|
|
3349
3331
|
cacheFilters: true,
|
|
@@ -3610,10 +3592,7 @@ var StatusContainer = styled(Stack)(_templateObject16 || (_templateObject16 = _t
|
|
|
3610
3592
|
return props.primaryColor;
|
|
3611
3593
|
});
|
|
3612
3594
|
var TableContainer = styled.div(_templateObject17 || (_templateObject17 = _taggedTemplateLiteralLoose(["\n margin-top: 2rem;\n border-radius: 14px;\n"])));
|
|
3613
|
-
var InvoiceDialog = styled(Dialog)(_templateObject18 || (_templateObject18 = _taggedTemplateLiteralLoose(["\n iframe {\n width: 900px;\n border: none;\n height: 600px;\n
|
|
3614
|
-
var $tablet = _ref3.$tablet;
|
|
3615
|
-
return $tablet && "\n .MuiDialog-paper {\n display: flex;\n flex-direction: column;\n overflow: hidden;\n }\n\n .MuiDialogContent-root {\n overflow: auto;\n -webkit-overflow-scrolling: touch;\n overscroll-behavior: contain;\n padding: 0;\n flex: 1;\n min-height: 0;\n }\n\n iframe {\n width: 100%;\n min-height: 600px;\n height: auto;\n pointer-events: none;\n }\n ";
|
|
3616
|
-
});
|
|
3595
|
+
var InvoiceDialog = styled(Dialog)(_templateObject18 || (_templateObject18 = _taggedTemplateLiteralLoose(["\n iframe {\n width: 900px;\n border: none;\n height: 600px;\n }\n"])));
|
|
3617
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) {
|
|
3618
3597
|
return props.fontColor;
|
|
3619
3598
|
}, function (props) {
|