handsontable 0.0.0-next-74a68c1-20230627 → 0.0.0-next-208afb8-20230627

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.

Files changed (49) hide show
  1. package/CHANGELOG.md +0 -31
  2. package/base.js +2 -2
  3. package/base.mjs +2 -2
  4. package/core.d.ts +1 -0
  5. package/core.js +31 -2
  6. package/core.mjs +31 -2
  7. package/dataMap/metaManager/metaSchema.js +1 -1
  8. package/dataMap/metaManager/metaSchema.mjs +1 -1
  9. package/dist/handsontable.css +2 -2
  10. package/dist/handsontable.full.css +2 -2
  11. package/dist/handsontable.full.js +3553 -3366
  12. package/dist/handsontable.full.min.css +2 -2
  13. package/dist/handsontable.full.min.js +53 -53
  14. package/dist/handsontable.js +7968 -7781
  15. package/dist/handsontable.min.css +2 -2
  16. package/dist/handsontable.min.js +4 -4
  17. package/editorManager.js +4 -10
  18. package/editorManager.mjs +4 -10
  19. package/helpers/mixed.js +2 -2
  20. package/helpers/mixed.mjs +2 -2
  21. package/package.json +1 -1
  22. package/pluginHooks.d.ts +1 -0
  23. package/pluginHooks.js +11 -4
  24. package/pluginHooks.mjs +11 -4
  25. package/plugins/comments/commentEditor.js +1 -0
  26. package/plugins/comments/commentEditor.mjs +1 -0
  27. package/plugins/comments/comments.js +289 -231
  28. package/plugins/comments/comments.mjs +297 -241
  29. package/plugins/comments/contextMenuItem/addEditComment.js +51 -0
  30. package/plugins/comments/contextMenuItem/addEditComment.mjs +35 -0
  31. package/plugins/comments/contextMenuItem/readOnlyComment.js +63 -0
  32. package/plugins/comments/contextMenuItem/readOnlyComment.mjs +55 -0
  33. package/plugins/comments/contextMenuItem/removeComment.js +48 -0
  34. package/plugins/comments/contextMenuItem/removeComment.mjs +32 -0
  35. package/plugins/contextMenu/contextMenu.js +1 -0
  36. package/plugins/contextMenu/contextMenu.mjs +1 -0
  37. package/plugins/copyPaste/copyPaste.js +1 -1
  38. package/plugins/copyPaste/copyPaste.mjs +1 -1
  39. package/plugins/filters/filters.js +42 -62
  40. package/plugins/filters/filters.mjs +41 -61
  41. package/shortcutContexts/commands/index.js +1 -2
  42. package/shortcutContexts/commands/index.mjs +1 -2
  43. package/shortcutContexts/grid.js +0 -5
  44. package/shortcutContexts/grid.mjs +0 -5
  45. package/tableView.js +9 -4
  46. package/tableView.mjs +9 -4
  47. package/translations/indexMapper.d.ts +2 -0
  48. package/shortcutContexts/commands/scrollToFocusedCell.js +0 -38
  49. package/shortcutContexts/commands/scrollToFocusedCell.mjs +0 -33
package/editorManager.js CHANGED
@@ -255,13 +255,7 @@ var EditorManager = /*#__PURE__*/function () {
255
255
  return;
256
256
  }
257
257
  if (!this.activeEditor) {
258
- var _this$instance$getSel2 = this.instance.getSelectedRangeLast().highlight,
259
- row = _this$instance$getSel2.row,
260
- col = _this$instance$getSel2.col;
261
- var renderableRowIndex = this.instance.rowIndexMapper.getRenderableFromVisualIndex(row);
262
- var renderableColumnIndex = this.instance.columnIndexMapper.getRenderableFromVisualIndex(col);
263
- this.instance.view.scrollViewport(this.instance._createCellCoords(renderableRowIndex, renderableColumnIndex));
264
- this.instance.view.render();
258
+ this.instance.scrollToFocusedCell();
265
259
  this.prepareEditor();
266
260
  }
