@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,1478 @@
|
|
1
|
+
import { arrayToObject } from "../../tr-grid-util/es6/Util.js";
|
2
|
+
/* eslint-disable */
|
3
|
+
import { DataCache } from "../../core/es6/data/DataCache.js";
|
4
|
+
import { DataTable } from "../../core/es6/data/DataTable.js";
|
5
|
+
/* eslint-enable */
|
6
|
+
|
7
|
+
/** @typedef {Object} RowDefinition~Options
|
8
|
+
* @description RowDefinition options
|
9
|
+
* @property {string=} ric="" RIC for real-time fields. Prefixing 0# to the ric is equivalent to specifying asChain property.
|
10
|
+
* @property {string=} permId="" Organization PermId to be used instead of ric for private company.
|
11
|
+
* @property {(Array|Object)=} values=null Values for static data
|
12
|
+
* @property {Array.<string>=} fields=null Field that corresponds to the given static values
|
13
|
+
* @property {boolean=} asChain=false The given ric will be treated as a chain
|
14
|
+
* @property {string=} chainRic="" RIC to be used for chain request (overiding ric property)
|
15
|
+
* @property {boolean=} collapsed Chain is collapsed by default. Segment is expanded by default.
|
16
|
+
* @property {(string|null)=} label=null
|
17
|
+
* @property {boolean=} hidden=true When this row is hidden
|
18
|
+
* @property {boolean=} realTime=true Realtime row, able to request for JET/RTK
|
19
|
+
* @property {Object=} info=null For storing any additional information to the row
|
20
|
+
* @property {string=} rowId Row identifier used for referencing the row. The value cannot be in "_x_" format.
|
21
|
+
*/
|
22
|
+
|
23
|
+
/** @typedef {Object} RowDefinition~RowTypes
|
24
|
+
* @property {string} CONTENT="CONTENT" Regular row
|
25
|
+
* @property {string} CHAIN="CHAIN" Chain RIC row
|
26
|
+
* @property {string} CONSTITUENT="CONSTITUENT" Constituent row
|
27
|
+
* @property {string} GROUP_HEADER="GROUP_HEADER" Row of segment separator at the very top
|
28
|
+
* @property {string} SUBGROUP_HEADER="SUBGROUP_HEADER" Row of nested segment separator
|
29
|
+
* @property {string} GROUP_MEMBER="GROUP_MEMBER" Child row displayed under segment separator
|
30
|
+
*/
|
31
|
+
|
32
|
+
/** @type {string}
|
33
|
+
* @public
|
34
|
+
* @const
|
35
|
+
*/
|
36
|
+
const ROW_DEF = "ROW_DEF";
|
37
|
+
|
38
|
+
/** @type {!RowDefinition~RowTypes}
|
39
|
+
* @public
|
40
|
+
* @const
|
41
|
+
*/
|
42
|
+
const ROW_TYPES = {
|
43
|
+
CONTENT: "CONTENT",
|
44
|
+
CHAIN: "CHAIN",
|
45
|
+
CONSTITUENT: "CONSTITUENT",
|
46
|
+
GROUP_HEADER: "GROUP_HEADER",
|
47
|
+
SUBGROUP_HEADER: "SUBGROUP_HEADER",
|
48
|
+
GROUP_MEMBER: "GROUP_MEMBER"
|
49
|
+
};
|
50
|
+
|
51
|
+
/** @private
|
52
|
+
* @function
|
53
|
+
* @param {Object} obj
|
54
|
+
* @returns {!Object} Always returns a new object
|
55
|
+
*/
|
56
|
+
let _cloneObject = function(obj) {
|
57
|
+
let newObj = {};
|
58
|
+
for(let key in obj) {
|
59
|
+
newObj[key] = obj[key];
|
60
|
+
}
|
61
|
+
return newObj;
|
62
|
+
};
|
63
|
+
|
64
|
+
/** @constructor
|
65
|
+
* @param {RowDefinition~Options=} rowOptions
|
66
|
+
*/
|
67
|
+
let RowDefinition = function(rowOptions) {
|
68
|
+
this._changes = {};
|
69
|
+
if(rowOptions && rowOptions["segmentId"]) { // This row will be classified header row (subsegment header row)
|
70
|
+
this._rowId = rowOptions["segmentId"];
|
71
|
+
this._autoGenerated = true;
|
72
|
+
this._subSegment = true;
|
73
|
+
return;
|
74
|
+
}
|
75
|
+
|
76
|
+
this._rowId = "_" + RowDefinition._runningId++ + "_";
|
77
|
+
|
78
|
+
if(rowOptions) {
|
79
|
+
if(rowOptions["asConstituent"]) { // Create row definition as a constituent of a chain
|
80
|
+
this._initializeAsConstituent(rowOptions); // WARNING: This does not follow normal initialization process
|
81
|
+
} else {
|
82
|
+
this.initialize(rowOptions);
|
83
|
+
}
|
84
|
+
}
|
85
|
+
};
|
86
|
+
|
87
|
+
/** @type {number}
|
88
|
+
* @private
|
89
|
+
*/
|
90
|
+
RowDefinition._runningId = 0;
|
91
|
+
/** @type {string}
|
92
|
+
* @private
|
93
|
+
*/
|
94
|
+
RowDefinition._childDataField = "CHILD_VALUES";
|
95
|
+
/** @type {RegExp}
|
96
|
+
* @private
|
97
|
+
* @const
|
98
|
+
*/
|
99
|
+
RowDefinition.ROW_ID_PATTERN = /^_[^_]+_$/;
|
100
|
+
//#region Private Members
|
101
|
+
/** @type {string}
|
102
|
+
* @private
|
103
|
+
*/
|
104
|
+
RowDefinition.prototype._userInput = "";
|
105
|
+
/** @type {string}
|
106
|
+
* @private
|
107
|
+
*/
|
108
|
+
RowDefinition.prototype._ric = ""; // Contains no 0#
|
109
|
+
/** @type {string}
|
110
|
+
* @private
|
111
|
+
*/
|
112
|
+
RowDefinition.prototype._permId = "";
|
113
|
+
/** @type {string|null}
|
114
|
+
* @private
|
115
|
+
*/
|
116
|
+
RowDefinition.prototype._label = null; // Label overrides _ric and _permId
|
117
|
+
/** @type {boolean|null}
|
118
|
+
* @private
|
119
|
+
*/
|
120
|
+
RowDefinition.prototype._isChain = null;
|
121
|
+
/** @type {boolean}
|
122
|
+
* @private
|
123
|
+
*/
|
124
|
+
RowDefinition.prototype._asSegment = false;
|
125
|
+
/** @type {boolean}
|
126
|
+
* @private
|
127
|
+
*/
|
128
|
+
RowDefinition.prototype._realTime = true;
|
129
|
+
|
130
|
+
/** @type {string}
|
131
|
+
* @private
|
132
|
+
*/
|
133
|
+
RowDefinition.prototype._rowId = ""; // Row Id must be unique
|
134
|
+
/** @type {boolean}
|
135
|
+
* @private
|
136
|
+
*/
|
137
|
+
RowDefinition.prototype._userId = false;
|
138
|
+
/** @type {DataCache}
|
139
|
+
* @private
|
140
|
+
*/
|
141
|
+
RowDefinition.prototype._dc = null;
|
142
|
+
/** Quotes2 subscription object
|
143
|
+
* @type {Object}
|
144
|
+
* @private
|
145
|
+
*/
|
146
|
+
RowDefinition.prototype._subs = null;
|
147
|
+
/** @type {DataView}
|
148
|
+
* @private
|
149
|
+
*/
|
150
|
+
RowDefinition.prototype._view = null;
|
151
|
+
|
152
|
+
/** @type {string}
|
153
|
+
* @private
|
154
|
+
*/
|
155
|
+
RowDefinition.prototype._subId = "";
|
156
|
+
|
157
|
+
/** @type {boolean|null}
|
158
|
+
* @private
|
159
|
+
*/
|
160
|
+
RowDefinition.prototype._collapsed = null;
|
161
|
+
/** @type {boolean}
|
162
|
+
* @private
|
163
|
+
*/
|
164
|
+
RowDefinition.prototype._autoGenerated = false;
|
165
|
+
/** @type {boolean}
|
166
|
+
* @private
|
167
|
+
*/
|
168
|
+
RowDefinition.prototype._subSegment = false;
|
169
|
+
/** @type {Object.<string, *>}
|
170
|
+
* @private
|
171
|
+
*/
|
172
|
+
RowDefinition.prototype._staticValues = null;
|
173
|
+
/** @type {!Object.<string, number>}
|
174
|
+
* @private
|
175
|
+
*/
|
176
|
+
RowDefinition.prototype._changes;
|
177
|
+
/** @type {number}
|
178
|
+
* @private
|
179
|
+
*/
|
180
|
+
RowDefinition.prototype._updateCount = 0;
|
181
|
+
|
182
|
+
/** @type {Array.<RowDefinition>}
|
183
|
+
* @private
|
184
|
+
*/
|
185
|
+
RowDefinition.prototype._children = null;
|
186
|
+
/** @type {RowDefinition}
|
187
|
+
* @private
|
188
|
+
*/
|
189
|
+
RowDefinition.prototype._parent = null;
|
190
|
+
/** @type {number}
|
191
|
+
* @private
|
192
|
+
*/
|
193
|
+
RowDefinition.prototype._groupOrder = 0; // For group sorting
|
194
|
+
/** @type {number}
|
195
|
+
* @private
|
196
|
+
*/
|
197
|
+
RowDefinition.prototype._depthLevel = 0;
|
198
|
+
|
199
|
+
/** @type {Object}
|
200
|
+
* @private
|
201
|
+
*/
|
202
|
+
RowDefinition.prototype._userModel = null;
|
203
|
+
/** @type {Object}
|
204
|
+
* @private
|
205
|
+
*/
|
206
|
+
RowDefinition.prototype._info = null;
|
207
|
+
|
208
|
+
//#endregion Private Members
|
209
|
+
|
210
|
+
/** @public
|
211
|
+
*/
|
212
|
+
RowDefinition.prototype.dispose = function() {
|
213
|
+
if(this.isDisposed()) {
|
214
|
+
return;
|
215
|
+
}
|
216
|
+
|
217
|
+
if(this._children) {
|
218
|
+
this._children.forEach(RowDefinition.dispose);
|
219
|
+
this._children = null;
|
220
|
+
}
|
221
|
+
|
222
|
+
if(this._dc) {
|
223
|
+
this._dc.setRowData(this._rowId, null); // Clear all data held by this row def
|
224
|
+
this._dc = null;
|
225
|
+
}
|
226
|
+
this._staticValues = null; // Static values contain user data
|
227
|
+
this._parent = null; // WARNING: This does not impact children count of the parent. A child must be destroyed by its parent only
|
228
|
+
this._depthLevel = 0;
|
229
|
+
this.unsubscribeForUpdates();
|
230
|
+
this._subs = null;
|
231
|
+
this._view = null; // WARNING: This does not remove this row from the UI view
|
232
|
+
|
233
|
+
this._subId = this._rowId = "";
|
234
|
+
this._userId = false;
|
235
|
+
this._autoGenerated = false;
|
236
|
+
this._userModel = null;
|
237
|
+
};
|
238
|
+
/** @public
|
239
|
+
* @return {boolean}
|
240
|
+
*/
|
241
|
+
RowDefinition.prototype.isDisposed = function() {
|
242
|
+
return !this._rowId;
|
243
|
+
};
|
244
|
+
/** @public
|
245
|
+
* @param {RowDefinition~Options=} rowOptions
|
246
|
+
*/
|
247
|
+
RowDefinition.prototype.initialize = function(rowOptions) {
|
248
|
+
if(!rowOptions) {
|
249
|
+
return;
|
250
|
+
}
|
251
|
+
|
252
|
+
if(!this._autoGenerated) {
|
253
|
+
let userRowId = rowOptions["rowId"];
|
254
|
+
if(userRowId && typeof userRowId === "string") {
|
255
|
+
if(userRowId.match(RowDefinition.ROW_ID_PATTERN)) {
|
256
|
+
console.warn("Please change the rowId format to avoid duplicated rows' id causing unexpected behavior.");
|
257
|
+
} else {
|
258
|
+
this._rowId = userRowId;
|
259
|
+
this._userId = true;
|
260
|
+
}
|
261
|
+
}
|
262
|
+
}
|
263
|
+
|
264
|
+
let extractedOptions = RowDefinition.extractRowOptions(rowOptions);
|
265
|
+
|
266
|
+
let val = rowOptions["permId"];
|
267
|
+
if(val != null) {
|
268
|
+
this._permId = val;
|
269
|
+
}
|
270
|
+
val = rowOptions["ric"];
|
271
|
+
if(val != null) {
|
272
|
+
this._ric = val;
|
273
|
+
}
|
274
|
+
val = rowOptions["label"];
|
275
|
+
// eslint-disable-next-line no-undefined
|
276
|
+
if(val !== undefined) { // Empty string and null are allowed
|
277
|
+
this._label = val;
|
278
|
+
}
|
279
|
+
val = rowOptions["chainRic"];
|
280
|
+
if(val != null) {
|
281
|
+
this._chainRic = val;
|
282
|
+
}
|
283
|
+
|
284
|
+
val = extractedOptions["asChain"];
|
285
|
+
if(val != null) {
|
286
|
+
this._isChain = val ? true : false;
|
287
|
+
}
|
288
|
+
|
289
|
+
val = rowOptions["realTime"];
|
290
|
+
if(val != null) {
|
291
|
+
this._realTime = val;
|
292
|
+
}
|
293
|
+
|
294
|
+
val = rowOptions["asSegment"];
|
295
|
+
if(val != null) {
|
296
|
+
this._asSegment = val ? true : false;
|
297
|
+
}
|
298
|
+
|
299
|
+
if(this._isChain || this._asSegment) {
|
300
|
+
this._collapsed = extractedOptions["collapsed"]; // Temporary state
|
301
|
+
}
|
302
|
+
|
303
|
+
val = rowOptions["keepModel"];
|
304
|
+
if(val) {
|
305
|
+
this._userModel = rowOptions;
|
306
|
+
}
|
307
|
+
val = rowOptions["info"];
|
308
|
+
if(val) {
|
309
|
+
this._info = val;
|
310
|
+
}
|
311
|
+
|
312
|
+
let symbol = this._ric || this._chainRic;
|
313
|
+
if(symbol || this._permId){
|
314
|
+
this.setContent(symbol, extractedOptions);
|
315
|
+
}
|
316
|
+
|
317
|
+
val = rowOptions["values"];
|
318
|
+
// eslint-disable-next-line no-undefined
|
319
|
+
if(val !== undefined) {
|
320
|
+
this.setStaticRowData(val, rowOptions["fields"]);
|
321
|
+
}
|
322
|
+
};
|
323
|
+
/** @description Constituents will have subscription id, but have no subscription. It's row id will be different from subscription id. It will have a reference to its parent. It cannot be generated by themselve -- always be autogenerated.
|
324
|
+
* @private
|
325
|
+
* @param {!Object} rowOptions
|
326
|
+
*/
|
327
|
+
RowDefinition.prototype._initializeAsConstituent = function(rowOptions) {
|
328
|
+
this._autoGenerated = true;
|
329
|
+
let parentDef = /** @type{RowDefinition} */(rowOptions["parent"]);
|
330
|
+
if(this.setParent(parentDef)) {
|
331
|
+
this._ric = /** @type{string} */(rowOptions["ric"]);
|
332
|
+
this._dc = parentDef._dc; // Parent chain must have data cache
|
333
|
+
this._subId = parentDef._subId; // Child constituent uses the same subscription as its parent
|
334
|
+
}
|
335
|
+
this._staticValues = rowOptions["values"] || null;
|
336
|
+
this.resetRowData();
|
337
|
+
};
|
338
|
+
/** @private
|
339
|
+
* @param {DataView} view
|
340
|
+
* @param {string} rowId
|
341
|
+
* @returns {string}
|
342
|
+
*/
|
343
|
+
let _getEndOfSegmentRowId = function(view, rowId) {
|
344
|
+
let rowIndex = view.getRowIndex(rowId);
|
345
|
+
do {
|
346
|
+
rowId = view.getRowId(++rowIndex);
|
347
|
+
if(rowId && !view.getSegmentParentRowId(rowId)) {
|
348
|
+
break;
|
349
|
+
}
|
350
|
+
} while(rowId);
|
351
|
+
return rowId;
|
352
|
+
};
|
353
|
+
|
354
|
+
/** @private
|
355
|
+
* @param {DataView} view
|
356
|
+
* @param {boolean} newState
|
357
|
+
* @param {boolean} prevState
|
358
|
+
* @returns {boolean} Current state
|
359
|
+
*/
|
360
|
+
let _stallSorting = function(view, newState, prevState) {
|
361
|
+
if(view && view.isSorting()) {
|
362
|
+
newState = newState ? true : false;
|
363
|
+
if(newState !== prevState) {
|
364
|
+
if(newState) {
|
365
|
+
view.synchronizeRowOrder();
|
366
|
+
}
|
367
|
+
view.stallSorting(newState);
|
368
|
+
}
|
369
|
+
return newState;
|
370
|
+
}
|
371
|
+
return false;
|
372
|
+
};
|
373
|
+
/** @public
|
374
|
+
* @ignore
|
375
|
+
* @param {string} userInput RIC
|
376
|
+
* @param {Object} extractedOptions
|
377
|
+
* @return {boolean} True if there is any change otherwise false
|
378
|
+
*/
|
379
|
+
RowDefinition.prototype.setContent = function(userInput, extractedOptions) {
|
380
|
+
if(this._autoGenerated) { // AutoGenerated RowDefinition cannot be changed by user input
|
381
|
+
return false;
|
382
|
+
}
|
383
|
+
|
384
|
+
if(!userInput) { // 0 is not a valid input
|
385
|
+
userInput = "";
|
386
|
+
} else if(typeof userInput !== "string") {
|
387
|
+
userInput += "";
|
388
|
+
}
|
389
|
+
|
390
|
+
let dirty = (this._userInput !== userInput);
|
391
|
+
let permId = extractedOptions["permId"] || "";
|
392
|
+
if(this._permId !== permId){
|
393
|
+
this._permId = permId;
|
394
|
+
dirty = true;
|
395
|
+
}
|
396
|
+
if(!dirty) {
|
397
|
+
return false;
|
398
|
+
}
|
399
|
+
|
400
|
+
let asChain = extractedOptions["asChain"];
|
401
|
+
let realtimeRow = true;
|
402
|
+
if(userInput.charAt(0) === "'") { // Single quote is used as a marker for non realtime row
|
403
|
+
realtimeRow = false;
|
404
|
+
this._ric = this._chainRic = ""; // No ric for realtime request
|
405
|
+
}
|
406
|
+
|
407
|
+
let dv = this._view;
|
408
|
+
let stalledSorting = _stallSorting(dv, realtimeRow && asChain, false); // To preserve current position of the segment/chain
|
409
|
+
|
410
|
+
this.unsubscribeForUpdates(); // Static data remains intact
|
411
|
+
|
412
|
+
this._userInput = userInput;
|
413
|
+
let collapsed = extractedOptions["collapsed"];
|
414
|
+
if(realtimeRow) {
|
415
|
+
let chainRic = extractedOptions["chainRic"];
|
416
|
+
if(asChain === true){
|
417
|
+
this._ric = collapsed === true ? userInput : userInput.replace("0#", "");
|
418
|
+
} else {
|
419
|
+
this._ric = userInput;
|
420
|
+
}
|
421
|
+
this._isChain = asChain != null ? asChain : null; // this could be null or undefined
|
422
|
+
this._chainRic = chainRic || "";
|
423
|
+
}
|
424
|
+
|
425
|
+
if(dv) {
|
426
|
+
let segmentId = dv.getSegmentParentRowId(this._rowId);
|
427
|
+
if(segmentId) {
|
428
|
+
if(this._isChain){ // If the row was a normal row and has been changed to a chain, remove it from existing segment
|
429
|
+
let targetRowId = _getEndOfSegmentRowId(dv, this._rowId);
|
430
|
+
dv.removeSegmentChild(segmentId, this._rowId);
|
431
|
+
dv.moveRow(this._rowId, targetRowId);
|
432
|
+
|
433
|
+
segmentId = "";
|
434
|
+
}
|
435
|
+
} else if(dv.getSegment(this._rowId)) {
|
436
|
+
dv.setSegmentSeparator(this._rowId, false); // Remove existing segment
|
437
|
+
}
|
438
|
+
if(this._isChain) {
|
439
|
+
dv.setSegmentSeparator(this._rowId, true);
|
440
|
+
}
|
441
|
+
|
442
|
+
if(collapsed !== this.isChainCollapsed()) { // WARNING: This is not optimizsed
|
443
|
+
dv.collapseSegment(this._rowId, collapsed);
|
444
|
+
}
|
445
|
+
this._collapsed = null;
|
446
|
+
|
447
|
+
_stallSorting(dv, false, stalledSorting);
|
448
|
+
if(segmentId) { // If data id is changed and the row is a child of a segment, then segment child data id must be updated
|
449
|
+
dv.addSegmentChild(segmentId, this._rowId);
|
450
|
+
}
|
451
|
+
}
|
452
|
+
|
453
|
+
this.subscribeForUpdates();
|
454
|
+
return true;
|
455
|
+
};
|
456
|
+
/** @public
|
457
|
+
* @return {string} Row Id will never be empty string unless the row has been removed
|
458
|
+
*/
|
459
|
+
RowDefinition.prototype.getRowId = function() {
|
460
|
+
return this._rowId;
|
461
|
+
};
|
462
|
+
/** @public
|
463
|
+
* @param {RowDefinition~Options=} rowOptions
|
464
|
+
* @return {RowDefinition~Options}
|
465
|
+
*/
|
466
|
+
RowDefinition.prototype.getConfigObject = function(rowOptions) {
|
467
|
+
let obj = rowOptions || {};
|
468
|
+
|
469
|
+
if(this._userId) {
|
470
|
+
obj["rowId"] = this._rowId;
|
471
|
+
}
|
472
|
+
|
473
|
+
let val = this._ric;
|
474
|
+
if(val) {
|
475
|
+
obj["ric"] = val;
|
476
|
+
}
|
477
|
+
|
478
|
+
// The user passed a single quote (') case
|
479
|
+
if(!this._ric && this._userInput.charAt(0) === "'") {
|
480
|
+
obj["ric"] = this._userInput;
|
481
|
+
}
|
482
|
+
|
483
|
+
val = this._realTime;
|
484
|
+
if(!val) {
|
485
|
+
obj["realTime"] = false;
|
486
|
+
}
|
487
|
+
|
488
|
+
val = this._permId;
|
489
|
+
if(val) {
|
490
|
+
obj["permId"] = val;
|
491
|
+
}
|
492
|
+
|
493
|
+
val = this._chainRic;
|
494
|
+
if(val) {
|
495
|
+
obj["chainRic"] = val;
|
496
|
+
}
|
497
|
+
|
498
|
+
val = this._label;
|
499
|
+
if(val) {
|
500
|
+
obj["label"] = val;
|
501
|
+
}
|
502
|
+
|
503
|
+
val = this._userModel;
|
504
|
+
if(val) {
|
505
|
+
obj["keepModel"] = obj; // This is bad
|
506
|
+
}
|
507
|
+
|
508
|
+
val = this._isChain;
|
509
|
+
if(val != null) {
|
510
|
+
obj["asChain"] = val;
|
511
|
+
}
|
512
|
+
|
513
|
+
val = this._collapsed;
|
514
|
+
if(val != null) {
|
515
|
+
obj["collapsed"] = val;
|
516
|
+
}
|
517
|
+
|
518
|
+
val = this._view ? this._view.isHiddenRow(this._rowId) : false;
|
519
|
+
if(val) {
|
520
|
+
obj["hidden"] = val;
|
521
|
+
}
|
522
|
+
|
523
|
+
val = this._info;
|
524
|
+
if(val) {
|
525
|
+
obj["info"] = this._info;
|
526
|
+
}
|
527
|
+
|
528
|
+
val = this._cloneStaticRowData();
|
529
|
+
if(val) {
|
530
|
+
obj["values"] = val;
|
531
|
+
}
|
532
|
+
|
533
|
+
// obtain the static values of constituent rows
|
534
|
+
if(this.isChain()) {
|
535
|
+
let children = this.getChildren();
|
536
|
+
if(children) {
|
537
|
+
let childValues = val ? val[RowDefinition._childDataField] : {};
|
538
|
+
if(!childValues) {
|
539
|
+
childValues = {};
|
540
|
+
}
|
541
|
+
let dirty = false;
|
542
|
+
let len = children.length;
|
543
|
+
let i, rowDef, staticValues;
|
544
|
+
for(i = 0; i < len; i++) {
|
545
|
+
rowDef = children[i];
|
546
|
+
staticValues = rowDef._cloneStaticRowData();
|
547
|
+
if(staticValues) {
|
548
|
+
dirty = true;
|
549
|
+
childValues[rowDef.getRic()] = staticValues;
|
550
|
+
}
|
551
|
+
}
|
552
|
+
|
553
|
+
if(dirty) {
|
554
|
+
if(!obj["values"]) {
|
555
|
+
obj["values"] = {};
|
556
|
+
}
|
557
|
+
obj["values"][RowDefinition._childDataField] = childValues;
|
558
|
+
}
|
559
|
+
}
|
560
|
+
}
|
561
|
+
|
562
|
+
return obj;
|
563
|
+
};
|
564
|
+
/** Data id is deprecated
|
565
|
+
* @public
|
566
|
+
* @return {string} Always return empty string
|
567
|
+
*/
|
568
|
+
RowDefinition.prototype.getDataId = function() {
|
569
|
+
return "";
|
570
|
+
};
|
571
|
+
/** @public
|
572
|
+
* @return {string}
|
573
|
+
*/
|
574
|
+
RowDefinition.prototype.getType = function() {
|
575
|
+
if(this._isChain) {
|
576
|
+
return ROW_TYPES.CHAIN;
|
577
|
+
} else if(this._parent) {
|
578
|
+
return ROW_TYPES.CONSTITUENT;
|
579
|
+
} else {
|
580
|
+
let dv = this._view;
|
581
|
+
if(dv) {
|
582
|
+
let rid = this.getRowId();
|
583
|
+
let separator = dv.isSegmentSeparator(rid);
|
584
|
+
let level = dv.getSegmentLevel(rid);
|
585
|
+
if(separator) {
|
586
|
+
if(level === 1) {
|
587
|
+
return ROW_TYPES.GROUP_HEADER;
|
588
|
+
} else {
|
589
|
+
return ROW_TYPES.SUBGROUP_HEADER;
|
590
|
+
}
|
591
|
+
} else {
|
592
|
+
if(dv.getSegmentParentRowId(rid)) {
|
593
|
+
return ROW_TYPES.GROUP_MEMBER;
|
594
|
+
}
|
595
|
+
}
|
596
|
+
} else {
|
597
|
+
return "";
|
598
|
+
}
|
599
|
+
}
|
600
|
+
return ROW_TYPES.CONTENT;
|
601
|
+
};
|
602
|
+
/** This method should always be called right after the initialization
|
603
|
+
* @public
|
604
|
+
* @param {DataCache} dataSource
|
605
|
+
* @param {Object=} subs Quotes2 subscription object
|
606
|
+
* @return {boolean} Returns true if there is an data update
|
607
|
+
*/
|
608
|
+
RowDefinition.prototype.setDataSource = function(dataSource, subs) {
|
609
|
+
this._dc = dataSource || null;
|
610
|
+
let dataUpdated = false;
|
611
|
+
if(this._dc) {
|
612
|
+
if(this._staticValues) {
|
613
|
+
let rowData = _cloneObject(this._staticValues);
|
614
|
+
dataUpdated = this.addUpdate(rowData);
|
615
|
+
this._dc.setRowData(this._rowId, rowData, {
|
616
|
+
"rowDef": this, // The _onDataChanged and _onDataComposed handlers cannot get rowDef from DT because row does not register to view yet.
|
617
|
+
"initialChanges": this.getUpdates() // Used by _onDataComposed to keep backward compatibility.
|
618
|
+
}); // Trigger dataComposed and add updates
|
619
|
+
} else {
|
620
|
+
this._dc.setRowData(this._rowId, {});
|
621
|
+
}
|
622
|
+
}
|
623
|
+
|
624
|
+
this._subs = subs || null;
|
625
|
+
// This will work for runtime row insertion, but not for first initilization.
|
626
|
+
this.subscribeForUpdates();
|
627
|
+
return dataUpdated;
|
628
|
+
};
|
629
|
+
/** @public
|
630
|
+
* @return {DataCache} dataSource
|
631
|
+
*/
|
632
|
+
RowDefinition.prototype.getDataSource = function() {
|
633
|
+
return this._dc;
|
634
|
+
};
|
635
|
+
|
636
|
+
/** @public
|
637
|
+
* @return {Object} rowData
|
638
|
+
*/
|
639
|
+
RowDefinition.prototype.getRowData = function() {
|
640
|
+
return this._dc ? this._dc.getRowData(this._rowId) : {};
|
641
|
+
};
|
642
|
+
/** @public
|
643
|
+
* @param {string} field
|
644
|
+
* @return {*} data
|
645
|
+
*/
|
646
|
+
RowDefinition.prototype.getData = function(field) {
|
647
|
+
return this._dc ? this._dc.getData(this._rowId, field) : null;
|
648
|
+
};
|
649
|
+
|
650
|
+
/** This method replaces all existing static data by the given data -- all existing static data are removed.
|
651
|
+
* @public
|
652
|
+
* @param {Object.<string, *>|Array} data
|
653
|
+
* @param {Array.<string>=} indexToFieldMap In case of the given data is an array, this param will be used for mapping index to field
|
654
|
+
*/
|
655
|
+
RowDefinition.prototype.setStaticRowData = function(data, indexToFieldMap) {
|
656
|
+
this._clearStaticData();
|
657
|
+
|
658
|
+
if(Array.isArray(data)) { // Convert array to object
|
659
|
+
data = arrayToObject(data, indexToFieldMap);
|
660
|
+
}
|
661
|
+
|
662
|
+
this._staticValues = (typeof data === "object") ? data : null;
|
663
|
+
|
664
|
+
if(this._staticValues) {
|
665
|
+
this.setRowData(data);
|
666
|
+
}
|
667
|
+
};
|
668
|
+
/** @private
|
669
|
+
* @return {Object.<string, *>}
|
670
|
+
*/
|
671
|
+
RowDefinition.prototype._cloneStaticRowData = function() {
|
672
|
+
return this._staticValues ? _cloneObject(this._staticValues) : null;
|
673
|
+
};
|
674
|
+
/** @public
|
675
|
+
* @param {string} field
|
676
|
+
* @param {*} value
|
677
|
+
*/
|
678
|
+
RowDefinition.prototype.setStaticData = function(field, value) {
|
679
|
+
if(!this._staticValues) {
|
680
|
+
this._staticValues = {};
|
681
|
+
}
|
682
|
+
this._staticValues[field] = value;
|
683
|
+
|
684
|
+
this.setData(field, value);
|
685
|
+
};
|
686
|
+
/** @public
|
687
|
+
* @param {Object.<string, *>|Array} data
|
688
|
+
* @param {Array.<string>=} indexToFieldMap In case of the given data is an array, this param will be used for mapping index to field
|
689
|
+
*/
|
690
|
+
RowDefinition.prototype.updateRowData = function(data, indexToFieldMap) {
|
691
|
+
if(Array.isArray(data)) { // Convert array to object
|
692
|
+
data = arrayToObject(data, indexToFieldMap);
|
693
|
+
}
|
694
|
+
|
695
|
+
if(data) {
|
696
|
+
this.setRowData(data);
|
697
|
+
}
|
698
|
+
};
|
699
|
+
/** @public
|
700
|
+
* @param {RowDefinition} srcRowDef Original source of row data to be copied from
|
701
|
+
*/
|
702
|
+
RowDefinition.prototype.copyRowData = function(srcRowDef) {
|
703
|
+
if(srcRowDef && srcRowDef !== this) {
|
704
|
+
let rowData = this.getRowData();
|
705
|
+
srcRowDef.cloneRowData(rowData, this._staticValues);
|
706
|
+
}
|
707
|
+
};
|
708
|
+
/** @public
|
709
|
+
* @param {Object=} obj
|
710
|
+
* @param {Object=} exceptionObj
|
711
|
+
* @return {!Object}
|
712
|
+
*/
|
713
|
+
RowDefinition.prototype.cloneRowData = function(obj, exceptionObj) {
|
714
|
+
let rowObj = obj || {};
|
715
|
+
let field;
|
716
|
+
let uncopiable_fields = {
|
717
|
+
"ROW_DEF": 1,
|
718
|
+
"SUB_ID": 1
|
719
|
+
};
|
720
|
+
let staticValues = this._staticValues;
|
721
|
+
for(field in staticValues) {
|
722
|
+
uncopiable_fields[field] = 1;
|
723
|
+
}
|
724
|
+
|
725
|
+
for(field in exceptionObj) {
|
726
|
+
uncopiable_fields[field] = 1;
|
727
|
+
}
|
728
|
+
|
729
|
+
let rowData = this.getRowData();
|
730
|
+
for(field in rowData) {
|
731
|
+
if(!uncopiable_fields[field]) {
|
732
|
+
rowObj[field] = rowData[field];
|
733
|
+
}
|
734
|
+
}
|
735
|
+
return rowObj;
|
736
|
+
};
|
737
|
+
/** @public
|
738
|
+
* @param {Object.<string, *>} data
|
739
|
+
*/
|
740
|
+
RowDefinition.prototype.setRowData = function(data) {
|
741
|
+
if(this._dc) {
|
742
|
+
this._dc.setRowData(this._rowId, data);
|
743
|
+
}
|
744
|
+
};
|
745
|
+
/** @public
|
746
|
+
*/
|
747
|
+
RowDefinition.prototype.resetRowData = function() {
|
748
|
+
let dc = this._dc;
|
749
|
+
if(dc) {
|
750
|
+
let rowId = this._rowId;
|
751
|
+
dc.setRowData(rowId, null);
|
752
|
+
dc.setRowData(rowId, {}); // Row data is guaranteed to be existed
|
753
|
+
if(this._staticValues) {
|
754
|
+
dc.setRowData(rowId, this._staticValues); // Trigger dataComposed and add updates
|
755
|
+
}
|
756
|
+
}
|
757
|
+
};
|
758
|
+
/** @public
|
759
|
+
* @param {string} field
|
760
|
+
* @param {*} value
|
761
|
+
*/
|
762
|
+
RowDefinition.prototype.setData = function(field, value) {
|
763
|
+
if(this._dc) {
|
764
|
+
this._dc.setData(this._rowId, field, value);
|
765
|
+
}
|
766
|
+
};
|
767
|
+
/** @private
|
768
|
+
*/
|
769
|
+
RowDefinition.prototype._clearStaticData = function() {
|
770
|
+
let staticValues = this._staticValues;
|
771
|
+
if(staticValues) {
|
772
|
+
if(this._dc) {
|
773
|
+
let obj = {};
|
774
|
+
for(let key in staticValues) {
|
775
|
+
obj[key] = null;
|
776
|
+
}
|
777
|
+
this._dc.setRowData(this._rowId, obj);
|
778
|
+
}
|
779
|
+
this._staticValues = null;
|
780
|
+
}
|
781
|
+
};
|
782
|
+
|
783
|
+
/** @public
|
784
|
+
* @return {string}
|
785
|
+
*/
|
786
|
+
RowDefinition.prototype.getUserInput = function() {
|
787
|
+
return this._userInput;
|
788
|
+
};
|
789
|
+
/** @public
|
790
|
+
* @return {string}
|
791
|
+
*/
|
792
|
+
RowDefinition.prototype.getRic = function() {
|
793
|
+
return this._ric;
|
794
|
+
};
|
795
|
+
/** @public
|
796
|
+
* @return {string}
|
797
|
+
*/
|
798
|
+
RowDefinition.prototype.getPermId = function() {
|
799
|
+
return this._permId;
|
800
|
+
};
|
801
|
+
/** @public
|
802
|
+
* @return {string}
|
803
|
+
*/
|
804
|
+
RowDefinition.prototype.getSymbol = function() {
|
805
|
+
return this._ric || this._permId;
|
806
|
+
};
|
807
|
+
/** @public
|
808
|
+
* @return {string}
|
809
|
+
*/
|
810
|
+
RowDefinition.prototype.getDisplayText = function() {
|
811
|
+
if(this._label != null) { // Empty string is allowed
|
812
|
+
return this._label;
|
813
|
+
}
|
814
|
+
|
815
|
+
if(this._ric) { // Use chainRic instead if this is a chain
|
816
|
+
return this._ric;
|
817
|
+
}
|
818
|
+
|
819
|
+
if(this._permId) {
|
820
|
+
return this._permId;
|
821
|
+
}
|
822
|
+
|
823
|
+
return this._userInput;
|
824
|
+
};
|
825
|
+
/** @public
|
826
|
+
* @return {string|null}
|
827
|
+
*/
|
828
|
+
RowDefinition.prototype.getLabel = function() {
|
829
|
+
return this._label;
|
830
|
+
};
|
831
|
+
|
832
|
+
/** @public
|
833
|
+
* @return {boolean}
|
834
|
+
*/
|
835
|
+
RowDefinition.prototype.isRowHeader = function() {
|
836
|
+
return (this._userInput.charAt(0) === "'");
|
837
|
+
};
|
838
|
+
/** @public
|
839
|
+
* @return {boolean}
|
840
|
+
*/
|
841
|
+
RowDefinition.prototype.isChain = function() {
|
842
|
+
return this._isChain;
|
843
|
+
};
|
844
|
+
/** @public
|
845
|
+
* @return {boolean}
|
846
|
+
*/
|
847
|
+
RowDefinition.prototype.isConstituent = function() {
|
848
|
+
return (this._autoGenerated && this._subId && this._rowId !== this._subId) ? true : false;
|
849
|
+
};
|
850
|
+
/** @public
|
851
|
+
* @function
|
852
|
+
* @param {RowDefinition} rowDef
|
853
|
+
* @return {boolean}
|
854
|
+
*/
|
855
|
+
RowDefinition.hasChain = function(rowDef) {
|
856
|
+
return rowDef.isChain();
|
857
|
+
};
|
858
|
+
/** @public
|
859
|
+
* @return {boolean}
|
860
|
+
*/
|
861
|
+
RowDefinition.prototype.isChainCollapsed = function() {
|
862
|
+
if(this._view) {
|
863
|
+
return this._view.isSegmentCollapsed(this._rowId);
|
864
|
+
}
|
865
|
+
return false;
|
866
|
+
};
|
867
|
+
/** @public
|
868
|
+
* @return {boolean}
|
869
|
+
*/
|
870
|
+
RowDefinition.prototype.isChainExpanded = function() {
|
871
|
+
return !this.isChainCollapsed();
|
872
|
+
};
|
873
|
+
/** @public
|
874
|
+
* @ignore
|
875
|
+
* @return {boolean}
|
876
|
+
*/
|
877
|
+
RowDefinition.prototype.isFixedPosition = function() {
|
878
|
+
return this._isChain && this.isChainExpanded();
|
879
|
+
};
|
880
|
+
/** @public
|
881
|
+
* @return {boolean}
|
882
|
+
*/
|
883
|
+
RowDefinition.prototype.isAutoGenerated = function() {
|
884
|
+
return this._autoGenerated;
|
885
|
+
};
|
886
|
+
/** @public
|
887
|
+
* @return {boolean}
|
888
|
+
*/
|
889
|
+
RowDefinition.prototype.isRealTimeRow = function() {
|
890
|
+
if(!this.getRic()) { // Empty row
|
891
|
+
return false;
|
892
|
+
}
|
893
|
+
if(!this._realTime) {
|
894
|
+
return false;
|
895
|
+
}
|
896
|
+
|
897
|
+
if(this._autoGenerated) { // Constituents in chain are not real-time row
|
898
|
+
return false;
|
899
|
+
}
|
900
|
+
|
901
|
+
if(this.isRowHeader()) {
|
902
|
+
return false;
|
903
|
+
}
|
904
|
+
|
905
|
+
return true;
|
906
|
+
};
|
907
|
+
|
908
|
+
/** @public
|
909
|
+
* @param {Object=} subs
|
910
|
+
* @return {boolean} If a subscription is made, return true.
|
911
|
+
*/
|
912
|
+
RowDefinition.prototype.subscribeForUpdates = function(subs) {
|
913
|
+
if(!(subs || this._subs)) {
|
914
|
+
return false;
|
915
|
+
}
|
916
|
+
if(!this.isRealTimeRow() && !this.getPermId()) {
|
917
|
+
return false;
|
918
|
+
}
|
919
|
+
// TODO: Check if the same subscription is being made.
|
920
|
+
this.unsubscribeForUpdates();
|
921
|
+
if(subs) {
|
922
|
+
this._subs = subs;
|
923
|
+
} else {
|
924
|
+
subs = this._subs;
|
925
|
+
}
|
926
|
+
if(this.isChain()) {
|
927
|
+
let symbol = this._chainRic;
|
928
|
+
if(!symbol){
|
929
|
+
symbol = this._ric;
|
930
|
+
if(symbol.indexOf("0#") < 0){
|
931
|
+
let count = (symbol.match(/\./g) || []).length;
|
932
|
+
if(count < 2){
|
933
|
+
symbol = "0#" + symbol;
|
934
|
+
}
|
935
|
+
}
|
936
|
+
}
|
937
|
+
this._subId = subs["addChain"](symbol, this._rowId); // Some chain require 0# symbol to populate its constituents
|
938
|
+
} else if(this._ric) {
|
939
|
+
this._subId = subs["addRic"](this._ric, this._rowId);
|
940
|
+
}
|
941
|
+
|
942
|
+
let xRicName = this.getDisplayText(); // WARNING: This does not cover real-time X_RIC_NAME updates
|
943
|
+
this.setRowData({"X_RIC_NAME": xRicName}); // Trigger data update immediately
|
944
|
+
|
945
|
+
return true;
|
946
|
+
};
|
947
|
+
/** Unsubscribe existing real-time data service. Static data is maintained
|
948
|
+
* @public
|
949
|
+
* @param {boolean=} keepData
|
950
|
+
* @returns {null} Always return null
|
951
|
+
*/
|
952
|
+
RowDefinition.prototype.unsubscribeForUpdates = function(keepData) {
|
953
|
+
if(this.isSubscribing()) { // Only normal real-time rows and chains have both subId and subscription object
|
954
|
+
this._subs["removeSubscription"](this._subId);
|
955
|
+
this._subId = "";
|
956
|
+
if(!keepData) {
|
957
|
+
this.resetUpdates();
|
958
|
+
this.resetRowData(); // Real-time data is removed while static data is maintained
|
959
|
+
}
|
960
|
+
}
|
961
|
+
return null;
|
962
|
+
};
|
963
|
+
/** @public
|
964
|
+
* @return {boolean}
|
965
|
+
*/
|
966
|
+
RowDefinition.prototype.isSubscribing = function() {
|
967
|
+
return (this._subId && this._subs) ? true : false;
|
968
|
+
};
|
969
|
+
/** @public
|
970
|
+
* @return {string}
|
971
|
+
*/
|
972
|
+
RowDefinition.prototype.getSubId = function() {
|
973
|
+
return this._subId;
|
974
|
+
};
|
975
|
+
|
976
|
+
/** Take event argument from streaming update with "changes" array property
|
977
|
+
* @public
|
978
|
+
* @param {Object} changes
|
979
|
+
* @return {boolean} Returns true if there is any change
|
980
|
+
*/
|
981
|
+
RowDefinition.prototype.addUpdate = function(changes) {
|
982
|
+
if(changes) {
|
983
|
+
let dirty = 0;
|
984
|
+
for(let field in changes) {
|
985
|
+
this._changes[field] = dirty = 1;
|
986
|
+
}
|
987
|
+
if(dirty) {
|
988
|
+
++this._updateCount;
|
989
|
+
return true;
|
990
|
+
}
|
991
|
+
}
|
992
|
+
return false;
|
993
|
+
};
|
994
|
+
/** If there is no update, this method returns null
|
995
|
+
* @public
|
996
|
+
* @return {Object.<string, number>}
|
997
|
+
*/
|
998
|
+
RowDefinition.prototype.getUpdates = function() {
|
999
|
+
return this._updateCount ? this._changes : null;
|
1000
|
+
};
|
1001
|
+
/** @public
|
1002
|
+
*/
|
1003
|
+
RowDefinition.prototype.resetUpdates = function() {
|
1004
|
+
if(this._updateCount) {
|
1005
|
+
this._changes = {};
|
1006
|
+
this._updateCount = 0;
|
1007
|
+
}
|
1008
|
+
};
|
1009
|
+
|
1010
|
+
/** @public
|
1011
|
+
* @param {DataView} view
|
1012
|
+
* @param {string=} destRowId Destination position where the row will be placed BEFORE the specified position
|
1013
|
+
* @returns {boolean} Returns true for successful registration
|
1014
|
+
*/
|
1015
|
+
RowDefinition.prototype.registerToView = function(view, destRowId) {
|
1016
|
+
if(!view || this._view === view) {
|
1017
|
+
return false; // Already in the view
|
1018
|
+
}
|
1019
|
+
|
1020
|
+
this._view = view;
|
1021
|
+
let rowId = this._rowId;
|
1022
|
+
let rowData = view.getRowData(rowId);
|
1023
|
+
if(rowData && rowData[ROW_DEF]) {
|
1024
|
+
console.warn("Duplicate row id detected");
|
1025
|
+
return false;
|
1026
|
+
}
|
1027
|
+
|
1028
|
+
if(this._subSegment) {
|
1029
|
+
if(rowData) { // Row data for sub segment has been created by data view
|
1030
|
+
rowData[ROW_DEF] = this; // It only needs to register row def to the row data
|
1031
|
+
}
|
1032
|
+
return true;
|
1033
|
+
}
|
1034
|
+
|
1035
|
+
rowData = {};
|
1036
|
+
rowData[ROW_DEF] = this;
|
1037
|
+
|
1038
|
+
let parentRowId = "";
|
1039
|
+
let isSegment = this._isChain || this._asSegment;
|
1040
|
+
if(destRowId) {
|
1041
|
+
parentRowId = view.getSegmentParentRowId(destRowId);
|
1042
|
+
if(parentRowId) {
|
1043
|
+
if(isSegment) { // A chain or a segment cannot be put inside another segment
|
1044
|
+
destRowId = _getEndOfSegmentRowId(view, destRowId);
|
1045
|
+
} else if(!this.isConstituent()) { // Normal row cannot be put inside another chain
|
1046
|
+
let parentRowDef = view.getData(parentRowId, ROW_DEF);
|
1047
|
+
if(parentRowDef.isChain()) {
|
1048
|
+
parentRowId = null;
|
1049
|
+
destRowId = _getEndOfSegmentRowId(view, destRowId);
|
1050
|
+
} // else { // Normal row is inserted into a segment
|
1051
|
+
} // Constituent can be inserted inside a chain
|
1052
|
+
}
|
1053
|
+
}
|
1054
|
+
|
1055
|
+
let stalledSorting = _stallSorting(view, isSegment, false);
|
1056
|
+
view.insertRow(destRowId, rowData, rowId);
|
1057
|
+
|
1058
|
+
if(isSegment) {
|
1059
|
+
view.setSegmentSeparator(rowId);
|
1060
|
+
_stallSorting(view, false, stalledSorting);
|
1061
|
+
if(this._collapsed != null) {
|
1062
|
+
view.collapseSegment(rowId, this._collapsed);
|
1063
|
+
this._collapsed = null;
|
1064
|
+
}
|
1065
|
+
} else if(!this._parent && parentRowId) { // Constituent cannot be added to another segment
|
1066
|
+
view.addSegmentChild(parentRowId, rowId);
|
1067
|
+
}
|
1068
|
+
|
1069
|
+
return true;
|
1070
|
+
};
|
1071
|
+
/** @private
|
1072
|
+
* @param {Array.<string>=} rowIds
|
1073
|
+
* @return {string}
|
1074
|
+
*/
|
1075
|
+
RowDefinition.prototype._deregisterFromView = function(rowIds) {
|
1076
|
+
if(this._view) {
|
1077
|
+
if(rowIds) {
|
1078
|
+
rowIds.push(this._rowId);
|
1079
|
+
}
|
1080
|
+
|
1081
|
+
this._view = null;
|
1082
|
+
return this._rowId;
|
1083
|
+
}
|
1084
|
+
return "";
|
1085
|
+
};
|
1086
|
+
/** Deprecated.
|
1087
|
+
* @public
|
1088
|
+
* @ignore
|
1089
|
+
* @function
|
1090
|
+
* @param {Array.<string>} rowIds
|
1091
|
+
* @param {RowDefinition} rowDef
|
1092
|
+
* @return {Array.<string>}
|
1093
|
+
* @example
|
1094
|
+
* let rowIds = descendants.reduce(RowDefinition.deregisterFromView, []);
|
1095
|
+
*/
|
1096
|
+
RowDefinition.deregisterFromView = function(rowIds, rowDef) {
|
1097
|
+
rowDef._deregisterFromView(rowIds);
|
1098
|
+
return rowIds;
|
1099
|
+
};
|
1100
|
+
|
1101
|
+
/** @public
|
1102
|
+
* @ignore
|
1103
|
+
* @param {string} ric
|
1104
|
+
* @return {RowDefinition}
|
1105
|
+
*/
|
1106
|
+
RowDefinition.prototype.getConstituent = function(ric) {
|
1107
|
+
if(this._children && ric) {
|
1108
|
+
for(let i = this._children.length; --i >= 0;) {
|
1109
|
+
if(this._children[i]._ric === ric) {
|
1110
|
+
return this._children[i];
|
1111
|
+
}
|
1112
|
+
}
|
1113
|
+
}
|
1114
|
+
return null;
|
1115
|
+
};
|
1116
|
+
|
1117
|
+
/** Check whether the given ric can be a constituent of this row definition. WARNING: permId is not handled by this method
|
1118
|
+
* @public
|
1119
|
+
* @ignore
|
1120
|
+
* @param {string} ric
|
1121
|
+
* @return {boolean} Returns true if the given ric can be its constituent
|
1122
|
+
*/
|
1123
|
+
RowDefinition.prototype.verifyConstituent = function(ric) {
|
1124
|
+
if(this._isChain && ric) { // A constituent must have a valid ric
|
1125
|
+
if(this._ric !== ric) { // A constituent cannot have the same ric as its parent
|
1126
|
+
if(this._ric !== ("0#" + ric)) { // Real-time service may return ric without 0#
|
1127
|
+
return this._ric !== ("/" + ric); // Real-time service may return ric with slash (delayed ric)
|
1128
|
+
}
|
1129
|
+
}
|
1130
|
+
}
|
1131
|
+
return false;
|
1132
|
+
};
|
1133
|
+
/** verifyConstituent should be called before calling this method
|
1134
|
+
* @public
|
1135
|
+
* @ignore
|
1136
|
+
* @param {string} ric
|
1137
|
+
* @return {RowDefinition} Return newly created child definition, if success
|
1138
|
+
*/
|
1139
|
+
RowDefinition.prototype.addConstituent = function(ric) {
|
1140
|
+
if(!(this._rowId && this._subId && this._isChain)) { // Chain must be alive (has not been disposed). Chain must be subscribed as chain
|
1141
|
+
return null;
|
1142
|
+
}
|
1143
|
+
|
1144
|
+
if(!this._children) {
|
1145
|
+
this._children = [];
|
1146
|
+
}
|
1147
|
+
|
1148
|
+
let rowOptions = {
|
1149
|
+
"asConstituent": true,
|
1150
|
+
"ric": ric,
|
1151
|
+
"parent": this
|
1152
|
+
};
|
1153
|
+
|
1154
|
+
// Get child static values stored in this row
|
1155
|
+
if(this._staticValues) {
|
1156
|
+
let children = this._staticValues[RowDefinition._childDataField];
|
1157
|
+
if(children) {
|
1158
|
+
let childValues = children[ric];
|
1159
|
+
if(childValues) {
|
1160
|
+
rowOptions["values"] = childValues;
|
1161
|
+
children[ric] = null;
|
1162
|
+
}
|
1163
|
+
}
|
1164
|
+
}
|
1165
|
+
|
1166
|
+
return new RowDefinition(rowOptions); // childDef is added to this._children in the constructor
|
1167
|
+
};
|
1168
|
+
|
1169
|
+
/** Used to convert autogenerated row to regular real-time row
|
1170
|
+
* @public
|
1171
|
+
* @ignore
|
1172
|
+
* @param {string=} userRowId
|
1173
|
+
*/
|
1174
|
+
RowDefinition.prototype.toRealTimeRow = function(userRowId) {
|
1175
|
+
if(!this.isConstituent()) {
|
1176
|
+
return; // Only a constituent can be converted to a real-time row
|
1177
|
+
}
|
1178
|
+
|
1179
|
+
let subs = this._parent._subs;
|
1180
|
+
this._realTime = true;
|
1181
|
+
this._autoGenerated = false;
|
1182
|
+
this._parent = null;
|
1183
|
+
this._depthLevel = 0;
|
1184
|
+
|
1185
|
+
if(userRowId) {
|
1186
|
+
this._rowId = userRowId;
|
1187
|
+
this._userId = true;
|
1188
|
+
}
|
1189
|
+
|
1190
|
+
this.subscribeForUpdates(subs); // Static data remains intact
|
1191
|
+
};
|
1192
|
+
|
1193
|
+
/** @public
|
1194
|
+
*/
|
1195
|
+
RowDefinition.prototype.unlinkChain = function() {
|
1196
|
+
if(!this._isChain) {
|
1197
|
+
return;
|
1198
|
+
}
|
1199
|
+
|
1200
|
+
this.unsubscribeForUpdates(true); // Static data remains intact
|
1201
|
+
|
1202
|
+
let view = this._view;
|
1203
|
+
if(view) {
|
1204
|
+
let rid = this.getRowId();
|
1205
|
+
let segment = view.getSegment(rid);
|
1206
|
+
if(segment) {
|
1207
|
+
segment.setClassification(null);
|
1208
|
+
}
|
1209
|
+
view.setSegmentSeparator(rid, false);
|
1210
|
+
}
|
1211
|
+
|
1212
|
+
this._isChain = false;
|
1213
|
+
this._chainRic = "";
|
1214
|
+
this._userInput = this._ric;
|
1215
|
+
this._children = null;
|
1216
|
+
|
1217
|
+
this.subscribeForUpdates();
|
1218
|
+
};
|
1219
|
+
|
1220
|
+
/** @public
|
1221
|
+
* @return {boolean} Returns true if there is a change in view
|
1222
|
+
*/
|
1223
|
+
RowDefinition.prototype.collapseChain = function() {
|
1224
|
+
if(this._isChain && this._view) {
|
1225
|
+
return this._view.collapseSegment(this._rowId, true);
|
1226
|
+
}
|
1227
|
+
return false;
|
1228
|
+
// if(this._children) {
|
1229
|
+
// this._children.forEach(RowDefinition.dispose); // All descendants will be removed too
|
1230
|
+
// this._children = null;
|
1231
|
+
// }
|
1232
|
+
// unsub chain
|
1233
|
+
// resub index
|
1234
|
+
};
|
1235
|
+
/** @public
|
1236
|
+
* @return {boolean} Returns true if there is a change in view
|
1237
|
+
*/
|
1238
|
+
RowDefinition.prototype.expandChain = function() {
|
1239
|
+
if(this._isChain && this._view) {
|
1240
|
+
return this._view.collapseSegment(this._rowId, false);
|
1241
|
+
}
|
1242
|
+
return false;
|
1243
|
+
// unsub index
|
1244
|
+
// resub chain
|
1245
|
+
};
|
1246
|
+
|
1247
|
+
/** Toggle between chain expanding and collapsing
|
1248
|
+
* @public
|
1249
|
+
* @return {boolean} Returns true if there is a change in view
|
1250
|
+
*/
|
1251
|
+
RowDefinition.prototype.toggleChain = function() {
|
1252
|
+
if(this.isChainExpanded()) {
|
1253
|
+
return this.collapseChain();
|
1254
|
+
} else {
|
1255
|
+
return this.expandChain();
|
1256
|
+
}
|
1257
|
+
};
|
1258
|
+
|
1259
|
+
/** @public
|
1260
|
+
* @ignore
|
1261
|
+
* @param {RowDefinition} childDef
|
1262
|
+
* @return {boolean} Returns true if success
|
1263
|
+
*/
|
1264
|
+
RowDefinition.prototype.addChild = function(childDef) {
|
1265
|
+
if(!childDef) {
|
1266
|
+
return false;
|
1267
|
+
}
|
1268
|
+
return childDef.setParent(this);
|
1269
|
+
};
|
1270
|
+
/** @public
|
1271
|
+
* @return {Array.<RowDefinition>}
|
1272
|
+
*/
|
1273
|
+
RowDefinition.prototype.getChildren = function() {
|
1274
|
+
return this._children;
|
1275
|
+
};
|
1276
|
+
/** Get all descendants (i.e. children and nested children).
|
1277
|
+
* @public
|
1278
|
+
* @param {Array.<RowDefinition>=} ary
|
1279
|
+
* @return {!Array.<RowDefinition>} Flat list of row definitions. The order is corresponded to the order of the rows in the view
|
1280
|
+
*/
|
1281
|
+
RowDefinition.prototype.getDescendants = function(ary) {
|
1282
|
+
if(!ary) {
|
1283
|
+
ary = [];
|
1284
|
+
}
|
1285
|
+
if(this._children) {
|
1286
|
+
let chdr = this._children;
|
1287
|
+
let len = chdr.length;
|
1288
|
+
for(let i = 0; i < len; ++i) {
|
1289
|
+
let ch = chdr[i];
|
1290
|
+
ary.push(ch);
|
1291
|
+
ch.getDescendants(ary);
|
1292
|
+
}
|
1293
|
+
}
|
1294
|
+
return ary;
|
1295
|
+
};
|
1296
|
+
/** Get rowIds of all descendants (i.e. children and nested children).
|
1297
|
+
* @public
|
1298
|
+
* @return {Array.<string>} Null if there is no row Id
|
1299
|
+
*/
|
1300
|
+
RowDefinition.prototype.getAllDescendantIds = function() {
|
1301
|
+
let descendants = this.getDescendants();
|
1302
|
+
if(descendants.length) {
|
1303
|
+
return descendants.map(RowDefinition.toRowId);
|
1304
|
+
} else {
|
1305
|
+
return null;
|
1306
|
+
}
|
1307
|
+
};
|
1308
|
+
/** @public
|
1309
|
+
* @return {number}
|
1310
|
+
*/
|
1311
|
+
RowDefinition.prototype.getChildCount = function() {
|
1312
|
+
return (this._children) ? this._children.length : 0;
|
1313
|
+
};
|
1314
|
+
/** @public
|
1315
|
+
* @return {number}
|
1316
|
+
*/
|
1317
|
+
RowDefinition.prototype.countChildInView = function() {
|
1318
|
+
if(this._children) {
|
1319
|
+
let viewCount = 0;
|
1320
|
+
let childCount = this._children.length;
|
1321
|
+
for(let i = 0; i < childCount; ++i) {
|
1322
|
+
if(this._children[i]._view) {
|
1323
|
+
++viewCount;
|
1324
|
+
}
|
1325
|
+
}
|
1326
|
+
return viewCount;
|
1327
|
+
}
|
1328
|
+
return 0;
|
1329
|
+
};
|
1330
|
+
/** @public
|
1331
|
+
* @return {RowDefinition}
|
1332
|
+
*/
|
1333
|
+
RowDefinition.prototype.getParent = function() {
|
1334
|
+
return this._parent;
|
1335
|
+
};
|
1336
|
+
/** @public
|
1337
|
+
* @ignore
|
1338
|
+
* @param {RowDefinition} parentDef
|
1339
|
+
* @return {boolean} Returns true if success
|
1340
|
+
*/
|
1341
|
+
RowDefinition.prototype.setParent = function(parentDef) {
|
1342
|
+
if(this._parent === parentDef || parentDef === this) { // The same parent is given
|
1343
|
+
return false;
|
1344
|
+
}
|
1345
|
+
if(this._parent) { // Release from previous parent
|
1346
|
+
let at = this._parent._children.lastIndexOf(this);
|
1347
|
+
if(at >= 0) {
|
1348
|
+
this._parent._children.splice(at, 1);
|
1349
|
+
}
|
1350
|
+
this._parent = null;
|
1351
|
+
this._depthLevel = 0; // TODO: Update depth of children
|
1352
|
+
}
|
1353
|
+
|
1354
|
+
if(parentDef) {
|
1355
|
+
if(!parentDef._children) {
|
1356
|
+
parentDef._children = [];
|
1357
|
+
}
|
1358
|
+
// WARNING: No duplication checking
|
1359
|
+
parentDef._children.push(this);
|
1360
|
+
this._parent = parentDef;
|
1361
|
+
this._depthLevel = parentDef._depthLevel + 1; // TODO: Update depth of children
|
1362
|
+
return true;
|
1363
|
+
}
|
1364
|
+
return false;
|
1365
|
+
};
|
1366
|
+
/** @public
|
1367
|
+
* @return {number}
|
1368
|
+
*/
|
1369
|
+
RowDefinition.prototype.getDepthLevel = function() {
|
1370
|
+
return this._depthLevel;
|
1371
|
+
};
|
1372
|
+
/** @public
|
1373
|
+
* @ignore
|
1374
|
+
* @return {number}
|
1375
|
+
*/
|
1376
|
+
RowDefinition.prototype.getGroupOrder = function() {
|
1377
|
+
if(this._parent) {
|
1378
|
+
return this._parent.getGroupOrder() + 0.1; // Plus level. TODO: Support nested level
|
1379
|
+
}
|
1380
|
+
return this._groupOrder;
|
1381
|
+
};
|
1382
|
+
/** @public
|
1383
|
+
* @ignore
|
1384
|
+
* @param {number} num
|
1385
|
+
* @return {boolean} Return true if there is any change
|
1386
|
+
*/
|
1387
|
+
RowDefinition.prototype.setGroupOrder = function(num) {
|
1388
|
+
if(!this._parent) { // Only root node can have group order
|
1389
|
+
if(this._groupOrder !== num) {
|
1390
|
+
this._groupOrder = num;
|
1391
|
+
return true;
|
1392
|
+
}
|
1393
|
+
}
|
1394
|
+
return false;
|
1395
|
+
};
|
1396
|
+
|
1397
|
+
/** @public
|
1398
|
+
* @ignore
|
1399
|
+
* @return {Object}
|
1400
|
+
*/
|
1401
|
+
RowDefinition.prototype.getUserModel = function() {
|
1402
|
+
return this._userModel;
|
1403
|
+
};
|
1404
|
+
|
1405
|
+
/** @public
|
1406
|
+
* @param {Object} obj
|
1407
|
+
*/
|
1408
|
+
RowDefinition.prototype.setRowInfo = function(obj) {
|
1409
|
+
this._info = obj;
|
1410
|
+
};
|
1411
|
+
/** @public
|
1412
|
+
* @return {Object}
|
1413
|
+
*/
|
1414
|
+
RowDefinition.prototype.getRowInfo = function() {
|
1415
|
+
return this._info;
|
1416
|
+
};
|
1417
|
+
|
1418
|
+
/** For mapping row Id by Array.map()
|
1419
|
+
* @public
|
1420
|
+
* @function
|
1421
|
+
* @param {RowDefinition} rowDef
|
1422
|
+
* @return {string} Row Id will never be empty string unless the row has been removed
|
1423
|
+
*/
|
1424
|
+
RowDefinition.toRowId = function(rowDef) {
|
1425
|
+
return rowDef.getRowId();
|
1426
|
+
};
|
1427
|
+
/** For transforming row options into standard format
|
1428
|
+
* @public
|
1429
|
+
* @ignore
|
1430
|
+
* @function
|
1431
|
+
* @param {RowDefinition~Options} rowOptions
|
1432
|
+
* @return {RowDefinition~Options}
|
1433
|
+
*/
|
1434
|
+
RowDefinition.extractRowOptions = function(rowOptions) {
|
1435
|
+
let ric = rowOptions["ric"];
|
1436
|
+
let permId = rowOptions["permId"];
|
1437
|
+
let chainRic = rowOptions["chainRic"];
|
1438
|
+
let collapsed = rowOptions["collapsed"];
|
1439
|
+
let asSegment = rowOptions["asSegment"];
|
1440
|
+
let asChain = rowOptions["asChain"];
|
1441
|
+
if(asChain == null && chainRic){
|
1442
|
+
asChain = true;
|
1443
|
+
}
|
1444
|
+
let expanded = null;
|
1445
|
+
if(ric && ric.indexOf("0#") >= 0){
|
1446
|
+
if(asChain == null){
|
1447
|
+
asChain = true;
|
1448
|
+
}
|
1449
|
+
expanded = true;
|
1450
|
+
} else if(asChain) {
|
1451
|
+
expanded = false;
|
1452
|
+
} else if(asSegment) {
|
1453
|
+
expanded = true;
|
1454
|
+
}
|
1455
|
+
|
1456
|
+
let extractedOptions = {};
|
1457
|
+
if(collapsed == null) {
|
1458
|
+
extractedOptions["collapsed"] = !expanded;
|
1459
|
+
} else {
|
1460
|
+
extractedOptions["collapsed"] = collapsed;
|
1461
|
+
}
|
1462
|
+
extractedOptions["ric"] = ric;
|
1463
|
+
extractedOptions["permId"] = permId || "";
|
1464
|
+
extractedOptions["chainRic"] = chainRic;
|
1465
|
+
extractedOptions["asChain"] = asChain;
|
1466
|
+
return extractedOptions;
|
1467
|
+
};
|
1468
|
+
/** For mapping row Id by Array.map()
|
1469
|
+
* @public
|
1470
|
+
* @function
|
1471
|
+
* @param {RowDefinition} rowDef
|
1472
|
+
*/
|
1473
|
+
RowDefinition.dispose = function(rowDef) {
|
1474
|
+
rowDef.dispose();
|
1475
|
+
};
|
1476
|
+
|
1477
|
+
export {RowDefinition, ROW_DEF, ROW_TYPES};
|
1478
|
+
export default RowDefinition;
|