@refinitiv-ui/efx-grid 6.0.2 → 6.0.5
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/column-format-dialog/lib/column-format-dialog.d.ts +13 -1
- package/lib/column-selection-dialog/lib/column-selection-dialog.d.ts +15 -2
- package/lib/column-selection-dialog/lib/column-selection-dialog.js +146 -5
- package/lib/core/dist/core.css +1 -1
- package/lib/core/dist/core.js +468 -1092
- 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 +33 -11
- package/lib/core/es6/data/DataView.d.ts +12 -18
- package/lib/core/es6/data/DataView.js +0 -4
- package/lib/core/es6/data/Segment.d.ts +2 -0
- package/lib/core/es6/data/Segment.js +7 -0
- package/lib/core/es6/data/SegmentCollection.d.ts +3 -3
- package/lib/core/es6/data/WrappedView.d.ts +13 -13
- package/lib/core/es6/data/WrappedView.js +6 -6
- package/lib/core/es6/grid/Core.d.ts +31 -27
- package/lib/core/es6/grid/Core.js +47 -11
- 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 +71 -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 +3 -1
- package/lib/core/es6/grid/components/Scrollbar.js +13 -0
- 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/checkbox-list.d.ts +13 -1
- package/lib/filter-dialog/lib/filter-dialog.d.ts +14 -1
- package/lib/filter-dialog/lib/filter-dialog.js +86 -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 +25 -10
- package/lib/grid/lib/efx-grid.js +22 -56
- package/lib/grid/themes/base.less +1 -1
- 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/grid/themes/solar/charcoal/efx-grid.js +1 -1
- package/lib/grid/themes/solar/charcoal/es5/all-elements.js +1 -1
- package/lib/grid/themes/solar/pearl/efx-grid.js +1 -1
- package/lib/grid/themes/solar/pearl/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 +98 -11
- package/lib/rt-grid/dist/rt-grid.js +1244 -1249
- 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 +24 -9
- package/lib/rt-grid/es6/Grid.js +285 -103
- 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 +6 -1
- package/lib/rt-grid/es6/SnapshotFiller.js +144 -15
- package/lib/tr-grid-checkbox/es6/Checkbox.d.ts +4 -3
- package/lib/tr-grid-checkbox/es6/Checkbox.js +51 -21
- 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 +4 -3
- package/lib/tr-grid-conditional-coloring/es6/ConditionalColoring.js +28 -13
- package/lib/tr-grid-in-cell-editing/es6/InCellEditing.d.ts +8 -5
- package/lib/tr-grid-in-cell-editing/es6/InCellEditing.js +106 -3
- package/lib/tr-grid-percent-bar/es6/PercentBar.js +1 -1
- 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 +3 -4
- package/lib/tr-grid-row-dragging/es6/RowDragging.js +86 -195
- 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.d.ts +8 -8
- package/lib/tr-grid-row-selection/es6/RowSelection.js +55 -31
- 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/CellPainter.js +1 -1
- 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 +32 -2
- package/lib/tr-grid-util/es6/ElfUtil.d.ts +4 -1
- package/lib/tr-grid-util/es6/ElfUtil.js +131 -28
- package/lib/tr-grid-util/es6/ExpanderIcon.js +2 -2
- 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/MultiTableManager.d.ts +8 -0
- package/lib/tr-grid-util/es6/MultiTableManager.js +164 -57
- 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 +57 -19
- package/lib/tr-grid-util/es6/formula/Formula.js +9 -1
- package/lib/tr-grid-util/es6/jsx.d.ts +223 -0
- package/lib/types/es6/Checkbox.d.ts +4 -3
- 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 +4 -3
- 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 -18
- package/lib/types/es6/Core/data/Segment.d.ts +2 -0
- 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 +31 -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 +3 -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 +8 -5
- 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 +24 -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 +6 -1
- package/lib/types/es6/RowDragging.d.ts +3 -4
- package/lib/types/es6/RowGrouping.d.ts +7 -2
- package/lib/types/es6/RowSegmenting.d.ts +7 -2
- package/lib/types/es6/RowSelection.d.ts +8 -8
- package/lib/types/es6/TextFormatting.d.ts +1 -1
- package/lib/types/es6/index.d.ts +1 -0
- package/lib/versions.json +17 -16
- 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
|
@@ -13,6 +13,7 @@ var RowPainter = function(options) {
|
|
13
13
|
this._onCellClicked = options.onCellClicked;
|
14
14
|
this._headerMenuClicked = options.headerMenuClicked;
|
15
15
|
this._menuIconClicked = this._menuIconClicked.bind(this);
|
16
|
+
this._segmentMode = options.segmentMode;
|
16
17
|
};
|
17
18
|
|
18
19
|
/** @type {string}
|
@@ -71,6 +72,29 @@ RowPainter._styles = prettifyCss([
|
|
71
72
|
]
|
72
73
|
]);
|
73
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
|
+
|
74
98
|
/** @public
|
75
99
|
* @param {tr.Grid} grid
|
76
100
|
*/
|
@@ -108,10 +132,12 @@ RowPainter.enableHeaderMenu = function(grid, enabled) {
|
|
108
132
|
* @param {number} rowIndex
|
109
133
|
* @param {number} checkboxColumnIndex
|
110
134
|
*/
|
111
|
-
RowPainter._clearCellContent = function(section, fromColumnIndex, toColumnIndex, rowIndex, checkboxColumnIndex) {
|
112
|
-
|
113
|
-
|
114
|
-
section.
|
135
|
+
RowPainter.prototype._clearCellContent = function(section, fromColumnIndex, toColumnIndex, rowIndex, checkboxColumnIndex) {
|
136
|
+
if(!this._segmentMode) {
|
137
|
+
for (var c = fromColumnIndex; c <= toColumnIndex; ++c) {
|
138
|
+
if (section.isColumnVisible(c) && c !== checkboxColumnIndex) {
|
139
|
+
section.getCell(c, rowIndex, false).setContent("");
|
140
|
+
}
|
115
141
|
}
|
116
142
|
}
|
117
143
|
};
|
@@ -123,6 +149,7 @@ RowPainter._clearCellContent = function(section, fromColumnIndex, toColumnIndex,
|
|
123
149
|
*/
|
124
150
|
RowPainter.prototype.removeHeaderStyle = function(section, columnIndex, rowIndex) {
|
125
151
|
section.enableRowClass(rowIndex, "header", false); // TODO: Slow
|
152
|
+
section.enableRowClass(rowIndex, "folder", false); // TODO: Slow
|
126
153
|
var cell = section.unstretchCell(columnIndex, rowIndex);
|
127
154
|
this._removeHeaderStyle(cell);
|
128
155
|
cell = section.getCell(columnIndex, rowIndex, false);
|
@@ -133,18 +160,23 @@ RowPainter.prototype.removeHeaderStyle = function(section, columnIndex, rowIndex
|
|
133
160
|
* @param {Object} cell Cell container
|
134
161
|
*/
|
135
162
|
RowPainter.prototype._removeHeaderStyle = function(cell) {
|
136
|
-
if(!cell
|
163
|
+
if(!cell) {
|
137
164
|
return;
|
138
165
|
}
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
cell.
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
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
|
+
}
|
148
180
|
};
|
149
181
|
|
150
182
|
/** @public
|
@@ -165,14 +197,14 @@ RowPainter.prototype.applyHeaderStyle = function(e) {
|
|
165
197
|
} else {
|
166
198
|
section.unstretchCell(mainCol, r);
|
167
199
|
section.enableRowClass(r, "header", true);
|
168
|
-
|
200
|
+
section.enableRowClass(r, "closed", e.collapsed ? true : false);
|
169
201
|
// Remove content from cell that appear on right side of mainCol
|
170
|
-
|
202
|
+
this._clearCellContent(section, mainCol + 1, colCount - 1, r, checkboxColumnIndex);
|
171
203
|
}
|
172
204
|
cell._groupHeaderStyle = true;
|
173
205
|
|
174
206
|
// Remove content from cell that appear on left side of mainCol
|
175
|
-
|
207
|
+
this._clearCellContent(section, 0, mainCol - 1, r, checkboxColumnIndex);
|
176
208
|
|
177
209
|
// Footer rows and some specific group levels contains no expander (arrow)
|
178
210
|
var newIcon = ExpanderIcon.renderOn(cell, e.hiddenArrow);
|
@@ -181,7 +213,11 @@ RowPainter.prototype.applyHeaderStyle = function(e) {
|
|
181
213
|
}
|
182
214
|
|
183
215
|
if (!footerRow) {
|
184
|
-
|
216
|
+
if (stretching) {
|
217
|
+
cell.addClass("folder"); // Stretched cell is in the cover-layer
|
218
|
+
} else {
|
219
|
+
section.enableRowClass(r, "folder", true); // Required by the fallback arrow from the CSS rules. TODO: Change this
|
220
|
+
}
|
185
221
|
if (this._clickableCell) {
|
186
222
|
cell.listen("click", this._onCellClicked);
|
187
223
|
}
|
@@ -201,6 +237,7 @@ RowPainter.prototype.applyHeaderStyle = function(e) {
|
|
201
237
|
}
|
202
238
|
cell.enableClass("closed", e.collapsed ? true : false);
|
203
239
|
cell.enableClass("color-tag", true);
|
240
|
+
RowPainter._applyColorTagClass(cell, e.colorTagClass);
|
204
241
|
cell.setStyle("paddingLeft", (e.indentSize > 0) ? e.indentSize + "px" : "");
|
205
242
|
};
|
206
243
|
|
@@ -210,7 +247,7 @@ RowPainter.prototype.applyHeaderStyle = function(e) {
|
|
210
247
|
*/
|
211
248
|
RowPainter.prototype.applyContentAsHeaderStyle = function (e) {
|
212
249
|
var cell = e.cell;
|
213
|
-
|
250
|
+
cell._groupHeaderStyle = true;
|
214
251
|
cell.addClass("folder"); // Required by the fallback arrow from the CSS rules. TODO: Change this
|
215
252
|
cell.enableClass("content-header", true);
|
216
253
|
cell.enableClass("closed", e.collapsed);
|
@@ -228,6 +265,7 @@ RowPainter.prototype.applyRowStyle = function(e) {
|
|
228
265
|
var indentSize = e.indentSize;
|
229
266
|
cell.setStyle("paddingLeft", (indentSize > 0) ? indentSize + "px" : "");
|
230
267
|
cell.enableClass("color-tag", e.nonGroupRow ? false : true);
|
268
|
+
RowPainter._applyColorTagClass(cell, e.colorTagClass);
|
231
269
|
};
|
232
270
|
|
233
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
|
|
@@ -0,0 +1,223 @@
|
|
1
|
+
export declare namespace JSXInterface {
|
2
|
+
interface ControlHTMLAttributes<T> extends HTMLAttributes<T> {
|
3
|
+
accept?: string;
|
4
|
+
alt?: string;
|
5
|
+
autoComplete?: string;
|
6
|
+
autocomplete?: string;
|
7
|
+
autoFocus?: boolean;
|
8
|
+
autofocus?: boolean | string;
|
9
|
+
capture?: string;
|
10
|
+
checked?: boolean;
|
11
|
+
crossOrigin?: string;
|
12
|
+
crossorigin?: string;
|
13
|
+
disabled?: boolean;
|
14
|
+
form?: string;
|
15
|
+
formAction?: string;
|
16
|
+
formaction?: string;
|
17
|
+
formEncType?: string;
|
18
|
+
formenctype?: string;
|
19
|
+
formMethod?: string;
|
20
|
+
formmethod?: string;
|
21
|
+
formNoValidate?: boolean;
|
22
|
+
formnovalidate?: boolean;
|
23
|
+
formTarget?: string;
|
24
|
+
formtarget?: string;
|
25
|
+
height?: number | string;
|
26
|
+
list?: string;
|
27
|
+
max?: number | string;
|
28
|
+
maxLength?: number;
|
29
|
+
maxlength?: number | string;
|
30
|
+
min?: number | string;
|
31
|
+
minLength?: number;
|
32
|
+
minlength?: number | string;
|
33
|
+
multiple?: boolean;
|
34
|
+
name?: string;
|
35
|
+
pattern?: string;
|
36
|
+
placeholder?: string;
|
37
|
+
readOnly?: boolean;
|
38
|
+
readonly?: boolean | string;
|
39
|
+
required?: boolean;
|
40
|
+
size?: number;
|
41
|
+
src?: string;
|
42
|
+
step?: number | string;
|
43
|
+
type?: string;
|
44
|
+
value?: string | string[] | number;
|
45
|
+
width?: number | string;
|
46
|
+
}
|
47
|
+
interface HTMLAttributes<T = HTMLElement> extends DOMAttributes<T> {
|
48
|
+
innerHTML?: string;
|
49
|
+
key?: string | number;
|
50
|
+
accessKey?: string;
|
51
|
+
class?: string | {
|
52
|
+
[className: string]: boolean;
|
53
|
+
};
|
54
|
+
contentEditable?: boolean | string;
|
55
|
+
contenteditable?: boolean | string;
|
56
|
+
contextMenu?: string;
|
57
|
+
contextmenu?: string;
|
58
|
+
dir?: string;
|
59
|
+
draggable?: boolean;
|
60
|
+
hidden?: boolean;
|
61
|
+
id?: string;
|
62
|
+
lang?: string;
|
63
|
+
spellCheck?: boolean;
|
64
|
+
spellcheck?: boolean | string;
|
65
|
+
style?: {
|
66
|
+
[key: string]: string | undefined;
|
67
|
+
};
|
68
|
+
tabIndex?: number;
|
69
|
+
tabindex?: number | string;
|
70
|
+
title?: string;
|
71
|
+
inputMode?: string;
|
72
|
+
inputmode?: string;
|
73
|
+
is?: string;
|
74
|
+
radioGroup?: string;
|
75
|
+
radiogroup?: string;
|
76
|
+
part?: string;
|
77
|
+
role?: string;
|
78
|
+
about?: string;
|
79
|
+
datatype?: string;
|
80
|
+
inlist?: any;
|
81
|
+
prefix?: string;
|
82
|
+
property?: string;
|
83
|
+
resource?: string;
|
84
|
+
typeof?: string;
|
85
|
+
vocab?: string;
|
86
|
+
autoCapitalize?: string;
|
87
|
+
autocapitalize?: string;
|
88
|
+
autoCorrect?: string;
|
89
|
+
autocorrect?: string;
|
90
|
+
autoSave?: string;
|
91
|
+
autosave?: string;
|
92
|
+
color?: string;
|
93
|
+
itemProp?: string;
|
94
|
+
itemprop?: string;
|
95
|
+
itemScope?: boolean;
|
96
|
+
itemscope?: boolean;
|
97
|
+
itemType?: string;
|
98
|
+
itemtype?: string;
|
99
|
+
itemID?: string;
|
100
|
+
itemid?: string;
|
101
|
+
itemRef?: string;
|
102
|
+
itemref?: string;
|
103
|
+
results?: number;
|
104
|
+
security?: string;
|
105
|
+
unselectable?: boolean;
|
106
|
+
}
|
107
|
+
interface DOMAttributes<T = Element> {
|
108
|
+
ref?: any;
|
109
|
+
slot?: string;
|
110
|
+
children?: any;
|
111
|
+
onCopy?: (event: ClipboardEvent) => void;
|
112
|
+
onCopyCapture?: (event: ClipboardEvent) => void;
|
113
|
+
onCut?: (event: ClipboardEvent) => void;
|
114
|
+
onCutCapture?: (event: ClipboardEvent) => void;
|
115
|
+
onPaste?: (event: ClipboardEvent) => void;
|
116
|
+
onPasteCapture?: (event: ClipboardEvent) => void;
|
117
|
+
onCompositionEnd?: (event: CompositionEvent) => void;
|
118
|
+
onCompositionEndCapture?: (event: CompositionEvent) => void;
|
119
|
+
onCompositionStart?: (event: CompositionEvent) => void;
|
120
|
+
onCompositionStartCapture?: (event: CompositionEvent) => void;
|
121
|
+
onCompositionUpdate?: (event: CompositionEvent) => void;
|
122
|
+
onCompositionUpdateCapture?: (event: CompositionEvent) => void;
|
123
|
+
onFocus?: (event: FocusEvent) => void;
|
124
|
+
onFocusCapture?: (event: FocusEvent) => void;
|
125
|
+
onBlur?: (event: FocusEvent) => void;
|
126
|
+
onBlurCapture?: (event: FocusEvent) => void;
|
127
|
+
onChange?: (event: Event) => void;
|
128
|
+
onChangeCapture?: (event: Event) => void;
|
129
|
+
onInput?: (event: Event) => void;
|
130
|
+
onInputCapture?: (event: Event) => void;
|
131
|
+
onReset?: (event: Event) => void;
|
132
|
+
onResetCapture?: (event: Event) => void;
|
133
|
+
onSubmit?: (event: Event) => void;
|
134
|
+
onSubmitCapture?: (event: Event) => void;
|
135
|
+
onInvalid?: (event: Event) => void;
|
136
|
+
onInvalidCapture?: (event: Event) => void;
|
137
|
+
onLoad?: (event: Event) => void;
|
138
|
+
onLoadCapture?: (event: Event) => void;
|
139
|
+
onError?: (event: Event) => void;
|
140
|
+
onErrorCapture?: (event: Event) => void;
|
141
|
+
onKeyDown?: (event: KeyboardEvent) => void;
|
142
|
+
onKeyDownCapture?: (event: KeyboardEvent) => void;
|
143
|
+
onKeyPress?: (event: KeyboardEvent) => void;
|
144
|
+
onKeyPressCapture?: (event: KeyboardEvent) => void;
|
145
|
+
onKeyUp?: (event: KeyboardEvent) => void;
|
146
|
+
onKeyUpCapture?: (event: KeyboardEvent) => void;
|
147
|
+
onAuxClick?: (event: MouseEvent) => void;
|
148
|
+
onClick?: (event: MouseEvent) => void;
|
149
|
+
onClickCapture?: (event: MouseEvent) => void;
|
150
|
+
onContextMenu?: (event: MouseEvent) => void;
|
151
|
+
onContextMenuCapture?: (event: MouseEvent) => void;
|
152
|
+
onDblClick?: (event: MouseEvent) => void;
|
153
|
+
onDblClickCapture?: (event: MouseEvent) => void;
|
154
|
+
onDrag?: (event: DragEvent) => void;
|
155
|
+
onDragCapture?: (event: DragEvent) => void;
|
156
|
+
onDragEnd?: (event: DragEvent) => void;
|
157
|
+
onDragEndCapture?: (event: DragEvent) => void;
|
158
|
+
onDragEnter?: (event: DragEvent) => void;
|
159
|
+
onDragEnterCapture?: (event: DragEvent) => void;
|
160
|
+
onDragExit?: (event: DragEvent) => void;
|
161
|
+
onDragExitCapture?: (event: DragEvent) => void;
|
162
|
+
onDragLeave?: (event: DragEvent) => void;
|
163
|
+
onDragLeaveCapture?: (event: DragEvent) => void;
|
164
|
+
onDragOver?: (event: DragEvent) => void;
|
165
|
+
onDragOverCapture?: (event: DragEvent) => void;
|
166
|
+
onDragStart?: (event: DragEvent) => void;
|
167
|
+
onDragStartCapture?: (event: DragEvent) => void;
|
168
|
+
onDrop?: (event: DragEvent) => void;
|
169
|
+
onDropCapture?: (event: DragEvent) => void;
|
170
|
+
onMouseDown?: (event: MouseEvent) => void;
|
171
|
+
onMouseDownCapture?: (event: MouseEvent) => void;
|
172
|
+
onMouseEnter?: (event: MouseEvent) => void;
|
173
|
+
onMouseLeave?: (event: MouseEvent) => void;
|
174
|
+
onMouseMove?: (event: MouseEvent) => void;
|
175
|
+
onMouseMoveCapture?: (event: MouseEvent) => void;
|
176
|
+
onMouseOut?: (event: MouseEvent) => void;
|
177
|
+
onMouseOutCapture?: (event: MouseEvent) => void;
|
178
|
+
onMouseOver?: (event: MouseEvent) => void;
|
179
|
+
onMouseOverCapture?: (event: MouseEvent) => void;
|
180
|
+
onMouseUp?: (event: MouseEvent) => void;
|
181
|
+
onMouseUpCapture?: (event: MouseEvent) => void;
|
182
|
+
onTouchCancel?: (event: TouchEvent) => void;
|
183
|
+
onTouchCancelCapture?: (event: TouchEvent) => void;
|
184
|
+
onTouchEnd?: (event: TouchEvent) => void;
|
185
|
+
onTouchEndCapture?: (event: TouchEvent) => void;
|
186
|
+
onTouchMove?: (event: TouchEvent) => void;
|
187
|
+
onTouchMoveCapture?: (event: TouchEvent) => void;
|
188
|
+
onTouchStart?: (event: TouchEvent) => void;
|
189
|
+
onTouchStartCapture?: (event: TouchEvent) => void;
|
190
|
+
onPointerDown?: (event: PointerEvent) => void;
|
191
|
+
onPointerDownCapture?: (event: PointerEvent) => void;
|
192
|
+
onPointerMove?: (event: PointerEvent) => void;
|
193
|
+
onPointerMoveCapture?: (event: PointerEvent) => void;
|
194
|
+
onPointerUp?: (event: PointerEvent) => void;
|
195
|
+
onPointerUpCapture?: (event: PointerEvent) => void;
|
196
|
+
onPointerCancel?: (event: PointerEvent) => void;
|
197
|
+
onPointerCancelCapture?: (event: PointerEvent) => void;
|
198
|
+
onPointerEnter?: (event: PointerEvent) => void;
|
199
|
+
onPointerEnterCapture?: (event: PointerEvent) => void;
|
200
|
+
onPointerLeave?: (event: PointerEvent) => void;
|
201
|
+
onPointerLeaveCapture?: (event: PointerEvent) => void;
|
202
|
+
onPointerOver?: (event: PointerEvent) => void;
|
203
|
+
onPointerOverCapture?: (event: PointerEvent) => void;
|
204
|
+
onPointerOut?: (event: PointerEvent) => void;
|
205
|
+
onPointerOutCapture?: (event: PointerEvent) => void;
|
206
|
+
onGotPointerCapture?: (event: PointerEvent) => void;
|
207
|
+
onGotPointerCaptureCapture?: (event: PointerEvent) => void;
|
208
|
+
onLostPointerCapture?: (event: PointerEvent) => void;
|
209
|
+
onLostPointerCaptureCapture?: (event: PointerEvent) => void;
|
210
|
+
onScroll?: (event: UIEvent) => void;
|
211
|
+
onScrollCapture?: (event: UIEvent) => void;
|
212
|
+
onWheel?: (event: WheelEvent) => void;
|
213
|
+
onWheelCapture?: (event: WheelEvent) => void;
|
214
|
+
onAnimationStart?: (event: AnimationEvent) => void;
|
215
|
+
onAnimationStartCapture?: (event: AnimationEvent) => void;
|
216
|
+
onAnimationEnd?: (event: AnimationEvent) => void;
|
217
|
+
onAnimationEndCapture?: (event: AnimationEvent) => void;
|
218
|
+
onAnimationIteration?: (event: AnimationEvent) => void;
|
219
|
+
onAnimationIterationCapture?: (event: AnimationEvent) => void;
|
220
|
+
onTransitionEnd?: (event: TransitionEvent) => void;
|
221
|
+
onTransitionEndCapture?: (event: TransitionEvent) => void;
|
222
|
+
}
|
223
|
+
}
|
@@ -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
|
|
@@ -12,7 +12,8 @@ declare namespace CheckboxPlugin {
|
|
12
12
|
checkboxCreated?: ((...params: any[]) => any),
|
13
13
|
checkboxBinding?: ((...params: any[]) => any),
|
14
14
|
clicked?: ((...params: any[]) => any),
|
15
|
-
width?: number
|
15
|
+
width?: number,
|
16
|
+
topCheckboxHandler?: boolean
|
16
17
|
};
|
17
18
|
|
18
19
|
type ColumnOptions = {
|
@@ -41,7 +42,7 @@ declare class CheckboxPlugin extends GridPlugin {
|
|
41
42
|
|
42
43
|
public getDisplayColumn(): number;
|
43
44
|
|
44
|
-
public getCheckbox(sectionRef: any, rowIndex: number): Element;
|
45
|
+
public getCheckbox(sectionRef: any, rowIndex: number): Element|null;
|
45
46
|
|
46
47
|
public selectAll(): void;
|
47
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 {
|