coject 2.4.54 → 2.4.55
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 +9 -1
- package/dist/cjs/Components/CojectReport/index.js +8 -5
- package/dist/cjs/Components/CojectReport/index.js.map +1 -1
- package/dist/esm/Components/CojectReport/index.d.ts +9 -1
- package/dist/esm/Components/CojectReport/index.js +8 -5
- package/dist/esm/Components/CojectReport/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -10,5 +10,13 @@ interface CojectReportProps extends Omit<ButtonProps, 'onClick'> {
|
|
|
10
10
|
fullWidth?: boolean;
|
|
11
11
|
variant?: "contained" | "outlined" | "text";
|
|
12
12
|
}
|
|
13
|
-
|
|
13
|
+
interface CojectReportType extends FC<CojectReportProps> {
|
|
14
|
+
print: (params: {
|
|
15
|
+
reportData: any;
|
|
16
|
+
reportTemplate: any;
|
|
17
|
+
reportParameter?: any;
|
|
18
|
+
reportName?: string;
|
|
19
|
+
}) => Promise<void>;
|
|
20
|
+
}
|
|
21
|
+
export declare const CojectReport: CojectReportType;
|
|
14
22
|
export {};
|
|
@@ -14,14 +14,17 @@ const Button_1 = require("../Button");
|
|
|
14
14
|
const CojectReport = ({ reportData, reportTemplate, reportCode, reportName, reportParameter, label, fullWidth, variant, ...buttonProps }) => {
|
|
15
15
|
// Handle Print
|
|
16
16
|
const handlePrint = async () => {
|
|
17
|
-
|
|
18
|
-
return;
|
|
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
|
-
const url = URL.createObjectURL(blob);
|
|
21
|
-
window.open(url, '_blank');
|
|
17
|
+
await exports.CojectReport.print({ reportData, reportTemplate, reportParameter, reportName });
|
|
22
18
|
};
|
|
23
19
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
24
20
|
react_1.default.createElement(Button_1.Button, { type: 'button', fullWidth: fullWidth, variant: variant || "contained", onClick: handlePrint, startIcon: buttonProps.startIcon }, label || buttonProps.children)));
|
|
25
21
|
};
|
|
26
22
|
exports.CojectReport = CojectReport;
|
|
23
|
+
exports.CojectReport.print = async ({ reportData, reportTemplate, reportParameter, reportName }) => {
|
|
24
|
+
if (!reportTemplate)
|
|
25
|
+
return;
|
|
26
|
+
const blob = await (0, renderer_1.pdf)(react_1.default.createElement(PdfContainer_1.default, { data: reportData, jsonData: reportTemplate, parameter: reportParameter, reportName: reportName })).toBlob();
|
|
27
|
+
const url = URL.createObjectURL(blob);
|
|
28
|
+
window.open(url, '_blank');
|
|
29
|
+
};
|
|
27
30
|
//# sourceMappingURL=index.js.map
|
|
@@ -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;
|
|
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;AAmB5B,MAAM,YAAY,GAAqB,CAAC,EAAE,UAAU,EAAE,cAAc,EAAE,UAAU,EAAE,UAAU,EAAE,eAAe,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,WAAW,EAAE,EAAE,EAAE;IAEjK,eAAe;IACf,MAAM,WAAW,GAAG,KAAK,IAAI,EAAE;QAC3B,MAAM,oBAAY,CAAC,KAAK,CAAC,EAAE,UAAU,EAAE,cAAc,EAAE,eAAe,EAAE,UAAU,EAAE,CAAC,CAAC;IAC1F,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;AAdW,QAAA,YAAY,gBAcvB;AAEF,oBAAY,CAAC,KAAK,GAAG,KAAK,EAAE,EAAE,UAAU,EAAE,cAAc,EAAE,eAAe,EAAE,UAAU,EAAwF,EAAE,EAAE;IAC7K,IAAI,CAAC,cAAc;QAAE,OAAO;IAC5B,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;IAClJ,MAAM,GAAG,GAAG,GAAG,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;IACtC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;AAC/B,CAAC,CAAC"}
|
|
@@ -10,5 +10,13 @@ interface CojectReportProps extends Omit<ButtonProps, 'onClick'> {
|
|
|
10
10
|
fullWidth?: boolean;
|
|
11
11
|
variant?: "contained" | "outlined" | "text";
|
|
12
12
|
}
|
|
13
|
-
|
|
13
|
+
interface CojectReportType extends FC<CojectReportProps> {
|
|
14
|
+
print: (params: {
|
|
15
|
+
reportData: any;
|
|
16
|
+
reportTemplate: any;
|
|
17
|
+
reportParameter?: any;
|
|
18
|
+
reportName?: string;
|
|
19
|
+
}) => Promise<void>;
|
|
20
|
+
}
|
|
21
|
+
export declare const CojectReport: CojectReportType;
|
|
14
22
|
export {};
|
|
@@ -8,13 +8,16 @@ import { Button } from '../Button';
|
|
|
8
8
|
export const CojectReport = ({ reportData, reportTemplate, reportCode, reportName, reportParameter, label, fullWidth, variant, ...buttonProps }) => {
|
|
9
9
|
// Handle Print
|
|
10
10
|
const handlePrint = async () => {
|
|
11
|
-
|
|
12
|
-
return;
|
|
13
|
-
const blob = await pdf(React.createElement(PdfContainer, { data: reportData, jsonData: reportTemplate, parameter: reportParameter, reportName: reportName })).toBlob();
|
|
14
|
-
const url = URL.createObjectURL(blob);
|
|
15
|
-
window.open(url, '_blank');
|
|
11
|
+
await CojectReport.print({ reportData, reportTemplate, reportParameter, reportName });
|
|
16
12
|
};
|
|
17
13
|
return (React.createElement(React.Fragment, null,
|
|
18
14
|
React.createElement(Button, { type: 'button', fullWidth: fullWidth, variant: variant || "contained", onClick: handlePrint, startIcon: buttonProps.startIcon }, label || buttonProps.children)));
|
|
19
15
|
};
|
|
16
|
+
CojectReport.print = async ({ reportData, reportTemplate, reportParameter, reportName }) => {
|
|
17
|
+
if (!reportTemplate)
|
|
18
|
+
return;
|
|
19
|
+
const blob = await pdf(React.createElement(PdfContainer, { data: reportData, jsonData: reportTemplate, parameter: reportParameter, reportName: reportName })).toBlob();
|
|
20
|
+
const url = URL.createObjectURL(blob);
|
|
21
|
+
window.open(url, '_blank');
|
|
22
|
+
};
|
|
20
23
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../resources/Components/CojectReport/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAa,MAAM,OAAO,CAAC;AAKlC,YAAY;AACZ,OAAO,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAC;AAE1C,gBAAgB;AAChB,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAE1C,oBAAoB;AACpB,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../resources/Components/CojectReport/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA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