coject 2.4.52 → 2.4.53
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/cjs/Components/CojectReport/index.d.ts +3 -3
- package/dist/cjs/Components/CojectReport/index.js +3 -3
- package/dist/cjs/Components/CojectReport/index.js.map +1 -1
- package/dist/esm/Components/CojectReport/index.d.ts +3 -3
- package/dist/esm/Components/CojectReport/index.js +3 -3
- package/dist/esm/Components/CojectReport/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { FC } from "react";
|
|
2
2
|
import { ButtonProps } from "@mui/material";
|
|
3
3
|
interface CojectReportProps extends Omit<ButtonProps, 'onClick'> {
|
|
4
|
-
data: any;
|
|
5
|
-
jsonData: any;
|
|
6
4
|
label: string;
|
|
7
|
-
|
|
5
|
+
reportData: any;
|
|
6
|
+
reportTemplate: any;
|
|
7
|
+
reportParameter?: any;
|
|
8
8
|
reportCode?: string;
|
|
9
9
|
reportName?: string;
|
|
10
10
|
fullWidth?: boolean;
|
|
@@ -11,12 +11,12 @@ const renderer_1 = require("@react-pdf/renderer");
|
|
|
11
11
|
const PdfContainer_1 = __importDefault(require("./PdfContainer"));
|
|
12
12
|
// Coject Components
|
|
13
13
|
const Button_1 = require("../Button");
|
|
14
|
-
const CojectReport = ({
|
|
14
|
+
const CojectReport = ({ reportData, reportTemplate, reportCode, reportName, reportParameter, label, fullWidth, variant, ...buttonProps }) => {
|
|
15
15
|
// Handle Print
|
|
16
16
|
const handlePrint = async () => {
|
|
17
|
-
if (!
|
|
17
|
+
if (!reportTemplate)
|
|
18
18
|
return;
|
|
19
|
-
const blob = await (0, renderer_1.pdf)(react_1.default.createElement(PdfContainer_1.default, { data:
|
|
19
|
+
const blob = await (0, renderer_1.pdf)(react_1.default.createElement(PdfContainer_1.default, { data: reportData, jsonData: reportTemplate, parameter: reportParameter, reportName: reportName })).toBlob();
|
|
20
20
|
const url = URL.createObjectURL(blob);
|
|
21
21
|
window.open(url, '_blank');
|
|
22
22
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../resources/Components/CojectReport/index.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAAkC;AAKlC,YAAY;AACZ,kDAA0C;AAE1C,gBAAgB;AAChB,kEAA0C;AAE1C,oBAAoB;AACpB,sCAAmC;AAc5B,MAAM,YAAY,GAA0B,CAAC,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../resources/Components/CojectReport/index.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAAkC;AAKlC,YAAY;AACZ,kDAA0C;AAE1C,gBAAgB;AAChB,kEAA0C;AAE1C,oBAAoB;AACpB,sCAAmC;AAc5B,MAAM,YAAY,GAA0B,CAAC,EAAE,UAAU,EAAE,cAAc,EAAE,UAAU,EAAE,UAAU,EAAE,eAAe,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,WAAW,EAAE,EAAE,EAAE;IAEtK,eAAe;IACf,MAAM,WAAW,GAAG,KAAK,IAAI,EAAE;QAC3B,IAAI,CAAC,cAAc;YAAE,OAAO;QAC5B,MAAM,IAAI,GAAG,MAAM,IAAA,cAAG,EAAC,8BAAC,sBAAY,IAAC,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,cAAc,EAAE,SAAS,EAAE,eAAe,EAAE,UAAU,EAAE,UAAU,GAAI,CAAC,CAAC,MAAM,EAAE,CAAC;QAClJ,MAAM,GAAG,GAAG,GAAG,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;QACtC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;IAC/B,CAAC,CAAC;IAEF,OAAO,CACH,8BAAC,eAAK,CAAC,QAAQ;QACX,8BAAC,eAAM,IAAC,IAAI,EAAC,QAAQ,EAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,WAAW,CAAC,SAAS,IAC9H,KAAK,IAAI,WAAW,CAAC,QAAQ,CACzB,CACI,CACpB,CAAC;AACN,CAAC,CAAC;AAjBW,QAAA,YAAY,gBAiBvB"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { FC } from "react";
|
|
2
2
|
import { ButtonProps } from "@mui/material";
|
|
3
3
|
interface CojectReportProps extends Omit<ButtonProps, 'onClick'> {
|
|
4
|
-
data: any;
|
|
5
|
-
jsonData: any;
|
|
6
4
|
label: string;
|
|
7
|
-
|
|
5
|
+
reportData: any;
|
|
6
|
+
reportTemplate: any;
|
|
7
|
+
reportParameter?: any;
|
|
8
8
|
reportCode?: string;
|
|
9
9
|
reportName?: string;
|
|
10
10
|
fullWidth?: boolean;
|
|
@@ -5,12 +5,12 @@ import { pdf } from '@react-pdf/renderer';
|
|
|
5
5
|
import PdfContainer from './PdfContainer';
|
|
6
6
|
// Coject Components
|
|
7
7
|
import { Button } from '../Button';
|
|
8
|
-
export const CojectReport = ({
|
|
8
|
+
export const CojectReport = ({ reportData, reportTemplate, reportCode, reportName, reportParameter, label, fullWidth, variant, ...buttonProps }) => {
|
|
9
9
|
// Handle Print
|
|
10
10
|
const handlePrint = async () => {
|
|
11
|
-
if (!
|
|
11
|
+
if (!reportTemplate)
|
|
12
12
|
return;
|
|
13
|
-
const blob = await pdf(React.createElement(PdfContainer, { data:
|
|
13
|
+
const blob = await pdf(React.createElement(PdfContainer, { data: reportData, jsonData: reportTemplate, parameter: reportParameter, reportName: reportName })).toBlob();
|
|
14
14
|
const url = URL.createObjectURL(blob);
|
|
15
15
|
window.open(url, '_blank');
|
|
16
16
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../resources/Components/CojectReport/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAa,MAAM,OAAO,CAAC;AAKlC,YA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