handsontable 0.0.0-next-53a190b-20240403 → 0.0.0-next-5a535ed-20240403

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 (284) hide show
  1. package/3rdparty/walkontable/src/calculator/viewportColumns.js +17 -12
  2. package/3rdparty/walkontable/src/calculator/viewportColumns.mjs +17 -12
  3. package/3rdparty/walkontable/src/calculator/viewportRows.js +15 -10
  4. package/3rdparty/walkontable/src/calculator/viewportRows.mjs +15 -10
  5. package/3rdparty/walkontable/src/cell/coords.js +17 -12
  6. package/3rdparty/walkontable/src/cell/coords.mjs +17 -12
  7. package/3rdparty/walkontable/src/cell/range.d.ts +1 -2
  8. package/3rdparty/walkontable/src/cell/range.js +28 -40
  9. package/3rdparty/walkontable/src/cell/range.mjs +28 -40
  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 +104 -72
  13. package/3rdparty/walkontable/src/event.mjs +104 -72
  14. package/3rdparty/walkontable/src/overlay/inlineStart.js +1 -15
  15. package/3rdparty/walkontable/src/overlay/inlineStart.mjs +2 -16
  16. package/3rdparty/walkontable/src/overlay/top.js +0 -11
  17. package/3rdparty/walkontable/src/overlay/top.mjs +1 -12
  18. package/3rdparty/walkontable/src/overlays.js +4 -46
  19. package/3rdparty/walkontable/src/overlays.mjs +4 -46
  20. package/3rdparty/walkontable/src/scroll.js +17 -15
  21. package/3rdparty/walkontable/src/scroll.mjs +17 -15
  22. package/3rdparty/walkontable/src/selection/manager.js +69 -48
  23. package/3rdparty/walkontable/src/selection/manager.mjs +69 -48
  24. package/3rdparty/walkontable/src/selection/scanner.js +42 -33
  25. package/3rdparty/walkontable/src/selection/scanner.mjs +42 -33
  26. package/3rdparty/walkontable/src/utils/columnStretching.js +44 -27
  27. package/3rdparty/walkontable/src/utils/columnStretching.mjs +44 -27
  28. package/3rdparty/walkontable/src/utils/orderView/view.js +1 -1
  29. package/3rdparty/walkontable/src/utils/orderView/view.mjs +1 -1
  30. package/base.js +2 -2
  31. package/base.mjs +2 -2
  32. package/core/viewportScroll/index.js +1 -4
  33. package/core/viewportScroll/index.mjs +1 -4
  34. package/core.d.ts +3 -4
  35. package/core.js +22 -77
  36. package/core.mjs +22 -77
  37. package/dataMap/dataSource.js +1 -1
  38. package/dataMap/dataSource.mjs +1 -1
  39. package/dataMap/metaManager/metaLayers/cellMeta.js +1 -1
  40. package/dataMap/metaManager/metaLayers/cellMeta.mjs +1 -1
  41. package/dataMap/metaManager/metaSchema.js +1 -1
  42. package/dataMap/metaManager/metaSchema.mjs +1 -1
  43. package/dataMap/replaceData.js +1 -1
  44. package/dataMap/replaceData.mjs +1 -1
  45. package/dist/handsontable.css +4 -4
  46. package/dist/handsontable.full.css +4 -4
  47. package/dist/handsontable.full.js +9121 -9062
  48. package/dist/handsontable.full.min.css +3 -3
  49. package/dist/handsontable.full.min.js +292 -292
  50. package/dist/handsontable.js +6573 -6967
  51. package/dist/handsontable.min.css +3 -3
  52. package/dist/handsontable.min.js +25 -25
  53. package/dist/languages/all.min.js +1 -1
  54. package/dist/languages/ar-AR.min.js +1 -1
  55. package/dist/languages/cs-CZ.min.js +1 -1
  56. package/dist/languages/de-CH.min.js +1 -1
  57. package/dist/languages/de-DE.min.js +1 -1
  58. package/dist/languages/en-US.min.js +1 -1
  59. package/dist/languages/es-MX.min.js +1 -1
  60. package/dist/languages/fr-FR.min.js +1 -1
  61. package/dist/languages/hr-HR.min.js +1 -1
  62. package/dist/languages/it-IT.min.js +1 -1
  63. package/dist/languages/ja-JP.min.js +1 -1
  64. package/dist/languages/ko-KR.min.js +1 -1
  65. package/dist/languages/lv-LV.min.js +1 -1
  66. package/dist/languages/nb-NO.min.js +1 -1
  67. package/dist/languages/nl-NL.min.js +1 -1
  68. package/dist/languages/pl-PL.min.js +1 -1
  69. package/dist/languages/pt-BR.min.js +1 -1
  70. package/dist/languages/ru-RU.min.js +1 -1
  71. package/dist/languages/sr-SP.min.js +1 -1
  72. package/dist/languages/zh-CN.min.js +1 -1
  73. package/dist/languages/zh-TW.min.js +1 -1
  74. package/editorManager.js +23 -25
  75. package/editorManager.mjs +23 -25
  76. package/editors/autocompleteEditor/autocompleteEditor.js +10 -6
  77. package/editors/autocompleteEditor/autocompleteEditor.mjs +10 -6
  78. package/editors/selectEditor/selectEditor.js +19 -20
  79. package/editors/selectEditor/selectEditor.mjs +19 -20
  80. package/eventManager.js +1 -1
  81. package/eventManager.mjs +1 -1
  82. package/focusManager.js +82 -64
  83. package/focusManager.mjs +82 -64
  84. package/helpers/dom/element.js +1 -23
  85. package/helpers/dom/element.mjs +1 -21
  86. package/helpers/mixed.js +1 -1
  87. package/helpers/mixed.mjs +1 -1
  88. package/helpers/object.js +2 -2
  89. package/helpers/object.mjs +2 -2
  90. package/index.d.ts +0 -10
  91. package/package.json +2 -7
  92. package/pluginHooks.d.ts +3 -4
  93. package/pluginHooks.js +38 -99
  94. package/pluginHooks.mjs +38 -99
  95. package/plugins/autoColumnSize/autoColumnSize.js +65 -49
  96. package/plugins/autoColumnSize/autoColumnSize.mjs +65 -49
  97. package/plugins/autoRowSize/autoRowSize.js +34 -28
  98. package/plugins/autoRowSize/autoRowSize.mjs +34 -28
  99. package/plugins/autofill/autofill.js +38 -30
  100. package/plugins/autofill/autofill.mjs +38 -30
  101. package/plugins/base/base.js +17 -12
  102. package/plugins/base/base.mjs +17 -12
  103. package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.js +5 -5
  104. package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.mjs +5 -5
  105. package/plugins/collapsibleColumns/collapsibleColumns.js +50 -59
  106. package/plugins/collapsibleColumns/collapsibleColumns.mjs +50 -59
  107. package/plugins/columnSorting/columnSorting.js +45 -49
  108. package/plugins/columnSorting/columnSorting.mjs +45 -49
  109. package/plugins/columnSummary/columnSummary.js +26 -22
  110. package/plugins/columnSummary/columnSummary.mjs +26 -22
  111. package/plugins/comments/comments.js +158 -116
  112. package/plugins/comments/comments.mjs +158 -116
  113. package/plugins/contextMenu/contextMenu.js +26 -20
  114. package/plugins/contextMenu/contextMenu.mjs +26 -20
  115. package/plugins/contextMenu/itemsFactory.js +1 -1
  116. package/plugins/contextMenu/itemsFactory.mjs +1 -1
  117. package/plugins/contextMenu/menu/defaultShortcutsList.js +10 -26
  118. package/plugins/contextMenu/menu/defaultShortcutsList.mjs +10 -26
  119. package/plugins/contextMenu/menu/menu.js +21 -13
  120. package/plugins/contextMenu/menu/menu.mjs +21 -13
  121. package/plugins/contextMenu/menu/positioner.js +58 -41
  122. package/plugins/contextMenu/menu/positioner.mjs +58 -41
  123. package/plugins/copyPaste/copyPaste.js +157 -116
  124. package/plugins/copyPaste/copyPaste.mjs +157 -116
  125. package/plugins/copyPaste/copyableRanges.js +66 -43
  126. package/plugins/copyPaste/copyableRanges.mjs +66 -43
  127. package/plugins/customBorders/customBorders.js +13 -11
  128. package/plugins/customBorders/customBorders.mjs +13 -11
  129. package/plugins/dragToScroll/dragToScroll.js +6 -6
  130. package/plugins/dragToScroll/dragToScroll.mjs +6 -6
  131. package/plugins/dropdownMenu/dropdownMenu.js +106 -80
  132. package/plugins/dropdownMenu/dropdownMenu.mjs +106 -80
  133. package/plugins/exportFile/dataProvider.js +1 -1
  134. package/plugins/exportFile/dataProvider.mjs +1 -1
  135. package/plugins/filters/component/actionBar.js +9 -9
  136. package/plugins/filters/component/actionBar.mjs +8 -8
  137. package/plugins/filters/component/condition.js +15 -13
  138. package/plugins/filters/component/condition.mjs +15 -13
  139. package/plugins/filters/component/operators.js +6 -6
  140. package/plugins/filters/component/operators.mjs +6 -6
  141. package/plugins/filters/component/value.js +28 -24
  142. package/plugins/filters/component/value.mjs +28 -24
  143. package/plugins/filters/conditionUpdateObserver.js +24 -22
  144. package/plugins/filters/conditionUpdateObserver.mjs +24 -22
  145. package/plugins/filters/dataFilter.js +1 -1
  146. package/plugins/filters/dataFilter.mjs +1 -1
  147. package/plugins/filters/filters.js +95 -81
  148. package/plugins/filters/filters.mjs +95 -81
  149. package/plugins/filters/ui/input.js +19 -13
  150. package/plugins/filters/ui/input.mjs +19 -13
  151. package/plugins/filters/ui/link.js +13 -8
  152. package/plugins/filters/ui/link.mjs +13 -8
  153. package/plugins/filters/ui/multipleSelect.js +112 -85
  154. package/plugins/filters/ui/multipleSelect.mjs +112 -85
  155. package/plugins/filters/ui/radioInput.js +20 -12
  156. package/plugins/filters/ui/radioInput.mjs +20 -12
  157. package/plugins/filters/ui/select.js +72 -50
  158. package/plugins/filters/ui/select.mjs +71 -49
  159. package/plugins/formulas/formulas.js +326 -268
  160. package/plugins/formulas/formulas.mjs +327 -269
  161. package/plugins/formulas/indexSyncer/axisSyncer.js +61 -38
  162. package/plugins/formulas/indexSyncer/axisSyncer.mjs +61 -38
  163. package/plugins/formulas/indexSyncer/index.js +48 -25
  164. package/plugins/formulas/indexSyncer/index.mjs +48 -25
  165. package/plugins/hiddenColumns/hiddenColumns.js +83 -64
  166. package/plugins/hiddenColumns/hiddenColumns.mjs +83 -64
  167. package/plugins/hiddenRows/hiddenRows.js +82 -63
  168. package/plugins/hiddenRows/hiddenRows.mjs +82 -63
  169. package/plugins/manualColumnFreeze/manualColumnFreeze.js +32 -24
  170. package/plugins/manualColumnFreeze/manualColumnFreeze.mjs +33 -25
  171. package/plugins/manualColumnMove/manualColumnMove.js +170 -126
  172. package/plugins/manualColumnMove/manualColumnMove.mjs +170 -126
  173. package/plugins/manualColumnResize/manualColumnResize.js +230 -169
  174. package/plugins/manualColumnResize/manualColumnResize.mjs +230 -169
  175. package/plugins/manualRowMove/manualRowMove.js +128 -99
  176. package/plugins/manualRowMove/manualRowMove.mjs +128 -99
  177. package/plugins/manualRowResize/manualRowResize.js +209 -150
  178. package/plugins/manualRowResize/manualRowResize.mjs +209 -150
  179. package/plugins/mergeCells/calculations/selection.js +71 -2
  180. package/plugins/mergeCells/calculations/selection.mjs +71 -2
  181. package/plugins/mergeCells/cellsCollection.js +1 -117
  182. package/plugins/mergeCells/cellsCollection.mjs +1 -117
  183. package/plugins/mergeCells/contextMenuItem/toggleMerge.js +1 -11
  184. package/plugins/mergeCells/contextMenuItem/toggleMerge.mjs +1 -11
  185. package/plugins/mergeCells/mergeCells.js +397 -499
  186. package/plugins/mergeCells/mergeCells.mjs +397 -499
  187. package/plugins/multiColumnSorting/multiColumnSorting.js +2 -8
  188. package/plugins/multiColumnSorting/multiColumnSorting.mjs +2 -8
  189. package/plugins/multipleSelectionHandles/multipleSelectionHandles.js +1 -1
  190. package/plugins/multipleSelectionHandles/multipleSelectionHandles.mjs +1 -1
  191. package/plugins/nestedHeaders/nestedHeaders.js +253 -205
  192. package/plugins/nestedHeaders/nestedHeaders.mjs +254 -206
  193. package/plugins/nestedHeaders/stateManager/headersTree.js +32 -21
  194. package/plugins/nestedHeaders/stateManager/headersTree.mjs +32 -21
  195. package/plugins/nestedHeaders/stateManager/index.js +41 -30
  196. package/plugins/nestedHeaders/stateManager/index.mjs +41 -30
  197. package/plugins/nestedHeaders/stateManager/sourceSettings.js +30 -19
  198. package/plugins/nestedHeaders/stateManager/sourceSettings.mjs +30 -19
  199. package/plugins/nestedRows/data/dataManager.js +1 -1
  200. package/plugins/nestedRows/data/dataManager.mjs +1 -1
  201. package/plugins/nestedRows/nestedRows.js +182 -151
  202. package/plugins/nestedRows/nestedRows.mjs +183 -152
  203. package/plugins/nestedRows/ui/contextMenu.js +15 -11
  204. package/plugins/nestedRows/ui/contextMenu.mjs +14 -10
  205. package/plugins/nestedRows/utils/rowMoveController.js +1 -1
  206. package/plugins/nestedRows/utils/rowMoveController.mjs +1 -1
  207. package/plugins/persistentState/storage.js +2 -2
  208. package/plugins/persistentState/storage.mjs +2 -2
  209. package/plugins/search/search.js +7 -7
  210. package/plugins/search/search.mjs +7 -7
  211. package/plugins/touchScroll/touchScroll.js +19 -15
  212. package/plugins/touchScroll/touchScroll.mjs +20 -16
  213. package/plugins/trimRows/trimRows.js +6 -6
  214. package/plugins/trimRows/trimRows.mjs +6 -6
  215. package/renderers/checkboxRenderer/checkboxRenderer.js +5 -8
  216. package/renderers/checkboxRenderer/checkboxRenderer.mjs +5 -8
  217. package/selection/highlight/highlight.js +14 -14
  218. package/selection/highlight/highlight.mjs +13 -13
  219. package/selection/highlight/visualSelection.js +0 -2
  220. package/selection/highlight/visualSelection.mjs +0 -2
  221. package/selection/selection.js +67 -225
  222. package/selection/selection.mjs +66 -224
  223. package/selection/transformation.js +118 -149
  224. package/selection/transformation.mjs +118 -149
  225. package/shortcutContexts/commands/editor/closeAndSave.js +2 -2
  226. package/shortcutContexts/commands/editor/closeAndSave.mjs +2 -2
  227. package/shortcutContexts/commands/editor/open.js +3 -18
  228. package/shortcutContexts/commands/editor/open.mjs +3 -18
  229. package/shortcutContexts/commands/extendCellsSelection/down.js +1 -1
  230. package/shortcutContexts/commands/extendCellsSelection/down.mjs +1 -1
  231. package/shortcutContexts/commands/extendCellsSelection/left.js +1 -1
  232. package/shortcutContexts/commands/extendCellsSelection/left.mjs +1 -1
  233. package/shortcutContexts/commands/extendCellsSelection/right.js +1 -1
  234. package/shortcutContexts/commands/extendCellsSelection/right.mjs +1 -1
  235. package/shortcutContexts/commands/extendCellsSelection/toColumns.js +1 -1
  236. package/shortcutContexts/commands/extendCellsSelection/toColumns.mjs +1 -1
  237. package/shortcutContexts/commands/extendCellsSelection/toMostBottom.js +1 -3
  238. package/shortcutContexts/commands/extendCellsSelection/toMostBottom.mjs +1 -3
  239. package/shortcutContexts/commands/extendCellsSelection/toMostInlineEnd.js +3 -9
  240. package/shortcutContexts/commands/extendCellsSelection/toMostInlineEnd.mjs +3 -9
  241. package/shortcutContexts/commands/extendCellsSelection/toMostInlineStart.js +3 -10
  242. package/shortcutContexts/commands/extendCellsSelection/toMostInlineStart.mjs +3 -10
  243. package/shortcutContexts/commands/extendCellsSelection/toMostLeft.js +1 -3
  244. package/shortcutContexts/commands/extendCellsSelection/toMostLeft.mjs +1 -3
  245. package/shortcutContexts/commands/extendCellsSelection/toMostRight.js +1 -3
  246. package/shortcutContexts/commands/extendCellsSelection/toMostRight.mjs +1 -3
  247. package/shortcutContexts/commands/extendCellsSelection/toMostTop.js +1 -3
  248. package/shortcutContexts/commands/extendCellsSelection/toMostTop.mjs +1 -3
  249. package/shortcutContexts/commands/extendCellsSelection/toRows.js +1 -1
  250. package/shortcutContexts/commands/extendCellsSelection/toRows.mjs +1 -1
  251. package/shortcutContexts/commands/extendCellsSelection/up.js +1 -1
  252. package/shortcutContexts/commands/extendCellsSelection/up.mjs +1 -1
  253. package/shortcutContexts/commands/moveCellSelection/inlineEnd.js +1 -6
  254. package/shortcutContexts/commands/moveCellSelection/inlineEnd.mjs +1 -6
  255. package/shortcutContexts/commands/moveCellSelection/inlineStart.js +1 -6
  256. package/shortcutContexts/commands/moveCellSelection/inlineStart.mjs +1 -6
  257. package/shortcutContexts/grid.js +3 -9
  258. package/shortcutContexts/grid.mjs +3 -9
  259. package/shortcuts/context.js +1 -2
  260. package/shortcuts/context.mjs +1 -2
  261. package/tableView.js +78 -52
  262. package/tableView.mjs +78 -52
  263. package/translations/changesObservable/observable.js +38 -21
  264. package/translations/changesObservable/observable.mjs +38 -21
  265. package/translations/changesObservable/observer.js +12 -7
  266. package/translations/changesObservable/observer.mjs +11 -6
  267. package/translations/mapCollections/aggregatedCollection.js +1 -1
  268. package/translations/mapCollections/aggregatedCollection.mjs +1 -1
  269. package/translations/maps/indexMap.js +1 -1
  270. package/translations/maps/indexMap.mjs +1 -1
  271. package/utils/dataStructures/linkedList.js +1 -6
  272. package/utils/dataStructures/linkedList.mjs +1 -6
  273. package/utils/dataStructures/tree.js +1 -1
  274. package/utils/dataStructures/tree.mjs +1 -1
  275. package/utils/interval.js +44 -26
  276. package/utils/interval.mjs +44 -26
  277. package/core/viewportScroll/scrollStrategies/focusScroll.js +0 -15
  278. package/core/viewportScroll/scrollStrategies/focusScroll.mjs +0 -11
  279. package/i18n/languages/ar-AR.d.ts +0 -5
  280. package/i18n/languages/cs-CZ.d.ts +0 -5
  281. package/i18n/languages/hr-HR.d.ts +0 -5
  282. package/i18n/languages/sr-SP.d.ts +0 -5
  283. package/plugins/mergeCells/focusOrder.js +0 -305
  284. package/plugins/mergeCells/focusOrder.mjs +0 -300
