@refinitiv-ui/efx-grid 6.0.69 → 6.0.71

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. package/lib/column-selection-dialog/lib/column-selection-dialog.js +19 -7
  2. package/lib/core/dist/core.js +38 -3
  3. package/lib/core/dist/core.min.js +1 -1
  4. package/lib/core/es6/grid/Core.d.ts +2 -0
  5. package/lib/core/es6/grid/Core.js +30 -2
  6. package/lib/core/es6/grid/VirtualizedLayoutGrid.js +8 -1
  7. package/lib/filter-dialog/lib/filter-dialog.js +90 -51
  8. package/lib/grid/index.js +1 -1
  9. package/lib/rt-grid/dist/rt-grid.js +52 -17
  10. package/lib/rt-grid/dist/rt-grid.min.js +1 -1
  11. package/lib/rt-grid/es6/Grid.d.ts +5 -2
  12. package/lib/rt-grid/es6/Grid.js +22 -15
  13. package/lib/tr-grid-column-selection/es6/ColumnSelection.js +7 -27
  14. package/lib/tr-grid-column-stack/es6/ColumnStack.js +7 -1
  15. package/lib/tr-grid-filter-input/es6/FilterInput.js +9 -3
  16. package/lib/tr-grid-in-cell-editing/es6/InCellEditing.d.ts +3 -2
  17. package/lib/tr-grid-in-cell-editing/es6/InCellEditing.js +65 -18
  18. package/lib/tr-grid-printer/es6/CellWriter.d.ts +5 -5
  19. package/lib/tr-grid-printer/es6/CellWriter.js +6 -6
  20. package/lib/tr-grid-printer/es6/GridPrinter.d.ts +7 -6
  21. package/lib/tr-grid-printer/es6/GridPrinter.js +4 -2
  22. package/lib/tr-grid-printer/es6/PrintTrait.d.ts +1 -1
  23. package/lib/tr-grid-printer/es6/SectionWriter.d.ts +1 -1
  24. package/lib/tr-grid-row-dragging/es6/RowDragging.js +65 -0
  25. package/lib/tr-grid-row-filtering/es6/RowFiltering.d.ts +1 -3
  26. package/lib/tr-grid-row-filtering/es6/RowFiltering.js +235 -114
  27. package/lib/tr-grid-row-selection/es6/RowSelection.js +14 -32
  28. package/lib/tr-grid-titlewrap/es6/TitleWrap.d.ts +2 -2
  29. package/lib/tr-grid-titlewrap/es6/TitleWrap.js +1 -1
  30. package/lib/tr-grid-util/es6/GridPlugin.js +52 -0
  31. package/lib/types/es6/Core/grid/Core.d.ts +2 -0
  32. package/lib/types/es6/InCellEditing.d.ts +3 -2
  33. package/lib/types/es6/RealtimeGrid/Grid.d.ts +5 -2
  34. package/lib/types/es6/RowFiltering.d.ts +1 -3
  35. package/lib/types/es6/TitleWrap.d.ts +2 -2
  36. package/lib/versions.json +14 -14
  37. package/package.json +1 -1
