microsoft-graph 3.4.0 → 3.4.2

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.
@@ -155,12 +155,12 @@ export declare function cellToRangeAddress(cell: CellAddress, rows: number, cols
155
155
  * Supports negative values for `skipRows` and `skipCols` to count from the end.
156
156
  * Supports negative values for `takeRows` and `takeCols` to exclude from the end after skipping.
157
157
  *
158
- * @param address - The original range in A1 notation (e.g., "A1:D10").
159
- * @param skipRows - Number of rows to skip. If negative, skips that many rows from the end. Default is 0.
160
- * @param takeRows - Number of rows to take after skipping. If negative, excludes that many rows from the end of the remaining rows. Default is Infinity.
161
- * @param skipCols - Number of columns to skip. If negative, skips that many columns from the end. Default is 0.
162
- * @param takeCols - Number of columns to take after skipping. If negative, excludes that many columns from the end of the remaining columns. Default is Infinity.
163
- * @returns A new A1-style range representing the sliced subrange (e.g., "B2:C5").
158
+ * @param address Original range in A1 notation (e.g., "A1:D10").
159
+ * @param skipRows Number of rows to skip. If negative, skips from the end. Default is 0.
160
+ * @param takeRows Number of rows to take after skipping. If negative, excludes from the end of the remaining rows. Default is Infinity.
161
+ * @param skipCols Number of columns to skip. If negative, skips from the end. Default is 0.
162
+ * @param takeCols Number of columns to take after skipping. If negative, excludes from the end of the remaining columns. Default is Infinity.
163
+ * @returns New A1-style range representing the sliced sub-range (e.g., "B2:C5").
164
164
  *
165
165
  * @example
166
166
  * subaddress("A1:D10", -1, 1); // Last row: "A10:D10"
@@ -168,22 +168,22 @@ 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, skipCols?: number, takeCols?: number): Address;
171
+ export declare function subAddress(address: Address, skipRows?: number, takeRows?: number | undefined, skipCols?: number, takeCols?: number | undefined): 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).
175
175
  *
