@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
package/lib/rt-grid/es6/Grid.js
CHANGED
@@ -31,6 +31,11 @@ import { ElementWrapper } from "../../core/es6/grid/components/ElementWrapper.js
|
|
31
31
|
* @property {boolean=} debug=false If true, Synapse response will be mock
|
32
32
|
*/
|
33
33
|
|
34
|
+
/** @typedef {Object} Grid~ADCOptions
|
35
|
+
* @description ADC requesting level config from adc team
|
36
|
+
* @property {string=} productId=001 required parameter, it specifies the product for which you request data. Contact the adc staff to create one.
|
37
|
+
*/
|
38
|
+
|
34
39
|
/** @typedef {Object} Grid~GridOptions
|
35
40
|
* @description Configuration object that can be provided directly at the initialization phase
|
36
41
|
* @property {Array.<ColumnDefinition~Options|string>=} columns Collection of the column definitions
|
@@ -63,8 +68,10 @@ import { ElementWrapper } from "../../core/es6/grid/components/ElementWrapper.js
|
|
63
68
|
* @property {boolean=} borders=true Lines around grid element
|
64
69
|
* @property {boolean=} gridlines=true Horizontal and Vertical lines for ONLY content sections
|
65
70
|
* @property {boolean=} verticalLines=true Vertical lines for all sections
|
71
|
+
* @property {boolean=} contentVerticalLines=true Vertical lines for all content section
|
66
72
|
* @property {boolean=} horizontalLines=true Horizontal lines for all sections
|
67
73
|
* @property {*=} RTK=null rtk toolkit instance
|
74
|
+
* @property {Grid~ADCOptions=} ADC=null ADC requesting level config object from adc team
|
68
75
|
* @property {Grid~SynapseConfig=} synapse=null synapse config object
|
69
76
|
* @property {number=} contentRightPadding=0 Padding that is added next to the right most column. The padding is still a part of scrollable content.
|
70
77
|
* @property {number=} contentBottomPadding=0 Padding that is added below the last section. The padding is still a part of scrollable content.
|
@@ -76,6 +83,7 @@ import { ElementWrapper } from "../../core/es6/grid/components/ElementWrapper.js
|
|
76
83
|
* @property {Element=} scrollbarParent=null Element to be attached by grid's scrollbars, allowing them to move outside and avoid overlapping with the content.
|
77
84
|
* @property {boolean=} formulaEngine=false If enabled, field with leading equal sign will be treated as a formula and rows will be filled with the calculated values.
|
78
85
|
* @property {number=} adcPollingInterval=0 Length of polling interval for refreshing ADC data in milliseconds. The default value (0) means no polling.
|
86
|
+
* @property {boolean=} fieldCaching=false If enabled, field definition will be caching internal mechanism
|
79
87
|
*/
|
80
88
|
|
81
89
|
/** @typedef {number|string|RowDefinition} Grid~RowReference
|
@@ -88,7 +96,7 @@ import { ElementWrapper } from "../../core/es6/grid/components/ElementWrapper.js
|
|
88
96
|
/** @typedef {number|string|ColumnDefinition} Grid~ColumnReference
|
89
97
|
* @description A column in Grid can be referred by the following values:<br>
|
90
98
|
* <b>number</b> : Column index including all invisible (hidden) columns<br>
|
91
|
-
* <b>string</b> : Field name of the column<br>
|
99
|
+
* <b>string</b> : Field name or column id of the column<br>
|
92
100
|
* <b>ColumnDefinition</b> : Column definition object<br>
|
93
101
|
*/
|
94
102
|
|
@@ -184,25 +192,6 @@ var cloneRowData = function(fromRowDef, toRowDef) {
|
|
184
192
|
}
|
185
193
|
};
|
186
194
|
|
187
|
-
/** @private
|
188
|
-
* @param {number} a
|
189
|
-
* @param {number} b
|
190
|
-
* @return {number}
|
191
|
-
*/
|
192
|
-
var ascNumberSorter = function (a, b) {
|
193
|
-
return a - b;
|
194
|
-
};
|
195
|
-
|
196
|
-
/** @private
|
197
|
-
* @param {number} min
|
198
|
-
* @param {number} max
|
199
|
-
* @param {number} elem
|
200
|
-
* @return {boolean}
|
201
|
-
*/
|
202
|
-
var inRangeFilter = function (min, max, elem) {
|
203
|
-
return elem >= min && elem <= max;
|
204
|
-
};
|
205
|
-
|
206
195
|
/** @private
|
207
196
|
* @param {string} sortField
|
208
197
|
* @param {Object} elemData
|
@@ -455,6 +444,10 @@ Grid.prototype._defaultColumnOptions = null;
|
|
455
444
|
* @type {*}
|
456
445
|
*/
|
457
446
|
Grid.prototype._RTK = null;
|
447
|
+
/** @private
|
448
|
+
* @type {Grid~ADCOptions}
|
449
|
+
*/
|
450
|
+
Grid.prototype._ADCOptions = null;
|
458
451
|
/** use for synapse service
|
459
452
|
* @private
|
460
453
|
* @type {string}
|
@@ -496,6 +489,10 @@ Grid.prototype._lastPollingRequest = 0;
|
|
496
489
|
* @private
|
497
490
|
*/
|
498
491
|
Grid.prototype._pollingEnabled = true;
|
492
|
+
/** @type {boolean}
|
493
|
+
* @private
|
494
|
+
*/
|
495
|
+
Grid.prototype._fieldCaching = false;
|
499
496
|
|
500
497
|
|
501
498
|
/** @public
|
@@ -729,11 +726,22 @@ Grid.prototype.initialize = function(gridOption) {
|
|
729
726
|
t._RTK = gridOption["RTK"];
|
730
727
|
t._snapshot.setRTK(t._RTK);
|
731
728
|
}
|
729
|
+
|
730
|
+
if (gridOption["ADC"]) {
|
731
|
+
t._ADCOptions = gridOption["ADC"];
|
732
|
+
t._snapshot.setADCOptions(t._ADCOptions);
|
733
|
+
}
|
734
|
+
|
732
735
|
if (gridOption["synapse"]) {
|
733
736
|
t._synapse = gridOption["synapse"];
|
734
737
|
FieldDefinition.setSynapseConfig(t._synapse);
|
735
738
|
}
|
736
739
|
|
740
|
+
if (gridOption["fieldCaching"]) {
|
741
|
+
t._fieldCaching = gridOption["fieldCaching"];
|
742
|
+
FieldDefinition.setFieldCaching(t._fieldCaching);
|
743
|
+
}
|
744
|
+
|
737
745
|
if (gridOption["icons"] && gridOption["icons"]["rowGrouping"] && gridOption["icons"]["rowGrouping"]["expander"]) {
|
738
746
|
StyleLoader.chainIcon = gridOption["icons"]["rowGrouping"]["expander"];
|
739
747
|
}
|
@@ -756,6 +764,10 @@ Grid.prototype.initialize = function(gridOption) {
|
|
756
764
|
if (vLines != null) {
|
757
765
|
grid.toggleVerticalLines(vLines);
|
758
766
|
}
|
767
|
+
var cvLines = gridOption["contentVerticalLines"];
|
768
|
+
if (cvLines != null) {
|
769
|
+
grid.toggleContentVerticalLines(cvLines);
|
770
|
+
}
|
759
771
|
var hLines = gridOption["horizontalLines"];
|
760
772
|
if (hLines != null) {
|
761
773
|
grid.toggleHorizontalLines(hLines);
|
@@ -1044,11 +1056,14 @@ Grid.prototype.getConfigObject = function (gridOptions) {
|
|
1044
1056
|
if(this._pollingInterval) {
|
1045
1057
|
obj["adcPollingInterval"] = this._pollingInterval;
|
1046
1058
|
}
|
1059
|
+
if(this._fieldCaching) {
|
1060
|
+
obj["fieldCaching"] = this._fieldCaching;
|
1061
|
+
}
|
1047
1062
|
|
1048
1063
|
// get all rows config
|
1049
1064
|
var rowDefs = this.getAllRowDefinitions();
|
1050
1065
|
var rows = obj["rows"] = [];
|
1051
|
-
var rowDef, rowConfig
|
1066
|
+
var rowDef, rowConfig;
|
1052
1067
|
len = rowDefs.length;
|
1053
1068
|
for (i = 0; i < len; i++) {
|
1054
1069
|
rowDef = rowDefs[i];
|
@@ -1058,6 +1073,7 @@ Grid.prototype.getConfigObject = function (gridOptions) {
|
|
1058
1073
|
|
1059
1074
|
// get row config from extensions
|
1060
1075
|
var extensions = grid.getPlugins();
|
1076
|
+
var pluginInstance, row;
|
1061
1077
|
for(var key in extensions) {
|
1062
1078
|
pluginInstance = extensions[key];
|
1063
1079
|
if(typeof pluginInstance["getRowConfigObject"] === "function") {
|
@@ -1065,15 +1081,7 @@ Grid.prototype.getConfigObject = function (gridOptions) {
|
|
1065
1081
|
for (i = 0; i < len; i++) {
|
1066
1082
|
rowDef = rowDefs[i];
|
1067
1083
|
row = rows[i];
|
1068
|
-
|
1069
|
-
if(retObj) {
|
1070
|
-
if(row.values) {
|
1071
|
-
// eslint-disable-next-line es5/no-es6-static-methods
|
1072
|
-
Object.assign(row.values, retObj); // Ignore lint
|
1073
|
-
} else {
|
1074
|
-
row.values = retObj;
|
1075
|
-
}
|
1076
|
-
}
|
1084
|
+
pluginInstance["getRowConfigObject"](row, rowDef.getRowId());
|
1077
1085
|
}
|
1078
1086
|
}
|
1079
1087
|
}
|
@@ -1084,7 +1092,7 @@ Grid.prototype.getConfigObject = function (gridOptions) {
|
|
1084
1092
|
// topFreezingCount, bottomFreezingCount
|
1085
1093
|
// scrollbarParent
|
1086
1094
|
|
1087
|
-
// NOTE: no need to export synapseApiKey and RTK
|
1095
|
+
// NOTE: no need to export synapseApiKey, ADC and RTK
|
1088
1096
|
|
1089
1097
|
return obj;
|
1090
1098
|
};
|
@@ -1245,6 +1253,70 @@ Grid.prototype.insertColumn = function (columnOption, idx) {
|
|
1245
1253
|
};
|
1246
1254
|
|
1247
1255
|
|
1256
|
+
/** @public
|
1257
|
+
* @param {ColumnDefinition~Options|string} columnOption String will be treated as field, while object is treated as the column options
|
1258
|
+
* @param {Grid~ColumnReference} colRef
|
1259
|
+
*/
|
1260
|
+
Grid.prototype.replaceColumn = function (columnOption, colRef) {
|
1261
|
+
var colIndex = this.getColumnIndex(colRef);
|
1262
|
+
if(colIndex < 0) {
|
1263
|
+
return;
|
1264
|
+
}
|
1265
|
+
var colConfig = {};
|
1266
|
+
var core = this._grid;
|
1267
|
+
var columnDef = core._getColumnDef(colIndex);
|
1268
|
+
|
1269
|
+
var value = core.getColumnScalability(colIndex);
|
1270
|
+
colConfig["scalable"] = value;
|
1271
|
+
|
1272
|
+
value = core.getColumnCustomLaneSize(colIndex);
|
1273
|
+
colConfig["width"] = value;
|
1274
|
+
|
1275
|
+
value = core.getMinimumColumnWidth(colIndex);
|
1276
|
+
if(value !== 32) {
|
1277
|
+
colConfig["minWidth"] = value;
|
1278
|
+
}
|
1279
|
+
|
1280
|
+
value = core.isColumnVisible(colIndex);
|
1281
|
+
if(!value) {
|
1282
|
+
colConfig["hidden"] = true;
|
1283
|
+
}
|
1284
|
+
|
1285
|
+
value = columnDef["stationary"];
|
1286
|
+
if (value) {
|
1287
|
+
colConfig["stationary"] = value;
|
1288
|
+
}
|
1289
|
+
|
1290
|
+
value = columnDef["leftPinned"];
|
1291
|
+
if (value) {
|
1292
|
+
colConfig["leftPinned"] = value;
|
1293
|
+
}
|
1294
|
+
|
1295
|
+
value = columnDef["rightPinned"];
|
1296
|
+
if (value) {
|
1297
|
+
colConfig["rightPinned"] = value;
|
1298
|
+
}
|
1299
|
+
|
1300
|
+
if(typeof columnOption === "string") {
|
1301
|
+
colConfig["field"] = columnOption;
|
1302
|
+
} else { // type object from user
|
1303
|
+
for (var key in columnOption) {
|
1304
|
+
colConfig[key] = columnOption[key];
|
1305
|
+
}
|
1306
|
+
}
|
1307
|
+
|
1308
|
+
if(columnOption["width"] && !columnOption["scalable"]) {
|
1309
|
+
colConfig["scalable"] = false;
|
1310
|
+
}
|
1311
|
+
|
1312
|
+
if(columnOption["scalable"] && !columnOption["width"]) {
|
1313
|
+
colConfig["width"] = 1;
|
1314
|
+
}
|
1315
|
+
|
1316
|
+
this.insertColumn(colConfig, colIndex);
|
1317
|
+
this.removeColumn(colIndex + 1); // remove existing column after insert
|
1318
|
+
};
|
1319
|
+
|
1248
1320
|
/** to update column name when field info is loaded
|
1249
1321
|
* @private
|
1250
1322
|
* @param {string} field
|
@@ -1541,78 +1613,7 @@ Grid.prototype.removeAllColumns = function() {
|
|
1541
1613
|
* @return {boolean} Return true if there is any change, and false otherwise
|
1542
1614
|
*/
|
1543
1615
|
Grid.prototype.moveColumn = function (fromColIndex, toColIndex) {
|
1544
|
-
|
1545
|
-
if (!Array.isArray(fromColIndex)) {
|
1546
|
-
fromColIndex = [fromColIndex];
|
1547
|
-
}
|
1548
|
-
|
1549
|
-
var columnCount = this._grid.getColumnCount();
|
1550
|
-
var lastColIndex = columnCount - 1;
|
1551
|
-
fromColIndex.sort(ascNumberSorter);
|
1552
|
-
fromColIndex = fromColIndex.filter(inRangeFilter.bind(null, 0, lastColIndex));
|
1553
|
-
|
1554
|
-
if (!this._grid.isColumnMoveAllowed(fromColIndex, toColIndex)) {
|
1555
|
-
return false;
|
1556
|
-
}
|
1557
|
-
|
1558
|
-
var frozen = this._grid.isLayoutFrozen();
|
1559
|
-
this._grid.freezeLayout(true);
|
1560
|
-
|
1561
|
-
var marker = [];
|
1562
|
-
var runner = 0;
|
1563
|
-
var i;
|
1564
|
-
for (i = 0; i < columnCount; i++) {
|
1565
|
-
if (i == fromColIndex[runner]) {
|
1566
|
-
marker.push(true);
|
1567
|
-
runner++;
|
1568
|
-
} else {
|
1569
|
-
marker.push(false);
|
1570
|
-
}
|
1571
|
-
}
|
1572
|
-
//Find the index to be moved to
|
1573
|
-
var counter = -1;
|
1574
|
-
var toMoveTo = -1;
|
1575
|
-
|
1576
|
-
for (i = 0; i < columnCount; i++) {
|
1577
|
-
if (marker[i] === false) {
|
1578
|
-
counter++;
|
1579
|
-
}
|
1580
|
-
|
1581
|
-
if (counter === toColIndex) {
|
1582
|
-
toMoveTo = i;
|
1583
|
-
break;
|
1584
|
-
}
|
1585
|
-
}
|
1586
|
-
|
1587
|
-
//If toMoveTo == -1, it means the target column index is beyond the last colmn so just move the columns
|
1588
|
-
//to the end of the table
|
1589
|
-
if (toMoveTo === -1) {
|
1590
|
-
toMoveTo = columnCount;
|
1591
|
-
}
|
1592
|
-
|
1593
|
-
//Perform moving
|
1594
|
-
var leftList = [], rightList = [];
|
1595
|
-
|
1596
|
-
for (i = 0; i < fromColIndex.length; i++) {
|
1597
|
-
if (fromColIndex[i] < toMoveTo) {
|
1598
|
-
leftList.push(fromColIndex[i]);
|
1599
|
-
} else if (fromColIndex[i] > toMoveTo) {
|
1600
|
-
rightList.push(fromColIndex[i]);
|
1601
|
-
}
|
1602
|
-
}
|
1603
|
-
|
1604
|
-
for (i = 0; i < rightList.length; i++) {
|
1605
|
-
this._grid.moveColumn(rightList[i], toMoveTo + i);
|
1606
|
-
}
|
1607
|
-
|
1608
|
-
for (i = leftList.length - 1; i >= 0; i--) {
|
1609
|
-
toMoveTo--;
|
1610
|
-
|
1611
|
-
this._grid.moveColumn(leftList[i], toMoveTo);
|
1612
|
-
}
|
1613
|
-
|
1614
|
-
this._grid.freezeLayout(frozen);
|
1615
|
-
return true;
|
1616
|
+
return this._grid.moveColumn(fromColIndex, toColIndex);
|
1616
1617
|
};
|
1617
1618
|
|
1618
1619
|
/** The hidden column still occupies the same index.
|
@@ -1677,7 +1678,7 @@ Grid.prototype.addDataFields = function(fieldRef, referrer) {
|
|
1677
1678
|
|
1678
1679
|
if(!dataType) {
|
1679
1680
|
// wait field-info to be loaded before adding field
|
1680
|
-
onLoaded = this._onFieldLoaded.bind(this, field);
|
1681
|
+
onLoaded = this._onFieldLoaded.bind(this, field, referrer);
|
1681
1682
|
prom = prom.then(onLoaded).catch(onLoaded);
|
1682
1683
|
} else {
|
1683
1684
|
this._connector.addFields(field, referrer || "grid");
|
@@ -1703,6 +1704,16 @@ Grid.prototype.removeDataFields = function(fieldRef, referrer) {
|
|
1703
1704
|
this._connector.removeFields(fieldRef, referrer || "grid");
|
1704
1705
|
return true;
|
1705
1706
|
};
|
1707
|
+
/** @public
|
1708
|
+
* @param {string} referrer
|
1709
|
+
*/
|
1710
|
+
Grid.prototype.removeFieldReferrer = function(referrer) {
|
1711
|
+
if(!referrer) {
|
1712
|
+
return;
|
1713
|
+
}
|
1714
|
+
|
1715
|
+
this._connector.removeFieldReferrer(referrer);
|
1716
|
+
};
|
1706
1717
|
|
1707
1718
|
/** @public
|
1708
1719
|
* @param {Grid~ColumnReference} colRef
|
@@ -2329,6 +2340,40 @@ Grid.prototype.getColumnDefinition = function(colIndex) {
|
|
2329
2340
|
}
|
2330
2341
|
return null;
|
2331
2342
|
};
|
2343
|
+
|
2344
|
+
/** @public
|
2345
|
+
* @param {string} colId
|
2346
|
+
* @return {ColumnDefinition}
|
2347
|
+
*/
|
2348
|
+
Grid.prototype.getColumnDefinitionById = function(colId) {
|
2349
|
+
if(typeof colId === "string") {
|
2350
|
+
var colIndex = this.getColumnIndex(colId);
|
2351
|
+
var colData = this._grid.getColumnData(colIndex);
|
2352
|
+
if(colData) {
|
2353
|
+
return /** @type{ColumnDefinition} */(colData[COL_DEF]) || null;
|
2354
|
+
}
|
2355
|
+
}
|
2356
|
+
return null;
|
2357
|
+
};
|
2358
|
+
|
2359
|
+
/** @public
|
2360
|
+
* @param {Array.<string>} colIds
|
2361
|
+
* @return {ColumnDefinition}
|
2362
|
+
*/
|
2363
|
+
Grid.prototype.getColumnDefinitionsById = function(colIds) {
|
2364
|
+
var colCount = Array.isArray(colIds) ? colIds.length : 0;
|
2365
|
+
if(colCount > 0) {
|
2366
|
+
var i, colId;
|
2367
|
+
var colDefs = new Array(colCount);
|
2368
|
+
for(i = 0; i < colCount; i++) {
|
2369
|
+
colId = colIds[i];
|
2370
|
+
colDefs[i] = this.getColumnDefinitionById(colId);
|
2371
|
+
}
|
2372
|
+
return colDefs;
|
2373
|
+
}
|
2374
|
+
return null;
|
2375
|
+
|
2376
|
+
};
|
2332
2377
|
/** @private
|
2333
2378
|
* @param {Grid~ColumnReference} colRef
|
2334
2379
|
* @return {ColumnDefinition}
|
@@ -2342,7 +2387,7 @@ Grid.prototype._getColumnDefinition = function(colRef) {
|
|
2342
2387
|
var colCount = this.getColumnCount();
|
2343
2388
|
for(var i = 0; i < colCount; ++i) {
|
2344
2389
|
var colDef = this.getColumnDefinition(i);
|
2345
|
-
if(colDef.getField() === colRef) {
|
2390
|
+
if(colDef.getField() === colRef || colDef.getId() === colRef) {
|
2346
2391
|
return colDef; // Return the first found field
|
2347
2392
|
}
|
2348
2393
|
}
|
@@ -2534,7 +2579,7 @@ Grid.prototype.getColumnIndex = function(colRef) {
|
|
2534
2579
|
} else if(typeof colRef === "string") {
|
2535
2580
|
for(i = 0; i < colCount; ++i) {
|
2536
2581
|
colDef = this.getColumnDefinition(i);
|
2537
|
-
if(colDef.getField() === colRef) {
|
2582
|
+
if(colDef.getField() === colRef || colDef.getId() === colRef) {
|
2538
2583
|
return i; // Return the first found field
|
2539
2584
|
}
|
2540
2585
|
}
|
@@ -16,19 +16,19 @@ declare class ReferenceCounter {
|
|
16
16
|
|
17
17
|
public getSession(): any;
|
18
18
|
|
19
|
-
public addReference(key: string, referer?: string): boolean;
|
19
|
+
public addReference(key: string, referer?: string|null): boolean;
|
20
20
|
|
21
21
|
public addRef(key: string): boolean;
|
22
22
|
|
23
|
-
public removeReference(key: string, referer?: string, count?: number): boolean;
|
23
|
+
public removeReference(key: string, referer?: string|null, count?: number|null): boolean;
|
24
24
|
|
25
25
|
public release(key: string): void;
|
26
26
|
|
27
|
-
public addReferences(keys: (string|(string)[]|any), referer?: string): number;
|
27
|
+
public addReferences(keys: (string|(string)[]|any)|null, referer?: string|null): number;
|
28
28
|
|
29
|
-
public removeReferer(referer?: string): number;
|
29
|
+
public removeReferer(referer?: string|null): number;
|
30
30
|
|
31
|
-
public removeReferrer(referer?: string): number;
|
31
|
+
public removeReferrer(referer?: string|null): number;
|
32
32
|
|
33
33
|
public log(): void;
|
34
34
|
|
@@ -6,9 +6,9 @@ declare class RowDefSorter {
|
|
6
6
|
|
7
7
|
public dispose(): void;
|
8
8
|
|
9
|
-
public getSorter(rowSorting?: boolean): ((...params: any[]) => any)|null;
|
9
|
+
public getSorter(rowSorting?: boolean|null): ((...params: any[]) => any)|null;
|
10
10
|
|
11
|
-
public setSortLogic(func?: ((...params: any[]) => any)): void;
|
11
|
+
public setSortLogic(func?: ((...params: any[]) => any)|null): void;
|
12
12
|
|
13
13
|
public setField(field: string): void;
|
14
14
|
|
@@ -1,41 +1,41 @@
|
|
1
|
-
import { arrayToObject } from "../../tr-grid-util/es6/Util.js";
|
1
|
+
import { arrayToObject, cloneObject } from "../../tr-grid-util/es6/Util.js";
|
2
2
|
import { DataCache } from "../../core/es6/data/DataCache.js";
|
3
3
|
import { DataTable } from "../../core/es6/data/DataTable.js";
|
4
4
|
|
5
5
|
declare namespace RowDefinition {
|
6
6
|
|
7
7
|
type Options = {
|
8
|
-
ric?: string,
|
9
|
-
values?: (any[]|any),
|
10
|
-
fields?: (string)[],
|
11
|
-
asChain?: boolean,
|
12
|
-
chainRic?: string,
|
13
|
-
collapsed?: boolean,
|
14
|
-
label?: (string|null),
|
15
|
-
hidden?: boolean
|
8
|
+
ric?: string|null,
|
9
|
+
values?: (any[]|any)|null,
|
10
|
+
fields?: (string)[]|null,
|
11
|
+
asChain?: boolean|null,
|
12
|
+
chainRic?: string|null,
|
13
|
+
collapsed?: boolean|null,
|
14
|
+
label?: (string|null)|null,
|
15
|
+
hidden?: boolean|null
|
16
16
|
};
|
17
17
|
|
18
18
|
}
|
19
19
|
|
20
20
|
declare class RowDefinition {
|
21
21
|
|
22
|
-
constructor(rowOptions?: RowDefinition.Options);
|
22
|
+
constructor(rowOptions?: RowDefinition.Options|null);
|
23
23
|
|
24
24
|
public dispose(): void;
|
25
25
|
|
26
26
|
public isDisposed(): boolean;
|
27
27
|
|
28
|
-
public initialize(rowOptions?: RowDefinition.Options): void;
|
28
|
+
public initialize(rowOptions?: RowDefinition.Options|null): void;
|
29
29
|
|
30
30
|
public setContent(userInput: string): boolean;
|
31
31
|
|
32
32
|
public getRowId(): string;
|
33
33
|
|
34
|
-
public getConfigObject(rowOptions?: RowDefinition.Options): RowDefinition.Options|null;
|
34
|
+
public getConfigObject(rowOptions?: RowDefinition.Options|null): RowDefinition.Options|null;
|
35
35
|
|
36
36
|
public getDataId(): string;
|
37
37
|
|
38
|
-
public setDataSource(dataSource: DataCache): void;
|
38
|
+
public setDataSource(dataSource: DataCache|null): void;
|
39
39
|
|
40
40
|
public getDataSource(): DataCache|null;
|
41
41
|
|
@@ -43,9 +43,9 @@ declare class RowDefinition {
|
|
43
43
|
|
44
44
|
public getData(field: string): any;
|
45
45
|
|
46
|
-
public setStaticRowData(data: { [key: string]: any }|any[], opt_fields?: (string)[]): void;
|
46
|
+
public setStaticRowData(data: { [key: string]: any }|any[], opt_fields?: (string)[]|null): void;
|
47
47
|
|
48
|
-
public updateRowData(data: { [key: string]: any }|any[], opt_fields?: (string)[]): void;
|
48
|
+
public updateRowData(data: { [key: string]: any }|any[], opt_fields?: (string)[]|null): void;
|
49
49
|
|
50
50
|
public setStaticData(field: string, value: any): void;
|
51
51
|
|
@@ -65,7 +65,7 @@ declare class RowDefinition {
|
|
65
65
|
|
66
66
|
public isChain(): boolean;
|
67
67
|
|
68
|
-
public static hasChain(rowDef: RowDefinition): boolean;
|
68
|
+
public static hasChain(rowDef: RowDefinition|null): boolean;
|
69
69
|
|
70
70
|
public isChainCollapsed(): boolean;
|
71
71
|
|
@@ -75,7 +75,7 @@ declare class RowDefinition {
|
|
75
75
|
|
76
76
|
public isRealTimeRow(): boolean;
|
77
77
|
|
78
|
-
public subscribeForUpdates():
|
78
|
+
public subscribeForUpdates(): boolean;
|
79
79
|
|
80
80
|
public unsubscribeForUpdates(): any;
|
81
81
|
|
@@ -87,9 +87,9 @@ declare class RowDefinition {
|
|
87
87
|
|
88
88
|
public resetUpdates(): void;
|
89
89
|
|
90
|
-
public registerToView(view: DataTable, rowId?: string): void;
|
90
|
+
public registerToView(view: DataTable|null, rowId?: string|null): void;
|
91
91
|
|
92
|
-
public static deregisterFromView(rowIds: (string)[], rowDef: RowDefinition): (string)[]|null;
|
92
|
+
public static deregisterFromView(rowIds: (string)[]|null, rowDef: RowDefinition|null): (string)[]|null;
|
93
93
|
|
94
94
|
public collapseChain(): boolean;
|
95
95
|
|
@@ -99,7 +99,7 @@ declare class RowDefinition {
|
|
99
99
|
|
100
100
|
public getChildren(): (RowDefinition)[]|null;
|
101
101
|
|
102
|
-
public getDescendants(ary?: (RowDefinition)[]): (RowDefinition)[];
|
102
|
+
public getDescendants(ary?: (RowDefinition)[]|null): (RowDefinition)[];
|
103
103
|
|
104
104
|
public getAllDescendantIds(): (string)[]|null;
|
105
105
|
|
@@ -111,9 +111,9 @@ declare class RowDefinition {
|
|
111
111
|
|
112
112
|
public getUserModel(): any;
|
113
113
|
|
114
|
-
public static toRowId(rowDef: RowDefinition): string;
|
114
|
+
public static toRowId(rowDef: RowDefinition|null): string;
|
115
115
|
|
116
|
-
public static dispose(rowDef: RowDefinition): void;
|
116
|
+
public static dispose(rowDef: RowDefinition|null): void;
|
117
117
|
|
118
118
|
}
|
119
119
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { arrayToObject } from "../../tr-grid-util/es6/Util.js";
|
1
|
+
import { arrayToObject, cloneObject } from "../../tr-grid-util/es6/Util.js";
|
2
2
|
/* eslint-disable */
|
3
3
|
import { DataCache } from "../../core/es6/data/DataCache.js";
|
4
4
|
import { DataTable } from "../../core/es6/data/DataTable.js";
|
@@ -272,7 +272,12 @@ RowDefinition.prototype.setContent = function(userInput) {
|
|
272
272
|
this._dataId = this._rowId + this._ric; // JET/RTK will generate data id to be rowId (given from this rowDef) + ric;
|
273
273
|
|
274
274
|
// This will work for runtime ric modification, but not for first initilization.
|
275
|
-
this.subscribeForUpdates()
|
275
|
+
if(!this.subscribeForUpdates()) {
|
276
|
+
// Avoid losing the ROW_DEF pointer.
|
277
|
+
var rowData = {};
|
278
|
+
rowData[ROW_DEF] = this; // Enable tracking back and updating data
|
279
|
+
this.setRowData(rowData);
|
280
|
+
}
|
276
281
|
return true;
|
277
282
|
};
|
278
283
|
/** @public
|
@@ -294,7 +299,7 @@ RowDefinition.prototype.getConfigObject = function(rowOptions) {
|
|
294
299
|
|
295
300
|
val = this._staticValues;
|
296
301
|
if(val) {
|
297
|
-
obj["values"] = val;
|
302
|
+
obj["values"] = cloneObject(val);
|
298
303
|
}
|
299
304
|
|
300
305
|
val = this._chainRic;
|
@@ -551,15 +556,16 @@ RowDefinition.prototype.isRealTimeRow = function() {
|
|
551
556
|
};
|
552
557
|
|
553
558
|
/** @public
|
559
|
+
* @return {boolean} If a subscription is made, return true.
|
554
560
|
*/
|
555
561
|
RowDefinition.prototype.subscribeForUpdates = function() {
|
556
562
|
if(!this.isRealTimeRow()) {
|
557
|
-
return;
|
563
|
+
return false;
|
558
564
|
}
|
559
565
|
|
560
566
|
var subs = this._dc ? this._dc.getSubscriptions() : null;
|
561
567
|
if(!subs) {
|
562
|
-
return;
|
568
|
+
return false;
|
563
569
|
}
|
564
570
|
// TODO: Check if the same subscription is being made.
|
565
571
|
var prevRowData = this.unsubscribeForUpdates();
|
@@ -576,6 +582,7 @@ RowDefinition.prototype.subscribeForUpdates = function() {
|
|
576
582
|
} else {
|
577
583
|
this._dc.setRowData(this._dataId, {"X_RIC_NAME": this._ric, "ROW_DEF": this}); // Trigger data update immediately
|
578
584
|
}
|
585
|
+
return true;
|
579
586
|
};
|
580
587
|
/** @public
|
581
588
|
* @returns {*}
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import Grid from "./Grid.js";
|
1
2
|
import {Ext} from "../../tr-grid-util/es6/Ext.js";
|
2
3
|
import {EventDispatcher} from "../../tr-grid-util/es6/EventDispatcher.js";
|
3
4
|
|
@@ -7,13 +8,15 @@ declare class SnapshotFiller extends EventDispatcher {
|
|
7
8
|
|
8
9
|
public setRTK(rtk: any): void;
|
9
10
|
|
11
|
+
public setADCOptions(adcOptions: Grid.ADCOptions|null): void;
|
12
|
+
|
10
13
|
public addRic(ric: string): void;
|
11
14
|
|
12
|
-
public addRics(rics: (string)[]): boolean;
|
15
|
+
public addRics(rics: (string)[]|null): boolean;
|
13
16
|
|
14
17
|
public addField(str: string): void;
|
15
18
|
|
16
|
-
public addFields(fields: (string)[]): boolean;
|
19
|
+
public addFields(fields: (string)[]|null): boolean;
|
17
20
|
|
18
21
|
public static isValidField(str: string): boolean;
|
19
22
|
|