handsontable 0.0.0-next-802f59c-20241024 → 0.0.0-next-627918e-20241025

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


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

Files changed (128) hide show
  1. package/3rdparty/walkontable/src/calculator/index.js +1 -2
  2. package/3rdparty/walkontable/src/calculator/index.mjs +2 -2
  3. package/3rdparty/walkontable/src/calculator/viewportRows.js +3 -3
  4. package/3rdparty/walkontable/src/calculator/viewportRows.mjs +3 -3
  5. package/3rdparty/walkontable/src/core/_base.js +3 -0
  6. package/3rdparty/walkontable/src/core/_base.mjs +3 -0
  7. package/3rdparty/walkontable/src/core/clone.js +1 -0
  8. package/3rdparty/walkontable/src/core/clone.mjs +1 -0
  9. package/3rdparty/walkontable/src/core/core.js +2 -0
  10. package/3rdparty/walkontable/src/core/core.mjs +2 -0
  11. package/3rdparty/walkontable/src/facade/core.js +3 -0
  12. package/3rdparty/walkontable/src/facade/core.mjs +3 -0
  13. package/3rdparty/walkontable/src/index.js +0 -1
  14. package/3rdparty/walkontable/src/index.mjs +2 -2
  15. package/3rdparty/walkontable/src/overlay/_base.js +3 -1
  16. package/3rdparty/walkontable/src/overlay/_base.mjs +3 -1
  17. package/3rdparty/walkontable/src/overlay/bottom.js +2 -2
  18. package/3rdparty/walkontable/src/overlay/bottom.mjs +2 -2
  19. package/3rdparty/walkontable/src/overlay/inlineStart.js +1 -1
  20. package/3rdparty/walkontable/src/overlay/inlineStart.mjs +1 -1
  21. package/3rdparty/walkontable/src/overlay/top.js +1 -1
  22. package/3rdparty/walkontable/src/overlay/top.mjs +1 -1
  23. package/3rdparty/walkontable/src/overlays.js +6 -7
  24. package/3rdparty/walkontable/src/overlays.mjs +6 -7
  25. package/3rdparty/walkontable/src/renderer/colGroup.js +1 -1
  26. package/3rdparty/walkontable/src/renderer/colGroup.mjs +1 -1
  27. package/3rdparty/walkontable/src/renderer/table.js +1 -1
  28. package/3rdparty/walkontable/src/renderer/table.mjs +1 -1
  29. package/3rdparty/walkontable/src/settings.js +8 -2
  30. package/3rdparty/walkontable/src/settings.mjs +8 -2
  31. package/3rdparty/walkontable/src/table.js +35 -8
  32. package/3rdparty/walkontable/src/table.mjs +35 -8
  33. package/3rdparty/walkontable/src/types.js +1 -0
  34. package/3rdparty/walkontable/src/types.mjs +1 -0
  35. package/3rdparty/walkontable/src/utils/column.js +43 -1
  36. package/3rdparty/walkontable/src/utils/column.mjs +43 -1
  37. package/3rdparty/walkontable/src/utils/columnStretching.js +197 -0
  38. package/3rdparty/walkontable/src/utils/columnStretching.mjs +193 -0
  39. package/3rdparty/walkontable/src/utils/stylesHandler.js +179 -0
  40. package/3rdparty/walkontable/src/utils/stylesHandler.mjs +175 -0
  41. package/3rdparty/walkontable/src/viewport.js +88 -66
  42. package/3rdparty/walkontable/src/viewport.mjs +89 -67
  43. package/base.js +2 -2
  44. package/base.mjs +2 -2
  45. package/core/hooks/constants.js +0 -2
  46. package/core/hooks/constants.mjs +0 -2
  47. package/core/hooks/index.d.ts +2 -2
  48. package/core.d.ts +2 -2
  49. package/core.js +18 -6
  50. package/core.mjs +18 -6
  51. package/dataMap/metaManager/metaSchema.js +17 -0
  52. package/dataMap/metaManager/metaSchema.mjs +17 -0
  53. package/dist/handsontable.css +17 -9
  54. package/dist/handsontable.full.css +17 -7
  55. package/dist/handsontable.full.js +4217 -4534
  56. package/dist/handsontable.full.min.css +5 -4
  57. package/dist/handsontable.full.min.js +26 -26
  58. package/dist/handsontable.js +3923 -4234
  59. package/dist/handsontable.min.css +5 -4
  60. package/dist/handsontable.min.js +24 -24
  61. package/editors/autocompleteEditor/autocompleteEditor.js +1 -1
  62. package/editors/autocompleteEditor/autocompleteEditor.mjs +1 -1
  63. package/editors/baseEditor/baseEditor.js +1 -1
  64. package/editors/baseEditor/baseEditor.mjs +1 -1
  65. package/editors/dateEditor/dateEditor.js +2 -0
  66. package/editors/dateEditor/dateEditor.mjs +2 -0
  67. package/editors/handsontableEditor/handsontableEditor.js +1 -1
  68. package/editors/handsontableEditor/handsontableEditor.mjs +1 -1
  69. package/editors/selectEditor/selectEditor.js +20 -9
  70. package/editors/selectEditor/selectEditor.mjs +20 -9
  71. package/editors/textEditor/textEditor.js +4 -11
  72. package/editors/textEditor/textEditor.mjs +4 -11
  73. package/helpers/mixed.js +2 -2
  74. package/helpers/mixed.mjs +2 -2
  75. package/helpers/themes.js +17 -0
  76. package/helpers/themes.mjs +13 -0
  77. package/index.d.ts +0 -7
  78. package/package.json +10 -8
  79. package/plugins/comments/commentEditor.js +8 -1
  80. package/plugins/comments/commentEditor.mjs +8 -1
  81. package/plugins/comments/comments.js +2 -2
  82. package/plugins/comments/comments.mjs +2 -2
  83. package/plugins/contextMenu/menu/menu.js +4 -4
  84. package/plugins/contextMenu/menu/menu.mjs +4 -4
  85. package/plugins/index.d.ts +0 -3
  86. package/plugins/index.js +0 -3
  87. package/plugins/index.mjs +1 -3
  88. package/plugins/manualColumnMove/manualColumnMove.js +3 -1
  89. package/plugins/manualColumnMove/manualColumnMove.mjs +3 -1
  90. package/plugins/manualColumnResize/manualColumnResize.js +12 -24
  91. package/plugins/manualColumnResize/manualColumnResize.mjs +12 -24
  92. package/plugins/manualRowMove/manualRowMove.js +1 -1
  93. package/plugins/manualRowMove/manualRowMove.mjs +1 -1
  94. package/plugins/manualRowResize/manualRowResize.js +1 -2
  95. package/plugins/manualRowResize/manualRowResize.mjs +2 -3
  96. package/plugins/mergeCells/mergeCells.js +1 -1
  97. package/plugins/mergeCells/mergeCells.mjs +1 -1
  98. package/plugins/nestedRows/ui/headers.js +3 -1
  99. package/plugins/nestedRows/ui/headers.mjs +3 -1
  100. package/settings.d.ts +1 -0
  101. package/styles/handsontable.css +1983 -0
  102. package/styles/handsontable.min.css +30 -0
  103. package/styles/ht-theme-gemini.css +706 -0
  104. package/styles/ht-theme-gemini.min.css +30 -0
  105. package/styles/ht-theme-main.css +714 -0
  106. package/styles/ht-theme-main.min.css +30 -0
  107. package/stylesManager.js +1 -0
  108. package/stylesManager.mjs +0 -0
  109. package/tableView.js +40 -39
  110. package/tableView.mjs +40 -39
  111. package/utils/autoResize.js +4 -1
  112. package/utils/autoResize.mjs +4 -1
  113. package/utils/ghostTable.js +1 -1
  114. package/utils/ghostTable.mjs +1 -1
  115. package/plugins/stretchColumns/calculator.js +0 -159
  116. package/plugins/stretchColumns/calculator.mjs +0 -155
  117. package/plugins/stretchColumns/index.d.ts +0 -1
  118. package/plugins/stretchColumns/index.js +0 -7
  119. package/plugins/stretchColumns/index.mjs +0 -1
  120. package/plugins/stretchColumns/strategies/_base.js +0 -85
  121. package/plugins/stretchColumns/strategies/_base.mjs +0 -81
  122. package/plugins/stretchColumns/strategies/all.js +0 -68
  123. package/plugins/stretchColumns/strategies/all.mjs +0 -64
  124. package/plugins/stretchColumns/strategies/last.js +0 -77
  125. package/plugins/stretchColumns/strategies/last.mjs +0 -73
  126. package/plugins/stretchColumns/stretchColumns.d.ts +0 -11
  127. package/plugins/stretchColumns/stretchColumns.js +0 -211
  128. package/plugins/stretchColumns/stretchColumns.mjs +0 -207
