@corbe30/fortune-excel 2.2.2 → 2.2.4
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/README.md
CHANGED
|
@@ -39,7 +39,7 @@ You can check the example in [Storybook](https://github.com/Corbe30/FortuneExcel
|
|
|
39
39
|
setKey={setKey}
|
|
40
40
|
setSheets={setSheets}
|
|
41
41
|
sheetRef={sheetRef}
|
|
42
|
-
config={{
|
|
42
|
+
config={{ // this is the default config object
|
|
43
43
|
import: { xlsx: true, csv: true },
|
|
44
44
|
export: { xlsx: true, csv: true },
|
|
45
45
|
}}
|
|
@@ -59,7 +59,7 @@ export declare class FortuneSheetCelldataValue implements IfortuneSheetCelldataV
|
|
|
59
59
|
ht: number | undefined;
|
|
60
60
|
mc: IfortuneSheetCelldataValueMerge | undefined;
|
|
61
61
|
tr: number | undefined;
|
|
62
|
-
tb:
|
|
62
|
+
tb: string | undefined;
|
|
63
63
|
v: string | undefined;
|
|
64
64
|
m: string | undefined;
|
|
65
65
|
f: string | undefined;
|
|
@@ -344,14 +344,14 @@ var FortuneSheetCelldata = /** @class */ (function (_super) {
|
|
|
344
344
|
}
|
|
345
345
|
if (wrapText != undefined) {
|
|
346
346
|
if (wrapText == "1") {
|
|
347
|
-
cellValue.tb = 2;
|
|
347
|
+
cellValue.tb = "2";
|
|
348
348
|
}
|
|
349
349
|
else {
|
|
350
|
-
cellValue.tb = 1;
|
|
350
|
+
cellValue.tb = "1";
|
|
351
351
|
}
|
|
352
352
|
}
|
|
353
353
|
else {
|
|
354
|
-
cellValue.tb = 1;
|
|
354
|
+
cellValue.tb = "1";
|
|
355
355
|
}
|
|
356
356
|
if (textRotation != undefined) {
|
|
357
357
|
// tr: number | undefined //Text rotation,0: 0、1: 45 、2: -45、3 Vertical text、4: 90 、5: -90, alignment
|
|
@@ -438,7 +438,7 @@ var FortuneSheetCelldata = /** @class */ (function (_super) {
|
|
|
438
438
|
}
|
|
439
439
|
}
|
|
440
440
|
else {
|
|
441
|
-
cellValue.tb = 1;
|
|
441
|
+
cellValue.tb = "1";
|
|
442
442
|
}
|
|
443
443
|
if (v != null) {
|
|
444
444
|
var value = v[0].value;
|
|
@@ -397,6 +397,22 @@ var FortuneFile = /** @class */ (function () {
|
|
|
397
397
|
if (v.mc.r !== r || v.mc.c !== c)
|
|
398
398
|
v = { mc: v.mc };
|
|
399
399
|
}
|
|
400
|
+
else {
|
|
401
|
+
for (var key in sheet.config.merge) {
|
|
402
|
+
if (sheet.config.merge.hasOwnProperty(key)) {
|
|
403
|
+
var range = sheet.config.merge[key];
|
|
404
|
+
if (r >= range.r &&
|
|
405
|
+
r < range.r + range.rs &&
|
|
406
|
+
c >= range.c &&
|
|
407
|
+
c < range.c + range.cs) {
|
|
408
|
+
v.mc = { r: range.r, c: range.c };
|
|
409
|
+
if (v.mc.r !== r || v.mc.c !== c)
|
|
410
|
+
v = { mc: v.mc };
|
|
411
|
+
break;
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
}
|
|
400
416
|
}
|
|
401
417
|
sheetout.celldata.push({ r: r, c: c, v: v });
|
|
402
418
|
}
|
|
@@ -573,8 +573,8 @@ var FortuneSheet = /** @class */ (function (_super) {
|
|
|
573
573
|
var attrList = row.attributeList;
|
|
574
574
|
var ref = (0, method_1.getXmlAttibute)(attrList, "ref", null), refArr = (0, method_1.getMultiSequenceToNum)(ref), _display = (0, method_1.getXmlAttibute)(attrList, "display", null), _address = (0, method_1.getXmlAttibute)(attrList, "location", null), _tooltip = (0, method_1.getXmlAttibute)(attrList, "tooltip", null);
|
|
575
575
|
var _type = _address
|
|
576
|
-
? "
|
|
577
|
-
: "
|
|
576
|
+
? "cellrange"
|
|
577
|
+
: "webpage";
|
|
578
578
|
// external hyperlink
|
|
579
579
|
if (!_address) {
|
|
580
580
|
var rid_1 = attrList["r:id"];
|
|
@@ -583,7 +583,10 @@ var FortuneSheet = /** @class */ (function (_super) {
|
|
|
583
583
|
var findRid = relationshipList === null || relationshipList === void 0 ? void 0 : relationshipList.find(function (e) { return e.attributeList["Id"] === rid_1; });
|
|
584
584
|
if (findRid) {
|
|
585
585
|
_address = findRid.attributeList["Target"];
|
|
586
|
-
|
|
586
|
+
var type = (_a = findRid.attributeList["TargetMode"]) === null || _a === void 0 ? void 0 : _a.toLocaleLowerCase();
|
|
587
|
+
if (type === "external") {
|
|
588
|
+
_type = "webpage";
|
|
589
|
+
}
|
|
587
590
|
}
|
|
588
591
|
}
|
|
589
592
|
// match R1C1
|
|
@@ -134,7 +134,7 @@ export interface IfortuneSheetCelldataValue {
|
|
|
134
134
|
ht: number | undefined;
|
|
135
135
|
mc: IfortuneSheetCelldataValueMerge | undefined;
|
|
136
136
|
tr: number | undefined;
|
|
137
|
-
tb:
|
|
137
|
+
tb: string | undefined;
|
|
138
138
|
v: string | undefined;
|
|
139
139
|
m: string | undefined;
|
|
140
140
|
rt: number | undefined;
|
|
@@ -298,4 +298,4 @@ export interface IfortunesheetHyperlinkValue {
|
|
|
298
298
|
linkType: IfortunesheetHyperlinkType;
|
|
299
299
|
display: string;
|
|
300
300
|
}
|
|
301
|
-
export type IfortunesheetHyperlinkType = "
|
|
301
|
+
export type IfortunesheetHyperlinkType = "webpage" | "cellrange" | "sheet";
|