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
|
@@ -81,6 +81,64 @@ export const PLUGIN_PRIORITY = 240;
|
|
|
81
81
|
* });
|
|
82
82
|
* ```
|
|
83
83
|
* :::
|
|
84
|
+
*
|
|
85
|
+
* ::: only-for angular
|
|
86
|
+
* ```ts
|
|
87
|
+
* import { AfterViewInit, Component, ViewChild } from "@angular/core";
|
|
88
|
+
* import {
|
|
89
|
+
* GridSettings,
|
|
90
|
+
* HotTableModule,
|
|
91
|
+
* HotTableComponent,
|
|
92
|
+
* } from "@handsontable/angular-wrapper";
|
|
93
|
+
*
|
|
94
|
+
* `@Component`({
|
|
95
|
+
* selector: "app-example",
|
|
96
|
+
* standalone: true,
|
|
97
|
+
* imports: [HotTableModule],
|
|
98
|
+
* template: ` <div class="ht-theme-main">
|
|
99
|
+
* <hot-table [settings]="gridSettings" />
|
|
100
|
+
* </div>`,
|
|
101
|
+
* })
|
|
102
|
+
* export class ExampleComponent implements AfterViewInit {
|
|
103
|
+
* `@ViewChild`(HotTableComponent, { static: false })
|
|
104
|
+
* readonly hotTable!: HotTableComponent;
|
|
105
|
+
*
|
|
106
|
+
* readonly gridSettings = <GridSettings>{
|
|
107
|
+
* data: this.getData(),
|
|
108
|
+
* };
|
|
109
|
+
*
|
|
110
|
+
* ngAfterViewInit(): void {
|
|
111
|
+
* // Access to plugin instance:
|
|
112
|
+
* const hot = this.hotTable.hotInstance;
|
|
113
|
+
* // Access to exportFile plugin instance
|
|
114
|
+
* const exportPlugin = hot.getPlugin("exportFile");
|
|
115
|
+
*
|
|
116
|
+
* // Export as a string
|
|
117
|
+
* exportPlugin.exportAsString("csv");
|
|
118
|
+
*
|
|
119
|
+
* // Export as a blob object
|
|
120
|
+
* exportPlugin.exportAsBlob("csv");
|
|
121
|
+
*
|
|
122
|
+
* // Export to downloadable file (named: MyFile.csv)
|
|
123
|
+
* exportPlugin.downloadFile("csv", { filename: "MyFile" });
|
|
124
|
+
*
|
|
125
|
+
* // Export as a string (with specified data range):
|
|
126
|
+
* exportPlugin.exportAsString("csv", {
|
|
127
|
+
* exportHiddenRows: true, // default false
|
|
128
|
+
* exportHiddenColumns: true, // default false
|
|
129
|
+
* columnHeaders: true, // default false
|
|
130
|
+
* rowHeaders: true, // default false
|
|
131
|
+
* columnDelimiter: ";", // default ','
|
|
132
|
+
* range: [1, 1, 6, 6], // [startRow, endRow, startColumn, endColumn]
|
|
133
|
+
* });
|
|
134
|
+
* }
|
|
135
|
+
*
|
|
136
|
+
* private getData(): any[] {
|
|
137
|
+
* // get some data
|
|
138
|
+
* }
|
|
139
|
+
* }
|
|
140
|
+
* ```
|
|
141
|
+
* :::
|
|
84
142
|
*/
|
|
85
143
|
export class ExportFile extends BasePlugin {
|
|
86
144
|
static get PLUGIN_KEY() {
|
|
@@ -78,6 +78,22 @@ const SHORTCUTS_GROUP = PLUGIN_KEY;
|
|
|
78
78
|
* />
|
|
79
79
|
* ```
|
|
80
80
|
* :::
|
|
81
|
+
*
|
|
82
|
+
* ::: only-for angular
|
|
83
|
+
* ```ts
|
|
84
|
+
* settings = {
|
|
85
|
+
* data: getData(),
|
|
86
|
+
* colHeaders: true,
|
|
87
|
+
* rowHeaders: true,
|
|
88
|
+
* dropdownMenu: true,
|
|
89
|
+
* filters: true,
|
|
90
|
+
* };
|
|
91
|
+
* ```
|
|
92
|
+
*
|
|
93
|
+
* ```html
|
|
94
|
+
* <hot-table [settings]="settings"></hot-table>
|
|
95
|
+
* ```
|
|
96
|
+
* :::
|
|
81
97
|
*/
|
|
82
98
|
var _menuFocusNavigator = /*#__PURE__*/new WeakMap();
|
|
83
99
|
var _dropdownMenuTraces = /*#__PURE__*/new WeakMap();
|
|
@@ -460,6 +476,64 @@ class Filters extends _base.BasePlugin {
|
|
|
460
476
|
* ```
|
|
461
477
|
* :::
|
|
462
478
|
*
|
|
479
|
+
* ::: only-for angular
|
|
480
|
+
* ```ts
|
|
481
|
+
* import { AfterViewInit, Component, ViewChild } from "@angular/core";
|
|
482
|
+
* import {
|
|
483
|
+
* GridSettings,
|
|
484
|
+
* HotTableModule,
|
|
485
|
+
* HotTableComponent,
|
|
486
|
+
* } from "@handsontable/angular-wrapper";
|
|
487
|
+
*
|
|
488
|
+
* `@Component`({
|
|
489
|
+
* selector: "app-example",
|
|
490
|
+
* standalone: true,
|
|
491
|
+
* imports: [HotTableModule],
|
|
492
|
+
* template: ` <div class="ht-theme-main">
|
|
493
|
+
* <hot-table [settings]="gridSettings" />
|
|
494
|
+
* </div>`,
|
|
495
|
+
* })
|
|
496
|
+
* export class ExampleComponent implements AfterViewInit {
|
|
497
|
+
* `@ViewChild`(HotTableComponent, { static: false })
|
|
498
|
+
* readonly hotTable!: HotTableComponent;
|
|
499
|
+
*
|
|
500
|
+
* readonly gridSettings = <GridSettings>{
|
|
501
|
+
* data: this.getData(),
|
|
502
|
+
* filters: true,
|
|
503
|
+
* };
|
|
504
|
+
*
|
|
505
|
+
* ngAfterViewInit(): void {
|
|
506
|
+
* // Access to filters plugin instance
|
|
507
|
+
* const hot = this.hotTable.hotInstance;
|
|
508
|
+
* const filtersPlugin = hot.getPlugin("filters");
|
|
509
|
+
*
|
|
510
|
+
* // Add filter "Greater than" 95 to column at index 1
|
|
511
|
+
* filtersPlugin.addCondition(1, "gt", [95]);
|
|
512
|
+
* filtersPlugin.filter();
|
|
513
|
+
*
|
|
514
|
+
* // Add filter "By value" to column at index 1
|
|
515
|
+
* // In this case, all values that don't match will be filtered.
|
|
516
|
+
* filtersPlugin.addCondition(1, "by_value", [["ing", "ed", "as", "on"]]);
|
|
517
|
+
* filtersPlugin.filter();
|
|
518
|
+
*
|
|
519
|
+
* // Add filter "Begins with" with value "de" AND "Not contains" with value "ing"
|
|
520
|
+
* filtersPlugin.addCondition(1, "begins_with", ["de"], "conjunction");
|
|
521
|
+
* filtersPlugin.addCondition(1, "not_contains", ["ing"], "conjunction");
|
|
522
|
+
* filtersPlugin.filter();
|
|
523
|
+
*
|
|
524
|
+
* // Add filter "Begins with" with value "de" OR "Not contains" with value "ing"
|
|
525
|
+
* filtersPlugin.addCondition(1, "begins_with", ["de"], "disjunction");
|
|
526
|
+
* filtersPlugin.addCondition(1, "not_contains", ["ing"], "disjunction");
|
|
527
|
+
* filtersPlugin.filter();
|
|
528
|
+
* }
|
|
529
|
+
*
|
|
530
|
+
* private getData(): any[] {
|
|
531
|
+
* // Get some data
|
|
532
|
+
* }
|
|
533
|
+
* }
|
|
534
|
+
* ```
|
|
535
|
+
* :::
|
|
536
|
+
*
|
|
463
537
|
* @param {number} column Visual column index.
|
|
464
538
|
* @param {string} name Condition short name.
|
|
465
539
|
* @param {Array} args Condition arguments.
|
|
@@ -72,6 +72,22 @@ const SHORTCUTS_GROUP = PLUGIN_KEY;
|
|
|
72
72
|
* />
|
|
73
73
|
* ```
|
|
74
74
|
* :::
|
|
75
|
+
*
|
|
76
|
+
* ::: only-for angular
|
|
77
|
+
* ```ts
|
|
78
|
+
* settings = {
|
|
79
|
+
* data: getData(),
|
|
80
|
+
* colHeaders: true,
|
|
81
|
+
* rowHeaders: true,
|
|
82
|
+
* dropdownMenu: true,
|
|
83
|
+
* filters: true,
|
|
84
|
+
* };
|
|
85
|
+
* ```
|
|
86
|
+
*
|
|
87
|
+
* ```html
|
|
88
|
+
* <hot-table [settings]="settings"></hot-table>
|
|
89
|
+
* ```
|
|
90
|
+
* :::
|
|
75
91
|
*/
|
|
76
92
|
var _menuFocusNavigator = /*#__PURE__*/new WeakMap();
|
|
77
93
|
var _dropdownMenuTraces = /*#__PURE__*/new WeakMap();
|
|
@@ -454,6 +470,64 @@ export class Filters extends BasePlugin {
|
|
|
454
470
|
* ```
|
|
455
471
|
* :::
|
|
456
472
|
*
|
|
473
|
+
* ::: only-for angular
|
|
474
|
+
* ```ts
|
|
475
|
+
* import { AfterViewInit, Component, ViewChild } from "@angular/core";
|
|
476
|
+
* import {
|
|
477
|
+
* GridSettings,
|
|
478
|
+
* HotTableModule,
|
|
479
|
+
* HotTableComponent,
|
|
480
|
+
* } from "@handsontable/angular-wrapper";
|
|
481
|
+
*
|
|
482
|
+
* `@Component`({
|
|
483
|
+
* selector: "app-example",
|
|
484
|
+
* standalone: true,
|
|
485
|
+
* imports: [HotTableModule],
|
|
486
|
+
* template: ` <div class="ht-theme-main">
|
|
487
|
+
* <hot-table [settings]="gridSettings" />
|
|
488
|
+
* </div>`,
|
|
489
|
+
* })
|
|
490
|
+
* export class ExampleComponent implements AfterViewInit {
|
|
491
|
+
* `@ViewChild`(HotTableComponent, { static: false })
|
|
492
|
+
* readonly hotTable!: HotTableComponent;
|
|
493
|
+
*
|
|
494
|
+
* readonly gridSettings = <GridSettings>{
|
|
495
|
+
* data: this.getData(),
|
|
496
|
+
* filters: true,
|
|
497
|
+
* };
|
|
498
|
+
*
|
|
499
|
+
* ngAfterViewInit(): void {
|
|
500
|
+
* // Access to filters plugin instance
|
|
501
|
+
* const hot = this.hotTable.hotInstance;
|
|
502
|
+
* const filtersPlugin = hot.getPlugin("filters");
|
|
503
|
+
*
|
|
504
|
+
* // Add filter "Greater than" 95 to column at index 1
|
|
505
|
+
* filtersPlugin.addCondition(1, "gt", [95]);
|
|
506
|
+
* filtersPlugin.filter();
|
|
507
|
+
*
|
|
508
|
+
* // Add filter "By value" to column at index 1
|
|
509
|
+
* // In this case, all values that don't match will be filtered.
|
|
510
|
+
* filtersPlugin.addCondition(1, "by_value", [["ing", "ed", "as", "on"]]);
|
|
511
|
+
* filtersPlugin.filter();
|
|
512
|
+
*
|
|
513
|
+
* // Add filter "Begins with" with value "de" AND "Not contains" with value "ing"
|
|
514
|
+
* filtersPlugin.addCondition(1, "begins_with", ["de"], "conjunction");
|
|
515
|
+
* filtersPlugin.addCondition(1, "not_contains", ["ing"], "conjunction");
|
|
516
|
+
* filtersPlugin.filter();
|
|
517
|
+
*
|
|
518
|
+
* // Add filter "Begins with" with value "de" OR "Not contains" with value "ing"
|
|
519
|
+
* filtersPlugin.addCondition(1, "begins_with", ["de"], "disjunction");
|
|
520
|
+
* filtersPlugin.addCondition(1, "not_contains", ["ing"], "disjunction");
|
|
521
|
+
* filtersPlugin.filter();
|
|
522
|
+
* }
|
|
523
|
+
*
|
|
524
|
+
* private getData(): any[] {
|
|
525
|
+
* // Get some data
|
|
526
|
+
* }
|
|
527
|
+
* }
|
|
528
|
+
* ```
|
|
529
|
+
* :::
|
|
530
|
+
*
|
|
457
531
|
* @param {number} column Visual column index.
|
|
458
532
|
* @param {string} name Condition short name.
|
|
459
533
|
* @param {Array} args Condition arguments.
|
|
@@ -141,6 +141,70 @@ const PLUGIN_PRIORITY = exports.PLUGIN_PRIORITY = 310;
|
|
|
141
141
|
* hot.render();
|
|
142
142
|
* ```
|
|
143
143
|
* :::
|
|
144
|
+
*
|
|
145
|
+
* ::: only-for angular
|
|
146
|
+
* ```ts
|
|
147
|
+
* import { AfterViewInit, Component, ViewChild } from "@angular/core";
|
|
148
|
+
* import {
|
|
149
|
+
* GridSettings,
|
|
150
|
+
* HotTableModule,
|
|
151
|
+
* HotTableComponent,
|
|
152
|
+
* } from "@handsontable/angular-wrapper";
|
|
153
|
+
*
|
|
154
|
+
* `@Component`({
|
|
155
|
+
* selector: "app-example",
|
|
156
|
+
* standalone: true,
|
|
157
|
+
* imports: [HotTableModule],
|
|
158
|
+
* template: ` <div class="ht-theme-main">
|
|
159
|
+
* <hot-table [settings]="gridSettings" />
|
|
160
|
+
* </div>`,
|
|
161
|
+
* })
|
|
162
|
+
* export class ExampleComponent implements AfterViewInit {
|
|
163
|
+
* `@ViewChild`(HotTableComponent, { static: false })
|
|
164
|
+
* readonly hotTable!: HotTableComponent;
|
|
165
|
+
*
|
|
166
|
+
* readonly gridSettings = <GridSettings>{
|
|
167
|
+
* data: this.getData(),
|
|
168
|
+
* hiddenColumns: {
|
|
169
|
+
* copyPasteEnabled: true,
|
|
170
|
+
* indicators: true,
|
|
171
|
+
* columns: [1, 2, 5],
|
|
172
|
+
* },
|
|
173
|
+
* };
|
|
174
|
+
*
|
|
175
|
+
* ngAfterViewInit(): void {
|
|
176
|
+
* // Access the `HiddenColumns` plugin's instance
|
|
177
|
+
* const hot = this.hotTable.hotInstance;
|
|
178
|
+
* const hiddenColumnsPlugin = hot.getPlugin("hiddenColumns");
|
|
179
|
+
*
|
|
180
|
+
* // Hide a single column
|
|
181
|
+
* hiddenColumnsPlugin.hideColumn(1);
|
|
182
|
+
*
|
|
183
|
+
* // Hide multiple columns
|
|
184
|
+
* hiddenColumnsPlugin.hideColumn(1, 2, 9);
|
|
185
|
+
*
|
|
186
|
+
* // Hide multiple columns as an array
|
|
187
|
+
* hiddenColumnsPlugin.hideColumns([1, 2, 9]);
|
|
188
|
+
*
|
|
189
|
+
* // Unhide a single column
|
|
190
|
+
* hiddenColumnsPlugin.showColumn(1);
|
|
191
|
+
*
|
|
192
|
+
* // Unhide multiple columns
|
|
193
|
+
* hiddenColumnsPlugin.showColumn(1, 2, 9);
|
|
194
|
+
*
|
|
195
|
+
* // Unhide multiple columns as an array
|
|
196
|
+
* hiddenColumnsPlugin.showColumns([1, 2, 9]);
|
|
197
|
+
*
|
|
198
|
+
* // To see your changes, re-render your Handsontable instance
|
|
199
|
+
* hot.render();
|
|
200
|
+
* }
|
|
201
|
+
*
|
|
202
|
+
* private getData(): any[] {
|
|
203
|
+
* // Get some data
|
|
204
|
+
* }
|
|
205
|
+
* }
|
|
206
|
+
* ```
|
|
207
|
+
* :::
|
|
144
208
|
*/
|
|
145
209
|
var _hiddenColumnsMap = /*#__PURE__*/new WeakMap();
|
|
146
210
|
var _HiddenColumns_brand = /*#__PURE__*/new WeakSet();
|
|
@@ -137,6 +137,70 @@ export const PLUGIN_PRIORITY = 310;
|
|
|
137
137
|
* hot.render();
|
|
138
138
|
* ```
|
|
139
139
|
* :::
|
|
140
|
+
*
|
|
141
|
+
* ::: only-for angular
|
|
142
|
+
* ```ts
|
|
143
|
+
* import { AfterViewInit, Component, ViewChild } from "@angular/core";
|
|
144
|
+
* import {
|
|
145
|
+
* GridSettings,
|
|
146
|
+
* HotTableModule,
|
|
147
|
+
* HotTableComponent,
|
|
148
|
+
* } from "@handsontable/angular-wrapper";
|
|
149
|
+
*
|
|
150
|
+
* `@Component`({
|
|
151
|
+
* selector: "app-example",
|
|
152
|
+
* standalone: true,
|
|
153
|
+
* imports: [HotTableModule],
|
|
154
|
+
* template: ` <div class="ht-theme-main">
|
|
155
|
+
* <hot-table [settings]="gridSettings" />
|
|
156
|
+
* </div>`,
|
|
157
|
+
* })
|
|
158
|
+
* export class ExampleComponent implements AfterViewInit {
|
|
159
|
+
* `@ViewChild`(HotTableComponent, { static: false })
|
|
160
|
+
* readonly hotTable!: HotTableComponent;
|
|
161
|
+
*
|
|
162
|
+
* readonly gridSettings = <GridSettings>{
|
|
163
|
+
* data: this.getData(),
|
|
164
|
+
* hiddenColumns: {
|
|
165
|
+
* copyPasteEnabled: true,
|
|
166
|
+
* indicators: true,
|
|
167
|
+
* columns: [1, 2, 5],
|
|
168
|
+
* },
|
|
169
|
+
* };
|
|
170
|
+
*
|
|
171
|
+
* ngAfterViewInit(): void {
|
|
172
|
+
* // Access the `HiddenColumns` plugin's instance
|
|
173
|
+
* const hot = this.hotTable.hotInstance;
|
|
174
|
+
* const hiddenColumnsPlugin = hot.getPlugin("hiddenColumns");
|
|
175
|
+
*
|
|
176
|
+
* // Hide a single column
|
|
177
|
+
* hiddenColumnsPlugin.hideColumn(1);
|
|
178
|
+
*
|
|
179
|
+
* // Hide multiple columns
|
|
180
|
+
* hiddenColumnsPlugin.hideColumn(1, 2, 9);
|
|
181
|
+
*
|
|
182
|
+
* // Hide multiple columns as an array
|
|
183
|
+
* hiddenColumnsPlugin.hideColumns([1, 2, 9]);
|
|
184
|
+
*
|
|
185
|
+
* // Unhide a single column
|
|
186
|
+
* hiddenColumnsPlugin.showColumn(1);
|
|
187
|
+
*
|
|
188
|
+
* // Unhide multiple columns
|
|
189
|
+
* hiddenColumnsPlugin.showColumn(1, 2, 9);
|
|
190
|
+
*
|
|
191
|
+
* // Unhide multiple columns as an array
|
|
192
|
+
* hiddenColumnsPlugin.showColumns([1, 2, 9]);
|
|
193
|
+
*
|
|
194
|
+
* // To see your changes, re-render your Handsontable instance
|
|
195
|
+
* hot.render();
|
|
196
|
+
* }
|
|
197
|
+
*
|
|
198
|
+
* private getData(): any[] {
|
|
199
|
+
* // Get some data
|
|
200
|
+
* }
|
|
201
|
+
* }
|
|
202
|
+
* ```
|
|
203
|
+
* :::
|
|
140
204
|
*/
|
|
141
205
|
var _hiddenColumnsMap = /*#__PURE__*/new WeakMap();
|
|
142
206
|
var _HiddenColumns_brand = /*#__PURE__*/new WeakSet();
|
|
@@ -141,6 +141,70 @@ const PLUGIN_PRIORITY = exports.PLUGIN_PRIORITY = 320;
|
|
|
141
141
|
* hot.render();
|
|
142
142
|
* ```
|
|
143
143
|
* :::
|
|
144
|
+
*
|
|
145
|
+
* ::: only-for angular
|
|
146
|
+
* ```ts
|
|
147
|
+
* import { AfterViewInit, Component, ViewChild } from "@angular/core";
|
|
148
|
+
* import {
|
|
149
|
+
* GridSettings,
|
|
150
|
+
* HotTableModule,
|
|
151
|
+
* HotTableComponent,
|
|
152
|
+
* } from "@handsontable/angular-wrapper";
|
|
153
|
+
*
|
|
154
|
+
* `@Component`({
|
|
155
|
+
* selector: "app-example",
|
|
156
|
+
* standalone: true,
|
|
157
|
+
* imports: [HotTableModule],
|
|
158
|
+
* template: ` <div class="ht-theme-main">
|
|
159
|
+
* <hot-table [settings]="gridSettings" />
|
|
160
|
+
* </div>`,
|
|
161
|
+
* })
|
|
162
|
+
* export class ExampleComponent implements AfterViewInit {
|
|
163
|
+
* `@ViewChild`(HotTableComponent, { static: false })
|
|
164
|
+
* readonly hotTable!: HotTableComponent;
|
|
165
|
+
*
|
|
166
|
+
* readonly gridSettings = <GridSettings>{
|
|
167
|
+
* data: this.getData(),
|
|
168
|
+
* hiddenRows: {
|
|
169
|
+
* copyPasteEnabled: true,
|
|
170
|
+
* indicators: true,
|
|
171
|
+
* rows: [1, 2, 5],
|
|
172
|
+
* },
|
|
173
|
+
* };
|
|
174
|
+
*
|
|
175
|
+
* ngAfterViewInit(): void {
|
|
176
|
+
* // Access the `HiddenRows` plugin's instance
|
|
177
|
+
* const hot = this.hotTable.hotInstance;
|
|
178
|
+
* const hiddenRowsPlugin = hot.getPlugin("hiddenRows");
|
|
179
|
+
*
|
|
180
|
+
* // Hide a single row
|
|
181
|
+
* hiddenRowsPlugin.hideRow(1);
|
|
182
|
+
*
|
|
183
|
+
* // Hide multiple rows
|
|
184
|
+
* hiddenRowsPlugin.hideRow(1, 2, 9);
|
|
185
|
+
*
|
|
186
|
+
* // Hide multiple rows as an array
|
|
187
|
+
* hiddenRowsPlugin.hideRows([1, 2, 9]);
|
|
188
|
+
*
|
|
189
|
+
* // Unhide a single row
|
|
190
|
+
* hiddenRowsPlugin.showRow(1);
|
|
191
|
+
*
|
|
192
|
+
* // Unhide multiple rows
|
|
193
|
+
* hiddenRowsPlugin.showRow(1, 2, 9);
|
|
194
|
+
*
|
|
195
|
+
* // Unhide multiple rows as an array
|
|
196
|
+
* hiddenRowsPlugin.showRows([1, 2, 9]);
|
|
197
|
+
*
|
|
198
|
+
* // To see your changes, re-render your Handsontable instance
|
|
199
|
+
* hot.render();
|
|
200
|
+
* }
|
|
201
|
+
*
|
|
202
|
+
* private getData(): any[] {
|
|
203
|
+
* // Get some data
|
|
204
|
+
* }
|
|
205
|
+
* }
|
|
206
|
+
* ```
|
|
207
|
+
* :::
|
|
144
208
|
*/
|
|
145
209
|
var _hiddenRowsMap = /*#__PURE__*/new WeakMap();
|
|
146
210
|
var _HiddenRows_brand = /*#__PURE__*/new WeakSet();
|
|
@@ -137,6 +137,70 @@ export const PLUGIN_PRIORITY = 320;
|
|
|
137
137
|
* hot.render();
|
|
138
138
|
* ```
|
|
139
139
|
* :::
|
|
140
|
+
*
|
|
141
|
+
* ::: only-for angular
|
|
142
|
+
* ```ts
|
|
143
|
+
* import { AfterViewInit, Component, ViewChild } from "@angular/core";
|
|
144
|
+
* import {
|
|
145
|
+
* GridSettings,
|
|
146
|
+
* HotTableModule,
|
|
147
|
+
* HotTableComponent,
|
|
148
|
+
* } from "@handsontable/angular-wrapper";
|
|
149
|
+
*
|
|
150
|
+
* `@Component`({
|
|
151
|
+
* selector: "app-example",
|
|
152
|
+
* standalone: true,
|
|
153
|
+
* imports: [HotTableModule],
|
|
154
|
+
* template: ` <div class="ht-theme-main">
|
|
155
|
+
* <hot-table [settings]="gridSettings" />
|
|
156
|
+
* </div>`,
|
|
157
|
+
* })
|
|
158
|
+
* export class ExampleComponent implements AfterViewInit {
|
|
159
|
+
* `@ViewChild`(HotTableComponent, { static: false })
|
|
160
|
+
* readonly hotTable!: HotTableComponent;
|
|
161
|
+
*
|
|
162
|
+
* readonly gridSettings = <GridSettings>{
|
|
163
|
+
* data: this.getData(),
|
|
164
|
+
* hiddenRows: {
|
|
165
|
+
* copyPasteEnabled: true,
|
|
166
|
+
* indicators: true,
|
|
167
|
+
* rows: [1, 2, 5],
|
|
168
|
+
* },
|
|
169
|
+
* };
|
|
170
|
+
*
|
|
171
|
+
* ngAfterViewInit(): void {
|
|
172
|
+
* // Access the `HiddenRows` plugin's instance
|
|
173
|
+
* const hot = this.hotTable.hotInstance;
|
|
174
|
+
* const hiddenRowsPlugin = hot.getPlugin("hiddenRows");
|
|
175
|
+
*
|
|
176
|
+
* // Hide a single row
|
|
177
|
+
* hiddenRowsPlugin.hideRow(1);
|
|
178
|
+
*
|
|
179
|
+
* // Hide multiple rows
|
|
180
|
+
* hiddenRowsPlugin.hideRow(1, 2, 9);
|
|
181
|
+
*
|
|
182
|
+
* // Hide multiple rows as an array
|
|
183
|
+
* hiddenRowsPlugin.hideRows([1, 2, 9]);
|
|
184
|
+
*
|
|
185
|
+
* // Unhide a single row
|
|
186
|
+
* hiddenRowsPlugin.showRow(1);
|
|
187
|
+
*
|
|
188
|
+
* // Unhide multiple rows
|
|
189
|
+
* hiddenRowsPlugin.showRow(1, 2, 9);
|
|
190
|
+
*
|
|
191
|
+
* // Unhide multiple rows as an array
|
|
192
|
+
* hiddenRowsPlugin.showRows([1, 2, 9]);
|
|
193
|
+
*
|
|
194
|
+
* // To see your changes, re-render your Handsontable instance
|
|
195
|
+
* hot.render();
|
|
196
|
+
* }
|
|
197
|
+
*
|
|
198
|
+
* private getData(): any[] {
|
|
199
|
+
* // Get some data
|
|
200
|
+
* }
|
|
201
|
+
* }
|
|
202
|
+
* ```
|
|
203
|
+
* :::
|
|
140
204
|
*/
|
|
141
205
|
var _hiddenRowsMap = /*#__PURE__*/new WeakMap();
|
|
142
206
|
var _HiddenRows_brand = /*#__PURE__*/new WeakSet();
|
|
@@ -85,6 +85,24 @@ const SHORTCUTS_GROUP = PLUGIN_KEY;
|
|
|
85
85
|
* />
|
|
86
86
|
* ```
|
|
87
87
|
* :::
|
|
88
|
+
*
|
|
89
|
+
* ::: only-for angular
|
|
90
|
+
* ```ts
|
|
91
|
+
* settings = {
|
|
92
|
+
* data: getData(),
|
|
93
|
+
* // Enable plugin
|
|
94
|
+
* mergeCells: [
|
|
95
|
+
* { row: 0, col: 3, rowspan: 3, colspan: 3 },
|
|
96
|
+
* { row: 2, col: 6, rowspan: 2, colspan: 2 },
|
|
97
|
+
* { row: 4, col: 8, rowspan: 3, colspan: 3 },
|
|
98
|
+
* ],
|
|
99
|
+
* };
|
|
100
|
+
* ```
|
|
101
|
+
*
|
|
102
|
+
* ```html
|
|
103
|
+
* <hot-table [settings]="settings"></hot-table>
|
|
104
|
+
* ```
|
|
105
|
+
* :::
|
|
88
106
|
*/
|
|
89
107
|
var _lastSelectedFocus = /*#__PURE__*/new WeakMap();
|
|
90
108
|
var _lastFocusDelta = /*#__PURE__*/new WeakMap();
|
|
@@ -81,6 +81,24 @@ const SHORTCUTS_GROUP = PLUGIN_KEY;
|
|
|
81
81
|
* />
|
|
82
82
|
* ```
|
|
83
83
|
* :::
|
|
84
|
+
*
|
|
85
|
+
* ::: only-for angular
|
|
86
|
+
* ```ts
|
|
87
|
+
* settings = {
|
|
88
|
+
* data: getData(),
|
|
89
|
+
* // Enable plugin
|
|
90
|
+
* mergeCells: [
|
|
91
|
+
* { row: 0, col: 3, rowspan: 3, colspan: 3 },
|
|
92
|
+
* { row: 2, col: 6, rowspan: 2, colspan: 2 },
|
|
93
|
+
* { row: 4, col: 8, rowspan: 3, colspan: 3 },
|
|
94
|
+
* ],
|
|
95
|
+
* };
|
|
96
|
+
* ```
|
|
97
|
+
*
|
|
98
|
+
* ```html
|
|
99
|
+
* <hot-table [settings]="settings"></hot-table>
|
|
100
|
+
* ```
|
|
101
|
+
* :::
|
|
84
102
|
*/
|
|
85
103
|
var _lastSelectedFocus = /*#__PURE__*/new WeakMap();
|
|
86
104
|
var _lastFocusDelta = /*#__PURE__*/new WeakMap();
|
|
@@ -72,6 +72,31 @@ const PLUGIN_PRIORITY = exports.PLUGIN_PRIORITY = 280;
|
|
|
72
72
|
* />
|
|
73
73
|
* ```
|
|
74
74
|
* :::
|
|
75
|
+
*
|
|
76
|
+
* ::: only-for angular
|
|
77
|
+
* ```ts
|
|
78
|
+
* settings = {
|
|
79
|
+
* data: getData(),
|
|
80
|
+
* nestedHeaders: [
|
|
81
|
+
* ["A", { label: "B", colspan: 8, headerClassName: "htRight" }, "C"],
|
|
82
|
+
* ["D", { label: "E", colspan: 4 }, { label: "F", colspan: 4 }, "G"],
|
|
83
|
+
* [
|
|
84
|
+
* "H",
|
|
85
|
+
* { label: "I", colspan: 2 },
|
|
86
|
+
* { label: "J", colspan: 2 },
|
|
87
|
+
* { label: "K", colspan: 2 },
|
|
88
|
+
* { label: "L", colspan: 2 },
|
|
89
|
+
* "M",
|
|
90
|
+
* ],
|
|
91
|
+
* ["N", "O", "P", "Q", "R", "S", "T", "U", "V", "W"],
|
|
92
|
+
* ],
|
|
93
|
+
* };
|
|
94
|
+
* ```
|
|
95
|
+
*
|
|
96
|
+
* ```html
|
|
97
|
+
* <hot-table [settings]="settings"></hot-table>
|
|
98
|
+
* ```
|
|
99
|
+
* :::
|
|
75
100
|
*/
|
|
76
101
|
var _stateManager = /*#__PURE__*/new WeakMap();
|
|
77
102
|
var _hidingIndexMapObserver = /*#__PURE__*/new WeakMap();
|
|
@@ -68,6 +68,31 @@ export const PLUGIN_PRIORITY = 280;
|
|
|
68
68
|
* />
|
|
69
69
|
* ```
|
|
70
70
|
* :::
|
|
71
|
+
*
|
|
72
|
+
* ::: only-for angular
|
|
73
|
+
* ```ts
|
|
74
|
+
* settings = {
|
|
75
|
+
* data: getData(),
|
|
76
|
+
* nestedHeaders: [
|
|
77
|
+
* ["A", { label: "B", colspan: 8, headerClassName: "htRight" }, "C"],
|
|
78
|
+
* ["D", { label: "E", colspan: 4 }, { label: "F", colspan: 4 }, "G"],
|
|
79
|
+
* [
|
|
80
|
+
* "H",
|
|
81
|
+
* { label: "I", colspan: 2 },
|
|
82
|
+
* { label: "J", colspan: 2 },
|
|
83
|
+
* { label: "K", colspan: 2 },
|
|
84
|
+
* { label: "L", colspan: 2 },
|
|
85
|
+
* "M",
|
|
86
|
+
* ],
|
|
87
|
+
* ["N", "O", "P", "Q", "R", "S", "T", "U", "V", "W"],
|
|
88
|
+
* ],
|
|
89
|
+
* };
|
|
90
|
+
* ```
|
|
91
|
+
*
|
|
92
|
+
* ```html
|
|
93
|
+
* <hot-table [settings]="settings"></hot-table>
|
|
94
|
+
* ```
|
|
95
|
+
* :::
|
|
71
96
|
*/
|
|
72
97
|
var _stateManager = /*#__PURE__*/new WeakMap();
|
|
73
98
|
var _hidingIndexMapObserver = /*#__PURE__*/new WeakMap();
|
|
@@ -62,6 +62,19 @@ const PLUGIN_PRIORITY = exports.PLUGIN_PRIORITY = 155;
|
|
|
62
62
|
* />
|
|
63
63
|
* ```
|
|
64
64
|
* :::
|
|
65
|
+
*
|
|
66
|
+
* ::: only-for angular
|
|
67
|
+
* ```ts
|
|
68
|
+
* settings = {
|
|
69
|
+
* data: getData(),
|
|
70
|
+
* stretchH: "all",
|
|
71
|
+
* };
|
|
72
|
+
* ```
|
|
73
|
+
*
|
|
74
|
+
* ```html
|
|
75
|
+
* <hot-table [settings]="settings"></hot-table>
|
|
76
|
+
* ```
|
|
77
|
+
* :::
|
|
65
78
|
*/
|
|
66
79
|
/* eslint-enable jsdoc/require-description-complete-sentence */
|
|
67
80
|
var _stretchCalculator = /*#__PURE__*/new WeakMap();
|
|
@@ -59,6 +59,19 @@ export const PLUGIN_PRIORITY = 155;
|
|
|
59
59
|
* />
|
|
60
60
|
* ```
|
|
61
61
|
* :::
|
|
62
|
+
*
|
|
63
|
+
* ::: only-for angular
|
|
64
|
+
* ```ts
|
|
65
|
+
* settings = {
|
|
66
|
+
* data: getData(),
|
|
67
|
+
* stretchH: "all",
|
|
68
|
+
* };
|
|
69
|
+
* ```
|
|
70
|
+
*
|
|
71
|
+
* ```html
|
|
72
|
+
* <hot-table [settings]="settings"></hot-table>
|
|
73
|
+
* ```
|
|
74
|
+
* :::
|
|
62
75
|
*/
|
|
63
76
|
/* eslint-enable jsdoc/require-description-complete-sentence */
|
|
64
77
|
var _stretchCalculator = /*#__PURE__*/new WeakMap();
|