@refinitiv-ui/efx-grid 6.0.71 → 6.0.73
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/column-selection-dialog/lib/column-selection-dialog.js +9 -7
- package/lib/column-selection-dialog/themes/base.less +4 -8
- package/lib/column-selection-dialog/themes/elemental/dark/column-selection-dialog.js +1 -1
- package/lib/column-selection-dialog/themes/elemental/dark/es5/all-elements.js +1 -1
- package/lib/column-selection-dialog/themes/elemental/light/column-selection-dialog.js +1 -1
- package/lib/column-selection-dialog/themes/elemental/light/es5/all-elements.js +1 -1
- package/lib/column-selection-dialog/themes/halo/column-selection-dialog.less +3 -0
- package/lib/column-selection-dialog/themes/halo/dark/column-selection-dialog.js +1 -1
- package/lib/column-selection-dialog/themes/halo/dark/es5/all-elements.js +1 -1
- package/lib/column-selection-dialog/themes/halo/light/column-selection-dialog.js +1 -1
- package/lib/column-selection-dialog/themes/halo/light/es5/all-elements.js +1 -1
- package/lib/column-selection-dialog/themes/solar/charcoal/column-selection-dialog.js +1 -1
- package/lib/column-selection-dialog/themes/solar/charcoal/es5/all-elements.js +1 -1
- package/lib/column-selection-dialog/themes/solar/column-selection-dialog.less +5 -1
- package/lib/column-selection-dialog/themes/solar/pearl/column-selection-dialog.js +1 -1
- package/lib/column-selection-dialog/themes/solar/pearl/es5/all-elements.js +1 -1
- package/lib/core/dist/core.js +2 -2
- package/lib/core/dist/core.min.js +1 -1
- package/lib/core/es6/grid/Core.js +2 -2
- package/lib/filter-dialog/lib/filter-dialog.js +75 -36
- package/lib/grid/index.js +1 -1
- package/lib/rt-grid/dist/rt-grid.js +33 -14
- package/lib/rt-grid/dist/rt-grid.min.js +1 -1
- package/lib/rt-grid/es6/Grid.d.ts +1 -1
- package/lib/rt-grid/es6/Grid.js +24 -12
- package/lib/tr-grid-conditional-coloring/es6/ConditionalColoring.js +27 -24
- package/lib/tr-grid-filter-input/es6/FilterInput.d.ts +2 -0
- package/lib/tr-grid-filter-input/es6/FilterInput.js +49 -13
- package/lib/tr-grid-row-filtering/es6/RowFiltering.d.ts +1 -1
- package/lib/tr-grid-row-filtering/es6/RowFiltering.js +103 -15
- package/lib/tr-grid-util/es6/FilterBuilder.d.ts +3 -1
- package/lib/tr-grid-util/es6/FilterBuilder.js +26 -2
- package/lib/types/es6/FilterInput.d.ts +2 -0
- package/lib/types/es6/RealtimeGrid/Grid.d.ts +1 -1
- package/lib/types/es6/RowFiltering.d.ts +1 -1
- package/lib/versions.json +6 -6
- package/package.json +1 -1
@@ -570,7 +570,7 @@ Core.prototype._firstRendered = false;
|
|
570
570
|
* @return {string}
|
571
571
|
*/
|
572
572
|
Core.getVersion = function () {
|
573
|
-
return "5.1.
|
573
|
+
return "5.1.81";
|
574
574
|
};
|
575
575
|
/** {@link ElementWrapper#dispose}
|
576
576
|
* @override
|
@@ -5441,7 +5441,7 @@ Core.prototype._onRowHeightChanged = function (e) {
|
|
5441
5441
|
// TODO: Set row height one by one is not good
|
5442
5442
|
for(var j = 0; j < len; ++j) {
|
5443
5443
|
var evt = evts[j];
|
5444
|
-
var section = /** @type {ILayoutGrid} */(evt["
|
5444
|
+
var section = /** @type {ILayoutGrid} */(evt["section"]);
|
5445
5445
|
if(!this._containsSection(section)) {
|
5446
5446
|
continue; // The section is no longer contained in this grid
|
5447
5447
|
}
|
@@ -676,7 +676,7 @@ class FilterDialog extends BasicElement {
|
|
676
676
|
|
677
677
|
if(useUTCTime) {
|
678
678
|
ary2D.forEach(function(itm) {
|
679
|
-
|
679
|
+
itm[3] = true;
|
680
680
|
});
|
681
681
|
}
|
682
682
|
|
@@ -812,41 +812,84 @@ class FilterDialog extends BasicElement {
|
|
812
812
|
}
|
813
813
|
}
|
814
814
|
|
815
|
-
|
816
|
-
|
817
|
-
|
818
|
-
|
819
|
-
|
820
|
-
|
821
|
-
|
822
|
-
|
823
|
-
|
824
|
-
|
825
|
-
|
826
|
-
|
827
|
-
|
828
|
-
|
829
|
-
|
830
|
-
|
831
|
-
|
832
|
-
|
815
|
+
if (!Array.isArray(userConditions)) {
|
816
|
+
return;
|
817
|
+
}
|
818
|
+
|
819
|
+
const con1 = userConditions[0];
|
820
|
+
var validCon1 = false;
|
821
|
+
var conOp1 = "";
|
822
|
+
var conVal1 = "";
|
823
|
+
var connector = "";
|
824
|
+
if(Array.isArray(con1)) {
|
825
|
+
conOp1 = con1[0];
|
826
|
+
if(con1.length && con1[0]) {
|
827
|
+
conVal1 = con1[1];
|
828
|
+
if(conVal1 || conVal1 === 0 || conVal1 === false) {
|
829
|
+
validCon1 = true;
|
830
|
+
connector = con1[2] || "";
|
831
|
+
} else {
|
832
|
+
conVal1 = "";
|
833
833
|
}
|
834
|
-
|
835
|
-
|
836
|
-
} else {
|
837
|
-
if (con1[0]) {
|
838
|
-
this._generalComboBoxes[0].value = con1[0];
|
839
|
-
this._generalComboBoxes[1].value = con1[1] || "";
|
834
|
+
}
|
835
|
+
}
|
840
836
|
|
841
|
-
|
842
|
-
|
843
|
-
|
844
|
-
|
837
|
+
const con2 = userConditions[1];
|
838
|
+
var validCon2 = false;
|
839
|
+
var conOp2 = "";
|
840
|
+
var conVal2 = "";
|
841
|
+
if(validCon1 && Array.isArray(con2)) {
|
842
|
+
conOp2 = con2[0];
|
843
|
+
if(con2.length && conOp2) {
|
844
|
+
conVal2 = con2[1];
|
845
|
+
if(conVal2 || conVal2 === 0 || conVal2 === false) {
|
846
|
+
validCon2 = true;
|
847
|
+
} else {
|
848
|
+
conVal2 = "";
|
845
849
|
}
|
846
|
-
this._generalRadioBtns[0].checked = firstRadioState;
|
847
|
-
this._generalRadioBtns[1].checked = !firstRadioState;
|
848
850
|
}
|
849
851
|
}
|
852
|
+
|
853
|
+
var firstRadioState = true;
|
854
|
+
if(validCon1 && validCon2) {
|
855
|
+
firstRadioState = connector !== "OR";
|
856
|
+
}
|
857
|
+
|
858
|
+
if (toDateTimeType(this.fieldDataType)) {
|
859
|
+
if (validCon1) {
|
860
|
+
this._updateConditionUIs(this._dateTimeComboBoxes[0], this._dateTimePickers[0], conOp1, this._getDateString(conVal1));
|
861
|
+
}
|
862
|
+
if (validCon2) {
|
863
|
+
this._updateConditionUIs(this._dateTimeComboBoxes[1], this._dateTimePickers[1], conOp2, this._getDateString(conVal2));
|
864
|
+
}
|
865
|
+
this._updateConnectorUIs(this._dateTimeRadioBtns, firstRadioState);
|
866
|
+
} else {
|
867
|
+
if (validCon1) {
|
868
|
+
this._updateConditionUIs(this._generalComboBoxes[0], this._generalComboBoxes[1], conOp1, conVal1);
|
869
|
+
}
|
870
|
+
if (validCon2) {
|
871
|
+
this._updateConditionUIs(this._generalComboBoxes[2], this._generalComboBoxes[3], conOp2, conVal2);
|
872
|
+
}
|
873
|
+
this._updateConnectorUIs(this._generalRadioBtns, firstRadioState);
|
874
|
+
}
|
875
|
+
}
|
876
|
+
/** @private
|
877
|
+
* @param {Element} opCombobox
|
878
|
+
* @param {Element} valuePicker
|
879
|
+
* @param {string} opValue
|
880
|
+
* @param {string} value
|
881
|
+
*/
|
882
|
+
_updateConditionUIs(opCombobox, valuePicker, opValue, value) {
|
883
|
+
opCombobox.value = opValue;
|
884
|
+
valuePicker.value = value;
|
885
|
+
}
|
886
|
+
/** @private
|
887
|
+
* @param {Array.<Element>} connectors
|
888
|
+
* @param {boolean} connectorValue
|
889
|
+
*/
|
890
|
+
_updateConnectorUIs(connectors, connectorValue) {
|
891
|
+
connectors[0].checked = connectorValue;
|
892
|
+
connectors[1].checked = !connectorValue;
|
850
893
|
}
|
851
894
|
/** @private
|
852
895
|
* @returns {boolean}
|
@@ -926,14 +969,10 @@ class FilterDialog extends BasicElement {
|
|
926
969
|
* @return {string}
|
927
970
|
*/
|
928
971
|
_getDateString(date) {
|
929
|
-
var dateString = "";
|
930
|
-
var dateFormat = "yyyy-MM-dd";
|
931
972
|
if(!(date instanceof Date)){
|
932
973
|
date = new Date(date);
|
933
974
|
}
|
934
|
-
|
935
|
-
|
936
|
-
return dateString;
|
975
|
+
return DateTime.format(date.getTime(), "yyyy-MM-dd", this.useUTCTime ? "GMT" : "LOCAL");
|
937
976
|
}
|
938
977
|
|
939
978
|
/**
|
package/lib/grid/index.js
CHANGED
@@ -35112,7 +35112,14 @@ VirtualizedLayoutGrid.prototype.getFirstIndexInView = function () {
|
|
35112
35112
|
|
35113
35113
|
/** @inheritDoc */
|
35114
35114
|
VirtualizedLayoutGrid.prototype.getLastIndexInView = function () {
|
35115
|
-
|
35115
|
+
var li = this._firstIndex + this._getInnerRowCount() - 1;
|
35116
|
+
var core = this._grid._getContext();
|
35117
|
+
var dv = core.getDataSource();
|
35118
|
+
var actualLastIndex = dv ? dv.getRowCount() - 1 : -1;
|
35119
|
+
if (li > actualLastIndex) { //Avoid incorrect index because the delay of row count synchronization after filtering
|
35120
|
+
return actualLastIndex;
|
35121
|
+
}
|
35122
|
+
return li;
|
35116
35123
|
};
|
35117
35124
|
|
35118
35125
|
/** @inheritDoc */
|
@@ -36228,7 +36235,7 @@ Core.prototype._firstRendered = false;
|
|
36228
36235
|
* @return {string}
|
36229
36236
|
*/
|
36230
36237
|
Core.getVersion = function () {
|
36231
|
-
return "5.1.
|
36238
|
+
return "5.1.80";
|
36232
36239
|
};
|
36233
36240
|
/** {@link ElementWrapper#dispose}
|
36234
36241
|
* @override
|
@@ -46686,7 +46693,7 @@ Grid.prototype.addStaticDataRows = function(dataRows, fields) {
|
|
46686
46693
|
/** Insert, update, remove and reorder data based on the given array of records
|
46687
46694
|
* @public
|
46688
46695
|
* @param {Array.<Object>} records Array of records for insert, remove, update, reorder in one operation
|
46689
|
-
* @param {string} rowIdentifier Check difference data with the row identifier map property for operate record.
|
46696
|
+
* @param {string=} rowIdentifier Check difference data with the row identifier map property for operate record.
|
46690
46697
|
* @example
|
46691
46698
|
* // Grid data set will be updated to 3 records. All rows in the grid will be cleared and new rows will be inserted
|
46692
46699
|
* grid.updateDataSet([
|
@@ -46738,14 +46745,25 @@ Grid.prototype.updateDataSet = function(records, rowIdentifier) {
|
|
46738
46745
|
var rowDef, id, record, i;
|
46739
46746
|
var rowDefs = this.getAllRowDefinitions(); // Include the filter/hidden rows
|
46740
46747
|
var rowDefCount = rowDefs.length;
|
46741
|
-
|
46742
|
-
|
46743
|
-
|
46744
|
-
|
46745
|
-
|
46746
|
-
|
46747
|
-
|
46748
|
-
|
46748
|
+
if(rowIdentifier) {
|
46749
|
+
for (i = 0; i < rowDefCount; i++) {
|
46750
|
+
rowDef = rowDefs[i];
|
46751
|
+
if(rowDef) {
|
46752
|
+
id = rowDef.getRowData()[rowIdentifier];
|
46753
|
+
if(id || id === 0) {
|
46754
|
+
oldDataMap[id] = rowDef;
|
46755
|
+
} else { // Any existing rowDef without row identifier should be removed
|
46756
|
+
this.removeRow(rowDef); // Slow
|
46757
|
+
}
|
46758
|
+
}
|
46759
|
+
}
|
46760
|
+
} else {
|
46761
|
+
for (i = 0; i < rowDefCount; i++) {
|
46762
|
+
record = records[i];
|
46763
|
+
if(record) {
|
46764
|
+
oldDataMap[i] = rowDefs[i]; // Use index instead of rowIdentifier
|
46765
|
+
} else {
|
46766
|
+
this.removeRow(rowDefs[i]); // Need to use rowRef, can't use index in view
|
46749
46767
|
}
|
46750
46768
|
}
|
46751
46769
|
}
|
@@ -46755,7 +46773,7 @@ Grid.prototype.updateDataSet = function(records, rowIdentifier) {
|
|
46755
46773
|
var newDataMap = {};
|
46756
46774
|
for (i = recordCount - 1; i >= 0; i--) {
|
46757
46775
|
record = records[i];
|
46758
|
-
id = record[rowIdentifier];
|
46776
|
+
id = rowIdentifier ? record[rowIdentifier] : i;
|
46759
46777
|
rowDef = oldDataMap[id];
|
46760
46778
|
newDataMap[id] = record; // Assign a new data map to compare to the previous data
|
46761
46779
|
record[fieldSorting] = i;
|
@@ -46777,8 +46795,9 @@ Grid.prototype.updateDataSet = function(records, rowIdentifier) {
|
|
46777
46795
|
}
|
46778
46796
|
}
|
46779
46797
|
|
46780
|
-
|
46781
|
-
|
46798
|
+
if(rowIdentifier) {
|
46799
|
+
this._dt.sortOnce(ROW_DEF, "a", compareNumber, fieldSorting);
|
46800
|
+
}
|
46782
46801
|
};
|
46783
46802
|
/** @private
|
46784
46803
|
* @param {Array|Object} item
|