@hitsoft/e-donusum 1.0.123-Test → 1.0.124-test
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/esm2020/lib/components/hit-despatches/hit-despatch.component.mjs +49 -32
- package/esm2020/lib/components/hit-failed-despatches/hit-failed-despatch.component.mjs +3 -3
- package/esm2020/lib/components/hit-failed-invoices/hit-failed-invoice.component.mjs +3 -3
- package/esm2020/lib/components/hit-inbound-despatches/hit-inbound-despatch.component.mjs +13 -81
- package/esm2020/lib/components/hit-inbound-invoices/hit-inbound-invoice.component.mjs +16 -123
- package/esm2020/lib/components/hit-invoices/hit-invoice.component.mjs +58 -18
- package/esm2020/lib/components/hit-invoices-sent/hit-invoice-sent.component.mjs +4 -4
- package/esm2020/lib/components/hit-params-generals/hit-params-generals-part2/hit-params-general-part2.component.mjs +3 -14
- package/esm2020/lib/hit-proxy/hit-despatches/hit-despatch.service.mjs +10 -1
- package/esm2020/lib/hit-proxy/hit-inbound-despatches/hit-inbound-despatch.service.mjs +4 -29
- package/esm2020/lib/hit-proxy/hit-inbound-invoices/hit-inbound-invoice.service.mjs +1 -17
- package/esm2020/lib/hit-proxy/hit-invoices/hit-invoice.service.mjs +10 -1
- package/esm2020/lib/hit-proxy/hit-params-generals/hit-params-general.service.mjs +1 -10
- package/esm2020/lib/hit-proxy/shared/hit-shared.service.mjs +8 -45
- package/fesm2015/hitsoft-e-donusum.mjs +176 -373
- package/fesm2015/hitsoft-e-donusum.mjs.map +1 -1
- package/fesm2020/hitsoft-e-donusum.mjs +174 -370
- package/fesm2020/hitsoft-e-donusum.mjs.map +1 -1
- package/lib/components/hit-despatches/hit-despatch.component.d.ts +9 -3
- package/lib/components/hit-inbound-despatches/hit-inbound-despatch.component.d.ts +1 -12
- package/lib/components/hit-inbound-invoices/hit-inbound-invoice.component.d.ts +1 -13
- package/lib/components/hit-invoices/hit-invoice.component.d.ts +9 -2
- package/lib/components/hit-params-generals/hit-params-generals-part2/hit-params-general-part2.component.d.ts +0 -1
- package/lib/hit-proxy/hit-despatches/hit-despatch.service.d.ts +4 -0
- package/lib/hit-proxy/hit-inbound-despatches/hit-inbound-despatch.service.d.ts +1 -7
- package/lib/hit-proxy/hit-inbound-invoices/hit-inbound-invoice.service.d.ts +0 -3
- package/lib/hit-proxy/hit-invoices/hit-invoice.service.d.ts +8 -1
- package/lib/hit-proxy/hit-params-generals/hit-params-general.service.d.ts +0 -4
- package/package.json +1 -1
|
@@ -3,51 +3,14 @@ import * as i0 from "@angular/core";
|
|
|
3
3
|
export class HitSharedService {
|
|
4
4
|
constructor() {
|
|
5
5
|
this.apiName = 'eDonusum';
|
|
6
|
-
this.previewFile = (base64, fileName
|
|
6
|
+
this.previewFile = (base64, fileName) => {
|
|
7
7
|
const cleanBase64 = base64.includes(',') ? base64.split(',')[1] : base64;
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
<!doctype html>
|
|
15
|
-
<html>
|
|
16
|
-
<head>
|
|
17
|
-
<title>${fileName}</title>
|
|
18
|
-
<style>
|
|
19
|
-
* { margin: 0; padding: 0; box-sizing: border-box; }
|
|
20
|
-
body { display: flex; flex-direction: column; height: 100vh; font-family: sans-serif; }
|
|
21
|
-
.bar {
|
|
22
|
-
background: #1976d2; color: white;
|
|
23
|
-
padding: 6px 16px; display: flex;
|
|
24
|
-
align-items: center; justify-content: space-between;
|
|
25
|
-
flex-shrink: 0;
|
|
26
|
-
}
|
|
27
|
-
.bar span { font-size: 14px; }
|
|
28
|
-
.bar a {
|
|
29
|
-
color: white; text-decoration: none; font-size: 13px;
|
|
30
|
-
background: rgba(255,255,255,0.2); padding: 4px 14px;
|
|
31
|
-
border-radius: 4px; border: 1px solid rgba(255,255,255,0.4);
|
|
32
|
-
}
|
|
33
|
-
iframe { flex: 1; border: none; width: 100%; }
|
|
34
|
-
</style>
|
|
35
|
-
</head>
|
|
36
|
-
<body>
|
|
37
|
-
<div class="bar">
|
|
38
|
-
<span>📄 ${fileName}</span>
|
|
39
|
-
<a id="dlBtn" download="${fileName}">⬇ İndir</a>
|
|
40
|
-
</div>
|
|
41
|
-
<iframe id="previewFrame"></iframe>
|
|
42
|
-
<script>
|
|
43
|
-
const dataUrl = ${JSON.stringify(dataUrl)};
|
|
44
|
-
document.getElementById('previewFrame').src = dataUrl;
|
|
45
|
-
document.getElementById('dlBtn').href = dataUrl;
|
|
46
|
-
</script>
|
|
47
|
-
</body>
|
|
48
|
-
</html>
|
|
49
|
-
`);
|
|
50
|
-
win.document.close();
|
|
8
|
+
const bytes = Uint8Array.from(atob(cleanBase64), c => c.charCodeAt(0));
|
|
9
|
+
const file = new File([bytes], fileName || 'belge.pdf', { type: 'application/pdf' });
|
|
10
|
+
const url = URL.createObjectURL(file);
|
|
11
|
+
// Yeni tab (preview) - File nesnesi sayesinde download adı korunur
|
|
12
|
+
window.open(url, '_blank', 'noopener');
|
|
13
|
+
setTimeout(() => URL.revokeObjectURL(url), 60000);
|
|
51
14
|
};
|
|
52
15
|
}
|
|
53
16
|
}
|
|
@@ -59,4 +22,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
59
22
|
providedIn: 'root',
|
|
60
23
|
}]
|
|
61
24
|
}] });
|
|
62
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
25
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaGl0LXNoYXJlZC5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvZS1kb251c3VtL3NyYy9saWIvaGl0LXByb3h5L3NoYXJlZC9oaXQtc2hhcmVkLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBRUEsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLGV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