@refinitiv-ui/efx-grid 0.0.0-dev.12023565035.1
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-dragging/es6/ColumnDragging.d.ts +51 -0
- package/lib/column-dragging/es6/ColumnDragging.js +968 -0
- package/lib/column-dragging/es6/index.d.ts +1 -0
- package/lib/column-dragging/es6/index.js +1 -0
- package/lib/column-format-dialog/index.d.ts +2 -0
- package/lib/column-format-dialog/index.js +2 -0
- package/lib/column-format-dialog/lib/column-format-dialog.d.ts +77 -0
- package/lib/column-format-dialog/lib/column-format-dialog.js +2688 -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 +982 -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 +2 -0
- package/lib/column-selection-dialog/index.js +2 -0
- package/lib/column-selection-dialog/lib/column-selection-dialog.d.ts +66 -0
- package/lib/column-selection-dialog/lib/column-selection-dialog.js +2034 -0
- package/lib/column-selection-dialog/lib/locale/translation-de.d.ts +7 -0
- package/lib/column-selection-dialog/lib/locale/translation-de.js +20 -0
- package/lib/column-selection-dialog/lib/locale/translation-en.d.ts +7 -0
- package/lib/column-selection-dialog/lib/locale/translation-en.js +20 -0
- package/lib/column-selection-dialog/lib/locale/translation-ja.d.ts +7 -0
- package/lib/column-selection-dialog/lib/locale/translation-ja.js +20 -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 +20 -0
- package/lib/column-selection-dialog/lib/locale/translation-zh.d.ts +7 -0
- package/lib/column-selection-dialog/lib/locale/translation-zh.js +20 -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 +258 -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 +8 -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 +8 -0
- package/lib/column-selection-dialog/themes/halo/column-selection-dialog.less +25 -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 +8 -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 +8 -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 +8 -0
- package/lib/column-selection-dialog/themes/solar/column-selection-dialog.less +5 -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 +8 -0
- package/lib/core/dist/core.css +1 -0
- package/lib/core/dist/core.js +33910 -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 +43 -0
- package/lib/core/es6/data/DataCache.js +597 -0
- package/lib/core/es6/data/DataTable.d.ts +156 -0
- package/lib/core/es6/data/DataTable.js +2206 -0
- package/lib/core/es6/data/DataView.d.ts +332 -0
- package/lib/core/es6/data/DataView.js +4144 -0
- package/lib/core/es6/data/Segment.d.ts +91 -0
- package/lib/core/es6/data/Segment.js +1001 -0
- package/lib/core/es6/data/SegmentCollection.d.ts +84 -0
- package/lib/core/es6/data/SegmentCollection.js +713 -0
- package/lib/core/es6/data/WrappedView.d.ts +290 -0
- package/lib/core/es6/data/WrappedView.js +1320 -0
- package/lib/core/es6/grid/Core.d.ts +455 -0
- package/lib/core/es6/grid/Core.js +6196 -0
- package/lib/core/es6/grid/ILayoutGrid.d.ts +212 -0
- package/lib/core/es6/grid/ILayoutGrid.js +706 -0
- package/lib/core/es6/grid/LayoutGrid.d.ts +37 -0
- package/lib/core/es6/grid/LayoutGrid.js +2975 -0
- package/lib/core/es6/grid/VirtualizedLayoutGrid.d.ts +28 -0
- package/lib/core/es6/grid/VirtualizedLayoutGrid.js +1241 -0
- package/lib/core/es6/grid/components/Cell.d.ts +52 -0
- package/lib/core/es6/grid/components/Cell.js +826 -0
- package/lib/core/es6/grid/components/CellFloatingPanel.d.ts +21 -0
- package/lib/core/es6/grid/components/CellFloatingPanel.js +130 -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 +40 -0
- package/lib/core/es6/grid/components/CellSpans.js +368 -0
- package/lib/core/es6/grid/components/Column.d.ts +22 -0
- package/lib/core/es6/grid/components/Column.js +618 -0
- package/lib/core/es6/grid/components/ElementWrapper.d.ts +127 -0
- package/lib/core/es6/grid/components/ElementWrapper.js +718 -0
- package/lib/core/es6/grid/components/HScrollbar.d.ts +28 -0
- package/lib/core/es6/grid/components/HScrollbar.js +241 -0
- package/lib/core/es6/grid/components/Scrollbar.d.ts +63 -0
- package/lib/core/es6/grid/components/Scrollbar.js +1413 -0
- package/lib/core/es6/grid/components/StretchedCells.d.ts +17 -0
- package/lib/core/es6/grid/components/StretchedCells.js +342 -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 +166 -0
- package/lib/core/es6/grid/plugins/SortableTitlePlugin.d.ts +155 -0
- package/lib/core/es6/grid/plugins/SortableTitlePlugin.js +1977 -0
- package/lib/core/es6/grid/util/CellBoundPainter.d.ts +16 -0
- package/lib/core/es6/grid/util/CellBoundPainter.js +171 -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/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 +679 -0
- package/lib/core/es6/grid/util/SelectionList.d.ts +54 -0
- package/lib/core/es6/grid/util/SelectionList.js +491 -0
- package/lib/core/es6/grid/util/TrackLayout.d.ts +92 -0
- package/lib/core/es6/grid/util/TrackLayout.js +902 -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 +20 -0
- package/lib/core/es6/grid/util/util.js +391 -0
- package/lib/core/es6/index.d.ts +79 -0
- package/lib/core/es6/index.js +125 -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 +2 -0
- package/lib/filter-dialog/index.js +2 -0
- package/lib/filter-dialog/lib/checkbox-list.d.ts +52 -0
- package/lib/filter-dialog/lib/checkbox-list.js +444 -0
- package/lib/filter-dialog/lib/filter-dialog.d.ts +75 -0
- package/lib/filter-dialog/lib/filter-dialog.js +1160 -0
- package/lib/filter-dialog/lib/locale/translation-de.d.ts +7 -0
- package/lib/filter-dialog/lib/locale/translation-de.js +40 -0
- package/lib/filter-dialog/lib/locale/translation-en.d.ts +7 -0
- package/lib/filter-dialog/lib/locale/translation-en.js +40 -0
- package/lib/filter-dialog/lib/locale/translation-ja.d.ts +7 -0
- package/lib/filter-dialog/lib/locale/translation-ja.js +40 -0
- package/lib/filter-dialog/lib/locale/translation-zh-hant.d.ts +7 -0
- package/lib/filter-dialog/lib/locale/translation-zh-hant.js +40 -0
- package/lib/filter-dialog/lib/locale/translation-zh.d.ts +7 -0
- package/lib/filter-dialog/lib/locale/translation-zh.js +40 -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 +42 -0
- package/lib/filter-dialog/themes/base.less +191 -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 +15 -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 +20 -0
- package/lib/formatters/es6/CoralButtonFormatter.js +45 -0
- package/lib/formatters/es6/CoralCheckboxFormatter.d.ts +12 -0
- package/lib/formatters/es6/CoralCheckboxFormatter.js +50 -0
- package/lib/formatters/es6/CoralComboBoxFormatter.d.ts +23 -0
- package/lib/formatters/es6/CoralComboBoxFormatter.js +103 -0
- package/lib/formatters/es6/CoralIconFormatter.d.ts +21 -0
- package/lib/formatters/es6/CoralIconFormatter.js +50 -0
- package/lib/formatters/es6/CoralInputFormatter.d.ts +12 -0
- package/lib/formatters/es6/CoralInputFormatter.js +45 -0
- package/lib/formatters/es6/CoralRadioButtonFormatter.d.ts +20 -0
- package/lib/formatters/es6/CoralRadioButtonFormatter.js +85 -0
- package/lib/formatters/es6/CoralSelectFormatter.d.ts +23 -0
- package/lib/formatters/es6/CoralSelectFormatter.js +71 -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 +20 -0
- package/lib/formatters/es6/EFButtonFormatter.js +45 -0
- package/lib/formatters/es6/EFCheckboxFormatter.d.ts +12 -0
- package/lib/formatters/es6/EFCheckboxFormatter.js +50 -0
- package/lib/formatters/es6/EFComboBoxFormatter.d.ts +23 -0
- package/lib/formatters/es6/EFComboBoxFormatter.js +78 -0
- package/lib/formatters/es6/EFDateTimePickerFormatter.d.ts +13 -0
- package/lib/formatters/es6/EFDateTimePickerFormatter.js +60 -0
- package/lib/formatters/es6/EFIconFormatter.d.ts +21 -0
- package/lib/formatters/es6/EFIconFormatter.js +50 -0
- package/lib/formatters/es6/EFNumberFieldFormatter.d.ts +12 -0
- package/lib/formatters/es6/EFNumberFieldFormatter.js +45 -0
- package/lib/formatters/es6/EFRadioButtonFormatter.d.ts +20 -0
- package/lib/formatters/es6/EFRadioButtonFormatter.js +132 -0
- package/lib/formatters/es6/EFSelectFormatter.d.ts +23 -0
- package/lib/formatters/es6/EFSelectFormatter.js +76 -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 +26 -0
- package/lib/formatters/es6/FormatterBuilder.js +493 -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 +23 -0
- package/lib/formatters/es6/SimpleTickerFormatter.js +66 -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 +35 -0
- package/lib/formatters/es6/index.d.ts +64 -0
- package/lib/formatters/es6/index.js +88 -0
- package/lib/grid/index.d.ts +2 -0
- package/lib/grid/index.js +3 -0
- package/lib/grid/lib/efx-grid.d.ts +53 -0
- package/lib/grid/lib/efx-grid.js +444 -0
- package/lib/grid/themes/base.less +137 -0
- package/lib/grid/themes/ds/dark/css/native-elements.css +0 -0
- package/lib/grid/themes/ds/dark/efx-grid.js +4 -0
- package/lib/grid/themes/ds/dark/es5/all-elements.js +2 -0
- package/lib/grid/themes/ds/dark/imports/all-elements.js +1 -0
- package/lib/grid/themes/ds/dark/imports/custom-elements.js +1 -0
- package/lib/grid/themes/ds/dark/imports/native-elements.js +0 -0
- package/lib/grid/themes/ds/dark.js +3 -0
- package/lib/grid/themes/ds/efx-grid.less +207 -0
- package/lib/grid/themes/ds/index.less +3 -0
- package/lib/grid/themes/ds/light/css/native-elements.css +0 -0
- package/lib/grid/themes/ds/light/efx-grid.js +4 -0
- package/lib/grid/themes/ds/light/es5/all-elements.js +2 -0
- package/lib/grid/themes/ds/light/imports/all-elements.js +1 -0
- package/lib/grid/themes/ds/light/imports/custom-elements.js +1 -0
- package/lib/grid/themes/ds/light/imports/native-elements.js +0 -0
- package/lib/grid/themes/ds/light.js +3 -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 +127 -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 +100 -0
- package/lib/index.js +100 -0
- package/lib/row-segmenting/es6/RowSegmenting.d.ts +115 -0
- package/lib/row-segmenting/es6/RowSegmenting.js +1182 -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 +54547 -0
- package/lib/rt-grid/dist/rt-grid.min.js +1 -0
- package/lib/rt-grid/es6/ColumnDefinition.d.ts +174 -0
- package/lib/rt-grid/es6/ColumnDefinition.js +1203 -0
- package/lib/rt-grid/es6/DataConnector.d.ts +43 -0
- package/lib/rt-grid/es6/DataConnector.js +290 -0
- package/lib/rt-grid/es6/FieldDefinition.d.ts +40 -0
- package/lib/rt-grid/es6/FieldDefinition.js +560 -0
- package/lib/rt-grid/es6/Grid.d.ts +376 -0
- package/lib/rt-grid/es6/Grid.js +4653 -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 +40 -0
- package/lib/rt-grid/es6/ReferenceCounter.js +251 -0
- package/lib/rt-grid/es6/RowDefSorter.d.ts +19 -0
- package/lib/rt-grid/es6/RowDefSorter.js +231 -0
- package/lib/rt-grid/es6/RowDefinition.d.ts +156 -0
- package/lib/rt-grid/es6/RowDefinition.js +1478 -0
- package/lib/rt-grid/es6/SnapshotFiller.d.ts +36 -0
- package/lib/rt-grid/es6/SnapshotFiller.js +537 -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 +68 -0
- package/lib/statistics-row/es6/StatisticsRow.js +807 -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 +46 -0
- package/lib/tr-grid-auto-tooltip/es6/AutoTooltip.js +617 -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 +70 -0
- package/lib/tr-grid-cell-selection/es6/CellSelection.js +1695 -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 +82 -0
- package/lib/tr-grid-checkbox/es6/Checkbox.js +1704 -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 +817 -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 +91 -0
- package/lib/tr-grid-column-formatting/es6/ColumnFormatting.js +617 -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 +110 -0
- package/lib/tr-grid-column-grouping/es6/ColumnGrouping.js +2028 -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 +1010 -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 +77 -0
- package/lib/tr-grid-column-selection/es6/ColumnSelection.js +1405 -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 +160 -0
- package/lib/tr-grid-column-stack/es6/ColumnStack.js +2155 -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 +100 -0
- package/lib/tr-grid-conditional-coloring/es6/ConditionalColoring.js +1513 -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 +519 -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 +453 -0
- package/lib/tr-grid-contextmenu/es6/MenuEventAPI.d.ts +22 -0
- package/lib/tr-grid-contextmenu/es6/MenuEventAPI.js +138 -0
- package/lib/tr-grid-contextmenu/es6/MenuItem.d.ts +41 -0
- package/lib/tr-grid-contextmenu/es6/MenuItem.js +285 -0
- package/lib/tr-grid-contextmenu/es6/PopupMenu.d.ts +33 -0
- package/lib/tr-grid-contextmenu/es6/PopupMenu.js +303 -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 +64 -0
- package/lib/tr-grid-filter-input/es6/FilterInput.js +1027 -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 +45 -0
- package/lib/tr-grid-heat-map/es6/HeatMap.js +401 -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 +148 -0
- package/lib/tr-grid-in-cell-editing/es6/InCellEditing.js +2671 -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 +58 -0
- package/lib/tr-grid-pagination/es6/Pagination.js +433 -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 +804 -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 +50 -0
- package/lib/tr-grid-printer/es6/CellWriter.js +234 -0
- package/lib/tr-grid-printer/es6/ColumnWriter.d.ts +13 -0
- package/lib/tr-grid-printer/es6/ColumnWriter.js +23 -0
- package/lib/tr-grid-printer/es6/GridPrinter.d.ts +33 -0
- package/lib/tr-grid-printer/es6/GridPrinter.js +794 -0
- package/lib/tr-grid-printer/es6/PrintTrait.d.ts +39 -0
- package/lib/tr-grid-printer/es6/PrintTrait.js +494 -0
- package/lib/tr-grid-printer/es6/SectionWriter.d.ts +57 -0
- package/lib/tr-grid-printer/es6/SectionWriter.js +238 -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/LEDGuage.d.ts +39 -0
- package/lib/tr-grid-range-bar/es6/LEDGuage.js +261 -0
- package/lib/tr-grid-range-bar/es6/RangeBar.d.ts +56 -0
- package/lib/tr-grid-range-bar/es6/RangeBar.js +514 -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 +81 -0
- package/lib/tr-grid-row-dragging/es6/RowDragging.js +1479 -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 +159 -0
- package/lib/tr-grid-row-filtering/es6/RowFiltering.js +2568 -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 +123 -0
- package/lib/tr-grid-row-grouping/es6/RowGrouping.js +1728 -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 +75 -0
- package/lib/tr-grid-row-selection/es6/RowSelection.js +1447 -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 +64 -0
- package/lib/tr-grid-rowcoloring/es6/RowColoring.js +615 -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 +72 -0
- package/lib/tr-grid-textformatting/es6/TextFormatting.js +543 -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 +27 -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 +142 -0
- package/lib/tr-grid-util/es6/CellPainter.js +1183 -0
- package/lib/tr-grid-util/es6/Color.d.ts +40 -0
- package/lib/tr-grid-util/es6/Color.js +210 -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 +16 -0
- package/lib/tr-grid-util/es6/Deferred.js +108 -0
- package/lib/tr-grid-util/es6/Delay.d.ts +20 -0
- package/lib/tr-grid-util/es6/Delay.js +96 -0
- package/lib/tr-grid-util/es6/Dom.d.ts +32 -0
- package/lib/tr-grid-util/es6/Dom.js +350 -0
- package/lib/tr-grid-util/es6/DragUI.d.ts +20 -0
- package/lib/tr-grid-util/es6/DragUI.js +263 -0
- package/lib/tr-grid-util/es6/ElementObserver.d.ts +12 -0
- package/lib/tr-grid-util/es6/ElementObserver.js +134 -0
- package/lib/tr-grid-util/es6/ElementWrapper.d.ts +23 -0
- package/lib/tr-grid-util/es6/ElementWrapper.js +84 -0
- package/lib/tr-grid-util/es6/ElfDate.d.ts +26 -0
- package/lib/tr-grid-util/es6/ElfDate.js +164 -0
- package/lib/tr-grid-util/es6/ElfUtil.d.ts +46 -0
- package/lib/tr-grid-util/es6/ElfUtil.js +637 -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 +24 -0
- package/lib/tr-grid-util/es6/ExpanderIcon.js +120 -0
- package/lib/tr-grid-util/es6/ExpressionParser.d.ts +10 -0
- package/lib/tr-grid-util/es6/ExpressionParser.js +408 -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 +440 -0
- package/lib/tr-grid-util/es6/FilterBuilder.d.ts +54 -0
- package/lib/tr-grid-util/es6/FilterBuilder.js +580 -0
- package/lib/tr-grid-util/es6/FilterOperators.d.ts +56 -0
- package/lib/tr-grid-util/es6/FilterOperators.js +255 -0
- package/lib/tr-grid-util/es6/GridPlugin.d.ts +86 -0
- package/lib/tr-grid-util/es6/GridPlugin.js +1055 -0
- package/lib/tr-grid-util/es6/GroupDefinitions.d.ts +74 -0
- package/lib/tr-grid-util/es6/GroupDefinitions.js +642 -0
- package/lib/tr-grid-util/es6/Icon.d.ts +14 -0
- package/lib/tr-grid-util/es6/Icon.js +62 -0
- package/lib/tr-grid-util/es6/MouseDownTrait.d.ts +42 -0
- package/lib/tr-grid-util/es6/MouseDownTrait.js +250 -0
- package/lib/tr-grid-util/es6/MultiTableManager.d.ts +40 -0
- package/lib/tr-grid-util/es6/MultiTableManager.js +611 -0
- package/lib/tr-grid-util/es6/NumberFormatter.d.ts +85 -0
- package/lib/tr-grid-util/es6/NumberFormatter.js +528 -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 +163 -0
- package/lib/tr-grid-util/es6/Popup.d.ts +98 -0
- package/lib/tr-grid-util/es6/Popup.js +991 -0
- package/lib/tr-grid-util/es6/RangeBar.d.ts +33 -0
- package/lib/tr-grid-util/es6/RangeBar.js +260 -0
- package/lib/tr-grid-util/es6/RequestQueue.d.ts +30 -0
- package/lib/tr-grid-util/es6/RequestQueue.js +228 -0
- package/lib/tr-grid-util/es6/RowPainter.d.ts +60 -0
- package/lib/tr-grid-util/es6/RowPainter.js +448 -0
- package/lib/tr-grid-util/es6/SubTable.d.ts +78 -0
- package/lib/tr-grid-util/es6/SubTable.js +642 -0
- package/lib/tr-grid-util/es6/Table.d.ts +146 -0
- package/lib/tr-grid-util/es6/Table.js +832 -0
- package/lib/tr-grid-util/es6/TextHighlighter.d.ts +16 -0
- package/lib/tr-grid-util/es6/TextHighlighter.js +268 -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 +66 -0
- package/lib/tr-grid-util/es6/Util.js +508 -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 +890 -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 +65 -0
- package/lib/tr-grid-util/es6/index.js +102 -0
- package/lib/tr-grid-util/es6/jet/Adc.d.ts +9 -0
- package/lib/tr-grid-util/es6/jet/Adc.js +268 -0
- package/lib/tr-grid-util/es6/jet/CollectionDict.d.ts +28 -0
- package/lib/tr-grid-util/es6/jet/CollectionDict.js +151 -0
- package/lib/tr-grid-util/es6/jet/DataGenerator.d.ts +136 -0
- package/lib/tr-grid-util/es6/jet/DataGenerator.js +860 -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 +71 -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 +82 -0
- package/lib/tr-grid-util/es6/jet/MockQuotes2.js +890 -0
- package/lib/tr-grid-util/es6/jet/MockRTK.d.ts +48 -0
- package/lib/tr-grid-util/es6/jet/MockRTK.js +82 -0
- package/lib/tr-grid-util/es6/jet/MockUtil.d.ts +7 -0
- package/lib/tr-grid-util/es6/jet/MockUtil.js +25 -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 +111 -0
- package/lib/tr-grid-util/es6/jsx.d.ts +223 -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 +46 -0
- package/lib/types/es6/CellSelection.d.ts +70 -0
- package/lib/types/es6/Checkbox.d.ts +82 -0
- package/lib/types/es6/ColumnDragging.d.ts +51 -0
- package/lib/types/es6/ColumnFitter.d.ts +56 -0
- package/lib/types/es6/ColumnFormatting.d.ts +92 -0
- package/lib/types/es6/ColumnGrouping.d.ts +107 -0
- package/lib/types/es6/ColumnResizing.d.ts +68 -0
- package/lib/types/es6/ColumnSelection.d.ts +77 -0
- package/lib/types/es6/ColumnStack.d.ts +160 -0
- package/lib/types/es6/CompositeGrid/CollapsibleHeaderPlugin.d.ts +11 -0
- package/lib/types/es6/CompositeGrid/ColumnSelectionPlugin.d.ts +41 -0
- package/lib/types/es6/CompositeGrid/ColumnWidthAdjustingPlugin.d.ts +45 -0
- package/lib/types/es6/CompositeGrid/CompositeGrid.d.ts +289 -0
- package/lib/types/es6/CompositeGrid/DragAndDropTitlePlugin.d.ts +23 -0
- package/lib/types/es6/CompositeGrid/DraggableContentPlugin.d.ts +41 -0
- package/lib/types/es6/CompositeGrid/Plugin.d.ts +30 -0
- package/lib/types/es6/CompositeGrid/ResizableTitlePlugin.d.ts +32 -0
- package/lib/types/es6/CompositeGrid/RowSelectionPlugin.d.ts +44 -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 +100 -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 +20 -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 +21 -0
- package/lib/types/es6/CoralInputFormatter.d.ts +12 -0
- package/lib/types/es6/CoralRadioButtonFormatter.d.ts +20 -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 +43 -0
- package/lib/types/es6/Core/data/DataTable.d.ts +156 -0
- package/lib/types/es6/Core/data/DataView.d.ts +332 -0
- package/lib/types/es6/Core/data/Segment.d.ts +91 -0
- package/lib/types/es6/Core/data/SegmentCollection.d.ts +84 -0
- package/lib/types/es6/Core/data/WrappedView.d.ts +290 -0
- package/lib/types/es6/Core/grid/Core.d.ts +455 -0
- package/lib/types/es6/Core/grid/ILayoutGrid.d.ts +212 -0
- package/lib/types/es6/Core/grid/LayoutGrid.d.ts +37 -0
- package/lib/types/es6/Core/grid/VirtualizedLayoutGrid.d.ts +28 -0
- package/lib/types/es6/Core/grid/components/Cell.d.ts +52 -0
- package/lib/types/es6/Core/grid/components/CellFloatingPanel.d.ts +21 -0
- package/lib/types/es6/Core/grid/components/CellSpan.d.ts +18 -0
- package/lib/types/es6/Core/grid/components/CellSpans.d.ts +40 -0
- package/lib/types/es6/Core/grid/components/Column.d.ts +22 -0
- package/lib/types/es6/Core/grid/components/ElementWrapper.d.ts +127 -0
- package/lib/types/es6/Core/grid/components/HScrollbar.d.ts +28 -0
- package/lib/types/es6/Core/grid/components/Scrollbar.d.ts +63 -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/SortableTitlePlugin.d.ts +155 -0
- package/lib/types/es6/Core/grid/util/CellBoundPainter.d.ts +16 -0
- package/lib/types/es6/Core/grid/util/Conflator.d.ts +32 -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 +54 -0
- package/lib/types/es6/Core/grid/util/TrackLayout.d.ts +92 -0
- package/lib/types/es6/Core/grid/util/Virtualizer.d.ts +40 -0
- package/lib/types/es6/Core/grid/util/util.d.ts +20 -0
- package/lib/types/es6/Core/index.d.ts +79 -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 +20 -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 +21 -0
- package/lib/types/es6/EFNumberFieldFormatter.d.ts +12 -0
- package/lib/types/es6/EFRadioButtonFormatter.d.ts +20 -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 +58 -0
- package/lib/types/es6/Extensions.d.ts +63 -0
- package/lib/types/es6/FilterInput.d.ts +64 -0
- package/lib/types/es6/FormatterBuilder.d.ts +26 -0
- package/lib/types/es6/GridFormatter.d.ts +63 -0
- package/lib/types/es6/HeatMap.d.ts +45 -0
- package/lib/types/es6/InCellEditing.d.ts +148 -0
- package/lib/types/es6/MenuEventAPI.d.ts +22 -0
- package/lib/types/es6/MenuItem.d.ts +41 -0
- package/lib/types/es6/NumericInputFormatter.d.ts +13 -0
- package/lib/types/es6/Pagination.d.ts +58 -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 +33 -0
- package/lib/types/es6/RangeBar.d.ts +39 -0
- package/lib/types/es6/RealtimeGrid/ColumnDefinition.d.ts +176 -0
- package/lib/types/es6/RealtimeGrid/DataConnector.d.ts +43 -0
- package/lib/types/es6/RealtimeGrid/FieldDefinition.d.ts +40 -0
- package/lib/types/es6/RealtimeGrid/Grid.d.ts +413 -0
- package/lib/types/es6/RealtimeGrid/PredefinedFormula.d.ts +16 -0
- package/lib/types/es6/RealtimeGrid/ReferenceCounter.d.ts +40 -0
- package/lib/types/es6/RealtimeGrid/RowDefSorter.d.ts +19 -0
- package/lib/types/es6/RealtimeGrid/RowDefinition.d.ts +156 -0
- package/lib/types/es6/RealtimeGrid/SnapshotFiller.d.ts +36 -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 +64 -0
- package/lib/types/es6/RowDragging.d.ts +81 -0
- package/lib/types/es6/RowFiltering.d.ts +159 -0
- package/lib/types/es6/RowGrouping.d.ts +123 -0
- package/lib/types/es6/RowSegmenting.d.ts +109 -0
- package/lib/types/es6/RowSelection.d.ts +75 -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 +23 -0
- package/lib/types/es6/SimpleToggleFormatter.d.ts +22 -0
- package/lib/types/es6/StatisticsRow.d.ts +68 -0
- package/lib/types/es6/TextFormatter.d.ts +12 -0
- package/lib/types/es6/TextFormatting.d.ts +72 -0
- package/lib/types/es6/TitleWrap.d.ts +27 -0
- package/lib/types/es6/Zoom.d.ts +52 -0
- package/lib/types/es6/index.d.ts +80 -0
- package/lib/types/index.d.ts +1 -0
- package/lib/utils/index.d.ts +7 -0
- package/lib/utils/index.js +7 -0
- package/lib/versions.json +37 -0
- package/lib/window-exporter.js +18 -0
- package/lib/zoom/es6/Zoom.d.ts +52 -0
- package/lib/zoom/es6/Zoom.js +438 -0
- package/lib/zoom/es6/index.d.ts +1 -0
- package/lib/zoom/es6/index.js +1 -0
- package/package.json +69 -0
@@ -0,0 +1,1015 @@
|
|
1
|
+
import {Ext} from "../Ext.js";
|
2
|
+
import {Util} from "../Util.js";
|
3
|
+
import {EventDispatcher} from "../EventDispatcher.js";
|
4
|
+
import {RequestQueue} from "../RequestQueue.js";
|
5
|
+
|
6
|
+
/** @constructor
|
7
|
+
* @extends {EventDispatcher}
|
8
|
+
*/
|
9
|
+
let TSISubscription = function() {
|
10
|
+
this._refreshData = this._refreshData.bind(this);
|
11
|
+
|
12
|
+
// Old TSI service
|
13
|
+
this._onTSIUpdate = this._onTSIUpdate.bind(this);
|
14
|
+
this._requestTimeSeriesData = this._requestTimeSeriesData.bind(this);
|
15
|
+
|
16
|
+
// New metadata service
|
17
|
+
this._manageMetadataQ = this._manageMetadataQ.bind(this);
|
18
|
+
this._extractMetadata = this._extractMetadata.bind(this);
|
19
|
+
this._onRequestMetadata = this._onRequestMetadata.bind(this);
|
20
|
+
|
21
|
+
// New TSI service
|
22
|
+
this._manageTSIDataQ = this._manageTSIDataQ.bind(this);
|
23
|
+
this._extractTSIData = this._extractTSIData.bind(this);
|
24
|
+
this._onRequestTSIData = this._onRequestTSIData.bind(this);
|
25
|
+
|
26
|
+
// Temporary Map
|
27
|
+
this._metadataMap = {};
|
28
|
+
this._metadataPendingMap = {};
|
29
|
+
this._tsiDataMap = {};
|
30
|
+
this._tsiDataPendingMap = {};
|
31
|
+
|
32
|
+
// Data Map
|
33
|
+
this._tsiPeriodMap = {};
|
34
|
+
this._tsiMetadata = {};
|
35
|
+
|
36
|
+
this._metadataQ = new RequestQueue(this._onRequestMetadata, 80, 10000); // 80 requests in 10 seconds
|
37
|
+
this._metadataQ.setConcurrentLimit(2); // To prevent blocking request due to long running request time.
|
38
|
+
|
39
|
+
this._tsiDataQ = new RequestQueue(this._onRequestTSIData, 80, 10000); // 80 requests in 10 seconds
|
40
|
+
this._tsiDataQ.setConcurrentLimit(4); // To prevent blocking request due to long running request time.
|
41
|
+
|
42
|
+
this._oldTsiDataQ = new RequestQueue(this._requestTimeSeriesData, 80, 10000); // 80 requests in 10 seconds
|
43
|
+
this._oldTsiDataQ.setConcurrentLimit(4); // To prevent blocking request due to long running request time.
|
44
|
+
};
|
45
|
+
Ext.inherits(TSISubscription, EventDispatcher);
|
46
|
+
|
47
|
+
|
48
|
+
/** @type {Object.<string, boolean>}
|
49
|
+
* @private
|
50
|
+
* @const
|
51
|
+
*/
|
52
|
+
TSISubscription.INTERVAL_MAIN = {
|
53
|
+
"Daily": true,
|
54
|
+
"Weekly": true,
|
55
|
+
"Monthly": true,
|
56
|
+
"Quarterly": true,
|
57
|
+
"Yearly": true
|
58
|
+
};
|
59
|
+
/** @type {Object.<string, number>}
|
60
|
+
* @private
|
61
|
+
* @const
|
62
|
+
*/
|
63
|
+
TSISubscription.INTERVAL_INDEX = {
|
64
|
+
"Daily": 0,
|
65
|
+
"Weekly": 1,
|
66
|
+
"Monthly": 2,
|
67
|
+
"4Monthly": 2, // WORKAROUND: Due to metadata on RIC USCONC=ECI, Time Series data provides monthly interval
|
68
|
+
"Quarterly": 3,
|
69
|
+
"Yearly": 4
|
70
|
+
};
|
71
|
+
/** @type {Object.<string, number>}
|
72
|
+
* @private
|
73
|
+
* @const
|
74
|
+
*/
|
75
|
+
TSISubscription.INTERVAL_ENUM = {
|
76
|
+
"Daily": 4,
|
77
|
+
"Weekly": 5,
|
78
|
+
"Monthly": 6,
|
79
|
+
"4Monthly": 6, // WORKAROUND: Due to metadata on RIC USCONC=ECI, Time Series data provides monthly interval
|
80
|
+
"Quarterly": 7,
|
81
|
+
"Yearly": 8
|
82
|
+
};
|
83
|
+
/** @type {Object.<string, number>}
|
84
|
+
* @private
|
85
|
+
* @const
|
86
|
+
*/
|
87
|
+
TSISubscription.COLUMN_MASK_ENUM = {
|
88
|
+
"CLOSE": 1,
|
89
|
+
"OPEN": 2,
|
90
|
+
"HIGH": 4,
|
91
|
+
"LOW": 8,
|
92
|
+
"VOLUME": 16,
|
93
|
+
"COUNT": 32,
|
94
|
+
"VALUE": 1 // WORKAROUND: Service return VALUE data in the factlist CLOSE
|
95
|
+
};
|
96
|
+
/** @type {number}
|
97
|
+
* @private
|
98
|
+
* @const
|
99
|
+
*/
|
100
|
+
TSISubscription.MAX_CONCURRENT_OBJECT = 300;
|
101
|
+
/** @type {string}
|
102
|
+
* @const
|
103
|
+
*/
|
104
|
+
TSISubscription.PENDING_DATA = "_PENDING♪_";
|
105
|
+
|
106
|
+
|
107
|
+
/** @type {!Object}
|
108
|
+
* @private
|
109
|
+
*/
|
110
|
+
TSISubscription.prototype._tsiMetadata;
|
111
|
+
/** @type {!Object}
|
112
|
+
* @private
|
113
|
+
*/
|
114
|
+
TSISubscription.prototype._tsiPeriodMap;
|
115
|
+
|
116
|
+
/** @type {!RequestQueue}
|
117
|
+
* @private
|
118
|
+
*/
|
119
|
+
TSISubscription.prototype._metadataQ;
|
120
|
+
/** @type {number}
|
121
|
+
* @private
|
122
|
+
*/
|
123
|
+
TSISubscription.prototype._metadataTimer = 0;
|
124
|
+
/** @type {!Object.<string, *>}
|
125
|
+
* @private
|
126
|
+
*/
|
127
|
+
TSISubscription.prototype._metadataMap;
|
128
|
+
/** @type {!Object.<string, *>}
|
129
|
+
* @private
|
130
|
+
*/
|
131
|
+
TSISubscription.prototype._metadataPendingMap;
|
132
|
+
|
133
|
+
/** @type {!RequestQueue}
|
134
|
+
* @private
|
135
|
+
*/
|
136
|
+
TSISubscription.prototype._tsiDataQ;
|
137
|
+
/** @type {number}
|
138
|
+
* @private
|
139
|
+
*/
|
140
|
+
TSISubscription.prototype._tsiDataTimer = 0;
|
141
|
+
/** @type {!Object.<string, *>}
|
142
|
+
* @private
|
143
|
+
*/
|
144
|
+
TSISubscription.prototype._tsiDataMap;
|
145
|
+
/** @type {!Object.<string, *>}
|
146
|
+
* @private
|
147
|
+
*/
|
148
|
+
TSISubscription.prototype._tsiDataPendingMap;
|
149
|
+
|
150
|
+
/** @type {!RequestQueue}
|
151
|
+
* @private
|
152
|
+
*/
|
153
|
+
TSISubscription.prototype._oldTsiDataQ;
|
154
|
+
|
155
|
+
/** @type {string}
|
156
|
+
* @private
|
157
|
+
*/
|
158
|
+
TSISubscription.prototype._state = "stop";
|
159
|
+
/** @type {string}
|
160
|
+
* @private
|
161
|
+
*/
|
162
|
+
TSISubscription.prototype._tsiTaServiceUrl = "/Apps/TAService";
|
163
|
+
/** @type {string}
|
164
|
+
* @private
|
165
|
+
*/
|
166
|
+
TSISubscription.prototype._tsiSharedServiceUrl = "/Apps/shared-services/service/TsMultiRICTimeSeries/GetMultiRICTimeSeries";
|
167
|
+
/** @type {number}
|
168
|
+
* @private
|
169
|
+
*/
|
170
|
+
TSISubscription.prototype._intervalId = 0;
|
171
|
+
/** @type {number}
|
172
|
+
* @private
|
173
|
+
*/
|
174
|
+
TSISubscription.prototype._intervalTime = 3600000; // 1 Hour
|
175
|
+
|
176
|
+
|
177
|
+
//#region public function of TSI service
|
178
|
+
/** Set the interval time for retrieving data
|
179
|
+
* @public
|
180
|
+
* @param {number} time Millisecond
|
181
|
+
*/
|
182
|
+
TSISubscription.prototype.setIntervalTime = function(time) {
|
183
|
+
time = +time;
|
184
|
+
if(!time) { // NaN or 0
|
185
|
+
return;
|
186
|
+
}
|
187
|
+
this._intervalTime = time;
|
188
|
+
this._stop();
|
189
|
+
this._start();
|
190
|
+
};
|
191
|
+
/** Set the settings of TSI
|
192
|
+
* @public
|
193
|
+
* @param {string=} sharedServiceUrl Url of TSI shared-service
|
194
|
+
* @param {string=} taServiceUrl Url of TSI TAservice
|
195
|
+
*/
|
196
|
+
TSISubscription.prototype.setTSISettings = function(sharedServiceUrl, taServiceUrl) {
|
197
|
+
if(sharedServiceUrl != null) {
|
198
|
+
this._tsiSharedServiceUrl = sharedServiceUrl;
|
199
|
+
}
|
200
|
+
if(taServiceUrl != null) {
|
201
|
+
this._tsiTaServiceUrl = taServiceUrl;
|
202
|
+
}
|
203
|
+
};
|
204
|
+
/** Subscribe symbol and field to the specified period. This method will start the interval for retrieving data automatically.
|
205
|
+
* @public
|
206
|
+
* @param {string} symbol RIC
|
207
|
+
* @param {string} field TSI field name
|
208
|
+
* @param {string} period Specified Date(YYYY-MM-DD) or period (NNNNNP where N is a digit between 0 and 9, and P can be: D for days, W for weeks, M for months, Q for quarters, Y for years)
|
209
|
+
* @return {*} Return the value if there is existing. Return undefined when requesting the invalid field.
|
210
|
+
*/
|
211
|
+
TSISubscription.prototype.addSymbolAndFieldToPeriod = function (symbol, field, period) {
|
212
|
+
let periodRIC = this._getPeriodRICData(period, symbol);
|
213
|
+
if(periodRIC.dataCache[field] != null) { // Already have data
|
214
|
+
return periodRIC.dataCache[field];
|
215
|
+
}
|
216
|
+
|
217
|
+
let periodMap = this._getPeriodMap(period);
|
218
|
+
let isNewSymbol = periodMap.symbol[symbol] == null;
|
219
|
+
if(isNewSymbol) {
|
220
|
+
periodMap.symbol[symbol] = true;
|
221
|
+
}
|
222
|
+
|
223
|
+
let isNewField = periodMap.field[field] == null;
|
224
|
+
if(isNewField) {
|
225
|
+
periodMap.field[field] = true;
|
226
|
+
}
|
227
|
+
|
228
|
+
if(isNewSymbol || isNewField) { // Request if it is new symbol or new field
|
229
|
+
this._oldTsiDataQ.add({ period: period });
|
230
|
+
}
|
231
|
+
|
232
|
+
this._start(); // Start interval
|
233
|
+
|
234
|
+
/*
|
235
|
+
* 1: No valid data from service
|
236
|
+
* 2: Waiting required data
|
237
|
+
*/
|
238
|
+
return TSISubscription.PENDING_DATA;
|
239
|
+
};
|
240
|
+
//#endregion public function of TSI service
|
241
|
+
|
242
|
+
|
243
|
+
//#region public function of event
|
244
|
+
/** Add the function handler into the specific event. This method will start interval automatically.
|
245
|
+
* @override
|
246
|
+
* @param {string} type Event name
|
247
|
+
* @param {Function} handler Event handler
|
248
|
+
*/
|
249
|
+
TSISubscription.prototype.addEventListener = function(type, handler) {
|
250
|
+
TSISubscription.base(this, "addEventListener", type, handler);
|
251
|
+
this._start();
|
252
|
+
};
|
253
|
+
/** Remove the function handler from the specific event. If there is not any event handlers, the service will stop automatically.
|
254
|
+
* @override
|
255
|
+
* @param {string} type Event name
|
256
|
+
* @param {Function} handler Event handler
|
257
|
+
*/
|
258
|
+
TSISubscription.prototype.removeEventListener = function(type, handler) {
|
259
|
+
TSISubscription.base(this, "removeEventListener", type, handler);
|
260
|
+
if(!this.hasListener()) {
|
261
|
+
this.removeAllEventListeners();
|
262
|
+
}
|
263
|
+
};
|
264
|
+
/** Remove all function handlers of all events and stop the interval of retrieving data of service.
|
265
|
+
* @override
|
266
|
+
*/
|
267
|
+
TSISubscription.prototype.removeAllEventListeners = function() {
|
268
|
+
TSISubscription.base(this, "removeAllEventListeners");
|
269
|
+
this._stop();
|
270
|
+
if(this._metadataTimer > 0) {
|
271
|
+
window.clearTimeout(this._metadataTimer);
|
272
|
+
}
|
273
|
+
this._metadataTimer = 0;
|
274
|
+
if(this._tsiDataTimer > 0) {
|
275
|
+
window.clearTimeout(this._tsiDataTimer);
|
276
|
+
}
|
277
|
+
this._tsiDataTimer = 0;
|
278
|
+
|
279
|
+
this._tsiPeriodMap = {};
|
280
|
+
this._metadataMap = {};
|
281
|
+
this._tsiDataMap = {};
|
282
|
+
this._metadataQ.reset();
|
283
|
+
this._tsiDataQ.reset();
|
284
|
+
};
|
285
|
+
//#endregion public function of event
|
286
|
+
|
287
|
+
|
288
|
+
//#region private function of TSI service
|
289
|
+
/** Start the interval of retrieving data
|
290
|
+
* @private
|
291
|
+
*/
|
292
|
+
TSISubscription.prototype._start = function() {
|
293
|
+
if(this._state === "start") {
|
294
|
+
return;
|
295
|
+
}
|
296
|
+
this._intervalId = window.setInterval(this._refreshData, this._intervalTime);
|
297
|
+
this._state = "start";
|
298
|
+
};
|
299
|
+
/** Stop the interval of retrieving data
|
300
|
+
* @private
|
301
|
+
*/
|
302
|
+
TSISubscription.prototype._stop = function() {
|
303
|
+
if(this._intervalId > 0) {
|
304
|
+
window.clearInterval(this._intervalId);
|
305
|
+
}
|
306
|
+
|
307
|
+
this._intervalId = 0;
|
308
|
+
this._state = "stop";
|
309
|
+
};
|
310
|
+
/** Refresh all the TSI data that had been subscribed to the service.
|
311
|
+
* @private
|
312
|
+
*/
|
313
|
+
TSISubscription.prototype._refreshData = function() {
|
314
|
+
for(let period in this._tsiPeriodMap) {
|
315
|
+
// Request to old TSI service
|
316
|
+
this._oldTsiDataQ.add({ period: period }); // If it has error code, it will fallback to new service automatically.
|
317
|
+
}
|
318
|
+
};
|
319
|
+
/** Get object that related to period. It has symbol and field properties to store the requested field and RIC to old service (shared-service).
|
320
|
+
* @private
|
321
|
+
* @param {string} period Specified Date(YYYY-MM-DD) or period (NNNNNP where N is a digit between 0 and 9, and P can be: D for days, W for weeks, M for months, Q for quarters, Y for years)
|
322
|
+
* @return {Object} Object that related to period
|
323
|
+
*/
|
324
|
+
TSISubscription.prototype._getPeriodMap = function(period) {
|
325
|
+
if(!this._tsiPeriodMap[period]) {
|
326
|
+
this._tsiPeriodMap[period] = {
|
327
|
+
symbol: {}, // These 2 properties is used for requesting the old service (shared-service)
|
328
|
+
field: {}
|
329
|
+
};
|
330
|
+
}
|
331
|
+
return this._tsiPeriodMap[period];
|
332
|
+
};
|
333
|
+
/** Get data object that related to period and RIC. It has view property to store the requested view and dataCache property to store data.
|
334
|
+
* @private
|
335
|
+
* @param {string} period Specified Date(YYYY-MM-DD) or period (NNNNNP where N is a digit between 0 and 9, and P can be: D for days, W for weeks, M for months, Q for quarters, Y for years)
|
336
|
+
* @param {string} symbol RIC
|
337
|
+
* @return {Object} Object that related to period and RIC
|
338
|
+
*/
|
339
|
+
TSISubscription.prototype._getPeriodRICData = function(period, symbol) {
|
340
|
+
let tsiPeriodMap = this._getPeriodMap(period);
|
341
|
+
if(!tsiPeriodMap[symbol]) {
|
342
|
+
tsiPeriodMap[symbol] = {
|
343
|
+
view: {}, // This property will used for new TSI service
|
344
|
+
dataCache: {}
|
345
|
+
};
|
346
|
+
}
|
347
|
+
|
348
|
+
return tsiPeriodMap[symbol];
|
349
|
+
};
|
350
|
+
//#endregion private function of TSI service
|
351
|
+
|
352
|
+
|
353
|
+
//#region private function of calling TS metadata service
|
354
|
+
/** Check symbol has its metadata or not
|
355
|
+
* @private
|
356
|
+
* @param {string} symbol RIC
|
357
|
+
* @return {boolean}
|
358
|
+
*/
|
359
|
+
TSISubscription.prototype._hasMetadata = function(symbol) {
|
360
|
+
return !symbol || (typeof this._tsiMetadata[symbol] === "object");
|
361
|
+
};
|
362
|
+
/** Method for requesting the metadata of symbol. Prevent requesting with duplicated RIC.
|
363
|
+
* @private
|
364
|
+
* @param {string} symbol RIC
|
365
|
+
*/
|
366
|
+
TSISubscription.prototype._requestMetadata = function(symbol) {
|
367
|
+
if(this._metadataPendingMap[symbol] || this._hasMetadata(symbol) || this._metadataMap[symbol]) { // Has metadata || pending request
|
368
|
+
return;
|
369
|
+
}
|
370
|
+
|
371
|
+
this._metadataMap[symbol] = true;
|
372
|
+
if(this._metadataTimer <= 0) {
|
373
|
+
this._metadataTimer = window.setTimeout(this._manageMetadataQ, 200);
|
374
|
+
}
|
375
|
+
};
|
376
|
+
/** Manage the request queue of TSI metadata. Split 300 RICs per request.
|
377
|
+
* @private
|
378
|
+
*/
|
379
|
+
TSISubscription.prototype._manageMetadataQ = function() {
|
380
|
+
this._metadataTimer = 0; // Reset
|
381
|
+
|
382
|
+
let symbolMap = this._metadataMap;
|
383
|
+
this._metadataMap = {};
|
384
|
+
|
385
|
+
let symbols = [];
|
386
|
+
for(let key in symbolMap) {
|
387
|
+
if(this._metadataPendingMap[key]) {
|
388
|
+
continue;
|
389
|
+
}
|
390
|
+
symbols.push(key);
|
391
|
+
this._metadataPendingMap[key] = true;
|
392
|
+
|
393
|
+
if(symbols.length >= TSISubscription.MAX_CONCURRENT_OBJECT) {
|
394
|
+
this._metadataQ.add({ rics: symbols }); // Add full capcity to queue
|
395
|
+
symbols = [];
|
396
|
+
}
|
397
|
+
}
|
398
|
+
if(symbols.length > 0) {
|
399
|
+
this._metadataQ.add({ rics: symbols }); // Add remaining to queue
|
400
|
+
}
|
401
|
+
};
|
402
|
+
/** Publish TSI metadata request to server.
|
403
|
+
* @private
|
404
|
+
* @param {Object} obj Specified RICs
|
405
|
+
* @param {Array.<Object>} q All RICs that are waiting in a queue
|
406
|
+
* @return {Promise}
|
407
|
+
*/
|
408
|
+
TSISubscription.prototype._onRequestMetadata = function(obj, q) {
|
409
|
+
let reqRics = obj.rics;
|
410
|
+
let len = reqRics.length;
|
411
|
+
if(len <= 0) {
|
412
|
+
return Promise.resolve("");
|
413
|
+
}
|
414
|
+
|
415
|
+
// Merge request
|
416
|
+
let qi = q.length;
|
417
|
+
let remaining = TSISubscription.MAX_CONCURRENT_OBJECT - len;
|
418
|
+
while(remaining > 0 && --qi >= 0) {
|
419
|
+
let qObj = q[qi];
|
420
|
+
reqRics = reqRics.concat( qObj.rics.splice(0, remaining) );
|
421
|
+
|
422
|
+
len = reqRics.length; // Update length
|
423
|
+
remaining = TSISubscription.MAX_CONCURRENT_OBJECT - len;
|
424
|
+
if(qObj.rics.length === 0) { // No data anymore
|
425
|
+
q.pop();
|
426
|
+
}
|
427
|
+
}
|
428
|
+
|
429
|
+
let payload = { "rics": reqRics };
|
430
|
+
let pendingMap = this._metadataPendingMap;
|
431
|
+
return Util.post(this._tsiTaServiceUrl + "/GetMetadata", payload)
|
432
|
+
.then(this._extractMetadata)
|
433
|
+
.catch(function(err) {
|
434
|
+
for(let i = len; --i >= 0;) {
|
435
|
+
delete pendingMap[reqRics[i]]; // Remove key from pending list due to error
|
436
|
+
}
|
437
|
+
});
|
438
|
+
};
|
439
|
+
/** Extract the metadata response from service. This will trig to call service for getting data automatically.
|
440
|
+
* @private
|
441
|
+
* @param {Object} serviceResponse
|
442
|
+
*/
|
443
|
+
TSISubscription.prototype._extractMetadata = function(serviceResponse) {
|
444
|
+
let instruments = serviceResponse["instruments"];
|
445
|
+
if(instruments) { // Successful request
|
446
|
+
let aryLen = Object.keys(/** @type {!Object} */(TSISubscription.INTERVAL_INDEX)).length;
|
447
|
+
let ary = new Array(aryLen); // Reused array
|
448
|
+
for(let i = instruments.length; --i >= 0;) {
|
449
|
+
let instrument = instruments[i];
|
450
|
+
|
451
|
+
let data = null;
|
452
|
+
let viewList = instrument["viewList"] || [];
|
453
|
+
for(let j = viewList.length; --j >= 0;) {
|
454
|
+
let view = viewList[j];
|
455
|
+
let intervals = view["intervals"];
|
456
|
+
let k, interval, len;
|
457
|
+
for(k = 0, len = intervals.length; k < len; k++) {
|
458
|
+
interval = intervals[k];
|
459
|
+
let idx = TSISubscription.INTERVAL_INDEX[ interval["name"] ];
|
460
|
+
if(idx != null) {
|
461
|
+
if(ary[idx] == null || TSISubscription.INTERVAL_MAIN[ interval["name"] ]) { // Main interval has more priority than other interval in same category
|
462
|
+
ary[idx] = interval;
|
463
|
+
}
|
464
|
+
}
|
465
|
+
}
|
466
|
+
|
467
|
+
let viewData = null;
|
468
|
+
let columns;
|
469
|
+
for(k = 0; k < aryLen; k++) {
|
470
|
+
interval = ary[k];
|
471
|
+
ary[k] = null; // Clear array for reused
|
472
|
+
if(interval != null && viewData === null) {
|
473
|
+
columns = 0; // Reset
|
474
|
+
|
475
|
+
for(let l = interval["fields"].length; --l >= 0;) { // Column mask for view + interval
|
476
|
+
columns |= TSISubscription.COLUMN_MASK_ENUM[ interval["fields"][l] ]; // undefined will be same as 0
|
477
|
+
}
|
478
|
+
|
479
|
+
if(columns !== 0) { // Valid interval to retrieve data
|
480
|
+
viewData = {
|
481
|
+
interval: TSISubscription.INTERVAL_ENUM[ interval["name"] ],
|
482
|
+
columnMask: columns
|
483
|
+
};
|
484
|
+
}
|
485
|
+
}
|
486
|
+
}
|
487
|
+
|
488
|
+
if(viewData !== null) {
|
489
|
+
if(data === null) {
|
490
|
+
data = {};
|
491
|
+
}
|
492
|
+
data[view["name"]] = viewData;
|
493
|
+
}
|
494
|
+
}
|
495
|
+
|
496
|
+
this._tsiMetadata[instrument["ric"]] = data;
|
497
|
+
delete this._metadataPendingMap[instrument["ric"]]; // Remove RIC from pending list
|
498
|
+
}
|
499
|
+
|
500
|
+
// Trig to call service for getting data
|
501
|
+
if(this._tsiDataTimer <= 0) {
|
502
|
+
this._tsiDataTimer = window.setTimeout(this._manageTSIDataQ, 0);
|
503
|
+
}
|
504
|
+
}
|
505
|
+
};
|
506
|
+
//#endregion private function of calling TS metadata service
|
507
|
+
|
508
|
+
|
509
|
+
//#region private function of calling new TS data service
|
510
|
+
/** Get the string of key by symbol, view and period.
|
511
|
+
* @private
|
512
|
+
* @param {string} symbol RIC
|
513
|
+
* @param {string} view TSI view name
|
514
|
+
* @param {string} period Specified Date(YYYY-MM-DD) or period (NNNNNP where N is a digit between 0 and 9, and P can be: D for days, W for weeks, M for months, Q for quarters, Y for years)
|
515
|
+
* @return {string} String of key
|
516
|
+
*/
|
517
|
+
TSISubscription.prototype._getKey = function(symbol, view, period) {
|
518
|
+
return symbol + "♫" + view + "♫" + period;
|
519
|
+
};
|
520
|
+
/** Build the request information for metadata
|
521
|
+
* @private
|
522
|
+
* @param {!Object} reqPayload Object that contains symbol, view and period
|
523
|
+
* @param {!Object.<string, number>} dateMap Date calculation map. Reduce duplicated date to calculate.
|
524
|
+
* @return {Object.<string, Array>}
|
525
|
+
*/
|
526
|
+
TSISubscription.prototype._buildRequestInfo = function(reqPayload, dateMap) {
|
527
|
+
let ric = reqPayload.ric;
|
528
|
+
let view = reqPayload.view;
|
529
|
+
let viewData = this._tsiMetadata[ric] && this._tsiMetadata[ric][view];
|
530
|
+
if(!viewData) {
|
531
|
+
return null;
|
532
|
+
}
|
533
|
+
|
534
|
+
let period = dateMap[reqPayload.period];
|
535
|
+
if(period == null) {
|
536
|
+
period = TSISubscription._dateCalculation(reqPayload.period).getTime();
|
537
|
+
dateMap[reqPayload.period] = period;
|
538
|
+
}
|
539
|
+
|
540
|
+
return {
|
541
|
+
"RequestInfos": [{
|
542
|
+
"__type": "TSRequest:http://www.thomsonreuters.com/ns/2012/01/01/webservices/TAService_1/",
|
543
|
+
"RIC": ric,
|
544
|
+
"Interval": viewData.interval,
|
545
|
+
"Field": view,
|
546
|
+
"ColumnMask": viewData.columnMask,
|
547
|
+
"DataPoints": "1",
|
548
|
+
"EndDate": "/Date(" + period + ")/"
|
549
|
+
}]
|
550
|
+
};
|
551
|
+
};
|
552
|
+
/** Method for requesting the data of symbol and view with specified period. Prevent requesting with duplicated symbol, view and period.
|
553
|
+
* @private
|
554
|
+
* @param {string} symbol RIC
|
555
|
+
* @param {string} view TSI view name
|
556
|
+
* @param {string} period Specified Date(YYYY-MM-DD) or period (NNNNNP where N is a digit between 0 and 9, and P can be: D for days, W for weeks, M for months, Q for quarters, Y for years)
|
557
|
+
*/
|
558
|
+
TSISubscription.prototype._requestTSIData = function(symbol, view, period) {
|
559
|
+
if(!symbol || !view || !period) {
|
560
|
+
return;
|
561
|
+
}
|
562
|
+
|
563
|
+
let key = this._getKey(symbol, view, period);
|
564
|
+
if(this._tsiDataPendingMap[key] || this._tsiDataMap[key]) { // Already in list
|
565
|
+
return;
|
566
|
+
}
|
567
|
+
|
568
|
+
this._tsiDataMap[key] = {
|
569
|
+
ric: symbol,
|
570
|
+
view: view,
|
571
|
+
period: period
|
572
|
+
};
|
573
|
+
if(this._tsiDataTimer <= 0) {
|
574
|
+
this._tsiDataTimer = window.setTimeout(this._manageTSIDataQ, 200);
|
575
|
+
}
|
576
|
+
};
|
577
|
+
/** Manage the request queue of TSI data. Split 300 objects per request. If the requested object dose not have metadata, it will request metadata first.
|
578
|
+
* @private
|
579
|
+
*/
|
580
|
+
TSISubscription.prototype._manageTSIDataQ = function() {
|
581
|
+
this._tsiDataTimer = 0; // Reset
|
582
|
+
|
583
|
+
let listMap = this._tsiDataMap;
|
584
|
+
this._tsiDataMap = {};
|
585
|
+
|
586
|
+
let obj;
|
587
|
+
let listArr = [];
|
588
|
+
for(let key in listMap) {
|
589
|
+
obj = listMap[key];
|
590
|
+
if(this._hasMetadata(obj.ric)) {
|
591
|
+
if(this._tsiDataPendingMap[key]) {
|
592
|
+
continue;
|
593
|
+
}
|
594
|
+
listArr.push( obj );
|
595
|
+
this._tsiDataPendingMap[key] = true;
|
596
|
+
} else { // No metadata
|
597
|
+
this._requestMetadata(obj.ric);
|
598
|
+
this._tsiDataMap[key] = obj; // Add to pending list again
|
599
|
+
continue;
|
600
|
+
}
|
601
|
+
|
602
|
+
if(listArr.length >= TSISubscription.MAX_CONCURRENT_OBJECT) {
|
603
|
+
this._tsiDataQ.add({ list: listArr }); // Add full capcity to queue
|
604
|
+
listArr = [];
|
605
|
+
}
|
606
|
+
}
|
607
|
+
if(listArr.length > 0) {
|
608
|
+
this._tsiDataQ.add({ list: listArr }); // Add remaining to queue
|
609
|
+
}
|
610
|
+
};
|
611
|
+
/** Publish TSI data request to server.
|
612
|
+
* @private
|
613
|
+
* @param {Object} obj Specified list of objects
|
614
|
+
* @param {Array.<Object>} q All list of objects that are waiting in a queue
|
615
|
+
* @return {!Promise}
|
616
|
+
*/
|
617
|
+
TSISubscription.prototype._onRequestTSIData = function(obj, q) {
|
618
|
+
let reqPayloads = obj.list;
|
619
|
+
let len = reqPayloads.length;
|
620
|
+
if(len <= 0) {
|
621
|
+
return Promise.resolve("");
|
622
|
+
}
|
623
|
+
|
624
|
+
// Merge request
|
625
|
+
let qi = q.length;
|
626
|
+
let remaining = TSISubscription.MAX_CONCURRENT_OBJECT - len;
|
627
|
+
while(remaining > 0 && --qi >= 0) {
|
628
|
+
let qObj = q[qi];
|
629
|
+
reqPayloads = reqPayloads.concat( qObj.list.splice(0, remaining) );
|
630
|
+
|
631
|
+
len = reqPayloads.length; // Update length
|
632
|
+
remaining = TSISubscription.MAX_CONCURRENT_OBJECT - len;
|
633
|
+
if(qObj.list.length === 0) { // No data anymore
|
634
|
+
q.pop();
|
635
|
+
}
|
636
|
+
}
|
637
|
+
|
638
|
+
let dateMap = {};
|
639
|
+
let requestInfos = [];
|
640
|
+
let reqInfo;
|
641
|
+
for(let i = len; --i >= 0;) {
|
642
|
+
reqInfo = this._buildRequestInfo(reqPayloads[i], dateMap);
|
643
|
+
if(reqInfo) {
|
644
|
+
requestInfos.push( reqInfo ); // BEWARE: This is the reverse loop
|
645
|
+
} else {
|
646
|
+
|
647
|
+
/*
|
648
|
+
* No metadata for request
|
649
|
+
* Complete the request so that it will not stay indefinitely as "pending"
|
650
|
+
* TRGRID-2335
|
651
|
+
*/
|
652
|
+
let key = this._getKey(reqPayloads[i].ric, reqPayloads[i].view, reqPayloads[i].period);
|
653
|
+
delete this._tsiDataPendingMap[key]; // Remove from pending map
|
654
|
+
|
655
|
+
let periodRIC = this._getPeriodRICData(reqPayloads[i].period, reqPayloads[i].ric);
|
656
|
+
let periodMap = this._getPeriodMap(reqPayloads[i].period);
|
657
|
+
let fields = periodMap.field;
|
658
|
+
let rowData = {};
|
659
|
+
for(let field in fields) {
|
660
|
+
if(!fields[field]) continue;
|
661
|
+
periodRIC.dataCache[field] = null;
|
662
|
+
rowData[reqPayloads[i].period + "♠" + field] = periodRIC.dataCache[field];
|
663
|
+
}
|
664
|
+
this._dispatch("dataChanged", { "ric": reqPayloads[i].ric, "values": rowData, "sender": this }); // Publish data
|
665
|
+
reqPayloads.splice(i, 1);
|
666
|
+
}
|
667
|
+
}
|
668
|
+
|
669
|
+
if(requestInfos.length === 0) {
|
670
|
+
return Promise.resolve("");
|
671
|
+
}
|
672
|
+
|
673
|
+
let self = this; // TODO: This is bad
|
674
|
+
let payload = { "messages": requestInfos.reverse() }; // Reverse array back for normal order
|
675
|
+
return Util.requestText(this._tsiTaServiceUrl + "/CalculateAllData", payload)
|
676
|
+
.then(function(serviceResponse) {
|
677
|
+
return {
|
678
|
+
payload: reqPayloads, // attached payload
|
679
|
+
response: serviceResponse
|
680
|
+
};
|
681
|
+
})
|
682
|
+
.then(this._extractTSIData)
|
683
|
+
.catch(function(err) { // TODO: This is bad
|
684
|
+
for(let i = len; --i >= 0;) { // eslint-disable-line
|
685
|
+
let key = self._getKey(reqPayloads[i].ric, reqPayloads[i].view, reqPayloads[i].period); // eslint-disable-line
|
686
|
+
delete self._tsiDataPendingMap[key]; // Remove from pending map
|
687
|
+
}
|
688
|
+
});
|
689
|
+
};
|
690
|
+
/** Extract the TSI data response from service. Cache the data and dispatch an event.
|
691
|
+
* @private
|
692
|
+
* @param {Object} res Object that contains response from service in response property and requested payload in payload property
|
693
|
+
* @return {Object}
|
694
|
+
*/
|
695
|
+
TSISubscription.prototype._extractTSIData = function(res) {
|
696
|
+
let response = res.response.replace(/\[NaN(,NaN)*\]/g, "[]"); // Handler for return the invalid JSON syntax due to no data
|
697
|
+
let json;
|
698
|
+
try {
|
699
|
+
json = /** @type {Object} */(JSON.parse(response));
|
700
|
+
} catch(ex) {
|
701
|
+
console.log("Cannot parse TSI data: ", ex);
|
702
|
+
json = null;
|
703
|
+
}
|
704
|
+
|
705
|
+
if(json) {
|
706
|
+
let payload = res.payload;
|
707
|
+
let len = payload.length;
|
708
|
+
let periodRIC, dataCache, view, symbol, period, rowData, field, periodMap;
|
709
|
+
for(let i = 0; i < len; i++) {
|
710
|
+
view = payload[i].view;
|
711
|
+
symbol = payload[i].ric;
|
712
|
+
period = payload[i].period;
|
713
|
+
|
714
|
+
periodRIC = this._getPeriodRICData(period, symbol);
|
715
|
+
periodRIC.view[view] = true; // Mark as already requested
|
716
|
+
dataCache = periodRIC.dataCache;
|
717
|
+
|
718
|
+
let data = json[i]["Columns"] || [];
|
719
|
+
if(data.length === 0) {
|
720
|
+
continue;
|
721
|
+
}
|
722
|
+
|
723
|
+
rowData = {};
|
724
|
+
let val;
|
725
|
+
for(let j = 0, dataLen = data.length; j < dataLen; j++) {
|
726
|
+
val = data[j]["Values"][0];
|
727
|
+
if(val == null || val !== val) {
|
728
|
+
/*
|
729
|
+
* undefined, null, NaN
|
730
|
+
* Complete the request so that it will not stay indefinitely as "pending"
|
731
|
+
* TRGRID-2335
|
732
|
+
*/
|
733
|
+
periodMap = this._getPeriodMap(period);
|
734
|
+
for(field in periodMap.field) {
|
735
|
+
if(!periodMap.field[field]) continue;
|
736
|
+
dataCache[field] = null;
|
737
|
+
rowData[period + "♠" + field] = dataCache[field];
|
738
|
+
}
|
739
|
+
continue;
|
740
|
+
}
|
741
|
+
|
742
|
+
switch(data[j]["Name"]) { // Cache the data in service
|
743
|
+
case "Date":
|
744
|
+
field = view + ".TIMESTAMP";
|
745
|
+
dataCache[field] = new Date(+val.substring(6, val.length - 2)).toJSON().substr(0, 19);
|
746
|
+
rowData[period + "♠" + field] = dataCache[field];
|
747
|
+
break;
|
748
|
+
case "Open":
|
749
|
+
field = view + ".OPEN";
|
750
|
+
dataCache[field] = val;
|
751
|
+
rowData[period + "♠" + field] = dataCache[field];
|
752
|
+
break;
|
753
|
+
case "High":
|
754
|
+
field = view + ".HIGH";
|
755
|
+
dataCache[field] = val;
|
756
|
+
rowData[period + "♠" + field] = dataCache[field];
|
757
|
+
break;
|
758
|
+
case "Low":
|
759
|
+
field = view + ".LOW";
|
760
|
+
dataCache[field] = val;
|
761
|
+
rowData[period + "♠" + field] = dataCache[field];
|
762
|
+
break;
|
763
|
+
case "Close":
|
764
|
+
field = view + ".CLOSE";
|
765
|
+
dataCache[field] = val;
|
766
|
+
rowData[period + "♠" + field] = dataCache[field];
|
767
|
+
|
768
|
+
field = view + ".VALUE";
|
769
|
+
dataCache[field] = val; // WORKAROUND: Service return VALUE in factlist CLOSE
|
770
|
+
rowData[period + "♠" + field] = dataCache[field];
|
771
|
+
break;
|
772
|
+
case "Volume":
|
773
|
+
field = view + ".VOLUME";
|
774
|
+
dataCache[field] = val;
|
775
|
+
rowData[period + "♠" + field] = dataCache[field];
|
776
|
+
break;
|
777
|
+
case "Count":
|
778
|
+
field = view + ".COUNT";
|
779
|
+
dataCache[field] = val;
|
780
|
+
rowData[period + "♠" + field] = dataCache[field];
|
781
|
+
break;
|
782
|
+
default:
|
783
|
+
field = (view + "." + data[j]["Name"]).toUpperCase();
|
784
|
+
dataCache[field] = val; // Rarely case: new fields
|
785
|
+
rowData[period + "♠" + field] = dataCache[field];
|
786
|
+
}
|
787
|
+
}
|
788
|
+
|
789
|
+
this._dispatch("dataChanged", { "ric": symbol, "values": rowData, "sender": this }); // Publish data
|
790
|
+
delete this._tsiDataPendingMap[ this._getKey(symbol, view, period) ]; // Remove from pending map
|
791
|
+
}
|
792
|
+
}
|
793
|
+
|
794
|
+
return json;
|
795
|
+
};
|
796
|
+
//#endregion private function of calling new TS data service
|
797
|
+
|
798
|
+
|
799
|
+
//#region private function of calling old TS data service
|
800
|
+
/** Publish the TSI request to the TSI server.
|
801
|
+
* @private
|
802
|
+
* @param {Object} obj Specified Date(YYYY-MM-DD) or period (NNNNNP where N is a digit between 0 and 9, and P can be: D for days, W for weeks, M for months, Q for quarters, Y for years)
|
803
|
+
* @param {Array.<Object>} q All periods that are waiting in a queue
|
804
|
+
* @return {Promise}
|
805
|
+
*/
|
806
|
+
TSISubscription.prototype._requestTimeSeriesData = function(obj, q) {
|
807
|
+
let period = obj.period;
|
808
|
+
for(let i = q.length; --i >= 0;) {
|
809
|
+
let qObj = q[i];
|
810
|
+
if(!qObj.rics && qObj.period === period) {
|
811
|
+
q.splice(i, 1); // Remove any duplicate period that is being queued
|
812
|
+
}
|
813
|
+
}
|
814
|
+
|
815
|
+
let periodMap = this._getPeriodMap(period);
|
816
|
+
let fields = Object.keys(periodMap.field);
|
817
|
+
let symbols = obj.rics ? obj.rics : Object.keys(periodMap.symbol);
|
818
|
+
|
819
|
+
if(fields.length === 0 || symbols.length === 0) {
|
820
|
+
return null;
|
821
|
+
}
|
822
|
+
|
823
|
+
let reqDate = TSISubscription._dateCalculation(period).toJSON();
|
824
|
+
if(reqDate === null) { // Invalid date/period parameter
|
825
|
+
return null;
|
826
|
+
} else {
|
827
|
+
reqDate = reqDate.slice(0, 10);
|
828
|
+
}
|
829
|
+
|
830
|
+
if(symbols.length > 300) { // TSI cannot handle more than 300 rics in a single request
|
831
|
+
obj.rics = symbols;
|
832
|
+
symbols = obj.rics.splice(0, 300); // Split the rics
|
833
|
+
q.unshift(obj); // Push the request back at the front of the queue
|
834
|
+
}
|
835
|
+
|
836
|
+
let payload = {
|
837
|
+
"rics": symbols.join(" "),
|
838
|
+
"factList": fields.join(","),
|
839
|
+
"date": reqDate
|
840
|
+
};
|
841
|
+
|
842
|
+
return Util.post(this._tsiSharedServiceUrl, payload)
|
843
|
+
.then(function(result) {
|
844
|
+
return {
|
845
|
+
"period": period, // Attach requested period
|
846
|
+
"reqDate": reqDate, // Attach requested date for comparison with the returned data
|
847
|
+
"result": result
|
848
|
+
};
|
849
|
+
})
|
850
|
+
.then(this._onTSIUpdate)
|
851
|
+
.catch(TSISubscription._emptyMethod); // Silent error handling
|
852
|
+
};
|
853
|
+
/** Function for processing the TSI response and publish the event to the listener.
|
854
|
+
* @private
|
855
|
+
* @param {Object} json JSON object of TSI response
|
856
|
+
*/
|
857
|
+
TSISubscription.prototype._onTSIUpdate = function(json) {
|
858
|
+
let period = json["period"];
|
859
|
+
let result = json["result"];
|
860
|
+
let periodMap = this._getPeriodMap(period);
|
861
|
+
let fields = periodMap["field"];
|
862
|
+
|
863
|
+
let header = result[0];
|
864
|
+
if(!header) {
|
865
|
+
throw("Invalid response from TSI service");
|
866
|
+
}
|
867
|
+
|
868
|
+
let ricIdx = -1;
|
869
|
+
let returnStatusIdx = -1;
|
870
|
+
// let timestampIdx = -1;
|
871
|
+
let fieldIdxMap = {};
|
872
|
+
for(let i = header.length; --i >= 0;) {
|
873
|
+
if(header[i] === "RIC") {
|
874
|
+
ricIdx = i;
|
875
|
+
} else if(header[i] === "ReturnStatus") {
|
876
|
+
returnStatusIdx = i;
|
877
|
+
} else if(header[i] === "TimeStamp") {
|
878
|
+
// timestampIdx = i;
|
879
|
+
} else if(fields[header[i]]) { // Requested fields
|
880
|
+
fieldIdxMap[header[i]] = i;
|
881
|
+
}
|
882
|
+
}
|
883
|
+
fields = Object.keys(fieldIdxMap); // Collect the fields of result
|
884
|
+
|
885
|
+
let rowLen = result.length;
|
886
|
+
let symbol, value, rowData, dataCache;
|
887
|
+
// let isCorrectDate;
|
888
|
+
for(i = 1; i < rowLen; i++) {
|
889
|
+
symbol = result[i][ricIdx];
|
890
|
+
|
891
|
+
if(result[i][returnStatusIdx] !== "0") { // Have an error in response, then fallback to new TS data service
|
892
|
+
// Request to new service
|
893
|
+
for(let k = fields.length; --k >= 0;) {
|
894
|
+
let view = fields[k].substring(0, fields[k].lastIndexOf("."));
|
895
|
+
if(!this._hasMetadata(symbol) || (this._tsiMetadata[symbol] && this._tsiMetadata[symbol][view])) { // No metadata || Ready to make a request
|
896
|
+
this._requestTSIData(symbol, view, period);
|
897
|
+
}
|
898
|
+
}
|
899
|
+
continue;
|
900
|
+
}
|
901
|
+
|
902
|
+
// isCorrectDate = (reqDate === result[i][timestampIdx]);
|
903
|
+
dataCache = this._getPeriodRICData(period, symbol).dataCache;
|
904
|
+
rowData = {};
|
905
|
+
|
906
|
+
for(let j = fields.length; --j >= 0;) {
|
907
|
+
// value = (isCorrectDate) ? (result[i][fieldIdxMap[fields[j]]] || null) : null; // If result is same as the requested timestamp then return the value. Otherwise return null.
|
908
|
+
value = result[i][fieldIdxMap[fields[j]]] || null; // If return empty string, it should be null
|
909
|
+
if(value !== null) {
|
910
|
+
value = +value; // Convert to number
|
911
|
+
}
|
912
|
+
dataCache[fields[j]] = value; // Cache the data in service
|
913
|
+
rowData[period + "♠" + fields[j]] = dataCache[fields[j]];
|
914
|
+
}
|
915
|
+
|
916
|
+
this._dispatch("dataChanged", { "ric": symbol, "values": rowData, "sender": this }); // Publish data
|
917
|
+
}
|
918
|
+
};
|
919
|
+
//#endregion private function of calling old TS data service
|
920
|
+
|
921
|
+
|
922
|
+
//#region private function of date calculation
|
923
|
+
/** Add/Subtract days to the given JS Date object.
|
924
|
+
* @private
|
925
|
+
* @param {!Date} date Javascript Date object
|
926
|
+
* @param {number} day Day to add or subtract. Plus value is add operation. Minus value is subtract operation.
|
927
|
+
* @return {!Date}
|
928
|
+
*/
|
929
|
+
TSISubscription._addDays = function(date, day) {
|
930
|
+
date.setDate(date.getDate() + day);
|
931
|
+
|
932
|
+
return date;
|
933
|
+
};
|
934
|
+
/** Add/Subtract months to the given JS Date object.
|
935
|
+
* @private
|
936
|
+
* @param {!Date} date Javascript Date object
|
937
|
+
* @param {number} month Month to add or subtract. Plus value is add operation. Minus value is subtract operation.
|
938
|
+
* @return {!Date}
|
939
|
+
*/
|
940
|
+
TSISubscription._addMonths = function(date, month) {
|
941
|
+
// Reference: http://stackoverflow.com/questions/7937233/how-do-i-calculate-the-date-in-javascript-three-months-prior-to-today
|
942
|
+
let expectedMonth = ((date.getMonth() + month) % 12 + 12) % 12;
|
943
|
+
date.setMonth(date.getMonth() + month);
|
944
|
+
if (date.getMonth() !== expectedMonth) { // If it has an error of native date subtraction
|
945
|
+
date.setDate(0); // Backward to the last day of previous month
|
946
|
+
}
|
947
|
+
return date;
|
948
|
+
};
|
949
|
+
/** Add/Subtract months to the given JS Date object.
|
950
|
+
* @private
|
951
|
+
* @param {!Date} date Javascript Date object
|
952
|
+
* @param {number} num
|
953
|
+
* @param {string=} dateUnit
|
954
|
+
* @return {!Date}
|
955
|
+
*/
|
956
|
+
TSISubscription._addDate = function(date, num, dateUnit) {
|
957
|
+
if(dateUnit === "Y") {
|
958
|
+
return TSISubscription._addMonths(date, num * 12);
|
959
|
+
} else if(dateUnit === "Q") {
|
960
|
+
return TSISubscription._addMonths(date, num * 3);
|
961
|
+
} else if(dateUnit === "M") {
|
962
|
+
return TSISubscription._addMonths(date, num);
|
963
|
+
} else if(dateUnit === "W") {
|
964
|
+
return TSISubscription._addDays(date, num * 7);
|
965
|
+
}
|
966
|
+
|
967
|
+
return TSISubscription._addDays(date, num);
|
968
|
+
};
|
969
|
+
/** Calculate the given period or transform the given date to string of date
|
970
|
+
* @private
|
971
|
+
* @param {string} period Specified Date(YYYY-MM-DD) or period (NNNNNP where N is a digit between 0 and 9, and P can be: D for days, W for weeks, M for months, Q for quarters, Y for years)
|
972
|
+
* @return {Date} Date object
|
973
|
+
*/
|
974
|
+
TSISubscription._dateCalculation = function(period) {
|
975
|
+
let goBackPeriods = period.match(/\d+(D|W|M|Q|Y)/g);
|
976
|
+
if(goBackPeriods) { // Relative date pattern
|
977
|
+
let now = new Date();
|
978
|
+
for(let i = goBackPeriods.length; --i >= 0;){
|
979
|
+
let p = goBackPeriods[i];
|
980
|
+
let dateUnit = p.substr(p.length - 1);
|
981
|
+
let num = -(p.substr(0, p.length - 1));
|
982
|
+
now = TSISubscription._addDate(now, num, dateUnit);
|
983
|
+
}
|
984
|
+
return now;
|
985
|
+
}
|
986
|
+
|
987
|
+
// Specified date
|
988
|
+
let temp = new Date(period);
|
989
|
+
if(temp.toJSON() === null) {
|
990
|
+
console.warn("Invalid period parameter: " + period);
|
991
|
+
return null;
|
992
|
+
}
|
993
|
+
let date = null;
|
994
|
+
if(period.match(/^\d{1,4}(-\d{2}(-\d{2})?)?$/)) { // If ISO format (YYYY-MM-DD)
|
995
|
+
date = temp;
|
996
|
+
} else { // If non ISO format
|
997
|
+
date = new Date(temp.getTime() - temp.getTimezoneOffset() * 60000); // Adjust timezone
|
998
|
+
}
|
999
|
+
return date; // Return the date in string format e.g. 2017-02-21
|
1000
|
+
};
|
1001
|
+
|
1002
|
+
|
1003
|
+
/** @private
|
1004
|
+
* @param {*} msg
|
1005
|
+
*/
|
1006
|
+
TSISubscription._log = function(msg) {
|
1007
|
+
console.log("TSI: ", msg);
|
1008
|
+
};
|
1009
|
+
/** @private
|
1010
|
+
* @param {*} msg
|
1011
|
+
*/
|
1012
|
+
TSISubscription._emptyMethod = function(msg) {
|
1013
|
+
};
|
1014
|
+
|
1015
|
+
export {TSISubscription};
|