@corbe30/fortune-excel 1.0.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/.github/workflows/main.yml +30 -0
- package/.github/workflows/publish.yml +30 -0
- package/.storybook/main.ts +18 -0
- package/.storybook/preview.ts +15 -0
- package/LICENSE +21 -0
- package/README.md +59 -0
- package/dist/HandleZip.d.ts +8 -0
- package/dist/HandleZip.js +37 -0
- package/dist/ICommon.d.ts +34 -0
- package/dist/ICommon.js +1 -0
- package/dist/ToExcel/ExcelBorder.d.ts +3 -0
- package/dist/ToExcel/ExcelBorder.js +1412 -0
- package/dist/ToExcel/ExcelConvert.d.ts +16 -0
- package/dist/ToExcel/ExcelConvert.js +92 -0
- package/dist/ToExcel/ExcelFile.d.ts +1 -0
- package/dist/ToExcel/ExcelFile.js +30 -0
- package/dist/ToExcel/ExcelImage.d.ts +2 -0
- package/dist/ToExcel/ExcelImage.js +64 -0
- package/dist/ToExcel/ExcelStyle.d.ts +3 -0
- package/dist/ToExcel/ExcelStyle.js +53 -0
- package/dist/ToFortuneSheet/FortuneBase.d.ts +133 -0
- package/dist/ToFortuneSheet/FortuneBase.js +28 -0
- package/dist/ToFortuneSheet/FortuneCell.d.ts +25 -0
- package/dist/ToFortuneSheet/FortuneCell.js +782 -0
- package/dist/ToFortuneSheet/FortuneFile.d.ts +50 -0
- package/dist/ToFortuneSheet/FortuneFile.js +432 -0
- package/dist/ToFortuneSheet/FortuneImage.d.ts +20 -0
- package/dist/ToFortuneSheet/FortuneImage.js +51 -0
- package/dist/ToFortuneSheet/FortuneSheet.d.ts +36 -0
- package/dist/ToFortuneSheet/FortuneSheet.js +581 -0
- package/dist/ToFortuneSheet/IFortune.d.ts +301 -0
- package/dist/ToFortuneSheet/IFortune.js +1 -0
- package/dist/ToFortuneSheet/ReadXml.d.ts +61 -0
- package/dist/ToFortuneSheet/ReadXml.js +337 -0
- package/dist/common/constant.d.ts +25 -0
- package/dist/common/constant.js +277 -0
- package/dist/common/emf.d.ts +3 -0
- package/dist/common/emf.js +1294 -0
- package/dist/common/method.d.ts +132 -0
- package/dist/common/method.js +1075 -0
- package/dist/main.d.ts +2 -0
- package/dist/main.js +24 -0
- package/package.json +47 -0
- package/tsconfig.json +13 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { stringToNum, IattributeList, IDataVerificationMap, IDataVerificationType2Map } from "../ICommon.js";
|
|
2
|
+
export declare const columeHeader_word: string[];
|
|
3
|
+
export declare const columeHeader_word_index: stringToNum;
|
|
4
|
+
export declare const coreFile = "docProps/core.xml";
|
|
5
|
+
export declare const appFile = "docProps/app.xml";
|
|
6
|
+
export declare const contentTypesFile = "[Content_Types].xml";
|
|
7
|
+
export declare const workBookFile = "xl/workbook.xml";
|
|
8
|
+
export declare const calcChainFile = "xl/calcChain.xml";
|
|
9
|
+
export declare const stylesFile = "xl/styles.xml";
|
|
10
|
+
export declare const sharedStringsFile = "xl/sharedStrings.xml";
|
|
11
|
+
export declare const worksheetFilePath = "xl/worksheets/";
|
|
12
|
+
export declare const theme1File = "xl/theme/theme1.xml";
|
|
13
|
+
export declare const workbookRels = "xl/_rels/workbook.xml.rels";
|
|
14
|
+
export declare const ST_CellType: IattributeList;
|
|
15
|
+
export declare const BuiltInCellStyles: IattributeList;
|
|
16
|
+
export declare let numFmtDefault: IattributeList;
|
|
17
|
+
export declare const indexedColors: IattributeList;
|
|
18
|
+
export declare const OEM_CHARSET: IattributeList;
|
|
19
|
+
export declare const borderTypes: stringToNum;
|
|
20
|
+
export declare let numFmtDefaultMap: IattributeList;
|
|
21
|
+
export declare const fontFamilys: IattributeList;
|
|
22
|
+
export declare const DATA_VERIFICATION_MAP: IDataVerificationMap;
|
|
23
|
+
export declare const COMMON_TYPE2: string[];
|
|
24
|
+
export declare const DATA_VERIFICATION_TYPE2_MAP: IDataVerificationType2Map;
|
|
25
|
+
export declare const ALIGNMENT_DEFAULT: number;
|
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
export const columeHeader_word = [
|
|
2
|
+
"A",
|
|
3
|
+
"B",
|
|
4
|
+
"C",
|
|
5
|
+
"D",
|
|
6
|
+
"E",
|
|
7
|
+
"F",
|
|
8
|
+
"G",
|
|
9
|
+
"H",
|
|
10
|
+
"I",
|
|
11
|
+
"J",
|
|
12
|
+
"K",
|
|
13
|
+
"L",
|
|
14
|
+
"M",
|
|
15
|
+
"N",
|
|
16
|
+
"O",
|
|
17
|
+
"P",
|
|
18
|
+
"Q",
|
|
19
|
+
"R",
|
|
20
|
+
"S",
|
|
21
|
+
"T",
|
|
22
|
+
"U",
|
|
23
|
+
"V",
|
|
24
|
+
"W",
|
|
25
|
+
"X",
|
|
26
|
+
"Y",
|
|
27
|
+
"Z",
|
|
28
|
+
];
|
|
29
|
+
export const columeHeader_word_index = {
|
|
30
|
+
A: 0,
|
|
31
|
+
B: 1,
|
|
32
|
+
C: 2,
|
|
33
|
+
D: 3,
|
|
34
|
+
E: 4,
|
|
35
|
+
F: 5,
|
|
36
|
+
G: 6,
|
|
37
|
+
H: 7,
|
|
38
|
+
I: 8,
|
|
39
|
+
J: 9,
|
|
40
|
+
K: 10,
|
|
41
|
+
L: 11,
|
|
42
|
+
M: 12,
|
|
43
|
+
N: 13,
|
|
44
|
+
O: 14,
|
|
45
|
+
P: 15,
|
|
46
|
+
Q: 16,
|
|
47
|
+
R: 17,
|
|
48
|
+
S: 18,
|
|
49
|
+
T: 19,
|
|
50
|
+
U: 20,
|
|
51
|
+
V: 21,
|
|
52
|
+
W: 22,
|
|
53
|
+
X: 23,
|
|
54
|
+
Y: 24,
|
|
55
|
+
Z: 25,
|
|
56
|
+
};
|
|
57
|
+
export const coreFile = "docProps/core.xml";
|
|
58
|
+
export const appFile = "docProps/app.xml";
|
|
59
|
+
export const contentTypesFile = "[Content_Types].xml";
|
|
60
|
+
export const workBookFile = "xl/workbook.xml";
|
|
61
|
+
export const calcChainFile = "xl/calcChain.xml";
|
|
62
|
+
export const stylesFile = "xl/styles.xml";
|
|
63
|
+
export const sharedStringsFile = "xl/sharedStrings.xml";
|
|
64
|
+
export const worksheetFilePath = "xl/worksheets/";
|
|
65
|
+
export const theme1File = "xl/theme/theme1.xml";
|
|
66
|
+
export const workbookRels = "xl/_rels/workbook.xml.rels";
|
|
67
|
+
//Excel Built-In cell type
|
|
68
|
+
export const ST_CellType = {
|
|
69
|
+
Boolean: "b",
|
|
70
|
+
Date: "d",
|
|
71
|
+
Error: "e",
|
|
72
|
+
InlineString: "inlineStr",
|
|
73
|
+
Number: "n",
|
|
74
|
+
SharedString: "s",
|
|
75
|
+
String: "str",
|
|
76
|
+
};
|
|
77
|
+
//Excel Built-In cell style
|
|
78
|
+
export const BuiltInCellStyles = {
|
|
79
|
+
"0": "Normal",
|
|
80
|
+
};
|
|
81
|
+
export let numFmtDefault = {
|
|
82
|
+
"0": "General",
|
|
83
|
+
"1": "0",
|
|
84
|
+
"2": "0.00",
|
|
85
|
+
"3": "#,##0",
|
|
86
|
+
"4": "#,##0.00",
|
|
87
|
+
"9": "0%",
|
|
88
|
+
"10": "0.00%",
|
|
89
|
+
"11": "0.00E+00",
|
|
90
|
+
"12": "# ?/?",
|
|
91
|
+
"13": "# ??/??",
|
|
92
|
+
"14": "m/d/yy",
|
|
93
|
+
"15": "d-mmm-yy",
|
|
94
|
+
"16": "d-mmm",
|
|
95
|
+
"17": "mmm-yy",
|
|
96
|
+
"18": "h:mm AM/PM",
|
|
97
|
+
"19": "h:mm:ss AM/PM",
|
|
98
|
+
"20": "h:mm",
|
|
99
|
+
"21": "h:mm:ss",
|
|
100
|
+
"22": "m/d/yy h:mm",
|
|
101
|
+
"37": "#,##0 ;(#,##0)",
|
|
102
|
+
"38": "#,##0 ;[Red](#,##0)",
|
|
103
|
+
"39": "#,##0.00;(#,##0.00)",
|
|
104
|
+
"40": "#,##0.00;[Red](#,##0.00)",
|
|
105
|
+
"45": "mm:ss",
|
|
106
|
+
"46": "[h]:mm:ss",
|
|
107
|
+
"47": "mmss.0",
|
|
108
|
+
"48": "##0.0E+0",
|
|
109
|
+
"49": "@",
|
|
110
|
+
};
|
|
111
|
+
export const indexedColors = {
|
|
112
|
+
"0": "00000000",
|
|
113
|
+
"1": "00FFFFFF",
|
|
114
|
+
"2": "00FF0000",
|
|
115
|
+
"3": "0000FF00",
|
|
116
|
+
"4": "000000FF",
|
|
117
|
+
"5": "00FFFF00",
|
|
118
|
+
"6": "00FF00FF",
|
|
119
|
+
"7": "0000FFFF",
|
|
120
|
+
"8": "00000000",
|
|
121
|
+
"9": "00FFFFFF",
|
|
122
|
+
"10": "00FF0000",
|
|
123
|
+
"11": "0000FF00",
|
|
124
|
+
"12": "000000FF",
|
|
125
|
+
"13": "00FFFF00",
|
|
126
|
+
"14": "00FF00FF",
|
|
127
|
+
"15": "0000FFFF",
|
|
128
|
+
"16": "00800000",
|
|
129
|
+
"17": "00008000",
|
|
130
|
+
"18": "00000080",
|
|
131
|
+
"19": "00808000",
|
|
132
|
+
"20": "00800080",
|
|
133
|
+
"21": "00008080",
|
|
134
|
+
"22": "00C0C0C0",
|
|
135
|
+
"23": "00808080",
|
|
136
|
+
"24": "009999FF",
|
|
137
|
+
"25": "00993366",
|
|
138
|
+
"26": "00FFFFCC",
|
|
139
|
+
"27": "00CCFFFF",
|
|
140
|
+
"28": "00660066",
|
|
141
|
+
"29": "00FF8080",
|
|
142
|
+
"30": "000066CC",
|
|
143
|
+
"31": "00CCCCFF",
|
|
144
|
+
"32": "00000080",
|
|
145
|
+
"33": "00FF00FF",
|
|
146
|
+
"34": "00FFFF00",
|
|
147
|
+
"35": "0000FFFF",
|
|
148
|
+
"36": "00800080",
|
|
149
|
+
"37": "00800000",
|
|
150
|
+
"38": "00008080",
|
|
151
|
+
"39": "000000FF",
|
|
152
|
+
"40": "0000CCFF",
|
|
153
|
+
"41": "00CCFFFF",
|
|
154
|
+
"42": "00CCFFCC",
|
|
155
|
+
"43": "00FFFF99",
|
|
156
|
+
"44": "0099CCFF",
|
|
157
|
+
"45": "00FF99CC",
|
|
158
|
+
"46": "00CC99FF",
|
|
159
|
+
"47": "00FFCC99",
|
|
160
|
+
"48": "003366FF",
|
|
161
|
+
"49": "0033CCCC",
|
|
162
|
+
"50": "0099CC00",
|
|
163
|
+
"51": "00FFCC00",
|
|
164
|
+
"52": "00FF9900",
|
|
165
|
+
"53": "00FF6600",
|
|
166
|
+
"54": "00666699",
|
|
167
|
+
"55": "00969696",
|
|
168
|
+
"56": "00003366",
|
|
169
|
+
"57": "00339966",
|
|
170
|
+
"58": "00003300",
|
|
171
|
+
"59": "00333300",
|
|
172
|
+
"60": "00993300",
|
|
173
|
+
"61": "00993366",
|
|
174
|
+
"62": "00333399",
|
|
175
|
+
"63": "00333333",
|
|
176
|
+
"64": null, //system Foreground n/a
|
|
177
|
+
"65": null, //system Background n/a
|
|
178
|
+
};
|
|
179
|
+
export const OEM_CHARSET = {
|
|
180
|
+
"0": "ANSI_CHARSET",
|
|
181
|
+
"1": "DEFAULT_CHARSET",
|
|
182
|
+
"2": "SYMBOL_CHARSET",
|
|
183
|
+
"77": "MAC_CHARSET",
|
|
184
|
+
"128": "SHIFTJIS_CHARSET",
|
|
185
|
+
"129": "HANGUL_CHARSET",
|
|
186
|
+
"130": "JOHAB_CHARSET",
|
|
187
|
+
"134": "GB2312_CHARSET",
|
|
188
|
+
"136": "CHINESEBIG5_CHARSET",
|
|
189
|
+
"161": "GREEK_CHARSET",
|
|
190
|
+
"162": "TURKISH_CHARSET",
|
|
191
|
+
"163": "VIETNAMESE_CHARSET",
|
|
192
|
+
"177": "HEBREW_CHARSET",
|
|
193
|
+
"178": "ARABIC_CHARSET",
|
|
194
|
+
"186": "BALTIC_CHARSET",
|
|
195
|
+
"204": "RUSSIAN_CHARSET",
|
|
196
|
+
"222": "THAI_CHARSET",
|
|
197
|
+
"238": "EASTEUROPE_CHARSET",
|
|
198
|
+
"255": "OEM_CHARSET",
|
|
199
|
+
};
|
|
200
|
+
export const borderTypes = {
|
|
201
|
+
none: 0,
|
|
202
|
+
thin: 1,
|
|
203
|
+
hair: 2,
|
|
204
|
+
dotted: 3,
|
|
205
|
+
dashed: 4,
|
|
206
|
+
dashDot: 5,
|
|
207
|
+
dashDotDot: 6,
|
|
208
|
+
double: 7,
|
|
209
|
+
medium: 8,
|
|
210
|
+
mediumDashed: 9,
|
|
211
|
+
mediumDashDot: 10,
|
|
212
|
+
mediumDashDotDot: 11,
|
|
213
|
+
slantDashDot: 12,
|
|
214
|
+
thick: 13,
|
|
215
|
+
};
|
|
216
|
+
export let numFmtDefaultMap = {
|
|
217
|
+
"yyyy/m/d;@": "yyyy/MM/dd",
|
|
218
|
+
"yyyy"年"m"月"d"日";@": "yyyy"年"MM"月"dd"日"",
|
|
219
|
+
"[$-409]yyyy/m/d\\ h:mm\\ AM/PM;@": "yyyy/MM/dd hh:mm AM/PM",
|
|
220
|
+
};
|
|
221
|
+
export const fontFamilys = {
|
|
222
|
+
"0": "defualt",
|
|
223
|
+
"1": "Roman",
|
|
224
|
+
"2": "Swiss",
|
|
225
|
+
"3": "Modern",
|
|
226
|
+
"4": "Script",
|
|
227
|
+
"5": "Decorative",
|
|
228
|
+
};
|
|
229
|
+
export const DATA_VERIFICATION_MAP = {
|
|
230
|
+
list: "dropdown",
|
|
231
|
+
whole: "number_integer",
|
|
232
|
+
decimal: "number_decimal",
|
|
233
|
+
custom: "text_content",
|
|
234
|
+
textLength: "text_length",
|
|
235
|
+
date: "date",
|
|
236
|
+
unknown1: "number", // no match yet
|
|
237
|
+
unknown2: "checkbox", // no match yet
|
|
238
|
+
unknown3: "validity", // no match yet
|
|
239
|
+
};
|
|
240
|
+
export const COMMON_TYPE2 = [
|
|
241
|
+
"number",
|
|
242
|
+
"number_integer",
|
|
243
|
+
"number_decimal",
|
|
244
|
+
"text_length",
|
|
245
|
+
];
|
|
246
|
+
export const DATA_VERIFICATION_TYPE2_MAP = {
|
|
247
|
+
common: {
|
|
248
|
+
between: "bw",
|
|
249
|
+
notBetween: "nb",
|
|
250
|
+
equal: "eq",
|
|
251
|
+
notEqualTo: "ne",
|
|
252
|
+
moreThanThe: "gt",
|
|
253
|
+
lessThan: "lt",
|
|
254
|
+
greaterOrEqualTo: "gte",
|
|
255
|
+
lessThanOrEqualTo: "lte",
|
|
256
|
+
},
|
|
257
|
+
text_content: {
|
|
258
|
+
include: "include",
|
|
259
|
+
exclude: "exclude",
|
|
260
|
+
equal: "equal",
|
|
261
|
+
},
|
|
262
|
+
date: {
|
|
263
|
+
between: "bw",
|
|
264
|
+
notBetween: "nb",
|
|
265
|
+
equal: "eq",
|
|
266
|
+
notEqualTo: "ne",
|
|
267
|
+
earlierThan: "bf",
|
|
268
|
+
noEarlierThan: "nbf",
|
|
269
|
+
laterThan: "af",
|
|
270
|
+
noLaterThan: "naf",
|
|
271
|
+
},
|
|
272
|
+
validity: {
|
|
273
|
+
card: "card",
|
|
274
|
+
phone: "phone",
|
|
275
|
+
},
|
|
276
|
+
};
|
|
277
|
+
export const ALIGNMENT_DEFAULT = -1;
|