handsontable 0.0.0-next-200799f-20240311 → 0.0.0-next-bff5041-20240315

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of handsontable might be problematic. Click here for more details.

Files changed (272) hide show
  1. package/3rdparty/walkontable/src/calculator/viewportColumns.js +12 -17
  2. package/3rdparty/walkontable/src/calculator/viewportColumns.mjs +12 -17
  3. package/3rdparty/walkontable/src/calculator/viewportRows.js +10 -15
  4. package/3rdparty/walkontable/src/calculator/viewportRows.mjs +10 -15
  5. package/3rdparty/walkontable/src/cell/coords.js +12 -17
  6. package/3rdparty/walkontable/src/cell/coords.mjs +12 -17
  7. package/3rdparty/walkontable/src/cell/range.d.ts +0 -1
  8. package/3rdparty/walkontable/src/cell/range.js +23 -45
  9. package/3rdparty/walkontable/src/cell/range.mjs +23 -45
  10. package/3rdparty/walkontable/src/core/_base.js +1 -1
  11. package/3rdparty/walkontable/src/core/_base.mjs +1 -1
  12. package/3rdparty/walkontable/src/event.js +72 -104
  13. package/3rdparty/walkontable/src/event.mjs +72 -104
  14. package/3rdparty/walkontable/src/overlays.js +1 -1
  15. package/3rdparty/walkontable/src/overlays.mjs +1 -1
  16. package/3rdparty/walkontable/src/scroll.js +15 -17
  17. package/3rdparty/walkontable/src/scroll.mjs +15 -17
  18. package/3rdparty/walkontable/src/selection/manager.js +48 -69
  19. package/3rdparty/walkontable/src/selection/manager.mjs +48 -69
  20. package/3rdparty/walkontable/src/selection/scanner.js +33 -42
  21. package/3rdparty/walkontable/src/selection/scanner.mjs +33 -42
  22. package/3rdparty/walkontable/src/utils/columnStretching.js +27 -44
  23. package/3rdparty/walkontable/src/utils/columnStretching.mjs +27 -44
  24. package/3rdparty/walkontable/src/utils/orderView/view.js +1 -1
  25. package/3rdparty/walkontable/src/utils/orderView/view.mjs +1 -1
  26. package/base.js +2 -2
  27. package/base.mjs +2 -2
  28. package/core/viewportScroll/index.js +1 -4
  29. package/core/viewportScroll/index.mjs +1 -4
  30. package/core.d.ts +3 -4
  31. package/core.js +22 -79
  32. package/core.mjs +22 -79
  33. package/dataMap/dataSource.js +1 -1
  34. package/dataMap/dataSource.mjs +1 -1
  35. package/dataMap/metaManager/metaLayers/cellMeta.js +1 -1
  36. package/dataMap/metaManager/metaLayers/cellMeta.mjs +1 -1
  37. package/dataMap/replaceData.js +1 -1
  38. package/dataMap/replaceData.mjs +1 -1
  39. package/dist/handsontable.css +2 -2
  40. package/dist/handsontable.full.css +2 -2
  41. package/dist/handsontable.full.js +7620 -10327
  42. package/dist/handsontable.full.min.css +2 -2
  43. package/dist/handsontable.full.min.js +277 -277
  44. package/dist/handsontable.js +5525 -7779
  45. package/dist/handsontable.min.css +2 -2
  46. package/dist/handsontable.min.js +33 -33
  47. package/dist/languages/all.min.js +1 -1
  48. package/dist/languages/ar-AR.min.js +1 -1
  49. package/dist/languages/cs-CZ.min.js +1 -1
  50. package/dist/languages/de-CH.min.js +1 -1
  51. package/dist/languages/de-DE.min.js +1 -1
  52. package/dist/languages/en-US.min.js +1 -1
  53. package/dist/languages/es-MX.min.js +1 -1
  54. package/dist/languages/fr-FR.min.js +1 -1
  55. package/dist/languages/hr-HR.min.js +1 -1
  56. package/dist/languages/it-IT.min.js +1 -1
  57. package/dist/languages/ja-JP.min.js +1 -1
  58. package/dist/languages/ko-KR.min.js +1 -1
  59. package/dist/languages/lv-LV.min.js +1 -1
  60. package/dist/languages/nb-NO.min.js +1 -1
  61. package/dist/languages/nl-NL.min.js +1 -1
  62. package/dist/languages/pl-PL.min.js +1 -1
  63. package/dist/languages/pt-BR.min.js +1 -1
  64. package/dist/languages/ru-RU.min.js +1 -1
  65. package/dist/languages/sr-SP.min.js +1 -1
  66. package/dist/languages/zh-CN.min.js +1 -1
  67. package/dist/languages/zh-TW.min.js +1 -1
  68. package/editorManager.js +21 -27
  69. package/editorManager.mjs +21 -27
  70. package/editors/autocompleteEditor/autocompleteEditor.js +6 -10
  71. package/editors/autocompleteEditor/autocompleteEditor.mjs +6 -10
  72. package/eventManager.js +1 -1
  73. package/eventManager.mjs +1 -1
  74. package/focusManager.js +58 -82
  75. package/focusManager.mjs +58 -82
  76. package/helpers/dom/element.js +1 -1
  77. package/helpers/dom/element.mjs +1 -1
  78. package/helpers/mixed.js +1 -1
  79. package/helpers/mixed.mjs +1 -1
  80. package/helpers/object.js +2 -2
  81. package/helpers/object.mjs +2 -2
  82. package/index.d.ts +10 -0
  83. package/package.json +2 -1
  84. package/pluginHooks.d.ts +0 -4
  85. package/pluginHooks.js +2 -44
  86. package/pluginHooks.mjs +2 -44
  87. package/plugins/autoColumnSize/autoColumnSize.js +49 -65
  88. package/plugins/autoColumnSize/autoColumnSize.mjs +49 -65
  89. package/plugins/autoRowSize/autoRowSize.js +28 -34
  90. package/plugins/autoRowSize/autoRowSize.mjs +28 -34
  91. package/plugins/autofill/autofill.js +30 -38
  92. package/plugins/autofill/autofill.mjs +30 -38
  93. package/plugins/base/base.js +12 -17
  94. package/plugins/base/base.mjs +12 -17
  95. package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.js +5 -5
  96. package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.mjs +5 -5
  97. package/plugins/collapsibleColumns/collapsibleColumns.js +36 -54
  98. package/plugins/collapsibleColumns/collapsibleColumns.mjs +36 -54
  99. package/plugins/columnSorting/columnSorting.js +40 -46
  100. package/plugins/columnSorting/columnSorting.mjs +40 -46
  101. package/plugins/columnSummary/columnSummary.js +22 -26
  102. package/plugins/columnSummary/columnSummary.mjs +22 -26
  103. package/plugins/comments/comments.js +116 -158
  104. package/plugins/comments/comments.mjs +116 -158
  105. package/plugins/contextMenu/contextMenu.js +20 -26
  106. package/plugins/contextMenu/contextMenu.mjs +20 -26
  107. package/plugins/contextMenu/itemsFactory.js +1 -1
  108. package/plugins/contextMenu/itemsFactory.mjs +1 -1
  109. package/plugins/contextMenu/menu/defaultShortcutsList.js +10 -26
  110. package/plugins/contextMenu/menu/defaultShortcutsList.mjs +10 -26
  111. package/plugins/contextMenu/menu/menu.js +13 -21
  112. package/plugins/contextMenu/menu/menu.mjs +13 -21
  113. package/plugins/contextMenu/menu/positioner.js +41 -58
  114. package/plugins/contextMenu/menu/positioner.mjs +41 -58
  115. package/plugins/copyPaste/copyPaste.js +113 -154
  116. package/plugins/copyPaste/copyPaste.mjs +113 -154
  117. package/plugins/copyPaste/copyableRanges.js +43 -66
  118. package/plugins/copyPaste/copyableRanges.mjs +43 -66
  119. package/plugins/customBorders/customBorders.js +11 -13
  120. package/plugins/customBorders/customBorders.mjs +11 -13
  121. package/plugins/dragToScroll/dragToScroll.js +6 -6
  122. package/plugins/dragToScroll/dragToScroll.mjs +6 -6
  123. package/plugins/dropdownMenu/dropdownMenu.js +78 -100
  124. package/plugins/dropdownMenu/dropdownMenu.mjs +78 -100
  125. package/plugins/exportFile/dataProvider.js +1 -1
  126. package/plugins/exportFile/dataProvider.mjs +1 -1
  127. package/plugins/filters/component/actionBar.js +9 -9
  128. package/plugins/filters/component/actionBar.mjs +8 -8
  129. package/plugins/filters/component/condition.js +13 -15
  130. package/plugins/filters/component/condition.mjs +13 -15
  131. package/plugins/filters/component/operators.js +6 -6
  132. package/plugins/filters/component/operators.mjs +6 -6
  133. package/plugins/filters/component/value.js +24 -28
  134. package/plugins/filters/component/value.mjs +24 -28
  135. package/plugins/filters/conditionUpdateObserver.js +22 -24
  136. package/plugins/filters/conditionUpdateObserver.mjs +22 -24
  137. package/plugins/filters/dataFilter.js +1 -1
  138. package/plugins/filters/dataFilter.mjs +1 -1
  139. package/plugins/filters/filters.js +81 -95
  140. package/plugins/filters/filters.mjs +81 -95
  141. package/plugins/filters/ui/input.js +13 -19
  142. package/plugins/filters/ui/input.mjs +13 -19
  143. package/plugins/filters/ui/link.js +8 -13
  144. package/plugins/filters/ui/link.mjs +8 -13
  145. package/plugins/filters/ui/multipleSelect.js +85 -112
  146. package/plugins/filters/ui/multipleSelect.mjs +85 -112
  147. package/plugins/filters/ui/radioInput.js +12 -20
  148. package/plugins/filters/ui/radioInput.mjs +12 -20
  149. package/plugins/filters/ui/select.js +50 -72
  150. package/plugins/filters/ui/select.mjs +49 -71
  151. package/plugins/formulas/formulas.js +268 -326
  152. package/plugins/formulas/formulas.mjs +269 -327
  153. package/plugins/formulas/indexSyncer/axisSyncer.js +38 -61
  154. package/plugins/formulas/indexSyncer/axisSyncer.mjs +38 -61
  155. package/plugins/formulas/indexSyncer/index.js +25 -48
  156. package/plugins/formulas/indexSyncer/index.mjs +25 -48
  157. package/plugins/hiddenColumns/hiddenColumns.js +64 -83
  158. package/plugins/hiddenColumns/hiddenColumns.mjs +64 -83
  159. package/plugins/hiddenRows/hiddenRows.js +63 -82
  160. package/plugins/hiddenRows/hiddenRows.mjs +63 -82
  161. package/plugins/manualColumnFreeze/manualColumnFreeze.js +24 -32
  162. package/plugins/manualColumnFreeze/manualColumnFreeze.mjs +25 -33
  163. package/plugins/manualColumnMove/manualColumnMove.js +126 -170
  164. package/plugins/manualColumnMove/manualColumnMove.mjs +126 -170
  165. package/plugins/manualColumnResize/manualColumnResize.js +169 -230
  166. package/plugins/manualColumnResize/manualColumnResize.mjs +169 -230
  167. package/plugins/manualRowMove/manualRowMove.js +99 -128
  168. package/plugins/manualRowMove/manualRowMove.mjs +99 -128
  169. package/plugins/manualRowResize/manualRowResize.js +150 -209
  170. package/plugins/manualRowResize/manualRowResize.mjs +150 -209
  171. package/plugins/mergeCells/calculations/selection.js +71 -2
  172. package/plugins/mergeCells/calculations/selection.mjs +71 -2
  173. package/plugins/mergeCells/cellsCollection.js +1 -117
  174. package/plugins/mergeCells/cellsCollection.mjs +1 -117
  175. package/plugins/mergeCells/contextMenuItem/toggleMerge.js +1 -11
  176. package/plugins/mergeCells/contextMenuItem/toggleMerge.mjs +1 -11
  177. package/plugins/mergeCells/mergeCells.js +355 -595
  178. package/plugins/mergeCells/mergeCells.mjs +355 -595
  179. package/plugins/multiColumnSorting/multiColumnSorting.js +0 -6
  180. package/plugins/multiColumnSorting/multiColumnSorting.mjs +0 -6
  181. package/plugins/multipleSelectionHandles/multipleSelectionHandles.js +1 -1
  182. package/plugins/multipleSelectionHandles/multipleSelectionHandles.mjs +1 -1
  183. package/plugins/nestedHeaders/nestedHeaders.js +204 -254
  184. package/plugins/nestedHeaders/nestedHeaders.mjs +205 -255
  185. package/plugins/nestedHeaders/stateManager/headersTree.js +21 -32
  186. package/plugins/nestedHeaders/stateManager/headersTree.mjs +21 -32
  187. package/plugins/nestedHeaders/stateManager/index.js +30 -41
  188. package/plugins/nestedHeaders/stateManager/index.mjs +30 -41
  189. package/plugins/nestedHeaders/stateManager/sourceSettings.js +19 -30
  190. package/plugins/nestedHeaders/stateManager/sourceSettings.mjs +19 -30
  191. package/plugins/nestedRows/data/dataManager.js +1 -1
  192. package/plugins/nestedRows/data/dataManager.mjs +1 -1
  193. package/plugins/nestedRows/nestedRows.js +138 -179
  194. package/plugins/nestedRows/nestedRows.mjs +139 -180
  195. package/plugins/nestedRows/ui/contextMenu.js +11 -15
  196. package/plugins/nestedRows/ui/contextMenu.mjs +10 -14
  197. package/plugins/nestedRows/utils/rowMoveController.js +1 -1
  198. package/plugins/nestedRows/utils/rowMoveController.mjs +1 -1
  199. package/plugins/persistentState/storage.js +2 -2
  200. package/plugins/persistentState/storage.mjs +2 -2
  201. package/plugins/search/search.js +7 -7
  202. package/plugins/search/search.mjs +7 -7
  203. package/plugins/touchScroll/touchScroll.js +15 -19
  204. package/plugins/touchScroll/touchScroll.mjs +16 -20
  205. package/plugins/trimRows/trimRows.js +6 -6
  206. package/plugins/trimRows/trimRows.mjs +6 -6
  207. package/renderers/checkboxRenderer/checkboxRenderer.js +4 -4
  208. package/renderers/checkboxRenderer/checkboxRenderer.mjs +4 -4
  209. package/selection/highlight/highlight.js +14 -14
  210. package/selection/highlight/highlight.mjs +13 -13
  211. package/selection/highlight/visualSelection.js +2 -16
  212. package/selection/highlight/visualSelection.mjs +2 -16
  213. package/selection/selection.js +60 -252
  214. package/selection/selection.mjs +59 -251
  215. package/selection/transformation.js +101 -175
  216. package/selection/transformation.mjs +101 -175
  217. package/shortcutContexts/commands/editor/closeAndSave.js +2 -2
  218. package/shortcutContexts/commands/editor/closeAndSave.mjs +2 -2
  219. package/shortcutContexts/commands/editor/open.js +3 -18
  220. package/shortcutContexts/commands/editor/open.mjs +3 -18
  221. package/shortcutContexts/commands/extendCellsSelection/down.js +1 -1
  222. package/shortcutContexts/commands/extendCellsSelection/down.mjs +1 -1
  223. package/shortcutContexts/commands/extendCellsSelection/left.js +1 -1
  224. package/shortcutContexts/commands/extendCellsSelection/left.mjs +1 -1
  225. package/shortcutContexts/commands/extendCellsSelection/right.js +1 -1
  226. package/shortcutContexts/commands/extendCellsSelection/right.mjs +1 -1
  227. package/shortcutContexts/commands/extendCellsSelection/toColumns.js +1 -1
  228. package/shortcutContexts/commands/extendCellsSelection/toColumns.mjs +1 -1
  229. package/shortcutContexts/commands/extendCellsSelection/toMostBottom.js +1 -3
  230. package/shortcutContexts/commands/extendCellsSelection/toMostBottom.mjs +1 -3
  231. package/shortcutContexts/commands/extendCellsSelection/toMostInlineEnd.js +3 -9
  232. package/shortcutContexts/commands/extendCellsSelection/toMostInlineEnd.mjs +3 -9
  233. package/shortcutContexts/commands/extendCellsSelection/toMostInlineStart.js +3 -10
  234. package/shortcutContexts/commands/extendCellsSelection/toMostInlineStart.mjs +3 -10
  235. package/shortcutContexts/commands/extendCellsSelection/toMostLeft.js +1 -3
  236. package/shortcutContexts/commands/extendCellsSelection/toMostLeft.mjs +1 -3
  237. package/shortcutContexts/commands/extendCellsSelection/toMostRight.js +1 -3
  238. package/shortcutContexts/commands/extendCellsSelection/toMostRight.mjs +1 -3
  239. package/shortcutContexts/commands/extendCellsSelection/toMostTop.js +1 -3
  240. package/shortcutContexts/commands/extendCellsSelection/toMostTop.mjs +1 -3
  241. package/shortcutContexts/commands/extendCellsSelection/toRows.js +1 -1
  242. package/shortcutContexts/commands/extendCellsSelection/toRows.mjs +1 -1
  243. package/shortcutContexts/commands/extendCellsSelection/up.js +1 -1
  244. package/shortcutContexts/commands/extendCellsSelection/up.mjs +1 -1
  245. package/shortcutContexts/commands/moveCellSelection/inlineEnd.js +1 -6
  246. package/shortcutContexts/commands/moveCellSelection/inlineEnd.mjs +1 -6
  247. package/shortcutContexts/commands/moveCellSelection/inlineStart.js +1 -6
  248. package/shortcutContexts/commands/moveCellSelection/inlineStart.mjs +1 -6
  249. package/shortcutContexts/grid.js +2 -2
  250. package/shortcutContexts/grid.mjs +2 -2
  251. package/shortcuts/context.js +1 -2
  252. package/shortcuts/context.mjs +1 -2
  253. package/tableView.js +52 -98
  254. package/tableView.mjs +52 -98
  255. package/translations/changesObservable/observable.js +21 -38
  256. package/translations/changesObservable/observable.mjs +21 -38
  257. package/translations/changesObservable/observer.js +7 -12
  258. package/translations/changesObservable/observer.mjs +6 -11
  259. package/translations/mapCollections/aggregatedCollection.js +1 -1
  260. package/translations/mapCollections/aggregatedCollection.mjs +1 -1
  261. package/translations/maps/indexMap.js +1 -1
  262. package/translations/maps/indexMap.mjs +1 -1
  263. package/utils/dataStructures/linkedList.js +1 -6
  264. package/utils/dataStructures/linkedList.mjs +1 -6
  265. package/utils/dataStructures/tree.js +1 -1
  266. package/utils/dataStructures/tree.mjs +1 -1
  267. package/utils/interval.js +26 -44
  268. package/utils/interval.mjs +26 -44
  269. package/core/viewportScroll/scrollStrategies/focusScroll.js +0 -15
  270. package/core/viewportScroll/scrollStrategies/focusScroll.mjs +0 -11
  271. package/plugins/mergeCells/focusOrder.js +0 -258
  272. package/plugins/mergeCells/focusOrder.mjs +0 -253