176
- * @param address - The original range in A1 notation (e.g., "A1:D10").
177
- * @param skipRows - Number of rows to skip (can be negative to extend above).
178
- * @param takeRows - Number of rows to take after skipping. If negative, excludes from the end. Default is Infinity.
179
- * @param skipCols - Number of columns to skip (can be negative to extend left).
180
- * @param takeCols - Number of columns to take after skipping. If negative, excludes from the end. Default is Infinity.
181
- * @returns A new A1-style range representing the superrange (may extend outside original bounds).
176
+ * @param address Original range in A1 notation (e.g., "A1:D10").
177
+ * @param skipRows Number of rows to skip (can be negative to extend above).
178
+ * @param takeRows Number of rows to take after skipping. If negative, excludes from the end. Default is Infinity.
179
+ * @param skipCols Number of columns to skip (can be negative to extend left).
180
+ * @param takeCols Number of columns to take after skipping. If negative, excludes from the end. Default is Infinity.
181
+ * @returns New A1-style range representing the super range (may extend outside original bounds).
182
182
  *
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, skipCols?: number, takeCols?: number): Address;
186
+ export declare function superAddress(address: Address, skipRows?: number, takeRows?: number | undefined, skipCols?: number, takeCols?: number | undefined): 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, skipCols?: number, takeCols?: number): WorkbookRangeRef;
197
+ export declare function subRange(rangeRef: WorkbookRangeRef, skipRows?: number, takeRows?: number | undefined, skipCols?: number, takeCols?: number | undefined): 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, skipCols?: number, takeCols?: number): WorkbookRangeRef;
209
+ export declare function superRange(rangeRef: WorkbookRangeRef, skipRows?: number, takeRows?: number | undefined, skipCols?: number, takeCols?: number | undefined): 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;;;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AC,OAAO,EAAE,OAAO,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,SAAqB,EAAE,QAAQ,SAAI,EAAE,QAAQ,GAAE,MAAM,GAAG,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"}
@@ -356,12 +356,12 @@ function cellToRangeAddress(cell, rows, cols) {
356
356
  * Supports negative values for `skipRows` and `skipCols` to count from the end.
357
357
  * Supports negative values for `takeRows` and `takeCols` to exclude from the end after skipping.
358
358
  *
359
- * @param address - The original range in A1 notation (e.g., "A1:D10").
360
- * @param skipRows - Number of rows to skip. If negative, skips that many rows from the end. Default is 0.
361
- * @param takeRows - Number of rows to take after skipping. If negative, excludes that many rows from the end of the remaining rows. Default is Infinity.
362
- * @param skipCols - Number of columns to skip. If negative, skips that many columns from the end. Default is 0.
363
- * @param takeCols - Number of columns to take after skipping. If negative, excludes that many columns from the end of the remaining columns. Default is Infinity.
364
- * @returns A new A1-style range representing the sliced subrange (e.g., "B2:C5").
359
+ * @param address Original range in A1 notation (e.g., "A1:D10").
360
+ * @param skipRows Number of rows to skip. If negative, skips from the end. Default is 0.
361
+ * @param takeRows Number of rows to take after skipping. If negative, excludes from the end of the remaining rows. Default is Infinity.
362
+ * @param skipCols Number of columns to skip. If negative, skips from the end. Default is 0.
363
+ * @param takeCols Number of columns to take after skipping. If negative, excludes from the end of the remaining columns. Default is Infinity.
364
+ * @returns New A1-style range representing the sliced sub-range (e.g., "B2:C5").
365
365
  *
366
366
  * @example
367
367
  * subaddress("A1:D10", -1, 1); // Last row: "A10:D10"
@@ -369,13 +369,18 @@ function cellToRangeAddress(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 = Number.POSITIVE_INFINITY, skipCols = 0, takeCols = Number.POSITIVE_INFINITY) {
372
+ function subAddress(address, skipRows = 0, takeRows = undefined, skipCols = 0, takeCols = undefined) {
373
+ if (takeRows === undefined || takeRows === null) {
374
+ takeRows = Number.POSITIVE_INFINITY;
375
+ }
376
+ if (takeCols === undefined || takeCols === null) {
377
+ takeCols = Number.POSITIVE_INFINITY;
378
+ }
373
379
  const { ax, bx, ay, by } = (0, cartesianAddress_ts_1.addressToCartesian)(address);
374
380
  const [startRow, endRow] = slice(ay, by, skipRows, takeRows);
375
381
  const [startCol, endCol] = slice(ax, bx, skipCols, takeCols);
376
- if (startRow < ay || endRow > by || startRow > endRow || startCol < ax || endCol > bx || startCol > endCol) {
377
- const requestedAddress = (0, cartesianAddress_ts_1.cartesianToAddress)({ ax: startCol, bx: endCol, ay: startRow, by: endRow });
378
- throw new InvalidArgumentError_ts_1.default(`Requested subaddress ${requestedAddress} is out of bounds of the base address ${address}.`);
382
+ if (startRow < ay || startRow > endRow || startCol < ax || startCol > endCol) {
383
+ throw new InvalidArgumentError_ts_1.default(`Requested subaddress is out of bounds of the base address ${address}.`);
379
384
  }
380
385
  return (0, cartesianAddress_ts_1.cartesianToAddress)({
381
386
  ay: startRow,
@@ -401,6 +406,9 @@ function subAddress(address, skipRows = 0, takeRows = Number.POSITIVE_INFINITY,
401
406
  else if (take < 0) {
402
407
  e += take;
403
408
  }
409
+ // Clip e to not exceed the original end
410
+ if (e > end)
411
+ e = end;
404
412
  return [s, e];
405
413
  }
406
414
  }
@@ -408,17 +416,23 @@ function subAddress(address, skipRows = 0, takeRows = Number.POSITIVE_INFINITY,
408
416
  * Returns a super-address that extends the given address by skipping/taking rows/columns, possibly outside the original bounds.
409
417
  * Negative skip moves the start above/left of the original range (not from the end).
410
418
  *
411
- * @param address - The original range in A1 notation (e.g., "A1:D10").
412
- * @param skipRows - Number of rows to skip (can be negative to extend above).
413
- * @param takeRows - Number of rows to take after skipping. If negative, excludes from the end. Default is Infinity.
414
- * @param skipCols - Number of columns to skip (can be negative to extend left).
415
- * @param takeCols - Number of columns to take after skipping. If negative, excludes from the end. Default is Infinity.
416
- * @returns A new A1-style range representing the superrange (may extend outside original bounds).
419
+ * @param address Original range in A1 notation (e.g., "A1:D10").
420
+ * @param skipRows Number of rows to skip (can be negative to extend above).
421
+ * @param takeRows Number of rows to take after skipping. If negative, excludes from the end. Default is Infinity.
422
+ * @param skipCols Number of columns to skip (can be negative to extend left).
423
+ * @param takeCols Number of columns to take after skipping. If negative, excludes from the end. Default is Infinity.
424
+ * @returns New A1-style range representing the super range (may extend outside original bounds).
417
425
  *
418
426
  * @example
419
427
  * superAddress("B2:C3", -1, 4, -1, 4) // "A1:D5"
420
428
  */
421
- function superAddress(address, skipRows = 0, takeRows = Number.POSITIVE_INFINITY, skipCols = 0, takeCols = Number.POSITIVE_INFINITY) {
429
+ function superAddress(address, skipRows = 0, takeRows = undefined, skipCols = 0, takeCols = undefined) {
430
+ if (takeRows === undefined || takeRows === null) {
431
+ takeRows = Number.POSITIVE_INFINITY;
432
+ }
433
+ if (takeCols === undefined || takeCols === null) {
434
+ takeCols = Number.POSITIVE_INFINITY;
435
+ }
422
436
  const { ax, bx, ay, by } = (0, cartesianAddress_ts_1.addressToCartesian)(address);
423
437
  const [startRow, endRow] = superSlice(ay, by, skipRows, takeRows);
424
438
  const [startCol, endCol] = superSlice(ax, bx, skipCols, takeCols);
@@ -453,7 +467,7 @@ function superAddress(address, skipRows = 0, takeRows = Number.POSITIVE_INFINITY
453
467
  * @returns Extracted sub-range reference.
454
468
  * @throws InvalidArgumentError if the requested rows or columns exceed the available range.
455
469
  */
456
- function subRange(rangeRef, skipRows = 0, takeRows = Number.POSITIVE_INFINITY, skipCols = 0, takeCols = Number.POSITIVE_INFINITY) {
470
+ function subRange(rangeRef, skipRows = 0, takeRows = undefined, skipCols = 0, takeCols = undefined) {
457
471
  const address = subAddress(rangeRef.address, skipRows, takeRows, skipCols, takeCols);
458
472
  return {
459
473
  ...rangeRef,
@@ -471,7 +485,7 @@ function subRange(rangeRef, skipRows = 0, takeRows = Number.POSITIVE_INFINITY, s
471
485
  * @param takeCols Number of columns to take after skipping. If negative, excludes from the end. Default Infinity.
472
486
  * @returns Extended super-range reference.
473
487
  */
474
- function superRange(rangeRef, skipRows = 0, takeRows = Number.POSITIVE_INFINITY, skipCols = 0, takeCols = Number.POSITIVE_INFINITY) {
488
+ function superRange(rangeRef, skipRows = 0, takeRows = undefined, skipCols = 0, takeCols = undefined) {
475
489
  const address = superAddress(rangeRef.address, skipRows, takeRows, skipCols, takeCols);
476
490
  return {
477
491
  ...rangeRef,
@@ -155,12 +155,12 @@ export declare function cellToRangeAddress(cell: CellAddress, rows: number, cols
155
155
  * Supports negative values for `skipRows` and `skipCols` to count from the end.
156
156
  * Supports negative values for `takeRows` and `takeCols` to exclude from the end after skipping.
157
157
  *
158
- * @param address - The original range in A1 notation (e.g., "A1:D10").
159
- * @param skipRows - Number of rows to skip. If negative, skips that many rows from the end. Default is 0.
160
- * @param takeRows - Number of rows to take after skipping. If negative, excludes that many rows from the end of the remaining rows. Default is Infinity.
161
- * @param skipCols - Number of columns to skip. If negative, skips that many columns from the end. Default is 0.
162
- * @param takeCols - Number of columns to take after skipping. If negative, excludes that many columns from the end of the remaining columns. Default is Infinity.
163
- * @returns A new A1-style range representing the sliced subrange (e.g., "B2:C5").
158
+ * @param address Original range in A1 notation (e.g., "A1:D10").
159
+ * @param skipRows Number of rows to skip. If negative, skips from the end. Default is 0.
160
+ * @param takeRows Number of rows to take after skipping. If negative, excludes from the end of the remaining rows. Default is Infinity.
161
+ * @param skipCols Number of columns to skip. If negative, skips from the end. Default is 0.
162
+ * @param takeCols Number of columns to take after skipping. If negative, excludes from the end of the remaining columns. Default is Infinity.
163
+ * @returns New A1-style range representing the sliced sub-range (e.g., "B2:C5").
164
164
  *
165
165
  * @example
166
166
  * subaddress("A1:D10", -1, 1); // Last row: "A10:D10"
@@ -168,22 +168,22 @@ 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, skipCols?: number, takeCols?: number): Address;
171
+ export declare function subAddress(address: Address, skipRows?: number, takeRows?: number | undefined, skipCols?: number, takeCols?: number | undefined): 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).
175
175
  *
176
- * @param address - The original range in A1 notation (e.g., "A1:D10").
177
- * @param skipRows - Number of rows to skip (can be negative to extend above).
178
- * @param takeRows - Number of rows to take after skipping. If negative, excludes from the end. Default is Infinity.
179
- * @param skipCols - Number of columns to skip (can be negative to extend left).
180
- * @param takeCols - Number of columns to take after skipping. If negative, excludes from the end. Default is Infinity.
181
- * @returns A new A1-style range representing the superrange (may extend outside original bounds).
176
+ * @param address Original range in A1 notation (e.g., "A1:D10").
177
+ * @param skipRows Number of rows to skip (can be negative to extend above).
178
+ * @param takeRows Number of rows to take after skipping. If negative, excludes from the end. Default is Infinity.
179
+ * @param skipCols Number of columns to skip (can be negative to extend left).
180
+ * @param takeCols Number of columns to take after skipping. If negative, excludes from the end. Default is Infinity.
181
+ * @returns New A1-style range representing the super range (may extend outside original bounds).
182
182
  *
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, skipCols?: number, takeCols?: number): Address;
186
+ export declare function superAddress(address: Address, skipRows?: number, takeRows?: number | undefined, skipCols?: number, takeCols?: number | undefined): 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, skipCols?: number, takeCols?: number): WorkbookRangeRef;
197
+ export declare function subRange(rangeRef: WorkbookRangeRef, skipRows?: number, takeRows?: number | undefined, skipCols?: number, takeCols?: number | undefined): 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, skipCols?: number, takeCols?: number): WorkbookRangeRef;
209
+ export declare function superRange(rangeRef: WorkbookRangeRef, skipRows?: number, takeRows?: number | undefined, skipCols?: number, takeCols?: number | undefined): 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,q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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,SAAqB,EAAE,QAAQ,SAAI,EAAE,QAAQ,GAAE,MAAM,GAAG,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"}
@@ -327,12 +327,12 @@ export function cellToRangeAddress(cell, rows, cols) {
327
327
  * Supports negative values for `skipRows` and `skipCols` to count from the end.
328
328
  * Supports negative values for `takeRows` and `takeCols` to exclude from the end after skipping.
329
329
  *
330
- * @param address - The original range in A1 notation (e.g., "A1:D10").
331
- * @param skipRows - Number of rows to skip. If negative, skips that many rows from the end. Default is 0.
332
- * @param takeRows - Number of rows to take after skipping. If negative, excludes that many rows from the end of the remaining rows. Default is Infinity.
333
- * @param skipCols - Number of columns to skip. If negative, skips that many columns from the end. Default is 0.
334
- * @param takeCols - Number of columns to take after skipping. If negative, excludes that many columns from the end of the remaining columns. Default is Infinity.
335
- * @returns A new A1-style range representing the sliced subrange (e.g., "B2:C5").
330
+ * @param address Original range in A1 notation (e.g., "A1:D10").
331
+ * @param skipRows Number of rows to skip. If negative, skips from the end. Default is 0.
332
+ * @param takeRows Number of rows to take after skipping. If negative, excludes from the end of the remaining rows. Default is Infinity.
333
+ * @param skipCols Number of columns to skip. If negative, skips from the end. Default is 0.
334
+ * @param takeCols Number of columns to take after skipping. If negative, excludes from the end of the remaining columns. Default is Infinity.
335
+ * @returns New A1-style range representing the sliced sub-range (e.g., "B2:C5").
336
336
  *
337
337
  * @example
338
338
  * subaddress("A1:D10", -1, 1); // Last row: "A10:D10"
@@ -340,13 +340,18 @@ 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 = Number.POSITIVE_INFINITY, skipCols = 0, takeCols = Number.POSITIVE_INFINITY) {
343
+ export function subAddress(address, skipRows = 0, takeRows = undefined, skipCols = 0, takeCols = undefined) {
344
+ if (takeRows === undefined || takeRows === null) {
345
+ takeRows = Number.POSITIVE_INFINITY;
346
+ }
347
+ if (takeCols === undefined || takeCols === null) {
348
+ takeCols = Number.POSITIVE_INFINITY;
349
+ }
344
350
  const { ax, bx, ay, by } = addressToCartesian(address);
345
351
  const [startRow, endRow] = slice(ay, by, skipRows, takeRows);
346
352
  const [startCol, endCol] = slice(ax, bx, skipCols, takeCols);
347
- if (startRow < ay || endRow > by || startRow > endRow || startCol < ax || endCol > bx || startCol > endCol) {
348
- const requestedAddress = cartesianToAddress({ ax: startCol, bx: endCol, ay: startRow, by: endRow });
349
- throw new InvalidArgumentError(`Requested subaddress ${requestedAddress} is out of bounds of the base address ${address}.`);
353
+ if (startRow < ay || startRow > endRow || startCol < ax || startCol > endCol) {
354
+ throw new InvalidArgumentError(`Requested subaddress is out of bounds of the base address ${address}.`);
350
355
  }
351
356
  return cartesianToAddress({
352
357
  ay: startRow,
@@ -372,6 +377,9 @@ export function subAddress(address, skipRows = 0, takeRows = Number.POSITIVE_INF
372
377
  else if (take < 0) {
373
378
  e += take;
374
379
  }
380
+ // Clip e to not exceed the original end
381
+ if (e > end)
382
+ e = end;
375
383
  return [s, e];
376
384
  }
377
385
  }
@@ -379,17 +387,23 @@ export function subAddress(address, skipRows = 0, takeRows = Number.POSITIVE_INF
379
387
  * Returns a super-address that extends the given address by skipping/taking rows/columns, possibly outside the original bounds.
380
388
  * Negative skip moves the start above/left of the original range (not from the end).
381
389
  *
382
- * @param address - The original range in A1 notation (e.g., "A1:D10").
383
- * @param skipRows - Number of rows to skip (can be negative to extend above).
384
- * @param takeRows - Number of rows to take after skipping. If negative, excludes from the end. Default is Infinity.
385
- * @param skipCols - Number of columns to skip (can be negative to extend left).
386
- * @param takeCols - Number of columns to take after skipping. If negative, excludes from the end. Default is Infinity.
387
- * @returns A new A1-style range representing the superrange (may extend outside original bounds).
390
+ * @param address Original range in A1 notation (e.g., "A1:D10").
391
+ * @param skipRows Number of rows to skip (can be negative to extend above).
392
+ * @param takeRows Number of rows to take after skipping. If negative, excludes from the end. Default is Infinity.
393
+ * @param skipCols Number of columns to skip (can be negative to extend left).
394
+ * @param takeCols Number of columns to take after skipping. If negative, excludes from the end. Default is Infinity.
395
+ * @returns New A1-style range representing the super range (may extend outside original bounds).
388
396
  *
389
397
  * @example
390
398
  * superAddress("B2:C3", -1, 4, -1, 4) // "A1:D5"
391
399
  */
392
- export function superAddress(address, skipRows = 0, takeRows = Number.POSITIVE_INFINITY, skipCols = 0, takeCols = Number.POSITIVE_INFINITY) {
400
+ export function superAddress(address, skipRows = 0, takeRows = undefined, skipCols = 0, takeCols = undefined) {
401
+ if (takeRows === undefined || takeRows === null) {
402
+ takeRows = Number.POSITIVE_INFINITY;
403
+ }
404
+ if (takeCols === undefined || takeCols === null) {
405
+ takeCols = Number.POSITIVE_INFINITY;
406
+ }
393
407
  const { ax, bx, ay, by } = addressToCartesian(address);
394
408
  const [startRow, endRow] = superSlice(ay, by, skipRows, takeRows);
395
409
  const [startCol, endCol] = superSlice(ax, bx, skipCols, takeCols);
@@ -424,7 +438,7 @@ export function superAddress(address, skipRows = 0, takeRows = Number.POSITIVE_I
424
438
  * @returns Extracted sub-range reference.
425
439
  * @throws InvalidArgumentError if the requested rows or columns exceed the available range.
426
440
  */
427
- export function subRange(rangeRef, skipRows = 0, takeRows = Number.POSITIVE_INFINITY, skipCols = 0, takeCols = Number.POSITIVE_INFINITY) {
441
+ export function subRange(rangeRef, skipRows = 0, takeRows = undefined, skipCols = 0, takeCols = undefined) {
428
442
  const address = subAddress(rangeRef.address, skipRows, takeRows, skipCols, takeCols);
429
443
  return {
430
444
  ...rangeRef,
@@ -442,7 +456,7 @@ export function subRange(rangeRef, skipRows = 0, takeRows = Number.POSITIVE_INFI
442
456
  * @param takeCols Number of columns to take after skipping. If negative, excludes from the end. Default Infinity.
443
457
  * @returns Extended super-range reference.
444
458
  */
445
- export function superRange(rangeRef, skipRows = 0, takeRows = Number.POSITIVE_INFINITY, skipCols = 0, takeCols = Number.POSITIVE_INFINITY) {
459
+ export function superRange(rangeRef, skipRows = 0, takeRows = undefined, skipCols = 0, takeCols = undefined) {
446
460
  const address = superAddress(rangeRef.address, skipRows, takeRows, skipCols, takeCols);
447
461
  return {
448
462
  ...rangeRef,
@@ -499,17 +499,17 @@ Supports negative values for `takeRows` and `takeCols` to exclude from the end a
499
499
 
500
500
  | Parameter | Type | Default value | Description |
501
501
  | ------ | ------ | ------ | ------ |
502
- | `address` | [`Address`](Address.md#address) | `undefined` | The original range in A1 notation (e.g., "A1:D10"). |
503
- | `skipRows` | `number` | `0` | Number of rows to skip. If negative, skips that many rows from the end. Default is 0. |
504
- | `takeRows` | `number` | `Number.POSITIVE_INFINITY` | Number of rows to take after skipping. If negative, excludes that many rows from the end of the remaining rows. Default is Infinity. |
505
- | `skipCols` | `number` | `0` | Number of columns to skip. If negative, skips that many columns from the end. Default is 0. |
506
- | `takeCols` | `number` | `Number.POSITIVE_INFINITY` | Number of columns to take after skipping. If negative, excludes that many columns from the end of the remaining columns. Default is Infinity. |
502
+ | `address` | [`Address`](Address.md#address) | `undefined` | Original range in A1 notation (e.g., "A1:D10"). |
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. |
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. |
507
507
 
508
508
  #### Returns
509
509
 
510
510
  [`Address`](Address.md#address)
511
511
 
512
- A new A1-style range representing the sliced subrange (e.g., "B2:C5").
512
+ New A1-style range representing the sliced sub-range (e.g., "B2:C5").
513
513
 
514
514
  #### Example
515
515
 
@@ -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:494](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/services/addressManipulation.ts#L494)
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
 
@@ -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` | `number` | `Number.POSITIVE_INFINITY` | Number of rows to take after skipping. If negative, excludes from the end. Default Infinity. |
539
+ | `takeRows` | `undefined` \| `number` | `undefined` | 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` | `number` | `Number.POSITIVE_INFINITY` | Number of columns to take after skipping. If negative, excludes from the end. Default Infinity. |
541
+ | `takeCols` | `undefined` \| `number` | `undefined` | Number of columns to take after skipping. If negative, excludes from the end. Default Infinity. |
542
542
 
543
543
  #### Returns
544
544
 
@@ -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:455](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/services/addressManipulation.ts#L455)
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).
@@ -565,17 +565,17 @@ Negative skip moves the start above/left of the original range (not from the end
565
565
 
566
566
  | Parameter | Type | Default value | Description |
567
567
  | ------ | ------ | ------ | ------ |
568
- | `address` | [`Address`](Address.md#address) | `undefined` | The original range in A1 notation (e.g., "A1:D10"). |
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` | `number` | `Number.POSITIVE_INFINITY` | Number of rows to take after skipping. If negative, excludes from the end. Default is Infinity. |
570
+ | `takeRows` | `undefined` \| `number` | `undefined` | 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` | `number` | `Number.POSITIVE_INFINITY` | Number of columns to take after skipping. If negative, excludes from the end. Default is Infinity. |
572
+ | `takeCols` | `undefined` \| `number` | `undefined` | Number of columns to take after skipping. If negative, excludes from the end. Default is Infinity. |
573
573
 
574
574
  #### Returns
575
575
 
576
576
  [`Address`](Address.md#address)
577
577
 
578
- A new A1-style range representing the superrange (may extend outside original bounds).
578
+ New A1-style range representing the super range (may extend outside original bounds).
579
579
 
580
580
  #### Example
581
581
 
@@ -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:513](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/services/addressManipulation.ts#L513)
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).
@@ -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` | `number` | `Number.POSITIVE_INFINITY` | Number of rows to take after skipping. If negative, excludes from the end. Default Infinity. |
603
+ | `takeRows` | `undefined` \| `number` | `undefined` | 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` | `number` | `Number.POSITIVE_INFINITY` | Number of columns to take after skipping. If negative, excludes from the end. Default Infinity. |
605
+ | `takeCols` | `undefined` \| `number` | `undefined` | Number of columns to take after skipping. If negative, excludes from the end. Default Infinity. |
606
606
 
607
607
  #### Returns
608
608
 
package/package.json CHANGED
@@ -1,14 +1,12 @@
1
1
  {
2
2
  "name": "microsoft-graph",
3
- "version": "3.4.0",
3
+ "version": "3.4.2",
4
4
  "description": "Microsoft GraphAPI SDK for NodeJS",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/esm/index.js",
7
7
  "types": "./dist/esm/index.d.ts",
8
8
  "scripts": {
9
- "check": "biome check",
10
- "fix": "biome check --fix",
11
- "build": "npm run check && rm -rf ./dist && echo 'Building for ESM...' && tsc -p tsconfig.esm.json && echo 'Building for CJS...' && tsc -p tsconfig.cjs.json && npx tsx update-exports.ts ",
9
+ "build": "biome check --fix && rm -rf ./dist && echo 'Building for ESM...' && tsc -p tsconfig.esm.json && echo 'Building for CJS...' && tsc -p tsconfig.cjs.json && npx tsx update-exports.ts ",
12
10
  "release": "npm run build && npm run docs && npm publish --access public",
13
11
  "test": "vitest --bail=3",
14
12
  "update": "npm-check-updates -u && npm install",