handsontable 0.0.0-next-b66c79f-20230713 → 0.0.0-next-85c3085-20230713

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 (133) hide show
  1. package/3rdparty/walkontable/src/cell/coords.js +37 -22
  2. package/3rdparty/walkontable/src/cell/coords.mjs +37 -22
  3. package/3rdparty/walkontable/src/cell/range.js +54 -39
  4. package/3rdparty/walkontable/src/cell/range.mjs +54 -39
  5. package/3rdparty/walkontable/src/core/_base.js +33 -31
  6. package/3rdparty/walkontable/src/core/_base.mjs +33 -31
  7. package/3rdparty/walkontable/src/core/clone.js +6 -3
  8. package/3rdparty/walkontable/src/core/clone.mjs +6 -3
  9. package/3rdparty/walkontable/src/event.js +2 -1
  10. package/3rdparty/walkontable/src/event.mjs +2 -1
  11. package/3rdparty/walkontable/src/overlay/_base.js +10 -8
  12. package/3rdparty/walkontable/src/overlay/_base.mjs +10 -8
  13. package/3rdparty/walkontable/src/overlay/bottom.js +10 -8
  14. package/3rdparty/walkontable/src/overlay/bottom.mjs +10 -8
  15. package/3rdparty/walkontable/src/overlay/inlineStart.js +1 -1
  16. package/3rdparty/walkontable/src/overlay/inlineStart.mjs +1 -1
  17. package/3rdparty/walkontable/src/overlay/top.js +11 -9
  18. package/3rdparty/walkontable/src/overlay/top.mjs +11 -9
  19. package/3rdparty/walkontable/src/overlay/topInlineStartCorner.js +16 -13
  20. package/3rdparty/walkontable/src/overlay/topInlineStartCorner.mjs +16 -13
  21. package/3rdparty/walkontable/src/overlays.js +75 -80
  22. package/3rdparty/walkontable/src/overlays.mjs +75 -80
  23. package/3rdparty/walkontable/src/scroll.js +27 -24
  24. package/3rdparty/walkontable/src/scroll.mjs +27 -24
  25. package/3rdparty/walkontable/src/settings.js +18 -17
  26. package/3rdparty/walkontable/src/settings.mjs +18 -17
  27. package/3rdparty/walkontable/src/table.js +42 -37
  28. package/3rdparty/walkontable/src/table.mjs +42 -37
  29. package/base.js +2 -2
  30. package/base.mjs +2 -2
  31. package/core.js +8 -8
  32. package/core.mjs +8 -8
  33. package/dataMap/metaManager/metaLayers/cellMeta.js +2 -1
  34. package/dataMap/metaManager/metaLayers/cellMeta.mjs +2 -1
  35. package/dataMap/metaManager/metaLayers/globalMeta.js +1 -1
  36. package/dataMap/metaManager/metaLayers/globalMeta.mjs +1 -1
  37. package/dataMap/metaManager/mods/dynamicCellMeta.js +3 -2
  38. package/dataMap/metaManager/mods/dynamicCellMeta.mjs +3 -2
  39. package/dataMap/metaManager/utils.js +4 -2
  40. package/dataMap/metaManager/utils.mjs +4 -2
  41. package/dist/handsontable.css +2 -2
  42. package/dist/handsontable.full.css +2 -2
  43. package/dist/handsontable.full.js +3247 -2847
  44. package/dist/handsontable.full.min.css +2 -2
  45. package/dist/handsontable.full.min.js +17 -17
  46. package/dist/handsontable.js +3249 -2849
  47. package/dist/handsontable.min.css +2 -2
  48. package/dist/handsontable.min.js +17 -17
  49. package/editors/autocompleteEditor/autocompleteEditor.js +70 -67
  50. package/editors/autocompleteEditor/autocompleteEditor.mjs +70 -67
  51. package/editors/baseEditor/baseEditor.js +1 -1
  52. package/editors/baseEditor/baseEditor.mjs +1 -1
  53. package/editors/dateEditor/dateEditor.js +2 -1
  54. package/editors/dateEditor/dateEditor.mjs +2 -1
  55. package/helpers/mixed.js +1 -1
  56. package/helpers/mixed.mjs +1 -1
  57. package/helpers/object.js +1 -0
  58. package/helpers/object.mjs +1 -0
  59. package/index.js +5 -5
  60. package/index.mjs +5 -5
  61. package/package.json +1 -1
  62. package/plugins/autoColumnSize/autoColumnSize.js +4 -1
  63. package/plugins/autoColumnSize/autoColumnSize.mjs +4 -1
  64. package/plugins/collapsibleColumns/collapsibleColumns.js +54 -38
  65. package/plugins/collapsibleColumns/collapsibleColumns.mjs +54 -38
  66. package/plugins/columnSorting/columnSorting.js +2 -1
  67. package/plugins/columnSorting/columnSorting.mjs +2 -1
  68. package/plugins/columnSorting/columnStatesManager.js +2 -1
  69. package/plugins/columnSorting/columnStatesManager.mjs +2 -1
  70. package/plugins/comments/comments.js +2 -2
  71. package/plugins/comments/comments.mjs +2 -2
  72. package/plugins/copyPaste/copyPaste.js +6 -4
  73. package/plugins/copyPaste/copyPaste.mjs +6 -4
  74. package/plugins/customBorders/customBorders.js +13 -9
  75. package/plugins/customBorders/customBorders.mjs +13 -9
  76. package/plugins/customBorders/utils.js +3 -3
  77. package/plugins/customBorders/utils.mjs +3 -3
  78. package/plugins/filters/conditionCollection.js +6 -5
  79. package/plugins/filters/conditionCollection.mjs +6 -5
  80. package/plugins/filters/filters.js +13 -7
  81. package/plugins/filters/filters.mjs +13 -7
  82. package/plugins/formulas/engine/register.js +3 -3
  83. package/plugins/formulas/engine/register.mjs +3 -3
  84. package/plugins/formulas/engine/settings.js +6 -3
  85. package/plugins/formulas/engine/settings.mjs +6 -3
  86. package/plugins/formulas/formulas.js +151 -143
  87. package/plugins/formulas/formulas.mjs +151 -143
  88. package/plugins/formulas/indexSyncer/axisSyncer.js +115 -79
  89. package/plugins/formulas/indexSyncer/axisSyncer.mjs +115 -79
  90. package/plugins/formulas/indexSyncer/index.js +100 -64
  91. package/plugins/formulas/indexSyncer/index.mjs +100 -64
  92. package/plugins/hiddenColumns/contextMenuItem/showColumn.js +2 -2
  93. package/plugins/hiddenColumns/contextMenuItem/showColumn.mjs +2 -2
  94. package/plugins/hiddenColumns/hiddenColumns.js +51 -34
  95. package/plugins/hiddenColumns/hiddenColumns.mjs +51 -34
  96. package/plugins/hiddenRows/contextMenuItem/showRow.js +2 -2
  97. package/plugins/hiddenRows/contextMenuItem/showRow.mjs +2 -2
  98. package/plugins/hiddenRows/hiddenRows.js +50 -33
  99. package/plugins/hiddenRows/hiddenRows.mjs +50 -33
  100. package/plugins/manualRowResize/manualRowResize.js +2 -1
  101. package/plugins/manualRowResize/manualRowResize.mjs +2 -1
  102. package/plugins/mergeCells/mergeCells.js +1 -1
  103. package/plugins/mergeCells/mergeCells.mjs +1 -1
  104. package/plugins/nestedHeaders/nestedHeaders.js +88 -67
  105. package/plugins/nestedHeaders/nestedHeaders.mjs +87 -66
  106. package/plugins/nestedHeaders/stateManager/headersTree.js +58 -38
  107. package/plugins/nestedHeaders/stateManager/headersTree.mjs +58 -38
  108. package/plugins/nestedHeaders/stateManager/index.js +70 -49
  109. package/plugins/nestedHeaders/stateManager/index.mjs +68 -47
  110. package/plugins/nestedHeaders/stateManager/nodeModifiers/collapse.js +1 -1
  111. package/plugins/nestedHeaders/stateManager/nodeModifiers/collapse.mjs +1 -1
  112. package/plugins/nestedHeaders/stateManager/sourceSettings.js +57 -37
  113. package/plugins/nestedHeaders/stateManager/sourceSettings.mjs +57 -37
  114. package/plugins/nestedHeaders/utils/ghostTable.js +39 -35
  115. package/plugins/nestedHeaders/utils/ghostTable.mjs +39 -35
  116. package/plugins/nestedRows/data/dataManager.js +4 -2
  117. package/plugins/nestedRows/data/dataManager.mjs +4 -2
  118. package/plugins/persistentState/storage.js +1 -0
  119. package/plugins/persistentState/storage.mjs +1 -0
  120. package/plugins/undoRedo/undoRedo.js +2 -1
  121. package/plugins/undoRedo/undoRedo.mjs +2 -1
  122. package/selection/highlight/visualSelection.js +10 -6
  123. package/selection/highlight/visualSelection.mjs +10 -6
  124. package/tableView.js +98 -80
  125. package/tableView.mjs +98 -80
  126. package/translations/changesObservable/observable.js +82 -54
  127. package/translations/changesObservable/observable.mjs +82 -54
  128. package/translations/changesObservable/observer.js +24 -11
  129. package/translations/changesObservable/observer.mjs +24 -11
  130. package/translations/maps/linkedPhysicalIndexToValueMap.js +14 -8
  131. package/translations/maps/linkedPhysicalIndexToValueMap.mjs +14 -8
  132. package/utils/dataStructures/tree.js +21 -18
  133. package/utils/dataStructures/tree.mjs +21 -18
