@refinitiv-ui/efx-grid 6.0.91 → 6.0.93
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/column-dragging/es6/ColumnDragging.d.ts +1 -1
- package/lib/column-dragging/es6/ColumnDragging.js +144 -34
- package/lib/core/dist/core.js +2410 -2621
- 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 +3 -1
- package/lib/core/es6/data/DataTable.js +208 -190
- package/lib/core/es6/data/DataView.d.ts +1 -1
- package/lib/core/es6/data/DataView.js +291 -291
- package/lib/core/es6/data/Segment.js +79 -79
- package/lib/core/es6/data/SegmentCollection.js +81 -81
- 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/filter-dialog/lib/filter-dialog.js +1 -0
- 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-checkbox/es6/Checkbox.js +268 -268
- package/lib/tr-grid-column-grouping/es6/ColumnGrouping.d.ts +3 -2
- package/lib/tr-grid-column-grouping/es6/ColumnGrouping.js +60 -32
- package/lib/tr-grid-column-stack/es6/ColumnStack.js +279 -279
- package/lib/tr-grid-conditional-coloring/es6/ConditionalColoring.js +227 -207
- package/lib/tr-grid-in-cell-editing/es6/InCellEditing.js +11 -11
- package/lib/tr-grid-row-dragging/es6/RowDragging.d.ts +1 -2
- package/lib/tr-grid-row-dragging/es6/RowDragging.js +120 -121
- package/lib/tr-grid-util/es6/CellPainter.js +94 -104
- 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 +41 -41
- package/lib/tr-grid-util/es6/Deferred.js +5 -5
- package/lib/tr-grid-util/es6/Delay.d.ts +3 -3
- package/lib/tr-grid-util/es6/Delay.js +14 -3
- 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 -58
- 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 -87
- 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 +71 -80
- package/lib/tr-grid-util/es6/NumberFormatter.js +23 -23
- 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 +52 -52
- 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/types/es6/RowDragging.d.ts +1 -2
- package/lib/versions.json +12 -12
- 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
|
@@ -2,7 +2,7 @@ import { Ext } from "../../tr-grid-util/es6/Ext.js";
|
|
|
2
2
|
import { preventDefault } from "../../tr-grid-util/es6/EventDispatcher.js";
|
|
3
3
|
import { GridPlugin } from "../../tr-grid-util/es6/GridPlugin.js";
|
|
4
4
|
import { ElfUtil } from "../../tr-grid-util/es6/ElfUtil.js";
|
|
5
|
-
import { cloneObject } from "../../tr-grid-util/es6/Util.js";
|
|
5
|
+
import { cloneObject, deepEqual, injectCss, prettifyCss } from "../../tr-grid-util/es6/Util.js";
|
|
6
6
|
import { DragUI } from "../../tr-grid-util/es6/DragUI.js";
|
|
7
7
|
|
|
8
8
|
declare namespace ColumnDraggingPlugin {
|
|
@@ -2,7 +2,7 @@ import { Ext } from "../../tr-grid-util/es6/Ext.js";
|
|
|
2
2
|
import { cloneObject } from "../../tr-grid-util/es6/Util.js";
|
|
3
3
|
import { GridPlugin } from "../../tr-grid-util/es6/GridPlugin.js";
|
|
4
4
|
import { GroupDefinitions } from "../../tr-grid-util/es6/GroupDefinitions.js";
|
|
5
|
-
import { injectCss, prettifyCss } from "../../tr-grid-util/es6/Util.js";
|
|
5
|
+
import { injectCss, prettifyCss, deepEqual } from "../../tr-grid-util/es6/Util.js";
|
|
6
6
|
|
|
7
7
|
declare namespace ColumnGroupingPlugin {
|
|
8
8
|
|
|
@@ -39,6 +39,8 @@ declare class ColumnGroupingPlugin extends GridPlugin {
|
|
|
39
39
|
|
|
40
40
|
public renderGroups(): void;
|
|
41
41
|
|
|
42
|
+
public getMutualGroupId(colRefs: (string|number)[]|null): string;
|
|
43
|
+
|
|
42
44
|
public addColumnToGroup(column: any, groupId: string, colIndex: number): void;
|
|
43
45
|
|
|
44
46
|
public addGroup(groupDef: ColumnGroupingPlugin.GroupDefinition|null): string;
|
|
@@ -26,6 +26,8 @@ declare class DataTable extends DataCache {
|
|
|
26
26
|
|
|
27
27
|
public getPreviousData(rid: string, cid: string): { [key: string]: any };
|
|
28
28
|
|
|
29
|
+
public setRowData(rid: string, values?: { [key: string]: any }|null, eventArg?: any): boolean;
|
|
30
|
+
|
|
29
31
|
public setColumnData(cid: string, valueList: (any)[], opt_ridList?: (string)[]|null): void;
|
|
30
32
|
|
|
31
33
|
public setDataFromObjectMap(obj: { [key: string]: any }): void;
|
|
@@ -88,6 +90,8 @@ declare class DataTable extends DataCache {
|
|
|
88
90
|
|
|
89
91
|
public getSegment(rid: string): Segment|null;
|
|
90
92
|
|
|
93
|
+
public getSegmentParent(rid: string): Segment|null;
|
|
94
|
+
|
|
91
95
|
public getSegmentLevel(rid: string): number;
|
|
92
96
|
|
|
93
97
|
public getSegmentParentRowId(rid: string): string;
|
|
@@ -254,6 +254,8 @@ declare class DataView extends EventDispatcher {
|
|
|
254
254
|
|
|
255
255
|
public getSegment(rid: string): Segment|null;
|
|
256
256
|
|
|
257
|
+
public getSegmentParent(rid: string): Segment|null;
|
|
258
|
+
|
|
257
259
|
public getSegmentLevel(rid: string): number;
|
|
258
260
|
|
|
259
261
|
public getSegmentParentRowId(rid: string): string;
|
|
@@ -24,6 +24,8 @@ declare class SegmentCollection extends EventDispatcher {
|
|
|
24
24
|
|
|
25
25
|
public getSegment(rid: string): Segment|null;
|
|
26
26
|
|
|
27
|
+
public getSegmentParent(rid: string): Segment|null;
|
|
28
|
+
|
|
27
29
|
public getSegments(): { [key: string]: Segment }|null;
|
|
28
30
|
|
|
29
31
|
public getSegmentIds(): (string)[];
|
|
@@ -2,7 +2,6 @@ import Util from "./grid/util/util.js";
|
|
|
2
2
|
|
|
3
3
|
// Core
|
|
4
4
|
import EventDispatcher from "./grid/event/EventDispatcher.js";
|
|
5
|
-
import ElementFrameWork from "./grid/util/ElementFrameWork.js";
|
|
6
5
|
import ElementWrapper from "./grid/components/ElementWrapper.js";
|
|
7
6
|
import ILayoutGrid from "./grid/ILayoutGrid.js";
|
|
8
7
|
import LayoutGrid from "./grid/LayoutGrid.js";
|
|
@@ -44,7 +43,6 @@ export {
|
|
|
44
43
|
// Core
|
|
45
44
|
EventDispatcher,
|
|
46
45
|
ElementWrapper,
|
|
47
|
-
ElementFrameWork,
|
|
48
46
|
ILayoutGrid,
|
|
49
47
|
LayoutGrid,
|
|
50
48
|
Core,
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { Ext } from "../../tr-grid-util/es6/Ext.js";
|
|
2
|
-
import { cloneObject } from "../../tr-grid-util/es6/Util.js";
|
|
3
2
|
import { ElfUtil } from "../../tr-grid-util/es6/ElfUtil.js";
|
|
4
3
|
import { GridPlugin } from "../../tr-grid-util/es6/GridPlugin.js";
|
|
5
4
|
import Dom from "../../tr-grid-util/es6/Dom.js";
|
|
6
5
|
import { DragUI } from "../../tr-grid-util/es6/DragUI.js";
|
|
7
|
-
import { injectCss, prettifyCss } from "../../tr-grid-util/es6/Util.js";
|
|
6
|
+
import { cloneObject, injectCss, prettifyCss } from "../../tr-grid-util/es6/Util.js";
|
|
8
7
|
|
|
9
8
|
declare namespace RowDraggingPlugin {
|
|
10
9
|
|
package/lib/versions.json
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
{
|
|
2
|
-
"tr-grid-util": "1.3.
|
|
2
|
+
"tr-grid-util": "1.3.145",
|
|
3
3
|
"tr-grid-printer": "1.0.17",
|
|
4
|
-
"@grid/column-dragging": "1.0.
|
|
4
|
+
"@grid/column-dragging": "1.0.20",
|
|
5
5
|
"@grid/row-segmenting": "1.0.31",
|
|
6
6
|
"@grid/statistics-row": "1.0.17",
|
|
7
7
|
"@grid/zoom": "1.0.11",
|
|
8
8
|
"tr-grid-auto-tooltip": "1.1.6",
|
|
9
|
-
"tr-grid-cell-selection": "1.0.
|
|
10
|
-
"tr-grid-checkbox": "1.0.
|
|
9
|
+
"tr-grid-cell-selection": "1.0.36",
|
|
10
|
+
"tr-grid-checkbox": "1.0.66",
|
|
11
11
|
"tr-grid-column-fitter": "1.0.40",
|
|
12
|
-
"tr-grid-column-formatting": "0.9.
|
|
13
|
-
"tr-grid-column-grouping": "1.0.
|
|
12
|
+
"tr-grid-column-formatting": "0.9.36",
|
|
13
|
+
"tr-grid-column-grouping": "1.0.60",
|
|
14
14
|
"tr-grid-column-resizing": "1.0.28",
|
|
15
15
|
"tr-grid-column-selection": "1.0.33",
|
|
16
|
-
"tr-grid-column-stack": "1.0.
|
|
17
|
-
"tr-grid-conditional-coloring": "1.0.
|
|
16
|
+
"tr-grid-column-stack": "1.0.75",
|
|
17
|
+
"tr-grid-conditional-coloring": "1.0.70",
|
|
18
18
|
"tr-grid-content-wrap": "1.0.20",
|
|
19
19
|
"tr-grid-contextmenu": "1.0.41",
|
|
20
20
|
"tr-grid-filter-input": "0.9.39",
|
|
21
21
|
"tr-grid-heat-map": "1.0.29",
|
|
22
|
-
"tr-grid-in-cell-editing": "1.0.
|
|
22
|
+
"tr-grid-in-cell-editing": "1.0.83",
|
|
23
23
|
"tr-grid-pagination": "1.0.24",
|
|
24
24
|
"tr-grid-percent-bar": "1.0.24",
|
|
25
25
|
"tr-grid-range-bar": "2.0.8",
|
|
26
|
-
"tr-grid-row-dragging": "1.0.
|
|
27
|
-
"tr-grid-row-filtering": "1.0.
|
|
26
|
+
"tr-grid-row-dragging": "1.0.33",
|
|
27
|
+
"tr-grid-row-filtering": "1.0.72",
|
|
28
28
|
"tr-grid-row-grouping": "1.0.86",
|
|
29
29
|
"tr-grid-row-selection": "1.0.27",
|
|
30
30
|
"tr-grid-rowcoloring": "1.0.25",
|
|
@@ -32,6 +32,6 @@
|
|
|
32
32
|
"tr-grid-titlewrap": "1.0.22",
|
|
33
33
|
"@grid/formatters": "1.0.51",
|
|
34
34
|
"@grid/column-selection-dialog": "4.0.57",
|
|
35
|
-
"@grid/filter-dialog": "4.0.
|
|
35
|
+
"@grid/filter-dialog": "4.0.64",
|
|
36
36
|
"@grid/column-format-dialog": "4.0.45"
|
|
37
37
|
}
|
package/package.json
CHANGED
|
@@ -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,227 +0,0 @@
|
|
|
1
|
-
import Util from "./util.js";
|
|
2
|
-
|
|
3
|
-
/*
|
|
4
|
-
* Support for ELFv3
|
|
5
|
-
* https://elf.int.refinitiv.com/index.html
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* @namespace
|
|
10
|
-
*/
|
|
11
|
-
var ElementFrameWork = {};
|
|
12
|
-
|
|
13
|
-
/** @private
|
|
14
|
-
* @static
|
|
15
|
-
* @description True if the app uses ELFv3, false otherwise
|
|
16
|
-
* @type {boolean}
|
|
17
|
-
*/
|
|
18
|
-
ElementFrameWork._isElfv3 = false;
|
|
19
|
-
|
|
20
|
-
/** @public
|
|
21
|
-
* @description Enable the ELFv3 mode
|
|
22
|
-
*/
|
|
23
|
-
ElementFrameWork.setElfv3 = function() {
|
|
24
|
-
ElementFrameWork._isElfv3 = true;
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
/** @public
|
|
28
|
-
* @description Indicate is the app uses ELFv3
|
|
29
|
-
* @returns {boolean} True if the app uses ELFv3, false otherwise
|
|
30
|
-
*/
|
|
31
|
-
ElementFrameWork.isElfv3 = function() {
|
|
32
|
-
return ElementFrameWork._isElfv3;
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
/** @public
|
|
36
|
-
* @description Create a icon span
|
|
37
|
-
* @param {string} iconName
|
|
38
|
-
* @returns {Element} The created element
|
|
39
|
-
*/
|
|
40
|
-
ElementFrameWork.createIcon = function(iconName) {
|
|
41
|
-
var element;
|
|
42
|
-
|
|
43
|
-
if (ElementFrameWork._isElfv3) {
|
|
44
|
-
element = document.createElement("ef-icon");
|
|
45
|
-
element.setAttribute("icon", iconName);
|
|
46
|
-
} else {
|
|
47
|
-
element = document.createElement("span");
|
|
48
|
-
element.classList.add("icon-" + iconName);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
return element;
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
/** @public
|
|
55
|
-
* @description Create a icon button
|
|
56
|
-
* @param {string} iconName
|
|
57
|
-
* @returns {Element} The created element
|
|
58
|
-
*/
|
|
59
|
-
ElementFrameWork.createIconButton = function(iconName) {
|
|
60
|
-
var element;
|
|
61
|
-
|
|
62
|
-
if (ElementFrameWork._isElfv3) {
|
|
63
|
-
element = document.createElement("ef-button");
|
|
64
|
-
element.setAttribute("icon", iconName);
|
|
65
|
-
} else {
|
|
66
|
-
element = document.createElement("button");
|
|
67
|
-
element.classList.add("icon-" + iconName);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
return element;
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
/** @public
|
|
74
|
-
* @description Create range bar
|
|
75
|
-
* @returns {Element} The created element
|
|
76
|
-
*/
|
|
77
|
-
ElementFrameWork.createRangeBar = function() {
|
|
78
|
-
var _slider;
|
|
79
|
-
var scalebar = document.createElement("div");
|
|
80
|
-
|
|
81
|
-
if (ElementFrameWork._isElfv3) {
|
|
82
|
-
scalebar.className = "tr-range-bar-wrapper";
|
|
83
|
-
_slider = document.createElement("ef-led-gauge");
|
|
84
|
-
_slider.setAttribute("neutral-color", "");
|
|
85
|
-
_slider.setAttribute("top-value", "0.00");
|
|
86
|
-
} else {
|
|
87
|
-
scalebar.className = "tr-range-bar-scale";
|
|
88
|
-
_slider = document.createElement("div");
|
|
89
|
-
_slider.className = "tr-range-bar-slider";
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
_slider.classList.add("tr-range-slider");
|
|
93
|
-
scalebar.appendChild(_slider);
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* @private
|
|
97
|
-
* @param {number} lowValue
|
|
98
|
-
* @param {number} lastValue
|
|
99
|
-
* @param {number} highValue
|
|
100
|
-
* @returns {{sliderValue: number, rangeValue: (null|string)}}
|
|
101
|
-
*/
|
|
102
|
-
scalebar._calculateScaleParams = function (lowValue, lastValue, highValue) {
|
|
103
|
-
var sliderValue;
|
|
104
|
-
var rightSegmentValue;
|
|
105
|
-
var leftSegmentValue;
|
|
106
|
-
var rangeValue = null;
|
|
107
|
-
|
|
108
|
-
if (lowValue === highValue) {
|
|
109
|
-
if (lastValue === highValue) {
|
|
110
|
-
sliderValue = 0;
|
|
111
|
-
} else if (lastValue > highValue) {
|
|
112
|
-
sliderValue = 100;
|
|
113
|
-
} else {
|
|
114
|
-
sliderValue = -100;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
return {
|
|
118
|
-
"sliderValue": sliderValue,
|
|
119
|
-
"rangeValue": "[-100,100]"
|
|
120
|
-
};
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
if (lowValue === lastValue) {
|
|
124
|
-
return {
|
|
125
|
-
"sliderValue": -100,
|
|
126
|
-
"rangeValue": rangeValue
|
|
127
|
-
};
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
if (lastValue === highValue) {
|
|
131
|
-
return {
|
|
132
|
-
"sliderValue": 100,
|
|
133
|
-
"rangeValue": rangeValue
|
|
134
|
-
};
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
if (lowValue > highValue) {
|
|
138
|
-
if (lastValue > lowValue) {
|
|
139
|
-
rightSegmentValue = Util.calculatePercent(highValue, lastValue - lowValue, lowValue) * 2 - 100;
|
|
140
|
-
|
|
141
|
-
sliderValue = -100;
|
|
142
|
-
rangeValue = "[-100," + rightSegmentValue + "]";
|
|
143
|
-
} else if(lastValue < highValue) {
|
|
144
|
-
leftSegmentValue = Util.calculatePercent(highValue, lowValue - lastValue, lowValue) * 2 - 100;
|
|
145
|
-
|
|
146
|
-
sliderValue = 100;
|
|
147
|
-
rangeValue = "[" + leftSegmentValue + ",100]";
|
|
148
|
-
} else {
|
|
149
|
-
sliderValue = Util.calculatePercent(highValue, lastValue, lowValue) * 2 - 100;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
return {
|
|
153
|
-
"sliderValue": sliderValue,
|
|
154
|
-
"rangeValue": rangeValue
|
|
155
|
-
};
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
if (lastValue > highValue) {
|
|
159
|
-
leftSegmentValue = Util.calculatePercent(lowValue, 2 * highValue - lastValue, highValue) * 2 - 100;
|
|
160
|
-
|
|
161
|
-
return {
|
|
162
|
-
"sliderValue": 100,
|
|
163
|
-
"rangeValue": "[" + leftSegmentValue + ",100]"
|
|
164
|
-
};
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
if (lastValue < lowValue) {
|
|
168
|
-
rightSegmentValue = Util.calculatePercent(lowValue, 2 * lowValue - lastValue, highValue) * 2 - 100;
|
|
169
|
-
|
|
170
|
-
return {
|
|
171
|
-
"sliderValue": -100,
|
|
172
|
-
"rangeValue": "[-100," + rightSegmentValue + "]"
|
|
173
|
-
};
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
return {
|
|
177
|
-
"sliderValue": Util.calculatePercent(lowValue, lastValue, highValue) * 2 - 100,
|
|
178
|
-
"rangeValue": rangeValue
|
|
179
|
-
};
|
|
180
|
-
};
|
|
181
|
-
|
|
182
|
-
scalebar._getSliderInstance = function () {
|
|
183
|
-
return _slider;
|
|
184
|
-
};
|
|
185
|
-
|
|
186
|
-
/**
|
|
187
|
-
* @param {number} percent
|
|
188
|
-
* @param {number} lowValue
|
|
189
|
-
* @param {number} lastValue
|
|
190
|
-
* @param {number} highValue
|
|
191
|
-
*/
|
|
192
|
-
scalebar.updateScale = function (percent, lowValue, lastValue, highValue) {
|
|
193
|
-
var sliderParams;
|
|
194
|
-
var sliderInstance = scalebar._getSliderInstance();
|
|
195
|
-
|
|
196
|
-
if (!ElementFrameWork._isElfv3) {
|
|
197
|
-
sliderInstance.style.left = percent + "%";
|
|
198
|
-
|
|
199
|
-
return;
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
sliderParams = scalebar._calculateScaleParams(lowValue, lastValue, highValue);
|
|
203
|
-
sliderInstance.setAttribute("top-value", sliderParams["sliderValue"].toString());
|
|
204
|
-
|
|
205
|
-
if (!sliderParams["rangeValue"]) {
|
|
206
|
-
sliderInstance.removeAttribute("range");
|
|
207
|
-
|
|
208
|
-
return;
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
sliderInstance.setAttribute("range", sliderParams["rangeValue"]);
|
|
212
|
-
};
|
|
213
|
-
|
|
214
|
-
scalebar.setSliderWidth = function (val) {
|
|
215
|
-
var sliderWidth = (val > 0) ? val : 1;
|
|
216
|
-
|
|
217
|
-
if (!ElementFrameWork._isElfv3) {
|
|
218
|
-
scalebar.style.width = "calc(100% - " + sliderWidth + "px)";
|
|
219
|
-
scalebar._getSliderInstance().style.width = sliderWidth + "px";
|
|
220
|
-
}
|
|
221
|
-
};
|
|
222
|
-
|
|
223
|
-
return scalebar;
|
|
224
|
-
};
|
|
225
|
-
|
|
226
|
-
export { ElementFrameWork };
|
|
227
|
-
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 };
|