@@ -1,11 +1,14 @@
1
- import "core-js/modules/es.error.cause.js";
2
1
  import "core-js/modules/es.array.push.js";
2
+ import "core-js/modules/es.error.cause.js";
3
3
  function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
4
4
  function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
5
5
  function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
6
- function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
7
- function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
8
- 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"); }
6
+ function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return fn; }
7
+ function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
8
+ function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
9
+ function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }
10
+ function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
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; } }
9
12
  import { addClass, getScrollbarWidth } from "../../../helpers/dom/element.mjs";
10
13
  import { clone, extend } from "../../../helpers/object.mjs";
11
14
  import { arrayFilter, arrayMap, arrayEach } from "../../../helpers/array.mjs";
@@ -30,7 +33,10 @@ var _locale = /*#__PURE__*/new WeakMap();
30
33
  var _searchInput = /*#__PURE__*/new WeakMap();
31
34
  var _selectAllUI = /*#__PURE__*/new WeakMap();
32
35
  var _clearAllUI = /*#__PURE__*/new WeakMap();
33
- var _MultipleSelectUI_brand = /*#__PURE__*/new WeakSet();
36
+ var _onInput = /*#__PURE__*/new WeakSet();
37
+ var _onInputKeyDown = /*#__PURE__*/new WeakSet();
38
+ var _onSelectAllClick = /*#__PURE__*/new WeakSet();
39
+ var _onClearAllClick = /*#__PURE__*/new WeakSet();
34
40
  export class MultipleSelectUI extends BaseUI {
35
41
  static get DEFAULTS() {
36
42
  return clone({
@@ -47,52 +53,88 @@ export class MultipleSelectUI extends BaseUI {
47
53
 
48
54
  constructor(hotInstance, options) {
49
55
  super(hotInstance, extend(MultipleSelectUI.DEFAULTS, options));
56
+ /**
57
+ * On click listener for "Clear" link.
58
+ *
59
+ * @param {DOMEvent} event The mouse event object.
60
+ */
61
+ _classPrivateMethodInitSpec(this, _onClearAllClick);
62
+ /**
63
+ * On click listener for "Select all" link.
64
+ *
65
+ * @param {DOMEvent} event The mouse event object.
66
+ */
67
+ _classPrivateMethodInitSpec(this, _onSelectAllClick);
68
+ /**
69
+ * 'keydown' event listener for input element.
70
+ *
71
+ * @param {Event} event DOM event.
72
+ */
73
+ _classPrivateMethodInitSpec(this, _onInputKeyDown);
50
74
  /**
51
75
  * 'input' event listener for input element.
52
76
  *
53
77
  * @param {Event} event DOM event.
54
78
  */
55
- _classPrivateMethodInitSpec(this, _MultipleSelectUI_brand);
56
- _classPrivateFieldInitSpec(this, _items, []);
79
+ _classPrivateMethodInitSpec(this, _onInput);
80
+ _classPrivateFieldInitSpec(this, _items, {
81
+ writable: true,
82
+ value: []
83
+ });
57
84
  /**
58
85
  * Handsontable instance used as items list element.
59
86
  *
60
87
  * @type {Handsontable}
61
88
  */
62
- _classPrivateFieldInitSpec(this, _itemsBox, void 0);
89
+ _classPrivateFieldInitSpec(this, _itemsBox, {
90
+ writable: true,
91
+ value: void 0
92
+ });
63
93
  /**
64
94
  * A locale for the component used to compare filtered values.
65
95
  *
66
96
  * @type {string}
67
97
  */
68
- _classPrivateFieldInitSpec(this, _locale, void 0);
98
+ _classPrivateFieldInitSpec(this, _locale, {
99
+ writable: true,
100
+ value: void 0
101
+ });
69
102
  /**
70
103
  * Input element.
71
104
  *
72
105
  * @type {InputUI}
73
106
  */
74
- _classPrivateFieldInitSpec(this, _searchInput, void 0);
107
+ _classPrivateFieldInitSpec(this, _searchInput, {
108
+ writable: true,
109
+ value: void 0
110
+ });
75
111
  /**
76
112
  * "Select all" UI element.
77
113
  *
78
114
  * @type {LinkUI}
79
115
  */
80
- _classPrivateFieldInitSpec(this, _selectAllUI, void 0);
116
+ _classPrivateFieldInitSpec(this, _selectAllUI, {
117
+ writable: true,
118
+ value: void 0
119
+ });
81
120
  /**
82
121
  * "Clear" UI element.
83
122
  *
84
123
  * @type {LinkUI}
85
124
  */
86
- _classPrivateFieldInitSpec(this, _clearAllUI, void 0);
87
- _classPrivateFieldSet(_searchInput, this, new InputUI(this.hot, {
125
+ _classPrivateFieldInitSpec(this, _clearAllUI, {
126
+ writable: true,
127
+ value: void 0
128
+ });
129
+ _classPrivateFieldSet(this, _searchInput, new InputUI(this.hot, {
88
130
  placeholder: C.FILTERS_BUTTONS_PLACEHOLDER_SEARCH,
89
131
  className: 'htUIMultipleSelectSearch'
90
132
  }));
91
- _classPrivateFieldSet(_selectAllUI, this, new LinkUI(this.hot, {
133
+ _classPrivateFieldSet(this, _selectAllUI, new LinkUI(this.hot, {
92
134
  textContent: C.FILTERS_BUTTONS_SELECT_ALL,
93
135
  className: 'htUISelectAll'
94
136
  }));
95
- _classPrivateFieldSet(_clearAllUI, this, new LinkUI(this.hot, {
137
+ _classPrivateFieldSet(this, _clearAllUI, new LinkUI(this.hot, {
96
138
  textContent: C.FILTERS_BUTTONS_CLEAR,
97
139
  className: 'htUIClearAll'
98
140
  }));
@@ -105,17 +147,17 @@ export class MultipleSelectUI extends BaseUI {
105
147
  * @returns {Handsontable}
106
148
  */
107
149
  getItemsBox() {
108
- return _classPrivateFieldGet(_itemsBox, this);
150
+ return _classPrivateFieldGet(this, _itemsBox);
109
151
  }
110
152
 
111
153
  /**
112
154
  * Register all necessary hooks.
113
155
  */
114
156
  registerHooks() {
115
- _classPrivateFieldGet(_searchInput, this).addLocalHook('keydown', event => _assertClassBrand(_MultipleSelectUI_brand, this, _onInputKeyDown).call(this, event));
116
- _classPrivateFieldGet(_searchInput, this).addLocalHook('input', event => _assertClassBrand(_MultipleSelectUI_brand, this, _onInput).call(this, event));
117
- _classPrivateFieldGet(_selectAllUI, this).addLocalHook('click', event => _assertClassBrand(_MultipleSelectUI_brand, this, _onSelectAllClick).call(this, event));
118
- _classPrivateFieldGet(_clearAllUI, this).addLocalHook('click', event => _assertClassBrand(_MultipleSelectUI_brand, this, _onClearAllClick).call(this, event));
157
+ _classPrivateFieldGet(this, _searchInput).addLocalHook('keydown', event => _classPrivateMethodGet(this, _onInputKeyDown, _onInputKeyDown2).call(this, event));
158
+ _classPrivateFieldGet(this, _searchInput).addLocalHook('input', event => _classPrivateMethodGet(this, _onInput, _onInput2).call(this, event));
159
+ _classPrivateFieldGet(this, _selectAllUI).addLocalHook('click', event => _classPrivateMethodGet(this, _onSelectAllClick, _onSelectAllClick2).call(this, event));
160
+ _classPrivateFieldGet(this, _clearAllUI).addLocalHook('click', event => _classPrivateMethodGet(this, _onClearAllClick, _onClearAllClick2).call(this, event));
119
161
  }
120
162
 
121
163
  /**
@@ -124,9 +166,9 @@ export class MultipleSelectUI extends BaseUI {
124
166
  * @param {Array} items Array of objects with `checked` and `label` property.
125
167
  */
126
168
  setItems(items) {
127
- _classPrivateFieldSet(_items, this, items);
128
- if (_classPrivateFieldGet(_itemsBox, this)) {
129
- _classPrivateFieldGet(_itemsBox, this).loadData(_classPrivateFieldGet(_items, this));
169
+ _classPrivateFieldSet(this, _items, items);
170
+ if (_classPrivateFieldGet(this, _itemsBox)) {
171
+ _classPrivateFieldGet(this, _itemsBox).loadData(_classPrivateFieldGet(this, _items));
130
172
  }
131
173
  }
132
174
 
@@ -136,7 +178,7 @@ export class MultipleSelectUI extends BaseUI {
136
178
  * @param {string} locale Locale used for filter actions performed on data, ie. `en-US`.
137
179
  */
138
180
  setLocale(locale) {
139
- _classPrivateFieldSet(_locale, this, locale);
181
+ _classPrivateFieldSet(this, _locale, locale);
140
182
  }
141
183
 
142
184
  /**
@@ -145,7 +187,7 @@ export class MultipleSelectUI extends BaseUI {
145
187
  * @returns {string}
146
188
  */
147
189
  getLocale() {
148
- return _classPrivateFieldGet(_locale, this);
190
+ return _classPrivateFieldGet(this, _locale);
149
191
  }
150
192
 
151
193
  /**
@@ -154,7 +196,7 @@ export class MultipleSelectUI extends BaseUI {
154
196
  * @returns {Array}
155
197
  */
156
198
  getItems() {
157
- return [..._classPrivateFieldGet(_items, this)];
199
+ return [..._classPrivateFieldGet(this, _items)];
158
200
  }
159
201
 
160
202
  /**
@@ -163,7 +205,7 @@ export class MultipleSelectUI extends BaseUI {
163
205
  * @returns {Array} Array of selected values.
164
206
  */
165
207
  getValue() {
166
- return itemsToValue(_classPrivateFieldGet(_items, this));
208
+ return itemsToValue(_classPrivateFieldGet(this, _items));
167
209
  }
168
210
 
169
211
  /**
@@ -172,7 +214,7 @@ export class MultipleSelectUI extends BaseUI {
172
214
  * @returns {InputUI}
173
215
  */
174
216
  getSearchInputElement() {
175
- return _classPrivateFieldGet(_searchInput, this);
217
+ return _classPrivateFieldGet(this, _searchInput);
176
218
  }
177
219
 
178
220
  /**
@@ -181,7 +223,7 @@ export class MultipleSelectUI extends BaseUI {
181
223
  * @returns {LinkUI}
182
224
  */
183
225
  getSelectAllElement() {
184
- return _classPrivateFieldGet(_selectAllUI, this);
226
+ return _classPrivateFieldGet(this, _selectAllUI);
185
227
  }
186
228
 
187
229
  /**
@@ -190,7 +232,7 @@ export class MultipleSelectUI extends BaseUI {
190
232
  * @returns {LinkUI}
191
233
  */
192
234
  getClearAllElement() {
193
- return _classPrivateFieldGet(_clearAllUI, this);
235
+ return _classPrivateFieldGet(this, _clearAllUI);
194
236
  }
195
237
 
196
238
  /**
@@ -199,7 +241,7 @@ export class MultipleSelectUI extends BaseUI {
199
241
  * @returns {boolean}
200
242
  */
201
243
  isSelectedAllValues() {
202
- return _classPrivateFieldGet(_items, this).length === this.getValue().length;
244
+ return _classPrivateFieldGet(this, _items).length === this.getValue().length;
203
245
  }
204
246
 
205
247
  /**
@@ -213,22 +255,22 @@ export class MultipleSelectUI extends BaseUI {
213
255
  const itemsBoxWrapper = rootDocument.createElement('div');
214
256
  const selectionControl = new BaseUI(this.hot, {
215
257
  className: 'htUISelectionControls',
216
- children: [_classPrivateFieldGet(_selectAllUI, this), _classPrivateFieldGet(_clearAllUI, this)]
258
+ children: [_classPrivateFieldGet(this, _selectAllUI), _classPrivateFieldGet(this, _clearAllUI)]
217
259
  });
218
- this._element.appendChild(_classPrivateFieldGet(_searchInput, this).element);
260
+ this._element.appendChild(_classPrivateFieldGet(this, _searchInput).element);
219
261
  this._element.appendChild(selectionControl.element);
220
262
  this._element.appendChild(itemsBoxWrapper);
221
263
  const hotInitializer = wrapper => {
222
264
  if (!this._element) {
223
265
  return;
224
266
  }
225
- if (_classPrivateFieldGet(_itemsBox, this)) {
226
- _classPrivateFieldGet(_itemsBox, this).destroy();
267
+ if (_classPrivateFieldGet(this, _itemsBox)) {
268
+ _classPrivateFieldGet(this, _itemsBox).destroy();
227
269
  }
228
270
  addClass(wrapper, 'htUIMultipleSelectHot');
229
271
  // Constructs and initializes a new Handsontable instance
230
- _classPrivateFieldSet(_itemsBox, this, new this.hot.constructor(wrapper, {
231
- data: _classPrivateFieldGet(_items, this),
272
+ _classPrivateFieldSet(this, _itemsBox, new this.hot.constructor(wrapper, {
273
+ data: _classPrivateFieldGet(this, _items),
232
274
  columns: [{
233
275
  data: 'checked',
234
276
  type: 'checkbox',
@@ -244,13 +286,13 @@ export class MultipleSelectUI extends BaseUI {
244
286
  this.runLocalHooks('focus', this);
245
287
  },
246
288
  beforeOnCellMouseUp: () => {
247
- _classPrivateFieldGet(_itemsBox, this).listen();
289
+ _classPrivateFieldGet(this, _itemsBox).listen();
248
290
  },
249
291
  maxCols: 1,
250
292
  autoWrapCol: true,
251
293
  height: 110,
252
294
  // Workaround for #151.
253
- colWidths: () => _classPrivateFieldGet(_itemsBox, this).container.scrollWidth - getScrollbarWidth(rootDocument),
295
+ colWidths: () => _classPrivateFieldGet(this, _itemsBox).container.scrollWidth - getScrollbarWidth(rootDocument),
254
296
  copyPaste: false,
255
297
  disableVisualSelection: 'area',
256
298
  fillHandle: false,
@@ -261,8 +303,8 @@ export class MultipleSelectUI extends BaseUI {
261
303
  },
262
304
  layoutDirection: this.hot.isRtl() ? 'rtl' : 'ltr'
263
305
  }));
264
- _classPrivateFieldGet(_itemsBox, this).init();
265
- const shortcutManager = _classPrivateFieldGet(_itemsBox, this).getShortcutManager();
306
+ _classPrivateFieldGet(this, _itemsBox).init();
307
+ const shortcutManager = _classPrivateFieldGet(this, _itemsBox).getShortcutManager();
266
308
  const gridContext = shortcutManager.getContext('grid');
267
309
  gridContext.removeShortcutsByKeys(['Tab']);
268
310
  gridContext.removeShortcutsByKeys(['Shift', 'Tab']);
@@ -276,7 +318,7 @@ export class MultipleSelectUI extends BaseUI {
276
318
  gridContext.addShortcut({
277
319
  keys: [['Tab'], ['Shift', 'Tab']],
278
320
  callback: event => {
279
- _classPrivateFieldGet(_itemsBox, this).deselectCell();
321
+ _classPrivateFieldGet(this, _itemsBox).deselectCell();
280
322
  this.runLocalHooks('keydown', event, this);
281
323
  this.runLocalHooks('listTabKeydown', event, this);
282
324
  },
@@ -292,7 +334,7 @@ export class MultipleSelectUI extends BaseUI {
292
334
  */
293
335
  focus() {
294
336
  if (this.isBuilt()) {
295
- _classPrivateFieldGet(_itemsBox, this).listen();
337
+ _classPrivateFieldGet(this, _itemsBox).listen();
296
338
  }
297
339
  }
298
340
 
@@ -300,9 +342,9 @@ export class MultipleSelectUI extends BaseUI {
300
342
  * Reset DOM structure.
301
343
  */
302
344
  reset() {
303
- _classPrivateFieldGet(_searchInput, this).reset();
304
- _classPrivateFieldGet(_selectAllUI, this).reset();
305
- _classPrivateFieldGet(_clearAllUI, this).reset();
345
+ _classPrivateFieldGet(this, _searchInput).reset();
346
+ _classPrivateFieldGet(this, _selectAllUI).reset();
347
+ _classPrivateFieldGet(this, _clearAllUI).reset();
306
348
  }
307
349
 
308
350
  /**
@@ -312,7 +354,7 @@ export class MultipleSelectUI extends BaseUI {
312
354
  if (!this.isBuilt()) {
313
355
  return;
314
356
  }
315
- _classPrivateFieldGet(_itemsBox, this).loadData(valueToItems(_classPrivateFieldGet(_items, this), this.options.value));
357
+ _classPrivateFieldGet(this, _itemsBox).loadData(valueToItems(_classPrivateFieldGet(this, _items), this.options.value));
316
358
  super.update();
317
359
  }
318
360
 
@@ -320,72 +362,57 @@ export class MultipleSelectUI extends BaseUI {
320
362
  * Destroy instance.
321
363
  */
322
364
  destroy() {
323
- if (_classPrivateFieldGet(_itemsBox, this)) {
324
- _classPrivateFieldGet(_itemsBox, this).destroy();
365
+ if (_classPrivateFieldGet(this, _itemsBox)) {
366
+ _classPrivateFieldGet(this, _itemsBox).destroy();
325
367
  }
326
- _classPrivateFieldGet(_searchInput, this).destroy();
327
- _classPrivateFieldGet(_clearAllUI, this).destroy();
328
- _classPrivateFieldGet(_selectAllUI, this).destroy();
329
- _classPrivateFieldSet(_searchInput, this, null);
330
- _classPrivateFieldSet(_clearAllUI, this, null);
331
- _classPrivateFieldSet(_selectAllUI, this, null);
332
- _classPrivateFieldSet(_itemsBox, this, null);
333
- _classPrivateFieldSet(_items, this, null);
368
+ _classPrivateFieldGet(this, _searchInput).destroy();
369
+ _classPrivateFieldGet(this, _clearAllUI).destroy();
370
+ _classPrivateFieldGet(this, _selectAllUI).destroy();
371
+ _classPrivateFieldSet(this, _searchInput, null);
372
+ _classPrivateFieldSet(this, _clearAllUI, null);
373
+ _classPrivateFieldSet(this, _selectAllUI, null);
374
+ _classPrivateFieldSet(this, _itemsBox, null);
375
+ _classPrivateFieldSet(this, _items, null);
334
376
  super.destroy();
335
377
  }
336
378
  }
337
- function _onInput(event) {
379
+ function _onInput2(event) {
338
380
  const value = event.target.value.toLocaleLowerCase(this.getLocale());
339
381
  let filteredItems;
340
382
  if (value === '') {
341
- filteredItems = [..._classPrivateFieldGet(_items, this)];
383
+ filteredItems = [..._classPrivateFieldGet(this, _items)];
342
384
  } else {
343
- filteredItems = arrayFilter(_classPrivateFieldGet(_items, this), item => `${item.value}`.toLocaleLowerCase(this.getLocale()).indexOf(value) >= 0);
385
+ filteredItems = arrayFilter(_classPrivateFieldGet(this, _items), item => `${item.value}`.toLocaleLowerCase(this.getLocale()).indexOf(value) >= 0);
344
386
  }
345
- _classPrivateFieldGet(_itemsBox, this).loadData(filteredItems);
387
+ _classPrivateFieldGet(this, _itemsBox).loadData(filteredItems);
346
388
  }
347
- /**
348
- * 'keydown' event listener for input element.
349
- *
350
- * @param {Event} event DOM event.
351
- */
352
- function _onInputKeyDown(event) {
389
+ function _onInputKeyDown2(event) {
353
390
  this.runLocalHooks('keydown', event, this);
354
391
  const isKeyCode = partial(isKey, event.keyCode);
355
392
  if (isKeyCode('ARROW_DOWN')) {
356
393
  event.preventDefault();
357
394
  stopImmediatePropagation(event);
358
- _classPrivateFieldGet(_itemsBox, this).listen();
359
- _classPrivateFieldGet(_itemsBox, this).selectCell(0, 0);
395
+ _classPrivateFieldGet(this, _itemsBox).listen();
396
+ _classPrivateFieldGet(this, _itemsBox).selectCell(0, 0);
360
397
  }
361
398
  }
362
- /**
363
- * On click listener for "Select all" link.
364
- *
365
- * @param {DOMEvent} event The mouse event object.
366
- */
367
- function _onSelectAllClick(event) {
399
+ function _onSelectAllClick2(event) {
368
400
  const changes = [];
369
401
  event.preventDefault();
370
- arrayEach(_classPrivateFieldGet(_itemsBox, this).getSourceData(), (row, rowIndex) => {
402
+ arrayEach(_classPrivateFieldGet(this, _itemsBox).getSourceData(), (row, rowIndex) => {
371
403
  row.checked = true;
372
404
  changes.push(dataRowToChangesArray(row, rowIndex)[0]);
373
405
  });
374
- _classPrivateFieldGet(_itemsBox, this).setSourceDataAtCell(changes);
406
+ _classPrivateFieldGet(this, _itemsBox).setSourceDataAtCell(changes);
375
407
  }
376
- /**
377
- * On click listener for "Clear" link.
378
- *
379
- * @param {DOMEvent} event The mouse event object.
380
- */
381
- function _onClearAllClick(event) {
408
+ function _onClearAllClick2(event) {
382
409
  const changes = [];
383
410
  event.preventDefault();
384
- arrayEach(_classPrivateFieldGet(_itemsBox, this).getSourceData(), (row, rowIndex) => {
411
+ arrayEach(_classPrivateFieldGet(this, _itemsBox).getSourceData(), (row, rowIndex) => {
385
412
  row.checked = false;
386
413
  changes.push(dataRowToChangesArray(row, rowIndex)[0]);
387
414
  });
388
- _classPrivateFieldGet(_itemsBox, this).setSourceDataAtCell(changes);
415
+ _classPrivateFieldGet(this, _itemsBox).setSourceDataAtCell(changes);
389
416
  }
390
417
  export default MultipleSelectUI;
391
418
 
@@ -6,9 +6,11 @@ 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(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"); }
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; } }
12
14
  /**
13
15
  * @private
14
16
  * @class RadioInputUI
@@ -33,13 +35,19 @@ class RadioInputUI extends _base.BaseUI {
33
35
 
34
36
  constructor(hotInstance, options) {
35
37
  super(hotInstance, (0, _object.extend)(RadioInputUI.DEFAULTS, options));
36
- _classPrivateFieldInitSpec(this, _input, void 0);
38
+ _classPrivateFieldInitSpec(this, _input, {
39
+ writable: true,
40
+ value: void 0
41
+ });
37
42
  /**
38
43
  * The reference to the label element.
39
44
  *
40
45
  * @type {HTMLLabelElement}
41
46
  */
42
- _classPrivateFieldInitSpec(this, _label, void 0);
47
+ _classPrivateFieldInitSpec(this, _label, {
48
+ writable: true,
49
+ value: void 0
50
+ });
43
51
  }
44
52
 
45
53
  /**
@@ -50,9 +58,9 @@ class RadioInputUI extends _base.BaseUI {
50
58
  const label = this.hot.rootDocument.createElement('label');
51
59
  label.textContent = this.translateIfPossible(this.options.label.textContent);
52
60
  label.htmlFor = this.translateIfPossible(this.options.label.htmlFor);
53
- _classPrivateFieldSet(_label, this, label);
54
- _classPrivateFieldSet(_input, this, this._element.firstChild);
55
- _classPrivateFieldGet(_input, this).checked = this.options.checked;
61
+ _classPrivateFieldSet(this, _label, label);
62
+ _classPrivateFieldSet(this, _input, this._element.firstChild);
63
+ _classPrivateFieldGet(this, _input).checked = this.options.checked;
56
64
  this._element.appendChild(label);
57
65
  this.update();
58
66
  }
@@ -64,7 +72,7 @@ class RadioInputUI extends _base.BaseUI {
64
72
  if (!this.isBuilt()) {
65
73
  return;
66
74
  }
67
- _classPrivateFieldGet(_label, this).textContent = this.translateIfPossible(this.options.label.textContent);
75
+ _classPrivateFieldGet(this, _label).textContent = this.translateIfPossible(this.options.label.textContent);
68
76
  }
69
77
 
70
78
  /**
@@ -73,7 +81,7 @@ class RadioInputUI extends _base.BaseUI {
73
81
  * @returns {boolean}
74
82
  */
75
83
  isChecked() {
76
- return this.isBuilt() ? _classPrivateFieldGet(_input, this).checked : false;
84
+ return this.isBuilt() ? _classPrivateFieldGet(this, _input).checked : false;
77
85
  }
78
86
 
79
87
  /**
@@ -84,7 +92,7 @@ class RadioInputUI extends _base.BaseUI {
84
92
  setChecked() {
85
93
  let value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
86
94
  if (this.isBuilt()) {
87
- _classPrivateFieldGet(_input, this).checked = value;
95
+ _classPrivateFieldGet(this, _input).checked = value;
88
96
  }
89
97
  }
90
98
 
@@ -93,7 +101,7 @@ class RadioInputUI extends _base.BaseUI {
93
101
  */
94
102
  focus() {
95
103
  if (this.isBuilt()) {
96
- _classPrivateFieldGet(_input, this).focus();
104
+ _classPrivateFieldGet(this, _input).focus();
97
105
  }
98
106
  }
99
107
  }
@@ -1,9 +1,11 @@
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(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"); }
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; } }
7
9
  import { clone, extend } from "../../../helpers/object.mjs";
8
10
  import { BaseUI } from "./_base.mjs";
9
11
  /**
@@ -30,13 +32,19 @@ export class RadioInputUI extends BaseUI {
30
32
 
31
33
  constructor(hotInstance, options) {
32
34
  super(hotInstance, extend(RadioInputUI.DEFAULTS, options));
33
- _classPrivateFieldInitSpec(this, _input, void 0);
35
+ _classPrivateFieldInitSpec(this, _input, {
36
+ writable: true,
37
+ value: void 0
38
+ });
34
39
  /**
35
40
  * The reference to the label element.
36
41
  *
37
42
  * @type {HTMLLabelElement}
38
43
  */
39
- _classPrivateFieldInitSpec(this, _label, void 0);
44
+ _classPrivateFieldInitSpec(this, _label, {
45
+ writable: true,
46
+ value: void 0
47
+ });
40
48
  }
41
49
 
42
50
  /**
@@ -47,9 +55,9 @@ export class RadioInputUI extends BaseUI {
47
55
  const label = this.hot.rootDocument.createElement('label');
48
56
  label.textContent = this.translateIfPossible(this.options.label.textContent);
49
57
  label.htmlFor = this.translateIfPossible(this.options.label.htmlFor);
50
- _classPrivateFieldSet(_label, this, label);
51
- _classPrivateFieldSet(_input, this, this._element.firstChild);
52
- _classPrivateFieldGet(_input, this).checked = this.options.checked;
58
+ _classPrivateFieldSet(this, _label, label);
59
+ _classPrivateFieldSet(this, _input, this._element.firstChild);
60
+ _classPrivateFieldGet(this, _input).checked = this.options.checked;
53
61
  this._element.appendChild(label);
54
62
  this.update();
55
63
  }
@@ -61,7 +69,7 @@ export class RadioInputUI extends BaseUI {
61
69
  if (!this.isBuilt()) {
62
70
  return;
63
71
  }
64
- _classPrivateFieldGet(_label, this).textContent = this.translateIfPossible(this.options.label.textContent);
72
+ _classPrivateFieldGet(this, _label).textContent = this.translateIfPossible(this.options.label.textContent);
65
73
  }
66
74
 
67
75
  /**
@@ -70,7 +78,7 @@ export class RadioInputUI extends BaseUI {
70
78
  * @returns {boolean}
71
79
  */
72
80
  isChecked() {
73
- return this.isBuilt() ? _classPrivateFieldGet(_input, this).checked : false;
81
+ return this.isBuilt() ? _classPrivateFieldGet(this, _input).checked : false;
74
82
  }
75
83
 
76
84
  /**
@@ -81,7 +89,7 @@ export class RadioInputUI extends BaseUI {
81
89
  setChecked() {
82
90
  let value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
83
91
  if (this.isBuilt()) {
84
- _classPrivateFieldGet(_input, this).checked = value;
92
+ _classPrivateFieldGet(this, _input).checked = value;
85
93
  }
86
94
  }
87
95
 
@@ -90,7 +98,7 @@ export class RadioInputUI extends BaseUI {
90
98
  */
91
99
  focus() {
92
100
  if (this.isBuilt()) {
93
- _classPrivateFieldGet(_input, this).focus();
101
+ _classPrivateFieldGet(this, _input).focus();
94
102
  }
95
103
  }
96
104
  }