handsontable 12.1.1 → 12.1.3
Sign up to get free protection for your applications and to get access to all the features.
- package/3rdparty/walkontable/src/border.js +43 -28
- package/3rdparty/walkontable/src/border.mjs +43 -28
- package/3rdparty/walkontable/src/table.js +13 -10
- package/3rdparty/walkontable/src/table.mjs +13 -10
- package/CHANGELOG.md +31 -0
- package/base.js +2 -2
- package/base.mjs +2 -2
- package/core.d.ts +1 -3
- package/core.js +9 -1
- package/core.mjs +9 -1
- package/dataMap/dataMap.js +35 -16
- package/dataMap/dataMap.mjs +30 -13
- package/dataMap/metaManager/lazyFactoryMap.js +24 -5
- package/dataMap/metaManager/lazyFactoryMap.mjs +19 -4
- package/dataMap/metaManager/metaSchema.js +112 -80
- package/dataMap/metaManager/metaSchema.mjs +112 -80
- package/dist/handsontable.css +2 -2
- package/dist/handsontable.full.css +2 -2
- package/dist/handsontable.full.js +35200 -52208
- package/dist/handsontable.full.min.css +2 -2
- package/dist/handsontable.full.min.js +527 -284
- package/dist/handsontable.js +3046 -3279
- package/dist/handsontable.min.css +2 -2
- package/dist/handsontable.min.js +3 -3
- package/editorManager.js +69 -35
- package/editorManager.mjs +69 -35
- package/editors/baseEditor/baseEditor.js +1 -1
- package/editors/baseEditor/baseEditor.mjs +1 -1
- package/editors/dateEditor/dateEditor.js +17 -2
- package/editors/dateEditor/dateEditor.mjs +16 -0
- package/editors/textEditor/caretPositioner.js +0 -4
- package/editors/textEditor/caretPositioner.mjs +0 -2
- package/helpers/dom/element.js +2 -4
- package/helpers/dom/element.mjs +1 -2
- package/helpers/mixed.js +2 -4
- package/helpers/mixed.mjs +2 -3
- package/helpers/object.js +0 -4
- package/helpers/object.mjs +0 -2
- package/helpers/unicode.js +0 -4
- package/helpers/unicode.mjs +0 -2
- package/package.json +2 -2
- package/pluginHooks.d.ts +0 -1
- package/pluginHooks.js +17 -14
- package/pluginHooks.mjs +17 -14
- package/plugins/base/base.js +2 -4
- package/plugins/base/base.mjs +1 -2
- package/plugins/columnSorting/sortService/engine.js +2 -6
- package/plugins/columnSorting/sortService/engine.mjs +2 -2
- package/plugins/columnSummary/columnSummary.js +17 -11
- package/plugins/columnSummary/columnSummary.mjs +15 -9
- package/plugins/columnSummary/utils.js +14 -0
- package/plugins/columnSummary/utils.mjs +9 -0
- package/plugins/contextMenu/commandExecutor.js +0 -4
- package/plugins/contextMenu/commandExecutor.mjs +0 -2
- package/plugins/contextMenu/contextMenu.js +5 -1
- package/plugins/contextMenu/contextMenu.mjs +5 -1
- package/plugins/contextMenu/menu.js +4 -0
- package/plugins/contextMenu/menu.mjs +4 -0
- package/plugins/copyPaste/copyPaste.js +2 -0
- package/plugins/copyPaste/copyPaste.mjs +2 -0
- package/plugins/dropdownMenu/dropdownMenu.js +4 -0
- package/plugins/dropdownMenu/dropdownMenu.mjs +4 -0
- package/plugins/filters/component/condition.js +11 -29
- package/plugins/filters/component/condition.mjs +6 -21
- package/plugins/filters/component/value.js +12 -5
- package/plugins/filters/component/value.mjs +12 -5
- package/plugins/filters/filters.d.ts +1 -1
- package/plugins/filters/filters.js +62 -82
- package/plugins/filters/filters.mjs +63 -83
- package/plugins/hiddenColumns/hiddenColumns.js +0 -4
- package/plugins/hiddenColumns/hiddenColumns.mjs +0 -2
- package/plugins/hiddenRows/hiddenRows.js +0 -4
- package/plugins/hiddenRows/hiddenRows.mjs +0 -2
- package/plugins/multiColumnSorting/domHelpers.js +2 -4
- package/plugins/multiColumnSorting/domHelpers.mjs +1 -2
- package/plugins/nestedRows/nestedRows.js +1 -1
- package/plugins/nestedRows/nestedRows.mjs +1 -1
- package/plugins/search/search.js +0 -2
- package/plugins/search/search.mjs +0 -1
- package/plugins/trimRows/trimRows.js +3 -3
- package/plugins/trimRows/trimRows.mjs +3 -3
- package/renderers/numericRenderer/numericRenderer.js +0 -2
- package/renderers/numericRenderer/numericRenderer.mjs +0 -1
- package/renderers/textRenderer/textRenderer.js +1 -1
- package/renderers/textRenderer/textRenderer.mjs +1 -1
- package/shortcuts/recorder.js +14 -10
- package/shortcuts/recorder.mjs +13 -10
- package/shortcuts/utils.js +0 -4
- package/shortcuts/utils.mjs +0 -2
- package/translations/indexMapper.js +2 -2
- package/translations/indexMapper.mjs +2 -2
- package/utils/sortingAlgorithms/mergeSort.js +0 -120
- package/utils/sortingAlgorithms/mergeSort.mjs +0 -110
@@ -101,10 +101,14 @@ export default (function () {
|
|
101
101
|
*
|
102
102
|
* You can set the `allowEmpty` option to one of the following:
|
103
103
|
*
|
104
|
-
* | Setting | Description
|
105
|
-
* | ---------------- |
|
106
|
-
* | `true` (default) | - Accept `null`, `undefined` and `''` values<br>- Mark cells that contain `null`, `undefined`
|
107
|
-
* | `false` | - Don't accept `null`, `undefined` and `''` values<br>- Mark cells that contain `null`, `undefined`
|
104
|
+
* | Setting | Description |
|
105
|
+
* | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
|
106
|
+
* | `true` (default) | - Accept `null`, `undefined` and `''` values<br>- Mark cells that contain `null`, `undefined` or `''` values as `valid` |
|
107
|
+
* | `false` | - Don't accept `null`, `undefined` and `''` values<br>- Mark cells that contain `null`, `undefined` or `''` values with as `invalid` |
|
108
|
+
*
|
109
|
+
* ::: tip
|
110
|
+
* To use the [`allowEmpty`](#allowempty) option, you need to set the [`validator`](#validator) option (or the [`type`](#type) option).
|
111
|
+
* :::
|
108
112
|
*
|
109
113
|
* @memberof Options#
|
110
114
|
* @type {boolean}
|
@@ -113,15 +117,15 @@ export default (function () {
|
|
113
117
|
*
|
114
118
|
* @example
|
115
119
|
* ```js
|
116
|
-
* // allow empty values in
|
120
|
+
* // allow empty values in each cell of the entire grid
|
117
121
|
* allowEmpty: true,
|
118
122
|
*
|
119
123
|
* // or
|
120
124
|
* columns: [
|
121
125
|
* {
|
122
|
-
*
|
126
|
+
* type: 'date',
|
123
127
|
* dateFormat: 'DD/MM/YYYY',
|
124
|
-
* // allow empty values in
|
128
|
+
* // allow empty values in each cell of the 'date' column
|
125
129
|
* allowEmpty: true
|
126
130
|
* }
|
127
131
|
* ],
|
@@ -157,7 +161,7 @@ export default (function () {
|
|
157
161
|
* ```js
|
158
162
|
* columns: [
|
159
163
|
* {
|
160
|
-
* // set the `type` of
|
164
|
+
* // set the `type` of each cell in this column to `autocomplete`
|
161
165
|
* type: 'autocomplete',
|
162
166
|
* // set options available in every `autocomplete` cell of this column
|
163
167
|
* source: ['<strong>foo</strong>', '<strong>bar</strong>']
|
@@ -474,7 +478,7 @@ export default (function () {
|
|
474
478
|
|
475
479
|
/**
|
476
480
|
* @description
|
477
|
-
* The `cells` option lets you apply [configuration options](@/guides/getting-started/setting-options.md) to
|
481
|
+
* The `cells` option lets you apply any other [configuration options](@/guides/getting-started/setting-options.md) to
|
478
482
|
* individual grid elements (columns, rows, cells), based on any logic you implement.
|
479
483
|
*
|
480
484
|
* The `cells` option overwrites all other options (including options set by [`columns`](#columns) and [`cell`](#cell)).
|
@@ -540,13 +544,13 @@ export default (function () {
|
|
540
544
|
* ```js
|
541
545
|
* columns: [
|
542
546
|
* {
|
543
|
-
* // set the `type` of
|
547
|
+
* // set the `type` of each cell in this column to `checkbox`
|
544
548
|
* // when checked, the cell's value is `true`
|
545
549
|
* // when unchecked, the cell's value is `false`
|
546
550
|
* type: 'checkbox',
|
547
551
|
* },
|
548
552
|
* {
|
549
|
-
* // set the `type` of
|
553
|
+
* // set the `type` of each cell in this column to `checkbox`
|
550
554
|
* type: 'checkbox',
|
551
555
|
* // when checked, the cell's value is `'Yes'`
|
552
556
|
* checkedTemplate: 'Yes',
|
@@ -700,7 +704,7 @@ export default (function () {
|
|
700
704
|
|
701
705
|
/**
|
702
706
|
* @description
|
703
|
-
* The `columns` option lets you apply [configuration options](@/guides/getting-started/setting-options.md) to individual columns (or ranges of columns).
|
707
|
+
* The `columns` option lets you apply any other [configuration options](@/guides/getting-started/setting-options.md) to individual columns (or ranges of columns).
|
704
708
|
*
|
705
709
|
* You can set the `columns` option to one of the following:
|
706
710
|
* - An array of objects (each object represents one column)
|
@@ -708,13 +712,14 @@ export default (function () {
|
|
708
712
|
*
|
709
713
|
* The `columns` option overwrites the [top-level grid options](@/guides/getting-started/setting-options.md#setting-grid-options).
|
710
714
|
*
|
711
|
-
* When you use
|
715
|
+
* When you use `columns`, the [`startCols`](#startCols), [`minCols`](#minCols), and [`maxCols`](#maxCols) options are ignored.
|
712
716
|
*
|
713
717
|
* Read more:
|
714
718
|
* - [Configuration options: Setting column options](@/guides/getting-started/setting-options.md#setting-column-options)
|
715
719
|
* - [`startCols`](#startCols)
|
716
720
|
* - [`minCols`](#minCols)
|
717
721
|
* - [`maxCols`](#maxCols)
|
722
|
+
* - [`data`](#data)
|
718
723
|
*
|
719
724
|
* @memberof Options#
|
720
725
|
* @type {object[]|Function}
|
@@ -960,7 +965,7 @@ export default (function () {
|
|
960
965
|
* @example
|
961
966
|
* ```js
|
962
967
|
* // add a `has-comment` CSS class name
|
963
|
-
* // to
|
968
|
+
* // to each cell that has a comment
|
964
969
|
* commentedCellClassName: 'has-comment',
|
965
970
|
* ```
|
966
971
|
*/
|
@@ -1090,10 +1095,10 @@ export default (function () {
|
|
1090
1095
|
*
|
1091
1096
|
* You can set the `copyable` option to one of the following:
|
1092
1097
|
*
|
1093
|
-
* | Setting | Description
|
1094
|
-
* | -------------------------------------------------------------------------------------------------------------- |
|
1095
|
-
* | `true` (default) | -
|
1096
|
-
* | `false`<br>(default for the [`password`](@/guides/cell-types/password-cell-type.md) [cell type](#type)) | -
|
1098
|
+
* | Setting | Description |
|
1099
|
+
* | -------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
|
1100
|
+
* | `true` (default) | - On pressing <kbd>**Ctrl**</kbd>/<kbd>**Cmd**</kbd> + <kbd>**C**</kbd>, add the cell's value to the clipboard |
|
1101
|
+
* | `false`<br>(default for the [`password`](@/guides/cell-types/password-cell-type.md) [cell type](#type)) | - On pressing <kbd>**Ctrl**</kbd>/<kbd>**Cmd**</kbd> + <kbd>**C**</kbd>, add an empty string (`""`) to the clipboard |
|
1097
1102
|
*
|
1098
1103
|
* Read more:
|
1099
1104
|
* - [Clipboard](@/guides/cell-features/clipboard.md)
|
@@ -1107,17 +1112,17 @@ export default (function () {
|
|
1107
1112
|
*
|
1108
1113
|
* @example
|
1109
1114
|
* ```js
|
1110
|
-
* // enable copying for
|
1115
|
+
* // enable copying for each cell of the entire grid
|
1111
1116
|
* copyable: true,
|
1112
1117
|
*
|
1113
1118
|
* // enable copying for individual columns
|
1114
1119
|
* columns: [
|
1115
1120
|
* {
|
1116
|
-
* // enable copying for
|
1121
|
+
* // enable copying for each cell of this column
|
1117
1122
|
* copyable: true
|
1118
1123
|
* },
|
1119
1124
|
* {
|
1120
|
-
* // disable copying for
|
1125
|
+
* // disable copying for each cell of this column
|
1121
1126
|
* copyable: false
|
1122
1127
|
* }
|
1123
1128
|
* ]
|
@@ -1185,15 +1190,21 @@ export default (function () {
|
|
1185
1190
|
copyPaste: true,
|
1186
1191
|
|
1187
1192
|
/**
|
1188
|
-
* The `correctFormat` option configures
|
1193
|
+
* The `correctFormat` option configures whether incorrectly-formatted times and dates are amended or not.
|
1194
|
+
*
|
1195
|
+
* When the user enters dates and times, Handsontable can automatically adjust their format
|
1196
|
+
* to match the [`dateFormat`](#dateFormat) and [`timeFormat`](@/guides/cell-types/time-cell-type.md) settings.
|
1189
1197
|
*
|
1190
|
-
*
|
1191
|
-
*
|
1192
|
-
* |
|
1193
|
-
* |
|
1198
|
+
* You can set the `correctFormat` option to one of the following:
|
1199
|
+
*
|
1200
|
+
* | Setting | Description |
|
1201
|
+
* | ----------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
1202
|
+
* | `false` (default) | Don't correct the format of the entered date or time (treat the entered date or time as invalid) |
|
1203
|
+
* | `true` | Correct the format of the entered date or time to match the [`dateFormat`](#dateFormat) or [`timeFormat`](@/guides/cell-types/time-cell-type.md) settings |
|
1194
1204
|
*
|
1195
1205
|
* Read more:
|
1196
1206
|
* - [Date cell type](@/guides/cell-types/date-cell-type.md)
|
1207
|
+
* - [Time cell type](@/guides/cell-types/time-cell-type.md)
|
1197
1208
|
* - [`dateFormat`](#dateFormat)
|
1198
1209
|
*
|
1199
1210
|
* @memberof Options#
|
@@ -1205,13 +1216,22 @@ export default (function () {
|
|
1205
1216
|
* ```js
|
1206
1217
|
* columns: [
|
1207
1218
|
* {
|
1208
|
-
* // set the `type` of
|
1219
|
+
* // set the `type` of each cell in this column to `date`
|
1209
1220
|
* type: 'date',
|
1210
1221
|
* // for every `date` cell of this column, set the date format to `YYYY-MM-DD`
|
1211
1222
|
* dateFormat: 'YYYY-MM-DD',
|
1212
1223
|
* // enforce the `YYYY-MM-DD` date format
|
1213
1224
|
* correctFormat: true
|
1214
1225
|
* },
|
1226
|
+
*
|
1227
|
+
* {
|
1228
|
+
* // set the `type` of each cell in this column to `time`
|
1229
|
+
* type: 'time',
|
1230
|
+
* // for every `time` cell of this column, set the time format to `h:mm:ss a`
|
1231
|
+
* timeFormat: 'h:mm:ss a',
|
1232
|
+
* // enforce the `h:mm:ss a` time format
|
1233
|
+
* correctFormat: true
|
1234
|
+
* },
|
1215
1235
|
* ],
|
1216
1236
|
* ```
|
1217
1237
|
*/
|
@@ -1219,7 +1239,7 @@ export default (function () {
|
|
1219
1239
|
|
1220
1240
|
/**
|
1221
1241
|
* The `currentColClassName` option lets you add a CSS class name
|
1222
|
-
* to
|
1242
|
+
* to each cell of the currently-visible, currently-selected columns.
|
1223
1243
|
*
|
1224
1244
|
* Read more:
|
1225
1245
|
* - [`currentRowClassName`](#currentRowClassName)
|
@@ -1241,7 +1261,7 @@ export default (function () {
|
|
1241
1261
|
* @example
|
1242
1262
|
* ```js
|
1243
1263
|
* // add a `your-class-name` CSS class name
|
1244
|
-
* // to
|
1264
|
+
* // to each cell of the currently-visible, currently-selected columns
|
1245
1265
|
* currentColClassName: 'your-class-name',
|
1246
1266
|
* ```
|
1247
1267
|
*/
|
@@ -1278,7 +1298,7 @@ export default (function () {
|
|
1278
1298
|
|
1279
1299
|
/**
|
1280
1300
|
* The `currentRowClassName` option lets you add a CSS class name
|
1281
|
-
* to
|
1301
|
+
* to each cell of the currently-visible, currently-selected rows.
|
1282
1302
|
*
|
1283
1303
|
* Read more:
|
1284
1304
|
* - [`currentColClassName`](#currentColClassName)
|
@@ -1300,7 +1320,7 @@ export default (function () {
|
|
1300
1320
|
* @example
|
1301
1321
|
* ```js
|
1302
1322
|
* // add a `your-class-name` CSS class name
|
1303
|
-
* // to
|
1323
|
+
* // to each cell of the currently-visible, currently-selected rows
|
1304
1324
|
* currentRowClassName: 'your-class-name',
|
1305
1325
|
* ```
|
1306
1326
|
*/
|
@@ -1429,9 +1449,13 @@ export default (function () {
|
|
1429
1449
|
* - Either to an [array of arrays](@/guides/getting-started/binding-to-data.md#array-of-arrays).
|
1430
1450
|
* - Or to an [array of objects](@/guides/getting-started/binding-to-data.md#array-of-objects).
|
1431
1451
|
*
|
1452
|
+
* If you don't set the `data` option (or set it to `null`), Handsontable renders as an empty 5x5 grid by default.
|
1453
|
+
*
|
1432
1454
|
* Read more:
|
1433
1455
|
* - [Binding to data](@/guides/getting-started/binding-to-data.md)
|
1434
1456
|
* - [`dataSchema`](#dataSchema)
|
1457
|
+
* - [`startRows`](#startRows)
|
1458
|
+
* - [`startCols`](#startCols)
|
1435
1459
|
*
|
1436
1460
|
* @memberof Options#
|
1437
1461
|
* @type {Array[]|object[]}
|
@@ -1461,15 +1485,22 @@ export default (function () {
|
|
1461
1485
|
|
1462
1486
|
/**
|
1463
1487
|
* @description
|
1464
|
-
*
|
1488
|
+
* When the [`data`](#data) option is set to an [array of objects](@/guides/getting-started/binding-to-data.md#array-of-objects)
|
1465
1489
|
* (or is empty), the `dataSchema` option defines the structure of new rows.
|
1466
1490
|
*
|
1491
|
+
* Using the `dataSchema` option, you can start out with an empty grid.
|
1492
|
+
*
|
1493
|
+
* You can set the `dataSchema` option to one of the following:
|
1494
|
+
* - An object
|
1495
|
+
* - A function
|
1496
|
+
*
|
1467
1497
|
* Read more:
|
1468
1498
|
* - [Binding to data: Array of objects with custom data schema](@/guides/getting-started/binding-to-data.md#array-of-objects-with-custom-data-schema)
|
1499
|
+
* - [Binding to data: Function data source and schema](@/guides/getting-started/binding-to-data.md#function-data-source-and-schema)
|
1469
1500
|
* - [`data`](#data)
|
1470
1501
|
*
|
1471
1502
|
* @memberof Options#
|
1472
|
-
* @type {object}
|
1503
|
+
* @type {object|Function}
|
1473
1504
|
* @default undefined
|
1474
1505
|
* @category Core
|
1475
1506
|
*
|
@@ -1512,7 +1543,7 @@ export default (function () {
|
|
1512
1543
|
* ```js
|
1513
1544
|
* columns: [
|
1514
1545
|
* {
|
1515
|
-
* // set the `type` of
|
1546
|
+
* // set the `type` of each cell in this column to `date`
|
1516
1547
|
* type: 'date',
|
1517
1548
|
* // for every `date` cell of this column, set the date format to `YYYY-MM-DD`
|
1518
1549
|
* dateFormat: 'YYYY-MM-DD',
|
@@ -1523,16 +1554,16 @@ export default (function () {
|
|
1523
1554
|
dateFormat: 'DD/MM/YYYY',
|
1524
1555
|
|
1525
1556
|
/**
|
1526
|
-
* The `datePickerConfig` option configures the `date` [cell editor](@/guides/cell-functions/cell-editor.md)'s date picker, which uses an external dependency: [Pikaday](https://github.com/Pikaday/Pikaday/tree/1.8.
|
1557
|
+
* The `datePickerConfig` option configures the `date` [cell editor](@/guides/cell-functions/cell-editor.md)'s date picker, which uses an external dependency: [Pikaday](https://github.com/Pikaday/Pikaday/tree/1.8.2).
|
1527
1558
|
*
|
1528
|
-
* You can set the `datePickerConfig` option to an object with any of the available [Pikaday options](https://github.com/Pikaday/Pikaday/tree/1.8.
|
1559
|
+
* You can set the `datePickerConfig` option to an object with any of the available [Pikaday options](https://github.com/Pikaday/Pikaday/tree/1.8.2#configuration),
|
1529
1560
|
* except for the following, which are always overwritten by the `date` [cell editor](@/guides/cell-functions/cell-editor.md):
|
1530
1561
|
* - `bound`
|
1531
1562
|
* - `container`
|
1532
1563
|
* - `field`
|
1533
1564
|
* - `trigger`
|
1534
1565
|
*
|
1535
|
-
* If the `datePickerConfig` option is not defined, the `date` [cell editor](@/guides/cell-functions/cell-editor.md) overwrites the following [Pikaday options](https://github.com/Pikaday/Pikaday/tree/1.8.
|
1566
|
+
* If the `datePickerConfig` option is not defined, the `date` [cell editor](@/guides/cell-functions/cell-editor.md) overwrites the following [Pikaday options](https://github.com/Pikaday/Pikaday/tree/1.8.2#configuration) as well:
|
1536
1567
|
*
|
1537
1568
|
* | Pikaday option | Handsontable's setting |
|
1538
1569
|
* | -------------------- | ---------------------- |
|
@@ -1543,7 +1574,7 @@ export default (function () {
|
|
1543
1574
|
* - [`editor`](#editor)
|
1544
1575
|
* - [`dateFormat`](#dateFormat)
|
1545
1576
|
* - [Cell editor](@/guides/cell-functions/cell-editor.md)
|
1546
|
-
* - [All Pikaday options →](https://github.com/Pikaday/Pikaday/tree/1.8.
|
1577
|
+
* - [All Pikaday options →](https://github.com/Pikaday/Pikaday/tree/1.8.2#configuration)
|
1547
1578
|
*
|
1548
1579
|
* @memberof Options#
|
1549
1580
|
* @type {object}
|
@@ -1571,7 +1602,7 @@ export default (function () {
|
|
1571
1602
|
* ```js
|
1572
1603
|
* columns: [
|
1573
1604
|
* {
|
1574
|
-
* // set the `type` of
|
1605
|
+
* // set the `type` of each cell in this column to `date`
|
1575
1606
|
* type: 'date',
|
1576
1607
|
* // in every empty `date` cell of this column, display `2015-02-02`
|
1577
1608
|
* defaultDate: '2015-02-02'
|
@@ -1752,17 +1783,17 @@ export default (function () {
|
|
1752
1783
|
*
|
1753
1784
|
* @example
|
1754
1785
|
* ```js
|
1755
|
-
* // use the `numeric` editor for
|
1786
|
+
* // use the `numeric` editor for each cell of the entire grid
|
1756
1787
|
* editor: 'numeric',
|
1757
1788
|
*
|
1758
1789
|
* // apply the `editor` option to individual columns
|
1759
1790
|
* columns: [
|
1760
1791
|
* {
|
1761
|
-
* // use the `autocomplete` editor for
|
1792
|
+
* // use the `autocomplete` editor for each cell of this column
|
1762
1793
|
* editor: 'autocomplete'
|
1763
1794
|
* },
|
1764
1795
|
* {
|
1765
|
-
* // disable editing cells through cell editors for
|
1796
|
+
* // disable editing cells through cell editors for each cell of this column
|
1766
1797
|
* editor: false
|
1767
1798
|
* }
|
1768
1799
|
* ]
|
@@ -1928,7 +1959,7 @@ export default (function () {
|
|
1928
1959
|
* @example
|
1929
1960
|
* ```js
|
1930
1961
|
* columns: [{
|
1931
|
-
* // set the `type` of
|
1962
|
+
* // set the `type` of each cell in this column to `autocomplete`
|
1932
1963
|
* type: 'autocomplete',
|
1933
1964
|
* // set options available in every `autocomplete` cell of this column
|
1934
1965
|
* source: ['A', 'B', 'C'],
|
@@ -3133,7 +3164,7 @@ export default (function () {
|
|
3133
3164
|
|
3134
3165
|
/**
|
3135
3166
|
* The `noWordWrapClassName` option lets you add a CSS class name
|
3136
|
-
* to
|
3167
|
+
* to each cell that has the [`wordWrap`](#wordWrap) option set to `false`.
|
3137
3168
|
*
|
3138
3169
|
* Read more:
|
3139
3170
|
* - [`wordWrap`](#wordWrap)
|
@@ -3155,7 +3186,7 @@ export default (function () {
|
|
3155
3186
|
* @example
|
3156
3187
|
* ```js
|
3157
3188
|
* // add an `is-noWrapCell` CSS class name
|
3158
|
-
* // to
|
3189
|
+
* // to each cell that doesn't wrap content
|
3159
3190
|
* noWordWrapClassName: 'is-noWrapCell',
|
3160
3191
|
* ```
|
3161
3192
|
*/
|
@@ -3163,7 +3194,8 @@ export default (function () {
|
|
3163
3194
|
|
3164
3195
|
/**
|
3165
3196
|
* The `numericFormat` option configures the number format and the currency format
|
3166
|
-
* of [`numeric`](@/guides/cell-types/numeric-cell-type.md) cells` displayed output
|
3197
|
+
* of [`numeric`](@/guides/cell-types/numeric-cell-type.md) cells` displayed output
|
3198
|
+
* in the numeric cell renderer.
|
3167
3199
|
*
|
3168
3200
|
* You can set the `numericFormat` option to an object with the following properties:
|
3169
3201
|
*
|
@@ -3172,10 +3204,7 @@ export default (function () {
|
|
3172
3204
|
* | `pattern` | All [`numbro.js` number formats](https://numbrojs.com/format.html#numbers) | Number format |
|
3173
3205
|
* | `culture` | All [`numbro.js` currency formats](https://numbrojs.com/format.html#currency) | Currency format |
|
3174
3206
|
*
|
3175
|
-
* The `numericFormat` option as no effect on
|
3176
|
-
* To enter numeric data into Handsontable, use:
|
3177
|
-
* - Either floats (separated by a dot, or a comma)
|
3178
|
-
* - Or integers
|
3207
|
+
* The `numericFormat` option as no effect on the numeric cell editor.
|
3179
3208
|
*
|
3180
3209
|
* In the source data, numeric data is stored as JavaScript numbers.
|
3181
3210
|
*
|
@@ -3193,7 +3222,7 @@ export default (function () {
|
|
3193
3222
|
* ```js
|
3194
3223
|
* columns: [
|
3195
3224
|
* {
|
3196
|
-
* // set the `type` of
|
3225
|
+
* // set the `type` of each cell in this column to `numeric`
|
3197
3226
|
* type: 'numeric',
|
3198
3227
|
* // set the `numericFormat` option for every `numeric` cell of this column
|
3199
3228
|
* numericFormat: {
|
@@ -3354,7 +3383,7 @@ export default (function () {
|
|
3354
3383
|
* @example
|
3355
3384
|
* ```js
|
3356
3385
|
* // add a `has-placeholder` CSS class name
|
3357
|
-
* // to
|
3386
|
+
* // to each cell that contains `placeholder` text
|
3358
3387
|
* placeholderCellClassName: 'has-placeholder',
|
3359
3388
|
* ```
|
3360
3389
|
*/
|
@@ -3421,6 +3450,8 @@ export default (function () {
|
|
3421
3450
|
* | `false` (default) | Set as editable |
|
3422
3451
|
* | `true` | - Set as read-only<br>- Add the [`readOnlyCellClassName`](#readOnlyCellClassName) CSS class name (by default: `htDimmed`) |
|
3423
3452
|
*
|
3453
|
+
* `readOnly` cells can't be changed by the [`populateFromArray()`](@/api/core.md#populatefromarray) method.
|
3454
|
+
*
|
3424
3455
|
* Read more:
|
3425
3456
|
* - [Configuration options: Cascading configuration](@/guides/getting-started/setting-options.md#cascading-configuration)
|
3426
3457
|
*
|
@@ -3530,7 +3561,7 @@ export default (function () {
|
|
3530
3561
|
*
|
3531
3562
|
* @example
|
3532
3563
|
* ```js
|
3533
|
-
* // use the `numeric` renderer for
|
3564
|
+
* // use the `numeric` renderer for each cell of the entire grid
|
3534
3565
|
* renderer: `'numeric'`,
|
3535
3566
|
*
|
3536
3567
|
* // add a custom renderer function
|
@@ -3542,11 +3573,11 @@ export default (function () {
|
|
3542
3573
|
* // apply the `renderer` option to individual columns
|
3543
3574
|
* columns: [
|
3544
3575
|
* {
|
3545
|
-
* // use the `autocomplete` renderer for
|
3576
|
+
* // use the `autocomplete` renderer for each cell of this column
|
3546
3577
|
* renderer: 'autocomplete'
|
3547
3578
|
* },
|
3548
3579
|
* {
|
3549
|
-
* // use the `myCustomRenderer` renderer for
|
3580
|
+
* // use the `myCustomRenderer` renderer for each cell of this column
|
3550
3581
|
* renderer: 'myCustomRenderer'
|
3551
3582
|
* }
|
3552
3583
|
* ]
|
@@ -3773,7 +3804,7 @@ export default (function () {
|
|
3773
3804
|
* ```js
|
3774
3805
|
* columns: [
|
3775
3806
|
* {
|
3776
|
-
* // set the `type` of
|
3807
|
+
* // set the `type` of each cell in this column to `select`
|
3777
3808
|
* type: 'select',
|
3778
3809
|
* // set the first option's value and label to `A`
|
3779
3810
|
* // set the second option's value and label to `B`
|
@@ -3781,7 +3812,7 @@ export default (function () {
|
|
3781
3812
|
* selectOptions: ['A', 'B', 'C'],
|
3782
3813
|
* },
|
3783
3814
|
* {
|
3784
|
-
* // set the `type` of
|
3815
|
+
* // set the `type` of each cell in this column to `select`
|
3785
3816
|
* type: 'select',
|
3786
3817
|
* selectOptions: {
|
3787
3818
|
* // set the first option's value to `value1` and label to `Label 1`
|
@@ -3793,7 +3824,7 @@ export default (function () {
|
|
3793
3824
|
* },
|
3794
3825
|
* },
|
3795
3826
|
* {
|
3796
|
-
* // set the `type` of
|
3827
|
+
* // set the `type` of each cell in this column to `select`
|
3797
3828
|
* type: 'select',
|
3798
3829
|
* // set `selectOption` to a function that returns available options as an object
|
3799
3830
|
* selectOptions(visualRow, visualColumn, prop) {
|
@@ -3902,7 +3933,7 @@ export default (function () {
|
|
3902
3933
|
* @example
|
3903
3934
|
* ```js
|
3904
3935
|
* columns: [{
|
3905
|
-
* // set the `type` of
|
3936
|
+
* // set the `type` of each cell in this column to `autocomplete`
|
3906
3937
|
* type: 'autocomplete',
|
3907
3938
|
* // set options available in every `autocomplete` cell of this column
|
3908
3939
|
* source: ['D', 'C', 'B', 'A'],
|
@@ -3939,7 +3970,7 @@ export default (function () {
|
|
3939
3970
|
* ```js
|
3940
3971
|
* // set `source` to an array
|
3941
3972
|
* columns: [{
|
3942
|
-
* // set the `type` of
|
3973
|
+
* // set the `type` of each cell in this column to `autocomplete`
|
3943
3974
|
* type: 'autocomplete',
|
3944
3975
|
* // set options available in every `autocomplete` cell of this column
|
3945
3976
|
* source: ['A', 'B', 'C', 'D']
|
@@ -3947,7 +3978,7 @@ export default (function () {
|
|
3947
3978
|
*
|
3948
3979
|
* // set `source` to a function
|
3949
3980
|
* columns: [{
|
3950
|
-
* // set the `type` of
|
3981
|
+
* // set the `type` of each cell in this column to `autocomplete`
|
3951
3982
|
* type: 'autocomplete',
|
3952
3983
|
* // for every `autocomplete` cell in this column, fetch data from an external source
|
3953
3984
|
* source(query, callback) {
|
@@ -4051,7 +4082,7 @@ export default (function () {
|
|
4051
4082
|
* ```js
|
4052
4083
|
* columns: [
|
4053
4084
|
* {
|
4054
|
-
* // set the `type` of
|
4085
|
+
* // set the `type` of each cell in this column to `autocomplete`
|
4055
4086
|
* type: 'autocomplete',
|
4056
4087
|
* // set options available in every `autocomplete` cell of this column
|
4057
4088
|
* source: ['A', 'B', 'C'],
|
@@ -4197,13 +4228,13 @@ export default (function () {
|
|
4197
4228
|
* columns: [
|
4198
4229
|
* {
|
4199
4230
|
* type: 'autocomplete',
|
4200
|
-
* // for
|
4231
|
+
* // for each cell of this column
|
4201
4232
|
* // make the `autocomplete` list's width the same as the edited cell's width
|
4202
4233
|
* trimDropdown: true,
|
4203
4234
|
* },
|
4204
4235
|
* {
|
4205
4236
|
* type: 'dropdown',
|
4206
|
-
* // for
|
4237
|
+
* // for each cell of this column
|
4207
4238
|
* // scale the `dropdown` list's width to the list's content
|
4208
4239
|
* trimDropdown: false,
|
4209
4240
|
* }
|
@@ -4218,11 +4249,11 @@ export default (function () {
|
|
4218
4249
|
*
|
4219
4250
|
* You can set the `trimRows` option to one of the following:
|
4220
4251
|
*
|
4221
|
-
* | Setting
|
4222
|
-
* |
|
4223
|
-
* | `false`
|
4224
|
-
* | `true`
|
4225
|
-
* | An array | - Enable the [`TrimRows`](@/api/trimRows.md) plugin<br>- Trim selected rows at initialization |
|
4252
|
+
* | Setting | Description |
|
4253
|
+
* | -------------------------------- | --------------------------------------------------------------------------------------------- |
|
4254
|
+
* | `false` | Disable the [`TrimRows`](@/api/trimRows.md) plugin |
|
4255
|
+
* | `true` | Enable the [`TrimRows`](@/api/trimRows.md) plugin |
|
4256
|
+
* | An array of physical row indexes | - Enable the [`TrimRows`](@/api/trimRows.md) plugin<br>- Trim selected rows at initialization |
|
4226
4257
|
*
|
4227
4258
|
* Read more:
|
4228
4259
|
* - [Plugins: `TrimRows`](@/api/trimRows.md)
|
@@ -4239,23 +4270,24 @@ export default (function () {
|
|
4239
4270
|
* trimRows: true,
|
4240
4271
|
*
|
4241
4272
|
* // enable the `TrimRows` plugin
|
4242
|
-
* // trim rows 5, 10, and 15
|
4273
|
+
* // at Handsontable's initialization, trim rows 5, 10, and 15
|
4243
4274
|
* trimRows: [5, 10, 15],
|
4244
4275
|
* ```
|
4245
4276
|
*/
|
4246
4277
|
trimRows: void 0,
|
4247
4278
|
|
4248
4279
|
/**
|
4249
|
-
* The `trimWhitespace` option configures automatic whitespace removal.
|
4280
|
+
* The `trimWhitespace` option configures automatic whitespace removal. This option
|
4281
|
+
* affects the cell renderer and the cell editor.
|
4250
4282
|
*
|
4251
4283
|
* You can set the `trimWhitespace` option to one of the following:
|
4252
4284
|
*
|
4253
4285
|
* | Setting | Description |
|
4254
4286
|
* | ---------------- | --------------------------------------------------------------- |
|
4255
|
-
* | `true` (default) | Remove whitespace at the beginning and at the end of
|
4287
|
+
* | `true` (default) | Remove whitespace at the beginning and at the end of each cell |
|
4256
4288
|
* | `false` | Don't remove whitespace |
|
4257
4289
|
*
|
4258
|
-
* @memberof Options#
|
4290
|
+
* @memberof Options#
|
4259
4291
|
* @type {boolean}
|
4260
4292
|
* @default true
|
4261
4293
|
* @category Core
|
@@ -4310,17 +4342,17 @@ export default (function () {
|
|
4310
4342
|
*
|
4311
4343
|
* @example
|
4312
4344
|
* ```js
|
4313
|
-
* //
|
4345
|
+
* // set the `numeric` cell type for each cell of the entire grid
|
4314
4346
|
* type: `'numeric'`,
|
4315
4347
|
*
|
4316
4348
|
* // apply the `type` option to individual columns
|
4317
4349
|
* columns: [
|
4318
4350
|
* {
|
4319
|
-
* //
|
4351
|
+
* // set the `autocomplete` cell type for each cell of this column
|
4320
4352
|
* type: 'autocomplete'
|
4321
4353
|
* },
|
4322
4354
|
* {
|
4323
|
-
* //
|
4355
|
+
* // set the `myCustomCellType` cell type for each cell of this column
|
4324
4356
|
* type: 'myCustomCellType'
|
4325
4357
|
* }
|
4326
4358
|
* ]
|
@@ -4353,13 +4385,13 @@ export default (function () {
|
|
4353
4385
|
* ```js
|
4354
4386
|
* columns: [
|
4355
4387
|
* {
|
4356
|
-
* // set the `type` of
|
4388
|
+
* // set the `type` of each cell in this column to `checkbox`
|
4357
4389
|
* // when unchecked, the cell's value is `false`
|
4358
4390
|
* // when checked, the cell's value is `true`
|
4359
4391
|
* type: 'checkbox',
|
4360
4392
|
* },
|
4361
4393
|
* {
|
4362
|
-
* // set the `type` of
|
4394
|
+
* // set the `type` of each cell in this column to `checkbox`
|
4363
4395
|
* // when unchecked, the cell's value is `'No'`
|
4364
4396
|
* // when checked, the cell's value is `'Yes'`
|
4365
4397
|
* type: 'checkbox',
|
@@ -4540,13 +4572,13 @@ export default (function () {
|
|
4540
4572
|
* {
|
4541
4573
|
* type: 'autocomplete',
|
4542
4574
|
* // set the `autocomplete` list's height to 15 options
|
4543
|
-
* // for
|
4575
|
+
* // for each cell of this column
|
4544
4576
|
* visibleRows: 15,
|
4545
4577
|
* },
|
4546
4578
|
* {
|
4547
4579
|
* type: 'dropdown',
|
4548
4580
|
* // set the `dropdown` list's height to 5 options
|
4549
|
-
* // for
|
4581
|
+
* // for each cell of this column
|
4550
4582
|
* visibleRows: 5,
|
4551
4583
|
* }
|
4552
4584
|
* ],
|
package/dist/handsontable.css
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: 12.1.
|
29
|
-
* Release date:
|
28
|
+
* Version: 12.1.3
|
29
|
+
* Release date: 22/09/2022 (built at 22/09/2022 09:54:40)
|
30
30
|
*/
|
31
31
|
/**
|
32
32
|
* Fix for bootstrap styles
|
@@ -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: 12.1.
|
29
|
-
* Release date:
|
28
|
+
* Version: 12.1.3
|
29
|
+
* Release date: 22/09/2022 (built at 22/09/2022 09:54:40)
|
30
30
|
*/
|
31
31
|
/**
|
32
32
|
* Fix for bootstrap styles
|