@revolist/revogrid 3.2.6 → 3.2.7
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.
- package/custom-element/index.js +8 -4
- package/dist/cjs/revo-grid_11.cjs.entry.js +8 -4
- package/dist/collection/components/revo-grid/revo-grid.js +1 -2
- package/dist/collection/plugins/autoSizeColumn.js +1 -1
- package/dist/collection/plugins/moveColumn/columnDragPlugin.js +3 -0
- package/dist/collection/plugins/moveColumn/columnOrderHandler.js +2 -2
- package/dist/collection/services/resizable.directive.js +2 -0
- package/dist/esm/revo-grid_11.entry.js +8 -4
- package/dist/esm-es5/revo-grid_11.entry.js +1 -1
- package/dist/revo-grid/revo-grid_11.entry.js +1 -1
- package/dist/revo-grid/revo-grid_11.system.entry.js +1 -1
- package/dist/types/components/revo-grid/revo-grid.d.ts +0 -1
- package/dist/types/components.d.ts +2 -2
- package/package.json +1 -1
package/custom-element/index.js
CHANGED
|
@@ -5211,7 +5211,7 @@ class AutoSizeColumn extends BasePlugin {
|
|
|
5211
5211
|
const sizes = {};
|
|
5212
5212
|
each(autoSize[type], rgCol => {
|
|
5213
5213
|
// calculate size
|
|
5214
|
-
rgCol.size = sizes[rgCol.index] = source.reduce((prev, rgRow) => Math.max(prev, this.getLength(rgRow[rgCol.prop])),
|
|
5214
|
+
rgCol.size = sizes[rgCol.index] = source.reduce((prev, rgRow) => Math.max(prev, this.getLength(rgRow[rgCol.prop])), this.getLength(rgCol.name || ''));
|
|
5215
5215
|
});
|
|
5216
5216
|
this.providers.dimensionProvider.setDimensionSize(type, sizes);
|
|
5217
5217
|
});
|
|
@@ -25217,11 +25217,11 @@ class ColumnOrderHandler {
|
|
|
25217
25217
|
stop() {
|
|
25218
25218
|
var _a;
|
|
25219
25219
|
if (this.element) {
|
|
25220
|
-
this.element.hidden
|
|
25220
|
+
this.element.setAttribute('hidden', '');
|
|
25221
25221
|
}
|
|
25222
|
+
this.offset = 0;
|
|
25222
25223
|
(_a = this.autoscrollEl) === null || _a === void 0 ? void 0 : _a.remove();
|
|
25223
25224
|
this.autoscrollEl = undefined;
|
|
25224
|
-
this.offset = 0;
|
|
25225
25225
|
}
|
|
25226
25226
|
showHandler(pos, size, direction = 'translateX') {
|
|
25227
25227
|
if (!this.element) {
|
|
@@ -25290,6 +25290,9 @@ class ColumnPlugin extends BasePlugin {
|
|
|
25290
25290
|
this.addEventListener(COLUMN_CLICK, ({ detail }) => this.dragStart(detail));
|
|
25291
25291
|
}
|
|
25292
25292
|
dragStart({ event, data }) {
|
|
25293
|
+
if (event.defaultPrevented) {
|
|
25294
|
+
return;
|
|
25295
|
+
}
|
|
25293
25296
|
const { defaultPrevented } = dispatch(this.revogrid, DRAG_START, data);
|
|
25294
25297
|
// check if allowed to drag particulat column
|
|
25295
25298
|
if (defaultPrevented) {
|
|
@@ -25495,7 +25498,6 @@ const RevoGridComponent = class extends HTMLElement {
|
|
|
25495
25498
|
/**
|
|
25496
25499
|
* Enables column move plugin
|
|
25497
25500
|
* Can be boolean
|
|
25498
|
-
* Can be filter collection
|
|
25499
25501
|
*/
|
|
25500
25502
|
this.canMoveColumns = false;
|
|
25501
25503
|
/**
|
|
@@ -27427,6 +27429,8 @@ class ResizeDirective {
|
|
|
27427
27429
|
if (event.defaultPrevented) {
|
|
27428
27430
|
return;
|
|
27429
27431
|
}
|
|
27432
|
+
// stop other events if resize in progress
|
|
27433
|
+
event.preventDefault();
|
|
27430
27434
|
this.dropInitial();
|
|
27431
27435
|
for (let elClass in RESIZE_MASK) {
|
|
27432
27436
|
const target = event.target;
|
|
@@ -4888,7 +4888,7 @@ class AutoSizeColumn extends BasePlugin {
|
|
|
4888
4888
|
const sizes = {};
|
|
4889
4889
|
each(autoSize[type], rgCol => {
|
|
4890
4890
|
// calculate size
|
|
4891
|
-
rgCol.size = sizes[rgCol.index] = source.reduce((prev, rgRow) => Math.max(prev, this.getLength(rgRow[rgCol.prop])),
|
|
4891
|
+
rgCol.size = sizes[rgCol.index] = source.reduce((prev, rgRow) => Math.max(prev, this.getLength(rgRow[rgCol.prop])), this.getLength(rgCol.name || ''));
|
|
4892
4892
|
});
|
|
4893
4893
|
this.providers.dimensionProvider.setDimensionSize(type, sizes);
|
|
4894
4894
|
});
|
|
@@ -24654,11 +24654,11 @@ class ColumnOrderHandler {
|
|
|
24654
24654
|
stop() {
|
|
24655
24655
|
var _a;
|
|
24656
24656
|
if (this.element) {
|
|
24657
|
-
this.element.hidden
|
|
24657
|
+
this.element.setAttribute('hidden', '');
|
|
24658
24658
|
}
|
|
24659
|
+
this.offset = 0;
|
|
24659
24660
|
(_a = this.autoscrollEl) === null || _a === void 0 ? void 0 : _a.remove();
|
|
24660
24661
|
this.autoscrollEl = undefined;
|
|
24661
|
-
this.offset = 0;
|
|
24662
24662
|
}
|
|
24663
24663
|
showHandler(pos, size, direction = 'translateX') {
|
|
24664
24664
|
if (!this.element) {
|
|
@@ -24727,6 +24727,9 @@ class ColumnPlugin extends BasePlugin {
|
|
|
24727
24727
|
this.addEventListener(COLUMN_CLICK, ({ detail }) => this.dragStart(detail));
|
|
24728
24728
|
}
|
|
24729
24729
|
dragStart({ event, data }) {
|
|
24730
|
+
if (event.defaultPrevented) {
|
|
24731
|
+
return;
|
|
24732
|
+
}
|
|
24730
24733
|
const { defaultPrevented } = dispatch(this.revogrid, DRAG_START, data);
|
|
24731
24734
|
// check if allowed to drag particulat column
|
|
24732
24735
|
if (defaultPrevented) {
|
|
@@ -24931,7 +24934,6 @@ const RevoGridComponent = class {
|
|
|
24931
24934
|
/**
|
|
24932
24935
|
* Enables column move plugin
|
|
24933
24936
|
* Can be boolean
|
|
24934
|
-
* Can be filter collection
|
|
24935
24937
|
*/
|
|
24936
24938
|
this.canMoveColumns = false;
|
|
24937
24939
|
/**
|
|
@@ -26545,6 +26547,8 @@ class ResizeDirective {
|
|
|
26545
26547
|
if (event.defaultPrevented) {
|
|
26546
26548
|
return;
|
|
26547
26549
|
}
|
|
26550
|
+
// stop other events if resize in progress
|
|
26551
|
+
event.preventDefault();
|
|
26548
26552
|
this.dropInitial();
|
|
26549
26553
|
for (let elClass in RESIZE_MASK) {
|
|
26550
26554
|
const target = event.target;
|
|
@@ -96,7 +96,6 @@ export class RevoGridComponent {
|
|
|
96
96
|
/**
|
|
97
97
|
* Enables column move plugin
|
|
98
98
|
* Can be boolean
|
|
99
|
-
* Can be filter collection
|
|
100
99
|
*/
|
|
101
100
|
this.canMoveColumns = false;
|
|
102
101
|
/**
|
|
@@ -1025,7 +1024,7 @@ export class RevoGridComponent {
|
|
|
1025
1024
|
"optional": false,
|
|
1026
1025
|
"docs": {
|
|
1027
1026
|
"tags": [],
|
|
1028
|
-
"text": "Enables column move plugin\nCan be boolean
|
|
1027
|
+
"text": "Enables column move plugin\nCan be boolean"
|
|
1029
1028
|
},
|
|
1030
1029
|
"attribute": "can-move-columns",
|
|
1031
1030
|
"reflect": false,
|
|
@@ -96,7 +96,7 @@ export default class AutoSizeColumn extends BasePlugin {
|
|
|
96
96
|
const sizes = {};
|
|
97
97
|
each(autoSize[type], rgCol => {
|
|
98
98
|
// calculate size
|
|
99
|
-
rgCol.size = sizes[rgCol.index] = source.reduce((prev, rgRow) => Math.max(prev, this.getLength(rgRow[rgCol.prop])),
|
|
99
|
+
rgCol.size = sizes[rgCol.index] = source.reduce((prev, rgRow) => Math.max(prev, this.getLength(rgRow[rgCol.prop])), this.getLength(rgCol.name || ''));
|
|
100
100
|
});
|
|
101
101
|
this.providers.dimensionProvider.setDimensionSize(type, sizes);
|
|
102
102
|
});
|
|
@@ -43,6 +43,9 @@ export default class ColumnPlugin extends BasePlugin {
|
|
|
43
43
|
this.addEventListener(COLUMN_CLICK, ({ detail }) => this.dragStart(detail));
|
|
44
44
|
}
|
|
45
45
|
dragStart({ event, data }) {
|
|
46
|
+
if (event.defaultPrevented) {
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
46
49
|
const { defaultPrevented } = dispatch(this.revogrid, DRAG_START, data);
|
|
47
50
|
// check if allowed to drag particulat column
|
|
48
51
|
if (defaultPrevented) {
|
|
@@ -38,11 +38,11 @@ export class ColumnOrderHandler {
|
|
|
38
38
|
stop() {
|
|
39
39
|
var _a;
|
|
40
40
|
if (this.element) {
|
|
41
|
-
this.element.hidden
|
|
41
|
+
this.element.setAttribute('hidden', '');
|
|
42
42
|
}
|
|
43
|
+
this.offset = 0;
|
|
43
44
|
(_a = this.autoscrollEl) === null || _a === void 0 ? void 0 : _a.remove();
|
|
44
45
|
this.autoscrollEl = undefined;
|
|
45
|
-
this.offset = 0;
|
|
46
46
|
}
|
|
47
47
|
showHandler(pos, size, direction = 'translateX') {
|
|
48
48
|
if (!this.element) {
|
|
@@ -134,6 +134,8 @@ export class ResizeDirective {
|
|
|
134
134
|
if (event.defaultPrevented) {
|
|
135
135
|
return;
|
|
136
136
|
}
|
|
137
|
+
// stop other events if resize in progress
|
|
138
|
+
event.preventDefault();
|
|
137
139
|
this.dropInitial();
|
|
138
140
|
for (let elClass in RESIZE_MASK) {
|
|
139
141
|
const target = event.target;
|
|
@@ -4884,7 +4884,7 @@ class AutoSizeColumn extends BasePlugin {
|
|
|
4884
4884
|
const sizes = {};
|
|
4885
4885
|
each(autoSize[type], rgCol => {
|
|
4886
4886
|
// calculate size
|
|
4887
|
-
rgCol.size = sizes[rgCol.index] = source.reduce((prev, rgRow) => Math.max(prev, this.getLength(rgRow[rgCol.prop])),
|
|
4887
|
+
rgCol.size = sizes[rgCol.index] = source.reduce((prev, rgRow) => Math.max(prev, this.getLength(rgRow[rgCol.prop])), this.getLength(rgCol.name || ''));
|
|
4888
4888
|
});
|
|
4889
4889
|
this.providers.dimensionProvider.setDimensionSize(type, sizes);
|
|
4890
4890
|
});
|
|
@@ -24650,11 +24650,11 @@ class ColumnOrderHandler {
|
|
|
24650
24650
|
stop() {
|
|
24651
24651
|
var _a;
|
|
24652
24652
|
if (this.element) {
|
|
24653
|
-
this.element.hidden
|
|
24653
|
+
this.element.setAttribute('hidden', '');
|
|
24654
24654
|
}
|
|
24655
|
+
this.offset = 0;
|
|
24655
24656
|
(_a = this.autoscrollEl) === null || _a === void 0 ? void 0 : _a.remove();
|
|
24656
24657
|
this.autoscrollEl = undefined;
|
|
24657
|
-
this.offset = 0;
|
|
24658
24658
|
}
|
|
24659
24659
|
showHandler(pos, size, direction = 'translateX') {
|
|
24660
24660
|
if (!this.element) {
|
|
@@ -24723,6 +24723,9 @@ class ColumnPlugin extends BasePlugin {
|
|
|
24723
24723
|
this.addEventListener(COLUMN_CLICK, ({ detail }) => this.dragStart(detail));
|
|
24724
24724
|
}
|
|
24725
24725
|
dragStart({ event, data }) {
|
|
24726
|
+
if (event.defaultPrevented) {
|
|
24727
|
+
return;
|
|
24728
|
+
}
|
|
24726
24729
|
const { defaultPrevented } = dispatch(this.revogrid, DRAG_START, data);
|
|
24727
24730
|
// check if allowed to drag particulat column
|
|
24728
24731
|
if (defaultPrevented) {
|
|
@@ -24927,7 +24930,6 @@ const RevoGridComponent = class {
|
|
|
24927
24930
|
/**
|
|
24928
24931
|
* Enables column move plugin
|
|
24929
24932
|
* Can be boolean
|
|
24930
|
-
* Can be filter collection
|
|
24931
24933
|
*/
|
|
24932
24934
|
this.canMoveColumns = false;
|
|
24933
24935
|
/**
|
|
@@ -26541,6 +26543,8 @@ class ResizeDirective {
|
|
|
26541
26543
|
if (event.defaultPrevented) {
|
|
26542
26544
|
return;
|
|
26543
26545
|
}
|
|
26546
|
+
// stop other events if resize in progress
|
|
26547
|
+
event.preventDefault();
|
|
26544
26548
|
this.dropInitial();
|
|
26545
26549
|
for (let elClass in RESIZE_MASK) {
|
|
26546
26550
|
const target = event.target;
|