@refinitiv-ui/efx-grid 6.0.61 → 6.0.62

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/grid/index.js CHANGED
@@ -1,3 +1,3 @@
1
1
  import {Grid} from "./lib/efx-grid.js";
2
2
  export {Grid}
3
- window.EFX_GRID = { version: "6.0.61" };
3
+ window.EFX_GRID = { version: "6.0.62" };
@@ -90,6 +90,10 @@ var RangeBarPlugin = function RangeBarPlugin() {
90
90
  };
91
91
  Ext.inherits(RangeBarPlugin, GridPlugin);
92
92
 
93
+ /** @type {boolean}
94
+ * @private
95
+ */
96
+ RangeBarPlugin._LEDGuage = true;
93
97
  /** @type {boolean}
94
98
  * @private
95
99
  */
@@ -144,6 +148,10 @@ RangeBarPlugin.prototype.initialize = function (host, options) {
144
148
  * @ignore
145
149
  */
146
150
  RangeBarPlugin.prototype._afterInit = function () {
151
+ if (!ElfUtil.hasComponent("ef-led-gauge")) {
152
+ console.log("The LED Gauge component is required for the range bar extension. Please make sure to import both the LED Gauge component and its theme.");
153
+ RangeBarPlugin._LEDGuage = false;
154
+ }
147
155
  var colCount = this.getColumnCount();
148
156
  for (var i = 0; i < colCount; ++i) {
149
157
  this._setColumnRenderer(i);
@@ -449,6 +457,9 @@ RangeBarPlugin.prototype._onThemeLoaded = function () {
449
457
  * @param {Object} e
450
458
  */
451
459
  RangeBarPlugin.prototype._onPostSectionBinding = function (e) {
460
+ if (!RangeBarPlugin._LEDGuage) {
461
+ return;
462
+ }
452
463
  var section = e["section"];
453
464
  var dataRows = /** @type{Array.<Object>} */e["dataRows"];
454
465
  var colCount = section.getColumnCount();
@@ -110,7 +110,7 @@ var _filterByConditions = function(ctx, rowData) {
110
110
  if(ctx._rawDataAccessor) {
111
111
  val = ctx._rawDataAccessor(val);
112
112
  }
113
- var str, num, dateVal; // intentionally left undefined
113
+ var str, lowercasedStr, num, dateVal; // intentionally left undefined
114
114
  var finalResult = false;
115
115
  var result = false;
116
116
  for(var i = 0; i < condCount; ++i) {
@@ -163,12 +163,16 @@ var _filterByConditions = function(ctx, rowData) {
163
163
  str = val;
164
164
  }
165
165
  str = convertToString(str);
166
- if(!opDef.caseSensitive) {
167
- str = str.toLowerCase();
168
- }
169
166
  }
170
167
 
171
- result = opFunc(str, cond.value);
168
+ if(opDef.caseSensitive) {
169
+ result = opFunc(str, cond.value);
170
+ } else {
171
+ if(lowercasedStr == null) {
172
+ lowercasedStr = str.toLowerCase();
173
+ }
174
+ result = opFunc(lowercasedStr, cond.value);
175
+ }
172
176
  }
173
177
  if(i > 0) {
174
178
  if(orConnector) {
@@ -428,6 +432,8 @@ FilterBuilder.prototype.buildFilter = function() {
428
432
  }
429
433
 
430
434
  // Prepare user value to be in ready to use form to boost performance
435
+ var fieldName = this._fieldName;
436
+ var fmtFieldName = this._formattedFieldName;
431
437
  var formatter = this._formatter;
432
438
  var conds = this._conditions.slice();
433
439
  for(var i = 0; i < condCount; ++i) {
@@ -452,8 +458,8 @@ FilterBuilder.prototype.buildFilter = function() {
452
458
  } else if(opType === "string") {
453
459
  if(formatter) { // WARNING: This is not in sync when _formattedDataAccessor exists
454
460
  var dummyRow = {};
455
- dummyRow[fieldName] = inputStr;
456
- dummyRow[fmtFieldName] = inputStr;
461
+ dummyRow[fieldName] = value;
462
+ dummyRow[fmtFieldName] = value;
457
463
  value = formatter(dummyRow); // WARNING: dummyRow may not provide enough data for formatting correctly
458
464
  }
459
465
  value = convertToString(value);
@@ -11,33 +11,35 @@ declare namespace FilterOperators {
11
11
  };
12
12
 
13
13
  type Operators = {
14
- EQ: FilterOperators.Operator|null,
15
- NEQ: FilterOperators.Operator|null,
16
- NUMEQ: FilterOperators.Operator|null,
17
- NUMNEQ: FilterOperators.Operator|null,
18
- GT: FilterOperators.Operator|null,
19
- GTE: FilterOperators.Operator|null,
20
- LT: FilterOperators.Operator|null,
21
- LTE: FilterOperators.Operator|null,
22
- BEGIN: FilterOperators.Operator|null,
23
- NBEGIN: FilterOperators.Operator|null,
24
- END: FilterOperators.Operator|null,
25
- NEND: FilterOperators.Operator|null,
26
- CONT: FilterOperators.Operator|null,
27
- NCONT: FilterOperators.Operator|null,
28
- EQ_BLANK: FilterOperators.Operator|null,
29
- EQ_NBLANK: FilterOperators.Operator|null,
30
- DT: FilterOperators.Operator|null,
31
- DTA: FilterOperators.Operator|null,
32
- DTB: FilterOperators.Operator|null,
33
- TXTEQ: FilterOperators.Operator|null,
34
- BLANK: FilterOperators.Operator|null,
35
- NBLANK: FilterOperators.Operator|null
14
+ EQ: FilterOperators.Operator,
15
+ NEQ: FilterOperators.Operator,
16
+ NUMEQ: FilterOperators.Operator,
17
+ NUMNEQ: FilterOperators.Operator,
18
+ GT: FilterOperators.Operator,
19
+ GTE: FilterOperators.Operator,
20
+ LT: FilterOperators.Operator,
21
+ LTE: FilterOperators.Operator,
22
+ BEGIN: FilterOperators.Operator,
23
+ NBEGIN: FilterOperators.Operator,
24
+ END: FilterOperators.Operator,
25
+ NEND: FilterOperators.Operator,
26
+ CONT: FilterOperators.Operator,
27
+ NCONT: FilterOperators.Operator,
28
+ EQ_BLANK: FilterOperators.Operator,
29
+ EQ_NBLANK: FilterOperators.Operator,
30
+ DT: FilterOperators.Operator,
31
+ DTA: FilterOperators.Operator,
32
+ DTB: FilterOperators.Operator,
33
+ TXTEQ: FilterOperators.Operator,
34
+ BLANK: FilterOperators.Operator,
35
+ NBLANK: FilterOperators.Operator
36
36
  };
37
37
 
38
38
  }
39
39
 
40
- declare const OperatorFunctions: { [key: string]: ((...params: any[]) => any) }|null;
40
+ declare const FilterOperators: FilterOperators.Operators;
41
+
42
+ declare const OperatorFunctions: { [key: string]: ((...params: any[]) => any) };
41
43
 
42
44
  export default FilterOperators;
43
45
  export { FilterOperators, OperatorFunctions };
@@ -6,33 +6,34 @@
6
6
  * @property {string} formula Formula expression used by the operator
7
7
  */
8
8
 
9
- /** @typedef {Object.<string, FilterOperators~Operators>} FilterOperators~Operators
10
- * @property {FilterOperators~Operator} EQ Equal
11
- * @property {FilterOperators~Operator} NEQ Not equal
12
- * @property {FilterOperators~Operator} NUMEQ Number equal to
13
- * @property {FilterOperators~Operator} NUMNEQ Number not equal to
14
- * @property {FilterOperators~Operator} GT Greater than
15
- * @property {FilterOperators~Operator} GTE Greater than or equal
16
- * @property {FilterOperators~Operator} LT Less than
17
- * @property {FilterOperators~Operator} LTE Less than or equal
18
- * @property {FilterOperators~Operator} BEGIN Begin
19
- * @property {FilterOperators~Operator} NBEGIN Not begin
20
- * @property {FilterOperators~Operator} END End
21
- * @property {FilterOperators~Operator} NEND Not end
22
- * @property {FilterOperators~Operator} CONT Contain
23
- * @property {FilterOperators~Operator} NCONT Not contain
24
- * @property {FilterOperators~Operator} EQ_BLANK Equal to blank value
25
- * @property {FilterOperators~Operator} EQ_NBLANK Equal to non blank value
26
- * @property {FilterOperators~Operator} DT Date is
27
- * @property {FilterOperators~Operator} DTA Date is after
28
- * @property {FilterOperators~Operator} DTB Date is before
29
- * @property {FilterOperators~Operator} TXTEQ Alias to EQ
30
- * @property {FilterOperators~Operator} BLANK Alias to EQ_BLANK
31
- * @property {FilterOperators~Operator} NBLANK Alias to EQ_NBLANK
9
+ /** @typedef {Object.<string, FilterOperators~Operator>} FilterOperators~Operators
10
+ * @property {!FilterOperators~Operator} EQ Equal
11
+ * @property {!FilterOperators~Operator} NEQ Not equal
12
+ * @property {!FilterOperators~Operator} NUMEQ Number equal to
13
+ * @property {!FilterOperators~Operator} NUMNEQ Number not equal to
14
+ * @property {!FilterOperators~Operator} GT Greater than
15
+ * @property {!FilterOperators~Operator} GTE Greater than or equal
16
+ * @property {!FilterOperators~Operator} LT Less than
17
+ * @property {!FilterOperators~Operator} LTE Less than or equal
18
+ * @property {!FilterOperators~Operator} BEGIN Begin
19
+ * @property {!FilterOperators~Operator} NBEGIN Not begin
20
+ * @property {!FilterOperators~Operator} END End
21
+ * @property {!FilterOperators~Operator} NEND Not end
22
+ * @property {!FilterOperators~Operator} CONT Contain
23
+ * @property {!FilterOperators~Operator} NCONT Not contain
24
+ * @property {!FilterOperators~Operator} EQ_BLANK Equal to blank value
25
+ * @property {!FilterOperators~Operator} EQ_NBLANK Equal to non blank value
26
+ * @property {!FilterOperators~Operator} DT Date is
27
+ * @property {!FilterOperators~Operator} DTA Date is after
28
+ * @property {!FilterOperators~Operator} DTB Date is before
29
+ * @property {!FilterOperators~Operator} TXTEQ Alias to EQ
30
+ * @property {!FilterOperators~Operator} BLANK Alias to EQ_BLANK
31
+ * @property {!FilterOperators~Operator} NBLANK Alias to EQ_NBLANK
32
32
  */
33
33
 
34
- /** @namespace
34
+ /** @type {!FilterOperators~Operators}
35
35
  * @public
36
+ * @const
36
37
  */
37
38
  var FilterOperators = {
38
39
  EQ: {
@@ -196,7 +197,7 @@ FilterOperators.BLANK = FilterOperators.EQ_BLANK;
196
197
  FilterOperators.NBLANK = FilterOperators.EQ_NBLANK;
197
198
 
198
199
 
199
- /** @type {Object.<string, Function>}
200
+ /** @type {!Object.<string, Function>}
200
201
  * @public
201
202
  * @const
202
203
  */
@@ -1,6 +1,7 @@
1
1
  import { GridPrinter } from "../tr-grid-printer/es6/GridPrinter.js";
2
2
  import { Table } from "../tr-grid-util/es6/Table.js";
3
3
  import { MultiTableManager } from "../tr-grid-util/es6/MultiTableManager.js";
4
+ import { FilterOperators, OperatorFunctions } from "../tr-grid-util/es6/FilterOperators.js";
4
5
  import { DataGenerator } from "../tr-grid-util/es6/jet/DataGenerator.js";
5
6
  import { MockRTK } from "../tr-grid-util/es6/jet/MockRTK.js";
6
- export { GridPrinter, Table, MultiTableManager, DataGenerator, MockRTK };
7
+ export { GridPrinter, Table, MultiTableManager, DataGenerator, MockRTK, FilterOperators, OperatorFunctions };
@@ -1,6 +1,7 @@
1
1
  import { GridPrinter } from "../tr-grid-printer/es6/GridPrinter.js";
2
2
  import { Table } from "../tr-grid-util/es6/Table.js";
3
3
  import { MultiTableManager } from "../tr-grid-util/es6/MultiTableManager.js";
4
+ import { FilterOperators, OperatorFunctions } from "../tr-grid-util/es6/FilterOperators.js";
4
5
  import { DataGenerator } from "../tr-grid-util/es6/jet/DataGenerator.js";
5
6
  import { MockRTK } from "../tr-grid-util/es6/jet/MockRTK.js";
6
- export { GridPrinter, Table, MultiTableManager, DataGenerator, MockRTK };
7
+ export { GridPrinter, Table, MultiTableManager, DataGenerator, MockRTK, FilterOperators, OperatorFunctions };
package/lib/versions.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "tr-grid-util": "1.3.125",
2
+ "tr-grid-util": "1.3.128",
3
3
  "tr-grid-printer": "1.0.16",
4
4
  "@grid/column-dragging": "1.0.14",
5
5
  "@grid/row-segmenting": "1.0.24",
@@ -10,7 +10,7 @@
10
10
  "tr-grid-checkbox": "1.0.60",
11
11
  "tr-grid-column-fitter": "1.0.39",
12
12
  "tr-grid-column-formatting": "0.9.34",
13
- "tr-grid-column-grouping": "1.0.54",
13
+ "tr-grid-column-grouping": "1.0.55",
14
14
  "tr-grid-column-resizing": "1.0.28",
15
15
  "tr-grid-column-selection": "1.0.29",
16
16
  "tr-grid-column-stack": "1.0.70",
@@ -22,7 +22,7 @@
22
22
  "tr-grid-in-cell-editing": "1.0.79",
23
23
  "tr-grid-pagination": "1.0.24",
24
24
  "tr-grid-percent-bar": "1.0.22",
25
- "tr-grid-range-bar": "2.0.4",
25
+ "tr-grid-range-bar": "2.0.5",
26
26
  "tr-grid-row-dragging": "1.0.29",
27
27
  "tr-grid-row-filtering": "1.0.57",
28
28
  "tr-grid-row-grouping": "1.0.81",
package/package.json CHANGED
@@ -66,5 +66,5 @@
66
66
  "publishConfig": {
67
67
  "access": "public"
68
68
  },
69
- "version": "6.0.61"
69
+ "version": "6.0.62"
70
70
  }