@refinitiv-ui/efx-grid 6.0.3 → 6.0.4
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/lib/column-dragging/es6/ColumnDragging.d.ts +49 -0
- package/lib/column-dragging/es6/ColumnDragging.js +764 -0
- package/lib/column-dragging/es6/index.d.ts +1 -0
- package/lib/column-dragging/es6/index.js +1 -0
- package/lib/core/dist/core.css +1 -1
- package/lib/core/dist/core.js +389 -1070
- package/lib/core/dist/core.min.js +1 -1
- package/lib/core/es6/data/ColumnStats.d.ts +2 -2
- package/lib/core/es6/data/DataCache.d.ts +4 -4
- package/lib/core/es6/data/DataTable.d.ts +5 -5
- package/lib/core/es6/data/DataTable.js +1 -1
- package/lib/core/es6/data/DataView.d.ts +12 -12
- package/lib/core/es6/data/SegmentCollection.d.ts +3 -3
- package/lib/core/es6/data/WrappedView.d.ts +13 -13
- package/lib/core/es6/grid/Core.d.ts +29 -27
- package/lib/core/es6/grid/Core.js +26 -4
- package/lib/core/es6/grid/ILayoutGrid.d.ts +15 -15
- package/lib/core/es6/grid/LayoutGrid.js +54 -26
- package/lib/core/es6/grid/VirtualizedLayoutGrid.js +66 -0
- package/lib/core/es6/grid/components/Cell.d.ts +4 -4
- package/lib/core/es6/grid/components/CellFloatingPanel.d.ts +1 -1
- package/lib/core/es6/grid/components/CellSpans.d.ts +8 -8
- package/lib/core/es6/grid/components/Column.d.ts +1 -1
- package/lib/core/es6/grid/components/ElementWrapper.d.ts +6 -6
- package/lib/core/es6/grid/components/Scrollbar.d.ts +1 -1
- package/lib/core/es6/grid/components/StretchedCells.js +2 -2
- package/lib/core/es6/grid/plugins/SortableTitlePlugin.d.ts +14 -6
- package/lib/core/es6/grid/plugins/SortableTitlePlugin.js +147 -81
- package/lib/core/es6/grid/util/Conflator.d.ts +2 -2
- package/lib/core/es6/grid/util/ElementFrameWork.d.ts +3 -3
- package/lib/core/es6/grid/util/HttpRequest.d.ts +2 -2
- package/lib/core/es6/grid/util/PercentBarRenderer.d.ts +1 -1
- package/lib/core/es6/grid/util/RangeBar.d.ts +1 -1
- package/lib/core/es6/grid/util/SectionSettings.d.ts +5 -5
- package/lib/core/es6/grid/util/SectionSettings.js +5 -0
- package/lib/core/es6/grid/util/SelectionList.d.ts +2 -2
- package/lib/core/es6/grid/util/TrackLayout.d.ts +7 -3
- package/lib/core/es6/grid/util/TrackLayout.js +27 -0
- package/lib/core/es6/grid/util/util.d.ts +2 -2
- package/lib/core/es6/index.d.ts +1 -5
- package/lib/core/es6/index.js +1 -7
- package/lib/core/es6/tr-grid-theme.js +1 -1
- package/lib/filter-dialog/lib/filter-dialog.d.ts +1 -0
- package/lib/filter-dialog/lib/filter-dialog.js +73 -26
- package/lib/filter-dialog/themes/base-checkbox.less +8 -1
- package/lib/filter-dialog/themes/base.less +69 -1
- package/lib/filter-dialog/themes/elemental/dark/checkbox-list.js +1 -1
- package/lib/filter-dialog/themes/elemental/dark/es5/all-elements.js +2 -2
- package/lib/filter-dialog/themes/elemental/dark/filter-dialog.js +1 -1
- package/lib/filter-dialog/themes/elemental/light/checkbox-list.js +1 -1
- package/lib/filter-dialog/themes/elemental/light/es5/all-elements.js +2 -2
- package/lib/filter-dialog/themes/elemental/light/filter-dialog.js +1 -1
- package/lib/filter-dialog/themes/halo/dark/checkbox-list.js +1 -1
- package/lib/filter-dialog/themes/halo/dark/es5/all-elements.js +2 -2
- package/lib/filter-dialog/themes/halo/dark/filter-dialog.js +1 -1
- package/lib/filter-dialog/themes/halo/light/checkbox-list.js +1 -1
- package/lib/filter-dialog/themes/halo/light/es5/all-elements.js +2 -2
- package/lib/filter-dialog/themes/halo/light/filter-dialog.js +1 -1
- package/lib/filter-dialog/themes/solar/charcoal/checkbox-list.js +1 -1
- package/lib/filter-dialog/themes/solar/charcoal/es5/all-elements.js +2 -2
- package/lib/filter-dialog/themes/solar/charcoal/filter-dialog.js +1 -1
- package/lib/filter-dialog/themes/solar/pearl/checkbox-list.js +1 -1
- package/lib/filter-dialog/themes/solar/pearl/es5/all-elements.js +2 -2
- package/lib/filter-dialog/themes/solar/pearl/filter-dialog.js +1 -1
- package/lib/grid/lib/efx-grid.d.ts +8 -5
- package/lib/grid/lib/efx-grid.js +10 -4
- package/lib/grid/themes/halo/dark/efx-grid.js +1 -1
- package/lib/grid/themes/halo/dark/es5/all-elements.js +1 -1
- package/lib/grid/themes/halo/efx-grid.less +33 -39
- package/lib/grid/themes/halo/light/efx-grid.js +1 -1
- package/lib/grid/themes/halo/light/es5/all-elements.js +1 -1
- package/lib/index.d.ts +2 -0
- package/lib/index.js +2 -0
- package/lib/row-segmenting/es6/RowSegmenting.d.ts +7 -2
- package/lib/row-segmenting/es6/RowSegmenting.js +94 -9
- package/lib/rt-grid/dist/rt-grid.js +567 -1171
- package/lib/rt-grid/dist/rt-grid.min.js +1 -1
- package/lib/rt-grid/es6/ColumnDefinition.d.ts +5 -3
- package/lib/rt-grid/es6/ColumnDefinition.js +17 -108
- package/lib/rt-grid/es6/DataConnector.d.ts +3 -3
- package/lib/rt-grid/es6/Grid.d.ts +17 -9
- package/lib/rt-grid/es6/Grid.js +201 -101
- package/lib/rt-grid/es6/RowDefSorter.d.ts +19 -0
- package/lib/rt-grid/es6/RowDefSorter.js +137 -0
- package/lib/rt-grid/es6/RowDefinition.d.ts +9 -7
- package/lib/rt-grid/es6/RowDefinition.js +6 -0
- package/lib/rt-grid/es6/SnapshotFiller.d.ts +3 -1
- package/lib/rt-grid/es6/SnapshotFiller.js +23 -0
- package/lib/tr-grid-checkbox/es6/Checkbox.d.ts +2 -2
- package/lib/tr-grid-checkbox/es6/Checkbox.js +38 -20
- package/lib/tr-grid-column-selection/es6/ColumnSelection.js +46 -9
- package/lib/tr-grid-column-stack/es6/ColumnStack.d.ts +8 -4
- package/lib/tr-grid-column-stack/es6/ColumnStack.js +240 -125
- package/lib/tr-grid-conditional-coloring/es6/ConditionalColoring.d.ts +1 -1
- package/lib/tr-grid-conditional-coloring/es6/ConditionalColoring.js +18 -12
- package/lib/tr-grid-in-cell-editing/es6/InCellEditing.d.ts +7 -4
- package/lib/tr-grid-in-cell-editing/es6/InCellEditing.js +93 -2
- package/lib/tr-grid-printer/es6/CellWriter.d.ts +3 -3
- package/lib/tr-grid-printer/es6/GridPrinter.d.ts +1 -1
- package/lib/tr-grid-printer/es6/GridPrinter.js +26 -13
- package/lib/tr-grid-printer/es6/PrintTrait.d.ts +2 -2
- package/lib/tr-grid-printer/es6/SectionWriter.d.ts +3 -3
- package/lib/tr-grid-row-dragging/es6/RowDragging.d.ts +2 -1
- package/lib/tr-grid-row-dragging/es6/RowDragging.js +29 -143
- package/lib/tr-grid-row-grouping/es6/RowGrouping.d.ts +7 -2
- package/lib/tr-grid-row-grouping/es6/RowGrouping.js +97 -7
- package/lib/tr-grid-row-selection/es6/RowSelection.js +10 -0
- package/lib/tr-grid-textformatting/es6/TextFormatting.d.ts +1 -1
- package/lib/tr-grid-textformatting/es6/TextFormatting.js +12 -0
- package/lib/tr-grid-util/es6/DragUI.d.ts +16 -0
- package/lib/tr-grid-util/es6/DragUI.js +214 -0
- package/lib/tr-grid-util/es6/ElementObserver.d.ts +2 -0
- package/lib/tr-grid-util/es6/ElementObserver.js +28 -1
- package/lib/tr-grid-util/es6/ElfUtil.js +1 -1
- package/lib/tr-grid-util/es6/FieldFormatter.js +7 -5
- package/lib/tr-grid-util/es6/GridPlugin.js +8 -4
- package/lib/tr-grid-util/es6/NumberFormatter.d.ts +2 -0
- package/lib/tr-grid-util/es6/NumberFormatter.js +64 -19
- package/lib/tr-grid-util/es6/RowPainter.js +41 -11
- package/lib/tr-grid-util/es6/formula/Formula.js +9 -1
- package/lib/types/es6/Checkbox.d.ts +2 -2
- package/lib/types/es6/ColumnStack.d.ts +8 -4
- package/lib/types/es6/CompositeGrid/ColumnSelectionPlugin.d.ts +3 -2
- package/lib/types/es6/CompositeGrid/ColumnWidthAdjustingPlugin.d.ts +2 -1
- package/lib/types/es6/CompositeGrid/CompositeGrid.d.ts +20 -18
- package/lib/types/es6/CompositeGrid/DragAndDropTitlePlugin.d.ts +2 -1
- package/lib/types/es6/CompositeGrid/DraggableContentPlugin.d.ts +3 -2
- package/lib/types/es6/CompositeGrid/Plugin.d.ts +28 -0
- package/lib/types/es6/CompositeGrid/ResizableTitlePlugin.d.ts +2 -1
- package/lib/types/es6/CompositeGrid/RowSelectionPlugin.d.ts +5 -4
- package/lib/types/es6/CompositeGrid/TreeIndentingPlugin.d.ts +2 -1
- package/lib/types/es6/CompositeGrid/index.d.ts +9 -9
- package/lib/types/es6/ConditionalColoring.d.ts +1 -1
- package/lib/types/es6/Core/data/ColumnStats.d.ts +2 -2
- package/lib/types/es6/Core/data/DataCache.d.ts +4 -4
- package/lib/types/es6/Core/data/DataTable.d.ts +5 -5
- package/lib/types/es6/Core/data/DataView.d.ts +12 -12
- package/lib/types/es6/Core/data/SegmentCollection.d.ts +3 -3
- package/lib/types/es6/Core/data/WrappedView.d.ts +13 -13
- package/lib/types/es6/Core/grid/Core.d.ts +29 -27
- package/lib/types/es6/Core/grid/ILayoutGrid.d.ts +15 -15
- package/lib/types/es6/Core/grid/components/Cell.d.ts +4 -4
- package/lib/types/es6/Core/grid/components/CellFloatingPanel.d.ts +1 -1
- package/lib/types/es6/Core/grid/components/CellSpans.d.ts +8 -8
- package/lib/types/es6/Core/grid/components/Column.d.ts +1 -1
- package/lib/types/es6/Core/grid/components/ElementWrapper.d.ts +6 -6
- package/lib/types/es6/Core/grid/components/Scrollbar.d.ts +1 -1
- package/lib/types/es6/Core/grid/plugins/SortableTitlePlugin.d.ts +14 -6
- package/lib/types/es6/Core/grid/util/Conflator.d.ts +2 -2
- package/lib/types/es6/Core/grid/util/ElementFrameWork.d.ts +3 -3
- package/lib/types/es6/Core/grid/util/HttpRequest.d.ts +2 -2
- package/lib/types/es6/Core/grid/util/PercentBarRenderer.d.ts +1 -1
- package/lib/types/es6/Core/grid/util/RangeBar.d.ts +1 -1
- package/lib/types/es6/Core/grid/util/SectionSettings.d.ts +5 -5
- package/lib/types/es6/Core/grid/util/SelectionList.d.ts +2 -2
- package/lib/types/es6/Core/grid/util/TrackLayout.d.ts +7 -3
- package/lib/types/es6/Core/grid/util/util.d.ts +2 -2
- package/lib/types/es6/Core/index.d.ts +1 -5
- package/lib/types/es6/ExtensionOptions.d.ts +2 -0
- package/lib/types/es6/InCellEditing.d.ts +7 -4
- package/lib/types/es6/RealtimeGrid/ColumnDefinition.d.ts +5 -3
- package/lib/types/es6/RealtimeGrid/DataConnector.d.ts +3 -3
- package/lib/types/es6/RealtimeGrid/Grid.d.ts +17 -9
- package/lib/types/es6/RealtimeGrid/RowDefSorter.d.ts +19 -0
- package/lib/types/es6/RealtimeGrid/RowDefinition.d.ts +9 -7
- package/lib/types/es6/RealtimeGrid/SnapshotFiller.d.ts +3 -1
- package/lib/types/es6/RowDragging.d.ts +2 -1
- package/lib/types/es6/RowGrouping.d.ts +7 -2
- package/lib/types/es6/RowSegmenting.d.ts +7 -2
- package/lib/types/es6/TextFormatting.d.ts +1 -1
- package/lib/versions.json +14 -13
- package/package.json +1 -1
- package/lib/core/es6/grid/plugins/DragAndDropTitlePlugin.d.ts +0 -24
- package/lib/core/es6/grid/plugins/DragAndDropTitlePlugin.js +0 -615
- package/lib/core/es6/grid/plugins/Plugin.d.ts +0 -28
- package/lib/core/es6/grid/plugins/Plugin.js +0 -272
- package/lib/types/es6/Core/grid/plugins/DragAndDropTitlePlugin.d.ts +0 -24
- package/lib/types/es6/Core/grid/plugins/Plugin.d.ts +0 -28
@@ -13,6 +13,22 @@
|
|
13
13
|
* @property {boolean=} mutiplyBy100=false Alias of multiplyBy100
|
14
14
|
*/
|
15
15
|
|
16
|
+
/** @private
|
17
|
+
* @function
|
18
|
+
* @param {number} num Absolute number
|
19
|
+
* @return {number}
|
20
|
+
*/
|
21
|
+
var _multiplyByHundred = function(num) {
|
22
|
+
var intPart = num | 0;
|
23
|
+
if(intPart && num > intPart) {
|
24
|
+
var str = num + "";
|
25
|
+
var at = str.indexOf(".");
|
26
|
+
var fracStr = str.slice(at + 1) + "00";
|
27
|
+
return +(str.slice(0, at) + fracStr.slice(0, 2) + "." + fracStr.slice(2));
|
28
|
+
}
|
29
|
+
return num * 100;
|
30
|
+
};
|
31
|
+
|
16
32
|
/** NumberFormatter provides a way to format the given number quickly.
|
17
33
|
* @constructor
|
18
34
|
* @param {NumberFormatter~Options=} options
|
@@ -198,6 +214,24 @@ NumberFormatter.padDecimalPartWithZeroes = function (str, precision) {
|
|
198
214
|
}
|
199
215
|
return str;
|
200
216
|
};
|
217
|
+
/** @public
|
218
|
+
* @function
|
219
|
+
* @param {number} num
|
220
|
+
* @return {number}
|
221
|
+
* @example
|
222
|
+
* NumberFormatter.multiplyByHundred(1); // 1
|
223
|
+
* NumberFormatter.multiplyByHundred(1.1); // 110
|
224
|
+
* NumberFormatter.multiplyByHundred(1.21); // 121
|
225
|
+
* NumberFormatter.multiplyByHundred(1.321); // 132.1
|
226
|
+
* NumberFormatter.multiplyByHundred(-1.4321); // -143.21
|
227
|
+
*/
|
228
|
+
NumberFormatter.multiplyByHundred = function (num) {
|
229
|
+
if(num < 0) {
|
230
|
+
return -(_multiplyByHundred(-num));
|
231
|
+
}
|
232
|
+
return _multiplyByHundred(num);
|
233
|
+
};
|
234
|
+
|
201
235
|
|
202
236
|
/** @public
|
203
237
|
* @param {Object=} options
|
@@ -206,20 +240,28 @@ NumberFormatter.padDecimalPartWithZeroes = function (str, precision) {
|
|
206
240
|
NumberFormatter.prototype.getOptions = function(options) { // serialize
|
207
241
|
if(!options) { options = {}; }
|
208
242
|
|
243
|
+
var formatType = options["formatType"];
|
244
|
+
|
209
245
|
options["precisionEnabled"] = this._precisionEnabled;
|
210
246
|
options["decimalPlaces"] = this._precision;
|
211
247
|
options["plusSign"] = this._plusSignEnabled;
|
212
248
|
options["separator"] = this._separatorEnabled;
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
249
|
+
|
250
|
+
if(formatType === "scaled" || formatType === "scaledvalue") {
|
251
|
+
var su = "";
|
252
|
+
if(this._scaler == "b") {
|
253
|
+
su = "billion";
|
254
|
+
} else if(this._scaler == "m") {
|
255
|
+
su = "million";
|
256
|
+
}
|
257
|
+
options["scalingUnit"] = su;
|
258
|
+
}
|
259
|
+
|
260
|
+
if(formatType === "percent") {
|
261
|
+
options["percentSign"] = this._percentSignEnabled;
|
262
|
+
options["mutiplyBy100"] = this._multiplyBy100Enabled;
|
263
|
+
options["multiplyBy100"] = this._multiplyBy100Enabled;
|
219
264
|
}
|
220
|
-
options["scalingUnit"] = su;
|
221
|
-
options["mutiplyBy100"] = this._multiplyBy100Enabled;
|
222
|
-
options["multiplyBy100"] = this._multiplyBy100Enabled;
|
223
265
|
return options;
|
224
266
|
};
|
225
267
|
|
@@ -240,7 +282,7 @@ NumberFormatter.prototype.format = function(origVal) {
|
|
240
282
|
}
|
241
283
|
}
|
242
284
|
|
243
|
-
//
|
285
|
+
// Simplify logic by making positive value
|
244
286
|
var val, sign;
|
245
287
|
if(origVal >= 0) {
|
246
288
|
val = origVal;
|
@@ -249,14 +291,18 @@ NumberFormatter.prototype.format = function(origVal) {
|
|
249
291
|
val = -origVal;
|
250
292
|
sign = "-";
|
251
293
|
}
|
252
|
-
if(this._multiplyBy100Enabled) {
|
253
|
-
val = val * 100;
|
254
|
-
}
|
255
|
-
var absVal = val;
|
256
294
|
var scalingMode = this._percentFormatEnabled ? "" : this._scaler; // Percent formatting overwrite scaling mode
|
257
295
|
|
258
|
-
|
296
|
+
if(this._multiplyBy100Enabled) {
|
297
|
+
if(this._precisionEnabled || scalingMode) {
|
298
|
+
val = val * 100; // Since value will be rounded later, there is no need to avoid rounding issue
|
299
|
+
} else {
|
300
|
+
val = _multiplyByHundred(val);
|
301
|
+
}
|
302
|
+
}
|
259
303
|
|
304
|
+
var absVal = val;
|
305
|
+
// Perform scaling
|
260
306
|
if (scalingMode) {
|
261
307
|
if (scalingMode === "b" && val < 1e9) {
|
262
308
|
scalingMode = "m";
|
@@ -270,11 +316,8 @@ NumberFormatter.prototype.format = function(origVal) {
|
|
270
316
|
} else if (scalingMode === "b") {
|
271
317
|
val = val / 1e9;
|
272
318
|
}
|
273
|
-
|
274
|
-
if (!this._precisionEnabled) {
|
275
|
-
val = Math.round(val * 100) / 100;
|
276
|
-
}
|
277
319
|
}
|
320
|
+
// Perform rounding
|
278
321
|
if (this._precisionEnabled) {
|
279
322
|
if (this._precision > 0) {
|
280
323
|
var deno = NumberFormatter._denominator[this._precision];
|
@@ -282,6 +325,8 @@ NumberFormatter.prototype.format = function(origVal) {
|
|
282
325
|
} else {
|
283
326
|
val = Math.round(val);
|
284
327
|
}
|
328
|
+
} else if(scalingMode) {
|
329
|
+
val = Math.round(val * 100) / 100;
|
285
330
|
}
|
286
331
|
|
287
332
|
// Convert value to string
|
@@ -72,6 +72,29 @@ RowPainter._styles = prettifyCss([
|
|
72
72
|
]
|
73
73
|
]);
|
74
74
|
|
75
|
+
/** @private
|
76
|
+
* @param {Object} cell
|
77
|
+
* @param {string=} className
|
78
|
+
*/
|
79
|
+
RowPainter._applyColorTagClass = function(cell, className) {
|
80
|
+
if (!cell) {
|
81
|
+
return;
|
82
|
+
}
|
83
|
+
var el = cell.getElement();
|
84
|
+
if (el) {
|
85
|
+
if (el._tagColoringClass !== className) {
|
86
|
+
if (el._tagColoringClass) {
|
87
|
+
el.classList.remove(el._tagColoringClass);
|
88
|
+
el._tagColoringClass = null;
|
89
|
+
}
|
90
|
+
if (className) {
|
91
|
+
el.classList.add(className);
|
92
|
+
el._tagColoringClass = className;
|
93
|
+
}
|
94
|
+
}
|
95
|
+
}
|
96
|
+
};
|
97
|
+
|
75
98
|
/** @public
|
76
99
|
* @param {tr.Grid} grid
|
77
100
|
*/
|
@@ -137,18 +160,23 @@ RowPainter.prototype.removeHeaderStyle = function(section, columnIndex, rowIndex
|
|
137
160
|
* @param {Object} cell Cell container
|
138
161
|
*/
|
139
162
|
RowPainter.prototype._removeHeaderStyle = function(cell) {
|
140
|
-
if(!cell
|
163
|
+
if(!cell) {
|
141
164
|
return;
|
142
165
|
}
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
cell.
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
166
|
+
|
167
|
+
RowPainter._applyColorTagClass(cell, "");
|
168
|
+
|
169
|
+
if(cell._groupHeaderStyle) {
|
170
|
+
cell._groupHeaderStyle = false;
|
171
|
+
cell.removeClass("folder");
|
172
|
+
cell.removeClass("closed");
|
173
|
+
cell.removeClass("content-header");
|
174
|
+
cell.removeClass("color-tag");
|
175
|
+
cell.removeClass("main-group");
|
176
|
+
cell.setStyle("paddingLeft", "");
|
177
|
+
cell.removeIcon();
|
178
|
+
cell.unlisten("click", this._onCellClicked);
|
179
|
+
}
|
152
180
|
};
|
153
181
|
|
154
182
|
/** @public
|
@@ -209,6 +237,7 @@ RowPainter.prototype.applyHeaderStyle = function(e) {
|
|
209
237
|
}
|
210
238
|
cell.enableClass("closed", e.collapsed ? true : false);
|
211
239
|
cell.enableClass("color-tag", true);
|
240
|
+
RowPainter._applyColorTagClass(cell, e.colorTagClass);
|
212
241
|
cell.setStyle("paddingLeft", (e.indentSize > 0) ? e.indentSize + "px" : "");
|
213
242
|
};
|
214
243
|
|
@@ -218,7 +247,7 @@ RowPainter.prototype.applyHeaderStyle = function(e) {
|
|
218
247
|
*/
|
219
248
|
RowPainter.prototype.applyContentAsHeaderStyle = function (e) {
|
220
249
|
var cell = e.cell;
|
221
|
-
|
250
|
+
cell._groupHeaderStyle = true;
|
222
251
|
cell.addClass("folder"); // Required by the fallback arrow from the CSS rules. TODO: Change this
|
223
252
|
cell.enableClass("content-header", true);
|
224
253
|
cell.enableClass("closed", e.collapsed);
|
@@ -236,6 +265,7 @@ RowPainter.prototype.applyRowStyle = function(e) {
|
|
236
265
|
var indentSize = e.indentSize;
|
237
266
|
cell.setStyle("paddingLeft", (indentSize > 0) ? indentSize + "px" : "");
|
238
267
|
cell.enableClass("color-tag", e.nonGroupRow ? false : true);
|
268
|
+
RowPainter._applyColorTagClass(cell, e.colorTagClass);
|
239
269
|
};
|
240
270
|
|
241
271
|
/** @private
|
@@ -345,7 +345,15 @@ Formula.toUpperCase = function(exp) {
|
|
345
345
|
exp = exp.toUpperCase(); // Upper case the remaining
|
346
346
|
|
347
347
|
// May have the new string token from ADC field with parameter
|
348
|
-
|
348
|
+
// Regex for adc fileds
|
349
|
+
// TR : start with tr
|
350
|
+
// (\.[\w]+)+ : dot follow by any character at least 1
|
351
|
+
// \( : start parentheses
|
352
|
+
// [^\(\)]* : any except parentheses
|
353
|
+
// \) : end parentheses
|
354
|
+
// (\.[a-zA-Z]+)* : dot follow by any character (optional)
|
355
|
+
|
356
|
+
exp = exp.replace(/TR(\.[\w ]+)+\([^\(\)]*\)(\.[a-zA-Z]+)*/g, Formula._encloseWithTR);
|
349
357
|
|
350
358
|
exp = Formula.resolveTokens(exp, tokens, calcHierarchy); // Restore the string
|
351
359
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import {Ext} from '../../tr-grid-util/es6/Ext.js';
|
2
2
|
import {GridPlugin} from '../../tr-grid-util/es6/GridPlugin.js';
|
3
3
|
import {ElfUtil} from '../../tr-grid-util/es6/ElfUtil.js';
|
4
|
-
import {injectCss, prettifyCss
|
4
|
+
import {injectCss, prettifyCss} from "../../tr-grid-util/es6/Util.js";
|
5
5
|
|
6
6
|
declare namespace CheckboxPlugin {
|
7
7
|
|
@@ -42,7 +42,7 @@ declare class CheckboxPlugin extends GridPlugin {
|
|
42
42
|
|
43
43
|
public getDisplayColumn(): number;
|
44
44
|
|
45
|
-
public getCheckbox(sectionRef: any, rowIndex: number): Element;
|
45
|
+
public getCheckbox(sectionRef: any, rowIndex: number): Element|null;
|
46
46
|
|
47
47
|
public selectAll(): void;
|
48
48
|
|
@@ -9,6 +9,10 @@ import { preventDefault } from "../../tr-grid-util/es6/EventDispatcher.js";
|
|
9
9
|
|
10
10
|
declare namespace ColumnStackPlugin {
|
11
11
|
|
12
|
+
type Options = {
|
13
|
+
fields: (string)[]
|
14
|
+
};
|
15
|
+
|
12
16
|
type ColumnOptions = {
|
13
17
|
stackId?: string,
|
14
18
|
stack?: (string|StackOptions)
|
@@ -34,11 +38,11 @@ declare class ColumnStackPlugin extends GridPlugin {
|
|
34
38
|
|
35
39
|
public getConfigObject(gridOptions?: any): any;
|
36
40
|
|
37
|
-
public getMemberIndices(colIndex: number): (number)[];
|
41
|
+
public getMemberIndices(colIndex: number): (number)[]|null;
|
38
42
|
|
39
|
-
public collapseGroup(colIndex: number, collapsed?: boolean): (number)[];
|
43
|
+
public collapseGroup(colIndex: number, collapsed?: boolean): (number)[]|null;
|
40
44
|
|
41
|
-
public expandGroup(colIndex: number): (number)[];
|
45
|
+
public expandGroup(colIndex: number): (number)[]|null;
|
42
46
|
|
43
47
|
public isColumnStackable(colIndices: (number)[]): boolean;
|
44
48
|
|
@@ -60,7 +64,7 @@ declare class ColumnStackPlugin extends GridPlugin {
|
|
60
64
|
|
61
65
|
public getStackId(colIndex: number): string;
|
62
66
|
|
63
|
-
public stackColumns(
|
67
|
+
public stackColumns(colRefs?: (number|string)[], stackId?: string, options?: any): boolean;
|
64
68
|
|
65
69
|
public setStack(colRefs: (number|string)[]): boolean;
|
66
70
|
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import Ext from "../../../tr-grid-util/es6/Ext.js";
|
2
2
|
import Util from "../Core/grid/util/util.js";
|
3
|
-
import
|
3
|
+
import Plugin from "./Plugin.js";
|
4
|
+
import { ILayoutGrid, Core} from "../Core/index.js";
|
4
5
|
|
5
6
|
declare class ColumnSelectionPlugin extends Plugin {
|
6
7
|
|
@@ -28,7 +29,7 @@ declare class ColumnSelectionPlugin extends Plugin {
|
|
28
29
|
|
29
30
|
public isSelectedColumn(colIndex: number): boolean;
|
30
31
|
|
31
|
-
public getActiveGrid(): Core;
|
32
|
+
public getActiveGrid(): Core|null;
|
32
33
|
|
33
34
|
public enableSingleSelectionMode(bool?: boolean): void;
|
34
35
|
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import Ext from "../../../tr-grid-util/es6/Ext.js";
|
2
2
|
import Util from "../Core/grid/util/util.js";
|
3
|
-
import
|
3
|
+
import Plugin from "./Plugin.js";
|
4
|
+
import { Conflator } from "../Core/index.js";
|
4
5
|
import TextWidthCalculator from "./TextWidthCalculator.js"
|
5
6
|
|
6
7
|
declare class ColumnWidthAdjustingPlugin extends Plugin {
|
@@ -83,12 +83,12 @@ declare namespace CompositeGrid {
|
|
83
83
|
formatter?: GridFormatter & CompositeGrid.ColumnFormatter,
|
84
84
|
styles?: { [key: string]: string },
|
85
85
|
classes?: { [key: string]: string },
|
86
|
+
stationary?: boolean,
|
86
87
|
sortable?: boolean,
|
87
88
|
sortBy?: string,
|
88
89
|
sortLogic?: DataTable.SortLogic,
|
89
90
|
sortingLogic?: DataTable.SortLogic,
|
90
|
-
sorter?: DataTable.SortLogic
|
91
|
-
defaultSort?: SortableTitlePlugin.SortOrder
|
91
|
+
sorter?: DataTable.SortLogic
|
92
92
|
};
|
93
93
|
|
94
94
|
type DataModel = {
|
@@ -105,7 +105,7 @@ declare class CompositeGrid extends ElementWrapper {
|
|
105
105
|
|
106
106
|
public getModel(): any;
|
107
107
|
|
108
|
-
public getColumns(): (any)[];
|
108
|
+
public getColumns(): (any)[]|null;
|
109
109
|
|
110
110
|
public addColumn(columnModel: any): void;
|
111
111
|
|
@@ -143,7 +143,7 @@ declare class CompositeGrid extends ElementWrapper {
|
|
143
143
|
|
144
144
|
public autoResizeAllColumns(): void;
|
145
145
|
|
146
|
-
public moveColumn(fromColIndex: number|(number)[], toColIndex: number):
|
146
|
+
public moveColumn(fromColIndex: number|(number)[], toColIndex: number): boolean;
|
147
147
|
|
148
148
|
public freezeColumn(opt_colIndex?: number, pinnedRightColumns?: number): void;
|
149
149
|
|
@@ -151,17 +151,17 @@ declare class CompositeGrid extends ElementWrapper {
|
|
151
151
|
|
152
152
|
public unpinColumn(columnList: string|(string)[]): void;
|
153
153
|
|
154
|
-
public getPinnedColumns(): (string)[];
|
154
|
+
public getPinnedColumns(): (string)[]|null;
|
155
155
|
|
156
156
|
public restorePinnedColumns(pinnedColumns: (string)[]): void;
|
157
157
|
|
158
158
|
public addData(data: any|(any|any[])[], format?: string): void;
|
159
159
|
|
160
|
-
public getDataView(): DataView;
|
160
|
+
public getDataView(): DataView|null;
|
161
161
|
|
162
|
-
public getDataTable(): DataTable;
|
162
|
+
public getDataTable(): DataTable|null;
|
163
163
|
|
164
|
-
public getDataRows(rowIndices: (number)[]): (any)[];
|
164
|
+
public getDataRows(rowIndices: (number)[]): (any)[]|null;
|
165
165
|
|
166
166
|
public getColumnModel(colRef: number|string): any;
|
167
167
|
|
@@ -173,7 +173,7 @@ declare class CompositeGrid extends ElementWrapper {
|
|
173
173
|
|
174
174
|
public getColumnIndex(columnId: string): number;
|
175
175
|
|
176
|
-
public findColumnIndex(columnId: (string|number)[]|string, opt_includeNotFound?: boolean): (number)[]|number;
|
176
|
+
public findColumnIndex(columnId: (string|number)[]|string, opt_includeNotFound?: boolean): (number)[]|number|null;
|
177
177
|
|
178
178
|
public getColumnCount(): number;
|
179
179
|
|
@@ -183,13 +183,13 @@ declare class CompositeGrid extends ElementWrapper {
|
|
183
183
|
|
184
184
|
public collapseAllGroups(): void;
|
185
185
|
|
186
|
-
public getGroupExpandingStates(): { [key: string]: boolean };
|
186
|
+
public getGroupExpandingStates(): { [key: string]: boolean }|null;
|
187
187
|
|
188
188
|
public restoreGroupExpandingStates(states: any, opt_default?: boolean): void;
|
189
189
|
|
190
190
|
public sortColumn(columnRef: string|number, direction: string): void;
|
191
191
|
|
192
|
-
public getSortingStates(): (any)[];
|
192
|
+
public getSortingStates(): (any)[]|null;
|
193
193
|
|
194
194
|
public restoreSortingStates(states: (any)[]): void;
|
195
195
|
|
@@ -213,17 +213,17 @@ declare class CompositeGrid extends ElementWrapper {
|
|
213
213
|
|
214
214
|
public clearSelection(): void;
|
215
215
|
|
216
|
-
public getSelectedRows(): (number)[];
|
216
|
+
public getSelectedRows(): (number)[]|null;
|
217
217
|
|
218
|
-
public getSelectedDataRows(): (any)[];
|
218
|
+
public getSelectedDataRows(): (any)[]|null;
|
219
219
|
|
220
|
-
public getSection(sectionRef: Core.SectionReference): ILayoutGrid;
|
220
|
+
public getSection(sectionRef: Core.SectionReference): ILayoutGrid|null;
|
221
221
|
|
222
|
-
public addHeaderSection(sectionName: string): ILayoutGrid;
|
222
|
+
public addHeaderSection(sectionName: string): ILayoutGrid|null;
|
223
223
|
|
224
224
|
public removeHeaderSection(sectionName: string): void;
|
225
225
|
|
226
|
-
public addFooterSection(sectionName: string): ILayoutGrid;
|
226
|
+
public addFooterSection(sectionName: string): ILayoutGrid|null;
|
227
227
|
|
228
228
|
public removeFooterSection(sectionName: string): void;
|
229
229
|
|
@@ -231,7 +231,7 @@ declare class CompositeGrid extends ElementWrapper {
|
|
231
231
|
|
232
232
|
public scrollToColumn(colIndex: number, opt_leftOfView?: boolean): void;
|
233
233
|
|
234
|
-
public getCoreGrid(): Core;
|
234
|
+
public getCoreGrid(): Core|null;
|
235
235
|
|
236
236
|
public getRelativePosition(obj: ElementWrapper|Element|Event|MouseEvent): any;
|
237
237
|
|
@@ -271,6 +271,8 @@ declare class CompositeGrid extends ElementWrapper {
|
|
271
271
|
|
272
272
|
public setScrollTop(px: number): void;
|
273
273
|
|
274
|
+
public requestRowRefresh(): void;
|
275
|
+
|
274
276
|
public getConfigObject(gridOptions?: any): any;
|
275
277
|
|
276
278
|
public setPagingState(currentPage: number, totalRows: number): void;
|
@@ -279,7 +281,7 @@ declare class CompositeGrid extends ElementWrapper {
|
|
279
281
|
|
280
282
|
declare function tgtColModel(colIndex: number, name: string): void;
|
281
283
|
|
282
|
-
declare function dataModel(): DataView;
|
284
|
+
declare function dataModel(): DataView|null;
|
283
285
|
|
284
286
|
declare function colCount(columnIndex: number): string;
|
285
287
|
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import Ext from "../../../tr-grid-util/es6/Ext.js";
|
2
2
|
import Util from "../Core/grid/util/util.js";
|
3
|
-
import
|
3
|
+
import Plugin from "./Plugin.js";
|
4
|
+
import { Core, ILayoutGrid } from "../Core/index.js";
|
4
5
|
|
5
6
|
declare class DragAndDropTitlePlugin extends Plugin {
|
6
7
|
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import Ext from "../../../tr-grid-util/es6/Ext.js";
|
2
2
|
import Util from "../Core/grid/util/util.js";
|
3
|
-
import
|
3
|
+
import Plugin from "./Plugin.js";
|
4
|
+
import { ElementWrapper, Core } from "../Core/index.js";
|
4
5
|
|
5
6
|
declare class DraggableContentPlugin extends Plugin {
|
6
7
|
|
@@ -14,7 +15,7 @@ declare class DraggableContentPlugin extends Plugin {
|
|
14
15
|
|
15
16
|
public setDragContent(content: string|Element|ElementWrapper|any): void;
|
16
17
|
|
17
|
-
public getDragBox(): ElementWrapper;
|
18
|
+
public getDragBox(): ElementWrapper|null;
|
18
19
|
|
19
20
|
public getDragSource(): string;
|
20
21
|
|
@@ -0,0 +1,28 @@
|
|
1
|
+
import Ext from "../../../tr-grid-util/es6/Ext.js";
|
2
|
+
import Util from "../Core/grid/util/util.js";
|
3
|
+
import Core from "../Core/grid/Core.js"; // eslint-disable-line
|
4
|
+
import EventDispatcher from "../Core/grid/event/EventDispatcher.js";
|
5
|
+
import ElementWrapper from "../Core/grid/components/ElementWrapper.js"; // eslint-disable-line
|
6
|
+
|
7
|
+
declare class Plugin extends EventDispatcher {
|
8
|
+
|
9
|
+
constructor();
|
10
|
+
|
11
|
+
public getName(): string;
|
12
|
+
|
13
|
+
public initialize(owner: Core): void;
|
14
|
+
|
15
|
+
public unload(owner: Core): void;
|
16
|
+
|
17
|
+
public getRelativeGrid(e: Event|Element|ElementWrapper): Core|null;
|
18
|
+
|
19
|
+
public getGridElementFromPoint(x: number, y: number): Element|null;
|
20
|
+
|
21
|
+
}
|
22
|
+
|
23
|
+
declare function gridAPI(x: number, y: number): Element|null;
|
24
|
+
|
25
|
+
declare function to(e: any): void;
|
26
|
+
|
27
|
+
export default Plugin;
|
28
|
+
export { Plugin };
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import Ext from "../../../tr-grid-util/es6/Ext.js";
|
2
2
|
import Util from "../Core/grid/util/util.js";
|
3
|
-
import
|
3
|
+
import Plugin from "./Plugin.js";
|
4
|
+
import { Core } from "../Core/index.js";
|
4
5
|
|
5
6
|
declare class ResizableTitlePlugin extends Plugin {
|
6
7
|
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import Ext from "../../../tr-grid-util/es6/Ext.js";
|
2
2
|
import Util from "../Core/grid/util/util.js";
|
3
|
-
import
|
3
|
+
import Plugin from "./Plugin.js";
|
4
|
+
import { Core, ILayoutGrid } from "../Core/index.js";
|
4
5
|
|
5
6
|
declare class RowSelectionPlugin extends Plugin {
|
6
7
|
|
@@ -8,7 +9,7 @@ declare class RowSelectionPlugin extends Plugin {
|
|
8
9
|
|
9
10
|
public clearSelectedRows(opt_preserveAnchor?: boolean, opt_activeGrid?: Core): void;
|
10
11
|
|
11
|
-
public getActiveGrid(): Core;
|
12
|
+
public getActiveGrid(): Core|null;
|
12
13
|
|
13
14
|
public setActiveGrid(grid: Core): void;
|
14
15
|
|
@@ -16,9 +17,9 @@ declare class RowSelectionPlugin extends Plugin {
|
|
16
17
|
|
17
18
|
public getRowAnchor(opt_sectRef?: Core.SectionReference): number;
|
18
19
|
|
19
|
-
public getFirstSelectedIndex(opt_sectRef?: Core.SectionReference): number|null;
|
20
|
+
public getFirstSelectedIndex(opt_sectRef?: Core.SectionReference): number|null|null;
|
20
21
|
|
21
|
-
public getSelectedRows(opt_sectRef?: Core.SectionReference): (number)[];
|
22
|
+
public getSelectedRows(opt_sectRef?: Core.SectionReference): (number)[]|null;
|
22
23
|
|
23
24
|
public getSelectedRowCount(opt_sectRef?: Core.SectionReference): number;
|
24
25
|
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import Ext from "../../../tr-grid-util/es6/Ext.js";
|
2
2
|
import Util from "../Core/grid/util/util.js";
|
3
|
-
import
|
3
|
+
import Plugin from "./Plugin.js";
|
4
|
+
import { SectionSettings, ILayoutGrid } from "../Core/index.js";
|
4
5
|
|
5
6
|
declare class TreeIndentingPlugin extends Plugin {
|
6
7
|
|
@@ -1,9 +1,9 @@
|
|
1
|
-
// Composite grid
|
2
|
-
import { CompositeGrid } from "./CompositeGrid.js";
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
export {
|
7
|
-
CompositeGrid
|
8
|
-
};
|
9
|
-
|
1
|
+
// Composite grid
|
2
|
+
import { CompositeGrid } from "./CompositeGrid.js";
|
3
|
+
|
4
|
+
|
5
|
+
|
6
|
+
export {
|
7
|
+
CompositeGrid
|
8
|
+
};
|
9
|
+
|
@@ -46,7 +46,7 @@ declare class ConditionalColoringPlugin extends GridPlugin {
|
|
46
46
|
|
47
47
|
public getConfigObject(gridOptions?: any): any;
|
48
48
|
|
49
|
-
public setColumnColoring(colIndex: number, columnOptions
|
49
|
+
public setColumnColoring(colIndex: number, columnOptions?: (ConditionalColoringPlugin.ColumnOptions|null)): void;
|
50
50
|
|
51
51
|
public setColumnBlinking(colIndex: number, blinkingOptions?: (boolean|ConditionalColoringPlugin.Blinking), field?: string): void;
|
52
52
|
|
@@ -14,7 +14,7 @@ declare class ColumnStats {
|
|
14
14
|
|
15
15
|
public setColumnDataGetter(func: ((...params: any[]) => any)): void;
|
16
16
|
|
17
|
-
public getColumnDataGetter(): ((...params: any[]) => any);
|
17
|
+
public getColumnDataGetter(): ((...params: any[]) => any)|null;
|
18
18
|
|
19
19
|
public getSum(): number;
|
20
20
|
|
@@ -32,7 +32,7 @@ declare class ColumnStats {
|
|
32
32
|
|
33
33
|
public getMidRange(): number;
|
34
34
|
|
35
|
-
public getCachedColumnData(): (number)[];
|
35
|
+
public getCachedColumnData(): (number)[]|null;
|
36
36
|
|
37
37
|
public markDirty(): boolean;
|
38
38
|
|
@@ -29,9 +29,9 @@ declare class DataCache extends EventDispatcher {
|
|
29
29
|
|
30
30
|
public getData(rid: string, cid: string): any;
|
31
31
|
|
32
|
-
public getAllRics(): { [key: string]: any };
|
32
|
+
public getAllRics(): { [key: string]: any }|null;
|
33
33
|
|
34
|
-
public getAllRowIds(): (string)[];
|
34
|
+
public getAllRowIds(): (string)[]|null;
|
35
35
|
|
36
36
|
public hasRowId(rid: string): boolean;
|
37
37
|
|
@@ -57,7 +57,7 @@ declare class DataCache extends EventDispatcher {
|
|
57
57
|
|
58
58
|
public resetStaticFields(): void;
|
59
59
|
|
60
|
-
public getStaticFields(): { [key: string]: number };
|
60
|
+
public getStaticFields(): { [key: string]: number }|null;
|
61
61
|
|
62
62
|
public dump(options?: any): (any)[];
|
63
63
|
|
@@ -65,7 +65,7 @@ declare class DataCache extends EventDispatcher {
|
|
65
65
|
|
66
66
|
public setDataCloudSettings(userId: string, productId: string, url: string, opt_lang?: string): void;
|
67
67
|
|
68
|
-
public getDataCloudFields(): (string)[];
|
68
|
+
public getDataCloudFields(): (string)[]|null;
|
69
69
|
|
70
70
|
public addDataCloudFields(fields: (string)[]|string): boolean;
|
71
71
|
|
@@ -51,9 +51,9 @@ declare class DataTable extends DataCache {
|
|
51
51
|
|
52
52
|
public removeAllRows(suppressEvent?: boolean): void;
|
53
53
|
|
54
|
-
public moveRow(fromIndex: (number)[]|number, toIndex: number, suppressEvent?: boolean): (string)[]|string;
|
54
|
+
public moveRow(fromIndex: (number)[]|number, toIndex: number, suppressEvent?: boolean): (string)[]|string|null;
|
55
55
|
|
56
|
-
public moveRows(startIndex: number|string, toIndex: number|string, opt_count?: number, suppressEvent?: boolean): (string)[];
|
56
|
+
public moveRows(startIndex: number|string, toIndex: number|string, opt_count?: number, suppressEvent?: boolean): (string)[]|null;
|
57
57
|
|
58
58
|
public swapRow(fromIndex: number, toIndex: number): void;
|
59
59
|
|
@@ -85,7 +85,7 @@ declare class DataTable extends DataCache {
|
|
85
85
|
|
86
86
|
public getSegmentParentRowId(rid: string): string;
|
87
87
|
|
88
|
-
public getSegmentValues(rids?: (string)[]): (number)[];
|
88
|
+
public getSegmentValues(rids?: (string)[]): (number)[]|null;
|
89
89
|
|
90
90
|
public fillSegment(segmentId: string): void;
|
91
91
|
|
@@ -101,9 +101,9 @@ declare class DataTable extends DataCache {
|
|
101
101
|
|
102
102
|
public removeAllSegmentChildren(): boolean;
|
103
103
|
|
104
|
-
public getSegmentIds(): (string)[];
|
104
|
+
public getSegmentIds(): (string)[]|null;
|
105
105
|
|
106
|
-
public getSegmentChildIds(segmentId: string): (string)[];
|
106
|
+
public getSegmentChildIds(segmentId: string): (string)[]|null;
|
107
107
|
|
108
108
|
public sortSegments(compare: ((...params: any[]) => any)): void;
|
109
109
|
|