microsoft-graph 3.4.1 → 3.4.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/dist/cjs/services/addressManipulation.d.ts.map +1 -1
- package/dist/cjs/services/addressManipulation.js +1 -2
- package/dist/cjs/services/cartesianAddress.d.ts.map +1 -1
- package/dist/cjs/services/cartesianAddress.js +17 -11
- package/dist/esm/services/addressManipulation.d.ts.map +1 -1
- package/dist/esm/services/addressManipulation.js +1 -2
- package/dist/esm/services/cartesianAddress.d.ts.map +1 -1
- package/dist/esm/services/cartesianAddress.js +17 -11
- package/docs/api/addressManipulation.md +3 -3
- package/docs/api/cartesianAddress.md +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addressManipulation.d.ts","sourceRoot":"","sources":["../../../src/services/addressManipulation.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,EAAuD,iBAAiB,EAA+B,MAAM,sBAAsB,CAAC;AAGtK,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAuBnE;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,UAAQ,GAAG,OAAO,CAE9E;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,GAAG,iBAAiB,CAcpE;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,UAAU,EAAE,iBAAiB,EAAE,UAAU,UAAQ,GAAG,OAAO,CAsBzF;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,GAAG,WAAW,CAGjE;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,GAAG,WAAW,CAGhE;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,GA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AG,SAAqB,GAAG,OAAO,CA+CpK;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,SAAI,EAAE,QAAQ,GAAE,MAAM,GAAG,SAAqB,EAAE,QAAQ,SAAI,EAAE,QAAQ,GAAE,MAAM,GAAG,SAAqB,GAAG,OAAO,CAkCtK;AAED;;;;;;;;;GASG;AACH,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,gBAAgB,EAAE,QAAQ,SAAI,EAAE,QAAQ,GAAE,MAAM,GAAG,SAAqB,EAAE,QAAQ,SAAI,EAAE,QAAQ,GAAE,MAAM,GAAG,SAAqB,GAAG,gBAAgB,CAMrL;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,UAAU,CAAC,QAAQ,EAAE,gBAAgB,EAAE,QAAQ,SAAI,EAAE,QAAQ,GAAE,MAAM,GAAG,SAAqB,EAAE,QAAQ,SAAI,EAAE,QAAQ,GAAE,MAAM,GAAG,SAAqB,GAAG,gBAAgB,CAMvL"}
|
|
@@ -380,8 +380,7 @@ function subAddress(address, skipRows = 0, takeRows = undefined, skipCols = 0, t
|
|
|
380
380
|
const [startRow, endRow] = slice(ay, by, skipRows, takeRows);
|
|
381
381
|
const [startCol, endCol] = slice(ax, bx, skipCols, takeCols);
|
|
382
382
|
if (startRow < ay || startRow > endRow || startCol < ax || startCol > endCol) {
|
|
383
|
-
|
|
384
|
-
throw new InvalidArgumentError_ts_1.default(`Requested subaddress ${requestedAddress} is out of bounds of the base address ${address}.`);
|
|
383
|
+
throw new InvalidArgumentError_ts_1.default(`Requested subaddress is out of bounds of the base address ${address}.`);
|
|
385
384
|
}
|
|
386
385
|
return (0, cartesianAddress_ts_1.cartesianToAddress)({
|
|
387
386
|
ay: startRow,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cartesianAddress.d.ts","sourceRoot":"","sources":["../../../src/services/cartesianAddress.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAIxD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,GAAG,SAAS,
|
|
1
|
+
{"version":3,"file":"cartesianAddress.d.ts","sourceRoot":"","sources":["../../../src/services/cartesianAddress.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAIxD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,GAAG,SAAS,CAiB9D;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,SAAS,GAAG,OAAO,CAqBzE"}
|
|
@@ -20,11 +20,17 @@ const addressOffset_ts_1 = require("./addressOffset.js");
|
|
|
20
20
|
* @returns {Cartesian} The Cartesian representation of the address, with start and end coordinates.
|
|
21
21
|
*/
|
|
22
22
|
function addressToCartesian(address) {
|
|
23
|
-
const
|
|
24
|
-
const ax = (0, addressOffset_ts_1.columnAddressToOffset)(
|
|
25
|
-
const ay = (0, addressOffset_ts_1.rowAddressToOffset)(
|
|
26
|
-
const bx = (0, addressOffset_ts_1.columnAddressToOffset)(
|
|
27
|
-
const by = (0, addressOffset_ts_1.rowAddressToOffset)(
|
|
23
|
+
const { startColumn, startRow, endColumn, endRow } = (0, addressManipulation_ts_1.decomposeAddress)(address);
|
|
24
|
+
const ax = (0, addressOffset_ts_1.columnAddressToOffset)(startColumn);
|
|
25
|
+
const ay = (0, addressOffset_ts_1.rowAddressToOffset)(startRow);
|
|
26
|
+
const bx = (0, addressOffset_ts_1.columnAddressToOffset)(endColumn);
|
|
27
|
+
const by = (0, addressOffset_ts_1.rowAddressToOffset)(endRow);
|
|
28
|
+
if (ax > bx) {
|
|
29
|
+
throw new InvalidArgumentError_ts_1.default(`Invalid address ${address}. Start column (${startColumn}) is after end column (${endColumn}).`);
|
|
30
|
+
}
|
|
31
|
+
if (ay > by) {
|
|
32
|
+
throw new InvalidArgumentError_ts_1.default(`Invalid address ${address}. Start row (${startRow}) is after end row (${endRow}).`);
|
|
33
|
+
}
|
|
28
34
|
return { ax, ay, bx, by };
|
|
29
35
|
}
|
|
30
36
|
/**
|
|
@@ -38,17 +44,17 @@ function cartesianToAddress({ ax, ay, bx, by }) {
|
|
|
38
44
|
const startRow = (0, addressOffset_ts_1.rowOffsetToAddress)(ay);
|
|
39
45
|
const endColumn = (0, addressOffset_ts_1.columnOffsetToAddress)(bx);
|
|
40
46
|
const endRow = (0, addressOffset_ts_1.rowOffsetToAddress)(by);
|
|
41
|
-
if (ax > bx) {
|
|
42
|
-
throw new InvalidArgumentError_ts_1.default(`Invalid address. End column is before start column. ax=${ax} bx=${bx}.`);
|
|
43
|
-
}
|
|
44
|
-
if (ay > by) {
|
|
45
|
-
throw new InvalidArgumentError_ts_1.default(`Invalid address. End row is before start row. ay=${ay} by=${by}.`);
|
|
46
|
-
}
|
|
47
47
|
const address = (0, addressManipulation_ts_1.composeAddress)({
|
|
48
48
|
startRow,
|
|
49
49
|
startColumn,
|
|
50
50
|
endRow,
|
|
51
51
|
endColumn,
|
|
52
52
|
});
|
|
53
|
+
if (ax > bx) {
|
|
54
|
+
throw new InvalidArgumentError_ts_1.default(`Invalid address ${address}. Start column (${startColumn}) is after end column (${endColumn}).`);
|
|
55
|
+
}
|
|
56
|
+
if (ay > by) {
|
|
57
|
+
throw new InvalidArgumentError_ts_1.default(`Invalid address ${address}. Start row (${startRow}) is after end row (${endRow}).`);
|
|
58
|
+
}
|
|
53
59
|
return address;
|
|
54
60
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addressManipulation.d.ts","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AAE,QAAQ,SAAI,EAAE,QAAQ,GAAE,MAAM,GAAG,SAAqB,EAAE,QAAQ,SAAI,EAAE,QAAQ,GAAE,MAAM,GAAG,SAAqB,GAAG,gBAAgB,CAMvL"}
|
|
@@ -351,8 +351,7 @@ export function subAddress(address, skipRows = 0, takeRows = undefined, skipCols
|
|
|
351
351
|
const [startRow, endRow] = slice(ay, by, skipRows, takeRows);
|
|
352
352
|
const [startCol, endCol] = slice(ax, bx, skipCols, takeCols);
|
|
353
353
|
if (startRow < ay || startRow > endRow || startCol < ax || startCol > endCol) {
|
|
354
|
-
|
|
355
|
-
throw new InvalidArgumentError(`Requested subaddress ${requestedAddress} is out of bounds of the base address ${address}.`);
|
|
354
|
+
throw new InvalidArgumentError(`Requested subaddress is out of bounds of the base address ${address}.`);
|
|
356
355
|
}
|
|
357
356
|
return cartesianToAddress({
|
|
358
357
|
ay: startRow,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cartesianAddress.d.ts","sourceRoot":"","sources":["../../../src/services/cartesianAddress.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAIxD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,GAAG,SAAS,
|
|
1
|
+
{"version":3,"file":"cartesianAddress.d.ts","sourceRoot":"","sources":["../../../src/services/cartesianAddress.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAIxD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,GAAG,SAAS,CAiB9D;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,SAAS,GAAG,OAAO,CAqBzE"}
|
|
@@ -13,11 +13,17 @@ import { columnAddressToOffset, columnOffsetToAddress, rowAddressToOffset, rowOf
|
|
|
13
13
|
* @returns {Cartesian} The Cartesian representation of the address, with start and end coordinates.
|
|
14
14
|
*/
|
|
15
15
|
export function addressToCartesian(address) {
|
|
16
|
-
const
|
|
17
|
-
const ax = columnAddressToOffset(
|
|
18
|
-
const ay = rowAddressToOffset(
|
|
19
|
-
const bx = columnAddressToOffset(
|
|
20
|
-
const by = rowAddressToOffset(
|
|
16
|
+
const { startColumn, startRow, endColumn, endRow } = decomposeAddress(address);
|
|
17
|
+
const ax = columnAddressToOffset(startColumn);
|
|
18
|
+
const ay = rowAddressToOffset(startRow);
|
|
19
|
+
const bx = columnAddressToOffset(endColumn);
|
|
20
|
+
const by = rowAddressToOffset(endRow);
|
|
21
|
+
if (ax > bx) {
|
|
22
|
+
throw new InvalidArgumentError(`Invalid address ${address}. Start column (${startColumn}) is after end column (${endColumn}).`);
|
|
23
|
+
}
|
|
24
|
+
if (ay > by) {
|
|
25
|
+
throw new InvalidArgumentError(`Invalid address ${address}. Start row (${startRow}) is after end row (${endRow}).`);
|
|
26
|
+
}
|
|
21
27
|
return { ax, ay, bx, by };
|
|
22
28
|
}
|
|
23
29
|
/**
|
|
@@ -31,17 +37,17 @@ export function cartesianToAddress({ ax, ay, bx, by }) {
|
|
|
31
37
|
const startRow = rowOffsetToAddress(ay);
|
|
32
38
|
const endColumn = columnOffsetToAddress(bx);
|
|
33
39
|
const endRow = rowOffsetToAddress(by);
|
|
34
|
-
if (ax > bx) {
|
|
35
|
-
throw new InvalidArgumentError(`Invalid address. End column is before start column. ax=${ax} bx=${bx}.`);
|
|
36
|
-
}
|
|
37
|
-
if (ay > by) {
|
|
38
|
-
throw new InvalidArgumentError(`Invalid address. End row is before start row. ay=${ay} by=${by}.`);
|
|
39
|
-
}
|
|
40
40
|
const address = composeAddress({
|
|
41
41
|
startRow,
|
|
42
42
|
startColumn,
|
|
43
43
|
endRow,
|
|
44
44
|
endColumn,
|
|
45
45
|
});
|
|
46
|
+
if (ax > bx) {
|
|
47
|
+
throw new InvalidArgumentError(`Invalid address ${address}. Start column (${startColumn}) is after end column (${endColumn}).`);
|
|
48
|
+
}
|
|
49
|
+
if (ay > by) {
|
|
50
|
+
throw new InvalidArgumentError(`Invalid address ${address}. Start row (${startRow}) is after end row (${endRow}).`);
|
|
51
|
+
}
|
|
46
52
|
return address;
|
|
47
53
|
}
|
|
@@ -526,7 +526,7 @@ subaddress("A1:D10", 0, Infinity, -2, 1); // Second last column: "C1:C10"
|
|
|
526
526
|
|
|
527
527
|
> **subRange**(`rangeRef`, `skipRows`, `takeRows`, `skipCols`, `takeCols`): [`WorkbookRangeRef`](WorkbookRange-1.md#workbookrangeref)
|
|
528
528
|
|
|
529
|
-
Defined in: [src/services/addressManipulation.ts:
|
|
529
|
+
Defined in: [src/services/addressManipulation.ts:510](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/services/addressManipulation.ts#L510)
|
|
530
530
|
|
|
531
531
|
Extracts a sub-range from a WorkbookRangeRef using skip/take semantics.
|
|
532
532
|
|
|
@@ -556,7 +556,7 @@ InvalidArgumentError if the requested rows or columns exceed the available range
|
|
|
556
556
|
|
|
557
557
|
> **superAddress**(`address`, `skipRows`, `takeRows`, `skipCols`, `takeCols`): [`Address`](Address.md#address)
|
|
558
558
|
|
|
559
|
-
Defined in: [src/services/addressManipulation.ts:
|
|
559
|
+
Defined in: [src/services/addressManipulation.ts:464](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/services/addressManipulation.ts#L464)
|
|
560
560
|
|
|
561
561
|
Returns a super-address that extends the given address by skipping/taking rows/columns, possibly outside the original bounds.
|
|
562
562
|
Negative skip moves the start above/left of the original range (not from the end).
|
|
@@ -589,7 +589,7 @@ superAddress("B2:C3", -1, 4, -1, 4) // "A1:D5"
|
|
|
589
589
|
|
|
590
590
|
> **superRange**(`rangeRef`, `skipRows`, `takeRows`, `skipCols`, `takeCols`): [`WorkbookRangeRef`](WorkbookRange-1.md#workbookrangeref)
|
|
591
591
|
|
|
592
|
-
Defined in: [src/services/addressManipulation.ts:
|
|
592
|
+
Defined in: [src/services/addressManipulation.ts:529](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/services/addressManipulation.ts#L529)
|
|
593
593
|
|
|
594
594
|
Returns a super-range from a WorkbookRangeRef using skip/take semantics, possibly extending outside the original bounds.
|
|
595
595
|
Negative skip moves the start above/left of the original range (not from the end).
|
|
@@ -32,7 +32,7 @@ The Cartesian representation of the address, with start and end coordinates.
|
|
|
32
32
|
|
|
33
33
|
> **cartesianToAddress**(`cartesian`): [`Address`](Address.md#address)
|
|
34
34
|
|
|
35
|
-
Defined in: [src/services/cartesianAddress.ts:
|
|
35
|
+
Defined in: [src/services/cartesianAddress.ts:44](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/services/cartesianAddress.ts#L44)
|
|
36
36
|
|
|
37
37
|
Converts Cartesian coordinates to a cell range address.
|
|
38
38
|
|