hayun-vite 0.6.1 → 0.6.3

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.1",
4
+ "version": "0.6.3",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",
package/src/Form/Form.js CHANGED
@@ -20,10 +20,12 @@ 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
+ (template.label === 'تمپانومتری رسا') && console.log(template.patient);
28
+
27
29
  if (sections.header) {
28
30
  this.header = new Header({ container: sections.header })
29
31
  this.header.draw({ dims: template.header });
@@ -142,13 +142,24 @@ export default class Tympanogram {
142
142
  container: svg, value: "", style: style + 'fill: ' + color, name: 'G',
143
143
  x: getX(300), y: getY(compliance.min), dy: 10, dx: 4
144
144
  });
145
+
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
+ `;
145
156
  putText({
146
157
  container: svg, value: "Type", style: style + 'fill: ' + color,
147
158
  x: getX(-500), y: getY(2.5),
148
159
  });
149
160
  putText({
150
- container: svg, value: "", style: style, name: 'Type',
151
- x: getX(-500), y: getY(2.5), dx: 8
161
+ container: svg, value: "", style: style + 'fill: ' + color, name: 'Type',
162
+ x: getX(-500), y: getY(2.5), dx: 9
152
163
  });
153
164
 
154
165
  // Compliance Axios digits
@@ -238,7 +249,7 @@ export default class Tympanogram {
238
249
  update(data) {
239
250
 
240
251
  // جایگذاری مقادیر تمپانومتری در تکست‌باکس ها
241
- this.chart.querySelector(`text[data-name="Type"]`).innerHTML = data?.type || "";
252
+ this.chart.querySelector(`text[data-name="Type"]`).innerHTML = data?.Type || "";
242
253
  this.chart.querySelector(`text[data-name="ECV"]`).innerHTML = data?.ECV || "";
243
254
  this.chart.querySelector(`text[data-name="MEP"]`).innerHTML = data?.MEP || "";
244
255
  this.chart.querySelector(`text[data-name="SC"]`).innerHTML = data?.SC || "";
@@ -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: 'combo',
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 },
@@ -105,14 +104,16 @@ const rasaTymp = {
105
104
  { type: 'line', x1: 0, y1: 20, x2: width, y2: 20 },
106
105
  { type: 'text', x: width, y: 5, value: 'نام:' },
107
106
  { type: 'text', x: width - 30, y: 5, value: 'نام خانوادگی:' },
108
- { type: 'text', x: width - 90, y: 5, value: 'سن:' },
109
- { type: 'text', x: width - 130, y: 5, value: 'ارجاع از:' }
107
+ { type: 'text', x: width - 80, 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
112
  { name: 'name', x: width - 5, y: 5 },
113
113
  { name: 'lastName', x: width - 47, y: 5 },
114
- { name: 'age', x: width - 97, y: 5 },
115
- { name: 'referrer', x: width - 142, y: 5 }
114
+ { name: 'age', x: width - 87, 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 },