@refinitiv-ui/efx-grid 6.0.0-next.0
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/LICENSE +17 -0
- package/README.md +61 -0
- package/lib/column-format-dialog/index.d.ts +1 -0
- package/lib/column-format-dialog/index.js +1 -0
- package/lib/column-format-dialog/lib/column-format-dialog.d.ts +64 -0
- package/lib/column-format-dialog/lib/column-format-dialog.js +2713 -0
- package/lib/column-format-dialog/lib/locale/translation-de.d.ts +7 -0
- package/lib/column-format-dialog/lib/locale/translation-de.js +94 -0
- package/lib/column-format-dialog/lib/locale/translation-en.d.ts +7 -0
- package/lib/column-format-dialog/lib/locale/translation-en.js +94 -0
- package/lib/column-format-dialog/lib/locale/translation-ja.d.ts +7 -0
- package/lib/column-format-dialog/lib/locale/translation-ja.js +94 -0
- package/lib/column-format-dialog/lib/locale/translation-zh-hant.d.ts +7 -0
- package/lib/column-format-dialog/lib/locale/translation-zh-hant.js +94 -0
- package/lib/column-format-dialog/lib/locale/translation-zh.d.ts +7 -0
- package/lib/column-format-dialog/lib/locale/translation-zh.js +94 -0
- package/lib/column-format-dialog/lib/locale/translation.d.ts +11 -0
- package/lib/column-format-dialog/lib/locale/translation.js +18 -0
- package/lib/column-format-dialog/lib/preview-table.d.ts +151 -0
- package/lib/column-format-dialog/lib/preview-table.js +995 -0
- package/lib/column-format-dialog/themes/base.less +429 -0
- package/lib/column-format-dialog/themes/elemental/column-format-dialog.less +1 -0
- package/lib/column-format-dialog/themes/elemental/dark/column-format-dialog.js +4 -0
- package/lib/column-format-dialog/themes/elemental/dark/css/native-elements.css +0 -0
- package/lib/column-format-dialog/themes/elemental/dark/es5/all-elements.js +2 -0
- package/lib/column-format-dialog/themes/elemental/dark/imports/all-elements.js +1 -0
- package/lib/column-format-dialog/themes/elemental/dark/imports/custom-elements.js +1 -0
- package/lib/column-format-dialog/themes/elemental/dark/imports/native-elements.js +0 -0
- package/lib/column-format-dialog/themes/elemental/dark.js +16 -0
- package/lib/column-format-dialog/themes/elemental/defaults.less +1 -0
- package/lib/column-format-dialog/themes/elemental/index.less +5 -0
- package/lib/column-format-dialog/themes/elemental/light/column-format-dialog.js +4 -0
- package/lib/column-format-dialog/themes/elemental/light/css/native-elements.css +0 -0
- package/lib/column-format-dialog/themes/elemental/light/es5/all-elements.js +2 -0
- package/lib/column-format-dialog/themes/elemental/light/imports/all-elements.js +1 -0
- package/lib/column-format-dialog/themes/elemental/light/imports/custom-elements.js +1 -0
- package/lib/column-format-dialog/themes/elemental/light/imports/native-elements.js +0 -0
- package/lib/column-format-dialog/themes/elemental/light.js +16 -0
- package/lib/column-format-dialog/themes/halo/column-format-dialog.less +6 -0
- package/lib/column-format-dialog/themes/halo/dark/column-format-dialog.js +4 -0
- package/lib/column-format-dialog/themes/halo/dark/css/native-elements.css +0 -0
- package/lib/column-format-dialog/themes/halo/dark/es5/all-elements.js +2 -0
- package/lib/column-format-dialog/themes/halo/dark/imports/all-elements.js +1 -0
- package/lib/column-format-dialog/themes/halo/dark/imports/custom-elements.js +1 -0
- package/lib/column-format-dialog/themes/halo/dark/imports/native-elements.js +0 -0
- package/lib/column-format-dialog/themes/halo/dark.js +16 -0
- package/lib/column-format-dialog/themes/halo/defaults.less +1 -0
- package/lib/column-format-dialog/themes/halo/index.less +5 -0
- package/lib/column-format-dialog/themes/halo/light/column-format-dialog.js +4 -0
- package/lib/column-format-dialog/themes/halo/light/css/native-elements.css +0 -0
- package/lib/column-format-dialog/themes/halo/light/es5/all-elements.js +2 -0
- package/lib/column-format-dialog/themes/halo/light/imports/all-elements.js +1 -0
- package/lib/column-format-dialog/themes/halo/light/imports/custom-elements.js +1 -0
- package/lib/column-format-dialog/themes/halo/light/imports/native-elements.js +0 -0
- package/lib/column-format-dialog/themes/halo/light.js +16 -0
- package/lib/column-format-dialog/themes/luna/column-format-dialog.less +1 -0
- package/lib/column-format-dialog/themes/luna/default/column-format-dialog.js +4 -0
- package/lib/column-format-dialog/themes/luna/default/css/native-elements.css +0 -0
- package/lib/column-format-dialog/themes/luna/default/es5/all-elements.js +2 -0
- package/lib/column-format-dialog/themes/luna/default/imports/all-elements.js +1 -0
- package/lib/column-format-dialog/themes/luna/default/imports/custom-elements.js +1 -0
- package/lib/column-format-dialog/themes/luna/default/imports/native-elements.js +0 -0
- package/lib/column-format-dialog/themes/luna/defaults.less +1 -0
- package/lib/column-format-dialog/themes/luna/index.less +5 -0
- package/lib/column-format-dialog/themes/solar/charcoal/column-format-dialog.js +4 -0
- package/lib/column-format-dialog/themes/solar/charcoal/css/native-elements.css +0 -0
- package/lib/column-format-dialog/themes/solar/charcoal/es5/all-elements.js +2 -0
- package/lib/column-format-dialog/themes/solar/charcoal/imports/all-elements.js +1 -0
- package/lib/column-format-dialog/themes/solar/charcoal/imports/custom-elements.js +1 -0
- package/lib/column-format-dialog/themes/solar/charcoal/imports/native-elements.js +0 -0
- package/lib/column-format-dialog/themes/solar/charcoal.js +16 -0
- package/lib/column-format-dialog/themes/solar/column-format-dialog.less +6 -0
- package/lib/column-format-dialog/themes/solar/defaults.less +1 -0
- package/lib/column-format-dialog/themes/solar/index.less +5 -0
- package/lib/column-format-dialog/themes/solar/pearl/column-format-dialog.js +4 -0
- package/lib/column-format-dialog/themes/solar/pearl/css/native-elements.css +0 -0
- package/lib/column-format-dialog/themes/solar/pearl/es5/all-elements.js +2 -0
- package/lib/column-format-dialog/themes/solar/pearl/imports/all-elements.js +1 -0
- package/lib/column-format-dialog/themes/solar/pearl/imports/custom-elements.js +1 -0
- package/lib/column-format-dialog/themes/solar/pearl/imports/native-elements.js +0 -0
- package/lib/column-format-dialog/themes/solar/pearl.js +16 -0
- package/lib/column-selection-dialog/index.d.ts +1 -0
- package/lib/column-selection-dialog/index.js +1 -0
- package/lib/column-selection-dialog/lib/column-selection-dialog.d.ts +41 -0
- package/lib/column-selection-dialog/lib/column-selection-dialog.js +1410 -0
- package/lib/column-selection-dialog/lib/locale/translation-de.d.ts +7 -0
- package/lib/column-selection-dialog/lib/locale/translation-de.js +19 -0
- package/lib/column-selection-dialog/lib/locale/translation-en.d.ts +7 -0
- package/lib/column-selection-dialog/lib/locale/translation-en.js +19 -0
- package/lib/column-selection-dialog/lib/locale/translation-ja.d.ts +7 -0
- package/lib/column-selection-dialog/lib/locale/translation-ja.js +19 -0
- package/lib/column-selection-dialog/lib/locale/translation-zh-hant.d.ts +7 -0
- package/lib/column-selection-dialog/lib/locale/translation-zh-hant.js +19 -0
- package/lib/column-selection-dialog/lib/locale/translation-zh.d.ts +7 -0
- package/lib/column-selection-dialog/lib/locale/translation-zh.js +19 -0
- package/lib/column-selection-dialog/lib/locale/translation.d.ts +11 -0
- package/lib/column-selection-dialog/lib/locale/translation.js +18 -0
- package/lib/column-selection-dialog/themes/base.less +189 -0
- package/lib/column-selection-dialog/themes/elemental/column-selection-dialog.less +1 -0
- package/lib/column-selection-dialog/themes/elemental/dark/column-selection-dialog.js +4 -0
- package/lib/column-selection-dialog/themes/elemental/dark/css/native-elements.css +0 -0
- package/lib/column-selection-dialog/themes/elemental/dark/es5/all-elements.js +2 -0
- package/lib/column-selection-dialog/themes/elemental/dark/imports/all-elements.js +1 -0
- package/lib/column-selection-dialog/themes/elemental/dark/imports/custom-elements.js +1 -0
- package/lib/column-selection-dialog/themes/elemental/dark/imports/native-elements.js +0 -0
- package/lib/column-selection-dialog/themes/elemental/dark.js +6 -0
- package/lib/column-selection-dialog/themes/elemental/defaults.less +1 -0
- package/lib/column-selection-dialog/themes/elemental/index.less +5 -0
- package/lib/column-selection-dialog/themes/elemental/light/column-selection-dialog.js +4 -0
- package/lib/column-selection-dialog/themes/elemental/light/css/native-elements.css +0 -0
- package/lib/column-selection-dialog/themes/elemental/light/es5/all-elements.js +2 -0
- package/lib/column-selection-dialog/themes/elemental/light/imports/all-elements.js +1 -0
- package/lib/column-selection-dialog/themes/elemental/light/imports/custom-elements.js +1 -0
- package/lib/column-selection-dialog/themes/elemental/light/imports/native-elements.js +0 -0
- package/lib/column-selection-dialog/themes/elemental/light.js +6 -0
- package/lib/column-selection-dialog/themes/halo/column-selection-dialog.less +22 -0
- package/lib/column-selection-dialog/themes/halo/dark/column-selection-dialog.js +4 -0
- package/lib/column-selection-dialog/themes/halo/dark/css/native-elements.css +0 -0
- package/lib/column-selection-dialog/themes/halo/dark/es5/all-elements.js +2 -0
- package/lib/column-selection-dialog/themes/halo/dark/imports/all-elements.js +1 -0
- package/lib/column-selection-dialog/themes/halo/dark/imports/custom-elements.js +1 -0
- package/lib/column-selection-dialog/themes/halo/dark/imports/native-elements.js +0 -0
- package/lib/column-selection-dialog/themes/halo/dark.js +6 -0
- package/lib/column-selection-dialog/themes/halo/defaults.less +1 -0
- package/lib/column-selection-dialog/themes/halo/index.less +6 -0
- package/lib/column-selection-dialog/themes/halo/light/column-selection-dialog.js +4 -0
- package/lib/column-selection-dialog/themes/halo/light/css/native-elements.css +0 -0
- package/lib/column-selection-dialog/themes/halo/light/es5/all-elements.js +2 -0
- package/lib/column-selection-dialog/themes/halo/light/imports/all-elements.js +1 -0
- package/lib/column-selection-dialog/themes/halo/light/imports/custom-elements.js +1 -0
- package/lib/column-selection-dialog/themes/halo/light/imports/native-elements.js +0 -0
- package/lib/column-selection-dialog/themes/halo/light.js +6 -0
- package/lib/column-selection-dialog/themes/solar/charcoal/column-selection-dialog.js +4 -0
- package/lib/column-selection-dialog/themes/solar/charcoal/css/native-elements.css +0 -0
- package/lib/column-selection-dialog/themes/solar/charcoal/es5/all-elements.js +2 -0
- package/lib/column-selection-dialog/themes/solar/charcoal/imports/all-elements.js +1 -0
- package/lib/column-selection-dialog/themes/solar/charcoal/imports/custom-elements.js +1 -0
- package/lib/column-selection-dialog/themes/solar/charcoal/imports/native-elements.js +0 -0
- package/lib/column-selection-dialog/themes/solar/charcoal.js +6 -0
- package/lib/column-selection-dialog/themes/solar/column-selection-dialog.less +1 -0
- package/lib/column-selection-dialog/themes/solar/defaults.less +1 -0
- package/lib/column-selection-dialog/themes/solar/index.less +6 -0
- package/lib/column-selection-dialog/themes/solar/pearl/column-selection-dialog.js +4 -0
- package/lib/column-selection-dialog/themes/solar/pearl/css/native-elements.css +0 -0
- package/lib/column-selection-dialog/themes/solar/pearl/es5/all-elements.js +2 -0
- package/lib/column-selection-dialog/themes/solar/pearl/imports/all-elements.js +1 -0
- package/lib/column-selection-dialog/themes/solar/pearl/imports/custom-elements.js +1 -0
- package/lib/column-selection-dialog/themes/solar/pearl/imports/native-elements.js +0 -0
- package/lib/column-selection-dialog/themes/solar/pearl.js +6 -0
- package/lib/core/dist/core.css +1 -0
- package/lib/core/dist/core.js +28075 -0
- package/lib/core/dist/core.min.js +1 -0
- package/lib/core/es6/data/ColumnStats.d.ts +42 -0
- package/lib/core/es6/data/ColumnStats.js +428 -0
- package/lib/core/es6/data/DataCache.d.ts +81 -0
- package/lib/core/es6/data/DataCache.js +1317 -0
- package/lib/core/es6/data/DataTable.d.ts +125 -0
- package/lib/core/es6/data/DataTable.js +1655 -0
- package/lib/core/es6/data/DataView.d.ts +280 -0
- package/lib/core/es6/data/DataView.js +3654 -0
- package/lib/core/es6/data/Segment.d.ts +38 -0
- package/lib/core/es6/data/Segment.js +193 -0
- package/lib/core/es6/data/SegmentCollection.d.ts +58 -0
- package/lib/core/es6/data/SegmentCollection.js +431 -0
- package/lib/core/es6/grid/Core.d.ts +387 -0
- package/lib/core/es6/grid/Core.js +4939 -0
- package/lib/core/es6/grid/ILayoutGrid.d.ts +204 -0
- package/lib/core/es6/grid/ILayoutGrid.js +658 -0
- package/lib/core/es6/grid/LayoutGrid.d.ts +23 -0
- package/lib/core/es6/grid/LayoutGrid.js +2602 -0
- package/lib/core/es6/grid/VirtualizedLayoutGrid.d.ts +18 -0
- package/lib/core/es6/grid/VirtualizedLayoutGrid.js +907 -0
- package/lib/core/es6/grid/components/Cell.d.ts +50 -0
- package/lib/core/es6/grid/components/Cell.js +740 -0
- package/lib/core/es6/grid/components/CellFloatingPanel.d.ts +19 -0
- package/lib/core/es6/grid/components/CellFloatingPanel.js +123 -0
- package/lib/core/es6/grid/components/CellSpan.d.ts +18 -0
- package/lib/core/es6/grid/components/CellSpan.js +99 -0
- package/lib/core/es6/grid/components/CellSpans.d.ts +38 -0
- package/lib/core/es6/grid/components/CellSpans.js +341 -0
- package/lib/core/es6/grid/components/Column.d.ts +22 -0
- package/lib/core/es6/grid/components/Column.js +612 -0
- package/lib/core/es6/grid/components/ElementWrapper.d.ts +125 -0
- package/lib/core/es6/grid/components/ElementWrapper.js +714 -0
- package/lib/core/es6/grid/components/HScrollbar.d.ts +24 -0
- package/lib/core/es6/grid/components/HScrollbar.js +222 -0
- package/lib/core/es6/grid/components/Scrollbar.d.ts +61 -0
- package/lib/core/es6/grid/components/Scrollbar.js +1374 -0
- package/lib/core/es6/grid/components/StretchedCells.d.ts +17 -0
- package/lib/core/es6/grid/components/StretchedCells.js +328 -0
- package/lib/core/es6/grid/components/VScrollbar.d.ts +18 -0
- package/lib/core/es6/grid/components/VScrollbar.js +139 -0
- package/lib/core/es6/grid/components/VirtualItems.d.ts +12 -0
- package/lib/core/es6/grid/components/VirtualItems.js +51 -0
- package/lib/core/es6/grid/event/EventDispatcher.d.ts +16 -0
- package/lib/core/es6/grid/event/EventDispatcher.js +138 -0
- package/lib/core/es6/grid/event/EventListeners.d.ts +34 -0
- package/lib/core/es6/grid/event/EventListeners.js +163 -0
- package/lib/core/es6/grid/plugins/DragAndDropTitlePlugin.d.ts +24 -0
- package/lib/core/es6/grid/plugins/DragAndDropTitlePlugin.js +615 -0
- package/lib/core/es6/grid/plugins/Plugin.d.ts +28 -0
- package/lib/core/es6/grid/plugins/Plugin.js +272 -0
- package/lib/core/es6/grid/plugins/SortableTitlePlugin.d.ts +127 -0
- package/lib/core/es6/grid/plugins/SortableTitlePlugin.js +1707 -0
- package/lib/core/es6/grid/util/Conflator.d.ts +32 -0
- package/lib/core/es6/grid/util/Conflator.js +191 -0
- package/lib/core/es6/grid/util/ElementFrameWork.d.ts +18 -0
- package/lib/core/es6/grid/util/ElementFrameWork.js +227 -0
- package/lib/core/es6/grid/util/HttpRequest.d.ts +53 -0
- package/lib/core/es6/grid/util/HttpRequest.js +371 -0
- package/lib/core/es6/grid/util/PercentBar.d.ts +43 -0
- package/lib/core/es6/grid/util/PercentBar.js +390 -0
- package/lib/core/es6/grid/util/PercentBarRenderer.d.ts +41 -0
- package/lib/core/es6/grid/util/PercentBarRenderer.js +316 -0
- package/lib/core/es6/grid/util/RangeBar.d.ts +25 -0
- package/lib/core/es6/grid/util/RangeBar.js +255 -0
- package/lib/core/es6/grid/util/Reverter.d.ts +14 -0
- package/lib/core/es6/grid/util/Reverter.js +79 -0
- package/lib/core/es6/grid/util/SectionSettings.d.ts +79 -0
- package/lib/core/es6/grid/util/SectionSettings.js +674 -0
- package/lib/core/es6/grid/util/SelectionList.d.ts +50 -0
- package/lib/core/es6/grid/util/SelectionList.js +422 -0
- package/lib/core/es6/grid/util/TrackLayout.d.ts +84 -0
- package/lib/core/es6/grid/util/TrackLayout.js +850 -0
- package/lib/core/es6/grid/util/Virtualizer.d.ts +40 -0
- package/lib/core/es6/grid/util/Virtualizer.js +340 -0
- package/lib/core/es6/grid/util/util.d.ts +18 -0
- package/lib/core/es6/grid/util/util.js +450 -0
- package/lib/core/es6/index.d.ts +84 -0
- package/lib/core/es6/index.js +132 -0
- package/lib/core/es6/tr-grid-theme.d.ts +5 -0
- package/lib/core/es6/tr-grid-theme.js +5 -0
- package/lib/filter-dialog/index.d.ts +1 -0
- package/lib/filter-dialog/index.js +1 -0
- package/lib/filter-dialog/lib/checkbox-list.d.ts +27 -0
- package/lib/filter-dialog/lib/checkbox-list.js +336 -0
- package/lib/filter-dialog/lib/filter-dialog.d.ts +53 -0
- package/lib/filter-dialog/lib/filter-dialog.js +860 -0
- package/lib/filter-dialog/lib/locale/translation-de.d.ts +7 -0
- package/lib/filter-dialog/lib/locale/translation-de.js +37 -0
- package/lib/filter-dialog/lib/locale/translation-en.d.ts +7 -0
- package/lib/filter-dialog/lib/locale/translation-en.js +37 -0
- package/lib/filter-dialog/lib/locale/translation-ja.d.ts +7 -0
- package/lib/filter-dialog/lib/locale/translation-ja.js +37 -0
- package/lib/filter-dialog/lib/locale/translation-zh-hant.d.ts +7 -0
- package/lib/filter-dialog/lib/locale/translation-zh-hant.js +37 -0
- package/lib/filter-dialog/lib/locale/translation-zh.d.ts +7 -0
- package/lib/filter-dialog/lib/locale/translation-zh.js +37 -0
- package/lib/filter-dialog/lib/locale/translation.d.ts +11 -0
- package/lib/filter-dialog/lib/locale/translation.js +18 -0
- package/lib/filter-dialog/themes/base-checkbox.less +37 -0
- package/lib/filter-dialog/themes/base.less +102 -0
- package/lib/filter-dialog/themes/elemental/checkbox-list.less +3 -0
- package/lib/filter-dialog/themes/elemental/dark/checkbox-list.js +4 -0
- package/lib/filter-dialog/themes/elemental/dark/css/native-elements.css +0 -0
- package/lib/filter-dialog/themes/elemental/dark/es5/all-elements.js +4 -0
- package/lib/filter-dialog/themes/elemental/dark/filter-dialog.js +5 -0
- package/lib/filter-dialog/themes/elemental/dark/imports/all-elements.js +2 -0
- package/lib/filter-dialog/themes/elemental/dark/imports/custom-elements.js +2 -0
- package/lib/filter-dialog/themes/elemental/dark/imports/native-elements.js +0 -0
- package/lib/filter-dialog/themes/elemental/dark.js +11 -0
- package/lib/filter-dialog/themes/elemental/defaults.less +3 -0
- package/lib/filter-dialog/themes/elemental/filter-dialog.less +1 -0
- package/lib/filter-dialog/themes/elemental/index.less +6 -0
- package/lib/filter-dialog/themes/elemental/light/checkbox-list.js +4 -0
- package/lib/filter-dialog/themes/elemental/light/css/native-elements.css +0 -0
- package/lib/filter-dialog/themes/elemental/light/es5/all-elements.js +4 -0
- package/lib/filter-dialog/themes/elemental/light/filter-dialog.js +5 -0
- package/lib/filter-dialog/themes/elemental/light/imports/all-elements.js +2 -0
- package/lib/filter-dialog/themes/elemental/light/imports/custom-elements.js +2 -0
- package/lib/filter-dialog/themes/elemental/light/imports/native-elements.js +0 -0
- package/lib/filter-dialog/themes/elemental/light.js +11 -0
- package/lib/filter-dialog/themes/halo/checkbox-list.less +3 -0
- package/lib/filter-dialog/themes/halo/dark/checkbox-list.js +4 -0
- package/lib/filter-dialog/themes/halo/dark/css/native-elements.css +0 -0
- package/lib/filter-dialog/themes/halo/dark/es5/all-elements.js +4 -0
- package/lib/filter-dialog/themes/halo/dark/filter-dialog.js +5 -0
- package/lib/filter-dialog/themes/halo/dark/imports/all-elements.js +2 -0
- package/lib/filter-dialog/themes/halo/dark/imports/custom-elements.js +2 -0
- package/lib/filter-dialog/themes/halo/dark/imports/native-elements.js +0 -0
- package/lib/filter-dialog/themes/halo/dark.js +11 -0
- package/lib/filter-dialog/themes/halo/defaults.less +3 -0
- package/lib/filter-dialog/themes/halo/filter-dialog.less +9 -0
- package/lib/filter-dialog/themes/halo/index.less +6 -0
- package/lib/filter-dialog/themes/halo/light/checkbox-list.js +4 -0
- package/lib/filter-dialog/themes/halo/light/css/native-elements.css +0 -0
- package/lib/filter-dialog/themes/halo/light/es5/all-elements.js +4 -0
- package/lib/filter-dialog/themes/halo/light/filter-dialog.js +5 -0
- package/lib/filter-dialog/themes/halo/light/imports/all-elements.js +2 -0
- package/lib/filter-dialog/themes/halo/light/imports/custom-elements.js +2 -0
- package/lib/filter-dialog/themes/halo/light/imports/native-elements.js +0 -0
- package/lib/filter-dialog/themes/halo/light.js +11 -0
- package/lib/filter-dialog/themes/solar/charcoal/checkbox-list.js +4 -0
- package/lib/filter-dialog/themes/solar/charcoal/css/native-elements.css +0 -0
- package/lib/filter-dialog/themes/solar/charcoal/es5/all-elements.js +4 -0
- package/lib/filter-dialog/themes/solar/charcoal/filter-dialog.js +5 -0
- package/lib/filter-dialog/themes/solar/charcoal/imports/all-elements.js +2 -0
- package/lib/filter-dialog/themes/solar/charcoal/imports/custom-elements.js +2 -0
- package/lib/filter-dialog/themes/solar/charcoal/imports/native-elements.js +0 -0
- package/lib/filter-dialog/themes/solar/charcoal.js +11 -0
- package/lib/filter-dialog/themes/solar/checkbox-list.less +3 -0
- package/lib/filter-dialog/themes/solar/defaults.less +3 -0
- package/lib/filter-dialog/themes/solar/filter-dialog.less +5 -0
- package/lib/filter-dialog/themes/solar/index.less +6 -0
- package/lib/filter-dialog/themes/solar/pearl/checkbox-list.js +4 -0
- package/lib/filter-dialog/themes/solar/pearl/css/native-elements.css +0 -0
- package/lib/filter-dialog/themes/solar/pearl/es5/all-elements.js +4 -0
- package/lib/filter-dialog/themes/solar/pearl/filter-dialog.js +5 -0
- package/lib/filter-dialog/themes/solar/pearl/imports/all-elements.js +2 -0
- package/lib/filter-dialog/themes/solar/pearl/imports/custom-elements.js +2 -0
- package/lib/filter-dialog/themes/solar/pearl/imports/native-elements.js +0 -0
- package/lib/filter-dialog/themes/solar/pearl.js +11 -0
- package/lib/formatters/es6/CoralButtonFormatter.d.ts +22 -0
- package/lib/formatters/es6/CoralButtonFormatter.js +40 -0
- package/lib/formatters/es6/CoralCheckboxFormatter.d.ts +12 -0
- package/lib/formatters/es6/CoralCheckboxFormatter.js +45 -0
- package/lib/formatters/es6/CoralComboBoxFormatter.d.ts +23 -0
- package/lib/formatters/es6/CoralComboBoxFormatter.js +102 -0
- package/lib/formatters/es6/CoralIconFormatter.d.ts +23 -0
- package/lib/formatters/es6/CoralIconFormatter.js +45 -0
- package/lib/formatters/es6/CoralInputFormatter.d.ts +12 -0
- package/lib/formatters/es6/CoralInputFormatter.js +40 -0
- package/lib/formatters/es6/CoralRadioButtonFormatter.d.ts +22 -0
- package/lib/formatters/es6/CoralRadioButtonFormatter.js +80 -0
- package/lib/formatters/es6/CoralSelectFormatter.d.ts +23 -0
- package/lib/formatters/es6/CoralSelectFormatter.js +66 -0
- package/lib/formatters/es6/CoralToggleFormatter.d.ts +12 -0
- package/lib/formatters/es6/CoralToggleFormatter.js +47 -0
- package/lib/formatters/es6/DuplexEmeraldDateTimePickerFormatter.d.ts +14 -0
- package/lib/formatters/es6/DuplexEmeraldDateTimePickerFormatter.js +119 -0
- package/lib/formatters/es6/EFButtonFormatter.d.ts +22 -0
- package/lib/formatters/es6/EFButtonFormatter.js +40 -0
- package/lib/formatters/es6/EFCheckboxFormatter.d.ts +12 -0
- package/lib/formatters/es6/EFCheckboxFormatter.js +45 -0
- package/lib/formatters/es6/EFComboBoxFormatter.d.ts +23 -0
- package/lib/formatters/es6/EFComboBoxFormatter.js +68 -0
- package/lib/formatters/es6/EFDateTimePickerFormatter.d.ts +13 -0
- package/lib/formatters/es6/EFDateTimePickerFormatter.js +55 -0
- package/lib/formatters/es6/EFIconFormatter.d.ts +23 -0
- package/lib/formatters/es6/EFIconFormatter.js +45 -0
- package/lib/formatters/es6/EFNumberFieldFormatter.d.ts +12 -0
- package/lib/formatters/es6/EFNumberFieldFormatter.js +40 -0
- package/lib/formatters/es6/EFRadioButtonFormatter.d.ts +22 -0
- package/lib/formatters/es6/EFRadioButtonFormatter.js +80 -0
- package/lib/formatters/es6/EFSelectFormatter.d.ts +23 -0
- package/lib/formatters/es6/EFSelectFormatter.js +66 -0
- package/lib/formatters/es6/EFTextFieldFormatter.d.ts +12 -0
- package/lib/formatters/es6/EFTextFieldFormatter.js +40 -0
- package/lib/formatters/es6/EFToggleFormatter.d.ts +12 -0
- package/lib/formatters/es6/EFToggleFormatter.js +47 -0
- package/lib/formatters/es6/EmeraldDateTimePickerFormatter.d.ts +13 -0
- package/lib/formatters/es6/EmeraldDateTimePickerFormatter.js +55 -0
- package/lib/formatters/es6/FormatterBuilder.d.ts +22 -0
- package/lib/formatters/es6/FormatterBuilder.js +334 -0
- package/lib/formatters/es6/NumericInputFormatter.d.ts +13 -0
- package/lib/formatters/es6/NumericInputFormatter.js +64 -0
- package/lib/formatters/es6/PercentBarFormatter.d.ts +25 -0
- package/lib/formatters/es6/PercentBarFormatter.js +62 -0
- package/lib/formatters/es6/SimpleImageFormatter.d.ts +21 -0
- package/lib/formatters/es6/SimpleImageFormatter.js +64 -0
- package/lib/formatters/es6/SimpleInputFormatter.d.ts +12 -0
- package/lib/formatters/es6/SimpleInputFormatter.js +40 -0
- package/lib/formatters/es6/SimpleLinkFormatter.d.ts +21 -0
- package/lib/formatters/es6/SimpleLinkFormatter.js +48 -0
- package/lib/formatters/es6/SimpleTickerFormatter.d.ts +25 -0
- package/lib/formatters/es6/SimpleTickerFormatter.js +65 -0
- package/lib/formatters/es6/SimpleToggleFormatter.d.ts +22 -0
- package/lib/formatters/es6/SimpleToggleFormatter.js +132 -0
- package/lib/formatters/es6/TextFormatter.d.ts +12 -0
- package/lib/formatters/es6/TextFormatter.js +30 -0
- package/lib/formatters/es6/index.d.ts +43 -0
- package/lib/formatters/es6/index.js +67 -0
- package/lib/grid/index.d.ts +1 -0
- package/lib/grid/index.js +2 -0
- package/lib/grid/lib/efx-grid.d.ts +32 -0
- package/lib/grid/lib/efx-grid.js +469 -0
- package/lib/grid/themes/base.less +134 -0
- package/lib/grid/themes/halo/dark/css/native-elements.css +0 -0
- package/lib/grid/themes/halo/dark/efx-grid.js +4 -0
- package/lib/grid/themes/halo/dark/es5/all-elements.js +2 -0
- package/lib/grid/themes/halo/dark/imports/all-elements.js +1 -0
- package/lib/grid/themes/halo/dark/imports/custom-elements.js +1 -0
- package/lib/grid/themes/halo/dark/imports/native-elements.js +0 -0
- package/lib/grid/themes/halo/dark.js +3 -0
- package/lib/grid/themes/halo/efx-grid.less +92 -0
- package/lib/grid/themes/halo/index.less +3 -0
- package/lib/grid/themes/halo/light/css/native-elements.css +0 -0
- package/lib/grid/themes/halo/light/efx-grid.js +4 -0
- package/lib/grid/themes/halo/light/es5/all-elements.js +2 -0
- package/lib/grid/themes/halo/light/imports/all-elements.js +1 -0
- package/lib/grid/themes/halo/light/imports/custom-elements.js +1 -0
- package/lib/grid/themes/halo/light/imports/native-elements.js +0 -0
- package/lib/grid/themes/halo/light.js +3 -0
- package/lib/grid/themes/solar/charcoal/css/native-elements.css +0 -0
- package/lib/grid/themes/solar/charcoal/efx-grid.js +4 -0
- package/lib/grid/themes/solar/charcoal/es5/all-elements.js +2 -0
- package/lib/grid/themes/solar/charcoal/imports/all-elements.js +1 -0
- package/lib/grid/themes/solar/charcoal/imports/custom-elements.js +1 -0
- package/lib/grid/themes/solar/charcoal/imports/native-elements.js +0 -0
- package/lib/grid/themes/solar/charcoal.js +3 -0
- package/lib/grid/themes/solar/efx-grid.less +27 -0
- package/lib/grid/themes/solar/index.less +3 -0
- package/lib/grid/themes/solar/pearl/css/native-elements.css +0 -0
- package/lib/grid/themes/solar/pearl/efx-grid.js +4 -0
- package/lib/grid/themes/solar/pearl/es5/all-elements.js +2 -0
- package/lib/grid/themes/solar/pearl/imports/all-elements.js +1 -0
- package/lib/grid/themes/solar/pearl/imports/custom-elements.js +1 -0
- package/lib/grid/themes/solar/pearl/imports/native-elements.js +0 -0
- package/lib/grid/themes/solar/pearl.js +3 -0
- package/lib/index.d.ts +102 -0
- package/lib/index.js +102 -0
- package/lib/row-segmenting/es6/RowSegmenting.d.ts +83 -0
- package/lib/row-segmenting/es6/RowSegmenting.js +592 -0
- package/lib/row-segmenting/es6/index.d.ts +1 -0
- package/lib/row-segmenting/es6/index.js +1 -0
- package/lib/rt-grid/dist/rt-grid.js +44672 -0
- package/lib/rt-grid/dist/rt-grid.min.js +1 -0
- package/lib/rt-grid/es6/ColumnDefinition.d.ts +141 -0
- package/lib/rt-grid/es6/ColumnDefinition.js +1074 -0
- package/lib/rt-grid/es6/DataConnector.d.ts +37 -0
- package/lib/rt-grid/es6/DataConnector.js +266 -0
- package/lib/rt-grid/es6/FieldDefinition.d.ts +20 -0
- package/lib/rt-grid/es6/FieldDefinition.js +418 -0
- package/lib/rt-grid/es6/Grid.d.ts +261 -0
- package/lib/rt-grid/es6/Grid.js +2893 -0
- package/lib/rt-grid/es6/PredefinedFormula.d.ts +16 -0
- package/lib/rt-grid/es6/PredefinedFormula.js +33 -0
- package/lib/rt-grid/es6/ReferenceCounter.d.ts +38 -0
- package/lib/rt-grid/es6/ReferenceCounter.js +230 -0
- package/lib/rt-grid/es6/RowDefinition.d.ts +120 -0
- package/lib/rt-grid/es6/RowDefinition.js +873 -0
- package/lib/rt-grid/es6/SnapshotFiller.d.ts +21 -0
- package/lib/rt-grid/es6/SnapshotFiller.js +252 -0
- package/lib/rt-grid/es6/StyleLoader.d.ts +17 -0
- package/lib/rt-grid/es6/StyleLoader.js +47 -0
- package/lib/rt-grid/es6/index.d.ts +8 -0
- package/lib/rt-grid/es6/index.js +43 -0
- package/lib/statistics-row/es6/StatisticsRow.d.ts +67 -0
- package/lib/statistics-row/es6/StatisticsRow.js +786 -0
- package/lib/statistics-row/es6/index.d.ts +1 -0
- package/lib/statistics-row/es6/index.js +1 -0
- package/lib/tr-grid-auto-tooltip/es6/AutoTooltip.d.ts +45 -0
- package/lib/tr-grid-auto-tooltip/es6/AutoTooltip.js +431 -0
- package/lib/tr-grid-auto-tooltip/es6/index.d.ts +1 -0
- package/lib/tr-grid-auto-tooltip/es6/index.js +1 -0
- package/lib/tr-grid-cell-selection/es6/CellSelection.d.ts +67 -0
- package/lib/tr-grid-cell-selection/es6/CellSelection.js +1777 -0
- package/lib/tr-grid-cell-selection/es6/index.d.ts +1 -0
- package/lib/tr-grid-cell-selection/es6/index.js +1 -0
- package/lib/tr-grid-checkbox/es6/Checkbox.d.ts +69 -0
- package/lib/tr-grid-checkbox/es6/Checkbox.js +1476 -0
- package/lib/tr-grid-checkbox/es6/index.d.ts +1 -0
- package/lib/tr-grid-checkbox/es6/index.js +1 -0
- package/lib/tr-grid-column-fitter/es6/ColumnFitter.d.ts +56 -0
- package/lib/tr-grid-column-fitter/es6/ColumnFitter.js +1000 -0
- package/lib/tr-grid-column-fitter/es6/index.d.ts +1 -0
- package/lib/tr-grid-column-fitter/es6/index.js +1 -0
- package/lib/tr-grid-column-formatting/es6/ColumnFormatting.d.ts +89 -0
- package/lib/tr-grid-column-formatting/es6/ColumnFormatting.js +615 -0
- package/lib/tr-grid-column-formatting/es6/index.d.ts +1 -0
- package/lib/tr-grid-column-formatting/es6/index.js +1 -0
- package/lib/tr-grid-column-grouping/es6/ColumnGrouping.d.ts +60 -0
- package/lib/tr-grid-column-grouping/es6/ColumnGrouping.js +913 -0
- package/lib/tr-grid-column-grouping/es6/index.d.ts +1 -0
- package/lib/tr-grid-column-grouping/es6/index.js +1 -0
- package/lib/tr-grid-column-resizing/es6/ColumnResizing.d.ts +68 -0
- package/lib/tr-grid-column-resizing/es6/ColumnResizing.js +1013 -0
- package/lib/tr-grid-column-resizing/es6/index.d.ts +1 -0
- package/lib/tr-grid-column-resizing/es6/index.js +1 -0
- package/lib/tr-grid-column-selection/es6/ColumnSelection.d.ts +70 -0
- package/lib/tr-grid-column-selection/es6/ColumnSelection.js +928 -0
- package/lib/tr-grid-column-selection/es6/index.d.ts +1 -0
- package/lib/tr-grid-column-selection/es6/index.js +1 -0
- package/lib/tr-grid-column-stack/es6/ColumnStack.d.ts +76 -0
- package/lib/tr-grid-column-stack/es6/ColumnStack.js +1227 -0
- package/lib/tr-grid-column-stack/es6/index.d.ts +1 -0
- package/lib/tr-grid-column-stack/es6/index.js +1 -0
- package/lib/tr-grid-conditional-coloring/es6/ConditionalColoring.d.ts +70 -0
- package/lib/tr-grid-conditional-coloring/es6/ConditionalColoring.js +947 -0
- package/lib/tr-grid-conditional-coloring/es6/index.d.ts +1 -0
- package/lib/tr-grid-conditional-coloring/es6/index.js +1 -0
- package/lib/tr-grid-content-wrap/es6/ContentWrap.d.ts +43 -0
- package/lib/tr-grid-content-wrap/es6/ContentWrap.js +478 -0
- package/lib/tr-grid-content-wrap/es6/index.d.ts +1 -0
- package/lib/tr-grid-content-wrap/es6/index.js +1 -0
- package/lib/tr-grid-contextmenu/es6/ContextMenu.d.ts +83 -0
- package/lib/tr-grid-contextmenu/es6/ContextMenu.js +471 -0
- package/lib/tr-grid-contextmenu/es6/MenuEventAPI.d.ts +22 -0
- package/lib/tr-grid-contextmenu/es6/MenuEventAPI.js +133 -0
- package/lib/tr-grid-contextmenu/es6/MenuItem.d.ts +39 -0
- package/lib/tr-grid-contextmenu/es6/MenuItem.js +245 -0
- package/lib/tr-grid-contextmenu/es6/PopupMenu.d.ts +29 -0
- package/lib/tr-grid-contextmenu/es6/PopupMenu.js +292 -0
- package/lib/tr-grid-contextmenu/es6/index.d.ts +1 -0
- package/lib/tr-grid-contextmenu/es6/index.js +1 -0
- package/lib/tr-grid-filter-input/es6/FilterInput.d.ts +57 -0
- package/lib/tr-grid-filter-input/es6/FilterInput.js +928 -0
- package/lib/tr-grid-filter-input/es6/index.d.ts +1 -0
- package/lib/tr-grid-filter-input/es6/index.js +1 -0
- package/lib/tr-grid-heat-map/es6/HeatMap.d.ts +44 -0
- package/lib/tr-grid-heat-map/es6/HeatMap.js +394 -0
- package/lib/tr-grid-heat-map/es6/index.d.ts +1 -0
- package/lib/tr-grid-heat-map/es6/index.js +1 -0
- package/lib/tr-grid-in-cell-editing/es6/InCellEditing.d.ts +129 -0
- package/lib/tr-grid-in-cell-editing/es6/InCellEditing.js +1977 -0
- package/lib/tr-grid-in-cell-editing/es6/index.d.ts +1 -0
- package/lib/tr-grid-in-cell-editing/es6/index.js +1 -0
- package/lib/tr-grid-pagination/es6/Pagination.d.ts +57 -0
- package/lib/tr-grid-pagination/es6/Pagination.js +427 -0
- package/lib/tr-grid-pagination/es6/index.d.ts +1 -0
- package/lib/tr-grid-pagination/es6/index.js +1 -0
- package/lib/tr-grid-percent-bar/es6/PercentBar.d.ts +60 -0
- package/lib/tr-grid-percent-bar/es6/PercentBar.js +801 -0
- package/lib/tr-grid-percent-bar/es6/index.d.ts +1 -0
- package/lib/tr-grid-percent-bar/es6/index.js +1 -0
- package/lib/tr-grid-printer/es6/CellWriter.d.ts +49 -0
- package/lib/tr-grid-printer/es6/CellWriter.js +226 -0
- package/lib/tr-grid-printer/es6/ColumnWriter.d.ts +12 -0
- package/lib/tr-grid-printer/es6/ColumnWriter.js +21 -0
- package/lib/tr-grid-printer/es6/GridPrinter.d.ts +32 -0
- package/lib/tr-grid-printer/es6/GridPrinter.js +761 -0
- package/lib/tr-grid-printer/es6/PrintTrait.d.ts +38 -0
- package/lib/tr-grid-printer/es6/PrintTrait.js +481 -0
- package/lib/tr-grid-printer/es6/SectionWriter.d.ts +54 -0
- package/lib/tr-grid-printer/es6/SectionWriter.js +205 -0
- package/lib/tr-grid-printer/es6/index.d.ts +1 -0
- package/lib/tr-grid-printer/es6/index.js +1 -0
- package/lib/tr-grid-range-bar/es6/RangeBar.d.ts +39 -0
- package/lib/tr-grid-range-bar/es6/RangeBar.js +353 -0
- package/lib/tr-grid-range-bar/es6/index.d.ts +1 -0
- package/lib/tr-grid-range-bar/es6/index.js +1 -0
- package/lib/tr-grid-row-dragging/es6/RowDragging.d.ts +53 -0
- package/lib/tr-grid-row-dragging/es6/RowDragging.js +794 -0
- package/lib/tr-grid-row-dragging/es6/index.d.ts +1 -0
- package/lib/tr-grid-row-dragging/es6/index.js +1 -0
- package/lib/tr-grid-row-filtering/es6/RowFiltering.d.ts +118 -0
- package/lib/tr-grid-row-filtering/es6/RowFiltering.js +1884 -0
- package/lib/tr-grid-row-filtering/es6/index.d.ts +1 -0
- package/lib/tr-grid-row-filtering/es6/index.js +1 -0
- package/lib/tr-grid-row-grouping/es6/RowGrouping.d.ts +109 -0
- package/lib/tr-grid-row-grouping/es6/RowGrouping.js +1541 -0
- package/lib/tr-grid-row-grouping/es6/index.d.ts +1 -0
- package/lib/tr-grid-row-grouping/es6/index.js +1 -0
- package/lib/tr-grid-row-selection/es6/RowSelection.d.ts +74 -0
- package/lib/tr-grid-row-selection/es6/RowSelection.js +1202 -0
- package/lib/tr-grid-row-selection/es6/index.d.ts +1 -0
- package/lib/tr-grid-row-selection/es6/index.js +1 -0
- package/lib/tr-grid-rowcoloring/es6/RowColoring.d.ts +60 -0
- package/lib/tr-grid-rowcoloring/es6/RowColoring.js +611 -0
- package/lib/tr-grid-rowcoloring/es6/index.d.ts +1 -0
- package/lib/tr-grid-rowcoloring/es6/index.js +1 -0
- package/lib/tr-grid-textformatting/es6/TextFormatting.d.ts +77 -0
- package/lib/tr-grid-textformatting/es6/TextFormatting.js +574 -0
- package/lib/tr-grid-textformatting/es6/index.d.ts +1 -0
- package/lib/tr-grid-textformatting/es6/index.js +1 -0
- package/lib/tr-grid-titlewrap/es6/TitleWrap.d.ts +29 -0
- package/lib/tr-grid-titlewrap/es6/TitleWrap.js +431 -0
- package/lib/tr-grid-titlewrap/es6/index.d.ts +1 -0
- package/lib/tr-grid-titlewrap/es6/index.js +1 -0
- package/lib/tr-grid-util/es6/CellPainter.d.ts +136 -0
- package/lib/tr-grid-util/es6/CellPainter.js +1128 -0
- package/lib/tr-grid-util/es6/Conflator.d.ts +34 -0
- package/lib/tr-grid-util/es6/Conflator.js +193 -0
- package/lib/tr-grid-util/es6/CoralItems.d.ts +10 -0
- package/lib/tr-grid-util/es6/CoralItems.js +42 -0
- package/lib/tr-grid-util/es6/DateTime.d.ts +57 -0
- package/lib/tr-grid-util/es6/DateTime.js +508 -0
- package/lib/tr-grid-util/es6/Deferred.d.ts +14 -0
- package/lib/tr-grid-util/es6/Deferred.js +98 -0
- package/lib/tr-grid-util/es6/Delay.d.ts +20 -0
- package/lib/tr-grid-util/es6/Delay.js +85 -0
- package/lib/tr-grid-util/es6/Dom.d.ts +32 -0
- package/lib/tr-grid-util/es6/Dom.js +346 -0
- package/lib/tr-grid-util/es6/ElementObserver.d.ts +10 -0
- package/lib/tr-grid-util/es6/ElementObserver.js +101 -0
- package/lib/tr-grid-util/es6/ElementWrapper.d.ts +23 -0
- package/lib/tr-grid-util/es6/ElementWrapper.js +83 -0
- package/lib/tr-grid-util/es6/ElfDate.d.ts +26 -0
- package/lib/tr-grid-util/es6/ElfDate.js +163 -0
- package/lib/tr-grid-util/es6/ElfUtil.d.ts +33 -0
- package/lib/tr-grid-util/es6/ElfUtil.js +458 -0
- package/lib/tr-grid-util/es6/EventDispatcher.d.ts +26 -0
- package/lib/tr-grid-util/es6/EventDispatcher.js +161 -0
- package/lib/tr-grid-util/es6/ExpanderIcon.d.ts +27 -0
- package/lib/tr-grid-util/es6/ExpanderIcon.js +169 -0
- package/lib/tr-grid-util/es6/Ext.d.ts +10 -0
- package/lib/tr-grid-util/es6/Ext.js +52 -0
- package/lib/tr-grid-util/es6/FieldFormatter.d.ts +55 -0
- package/lib/tr-grid-util/es6/FieldFormatter.js +432 -0
- package/lib/tr-grid-util/es6/FilterBuilder.d.ts +48 -0
- package/lib/tr-grid-util/es6/FilterBuilder.js +521 -0
- package/lib/tr-grid-util/es6/FilterOperators.d.ts +41 -0
- package/lib/tr-grid-util/es6/FilterOperators.js +181 -0
- package/lib/tr-grid-util/es6/GridPlugin.d.ts +72 -0
- package/lib/tr-grid-util/es6/GridPlugin.js +747 -0
- package/lib/tr-grid-util/es6/Icon.d.ts +14 -0
- package/lib/tr-grid-util/es6/Icon.js +61 -0
- package/lib/tr-grid-util/es6/MouseDownTrait.d.ts +42 -0
- package/lib/tr-grid-util/es6/MouseDownTrait.js +237 -0
- package/lib/tr-grid-util/es6/MultiTableManager.d.ts +32 -0
- package/lib/tr-grid-util/es6/MultiTableManager.js +506 -0
- package/lib/tr-grid-util/es6/NumberFormatter.d.ts +83 -0
- package/lib/tr-grid-util/es6/NumberFormatter.js +471 -0
- package/lib/tr-grid-util/es6/PercentBar.d.ts +71 -0
- package/lib/tr-grid-util/es6/PercentBar.js +600 -0
- package/lib/tr-grid-util/es6/Perf.d.ts +32 -0
- package/lib/tr-grid-util/es6/Perf.js +162 -0
- package/lib/tr-grid-util/es6/Popup.d.ts +84 -0
- package/lib/tr-grid-util/es6/Popup.js +818 -0
- package/lib/tr-grid-util/es6/RangeBar.d.ts +33 -0
- package/lib/tr-grid-util/es6/RangeBar.js +259 -0
- package/lib/tr-grid-util/es6/RequestQueue.d.ts +30 -0
- package/lib/tr-grid-util/es6/RequestQueue.js +239 -0
- package/lib/tr-grid-util/es6/RowPainter.d.ts +23 -0
- package/lib/tr-grid-util/es6/RowPainter.js +188 -0
- package/lib/tr-grid-util/es6/SubTable.d.ts +74 -0
- package/lib/tr-grid-util/es6/SubTable.js +558 -0
- package/lib/tr-grid-util/es6/Table.d.ts +125 -0
- package/lib/tr-grid-util/es6/Table.js +790 -0
- package/lib/tr-grid-util/es6/TextHighlighter.d.ts +18 -0
- package/lib/tr-grid-util/es6/TextHighlighter.js +273 -0
- package/lib/tr-grid-util/es6/TickCodes.d.ts +8 -0
- package/lib/tr-grid-util/es6/TickCodes.js +33 -0
- package/lib/tr-grid-util/es6/Timer.d.ts +16 -0
- package/lib/tr-grid-util/es6/Timer.js +49 -0
- package/lib/tr-grid-util/es6/TouchProxy.d.ts +46 -0
- package/lib/tr-grid-util/es6/TouchProxy.js +212 -0
- package/lib/tr-grid-util/es6/Util.d.ts +65 -0
- package/lib/tr-grid-util/es6/Util.js +528 -0
- package/lib/tr-grid-util/es6/formula/ADCService.d.ts +11 -0
- package/lib/tr-grid-util/es6/formula/ADCService.js +72 -0
- package/lib/tr-grid-util/es6/formula/ADCSubscription.d.ts +17 -0
- package/lib/tr-grid-util/es6/formula/ADCSubscription.js +317 -0
- package/lib/tr-grid-util/es6/formula/AdFinService.d.ts +12 -0
- package/lib/tr-grid-util/es6/formula/AdFinService.js +61 -0
- package/lib/tr-grid-util/es6/formula/AdFinSubscription.d.ts +19 -0
- package/lib/tr-grid-util/es6/formula/AdFinSubscription.js +310 -0
- package/lib/tr-grid-util/es6/formula/Engine.d.ts +56 -0
- package/lib/tr-grid-util/es6/formula/Engine.js +592 -0
- package/lib/tr-grid-util/es6/formula/Formula.d.ts +68 -0
- package/lib/tr-grid-util/es6/formula/Formula.js +882 -0
- package/lib/tr-grid-util/es6/formula/IntervalSubscription.d.ts +16 -0
- package/lib/tr-grid-util/es6/formula/IntervalSubscription.js +165 -0
- package/lib/tr-grid-util/es6/formula/Realtime.d.ts +18 -0
- package/lib/tr-grid-util/es6/formula/Realtime.js +279 -0
- package/lib/tr-grid-util/es6/formula/RealtimeService.d.ts +18 -0
- package/lib/tr-grid-util/es6/formula/RealtimeService.js +203 -0
- package/lib/tr-grid-util/es6/formula/TSIService.d.ts +11 -0
- package/lib/tr-grid-util/es6/formula/TSIService.js +51 -0
- package/lib/tr-grid-util/es6/formula/TSISubscription.d.ts +18 -0
- package/lib/tr-grid-util/es6/formula/TSISubscription.js +1015 -0
- package/lib/tr-grid-util/es6/formula/VariableToken.d.ts +30 -0
- package/lib/tr-grid-util/es6/formula/VariableToken.js +314 -0
- package/lib/tr-grid-util/es6/formula/functions/AdFin.d.ts +9 -0
- package/lib/tr-grid-util/es6/formula/functions/AdFin.js +1778 -0
- package/lib/tr-grid-util/es6/formula/functions/Excel.d.ts +8 -0
- package/lib/tr-grid-util/es6/formula/functions/Excel.js +21 -0
- package/lib/tr-grid-util/es6/formula/functions/Info.d.ts +8 -0
- package/lib/tr-grid-util/es6/formula/functions/Info.js +192 -0
- package/lib/tr-grid-util/es6/formula/functions/Internal.d.ts +8 -0
- package/lib/tr-grid-util/es6/formula/functions/Internal.js +90 -0
- package/lib/tr-grid-util/es6/formula/functions/Logic.d.ts +12 -0
- package/lib/tr-grid-util/es6/formula/functions/Logic.js +176 -0
- package/lib/tr-grid-util/es6/formula/functions/Math.d.ts +18 -0
- package/lib/tr-grid-util/es6/formula/functions/Math.js +1624 -0
- package/lib/tr-grid-util/es6/formula/functions/Statistics.d.ts +18 -0
- package/lib/tr-grid-util/es6/formula/functions/Statistics.js +234 -0
- package/lib/tr-grid-util/es6/formula/functions/Text.d.ts +10 -0
- package/lib/tr-grid-util/es6/formula/functions/Text.js +676 -0
- package/lib/tr-grid-util/es6/index.d.ts +63 -0
- package/lib/tr-grid-util/es6/index.js +99 -0
- package/lib/tr-grid-util/es6/jet/CollectionDict.d.ts +28 -0
- package/lib/tr-grid-util/es6/jet/CollectionDict.js +141 -0
- package/lib/tr-grid-util/es6/jet/DataGenerator.d.ts +114 -0
- package/lib/tr-grid-util/es6/jet/DataGenerator.js +827 -0
- package/lib/tr-grid-util/es6/jet/DataSet.d.ts +8 -0
- package/lib/tr-grid-util/es6/jet/DataSet.js +392 -0
- package/lib/tr-grid-util/es6/jet/MockArchive.d.ts +21 -0
- package/lib/tr-grid-util/es6/jet/MockArchive.js +56 -0
- package/lib/tr-grid-util/es6/jet/MockJET.d.ts +25 -0
- package/lib/tr-grid-util/es6/jet/MockJET.js +63 -0
- package/lib/tr-grid-util/es6/jet/MockQuotes.d.ts +37 -0
- package/lib/tr-grid-util/es6/jet/MockQuotes.js +199 -0
- package/lib/tr-grid-util/es6/jet/MockQuotes2.d.ts +72 -0
- package/lib/tr-grid-util/es6/jet/MockQuotes2.js +564 -0
- package/lib/tr-grid-util/es6/jet/MockRTK.d.ts +8 -0
- package/lib/tr-grid-util/es6/jet/MockRTK.js +43 -0
- package/lib/tr-grid-util/es6/jet/index.d.ts +9 -0
- package/lib/tr-grid-util/es6/jet/index.js +18 -0
- package/lib/tr-grid-util/es6/jet/mockDataAPI.d.ts +11 -0
- package/lib/tr-grid-util/es6/jet/mockDataAPI.js +131 -0
- package/lib/tr-grid-util/es6/locale/translation-de.d.ts +7 -0
- package/lib/tr-grid-util/es6/locale/translation-de.js +51 -0
- package/lib/tr-grid-util/es6/locale/translation-en.d.ts +7 -0
- package/lib/tr-grid-util/es6/locale/translation-en.js +51 -0
- package/lib/tr-grid-util/es6/locale/translation-ja.d.ts +7 -0
- package/lib/tr-grid-util/es6/locale/translation-ja.js +51 -0
- package/lib/tr-grid-util/es6/locale/translation-zh-hant.d.ts +7 -0
- package/lib/tr-grid-util/es6/locale/translation-zh-hant.js +51 -0
- package/lib/tr-grid-util/es6/locale/translation-zh.d.ts +7 -0
- package/lib/tr-grid-util/es6/locale/translation-zh.js +51 -0
- package/lib/tr-grid-util/es6/locale/translation.d.ts +11 -0
- package/lib/tr-grid-util/es6/locale/translation.js +18 -0
- package/lib/types/es6/AutoTooltip.d.ts +45 -0
- package/lib/types/es6/CellSelection.d.ts +67 -0
- package/lib/types/es6/Checkbox.d.ts +69 -0
- package/lib/types/es6/ColumnFitter.d.ts +56 -0
- package/lib/types/es6/ColumnFormatting.d.ts +90 -0
- package/lib/types/es6/ColumnGrouping.d.ts +60 -0
- package/lib/types/es6/ColumnResizing.d.ts +68 -0
- package/lib/types/es6/ColumnSelection.d.ts +70 -0
- package/lib/types/es6/ColumnStack.d.ts +76 -0
- package/lib/types/es6/CompositeGrid/CollapsibleHeaderPlugin.d.ts +11 -0
- package/lib/types/es6/CompositeGrid/ColumnSelectionPlugin.d.ts +38 -0
- package/lib/types/es6/CompositeGrid/ColumnWidthAdjustingPlugin.d.ts +45 -0
- package/lib/types/es6/CompositeGrid/CompositeGrid.d.ts +287 -0
- package/lib/types/es6/CompositeGrid/DragAndDropTitlePlugin.d.ts +22 -0
- package/lib/types/es6/CompositeGrid/DraggableContentPlugin.d.ts +44 -0
- package/lib/types/es6/CompositeGrid/ResizableTitlePlugin.d.ts +30 -0
- package/lib/types/es6/CompositeGrid/RowSelectionPlugin.d.ts +42 -0
- package/lib/types/es6/CompositeGrid/TextWidthCalculator.d.ts +24 -0
- package/lib/types/es6/CompositeGrid/TreeIndentingPlugin.d.ts +46 -0
- package/lib/types/es6/CompositeGrid/index.d.ts +9 -0
- package/lib/types/es6/ConditionalColoring.d.ts +70 -0
- package/lib/types/es6/ContentWrap.d.ts +43 -0
- package/lib/types/es6/ContextMenu.d.ts +83 -0
- package/lib/types/es6/CoralButtonFormatter.d.ts +22 -0
- package/lib/types/es6/CoralCheckboxFormatter.d.ts +12 -0
- package/lib/types/es6/CoralComboBoxFormatter.d.ts +23 -0
- package/lib/types/es6/CoralIconFormatter.d.ts +23 -0
- package/lib/types/es6/CoralInputFormatter.d.ts +12 -0
- package/lib/types/es6/CoralRadioButtonFormatter.d.ts +22 -0
- package/lib/types/es6/CoralSelectFormatter.d.ts +23 -0
- package/lib/types/es6/CoralToggleFormatter.d.ts +12 -0
- package/lib/types/es6/Core/data/ColumnStats.d.ts +42 -0
- package/lib/types/es6/Core/data/DataCache.d.ts +81 -0
- package/lib/types/es6/Core/data/DataTable.d.ts +125 -0
- package/lib/types/es6/Core/data/DataView.d.ts +280 -0
- package/lib/types/es6/Core/data/Segment.d.ts +38 -0
- package/lib/types/es6/Core/data/SegmentCollection.d.ts +58 -0
- package/lib/types/es6/Core/grid/Core.d.ts +387 -0
- package/lib/types/es6/Core/grid/ILayoutGrid.d.ts +204 -0
- package/lib/types/es6/Core/grid/LayoutGrid.d.ts +23 -0
- package/lib/types/es6/Core/grid/VirtualizedLayoutGrid.d.ts +18 -0
- package/lib/types/es6/Core/grid/components/Cell.d.ts +50 -0
- package/lib/types/es6/Core/grid/components/CellFloatingPanel.d.ts +19 -0
- package/lib/types/es6/Core/grid/components/CellSpan.d.ts +18 -0
- package/lib/types/es6/Core/grid/components/CellSpans.d.ts +38 -0
- package/lib/types/es6/Core/grid/components/Column.d.ts +22 -0
- package/lib/types/es6/Core/grid/components/ElementWrapper.d.ts +125 -0
- package/lib/types/es6/Core/grid/components/HScrollbar.d.ts +24 -0
- package/lib/types/es6/Core/grid/components/Scrollbar.d.ts +61 -0
- package/lib/types/es6/Core/grid/components/StretchedCells.d.ts +17 -0
- package/lib/types/es6/Core/grid/components/VScrollbar.d.ts +18 -0
- package/lib/types/es6/Core/grid/components/VirtualItems.d.ts +12 -0
- package/lib/types/es6/Core/grid/event/EventDispatcher.d.ts +16 -0
- package/lib/types/es6/Core/grid/event/EventListeners.d.ts +34 -0
- package/lib/types/es6/Core/grid/plugins/DragAndDropTitlePlugin.d.ts +24 -0
- package/lib/types/es6/Core/grid/plugins/Plugin.d.ts +28 -0
- package/lib/types/es6/Core/grid/plugins/SortableTitlePlugin.d.ts +127 -0
- package/lib/types/es6/Core/grid/util/Conflator.d.ts +32 -0
- package/lib/types/es6/Core/grid/util/ElementFrameWork.d.ts +18 -0
- package/lib/types/es6/Core/grid/util/HttpRequest.d.ts +53 -0
- package/lib/types/es6/Core/grid/util/PercentBar.d.ts +43 -0
- package/lib/types/es6/Core/grid/util/PercentBarRenderer.d.ts +41 -0
- package/lib/types/es6/Core/grid/util/RangeBar.d.ts +25 -0
- package/lib/types/es6/Core/grid/util/Reverter.d.ts +14 -0
- package/lib/types/es6/Core/grid/util/SectionSettings.d.ts +79 -0
- package/lib/types/es6/Core/grid/util/SelectionList.d.ts +50 -0
- package/lib/types/es6/Core/grid/util/TrackLayout.d.ts +84 -0
- package/lib/types/es6/Core/grid/util/Virtualizer.d.ts +40 -0
- package/lib/types/es6/Core/grid/util/util.d.ts +18 -0
- package/lib/types/es6/Core/index.d.ts +84 -0
- package/lib/types/es6/Core/tr-grid-theme.d.ts +5 -0
- package/lib/types/es6/DuplexEmeraldDateTimePickerFormatter.d.ts +14 -0
- package/lib/types/es6/EFButtonFormatter.d.ts +22 -0
- package/lib/types/es6/EFCheckboxFormatter.d.ts +12 -0
- package/lib/types/es6/EFComboBoxFormatter.d.ts +23 -0
- package/lib/types/es6/EFDateTimePickerFormatter.d.ts +13 -0
- package/lib/types/es6/EFIconFormatter.d.ts +23 -0
- package/lib/types/es6/EFNumberFieldFormatter.d.ts +12 -0
- package/lib/types/es6/EFRadioButtonFormatter.d.ts +22 -0
- package/lib/types/es6/EFSelectFormatter.d.ts +23 -0
- package/lib/types/es6/EFTextFieldFormatter.d.ts +12 -0
- package/lib/types/es6/EFToggleFormatter.d.ts +12 -0
- package/lib/types/es6/EmeraldDateTimePickerFormatter.d.ts +13 -0
- package/lib/types/es6/ExtensionColumnOptions.d.ts +41 -0
- package/lib/types/es6/ExtensionOptions.d.ts +52 -0
- package/lib/types/es6/Extensions.d.ts +61 -0
- package/lib/types/es6/FilterInput.d.ts +57 -0
- package/lib/types/es6/FormatterBuilder.d.ts +22 -0
- package/lib/types/es6/GridFormatter.d.ts +63 -0
- package/lib/types/es6/HeatMap.d.ts +44 -0
- package/lib/types/es6/InCellEditing.d.ts +129 -0
- package/lib/types/es6/MenuEventAPI.d.ts +22 -0
- package/lib/types/es6/MenuItem.d.ts +39 -0
- package/lib/types/es6/NumericInputFormatter.d.ts +13 -0
- package/lib/types/es6/Pagination.d.ts +57 -0
- package/lib/types/es6/PercentBar.d.ts +60 -0
- package/lib/types/es6/PercentBarFormatter.d.ts +25 -0
- package/lib/types/es6/PopupMenu.d.ts +29 -0
- package/lib/types/es6/RangeBar.d.ts +39 -0
- package/lib/types/es6/RealtimeGrid/ColumnDefinition.d.ts +143 -0
- package/lib/types/es6/RealtimeGrid/DataConnector.d.ts +37 -0
- package/lib/types/es6/RealtimeGrid/FieldDefinition.d.ts +20 -0
- package/lib/types/es6/RealtimeGrid/Grid.d.ts +263 -0
- package/lib/types/es6/RealtimeGrid/PredefinedFormula.d.ts +16 -0
- package/lib/types/es6/RealtimeGrid/ReferenceCounter.d.ts +38 -0
- package/lib/types/es6/RealtimeGrid/RowDefinition.d.ts +120 -0
- package/lib/types/es6/RealtimeGrid/SnapshotFiller.d.ts +21 -0
- package/lib/types/es6/RealtimeGrid/StyleLoader.d.ts +17 -0
- package/lib/types/es6/RealtimeGrid/index.d.ts +8 -0
- package/lib/types/es6/RowColoring.d.ts +60 -0
- package/lib/types/es6/RowDragging.d.ts +53 -0
- package/lib/types/es6/RowFiltering.d.ts +118 -0
- package/lib/types/es6/RowGrouping.d.ts +109 -0
- package/lib/types/es6/RowSegmenting.d.ts +83 -0
- package/lib/types/es6/RowSelection.d.ts +74 -0
- package/lib/types/es6/SimpleImageFormatter.d.ts +21 -0
- package/lib/types/es6/SimpleInputFormatter.d.ts +12 -0
- package/lib/types/es6/SimpleLinkFormatter.d.ts +21 -0
- package/lib/types/es6/SimpleTickerFormatter.d.ts +25 -0
- package/lib/types/es6/SimpleToggleFormatter.d.ts +22 -0
- package/lib/types/es6/StatisticsRow.d.ts +67 -0
- package/lib/types/es6/TextFormatter.d.ts +12 -0
- package/lib/types/es6/TextFormatting.d.ts +77 -0
- package/lib/types/es6/TitleWrap.d.ts +29 -0
- package/lib/types/es6/Zoom.d.ts +51 -0
- package/lib/types/es6/index.d.ts +76 -0
- package/lib/types/index.d.ts +1 -0
- package/lib/versions.json +36 -0
- package/lib/window-exporter.js +13 -0
- package/lib/zoom/es6/Zoom.d.ts +51 -0
- package/lib/zoom/es6/Zoom.js +419 -0
- package/lib/zoom/es6/index.d.ts +1 -0
- package/lib/zoom/es6/index.js +1 -0
- package/package.json +42 -0
@@ -0,0 +1,1317 @@
|
|
1
|
+
import Ext from "../../../tr-grid-util/es6/Ext.js";
|
2
|
+
import EventDispatcher from "../grid/event/EventDispatcher.js";
|
3
|
+
|
4
|
+
/**
|
5
|
+
* Trigger when data within the table has been changed
|
6
|
+
* @event DataCache#dataChanged
|
7
|
+
* @property {boolean} globalChange Indicates a big change. User should expect all data has been change
|
8
|
+
* @property {string} type Type of changes. Possible values are "inserted", "removed", "updated", and undefined
|
9
|
+
* @property {string} rid Row Id
|
10
|
+
* @property {Object.<string, *>} rowData Column values of the changed row in JSON object format
|
11
|
+
*/
|
12
|
+
|
13
|
+
/**
|
14
|
+
* Trigger before DataCache#dataChanged. Perform any data update during the event will NOT cause more dataChanged events
|
15
|
+
* @event DataCache#dataComposed
|
16
|
+
*/
|
17
|
+
|
18
|
+
/**
|
19
|
+
* @constructor
|
20
|
+
* @extends {EventDispatcher}
|
21
|
+
*/
|
22
|
+
var DataCache = function () {
|
23
|
+
var _t = this;
|
24
|
+
|
25
|
+
_t._rows = {};
|
26
|
+
_t._subs = {};
|
27
|
+
_t._staticFields = {};
|
28
|
+
_t._onInsert = _t._onInsert.bind(_t);
|
29
|
+
_t._onUpdate = _t._onUpdate.bind(_t);
|
30
|
+
_t._onDelete = _t._onDelete.bind(_t);
|
31
|
+
_t._onBatchRequestADCData = _t._onBatchRequestADCData.bind(_t);
|
32
|
+
_t._onADCUpdate = _t._onADCUpdate.bind(_t);
|
33
|
+
_t._onADCError = _t._onADCError.bind(_t);
|
34
|
+
_t._onQ2DataChanged = _t._onQ2DataChanged.bind(_t);
|
35
|
+
_t._onQ2SubAdded = _t._onQ2SubAdded.bind(_t);
|
36
|
+
_t._onQ2SubRemoved = _t._onQ2SubRemoved.bind(_t);
|
37
|
+
|
38
|
+
_t._addEvent("dataComposed");
|
39
|
+
_t._addEvent("dataChanged");
|
40
|
+
};
|
41
|
+
Ext.inherits(DataCache, EventDispatcher);
|
42
|
+
|
43
|
+
//#region Public
|
44
|
+
/**
|
45
|
+
* @public
|
46
|
+
*/
|
47
|
+
DataCache.prototype.dispose = function () {
|
48
|
+
this.unlistenAll();
|
49
|
+
this.clearAllData(true);
|
50
|
+
this._quotes2 = null;
|
51
|
+
};
|
52
|
+
|
53
|
+
/**
|
54
|
+
* Deprecated. Built-in Data Service is deprecated due to the lack of flexibility. This API supports only Quotes2's "Subscriptions" object.
|
55
|
+
* @public
|
56
|
+
* @param {Object} subs Subscriptions object from JET.Quotes2
|
57
|
+
*/
|
58
|
+
DataCache.prototype.setSubscriptions = function (subs) {
|
59
|
+
if (this._quotes2) {
|
60
|
+
this._quotes2["removeEventListener"]("dataChanged", this._onQ2DataChanged);
|
61
|
+
this._quotes2["removeEventListener"]("subscriptionAdded", this._onQ2SubAdded);
|
62
|
+
this._quotes2["removeEventListener"]("subscriptionRemoved", this._onQ2SubRemoved);
|
63
|
+
}
|
64
|
+
|
65
|
+
this._quotes2 = subs;
|
66
|
+
|
67
|
+
if (this._quotes2) {
|
68
|
+
this._quotes2["addEventListener"]("dataChanged", this._onQ2DataChanged);
|
69
|
+
this._quotes2["addEventListener"]("subscriptionAdded", this._onQ2SubAdded);
|
70
|
+
this._quotes2["addEventListener"]("subscriptionRemoved", this._onQ2SubRemoved);
|
71
|
+
}
|
72
|
+
};
|
73
|
+
|
74
|
+
/**
|
75
|
+
* Deprecated. Built-in Data Service is deprecated due to the lack of flexibility.This API supports only Quotes2's
|
76
|
+
* "Subscriptions" object.
|
77
|
+
* @public
|
78
|
+
* @return {Object} subs Subscriptions object from JET.Quotes2
|
79
|
+
*/
|
80
|
+
DataCache.prototype.getSubscriptions = function () {
|
81
|
+
return this._quotes2;
|
82
|
+
};
|
83
|
+
|
84
|
+
/**
|
85
|
+
* Deprecated. Built-in Data Service is deprecated due to the lack of flexibility.
|
86
|
+
* @public
|
87
|
+
* @param {Object} sub Subscription object from JET.Quote
|
88
|
+
* @param {string=} opt_primaryRic Main RIC for creating Id or recalling subscription. This is because subscription
|
89
|
+
* object does not provide a way to access its data
|
90
|
+
* @param {Object=} opt_values Initial values
|
91
|
+
*/
|
92
|
+
DataCache.prototype.addSubscription = function (sub, opt_primaryRic, opt_values) {
|
93
|
+
if (this.getSubscription(sub["id"])) {
|
94
|
+
return;
|
95
|
+
}
|
96
|
+
|
97
|
+
var internalSub = {"s": sub, "rics": {}};
|
98
|
+
|
99
|
+
this._subs[sub["id"]] = internalSub;
|
100
|
+
|
101
|
+
if (!this._quotes2) {
|
102
|
+
sub["onNewRow"](this._onInsert);
|
103
|
+
sub["onUpdate"](this._onUpdate);
|
104
|
+
sub["onRemoveRow"](this._onDelete);
|
105
|
+
}
|
106
|
+
|
107
|
+
if (opt_primaryRic) {
|
108
|
+
internalSub["primary"] = opt_primaryRic;
|
109
|
+
|
110
|
+
if (!opt_values) {
|
111
|
+
opt_values = {};
|
112
|
+
}
|
113
|
+
|
114
|
+
this._onInsert(sub, opt_primaryRic, opt_values);
|
115
|
+
}
|
116
|
+
};
|
117
|
+
|
118
|
+
/**
|
119
|
+
* Deprecated. Built-in Data Service is deprecated due to the lack of flexibility.
|
120
|
+
* @public
|
121
|
+
* @param {Object} sub Subscription object from JET.Quote
|
122
|
+
*/
|
123
|
+
DataCache.prototype.removeSubscription = function (sub) { // All RICs associated to the subscription are removed
|
124
|
+
var subId = sub["id"];
|
125
|
+
|
126
|
+
if (!sub || !this._subs[subId]) {
|
127
|
+
return;
|
128
|
+
}
|
129
|
+
|
130
|
+
if (!this._quotes2) {
|
131
|
+
sub["stop"]();
|
132
|
+
}
|
133
|
+
|
134
|
+
var rics = this._subs[subId]["rics"];
|
135
|
+
|
136
|
+
for (var ric in rics) {
|
137
|
+
this.setRowData(subId + ric, null); // No subscription attached
|
138
|
+
}
|
139
|
+
|
140
|
+
delete this._subs[subId];
|
141
|
+
};
|
142
|
+
|
143
|
+
/**
|
144
|
+
* Deprecated. Built-in Data Service is deprecated due to the lack of flexibility.
|
145
|
+
* @public
|
146
|
+
*/
|
147
|
+
DataCache.prototype.startAllSubscriptions = function () {
|
148
|
+
if (this._quotes2) {
|
149
|
+
this._quotes2["start"]();
|
150
|
+
} else {
|
151
|
+
for (var key in this._subs) {
|
152
|
+
this._subs[key]["s"]["start"]();
|
153
|
+
}
|
154
|
+
}
|
155
|
+
};
|
156
|
+
|
157
|
+
/**
|
158
|
+
* Deprecated. Built-in Data Service is deprecated due to the lack of flexibility.
|
159
|
+
* @public
|
160
|
+
*/
|
161
|
+
DataCache.prototype.stopAllSubscriptions = function () {
|
162
|
+
if (this._quotes2) {
|
163
|
+
this._quotes2["stop"]();
|
164
|
+
} else {
|
165
|
+
for (var key in this._subs) {
|
166
|
+
this._subs[key]["s"]["stop"]();
|
167
|
+
}
|
168
|
+
}
|
169
|
+
};
|
170
|
+
|
171
|
+
/**
|
172
|
+
* @public
|
173
|
+
* @param {string} sub_id
|
174
|
+
* @return {Object} Subscription object from JET.Quote
|
175
|
+
*/
|
176
|
+
DataCache.prototype.getSubscription = function (sub_id) {
|
177
|
+
return (this._subs[sub_id]) ? this._subs[sub_id]["s"] : null;
|
178
|
+
};
|
179
|
+
|
180
|
+
/**
|
181
|
+
* @public
|
182
|
+
* @param {string} sub_id
|
183
|
+
* @return {string} ric that has been input when calling addSubscription
|
184
|
+
*/
|
185
|
+
DataCache.prototype.getPrimaryRic = function (sub_id) {
|
186
|
+
var subDef = this._subs[sub_id];
|
187
|
+
if (subDef) {
|
188
|
+
return subDef["primary"];
|
189
|
+
}
|
190
|
+
return "";
|
191
|
+
};
|
192
|
+
|
193
|
+
/**
|
194
|
+
* @public
|
195
|
+
* @param {boolean=} opt_suppressEvent
|
196
|
+
* @fires DataCache#dataChanged
|
197
|
+
*/
|
198
|
+
DataCache.prototype.clearAllData = function (opt_suppressEvent) { // All subscriptions are also removed
|
199
|
+
if (this._quotes2) {
|
200
|
+
this._quotes2["removeAllSubscriptions"]();
|
201
|
+
} else {
|
202
|
+
this.stopAllSubscriptions();
|
203
|
+
}
|
204
|
+
|
205
|
+
this._subs = {};
|
206
|
+
this._rows = {};
|
207
|
+
|
208
|
+
if (this._adcTimerId >= 0) {
|
209
|
+
clearTimeout(this._adcTimerId);
|
210
|
+
this._adcTimerId = -1;
|
211
|
+
}
|
212
|
+
|
213
|
+
this._adcRicMap = null;
|
214
|
+
|
215
|
+
if (!opt_suppressEvent) {
|
216
|
+
this._dispatchDataChange({"globalChange": true});
|
217
|
+
}
|
218
|
+
};
|
219
|
+
|
220
|
+
/**
|
221
|
+
* @public
|
222
|
+
* @param {Array.<string>|string} colId
|
223
|
+
* @param {boolean=} opt_suppressEvent
|
224
|
+
* @fires DataCache#dataChanged
|
225
|
+
*/
|
226
|
+
DataCache.prototype.clearColumnData = function (colId, opt_suppressEvent) {
|
227
|
+
var cids = (typeof colId === "string") ? [/** @type {string} */(colId)] : /** @type {Array.<string>} */(colId);
|
228
|
+
|
229
|
+
for (var i = cids.length; --i >= 0;) {
|
230
|
+
var cid = cids[i];
|
231
|
+
|
232
|
+
if (cid) {
|
233
|
+
for (var rid in this._rows) {
|
234
|
+
delete this._rows[rid][cid];
|
235
|
+
}
|
236
|
+
}
|
237
|
+
}
|
238
|
+
|
239
|
+
if (!opt_suppressEvent) {
|
240
|
+
this._dispatchDataChange({"globalChange": true});
|
241
|
+
}
|
242
|
+
};
|
243
|
+
|
244
|
+
/**
|
245
|
+
* @public
|
246
|
+
* @param {string} rid
|
247
|
+
* @param {string} cid
|
248
|
+
* @return {*}
|
249
|
+
*/
|
250
|
+
DataCache.prototype.getData = function (rid, cid) {
|
251
|
+
var row = this.getRowData(rid);
|
252
|
+
|
253
|
+
return (row) ? row[cid] : null;
|
254
|
+
};
|
255
|
+
|
256
|
+
/**
|
257
|
+
* Deprecated. Built-in Data Service is deprecated due to the lack of flexibility.
|
258
|
+
* @public
|
259
|
+
* @return {Object.<string, Array.<string>>} Map of Array of subscription object
|
260
|
+
*/
|
261
|
+
DataCache.prototype.getAllRics = function () { // Slow
|
262
|
+
var ricMap = {};
|
263
|
+
|
264
|
+
for (var subId in this._subs) {
|
265
|
+
var rics = this._subs[subId]["rics"];
|
266
|
+
|
267
|
+
for (var ric in rics) {
|
268
|
+
if (!ricMap[ric]) {
|
269
|
+
ricMap[ric] = [];
|
270
|
+
}
|
271
|
+
|
272
|
+
ricMap[ric].push(subId);
|
273
|
+
}
|
274
|
+
}
|
275
|
+
|
276
|
+
return ricMap; // No duplicate ric
|
277
|
+
};
|
278
|
+
|
279
|
+
/**
|
280
|
+
* @public
|
281
|
+
* @return {Array.<string>}
|
282
|
+
*/
|
283
|
+
DataCache.prototype.getAllRowIds = function () {
|
284
|
+
var rids = [];
|
285
|
+
|
286
|
+
for (var rid in this._rows) {
|
287
|
+
rids.push(rid);
|
288
|
+
}
|
289
|
+
|
290
|
+
return rids;
|
291
|
+
};
|
292
|
+
|
293
|
+
/**
|
294
|
+
* @public
|
295
|
+
* @param {string} rid ID of a row to be checked for its presence.
|
296
|
+
* @return {boolean} `true` if row was found, `false` if row was not found.
|
297
|
+
*/
|
298
|
+
DataCache.prototype.hasRowId = function (rid) {
|
299
|
+
return !!this._rows[rid];
|
300
|
+
};
|
301
|
+
|
302
|
+
/**
|
303
|
+
* @public
|
304
|
+
* @param {string} cid
|
305
|
+
* @return {!Array.<*>}
|
306
|
+
*/
|
307
|
+
DataCache.prototype.getColumnData = function (cid) {
|
308
|
+
var fieldRows = [];
|
309
|
+
|
310
|
+
for (var rid in this._rows) {
|
311
|
+
fieldRows.push(this._rows[rid][cid]);
|
312
|
+
}
|
313
|
+
|
314
|
+
return fieldRows;
|
315
|
+
};
|
316
|
+
|
317
|
+
/**
|
318
|
+
* @public
|
319
|
+
* @param {string} rid
|
320
|
+
* @return {Object.<string, *>}
|
321
|
+
*/
|
322
|
+
DataCache.prototype.getRowData = function (rid) {
|
323
|
+
return this._rows[rid] || null;
|
324
|
+
};
|
325
|
+
|
326
|
+
/**
|
327
|
+
* @public
|
328
|
+
* @param {Array.<string>} rids
|
329
|
+
* @param {number=} opt_from
|
330
|
+
* @param {number=} opt_to EXCLUSIVE
|
331
|
+
* @return {!Array.<Object>}
|
332
|
+
*/
|
333
|
+
DataCache.prototype.getMultipleRowData = function (rids, opt_from, opt_to) {
|
334
|
+
var len = rids.length;
|
335
|
+
|
336
|
+
if (opt_to == null) {
|
337
|
+
opt_to = len;
|
338
|
+
}
|
339
|
+
|
340
|
+
if (opt_to > len) {
|
341
|
+
opt_to = len;
|
342
|
+
}
|
343
|
+
|
344
|
+
if (!(opt_from > 0)) {
|
345
|
+
opt_from = 0;
|
346
|
+
}
|
347
|
+
|
348
|
+
var out_ary = new Array(len);
|
349
|
+
var rowMap = this._rows;
|
350
|
+
|
351
|
+
for (var i = opt_from; i < opt_to; ++i) {
|
352
|
+
out_ary[i] = rowMap[rids[i]] || null;
|
353
|
+
}
|
354
|
+
|
355
|
+
return out_ary;
|
356
|
+
};
|
357
|
+
|
358
|
+
/** Return a new copy of row data
|
359
|
+
* @public
|
360
|
+
* @return {!Array.<Object.<string, *>>}
|
361
|
+
*/
|
362
|
+
DataCache.prototype.getAllRowData = function () {
|
363
|
+
var rows = [];
|
364
|
+
var rowMap = this._rows;
|
365
|
+
|
366
|
+
for (var rid in rowMap) {
|
367
|
+
rows.push(rowMap[rid]);
|
368
|
+
}
|
369
|
+
|
370
|
+
return rows;
|
371
|
+
};
|
372
|
+
|
373
|
+
/**
|
374
|
+
* @public
|
375
|
+
* @param {string} rid Row Id
|
376
|
+
* @param {string} cid Column Id
|
377
|
+
* @param {*} value
|
378
|
+
* @return {boolean} Return true if there is any change, and false otherwise
|
379
|
+
* @fires DataCache#dataChanged
|
380
|
+
*/
|
381
|
+
DataCache.prototype.setData = function (rid, cid, value) { // Data changed event is always dispatched
|
382
|
+
var values = {};
|
383
|
+
|
384
|
+
values[cid] = value;
|
385
|
+
|
386
|
+
return this.setRowData(rid, values);
|
387
|
+
};
|
388
|
+
|
389
|
+
/**
|
390
|
+
* @public
|
391
|
+
* @param {string} rid
|
392
|
+
* @return {boolean}
|
393
|
+
*/
|
394
|
+
DataCache.prototype.hasDataCloudData = function (rid) {
|
395
|
+
if (!this._adcFields) {
|
396
|
+
return false;
|
397
|
+
}
|
398
|
+
|
399
|
+
var row = this.getRowData(rid);
|
400
|
+
|
401
|
+
if (!row) {
|
402
|
+
return false;
|
403
|
+
}
|
404
|
+
|
405
|
+
for (var i = this._adcFields.length; --i >= 0;) {
|
406
|
+
var data = row[this._adcFields[i]];
|
407
|
+
|
408
|
+
if (data != null) {
|
409
|
+
return true;
|
410
|
+
}
|
411
|
+
}
|
412
|
+
|
413
|
+
return false;
|
414
|
+
};
|
415
|
+
|
416
|
+
/**
|
417
|
+
* @public
|
418
|
+
* @param {string} rid Row Id
|
419
|
+
* @param {Object.<string, *>=} values Object where the key is column Id and value is the data to be set
|
420
|
+
* @param {Object=} opt_eventArg Additional arguments to be attached to the event fired
|
421
|
+
* @return {boolean} Return true if there is any change, and false otherwise
|
422
|
+
* @fires DataCache#dataChanged
|
423
|
+
*/
|
424
|
+
DataCache.prototype.setRowData = function (rid, values, opt_eventArg) { // Data changed event is always dispatched
|
425
|
+
var row = this.getRowData(rid);
|
426
|
+
var dirty = false;
|
427
|
+
var changes = null;
|
428
|
+
|
429
|
+
if (values) {
|
430
|
+
if (!row) {
|
431
|
+
row = values; // WARNING: Dangerous use of external reference. User may modify data without using DataCache's API
|
432
|
+
|
433
|
+
this._rows[rid] = row;
|
434
|
+
dirty = true;
|
435
|
+
|
436
|
+
} else {
|
437
|
+
for (var cid in values) {
|
438
|
+
row[cid] = values[cid];
|
439
|
+
dirty = true;
|
440
|
+
}
|
441
|
+
|
442
|
+
changes = values;
|
443
|
+
}
|
444
|
+
} else {
|
445
|
+
if (row) {
|
446
|
+
delete this._rows[rid];
|
447
|
+
dirty = true;
|
448
|
+
}
|
449
|
+
}
|
450
|
+
|
451
|
+
if (dirty && !this._composing) {
|
452
|
+
var e = opt_eventArg || {};
|
453
|
+
|
454
|
+
e["rid"] = rid;
|
455
|
+
|
456
|
+
if (changes) {
|
457
|
+
e["changes"] = changes;
|
458
|
+
}
|
459
|
+
|
460
|
+
e["rowData"] = row;
|
461
|
+
|
462
|
+
this._dispatchDataChange(e);
|
463
|
+
}
|
464
|
+
|
465
|
+
return dirty;
|
466
|
+
};
|
467
|
+
|
468
|
+
/**
|
469
|
+
* @public
|
470
|
+
* @param {string} rid
|
471
|
+
* @return {Object}
|
472
|
+
*/
|
473
|
+
DataCache.prototype.cloneRowData = function (rid) {
|
474
|
+
var fields = this._rows[rid];
|
475
|
+
|
476
|
+
if (!fields) {
|
477
|
+
return null;
|
478
|
+
}
|
479
|
+
|
480
|
+
var values = {};
|
481
|
+
|
482
|
+
for (var key in fields) {
|
483
|
+
if (key.indexOf("FREE_TEXT") === 0) { // TODO: This is not generic and will cause unintentional error. Also, it posts some performance penalty
|
484
|
+
continue; // Skip free text column
|
485
|
+
}
|
486
|
+
|
487
|
+
values[key] = fields[key];
|
488
|
+
}
|
489
|
+
|
490
|
+
return values;
|
491
|
+
};
|
492
|
+
|
493
|
+
/**
|
494
|
+
* Deprecated. Built-in Data Service is deprecated due to the lack of flexibility.
|
495
|
+
* @public
|
496
|
+
* @param {Array.<string>} fields
|
497
|
+
* @suppress {checkTypes}
|
498
|
+
*/
|
499
|
+
DataCache.prototype.addStaticFields = function (fields) {
|
500
|
+
if (!Array.isArray(fields)) {
|
501
|
+
return;
|
502
|
+
}
|
503
|
+
|
504
|
+
for (var i in fields) {
|
505
|
+
if (!this._staticFields[fields[i]]) {
|
506
|
+
this._staticFields[fields[i]] = 1;
|
507
|
+
} else {
|
508
|
+
this._staticFields[fields[i]]++;
|
509
|
+
}
|
510
|
+
}
|
511
|
+
};
|
512
|
+
|
513
|
+
/**
|
514
|
+
* Deprecated. Built-in Data Service is deprecated due to the lack of flexibility.
|
515
|
+
* @public
|
516
|
+
* @param {Array.<string>} fields
|
517
|
+
* @suppress {checkTypes}
|
518
|
+
*/
|
519
|
+
DataCache.prototype.removeStaticFields = function (fields) {
|
520
|
+
if (!Array.isArray(fields)) {
|
521
|
+
return;
|
522
|
+
}
|
523
|
+
|
524
|
+
for (var i in fields) {
|
525
|
+
if (this._staticFields[fields[i]]) {
|
526
|
+
this._staticFields[fields[i]]--;
|
527
|
+
|
528
|
+
if (this._staticFields[fields[i]] === 0) {
|
529
|
+
delete this._staticFields[fields[i]];
|
530
|
+
}
|
531
|
+
}
|
532
|
+
}
|
533
|
+
};
|
534
|
+
|
535
|
+
/**
|
536
|
+
* Deprecated. Built-in Data Service is deprecated due to the lack of flexibility.
|
537
|
+
* @public
|
538
|
+
*/
|
539
|
+
DataCache.prototype.resetStaticFields = function () {
|
540
|
+
this._staticFields = {};
|
541
|
+
};
|
542
|
+
|
543
|
+
/**
|
544
|
+
* Deprecated. Built-in Data Service is deprecated due to the lack of flexibility.
|
545
|
+
* @public
|
546
|
+
* @return {Object.<string, number>}
|
547
|
+
*/
|
548
|
+
DataCache.prototype.getStaticFields = function () {
|
549
|
+
return this._staticFields;
|
550
|
+
};
|
551
|
+
|
552
|
+
/**
|
553
|
+
* Construct a JSON object that is compatible with console.table()
|
554
|
+
* @public
|
555
|
+
* @param {Object=} options
|
556
|
+
* @return {!Array.<Object>} Return a JSON object that is compatible with console.table()
|
557
|
+
* @example
|
558
|
+
* var options = {
|
559
|
+
* "colNames": Array.<string>,
|
560
|
+
* "rowCount": number,
|
561
|
+
* "startIndex": number,
|
562
|
+
* "getter": function(Object, string):*,
|
563
|
+
* "withRowIds": boolean
|
564
|
+
* };
|
565
|
+
*/
|
566
|
+
DataCache.prototype.dump = function (options) {
|
567
|
+
return DataCache.constructTable(this.getAllRowData(), options, Object.keys(this._rows));
|
568
|
+
};
|
569
|
+
|
570
|
+
/**
|
571
|
+
* Print current data and structure to console panel
|
572
|
+
* @public
|
573
|
+
* @param {Object=} opt_options
|
574
|
+
* @example
|
575
|
+
* var options = {
|
576
|
+
* "colNames": Array.<string>,
|
577
|
+
* "rowCount": number,
|
578
|
+
* "startIndex": number,
|
579
|
+
* "getter": function(Object, string):*,
|
580
|
+
* "withRowIds": boolean
|
581
|
+
* };
|
582
|
+
*/
|
583
|
+
DataCache.prototype.log = function (opt_options) {
|
584
|
+
console.table(this.dump(opt_options));
|
585
|
+
};
|
586
|
+
|
587
|
+
//#region ADC
|
588
|
+
/** Deprecated. Built-in Data Service is deprecated due to the lack of flexibility.
|
589
|
+
* @public
|
590
|
+
* @param {string} userId
|
591
|
+
* @param {string} productId
|
592
|
+
* @param {string} url
|
593
|
+
* @param {string=} opt_lang
|
594
|
+
*/
|
595
|
+
DataCache.prototype.setDataCloudSettings = function (userId, productId, url, opt_lang) {
|
596
|
+
if (userId != null) {
|
597
|
+
this._userId = userId;
|
598
|
+
}
|
599
|
+
|
600
|
+
if (productId != null) {
|
601
|
+
this._productId = productId;
|
602
|
+
}
|
603
|
+
|
604
|
+
if (url != null) {
|
605
|
+
this._adcUrl = url;
|
606
|
+
}
|
607
|
+
|
608
|
+
if (opt_lang) {
|
609
|
+
this._lang = opt_lang;
|
610
|
+
}
|
611
|
+
};
|
612
|
+
|
613
|
+
/**
|
614
|
+
* Deprecated. Built-in Data Service is deprecated due to the lack of flexibility.
|
615
|
+
* @public
|
616
|
+
* @return {Array.<string>}
|
617
|
+
*/
|
618
|
+
DataCache.prototype.getDataCloudFields = function () {
|
619
|
+
return this._adcFields; // Return private members
|
620
|
+
};
|
621
|
+
|
622
|
+
/**
|
623
|
+
* Deprecated. Built-in Data Service is deprecated due to the lack of flexibility.
|
624
|
+
* @public
|
625
|
+
* @param {Array.<string>|string} fields
|
626
|
+
* @return {boolean} Return true if success, and false otherwise
|
627
|
+
*/
|
628
|
+
DataCache.prototype.addDataCloudFields = function (fields) {
|
629
|
+
if (!this._adcFields) {
|
630
|
+
this._adcFields = [];
|
631
|
+
this._adcRefMap = {};
|
632
|
+
}
|
633
|
+
|
634
|
+
var newFields = [];
|
635
|
+
|
636
|
+
if (fields instanceof Array) {
|
637
|
+
for (var i = fields.length; --i >= 0;) {
|
638
|
+
this._addDataCloudField(fields[i], newFields);
|
639
|
+
}
|
640
|
+
} else {
|
641
|
+
this._addDataCloudField(/** @type {string} */(fields), newFields);
|
642
|
+
}
|
643
|
+
|
644
|
+
if (newFields.length <= 0) {
|
645
|
+
return false;
|
646
|
+
}
|
647
|
+
|
648
|
+
var ricMap = this.getAllRics();
|
649
|
+
|
650
|
+
this._batchRequestDataCloud(ricMap, newFields);
|
651
|
+
|
652
|
+
return true;
|
653
|
+
};
|
654
|
+
|
655
|
+
/**
|
656
|
+
* Deprecated. Built-in Data Service is deprecated due to the lack of flexibility.
|
657
|
+
* @public
|
658
|
+
* @param {string} field
|
659
|
+
* @return {boolean} Return true if success, and false otherwise
|
660
|
+
*/
|
661
|
+
DataCache.prototype.removeDataCloudField = function (field) {
|
662
|
+
if (!this._adcFields) {
|
663
|
+
return false;
|
664
|
+
}
|
665
|
+
|
666
|
+
if (!this._adcRefMap[field]) {
|
667
|
+
return false;
|
668
|
+
}
|
669
|
+
|
670
|
+
--this._adcRefMap[field];
|
671
|
+
|
672
|
+
if (!this._adcRefMap[field]) {
|
673
|
+
var foundAt = this._adcFields.indexOf(field);
|
674
|
+
|
675
|
+
this._adcFields.splice(foundAt, 1);
|
676
|
+
this.clearColumnData(field);
|
677
|
+
}
|
678
|
+
|
679
|
+
return true;
|
680
|
+
};
|
681
|
+
//#endregion ADC
|
682
|
+
//#endregion Public
|
683
|
+
|
684
|
+
/**
|
685
|
+
* @protected
|
686
|
+
* @ignore
|
687
|
+
* @param {!Object} e
|
688
|
+
* @fires DataTable#dataComposed
|
689
|
+
* @fires DataTable#dataChanged
|
690
|
+
*/
|
691
|
+
DataCache.prototype._dispatchDataChange = function (e) {
|
692
|
+
if (this._composing) {
|
693
|
+
return;
|
694
|
+
}
|
695
|
+
|
696
|
+
this._composing = true;
|
697
|
+
this._dispatch("dataComposed", e);
|
698
|
+
this._composing = false;
|
699
|
+
this._dispatch("dataChanged", e);
|
700
|
+
};
|
701
|
+
|
702
|
+
/**
|
703
|
+
* @private
|
704
|
+
* @param {string} propertyName
|
705
|
+
* @param {Object} rowData
|
706
|
+
* @param {string} colName
|
707
|
+
* @return {*}
|
708
|
+
*/
|
709
|
+
DataCache._defaultPropertyGetter = function (propertyName, rowData, colName) {
|
710
|
+
var d = rowData[colName];
|
711
|
+
|
712
|
+
return d ? d[propertyName] : null;
|
713
|
+
};
|
714
|
+
|
715
|
+
/**
|
716
|
+
* @private
|
717
|
+
* @param {Object} rowData
|
718
|
+
* @param {string} colName
|
719
|
+
* @return {*}
|
720
|
+
*/
|
721
|
+
DataCache._defaultGetter = function (rowData, colName) {
|
722
|
+
return rowData[colName];
|
723
|
+
};
|
724
|
+
|
725
|
+
|
726
|
+
/** Construct a JSON object that is compatible with console.table()
|
727
|
+
* @public
|
728
|
+
* @ignore
|
729
|
+
* @param {!Array.<Object>} dataset
|
730
|
+
* @param {Object=} opt_options { "rowCount": number, "colNames": Array.<string>, "getter": function(Object, string):*, startIndex: number, "withRowIds": boolean }
|
731
|
+
* @param {Array.<string>=} opt_rowIds Optional row ids corresponding to the given dataset
|
732
|
+
* @return {!Array.<Object>} Return a JSON object that is compatible with console.table()
|
733
|
+
*/
|
734
|
+
DataCache.constructTable = function (dataset, opt_options, opt_rowIds) {
|
735
|
+
var startIndex = 0;
|
736
|
+
var rLen = dataset.length;
|
737
|
+
var rowLim = rLen;
|
738
|
+
var colMap = null;
|
739
|
+
var rids = opt_rowIds || null;
|
740
|
+
var getter = DataCache._defaultGetter;
|
741
|
+
var transformation = false;
|
742
|
+
|
743
|
+
if (opt_options) {
|
744
|
+
if (opt_options["rowCount"]) {
|
745
|
+
rowLim = opt_options["rowCount"];
|
746
|
+
transformation = true;
|
747
|
+
}
|
748
|
+
|
749
|
+
if (opt_options["colNames"]) {
|
750
|
+
colMap = {};
|
751
|
+
|
752
|
+
var len = opt_options["colNames"].length;
|
753
|
+
|
754
|
+
for (var i = 0; i < len; ++i) {
|
755
|
+
colMap[opt_options["colNames"][i]] = true;
|
756
|
+
}
|
757
|
+
|
758
|
+
transformation = true;
|
759
|
+
}
|
760
|
+
|
761
|
+
if (opt_options["getter"]) {
|
762
|
+
if (typeof opt_options["getter"] == "string") {
|
763
|
+
getter = DataCache._defaultPropertyGetter.bind(null, opt_options["getter"]);
|
764
|
+
} else { // Function
|
765
|
+
getter = opt_options["getter"];
|
766
|
+
}
|
767
|
+
|
768
|
+
transformation = true;
|
769
|
+
}
|
770
|
+
|
771
|
+
if (opt_options["startIndex"]) {
|
772
|
+
startIndex = /** @type{number} */(opt_options["startIndex"]);
|
773
|
+
transformation = true;
|
774
|
+
}
|
775
|
+
|
776
|
+
if (opt_options["withRowIds"] === false) {
|
777
|
+
rids = null;
|
778
|
+
}
|
779
|
+
}
|
780
|
+
|
781
|
+
if (!transformation && !rids) {
|
782
|
+
return dataset; // The dataset is already compatible with console.table
|
783
|
+
}
|
784
|
+
|
785
|
+
var rows = [];
|
786
|
+
|
787
|
+
for (var r = startIndex; r < rLen; ++r) {
|
788
|
+
if (rows.length >= rowLim) {
|
789
|
+
break;
|
790
|
+
}
|
791
|
+
|
792
|
+
var rowData = dataset[r];
|
793
|
+
var columns = (rids) ? {"rid": rids[r]} : {};
|
794
|
+
|
795
|
+
if (rowData) { // Header and footer don't have any row data
|
796
|
+
var colName;
|
797
|
+
|
798
|
+
if (colMap) {
|
799
|
+
for (colName in colMap) {
|
800
|
+
if (rowData[colName] != null) {
|
801
|
+
columns[colName] = getter(rowData, colName);
|
802
|
+
}
|
803
|
+
}
|
804
|
+
} else {
|
805
|
+
for (colName in rowData) {
|
806
|
+
columns[colName] = getter(rowData, colName);
|
807
|
+
}
|
808
|
+
}
|
809
|
+
}
|
810
|
+
|
811
|
+
rows.push(columns);
|
812
|
+
}
|
813
|
+
|
814
|
+
return rows;
|
815
|
+
};
|
816
|
+
|
817
|
+
|
818
|
+
//#region Private
|
819
|
+
/**
|
820
|
+
* For Quotes2 only
|
821
|
+
* @private
|
822
|
+
* @param {string} subId
|
823
|
+
* @param {string} ric
|
824
|
+
* @param {Object.<string, *>} values
|
825
|
+
*/
|
826
|
+
DataCache.prototype._insertRic = function (subId, ric, values) {
|
827
|
+
// HACK: Some chain may have 0# symbol in there chain index (e.g. 0#CL:)
|
828
|
+
ric = ric.replace("0#", "");
|
829
|
+
|
830
|
+
var rid = subId + ric;
|
831
|
+
|
832
|
+
// We cannot cache event arguments because user may want to collect all the updates
|
833
|
+
this._onADCForNewRic(subId, ric);
|
834
|
+
|
835
|
+
if (!this.getRowData(rid)) { // Ensure that we have subscription id and ric from Quotes2
|
836
|
+
var tmp = values;
|
837
|
+
|
838
|
+
values = {}; // Clone a new object for duplicated ric
|
839
|
+
|
840
|
+
for (var key in tmp) { // Slow
|
841
|
+
values[key] = tmp[key];
|
842
|
+
}
|
843
|
+
|
844
|
+
values["SUB_ID"] = subId;
|
845
|
+
values["RIC"] = ric;
|
846
|
+
}
|
847
|
+
|
848
|
+
this.setRowData(rid, values);
|
849
|
+
};
|
850
|
+
|
851
|
+
/**
|
852
|
+
* @private
|
853
|
+
* @param {Object} e
|
854
|
+
*/
|
855
|
+
DataCache.prototype._onQ2DataChanged = function (e) {
|
856
|
+
var subId = e["subId"];
|
857
|
+
var ric = e["ric"];
|
858
|
+
var values = /** @type{Object.<string, *>} */(e["values"]);
|
859
|
+
|
860
|
+
if (values) {
|
861
|
+
this._insertRic(subId, ric, values);
|
862
|
+
} else { // Remove ric
|
863
|
+
delete this._subs[subId]["rics"][ric];
|
864
|
+
|
865
|
+
this.setRowData(subId + ric, null);
|
866
|
+
}
|
867
|
+
};
|
868
|
+
|
869
|
+
/**
|
870
|
+
* @private
|
871
|
+
* @param {Object} e
|
872
|
+
*/
|
873
|
+
DataCache.prototype._onQ2SubAdded = function (e) {
|
874
|
+
var subs = e["subs"];
|
875
|
+
var duplicateSubIds = e["duplicateSubIds"];
|
876
|
+
var len = subs.length;
|
877
|
+
|
878
|
+
for (var i = 0; i < len; ++i) {
|
879
|
+
var sub = subs[i];
|
880
|
+
var ric = sub["ric"];
|
881
|
+
|
882
|
+
this.addSubscription(sub, ric);
|
883
|
+
|
884
|
+
if (duplicateSubIds) { // There will be no network request for duplicate subs, and hence we need to update the data from our cache
|
885
|
+
var dupSubId = duplicateSubIds[i];
|
886
|
+
|
887
|
+
if (dupSubId) {
|
888
|
+
window.setTimeout(
|
889
|
+
this._onDuplicateRic.bind(this, sub["id"], this.getRowData(dupSubId + ric)),
|
890
|
+
10);
|
891
|
+
}
|
892
|
+
}
|
893
|
+
}
|
894
|
+
};
|
895
|
+
|
896
|
+
/**
|
897
|
+
* @private
|
898
|
+
* @param {Object} e
|
899
|
+
*/
|
900
|
+
DataCache.prototype._onQ2SubRemoved = function (e) {
|
901
|
+
var subs = e["subs"];
|
902
|
+
var len = subs.length;
|
903
|
+
|
904
|
+
for (var i = 0; i < len; ++i) {
|
905
|
+
var sub = subs[i];
|
906
|
+
this.removeSubscription(sub);
|
907
|
+
}
|
908
|
+
};
|
909
|
+
|
910
|
+
/**
|
911
|
+
* @private
|
912
|
+
* @param {string} subId Subscription id
|
913
|
+
* @param {string} ric
|
914
|
+
*/
|
915
|
+
DataCache.prototype._onADCForNewRic = function (subId, ric) {
|
916
|
+
var sub = this._subs[subId];
|
917
|
+
|
918
|
+
if (!sub) {
|
919
|
+
return;
|
920
|
+
}
|
921
|
+
|
922
|
+
if (this._adcFields) {
|
923
|
+
if (!sub["rics"][ric]) { // First time insertion
|
924
|
+
if (this._adcTimerId < 0) {
|
925
|
+
this._adcRicMap = {};
|
926
|
+
this._adcTimerId = setTimeout(this._onBatchRequestADCData, 100);
|
927
|
+
}
|
928
|
+
|
929
|
+
if (!this._adcRicMap[ric]) {
|
930
|
+
this._adcRicMap[ric] = [];
|
931
|
+
}
|
932
|
+
|
933
|
+
this._adcRicMap[ric].push(subId);
|
934
|
+
}
|
935
|
+
}
|
936
|
+
|
937
|
+
sub["rics"][ric] = true;
|
938
|
+
};
|
939
|
+
|
940
|
+
/**
|
941
|
+
* @private
|
942
|
+
* @param {string} subId
|
943
|
+
* @param {Object.<string, *>} dupData
|
944
|
+
*/
|
945
|
+
DataCache.prototype._onDuplicateRic = function (subId, dupData) {
|
946
|
+
var sub = this._subs[subId];
|
947
|
+
|
948
|
+
if (!sub) {
|
949
|
+
return;
|
950
|
+
}
|
951
|
+
|
952
|
+
sub = sub["s"]; // Quotes2' subscription
|
953
|
+
|
954
|
+
var ric = sub["ric"];
|
955
|
+
var dupSubId = /** @type{string} */(dupData["SUB_ID"]);
|
956
|
+
var values = this._cloneRowData(dupData, ric, subId);
|
957
|
+
|
958
|
+
if (!values) {
|
959
|
+
return;
|
960
|
+
}
|
961
|
+
|
962
|
+
this._onInsert(sub, ric, values);
|
963
|
+
|
964
|
+
var children = sub["children"];
|
965
|
+
|
966
|
+
if (children) {
|
967
|
+
var childCount = children.length;
|
968
|
+
|
969
|
+
for (var i = 0; i < childCount; ++i) {
|
970
|
+
ric = children[i];
|
971
|
+
values = this._cloneRowData(dupSubId, ric, subId);
|
972
|
+
|
973
|
+
this._onInsert(sub, ric, values); // TODO: This makes a lot of ADC request
|
974
|
+
}
|
975
|
+
}
|
976
|
+
};
|
977
|
+
|
978
|
+
/**
|
979
|
+
* @private
|
980
|
+
* @param {Object} sub Subscription object from JET.Quote
|
981
|
+
* @param {string} ric
|
982
|
+
* @param {Object.<string, *>} values
|
983
|
+
*/
|
984
|
+
DataCache.prototype._onInsert = function (sub, ric, values/*, rowN*/) {
|
985
|
+
var subId = sub["id"];
|
986
|
+
|
987
|
+
if (this._quotes2) {
|
988
|
+
this._insertRic(subId, ric, values);
|
989
|
+
} else {
|
990
|
+
this._onADCForNewRic(subId, ric);
|
991
|
+
this.setRowData(subId + ric, values, {"subscription": sub, "ric": ric});
|
992
|
+
}
|
993
|
+
};
|
994
|
+
|
995
|
+
/**
|
996
|
+
* @private
|
997
|
+
* @function
|
998
|
+
*/
|
999
|
+
DataCache.prototype._onUpdate = DataCache.prototype._onInsert;
|
1000
|
+
|
1001
|
+
/**
|
1002
|
+
* This is a legacy code and should be deprecated
|
1003
|
+
* @private
|
1004
|
+
* @param {Object} sub Subscription object from JET.Quote
|
1005
|
+
* @param {string} ric
|
1006
|
+
* @param {Array.<string, *>} values
|
1007
|
+
*/
|
1008
|
+
DataCache.prototype._onDelete = function (sub, ric, values/*, rowN*/) {
|
1009
|
+
delete this._subs[sub["id"]]["rics"][ric];
|
1010
|
+
|
1011
|
+
// We cannot cache event arguments because user may want to collect all the updates
|
1012
|
+
this.setRowData(sub["id"] + ric, null, {"subscription": sub, "ric": ric});
|
1013
|
+
};
|
1014
|
+
|
1015
|
+
/**
|
1016
|
+
* @private
|
1017
|
+
* @param {string} field
|
1018
|
+
* @param {Array.<string>} ary_out
|
1019
|
+
*/
|
1020
|
+
DataCache.prototype._addDataCloudField = function (field, ary_out) {
|
1021
|
+
if (!this._adcRefMap[field]) {
|
1022
|
+
this._adcFields.push(field);
|
1023
|
+
|
1024
|
+
ary_out.push(field);
|
1025
|
+
|
1026
|
+
this._adcRefMap[field] = 1;
|
1027
|
+
} else {
|
1028
|
+
++this._adcRefMap[field];
|
1029
|
+
}
|
1030
|
+
};
|
1031
|
+
|
1032
|
+
/**
|
1033
|
+
* @private
|
1034
|
+
* @param {Object} e
|
1035
|
+
* @suppress {missingProperties}
|
1036
|
+
*/
|
1037
|
+
DataCache.prototype._onADCUpdate = function (e) {
|
1038
|
+
var xhr = e["currentTarget"]; // XMLHttpRequest
|
1039
|
+
var resp = null;
|
1040
|
+
|
1041
|
+
try {
|
1042
|
+
resp = JSON.parse(xhr.responseText);
|
1043
|
+
// window.console.log("Successfully parse: " + resp.rows);
|
1044
|
+
} catch (err) {
|
1045
|
+
return;
|
1046
|
+
}
|
1047
|
+
|
1048
|
+
if (resp["status"] !== "Ok") {
|
1049
|
+
return;
|
1050
|
+
}
|
1051
|
+
|
1052
|
+
var colCount = resp["cols"];
|
1053
|
+
var rows = resp["rows"];
|
1054
|
+
var colDefs = rows[0]; // The first row is always the column definition
|
1055
|
+
var ricIndex = -1;
|
1056
|
+
var fieldIndices = {};
|
1057
|
+
|
1058
|
+
for (var i = 0; i < colCount; ++i) {
|
1059
|
+
var colDef = colDefs[i];
|
1060
|
+
|
1061
|
+
if (colDef["i"] === "instrument") {
|
1062
|
+
ricIndex = i;
|
1063
|
+
} else if (colDef["r"]) {
|
1064
|
+
fieldIndices[colDef["r"]] = i;
|
1065
|
+
}
|
1066
|
+
}
|
1067
|
+
|
1068
|
+
var rowCount = rows.length;
|
1069
|
+
|
1070
|
+
for (var j = 1; j < rowCount; ++j) { // Start from 1
|
1071
|
+
var row = rows[j];
|
1072
|
+
var ric = row[ricIndex];
|
1073
|
+
var values = {};
|
1074
|
+
|
1075
|
+
for (var field in fieldIndices) {
|
1076
|
+
var value = row[fieldIndices[field]];
|
1077
|
+
|
1078
|
+
if (value != null) {
|
1079
|
+
// Data should be merged from the backend.
|
1080
|
+
// Don't override data with null value.
|
1081
|
+
// TODO: Merge all the row into one single row
|
1082
|
+
if (value !== null && value["f"] == null) {
|
1083
|
+
if (this._quotes2) {
|
1084
|
+
values[field] = value;
|
1085
|
+
values[field + "_FORMATTED"] = value;
|
1086
|
+
} else {
|
1087
|
+
values[field] = {"formatted": value + "", "raw": value};
|
1088
|
+
}
|
1089
|
+
}
|
1090
|
+
}
|
1091
|
+
}
|
1092
|
+
|
1093
|
+
var subIds = xhr.ricMap[ric];
|
1094
|
+
|
1095
|
+
if (subIds) { // Only ric within the subscription can be updated
|
1096
|
+
for (i = subIds.length; --i >= 0;) {
|
1097
|
+
var subId = subIds[i];
|
1098
|
+
|
1099
|
+
if (this._subs[subId]) { // Only update the existing subscription
|
1100
|
+
// window.console.log("ADC update " + subId + ric + " with " + JSON.stringify(values));
|
1101
|
+
this.setRowData(subId + ric, values); // Event is fired
|
1102
|
+
}
|
1103
|
+
}
|
1104
|
+
}
|
1105
|
+
}
|
1106
|
+
};
|
1107
|
+
|
1108
|
+
/**
|
1109
|
+
* @private
|
1110
|
+
* @param {Object} e
|
1111
|
+
*/
|
1112
|
+
DataCache.prototype._onADCError = function (e) {
|
1113
|
+
window.console.log(e);
|
1114
|
+
};
|
1115
|
+
|
1116
|
+
/**
|
1117
|
+
* @private
|
1118
|
+
* @param {Object} e
|
1119
|
+
*/
|
1120
|
+
DataCache.prototype._onBatchRequestADCData = function (e) {
|
1121
|
+
if (this._adcTimerId <= 0) {
|
1122
|
+
return;
|
1123
|
+
}
|
1124
|
+
|
1125
|
+
this._adcTimerId = -1;
|
1126
|
+
this._batchRequestDataCloud(this._adcRicMap, this._adcFields);
|
1127
|
+
this._adcRicMap = null;
|
1128
|
+
};
|
1129
|
+
|
1130
|
+
/**
|
1131
|
+
* @private
|
1132
|
+
* @param {Object.<string, Array.<string>>} ricMap of Array of subscription object
|
1133
|
+
* @param {Array.<string>} fields
|
1134
|
+
* @return {XMLHttpRequest}
|
1135
|
+
*/
|
1136
|
+
DataCache.prototype._batchRequestDataCloud = function (ricMap, fields) {
|
1137
|
+
if (!this._adcUrl) {
|
1138
|
+
return null;
|
1139
|
+
}
|
1140
|
+
|
1141
|
+
var rics = [];
|
1142
|
+
|
1143
|
+
for (var ric in ricMap) {
|
1144
|
+
rics.push(ric);
|
1145
|
+
}
|
1146
|
+
|
1147
|
+
// Request data cloud in small multiple batches because the service cannot handle a long request
|
1148
|
+
while (rics.length > 30) {
|
1149
|
+
this._requestDataCloud(ricMap, fields, rics.splice(0, 30));
|
1150
|
+
}
|
1151
|
+
|
1152
|
+
return this._requestDataCloud(ricMap, fields, rics);
|
1153
|
+
};
|
1154
|
+
|
1155
|
+
/**
|
1156
|
+
* @private
|
1157
|
+
* @param {Object.<string, Array.<string>>} ricMap of Array of subscription object
|
1158
|
+
* @param {Array.<string>} fields
|
1159
|
+
* @param {Array.<string>} rics
|
1160
|
+
* @return {XMLHttpRequest}
|
1161
|
+
*/
|
1162
|
+
DataCache.prototype._requestDataCloud = function (ricMap, fields, rics) { // Small batch
|
1163
|
+
if (!rics || rics.length <= 0) {
|
1164
|
+
return null;
|
1165
|
+
}
|
1166
|
+
|
1167
|
+
if (!fields || fields.length <= 0) {
|
1168
|
+
return null;
|
1169
|
+
}
|
1170
|
+
|
1171
|
+
var xhr = new XMLHttpRequest();
|
1172
|
+
|
1173
|
+
xhr.onload = this._onADCUpdate;
|
1174
|
+
xhr.onerror = this._onADCError;
|
1175
|
+
xhr.ricMap = ricMap;
|
1176
|
+
|
1177
|
+
xhr.open("POST", this._adcUrl, true);
|
1178
|
+
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
|
1179
|
+
|
1180
|
+
var body = 'formula=' + fields + '&identifiers=' + rics;
|
1181
|
+
|
1182
|
+
// window.console.log("ADC is requested with " + body);
|
1183
|
+
if (this._productId) {
|
1184
|
+
body += '&productid=' + this._productId;
|
1185
|
+
}
|
1186
|
+
|
1187
|
+
if (this._userId) {
|
1188
|
+
body += '&uuid=' + this._userId;
|
1189
|
+
}
|
1190
|
+
|
1191
|
+
if (this._lang) {
|
1192
|
+
body += '&lang=' + this._lang;
|
1193
|
+
}
|
1194
|
+
|
1195
|
+
xhr.send(body);
|
1196
|
+
|
1197
|
+
return xhr;
|
1198
|
+
};
|
1199
|
+
|
1200
|
+
/**
|
1201
|
+
* @private
|
1202
|
+
* @param {string|Object.<string, *>} obj
|
1203
|
+
* @param {string} ric
|
1204
|
+
* @param {string} newSubId
|
1205
|
+
* @return {Object}
|
1206
|
+
*/
|
1207
|
+
DataCache.prototype._cloneRowData = function (obj, ric, newSubId) {
|
1208
|
+
var subId = (typeof obj === "string") ? obj : obj["SUB_ID"];
|
1209
|
+
var fields = this._rows[subId + ric];
|
1210
|
+
|
1211
|
+
if (!fields) { // The specified row has been removed
|
1212
|
+
if (typeof obj === "object") {
|
1213
|
+
fields = obj;
|
1214
|
+
} else {
|
1215
|
+
return null;
|
1216
|
+
}
|
1217
|
+
}
|
1218
|
+
|
1219
|
+
var values = {};
|
1220
|
+
|
1221
|
+
for (var key in fields) {
|
1222
|
+
if (this._staticFields[key] == null) { // Static field must not be cloned
|
1223
|
+
values[key] = fields[key];
|
1224
|
+
}
|
1225
|
+
}
|
1226
|
+
|
1227
|
+
values["SUB_ID"] = newSubId;
|
1228
|
+
|
1229
|
+
return values;
|
1230
|
+
};
|
1231
|
+
|
1232
|
+
/** @protected
|
1233
|
+
* @ignore
|
1234
|
+
* @type {!Object.<string, Object.<string, *>>}
|
1235
|
+
*/
|
1236
|
+
DataCache.prototype._rows;
|
1237
|
+
|
1238
|
+
/**
|
1239
|
+
* @private
|
1240
|
+
* @type {!Object.<string, Object>}
|
1241
|
+
*/
|
1242
|
+
DataCache.prototype._subs;
|
1243
|
+
|
1244
|
+
/**
|
1245
|
+
* @private
|
1246
|
+
* @type {Object}
|
1247
|
+
*/
|
1248
|
+
DataCache.prototype._quotes2 = null;
|
1249
|
+
|
1250
|
+
/**
|
1251
|
+
* @private
|
1252
|
+
* @type {Object.<string, number>}
|
1253
|
+
*/
|
1254
|
+
DataCache.prototype._staticFields = null;
|
1255
|
+
|
1256
|
+
//#region ADC
|
1257
|
+
/**
|
1258
|
+
* @private
|
1259
|
+
* @type {Array.<string>}
|
1260
|
+
*/
|
1261
|
+
DataCache.prototype._adcFields = null;
|
1262
|
+
|
1263
|
+
/**
|
1264
|
+
* @private
|
1265
|
+
* @type {Object.<string, number>}
|
1266
|
+
*/
|
1267
|
+
DataCache.prototype._adcRefMap = null;
|
1268
|
+
|
1269
|
+
/**
|
1270
|
+
* @private
|
1271
|
+
* @type {number}
|
1272
|
+
*/
|
1273
|
+
DataCache.prototype._adcTimerId = -1;
|
1274
|
+
|
1275
|
+
/**
|
1276
|
+
* @private
|
1277
|
+
* @description ricMap of Array of subscription object
|
1278
|
+
* @type {Object.<string, Array.<string>>}
|
1279
|
+
*/
|
1280
|
+
DataCache.prototype._adcRicMap = null;
|
1281
|
+
|
1282
|
+
/**
|
1283
|
+
* @private
|
1284
|
+
* @type {string}
|
1285
|
+
*/
|
1286
|
+
DataCache.prototype._adcUrl = "/datacloud/rest/select";
|
1287
|
+
|
1288
|
+
/**
|
1289
|
+
* @private
|
1290
|
+
* @type {string}
|
1291
|
+
*/
|
1292
|
+
DataCache.prototype._userId = "";
|
1293
|
+
|
1294
|
+
/**
|
1295
|
+
* @private
|
1296
|
+
* @type {string}
|
1297
|
+
*/
|
1298
|
+
DataCache.prototype._productId = "";
|
1299
|
+
|
1300
|
+
/** @protected
|
1301
|
+
* @ignore
|
1302
|
+
* @type {boolean}
|
1303
|
+
*/
|
1304
|
+
DataCache.prototype._composing = false;
|
1305
|
+
|
1306
|
+
/** @protected
|
1307
|
+
* @ignore
|
1308
|
+
* @type {string}
|
1309
|
+
*/
|
1310
|
+
DataCache.prototype._lang = "";
|
1311
|
+
//#endregion ADC
|
1312
|
+
//#endregion Private
|
1313
|
+
|
1314
|
+
DataCache._proto = DataCache.prototype;
|
1315
|
+
|
1316
|
+
export default DataCache;
|
1317
|
+
export { DataCache };
|