@syncfusion/ej2-treegrid 25.2.6 → 26.1.39
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/.eslintrc.json +3 -2
- package/dist/ej2-treegrid.min.js +2 -2
- package/dist/ej2-treegrid.umd.min.js +2 -2
- package/dist/ej2-treegrid.umd.min.js.map +1 -1
- package/dist/es6/ej2-treegrid.es2015.js +649 -467
- package/dist/es6/ej2-treegrid.es2015.js.map +1 -1
- package/dist/es6/ej2-treegrid.es5.js +950 -767
- package/dist/es6/ej2-treegrid.es5.js.map +1 -1
- package/dist/global/ej2-treegrid.min.js +2 -2
- package/dist/global/ej2-treegrid.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +10 -10
- package/src/treegrid/actions/edit.js +8 -7
- package/src/treegrid/actions/excel-export.js +16 -4
- package/src/treegrid/actions/page.js +4 -0
- package/src/treegrid/actions/rowdragdrop.js +13 -11
- package/src/treegrid/actions/selection.js +4 -1
- package/src/treegrid/base/constant.d.ts +2 -0
- package/src/treegrid/base/constant.js +2 -0
- package/src/treegrid/base/data.js +8 -3
- package/src/treegrid/base/interface.js +0 -1
- package/src/treegrid/base/treegrid-model.d.ts +1 -1
- package/src/treegrid/base/treegrid.d.ts +3 -0
- package/src/treegrid/base/treegrid.js +238 -63
- package/src/treegrid/renderer/virtual-row-model-generator.js +2 -2
- package/src/treegrid/renderer/virtual-tree-content-render.js +6 -3
- package/styles/bootstrap-dark.css +76 -48
- package/styles/bootstrap-dark.scss +18 -1
- package/styles/bootstrap.css +76 -49
- package/styles/bootstrap.scss +18 -1
- package/styles/bootstrap4.css +77 -48
- package/styles/bootstrap4.scss +18 -1
- package/styles/bootstrap5-dark.css +77 -49
- package/styles/bootstrap5-dark.scss +18 -1
- package/styles/bootstrap5.css +77 -49
- package/styles/bootstrap5.scss +18 -1
- package/styles/fabric-dark.css +74 -47
- package/styles/fabric-dark.scss +18 -1
- package/styles/fabric.css +74 -47
- package/styles/fabric.scss +18 -1
- package/styles/fluent-dark.css +77 -49
- package/styles/fluent-dark.scss +18 -1
- package/styles/fluent.css +77 -49
- package/styles/fluent.scss +18 -1
- package/styles/fluent2.css +1713 -0
- package/styles/fluent2.scss +18 -0
- package/styles/highcontrast-light.css +74 -47
- package/styles/highcontrast-light.scss +18 -1
- package/styles/highcontrast.css +74 -47
- package/styles/highcontrast.scss +18 -1
- package/styles/material-dark.css +111 -54
- package/styles/material-dark.scss +18 -1
- package/styles/material.css +125 -57
- package/styles/material.scss +18 -1
- package/styles/material3-dark.css +111 -56
- package/styles/material3-dark.scss +18 -1
- package/styles/material3.css +111 -56
- package/styles/material3.scss +18 -1
- package/styles/tailwind-dark.css +87 -51
- package/styles/tailwind-dark.scss +18 -1
- package/styles/tailwind.css +87 -51
- package/styles/tailwind.scss +18 -1
- package/styles/treegrid/_bds-definition.scss +0 -4
- package/styles/treegrid/_bootstrap-dark-definition.scss +0 -1
- package/styles/treegrid/_bootstrap-definition.scss +0 -1
- package/styles/treegrid/_bootstrap4-definition.scss +0 -1
- package/styles/treegrid/_bootstrap5-definition.scss +0 -4
- package/styles/treegrid/_bootstrap5.3-definition.scss +24 -0
- package/styles/treegrid/_fabric-dark-definition.scss +0 -1
- package/styles/treegrid/_fabric-definition.scss +0 -1
- package/styles/treegrid/_fluent-definition.scss +0 -4
- package/styles/treegrid/_fluent2-definition.scss +24 -0
- package/styles/treegrid/_fusionnew-definition.scss +0 -4
- package/styles/treegrid/_highcontrast-definition.scss +0 -1
- package/styles/treegrid/_highcontrast-light-definition.scss +0 -1
- package/styles/treegrid/_layout.scss +81 -85
- package/styles/treegrid/_material-dark-definition.scss +0 -1
- package/styles/treegrid/_material-definition.scss +0 -1
- package/styles/treegrid/_material3-definition.scss +0 -4
- package/styles/treegrid/_tailwind-definition.scss +0 -4
- package/styles/treegrid/bootstrap-dark.css +76 -48
- package/styles/treegrid/bootstrap.css +76 -49
- package/styles/treegrid/bootstrap4.css +77 -48
- package/styles/treegrid/bootstrap5-dark.css +77 -49
- package/styles/treegrid/bootstrap5.css +77 -49
- package/styles/treegrid/fabric-dark.css +74 -47
- package/styles/treegrid/fabric.css +74 -47
- package/styles/treegrid/fluent-dark.css +77 -49
- package/styles/treegrid/fluent.css +77 -49
- package/styles/treegrid/fluent2.css +1713 -0
- package/styles/treegrid/fluent2.scss +18 -0
- package/styles/treegrid/highcontrast-light.css +74 -47
- package/styles/treegrid/highcontrast.css +74 -47
- package/styles/treegrid/icons/_bootstrap5.3.scss +37 -0
- package/styles/treegrid/icons/_fluent2.scss +37 -0
- package/styles/treegrid/material-dark.css +111 -54
- package/styles/treegrid/material.css +125 -57
- package/styles/treegrid/material3-dark.css +111 -56
- package/styles/treegrid/material3.css +111 -56
- package/styles/treegrid/tailwind-dark.css +87 -51
- package/styles/treegrid/tailwind.css +87 -51
- package/CHANGELOG.md +0 -264
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { merge, Property, ChildProperty, Collection, isNullOrUndefined, Browser, removeClass, addClass, getValue, createElement, setValue, extend as extend$1, Internationalization, getEnumValue, compile, Component, L10n, EventHandler, KeyboardEvents, SanitizeHtmlHelper, Complex, Event, NotifyPropertyChanges, closest, classList, setStyleAttribute, select, debounce, remove } from '@syncfusion/ej2-base';
|
|
2
|
+
import { Logger as Logger$1, Grid, detailLists, Clipboard, getObject, parentsUntil, Print as Print$1, templateCompiler, appendChildren, extend, CellRenderer, getUid, CellType, Freeze as Freeze$1, getNumberFormat, getActualProperties, iterateArrayOrObject, RowDropSettings as RowDropSettings$1, Reorder as Reorder$1, Resize as Resize$1, RowDD as RowDD$1, Scroll, VirtualRowModelGenerator, Filter as Filter$1, ExcelExport as ExcelExport$1, Data, ExportHelper, PdfExport as PdfExport$1, Page as Page$1, Toolbar as Toolbar$1, Aggregate as Aggregate$1, calculateAggregate, Sort as Sort$1, ColumnMenu as ColumnMenu$1, ContextMenu as ContextMenu$1, Edit as Edit$1, resetRowIndex, CommandColumn as CommandColumn$1, DetailRow as DetailRow$1, VirtualContentRenderer, Cell, InterSectionObserver, getTransformValues, VirtualScroll as VirtualScroll$1, RenderType, VirtualHeaderRenderer, ColumnChooser as ColumnChooser$1, InfiniteScroll as InfiniteScroll$1, RowRenderer } from '@syncfusion/ej2-grids';
|
|
3
3
|
import { createCheckBox } from '@syncfusion/ej2-buttons';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { DataManager, ODataAdaptor, WebApiAdaptor, WebMethodAdaptor, CacheAdaptor, UrlAdaptor, Query, DataUtil, RemoteSaveAdaptor, Deferred, JsonAdaptor, Predicate as Predicate$1 } from '@syncfusion/ej2-data';
|
|
5
|
+
import { showSpinner, hideSpinner, createSpinner } from '@syncfusion/ej2-popups';
|
|
6
6
|
|
|
7
|
-
var __decorate
|
|
7
|
+
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
8
8
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
10
10
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
@@ -107,7 +107,7 @@ class Column {
|
|
|
107
107
|
*/
|
|
108
108
|
class TreeGridColumn extends Column {
|
|
109
109
|
}
|
|
110
|
-
__decorate
|
|
110
|
+
__decorate([
|
|
111
111
|
Property(null)
|
|
112
112
|
], TreeGridColumn.prototype, "columns", void 0);
|
|
113
113
|
/**
|
|
@@ -116,7 +116,7 @@ __decorate$1([
|
|
|
116
116
|
class StackedColumn extends TreeGridColumn {
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
-
var __decorate$
|
|
119
|
+
var __decorate$1 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
120
120
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
121
121
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
122
122
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
@@ -127,11 +127,11 @@ var __decorate$2 = (undefined && undefined.__decorate) || function (decorators,
|
|
|
127
127
|
*/
|
|
128
128
|
class LoadingIndicator extends ChildProperty {
|
|
129
129
|
}
|
|
130
|
-
__decorate$
|
|
130
|
+
__decorate$1([
|
|
131
131
|
Property('Spinner')
|
|
132
132
|
], LoadingIndicator.prototype, "indicatorType", void 0);
|
|
133
133
|
|
|
134
|
-
var __decorate$
|
|
134
|
+
var __decorate$2 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
135
135
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
136
136
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
137
137
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
@@ -140,75 +140,75 @@ var __decorate$3 = (undefined && undefined.__decorate) || function (decorators,
|
|
|
140
140
|
/**
|
|
141
141
|
* Represents the Tree Grid predicate for the filter column.
|
|
142
142
|
*/
|
|
143
|
-
class Predicate
|
|
143
|
+
class Predicate extends ChildProperty {
|
|
144
144
|
}
|
|
145
|
-
__decorate$
|
|
145
|
+
__decorate$2([
|
|
146
146
|
Property()
|
|
147
|
-
], Predicate
|
|
148
|
-
__decorate$
|
|
147
|
+
], Predicate.prototype, "field", void 0);
|
|
148
|
+
__decorate$2([
|
|
149
149
|
Property()
|
|
150
|
-
], Predicate
|
|
151
|
-
__decorate$
|
|
150
|
+
], Predicate.prototype, "operator", void 0);
|
|
151
|
+
__decorate$2([
|
|
152
152
|
Property()
|
|
153
|
-
], Predicate
|
|
154
|
-
__decorate$
|
|
153
|
+
], Predicate.prototype, "value", void 0);
|
|
154
|
+
__decorate$2([
|
|
155
155
|
Property()
|
|
156
|
-
], Predicate
|
|
157
|
-
__decorate$
|
|
156
|
+
], Predicate.prototype, "matchCase", void 0);
|
|
157
|
+
__decorate$2([
|
|
158
158
|
Property()
|
|
159
|
-
], Predicate
|
|
160
|
-
__decorate$
|
|
159
|
+
], Predicate.prototype, "ignoreAccent", void 0);
|
|
160
|
+
__decorate$2([
|
|
161
161
|
Property()
|
|
162
|
-
], Predicate
|
|
163
|
-
__decorate$
|
|
162
|
+
], Predicate.prototype, "predicate", void 0);
|
|
163
|
+
__decorate$2([
|
|
164
164
|
Property({})
|
|
165
|
-
], Predicate
|
|
166
|
-
__decorate$
|
|
165
|
+
], Predicate.prototype, "actualFilterValue", void 0);
|
|
166
|
+
__decorate$2([
|
|
167
167
|
Property({})
|
|
168
|
-
], Predicate
|
|
169
|
-
__decorate$
|
|
168
|
+
], Predicate.prototype, "actualOperator", void 0);
|
|
169
|
+
__decorate$2([
|
|
170
170
|
Property()
|
|
171
|
-
], Predicate
|
|
172
|
-
__decorate$
|
|
171
|
+
], Predicate.prototype, "type", void 0);
|
|
172
|
+
__decorate$2([
|
|
173
173
|
Property()
|
|
174
|
-
], Predicate
|
|
175
|
-
__decorate$
|
|
174
|
+
], Predicate.prototype, "ejpredicate", void 0);
|
|
175
|
+
__decorate$2([
|
|
176
176
|
Property()
|
|
177
|
-
], Predicate
|
|
178
|
-
__decorate$
|
|
177
|
+
], Predicate.prototype, "uid", void 0);
|
|
178
|
+
__decorate$2([
|
|
179
179
|
Property()
|
|
180
|
-
], Predicate
|
|
180
|
+
], Predicate.prototype, "isForeignKey", void 0);
|
|
181
181
|
/**
|
|
182
182
|
* Configures the filtering behavior of the TreeGrid.
|
|
183
183
|
*/
|
|
184
184
|
class FilterSettings extends ChildProperty {
|
|
185
185
|
}
|
|
186
|
-
__decorate$
|
|
187
|
-
Collection([], Predicate
|
|
186
|
+
__decorate$2([
|
|
187
|
+
Collection([], Predicate)
|
|
188
188
|
], FilterSettings.prototype, "columns", void 0);
|
|
189
|
-
__decorate$
|
|
189
|
+
__decorate$2([
|
|
190
190
|
Property('FilterBar')
|
|
191
191
|
], FilterSettings.prototype, "type", void 0);
|
|
192
|
-
__decorate$
|
|
192
|
+
__decorate$2([
|
|
193
193
|
Property()
|
|
194
194
|
], FilterSettings.prototype, "mode", void 0);
|
|
195
|
-
__decorate$
|
|
195
|
+
__decorate$2([
|
|
196
196
|
Property(true)
|
|
197
197
|
], FilterSettings.prototype, "showFilterBarStatus", void 0);
|
|
198
|
-
__decorate$
|
|
198
|
+
__decorate$2([
|
|
199
199
|
Property(1500)
|
|
200
200
|
], FilterSettings.prototype, "immediateModeDelay", void 0);
|
|
201
|
-
__decorate$
|
|
201
|
+
__decorate$2([
|
|
202
202
|
Property()
|
|
203
203
|
], FilterSettings.prototype, "operators", void 0);
|
|
204
|
-
__decorate$
|
|
204
|
+
__decorate$2([
|
|
205
205
|
Property(false)
|
|
206
206
|
], FilterSettings.prototype, "ignoreAccent", void 0);
|
|
207
|
-
__decorate$
|
|
207
|
+
__decorate$2([
|
|
208
208
|
Property('Parent')
|
|
209
209
|
], FilterSettings.prototype, "hierarchyMode", void 0);
|
|
210
210
|
|
|
211
|
-
var __decorate$
|
|
211
|
+
var __decorate$3 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
212
212
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
213
213
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
214
214
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
@@ -219,7 +219,7 @@ var __decorate$4 = (undefined && undefined.__decorate) || function (decorators,
|
|
|
219
219
|
*/
|
|
220
220
|
class TextWrapSettings extends ChildProperty {
|
|
221
221
|
}
|
|
222
|
-
__decorate$
|
|
222
|
+
__decorate$3([
|
|
223
223
|
Property('Both')
|
|
224
224
|
], TextWrapSettings.prototype, "wrapMode", void 0);
|
|
225
225
|
|
|
@@ -232,9 +232,9 @@ const DOC_URL = 'https://ej2.syncfusion.com/documentation/treegrid';
|
|
|
232
232
|
const BASE_DOC_URL = 'https://ej2.syncfusion.com/documentation';
|
|
233
233
|
const ERROR = '[EJ2TreeGrid.Error]';
|
|
234
234
|
let IsRowDDEnabled = false;
|
|
235
|
-
class Logger
|
|
235
|
+
class Logger extends Logger$1 {
|
|
236
236
|
constructor(parent) {
|
|
237
|
-
Grid.Inject(Logger);
|
|
237
|
+
Grid.Inject(Logger$1);
|
|
238
238
|
super(parent);
|
|
239
239
|
}
|
|
240
240
|
/**
|
|
@@ -502,6 +502,8 @@ const ariaColIndex = 'aria-colindex';
|
|
|
502
502
|
const dataRowIndex = 'data-rowindex';
|
|
503
503
|
/** @hidden */
|
|
504
504
|
const ariaRowIndex = 'aria-rowindex';
|
|
505
|
+
/** @hidden */
|
|
506
|
+
const actionFailure = 'actionFailure';
|
|
505
507
|
|
|
506
508
|
/**
|
|
507
509
|
* The `Clipboard` module is used to handle clipboard copy action.
|
|
@@ -764,7 +766,7 @@ function getExpandStatus(parent, record, parents) {
|
|
|
764
766
|
return false;
|
|
765
767
|
}
|
|
766
768
|
else if (childParent) {
|
|
767
|
-
return getExpandStatus(parent, childParent
|
|
769
|
+
return getExpandStatus(parent, childParent);
|
|
768
770
|
}
|
|
769
771
|
return true;
|
|
770
772
|
}
|
|
@@ -1032,6 +1034,10 @@ class Selection {
|
|
|
1032
1034
|
}
|
|
1033
1035
|
}
|
|
1034
1036
|
selectCheckboxes(rowIndexes) {
|
|
1037
|
+
if (isNullOrUndefined(rowIndexes)) {
|
|
1038
|
+
const error = 'The provided value for the rowIndexes is undefined. Please ensure the rowIndexes contains number.';
|
|
1039
|
+
this.parent.trigger(actionFailure, { error: error });
|
|
1040
|
+
}
|
|
1035
1041
|
for (let i = 0; i < rowIndexes.length; i++) {
|
|
1036
1042
|
let record = this.parent.getCurrentViewRecords()[rowIndexes[parseInt(i.toString(), 10)]];
|
|
1037
1043
|
const flatRecord = getParentData(this.parent, record.uniqueID);
|
|
@@ -1373,7 +1379,7 @@ class Selection {
|
|
|
1373
1379
|
*
|
|
1374
1380
|
* @hidden
|
|
1375
1381
|
*/
|
|
1376
|
-
class Print
|
|
1382
|
+
class Print {
|
|
1377
1383
|
/**
|
|
1378
1384
|
* Constructor for Print module
|
|
1379
1385
|
*
|
|
@@ -1381,7 +1387,7 @@ class Print$1 {
|
|
|
1381
1387
|
*/
|
|
1382
1388
|
constructor(parent) {
|
|
1383
1389
|
this.parent = parent;
|
|
1384
|
-
Grid.Inject(Print);
|
|
1390
|
+
Grid.Inject(Print$1);
|
|
1385
1391
|
this.addEventListener();
|
|
1386
1392
|
}
|
|
1387
1393
|
/**
|
|
@@ -1425,7 +1431,7 @@ class Print$1 {
|
|
|
1425
1431
|
}
|
|
1426
1432
|
}
|
|
1427
1433
|
|
|
1428
|
-
var __decorate$
|
|
1434
|
+
var __decorate$4 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
1429
1435
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1430
1436
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
1431
1437
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
@@ -1436,23 +1442,23 @@ var __decorate$5 = (undefined && undefined.__decorate) || function (decorators,
|
|
|
1436
1442
|
*/
|
|
1437
1443
|
class SearchSettings extends ChildProperty {
|
|
1438
1444
|
}
|
|
1439
|
-
__decorate$
|
|
1445
|
+
__decorate$4([
|
|
1440
1446
|
Property()
|
|
1441
1447
|
], SearchSettings.prototype, "fields", void 0);
|
|
1442
|
-
__decorate$
|
|
1448
|
+
__decorate$4([
|
|
1443
1449
|
Property(false)
|
|
1444
1450
|
], SearchSettings.prototype, "ignoreCase", void 0);
|
|
1445
|
-
__decorate$
|
|
1451
|
+
__decorate$4([
|
|
1446
1452
|
Property('contains')
|
|
1447
1453
|
], SearchSettings.prototype, "operator", void 0);
|
|
1448
|
-
__decorate$
|
|
1454
|
+
__decorate$4([
|
|
1449
1455
|
Property()
|
|
1450
1456
|
], SearchSettings.prototype, "key", void 0);
|
|
1451
|
-
__decorate$
|
|
1457
|
+
__decorate$4([
|
|
1452
1458
|
Property()
|
|
1453
1459
|
], SearchSettings.prototype, "hierarchyMode", void 0);
|
|
1454
1460
|
|
|
1455
|
-
var __decorate$
|
|
1461
|
+
var __decorate$5 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
1456
1462
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1457
1463
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
1458
1464
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
@@ -1463,25 +1469,25 @@ var __decorate$6 = (undefined && undefined.__decorate) || function (decorators,
|
|
|
1463
1469
|
*/
|
|
1464
1470
|
class SelectionSettings extends ChildProperty {
|
|
1465
1471
|
}
|
|
1466
|
-
__decorate$
|
|
1472
|
+
__decorate$5([
|
|
1467
1473
|
Property('Row')
|
|
1468
1474
|
], SelectionSettings.prototype, "mode", void 0);
|
|
1469
|
-
__decorate$
|
|
1475
|
+
__decorate$5([
|
|
1470
1476
|
Property('Flow')
|
|
1471
1477
|
], SelectionSettings.prototype, "cellSelectionMode", void 0);
|
|
1472
|
-
__decorate$
|
|
1478
|
+
__decorate$5([
|
|
1473
1479
|
Property('Single')
|
|
1474
1480
|
], SelectionSettings.prototype, "type", void 0);
|
|
1475
|
-
__decorate$
|
|
1481
|
+
__decorate$5([
|
|
1476
1482
|
Property(false)
|
|
1477
1483
|
], SelectionSettings.prototype, "persistSelection", void 0);
|
|
1478
|
-
__decorate$
|
|
1484
|
+
__decorate$5([
|
|
1479
1485
|
Property('Default')
|
|
1480
1486
|
], SelectionSettings.prototype, "checkboxMode", void 0);
|
|
1481
|
-
__decorate$
|
|
1487
|
+
__decorate$5([
|
|
1482
1488
|
Property(false)
|
|
1483
1489
|
], SelectionSettings.prototype, "checkboxOnly", void 0);
|
|
1484
|
-
__decorate$
|
|
1490
|
+
__decorate$5([
|
|
1485
1491
|
Property(true)
|
|
1486
1492
|
], SelectionSettings.prototype, "enableToggle", void 0);
|
|
1487
1493
|
|
|
@@ -1517,10 +1523,10 @@ class Render {
|
|
|
1517
1523
|
if (!isNullOrUndefined(data.parentItem) && !isFilterChildHierarchy(this.parent) &&
|
|
1518
1524
|
(!(this.parent.allowPaging && !(this.parent.pageSettings.pageSizeMode === 'Root')) ||
|
|
1519
1525
|
(isRemoteData(this.parent) && !isOffline(this.parent)))) {
|
|
1520
|
-
const collapsed
|
|
1526
|
+
const collapsed = (this.parent.initialRender && (!(isNullOrUndefined(parentData[this.parent.expandStateMapping]) ||
|
|
1521
1527
|
parentData[this.parent.expandStateMapping]) || this.parent.enableCollapseAll)) ||
|
|
1522
1528
|
!getExpandStatus(this.parent, args.data, this.parent.grid.getCurrentViewRecords());
|
|
1523
|
-
if (collapsed
|
|
1529
|
+
if (collapsed && !isNullOrUndefined(args.row)) {
|
|
1524
1530
|
args.row.style.display = 'none';
|
|
1525
1531
|
const rowsObj = this.parent.grid.getRowsObject();
|
|
1526
1532
|
if (!this.parent.grid.isFrozenGrid() && !isNullOrUndefined(args.row.getAttribute('data-uid'))) {
|
|
@@ -1799,7 +1805,7 @@ class Render {
|
|
|
1799
1805
|
}
|
|
1800
1806
|
else {
|
|
1801
1807
|
const str = 'isStringTemplate';
|
|
1802
|
-
const result = args.column[`${templateFn}`](extend
|
|
1808
|
+
const result = args.column[`${templateFn}`](extend({ 'index': '' }, args.data), this.parent, 'template', tempID, this.parent[`${str}`]);
|
|
1803
1809
|
appendChildren(cellElement, result);
|
|
1804
1810
|
}
|
|
1805
1811
|
delete args.column.template;
|
|
@@ -1941,7 +1947,8 @@ class DataManipulation {
|
|
|
1941
1947
|
* @returns {void}
|
|
1942
1948
|
*/
|
|
1943
1949
|
convertToFlatData(data) {
|
|
1944
|
-
this.parent.flatData = (Object.keys(data).length === 0
|
|
1950
|
+
this.parent.flatData = (!isNullOrUndefined(data) && Object.keys(data).length === 0
|
|
1951
|
+
&& !(this.parent.dataSource instanceof DataManager) ?
|
|
1945
1952
|
this.parent.dataSource : []);
|
|
1946
1953
|
this.parent.parentData = [];
|
|
1947
1954
|
if ((isRemoteData(this.parent) && !isOffline(this.parent)) && data instanceof DataManager && !(data instanceof Array)) {
|
|
@@ -1997,7 +2004,7 @@ class DataManipulation {
|
|
|
1997
2004
|
const keys = Object.keys(data);
|
|
1998
2005
|
for (let i = 0; i < keys.length; i++) {
|
|
1999
2006
|
const tempData = data[parseInt(i.toString(), 10)];
|
|
2000
|
-
this.hierarchyData.push(extend({}, tempData));
|
|
2007
|
+
this.hierarchyData.push(extend$1({}, tempData));
|
|
2001
2008
|
if (!isNullOrUndefined(tempData[this.parent.idMapping])) {
|
|
2002
2009
|
this.taskIds.push(tempData[this.parent.idMapping]);
|
|
2003
2010
|
}
|
|
@@ -2099,7 +2106,7 @@ class DataManipulation {
|
|
|
2099
2106
|
}
|
|
2100
2107
|
}
|
|
2101
2108
|
if (isNullOrUndefined(records[parseInt(rec.toString(), 10)].index)) {
|
|
2102
|
-
records[parseInt(rec.toString(), 10)].taskData = extend({}, records[parseInt(rec.toString(), 10)]);
|
|
2109
|
+
records[parseInt(rec.toString(), 10)].taskData = extend$1({}, records[parseInt(rec.toString(), 10)]);
|
|
2103
2110
|
records[parseInt(rec.toString(), 10)].uniqueID = getUid(this.parent.element.id + '_data_');
|
|
2104
2111
|
setValue('uniqueIDCollection.' + records[parseInt(rec.toString(), 10)].uniqueID, records[parseInt(rec.toString(), 10)], this.parent);
|
|
2105
2112
|
records[parseInt(rec.toString(), 10)].level = 0;
|
|
@@ -2199,16 +2206,20 @@ class DataManipulation {
|
|
|
2199
2206
|
const clonequries = qry.queries.filter((e) => e.fn !== 'onPage' && e.fn !== 'onWhere');
|
|
2200
2207
|
qry.queries = clonequries;
|
|
2201
2208
|
qry.isCountRequired = true;
|
|
2209
|
+
let idMappingValue = parseInt(rowDetails.record[this.parent.idMapping], 10);
|
|
2210
|
+
if (isNaN(idMappingValue)) {
|
|
2211
|
+
idMappingValue = rowDetails.record[this.parent.idMapping].toString();
|
|
2212
|
+
}
|
|
2202
2213
|
if (this.parent.enableVirtualization && rowDetails.action === 'remoteExpand') {
|
|
2203
2214
|
qry.take(this.parent.pageSettings.pageSize);
|
|
2204
2215
|
const expandDetail = [];
|
|
2205
|
-
expandDetail.push('ExpandingAction',
|
|
2216
|
+
expandDetail.push('ExpandingAction', idMappingValue.toString());
|
|
2206
2217
|
qry.expand(expandDetail);
|
|
2207
2218
|
}
|
|
2208
2219
|
else if (this.parent.enableVirtualization && rowDetails.action === 'collapse') {
|
|
2209
2220
|
qry.take(this.parent.grid.pageSettings.pageSize);
|
|
2210
2221
|
const expandDetail = [];
|
|
2211
|
-
expandDetail.push('CollapsingAction',
|
|
2222
|
+
expandDetail.push('CollapsingAction', idMappingValue.toString());
|
|
2212
2223
|
qry.expand(expandDetail);
|
|
2213
2224
|
}
|
|
2214
2225
|
qry.where(this.parent.parentIdMapping, 'equal', rowDetails.record[this.parent.idMapping]);
|
|
@@ -2291,7 +2302,7 @@ class DataManipulation {
|
|
|
2291
2302
|
}
|
|
2292
2303
|
}
|
|
2293
2304
|
}
|
|
2294
|
-
result[parseInt(r.toString(), 10)].taskData = extend({}, result[parseInt(r.toString(), 10)]);
|
|
2305
|
+
result[parseInt(r.toString(), 10)].taskData = extend$1({}, result[parseInt(r.toString(), 10)]);
|
|
2295
2306
|
if (result[parseInt(r.toString(), 10)][`${this.parent.parentIdMapping}`] && this.parent.enableVirtualization && this.parent[`${remoteExpandedData}`].length) {
|
|
2296
2307
|
for (let i = 0; i < this.parent[`${remoteExpandedData}`].length; i++) {
|
|
2297
2308
|
if (result[parseInt(r.toString(), 10)][`${this.parent.parentIdMapping}`] === this.parent[`${remoteExpandedData}`][parseInt(i.toString(), 10)][`${this.parent.idMapping}`]) {
|
|
@@ -2319,7 +2330,7 @@ class DataManipulation {
|
|
|
2319
2330
|
}
|
|
2320
2331
|
}
|
|
2321
2332
|
else {
|
|
2322
|
-
const parentData = extend({}, rowDetails.record);
|
|
2333
|
+
const parentData = extend$1({}, rowDetails.record);
|
|
2323
2334
|
delete parentData.childRecords;
|
|
2324
2335
|
result[parseInt(r.toString(), 10)].parentItem = parentData;
|
|
2325
2336
|
result[parseInt(r.toString(), 10)].parentUniqueID = rowDetails.record.uniqueID;
|
|
@@ -2327,7 +2338,7 @@ class DataManipulation {
|
|
|
2327
2338
|
}
|
|
2328
2339
|
else {
|
|
2329
2340
|
result[parseInt(r.toString(), 10)].level = rowDetails.record.level + 1;
|
|
2330
|
-
const parentData = extend({}, rowDetails.record);
|
|
2341
|
+
const parentData = extend$1({}, rowDetails.record);
|
|
2331
2342
|
delete parentData.childRecords;
|
|
2332
2343
|
result[parseInt(r.toString(), 10)].parentItem = parentData;
|
|
2333
2344
|
result[parseInt(r.toString(), 10)].parentUniqueID = rowDetails.record.uniqueID;
|
|
@@ -2447,7 +2458,7 @@ class DataManipulation {
|
|
|
2447
2458
|
const treeGridData = [];
|
|
2448
2459
|
const keys = Object.keys(data);
|
|
2449
2460
|
for (let i = 0, len = keys.length; i < len; i++) {
|
|
2450
|
-
const currentData = extend({}, data[parseInt(i.toString(), 10)]);
|
|
2461
|
+
const currentData = extend$1({}, data[parseInt(i.toString(), 10)]);
|
|
2451
2462
|
currentData.taskData = data[parseInt(i.toString(), 10)];
|
|
2452
2463
|
let level = 0;
|
|
2453
2464
|
this.storedIndex++;
|
|
@@ -2475,7 +2486,7 @@ class DataManipulation {
|
|
|
2475
2486
|
currentData.uniqueID = getUid(this.parent.element.id + '_data_');
|
|
2476
2487
|
setValue('uniqueIDCollection.' + currentData.uniqueID, currentData, this.parent);
|
|
2477
2488
|
if (!isNullOrUndefined(parentRecords)) {
|
|
2478
|
-
const parentData = extend({}, parentRecords);
|
|
2489
|
+
const parentData = extend$1({}, parentRecords);
|
|
2479
2490
|
delete parentData.childRecords;
|
|
2480
2491
|
delete parentData[this.parent.childMapping];
|
|
2481
2492
|
if (this.isSelfReference) {
|
|
@@ -2756,7 +2767,7 @@ var ContextMenuItems;
|
|
|
2756
2767
|
ContextMenuItems[ContextMenuItems["RowOutdent"] = 17] = "RowOutdent";
|
|
2757
2768
|
})(ContextMenuItems || (ContextMenuItems = {}));
|
|
2758
2769
|
|
|
2759
|
-
var __decorate$
|
|
2770
|
+
var __decorate$6 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
2760
2771
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2761
2772
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
2762
2773
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
@@ -2767,32 +2778,32 @@ var __decorate$7 = (undefined && undefined.__decorate) || function (decorators,
|
|
|
2767
2778
|
*/
|
|
2768
2779
|
class PageSettings extends ChildProperty {
|
|
2769
2780
|
}
|
|
2770
|
-
__decorate$
|
|
2781
|
+
__decorate$6([
|
|
2771
2782
|
Property(12)
|
|
2772
2783
|
], PageSettings.prototype, "pageSize", void 0);
|
|
2773
|
-
__decorate$
|
|
2784
|
+
__decorate$6([
|
|
2774
2785
|
Property(8)
|
|
2775
2786
|
], PageSettings.prototype, "pageCount", void 0);
|
|
2776
|
-
__decorate$
|
|
2787
|
+
__decorate$6([
|
|
2777
2788
|
Property(1)
|
|
2778
2789
|
], PageSettings.prototype, "currentPage", void 0);
|
|
2779
|
-
__decorate$
|
|
2790
|
+
__decorate$6([
|
|
2780
2791
|
Property()
|
|
2781
2792
|
], PageSettings.prototype, "totalRecordsCount", void 0);
|
|
2782
|
-
__decorate$
|
|
2793
|
+
__decorate$6([
|
|
2783
2794
|
Property(false)
|
|
2784
2795
|
], PageSettings.prototype, "enableQueryString", void 0);
|
|
2785
|
-
__decorate$
|
|
2796
|
+
__decorate$6([
|
|
2786
2797
|
Property(false)
|
|
2787
2798
|
], PageSettings.prototype, "pageSizes", void 0);
|
|
2788
|
-
__decorate$
|
|
2799
|
+
__decorate$6([
|
|
2789
2800
|
Property(null)
|
|
2790
2801
|
], PageSettings.prototype, "template", void 0);
|
|
2791
|
-
__decorate$
|
|
2802
|
+
__decorate$6([
|
|
2792
2803
|
Property('All')
|
|
2793
2804
|
], PageSettings.prototype, "pageSizeMode", void 0);
|
|
2794
2805
|
|
|
2795
|
-
var __decorate$
|
|
2806
|
+
var __decorate$7 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
2796
2807
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2797
2808
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
2798
2809
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
@@ -2868,34 +2879,34 @@ class AggregateColumn extends ChildProperty {
|
|
|
2868
2879
|
this.setProperties(prop, true);
|
|
2869
2880
|
}
|
|
2870
2881
|
}
|
|
2871
|
-
__decorate$
|
|
2882
|
+
__decorate$7([
|
|
2872
2883
|
Property()
|
|
2873
2884
|
], AggregateColumn.prototype, "type", void 0);
|
|
2874
|
-
__decorate$
|
|
2885
|
+
__decorate$7([
|
|
2875
2886
|
Property()
|
|
2876
2887
|
], AggregateColumn.prototype, "footerTemplate", void 0);
|
|
2877
|
-
__decorate$
|
|
2888
|
+
__decorate$7([
|
|
2878
2889
|
Property()
|
|
2879
2890
|
], AggregateColumn.prototype, "field", void 0);
|
|
2880
|
-
__decorate$
|
|
2891
|
+
__decorate$7([
|
|
2881
2892
|
Property()
|
|
2882
2893
|
], AggregateColumn.prototype, "format", void 0);
|
|
2883
|
-
__decorate$
|
|
2894
|
+
__decorate$7([
|
|
2884
2895
|
Property()
|
|
2885
2896
|
], AggregateColumn.prototype, "columnName", void 0);
|
|
2886
|
-
__decorate$
|
|
2897
|
+
__decorate$7([
|
|
2887
2898
|
Property()
|
|
2888
2899
|
], AggregateColumn.prototype, "customAggregate", void 0);
|
|
2889
2900
|
class AggregateRow extends ChildProperty {
|
|
2890
2901
|
}
|
|
2891
|
-
__decorate$
|
|
2902
|
+
__decorate$7([
|
|
2892
2903
|
Collection([], AggregateColumn)
|
|
2893
2904
|
], AggregateRow.prototype, "columns", void 0);
|
|
2894
|
-
__decorate$
|
|
2905
|
+
__decorate$7([
|
|
2895
2906
|
Property(true)
|
|
2896
2907
|
], AggregateRow.prototype, "showChildSummary", void 0);
|
|
2897
2908
|
|
|
2898
|
-
var __decorate$
|
|
2909
|
+
var __decorate$8 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
2899
2910
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2900
2911
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
2901
2912
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
@@ -2906,41 +2917,41 @@ var __decorate$9 = (undefined && undefined.__decorate) || function (decorators,
|
|
|
2906
2917
|
*/
|
|
2907
2918
|
class EditSettings extends ChildProperty {
|
|
2908
2919
|
}
|
|
2909
|
-
__decorate$
|
|
2920
|
+
__decorate$8([
|
|
2910
2921
|
Property(false)
|
|
2911
2922
|
], EditSettings.prototype, "allowAdding", void 0);
|
|
2912
|
-
__decorate$
|
|
2923
|
+
__decorate$8([
|
|
2913
2924
|
Property(false)
|
|
2914
2925
|
], EditSettings.prototype, "allowEditing", void 0);
|
|
2915
|
-
__decorate$
|
|
2926
|
+
__decorate$8([
|
|
2916
2927
|
Property(false)
|
|
2917
2928
|
], EditSettings.prototype, "allowDeleting", void 0);
|
|
2918
|
-
__decorate$
|
|
2929
|
+
__decorate$8([
|
|
2919
2930
|
Property('Cell')
|
|
2920
2931
|
], EditSettings.prototype, "mode", void 0);
|
|
2921
|
-
__decorate$
|
|
2932
|
+
__decorate$8([
|
|
2922
2933
|
Property('Top')
|
|
2923
2934
|
], EditSettings.prototype, "newRowPosition", void 0);
|
|
2924
|
-
__decorate$
|
|
2935
|
+
__decorate$8([
|
|
2925
2936
|
Property(true)
|
|
2926
2937
|
], EditSettings.prototype, "allowEditOnDblClick", void 0);
|
|
2927
|
-
__decorate$
|
|
2938
|
+
__decorate$8([
|
|
2928
2939
|
Property(true)
|
|
2929
2940
|
], EditSettings.prototype, "showConfirmDialog", void 0);
|
|
2930
|
-
__decorate$
|
|
2941
|
+
__decorate$8([
|
|
2931
2942
|
Property(false)
|
|
2932
2943
|
], EditSettings.prototype, "showDeleteConfirmDialog", void 0);
|
|
2933
|
-
__decorate$
|
|
2944
|
+
__decorate$8([
|
|
2934
2945
|
Property('')
|
|
2935
2946
|
], EditSettings.prototype, "template", void 0);
|
|
2936
|
-
__decorate$
|
|
2947
|
+
__decorate$8([
|
|
2937
2948
|
Property({})
|
|
2938
2949
|
], EditSettings.prototype, "dialog", void 0);
|
|
2939
|
-
__decorate$
|
|
2950
|
+
__decorate$8([
|
|
2940
2951
|
Property(false)
|
|
2941
2952
|
], EditSettings.prototype, "allowNextRowEdit", void 0);
|
|
2942
2953
|
|
|
2943
|
-
var __decorate$
|
|
2954
|
+
var __decorate$9 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
2944
2955
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2945
2956
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
2946
2957
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
@@ -2951,10 +2962,10 @@ var __decorate$10 = (undefined && undefined.__decorate) || function (decorators,
|
|
|
2951
2962
|
*/
|
|
2952
2963
|
class SortDescriptor extends ChildProperty {
|
|
2953
2964
|
}
|
|
2954
|
-
__decorate$
|
|
2965
|
+
__decorate$9([
|
|
2955
2966
|
Property()
|
|
2956
2967
|
], SortDescriptor.prototype, "field", void 0);
|
|
2957
|
-
__decorate$
|
|
2968
|
+
__decorate$9([
|
|
2958
2969
|
Property()
|
|
2959
2970
|
], SortDescriptor.prototype, "direction", void 0);
|
|
2960
2971
|
/**
|
|
@@ -2962,10 +2973,10 @@ __decorate$10([
|
|
|
2962
2973
|
*/
|
|
2963
2974
|
class SortSettings extends ChildProperty {
|
|
2964
2975
|
}
|
|
2965
|
-
__decorate$
|
|
2976
|
+
__decorate$9([
|
|
2966
2977
|
Collection([], SortDescriptor)
|
|
2967
2978
|
], SortSettings.prototype, "columns", void 0);
|
|
2968
|
-
__decorate$
|
|
2979
|
+
__decorate$9([
|
|
2969
2980
|
Property(true)
|
|
2970
2981
|
], SortSettings.prototype, "allowUnsort", void 0);
|
|
2971
2982
|
|
|
@@ -3010,7 +3021,7 @@ function editAction(details, control, isSelfReference, addRowIndex, selectedInde
|
|
|
3010
3021
|
modifiedData = extendArray(value);
|
|
3011
3022
|
}
|
|
3012
3023
|
else {
|
|
3013
|
-
modifiedData.push(extend({}, value));
|
|
3024
|
+
modifiedData.push(extend$1({}, value));
|
|
3014
3025
|
}
|
|
3015
3026
|
if (!isSkip && (action !== 'add' ||
|
|
3016
3027
|
(control.editSettings.newRowPosition !== 'Top' && control.editSettings.newRowPosition !== 'Bottom'))) {
|
|
@@ -3126,7 +3137,7 @@ function addAction(details, treeData, control, isSelfReference, addRowIndex, sel
|
|
|
3126
3137
|
let value;
|
|
3127
3138
|
let isSkip = false;
|
|
3128
3139
|
const currentViewRecords = control.grid.getCurrentViewRecords();
|
|
3129
|
-
value = extend({}, details.value);
|
|
3140
|
+
value = extend$1({}, details.value);
|
|
3130
3141
|
value = getPlainData(value);
|
|
3131
3142
|
switch (control.editSettings.newRowPosition) {
|
|
3132
3143
|
case 'Top':
|
|
@@ -3139,28 +3150,28 @@ function addAction(details, treeData, control, isSelfReference, addRowIndex, sel
|
|
|
3139
3150
|
break;
|
|
3140
3151
|
case 'Above':
|
|
3141
3152
|
if (!isNullOrUndefined(addRowRecord)) {
|
|
3142
|
-
value = extend({}, addRowRecord);
|
|
3153
|
+
value = extend$1({}, addRowRecord);
|
|
3143
3154
|
value = getPlainData(value);
|
|
3144
3155
|
}
|
|
3145
3156
|
else {
|
|
3146
|
-
value = extend({}, currentViewRecords[addRowIndex + 1]);
|
|
3157
|
+
value = extend$1({}, currentViewRecords[addRowIndex + 1]);
|
|
3147
3158
|
value = getPlainData(value);
|
|
3148
3159
|
}
|
|
3149
3160
|
break;
|
|
3150
3161
|
case 'Below':
|
|
3151
3162
|
case 'Child':
|
|
3152
3163
|
if (!isNullOrUndefined(addRowRecord)) {
|
|
3153
|
-
value = extend({}, addRowRecord);
|
|
3164
|
+
value = extend$1({}, addRowRecord);
|
|
3154
3165
|
value = getPlainData(value);
|
|
3155
3166
|
}
|
|
3156
3167
|
else {
|
|
3157
3168
|
const primaryKeys = control.grid.getPrimaryKeyFieldNames()[0];
|
|
3158
3169
|
const currentdata = currentViewRecords[parseInt(addRowIndex.toString(), 10)];
|
|
3159
3170
|
if (!isNullOrUndefined(currentdata) && currentdata[`${primaryKeys}`] === details.value[`${primaryKeys}`] || selectedIndex !== -1) {
|
|
3160
|
-
value = extend({}, currentdata);
|
|
3171
|
+
value = extend$1({}, currentdata);
|
|
3161
3172
|
}
|
|
3162
3173
|
else {
|
|
3163
|
-
value = extend({}, details.value);
|
|
3174
|
+
value = extend$1({}, details.value);
|
|
3164
3175
|
}
|
|
3165
3176
|
value = getPlainData(value);
|
|
3166
3177
|
const internalProperty = 'internalProperties';
|
|
@@ -3369,7 +3380,7 @@ function updateParentRow(key, record, action, control, isSelfReference, child) {
|
|
|
3369
3380
|
}
|
|
3370
3381
|
}
|
|
3371
3382
|
|
|
3372
|
-
var __decorate$
|
|
3383
|
+
var __decorate$a = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
3373
3384
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3374
3385
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
3375
3386
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
@@ -3380,17 +3391,17 @@ var __decorate$11 = (undefined && undefined.__decorate) || function (decorators,
|
|
|
3380
3391
|
*/
|
|
3381
3392
|
class InfiniteScrollSettings extends ChildProperty {
|
|
3382
3393
|
}
|
|
3383
|
-
__decorate$
|
|
3394
|
+
__decorate$a([
|
|
3384
3395
|
Property(false)
|
|
3385
3396
|
], InfiniteScrollSettings.prototype, "enableCache", void 0);
|
|
3386
|
-
__decorate$
|
|
3397
|
+
__decorate$a([
|
|
3387
3398
|
Property(3)
|
|
3388
3399
|
], InfiniteScrollSettings.prototype, "maxBlocks", void 0);
|
|
3389
|
-
__decorate$
|
|
3400
|
+
__decorate$a([
|
|
3390
3401
|
Property(3)
|
|
3391
3402
|
], InfiniteScrollSettings.prototype, "initialBlocks", void 0);
|
|
3392
3403
|
|
|
3393
|
-
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
3404
|
+
var __decorate$b = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
3394
3405
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3395
3406
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
3396
3407
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
@@ -3442,15 +3453,15 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
3442
3453
|
return false;
|
|
3443
3454
|
}
|
|
3444
3455
|
};
|
|
3445
|
-
TreeGrid_1.Inject(Selection, Logger
|
|
3456
|
+
TreeGrid_1.Inject(Selection, Logger);
|
|
3446
3457
|
setValue('mergePersistData', this.mergePersistTreeGridData, this);
|
|
3447
3458
|
const logger = 'Logger';
|
|
3448
3459
|
if (!isNullOrUndefined(this.injectedModules[`${logger}`])) {
|
|
3449
|
-
Grid.Inject(Logger);
|
|
3460
|
+
Grid.Inject(Logger$1);
|
|
3450
3461
|
}
|
|
3451
3462
|
const freezeModulePresent = this.injectedModules.filter((e) => {
|
|
3452
3463
|
if (e.prototype.getModuleName() === 'freeze') {
|
|
3453
|
-
Grid.Inject(Freeze);
|
|
3464
|
+
Grid.Inject(Freeze$1);
|
|
3454
3465
|
}
|
|
3455
3466
|
});
|
|
3456
3467
|
this.grid = new Grid();
|
|
@@ -3527,6 +3538,7 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
3527
3538
|
}
|
|
3528
3539
|
/**
|
|
3529
3540
|
* Exports the TreeGrid data to the specified URL using a POST request.
|
|
3541
|
+
*
|
|
3530
3542
|
* @param {string} url - Defines exporting url
|
|
3531
3543
|
* @returns {void}
|
|
3532
3544
|
*/
|
|
@@ -3557,6 +3569,7 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
3557
3569
|
}
|
|
3558
3570
|
/**
|
|
3559
3571
|
* Sets the header text and other properties for an array of columns based on specified criteria.
|
|
3572
|
+
*
|
|
3560
3573
|
* @param {Column[]} columns - Defines array of columns
|
|
3561
3574
|
* @param {string[]} include - Defines array of sting
|
|
3562
3575
|
* @returns {Column[]} returns array of columns
|
|
@@ -3643,6 +3656,10 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
3643
3656
|
* @returns {void}
|
|
3644
3657
|
*/
|
|
3645
3658
|
sortByColumn(columnName, direction, isMultiSort) {
|
|
3659
|
+
if (isNullOrUndefined(columnName) && isNullOrUndefined(direction)) {
|
|
3660
|
+
const error = 'The provided value for the columnName and direction is undefined. Please ensure the columnName and direction contains string.';
|
|
3661
|
+
this.trigger(actionFailure, { error: error });
|
|
3662
|
+
}
|
|
3646
3663
|
if (this.sortModule) {
|
|
3647
3664
|
this.sortModule.sortColumn(columnName, direction, isMultiSort);
|
|
3648
3665
|
}
|
|
@@ -3703,21 +3720,27 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
3703
3720
|
* @returns {void}
|
|
3704
3721
|
*/
|
|
3705
3722
|
reorderColumns(fromFName, toFName) {
|
|
3723
|
+
if (isNullOrUndefined(fromFName) && isNullOrUndefined(toFName)) {
|
|
3724
|
+
const error = 'The provided value for the fromFName and toFName is undefined. Please ensure the fromFName and toFName contains string.';
|
|
3725
|
+
this.trigger(actionFailure, { error: error });
|
|
3726
|
+
}
|
|
3706
3727
|
this.grid.reorderColumns(fromFName, toFName);
|
|
3707
3728
|
}
|
|
3708
3729
|
TreeGridLocale() {
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
|
|
3713
|
-
|
|
3714
|
-
|
|
3715
|
-
|
|
3716
|
-
|
|
3717
|
-
|
|
3718
|
-
|
|
3719
|
-
|
|
3720
|
-
|
|
3730
|
+
if (!isNullOrUndefined(this.locale)) {
|
|
3731
|
+
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
|
3732
|
+
const locale = L10n.locale;
|
|
3733
|
+
const localeObject = {};
|
|
3734
|
+
setValue(this.locale, {}, localeObject);
|
|
3735
|
+
let gridLocale;
|
|
3736
|
+
gridLocale = {};
|
|
3737
|
+
gridLocale = getObject(this.locale, locale);
|
|
3738
|
+
let treeGridLocale;
|
|
3739
|
+
treeGridLocale = {};
|
|
3740
|
+
treeGridLocale = getObject(this.getModuleName(), gridLocale);
|
|
3741
|
+
setValue('grid', treeGridLocale, getObject(this.locale, localeObject));
|
|
3742
|
+
L10n.load(localeObject);
|
|
3743
|
+
}
|
|
3721
3744
|
}
|
|
3722
3745
|
/**
|
|
3723
3746
|
* By default, prints all the pages of the TreeGrid and hides the pager.
|
|
@@ -3764,45 +3787,57 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
3764
3787
|
}
|
|
3765
3788
|
break;
|
|
3766
3789
|
case 'downArrow':
|
|
3767
|
-
if (!this.enableVirtualization) {
|
|
3790
|
+
if (!this.enableVirtualization && isNullOrUndefined(this.rowTemplate)) {
|
|
3768
3791
|
target = e.target;
|
|
3769
|
-
|
|
3770
|
-
|
|
3771
|
-
|
|
3772
|
-
|
|
3773
|
-
|
|
3774
|
-
|
|
3775
|
-
|
|
3776
|
-
|
|
3777
|
-
|
|
3778
|
-
|
|
3779
|
-
|
|
3780
|
-
|
|
3781
|
-
|
|
3782
|
-
|
|
3783
|
-
|
|
3792
|
+
if (!isNullOrUndefined(target.querySelectorAll('.e-rowcell'))) {
|
|
3793
|
+
target = parentsUntil(target, 'e-rowcell');
|
|
3794
|
+
}
|
|
3795
|
+
if (!isNullOrUndefined(target)) {
|
|
3796
|
+
parentTarget = target.parentElement;
|
|
3797
|
+
if (!isNullOrUndefined(parentTarget)) {
|
|
3798
|
+
const cellIndex = parentTarget.cellIndex;
|
|
3799
|
+
if (this.grid.getColumnByIndex(cellIndex).editType === 'dropdownedit' && isNullOrUndefined(this.grid.getColumnByIndex(cellIndex).edit['obj'])) {
|
|
3800
|
+
parentTarget = target;
|
|
3801
|
+
}
|
|
3802
|
+
summaryElement = this.findnextRowElement(parentTarget);
|
|
3803
|
+
if (summaryElement !== null) {
|
|
3804
|
+
const cellIndex = target.cellIndex;
|
|
3805
|
+
const row = summaryElement.children[parseInt(cellIndex.toString(), 10)];
|
|
3806
|
+
addClass([row], 'e-focused');
|
|
3807
|
+
addClass([row], 'e-focus');
|
|
3808
|
+
}
|
|
3809
|
+
else {
|
|
3810
|
+
this.clearSelection();
|
|
3811
|
+
}
|
|
3784
3812
|
}
|
|
3785
3813
|
}
|
|
3786
3814
|
}
|
|
3787
3815
|
break;
|
|
3788
3816
|
case 'upArrow':
|
|
3789
|
-
if (!this.enableVirtualization) {
|
|
3817
|
+
if (!this.enableVirtualization && isNullOrUndefined(this.rowTemplate)) {
|
|
3790
3818
|
target = e.target;
|
|
3791
|
-
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
|
|
3795
|
-
|
|
3796
|
-
|
|
3797
|
-
|
|
3798
|
-
|
|
3799
|
-
|
|
3800
|
-
|
|
3801
|
-
|
|
3802
|
-
|
|
3803
|
-
|
|
3804
|
-
|
|
3805
|
-
|
|
3819
|
+
if (!isNullOrUndefined(target.querySelectorAll('.e-rowcell'))) {
|
|
3820
|
+
target = parentsUntil(target, 'e-rowcell');
|
|
3821
|
+
}
|
|
3822
|
+
if (!isNullOrUndefined(target)) {
|
|
3823
|
+
parentTarget = target.parentElement;
|
|
3824
|
+
if (!isNullOrUndefined(parentTarget)) {
|
|
3825
|
+
const cellIndex = parentTarget.cellIndex;
|
|
3826
|
+
if (this.grid.getColumnByIndex(cellIndex).editType === 'dropdownedit' && isNullOrUndefined(this.grid.getColumnByIndex(cellIndex).edit['obj'])) {
|
|
3827
|
+
parentTarget = target;
|
|
3828
|
+
}
|
|
3829
|
+
summaryElement = this.findPreviousRowElement(parentTarget);
|
|
3830
|
+
if (summaryElement !== null) {
|
|
3831
|
+
const cellIndex = target.cellIndex;
|
|
3832
|
+
if (!isNullOrUndefined(cellIndex)) {
|
|
3833
|
+
const row = summaryElement.children[parseInt(cellIndex.toString(), 10)];
|
|
3834
|
+
addClass([row], 'e-focused');
|
|
3835
|
+
addClass([row], 'e-focus');
|
|
3836
|
+
}
|
|
3837
|
+
}
|
|
3838
|
+
else {
|
|
3839
|
+
this.clearSelection();
|
|
3840
|
+
}
|
|
3806
3841
|
}
|
|
3807
3842
|
}
|
|
3808
3843
|
}
|
|
@@ -3876,7 +3911,9 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
3876
3911
|
requiredModules() {
|
|
3877
3912
|
const modules = [];
|
|
3878
3913
|
const splitFrozenCount = 'splitFrozenCount';
|
|
3879
|
-
this.
|
|
3914
|
+
if (!this.isReact && isNullOrUndefined(this['changedProperties'].columns)) {
|
|
3915
|
+
this.grid[`${splitFrozenCount}`](this.getColumns());
|
|
3916
|
+
}
|
|
3880
3917
|
if (this.isDestroyed) {
|
|
3881
3918
|
return modules;
|
|
3882
3919
|
}
|
|
@@ -3996,7 +4033,7 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
3996
4033
|
name: 'Edit'
|
|
3997
4034
|
});
|
|
3998
4035
|
}
|
|
3999
|
-
if (this.isCommandColumn(this.columns)) {
|
|
4036
|
+
if (!isNullOrUndefined(this.columns) && this.isCommandColumn(this.columns)) {
|
|
4000
4037
|
modules.push({
|
|
4001
4038
|
member: 'commandColumn',
|
|
4002
4039
|
args: [this],
|
|
@@ -4092,7 +4129,7 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
4092
4129
|
this.log(['mapping_fields_missing']);
|
|
4093
4130
|
this.renderModule = new Render(this);
|
|
4094
4131
|
this.dataModule = new DataManipulation(this);
|
|
4095
|
-
this.printModule = new Print
|
|
4132
|
+
this.printModule = new Print(this);
|
|
4096
4133
|
this.trigger(load);
|
|
4097
4134
|
this.autoGenerateColumns();
|
|
4098
4135
|
this.initialRender = true;
|
|
@@ -4127,6 +4164,7 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
4127
4164
|
const root = 'root';
|
|
4128
4165
|
this.grid[`${root}`] = this[`${root}`] ? this[`${root}`] : this;
|
|
4129
4166
|
this.grid.appendTo(gridContainer);
|
|
4167
|
+
this.actionFailureHandler();
|
|
4130
4168
|
const gridContent = this.element.getElementsByClassName('e-gridcontent')[0].childNodes[0];
|
|
4131
4169
|
gridContent.setAttribute('tabindex', '0');
|
|
4132
4170
|
const contentTable = this.element.getElementsByClassName('e-content')[0].querySelector('.e-table');
|
|
@@ -4149,6 +4187,84 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
4149
4187
|
}
|
|
4150
4188
|
};
|
|
4151
4189
|
}
|
|
4190
|
+
actionFailureHandler() {
|
|
4191
|
+
const failureCases = [];
|
|
4192
|
+
const primaryKeyFieldNames = this.getPrimaryKeyFieldNames();
|
|
4193
|
+
const RecordsCount = this.flatData.length;
|
|
4194
|
+
if ((this.editSettings.allowAdding || this.editSettings.allowDeleting || this.editSettings.allowEditing)
|
|
4195
|
+
&& primaryKeyFieldNames.length === 0 && RecordsCount !== 0) {
|
|
4196
|
+
failureCases.push('For the CRUD actions, it is necessary to enable Primary Key field for the unique data column.');
|
|
4197
|
+
}
|
|
4198
|
+
if (this.allowRowDragAndDrop && primaryKeyFieldNames.length === 0 && RecordsCount !== 0) {
|
|
4199
|
+
failureCases.push('For the Row Drag and Drop actions, it is necessary to enable Primary Key field for the unique data column.');
|
|
4200
|
+
}
|
|
4201
|
+
if (this.allowPaging && this.enableVirtualization) {
|
|
4202
|
+
failureCases.push('Paging is not allowed in virtualization case.');
|
|
4203
|
+
}
|
|
4204
|
+
if (RecordsCount === 0 && this.columns.length === 0) {
|
|
4205
|
+
failureCases.push('Either of the Data source or columns should be given.');
|
|
4206
|
+
}
|
|
4207
|
+
if (this.frozenColumns > 0 && this.columnModel.filter((col) => col.isFrozen)) {
|
|
4208
|
+
failureCases.push('Use only one attribute for Frozen either IsFrozen or FrozenColumns.');
|
|
4209
|
+
}
|
|
4210
|
+
if (this.enableVirtualization && !isNullOrUndefined(this.detailTemplate)) {
|
|
4211
|
+
failureCases.push('Virtual scrolling is not compatible with the detail template');
|
|
4212
|
+
}
|
|
4213
|
+
if (this.stackedHeader && !isNullOrUndefined(this.detailTemplate)) {
|
|
4214
|
+
failureCases.push('Virtual scrolling is not compatible with the detail template');
|
|
4215
|
+
}
|
|
4216
|
+
if ((this.frozenColumns > 0 || this.columnModel.filter((col) => col.isFrozen) || this.frozenRows > 0)
|
|
4217
|
+
&& (!isNullOrUndefined(this.detailTemplate) || !isNullOrUndefined(this.rowTemplate))) {
|
|
4218
|
+
failureCases.push('Frozen rows and columns are not supported with the Detail template and row template.');
|
|
4219
|
+
}
|
|
4220
|
+
if ((this.frozenColumns > 0 || this.columnModel.filter((col) => col.isFrozen).length > 0 || this.frozenRows > 0) && this.editSettings.mode === 'Cell') {
|
|
4221
|
+
failureCases.push('Frozen rows and columns are not supported with cell editing.');
|
|
4222
|
+
}
|
|
4223
|
+
if (this.allowSelection && !isNullOrUndefined(this.rowTemplate)) {
|
|
4224
|
+
failureCases.push('Selection is not supported in RowTemplate');
|
|
4225
|
+
}
|
|
4226
|
+
if (this.treeColumnIndex < 0) {
|
|
4227
|
+
failureCases.push('For showing tree structure it is must to set the TreeColumnIndex value.');
|
|
4228
|
+
}
|
|
4229
|
+
if (this.treeColumnIndex >= this.columns.length) {
|
|
4230
|
+
failureCases.push('TreeColumnIndex value should not exceed the total column count.');
|
|
4231
|
+
}
|
|
4232
|
+
if (this.enableVirtualization && (!/[0-9]$/.test(this.columnModel.filter((col) => col.width).toString())
|
|
4233
|
+
&& !/[px]$/.test(this.columnModel.filter((col) => col.width).toString()))
|
|
4234
|
+
|| (/[0-9]$/.test(this.height.toString()) && /[px]$/.test(this.height.toString()))) {
|
|
4235
|
+
failureCases.push('column width and height should be in pixels');
|
|
4236
|
+
}
|
|
4237
|
+
if (!isNullOrUndefined(this.childMapping) && !isNullOrUndefined(this.idMapping)) {
|
|
4238
|
+
failureCases.push('Both IdMapping and ChildMapping should not be used together for tree grid rendering.');
|
|
4239
|
+
}
|
|
4240
|
+
if ((!isNullOrUndefined(this.idMapping) && (isNullOrUndefined(this.parentIdMapping))) ||
|
|
4241
|
+
((isNullOrUndefined(this.idMapping) && (!isNullOrUndefined(this.parentIdMapping))))) {
|
|
4242
|
+
failureCases.push('IdMapping and ParentIdMapping properties should be defined and vice versa.');
|
|
4243
|
+
}
|
|
4244
|
+
const checkboxColumn = this.columnModel.filter((col) => col.showCheckbox);
|
|
4245
|
+
const treeColumn = this.columns[this.treeColumnIndex];
|
|
4246
|
+
if (checkboxColumn.length !== 0) {
|
|
4247
|
+
if (checkboxColumn !== treeColumn) {
|
|
4248
|
+
failureCases.push('ShowCheckbox column should not be defined other than the tree column.');
|
|
4249
|
+
}
|
|
4250
|
+
if (checkboxColumn.length > 1) {
|
|
4251
|
+
failureCases.push('Only one column can have the ShowCheckbox option enabled.');
|
|
4252
|
+
}
|
|
4253
|
+
}
|
|
4254
|
+
const alignColumn = this.columnModel.filter((col) => col.textAlign === 'Right' && col.field === this.columnModel[this.treeColumnIndex].field);
|
|
4255
|
+
if (alignColumn.length !== 0) {
|
|
4256
|
+
failureCases.push('TextAlign right for the tree column is not applicable.');
|
|
4257
|
+
}
|
|
4258
|
+
if (failureCases.length > 0) {
|
|
4259
|
+
const failureEventArgs = {
|
|
4260
|
+
error: {}
|
|
4261
|
+
};
|
|
4262
|
+
failureCases.forEach((failureCase, index) => {
|
|
4263
|
+
failureEventArgs.error[parseInt(index.toString(), 10)] = failureCase;
|
|
4264
|
+
});
|
|
4265
|
+
this.trigger(actionFailure, failureEventArgs);
|
|
4266
|
+
}
|
|
4267
|
+
}
|
|
4152
4268
|
refreshToolbarItems() {
|
|
4153
4269
|
const toolbarElement = this.toolbarModule.getToolbar();
|
|
4154
4270
|
const indentID = this.element.id + '_gridcontrol_indent';
|
|
@@ -4354,11 +4470,13 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
4354
4470
|
this.grid.on('initial-end', this.afterGridRender, this);
|
|
4355
4471
|
if (!isNullOrUndefined(this.loggerModule)) {
|
|
4356
4472
|
const loggerModule = 'loggerModule';
|
|
4357
|
-
this.loggerModule = this.grid[`${loggerModule}`] = new Logger
|
|
4473
|
+
this.loggerModule = this.grid[`${loggerModule}`] = new Logger(this.grid);
|
|
4358
4474
|
}
|
|
4359
4475
|
};
|
|
4360
4476
|
this.grid.printComplete = this.triggerEvents.bind(this);
|
|
4361
|
-
this.grid.actionFailure =
|
|
4477
|
+
this.grid.actionFailure = (args) => {
|
|
4478
|
+
this.trigger(actionFailure, args);
|
|
4479
|
+
};
|
|
4362
4480
|
this.extendedGridDataBoundEvent();
|
|
4363
4481
|
this.extendedGridEvents();
|
|
4364
4482
|
this.extendedGridActionEvents();
|
|
@@ -4446,7 +4564,7 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
4446
4564
|
treeGrid.notify('dataProcessor', args);
|
|
4447
4565
|
//args = treeGrid.dataModule.dataProcessor(args);
|
|
4448
4566
|
}
|
|
4449
|
-
extend(args, treeGrid.dataResults);
|
|
4567
|
+
extend$1(args, treeGrid.dataResults);
|
|
4450
4568
|
if (treeGrid.enableImmutableMode) {
|
|
4451
4569
|
args.result = args.result.slice();
|
|
4452
4570
|
}
|
|
@@ -4726,9 +4844,9 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
4726
4844
|
}
|
|
4727
4845
|
else {
|
|
4728
4846
|
if (this.grid.isFrozenGrid() && this.enableVirtualization && args['tableName'] === 'movable') {
|
|
4729
|
-
const movableContent
|
|
4730
|
-
const frozenContent
|
|
4731
|
-
movableContent
|
|
4847
|
+
const movableContent$1 = this.grid.element.querySelector('.' + movableContent);
|
|
4848
|
+
const frozenContent$1 = this.grid.element.querySelector('.' + frozenContent);
|
|
4849
|
+
movableContent$1.style.height = frozenContent$1.style.height = 'auto';
|
|
4732
4850
|
}
|
|
4733
4851
|
this.trigger(actionComplete, args);
|
|
4734
4852
|
}
|
|
@@ -5025,6 +5143,11 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
5025
5143
|
onPropertyChanged(newProp) {
|
|
5026
5144
|
const properties = Object.keys(newProp);
|
|
5027
5145
|
let requireRefresh = false;
|
|
5146
|
+
if (properties.indexOf('columns') > -1) {
|
|
5147
|
+
this.grid.columns = this.getGridColumns(newProp.columns);
|
|
5148
|
+
this.grid['updateColumnObject']();
|
|
5149
|
+
requireRefresh = true;
|
|
5150
|
+
}
|
|
5028
5151
|
for (const prop of properties) {
|
|
5029
5152
|
switch (prop) {
|
|
5030
5153
|
case 'treeColumnIndex':
|
|
@@ -5443,7 +5566,7 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
5443
5566
|
if (this.grid.editModule) {
|
|
5444
5567
|
if (!isNullOrUndefined(index)) {
|
|
5445
5568
|
const griddata = this.grid.getCurrentViewRecords()[parseInt(index.toString(), 10)];
|
|
5446
|
-
extend(griddata, data);
|
|
5569
|
+
extend$1(griddata, data);
|
|
5447
5570
|
this.grid.editModule.updateRow(index, griddata);
|
|
5448
5571
|
}
|
|
5449
5572
|
else {
|
|
@@ -5460,6 +5583,10 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
5460
5583
|
* @returns {void}
|
|
5461
5584
|
*/
|
|
5462
5585
|
deleteRecord(fieldName, data) {
|
|
5586
|
+
if ((isNullOrUndefined(fieldName) && (isNullOrUndefined(data)) || (this.getSelectedRecords().length <= 0))) {
|
|
5587
|
+
const error = 'The provided value for the fieldName and data is undefined. Please ensure the fieldName and data contains number.';
|
|
5588
|
+
this.trigger(actionFailure, { error: error });
|
|
5589
|
+
}
|
|
5463
5590
|
if (this.grid.editModule) {
|
|
5464
5591
|
this.grid.editModule.deleteRecord(fieldName, data);
|
|
5465
5592
|
}
|
|
@@ -5528,6 +5655,10 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
5528
5655
|
* @returns {void}
|
|
5529
5656
|
*/
|
|
5530
5657
|
deleteRow(tr) {
|
|
5658
|
+
if (isNullOrUndefined(tr)) {
|
|
5659
|
+
const error = 'The provided value for the tr is undefined. Please ensure the tr contains HTMLTableRowElement.';
|
|
5660
|
+
this.trigger(actionFailure, { error: error });
|
|
5661
|
+
}
|
|
5531
5662
|
if (this.grid.editModule) {
|
|
5532
5663
|
this.grid.editModule.deleteRow(tr);
|
|
5533
5664
|
}
|
|
@@ -5553,9 +5684,11 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
5553
5684
|
this.grid.setCellValue(key, field, value);
|
|
5554
5685
|
const rowIndex = this.grid.getRowIndexByPrimaryKey(key);
|
|
5555
5686
|
const record = this.getCurrentViewRecords()[parseInt(rowIndex.toString(), 10)];
|
|
5556
|
-
if (
|
|
5557
|
-
|
|
5687
|
+
if (isNullOrUndefined(record)) {
|
|
5688
|
+
const error = 'The provided value for the record is undefined. Please ensure the record contains ITreeData.';
|
|
5689
|
+
this.trigger(actionFailure, { error: error });
|
|
5558
5690
|
}
|
|
5691
|
+
editAction({ value: record, action: 'edit' }, this, this.isSelfReference, record.index, this.grid.selectedRowIndex, field);
|
|
5559
5692
|
}
|
|
5560
5693
|
/**
|
|
5561
5694
|
* Updates and refresh the particular row values based on the given primary key value.
|
|
@@ -5593,8 +5726,8 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
5593
5726
|
this.grid.setRowData(key, rowData);
|
|
5594
5727
|
const visibleRecords = this.getVisibleRecords();
|
|
5595
5728
|
if (visibleRecords.length > 0 && key === (visibleRecords[visibleRecords.length - 1])[`${primaryKey}`]) {
|
|
5596
|
-
const table
|
|
5597
|
-
const sHeight = table
|
|
5729
|
+
const table = this.getContentTable();
|
|
5730
|
+
const sHeight = table.scrollHeight;
|
|
5598
5731
|
const clientHeight = this.getContent().clientHeight;
|
|
5599
5732
|
this.lastRowBorder(this.getRows()[currentRecords.indexOf(record)], sHeight <= clientHeight);
|
|
5600
5733
|
}
|
|
@@ -5606,6 +5739,10 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
5606
5739
|
* @returns {void}
|
|
5607
5740
|
*/
|
|
5608
5741
|
goToPage(pageNo) {
|
|
5742
|
+
if (isNullOrUndefined(pageNo)) {
|
|
5743
|
+
const error = 'The provided value for the pageNo is undefined. Please ensure the pageNo contains number.';
|
|
5744
|
+
this.trigger(actionFailure, { error: error });
|
|
5745
|
+
}
|
|
5609
5746
|
if (this.grid.pagerModule) {
|
|
5610
5747
|
this.grid.pagerModule.goToPage(pageNo);
|
|
5611
5748
|
}
|
|
@@ -5707,6 +5844,10 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
5707
5844
|
* @returns {void}
|
|
5708
5845
|
*/
|
|
5709
5846
|
hideColumns(keys, hideBy) {
|
|
5847
|
+
if (isNullOrUndefined(keys)) {
|
|
5848
|
+
const error = 'The provided value for the keys is undefined. Please ensure the keys contains string.';
|
|
5849
|
+
this.trigger(actionFailure, { error: error });
|
|
5850
|
+
}
|
|
5710
5851
|
this.grid.hideColumns(keys, hideBy);
|
|
5711
5852
|
this.updateColumnModel();
|
|
5712
5853
|
}
|
|
@@ -5803,10 +5944,10 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
5803
5944
|
if (this.grid.columns.length !== this.columnModel.length) {
|
|
5804
5945
|
this.stackedHeader = true;
|
|
5805
5946
|
}
|
|
5806
|
-
if (this.stackedHeader && this.allowResizing) {
|
|
5947
|
+
if (this.stackedHeader && this.allowResizing && !isNullOrUndefined(this.columns)) {
|
|
5807
5948
|
this.updateColumnsWidth(this.columns);
|
|
5808
5949
|
}
|
|
5809
|
-
if (!this.stackedHeader) {
|
|
5950
|
+
if (!this.stackedHeader && !isNullOrUndefined(this.columns)) {
|
|
5810
5951
|
merge(this.columns, this.columnModel);
|
|
5811
5952
|
}
|
|
5812
5953
|
this[`${deepMerge}`] = undefined; // Workaround for blazor updateModel
|
|
@@ -5814,10 +5955,10 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
5814
5955
|
}
|
|
5815
5956
|
updateColumnsWidth(columns) {
|
|
5816
5957
|
columns.forEach((column) => {
|
|
5817
|
-
if (column.columns) {
|
|
5958
|
+
if (!isNullOrUndefined(column) && column.columns) {
|
|
5818
5959
|
this.updateColumnsWidth(column.columns);
|
|
5819
5960
|
}
|
|
5820
|
-
else if (column.field) {
|
|
5961
|
+
else if (!isNullOrUndefined(column) && column.field) {
|
|
5821
5962
|
const currentColumn = this.grid.getColumnByField(column.field);
|
|
5822
5963
|
if (!isNullOrUndefined(currentColumn)) {
|
|
5823
5964
|
column.width = currentColumn.width;
|
|
@@ -6120,6 +6261,10 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
6120
6261
|
* @returns {void}
|
|
6121
6262
|
*/
|
|
6122
6263
|
expandRow(row, record, key, level) {
|
|
6264
|
+
if (isNullOrUndefined(row) && isNullOrUndefined(record) && isNullOrUndefined(key) && isNullOrUndefined(level)) {
|
|
6265
|
+
const error = 'The provided value for the row is undefined. Please ensure the row contains row element.';
|
|
6266
|
+
this.trigger(actionFailure, { error: error });
|
|
6267
|
+
}
|
|
6123
6268
|
let parentRec = this.parentData;
|
|
6124
6269
|
if (!this.enableVirtualization) {
|
|
6125
6270
|
parentRec = this.flatData.filter((e) => {
|
|
@@ -6143,13 +6288,13 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
6143
6288
|
if (expandingArgs.expandAll) {
|
|
6144
6289
|
this.expandCollapseAllChildren(record, 'expand', key, level);
|
|
6145
6290
|
}
|
|
6146
|
-
this.expandRows(row, record, parentRec
|
|
6291
|
+
this.expandRows(row, record, parentRec);
|
|
6147
6292
|
}
|
|
6148
6293
|
});
|
|
6149
6294
|
}
|
|
6150
6295
|
else if ((!this.allowPaging || (pagerValuePresent && this.grid.pagerModule.pagerObj.pagerdropdownModule['dropDownListObject'].value === 'All')) &&
|
|
6151
6296
|
!this.expandAllPrevent && this.isExpandingEventTriggered) {
|
|
6152
|
-
this.expandRows(row, record, parentRec
|
|
6297
|
+
this.expandRows(row, record, parentRec);
|
|
6153
6298
|
}
|
|
6154
6299
|
this.isExpandingEventTriggered = true;
|
|
6155
6300
|
}
|
|
@@ -6160,13 +6305,13 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
6160
6305
|
if (expandingArgs.expandAll) {
|
|
6161
6306
|
this.expandCollapseAllChildren(record, 'expand', key, level);
|
|
6162
6307
|
}
|
|
6163
|
-
this.expandRows(row, record, parentRec
|
|
6308
|
+
this.expandRows(row, record, parentRec);
|
|
6164
6309
|
}
|
|
6165
6310
|
});
|
|
6166
6311
|
}
|
|
6167
6312
|
}
|
|
6168
6313
|
// Internal method to handle the rows expand
|
|
6169
|
-
expandRows(row, record, parentRec
|
|
6314
|
+
expandRows(row, record, parentRec) {
|
|
6170
6315
|
this.expandCollapse('expand', row, record);
|
|
6171
6316
|
const children = 'Children';
|
|
6172
6317
|
if (!(isRemoteData(this) && !isOffline(this)) && (!isCountRequired(this) || !isNullOrUndefined(record[`${children}`]))) {
|
|
@@ -6236,6 +6381,10 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
6236
6381
|
* @returns {void}
|
|
6237
6382
|
*/
|
|
6238
6383
|
collapseRow(row, record, key) {
|
|
6384
|
+
if (isNullOrUndefined(row) && isNullOrUndefined(record) && isNullOrUndefined(key)) {
|
|
6385
|
+
const error = 'The provided value for the row is undefined. Please ensure the row contains row element.';
|
|
6386
|
+
this.trigger(actionFailure, { error: error });
|
|
6387
|
+
}
|
|
6239
6388
|
let parentRec = this.parentData;
|
|
6240
6389
|
if (!this.enableVirtualization) {
|
|
6241
6390
|
parentRec = this.flatData.filter((e) => {
|
|
@@ -6252,12 +6401,12 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
6252
6401
|
if (collapsingArgs.collapseAll) {
|
|
6253
6402
|
this.expandCollapseAllChildren(record, 'collapse', key);
|
|
6254
6403
|
}
|
|
6255
|
-
this.collapseRows(row, record, parentRec
|
|
6404
|
+
this.collapseRows(row, record, parentRec);
|
|
6256
6405
|
}
|
|
6257
6406
|
});
|
|
6258
6407
|
}
|
|
6259
6408
|
else if (!this.allowPaging && !this.collapseAllPrevent && this.isCollapsingEventTriggered) {
|
|
6260
|
-
this.collapseRows(row, record, parentRec
|
|
6409
|
+
this.collapseRows(row, record, parentRec);
|
|
6261
6410
|
}
|
|
6262
6411
|
this.isCollapsingEventTriggered = true;
|
|
6263
6412
|
}
|
|
@@ -6265,13 +6414,13 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
6265
6414
|
const args = { data: record, row: row, cancel: false };
|
|
6266
6415
|
this.trigger(collapsing, args, (collapsingArgs) => {
|
|
6267
6416
|
if (!collapsingArgs.cancel && !isNullOrUndefined(record)) {
|
|
6268
|
-
this.collapseRows(row, record, parentRec
|
|
6417
|
+
this.collapseRows(row, record, parentRec);
|
|
6269
6418
|
}
|
|
6270
6419
|
});
|
|
6271
6420
|
}
|
|
6272
6421
|
}
|
|
6273
6422
|
// Internal method for handling the rows collapse
|
|
6274
|
-
collapseRows(row, record, parentRec
|
|
6423
|
+
collapseRows(row, record, parentRec) {
|
|
6275
6424
|
this.expandCollapse('collapse', row, record);
|
|
6276
6425
|
let collapseArgs = { data: record, row: row };
|
|
6277
6426
|
if (!isRemoteData(this)) {
|
|
@@ -6315,6 +6464,10 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
6315
6464
|
* @returns {void}
|
|
6316
6465
|
*/
|
|
6317
6466
|
expandAtLevel(level) {
|
|
6467
|
+
if (isNullOrUndefined(level)) {
|
|
6468
|
+
const error = 'The provided value for the level is undefined. Please ensure the level contains number.';
|
|
6469
|
+
this.trigger(actionFailure, { error: error });
|
|
6470
|
+
}
|
|
6318
6471
|
if (((this.allowPaging && this.pageSettings.pageSizeMode === 'All') || this.enableVirtualization) && !isRemoteData(this)) {
|
|
6319
6472
|
const rec = this.grid.dataSource.filter((e) => {
|
|
6320
6473
|
if (e.hasChildRecords && e.level === level) {
|
|
@@ -6337,6 +6490,10 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
6337
6490
|
* @returns {void}
|
|
6338
6491
|
*/
|
|
6339
6492
|
expandByKey(key) {
|
|
6493
|
+
if (isNullOrUndefined(key)) {
|
|
6494
|
+
const error = 'The provided value for the key is undefined. Please ensure the key contains number.';
|
|
6495
|
+
this.trigger(actionFailure, { error: error });
|
|
6496
|
+
}
|
|
6340
6497
|
this.expandCollapseActionByKey(key, 'Expand');
|
|
6341
6498
|
}
|
|
6342
6499
|
expandAction(record, key, level, isPaging = false) {
|
|
@@ -6389,6 +6546,10 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
6389
6546
|
* @returns {void}
|
|
6390
6547
|
*/
|
|
6391
6548
|
collapseAtLevel(level) {
|
|
6549
|
+
if (isNullOrUndefined(level)) {
|
|
6550
|
+
const error = 'The provided value for the level is undefined. Please ensure the level contains number.';
|
|
6551
|
+
this.trigger(actionFailure, { error: error });
|
|
6552
|
+
}
|
|
6392
6553
|
if (((this.allowPaging && this.pageSettings.pageSizeMode === 'All') || this.enableVirtualization) && !isRemoteData(this)) {
|
|
6393
6554
|
const record = this.grid.dataSource.filter((e) => {
|
|
6394
6555
|
if (e.hasChildRecords && e.level === level) {
|
|
@@ -6411,6 +6572,10 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
6411
6572
|
* @returns {void}
|
|
6412
6573
|
*/
|
|
6413
6574
|
collapseByKey(key) {
|
|
6575
|
+
if (isNullOrUndefined(key)) {
|
|
6576
|
+
const error = 'The provided value for the key is undefined. Please ensure the key contains number.';
|
|
6577
|
+
this.trigger(actionFailure, { error: error });
|
|
6578
|
+
}
|
|
6414
6579
|
this.expandCollapseActionByKey(key, 'Collapse');
|
|
6415
6580
|
}
|
|
6416
6581
|
expandCollapseActionByKey(key, action) {
|
|
@@ -6450,6 +6615,10 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
6450
6615
|
* @returns {void}
|
|
6451
6616
|
*/
|
|
6452
6617
|
expandAll() {
|
|
6618
|
+
if (this.getCurrentViewRecords().length === 0) {
|
|
6619
|
+
const error = 'The provided value for the datasource is undefined. Please ensure to add the dataSource.';
|
|
6620
|
+
this.trigger(actionFailure, { error: error });
|
|
6621
|
+
}
|
|
6453
6622
|
this.isExpandedEventTriggered = false;
|
|
6454
6623
|
this.isExpandingEventTriggered = false;
|
|
6455
6624
|
this.expandCollapseAll('expand');
|
|
@@ -6460,6 +6629,10 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
6460
6629
|
* @returns {void}
|
|
6461
6630
|
*/
|
|
6462
6631
|
collapseAll() {
|
|
6632
|
+
if (this.getCurrentViewRecords().length === 0) {
|
|
6633
|
+
const error = 'The provided value for the datasource is undefined. Please ensure to add the dataSource.';
|
|
6634
|
+
this.trigger(actionFailure, { error: error });
|
|
6635
|
+
}
|
|
6463
6636
|
this.isCollapsedEventTriggered = false;
|
|
6464
6637
|
this.isCollapsingEventTriggered = false;
|
|
6465
6638
|
this.expandCollapseAll('collapse');
|
|
@@ -6626,8 +6799,8 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
6626
6799
|
totalRows = [].slice.call(rows);
|
|
6627
6800
|
for (let i = totalRows.length - 1; i >= 0; i--) {
|
|
6628
6801
|
if (!isHidden(totalRows[parseInt(i.toString(), 10)])) {
|
|
6629
|
-
const table
|
|
6630
|
-
const sHeight = table
|
|
6802
|
+
const table = this.getContentTable();
|
|
6803
|
+
const sHeight = table.scrollHeight;
|
|
6631
6804
|
const clientHeight = this.getContent().clientHeight;
|
|
6632
6805
|
this.lastRowBorder(totalRows[parseInt(i.toString(), 10)], sHeight <= clientHeight);
|
|
6633
6806
|
break;
|
|
@@ -6686,8 +6859,8 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
6686
6859
|
if (childData[parseInt(i.toString(), 10)]) {
|
|
6687
6860
|
childData[parseInt(i.toString(), 10)].level = record.level + 1;
|
|
6688
6861
|
childData[parseInt(i.toString(), 10)].index = Math.ceil(Math.random() * 1000);
|
|
6689
|
-
childData[parseInt(i.toString(), 10)].parentItem = extend({}, record);
|
|
6690
|
-
childData[parseInt(i.toString(), 10)].taskData = extend({}, childData[parseInt(i.toString(), 10)]);
|
|
6862
|
+
childData[parseInt(i.toString(), 10)].parentItem = extend$1({}, record);
|
|
6863
|
+
childData[parseInt(i.toString(), 10)].taskData = extend$1({}, childData[parseInt(i.toString(), 10)]);
|
|
6691
6864
|
delete childData[parseInt(i.toString(), 10)].parentItem.childRecords;
|
|
6692
6865
|
delete childData[parseInt(i.toString(), 10)].taskData.parentItem;
|
|
6693
6866
|
childData[parseInt(i.toString(), 10)].parentUniqueID = record.uniqueID;
|
|
@@ -7001,6 +7174,10 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
7001
7174
|
* @returns {void}
|
|
7002
7175
|
*/
|
|
7003
7176
|
filterByColumn(fieldName, filterOperator, filterValue, predicate, matchCase, ignoreAccent, actualFilterValue, actualOperator) {
|
|
7177
|
+
if (isNullOrUndefined(fieldName) && isNullOrUndefined(filterOperator) && isNullOrUndefined(filterValue)) {
|
|
7178
|
+
const error = 'The provided value for the fieldName, filterOperator and filterValue are undefined. Please ensure the fieldName, filterOperator and filterValue.';
|
|
7179
|
+
this.trigger(actionFailure, { error: error });
|
|
7180
|
+
}
|
|
7004
7181
|
this.grid.filterByColumn(fieldName, filterOperator, filterValue, predicate, matchCase, ignoreAccent, actualFilterValue, actualOperator);
|
|
7005
7182
|
}
|
|
7006
7183
|
/**
|
|
@@ -7067,6 +7244,10 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
7067
7244
|
* @returns {void}
|
|
7068
7245
|
*/
|
|
7069
7246
|
paste(data, rowIndex, colIndex) {
|
|
7247
|
+
if (isNullOrUndefined(data) && isNullOrUndefined(rowIndex) && isNullOrUndefined(colIndex)) {
|
|
7248
|
+
const error = 'The provided value for the index is undefined. Please ensure the index contains number.';
|
|
7249
|
+
this.trigger(actionFailure, { error: error });
|
|
7250
|
+
}
|
|
7070
7251
|
this.clipboardModule.paste(data, rowIndex, colIndex);
|
|
7071
7252
|
}
|
|
7072
7253
|
/**
|
|
@@ -7278,7 +7459,7 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
7278
7459
|
* @returns {number} - Returns frozen column count
|
|
7279
7460
|
*/
|
|
7280
7461
|
getFrozenColumns() {
|
|
7281
|
-
return this.getFrozenCount(this.columns, 0) + this.frozenColumns;
|
|
7462
|
+
return this.getFrozenCount(!isNullOrUndefined(this.columns) && this.columns, 0) + this.frozenColumns;
|
|
7282
7463
|
}
|
|
7283
7464
|
getFrozenCount(cols, cnt) {
|
|
7284
7465
|
for (let j = 0, len = cols.length; j < len; j++) {
|
|
@@ -7335,6 +7516,10 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
7335
7516
|
* @returns {void}
|
|
7336
7517
|
*/
|
|
7337
7518
|
reorderRows(fromIndexes, toIndex, position) {
|
|
7519
|
+
if (isNullOrUndefined(fromIndexes) && isNullOrUndefined(toIndex) && isNullOrUndefined(position)) {
|
|
7520
|
+
const error = 'The provided value for the fromIndexes, toIndex and position is undefined. Please ensure the fromIndexes and toIndex contains number and position contains string.';
|
|
7521
|
+
this.trigger(actionFailure, { error: error });
|
|
7522
|
+
}
|
|
7338
7523
|
this.rowDragAndDropModule.reorderRows(fromIndexes, toIndex, position);
|
|
7339
7524
|
}
|
|
7340
7525
|
/**
|
|
@@ -7362,400 +7547,400 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
7362
7547
|
}
|
|
7363
7548
|
}
|
|
7364
7549
|
};
|
|
7365
|
-
__decorate([
|
|
7550
|
+
__decorate$b([
|
|
7366
7551
|
Property(0)
|
|
7367
7552
|
], TreeGrid.prototype, "frozenRows", void 0);
|
|
7368
|
-
__decorate([
|
|
7553
|
+
__decorate$b([
|
|
7369
7554
|
Property(0)
|
|
7370
7555
|
], TreeGrid.prototype, "frozenColumns", void 0);
|
|
7371
|
-
__decorate([
|
|
7556
|
+
__decorate$b([
|
|
7372
7557
|
Property('Ellipsis')
|
|
7373
7558
|
], TreeGrid.prototype, "clipMode", void 0);
|
|
7374
|
-
__decorate([
|
|
7559
|
+
__decorate$b([
|
|
7375
7560
|
Property([])
|
|
7376
7561
|
], TreeGrid.prototype, "columns", void 0);
|
|
7377
|
-
__decorate([
|
|
7562
|
+
__decorate$b([
|
|
7378
7563
|
Property(null)
|
|
7379
7564
|
], TreeGrid.prototype, "childMapping", void 0);
|
|
7380
|
-
__decorate([
|
|
7565
|
+
__decorate$b([
|
|
7381
7566
|
Property(null)
|
|
7382
7567
|
], TreeGrid.prototype, "hasChildMapping", void 0);
|
|
7383
|
-
__decorate([
|
|
7568
|
+
__decorate$b([
|
|
7384
7569
|
Property(0)
|
|
7385
7570
|
], TreeGrid.prototype, "treeColumnIndex", void 0);
|
|
7386
|
-
__decorate([
|
|
7571
|
+
__decorate$b([
|
|
7387
7572
|
Property(null)
|
|
7388
7573
|
], TreeGrid.prototype, "idMapping", void 0);
|
|
7389
|
-
__decorate([
|
|
7574
|
+
__decorate$b([
|
|
7390
7575
|
Property(null)
|
|
7391
7576
|
], TreeGrid.prototype, "parentIdMapping", void 0);
|
|
7392
|
-
__decorate([
|
|
7577
|
+
__decorate$b([
|
|
7393
7578
|
Property(false)
|
|
7394
7579
|
], TreeGrid.prototype, "enableCollapseAll", void 0);
|
|
7395
|
-
__decorate([
|
|
7580
|
+
__decorate$b([
|
|
7396
7581
|
Property(null)
|
|
7397
7582
|
], TreeGrid.prototype, "expandStateMapping", void 0);
|
|
7398
|
-
__decorate([
|
|
7583
|
+
__decorate$b([
|
|
7399
7584
|
Property(false)
|
|
7400
7585
|
], TreeGrid.prototype, "allowRowDragAndDrop", void 0);
|
|
7401
|
-
__decorate([
|
|
7586
|
+
__decorate$b([
|
|
7402
7587
|
Property([])
|
|
7403
7588
|
], TreeGrid.prototype, "dataSource", void 0);
|
|
7404
|
-
__decorate([
|
|
7589
|
+
__decorate$b([
|
|
7405
7590
|
Property()
|
|
7406
7591
|
], TreeGrid.prototype, "query", void 0);
|
|
7407
|
-
__decorate([
|
|
7592
|
+
__decorate$b([
|
|
7408
7593
|
Property()
|
|
7409
7594
|
], TreeGrid.prototype, "cloneQuery", void 0);
|
|
7410
|
-
__decorate([
|
|
7595
|
+
__decorate$b([
|
|
7411
7596
|
Property('AllPages')
|
|
7412
7597
|
], TreeGrid.prototype, "printMode", void 0);
|
|
7413
|
-
__decorate([
|
|
7598
|
+
__decorate$b([
|
|
7414
7599
|
Property(false)
|
|
7415
7600
|
], TreeGrid.prototype, "allowPaging", void 0);
|
|
7416
|
-
__decorate([
|
|
7601
|
+
__decorate$b([
|
|
7417
7602
|
Property(false)
|
|
7418
7603
|
], TreeGrid.prototype, "loadChildOnDemand", void 0);
|
|
7419
|
-
__decorate([
|
|
7604
|
+
__decorate$b([
|
|
7420
7605
|
Property(false)
|
|
7421
7606
|
], TreeGrid.prototype, "allowTextWrap", void 0);
|
|
7422
|
-
__decorate([
|
|
7607
|
+
__decorate$b([
|
|
7423
7608
|
Complex({}, TextWrapSettings)
|
|
7424
7609
|
], TreeGrid.prototype, "textWrapSettings", void 0);
|
|
7425
|
-
__decorate([
|
|
7610
|
+
__decorate$b([
|
|
7426
7611
|
Property(false)
|
|
7427
7612
|
], TreeGrid.prototype, "allowReordering", void 0);
|
|
7428
|
-
__decorate([
|
|
7613
|
+
__decorate$b([
|
|
7429
7614
|
Property(false)
|
|
7430
7615
|
], TreeGrid.prototype, "allowResizing", void 0);
|
|
7431
|
-
__decorate([
|
|
7616
|
+
__decorate$b([
|
|
7432
7617
|
Property(false)
|
|
7433
7618
|
], TreeGrid.prototype, "autoCheckHierarchy", void 0);
|
|
7434
|
-
__decorate([
|
|
7619
|
+
__decorate$b([
|
|
7435
7620
|
Complex({}, PageSettings)
|
|
7436
7621
|
], TreeGrid.prototype, "pageSettings", void 0);
|
|
7437
|
-
__decorate([
|
|
7438
|
-
Complex({}, RowDropSettings)
|
|
7622
|
+
__decorate$b([
|
|
7623
|
+
Complex({}, RowDropSettings$1)
|
|
7439
7624
|
], TreeGrid.prototype, "rowDropSettings", void 0);
|
|
7440
|
-
__decorate([
|
|
7625
|
+
__decorate$b([
|
|
7441
7626
|
Property('USD')
|
|
7442
7627
|
], TreeGrid.prototype, "currencyCode", void 0);
|
|
7443
|
-
__decorate([
|
|
7628
|
+
__decorate$b([
|
|
7444
7629
|
Property()
|
|
7445
7630
|
], TreeGrid.prototype, "pagerTemplate", void 0);
|
|
7446
|
-
__decorate([
|
|
7631
|
+
__decorate$b([
|
|
7447
7632
|
Property(false)
|
|
7448
7633
|
], TreeGrid.prototype, "showColumnMenu", void 0);
|
|
7449
|
-
__decorate([
|
|
7634
|
+
__decorate$b([
|
|
7450
7635
|
Property(false)
|
|
7451
7636
|
], TreeGrid.prototype, "showColumnChooser", void 0);
|
|
7452
|
-
__decorate([
|
|
7637
|
+
__decorate$b([
|
|
7453
7638
|
Property(false)
|
|
7454
7639
|
], TreeGrid.prototype, "allowSorting", void 0);
|
|
7455
|
-
__decorate([
|
|
7640
|
+
__decorate$b([
|
|
7456
7641
|
Property(true)
|
|
7457
7642
|
], TreeGrid.prototype, "allowMultiSorting", void 0);
|
|
7458
|
-
__decorate([
|
|
7643
|
+
__decorate$b([
|
|
7459
7644
|
Complex({}, SortSettings)
|
|
7460
7645
|
], TreeGrid.prototype, "sortSettings", void 0);
|
|
7461
|
-
__decorate([
|
|
7646
|
+
__decorate$b([
|
|
7462
7647
|
Collection([], AggregateRow)
|
|
7463
7648
|
], TreeGrid.prototype, "aggregates", void 0);
|
|
7464
|
-
__decorate([
|
|
7649
|
+
__decorate$b([
|
|
7465
7650
|
Complex({}, EditSettings)
|
|
7466
7651
|
], TreeGrid.prototype, "editSettings", void 0);
|
|
7467
|
-
__decorate([
|
|
7652
|
+
__decorate$b([
|
|
7468
7653
|
Property(false)
|
|
7469
7654
|
], TreeGrid.prototype, "allowFiltering", void 0);
|
|
7470
|
-
__decorate([
|
|
7655
|
+
__decorate$b([
|
|
7471
7656
|
Property()
|
|
7472
7657
|
], TreeGrid.prototype, "detailTemplate", void 0);
|
|
7473
|
-
__decorate([
|
|
7658
|
+
__decorate$b([
|
|
7474
7659
|
Complex({}, FilterSettings)
|
|
7475
7660
|
], TreeGrid.prototype, "filterSettings", void 0);
|
|
7476
|
-
__decorate([
|
|
7661
|
+
__decorate$b([
|
|
7477
7662
|
Complex({}, SearchSettings)
|
|
7478
7663
|
], TreeGrid.prototype, "searchSettings", void 0);
|
|
7479
|
-
__decorate([
|
|
7664
|
+
__decorate$b([
|
|
7480
7665
|
Property()
|
|
7481
7666
|
], TreeGrid.prototype, "toolbar", void 0);
|
|
7482
|
-
__decorate([
|
|
7667
|
+
__decorate$b([
|
|
7483
7668
|
Property()
|
|
7484
7669
|
], TreeGrid.prototype, "toolbarTemplate", void 0);
|
|
7485
|
-
__decorate([
|
|
7670
|
+
__decorate$b([
|
|
7486
7671
|
Property('Default')
|
|
7487
7672
|
], TreeGrid.prototype, "gridLines", void 0);
|
|
7488
|
-
__decorate([
|
|
7673
|
+
__decorate$b([
|
|
7489
7674
|
Property()
|
|
7490
7675
|
], TreeGrid.prototype, "contextMenuItems", void 0);
|
|
7491
|
-
__decorate([
|
|
7676
|
+
__decorate$b([
|
|
7492
7677
|
Property()
|
|
7493
7678
|
], TreeGrid.prototype, "columnMenuItems", void 0);
|
|
7494
|
-
__decorate([
|
|
7679
|
+
__decorate$b([
|
|
7495
7680
|
Property()
|
|
7496
7681
|
], TreeGrid.prototype, "rowTemplate", void 0);
|
|
7497
|
-
__decorate([
|
|
7682
|
+
__decorate$b([
|
|
7498
7683
|
Property('Parent')
|
|
7499
7684
|
], TreeGrid.prototype, "copyHierarchyMode", void 0);
|
|
7500
|
-
__decorate([
|
|
7685
|
+
__decorate$b([
|
|
7501
7686
|
Property(null)
|
|
7502
7687
|
], TreeGrid.prototype, "rowHeight", void 0);
|
|
7503
|
-
__decorate([
|
|
7688
|
+
__decorate$b([
|
|
7504
7689
|
Property(true)
|
|
7505
7690
|
], TreeGrid.prototype, "enableAltRow", void 0);
|
|
7506
|
-
__decorate([
|
|
7691
|
+
__decorate$b([
|
|
7507
7692
|
Property(true)
|
|
7508
7693
|
], TreeGrid.prototype, "allowKeyboard", void 0);
|
|
7509
|
-
__decorate([
|
|
7694
|
+
__decorate$b([
|
|
7510
7695
|
Property(false)
|
|
7511
7696
|
], TreeGrid.prototype, "enableHover", void 0);
|
|
7512
|
-
__decorate([
|
|
7697
|
+
__decorate$b([
|
|
7513
7698
|
Property(false)
|
|
7514
7699
|
], TreeGrid.prototype, "enableAutoFill", void 0);
|
|
7515
|
-
__decorate([
|
|
7700
|
+
__decorate$b([
|
|
7516
7701
|
Property(false)
|
|
7517
7702
|
], TreeGrid.prototype, "enableAdaptiveUI", void 0);
|
|
7518
|
-
__decorate([
|
|
7703
|
+
__decorate$b([
|
|
7519
7704
|
Property(false)
|
|
7520
7705
|
], TreeGrid.prototype, "enableImmutableMode", void 0);
|
|
7521
|
-
__decorate([
|
|
7706
|
+
__decorate$b([
|
|
7522
7707
|
Property('auto')
|
|
7523
7708
|
], TreeGrid.prototype, "height", void 0);
|
|
7524
|
-
__decorate([
|
|
7709
|
+
__decorate$b([
|
|
7525
7710
|
Property('auto')
|
|
7526
7711
|
], TreeGrid.prototype, "width", void 0);
|
|
7527
|
-
__decorate([
|
|
7712
|
+
__decorate$b([
|
|
7528
7713
|
Complex({}, LoadingIndicator)
|
|
7529
7714
|
], TreeGrid.prototype, "loadingIndicator", void 0);
|
|
7530
|
-
__decorate([
|
|
7715
|
+
__decorate$b([
|
|
7531
7716
|
Property(true)
|
|
7532
7717
|
], TreeGrid.prototype, "enableVirtualMaskRow", void 0);
|
|
7533
|
-
__decorate([
|
|
7718
|
+
__decorate$b([
|
|
7534
7719
|
Property(false)
|
|
7535
7720
|
], TreeGrid.prototype, "enableVirtualization", void 0);
|
|
7536
|
-
__decorate([
|
|
7721
|
+
__decorate$b([
|
|
7537
7722
|
Property(false)
|
|
7538
7723
|
], TreeGrid.prototype, "enableColumnVirtualization", void 0);
|
|
7539
|
-
__decorate([
|
|
7724
|
+
__decorate$b([
|
|
7540
7725
|
Property(false)
|
|
7541
7726
|
], TreeGrid.prototype, "enableHtmlSanitizer", void 0);
|
|
7542
|
-
__decorate([
|
|
7727
|
+
__decorate$b([
|
|
7543
7728
|
Property(false)
|
|
7544
7729
|
], TreeGrid.prototype, "enableInfiniteScrolling", void 0);
|
|
7545
|
-
__decorate([
|
|
7730
|
+
__decorate$b([
|
|
7546
7731
|
Complex({}, InfiniteScrollSettings)
|
|
7547
7732
|
], TreeGrid.prototype, "infiniteScrollSettings", void 0);
|
|
7548
|
-
__decorate([
|
|
7733
|
+
__decorate$b([
|
|
7549
7734
|
Property('All')
|
|
7550
7735
|
], TreeGrid.prototype, "columnQueryMode", void 0);
|
|
7551
|
-
__decorate([
|
|
7736
|
+
__decorate$b([
|
|
7552
7737
|
Event()
|
|
7553
7738
|
], TreeGrid.prototype, "created", void 0);
|
|
7554
|
-
__decorate([
|
|
7739
|
+
__decorate$b([
|
|
7555
7740
|
Event()
|
|
7556
7741
|
], TreeGrid.prototype, "load", void 0);
|
|
7557
|
-
__decorate([
|
|
7742
|
+
__decorate$b([
|
|
7558
7743
|
Event()
|
|
7559
7744
|
], TreeGrid.prototype, "expanding", void 0);
|
|
7560
|
-
__decorate([
|
|
7745
|
+
__decorate$b([
|
|
7561
7746
|
Event()
|
|
7562
7747
|
], TreeGrid.prototype, "expanded", void 0);
|
|
7563
|
-
__decorate([
|
|
7748
|
+
__decorate$b([
|
|
7564
7749
|
Event()
|
|
7565
7750
|
], TreeGrid.prototype, "collapsing", void 0);
|
|
7566
|
-
__decorate([
|
|
7751
|
+
__decorate$b([
|
|
7567
7752
|
Event()
|
|
7568
7753
|
], TreeGrid.prototype, "collapsed", void 0);
|
|
7569
|
-
__decorate([
|
|
7754
|
+
__decorate$b([
|
|
7570
7755
|
Event()
|
|
7571
7756
|
], TreeGrid.prototype, "cellSave", void 0);
|
|
7572
|
-
__decorate([
|
|
7757
|
+
__decorate$b([
|
|
7573
7758
|
Event()
|
|
7574
7759
|
], TreeGrid.prototype, "cellSaved", void 0);
|
|
7575
|
-
__decorate([
|
|
7760
|
+
__decorate$b([
|
|
7576
7761
|
Event()
|
|
7577
7762
|
], TreeGrid.prototype, "actionBegin", void 0);
|
|
7578
|
-
__decorate([
|
|
7763
|
+
__decorate$b([
|
|
7579
7764
|
Event()
|
|
7580
7765
|
], TreeGrid.prototype, "actionComplete", void 0);
|
|
7581
|
-
__decorate([
|
|
7766
|
+
__decorate$b([
|
|
7582
7767
|
Event()
|
|
7583
7768
|
], TreeGrid.prototype, "beginEdit", void 0);
|
|
7584
|
-
__decorate([
|
|
7769
|
+
__decorate$b([
|
|
7585
7770
|
Event()
|
|
7586
7771
|
], TreeGrid.prototype, "batchAdd", void 0);
|
|
7587
|
-
__decorate([
|
|
7772
|
+
__decorate$b([
|
|
7588
7773
|
Event()
|
|
7589
7774
|
], TreeGrid.prototype, "batchDelete", void 0);
|
|
7590
|
-
__decorate([
|
|
7775
|
+
__decorate$b([
|
|
7591
7776
|
Event()
|
|
7592
7777
|
], TreeGrid.prototype, "batchCancel", void 0);
|
|
7593
|
-
__decorate([
|
|
7778
|
+
__decorate$b([
|
|
7594
7779
|
Event()
|
|
7595
7780
|
], TreeGrid.prototype, "beforeBatchAdd", void 0);
|
|
7596
|
-
__decorate([
|
|
7781
|
+
__decorate$b([
|
|
7597
7782
|
Event()
|
|
7598
7783
|
], TreeGrid.prototype, "beforeBatchDelete", void 0);
|
|
7599
|
-
__decorate([
|
|
7784
|
+
__decorate$b([
|
|
7600
7785
|
Event()
|
|
7601
7786
|
], TreeGrid.prototype, "beforeBatchSave", void 0);
|
|
7602
|
-
__decorate([
|
|
7787
|
+
__decorate$b([
|
|
7603
7788
|
Event()
|
|
7604
7789
|
], TreeGrid.prototype, "cellEdit", void 0);
|
|
7605
|
-
__decorate([
|
|
7790
|
+
__decorate$b([
|
|
7606
7791
|
Event()
|
|
7607
7792
|
], TreeGrid.prototype, "actionFailure", void 0);
|
|
7608
|
-
__decorate([
|
|
7793
|
+
__decorate$b([
|
|
7609
7794
|
Event()
|
|
7610
7795
|
], TreeGrid.prototype, "dataBound", void 0);
|
|
7611
|
-
__decorate([
|
|
7796
|
+
__decorate$b([
|
|
7612
7797
|
Event()
|
|
7613
7798
|
], TreeGrid.prototype, "dataSourceChanged", void 0);
|
|
7614
|
-
__decorate([
|
|
7799
|
+
__decorate$b([
|
|
7615
7800
|
Event()
|
|
7616
7801
|
], TreeGrid.prototype, "dataStateChange", void 0);
|
|
7617
|
-
__decorate([
|
|
7802
|
+
__decorate$b([
|
|
7618
7803
|
Event()
|
|
7619
7804
|
], TreeGrid.prototype, "recordDoubleClick", void 0);
|
|
7620
|
-
__decorate([
|
|
7805
|
+
__decorate$b([
|
|
7621
7806
|
Event()
|
|
7622
7807
|
], TreeGrid.prototype, "rowDataBound", void 0);
|
|
7623
|
-
__decorate([
|
|
7808
|
+
__decorate$b([
|
|
7624
7809
|
Event()
|
|
7625
7810
|
], TreeGrid.prototype, "detailDataBound", void 0);
|
|
7626
|
-
__decorate([
|
|
7811
|
+
__decorate$b([
|
|
7627
7812
|
Event()
|
|
7628
7813
|
], TreeGrid.prototype, "queryCellInfo", void 0);
|
|
7629
|
-
__decorate([
|
|
7814
|
+
__decorate$b([
|
|
7630
7815
|
Property(true)
|
|
7631
7816
|
], TreeGrid.prototype, "allowSelection", void 0);
|
|
7632
|
-
__decorate([
|
|
7817
|
+
__decorate$b([
|
|
7633
7818
|
Event()
|
|
7634
7819
|
], TreeGrid.prototype, "rowSelecting", void 0);
|
|
7635
|
-
__decorate([
|
|
7820
|
+
__decorate$b([
|
|
7636
7821
|
Event()
|
|
7637
7822
|
], TreeGrid.prototype, "rowSelected", void 0);
|
|
7638
|
-
__decorate([
|
|
7823
|
+
__decorate$b([
|
|
7639
7824
|
Event()
|
|
7640
7825
|
], TreeGrid.prototype, "rowDeselecting", void 0);
|
|
7641
|
-
__decorate([
|
|
7826
|
+
__decorate$b([
|
|
7642
7827
|
Event()
|
|
7643
7828
|
], TreeGrid.prototype, "rowDeselected", void 0);
|
|
7644
|
-
__decorate([
|
|
7829
|
+
__decorate$b([
|
|
7645
7830
|
Event()
|
|
7646
7831
|
], TreeGrid.prototype, "headerCellInfo", void 0);
|
|
7647
|
-
__decorate([
|
|
7832
|
+
__decorate$b([
|
|
7648
7833
|
Event()
|
|
7649
7834
|
], TreeGrid.prototype, "cellSelecting", void 0);
|
|
7650
|
-
__decorate([
|
|
7835
|
+
__decorate$b([
|
|
7651
7836
|
Event()
|
|
7652
7837
|
], TreeGrid.prototype, "columnMenuOpen", void 0);
|
|
7653
|
-
__decorate([
|
|
7838
|
+
__decorate$b([
|
|
7654
7839
|
Event()
|
|
7655
7840
|
], TreeGrid.prototype, "columnMenuClick", void 0);
|
|
7656
|
-
__decorate([
|
|
7841
|
+
__decorate$b([
|
|
7657
7842
|
Event()
|
|
7658
7843
|
], TreeGrid.prototype, "cellSelected", void 0);
|
|
7659
|
-
__decorate([
|
|
7844
|
+
__decorate$b([
|
|
7660
7845
|
Event()
|
|
7661
7846
|
], TreeGrid.prototype, "cellDeselecting", void 0);
|
|
7662
|
-
__decorate([
|
|
7847
|
+
__decorate$b([
|
|
7663
7848
|
Event()
|
|
7664
7849
|
], TreeGrid.prototype, "cellDeselected", void 0);
|
|
7665
|
-
__decorate([
|
|
7850
|
+
__decorate$b([
|
|
7666
7851
|
Event()
|
|
7667
7852
|
], TreeGrid.prototype, "resizeStart", void 0);
|
|
7668
|
-
__decorate([
|
|
7853
|
+
__decorate$b([
|
|
7669
7854
|
Event()
|
|
7670
7855
|
], TreeGrid.prototype, "resizing", void 0);
|
|
7671
|
-
__decorate([
|
|
7856
|
+
__decorate$b([
|
|
7672
7857
|
Event()
|
|
7673
7858
|
], TreeGrid.prototype, "resizeStop", void 0);
|
|
7674
|
-
__decorate([
|
|
7859
|
+
__decorate$b([
|
|
7675
7860
|
Event()
|
|
7676
7861
|
], TreeGrid.prototype, "columnDragStart", void 0);
|
|
7677
|
-
__decorate([
|
|
7862
|
+
__decorate$b([
|
|
7678
7863
|
Event()
|
|
7679
7864
|
], TreeGrid.prototype, "columnDrag", void 0);
|
|
7680
|
-
__decorate([
|
|
7865
|
+
__decorate$b([
|
|
7681
7866
|
Event()
|
|
7682
7867
|
], TreeGrid.prototype, "columnDrop", void 0);
|
|
7683
|
-
__decorate([
|
|
7868
|
+
__decorate$b([
|
|
7684
7869
|
Event()
|
|
7685
7870
|
], TreeGrid.prototype, "checkboxChange", void 0);
|
|
7686
|
-
__decorate([
|
|
7871
|
+
__decorate$b([
|
|
7687
7872
|
Event()
|
|
7688
7873
|
], TreeGrid.prototype, "printComplete", void 0);
|
|
7689
|
-
__decorate([
|
|
7874
|
+
__decorate$b([
|
|
7690
7875
|
Event()
|
|
7691
7876
|
], TreeGrid.prototype, "beforePrint", void 0);
|
|
7692
|
-
__decorate([
|
|
7877
|
+
__decorate$b([
|
|
7693
7878
|
Event()
|
|
7694
7879
|
], TreeGrid.prototype, "toolbarClick", void 0);
|
|
7695
|
-
__decorate([
|
|
7880
|
+
__decorate$b([
|
|
7696
7881
|
Event()
|
|
7697
7882
|
], TreeGrid.prototype, "beforeDataBound", void 0);
|
|
7698
|
-
__decorate([
|
|
7883
|
+
__decorate$b([
|
|
7699
7884
|
Event()
|
|
7700
7885
|
], TreeGrid.prototype, "contextMenuOpen", void 0);
|
|
7701
|
-
__decorate([
|
|
7886
|
+
__decorate$b([
|
|
7702
7887
|
Event()
|
|
7703
7888
|
], TreeGrid.prototype, "contextMenuClick", void 0);
|
|
7704
|
-
__decorate([
|
|
7889
|
+
__decorate$b([
|
|
7705
7890
|
Event()
|
|
7706
7891
|
], TreeGrid.prototype, "beforeCopy", void 0);
|
|
7707
|
-
__decorate([
|
|
7892
|
+
__decorate$b([
|
|
7708
7893
|
Event()
|
|
7709
7894
|
], TreeGrid.prototype, "beforePaste", void 0);
|
|
7710
|
-
__decorate([
|
|
7895
|
+
__decorate$b([
|
|
7711
7896
|
Event()
|
|
7712
7897
|
], TreeGrid.prototype, "rowDrag", void 0);
|
|
7713
|
-
__decorate([
|
|
7898
|
+
__decorate$b([
|
|
7714
7899
|
Event()
|
|
7715
7900
|
], TreeGrid.prototype, "rowDragStart", void 0);
|
|
7716
|
-
__decorate([
|
|
7901
|
+
__decorate$b([
|
|
7717
7902
|
Event()
|
|
7718
7903
|
], TreeGrid.prototype, "rowDragStartHelper", void 0);
|
|
7719
|
-
__decorate([
|
|
7904
|
+
__decorate$b([
|
|
7720
7905
|
Event()
|
|
7721
7906
|
], TreeGrid.prototype, "rowDrop", void 0);
|
|
7722
|
-
__decorate([
|
|
7907
|
+
__decorate$b([
|
|
7723
7908
|
Property(-1)
|
|
7724
7909
|
], TreeGrid.prototype, "selectedRowIndex", void 0);
|
|
7725
|
-
__decorate([
|
|
7910
|
+
__decorate$b([
|
|
7726
7911
|
Complex({}, SelectionSettings)
|
|
7727
7912
|
], TreeGrid.prototype, "selectionSettings", void 0);
|
|
7728
|
-
__decorate([
|
|
7913
|
+
__decorate$b([
|
|
7729
7914
|
Property(false)
|
|
7730
7915
|
], TreeGrid.prototype, "allowExcelExport", void 0);
|
|
7731
|
-
__decorate([
|
|
7916
|
+
__decorate$b([
|
|
7732
7917
|
Property(false)
|
|
7733
7918
|
], TreeGrid.prototype, "allowPdfExport", void 0);
|
|
7734
|
-
__decorate([
|
|
7919
|
+
__decorate$b([
|
|
7735
7920
|
Event()
|
|
7736
7921
|
], TreeGrid.prototype, "pdfQueryCellInfo", void 0);
|
|
7737
|
-
__decorate([
|
|
7922
|
+
__decorate$b([
|
|
7738
7923
|
Event()
|
|
7739
7924
|
], TreeGrid.prototype, "pdfHeaderQueryCellInfo", void 0);
|
|
7740
|
-
__decorate([
|
|
7925
|
+
__decorate$b([
|
|
7741
7926
|
Event()
|
|
7742
7927
|
], TreeGrid.prototype, "excelQueryCellInfo", void 0);
|
|
7743
|
-
__decorate([
|
|
7928
|
+
__decorate$b([
|
|
7744
7929
|
Event()
|
|
7745
7930
|
], TreeGrid.prototype, "excelHeaderQueryCellInfo", void 0);
|
|
7746
|
-
__decorate([
|
|
7931
|
+
__decorate$b([
|
|
7747
7932
|
Event()
|
|
7748
7933
|
], TreeGrid.prototype, "beforeExcelExport", void 0);
|
|
7749
|
-
__decorate([
|
|
7934
|
+
__decorate$b([
|
|
7750
7935
|
Event()
|
|
7751
7936
|
], TreeGrid.prototype, "excelExportComplete", void 0);
|
|
7752
|
-
__decorate([
|
|
7937
|
+
__decorate$b([
|
|
7753
7938
|
Event()
|
|
7754
7939
|
], TreeGrid.prototype, "beforePdfExport", void 0);
|
|
7755
|
-
__decorate([
|
|
7940
|
+
__decorate$b([
|
|
7756
7941
|
Event()
|
|
7757
7942
|
], TreeGrid.prototype, "pdfExportComplete", void 0);
|
|
7758
|
-
TreeGrid = TreeGrid_1 = __decorate([
|
|
7943
|
+
TreeGrid = TreeGrid_1 = __decorate$b([
|
|
7759
7944
|
NotifyPropertyChanges
|
|
7760
7945
|
], TreeGrid);
|
|
7761
7946
|
|
|
@@ -7764,14 +7949,14 @@ TreeGrid = TreeGrid_1 = __decorate([
|
|
|
7764
7949
|
*
|
|
7765
7950
|
* @hidden
|
|
7766
7951
|
*/
|
|
7767
|
-
class Reorder
|
|
7952
|
+
class Reorder {
|
|
7768
7953
|
/**
|
|
7769
7954
|
* Constructor for Reorder module
|
|
7770
7955
|
*
|
|
7771
7956
|
* @param {TreeGrid} parent - Tree Grid instance
|
|
7772
7957
|
*/
|
|
7773
7958
|
constructor(parent) {
|
|
7774
|
-
Grid.Inject(Reorder);
|
|
7959
|
+
Grid.Inject(Reorder$1);
|
|
7775
7960
|
this.parent = parent;
|
|
7776
7961
|
this.addEventListener();
|
|
7777
7962
|
}
|
|
@@ -7828,14 +8013,14 @@ class Reorder$1 {
|
|
|
7828
8013
|
*
|
|
7829
8014
|
* @hidden
|
|
7830
8015
|
*/
|
|
7831
|
-
class Resize
|
|
8016
|
+
class Resize {
|
|
7832
8017
|
/**
|
|
7833
8018
|
* Constructor for Resize module
|
|
7834
8019
|
*
|
|
7835
8020
|
* @param {TreeGrid} parent - Tree Grid instance
|
|
7836
8021
|
*/
|
|
7837
8022
|
constructor(parent) {
|
|
7838
|
-
Grid.Inject(Resize);
|
|
8023
|
+
Grid.Inject(Resize$1);
|
|
7839
8024
|
this.parent = parent;
|
|
7840
8025
|
}
|
|
7841
8026
|
/**
|
|
@@ -7875,7 +8060,7 @@ class Resize$1 {
|
|
|
7875
8060
|
*
|
|
7876
8061
|
* @hidden
|
|
7877
8062
|
*/
|
|
7878
|
-
class RowDD
|
|
8063
|
+
class RowDD {
|
|
7879
8064
|
/**
|
|
7880
8065
|
* Constructor for render module
|
|
7881
8066
|
*
|
|
@@ -7896,7 +8081,7 @@ class RowDD$1 {
|
|
|
7896
8081
|
this.hasDropItem = true;
|
|
7897
8082
|
/** @hidden */
|
|
7898
8083
|
this.isaddtoBottom = false;
|
|
7899
|
-
Grid.Inject(RowDD);
|
|
8084
|
+
Grid.Inject(RowDD$1);
|
|
7900
8085
|
this.parent = parent;
|
|
7901
8086
|
this.addEventListener();
|
|
7902
8087
|
}
|
|
@@ -8167,15 +8352,17 @@ class RowDD$1 {
|
|
|
8167
8352
|
!Object.prototype.hasOwnProperty.call(draggedRecord.taskData, tObj.childMapping)) {
|
|
8168
8353
|
draggedRecord.taskData[tObj.childMapping] = [];
|
|
8169
8354
|
}
|
|
8170
|
-
if (
|
|
8171
|
-
(draggedRecord
|
|
8172
|
-
|
|
8173
|
-
|
|
8174
|
-
|
|
8175
|
-
|
|
8176
|
-
dragRecords.
|
|
8177
|
-
|
|
8178
|
-
|
|
8355
|
+
if (!isNullOrUndefined(draggedRecord[tObj.childMapping])) {
|
|
8356
|
+
if (Object.prototype.hasOwnProperty.call(draggedRecord, tObj.childMapping) &&
|
|
8357
|
+
(draggedRecord[tObj.childMapping]).length && !this.isDraggedWithChild &&
|
|
8358
|
+
!isNullOrUndefined(tObj.parentIdMapping)) {
|
|
8359
|
+
const childData = (draggedRecord[tObj.childMapping]);
|
|
8360
|
+
for (let j = 0; j < childData.length; j++) {
|
|
8361
|
+
if (dragRecords.indexOf(childData[parseInt(j.toString(), 10)]) === -1) {
|
|
8362
|
+
dragRecords.splice(j, 0, childData[parseInt(j.toString(), 10)]);
|
|
8363
|
+
childData[parseInt(j.toString(), 10)].taskData = extend$1({}, childData[parseInt(j.toString(), 10)]);
|
|
8364
|
+
i += 1;
|
|
8365
|
+
}
|
|
8179
8366
|
}
|
|
8180
8367
|
}
|
|
8181
8368
|
}
|
|
@@ -8249,8 +8436,8 @@ class RowDD$1 {
|
|
|
8249
8436
|
else {
|
|
8250
8437
|
tempDataSource = proxy.dataSource;
|
|
8251
8438
|
}
|
|
8252
|
-
|
|
8253
|
-
|
|
8439
|
+
if (tempDataSource && (!isNullOrUndefined(droppedRecord) && !droppedRecord.parentItem)
|
|
8440
|
+
&& !isNullOrUndefined(droppedRecord.taskData)) {
|
|
8254
8441
|
const keys = Object.keys(tempDataSource);
|
|
8255
8442
|
for (let i = 0; i < keys.length; i++) {
|
|
8256
8443
|
if (tempDataSource[parseInt(i.toString(), 10)][this.parent.childMapping] ===
|
|
@@ -8464,16 +8651,16 @@ class RowDD$1 {
|
|
|
8464
8651
|
classList(ele, ['e-errorcontainer'], []);
|
|
8465
8652
|
classList(ele, ['e-icons', 'e-errorelem'], []);
|
|
8466
8653
|
const errorVal = dragelem.querySelector('.errorValue');
|
|
8467
|
-
let content
|
|
8654
|
+
let content = dragelem.querySelector('.e-rowcell').innerHTML;
|
|
8468
8655
|
if (errorVal) {
|
|
8469
|
-
content
|
|
8656
|
+
content = this.parent[`${sanitize}`](errorVal.innerHTML);
|
|
8470
8657
|
errorVal.parentNode.removeChild(errorVal);
|
|
8471
8658
|
}
|
|
8472
8659
|
dragelem.querySelector('.e-rowcell').innerHTML = '';
|
|
8473
8660
|
const spanContent = document.createElement('span');
|
|
8474
8661
|
spanContent.className = 'errorValue';
|
|
8475
8662
|
spanContent.style.paddingLeft = '16px';
|
|
8476
|
-
spanContent.innerHTML = this.parent[`${sanitize}`](content
|
|
8663
|
+
spanContent.innerHTML = this.parent[`${sanitize}`](content);
|
|
8477
8664
|
dragelem.querySelector('.e-rowcell').appendChild(ele);
|
|
8478
8665
|
dragelem.querySelector('.e-rowcell').appendChild(spanContent);
|
|
8479
8666
|
const dropItemSpan = document.querySelector('.e-dropitemscount');
|
|
@@ -8962,7 +9149,7 @@ class RowDD$1 {
|
|
|
8962
9149
|
}
|
|
8963
9150
|
}
|
|
8964
9151
|
if (this.dropPosition === 'middleSegment') {
|
|
8965
|
-
const parentItem = extend({}, droppedRecord);
|
|
9152
|
+
const parentItem = extend$1({}, droppedRecord);
|
|
8966
9153
|
delete parentItem.childRecords;
|
|
8967
9154
|
draggedRecord.parentItem = parentItem;
|
|
8968
9155
|
draggedRecord.parentUniqueID = droppedRecord.uniqueID;
|
|
@@ -9253,11 +9440,7 @@ class RowDD$1 {
|
|
|
9253
9440
|
}
|
|
9254
9441
|
}
|
|
9255
9442
|
|
|
9256
|
-
|
|
9257
|
-
* Base export
|
|
9258
|
-
*/
|
|
9259
|
-
|
|
9260
|
-
var __decorate$12 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
9443
|
+
var __decorate$c = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
9261
9444
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
9262
9445
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
9263
9446
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
@@ -9266,15 +9449,11 @@ var __decorate$12 = (undefined && undefined.__decorate) || function (decorators,
|
|
|
9266
9449
|
/**
|
|
9267
9450
|
* Configures the row drop settings of the TreeGrid.
|
|
9268
9451
|
*/
|
|
9269
|
-
class RowDropSettings
|
|
9452
|
+
class RowDropSettings extends ChildProperty {
|
|
9270
9453
|
}
|
|
9271
|
-
__decorate$
|
|
9454
|
+
__decorate$c([
|
|
9272
9455
|
Property()
|
|
9273
|
-
], RowDropSettings
|
|
9274
|
-
|
|
9275
|
-
/**
|
|
9276
|
-
* Models export
|
|
9277
|
-
*/
|
|
9456
|
+
], RowDropSettings.prototype, "targetID", void 0);
|
|
9278
9457
|
|
|
9279
9458
|
/**
|
|
9280
9459
|
* RowModelGenerator is used to generate grid data rows.
|
|
@@ -9328,8 +9507,8 @@ class TreeVirtualRowModelGenerator extends VirtualRowModelGenerator {
|
|
|
9328
9507
|
const rows = super.generateRows(data, notifyArgs);
|
|
9329
9508
|
if (!isNullOrUndefined((this.visualData))) {
|
|
9330
9509
|
for (let r = 0; r < rows.length; r++) {
|
|
9331
|
-
rows[parseInt(r.toString(), 10)].index
|
|
9332
|
-
(this.visualData).indexOf(rows[parseInt(r.toString(), 10)].data);
|
|
9510
|
+
rows[parseInt(r.toString(), 10)].index
|
|
9511
|
+
= (this.visualData).indexOf(rows[parseInt(r.toString(), 10)].data);
|
|
9333
9512
|
}
|
|
9334
9513
|
}
|
|
9335
9514
|
return rows;
|
|
@@ -9368,23 +9547,19 @@ class TreeVirtualRowModelGenerator extends VirtualRowModelGenerator {
|
|
|
9368
9547
|
}
|
|
9369
9548
|
}
|
|
9370
9549
|
|
|
9371
|
-
/**
|
|
9372
|
-
* Renderer export
|
|
9373
|
-
*/
|
|
9374
|
-
|
|
9375
9550
|
/**
|
|
9376
9551
|
* TreeGrid Filter module will handle filtering action
|
|
9377
9552
|
*
|
|
9378
9553
|
* @hidden
|
|
9379
9554
|
*/
|
|
9380
|
-
class Filter
|
|
9555
|
+
class Filter {
|
|
9381
9556
|
/**
|
|
9382
9557
|
* Constructor for Filter module
|
|
9383
9558
|
*
|
|
9384
9559
|
* @param {TreeGrid} parent - Tree Grid instance
|
|
9385
9560
|
*/
|
|
9386
9561
|
constructor(parent) {
|
|
9387
|
-
Grid.Inject(Filter);
|
|
9562
|
+
Grid.Inject(Filter$1);
|
|
9388
9563
|
this.parent = parent;
|
|
9389
9564
|
this.isHierarchyFilter = false;
|
|
9390
9565
|
this.filteredResult = [];
|
|
@@ -9606,7 +9781,7 @@ class Filter$1 {
|
|
|
9606
9781
|
*
|
|
9607
9782
|
* @hidden
|
|
9608
9783
|
*/
|
|
9609
|
-
class ExcelExport
|
|
9784
|
+
class ExcelExport {
|
|
9610
9785
|
/**
|
|
9611
9786
|
* Constructor for Excel Export module
|
|
9612
9787
|
*
|
|
@@ -9614,7 +9789,7 @@ class ExcelExport$1 {
|
|
|
9614
9789
|
*/
|
|
9615
9790
|
constructor(parent) {
|
|
9616
9791
|
this.isCollapsedStatePersist = false;
|
|
9617
|
-
Grid.Inject(ExcelExport);
|
|
9792
|
+
Grid.Inject(ExcelExport$1);
|
|
9618
9793
|
this.parent = parent;
|
|
9619
9794
|
this.dataResults = {};
|
|
9620
9795
|
this.addEventListener();
|
|
@@ -9667,15 +9842,21 @@ class ExcelExport$1 {
|
|
|
9667
9842
|
/* eslint-disable-next-line */
|
|
9668
9843
|
isMultipleExport, workbook, isBlob, isCsv) {
|
|
9669
9844
|
const dataSource = this.parent.dataSource;
|
|
9845
|
+
const data = new Data(this.parent.grid);
|
|
9670
9846
|
const property = Object();
|
|
9671
9847
|
setValue('isCsv', isCsv, property);
|
|
9672
9848
|
setValue('cancel', false, property);
|
|
9673
9849
|
if (!isNullOrUndefined(excelExportProperties)) {
|
|
9674
9850
|
this.isCollapsedStatePersist = excelExportProperties.isCollapsedStatePersist;
|
|
9675
9851
|
}
|
|
9676
|
-
if (!isNullOrUndefined(excelExportProperties)
|
|
9677
|
-
|
|
9678
|
-
|
|
9852
|
+
if (!isNullOrUndefined(excelExportProperties)) {
|
|
9853
|
+
if (!isNullOrUndefined(excelExportProperties.dataSource) && !excelExportProperties.dataSource['dataSource']) {
|
|
9854
|
+
return this.parent.grid.excelExportModule.Map(this.parent.grid, excelExportProperties, isMultipleExport, workbook, isCsv, isBlob);
|
|
9855
|
+
}
|
|
9856
|
+
if (excelExportProperties.exportType === 'CurrentPage') {
|
|
9857
|
+
excelExportProperties.dataSource = this.parent.getCurrentViewRecords();
|
|
9858
|
+
return this.parent.grid.excelExportModule.Map(this.parent.grid, excelExportProperties, isMultipleExport, workbook, isCsv, isBlob);
|
|
9859
|
+
}
|
|
9679
9860
|
}
|
|
9680
9861
|
return new Promise((resolve) => {
|
|
9681
9862
|
const dm = this.isLocal() && !(dataSource instanceof DataManager) ? new DataManager(dataSource)
|
|
@@ -9684,9 +9865,14 @@ class ExcelExport$1 {
|
|
|
9684
9865
|
if (!this.isLocal()) {
|
|
9685
9866
|
query = this.generateQuery(query);
|
|
9686
9867
|
query.queries = this.parent.grid.getDataModule().generateQuery().queries;
|
|
9868
|
+
query = ExportHelper.getQuery(this.parent.grid, data);
|
|
9869
|
+
if (isNullOrUndefined(this.parent.filterModule)) {
|
|
9870
|
+
query.queries = query.queries.slice(1, 2);
|
|
9871
|
+
query.params = query.params.slice(0, 0);
|
|
9872
|
+
}
|
|
9687
9873
|
setValue('query', query, property);
|
|
9688
9874
|
}
|
|
9689
|
-
this.parent.trigger(beforeExcelExport, extend(property, excelExportProperties));
|
|
9875
|
+
this.parent.trigger(beforeExcelExport, extend$1(property, excelExportProperties));
|
|
9690
9876
|
if (getObject('cancel', property)) {
|
|
9691
9877
|
return null;
|
|
9692
9878
|
}
|
|
@@ -9811,14 +9997,14 @@ class ExcelExport$1 {
|
|
|
9811
9997
|
*
|
|
9812
9998
|
* @hidden
|
|
9813
9999
|
*/
|
|
9814
|
-
class PdfExport
|
|
10000
|
+
class PdfExport {
|
|
9815
10001
|
/**
|
|
9816
10002
|
* Constructor for PDF export module
|
|
9817
10003
|
*
|
|
9818
10004
|
* @param {TreeGrid} parent - Tree Grid instance
|
|
9819
10005
|
*/
|
|
9820
10006
|
constructor(parent) {
|
|
9821
|
-
Grid.Inject(PdfExport);
|
|
10007
|
+
Grid.Inject(PdfExport$1);
|
|
9822
10008
|
this.parent = parent;
|
|
9823
10009
|
this.dataResults = {};
|
|
9824
10010
|
this.addEventListener();
|
|
@@ -9876,7 +10062,7 @@ class PdfExport$1 {
|
|
|
9876
10062
|
query = this.generateQuery(query);
|
|
9877
10063
|
setValue('query', query, prop);
|
|
9878
10064
|
}
|
|
9879
|
-
this.parent.trigger(beforePdfExport, extend(prop, pdfExportProperties));
|
|
10065
|
+
this.parent.trigger(beforePdfExport, extend$1(prop, pdfExportProperties));
|
|
9880
10066
|
if (getObject('cancel', prop)) {
|
|
9881
10067
|
return null;
|
|
9882
10068
|
}
|
|
@@ -9971,9 +10157,9 @@ class PdfExport$1 {
|
|
|
9971
10157
|
*
|
|
9972
10158
|
* @hidden
|
|
9973
10159
|
*/
|
|
9974
|
-
class Page
|
|
10160
|
+
class Page {
|
|
9975
10161
|
constructor(parent) {
|
|
9976
|
-
Grid.Inject(Page);
|
|
10162
|
+
Grid.Inject(Page$1);
|
|
9977
10163
|
this.parent = parent;
|
|
9978
10164
|
this.addEventListener();
|
|
9979
10165
|
}
|
|
@@ -10038,6 +10224,10 @@ class Page$1 {
|
|
|
10038
10224
|
* @returns {void}
|
|
10039
10225
|
*/
|
|
10040
10226
|
updateExternalMessage(message) {
|
|
10227
|
+
if (isNullOrUndefined(message)) {
|
|
10228
|
+
const error = 'The provided value for the message is undefined. Please ensure the message contains string.';
|
|
10229
|
+
this.parent.trigger(actionFailure, { error: error });
|
|
10230
|
+
}
|
|
10041
10231
|
this.parent.grid.pagerModule.updateExternalMessage(message);
|
|
10042
10232
|
}
|
|
10043
10233
|
/**
|
|
@@ -10134,8 +10324,8 @@ class Page$1 {
|
|
|
10134
10324
|
}
|
|
10135
10325
|
else {
|
|
10136
10326
|
const dm = new DataManager(pageingDetails.result);
|
|
10137
|
-
const expanded
|
|
10138
|
-
const parents = dm.executeLocal(new Query().where(expanded
|
|
10327
|
+
const expanded = new Predicate$1('expanded', 'notequal', null).or('expanded', 'notequal', undefined);
|
|
10328
|
+
const parents = dm.executeLocal(new Query().where(expanded));
|
|
10139
10329
|
let visualData;
|
|
10140
10330
|
if (isFilterChildHierarchy(this.parent) && (pageingDetails.actionArgs.action !== 'collapse' &&
|
|
10141
10331
|
pageingDetails.actionArgs.action !== 'expand')) {
|
|
@@ -10143,7 +10333,7 @@ class Page$1 {
|
|
|
10143
10333
|
}
|
|
10144
10334
|
else {
|
|
10145
10335
|
visualData = parents.filter((e) => {
|
|
10146
|
-
return getExpandStatus(this.parent, e
|
|
10336
|
+
return getExpandStatus(this.parent, e);
|
|
10147
10337
|
});
|
|
10148
10338
|
}
|
|
10149
10339
|
pageingDetails.count = visualData.length;
|
|
@@ -10170,9 +10360,9 @@ class Page$1 {
|
|
|
10170
10360
|
*
|
|
10171
10361
|
* @hidden
|
|
10172
10362
|
*/
|
|
10173
|
-
class Toolbar
|
|
10363
|
+
class Toolbar {
|
|
10174
10364
|
constructor(parent) {
|
|
10175
|
-
Grid.Inject(Toolbar);
|
|
10365
|
+
Grid.Inject(Toolbar$1);
|
|
10176
10366
|
this.parent = parent;
|
|
10177
10367
|
this.addEventListener();
|
|
10178
10368
|
}
|
|
@@ -10319,14 +10509,14 @@ class Toolbar$1 {
|
|
|
10319
10509
|
*
|
|
10320
10510
|
* @hidden
|
|
10321
10511
|
*/
|
|
10322
|
-
class Aggregate
|
|
10512
|
+
class Aggregate {
|
|
10323
10513
|
/**
|
|
10324
10514
|
* Constructor for Aggregate module
|
|
10325
10515
|
*
|
|
10326
10516
|
* @param {TreeGrid} parent - Tree Grid instance
|
|
10327
10517
|
*/
|
|
10328
10518
|
constructor(parent) {
|
|
10329
|
-
Grid.Inject(Aggregate);
|
|
10519
|
+
Grid.Inject(Aggregate$1);
|
|
10330
10520
|
this.parent = parent;
|
|
10331
10521
|
this.flatChildRecords = [];
|
|
10332
10522
|
this.summaryQuery = [];
|
|
@@ -10394,7 +10584,7 @@ class Aggregate$1 {
|
|
|
10394
10584
|
}
|
|
10395
10585
|
});
|
|
10396
10586
|
const currentIndex = idx + childRecordsLength + summaryRowIndex;
|
|
10397
|
-
const summaryParent = extend({}, parentRecord);
|
|
10587
|
+
const summaryParent = extend$1({}, parentRecord);
|
|
10398
10588
|
delete summaryParent.childRecords;
|
|
10399
10589
|
delete summaryParent[this.parent.childMapping];
|
|
10400
10590
|
setValue('parentItem', summaryParent, item);
|
|
@@ -10560,9 +10750,9 @@ class Aggregate$1 {
|
|
|
10560
10750
|
*
|
|
10561
10751
|
* @hidden
|
|
10562
10752
|
*/
|
|
10563
|
-
class Sort
|
|
10753
|
+
class Sort {
|
|
10564
10754
|
constructor(grid) {
|
|
10565
|
-
Grid.Inject(Sort);
|
|
10755
|
+
Grid.Inject(Sort$1);
|
|
10566
10756
|
this.parent = grid;
|
|
10567
10757
|
this.taskIds = [];
|
|
10568
10758
|
this.flatSortedData = [];
|
|
@@ -10683,14 +10873,14 @@ class Sort$1 {
|
|
|
10683
10873
|
*
|
|
10684
10874
|
* @hidden
|
|
10685
10875
|
*/
|
|
10686
|
-
class ColumnMenu
|
|
10876
|
+
class ColumnMenu {
|
|
10687
10877
|
/**
|
|
10688
10878
|
* Constructor for render module
|
|
10689
10879
|
*
|
|
10690
10880
|
* @param {TreeGrid} parent - Tree Grid instance
|
|
10691
10881
|
*/
|
|
10692
10882
|
constructor(parent) {
|
|
10693
|
-
Grid.Inject(ColumnMenu);
|
|
10883
|
+
Grid.Inject(ColumnMenu$1);
|
|
10694
10884
|
this.parent = parent;
|
|
10695
10885
|
}
|
|
10696
10886
|
getColumnMenu() {
|
|
@@ -10715,9 +10905,9 @@ class ColumnMenu$1 {
|
|
|
10715
10905
|
*
|
|
10716
10906
|
* @hidden
|
|
10717
10907
|
*/
|
|
10718
|
-
class ContextMenu
|
|
10908
|
+
class ContextMenu {
|
|
10719
10909
|
constructor(parent) {
|
|
10720
|
-
Grid.Inject(ContextMenu);
|
|
10910
|
+
Grid.Inject(ContextMenu$1);
|
|
10721
10911
|
this.parent = parent;
|
|
10722
10912
|
this.addEventListener();
|
|
10723
10913
|
}
|
|
@@ -10997,7 +11187,7 @@ class BatchEdit {
|
|
|
10997
11187
|
if (this.parent.editSettings.newRowPosition === 'Child') {
|
|
10998
11188
|
added.primaryParent = parentRecord;
|
|
10999
11189
|
if (this.selectedIndex > -1) {
|
|
11000
|
-
added.parentItem = extend({}, this.batchRecords[this.addRowIndex]);
|
|
11190
|
+
added.parentItem = extend$1({}, this.batchRecords[this.addRowIndex]);
|
|
11001
11191
|
added.parentUniqueID = added.parentItem.uniqueID;
|
|
11002
11192
|
delete added.parentItem.childRecords;
|
|
11003
11193
|
delete added.parentItem[this.parent.childMapping];
|
|
@@ -11106,13 +11296,13 @@ class BatchEdit {
|
|
|
11106
11296
|
this.updateRowIndex();
|
|
11107
11297
|
// update focus module, need to refix this once grid source modified.
|
|
11108
11298
|
const focusModule = getValue('focusModule', this.parent.grid);
|
|
11109
|
-
const table
|
|
11299
|
+
const table = this.parent.getContentTable();
|
|
11110
11300
|
if (this.parent.getBatchChanges()[this.deletedRecords].length && this.parent.editSettings.newRowPosition === 'Above') {
|
|
11111
11301
|
actualIndex = e.row.rowIndex;
|
|
11112
11302
|
focusModule.getContent().matrix.matrix = this.matrix;
|
|
11113
11303
|
}
|
|
11114
11304
|
else {
|
|
11115
|
-
actualIndex = table
|
|
11305
|
+
actualIndex = table.getElementsByClassName('e-batchrow')[0].rowIndex;
|
|
11116
11306
|
// if (this.parent.frozenRows || this.parent.frozenColumns) {
|
|
11117
11307
|
// actualIndex = this.batchIndex;
|
|
11118
11308
|
// }
|
|
@@ -11340,7 +11530,7 @@ class BatchEdit {
|
|
|
11340
11530
|
addRecords.reverse();
|
|
11341
11531
|
}
|
|
11342
11532
|
for (i = 0; i < addRecords.length; i++) {
|
|
11343
|
-
const taskData = extend({}, addRecords[parseInt(i.toString(), 10)]);
|
|
11533
|
+
const taskData = extend$1({}, addRecords[parseInt(i.toString(), 10)]);
|
|
11344
11534
|
delete taskData.parentItem;
|
|
11345
11535
|
delete taskData.uniqueID;
|
|
11346
11536
|
delete taskData.index;
|
|
@@ -11464,7 +11654,7 @@ class BatchEdit {
|
|
|
11464
11654
|
* TreeGrid Edit Module
|
|
11465
11655
|
* The `Edit` module is used to handle editing actions.
|
|
11466
11656
|
*/
|
|
11467
|
-
class Edit
|
|
11657
|
+
class Edit {
|
|
11468
11658
|
/**
|
|
11469
11659
|
* Constructor for Edit module
|
|
11470
11660
|
*
|
|
@@ -11476,7 +11666,7 @@ class Edit$1 {
|
|
|
11476
11666
|
this.prevAriaRowIndex = '-1';
|
|
11477
11667
|
this.isAddedRowByMethod = false;
|
|
11478
11668
|
this.isAddedRowByContextMenu = false;
|
|
11479
|
-
Grid.Inject(Edit);
|
|
11669
|
+
Grid.Inject(Edit$1);
|
|
11480
11670
|
this.parent = parent;
|
|
11481
11671
|
this.isSelfReference = !isNullOrUndefined(parent.parentIdMapping);
|
|
11482
11672
|
this.previousNewRowPosition = null;
|
|
@@ -11600,8 +11790,9 @@ class Edit$1 {
|
|
|
11600
11790
|
const eventArgs = getObject('editAction', args);
|
|
11601
11791
|
const eventName = getObject('name', eventArgs);
|
|
11602
11792
|
const treeObj = this.parent;
|
|
11603
|
-
const adaptor = treeObj.dataSource
|
|
11604
|
-
|
|
11793
|
+
const adaptor = !isNullOrUndefined(treeObj.dataSource)
|
|
11794
|
+
&& treeObj.dataSource.adaptor;
|
|
11795
|
+
if (!isNullOrUndefined(adaptor) && (isRemoteData(treeObj) || adaptor instanceof RemoteSaveAdaptor) &&
|
|
11605
11796
|
(eventArgs.requestType === 'save' && eventArgs.action === 'add') &&
|
|
11606
11797
|
(treeObj.editSettings.newRowPosition === 'Child' || treeObj.editSettings.newRowPosition === 'Below'
|
|
11607
11798
|
|| treeObj.editSettings.newRowPosition === 'Above')) {
|
|
@@ -11816,7 +12007,7 @@ class Edit$1 {
|
|
|
11816
12007
|
customCellSave(args) {
|
|
11817
12008
|
if (isCountRequired(this.parent) && this.parent.editSettings.mode === 'Cell' && args.action === 'edit') {
|
|
11818
12009
|
this.updateCell(args, args.rowIndex);
|
|
11819
|
-
this.afterCellSave(args, args.row
|
|
12010
|
+
this.afterCellSave(args, args.row);
|
|
11820
12011
|
}
|
|
11821
12012
|
}
|
|
11822
12013
|
cellSave(args) {
|
|
@@ -11859,7 +12050,7 @@ class Edit$1 {
|
|
|
11859
12050
|
}
|
|
11860
12051
|
}
|
|
11861
12052
|
const arg = {};
|
|
11862
|
-
extend(arg, args);
|
|
12053
|
+
extend$1(arg, args);
|
|
11863
12054
|
arg.cancel = false;
|
|
11864
12055
|
arg.type = 'save';
|
|
11865
12056
|
row = this.parent.grid.getRows()[row.rowIndex];
|
|
@@ -11880,7 +12071,7 @@ class Edit$1 {
|
|
|
11880
12071
|
else {
|
|
11881
12072
|
this.updateCell(args, rowIndex);
|
|
11882
12073
|
setValue('isEdit', false, this.parent.grid);
|
|
11883
|
-
this.afterCellSave(args, row
|
|
12074
|
+
this.afterCellSave(args, row);
|
|
11884
12075
|
}
|
|
11885
12076
|
}
|
|
11886
12077
|
else if (isRemoteData(this.parent) ||
|
|
@@ -11889,7 +12080,7 @@ class Edit$1 {
|
|
|
11889
12080
|
if (this.parent['isGantt'] && !this.parent.loadChildOnDemand) {
|
|
11890
12081
|
this.updateCell(args, rowIndex);
|
|
11891
12082
|
setValue('isEdit', false, this.parent.grid);
|
|
11892
|
-
this.afterCellSave(args, row
|
|
12083
|
+
this.afterCellSave(args, row);
|
|
11893
12084
|
}
|
|
11894
12085
|
else {
|
|
11895
12086
|
let crud = null;
|
|
@@ -11900,7 +12091,7 @@ class Edit$1 {
|
|
|
11900
12091
|
}
|
|
11901
12092
|
this.updateCell(args, rowIndex);
|
|
11902
12093
|
setValue('isEdit', false, this.parent.grid);
|
|
11903
|
-
this.afterCellSave(args, row
|
|
12094
|
+
this.afterCellSave(args, row);
|
|
11904
12095
|
});
|
|
11905
12096
|
}
|
|
11906
12097
|
}
|
|
@@ -11913,7 +12104,7 @@ class Edit$1 {
|
|
|
11913
12104
|
this.parent.grid.contentModule['virtualData'] = {};
|
|
11914
12105
|
}
|
|
11915
12106
|
}
|
|
11916
|
-
afterCellSave(args, row
|
|
12107
|
+
afterCellSave(args, row) {
|
|
11917
12108
|
if (this.parent.grid.aggregateModule) {
|
|
11918
12109
|
this.parent.grid.aggregateModule.refresh(args.rowData);
|
|
11919
12110
|
}
|
|
@@ -12033,9 +12224,9 @@ class Edit$1 {
|
|
|
12033
12224
|
if (!isNullOrUndefined(treecell)) {
|
|
12034
12225
|
for (let l = 0; l < treecell.classList.length; l++) {
|
|
12035
12226
|
const value = treecell.classList[parseInt(l.toString(), 10)];
|
|
12036
|
-
const remove
|
|
12227
|
+
const remove = /e-gridrowindex/i;
|
|
12037
12228
|
const removed = /e-griddetailrowindex/i;
|
|
12038
|
-
const result = value.match(remove
|
|
12229
|
+
const result = value.match(remove);
|
|
12039
12230
|
const results = value.match(removed);
|
|
12040
12231
|
if (result != null) {
|
|
12041
12232
|
removeClass([treecell], value);
|
|
@@ -12286,7 +12477,7 @@ class Edit$1 {
|
|
|
12286
12477
|
if (args.action === 'add') {
|
|
12287
12478
|
const key = this.parent.grid.getPrimaryKeyFieldNames()[0];
|
|
12288
12479
|
let position = null;
|
|
12289
|
-
value.taskData = isNullOrUndefined(value.taskData) ? extend({}, args.data) : value.taskData;
|
|
12480
|
+
value.taskData = isNullOrUndefined(value.taskData) ? extend$1({}, args.data) : value.taskData;
|
|
12290
12481
|
let currentData;
|
|
12291
12482
|
if (this.parent.enableVirtualization && args.index !== 0) {
|
|
12292
12483
|
currentData = this.parent.flatData;
|
|
@@ -12338,7 +12529,7 @@ class Edit$1 {
|
|
|
12338
12529
|
else if (this.parent.editSettings.newRowPosition === 'Child') {
|
|
12339
12530
|
position = 'after';
|
|
12340
12531
|
if ((this.selectedIndex > -1 || isVirtualization) && withinRange) {
|
|
12341
|
-
value.parentItem = extend({}, currentData[this.addRowIndex]);
|
|
12532
|
+
value.parentItem = extend$1({}, currentData[this.addRowIndex]);
|
|
12342
12533
|
value.parentUniqueID = value.parentItem.uniqueID;
|
|
12343
12534
|
delete value.parentItem.childRecords;
|
|
12344
12535
|
delete value.parentItem[this.parent.childMapping];
|
|
@@ -12364,7 +12555,7 @@ class Edit$1 {
|
|
|
12364
12555
|
if (this.parent.editSettings.newRowPosition === 'Above' || this.parent.editSettings.newRowPosition === 'Below') {
|
|
12365
12556
|
if ((this.selectedIndex > -1 || isVirtualization) && level && withinRange) {
|
|
12366
12557
|
value.parentUniqueID = parentUniqueID;
|
|
12367
|
-
value.parentItem = extend({}, parentItem);
|
|
12558
|
+
value.parentItem = extend$1({}, parentItem);
|
|
12368
12559
|
delete value.parentItem.childRecords;
|
|
12369
12560
|
delete value.parentItem[this.parent.childMapping];
|
|
12370
12561
|
}
|
|
@@ -12505,9 +12696,9 @@ class Edit$1 {
|
|
|
12505
12696
|
*
|
|
12506
12697
|
* @hidden
|
|
12507
12698
|
*/
|
|
12508
|
-
class CommandColumn
|
|
12699
|
+
class CommandColumn {
|
|
12509
12700
|
constructor(parent) {
|
|
12510
|
-
Grid.Inject(CommandColumn);
|
|
12701
|
+
Grid.Inject(CommandColumn$1);
|
|
12511
12702
|
this.parent = parent;
|
|
12512
12703
|
}
|
|
12513
12704
|
/**
|
|
@@ -12535,9 +12726,9 @@ class CommandColumn$1 {
|
|
|
12535
12726
|
*
|
|
12536
12727
|
* @hidden
|
|
12537
12728
|
*/
|
|
12538
|
-
class DetailRow
|
|
12729
|
+
class DetailRow {
|
|
12539
12730
|
constructor(parent) {
|
|
12540
|
-
Grid.Inject(DetailRow);
|
|
12731
|
+
Grid.Inject(DetailRow$1);
|
|
12541
12732
|
this.parent = parent;
|
|
12542
12733
|
this.addEventListener();
|
|
12543
12734
|
}
|
|
@@ -12676,6 +12867,7 @@ class VirtualTreeContentRenderer extends VirtualContentRenderer {
|
|
|
12676
12867
|
getFrozenRightVirtualRowByIndex(index) {
|
|
12677
12868
|
return this.getRowCollection(index, false, false, true);
|
|
12678
12869
|
}
|
|
12870
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
12679
12871
|
getRowCollection(index, isMovable, isRowObject, isFrozenRight) {
|
|
12680
12872
|
const startIdx = parseInt(this.parent.getRows()[0].getAttribute(dataRowIndex), 10);
|
|
12681
12873
|
const rowCollection = this.parent.getDataRows();
|
|
@@ -12708,10 +12900,10 @@ class VirtualTreeContentRenderer extends VirtualContentRenderer {
|
|
|
12708
12900
|
}
|
|
12709
12901
|
}
|
|
12710
12902
|
indexModifier(args) {
|
|
12711
|
-
const content
|
|
12903
|
+
const content = this.parent.getContent().querySelector('.e-content');
|
|
12712
12904
|
if ((this.recordAdded || args.requestType === 'delete' && this.endIndex > args.count - this.parent.pageSettings.pageSize) && this.startIndex > -1 && this.endIndex > -1) {
|
|
12713
12905
|
if (this.endIndex > args.count - this.parent.pageSettings.pageSize) {
|
|
12714
|
-
const nextSetResIndex = ~~(content
|
|
12906
|
+
const nextSetResIndex = ~~(content.scrollTop / this.parent.getRowHeight());
|
|
12715
12907
|
let lastIndex = nextSetResIndex + this.parent.getRows().length;
|
|
12716
12908
|
if (lastIndex > args.count) {
|
|
12717
12909
|
lastIndex = nextSetResIndex +
|
|
@@ -12839,8 +13031,9 @@ class VirtualTreeContentRenderer extends VirtualContentRenderer {
|
|
|
12839
13031
|
super[`${dataBoundEve}`]();
|
|
12840
13032
|
}
|
|
12841
13033
|
rowSelectedEvent(args) {
|
|
12842
|
-
const rowSelected
|
|
12843
|
-
super[`${rowSelected
|
|
13034
|
+
const rowSelected = 'rowSelected';
|
|
13035
|
+
super[`${rowSelected}`](args);
|
|
13036
|
+
this.parent.notify('virtualTransform', { requestType: 'transformChange' });
|
|
12844
13037
|
}
|
|
12845
13038
|
toSelectVirtualRow(args) {
|
|
12846
13039
|
if (this.parent.isEdit) {
|
|
@@ -12925,8 +13118,8 @@ class VirtualTreeContentRenderer extends VirtualContentRenderer {
|
|
|
12925
13118
|
}
|
|
12926
13119
|
virtualEditSuccess() {
|
|
12927
13120
|
const isAdd = 'isAdd';
|
|
12928
|
-
const content
|
|
12929
|
-
if (this[`${isAdd}`] && content
|
|
13121
|
+
const content = this.parent.getContent().querySelector('.e-content');
|
|
13122
|
+
if (this[`${isAdd}`] && content.querySelector('.e-addedrow')) {
|
|
12930
13123
|
this.recordAdded = true;
|
|
12931
13124
|
}
|
|
12932
13125
|
}
|
|
@@ -12940,8 +13133,8 @@ class VirtualTreeContentRenderer extends VirtualContentRenderer {
|
|
|
12940
13133
|
}
|
|
12941
13134
|
restoreNewRow() {
|
|
12942
13135
|
const isAdd = 'isAdd';
|
|
12943
|
-
const content
|
|
12944
|
-
if (this[`${isAdd}`] && !content
|
|
13136
|
+
const content = this.parent.getContent().querySelector('.e-content');
|
|
13137
|
+
if (this[`${isAdd}`] && !content.querySelector('.e-addedrow')) {
|
|
12945
13138
|
this.parent.isEdit = false;
|
|
12946
13139
|
this.parent.editModule.addRecord(null, this.parent.root.editModule.selectedIndex);
|
|
12947
13140
|
}
|
|
@@ -12958,8 +13151,8 @@ class VirtualTreeContentRenderer extends VirtualContentRenderer {
|
|
|
12958
13151
|
this.addRowIndex = addArgs.addRowIndex;
|
|
12959
13152
|
this.dataRowIndex = this.parent.root.editModule.selectedIndex;
|
|
12960
13153
|
}
|
|
12961
|
-
const actionComplete
|
|
12962
|
-
super[`${actionComplete
|
|
13154
|
+
const actionComplete = 'actionComplete';
|
|
13155
|
+
super[`${actionComplete}`](args);
|
|
12963
13156
|
}
|
|
12964
13157
|
onEnteredAction() {
|
|
12965
13158
|
return (element, current, direction, e, isWheel, check) => {
|
|
@@ -13007,9 +13200,9 @@ class VirtualTreeContentRenderer extends VirtualContentRenderer {
|
|
|
13007
13200
|
const info = scrollArgs.sentinel;
|
|
13008
13201
|
const rowHeight = this.parent.getRowHeight();
|
|
13009
13202
|
const outBuffer = this.parent.pageSettings.pageSize - Math.ceil(this.parent.pageSettings.pageSize / 2);
|
|
13010
|
-
const content
|
|
13203
|
+
const content = this.parent.getContent().querySelector('.e-content');
|
|
13011
13204
|
const scrollHeight = outBuffer * rowHeight;
|
|
13012
|
-
const upScroll = (scrollArgs.offset.top - this.translateY)
|
|
13205
|
+
const upScroll = (scrollArgs.offset.top - this.translateY) <= 0;
|
|
13013
13206
|
const downScroll = Math.ceil(scrollArgs.offset.top - this.translateY) + rowHeight >= scrollHeight;
|
|
13014
13207
|
const selectedRowIndex = 'selectedRowIndex';
|
|
13015
13208
|
const currentViewData = this.parent.currentViewData;
|
|
@@ -13017,11 +13210,12 @@ class VirtualTreeContentRenderer extends VirtualContentRenderer {
|
|
|
13017
13210
|
if (upScroll && (scrollArgs.direction !== 'right' && scrollArgs.direction !== 'left')) {
|
|
13018
13211
|
const vHeight = +(this.parent.height.toString().indexOf('%') < 0 ? parseInt(this.parent.height.toString(), 10) :
|
|
13019
13212
|
this.parent.element.getBoundingClientRect().height);
|
|
13020
|
-
let index = (~~(content
|
|
13213
|
+
let index = (~~(content.scrollTop / rowHeight)
|
|
13021
13214
|
+ Math.ceil(vHeight / rowHeight))
|
|
13022
13215
|
- this.parent.pageSettings.pageSize;
|
|
13023
13216
|
index = (index > 0) ? index : 0;
|
|
13024
|
-
if (!isNullOrUndefined(this[`${selectedRowIndex}`]) && this[`${selectedRowIndex}`] !== -1 && index !== this[`${selectedRowIndex}`]
|
|
13217
|
+
if (!isNullOrUndefined(this[`${selectedRowIndex}`]) && this[`${selectedRowIndex}`] !== -1 && index !== this[`${selectedRowIndex}`] &&
|
|
13218
|
+
((this.parent.rowHeight * this.parent.pageSettings.pageSize) < content.scrollTop)) {
|
|
13025
13219
|
index = this[`${selectedRowIndex}`];
|
|
13026
13220
|
}
|
|
13027
13221
|
this.startIndex = index;
|
|
@@ -13062,7 +13256,7 @@ class VirtualTreeContentRenderer extends VirtualContentRenderer {
|
|
|
13062
13256
|
}
|
|
13063
13257
|
}
|
|
13064
13258
|
else if (downScroll && (scrollArgs.direction !== 'right' && scrollArgs.direction !== 'left')) {
|
|
13065
|
-
let nextSetResIndex = ~~(content
|
|
13259
|
+
let nextSetResIndex = ~~(content.scrollTop / rowHeight);
|
|
13066
13260
|
const isLastBlock = (this[`${selectedRowIndex}`] + this.parent.pageSettings.pageSize) < this.totalRecords ? false : true;
|
|
13067
13261
|
if (!isNullOrUndefined(this[`${selectedRowIndex}`]) && this[`${selectedRowIndex}`] !== -1 &&
|
|
13068
13262
|
nextSetResIndex !== this[`${selectedRowIndex}`] && !isLastBlock) {
|
|
@@ -13084,7 +13278,7 @@ class VirtualTreeContentRenderer extends VirtualContentRenderer {
|
|
|
13084
13278
|
this.startIndex = currentViewData[0][`${indexValue}`] + (this.parent.pageSettings.pageSize / 2);
|
|
13085
13279
|
}
|
|
13086
13280
|
if (scrollArgs.offset.top > (rowHeight * this.totalRecords)) {
|
|
13087
|
-
this.translateY = this.getTranslateY(scrollArgs.offset.top, content
|
|
13281
|
+
this.translateY = this.getTranslateY(scrollArgs.offset.top, content.getBoundingClientRect().height);
|
|
13088
13282
|
}
|
|
13089
13283
|
else {
|
|
13090
13284
|
if (this.totalRecords === this.endIndex) {
|
|
@@ -13111,10 +13305,10 @@ class VirtualTreeContentRenderer extends VirtualContentRenderer {
|
|
|
13111
13305
|
this.previousInfo = viewInfo;
|
|
13112
13306
|
this.parent.setColumnIndexesInView(this.parent.enableColumnVirtualization ? viewInfo.columnIndexes : []);
|
|
13113
13307
|
const page = viewInfo.loadNext && !viewInfo.loadSelf ? viewInfo.nextInfo.page : viewInfo.page;
|
|
13308
|
+
this.parent.setProperties({ pageSettings: { currentPage: page } }, true);
|
|
13114
13309
|
if (downScroll && this.endIndex === this.totalRecords && viewInfo.loadNext) {
|
|
13115
13310
|
viewInfo.loadNext = false;
|
|
13116
13311
|
}
|
|
13117
|
-
this.parent.setProperties({ pageSettings: { currentPage: page } }, true);
|
|
13118
13312
|
this.requestType = 'virtualscroll';
|
|
13119
13313
|
if (scrollArgs.direction !== 'right' && scrollArgs.direction !== 'left') {
|
|
13120
13314
|
viewInfo.event = viewInfo.event === 'refresh-virtual-block' ? 'model-changed' : viewInfo.event;
|
|
@@ -13313,7 +13507,7 @@ class TreeInterSectionObserver extends InterSectionObserver {
|
|
|
13313
13507
|
*
|
|
13314
13508
|
* @hidden
|
|
13315
13509
|
*/
|
|
13316
|
-
class VirtualScroll
|
|
13510
|
+
class VirtualScroll {
|
|
13317
13511
|
/**
|
|
13318
13512
|
* Constructor for VirtualScroll module
|
|
13319
13513
|
*
|
|
@@ -13382,10 +13576,10 @@ class VirtualScroll$1 {
|
|
|
13382
13576
|
}
|
|
13383
13577
|
virtualPageAction(pageingDetails) {
|
|
13384
13578
|
const dm = new DataManager(pageingDetails.result);
|
|
13385
|
-
const expanded
|
|
13386
|
-
const parents = dm.executeLocal(new Query().where(expanded
|
|
13579
|
+
const expanded = new Predicate$1('expanded', 'notequal', null).or('expanded', 'notequal', undefined);
|
|
13580
|
+
const parents = dm.executeLocal(new Query().where(expanded));
|
|
13387
13581
|
const visualData = parents.filter((e) => {
|
|
13388
|
-
return getExpandStatus(this.parent, e
|
|
13582
|
+
return getExpandStatus(this.parent, e);
|
|
13389
13583
|
});
|
|
13390
13584
|
this.visualData = visualData;
|
|
13391
13585
|
pageingDetails.count = visualData.length;
|
|
@@ -13478,7 +13672,7 @@ class VirtualScroll$1 {
|
|
|
13478
13672
|
this.removeEventListener();
|
|
13479
13673
|
}
|
|
13480
13674
|
}
|
|
13481
|
-
class TreeVirtual extends VirtualScroll {
|
|
13675
|
+
class TreeVirtual extends VirtualScroll$1 {
|
|
13482
13676
|
constructor(parent, locator) {
|
|
13483
13677
|
super(parent, locator);
|
|
13484
13678
|
getValue('parent', this).off('initial-load', getValue('instantiateRenderer', this), this);
|
|
@@ -13519,14 +13713,14 @@ class TreeVirtual extends VirtualScroll {
|
|
|
13519
13713
|
*
|
|
13520
13714
|
* @hidden
|
|
13521
13715
|
*/
|
|
13522
|
-
class Freeze
|
|
13716
|
+
class Freeze {
|
|
13523
13717
|
/**
|
|
13524
13718
|
* Constructor for render module
|
|
13525
13719
|
*
|
|
13526
13720
|
* @param {TreeGrid} parent - Tree Grid instance
|
|
13527
13721
|
*/
|
|
13528
13722
|
constructor(parent) {
|
|
13529
|
-
Grid.Inject(Freeze);
|
|
13723
|
+
Grid.Inject(Freeze$1);
|
|
13530
13724
|
this.parent = parent;
|
|
13531
13725
|
this.addEventListener();
|
|
13532
13726
|
}
|
|
@@ -13618,14 +13812,14 @@ class Freeze$1 {
|
|
|
13618
13812
|
*
|
|
13619
13813
|
* @hidden
|
|
13620
13814
|
*/
|
|
13621
|
-
class ColumnChooser
|
|
13815
|
+
class ColumnChooser {
|
|
13622
13816
|
/**
|
|
13623
13817
|
* Constructor for render module
|
|
13624
13818
|
*
|
|
13625
13819
|
* @param {TreeGrid} parent - Tree Grid instance.
|
|
13626
13820
|
*/
|
|
13627
13821
|
constructor(parent) {
|
|
13628
|
-
Grid.Inject(ColumnChooser);
|
|
13822
|
+
Grid.Inject(ColumnChooser$1);
|
|
13629
13823
|
this.parent = parent;
|
|
13630
13824
|
}
|
|
13631
13825
|
/**
|
|
@@ -13663,7 +13857,7 @@ class ColumnChooser$1 {
|
|
|
13663
13857
|
*
|
|
13664
13858
|
* @hidden
|
|
13665
13859
|
*/
|
|
13666
|
-
class InfiniteScroll
|
|
13860
|
+
class InfiniteScroll {
|
|
13667
13861
|
/**
|
|
13668
13862
|
* Constructor for VirtualScroll module
|
|
13669
13863
|
*
|
|
@@ -13671,7 +13865,7 @@ class InfiniteScroll$1 {
|
|
|
13671
13865
|
*/
|
|
13672
13866
|
constructor(parent) {
|
|
13673
13867
|
this.parent = parent;
|
|
13674
|
-
Grid.Inject(InfiniteScroll);
|
|
13868
|
+
Grid.Inject(InfiniteScroll$1);
|
|
13675
13869
|
this.addEventListener();
|
|
13676
13870
|
}
|
|
13677
13871
|
/**
|
|
@@ -13769,8 +13963,8 @@ class InfiniteScroll$1 {
|
|
|
13769
13963
|
*/
|
|
13770
13964
|
infinitePageAction(pageingDetails) {
|
|
13771
13965
|
const dm = new DataManager(pageingDetails.result);
|
|
13772
|
-
const expanded
|
|
13773
|
-
const visualData = dm.executeLocal(new Query().where(expanded
|
|
13966
|
+
const expanded = new Predicate$1('expanded', 'notequal', null).or('expanded', 'notequal', undefined);
|
|
13967
|
+
const visualData = dm.executeLocal(new Query().where(expanded));
|
|
13774
13968
|
const actionArgs = getValue('actionArgs', pageingDetails.actionArgs);
|
|
13775
13969
|
const actions = getValue('actions', this.parent.grid.infiniteScrollModule);
|
|
13776
13970
|
if (this.parent.grid.infiniteScrollModule['isInitialRender'] && !this.parent.initialRender) {
|
|
@@ -13960,17 +14154,5 @@ class InfiniteScroll$1 {
|
|
|
13960
14154
|
}
|
|
13961
14155
|
}
|
|
13962
14156
|
|
|
13963
|
-
|
|
13964
|
-
* actions export
|
|
13965
|
-
*/
|
|
13966
|
-
|
|
13967
|
-
/**
|
|
13968
|
-
* TreeGrid component exported items
|
|
13969
|
-
*/
|
|
13970
|
-
|
|
13971
|
-
/**
|
|
13972
|
-
* Export TreeGrid component
|
|
13973
|
-
*/
|
|
13974
|
-
|
|
13975
|
-
export { TreeGrid, load, rowDataBound, dataBound, queryCellInfo, beforeDataBound, actionBegin, dataStateChange, actionComplete, rowSelecting, rowSelected, checkboxChange, rowDeselected, toolbarClick, beforeExcelExport, beforePdfExport, resizeStop, expanded, expanding, collapsed, collapsing, remoteExpand, localPagedExpandCollapse, pagingActions, printGridInit, contextMenuOpen, contextMenuClick, beforeCopy, beforePaste, savePreviousRowPosition, crudAction, beginEdit, beginAdd, recordDoubleClick, cellSave, cellSaved, cellEdit, batchDelete, batchCancel, batchAdd, beforeBatchDelete, beforeBatchAdd, beforeBatchSave, batchSave, keyPressed, updateData, doubleTap, virtualColumnIndex, virtualActionArgs, destroy, dataListener, indexModifier, beforeStartEdit, beforeBatchCancel, batchEditFormRendered, detailDataBound, rowDrag, rowDragStartHelper, rowDrop, rowDragStart, rowsAdd, rowsRemove, rowdraging, rowDropped, autoCol, rowDeselecting, headerContent, movableContent, movableHeader, frozenContent, frozenHeader, content, table, leftRight, frozenRight, frozenLeft, dataColIndex, ariaColIndex, dataRowIndex, ariaRowIndex, DataManipulation, Reorder$1 as Reorder, Resize$1 as Resize, RowDD$1 as RowDD, Column, TreeGridColumn, StackedColumn, EditSettings, Predicate$1 as Predicate, FilterSettings, PageSettings, SearchSettings, SelectionSettings, AggregateColumn, AggregateRow, SortDescriptor, SortSettings, RowDropSettings$1 as RowDropSettings, InfiniteScrollSettings, LoadingIndicator, Render, TreeVirtualRowModelGenerator, isRemoteData, isCountRequired, isCheckboxcolumn, isFilterChildHierarchy, findParentRecords, getExpandStatus, findChildrenRecords, isOffline, extendArray, getPlainData, getParentData, isHidden, ToolbarItem, ContextMenuItems, Filter$1 as Filter, ExcelExport$1 as ExcelExport, PdfExport$1 as PdfExport, Page$1 as Page, Toolbar$1 as Toolbar, Aggregate$1 as Aggregate, Sort$1 as Sort, TreeClipboard, ColumnMenu$1 as ColumnMenu, ContextMenu$1 as ContextMenu, Edit$1 as Edit, CommandColumn$1 as CommandColumn, Selection, DetailRow$1 as DetailRow, VirtualScroll$1 as VirtualScroll, TreeVirtual, Freeze$1 as Freeze, ColumnChooser$1 as ColumnChooser, Logger$1 as Logger, treeGridDetails, InfiniteScroll$1 as InfiniteScroll };
|
|
14157
|
+
export { Aggregate, AggregateColumn, AggregateRow, Column, ColumnChooser, ColumnMenu, CommandColumn, ContextMenu, ContextMenuItems, DataManipulation, DetailRow, Edit, EditSettings, ExcelExport, Filter, FilterSettings, Freeze, InfiniteScroll, InfiniteScrollSettings, LoadingIndicator, Logger, Page, PageSettings, PdfExport, Predicate, Render, Reorder, Resize, RowDD, RowDropSettings, SearchSettings, Selection, SelectionSettings, Sort, SortDescriptor, SortSettings, StackedColumn, Toolbar, ToolbarItem, TreeClipboard, TreeGrid, TreeGridColumn, TreeVirtual, TreeVirtualRowModelGenerator, VirtualScroll, actionBegin, actionComplete, actionFailure, ariaColIndex, ariaRowIndex, autoCol, batchAdd, batchCancel, batchDelete, batchEditFormRendered, batchSave, beforeBatchAdd, beforeBatchCancel, beforeBatchDelete, beforeBatchSave, beforeCopy, beforeDataBound, beforeExcelExport, beforePaste, beforePdfExport, beforeStartEdit, beginAdd, beginEdit, cellEdit, cellSave, cellSaved, checkboxChange, collapsed, collapsing, content, contextMenuClick, contextMenuOpen, crudAction, dataBound, dataColIndex, dataListener, dataRowIndex, dataStateChange, destroy, detailDataBound, doubleTap, expanded, expanding, extendArray, findChildrenRecords, findParentRecords, frozenContent, frozenHeader, frozenLeft, frozenRight, getExpandStatus, getParentData, getPlainData, headerContent, indexModifier, isCheckboxcolumn, isCountRequired, isFilterChildHierarchy, isHidden, isOffline, isRemoteData, keyPressed, leftRight, load, localPagedExpandCollapse, movableContent, movableHeader, pagingActions, printGridInit, queryCellInfo, recordDoubleClick, remoteExpand, resizeStop, rowDataBound, rowDeselected, rowDeselecting, rowDrag, rowDragStart, rowDragStartHelper, rowDrop, rowDropped, rowSelected, rowSelecting, rowdraging, rowsAdd, rowsRemove, savePreviousRowPosition, table, toolbarClick, treeGridDetails, updateData, virtualActionArgs, virtualColumnIndex };
|
|
13976
14158
|
//# sourceMappingURL=ej2-treegrid.es2015.js.map
|