handsontable 0.0.0-next-407bbbc-20241107 → 0.0.0-next-6129043-20241108
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of handsontable might be problematic. Click here for more details.
- package/3rdparty/walkontable/src/calculator/index.js +1 -2
- package/3rdparty/walkontable/src/calculator/index.mjs +2 -2
- package/3rdparty/walkontable/src/calculator/viewportRows.js +3 -3
- package/3rdparty/walkontable/src/calculator/viewportRows.mjs +3 -3
- package/3rdparty/walkontable/src/core/_base.js +3 -0
- package/3rdparty/walkontable/src/core/_base.mjs +3 -0
- package/3rdparty/walkontable/src/core/clone.js +1 -0
- package/3rdparty/walkontable/src/core/clone.mjs +1 -0
- package/3rdparty/walkontable/src/core/core.js +2 -0
- package/3rdparty/walkontable/src/core/core.mjs +2 -0
- package/3rdparty/walkontable/src/facade/core.js +3 -0
- package/3rdparty/walkontable/src/facade/core.mjs +3 -0
- package/3rdparty/walkontable/src/index.js +0 -1
- package/3rdparty/walkontable/src/index.mjs +2 -2
- package/3rdparty/walkontable/src/overlay/_base.js +3 -1
- package/3rdparty/walkontable/src/overlay/_base.mjs +3 -1
- package/3rdparty/walkontable/src/overlay/bottom.js +2 -2
- package/3rdparty/walkontable/src/overlay/bottom.mjs +2 -2
- package/3rdparty/walkontable/src/overlay/top.js +1 -1
- package/3rdparty/walkontable/src/overlay/top.mjs +1 -1
- package/3rdparty/walkontable/src/renderer/index.js +4 -2
- package/3rdparty/walkontable/src/renderer/index.mjs +4 -2
- package/3rdparty/walkontable/src/renderer/table.js +12 -3
- package/3rdparty/walkontable/src/renderer/table.mjs +12 -3
- package/3rdparty/walkontable/src/settings.js +0 -2
- package/3rdparty/walkontable/src/settings.mjs +0 -2
- package/3rdparty/walkontable/src/table.js +15 -9
- package/3rdparty/walkontable/src/table.mjs +15 -9
- package/3rdparty/walkontable/src/types.js +1 -0
- package/3rdparty/walkontable/src/types.mjs +1 -0
- package/3rdparty/walkontable/src/utils/column.js +1 -1
- package/3rdparty/walkontable/src/utils/column.mjs +1 -1
- package/3rdparty/walkontable/src/utils/stylesHandler.js +271 -0
- package/3rdparty/walkontable/src/utils/stylesHandler.mjs +267 -0
- package/3rdparty/walkontable/src/viewport.js +1 -0
- package/3rdparty/walkontable/src/viewport.mjs +1 -0
- package/base.js +2 -2
- package/base.mjs +2 -2
- package/core.d.ts +2 -0
- package/core.js +46 -0
- package/core.mjs +46 -0
- package/dataMap/metaManager/metaSchema.js +23 -3
- package/dataMap/metaManager/metaSchema.mjs +23 -3
- package/dist/handsontable.css +17 -9
- package/dist/handsontable.full.css +249 -240
- package/dist/handsontable.full.js +4125 -3841
- package/dist/handsontable.full.min.css +11 -9
- package/dist/handsontable.full.min.js +26 -26
- package/dist/handsontable.js +3832 -3542
- package/dist/handsontable.min.css +5 -4
- package/dist/handsontable.min.js +24 -24
- package/editors/autocompleteEditor/autocompleteEditor.js +1 -1
- package/editors/autocompleteEditor/autocompleteEditor.mjs +1 -1
- package/editors/baseEditor/baseEditor.js +1 -1
- package/editors/baseEditor/baseEditor.mjs +1 -1
- package/editors/dateEditor/dateEditor.js +2 -0
- package/editors/dateEditor/dateEditor.mjs +2 -0
- package/editors/handsontableEditor/handsontableEditor.js +2 -1
- package/editors/handsontableEditor/handsontableEditor.mjs +2 -1
- package/editors/selectEditor/selectEditor.js +20 -9
- package/editors/selectEditor/selectEditor.mjs +20 -9
- package/editors/textEditor/textEditor.js +4 -11
- package/editors/textEditor/textEditor.mjs +4 -11
- package/helpers/dom/element.js +31 -0
- package/helpers/dom/element.mjs +30 -0
- package/helpers/mixed.js +2 -2
- package/helpers/mixed.mjs +2 -2
- package/helpers/themes.js +17 -0
- package/helpers/themes.mjs +13 -0
- package/package.json +10 -3
- package/plugins/comments/commentEditor.js +9 -0
- package/plugins/comments/commentEditor.mjs +9 -0
- package/plugins/comments/comments.js +8 -0
- package/plugins/comments/comments.mjs +8 -0
- package/plugins/contextMenu/menu/menu.js +3 -4
- package/plugins/contextMenu/menu/menu.mjs +3 -4
- package/plugins/manualRowMove/manualRowMove.js +1 -1
- package/plugins/manualRowMove/manualRowMove.mjs +1 -1
- package/plugins/manualRowResize/manualRowResize.js +1 -2
- package/plugins/manualRowResize/manualRowResize.mjs +2 -3
- package/plugins/mergeCells/mergeCells.js +1 -1
- package/plugins/mergeCells/mergeCells.mjs +1 -1
- package/plugins/nestedRows/ui/headers.js +7 -1
- package/plugins/nestedRows/ui/headers.mjs +7 -1
- package/plugins/stretchColumns/calculator.js +2 -1
- package/plugins/stretchColumns/calculator.mjs +3 -2
- package/renderers/checkboxRenderer/checkboxRenderer.js +6 -1
- package/renderers/checkboxRenderer/checkboxRenderer.mjs +6 -1
- package/settings.d.ts +1 -0
- package/styles/handsontable.css +2053 -0
- package/styles/handsontable.min.css +30 -0
- package/styles/ht-theme-horizon.css +571 -0
- package/styles/ht-theme-horizon.min.css +30 -0
- package/styles/ht-theme-main.css +575 -0
- package/styles/ht-theme-main.min.css +30 -0
- package/tableView.js +46 -0
- package/tableView.mjs +47 -1
- package/utils/autoResize.js +4 -1
- package/utils/autoResize.mjs +4 -1
- package/utils/ghostTable.js +5 -3
- package/utils/ghostTable.mjs +5 -3
package/core.mjs
CHANGED
@@ -39,6 +39,7 @@ import { installFocusCatcher, createViewportScroller } from "./core/index.mjs";
|
|
39
39
|
import { createUniqueMap } from "./utils/dataStructures/uniqueMap.mjs";
|
40
40
|
import { createShortcutManager } from "./shortcuts/index.mjs";
|
41
41
|
import { registerAllShortcutContexts } from "./shortcutContexts/index.mjs";
|
42
|
+
import { getThemeClassName } from "./helpers/themes.mjs";
|
42
43
|
let activeGuid = null;
|
43
44
|
|
44
45
|
/**
|
@@ -225,6 +226,7 @@ export default function Core(rootElement, userSettings) {
|
|
225
226
|
rootElement.insertBefore(this.container, rootElement.firstChild);
|
226
227
|
if (isRootInstance(this)) {
|
227
228
|
_injectProductInfo(userSettings.licenseKey, rootElement);
|
229
|
+
addClass(rootElement, 'ht-wrapper');
|
228
230
|
}
|
229
231
|
this.guid = `ht_${randomString()}`; // this is the namespace for global events
|
230
232
|
|
@@ -1025,6 +1027,13 @@ export default function Core(rootElement, userSettings) {
|
|
1025
1027
|
}
|
1026
1028
|
this.updateSettings(tableMeta, true);
|
1027
1029
|
this.view = new TableView(this);
|
1030
|
+
const themeName = tableMeta.themeName || getThemeClassName(instance.rootElement);
|
1031
|
+
|
1032
|
+
// Use the theme defined as a root element class or in the settings (in that order).
|
1033
|
+
instance.useTheme(themeName);
|
1034
|
+
|
1035
|
+
// Add the theme class name to the license info element.
|
1036
|
+
instance.view.addClassNameToLicenseElement(instance.getCurrentThemeName());
|
1028
1037
|
editorManager = EditorManager.getInstance(instance, tableMeta, selection);
|
1029
1038
|
viewportScroller = createViewportScroller(instance);
|
1030
1039
|
focusManager = new FocusManager(instance);
|
@@ -2378,6 +2387,19 @@ export default function Core(rootElement, userSettings) {
|
|
2378
2387
|
if (instance.view) {
|
2379
2388
|
instance.view._wt.wtViewport.resetHasOversizedColumnHeadersMarked();
|
2380
2389
|
instance.view._wt.exportSettingsAsClassNames();
|
2390
|
+
const currentThemeName = instance.getCurrentThemeName();
|
2391
|
+
const themeNameOptionExists = hasOwnProperty(settings, 'themeName');
|
2392
|
+
if (currentThemeName && themeNameOptionExists) {
|
2393
|
+
instance.view.getStylesHandler().removeClassNames();
|
2394
|
+
instance.view.removeClassNameFromLicenseElement(currentThemeName);
|
2395
|
+
}
|
2396
|
+
const themeName = themeNameOptionExists && settings.themeName || getThemeClassName(instance.rootElement);
|
2397
|
+
|
2398
|
+
// Use the theme defined as a root element class or in the settings (in that order).
|
2399
|
+
instance.useTheme(themeName);
|
2400
|
+
|
2401
|
+
// Add the theme class name to the license info element.
|
2402
|
+
instance.view.addClassNameToLicenseElement(instance.getCurrentThemeName());
|
2381
2403
|
}
|
2382
2404
|
instance.runHooks('afterUpdateSettings', settings);
|
2383
2405
|
}
|
@@ -4581,6 +4603,30 @@ export default function Core(rootElement, userSettings) {
|
|
4581
4603
|
};
|
4582
4604
|
this.timeouts = [];
|
4583
4605
|
|
4606
|
+
/**
|
4607
|
+
* Use the theme specified by the provided name.
|
4608
|
+
*
|
4609
|
+
* @memberof Core#
|
4610
|
+
* @function useTheme
|
4611
|
+
* @since 15.0.0
|
4612
|
+
* @param {string|boolean|undefined} themeName The name of the theme to use.
|
4613
|
+
*/
|
4614
|
+
this.useTheme = themeName => {
|
4615
|
+
this.view.getStylesHandler().useTheme(themeName);
|
4616
|
+
};
|
4617
|
+
|
4618
|
+
/**
|
4619
|
+
* Gets the name of the currently used theme.
|
4620
|
+
*
|
4621
|
+
* @memberof Core#
|
4622
|
+
* @function getCurrentThemeName
|
4623
|
+
* @since 15.0.0
|
4624
|
+
* @returns {string|undefined} The name of the currently used theme.
|
4625
|
+
*/
|
4626
|
+
this.getCurrentThemeName = () => {
|
4627
|
+
return this.view.getStylesHandler().getThemeName();
|
4628
|
+
};
|
4629
|
+
|
4584
4630
|
/**
|
4585
4631
|
* Sets timeout. Purpose of this method is to clear all known timeouts when `destroy` method is called.
|
4586
4632
|
*
|
@@ -3842,8 +3842,8 @@ var _default = () => {
|
|
3842
3842
|
/**
|
3843
3843
|
* The `rowHeights` option sets rows' heights, in pixels.
|
3844
3844
|
*
|
3845
|
-
* In the rendering process, the default row height is 23 px (22 px + 1 px of the row's bottom border).
|
3846
|
-
* You can change it to equal or greater than
|
3845
|
+
* In the rendering process, the default row height is 23 px (in the classic theme: 22 px + 1 px of the row's bottom border) or what's defined as `--ht-row-height` in the used theme.
|
3846
|
+
* You can change it to equal or greater than the defautl value, by setting the `rowHeights` option to one of the following:
|
3847
3847
|
*
|
3848
3848
|
* | Setting | Description | Example |
|
3849
3849
|
* | ----------- | --------------------------------------------------------------------------------------------------- | ------------------------------------------------------------ |
|
@@ -3875,7 +3875,7 @@ var _default = () => {
|
|
3875
3875
|
* // set the first (by visual index) row's height to 100
|
3876
3876
|
* // set the second (by visual index) row's height to 120
|
3877
3877
|
* // set the third (by visual index) row's height to `undefined`
|
3878
|
-
* // set any other row's height to the default
|
3878
|
+
* // set any other row's height to the default height value
|
3879
3879
|
* rowHeights: [100, 120, undefined],
|
3880
3880
|
*
|
3881
3881
|
* // set each row's height individually, using a function
|
@@ -4313,6 +4313,26 @@ var _default = () => {
|
|
4313
4313
|
* ```
|
4314
4314
|
*/
|
4315
4315
|
tableClassName: undefined,
|
4316
|
+
/**
|
4317
|
+
* The `themeName` option allows enabling a theme by that name.
|
4318
|
+
*
|
4319
|
+
* If no `themeName` is provided, the table will use the classic theme (if the correct CSS files are imported).
|
4320
|
+
*
|
4321
|
+
* Read more:
|
4322
|
+
* - [Themes](@/guides/styling/themes/themes.md)
|
4323
|
+
*
|
4324
|
+
* @memberof Options#
|
4325
|
+
* @type {string|boolean|undefined}
|
4326
|
+
* @default undefined
|
4327
|
+
* @category Core
|
4328
|
+
* @since 15.0.0
|
4329
|
+
*
|
4330
|
+
* @example
|
4331
|
+
* ```js
|
4332
|
+
* themeName: 'ht-theme-name',
|
4333
|
+
* ```
|
4334
|
+
*/
|
4335
|
+
themeName: undefined,
|
4316
4336
|
/**
|
4317
4337
|
* The `tabMoves` option configures the action of the <kbd>**Tab**</kbd> key.
|
4318
4338
|
*
|
@@ -3839,8 +3839,8 @@ export default () => {
|
|
3839
3839
|
/**
|
3840
3840
|
* The `rowHeights` option sets rows' heights, in pixels.
|
3841
3841
|
*
|
3842
|
-
* In the rendering process, the default row height is 23 px (22 px + 1 px of the row's bottom border).
|
3843
|
-
* You can change it to equal or greater than
|
3842
|
+
* In the rendering process, the default row height is 23 px (in the classic theme: 22 px + 1 px of the row's bottom border) or what's defined as `--ht-row-height` in the used theme.
|
3843
|
+
* You can change it to equal or greater than the defautl value, by setting the `rowHeights` option to one of the following:
|
3844
3844
|
*
|
3845
3845
|
* | Setting | Description | Example |
|
3846
3846
|
* | ----------- | --------------------------------------------------------------------------------------------------- | ------------------------------------------------------------ |
|
@@ -3872,7 +3872,7 @@ export default () => {
|
|
3872
3872
|
* // set the first (by visual index) row's height to 100
|
3873
3873
|
* // set the second (by visual index) row's height to 120
|
3874
3874
|
* // set the third (by visual index) row's height to `undefined`
|
3875
|
-
* // set any other row's height to the default
|
3875
|
+
* // set any other row's height to the default height value
|
3876
3876
|
* rowHeights: [100, 120, undefined],
|
3877
3877
|
*
|
3878
3878
|
* // set each row's height individually, using a function
|
@@ -4310,6 +4310,26 @@ export default () => {
|
|
4310
4310
|
* ```
|
4311
4311
|
*/
|
4312
4312
|
tableClassName: undefined,
|
4313
|
+
/**
|
4314
|
+
* The `themeName` option allows enabling a theme by that name.
|
4315
|
+
*
|
4316
|
+
* If no `themeName` is provided, the table will use the classic theme (if the correct CSS files are imported).
|
4317
|
+
*
|
4318
|
+
* Read more:
|
4319
|
+
* - [Themes](@/guides/styling/themes/themes.md)
|
4320
|
+
*
|
4321
|
+
* @memberof Options#
|
4322
|
+
* @type {string|boolean|undefined}
|
4323
|
+
* @default undefined
|
4324
|
+
* @category Core
|
4325
|
+
* @since 15.0.0
|
4326
|
+
*
|
4327
|
+
* @example
|
4328
|
+
* ```js
|
4329
|
+
* themeName: 'ht-theme-name',
|
4330
|
+
* ```
|
4331
|
+
*/
|
4332
|
+
themeName: undefined,
|
4313
4333
|
/**
|
4314
4334
|
* The `tabMoves` option configures the action of the <kbd>**Tab**</kbd> key.
|
4315
4335
|
*
|
package/dist/handsontable.css
CHANGED
@@ -25,13 +25,13 @@
|
|
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: 17/10/2024 (built at
|
28
|
+
* Version: 0.0.0-next-6129043-20241108
|
29
|
+
* Release date: 17/10/2024 (built at 08/11/2024 09:48:45)
|
30
30
|
*/
|
31
31
|
/**
|
32
32
|
* Fix for bootstrap styles
|
33
33
|
*/
|
34
|
-
.handsontable .table th, .handsontable .table td {
|
34
|
+
.handsontable .table th, .handsontable .table td {
|
35
35
|
border-top: none;
|
36
36
|
}
|
37
37
|
|
@@ -589,6 +589,7 @@ innerBorderBottom - Property controlled by bottom overlay
|
|
589
589
|
color: #000;
|
590
590
|
border-radius: 0;
|
591
591
|
background-color: #FFF;
|
592
|
+
box-sizing: border-box !important;
|
592
593
|
/*overwrite styles potentionally made by a framework*/
|
593
594
|
}
|
594
595
|
|
@@ -603,16 +604,25 @@ innerBorderBottom - Property controlled by bottom overlay
|
|
603
604
|
}
|
604
605
|
|
605
606
|
.htSelectEditor {
|
606
|
-
-webkit-appearance: menulist-button !important;
|
607
607
|
position: absolute;
|
608
|
-
|
609
|
-
|
608
|
+
|
609
|
+
select {
|
610
|
+
-webkit-appearance: menulist-button !important;
|
611
|
+
width: 100%;
|
612
|
+
height: 100%;
|
613
|
+
border: 2px solid #4b89ff;
|
614
|
+
box-sizing: border-box !important;
|
615
|
+
}
|
610
616
|
}
|
611
617
|
|
612
|
-
.htSelectEditor:focus {
|
618
|
+
.htSelectEditor select:focus {
|
613
619
|
outline: none;
|
614
620
|
}
|
615
621
|
|
622
|
+
.htSelectEditor .htAutocompleteArrow {
|
623
|
+
display: none;
|
624
|
+
}
|
625
|
+
|
616
626
|
/*
|
617
627
|
TextRenderer readOnly cell
|
618
628
|
*/
|
@@ -2056,5 +2066,3 @@ textarea.HandsontableCopyPaste {
|
|
2056
2066
|
left: 0;
|
2057
2067
|
right: unset;
|
2058
2068
|
}
|
2059
|
-
|
2060
|
-
/*# sourceMappingURL=handsontable.css.map*/
|