gemcap-be-common 1.5.69 → 1.5.70
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/helpers/excel.helper.d.ts +1 -6
- package/helpers/excel.helper.js +10 -5
- package/helpers/excel.helper.ts +16 -11
- package/package.json +1 -1
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -22,12 +22,7 @@ export interface IExcelJsCell {
|
|
|
22
22
|
t?: string;
|
|
23
23
|
z?: string;
|
|
24
24
|
hyperlink?: string;
|
|
25
|
-
s?:
|
|
26
|
-
font?: Partial<ExcelJS.Font>;
|
|
27
|
-
alignment?: Partial<ExcelJS.Alignment>;
|
|
28
|
-
fill?: Partial<ExcelJS.FillPattern>;
|
|
29
|
-
border?: Partial<ExcelJS.Borders>;
|
|
30
|
-
};
|
|
25
|
+
s?: Partial<ExcelJS.Style>;
|
|
31
26
|
}
|
|
32
27
|
export declare const cellStyles: {
|
|
33
28
|
title: {
|
package/helpers/excel.helper.js
CHANGED
|
@@ -199,11 +199,16 @@ const convertDataToFileWithStyle = async (dataToConvert, options) => {
|
|
|
199
199
|
};
|
|
200
200
|
}
|
|
201
201
|
if (cell.s.fill) {
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
202
|
+
if (cell.s.fill.type === 'pattern') {
|
|
203
|
+
excelCell.fill = {
|
|
204
|
+
type: 'pattern',
|
|
205
|
+
pattern: cell.s.fill.pattern ?? 'solid',
|
|
206
|
+
...cell.s.fill,
|
|
207
|
+
};
|
|
208
|
+
}
|
|
209
|
+
else {
|
|
210
|
+
excelCell.fill = cell.s.fill;
|
|
211
|
+
}
|
|
207
212
|
}
|
|
208
213
|
if (cell.s.border) {
|
|
209
214
|
excelCell.border = cell.s.border;
|
package/helpers/excel.helper.ts
CHANGED
|
@@ -26,12 +26,13 @@ export interface IExcelJsCell {
|
|
|
26
26
|
t?: string;
|
|
27
27
|
z?: string;
|
|
28
28
|
hyperlink?: string;
|
|
29
|
-
s?: {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
};
|
|
29
|
+
// s?: {
|
|
30
|
+
// font?: Partial<ExcelJS.Font>;
|
|
31
|
+
// alignment?: Partial<ExcelJS.Alignment>;
|
|
32
|
+
// fill?: Partial<ExcelJS.FillPattern>;
|
|
33
|
+
// border?: Partial<ExcelJS.Borders>;
|
|
34
|
+
// };
|
|
35
|
+
s?: Partial<ExcelJS.Style>;
|
|
35
36
|
}
|
|
36
37
|
|
|
37
38
|
export const cellStyles = {
|
|
@@ -234,11 +235,15 @@ export const convertDataToFileWithStyle = async (
|
|
|
234
235
|
};
|
|
235
236
|
}
|
|
236
237
|
if (cell.s.fill) {
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
238
|
+
if (cell.s.fill.type === 'pattern') {
|
|
239
|
+
excelCell.fill = {
|
|
240
|
+
type: 'pattern',
|
|
241
|
+
pattern: cell.s.fill.pattern ?? 'solid',
|
|
242
|
+
...cell.s.fill,
|
|
243
|
+
};
|
|
244
|
+
} else {
|
|
245
|
+
excelCell.fill = cell.s.fill;
|
|
246
|
+
}
|
|
242
247
|
}
|
|
243
248
|
if (cell.s.border) {
|
|
244
249
|
excelCell.border = cell.s.border;
|