@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.js
CHANGED
|
@@ -2913,19 +2913,6 @@ var Dashboard = function Dashboard(_ref) {
|
|
|
2913
2913
|
var _useState7 = React.useState(0),
|
|
2914
2914
|
value = _useState7[0],
|
|
2915
2915
|
setValue = _useState7[1];
|
|
2916
|
-
var isTablet = useMediaQuery('(hover: none) and (pointer: coarse) and (min-width: 768px) and (min-height: 768px)');
|
|
2917
|
-
var handleInvoiceIframeLoad = function handleInvoiceIframeLoad(event) {
|
|
2918
|
-
if (!isTablet) return;
|
|
2919
|
-
var iframe = event.currentTarget;
|
|
2920
|
-
try {
|
|
2921
|
-
var _iframe$contentWindow, _doc$body, _doc$documentElement;
|
|
2922
|
-
var doc = iframe.contentDocument || ((_iframe$contentWindow = iframe.contentWindow) === null || _iframe$contentWindow === void 0 ? void 0 : _iframe$contentWindow.document);
|
|
2923
|
-
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);
|
|
2924
|
-
if (contentHeight) {
|
|
2925
|
-
iframe.style.height = contentHeight + "px";
|
|
2926
|
-
}
|
|
2927
|
-
} catch (_unused) {}
|
|
2928
|
-
};
|
|
2929
2916
|
React.useEffect(function () {
|
|
2930
2917
|
if (hideSalesOrderTab) {
|
|
2931
2918
|
setValue(1);
|
|
@@ -3333,21 +3320,16 @@ var Dashboard = function Dashboard(_ref) {
|
|
|
3333
3320
|
})))))), /*#__PURE__*/React__default.createElement(TableContainer, null, /*#__PURE__*/React__default.createElement(InvoiceDialog, {
|
|
3334
3321
|
onClose: function onClose() {
|
|
3335
3322
|
return setInvoiceModal({
|
|
3336
|
-
open: false
|
|
3337
|
-
url: ''
|
|
3323
|
+
open: false
|
|
3338
3324
|
});
|
|
3339
3325
|
},
|
|
3340
3326
|
"aria-labelledby": "customized-dialog-title",
|
|
3341
3327
|
open: invoiceModal === null || invoiceModal === void 0 ? void 0 : invoiceModal.open,
|
|
3342
|
-
maxWidth: "lg"
|
|
3343
|
-
fullScreen: isTablet,
|
|
3344
|
-
$tablet: isTablet
|
|
3328
|
+
maxWidth: "lg"
|
|
3345
3329
|
}, /*#__PURE__*/React__default.createElement(material.DialogContent, {
|
|
3346
3330
|
dividers: true
|
|
3347
3331
|
}, /*#__PURE__*/React__default.createElement("iframe", {
|
|
3348
|
-
src: invoiceModal.url
|
|
3349
|
-
title: "Invoice preview",
|
|
3350
|
-
onLoad: handleInvoiceIframeLoad
|
|
3332
|
+
src: invoiceModal.url
|
|
3351
3333
|
}))), /*#__PURE__*/React__default.createElement(APITable, {
|
|
3352
3334
|
key: value,
|
|
3353
3335
|
cacheFilters: true,
|
|
@@ -3614,10 +3596,7 @@ var StatusContainer = styled__default(material.Stack)(_templateObject16 || (_tem
|
|
|
3614
3596
|
return props.primaryColor;
|
|
3615
3597
|
});
|
|
3616
3598
|
var TableContainer = styled__default.div(_templateObject17 || (_templateObject17 = _taggedTemplateLiteralLoose(["\n margin-top: 2rem;\n border-radius: 14px;\n"])));
|
|
3617
|
-
var InvoiceDialog = styled__default(material.Dialog)(_templateObject18 || (_templateObject18 = _taggedTemplateLiteralLoose(["\n iframe {\n width: 900px;\n border: none;\n height: 600px;\n
|
|
3618
|
-
var $tablet = _ref3.$tablet;
|
|
3619
|
-
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 ";
|
|
3620
|
-
});
|
|
3599
|
+
var InvoiceDialog = styled__default(material.Dialog)(_templateObject18 || (_templateObject18 = _taggedTemplateLiteralLoose(["\n iframe {\n width: 900px;\n border: none;\n height: 600px;\n }\n"])));
|
|
3621
3600
|
var TabsContainer = styled__default(material.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) {
|
|
3622
3601
|
return props.fontColor;
|
|
3623
3602
|
}, function (props) {
|