@lighthouse/common 6.10.0 → 6.10.1-canary.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/.mise.toml +6 -6
- package/CHANGELOG.md +758 -758
- package/README.md +1 -1
- package/dist/errors/FetchImageError.js +3 -3
- package/dist/helpers/fetch-image-for-pdf-generator-service/index.js +7 -7
- package/dist/helpers/floatify/index.js +6 -6
- package/dist/helpers/get-audit-items-data/index.js +47 -36
- package/dist/helpers/validate-url/index.js +4 -4
- package/dist/pdf/activity-report/index.js +32 -32
- package/dist/pdf/audit/index.js +23 -23
- package/dist/pdf/helpers/fields/index.js +47 -27
- package/dist/pdf/issue/index.js +23 -23
- package/dist/pdf/job/index.js +22 -22
- package/dist/pdf/shift-report/index.js +28 -28
- package/dist/pdf/task/index.js +23 -23
- package/dist/scheduling/generators/occurrenceIntervalsGenerator.js +2 -2
- package/dist/scheduling/generators/scheduleIntervalsGenerator.js +2 -2
- package/dist/scheduling/generators/serviceIntervalsGenerator.js +2 -2
- package/dist/scheduling/helpers/convertToTimezone.js +6 -6
- package/dist/scheduling/helpers/generateNonRepeatingSchedule.js +2 -2
- package/dist/scheduling/helpers/generateRepeatingSchedule.js +2 -2
- package/dist/scheduling/helpers/generateScheduleEnd.js +2 -2
- package/dist/scheduling/helpers/hasValidStartAndEnd.js +5 -5
- package/dist/scheduling/helpers/intervalCovers.js +6 -6
- package/dist/scheduling/helpers/intervalIntersectsEnd.js +6 -6
- package/dist/scheduling/helpers/intervalIntersectsStart.js +6 -6
- package/dist/scheduling/helpers/intervalOnlyIntersectsEnd.js +6 -6
- package/dist/scheduling/helpers/intervalOnlyIntersectsStart.js +6 -6
- package/dist/scheduling/helpers/intervalOutside.js +6 -6
- package/dist/scheduling/helpers/intervalWithin.js +6 -6
- package/dist/scheduling/helpers/mergeIntervals.js +6 -6
- package/dist/scheduling/helpers/splitIntervals.js +6 -6
- package/dist/scheduling/strategies/getNext.js +2 -2
- package/dist/scheduling/strategies/getNextExactDateOfMonth.js +2 -2
- package/dist/scheduling/strategies/getNextLastDayOfMonth.js +2 -2
- package/dist/scheduling/strategies/getNextLastWeekdayOfMonth.js +2 -2
- package/dist/scheduling/strategies/getNextNoRepeat.js +2 -2
- package/dist/scheduling/strategies/getNextWeekday.js +2 -2
- package/dist/scheduling/strategies/getNextXDayOfXWeekOfMonth.js +2 -2
- package/dist/service-hours/__helpers__/calculate-hours.js +4 -4
- package/dist/service-hours/__helpers__/isOpen.js +2 -2
- package/dist/service-hours/schema.js +4 -4
- package/lib/constants.js +12 -6
- package/lib/constants.js.map +1 -1
- package/lib/errors/DomainError.js +14 -21
- package/lib/errors/DomainError.js.map +1 -1
- package/lib/errors/FetchImageError.js +17 -24
- package/lib/errors/FetchImageError.js.map +1 -1
- package/lib/errors/ValidationError.js +30 -36
- package/lib/errors/ValidationError.js.map +1 -1
- package/lib/errors/index.js +23 -5
- package/lib/errors/index.js.map +1 -1
- package/lib/helpers/build-fetch-url/index.js +43 -47
- package/lib/helpers/build-fetch-url/index.js.map +1 -1
- package/lib/helpers/fetch-image/index.js +83 -82
- package/lib/helpers/fetch-image/index.js.map +1 -1
- package/lib/helpers/fetch-image-for-pdf-generator-service/index.js +168 -243
- package/lib/helpers/fetch-image-for-pdf-generator-service/index.js.map +1 -1
- package/lib/helpers/fetch-image-for-web/index.js +71 -94
- package/lib/helpers/fetch-image-for-web/index.js.map +1 -1
- package/lib/helpers/fetch-lighthouse-logo/index.js +36 -61
- package/lib/helpers/fetch-lighthouse-logo/index.js.map +1 -1
- package/lib/helpers/floatify/index.js +13 -7
- package/lib/helpers/floatify/index.js.map +1 -1
- package/lib/helpers/get-assignees-full-names/index.js +11 -7
- package/lib/helpers/get-assignees-full-names/index.js.map +1 -1
- package/lib/helpers/get-audit-entry-details/index.js +42 -32
- package/lib/helpers/get-audit-entry-details/index.js.map +1 -1
- package/lib/helpers/get-audit-items-data/index.js +104 -83
- package/lib/helpers/get-audit-items-data/index.js.map +1 -1
- package/lib/helpers/get-geometry-geocoded-string/index.js +10 -5
- package/lib/helpers/get-geometry-geocoded-string/index.js.map +1 -1
- package/lib/helpers/get-issue-details/index.js +53 -43
- package/lib/helpers/get-issue-details/index.js.map +1 -1
- package/lib/helpers/get-job-details/index.js +49 -41
- package/lib/helpers/get-job-details/index.js.map +1 -1
- package/lib/helpers/get-location-reference/index.js +32 -34
- package/lib/helpers/get-location-reference/index.js.map +1 -1
- package/lib/helpers/get-pretty-duration/index.js +16 -10
- package/lib/helpers/get-pretty-duration/index.js.map +1 -1
- package/lib/helpers/get-reference-details/index.js +20 -10
- package/lib/helpers/get-reference-details/index.js.map +1 -1
- package/lib/helpers/get-status-details/index.js +8 -2
- package/lib/helpers/get-status-details/index.js.map +1 -1
- package/lib/helpers/get-task-entry-details/index.js +32 -23
- package/lib/helpers/get-task-entry-details/index.js.map +1 -1
- package/lib/helpers/get-timezone-abbr/index.js +11 -4
- package/lib/helpers/get-timezone-abbr/index.js.map +1 -1
- package/lib/helpers/get-timezone-datetime/index.js +20 -13
- package/lib/helpers/get-timezone-datetime/index.js.map +1 -1
- package/lib/helpers/get-user-full-name/index.js +9 -3
- package/lib/helpers/get-user-full-name/index.js.map +1 -1
- package/lib/helpers/get-value-as-percentage/index.js +9 -4
- package/lib/helpers/get-value-as-percentage/index.js.map +1 -1
- package/lib/helpers/image-validators/index.js +18 -12
- package/lib/helpers/image-validators/index.js.map +1 -1
- package/lib/helpers/index.js +130 -18
- package/lib/helpers/index.js.map +1 -1
- package/lib/helpers/validate-url/index.js +11 -5
- package/lib/helpers/validate-url/index.js.map +1 -1
- package/lib/images/index.js +10 -4
- package/lib/images/index.js.map +1 -1
- package/lib/index.js +66 -10
- package/lib/index.js.map +1 -1
- package/lib/pdf/activity-report/index.js +407 -537
- package/lib/pdf/activity-report/index.js.map +1 -1
- package/lib/pdf/audit/index.js +137 -134
- package/lib/pdf/audit/index.js.map +1 -1
- package/lib/pdf/fonts/index.js +4 -2
- package/lib/pdf/fonts/index.js.map +1 -1
- package/lib/pdf/helpers/build-audit-content/index.js +57 -51
- package/lib/pdf/helpers/build-audit-content/index.js.map +1 -1
- package/lib/pdf/helpers/build-audit-follow-ups/index.js +52 -50
- package/lib/pdf/helpers/build-audit-follow-ups/index.js.map +1 -1
- package/lib/pdf/helpers/build-location-scans-content/index.js +22 -16
- package/lib/pdf/helpers/build-location-scans-content/index.js.map +1 -1
- package/lib/pdf/helpers/build-template-content/index.js +52 -51
- package/lib/pdf/helpers/build-template-content/index.js.map +1 -1
- package/lib/pdf/helpers/default-footer/index.js +38 -35
- package/lib/pdf/helpers/default-footer/index.js.map +1 -1
- package/lib/pdf/helpers/default-header/index.js +40 -35
- package/lib/pdf/helpers/default-header/index.js.map +1 -1
- package/lib/pdf/helpers/default-styles/index.js +7 -1
- package/lib/pdf/helpers/default-styles/index.js.map +1 -1
- package/lib/pdf/helpers/fields/index.js +225 -214
- package/lib/pdf/helpers/fields/index.js.map +1 -1
- package/lib/pdf/helpers/format-location-address/index.js +14 -8
- package/lib/pdf/helpers/format-location-address/index.js.map +1 -1
- package/lib/pdf/helpers/generate-definition/index.js +60 -65
- package/lib/pdf/helpers/generate-definition/index.js.map +1 -1
- package/lib/pdf/helpers/horizontal-line/index.js +14 -14
- package/lib/pdf/helpers/horizontal-line/index.js.map +1 -1
- package/lib/pdf/helpers/html-transformer/index.js +45 -35
- package/lib/pdf/helpers/html-transformer/index.js.map +1 -1
- package/lib/pdf/helpers/index.js +194 -15
- package/lib/pdf/helpers/index.js.map +1 -1
- package/lib/pdf/helpers/parse-value/index.js +10 -4
- package/lib/pdf/helpers/parse-value/index.js.map +1 -1
- package/lib/pdf/helpers/table/index.js +136 -205
- package/lib/pdf/helpers/table/index.js.map +1 -1
- package/lib/pdf/helpers/text/index.js +11 -8
- package/lib/pdf/helpers/text/index.js.map +1 -1
- package/lib/pdf/icons/index.js +8 -2
- package/lib/pdf/icons/index.js.map +1 -1
- package/lib/pdf/index.js +47 -6
- package/lib/pdf/index.js.map +1 -1
- package/lib/pdf/issue/index.js +141 -135
- package/lib/pdf/issue/index.js.map +1 -1
- package/lib/pdf/job/index.js +95 -81
- package/lib/pdf/job/index.js.map +1 -1
- package/lib/pdf/shift-report/emptyFixtures.js +8 -2
- package/lib/pdf/shift-report/emptyFixtures.js.map +1 -1
- package/lib/pdf/shift-report/index.js +399 -521
- package/lib/pdf/shift-report/index.js.map +1 -1
- package/lib/pdf/task/index.js +89 -83
- package/lib/pdf/task/index.js.map +1 -1
- package/lib/scheduling/generators/index.js +38 -3
- package/lib/scheduling/generators/index.js.map +1 -1
- package/lib/scheduling/generators/occurrenceIntervalsGenerator.js +44 -37
- package/lib/scheduling/generators/occurrenceIntervalsGenerator.js.map +1 -1
- package/lib/scheduling/generators/scheduleIntervalsGenerator.js +20 -28
- package/lib/scheduling/generators/scheduleIntervalsGenerator.js.map +1 -1
- package/lib/scheduling/generators/serviceIntervalsGenerator.js +120 -150
- package/lib/scheduling/generators/serviceIntervalsGenerator.js.map +1 -1
- package/lib/scheduling/helpers/convertToTimezone.js +18 -11
- package/lib/scheduling/helpers/convertToTimezone.js.map +1 -1
- package/lib/scheduling/helpers/generateNonRepeatingSchedule.js +57 -95
- package/lib/scheduling/helpers/generateNonRepeatingSchedule.js.map +1 -1
- package/lib/scheduling/helpers/generateRepeatingSchedule.js +80 -119
- package/lib/scheduling/helpers/generateRepeatingSchedule.js.map +1 -1
- package/lib/scheduling/helpers/generateScheduleEnd.js +24 -14
- package/lib/scheduling/helpers/generateScheduleEnd.js.map +1 -1
- package/lib/scheduling/helpers/hasValidStartAndEnd.js +19 -11
- package/lib/scheduling/helpers/hasValidStartAndEnd.js.map +1 -1
- package/lib/scheduling/helpers/index.js +159 -14
- package/lib/scheduling/helpers/index.js.map +1 -1
- package/lib/scheduling/helpers/intervalCovers.js +13 -7
- package/lib/scheduling/helpers/intervalCovers.js.map +1 -1
- package/lib/scheduling/helpers/intervalIntersectsEnd.js +13 -7
- package/lib/scheduling/helpers/intervalIntersectsEnd.js.map +1 -1
- package/lib/scheduling/helpers/intervalIntersectsStart.js +13 -7
- package/lib/scheduling/helpers/intervalIntersectsStart.js.map +1 -1
- package/lib/scheduling/helpers/intervalOnlyIntersectsEnd.js +15 -10
- package/lib/scheduling/helpers/intervalOnlyIntersectsEnd.js.map +1 -1
- package/lib/scheduling/helpers/intervalOnlyIntersectsStart.js +15 -10
- package/lib/scheduling/helpers/intervalOnlyIntersectsStart.js.map +1 -1
- package/lib/scheduling/helpers/intervalOutside.js +15 -9
- package/lib/scheduling/helpers/intervalOutside.js.map +1 -1
- package/lib/scheduling/helpers/intervalWithin.js +13 -7
- package/lib/scheduling/helpers/intervalWithin.js.map +1 -1
- package/lib/scheduling/helpers/mergeIntervals.js +21 -17
- package/lib/scheduling/helpers/mergeIntervals.js.map +1 -1
- package/lib/scheduling/helpers/splitIntervals.js +24 -23
- package/lib/scheduling/helpers/splitIntervals.js.map +1 -1
- package/lib/scheduling/index.js +38 -3
- package/lib/scheduling/index.js.map +1 -1
- package/lib/scheduling/scheduling.types.js +9 -3
- package/lib/scheduling/scheduling.types.js.map +1 -1
- package/lib/scheduling/strategies/getNext.js +57 -63
- package/lib/scheduling/strategies/getNext.js.map +1 -1
- package/lib/scheduling/strategies/getNextExactDateOfMonth.js +47 -56
- package/lib/scheduling/strategies/getNextExactDateOfMonth.js.map +1 -1
- package/lib/scheduling/strategies/getNextLastDayOfMonth.js +43 -51
- package/lib/scheduling/strategies/getNextLastDayOfMonth.js.map +1 -1
- package/lib/scheduling/strategies/getNextLastWeekdayOfMonth.js +49 -56
- package/lib/scheduling/strategies/getNextLastWeekdayOfMonth.js.map +1 -1
- package/lib/scheduling/strategies/getNextNoRepeat.js +25 -36
- package/lib/scheduling/strategies/getNextNoRepeat.js.map +1 -1
- package/lib/scheduling/strategies/getNextWeekday.js +47 -79
- package/lib/scheduling/strategies/getNextWeekday.js.map +1 -1
- package/lib/scheduling/strategies/getNextXDayOfXWeekOfMonth.js +52 -58
- package/lib/scheduling/strategies/getNextXDayOfXWeekOfMonth.js.map +1 -1
- package/lib/scheduling/strategies/index.js +82 -7
- package/lib/scheduling/strategies/index.js.map +1 -1
- package/lib/schema/index.js +16 -1
- package/lib/schema/index.js.map +1 -1
- package/lib/schema/schema.js +28 -34
- package/lib/schema/schema.js.map +1 -1
- package/lib/service-hours/__helpers__/calculate-hours.js +24 -22
- package/lib/service-hours/__helpers__/calculate-hours.js.map +1 -1
- package/lib/service-hours/__helpers__/isOpen.js +25 -24
- package/lib/service-hours/__helpers__/isOpen.js.map +1 -1
- package/lib/service-hours/index.js +27 -2
- package/lib/service-hours/index.js.map +1 -1
- package/lib/service-hours/schema.js +68 -55
- package/lib/service-hours/schema.js.map +1 -1
- package/package.json +86 -86
- package/vitest.config.ts +23 -23
- package/vitest.setup.js +7 -7
package/lib/pdf/helpers/index.js
CHANGED
|
@@ -1,16 +1,195 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "buildAuditContent", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _buildAuditContent.buildAuditContent;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "buildAuditFollowUps", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _buildAuditFollowUps.buildAuditFollowUps;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(exports, "buildLocationScansBoundaries", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () {
|
|
21
|
+
return _buildLocationScansContent.buildLocationScansBoundaries;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(exports, "buildLocationScansContent", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function () {
|
|
27
|
+
return _buildLocationScansContent.buildLocationScansContent;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
Object.defineProperty(exports, "buildSummaryField", {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
get: function () {
|
|
33
|
+
return _fields.buildSummaryField;
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
Object.defineProperty(exports, "buildTemplateContent", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function () {
|
|
39
|
+
return _buildTemplateContent.buildTemplateContent;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
Object.defineProperty(exports, "buildTemplateFieldRow", {
|
|
43
|
+
enumerable: true,
|
|
44
|
+
get: function () {
|
|
45
|
+
return _fields.buildTemplateFieldRow;
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
Object.defineProperty(exports, "convertToPdfMake", {
|
|
49
|
+
enumerable: true,
|
|
50
|
+
get: function () {
|
|
51
|
+
return _htmlTransformer.convertToPdfMake;
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
Object.defineProperty(exports, "defaultFooter", {
|
|
55
|
+
enumerable: true,
|
|
56
|
+
get: function () {
|
|
57
|
+
return _defaultFooter.defaultFooter;
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
Object.defineProperty(exports, "defaultHeader", {
|
|
61
|
+
enumerable: true,
|
|
62
|
+
get: function () {
|
|
63
|
+
return _defaultHeader.defaultHeader;
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
Object.defineProperty(exports, "defaultStyles", {
|
|
67
|
+
enumerable: true,
|
|
68
|
+
get: function () {
|
|
69
|
+
return _defaultStyles.defaultStyles;
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
Object.defineProperty(exports, "fourColumnTable", {
|
|
73
|
+
enumerable: true,
|
|
74
|
+
get: function () {
|
|
75
|
+
return _table.fourColumnTable;
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
Object.defineProperty(exports, "generateDefinition", {
|
|
79
|
+
enumerable: true,
|
|
80
|
+
get: function () {
|
|
81
|
+
return _generateDefinition.generateDefinition;
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
Object.defineProperty(exports, "getFormattedAddress", {
|
|
85
|
+
enumerable: true,
|
|
86
|
+
get: function () {
|
|
87
|
+
return _formatLocationAddress.getFormattedAddress;
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
Object.defineProperty(exports, "getStyleAttributes", {
|
|
91
|
+
enumerable: true,
|
|
92
|
+
get: function () {
|
|
93
|
+
return _htmlTransformer.getStyleAttributes;
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
Object.defineProperty(exports, "horizontalLine", {
|
|
97
|
+
enumerable: true,
|
|
98
|
+
get: function () {
|
|
99
|
+
return _horizontalLine.horizontalLine;
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
Object.defineProperty(exports, "imageTables", {
|
|
103
|
+
enumerable: true,
|
|
104
|
+
get: function () {
|
|
105
|
+
return _table.imageTables;
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
Object.defineProperty(exports, "parseHtml", {
|
|
109
|
+
enumerable: true,
|
|
110
|
+
get: function () {
|
|
111
|
+
return _htmlTransformer.parseHtml;
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
Object.defineProperty(exports, "parseValue", {
|
|
115
|
+
enumerable: true,
|
|
116
|
+
get: function () {
|
|
117
|
+
return _parseValue.parseValue;
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
Object.defineProperty(exports, "sixColumnTable", {
|
|
121
|
+
enumerable: true,
|
|
122
|
+
get: function () {
|
|
123
|
+
return _table.sixColumnTable;
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
Object.defineProperty(exports, "summaryFieldsTable", {
|
|
127
|
+
enumerable: true,
|
|
128
|
+
get: function () {
|
|
129
|
+
return _table.summaryFieldsTable;
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
Object.defineProperty(exports, "summaryStatTable", {
|
|
133
|
+
enumerable: true,
|
|
134
|
+
get: function () {
|
|
135
|
+
return _table.summaryStatTable;
|
|
136
|
+
}
|
|
137
|
+
});
|
|
138
|
+
Object.defineProperty(exports, "summaryWrapperTable", {
|
|
139
|
+
enumerable: true,
|
|
140
|
+
get: function () {
|
|
141
|
+
return _table.summaryWrapperTable;
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
Object.defineProperty(exports, "table", {
|
|
145
|
+
enumerable: true,
|
|
146
|
+
get: function () {
|
|
147
|
+
return _table.table;
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
Object.defineProperty(exports, "text", {
|
|
151
|
+
enumerable: true,
|
|
152
|
+
get: function () {
|
|
153
|
+
return _text.text;
|
|
154
|
+
}
|
|
155
|
+
});
|
|
156
|
+
Object.defineProperty(exports, "threeColumnTable", {
|
|
157
|
+
enumerable: true,
|
|
158
|
+
get: function () {
|
|
159
|
+
return _table.threeColumnTable;
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
Object.defineProperty(exports, "toPdf", {
|
|
163
|
+
enumerable: true,
|
|
164
|
+
get: function () {
|
|
165
|
+
return _htmlTransformer.toPdf;
|
|
166
|
+
}
|
|
167
|
+
});
|
|
168
|
+
Object.defineProperty(exports, "twoColumnTable", {
|
|
169
|
+
enumerable: true,
|
|
170
|
+
get: function () {
|
|
171
|
+
return _table.twoColumnTable;
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
Object.defineProperty(exports, "zebraFillColor", {
|
|
175
|
+
enumerable: true,
|
|
176
|
+
get: function () {
|
|
177
|
+
return _table.zebraFillColor;
|
|
178
|
+
}
|
|
179
|
+
});
|
|
180
|
+
var _buildAuditContent = require("./build-audit-content");
|
|
181
|
+
var _buildAuditFollowUps = require("./build-audit-follow-ups");
|
|
182
|
+
var _buildLocationScansContent = require("./build-location-scans-content");
|
|
183
|
+
var _buildTemplateContent = require("./build-template-content");
|
|
184
|
+
var _defaultFooter = require("./default-footer");
|
|
185
|
+
var _defaultHeader = require("./default-header");
|
|
186
|
+
var _defaultStyles = require("./default-styles");
|
|
187
|
+
var _fields = require("./fields");
|
|
188
|
+
var _formatLocationAddress = require("./format-location-address");
|
|
189
|
+
var _generateDefinition = require("./generate-definition");
|
|
190
|
+
var _horizontalLine = require("./horizontal-line");
|
|
191
|
+
var _htmlTransformer = require("./html-transformer");
|
|
192
|
+
var _parseValue = require("./parse-value");
|
|
193
|
+
var _table = require("./table");
|
|
194
|
+
var _text = require("./text");
|
|
16
195
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["
|
|
1
|
+
{"version":3,"file":"index.js","names":["_buildAuditContent","require","_buildAuditFollowUps","_buildLocationScansContent","_buildTemplateContent","_defaultFooter","_defaultHeader","_defaultStyles","_fields","_formatLocationAddress","_generateDefinition","_horizontalLine","_htmlTransformer","_parseValue","_table","_text"],"sources":["../../../src/pdf/helpers/index.js"],"sourcesContent":["export { buildAuditContent } from './build-audit-content'\r\nexport { buildAuditFollowUps } from './build-audit-follow-ups'\r\nexport {\r\n buildLocationScansContent,\r\n buildLocationScansBoundaries,\r\n} from './build-location-scans-content'\r\nexport { buildTemplateContent } from './build-template-content'\r\nexport { defaultFooter } from './default-footer'\r\nexport { defaultHeader } from './default-header'\r\nexport { defaultStyles } from './default-styles'\r\nexport { buildSummaryField, buildTemplateFieldRow } from './fields'\r\nexport { getFormattedAddress } from './format-location-address'\r\nexport { generateDefinition } from './generate-definition'\r\nexport { horizontalLine } from './horizontal-line'\r\nexport {\r\n convertToPdfMake,\r\n getStyleAttributes,\r\n parseHtml,\r\n toPdf,\r\n} from './html-transformer'\r\nexport { parseValue } from './parse-value'\r\nexport {\r\n fourColumnTable,\r\n imageTables,\r\n sixColumnTable,\r\n summaryFieldsTable,\r\n summaryStatTable,\r\n summaryWrapperTable,\r\n table,\r\n threeColumnTable,\r\n twoColumnTable,\r\n zebraFillColor,\r\n} from './table'\r\nexport { text } from './text'\r\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,kBAAA,GAAAC,OAAA;AACA,IAAAC,oBAAA,GAAAD,OAAA;AACA,IAAAE,0BAAA,GAAAF,OAAA;AAIA,IAAAG,qBAAA,GAAAH,OAAA;AACA,IAAAI,cAAA,GAAAJ,OAAA;AACA,IAAAK,cAAA,GAAAL,OAAA;AACA,IAAAM,cAAA,GAAAN,OAAA;AACA,IAAAO,OAAA,GAAAP,OAAA;AACA,IAAAQ,sBAAA,GAAAR,OAAA;AACA,IAAAS,mBAAA,GAAAT,OAAA;AACA,IAAAU,eAAA,GAAAV,OAAA;AACA,IAAAW,gBAAA,GAAAX,OAAA;AAMA,IAAAY,WAAA,GAAAZ,OAAA;AACA,IAAAa,MAAA,GAAAb,OAAA;AAYA,IAAAc,KAAA,GAAAd,OAAA","ignoreList":[]}
|
|
@@ -1,11 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.parseValue = parseValue;
|
|
7
|
+
var _lodash = require("lodash");
|
|
8
|
+
function parseValue(value) {
|
|
3
9
|
// map switches to text
|
|
4
|
-
if (isBoolean(value)) {
|
|
10
|
+
if ((0, _lodash.isBoolean)(value)) {
|
|
5
11
|
return value ? 'Yes' : 'No';
|
|
6
12
|
}
|
|
7
13
|
// handle empty arrays & objects
|
|
8
|
-
if (isObjectLike(value) && isEmpty(value)) {
|
|
14
|
+
if ((0, _lodash.isObjectLike)(value) && (0, _lodash.isEmpty)(value)) {
|
|
9
15
|
return '';
|
|
10
16
|
}
|
|
11
17
|
return value || '';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["
|
|
1
|
+
{"version":3,"file":"index.js","names":["_lodash","require","parseValue","value","isBoolean","isObjectLike","isEmpty"],"sources":["../../../../src/pdf/helpers/parse-value/index.js"],"sourcesContent":["import { isBoolean, isEmpty, isObjectLike } from 'lodash'\r\n\r\nexport function parseValue(value) {\r\n // map switches to text\r\n if (isBoolean(value)) {\r\n return value ? 'Yes' : 'No'\r\n }\r\n // handle empty arrays & objects\r\n if (isObjectLike(value) && isEmpty(value)) {\r\n return ''\r\n }\r\n\r\n return value || ''\r\n}\r\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAEO,SAASC,UAAUA,CAACC,KAAK,EAAE;EAChC;EACA,IAAI,IAAAC,iBAAS,EAACD,KAAK,CAAC,EAAE;IACpB,OAAOA,KAAK,GAAG,KAAK,GAAG,IAAI;EAC7B;EACA;EACA,IAAI,IAAAE,oBAAY,EAACF,KAAK,CAAC,IAAI,IAAAG,eAAO,EAACH,KAAK,CAAC,EAAE;IACzC,OAAO,EAAE;EACX;EAEA,OAAOA,KAAK,IAAI,EAAE;AACpB","ignoreList":[]}
|
|
@@ -1,236 +1,167 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.WHITE = exports.LIGHT_BLUE = exports.GRAY = void 0;
|
|
8
|
+
exports.fourColumnTable = fourColumnTable;
|
|
9
|
+
exports.imageTables = imageTables;
|
|
10
|
+
exports.sixColumnTable = sixColumnTable;
|
|
11
|
+
exports.summaryFieldsTable = summaryFieldsTable;
|
|
12
|
+
exports.summaryStatTable = summaryStatTable;
|
|
13
|
+
exports.summaryWrapperTable = summaryWrapperTable;
|
|
14
|
+
exports.table = table;
|
|
15
|
+
exports.threeColumnTable = threeColumnTable;
|
|
16
|
+
exports.twoColumnTable = twoColumnTable;
|
|
17
|
+
exports.zebraFillColor = zebraFillColor;
|
|
18
|
+
var _lodash = require("lodash");
|
|
19
|
+
var _bluebird = _interopRequireDefault(require("bluebird"));
|
|
20
|
+
var _constants = require("../../../constants");
|
|
21
|
+
var _ = require("../");
|
|
22
|
+
const defaultLayout = {
|
|
9
23
|
fillColor: zebraFillColor,
|
|
10
|
-
hLineWidth:
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
paddingRight: function paddingRight() {
|
|
17
|
-
return 5;
|
|
18
|
-
},
|
|
19
|
-
paddingTop: function paddingTop() {
|
|
20
|
-
return 5;
|
|
21
|
-
},
|
|
22
|
-
paddingBottom: function paddingBottom() {
|
|
23
|
-
return 5;
|
|
24
|
-
},
|
|
25
|
-
vLineWidth: function vLineWidth() {
|
|
26
|
-
return 0;
|
|
27
|
-
}
|
|
24
|
+
hLineWidth: () => 0,
|
|
25
|
+
paddingLeft: () => 5,
|
|
26
|
+
paddingRight: () => 5,
|
|
27
|
+
paddingTop: () => 5,
|
|
28
|
+
paddingBottom: () => 5,
|
|
29
|
+
vLineWidth: () => 0
|
|
28
30
|
};
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
31
|
+
const GRAY = exports.GRAY = '#DDDDDD';
|
|
32
|
+
const LIGHT_BLUE = exports.LIGHT_BLUE = '#F0FBFF';
|
|
33
|
+
const WHITE = exports.WHITE = '#FFFFFF';
|
|
34
|
+
function imageTables(images) {
|
|
35
|
+
const imageRows = (0, _lodash.chunk)(images, _constants.DEFAULT_IMAGE_COLUMN_LENGTH);
|
|
36
|
+
const tables = (0, _lodash.map)(imageRows, (imageRow, index) => {
|
|
37
|
+
const defaultRow = (0, _lodash.fill)(Array(_constants.DEFAULT_IMAGE_COLUMN_LENGTH), {
|
|
36
38
|
text: ''
|
|
37
39
|
});
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
40
|
+
const row = (0, _lodash.concat)(imageRow, (0, _lodash.slice)(defaultRow, imageRow.length));
|
|
41
|
+
const isMiddleRow = index !== 1 && index !== imageRows.length;
|
|
42
|
+
const margin = isMiddleRow ? 5 : 0;
|
|
41
43
|
return [{
|
|
42
44
|
headerRows: 0,
|
|
43
45
|
table: {
|
|
44
|
-
body: [
|
|
46
|
+
body: [[...row]],
|
|
45
47
|
widths: ['*', '*']
|
|
46
48
|
},
|
|
47
49
|
layout: {
|
|
48
|
-
hLineColor:
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
},
|
|
57
|
-
paddingRight: function paddingRight() {
|
|
58
|
-
return 5;
|
|
59
|
-
},
|
|
60
|
-
paddingTop: function paddingTop() {
|
|
61
|
-
return 5;
|
|
62
|
-
},
|
|
63
|
-
paddingBottom: function paddingBottom() {
|
|
64
|
-
return 5;
|
|
65
|
-
},
|
|
66
|
-
vLineColor: function vLineColor() {
|
|
67
|
-
return GRAY;
|
|
68
|
-
},
|
|
69
|
-
vLineWidth: function vLineWidth() {
|
|
70
|
-
return 1;
|
|
71
|
-
}
|
|
50
|
+
hLineColor: () => GRAY,
|
|
51
|
+
hLineWidth: () => 1,
|
|
52
|
+
paddingLeft: () => 5,
|
|
53
|
+
paddingRight: () => 5,
|
|
54
|
+
paddingTop: () => 5,
|
|
55
|
+
paddingBottom: () => 5,
|
|
56
|
+
vLineColor: () => GRAY,
|
|
57
|
+
vLineWidth: () => 1
|
|
72
58
|
},
|
|
73
59
|
margin: [0, margin, 0, margin]
|
|
74
60
|
}];
|
|
75
61
|
});
|
|
76
62
|
return tables;
|
|
77
63
|
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
text: ''
|
|
100
|
-
});
|
|
101
|
-
_context.next = 1;
|
|
102
|
-
return Promise.map(fields, function (field) {
|
|
103
|
-
return buildSummaryField({
|
|
104
|
-
field: field,
|
|
105
|
-
settings: settings,
|
|
106
|
-
timezone: timezone
|
|
107
|
-
});
|
|
108
|
-
});
|
|
109
|
-
case 1:
|
|
110
|
-
tableRow = _context.sent;
|
|
111
|
-
// NOTE: a user can only select three summary fields on the template however
|
|
112
|
-
// if the form group is repeatable we could have more than the default
|
|
113
|
-
// summary field column length so cap otherwise pdf will fail to generate
|
|
114
|
-
headers = take(concat(tableHeader, slice(defaultHeaders, tableHeader.length)), DEFAULT_SUMMARY_FIELDS_COLUMN_LENGTH);
|
|
115
|
-
row = take(concat(tableRow, slice(defaultRow, tableRow.length)), DEFAULT_SUMMARY_FIELDS_COLUMN_LENGTH);
|
|
116
|
-
summaryFieldTable = table({
|
|
117
|
-
body: [headers, row],
|
|
118
|
-
colSpan: 5,
|
|
119
|
-
dontBreakRows: true,
|
|
120
|
-
headerRows: 0,
|
|
121
|
-
layout: {
|
|
122
|
-
hLineWidth: function hLineWidth() {
|
|
123
|
-
return 0;
|
|
124
|
-
},
|
|
125
|
-
paddingLeft: function paddingLeft() {
|
|
126
|
-
return 0;
|
|
127
|
-
},
|
|
128
|
-
paddingRight: function paddingRight() {
|
|
129
|
-
return 5;
|
|
130
|
-
},
|
|
131
|
-
paddingTop: function paddingTop() {
|
|
132
|
-
return 2;
|
|
133
|
-
},
|
|
134
|
-
paddingBottom: function paddingBottom() {
|
|
135
|
-
return 2;
|
|
136
|
-
},
|
|
137
|
-
vLineWidth: function vLineWidth() {
|
|
138
|
-
return 0;
|
|
139
|
-
}
|
|
140
|
-
},
|
|
141
|
-
// NOTE: pdfmake applies margin/padding to nested tables
|
|
142
|
-
margin: [0, -5, 0, 0],
|
|
143
|
-
widths: ['*', '*', '*']
|
|
144
|
-
});
|
|
145
|
-
return _context.abrupt("return", summaryFieldTable);
|
|
146
|
-
case 2:
|
|
147
|
-
case "end":
|
|
148
|
-
return _context.stop();
|
|
149
|
-
}
|
|
150
|
-
}, _callee);
|
|
64
|
+
async function summaryFieldsTable({
|
|
65
|
+
fields,
|
|
66
|
+
settings,
|
|
67
|
+
timezone
|
|
68
|
+
}) {
|
|
69
|
+
const tableHeader = (0, _lodash.map)(fields, ({
|
|
70
|
+
label
|
|
71
|
+
}) => (0, _.text)(label, {
|
|
72
|
+
bold: true,
|
|
73
|
+
fontSize: 7
|
|
74
|
+
}));
|
|
75
|
+
const defaultHeaders = (0, _lodash.fill)(Array(_constants.DEFAULT_SUMMARY_FIELDS_COLUMN_LENGTH), {
|
|
76
|
+
text: ''
|
|
77
|
+
});
|
|
78
|
+
const defaultRow = (0, _lodash.fill)(Array(_constants.DEFAULT_SUMMARY_FIELDS_COLUMN_LENGTH), {
|
|
79
|
+
text: ''
|
|
80
|
+
});
|
|
81
|
+
const tableRow = await _bluebird.default.map(fields, field => (0, _.buildSummaryField)({
|
|
82
|
+
field,
|
|
83
|
+
settings,
|
|
84
|
+
timezone
|
|
151
85
|
}));
|
|
152
|
-
|
|
86
|
+
|
|
87
|
+
// NOTE: a user can only select three summary fields on the template however
|
|
88
|
+
// if the form group is repeatable we could have more than the default
|
|
89
|
+
// summary field column length so cap otherwise pdf will fail to generate
|
|
90
|
+
const headers = (0, _lodash.take)((0, _lodash.concat)(tableHeader, (0, _lodash.slice)(defaultHeaders, tableHeader.length)), _constants.DEFAULT_SUMMARY_FIELDS_COLUMN_LENGTH);
|
|
91
|
+
const row = (0, _lodash.take)((0, _lodash.concat)(tableRow, (0, _lodash.slice)(defaultRow, tableRow.length)), _constants.DEFAULT_SUMMARY_FIELDS_COLUMN_LENGTH);
|
|
92
|
+
const summaryFieldTable = table({
|
|
93
|
+
body: [headers, row],
|
|
94
|
+
colSpan: 5,
|
|
95
|
+
dontBreakRows: true,
|
|
96
|
+
headerRows: 0,
|
|
97
|
+
layout: {
|
|
98
|
+
hLineWidth: () => 0,
|
|
99
|
+
paddingLeft: () => 0,
|
|
100
|
+
paddingRight: () => 5,
|
|
101
|
+
paddingTop: () => 2,
|
|
102
|
+
paddingBottom: () => 2,
|
|
103
|
+
vLineWidth: () => 0
|
|
104
|
+
},
|
|
105
|
+
// NOTE: pdfmake applies margin/padding to nested tables
|
|
106
|
+
margin: [0, -5, 0, 0],
|
|
107
|
+
widths: ['*', '*', '*']
|
|
108
|
+
});
|
|
109
|
+
return summaryFieldTable;
|
|
153
110
|
}
|
|
154
|
-
|
|
155
|
-
|
|
111
|
+
function summaryStatTable(options) {
|
|
112
|
+
const tableOptions = (0, _lodash.defaults)({}, options, {
|
|
156
113
|
layout: {
|
|
157
114
|
fillColor: LIGHT_BLUE,
|
|
158
|
-
hLineWidth:
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
paddingRight: function paddingRight() {
|
|
165
|
-
return 10;
|
|
166
|
-
},
|
|
167
|
-
paddingTop: function paddingTop() {
|
|
168
|
-
return 2;
|
|
169
|
-
},
|
|
170
|
-
paddingBottom: function paddingBottom() {
|
|
171
|
-
return 2;
|
|
172
|
-
},
|
|
173
|
-
vLineWidth: function vLineWidth() {
|
|
174
|
-
return 0;
|
|
175
|
-
}
|
|
115
|
+
hLineWidth: () => 0,
|
|
116
|
+
paddingLeft: () => 10,
|
|
117
|
+
paddingRight: () => 10,
|
|
118
|
+
paddingTop: () => 2,
|
|
119
|
+
paddingBottom: () => 2,
|
|
120
|
+
vLineWidth: () => 0
|
|
176
121
|
},
|
|
177
122
|
widths: ['*']
|
|
178
123
|
});
|
|
179
124
|
return table(tableOptions);
|
|
180
125
|
}
|
|
181
|
-
|
|
182
|
-
|
|
126
|
+
function summaryWrapperTable(options) {
|
|
127
|
+
const tableOptions = (0, _lodash.defaults)({}, options, {
|
|
183
128
|
layout: {
|
|
184
129
|
fillColor: WHITE,
|
|
185
|
-
hLineWidth:
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
paddingRight: function paddingRight() {
|
|
192
|
-
return 10;
|
|
193
|
-
},
|
|
194
|
-
paddingTop: function paddingTop() {
|
|
195
|
-
return 0;
|
|
196
|
-
},
|
|
197
|
-
paddingBottom: function paddingBottom() {
|
|
198
|
-
return 0;
|
|
199
|
-
},
|
|
200
|
-
vLineWidth: function vLineWidth() {
|
|
201
|
-
return 0;
|
|
202
|
-
}
|
|
130
|
+
hLineWidth: () => 0,
|
|
131
|
+
paddingLeft: () => 0,
|
|
132
|
+
paddingRight: () => 10,
|
|
133
|
+
paddingTop: () => 0,
|
|
134
|
+
paddingBottom: () => 0,
|
|
135
|
+
vLineWidth: () => 0
|
|
203
136
|
},
|
|
204
137
|
style: 'summaryWrapperTable'
|
|
205
138
|
});
|
|
206
139
|
return table(tableOptions);
|
|
207
140
|
}
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
dontBreakRows =
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
layout: layout,
|
|
224
|
-
style: style,
|
|
141
|
+
function table(options) {
|
|
142
|
+
const {
|
|
143
|
+
body,
|
|
144
|
+
colSpan,
|
|
145
|
+
dontBreakRows = false,
|
|
146
|
+
headerRows = 1,
|
|
147
|
+
layout = defaultLayout,
|
|
148
|
+
style = 'table',
|
|
149
|
+
margin,
|
|
150
|
+
widths
|
|
151
|
+
} = options;
|
|
152
|
+
const definition = {
|
|
153
|
+
colSpan,
|
|
154
|
+
layout,
|
|
155
|
+
style,
|
|
225
156
|
table: {
|
|
226
|
-
body
|
|
157
|
+
body,
|
|
227
158
|
// NOTE: be wary of this feature, if a row spans multiple pages it won't
|
|
228
159
|
// be drawn on to the pdf, only pass true here when row will be less than
|
|
229
160
|
// a page
|
|
230
|
-
dontBreakRows
|
|
231
|
-
headerRows
|
|
161
|
+
dontBreakRows,
|
|
162
|
+
headerRows
|
|
232
163
|
},
|
|
233
|
-
margin
|
|
164
|
+
margin
|
|
234
165
|
};
|
|
235
166
|
|
|
236
167
|
// NOTE: only adds widths if passed
|
|
@@ -241,31 +172,31 @@ export function table(options) {
|
|
|
241
172
|
}
|
|
242
173
|
return definition;
|
|
243
174
|
}
|
|
244
|
-
|
|
245
|
-
|
|
175
|
+
function twoColumnTable(options) {
|
|
176
|
+
const tableOptions = (0, _lodash.defaults)({}, options, {
|
|
246
177
|
widths: ['50%', '50%']
|
|
247
178
|
});
|
|
248
179
|
return table(tableOptions);
|
|
249
180
|
}
|
|
250
|
-
|
|
251
|
-
|
|
181
|
+
function threeColumnTable(options) {
|
|
182
|
+
const tableOptions = (0, _lodash.defaults)({}, options, {
|
|
252
183
|
widths: ['33%', '33%', '*']
|
|
253
184
|
});
|
|
254
185
|
return table(tableOptions);
|
|
255
186
|
}
|
|
256
|
-
|
|
257
|
-
|
|
187
|
+
function fourColumnTable(options) {
|
|
188
|
+
const tableOptions = (0, _lodash.defaults)({}, options, {
|
|
258
189
|
widths: ['25%', '25%', '25%', '25%']
|
|
259
190
|
});
|
|
260
191
|
return table(tableOptions);
|
|
261
192
|
}
|
|
262
|
-
|
|
263
|
-
|
|
193
|
+
function sixColumnTable(options) {
|
|
194
|
+
const tableOptions = (0, _lodash.defaults)({}, options, {
|
|
264
195
|
widths: ['16.7%', '16.66%', '16.66%', '16.66%', '16.66%', '16.66%']
|
|
265
196
|
});
|
|
266
197
|
return table(tableOptions);
|
|
267
198
|
}
|
|
268
|
-
|
|
199
|
+
function zebraFillColor(index) {
|
|
269
200
|
return index % 2 === 0 ? WHITE : LIGHT_BLUE;
|
|
270
201
|
}
|
|
271
202
|
//# sourceMappingURL=index.js.map
|