@@ -1,3 +1,11 @@
1
+ import "core-js/modules/es.error.cause.js";
2
+ function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
3
+ function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
4
+ function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
5
+ function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
6
+ function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }
7
+ function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
8
+ 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; } }
1
9
  import { ChangesObserver } from "./observer.mjs";
2
10
  import { arrayDiff } from "./utils.mjs";
3
11
  /**
@@ -8,53 +16,73 @@ import { arrayDiff } from "./utils.mjs";
8
16
  * @private
9
17
  * @class ChangesObservable
10
18
  */
19
+ var _observers = /*#__PURE__*/new WeakMap();
20
+ var _indexMatrix = /*#__PURE__*/new WeakMap();
21
+ var _currentIndexState = /*#__PURE__*/new WeakMap();
22
+ var _isMatrixIndexesInitialized = /*#__PURE__*/new WeakMap();
23
+ var _initialIndexValue = /*#__PURE__*/new WeakMap();
11
24
  export class ChangesObservable {
12
- /**
13
- * The list of registered ChangesObserver instances.
14
- *
15
- * @type {ChangesObserver[]}
16
- */
17
- #observers = new Set();
18
- /**
19
- * An array with default values that act as a base array that will be compared with
20
- * the last saved index state. The changes are generated and immediately send through
21
- * the newly created ChangesObserver object. Thanks to that, the observer initially has
22
- * all information about what indexes are currently changed.
23
- *
24
- * @type {Array}
25
- */
26
- #indexMatrix = [];
27
- /**
28
- * An array that holds the indexes state that is currently valid. The value is changed on every
29
- * index mapper cache update.
30
- *
31
- * @type {Array}
32
- */
33
- #currentIndexState = [];
34
- /**
35
- * The flag determines if the observable is initialized or not. Not initialized object creates
36
- * index matrix once while emitting new changes.
37
- *
38
- * @type {boolean}
39
- */
40
- #isMatrixIndexesInitialized = false;
41
- /**
42
- * The initial index value allows control from what value the index matrix array will be created.
43
- * Changing that value changes how the array diff generates the changes for the initial data
44
- * sent to the subscribers. For example, the changes can be triggered by detecting the changes
45
- * from `false` to `true` value or vice versa. Generally, it depends on which index map type
46
- * the Observable will work with. For "hiding" or "trimming" index types, it will be boolean
47
- * values. For various index maps, it can be anything, but I suspect that the most appropriate
48
- * initial value will be "undefined" in that case.
49
- *
50
- * @type {boolean}
51
- */
52
- #initialIndexValue = false;
53
25
  constructor() {
54
26
  let {
55
27
  initialIndexValue
56
28
  } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
57
- this.#initialIndexValue = initialIndexValue != null ? initialIndexValue : false;
29
+ /**
30
+ * The list of registered ChangesObserver instances.
31
+ *
32
+ * @type {ChangesObserver[]}
33
+ */
34
+ _classPrivateFieldInitSpec(this, _observers, {
35
+ writable: true,
36
+ value: new Set()
37
+ });
38
+ /**
39
+ * An array with default values that act as a base array that will be compared with
40
+ * the last saved index state. The changes are generated and immediately send through
41
+ * the newly created ChangesObserver object. Thanks to that, the observer initially has
42
+ * all information about what indexes are currently changed.
43
+ *
44
+ * @type {Array}
45
+ */
46
+ _classPrivateFieldInitSpec(this, _indexMatrix, {
47
+ writable: true,
48
+ value: []
49
+ });
50
+ /**
51
+ * An array that holds the indexes state that is currently valid. The value is changed on every
52
+ * index mapper cache update.
53
+ *
54
+ * @type {Array}
55
+ */
56
+ _classPrivateFieldInitSpec(this, _currentIndexState, {
57
+ writable: true,
58
+ value: []
59
+ });
60
+ /**
61
+ * The flag determines if the observable is initialized or not. Not initialized object creates
62
+ * index matrix once while emitting new changes.
63
+ *
64
+ * @type {boolean}
65
+ */
66
+ _classPrivateFieldInitSpec(this, _isMatrixIndexesInitialized, {
67
+ writable: true,
68
+ value: false
69
+ });
70
+ /**
71
+ * The initial index value allows control from what value the index matrix array will be created.
72
+ * Changing that value changes how the array diff generates the changes for the initial data
73
+ * sent to the subscribers. For example, the changes can be triggered by detecting the changes
74
+ * from `false` to `true` value or vice versa. Generally, it depends on which index map type
75
+ * the Observable will work with. For "hiding" or "trimming" index types, it will be boolean
76
+ * values. For various index maps, it can be anything, but I suspect that the most appropriate
77
+ * initial value will be "undefined" in that case.
78
+ *
79
+ * @type {boolean}
80
+ */
81
+ _classPrivateFieldInitSpec(this, _initialIndexValue, {
82
+ writable: true,
83
+ value: false
84
+ });
85
+ _classPrivateFieldSet(this, _initialIndexValue, initialIndexValue !== null && initialIndexValue !== void 0 ? initialIndexValue : false);
58
86
  }
59
87
 
60
88
  /* eslint-disable jsdoc/require-description-complete-sentence */
@@ -83,11 +111,11 @@ export class ChangesObservable {
83
111
  /* eslint-enable jsdoc/require-description-complete-sentence */
84
112
  createObserver() {
85
113
  const observer = new ChangesObserver();
86
- this.#observers.add(observer);
114
+ _classPrivateFieldGet(this, _observers).add(observer);
87
115
  observer.addLocalHook('unsubscribe', () => {
88
- this.#observers.delete(observer);
116
+ _classPrivateFieldGet(this, _observers).delete(observer);
89
117
  });
90
- observer._writeInitialChanges(arrayDiff(this.#indexMatrix, this.#currentIndexState));
118
+ observer._writeInitialChanges(arrayDiff(_classPrivateFieldGet(this, _indexMatrix), _classPrivateFieldGet(this, _currentIndexState)));
91
119
  return observer;
92
120
  }
93
121
 
@@ -99,20 +127,20 @@ export class ChangesObservable {
99
127
  * @param {Array} indexesState An array with index map state.
100
128
  */
101
129
  emit(indexesState) {
102
- let currentIndexState = this.#currentIndexState;
103
- if (!this.#isMatrixIndexesInitialized || this.#indexMatrix.length !== indexesState.length) {
130
+ let currentIndexState = _classPrivateFieldGet(this, _currentIndexState);
131
+ if (!_classPrivateFieldGet(this, _isMatrixIndexesInitialized) || _classPrivateFieldGet(this, _indexMatrix).length !== indexesState.length) {
104
132
  if (indexesState.length === 0) {
105
- indexesState = new Array(currentIndexState.length).fill(this.#initialIndexValue);
133
+ indexesState = new Array(currentIndexState.length).fill(_classPrivateFieldGet(this, _initialIndexValue));
106
134
  } else {
107
- this.#indexMatrix = new Array(indexesState.length).fill(this.#initialIndexValue);
135
+ _classPrivateFieldSet(this, _indexMatrix, new Array(indexesState.length).fill(_classPrivateFieldGet(this, _initialIndexValue)));
108
136
  }
109
- if (!this.#isMatrixIndexesInitialized) {
110
- this.#isMatrixIndexesInitialized = true;
111
- currentIndexState = this.#indexMatrix;
137
+ if (!_classPrivateFieldGet(this, _isMatrixIndexesInitialized)) {
138
+ _classPrivateFieldSet(this, _isMatrixIndexesInitialized, true);
139
+ currentIndexState = _classPrivateFieldGet(this, _indexMatrix);
112
140
  }
113
141
  }
114
142
  const changes = arrayDiff(currentIndexState, indexesState);
115
- this.#observers.forEach(observer => observer._write(changes));
116
- this.#currentIndexState = indexesState;
143
+ _classPrivateFieldGet(this, _observers).forEach(observer => observer._write(changes));
144
+ _classPrivateFieldSet(this, _currentIndexState, indexesState);
117
145
  }
118
146
  }
@@ -1,25 +1,38 @@
1
1
  "use strict";
2
2
 
3
+ require("core-js/modules/es.error.cause.js");
3
4
  exports.__esModule = true;
4
5
  var _object = require("../../helpers/object");
5
6
  var _localHooks = _interopRequireDefault(require("../../mixins/localHooks"));
6
7
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
8
+ function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
9
+ function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
10
+ function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }
11
+ 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; } }
12
+ function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
13
+ function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
14
+ function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
7
15
  /**
8
16
  * The ChangesObserver module is an object that represents a disposable resource
9
17
  * provided by the ChangesObservable module.
10
18
  *
11
19
  * @class ChangesObserver
12
20
  */
21
+ var _currentInitialChanges = /*#__PURE__*/new WeakMap();
13
22
  class ChangesObserver {
14
- /**
15
- * The field holds initial changes that will be used to notify the callbacks added using
16
- * subscribe method. Regardless of the moment of listening for changes, the subscriber
17
- * will be notified once with all changes made before subscribing.
18
- *
19
- * @type {Array}
20
- */
21
- #currentInitialChanges = [];
22
-
23
+ constructor() {
24
+ /**
25
+ * The field holds initial changes that will be used to notify the callbacks added using
26
+ * subscribe method. Regardless of the moment of listening for changes, the subscriber
27
+ * will be notified once with all changes made before subscribing.
28
+ *
29
+ * @type {Array}
30
+ */
31
+ _classPrivateFieldInitSpec(this, _currentInitialChanges, {
32
+ writable: true,
33
+ value: []
34
+ });
35
+ }
23
36
  /**
24
37
  * Subscribes to the observer.
25
38
  *
@@ -28,7 +41,7 @@ class ChangesObserver {
28
41
  */
29
42
  subscribe(callback) {
30
43
  this.addLocalHook('change', callback);
31
- this._write(this.#currentInitialChanges);
44
+ this._write(_classPrivateFieldGet(this, _currentInitialChanges));
32
45
  return this;
33
46
  }
34
47
 
@@ -67,7 +80,7 @@ class ChangesObserver {
67
80
  * @param {object} initialChanges The chunk of changes produced by the ChangesObservable module.
68
81
  */
69
82
  _writeInitialChanges(initialChanges) {
70
- this.#currentInitialChanges = initialChanges;
83
+ _classPrivateFieldSet(this, _currentInitialChanges, initialChanges);
71
84
  }
72
85
  }
73
86
  exports.ChangesObserver = ChangesObserver;
@@ -1,3 +1,11 @@
1
+ import "core-js/modules/es.error.cause.js";
2
+ function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
3
+ function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
4
+ function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }
5
+ 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; } }
6
+ function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
7
+ function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
8
+ function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
1
9
  import { mixin } from "../../helpers/object.mjs";
2
10
  import localHooks from "../../mixins/localHooks.mjs";
3
11
  /**
@@ -6,16 +14,21 @@ import localHooks from "../../mixins/localHooks.mjs";
6
14
  *
7
15
  * @class ChangesObserver
8
16
  */
17
+ var _currentInitialChanges = /*#__PURE__*/new WeakMap();
9
18
  export class ChangesObserver {
10
- /**
11
- * The field holds initial changes that will be used to notify the callbacks added using
12
- * subscribe method. Regardless of the moment of listening for changes, the subscriber
13
- * will be notified once with all changes made before subscribing.
14
- *
15
- * @type {Array}
16
- */
17
- #currentInitialChanges = [];
18
-
19
+ constructor() {
20
+ /**
21
+ * The field holds initial changes that will be used to notify the callbacks added using
22
+ * subscribe method. Regardless of the moment of listening for changes, the subscriber
23
+ * will be notified once with all changes made before subscribing.
24
+ *
25
+ * @type {Array}
26
+ */
27
+ _classPrivateFieldInitSpec(this, _currentInitialChanges, {
28
+ writable: true,
29
+ value: []
30
+ });
31
+ }
19
32
  /**
20
33
  * Subscribes to the observer.
21
34
  *
@@ -24,7 +37,7 @@ export class ChangesObserver {
24
37
  */
25
38
  subscribe(callback) {
26
39
  this.addLocalHook('change', callback);
27
- this._write(this.#currentInitialChanges);
40
+ this._write(_classPrivateFieldGet(this, _currentInitialChanges));
28
41
  return this;
29
42
  }
30
43
 
@@ -63,7 +76,7 @@ export class ChangesObserver {
63
76
  * @param {object} initialChanges The chunk of changes produced by the ChangesObservable module.
64
77
  */
65
78
  _writeInitialChanges(initialChanges) {
66
- this.#currentInitialChanges = initialChanges;
79
+ _classPrivateFieldSet(this, _currentInitialChanges, initialChanges);
67
80
  }
68
81
  }
69
82
  mixin(ChangesObserver, localHooks);
@@ -1,11 +1,15 @@
1
1
  "use strict";
2
2
 
3
3
  exports.__esModule = true;
4
+ require("core-js/modules/es.error.cause.js");
4
5
  var _indexMap = require("./indexMap");
5
6
  var _physicallyIndexed = require("./utils/physicallyIndexed");
6
7
  var _indexesSequence = require("./utils/indexesSequence");
7
8
  var _actionsOnIndexes = require("./utils/actionsOnIndexes");
8
9
  var _function = require("../../helpers/function");
10
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
11
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
12
+ function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
9
13
  /**
10
14
  * Map for storing mappings from an physical index to a value. Those entries are linked and stored in a certain order.
11
15
  *
@@ -15,14 +19,16 @@ var _function = require("../../helpers/function");
15
19
  * @class LinkedPhysicalIndexToValueMap
16
20
  */
17
21
  class LinkedPhysicalIndexToValueMap extends _indexMap.IndexMap {
18
- /**
19
- * Indexes and values corresponding to them (entries) are stored in a certain order.
20
- *
21
- * @private
22
- * @type {Array<number>}
23
- */
24
- orderOfIndexes = [];
25
-
22
+ constructor() {
23
+ super(...arguments);
24
+ /**
25
+ * Indexes and values corresponding to them (entries) are stored in a certain order.
26
+ *
27
+ * @private
28
+ * @type {Array<number>}
29
+ */
30
+ _defineProperty(this, "orderOfIndexes", []);
31
+ }
26
32
  /**
27
33
  * Get full list of ordered values for particular indexes.
28
34
  *
@@ -1,3 +1,7 @@
1
+ import "core-js/modules/es.error.cause.js";
2
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
3
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
4
+ function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
1
5
  import { IndexMap } from "./indexMap.mjs";
2
6
  import { getListWithRemovedItems, getListWithInsertedItems } from "./utils/physicallyIndexed.mjs";
3
7
  import { getListWithRemovedItems as getListWithoutIndexes } from "./utils/indexesSequence.mjs";
@@ -12,14 +16,16 @@ import { isFunction } from "../../helpers/function.mjs";
12
16
  * @class LinkedPhysicalIndexToValueMap
13
17
  */
14
18
  export class LinkedPhysicalIndexToValueMap extends IndexMap {
15
- /**
16
- * Indexes and values corresponding to them (entries) are stored in a certain order.
17
- *
18
- * @private
19
- * @type {Array<number>}
20
- */
21
- orderOfIndexes = [];
22
-
19
+ constructor() {
20
+ super(...arguments);
21
+ /**
22
+ * Indexes and values corresponding to them (entries) are stored in a certain order.
23
+ *
24
+ * @private
25
+ * @type {Array<number>}
26
+ */
27
+ _defineProperty(this, "orderOfIndexes", []);
28
+ }
23
29
  /**
24
30
  * Get full list of ordered values for particular indexes.
25
31
  *
@@ -4,6 +4,9 @@ exports.__esModule = true;
4
4
  exports.depthFirstPreOrder = depthFirstPreOrder;
5
5
  require("core-js/modules/es.array.push.js");
6
6
  require("core-js/modules/es.error.cause.js");
7
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
8
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
9
+ function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
7
10
  /**
8
11
  * Depth-first pre-order strategy (https://en.wikipedia.org/wiki/Tree_traversal#Pre-order_(NLR)).
9
12
  *
@@ -96,25 +99,25 @@ const TRAVERSAL_STRATEGIES = new Map([[TRAVERSAL_DF_PRE, depthFirstPreOrder], [T
96
99
  *
97
100
  */
98
101
  class TreeNode {
99
- /**
100
- * A tree data.
101
- *
102
- * @type {object}
103
- */
104
- data = {};
105
- /**
106
- * A parent node.
107
- *
108
- * @type {TreeNode}
109
- */
110
- parent = null;
111
- /**
112
- * A tree leaves.
113
- *
114
- * @type {TreeNode[]}
115
- */
116
- childs = [];
117
102
  constructor(data) {
103
+ /**
104
+ * A tree data.
105
+ *
106
+ * @type {object}
107
+ */
108
+ _defineProperty(this, "data", {});
109
+ /**
110
+ * A parent node.
111
+ *
112
+ * @type {TreeNode}
113
+ */
114
+ _defineProperty(this, "parent", null);
115
+ /**
116
+ * A tree leaves.
117
+ *
118
+ * @type {TreeNode[]}
119
+ */
120
+ _defineProperty(this, "childs", []);
118
121
  this.data = data;
119
122
  }
120
123
 
@@ -1,3 +1,6 @@
1
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
3
+ function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
1
4
  import "core-js/modules/es.array.push.js";
2
5
  import "core-js/modules/es.error.cause.js";
3
6
  /**
@@ -89,25 +92,25 @@ const TRAVERSAL_STRATEGIES = new Map([[TRAVERSAL_DF_PRE, depthFirstPreOrder], [T
89
92
  *
90
93
  */
91
94
  export default class TreeNode {
92
- /**
93
- * A tree data.
94
- *
95
- * @type {object}
96
- */
97
- data = {};
98
- /**
99
- * A parent node.
100
- *
101
- * @type {TreeNode}
102
- */
103
- parent = null;
104
- /**
105
- * A tree leaves.
106
- *
107
- * @type {TreeNode[]}
108
- */
109
- childs = [];
110
95
  constructor(data) {
96
+ /**
97
+ * A tree data.
98
+ *
99
+ * @type {object}
100
+ */
101
+ _defineProperty(this, "data", {});
102
+ /**
103
+ * A parent node.
104
+ *
105
+ * @type {TreeNode}
106
+ */
107
+ _defineProperty(this, "parent", null);
108
+ /**
109
+ * A tree leaves.
110
+ *
111
+ * @type {TreeNode[]}
112
+ */
113
+ _defineProperty(this, "childs", []);
111
114
  this.data = data;
112
115
  }
113
116