hayun-vite 0.6.2 → 0.7.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/package.json
CHANGED
package/src/Form/Form.js
CHANGED
@@ -20,16 +20,19 @@ export default class Form {
|
|
20
20
|
this.form.style.display = 'none';
|
21
21
|
// رسم مارجین های فرم
|
22
22
|
this.drawMarginLines({ container: this.form, width, height });
|
23
|
-
|
23
|
+
|
24
24
|
const sections = new Sections({ container: this.form, dims: template });
|
25
25
|
this.sections = sections;
|
26
|
-
|
26
|
+
|
27
|
+
|
27
28
|
if (sections.header) {
|
28
29
|
this.header = new Header({ container: sections.header })
|
29
30
|
this.header.draw({ dims: template.header });
|
30
31
|
}
|
31
32
|
|
32
33
|
if (sections.patient) {
|
34
|
+
// (template.label === 'تمپانومتری رسا') && console.log(template.patient);
|
35
|
+
|
33
36
|
this.patient = new TextBox({ container: sections.patient });
|
34
37
|
this.patient.draw({ dims: template.patient });
|
35
38
|
}
|
package/src/Form/Reflex.js
CHANGED
@@ -36,7 +36,7 @@ export default class Reflex {
|
|
36
36
|
direction: ltr !important;
|
37
37
|
/* text-align: center; */
|
38
38
|
font-family: Arial, Helvetica, sans-serif !important;
|
39
|
-
font-size: 0.
|
39
|
+
font-size: 0.9mm;
|
40
40
|
font-weight: bold;
|
41
41
|
text-anchor: middle; /*تراز افقی*/
|
42
42
|
dominant-baseline: middle; /* تراز عمودی*/
|
@@ -56,7 +56,7 @@ export default class Reflex {
|
|
56
56
|
direction: ltr !important;
|
57
57
|
/* text-align: center; */
|
58
58
|
font-family: Arial, Helvetica, sans-serif !important;
|
59
|
-
font-size: 0.
|
59
|
+
font-size: 0.9mm;
|
60
60
|
font-weight: bold;
|
61
61
|
text-anchor: end; /*تراز افقی*/
|
62
62
|
dominant-baseline: middle; /* تراز عمودی*/
|
@@ -84,7 +84,7 @@ export default class Reflex {
|
|
84
84
|
direction: ltr !important;
|
85
85
|
/* text-align: center; */
|
86
86
|
font-family: Arial, Helvetica, sans-serif !important;
|
87
|
-
font-size:
|
87
|
+
font-size: 1mm;
|
88
88
|
text-anchor: middle; /*تراز افقی*/
|
89
89
|
dominant-baseline: middle; /* تراز عمودی*/
|
90
90
|
`;
|
package/src/Form/TextBox.js
CHANGED
@@ -18,13 +18,22 @@ export default class TextBox {
|
|
18
18
|
let y = dims.margin.top;
|
19
19
|
|
20
20
|
let style, className;
|
21
|
+
style = `
|
22
|
+
/* font-family: Arial, Helvetica, sans-serif !important; */
|
23
|
+
font-size: 1mm;
|
24
|
+
/* font-weight: bold; */
|
25
|
+
direction: rtl !important;
|
26
|
+
user-select: none;
|
27
|
+
/* dominant-baseline: middle; /* تراز عمودی*/
|
28
|
+
`;
|
21
29
|
// بوردر کل چارت
|
22
30
|
const svg = document.createElementNS(svgNS, "svg");
|
23
31
|
svg.setAttribute("x", x);
|
24
32
|
svg.setAttribute("y", y);
|
25
33
|
svg.setAttribute("width", width);
|
26
34
|
svg.setAttribute("height", height);
|
27
|
-
svg.setAttribute('
|
35
|
+
svg.setAttribute('style', style)
|
36
|
+
// svg.setAttribute('class', 'text-box')
|
28
37
|
|
29
38
|
// اگر مقدار استروک درست بود لیبل ها را چاپ کن
|
30
39
|
if (!dims.hideContext) {
|
package/src/Form/Tympanogram.js
CHANGED
@@ -104,27 +104,27 @@ export default class Tympanogram {
|
|
104
104
|
direction: ltr !important;
|
105
105
|
/* text-align: center; */
|
106
106
|
font-family: Arial, Helvetica, sans-serif !important;
|
107
|
-
font-size:
|
107
|
+
font-size: 1mm;
|
108
108
|
text-anchor: start; /*تراز افقی*/
|
109
109
|
dominant-baseline: middle; /* تراز عمودی*/
|
110
110
|
`;
|
111
111
|
let color = (this.side === 'R') ? 'red' : 'blue';
|
112
112
|
|
113
113
|
putText({
|
114
|
-
container: svg, value: "ECV
|
114
|
+
container: svg, value: "ECV:", style: style,
|
115
115
|
x: getX(pressure.min), y: getY(compliance.min), dy: 10
|
116
116
|
});
|
117
117
|
putText({
|
118
118
|
container: svg, value: "", style: style + 'fill: ' + color, name: 'ECV',
|
119
|
-
x: getX(pressure.min), y: getY(compliance.min), dy: 10, dx:
|
119
|
+
x: getX(pressure.min), y: getY(compliance.min), dy: 10, dx: 11
|
120
120
|
});
|
121
121
|
putText({
|
122
|
-
container: svg, value: "MEP
|
122
|
+
container: svg, value: "MEP:", style: style,
|
123
123
|
x: getX(-300), y: getY(compliance.min), dy: 10
|
124
124
|
});
|
125
125
|
putText({
|
126
126
|
container: svg, value: "", style: style + 'fill: ' + color, name: 'MEP',
|
127
|
-
x: getX(-300), y: getY(compliance.min), dy: 10, dx:
|
127
|
+
x: getX(-300), y: getY(compliance.min), dy: 10, dx: 11
|
128
128
|
});
|
129
129
|
putText({
|
130
130
|
container: svg, value: "SC:", style: style,
|
@@ -132,11 +132,11 @@ export default class Tympanogram {
|
|
132
132
|
});
|
133
133
|
putText({
|
134
134
|
container: svg, value: "", style: style + 'fill: ' + color, name: 'SC',
|
135
|
-
x: getX(0), y: getY(compliance.min), dy: 10, dx:
|
135
|
+
x: getX(0), y: getY(compliance.min), dy: 10, dx: 8
|
136
136
|
});
|
137
137
|
putText({
|
138
138
|
container: svg, value: "G:", style: style,
|
139
|
-
x: getX(
|
139
|
+
x: getX(280), y: getY(compliance.min), dy: 10
|
140
140
|
});
|
141
141
|
putText({
|
142
142
|
container: svg, value: "", style: style + 'fill: ' + color, name: 'G',
|
@@ -247,7 +247,6 @@ export default class Tympanogram {
|
|
247
247
|
}
|
248
248
|
|
249
249
|
update(data) {
|
250
|
-
console.log(data);
|
251
250
|
|
252
251
|
// جایگذاری مقادیر تمپانومتری در تکستباکس ها
|
253
252
|
this.chart.querySelector(`text[data-name="Type"]`).innerHTML = data?.Type || "";
|
@@ -1,8 +1,7 @@
|
|
1
|
-
import audDims from "../../Audiogram/dims.js"
|
2
1
|
import image from './rasa_tymp_reflex.jpg'
|
3
2
|
|
4
3
|
const rasaTymp = {
|
5
|
-
name: '
|
4
|
+
name: 'rasa_tymp_reflex',
|
6
5
|
label: 'تمپانومتری رسا',
|
7
6
|
backgroundImage: image, // Just Path of image
|
8
7
|
margin: { left: 0, top: 0, right: 0, bottom: 0 },
|
@@ -104,15 +103,17 @@ const rasaTymp = {
|
|
104
103
|
this.patient.elements = [
|
105
104
|
{ type: 'line', x1: 0, y1: 20, x2: width, y2: 20 },
|
106
105
|
{ type: 'text', x: width, y: 5, value: 'نام:' },
|
107
|
-
{ type: 'text', x: width -
|
108
|
-
{ type: 'text', x: width -
|
109
|
-
{ type: 'text', x: width -
|
106
|
+
{ type: 'text', x: width - 37, y: 5, value: 'نام خانوادگی:' },
|
107
|
+
{ type: 'text', x: width - 84, y: 5, value: 'سن:' },
|
108
|
+
{ type: 'text', x: width - 120, y: 5, value: 'ارجاع از:' },
|
109
|
+
{ type: 'text', x: width - 170, y: 5, value: 'تاریخ:' }
|
110
110
|
]
|
111
111
|
this.patient.inputs = [
|
112
|
-
{ name: 'name', x: width -
|
113
|
-
{ name: 'lastName', x: width -
|
114
|
-
{ name: 'age', x: width -
|
115
|
-
{ name: 'referrer', x: width -
|
112
|
+
{ name: 'name', x: width - 6, y: 5 },
|
113
|
+
{ name: 'lastName', x: width - 57, y: 5 },
|
114
|
+
{ name: 'age', x: width - 91, y: 5 },
|
115
|
+
{ name: 'referrer', x: width - 132, y: 5 },
|
116
|
+
{ name: 'date', x: width - 180, y: 5 }
|
116
117
|
]
|
117
118
|
this.patient.forceInputs = [
|
118
119
|
{ name: 'name', x: width - 10, y: 4 },
|