267
261
  if (this.activeEditor) {
@@ -336,9 +330,9 @@ var EditorManager = /*#__PURE__*/function () {
336
330
  key: "isCellEditable",
337
331
  value: function isCellEditable() {
338
332
  var editorClass = this.instance.getCellEditor(this.cellProperties);
339
- var _this$instance$getSel3 = this.instance.getSelectedRangeLast().highlight,
340
- row = _this$instance$getSel3.row,
341
- col = _this$instance$getSel3.col;
333
+ var _this$instance$getSel2 = this.instance.getSelectedRangeLast().highlight,
334
+ row = _this$instance$getSel2.row,
335
+ col = _this$instance$getSel2.col;
342
336
  var _this$instance = this.instance,
343
337
  rowIndexMapper = _this$instance.rowIndexMapper,
344
338
  columnIndexMapper = _this$instance.columnIndexMapper;
package/editorManager.mjs CHANGED
@@ -249,13 +249,7 @@ var EditorManager = /*#__PURE__*/function () {
249
249
  return;
250
250
  }
251
251
  if (!this.activeEditor) {
252
- var _this$instance$getSel2 = this.instance.getSelectedRangeLast().highlight,
253
- row = _this$instance$getSel2.row,
254
- col = _this$instance$getSel2.col;
255
- var renderableRowIndex = this.instance.rowIndexMapper.getRenderableFromVisualIndex(row);
256
- var renderableColumnIndex = this.instance.columnIndexMapper.getRenderableFromVisualIndex(col);
257
- this.instance.view.scrollViewport(this.instance._createCellCoords(renderableRowIndex, renderableColumnIndex));
258
- this.instance.view.render();
252
+ this.instance.scrollToFocusedCell();
259
253
  this.prepareEditor();
260
254
  }
261
255
  if (this.activeEditor) {
@@ -330,9 +324,9 @@ var EditorManager = /*#__PURE__*/function () {
330
324
  key: "isCellEditable",
331
325
  value: function isCellEditable() {
332
326
  var editorClass = this.instance.getCellEditor(this.cellProperties);
333
- var _this$instance$getSel3 = this.instance.getSelectedRangeLast().highlight,
334
- row = _this$instance$getSel3.row,
335
- col = _this$instance$getSel3.col;
327
+ var _this$instance$getSel2 = this.instance.getSelectedRangeLast().highlight,
328
+ row = _this$instance$getSel2.row,
329
+ col = _this$instance$getSel2.col;
336
330
  var _this$instance = this.instance,
337
331
  rowIndexMapper = _this$instance.rowIndexMapper,
338
332
  columnIndexMapper = _this$instance.columnIndexMapper;
package/helpers/mixed.js CHANGED
@@ -152,7 +152,7 @@ var domMessages = {
152
152
  function _injectProductInfo(key, element) {
153
153
  var hasValidType = !isEmpty(key);
154
154
  var isNonCommercial = typeof key === 'string' && key.toLowerCase() === 'non-commercial-and-evaluation';
155
- var hotVersion = "0.0.0-next-74a68c1-20230627";
155
+ var hotVersion = "0.0.0-next-208afb8-20230627";
156
156
  var keyValidityDate;
157
157
  var consoleMessageState = 'invalid';
158
158
  var domMessageState = 'invalid';
@@ -160,7 +160,7 @@ function _injectProductInfo(key, element) {
160
160
  var schemaValidity = _checkKeySchema(key);
161
161
  if (hasValidType || isNonCommercial || schemaValidity) {
162
162
  if (schemaValidity) {
163
- var releaseDate = (0, _moment.default)("22/06/2023", 'DD/MM/YYYY');
163
+ var releaseDate = (0, _moment.default)("23/05/2023", 'DD/MM/YYYY');
164
164
  var releaseDays = Math.floor(releaseDate.toDate().getTime() / 8.64e7);
165
165
  var keyValidityDays = _extractTime(key);
166
166
  keyValidityDate = (0, _moment.default)((keyValidityDays + 1) * 8.64e7, 'x').format('MMMM DD, YYYY');
package/helpers/mixed.mjs CHANGED
@@ -142,7 +142,7 @@ var domMessages = {
142
142
  export function _injectProductInfo(key, element) {
143
143
  var hasValidType = !isEmpty(key);
144
144
  var isNonCommercial = typeof key === 'string' && key.toLowerCase() === 'non-commercial-and-evaluation';
145
- var hotVersion = "0.0.0-next-74a68c1-20230627";
145
+ var hotVersion = "0.0.0-next-208afb8-20230627";
146
146
  var keyValidityDate;
147
147
  var consoleMessageState = 'invalid';
148
148
  var domMessageState = 'invalid';
@@ -150,7 +150,7 @@ export function _injectProductInfo(key, element) {
150
150
  var schemaValidity = _checkKeySchema(key);
151
151
  if (hasValidType || isNonCommercial || schemaValidity) {
152
152
  if (schemaValidity) {
153
- var releaseDate = moment("22/06/2023", 'DD/MM/YYYY');
153
+ var releaseDate = moment("23/05/2023", 'DD/MM/YYYY');
154
154
  var releaseDays = Math.floor(releaseDate.toDate().getTime() / 8.64e7);
155
155
  var keyValidityDays = _extractTime(key);
156
156
  keyValidityDate = moment((keyValidityDays + 1) * 8.64e7, 'x').format('MMMM DD, YYYY');
package/package.json CHANGED
@@ -10,7 +10,7 @@
10
10
  "url": "https://github.com/handsontable/handsontable/issues"
11
11
  },
12
12
  "author": "Handsoncode <hello@handsontable.com>",
13
- "version": "0.0.0-next-74a68c1-20230627",
13
+ "version": "0.0.0-next-208afb8-20230627",
14
14
  "main": "index",
15
15
  "module": "index.mjs",
16
16
  "jsnext:main": "index.mjs",
package/pluginHooks.d.ts CHANGED
@@ -128,6 +128,7 @@ export interface Events {
128
128
  afterRowSequenceChange?: (source: 'init' | 'move' | 'insert' | 'remove' | 'update') => void;
129
129
  afterScrollHorizontally?: () => void;
130
130
  afterScrollVertically?: () => void;
131
+ afterScroll?: () => void;
131
132
  afterSelectColumns?: (from: CellCoords, to: CellCoords, highlight: CellCoords) => void;
132
133
  afterSelection?: (row: number, column: number, row2: number, column2: number, preventScrolling: { value: boolean }, selectionLayerLevel: number) => void;
133
134
  afterSelectionByProp?: (row: number, prop: string, row2: number, prop2: string, preventScrolling: { value: boolean }, selectionLayerLevel: number) => void;
package/pluginHooks.js CHANGED
@@ -577,6 +577,13 @@ var REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-sen
577
577
  * @event Hooks#afterScrollVertically
578
578
  */
579
579
  'afterScrollVertically',
580
+ /**
581
+ * Fired after the vertical or horizontal scroll event.
582
+ *
583
+ * @since 14.0.0
584
+ * @event Hooks#afterScroll
585
+ */
586
+ 'afterScroll',
580
587
  /**
581
588
  * Fired after one or more cells are selected (e.g. During mouse move).
582
589
  *
@@ -683,7 +690,7 @@ var REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-sen
683
690
  /**
684
691
  * Fired before one or more columns are selected (e.g. During mouse header click or {@link Core#selectColumns} API call).
685
692
  *
686
- * @since 13.0.0
693
+ * @since 14.0.0
687
694
  * @event Hooks#beforeSelectColumns
688
695
  * @param {CellCoords} from Selection start coords object.
689
696
  * @param {CellCoords} to Selection end coords object.
@@ -717,7 +724,7 @@ var REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-sen
717
724
  /**
718
725
  * Fired after one or more columns are selected (e.g. During mouse header click or {@link Core#selectColumns} API call).
719
726
  *
720
- * @since 13.0.0
727
+ * @since 14.0.0
721
728
  * @event Hooks#afterSelectColumns
722
729
  * @param {CellCoords} from Selection start coords object.
723
730
  * @param {CellCoords} to Selection end coords object.
@@ -727,7 +734,7 @@ var REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-sen
727
734
  /**
728
735
  * Fired before one or more rows are selected (e.g. During mouse header click or {@link Core#selectRows} API call).
729
736
  *
730
- * @since 13.0.0
737
+ * @since 14.0.0
731
738
  * @event Hooks#beforeSelectRows
732
739
  * @param {CellCoords} from Selection start coords object.
733
740
  * @param {CellCoords} to Selection end coords object.
@@ -761,7 +768,7 @@ var REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-sen
761
768
  /**
762
769
  * Fired after one or more rows are selected (e.g. During mouse header click or {@link Core#selectRows} API call).
763
770
  *
764
- * @since 13.0.0
771
+ * @since 14.0.0
765
772
  * @event Hooks#afterSelectRows
766
773
  * @param {CellCoords} from Selection start coords object.
767
774
  * @param {CellCoords} to Selection end coords object.
package/pluginHooks.mjs CHANGED
@@ -574,6 +574,13 @@ var REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-sen
574
574
  * @event Hooks#afterScrollVertically
575
575
  */
576
576
  'afterScrollVertically',
577
+ /**
578
+ * Fired after the vertical or horizontal scroll event.
579
+ *
580
+ * @since 14.0.0
581
+ * @event Hooks#afterScroll
582
+ */
583
+ 'afterScroll',
577
584
  /**
578
585
  * Fired after one or more cells are selected (e.g. During mouse move).
579
586
  *
@@ -680,7 +687,7 @@ var REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-sen
680
687
  /**
681
688
  * Fired before one or more columns are selected (e.g. During mouse header click or {@link Core#selectColumns} API call).
682
689
  *
683
- * @since 13.0.0
690
+ * @since 14.0.0
684
691
  * @event Hooks#beforeSelectColumns
685
692
  * @param {CellCoords} from Selection start coords object.
686
693
  * @param {CellCoords} to Selection end coords object.
@@ -714,7 +721,7 @@ var REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-sen
714
721
  /**
715
722
  * Fired after one or more columns are selected (e.g. During mouse header click or {@link Core#selectColumns} API call).
716
723
  *
717
- * @since 13.0.0
724
+ * @since 14.0.0
718
725
  * @event Hooks#afterSelectColumns
719
726
  * @param {CellCoords} from Selection start coords object.
720
727
  * @param {CellCoords} to Selection end coords object.
@@ -724,7 +731,7 @@ var REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-sen
724
731
  /**
725
732
  * Fired before one or more rows are selected (e.g. During mouse header click or {@link Core#selectRows} API call).
726
733
  *
727
- * @since 13.0.0
734
+ * @since 14.0.0
728
735
  * @event Hooks#beforeSelectRows
729
736
  * @param {CellCoords} from Selection start coords object.
730
737
  * @param {CellCoords} to Selection end coords object.
@@ -758,7 +765,7 @@ var REGISTERED_HOOKS = [/* eslint-disable jsdoc/require-description-complete-sen
758
765
  /**
759
766
  * Fired after one or more rows are selected (e.g. During mouse header click or {@link Core#selectRows} API call).
760
767
  *
761
- * @since 13.0.0
768
+ * @since 14.0.0
762
769
  * @event Hooks#afterSelectRows
763
770
  * @param {CellCoords} from Selection start coords object.
764
771
  * @param {CellCoords} to Selection end coords object.
@@ -197,6 +197,7 @@ var CommentEditor = /*#__PURE__*/function () {
197
197
  this.rootDocument.body.appendChild(this.container);
198
198
  (0, _element.addClass)(editor, CommentEditor.CLASS_EDITOR);
199
199
  (0, _element.addClass)(textArea, CommentEditor.CLASS_INPUT);
200
+ textArea.setAttribute('data-hot-input', true);
200
201
  editor.appendChild(textArea);
201
202
  this.container.appendChild(editor);
202
203
  return editor;
@@ -193,6 +193,7 @@ var CommentEditor = /*#__PURE__*/function () {
193
193
  this.rootDocument.body.appendChild(this.container);
194
194
  addClass(editor, CommentEditor.CLASS_EDITOR);
195
195
  addClass(textArea, CommentEditor.CLASS_INPUT);
196
+ textArea.setAttribute('data-hot-input', true);
196
197
  editor.appendChild(textArea);
197
198
  this.container.appendChild(editor);
198
199
  return editor;