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.

Files changed (55) hide show
  1. package/base.js +2 -2
  2. package/base.mjs +2 -2
  3. package/core/hooks/constants.js +258 -0
  4. package/core/hooks/constants.mjs +258 -0
  5. package/core.js +39 -0
  6. package/core.mjs +39 -0
  7. package/dataMap/metaManager/metaSchema.js +27 -0
  8. package/dataMap/metaManager/metaSchema.mjs +27 -0
  9. package/dist/handsontable.css +2 -2
  10. package/dist/handsontable.full.css +2 -2
  11. package/dist/handsontable.full.js +943 -5
  12. package/dist/handsontable.full.min.css +2 -2
  13. package/dist/handsontable.full.min.js +4 -4
  14. package/dist/handsontable.js +943 -5
  15. package/dist/handsontable.min.css +2 -2
  16. package/dist/handsontable.min.js +4 -4
  17. package/helpers/mixed.js +1 -1
  18. package/helpers/mixed.mjs +1 -1
  19. package/package.json +1 -1
  20. package/plugins/autoColumnSize/autoColumnSize.js +47 -0
  21. package/plugins/autoColumnSize/autoColumnSize.mjs +47 -0
  22. package/plugins/autoRowSize/autoRowSize.js +45 -0
  23. package/plugins/autoRowSize/autoRowSize.mjs +45 -0
  24. package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.js +13 -0
  25. package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.mjs +13 -0
  26. package/plugins/collapsibleColumns/collapsibleColumns.js +31 -0
  27. package/plugins/collapsibleColumns/collapsibleColumns.mjs +31 -0
  28. package/plugins/columnSummary/columnSummary.js +33 -0
  29. package/plugins/columnSummary/columnSummary.mjs +33 -0
  30. package/plugins/comments/comments.js +53 -0
  31. package/plugins/comments/comments.mjs +53 -0
  32. package/plugins/dropdownMenu/dropdownMenu.js +15 -0
  33. package/plugins/dropdownMenu/dropdownMenu.mjs +15 -0
  34. package/plugins/exportFile/exportFile.js +58 -0
  35. package/plugins/exportFile/exportFile.mjs +58 -0
  36. package/plugins/filters/filters.js +74 -0
  37. package/plugins/filters/filters.mjs +74 -0
  38. package/plugins/hiddenColumns/hiddenColumns.js +64 -0
  39. package/plugins/hiddenColumns/hiddenColumns.mjs +64 -0
  40. package/plugins/hiddenRows/hiddenRows.js +64 -0
  41. package/plugins/hiddenRows/hiddenRows.mjs +64 -0
  42. package/plugins/mergeCells/mergeCells.js +18 -0
  43. package/plugins/mergeCells/mergeCells.mjs +18 -0
  44. package/plugins/nestedHeaders/nestedHeaders.js +25 -0
  45. package/plugins/nestedHeaders/nestedHeaders.mjs +25 -0
  46. package/plugins/stretchColumns/stretchColumns.js +13 -0
  47. package/plugins/stretchColumns/stretchColumns.mjs +13 -0
  48. package/plugins/trimRows/trimRows.js +61 -0
  49. package/plugins/trimRows/trimRows.mjs +61 -0
  50. package/styles/handsontable.css +2 -2
  51. package/styles/handsontable.min.css +2 -2
  52. package/styles/ht-theme-horizon.css +2 -2
  53. package/styles/ht-theme-horizon.min.css +2 -2
  54. package/styles/ht-theme-main.css +2 -2
  55. package/styles/ht-theme-main.min.css +2 -2
