hayun-vite 0.10.0 → 0.11.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/data/sampleData.js +10 -2
- package/assets/templates/mainTemplate.js +128 -0
- package/assets/templates/template_combo.js +50 -45
- package/package.json +1 -1
- package/public/fonts/Vazir-Black-UI.eot +0 -0
- package/public/fonts/Vazir-Black-UI.woff +0 -0
- package/public/fonts/Vazir-Black-UI.woff2 +0 -0
- package/public/fonts/Vazir-Bold-UI.eot +0 -0
- package/public/fonts/Vazir-Bold-UI.woff +0 -0
- package/public/fonts/Vazir-Bold-UI.woff2 +0 -0
- package/public/fonts/Vazir-Light-UI.eot +0 -0
- package/public/fonts/Vazir-Light-UI.woff +0 -0
- package/public/fonts/Vazir-Light-UI.woff2 +0 -0
- package/public/fonts/Vazir-Medium-UI.eot +0 -0
- package/public/fonts/Vazir-Medium-UI.woff +0 -0
- package/public/fonts/Vazir-Medium-UI.woff2 +0 -0
- package/public/fonts/Vazir-Regular-UI.eot +0 -0
- package/public/fonts/Vazir-Regular-UI.woff +0 -0
- package/public/fonts/Vazir-Regular-UI.woff2 +0 -0
- package/public/fonts/Vazir-Thin-UI.eot +0 -0
- package/public/fonts/Vazir-Thin-UI.woff +0 -0
- package/public/fonts/Vazir-Thin-UI.woff2 +0 -0
- package/src/Audiogram/Audiogram.js +43 -21
- package/src/Audiogram/Audiogram_100.js +499 -0
- package/src/Audiogram/Audiogram_box.js +483 -0
- package/src/Audiogram/dims.js +4 -80
- package/src/Audiogram/dims_100.js +51 -0
- package/src/Audiogram/dims_box.js +125 -0
- package/src/{Form → Box}/Box.js +26 -3
- package/src/Form/Form.js +8 -8
- package/src/Form/Form_N.js +194 -0
- package/src/Form/Forms.js +0 -2
- package/src/Form/Sections.js +0 -6
- package/src/Form/Sections_N.js +66 -0
- package/src/Form/printForm.js +57 -5
- package/src/{Form → Header}/Header.js +2 -5
- package/src/Header/Header_N.js +72 -0
- package/src/MultiText/MultiText.js +37 -0
- package/src/{Form/Reflex_N.js → Reflex/Reflex.js} +15 -3
- package/src/Reflex/units.js +65 -0
- package/src/{Form/Speech_N.js → Speech/Speech.js} +45 -28
- package/src/Speech/Speech_N.js +125 -0
- package/src/Speech/units.js +31 -0
- package/src/{Form → Tympanogram}/Tympanogram.js +37 -68
- package/src/Tympanogram/units.js +76 -0
- package/src/common/{putTextBox.js → putCell.js} +6 -6
- package/src/common/putG.js +10 -0
- package/src/common/putLine.js +1 -1
- package/src/common/putText.js +5 -4
- package/src/main.js +140 -19
- package/src/styles.css +63 -3
- package/assets/fonts/Vazirmatn-Regular.woff2 +0 -0
- package/assets/styles-test.css +0 -90
- package/assets/styles.css +0 -90
- package/src/Form/Reflex.js +0 -145
- package/src/Form/Speech.js +0 -121
- package/src/Form/formStyles.css +0 -117
- package/src/Form/globalinfo.js +0 -68
- package/src/note.html +0 -64
@@ -1,5 +1,7 @@
|
|
1
1
|
import putRect from "../common/putRect.js";
|
2
|
+
import putSVG from "../common/putSVG.js";
|
2
3
|
import putText from "../common/putText.js";
|
4
|
+
import units from "./units.js";
|
3
5
|
const svgNS = "http://www.w3.org/2000/svg";
|
4
6
|
|
5
7
|
export default class Tympanogram {
|
@@ -16,23 +18,23 @@ export default class Tympanogram {
|
|
16
18
|
let height = dims.height;
|
17
19
|
let x = dims.margin.left;
|
18
20
|
let y = dims.margin.top;
|
19
|
-
|
21
|
+
let style;
|
20
22
|
|
21
23
|
const { pressure, compliance, padding } = {
|
22
24
|
pressure: this.pressure,
|
23
25
|
compliance: this.compliance,
|
24
26
|
padding: this.padding,
|
27
|
+
}
|
25
28
|
|
26
|
-
};
|
27
|
-
const svg = document.createElementNS(svgNS, "svg");
|
28
|
-
svg.setAttribute("data-name", "R_Tymp");
|
29
|
-
svg.setAttribute("width", width);
|
30
|
-
svg.setAttribute("height", height);
|
31
|
-
svg.setAttribute("x", x);
|
32
|
-
svg.setAttribute("y", y);
|
33
|
-
svg.setAttribute("viewBox", [-padding.left, -padding.top, width, height]);
|
34
|
-
|
29
|
+
let { styles, vbWidth, vbHeight } = units;
|
35
30
|
|
31
|
+
// کل چارت
|
32
|
+
vbHeight = (vbWidth * height) / width // متناسب سازی ارتفاع ویباکس با پهنا و ارتفاع ورودی
|
33
|
+
const viewBox = [-padding.left, -padding.top, vbWidth, vbHeight].join(' ');
|
34
|
+
const svg = putSVG({ x, y, width, height, viewBox })
|
35
|
+
// این خط شد دو خط کد طلایی که مشکل سایز فونت در دیسپلی و کاغذ رو حل کرد
|
36
|
+
width = vbWidth; // ثابت میماند همیشه
|
37
|
+
height = vbHeight // با نسبت پهنا و ارتفاع ورودی تغییر میکند
|
36
38
|
|
37
39
|
const pressureAxiosLength = {
|
38
40
|
dapa: pressure.max - pressure.min,
|
@@ -44,17 +46,16 @@ export default class Tympanogram {
|
|
44
46
|
mm: height - padding.top - padding.bottom
|
45
47
|
}
|
46
48
|
|
47
|
-
this.chartInfo = { pressure, compliance, padding, pressureAxiosLength, complianceAxiosLength }
|
49
|
+
this.chartInfo = { pressure, compliance, padding, pressureAxiosLength, complianceAxiosLength }
|
48
50
|
|
49
51
|
// point({ this.container: svg, x: getX(pressure.min), y: getY(compliance.max), color: 'red' });
|
50
52
|
// point({ this.container: svg, x: getX(pressure.max), y: getY(compliance.min), color: 'green' });
|
51
53
|
// point({ this.container: svg, x: getX(pressure.min), y: getY(compliance.min), color: 'brown' });
|
52
|
-
let style;
|
53
54
|
// Pressure Axios (Horizontal)
|
54
55
|
style = `
|
55
56
|
stroke-width: 0.15mm;
|
56
57
|
stroke: black;
|
57
|
-
|
58
|
+
`;
|
58
59
|
putLine({
|
59
60
|
x1: getX(pressure.min), y1: getY(compliance.min),
|
60
61
|
x2: getX(pressure.max), y2: getY(compliance.min), style: style
|
@@ -70,109 +71,87 @@ export default class Tympanogram {
|
|
70
71
|
stroke: black;
|
71
72
|
stroke-dasharray: 0.4;
|
72
73
|
stroke-opacity: 0.5;
|
73
|
-
|
74
|
+
`;
|
74
75
|
putLine({
|
75
76
|
x1: getX(0), y1: getY(compliance.min),
|
76
77
|
x2: getX(0), y2: getY(compliance.max), style: style
|
77
|
-
})
|
78
|
+
});
|
79
|
+
|
78
80
|
// Compliance Zero Line
|
79
81
|
putLine({
|
80
82
|
x1: getX(pressure.min), y1: getY(0),
|
81
83
|
x2: getX(pressure.max), y2: getY(0), style: style
|
82
|
-
})
|
84
|
+
});
|
83
85
|
|
84
86
|
// Captions:
|
85
|
-
style =
|
86
|
-
|
87
|
-
direction: ltr !important;
|
88
|
-
/* text-align: center; */
|
89
|
-
font-family: Arial, Helvetica, sans-serif !important;
|
90
|
-
font-size: 0.8mm;
|
91
|
-
text-anchor: middle; /*تراز افقی*/
|
92
|
-
dominant-baseline: middle; /* تراز عمودی*/
|
93
|
-
`;
|
87
|
+
style = styles.caption;
|
88
|
+
|
94
89
|
putText({
|
95
|
-
container: svg, value: "Compliance (ml)", style
|
90
|
+
container: svg, value: "Compliance (ml)", style,
|
96
91
|
x: getX(pressure.min), y: getY(compliance.max), dx: 5, dy: -3
|
97
92
|
});
|
93
|
+
|
98
94
|
putText({
|
99
95
|
container: svg, value: "Pressure (dapa)", style: style,
|
100
96
|
x: getX(pressure.max), y: getY(compliance.min), dx: -8, dy: 6,
|
101
97
|
});
|
102
|
-
|
103
|
-
|
104
|
-
direction: ltr !important;
|
105
|
-
/* text-align: center; */
|
106
|
-
font-family: Arial, Helvetica, sans-serif !important;
|
107
|
-
font-size: 1mm;
|
108
|
-
text-anchor: start; /*تراز افقی*/
|
109
|
-
dominant-baseline: middle; /* تراز عمودی*/
|
110
|
-
`;
|
98
|
+
|
99
|
+
style = styles.label;
|
111
100
|
let color = (this.side === 'R') ? 'red' : 'blue';
|
112
101
|
|
113
102
|
putText({
|
114
103
|
container: svg, value: "ECV:", style: style,
|
115
104
|
x: getX(pressure.min), y: getY(compliance.min), dy: 10
|
116
105
|
});
|
106
|
+
|
117
107
|
putText({
|
118
108
|
container: svg, value: "", style: style + 'fill: ' + color, name: 'ECV',
|
119
109
|
x: getX(pressure.min), y: getY(compliance.min), dy: 10, dx: 11
|
120
110
|
});
|
111
|
+
|
121
112
|
putText({
|
122
113
|
container: svg, value: "MEP:", style: style,
|
123
114
|
x: getX(-300), y: getY(compliance.min), dy: 10
|
124
115
|
});
|
116
|
+
|
125
117
|
putText({
|
126
118
|
container: svg, value: "", style: style + 'fill: ' + color, name: 'MEP',
|
127
119
|
x: getX(-300), y: getY(compliance.min), dy: 10, dx: 11
|
128
120
|
});
|
121
|
+
|
129
122
|
putText({
|
130
123
|
container: svg, value: "SC:", style: style,
|
131
124
|
x: getX(0), y: getY(compliance.min), dy: 10
|
132
125
|
});
|
126
|
+
|
133
127
|
putText({
|
134
128
|
container: svg, value: "", style: style + 'fill: ' + color, name: 'SC',
|
135
129
|
x: getX(0), y: getY(compliance.min), dy: 10, dx: 8
|
136
130
|
});
|
131
|
+
|
137
132
|
putText({
|
138
133
|
container: svg, value: "G:", style: style,
|
139
134
|
x: getX(280), y: getY(compliance.min), dy: 10
|
140
135
|
});
|
136
|
+
|
141
137
|
putText({
|
142
138
|
container: svg, value: "", style: style + 'fill: ' + color, name: 'G',
|
143
139
|
x: getX(300), y: getY(compliance.min), dy: 10, dx: 4
|
144
140
|
});
|
145
141
|
|
146
|
-
style =
|
147
|
-
user-select: none;
|
148
|
-
direction: ltr !important;
|
149
|
-
/* text-align: center; */
|
150
|
-
font-family: Arial, Helvetica, sans-serif !important;
|
151
|
-
font-size: 1mm;
|
152
|
-
font-weight: bold;
|
153
|
-
text-anchor: start; /*تراز افقی*/
|
154
|
-
dominant-baseline: middle; /* تراز عمودی*/
|
155
|
-
`;
|
142
|
+
style = styles.type;
|
156
143
|
putText({
|
157
144
|
container: svg, value: "Type", style: style + 'fill: ' + color,
|
158
145
|
x: getX(-500), y: getY(2.5),
|
159
146
|
});
|
147
|
+
|
160
148
|
putText({
|
161
149
|
container: svg, value: "", style: style + 'fill: ' + color, name: 'Type',
|
162
150
|
x: getX(-500), y: getY(2.5), dx: 9
|
163
151
|
});
|
164
152
|
|
165
153
|
// Compliance Axios digits
|
166
|
-
style =
|
167
|
-
user-select: none;
|
168
|
-
direction: ltr !important;
|
169
|
-
/* text-align: center; */
|
170
|
-
font-family: Arial, Helvetica, sans-serif !important;
|
171
|
-
font-size: 0.7mm;
|
172
|
-
text-anchor: end; /*تراز افقی*/
|
173
|
-
dominant-baseline: middle; /* تراز عمودی*/
|
174
|
-
|
175
|
-
`;
|
154
|
+
style = styles.compliance;
|
176
155
|
x = getX(pressure.min);
|
177
156
|
for (let c = compliance.min + compliance.step; c <= compliance.max; c += compliance.step) {
|
178
157
|
c = Math.round(c * 10) / 10 // برای اون پدیده اعشاری غیرمنتظر
|
@@ -184,22 +163,13 @@ export default class Tympanogram {
|
|
184
163
|
}
|
185
164
|
|
186
165
|
// Pressure Axios digits
|
187
|
-
style =
|
188
|
-
user-select: none;
|
189
|
-
direction: ltr !important;
|
190
|
-
/* text-align: center; */
|
191
|
-
font-family: Arial, Helvetica, sans-serif !important;
|
192
|
-
font-size: 0.7mm;
|
193
|
-
text-anchor: middle; /*تراز افقی*/
|
194
|
-
dominant-baseline: hanging; /* تراز عمودی*/
|
195
|
-
`;
|
166
|
+
style = styles.pressure;
|
196
167
|
for (let p = pressure.min; p <= pressure.max; p += pressure.step) {
|
197
168
|
putText({
|
198
169
|
container: svg, value: p,
|
199
170
|
x: getX(p), y: getY(compliance.min), dy: 1,
|
200
|
-
style
|
171
|
+
style,
|
201
172
|
});
|
202
|
-
|
203
173
|
}
|
204
174
|
|
205
175
|
// console.log(this.container);
|
@@ -258,7 +228,6 @@ export default class Tympanogram {
|
|
258
228
|
this.chart.querySelector(`path[data-name="curve"]`)?.remove();
|
259
229
|
// رسم منحنی
|
260
230
|
this.drawCurve(data);
|
261
|
-
|
262
231
|
}
|
263
232
|
|
264
233
|
// توابع داخلی
|
@@ -274,7 +243,7 @@ export default class Tympanogram {
|
|
274
243
|
// data.SC = 0.5;
|
275
244
|
// data.MEP = -75;
|
276
245
|
// با توجه به اندازه اس سی میشه برای مقادیر زیر یک سری رل گذاشت با منحنی قشنگ تر باشد
|
277
|
-
let cp =
|
246
|
+
let cp = 70; // جابجایی نقطه کنترل منحنی های راست و چپ روی محور افقی
|
278
247
|
// let k = 0.5; // width and height change [0, 1]
|
279
248
|
let cpp = 5; //جابجایی نقطه کنترل قله ها روی محور افقی
|
280
249
|
// رلهایی برای تغییر مقادیر بالا برای زیبایی بیشتر منحنی در نقطه قله
|
@@ -0,0 +1,76 @@
|
|
1
|
+
const units = {
|
2
|
+
name: 'Tympanogram',
|
3
|
+
margin: { left: 0, top: 0, }, // در کانتینر دیو این عمل نمیکنه. مگر در کانتینر اس وی جی بذاریم
|
4
|
+
|
5
|
+
// واحد ویوباکس - بدون واحد
|
6
|
+
vbWidth: 100, // برای اینکه ضخامت خطوط تغییری ناهنجار نکند این ثابت میماند
|
7
|
+
vbHeight: 60, // این به نسبت تغییر میکند
|
8
|
+
|
9
|
+
// واحد پیکسل، میلیمتر، ...
|
10
|
+
// اگر واحد پایینی توسط بیرون تغییر کرد واحدهای بالایی باید با نسبت پایینی تغییر کنند
|
11
|
+
width: 100,
|
12
|
+
height: 60,
|
13
|
+
|
14
|
+
// این فاصله خطوط محورهای بالا و چپ ادیوگرام از لبه ها هست
|
15
|
+
chartPadding: { left: 40, top: 40, right: 30, bottom: 20 },
|
16
|
+
symbolDims: { width: 55, height: 55 },
|
17
|
+
symbolsChart: {
|
18
|
+
width: 240, height: 60
|
19
|
+
},
|
20
|
+
// virtual frequency
|
21
|
+
mainFrequencies: [125, 250, 500, 1000, 2000, 4000, 8000],
|
22
|
+
|
23
|
+
intensity: { min: -20, max: 130, step: 10 },
|
24
|
+
|
25
|
+
styles: {
|
26
|
+
pressure: `
|
27
|
+
user-select: none;
|
28
|
+
direction: ltr !important;
|
29
|
+
font-family: Vazir;
|
30
|
+
font-size: 3;
|
31
|
+
text-anchor: middle;
|
32
|
+
dominant-baseline: hanging;
|
33
|
+
`,
|
34
|
+
caption: `
|
35
|
+
user-select: none;
|
36
|
+
direction: ltr !important;
|
37
|
+
font-family: Vazir;
|
38
|
+
font-size: 3;
|
39
|
+
text-anchor: middle;
|
40
|
+
dominant-baseline: middle;
|
41
|
+
`,
|
42
|
+
label: `
|
43
|
+
user-select: none;
|
44
|
+
direction: ltr !important;
|
45
|
+
font-family: Vazir;
|
46
|
+
font-size: 1mm;
|
47
|
+
text-anchor: start;
|
48
|
+
dominant-baseline: middle;
|
49
|
+
`,
|
50
|
+
type: `
|
51
|
+
user-select: none;
|
52
|
+
direction: ltr !important;
|
53
|
+
font-family: Vazir;
|
54
|
+
font-size: 1mm;
|
55
|
+
font-weight: bold;
|
56
|
+
text-anchor: start;
|
57
|
+
dominant-baseline: middle;
|
58
|
+
`,
|
59
|
+
compliance: `
|
60
|
+
user-select: none;
|
61
|
+
direction: ltr !important;
|
62
|
+
font-family: Vazir;
|
63
|
+
font-size: 0.7mm;
|
64
|
+
text-anchor: end;
|
65
|
+
dominant-baseline: middle;
|
66
|
+
`,
|
67
|
+
mainFreqline: `stroke: black; stroke-width: 1;`,
|
68
|
+
semiOctavFreqline: `stroke: black; stroke-width: 1; stroke-dasharray: 4;`,
|
69
|
+
boldLine: 'stroke: black; stroke-width: 3;',
|
70
|
+
|
71
|
+
juncDashLine: `stroke-width: 1 ; stroke-opacity: 0.8; stroke-dasharray: 4;`,
|
72
|
+
juncLine: `stroke-width: 1; stroke-opacity: 0.8;`,
|
73
|
+
},
|
74
|
+
}
|
75
|
+
|
76
|
+
export default units;
|
@@ -1,17 +1,17 @@
|
|
1
1
|
const svgNS = "http://www.w3.org/2000/svg";
|
2
2
|
|
3
|
-
export default function
|
3
|
+
export default function putCell(
|
4
4
|
{
|
5
|
-
container, x, y, dx = 0, dy= 0 ,
|
5
|
+
container, x, y, dx = 0, dy= 0 , width, height, rx,
|
6
6
|
style = "fill: transparent; stroke: black; stroke-width: 0.2;",
|
7
7
|
}) {
|
8
8
|
let rect = document.createElementNS(svgNS, "rect");
|
9
|
-
rect.setAttribute("x", x -
|
10
|
-
rect.setAttribute("y", y -
|
9
|
+
rect.setAttribute("x", x - width / 2 + dx);
|
10
|
+
rect.setAttribute("y", y - height / 2 + dy);
|
11
11
|
rect.setAttribute("rx", rx);
|
12
12
|
|
13
|
-
rect.setAttribute("width",
|
14
|
-
rect.setAttribute("height",
|
13
|
+
rect.setAttribute("width", width);
|
14
|
+
rect.setAttribute("height", height);
|
15
15
|
rect.setAttribute("style", style);
|
16
16
|
container.appendChild(rect);
|
17
17
|
|
@@ -0,0 +1,10 @@
|
|
1
|
+
const svgNS = "http://www.w3.org/2000/svg";
|
2
|
+
|
3
|
+
export default function putG({ container, viewBox, className, style }) {
|
4
|
+
const svg = document.createElementNS(svgNS, "g");
|
5
|
+
viewBox && svg.setAttribute("viewBox", viewBox);
|
6
|
+
style && svg.setAttribute("style", style);
|
7
|
+
className && svg.setAttribute("class", className);
|
8
|
+
container && container.appendChild(svg);
|
9
|
+
return svg;
|
10
|
+
}
|
package/src/common/putLine.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
// تابع رسم خط
|
2
2
|
const svgNS = "http://www.w3.org/2000/svg";
|
3
3
|
|
4
|
-
export default function putLine({ container, x1, y1, x2, y2, style = 'stroke: black; stroke-width: 0.
|
4
|
+
export default function putLine({ container, x1, y1, x2, y2, style = 'stroke: black; stroke-width: 0.3;', name }) {
|
5
5
|
|
6
6
|
let line = document.createElementNS(svgNS, "line");
|
7
7
|
line.setAttribute("x1", x1);
|
package/src/common/putText.js
CHANGED
@@ -3,16 +3,17 @@ const svgNS = "http://www.w3.org/2000/svg";
|
|
3
3
|
// متن اسویجی
|
4
4
|
export default function putText(
|
5
5
|
{ container, value = '', x, y, id, dx = 0, dy = 0, style, name, className }) {
|
6
|
+
|
6
7
|
let text = document.createElementNS(svgNS, "text");
|
7
8
|
name && text.setAttribute("data-name", name)
|
8
9
|
className && text.setAttribute("class", className);
|
9
10
|
style && text.setAttribute("style", style);
|
10
|
-
// text.setAttribute("dominant-baseline", "middle"); // تراز عمودی
|
11
|
-
// text.setAttribute("fill", color);
|
12
11
|
text.setAttribute("x", x + dx);
|
13
12
|
text.setAttribute("y", y + dy);
|
14
|
-
|
15
|
-
text.innerHTML = value;
|
13
|
+
text.textContent = value;
|
16
14
|
container.appendChild(text);
|
17
15
|
return text;
|
18
16
|
}
|
17
|
+
|
18
|
+
|
19
|
+
|
package/src/main.js
CHANGED
@@ -2,37 +2,157 @@
|
|
2
2
|
import Audiogram from "./Audiogram/Audiogram.js"
|
3
3
|
import Forms from "./Form/Forms.js";
|
4
4
|
import { officeData, patientData } from "../assets/data/sampleData.js"
|
5
|
-
import
|
5
|
+
import template from "../assets/templates/template_combo.js";
|
6
|
+
import Tympanogram from "./Tympanogram/Tympanogram.js";
|
7
|
+
import Speech from "./Speech/Speech.js";
|
8
|
+
import Reflex from "./Reflex/Reflex.js";
|
9
|
+
import Box from "./Box/Box.js";
|
6
10
|
|
7
11
|
|
8
12
|
document.querySelector('#app').innerHTML = `
|
13
|
+
<div id="test"></div>
|
9
14
|
<div id="audiogram-div"></div>
|
10
15
|
<div id="forms-div"></div>
|
11
16
|
`;
|
12
17
|
|
13
|
-
const
|
18
|
+
const container = document.getElementById('test')
|
19
|
+
|
20
|
+
let dims = {
|
21
|
+
"name": "RSpeech",
|
22
|
+
"w": 100,
|
23
|
+
"h": 15,
|
24
|
+
"margin": {
|
25
|
+
"left": 2,
|
26
|
+
"top": 0,
|
27
|
+
"right": 12,
|
28
|
+
"bottom": 0
|
29
|
+
},
|
30
|
+
"display": "inline",
|
31
|
+
"stroke": true,
|
32
|
+
"width": 100 * 6,
|
33
|
+
"height": 20 * 6,
|
34
|
+
"labels": [
|
35
|
+
"SAT",
|
36
|
+
"SRT",
|
37
|
+
"MCL",
|
38
|
+
"UCL",
|
39
|
+
"SDS"
|
40
|
+
]
|
41
|
+
}
|
42
|
+
|
43
|
+
const RSpeech = new Speech({ container, side: 'R' })
|
44
|
+
RSpeech.draw({ dims })
|
45
|
+
RSpeech.update({ MCL: '55', SAT: '25', SDS: '98', UCL: '120', SRT: '30' })
|
46
|
+
|
47
|
+
dims = {
|
48
|
+
"name": "RTympanogram",
|
49
|
+
"w": 100,
|
50
|
+
"h": 60,
|
51
|
+
"margin": {
|
52
|
+
"left": 2,
|
53
|
+
"top": 0,
|
54
|
+
"right": 2,
|
55
|
+
"bottom": 0
|
56
|
+
},
|
57
|
+
"display": "inline",
|
58
|
+
"width": 100 * 6,
|
59
|
+
"height": 60 * 6
|
60
|
+
}
|
61
|
+
|
62
|
+
const RTympanogram = new Tympanogram({ container, side: 'R' })
|
63
|
+
RTympanogram.draw({ dims });
|
64
|
+
|
65
|
+
dims = {
|
66
|
+
"name": "RReflex",
|
67
|
+
"w": 100,
|
68
|
+
"h": 28,
|
69
|
+
"margin": {
|
70
|
+
"left": 2,
|
71
|
+
"top": 2,
|
72
|
+
"right": 2,
|
73
|
+
"bottom": 0
|
74
|
+
},
|
75
|
+
"display": "inline",
|
76
|
+
"width": 100 * 6,
|
77
|
+
"height": 30 * 6
|
78
|
+
}
|
79
|
+
|
80
|
+
const RReflex = new Reflex({ container, side: 'R' })
|
81
|
+
RReflex.draw({ dims });
|
82
|
+
|
83
|
+
dims = {
|
84
|
+
"name": "report",
|
85
|
+
"w": 200,
|
86
|
+
"h": 20,
|
87
|
+
"margin": {
|
88
|
+
"left": 1,
|
89
|
+
"top": 0,
|
90
|
+
"right": 1,
|
91
|
+
"bottom": 0
|
92
|
+
},
|
93
|
+
"display": "block",
|
94
|
+
"width": 198,
|
95
|
+
"height": 20,
|
96
|
+
"elements": [
|
97
|
+
{
|
98
|
+
"type": "text",
|
99
|
+
"x": 198,
|
100
|
+
"y": 5,
|
101
|
+
"value": "گزارش:"
|
102
|
+
}
|
103
|
+
],
|
104
|
+
"inputs": [
|
105
|
+
{
|
106
|
+
"name": "description",
|
107
|
+
"x": 186,
|
108
|
+
"y": 5
|
109
|
+
}
|
110
|
+
]
|
111
|
+
}
|
112
|
+
|
113
|
+
// const report = new Box({ container })
|
114
|
+
// report.draw({ dims });
|
115
|
+
|
116
|
+
dims = {
|
117
|
+
"blank": false,
|
118
|
+
"name": "RAudiogram",
|
119
|
+
"w": 100,
|
120
|
+
"h": 90,
|
121
|
+
"margin": {
|
122
|
+
"left": 1,
|
123
|
+
"top": 1,
|
124
|
+
"right": 1,
|
125
|
+
"bottom": 1
|
126
|
+
},
|
127
|
+
"display": "inline",
|
128
|
+
"borderBox": "display",
|
129
|
+
"width": 600,
|
130
|
+
"height": 600
|
131
|
+
}
|
132
|
+
|
133
|
+
const RAudiogram = new Audiogram({ container, side: 'R', dims })
|
134
|
+
// RAudiogram.update({
|
135
|
+
// data: {
|
136
|
+
// // R_AC_M: { 8000: 25, 2000: 5, 1500: 0, },
|
137
|
+
// R_AC: { 1000: 25, 500: 15, 750: 20, 250: 10, 6000: 35, 2000: 45 },
|
138
|
+
// R_AC_NR: { 1500: 85 },
|
139
|
+
// R_BC_M: { 2000: 25, 6000: 25 },
|
140
|
+
// R_BC_M_NR: { 3000: 85 },
|
141
|
+
// R_BC: { 1000: 20, 500: 10, 750: 15, 250: 5, 4000: 20 },
|
142
|
+
// },
|
143
|
+
// side: 'R',
|
144
|
+
// })
|
145
|
+
|
146
|
+
const forms = new Forms({ container: document.getElementById('forms-div'), templates: [template], mode: 'develop' });
|
14
147
|
forms.update({ officeData, patientData, sessionIndex: 0 })
|
15
148
|
|
149
|
+
|
150
|
+
|
151
|
+
|
16
152
|
/*
|
17
|
-
const
|
18
|
-
container: document.getElementById('audiogram-div'), side: 'R',
|
19
|
-
})
|
153
|
+
const LAudiogram = new Audiogram({ container: document.getElementById('audiogram-div'), side: 'L', })
|
20
154
|
|
21
|
-
const LAudiogram = new Audiogram({
|
22
|
-
container: document.getElementById('audiogram-div'), side: 'L',
|
23
|
-
})
|
24
155
|
|
25
|
-
RAudiogram.update({
|
26
|
-
data: {
|
27
|
-
// R_AC_M: { 8000: 25, 2000: 5, 1500: 0, },
|
28
|
-
R_AC: { 1000: 25, 500: 15, 750: 20, 250: 10, 6000: 35, 2000: 45 },
|
29
|
-
R_AC_NR: { 1500: 85 },
|
30
|
-
R_BC_M: { 2000: 25, 6000: 25 },
|
31
|
-
R_BC_M_NR: { 3000: 85 },
|
32
|
-
R_BC: { 1000: 20, 500: 10, 750: 15, 250: 5, 4000: 20 },
|
33
|
-
},
|
34
|
-
side: 'R',
|
35
|
-
})
|
36
156
|
|
37
157
|
LAudiogram.update({
|
38
158
|
data: {
|
@@ -48,3 +168,4 @@ LAudiogram.update({
|
|
48
168
|
|
49
169
|
|
50
170
|
|
171
|
+
|
package/src/styles.css
CHANGED
@@ -1,11 +1,71 @@
|
|
1
1
|
@font-face {
|
2
|
+
font-family: 'Vazir';
|
3
|
+
src: url('/fonts/Vazir-Black-UI.woff2') format('woff2'),
|
4
|
+
url('/fonts/Vazir-Black-UI.woff') format('woff'),
|
5
|
+
url('/fonts/Vazir-Black-UI.eot') format('embedded-opentype');
|
6
|
+
font-weight: 900;
|
7
|
+
font-style: normal;
|
8
|
+
font-display: swap;
|
9
|
+
}
|
10
|
+
|
11
|
+
@font-face {
|
12
|
+
font-family: 'Vazir';
|
13
|
+
src: url('/fonts/Vazir-Bold-UI.woff2') format('woff2'),
|
14
|
+
url('/fonts/Vazir-Bold-UI.woff') format('woff'),
|
15
|
+
url('/fonts/Vazir-Bold-UI.eot') format('embedded-opentype');
|
16
|
+
font-weight: 700;
|
17
|
+
font-style: normal;
|
18
|
+
font-display: swap;
|
19
|
+
}
|
20
|
+
|
21
|
+
@font-face {
|
22
|
+
font-family: 'Vazir';
|
23
|
+
src: url('/fonts/Vazir-Medium-UI.woff2') format('woff2'),
|
24
|
+
url('/fonts/Vazir-Medium-UI.woff') format('woff'),
|
25
|
+
url('/fonts/Vazir-Medium-UI.eot') format('embedded-opentype');
|
26
|
+
font-weight: 500;
|
27
|
+
font-style: normal;
|
28
|
+
font-display: swap;
|
29
|
+
}
|
30
|
+
|
31
|
+
@font-face {
|
32
|
+
font-family: 'Vazir';
|
33
|
+
src: url('/fonts/Vazir-Regular-UI.woff2') format('woff2'),
|
34
|
+
url('/fonts/Vazir-Regular-UI.woff') format('woff'),
|
35
|
+
url('/fonts/Vazir-Regular-UI.eot') format('embedded-opentype');
|
36
|
+
font-weight: 400;
|
37
|
+
font-style: normal;
|
38
|
+
font-display: swap;
|
39
|
+
}
|
40
|
+
|
41
|
+
@font-face {
|
42
|
+
font-family: 'Vazir';
|
43
|
+
src: url('/fonts/Vazir-Light-UI.woff2') format('woff2'),
|
44
|
+
url('/fonts/Vazir-Light-UI.woff') format('woff'),
|
45
|
+
url('/fonts/Vazir-Light-UI.eot') format('embedded-opentype');
|
46
|
+
font-weight: 300;
|
47
|
+
font-style: normal;
|
48
|
+
font-display: swap;
|
49
|
+
}
|
50
|
+
|
51
|
+
@font-face {
|
52
|
+
font-family: 'Vazir';
|
53
|
+
src: url('/fonts/Vazir-Thin-UI.woff2') format('woff2'),
|
54
|
+
url('/fonts/Vazir-Thin-UI.woff') format('woff'),
|
55
|
+
url('/fonts/Vazir-Thin-UI.eot') format('embedded-opentype');
|
56
|
+
font-weight: 100;
|
57
|
+
font-style: normal;
|
58
|
+
font-display: swap;
|
59
|
+
}
|
60
|
+
|
61
|
+
/* @font-face {
|
2
62
|
font-family: 'Vazirmatn';
|
3
63
|
src: url('fonts/webfonts/Vazirmatn[wght].woff2') format('woff2 supports variations'),
|
4
64
|
url('fonts/webfonts/Vazirmatn[wght].woff2') format('woff2-variations');
|
5
65
|
font-weight: 100 900;
|
6
66
|
font-style: normal;
|
7
67
|
font-display: swap;
|
8
|
-
}
|
68
|
+
} */
|
9
69
|
|
10
70
|
/* @font-face {
|
11
71
|
font-family: vazirmatn;
|
@@ -25,7 +85,7 @@
|
|
25
85
|
}
|
26
86
|
|
27
87
|
.persian {
|
28
|
-
font-family:
|
88
|
+
font-family: Vazir;
|
29
89
|
/* font-size: 0.8mm; */
|
30
90
|
/* text-anchor: start; */
|
31
91
|
|
@@ -58,7 +118,7 @@
|
|
58
118
|
.right {
|
59
119
|
/* background-color: lightgreen; */
|
60
120
|
margin-left: 10px;
|
61
|
-
|
121
|
+
|
62
122
|
/* padding: 20px; */
|
63
123
|
}
|
64
124
|
|
Binary file
|