handsontable 0.0.0-next-10cbf34-20221130 → 0.0.0-next-4a99ab8-20221201
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of handsontable might be problematic. Click here for more details.
- package/3rdparty/walkontable/src/cell/coords.d.ts +1 -1
- package/3rdparty/walkontable/src/cell/coords.js +51 -23
- package/3rdparty/walkontable/src/cell/coords.mjs +51 -23
- package/3rdparty/walkontable/src/cell/range.d.ts +19 -16
- package/3rdparty/walkontable/src/cell/range.js +178 -101
- package/3rdparty/walkontable/src/cell/range.mjs +178 -101
- package/base.d.ts +1 -0
- package/base.js +7 -2
- package/base.mjs +7 -3
- package/dist/handsontable.css +2 -2
- package/dist/handsontable.full.css +2 -2
- package/dist/handsontable.full.js +425 -313
- package/dist/handsontable.full.min.css +2 -2
- package/dist/handsontable.full.min.js +22 -22
- package/dist/handsontable.js +411 -299
- package/dist/handsontable.min.css +2 -2
- package/dist/handsontable.min.js +3 -3
- package/helpers/mixed.js +1 -1
- package/helpers/mixed.mjs +1 -1
- package/index.d.ts +9 -0
- package/index.js +4 -2
- package/index.mjs +2 -1
- package/package.json +1 -1
@@ -18,11 +18,24 @@ function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _
|
|
18
18
|
function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
|
19
19
|
function _classApplyDescriptorSet(receiver, descriptor, value) { if (descriptor.set) { descriptor.set.call(receiver, value); } else { if (!descriptor.writable) { throw new TypeError("attempted to set read only private field"); } descriptor.value = value; } }
|
20
20
|
import CellCoords from "./../cell/coords.mjs";
|
21
|
+
/* eslint-disable jsdoc/require-description-complete-sentence */
|
21
22
|
/**
|
22
|
-
*
|
23
|
-
* can contains multiple contiguous cells or single cell.
|
23
|
+
* @description
|
24
24
|
*
|
25
|
-
*
|
25
|
+
* The `CellRange` class holds a set of cell coordinates ([`CellCoords`](@/api/cellCoords.md) instances)
|
26
|
+
* that form a [selection range](@/guides/cell-features/selection.md#select-ranges).
|
27
|
+
*
|
28
|
+
* A single `CellRange` instance represents a single unit of selection
|
29
|
+
* that contains either a single cell or multiple adjacent cells.
|
30
|
+
*
|
31
|
+
* To import the `CellRange` class:
|
32
|
+
*
|
33
|
+
* ```js
|
34
|
+
* import Handsontable, { CellRange } from '/handsontable';
|
35
|
+
*
|
36
|
+
* // or, using modules
|
37
|
+
* import Handsontable, { CellRange } from '/handsontable/base';
|
38
|
+
* ```
|
26
39
|
*/
|
27
40
|
var _isRtl = /*#__PURE__*/new WeakMap();
|
28
41
|
var CellRange = /*#__PURE__*/function () {
|
@@ -31,6 +44,7 @@ var CellRange = /*#__PURE__*/function () {
|
|
31
44
|
* when you press Enter. The highlight cannot point to headers (negative values) so its
|
32
45
|
* coordinates object is normalized while assigning.
|
33
46
|
*
|
47
|
+
* @private
|
34
48
|
* @type {CellCoords}
|
35
49
|
*/
|
36
50
|
|
@@ -38,12 +52,14 @@ var CellRange = /*#__PURE__*/function () {
|
|
38
52
|
* Usually the same as highlight, but in Excel there is distinction - one can change
|
39
53
|
* highlight within a selection.
|
40
54
|
*
|
55
|
+
* @private
|
41
56
|
* @type {CellCoords}
|
42
57
|
*/
|
43
58
|
|
44
59
|
/**
|
45
60
|
* End selection.
|
46
61
|
*
|
62
|
+
* @private
|
47
63
|
* @type {CellCoords}
|
48
64
|
*/
|
49
65
|
|
@@ -70,7 +86,7 @@ var CellRange = /*#__PURE__*/function () {
|
|
70
86
|
}
|
71
87
|
|
72
88
|
/**
|
73
|
-
*
|
89
|
+
* Highlights cell selection at the `coords` coordinates.
|
74
90
|
*
|
75
91
|
* @param {CellCoords} coords Coordinates to use.
|
76
92
|
* @returns {CellRange}
|
@@ -83,7 +99,7 @@ var CellRange = /*#__PURE__*/function () {
|
|
83
99
|
}
|
84
100
|
|
85
101
|
/**
|
86
|
-
*
|
102
|
+
* Sets the `coords` coordinates as the start of your range.
|
87
103
|
*
|
88
104
|
* @param {CellCoords} coords Coordinates to use.
|
89
105
|
* @returns {CellRange}
|
@@ -96,7 +112,7 @@ var CellRange = /*#__PURE__*/function () {
|
|
96
112
|
}
|
97
113
|
|
98
114
|
/**
|
99
|
-
*
|
115
|
+
* Sets the `coords` coordinates as the end of your range.
|
100
116
|
*
|
101
117
|
* @param {CellCoords} coords Coordinates to use.
|
102
118
|
* @returns {CellRange}
|
@@ -109,9 +125,12 @@ var CellRange = /*#__PURE__*/function () {
|
|
109
125
|
}
|
110
126
|
|
111
127
|
/**
|
112
|
-
* Checks if
|
128
|
+
* Checks if the coordinates in your `CellRange` instance are valid
|
129
|
+
* in the context of a given Walkontable instance.
|
113
130
|
*
|
114
|
-
*
|
131
|
+
* See the [`isValid()`](@/api/cellCoords.md#isvalid) method of the [`CellCoords`](@/api/cellCoords.md) class.
|
132
|
+
*
|
133
|
+
* @param {Walkontable} wot A Walkontable instance.
|
115
134
|
* @returns {boolean}
|
116
135
|
*/
|
117
136
|
}, {
|
@@ -121,7 +140,7 @@ var CellRange = /*#__PURE__*/function () {
|
|
121
140
|
}
|
122
141
|
|
123
142
|
/**
|
124
|
-
* Checks if
|
143
|
+
* Checks if your range is just a single cell.
|
125
144
|
*
|
126
145
|
* @returns {boolean}
|
127
146
|
*/
|
@@ -132,7 +151,7 @@ var CellRange = /*#__PURE__*/function () {
|
|
132
151
|
}
|
133
152
|
|
134
153
|
/**
|
135
|
-
* Returns
|
154
|
+
* Returns the height of your range (as a number of rows, including row headers).
|
136
155
|
*
|
137
156
|
* @returns {number}
|
138
157
|
*/
|
@@ -143,7 +162,7 @@ var CellRange = /*#__PURE__*/function () {
|
|
143
162
|
}
|
144
163
|
|
145
164
|
/**
|
146
|
-
* Returns
|
165
|
+
* Returns the width of your range (as a number of columns, including column headers).
|
147
166
|
*
|
148
167
|
* @returns {number}
|
149
168
|
*/
|
@@ -154,7 +173,7 @@ var CellRange = /*#__PURE__*/function () {
|
|
154
173
|
}
|
155
174
|
|
156
175
|
/**
|
157
|
-
* Returns
|
176
|
+
* Returns the height of your range (as a number of rows, excluding row headers).
|
158
177
|
*
|
159
178
|
* @returns {number}
|
160
179
|
*/
|
@@ -171,7 +190,7 @@ var CellRange = /*#__PURE__*/function () {
|
|
171
190
|
}
|
172
191
|
|
173
192
|
/**
|
174
|
-
* Returns
|
193
|
+
* Returns the width of your range (as a number of columns, excluding column headers).
|
175
194
|
*
|
176
195
|
* @returns {number}
|
177
196
|
*/
|
@@ -188,7 +207,7 @@ var CellRange = /*#__PURE__*/function () {
|
|
188
207
|
}
|
189
208
|
|
190
209
|
/**
|
191
|
-
* Returns the number of cells within
|
210
|
+
* Returns the number of cells within your range (excluding column and row headers).
|
192
211
|
*
|
193
212
|
* @returns {number}
|
194
213
|
*/
|
@@ -199,9 +218,10 @@ var CellRange = /*#__PURE__*/function () {
|
|
199
218
|
}
|
200
219
|
|
201
220
|
/**
|
202
|
-
* Checks if
|
221
|
+
* Checks if another set of coordinates (`cellCoords`)
|
222
|
+
* is within the `from` and `to` coordinates of your range.
|
203
223
|
*
|
204
|
-
* @param {CellCoords} cellCoords
|
224
|
+
* @param {CellCoords} cellCoords Coordinates to check.
|
205
225
|
* @returns {boolean}
|
206
226
|
*/
|
207
227
|
}, {
|
@@ -215,9 +235,9 @@ var CellRange = /*#__PURE__*/function () {
|
|
215
235
|
}
|
216
236
|
|
217
237
|
/**
|
218
|
-
* Checks if
|
238
|
+
* Checks if another range (`cellRange`) is within your range.
|
219
239
|
*
|
220
|
-
* @param {CellRange} cellRange
|
240
|
+
* @param {CellRange} cellRange A range to check.
|
221
241
|
* @returns {boolean}
|
222
242
|
*/
|
223
243
|
}, {
|
@@ -227,9 +247,9 @@ var CellRange = /*#__PURE__*/function () {
|
|
227
247
|
}
|
228
248
|
|
229
249
|
/**
|
230
|
-
* Checks if
|
250
|
+
* Checks if another range (`cellRange`) is equal to your range.
|
231
251
|
*
|
232
|
-
* @param {CellRange} cellRange
|
252
|
+
* @param {CellRange} cellRange A range to check.
|
233
253
|
* @returns {boolean}
|
234
254
|
*/
|
235
255
|
}, {
|
@@ -239,10 +259,11 @@ var CellRange = /*#__PURE__*/function () {
|
|
239
259
|
}
|
240
260
|
|
241
261
|
/**
|
242
|
-
* Checks if
|
243
|
-
*
|
262
|
+
* Checks if another range (`cellRange`) overlaps your range.
|
263
|
+
*
|
264
|
+
* Range A overlaps range B if the intersection of A and B (or B and A) is not empty.
|
244
265
|
*
|
245
|
-
* @param {CellRange} cellRange
|
266
|
+
* @param {CellRange} cellRange A range to check.
|
246
267
|
* @returns {boolean}
|
247
268
|
*/
|
248
269
|
}, {
|
@@ -252,9 +273,9 @@ var CellRange = /*#__PURE__*/function () {
|
|
252
273
|
}
|
253
274
|
|
254
275
|
/**
|
255
|
-
* Checks if
|
276
|
+
* Checks if another range (`cellRange`) is south-east of your range.
|
256
277
|
*
|
257
|
-
* @param {CellRange} cellRange
|
278
|
+
* @param {CellRange} cellRange A range to check.
|
258
279
|
* @returns {boolean}
|
259
280
|
*/
|
260
281
|
}, {
|
@@ -264,9 +285,9 @@ var CellRange = /*#__PURE__*/function () {
|
|
264
285
|
}
|
265
286
|
|
266
287
|
/**
|
267
|
-
* Checks if
|
288
|
+
* Checks if another range (`cellRange`) is north-west of your range.
|
268
289
|
*
|
269
|
-
* @param {CellRange} cellRange
|
290
|
+
* @param {CellRange} cellRange A range to check.
|
270
291
|
* @returns {boolean}
|
271
292
|
*/
|
272
293
|
}, {
|
@@ -276,10 +297,12 @@ var CellRange = /*#__PURE__*/function () {
|
|
276
297
|
}
|
277
298
|
|
278
299
|
/**
|
279
|
-
*
|
280
|
-
* column is 5 and the provided range's first column is 3).
|
300
|
+
* Checks if another range (`cellRange`) overlaps your range horizontally.
|
281
301
|
*
|
282
|
-
*
|
302
|
+
* For example: returns `true` if the last column of your range is `5`
|
303
|
+
* and the first column of the `cellRange` range is `3`.
|
304
|
+
*
|
305
|
+
* @param {CellRange} cellRange A range to check.
|
283
306
|
* @returns {boolean}
|
284
307
|
*/
|
285
308
|
}, {
|
@@ -289,10 +312,12 @@ var CellRange = /*#__PURE__*/function () {
|
|
289
312
|
}
|
290
313
|
|
291
314
|
/**
|
292
|
-
*
|
293
|
-
*
|
315
|
+
* Checks if another range (`cellRange`) overlaps your range vertically.
|
316
|
+
*
|
317
|
+
* For example: returns `true` if the last row of your range is `5`
|
318
|
+
* and the first row of the `cellRange` range is `3`.
|
294
319
|
*
|
295
|
-
* @param {CellRange} cellRange
|
320
|
+
* @param {CellRange} cellRange A range to check.
|
296
321
|
* @returns {boolean}
|
297
322
|
*/
|
298
323
|
}, {
|
@@ -302,9 +327,11 @@ var CellRange = /*#__PURE__*/function () {
|
|
302
327
|
}
|
303
328
|
|
304
329
|
/**
|
305
|
-
* Adds a cell to
|
330
|
+
* Adds a cell to your range, at `cellCoords` coordinates.
|
306
331
|
*
|
307
|
-
*
|
332
|
+
* The `cellCoords` coordinates must exceed a corner of your range.
|
333
|
+
*
|
334
|
+
* @param {CellCoords} cellCoords A new cell's coordinates.
|
308
335
|
* @returns {boolean}
|
309
336
|
*/
|
310
337
|
}, {
|
@@ -321,9 +348,9 @@ var CellRange = /*#__PURE__*/function () {
|
|
321
348
|
}
|
322
349
|
|
323
350
|
/**
|
324
|
-
* Expand
|
351
|
+
* Expand your range with another range (`expandingRange`).
|
325
352
|
*
|
326
|
-
* @param {CellRange} expandingRange
|
353
|
+
* @param {CellRange} expandingRange A new range.
|
327
354
|
* @returns {boolean}
|
328
355
|
*/
|
329
356
|
}, {
|
@@ -413,7 +440,7 @@ var CellRange = /*#__PURE__*/function () {
|
|
413
440
|
}
|
414
441
|
|
415
442
|
/**
|
416
|
-
* Gets the vertical direction of the
|
443
|
+
* Gets the vertical direction of the selection.
|
417
444
|
*
|
418
445
|
* @returns {string} Returns one of the values: `N-S` (north->south), `S-N` (south->north).
|
419
446
|
*/
|
@@ -424,7 +451,7 @@ var CellRange = /*#__PURE__*/function () {
|
|
424
451
|
}
|
425
452
|
|
426
453
|
/**
|
427
|
-
* Gets the horizontal direction of the
|
454
|
+
* Gets the horizontal direction of the selection.
|
428
455
|
*
|
429
456
|
* @returns {string} Returns one of the values: `W-E` (west->east), `E-W` (east->west).
|
430
457
|
*/
|
@@ -435,7 +462,7 @@ var CellRange = /*#__PURE__*/function () {
|
|
435
462
|
}
|
436
463
|
|
437
464
|
/**
|
438
|
-
*
|
465
|
+
* Flips the direction of your range vertically (e.g., `NW-SE` changes to `SW-NE`).
|
439
466
|
*/
|
440
467
|
}, {
|
441
468
|
key: "flipDirectionVertically",
|
@@ -460,7 +487,7 @@ var CellRange = /*#__PURE__*/function () {
|
|
460
487
|
}
|
461
488
|
|
462
489
|
/**
|
463
|
-
*
|
490
|
+
* Flips the direction of your range horizontally (e.g., `NW-SE` changes to `NE-SW`).
|
464
491
|
*/
|
465
492
|
}, {
|
466
493
|
key: "flipDirectionHorizontally",
|
@@ -485,8 +512,10 @@ var CellRange = /*#__PURE__*/function () {
|
|
485
512
|
}
|
486
513
|
|
487
514
|
/**
|
488
|
-
* Gets the top
|
489
|
-
*
|
515
|
+
* Gets the top-left (in LTR) or top-right (in RTL) corner coordinates of your range.
|
516
|
+
*
|
517
|
+
* If the corner contains header coordinates (negative values),
|
518
|
+
* the corner coordinates are normalized to `0`.
|
490
519
|
*
|
491
520
|
* @returns {CellCoords}
|
492
521
|
*/
|
@@ -497,8 +526,11 @@ var CellRange = /*#__PURE__*/function () {
|
|
497
526
|
}
|
498
527
|
|
499
528
|
/**
|
500
|
-
* Gets the top
|
501
|
-
*
|
529
|
+
* Gets the top-left corner coordinates of your range,
|
530
|
+
* both in the LTR and RTL layout direction.
|
531
|
+
*
|
532
|
+
* If the corner contains header coordinates (negative values),
|
533
|
+
* the corner coordinates are normalized to `0`.
|
502
534
|
*
|
503
535
|
* @returns {CellCoords}
|
504
536
|
*/
|
@@ -509,8 +541,10 @@ var CellRange = /*#__PURE__*/function () {
|
|
509
541
|
}
|
510
542
|
|
511
543
|
/**
|
512
|
-
* Gets the bottom right (in LTR) or bottom left (in RTL) corner coordinates of
|
513
|
-
*
|
544
|
+
* Gets the bottom right (in LTR) or bottom left (in RTL) corner coordinates of your range.
|
545
|
+
*
|
546
|
+
* If the corner contains header coordinates (negative values),
|
547
|
+
* the corner coordinates are normalized to `0`.
|
514
548
|
*
|
515
549
|
* @returns {CellCoords}
|
516
550
|
*/
|
@@ -521,8 +555,11 @@ var CellRange = /*#__PURE__*/function () {
|
|
521
555
|
}
|
522
556
|
|
523
557
|
/**
|
524
|
-
* Gets the bottom right corner coordinates of
|
525
|
-
*
|
558
|
+
* Gets the bottom right corner coordinates of your range,
|
559
|
+
* both in the LTR and RTL layout direction.
|
560
|
+
*
|
561
|
+
* If the corner contains header coordinates (negative values),
|
562
|
+
* the corner coordinates are normalized to `0`.
|
526
563
|
*
|
527
564
|
* @returns {CellCoords}
|
528
565
|
*/
|
@@ -533,8 +570,10 @@ var CellRange = /*#__PURE__*/function () {
|
|
533
570
|
}
|
534
571
|
|
535
572
|
/**
|
536
|
-
* Gets the top right (in LTR) or top left (in RTL) corner coordinates of
|
537
|
-
*
|
573
|
+
* Gets the top right (in LTR) or top left (in RTL) corner coordinates of your range.
|
574
|
+
*
|
575
|
+
* If the corner contains header coordinates (negative values),
|
576
|
+
* the corner coordinates are normalized to `0`.
|
538
577
|
*
|
539
578
|
* @returns {CellCoords}
|
540
579
|
*/
|
@@ -545,8 +584,11 @@ var CellRange = /*#__PURE__*/function () {
|
|
545
584
|
}
|
546
585
|
|
547
586
|
/**
|
548
|
-
* Gets the top right corner coordinates of
|
549
|
-
*
|
587
|
+
* Gets the top right corner coordinates of your range,
|
588
|
+
* both in the LTR and RTL layout direction.
|
589
|
+
*
|
590
|
+
* If the corner contains header coordinates (negative values),
|
591
|
+
* the corner coordinates are normalized to `0`.
|
550
592
|
*
|
551
593
|
* @returns {CellCoords}
|
552
594
|
*/
|
@@ -557,8 +599,10 @@ var CellRange = /*#__PURE__*/function () {
|
|
557
599
|
}
|
558
600
|
|
559
601
|
/**
|
560
|
-
* Gets the bottom left (in LTR) or bottom right (in RTL) corner coordinates of
|
561
|
-
*
|
602
|
+
* Gets the bottom left (in LTR) or bottom right (in RTL) corner coordinates of your range.
|
603
|
+
*
|
604
|
+
* If the corner contains header coordinates (negative values),
|
605
|
+
* the corner coordinates are normalized to `0`.
|
562
606
|
*
|
563
607
|
* @returns {CellCoords}
|
564
608
|
*/
|
@@ -569,8 +613,11 @@ var CellRange = /*#__PURE__*/function () {
|
|
569
613
|
}
|
570
614
|
|
571
615
|
/**
|
572
|
-
* Gets the bottom left corner coordinates of
|
573
|
-
*
|
616
|
+
* Gets the bottom left corner coordinates of your range,
|
617
|
+
* both in the LTR and RTL layout direction.
|
618
|
+
*
|
619
|
+
* If the corner contains header coordinates (negative values),
|
620
|
+
* the corner coordinates are normalized to `0`.
|
574
621
|
*
|
575
622
|
* @returns {CellCoords}
|
576
623
|
*/
|
@@ -581,8 +628,10 @@ var CellRange = /*#__PURE__*/function () {
|
|
581
628
|
}
|
582
629
|
|
583
630
|
/**
|
584
|
-
* Gets the top left (in LTR) or top right (in RTL) corner coordinates of
|
585
|
-
*
|
631
|
+
* Gets the top left (in LTR) or top right (in RTL) corner coordinates of your range.
|
632
|
+
*
|
633
|
+
* If the corner contains header coordinates (negative values),
|
634
|
+
* the top and start coordinates are pointed to that header.
|
586
635
|
*
|
587
636
|
* @returns {CellCoords}
|
588
637
|
*/
|
@@ -593,9 +642,11 @@ var CellRange = /*#__PURE__*/function () {
|
|
593
642
|
}
|
594
643
|
|
595
644
|
/**
|
596
|
-
* Gets the top left corner coordinates of
|
597
|
-
*
|
598
|
-
*
|
645
|
+
* Gets the top left corner coordinates of your range,
|
646
|
+
* both in the LTR and RTL layout direction.
|
647
|
+
*
|
648
|
+
* If the corner contains header coordinates (negative values),
|
649
|
+
* the top and left coordinates are pointed to that header.
|
599
650
|
*
|
600
651
|
* @returns {CellCoords}
|
601
652
|
*/
|
@@ -606,8 +657,10 @@ var CellRange = /*#__PURE__*/function () {
|
|
606
657
|
}
|
607
658
|
|
608
659
|
/**
|
609
|
-
* Gets the bottom right (in LTR) or bottom left (in RTL) corner coordinates of
|
610
|
-
*
|
660
|
+
* Gets the bottom right (in LTR) or bottom left (in RTL) corner coordinates of your range.
|
661
|
+
*
|
662
|
+
* If the corner contains header coordinates (negative values),
|
663
|
+
* the top and start coordinates are pointed to that header.
|
611
664
|
*
|
612
665
|
* @returns {CellCoords}
|
613
666
|
*/
|
@@ -618,9 +671,11 @@ var CellRange = /*#__PURE__*/function () {
|
|
618
671
|
}
|
619
672
|
|
620
673
|
/**
|
621
|
-
* Gets the bottom right corner coordinates of
|
622
|
-
*
|
623
|
-
*
|
674
|
+
* Gets the bottom right corner coordinates of your range,
|
675
|
+
* both in the LTR and RTL layout direction.
|
676
|
+
*
|
677
|
+
* If the corner contains header coordinates (negative values),
|
678
|
+
* the top and left coordinates are pointed to that header.
|
624
679
|
*
|
625
680
|
* @returns {CellCoords}
|
626
681
|
*/
|
@@ -631,8 +686,10 @@ var CellRange = /*#__PURE__*/function () {
|
|
631
686
|
}
|
632
687
|
|
633
688
|
/**
|
634
|
-
* Gets the top right (in LTR) or top left (in RTL) corner coordinates of
|
635
|
-
*
|
689
|
+
* Gets the top right (in LTR) or top left (in RTL) corner coordinates of your range.
|
690
|
+
*
|
691
|
+
* If the corner contains header coordinates (negative values),
|
692
|
+
* the top and start coordinates are pointed to that header.
|
636
693
|
*
|
637
694
|
* @returns {CellCoords}
|
638
695
|
*/
|
@@ -643,9 +700,11 @@ var CellRange = /*#__PURE__*/function () {
|
|
643
700
|
}
|
644
701
|
|
645
702
|
/**
|
646
|
-
* Gets the top right corner coordinates of
|
647
|
-
*
|
648
|
-
*
|
703
|
+
* Gets the top right corner coordinates of your range,
|
704
|
+
* both in the LTR and RTL layout direction.
|
705
|
+
*
|
706
|
+
* If the corner contains header coordinates (negative values),
|
707
|
+
* the top and left coordinates are pointed to that header.
|
649
708
|
*
|
650
709
|
* @returns {CellCoords}
|
651
710
|
*/
|
@@ -656,8 +715,10 @@ var CellRange = /*#__PURE__*/function () {
|
|
656
715
|
}
|
657
716
|
|
658
717
|
/**
|
659
|
-
* Gets the bottom left (in LTR) or bottom right (in RTL) corner coordinates of
|
660
|
-
*
|
718
|
+
* Gets the bottom left (in LTR) or bottom right (in RTL) corner coordinates of your range.
|
719
|
+
*
|
720
|
+
* If the corner contains header coordinates (negative values),
|
721
|
+
* the top and start coordinates are pointed to that header.
|
661
722
|
*
|
662
723
|
* @returns {CellCoords}
|
663
724
|
*/
|
@@ -668,9 +729,11 @@ var CellRange = /*#__PURE__*/function () {
|
|
668
729
|
}
|
669
730
|
|
670
731
|
/**
|
671
|
-
* Gets the bottom left corner coordinates of
|
672
|
-
*
|
673
|
-
*
|
732
|
+
* Gets the bottom left corner coordinates of your range,
|
733
|
+
* both in the LTR and RTL layout direction.
|
734
|
+
*
|
735
|
+
* If the corner contains header coordinates (negative values),
|
736
|
+
* the top and left coordinates are pointed to that header.
|
674
737
|
*
|
675
738
|
* @returns {CellCoords}
|
676
739
|
*/
|
@@ -681,10 +744,10 @@ var CellRange = /*#__PURE__*/function () {
|
|
681
744
|
}
|
682
745
|
|
683
746
|
/**
|
684
|
-
* Checks if coordinates
|
747
|
+
* Checks if a set of coordinates (`coords`) matches one of the 4 corners of your range.
|
685
748
|
*
|
686
|
-
* @param {CellCoords} coords
|
687
|
-
* @param {CellRange} [expandedRange]
|
749
|
+
* @param {CellCoords} coords Coordinates to check.
|
750
|
+
* @param {CellRange} [expandedRange] A range to compare with.
|
688
751
|
* @returns {boolean}
|
689
752
|
*/
|
690
753
|
}, {
|
@@ -697,11 +760,13 @@ var CellRange = /*#__PURE__*/function () {
|
|
697
760
|
}
|
698
761
|
|
699
762
|
/**
|
700
|
-
* Gets coordinates of
|
701
|
-
* bottom-right corner of this range then the coordinates for top-left will be returned.
|
763
|
+
* Gets the coordinates of a range corner opposite to the provided `coords`.
|
702
764
|
*
|
703
|
-
*
|
704
|
-
*
|
765
|
+
* For example: if the `coords` coordinates match the bottom-right corner of your range,
|
766
|
+
* the coordinates of the top-left corner of your range are returned.
|
767
|
+
*
|
768
|
+
* @param {CellCoords} coords Coordinates to check.
|
769
|
+
* @param {CellRange} [expandedRange] A range to compare with.
|
705
770
|
* @returns {CellCoords}
|
706
771
|
*/
|
707
772
|
}, {
|
@@ -740,8 +805,11 @@ var CellRange = /*#__PURE__*/function () {
|
|
740
805
|
}
|
741
806
|
|
742
807
|
/**
|
743
|
-
*
|
744
|
-
*
|
808
|
+
* Indicates which borders (top, right, bottom, left) are shared between
|
809
|
+
* your `CellRange`instance and another `range` that's within your range.
|
810
|
+
*
|
811
|
+
* @param {CellRange} range A range to compare with.
|
812
|
+
* @returns {Array<'top' | 'right' | 'bottom' | 'left'>}
|
745
813
|
*/
|
746
814
|
}, {
|
747
815
|
key: "getBordersSharedWith",
|
@@ -778,9 +846,9 @@ var CellRange = /*#__PURE__*/function () {
|
|
778
846
|
}
|
779
847
|
|
780
848
|
/**
|
781
|
-
*
|
849
|
+
* Gets the coordinates of the inner cells of your range.
|
782
850
|
*
|
783
|
-
* @returns {
|
851
|
+
* @returns {CellCoords[]}
|
784
852
|
*/
|
785
853
|
}, {
|
786
854
|
key: "getInner",
|
@@ -799,9 +867,9 @@ var CellRange = /*#__PURE__*/function () {
|
|
799
867
|
}
|
800
868
|
|
801
869
|
/**
|
802
|
-
*
|
870
|
+
* Gets the coordinates of all cells of your range.
|
803
871
|
*
|
804
|
-
* @returns {
|
872
|
+
* @returns {CellCoords[]}
|
805
873
|
*/
|
806
874
|
}, {
|
807
875
|
key: "getAll",
|
@@ -824,10 +892,11 @@ var CellRange = /*#__PURE__*/function () {
|
|
824
892
|
}
|
825
893
|
|
826
894
|
/**
|
827
|
-
* Runs a callback function
|
828
|
-
* `false` in the callback function.
|
895
|
+
* Runs a callback function on all cells within your range.
|
829
896
|
*
|
830
|
-
*
|
897
|
+
* You can break the iteration by returning `false` in the callback function.
|
898
|
+
*
|
899
|
+
* @param {function(number, number): boolean} callback A callback function.
|
831
900
|
*/
|
832
901
|
}, {
|
833
902
|
key: "forAll",
|
@@ -845,7 +914,7 @@ var CellRange = /*#__PURE__*/function () {
|
|
845
914
|
}
|
846
915
|
|
847
916
|
/**
|
848
|
-
* Clones
|
917
|
+
* Clones your `CellRange` instance.
|
849
918
|
*
|
850
919
|
* @returns {CellRange}
|
851
920
|
*/
|
@@ -856,10 +925,16 @@ var CellRange = /*#__PURE__*/function () {
|
|
856
925
|
}
|
857
926
|
|
858
927
|
/**
|
859
|
-
*
|
928
|
+
* Converts your `CellRange` instance into an object literal with the following properties:
|
929
|
+
*
|
930
|
+
* - `from`
|
931
|
+
* - `row`
|
932
|
+
* - `col`
|
933
|
+
* - `to`
|
934
|
+
* - `row`
|
935
|
+
* - `col`
|
860
936
|
*
|
861
|
-
* @returns {
|
862
|
-
* contains `row` and `col` keys.
|
937
|
+
* @returns {{from: {row: number, col: number}, to: {row: number, col: number}}} An object literal with `from` and `to` properties.
|
863
938
|
*/
|
864
939
|
}, {
|
865
940
|
key: "toObject",
|
@@ -871,12 +946,14 @@ var CellRange = /*#__PURE__*/function () {
|
|
871
946
|
}
|
872
947
|
|
873
948
|
/**
|
874
|
-
* Creates and returns a new instance of the CellCoords
|
875
|
-
*
|
949
|
+
* Creates and returns a new instance of the `CellCoords` class.
|
950
|
+
*
|
951
|
+
* The new `CellCoords` instance automatically inherits the LTR/RTL flag
|
952
|
+
* from your `CellRange` instance.
|
876
953
|
*
|
877
954
|
* @private
|
878
|
-
* @param {number} row
|
879
|
-
* @param {number} column
|
955
|
+
* @param {number} row A row index.
|
956
|
+
* @param {number} column A column index.
|
880
957
|
* @returns {CellCoords}
|
881
958
|
*/
|
882
959
|
}, {
|
package/base.d.ts
CHANGED