hayun-vite 0.0.2 → 0.1.0
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/assets/styles-test.css +90 -90
- package/assets/styles.css +90 -90
- package/data/formData1.js +42 -42
- package/data/officesObjStore.js +56 -56
- package/data/patientsObjStore.js +73 -73
- package/data/sampleData.js +94 -94
- package/index.js +11 -11
- package/package.json +1 -1
- package/src/Audiogram/Audiogram.js +194 -197
- package/src/Audiogram/dims.js +83 -83
- package/src/Form/Form.js +268 -276
- package/src/Form/Form_N.js +158 -158
- package/src/Form/Forms-Test.html +124 -124
- package/src/Form/Forms.js +121 -134
- package/src/Form/Header.js +91 -91
- package/src/Form/Reflex.js +141 -141
- package/src/Form/Sections.js +71 -71
- package/src/Form/Speech.js +132 -132
- package/src/Form/TextBox.js +66 -80
- package/src/Form/Tympanogram.js +355 -355
- package/src/Form/formStyles.css +122 -122
- package/src/Form/globalinfo.js +68 -68
- package/src/Form/grid/drawGrid.js +84 -84
- package/src/Form/grid/hideGrid.js +8 -8
- package/src/Form/printForm.js +122 -75
- package/src/Form/templates/combo.js +248 -248
- package/src/Form/templates/dims.js +204 -204
- package/src/Form/templates/rasaAud.js +287 -287
- package/src/Symbol/Symbols.js +29 -29
- package/src/Symbol/createSymbolSVG.js +240 -240
- package/src/Symbol/getAllSymbolsSVG.js +21 -21
- package/src/Symbol/insertSymbol.js +10 -10
- package/src/Symbol/symbolChart.js +47 -47
- package/src/common/putLine.js +16 -16
- package/src/common/putPoint.js +12 -12
- package/src/common/putRect.js +13 -13
- package/src/common/putText.js +17 -16
- package/src/common/putTopLayer.js +17 -17
- package/src/main.js +88 -87
- package/src/note.css +62 -0
- package/src/style.css +189 -156
- package/src/note.html +0 -1
package/src/Form/printForm.js
CHANGED
@@ -1,76 +1,123 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
hideFrame
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
1
|
+
// import '../style.css'
|
2
|
+
// import '../fonts/Vazirmatn-Regular.woff2'
|
3
|
+
|
4
|
+
|
5
|
+
export default function printForm({ container }) {
|
6
|
+
// const paperForm = document.getElementById(elementID);
|
7
|
+
const paperForm = container;
|
8
|
+
|
9
|
+
print(paperForm);
|
10
|
+
|
11
|
+
function print(paperForm) {
|
12
|
+
iframePrint(paperForm);
|
13
|
+
return new Date().toLocaleString("fa-IR");
|
14
|
+
}
|
15
|
+
|
16
|
+
function iframePrint(paperForm) {
|
17
|
+
const hideFrame = document.createElement("iframe");
|
18
|
+
let printDateTime;
|
19
|
+
hideFrame.onload = setPrint;
|
20
|
+
hideFrame.style.display = "block"; // hide iframe
|
21
|
+
|
22
|
+
let style = `
|
23
|
+
@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@100..900&display=swap');
|
24
|
+
|
25
|
+
@page {
|
26
|
+
|
27
|
+
size: a4;
|
28
|
+
margin: 0;
|
29
|
+
padding: 0;
|
30
|
+
break-inside: avoid;
|
31
|
+
height: 100%;
|
32
|
+
}
|
33
|
+
|
34
|
+
@media print {
|
35
|
+
|
36
|
+
header,
|
37
|
+
footer {
|
38
|
+
display: none;
|
39
|
+
}
|
40
|
+
|
41
|
+
button {
|
42
|
+
display: none !important;
|
43
|
+
}
|
44
|
+
|
45
|
+
svg {
|
46
|
+
margin: 0;
|
47
|
+
padding: 0;
|
48
|
+
break-inside: avoid;
|
49
|
+
}
|
50
|
+
|
51
|
+
body {
|
52
|
+
margin: 0;
|
53
|
+
padding: 0;
|
54
|
+
break-inside: avoid;
|
55
|
+
}
|
56
|
+
|
57
|
+
html {
|
58
|
+
margin: 0;
|
59
|
+
padding: 0;
|
60
|
+
break-inside: avoid;
|
61
|
+
}
|
62
|
+
|
63
|
+
}
|
64
|
+
|
65
|
+
.text-box {
|
66
|
+
font-size: 0.8mm;
|
67
|
+
direction: rtl !important;
|
68
|
+
user-select: none;
|
69
|
+
}
|
70
|
+
|
71
|
+
.persian {
|
72
|
+
font-family: "Vazirmatn";
|
73
|
+
|
74
|
+
font-weight: 200;
|
75
|
+
font-style: normal;
|
76
|
+
font-size: 0.8mm;
|
77
|
+
|
78
|
+
}
|
79
|
+
|
80
|
+
.align {
|
81
|
+
text-anchor: start;
|
82
|
+
}
|
83
|
+
|
84
|
+
.bold {
|
85
|
+
font-weight: bold;
|
86
|
+
}
|
87
|
+
|
88
|
+
`;
|
89
|
+
hideFrame.srcdoc = `
|
90
|
+
<!DOCTYPE html>
|
91
|
+
<html lang="en">
|
92
|
+
|
93
|
+
<head>
|
94
|
+
<meta charset="UTF-8">
|
95
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
96
|
+
<title></title>
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
<style>${style}</style>
|
101
|
+
</head>
|
102
|
+
|
103
|
+
<body>${paperForm.outerHTML}</body>
|
104
|
+
|
105
|
+
<script type="module">
|
106
|
+
console.log('fdfd')
|
107
|
+
</script>
|
108
|
+
|
109
|
+
</html>
|
110
|
+
`;
|
111
|
+
document.body.appendChild(hideFrame);
|
112
|
+
|
113
|
+
return 1;
|
114
|
+
function setPrint() {
|
115
|
+
const closePrint = () => { document.body.removeChild(this); };
|
116
|
+
this.contentWindow.onbeforeunload = () => closePrint();
|
117
|
+
this.contentWindow.onafterprint = () => {
|
118
|
+
closePrint();
|
119
|
+
}
|
120
|
+
this.contentWindow.print();
|
121
|
+
}
|
122
|
+
}
|
76
123
|
}
|