@refinitiv-ui/efx-grid 6.0.1 → 6.0.2

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.
Files changed (133) hide show
  1. package/lib/column-selection-dialog/lib/column-selection-dialog.js +80 -18
  2. package/lib/column-selection-dialog/themes/halo/dark/column-selection-dialog.js +1 -1
  3. package/lib/column-selection-dialog/themes/halo/dark/es5/all-elements.js +1 -1
  4. package/lib/column-selection-dialog/themes/halo/light/column-selection-dialog.js +1 -1
  5. package/lib/column-selection-dialog/themes/halo/light/es5/all-elements.js +1 -1
  6. package/lib/core/dist/core.css +1 -1
  7. package/lib/core/dist/core.js +12961 -10749
  8. package/lib/core/dist/core.min.js +1 -1
  9. package/lib/core/es6/data/DataView.d.ts +22 -7
  10. package/lib/core/es6/data/DataView.js +176 -49
  11. package/lib/core/es6/data/WrappedView.d.ts +289 -0
  12. package/lib/core/es6/data/WrappedView.js +1319 -0
  13. package/lib/core/es6/grid/Core.d.ts +13 -0
  14. package/lib/core/es6/grid/Core.js +393 -155
  15. package/lib/core/es6/grid/ILayoutGrid.d.ts +8 -0
  16. package/lib/core/es6/grid/ILayoutGrid.js +45 -2
  17. package/lib/core/es6/grid/LayoutGrid.d.ts +10 -1
  18. package/lib/core/es6/grid/LayoutGrid.js +257 -82
  19. package/lib/core/es6/grid/VirtualizedLayoutGrid.d.ts +10 -1
  20. package/lib/core/es6/grid/VirtualizedLayoutGrid.js +314 -27
  21. package/lib/core/es6/grid/components/Column.js +8 -2
  22. package/lib/core/es6/grid/components/HScrollbar.d.ts +4 -0
  23. package/lib/core/es6/grid/components/HScrollbar.js +20 -4
  24. package/lib/core/es6/grid/util/TrackLayout.d.ts +1 -1
  25. package/lib/core/es6/grid/util/TrackLayout.js +2 -3
  26. package/lib/core/es6/tr-grid-theme.js +1 -1
  27. package/lib/filter-dialog/lib/filter-dialog.js +8 -6
  28. package/lib/grid/lib/efx-grid.d.ts +14 -7
  29. package/lib/grid/lib/efx-grid.js +113 -114
  30. package/lib/grid/themes/base.less +4 -2
  31. package/lib/grid/themes/halo/dark/efx-grid.js +1 -1
  32. package/lib/grid/themes/halo/dark/es5/all-elements.js +1 -1
  33. package/lib/grid/themes/halo/efx-grid.less +69 -32
  34. package/lib/grid/themes/halo/light/efx-grid.js +1 -1
  35. package/lib/grid/themes/halo/light/es5/all-elements.js +1 -1
  36. package/lib/grid/themes/solar/charcoal/efx-grid.js +1 -1
  37. package/lib/grid/themes/solar/charcoal/es5/all-elements.js +1 -1
  38. package/lib/grid/themes/solar/pearl/efx-grid.js +1 -1
  39. package/lib/grid/themes/solar/pearl/es5/all-elements.js +1 -1
  40. package/lib/row-segmenting/es6/RowSegmenting.d.ts +1 -0
  41. package/lib/row-segmenting/es6/RowSegmenting.js +40 -11
  42. package/lib/rt-grid/dist/rt-grid.js +10290 -7864
  43. package/lib/rt-grid/dist/rt-grid.min.js +1 -1
  44. package/lib/rt-grid/es6/ColumnDefinition.d.ts +4 -1
  45. package/lib/rt-grid/es6/ColumnDefinition.js +3 -0
  46. package/lib/rt-grid/es6/Grid.d.ts +14 -7
  47. package/lib/rt-grid/es6/Grid.js +241 -74
  48. package/lib/rt-grid/es6/RowDefinition.d.ts +4 -1
  49. package/lib/rt-grid/es6/RowDefinition.js +52 -2
  50. package/lib/tr-grid-cell-selection/es6/CellSelection.d.ts +1 -1
  51. package/lib/tr-grid-cell-selection/es6/CellSelection.js +53 -40
  52. package/lib/tr-grid-checkbox/es6/Checkbox.d.ts +2 -0
  53. package/lib/tr-grid-checkbox/es6/Checkbox.js +29 -14
  54. package/lib/tr-grid-column-grouping/es6/ColumnGrouping.d.ts +1 -0
  55. package/lib/tr-grid-column-grouping/es6/ColumnGrouping.js +10 -0
  56. package/lib/tr-grid-column-selection/es6/ColumnSelection.d.ts +5 -1
  57. package/lib/tr-grid-column-selection/es6/ColumnSelection.js +226 -4
  58. package/lib/tr-grid-column-stack/es6/ColumnStack.js +3 -0
  59. package/lib/tr-grid-conditional-coloring/es6/ConditionalColoring.js +1 -0
  60. package/lib/tr-grid-filter-input/es6/FilterInput.d.ts +4 -2
  61. package/lib/tr-grid-filter-input/es6/FilterInput.js +73 -10
  62. package/lib/tr-grid-row-dragging/es6/RowDragging.js +102 -12
  63. package/lib/tr-grid-row-filtering/es6/RowFiltering.d.ts +2 -0
  64. package/lib/tr-grid-row-filtering/es6/RowFiltering.js +88 -33
  65. package/lib/tr-grid-row-grouping/es6/RowGrouping.js +41 -31
  66. package/lib/tr-grid-row-selection/es6/RowSelection.d.ts +5 -1
  67. package/lib/tr-grid-row-selection/es6/RowSelection.js +188 -7
  68. package/lib/tr-grid-rowcoloring/es6/RowColoring.d.ts +2 -0
  69. package/lib/tr-grid-rowcoloring/es6/RowColoring.js +36 -0
  70. package/lib/tr-grid-util/es6/CellPainter.d.ts +8 -8
  71. package/lib/tr-grid-util/es6/Conflator.d.ts +2 -2
  72. package/lib/tr-grid-util/es6/CoralItems.d.ts +1 -1
  73. package/lib/tr-grid-util/es6/DateTime.d.ts +4 -4
  74. package/lib/tr-grid-util/es6/Delay.d.ts +1 -1
  75. package/lib/tr-grid-util/es6/Dom.d.ts +4 -4
  76. package/lib/tr-grid-util/es6/ElementWrapper.d.ts +1 -1
  77. package/lib/tr-grid-util/es6/ElfDate.d.ts +3 -3
  78. package/lib/tr-grid-util/es6/ElfUtil.d.ts +4 -4
  79. package/lib/tr-grid-util/es6/EventDispatcher.d.ts +1 -1
  80. package/lib/tr-grid-util/es6/FieldFormatter.d.ts +1 -1
  81. package/lib/tr-grid-util/es6/FilterBuilder.d.ts +5 -5
  82. package/lib/tr-grid-util/es6/GridPlugin.d.ts +3 -3
  83. package/lib/tr-grid-util/es6/MouseDownTrait.d.ts +1 -1
  84. package/lib/tr-grid-util/es6/MultiTableManager.d.ts +2 -2
  85. package/lib/tr-grid-util/es6/PercentBar.d.ts +1 -1
  86. package/lib/tr-grid-util/es6/Perf.d.ts +4 -4
  87. package/lib/tr-grid-util/es6/Popup.d.ts +2 -2
  88. package/lib/tr-grid-util/es6/RequestQueue.d.ts +1 -1
  89. package/lib/tr-grid-util/es6/RowPainter.d.ts +3 -0
  90. package/lib/tr-grid-util/es6/RowPainter.js +66 -12
  91. package/lib/tr-grid-util/es6/SubTable.d.ts +9 -9
  92. package/lib/tr-grid-util/es6/Table.d.ts +13 -13
  93. package/lib/tr-grid-util/es6/TextHighlighter.d.ts +3 -3
  94. package/lib/tr-grid-util/es6/TickCodes.d.ts +2 -2
  95. package/lib/tr-grid-util/es6/TouchProxy.d.ts +1 -1
  96. package/lib/tr-grid-util/es6/Util.d.ts +6 -6
  97. package/lib/tr-grid-util/es6/formula/Engine.d.ts +5 -5
  98. package/lib/tr-grid-util/es6/formula/Formula.d.ts +3 -3
  99. package/lib/tr-grid-util/es6/formula/RealtimeService.d.ts +1 -1
  100. package/lib/tr-grid-util/es6/jet/CollectionDict.d.ts +2 -2
  101. package/lib/tr-grid-util/es6/jet/DataGenerator.d.ts +4 -4
  102. package/lib/tr-grid-util/es6/jet/MockArchive.d.ts +1 -1
  103. package/lib/tr-grid-util/es6/jet/MockJET.d.ts +4 -4
  104. package/lib/tr-grid-util/es6/jet/MockQuotes.d.ts +11 -11
  105. package/lib/tr-grid-util/es6/jet/MockQuotes2.d.ts +7 -7
  106. package/lib/tr-grid-util/es6/jet/MockRTK.d.ts +1 -1
  107. package/lib/tr-grid-util/es6/jet/mockDataAPI.d.ts +1 -1
  108. package/lib/types/es6/CellSelection.d.ts +1 -1
  109. package/lib/types/es6/Checkbox.d.ts +2 -0
  110. package/lib/types/es6/ColumnGrouping.d.ts +1 -0
  111. package/lib/types/es6/ColumnSelection.d.ts +5 -1
  112. package/lib/types/es6/Core/data/DataView.d.ts +22 -7
  113. package/lib/types/es6/Core/data/WrappedView.d.ts +289 -0
  114. package/lib/types/es6/Core/grid/Core.d.ts +13 -0
  115. package/lib/types/es6/Core/grid/ILayoutGrid.d.ts +8 -0
  116. package/lib/types/es6/Core/grid/LayoutGrid.d.ts +10 -1
  117. package/lib/types/es6/Core/grid/VirtualizedLayoutGrid.d.ts +10 -1
  118. package/lib/types/es6/Core/grid/components/HScrollbar.d.ts +4 -0
  119. package/lib/types/es6/Core/grid/util/TrackLayout.d.ts +1 -1
  120. package/lib/types/es6/FilterInput.d.ts +4 -2
  121. package/lib/types/es6/RealtimeGrid/ColumnDefinition.d.ts +4 -1
  122. package/lib/types/es6/RealtimeGrid/Grid.d.ts +15 -8
  123. package/lib/types/es6/RealtimeGrid/RowDefinition.d.ts +4 -1
  124. package/lib/types/es6/RowColoring.d.ts +2 -0
  125. package/lib/types/es6/RowFiltering.d.ts +2 -0
  126. package/lib/types/es6/RowSegmenting.d.ts +1 -0
  127. package/lib/types/es6/RowSelection.d.ts +5 -1
  128. package/lib/types/es6/Zoom.d.ts +2 -1
  129. package/lib/types/es6/index.d.ts +2 -0
  130. package/lib/versions.json +17 -17
  131. package/lib/zoom/es6/Zoom.d.ts +2 -1
  132. package/lib/zoom/es6/Zoom.js +11 -4
  133. package/package.json +7 -7
