@refinitiv-ui/efx-grid 6.0.90 → 6.0.92
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/column-dragging/es6/ColumnDragging.d.ts +1 -1
- package/lib/column-dragging/es6/ColumnDragging.js +144 -34
- package/lib/core/dist/core.js +2446 -2625
- package/lib/core/dist/core.min.js +1 -1
- package/lib/core/es6/data/ColumnStats.js +14 -14
- package/lib/core/es6/data/DataCache.js +118 -118
- package/lib/core/es6/data/DataTable.d.ts +4 -0
- package/lib/core/es6/data/DataTable.js +219 -190
- package/lib/core/es6/data/DataView.d.ts +2 -0
- package/lib/core/es6/data/DataView.js +300 -292
- package/lib/core/es6/data/Segment.js +85 -83
- package/lib/core/es6/data/SegmentCollection.d.ts +2 -0
- package/lib/core/es6/data/SegmentCollection.js +91 -80
- package/lib/core/es6/data/WrappedView.js +41 -41
- package/lib/core/es6/grid/Core.js +635 -635
- package/lib/core/es6/grid/ILayoutGrid.js +1 -1
- package/lib/core/es6/grid/LayoutGrid.js +183 -183
- package/lib/core/es6/grid/VirtualizedLayoutGrid.js +91 -91
- package/lib/core/es6/grid/components/Cell.js +29 -29
- package/lib/core/es6/grid/components/CellFloatingPanel.js +11 -11
- package/lib/core/es6/grid/components/CellSpan.js +7 -7
- package/lib/core/es6/grid/components/CellSpans.js +36 -34
- package/lib/core/es6/grid/components/Column.js +40 -40
- package/lib/core/es6/grid/components/ElementWrapper.js +17 -17
- package/lib/core/es6/grid/components/HScrollbar.js +31 -31
- package/lib/core/es6/grid/components/Scrollbar.js +77 -77
- package/lib/core/es6/grid/components/StretchedCells.js +49 -49
- package/lib/core/es6/grid/components/VScrollbar.js +11 -11
- package/lib/core/es6/grid/components/VirtualItems.js +3 -3
- package/lib/core/es6/grid/event/EventDispatcher.js +9 -9
- package/lib/core/es6/grid/event/EventListeners.js +4 -4
- package/lib/core/es6/grid/plugins/SortableTitlePlugin.js +186 -186
- package/lib/core/es6/grid/util/Conflator.js +4 -4
- package/lib/core/es6/grid/util/Reverter.js +1 -1
- package/lib/core/es6/grid/util/SectionSettings.js +20 -20
- package/lib/core/es6/grid/util/SelectionList.js +23 -23
- package/lib/core/es6/grid/util/TrackLayout.js +74 -74
- package/lib/core/es6/grid/util/Virtualizer.js +15 -15
- package/lib/core/es6/grid/util/util.js +20 -20
- package/lib/core/es6/index.d.ts +0 -2
- package/lib/core/es6/index.js +0 -3
- package/lib/grid/index.js +1 -1
- package/lib/rt-grid/dist/rt-grid.js +193 -70
- package/lib/rt-grid/dist/rt-grid.min.js +1 -1
- package/lib/rt-grid/es6/Grid.js +46 -30
- package/lib/rt-grid/es6/RowDefinition.d.ts +2 -1
- package/lib/rt-grid/es6/RowDefinition.js +74 -16
- package/lib/tr-grid-cell-selection/es6/CellSelection.js +56 -1
- package/lib/tr-grid-column-grouping/es6/ColumnGrouping.d.ts +3 -1
- package/lib/tr-grid-column-grouping/es6/ColumnGrouping.js +29 -1
- package/lib/tr-grid-util/es6/CellPainter.js +94 -93
- package/lib/tr-grid-util/es6/Conflator.js +4 -4
- package/lib/tr-grid-util/es6/CoralItems.js +6 -6
- package/lib/tr-grid-util/es6/DateTime.js +39 -39
- package/lib/tr-grid-util/es6/Deferred.js +5 -5
- package/lib/tr-grid-util/es6/Delay.js +1 -1
- package/lib/tr-grid-util/es6/Dom.js +26 -26
- package/lib/tr-grid-util/es6/DragUI.js +17 -17
- package/lib/tr-grid-util/es6/ElementObserver.js +12 -12
- package/lib/tr-grid-util/es6/ElementWrapper.js +2 -2
- package/lib/tr-grid-util/es6/ElfDate.js +4 -4
- package/lib/tr-grid-util/es6/ElfUtil.js +37 -37
- package/lib/tr-grid-util/es6/EventDispatcher.js +12 -12
- package/lib/tr-grid-util/es6/ExpanderIcon.js +6 -6
- package/lib/tr-grid-util/es6/ExpressionParser.js +43 -43
- package/lib/tr-grid-util/es6/Ext.js +6 -6
- package/lib/tr-grid-util/es6/FieldFormatter.js +17 -17
- package/lib/tr-grid-util/es6/FilterBuilder.js +57 -57
- package/lib/tr-grid-util/es6/FilterOperators.d.ts +12 -1
- package/lib/tr-grid-util/es6/FilterOperators.js +13 -2
- package/lib/tr-grid-util/es6/GridPlugin.js +86 -86
- package/lib/tr-grid-util/es6/GroupDefinitions.js +90 -90
- package/lib/tr-grid-util/es6/Icon.js +4 -4
- package/lib/tr-grid-util/es6/MouseDownTrait.js +6 -6
- package/lib/tr-grid-util/es6/MultiTableManager.js +68 -68
- package/lib/tr-grid-util/es6/NumberFormatter.js +22 -22
- package/lib/tr-grid-util/es6/PercentBar.js +17 -17
- package/lib/tr-grid-util/es6/Perf.js +5 -5
- package/lib/tr-grid-util/es6/Popup.js +42 -42
- package/lib/tr-grid-util/es6/RangeBar.js +5 -5
- package/lib/tr-grid-util/es6/RequestQueue.js +5 -5
- package/lib/tr-grid-util/es6/RowPainter.js +23 -23
- package/lib/tr-grid-util/es6/SubTable.js +94 -94
- package/lib/tr-grid-util/es6/Table.js +51 -51
- package/lib/tr-grid-util/es6/TextHighlighter.js +49 -49
- package/lib/tr-grid-util/es6/TickCodes.js +2 -2
- package/lib/tr-grid-util/es6/Timer.js +2 -2
- package/lib/tr-grid-util/es6/TouchProxy.js +7 -7
- package/lib/tr-grid-util/es6/Util.js +50 -50
- package/lib/tr-grid-util/es6/formula/ADCService.js +2 -2
- package/lib/tr-grid-util/es6/formula/ADCSubscription.js +19 -19
- package/lib/tr-grid-util/es6/formula/AdFinService.js +2 -2
- package/lib/tr-grid-util/es6/formula/AdFinSubscription.js +19 -19
- package/lib/tr-grid-util/es6/formula/Engine.js +56 -56
- package/lib/tr-grid-util/es6/formula/Formula.js +62 -62
- package/lib/tr-grid-util/es6/formula/IntervalSubscription.js +3 -3
- package/lib/tr-grid-util/es6/formula/Realtime.js +15 -15
- package/lib/tr-grid-util/es6/formula/RealtimeService.js +15 -15
- package/lib/tr-grid-util/es6/formula/TSIService.js +2 -2
- package/lib/tr-grid-util/es6/formula/TSISubscription.js +104 -104
- package/lib/tr-grid-util/es6/formula/VariableToken.js +20 -20
- package/lib/tr-grid-util/es6/formula/functions/AdFin.js +10 -10
- package/lib/tr-grid-util/es6/formula/functions/Excel.js +1 -1
- package/lib/tr-grid-util/es6/formula/functions/Info.js +2 -2
- package/lib/tr-grid-util/es6/formula/functions/Internal.js +5 -5
- package/lib/tr-grid-util/es6/formula/functions/Logic.js +5 -5
- package/lib/tr-grid-util/es6/formula/functions/Math.js +46 -46
- package/lib/tr-grid-util/es6/formula/functions/Statistics.js +27 -27
- package/lib/tr-grid-util/es6/formula/functions/Text.js +19 -19
- package/lib/tr-grid-util/es6/index.js +1 -1
- package/lib/tr-grid-util/es6/jet/Adc.js +36 -36
- package/lib/tr-grid-util/es6/jet/CollectionDict.js +11 -11
- package/lib/tr-grid-util/es6/jet/DataGenerator.js +95 -95
- package/lib/tr-grid-util/es6/jet/DataSet.js +1 -1
- package/lib/tr-grid-util/es6/jet/MockArchive.js +5 -5
- package/lib/tr-grid-util/es6/jet/MockJET.js +1 -1
- package/lib/tr-grid-util/es6/jet/MockQuotes.js +13 -13
- package/lib/tr-grid-util/es6/jet/MockQuotes2.js +100 -100
- package/lib/tr-grid-util/es6/jet/MockRTK.js +4 -4
- package/lib/tr-grid-util/es6/jet/MockUtil.js +2 -2
- package/lib/tr-grid-util/es6/jet/index.js +1 -1
- package/lib/tr-grid-util/es6/jet/mockDataAPI.js +15 -15
- package/lib/tr-grid-util/es6/locale/translation-de.js +1 -1
- package/lib/tr-grid-util/es6/locale/translation-en.js +1 -1
- package/lib/tr-grid-util/es6/locale/translation-ja.js +1 -1
- package/lib/tr-grid-util/es6/locale/translation-zh-hant.js +1 -1
- package/lib/tr-grid-util/es6/locale/translation-zh.js +1 -1
- package/lib/tr-grid-util/es6/locale/translation.js +1 -1
- package/lib/types/es6/ColumnDragging.d.ts +1 -1
- package/lib/types/es6/ColumnGrouping.d.ts +3 -1
- package/lib/types/es6/Core/data/DataTable.d.ts +4 -0
- package/lib/types/es6/Core/data/DataView.d.ts +2 -0
- package/lib/types/es6/Core/data/SegmentCollection.d.ts +2 -0
- package/lib/types/es6/Core/index.d.ts +0 -2
- package/lib/types/es6/RealtimeGrid/RowDefinition.d.ts +2 -1
- package/lib/versions.json +4 -4
- package/package.json +1 -1
- package/lib/core/es6/grid/util/ElementFrameWork.d.ts +0 -18
- package/lib/core/es6/grid/util/ElementFrameWork.js +0 -227
- package/lib/core/es6/grid/util/HttpRequest.d.ts +0 -53
- package/lib/core/es6/grid/util/HttpRequest.js +0 -371
- package/lib/core/es6/grid/util/PercentBar.d.ts +0 -43
- package/lib/core/es6/grid/util/PercentBar.js +0 -390
- package/lib/core/es6/grid/util/PercentBarRenderer.d.ts +0 -41
- package/lib/core/es6/grid/util/PercentBarRenderer.js +0 -316
- package/lib/core/es6/grid/util/RangeBar.d.ts +0 -25
- package/lib/core/es6/grid/util/RangeBar.js +0 -255
- package/lib/types/es6/Core/grid/util/ElementFrameWork.d.ts +0 -18
- package/lib/types/es6/Core/grid/util/HttpRequest.d.ts +0 -53
- package/lib/types/es6/Core/grid/util/PercentBar.d.ts +0 -43
- package/lib/types/es6/Core/grid/util/PercentBarRenderer.d.ts +0 -41
- package/lib/types/es6/Core/grid/util/RangeBar.d.ts +0 -25
@@ -1,316 +0,0 @@
|
|
1
|
-
/* eslint-disable */
|
2
|
-
import ElementWrapper from "../components/ElementWrapper.js";
|
3
|
-
import PercentBar from "./PercentBar.js";
|
4
|
-
/* eslint-enable */
|
5
|
-
|
6
|
-
/** @constructor
|
7
|
-
*/
|
8
|
-
var PercentBarRenderer = function () {
|
9
|
-
this._pbs = [];
|
10
|
-
};
|
11
|
-
//#region Public Methods
|
12
|
-
/** @public
|
13
|
-
*/
|
14
|
-
PercentBarRenderer.prototype.dispose = function() {
|
15
|
-
for(var i = this._pbs.length; --i >= 0;) {
|
16
|
-
this._pbs[i].dispose();
|
17
|
-
}
|
18
|
-
this._pbs = null;
|
19
|
-
};
|
20
|
-
|
21
|
-
//#region Public Methods
|
22
|
-
/** @public
|
23
|
-
* @param {ElementWrapper} cell
|
24
|
-
* @param {number} value
|
25
|
-
* @param {number=} opt_max
|
26
|
-
* @param {string=} opt_displayText
|
27
|
-
* @param {number=} opt_textWidth
|
28
|
-
*/
|
29
|
-
PercentBarRenderer.prototype.render = function(cell, value, opt_max, opt_displayText, opt_textWidth) {
|
30
|
-
if(!cell) { return; }
|
31
|
-
if (value) {
|
32
|
-
var numValue = +value;
|
33
|
-
if (numValue !== numValue) { // string that can't be converted to number
|
34
|
-
cell.setContent(value);
|
35
|
-
return;
|
36
|
-
}
|
37
|
-
}
|
38
|
-
|
39
|
-
var content = cell.getContent();
|
40
|
-
var pb = (content) ? content._percentBar : null;
|
41
|
-
if(!pb) {
|
42
|
-
pb = this._createPercentBar(opt_textWidth);
|
43
|
-
|
44
|
-
this._pbs.push(pb);
|
45
|
-
|
46
|
-
cell.setContent(pb);
|
47
|
-
}
|
48
|
-
|
49
|
-
if (opt_textWidth) {
|
50
|
-
pb.setTextWidth(opt_textWidth); // Custom textWidth per cell
|
51
|
-
}
|
52
|
-
var displayText = opt_displayText || cell["percentText"] || "";
|
53
|
-
this._setDisplayText(pb, value, displayText, opt_max);
|
54
|
-
};
|
55
|
-
/** @public
|
56
|
-
* @param {ElementWrapper} cell
|
57
|
-
* @param {number} value
|
58
|
-
* @param {number=} opt_max
|
59
|
-
* @return {PercentBar}
|
60
|
-
*/
|
61
|
-
PercentBarRenderer.prototype.renderForPrinting = function(cell, value, opt_max) {
|
62
|
-
if (value) {
|
63
|
-
var numValue = +value;
|
64
|
-
if (numValue !== numValue) { // string that can't be converted to number
|
65
|
-
cell.setContent(value);
|
66
|
-
return null;
|
67
|
-
}
|
68
|
-
}
|
69
|
-
|
70
|
-
var pb = this._createPercentBar();
|
71
|
-
this._setDisplayText(pb, value, cell["percentText"], opt_max);
|
72
|
-
cell.setContent(pb);
|
73
|
-
return pb;
|
74
|
-
};
|
75
|
-
/** @private
|
76
|
-
* @param {number=} opt_textWidth
|
77
|
-
* @return {!PercentBar}
|
78
|
-
*/
|
79
|
-
PercentBarRenderer.prototype._createPercentBar = function(opt_textWidth) {
|
80
|
-
var pb = new PercentBar();
|
81
|
-
if (!opt_textWidth) {
|
82
|
-
if(this._textWidth) {
|
83
|
-
pb.setTextWidth(this._textWidth); // Default text width
|
84
|
-
}
|
85
|
-
}
|
86
|
-
pb.setAlignment(this._alignment);
|
87
|
-
pb.setMovementColor(this._movementColor);
|
88
|
-
pb.useMovementColor(this._movementColorUsed);
|
89
|
-
pb.hideText(this._textHidden);
|
90
|
-
pb.setTrackColor(this._trackColor);
|
91
|
-
pb.enableTooltip(this._tooltipEnabled);
|
92
|
-
return pb;
|
93
|
-
};
|
94
|
-
/** @private
|
95
|
-
* @param {!PercentBar} pb
|
96
|
-
* @param {number} value
|
97
|
-
* @param {string=} displayText
|
98
|
-
* @param {number=} opt_max
|
99
|
-
*/
|
100
|
-
PercentBarRenderer.prototype._setDisplayText = function(pb, value, displayText, opt_max) {
|
101
|
-
pb.setValue(value, opt_max, displayText);
|
102
|
-
if(this._txtResizing && displayText) { // HACK: Perform text auto resizing if only displayText exists
|
103
|
-
var tsw = pb.getTextScrollWidth();
|
104
|
-
if(this._maxTextWidth === this._maxTextWidth) {
|
105
|
-
if(tsw > this._maxTextWidth) {
|
106
|
-
this._maxTextWidth = tsw;
|
107
|
-
}
|
108
|
-
} else {
|
109
|
-
this._maxTextWidth = tsw;
|
110
|
-
}
|
111
|
-
}
|
112
|
-
};
|
113
|
-
|
114
|
-
/** @public
|
115
|
-
* @param {string} alignment Alignment can be "left", "center", "right"
|
116
|
-
*/
|
117
|
-
PercentBarRenderer.prototype.setAlignment = function(alignment) {
|
118
|
-
if (!alignment) { alignment = "center"; }
|
119
|
-
|
120
|
-
this._alignment = alignment;
|
121
|
-
for(var i = this._pbs.length; --i >= 0;) {
|
122
|
-
this._pbs[i].setAlignment(alignment);
|
123
|
-
}
|
124
|
-
};
|
125
|
-
/** @public
|
126
|
-
* @param {Object=} colorObj
|
127
|
-
*/
|
128
|
-
PercentBarRenderer.prototype.setMovementColor = function(colorObj) {
|
129
|
-
this._movementColor = colorObj || null;
|
130
|
-
for(var i = this._pbs.length; --i >= 0;) {
|
131
|
-
this._pbs[i].setMovementColor(colorObj);
|
132
|
-
}
|
133
|
-
};
|
134
|
-
/** @public
|
135
|
-
* @param {boolean=} opt_enabled
|
136
|
-
*/
|
137
|
-
PercentBarRenderer.prototype.useMovementColor = function(opt_enabled) {
|
138
|
-
this._movementColorUsed = opt_enabled !== false;
|
139
|
-
for(var i = this._pbs.length; --i >= 0;) {
|
140
|
-
this._pbs[i].useMovementColor(opt_enabled);
|
141
|
-
}
|
142
|
-
};
|
143
|
-
/** @public
|
144
|
-
* @param {string=} color
|
145
|
-
*/
|
146
|
-
PercentBarRenderer.prototype.setTrackColor = function(color) {
|
147
|
-
this._trackColor = color ? color : "";
|
148
|
-
for(var i = this._pbs.length; --i >= 0;) {
|
149
|
-
this._pbs[i].setTrackColor(color);
|
150
|
-
}
|
151
|
-
};
|
152
|
-
/** @public
|
153
|
-
* @param {boolean=} opt_enabled
|
154
|
-
*/
|
155
|
-
PercentBarRenderer.prototype.hideText = function(opt_enabled) {
|
156
|
-
this._textHidden = opt_enabled !== false;
|
157
|
-
for(var i = this._pbs.length; --i >= 0;) {
|
158
|
-
this._pbs[i].hideText(opt_enabled);
|
159
|
-
}
|
160
|
-
};
|
161
|
-
|
162
|
-
/** @public
|
163
|
-
* @param {number|string} width
|
164
|
-
* @param {Array.<PercentBar>=} opt_pbs
|
165
|
-
*/
|
166
|
-
PercentBarRenderer.prototype.setTextWidth = function(width, opt_pbs) {
|
167
|
-
var newWidth = "";
|
168
|
-
if(width || width === 0) {
|
169
|
-
newWidth = (typeof width === "number") ? width + "px" : width;
|
170
|
-
}
|
171
|
-
|
172
|
-
var i;
|
173
|
-
if(opt_pbs) {
|
174
|
-
for(i = opt_pbs.length; --i >= 0;) {
|
175
|
-
opt_pbs[i].setTextWidth(width);
|
176
|
-
}
|
177
|
-
} else if(this._textWidth !== newWidth) {
|
178
|
-
this._textWidth = newWidth;
|
179
|
-
for(i = this._pbs.length; --i >= 0;) {
|
180
|
-
this._pbs[i].setTextWidth(newWidth);
|
181
|
-
}
|
182
|
-
}
|
183
|
-
};
|
184
|
-
|
185
|
-
/** @public
|
186
|
-
* @param {boolean=} opt_enabled
|
187
|
-
*/
|
188
|
-
PercentBarRenderer.prototype.enableTooltip = function(opt_enabled) {
|
189
|
-
this._tooltipEnabled = opt_enabled !== false;
|
190
|
-
for(var i = this._pbs.length; --i >= 0;) {
|
191
|
-
this._pbs[i].enableTooltip(opt_enabled);
|
192
|
-
}
|
193
|
-
};
|
194
|
-
|
195
|
-
/** @public
|
196
|
-
* @return {string} alignment Alignment can be "left", "center", "right"
|
197
|
-
*/
|
198
|
-
PercentBarRenderer.prototype.getAlignment = function() {
|
199
|
-
return this._alignment;
|
200
|
-
};
|
201
|
-
/** @public
|
202
|
-
* @return {boolean}
|
203
|
-
*/
|
204
|
-
PercentBarRenderer.prototype.isMovementColorUsed = function() {
|
205
|
-
return this._movementColorUsed;
|
206
|
-
};
|
207
|
-
/** @public
|
208
|
-
* @return {boolean}
|
209
|
-
*/
|
210
|
-
PercentBarRenderer.prototype.isTextHidden = function() {
|
211
|
-
return this._textHidden;
|
212
|
-
};
|
213
|
-
|
214
|
-
/** @public
|
215
|
-
* @return {boolean}
|
216
|
-
*/
|
217
|
-
PercentBarRenderer.prototype.startTextAutoResizing = function() {
|
218
|
-
if(this._txtResizing) {
|
219
|
-
return false;
|
220
|
-
}
|
221
|
-
if(this._textHidden) {
|
222
|
-
return false;
|
223
|
-
}
|
224
|
-
if(this._alignment !== "left" && this._alignment !== "right") {
|
225
|
-
return false;
|
226
|
-
}
|
227
|
-
this._txtResizing = true;
|
228
|
-
return true;
|
229
|
-
};
|
230
|
-
/** @public
|
231
|
-
* @param {number=} widthLimit
|
232
|
-
* @param {boolean=} opt_resetToDefaultWidth
|
233
|
-
* @param {Array.<PercentBar>=} opt_pbs
|
234
|
-
*/
|
235
|
-
PercentBarRenderer.prototype.endTextAutoResizing = function(widthLimit, opt_resetToDefaultWidth, opt_pbs) {
|
236
|
-
if(this._txtResizing) {
|
237
|
-
this._txtResizing = false;
|
238
|
-
if(typeof widthLimit == "number" && this._maxTextWidth + 8 >= widthLimit) {
|
239
|
-
this.setTextWidth(0, opt_pbs);
|
240
|
-
} else if(this._maxTextWidth === this._maxTextWidth) {
|
241
|
-
this.setTextWidth(this._maxTextWidth + 8, opt_pbs); // 8 is padding
|
242
|
-
}
|
243
|
-
}
|
244
|
-
|
245
|
-
if(opt_resetToDefaultWidth) {
|
246
|
-
this._maxTextWidth = NaN;
|
247
|
-
}
|
248
|
-
};
|
249
|
-
//#endregion Public Methods
|
250
|
-
|
251
|
-
//#region Private Methods
|
252
|
-
|
253
|
-
//#endregion Private Methods
|
254
|
-
|
255
|
-
//#region Private Members
|
256
|
-
|
257
|
-
|
258
|
-
/** @private
|
259
|
-
* @type {Array.<PercentBar>}
|
260
|
-
*/
|
261
|
-
PercentBarRenderer.prototype._pbs = null;
|
262
|
-
|
263
|
-
/**
|
264
|
-
* @type {Object}
|
265
|
-
* @private
|
266
|
-
*/
|
267
|
-
PercentBarRenderer.prototype._movementColor = null;
|
268
|
-
/**
|
269
|
-
* @type {boolean}
|
270
|
-
* @private
|
271
|
-
*/
|
272
|
-
PercentBarRenderer.prototype._movementColorUsed = true;
|
273
|
-
/**
|
274
|
-
* @type {string}
|
275
|
-
* @private
|
276
|
-
*/
|
277
|
-
PercentBarRenderer.prototype._trackColor = "";
|
278
|
-
/**
|
279
|
-
* @type {boolean}
|
280
|
-
* @private
|
281
|
-
*/
|
282
|
-
PercentBarRenderer.prototype._textHidden = false;
|
283
|
-
/**
|
284
|
-
* @type {string}
|
285
|
-
* @private
|
286
|
-
*/
|
287
|
-
PercentBarRenderer.prototype._textWidth = "";
|
288
|
-
/**
|
289
|
-
* @type {string}
|
290
|
-
* @private
|
291
|
-
*/
|
292
|
-
PercentBarRenderer.prototype._alignment = "";
|
293
|
-
|
294
|
-
/**
|
295
|
-
* @type {boolean}
|
296
|
-
* @private
|
297
|
-
*/
|
298
|
-
PercentBarRenderer.prototype._txtResizing = false;
|
299
|
-
/**
|
300
|
-
* @type {number}
|
301
|
-
* @private
|
302
|
-
*/
|
303
|
-
PercentBarRenderer.prototype._maxTextWidth = NaN;
|
304
|
-
|
305
|
-
/**
|
306
|
-
* @type {boolean}
|
307
|
-
* @private
|
308
|
-
*/
|
309
|
-
PercentBarRenderer.prototype._tooltipEnabled = true;
|
310
|
-
|
311
|
-
//#endregion Private Members
|
312
|
-
|
313
|
-
PercentBarRenderer._proto = PercentBarRenderer.prototype;
|
314
|
-
|
315
|
-
export default PercentBarRenderer;
|
316
|
-
export { PercentBarRenderer };
|
@@ -1,25 +0,0 @@
|
|
1
|
-
import Ext from "../../../../tr-grid-util/es6/Ext.js";
|
2
|
-
import Util from "../util/util.js";
|
3
|
-
import ElementFrameWork from "./ElementFrameWork.js";
|
4
|
-
import ElementWrapper from "../components/ElementWrapper.js";
|
5
|
-
|
6
|
-
declare class RangeBar extends ElementWrapper {
|
7
|
-
|
8
|
-
constructor(opt_element?: Element|null);
|
9
|
-
|
10
|
-
public static getControl(obj: any): RangeBar|null;
|
11
|
-
|
12
|
-
public getPercent(): number;
|
13
|
-
|
14
|
-
public setLowValue(lowVal: number): void;
|
15
|
-
|
16
|
-
public setLastValue(lastVal: number): void;
|
17
|
-
|
18
|
-
public setHighValue(highVal: number): void;
|
19
|
-
|
20
|
-
public setLowLastHigh(lowVal: number, lastVal: number, highVal: number, opt_values?: any): void;
|
21
|
-
|
22
|
-
}
|
23
|
-
|
24
|
-
export default RangeBar;
|
25
|
-
export { RangeBar };
|
@@ -1,255 +0,0 @@
|
|
1
|
-
/* eslint-disable */
|
2
|
-
import Ext from "../../../../tr-grid-util/es6/Ext.js";
|
3
|
-
import Util from "../util/util.js";
|
4
|
-
import ElementFrameWork from "./ElementFrameWork.js";
|
5
|
-
import ElementWrapper from "../components/ElementWrapper.js";
|
6
|
-
/* eslint-enable */
|
7
|
-
|
8
|
-
/**
|
9
|
-
* @constructor
|
10
|
-
* @extends {ElementWrapper}
|
11
|
-
* @param {Element=} opt_element
|
12
|
-
*/
|
13
|
-
var RangeBar = function (opt_element) {
|
14
|
-
this._element = opt_element ? opt_element : document.createElement("div");
|
15
|
-
this._element.className = "tr-range-bar";
|
16
|
-
this._scalebar = ElementFrameWork.createRangeBar();
|
17
|
-
this._na = document.createElement('span');
|
18
|
-
this._na.textContent = "N/A";
|
19
|
-
|
20
|
-
this._na.className = "tr-range-bar-na";
|
21
|
-
|
22
|
-
this._scalebar.setSliderWidth(3);
|
23
|
-
|
24
|
-
var element = this._element;
|
25
|
-
element["_rangeBar"] = this;
|
26
|
-
element.appendChild(this._na);
|
27
|
-
element.appendChild(this._scalebar);
|
28
|
-
};
|
29
|
-
|
30
|
-
Ext.inherits(RangeBar, ElementWrapper);
|
31
|
-
|
32
|
-
/** Retrieve Rangebar control from an element
|
33
|
-
* @public
|
34
|
-
* @function
|
35
|
-
* @param {*} obj
|
36
|
-
* @return {RangeBar}
|
37
|
-
*/
|
38
|
-
RangeBar.getControl = function (obj) {
|
39
|
-
if (obj) {
|
40
|
-
return obj["_rangeBar"] || null;
|
41
|
-
}
|
42
|
-
|
43
|
-
return null;
|
44
|
-
};
|
45
|
-
|
46
|
-
/**
|
47
|
-
* @public
|
48
|
-
* @param {number} lowVal
|
49
|
-
* @param {number} lastVal
|
50
|
-
* @param {number} highVal
|
51
|
-
* @return {number}
|
52
|
-
*/
|
53
|
-
RangeBar.calculatePercent = Util.calculatePercent;
|
54
|
-
|
55
|
-
/**
|
56
|
-
* @public
|
57
|
-
* @return {number} // Percent can be NaN
|
58
|
-
*/
|
59
|
-
RangeBar.prototype.getPercent = function () {
|
60
|
-
return this._percent;
|
61
|
-
};
|
62
|
-
|
63
|
-
/**
|
64
|
-
* @public
|
65
|
-
* @param {number} lowVal
|
66
|
-
|
67
|
-
*/
|
68
|
-
RangeBar.prototype.setLowValue = function (lowVal) {
|
69
|
-
if (this._lowVal === lowVal) {
|
70
|
-
return;
|
71
|
-
}
|
72
|
-
this._lowVal = lowVal;
|
73
|
-
this._updateRangeBar();
|
74
|
-
};
|
75
|
-
|
76
|
-
/**
|
77
|
-
* @public
|
78
|
-
* @param {number} lastVal
|
79
|
-
*/
|
80
|
-
RangeBar.prototype.setLastValue = function (lastVal) {
|
81
|
-
if (this._lastVal === lastVal) {
|
82
|
-
return;
|
83
|
-
}
|
84
|
-
this._lastVal = lastVal;
|
85
|
-
this._updateRangeBar();
|
86
|
-
};
|
87
|
-
|
88
|
-
/**
|
89
|
-
* @public
|
90
|
-
* @param {number} highVal
|
91
|
-
*/
|
92
|
-
RangeBar.prototype.setHighValue = function (highVal) {
|
93
|
-
if (this._highVal === highVal) {
|
94
|
-
return;
|
95
|
-
}
|
96
|
-
|
97
|
-
this._highVal = highVal;
|
98
|
-
this._updateRangeBar();
|
99
|
-
};
|
100
|
-
|
101
|
-
/** Get value of RangeBar
|
102
|
-
* @public
|
103
|
-
* @param {number} lowVal
|
104
|
-
* @param {number} lastVal
|
105
|
-
* @param {number} highVal
|
106
|
-
* @param {{ffLowVal: string, ffLastVal: string, ffHighVal: string, isEmptyCell: boolean}=} opt_values
|
107
|
-
*/
|
108
|
-
RangeBar.prototype.setLowLastHigh = function (lowVal, lastVal, highVal, opt_values) {
|
109
|
-
if (this._lowVal === lowVal &&
|
110
|
-
this._lastVal === lastVal &&
|
111
|
-
this._highVal === highVal &&
|
112
|
-
this._isEmptyCell === (opt_values && opt_values.isEmptyCell)) {
|
113
|
-
return;
|
114
|
-
}
|
115
|
-
|
116
|
-
this._lowVal = lowVal;
|
117
|
-
this._lastVal = lastVal;
|
118
|
-
this._highVal = highVal;
|
119
|
-
|
120
|
-
if (opt_values) {
|
121
|
-
this._opt_ffLowVal = opt_values.ffLowVal;
|
122
|
-
this._opt_ffLastVal = opt_values.ffLastVal;
|
123
|
-
this._opt_ffHighVal = opt_values.ffHighVal;
|
124
|
-
this._isEmptyCell = opt_values.isEmptyCell;
|
125
|
-
} else {
|
126
|
-
this._opt_ffLowVal = "0";
|
127
|
-
this._opt_ffLastVal = "0";
|
128
|
-
this._opt_ffHighVal = "0";
|
129
|
-
// eslint-disable-next-line
|
130
|
-
this._isEmptyCell = undefined;
|
131
|
-
}
|
132
|
-
|
133
|
-
this._updateRangeBar();
|
134
|
-
};
|
135
|
-
|
136
|
-
/**
|
137
|
-
* @private
|
138
|
-
*/
|
139
|
-
RangeBar.prototype._updateRangeBar = function () {
|
140
|
-
var DISPLAY_NA = 1;
|
141
|
-
var DISPLAY_EMPTY = 2;
|
142
|
-
var invalidVal = 0;
|
143
|
-
|
144
|
-
this._percent = Util.calculatePercent(this._lowVal, this._lastVal, this._highVal);
|
145
|
-
|
146
|
-
if (this._percent === this._percent) {
|
147
|
-
this._scalebar.updateScale(this._percent, this._lowVal, this._lastVal, this._highVal);
|
148
|
-
this._scalebar["title"] = this._calculateTooltip();
|
149
|
-
} else {
|
150
|
-
if (this._isEmptyCell != null) {
|
151
|
-
invalidVal = this._isEmptyCell ? DISPLAY_EMPTY : DISPLAY_NA;
|
152
|
-
} else {
|
153
|
-
if (this._lowVal != null || this._lastVal != null || this._highVal != null) {
|
154
|
-
invalidVal = DISPLAY_NA;
|
155
|
-
} else {
|
156
|
-
invalidVal = DISPLAY_EMPTY;
|
157
|
-
}
|
158
|
-
}
|
159
|
-
}
|
160
|
-
|
161
|
-
if (this._invalidValue !== invalidVal) {
|
162
|
-
this._invalidValue = invalidVal;
|
163
|
-
if (this._invalidValue > 1) {
|
164
|
-
this.hide();
|
165
|
-
} else {
|
166
|
-
this._na.title = this._calculateTooltip();
|
167
|
-
this.enableClass("na-value", this._invalidValue === DISPLAY_NA);
|
168
|
-
this.show();
|
169
|
-
}
|
170
|
-
}
|
171
|
-
};
|
172
|
-
|
173
|
-
/**
|
174
|
-
* @private
|
175
|
-
* @param {number} val
|
176
|
-
* @param {string|undefined} ff
|
177
|
-
* @return {number|string}
|
178
|
-
*/
|
179
|
-
RangeBar.prototype._getRenderValue = function (val, ff) {
|
180
|
-
var DOUBLE_DASH = "--";
|
181
|
-
|
182
|
-
if (ff == null && val === 0) { // +0 case
|
183
|
-
return DOUBLE_DASH;
|
184
|
-
}
|
185
|
-
|
186
|
-
return Util.isEmpty(val) ? DOUBLE_DASH : val;
|
187
|
-
};
|
188
|
-
|
189
|
-
/**
|
190
|
-
* @private
|
191
|
-
* @return {string}
|
192
|
-
*/
|
193
|
-
RangeBar.prototype._calculateTooltip = function () {
|
194
|
-
var tooltipLinebreakChar = " "; // Util.getTooltipLinebreakChar();
|
195
|
-
var renderLowVal = this._getRenderValue(this._lowVal, this._opt_ffLowVal);
|
196
|
-
var renderLastVal = this._getRenderValue(this._lastVal, this._opt_ffLastVal);
|
197
|
-
var renderHighVal = this._getRenderValue(this._highVal, this._opt_ffHighVal);
|
198
|
-
|
199
|
-
return "Low: " + renderLowVal + tooltipLinebreakChar + "Last: " + renderLastVal + tooltipLinebreakChar + "High: " + renderHighVal;
|
200
|
-
};
|
201
|
-
|
202
|
-
/** @private
|
203
|
-
* @type {Element}
|
204
|
-
*/
|
205
|
-
RangeBar.prototype._scalebar = null;
|
206
|
-
|
207
|
-
/** @private
|
208
|
-
* @type {Element}
|
209
|
-
*/
|
210
|
-
RangeBar.prototype._slider = null;
|
211
|
-
|
212
|
-
/** @private
|
213
|
-
* @type {number}
|
214
|
-
*/
|
215
|
-
RangeBar.prototype._lowVal = 0;
|
216
|
-
|
217
|
-
/** @private
|
218
|
-
* @type {number}
|
219
|
-
*/
|
220
|
-
RangeBar.prototype._lastVal = 0;
|
221
|
-
|
222
|
-
/** @private
|
223
|
-
* @type {number}
|
224
|
-
*/
|
225
|
-
RangeBar.prototype._highVal = 0;
|
226
|
-
|
227
|
-
/** @private
|
228
|
-
* @type {string|undefined}
|
229
|
-
*/
|
230
|
-
RangeBar.prototype._opt_ffLowVal = "0";
|
231
|
-
|
232
|
-
/** @private
|
233
|
-
* @type {string|undefined}
|
234
|
-
*/
|
235
|
-
RangeBar.prototype._opt_ffLastVal = "0";
|
236
|
-
|
237
|
-
/** @private
|
238
|
-
* @type {string|undefined}
|
239
|
-
*/
|
240
|
-
RangeBar.prototype._opt_ffHighVal = "0";
|
241
|
-
|
242
|
-
/** @private
|
243
|
-
* @type {number}
|
244
|
-
*/
|
245
|
-
RangeBar.prototype._percent = 0;
|
246
|
-
|
247
|
-
/** @private
|
248
|
-
* @type {number}
|
249
|
-
*/
|
250
|
-
RangeBar.prototype._invalidValue = 0;
|
251
|
-
|
252
|
-
RangeBar._proto = RangeBar.prototype;
|
253
|
-
|
254
|
-
export default RangeBar;
|
255
|
-
export { RangeBar };
|
@@ -1,18 +0,0 @@
|
|
1
|
-
import Util from "./util.js";
|
2
|
-
|
3
|
-
declare namespace ElementFrameWork {
|
4
|
-
|
5
|
-
function setElfv3(): void;
|
6
|
-
|
7
|
-
function isElfv3(): boolean;
|
8
|
-
|
9
|
-
function createIcon(iconName: string): Element|null;
|
10
|
-
|
11
|
-
function createIconButton(iconName: string): Element|null;
|
12
|
-
|
13
|
-
function createRangeBar(): Element|null;
|
14
|
-
|
15
|
-
}
|
16
|
-
|
17
|
-
export { ElementFrameWork };
|
18
|
-
export default ElementFrameWork;
|
@@ -1,53 +0,0 @@
|
|
1
|
-
import EventDispatcher from "../event/EventDispatcher.js";
|
2
|
-
import Ext from "../../../../../tr-grid-util/es6/Ext.js";
|
3
|
-
|
4
|
-
declare class HttpRequest extends EventDispatcher {
|
5
|
-
|
6
|
-
constructor(url: string, payload?: any|string|null, opt_serviceName?: string|null);
|
7
|
-
|
8
|
-
public static readonly defaultTimeout: number;
|
9
|
-
|
10
|
-
public getUrl(): string;
|
11
|
-
|
12
|
-
public getType(): string;
|
13
|
-
|
14
|
-
public getPayload(): any;
|
15
|
-
|
16
|
-
public getPayloadText(): string;
|
17
|
-
|
18
|
-
public getState(): string;
|
19
|
-
|
20
|
-
public getResponse(): any|string|null;
|
21
|
-
|
22
|
-
public getResponseText(): string;
|
23
|
-
|
24
|
-
public getResponseStatus(): number;
|
25
|
-
|
26
|
-
public setResponseType(dataType: string): void;
|
27
|
-
|
28
|
-
public setRequestTimeout(timeout: number): void;
|
29
|
-
|
30
|
-
public valueOf(): any|string|null;
|
31
|
-
|
32
|
-
public toString(): string;
|
33
|
-
|
34
|
-
public log(): void;
|
35
|
-
|
36
|
-
public send(opt_requestedHeaders?: { [key: string]: string }|null): HttpRequest;
|
37
|
-
|
38
|
-
public abort(): void;
|
39
|
-
|
40
|
-
public then(onFulfilled: ((...params: any[]) => any)|null, onRejected?: ((...params: any[]) => any)|null): HttpRequest;
|
41
|
-
|
42
|
-
public catch(onRejected: ((...params: any[]) => any)|null): HttpRequest;
|
43
|
-
|
44
|
-
public reject(reason?: any): HttpRequest;
|
45
|
-
|
46
|
-
public loadFile(): HttpRequest;
|
47
|
-
|
48
|
-
public loadText(): HttpRequest;
|
49
|
-
|
50
|
-
}
|
51
|
-
|
52
|
-
export default HttpRequest;
|
53
|
-
export { HttpRequest };
|
@@ -1,43 +0,0 @@
|
|
1
|
-
import Ext from "../../../../../tr-grid-util/es6/Ext.js";
|
2
|
-
import ElementWrapper from "../components/ElementWrapper.js";
|
3
|
-
|
4
|
-
declare class PercentBar extends ElementWrapper {
|
5
|
-
|
6
|
-
constructor(opt_element?: Element|null);
|
7
|
-
|
8
|
-
public getValue(): number;
|
9
|
-
|
10
|
-
public getPercent(): number;
|
11
|
-
|
12
|
-
public setValue(value: number|string|null, opt_max?: number|null, opt_displayText?: string|null): void;
|
13
|
-
|
14
|
-
public setMax(absVal: number): void;
|
15
|
-
|
16
|
-
public setText(txt: string): void;
|
17
|
-
|
18
|
-
public hideText(opt_hiden?: boolean|null): void;
|
19
|
-
|
20
|
-
public isTextHidden(): boolean;
|
21
|
-
|
22
|
-
public setTextWidth(width: number|string|null): void;
|
23
|
-
|
24
|
-
public setMaxTextLength(width: number|string|null): void;
|
25
|
-
|
26
|
-
public getTextScrollWidth(): number;
|
27
|
-
|
28
|
-
public getAlignment(): string;
|
29
|
-
|
30
|
-
public setAlignment(alignment: string): void;
|
31
|
-
|
32
|
-
public setMovementColor(colorObject?: any): void;
|
33
|
-
|
34
|
-
public useMovementColor(opt_enabled?: boolean|null): void;
|
35
|
-
|
36
|
-
public setTrackColor(color?: string|null): void;
|
37
|
-
|
38
|
-
public enableTooltip(opt_enabled?: boolean|null): void;
|
39
|
-
|
40
|
-
}
|
41
|
-
|
42
|
-
export default PercentBar;
|
43
|
-
export { PercentBar };
|