@refinitiv-ui/efx-grid 6.0.93 → 6.0.94

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. package/lib/formatters/es6/CoralButtonFormatter.d.ts +0 -2
  2. package/lib/formatters/es6/CoralButtonFormatter.js +9 -4
  3. package/lib/formatters/es6/CoralCheckboxFormatter.js +10 -5
  4. package/lib/formatters/es6/CoralComboBoxFormatter.js +13 -12
  5. package/lib/formatters/es6/CoralIconFormatter.d.ts +0 -2
  6. package/lib/formatters/es6/CoralIconFormatter.js +9 -4
  7. package/lib/formatters/es6/CoralInputFormatter.js +9 -4
  8. package/lib/formatters/es6/CoralRadioButtonFormatter.d.ts +0 -2
  9. package/lib/formatters/es6/CoralRadioButtonFormatter.js +20 -15
  10. package/lib/formatters/es6/CoralSelectFormatter.js +12 -7
  11. package/lib/formatters/es6/CoralToggleFormatter.js +4 -4
  12. package/lib/formatters/es6/DuplexEmeraldDateTimePickerFormatter.js +20 -20
  13. package/lib/formatters/es6/EFButtonFormatter.d.ts +0 -2
  14. package/lib/formatters/es6/EFButtonFormatter.js +9 -4
  15. package/lib/formatters/es6/EFCheckboxFormatter.js +10 -5
  16. package/lib/formatters/es6/EFComboBoxFormatter.js +17 -7
  17. package/lib/formatters/es6/EFDateTimePickerFormatter.js +11 -6
  18. package/lib/formatters/es6/EFIconFormatter.d.ts +0 -2
  19. package/lib/formatters/es6/EFIconFormatter.js +9 -4
  20. package/lib/formatters/es6/EFNumberFieldFormatter.js +9 -4
  21. package/lib/formatters/es6/EFRadioButtonFormatter.d.ts +0 -2
  22. package/lib/formatters/es6/EFRadioButtonFormatter.js +25 -15
  23. package/lib/formatters/es6/EFSelectFormatter.js +17 -7
  24. package/lib/formatters/es6/EFTextFieldFormatter.js +4 -4
  25. package/lib/formatters/es6/EFToggleFormatter.js +4 -4
  26. package/lib/formatters/es6/EmeraldDateTimePickerFormatter.js +6 -6
  27. package/lib/formatters/es6/FormatterBuilder.js +32 -32
  28. package/lib/formatters/es6/NumericInputFormatter.js +7 -7
  29. package/lib/formatters/es6/PercentBarFormatter.js +5 -5
  30. package/lib/formatters/es6/SimpleImageFormatter.js +3 -3
  31. package/lib/formatters/es6/SimpleInputFormatter.js +4 -4
  32. package/lib/formatters/es6/SimpleLinkFormatter.js +4 -4
  33. package/lib/formatters/es6/SimpleTickerFormatter.js +5 -5
  34. package/lib/formatters/es6/SimpleToggleFormatter.js +16 -16
  35. package/lib/formatters/es6/TextFormatter.js +4 -4
  36. package/lib/grid/index.js +1 -1
  37. package/lib/tr-grid-cell-selection/es6/CellSelection.js +1 -1
  38. package/lib/tr-grid-row-dragging/es6/RowDragging.js +1 -1
  39. package/lib/tr-grid-row-grouping/es6/RowGrouping.js +139 -137
  40. package/lib/tr-grid-row-selection/es6/RowSelection.js +260 -279
  41. package/lib/tr-grid-util/es6/DragUI.js +1 -1
  42. package/lib/types/es6/ColumnGrouping.d.ts +1 -2
  43. package/lib/versions.json +6 -6
  44. package/package.json +1 -1
@@ -11,14 +11,14 @@ import FormatterBuilder from "./FormatterBuilder.js";
11
11
  * @param {Element} element
12
12
  * @param {Object} ctx
13
13
  */
