microsoft-graph 3.4.2 → 3.4.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.
@@ -168,7 +168,7 @@ export declare function cellToRangeAddress(cell: CellAddress, rows: number, cols
168
168
  * subaddress("A1:D10", 0, -1); // All but last row: "A1:D9"
169
169
  * subaddress("A1:D10", 0, Infinity, -2, 1); // Second last column: "C1:C10"
170
170
  */
171
- export declare function subAddress(address: Address, skipRows?: number, takeRows?: number | undefined, skipCols?: number, takeCols?: number | undefined): Address;
171
+ export declare function subAddress(address: Address, skipRows?: number, takeRows?: number | null, skipCols?: number, takeCols?: number | null): Address;
172
172
  /**
173
173
  * Returns a super-address that extends the given address by skipping/taking rows/columns, possibly outside the original bounds.
174
174
  * Negative skip moves the start above/left of the original range (not from the end).
@@ -183,7 +183,7 @@ export declare function subAddress(address: Address, skipRows?: number, takeRows
183
183
  * @example
184
184
  * superAddress("B2:C3", -1, 4, -1, 4) // "A1:D5"
185
185
  */
186
- export declare function superAddress(address: Address, skipRows?: number, takeRows?: number | undefined, skipCols?: number, takeCols?: number | undefined): Address;
186
+ export declare function superAddress(address: Address, skipRows?: number, takeRows?: number | null, skipCols?: number, takeCols?: number | null): Address;
187
187
  /**
188
188
  * Extracts a sub-range from a WorkbookRangeRef using skip/take semantics.
189
189
  * @param rangeRef Range reference to extract the sub-range from.
@@ -194,7 +194,7 @@ export declare function superAddress(address: Address, skipRows?: number, takeRo
194
194
  * @returns Extracted sub-range reference.
195
195
  * @throws InvalidArgumentError if the requested rows or columns exceed the available range.
196
196
  */
197
- export declare function subRange(rangeRef: WorkbookRangeRef, skipRows?: number, takeRows?: number | undefined, skipCols?: number, takeCols?: number | undefined): WorkbookRangeRef;
197
+ export declare function subRange(rangeRef: WorkbookRangeRef, skipRows?: number, takeRows?: number | null, skipCols?: number, takeCols?: number | null): WorkbookRangeRef;
198
198
  /**
199
199
  * Returns a super-range from a WorkbookRangeRef using skip/take semantics, possibly extending outside the original bounds.
200
200
  * Negative skip moves the start above/left of the original range (not from the end).
@@ -206,5 +206,5 @@ export declare function subRange(rangeRef: WorkbookRangeRef, skipRows?: number,
206
206
  * @param takeCols Number of columns to take after skipping. If negative, excludes from the end. Default Infinity.
207
207
  * @returns Extended super-range reference.
208
208
  */
209
- export declare function superRange(rangeRef: WorkbookRangeRef, skipRows?: number, takeRows?: number | undefined, skipCols?: number, takeCols?: number | undefined): WorkbookRangeRef;
209
+ export declare function superRange(rangeRef: WorkbookRangeRef, skipRows?: number, takeRows?: number | null, skipCols?: number, takeCols?: number | null): WorkbookRangeRef;
210
210
  //# sourceMappingURL=addressManipulation.d.ts.map
@@ -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,GAAG,OAAO,CAS5D;AAED;;;;GAIG;AACH,wBAAgB,iBAA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RangeAddress(cell, rows, cols) {
369
369
  * subaddress("A1:D10", 0, -1); // All but last row: "A1:D9"
370
370
  * subaddress("A1:D10", 0, Infinity, -2, 1); // Second last column: "C1:C10"
371
371
  */
372
- function subAddress(address, skipRows = 0, takeRows = undefined, skipCols = 0, takeCols = undefined) {
372
+ function subAddress(address, skipRows = 0, takeRows = null, skipCols = 0, takeCols = null) {
373
373
  if (takeRows === undefined || takeRows === null) {
374
374
  takeRows = Number.POSITIVE_INFINITY;
375
375
  }
@@ -426,7 +426,7 @@ function subAddress(address, skipRows = 0, takeRows = undefined, skipCols = 0, t
426
426
  * @example
427
427
  * superAddress("B2:C3", -1, 4, -1, 4) // "A1:D5"
428
428
  */
429
- function superAddress(address, skipRows = 0, takeRows = undefined, skipCols = 0, takeCols = undefined) {
429
+ function superAddress(address, skipRows = 0, takeRows = null, skipCols = 0, takeCols = null) {
430
430
  if (takeRows === undefined || takeRows === null) {
431
431
  takeRows = Number.POSITIVE_INFINITY;
432
432
  }
@@ -467,7 +467,7 @@ function superAddress(address, skipRows = 0, takeRows = undefined, skipCols = 0,
467
467
  * @returns Extracted sub-range reference.
468
468
  * @throws InvalidArgumentError if the requested rows or columns exceed the available range.
469
469
  */
470
- function subRange(rangeRef, skipRows = 0, takeRows = undefined, skipCols = 0, takeCols = undefined) {
470
+ function subRange(rangeRef, skipRows = 0, takeRows = null, skipCols = 0, takeCols = null) {
471
471
  const address = subAddress(rangeRef.address, skipRows, takeRows, skipCols, takeCols);
472
472
  return {
473
473
  ...rangeRef,
@@ -485,7 +485,7 @@ function subRange(rangeRef, skipRows = 0, takeRows = undefined, skipCols = 0, ta
485
485
  * @param takeCols Number of columns to take after skipping. If negative, excludes from the end. Default Infinity.
486
486
  * @returns Extended super-range reference.
487
487
  */
488
- function superRange(rangeRef, skipRows = 0, takeRows = undefined, skipCols = 0, takeCols = undefined) {
488
+ function superRange(rangeRef, skipRows = 0, takeRows = null, skipCols = 0, takeCols = null) {
489
489
  const address = superAddress(rangeRef.address, skipRows, takeRows, skipCols, takeCols);
490
490
  return {
491
491
  ...rangeRef,
@@ -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,CAU9D;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,SAAS,GAAG,OAAO,CAqBzE"}
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 components = (0, addressManipulation_ts_1.decomposeAddress)(address);
24
- const ax = (0, addressOffset_ts_1.columnAddressToOffset)(components.startColumn);
25
- const ay = (0, addressOffset_ts_1.rowAddressToOffset)(components.startRow);
26
- const bx = (0, addressOffset_ts_1.columnAddressToOffset)(components.endColumn);
27
- const by = (0, addressOffset_ts_1.rowAddressToOffset)(components.endRow);
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
  }
@@ -168,7 +168,7 @@ export declare function cellToRangeAddress(cell: CellAddress, rows: number, cols
168
168
  * subaddress("A1:D10", 0, -1); // All but last row: "A1:D9"
169
169
  * subaddress("A1:D10", 0, Infinity, -2, 1); // Second last column: "C1:C10"
170
170
  */
171
- export declare function subAddress(address: Address, skipRows?: number, takeRows?: number | undefined, skipCols?: number, takeCols?: number | undefined): Address;
171
+ export declare function subAddress(address: Address, skipRows?: number, takeRows?: number | null, skipCols?: number, takeCols?: number | null): Address;
172
172
  /**
173
173
  * Returns a super-address that extends the given address by skipping/taking rows/columns, possibly outside the original bounds.
174
174
  * Negative skip moves the start above/left of the original range (not from the end).
@@ -183,7 +183,7 @@ export declare function subAddress(address: Address, skipRows?: number, takeRows
183
183
  * @example
184
184
  * superAddress("B2:C3", -1, 4, -1, 4) // "A1:D5"
185
185
  */
186
- export declare function superAddress(address: Address, skipRows?: number, takeRows?: number | undefined, skipCols?: number, takeCols?: number | undefined): Address;
186
+ export declare function superAddress(address: Address, skipRows?: number, takeRows?: number | null, skipCols?: number, takeCols?: number | null): Address;
187
187
  /**
188
188
  * Extracts a sub-range from a WorkbookRangeRef using skip/take semantics.
189
189
  * @param rangeRef Range reference to extract the sub-range from.
@@ -194,7 +194,7 @@ export declare function superAddress(address: Address, skipRows?: number, takeRo
194
194
  * @returns Extracted sub-range reference.
195
195
  * @throws InvalidArgumentError if the requested rows or columns exceed the available range.
196
196
  */
197
- export declare function subRange(rangeRef: WorkbookRangeRef, skipRows?: number, takeRows?: number | undefined, skipCols?: number, takeCols?: number | undefined): WorkbookRangeRef;
197
+ export declare function subRange(rangeRef: WorkbookRangeRef, skipRows?: number, takeRows?: number | null, skipCols?: number, takeCols?: number | null): WorkbookRangeRef;
198
198
  /**
199
199
  * Returns a super-range from a WorkbookRangeRef using skip/take semantics, possibly extending outside the original bounds.
200
200
  * Negative skip moves the start above/left of the original range (not from the end).
@@ -206,5 +206,5 @@ export declare function subRange(rangeRef: WorkbookRangeRef, skipRows?: number,
206
206
  * @param takeCols Number of columns to take after skipping. If negative, excludes from the end. Default Infinity.
207
207
  * @returns Extended super-range reference.
208
208
  */
209
- export declare function superRange(rangeRef: WorkbookRangeRef, skipRows?: number, takeRows?: number | undefined, skipCols?: number, takeCols?: number | undefined): WorkbookRangeRef;
209
+ export declare function superRange(rangeRef: WorkbookRangeRef, skipRows?: number, takeRows?: number | null, skipCols?: number, takeCols?: number | null): WorkbookRangeRef;
210
210
  //# sourceMappingURL=addressManipulation.d.ts.map
@@ -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,GAAG,OAAO,CAS5D;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAS3D;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAS/D;AAED;;;;GAIG;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GAAG,MAAM,CAGzD;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAG5D;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAuCzF;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,SAAI,EAAE,QAAQ,GAAE,MAAM,GAAG,IAAW,EAAE,QAAQ,SAAI,EAAE,QAAQ,GAAE,MAAM,GAAG,IAAW,GAAG,OAAO,CA+ChJ;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,SAAI,EAAE,QAAQ,GAAE,MAAM,GAAG,IAAW,EAAE,QAAQ,SAAI,EAAE,QAAQ,GAAE,MAAM,GAAG,IAAW,GAAG,OAAO,CAkClJ;AAED;;;;;;;;;GASG;AACH,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,gBAAgB,EAAE,QAAQ,SAAI,EAAE,QAAQ,GAAE,MAAM,GAAG,IAAW,EAAE,QAAQ,SAAI,EAAE,QAAQ,GAAE,MAAM,GAAG,IAAW,GAAG,gBAAgB,CAMjK;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,UAAU,CAAC,QAAQ,EAAE,gBAAgB,EAAE,QAAQ,SAAI,EAAE,QAAQ,GAAE,MAAM,GAAG,IAAW,EAAE,QAAQ,SAAI,EAAE,QAAQ,GAAE,MAAM,GAAG,IAAW,GAAG,gBAAgB,CAMnK"}
@@ -340,7 +340,7 @@ export function cellToRangeAddress(cell, rows, cols) {
340
340
  * subaddress("A1:D10", 0, -1); // All but last row: "A1:D9"
341
341
  * subaddress("A1:D10", 0, Infinity, -2, 1); // Second last column: "C1:C10"
342
342
  */
343
- export function subAddress(address, skipRows = 0, takeRows = undefined, skipCols = 0, takeCols = undefined) {
343
+ export function subAddress(address, skipRows = 0, takeRows = null, skipCols = 0, takeCols = null) {
344
344
  if (takeRows === undefined || takeRows === null) {
345
345
  takeRows = Number.POSITIVE_INFINITY;
346
346
  }
@@ -397,7 +397,7 @@ export function subAddress(address, skipRows = 0, takeRows = undefined, skipCols
397
397
  * @example
398
398
  * superAddress("B2:C3", -1, 4, -1, 4) // "A1:D5"
399
399
  */
400
- export function superAddress(address, skipRows = 0, takeRows = undefined, skipCols = 0, takeCols = undefined) {
400
+ export function superAddress(address, skipRows = 0, takeRows = null, skipCols = 0, takeCols = null) {
401
401
  if (takeRows === undefined || takeRows === null) {
402
402
  takeRows = Number.POSITIVE_INFINITY;
403
403
  }
@@ -438,7 +438,7 @@ export function superAddress(address, skipRows = 0, takeRows = undefined, skipCo
438
438
  * @returns Extracted sub-range reference.
439
439
  * @throws InvalidArgumentError if the requested rows or columns exceed the available range.
440
440
  */
441
- export function subRange(rangeRef, skipRows = 0, takeRows = undefined, skipCols = 0, takeCols = undefined) {
441
+ export function subRange(rangeRef, skipRows = 0, takeRows = null, skipCols = 0, takeCols = null) {
442
442
  const address = subAddress(rangeRef.address, skipRows, takeRows, skipCols, takeCols);
443
443
  return {
444
444
  ...rangeRef,
@@ -456,7 +456,7 @@ export function subRange(rangeRef, skipRows = 0, takeRows = undefined, skipCols
456
456
  * @param takeCols Number of columns to take after skipping. If negative, excludes from the end. Default Infinity.
457
457
  * @returns Extended super-range reference.
458
458
  */
459
- export function superRange(rangeRef, skipRows = 0, takeRows = undefined, skipCols = 0, takeCols = undefined) {
459
+ export function superRange(rangeRef, skipRows = 0, takeRows = null, skipCols = 0, takeCols = null) {
460
460
  const address = superAddress(rangeRef.address, skipRows, takeRows, skipCols, takeCols);
461
461
  return {
462
462
  ...rangeRef,
@@ -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,CAU9D;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,SAAS,GAAG,OAAO,CAqBzE"}
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 components = decomposeAddress(address);
17
- const ax = columnAddressToOffset(components.startColumn);
18
- const ay = rowAddressToOffset(components.startRow);
19
- const bx = columnAddressToOffset(components.endColumn);
20
- const by = rowAddressToOffset(components.endRow);
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
  }
@@ -501,9 +501,9 @@ Supports negative values for `takeRows` and `takeCols` to exclude from the end a
501
501
  | ------ | ------ | ------ | ------ |
502
502
  | `address` | [`Address`](Address.md#address) | `undefined` | Original range in A1 notation (e.g., "A1:D10"). |
503
503
  | `skipRows` | `number` | `0` | Number of rows to skip. If negative, skips from the end. Default is 0. |
504
- | `takeRows` | `undefined` \| `number` | `undefined` | Number of rows to take after skipping. If negative, excludes from the end of the remaining rows. Default is Infinity. |
504
+ | `takeRows` | `null` \| `number` | `null` | Number of rows to take after skipping. If negative, excludes from the end of the remaining rows. Default is Infinity. |
505
505
  | `skipCols` | `number` | `0` | Number of columns to skip. If negative, skips from the end. Default is 0. |
506
- | `takeCols` | `undefined` \| `number` | `undefined` | Number of columns to take after skipping. If negative, excludes from the end of the remaining columns. Default is Infinity. |
506
+ | `takeCols` | `null` \| `number` | `null` | Number of columns to take after skipping. If negative, excludes from the end of the remaining columns. Default is Infinity. |
507
507
 
508
508
  #### Returns
509
509
 
@@ -536,9 +536,9 @@ Extracts a sub-range from a WorkbookRangeRef using skip/take semantics.
536
536
  | ------ | ------ | ------ | ------ |
537
537
  | `rangeRef` | [`WorkbookRangeRef`](WorkbookRange-1.md#workbookrangeref) | `undefined` | Range reference to extract the sub-range from. |
538
538
  | `skipRows` | `number` | `0` | Number of rows to skip. If negative, skips from the end. Default 0. |
539
- | `takeRows` | `undefined` \| `number` | `undefined` | Number of rows to take after skipping. If negative, excludes from the end. Default Infinity. |
539
+ | `takeRows` | `null` \| `number` | `null` | Number of rows to take after skipping. If negative, excludes from the end. Default Infinity. |
540
540
  | `skipCols` | `number` | `0` | Number of columns to skip. If negative, skips from the end. Default 0. |
541
- | `takeCols` | `undefined` \| `number` | `undefined` | Number of columns to take after skipping. If negative, excludes from the end. Default Infinity. |
541
+ | `takeCols` | `null` \| `number` | `null` | Number of columns to take after skipping. If negative, excludes from the end. Default Infinity. |
542
542
 
543
543
  #### Returns
544
544
 
@@ -567,9 +567,9 @@ Negative skip moves the start above/left of the original range (not from the end
567
567
  | ------ | ------ | ------ | ------ |
568
568
  | `address` | [`Address`](Address.md#address) | `undefined` | Original range in A1 notation (e.g., "A1:D10"). |
569
569
  | `skipRows` | `number` | `0` | Number of rows to skip (can be negative to extend above). |
570
- | `takeRows` | `undefined` \| `number` | `undefined` | Number of rows to take after skipping. If negative, excludes from the end. Default is Infinity. |
570
+ | `takeRows` | `null` \| `number` | `null` | Number of rows to take after skipping. If negative, excludes from the end. Default is Infinity. |
571
571
  | `skipCols` | `number` | `0` | Number of columns to skip (can be negative to extend left). |
572
- | `takeCols` | `undefined` \| `number` | `undefined` | Number of columns to take after skipping. If negative, excludes from the end. Default is Infinity. |
572
+ | `takeCols` | `null` \| `number` | `null` | Number of columns to take after skipping. If negative, excludes from the end. Default is Infinity. |
573
573
 
574
574
  #### Returns
575
575
 
@@ -600,9 +600,9 @@ Negative skip moves the start above/left of the original range (not from the end
600
600
  | ------ | ------ | ------ | ------ |
601
601
  | `rangeRef` | [`WorkbookRangeRef`](WorkbookRange-1.md#workbookrangeref) | `undefined` | Range reference to extend. |
602
602
  | `skipRows` | `number` | `0` | Number of rows to skip (can be negative to extend above). Default 0. |
603
- | `takeRows` | `undefined` \| `number` | `undefined` | Number of rows to take after skipping. If negative, excludes from the end. Default Infinity. |
603
+ | `takeRows` | `null` \| `number` | `null` | Number of rows to take after skipping. If negative, excludes from the end. Default Infinity. |
604
604
  | `skipCols` | `number` | `0` | Number of columns to skip (can be negative to extend left). Default 0. |
605
- | `takeCols` | `undefined` \| `number` | `undefined` | Number of columns to take after skipping. If negative, excludes from the end. Default Infinity. |
605
+ | `takeCols` | `null` \| `number` | `null` | Number of columns to take after skipping. If negative, excludes from the end. Default Infinity. |
606
606
 
607
607
  #### Returns
608
608
 
@@ -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:37](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/services/cartesianAddress.ts#L37)
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
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "microsoft-graph",
3
- "version": "3.4.2",
3
+ "version": "3.4.4",
4
4
  "description": "Microsoft GraphAPI SDK for NodeJS",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/esm/index.js",