handsontable 0.0.0-next-7026906-20231107 → 0.0.0-next-7b93b7d-20231107

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 (316) hide show
  1. package/3rdparty/SheetClip/SheetClip.js +2 -2
  2. package/3rdparty/SheetClip/SheetClip.mjs +2 -2
  3. package/3rdparty/autoResize/autoResize.js +2 -2
  4. package/3rdparty/autoResize/autoResize.mjs +2 -2
  5. package/3rdparty/walkontable/src/calculator/viewportColumns.js +108 -85
  6. package/3rdparty/walkontable/src/calculator/viewportColumns.mjs +108 -85
  7. package/3rdparty/walkontable/src/calculator/viewportRows.js +60 -52
  8. package/3rdparty/walkontable/src/calculator/viewportRows.mjs +60 -52
  9. package/3rdparty/walkontable/src/core/clone.js +6 -0
  10. package/3rdparty/walkontable/src/core/clone.mjs +6 -0
  11. package/3rdparty/walkontable/src/event.js +125 -74
  12. package/3rdparty/walkontable/src/event.mjs +125 -74
  13. package/3rdparty/walkontable/src/filter/column.js +16 -0
  14. package/3rdparty/walkontable/src/filter/column.mjs +16 -0
  15. package/3rdparty/walkontable/src/filter/row.js +16 -0
  16. package/3rdparty/walkontable/src/filter/row.mjs +16 -0
  17. package/3rdparty/walkontable/src/overlay/bottom.js +1 -1
  18. package/3rdparty/walkontable/src/overlay/bottom.mjs +1 -1
  19. package/3rdparty/walkontable/src/overlay/top.js +1 -1
  20. package/3rdparty/walkontable/src/overlay/top.mjs +1 -1
  21. package/3rdparty/walkontable/src/renderer/_base.js +12 -5
  22. package/3rdparty/walkontable/src/renderer/_base.mjs +12 -5
  23. package/3rdparty/walkontable/src/renderer/cells.js +6 -2
  24. package/3rdparty/walkontable/src/renderer/cells.mjs +6 -2
  25. package/3rdparty/walkontable/src/renderer/rowHeaders.js +6 -2
  26. package/3rdparty/walkontable/src/renderer/rowHeaders.mjs +6 -2
  27. package/3rdparty/walkontable/src/renderer/rows.js +5 -0
  28. package/3rdparty/walkontable/src/renderer/rows.mjs +5 -0
  29. package/3rdparty/walkontable/src/renderer/table.js +24 -17
  30. package/3rdparty/walkontable/src/renderer/table.mjs +24 -17
  31. package/3rdparty/walkontable/src/scroll.js +2 -2
  32. package/3rdparty/walkontable/src/scroll.mjs +2 -2
  33. package/3rdparty/walkontable/src/selection/border/border.js +1 -1
  34. package/3rdparty/walkontable/src/selection/border/border.mjs +1 -1
  35. package/3rdparty/walkontable/src/settings.js +10 -10
  36. package/3rdparty/walkontable/src/settings.mjs +10 -10
  37. package/3rdparty/walkontable/src/table.js +3 -3
  38. package/3rdparty/walkontable/src/table.mjs +3 -3
  39. package/3rdparty/walkontable/src/utils/column.js +19 -4
  40. package/3rdparty/walkontable/src/utils/column.mjs +19 -4
  41. package/3rdparty/walkontable/src/utils/nodesPool.js +5 -0
  42. package/3rdparty/walkontable/src/utils/nodesPool.mjs +5 -0
  43. package/3rdparty/walkontable/src/utils/orderView/view.js +13 -6
  44. package/3rdparty/walkontable/src/utils/orderView/view.mjs +13 -6
  45. package/3rdparty/walkontable/src/utils/orderView/viewSize.js +9 -6
  46. package/3rdparty/walkontable/src/utils/orderView/viewSize.mjs +9 -6
  47. package/3rdparty/walkontable/src/utils/orderView/viewSizeSet.js +7 -4
  48. package/3rdparty/walkontable/src/utils/orderView/viewSizeSet.mjs +7 -4
  49. package/3rdparty/walkontable/src/utils/row.js +14 -2
  50. package/3rdparty/walkontable/src/utils/row.mjs +14 -2
  51. package/3rdparty/walkontable/src/viewport.js +9 -9
  52. package/3rdparty/walkontable/src/viewport.mjs +9 -9
  53. package/base.js +2 -2
  54. package/base.mjs +2 -2
  55. package/core.js +25 -25
  56. package/core.mjs +25 -25
  57. package/dataMap/dataMap.js +99 -90
  58. package/dataMap/dataMap.mjs +99 -90
  59. package/dataMap/dataSource.js +14 -8
  60. package/dataMap/dataSource.mjs +14 -8
  61. package/dataMap/metaManager/lazyFactoryMap.js +19 -7
  62. package/dataMap/metaManager/lazyFactoryMap.mjs +19 -7
  63. package/dataMap/metaManager/metaLayers/cellMeta.js +8 -3
  64. package/dataMap/metaManager/metaLayers/cellMeta.mjs +8 -3
  65. package/dataMap/metaManager/metaLayers/columnMeta.js +7 -1
  66. package/dataMap/metaManager/metaLayers/columnMeta.mjs +7 -1
  67. package/dataMap/metaManager/metaLayers/globalMeta.js +6 -1
  68. package/dataMap/metaManager/metaLayers/globalMeta.mjs +6 -1
  69. package/dataMap/metaManager/metaLayers/tableMeta.js +6 -2
  70. package/dataMap/metaManager/metaLayers/tableMeta.mjs +6 -2
  71. package/dataMap/metaManager/metaSchema.js +55 -55
  72. package/dataMap/metaManager/metaSchema.mjs +55 -55
  73. package/dataMap/metaManager/mods/dynamicCellMeta.js +7 -2
  74. package/dataMap/metaManager/mods/dynamicCellMeta.mjs +7 -2
  75. package/dataMap/metaManager/mods/extendMetaProperties.js +8 -4
  76. package/dataMap/metaManager/mods/extendMetaProperties.mjs +8 -4
  77. package/dataMap/metaManager/utils.js +2 -2
  78. package/dataMap/metaManager/utils.mjs +2 -2
  79. package/dist/handsontable.css +2 -2
  80. package/dist/handsontable.full.css +2 -2
  81. package/dist/handsontable.full.js +7244 -6347
  82. package/dist/handsontable.full.min.css +2 -2
  83. package/dist/handsontable.full.min.js +120 -120
  84. package/dist/handsontable.js +7243 -6346
  85. package/dist/handsontable.min.css +2 -2
  86. package/dist/handsontable.min.js +28 -28
  87. package/editorManager.js +105 -95
  88. package/editorManager.mjs +105 -95
  89. package/editors/autocompleteEditor/autocompleteEditor.js +47 -46
  90. package/editors/autocompleteEditor/autocompleteEditor.mjs +46 -45
  91. package/editors/baseEditor/baseEditor.js +23 -26
  92. package/editors/baseEditor/baseEditor.mjs +23 -26
  93. package/editors/dateEditor/dateEditor.js +24 -15
  94. package/editors/dateEditor/dateEditor.mjs +24 -15
  95. package/editors/dropdownEditor/dropdownEditor.js +1 -1
  96. package/editors/dropdownEditor/dropdownEditor.mjs +1 -1
  97. package/editors/handsontableEditor/handsontableEditor.js +4 -4
  98. package/editors/handsontableEditor/handsontableEditor.mjs +4 -4
  99. package/editors/textEditor/textEditor.js +23 -17
  100. package/editors/textEditor/textEditor.mjs +24 -18
  101. package/eventManager.js +8 -0
  102. package/eventManager.mjs +8 -0
  103. package/helpers/array.js +2 -2
  104. package/helpers/array.mjs +2 -2
  105. package/helpers/dom/element.js +7 -7
  106. package/helpers/dom/element.mjs +7 -7
  107. package/helpers/function.js +1 -1
  108. package/helpers/function.mjs +1 -1
  109. package/helpers/mixed.js +1 -1
  110. package/helpers/mixed.mjs +1 -1
  111. package/helpers/object.js +4 -4
  112. package/helpers/object.mjs +4 -4
  113. package/helpers/string.js +1 -1
  114. package/helpers/string.mjs +1 -1
  115. package/package.json +1 -1
  116. package/pluginHooks.d.ts +0 -2
  117. package/pluginHooks.js +12 -3
  118. package/pluginHooks.mjs +12 -3
  119. package/plugins/autoColumnSize/autoColumnSize.js +141 -130
  120. package/plugins/autoColumnSize/autoColumnSize.mjs +140 -129
  121. package/plugins/autoRowSize/autoRowSize.js +112 -125
  122. package/plugins/autoRowSize/autoRowSize.mjs +110 -123
  123. package/plugins/autofill/autofill.js +97 -102
  124. package/plugins/autofill/autofill.mjs +96 -101
  125. package/plugins/base/base.js +57 -22
  126. package/plugins/base/base.mjs +56 -22
  127. package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.js +29 -24
  128. package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.mjs +28 -23
  129. package/plugins/collapsibleColumns/collapsibleColumns.js +104 -107
  130. package/plugins/collapsibleColumns/collapsibleColumns.mjs +102 -104
  131. package/plugins/columnSorting/columnSorting.js +105 -98
  132. package/plugins/columnSorting/columnSorting.mjs +104 -97
  133. package/plugins/columnSorting/columnStatesManager.js +12 -6
  134. package/plugins/columnSorting/columnStatesManager.mjs +12 -6
  135. package/plugins/columnSummary/columnSummary.js +71 -58
  136. package/plugins/columnSummary/columnSummary.mjs +70 -57
  137. package/plugins/columnSummary/endpoints.js +20 -14
  138. package/plugins/columnSummary/endpoints.mjs +20 -14
  139. package/plugins/comments/commentEditor.js +30 -2
  140. package/plugins/comments/commentEditor.mjs +30 -2
  141. package/plugins/comments/comments.js +158 -169
  142. package/plugins/comments/comments.mjs +157 -168
  143. package/plugins/comments/displaySwitch.js +7 -3
  144. package/plugins/comments/displaySwitch.mjs +7 -3
  145. package/plugins/contextMenu/commandExecutor.js +15 -2
  146. package/plugins/contextMenu/commandExecutor.mjs +15 -2
  147. package/plugins/contextMenu/contextMenu.js +91 -101
  148. package/plugins/contextMenu/contextMenu.mjs +90 -100
  149. package/plugins/contextMenu/itemsFactory.js +19 -4
  150. package/plugins/contextMenu/itemsFactory.mjs +19 -4
  151. package/plugins/contextMenu/menu/cursor.js +36 -0
  152. package/plugins/contextMenu/menu/cursor.mjs +36 -0
  153. package/plugins/contextMenu/menu/menu.js +57 -5
  154. package/plugins/contextMenu/menu/menu.mjs +57 -5
  155. package/plugins/copyPaste/copyPaste.js +74 -75
  156. package/plugins/copyPaste/copyPaste.mjs +74 -75
  157. package/plugins/customBorders/customBorders.js +49 -48
  158. package/plugins/customBorders/customBorders.mjs +48 -47
  159. package/plugins/dragToScroll/dragToScroll.js +50 -54
  160. package/plugins/dragToScroll/dragToScroll.mjs +49 -52
  161. package/plugins/dropdownMenu/dropdownMenu.js +132 -129
  162. package/plugins/dropdownMenu/dropdownMenu.mjs +132 -129
  163. package/plugins/exportFile/dataProvider.js +7 -2
  164. package/plugins/exportFile/dataProvider.mjs +7 -2
  165. package/plugins/exportFile/exportFile.js +1 -1
  166. package/plugins/exportFile/exportFile.mjs +1 -1
  167. package/plugins/exportFile/types/_base.js +14 -6
  168. package/plugins/exportFile/types/_base.mjs +14 -6
  169. package/plugins/filters/component/actionBar.js +9 -0
  170. package/plugins/filters/component/actionBar.mjs +9 -0
  171. package/plugins/filters/component/condition.js +13 -0
  172. package/plugins/filters/component/condition.mjs +13 -0
  173. package/plugins/filters/component/operators.js +9 -0
  174. package/plugins/filters/component/operators.mjs +9 -0
  175. package/plugins/filters/component/value.js +9 -0
  176. package/plugins/filters/component/value.mjs +9 -0
  177. package/plugins/filters/conditionCollection.js +9 -4
  178. package/plugins/filters/conditionCollection.mjs +9 -4
  179. package/plugins/filters/conditionUpdateObserver.js +53 -42
  180. package/plugins/filters/conditionUpdateObserver.mjs +53 -42
  181. package/plugins/filters/dataFilter.js +9 -3
  182. package/plugins/filters/dataFilter.mjs +9 -3
  183. package/plugins/filters/filters.js +184 -189
  184. package/plugins/filters/filters.mjs +182 -187
  185. package/plugins/filters/ui/_base.js +1 -1
  186. package/plugins/filters/ui/_base.mjs +1 -1
  187. package/plugins/filters/utils.js +1 -1
  188. package/plugins/filters/utils.mjs +1 -1
  189. package/plugins/formulas/engine/settings.js +1 -1
  190. package/plugins/formulas/engine/settings.mjs +1 -1
  191. package/plugins/formulas/formulas.js +684 -602
  192. package/plugins/formulas/formulas.mjs +682 -600
  193. package/plugins/hiddenColumns/hiddenColumns.js +174 -169
  194. package/plugins/hiddenColumns/hiddenColumns.mjs +173 -168
  195. package/plugins/hiddenRows/hiddenRows.js +170 -165
  196. package/plugins/hiddenRows/hiddenRows.mjs +169 -164
  197. package/plugins/manualColumnFreeze/contextMenuItem/freezeColumn.js +1 -1
  198. package/plugins/manualColumnFreeze/contextMenuItem/freezeColumn.mjs +1 -1
  199. package/plugins/manualColumnFreeze/contextMenuItem/unfreezeColumn.js +1 -1
  200. package/plugins/manualColumnFreeze/contextMenuItem/unfreezeColumn.mjs +1 -1
  201. package/plugins/manualColumnFreeze/manualColumnFreeze.js +67 -54
  202. package/plugins/manualColumnFreeze/manualColumnFreeze.mjs +64 -51
  203. package/plugins/manualColumnMove/manualColumnMove.js +287 -232
  204. package/plugins/manualColumnMove/manualColumnMove.mjs +286 -231
  205. package/plugins/manualColumnMove/ui/_base.js +9 -3
  206. package/plugins/manualColumnMove/ui/_base.mjs +9 -3
  207. package/plugins/manualColumnResize/manualColumnResize.js +291 -246
  208. package/plugins/manualColumnResize/manualColumnResize.mjs +290 -244
  209. package/plugins/manualRowMove/manualRowMove.js +223 -208
  210. package/plugins/manualRowMove/manualRowMove.mjs +222 -207
  211. package/plugins/manualRowMove/ui/_base.js +10 -5
  212. package/plugins/manualRowMove/ui/_base.mjs +10 -5
  213. package/plugins/manualRowResize/manualRowResize.js +254 -209
  214. package/plugins/manualRowResize/manualRowResize.mjs +253 -207
  215. package/plugins/mergeCells/calculations/autofill.js +9 -3
  216. package/plugins/mergeCells/calculations/autofill.mjs +9 -3
  217. package/plugins/mergeCells/calculations/selection.js +10 -4
  218. package/plugins/mergeCells/calculations/selection.mjs +10 -4
  219. package/plugins/mergeCells/cellCoords.js +16 -6
  220. package/plugins/mergeCells/cellCoords.mjs +16 -6
  221. package/plugins/mergeCells/cellsCollection.js +10 -4
  222. package/plugins/mergeCells/cellsCollection.mjs +10 -4
  223. package/plugins/mergeCells/mergeCells.js +582 -502
  224. package/plugins/mergeCells/mergeCells.mjs +580 -500
  225. package/plugins/multiColumnSorting/multiColumnSorting.js +13 -10
  226. package/plugins/multiColumnSorting/multiColumnSorting.mjs +13 -10
  227. package/plugins/multipleSelectionHandles/multipleSelectionHandles.js +16 -28
  228. package/plugins/multipleSelectionHandles/multipleSelectionHandles.mjs +16 -27
  229. package/plugins/nestedHeaders/nestedHeaders.js +542 -499
  230. package/plugins/nestedHeaders/nestedHeaders.mjs +554 -511
  231. package/plugins/nestedHeaders/stateManager/index.js +1 -1
  232. package/plugins/nestedHeaders/stateManager/index.mjs +1 -1
  233. package/plugins/nestedRows/data/dataManager.js +21 -15
  234. package/plugins/nestedRows/data/dataManager.mjs +21 -15
  235. package/plugins/nestedRows/nestedRows.js +326 -278
  236. package/plugins/nestedRows/nestedRows.mjs +325 -277
  237. package/plugins/nestedRows/ui/_base.js +7 -1
  238. package/plugins/nestedRows/ui/_base.mjs +7 -1
  239. package/plugins/nestedRows/ui/collapsing.js +2 -2
  240. package/plugins/nestedRows/ui/collapsing.mjs +2 -2
  241. package/plugins/nestedRows/ui/contextMenu.js +28 -18
  242. package/plugins/nestedRows/ui/contextMenu.mjs +28 -18
  243. package/plugins/nestedRows/utils/rowMoveController.js +12 -4
  244. package/plugins/nestedRows/utils/rowMoveController.mjs +12 -4
  245. package/plugins/persistentState/persistentState.js +14 -11
  246. package/plugins/persistentState/persistentState.mjs +14 -11
  247. package/plugins/persistentState/storage.js +11 -6
  248. package/plugins/persistentState/storage.mjs +11 -6
  249. package/plugins/registry.js +2 -2
  250. package/plugins/registry.mjs +2 -2
  251. package/plugins/search/search.js +57 -46
  252. package/plugins/search/search.mjs +56 -45
  253. package/plugins/touchScroll/touchScroll.js +102 -100
  254. package/plugins/touchScroll/touchScroll.mjs +100 -98
  255. package/plugins/trimRows/trimRows.js +33 -28
  256. package/plugins/trimRows/trimRows.mjs +32 -27
  257. package/plugins/undoRedo/undoRedo.js +2 -2
  258. package/plugins/undoRedo/undoRedo.mjs +2 -2
  259. package/renderers/autocompleteRenderer/autocompleteRenderer.js +11 -11
  260. package/renderers/autocompleteRenderer/autocompleteRenderer.mjs +11 -11
  261. package/renderers/baseRenderer/baseRenderer.js +2 -2
  262. package/renderers/baseRenderer/baseRenderer.mjs +2 -2
  263. package/renderers/checkboxRenderer/checkboxRenderer.js +23 -23
  264. package/renderers/checkboxRenderer/checkboxRenderer.mjs +23 -23
  265. package/renderers/dateRenderer/dateRenderer.js +4 -4
  266. package/renderers/dateRenderer/dateRenderer.mjs +4 -4
  267. package/renderers/handsontableRenderer/handsontableRenderer.js +4 -4
  268. package/renderers/handsontableRenderer/handsontableRenderer.mjs +4 -4
  269. package/renderers/htmlRenderer/htmlRenderer.js +4 -4
  270. package/renderers/htmlRenderer/htmlRenderer.mjs +4 -4
  271. package/renderers/numericRenderer/numericRenderer.js +3 -3
  272. package/renderers/numericRenderer/numericRenderer.mjs +3 -3
  273. package/renderers/passwordRenderer/passwordRenderer.js +3 -3
  274. package/renderers/passwordRenderer/passwordRenderer.mjs +3 -3
  275. package/renderers/selectRenderer/selectRenderer.js +4 -4
  276. package/renderers/selectRenderer/selectRenderer.mjs +4 -4
  277. package/renderers/textRenderer/textRenderer.js +5 -5
  278. package/renderers/textRenderer/textRenderer.mjs +5 -5
  279. package/renderers/timeRenderer/timeRenderer.js +3 -3
  280. package/renderers/timeRenderer/timeRenderer.mjs +3 -3
  281. package/selection/range.js +12 -2
  282. package/selection/range.mjs +12 -2
  283. package/selection/selection.js +3 -3
  284. package/selection/selection.mjs +3 -3
  285. package/tableView.js +208 -200
  286. package/tableView.mjs +208 -200
  287. package/translations/changesObservable/utils.js +2 -2
  288. package/translations/changesObservable/utils.mjs +2 -2
  289. package/translations/indexMapper.js +25 -22
  290. package/translations/indexMapper.mjs +25 -22
  291. package/translations/mapCollections/aggregatedCollection.js +8 -2
  292. package/translations/mapCollections/aggregatedCollection.mjs +8 -2
  293. package/translations/mapCollections/mapCollection.js +5 -2
  294. package/translations/mapCollections/mapCollection.mjs +5 -2
  295. package/translations/maps/indexMap.js +6 -1
  296. package/translations/maps/indexMap.mjs +6 -1
  297. package/translations/maps/utils/physicallyIndexed.js +2 -2
  298. package/translations/maps/utils/physicallyIndexed.mjs +2 -2
  299. package/utils/dataStructures/linkedList.js +10 -6
  300. package/utils/dataStructures/linkedList.mjs +10 -6
  301. package/utils/dataStructures/queue.js +1 -1
  302. package/utils/dataStructures/queue.mjs +1 -1
  303. package/utils/dataStructures/stack.js +1 -1
  304. package/utils/dataStructures/stack.mjs +1 -1
  305. package/utils/ghostTable.js +2 -2
  306. package/utils/ghostTable.mjs +2 -2
  307. package/utils/interval.js +73 -36
  308. package/utils/interval.mjs +73 -36
  309. package/utils/parseTable.js +1 -1
  310. package/utils/parseTable.mjs +1 -1
  311. package/validators/autocompleteValidator/autocompleteValidator.js +1 -1
  312. package/validators/autocompleteValidator/autocompleteValidator.mjs +1 -1
  313. package/validators/dateValidator/dateValidator.js +1 -1
  314. package/validators/dateValidator/dateValidator.mjs +1 -1
  315. package/validators/numericValidator/numericValidator.js +1 -1
  316. package/validators/numericValidator/numericValidator.mjs +1 -1
