handsontable 0.0.0-next-3e92a2d-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
@@ -24,11 +24,24 @@ function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _
|
|
24
24
|
function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
|
25
25
|
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; } }
|
26
26
|
var _isRtl = /*#__PURE__*/new WeakMap();
|
27
|
+
/* eslint-disable jsdoc/require-description-complete-sentence */
|
27
28
|
/**
|
28
|
-
*
|
29
|
-
* can contains multiple contiguous cells or single cell.
|
29
|
+
* @description
|
30
30
|
*
|
31
|
-
*
|
31
|
+
* The `CellRange` class holds a set of cell coordinates ([`CellCoords`](@/api/cellCoords.md) instances)
|
32
|
+
* that form a [selection range](@/guides/cell-features/selection.md#select-ranges).
|
33
|
+
*
|
34
|
+
* A single `CellRange` instance represents a single unit of selection
|
35
|
+
* that contains either a single cell or multiple adjacent cells.
|
36
|
+
*
|
37
|
+
* To import the `CellRange` class:
|
38
|
+
*
|
39
|
+
* ```js
|
40
|
+
* import Handsontable, { CellRange } from '/handsontable';
|
41
|
+
*
|
42
|
+
* // or, using modules
|
43
|
+
* import Handsontable, { CellRange } from '/handsontable/base';
|
44
|
+
* ```
|
32
45
|
*/
|
33
46
|
var CellRange = /*#__PURE__*/function () {
|
34
47
|
/**
|
@@ -36,6 +49,7 @@ var CellRange = /*#__PURE__*/function () {
|
|
36
49
|
* when you press Enter. The highlight cannot point to headers (negative values) so its
|
37
50
|
* coordinates object is normalized while assigning.
|
38
51
|
*
|
52
|
+
* @private
|
39
53
|
* @type {CellCoords}
|
40
54
|
*/
|
41
55
|
|
@@ -43,12 +57,14 @@ var CellRange = /*#__PURE__*/function () {
|
|
43
57
|
* Usually the same as highlight, but in Excel there is distinction - one can change
|
44
58
|
* highlight within a selection.
|
45
59
|
*
|
60
|
+
* @private
|
46
61
|
* @type {CellCoords}
|
47
62
|
*/
|
48
63
|
|
49
64
|
/**
|
50
65
|
* End selection.
|
51
66
|
*
|
67
|
+
* @private
|
52
68
|
* @type {CellCoords}
|
53
69
|
*/
|
54
70
|
|
@@ -75,7 +91,7 @@ var CellRange = /*#__PURE__*/function () {
|
|
75
91
|
}
|
76
92
|
|
77
93
|
/**
|
78
|
-
*
|
94
|
+
* Highlights cell selection at the `coords` coordinates.
|
79
95
|
*
|
80
96
|
* @param {CellCoords} coords Coordinates to use.
|
81
97
|
* @returns {CellRange}
|
@@ -88,7 +104,7 @@ var CellRange = /*#__PURE__*/function () {
|
|
88
104
|
}
|
89
105
|
|
90
106
|
/**
|
91
|
-
*
|
107
|
+
* Sets the `coords` coordinates as the start of your range.
|
92
108
|
*
|
93
109
|
* @param {CellCoords} coords Coordinates to use.
|
94
110
|
* @returns {CellRange}
|
@@ -101,7 +117,7 @@ var CellRange = /*#__PURE__*/function () {
|
|
101
117
|
}
|
102
118
|
|
103
119
|
/**
|
104
|
-
*
|
120
|
+
* Sets the `coords` coordinates as the end of your range.
|
105
121
|
*
|
106
122
|
* @param {CellCoords} coords Coordinates to use.
|
107
123
|
* @returns {CellRange}
|
@@ -114,9 +130,12 @@ var CellRange = /*#__PURE__*/function () {
|
|
114
130
|
}
|
115
131
|
|
116
132
|
/**
|
117
|
-
* Checks if
|
133
|
+
* Checks if the coordinates in your `CellRange` instance are valid
|
134
|
+
* in the context of a given Walkontable instance.
|
118
135
|
*
|
119
|
-
*
|
136
|
+
* See the [`isValid()`](@/api/cellCoords.md#isvalid) method of the [`CellCoords`](@/api/cellCoords.md) class.
|
137
|
+
*
|
138
|
+
* @param {Walkontable} wot A Walkontable instance.
|
120
139
|
* @returns {boolean}
|
121
140
|
*/
|
122
141
|
}, {
|
@@ -126,7 +145,7 @@ var CellRange = /*#__PURE__*/function () {
|
|
126
145
|
}
|
127
146
|
|
128
147
|
/**
|
129
|
-
* Checks if
|
148
|
+
* Checks if your range is just a single cell.
|
130
149
|
*
|
131
150
|
* @returns {boolean}
|
132
151
|
*/
|
@@ -137,7 +156,7 @@ var CellRange = /*#__PURE__*/function () {
|
|
137
156
|
}
|
138
157
|
|
139
158
|
/**
|
140
|
-
* Returns
|
159
|
+
* Returns the height of your range (as a number of rows, including row headers).
|
141
160
|
*
|
142
161
|
* @returns {number}
|
143
162
|
*/
|
@@ -148,7 +167,7 @@ var CellRange = /*#__PURE__*/function () {
|
|
148
167
|
}
|
149
168
|
|
150
169
|
/**
|
151
|
-
* Returns
|
170
|
+
* Returns the width of your range (as a number of columns, including column headers).
|
152
171
|
*
|
153
172
|
* @returns {number}
|
154
173
|
*/
|
@@ -159,7 +178,7 @@ var CellRange = /*#__PURE__*/function () {
|
|
159
178
|
}
|
160
179
|
|
161
180
|
/**
|
162
|
-
* Returns
|
181
|
+
* Returns the height of your range (as a number of rows, excluding row headers).
|
163
182
|
*
|
164
183
|
* @returns {number}
|
165
184
|
*/
|
@@ -176,7 +195,7 @@ var CellRange = /*#__PURE__*/function () {
|
|
176
195
|
}
|
177
196
|
|
178
197
|
/**
|
179
|
-
* Returns
|
198
|
+
* Returns the width of your range (as a number of columns, excluding column headers).
|
180
199
|
*
|
181
200
|
* @returns {number}
|
182
201
|
*/
|
@@ -193,7 +212,7 @@ var CellRange = /*#__PURE__*/function () {
|
|
193
212
|
}
|
194
213
|
|
195
214
|
/**
|
196
|
-
* Returns the number of cells within
|
215
|
+
* Returns the number of cells within your range (excluding column and row headers).
|
197
216
|
*
|
198
217
|
* @returns {number}
|
199
218
|
*/
|
@@ -204,9 +223,10 @@ var CellRange = /*#__PURE__*/function () {
|
|
204
223
|
}
|
205
224
|
|
206
225
|
/**
|
207
|
-
* Checks if
|
226
|
+
* Checks if another set of coordinates (`cellCoords`)
|
227
|
+
* is within the `from` and `to` coordinates of your range.
|
208
228
|
*
|
209
|
-
* @param {CellCoords} cellCoords
|
229
|
+
* @param {CellCoords} cellCoords Coordinates to check.
|
210
230
|
* @returns {boolean}
|
211
231
|
*/
|
212
232
|
}, {
|
@@ -220,9 +240,9 @@ var CellRange = /*#__PURE__*/function () {
|
|
220
240
|
}
|
221
241
|
|
222
242
|
/**
|
223
|
-
* Checks if
|
243
|
+
* Checks if another range (`cellRange`) is within your range.
|
224
244
|
*
|
225
|
-
* @param {CellRange} cellRange
|
245
|
+
* @param {CellRange} cellRange A range to check.
|
226
246
|
* @returns {boolean}
|
227
247
|
*/
|
228
248
|
}, {
|
@@ -232,9 +252,9 @@ var CellRange = /*#__PURE__*/function () {
|
|
232
252
|
}
|
233
253
|
|
234
254
|
/**
|
235
|
-
* Checks if
|
255
|
+
* Checks if another range (`cellRange`) is equal to your range.
|
236
256
|
*
|
237
|
-
* @param {CellRange} cellRange
|
257
|
+
* @param {CellRange} cellRange A range to check.
|
238
258
|
* @returns {boolean}
|
239
259
|
*/
|
240
260
|
}, {
|
@@ -244,10 +264,11 @@ var CellRange = /*#__PURE__*/function () {
|
|
244
264
|
}
|
245
265
|
|
246
266
|
/**
|
247
|
-
* Checks if
|
248
|
-
*
|
267
|
+
* Checks if another range (`cellRange`) overlaps your range.
|
268
|
+
*
|
269
|
+
* Range A overlaps range B if the intersection of A and B (or B and A) is not empty.
|
249
270
|
*
|
250
|
-
* @param {CellRange} cellRange
|
271
|
+
* @param {CellRange} cellRange A range to check.
|
251
272
|
* @returns {boolean}
|
252
273
|
*/
|
253
274
|
}, {
|
@@ -257,9 +278,9 @@ var CellRange = /*#__PURE__*/function () {
|
|
257
278
|
}
|
258
279
|
|
259
280
|
/**
|
260
|
-
* Checks if
|
281
|
+
* Checks if another range (`cellRange`) is south-east of your range.
|
261
282
|
*
|
262
|
-
* @param {CellRange} cellRange
|
283
|
+
* @param {CellRange} cellRange A range to check.
|
263
284
|
* @returns {boolean}
|
264
285
|
*/
|
265
286
|
}, {
|
@@ -269,9 +290,9 @@ var CellRange = /*#__PURE__*/function () {
|
|
269
290
|
}
|
270
291
|
|
271
292
|
/**
|
272
|
-
* Checks if
|
293
|
+
* Checks if another range (`cellRange`) is north-west of your range.
|
273
294
|
*
|
274
|
-
* @param {CellRange} cellRange
|
295
|
+
* @param {CellRange} cellRange A range to check.
|
275
296
|
* @returns {boolean}
|
276
297
|
*/
|
277
298
|
}, {
|
@@ -281,10 +302,12 @@ var CellRange = /*#__PURE__*/function () {
|
|
281
302
|
}
|
282
303
|
|
283
304
|
/**
|
284
|
-
*
|
285
|
-
* column is 5 and the provided range's first column is 3).
|
305
|
+
* Checks if another range (`cellRange`) overlaps your range horizontally.
|
286
306
|
*
|
287
|
-
*
|
307
|
+
* For example: returns `true` if the last column of your range is `5`
|
308
|
+
* and the first column of the `cellRange` range is `3`.
|
309
|
+
*
|
310
|
+
* @param {CellRange} cellRange A range to check.
|
288
311
|
* @returns {boolean}
|
289
312
|
*/
|
290
313
|
}, {
|
@@ -294,10 +317,12 @@ var CellRange = /*#__PURE__*/function () {
|
|
294
317
|
}
|
295
318
|
|
296
319
|
/**
|
297
|
-
*
|
298
|
-
*
|
320
|
+
* Checks if another range (`cellRange`) overlaps your range vertically.
|
321
|
+
*
|
322
|
+
* For example: returns `true` if the last row of your range is `5`
|
323
|
+
* and the first row of the `cellRange` range is `3`.
|
299
324
|
*
|
300
|
-
* @param {CellRange} cellRange
|
325
|
+
* @param {CellRange} cellRange A range to check.
|
301
326
|
* @returns {boolean}
|
302
327
|
*/
|
303
328
|
}, {
|
@@ -307,9 +332,11 @@ var CellRange = /*#__PURE__*/function () {
|
|
307
332
|
}
|
308
333
|
|
309
334
|
/**
|
310
|
-
* Adds a cell to
|
335
|
+
* Adds a cell to your range, at `cellCoords` coordinates.
|
311
336
|
*
|
312
|
-
*
|
337
|
+
* The `cellCoords` coordinates must exceed a corner of your range.
|
338
|
+
*
|
339
|
+
* @param {CellCoords} cellCoords A new cell's coordinates.
|
313
340
|
* @returns {boolean}
|
314
341
|
*/
|
315
342
|
}, {
|
@@ -326,9 +353,9 @@ var CellRange = /*#__PURE__*/function () {
|
|
326
353
|
}
|
327
354
|
|
328
355
|
/**
|
329
|
-
* Expand
|
356
|
+
* Expand your range with another range (`expandingRange`).
|
330
357
|
*
|
331
|
-
* @param {CellRange} expandingRange
|
358
|
+
* @param {CellRange} expandingRange A new range.
|
332
359
|
* @returns {boolean}
|
333
360
|
*/
|
334
361
|
}, {
|
@@ -418,7 +445,7 @@ var CellRange = /*#__PURE__*/function () {
|
|
418
445
|
}
|
419
446
|
|
420
447
|
/**
|
421
|
-
* Gets the vertical direction of the
|
448
|
+
* Gets the vertical direction of the selection.
|
422
449
|
*
|
423
450
|
* @returns {string} Returns one of the values: `N-S` (north->south), `S-N` (south->north).
|
424
451
|
*/
|
@@ -429,7 +456,7 @@ var CellRange = /*#__PURE__*/function () {
|
|
429
456
|
}
|
430
457
|
|
431
458
|
/**
|
432
|
-
* Gets the horizontal direction of the
|
459
|
+
* Gets the horizontal direction of the selection.
|
433
460
|
*
|
434
461
|
* @returns {string} Returns one of the values: `W-E` (west->east), `E-W` (east->west).
|
435
462
|
*/
|
@@ -440,7 +467,7 @@ var CellRange = /*#__PURE__*/function () {
|
|
440
467
|
}
|
441
468
|
|
442
469
|
/**
|
443
|
-
*
|
470
|
+
* Flips the direction of your range vertically (e.g., `NW-SE` changes to `SW-NE`).
|
444
471
|
*/
|
445
472
|
}, {
|
446
473
|
key: "flipDirectionVertically",
|
@@ -465,7 +492,7 @@ var CellRange = /*#__PURE__*/function () {
|
|
465
492
|
}
|
466
493
|
|
467
494
|
/**
|
468
|
-
*
|
495
|
+
* Flips the direction of your range horizontally (e.g., `NW-SE` changes to `NE-SW`).
|
469
496
|
*/
|
470
497
|
}, {
|
471
498
|
key: "flipDirectionHorizontally",
|
@@ -490,8 +517,10 @@ var CellRange = /*#__PURE__*/function () {
|
|
490
517
|
}
|
491
518
|
|
492
519
|
/**
|
493
|
-
* Gets the top
|
494
|
-
*
|
520
|
+
* Gets the top-left (in LTR) or top-right (in RTL) corner coordinates of your range.
|
521
|
+
*
|
522
|
+
* If the corner contains header coordinates (negative values),
|
523
|
+
* the corner coordinates are normalized to `0`.
|
495
524
|
*
|
496
525
|
* @returns {CellCoords}
|
497
526
|
*/
|
@@ -502,8 +531,11 @@ var CellRange = /*#__PURE__*/function () {
|
|
502
531
|
}
|
503
532
|
|
504
533
|
/**
|
505
|
-
* Gets the top
|
506
|
-
*
|
534
|
+
* Gets the top-left corner coordinates of your range,
|
535
|
+
* both in the LTR and RTL layout direction.
|
536
|
+
*
|
537
|
+
* If the corner contains header coordinates (negative values),
|
538
|
+
* the corner coordinates are normalized to `0`.
|
507
539
|
*
|
508
540
|
* @returns {CellCoords}
|
509
541
|
*/
|
@@ -514,8 +546,10 @@ var CellRange = /*#__PURE__*/function () {
|
|
514
546
|
}
|
515
547
|
|
516
548
|
/**
|
517
|
-
* Gets the bottom right (in LTR) or bottom left (in RTL) corner coordinates of
|
518
|
-
*
|
549
|
+
* Gets the bottom right (in LTR) or bottom left (in RTL) corner coordinates of your range.
|
550
|
+
*
|
551
|
+
* If the corner contains header coordinates (negative values),
|
552
|
+
* the corner coordinates are normalized to `0`.
|
519
553
|
*
|
520
554
|
* @returns {CellCoords}
|
521
555
|
*/
|
@@ -526,8 +560,11 @@ var CellRange = /*#__PURE__*/function () {
|
|
526
560
|
}
|
527
561
|
|
528
562
|
/**
|
529
|
-
* Gets the bottom right corner coordinates of
|
530
|
-
*
|
563
|
+
* Gets the bottom right corner coordinates of your range,
|
564
|
+
* both in the LTR and RTL layout direction.
|
565
|
+
*
|
566
|
+
* If the corner contains header coordinates (negative values),
|
567
|
+
* the corner coordinates are normalized to `0`.
|
531
568
|
*
|
532
569
|
* @returns {CellCoords}
|
533
570
|
*/
|
@@ -538,8 +575,10 @@ var CellRange = /*#__PURE__*/function () {
|
|
538
575
|
}
|
539
576
|
|
540
577
|
/**
|
541
|
-
* Gets the top right (in LTR) or top left (in RTL) corner coordinates of
|
542
|
-
*
|
578
|
+
* Gets the top right (in LTR) or top left (in RTL) corner coordinates of your range.
|
579
|
+
*
|
580
|
+
* If the corner contains header coordinates (negative values),
|
581
|
+
* the corner coordinates are normalized to `0`.
|
543
582
|
*
|
544
583
|
* @returns {CellCoords}
|
545
584
|
*/
|
@@ -550,8 +589,11 @@ var CellRange = /*#__PURE__*/function () {
|
|
550
589
|
}
|
551
590
|
|
552
591
|
/**
|
553
|
-
* Gets the top right corner coordinates of
|
554
|
-
*
|
592
|
+
* Gets the top right corner coordinates of your range,
|
593
|
+
* both in the LTR and RTL layout direction.
|
594
|
+
*
|
595
|
+
* If the corner contains header coordinates (negative values),
|
596
|
+
* the corner coordinates are normalized to `0`.
|
555
597
|
*
|
556
598
|
* @returns {CellCoords}
|
557
599
|
*/
|
@@ -562,8 +604,10 @@ var CellRange = /*#__PURE__*/function () {
|
|
562
604
|
}
|
563
605
|
|
564
606
|
/**
|
565
|
-
* Gets the bottom left (in LTR) or bottom right (in RTL) corner coordinates of
|
566
|
-
*
|
607
|
+
* Gets the bottom left (in LTR) or bottom right (in RTL) corner coordinates of your range.
|
608
|
+
*
|
609
|
+
* If the corner contains header coordinates (negative values),
|
610
|
+
* the corner coordinates are normalized to `0`.
|
567
611
|
*
|
568
612
|
* @returns {CellCoords}
|
569
613
|
*/
|
@@ -574,8 +618,11 @@ var CellRange = /*#__PURE__*/function () {
|
|
574
618
|
}
|
575
619
|
|
576
620
|
/**
|
577
|
-
* Gets the bottom left corner coordinates of
|
578
|
-
*
|
621
|
+
* Gets the bottom left corner coordinates of your range,
|
622
|
+
* both in the LTR and RTL layout direction.
|
623
|
+
*
|
624
|
+
* If the corner contains header coordinates (negative values),
|
625
|
+
* the corner coordinates are normalized to `0`.
|
579
626
|
*
|
580
627
|
* @returns {CellCoords}
|
581
628
|
*/
|
@@ -586,8 +633,10 @@ var CellRange = /*#__PURE__*/function () {
|
|
586
633
|
}
|
587
634
|
|
588
635
|
/**
|
589
|
-
* Gets the top left (in LTR) or top right (in RTL) corner coordinates of
|
590
|
-
*
|
636
|
+
* Gets the top left (in LTR) or top right (in RTL) corner coordinates of your range.
|
637
|
+
*
|
638
|
+
* If the corner contains header coordinates (negative values),
|
639
|
+
* the top and start coordinates are pointed to that header.
|
591
640
|
*
|
592
641
|
* @returns {CellCoords}
|
593
642
|
*/
|
@@ -598,9 +647,11 @@ var CellRange = /*#__PURE__*/function () {
|
|
598
647
|
}
|
599
648
|
|
600
649
|
/**
|
601
|
-
* Gets the top left corner coordinates of
|
602
|
-
*
|
603
|
-
*
|
650
|
+
* Gets the top left corner coordinates of your range,
|
651
|
+
* both in the LTR and RTL layout direction.
|
652
|
+
*
|
653
|
+
* If the corner contains header coordinates (negative values),
|
654
|
+
* the top and left coordinates are pointed to that header.
|
604
655
|
*
|
605
656
|
* @returns {CellCoords}
|
606
657
|
*/
|
@@ -611,8 +662,10 @@ var CellRange = /*#__PURE__*/function () {
|
|
611
662
|
}
|
612
663
|
|
613
664
|
/**
|
614
|
-
* Gets the bottom right (in LTR) or bottom left (in RTL) corner coordinates of
|
615
|
-
*
|
665
|
+
* Gets the bottom right (in LTR) or bottom left (in RTL) corner coordinates of your range.
|
666
|
+
*
|
667
|
+
* If the corner contains header coordinates (negative values),
|
668
|
+
* the top and start coordinates are pointed to that header.
|
616
669
|
*
|
617
670
|
* @returns {CellCoords}
|
618
671
|
*/
|
@@ -623,9 +676,11 @@ var CellRange = /*#__PURE__*/function () {
|
|
623
676
|
}
|
624
677
|
|
625
678
|
/**
|
626
|
-
* Gets the bottom right corner coordinates of
|
627
|
-
*
|
628
|
-
*
|
679
|
+
* Gets the bottom right corner coordinates of your range,
|
680
|
+
* both in the LTR and RTL layout direction.
|
681
|
+
*
|
682
|
+
* If the corner contains header coordinates (negative values),
|
683
|
+
* the top and left coordinates are pointed to that header.
|
629
684
|
*
|
630
685
|
* @returns {CellCoords}
|
631
686
|
*/
|
@@ -636,8 +691,10 @@ var CellRange = /*#__PURE__*/function () {
|
|
636
691
|
}
|
637
692
|
|
638
693
|
/**
|
639
|
-
* Gets the top right (in LTR) or top left (in RTL) corner coordinates of
|
640
|
-
*
|
694
|
+
* Gets the top right (in LTR) or top left (in RTL) corner coordinates of your range.
|
695
|
+
*
|
696
|
+
* If the corner contains header coordinates (negative values),
|
697
|
+
* the top and start coordinates are pointed to that header.
|
641
698
|
*
|
642
699
|
* @returns {CellCoords}
|
643
700
|
*/
|
@@ -648,9 +705,11 @@ var CellRange = /*#__PURE__*/function () {
|
|
648
705
|
}
|
649
706
|
|
650
707
|
/**
|
651
|
-
* Gets the top right corner coordinates of
|
652
|
-
*
|
653
|
-
*
|
708
|
+
* Gets the top right corner coordinates of your range,
|
709
|
+
* both in the LTR and RTL layout direction.
|
710
|
+
*
|
711
|
+
* If the corner contains header coordinates (negative values),
|
712
|
+
* the top and left coordinates are pointed to that header.
|
654
713
|
*
|
655
714
|
* @returns {CellCoords}
|
656
715
|
*/
|
@@ -661,8 +720,10 @@ var CellRange = /*#__PURE__*/function () {
|
|
661
720
|
}
|
662
721
|
|
663
722
|
/**
|
664
|
-
* Gets the bottom left (in LTR) or bottom right (in RTL) corner coordinates of
|
665
|
-
*
|
723
|
+
* Gets the bottom left (in LTR) or bottom right (in RTL) corner coordinates of your range.
|
724
|
+
*
|
725
|
+
* If the corner contains header coordinates (negative values),
|
726
|
+
* the top and start coordinates are pointed to that header.
|
666
727
|
*
|
667
728
|
* @returns {CellCoords}
|
668
729
|
*/
|
@@ -673,9 +734,11 @@ var CellRange = /*#__PURE__*/function () {
|
|
673
734
|
}
|
674
735
|
|
675
736
|
/**
|
676
|
-
* Gets the bottom left corner coordinates of
|
677
|
-
*
|
678
|
-
*
|
737
|
+
* Gets the bottom left corner coordinates of your range,
|
738
|
+
* both in the LTR and RTL layout direction.
|
739
|
+
*
|
740
|
+
* If the corner contains header coordinates (negative values),
|
741
|
+
* the top and left coordinates are pointed to that header.
|
679
742
|
*
|
680
743
|
* @returns {CellCoords}
|
681
744
|
*/
|
@@ -686,10 +749,10 @@ var CellRange = /*#__PURE__*/function () {
|
|
686
749
|
}
|
687
750
|
|
688
751
|
/**
|
689
|
-
* Checks if coordinates
|
752
|
+
* Checks if a set of coordinates (`coords`) matches one of the 4 corners of your range.
|
690
753
|
*
|
691
|
-
* @param {CellCoords} coords
|
692
|
-
* @param {CellRange} [expandedRange]
|
754
|
+
* @param {CellCoords} coords Coordinates to check.
|
755
|
+
* @param {CellRange} [expandedRange] A range to compare with.
|
693
756
|
* @returns {boolean}
|
694
757
|
*/
|
695
758
|
}, {
|
@@ -702,11 +765,13 @@ var CellRange = /*#__PURE__*/function () {
|
|
702
765
|
}
|
703
766
|
|
704
767
|
/**
|
705
|
-
* Gets coordinates of
|
706
|
-
* bottom-right corner of this range then the coordinates for top-left will be returned.
|
768
|
+
* Gets the coordinates of a range corner opposite to the provided `coords`.
|
707
769
|
*
|
708
|
-
*
|
709
|
-
*
|
770
|
+
* For example: if the `coords` coordinates match the bottom-right corner of your range,
|
771
|
+
* the coordinates of the top-left corner of your range are returned.
|
772
|
+
*
|
773
|
+
* @param {CellCoords} coords Coordinates to check.
|
774
|
+
* @param {CellRange} [expandedRange] A range to compare with.
|
710
775
|
* @returns {CellCoords}
|
711
776
|
*/
|
712
777
|
}, {
|
@@ -745,8 +810,11 @@ var CellRange = /*#__PURE__*/function () {
|
|
745
810
|
}
|
746
811
|
|
747
812
|
/**
|
748
|
-
*
|
749
|
-
*
|
813
|
+
* Indicates which borders (top, right, bottom, left) are shared between
|
814
|
+
* your `CellRange`instance and another `range` that's within your range.
|
815
|
+
*
|
816
|
+
* @param {CellRange} range A range to compare with.
|
817
|
+
* @returns {Array<'top' | 'right' | 'bottom' | 'left'>}
|
750
818
|
*/
|
751
819
|
}, {
|
752
820
|
key: "getBordersSharedWith",
|
@@ -783,9 +851,9 @@ var CellRange = /*#__PURE__*/function () {
|
|
783
851
|
}
|
784
852
|
|
785
853
|
/**
|
786
|
-
*
|
854
|
+
* Gets the coordinates of the inner cells of your range.
|
787
855
|
*
|
788
|
-
* @returns {
|
856
|
+
* @returns {CellCoords[]}
|
789
857
|
*/
|
790
858
|
}, {
|
791
859
|
key: "getInner",
|
@@ -804,9 +872,9 @@ var CellRange = /*#__PURE__*/function () {
|
|
804
872
|
}
|
805
873
|
|
806
874
|
/**
|
807
|
-
*
|
875
|
+
* Gets the coordinates of all cells of your range.
|
808
876
|
*
|
809
|
-
* @returns {
|
877
|
+
* @returns {CellCoords[]}
|
810
878
|
*/
|
811
879
|
}, {
|
812
880
|
key: "getAll",
|
@@ -829,10 +897,11 @@ var CellRange = /*#__PURE__*/function () {
|
|
829
897
|
}
|
830
898
|
|
831
899
|
/**
|
832
|
-
* Runs a callback function
|
833
|
-
* `false` in the callback function.
|
900
|
+
* Runs a callback function on all cells within your range.
|
834
901
|
*
|
835
|
-
*
|
902
|
+
* You can break the iteration by returning `false` in the callback function.
|
903
|
+
*
|
904
|
+
* @param {function(number, number): boolean} callback A callback function.
|
836
905
|
*/
|
837
906
|
}, {
|
838
907
|
key: "forAll",
|
@@ -850,7 +919,7 @@ var CellRange = /*#__PURE__*/function () {
|
|
850
919
|
}
|
851
920
|
|
852
921
|
/**
|
853
|
-
* Clones
|
922
|
+
* Clones your `CellRange` instance.
|
854
923
|
*
|
855
924
|
* @returns {CellRange}
|
856
925
|
*/
|
@@ -861,10 +930,16 @@ var CellRange = /*#__PURE__*/function () {
|
|
861
930
|
}
|
862
931
|
|
863
932
|
/**
|
864
|
-
*
|
933
|
+
* Converts your `CellRange` instance into an object literal with the following properties:
|
934
|
+
*
|
935
|
+
* - `from`
|
936
|
+
* - `row`
|
937
|
+
* - `col`
|
938
|
+
* - `to`
|
939
|
+
* - `row`
|
940
|
+
* - `col`
|
865
941
|
*
|
866
|
-
* @returns {
|
867
|
-
* contains `row` and `col` keys.
|
942
|
+
* @returns {{from: {row: number, col: number}, to: {row: number, col: number}}} An object literal with `from` and `to` properties.
|
868
943
|
*/
|
869
944
|
}, {
|
870
945
|
key: "toObject",
|
@@ -876,12 +951,14 @@ var CellRange = /*#__PURE__*/function () {
|
|
876
951
|
}
|
877
952
|
|
878
953
|
/**
|
879
|
-
* Creates and returns a new instance of the CellCoords
|
880
|
-
*
|
954
|
+
* Creates and returns a new instance of the `CellCoords` class.
|
955
|
+
*
|
956
|
+
* The new `CellCoords` instance automatically inherits the LTR/RTL flag
|
957
|
+
* from your `CellRange` instance.
|
881
958
|
*
|
882
959
|
* @private
|
883
|
-
* @param {number} row
|
884
|
-
* @param {number} column
|
960
|
+
* @param {number} row A row index.
|
961
|
+
* @param {number} column A column index.
|
885
962
|
* @returns {CellCoords}
|
886
963
|
*/
|
887
964
|
}, {
|