handsontable 12.1.2 → 12.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/3rdparty/walkontable/src/border.js +43 -28
- package/3rdparty/walkontable/src/border.mjs +43 -28
- package/3rdparty/walkontable/src/table.js +13 -10
- package/3rdparty/walkontable/src/table.mjs +13 -10
- package/CHANGELOG.md +27 -4
- package/base.js +2 -2
- package/base.mjs +2 -2
- package/core.d.ts +1 -3
- package/core.js +9 -1
- package/core.mjs +9 -1
- package/dataMap/dataMap.js +35 -16
- package/dataMap/dataMap.mjs +30 -13
- package/dataMap/metaManager/lazyFactoryMap.js +24 -5
- package/dataMap/metaManager/lazyFactoryMap.mjs +19 -4
- package/dataMap/metaManager/metaSchema.js +112 -80
- package/dataMap/metaManager/metaSchema.mjs +112 -80
- package/dist/handsontable.css +2 -2
- package/dist/handsontable.full.css +2 -2
- package/dist/handsontable.full.js +40800 -57808
- package/dist/handsontable.full.min.css +2 -2
- package/dist/handsontable.full.min.js +527 -284
- package/dist/handsontable.js +3046 -3279
- package/dist/handsontable.min.css +2 -2
- package/dist/handsontable.min.js +3 -3
- package/editorManager.js +69 -35
- package/editorManager.mjs +69 -35
- package/editors/baseEditor/baseEditor.js +1 -1
- package/editors/baseEditor/baseEditor.mjs +1 -1
- package/editors/dateEditor/dateEditor.js +17 -2
- package/editors/dateEditor/dateEditor.mjs +16 -0
- package/editors/textEditor/caretPositioner.js +0 -4
- package/editors/textEditor/caretPositioner.mjs +0 -2
- package/helpers/dom/element.js +2 -4
- package/helpers/dom/element.mjs +1 -2
- package/helpers/mixed.js +2 -4
- package/helpers/mixed.mjs +2 -3
- package/helpers/object.js +0 -4
- package/helpers/object.mjs +0 -2
- package/helpers/unicode.js +0 -4
- package/helpers/unicode.mjs +0 -2
- package/package.json +1 -1
- package/pluginHooks.d.ts +0 -1
- package/pluginHooks.js +17 -14
- package/pluginHooks.mjs +17 -14
- package/plugins/base/base.js +2 -4
- package/plugins/base/base.mjs +1 -2
- package/plugins/columnSorting/sortService/engine.js +2 -6
- package/plugins/columnSorting/sortService/engine.mjs +2 -2
- package/plugins/columnSummary/columnSummary.js +17 -11
- package/plugins/columnSummary/columnSummary.mjs +15 -9
- package/plugins/columnSummary/utils.js +14 -0
- package/plugins/columnSummary/utils.mjs +9 -0
- package/plugins/contextMenu/commandExecutor.js +0 -4
- package/plugins/contextMenu/commandExecutor.mjs +0 -2
- package/plugins/contextMenu/contextMenu.js +5 -1
- package/plugins/contextMenu/contextMenu.mjs +5 -1
- package/plugins/contextMenu/menu.js +4 -0
- package/plugins/contextMenu/menu.mjs +4 -0
- package/plugins/copyPaste/copyPaste.js +2 -0
- package/plugins/copyPaste/copyPaste.mjs +2 -0
- package/plugins/dropdownMenu/dropdownMenu.js +4 -0
- package/plugins/dropdownMenu/dropdownMenu.mjs +4 -0
- package/plugins/filters/component/condition.js +11 -29
- package/plugins/filters/component/condition.mjs +6 -21
- package/plugins/filters/component/value.js +12 -5
- package/plugins/filters/component/value.mjs +12 -5
- package/plugins/filters/filters.d.ts +1 -1
- package/plugins/filters/filters.js +62 -82
- package/plugins/filters/filters.mjs +63 -83
- package/plugins/hiddenColumns/hiddenColumns.js +0 -4
- package/plugins/hiddenColumns/hiddenColumns.mjs +0 -2
- package/plugins/hiddenRows/hiddenRows.js +0 -4
- package/plugins/hiddenRows/hiddenRows.mjs +0 -2
- package/plugins/multiColumnSorting/domHelpers.js +2 -4
- package/plugins/multiColumnSorting/domHelpers.mjs +1 -2
- package/plugins/nestedRows/nestedRows.js +1 -1
- package/plugins/nestedRows/nestedRows.mjs +1 -1
- package/plugins/search/search.js +0 -2
- package/plugins/search/search.mjs +0 -1
- package/plugins/trimRows/trimRows.js +3 -3
- package/plugins/trimRows/trimRows.mjs +3 -3
- package/renderers/numericRenderer/numericRenderer.js +0 -2
- package/renderers/numericRenderer/numericRenderer.mjs +0 -1
- package/renderers/textRenderer/textRenderer.js +1 -1
- package/renderers/textRenderer/textRenderer.mjs +1 -1
- package/shortcuts/recorder.js +14 -10
- package/shortcuts/recorder.mjs +13 -10
- package/shortcuts/utils.js +0 -4
- package/shortcuts/utils.mjs +0 -2
- package/translations/indexMapper.js +2 -2
- package/translations/indexMapper.mjs +2 -2
- package/utils/sortingAlgorithms/mergeSort.js +0 -120
- package/utils/sortingAlgorithms/mergeSort.mjs +0 -110
@@ -366,41 +366,53 @@ var Border = /*#__PURE__*/function () {
|
|
366
366
|
value: function updateMultipleSelectionHandlesPosition(row, col, top, left, width, height) {
|
367
367
|
var isRtl = this.wot.wtSettings.getSetting('rtlMode');
|
368
368
|
var inlinePosProperty = isRtl ? 'right' : 'left';
|
369
|
-
var
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
this.
|
378
|
-
this.
|
369
|
+
var _this$selectionHandle = this.selectionHandles.styles,
|
370
|
+
topStyles = _this$selectionHandle.top,
|
371
|
+
topHitAreaStyles = _this$selectionHandle.topHitArea,
|
372
|
+
bottomStyles = _this$selectionHandle.bottom,
|
373
|
+
bottomHitAreaStyles = _this$selectionHandle.bottomHitArea;
|
374
|
+
var handleBorderSize = parseInt(topStyles.borderWidth, 10);
|
375
|
+
var handleSize = parseInt(topStyles.width, 10);
|
376
|
+
var hitAreaSize = parseInt(topHitAreaStyles.width, 10);
|
377
|
+
var totalTableWidth = this.wot.wtTable.getWidth();
|
378
|
+
var totalTableHeight = this.wot.wtTable.getHeight();
|
379
|
+
topStyles.top = "".concat(parseInt(top - handleSize - 1, 10), "px");
|
380
|
+
topStyles[inlinePosProperty] = "".concat(parseInt(left - handleSize - 1, 10), "px");
|
381
|
+
topHitAreaStyles.top = "".concat(parseInt(top - hitAreaSize / 4 * 3, 10), "px");
|
382
|
+
topHitAreaStyles[inlinePosProperty] = "".concat(parseInt(left - hitAreaSize / 4 * 3, 10), "px");
|
383
|
+
var bottomHandlerInline = Math.min(parseInt(left + width, 10), totalTableWidth - handleSize - handleBorderSize * 2);
|
384
|
+
var bottomHandlerAreaInline = Math.min(parseInt(left + width - hitAreaSize / 4, 10), totalTableWidth - hitAreaSize - handleBorderSize * 2);
|
385
|
+
bottomStyles[inlinePosProperty] = "".concat(bottomHandlerInline, "px");
|
386
|
+
bottomHitAreaStyles[inlinePosProperty] = "".concat(bottomHandlerAreaInline, "px");
|
387
|
+
var bottomHandlerTop = Math.min(parseInt(top + height, 10), totalTableHeight - handleSize - handleBorderSize * 2);
|
388
|
+
var bottomHandlerAreaTop = Math.min(parseInt(top + height - hitAreaSize / 4, 10), totalTableHeight - hitAreaSize - handleBorderSize * 2);
|
389
|
+
bottomStyles.top = "".concat(bottomHandlerTop, "px");
|
390
|
+
bottomHitAreaStyles.top = "".concat(bottomHandlerAreaTop, "px");
|
379
391
|
|
380
392
|
if (this.settings.border.cornerVisible && this.settings.border.cornerVisible()) {
|
381
|
-
|
382
|
-
|
393
|
+
topStyles.display = 'block';
|
394
|
+
topHitAreaStyles.display = 'block';
|
383
395
|
|
384
396
|
if (this.isPartRange(row, col)) {
|
385
|
-
|
386
|
-
|
397
|
+
bottomStyles.display = 'none';
|
398
|
+
bottomHitAreaStyles.display = 'none';
|
387
399
|
} else {
|
388
|
-
|
389
|
-
|
400
|
+
bottomStyles.display = 'block';
|
401
|
+
bottomHitAreaStyles.display = 'block';
|
390
402
|
}
|
391
403
|
} else {
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
404
|
+
topStyles.display = 'none';
|
405
|
+
bottomStyles.display = 'none';
|
406
|
+
topHitAreaStyles.display = 'none';
|
407
|
+
bottomHitAreaStyles.display = 'none';
|
396
408
|
}
|
397
409
|
|
398
410
|
if (row === this.wot.wtSettings.getSetting('fixedRowsTop') || col === this.wot.wtSettings.getSetting('fixedColumnsStart')) {
|
399
|
-
|
400
|
-
|
411
|
+
topStyles.zIndex = '9999';
|
412
|
+
topHitAreaStyles.zIndex = '9999';
|
401
413
|
} else {
|
402
|
-
|
403
|
-
|
414
|
+
topStyles.zIndex = '';
|
415
|
+
topHitAreaStyles.zIndex = '';
|
404
416
|
}
|
405
417
|
}
|
406
418
|
/**
|
@@ -594,6 +606,9 @@ var Border = /*#__PURE__*/function () {
|
|
594
606
|
trimmingContainer = rootDocument.documentElement;
|
595
607
|
}
|
596
608
|
|
609
|
+
var cornerHalfWidth = parseInt(this.cornerDefaultStyle.width, 10) / 2;
|
610
|
+
var cornerHalfHeight = parseInt(this.cornerDefaultStyle.height, 10) / 2;
|
611
|
+
|
597
612
|
if (toColumn === this.wot.getSetting('totalColumns') - 1) {
|
598
613
|
var toTdOffsetLeft = trimToWindow ? toTD.getBoundingClientRect().left : toTD.offsetLeft;
|
599
614
|
var cornerOverlappingContainer = false;
|
@@ -608,8 +623,7 @@ var Border = /*#__PURE__*/function () {
|
|
608
623
|
}
|
609
624
|
|
610
625
|
if (cornerOverlappingContainer) {
|
611
|
-
this.cornerStyle[inlinePosProperty] = "".concat(Math.floor(inlineStartPos + width + this.cornerCenterPointOffset -
|
612
|
-
|
626
|
+
this.cornerStyle[inlinePosProperty] = "".concat(Math.floor(inlineStartPos + width + this.cornerCenterPointOffset - cornerHalfWidth), "px");
|
613
627
|
this.cornerStyle[isRtl ? 'borderLeftWidth' : 'borderRightWidth'] = 0;
|
614
628
|
}
|
615
629
|
}
|
@@ -621,8 +635,7 @@ var Border = /*#__PURE__*/function () {
|
|
621
635
|
var _cornerOverlappingContainer = cornerBottomEdge >= (0, _element.innerHeight)(trimmingContainer);
|
622
636
|
|
623
637
|
if (_cornerOverlappingContainer) {
|
624
|
-
this.cornerStyle.top = "".concat(Math.floor(top + height + this.cornerCenterPointOffset -
|
625
|
-
|
638
|
+
this.cornerStyle.top = "".concat(Math.floor(top + height + this.cornerCenterPointOffset - cornerHalfHeight), "px");
|
626
639
|
this.cornerStyle.borderBottomWidth = 0;
|
627
640
|
}
|
628
641
|
}
|
@@ -825,7 +838,9 @@ var Border = /*#__PURE__*/function () {
|
|
825
838
|
|
826
839
|
if ((0, _browser.isMobileBrowser)()) {
|
827
840
|
this.selectionHandles.styles.top.display = 'none';
|
841
|
+
this.selectionHandles.styles.topHitArea.display = 'none';
|
828
842
|
this.selectionHandles.styles.bottom.display = 'none';
|
843
|
+
this.selectionHandles.styles.bottomHitArea.display = 'none';
|
829
844
|
}
|
830
845
|
}
|
831
846
|
/**
|
@@ -347,41 +347,53 @@ var Border = /*#__PURE__*/function () {
|
|
347
347
|
value: function updateMultipleSelectionHandlesPosition(row, col, top, left, width, height) {
|
348
348
|
var isRtl = this.wot.wtSettings.getSetting('rtlMode');
|
349
349
|
var inlinePosProperty = isRtl ? 'right' : 'left';
|
350
|
-
var
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
this.
|
359
|
-
this.
|
350
|
+
var _this$selectionHandle = this.selectionHandles.styles,
|
351
|
+
topStyles = _this$selectionHandle.top,
|
352
|
+
topHitAreaStyles = _this$selectionHandle.topHitArea,
|
353
|
+
bottomStyles = _this$selectionHandle.bottom,
|
354
|
+
bottomHitAreaStyles = _this$selectionHandle.bottomHitArea;
|
355
|
+
var handleBorderSize = parseInt(topStyles.borderWidth, 10);
|
356
|
+
var handleSize = parseInt(topStyles.width, 10);
|
357
|
+
var hitAreaSize = parseInt(topHitAreaStyles.width, 10);
|
358
|
+
var totalTableWidth = this.wot.wtTable.getWidth();
|
359
|
+
var totalTableHeight = this.wot.wtTable.getHeight();
|
360
|
+
topStyles.top = "".concat(parseInt(top - handleSize - 1, 10), "px");
|
361
|
+
topStyles[inlinePosProperty] = "".concat(parseInt(left - handleSize - 1, 10), "px");
|
362
|
+
topHitAreaStyles.top = "".concat(parseInt(top - hitAreaSize / 4 * 3, 10), "px");
|
363
|
+
topHitAreaStyles[inlinePosProperty] = "".concat(parseInt(left - hitAreaSize / 4 * 3, 10), "px");
|
364
|
+
var bottomHandlerInline = Math.min(parseInt(left + width, 10), totalTableWidth - handleSize - handleBorderSize * 2);
|
365
|
+
var bottomHandlerAreaInline = Math.min(parseInt(left + width - hitAreaSize / 4, 10), totalTableWidth - hitAreaSize - handleBorderSize * 2);
|
366
|
+
bottomStyles[inlinePosProperty] = "".concat(bottomHandlerInline, "px");
|
367
|
+
bottomHitAreaStyles[inlinePosProperty] = "".concat(bottomHandlerAreaInline, "px");
|
368
|
+
var bottomHandlerTop = Math.min(parseInt(top + height, 10), totalTableHeight - handleSize - handleBorderSize * 2);
|
369
|
+
var bottomHandlerAreaTop = Math.min(parseInt(top + height - hitAreaSize / 4, 10), totalTableHeight - hitAreaSize - handleBorderSize * 2);
|
370
|
+
bottomStyles.top = "".concat(bottomHandlerTop, "px");
|
371
|
+
bottomHitAreaStyles.top = "".concat(bottomHandlerAreaTop, "px");
|
360
372
|
|
361
373
|
if (this.settings.border.cornerVisible && this.settings.border.cornerVisible()) {
|
362
|
-
|
363
|
-
|
374
|
+
topStyles.display = 'block';
|
375
|
+
topHitAreaStyles.display = 'block';
|
364
376
|
|
365
377
|
if (this.isPartRange(row, col)) {
|
366
|
-
|
367
|
-
|
378
|
+
bottomStyles.display = 'none';
|
379
|
+
bottomHitAreaStyles.display = 'none';
|
368
380
|
} else {
|
369
|
-
|
370
|
-
|
381
|
+
bottomStyles.display = 'block';
|
382
|
+
bottomHitAreaStyles.display = 'block';
|
371
383
|
}
|
372
384
|
} else {
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
385
|
+
topStyles.display = 'none';
|
386
|
+
bottomStyles.display = 'none';
|
387
|
+
topHitAreaStyles.display = 'none';
|
388
|
+
bottomHitAreaStyles.display = 'none';
|
377
389
|
}
|
378
390
|
|
379
391
|
if (row === this.wot.wtSettings.getSetting('fixedRowsTop') || col === this.wot.wtSettings.getSetting('fixedColumnsStart')) {
|
380
|
-
|
381
|
-
|
392
|
+
topStyles.zIndex = '9999';
|
393
|
+
topHitAreaStyles.zIndex = '9999';
|
382
394
|
} else {
|
383
|
-
|
384
|
-
|
395
|
+
topStyles.zIndex = '';
|
396
|
+
topHitAreaStyles.zIndex = '';
|
385
397
|
}
|
386
398
|
}
|
387
399
|
/**
|
@@ -575,6 +587,9 @@ var Border = /*#__PURE__*/function () {
|
|
575
587
|
trimmingContainer = rootDocument.documentElement;
|
576
588
|
}
|
577
589
|
|
590
|
+
var cornerHalfWidth = parseInt(this.cornerDefaultStyle.width, 10) / 2;
|
591
|
+
var cornerHalfHeight = parseInt(this.cornerDefaultStyle.height, 10) / 2;
|
592
|
+
|
578
593
|
if (toColumn === this.wot.getSetting('totalColumns') - 1) {
|
579
594
|
var toTdOffsetLeft = trimToWindow ? toTD.getBoundingClientRect().left : toTD.offsetLeft;
|
580
595
|
var cornerOverlappingContainer = false;
|
@@ -589,8 +604,7 @@ var Border = /*#__PURE__*/function () {
|
|
589
604
|
}
|
590
605
|
|
591
606
|
if (cornerOverlappingContainer) {
|
592
|
-
this.cornerStyle[inlinePosProperty] = "".concat(Math.floor(inlineStartPos + width + this.cornerCenterPointOffset -
|
593
|
-
|
607
|
+
this.cornerStyle[inlinePosProperty] = "".concat(Math.floor(inlineStartPos + width + this.cornerCenterPointOffset - cornerHalfWidth), "px");
|
594
608
|
this.cornerStyle[isRtl ? 'borderLeftWidth' : 'borderRightWidth'] = 0;
|
595
609
|
}
|
596
610
|
}
|
@@ -602,8 +616,7 @@ var Border = /*#__PURE__*/function () {
|
|
602
616
|
var _cornerOverlappingContainer = cornerBottomEdge >= innerHeight(trimmingContainer);
|
603
617
|
|
604
618
|
if (_cornerOverlappingContainer) {
|
605
|
-
this.cornerStyle.top = "".concat(Math.floor(top + height + this.cornerCenterPointOffset -
|
606
|
-
|
619
|
+
this.cornerStyle.top = "".concat(Math.floor(top + height + this.cornerCenterPointOffset - cornerHalfHeight), "px");
|
607
620
|
this.cornerStyle.borderBottomWidth = 0;
|
608
621
|
}
|
609
622
|
}
|
@@ -806,7 +819,9 @@ var Border = /*#__PURE__*/function () {
|
|
806
819
|
|
807
820
|
if (isMobileBrowser()) {
|
808
821
|
this.selectionHandles.styles.top.display = 'none';
|
822
|
+
this.selectionHandles.styles.topHitArea.display = 'none';
|
809
823
|
this.selectionHandles.styles.bottom.display = 'none';
|
824
|
+
this.selectionHandles.styles.bottomHitArea.display = 'none';
|
810
825
|
}
|
811
826
|
}
|
812
827
|
/**
|
@@ -453,8 +453,10 @@ var Table = /*#__PURE__*/function () {
|
|
453
453
|
}
|
454
454
|
}
|
455
455
|
|
456
|
+
var positionChanged = false;
|
457
|
+
|
456
458
|
if (this.isMaster) {
|
457
|
-
|
459
|
+
positionChanged = wtOverlays.topOverlay.resetFixedPosition();
|
458
460
|
|
459
461
|
if (wtOverlays.bottomOverlay.clone) {
|
460
462
|
positionChanged = wtOverlays.bottomOverlay.resetFixedPosition() || positionChanged;
|
@@ -469,17 +471,18 @@ var Table = /*#__PURE__*/function () {
|
|
469
471
|
if (wtOverlays.bottomInlineStartCornerOverlay && wtOverlays.bottomInlineStartCornerOverlay.clone) {
|
470
472
|
wtOverlays.bottomInlineStartCornerOverlay.resetFixedPosition();
|
471
473
|
}
|
472
|
-
|
473
|
-
if (positionChanged) {
|
474
|
-
// It refreshes the cells borders caused by a 1px shift (introduced by overlays which add or
|
475
|
-
// remove `innerBorderTop` and `innerBorderInlineStart` CSS classes to the DOM element. This happens
|
476
|
-
// when there is a switch between rendering from 0 to N rows/columns and vice versa).
|
477
|
-
wtOverlays.refreshAll();
|
478
|
-
wtOverlays.adjustElementsSize();
|
479
|
-
}
|
480
474
|
}
|
481
475
|
|
482
|
-
|
476
|
+
if (positionChanged) {
|
477
|
+
// It refreshes the cells borders caused by a 1px shift (introduced by overlays which add or
|
478
|
+
// remove `innerBorderTop` and `innerBorderInlineStart` CSS classes to the DOM element. This happens
|
479
|
+
// when there is a switch between rendering from 0 to N rows/columns and vice versa).
|
480
|
+
wtOverlays.refreshAll(); // `refreshAll()` internally already calls `refreshSelections()` method
|
481
|
+
|
482
|
+
wtOverlays.adjustElementsSize();
|
483
|
+
} else {
|
484
|
+
this.refreshSelections(runFastDraw);
|
485
|
+
}
|
483
486
|
|
484
487
|
if (syncScroll) {
|
485
488
|
wtOverlays.syncScrollWithMaster();
|
@@ -427,8 +427,10 @@ var Table = /*#__PURE__*/function () {
|
|
427
427
|
}
|
428
428
|
}
|
429
429
|
|
430
|
+
var positionChanged = false;
|
431
|
+
|
430
432
|
if (this.isMaster) {
|
431
|
-
|
433
|
+
positionChanged = wtOverlays.topOverlay.resetFixedPosition();
|
432
434
|
|
433
435
|
if (wtOverlays.bottomOverlay.clone) {
|
434
436
|
positionChanged = wtOverlays.bottomOverlay.resetFixedPosition() || positionChanged;
|
@@ -443,17 +445,18 @@ var Table = /*#__PURE__*/function () {
|
|
443
445
|
if (wtOverlays.bottomInlineStartCornerOverlay && wtOverlays.bottomInlineStartCornerOverlay.clone) {
|
444
446
|
wtOverlays.bottomInlineStartCornerOverlay.resetFixedPosition();
|
445
447
|
}
|
446
|
-
|
447
|
-
if (positionChanged) {
|
448
|
-
// It refreshes the cells borders caused by a 1px shift (introduced by overlays which add or
|
449
|
-
// remove `innerBorderTop` and `innerBorderInlineStart` CSS classes to the DOM element. This happens
|
450
|
-
// when there is a switch between rendering from 0 to N rows/columns and vice versa).
|
451
|
-
wtOverlays.refreshAll();
|
452
|
-
wtOverlays.adjustElementsSize();
|
453
|
-
}
|
454
448
|
}
|
455
449
|
|
456
|
-
|
450
|
+
if (positionChanged) {
|
451
|
+
// It refreshes the cells borders caused by a 1px shift (introduced by overlays which add or
|
452
|
+
// remove `innerBorderTop` and `innerBorderInlineStart` CSS classes to the DOM element. This happens
|
453
|
+
// when there is a switch between rendering from 0 to N rows/columns and vice versa).
|
454
|
+
wtOverlays.refreshAll(); // `refreshAll()` internally already calls `refreshSelections()` method
|
455
|
+
|
456
|
+
wtOverlays.adjustElementsSize();
|
457
|
+
} else {
|
458
|
+
this.refreshSelections(runFastDraw);
|
459
|
+
}
|
457
460
|
|
458
461
|
if (syncScroll) {
|
459
462
|
wtOverlays.syncScrollWithMaster();
|
package/CHANGELOG.md
CHANGED
@@ -8,13 +8,36 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
8
8
|
|
9
9
|
<!-- UNVERSIONED -->
|
10
10
|
|
11
|
-
## [12.1.
|
11
|
+
## [12.1.3] - 2022-09-22
|
12
12
|
|
13
|
-
|
14
|
-
-
|
13
|
+
For more information on this release, see:
|
14
|
+
- [Release notes](https://handsontable.com/docs/release-notes/#_12-1-3)
|
15
|
+
- [Blog post](https://handsontable.com/blog/)
|
15
16
|
|
16
17
|
### Fixed
|
17
|
-
-
|
18
|
+
- Fixed incorrect date format conversion on input in the date editor. [#9681](https://github.com/handsontable/handsontable/issues/9681)
|
19
|
+
- Fixed an error when adding a large number of rows using the `alter` method. [#7840](https://github.com/handsontable/handsontable/issues/7840)
|
20
|
+
- Fixed IME text input in the editors. [#9586](https://github.com/handsontable/handsontable/issues/9586)
|
21
|
+
- Fixed an issue where the editor did not open on key events when the cell was outside the viewport. [#9022](https://github.com/handsontable/handsontable/issues/9022)
|
22
|
+
- Fixed an issue with "0" values being ignored by the Column Summary plugin. [#6385](https://github.com/handsontable/handsontable/issues/6385)
|
23
|
+
- Fixed an error when opening the column dropdown menu with the Filters plugin enabled. [#9561](https://github.com/handsontable/handsontable/issues/9561)
|
24
|
+
- Fixed an issue where the `trimWhitespace` option could not be used in the column and cell levels of the cascading configuration. [#7387](https://github.com/handsontable/handsontable/issues/7387)
|
25
|
+
- Fixed the flickering of the selection area at the edge of the table while scrolling. [#8317](https://github.com/handsontable/handsontable/issues/8317)
|
26
|
+
- Fixed misalignment on mobile devices when the edge cells were selected. [#9621](https://github.com/handsontable/handsontable/issues/9621)
|
27
|
+
- Fixed type definitions for the method `setSourceDataAtCell`. [#8599](https://github.com/handsontable/handsontable/issues/8599)
|
28
|
+
|
29
|
+
### Removed
|
30
|
+
- Removed a custom stable sorting implementation in favor of the built-in sorting algorithm [#6091](https://github.com/handsontable/handsontable/issues/6091)
|
31
|
+
- Removed type definitions for non-existing methods `rowOffset` and `colOffset` and a non-existing hook `modifyRowSourceData`. [#8659](https://github.com/handsontable/handsontable/issues/8659), [#7317](https://github.com/handsontable/handsontable/issues/7317)
|
32
|
+
|
33
|
+
## [12.1.2] - 2022-07-08
|
34
|
+
|
35
|
+
For more information on this release, see:
|
36
|
+
- [Release notes](https://handsontable.com/docs/release-notes/#_12-1-2)
|
37
|
+
|
38
|
+
### Changed
|
39
|
+
- Changed the version of the Moment.js dependency from 2.29.3 to 2.29.4, in reaction to a recently-found Moment.js security vulnerability. The vulnerability did not affect a correct configuration of Handsontable. [#9638](https://github.com/handsontable/handsontable/issues/9638)
|
40
|
+
- *Vue:* Freezed the version of the Vue framework that is used in our build chain to ~2.6. This shouldn't affect apps that use Vue 2.7+. [#9624](https://github.com/handsontable/handsontable/issues/9624)
|
18
41
|
|
19
42
|
## [12.1.1] - 2022-07-05
|
20
43
|
|
package/base.js
CHANGED
@@ -52,8 +52,8 @@ Handsontable.Core = function (rootElement) {
|
|
52
52
|
Handsontable.DefaultSettings = (0, _dataMap.metaSchemaFactory)();
|
53
53
|
Handsontable.hooks = _pluginHooks.default.getSingleton();
|
54
54
|
Handsontable.packageName = 'handsontable';
|
55
|
-
Handsontable.buildDate = "
|
56
|
-
Handsontable.version = "12.1.
|
55
|
+
Handsontable.buildDate = "22/09/2022 09:54:31";
|
56
|
+
Handsontable.version = "12.1.3";
|
57
57
|
Handsontable.languages = {
|
58
58
|
dictionaryKeys: _registry.dictionaryKeys,
|
59
59
|
getLanguageDictionary: _registry.getLanguageDictionary,
|
package/base.mjs
CHANGED
@@ -37,8 +37,8 @@ Handsontable.Core = function (rootElement) {
|
|
37
37
|
Handsontable.DefaultSettings = metaSchemaFactory();
|
38
38
|
Handsontable.hooks = Hooks.getSingleton();
|
39
39
|
Handsontable.packageName = 'handsontable';
|
40
|
-
Handsontable.buildDate = "
|
41
|
-
Handsontable.version = "12.1.
|
40
|
+
Handsontable.buildDate = "22/09/2022 09:54:36";
|
41
|
+
Handsontable.version = "12.1.3";
|
42
42
|
Handsontable.languages = {
|
43
43
|
dictionaryKeys: dictionaryKeys,
|
44
44
|
getLanguageDictionary: getLanguageDictionary,
|
package/core.d.ts
CHANGED
@@ -27,7 +27,6 @@ export default class Core {
|
|
27
27
|
batchRender<R>(wrappedOperations: () => R): R;
|
28
28
|
clear(): void;
|
29
29
|
clearUndo(): void;
|
30
|
-
colOffset(): number;
|
31
30
|
colToProp(col: number): string | number;
|
32
31
|
columnIndexMapper: IndexMapper;
|
33
32
|
constructor(element: Element, options: GridSettings);
|
@@ -125,7 +124,6 @@ export default class Core {
|
|
125
124
|
rootElement: HTMLElement;
|
126
125
|
rootWindow: Window;
|
127
126
|
rowIndexMapper: IndexMapper;
|
128
|
-
rowOffset(): number;
|
129
127
|
runHooks(key: keyof Events, p1?: any, p2?: any, p3?: any, p4?: any, p5?: any, p6?: any): any;
|
130
128
|
scrollViewportTo(row?: number, column?: number, snapToBottom?: boolean, snapToRight?: boolean, considerHiddenIndexes?: boolean): boolean;
|
131
129
|
selectAll(): void;
|
@@ -141,7 +139,7 @@ export default class Core {
|
|
141
139
|
setDataAtCell(row: number, col: number, value: CellValue, source?: string): void;
|
142
140
|
setDataAtRowProp(changes: Array<[number, string | number, CellValue]>, source?: string): void;
|
143
141
|
setDataAtRowProp(row: number, prop: string, value: CellValue, source?: string): void;
|
144
|
-
setSourceDataAtCell(changes: Array<[number, string | number, CellValue]
|
142
|
+
setSourceDataAtCell(changes: Array<[number, string | number, CellValue]>, source?: string): void;
|
145
143
|
setSourceDataAtCell(row: number, column: number | string, value: CellValue, source?: string): void;
|
146
144
|
spliceCol(col: number, index: number, amount: number, ...elements: CellValue[]): void;
|
147
145
|
spliceRow(row: number, index: number, amount: number, ...elements: CellValue[]): void;
|
package/core.js
CHANGED
@@ -1731,9 +1731,11 @@ function Core(rootElement, userSettings) {
|
|
1731
1731
|
instance._refreshBorders(revertOriginal, prepareEditorIfNeeded);
|
1732
1732
|
};
|
1733
1733
|
/**
|
1734
|
-
*
|
1734
|
+
* Populates cells at position with 2D input array (e.g. `[[1, 2], [3, 4]]`). Use `endRow`, `endCol` when you
|
1735
1735
|
* want to cut input when a certain row is reached.
|
1736
1736
|
*
|
1737
|
+
* The `populateFromArray()` method can't change [`readOnly`](@/api/options.md#readonly) cells.
|
1738
|
+
*
|
1737
1739
|
* Optional `method` argument has the same effect as pasteMode option (see {@link Options#pasteMode}).
|
1738
1740
|
*
|
1739
1741
|
* @memberof Core#
|
@@ -1949,6 +1951,9 @@ function Core(rootElement, userSettings) {
|
|
1949
1951
|
* The method is intended to be used by advanced users. Suspending the rendering
|
1950
1952
|
* process could cause visual glitches when wrongly implemented.
|
1951
1953
|
*
|
1954
|
+
* Every [`suspendRender()`](@/api/core.md#suspendrender) call needs to correspond with one [`resumeRender()`](@/api/core.md#resumerender) call.
|
1955
|
+
* For example, if you call [`suspendRender()`](@/api/core.md#suspendrender) 5 times, you need to call [`resumeRender()`](@/api/core.md#resumerender) 5 times as well.
|
1956
|
+
*
|
1952
1957
|
* @memberof Core#
|
1953
1958
|
* @function suspendRender
|
1954
1959
|
* @since 8.3.0
|
@@ -1981,6 +1986,9 @@ function Core(rootElement, userSettings) {
|
|
1981
1986
|
* The method is intended to be used by advanced users. Suspending the rendering
|
1982
1987
|
* process could cause visual glitches when wrongly implemented.
|
1983
1988
|
*
|
1989
|
+
* Every [`suspendRender()`](@/api/core.md#suspendrender) call needs to correspond with one [`resumeRender()`](@/api/core.md#resumerender) call.
|
1990
|
+
* For example, if you call [`suspendRender()`](@/api/core.md#suspendrender) 5 times, you need to call [`resumeRender()`](@/api/core.md#resumerender) 5 times as well.
|
1991
|
+
*
|
1984
1992
|
* @memberof Core#
|
1985
1993
|
* @function resumeRender
|
1986
1994
|
* @since 8.3.0
|
package/core.mjs
CHANGED
@@ -1671,9 +1671,11 @@ export default function Core(rootElement, userSettings) {
|
|
1671
1671
|
instance._refreshBorders(revertOriginal, prepareEditorIfNeeded);
|
1672
1672
|
};
|
1673
1673
|
/**
|
1674
|
-
*
|
1674
|
+
* Populates cells at position with 2D input array (e.g. `[[1, 2], [3, 4]]`). Use `endRow`, `endCol` when you
|
1675
1675
|
* want to cut input when a certain row is reached.
|
1676
1676
|
*
|
1677
|
+
* The `populateFromArray()` method can't change [`readOnly`](@/api/options.md#readonly) cells.
|
1678
|
+
*
|
1677
1679
|
* Optional `method` argument has the same effect as pasteMode option (see {@link Options#pasteMode}).
|
1678
1680
|
*
|
1679
1681
|
* @memberof Core#
|
@@ -1889,6 +1891,9 @@ export default function Core(rootElement, userSettings) {
|
|
1889
1891
|
* The method is intended to be used by advanced users. Suspending the rendering
|
1890
1892
|
* process could cause visual glitches when wrongly implemented.
|
1891
1893
|
*
|
1894
|
+
* Every [`suspendRender()`](@/api/core.md#suspendrender) call needs to correspond with one [`resumeRender()`](@/api/core.md#resumerender) call.
|
1895
|
+
* For example, if you call [`suspendRender()`](@/api/core.md#suspendrender) 5 times, you need to call [`resumeRender()`](@/api/core.md#resumerender) 5 times as well.
|
1896
|
+
*
|
1892
1897
|
* @memberof Core#
|
1893
1898
|
* @function suspendRender
|
1894
1899
|
* @since 8.3.0
|
@@ -1921,6 +1926,9 @@ export default function Core(rootElement, userSettings) {
|
|
1921
1926
|
* The method is intended to be used by advanced users. Suspending the rendering
|
1922
1927
|
* process could cause visual glitches when wrongly implemented.
|
1923
1928
|
*
|
1929
|
+
* Every [`suspendRender()`](@/api/core.md#suspendrender) call needs to correspond with one [`resumeRender()`](@/api/core.md#resumerender) call.
|
1930
|
+
* For example, if you call [`suspendRender()`](@/api/core.md#suspendrender) 5 times, you need to call [`resumeRender()`](@/api/core.md#resumerender) 5 times as well.
|
1931
|
+
*
|
1924
1932
|
* @memberof Core#
|
1925
1933
|
* @function resumeRender
|
1926
1934
|
* @since 8.3.0
|
package/dataMap/dataMap.js
CHANGED
@@ -6,6 +6,12 @@ require("core-js/modules/es.symbol.description.js");
|
|
6
6
|
|
7
7
|
require("core-js/modules/es.symbol.iterator.js");
|
8
8
|
|
9
|
+
require("core-js/modules/es.array.from.js");
|
10
|
+
|
11
|
+
require("core-js/modules/es.function.name.js");
|
12
|
+
|
13
|
+
require("core-js/modules/es.regexp.exec.js");
|
14
|
+
|
9
15
|
exports.__esModule = true;
|
10
16
|
exports.default = void 0;
|
11
17
|
|
@@ -23,21 +29,19 @@ require("core-js/modules/es.number.is-integer.js");
|
|
23
29
|
|
24
30
|
require("core-js/modules/es.number.constructor.js");
|
25
31
|
|
26
|
-
require("core-js/modules/es.array.concat.js");
|
27
|
-
|
28
32
|
require("core-js/modules/es.array.splice.js");
|
29
33
|
|
30
34
|
require("core-js/modules/es.array.sort.js");
|
31
35
|
|
32
36
|
require("core-js/modules/es.array.slice.js");
|
33
37
|
|
34
|
-
require("core-js/modules/es.array.
|
38
|
+
require("core-js/modules/es.array.concat.js");
|
35
39
|
|
36
|
-
require("core-js/modules/
|
40
|
+
require("core-js/modules/web.dom-collections.for-each.js");
|
37
41
|
|
38
|
-
require("core-js/modules/es.
|
42
|
+
require("core-js/modules/es.array.filter.js");
|
39
43
|
|
40
|
-
require("core-js/modules/es.
|
44
|
+
require("core-js/modules/es.array.index-of.js");
|
41
45
|
|
42
46
|
var _SheetClip = require("../3rdparty/SheetClip");
|
43
47
|
|
@@ -51,6 +55,18 @@ var _number = require("../helpers/number");
|
|
51
55
|
|
52
56
|
var _mixed = require("../helpers/mixed");
|
53
57
|
|
58
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
59
|
+
|
60
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
61
|
+
|
62
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
63
|
+
|
64
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
65
|
+
|
66
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
67
|
+
|
68
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
69
|
+
|
54
70
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
55
71
|
|
56
72
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
@@ -394,7 +410,7 @@ var DataMap = /*#__PURE__*/function () {
|
|
394
410
|
}
|
395
411
|
|
396
412
|
this.instance.rowIndexMapper.insertIndexes(rowIndex, numberOfCreatedRows);
|
397
|
-
this.spliceData
|
413
|
+
this.spliceData(physicalRowIndex, 0, rowsToAdd);
|
398
414
|
this.instance.runHooks('afterCreateRow', rowIndex, numberOfCreatedRows, source);
|
399
415
|
this.instance.forceFullRender = true; // used when data was changed
|
400
416
|
|
@@ -661,23 +677,26 @@ var DataMap = /*#__PURE__*/function () {
|
|
661
677
|
* Add/remove row(s) to/from the data source.
|
662
678
|
*
|
663
679
|
* @param {number} index Physical index of the element to add/remove.
|
664
|
-
* @param {number}
|
665
|
-
* @param {
|
680
|
+
* @param {number} deleteCount Number of rows to remove.
|
681
|
+
* @param {Array<object>} elements Row elements to be added.
|
666
682
|
*/
|
667
683
|
|
668
684
|
}, {
|
669
685
|
key: "spliceData",
|
670
|
-
value: function spliceData(index,
|
671
|
-
|
672
|
-
elements[_key3 - 2] = arguments[_key3];
|
673
|
-
}
|
686
|
+
value: function spliceData(index, deleteCount, elements) {
|
687
|
+
var _this3 = this;
|
674
688
|
|
675
|
-
var continueSplicing = this.instance.runHooks('beforeDataSplice', index,
|
689
|
+
var continueSplicing = this.instance.runHooks('beforeDataSplice', index, deleteCount, elements);
|
676
690
|
|
677
691
|
if (continueSplicing !== false) {
|
678
|
-
var
|
692
|
+
var newData = [].concat(_toConsumableArray(this.dataSource.slice(0, index)), _toConsumableArray(elements), _toConsumableArray(this.dataSource.slice(index))); // We try not to change the reference.
|
679
693
|
|
680
|
-
|
694
|
+
this.dataSource.length = 0; // Pushing to array instead of using `splice`, because Babel changes the code to one that uses the `apply` method.
|
695
|
+
// The used method was cause of the problem described within #7840.
|
696
|
+
|
697
|
+
newData.forEach(function (row) {
|
698
|
+
return _this3.dataSource.push(row);
|
699
|
+
});
|
681
700
|
}
|
682
701
|
}
|
683
702
|
/**
|