@@ -8,7 +8,7 @@ declare class MultiTableManager {
8
8
 
9
9
  constructor(gridElem: Element);
10
10
 
11
- public static synchronizeVScrollbar(vScrollbarHost: Element, hScrollbarHost: Element, gridElems: (Element)[]): Promise<any[]>;
11
+ public static synchronizeVScrollbar(vScrollbarHost: Element, hScrollbarHost: Element, gridElems: (Element)[]): Promise<any[]>|null;
12
12
 
13
13
  public setGridConfig(configObj?: any): void;
14
14
 
@@ -18,7 +18,7 @@ declare class MultiTableManager {
18
18
 
19
19
  public setTableCount(num: number): void;
20
20
 
21
- public getTable(at?: number): Element;
21
+ public getTable(at?: number): Element|null;
22
22
 
23
23
  public insertRow(rowOption?: any, at?: number): void;
24
24
 
@@ -23,7 +23,7 @@ declare class PercentBar {
23
23
 
24
24
  public static toAlignment(str: string|null): string;
25
25
 
26
- public getElement(): Element;
26
+ public getElement(): Element|null;
27
27
 
28
28
  public getValue(): number;
29
29
 
@@ -12,13 +12,13 @@ declare namespace Perf {
12
12
 
13
13
  function clearResourceTimings(): void;
14
14
 
15
- function getEntries(): (PerformanceEntry)[];
15
+ function getEntries(): (PerformanceEntry)[]|null;
16
16
 
17
- function getEntriesByName(entryName: string, entryType?: string): (PerformanceEntry)[];
17
+ function getEntriesByName(entryName: string, entryType?: string): (PerformanceEntry)[]|null;
18
18
 
19
- function getEntriesByType(entryType: string): (PerformanceEntry)[];
19
+ function getEntriesByType(entryType: string): (PerformanceEntry)[]|null;
20
20
 
21
- function getEntry(entryName: string, entryType?: string): PerformanceEntry;
21
+ function getEntry(entryName: string, entryType?: string): PerformanceEntry|null;
22
22
 
23
23
  function mark(markName: string): void;
24
24
 
@@ -28,7 +28,7 @@ declare class Popup extends EventDispatcher {
28
28
 
29
29
  public dispose(): void;
30
30
 
31
- public getElement(): Element;
31
+ public getElement(): Element|null;
32
32
 
33
33
  public appendChild(childElem: Element): void;
34
34
 
@@ -50,7 +50,7 @@ declare class Popup extends EventDispatcher {
50
50
 
51
51
  public setPopupGap(gap?: number): void;
52
52
 
53
- public setParentElement(parentElement: Element): Element;
53
+ public setParentElement(parentElement: Element): Element|null;
54
54
 
55
55
  public show(opt_shown?: boolean, parentElement?: Element): void;
56
56
 
@@ -20,7 +20,7 @@ declare class RequestQueue {
20
20
 
21
21
  public getQueue(): any[];
22
22
 
23
- public makeRequest(obj: any): Promise<Response>;
23
+ public makeRequest(obj: any): Promise<Response>|null;
24
24
 
25
25
  public isLimitReached(): boolean;
26
26
 
@@ -1,5 +1,6 @@
1
1
  import { injectCss, prettifyCss } from "./Util.js";
2
2
  import { ExpanderIcon } from "./ExpanderIcon.js";
3
+ import { Icon } from "./Icon.js";
3
4
 
4
5
  declare class RowPainter {
5
6
 
@@ -9,6 +10,8 @@ declare class RowPainter {
9
10
 
10
11
  public static disableColorTag(grid: any, disabled?: boolean): void;
11
12
 
13
+ public static enableHeaderMenu(grid: any, enabled?: boolean): void;
14
+
12
15
  public removeHeaderStyle(section: any, columnIndex: number, rowIndex: number): void;
13
16
 
14
17
  public applyHeaderStyle(e: any): void;
@@ -1,5 +1,6 @@
1
1
  import { injectCss, prettifyCss } from "./Util.js";
2
2
  import { ExpanderIcon } from "./ExpanderIcon.js";
3
+ import { Icon } from "./Icon.js";
3
4
 
4
5
  /**
5
6
  * @constructor
@@ -10,6 +11,8 @@ var RowPainter = function(options) {
10
11
  this._headerSpanning = options.headerSpanning;
11
12
  this._footerSpanning = options.footerSpanning;
12
13
  this._onCellClicked = options.onCellClicked;
14
+ this._headerMenuClicked = options.headerMenuClicked;
15
+ this._menuIconClicked = this._menuIconClicked.bind(this);
13
16
  };
14
17
 
15
18
  /** @type {string}
@@ -19,6 +22,9 @@ RowPainter._styles = prettifyCss([
19
22
  ".cell.folder", [
20
23
  "text-align: left;"
21
24
  ],
25
+ ".cell.folder:not(.closed), .cell.folder.main-group", [
26
+ "font-weight: 600;"
27
+ ],
22
28
  ".color-tag::before", [
23
29
  "content: '';",
24
30
  "display: block;",
@@ -26,7 +32,7 @@ RowPainter._styles = prettifyCss([
26
32
  "width: 2px;",
27
33
  "height: 100%;",
28
34
  "left: 0;",
29
- "background-color: var(--expanded-tag-bg-color);"
35
+ "background-color: var(--grid-expanded-tag-bg-color);"
30
36
  ],
31
37
  ".color-tag.main-group::before", [
32
38
  "top: 2px;",
@@ -37,17 +43,31 @@ RowPainter._styles = prettifyCss([
37
43
  "top: 2px;",
38
44
  "width: 4px;",
39
45
  "height: calc(100% - 5px);",
40
- "background-color: var(--tag-bg-color);"
46
+ "background-color: var(--grid-tag-bg-color);"
41
47
  ],
42
48
  ".color-tag-disabled .color-tag::before", [
43
49
  "content: unset;"
44
50
  ],
45
51
  ".cell.highlighted-row.color-tag::before", [
46
- "background-color: var(--expanded-tag-bg-color);"
52
+ "background-color: var(--grid-expanded-tag-bg-color);"
53
+ ],
54
+ ".tr-grid .cell .floating-panel .menu-icon", [
55
+ "display: none;"
56
+ ],
57
+ ".tr-grid.row-menu-enabled .cell:hover .menu-icon", [
58
+ "display: inline-block;"
59
+ ],
60
+ ".folder .menu-icon", [
61
+ "color: var(--grid-row-menu-icon-color);"
62
+ ],
63
+ ".folder .menu-icon:hover", [
64
+ "color: var(--grid-row-menu-icon-hover-color);"
47
65
  ],
48
66
  ":host", [
49
- "--tag-bg-color: #333333;",
50
- "--expanded-tag-bg-color: #4D4D4D;"
67
+ "--grid-tag-bg-color: #333333;",
68
+ "--grid-expanded-tag-bg-color: #4D4D4D;",
69
+ "--grid-row-menu-icon-color: #CCCCCC;",
70
+ "--grid-row-menu-icon-hover-color: #FFFFFF;"
51
71
  ]
52
72
  ]);
53
73
 
@@ -71,6 +91,16 @@ RowPainter.disableColorTag = function(grid, disabled) {
71
91
  }
72
92
  };
73
93
 
94
+ /** @public
95
+ * @param {tr.Grid} grid
96
+ * @param {boolean=} enabled
97
+ */
98
+ RowPainter.enableHeaderMenu = function(grid, enabled) {
99
+ if (grid) {
100
+ grid.enableClass("row-menu-enabled", enabled ? true : false);
101
+ }
102
+ };
103
+
74
104
  /** @private
75
105
  * @param {Object} section ILayoutGrid
76
106
  * @param {number} fromColumnIndex
@@ -92,13 +122,21 @@ RowPainter._clearCellContent = function(section, fromColumnIndex, toColumnIndex,
92
122
  * @param {number} rowIndex
93
123
  */
94
124
  RowPainter.prototype.removeHeaderStyle = function(section, columnIndex, rowIndex) {
95
- var cell = section.getCell(columnIndex, rowIndex, false);
96
- if (!cell) {
125
+ section.enableRowClass(rowIndex, "header", false); // TODO: Slow
126
+ var cell = section.unstretchCell(columnIndex, rowIndex);
127
+ this._removeHeaderStyle(cell);
128
+ cell = section.getCell(columnIndex, rowIndex, false);
129
+ this._removeHeaderStyle(cell);
130
+ };
131
+
132
+ /** @private
133
+ * @param {Object} cell Cell container
134
+ */
135
+ RowPainter.prototype._removeHeaderStyle = function(cell) {
136
+ if(!cell || !cell._groupHeaderStyle) {
97
137
  return;
98
138
  }
99
-
100
- section.unstretchCell(columnIndex, rowIndex);
101
- section.enableRowClass(rowIndex, "header", false); // TODO: Slow
139
+ cell._groupHeaderStyle = false;
102
140
  cell.removeClass("folder");
103
141
  cell.removeClass("closed");
104
142
  cell.removeClass("content-header");
@@ -131,6 +169,7 @@ RowPainter.prototype.applyHeaderStyle = function(e) {
131
169
  // Remove content from cell that appear on right side of mainCol
132
170
  RowPainter._clearCellContent(section, mainCol + 1, colCount - 1, r, checkboxColumnIndex);
133
171
  }
172
+ cell._groupHeaderStyle = true;
134
173
 
135
174
  // Remove content from cell that appear on left side of mainCol
136
175
  RowPainter._clearCellContent(section, 0, mainCol - 1, r, checkboxColumnIndex);
@@ -149,12 +188,19 @@ RowPainter.prototype.applyHeaderStyle = function(e) {
149
188
  if (e.groupId) {
150
189
  cell.setContent(e.groupId);
151
190
  }
191
+ cell.enableClass("main-group", e.groupLevel === 1);
192
+ if (this._headerMenuClicked && stretching) {
193
+ if (!cell._menuIcon) {
194
+ var icon = cell._menuIcon = Icon.create("more", "menu-icon");
195
+ icon.addEventListener("click", this._menuIconClicked);
196
+ }
197
+ cell.insertFloatingIcon(cell._menuIcon);
198
+ }
152
199
  } else {
153
200
  cell.setContent("");
154
201
  }
155
- cell.enableClass("closed", e.collapsed);
202
+ cell.enableClass("closed", e.collapsed ? true : false);
156
203
  cell.enableClass("color-tag", true);
157
- cell.enableClass("main-group", e.groupLevel === 1);
158
204
  cell.setStyle("paddingLeft", (e.indentSize > 0) ? e.indentSize + "px" : "");
159
205
  };
160
206
 
@@ -184,5 +230,13 @@ RowPainter.prototype.applyRowStyle = function(e) {
184
230
  cell.enableClass("color-tag", e.nonGroupRow ? false : true);
185
231
  };
186
232
 
233
+ /** @private
234
+ * @param {Object} e
235
+ */
236
+ RowPainter.prototype._menuIconClicked = function(e) {
237
+ e.stopPropagation();
238
+ this._headerMenuClicked(e);
239
+ };
240
+
187
241
  export default RowPainter;
188
242
  export {RowPainter};
@@ -6,7 +6,7 @@ declare class SubTable extends ElementWrapper {
6
6
 
7
7
  constructor(opt_elem?: (Element|string));
8
8
 
9
- public insertRow(at?: number): Element;
9
+ public insertRow(at?: number): Element|null;
10
10
 
11
11
  public addRows(count?: number): (Element)[];
12
12
 
@@ -22,19 +22,19 @@ declare class SubTable extends ElementWrapper {
22
22
 
23
23
  public getRowCount(): number;
24
24
 
25
- public getCell(c: number, r: number): Element;
25
+ public getCell(c: number, r: number): Element|null;
26
26
 
27
- public getCellsInColumn(c: number): (Element)[];
27
+ public getCellsInColumn(c: number): (Element)[]|null;
28
28
 
29
- public getCellsInRow(r: number): (Element)[];
29
+ public getCellsInRow(r: number): (Element)[]|null;
30
30
 
31
31
  public getAllCells(): (Element)[];
32
32
 
33
- public getAllRows(): HTMLCollection;
33
+ public getAllRows(): HTMLCollection|null;
34
34
 
35
- public getRows(): HTMLCollection;
35
+ public getRows(): HTMLCollection|null;
36
36
 
37
- public getRow(r: number): Element;
37
+ public getRow(r: number): Element|null;
38
38
 
39
39
  public getTextContents(): (string)[][];
40
40
 
@@ -62,9 +62,9 @@ declare class SubTable extends ElementWrapper {
62
62
 
63
63
  public cloak(elem: Element, opt_elementType?: string): void;
64
64
 
65
- public spanBlock(c1: number, c2: number, r1: number, r2: number): Element;
65
+ public spanBlock(c1: number, c2: number, r1: number, r2: number): Element|null;
66
66
 
67
- public static parseTableContent(tbl: Element): (string)[][];
67
+ public static parseTableContent(tbl: Element): (string)[][]|null;
68
68
 
69
69
  }
70
70
 
@@ -7,13 +7,13 @@ declare class Table extends ElementWrapper {
7
7
 
8
8
  constructor(elem?: (Element|number), opt_colCount?: (number|any), opt_rowCount?: number);
9
9
 
10
- public getTableElement(): Element;
10
+ public getTableElement(): Element|null;
11
11
 
12
12
  public setCRWH(col: number, row: number, width: number, height: number): void;
13
13
 
14
14
  public init(options: any): void;
15
15
 
16
- public addColumns(opt_count?: number): (Element)[];
16
+ public addColumns(opt_count?: number): (Element)[]|null;
17
17
 
18
18
  public removeColumns(opt_count?: number): void;
19
19
 
@@ -33,21 +33,21 @@ declare class Table extends ElementWrapper {
33
33
 
34
34
  public getRowCount(): number;
35
35
 
36
- public getCell(c: number, r: number): Element;
36
+ public getCell(c: number, r: number): Element|null;
37
37
 
38
- public getCellsInColumn(c: number): (Element)[];
38
+ public getCellsInColumn(c: number): (Element)[]|null;
39
39
 
40
- public getCellsInRow(r: number): (Element)[];
40
+ public getCellsInRow(r: number): (Element)[]|null;
41
41
 
42
42
  public getAllCells(): (Element)[];
43
43
 
44
44
  public getAllRows(): (Element)[];
45
45
 
46
- public getRow(r: number): Element;
46
+ public getRow(r: number): Element|null;
47
47
 
48
- public spanBlock(c1: number, c2: number, r1: number, r2: number): Element;
48
+ public spanBlock(c1: number, c2: number, r1: number, r2: number): Element|null;
49
49
 
50
- public spanHorizontally(r: number, bool: boolean): Element;
50
+ public spanHorizontally(r: number, bool: boolean): Element|null;
51
51
 
52
52
  public setColMinWidths(val: number|string|(string|number)[], opt_at?: number): void;
53
53
 
@@ -87,7 +87,7 @@ declare class Table extends ElementWrapper {
87
87
 
88
88
  public addHeaderRows(opt_count?: number): (Element)[];
89
89
 
90
- public getHeaderCell(c: number, r: number): Element;
90
+ public getHeaderCell(c: number, r: number): Element|null;
91
91
 
92
92
  public getAllHeaderCells(): (Element)[];
93
93
 
@@ -95,7 +95,7 @@ declare class Table extends ElementWrapper {
95
95
 
96
96
  public addFooterRows(opt_count?: number): (Element)[];
97
97
 
98
- public getFooterCell(c: number, r: number): Element;
98
+ public getFooterCell(c: number, r: number): Element|null;
99
99
 
100
100
  public getAllFooterCells(): (Element)[];
101
101
 
@@ -113,11 +113,11 @@ declare class Table extends ElementWrapper {
113
113
 
114
114
  public cloak(tblElem: Element): void;
115
115
 
116
- public getBody(): SubTable;
116
+ public getBody(): SubTable|null;
117
117
 
118
- public getHeader(): SubTable;
118
+ public getHeader(): SubTable|null;
119
119
 
120
- public getFooter(): SubTable;
120
+ public getFooter(): SubTable|null;
121
121
 
122
122
  }
123
123
 
@@ -2,11 +2,11 @@ import {Dom} from './Dom.js';
2
2
 
3
3
  declare namespace TextHighlighter {
4
4
 
5
- const invalidChars: RegExp;
5
+ const invalidChars: RegExp|null;
6
6
 
7
- const spaces: RegExp;
7
+ const spaces: RegExp|null;
8
8
 
9
- const spaceTrimer: RegExp;
9
+ const spaceTrimer: RegExp|null;
10
10
 
11
11
  const defaultTag: string;
12
12
 
@@ -1,8 +1,8 @@
1
1
 
2
2
 
3
- declare const TickCodes: { [key: string]: number };
3
+ declare const TickCodes: { [key: string]: number }|null;
4
4
 
5
- declare const TickFields: { [key: string]: number };
5
+ declare const TickFields: { [key: string]: number }|null;
6
6
 
7
7
  export default TickCodes;
8
8
  export {TickCodes, TickFields};
@@ -16,7 +16,7 @@ declare class TouchProxy extends EventDispatcher {
16
16
 
17
17
  public static readonly passive: EventListenerOptions;
18
18
 
19
- public getElement(): Element;
19
+ public getElement(): Element|null;
20
20
 
21
21
  public setElement(elem?: Element): void;
22
22
 
@@ -18,19 +18,19 @@ declare function extendObject(obj: any, extender?: any, limiters?: (string)[]):
18
18
 
19
19
  declare function cloneObject(obj: any, limiters?: (string)[]): any;
20
20
 
21
- declare function arrayToObject(data?: any[], fields?: (string)[]): any|null;
21
+ declare function arrayToObject(data?: any[], fields?: (string)[]): any|null|null;
22
22
 
23
23
  declare function extendProperty(obj: any, extender: any, propName: string): void;
24
24
 
25
- declare function extendArrayProperty(obj: any, propName: string, ary: any): any[];
25
+ declare function extendArrayProperty(obj: any, propName: string, ary: any): any[]|null;
26
26
 
27
- declare function parseCondition(expression: string|((...params: any[]) => any)): ((...params: any[]) => any);
27
+ declare function parseCondition(expression: string|((...params: any[]) => any)): ((...params: any[]) => any)|null;
28
28
 
29
29
  declare function prettifyCss(css: string|any[]): string;
30
30
 
31
- declare function getShadowRoot(elem: Element): DocumentFragment;
31
+ declare function getShadowRoot(elem: Element): DocumentFragment|null;
32
32
 
33
- declare function injectCss(cssStr: string, targetContext?: Element): Element;
33
+ declare function injectCss(cssStr: string, targetContext?: Element): Element|null;
34
34
 
35
35
  declare function isIE(): boolean;
36
36
 
@@ -38,7 +38,7 @@ declare function isMac(): boolean;
38
38
 
39
39
  declare function isTouchDevice(): boolean;
40
40
 
41
- declare function nestedObjectToArray(obj: any, ary?: any[]): any[];
41
+ declare function nestedObjectToArray(obj: any, ary?: any[]): any[]|null;
42
42
 
43
43
  declare function rgb2Hex(rgbCode: string): string;
44
44
 
@@ -22,17 +22,17 @@ declare class Engine extends EventDispatcher {
22
22
 
23
23
  public addFormula(userInput: Formula|string): Formula;
24
24
 
25
- public removeFormula(ref?: Formula|string|number): Formula;
25
+ public removeFormula(ref?: Formula|string|number): Formula|null;
26
26
 
27
27
  public removeAllFormulas(): void;
28
28
 
29
- public getFormula(opt_ref: string|number): Formula;
29
+ public getFormula(opt_ref: string|number): Formula|null;
30
30
 
31
- public getFormulaByExpression(exp: string): Formula;
31
+ public getFormulaByExpression(exp: string): Formula|null;
32
32
 
33
- public getAllFormulas(): (Formula)[];
33
+ public getAllFormulas(): (Formula)[]|null;
34
34
 
35
- public getAllFormulaReferences(): { [key: string]: string };
35
+ public getAllFormulaReferences(): { [key: string]: string }|null;
36
36
 
37
37
  public getFormulaCount(): number;
38
38
 
@@ -6,15 +6,15 @@ declare class Formula extends EventDispatcher {
6
6
 
7
7
  constructor(expression?: string, context?: any);
8
8
 
9
- public static readonly _isBoundFormula: { [key: string]: boolean };
9
+ public static readonly _isBoundFormula: { [key: string]: boolean }|null;
10
10
 
11
11
  public dispose(): void;
12
12
 
13
13
  public calculate(rowData: { [key: string]: any }): any;
14
14
 
15
- public getFunction(): ((...params: any[]) => any);
15
+ public getFunction(): ((...params: any[]) => any)|null;
16
16
 
17
- public getFieldNames(): (string)[];
17
+ public getFieldNames(): (string)[]|null;
18
18
 
19
19
  public getReference(): string;
20
20
 
@@ -9,7 +9,7 @@ declare namespace RealtimeService {
9
9
 
10
10
  function setQuote2(quotes2: any): void;
11
11
 
12
- function getResolvedFieldName(fid: string): string|null;
12
+ function getResolvedFieldName(fid: string): string|null|null;
13
13
 
14
14
  function resolveFieldId(formula: Formula, fid: string, obj?: any): Promise<any>;
15
15
 
@@ -14,9 +14,9 @@ declare class CollectionDict {
14
14
 
15
15
  public removeAllItems(): boolean;
16
16
 
17
- public getItems(key: string): any[];
17
+ public getItems(key: string): any[]|null;
18
18
 
19
- public getAllItems(): any[];
19
+ public getAllItems(): any[]|null;
20
20
 
21
21
  public getItemCount(): number;
22
22
 
@@ -28,7 +28,7 @@ declare class DataGenerator {
28
28
 
29
29
  public randMember(set: any[]): any;
30
30
 
31
- public randDate(min?: (number|any), max?: (number|any)): Date;
31
+ public randDate(min?: (number|any), max?: (number|any)): Date|null;
32
32
 
33
33
  public randString(min?: number, max?: number): string;
34
34
 
@@ -52,7 +52,7 @@ declare class DataGenerator {
52
52
 
53
53
  public static randMember(set: any[], seed?: number): any;
54
54
 
55
- public static randDate(min?: (number|any), max?: (number|any), seed?: number): Date;
55
+ public static randDate(min?: (number|any), max?: (number|any), seed?: number): Date|null;
56
56
 
57
57
  public static randString(min?: number, max?: number, subType?: string, seed?: number): string;
58
58
 
@@ -76,11 +76,11 @@ declare function randBoolean(seed?: number): boolean;
76
76
 
77
77
  declare function randMember(set: any[], seed?: number): any;
78
78
 
79
- declare function randDate(min?: (number|any), max?: (number|any), seed?: number): Date;
79
+ declare function randDate(min?: (number|any), max?: (number|any), seed?: number): Date|null;
80
80
 
81
81
  declare function randString(min?: number, max?: number, seed?: number): string;
82
82
 
83
- declare function toRecords(data2D: (any[])[], fields?: (string)[]): (any)[];
83
+ declare function toRecords(data2D: (any[])[], fields?: (string)[]): (any)[]|null;
84
84
 
85
85
  declare function getSeed(): number;
86
86
 
@@ -10,7 +10,7 @@ declare class MockArchive {
10
10
 
11
11
  public get(key: string): any;
12
12
 
13
- public getAllKeys(): (string)[];
13
+ public getAllKeys(): (string)[]|null;
14
14
 
15
15
  public save(): void;
16
16
 
@@ -7,15 +7,15 @@ declare class MockJET {
7
7
 
8
8
  constructor();
9
9
 
10
- public init(opt_obj?: any): MockJET;
10
+ public init(opt_obj?: any): MockJET|null;
11
11
 
12
- public onLoad(handler: ((...params: any[]) => any)): MockJET;
12
+ public onLoad(handler: ((...params: any[]) => any)): MockJET|null;
13
13
 
14
- public navigate(obj: any): MockJET;
14
+ public navigate(obj: any): MockJET|null;
15
15
 
16
16
  public appHit(name: string, type: string, property: string): void;
17
17
 
18
- public getUserInfo(): Promise<any>;
18
+ public getUserInfo(): Promise<any>|null;
19
19
 
20
20
  public contextChange(contextAry: any[]): void;
21
21
 
@@ -4,7 +4,7 @@ declare class MockQuotes {
4
4
 
5
5
  constructor();
6
6
 
7
- public create(opt_id?: string): MockSubscription;
7
+ public create(opt_id?: string): MockSubscription|null;
8
8
 
9
9
  }
10
10
 
@@ -12,25 +12,25 @@ declare class MockSubscription {
12
12
 
13
13
  constructor(opt_id?: string);
14
14
 
15
- public create(opt_id?: string): MockSubscription;
15
+ public create(opt_id?: string): MockSubscription|null;
16
16
 
17
- public formattedFields(fields: (string)[]): MockSubscription;
17
+ public formattedFields(fields: (string)[]): MockSubscription|null;
18
18
 
19
- public rawFields(fields: (string)[]): MockSubscription;
19
+ public rawFields(fields: (string)[]): MockSubscription|null;
20
20
 
21
- public chain(ric: string): MockSubscription;
21
+ public chain(ric: string): MockSubscription|null;
22
22
 
23
- public rics(ric: string|(string)[]): MockSubscription;
23
+ public rics(ric: string|(string)[]): MockSubscription|null;
24
24
 
25
- public start(): MockSubscription;
25
+ public start(): MockSubscription|null;
26
26
 
27
- public stop(): MockSubscription;
27
+ public stop(): MockSubscription|null;
28
28
 
29
- public onNewRow(handler: ((...params: any[]) => any)): MockSubscription;
29
+ public onNewRow(handler: ((...params: any[]) => any)): MockSubscription|null;
30
30
 
31
- public onUpdate(handler: ((...params: any[]) => any)): MockSubscription;
31
+ public onUpdate(handler: ((...params: any[]) => any)): MockSubscription|null;
32
32
 
33
- public onRemoveRow(handler: ((...params: any[]) => any)): MockSubscription;
33
+ public onRemoveRow(handler: ((...params: any[]) => any)): MockSubscription|null;
34
34
 
35
35
  }
36
36
 
@@ -5,7 +5,7 @@ declare class MockQuotes2 {
5
5
 
6
6
  constructor();
7
7
 
8
- public create(options?: any): MockSubscriptions;
8
+ public create(options?: any): MockSubscriptions|null;
9
9
 
10
10
  public isSkipHeaderSupported(): boolean;
11
11
 
@@ -15,7 +15,7 @@ declare class MockSubscriptions {
15
15
 
16
16
  constructor(options?: any);
17
17
 
18
- public create(options?: any): MockSubscriptions;
18
+ public create(options?: any): MockSubscriptions|null;
19
19
 
20
20
  public setUpdateInterval(min?: number, max?: number): void;
21
21
 
@@ -23,9 +23,9 @@ declare class MockSubscriptions {
23
23
 
24
24
  public setSeed(seed: number): void;
25
25
 
26
- public addRic(ric: string, subId?: string): string|null;
26
+ public addRic(ric: string, subId?: string): string|null|null;
27
27
 
28
- public addChain(ric: string, subId?: string): string|null;
28
+ public addChain(ric: string, subId?: string): string|null|null;
29
29
 
30
30
  public addFields(fields: string|(string)[]): void;
31
31
 
@@ -57,15 +57,15 @@ declare class MockSubscriptions {
57
57
 
58
58
  public getRic(subId: string): string;
59
59
 
60
- public getAllFields(): { [key: string]: boolean };
60
+ public getAllFields(): { [key: string]: boolean }|null;
61
61
 
62
62
  public hasField(field: string): boolean;
63
63
 
64
- public filter(start: number, count: number): MockSubscriptions;
64
+ public filter(start: number, count: number): MockSubscriptions|null;
65
65
 
66
66
  public static simpleDigest(str: string): number;
67
67
 
68
- public onFeedStatusChanged(feedNames: (string)[], handler: ((...params: any[]) => any)): MockSubscriptions;
68
+ public onFeedStatusChanged(feedNames: (string)[], handler: ((...params: any[]) => any)): MockSubscriptions|null;
69
69
 
70
70
  }
71
71