@@ -1,18 +1,15 @@
1
- import "core-js/modules/es.array.unscopables.flat.js";
2
- import "core-js/modules/es.array.push.js";
3
1
  import "core-js/modules/es.error.cause.js";
2
+ import "core-js/modules/es.array.push.js";
3
+ import "core-js/modules/es.array.unscopables.flat.js";
4
4
  function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
5
5
  function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
6
6
  function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
7
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
8
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
9
9
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
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; }
15
- function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return fn; }
10
+ function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
11
+ function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
12
+ function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
16
13
  import { BasePlugin } from "../base/index.mjs";
17
14
  import { arrayEach, arrayMap } from "../../helpers/array.mjs";
18
15
  import { toSingleLine } from "../../helpers/templateLiteralTag.mjs";
@@ -73,15 +70,7 @@ const SHORTCUTS_GROUP = PLUGIN_KEY;
73
70
  * :::
74
71
  */
75
72
  var _menuFocusNavigator = /*#__PURE__*/new WeakMap();
76
- var _onAfterChange = /*#__PURE__*/new WeakSet();
77
- var _onAfterDropdownMenuShow = /*#__PURE__*/new WeakSet();
78
- var _onAfterDropdownMenuHide = /*#__PURE__*/new WeakSet();
79
- var _onAfterDropdownMenuDefaultOptions = /*#__PURE__*/new WeakSet();
80
- var _onActionBarSubmit = /*#__PURE__*/new WeakSet();
81
- var _onComponentChange = /*#__PURE__*/new WeakSet();
82
- var _onSelectUIClosed = /*#__PURE__*/new WeakSet();
83
- var _onAfterGetColHeader = /*#__PURE__*/new WeakSet();
84
- var _updateComponents = /*#__PURE__*/new WeakSet();
73
+ var _Filters_brand = /*#__PURE__*/new WeakSet();
85
74
  export class Filters extends BasePlugin {
86
75
  static get PLUGIN_KEY() {
87
76
  return PLUGIN_KEY;
@@ -103,59 +92,12 @@ export class Filters extends BasePlugin {
103
92
  constructor(hotInstance) {
104
93
  super(hotInstance);
105
94
  // One listener for the enable/disable functionality
106
- /**
107
- * It updates the components state. The state is triggered by ConditionUpdateObserver, which
108
- * reacts to any condition added to the condition collection. It may be added through the UI
109
- * components or by API call.
110
- *
111
- * @param {object} conditionsState An object with the state generated by UI components.
112
- */
113
- _classPrivateMethodInitSpec(this, _updateComponents);
114
- /**
115
- * On after get column header listener.
116
- *
117
- * @param {number} col Visual column index.
118
- * @param {HTMLTableCellElement} TH Header's TH element.
119
- */
120
- _classPrivateMethodInitSpec(this, _onAfterGetColHeader);
121
- /**
122
- * On component SelectUI closed listener.
123
- */
124
- _classPrivateMethodInitSpec(this, _onSelectUIClosed);
125
- /**
126
- * On component change listener.
127
- *
128
- * @param {BaseComponent} component Component inheriting BaseComponent.
129
- * @param {object} command Menu item object (command).
130
- */
131
- _classPrivateMethodInitSpec(this, _onComponentChange);
132
- /**
133
- * On action bar submit listener.
134
- *
135
- * @private
136
- * @param {string} submitType The submit type.
137
- */
138
- _classPrivateMethodInitSpec(this, _onActionBarSubmit);
139
- /**
140
- * After dropdown menu default options listener.
141
- *
142
- * @param {object} defaultOptions ContextMenu default item options.
143
- */
144
- _classPrivateMethodInitSpec(this, _onAfterDropdownMenuDefaultOptions);
145
- /**
146
- * After dropdown menu hide listener.
147
- */
148
- _classPrivateMethodInitSpec(this, _onAfterDropdownMenuHide);
149
- /**
150
- * After dropdown menu show listener.
151
- */
152
- _classPrivateMethodInitSpec(this, _onAfterDropdownMenuShow);
153
95
  /**
154
96
  * `afterChange` listener.
155
97
  *
156
98
  * @param {Array} changes Array of changes.
157
99
  */
158
- _classPrivateMethodInitSpec(this, _onAfterChange);
100
+ _classPrivateMethodInitSpec(this, _Filters_brand);
159
101
  _defineProperty(this, "dropdownMenuPlugin", null);
160
102
  /**
161
103
  * Instance of {@link ConditionCollection}.
@@ -190,11 +132,8 @@ export class Filters extends BasePlugin {
190
132
  *
191
133
  * @type {MenuFocusNavigator|undefined}
192
134
  */
193
- _classPrivateFieldInitSpec(this, _menuFocusNavigator, {
194
- writable: true,
195
- value: void 0
196
- });
197
- this.hot.addHook('afterGetColHeader', (col, TH) => _classPrivateMethodGet(this, _onAfterGetColHeader, _onAfterGetColHeader2).call(this, col, TH));
135
+ _classPrivateFieldInitSpec(this, _menuFocusNavigator, void 0);
136
+ this.hot.addHook('afterGetColHeader', (col, TH) => _assertClassBrand(_Filters_brand, this, _onAfterGetColHeader).call(this, col, TH));
198
137
  }
199
138
 
200
139
  /**
@@ -220,9 +159,9 @@ export class Filters extends BasePlugin {
220
159
  const dropdownSettings = this.hot.getSettings().dropdownMenu;
221
160
  const menuContainer = dropdownSettings && dropdownSettings.uiContainer || this.hot.rootDocument.body;
222
161
  const addConfirmationHooks = component => {
223
- component.addLocalHook('accept', () => _classPrivateMethodGet(this, _onActionBarSubmit, _onActionBarSubmit2).call(this, 'accept'));
224
- component.addLocalHook('cancel', () => _classPrivateMethodGet(this, _onActionBarSubmit, _onActionBarSubmit2).call(this, 'cancel'));
225
- component.addLocalHook('change', command => _classPrivateMethodGet(this, _onComponentChange, _onComponentChange2).call(this, component, command));
162
+ component.addLocalHook('accept', () => _assertClassBrand(_Filters_brand, this, _onActionBarSubmit).call(this, 'accept'));
163
+ component.addLocalHook('cancel', () => _assertClassBrand(_Filters_brand, this, _onActionBarSubmit).call(this, 'cancel'));
164
+ component.addLocalHook('change', command => _assertClassBrand(_Filters_brand, this, _onComponentChange).call(this, component, command));
226
165
  return component;
227
166
  };
228
167
  const filterByConditionLabel = () => `${this.hot.getTranslatedPhrase(constants.FILTERS_DIVS_FILTER_BY_CONDITION)}:`;
@@ -234,7 +173,7 @@ export class Filters extends BasePlugin {
234
173
  addSeparator: false,
235
174
  menuContainer
236
175
  });
237
- conditionComponent.addLocalHook('afterClose', () => _classPrivateMethodGet(this, _onSelectUIClosed, _onSelectUIClosed2).call(this));
176
+ conditionComponent.addLocalHook('afterClose', () => _assertClassBrand(_Filters_brand, this, _onSelectUIClosed).call(this));
238
177
  this.components.set('filter_by_condition', addConfirmationHooks(conditionComponent));
239
178
  }
240
179
  if (!this.components.get('filter_operators')) {
@@ -250,7 +189,7 @@ export class Filters extends BasePlugin {
250
189
  addSeparator: true,
251
190
  menuContainer
252
191
  });
253
- conditionComponent.addLocalHook('afterClose', () => _classPrivateMethodGet(this, _onSelectUIClosed, _onSelectUIClosed2).call(this));
192
+ conditionComponent.addLocalHook('afterClose', () => _assertClassBrand(_Filters_brand, this, _onSelectUIClosed).call(this));
254
193
  this.components.set('filter_by_condition2', addConfirmationHooks(conditionComponent));
255
194
  }
256
195
  if (!this.components.get('filter_by_value')) {
@@ -270,20 +209,20 @@ export class Filters extends BasePlugin {
270
209
  }
271
210
  if (!this.conditionUpdateObserver) {
272
211
  this.conditionUpdateObserver = new ConditionUpdateObserver(this.hot, this.conditionCollection, physicalColumn => this.getDataMapAtColumn(physicalColumn));
273
- this.conditionUpdateObserver.addLocalHook('update', conditionState => _classPrivateMethodGet(this, _updateComponents, _updateComponents2).call(this, conditionState));
212
+ this.conditionUpdateObserver.addLocalHook('update', conditionState => _assertClassBrand(_Filters_brand, this, _updateComponents).call(this, conditionState));
274
213
  }
275
214
  this.components.forEach(component => component.show());
276
- this.addHook('afterDropdownMenuDefaultOptions', defaultOptions => _classPrivateMethodGet(this, _onAfterDropdownMenuDefaultOptions, _onAfterDropdownMenuDefaultOptions2).call(this, defaultOptions));
277
- this.addHook('afterDropdownMenuShow', () => _classPrivateMethodGet(this, _onAfterDropdownMenuShow, _onAfterDropdownMenuShow2).call(this));
278
- this.addHook('afterDropdownMenuHide', () => _classPrivateMethodGet(this, _onAfterDropdownMenuHide, _onAfterDropdownMenuHide2).call(this));
279
- this.addHook('afterChange', changes => _classPrivateMethodGet(this, _onAfterChange, _onAfterChange2).call(this, changes));
215
+ this.addHook('afterDropdownMenuDefaultOptions', defaultOptions => _assertClassBrand(_Filters_brand, this, _onAfterDropdownMenuDefaultOptions).call(this, defaultOptions));
216
+ this.addHook('afterDropdownMenuShow', () => _assertClassBrand(_Filters_brand, this, _onAfterDropdownMenuShow).call(this));
217
+ this.addHook('afterDropdownMenuHide', () => _assertClassBrand(_Filters_brand, this, _onAfterDropdownMenuHide).call(this));
218
+ this.addHook('afterChange', changes => _assertClassBrand(_Filters_brand, this, _onAfterChange).call(this, changes));
280
219
 
281
220
  // Temp. solution (extending menu items bug in contextMenu/dropdownMenu)
282
221
  if (this.hot.getSettings().dropdownMenu && this.dropdownMenuPlugin) {
283
222
  this.dropdownMenuPlugin.disablePlugin();
284
223
  this.dropdownMenuPlugin.enablePlugin();
285
224
  }
286
- if (!_classPrivateFieldGet(this, _menuFocusNavigator) && this.dropdownMenuPlugin.enabled) {
225
+ if (!_classPrivateFieldGet(_menuFocusNavigator, this) && this.dropdownMenuPlugin.enabled) {
287
226
  const mainMenu = this.dropdownMenuPlugin.menu;
288
227
  const focusableItems = [
289
228
  // A fake menu item that once focused allows escaping from the focus navigation (using Tab keys)
@@ -291,7 +230,7 @@ export class Filters extends BasePlugin {
291
230
  {
292
231
  focus: () => {
293
232
  const menuNavigator = mainMenu.getNavigator();
294
- const lastSelectedMenuItem = _classPrivateFieldGet(this, _menuFocusNavigator).getLastMenuPage();
233
+ const lastSelectedMenuItem = _classPrivateFieldGet(_menuFocusNavigator, this).getLastMenuPage();
295
234
  mainMenu.focus();
296
235
  if (lastSelectedMenuItem > 0) {
297
236
  menuNavigator.setCurrentPage(lastSelectedMenuItem);
@@ -303,15 +242,15 @@ export class Filters extends BasePlugin {
303
242
  let [, component] = _ref;
304
243
  return component.getElements();
305
244
  }).flat()];
306
- _classPrivateFieldSet(this, _menuFocusNavigator, createMenuFocusController(mainMenu, focusableItems));
245
+ _classPrivateFieldSet(_menuFocusNavigator, this, createMenuFocusController(mainMenu, focusableItems));
307
246
  const forwardToFocusNavigation = event => {
308
- _classPrivateFieldGet(this, _menuFocusNavigator).listen();
247
+ _classPrivateFieldGet(_menuFocusNavigator, this).listen();
309
248
  event.preventDefault();
310
249
  if (isKey(event.keyCode, 'TAB')) {
311
250
  if (event.shiftKey) {
312
- _classPrivateFieldGet(this, _menuFocusNavigator).toPreviousItem();
251
+ _classPrivateFieldGet(_menuFocusNavigator, this).toPreviousItem();
313
252
  } else {
314
- _classPrivateFieldGet(this, _menuFocusNavigator).toNextItem();
253
+ _classPrivateFieldGet(_menuFocusNavigator, this).toNextItem();
315
254
  }
316
255
  }
317
256
  };
@@ -656,6 +595,11 @@ export class Filters extends BasePlugin {
656
595
  });
657
596
  this.updateDependentComponentsVisibility();
658
597
  }
598
+
599
+ /**
600
+ * After dropdown menu show listener.
601
+ */
602
+
659
603
  /**
660
604
  * Get an operation, based on the number and types of arguments (where arguments are states of components).
661
605
  *
@@ -677,6 +621,14 @@ export class Filters extends BasePlugin {
677
621
  }
678
622
  return operation;
679
623
  }
624
+
625
+ /**
626
+ * On action bar submit listener.
627
+ *
628
+ * @private
629
+ * @param {string} submitType The submit type.
630
+ */
631
+
680
632
  /**
681
633
  * Listen to the keyboard input on document body and forward events to instance of Handsontable
682
634
  * created by DropdownMenu plugin.
@@ -706,6 +658,14 @@ export class Filters extends BasePlugin {
706
658
  this.hideComponents(...componentsToShow);
707
659
  }
708
660
  }
661
+
662
+ /**
663
+ * On after get column header listener.
664
+ *
665
+ * @param {number} col Visual column index.
666
+ * @param {HTMLTableCellElement} TH Header's TH element.
667
+ */
668
+
709
669
  /**
710
670
  * Creates DataFilter instance based on condition collection.
711
671
  *
@@ -717,6 +677,15 @@ export class Filters extends BasePlugin {
717
677
  let conditionCollection = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.conditionCollection;
718
678
  return new DataFilter(conditionCollection, physicalColumn => this.getDataMapAtColumn(physicalColumn));
719
679
  }
680
+
681
+ /**
682
+ * It updates the components state. The state is triggered by ConditionUpdateObserver, which
683
+ * reacts to any condition added to the condition collection. It may be added through the UI
684
+ * components or by API call.
685
+ *
686
+ * @param {object} conditionsState An object with the state generated by UI components.
687
+ */
688
+
720
689
  /**
721
690
  * Returns indexes of passed components inside list of `dropdownMenu` items.
722
691
  *
@@ -814,7 +783,7 @@ export class Filters extends BasePlugin {
814
783
  super.destroy();
815
784
  }
816
785
  }
817
- function _onAfterChange2(changes) {
786
+ function _onAfterChange(changes) {
818
787
  if (changes) {
819
788
  arrayEach(changes, change => {
820
789
  const [, prop] = change;
@@ -825,14 +794,22 @@ function _onAfterChange2(changes) {
825
794
  });
826
795
  }
827
796
  }
828
- function _onAfterDropdownMenuShow2() {
797
+ function _onAfterDropdownMenuShow() {
829
798
  this.restoreComponents(Array.from(this.components.values()));
830
799
  }
831
- function _onAfterDropdownMenuHide2() {
800
+ /**
801
+ * After dropdown menu hide listener.
802
+ */
803
+ function _onAfterDropdownMenuHide() {
832
804
  this.components.get('filter_by_condition').getSelectElement().closeOptions();
833
805
  this.components.get('filter_by_condition2').getSelectElement().closeOptions();
834
806
  }
835
- function _onAfterDropdownMenuDefaultOptions2(defaultOptions) {
807
+ /**
808
+ * After dropdown menu default options listener.
809
+ *
810
+ * @param {object} defaultOptions ContextMenu default item options.
811
+ */
812
+ function _onAfterDropdownMenuDefaultOptions(defaultOptions) {
836
813
  defaultOptions.items.push({
837
814
  name: SEPARATOR
838
815
  });
@@ -840,7 +817,7 @@ function _onAfterDropdownMenuDefaultOptions2(defaultOptions) {
840
817
  defaultOptions.items.push(component.getMenuItemDescriptor());
841
818
  });
842
819
  }
843
- function _onActionBarSubmit2(submitType) {
820
+ function _onActionBarSubmit(submitType) {
844
821
  var _this$dropdownMenuPlu3;
845
822
  if (submitType === 'accept') {
846
823
  const selectedColumn = this.getSelectedColumn();
@@ -878,16 +855,25 @@ function _onActionBarSubmit2(submitType) {
878
855
  }
879
856
  (_this$dropdownMenuPlu3 = this.dropdownMenuPlugin) === null || _this$dropdownMenuPlu3 === void 0 || _this$dropdownMenuPlu3.close();
880
857
  }
881
- function _onComponentChange2(component, command) {
858
+ /**
859
+ * On component change listener.
860
+ *
861
+ * @param {BaseComponent} component Component inheriting BaseComponent.
862
+ * @param {object} command Menu item object (command).
863
+ */
864
+ function _onComponentChange(component, command) {
882
865
  this.updateDependentComponentsVisibility();
883
866
  if (component.constructor === ConditionComponent && !command.inputsCount) {
884
867
  this.setListeningDropdownMenu();
885
868
  }
886
869
  }
887
- function _onSelectUIClosed2() {
870
+ /**
871
+ * On component SelectUI closed listener.
872
+ */
873
+ function _onSelectUIClosed() {
888
874
  this.setListeningDropdownMenu();
889
875
  }
890
- function _onAfterGetColHeader2(col, TH) {
876
+ function _onAfterGetColHeader(col, TH) {
891
877
  const physicalColumn = this.hot.toPhysicalColumn(col);
892
878
  if (this.enabled && this.conditionCollection.hasConditions(physicalColumn)) {
893
879
  addClass(TH, 'htFiltersActive');
@@ -895,7 +881,7 @@ function _onAfterGetColHeader2(col, TH) {
895
881
  removeClass(TH, 'htFiltersActive');
896
882
  }
897
883
  }
898
- function _updateComponents2(conditionsState) {
884
+ function _updateComponents(conditionsState) {
899
885
  var _this$dropdownMenuPlu4;
900
886
  if (!((_this$dropdownMenuPlu4 = this.dropdownMenuPlugin) !== null && _this$dropdownMenuPlu4 !== void 0 && _this$dropdownMenuPlu4.enabled)) {
901
887
  return;
@@ -8,18 +8,15 @@ var _base = require("./_base");
8
8
  function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
9
9
  function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
10
10
  function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
11
- function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
12
- function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
13
- function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }
14
- function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
15
- 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; } }
16
- function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return fn; }
11
+ function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
12
+ function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
13
+ function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
17
14
  /**
18
15
  * @private
19
16
  * @class InputUI
20
17
  */
21
18
  var _input = /*#__PURE__*/new WeakMap();
22
- var _onKeyup = /*#__PURE__*/new WeakSet();
19
+ var _InputUI_brand = /*#__PURE__*/new WeakSet();
23
20
  class InputUI extends _base.BaseUI {
24
21
  static get DEFAULTS() {
25
22
  return (0, _object.clone)({
@@ -43,11 +40,8 @@ class InputUI extends _base.BaseUI {
43
40
  *
44
41
  * @param {Event} event The mouse event object.
45
42
  */
46
- _classPrivateMethodInitSpec(this, _onKeyup);
47
- _classPrivateFieldInitSpec(this, _input, {
48
- writable: true,
49
- value: void 0
50
- });
43
+ _classPrivateMethodInitSpec(this, _InputUI_brand);
44
+ _classPrivateFieldInitSpec(this, _input, void 0);
51
45
  this.registerHooks();
52
46
  }
53
47
 
@@ -55,7 +49,7 @@ class InputUI extends _base.BaseUI {
55
49
  * Register all necessary hooks.
56
50
  */
57
51
  registerHooks() {
58
- this.addLocalHook('keyup', event => _classPrivateMethodGet(this, _onKeyup, _onKeyup2).call(this, event));
52
+ this.addLocalHook('keyup', event => _assertClassBrand(_InputUI_brand, this, _onKeyup).call(this, event));
59
53
  }
60
54
 
61
55
  /**
@@ -64,7 +58,7 @@ class InputUI extends _base.BaseUI {
64
58
  build() {
65
59
  super.build();
66
60
  const icon = this.hot.rootDocument.createElement('div');
67
- _classPrivateFieldSet(this, _input, this._element.firstChild);
61
+ _classPrivateFieldSet(_input, this, this._element.firstChild);
68
62
  (0, _element.addClass)(this._element, 'htUIInput');
69
63
  (0, _element.addClass)(icon, 'htUIInputIcon');
70
64
  this._element.appendChild(icon);
@@ -78,9 +72,9 @@ class InputUI extends _base.BaseUI {
78
72
  if (!this.isBuilt()) {
79
73
  return;
80
74
  }
81
- _classPrivateFieldGet(this, _input).type = this.options.type;
82
- _classPrivateFieldGet(this, _input).placeholder = this.translateIfPossible(this.options.placeholder);
83
- _classPrivateFieldGet(this, _input).value = this.translateIfPossible(this.options.value);
75
+ _classPrivateFieldGet(_input, this).type = this.options.type;
76
+ _classPrivateFieldGet(_input, this).placeholder = this.translateIfPossible(this.options.placeholder);
77
+ _classPrivateFieldGet(_input, this).value = this.translateIfPossible(this.options.value);
84
78
  }
85
79
 
86
80
  /**
@@ -88,11 +82,11 @@ class InputUI extends _base.BaseUI {
88
82
  */
89
83
  focus() {
90
84
  if (this.isBuilt()) {
91
- _classPrivateFieldGet(this, _input).focus();
85
+ _classPrivateFieldGet(_input, this).focus();
92
86
  }
93
87
  }
94
88
  }
95
89
  exports.InputUI = InputUI;
96
- function _onKeyup2(event) {
90
+ function _onKeyup(event) {
97
91
  this.options.value = event.target.value;
98
92
  }
@@ -2,12 +2,9 @@ import "core-js/modules/es.error.cause.js";
2
2
  function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
3
3
  function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
4
4
  function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
5
- function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
6
- function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
7
- function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }
8
- function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
9
- 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; } }
10
- function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return fn; }
5
+ function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
6
+ function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
7
+ function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
11
8
  import { addClass } from "../../../helpers/dom/element.mjs";
12
9
  import { clone, extend } from "../../../helpers/object.mjs";
13
10
  import { BaseUI } from "./_base.mjs";
@@ -16,7 +13,7 @@ import { BaseUI } from "./_base.mjs";
16
13
  * @class InputUI
17
14
  */
18
15
  var _input = /*#__PURE__*/new WeakMap();
19
- var _onKeyup = /*#__PURE__*/new WeakSet();
16
+ var _InputUI_brand = /*#__PURE__*/new WeakSet();
20
17
  export class InputUI extends BaseUI {
21
18
  static get DEFAULTS() {
22
19
  return clone({
@@ -40,11 +37,8 @@ export class InputUI extends BaseUI {
40
37
  *
41
38
  * @param {Event} event The mouse event object.
42
39
  */
43
- _classPrivateMethodInitSpec(this, _onKeyup);
44
- _classPrivateFieldInitSpec(this, _input, {
45
- writable: true,
46
- value: void 0
47
- });
40
+ _classPrivateMethodInitSpec(this, _InputUI_brand);
41
+ _classPrivateFieldInitSpec(this, _input, void 0);
48
42
  this.registerHooks();
49
43
  }
50
44
 
@@ -52,7 +46,7 @@ export class InputUI extends BaseUI {
52
46
  * Register all necessary hooks.
53
47
  */
54
48
  registerHooks() {
55
- this.addLocalHook('keyup', event => _classPrivateMethodGet(this, _onKeyup, _onKeyup2).call(this, event));
49
+ this.addLocalHook('keyup', event => _assertClassBrand(_InputUI_brand, this, _onKeyup).call(this, event));
56
50
  }
57
51
 
58
52
  /**
@@ -61,7 +55,7 @@ export class InputUI extends BaseUI {
61
55
  build() {
62
56
  super.build();
63
57
  const icon = this.hot.rootDocument.createElement('div');
64
- _classPrivateFieldSet(this, _input, this._element.firstChild);
58
+ _classPrivateFieldSet(_input, this, this._element.firstChild);
65
59
  addClass(this._element, 'htUIInput');
66
60
  addClass(icon, 'htUIInputIcon');
67
61
  this._element.appendChild(icon);
@@ -75,9 +69,9 @@ export class InputUI extends BaseUI {
75
69
  if (!this.isBuilt()) {
76
70
  return;
77
71
  }
78
- _classPrivateFieldGet(this, _input).type = this.options.type;
79
- _classPrivateFieldGet(this, _input).placeholder = this.translateIfPossible(this.options.placeholder);
80
- _classPrivateFieldGet(this, _input).value = this.translateIfPossible(this.options.value);
72
+ _classPrivateFieldGet(_input, this).type = this.options.type;
73
+ _classPrivateFieldGet(_input, this).placeholder = this.translateIfPossible(this.options.placeholder);
74
+ _classPrivateFieldGet(_input, this).value = this.translateIfPossible(this.options.value);
81
75
  }
82
76
 
83
77
  /**
@@ -85,10 +79,10 @@ export class InputUI extends BaseUI {
85
79
  */
86
80
  focus() {
87
81
  if (this.isBuilt()) {
88
- _classPrivateFieldGet(this, _input).focus();
82
+ _classPrivateFieldGet(_input, this).focus();
89
83
  }
90
84
  }
91
85
  }
92
- function _onKeyup2(event) {
86
+ function _onKeyup(event) {
93
87
  this.options.value = event.target.value;
94
88
  }
@@ -6,11 +6,9 @@ var _object = require("../../../helpers/object");
6
6
  var _base = require("./_base");
7
7
  function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
8
8
  function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
9
- function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
10
- function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
11
- function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }
12
- function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
13
- 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; } }
9
+ function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
10
+ function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
11
+ function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
14
12
  /**
15
13
  * @private
16
14
  * @class LinkUI
@@ -34,10 +32,7 @@ class LinkUI extends _base.BaseUI {
34
32
 
35
33
  constructor(hotInstance, options) {
36
34
  super(hotInstance, (0, _object.extend)(LinkUI.DEFAULTS, options));
37
- _classPrivateFieldInitSpec(this, _link, {
38
- writable: true,
39
- value: void 0
40
- });
35
+ _classPrivateFieldInitSpec(this, _link, void 0);
41
36
  }
42
37
 
43
38
  /**
@@ -45,7 +40,7 @@ class LinkUI extends _base.BaseUI {
45
40
  */
46
41
  build() {
47
42
  super.build();
48
- _classPrivateFieldSet(this, _link, this._element.firstChild);
43
+ _classPrivateFieldSet(_link, this, this._element.firstChild);
49
44
  }
50
45
 
51
46
  /**
@@ -55,7 +50,7 @@ class LinkUI extends _base.BaseUI {
55
50
  if (!this.isBuilt()) {
56
51
  return;
57
52
  }
58
- _classPrivateFieldGet(this, _link).textContent = this.translateIfPossible(this.options.textContent);
53
+ _classPrivateFieldGet(_link, this).textContent = this.translateIfPossible(this.options.textContent);
59
54
  }
60
55
 
61
56
  /**
@@ -63,7 +58,7 @@ class LinkUI extends _base.BaseUI {
63
58
  */
64
59
  focus() {
65
60
  if (this.isBuilt()) {
66
- _classPrivateFieldGet(this, _link).focus();
61
+ _classPrivateFieldGet(_link, this).focus();
67
62
  }
68
63
  }
69
64
 
@@ -71,7 +66,7 @@ class LinkUI extends _base.BaseUI {
71
66
  * Activate the element.
72
67
  */
73
68
  activate() {
74
- _classPrivateFieldGet(this, _link).click();
69
+ _classPrivateFieldGet(_link, this).click();
75
70
  }
76
71
  }
77
72
  exports.LinkUI = LinkUI;
@@ -1,11 +1,9 @@
1
1
  import "core-js/modules/es.error.cause.js";
2
2
  function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
3
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; } }
4
+ function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
5
+ function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
6
+ function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
9
7
  import { clone, extend } from "../../../helpers/object.mjs";
10
8
  import { BaseUI } from "./_base.mjs";
11
9
  /**
@@ -31,10 +29,7 @@ export class LinkUI extends BaseUI {
31
29
 
32
30
  constructor(hotInstance, options) {
33
31
  super(hotInstance, extend(LinkUI.DEFAULTS, options));
34
- _classPrivateFieldInitSpec(this, _link, {
35
- writable: true,
36
- value: void 0
37
- });
32
+ _classPrivateFieldInitSpec(this, _link, void 0);
38
33
  }
39
34
 
40
35
  /**
@@ -42,7 +37,7 @@ export class LinkUI extends BaseUI {
42
37
  */
43
38
  build() {
44
39
  super.build();
45
- _classPrivateFieldSet(this, _link, this._element.firstChild);
40
+ _classPrivateFieldSet(_link, this, this._element.firstChild);
46
41
  }
47
42
 
48
43
  /**
@@ -52,7 +47,7 @@ export class LinkUI extends BaseUI {
52
47
  if (!this.isBuilt()) {
53
48
  return;
54
49
  }
55
- _classPrivateFieldGet(this, _link).textContent = this.translateIfPossible(this.options.textContent);
50
+ _classPrivateFieldGet(_link, this).textContent = this.translateIfPossible(this.options.textContent);
56
51
  }
57
52
 
58
53
  /**
@@ -60,7 +55,7 @@ export class LinkUI extends BaseUI {
60
55
  */
61
56
  focus() {
62
57
  if (this.isBuilt()) {
63
- _classPrivateFieldGet(this, _link).focus();
58
+ _classPrivateFieldGet(_link, this).focus();
64
59
  }
65
60
  }
66
61
 
@@ -68,6 +63,6 @@ export class LinkUI extends BaseUI {
68
63
  * Activate the element.
69
64
  */
70
65
  activate() {
71
- _classPrivateFieldGet(this, _link).click();
66
+ _classPrivateFieldGet(_link, this).click();
72
67
  }
73
68
  }