handsontable 0.0.0-next-4e882ff-20250117 → 0.0.0-next-e2116ad-20250117
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/base.js +2 -2
- package/base.mjs +2 -2
- package/dist/handsontable.css +2 -2
- package/dist/handsontable.full.css +2 -2
- package/dist/handsontable.full.js +39 -22
- package/dist/handsontable.full.min.css +2 -2
- package/dist/handsontable.full.min.js +6 -6
- package/dist/handsontable.js +39 -22
- package/dist/handsontable.min.css +2 -2
- package/dist/handsontable.min.js +6 -6
- package/helpers/mixed.js +1 -1
- package/helpers/mixed.mjs +1 -1
- package/package.json +1 -1
- package/plugins/filters/filters.js +26 -16
- package/plugins/filters/filters.mjs +26 -16
- package/renderers/checkboxRenderer/checkboxRenderer.js +8 -1
- package/renderers/checkboxRenderer/checkboxRenderer.mjs +8 -1
- package/styles/handsontable.css +9 -6
- package/styles/handsontable.min.css +3 -3
- package/styles/ht-theme-horizon.css +2 -2
- package/styles/ht-theme-horizon.min.css +2 -2
- package/styles/ht-theme-main.css +2 -2
- package/styles/ht-theme-main.min.css +2 -2
package/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-
|
137
|
+
const hotVersion = "0.0.0-next-e2116ad-20250117";
|
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-
|
127
|
+
const hotVersion = "0.0.0-next-e2116ad-20250117";
|
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-
|
13
|
+
"version": "0.0.0-next-e2116ad-20250117",
|
14
14
|
"main": "index",
|
15
15
|
"module": "index.mjs",
|
16
16
|
"jsnext:main": "index.mjs",
|
@@ -101,8 +101,10 @@ class Filters extends _base.BasePlugin {
|
|
101
101
|
*/
|
102
102
|
|
103
103
|
constructor(hotInstance) {
|
104
|
-
|
104
|
+
var _this;
|
105
105
|
// One listener for the enable/disable functionality
|
106
|
+
super(hotInstance);
|
107
|
+
_this = this;
|
106
108
|
/**
|
107
109
|
* `afterChange` listener.
|
108
110
|
*
|
@@ -150,7 +152,12 @@ class Filters extends _base.BasePlugin {
|
|
150
152
|
* @type {WeakSet<Menu>}
|
151
153
|
*/
|
152
154
|
_classPrivateFieldInitSpec(this, _dropdownMenuTraces, new WeakSet());
|
153
|
-
this.hot.addHook('afterGetColHeader',
|
155
|
+
this.hot.addHook('afterGetColHeader', function () {
|
156
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
157
|
+
args[_key] = arguments[_key];
|
158
|
+
}
|
159
|
+
return _assertClassBrand(_Filters_brand, _this, _onAfterGetColHeader).call(_this, ...args);
|
160
|
+
});
|
154
161
|
}
|
155
162
|
|
156
163
|
/**
|
@@ -168,7 +175,7 @@ class Filters extends _base.BasePlugin {
|
|
168
175
|
* Enables the plugin functionality for this Handsontable instance.
|
169
176
|
*/
|
170
177
|
enablePlugin() {
|
171
|
-
var
|
178
|
+
var _this2 = this;
|
172
179
|
if (this.enabled) {
|
173
180
|
return;
|
174
181
|
}
|
@@ -231,10 +238,10 @@ class Filters extends _base.BasePlugin {
|
|
231
238
|
}
|
232
239
|
this.components.forEach(component => component.show());
|
233
240
|
this.addHook('afterDropdownMenuDefaultOptions', function () {
|
234
|
-
for (var
|
235
|
-
args[
|
241
|
+
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
242
|
+
args[_key2] = arguments[_key2];
|
236
243
|
}
|
237
|
-
return _assertClassBrand(_Filters_brand,
|
244
|
+
return _assertClassBrand(_Filters_brand, _this2, _onAfterDropdownMenuDefaultOptions).call(_this2, ...args);
|
238
245
|
});
|
239
246
|
this.addHook('beforeDropdownMenuShow', () => _assertClassBrand(_Filters_brand, this, _onBeforeDropdownMenuShow).call(this));
|
240
247
|
this.addHook('afterDropdownMenuShow', () => _assertClassBrand(_Filters_brand, this, _onAfterDropdownMenuShow).call(this));
|
@@ -689,6 +696,9 @@ class Filters extends _base.BasePlugin {
|
|
689
696
|
*
|
690
697
|
* @param {number} col Visual column index.
|
691
698
|
* @param {HTMLTableCellElement} TH Header's TH element.
|
699
|
+
* @param {number} headerLevel The index of header level counting from the top (positive
|
700
|
+
* values counting from 0 to N).
|
701
|
+
*
|
692
702
|
*/
|
693
703
|
|
694
704
|
/**
|
@@ -724,8 +734,8 @@ class Filters extends _base.BasePlugin {
|
|
724
734
|
return indexes;
|
725
735
|
}
|
726
736
|
const menu = this.dropdownMenuPlugin.menu;
|
727
|
-
for (var
|
728
|
-
components[
|
737
|
+
for (var _len3 = arguments.length, components = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
738
|
+
components[_key3] = arguments[_key3];
|
729
739
|
}
|
730
740
|
(0, _array.arrayEach)(components, component => {
|
731
741
|
(0, _array.arrayEach)(menu.menuItems, (item, index) => {
|
@@ -752,8 +762,8 @@ class Filters extends _base.BasePlugin {
|
|
752
762
|
const menu = this.dropdownMenuPlugin.menu;
|
753
763
|
const hotMenu = menu.hotMenu;
|
754
764
|
const hiddenRows = hotMenu.getPlugin('hiddenRows');
|
755
|
-
for (var
|
756
|
-
components[
|
765
|
+
for (var _len4 = arguments.length, components = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {
|
766
|
+
components[_key4 - 1] = arguments[_key4];
|
757
767
|
}
|
758
768
|
const indexes = this.getIndexesOfComponents(...components);
|
759
769
|
if (visible) {
|
@@ -771,8 +781,8 @@ class Filters extends _base.BasePlugin {
|
|
771
781
|
* @param {...BaseComponent} components List of components.
|
772
782
|
*/
|
773
783
|
hideComponents() {
|
774
|
-
for (var
|
775
|
-
components[
|
784
|
+
for (var _len5 = arguments.length, components = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
|
785
|
+
components[_key5] = arguments[_key5];
|
776
786
|
}
|
777
787
|
this.changeComponentsVisibility(false, ...components);
|
778
788
|
}
|
@@ -784,8 +794,8 @@ class Filters extends _base.BasePlugin {
|
|
784
794
|
* @param {...BaseComponent} components List of components.
|
785
795
|
*/
|
786
796
|
showComponents() {
|
787
|
-
for (var
|
788
|
-
components[
|
797
|
+
for (var _len6 = arguments.length, components = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
|
798
|
+
components[_key6] = arguments[_key6];
|
789
799
|
}
|
790
800
|
this.changeComponentsVisibility(true, ...components);
|
791
801
|
}
|
@@ -913,9 +923,9 @@ function _onComponentChange(component, command) {
|
|
913
923
|
function _onSelectUIClosed() {
|
914
924
|
this.setListeningDropdownMenu();
|
915
925
|
}
|
916
|
-
function _onAfterGetColHeader(col, TH) {
|
926
|
+
function _onAfterGetColHeader(col, TH, headerLevel) {
|
917
927
|
const physicalColumn = this.hot.toPhysicalColumn(col);
|
918
|
-
if (this.enabled && this.conditionCollection.hasConditions(physicalColumn)) {
|
928
|
+
if (this.enabled && this.conditionCollection.hasConditions(physicalColumn) && headerLevel === this.hot.view.getColumnHeadersCount() - 1) {
|
919
929
|
(0, _element.addClass)(TH, 'htFiltersActive');
|
920
930
|
} else {
|
921
931
|
(0, _element.removeClass)(TH, 'htFiltersActive');
|
@@ -95,8 +95,10 @@ export class Filters extends BasePlugin {
|
|
95
95
|
*/
|
96
96
|
|
97
97
|
constructor(hotInstance) {
|
98
|
-
|
98
|
+
var _this;
|
99
99
|
// One listener for the enable/disable functionality
|
100
|
+
super(hotInstance);
|
101
|
+
_this = this;
|
100
102
|
/**
|
101
103
|
* `afterChange` listener.
|
102
104
|
*
|
@@ -144,7 +146,12 @@ export class Filters extends BasePlugin {
|
|
144
146
|
* @type {WeakSet<Menu>}
|
145
147
|
*/
|
146
148
|
_classPrivateFieldInitSpec(this, _dropdownMenuTraces, new WeakSet());
|
147
|
-
this.hot.addHook('afterGetColHeader',
|
149
|
+
this.hot.addHook('afterGetColHeader', function () {
|
150
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
151
|
+
args[_key] = arguments[_key];
|
152
|
+
}
|
153
|
+
return _assertClassBrand(_Filters_brand, _this, _onAfterGetColHeader).call(_this, ...args);
|
154
|
+
});
|
148
155
|
}
|
149
156
|
|
150
157
|
/**
|
@@ -162,7 +169,7 @@ export class Filters extends BasePlugin {
|
|
162
169
|
* Enables the plugin functionality for this Handsontable instance.
|
163
170
|
*/
|
164
171
|
enablePlugin() {
|
165
|
-
var
|
172
|
+
var _this2 = this;
|
166
173
|
if (this.enabled) {
|
167
174
|
return;
|
168
175
|
}
|
@@ -225,10 +232,10 @@ export class Filters extends BasePlugin {
|
|
225
232
|
}
|
226
233
|
this.components.forEach(component => component.show());
|
227
234
|
this.addHook('afterDropdownMenuDefaultOptions', function () {
|
228
|
-
for (var
|
229
|
-
args[
|
235
|
+
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
236
|
+
args[_key2] = arguments[_key2];
|
230
237
|
}
|
231
|
-
return _assertClassBrand(_Filters_brand,
|
238
|
+
return _assertClassBrand(_Filters_brand, _this2, _onAfterDropdownMenuDefaultOptions).call(_this2, ...args);
|
232
239
|
});
|
233
240
|
this.addHook('beforeDropdownMenuShow', () => _assertClassBrand(_Filters_brand, this, _onBeforeDropdownMenuShow).call(this));
|
234
241
|
this.addHook('afterDropdownMenuShow', () => _assertClassBrand(_Filters_brand, this, _onAfterDropdownMenuShow).call(this));
|
@@ -683,6 +690,9 @@ export class Filters extends BasePlugin {
|
|
683
690
|
*
|
684
691
|
* @param {number} col Visual column index.
|
685
692
|
* @param {HTMLTableCellElement} TH Header's TH element.
|
693
|
+
* @param {number} headerLevel The index of header level counting from the top (positive
|
694
|
+
* values counting from 0 to N).
|
695
|
+
*
|
686
696
|
*/
|
687
697
|
|
688
698
|
/**
|
@@ -718,8 +728,8 @@ export class Filters extends BasePlugin {
|
|
718
728
|
return indexes;
|
719
729
|
}
|
720
730
|
const menu = this.dropdownMenuPlugin.menu;
|
721
|
-
for (var
|
722
|
-
components[
|
731
|
+
for (var _len3 = arguments.length, components = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
732
|
+
components[_key3] = arguments[_key3];
|
723
733
|
}
|
724
734
|
arrayEach(components, component => {
|
725
735
|
arrayEach(menu.menuItems, (item, index) => {
|
@@ -746,8 +756,8 @@ export class Filters extends BasePlugin {
|
|
746
756
|
const menu = this.dropdownMenuPlugin.menu;
|
747
757
|
const hotMenu = menu.hotMenu;
|
748
758
|
const hiddenRows = hotMenu.getPlugin('hiddenRows');
|
749
|
-
for (var
|
750
|
-
components[
|
759
|
+
for (var _len4 = arguments.length, components = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {
|
760
|
+
components[_key4 - 1] = arguments[_key4];
|
751
761
|
}
|
752
762
|
const indexes = this.getIndexesOfComponents(...components);
|
753
763
|
if (visible) {
|
@@ -765,8 +775,8 @@ export class Filters extends BasePlugin {
|
|
765
775
|
* @param {...BaseComponent} components List of components.
|
766
776
|
*/
|
767
777
|
hideComponents() {
|
768
|
-
for (var
|
769
|
-
components[
|
778
|
+
for (var _len5 = arguments.length, components = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
|
779
|
+
components[_key5] = arguments[_key5];
|
770
780
|
}
|
771
781
|
this.changeComponentsVisibility(false, ...components);
|
772
782
|
}
|
@@ -778,8 +788,8 @@ export class Filters extends BasePlugin {
|
|
778
788
|
* @param {...BaseComponent} components List of components.
|
779
789
|
*/
|
780
790
|
showComponents() {
|
781
|
-
for (var
|
782
|
-
components[
|
791
|
+
for (var _len6 = arguments.length, components = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
|
792
|
+
components[_key6] = arguments[_key6];
|
783
793
|
}
|
784
794
|
this.changeComponentsVisibility(true, ...components);
|
785
795
|
}
|
@@ -906,9 +916,9 @@ function _onComponentChange(component, command) {
|
|
906
916
|
function _onSelectUIClosed() {
|
907
917
|
this.setListeningDropdownMenu();
|
908
918
|
}
|
909
|
-
function _onAfterGetColHeader(col, TH) {
|
919
|
+
function _onAfterGetColHeader(col, TH, headerLevel) {
|
910
920
|
const physicalColumn = this.hot.toPhysicalColumn(col);
|
911
|
-
if (this.enabled && this.conditionCollection.hasConditions(physicalColumn)) {
|
921
|
+
if (this.enabled && this.conditionCollection.hasConditions(physicalColumn) && headerLevel === this.hot.view.getColumnHeadersCount() - 1) {
|
912
922
|
addClass(TH, 'htFiltersActive');
|
913
923
|
} else {
|
914
924
|
removeClass(TH, 'htFiltersActive');
|
@@ -369,7 +369,14 @@ function createInput(rootDocument) {
|
|
369
369
|
function createLabel(rootDocument, text, fullWidth) {
|
370
370
|
const label = rootDocument.createElement('label');
|
371
371
|
label.className = `htCheckboxRendererLabel ${fullWidth ? 'fullWidth' : ''}`;
|
372
|
-
|
372
|
+
const textNode = rootDocument.createTextNode(text);
|
373
|
+
if (fullWidth) {
|
374
|
+
const span = rootDocument.createElement('span');
|
375
|
+
span.appendChild(textNode);
|
376
|
+
label.appendChild(span);
|
377
|
+
} else {
|
378
|
+
label.appendChild(textNode);
|
379
|
+
}
|
373
380
|
return label.cloneNode(true);
|
374
381
|
}
|
375
382
|
|
@@ -364,7 +364,14 @@ function createInput(rootDocument) {
|
|
364
364
|
function createLabel(rootDocument, text, fullWidth) {
|
365
365
|
const label = rootDocument.createElement('label');
|
366
366
|
label.className = `htCheckboxRendererLabel ${fullWidth ? 'fullWidth' : ''}`;
|
367
|
-
|
367
|
+
const textNode = rootDocument.createTextNode(text);
|
368
|
+
if (fullWidth) {
|
369
|
+
const span = rootDocument.createElement('span');
|
370
|
+
span.appendChild(textNode);
|
371
|
+
label.appendChild(span);
|
372
|
+
} else {
|
373
|
+
label.appendChild(textNode);
|
374
|
+
}
|
368
375
|
return label.cloneNode(true);
|
369
376
|
}
|
370
377
|
|
package/styles/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: 0.0.0-next-
|
29
|
-
* Release date: 16/12/2024 (built at 17/01/2025
|
28
|
+
* Version: 0.0.0-next-e2116ad-20250117
|
29
|
+
* Release date: 16/12/2024 (built at 17/01/2025 11:44:24)
|
30
30
|
*/
|
31
31
|
.ht-wrapper:not([class*=ht-theme]) {
|
32
32
|
--ht-cell-horizontal-padding: 8px;
|
@@ -794,6 +794,13 @@
|
|
794
794
|
vertical-align: middle;
|
795
795
|
cursor: pointer;
|
796
796
|
appearance: none;
|
797
|
+
margin-top: -2px;
|
798
|
+
}
|
799
|
+
.handsontable .htCheckboxRendererInput:first-child {
|
800
|
+
margin-inline-end: var(--ht-gap-size);
|
801
|
+
}
|
802
|
+
.handsontable .htCheckboxRendererInput:last-child {
|
803
|
+
margin-inline-start: var(--ht-gap-size);
|
797
804
|
}
|
798
805
|
.handsontable .htCheckboxRendererInput::before {
|
799
806
|
content: "";
|
@@ -871,10 +878,6 @@
|
|
871
878
|
color: inherit;
|
872
879
|
margin: 0;
|
873
880
|
}
|
874
|
-
.handsontable .htCheckboxRendererLabel .htCheckboxRendererInput {
|
875
|
-
margin-top: -2px;
|
876
|
-
margin-inline-end: var(--ht-gap-size);
|
877
|
-
}
|
878
881
|
.handsontable .htCheckboxRendererLabel.fullWidth {
|
879
882
|
width: 100%;
|
880
883
|
}
|