@@ -1,18 +1,24 @@
1
1
  "use strict";
2
2
 
3
3
  exports.__esModule = true;
4
+ require("core-js/modules/es.error.cause.js");
4
5
  var _base = require("../base");
5
6
  var _pluginHooks = _interopRequireDefault(require("../../pluginHooks"));
6
7
  var _array = require("../../helpers/array");
7
8
  var _object = require("../../helpers/object");
8
9
  var _commandExecutor = require("./commandExecutor");
9
- var _eventManager = _interopRequireDefault(require("../../eventManager"));
10
10
  var _itemsFactory = require("./itemsFactory");
11
11
  var _menu = require("./menu");
12
12
  var _utils = require("./utils");
13
13
  var _element = require("../../helpers/dom/element");
14
14
  var _predefinedItems = require("./predefinedItems");
15
15
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
16
+ function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
17
+ function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
18
+ 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; }
19
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
20
+ 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); }
21
+ function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return fn; }
16
22
  const PLUGIN_KEY = 'contextMenu';
17
23
  exports.PLUGIN_KEY = PLUGIN_KEY;
18
24
  const PLUGIN_PRIORITY = 70;
@@ -48,61 +54,71 @@ _pluginHooks.default.getSingleton().register('afterContextMenuExecute');
48
54
  *
