@refinitiv-ui/efx-grid 6.0.84 → 6.0.86
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/core/dist/core.js +241 -153
- package/lib/core/dist/core.min.js +1 -1
- package/lib/core/es6/data/DataView.d.ts +4 -0
- package/lib/core/es6/data/DataView.js +23 -0
- package/lib/core/es6/grid/Core.d.ts +0 -4
- package/lib/core/es6/grid/Core.js +34 -22
- package/lib/core/es6/grid/plugins/SortableTitlePlugin.d.ts +13 -3
- package/lib/core/es6/grid/plugins/SortableTitlePlugin.js +184 -131
- package/lib/grid/index.js +1 -1
- package/lib/rt-grid/dist/rt-grid.js +275 -159
- package/lib/rt-grid/dist/rt-grid.min.js +1 -1
- package/lib/rt-grid/es6/ColumnDefinition.js +1 -2
- package/lib/rt-grid/es6/Grid.js +7 -7
- package/lib/tr-grid-checkbox/es6/Checkbox.d.ts +2 -0
- package/lib/tr-grid-checkbox/es6/Checkbox.js +38 -0
- package/lib/tr-grid-column-grouping/es6/ColumnGrouping.js +3 -4
- package/lib/tr-grid-filter-input/es6/FilterInput.js +32 -3
- package/lib/tr-grid-row-filtering/es6/RowFiltering.d.ts +4 -1
- package/lib/tr-grid-row-filtering/es6/RowFiltering.js +3 -0
- package/lib/tr-grid-textformatting/es6/TextFormatting.js +13 -2
- package/lib/tr-grid-util/es6/Dom.d.ts +1 -1
- package/lib/tr-grid-util/es6/Dom.js +1 -1
- package/lib/tr-grid-util/es6/ExpressionParser.js +1 -1
- package/lib/tr-grid-util/es6/FieldFormatter.js +4 -2
- package/lib/tr-grid-util/es6/FilterBuilder.d.ts +1 -1
- package/lib/tr-grid-util/es6/FilterBuilder.js +1 -1
- package/lib/tr-grid-util/es6/NumberFormatter.js +2 -2
- package/lib/tr-grid-util/es6/PercentBar.d.ts +1 -1
- package/lib/tr-grid-util/es6/PercentBar.js +1 -1
- package/lib/tr-grid-util/es6/RangeBar.d.ts +1 -1
- package/lib/tr-grid-util/es6/RangeBar.js +8 -7
- package/lib/tr-grid-util/es6/TextHighlighter.d.ts +0 -2
- package/lib/tr-grid-util/es6/TextHighlighter.js +1 -6
- package/lib/tr-grid-util/es6/formula/Formula.js +1 -1
- package/lib/tr-grid-util/es6/formula/VariableToken.js +1 -1
- package/lib/tr-grid-util/es6/formula/functions/Excel.d.ts +1 -1
- package/lib/tr-grid-util/es6/formula/functions/Excel.js +1 -1
- package/lib/tr-grid-util/es6/index.js +1 -1
- package/lib/tr-grid-util/es6/jet/DataGenerator.d.ts +1 -1
- package/lib/tr-grid-util/es6/jet/DataGenerator.js +1 -1
- package/lib/types/es6/Core/data/DataView.d.ts +4 -0
- package/lib/types/es6/Core/grid/Core.d.ts +0 -4
- package/lib/types/es6/Core/grid/plugins/SortableTitlePlugin.d.ts +13 -3
- package/lib/types/es6/RowFiltering.d.ts +4 -1
- package/lib/versions.json +6 -6
- package/package.json +1 -1
@@ -1001,8 +1001,7 @@ ColumnDefinition.prototype._setField = function(field, columnOption) {
|
|
1001
1001
|
if(!field) {
|
1002
1002
|
field = "";
|
1003
1003
|
}
|
1004
|
-
|
1005
|
-
field = field.replace(/^\s+|\s+$/gm, "");
|
1004
|
+
field = field.trim();
|
1006
1005
|
|
1007
1006
|
var formulaStr = columnOption ? columnOption["formula"] : "";
|
1008
1007
|
if(this._fnEngine) {
|
package/lib/rt-grid/es6/Grid.js
CHANGED
@@ -65,10 +65,10 @@ import { ElementWrapper } from "../../core/es6/grid/components/ElementWrapper.js
|
|
65
65
|
* @property {boolean=} columnVirtualization=false If enabled, all columns will be rendered. This will greatly impact grid's performance if the column set is huge.
|
66
66
|
* @property {(number|null|boolean)=} topFreezingCount=null If number >= 0 will fix number of frozen title section, If false = disabled scrollbar, if null then title section will freeze auto when new section added, this option will not work with scrollbar option.
|
67
67
|
* @property {(number|null)=} bottomFreezingCount=null If number >= 0 will fix nuber of frozen footer section, if null then footer section will freeze auto when new section added, this option will not work with scrollbar option.
|
68
|
-
* @property {boolean=} borders=
|
69
|
-
* @property {boolean=} gridlines
|
70
|
-
* @property {boolean=} verticalLines=
|
71
|
-
* @property {boolean=} contentVerticalLines=
|
68
|
+
* @property {boolean=} borders=false Lines around grid element
|
69
|
+
* @property {boolean=} gridlines Horizontal and Vertical lines for ONLY content sections
|
70
|
+
* @property {boolean=} verticalLines=false Vertical lines for all sections
|
71
|
+
* @property {boolean=} contentVerticalLines=false Vertical lines for all content section
|
72
72
|
* @property {boolean=} horizontalLines=true Horizontal lines for all sections
|
73
73
|
* @property {*=} RTK=null rtk toolkit instance
|
74
74
|
* @property {Grid~ADCOptions=} ADC=null ADC requesting level config object from adc team
|
@@ -1778,7 +1778,7 @@ Grid.prototype.restoreColumns = function(columns, byId) {
|
|
1778
1778
|
}
|
1779
1779
|
}
|
1780
1780
|
if (!found) {
|
1781
|
-
removingFields.push(
|
1781
|
+
removingFields.push(i);
|
1782
1782
|
}
|
1783
1783
|
}
|
1784
1784
|
|
@@ -1794,7 +1794,7 @@ Grid.prototype.restoreColumns = function(columns, byId) {
|
|
1794
1794
|
for (j = 0; j < keepingLen; j++) { // loop only keeping column
|
1795
1795
|
if(compareLogic(columns[i], keepingColumns[j])) {
|
1796
1796
|
found = true;
|
1797
|
-
var colIndex = this.getColumnIndex(columns[i].field); // We cannot use 'i' (colIndex) in this case, as it will sort the columns. Instead, we need to obtain a new column index from the field.
|
1797
|
+
var colIndex = this.getColumnIndex(columns[i].id || columns[i].field); // We cannot use 'i' (colIndex) in this case, as it will sort the columns. Instead, we need to obtain a new column index from the field.
|
1798
1798
|
columnOrdering.push(this.getColumnId(colIndex));
|
1799
1799
|
break;
|
1800
1800
|
}
|
@@ -3090,8 +3090,8 @@ Grid.prototype._getRowId = function(rowRef) {
|
|
3090
3090
|
*/
|
3091
3091
|
Grid.prototype.getColumnIndex = function(colRef) {
|
3092
3092
|
if(colRef) {
|
3093
|
-
var colCount = this.getColumnCount();
|
3094
3093
|
if(colRef instanceof ColumnDefinition) {
|
3094
|
+
var colCount = this.getColumnCount();
|
3095
3095
|
for(var i = 0; i < colCount; ++i) {
|
3096
3096
|
var colDef = this.getColumnDefinition(i);
|
3097
3097
|
if(colDef === colRef) {
|
@@ -76,5 +76,7 @@ declare class CheckboxPlugin extends GridPlugin {
|
|
76
76
|
|
77
77
|
declare function val(gridOptions?: any): any;
|
78
78
|
|
79
|
+
declare function newState(sectionRef: any, rowIndex: number, context?: any): void;
|
80
|
+
|
79
81
|
export default CheckboxPlugin;
|
80
82
|
export { CheckboxPlugin, CheckboxPlugin as Checkbox, CheckboxPlugin as CheckboxExtension };
|
@@ -1425,6 +1425,44 @@ CheckboxPlugin.prototype._onCheckboxChanged = function (e, toggling) {
|
|
1425
1425
|
|
1426
1426
|
e.stopPropagation();
|
1427
1427
|
};
|
1428
|
+
|
1429
|
+
/** @public
|
1430
|
+
* @description Check/Uncheck a specified row by a simulated mouse click input. This is for testing purpose.
|
1431
|
+
* @ignore
|
1432
|
+
* @param {Object} sectionRef Grid SectionReference object
|
1433
|
+
* @param {number} rowIndex
|
1434
|
+
* @param {Object=} context
|
1435
|
+
*/
|
1436
|
+
CheckboxPlugin.prototype.toggleCheckByMouse = function(sectionRef, rowIndex, context) {
|
1437
|
+
var eventObj = context || {};
|
1438
|
+
eventObj.sectionType = sectionRef;
|
1439
|
+
eventObj = this._mockMouseEvent(this._displayColumn, rowIndex, eventObj);
|
1440
|
+
|
1441
|
+
var checkbox = this.getCheckbox(sectionRef, rowIndex);
|
1442
|
+
if(!checkbox) {
|
1443
|
+
return;
|
1444
|
+
}
|
1445
|
+
var curState = CheckboxPlugin._getCheckState(checkbox);
|
1446
|
+
CheckboxPlugin._setBooleanProp(checkbox, "checked", curState !== "checked");
|
1447
|
+
eventObj.currentTarget = eventObj.target = checkbox;
|
1448
|
+
|
1449
|
+
this._onCheckboxMousedown(eventObj);
|
1450
|
+
this._onCheckboxClicked(eventObj);
|
1451
|
+
};
|
1452
|
+
/** @public
|
1453
|
+
* @description Supply an keyboard input. This is for testing purpose.
|
1454
|
+
* @ignore
|
1455
|
+
* @param {string} keyName
|
1456
|
+
* @param {number} rowIndex
|
1457
|
+
* @param {Object} context
|
1458
|
+
*/
|
1459
|
+
CheckboxPlugin.prototype.supplyKey = function(keyName, rowIndex, context) {
|
1460
|
+
var checkbox = this.getCheckbox("content", rowIndex);
|
1461
|
+
var eventObj = this._mockKeyboardEvent(keyName, context);
|
1462
|
+
eventObj.currentTarget = eventObj.target = checkbox;
|
1463
|
+
this._onCheckboxKeydown(eventObj);
|
1464
|
+
};
|
1465
|
+
|
1428
1466
|
/** @private
|
1429
1467
|
* @param {Event} e
|
1430
1468
|
*/
|
@@ -161,9 +161,7 @@ ColumnGroupingPlugin._toGroupDefinition = function (obj, groupId) {
|
|
161
161
|
*/
|
162
162
|
ColumnGroupingPlugin._cloneObject = function (obj) {
|
163
163
|
var newObj = cloneObject(obj);
|
164
|
-
if (Array.isArray(newObj.children)) {
|
165
|
-
newObj.children = newObj.children;
|
166
|
-
} else {
|
164
|
+
if (!Array.isArray(newObj.children)) {
|
167
165
|
newObj.children = [];
|
168
166
|
}
|
169
167
|
return newObj;
|
@@ -548,7 +546,8 @@ ColumnGroupingPlugin.prototype._evaluateGroupStructure = function () {
|
|
548
546
|
this._maxDepth = maxDepth + 1; // Column header depth = maximum group depth + 1
|
549
547
|
};
|
550
548
|
|
551
|
-
/**
|
549
|
+
/** Add pinning state to group definition for further verification.
|
550
|
+
* @private
|
552
551
|
* @param {Object} groupDef
|
553
552
|
* @param {string} side
|
554
553
|
*/
|
@@ -748,7 +748,7 @@ FilterInputPlugin.prototype.updateUI = function (colIndex, text) {
|
|
748
748
|
};
|
749
749
|
/** @private
|
750
750
|
* @param {number} colIndex
|
751
|
-
* @param {string} text
|
751
|
+
* @param {string|number} text
|
752
752
|
* @param {Object=} textMap
|
753
753
|
* @return {Object} Column option
|
754
754
|
*/
|
@@ -852,10 +852,11 @@ FilterInputPlugin.prototype.setInputValue = function (colIndex, value) {
|
|
852
852
|
var colOpt = this._getExtColumnOption(colIndex);
|
853
853
|
|
854
854
|
var type = colOpt.type ? colOpt.type.toLowerCase() : "";
|
855
|
+
var dateValue;
|
855
856
|
|
856
857
|
if (type == "date") {
|
857
858
|
var dateObj = ElfDate.from(value);
|
858
|
-
|
859
|
+
dateValue = dateObj ? dateObj.toDateString().substr(4) : "";
|
859
860
|
}
|
860
861
|
|
861
862
|
if (type == "multiselect") {
|
@@ -866,8 +867,36 @@ FilterInputPlugin.prototype.setInputValue = function (colIndex, value) {
|
|
866
867
|
this.filterColumn(colIndex, "", textMap);
|
867
868
|
} else {
|
868
869
|
inputElem.value = value;
|
869
|
-
this.filterColumn(colIndex, value);
|
870
|
+
this.filterColumn(colIndex, type == "date" ? dateValue : value);
|
871
|
+
}
|
872
|
+
};
|
873
|
+
/** @public
|
874
|
+
* @ignore
|
875
|
+
* @param {number} colIndex
|
876
|
+
* @return {Object}
|
877
|
+
*/
|
878
|
+
|
879
|
+
|
880
|
+
FilterInputPlugin.prototype.getColumnFilter = function (colIndex) {
|
881
|
+
var proc = this._filterProc;
|
882
|
+
|
883
|
+
if (proc) {
|
884
|
+
return proc.getColumnFilterState(colIndex);
|
870
885
|
}
|
886
|
+
|
887
|
+
return null;
|
888
|
+
};
|
889
|
+
/** @public
|
890
|
+
* @ignore
|
891
|
+
* @param {number} colIndex
|
892
|
+
* @return {Function}
|
893
|
+
*/
|
894
|
+
|
895
|
+
|
896
|
+
FilterInputPlugin.prototype.getFilterLogic = function (colIndex) {
|
897
|
+
var option = this._getExtColumnOption(colIndex);
|
898
|
+
|
899
|
+
return option._comparingLogic;
|
871
900
|
};
|
872
901
|
/** Force filtering for every column
|
873
902
|
* @public
|
@@ -45,7 +45,10 @@ declare namespace RowFilteringPlugin {
|
|
45
45
|
click?: ((...params: any[]) => any)|null,
|
46
46
|
clicked?: ((...params: any[]) => any)|null,
|
47
47
|
iconCreated?: ((...params: any[]) => any)|null,
|
48
|
-
filterChanged?: ((...params: any[]) => any)|null
|
48
|
+
filterChanged?: ((...params: any[]) => any)|null,
|
49
|
+
beforeDialogOpened?: ((...params: any[]) => any)|null,
|
50
|
+
dialogCommitted?: ((...params: any[]) => any)|null,
|
51
|
+
refreshed?: ((...params: any[]) => any)|null
|
49
52
|
};
|
50
53
|
|
51
54
|
}
|
@@ -102,6 +102,9 @@ The expression can take various forms:<br>
|
|
102
102
|
* @property {Function=} clicked=null Alias to `click` event handler
|
103
103
|
* @property {Function=} iconCreated=null Event handler dispatched when a new column filter icon is created.
|
104
104
|
* @property {Function=} filterChanged=null Event handler dispatched whenever global or column filter is changed by either adding or removing.
|
105
|
+
* @property {Function=} beforeDialogOpened=null Event handler dispatched before dialog opening.
|
106
|
+
* @property {Function=} dialogCommitted=null Event handler dispatched whenever the new settings from dialog are applied.
|
107
|
+
* @property {Function=} refreshed=null Event handler dispatched after new filter is applied to grid's data view.
|
105
108
|
*/
|
106
109
|
|
107
110
|
/** @private
|
@@ -30,8 +30,8 @@ import { DateTime } from '../../tr-grid-util/es6/DateTime.js';
|
|
30
30
|
* @property {boolean=} precisionEnabled=true If disabled, number of decimal will remain as original.
|
31
31
|
* @property {boolean=} plusSign=false
|
32
32
|
* @property {boolean=} separator=false Thousands separators
|
33
|
-
* @property {boolean=} percentSign=false
|
34
|
-
* @property {string=} scalingUnit Value can be million or billion
|
33
|
+
* @property {boolean=} percentSign=false If the formatType is percent and the value of percentSign is not specified, the percentSign is set to true by default
|
34
|
+
* @property {string=} scalingUnit=million Value can be million or billion
|
35
35
|
* @property {boolean=} multiplyBy100=false
|
36
36
|
* @property {boolean=} mutiplyBy100=false Alias of multiplyBy100
|
37
37
|
* @property {string=} dateTimeFormat="MM/DD/YYYY"
|
@@ -328,6 +328,14 @@ TextFormattingPlugin.prototype._setColumnFormat = function (colIndex, userObj) {
|
|
328
328
|
}
|
329
329
|
fo["decimalPlaces"] = precision;
|
330
330
|
fo["precisionEnabled"] = precisionEnabled;
|
331
|
+
if (fot === "percent") {
|
332
|
+
var percentSign = fo["percentSign"];
|
333
|
+
if (percentSign == null) {
|
334
|
+
fo["percentSign"] = true;
|
335
|
+
} else {
|
336
|
+
colData["percentSign"] = percentSign;
|
337
|
+
}
|
338
|
+
}
|
331
339
|
nf = new NumberFormatter(fo);
|
332
340
|
ff.setNumberFormatter(nf.format);
|
333
341
|
}
|
@@ -369,6 +377,9 @@ TextFormattingPlugin.prototype.getColumnFormatOptions = function (colIndex, opti
|
|
369
377
|
} else {
|
370
378
|
delete options["decimalPlaces"];
|
371
379
|
}
|
380
|
+
if (options["formatType"] === "percent" && colData["percentSign"] != null) {
|
381
|
+
options["percentSign"] = colData["percentSign"];
|
382
|
+
}
|
372
383
|
}
|
373
384
|
}
|
374
385
|
return options;
|
@@ -6,7 +6,7 @@ declare namespace Dom {
|
|
6
6
|
|
7
7
|
function div(className?: string|null): Element;
|
8
8
|
|
9
|
-
function text(textContent?: string|null, className?: string|null): Element;
|
9
|
+
function text(textContent?: (string|number)|null, className?: string|null): Element;
|
10
10
|
|
11
11
|
function appendChild(parentElem: Element|null, children: Node|any[]|null): Element|null;
|
12
12
|
|
@@ -27,7 +27,7 @@ Dom.div = function(className) {
|
|
27
27
|
/** Shorthand for creating a span element with textContent
|
28
28
|
* @public
|
29
29
|
* @function
|
30
|
-
* @param {string=} textContent
|
30
|
+
* @param {(string|number)=} textContent
|
31
31
|
* @param {string=} className
|
32
32
|
* @return {!Element}
|
33
33
|
*/
|
@@ -27,6 +27,8 @@ const DATE_TIME_TYPE = {
|
|
27
27
|
"TIME-DATE": true
|
28
28
|
};
|
29
29
|
|
30
|
+
const DEFAULT_DATE_TIME_FORMAT = "MM/DD/YYYY";
|
31
|
+
|
30
32
|
/* eslint-enaable */
|
31
33
|
|
32
34
|
/** @public
|
@@ -189,7 +191,7 @@ FieldFormatter.prototype.getOptions = function(options) { // serialize
|
|
189
191
|
options["field"] = this._field;
|
190
192
|
options["formatType"] = this._userFormatType ? this._userFormatType : this._formatType; // WARNING: Beware of case sensitivity
|
191
193
|
if(toDateTimeType(options["formatType"]) == DATE_TIME){
|
192
|
-
if(this._dateTimeFormat !==
|
194
|
+
if(this._dateTimeFormat && this._dateTimeFormat !== DEFAULT_DATE_TIME_FORMAT) {
|
193
195
|
options["dateTimeFormat"] = this._dateTimeFormat;
|
194
196
|
}
|
195
197
|
if(this._timeZone !== "GMT") {
|
@@ -391,7 +393,7 @@ FieldFormatter.prototype._formatDateTime = function(val, rowData) {
|
|
391
393
|
}
|
392
394
|
val = new Date(sec * 1000); // Convert real-time raw data (second) to millisecond
|
393
395
|
}
|
394
|
-
return this._df(val, this._dateTimeFormat
|
396
|
+
return this._df(val, this._dateTimeFormat || DEFAULT_DATE_TIME_FORMAT, this._timeZone);
|
395
397
|
};
|
396
398
|
/** @private
|
397
399
|
* @param {number|string|Date} val
|
@@ -32,7 +32,7 @@ declare class FilterBuilder {
|
|
32
32
|
|
33
33
|
public setDataAccessors(rawDataAccessor?: ((...params: any[]) => any)|null, formattedDataAccessor?: ((...params: any[]) => any)|null): void;
|
34
34
|
|
35
|
-
public addCondition(oper: string, value: string|number|Date|null, connector?: string|null, useUTCTime?: boolean|null): boolean;
|
35
|
+
public addCondition(oper: string, value: string|number|boolean|Date|null, connector?: string|null, useUTCTime?: boolean|null): boolean;
|
36
36
|
|
37
37
|
public addConditions(conditions: FilterBuilder.Conditions|null): number;
|
38
38
|
|
@@ -375,7 +375,7 @@ FilterBuilder.prototype.setDataAccessors = function(rawDataAccessor, formattedDa
|
|
375
375
|
};
|
376
376
|
/** @public
|
377
377
|
* @param {string} oper Operator id (e.g., "GT", "CONT", "EQ")
|
378
|
-
* @param {string|number|Date} value If date type operator is specified, this should be accompanied with useUTCTime flag to indicate whether local or UTC time to be used.
|
378
|
+
* @param {string|number|boolean|Date} value If date type operator is specified, this should be accompanied with useUTCTime flag to indicate whether local or UTC time to be used.
|
379
379
|
* @param {string=} connector Possible values are "OR" and "AND"
|
380
380
|
* @param {boolean=} useUTCTime If the value is not specified, the default setting will be used
|
381
381
|
* @return {boolean} Return true, if the new condition is added
|
@@ -161,7 +161,7 @@ NumberFormatter.prototype.init = function(options) { // deserialize
|
|
161
161
|
if(val != null && val !== "") {
|
162
162
|
this._percentSignEnabled = val ? true : false;
|
163
163
|
} else {
|
164
|
-
this._percentSignEnabled =
|
164
|
+
this._percentSignEnabled = false;
|
165
165
|
}
|
166
166
|
|
167
167
|
val = options["multiplyBy100"];
|
@@ -267,7 +267,7 @@ NumberFormatter.prototype.getOptions = function(options) { // serialize
|
|
267
267
|
}
|
268
268
|
|
269
269
|
if(formatType === "percent") {
|
270
|
-
if(this._percentSignEnabled !==
|
270
|
+
if(this._percentSignEnabled !== false) {
|
271
271
|
options["percentSign"] = this._percentSignEnabled;
|
272
272
|
}
|
273
273
|
if(this._multiplyBy100Enabled !== false) {
|
@@ -137,7 +137,7 @@ RangeBar.prototype.setStyles = function(obj) {
|
|
137
137
|
}
|
138
138
|
}
|
139
139
|
|
140
|
-
if(!this.
|
140
|
+
if(!this.isValid()) {
|
141
141
|
this._elem.style.backgroundColor = this._styles["trackColor"];
|
142
142
|
}
|
143
143
|
if(this._styles["fontColor"] != null) {
|
@@ -185,7 +185,7 @@ RangeBar.prototype.getPercent = function() {
|
|
185
185
|
RangeBar.prototype.setPercent = function(percent) {
|
186
186
|
percent = RangeBar._limitPercent(percent);
|
187
187
|
if(this._percent !== percent) {
|
188
|
-
if(this.
|
188
|
+
if(this.isValid() || percent === percent) { // Prevent unnecessary update by checking NaN
|
189
189
|
this._percent = percent;
|
190
190
|
this._updateUI();
|
191
191
|
}
|
@@ -226,20 +226,21 @@ RangeBar._limitPercent = function(percent) {
|
|
226
226
|
/** @public
|
227
227
|
* @return {boolean}
|
228
228
|
*/
|
229
|
-
RangeBar.prototype.
|
229
|
+
RangeBar.prototype.isValid = function() {
|
230
230
|
return this._percent === this._percent;
|
231
231
|
};
|
232
232
|
|
233
|
-
/**
|
234
|
-
* @public
|
233
|
+
/** @public
|
235
234
|
* @function
|
236
235
|
* @return {boolean}
|
237
236
|
*/
|
238
|
-
RangeBar.prototype.isInvalid =
|
237
|
+
RangeBar.prototype.isInvalid = function() {
|
238
|
+
return !this.isValid();
|
239
|
+
};
|
239
240
|
|
240
241
|
/** @private */
|
241
242
|
RangeBar.prototype._updateUI = function() {
|
242
|
-
if(this.
|
243
|
+
if(this.isValid()) {
|
243
244
|
var percent = ((this._percent * 10000) | 0) / 10000; // rounding number
|
244
245
|
this._slider.style.left = "calc(" +
|
245
246
|
(percent * 100) +
|
@@ -12,11 +12,6 @@ TextHighlighter.invalidChars = /[^\w-_ .]+/g;
|
|
12
12
|
* @public
|
13
13
|
*/
|
14
14
|
TextHighlighter.spaces = /\s+/;
|
15
|
-
/** /^\s+|\s+$/g
|
16
|
-
* @type {RegExp}
|
17
|
-
* @public
|
18
|
-
*/
|
19
|
-
TextHighlighter.spaceTrimer = /^\s+|\s+$/g;
|
20
15
|
/** Default is <mark> tag
|
21
16
|
* @type {string}
|
22
17
|
* @public
|
@@ -256,7 +251,7 @@ TextHighlighter.buildRule = function(txt, caseSensitive) {
|
|
256
251
|
|
257
252
|
if(txt) {
|
258
253
|
txt = txt.replace(TextHighlighter.invalidChars, " ");
|
259
|
-
txt = txt.
|
254
|
+
txt = txt.trim();
|
260
255
|
}
|
261
256
|
if(!txt) {
|
262
257
|
return null;
|
@@ -613,7 +613,7 @@ Formula.prototype._parse = function(exp) {
|
|
613
613
|
if(exp.charAt(0) === "=") { // Remove the first equal sign
|
614
614
|
exp = exp.substr(1);
|
615
615
|
}
|
616
|
-
exp = exp.
|
616
|
+
exp = exp.trim();
|
617
617
|
exp = exp.replace(/<>/g, "!=");
|
618
618
|
exp = exp.replace(/‛|‘|’/g, "'"); // Left and right single quote will be converted to simple single quote
|
619
619
|
exp = exp.replace(/‟|“|”/g, '"'); // Left and right double quote will be converted to simple double quote
|
@@ -4,7 +4,7 @@
|
|
4
4
|
* @param {number=} index
|
5
5
|
*/
|
6
6
|
var VariableToken = function(str, index) {
|
7
|
-
str = str.
|
7
|
+
str = str.trim();
|
8
8
|
|
9
9
|
if(this._inputConverter[str]) {
|
10
10
|
str = this._inputConverter[str];
|
@@ -50,7 +50,7 @@ tr.Conflator = Conflator;
|
|
50
50
|
tr.Perf = Perf;
|
51
51
|
tr.NumberFormatter = NumberFormatter;
|
52
52
|
tr.FieldFormatter = FieldFormatter;
|
53
|
-
tr.DateTime =
|
53
|
+
tr.DateTime = DateTime;
|
54
54
|
tr.FilterBuilder = FilterBuilder;
|
55
55
|
tr.FilterOperators = FilterOperators;
|
56
56
|
tr.PercentBar = PercentBar;
|
@@ -102,7 +102,7 @@ declare function randDate(min?: (number|any)|null, max?: (number|any)|null, seed
|
|
102
102
|
|
103
103
|
declare function randString(min?: number|null, max?: number|null, seed?: number|null): string;
|
104
104
|
|
105
|
-
declare function toRecords(data2D: (any[])[]|null, fields?: (string)[]|null): (any)[]|null;
|
105
|
+
declare function toRecords(data2D: (any[])[]|null, fields?: (string|number)[]|null): (any)[]|null;
|
106
106
|
|
107
107
|
declare function getSeed(): number;
|
108
108
|
|
@@ -277,7 +277,7 @@ var randString = function(min, max, seed) {
|
|
277
277
|
/** Convert 2D Array to Array of records
|
278
278
|
* @public
|
279
279
|
* @param {Array.<Array>} data2D Array of values
|
280
|
-
* @param {Array.<string>=} fields Keys to be mapped on the output records.
|
280
|
+
* @param {Array.<string|number>=} fields Keys to be mapped on the output records.
|
281
281
|
* @return {Array.<Object>} records
|
282
282
|
*/
|
283
283
|
var toRecords = function(data2D, fields) {
|
@@ -218,10 +218,14 @@ declare class DataView extends EventDispatcher {
|
|
218
218
|
|
219
219
|
public getExpansionParents(from?: number|null, to?: number|null): (string)[]|null;
|
220
220
|
|
221
|
+
public getExpansionParentByRowId(rid: string): string;
|
222
|
+
|
221
223
|
public isRowExpansion(rid: string): boolean;
|
222
224
|
|
223
225
|
public hasRowExpansion(rid: string): boolean;
|
224
226
|
|
227
|
+
public getRowExpansionCount(rowId: string): number;
|
228
|
+
|
225
229
|
public getRowExpansionId(rid: string, idx?: number|null): string;
|
226
230
|
|
227
231
|
public getRowExpansionIndex(rid: string): number;
|
@@ -227,10 +227,6 @@ declare class Core extends ElementWrapper {
|
|
227
227
|
|
228
228
|
public getColumnData(colIndex: number): any;
|
229
229
|
|
230
|
-
public setColumnData(colIndex: number, userData: any): any;
|
231
|
-
|
232
|
-
public newColumnData(colIndex: number): any;
|
233
|
-
|
234
230
|
public setAlwaysRenderColumn(colIndex: number, alwaysRender?: boolean|null): void;
|
235
231
|
|
236
232
|
public getFitContentWidth(): boolean;
|
@@ -18,6 +18,14 @@ declare namespace SortableTitlePlugin {
|
|
18
18
|
order?: SortableTitlePlugin.SortOrder|null
|
19
19
|
};
|
20
20
|
|
21
|
+
type SortingDefinition = {
|
22
|
+
colIndex?: number|null,
|
23
|
+
colId?: string|null,
|
24
|
+
field?: string|null,
|
25
|
+
sortOrder?: SortableTitlePlugin.SortOrder|null,
|
26
|
+
order?: SortableTitlePlugin.SortOrder|null
|
27
|
+
};
|
28
|
+
|
21
29
|
type ColumnOptions = {
|
22
30
|
sortable?: boolean|null,
|
23
31
|
sortBy?: string|null,
|
@@ -30,7 +38,7 @@ declare namespace SortableTitlePlugin {
|
|
30
38
|
};
|
31
39
|
|
32
40
|
type Options = {
|
33
|
-
initialSort?: (SortableTitlePlugin.InitialSort|(SortableTitlePlugin.
|
41
|
+
initialSort?: (SortableTitlePlugin.InitialSort|(SortableTitlePlugin.SortingDefinition)[])|null,
|
34
42
|
multicolumn?: (boolean|number)|null,
|
35
43
|
multiColumn?: (boolean|number)|null,
|
36
44
|
threeStatesSorting?: boolean|null,
|
@@ -79,7 +87,7 @@ declare class SortableTitlePlugin extends EventDispatcher {
|
|
79
87
|
|
80
88
|
public getSortedColumnIndex(priority?: number|null): number;
|
81
89
|
|
82
|
-
public getSortPriority(colIndex: number): number;
|
90
|
+
public getSortPriority(colIndex: number, colRef?: string|null): number;
|
83
91
|
|
84
92
|
public isColumnSorted(colIndex: number): boolean;
|
85
93
|
|
@@ -89,7 +97,7 @@ declare class SortableTitlePlugin extends EventDispatcher {
|
|
89
97
|
|
90
98
|
public sortColumn(colRef: number|string|null, sortOrder?: string|null, opt_arg?: any): void;
|
91
99
|
|
92
|
-
public sortColumns(sortOptions: (SortableTitlePlugin.
|
100
|
+
public sortColumns(sortOptions: (SortableTitlePlugin.SortingDefinition)[]|null, opt_arg?: any): void;
|
93
101
|
|
94
102
|
public clearSortState(opt_arg?: any): void;
|
95
103
|
|
@@ -113,6 +121,8 @@ declare class SortableTitlePlugin extends EventDispatcher {
|
|
113
121
|
|
114
122
|
public getColumnSortingFields(): (string)[];
|
115
123
|
|
124
|
+
public setFirstSortOrder(colIdentifier: string|number|(string|number)[]|null, sortOrder?: string|null): void;
|
125
|
+
|
116
126
|
public disableTwoStateSorting(disabled?: boolean|null): void;
|
117
127
|
|
118
128
|
public freezeIndicator(bool?: boolean|null): void;
|
@@ -45,7 +45,10 @@ declare namespace RowFilteringPlugin {
|
|
45
45
|
click?: ((...params: any[]) => any)|null,
|
46
46
|
clicked?: ((...params: any[]) => any)|null,
|
47
47
|
iconCreated?: ((...params: any[]) => any)|null,
|
48
|
-
filterChanged?: ((...params: any[]) => any)|null
|
48
|
+
filterChanged?: ((...params: any[]) => any)|null,
|
49
|
+
beforeDialogOpened?: ((...params: any[]) => any)|null,
|
50
|
+
dialogCommitted?: ((...params: any[]) => any)|null,
|
51
|
+
refreshed?: ((...params: any[]) => any)|null
|
49
52
|
};
|
50
53
|
|
51
54
|
}
|
package/lib/versions.json
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
{
|
2
|
-
"tr-grid-util": "1.3.
|
2
|
+
"tr-grid-util": "1.3.139",
|
3
3
|
"tr-grid-printer": "1.0.17",
|
4
4
|
"@grid/column-dragging": "1.0.16",
|
5
5
|
"@grid/row-segmenting": "1.0.30",
|
@@ -7,28 +7,28 @@
|
|
7
7
|
"@grid/zoom": "1.0.11",
|
8
8
|
"tr-grid-auto-tooltip": "1.1.6",
|
9
9
|
"tr-grid-cell-selection": "1.0.35",
|
10
|
-
"tr-grid-checkbox": "1.0.
|
10
|
+
"tr-grid-checkbox": "1.0.65",
|
11
11
|
"tr-grid-column-fitter": "1.0.40",
|
12
12
|
"tr-grid-column-formatting": "0.9.35",
|
13
|
-
"tr-grid-column-grouping": "1.0.
|
13
|
+
"tr-grid-column-grouping": "1.0.58",
|
14
14
|
"tr-grid-column-resizing": "1.0.28",
|
15
15
|
"tr-grid-column-selection": "1.0.33",
|
16
16
|
"tr-grid-column-stack": "1.0.74",
|
17
17
|
"tr-grid-conditional-coloring": "1.0.69",
|
18
18
|
"tr-grid-content-wrap": "1.0.20",
|
19
19
|
"tr-grid-contextmenu": "1.0.41",
|
20
|
-
"tr-grid-filter-input": "0.9.
|
20
|
+
"tr-grid-filter-input": "0.9.39",
|
21
21
|
"tr-grid-heat-map": "1.0.29",
|
22
22
|
"tr-grid-in-cell-editing": "1.0.81",
|
23
23
|
"tr-grid-pagination": "1.0.24",
|
24
24
|
"tr-grid-percent-bar": "1.0.22",
|
25
25
|
"tr-grid-range-bar": "2.0.6",
|
26
26
|
"tr-grid-row-dragging": "1.0.31",
|
27
|
-
"tr-grid-row-filtering": "1.0.
|
27
|
+
"tr-grid-row-filtering": "1.0.68",
|
28
28
|
"tr-grid-row-grouping": "1.0.86",
|
29
29
|
"tr-grid-row-selection": "1.0.27",
|
30
30
|
"tr-grid-rowcoloring": "1.0.25",
|
31
|
-
"tr-grid-textformatting": "1.0.
|
31
|
+
"tr-grid-textformatting": "1.0.48",
|
32
32
|
"tr-grid-titlewrap": "1.0.21",
|
33
33
|
"@grid/formatters": "1.0.51",
|
34
34
|
"@grid/column-selection-dialog": "4.0.56",
|