handsontable 0.0.0-next-48677e7-20230509 → 0.0.0-next-c73b24c-20230510

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 (227) hide show
  1. package/3rdparty/walkontable/src/{selection/border/border.js → border.js} +12 -7
  2. package/3rdparty/walkontable/src/{selection/border/border.mjs → border.mjs} +12 -7
  3. package/3rdparty/walkontable/src/cell/coords.js +13 -40
  4. package/3rdparty/walkontable/src/cell/coords.mjs +13 -40
  5. package/3rdparty/walkontable/src/cell/range.js +25 -29
  6. package/3rdparty/walkontable/src/cell/range.mjs +24 -28
  7. package/3rdparty/walkontable/src/core/_base.js +3 -9
  8. package/3rdparty/walkontable/src/core/_base.mjs +3 -9
  9. package/3rdparty/walkontable/src/core/clone.js +2 -2
  10. package/3rdparty/walkontable/src/core/clone.mjs +2 -2
  11. package/3rdparty/walkontable/src/core/core.js +2 -3
  12. package/3rdparty/walkontable/src/core/core.mjs +2 -3
  13. package/3rdparty/walkontable/src/event.js +10 -12
  14. package/3rdparty/walkontable/src/event.mjs +10 -12
  15. package/3rdparty/walkontable/src/facade/core.js +2 -2
  16. package/3rdparty/walkontable/src/facade/core.mjs +2 -2
  17. package/3rdparty/walkontable/src/index.js +2 -10
  18. package/3rdparty/walkontable/src/index.mjs +2 -2
  19. package/3rdparty/walkontable/src/overlay/_base.js +7 -8
  20. package/3rdparty/walkontable/src/overlay/_base.mjs +7 -8
  21. package/3rdparty/walkontable/src/overlay/bottom.js +6 -7
  22. package/3rdparty/walkontable/src/overlay/bottom.mjs +6 -7
  23. package/3rdparty/walkontable/src/overlay/inlineStart.js +4 -2
  24. package/3rdparty/walkontable/src/overlay/inlineStart.mjs +4 -2
  25. package/3rdparty/walkontable/src/overlay/top.js +10 -9
  26. package/3rdparty/walkontable/src/overlay/top.mjs +10 -9
  27. package/3rdparty/walkontable/src/overlay/topInlineStartCorner.js +10 -12
  28. package/3rdparty/walkontable/src/overlay/topInlineStartCorner.mjs +10 -12
  29. package/3rdparty/walkontable/src/overlays.js +55 -64
  30. package/3rdparty/walkontable/src/overlays.mjs +55 -64
  31. package/3rdparty/walkontable/src/renderer/table.js +0 -2
  32. package/3rdparty/walkontable/src/renderer/table.mjs +0 -2
  33. package/3rdparty/walkontable/src/scroll.js +20 -23
  34. package/3rdparty/walkontable/src/scroll.mjs +20 -23
  35. package/3rdparty/walkontable/src/selection.js +354 -0
  36. package/3rdparty/walkontable/src/selection.mjs +348 -0
  37. package/3rdparty/walkontable/src/settings.js +13 -15
  38. package/3rdparty/walkontable/src/settings.mjs +13 -15
  39. package/3rdparty/walkontable/src/table/mixin/calculatedColumns.js +0 -9
  40. package/3rdparty/walkontable/src/table/mixin/calculatedColumns.mjs +0 -9
  41. package/3rdparty/walkontable/src/table/mixin/calculatedRows.js +0 -9
  42. package/3rdparty/walkontable/src/table/mixin/calculatedRows.mjs +0 -9
  43. package/3rdparty/walkontable/src/table/mixin/stickyColumnsStart.js +0 -9
  44. package/3rdparty/walkontable/src/table/mixin/stickyColumnsStart.mjs +0 -9
  45. package/3rdparty/walkontable/src/table/mixin/stickyRowsBottom.js +0 -9
  46. package/3rdparty/walkontable/src/table/mixin/stickyRowsBottom.mjs +0 -9
  47. package/3rdparty/walkontable/src/table/mixin/stickyRowsTop.js +0 -9
  48. package/3rdparty/walkontable/src/table/mixin/stickyRowsTop.mjs +0 -9
  49. package/3rdparty/walkontable/src/table.js +101 -33
  50. package/3rdparty/walkontable/src/table.mjs +102 -34
  51. package/base.js +2 -4
  52. package/base.mjs +2 -2
  53. package/core.d.ts +0 -4
  54. package/core.js +24 -52
  55. package/core.mjs +24 -52
  56. package/dataMap/dataSource.js +5 -5
  57. package/dataMap/dataSource.mjs +5 -5
  58. package/dataMap/metaManager/metaSchema.js +1 -8
  59. package/dataMap/metaManager/metaSchema.mjs +1 -8
  60. package/dist/handsontable.css +2 -7
  61. package/dist/handsontable.full.css +2 -7
  62. package/dist/handsontable.full.js +9101 -9413
  63. package/dist/handsontable.full.min.css +3 -3
  64. package/dist/handsontable.full.min.js +123 -115
  65. package/dist/handsontable.js +8761 -9074
  66. package/dist/handsontable.min.css +3 -3
  67. package/dist/handsontable.min.js +11 -3
  68. package/dist/languages/all.js +133 -0
  69. package/dist/languages/ar-AR.js +7 -0
  70. package/dist/languages/cs-CZ.js +7 -0
  71. package/dist/languages/de-CH.js +7 -0
  72. package/dist/languages/de-DE.js +7 -0
  73. package/dist/languages/en-US.js +7 -0
  74. package/dist/languages/es-MX.js +7 -0
  75. package/dist/languages/fr-FR.js +7 -0
  76. package/dist/languages/it-IT.js +7 -0
  77. package/dist/languages/ja-JP.js +7 -0
  78. package/dist/languages/ko-KR.js +7 -0
  79. package/dist/languages/lv-LV.js +7 -0
  80. package/dist/languages/nb-NO.js +7 -0
  81. package/dist/languages/nl-NL.js +7 -0
  82. package/dist/languages/pl-PL.js +7 -0
  83. package/dist/languages/pt-BR.js +7 -0
  84. package/dist/languages/ru-RU.js +7 -0
  85. package/dist/languages/sr-SP.js +7 -0
  86. package/dist/languages/zh-CN.js +7 -0
  87. package/dist/languages/zh-TW.js +7 -0
  88. package/editorManager.js +3 -7
  89. package/editorManager.mjs +3 -7
  90. package/editors/textEditor/textEditor.js +16 -3
  91. package/editors/textEditor/textEditor.mjs +17 -4
  92. package/helpers/dom/element.js +0 -11
  93. package/helpers/dom/element.mjs +0 -10
  94. package/helpers/mixed.js +1 -1
  95. package/helpers/mixed.mjs +1 -1
  96. package/i18n/languages/ar-AR.js +7 -1
  97. package/i18n/languages/cs-CZ.js +7 -1
  98. package/i18n/languages/de-CH.js +7 -1
  99. package/i18n/languages/de-DE.js +7 -1
  100. package/i18n/languages/en-US.js +7 -1
  101. package/i18n/languages/es-MX.js +7 -1
  102. package/i18n/languages/fr-FR.js +7 -1
  103. package/i18n/languages/it-IT.js +7 -1
  104. package/i18n/languages/ja-JP.js +7 -1
  105. package/i18n/languages/ko-KR.js +7 -1
  106. package/i18n/languages/lv-LV.js +7 -1
  107. package/i18n/languages/nb-NO.js +7 -1
  108. package/i18n/languages/nl-NL.js +7 -1
  109. package/i18n/languages/pl-PL.js +7 -1
  110. package/i18n/languages/pt-BR.js +7 -1
  111. package/i18n/languages/ru-RU.js +7 -1
  112. package/i18n/languages/sr-SP.js +7 -1
  113. package/i18n/languages/zh-CN.js +7 -1
  114. package/i18n/languages/zh-TW.js +7 -1
  115. package/languages/all.js +133 -0
  116. package/languages/ar-AR.js +7 -0
  117. package/languages/cs-CZ.js +7 -0
  118. package/languages/de-CH.js +7 -0
  119. package/languages/de-DE.js +7 -0
  120. package/languages/en-US.js +7 -0
  121. package/languages/es-MX.js +7 -0
  122. package/languages/fr-FR.js +7 -0
  123. package/languages/index.js +133 -0
  124. package/languages/it-IT.js +7 -0
  125. package/languages/ja-JP.js +7 -0
  126. package/languages/ko-KR.js +7 -0
  127. package/languages/lv-LV.js +7 -0
  128. package/languages/nb-NO.js +7 -0
  129. package/languages/nl-NL.js +7 -0
  130. package/languages/pl-PL.js +7 -0
  131. package/languages/pt-BR.js +7 -0
  132. package/languages/ru-RU.js +7 -0
  133. package/languages/sr-SP.js +7 -0
  134. package/languages/zh-CN.js +7 -0
  135. package/languages/zh-TW.js +7 -0
  136. package/package.json +3 -2
  137. package/pluginHooks.js +17 -7
  138. package/pluginHooks.mjs +16 -4
  139. package/plugins/autoRowSize/autoRowSize.js +2 -2
  140. package/plugins/autoRowSize/autoRowSize.mjs +2 -2
  141. package/plugins/copyPaste/copyPaste.js +93 -12
  142. package/plugins/copyPaste/copyPaste.mjs +93 -12
  143. package/plugins/copyPaste/copyableRanges.js +25 -31
  144. package/plugins/copyPaste/copyableRanges.mjs +18 -24
  145. package/plugins/copyPaste/focusableElement.js +219 -0
  146. package/plugins/copyPaste/focusableElement.mjs +213 -0
  147. package/plugins/customBorders/customBorders.js +2 -6
  148. package/plugins/customBorders/customBorders.mjs +3 -7
  149. package/plugins/filters/filters.js +5 -0
  150. package/plugins/filters/filters.mjs +5 -0
  151. package/plugins/formulas/formulas.js +190 -168
  152. package/plugins/formulas/formulas.mjs +190 -168
  153. package/plugins/formulas/indexSyncer/axisSyncer.js +379 -0
  154. package/plugins/formulas/indexSyncer/axisSyncer.mjs +374 -0
  155. package/plugins/formulas/indexSyncer/index.js +225 -0
  156. package/plugins/formulas/indexSyncer/index.mjs +219 -0
  157. package/plugins/mergeCells/mergeCells.js +16 -0
  158. package/plugins/mergeCells/mergeCells.mjs +16 -0
  159. package/plugins/nestedHeaders/nestedHeaders.js +4 -3
  160. package/plugins/nestedHeaders/nestedHeaders.mjs +4 -3
  161. package/plugins/nestedHeaders/stateManager/headersTree.js +23 -26
  162. package/plugins/nestedHeaders/stateManager/headersTree.mjs +20 -23
  163. package/plugins/nestedHeaders/stateManager/index.js +3 -3
  164. package/plugins/nestedHeaders/stateManager/matrixGenerator.js +1 -0
  165. package/plugins/nestedHeaders/stateManager/settingsNormalizer.js +1 -1
  166. package/plugins/nestedHeaders/utils/ghostTable.js +30 -35
  167. package/plugins/nestedHeaders/utils/ghostTable.mjs +30 -35
  168. package/plugins/registry.js +3 -1
  169. package/plugins/undoRedo/undoRedo.js +0 -1
  170. package/plugins/undoRedo/undoRedo.mjs +0 -1
  171. package/renderers/baseRenderer/baseRenderer.js +0 -3
  172. package/renderers/baseRenderer/baseRenderer.mjs +0 -3
  173. package/selection/highlight/constants.js +16 -0
  174. package/selection/highlight/constants.mjs +6 -0
  175. package/selection/highlight/highlight.js +133 -335
  176. package/selection/highlight/highlight.mjs +129 -325
  177. package/selection/highlight/types/activeHeader.js +9 -10
  178. package/selection/highlight/types/activeHeader.mjs +8 -10
  179. package/selection/highlight/types/area.js +27 -12
  180. package/selection/highlight/types/area.mjs +30 -16
  181. package/selection/highlight/types/{focus.js → cell.js} +8 -5
  182. package/selection/highlight/types/{focus.mjs → cell.mjs} +7 -5
  183. package/selection/highlight/types/customSelection.js +10 -7
  184. package/selection/highlight/types/customSelection.mjs +9 -7
  185. package/selection/highlight/types/fill.js +8 -5
  186. package/selection/highlight/types/fill.mjs +7 -5
  187. package/selection/highlight/types/header.js +20 -10
  188. package/selection/highlight/types/header.mjs +19 -10
  189. package/selection/highlight/types/{row.js → index.js} +31 -27
  190. package/selection/highlight/types/{row.mjs → index.mjs} +29 -24
  191. package/selection/highlight/visualSelection.js +21 -12
  192. package/selection/highlight/visualSelection.mjs +21 -12
  193. package/selection/index.js +7 -4
  194. package/selection/index.mjs +3 -2
  195. package/selection/selection.js +46 -88
  196. package/selection/selection.mjs +44 -82
  197. package/settings.d.ts +0 -1
  198. package/tableView.js +66 -94
  199. package/tableView.mjs +66 -94
  200. package/translations/changesObservable/observable.js +41 -46
  201. package/translations/changesObservable/observable.mjs +36 -41
  202. package/translations/changesObservable/observer.js +1 -1
  203. package/translations/indexMapper.js +21 -0
  204. package/translations/indexMapper.mjs +21 -0
  205. package/utils/dataStructures/tree.js +15 -18
  206. package/utils/dataStructures/tree.mjs +15 -18
  207. package/utils/parseTable.js +5 -1
  208. package/utils/parseTable.mjs +5 -1
  209. package/3rdparty/walkontable/src/selection/border/constants.js +0 -18
  210. package/3rdparty/walkontable/src/selection/border/constants.mjs +0 -13
  211. package/3rdparty/walkontable/src/selection/constants.js +0 -63
  212. package/3rdparty/walkontable/src/selection/constants.mjs +0 -51
  213. package/3rdparty/walkontable/src/selection/index.js +0 -30
  214. package/3rdparty/walkontable/src/selection/index.mjs +0 -5
  215. package/3rdparty/walkontable/src/selection/manager.js +0 -334
  216. package/3rdparty/walkontable/src/selection/manager.mjs +0 -328
  217. package/3rdparty/walkontable/src/selection/scanner.js +0 -363
  218. package/3rdparty/walkontable/src/selection/scanner.mjs +0 -359
  219. package/3rdparty/walkontable/src/selection/selection.js +0 -133
  220. package/3rdparty/walkontable/src/selection/selection.mjs +0 -127
  221. package/focusManager.d.ts +0 -12
  222. package/focusManager.js +0 -249
  223. package/focusManager.mjs +0 -245
  224. package/selection/highlight/types/areaLayered.js +0 -54
  225. package/selection/highlight/types/areaLayered.mjs +0 -49
  226. package/selection/highlight/types/column.js +0 -50
  227. package/selection/highlight/types/column.mjs +0 -45
