@measurequick/measurequick-report-generator 1.0.14 → 1.0.16
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/templates.js +79 -96
- package/index.js +10 -8
- package/package.json +1 -1
package/assets/templates.js
CHANGED
|
@@ -7,203 +7,186 @@ export const docOptions = {
|
|
|
7
7
|
};
|
|
8
8
|
|
|
9
9
|
export const indoorMeasurements = {
|
|
10
|
-
"
|
|
10
|
+
"returnTemperature": {
|
|
11
11
|
"label": "Return Temp",
|
|
12
12
|
"units": "°F"
|
|
13
13
|
},
|
|
14
|
-
"
|
|
14
|
+
"returnRelativeHumidity": {
|
|
15
15
|
"label": "Return %RH"
|
|
16
16
|
},
|
|
17
|
-
"
|
|
17
|
+
"returnWetBulbTemperature": {
|
|
18
18
|
"label": "Return Wet Bulb",
|
|
19
19
|
"units": "°F"
|
|
20
20
|
},
|
|
21
|
-
"
|
|
21
|
+
"supplyTemperature": {
|
|
22
22
|
"label": "Supply Temp",
|
|
23
23
|
"units": "°F"
|
|
24
24
|
},
|
|
25
|
-
"
|
|
25
|
+
"supplyRelativeHumidity": {
|
|
26
26
|
"label": "Supply %RH"
|
|
27
27
|
},
|
|
28
|
-
"
|
|
28
|
+
"supplyWetBulb": {
|
|
29
29
|
"label": "Supply Wet Bulb",
|
|
30
30
|
"units": "°F"
|
|
31
31
|
},
|
|
32
|
-
"
|
|
32
|
+
"airflowEstimated": {
|
|
33
33
|
"label": "Airflow, Estimated",
|
|
34
34
|
"units": "SCFM"
|
|
35
35
|
},
|
|
36
|
-
"
|
|
36
|
+
"totalExternalStaticPressure": {
|
|
37
37
|
"label": "Total External Static Pres",
|
|
38
38
|
"units": "inH2O"
|
|
39
39
|
},
|
|
40
|
-
"
|
|
40
|
+
"airHandlerVoltageL1": {
|
|
41
41
|
"label": "Compression Ratio",
|
|
42
|
-
"secondaryValue": "
|
|
42
|
+
"secondaryValue": "airHandlerVoltageL2"
|
|
43
43
|
},
|
|
44
|
-
"
|
|
44
|
+
"airHandlerAmperageL1": {
|
|
45
45
|
"label": "Condenser Voltage",
|
|
46
|
-
"secondaryValue": "
|
|
46
|
+
"secondaryValue": "airHandlerAmperageL2"
|
|
47
47
|
},
|
|
48
|
-
"
|
|
48
|
+
"airHandlerPowerFactor": {
|
|
49
49
|
"label": "Condenser Amperage"
|
|
50
50
|
},
|
|
51
|
-
"
|
|
51
|
+
"airHandlerPower": {
|
|
52
52
|
"label": "Condenser Power Factor",
|
|
53
53
|
"units": "W"
|
|
54
54
|
}
|
|
55
55
|
};
|
|
56
56
|
|
|
57
57
|
export const outdoorMeasurements = {
|
|
58
|
-
"
|
|
58
|
+
"lowSidePressure": {
|
|
59
59
|
"label": "Low Pressure",
|
|
60
60
|
"units": ["PSIG", "°F"],
|
|
61
|
-
"secondaryValue": "
|
|
61
|
+
"secondaryValue": "lowSideTemperature"
|
|
62
62
|
},
|
|
63
|
-
"
|
|
63
|
+
"highSidePressure": {
|
|
64
64
|
"label": "High Pressure",
|
|
65
65
|
"units": ["PSIG", "°F"],
|
|
66
|
-
"secondaryValue": "
|
|
66
|
+
"secondaryValue": "highSideTemperature"
|
|
67
67
|
},
|
|
68
|
-
"
|
|
68
|
+
"suctionLineTemperature": {
|
|
69
69
|
"label": "Suction Line Temp",
|
|
70
70
|
"units": "°F"
|
|
71
71
|
},
|
|
72
|
-
"
|
|
72
|
+
"liquidLineTemperature": {
|
|
73
73
|
"label": "Liquid Line Temp",
|
|
74
74
|
"units": "°F"
|
|
75
75
|
},
|
|
76
|
-
"
|
|
76
|
+
"dischargeLineTemperature": {
|
|
77
77
|
"label": "Discharge Line Temp",
|
|
78
78
|
"units": "°F"
|
|
79
79
|
},
|
|
80
|
-
"
|
|
80
|
+
"outdoorAirTemperature": {
|
|
81
81
|
"label": "Outdoor Air Temp",
|
|
82
82
|
"units": "°F"
|
|
83
83
|
},
|
|
84
|
-
"
|
|
84
|
+
"superheatTemperature": {
|
|
85
85
|
"label": "Superheat",
|
|
86
86
|
"units": "°F"
|
|
87
87
|
},
|
|
88
|
-
"
|
|
88
|
+
"subcoolingTemperature": {
|
|
89
89
|
"label": "Subcooling",
|
|
90
90
|
"units": "°F"
|
|
91
91
|
},
|
|
92
|
-
"
|
|
92
|
+
"compressionRatio": {
|
|
93
93
|
"label": "Compression Ratio"
|
|
94
94
|
},
|
|
95
|
-
"
|
|
95
|
+
"condenserVoltageL1": {
|
|
96
96
|
"label": "Condenser Voltage",
|
|
97
|
-
"secondaryValue": "
|
|
97
|
+
"secondaryValue": "condenserVoltageL2"
|
|
98
98
|
},
|
|
99
|
-
"
|
|
99
|
+
"condenserAmperageL1": {
|
|
100
100
|
"label": "Condenser Amperage",
|
|
101
|
-
"secondaryValue": "
|
|
101
|
+
"secondaryValue": "condenserAmperageL2"
|
|
102
102
|
},
|
|
103
|
-
"
|
|
103
|
+
"condenserPowerFactor": {
|
|
104
104
|
"label": "Condenser Power Factor"
|
|
105
105
|
},
|
|
106
|
-
"
|
|
106
|
+
"condenserPower": {
|
|
107
107
|
"label": "Condenser Power",
|
|
108
108
|
"units": "W"
|
|
109
109
|
}
|
|
110
110
|
};
|
|
111
111
|
|
|
112
|
-
// Nominal: 3.0 Tons / 36,000 Btu/h
|
|
113
|
-
// Normalized: 2.9 Tons / 34,373 Btu/h
|
|
114
|
-
// Actual: 0.9 Tons / 11,391 Btu/h
|
|
115
|
-
// (33.1% Normalized)
|
|
116
|
-
// Sensible: 0.6 Tons / 7,480 Btu/h
|
|
117
|
-
// (82.3% Normalized)
|
|
118
|
-
// Latent: 0.3 Tons / 3,910 Btu/h
|
|
119
|
-
// (15.5% Normalized)
|
|
120
|
-
// Sensible Heat Ratio: 0.66
|
|
121
|
-
//
|
|
122
|
-
//
|
|
123
|
-
//
|
|
124
|
-
// Temp Split Target: 7.0°F
|
|
125
|
-
// Temp Split: 8.1°F
|
|
126
|
-
// Dehumidification: 3.6 lb/hr
|
|
127
|
-
// 0.4 gal/hr
|
|
128
|
-
// Energy Efficiency:
|
|
129
|
-
// Fan Efficacy: 1.16
|
|
130
|
-
// Total Power: 3,587
|
|
131
|
-
// EER: 3.2
|
|
132
|
-
// Approx. SEER: 3.5
|
|
133
|
-
// Sensible Efficiency: 82.3%
|
|
134
|
-
|
|
135
112
|
export const performanceData = {
|
|
136
|
-
"
|
|
137
|
-
"label": "
|
|
138
|
-
"units": ["PSIG", "°F"]
|
|
113
|
+
"capacityNominal": {
|
|
114
|
+
"label": "Test Label"
|
|
139
115
|
},
|
|
140
|
-
"
|
|
141
|
-
"label": "
|
|
142
|
-
"units": ["PSIG", "°F"]
|
|
116
|
+
"capacityNormalized": {
|
|
117
|
+
"label": "Test Label"
|
|
143
118
|
},
|
|
144
|
-
"
|
|
145
|
-
"label": "
|
|
146
|
-
"units": "°F"
|
|
119
|
+
"capacityActual": {
|
|
120
|
+
"label": "Test Label"
|
|
147
121
|
},
|
|
148
|
-
"
|
|
149
|
-
"label": "
|
|
150
|
-
"units": "°F"
|
|
122
|
+
"capacityActualNormalized": {
|
|
123
|
+
"label": "Test Label"
|
|
151
124
|
},
|
|
152
|
-
"
|
|
153
|
-
"label": "
|
|
154
|
-
"units": "°F"
|
|
125
|
+
"capacitySensible": {
|
|
126
|
+
"label": "Test Label"
|
|
155
127
|
},
|
|
156
|
-
"
|
|
157
|
-
"label": "
|
|
158
|
-
"units": "°F"
|
|
128
|
+
"capacitySensibleNormalized": {
|
|
129
|
+
"label": "Test Label"
|
|
159
130
|
},
|
|
160
|
-
"
|
|
161
|
-
"label": "
|
|
162
|
-
"units": "°F"
|
|
131
|
+
"capacityLatent": {
|
|
132
|
+
"label": "Test Label"
|
|
163
133
|
},
|
|
164
|
-
"
|
|
165
|
-
"label": "
|
|
166
|
-
"units": "°F"
|
|
134
|
+
"capacityLatentNormalized": {
|
|
135
|
+
"label": "Test Label"
|
|
167
136
|
},
|
|
168
|
-
"
|
|
169
|
-
"label": "
|
|
137
|
+
"sensibleHeatRatio": {
|
|
138
|
+
"label": "Test Label"
|
|
170
139
|
},
|
|
171
|
-
"
|
|
172
|
-
"label": "
|
|
140
|
+
"temperatureSplitTarget": {
|
|
141
|
+
"label": "Test Label"
|
|
173
142
|
},
|
|
174
|
-
"
|
|
175
|
-
"label": "
|
|
143
|
+
"temperatureSplit": {
|
|
144
|
+
"label": "Test Label"
|
|
176
145
|
},
|
|
177
|
-
"
|
|
178
|
-
"label": "
|
|
146
|
+
"dehumidification": {
|
|
147
|
+
"label": "Test Label"
|
|
179
148
|
},
|
|
180
|
-
"
|
|
181
|
-
"label": "
|
|
182
|
-
|
|
149
|
+
"dehumidificationAlternate": {
|
|
150
|
+
"label": "Test Label"
|
|
151
|
+
},
|
|
152
|
+
"fanEfficacy": {
|
|
153
|
+
"label": "Test Label"
|
|
154
|
+
},
|
|
155
|
+
"totalPower": {
|
|
156
|
+
"label": "Test Label"
|
|
157
|
+
},
|
|
158
|
+
"eer": {
|
|
159
|
+
"label": "Test Label"
|
|
160
|
+
},
|
|
161
|
+
"seerApproximate": {
|
|
162
|
+
"label": "Test Label"
|
|
163
|
+
},
|
|
164
|
+
"sensibleEfficiency": {
|
|
165
|
+
"label": "Test Label"
|
|
183
166
|
}
|
|
184
167
|
};
|
|
185
168
|
|
|
186
169
|
export const systemInfo = {
|
|
187
|
-
"
|
|
170
|
+
"systemType": {
|
|
188
171
|
"label": "System Type"
|
|
189
172
|
},
|
|
190
|
-
"
|
|
173
|
+
"nominalTonnage": {
|
|
191
174
|
"label": "Nominal Tonnage"
|
|
192
175
|
},
|
|
193
176
|
"refrigerant": {
|
|
194
177
|
"label": "Refrigerant"
|
|
195
178
|
},
|
|
196
|
-
"
|
|
179
|
+
"airflowNominal": {
|
|
197
180
|
"label": "Nom. Airflow",
|
|
198
181
|
"units": "SCFM/Ton"
|
|
199
182
|
},
|
|
200
183
|
"seer": {
|
|
201
184
|
"label": "SEER"
|
|
202
185
|
},
|
|
203
|
-
"
|
|
186
|
+
"meteringDevice": {
|
|
204
187
|
"label": "Metering Device"
|
|
205
188
|
},
|
|
206
|
-
"
|
|
189
|
+
"atmosphericPressure": {
|
|
207
190
|
"label": "Atmospheric Pressure",
|
|
208
191
|
"units": "PSIA"
|
|
209
192
|
},
|
|
@@ -219,11 +202,11 @@ export const systemInfo = {
|
|
|
219
202
|
"label": "Humidity",
|
|
220
203
|
"units": "%"
|
|
221
204
|
},
|
|
222
|
-
"
|
|
205
|
+
"dewPoint": {
|
|
223
206
|
"label": "Dew Point",
|
|
224
207
|
"units": "°F"
|
|
225
208
|
},
|
|
226
|
-
"
|
|
209
|
+
"systemStability": {
|
|
227
210
|
"label": "System Stability"
|
|
228
211
|
}
|
|
229
212
|
};
|
package/index.js
CHANGED
|
@@ -55,7 +55,9 @@ function printBoilerPlate(theme) {
|
|
|
55
55
|
doc.setFontSize(6.5);
|
|
56
56
|
doc.setFontStyle("bolditalic");
|
|
57
57
|
doc.setTextColor(255, 255, 255);
|
|
58
|
-
var disclaimer = `Disclaimer: This report was prepared by your service technician who is solely responsible for its
|
|
58
|
+
var disclaimer = `Disclaimer: This report was prepared by your service technician who is solely responsible for its
|
|
59
|
+
content. This report is provided “as-is” excluding all warranties expressed or implied including without limitation
|
|
60
|
+
the warranty of merchantability. ©2017-${new Date().getFullYear()} Manifold Cloud Services Ltd.`;
|
|
59
61
|
disclaimer = doc.splitTextToSize(disclaimer.toUpperCase(), 8);
|
|
60
62
|
doc.text(disclaimer, .125, 10.66);
|
|
61
63
|
}
|
|
@@ -89,12 +91,12 @@ function printSingleBodySection(dataPoints, xLeft, xRight, y) {
|
|
|
89
91
|
var units;
|
|
90
92
|
var text;
|
|
91
93
|
for (let key in dataPoints) {
|
|
92
|
-
dataPoint
|
|
93
|
-
val
|
|
94
|
-
units
|
|
95
|
-
text
|
|
96
|
-
doc.text(`${dataPoint.label} (${units}):`, xLeft, y);
|
|
97
|
-
doc.text(val, alignRight(val, xRight, 8), y);
|
|
94
|
+
dataPoint = dataPoints[key];
|
|
95
|
+
val = reportData.values[key];
|
|
96
|
+
units = Array.isArray(dataPoint.units) ? `${dataPoint.units[0]} / ${dataPoint.units[1]}` : dataPoint.units;
|
|
97
|
+
text = dataPoint.hasOwnProperty("secondaryValue") ? `${val} / ${reportData.values[dataPoint.secondaryValue]}` : val;
|
|
98
|
+
doc.text(`${dataPoint.label} (${units}):`, xLeft, y); // this prints
|
|
99
|
+
doc.text(val, alignRight(val, xRight, 8), y); // this doesnt seem to print
|
|
98
100
|
doc.addImage(graphics[reportData.rangeIcons[key]], "JPEG", xRight, y, .2, .2);
|
|
99
101
|
doc.addImage(graphics[reportData.toolIcons[key]], "JPEG", xRight, y, .2, .2);
|
|
100
102
|
y += s;
|
|
@@ -112,7 +114,7 @@ function printProfilePicture(picturePlacement, techName, profilePicture) {
|
|
|
112
114
|
}
|
|
113
115
|
|
|
114
116
|
function printCompanyLogo(logoPlacement, companyLogo) {
|
|
115
|
-
var coords = templates.companyLogoCoordinates[
|
|
117
|
+
var coords = templates.companyLogoCoordinates[logoPlacement];
|
|
116
118
|
doc.addImage(companyLogo, "JPEG", coords.x, coords.y, coords.w, coords.h);
|
|
117
119
|
}
|
|
118
120
|
|