@@ -73,7 +73,6 @@ declare namespace Grid {
73
73
  contentRightPadding?: number|null,
74
74
  contentBottomPadding?: number|null,
75
75
  dataConflationRate?: number|null,
76
- dataComposed?: ((...params: any[]) => any)|null,
77
76
  autoDateConversion?: boolean|null,
78
77
  textSelect?: boolean|null,
79
78
  lang?: string|null,
@@ -84,7 +83,11 @@ declare namespace Grid {
84
83
  timeSeriesExpansion?: boolean|null,
85
84
  childDataField?: string|null,
86
85
  topSection?: boolean|null,
87
- sorting?: SortableTitlePlugin.Options|null
86
+ sorting?: SortableTitlePlugin.Options|null,
87
+ dataComposed?: ((...params: any[]) => any)|null,
88
+ beforeContentBinding?: ((...params: any[]) => any)|null,
89
+ firstRendered?: ((...params: any[]) => any)|null,
90
+ afterContentBinding?: ((...params: any[]) => any)|null
88
91
  };
89
92
 
90
93
  type RowReference = number|string|RowDefinition|null;
@@ -76,7 +76,6 @@ import { ElementWrapper } from "../../core/es6/grid/components/ElementWrapper.js
76
76
  * @property {number=} contentRightPadding=0 Padding that is added next to the right most column. The padding is still a part of scrollable content.
77
77
  * @property {number=} contentBottomPadding=0 Padding that is added below the last section. The padding is still a part of scrollable content.
78
78
  * @property {number=} dataConflationRate=0 set delay for data to avoid to much sorting operation when data changed
79
- * @property {Function=} dataComposed Handler for dataComposed event
80
79
  * @property {boolean=} autoDateConversion=false If enabled, date-time field with numeric value will be automatically converted to native date object.
81
80
  * @property {boolean=} textSelect=false If enabled, user can select content text by using mouse drag.
82
81
  * @property {string=} lang laguage for config localization date time, if null the default language is "en"
@@ -88,6 +87,10 @@ import { ElementWrapper } from "../../core/es6/grid/components/ElementWrapper.js
88
87
  * @property {string=} childDataField=CHILD_VALUES The given field will be used to store children's static data, such as row color assignment.
89
88
  * @property {boolean=} topSection=true If disabled, title section will not be rendered
90
89
  * @property {SortableTitlePlugin~Options=} sorting Options for sorting
90
+ * @property {Function=} dataComposed Handler for dataComposed event
91
+ * @property {Function=} beforeContentBinding Handler for beforeContentBinding event
92
+ * @property {Function=} firstRendered Handler for firstRendered event
93
+ * @property {Function=} afterContentBinding Handler for afterContentBinding event
91
94
  */
92
95
 
93
96
  /** @typedef {number|string|RowDefinition} Grid~RowReference
@@ -158,6 +161,16 @@ import { ElementWrapper } from "../../core/es6/grid/components/ElementWrapper.js
158
161
  * @description Trigger before content binding.
159
162
  */
160
163
 
164
+ /** @event Grid#firstRendered
165
+ * @property {Object} e Event of firstRendered
166
+ * @description This event is triggered when the content is rendered for the first time.
167
+ */
168
+
169
+ /** @event Grid#afterContentBinding
170
+ * @property {Object} e Event of afterContentBinding
171
+ * @description Trigger after content binding.
172
+ */
173
+
161
174
  /** @event Grid#beforeRowRemoved
162
175
  * @description Fired only when a row will be removed through Grid's API and before occurring of the actual removal
163
176
  */
@@ -312,7 +325,6 @@ var Grid = function(placeholder, config) {
312
325
  t.updateColumnTitle = t.updateColumnTitle.bind(t);
313
326
  t._populateTimeSeriesChildren = t._populateTimeSeriesChildren.bind(t);
314
327
 
315
- t._onBeforeContentBinding = t._onBeforeContentBinding.bind(t);
316
328
  t._onPostSectionDataBinding = t._onPostSectionDataBinding.bind(t);
317
329
  t._asyncClearDataUpdates = t._asyncClearDataUpdates.bind(t);
318
330
  t._clearDataUpdates = t._clearDataUpdates.bind(t);
@@ -405,9 +417,11 @@ var Grid = function(placeholder, config) {
405
417
  t._grid.loadPlugin(t._stp, config);
406
418
  }
407
419
 
408
- t._grid.listen("beforeContentBinding", t._onBeforeContentBinding);
420
+ t._grid.listen("beforeContentBinding", t._dispatch.bind(t, "beforeContentBinding"));
409
421
  t._grid.listen("preSectionRender", t._onColumnHeaderBinding);
410
422
  t._grid.listen("postSectionDataBinding", t._onPostSectionDataBinding);
423
+ t._grid.listen("firstRendered", t._dispatch.bind(t, "firstRendered"));
424
+ t._grid.listen("afterContentBinding", t._dispatch.bind(t, "afterContentBinding"));
411
425
 
412
426
  t._grid.enableRowHighlighting(true);
413
427
 
@@ -815,6 +829,7 @@ Grid.prototype.initialize = function(gridOption) {
815
829
  var t = this; // For minimizing file size
816
830
  t._initializing = true;
817
831
  var grid = t._grid; // core grid
832
+ grid.resetInternalState();
818
833
  gridOption = grid.normalizeConfig(gridOption);
819
834
 
820
835
  var exts = gridOption["plugins"] || gridOption["extensions"];
@@ -921,10 +936,10 @@ Grid.prototype.initialize = function(gridOption) {
921
936
  t.listen("rowExpansionBinding", rowExpansionBinding);
922
937
  }
923
938
 
924
- var dataComposedHandler = gridOption["dataComposed"];
925
- if(typeof dataComposedHandler === "function") {
926
- t.listen("dataComposed", dataComposedHandler);
927
- }
939
+ this.addListener(gridOption, "dataComposed");
940
+ this.addListener(gridOption, "beforeContentBinding");
941
+ this.addListener(gridOption, "firstRendered");
942
+ this.addListener(gridOption, "afterContentBinding");
928
943
 
929
944
  if(gridOption["autoDateConversion"]) {
930
945
  t._autoDateConversion = true;
@@ -2580,7 +2595,6 @@ Grid.prototype.removeAllRows = function() {
2580
2595
 
2581
2596
  // TODO: This logic should also be in the core grid
2582
2597
  this._grid.getVScrollbar().setScrollTop(0);
2583
- this._grid.getHScrollbar().setScrollLeft(0);
2584
2598
  };
2585
2599
  /** WARNING: This does not remove data stored in the data cache
2586
2600
  * @private
@@ -3538,13 +3552,6 @@ Grid.prototype._mainSorter = function (rowDefA, rowDefB, order) {
3538
3552
  return this._columnSorter(rowDefA, rowDefB, order);
3539
3553
  };
3540
3554
 
3541
- /** @private
3542
- * @param {Object} e
3543
- */
3544
- Grid.prototype._onBeforeContentBinding = function(e) {
3545
- this._dispatch("beforeContentBinding", e);
3546
- };
3547
-
3548
3555
  /** @private
3549
3556
  * @param {Object} e
3550
3557
  */
@@ -1405,44 +1405,24 @@ ColumnSelectionPlugin.prototype.selectByMouse = function (colIndex, mouseEvt) {
1405
1405
  mouseEvt = {};
1406
1406
  }
1407
1407
 
1408
- if (colIndex >= 0) {
1409
- var grid = this._activeGrid || this._hosts[0];
1410
- var cell = grid ? grid.getCell("title", colIndex, 0) : null;
1411
- mouseEvt.target = cell ? cell.getElement() : null;
1412
- }
1408
+ mouseEvt.sectionType = "title";
1409
+
1410
+ var eventObj = this._mockMouseEvent(colIndex, 0, mouseEvt);
1413
1411
 
1414
- this._onClick(mouseEvt);
1412
+ this._onClick(eventObj);
1415
1413
  };
1416
1414
  /** @public
1417
1415
  * @description Select a specified column by a keyboard input. This is for testing purpose.
1418
1416
  * @ignore
1419
- * @param {number|string} keyCode Use "left" , "right" or "tab"
1417
+ * @param {number|string} keyCode Use key code number or "left" ,"right" or "tab" string
1420
1418
  * @param {Object=} keyboardEvt
1421
1419
  */
1422
1420
 
1423
1421
 
1424
1422
  ColumnSelectionPlugin.prototype.selectByKey = function (keyCode, keyboardEvt) {
1425
- if (!keyboardEvt) {
1426
- keyboardEvt = {};
1427
- }
1428
-
1429
- if (keyCode) {
1430
- if (keyCode === "left") {
1431
- keyboardEvt.keyCode = 37;
1432
- } else if (keyCode === "right") {
1433
- keyboardEvt.keyCode = 39;
1434
- } else if (keyCode === "tab") {
1435
- keyboardEvt.keyCode = 9;
1436
- } else if (typeof keyCode === "number") {
1437
- keyboardEvt.keyCode = keyCode;
1438
- }
1439
- }
1440
-
1441
- keyboardEvt.preventDefault = function () {};
1442
-
1443
- keyboardEvt.stopPropagation = function () {};
1423
+ var eventObj = this._mockKeyboardEvent(keyCode, keyboardEvt);
1444
1424
 
1445
- this._onKeyDown(keyboardEvt);
1425
+ this._onKeyDown(eventObj);
1446
1426
  };
1447
1427
 
1448
1428
  export default ColumnSelectionPlugin;
@@ -677,6 +677,12 @@ ColumnStackPlugin.prototype._updateUI = function() {
677
677
  }
678
678
  this._updating = false;
679
679
  };
680
+ /** @private */
681
+ ColumnStackPlugin.prototype._forceUpdateUI = function() {
682
+ this._conflator.disable();
683
+ this._updateUI();
684
+ this._conflator.enable();
685
+ };
680
686
  /** @private
681
687
  * @param {number} colIndex
682
688
  * @param {boolean} collapsed
@@ -1365,7 +1371,7 @@ ColumnStackPlugin.prototype._onPreSectionRender = function (e) {
1365
1371
  if (e["sectionType"] !== "title") {
1366
1372
  return;
1367
1373
  }
1368
- this._updateUI(); // asyncronuos
1374
+ this._forceUpdateUI();
1369
1375
  };
1370
1376
  /** @private
1371
1377
  * @param {Object} e
@@ -564,7 +564,6 @@ FilterInputPlugin.prototype._createFilterUI = function (colOpt) {
564
564
  case "ef-combo-box":
565
565
  elem.multiple = true;
566
566
  elem.data = CoralItems.create(colOpt.entries);
567
- elem.addEventListener("opened-changed", this._onOpenedChanged, false);
568
567
 
569
568
  if (elemTrigger != false && elemTrigger != "") {
570
569
  elem.addEventListener("value-changed", this._onInputChanged, false);
@@ -1023,7 +1022,7 @@ FilterInputPlugin._rtCompareRow = function (filterOptions, rowData, rid) {
1023
1022
  };
1024
1023
  /** @private
1025
1024
  * @function
1026
- * @param {Array<string>} ary
1025
+ * @param {Array<string|number>} ary
1027
1026
  * @return {Object}
1028
1027
  */
1029
1028
 
@@ -1035,7 +1034,14 @@ FilterInputPlugin._createMapObject = function (ary) {
1035
1034
  var count = ary.length;
1036
1035
 
1037
1036
  for (var i = 0; i < count; i++) {
1038
- var str = ary[i].toLowerCase();
1037
+ var key = ary[i];
1038
+
1039
+ if (key == null || key === "") {
1040
+ continue;
1041
+ }
1042
+
1043
+ var str = FilterInputPlugin._transformToLowercaseString(key);
1044
+
1039
1045
  textMap[str] = true;
1040
1046
  }
1041
1047
  }
@@ -18,7 +18,7 @@ declare namespace InCellEditingPlugin {
18
18
  popupElement?: Element|null,
19
19
  doubleClick?: boolean|null,
20
20
  tabToMove?: boolean|null,
21
- contentSource?: boolean|null,
21
+ contentSource?: string|null,
22
22
  inlineStyling?: boolean|null,
23
23
  disablingScroll?: boolean|null,
24
24
  uiBlocking?: boolean|null,
@@ -30,7 +30,8 @@ declare namespace InCellEditingPlugin {
30
30
  beforeRowCommit?: ((...params: any[]) => any)|null,
31
31
  rowEditorClosed?: ((...params: any[]) => any)|null,
32
32
  autoSuggest?: Element|null,
33
- closingOnScroll?: boolean|null
33
+ closingOnScroll?: boolean|null,
34
+ autoHiding?: boolean|null
34
35
  };
35
36
 
36
37
  type Cache = {
@@ -17,7 +17,7 @@ import { CoralItems } from "../../tr-grid-util/es6/CoralItems.js";
17
17
  * @property {Element=} popupElement=null Element to be attached under the editor
18
18
  * @property {boolean=} doubleClick=true If disabled, double click will not trigger editor
19
19
  * @property {boolean=} tabToMove=false If enabled, pressing tab key while editor is active will open editor on the next editable cell.
20
- * @property {boolean=} contentSource="textContent" By default, the text in the editor will be populated with textContent of the target cell. Use "field" to populated data from grid's data model. Use "empty" to shows empty editor.
20
+ * @property {string=} contentSource="textContent" By default, the text in the editor will be populated with textContent of the target cell. Use "field" to populated data from grid's data model. Use "empty" to shows empty editor.
21
21
  * @property {boolean=} inlineStyling=false force inline styles regardless of elf version.
22
22
  * @property {boolean=} disablingScroll=false Scrollbar will be frozen when editor opened. Deprecated in favor of uiBlocking
23
23
  * @property {boolean=} uiBlocking=false append transparent overlay to block ui interaction
@@ -29,7 +29,8 @@ import { CoralItems } from "../../tr-grid-util/es6/CoralItems.js";
29
29
  * @property {Function=} beforeRowCommit=null Handler before committing from all editors in the row
30
30
  * @property {Function=} rowEditorClosed=null Handler after closing of all editors
31
31
  * @property {Element=} autoSuggest=null Element of ef-autosuggest or atlas-autosuggest for handled with input cell
32
- * @property {boolean=} closingOnScroll=true If disabled, scrolling will not automatically close editor. autoHiding, closingOnScroll
32
+ * @property {boolean=} closingOnScroll=true If disabled, the editor will not be automatically closed when scrolling grid.
33
+ * @property {boolean=} autoHiding=true If disabled, the editor will not be automatically closed when losing its focus.
33
34
  */
34
35
 
35
36
  /** @typedef {Object} InCellEditingPlugin~Cache
@@ -337,6 +338,10 @@ InCellEditingPlugin.prototype._rowClosing = false;
337
338
  * @private
338
339
  */
339
340
  InCellEditingPlugin.prototype._closingOnScroll = true;
341
+ /** @type {boolean}
342
+ * @private
343
+ */
344
+ InCellEditingPlugin.prototype._autoHiding = true;
340
345
  /** @type {number}
341
346
  * @private
342
347
  */
@@ -627,6 +632,9 @@ InCellEditingPlugin.prototype.config = function (options) {
627
632
  if (pluginOption["closingOnScroll"] == false) {
628
633
  t._closingOnScroll = false;
629
634
  }
635
+ if (pluginOption["autoHiding"] == false) {
636
+ t._autoHiding = false;
637
+ }
630
638
 
631
639
  // event callback
632
640
  t.addListener(pluginOption, "preEditorOpening");
@@ -638,6 +646,25 @@ InCellEditingPlugin.prototype.config = function (options) {
638
646
  t.addListener(pluginOption, "rowEditorClosed");
639
647
  };
640
648
 
649
+ /** @private
650
+ * @param {Object} obj
651
+ * @param {string} propName
652
+ * @param {boolean} propValue
653
+ * @param {boolean} defaultValue
654
+ * @returns {number} dirty
655
+ */
656
+ var _setBooleanOption = function _setBooleanOption(obj, propName, propValue, defaultValue) {
657
+ if (defaultValue) {
658
+ if (!propValue) {
659
+ obj[propName] = false;
660
+ return true;
661
+ }
662
+ } else if (propValue) {
663
+ obj[propName] = true;
664
+ return true;
665
+ }
666
+ return false;
667
+ };
641
668
  /** Get a current state of grid and extension config
642
669
  * @public
643
670
  * @param {Object=} out_obj
@@ -680,20 +707,28 @@ InCellEditingPlugin.prototype.getConfigObject = function (out_obj) {
680
707
  }
681
708
  }
682
709
  var extOptions = obj.inCellEditing;
710
+ var dirty = 0;
683
711
  if (!extOptions) {
684
- extOptions = obj.inCellEditing = {};
685
- }
686
- extOptions.balloonMode = this._balloonMode;
687
- extOptions.editableTitle = this._editableTitle;
688
- extOptions.editableContent = this._editableContent;
689
- extOptions.tabToMove = this._tabToMove;
690
- extOptions.autoCommitText = this._autoCommitText;
691
- extOptions.dataBinding = this._dataBinding;
692
- extOptions.contentSource = this._contentSource;
693
- extOptions.doubleClick = this._dblClick;
694
- extOptions.inlineStyling = this._inlineStyling;
695
- extOptions.disablingScroll = this._disablingScroll;
696
- extOptions.uiBlocking = this._uiBlocking;
712
+ extOptions = {};
713
+ }
714
+ dirty |= _setBooleanOption(extOptions, "balloonMode", this._balloonMode, false);
715
+ dirty |= _setBooleanOption(extOptions, "editableTitle", this._editableTitle, false);
716
+ dirty |= _setBooleanOption(extOptions, "tabToMove", this._tabToMove, false);
717
+ dirty |= _setBooleanOption(extOptions, "autoCommitText", this._autoCommitText, false);
718
+ dirty |= _setBooleanOption(extOptions, "dataBinding", this._dataBinding, true);
719
+ dirty |= _setBooleanOption(extOptions, "doubleClick", this._dblClick, true);
720
+ dirty |= _setBooleanOption(extOptions, "inlineStyling", this._inlineStyling, false);
721
+ dirty |= _setBooleanOption(extOptions, "disablingScroll", this._disablingScroll, false);
722
+ dirty |= _setBooleanOption(extOptions, "uiBlocking", this._uiBlocking, false);
723
+ dirty |= _setBooleanOption(extOptions, "closingOnScroll", this._closingOnScroll, true);
724
+ dirty |= _setBooleanOption(extOptions, "autoHiding", this._autoHiding, true);
725
+ if (this._contentSource !== "textContent") {
726
+ dirty = 1;
727
+ extOptions.contentSource = this._contentSource;
728
+ }
729
+ if (dirty) {
730
+ obj.inCellEditing = extOptions;
731
+ }
697
732
  return obj;
698
733
  };
699
734
 
@@ -1081,6 +1116,9 @@ InCellEditingPlugin.prototype._openEditor = function (e, host, arg) {
1081
1116
  arg["segmentSeparator"] = dataSource.isSegmentSeparator(rowId);
1082
1117
  arg["groupHeader"] = dataSource.getGroupByRowId(rowId);
1083
1118
  arg["rowData"] = this._getRow(dataSource, rowId);
1119
+ if (dataSource["stall"]) {
1120
+ dataSource["stall"](true);
1121
+ }
1084
1122
  }
1085
1123
 
1086
1124
  // Initialize UIs
@@ -1142,7 +1180,7 @@ InCellEditingPlugin.prototype._openEditor = function (e, host, arg) {
1142
1180
  }
1143
1181
  balloonPopup.enableUIBlocking(t._uiBlocking);
1144
1182
  balloonPopup.addEventListener("hidden", t._onPopupHide);
1145
- balloonPopup.disableAutoHiding(false);
1183
+ balloonPopup.disableAutoHiding(!t._autoHiding);
1146
1184
  balloonPopup.disableHideOnScroll(true);
1147
1185
  balloonPopup.attachTo(cell.getElement());
1148
1186
  balloonPopup.show(true, parentElement);
@@ -1675,8 +1713,17 @@ InCellEditingPlugin.prototype._commitText = function (committed, suggestionDetai
1675
1713
  t._activeInCellCache.balloonPopup.hide();
1676
1714
  }
1677
1715
  Dom.removeParent(t._customElement);
1678
- t._freezeScrolling(arg["grid"], false);
1679
- arg["grid"].focus();
1716
+ var grid = arg["grid"];
1717
+ if (grid) {
1718
+ t._freezeScrolling(grid, false);
1719
+ grid.focus();
1720
+ }
1721
+ var dataSource = arg["dataSource"];
1722
+ if (dataSource) {
1723
+ if (dataSource["stall"]) {
1724
+ dataSource["stall"](false);
1725
+ }
1726
+ }
1680
1727
  t._activePos = t._activeCell = t._prevContent = t._lastActiveGrid = t._activeInCellCache = null;
1681
1728
  };
1682
1729
 
@@ -8,7 +8,7 @@ declare class CellWriter extends ElementWrapper {
8
8
 
9
9
  public getContent(): Node|null|null;
10
10
 
11
- public setContent(content: any, opt_tooltip?: boolean): Element|null;
11
+ public setContent(content: any, opt_tooltip?: boolean|null): Element|null;
12
12
 
13
13
  public setTooltip(str: string): void;
14
14
 
@@ -20,7 +20,7 @@ declare class CellWriter extends ElementWrapper {
20
20
 
21
21
  public removeIcon(n: any): void;
22
22
 
23
- public updateIcon(elem: Element): void;
23
+ public updateIcon(elem: Element|null): void;
24
24
 
25
25
  public unlisten(): void;
26
26
 
@@ -36,13 +36,13 @@ declare class CellWriter extends ElementWrapper {
36
36
 
37
37
  public enableClass(str: string, bool: boolean): void;
38
38
 
39
- public insertFloatingIcon(elem: Element, order: number): void;
39
+ public insertFloatingIcon(elem: Element|null, order: number): void;
40
40
 
41
- public removeFloatingIcon(elemRef: string|Element, order: number): void;
41
+ public removeFloatingIcon(elemRef: string|Element|null, order: number): void;
42
42
 
43
43
  public getSection(): null;
44
44
 
45
- public cloak(elem: Element): void;
45
+ public cloak(elem: Element|null): void;
46
46
 
47
47
  }
48
48
 
@@ -10,16 +10,16 @@ var CellWriter = function () {
10
10
  };
11
11
  Ext.inherits(CellWriter, ElementWrapper);
12
12
 
13
- /** @type
14
- * @private
13
+ /** @private
14
+ * @type {Element}
15
15
  */
16
16
  CellWriter.prototype._flexRow = null;
17
- /** @type
18
- * @private
17
+ /** @private
18
+ * @type {Element}
19
19
  */
20
20
  CellWriter.prototype._floatingPanel = null;
21
- /** @type
22
- * @private
21
+ /** @private
22
+ * @type {Element}
23
23
  */
24
24
  CellWriter.prototype._frontPanel = null;
25
25
 
@@ -7,13 +7,13 @@ import { SectionWriter } from "./SectionWriter.js";
7
7
 
8
8
  declare namespace GridPrinter {
9
9
 
10
- function setPrintOptions(options: GridPrinter.Options): void;
10
+ function setPrintOptions(options: GridPrinter.Options|null): void;
11
11
 
12
- function observe(iFrameElement?: HTMLIFrameElement): void;
12
+ function observe(iFrameElement?: HTMLIFrameElement|null): void;
13
13
 
14
14
  function unobserve(): void;
15
15
 
16
- function enableDebugMode(bool?: boolean): void;
16
+ function enableDebugMode(bool?: boolean|null): void;
17
17
 
18
18
  function getPreFlightInfo(grid: any, options?: any): any;
19
19
 
@@ -22,11 +22,12 @@ declare namespace GridPrinter {
22
22
  function print(grid: any): void;
23
23
 
24
24
  type Options = {
25
- pageWidth?: number,
26
- pageHeight?: number,
27
- primaryColumn?: number
25
+ pageWidth?: number|null,
26
+ pageHeight?: number|null,
27
+ primaryColumn?: number|null
28
28
  };
29
29
 
30
30
  }
31
31
 
32
+ export default GridPrinter;
32
33
  export { GridPrinter };
@@ -134,7 +134,7 @@ var _getCoreGrid = function (grid) {
134
134
  return core;
135
135
  };
136
136
 
137
- /** @namespaces
137
+ /** @namespace
138
138
  */
139
139
  var GridPrinter = {};
140
140
  /** @private
@@ -647,7 +647,7 @@ GridPrinter._applyCss = function () {
647
647
  };
648
648
 
649
649
  /** @public
650
- * @param {*} grid grid element, currently supports atlas-blotter, ef-grid, tr.CompositeGrid, rt.Grid and Core
650
+ * @param {*} grid grid element, currently supports efx-grid, atlas-blotter, ef-grid, tr.CompositeGrid, rt.Grid and Core
651
651
  */
652
652
  GridPrinter.print = function (grid) {
653
653
  var core = null;
@@ -771,4 +771,6 @@ GridPrinter._onAfterPrint = function (e) {
771
771
  GridPrinter.Options;
772
772
 
773
773
 
774
+
775
+ export default GridPrinter;
774
776
  export { GridPrinter };
@@ -9,7 +9,7 @@ declare class PrintTrait {
9
9
 
10
10
  public static calculateEnvironment(): any;
11
11
 
12
- public observe(iframeElement?: HTMLIFrameElement): void;
12
+ public observe(iframeElement?: HTMLIFrameElement|null): void;
13
13
 
14
14
  public unobserve(): void;
15
15
 
@@ -29,7 +29,7 @@ declare class SectionWriter extends ElementWrapper {
29
29
 
30
30
  public enableRowClass(rowIndex: number, className: string, enabled: boolean): void;
31
31
 
32
- public stretchCell(colIndex: number, rowIndex: number, opt_stretching?: boolean, opt_noLeftStretching?: boolean): void;
32
+ public stretchCell(colIndex: number, rowIndex: number, opt_stretching?: boolean|null, opt_noLeftStretching?: boolean|null): void;
33
33
 
34
34
  public hasCellSpan(): boolean;
35
35
 
@@ -465,6 +465,7 @@ RowDraggingPlugin.prototype.getConfigObject = function (out_obj) {
465
465
  if(!extOptions) {
466
466
  extOptions = obj.rowDragging = {};
467
467
  }
468
+ // TODO: should not assign the config object if it's a default value
468
469
  extOptions.dragBox = this._dragBoxEnabled;
469
470
  extOptions.mouseInput = this._mouseInput;
470
471
  extOptions.autoScroll = this._autoScroll;
@@ -474,6 +475,70 @@ RowDraggingPlugin.prototype.getConfigObject = function (out_obj) {
474
475
  return obj;
475
476
  };
476
477
 
478
+ /** Drag start to simulate "dragStart" event for testing purpose
479
+ * @ignore
480
+ * @param {number} rowIndex
481
+ * @param {*=} mouseEvt
482
+ */
483
+ RowDraggingPlugin.prototype.dragStart = function (rowIndex, mouseEvt) {
484
+ // dragstart event
485
+ if(!mouseEvt) {
486
+ mouseEvt = {};
487
+ }
488
+ mouseEvt["type"] = "dragstart";
489
+ var core = this._hosts[0];
490
+ var cell = core ? core.getCell("content", 0, rowIndex) : null;
491
+ mouseEvt.target = cell ? cell.getElement() : null;
492
+ this._onMouseDown(mouseEvt);
493
+ this.startDrag(mouseEvt);
494
+ };
495
+
496
+ /** Move mouse to drag cell for testing purpose
497
+ * @public
498
+ * @ignore
499
+ * @param {number} rowIndex
500
+ * @param {*=} mouseEvt
501
+ */
502
+ RowDraggingPlugin.prototype.dragMove = function (rowIndex, mouseEvt) {
503
+ // mousemove, touchmove event
504
+ if(!mouseEvt) {
505
+ mouseEvt = {};
506
+ }
507
+ mouseEvt["type"] = "mousemove";
508
+ mouseEvt["which"] = 1; // Simulation of mouse down and move
509
+ var core = this._hosts[0];
510
+ var cell = core ? core.getCell("content", 0, rowIndex) : null;
511
+ var cellRelativePosition = core.getRelativePosition(cell); // get relative position of cell only when dragging for calculate dragBox
512
+
513
+ mouseEvt.clientX = cellRelativePosition.x;
514
+ mouseEvt.pageY = cellRelativePosition.y;
515
+ mouseEvt.target = cell ? cell.getElement() : null;
516
+ mouseEvt.stopPropagation = function() {};
517
+ mouseEvt.preventDefault = function() {};
518
+ this._onMouseMove(mouseEvt);
519
+
520
+ };
521
+
522
+ /** Mouse up to end of drag for testing purpose
523
+ * @public
524
+ * @ignore
525
+ * @param {number} rowIndex
526
+ * @param {*=} mouseEvt
527
+ */
528
+ RowDraggingPlugin.prototype.dragEnd = function (rowIndex, mouseEvt) {
529
+ // mouseup, touchend, touchcancel event
530
+ if(!mouseEvt) {
531
+ mouseEvt = {};
532
+ }
533
+ mouseEvt["type"] = "mouseup";
534
+ var core = this._hosts[0];
535
+ var cell = core ? core.getCell("content", 0, rowIndex) : null;
536
+ mouseEvt.target = cell ? cell.getElement() : null;
537
+ mouseEvt.stopPropagation = function() {};
538
+ mouseEvt.preventDefault = function() {};
539
+ this._onDragEnd(mouseEvt);
540
+ };
541
+
477
542
  /** @public
478
543
  * @param {*=} startRef
479
544
  */
@@ -113,8 +113,6 @@ declare class RowFilteringPlugin extends GridPlugin {
113
113
 
114
114
  public getColumnFilterStates(): any[];
115
115
 
116
- public getUniqueValues(field: string, formatter?: ((...params: any[]) => any)|null, fmtField?: string|null, rawDataAccessor?: ((...params: any[]) => any)|null, formattedDataAccessor?: ((...params: any[]) => any)|null): any;
117
-
118
116
  public openDialog(colIndex: number, runtimeDialogOptions?: RowFilteringPlugin.FilterDialogOptions|null): void;
119
117
 
120
118
  public enableEmptySegmentFiltering(enabled?: boolean|null): void;
@@ -123,7 +121,7 @@ declare class RowFilteringPlugin extends GridPlugin {
123
121
 
124
122
  }
125
123
 
126
- declare function field(colIndex: number, exp: RowFilteringPlugin.Expression|null, ctx?: (any|string)|null): boolean;
124
+ declare function colSettings(colIndex: number, exp: RowFilteringPlugin.Expression|null, ctx?: (any|string)|null): boolean;
127
125
 
128
126
  declare function crf(enabled?: boolean|null): void;
129
127