@refinitiv-ui/efx-grid 6.0.4 → 6.0.6
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 +13 -11
- package/lib/column-dragging/es6/ColumnDragging.js +21 -15
- package/lib/column-format-dialog/lib/column-format-dialog.d.ts +1 -1
- package/lib/column-format-dialog/lib/column-format-dialog.js +3 -4
- package/lib/column-format-dialog/lib/preview-table.js +3 -4
- package/lib/column-selection-dialog/lib/column-selection-dialog.d.ts +2 -2
- package/lib/column-selection-dialog/lib/column-selection-dialog.js +23 -7
- package/lib/core/dist/core.css +1 -1
- package/lib/core/dist/core.js +392 -230
- package/lib/core/dist/core.min.js +1 -1
- package/lib/core/es6/data/ColumnStats.d.ts +3 -3
- package/lib/core/es6/data/DataCache.d.ts +9 -9
- package/lib/core/es6/data/DataTable.d.ts +28 -28
- package/lib/core/es6/data/DataTable.js +33 -10
- package/lib/core/es6/data/DataView.d.ts +62 -62
- package/lib/core/es6/data/DataView.js +42 -22
- package/lib/core/es6/data/Segment.d.ts +4 -4
- package/lib/core/es6/data/SegmentCollection.d.ts +7 -7
- package/lib/core/es6/data/WrappedView.d.ts +62 -62
- package/lib/core/es6/grid/Core.d.ts +97 -95
- package/lib/core/es6/grid/Core.js +180 -26
- package/lib/core/es6/grid/ILayoutGrid.d.ts +20 -20
- package/lib/core/es6/grid/ILayoutGrid.js +2 -1
- package/lib/core/es6/grid/LayoutGrid.d.ts +2 -2
- package/lib/core/es6/grid/LayoutGrid.js +18 -10
- package/lib/core/es6/grid/VirtualizedLayoutGrid.d.ts +2 -2
- package/lib/core/es6/grid/VirtualizedLayoutGrid.js +14 -3
- package/lib/core/es6/grid/components/Cell.d.ts +6 -6
- package/lib/core/es6/grid/components/CellFloatingPanel.d.ts +2 -2
- package/lib/core/es6/grid/components/CellSpans.d.ts +2 -2
- package/lib/core/es6/grid/components/Column.d.ts +2 -2
- package/lib/core/es6/grid/components/ElementWrapper.d.ts +19 -19
- package/lib/core/es6/grid/components/Scrollbar.d.ts +11 -9
- package/lib/core/es6/grid/components/Scrollbar.js +13 -0
- package/lib/core/es6/grid/components/StretchedCells.js +12 -2
- package/lib/core/es6/grid/event/EventDispatcher.d.ts +3 -3
- package/lib/core/es6/grid/event/EventListeners.d.ts +5 -5
- package/lib/core/es6/grid/plugins/SortableTitlePlugin.d.ts +45 -44
- package/lib/core/es6/grid/plugins/SortableTitlePlugin.js +62 -65
- package/lib/core/es6/grid/util/Conflator.d.ts +4 -4
- package/lib/core/es6/grid/util/HttpRequest.d.ts +3 -3
- package/lib/core/es6/grid/util/PercentBar.d.ts +8 -8
- package/lib/core/es6/grid/util/PercentBarRenderer.d.ts +8 -8
- package/lib/core/es6/grid/util/RangeBar.d.ts +1 -1
- package/lib/core/es6/grid/util/RangeBar.js +1 -1
- package/lib/core/es6/grid/util/Reverter.d.ts +1 -1
- package/lib/core/es6/grid/util/SectionSettings.d.ts +13 -13
- package/lib/core/es6/grid/util/SelectionList.d.ts +2 -2
- package/lib/core/es6/grid/util/TrackLayout.d.ts +9 -9
- package/lib/core/es6/grid/util/Virtualizer.d.ts +3 -3
- package/lib/core/es6/grid/util/util.d.ts +6 -4
- package/lib/core/es6/grid/util/util.js +16 -91
- package/lib/core/es6/tr-grid-theme.js +1 -1
- package/lib/filter-dialog/lib/checkbox-list.d.ts +1 -1
- package/lib/filter-dialog/lib/filter-dialog.d.ts +1 -1
- package/lib/filter-dialog/lib/filter-dialog.js +27 -9
- package/lib/filter-dialog/themes/base-checkbox.less +0 -1
- package/lib/filter-dialog/themes/base.less +1 -1
- package/lib/filter-dialog/themes/elemental/dark/checkbox-list.js +1 -1
- package/lib/filter-dialog/themes/elemental/dark/es5/all-elements.js +2 -2
- package/lib/filter-dialog/themes/elemental/dark/filter-dialog.js +1 -1
- package/lib/filter-dialog/themes/elemental/light/checkbox-list.js +1 -1
- package/lib/filter-dialog/themes/elemental/light/es5/all-elements.js +2 -2
- package/lib/filter-dialog/themes/elemental/light/filter-dialog.js +1 -1
- package/lib/filter-dialog/themes/halo/dark/checkbox-list.js +1 -1
- package/lib/filter-dialog/themes/halo/dark/es5/all-elements.js +2 -2
- package/lib/filter-dialog/themes/halo/dark/filter-dialog.js +1 -1
- package/lib/filter-dialog/themes/halo/light/checkbox-list.js +1 -1
- package/lib/filter-dialog/themes/halo/light/es5/all-elements.js +2 -2
- package/lib/filter-dialog/themes/halo/light/filter-dialog.js +1 -1
- package/lib/filter-dialog/themes/solar/charcoal/checkbox-list.js +1 -1
- package/lib/filter-dialog/themes/solar/charcoal/es5/all-elements.js +2 -2
- package/lib/filter-dialog/themes/solar/charcoal/filter-dialog.js +1 -1
- package/lib/filter-dialog/themes/solar/pearl/checkbox-list.js +1 -1
- package/lib/filter-dialog/themes/solar/pearl/es5/all-elements.js +2 -2
- package/lib/filter-dialog/themes/solar/pearl/filter-dialog.js +1 -1
- package/lib/grid/index.js +1 -1
- package/lib/grid/lib/efx-grid.js +7 -44
- package/lib/grid/themes/halo/dark/efx-grid.js +1 -1
- package/lib/grid/themes/halo/dark/es5/all-elements.js +1 -1
- package/lib/grid/themes/halo/efx-grid.less +5 -5
- package/lib/grid/themes/halo/light/efx-grid.js +1 -1
- package/lib/grid/themes/halo/light/es5/all-elements.js +1 -1
- package/lib/row-segmenting/es6/RowSegmenting.d.ts +30 -24
- package/lib/row-segmenting/es6/RowSegmenting.js +122 -21
- package/lib/rt-grid/dist/rt-grid.js +1354 -435
- package/lib/rt-grid/dist/rt-grid.min.js +1 -1
- package/lib/rt-grid/es6/ColumnDefinition.d.ts +46 -42
- package/lib/rt-grid/es6/ColumnDefinition.js +31 -1
- package/lib/rt-grid/es6/DataConnector.d.ts +6 -4
- package/lib/rt-grid/es6/DataConnector.js +8 -0
- package/lib/rt-grid/es6/FieldDefinition.d.ts +2 -2
- package/lib/rt-grid/es6/FieldDefinition.js +12 -5
- package/lib/rt-grid/es6/Grid.d.ts +106 -91
- package/lib/rt-grid/es6/Grid.js +151 -106
- package/lib/rt-grid/es6/ReferenceCounter.d.ts +5 -5
- package/lib/rt-grid/es6/RowDefSorter.d.ts +2 -2
- package/lib/rt-grid/es6/RowDefinition.d.ts +22 -22
- package/lib/rt-grid/es6/RowDefinition.js +12 -5
- package/lib/rt-grid/es6/SnapshotFiller.d.ts +5 -2
- package/lib/rt-grid/es6/SnapshotFiller.js +121 -15
- package/lib/rt-grid/es6/StyleLoader.d.ts +1 -1
- package/lib/tr-grid-cell-selection/es6/CellSelection.d.ts +11 -11
- package/lib/tr-grid-cell-selection/es6/CellSelection.js +20 -35
- package/lib/tr-grid-checkbox/es6/Checkbox.d.ts +18 -16
- package/lib/tr-grid-checkbox/es6/Checkbox.js +1 -0
- package/lib/tr-grid-column-formatting/es6/ColumnFormatting.d.ts +29 -27
- package/lib/tr-grid-column-formatting/es6/ColumnFormatting.js +1 -0
- package/lib/tr-grid-column-grouping/es6/ColumnGrouping.d.ts +28 -14
- package/lib/tr-grid-column-grouping/es6/ColumnGrouping.js +556 -11
- package/lib/tr-grid-column-resizing/es6/ColumnResizing.d.ts +2 -2
- package/lib/tr-grid-column-resizing/es6/ColumnResizing.js +1 -0
- package/lib/tr-grid-column-selection/es6/ColumnSelection.js +2 -3
- package/lib/tr-grid-column-stack/es6/ColumnStack.d.ts +15 -13
- package/lib/tr-grid-column-stack/es6/ColumnStack.js +96 -72
- package/lib/tr-grid-conditional-coloring/es6/ConditionalColoring.d.ts +14 -4
- package/lib/tr-grid-conditional-coloring/es6/ConditionalColoring.js +314 -114
- package/lib/tr-grid-content-wrap/es6/ContentWrap.js +1 -6
- package/lib/tr-grid-contextmenu/es6/ContextMenu.js +3 -3
- package/lib/tr-grid-contextmenu/es6/MenuEventAPI.d.ts +2 -2
- package/lib/tr-grid-contextmenu/es6/MenuItem.d.ts +2 -2
- package/lib/tr-grid-heat-map/es6/HeatMap.d.ts +2 -1
- package/lib/tr-grid-heat-map/es6/HeatMap.js +6 -9
- package/lib/tr-grid-in-cell-editing/es6/InCellEditing.d.ts +5 -2
- package/lib/tr-grid-in-cell-editing/es6/InCellEditing.js +311 -71
- package/lib/tr-grid-percent-bar/es6/PercentBar.d.ts +1 -1
- package/lib/tr-grid-percent-bar/es6/PercentBar.js +8 -11
- package/lib/tr-grid-printer/es6/SectionWriter.js +8 -0
- package/lib/tr-grid-range-bar/es6/RangeBar.js +3 -10
- package/lib/tr-grid-row-dragging/es6/RowDragging.d.ts +6 -0
- package/lib/tr-grid-row-dragging/es6/RowDragging.js +56 -23
- package/lib/tr-grid-row-filtering/es6/RowFiltering.d.ts +4 -3
- package/lib/tr-grid-row-filtering/es6/RowFiltering.js +57 -13
- package/lib/tr-grid-row-grouping/es6/RowGrouping.js +1 -1
- package/lib/tr-grid-row-selection/es6/RowSelection.js +16 -13
- package/lib/tr-grid-rowcoloring/es6/RowColoring.d.ts +0 -2
- package/lib/tr-grid-rowcoloring/es6/RowColoring.js +1 -40
- package/lib/tr-grid-util/es6/CellPainter.d.ts +30 -30
- package/lib/tr-grid-util/es6/CellPainter.js +9 -8
- package/lib/tr-grid-util/es6/Conflator.d.ts +4 -4
- package/lib/tr-grid-util/es6/CoralItems.d.ts +1 -1
- package/lib/tr-grid-util/es6/DateTime.d.ts +10 -10
- package/lib/tr-grid-util/es6/Deferred.d.ts +3 -1
- package/lib/tr-grid-util/es6/Deferred.js +11 -1
- package/lib/tr-grid-util/es6/Delay.d.ts +2 -2
- package/lib/tr-grid-util/es6/Dom.d.ts +10 -10
- package/lib/tr-grid-util/es6/Dom.js +14 -10
- package/lib/tr-grid-util/es6/DragUI.js +5 -2
- package/lib/tr-grid-util/es6/ElementObserver.d.ts +2 -2
- package/lib/tr-grid-util/es6/ElementObserver.js +6 -3
- package/lib/tr-grid-util/es6/ElementWrapper.d.ts +4 -4
- package/lib/tr-grid-util/es6/ElfDate.d.ts +5 -5
- package/lib/tr-grid-util/es6/ElfDate.js +1 -0
- package/lib/tr-grid-util/es6/ElfUtil.d.ts +13 -4
- package/lib/tr-grid-util/es6/ElfUtil.js +178 -26
- package/lib/tr-grid-util/es6/EventDispatcher.d.ts +5 -5
- package/lib/tr-grid-util/es6/ExpanderIcon.d.ts +2 -2
- package/lib/tr-grid-util/es6/ExpanderIcon.js +1 -1
- package/lib/tr-grid-util/es6/Ext.d.ts +1 -1
- package/lib/tr-grid-util/es6/FieldFormatter.d.ts +12 -12
- package/lib/tr-grid-util/es6/FieldFormatter.js +1 -1
- package/lib/tr-grid-util/es6/FilterBuilder.d.ts +13 -13
- package/lib/tr-grid-util/es6/FilterBuilder.js +15 -8
- package/lib/tr-grid-util/es6/FilterOperators.d.ts +22 -22
- package/lib/tr-grid-util/es6/FilterOperators.js +3 -3
- package/lib/tr-grid-util/es6/GridPlugin.d.ts +10 -10
- package/lib/tr-grid-util/es6/GridPlugin.js +20 -0
- package/lib/tr-grid-util/es6/Icon.d.ts +3 -3
- package/lib/tr-grid-util/es6/MouseDownTrait.d.ts +8 -8
- package/lib/tr-grid-util/es6/MultiTableManager.d.ts +6 -6
- package/lib/tr-grid-util/es6/NumberFormatter.d.ts +19 -19
- package/lib/tr-grid-util/es6/NumberFormatter.js +1 -1
- package/lib/tr-grid-util/es6/PercentBar.d.ts +19 -19
- package/lib/tr-grid-util/es6/Perf.d.ts +4 -4
- package/lib/tr-grid-util/es6/Popup.d.ts +36 -33
- package/lib/tr-grid-util/es6/Popup.js +19 -1
- package/lib/tr-grid-util/es6/RangeBar.d.ts +5 -5
- package/lib/tr-grid-util/es6/RequestQueue.d.ts +4 -4
- package/lib/tr-grid-util/es6/RowPainter.d.ts +37 -4
- package/lib/tr-grid-util/es6/RowPainter.js +199 -76
- package/lib/tr-grid-util/es6/SubTable.d.ts +14 -14
- package/lib/tr-grid-util/es6/Table.d.ts +25 -25
- package/lib/tr-grid-util/es6/TextHighlighter.d.ts +1 -1
- package/lib/tr-grid-util/es6/Timer.d.ts +1 -1
- package/lib/tr-grid-util/es6/TouchProxy.d.ts +9 -9
- package/lib/tr-grid-util/es6/Util.d.ts +12 -12
- package/lib/tr-grid-util/es6/formula/ADCService.d.ts +1 -1
- package/lib/tr-grid-util/es6/formula/ADCSubscription.d.ts +1 -1
- package/lib/tr-grid-util/es6/formula/AdFinService.d.ts +1 -1
- package/lib/tr-grid-util/es6/formula/AdFinSubscription.d.ts +1 -1
- package/lib/tr-grid-util/es6/formula/Engine.d.ts +9 -9
- package/lib/tr-grid-util/es6/formula/Formula.d.ts +4 -4
- package/lib/tr-grid-util/es6/formula/IntervalSubscription.d.ts +1 -1
- package/lib/tr-grid-util/es6/formula/Realtime.d.ts +3 -3
- package/lib/tr-grid-util/es6/formula/RealtimeService.d.ts +1 -1
- package/lib/tr-grid-util/es6/formula/TSIService.d.ts +1 -1
- package/lib/tr-grid-util/es6/formula/TSISubscription.d.ts +1 -1
- package/lib/tr-grid-util/es6/formula/VariableToken.d.ts +1 -1
- package/lib/tr-grid-util/es6/jet/CollectionDict.d.ts +1 -1
- package/lib/tr-grid-util/es6/jet/DataGenerator.d.ts +34 -34
- package/lib/tr-grid-util/es6/jet/MockArchive.d.ts +1 -1
- package/lib/tr-grid-util/es6/jet/MockJET.d.ts +4 -4
- package/lib/tr-grid-util/es6/jet/MockJET.js +12 -4
- package/lib/tr-grid-util/es6/jet/MockQuotes.d.ts +9 -9
- package/lib/tr-grid-util/es6/jet/MockQuotes2.d.ts +17 -9
- package/lib/tr-grid-util/es6/jet/MockQuotes2.js +84 -24
- package/lib/tr-grid-util/es6/jet/MockRTK.d.ts +42 -2
- package/lib/tr-grid-util/es6/jet/MockRTK.js +55 -16
- package/lib/tr-grid-util/es6/jet/mockDataAPI.d.ts +2 -2
- package/lib/tr-grid-util/es6/jet/mockDataAPI.js +99 -1
- package/lib/types/es6/Checkbox.d.ts +18 -16
- package/lib/types/es6/ColumnFormatting.d.ts +29 -27
- package/lib/types/es6/ColumnGrouping.d.ts +28 -14
- package/lib/types/es6/ColumnResizing.d.ts +2 -2
- package/lib/types/es6/ColumnStack.d.ts +15 -13
- package/lib/types/es6/CompositeGrid/ColumnSelectionPlugin.d.ts +4 -2
- package/lib/types/es6/CompositeGrid/ColumnWidthAdjustingPlugin.d.ts +0 -1
- package/lib/types/es6/CompositeGrid/CompositeGrid.d.ts +1 -1
- package/lib/types/es6/CompositeGrid/DragAndDropTitlePlugin.d.ts +1 -1
- package/lib/types/es6/CompositeGrid/DraggableContentPlugin.d.ts +1 -5
- package/lib/types/es6/CompositeGrid/Plugin.d.ts +3 -1
- package/lib/types/es6/CompositeGrid/ResizableTitlePlugin.d.ts +2 -1
- package/lib/types/es6/CompositeGrid/RowSelectionPlugin.d.ts +2 -1
- package/lib/types/es6/CompositeGrid/TextWidthCalculator.d.ts +1 -1
- package/lib/types/es6/CompositeGrid/TreeIndentingPlugin.d.ts +0 -1
- package/lib/types/es6/ConditionalColoring.d.ts +14 -4
- package/lib/types/es6/Core/data/ColumnStats.d.ts +3 -3
- package/lib/types/es6/Core/data/DataCache.d.ts +9 -9
- package/lib/types/es6/Core/data/DataTable.d.ts +28 -28
- package/lib/types/es6/Core/data/DataView.d.ts +62 -62
- package/lib/types/es6/Core/data/Segment.d.ts +4 -4
- package/lib/types/es6/Core/data/SegmentCollection.d.ts +7 -7
- package/lib/types/es6/Core/data/WrappedView.d.ts +62 -62
- package/lib/types/es6/Core/grid/Core.d.ts +97 -95
- package/lib/types/es6/Core/grid/ILayoutGrid.d.ts +20 -20
- package/lib/types/es6/Core/grid/LayoutGrid.d.ts +2 -2
- package/lib/types/es6/Core/grid/VirtualizedLayoutGrid.d.ts +2 -2
- package/lib/types/es6/Core/grid/components/Cell.d.ts +6 -6
- package/lib/types/es6/Core/grid/components/CellFloatingPanel.d.ts +2 -2
- package/lib/types/es6/Core/grid/components/CellSpans.d.ts +2 -2
- package/lib/types/es6/Core/grid/components/Column.d.ts +2 -2
- package/lib/types/es6/Core/grid/components/ElementWrapper.d.ts +19 -19
- package/lib/types/es6/Core/grid/components/Scrollbar.d.ts +11 -9
- package/lib/types/es6/Core/grid/event/EventDispatcher.d.ts +3 -3
- package/lib/types/es6/Core/grid/event/EventListeners.d.ts +5 -5
- package/lib/types/es6/Core/grid/plugins/SortableTitlePlugin.d.ts +45 -44
- package/lib/types/es6/Core/grid/util/Conflator.d.ts +4 -4
- package/lib/types/es6/Core/grid/util/HttpRequest.d.ts +3 -3
- package/lib/types/es6/Core/grid/util/PercentBar.d.ts +8 -8
- package/lib/types/es6/Core/grid/util/PercentBarRenderer.d.ts +8 -8
- package/lib/types/es6/Core/grid/util/RangeBar.d.ts +1 -1
- package/lib/types/es6/Core/grid/util/Reverter.d.ts +1 -1
- package/lib/types/es6/Core/grid/util/SectionSettings.d.ts +13 -13
- package/lib/types/es6/Core/grid/util/SelectionList.d.ts +2 -2
- package/lib/types/es6/Core/grid/util/TrackLayout.d.ts +9 -9
- package/lib/types/es6/Core/grid/util/Virtualizer.d.ts +3 -3
- package/lib/types/es6/Core/grid/util/util.d.ts +6 -4
- package/lib/types/es6/HeatMap.d.ts +2 -1
- package/lib/types/es6/InCellEditing.d.ts +5 -2
- package/lib/types/es6/MenuEventAPI.d.ts +2 -2
- package/lib/types/es6/MenuItem.d.ts +2 -2
- package/lib/types/es6/PercentBar.d.ts +1 -1
- package/lib/types/es6/RealtimeGrid/ColumnDefinition.d.ts +46 -42
- package/lib/types/es6/RealtimeGrid/DataConnector.d.ts +6 -4
- package/lib/types/es6/RealtimeGrid/FieldDefinition.d.ts +2 -2
- package/lib/types/es6/RealtimeGrid/Grid.d.ts +104 -89
- package/lib/types/es6/RealtimeGrid/ReferenceCounter.d.ts +5 -5
- package/lib/types/es6/RealtimeGrid/RowDefSorter.d.ts +2 -2
- package/lib/types/es6/RealtimeGrid/RowDefinition.d.ts +22 -22
- package/lib/types/es6/RealtimeGrid/SnapshotFiller.d.ts +5 -2
- package/lib/types/es6/RealtimeGrid/StyleLoader.d.ts +1 -1
- package/lib/types/es6/RowColoring.d.ts +0 -2
- package/lib/types/es6/RowDragging.d.ts +6 -0
- package/lib/types/es6/RowFiltering.d.ts +4 -3
- package/lib/types/es6/RowSegmenting.d.ts +30 -24
- package/lib/versions.json +26 -26
- package/package.json +2 -2
@@ -1,5 +1,6 @@
|
|
1
1
|
import { nestedObjectToArray, rgb2Hex } from "./Util.js";
|
2
2
|
import { Deferred } from "./Deferred.js";
|
3
|
+
import { ElementObserver } from "./ElementObserver.js";
|
3
4
|
|
4
5
|
/** Dialog supporting language (selection dialog, formater dialog and filter dialog)
|
5
6
|
* @type {!Object.<string, boolean>}
|
@@ -63,6 +64,26 @@ ElfUtil._dummyIcon = null;
|
|
63
64
|
* @private
|
64
65
|
*/
|
65
66
|
ElfUtil._iconLoaded = false;
|
67
|
+
/** @type {string|null}
|
68
|
+
* @private
|
69
|
+
*/
|
70
|
+
ElfUtil._profileName = null;
|
71
|
+
/** @type {Array}
|
72
|
+
* @private
|
73
|
+
*/
|
74
|
+
ElfUtil._callbacks = [];
|
75
|
+
/** @type {boolean}
|
76
|
+
* @private
|
77
|
+
*/
|
78
|
+
ElfUtil._observed = false;
|
79
|
+
/** @type {boolean}
|
80
|
+
* @private
|
81
|
+
*/
|
82
|
+
ElfUtil._pendingResolve = false;
|
83
|
+
/** @type {boolean}
|
84
|
+
* @private
|
85
|
+
*/
|
86
|
+
ElfUtil._themeLoaded = false;
|
66
87
|
|
67
88
|
/** @type {Object.<string, Object>}
|
68
89
|
* @private
|
@@ -211,6 +232,32 @@ ElfUtil.getThemeName = function (optElem) {
|
|
211
232
|
return ElfUtil._themeName;
|
212
233
|
};
|
213
234
|
|
235
|
+
/** This method is using for unit test
|
236
|
+
* @public
|
237
|
+
* @ignore
|
238
|
+
* @function
|
239
|
+
* @param {string} themeName
|
240
|
+
*/
|
241
|
+
ElfUtil.setThemeName = function (themeName) {
|
242
|
+
ElfUtil._themeName = themeName;
|
243
|
+
};
|
244
|
+
|
245
|
+
/** @public
|
246
|
+
* @function
|
247
|
+
* @return {boolean}
|
248
|
+
*/
|
249
|
+
ElfUtil.isThemeLoaded = function () {
|
250
|
+
return ElfUtil._themeLoaded;
|
251
|
+
};
|
252
|
+
|
253
|
+
/** @public
|
254
|
+
* @function
|
255
|
+
* @return {Object}
|
256
|
+
*/
|
257
|
+
ElfUtil.getColors = function() {
|
258
|
+
return ElfUtil.themeColors;
|
259
|
+
};
|
260
|
+
|
214
261
|
/** Check the current ELF theme is Halo theme
|
215
262
|
* @public
|
216
263
|
* @function
|
@@ -334,57 +381,165 @@ ElfUtil.getCssVariables = function (obj, optElem) {
|
|
334
381
|
return obj || null;
|
335
382
|
};
|
336
383
|
|
384
|
+
/** @public
|
385
|
+
* @param {Object} rtk
|
386
|
+
*/
|
387
|
+
ElfUtil.setRTK = function(rtk) {
|
388
|
+
if(rtk != null) {
|
389
|
+
ElfUtil._rtk = rtk;
|
390
|
+
}
|
391
|
+
};
|
392
|
+
|
393
|
+
/** Get current profile name set on the root html element (document.documentElement)
|
394
|
+
* @public
|
395
|
+
* @return {string} Current profile name
|
396
|
+
*/
|
397
|
+
ElfUtil.getMovementColorProfile = function() {
|
398
|
+
return document.documentElement.getAttribute("movement-color-profile");
|
399
|
+
};
|
400
|
+
|
401
|
+
/** @private
|
402
|
+
* @param {Function} cb
|
403
|
+
*/
|
404
|
+
ElfUtil._addThemeChangedCallback = function(cb) {
|
405
|
+
var callbacks = ElfUtil._callbacks;
|
406
|
+
if(callbacks.indexOf(cb) < 0) {
|
407
|
+
callbacks.push(cb);
|
408
|
+
}
|
409
|
+
};
|
410
|
+
|
411
|
+
/** @public
|
412
|
+
* @return {Promise<Object>} A promise of object of theme colors
|
413
|
+
*/
|
414
|
+
ElfUtil.reloadThemeColors = function() {
|
415
|
+
if (ElfUtil._deferred && ElfUtil._deferred.isFulfilled()) {
|
416
|
+
ElfUtil._profileName = "";
|
417
|
+
ElfUtil._themeLoaded = false;
|
418
|
+
ElfUtil.themeReady = null;
|
419
|
+
return ElfUtil.getThemeColors();
|
420
|
+
} else {
|
421
|
+
return ElfUtil.themeReady;
|
422
|
+
}
|
423
|
+
};
|
424
|
+
|
337
425
|
/** Gets current theme colors from the document and returns a promise. <br>
|
338
|
-
* WANRING: This method sets movement color profile to html tag automatically, if JET.Settings exists. <br>
|
426
|
+
* WANRING: This method sets movement color profile to html tag automatically, if JET.Settings exists or RTK.Settings is available. <br>
|
339
427
|
* To re-request/reset theme colors, set ElfUtil.themeReady variable to null
|
340
428
|
* @public
|
429
|
+
* @param {Function=} themeChangedCb
|
341
430
|
* @return {Promise<Object>} A promise of object of theme colors
|
342
431
|
*/
|
343
|
-
ElfUtil.getThemeColors = function() {
|
432
|
+
ElfUtil.getThemeColors = function(themeChangedCb) {
|
433
|
+
if(typeof themeChangedCb === "function") {
|
434
|
+
ElfUtil._addThemeChangedCallback(themeChangedCb);
|
435
|
+
}
|
436
|
+
|
344
437
|
if(ElfUtil.themeReady) {
|
345
438
|
return ElfUtil.themeReady;
|
346
439
|
}
|
440
|
+
|
347
441
|
var d = ElfUtil._deferred = new Deferred();
|
348
442
|
ElfUtil.themeReady = d.promise;
|
349
443
|
|
350
|
-
var
|
351
|
-
if(
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
});
|
357
|
-
} catch (err) {
|
358
|
-
d.reject("Cannot read JET's settings");
|
444
|
+
var profileName = ElfUtil.getMovementColorProfile();
|
445
|
+
if(profileName) {
|
446
|
+
if(profileName !== ElfUtil._profileName) {
|
447
|
+
setTimeout(ElfUtil._profileNameRetrieved, 100); // TODO: Find a proper way to ensure that theme is ready
|
448
|
+
} else {
|
449
|
+
ElfUtil._deferred.resolve(ElfUtil.themeColors);
|
359
450
|
}
|
360
451
|
} else {
|
361
|
-
|
452
|
+
var options = {
|
453
|
+
providerName: "Configuration",
|
454
|
+
settingName: "RDE_USER_CURRENT_TICK_COLOR"
|
455
|
+
};
|
456
|
+
|
457
|
+
var jet = window ? window.JET : null;
|
458
|
+
ElfUtil._themeLoaded = false;
|
459
|
+
if(ElfUtil._rtk && ElfUtil._rtk.Settings) {
|
460
|
+
ElfUtil._rtk.Settings.getAsync(options)
|
461
|
+
.then(ElfUtil._loadingProfileSuccess)
|
462
|
+
.catch(ElfUtil._loadingProfileFailure);
|
463
|
+
} else if(jet && jet.Settings) {
|
464
|
+
try {
|
465
|
+
jet.Settings.read(ElfUtil._loadingProfileSuccess, options);
|
466
|
+
} catch (err) {
|
467
|
+
ElfUtil._loadingProfileFailure();
|
468
|
+
}
|
469
|
+
} else {
|
470
|
+
setTimeout(ElfUtil._profileNameRetrieved, 100); // TODO: Find a proper way to ensure that theme is ready
|
471
|
+
}
|
362
472
|
}
|
473
|
+
|
363
474
|
return d.promise;
|
364
475
|
};
|
365
476
|
|
366
|
-
/**
|
477
|
+
/** @private
|
478
|
+
* @param {string} profileName
|
479
|
+
*/
|
480
|
+
var movementColorProfileChanged = function(profileName) {
|
481
|
+
if(profileName !== ElfUtil._profileName) {
|
482
|
+
ElfUtil._retrieveThemeColors(profileName);
|
483
|
+
|
484
|
+
if(ElfUtil._pendingResolve) {
|
485
|
+
ElfUtil._pendingResolve = false;
|
486
|
+
ElfUtil._deferred.resolve(ElfUtil.themeColors);
|
487
|
+
}
|
488
|
+
|
489
|
+
var callbacks = ElfUtil._callbacks;
|
490
|
+
for (var i = 0; i < callbacks.length; i++) {
|
491
|
+
callbacks[i]();
|
492
|
+
}
|
493
|
+
}
|
494
|
+
};
|
495
|
+
|
496
|
+
/** Get user's color profile from JET or RTK and set it to html tag (document.documentElement)
|
367
497
|
* @private
|
368
|
-
* @param {string}
|
498
|
+
* @param {string} profileName Returned from JET.Settings or RTK.Settings
|
369
499
|
*/
|
370
|
-
ElfUtil.
|
371
|
-
if(
|
372
|
-
document.documentElement.setAttribute("movement-color-profile",
|
500
|
+
ElfUtil._loadingProfileSuccess = function(profileName) {
|
501
|
+
if(profileName) {
|
502
|
+
document.documentElement.setAttribute("movement-color-profile", profileName.toLowerCase());
|
503
|
+
}
|
504
|
+
|
505
|
+
if(ElfUtil._observed) { // Let attribute listener does the job
|
506
|
+
ElfUtil._pendingResolve = true;
|
507
|
+
} else {
|
508
|
+
ElfUtil._profileNameRetrieved(profileName);
|
373
509
|
}
|
510
|
+
};
|
511
|
+
|
512
|
+
/** @private
|
513
|
+
*/
|
514
|
+
ElfUtil._loadingProfileFailure = function() {
|
374
515
|
ElfUtil._retrieveThemeColors();
|
516
|
+
if(!ElfUtil._observed) {
|
517
|
+
ElfUtil._observed = true;
|
518
|
+
ElementObserver.addAttributeListener(document.documentElement, movementColorProfileChanged, "movement-color-profile");
|
519
|
+
}
|
520
|
+
ElfUtil._deferred.reject("Failed to get movement color profile from settings.");
|
375
521
|
};
|
376
|
-
|
377
|
-
|
378
|
-
* @return {string} Current profile name
|
522
|
+
|
523
|
+
/** @private
|
379
524
|
*/
|
380
|
-
ElfUtil.
|
381
|
-
|
525
|
+
ElfUtil._profileNameRetrieved = function() {
|
526
|
+
var profileName = ElfUtil.getMovementColorProfile();
|
527
|
+
ElfUtil._retrieveThemeColors(profileName);
|
528
|
+
if(!ElfUtil._observed) {
|
529
|
+
ElfUtil._observed = true;
|
530
|
+
ElementObserver.addAttributeListener(document.documentElement, movementColorProfileChanged, "movement-color-profile");
|
531
|
+
}
|
532
|
+
ElfUtil._deferred.resolve(ElfUtil.themeColors);
|
382
533
|
};
|
383
534
|
|
384
535
|
/** Get theme colors from document
|
385
536
|
* @private
|
537
|
+
* @param {string} profileName Movement color profile name
|
386
538
|
*/
|
387
|
-
ElfUtil._retrieveThemeColors = function() {
|
539
|
+
ElfUtil._retrieveThemeColors = function(profileName) {
|
540
|
+
ElfUtil._themeLoaded = true;
|
541
|
+
ElfUtil._profileName = profileName;
|
542
|
+
|
388
543
|
var colors = ElfUtil.themeColors = ElfUtil.getCssVariables({
|
389
544
|
"primary": "--color-scheme-primary", // Usually used in headers, and selection
|
390
545
|
"secondary": "--color-scheme-secondary",
|
@@ -449,10 +604,7 @@ ElfUtil._retrieveThemeColors = function() {
|
|
449
604
|
colors["baseGrid"] = colors["tableBg"];
|
450
605
|
colors["baseText"] = colors["tableText"];
|
451
606
|
colors["trackColor"] = colors["primary"] || ElfUtil._defaultColors["trackColor"];
|
452
|
-
|
453
|
-
ElfUtil._deferred.resolve(colors);
|
454
607
|
};
|
455
608
|
|
456
|
-
|
457
609
|
export default ElfUtil;
|
458
610
|
export { ElfUtil };
|
@@ -4,23 +4,23 @@ declare class EventDispatcher {
|
|
4
4
|
|
5
5
|
constructor();
|
6
6
|
|
7
|
-
public addEventListener(type: string, handler: ((...params: any[]) => any)): void;
|
7
|
+
public addEventListener(type: string, handler: ((...params: any[]) => any)|null): void;
|
8
8
|
|
9
|
-
public removeEventListener(type: string, handler: ((...params: any[]) => any)): void;
|
9
|
+
public removeEventListener(type: string, handler: ((...params: any[]) => any)|null): void;
|
10
10
|
|
11
11
|
public removeAllEventListeners(): void;
|
12
12
|
|
13
13
|
public hasListener(type: string): boolean;
|
14
14
|
|
15
|
-
public getListener(type: string, idx?: number): ((...params: any[]) => any)|null;
|
15
|
+
public getListener(type: string, idx?: number|null): ((...params: any[]) => any)|null;
|
16
16
|
|
17
17
|
public addListener(obj: any, type: string): void;
|
18
18
|
|
19
|
-
public static preventDefault(e: Event): void;
|
19
|
+
public static preventDefault(e: Event|null): void;
|
20
20
|
|
21
21
|
}
|
22
22
|
|
23
|
-
declare function preventDefault(e: Event): void;
|
23
|
+
declare function preventDefault(e: Event|null): void;
|
24
24
|
|
25
25
|
export default EventDispatcher;
|
26
26
|
export {EventDispatcher, preventDefault};
|
@@ -9,7 +9,7 @@ declare class ExpanderIcon extends ElementWrapper {
|
|
9
9
|
|
10
10
|
public static loadExpanderStyles(): void;
|
11
11
|
|
12
|
-
public static injectExpanderStyles(elem: Element): void;
|
12
|
+
public static injectExpanderStyles(elem: Element|null): void;
|
13
13
|
|
14
14
|
public expand(): void;
|
15
15
|
|
@@ -19,7 +19,7 @@ declare class ExpanderIcon extends ElementWrapper {
|
|
19
19
|
|
20
20
|
public isCollapsed(): boolean;
|
21
21
|
|
22
|
-
public toggle(collapsed?: boolean): void;
|
22
|
+
public toggle(collapsed?: boolean|null): void;
|
23
23
|
|
24
24
|
}
|
25
25
|
|
@@ -94,7 +94,7 @@ ExpanderIcon.loadExpanderStyles = function() {
|
|
94
94
|
if(themeName) {
|
95
95
|
ExpanderIcon._onThemeLoaded(); // synchronous
|
96
96
|
} else {
|
97
|
-
ElfUtil.getThemeColors().then(ExpanderIcon._onThemeLoaded); // asynchronous
|
97
|
+
ElfUtil.getThemeColors().then(ExpanderIcon._onThemeLoaded).catch(ExpanderIcon._onThemeLoaded); // asynchronous
|
98
98
|
}
|
99
99
|
}
|
100
100
|
};
|
@@ -4,22 +4,22 @@ import { DateTime } from "./DateTime.js";
|
|
4
4
|
declare namespace FieldFormatter {
|
5
5
|
|
6
6
|
type Options = {
|
7
|
-
formatType?: string,
|
7
|
+
formatType?: string|null,
|
8
8
|
type: string,
|
9
|
-
field?: string,
|
10
|
-
fieldDataType?: string,
|
11
|
-
dateTimeFormat?: string,
|
12
|
-
useUTCTime?: boolean,
|
13
|
-
idnSource?: string
|
9
|
+
field?: string|null,
|
10
|
+
fieldDataType?: string|null,
|
11
|
+
dateTimeFormat?: string|null,
|
12
|
+
useUTCTime?: boolean|null,
|
13
|
+
idnSource?: string|null
|
14
14
|
};
|
15
15
|
|
16
16
|
}
|
17
17
|
|
18
18
|
declare class FieldFormatter {
|
19
19
|
|
20
|
-
constructor(options?: FieldFormatter.Options);
|
20
|
+
constructor(options?: FieldFormatter.Options|null);
|
21
21
|
|
22
|
-
public init(options?: FieldFormatter.Options): void;
|
22
|
+
public init(options?: FieldFormatter.Options|null): void;
|
23
23
|
|
24
24
|
public getOptions(options?: any): any;
|
25
25
|
|
@@ -29,13 +29,13 @@ declare class FieldFormatter {
|
|
29
29
|
|
30
30
|
public setFormatType(type: string): void;
|
31
31
|
|
32
|
-
public setField(field: string, combinedField?: string, formattedField?: string): void;
|
32
|
+
public setField(field: string, combinedField?: string|null, formattedField?: string|null): void;
|
33
33
|
|
34
|
-
public setDateTimeMeta(format: string, gmtTimeZone?: boolean, inputSource?: string, lang?: string): void;
|
34
|
+
public setDateTimeMeta(format: string, gmtTimeZone?: boolean|null, inputSource?: string|null, lang?: string|null): void;
|
35
35
|
|
36
|
-
public setDateFormatter(func: ((...params: any[]) => any)): void;
|
36
|
+
public setDateFormatter(func: ((...params: any[]) => any)|null): void;
|
37
37
|
|
38
|
-
public setNumberFormatter(formatter: ((...params: any[]) => any)|NumberFormatter): void;
|
38
|
+
public setNumberFormatter(formatter: ((...params: any[]) => any)|NumberFormatter|null): void;
|
39
39
|
|
40
40
|
public format(data: any): string;
|
41
41
|
|
@@ -8,7 +8,7 @@ import { DateTime } from "./DateTime.js";
|
|
8
8
|
* @property {string=} field
|
9
9
|
* @property {string=} fieldDataType Deprecated. Alias to formatType
|
10
10
|
* @property {string=} dateTimeFormat
|
11
|
-
* @property {boolean=} useUTCTime=
|
11
|
+
* @property {boolean=} useUTCTime=true If disable, time will be shown in local time format
|
12
12
|
* @property {string=} idnSource
|
13
13
|
*/
|
14
14
|
|
@@ -6,43 +6,43 @@ declare namespace FilterBuilder {
|
|
6
6
|
|
7
7
|
type Options = {
|
8
8
|
field: string,
|
9
|
-
formatter?: ((...params: any[]) => any),
|
10
|
-
formattedField?: string
|
9
|
+
formatter?: ((...params: any[]) => any)|null,
|
10
|
+
formattedField?: string|null
|
11
11
|
};
|
12
12
|
|
13
|
-
type Condition = any[];
|
13
|
+
type Condition = any[]|null;
|
14
14
|
|
15
|
-
type Conditions = (FilterBuilder.Condition)[];
|
15
|
+
type Conditions = (FilterBuilder.Condition)[]|null;
|
16
16
|
|
17
17
|
}
|
18
18
|
|
19
19
|
declare class FilterBuilder {
|
20
20
|
|
21
|
-
constructor(options?: FilterBuilder.Options);
|
21
|
+
constructor(options?: FilterBuilder.Options|null);
|
22
22
|
|
23
23
|
public reset(): void;
|
24
24
|
|
25
|
-
public init(options?: FilterBuilder.Options): void;
|
25
|
+
public init(options?: FilterBuilder.Options|null): void;
|
26
26
|
|
27
|
-
public setFieldDefinition(fieldName: string, formatter?: ((...params: any[]) => any), formattedField?: string): void;
|
27
|
+
public setFieldDefinition(fieldName: string, formatter?: ((...params: any[]) => any)|null, formattedField?: string|null): void;
|
28
28
|
|
29
|
-
public setDataAccessors(rawDataAccessor?: ((...params: any[]) => any), formattedDataAccessor?: ((...params: any[]) => any)): void;
|
29
|
+
public setDataAccessors(rawDataAccessor?: ((...params: any[]) => any)|null, formattedDataAccessor?: ((...params: any[]) => any)|null): void;
|
30
30
|
|
31
|
-
public addCondition(oper: string, value: string|number, connector?: string): boolean;
|
31
|
+
public addCondition(oper: string, value: string|number|null, connector?: string|null, useUTCTime?: boolean|null): boolean;
|
32
32
|
|
33
|
-
public addConditions(conditions: FilterBuilder.Conditions): number;
|
33
|
+
public addConditions(conditions: FilterBuilder.Conditions|null): number;
|
34
34
|
|
35
35
|
public getConditions(): FilterBuilder.Conditions|null;
|
36
36
|
|
37
37
|
public buildFilter(): ((...params: any[]) => any)|null;
|
38
38
|
|
39
|
-
public buildMonitorFilter(filterStr: string, field: string, formatter?: ((...params: any[]) => any), formattedField?: string): ((...params: any[]) => any)|null;
|
39
|
+
public buildMonitorFilter(filterStr: string, field: string, formatter?: ((...params: any[]) => any)|null, formattedField?: string|null): ((...params: any[]) => any)|null;
|
40
40
|
|
41
|
-
public parse(condition: any, field?: string, formatter?: ((...params: any[]) => any), formattedField?: string, rawDataAccessor?: ((...params: any[]) => any), formattedDataAccessor?: ((...params: any[]) => any)): ((...params: any[]) => any)|null;
|
41
|
+
public parse(condition: any, field?: string|null, formatter?: ((...params: any[]) => any)|null, formattedField?: string|null, rawDataAccessor?: ((...params: any[]) => any)|null, formattedDataAccessor?: ((...params: any[]) => any)|null): ((...params: any[]) => any)|null;
|
42
42
|
|
43
43
|
}
|
44
44
|
|
45
|
-
declare function buildFilterFromObjectMap(obj: any, field: string, rawDataAccessor?: ((...params: any[]) => any)): ((...params: any[]) => any)|null;
|
45
|
+
declare function buildFilterFromObjectMap(obj: any, field: string, rawDataAccessor?: ((...params: any[]) => any)|null): ((...params: any[]) => any)|null;
|
46
46
|
|
47
47
|
export default FilterBuilder;
|
48
48
|
export { FilterBuilder, buildFilterFromObjectMap };
|
@@ -169,9 +169,10 @@ FilterBuilder.prototype.setDataAccessors = function(rawDataAccessor, formattedDa
|
|
169
169
|
* @param {string} oper Operator id (e.g., "GT", "CONT", "EQ")
|
170
170
|
* @param {string|number} value
|
171
171
|
* @param {string=} connector Possible values are "OR" and "AND"
|
172
|
+
* @param {boolean=} useUTCTime If false use local time for filtering
|
172
173
|
* @return {boolean} Return true, if the new condition is added
|
173
174
|
*/
|
174
|
-
FilterBuilder.prototype.addCondition = function (oper, value, connector) {
|
175
|
+
FilterBuilder.prototype.addCondition = function (oper, value, connector, useUTCTime) {
|
175
176
|
oper = oper ? oper.toUpperCase() : "";
|
176
177
|
var opDef = FilterOperators[oper];
|
177
178
|
if (!opDef) {
|
@@ -190,7 +191,8 @@ FilterBuilder.prototype.addCondition = function (oper, value, connector) {
|
|
190
191
|
this._conditions.push({
|
191
192
|
operatorId: oper,
|
192
193
|
value: value,
|
193
|
-
connector: connector || ""
|
194
|
+
connector: connector || "",
|
195
|
+
useUTCTime: useUTCTime
|
194
196
|
});
|
195
197
|
|
196
198
|
return true;
|
@@ -206,7 +208,7 @@ FilterBuilder.prototype.addConditions = function (conditions) {
|
|
206
208
|
for(var i = 0; i < len; ++i) {
|
207
209
|
var condition = conditions[i];
|
208
210
|
if(Array.isArray(condition)) {
|
209
|
-
if(this.addCondition(condition[0], condition[1], condition[2])) {
|
211
|
+
if(this.addCondition(condition[0], condition[1], condition[2], condition[3])) {
|
210
212
|
++count;
|
211
213
|
}
|
212
214
|
}
|
@@ -312,11 +314,6 @@ FilterBuilder.prototype.buildFilter = function() {
|
|
312
314
|
filterStr.push("var ts = 0;");
|
313
315
|
filterStr.push("if(!val || val != val || !val.getTime) {");
|
314
316
|
filterStr.push(" return false;");
|
315
|
-
filterStr.push("} else {");
|
316
|
-
filterStr.push(" ts = val.getTime();");
|
317
|
-
filterStr.push(" if(ts !== ts) {");
|
318
|
-
filterStr.push(" return false;");
|
319
|
-
filterStr.push(" }");
|
320
317
|
filterStr.push("}");
|
321
318
|
}
|
322
319
|
|
@@ -366,6 +363,16 @@ FilterBuilder.prototype.buildFilter = function() {
|
|
366
363
|
} else if(opDef.type === "date") {
|
367
364
|
if(DateTime.isValidDate(inputVal)) {
|
368
365
|
var varName;
|
366
|
+
if(!cond.useUTCTime){
|
367
|
+
filterStr.push("ts = new Date(val.getFullYear(),val.getMonth(),val.getDate())");
|
368
|
+
} else {
|
369
|
+
filterStr.push("ts = new Date(Date.UTC(val.getUTCFullYear(),val.getUTCMonth(),val.getUTCDate()))");
|
370
|
+
}
|
371
|
+
filterStr.push("ts = ts.getTime()");
|
372
|
+
filterStr.push("if(ts !== ts) {");
|
373
|
+
filterStr.push(" return false;");
|
374
|
+
filterStr.push("}");
|
375
|
+
|
369
376
|
if(cond.operatorId === "DT") {
|
370
377
|
varName = "ts" + (i + 1);
|
371
378
|
inputVal = inputVal.getTime();
|
@@ -11,28 +11,28 @@ declare namespace FilterOperators {
|
|
11
11
|
};
|
12
12
|
|
13
13
|
type Operators = {
|
14
|
-
EQ: FilterOperators.Operator,
|
15
|
-
NEQ: FilterOperators.Operator,
|
16
|
-
NUMEQ: FilterOperators.Operator,
|
17
|
-
NUMNEQ: FilterOperators.Operator,
|
18
|
-
GT: FilterOperators.Operator,
|
19
|
-
GTE: FilterOperators.Operator,
|
20
|
-
LT: FilterOperators.Operator,
|
21
|
-
LTE: FilterOperators.Operator,
|
22
|
-
BEGIN: FilterOperators.Operator,
|
23
|
-
NBEGIN: FilterOperators.Operator,
|
24
|
-
END: FilterOperators.Operator,
|
25
|
-
NEND: FilterOperators.Operator,
|
26
|
-
CONT: FilterOperators.Operator,
|
27
|
-
NCONT: FilterOperators.Operator,
|
28
|
-
EQ_BLANK: FilterOperators.Operator,
|
29
|
-
EQ_NBLANK: FilterOperators.Operator,
|
30
|
-
DT: FilterOperators.Operator,
|
31
|
-
DTA: FilterOperators.Operator,
|
32
|
-
DTB: FilterOperators.Operator,
|
33
|
-
TXTEQ: FilterOperators.Operator,
|
34
|
-
BLANK: FilterOperators.Operator,
|
35
|
-
NBLANK: FilterOperators.Operator
|
14
|
+
EQ: FilterOperators.Operator|null,
|
15
|
+
NEQ: FilterOperators.Operator|null,
|
16
|
+
NUMEQ: FilterOperators.Operator|null,
|
17
|
+
NUMNEQ: FilterOperators.Operator|null,
|
18
|
+
GT: FilterOperators.Operator|null,
|
19
|
+
GTE: FilterOperators.Operator|null,
|
20
|
+
LT: FilterOperators.Operator|null,
|
21
|
+
LTE: FilterOperators.Operator|null,
|
22
|
+
BEGIN: FilterOperators.Operator|null,
|
23
|
+
NBEGIN: FilterOperators.Operator|null,
|
24
|
+
END: FilterOperators.Operator|null,
|
25
|
+
NEND: FilterOperators.Operator|null,
|
26
|
+
CONT: FilterOperators.Operator|null,
|
27
|
+
NCONT: FilterOperators.Operator|null,
|
28
|
+
EQ_BLANK: FilterOperators.Operator|null,
|
29
|
+
EQ_NBLANK: FilterOperators.Operator|null,
|
30
|
+
DT: FilterOperators.Operator|null,
|
31
|
+
DTA: FilterOperators.Operator|null,
|
32
|
+
DTB: FilterOperators.Operator|null,
|
33
|
+
TXTEQ: FilterOperators.Operator|null,
|
34
|
+
BLANK: FilterOperators.Operator|null,
|
35
|
+
NBLANK: FilterOperators.Operator|null
|
36
36
|
};
|
37
37
|
|
38
38
|
}
|
@@ -153,21 +153,21 @@ var FilterOperators = {
|
|
153
153
|
type: "date",
|
154
154
|
positive: 1,
|
155
155
|
caseSensitive: 1,
|
156
|
-
formula: "
|
156
|
+
formula: "ts === input"
|
157
157
|
},
|
158
158
|
DTA: {
|
159
159
|
name: "Date is After",
|
160
160
|
type: "date",
|
161
161
|
positive: 1,
|
162
162
|
caseSensitive: 1,
|
163
|
-
formula: "
|
163
|
+
formula: "ts > input"
|
164
164
|
},
|
165
165
|
DTB: {
|
166
166
|
name: "Date is Before",
|
167
167
|
type: "date",
|
168
168
|
positive: 1,
|
169
169
|
caseSensitive: 1,
|
170
|
-
formula: "
|
170
|
+
formula: "ts < input"
|
171
171
|
}
|
172
172
|
};
|
173
173
|
|
@@ -6,11 +6,11 @@ declare class GridPlugin extends EventDispatcher {
|
|
6
6
|
|
7
7
|
constructor();
|
8
8
|
|
9
|
-
public listen(type: string, handler: ((...params: any[]) => any)): void;
|
9
|
+
public listen(type: string, handler: ((...params: any[]) => any)|null): void;
|
10
10
|
|
11
|
-
public unlisten(type: string, handler: ((...params: any[]) => any)): void;
|
11
|
+
public unlisten(type: string, handler: ((...params: any[]) => any)|null): void;
|
12
12
|
|
13
|
-
public afterInit(elem?: Element, model?: any, grid?: any): void;
|
13
|
+
public afterInit(elem?: Element|null, model?: any, grid?: any): void;
|
14
14
|
|
15
15
|
public hasMultiTableSupport(): boolean;
|
16
16
|
|
@@ -20,19 +20,19 @@ declare class GridPlugin extends EventDispatcher {
|
|
20
20
|
|
21
21
|
public unload(host?: any): void;
|
22
22
|
|
23
|
-
public getRelativeGrid(e: Event|Element|any): any
|
23
|
+
public getRelativeGrid(e: Event|Element|any): any;
|
24
24
|
|
25
25
|
public setGridWrapper(gridType: string, wrapperInstance: any): void;
|
26
26
|
|
27
|
-
public getGridApi(coreRef?: (number|any)): any;
|
27
|
+
public getGridApi(coreRef?: (number|any)|null): any;
|
28
28
|
|
29
|
-
public getColumnName(colRef: number|string): string;
|
29
|
+
public getColumnName(colRef: number|string|null): string;
|
30
30
|
|
31
|
-
public getColumnIndex(colId: number|string): number;
|
31
|
+
public getColumnIndex(colId: number|string|null): number;
|
32
32
|
|
33
|
-
public getColumnIndices(colRefs: (number|string)[]): (number)[]|null;
|
33
|
+
public getColumnIndices(colRefs: (number|string)[]|null): (number)[]|null;
|
34
34
|
|
35
|
-
public getColumnId(colIndex: number|string): string;
|
35
|
+
public getColumnId(colIndex: number|string|null): string;
|
36
36
|
|
37
37
|
public getColumnCount(): number;
|
38
38
|
|
@@ -42,7 +42,7 @@ declare class GridPlugin extends EventDispatcher {
|
|
42
42
|
|
43
43
|
declare function gridAPI(gridType: string, wrapperInstance: any): void;
|
44
44
|
|
45
|
-
declare function exportExtension(winObj: Window|any, plugin: GridPlugin): void;
|
45
|
+
declare function exportExtension(winObj: Window|any|null, plugin: GridPlugin|null): void;
|
46
46
|
|
47
47
|
declare function defaultDataGetter(field: string, dvRowData: any): any;
|
48
48
|
|
@@ -581,6 +581,26 @@ GridPlugin.prototype._setRowData = function(dv, rowIndex, rowData) {
|
|
581
581
|
dv.setRowDataAt(rowIndex, rowData);
|
582
582
|
}
|
583
583
|
};
|
584
|
+
|
585
|
+
/** @protected
|
586
|
+
* @ignore
|
587
|
+
* @param {tr.DataView} dv
|
588
|
+
* @param {number} rowIndex
|
589
|
+
* @param {string} field
|
590
|
+
* @param {*} value
|
591
|
+
*/
|
592
|
+
GridPlugin.prototype._setStaticData = function(dv, rowIndex, field, value) {
|
593
|
+
if(this._realTimeGrid) {
|
594
|
+
var dvRowData = dv.getRowDataAt(rowIndex);
|
595
|
+
if(dvRowData) {
|
596
|
+
dvRowData["ROW_DEF"].setStaticData(field, value);
|
597
|
+
}
|
598
|
+
} else {
|
599
|
+
// TODO: composite grid should be has staticValues when get configObject, wait for request feature
|
600
|
+
dv.setDataAt(rowIndex, field, value);
|
601
|
+
}
|
602
|
+
};
|
603
|
+
|
584
604
|
/** Set data in a column manner. This is faster than repeatedly calling this._setData
|
585
605
|
* @protected
|
586
606
|
* @ignore
|