handsontable 0.0.0-next-87b048b-20250409 → 0.0.0-next-d9b3885-20250415
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.
- package/base.js +2 -2
- package/base.mjs +2 -2
- package/core/hooks/constants.js +258 -0
- package/core/hooks/constants.mjs +258 -0
- package/core.js +39 -0
- package/core.mjs +39 -0
- package/dataMap/metaManager/metaSchema.js +27 -0
- package/dataMap/metaManager/metaSchema.mjs +27 -0
- package/dist/handsontable.css +2 -2
- package/dist/handsontable.full.css +2 -2
- package/dist/handsontable.full.js +943 -5
- package/dist/handsontable.full.min.css +2 -2
- package/dist/handsontable.full.min.js +4 -4
- package/dist/handsontable.js +943 -5
- package/dist/handsontable.min.css +2 -2
- package/dist/handsontable.min.js +4 -4
- package/helpers/mixed.js +1 -1
- package/helpers/mixed.mjs +1 -1
- package/package.json +1 -1
- package/plugins/autoColumnSize/autoColumnSize.js +47 -0
- package/plugins/autoColumnSize/autoColumnSize.mjs +47 -0
- package/plugins/autoRowSize/autoRowSize.js +45 -0
- package/plugins/autoRowSize/autoRowSize.mjs +45 -0
- package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.js +13 -0
- package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.mjs +13 -0
- package/plugins/collapsibleColumns/collapsibleColumns.js +31 -0
- package/plugins/collapsibleColumns/collapsibleColumns.mjs +31 -0
- package/plugins/columnSummary/columnSummary.js +33 -0
- package/plugins/columnSummary/columnSummary.mjs +33 -0
- package/plugins/comments/comments.js +53 -0
- package/plugins/comments/comments.mjs +53 -0
- package/plugins/dropdownMenu/dropdownMenu.js +15 -0
- package/plugins/dropdownMenu/dropdownMenu.mjs +15 -0
- package/plugins/exportFile/exportFile.js +58 -0
- package/plugins/exportFile/exportFile.mjs +58 -0
- package/plugins/filters/filters.js +74 -0
- package/plugins/filters/filters.mjs +74 -0
- package/plugins/hiddenColumns/hiddenColumns.js +64 -0
- package/plugins/hiddenColumns/hiddenColumns.mjs +64 -0
- package/plugins/hiddenRows/hiddenRows.js +64 -0
- package/plugins/hiddenRows/hiddenRows.mjs +64 -0
- package/plugins/mergeCells/mergeCells.js +18 -0
- package/plugins/mergeCells/mergeCells.mjs +18 -0
- package/plugins/nestedHeaders/nestedHeaders.js +25 -0
- package/plugins/nestedHeaders/nestedHeaders.mjs +25 -0
- package/plugins/stretchColumns/stretchColumns.js +13 -0
- package/plugins/stretchColumns/stretchColumns.mjs +13 -0
- package/plugins/trimRows/trimRows.js +61 -0
- package/plugins/trimRows/trimRows.mjs +61 -0
- package/styles/handsontable.css +2 -2
- package/styles/handsontable.min.css +2 -2
- package/styles/ht-theme-horizon.css +2 -2
- package/styles/ht-theme-horizon.min.css +2 -2
- package/styles/ht-theme-main.css +2 -2
- package/styles/ht-theme-main.min.css +2 -2
package/dist/handsontable.js
CHANGED
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
* INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER ARISING FROM
|
|
26
26
|
* USE OR INABILITY TO USE THIS SOFTWARE.
|
|
27
27
|
*
|
|
28
|
-
* Version: 0.0.0-next-
|
|
29
|
-
* Release date: 19/03/2025 (built at
|
|
28
|
+
* Version: 0.0.0-next-d9b3885-20250415
|
|
29
|
+
* Release date: 19/03/2025 (built at 15/04/2025 10:06:49)
|
|
30
30
|
*/
|
|
31
31
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
32
32
|
if(typeof exports === 'object' && typeof module === 'object')
|
|
@@ -104,8 +104,8 @@ Handsontable.hooks = _hooks.Hooks.getSingleton();
|
|
|
104
104
|
Handsontable.CellCoords = _src.CellCoords;
|
|
105
105
|
Handsontable.CellRange = _src.CellRange;
|
|
106
106
|
Handsontable.packageName = 'handsontable';
|
|
107
|
-
Handsontable.buildDate = "
|
|
108
|
-
Handsontable.version = "0.0.0-next-
|
|
107
|
+
Handsontable.buildDate = "15/04/2025 10:06:49";
|
|
108
|
+
Handsontable.version = "0.0.0-next-d9b3885-20250415";
|
|
109
109
|
Handsontable.languages = {
|
|
110
110
|
dictionaryKeys: _registry.dictionaryKeys,
|
|
111
111
|
getLanguageDictionary: _registry.getLanguageDictionary,
|
|
@@ -215,6 +215,12 @@ const deprecationWarns = new Set();
|
|
|
215
215
|
* by using React's `ref` feature (read more on the [Instance methods](@/guides/getting-started/react-methods/react-methods.md) page).
|
|
216
216
|
* :::
|
|
217
217
|
*
|
|
218
|
+
* ::: only-for angular
|
|
219
|
+
* To use these methods, associate a Handsontable instance with your instance
|
|
220
|
+
* of the [`HotTable` component](@/guides/getting-started/installation/installation.md#5-use-the-hottable-component),
|
|
221
|
+
* by using `@ViewChild` decorator (read more on the [Instance access](@/guides/getting-started/angular-hot-instance/angular-hot-instance.md) page).
|
|
222
|
+
* :::
|
|
223
|
+
*
|
|
218
224
|
* ## How to call a method
|
|
219
225
|
*
|
|
220
226
|
* ::: only-for javascript
|
|
@@ -245,6 +251,39 @@ const deprecationWarns = new Set();
|
|
|
245
251
|
* ```
|
|
246
252
|
* :::
|
|
247
253
|
*
|
|
254
|
+
* ::: only-for angular
|
|
255
|
+
* ```ts
|
|
256
|
+
* import { Component, ViewChild, AfterViewInit } from "@angular/core";
|
|
257
|
+
* import {
|
|
258
|
+
* GridSettings,
|
|
259
|
+
* HotTableComponent,
|
|
260
|
+
* HotTableModule,
|
|
261
|
+
* } from "@handsontable/angular-wrapper";
|
|
262
|
+
*
|
|
263
|
+
* `@Component`({
|
|
264
|
+
* standalone: true,
|
|
265
|
+
* imports: [HotTableModule],
|
|
266
|
+
* template: ` <div class="ht-theme-main">
|
|
267
|
+
* <hot-table [settings]="gridSettings" />
|
|
268
|
+
* </div>`,
|
|
269
|
+
* })
|
|
270
|
+
* export class ExampleComponent implements AfterViewInit {
|
|
271
|
+
* `@ViewChild`(HotTableComponent, { static: false })
|
|
272
|
+
* readonly hotTable!: HotTableComponent;
|
|
273
|
+
*
|
|
274
|
+
* readonly gridSettings = <GridSettings>{
|
|
275
|
+
* columns: [{}],
|
|
276
|
+
* };
|
|
277
|
+
*
|
|
278
|
+
* ngAfterViewInit(): void {
|
|
279
|
+
* // Access the Handsontable instance
|
|
280
|
+
* // Call a method
|
|
281
|
+
* this.hotTable?.hotInstance?.setDataAtCell(0, 0, "new value");
|
|
282
|
+
* }
|
|
283
|
+
* }
|
|
284
|
+
* ```
|
|
285
|
+
* :::
|
|
286
|
+
*
|
|
248
287
|
* @param {HTMLElement} rootElement The element to which the Handsontable instance is injected.
|
|
249
288
|
* @param {object} userSettings The user defined options.
|
|
250
289
|
* @param {boolean} [rootInstanceSymbol=false] Indicates if the instance is root of all later instances created.
|
|
@@ -10104,7 +10143,7 @@ const domMessages = {
|
|
|
10104
10143
|
function _injectProductInfo(key, element) {
|
|
10105
10144
|
const hasValidType = !isEmpty(key);
|
|
10106
10145
|
const isNonCommercial = typeof key === 'string' && key.toLowerCase() === 'non-commercial-and-evaluation';
|
|
10107
|
-
const hotVersion = "0.0.0-next-
|
|
10146
|
+
const hotVersion = "0.0.0-next-d9b3885-20250415";
|
|
10108
10147
|
let keyValidityDate;
|
|
10109
10148
|
let consoleMessageState = 'invalid';
|
|
10110
10149
|
let domMessageState = 'invalid';
|
|
@@ -12992,6 +13031,22 @@ exports.__esModule = true;
|
|
|
12992
13031
|
* />
|
|
12993
13032
|
* :::
|
|
12994
13033
|
*
|
|
13034
|
+
* ::: only-for angular
|
|
13035
|
+
* ```ts
|
|
13036
|
+
* settings = {
|
|
13037
|
+
* afterChange: (changes, source) => {
|
|
13038
|
+
* changes?.forEach(([row, prop, oldValue, newValue]) => {
|
|
13039
|
+
* // Some logic...
|
|
13040
|
+
* });
|
|
13041
|
+
* },
|
|
13042
|
+
* };
|
|
13043
|
+
* ```
|
|
13044
|
+
*
|
|
13045
|
+
* ```html
|
|
13046
|
+
* <hot-table [settings]="settings" />
|
|
13047
|
+
* ```
|
|
13048
|
+
* :::
|
|
13049
|
+
*
|
|
12995
13050
|
* ::: only-for javascript
|
|
12996
13051
|
* ```js
|
|
12997
13052
|
* // using events as plugin hooks
|
|
@@ -13096,6 +13151,22 @@ const REGISTERED_HOOKS = exports.REGISTERED_HOOKS = [/* eslint-disable jsdoc/req
|
|
|
13096
13151
|
* />
|
|
13097
13152
|
* ```
|
|
13098
13153
|
* :::
|
|
13154
|
+
*
|
|
13155
|
+
* ::: only-for angular
|
|
13156
|
+
* ```ts
|
|
13157
|
+
* settings = {
|
|
13158
|
+
* afterChange: (changes, source) => {
|
|
13159
|
+
* changes?.forEach(([row, prop, oldValue, newValue]) => {
|
|
13160
|
+
* // Some logic...
|
|
13161
|
+
* });
|
|
13162
|
+
* },
|
|
13163
|
+
* };
|
|
13164
|
+
* ```
|
|
13165
|
+
*
|
|
13166
|
+
* ```html
|
|
13167
|
+
* <hot-table [settings]="settings"></hot-table>
|
|
13168
|
+
* ```
|
|
13169
|
+
* :::
|
|
13099
13170
|
*/
|
|
13100
13171
|
'afterChange',
|
|
13101
13172
|
/**
|
|
@@ -13199,6 +13270,21 @@ const REGISTERED_HOOKS = exports.REGISTERED_HOOKS = [/* eslint-disable jsdoc/req
|
|
|
13199
13270
|
* />
|
|
13200
13271
|
* ```
|
|
13201
13272
|
* :::
|
|
13273
|
+
*
|
|
13274
|
+
* ::: only-for angular
|
|
13275
|
+
* ```ts
|
|
13276
|
+
* settings = {
|
|
13277
|
+
* beforeCreateCol: (data, coords) => {
|
|
13278
|
+
* // Return `false` to cancel column inserting.
|
|
13279
|
+
* return false;
|
|
13280
|
+
* },
|
|
13281
|
+
* };
|
|
13282
|
+
* ```
|
|
13283
|
+
*
|
|
13284
|
+
* ```html
|
|
13285
|
+
* <hot-table [settings]="settings"></hot-table>
|
|
13286
|
+
* ```
|
|
13287
|
+
* :::
|
|
13202
13288
|
*/
|
|
13203
13289
|
'beforeCreateCol',
|
|
13204
13290
|
/**
|
|
@@ -13582,6 +13668,31 @@ const REGISTERED_HOOKS = exports.REGISTERED_HOOKS = [/* eslint-disable jsdoc/req
|
|
|
13582
13668
|
* }}
|
|
13583
13669
|
* />
|
|
13584
13670
|
* ```
|
|
13671
|
+
* :::
|
|
13672
|
+
*
|
|
13673
|
+
* ::: only-for angular
|
|
13674
|
+
* ```ts
|
|
13675
|
+
* settings = {
|
|
13676
|
+
* afterSelection: (
|
|
13677
|
+
* row,
|
|
13678
|
+
* column,
|
|
13679
|
+
* row2,
|
|
13680
|
+
* column2,
|
|
13681
|
+
* preventScrolling,
|
|
13682
|
+
* selectionLayerLevel
|
|
13683
|
+
* ) => {
|
|
13684
|
+
* // If set to `false` (default): when cell selection is outside the viewport,
|
|
13685
|
+
* // Handsontable scrolls the viewport to cell selection's end corner.
|
|
13686
|
+
* // If set to `true`: when cell selection is outside the viewport,
|
|
13687
|
+
* // Handsontable doesn't scroll to cell selection's end corner.
|
|
13688
|
+
* preventScrolling.value = true;
|
|
13689
|
+
* },
|
|
13690
|
+
* };
|
|
13691
|
+
* ```
|
|
13692
|
+
*
|
|
13693
|
+
* ```html
|
|
13694
|
+
* <hot-table [settings]="settings"></hot-table>
|
|
13695
|
+
* ```
|
|
13585
13696
|
* :::
|
|
13586
13697
|
*/
|
|
13587
13698
|
'afterSelection',
|
|
@@ -13621,6 +13732,28 @@ const REGISTERED_HOOKS = exports.REGISTERED_HOOKS = [/* eslint-disable jsdoc/req
|
|
|
13621
13732
|
* />
|
|
13622
13733
|
* ```
|
|
13623
13734
|
* :::
|
|
13735
|
+
*
|
|
13736
|
+
* ::: only-for angular
|
|
13737
|
+
* ```ts
|
|
13738
|
+
* settings = {
|
|
13739
|
+
* afterSelectionByProp: (
|
|
13740
|
+
* row,
|
|
13741
|
+
* column,
|
|
13742
|
+
* row2,
|
|
13743
|
+
* column2,
|
|
13744
|
+
* preventScrolling,
|
|
13745
|
+
* selectionLayerLevel
|
|
13746
|
+
* ) => {
|
|
13747
|
+
* // Setting if prevent scrolling after selection
|
|
13748
|
+
* preventScrolling.value = true;
|
|
13749
|
+
* },
|
|
13750
|
+
* };
|
|
13751
|
+
* ```
|
|
13752
|
+
*
|
|
13753
|
+
* ```html
|
|
13754
|
+
* <hot-table [settings]="settings"></hot-table>
|
|
13755
|
+
* ```
|
|
13756
|
+
* :::
|
|
13624
13757
|
*/
|
|
13625
13758
|
'afterSelectionByProp',
|
|
13626
13759
|
/**
|
|
@@ -13685,6 +13818,24 @@ const REGISTERED_HOOKS = exports.REGISTERED_HOOKS = [/* eslint-disable jsdoc/req
|
|
|
13685
13818
|
* />
|
|
13686
13819
|
* ```
|
|
13687
13820
|
* :::
|
|
13821
|
+
*
|
|
13822
|
+
* ::: only-for angular
|
|
13823
|
+
* ```ts
|
|
13824
|
+
* settings = {
|
|
13825
|
+
* afterSelectionFocusSet: (row, column, preventScrolling) => {
|
|
13826
|
+
* // If set to `false` (default): when focused cell selection is outside the viewport,
|
|
13827
|
+
* // Handsontable scrolls the viewport to that cell.
|
|
13828
|
+
* // If set to `true`: when focused cell selection is outside the viewport,
|
|
13829
|
+
* // Handsontable doesn't scroll the viewport.
|
|
13830
|
+
* preventScrolling.value = true;
|
|
13831
|
+
* },
|
|
13832
|
+
* };
|
|
13833
|
+
* ```
|
|
13834
|
+
*
|
|
13835
|
+
* ```html
|
|
13836
|
+
* <hot-table [settings]="settings"></hot-table>
|
|
13837
|
+
* ```
|
|
13838
|
+
* :::
|
|
13688
13839
|
*/
|
|
13689
13840
|
'afterSelectionFocusSet',
|
|
13690
13841
|
/**
|
|
@@ -13719,6 +13870,22 @@ const REGISTERED_HOOKS = exports.REGISTERED_HOOKS = [/* eslint-disable jsdoc/req
|
|
|
13719
13870
|
* />
|
|
13720
13871
|
* ```
|
|
13721
13872
|
* :::
|
|
13873
|
+
*
|
|
13874
|
+
* ::: only-for angular
|
|
13875
|
+
* ```ts
|
|
13876
|
+
* settings = {
|
|
13877
|
+
* beforeSelectColumns: (from, to, highlight) => {
|
|
13878
|
+
* // Extend the column selection by one column left and one column right.
|
|
13879
|
+
* from.col = Math.max(from.col - 1, 0);
|
|
13880
|
+
* to.col = Math.min(to.col + 1, this.countCols() - 1);
|
|
13881
|
+
* },
|
|
13882
|
+
* };
|
|
13883
|
+
* ```
|
|
13884
|
+
*
|
|
13885
|
+
* ```html
|
|
13886
|
+
* <hot-table [settings]="settings"></hot-table>
|
|
13887
|
+
* ```
|
|
13888
|
+
* :::
|
|
13722
13889
|
*/
|
|
13723
13890
|
'beforeSelectColumns',
|
|
13724
13891
|
/**
|
|
@@ -13763,6 +13930,22 @@ const REGISTERED_HOOKS = exports.REGISTERED_HOOKS = [/* eslint-disable jsdoc/req
|
|
|
13763
13930
|
* />
|
|
13764
13931
|
* ```
|
|
13765
13932
|
* :::
|
|
13933
|
+
*
|
|
13934
|
+
* ::: only-for angular
|
|
13935
|
+
* ```ts
|
|
13936
|
+
* settings = {
|
|
13937
|
+
* beforeSelectRows: (from, to, highlight) => {
|
|
13938
|
+
* // Extend the row selection by one row up and one row down.
|
|
13939
|
+
* from.row = Math.max(from.row - 1, 0);
|
|
13940
|
+
* to.row = Math.min(to.row + 1, this.countRows() - 1);
|
|
13941
|
+
* },
|
|
13942
|
+
* };
|
|
13943
|
+
* ```
|
|
13944
|
+
*
|
|
13945
|
+
* ```html
|
|
13946
|
+
* <hot-table [settings]="settings"></hot-table>
|
|
13947
|
+
* ```
|
|
13948
|
+
* :::
|
|
13766
13949
|
*/
|
|
13767
13950
|
'beforeSelectRows',
|
|
13768
13951
|
/**
|
|
@@ -13983,6 +14166,42 @@ const REGISTERED_HOOKS = exports.REGISTERED_HOOKS = [/* eslint-disable jsdoc/req
|
|
|
13983
14166
|
* />
|
|
13984
14167
|
* ```
|
|
13985
14168
|
* :::
|
|
14169
|
+
* ::: only-for angular
|
|
14170
|
+
*```ts
|
|
14171
|
+
* // To alter a single change, overwrite the desired value with `changes[i][3]`
|
|
14172
|
+
* settings1 = {
|
|
14173
|
+
* beforeChange: (changes, source) => {
|
|
14174
|
+
* // [[row, prop, oldVal, newVal], ...]
|
|
14175
|
+
* changes[0][3] = 10;
|
|
14176
|
+
* },
|
|
14177
|
+
* };
|
|
14178
|
+
*
|
|
14179
|
+
* // To ignore a single change, set `changes[i]` to `null`
|
|
14180
|
+
* // or remove `changes[i]` from the array, by using changes.splice(i, 1).
|
|
14181
|
+
* settings2 = {
|
|
14182
|
+
* beforeChange: (changes, source) => {
|
|
14183
|
+
* // [[row, prop, oldVal, newVal], ...]
|
|
14184
|
+
* changes[0] = null;
|
|
14185
|
+
* },
|
|
14186
|
+
* };
|
|
14187
|
+
*
|
|
14188
|
+
* // To ignore all changes, return `false`
|
|
14189
|
+
* // or set the array's length to 0 (`changes.length = 0`)
|
|
14190
|
+
* settings3 = {
|
|
14191
|
+
* beforeChange: (changes, source) => {
|
|
14192
|
+
* // [[row, prop, oldVal, newVal], ...]
|
|
14193
|
+
* return false;
|
|
14194
|
+
* },
|
|
14195
|
+
* };
|
|
14196
|
+
* ```
|
|
14197
|
+
*
|
|
14198
|
+
* ```html
|
|
14199
|
+
* <hot-table [settings]="settings1"></hot-table>
|
|
14200
|
+
* <hot-table [settings]="settings2"></hot-table>
|
|
14201
|
+
* <hot-table [settings]="settings3"></hot-table>
|
|
14202
|
+
* ```
|
|
14203
|
+
*
|
|
14204
|
+
* :::
|
|
13986
14205
|
*/
|
|
13987
14206
|
'beforeChange',
|
|
13988
14207
|
/**
|
|
@@ -14593,6 +14812,32 @@ const REGISTERED_HOOKS = exports.REGISTERED_HOOKS = [/* eslint-disable jsdoc/req
|
|
|
14593
14812
|
* />
|
|
14594
14813
|
* ```
|
|
14595
14814
|
* :::
|
|
14815
|
+
*
|
|
14816
|
+
* ::: only-for angular
|
|
14817
|
+
*```ts
|
|
14818
|
+
* // To disregard a single row, remove it from the array using data.splice(i, 1).
|
|
14819
|
+
* settings1 = {
|
|
14820
|
+
* beforeCut: (data, coords) => {
|
|
14821
|
+
* // data -> [[1, 2, 3], [4, 5, 6]]
|
|
14822
|
+
* data.splice(0, 1);
|
|
14823
|
+
* // data -> [[4, 5, 6]]
|
|
14824
|
+
* // coords -> [{startRow: 0, startCol: 0, endRow: 1, endCol: 2}]
|
|
14825
|
+
* },
|
|
14826
|
+
* };
|
|
14827
|
+
*
|
|
14828
|
+
* // To cancel a cutting action, just return `false`.
|
|
14829
|
+
* settings2 = {
|
|
14830
|
+
* beforeCut: (data, coords) => {
|
|
14831
|
+
* return false;
|
|
14832
|
+
* },
|
|
14833
|
+
* };
|
|
14834
|
+
* ```
|
|
14835
|
+
*
|
|
14836
|
+
* ```html
|
|
14837
|
+
* <hot-table [settings]="settings1"></hot-table>
|
|
14838
|
+
* <hot-table [settings]="settings2"></hot-table>
|
|
14839
|
+
* ```
|
|
14840
|
+
* :::
|
|
14596
14841
|
*/
|
|
14597
14842
|
'beforeCut',
|
|
14598
14843
|
/**
|
|
@@ -14665,6 +14910,32 @@ const REGISTERED_HOOKS = exports.REGISTERED_HOOKS = [/* eslint-disable jsdoc/req
|
|
|
14665
14910
|
* ...
|
|
14666
14911
|
* ```
|
|
14667
14912
|
* :::
|
|
14913
|
+
*
|
|
14914
|
+
* ::: only-for angular
|
|
14915
|
+
* ```ts
|
|
14916
|
+
* // To disregard a single row, remove it from the array using data.splice(i, 1).
|
|
14917
|
+
* settings1 = {
|
|
14918
|
+
* beforeCopy: (data, coords) => {
|
|
14919
|
+
* // data -> [[1, 2, 3], [4, 5, 6]]
|
|
14920
|
+
* data.splice(0, 1);
|
|
14921
|
+
* // data -> [[4, 5, 6]]
|
|
14922
|
+
* // coords -> [{startRow: 0, startCol: 0, endRow: 1, endCol: 2}]
|
|
14923
|
+
* },
|
|
14924
|
+
* };
|
|
14925
|
+
*
|
|
14926
|
+
* // To cancel copying, return false from the callback.
|
|
14927
|
+
* settings2 = {
|
|
14928
|
+
* beforeCopy: (data, coords) => {
|
|
14929
|
+
* return false;
|
|
14930
|
+
* },
|
|
14931
|
+
* };
|
|
14932
|
+
* ```
|
|
14933
|
+
*
|
|
14934
|
+
* ```html
|
|
14935
|
+
* <hot-table [settings]="settings1"></hot-table>
|
|
14936
|
+
* <hot-table [settings]="settings2"></hot-table>
|
|
14937
|
+
* ```
|
|
14938
|
+
* :::
|
|
14668
14939
|
*/
|
|
14669
14940
|
'beforeCopy',
|
|
14670
14941
|
/**
|
|
@@ -14727,6 +14998,32 @@ const REGISTERED_HOOKS = exports.REGISTERED_HOOKS = [/* eslint-disable jsdoc/req
|
|
|
14727
14998
|
* />
|
|
14728
14999
|
* ```
|
|
14729
15000
|
* :::
|
|
15001
|
+
*
|
|
15002
|
+
* ::: only-for angular
|
|
15003
|
+
* ```ts
|
|
15004
|
+
* // To disregard a single row, remove it from the array using data.splice(i, 1).
|
|
15005
|
+
* settings1 = {
|
|
15006
|
+
* beforePaste: (data, coords) => {
|
|
15007
|
+
* // data -> [[1, 2, 3], [4, 5, 6]]
|
|
15008
|
+
* data.splice(0, 1);
|
|
15009
|
+
* // data -> [[4, 5, 6]]
|
|
15010
|
+
* // coords -> [{startRow: 0, startCol: 0, endRow: 1, endCol: 2}]
|
|
15011
|
+
* },
|
|
15012
|
+
* };
|
|
15013
|
+
*
|
|
15014
|
+
* // To cancel pasting, return false from the callback.
|
|
15015
|
+
* settings2 = {
|
|
15016
|
+
* beforePaste: (data, coords) => {
|
|
15017
|
+
* return false;
|
|
15018
|
+
* },
|
|
15019
|
+
* };
|
|
15020
|
+
* ```
|
|
15021
|
+
*
|
|
15022
|
+
* ```html
|
|
15023
|
+
* <hot-table [settings]="settings1"></hot-table>
|
|
15024
|
+
* <hot-table [settings]="settings2"></hot-table>
|
|
15025
|
+
* ```
|
|
15026
|
+
* :::
|
|
14730
15027
|
*/
|
|
14731
15028
|
'beforePaste',
|
|
14732
15029
|
/**
|
|
@@ -40667,6 +40964,33 @@ var _object = __webpack_require__(165);
|
|
|
40667
40964
|
* ```
|
|
40668
40965
|
* :::
|
|
40669
40966
|
*
|
|
40967
|
+
* ::: only-for angular
|
|
40968
|
+
* ```ts
|
|
40969
|
+
* settings = {
|
|
40970
|
+
* data: [
|
|
40971
|
+
* ["A1", "B1", "C1", "D1", "E1"],
|
|
40972
|
+
* ["A2", "B2", "C2", "D2", "E2"],
|
|
40973
|
+
* ["A3", "B3", "C3", "D3", "E3"],
|
|
40974
|
+
* ["A4", "B4", "C4", "D4", "E4"],
|
|
40975
|
+
* ["A5", "B5", "C5", "D5", "E5"],
|
|
40976
|
+
* ],
|
|
40977
|
+
* width: 400,
|
|
40978
|
+
* height: 300,
|
|
40979
|
+
* colHeaders: true,
|
|
40980
|
+
* rowHeaders: true,
|
|
40981
|
+
* customBorders: true,
|
|
40982
|
+
* dropdownMenu: true,
|
|
40983
|
+
* multiColumnSorting: true,
|
|
40984
|
+
* filters: true,
|
|
40985
|
+
* manualRowMove: true,
|
|
40986
|
+
* };
|
|
40987
|
+
* ```
|
|
40988
|
+
*
|
|
40989
|
+
* ```html
|
|
40990
|
+
* <hot-table [settings]="settings" />
|
|
40991
|
+
* ```
|
|
40992
|
+
* :::
|
|
40993
|
+
*
|
|
40670
40994
|
* Depending on your needs, you can apply [configuration options](@/api/options.md) to different elements of your grid:
|
|
40671
40995
|
* - [The entire grid](@/guides/getting-started/configuration-options/configuration-options.md#set-grid-options)
|
|
40672
40996
|
* - [Individual columns](@/guides/getting-started/configuration-options/configuration-options.md#set-column-options)
|
|
@@ -54916,6 +55240,53 @@ const COLUMN_SIZE_MAP_NAME = 'autoColumnSize';
|
|
|
54916
55240
|
* }
|
|
54917
55241
|
* ```
|
|
54918
55242
|
* :::
|
|
55243
|
+
*
|
|
55244
|
+
* ::: only-for angular
|
|
55245
|
+
*
|
|
55246
|
+
* ```ts
|
|
55247
|
+
* import { AfterViewInit, Component, ViewChild } from "@angular/core";
|
|
55248
|
+
* import {
|
|
55249
|
+
* GridSettings,
|
|
55250
|
+
* HotTableModule,
|
|
55251
|
+
* HotTableComponent,
|
|
55252
|
+
* } from "@handsontable/angular-wrapper";
|
|
55253
|
+
*
|
|
55254
|
+
* `@Component`({
|
|
55255
|
+
* selector: "app-example",
|
|
55256
|
+
* standalone: true,
|
|
55257
|
+
* imports: [HotTableModule],
|
|
55258
|
+
* template: ` <div class="ht-theme-main">
|
|
55259
|
+
* <hot-table [settings]="gridSettings" />
|
|
55260
|
+
* </div>`,
|
|
55261
|
+
* })
|
|
55262
|
+
* export class ExampleComponent implements AfterViewInit {
|
|
55263
|
+
* `@ViewChild`(HotTableComponent, { static: false })
|
|
55264
|
+
* readonly hotTable!: HotTableComponent;
|
|
55265
|
+
*
|
|
55266
|
+
* readonly gridSettings = <GridSettings>{
|
|
55267
|
+
* data: this.getData(),
|
|
55268
|
+
* autoColumnSize: true,
|
|
55269
|
+
* };
|
|
55270
|
+
*
|
|
55271
|
+
* ngAfterViewInit(): void {
|
|
55272
|
+
* // Access to plugin instance:
|
|
55273
|
+
* const hot = this.hotTable.hotInstance;
|
|
55274
|
+
* const plugin = hot.getPlugin("autoColumnSize");
|
|
55275
|
+
*
|
|
55276
|
+
* plugin.getColumnWidth(4);
|
|
55277
|
+
*
|
|
55278
|
+
* if (plugin.isEnabled()) {
|
|
55279
|
+
* // code...
|
|
55280
|
+
* }
|
|
55281
|
+
* }
|
|
55282
|
+
*
|
|
55283
|
+
* private getData(): any[] {
|
|
55284
|
+
* //get some data
|
|
55285
|
+
* }
|
|
55286
|
+
* }
|
|
55287
|
+
* ```
|
|
55288
|
+
*
|
|
55289
|
+
* :::
|
|
54919
55290
|
*/
|
|
54920
55291
|
/* eslint-enable jsdoc/require-description-complete-sentence */
|
|
54921
55292
|
var _isInitialized = /*#__PURE__*/new WeakMap();
|
|
@@ -57317,6 +57688,51 @@ const ROW_WIDTHS_MAP_NAME = 'autoRowSize';
|
|
|
57317
57688
|
* }
|
|
57318
57689
|
* ```
|
|
57319
57690
|
* :::
|
|
57691
|
+
*
|
|
57692
|
+
* ::: only-for angular
|
|
57693
|
+
* ```ts
|
|
57694
|
+
* import { AfterViewInit, Component, ViewChild } from "@angular/core";
|
|
57695
|
+
* import {
|
|
57696
|
+
* GridSettings,
|
|
57697
|
+
* HotTableModule,
|
|
57698
|
+
* HotTableComponent,
|
|
57699
|
+
* } from "@handsontable/angular-wrapper";
|
|
57700
|
+
*
|
|
57701
|
+
* `@Component`({
|
|
57702
|
+
* selector: "app-example",
|
|
57703
|
+
* standalone: true,
|
|
57704
|
+
* imports: [HotTableModule],
|
|
57705
|
+
* template: ` <div class="ht-theme-main">
|
|
57706
|
+
* <hot-table [settings]="gridSettings" />
|
|
57707
|
+
* </div>`,
|
|
57708
|
+
* })
|
|
57709
|
+
* export class ExampleComponent implements AfterViewInit {
|
|
57710
|
+
* `@ViewChild`(HotTableComponent, { static: false })
|
|
57711
|
+
* readonly hotTable!: HotTableComponent;
|
|
57712
|
+
*
|
|
57713
|
+
* readonly gridSettings = <GridSettings>{
|
|
57714
|
+
* data: this.getData(),
|
|
57715
|
+
* autoRowSize: true,
|
|
57716
|
+
* };
|
|
57717
|
+
*
|
|
57718
|
+
* ngAfterViewInit(): void {
|
|
57719
|
+
* // Access to plugin instance:
|
|
57720
|
+
* const hot = this.hotTable.hotInstance;
|
|
57721
|
+
* const plugin = hot.getPlugin("autoRowSize");
|
|
57722
|
+
*
|
|
57723
|
+
* plugin.getRowHeight(4);
|
|
57724
|
+
*
|
|
57725
|
+
* if (plugin.isEnabled()) {
|
|
57726
|
+
* // code...
|
|
57727
|
+
* }
|
|
57728
|
+
* }
|
|
57729
|
+
*
|
|
57730
|
+
* private getData(): any[] {
|
|
57731
|
+
* // get some data
|
|
57732
|
+
* }
|
|
57733
|
+
* }
|
|
57734
|
+
* ```
|
|
57735
|
+
* :::
|
|
57320
57736
|
*/
|
|
57321
57737
|
/* eslint-enable jsdoc/require-description-complete-sentence */
|
|
57322
57738
|
var _visualRowsToRefresh = /*#__PURE__*/new WeakMap();
|
|
@@ -57945,6 +58361,19 @@ const bindTypeToMapStrategy = new Map([['loose', _looseBindsMap.default], ['stri
|
|
|
57945
58361
|
* />
|
|
57946
58362
|
* ```
|
|
57947
58363
|
* :::
|
|
58364
|
+
*
|
|
58365
|
+
* ::: only-for angular
|
|
58366
|
+
* ```ts
|
|
58367
|
+
* settings = {
|
|
58368
|
+
* data: getData(),
|
|
58369
|
+
* bindRowsWithHeaders: true,
|
|
58370
|
+
* };
|
|
58371
|
+
* ```
|
|
58372
|
+
*
|
|
58373
|
+
* ```html
|
|
58374
|
+
* <hot-table [settings]="settings" />
|
|
58375
|
+
* ```
|
|
58376
|
+
* :::
|
|
57948
58377
|
*/
|
|
57949
58378
|
var _BindRowsWithHeaders_brand = /*#__PURE__*/new WeakSet();
|
|
57950
58379
|
class BindRowsWithHeaders extends _base.BasePlugin {
|
|
@@ -58244,6 +58673,37 @@ const actionDictionary = new Map([['collapse', {
|
|
|
58244
58673
|
* />
|
|
58245
58674
|
* ```
|
|
58246
58675
|
* :::
|
|
58676
|
+
*
|
|
58677
|
+
* ::: only-for angular
|
|
58678
|
+
* ```ts
|
|
58679
|
+
* // Enable the collapsibleColumns plugin
|
|
58680
|
+
* settings = {
|
|
58681
|
+
* data: generateDataObj(),
|
|
58682
|
+
* colHeaders: true,
|
|
58683
|
+
* rowHeaders: true,
|
|
58684
|
+
* nestedHeaders: true,
|
|
58685
|
+
* // enable plugin
|
|
58686
|
+
* collapsibleColumns: true,
|
|
58687
|
+
* };
|
|
58688
|
+
*
|
|
58689
|
+
* // Or enable and configure specific collapsible columns
|
|
58690
|
+
* settings = {
|
|
58691
|
+
* data: generateDataObj(),
|
|
58692
|
+
* colHeaders: true,
|
|
58693
|
+
* rowHeaders: true,
|
|
58694
|
+
* nestedHeaders: true,
|
|
58695
|
+
* // enable and configure which columns can be collapsed
|
|
58696
|
+
* collapsibleColumns: [
|
|
58697
|
+
* { row: -4, col: 1, collapsible: true },
|
|
58698
|
+
* { row: -3, col: 5, collapsible: true },
|
|
58699
|
+
* ],
|
|
58700
|
+
* };
|
|
58701
|
+
* ```
|
|
58702
|
+
*
|
|
58703
|
+
* ```html
|
|
58704
|
+
* <hot-table [settings]="settings"></hot-table>
|
|
58705
|
+
* ```
|
|
58706
|
+
* :::
|
|
58247
58707
|
*/
|
|
58248
58708
|
var _collapsedColumnsMap = /*#__PURE__*/new WeakMap();
|
|
58249
58709
|
var _CollapsibleColumns_brand = /*#__PURE__*/new WeakSet();
|
|
@@ -60526,6 +60986,39 @@ const PLUGIN_PRIORITY = exports.PLUGIN_PRIORITY = 220;
|
|
|
60526
60986
|
* />
|
|
60527
60987
|
* ```
|
|
60528
60988
|
* :::
|
|
60989
|
+
*
|
|
60990
|
+
* ::: only-for angular
|
|
60991
|
+
* ```ts
|
|
60992
|
+
* settings = {
|
|
60993
|
+
* data: getData(),
|
|
60994
|
+
* colHeaders: true,
|
|
60995
|
+
* rowHeaders: true,
|
|
60996
|
+
* columnSummary: [
|
|
60997
|
+
* {
|
|
60998
|
+
* type: "min",
|
|
60999
|
+
* destinationRow: 4,
|
|
61000
|
+
* destinationColumn: 1,
|
|
61001
|
+
* },
|
|
61002
|
+
* {
|
|
61003
|
+
* type: "max",
|
|
61004
|
+
* destinationRow: 0,
|
|
61005
|
+
* destinationColumn: 3,
|
|
61006
|
+
* reversedRowCoords: true,
|
|
61007
|
+
* },
|
|
61008
|
+
* {
|
|
61009
|
+
* type: "sum",
|
|
61010
|
+
* destinationRow: 4,
|
|
61011
|
+
* destinationColumn: 5,
|
|
61012
|
+
* forceNumeric: true,
|
|
61013
|
+
* },
|
|
61014
|
+
* ],
|
|
61015
|
+
* };
|
|
61016
|
+
* ```
|
|
61017
|
+
*
|
|
61018
|
+
* ```html
|
|
61019
|
+
* <hot-table [settings]="settings"></hot-table>
|
|
61020
|
+
* ```
|
|
61021
|
+
* :::
|
|
60529
61022
|
*/
|
|
60530
61023
|
var _ColumnSummary_brand = /*#__PURE__*/new WeakSet();
|
|
60531
61024
|
class ColumnSummary extends _base.BasePlugin {
|
|
@@ -61615,6 +62108,59 @@ const SHORTCUTS_CONTEXT_NAME = `plugin:${PLUGIN_KEY}`;
|
|
|
61615
62108
|
* commentsPlugin.removeComment();
|
|
61616
62109
|
* ```
|
|
61617
62110
|
* :::
|
|
62111
|
+
*
|
|
62112
|
+
* ::: only-for angular
|
|
62113
|
+
* ```ts
|
|
62114
|
+
* import { AfterViewInit, Component, ViewChild } from "@angular/core";
|
|
62115
|
+
* import {
|
|
62116
|
+
* GridSettings,
|
|
62117
|
+
* HotTableModule,
|
|
62118
|
+
* HotTableComponent,
|
|
62119
|
+
* } from "@handsontable/angular-wrapper";
|
|
62120
|
+
*
|
|
62121
|
+
* `@Component`({
|
|
62122
|
+
* selector: "app-example",
|
|
62123
|
+
* standalone: true,
|
|
62124
|
+
* imports: [HotTableModule],
|
|
62125
|
+
* template: ` <div class="ht-theme-main">
|
|
62126
|
+
* <hot-table [settings]="gridSettings" />
|
|
62127
|
+
* </div>`,
|
|
62128
|
+
* })
|
|
62129
|
+
* export class ExampleComponent implements AfterViewInit {
|
|
62130
|
+
* `@ViewChild`(HotTableComponent, { static: false })
|
|
62131
|
+
* readonly hotTable!: HotTableComponent;
|
|
62132
|
+
*
|
|
62133
|
+
* readonly gridSettings = <GridSettings>{
|
|
62134
|
+
* data: this.getData(),
|
|
62135
|
+
* comments: true,
|
|
62136
|
+
* cell: [
|
|
62137
|
+
* { row: 1, col: 1, comment: { value: "Foo" } },
|
|
62138
|
+
* { row: 2, col: 2, comment: { value: "Bar" } },
|
|
62139
|
+
* ],
|
|
62140
|
+
* };
|
|
62141
|
+
*
|
|
62142
|
+
* ngAfterViewInit(): void {
|
|
62143
|
+
* // Access to plugin instance:
|
|
62144
|
+
* const hot = this.hotTable.hotInstance;
|
|
62145
|
+
* const commentsPlugin = hot.getPlugin("comments");
|
|
62146
|
+
*
|
|
62147
|
+
* // Manage comments programmatically:
|
|
62148
|
+
* commentsPlugin.setCommentAtCell(1, 6, "Comment contents");
|
|
62149
|
+
* commentsPlugin.showAtCell(1, 6);
|
|
62150
|
+
* commentsPlugin.removeCommentAtCell(1, 6);
|
|
62151
|
+
*
|
|
62152
|
+
* // You can also set range once and use proper methods:
|
|
62153
|
+
* commentsPlugin.setRange({ from: { row: 1, col: 6 } });
|
|
62154
|
+
* commentsPlugin.setComment("Comment contents");
|
|
62155
|
+
* commentsPlugin.show();
|
|
62156
|
+
* }
|
|
62157
|
+
*
|
|
62158
|
+
* private getData(): any[] {
|
|
62159
|
+
* // get some data
|
|
62160
|
+
* }
|
|
62161
|
+
* }
|
|
62162
|
+
* ```
|
|
62163
|
+
* :::
|
|
61618
62164
|
*/
|
|
61619
62165
|
var _editor = /*#__PURE__*/new WeakMap();
|
|
61620
62166
|
var _displaySwitch = /*#__PURE__*/new WeakMap();
|
|
@@ -69237,6 +69783,21 @@ const SHORTCUTS_GROUP = PLUGIN_KEY;
|
|
|
69237
69783
|
* />
|
|
69238
69784
|
* ```
|
|
69239
69785
|
* :::
|
|
69786
|
+
*
|
|
69787
|
+
* ::: only-for angular
|
|
69788
|
+
* ```ts
|
|
69789
|
+
* settings = {
|
|
69790
|
+
* data: data,
|
|
69791
|
+
* comments: true,
|
|
69792
|
+
* // enable and configure dropdown menu
|
|
69793
|
+
* dropdownMenu: ["remove_col", "---------", "make_read_only", "alignment"],
|
|
69794
|
+
* };
|
|
69795
|
+
* ```
|
|
69796
|
+
*
|
|
69797
|
+
* ```html
|
|
69798
|
+
* <hot-table [settings]="settings"></hot-table>
|
|
69799
|
+
* ```
|
|
69800
|
+
* :::
|
|
69240
69801
|
*/
|
|
69241
69802
|
var _isButtonClicked = /*#__PURE__*/new WeakMap();
|
|
69242
69803
|
var _DropdownMenu_brand = /*#__PURE__*/new WeakSet();
|
|
@@ -69817,6 +70378,64 @@ const PLUGIN_PRIORITY = exports.PLUGIN_PRIORITY = 240;
|
|
|
69817
70378
|
* });
|
|
69818
70379
|
* ```
|
|
69819
70380
|
* :::
|
|
70381
|
+
*
|
|
70382
|
+
* ::: only-for angular
|
|
70383
|
+
* ```ts
|
|
70384
|
+
* import { AfterViewInit, Component, ViewChild } from "@angular/core";
|
|
70385
|
+
* import {
|
|
70386
|
+
* GridSettings,
|
|
70387
|
+
* HotTableModule,
|
|
70388
|
+
* HotTableComponent,
|
|
70389
|
+
* } from "@handsontable/angular-wrapper";
|
|
70390
|
+
*
|
|
70391
|
+
* `@Component`({
|
|
70392
|
+
* selector: "app-example",
|
|
70393
|
+
* standalone: true,
|
|
70394
|
+
* imports: [HotTableModule],
|
|
70395
|
+
* template: ` <div class="ht-theme-main">
|
|
70396
|
+
* <hot-table [settings]="gridSettings" />
|
|
70397
|
+
* </div>`,
|
|
70398
|
+
* })
|
|
70399
|
+
* export class ExampleComponent implements AfterViewInit {
|
|
70400
|
+
* `@ViewChild`(HotTableComponent, { static: false })
|
|
70401
|
+
* readonly hotTable!: HotTableComponent;
|
|
70402
|
+
*
|
|
70403
|
+
* readonly gridSettings = <GridSettings>{
|
|
70404
|
+
* data: this.getData(),
|
|
70405
|
+
* };
|
|
70406
|
+
*
|
|
70407
|
+
* ngAfterViewInit(): void {
|
|
70408
|
+
* // Access to plugin instance:
|
|
70409
|
+
* const hot = this.hotTable.hotInstance;
|
|
70410
|
+
* // Access to exportFile plugin instance
|
|
70411
|
+
* const exportPlugin = hot.getPlugin("exportFile");
|
|
70412
|
+
*
|
|
70413
|
+
* // Export as a string
|
|
70414
|
+
* exportPlugin.exportAsString("csv");
|
|
70415
|
+
*
|
|
70416
|
+
* // Export as a blob object
|
|
70417
|
+
* exportPlugin.exportAsBlob("csv");
|
|
70418
|
+
*
|
|
70419
|
+
* // Export to downloadable file (named: MyFile.csv)
|
|
70420
|
+
* exportPlugin.downloadFile("csv", { filename: "MyFile" });
|
|
70421
|
+
*
|
|
70422
|
+
* // Export as a string (with specified data range):
|
|
70423
|
+
* exportPlugin.exportAsString("csv", {
|
|
70424
|
+
* exportHiddenRows: true, // default false
|
|
70425
|
+
* exportHiddenColumns: true, // default false
|
|
70426
|
+
* columnHeaders: true, // default false
|
|
70427
|
+
* rowHeaders: true, // default false
|
|
70428
|
+
* columnDelimiter: ";", // default ','
|
|
70429
|
+
* range: [1, 1, 6, 6], // [startRow, endRow, startColumn, endColumn]
|
|
70430
|
+
* });
|
|
70431
|
+
* }
|
|
70432
|
+
*
|
|
70433
|
+
* private getData(): any[] {
|
|
70434
|
+
* // get some data
|
|
70435
|
+
* }
|
|
70436
|
+
* }
|
|
70437
|
+
* ```
|
|
70438
|
+
* :::
|
|
69820
70439
|
*/
|
|
69821
70440
|
class ExportFile extends _base.BasePlugin {
|
|
69822
70441
|
static get PLUGIN_KEY() {
|
|
@@ -70398,6 +71017,22 @@ const SHORTCUTS_GROUP = PLUGIN_KEY;
|
|
|
70398
71017
|
* />
|
|
70399
71018
|
* ```
|
|
70400
71019
|
* :::
|
|
71020
|
+
*
|
|
71021
|
+
* ::: only-for angular
|
|
71022
|
+
* ```ts
|
|
71023
|
+
* settings = {
|
|
71024
|
+
* data: getData(),
|
|
71025
|
+
* colHeaders: true,
|
|
71026
|
+
* rowHeaders: true,
|
|
71027
|
+
* dropdownMenu: true,
|
|
71028
|
+
* filters: true,
|
|
71029
|
+
* };
|
|
71030
|
+
* ```
|
|
71031
|
+
*
|
|
71032
|
+
* ```html
|
|
71033
|
+
* <hot-table [settings]="settings"></hot-table>
|
|
71034
|
+
* ```
|
|
71035
|
+
* :::
|
|
70401
71036
|
*/
|
|
70402
71037
|
var _menuFocusNavigator = /*#__PURE__*/new WeakMap();
|
|
70403
71038
|
var _dropdownMenuTraces = /*#__PURE__*/new WeakMap();
|
|
@@ -70780,6 +71415,64 @@ class Filters extends _base.BasePlugin {
|
|
|
70780
71415
|
* ```
|
|
70781
71416
|
* :::
|
|
70782
71417
|
*
|
|
71418
|
+
* ::: only-for angular
|
|
71419
|
+
* ```ts
|
|
71420
|
+
* import { AfterViewInit, Component, ViewChild } from "@angular/core";
|
|
71421
|
+
* import {
|
|
71422
|
+
* GridSettings,
|
|
71423
|
+
* HotTableModule,
|
|
71424
|
+
* HotTableComponent,
|
|
71425
|
+
* } from "@handsontable/angular-wrapper";
|
|
71426
|
+
*
|
|
71427
|
+
* `@Component`({
|
|
71428
|
+
* selector: "app-example",
|
|
71429
|
+
* standalone: true,
|
|
71430
|
+
* imports: [HotTableModule],
|
|
71431
|
+
* template: ` <div class="ht-theme-main">
|
|
71432
|
+
* <hot-table [settings]="gridSettings" />
|
|
71433
|
+
* </div>`,
|
|
71434
|
+
* })
|
|
71435
|
+
* export class ExampleComponent implements AfterViewInit {
|
|
71436
|
+
* `@ViewChild`(HotTableComponent, { static: false })
|
|
71437
|
+
* readonly hotTable!: HotTableComponent;
|
|
71438
|
+
*
|
|
71439
|
+
* readonly gridSettings = <GridSettings>{
|
|
71440
|
+
* data: this.getData(),
|
|
71441
|
+
* filters: true,
|
|
71442
|
+
* };
|
|
71443
|
+
*
|
|
71444
|
+
* ngAfterViewInit(): void {
|
|
71445
|
+
* // Access to filters plugin instance
|
|
71446
|
+
* const hot = this.hotTable.hotInstance;
|
|
71447
|
+
* const filtersPlugin = hot.getPlugin("filters");
|
|
71448
|
+
*
|
|
71449
|
+
* // Add filter "Greater than" 95 to column at index 1
|
|
71450
|
+
* filtersPlugin.addCondition(1, "gt", [95]);
|
|
71451
|
+
* filtersPlugin.filter();
|
|
71452
|
+
*
|
|
71453
|
+
* // Add filter "By value" to column at index 1
|
|
71454
|
+
* // In this case, all values that don't match will be filtered.
|
|
71455
|
+
* filtersPlugin.addCondition(1, "by_value", [["ing", "ed", "as", "on"]]);
|
|
71456
|
+
* filtersPlugin.filter();
|
|
71457
|
+
*
|
|
71458
|
+
* // Add filter "Begins with" with value "de" AND "Not contains" with value "ing"
|
|
71459
|
+
* filtersPlugin.addCondition(1, "begins_with", ["de"], "conjunction");
|
|
71460
|
+
* filtersPlugin.addCondition(1, "not_contains", ["ing"], "conjunction");
|
|
71461
|
+
* filtersPlugin.filter();
|
|
71462
|
+
*
|
|
71463
|
+
* // Add filter "Begins with" with value "de" OR "Not contains" with value "ing"
|
|
71464
|
+
* filtersPlugin.addCondition(1, "begins_with", ["de"], "disjunction");
|
|
71465
|
+
* filtersPlugin.addCondition(1, "not_contains", ["ing"], "disjunction");
|
|
71466
|
+
* filtersPlugin.filter();
|
|
71467
|
+
* }
|
|
71468
|
+
*
|
|
71469
|
+
* private getData(): any[] {
|
|
71470
|
+
* // Get some data
|
|
71471
|
+
* }
|
|
71472
|
+
* }
|
|
71473
|
+
* ```
|
|
71474
|
+
* :::
|
|
71475
|
+
*
|
|
70783
71476
|
* @param {number} column Visual column index.
|
|
70784
71477
|
* @param {string} name Condition short name.
|
|
70785
71478
|
* @param {Array} args Condition arguments.
|
|
@@ -77970,6 +78663,70 @@ const PLUGIN_PRIORITY = exports.PLUGIN_PRIORITY = 310;
|
|
|
77970
78663
|
* hot.render();
|
|
77971
78664
|
* ```
|
|
77972
78665
|
* :::
|
|
78666
|
+
*
|
|
78667
|
+
* ::: only-for angular
|
|
78668
|
+
* ```ts
|
|
78669
|
+
* import { AfterViewInit, Component, ViewChild } from "@angular/core";
|
|
78670
|
+
* import {
|
|
78671
|
+
* GridSettings,
|
|
78672
|
+
* HotTableModule,
|
|
78673
|
+
* HotTableComponent,
|
|
78674
|
+
* } from "@handsontable/angular-wrapper";
|
|
78675
|
+
*
|
|
78676
|
+
* `@Component`({
|
|
78677
|
+
* selector: "app-example",
|
|
78678
|
+
* standalone: true,
|
|
78679
|
+
* imports: [HotTableModule],
|
|
78680
|
+
* template: ` <div class="ht-theme-main">
|
|
78681
|
+
* <hot-table [settings]="gridSettings" />
|
|
78682
|
+
* </div>`,
|
|
78683
|
+
* })
|
|
78684
|
+
* export class ExampleComponent implements AfterViewInit {
|
|
78685
|
+
* `@ViewChild`(HotTableComponent, { static: false })
|
|
78686
|
+
* readonly hotTable!: HotTableComponent;
|
|
78687
|
+
*
|
|
78688
|
+
* readonly gridSettings = <GridSettings>{
|
|
78689
|
+
* data: this.getData(),
|
|
78690
|
+
* hiddenColumns: {
|
|
78691
|
+
* copyPasteEnabled: true,
|
|
78692
|
+
* indicators: true,
|
|
78693
|
+
* columns: [1, 2, 5],
|
|
78694
|
+
* },
|
|
78695
|
+
* };
|
|
78696
|
+
*
|
|
78697
|
+
* ngAfterViewInit(): void {
|
|
78698
|
+
* // Access the `HiddenColumns` plugin's instance
|
|
78699
|
+
* const hot = this.hotTable.hotInstance;
|
|
78700
|
+
* const hiddenColumnsPlugin = hot.getPlugin("hiddenColumns");
|
|
78701
|
+
*
|
|
78702
|
+
* // Hide a single column
|
|
78703
|
+
* hiddenColumnsPlugin.hideColumn(1);
|
|
78704
|
+
*
|
|
78705
|
+
* // Hide multiple columns
|
|
78706
|
+
* hiddenColumnsPlugin.hideColumn(1, 2, 9);
|
|
78707
|
+
*
|
|
78708
|
+
* // Hide multiple columns as an array
|
|
78709
|
+
* hiddenColumnsPlugin.hideColumns([1, 2, 9]);
|
|
78710
|
+
*
|
|
78711
|
+
* // Unhide a single column
|
|
78712
|
+
* hiddenColumnsPlugin.showColumn(1);
|
|
78713
|
+
*
|
|
78714
|
+
* // Unhide multiple columns
|
|
78715
|
+
* hiddenColumnsPlugin.showColumn(1, 2, 9);
|
|
78716
|
+
*
|
|
78717
|
+
* // Unhide multiple columns as an array
|
|
78718
|
+
* hiddenColumnsPlugin.showColumns([1, 2, 9]);
|
|
78719
|
+
*
|
|
78720
|
+
* // To see your changes, re-render your Handsontable instance
|
|
78721
|
+
* hot.render();
|
|
78722
|
+
* }
|
|
78723
|
+
*
|
|
78724
|
+
* private getData(): any[] {
|
|
78725
|
+
* // Get some data
|
|
78726
|
+
* }
|
|
78727
|
+
* }
|
|
78728
|
+
* ```
|
|
78729
|
+
* :::
|
|
77973
78730
|
*/
|
|
77974
78731
|
var _hiddenColumnsMap = /*#__PURE__*/new WeakMap();
|
|
77975
78732
|
var _HiddenColumns_brand = /*#__PURE__*/new WeakSet();
|
|
@@ -78659,6 +79416,70 @@ const PLUGIN_PRIORITY = exports.PLUGIN_PRIORITY = 320;
|
|
|
78659
79416
|
* hot.render();
|
|
78660
79417
|
* ```
|
|
78661
79418
|
* :::
|
|
79419
|
+
*
|
|
79420
|
+
* ::: only-for angular
|
|
79421
|
+
* ```ts
|
|
79422
|
+
* import { AfterViewInit, Component, ViewChild } from "@angular/core";
|
|
79423
|
+
* import {
|
|
79424
|
+
* GridSettings,
|
|
79425
|
+
* HotTableModule,
|
|
79426
|
+
* HotTableComponent,
|
|
79427
|
+
* } from "@handsontable/angular-wrapper";
|
|
79428
|
+
*
|
|
79429
|
+
* `@Component`({
|
|
79430
|
+
* selector: "app-example",
|
|
79431
|
+
* standalone: true,
|
|
79432
|
+
* imports: [HotTableModule],
|
|
79433
|
+
* template: ` <div class="ht-theme-main">
|
|
79434
|
+
* <hot-table [settings]="gridSettings" />
|
|
79435
|
+
* </div>`,
|
|
79436
|
+
* })
|
|
79437
|
+
* export class ExampleComponent implements AfterViewInit {
|
|
79438
|
+
* `@ViewChild`(HotTableComponent, { static: false })
|
|
79439
|
+
* readonly hotTable!: HotTableComponent;
|
|
79440
|
+
*
|
|
79441
|
+
* readonly gridSettings = <GridSettings>{
|
|
79442
|
+
* data: this.getData(),
|
|
79443
|
+
* hiddenRows: {
|
|
79444
|
+
* copyPasteEnabled: true,
|
|
79445
|
+
* indicators: true,
|
|
79446
|
+
* rows: [1, 2, 5],
|
|
79447
|
+
* },
|
|
79448
|
+
* };
|
|
79449
|
+
*
|
|
79450
|
+
* ngAfterViewInit(): void {
|
|
79451
|
+
* // Access the `HiddenRows` plugin's instance
|
|
79452
|
+
* const hot = this.hotTable.hotInstance;
|
|
79453
|
+
* const hiddenRowsPlugin = hot.getPlugin("hiddenRows");
|
|
79454
|
+
*
|
|
79455
|
+
* // Hide a single row
|
|
79456
|
+
* hiddenRowsPlugin.hideRow(1);
|
|
79457
|
+
*
|
|
79458
|
+
* // Hide multiple rows
|
|
79459
|
+
* hiddenRowsPlugin.hideRow(1, 2, 9);
|
|
79460
|
+
*
|
|
79461
|
+
* // Hide multiple rows as an array
|
|
79462
|
+
* hiddenRowsPlugin.hideRows([1, 2, 9]);
|
|
79463
|
+
*
|
|
79464
|
+
* // Unhide a single row
|
|
79465
|
+
* hiddenRowsPlugin.showRow(1);
|
|
79466
|
+
*
|
|
79467
|
+
* // Unhide multiple rows
|
|
79468
|
+
* hiddenRowsPlugin.showRow(1, 2, 9);
|
|
79469
|
+
*
|
|
79470
|
+
* // Unhide multiple rows as an array
|
|
79471
|
+
* hiddenRowsPlugin.showRows([1, 2, 9]);
|
|
79472
|
+
*
|
|
79473
|
+
* // To see your changes, re-render your Handsontable instance
|
|
79474
|
+
* hot.render();
|
|
79475
|
+
* }
|
|
79476
|
+
*
|
|
79477
|
+
* private getData(): any[] {
|
|
79478
|
+
* // Get some data
|
|
79479
|
+
* }
|
|
79480
|
+
* }
|
|
79481
|
+
* ```
|
|
79482
|
+
* :::
|
|
78662
79483
|
*/
|
|
78663
79484
|
var _hiddenRowsMap = /*#__PURE__*/new WeakMap();
|
|
78664
79485
|
var _HiddenRows_brand = /*#__PURE__*/new WeakSet();
|
|
@@ -82747,6 +83568,24 @@ const SHORTCUTS_GROUP = PLUGIN_KEY;
|
|
|
82747
83568
|
* />
|
|
82748
83569
|
* ```
|
|
82749
83570
|
* :::
|
|
83571
|
+
*
|
|
83572
|
+
* ::: only-for angular
|
|
83573
|
+
* ```ts
|
|
83574
|
+
* settings = {
|
|
83575
|
+
* data: getData(),
|
|
83576
|
+
* // Enable plugin
|
|
83577
|
+
* mergeCells: [
|
|
83578
|
+
* { row: 0, col: 3, rowspan: 3, colspan: 3 },
|
|
83579
|
+
* { row: 2, col: 6, rowspan: 2, colspan: 2 },
|
|
83580
|
+
* { row: 4, col: 8, rowspan: 3, colspan: 3 },
|
|
83581
|
+
* ],
|
|
83582
|
+
* };
|
|
83583
|
+
* ```
|
|
83584
|
+
*
|
|
83585
|
+
* ```html
|
|
83586
|
+
* <hot-table [settings]="settings"></hot-table>
|
|
83587
|
+
* ```
|
|
83588
|
+
* :::
|
|
82750
83589
|
*/
|
|
82751
83590
|
var _lastSelectedFocus = /*#__PURE__*/new WeakMap();
|
|
82752
83591
|
var _lastFocusDelta = /*#__PURE__*/new WeakMap();
|
|
@@ -87309,6 +88148,31 @@ const PLUGIN_PRIORITY = exports.PLUGIN_PRIORITY = 280;
|
|
|
87309
88148
|
* />
|
|
87310
88149
|
* ```
|
|
87311
88150
|
* :::
|
|
88151
|
+
*
|
|
88152
|
+
* ::: only-for angular
|
|
88153
|
+
* ```ts
|
|
88154
|
+
* settings = {
|
|
88155
|
+
* data: getData(),
|
|
88156
|
+
* nestedHeaders: [
|
|
88157
|
+
* ["A", { label: "B", colspan: 8, headerClassName: "htRight" }, "C"],
|
|
88158
|
+
* ["D", { label: "E", colspan: 4 }, { label: "F", colspan: 4 }, "G"],
|
|
88159
|
+
* [
|
|
88160
|
+
* "H",
|
|
88161
|
+
* { label: "I", colspan: 2 },
|
|
88162
|
+
* { label: "J", colspan: 2 },
|
|
88163
|
+
* { label: "K", colspan: 2 },
|
|
88164
|
+
* { label: "L", colspan: 2 },
|
|
88165
|
+
* "M",
|
|
88166
|
+
* ],
|
|
88167
|
+
* ["N", "O", "P", "Q", "R", "S", "T", "U", "V", "W"],
|
|
88168
|
+
* ],
|
|
88169
|
+
* };
|
|
88170
|
+
* ```
|
|
88171
|
+
*
|
|
88172
|
+
* ```html
|
|
88173
|
+
* <hot-table [settings]="settings"></hot-table>
|
|
88174
|
+
* ```
|
|
88175
|
+
* :::
|
|
87312
88176
|
*/
|
|
87313
88177
|
var _stateManager = /*#__PURE__*/new WeakMap();
|
|
87314
88178
|
var _hidingIndexMapObserver = /*#__PURE__*/new WeakMap();
|
|
@@ -93360,6 +94224,19 @@ const PLUGIN_PRIORITY = exports.PLUGIN_PRIORITY = 155;
|
|
|
93360
94224
|
* />
|
|
93361
94225
|
* ```
|
|
93362
94226
|
* :::
|
|
94227
|
+
*
|
|
94228
|
+
* ::: only-for angular
|
|
94229
|
+
* ```ts
|
|
94230
|
+
* settings = {
|
|
94231
|
+
* data: getData(),
|
|
94232
|
+
* stretchH: "all",
|
|
94233
|
+
* };
|
|
94234
|
+
* ```
|
|
94235
|
+
*
|
|
94236
|
+
* ```html
|
|
94237
|
+
* <hot-table [settings]="settings"></hot-table>
|
|
94238
|
+
* ```
|
|
94239
|
+
* :::
|
|
93363
94240
|
*/
|
|
93364
94241
|
/* eslint-enable jsdoc/require-description-complete-sentence */
|
|
93365
94242
|
var _stretchCalculator = /*#__PURE__*/new WeakMap();
|
|
@@ -94269,6 +95146,67 @@ const PLUGIN_PRIORITY = exports.PLUGIN_PRIORITY = 330;
|
|
|
94269
95146
|
* hot.render();
|
|
94270
95147
|
* ```
|
|
94271
95148
|
* :::
|
|
95149
|
+
*
|
|
95150
|
+
* ::: only-for angular
|
|
95151
|
+
* ```ts
|
|
95152
|
+
* import { AfterViewInit, Component, ViewChild } from "@angular/core";
|
|
95153
|
+
* import {
|
|
95154
|
+
* GridSettings,
|
|
95155
|
+
* HotTableModule,
|
|
95156
|
+
* HotTableComponent,
|
|
95157
|
+
* } from "@handsontable/angular-wrapper";
|
|
95158
|
+
*
|
|
95159
|
+
* `@Component`({
|
|
95160
|
+
* selector: "app-example",
|
|
95161
|
+
* standalone: true,
|
|
95162
|
+
* imports: [HotTableModule],
|
|
95163
|
+
* template: ` <div class="ht-theme-main">
|
|
95164
|
+
* <hot-table [settings]="gridSettings" />
|
|
95165
|
+
* </div>`,
|
|
95166
|
+
* })
|
|
95167
|
+
* export class ExampleComponent implements AfterViewInit {
|
|
95168
|
+
* `@ViewChild`(HotTableComponent, { static: false })
|
|
95169
|
+
* readonly hotTable!: HotTableComponent;
|
|
95170
|
+
*
|
|
95171
|
+
* readonly gridSettings = <GridSettings>{
|
|
95172
|
+
* data: this.getData(),
|
|
95173
|
+
* // Hide selected rows on table initialization
|
|
95174
|
+
* trimRows: [1, 2, 5],
|
|
95175
|
+
* };
|
|
95176
|
+
*
|
|
95177
|
+
* ngAfterViewInit(): void {
|
|
95178
|
+
* // Access the trimRows plugin instance
|
|
95179
|
+
* const hot = this.hotTable.hotInstance;
|
|
95180
|
+
* const trimRowsPlugin = hot.getPlugin("trimRows");
|
|
95181
|
+
*
|
|
95182
|
+
* // Hide a single row
|
|
95183
|
+
* trimRowsPlugin.trimRow(1);
|
|
95184
|
+
*
|
|
95185
|
+
* // Hide multiple rows
|
|
95186
|
+
* trimRowsPlugin.trimRow(1, 2, 9);
|
|
95187
|
+
*
|
|
95188
|
+
* // Or as an array
|
|
95189
|
+
* trimRowsPlugin.trimRows([1, 2, 9]);
|
|
95190
|
+
*
|
|
95191
|
+
* // Show a single row
|
|
95192
|
+
* trimRowsPlugin.untrimRow(1);
|
|
95193
|
+
*
|
|
95194
|
+
* // Show multiple rows
|
|
95195
|
+
* trimRowsPlugin.untrimRow(1, 2, 9);
|
|
95196
|
+
*
|
|
95197
|
+
* // Or as an array
|
|
95198
|
+
* trimRowsPlugin.untrimRows([1, 2, 9]);
|
|
95199
|
+
*
|
|
95200
|
+
* // Re-render table to see the changes
|
|
95201
|
+
* hot.render();
|
|
95202
|
+
* }
|
|
95203
|
+
*
|
|
95204
|
+
* private getData(): any[] {
|
|
95205
|
+
* // Get some data
|
|
95206
|
+
* }
|
|
95207
|
+
* }
|
|
95208
|
+
* ```
|
|
95209
|
+
* :::
|
|
94272
95210
|
*/
|
|
94273
95211
|
var _TrimRows_brand = /*#__PURE__*/new WeakSet();
|
|
94274
95212
|
class TrimRows extends _base.BasePlugin {
|