@@ -1,211 +0,0 @@
1
- "use strict";
2
-
3
- exports.__esModule = true;
4
- require("core-js/modules/es.error.cause.js");
5
- var _base = require("../base");
6
- var _calculator = require("./calculator");
7
- function _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }
8
- function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
9
- function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
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"); }
13
- const PLUGIN_KEY = exports.PLUGIN_KEY = 'stretchColumns';
14
- const PLUGIN_PRIORITY = exports.PLUGIN_PRIORITY = 155;
15
-
16
- /* eslint-disable jsdoc/require-description-complete-sentence */
17
- /**
18
- * @plugin StretchColumns
19
- * @class StretchColumns
20
- *
21
- * @description
22
- * This plugin allows to set column widths based on their widest cells.
23
- *
24
- * By default, the plugin is declared as `'none'`, which makes it disabled (same as if it was declared as `false`).
25
- *
26
- * The plugin determines what happens when the declared grid width is different from the calculated sum of all column widths.
27
- *
28
- * ```js
29
- * // fit the grid to the container, by stretching only the last column
30
- * stretchH: 'last',
31
- *
32
- * // fit the grid to the container, by stretching all columns evenly
33
- * stretchH: 'all',
34
- * ```
35
- *
36
- * To configure this plugin see {@link Options#stretchH}.
37
- *
38
- * @example
39
- *
40
- * ::: only-for javascript
41
- * ```js
42
- * const hot = new Handsontable(document.getElementById('example'), {
43
- * data: getData(),
44
- * stretchH: 'all',
45
- * });
46
- * ```
47
- * :::
48
- *
49
- * ::: only-for react
50
- * ```jsx
51
- * const hotRef = useRef(null);
52
- *
53
- * ...
54
- *
55
- * // First, let's construct Handsontable
56
- * <HotTable
57
- * ref={hotRef}
58
- * data={getData()}
59
- * stretchH={'all'}
60
- * />
61
- * ```
62
- * :::
63
- */
64
- /* eslint-enable jsdoc/require-description-complete-sentence */
65
- var _stretchCalculator = /*#__PURE__*/new WeakMap();
66
- var _previousTableWidth = /*#__PURE__*/new WeakMap();
67
- var _resizeObserver = /*#__PURE__*/new WeakMap();
68
- var _StretchColumns_brand = /*#__PURE__*/new WeakSet();
69
- class StretchColumns extends _base.BasePlugin {
70
- constructor() {
71
- super(...arguments);
72
- /**
73
- * Hook that modifies the column width - applies by the stretching logic.
74
- *
75
- * @param {number} width The column width.
76
- * @param {number} column The visual column index.
77
- * @param {string} source The source of the modification.
78
- * @returns {number}
79
- */
80
- _classPrivateMethodInitSpec(this, _StretchColumns_brand);
81
- /**
82
- * The stretch calculator.
83
- *
84
- * @type {StretchCalculator}
85
- */
86
- _classPrivateFieldInitSpec(this, _stretchCalculator, new _calculator.StretchCalculator(this.hot));
87
- /**
88
- * The previous width of the root element. Helps to determine if the width has changed.
89
- *
90
- * @type {number | null}
91
- */
92
- _classPrivateFieldInitSpec(this, _previousTableWidth, null);
93
- /**
94
- * It observes the root element to detect changes in its width, and if detected, then it triggers
95
- * the table dimension calculations. In a situation where the browser's vertical scrollbar
96
- * appears - caused by some external UI element, the observer triggers the render.
97
- *
98
- * @type {ResizeObserver}
99
- */
100
- _classPrivateFieldInitSpec(this, _resizeObserver, new ResizeObserver(entries => {
101
- requestAnimationFrame(() => {
102
- var _this$hot;
103
- if (!((_this$hot = this.hot) !== null && _this$hot !== void 0 && _this$hot.view.isHorizontallyScrollableByWindow())) {
104
- return;
105
- }
106
- entries.forEach(_ref => {
107
- let {
108
- contentRect
109
- } = _ref;
110
- if (_classPrivateFieldGet(_previousTableWidth, this) !== null && _classPrivateFieldGet(_previousTableWidth, this) !== contentRect.width) {
111
- this.hot.refreshDimensions();
112
- this.hot.view.adjustElementsSize();
113
- }
114
- _classPrivateFieldSet(_previousTableWidth, this, contentRect.width);
115
- });
116
- });
117
- }));
118
- }
119
- static get PLUGIN_KEY() {
120
- return PLUGIN_KEY;
121
- }
122
- static get PLUGIN_PRIORITY() {
123
- return PLUGIN_PRIORITY;
124
- }
125
- static get SETTING_KEYS() {
126
- return true;
127
- }
128
- /**
129
- * Checks if the plugin is enabled in the handsontable settings. This method is executed in {@link Hooks#beforeInit}
130
- * hook and if it returns `true` then the {@link #enablePlugin} method is called.
131
- *
132
- * @returns {boolean}
133
- */
134
- isEnabled() {
135
- return ['all', 'last'].includes(this.hot.getSettings().stretchH);
136
- }
137
-
138
- /**
139
- * Enables the plugin functionality for this Handsontable instance.
140
- */
141
- enablePlugin() {
142
- var _this = this;
143
- if (this.enabled) {
144
- return;
145
- }
146
- _classPrivateFieldGet(_stretchCalculator, this).useStrategy(this.hot.getSettings().stretchH);
147
- _classPrivateFieldGet(_resizeObserver, this).observe(this.hot.rootElement);
148
- this.addHook('beforeRender', () => _assertClassBrand(_StretchColumns_brand, this, _onBeforeRender).call(this));
149
- this.addHook('modifyColWidth', function () {
150
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
151
- args[_key] = arguments[_key];
152
- }
153
- return _assertClassBrand(_StretchColumns_brand, _this, _onModifyColWidth).call(_this, ...args);
154
- }, 10);
155
- super.enablePlugin();
156
- }
157
-
158
- /**
159
- * Updates the plugin's state. This method is executed when {@link Core#updateSettings} is invoked.
160
- */
161
- updatePlugin() {
162
- _classPrivateFieldGet(_stretchCalculator, this).useStrategy(this.hot.getSettings().stretchH);
163
- super.updatePlugin();
164
- }
165
-
166
- /**
167
- * Disables the plugin functionality for this Handsontable instance.
168
- */
169
- disablePlugin() {
170
- super.disablePlugin();
171
- _classPrivateFieldGet(_resizeObserver, this).unobserve(this.hot.rootElement);
172
- }
173
-
174
- /**
175
- * Gets the calculated column width based on the stretching
176
- * strategy defined by {@link Options#stretchH} option.
177
- *
178
- * @param {number} columnVisualIndex The visual index of the column.
179
- * @returns {number | null}
180
- */
181
- getColumnWidth(columnVisualIndex) {
182
- return _classPrivateFieldGet(_stretchCalculator, this).getStretchedWidth(columnVisualIndex);
183
- }
184
- /**
185
- * Destroys the plugin instance.
186
- */
187
- destroy() {
188
- _classPrivateFieldGet(_resizeObserver, this).disconnect();
189
- _classPrivateFieldSet(_resizeObserver, this, null);
190
- _classPrivateFieldSet(_stretchCalculator, this, null);
191
- super.destroy();
192
- }
193
- }
194
- exports.StretchColumns = StretchColumns;
195
- function _onModifyColWidth(width, column, source) {
196
- if (source === this.pluginName) {
197
- return;
198
- }
199
- const newWidth = this.getColumnWidth(column);
200
- if (typeof newWidth === 'number') {
201
- return newWidth;
202
- }
203
- return width;
204
- }
205
- /**
206
- * On each before render the plugin recalculates the column widths
207
- * based on the chosen stretching strategy.
208
- */
209
- function _onBeforeRender() {
210
- _classPrivateFieldGet(_stretchCalculator, this).refreshStretching();
211
- }
@@ -1,207 +0,0 @@
1
- import "core-js/modules/es.error.cause.js";
2
- function _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }
3
- function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
4
- function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
5
- function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
6
- function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
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"); }
8
- import { BasePlugin } from "../base/index.mjs";
9
- import { StretchCalculator } from "./calculator.mjs";
10
- export const PLUGIN_KEY = 'stretchColumns';
11
- export const PLUGIN_PRIORITY = 155;
12
-
13
- /* eslint-disable jsdoc/require-description-complete-sentence */
14
- /**
15
- * @plugin StretchColumns
16
- * @class StretchColumns
17
- *
18
- * @description
19
- * This plugin allows to set column widths based on their widest cells.
20
- *
21
- * By default, the plugin is declared as `'none'`, which makes it disabled (same as if it was declared as `false`).
22
- *
23
- * The plugin determines what happens when the declared grid width is different from the calculated sum of all column widths.
24
- *
25
- * ```js
26
- * // fit the grid to the container, by stretching only the last column
27
- * stretchH: 'last',
28
- *
29
- * // fit the grid to the container, by stretching all columns evenly
30
- * stretchH: 'all',
31
- * ```
32
- *
33
- * To configure this plugin see {@link Options#stretchH}.
34
- *
35
- * @example
36
- *
37
- * ::: only-for javascript
38
- * ```js
39
- * const hot = new Handsontable(document.getElementById('example'), {
40
- * data: getData(),
41
- * stretchH: 'all',
42
- * });
43
- * ```
44
- * :::
45
- *
46
- * ::: only-for react
47
- * ```jsx
48
- * const hotRef = useRef(null);
49
- *
50
- * ...
51
- *
52
- * // First, let's construct Handsontable
53
- * <HotTable
54
- * ref={hotRef}
55
- * data={getData()}
56
- * stretchH={'all'}
57
- * />
58
- * ```
59
- * :::
60
- */
61
- /* eslint-enable jsdoc/require-description-complete-sentence */
62
- var _stretchCalculator = /*#__PURE__*/new WeakMap();
63
- var _previousTableWidth = /*#__PURE__*/new WeakMap();
64
- var _resizeObserver = /*#__PURE__*/new WeakMap();
65
- var _StretchColumns_brand = /*#__PURE__*/new WeakSet();
66
- export class StretchColumns extends BasePlugin {
67
- constructor() {
68
- super(...arguments);
69
- /**
70
- * Hook that modifies the column width - applies by the stretching logic.
71
- *
72
- * @param {number} width The column width.
73
- * @param {number} column The visual column index.
74
- * @param {string} source The source of the modification.
75
- * @returns {number}
76
- */
77
- _classPrivateMethodInitSpec(this, _StretchColumns_brand);
78
- /**
79
- * The stretch calculator.
80
- *
81
- * @type {StretchCalculator}
82
- */
83
- _classPrivateFieldInitSpec(this, _stretchCalculator, new StretchCalculator(this.hot));
84
- /**
85
- * The previous width of the root element. Helps to determine if the width has changed.
86
- *
87
- * @type {number | null}
88
- */
89
- _classPrivateFieldInitSpec(this, _previousTableWidth, null);
90
- /**
91
- * It observes the root element to detect changes in its width, and if detected, then it triggers
92
- * the table dimension calculations. In a situation where the browser's vertical scrollbar
93
- * appears - caused by some external UI element, the observer triggers the render.
94
- *
95
- * @type {ResizeObserver}
96
- */
97
- _classPrivateFieldInitSpec(this, _resizeObserver, new ResizeObserver(entries => {
98
- requestAnimationFrame(() => {
99
- var _this$hot;
100
- if (!((_this$hot = this.hot) !== null && _this$hot !== void 0 && _this$hot.view.isHorizontallyScrollableByWindow())) {
101
- return;
102
- }
103
- entries.forEach(_ref => {
104
- let {
105
- contentRect
106
- } = _ref;
107
- if (_classPrivateFieldGet(_previousTableWidth, this) !== null && _classPrivateFieldGet(_previousTableWidth, this) !== contentRect.width) {
108
- this.hot.refreshDimensions();
109
- this.hot.view.adjustElementsSize();
110
- }
111
- _classPrivateFieldSet(_previousTableWidth, this, contentRect.width);
112
- });
113
- });
114
- }));
115
- }
116
- static get PLUGIN_KEY() {
117
- return PLUGIN_KEY;
118
- }
119
- static get PLUGIN_PRIORITY() {
120
- return PLUGIN_PRIORITY;
121
- }
122
- static get SETTING_KEYS() {
123
- return true;
124
- }
125
- /**
126
- * Checks if the plugin is enabled in the handsontable settings. This method is executed in {@link Hooks#beforeInit}
127
- * hook and if it returns `true` then the {@link #enablePlugin} method is called.
128
- *
129
- * @returns {boolean}
130
- */
131
- isEnabled() {
132
- return ['all', 'last'].includes(this.hot.getSettings().stretchH);
133
- }
134
-
135
- /**
136
- * Enables the plugin functionality for this Handsontable instance.
137
- */
138
- enablePlugin() {
139
- var _this = this;
140
- if (this.enabled) {
141
- return;
142
- }
143
- _classPrivateFieldGet(_stretchCalculator, this).useStrategy(this.hot.getSettings().stretchH);
144
- _classPrivateFieldGet(_resizeObserver, this).observe(this.hot.rootElement);
145
- this.addHook('beforeRender', () => _assertClassBrand(_StretchColumns_brand, this, _onBeforeRender).call(this));
146
- this.addHook('modifyColWidth', function () {
147
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
148
- args[_key] = arguments[_key];
149
- }
150
- return _assertClassBrand(_StretchColumns_brand, _this, _onModifyColWidth).call(_this, ...args);
151
- }, 10);
152
- super.enablePlugin();
153
- }
154
-
155
- /**
156
- * Updates the plugin's state. This method is executed when {@link Core#updateSettings} is invoked.
157
- */
158
- updatePlugin() {
159
- _classPrivateFieldGet(_stretchCalculator, this).useStrategy(this.hot.getSettings().stretchH);
160
- super.updatePlugin();
161
- }
162
-
163
- /**
164
- * Disables the plugin functionality for this Handsontable instance.
165
- */
166
- disablePlugin() {
167
- super.disablePlugin();
168
- _classPrivateFieldGet(_resizeObserver, this).unobserve(this.hot.rootElement);
169
- }
170
-
171
- /**
172
- * Gets the calculated column width based on the stretching
173
- * strategy defined by {@link Options#stretchH} option.
174
- *
175
- * @param {number} columnVisualIndex The visual index of the column.
176
- * @returns {number | null}
177
- */
178
- getColumnWidth(columnVisualIndex) {
179
- return _classPrivateFieldGet(_stretchCalculator, this).getStretchedWidth(columnVisualIndex);
180
- }
181
- /**
182
- * Destroys the plugin instance.
183
- */
184
- destroy() {
185
- _classPrivateFieldGet(_resizeObserver, this).disconnect();
186
- _classPrivateFieldSet(_resizeObserver, this, null);
187
- _classPrivateFieldSet(_stretchCalculator, this, null);
188
- super.destroy();
189
- }
190
- }
191
- function _onModifyColWidth(width, column, source) {
192
- if (source === this.pluginName) {
193
- return;
194
- }
195
- const newWidth = this.getColumnWidth(column);
196
- if (typeof newWidth === 'number') {
197
- return newWidth;
198
- }
199
- return width;
200
- }
201
- /**
202
- * On each before render the plugin recalculates the column widths
203
- * based on the chosen stretching strategy.
204
- */
205
- function _onBeforeRender() {
206
- _classPrivateFieldGet(_stretchCalculator, this).refreshStretching();
207
- }