hayun-vite 0.6.3 → 0.7.1

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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "hayun-vite",
3
3
  "private": false,
4
- "version": "0.6.3",
4
+ "version": "0.7.1",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",
package/src/Form/Form.js CHANGED
@@ -24,7 +24,6 @@ export default class Form {
24
24
  const sections = new Sections({ container: this.form, dims: template });
25
25
  this.sections = sections;
26
26
 
27
- (template.label === 'تمپانومتری رسا') && console.log(template.patient);
28
27
 
29
28
  if (sections.header) {
30
29
  this.header = new Header({ container: sections.header })
@@ -32,6 +31,8 @@ export default class Form {
32
31
  }
33
32
 
34
33
  if (sections.patient) {
34
+ // (template.label === 'تمپانومتری رسا') && console.log(template.patient);
35
+
35
36
  this.patient = new TextBox({ container: sections.patient });
36
37
  this.patient.draw({ dims: template.patient });
37
38
  }
@@ -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.8mm;
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.8mm;
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: 0.8mm;
87
+ font-size: 1mm;
88
88
  text-anchor: middle; /*تراز افقی*/
89
89
  dominant-baseline: middle; /* تراز عمودی*/
90
90
  `;
@@ -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('class', 'text-box')
35
+ svg.setAttribute('style', style)
36
+ // svg.setAttribute('class', 'text-box')
28
37
 
29
38
  // اگر مقدار استروک درست بود لیبل ها را چاپ کن
30
39
  if (!dims.hideContext) {
@@ -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: 0.8mm;
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 :", style: style,
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: 9
119
+ x: getX(pressure.min), y: getY(compliance.min), dy: 10, dx: 11
120
120
  });
121
121
  putText({
122
- container: svg, value: "MEP :", style: style,
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: 9
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: 6
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(300), y: getY(compliance.min), dy: 10
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',
@@ -103,15 +103,15 @@ const rasaTymp = {
103
103
  this.patient.elements = [
104
104
  { type: 'line', x1: 0, y1: 20, x2: width, y2: 20 },
105
105
  { type: 'text', x: width, y: 5, value: 'نام:' },
106
- { type: 'text', x: width - 30, y: 5, value: 'نام خانوادگی:' },
107
- { type: 'text', x: width - 80, y: 5, value: 'سن:' },
106
+ { type: 'text', x: width - 37, y: 5, value: 'نام خانوادگی:' },
107
+ { type: 'text', x: width - 90, y: 5, value: 'سن:' },
108
108
  { type: 'text', x: width - 120, y: 5, value: 'ارجاع از:' },
109
109
  { type: 'text', x: width - 170, y: 5, value: 'تاریخ:' }
110
110
  ]
111
111
  this.patient.inputs = [
112
- { name: 'name', x: width - 5, y: 5 },
113
- { name: 'lastName', x: width - 47, y: 5 },
114
- { name: 'age', x: width - 87, y: 5 },
112
+ { name: 'name', x: width - 6, y: 5 },
113
+ { name: 'lastName', x: width - 57, y: 5 },
114
+ { name: 'age', x: width - 97, y: 5 },
115
115
  { name: 'referrer', x: width - 132, y: 5 },
116
116
  { name: 'date', x: width - 180, y: 5 }
117
117
  ]