14
- var onElementUpdated = function (element, ctx) {
14
+ let onElementUpdated = function (element, ctx) {
15
15
  element.src = ctx.value;
16
16
  };
17
17
 
18
18
  /** @constructor
19
19
  * @param {*=} options
20
20
  */
21
- var SimpleImageFormatter = function (options) {
21
+ let SimpleImageFormatter = function (options) {
22
22
 
23
23
  };
24
24
 
@@ -27,7 +27,7 @@ var SimpleImageFormatter = function (options) {
27
27
  * @return {Object}
28
28
  */
29
29
  SimpleImageFormatter.create = function (options) {
30
- var defaultOpt = {
30
+ let defaultOpt = {
31
31
  tagName: "img",
32
32
  refName: "SimpleImageFormatter",
33
33
  styles: {
@@ -1,10 +1,10 @@
1
1
  import FormatterBuilder from "./FormatterBuilder.js";
2
2
 
3
- var onElementUpdated = function (element, ctx) {
3
+ let onElementUpdated = function (element, ctx) {
4
4
  element.value = ctx.value;
5
5
  };
6
6
 
7
- var _changeHandler = function (e, ctx) {
7
+ let _changeHandler = function (e, ctx) {
8
8
  ctx.value = e.currentTarget.value;
9
9
  ctx.setData(ctx.field, ctx.value);
10
10
  };
@@ -12,7 +12,7 @@ var _changeHandler = function (e, ctx) {
12
12
  /** @constructor
13
13
  * @param {*=} options
14
14
  */
15
- var SimpleInputFormatter = function (options) {
15
+ let SimpleInputFormatter = function (options) {
16
16
 
17
17
  };
18
18
 
@@ -21,7 +21,7 @@ var SimpleInputFormatter = function (options) {
21
21
  * @return {Object}
22
22
  */
23
23
  SimpleInputFormatter.create = function (options) {
24
- var defaultOpt = {
24
+ let defaultOpt = {
25
25
  tagName: "input",
26
26
  refName: "SimpleInputFormatter",
27
27
  onElementUpdated: onElementUpdated,
@@ -10,8 +10,8 @@ import FormatterBuilder from "./FormatterBuilder.js";
10
10
  * @param {Element} element
11
11
  * @param {Object} ctx Context object
12
12
  */
13
- var onElementUpdated = function (element, ctx) {
14
- var label = typeof ctx.label === "string" ? ctx.label : ctx.value;
13
+ let onElementUpdated = function (element, ctx) {
14
+ let label = typeof ctx.label === "string" ? ctx.label : ctx.value;
15
15
  element.textContent = label;
16
16
  if(ctx.urlField) {
17
17
  element.setAttribute("href", ctx.getData(ctx.urlField));
@@ -21,7 +21,7 @@ var onElementUpdated = function (element, ctx) {
21
21
  /** @constructor
22
22
  * @param {*=} options
23
23
  */
24
- var SimpleLinkFormatter = function (options) {
24
+ let SimpleLinkFormatter = function (options) {
25
25
 
26
26
  };
27
27
 
@@ -30,7 +30,7 @@ var SimpleLinkFormatter = function (options) {
30
30
  * @return {Object}
31
31
  */
32
32
  SimpleLinkFormatter.create = function (options) {
33
- var defaultOpt = {
33
+ let defaultOpt = {
34
34
  tagName: "a",
35
35
  refName: "SimpleLinkFormatter",
36
36
  onElementUpdated: onElementUpdated,
@@ -8,7 +8,7 @@ import ElfUtil from "../../tr-grid-util/es6/ElfUtil.js";
8
8
  * @property {string=} negativeColor Color code for down icon
9
9
  */
10
10
 
11
- var onContextCreated = function (ctx, options) {
11
+ let onContextCreated = function (ctx, options) {
12
12
  if(ElfUtil.getElfVersion() > 3) {
13
13
  ctx._upIcon = "arrow-up-fill";
14
14
  ctx._downIcon = "arrow-down-fill";
@@ -19,8 +19,8 @@ var onContextCreated = function (ctx, options) {
19
19
  ctx.TickCodes = TickCodes;
20
20
  };
21
21
 
22
- var onElementUpdated = function (element, ctx) {
23
- var value = ctx.TickCodes[ctx.value];
22
+ let onElementUpdated = function (element, ctx) {
23
+ let value = ctx.TickCodes[ctx.value];
24
24
 
25
25
  if (value === 1) {
26
26
  element.icon = ctx._upIcon;
@@ -36,7 +36,7 @@ var onElementUpdated = function (element, ctx) {
36
36
  /** @constructor
37
37
  * @param {*=} options
38
38
  */
39
- var SimpleTickerFormatter = function (options) {
39
+ let SimpleTickerFormatter = function (options) {
40
40
 
41
41
  };
42
42
 
@@ -45,7 +45,7 @@ var SimpleTickerFormatter = function (options) {
45
45
  * @return {Object}
46
46
  */
47
47
  SimpleTickerFormatter.create = function (options) {
48
- var defaultOpt = {
48
+ let defaultOpt = {
49
49
  tagName: "ef-icon",
50
50
  refName: "SimpleTickerFormatter",
51
51
  onContextCreated: onContextCreated,
@@ -12,11 +12,11 @@ import ElfUtil from "../../tr-grid-util/es6/ElfUtil.js";
12
12
  * @param {Node} n
13
13
  * @return {Node}
14
14
  */
15
- var _provideCloneMethod = function (n) {
15
+ let _provideCloneMethod = function (n) {
16
16
  if (n && n.cloneNode) {
17
17
  return n;
18
18
  } else { // Workaround: custom element may not have cloneNode() method
19
- var span = document.createElement("span");
19
+ let span = document.createElement("span");
20
20
  if (n) {
21
21
  span.appendChild(n);
22
22
  }
@@ -29,9 +29,9 @@ var _provideCloneMethod = function (n) {
29
29
  * @param {string=} icon
30
30
  * @return {Element}
31
31
  */
32
- var _createCoralButton = function (icon) {
33
- var btn = document.createElement("ef-button");
34
- var styles = "margin: 0;";
32
+ let _createCoralButton = function (icon) {
33
+ let btn = document.createElement("ef-button");
34
+ let styles = "margin: 0;";
35
35
  if(ElfUtil.isHaloTheme()) {
36
36
  styles += " min-width: 26px;";
37
37
  }
@@ -47,10 +47,10 @@ var _createCoralButton = function (icon) {
47
47
  * @param {*} n
48
48
  * @return {Element}
49
49
  */
50
- var _convertToElement = function (n) {
50
+ let _convertToElement = function (n) {
51
51
  if (n) {
52
52
  if (typeof n === "string") {
53
- var div = document.createElement("div");
53
+ let div = document.createElement("div");
54
54
  div.innerHTML = n.trim();
55
55
  return div.firstChild;
56
56
  }
@@ -59,19 +59,19 @@ var _convertToElement = function (n) {
59
59
  return null;
60
60
  };
61
61
 
62
- var onContextCreated = function (ctx, options) {
62
+ let onContextCreated = function (ctx, options) {
63
63
  ctx.element1 = _provideCloneMethod(ctx.element1);
64
64
  ctx.element2 = _provideCloneMethod(ctx.element2);
65
65
  };
66
66
 
67
- var onElementCreated = function (element, ctx) {
67
+ let onElementCreated = function (element, ctx) {
68
68
  element._element1 = ctx.element1.cloneNode(true);
69
69
  element._element2 = ctx.element2.cloneNode(true);
70
70
  };
71
71
 
72
- var onElementUpdated = function (element, ctx) {
73
- var prevChecked = element.firstChild ? element.firstChild === element._element1 : NaN;
74
- var checked = ctx.value;
72
+ let onElementUpdated = function (element, ctx) {
73
+ let prevChecked = element.firstChild ? element.firstChild === element._element1 : NaN;
74
+ let checked = ctx.value;
75
75
  if (checked !== prevChecked) {
76
76
  if (element.firstChild) {
77
77
  element.removeChild(element.firstChild);
@@ -85,8 +85,8 @@ var onElementUpdated = function (element, ctx) {
85
85
  * @param {*} e
86
86
  * @param {*} ctx
87
87
  */
88
- var onClick = function (e, ctx) {
89
- var checked = ctx.getData(ctx.field);
88
+ let onClick = function (e, ctx) {
89
+ let checked = ctx.getData(ctx.field);
90
90
  ctx.value = !checked;
91
91
  ctx.setData(ctx.field, ctx.value);
92
92
  };
@@ -94,7 +94,7 @@ var onClick = function (e, ctx) {
94
94
  /** @constructor
95
95
  * @param {*=} options
96
96
  */
97
- var SimpleToggleFormatter = function (options) {
97
+ let SimpleToggleFormatter = function (options) {
98
98
 
99
99
  };
100
100
 
@@ -103,7 +103,7 @@ var SimpleToggleFormatter = function (options) {
103
103
  * @return {Object}
104
104
  */
105
105
  SimpleToggleFormatter.create = function (options) {
106
- var defaultOpt = {
106
+ let defaultOpt = {
107
107
  tagName: "div",
108
108
  refName: "SimpleToggleFormatter",
109
109
  onContextCreated: onContextCreated,
@@ -1,18 +1,18 @@
1
1
  import FormatterBuilder from "./FormatterBuilder.js";
2
2
 
3
3
 
4
- var onElementUpdated = function (element, ctx) {
4
+ let onElementUpdated = function (element, ctx) {
5
5
  element.textContent = ctx.value;
6
6
  };
7
7
 
8
- var onElementCreated = function (element, ctx) {
8
+ let onElementCreated = function (element, ctx) {
9
9
  element.classList.add("text");
10
10
  };
11
11
 
12
12
  /** @constructor
13
13
  * @param {*=} options
14
14
  */
15
- var TextFormatter = function (options) {
15
+ let TextFormatter = function (options) {
16
16
 
17
17
  };
18
18
 
@@ -21,7 +21,7 @@ var TextFormatter = function (options) {
21
21
  * @return {Object}
22
22
  */
23
23
  TextFormatter.create = function (options) {
24
- var defaultOpt = {
24
+ let defaultOpt = {
25
25
  tagName: "div",
26
26
  refName: "TextFormatter",
27
27
  onElementUpdated: onElementUpdated,
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.93" };
3
+ window.EFX_GRID = { version: "6.0.94" };
@@ -925,7 +925,7 @@ CellSelectionPlugin.prototype._onTab = function (e) {
925
925
  CellSelectionPlugin.prototype._onPostSectionDataBinding = function (e) {
926
926
  var activeGrid = this._getActiveGrid();
927
927
  if (this.getSelectionCount() > 0 && activeGrid === e.sender) {
928
- // var colCount = this._hosts[0].getColumnCount();
928
+ // let colCount = this._hosts[0].getColumnCount();
929
929
  var rowOffset = e.section.getRowOffset();
930
930
  var selectionRowStart = this._curRect.top - rowOffset;
931
931
  var selectionRowEnd = this._curRect.bottom - rowOffset;
@@ -1080,7 +1080,7 @@ RowDraggingPlugin.prototype._moveRows = function (srcRowRef, destRowIndex, srcGr
1080
1080
 
1081
1081
  let originalRows = [];
1082
1082
  for(i = 0; i < srcCount; ++i) {
1083
- let rowData = srcDv.getRowData(rowId);
1083
+ let rowData = srcDv.getRowData(srcRowIds[i]);
1084
1084
  if(rowData) {
1085
1085
  originalRows.push(rowData);
1086
1086
  }