@@ -31,11 +31,6 @@ function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) {
31
31
  function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }
32
32
  function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
33
33
  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; } }
34
- var _observers = /*#__PURE__*/new WeakMap();
35
- var _indexMatrix = /*#__PURE__*/new WeakMap();
36
- var _currentIndexState = /*#__PURE__*/new WeakMap();
37
- var _isMatrixIndexesInitialized = /*#__PURE__*/new WeakMap();
38
- var _initialIndexValue = /*#__PURE__*/new WeakMap();
39
34
  /**
40
35
  * The ChangesObservable module is an object that represents a resource that provides
41
36
  * the ability to observe the changes that happened in the index map indexes during
@@ -44,68 +39,68 @@ var _initialIndexValue = /*#__PURE__*/new WeakMap();
44
39
  * @private
45
40
  * @class ChangesObservable
46
41
  */
42
+ var _observers = /*#__PURE__*/new WeakMap();
43
+ var _indexMatrix = /*#__PURE__*/new WeakMap();
44
+ var _currentIndexState = /*#__PURE__*/new WeakMap();
45
+ var _isMatrixIndexesInitialized = /*#__PURE__*/new WeakMap();
46
+ var _initialIndexValue = /*#__PURE__*/new WeakMap();
47
47
  var ChangesObservable = /*#__PURE__*/function () {
48
- /**
49
- * The list of registered ChangesObserver instances.
50
- *
51
- * @type {ChangesObserver[]}
52
- */
53
-
54
- /**
55
- * An array with default values that act as a base array that will be compared with
56
- * the last saved index state. The changes are generated and immediately send through
57
- * the newly created ChangesObserver object. Thanks to that, the observer initially has
58
- * all information about what indexes are currently changed.
59
- *
60
- * @type {Array}
61
- */
62
-
63
- /**
64
- * An array that holds the indexes state that is currently valid. The value is changed on every
65
- * index mapper cache update.
66
- *
67
- * @type {Array}
68
- */
69
-
70
- /**
71
- * The flag determines if the observable is initialized or not. Not initialized object creates
72
- * index matrix once while emitting new changes.
73
- *
74
- * @type {boolean}
75
- */
76
-
77
- /**
78
- * The initial index value allows control from what value the index matrix array will be created.
79
- * Changing that value changes how the array diff generates the changes for the initial data
80
- * sent to the subscribers. For example, the changes can be triggered by detecting the changes
81
- * from `false` to `true` value or vice versa. Generally, it depends on which index map type
82
- * the Observable will work with. For "hiding" or "trimming" index types, it will be boolean
83
- * values. For various index maps, it can be anything, but I suspect that the most appropriate
84
- * initial value will be "undefined" in that case.
85
- *
86
- * @type {boolean}
87
- */
88
-
89
48
  function ChangesObservable() {
90
49
  var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
91
50
  initialIndexValue = _ref.initialIndexValue;
92
51
  _classCallCheck(this, ChangesObservable);
52
+ /**
53
+ * The list of registered ChangesObserver instances.
54
+ *
55
+ * @type {ChangesObserver[]}
56
+ */
93
57
  _classPrivateFieldInitSpec(this, _observers, {
94
58
  writable: true,
95
59
  value: new Set()
96
60
  });
61
+ /**
62
+ * An array with default values that act as a base array that will be compared with
63
+ * the last saved index state. The changes are generated and immediately send through
64
+ * the newly created ChangesObserver object. Thanks to that, the observer initially has
65
+ * all information about what indexes are currently changed.
66
+ *
67
+ * @type {Array}
68
+ */
97
69
  _classPrivateFieldInitSpec(this, _indexMatrix, {
98
70
  writable: true,
99
71
  value: []
100
72
  });
73
+ /**
74
+ * An array that holds the indexes state that is currently valid. The value is changed on every
75
+ * index mapper cache update.
76
+ *
77
+ * @type {Array}
78
+ */
101
79
  _classPrivateFieldInitSpec(this, _currentIndexState, {
102
80
  writable: true,
103
81
  value: []
104
82
  });
83
+ /**
84
+ * The flag determines if the observable is initialized or not. Not initialized object creates
85
+ * index matrix once while emitting new changes.
86
+ *
87
+ * @type {boolean}
88
+ */
105
89
  _classPrivateFieldInitSpec(this, _isMatrixIndexesInitialized, {
106
90
  writable: true,
107
91
  value: false
108
92
  });
93
+ /**
94
+ * The initial index value allows control from what value the index matrix array will be created.
95
+ * Changing that value changes how the array diff generates the changes for the initial data
96
+ * sent to the subscribers. For example, the changes can be triggered by detecting the changes
97
+ * from `false` to `true` value or vice versa. Generally, it depends on which index map type
98
+ * the Observable will work with. For "hiding" or "trimming" index types, it will be boolean
99
+ * values. For various index maps, it can be anything, but I suspect that the most appropriate
100
+ * initial value will be "undefined" in that case.
101
+ *
102
+ * @type {boolean}
103
+ */
109
104
  _classPrivateFieldInitSpec(this, _initialIndexValue, {
110
105
  writable: true,
111
106
  value: false
@@ -41,67 +41,62 @@ var _currentIndexState = /*#__PURE__*/new WeakMap();
41
41
  var _isMatrixIndexesInitialized = /*#__PURE__*/new WeakMap();
42
42
  var _initialIndexValue = /*#__PURE__*/new WeakMap();
43
43
  export var ChangesObservable = /*#__PURE__*/function () {
44
- /**
45
- * The list of registered ChangesObserver instances.
46
- *
47
- * @type {ChangesObserver[]}
48
- */
49
-
50
- /**
51
- * An array with default values that act as a base array that will be compared with
52
- * the last saved index state. The changes are generated and immediately send through
53
- * the newly created ChangesObserver object. Thanks to that, the observer initially has
54
- * all information about what indexes are currently changed.
55
- *
56
- * @type {Array}
57
- */
58
-
59
- /**
60
- * An array that holds the indexes state that is currently valid. The value is changed on every
61
- * index mapper cache update.
62
- *
63
- * @type {Array}
64
- */
65
-
66
- /**
67
- * The flag determines if the observable is initialized or not. Not initialized object creates
68
- * index matrix once while emitting new changes.
69
- *
70
- * @type {boolean}
71
- */
72
-
73
- /**
74
- * The initial index value allows control from what value the index matrix array will be created.
75
- * Changing that value changes how the array diff generates the changes for the initial data
76
- * sent to the subscribers. For example, the changes can be triggered by detecting the changes
77
- * from `false` to `true` value or vice versa. Generally, it depends on which index map type
78
- * the Observable will work with. For "hiding" or "trimming" index types, it will be boolean
79
- * values. For various index maps, it can be anything, but I suspect that the most appropriate
80
- * initial value will be "undefined" in that case.
81
- *
82
- * @type {boolean}
83
- */
84
-
85
44
  function ChangesObservable() {
86
45
  var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
87
46
  initialIndexValue = _ref.initialIndexValue;
88
47
  _classCallCheck(this, ChangesObservable);
48
+ /**
49
+ * The list of registered ChangesObserver instances.
50
+ *
51
+ * @type {ChangesObserver[]}
52
+ */
89
53
  _classPrivateFieldInitSpec(this, _observers, {
90
54
  writable: true,
91
55
  value: new Set()
92
56
  });
57
+ /**
58
+ * An array with default values that act as a base array that will be compared with
59
+ * the last saved index state. The changes are generated and immediately send through
60
+ * the newly created ChangesObserver object. Thanks to that, the observer initially has
61
+ * all information about what indexes are currently changed.
62
+ *
63
+ * @type {Array}
64
+ */
93
65
  _classPrivateFieldInitSpec(this, _indexMatrix, {
94
66
  writable: true,
95
67
  value: []
96
68
  });
69
+ /**
70
+ * An array that holds the indexes state that is currently valid. The value is changed on every
71
+ * index mapper cache update.
72
+ *
73
+ * @type {Array}
74
+ */
97
75
  _classPrivateFieldInitSpec(this, _currentIndexState, {
98
76
  writable: true,
99
77
  value: []
100
78
  });
79
+ /**
80
+ * The flag determines if the observable is initialized or not. Not initialized object creates
81
+ * index matrix once while emitting new changes.
82
+ *
83
+ * @type {boolean}
84
+ */
101
85
  _classPrivateFieldInitSpec(this, _isMatrixIndexesInitialized, {
102
86
  writable: true,
103
87
  value: false
104
88
  });
89
+ /**
90
+ * The initial index value allows control from what value the index matrix array will be created.
91
+ * Changing that value changes how the array diff generates the changes for the initial data
92
+ * sent to the subscribers. For example, the changes can be triggered by detecting the changes
93
+ * from `false` to `true` value or vice versa. Generally, it depends on which index map type
94
+ * the Observable will work with. For "hiding" or "trimming" index types, it will be boolean
95
+ * values. For various index maps, it can be anything, but I suspect that the most appropriate
96
+ * initial value will be "undefined" in that case.
97
+ *
98
+ * @type {boolean}
99
+ */
105
100
  _classPrivateFieldInitSpec(this, _initialIndexValue, {
106
101
  writable: true,
107
102
  value: false
@@ -29,13 +29,13 @@ function _classApplyDescriptorSet(receiver, descriptor, value) { if (descriptor.
29
29
  function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
30
30
  function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
31
31
  function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
32
- var _currentInitialChanges = /*#__PURE__*/new WeakMap();
33
32
  /**
34
33
  * The ChangesObserver module is an object that represents a disposable resource
35
34
  * provided by the ChangesObservable module.
36
35
  *
37
36
  * @class ChangesObserver
38
37
  */
38
+ var _currentInitialChanges = /*#__PURE__*/new WeakMap();
39
39
  var ChangesObserver = /*#__PURE__*/function () {
40
40
  function ChangesObserver() {
41
41
  _classCallCheck(this, ChangesObserver);
@@ -160,6 +160,12 @@ var IndexMapper = /*#__PURE__*/function () {
160
160
  * @type {boolean}
161
161
  */
162
162
  this.indexesSequenceChanged = false;
163
+ /**
164
+ * Flag informing about source of the change.
165
+ *
166
+ * @type {undefined|string}
167
+ */
168
+ this.indexesChangeSource = void 0;
163
169
  /**
164
170
  * Flag determining whether any action on trimmed indexes has been performed. It's used for cache management.
165
171
  *
@@ -200,6 +206,7 @@ var IndexMapper = /*#__PURE__*/function () {
200
206
 
201
207
  // Sequence of stored indexes might change.
202
208
  _this.updateCache();
209
+ _this.runLocalHooks('indexesSequenceChange', _this.indexesChangeSource);
203
210
  _this.runLocalHooks('change', _this.indexesSequence, null);
204
211
  });
205
212
  this.trimmingMapsCollection.addLocalHook('change', function (changedMap) {
@@ -520,7 +527,9 @@ var IndexMapper = /*#__PURE__*/function () {
520
527
  this.notTrimmedIndexesCache = _toConsumableArray(new Array(length).keys());
521
528
  this.notHiddenIndexesCache = _toConsumableArray(new Array(length).keys());
522
529
  this.suspendOperations();
530
+ this.indexesChangeSource = 'init';
523
531
  this.indexesSequence.init(length);
532
+ this.indexesChangeSource = void 0;
524
533
  this.trimmingMapsCollection.initEvery(length);
525
534
  this.resumeOperations();
526
535
 
@@ -572,7 +581,13 @@ var IndexMapper = /*#__PURE__*/function () {
572
581
  }, {
573
582
  key: "setIndexesSequence",
574
583
  value: function setIndexesSequence(indexes) {
584
+ if (this.indexesChangeSource === void 0) {
585
+ this.indexesChangeSource = 'update';
586
+ }
575
587
  this.indexesSequence.setValues(indexes);
588
+ if (this.indexesChangeSource === 'update') {
589
+ this.indexesChangeSource = void 0;
590
+ }
576
591
  }
577
592
 
578
593
  /**
@@ -722,9 +737,11 @@ var IndexMapper = /*#__PURE__*/function () {
722
737
  })[finalIndex];
723
738
  destinationPosition = listWithRemovedItems.indexOf(physicalIndex);
724
739
  }
740
+ this.indexesChangeSource = 'move';
725
741
 
726
742
  // Adding indexes without re-indexing.
727
743
  this.setIndexesSequence((0, _maps.getListWithInsertedItems)(listWithRemovedItems, destinationPosition, physicalMovedIndexes));
744
+ this.indexesChangeSource = void 0;
728
745
  }
729
746
 
730
747
  /**
@@ -768,7 +785,9 @@ var IndexMapper = /*#__PURE__*/function () {
768
785
  return nextIndex + stepsFromStart;
769
786
  });
770
787
  this.suspendOperations();
788
+ this.indexesChangeSource = 'insert';
771
789
  this.indexesSequence.insert(insertionIndex, insertedIndexes);
790
+ this.indexesChangeSource = void 0;
772
791
  this.trimmingMapsCollection.insertToEvery(insertionIndex, insertedIndexes);
773
792
  this.hidingMapsCollection.insertToEvery(insertionIndex, insertedIndexes);
774
793
  this.variousMapsCollection.insertToEvery(insertionIndex, insertedIndexes);
@@ -785,7 +804,9 @@ var IndexMapper = /*#__PURE__*/function () {
785
804
  key: "removeIndexes",
786
805
  value: function removeIndexes(removedIndexes) {
787
806
  this.suspendOperations();
807
+ this.indexesChangeSource = 'remove';
788
808
  this.indexesSequence.remove(removedIndexes);
809
+ this.indexesChangeSource = void 0;
789
810
  this.trimmingMapsCollection.removeFromEvery(removedIndexes);
790
811
  this.hidingMapsCollection.removeFromEvery(removedIndexes);
791
812
  this.variousMapsCollection.removeFromEvery(removedIndexes);
@@ -155,6 +155,12 @@ export var IndexMapper = /*#__PURE__*/function () {
155
155
  * @type {boolean}
156
156
  */
157
157
  this.indexesSequenceChanged = false;
158
+ /**
159
+ * Flag informing about source of the change.
160
+ *
161
+ * @type {undefined|string}
162
+ */
163
+ this.indexesChangeSource = void 0;
158
164
  /**
159
165
  * Flag determining whether any action on trimmed indexes has been performed. It's used for cache management.
160
166
  *
@@ -195,6 +201,7 @@ export var IndexMapper = /*#__PURE__*/function () {
195
201
 
196
202
  // Sequence of stored indexes might change.
197
203
  _this.updateCache();
204
+ _this.runLocalHooks('indexesSequenceChange', _this.indexesChangeSource);
198
205
  _this.runLocalHooks('change', _this.indexesSequence, null);
199
206
  });
200
207
  this.trimmingMapsCollection.addLocalHook('change', function (changedMap) {
@@ -515,7 +522,9 @@ export var IndexMapper = /*#__PURE__*/function () {
515
522
  this.notTrimmedIndexesCache = _toConsumableArray(new Array(length).keys());
516
523
  this.notHiddenIndexesCache = _toConsumableArray(new Array(length).keys());
517
524
  this.suspendOperations();
525
+ this.indexesChangeSource = 'init';
518
526
  this.indexesSequence.init(length);
527
+ this.indexesChangeSource = void 0;
519
528
  this.trimmingMapsCollection.initEvery(length);
520
529
  this.resumeOperations();
521
530
 
@@ -567,7 +576,13 @@ export var IndexMapper = /*#__PURE__*/function () {
567
576
  }, {
568
577
  key: "setIndexesSequence",
569
578
  value: function setIndexesSequence(indexes) {
579
+ if (this.indexesChangeSource === void 0) {
580
+ this.indexesChangeSource = 'update';
581
+ }
570
582
  this.indexesSequence.setValues(indexes);
583
+ if (this.indexesChangeSource === 'update') {
584
+ this.indexesChangeSource = void 0;
585
+ }
571
586
  }
572
587
 
573
588
  /**
@@ -717,9 +732,11 @@ export var IndexMapper = /*#__PURE__*/function () {
717
732
  })[finalIndex];
718
733
  destinationPosition = listWithRemovedItems.indexOf(physicalIndex);
719
734
  }
735
+ this.indexesChangeSource = 'move';
720
736
 
721
737
  // Adding indexes without re-indexing.
722
738
  this.setIndexesSequence(getListWithInsertedItems(listWithRemovedItems, destinationPosition, physicalMovedIndexes));
739
+ this.indexesChangeSource = void 0;
723
740
  }
724
741
 
725
742
  /**
@@ -763,7 +780,9 @@ export var IndexMapper = /*#__PURE__*/function () {
763
780
  return nextIndex + stepsFromStart;
764
781
  });
765
782
  this.suspendOperations();
783
+ this.indexesChangeSource = 'insert';
766
784
  this.indexesSequence.insert(insertionIndex, insertedIndexes);
785
+ this.indexesChangeSource = void 0;
767
786
  this.trimmingMapsCollection.insertToEvery(insertionIndex, insertedIndexes);
768
787
  this.hidingMapsCollection.insertToEvery(insertionIndex, insertedIndexes);
769
788
  this.variousMapsCollection.insertToEvery(insertionIndex, insertedIndexes);
@@ -780,7 +799,9 @@ export var IndexMapper = /*#__PURE__*/function () {
780
799
  key: "removeIndexes",
781
800
  value: function removeIndexes(removedIndexes) {
782
801
  this.suspendOperations();
802
+ this.indexesChangeSource = 'remove';
783
803
  this.indexesSequence.remove(removedIndexes);
804
+ this.indexesChangeSource = void 0;
784
805
  this.trimmingMapsCollection.removeFromEvery(removedIndexes);
785
806
  this.hidingMapsCollection.removeFromEvery(removedIndexes);
786
807
  this.variousMapsCollection.removeFromEvery(removedIndexes);
@@ -130,28 +130,25 @@ var TRAVERSAL_STRATEGIES = new Map([[TRAVERSAL_DF_PRE, depthFirstPreOrder], [TRA
130
130
  *
131
131
  */
132
132
  var TreeNode = /*#__PURE__*/function () {
133
- /**
134
- * A tree data.
135
- *
136
- * @type {object}
137
- */
138
-
139
- /**
140
- * A parent node.
141
- *
142
- * @type {TreeNode}
143
- */
144
-
145
- /**
146
- * A tree leaves.
147
- *
148
- * @type {TreeNode[]}
149
- */
150
-
151
133
  function TreeNode(data) {
152
134
  _classCallCheck(this, TreeNode);
135
+ /**
136
+ * A tree data.
137
+ *
138
+ * @type {object}
139
+ */
153
140
  _defineProperty(this, "data", {});
141
+ /**
142
+ * A parent node.
143
+ *
144
+ * @type {TreeNode}
145
+ */
154
146
  _defineProperty(this, "parent", null);
147
+ /**
148
+ * A tree leaves.
149
+ *
150
+ * @type {TreeNode[]}
151
+ */
155
152
  _defineProperty(this, "childs", []);
156
153
  this.data = data;
157
154
  }
@@ -122,28 +122,25 @@ var TRAVERSAL_STRATEGIES = new Map([[TRAVERSAL_DF_PRE, depthFirstPreOrder], [TRA
122
122
  *
123
123
  */
124
124
  var TreeNode = /*#__PURE__*/function () {
125
- /**
126
- * A tree data.
127
- *
128
- * @type {object}
129
- */
130
-
131
- /**
132
- * A parent node.
133
- *
134
- * @type {TreeNode}
135
- */
136
-
137
- /**
138
- * A tree leaves.
139
- *
140
- * @type {TreeNode[]}
141
- */
142
-
143
125
  function TreeNode(data) {
144
126
  _classCallCheck(this, TreeNode);
127
+ /**
128
+ * A tree data.
129
+ *
130
+ * @type {object}
131
+ */
145
132
  _defineProperty(this, "data", {});
133
+ /**
134
+ * A parent node.
135
+ *
136
+ * @type {TreeNode}
137
+ */
146
138
  _defineProperty(this, "parent", null);
139
+ /**
140
+ * A tree leaves.
141
+ *
142
+ * @type {TreeNode[]}
143
+ */
147
144
  _defineProperty(this, "childs", []);
148
145
  this.data = data;
149
146
  }
@@ -21,6 +21,7 @@ require("core-js/modules/es.string.replace.js");
21
21
  require("core-js/modules/es.object.to-string.js");
22
22
  require("core-js/modules/es.array.concat.js");
23
23
  require("core-js/modules/es.array.splice.js");
24
+ require("core-js/modules/es.string.repeat.js");
24
25
  require("core-js/modules/es.string.match.js");
25
26
  require("core-js/modules/es.array.last-index-of.js");
26
27
  require("core-js/modules/es.array.reduce.js");
@@ -139,7 +140,10 @@ function _dataToHTML(input) {
139
140
  }
140
141
  for (var column = 0; column < columnsLen; column += 1) {
141
142
  var cellData = rowData[column];
142
- var parsedCellData = (0, _mixed.isEmpty)(cellData) ? '' : cellData.toString().replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/(<br(\s*|\/)>(\r\n|\n)?|\r\n|\n)/g, '<br>\r\n').replace(/\x20/gi, '&nbsp;').replace(/\t/gi, '&#9;');
143
+ var parsedCellData = (0, _mixed.isEmpty)(cellData) ? '' : cellData.toString().replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/(<br(\s*|\/)>(\r\n|\n)?|\r\n|\n)/g, '<br>\r\n').replace(/\x20{2,}/gi, function (substring) {
144
+ // The way how Excel serializes data with at least two spaces.
145
+ return "<span style=\"mso-spacerun: yes\">".concat('&nbsp;'.repeat(substring.length - 1), " </span>");
146
+ }).replace(/\t/gi, '&#9;');
143
147
  columnsResult.push("<td>".concat(parsedCellData, "</td>"));
144
148
  }
145
149
  result.push.apply(result, ['<tr>'].concat(columnsResult, ['</tr>']));
@@ -14,6 +14,7 @@ import "core-js/modules/es.string.replace.js";
14
14
  import "core-js/modules/es.object.to-string.js";
15
15
  import "core-js/modules/es.array.concat.js";
16
16
  import "core-js/modules/es.array.splice.js";
17
+ import "core-js/modules/es.string.repeat.js";
17
18
  import "core-js/modules/es.string.match.js";
18
19
  import "core-js/modules/es.array.last-index-of.js";
19
20
  import "core-js/modules/es.array.reduce.js";
@@ -133,7 +134,10 @@ export function _dataToHTML(input) {
133
134
  }
134
135
  for (var column = 0; column < columnsLen; column += 1) {
135
136
  var cellData = rowData[column];
136
- var parsedCellData = isEmpty(cellData) ? '' : cellData.toString().replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/(<br(\s*|\/)>(\r\n|\n)?|\r\n|\n)/g, '<br>\r\n').replace(/\x20/gi, '&nbsp;').replace(/\t/gi, '&#9;');
137
+ var parsedCellData = isEmpty(cellData) ? '' : cellData.toString().replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/(<br(\s*|\/)>(\r\n|\n)?|\r\n|\n)/g, '<br>\r\n').replace(/\x20{2,}/gi, function (substring) {
138
+ // The way how Excel serializes data with at least two spaces.
139
+ return "<span style=\"mso-spacerun: yes\">".concat('&nbsp;'.repeat(substring.length - 1), " </span>");
140
+ }).replace(/\t/gi, '&#9;');
137
141
  columnsResult.push("<td>".concat(parsedCellData, "</td>"));
138
142
  }
139
143
  result.push.apply(result, ['<tr>'].concat(columnsResult, ['</tr>']));
@@ -1,18 +0,0 @@
1
- "use strict";
2
-
3
- exports.__esModule = true;
4
- exports.CORNER_DEFAULT_STYLE = void 0;
5
- require("core-js/modules/es.object.freeze.js");
6
- /**
7
- * Default border corner style.
8
- *
9
- * @type {object}
10
- */
11
- var CORNER_DEFAULT_STYLE = Object.freeze({
12
- width: '6px',
13
- height: '6px',
14
- borderWidth: '1px',
15
- borderStyle: 'solid',
16
- borderColor: '#FFF'
17
- });
18
- exports.CORNER_DEFAULT_STYLE = CORNER_DEFAULT_STYLE;
@@ -1,13 +0,0 @@
1
- import "core-js/modules/es.object.freeze.js";
2
- /**
3
- * Default border corner style.
4
- *
5
- * @type {object}
6
- */
7
- export var CORNER_DEFAULT_STYLE = Object.freeze({
8
- width: '6px',
9
- height: '6px',
10
- borderWidth: '1px',
11
- borderStyle: 'solid',
12
- borderColor: '#FFF'
13
- });
@@ -1,63 +0,0 @@
1
- "use strict";
2
-
3
- exports.__esModule = true;
4
- exports.ROW_TYPE = exports.HEADER_TYPE = exports.FOCUS_TYPE = exports.FILL_TYPE = exports.CUSTOM_SELECTION_TYPE = exports.COLUMN_TYPE = exports.AREA_TYPE = exports.ACTIVE_HEADER_TYPE = void 0;
5
- /**
6
- * Selection type that is visible only if the row or column header is clicked. If that happened
7
- * all row or column header layers are highlighted.
8
- *
9
- * @type {string}
10
- */
11
- var ACTIVE_HEADER_TYPE = 'active-header';
12
- /**
13
- * Selection type that is visible only if the a cell or cells are clicked. If that happened
14
- * only the most closest to the cells row or column header is highlighted.
15
- *
16
- * @type {string}
17
- */
18
- exports.ACTIVE_HEADER_TYPE = ACTIVE_HEADER_TYPE;
19
- var HEADER_TYPE = 'header';
20
- /**
21
- * Selection type that is visible when a cell or cells are clicked. The selected cells are
22
- * highlighted.
23
- *
24
- * @type {string}
25
- */
26
- exports.HEADER_TYPE = HEADER_TYPE;
27
- var AREA_TYPE = 'area';
28
- /**
29
- * Selection type defines a cell that follows the user (keyboard navigation).
30
- *
31
- * @type {string}
32
- */
33
- exports.AREA_TYPE = AREA_TYPE;
34
- var FOCUS_TYPE = 'focus';
35
- /**
36
- * Selection type defines borders for the autofill functionality.
37
- *
38
- * @type {string}
39
- */
40
- exports.FOCUS_TYPE = FOCUS_TYPE;
41
- var FILL_TYPE = 'fill';
42
- /**
43
- * Selection type defines highlights for the `currentRowClassName` option.
44
- *
45
- * @type {string}
46
- */
47
- exports.FILL_TYPE = FILL_TYPE;
48
- var ROW_TYPE = 'row';
49
- /**
50
- * Selection type defines highlights for the `currentColumnClassName` option.
51
- *
52
- * @type {string}
53
- */
54
- exports.ROW_TYPE = ROW_TYPE;
55
- var COLUMN_TYPE = 'column';
56
- /**
57
- * Selection type defines highlights managed by the CustomBorders plugin.
58
- *
59
- * @type {string}
60
- */
61
- exports.COLUMN_TYPE = COLUMN_TYPE;
62
- var CUSTOM_SELECTION_TYPE = 'custom-selection';
63
- exports.CUSTOM_SELECTION_TYPE = CUSTOM_SELECTION_TYPE;
@@ -1,51 +0,0 @@
1
- /**
2
- * Selection type that is visible only if the row or column header is clicked. If that happened
3
- * all row or column header layers are highlighted.
4
- *
5
- * @type {string}
6
- */
7
- export var ACTIVE_HEADER_TYPE = 'active-header';
8
- /**
9
- * Selection type that is visible only if the a cell or cells are clicked. If that happened
10
- * only the most closest to the cells row or column header is highlighted.
11
- *
12
- * @type {string}
13
- */
14
- export var HEADER_TYPE = 'header';
15
- /**
16
- * Selection type that is visible when a cell or cells are clicked. The selected cells are
17
- * highlighted.
18
- *
19
- * @type {string}
20
- */
21
- export var AREA_TYPE = 'area';
22
- /**
23
- * Selection type defines a cell that follows the user (keyboard navigation).
24
- *
25
- * @type {string}
26
- */
27
- export var FOCUS_TYPE = 'focus';
28
- /**
29
- * Selection type defines borders for the autofill functionality.
30
- *
31
- * @type {string}
32
- */
33
- export var FILL_TYPE = 'fill';
34
- /**
35
- * Selection type defines highlights for the `currentRowClassName` option.
36
- *
37
- * @type {string}
38
- */
39
- export var ROW_TYPE = 'row';
40
- /**
41
- * Selection type defines highlights for the `currentColumnClassName` option.
42
- *
43
- * @type {string}
44
- */
45
- export var COLUMN_TYPE = 'column';
46
- /**
47
- * Selection type defines highlights managed by the CustomBorders plugin.
48
- *
49
- * @type {string}
50
- */
51
- export var CUSTOM_SELECTION_TYPE = 'custom-selection';