package/helpers/mixed.js CHANGED
@@ -134,7 +134,7 @@ const domMessages = {
134
134
  function _injectProductInfo(key, element) {
135
135
  const hasValidType = !isEmpty(key);
136
136
  const isNonCommercial = typeof key === 'string' && key.toLowerCase() === 'non-commercial-and-evaluation';
137
- const hotVersion = "0.0.0-next-87b048b-20250409";
137
+ const hotVersion = "0.0.0-next-d9b3885-20250415";
138
138
  let keyValidityDate;
139
139
  let consoleMessageState = 'invalid';
140
140
  let domMessageState = 'invalid';
package/helpers/mixed.mjs CHANGED
@@ -124,7 +124,7 @@ const domMessages = {
124
124
  export function _injectProductInfo(key, element) {
125
125
  const hasValidType = !isEmpty(key);
126
126
  const isNonCommercial = typeof key === 'string' && key.toLowerCase() === 'non-commercial-and-evaluation';
127
- const hotVersion = "0.0.0-next-87b048b-20250409";
127
+ const hotVersion = "0.0.0-next-d9b3885-20250415";
128
128
  let keyValidityDate;
129
129
  let consoleMessageState = 'invalid';
130
130
  let domMessageState = 'invalid';
package/package.json CHANGED
@@ -10,7 +10,7 @@
10
10
  "url": "https://github.com/handsontable/handsontable/issues"
11
11
  },
12
12
  "author": "Handsoncode <hello@handsontable.com>",
13
- "version": "0.0.0-next-87b048b-20250409",
13
+ "version": "0.0.0-next-d9b3885-20250415",
14
14
  "main": "index",
15
15
  "module": "index.mjs",
16
16
  "jsnext:main": "index.mjs",
@@ -127,6 +127,53 @@ const COLUMN_SIZE_MAP_NAME = 'autoColumnSize';
127
127
  * }
128
128
  * ```
129
129
  * :::
130
+ *
131
+ * ::: only-for angular
132
+ *
133
+ * ```ts
134
+ * import { AfterViewInit, Component, ViewChild } from "@angular/core";
135
+ * import {
136
+ * GridSettings,
137
+ * HotTableModule,
138
+ * HotTableComponent,
139
+ * } from "@handsontable/angular-wrapper";
140
+ *
141
+ * `@Component`({
142
+ * selector: "app-example",
143
+ * standalone: true,
144
+ * imports: [HotTableModule],
145
+ * template: ` <div class="ht-theme-main">
146
+ * <hot-table [settings]="gridSettings" />
147
+ * </div>`,
148
+ * })
149
+ * export class ExampleComponent implements AfterViewInit {
150
+ * `@ViewChild`(HotTableComponent, { static: false })
151
+ * readonly hotTable!: HotTableComponent;
152
+ *
153
+ * readonly gridSettings = <GridSettings>{
154
+ * data: this.getData(),
155
+ * autoColumnSize: true,
156
+ * };
157
+ *
158
+ * ngAfterViewInit(): void {
159
+ * // Access to plugin instance:
160
+ * const hot = this.hotTable.hotInstance;
161
+ * const plugin = hot.getPlugin("autoColumnSize");
162
+ *
163
+ * plugin.getColumnWidth(4);
164
+ *
165
+ * if (plugin.isEnabled()) {
166
+ * // code...
167
+ * }
168
+ * }
169
+ *
170
+ * private getData(): any[] {
171
+ * //get some data
172
+ * }
173
+ * }
174
+ * ```
175
+ *
176
+ * :::
130
177
  */
131
178
  /* eslint-enable jsdoc/require-description-complete-sentence */
132
179
  var _isInitialized = /*#__PURE__*/new WeakMap();
@@ -123,6 +123,53 @@ const COLUMN_SIZE_MAP_NAME = 'autoColumnSize';
123
123
  * }
124
124
  * ```
125
125
  * :::
126
+ *
127
+ * ::: only-for angular
128
+ *
129
+ * ```ts
130
+ * import { AfterViewInit, Component, ViewChild } from "@angular/core";
131
+ * import {
132
+ * GridSettings,
133
+ * HotTableModule,
134
+ * HotTableComponent,
135
+ * } from "@handsontable/angular-wrapper";
136
+ *
137
+ * `@Component`({
138
+ * selector: "app-example",
139
+ * standalone: true,
140
+ * imports: [HotTableModule],
141
+ * template: ` <div class="ht-theme-main">
142
+ * <hot-table [settings]="gridSettings" />
143
+ * </div>`,
144
+ * })
145
+ * export class ExampleComponent implements AfterViewInit {
146
+ * `@ViewChild`(HotTableComponent, { static: false })
147
+ * readonly hotTable!: HotTableComponent;
148
+ *
149
+ * readonly gridSettings = <GridSettings>{
150
+ * data: this.getData(),
151
+ * autoColumnSize: true,
152
+ * };
153
+ *
154
+ * ngAfterViewInit(): void {
155
+ * // Access to plugin instance:
156
+ * const hot = this.hotTable.hotInstance;
157
+ * const plugin = hot.getPlugin("autoColumnSize");
158
+ *
159
+ * plugin.getColumnWidth(4);
160
+ *
161
+ * if (plugin.isEnabled()) {
162
+ * // code...
163
+ * }
164
+ * }
165
+ *
166
+ * private getData(): any[] {
167
+ * //get some data
168
+ * }
169
+ * }
170
+ * ```
171
+ *
172
+ * :::
126
173
  */
127
174
  /* eslint-enable jsdoc/require-description-complete-sentence */
128
175
  var _isInitialized = /*#__PURE__*/new WeakMap();
@@ -110,6 +110,51 @@ const ROW_WIDTHS_MAP_NAME = 'autoRowSize';
110
110
  * }
111
111
  * ```
112
112
  * :::
113
+ *
114
+ * ::: only-for angular
115
+ * ```ts
116
+ * import { AfterViewInit, Component, ViewChild } from "@angular/core";
117
+ * import {
118
+ * GridSettings,
119
+ * HotTableModule,
120
+ * HotTableComponent,
121
+ * } from "@handsontable/angular-wrapper";
122
+ *
123
+ * `@Component`({
124
+ * selector: "app-example",
125
+ * standalone: true,
126
+ * imports: [HotTableModule],
127
+ * template: ` <div class="ht-theme-main">
128
+ * <hot-table [settings]="gridSettings" />
129
+ * </div>`,
130
+ * })
131
+ * export class ExampleComponent implements AfterViewInit {
132
+ * `@ViewChild`(HotTableComponent, { static: false })
133
+ * readonly hotTable!: HotTableComponent;
134
+ *
135
+ * readonly gridSettings = <GridSettings>{
136
+ * data: this.getData(),
137
+ * autoRowSize: true,
138
+ * };
139
+ *
140
+ * ngAfterViewInit(): void {
141
+ * // Access to plugin instance:
142
+ * const hot = this.hotTable.hotInstance;
143
+ * const plugin = hot.getPlugin("autoRowSize");
144
+ *
145
+ * plugin.getRowHeight(4);
146
+ *
147
+ * if (plugin.isEnabled()) {
148
+ * // code...
149
+ * }
150
+ * }
151
+ *
152
+ * private getData(): any[] {
153
+ * // get some data
154
+ * }
155
+ * }
156
+ * ```
157
+ * :::
113
158
  */
114
159
  /* eslint-enable jsdoc/require-description-complete-sentence */
115
160
  var _visualRowsToRefresh = /*#__PURE__*/new WeakMap();
@@ -106,6 +106,51 @@ const ROW_WIDTHS_MAP_NAME = 'autoRowSize';
106
106
  * }
107
107
  * ```
108
108
  * :::
109
+ *
110
+ * ::: only-for angular
111
+ * ```ts
112
+ * import { AfterViewInit, Component, ViewChild } from "@angular/core";
113
+ * import {
114
+ * GridSettings,
115
+ * HotTableModule,
116
+ * HotTableComponent,
117
+ * } from "@handsontable/angular-wrapper";
118
+ *
119
+ * `@Component`({
120
+ * selector: "app-example",
121
+ * standalone: true,
122
+ * imports: [HotTableModule],
123
+ * template: ` <div class="ht-theme-main">
124
+ * <hot-table [settings]="gridSettings" />
125
+ * </div>`,
126
+ * })
127
+ * export class ExampleComponent implements AfterViewInit {
128
+ * `@ViewChild`(HotTableComponent, { static: false })
129
+ * readonly hotTable!: HotTableComponent;
130
+ *
131
+ * readonly gridSettings = <GridSettings>{
132
+ * data: this.getData(),
133
+ * autoRowSize: true,
134
+ * };
135
+ *
136
+ * ngAfterViewInit(): void {
137
+ * // Access to plugin instance:
138
+ * const hot = this.hotTable.hotInstance;
139
+ * const plugin = hot.getPlugin("autoRowSize");
140
+ *
141
+ * plugin.getRowHeight(4);
142
+ *
143
+ * if (plugin.isEnabled()) {
144
+ * // code...
145
+ * }
146
+ * }
147
+ *
148
+ * private getData(): any[] {
149
+ * // get some data
150
+ * }
151
+ * }
152
+ * ```
153
+ * :::
109
154
  */
110
155
  /* eslint-enable jsdoc/require-description-complete-sentence */
111
156
  var _visualRowsToRefresh = /*#__PURE__*/new WeakMap();
@@ -48,6 +48,19 @@ const bindTypeToMapStrategy = new Map([['loose', _looseBindsMap.default], ['stri
48
48
  * />
49
49
  * ```
50
50
  * :::
51
+ *
52
+ * ::: only-for angular
53
+ * ```ts
54
+ * settings = {
55
+ * data: getData(),
56
+ * bindRowsWithHeaders: true,
57
+ * };
58
+ * ```
59
+ *
60
+ * ```html
61
+ * <hot-table [settings]="settings" />
62
+ * ```
63
+ * :::
51
64
  */
52
65
  var _BindRowsWithHeaders_brand = /*#__PURE__*/new WeakSet();
53
66
  class BindRowsWithHeaders extends _base.BasePlugin {
@@ -44,6 +44,19 @@ const bindTypeToMapStrategy = new Map([['loose', LooseBindsMap], ['strict', Stri
44
44
  * />
45
45
  * ```
46
46
  * :::
47
+ *
48
+ * ::: only-for angular
49
+ * ```ts
50
+ * settings = {
51
+ * data: getData(),
52
+ * bindRowsWithHeaders: true,
53
+ * };
54
+ * ```
55
+ *
56
+ * ```html
57
+ * <hot-table [settings]="settings" />
58
+ * ```
59
+ * :::
47
60
  */
48
61
  var _BindRowsWithHeaders_brand = /*#__PURE__*/new WeakSet();
49
62
  export class BindRowsWithHeaders extends BasePlugin {
@@ -105,6 +105,37 @@ const actionDictionary = new Map([['collapse', {
105
105
  * />
106
106
  * ```
107
107
  * :::
108
+ *
109
+ * ::: only-for angular
110
+ * ```ts
111
+ * // Enable the collapsibleColumns plugin
112
+ * settings = {
113
+ * data: generateDataObj(),
114
+ * colHeaders: true,
115
+ * rowHeaders: true,
116
+ * nestedHeaders: true,
117
+ * // enable plugin
118
+ * collapsibleColumns: true,
119
+ * };
120
+ *
121
+ * // Or enable and configure specific collapsible columns
122
+ * settings = {
123
+ * data: generateDataObj(),
124
+ * colHeaders: true,
125
+ * rowHeaders: true,
126
+ * nestedHeaders: true,
127
+ * // enable and configure which columns can be collapsed
128
+ * collapsibleColumns: [
129
+ * { row: -4, col: 1, collapsible: true },
130
+ * { row: -3, col: 5, collapsible: true },
131
+ * ],
132
+ * };
133
+ * ```
134
+ *
135
+ * ```html
136
+ * <hot-table [settings]="settings"></hot-table>
137
+ * ```
138
+ * :::
108
139
  */
109
140
  var _collapsedColumnsMap = /*#__PURE__*/new WeakMap();
110
141
  var _CollapsibleColumns_brand = /*#__PURE__*/new WeakSet();
@@ -102,6 +102,37 @@ const actionDictionary = new Map([['collapse', {
102
102
  * />
103
103
  * ```
104
104
  * :::
105
+ *
106
+ * ::: only-for angular
107
+ * ```ts
108
+ * // Enable the collapsibleColumns plugin
109
+ * settings = {
110
+ * data: generateDataObj(),
111
+ * colHeaders: true,
112
+ * rowHeaders: true,
113
+ * nestedHeaders: true,
114
+ * // enable plugin
115
+ * collapsibleColumns: true,
116
+ * };
117
+ *
118
+ * // Or enable and configure specific collapsible columns
119
+ * settings = {
120
+ * data: generateDataObj(),
121
+ * colHeaders: true,
122
+ * rowHeaders: true,
123
+ * nestedHeaders: true,
124
+ * // enable and configure which columns can be collapsed
125
+ * collapsibleColumns: [
126
+ * { row: -4, col: 1, collapsible: true },
127
+ * { row: -3, col: 5, collapsible: true },
128
+ * ],
129
+ * };
130
+ * ```
131
+ *
132
+ * ```html
133
+ * <hot-table [settings]="settings"></hot-table>
134
+ * ```
135
+ * :::
105
136
  */
106
137
  var _collapsedColumnsMap = /*#__PURE__*/new WeakMap();
107
138
  var _CollapsibleColumns_brand = /*#__PURE__*/new WeakSet();
@@ -104,6 +104,39 @@ const PLUGIN_PRIORITY = exports.PLUGIN_PRIORITY = 220;
104
104
  * />
105
105
  * ```
106
106
  * :::
107
+ *
108
+ * ::: only-for angular
109
+ * ```ts
110
+ * settings = {
111
+ * data: getData(),
112
+ * colHeaders: true,
113
+ * rowHeaders: true,
114
+ * columnSummary: [
115
+ * {
116
+ * type: "min",
117
+ * destinationRow: 4,
118
+ * destinationColumn: 1,
119
+ * },
120
+ * {
121
+ * type: "max",
122
+ * destinationRow: 0,
123
+ * destinationColumn: 3,
124
+ * reversedRowCoords: true,
125
+ * },
126
+ * {
127
+ * type: "sum",
128
+ * destinationRow: 4,
129
+ * destinationColumn: 5,
130
+ * forceNumeric: true,
131
+ * },
132
+ * ],
133
+ * };
134
+ * ```
135
+ *
136
+ * ```html
137
+ * <hot-table [settings]="settings"></hot-table>
138
+ * ```
139
+ * :::
107
140
  */
108
141
  var _ColumnSummary_brand = /*#__PURE__*/new WeakSet();
109
142
  class ColumnSummary extends _base.BasePlugin {
@@ -100,6 +100,39 @@ export const PLUGIN_PRIORITY = 220;
100
100
  * />
101
101
  * ```
102
102
  * :::
103
+ *
104
+ * ::: only-for angular
105
+ * ```ts
106
+ * settings = {
107
+ * data: getData(),
108
+ * colHeaders: true,
109
+ * rowHeaders: true,
110
+ * columnSummary: [
111
+ * {
112
+ * type: "min",
113
+ * destinationRow: 4,
114
+ * destinationColumn: 1,
115
+ * },
116
+ * {
117
+ * type: "max",
118
+ * destinationRow: 0,
119
+ * destinationColumn: 3,
120
+ * reversedRowCoords: true,
121
+ * },
122
+ * {
123
+ * type: "sum",
124
+ * destinationRow: 4,
125
+ * destinationColumn: 5,
126
+ * forceNumeric: true,
127
+ * },
128
+ * ],
129
+ * };
130
+ * ```
131
+ *
132
+ * ```html
133
+ * <hot-table [settings]="settings"></hot-table>
134
+ * ```
135
+ * :::
103
136
  */
104
137
  var _ColumnSummary_brand = /*#__PURE__*/new WeakSet();
105
138
  export class ColumnSummary extends BasePlugin {
@@ -121,6 +121,59 @@ const SHORTCUTS_CONTEXT_NAME = `plugin:${PLUGIN_KEY}`;
121
121
  * commentsPlugin.removeComment();
122
122
  * ```
123
123
  * :::
124
+ *
125
+ * ::: only-for angular
126
+ * ```ts
127
+ * import { AfterViewInit, Component, ViewChild } from "@angular/core";
128
+ * import {
129
+ * GridSettings,
130
+ * HotTableModule,
131
+ * HotTableComponent,
132
+ * } from "@handsontable/angular-wrapper";
133
+ *
134
+ * `@Component`({
135
+ * selector: "app-example",
136
+ * standalone: true,
137
+ * imports: [HotTableModule],
138
+ * template: ` <div class="ht-theme-main">
139
+ * <hot-table [settings]="gridSettings" />
140
+ * </div>`,
141
+ * })
142
+ * export class ExampleComponent implements AfterViewInit {
143
+ * `@ViewChild`(HotTableComponent, { static: false })
144
+ * readonly hotTable!: HotTableComponent;
145
+ *
146
+ * readonly gridSettings = <GridSettings>{
147
+ * data: this.getData(),
148
+ * comments: true,
149
+ * cell: [
150
+ * { row: 1, col: 1, comment: { value: "Foo" } },
151
+ * { row: 2, col: 2, comment: { value: "Bar" } },
152
+ * ],
153
+ * };
154
+ *
155
+ * ngAfterViewInit(): void {
156
+ * // Access to plugin instance:
157
+ * const hot = this.hotTable.hotInstance;
158
+ * const commentsPlugin = hot.getPlugin("comments");
159
+ *
160
+ * // Manage comments programmatically:
161
+ * commentsPlugin.setCommentAtCell(1, 6, "Comment contents");
162
+ * commentsPlugin.showAtCell(1, 6);
163
+ * commentsPlugin.removeCommentAtCell(1, 6);
164
+ *
165
+ * // You can also set range once and use proper methods:
166
+ * commentsPlugin.setRange({ from: { row: 1, col: 6 } });
167
+ * commentsPlugin.setComment("Comment contents");
168
+ * commentsPlugin.show();
169
+ * }
170
+ *
171
+ * private getData(): any[] {
172
+ * // get some data
173
+ * }
174
+ * }
175
+ * ```
176
+ * :::
124
177
  */
125
178
  var _editor = /*#__PURE__*/new WeakMap();
126
179
  var _displaySwitch = /*#__PURE__*/new WeakMap();
@@ -117,6 +117,59 @@ const SHORTCUTS_CONTEXT_NAME = `plugin:${PLUGIN_KEY}`;
117
117
  * commentsPlugin.removeComment();
118
118
  * ```
119
119
  * :::
120
+ *
121
+ * ::: only-for angular
122
+ * ```ts
123
+ * import { AfterViewInit, Component, ViewChild } from "@angular/core";
124
+ * import {
125
+ * GridSettings,
126
+ * HotTableModule,
127
+ * HotTableComponent,
128
+ * } from "@handsontable/angular-wrapper";
129
+ *
130
+ * `@Component`({
131
+ * selector: "app-example",
132
+ * standalone: true,
133
+ * imports: [HotTableModule],
134
+ * template: ` <div class="ht-theme-main">
135
+ * <hot-table [settings]="gridSettings" />
136
+ * </div>`,
137
+ * })
138
+ * export class ExampleComponent implements AfterViewInit {
139
+ * `@ViewChild`(HotTableComponent, { static: false })
140
+ * readonly hotTable!: HotTableComponent;
141
+ *
142
+ * readonly gridSettings = <GridSettings>{
143
+ * data: this.getData(),
144
+ * comments: true,
145
+ * cell: [
146
+ * { row: 1, col: 1, comment: { value: "Foo" } },
147
+ * { row: 2, col: 2, comment: { value: "Bar" } },
148
+ * ],
149
+ * };
150
+ *
151
+ * ngAfterViewInit(): void {
152
+ * // Access to plugin instance:
153
+ * const hot = this.hotTable.hotInstance;
154
+ * const commentsPlugin = hot.getPlugin("comments");
155
+ *
156
+ * // Manage comments programmatically:
157
+ * commentsPlugin.setCommentAtCell(1, 6, "Comment contents");
158
+ * commentsPlugin.showAtCell(1, 6);
159
+ * commentsPlugin.removeCommentAtCell(1, 6);
160
+ *
161
+ * // You can also set range once and use proper methods:
162
+ * commentsPlugin.setRange({ from: { row: 1, col: 6 } });
163
+ * commentsPlugin.setComment("Comment contents");
164
+ * commentsPlugin.show();
165
+ * }
166
+ *
167
+ * private getData(): any[] {
168
+ * // get some data
169
+ * }
170
+ * }
171
+ * ```
172
+ * :::
120
173
  */
121
174
  var _editor = /*#__PURE__*/new WeakMap();
122
175
  var _displaySwitch = /*#__PURE__*/new WeakMap();
@@ -80,6 +80,21 @@ const SHORTCUTS_GROUP = PLUGIN_KEY;
80
80
  * />
81
81
  * ```
82
82
  * :::
83
+ *
84
+ * ::: only-for angular
85
+ * ```ts
86
+ * settings = {
87
+ * data: data,
88
+ * comments: true,
89
+ * // enable and configure dropdown menu
90
+ * dropdownMenu: ["remove_col", "---------", "make_read_only", "alignment"],
91
+ * };
92
+ * ```
93
+ *
94
+ * ```html
95
+ * <hot-table [settings]="settings"></hot-table>
96
+ * ```
97
+ * :::
83
98
  */
84
99
  var _isButtonClicked = /*#__PURE__*/new WeakMap();
85
100
  var _DropdownMenu_brand = /*#__PURE__*/new WeakSet();
@@ -77,6 +77,21 @@ const SHORTCUTS_GROUP = PLUGIN_KEY;
77
77
  * />
78
78
  * ```
79
79
  * :::
80
+ *
81
+ * ::: only-for angular
82
+ * ```ts
83
+ * settings = {
84
+ * data: data,
85
+ * comments: true,
86
+ * // enable and configure dropdown menu
87
+ * dropdownMenu: ["remove_col", "---------", "make_read_only", "alignment"],
88
+ * };
89
+ * ```
90
+ *
91
+ * ```html
92
+ * <hot-table [settings]="settings"></hot-table>
93
+ * ```
94
+ * :::
80
95
  */
81
96
  var _isButtonClicked = /*#__PURE__*/new WeakMap();
82
97
  var _DropdownMenu_brand = /*#__PURE__*/new WeakSet();
@@ -87,6 +87,64 @@ const PLUGIN_PRIORITY = exports.PLUGIN_PRIORITY = 240;
87
87
  * });
88
88
  * ```
89
89
  * :::
90
+ *
91
+ * ::: only-for angular
92
+ * ```ts
93
+ * import { AfterViewInit, Component, ViewChild } from "@angular/core";
94
+ * import {
95
+ * GridSettings,
96
+ * HotTableModule,
97
+ * HotTableComponent,
98
+ * } from "@handsontable/angular-wrapper";
99
+ *
100
+ * `@Component`({
101
+ * selector: "app-example",
102
+ * standalone: true,
103
+ * imports: [HotTableModule],
104
+ * template: ` <div class="ht-theme-main">
105
+ * <hot-table [settings]="gridSettings" />
106
+ * </div>`,
107
+ * })
108
+ * export class ExampleComponent implements AfterViewInit {
109
+ * `@ViewChild`(HotTableComponent, { static: false })
110
+ * readonly hotTable!: HotTableComponent;
111
+ *
112
+ * readonly gridSettings = <GridSettings>{
113
+ * data: this.getData(),
114
+ * };
115
+ *
116
+ * ngAfterViewInit(): void {
117
+ * // Access to plugin instance:
118
+ * const hot = this.hotTable.hotInstance;
119
+ * // Access to exportFile plugin instance
120
+ * const exportPlugin = hot.getPlugin("exportFile");
121
+ *
122
+ * // Export as a string
123
+ * exportPlugin.exportAsString("csv");
124
+ *
125
+ * // Export as a blob object
126
+ * exportPlugin.exportAsBlob("csv");
127
+ *
128
+ * // Export to downloadable file (named: MyFile.csv)
129
+ * exportPlugin.downloadFile("csv", { filename: "MyFile" });
130
+ *
131
+ * // Export as a string (with specified data range):
132
+ * exportPlugin.exportAsString("csv", {
133
+ * exportHiddenRows: true, // default false
134
+ * exportHiddenColumns: true, // default false
135
+ * columnHeaders: true, // default false
136
+ * rowHeaders: true, // default false
137
+ * columnDelimiter: ";", // default ','
138
+ * range: [1, 1, 6, 6], // [startRow, endRow, startColumn, endColumn]
139
+ * });
140
+ * }
141
+ *
142
+ * private getData(): any[] {
143
+ * // get some data
144
+ * }
145
+ * }
146
+ * ```
147
+ * :::
90
148
  */
91
149
  class ExportFile extends _base.BasePlugin {
92
150
  static get PLUGIN_KEY() {