49
55
  * @plugin ContextMenu
50
56
  */
57
+ var _onAfterOnCellContextMenu = /*#__PURE__*/new WeakSet();
58
+ var _onMenuBeforeOpen = /*#__PURE__*/new WeakSet();
59
+ var _onMenuAfterOpen = /*#__PURE__*/new WeakSet();
60
+ var _onMenuAfterClose = /*#__PURE__*/new WeakSet();
51
61
  class ContextMenu extends _base.BasePlugin {
52
- static get PLUGIN_KEY() {
53
- return PLUGIN_KEY;
54
- }
55
- static get PLUGIN_PRIORITY() {
56
- return PLUGIN_PRIORITY;
57
- }
58
- static get PLUGIN_DEPS() {
59
- return ['plugin:AutoColumnSize'];
60
- }
61
-
62
- /**
63
- * Context menu default items order when `contextMenu` options is set as `true`.
64
- *
65
- * @returns {string[]}
66
- */
67
- static get DEFAULT_ITEMS() {
68
- return [_predefinedItems.ROW_ABOVE, _predefinedItems.ROW_BELOW, _predefinedItems.SEPARATOR, _predefinedItems.COLUMN_LEFT, _predefinedItems.COLUMN_RIGHT, _predefinedItems.SEPARATOR, _predefinedItems.REMOVE_ROW, _predefinedItems.REMOVE_COLUMN, _predefinedItems.SEPARATOR, _predefinedItems.UNDO, _predefinedItems.REDO, _predefinedItems.SEPARATOR, _predefinedItems.READ_ONLY, _predefinedItems.SEPARATOR, _predefinedItems.ALIGNMENT];
69
- }
70
-
71
- /**
72
- * @param {Core} hotInstance Handsontable instance.
73
- */
74
- constructor(hotInstance) {
75
- super(hotInstance);
62
+ constructor() {
63
+ super(...arguments);
64
+ /**
65
+ * On menu after close listener.
66
+ */
67
+ _classPrivateMethodInitSpec(this, _onMenuAfterClose);
76
68
  /**
77
- * Instance of {@link EventManager}.
69
+ * On menu after open listener.
70
+ */
71
+ _classPrivateMethodInitSpec(this, _onMenuAfterOpen);
72
+ /**
73
+ * On menu before open listener.
74
+ */
75
+ _classPrivateMethodInitSpec(this, _onMenuBeforeOpen);
76
+ /**
77
+ * On contextmenu listener.
78
78
  *
79
- * @private
80
- * @type {EventManager}
79
+ * @param {Event} event The mouse event object.
81
80
  */
82
- this.eventManager = new _eventManager.default(this);
81
+ _classPrivateMethodInitSpec(this, _onAfterOnCellContextMenu);
83
82
  /**
84
83
  * Instance of {@link CommandExecutor}.
85
84
  *
86
85
  * @private
87
86
  * @type {CommandExecutor}
88
87
  */
89
- this.commandExecutor = new _commandExecutor.CommandExecutor(this.hot);
88
+ _defineProperty(this, "commandExecutor", new _commandExecutor.CommandExecutor(this.hot));
90
89
  /**
91
90
  * Instance of {@link ItemsFactory}.
92
91
  *
93
92
  * @private
94
93
  * @type {ItemsFactory}
95
94
  */
96
- this.itemsFactory = null;
95
+ _defineProperty(this, "itemsFactory", null);
97
96
  /**
98
97
  * Instance of {@link Menu}.
99
98
  *
100
99
  * @private
101
100
  * @type {Menu}
102
101
  */
103
- this.menu = null;
102
+ _defineProperty(this, "menu", null);
103
+ }
104
+ static get PLUGIN_KEY() {
105
+ return PLUGIN_KEY;
106
+ }
107
+ static get PLUGIN_PRIORITY() {
108
+ return PLUGIN_PRIORITY;
109
+ }
110
+ static get PLUGIN_DEPS() {
111
+ return ['plugin:AutoColumnSize'];
104
112
  }
105
113
 
114
+ /**
115
+ * Context menu default items order when `contextMenu` options is set as `true`.
116
+ *
117
+ * @returns {string[]}
118
+ */
119
+ static get DEFAULT_ITEMS() {
120
+ return [_predefinedItems.ROW_ABOVE, _predefinedItems.ROW_BELOW, _predefinedItems.SEPARATOR, _predefinedItems.COLUMN_LEFT, _predefinedItems.COLUMN_RIGHT, _predefinedItems.SEPARATOR, _predefinedItems.REMOVE_ROW, _predefinedItems.REMOVE_COLUMN, _predefinedItems.SEPARATOR, _predefinedItems.UNDO, _predefinedItems.REDO, _predefinedItems.SEPARATOR, _predefinedItems.READ_ONLY, _predefinedItems.SEPARATOR, _predefinedItems.ALIGNMENT];
121
+ }
106
122
  /**
107
123
  * Checks if the plugin is enabled in the handsontable settings. This method is executed in {@link Hooks#beforeInit}
108
124
  * hook and if it returns `true` then the {@link ContextMenu#enablePlugin} method is called.
@@ -130,16 +146,16 @@ class ContextMenu extends _base.BasePlugin {
130
146
  keepInViewport: true,
131
147
  container: settings.uiContainer || this.hot.rootDocument.body
132
148
  });
133
- this.menu.addLocalHook('beforeOpen', () => this.onMenuBeforeOpen());
134
- this.menu.addLocalHook('afterOpen', () => this.onMenuAfterOpen());
135
- this.menu.addLocalHook('afterClose', () => this.onMenuAfterClose());
149
+ this.menu.addLocalHook('beforeOpen', () => _classPrivateMethodGet(this, _onMenuBeforeOpen, _onMenuBeforeOpen2).call(this));
150
+ this.menu.addLocalHook('afterOpen', () => _classPrivateMethodGet(this, _onMenuAfterOpen, _onMenuAfterOpen2).call(this));
151
+ this.menu.addLocalHook('afterClose', () => _classPrivateMethodGet(this, _onMenuAfterClose, _onMenuAfterClose2).call(this));
136
152
  this.menu.addLocalHook('executeCommand', function () {
137
153
  for (var _len = arguments.length, params = new Array(_len), _key = 0; _key < _len; _key++) {
138
154
  params[_key] = arguments[_key];
139
155
  }
140
156
  return _this.executeCommand.call(_this, ...params);
141
157
  });
142
- this.addHook('afterOnCellContextMenu', event => this.onAfterOnCellContextMenu(event));
158
+ this.addHook('afterOnCellContextMenu', event => _classPrivateMethodGet(this, _onAfterOnCellContextMenu, _onAfterOnCellContextMenu2).call(this, event));
143
159
  this.registerShortcuts();
144
160
  super.enablePlugin();
145
161
  }
@@ -308,85 +324,59 @@ class ContextMenu extends _base.BasePlugin {
308
324
  // Register all commands. Predefined and added by user or by plugins
309
325
  (0, _array.arrayEach)(menuItems, command => this.commandExecutor.registerCommand(command.key, command));
310
326
  }
311
-
312
327
  /**
313
- * On contextmenu listener.
314
- *
315
- * @private
316
- * @param {Event} event The mouse event object.
328
+ * Destroys the plugin instance.
317
329
  */
318
- onAfterOnCellContextMenu(event) {
319
- const settings = this.hot.getSettings();
320
- const showRowHeaders = settings.rowHeaders;
321
- const showColHeaders = settings.colHeaders;
322
-
323
- /**
324
- * @private
325
- * @param {HTMLElement} element The element to validate.
326
- * @returns {boolean}
327
- */
328
- function isValidElement(element) {
329
- return element.nodeName === 'TD' || element.parentNode.nodeName === 'TD';
330
- }
331
- const element = event.target;
330
+ destroy() {
332
331
  this.close();
333
- if ((0, _element.hasClass)(element, 'handsontableInput')) {
334
- return;
335
- }
336
- event.preventDefault();
337
- event.stopPropagation();
338
- if (!(showRowHeaders || showColHeaders)) {
339
- if (!isValidElement(element) && !((0, _element.hasClass)(element, 'current') && (0, _element.hasClass)(element, 'wtBorder'))) {
340
- return;
341
- }
332
+ if (this.menu) {
333
+ this.menu.destroy();
342
334
  }
343
- const offset = (0, _utils.getDocumentOffsetByElement)(this.menu.container, this.hot.rootDocument);
344
- this.open({
345
- top: event.clientY + offset.top,
346
- left: event.clientX + offset.left
347
- });
348
- }
349
-
350
- /**
351
- * On menu before open listener.
352
- *
353
- * @private
354
- */
355
- onMenuBeforeOpen() {
356
- this.hot.runHooks('beforeContextMenuShow', this);
335
+ super.destroy();
357
336
  }
337
+ }
338
+ exports.ContextMenu = ContextMenu;
339
+ function _onAfterOnCellContextMenu2(event) {
340
+ const settings = this.hot.getSettings();
341
+ const showRowHeaders = settings.rowHeaders;
342
+ const showColHeaders = settings.colHeaders;
358
343
 
359
344
  /**
360
- * On menu after open listener.
361
- *
362
345
  * @private
346
+ * @param {HTMLElement} element The element to validate.
347
+ * @returns {boolean}
363
348
  */
364
- onMenuAfterOpen() {
365
- this.hot.runHooks('afterContextMenuShow', this);
349
+ function isValidElement(element) {
350
+ return element.nodeName === 'TD' || element.parentNode.nodeName === 'TD';
366
351
  }
367
-
368
- /**
369
- * On menu after close listener.
370
- *
371
- * @private
372
- */
373
- onMenuAfterClose() {
374
- this.hot.listen();
375
- this.hot.runHooks('afterContextMenuHide', this);
352
+ const element = event.target;
353
+ this.close();
354
+ if ((0, _element.hasClass)(element, 'handsontableInput')) {
355
+ return;
376
356
  }
377
-
378
- /**
379
- * Destroys the plugin instance.
380
- */
381
- destroy() {
382
- this.close();
383
- if (this.menu) {
384
- this.menu.destroy();
357
+ event.preventDefault();
358
+ event.stopPropagation();
359
+ if (!(showRowHeaders || showColHeaders)) {
360
+ if (!isValidElement(element) && !((0, _element.hasClass)(element, 'current') && (0, _element.hasClass)(element, 'wtBorder'))) {
361
+ return;
385
362
  }
386
- super.destroy();
387
363
  }
364
+ const offset = (0, _utils.getDocumentOffsetByElement)(this.menu.container, this.hot.rootDocument);
365
+ this.open({
366
+ top: event.clientY + offset.top,
367
+ left: event.clientX + offset.left
368
+ });
369
+ }
370
+ function _onMenuBeforeOpen2() {
371
+ this.hot.runHooks('beforeContextMenuShow', this);
372
+ }
373
+ function _onMenuAfterOpen2() {
374
+ this.hot.runHooks('afterContextMenuShow', this);
375
+ }
376
+ function _onMenuAfterClose2() {
377
+ this.hot.listen();
378
+ this.hot.runHooks('afterContextMenuHide', this);
388
379
  }
389
- exports.ContextMenu = ContextMenu;
390
380
  ContextMenu.SEPARATOR = {
391
381
  name: _predefinedItems.SEPARATOR
392
382
  };
@@ -1,9 +1,15 @@
1
+ import "core-js/modules/es.error.cause.js";
2
+ function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
3
+ function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
4
+ 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; }
5
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
6
+ 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
+ function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return fn; }
1
8
  import { BasePlugin } from "../base/index.mjs";
2
9
  import Hooks from "../../pluginHooks.mjs";
3
10
  import { arrayEach } from "../../helpers/array.mjs";
4
11
  import { objectEach } from "../../helpers/object.mjs";
5
12
  import { CommandExecutor } from "./commandExecutor.mjs";
6
- import EventManager from "../../eventManager.mjs";
7
13
  import { ItemsFactory } from "./itemsFactory.mjs";
8
14
  import { Menu } from "./menu/index.mjs";
9
15
  import { getDocumentOffsetByElement } from "./utils.mjs";
@@ -42,61 +48,71 @@ Hooks.getSingleton().register('afterContextMenuExecute');
42
48
  *
43
49
  * @plugin ContextMenu
44
50
  */
51
+ var _onAfterOnCellContextMenu = /*#__PURE__*/new WeakSet();
52
+ var _onMenuBeforeOpen = /*#__PURE__*/new WeakSet();
53
+ var _onMenuAfterOpen = /*#__PURE__*/new WeakSet();
54
+ var _onMenuAfterClose = /*#__PURE__*/new WeakSet();
45
55
  export class ContextMenu extends BasePlugin {
46
- static get PLUGIN_KEY() {
47
- return PLUGIN_KEY;
48
- }
49
- static get PLUGIN_PRIORITY() {
50
- return PLUGIN_PRIORITY;
51
- }
52
- static get PLUGIN_DEPS() {
53
- return ['plugin:AutoColumnSize'];
54
- }
55
-
56
- /**
57
- * Context menu default items order when `contextMenu` options is set as `true`.
58
- *
59
- * @returns {string[]}
60
- */
61
- static get DEFAULT_ITEMS() {
62
- return [ROW_ABOVE, ROW_BELOW, SEPARATOR, COLUMN_LEFT, COLUMN_RIGHT, SEPARATOR, REMOVE_ROW, REMOVE_COLUMN, SEPARATOR, UNDO, REDO, SEPARATOR, READ_ONLY, SEPARATOR, ALIGNMENT];
63
- }
64
-
65
- /**
66
- * @param {Core} hotInstance Handsontable instance.
67
- */
68
- constructor(hotInstance) {
69
- super(hotInstance);
56
+ constructor() {
57
+ super(...arguments);
58
+ /**
59
+ * On menu after close listener.
60
+ */
61
+ _classPrivateMethodInitSpec(this, _onMenuAfterClose);
70
62
  /**
71
- * Instance of {@link EventManager}.
63
+ * On menu after open listener.
64
+ */
65
+ _classPrivateMethodInitSpec(this, _onMenuAfterOpen);
66
+ /**
67
+ * On menu before open listener.
68
+ */
69
+ _classPrivateMethodInitSpec(this, _onMenuBeforeOpen);
70
+ /**
71
+ * On contextmenu listener.
72
72
  *
73
- * @private
74
- * @type {EventManager}
73
+ * @param {Event} event The mouse event object.
75
74
  */
76
- this.eventManager = new EventManager(this);
75
+ _classPrivateMethodInitSpec(this, _onAfterOnCellContextMenu);
77
76
  /**
78
77
  * Instance of {@link CommandExecutor}.
79
78
  *
80
79
  * @private
81
80
  * @type {CommandExecutor}
82
81
  */
83
- this.commandExecutor = new CommandExecutor(this.hot);
82
+ _defineProperty(this, "commandExecutor", new CommandExecutor(this.hot));
84
83
  /**
85
84
  * Instance of {@link ItemsFactory}.
86
85
  *
87
86
  * @private
88
87
  * @type {ItemsFactory}
89
88
  */
90
- this.itemsFactory = null;
89
+ _defineProperty(this, "itemsFactory", null);
91
90
  /**
92
91
  * Instance of {@link Menu}.
93
92
  *
94
93
  * @private
95
94
  * @type {Menu}
96
95
  */
97
- this.menu = null;
96
+ _defineProperty(this, "menu", null);
97
+ }
98
+ static get PLUGIN_KEY() {
99
+ return PLUGIN_KEY;
100
+ }
101
+ static get PLUGIN_PRIORITY() {
102
+ return PLUGIN_PRIORITY;
103
+ }
104
+ static get PLUGIN_DEPS() {
105
+ return ['plugin:AutoColumnSize'];
98
106
  }
99
107
 
108
+ /**
109
+ * Context menu default items order when `contextMenu` options is set as `true`.
110
+ *
111
+ * @returns {string[]}
112
+ */
113
+ static get DEFAULT_ITEMS() {
114
+ return [ROW_ABOVE, ROW_BELOW, SEPARATOR, COLUMN_LEFT, COLUMN_RIGHT, SEPARATOR, REMOVE_ROW, REMOVE_COLUMN, SEPARATOR, UNDO, REDO, SEPARATOR, READ_ONLY, SEPARATOR, ALIGNMENT];
115
+ }
100
116
  /**
101
117
  * Checks if the plugin is enabled in the handsontable settings. This method is executed in {@link Hooks#beforeInit}
102
118
  * hook and if it returns `true` then the {@link ContextMenu#enablePlugin} method is called.
@@ -124,16 +140,16 @@ export class ContextMenu extends BasePlugin {
124
140
  keepInViewport: true,
125
141
  container: settings.uiContainer || this.hot.rootDocument.body
126
142
  });
127
- this.menu.addLocalHook('beforeOpen', () => this.onMenuBeforeOpen());
128
- this.menu.addLocalHook('afterOpen', () => this.onMenuAfterOpen());
129
- this.menu.addLocalHook('afterClose', () => this.onMenuAfterClose());
143
+ this.menu.addLocalHook('beforeOpen', () => _classPrivateMethodGet(this, _onMenuBeforeOpen, _onMenuBeforeOpen2).call(this));
144
+ this.menu.addLocalHook('afterOpen', () => _classPrivateMethodGet(this, _onMenuAfterOpen, _onMenuAfterOpen2).call(this));
145
+ this.menu.addLocalHook('afterClose', () => _classPrivateMethodGet(this, _onMenuAfterClose, _onMenuAfterClose2).call(this));
130
146
  this.menu.addLocalHook('executeCommand', function () {
131
147
  for (var _len = arguments.length, params = new Array(_len), _key = 0; _key < _len; _key++) {
132
148
  params[_key] = arguments[_key];
133
149
  }
134
150
  return _this.executeCommand.call(_this, ...params);
135
151
  });
136
- this.addHook('afterOnCellContextMenu', event => this.onAfterOnCellContextMenu(event));
152
+ this.addHook('afterOnCellContextMenu', event => _classPrivateMethodGet(this, _onAfterOnCellContextMenu, _onAfterOnCellContextMenu2).call(this, event));
137
153
  this.registerShortcuts();
138
154
  super.enablePlugin();
139
155
  }
@@ -302,83 +318,57 @@ export class ContextMenu extends BasePlugin {
302
318
  // Register all commands. Predefined and added by user or by plugins
303
319
  arrayEach(menuItems, command => this.commandExecutor.registerCommand(command.key, command));
304
320
  }
305
-
306
321
  /**
307
- * On contextmenu listener.
308
- *
309
- * @private
310
- * @param {Event} event The mouse event object.
322
+ * Destroys the plugin instance.
311
323
  */
312
- onAfterOnCellContextMenu(event) {
313
- const settings = this.hot.getSettings();
314
- const showRowHeaders = settings.rowHeaders;
315
- const showColHeaders = settings.colHeaders;
316
-
317
- /**
318
- * @private
319
- * @param {HTMLElement} element The element to validate.
320
- * @returns {boolean}
321
- */
322
- function isValidElement(element) {
323
- return element.nodeName === 'TD' || element.parentNode.nodeName === 'TD';
324
- }
325
- const element = event.target;
324
+ destroy() {
326
325
  this.close();
327
- if (hasClass(element, 'handsontableInput')) {
328
- return;
329
- }
330
- event.preventDefault();
331
- event.stopPropagation();
332
- if (!(showRowHeaders || showColHeaders)) {
333
- if (!isValidElement(element) && !(hasClass(element, 'current') && hasClass(element, 'wtBorder'))) {
334
- return;
335
- }
326
+ if (this.menu) {
327
+ this.menu.destroy();
336
328
  }
337
- const offset = getDocumentOffsetByElement(this.menu.container, this.hot.rootDocument);
338
- this.open({
339
- top: event.clientY + offset.top,
340
- left: event.clientX + offset.left
341
- });
342
- }
343
-
344
- /**
345
- * On menu before open listener.
346
- *
347
- * @private
348
- */
349
- onMenuBeforeOpen() {
350
- this.hot.runHooks('beforeContextMenuShow', this);
329
+ super.destroy();
351
330
  }
331
+ }
332
+ function _onAfterOnCellContextMenu2(event) {
333
+ const settings = this.hot.getSettings();
334
+ const showRowHeaders = settings.rowHeaders;
335
+ const showColHeaders = settings.colHeaders;
352
336
 
353
337
  /**
354
- * On menu after open listener.
355
- *
356
338
  * @private
339
+ * @param {HTMLElement} element The element to validate.
340
+ * @returns {boolean}
357
341
  */
358
- onMenuAfterOpen() {
359
- this.hot.runHooks('afterContextMenuShow', this);
342
+ function isValidElement(element) {
343
+ return element.nodeName === 'TD' || element.parentNode.nodeName === 'TD';
360
344
  }
361
-
362
- /**
363
- * On menu after close listener.
364
- *
365
- * @private
366
- */
367
- onMenuAfterClose() {
368
- this.hot.listen();
369
- this.hot.runHooks('afterContextMenuHide', this);
345
+ const element = event.target;
346
+ this.close();
347
+ if (hasClass(element, 'handsontableInput')) {
348
+ return;
370
349
  }
371
-
372
- /**
373
- * Destroys the plugin instance.
374
- */
375
- destroy() {
376
- this.close();
377
- if (this.menu) {
378
- this.menu.destroy();
350
+ event.preventDefault();
351
+ event.stopPropagation();
352
+ if (!(showRowHeaders || showColHeaders)) {
353
+ if (!isValidElement(element) && !(hasClass(element, 'current') && hasClass(element, 'wtBorder'))) {
354
+ return;
379
355
  }
380
- super.destroy();
381
356
  }
357
+ const offset = getDocumentOffsetByElement(this.menu.container, this.hot.rootDocument);
358
+ this.open({
359
+ top: event.clientY + offset.top,
360
+ left: event.clientX + offset.left
361
+ });
362
+ }
363
+ function _onMenuBeforeOpen2() {
364
+ this.hot.runHooks('beforeContextMenuShow', this);
365
+ }
366
+ function _onMenuAfterOpen2() {
367
+ this.hot.runHooks('afterContextMenuShow', this);
368
+ }
369
+ function _onMenuAfterClose2() {
370
+ this.hot.listen();
371
+ this.hot.runHooks('afterContextMenuHide', this);
382
372
  }
383
373
  ContextMenu.SEPARATOR = {
384
374
  name: SEPARATOR
@@ -2,9 +2,13 @@
2
2
 
3
3
  exports.__esModule = true;
4
4
  require("core-js/modules/es.array.push.js");
5
+ require("core-js/modules/es.error.cause.js");
5
6
  var _object = require("../../helpers/object");
6
7
  var _array = require("../../helpers/array");
7
8
  var _predefinedItems = require("./predefinedItems");
9
+ 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; }
10
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
11
+ 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); }
8
12
  /**
9
13
  * Predefined items class factory for menu items.
10
14
  *
@@ -14,8 +18,19 @@ var _predefinedItems = require("./predefinedItems");
14
18
  class ItemsFactory {
15
19
  constructor(hotInstance) {
16
20
  let orderPattern = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
21
+ /**
22
+ * @type {Core}
23
+ */
24
+ _defineProperty(this, "hot", void 0);
25
+ /**
26
+ * @type {object}
27
+ */
28
+ _defineProperty(this, "predefinedItems", (0, _predefinedItems.predefinedItems)());
29
+ /**
30
+ * @type {Array}
31
+ */
32
+ _defineProperty(this, "defaultOrderPattern", void 0);
17
33
  this.hot = hotInstance;
18
- this.predefinedItems = (0, _predefinedItems.predefinedItems)();
19
34
  this.defaultOrderPattern = orderPattern;
20
35
  }
21
36
 
@@ -35,7 +50,7 @@ class ItemsFactory {
35
50
 
36
51
  // Menu item added as a property to array
37
52
  } else if (isNaN(parseInt(key, 10))) {
38
- value.key = value.key === void 0 ? key : value.key;
53
+ value.key = value.key === undefined ? key : value.key;
39
54
  items[key] = value;
40
55
  menuItemKey = value.key;
41
56
  } else {
@@ -91,7 +106,7 @@ function getItems() {
91
106
  name: item
92
107
  };
93
108
  }
94
- if (item.key === void 0) {
109
+ if (item.key === undefined) {
95
110
  item.key = key;
96
111
  }
97
112
  result.push(item);
@@ -113,7 +128,7 @@ function getItems() {
113
128
  if ((0, _object.isObject)(name)) {
114
129
  (0, _object.extend)(item, name);
115
130
  }
116
- if (item.key === void 0) {
131
+ if (item.key === undefined) {
117
132
  item.key = key;
118
133
  }
119
134
  result.push(item);
@@ -1,4 +1,8 @@
1
1
  import "core-js/modules/es.array.push.js";
2
+ import "core-js/modules/es.error.cause.js";
3
+ 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; }
4
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
5
+ 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); }
2
6
  import { objectEach, isObject, extend } from "../../helpers/object.mjs";
3
7
  import { arrayEach } from "../../helpers/array.mjs";
4
8
  import { SEPARATOR, ITEMS, predefinedItems } from "./predefinedItems/index.mjs";
@@ -11,8 +15,19 @@ import { SEPARATOR, ITEMS, predefinedItems } from "./predefinedItems/index.mjs";
11
15
  export class ItemsFactory {
12
16
  constructor(hotInstance) {
13
17
  let orderPattern = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
18
+ /**
19
+ * @type {Core}
20
+ */
21
+ _defineProperty(this, "hot", void 0);
22
+ /**
23
+ * @type {object}
24
+ */
25
+ _defineProperty(this, "predefinedItems", predefinedItems());
26
+ /**
27
+ * @type {Array}
28
+ */
29
+ _defineProperty(this, "defaultOrderPattern", void 0);
14
30
  this.hot = hotInstance;
15
- this.predefinedItems = predefinedItems();
16
31
  this.defaultOrderPattern = orderPattern;
17
32
  }
18
33
 
@@ -32,7 +47,7 @@ export class ItemsFactory {
32
47
 
33
48
  // Menu item added as a property to array
34
49
  } else if (isNaN(parseInt(key, 10))) {
35
- value.key = value.key === void 0 ? key : value.key;
50
+ value.key = value.key === undefined ? key : value.key;
36
51
  items[key] = value;
37
52
  menuItemKey = value.key;
38
53
  } else {
@@ -87,7 +102,7 @@ function getItems() {
87
102
  name: item
88
103
  };
89
104
  }
90
- if (item.key === void 0) {
105
+ if (item.key === undefined) {
91
106
  item.key = key;
92
107
  }
93
108
  result.push(item);
@@ -109,7 +124,7 @@ function getItems() {
109
124
  if (isObject(name)) {
110
125
  extend(item, name);
111
126
  }
112
- if (item.key === void 0) {
127
+ if (item.key === undefined) {
113
128
  item.key = key;
114
129
  }
115
130
  result.push(item);