@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,1055 @@
|
|
1
|
+
import {Ext} from "./Ext.js";
|
2
|
+
import {EventDispatcher} from "./EventDispatcher.js";
|
3
|
+
import {Deferred} from "./Deferred.js";
|
4
|
+
import {injectCss} from "./Util.js";
|
5
|
+
import {ElfUtil} from "./ElfUtil.js";
|
6
|
+
|
7
|
+
/** This class is designed to be a base class for other tr.Grid plug-ins. It provide commonly used functionalities by the plug-ins.
|
8
|
+
* @constructor
|
9
|
+
* @extends {EventDispatcher}
|
10
|
+
* @example
|
11
|
+
* import {Ext} from "../../node_modules/tr-grid-util/src/Ext.js";
|
12
|
+
* import {GridPlugin} from "../../node_modules/tr-grid-util/src/GridPlugin.js";
|
13
|
+
*
|
14
|
+
* let SomePlugin = function() {};
|
15
|
+
* Ext.inherits(SomePlugin, GridPlugin);
|
16
|
+
*/
|
17
|
+
let GridPlugin = function() {};
|
18
|
+
Ext.inherits(GridPlugin, EventDispatcher);
|
19
|
+
|
20
|
+
/** @type {Array.<tr.Grid>}
|
21
|
+
* @protected
|
22
|
+
* @ignore
|
23
|
+
*/
|
24
|
+
GridPlugin.prototype._hosts = null;
|
25
|
+
/** This is for backward compatible with tr.CompositeGrid
|
26
|
+
* @type {tr.CompositeGrid}
|
27
|
+
* @protected
|
28
|
+
* @ignore
|
29
|
+
*/
|
30
|
+
GridPlugin.prototype._compositeGrid = null;
|
31
|
+
/** @type {tr.rt.Grid}
|
32
|
+
* @protected
|
33
|
+
* @ignore
|
34
|
+
*/
|
35
|
+
GridPlugin.prototype._realTimeGrid = null;
|
36
|
+
/** @type {Function}
|
37
|
+
* @protected
|
38
|
+
* @ignore
|
39
|
+
*/
|
40
|
+
GridPlugin.prototype._rowGetter = null;
|
41
|
+
/** Indicates that columns, rows, and components in the primary grid have been initialized
|
42
|
+
* @type {boolean}
|
43
|
+
* @protected
|
44
|
+
* @ignore
|
45
|
+
*/
|
46
|
+
GridPlugin.prototype._initializedGrid = false;
|
47
|
+
|
48
|
+
|
49
|
+
/** Alias to {@link EventDispatcher#addEventListener}
|
50
|
+
* @public
|
51
|
+
* @function
|
52
|
+
* @param {string} type Event name
|
53
|
+
* @param {Function} handler Event handler
|
54
|
+
*/
|
55
|
+
GridPlugin.prototype.listen = GridPlugin.prototype.addEventListener;
|
56
|
+
/** Alias to {@link EventDispatcher#removeEventListener}
|
57
|
+
* @public
|
58
|
+
* @function
|
59
|
+
* @param {string} type Event name
|
60
|
+
* @param {Function} handler Event handler
|
61
|
+
*/
|
62
|
+
GridPlugin.prototype.unlisten = GridPlugin.prototype.removeEventListener;
|
63
|
+
|
64
|
+
/** This is for Composite Grid support. Do NOT override this method. Use protected _afterInit() instead.
|
65
|
+
* @public
|
66
|
+
* @param {Element=} elem Root element
|
67
|
+
* @param {Object=} model Composite grid object model
|
68
|
+
* @param {tr.CompositeGrid=} grid Composite grid control
|
69
|
+
*/
|
70
|
+
GridPlugin.prototype.afterInit = function(elem, model, grid) {
|
71
|
+
let core = null;
|
72
|
+
if(grid && grid["getCoreGrid"]) {
|
73
|
+
core = grid["getCoreGrid"]();
|
74
|
+
}
|
75
|
+
|
76
|
+
if(core) {
|
77
|
+
if(!this.getGridApi()) {
|
78
|
+
this.setGridWrapper("compositegrid", grid); // Plugin is loaded in afterInit for composite grid
|
79
|
+
}
|
80
|
+
if(this._compositeGrid) {
|
81
|
+
core.loadPlugin(this, model); // Allow sharing extension/plugin
|
82
|
+
}
|
83
|
+
}
|
84
|
+
|
85
|
+
|
86
|
+
if(!this._initializedGrid) { // Calling _afterInit only once per extension/plugin
|
87
|
+
this._initializedGrid = true;
|
88
|
+
this._rowGetter = this._realTimeGrid ? rowDefRowGetter : defaultRowGetter;
|
89
|
+
this._afterInit();
|
90
|
+
}
|
91
|
+
};
|
92
|
+
/** This method guarantees that grid (host) and config have been set. It should be used to update any setting that requires different implementation between Composite grid and Real-time grid
|
93
|
+
* @protected
|
94
|
+
* @ignore
|
95
|
+
*/
|
96
|
+
GridPlugin.prototype._afterInit = function() {};
|
97
|
+
|
98
|
+
/** This method is meant to be used by a derived class to release any resource hold by GridPlugin. Do not override this method.
|
99
|
+
* @protected
|
100
|
+
* @ignore
|
101
|
+
*/
|
102
|
+
GridPlugin.prototype._dispose = function() {
|
103
|
+
if(this._hosts) {
|
104
|
+
if(!this._hosts.length) {
|
105
|
+
this._compositeGrid = this._realTimeGrid = null;
|
106
|
+
this._initializedGrid = false;
|
107
|
+
}
|
108
|
+
}
|
109
|
+
};
|
110
|
+
|
111
|
+
|
112
|
+
/** Plugin that has multi-table support means that it can have multiple hosts/tables and share its states across those hosts/tables.
|
113
|
+
* @public
|
114
|
+
* @return {boolean}
|
115
|
+
*/
|
116
|
+
GridPlugin.prototype.hasMultiTableSupport = function() {
|
117
|
+
return false;
|
118
|
+
};
|
119
|
+
|
120
|
+
/** Executed before dispatching, allowing modification of user's event argument object.
|
121
|
+
* @protected
|
122
|
+
* @ignore
|
123
|
+
* @param {string} type Event name
|
124
|
+
* @param {Object} eventArg User's event argument object
|
125
|
+
* @return {Object} New event argument object
|
126
|
+
*/
|
127
|
+
GridPlugin.prototype._prepareEventArguments = function(type, eventArg) {
|
128
|
+
if(!eventArg) {
|
129
|
+
eventArg = {};
|
130
|
+
}
|
131
|
+
eventArg.api = this.getGridApi();
|
132
|
+
return eventArg;
|
133
|
+
};
|
134
|
+
|
135
|
+
/** Get plugin/extension name. This should be unique as it will be used for duplicate protection. Derived class must override this method.
|
136
|
+
* @public
|
137
|
+
* @return {string}
|
138
|
+
*/
|
139
|
+
GridPlugin.prototype.getName = function () {
|
140
|
+
return "GridPlugin"; // Readonly
|
141
|
+
};
|
142
|
+
/** This is the entry point where Core grid instance has been initialized and grid configuration object is passed to the extension. Derived class should override this method to keep reference of Core grid for later referencing.
|
143
|
+
* @public
|
144
|
+
* @param {tr.Grid} host Core grid instance
|
145
|
+
* @param {Object=} gridOptions Grid configuration object
|
146
|
+
*/
|
147
|
+
GridPlugin.prototype.initialize = function (host, gridOptions) {};
|
148
|
+
/** This is where Core grid instance is being disposed. Derived class should override this method to release any resource hold by this plugin/extension, if the last core grid is being disposed (there will be multiple instances for multi-table mode).
|
149
|
+
* @public
|
150
|
+
* @param {tr.Grid=} host Core grid instance
|
151
|
+
*/
|
152
|
+
GridPlugin.prototype.unload = function (host) {
|
153
|
+
this._dispose();
|
154
|
+
};
|
155
|
+
|
156
|
+
/** Get Core grid instance from the given object (usually an Event Argument object).
|
157
|
+
* @public
|
158
|
+
* @param {Event|Element|tr.IElementControl} e
|
159
|
+
* @return {tr.Grid}
|
160
|
+
*/
|
161
|
+
GridPlugin.prototype.getRelativeGrid = function (e) {
|
162
|
+
let targetEl = null;
|
163
|
+
if(e.target) { // The Given object is an Event
|
164
|
+
targetEl = /** @type{Element} */(e.target);
|
165
|
+
let gridAPI = targetEl["api"];
|
166
|
+
if(gridAPI && gridAPI["getCoreGrid"]) {
|
167
|
+
return /** @type{tr.Grid} */(gridAPI["getCoreGrid"]());
|
168
|
+
}
|
169
|
+
} else if(e["getElement"]) { // The Given object is implementing tr.IElementControl
|
170
|
+
targetEl = /** @type{Element} */(e["getElement"]());
|
171
|
+
} else if(e.nodeType === 1) { // The Given object is just an element
|
172
|
+
targetEl = /** @type{Element} */(e);
|
173
|
+
}
|
174
|
+
|
175
|
+
if(targetEl) {
|
176
|
+
for(let i = this._hosts.length; --i >= 0;) {
|
177
|
+
let host = this._hosts[i];
|
178
|
+
if(host.getElement().contains(targetEl)) {
|
179
|
+
return host;
|
180
|
+
}
|
181
|
+
}
|
182
|
+
}
|
183
|
+
return null;
|
184
|
+
};
|
185
|
+
|
186
|
+
/** @public
|
187
|
+
* @param {string} gridType
|
188
|
+
* @param {*} wrapperInstance
|
189
|
+
*/
|
190
|
+
GridPlugin.prototype.setGridWrapper = function (gridType, wrapperInstance) {
|
191
|
+
if(gridType) {
|
192
|
+
gridType = gridType.toLowerCase();
|
193
|
+
if(gridType === "compositegrid") {
|
194
|
+
this._compositeGrid = wrapperInstance;
|
195
|
+
} else if(gridType === "realtimegrid") {
|
196
|
+
this._realTimeGrid = wrapperInstance;
|
197
|
+
}
|
198
|
+
}
|
199
|
+
};
|
200
|
+
/** Get JavaScript wrapper instance. This could be either composite grid or real-time grid.
|
201
|
+
* @public
|
202
|
+
* @param {(number|Object)=} coreRef An index of the core grid or an instance of the core grid
|
203
|
+
* @return {*} wrapperInstance
|
204
|
+
*/
|
205
|
+
GridPlugin.prototype.getGridApi = function (coreRef) {
|
206
|
+
if(coreRef == null) {
|
207
|
+
return this._compositeGrid || this._realTimeGrid;
|
208
|
+
} else {
|
209
|
+
let host = (typeof coreRef == "number") ? this._hosts[coreRef] : coreRef;
|
210
|
+
return host ? (host._wrapper || null) : null;
|
211
|
+
}
|
212
|
+
};
|
213
|
+
|
214
|
+
/** Get user specified column label (e.g. name) or field, if name does not exist
|
215
|
+
* @public
|
216
|
+
* @param {number|string} colRef Column index or column Id
|
217
|
+
* @return {string}
|
218
|
+
*/
|
219
|
+
GridPlugin.prototype.getColumnName = function (colRef) {
|
220
|
+
if(this._compositeGrid) {
|
221
|
+
let colOptions = this._compositeGrid.getColumnModel(colRef);
|
222
|
+
if(colOptions) {
|
223
|
+
if(colOptions.title) {
|
224
|
+
return colOptions.title;
|
225
|
+
} else {
|
226
|
+
return colOptions.field;
|
227
|
+
}
|
228
|
+
}
|
229
|
+
} else {
|
230
|
+
let colIndex = this.getColumnIndex(colRef);
|
231
|
+
let colDef = this._realTimeGrid.getColumnDefinition(colIndex);
|
232
|
+
if(colDef) {
|
233
|
+
return colDef.getName();
|
234
|
+
}
|
235
|
+
}
|
236
|
+
return "";
|
237
|
+
};
|
238
|
+
/** @public
|
239
|
+
* @param {number|string} colRef Column id, field name or column index
|
240
|
+
* @return {number}
|
241
|
+
*/
|
242
|
+
GridPlugin.prototype.getColumnIndex = function (colRef) {
|
243
|
+
// TODO: Unify the below logics
|
244
|
+
if(typeof colRef === "number") {
|
245
|
+
return colRef;
|
246
|
+
}
|
247
|
+
if(this._compositeGrid) {
|
248
|
+
let allFields = this._compositeGrid.getColumnFields();
|
249
|
+
let colIndex = allFields.indexOf(colRef);
|
250
|
+
if(colIndex > -1) {
|
251
|
+
return colIndex;
|
252
|
+
} else {
|
253
|
+
return this._compositeGrid.getColumnIndex(colRef);
|
254
|
+
}
|
255
|
+
} else {
|
256
|
+
return this._realTimeGrid.getColumnIndex(colRef);
|
257
|
+
}
|
258
|
+
};
|
259
|
+
/** @public
|
260
|
+
* @param {Array.<number|string>} colRefs A collection of column ids, field names or column indices
|
261
|
+
* @return {Array.<number>} column indices
|
262
|
+
*/
|
263
|
+
GridPlugin.prototype.getColumnIndices = function (colRefs) {
|
264
|
+
let api = this.getGridApi();
|
265
|
+
if(api.getColumnIndices) {
|
266
|
+
return api.getColumnIndices(colRefs);
|
267
|
+
}
|
268
|
+
|
269
|
+
// TODO: Unify the below logics
|
270
|
+
if(this._compositeGrid) {
|
271
|
+
let allFields = this._compositeGrid.getColumnFields();
|
272
|
+
let columnCount = this._compositeGrid.getColumnCount();
|
273
|
+
let columnIndices = [];
|
274
|
+
let colRef;
|
275
|
+
for (let i = 0; i < colRefs.length; i++) {
|
276
|
+
colRef = colRefs[i];
|
277
|
+
if(typeof colRef === 'number') { // When user pass index
|
278
|
+
if(colRef >= 0 && colRef < columnCount) {
|
279
|
+
columnIndices.push(colRef);
|
280
|
+
}
|
281
|
+
} else {
|
282
|
+
let columnIndex = allFields.indexOf(colRef); // Looping check column index of colRefs field
|
283
|
+
if(columnIndex !== -1) {
|
284
|
+
columnIndices.push(columnIndex);
|
285
|
+
}
|
286
|
+
}
|
287
|
+
}
|
288
|
+
return columnIndices;
|
289
|
+
} else {
|
290
|
+
return this._realTimeGrid.getColumnIndices(colRefs);
|
291
|
+
}
|
292
|
+
};
|
293
|
+
/** @public
|
294
|
+
* @param {number|string} colIndex Column index or column Id
|
295
|
+
* @return {string}
|
296
|
+
*/
|
297
|
+
GridPlugin.prototype.getColumnId = function (colIndex) {
|
298
|
+
// TODO: Unify the below logics
|
299
|
+
if(typeof colIndex === "string") {
|
300
|
+
return colIndex;
|
301
|
+
}
|
302
|
+
|
303
|
+
let colCount = this.getColumnCount();
|
304
|
+
if(colIndex < 0 || colIndex >= colCount) { // Avoid creating undesired column definitions in Core Grid.
|
305
|
+
return "";
|
306
|
+
}
|
307
|
+
|
308
|
+
if(this._compositeGrid) {
|
309
|
+
return this._compositeGrid.getColumnId(colIndex);
|
310
|
+
} else {
|
311
|
+
let colDef = this._realTimeGrid.getColumnDefinition(colIndex);
|
312
|
+
if(colDef) {
|
313
|
+
return colDef.getId();
|
314
|
+
}
|
315
|
+
}
|
316
|
+
return "";
|
317
|
+
};
|
318
|
+
/** @public
|
319
|
+
* @return {!Array.<string>} Return all column ids from existing column
|
320
|
+
*/
|
321
|
+
GridPlugin.prototype.getColumnIds = function () {
|
322
|
+
if(this._hosts && this._hosts.length) {
|
323
|
+
return this._hosts[0].getColumnIds();
|
324
|
+
}
|
325
|
+
return [];
|
326
|
+
};
|
327
|
+
/** @public
|
328
|
+
* @param {number} colIndex
|
329
|
+
* @return {string} Return empty string if the specified column does not exist
|
330
|
+
*/
|
331
|
+
GridPlugin.prototype.getColumnField = function (colIndex) {
|
332
|
+
if(this._hosts && this._hosts.length) {
|
333
|
+
return this._hosts[0].getColumnField(colIndex);
|
334
|
+
}
|
335
|
+
return "";
|
336
|
+
};
|
337
|
+
/** @public
|
338
|
+
* @return {!Array.<string>} Return all column fields from existing column
|
339
|
+
*/
|
340
|
+
GridPlugin.prototype.getColumnFields = function () {
|
341
|
+
if(this._hosts && this._hosts.length) {
|
342
|
+
return this._hosts[0].getColumnFields();
|
343
|
+
}
|
344
|
+
return [];
|
345
|
+
};
|
346
|
+
/** @public
|
347
|
+
* @return {number}
|
348
|
+
*/
|
349
|
+
GridPlugin.prototype.getColumnCount = function() {
|
350
|
+
if(this._hosts) {
|
351
|
+
let g = this._hosts[0];
|
352
|
+
return g ? g.getColumnCount() : 0;
|
353
|
+
}
|
354
|
+
return 0;
|
355
|
+
};
|
356
|
+
/** @protected
|
357
|
+
* @ignore
|
358
|
+
* @param {number|string} srcCol Column Id or index
|
359
|
+
* @param {(number|string)=} destCol Column Id or index of the destination
|
360
|
+
* @return {boolean}
|
361
|
+
*/
|
362
|
+
GridPlugin.prototype._moveColumnById = function (srcCol, destCol) {
|
363
|
+
let hosts = this._hosts;
|
364
|
+
let len = hosts ? hosts.length : 0;
|
365
|
+
if(len) {
|
366
|
+
let dirty = 0;
|
367
|
+
for(let i = 0; i < len; ++i) {
|
368
|
+
dirty |= hosts[i].moveColumnById(srcCol, destCol);
|
369
|
+
}
|
370
|
+
return dirty ? true : false;
|
371
|
+
}
|
372
|
+
return false;
|
373
|
+
};
|
374
|
+
/** @protected
|
375
|
+
* @ignore
|
376
|
+
* @param {number|string|Array.<number|string>} colRefs List of column index or column id to be moved
|
377
|
+
* @param {(number|string)=} destCol Destination position where the moved columns will be placed BEFORE the specified position. This can be column id or index
|
378
|
+
* @return {boolean} Return true if there is any change, and false otherwise
|
379
|
+
*/
|
380
|
+
GridPlugin.prototype._reorderColumns = function (colRefs, destCol) {
|
381
|
+
let hosts = this._hosts;
|
382
|
+
let len = hosts ? hosts.length : 0;
|
383
|
+
if(len) {
|
384
|
+
let dirty = 0;
|
385
|
+
for(let i = 0; i < len; ++i) {
|
386
|
+
dirty |= hosts[i].reorderColumns(colRefs, destCol);
|
387
|
+
}
|
388
|
+
return dirty ? true : false;
|
389
|
+
}
|
390
|
+
return false;
|
391
|
+
};
|
392
|
+
|
393
|
+
/** @protected
|
394
|
+
* @deprecated
|
395
|
+
* @ignore
|
396
|
+
* @param {*} curPlugin
|
397
|
+
* @param {tr.Grid} host
|
398
|
+
* @param {string} pluginName
|
399
|
+
* @return {*} curPlugin
|
400
|
+
*/
|
401
|
+
GridPlugin.prototype._loadPlugin = function (curPlugin, host, pluginName) {
|
402
|
+
if(!curPlugin) {
|
403
|
+
curPlugin = host.getPlugin(pluginName);
|
404
|
+
if(!curPlugin) {
|
405
|
+
curPlugin = host.loadPlugin(pluginName);
|
406
|
+
if(curPlugin && this._initializedGrid) {
|
407
|
+
curPlugin._initializedGrid = true; // WARNING: Accessing private member
|
408
|
+
}
|
409
|
+
}
|
410
|
+
}
|
411
|
+
return curPlugin;
|
412
|
+
};
|
413
|
+
/** WARNING: Call this method only in _afterInit method to ensure existence of composite grid and real-time grid
|
414
|
+
* @protected
|
415
|
+
* @ignore
|
416
|
+
* @param {tr.Grid} host
|
417
|
+
* @param {*} pluginRef
|
418
|
+
* @param {Object=} configObj
|
419
|
+
* @return {Promise}
|
420
|
+
*/
|
421
|
+
GridPlugin.prototype._requestPlugin = function (host, pluginRef, configObj) {
|
422
|
+
if(this._initializedGrid) {
|
423
|
+
return GridPlugin.requestPlugin(host, pluginRef, configObj, this._compositeGrid, this._realTimeGrid);
|
424
|
+
}
|
425
|
+
return Promise.reject("Plugin should be requested after the initialization");
|
426
|
+
};
|
427
|
+
/** Make a request to load a plugin/extension into the given core grid (tr-grid). Return a promise of plugin/extension instance
|
428
|
+
* @public
|
429
|
+
* @param {*} ref This can be ef-grid, atlas-blotter, composite grid, real-time grid, or core grid.
|
430
|
+
* @param {*} pluginRef Plugin/Extension name or instance
|
431
|
+
* @param {Object=} configObj
|
432
|
+
* @param {*=} compositeGrid
|
433
|
+
* @param {*=} realTimeGrid
|
434
|
+
* @return {Promise}
|
435
|
+
*/
|
436
|
+
GridPlugin.requestPlugin = function (ref, pluginRef, configObj, compositeGrid, realTimeGrid) {
|
437
|
+
let core = null;
|
438
|
+
if(ref) {
|
439
|
+
let gridWrapper = null;
|
440
|
+
if(ref.nodeType === 1) { // This is an element
|
441
|
+
// TODO: Support delayed resolving
|
442
|
+
gridWrapper = ref.api; // Grid element must already be initialized and configured
|
443
|
+
} else if(ref.getCoreGrid) {
|
444
|
+
gridWrapper = ref;
|
445
|
+
} else if(ref.getPlugin) {
|
446
|
+
core = ref;
|
447
|
+
}
|
448
|
+
if(gridWrapper) {
|
449
|
+
core = gridWrapper.getCoreGrid();
|
450
|
+
if(!compositeGrid && !realTimeGrid) {
|
451
|
+
if(gridWrapper.getModel) {
|
452
|
+
compositeGrid = gridWrapper;
|
453
|
+
} else {
|
454
|
+
realTimeGrid = gridWrapper;
|
455
|
+
}
|
456
|
+
}
|
457
|
+
}
|
458
|
+
}
|
459
|
+
|
460
|
+
if(!core) {
|
461
|
+
return Promise.reject("Cannot find grid element");
|
462
|
+
}
|
463
|
+
|
464
|
+
let curPlugin = core.getPlugin(pluginRef);
|
465
|
+
if(curPlugin) {
|
466
|
+
return Promise.resolve(curPlugin);
|
467
|
+
} else {
|
468
|
+
let d = new Deferred();
|
469
|
+
setTimeout(GridPlugin._onPluginRequested.bind(null, {
|
470
|
+
grid: core,
|
471
|
+
pluginRef: pluginRef,
|
472
|
+
compositeGrid: compositeGrid,
|
473
|
+
realTimeGrid: realTimeGrid,
|
474
|
+
config: configObj,
|
475
|
+
deferred: d
|
476
|
+
}), 10);
|
477
|
+
return d.promise;
|
478
|
+
}
|
479
|
+
};
|
480
|
+
/** @private
|
481
|
+
* @param {Object} ctx
|
482
|
+
* @return {Promise.<*>} Promise of plugin object
|
483
|
+
*/
|
484
|
+
GridPlugin._onPluginRequested = function (ctx) {
|
485
|
+
let grid = ctx.grid;
|
486
|
+
if(!grid.getElement()) {
|
487
|
+
return ctx.deferred.reject("Grid has been disposed before the plugin is fully loaded: " + ctx.pluginRef);
|
488
|
+
}
|
489
|
+
|
490
|
+
let curPlugin = grid.getPlugin(ctx.pluginRef);
|
491
|
+
if(curPlugin) {
|
492
|
+
return ctx.deferred.resolve(curPlugin);
|
493
|
+
}
|
494
|
+
|
495
|
+
let beforeInitPerformed = false;
|
496
|
+
if(ctx.pluginRef.beforeInit) { // WARNING: beforeInit is usually performed before the actual loading
|
497
|
+
beforeInitPerformed = true;
|
498
|
+
ctx.pluginRef.beforeInit(grid.getElement(), ctx.config, true);
|
499
|
+
}
|
500
|
+
|
501
|
+
curPlugin = grid.loadPlugin(ctx.pluginRef, ctx.config);
|
502
|
+
if(!curPlugin) {
|
503
|
+
return ctx.deferred.reject("Unable to load required dependency: " + ctx.pluginRef);
|
504
|
+
}
|
505
|
+
|
506
|
+
if(!beforeInitPerformed && curPlugin.beforeInit) { // WARNING: beforeInit is usually performed before the actual loading
|
507
|
+
curPlugin.beforeInit(grid.getElement(), ctx.config);
|
508
|
+
}
|
509
|
+
if(curPlugin.setGridWrapper) {
|
510
|
+
if(ctx.compositeGrid) {
|
511
|
+
curPlugin.setGridWrapper("compositegrid", ctx.compositeGrid);
|
512
|
+
} else if(ctx.realTimeGrid) {
|
513
|
+
curPlugin.setGridWrapper("realtimegrid", ctx.realTimeGrid);
|
514
|
+
}
|
515
|
+
}
|
516
|
+
if(curPlugin.afterInit) {
|
517
|
+
curPlugin.afterInit();
|
518
|
+
}
|
519
|
+
return ctx.deferred.resolve(curPlugin);
|
520
|
+
};
|
521
|
+
/** @protected
|
522
|
+
* @ignore
|
523
|
+
* @param {string} pluginName
|
524
|
+
* @param {tr.Grid=} grid
|
525
|
+
* @return {*}
|
526
|
+
*/
|
527
|
+
GridPlugin.prototype._getPlugin = function(pluginName, grid) {
|
528
|
+
if(grid == null) {
|
529
|
+
grid = this._hosts[0];
|
530
|
+
}
|
531
|
+
return (grid) ? grid.getPlugin(pluginName) : null;
|
532
|
+
};
|
533
|
+
|
534
|
+
/** @protected
|
535
|
+
* @ignore
|
536
|
+
* @param {number} colIndex
|
537
|
+
* @param {tr.Grid=} grid
|
538
|
+
* @return {Object}
|
539
|
+
*/
|
540
|
+
GridPlugin.prototype._getColumnData = function(colIndex, grid) {
|
541
|
+
if(grid == null) {
|
542
|
+
grid = this._hosts[0];
|
543
|
+
}
|
544
|
+
return grid ? grid.getColumnData(colIndex) : null;
|
545
|
+
};
|
546
|
+
/** @protected
|
547
|
+
* @ignore
|
548
|
+
* @param {number} colIndex
|
549
|
+
* @param {string} prop
|
550
|
+
* @param {tr.Grid=} grid
|
551
|
+
* @return {*}
|
552
|
+
*/
|
553
|
+
GridPlugin.prototype._getColumnOption = function(colIndex, prop, grid) {
|
554
|
+
let colData = this._getColumnData(colIndex, grid);
|
555
|
+
if(colData) {
|
556
|
+
return colData[prop];
|
557
|
+
}
|
558
|
+
return null;
|
559
|
+
};
|
560
|
+
/** @protected
|
561
|
+
* @ignore
|
562
|
+
* @param {number} colIndex
|
563
|
+
* @param {tr.Grid=} grid
|
564
|
+
* @return {!Object}
|
565
|
+
*/
|
566
|
+
GridPlugin.prototype._newColumnData = function(colIndex, grid) {
|
567
|
+
if(grid == null) {
|
568
|
+
grid = this._hosts[0];
|
569
|
+
}
|
570
|
+
if(!grid) {
|
571
|
+
return {};
|
572
|
+
}
|
573
|
+
|
574
|
+
let colData = grid.getColumnData(colIndex);
|
575
|
+
if(!colData) {
|
576
|
+
colData = grid.setColumnData(colIndex, {});
|
577
|
+
}
|
578
|
+
return colData;
|
579
|
+
};
|
580
|
+
/** @protected
|
581
|
+
* @ignore
|
582
|
+
* @param {number} colIndex
|
583
|
+
* @return {string}
|
584
|
+
*/
|
585
|
+
GridPlugin.prototype._getField = function(colIndex) {
|
586
|
+
let gridInst = this._compositeGrid || this._realTimeGrid;
|
587
|
+
if (gridInst) {
|
588
|
+
return gridInst.getColumnField(colIndex);
|
589
|
+
}
|
590
|
+
return "";
|
591
|
+
};
|
592
|
+
/** Note that this method is quite misleading and not consistent with other API method. Please avoid using it. We will deprecate this in the future. <br>
|
593
|
+
* Use _rowGetter instead
|
594
|
+
* @protected
|
595
|
+
* @ignore
|
596
|
+
* @deprecated
|
597
|
+
* @param {Object} dvRowData { "a": 10, "c": 21 }
|
598
|
+
* @return {Object}
|
599
|
+
*/
|
600
|
+
GridPlugin.prototype._getRowData = function(dvRowData) {
|
601
|
+
if(this._realTimeGrid) {
|
602
|
+
if(dvRowData) {
|
603
|
+
return dvRowData["ROW_DEF"].getRowData();
|
604
|
+
}
|
605
|
+
}
|
606
|
+
return dvRowData;
|
607
|
+
};
|
608
|
+
/** @protected
|
609
|
+
* @ignore
|
610
|
+
* @param {tr.DataView} dv
|
611
|
+
* @param {number} rowIndex
|
612
|
+
* @return {Object} dvRowData
|
613
|
+
*/
|
614
|
+
GridPlugin.prototype._getRow = function(dv, rowIndex) {
|
615
|
+
return rowGetter(dv.getRowDataAt(rowIndex));
|
616
|
+
};
|
617
|
+
/** @protected
|
618
|
+
* @ignore
|
619
|
+
* @param {tr.DataView} dv
|
620
|
+
* @param {number} rowIndex
|
621
|
+
* @param {string} field
|
622
|
+
* @return {*}
|
623
|
+
*/
|
624
|
+
GridPlugin.prototype._getData = function(dv, rowIndex, field) {
|
625
|
+
let row = this._getRow(dv, rowIndex);
|
626
|
+
return row ? row[field] : undefined; // eslint-disable-line
|
627
|
+
};
|
628
|
+
/** @protected
|
629
|
+
* @ignore
|
630
|
+
* @param {tr.DataView|tr.DataTable} dv
|
631
|
+
* @param {number|string} rowRef Row index or row id
|
632
|
+
* @param {string} field
|
633
|
+
* @param {*} val
|
634
|
+
*/
|
635
|
+
GridPlugin.prototype._setData = function(dv, rowRef, field, val) {
|
636
|
+
if(this._realTimeGrid) {
|
637
|
+
let rowDef = _toRowDef(dv, rowRef);
|
638
|
+
if(rowDef) {
|
639
|
+
rowDef.setData(field, val);
|
640
|
+
}
|
641
|
+
} else {
|
642
|
+
if(typeof rowRef === "number") {
|
643
|
+
dv.setDataAt(rowRef, field, val);
|
644
|
+
} else {
|
645
|
+
dv.setData(rowRef, field, val);
|
646
|
+
}
|
647
|
+
}
|
648
|
+
};
|
649
|
+
/** @protected
|
650
|
+
* @ignore
|
651
|
+
* @param {tr.DataView|tr.DataTable} dv
|
652
|
+
* @param {number|string} rowRef Row index or row id
|
653
|
+
* @param {Object} rowData
|
654
|
+
*/
|
655
|
+
GridPlugin.prototype._setRowData = function(dv, rowRef, rowData) {
|
656
|
+
if(this._realTimeGrid) {
|
657
|
+
let rowDef = _toRowDef(dv, rowRef);
|
658
|
+
if(rowDef) {
|
659
|
+
rowDef.setRowData(rowData);
|
660
|
+
}
|
661
|
+
} else {
|
662
|
+
if(typeof rowRef === "number") {
|
663
|
+
dv.setRowDataAt(rowRef, rowData);
|
664
|
+
} else {
|
665
|
+
dv.setRowData(rowRef, rowData);
|
666
|
+
}
|
667
|
+
}
|
668
|
+
};
|
669
|
+
/** @protected
|
670
|
+
* @ignore
|
671
|
+
* @param {tr.DataView|tr.DataTable} dv
|
672
|
+
* @param {number|string} rowRef Row index or row id
|
673
|
+
* @param {string} field
|
674
|
+
* @param {*} value
|
675
|
+
*/
|
676
|
+
GridPlugin.prototype._setStaticData = function(dv, rowRef, field, value) {
|
677
|
+
if(this._realTimeGrid) {
|
678
|
+
let rowDef = _toRowDef(dv, rowRef);
|
679
|
+
if(rowDef) {
|
680
|
+
rowDef.setStaticData(field, value);
|
681
|
+
}
|
682
|
+
} else {
|
683
|
+
// TODO: composite grid should be has staticValues when get configObject, wait for request feature
|
684
|
+
this._setData(dv, rowRef, field, value);
|
685
|
+
}
|
686
|
+
};
|
687
|
+
|
688
|
+
/** Set data in a column manner. This is faster than repeatedly calling this._setData
|
689
|
+
* @protected
|
690
|
+
* @ignore
|
691
|
+
* @param {tr.DataView|tr.DataTable} dv
|
692
|
+
* @param {string} cid
|
693
|
+
* @param {*} valueList
|
694
|
+
* @param {Array.<string>=} ridList Specify row id to be set corresponding to the data item
|
695
|
+
* @example
|
696
|
+
* this._setColumnData(dv, "column 1", ["data1", "data2", "data3"]);
|
697
|
+
* this._setColumnData(dv, "column 1", 10, ["rowId1", "rowId2]);
|
698
|
+
*/
|
699
|
+
GridPlugin.prototype._setColumnData = function (dv, cid, valueList, ridList) { // Data changed event may be dispatched
|
700
|
+
if(!cid) {
|
701
|
+
return;
|
702
|
+
}
|
703
|
+
|
704
|
+
let rids = Array.isArray(ridList) ? ridList : dv.getAllRowIds(true);
|
705
|
+
let rowCount = rids ? rids.length : 0;
|
706
|
+
if(!rowCount) {
|
707
|
+
return;
|
708
|
+
}
|
709
|
+
if(rowCount === 1) {
|
710
|
+
this._setData(
|
711
|
+
dv,
|
712
|
+
rids[0],
|
713
|
+
cid,
|
714
|
+
Array.isArray(valueList) ? valueList[0] : valueList
|
715
|
+
);
|
716
|
+
return;
|
717
|
+
}
|
718
|
+
let vals = Array.isArray(valueList) ? valueList : rids.map(function() { return valueList; });
|
719
|
+
|
720
|
+
if(this._realTimeGrid) {
|
721
|
+
for(let i = 0; i < rowCount; ++i) {
|
722
|
+
let dvRowData = dv.getRowData(rids[i]);
|
723
|
+
if(dvRowData) {
|
724
|
+
let rowDef = dvRowData["ROW_DEF"];
|
725
|
+
|
726
|
+
if(rowDef){
|
727
|
+
// WARNING: This does not trigger dataChanged and dataComposed on the DataCache
|
728
|
+
rowDef.getRowData()[cid] = vals[i];
|
729
|
+
}
|
730
|
+
}
|
731
|
+
}
|
732
|
+
if(!dv.dispatchGlobalChange) {
|
733
|
+
dv = dv.getDataSource(); // Get DataTable
|
734
|
+
}
|
735
|
+
// Force rendering by dispatching global change
|
736
|
+
if(dv && dv.dispatchGlobalChange) {
|
737
|
+
dv.dispatchGlobalChange();
|
738
|
+
}
|
739
|
+
} else {
|
740
|
+
dv.setColumnData(cid, vals, rids);
|
741
|
+
}
|
742
|
+
};
|
743
|
+
|
744
|
+
/** @protected
|
745
|
+
* @ignore
|
746
|
+
* @param {number} colIndex
|
747
|
+
* @param {string=} id
|
748
|
+
* @param {Function=} renderer
|
749
|
+
*/
|
750
|
+
GridPlugin.prototype._activateColumnRenderer = function(colIndex, id, renderer) {
|
751
|
+
// TODO: Support multiple Grids
|
752
|
+
if (colIndex == null) {
|
753
|
+
return;
|
754
|
+
}
|
755
|
+
|
756
|
+
let rtGrid = this._realTimeGrid;
|
757
|
+
if (rtGrid) {
|
758
|
+
rtGrid.activateColumnRenderer(colIndex, id, renderer);
|
759
|
+
} else {
|
760
|
+
if (typeof renderer === "function") {
|
761
|
+
this._hosts[0].setColumnDataBindingHandler(colIndex, renderer);
|
762
|
+
} else {
|
763
|
+
this._hosts[0].setColumnDataBindingHandler(colIndex, null);
|
764
|
+
}
|
765
|
+
}
|
766
|
+
};
|
767
|
+
|
768
|
+
/** @private
|
769
|
+
* @function
|
770
|
+
*/
|
771
|
+
let _emptyFunc = function(){};
|
772
|
+
/** @private
|
773
|
+
* @type {Object.<string, number>}
|
774
|
+
* @constant
|
775
|
+
*/
|
776
|
+
let KEY_MAP = {
|
777
|
+
"left": 37,
|
778
|
+
"right": 39,
|
779
|
+
"up": 38,
|
780
|
+
"down": 40,
|
781
|
+
"backspace": 8,
|
782
|
+
"tab": 9,
|
783
|
+
"enter": 13,
|
784
|
+
"esc": 27,
|
785
|
+
"escape": 27,
|
786
|
+
"space": 32,
|
787
|
+
"pageup": 33,
|
788
|
+
"pagedown": 34,
|
789
|
+
"del": 46,
|
790
|
+
"delete": 46
|
791
|
+
};
|
792
|
+
/** @public
|
793
|
+
* @ignore
|
794
|
+
* @param {number=} colIndex
|
795
|
+
* @param {number=} rowIndex
|
796
|
+
* @param {Object=} context
|
797
|
+
* @return {!Object}
|
798
|
+
*/
|
799
|
+
GridPlugin.prototype._mockMouseEvent = function(colIndex, rowIndex, context) {
|
800
|
+
if (colIndex == null) {
|
801
|
+
colIndex = 0;
|
802
|
+
}
|
803
|
+
|
804
|
+
if (rowIndex == null) {
|
805
|
+
rowIndex = 0;
|
806
|
+
}
|
807
|
+
|
808
|
+
let evt = context ? context : {};
|
809
|
+
evt.preventDefault = _emptyFunc;
|
810
|
+
evt.stopPropagation = _emptyFunc;
|
811
|
+
|
812
|
+
if (colIndex >= 0 && rowIndex >= 0) {
|
813
|
+
let grid = this._activeGrid || this._hosts[0];
|
814
|
+
let cell = grid ? grid.getCell(evt.sectionType || "content", colIndex, rowIndex) : null;
|
815
|
+
evt.target = cell ? cell.getElement() : null;
|
816
|
+
}
|
817
|
+
|
818
|
+
return evt;
|
819
|
+
};
|
820
|
+
/** @public
|
821
|
+
* @ignore
|
822
|
+
* @param {number|string} keyCode
|
823
|
+
* @param {Object=} context
|
824
|
+
* @return {!Object}
|
825
|
+
*/
|
826
|
+
GridPlugin.prototype._mockKeyboardEvent = function(keyCode, context) {
|
827
|
+
let evt = context ? context : {};
|
828
|
+
evt.preventDefault = _emptyFunc;
|
829
|
+
evt.stopPropagation = _emptyFunc;
|
830
|
+
|
831
|
+
if (typeof keyCode === "string") {
|
832
|
+
let predefinedCode = KEY_MAP[keyCode.toLowerCase()] || 0;
|
833
|
+
keyCode = predefinedCode ? predefinedCode : keyCode.charCodeAt(0);
|
834
|
+
}
|
835
|
+
evt.keyCode = keyCode;
|
836
|
+
|
837
|
+
return evt;
|
838
|
+
};
|
839
|
+
|
840
|
+
/** @type {Object}
|
841
|
+
* @private
|
842
|
+
*/
|
843
|
+
GridPlugin._staticStyles = {};
|
844
|
+
|
845
|
+
/** @type {Object}
|
846
|
+
* @private
|
847
|
+
*/
|
848
|
+
GridPlugin._themeLoaders = {};
|
849
|
+
|
850
|
+
/** @private
|
851
|
+
* @param {Function} styleCalculator
|
852
|
+
* @param {Object} colors
|
853
|
+
*/
|
854
|
+
GridPlugin._themeLoadSuccess = function(styleCalculator, colors) {
|
855
|
+
let extName = this.getName();
|
856
|
+
let styles = GridPlugin._staticStyles[extName] = styleCalculator(colors);
|
857
|
+
this.applyStyles(styles, extName);
|
858
|
+
};
|
859
|
+
|
860
|
+
/** @public
|
861
|
+
* @param {Function} styleCalculator
|
862
|
+
*/
|
863
|
+
GridPlugin.prototype.applyStaticStyles = function(styleCalculator) {
|
864
|
+
let extName = this.getName();
|
865
|
+
let styles = GridPlugin._staticStyles[extName];
|
866
|
+
if (!styles) {
|
867
|
+
if (styleCalculator) {
|
868
|
+
if (!GridPlugin._themeLoaders[extName]) {
|
869
|
+
GridPlugin._themeLoaders[extName] = ElfUtil.getThemeColors();
|
870
|
+
}
|
871
|
+
GridPlugin._themeLoaders[extName]
|
872
|
+
.then(GridPlugin._themeLoadSuccess.bind(this, styleCalculator));
|
873
|
+
}
|
874
|
+
} else {
|
875
|
+
this.applyStyles(styles, extName);
|
876
|
+
}
|
877
|
+
};
|
878
|
+
|
879
|
+
/** @public
|
880
|
+
* @param {string} cssString
|
881
|
+
* @param {string=} nameSpace
|
882
|
+
* @param {boolean=} replaceable This allows the injected CSS to be replaceable (removable)
|
883
|
+
*/
|
884
|
+
GridPlugin.prototype.applyStyles = function(cssString, nameSpace, replaceable) {
|
885
|
+
if (!nameSpace) {
|
886
|
+
nameSpace = this.getName();
|
887
|
+
}
|
888
|
+
|
889
|
+
let intNameSpace = "_style" + nameSpace;
|
890
|
+
|
891
|
+
let hosts = this._hosts;
|
892
|
+
let len = hosts.length;
|
893
|
+
if (!len) {
|
894
|
+
return;
|
895
|
+
}
|
896
|
+
|
897
|
+
let i, host;
|
898
|
+
if (!replaceable) {
|
899
|
+
for (i = 0; i < len; i++) {
|
900
|
+
host = hosts[i];
|
901
|
+
if (!host[intNameSpace]) {
|
902
|
+
injectCss(cssString, host.getElement());
|
903
|
+
host[intNameSpace] = true;
|
904
|
+
}
|
905
|
+
}
|
906
|
+
} else {
|
907
|
+
for (i = 0; i < len; i++) {
|
908
|
+
host = hosts[i];
|
909
|
+
this.revokeStyles(host, nameSpace);
|
910
|
+
host[intNameSpace] = injectCss(cssString, host.getElement());
|
911
|
+
}
|
912
|
+
}
|
913
|
+
};
|
914
|
+
|
915
|
+
/** @public
|
916
|
+
* @param {Object} host
|
917
|
+
* @param {string} nameSpace
|
918
|
+
*/
|
919
|
+
GridPlugin.prototype.revokeStyles = function(host, nameSpace) {
|
920
|
+
if (!host || !nameSpace) {
|
921
|
+
return;
|
922
|
+
}
|
923
|
+
|
924
|
+
nameSpace = "_style" + nameSpace;
|
925
|
+
let styleTag = host[nameSpace];
|
926
|
+
if (styleTag && styleTag.nodeType === 1) {
|
927
|
+
styleTag.parentNode.removeChild(styleTag);
|
928
|
+
host[nameSpace] = null;
|
929
|
+
}
|
930
|
+
};
|
931
|
+
|
932
|
+
/** Export the plugin to the given object by attaching it to tr and tr.grid namespaces
|
933
|
+
* @public
|
934
|
+
* @function
|
935
|
+
* @param {Window|Object} winObj
|
936
|
+
* @param {GridPlugin} plugin
|
937
|
+
* @example
|
938
|
+
* import {exportExtension} from "../node_modules/tr-grid-util/src/GridPlugin.js";
|
939
|
+
* import {SomePlugin} from "./js/SomePlugin.js";
|
940
|
+
* exportExtension(window, SomePlugin);
|
941
|
+
* console.log(tr.grid.SomePlugin); // tr.grid.SomePlugin is added to window scope
|
942
|
+
* console.log(tr.SomeExtension); // tr.SomeExtension is added to window scope
|
943
|
+
*/
|
944
|
+
let exportExtension = function(winObj, plugin) {
|
945
|
+
if(!winObj || !plugin) { return; }
|
946
|
+
if(!plugin.prototype["getName"]) { return; }
|
947
|
+
let pluginName = plugin.prototype["getName"]().replace(/Plugin$/, "");
|
948
|
+
if(!pluginName) { return; }
|
949
|
+
|
950
|
+
let trNamespace = winObj["tr"]; // For supporting composite grid extension scheme
|
951
|
+
if(!trNamespace) {
|
952
|
+
trNamespace = winObj["tr"] = {};
|
953
|
+
}
|
954
|
+
let gridNamespace = trNamespace["grid"]; // For supporting grid plugin scheme
|
955
|
+
if(!gridNamespace) {
|
956
|
+
gridNamespace = trNamespace["grid"] = {};
|
957
|
+
}
|
958
|
+
|
959
|
+
gridNamespace[pluginName + "Plugin"] = plugin;
|
960
|
+
trNamespace[pluginName + "Extension"] = plugin;
|
961
|
+
};
|
962
|
+
|
963
|
+
/** @private
|
964
|
+
* @function
|
965
|
+
* @param {tr.DataView|tr.DataTable} dv
|
966
|
+
* @param {number|string} rowRef Row index or row id
|
967
|
+
* @return {*} RowDefinition instance
|
968
|
+
*/
|
969
|
+
let _toRowDef = function(dv, rowRef) {
|
970
|
+
let dvRowData = (typeof rowRef === "number") ? dv.getRowDataAt(rowRef) : dv.getRowData(rowRef);
|
971
|
+
if(dvRowData) {
|
972
|
+
return dvRowData["ROW_DEF"] || null;
|
973
|
+
}
|
974
|
+
return null;
|
975
|
+
};
|
976
|
+
|
977
|
+
/** @public
|
978
|
+
* @function
|
979
|
+
* @param {string} field
|
980
|
+
* @param {Object} dvRowData Row data from tr.DataView
|
981
|
+
* @return {*} Data value returned from the specified row and field
|
982
|
+
*/
|
983
|
+
let defaultDataGetter = function (field, dvRowData) {
|
984
|
+
return dvRowData[field];
|
985
|
+
};
|
986
|
+
/** @public
|
987
|
+
* @function
|
988
|
+
* @param {string} field
|
989
|
+
* @param {Object} dvRowData Row data from tr.DataView
|
990
|
+
* @return {*} Data value returned from the specified row and field
|
991
|
+
*/
|
992
|
+
let rowDefDataGetter = function (field, dvRowData) {
|
993
|
+
let rowData = dvRowData["ROW_DEF"].getRowData();
|
994
|
+
return (rowData) ? rowData[field] : null;
|
995
|
+
};
|
996
|
+
/** @public
|
997
|
+
* @function
|
998
|
+
* @param {Object} dvRowData
|
999
|
+
* @return {Object} Row data Nothing is changed
|
1000
|
+
*/
|
1001
|
+
let defaultRowGetter = function (dvRowData) {
|
1002
|
+
return dvRowData;
|
1003
|
+
};
|
1004
|
+
/** @public
|
1005
|
+
* @function
|
1006
|
+
* @param {Object} dvRowData Row data from tr.DataView
|
1007
|
+
* @return {Object} Row data
|
1008
|
+
*/
|
1009
|
+
let rowDefRowGetter = function (dvRowData) {
|
1010
|
+
return dvRowData ? dvRowData["ROW_DEF"].getRowData() : null;
|
1011
|
+
};
|
1012
|
+
/** This is slower version of row getter. It is intended for ease of use.
|
1013
|
+
* @public
|
1014
|
+
* @function
|
1015
|
+
* @param {Object} dvRowData Row data from tr.DataView
|
1016
|
+
* @return {Object} Row data
|
1017
|
+
*/
|
1018
|
+
let rowGetter = function (dvRowData) {
|
1019
|
+
if(dvRowData) {
|
1020
|
+
let rowDef = dvRowData["ROW_DEF"];
|
1021
|
+
return rowDef ? rowDef.getRowData() : dvRowData;
|
1022
|
+
}
|
1023
|
+
return null;
|
1024
|
+
};
|
1025
|
+
|
1026
|
+
/** @public
|
1027
|
+
* @function
|
1028
|
+
* @param {string} field
|
1029
|
+
* @param {tr.DataTable} dt
|
1030
|
+
* @return {!Array.<Object>} Array of row data
|
1031
|
+
*/
|
1032
|
+
let colDataGetter = function(field, dt) {
|
1033
|
+
let rowDefs = dt.getAllRowData();
|
1034
|
+
let rowCount = rowDefs.length;
|
1035
|
+
let rows = new Array(rowCount);
|
1036
|
+
for(let i = 0; i < rowCount; ++i) { // WARNING: No data checking
|
1037
|
+
rows[i] = rowDefDataGetter(field, rowDefs[i]);
|
1038
|
+
}
|
1039
|
+
return rows;
|
1040
|
+
};
|
1041
|
+
|
1042
|
+
export default GridPlugin;
|
1043
|
+
export {
|
1044
|
+
GridPlugin,
|
1045
|
+
exportExtension,
|
1046
|
+
|
1047
|
+
defaultDataGetter,
|
1048
|
+
rowDefDataGetter,
|
1049
|
+
|
1050
|
+
defaultRowGetter,
|
1051
|
+
rowDefRowGetter,
|
1052
|
+
rowGetter,
|
1053
|
+
|
1054
|
+
colDataGetter
|
1055
|
+
};
|