@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,890 @@
|
|
1
|
+
import {DataGenerator} from "./DataGenerator.js";
|
2
|
+
import {CollectionDict} from "./CollectionDict.js";
|
3
|
+
|
4
|
+
/** @private
|
5
|
+
* @param {Object} subA
|
6
|
+
* @param {Object} subB
|
7
|
+
* @return {string}
|
8
|
+
*/
|
9
|
+
let _joinSubKeys = function(subA, subB) {
|
10
|
+
return subA.ric + "_" + subB.ric;
|
11
|
+
};
|
12
|
+
|
13
|
+
/** @private
|
14
|
+
* @param {string} ric
|
15
|
+
* @return {boolean}
|
16
|
+
*/
|
17
|
+
let _isDynamicChain = function(ric) {
|
18
|
+
// Dynamic chain will be 2 . (dot) for example .PG.PA
|
19
|
+
let matching = ric.match(/\./g); // Can be null when doesn't found dot(.)
|
20
|
+
if(matching) {
|
21
|
+
return matching.length > 1;
|
22
|
+
}
|
23
|
+
return false;
|
24
|
+
};
|
25
|
+
|
26
|
+
/** @private
|
27
|
+
* @param {Array<Object>} arr sub children
|
28
|
+
* @return {Array<Object>}
|
29
|
+
*/
|
30
|
+
let _shuffleArray = function(arr) {
|
31
|
+
let arrayShuffled = arr; // Modify original array
|
32
|
+
let i, randNumber, tmp;
|
33
|
+
// Shuffle the array randomly using the Fisher-Yates algorithm
|
34
|
+
for (i = arrayShuffled.length - 1; i > 0; i--) {
|
35
|
+
randNumber = Math.floor(Math.random() * (i + 1)); // TODO: it can be use this._dataGen.randInt(min, max) range
|
36
|
+
tmp = arrayShuffled[i];
|
37
|
+
arrayShuffled[i] = arrayShuffled[randNumber];
|
38
|
+
arrayShuffled[randNumber] = tmp;
|
39
|
+
}
|
40
|
+
|
41
|
+
// TODO: merge into 1 loop
|
42
|
+
// Update the CHILD_ORDER property based on the new index
|
43
|
+
arrayShuffled.forEach(_assignChildOrder);
|
44
|
+
arrayShuffled = arrayShuffled.sort(_childOrderSort);
|
45
|
+
|
46
|
+
return arrayShuffled;
|
47
|
+
};
|
48
|
+
|
49
|
+
let _assignChildOrder = function(obj, index) {
|
50
|
+
obj["CHILD_ORDER"] = index;
|
51
|
+
};
|
52
|
+
|
53
|
+
let _childOrderSort = function(a, b) {
|
54
|
+
return a["CHILD_ORDER"] - b["CHILD_ORDER"];
|
55
|
+
};
|
56
|
+
|
57
|
+
/** @constructor */
|
58
|
+
let MockQuotes2 = function() {
|
59
|
+
|
60
|
+
};
|
61
|
+
/** @private
|
62
|
+
* @type {*}
|
63
|
+
*/
|
64
|
+
MockQuotes2.prototype._lastSub = null;
|
65
|
+
/** @private
|
66
|
+
* @type {Object}
|
67
|
+
*/
|
68
|
+
MockQuotes2.prototype._configObj = null;
|
69
|
+
|
70
|
+
/** @public
|
71
|
+
* @param {Object=} options
|
72
|
+
*/
|
73
|
+
MockQuotes2.prototype.config = function(options) {
|
74
|
+
if(options) {
|
75
|
+
this._configObj = options;
|
76
|
+
}
|
77
|
+
if(this._lastSub && this._configObj) {
|
78
|
+
this._lastSub.config(this._configObj);
|
79
|
+
}
|
80
|
+
};
|
81
|
+
/** @public
|
82
|
+
* @param {Object=} options
|
83
|
+
* @return {MockSubscriptions}
|
84
|
+
*/
|
85
|
+
MockQuotes2.prototype.create = function(options) {
|
86
|
+
this._lastSub = new MockSubscriptions(options || this._configObj);
|
87
|
+
return this._lastSub;
|
88
|
+
};
|
89
|
+
|
90
|
+
/** @public
|
91
|
+
* @return {boolean}
|
92
|
+
*/
|
93
|
+
MockQuotes2.prototype.isSkipHeaderSupported = function() {
|
94
|
+
return true;
|
95
|
+
};
|
96
|
+
|
97
|
+
/** @public
|
98
|
+
* @param {number=} min
|
99
|
+
* @param {number=} max
|
100
|
+
*/
|
101
|
+
MockQuotes2.prototype.setUpdateInterval = function(min, max) {
|
102
|
+
if(this._lastSub) {
|
103
|
+
this._lastSub.setUpdateInterval(min, max);
|
104
|
+
} else {
|
105
|
+
if(!this._configObj) {
|
106
|
+
this._configObj = {};
|
107
|
+
}
|
108
|
+
this._configObj.minInterval = min;
|
109
|
+
this._configObj.maxInterval = max;
|
110
|
+
}
|
111
|
+
};
|
112
|
+
/** @public
|
113
|
+
* @param {number=} percent
|
114
|
+
*/
|
115
|
+
MockQuotes2.prototype.setPercentageDataUpdate = function(percent) {
|
116
|
+
if(this._lastSub) {
|
117
|
+
this._lastSub.setPercentageDataUpdate(percent);
|
118
|
+
} else {
|
119
|
+
if(!this._configObj) {
|
120
|
+
this._configObj = {};
|
121
|
+
}
|
122
|
+
this._configObj.percentageDataUpdate = percent;
|
123
|
+
}
|
124
|
+
};
|
125
|
+
|
126
|
+
|
127
|
+
/** @constructor
|
128
|
+
* @param {Object=} options
|
129
|
+
*/
|
130
|
+
let MockSubscriptions = function(options) {
|
131
|
+
this._onSubscriptionResponse = this._onSubscriptionResponse.bind(this);
|
132
|
+
|
133
|
+
this._subMap = {};
|
134
|
+
this._dataMap = new CollectionDict();
|
135
|
+
this._fields = {};
|
136
|
+
this._events = {};
|
137
|
+
this._dataGen = new DataGenerator();
|
138
|
+
|
139
|
+
this.config(options);
|
140
|
+
};
|
141
|
+
|
142
|
+
/** @private
|
143
|
+
* @type {number}
|
144
|
+
*/
|
145
|
+
MockSubscriptions.prototype._minInterval = 750;
|
146
|
+
/** @private
|
147
|
+
* @type {number}
|
148
|
+
*/
|
149
|
+
MockSubscriptions.prototype._maxInterval = 850;
|
150
|
+
/** @private
|
151
|
+
* @type {number}
|
152
|
+
*/
|
153
|
+
MockSubscriptions.prototype._percentageDataUpdate = 0.1; // 10% by default
|
154
|
+
/** @private
|
155
|
+
* @type {number}
|
156
|
+
*/
|
157
|
+
MockSubscriptions.prototype._percentageOrderChange = 1; // 100%
|
158
|
+
/** @private
|
159
|
+
* @type {boolean}
|
160
|
+
*/
|
161
|
+
MockSubscriptions.prototype._constituentCache = false;
|
162
|
+
|
163
|
+
/** @public
|
164
|
+
* @param {Object=} options
|
165
|
+
*/
|
166
|
+
MockSubscriptions.prototype.config = function(options) {
|
167
|
+
if(!options) {
|
168
|
+
return;
|
169
|
+
}
|
170
|
+
let num = options.minInterval;
|
171
|
+
if(typeof num === "number") {
|
172
|
+
this._minInterval = num;
|
173
|
+
if(this._minInterval > this._maxInterval) {
|
174
|
+
this._maxInterval = this._minInterval;
|
175
|
+
}
|
176
|
+
}
|
177
|
+
|
178
|
+
num = options.maxInterval;
|
179
|
+
if(typeof num === "number") {
|
180
|
+
this._maxInterval = num;
|
181
|
+
if(this._minInterval > this._maxInterval) {
|
182
|
+
this._minInterval = this._maxInterval;
|
183
|
+
}
|
184
|
+
}
|
185
|
+
|
186
|
+
num = options.percentageDataUpdate;
|
187
|
+
if(typeof num === "number") {
|
188
|
+
this._percentageDataUpdate = num / 100;
|
189
|
+
}
|
190
|
+
|
191
|
+
num = options.percentageOrderChange;
|
192
|
+
if(typeof num === "number") {
|
193
|
+
this._percentageOrderChange = num / 100;
|
194
|
+
}
|
195
|
+
|
196
|
+
let value = options.constituentCache;
|
197
|
+
if(value != null) {
|
198
|
+
this._constituentCache = value;
|
199
|
+
}
|
200
|
+
|
201
|
+
};
|
202
|
+
/** @public
|
203
|
+
* @param {number=} min
|
204
|
+
* @param {number=} max
|
205
|
+
*/
|
206
|
+
MockSubscriptions.prototype.setUpdateInterval = function(min, max) {
|
207
|
+
if(typeof min === "number") {
|
208
|
+
this._minInterval = min;
|
209
|
+
}
|
210
|
+
|
211
|
+
if(typeof max === "number") {
|
212
|
+
this._maxInterval = max;
|
213
|
+
}
|
214
|
+
};
|
215
|
+
/** @public
|
216
|
+
* @param {number=} percent
|
217
|
+
*/
|
218
|
+
MockSubscriptions.prototype.setPercentageDataUpdate = function(percent) {
|
219
|
+
if(typeof percent === "number") {
|
220
|
+
this._percentageDataUpdate = Math.round(percent / 100);
|
221
|
+
}
|
222
|
+
};
|
223
|
+
|
224
|
+
/** @public
|
225
|
+
* @param {number=} percent
|
226
|
+
*/
|
227
|
+
MockSubscriptions.prototype.setPercentageOrderChanged = function(percent) {
|
228
|
+
if(typeof percent === "number") {
|
229
|
+
this._percentageOrderChange = Math.round(percent / 100);
|
230
|
+
}
|
231
|
+
};
|
232
|
+
|
233
|
+
/** @public
|
234
|
+
* @param {number} seed
|
235
|
+
*/
|
236
|
+
MockSubscriptions.prototype.setSeed = function(seed) {
|
237
|
+
this._dataGen.setSeed(seed);
|
238
|
+
};
|
239
|
+
|
240
|
+
|
241
|
+
/** @public
|
242
|
+
* @param {string} ric
|
243
|
+
* @param {string=} subId
|
244
|
+
* @return {string|null} subscription Id
|
245
|
+
*/
|
246
|
+
MockSubscriptions.prototype.addRic = function(ric, subId) {
|
247
|
+
return this._addSymbol(ric, false, subId);
|
248
|
+
};
|
249
|
+
/** @public
|
250
|
+
* @param {string} ric
|
251
|
+
* @param {string=} subId
|
252
|
+
* @return {string|null} subscription Id
|
253
|
+
*/
|
254
|
+
MockSubscriptions.prototype.addChain = function(ric, subId) {
|
255
|
+
return this._addSymbol(ric, true, subId);
|
256
|
+
};
|
257
|
+
/** @public
|
258
|
+
* @param {string|Array.<string>} fields
|
259
|
+
*/
|
260
|
+
MockSubscriptions.prototype.addFields = function(fields) {
|
261
|
+
if(!fields) { return; }
|
262
|
+
|
263
|
+
if(typeof fields === "string") {
|
264
|
+
fields = [fields];
|
265
|
+
}
|
266
|
+
let len = fields.length;
|
267
|
+
for(let i = 0; i < len; ++i) {
|
268
|
+
this._fields[fields[i]] = true;
|
269
|
+
}
|
270
|
+
};
|
271
|
+
|
272
|
+
/** @public
|
273
|
+
* @param {string} subId
|
274
|
+
*/
|
275
|
+
MockSubscriptions.prototype.removeSubscription = function(subId) {
|
276
|
+
let sub = this._subMap[subId];
|
277
|
+
if(!sub) {
|
278
|
+
return;
|
279
|
+
}
|
280
|
+
this._dispatch("subscriptionRemoved", {"subs": [sub]});
|
281
|
+
delete this._subMap[subId];
|
282
|
+
this._dataMap.removeItem(sub["ric"], sub);
|
283
|
+
if(sub["chain"]) {
|
284
|
+
let children = sub["children"];
|
285
|
+
let len = children.length;
|
286
|
+
for(let i = 0; i < len; ++i) {
|
287
|
+
let child = children[i];
|
288
|
+
this._dataMap.removeItem(_joinSubKeys(sub, child), child);
|
289
|
+
child["parent"] = null;
|
290
|
+
}
|
291
|
+
sub["children"] = null;
|
292
|
+
sub["ricList"] = null;
|
293
|
+
}
|
294
|
+
};
|
295
|
+
/** @public
|
296
|
+
* @function
|
297
|
+
*/
|
298
|
+
MockSubscriptions.prototype.removeRic = MockSubscriptions.prototype.removeSubscription;
|
299
|
+
/** @public
|
300
|
+
* @function
|
301
|
+
*/
|
302
|
+
MockSubscriptions.prototype.removeChain = MockSubscriptions.prototype.removeSubscription;
|
303
|
+
/** @public */
|
304
|
+
MockSubscriptions.prototype.removeAllSubscriptions = function() { // All channels will also be closed
|
305
|
+
let working = this._working;
|
306
|
+
this.stop();
|
307
|
+
|
308
|
+
if(this._hasListener("subscriptionRemoved")) {
|
309
|
+
let subs = [];
|
310
|
+
for(let subId in this._subMap) {
|
311
|
+
subs.push(this._subMap[subId]);
|
312
|
+
}
|
313
|
+
if(subs.length > 0) {
|
314
|
+
this._dispatch("subscriptionRemoved", {"subs": subs});
|
315
|
+
}
|
316
|
+
}
|
317
|
+
|
318
|
+
this._subMap = {};
|
319
|
+
this._dataMap.removeAllItems();
|
320
|
+
if(working) {
|
321
|
+
this.start();
|
322
|
+
}
|
323
|
+
};
|
324
|
+
|
325
|
+
/** @public
|
326
|
+
* @param {string|Array.<string>} fields
|
327
|
+
*/
|
328
|
+
MockSubscriptions.prototype.removeFields = function(fields) {
|
329
|
+
if(typeof fields === "string") {
|
330
|
+
fields = [fields];
|
331
|
+
}
|
332
|
+
let len = fields.length;
|
333
|
+
for(let i = 0; i < len; ++i) {
|
334
|
+
let field = fields[i];
|
335
|
+
if(this._fields[field]) {
|
336
|
+
delete this._fields[field];
|
337
|
+
}
|
338
|
+
}
|
339
|
+
};
|
340
|
+
/** @public */
|
341
|
+
MockSubscriptions.prototype.removeAllFields = function() {
|
342
|
+
let dirty = false;
|
343
|
+
for(let field in this._fields) { // eslint-disable-line no-unused-vars
|
344
|
+
dirty = true;
|
345
|
+
break;
|
346
|
+
}
|
347
|
+
if(!dirty) { return; }
|
348
|
+
this._fields = {};
|
349
|
+
};
|
350
|
+
|
351
|
+
/** @public */
|
352
|
+
MockSubscriptions.prototype.start = function() {
|
353
|
+
this._working = true;
|
354
|
+
this._connect();
|
355
|
+
};
|
356
|
+
/** @public */
|
357
|
+
MockSubscriptions.prototype.stop = function() {
|
358
|
+
this._working = false;
|
359
|
+
if(this._timerId) {
|
360
|
+
window.clearTimeout(this._timerId);
|
361
|
+
this._timerId = 0;
|
362
|
+
}
|
363
|
+
};
|
364
|
+
|
365
|
+
/** @public */
|
366
|
+
MockSubscriptions.prototype.dispose = function() {
|
367
|
+
this.stop();
|
368
|
+
|
369
|
+
this._subMap = null;
|
370
|
+
if(this._dataMap) {
|
371
|
+
this._dataMap.removeAllItems();
|
372
|
+
this._dataMap = null;
|
373
|
+
}
|
374
|
+
|
375
|
+
this._fields = null;
|
376
|
+
this._events = null;
|
377
|
+
};
|
378
|
+
|
379
|
+
/** @public
|
380
|
+
* @param {string} type
|
381
|
+
* @param {Function} handler
|
382
|
+
*/
|
383
|
+
MockSubscriptions.prototype.addEventListener = function(type, handler) {
|
384
|
+
if(!handler) { return; }
|
385
|
+
|
386
|
+
let listeners = this._events[type];
|
387
|
+
if(listeners) {
|
388
|
+
if(listeners.indexOf(handler) < 0) {
|
389
|
+
listeners.push(handler);
|
390
|
+
}
|
391
|
+
} else {
|
392
|
+
this._events[type] = [handler];
|
393
|
+
}
|
394
|
+
};
|
395
|
+
/** @public
|
396
|
+
* @param {string} type
|
397
|
+
* @param {Function} handler
|
398
|
+
*/
|
399
|
+
MockSubscriptions.prototype.removeEventListener = function(type, handler) {
|
400
|
+
let listeners = (this._events) ? this._events[type] : null;
|
401
|
+
if(!listeners) { return; }
|
402
|
+
|
403
|
+
let at = listeners.indexOf(handler);
|
404
|
+
if(at >= 0) {
|
405
|
+
listeners.splice(at, 1);
|
406
|
+
}
|
407
|
+
};
|
408
|
+
/** @public */
|
409
|
+
MockSubscriptions.prototype.removeAllEventListeners = function() {
|
410
|
+
this._events = {};
|
411
|
+
};
|
412
|
+
|
413
|
+
/** @public
|
414
|
+
* @param {string} subId
|
415
|
+
* @return {Object} subscription object
|
416
|
+
*/
|
417
|
+
MockSubscriptions.prototype.getSubscription = function(subId) {
|
418
|
+
return this._subMap[subId] || null;
|
419
|
+
};
|
420
|
+
/** @public
|
421
|
+
* @param {string} subId
|
422
|
+
* @return {string} string
|
423
|
+
*/
|
424
|
+
MockSubscriptions.prototype.getRic = function(subId) {
|
425
|
+
let sub = this._subMap[subId];
|
426
|
+
if(sub) {
|
427
|
+
return sub["ric"];
|
428
|
+
}
|
429
|
+
return "";
|
430
|
+
};
|
431
|
+
/** @public
|
432
|
+
* @return {Object.<string, boolean>} field map
|
433
|
+
*/
|
434
|
+
MockSubscriptions.prototype.getAllFields = function() {
|
435
|
+
return this._fields;
|
436
|
+
};
|
437
|
+
/** @public
|
438
|
+
* @param {string} field
|
439
|
+
* @return {boolean}
|
440
|
+
*/
|
441
|
+
MockSubscriptions.prototype.hasField = function(field) {
|
442
|
+
return this._fields[field] || false;
|
443
|
+
};
|
444
|
+
/** @public
|
445
|
+
* @param {number} start
|
446
|
+
* @param {number} count
|
447
|
+
* @return {MockSubscriptions}
|
448
|
+
*/
|
449
|
+
MockSubscriptions.prototype.filter = function (start, count) {
|
450
|
+
return this;
|
451
|
+
};
|
452
|
+
|
453
|
+
/** Object.assign is not available in IE. This method is equivalent to Object.assign(toObject, fromObject);
|
454
|
+
* @private
|
455
|
+
* @function
|
456
|
+
* @param {Object} fromObj
|
457
|
+
* @param {!Object} toObj
|
458
|
+
* @return {!Object} Return toObj
|
459
|
+
*/
|
460
|
+
let copyValues = function(fromObj, toObj) {
|
461
|
+
for(let key in fromObj) {
|
462
|
+
toObj[key] = fromObj[key];
|
463
|
+
}
|
464
|
+
return toObj;
|
465
|
+
};
|
466
|
+
/** @private
|
467
|
+
* @param {string} ric
|
468
|
+
* @param {boolean} asChain
|
469
|
+
* @param {(string|number)=} subId
|
470
|
+
* @return {string|null} subscription id
|
471
|
+
*/
|
472
|
+
MockSubscriptions.prototype._addSymbol = function(ric, asChain, subId) {
|
473
|
+
if(!ric) { return null; }
|
474
|
+
|
475
|
+
if(!subId && subId !== 0) {
|
476
|
+
do {
|
477
|
+
subId = "_" + (this._runningSubId++) + "_";
|
478
|
+
} while(this._subMap[subId]);
|
479
|
+
} else {
|
480
|
+
subId += ""; // Convert to string
|
481
|
+
}
|
482
|
+
if(this._subMap[subId]) {
|
483
|
+
window.console.log("WARNING: Cannot add ric with duplicate id");
|
484
|
+
return null;
|
485
|
+
}
|
486
|
+
|
487
|
+
if(asChain) {
|
488
|
+
ric = ric.replace("0#", ""); // The receiver is not expecting 0# symbol
|
489
|
+
}
|
490
|
+
let sub = {};
|
491
|
+
sub["ric"] = ric;
|
492
|
+
sub["chain"] = asChain;
|
493
|
+
sub["id"] = subId;
|
494
|
+
sub["dataId"] = subId + ric;
|
495
|
+
this._subMap[subId] = sub; // Collect all user subscriptions
|
496
|
+
this._dataMap.addItem(ric, sub);
|
497
|
+
let subs = this._dataMap.getItems(ric);
|
498
|
+
let subCount = subs.length;
|
499
|
+
|
500
|
+
this._dispatch("subscriptionAdded", {"subs": [sub]});
|
501
|
+
|
502
|
+
let childSub = null;
|
503
|
+
let childCount = 0;
|
504
|
+
let i;
|
505
|
+
if(asChain) {
|
506
|
+
// Note that constituents should have no subscription object. They should share the same subscription as their parent. Hence we does not register it to the _subMap
|
507
|
+
if(subCount === 1) { // The first chain detected
|
508
|
+
sub["children"] = [];
|
509
|
+
childCount = MockSubscriptions.simpleDigest(ric) % 10 + 4;
|
510
|
+
for(i = 0; i < childCount; ++i) {
|
511
|
+
childSub = {};
|
512
|
+
childSub["ric"] = "Child_" + String.fromCharCode(65 + i);
|
513
|
+
childSub["id"] = subId; // Child shares the same sub id as its chain parent
|
514
|
+
childSub["dataId"] = subId + childSub["ric"];
|
515
|
+
childSub["parent"] = sub; // This does not exist in real subscription
|
516
|
+
sub["children"].push(childSub);
|
517
|
+
childSub["CHILD_ORDER"] = i;
|
518
|
+
this._dataMap.addItem(_joinSubKeys(sub, childSub), childSub);
|
519
|
+
}
|
520
|
+
} else { // Duplicate chain
|
521
|
+
let firstSub = subs[0];
|
522
|
+
let constituents = firstSub["children"];
|
523
|
+
childCount = constituents.length;
|
524
|
+
sub["children"] = new Array(childCount);
|
525
|
+
|
526
|
+
for(i = 0; i < childCount; ++i) {
|
527
|
+
childSub = {};
|
528
|
+
childSub["ric"] = constituents[i]["ric"];
|
529
|
+
childSub["id"] = subId; // Child shares the same sub id as its chain parent
|
530
|
+
childSub["dataId"] = subId + childSub["ric"];
|
531
|
+
childSub["parent"] = sub; // This does not exist in real subscription
|
532
|
+
sub["children"][i] = childSub;
|
533
|
+
|
534
|
+
this._dataMap.addItem(_joinSubKeys(sub, childSub), childSub);
|
535
|
+
}
|
536
|
+
}
|
537
|
+
}
|
538
|
+
if(subCount > 1) { // Duplicate RIC/CHAIN detected
|
539
|
+
if(this._working) {
|
540
|
+
setTimeout(this._updateDuplicateSymbol.bind(this, ric), 10);
|
541
|
+
}
|
542
|
+
}
|
543
|
+
|
544
|
+
this._connect();
|
545
|
+
return subId;
|
546
|
+
};
|
547
|
+
/** @public
|
548
|
+
* @param {string} str
|
549
|
+
* @return {number}
|
550
|
+
*/
|
551
|
+
MockSubscriptions.simpleDigest = function(str) {
|
552
|
+
let len = str.length;
|
553
|
+
let sum = 0;
|
554
|
+
for(let i = 0; i < len; ++i) {
|
555
|
+
sum += str.charCodeAt(i);
|
556
|
+
}
|
557
|
+
return sum;
|
558
|
+
};
|
559
|
+
|
560
|
+
/** @private */
|
561
|
+
MockSubscriptions.prototype._connect = function() {
|
562
|
+
if(this._working && !this._timerId) {
|
563
|
+
let delay = this._dataGen.randInt(this._minInterval, this._maxInterval);
|
564
|
+
this._timerId = window.setTimeout(this._onSubscriptionResponse, delay); // This will be async for fire event to user
|
565
|
+
}
|
566
|
+
};
|
567
|
+
|
568
|
+
MockSubscriptions.prototype._onSubscriptionResponse = function() {
|
569
|
+
this._timerId = 0;
|
570
|
+
|
571
|
+
let keys = this._dataMap.getAllKeys(); // list of all rics
|
572
|
+
let len = keys ? keys.length : 0; // len include all row index (Constituent and normal ric)
|
573
|
+
if(!len) { // No symbol has been added
|
574
|
+
this._connect();
|
575
|
+
return;
|
576
|
+
}
|
577
|
+
|
578
|
+
let minRow = (this._percentageDataUpdate - 0.02) * len;
|
579
|
+
minRow = minRow > 0 ? minRow : 1; // update at least 1 row
|
580
|
+
let maxRow = (this._percentageDataUpdate + 0.02) * len;
|
581
|
+
maxRow = maxRow < len ? maxRow : len; // not more than all rows
|
582
|
+
let numRows = this._dataGen.randInt(minRow, maxRow);
|
583
|
+
let fields = this._fields;
|
584
|
+
|
585
|
+
let updateCount = 0;
|
586
|
+
let childOrderChange;
|
587
|
+
for(let i = 0; i < numRows; i++) {
|
588
|
+
// find key to random subs (key is subId)
|
589
|
+
let key = keys[this._dataGen.randIndex(len)]; // WARNING: Same sub could be picked more than once
|
590
|
+
let subs = this._dataMap.getItems(key); // Get all subs with the same RIC
|
591
|
+
let subCount = subs.length;
|
592
|
+
|
593
|
+
let j;
|
594
|
+
let firstSub = subs[0]; // Only the first sub is need to generate data
|
595
|
+
let subParent = firstSub.parent;
|
596
|
+
let updatePosition = this._dataGen.randInt(0, 100) < this._percentageOrderChange * 100 ? true : false; // Random chance to change dynamic chain position (2% to change)
|
597
|
+
|
598
|
+
let values = this._generateQuoteData(firstSub, fields);
|
599
|
+
if(_isDynamicChain(key) && subParent && updatePosition) { // subParent in header of dynamic chain behaves like a normal ric
|
600
|
+
let children = subParent.children;
|
601
|
+
let childCount = children.length;
|
602
|
+
|
603
|
+
children = _shuffleArray(children); // Random swap children in array
|
604
|
+
let newOrder = children.indexOf(firstSub);
|
605
|
+
firstSub["CHILD_ORDER"] = newOrder; // This is bad
|
606
|
+
values["CHILD_ORDER"] = newOrder;
|
607
|
+
|
608
|
+
childOrderChange = true;
|
609
|
+
for(j = 0; j < subCount; ++j) { // It could be same ric and it need to dispatch with same ric number
|
610
|
+
this._dispatchDataChanged(subs[j], values);
|
611
|
+
// Update child order for all children with the same parent
|
612
|
+
for (let k = 0; k < childCount; k++) { // This is not correct, if there is a duplicate dynamic chain
|
613
|
+
if(k !== newOrder) {
|
614
|
+
this._dispatchDataChanged(children[k], {
|
615
|
+
X_RIC_NAME: children[k].ric,
|
616
|
+
CHILD_ORDER: k
|
617
|
+
});
|
618
|
+
}
|
619
|
+
}
|
620
|
+
}
|
621
|
+
} else {
|
622
|
+
if(subCount > 1) { // Duplicate CHILD_ORDER from the first sub for other sub with the same RIC (not entirely correct)
|
623
|
+
let childOrder = firstSub["CHILD_ORDER"];
|
624
|
+
if(childOrder != null) { // Children of chain will have a CHILD_ORDER
|
625
|
+
values["CHILD_ORDER"] = childOrder;
|
626
|
+
}
|
627
|
+
}
|
628
|
+
for(j = 0; j < subCount; ++j) { // It could be same ric and it need to dispatch with same ric number
|
629
|
+
this._dispatchDataChanged(subs[j], values);
|
630
|
+
updateCount++;
|
631
|
+
}
|
632
|
+
}
|
633
|
+
}
|
634
|
+
|
635
|
+
let postObj = {};
|
636
|
+
if(childOrderChange != null) {
|
637
|
+
postObj["childOrderChange"] = childOrderChange;
|
638
|
+
}
|
639
|
+
if(updateCount != null) {
|
640
|
+
postObj["updateCount"] = updateCount;
|
641
|
+
}
|
642
|
+
|
643
|
+
this._dispatchPostUpdate(postObj);
|
644
|
+
|
645
|
+
this._connect();
|
646
|
+
};
|
647
|
+
|
648
|
+
/** @private
|
649
|
+
* @param {Object} obj
|
650
|
+
*/
|
651
|
+
MockSubscriptions.prototype._dispatchPostUpdate = function (obj) {
|
652
|
+
// TODO: handlded another property of "postUpdate" event
|
653
|
+
this._dispatch("postUpdate", obj);
|
654
|
+
};
|
655
|
+
|
656
|
+
/** @private
|
657
|
+
* @param {Object} sub
|
658
|
+
* @param {Object} fields
|
659
|
+
* @return {!Object}
|
660
|
+
*/
|
661
|
+
MockSubscriptions.prototype._generateQuoteData = function(sub, fields) {
|
662
|
+
let ric = sub.ric;
|
663
|
+
let prevData = sub.prevData;
|
664
|
+
|
665
|
+
let values = {};
|
666
|
+
let options = {
|
667
|
+
text: ric,
|
668
|
+
prefix: sub["parent"] ? sub["parent"]["ric"] : "" // prefix for constituents
|
669
|
+
};
|
670
|
+
for(let field in fields){
|
671
|
+
let fInfo = this._dataGen.generateQuoteData(field, options);
|
672
|
+
if(fInfo.ignore) {
|
673
|
+
continue;
|
674
|
+
}
|
675
|
+
|
676
|
+
let formattedField = field + "_FORMATTED";
|
677
|
+
if(prevData) {
|
678
|
+
if(fInfo.changeOnly) {
|
679
|
+
if(prevData[field] === fInfo.value) {
|
680
|
+
continue;
|
681
|
+
}
|
682
|
+
}
|
683
|
+
prevData[field] = fInfo.value;
|
684
|
+
prevData[formattedField] = fInfo.formattedValue;
|
685
|
+
}
|
686
|
+
|
687
|
+
values[field] = fInfo.value;
|
688
|
+
values[formattedField] = fInfo.formattedValue;
|
689
|
+
}
|
690
|
+
|
691
|
+
// The delay symbol for X_RIC_NAME will depend on the INDICATOR field.
|
692
|
+
if(values["X_RIC_NAME"] != null && values["INDICATOR"] != null) {
|
693
|
+
if(values["INDICATOR"] > 0) {
|
694
|
+
values["X_RIC_NAME"] = "/" + values["X_RIC_NAME"];
|
695
|
+
}
|
696
|
+
}
|
697
|
+
return values;
|
698
|
+
};
|
699
|
+
|
700
|
+
|
701
|
+
/** @private
|
702
|
+
* @param {Object} parentSub
|
703
|
+
* @param {string} ric
|
704
|
+
* @return {Object}
|
705
|
+
*/
|
706
|
+
MockSubscriptions.prototype._getChildSubByRic = function(parentSub, ric) {
|
707
|
+
let children = parentSub["children"];
|
708
|
+
if(children) {
|
709
|
+
let childCount = children.length;
|
710
|
+
for(let i = 0; i < childCount; ++i) {
|
711
|
+
let child = children[i];
|
712
|
+
if(child["ric"] === ric) {
|
713
|
+
return child;
|
714
|
+
}
|
715
|
+
}
|
716
|
+
}
|
717
|
+
return null;
|
718
|
+
};
|
719
|
+
/** @private
|
720
|
+
* @param {string} ric
|
721
|
+
*/
|
722
|
+
MockSubscriptions.prototype._updateDuplicateSymbol = function(ric) {
|
723
|
+
let subs = this._dataMap.getItems(ric);
|
724
|
+
if(!subs) {
|
725
|
+
return;
|
726
|
+
}
|
727
|
+
let subCount = subs.length;
|
728
|
+
if(subCount < 2) {
|
729
|
+
return;
|
730
|
+
}
|
731
|
+
let firstSub = subs[0];
|
732
|
+
let prevData = firstSub["prevData"];
|
733
|
+
let isChain = firstSub["chain"] ? true : false;
|
734
|
+
let i;
|
735
|
+
if(prevData) {
|
736
|
+
for(i = 1; i < subCount; ++i) {
|
737
|
+
let sub = subs[i];
|
738
|
+
if(!sub["prevData"]) {
|
739
|
+
// TODO: check in duplicate dynamic chain
|
740
|
+
this._dispatchDataChanged(sub, prevData);
|
741
|
+
}
|
742
|
+
}
|
743
|
+
}
|
744
|
+
|
745
|
+
|
746
|
+
if(!isChain) {
|
747
|
+
return;
|
748
|
+
}
|
749
|
+
if(!this._constituentCache) {
|
750
|
+
return;
|
751
|
+
}
|
752
|
+
let ricList = firstSub["ricList"];
|
753
|
+
if(!ricList) {
|
754
|
+
return;
|
755
|
+
}
|
756
|
+
let childCount = ricList.length;
|
757
|
+
|
758
|
+
for(i = 1; i < subCount; ++i) {
|
759
|
+
let sub2 = subs[i];
|
760
|
+
let ricList2 = sub2["ricList"];
|
761
|
+
let childCount2 = ricList2 ? ricList2.length : 0;
|
762
|
+
for(let j = childCount2; j < childCount; ++j) {
|
763
|
+
let childRic = ricList[j];
|
764
|
+
let childSub = this._getChildSubByRic(firstSub, childRic);
|
765
|
+
let childSub2 = this._getChildSubByRic(sub2, childRic);
|
766
|
+
if(childSub && childSub2) {
|
767
|
+
if(childSub["prevData"]) {
|
768
|
+
// TODO: check in duplicate dynamic chain
|
769
|
+
this._dispatchDataChanged(childSub2, childSub["prevData"]);
|
770
|
+
}
|
771
|
+
}
|
772
|
+
}
|
773
|
+
}
|
774
|
+
};
|
775
|
+
/** @private
|
776
|
+
* @param {Object} sub
|
777
|
+
* @param {Object} dataUpdates
|
778
|
+
*/
|
779
|
+
MockSubscriptions.prototype._dispatchDataChanged = function(sub, dataUpdates) {
|
780
|
+
let values = copyValues(dataUpdates, {});
|
781
|
+
let evtArg = {};
|
782
|
+
evtArg["ric"] = sub["ric"];
|
783
|
+
evtArg["values"] = values;
|
784
|
+
evtArg["subId"] = sub["id"];
|
785
|
+
|
786
|
+
let prevData = sub.prevData; // For data generation on the next update
|
787
|
+
if(!prevData) {
|
788
|
+
prevData = {};
|
789
|
+
sub.prevData = prevData;
|
790
|
+
evtArg["type"] = "statusUpdated";
|
791
|
+
|
792
|
+
values["STATUS"] = 1;
|
793
|
+
values["STATUS_FORMATTED"] = this._statusMap["1"];
|
794
|
+
values["SUB_ID"] = sub["id"];
|
795
|
+
copyValues(values, prevData);
|
796
|
+
|
797
|
+
let parentSub = sub.parent;
|
798
|
+
if(parentSub) { // This is the first time constituent have the data
|
799
|
+
let ricList = parentSub["ricList"];
|
800
|
+
if(!ricList) {
|
801
|
+
ricList = parentSub["ricList"] = [];
|
802
|
+
}
|
803
|
+
parentSub["ricList"].push(sub["ric"]);
|
804
|
+
}
|
805
|
+
}
|
806
|
+
this._dispatch("dataChanged", evtArg);
|
807
|
+
};
|
808
|
+
|
809
|
+
/** @public
|
810
|
+
* @param {Array.<string>} feedNames
|
811
|
+
* @param {Function} handler
|
812
|
+
* @return {MockSubscriptions}
|
813
|
+
*/
|
814
|
+
MockSubscriptions.prototype.onFeedStatusChanged = function(feedNames, handler) {
|
815
|
+
window.setTimeout(function() {
|
816
|
+
handler([{"key": "Q", "name": "IDN_RDF", "state": "up"}]);
|
817
|
+
}, 1000);
|
818
|
+
return this;
|
819
|
+
};
|
820
|
+
|
821
|
+
/** @private
|
822
|
+
* @param {string} type
|
823
|
+
* @return {boolean}
|
824
|
+
*/
|
825
|
+
MockSubscriptions.prototype._hasListener = function(type) {
|
826
|
+
let listeners = this._events[type];
|
827
|
+
return listeners ? (listeners.length > 0) : false;
|
828
|
+
};
|
829
|
+
/** @private
|
830
|
+
* @param {string} type
|
831
|
+
* @param {Object} eventArg
|
832
|
+
*/
|
833
|
+
MockSubscriptions.prototype._dispatch = function(type, eventArg) {
|
834
|
+
let listeners = this._events[type];
|
835
|
+
if(!listeners) { return; }
|
836
|
+
let len = listeners.length;
|
837
|
+
for(let i = 0; i < len; ++i) {
|
838
|
+
listeners[i](eventArg);
|
839
|
+
}
|
840
|
+
};
|
841
|
+
|
842
|
+
/** @type {Object.<string, Object>}
|
843
|
+
* @private
|
844
|
+
*/
|
845
|
+
MockSubscriptions.prototype._subMap = null;
|
846
|
+
/** @type {Object.<string, boolean>}
|
847
|
+
* @private
|
848
|
+
*/
|
849
|
+
MockSubscriptions.prototype._fields = null;
|
850
|
+
/** @type {Object.<string, Array.<Function>>}
|
851
|
+
* @private
|
852
|
+
*/
|
853
|
+
MockSubscriptions.prototype._events = null;
|
854
|
+
|
855
|
+
/** @type {boolean}
|
856
|
+
* @private
|
857
|
+
*/
|
858
|
+
MockSubscriptions.prototype._working = false;
|
859
|
+
/** @type {number}
|
860
|
+
* @private
|
861
|
+
*/
|
862
|
+
MockSubscriptions.prototype._timerId = 0;
|
863
|
+
|
864
|
+
/** @type {number}
|
865
|
+
* @private
|
866
|
+
*/
|
867
|
+
MockSubscriptions.prototype._runningSubId = 0;
|
868
|
+
|
869
|
+
/** @type {Object.<string, string>}
|
870
|
+
* @private
|
871
|
+
*/
|
872
|
+
MockSubscriptions.prototype._statusMap = {
|
873
|
+
"0": "PENDING",
|
874
|
+
"1": "OK",
|
875
|
+
"2": "STALE",
|
876
|
+
"3": "INFO",
|
877
|
+
"4": "CLOSED",
|
878
|
+
"5": "DELAYED",
|
879
|
+
"6": "NOPERM",
|
880
|
+
"7": "REACHLIMIT",
|
881
|
+
"8": "C_COMPLETE",
|
882
|
+
"9": "C_CLOSE",
|
883
|
+
"10": "C_EMPTY",
|
884
|
+
"11": "C_NOTCHAIN",
|
885
|
+
"12": "C_ERR",
|
886
|
+
"13": "C_NOBEGIN",
|
887
|
+
"14": "C_NOEND"
|
888
|
+
};
|
889
|
+
|
890
|
+
export {MockQuotes2, MockSubscriptions};
|