@refinitiv-ui/efx-grid 6.0.0-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +17 -0
- package/README.md +61 -0
- package/lib/column-format-dialog/index.d.ts +1 -0
- package/lib/column-format-dialog/index.js +1 -0
- package/lib/column-format-dialog/lib/column-format-dialog.d.ts +64 -0
- package/lib/column-format-dialog/lib/column-format-dialog.js +2713 -0
- package/lib/column-format-dialog/lib/locale/translation-de.d.ts +7 -0
- package/lib/column-format-dialog/lib/locale/translation-de.js +94 -0
- package/lib/column-format-dialog/lib/locale/translation-en.d.ts +7 -0
- package/lib/column-format-dialog/lib/locale/translation-en.js +94 -0
- package/lib/column-format-dialog/lib/locale/translation-ja.d.ts +7 -0
- package/lib/column-format-dialog/lib/locale/translation-ja.js +94 -0
- package/lib/column-format-dialog/lib/locale/translation-zh-hant.d.ts +7 -0
- package/lib/column-format-dialog/lib/locale/translation-zh-hant.js +94 -0
- package/lib/column-format-dialog/lib/locale/translation-zh.d.ts +7 -0
- package/lib/column-format-dialog/lib/locale/translation-zh.js +94 -0
- package/lib/column-format-dialog/lib/locale/translation.d.ts +11 -0
- package/lib/column-format-dialog/lib/locale/translation.js +18 -0
- package/lib/column-format-dialog/lib/preview-table.d.ts +151 -0
- package/lib/column-format-dialog/lib/preview-table.js +995 -0
- package/lib/column-format-dialog/themes/base.less +429 -0
- package/lib/column-format-dialog/themes/elemental/column-format-dialog.less +1 -0
- package/lib/column-format-dialog/themes/elemental/dark/column-format-dialog.js +4 -0
- package/lib/column-format-dialog/themes/elemental/dark/css/native-elements.css +0 -0
- package/lib/column-format-dialog/themes/elemental/dark/es5/all-elements.js +2 -0
- package/lib/column-format-dialog/themes/elemental/dark/imports/all-elements.js +1 -0
- package/lib/column-format-dialog/themes/elemental/dark/imports/custom-elements.js +1 -0
- package/lib/column-format-dialog/themes/elemental/dark/imports/native-elements.js +0 -0
- package/lib/column-format-dialog/themes/elemental/dark.js +16 -0
- package/lib/column-format-dialog/themes/elemental/defaults.less +1 -0
- package/lib/column-format-dialog/themes/elemental/index.less +5 -0
- package/lib/column-format-dialog/themes/elemental/light/column-format-dialog.js +4 -0
- package/lib/column-format-dialog/themes/elemental/light/css/native-elements.css +0 -0
- package/lib/column-format-dialog/themes/elemental/light/es5/all-elements.js +2 -0
- package/lib/column-format-dialog/themes/elemental/light/imports/all-elements.js +1 -0
- package/lib/column-format-dialog/themes/elemental/light/imports/custom-elements.js +1 -0
- package/lib/column-format-dialog/themes/elemental/light/imports/native-elements.js +0 -0
- package/lib/column-format-dialog/themes/elemental/light.js +16 -0
- package/lib/column-format-dialog/themes/halo/column-format-dialog.less +6 -0
- package/lib/column-format-dialog/themes/halo/dark/column-format-dialog.js +4 -0
- package/lib/column-format-dialog/themes/halo/dark/css/native-elements.css +0 -0
- package/lib/column-format-dialog/themes/halo/dark/es5/all-elements.js +2 -0
- package/lib/column-format-dialog/themes/halo/dark/imports/all-elements.js +1 -0
- package/lib/column-format-dialog/themes/halo/dark/imports/custom-elements.js +1 -0
- package/lib/column-format-dialog/themes/halo/dark/imports/native-elements.js +0 -0
- package/lib/column-format-dialog/themes/halo/dark.js +16 -0
- package/lib/column-format-dialog/themes/halo/defaults.less +1 -0
- package/lib/column-format-dialog/themes/halo/index.less +5 -0
- package/lib/column-format-dialog/themes/halo/light/column-format-dialog.js +4 -0
- package/lib/column-format-dialog/themes/halo/light/css/native-elements.css +0 -0
- package/lib/column-format-dialog/themes/halo/light/es5/all-elements.js +2 -0
- package/lib/column-format-dialog/themes/halo/light/imports/all-elements.js +1 -0
- package/lib/column-format-dialog/themes/halo/light/imports/custom-elements.js +1 -0
- package/lib/column-format-dialog/themes/halo/light/imports/native-elements.js +0 -0
- package/lib/column-format-dialog/themes/halo/light.js +16 -0
- package/lib/column-format-dialog/themes/luna/column-format-dialog.less +1 -0
- package/lib/column-format-dialog/themes/luna/default/column-format-dialog.js +4 -0
- package/lib/column-format-dialog/themes/luna/default/css/native-elements.css +0 -0
- package/lib/column-format-dialog/themes/luna/default/es5/all-elements.js +2 -0
- package/lib/column-format-dialog/themes/luna/default/imports/all-elements.js +1 -0
- package/lib/column-format-dialog/themes/luna/default/imports/custom-elements.js +1 -0
- package/lib/column-format-dialog/themes/luna/default/imports/native-elements.js +0 -0
- package/lib/column-format-dialog/themes/luna/defaults.less +1 -0
- package/lib/column-format-dialog/themes/luna/index.less +5 -0
- package/lib/column-format-dialog/themes/solar/charcoal/column-format-dialog.js +4 -0
- package/lib/column-format-dialog/themes/solar/charcoal/css/native-elements.css +0 -0
- package/lib/column-format-dialog/themes/solar/charcoal/es5/all-elements.js +2 -0
- package/lib/column-format-dialog/themes/solar/charcoal/imports/all-elements.js +1 -0
- package/lib/column-format-dialog/themes/solar/charcoal/imports/custom-elements.js +1 -0
- package/lib/column-format-dialog/themes/solar/charcoal/imports/native-elements.js +0 -0
- package/lib/column-format-dialog/themes/solar/charcoal.js +16 -0
- package/lib/column-format-dialog/themes/solar/column-format-dialog.less +6 -0
- package/lib/column-format-dialog/themes/solar/defaults.less +1 -0
- package/lib/column-format-dialog/themes/solar/index.less +5 -0
- package/lib/column-format-dialog/themes/solar/pearl/column-format-dialog.js +4 -0
- package/lib/column-format-dialog/themes/solar/pearl/css/native-elements.css +0 -0
- package/lib/column-format-dialog/themes/solar/pearl/es5/all-elements.js +2 -0
- package/lib/column-format-dialog/themes/solar/pearl/imports/all-elements.js +1 -0
- package/lib/column-format-dialog/themes/solar/pearl/imports/custom-elements.js +1 -0
- package/lib/column-format-dialog/themes/solar/pearl/imports/native-elements.js +0 -0
- package/lib/column-format-dialog/themes/solar/pearl.js +16 -0
- package/lib/column-selection-dialog/index.d.ts +1 -0
- package/lib/column-selection-dialog/index.js +1 -0
- package/lib/column-selection-dialog/lib/column-selection-dialog.d.ts +41 -0
- package/lib/column-selection-dialog/lib/column-selection-dialog.js +1410 -0
- package/lib/column-selection-dialog/lib/locale/translation-de.d.ts +7 -0
- package/lib/column-selection-dialog/lib/locale/translation-de.js +19 -0
- package/lib/column-selection-dialog/lib/locale/translation-en.d.ts +7 -0
- package/lib/column-selection-dialog/lib/locale/translation-en.js +19 -0
- package/lib/column-selection-dialog/lib/locale/translation-ja.d.ts +7 -0
- package/lib/column-selection-dialog/lib/locale/translation-ja.js +19 -0
- package/lib/column-selection-dialog/lib/locale/translation-zh-hant.d.ts +7 -0
- package/lib/column-selection-dialog/lib/locale/translation-zh-hant.js +19 -0
- package/lib/column-selection-dialog/lib/locale/translation-zh.d.ts +7 -0
- package/lib/column-selection-dialog/lib/locale/translation-zh.js +19 -0
- package/lib/column-selection-dialog/lib/locale/translation.d.ts +11 -0
- package/lib/column-selection-dialog/lib/locale/translation.js +18 -0
- package/lib/column-selection-dialog/themes/base.less +189 -0
- package/lib/column-selection-dialog/themes/elemental/column-selection-dialog.less +1 -0
- package/lib/column-selection-dialog/themes/elemental/dark/column-selection-dialog.js +4 -0
- package/lib/column-selection-dialog/themes/elemental/dark/css/native-elements.css +0 -0
- package/lib/column-selection-dialog/themes/elemental/dark/es5/all-elements.js +2 -0
- package/lib/column-selection-dialog/themes/elemental/dark/imports/all-elements.js +1 -0
- package/lib/column-selection-dialog/themes/elemental/dark/imports/custom-elements.js +1 -0
- package/lib/column-selection-dialog/themes/elemental/dark/imports/native-elements.js +0 -0
- package/lib/column-selection-dialog/themes/elemental/dark.js +6 -0
- package/lib/column-selection-dialog/themes/elemental/defaults.less +1 -0
- package/lib/column-selection-dialog/themes/elemental/index.less +5 -0
- package/lib/column-selection-dialog/themes/elemental/light/column-selection-dialog.js +4 -0
- package/lib/column-selection-dialog/themes/elemental/light/css/native-elements.css +0 -0
- package/lib/column-selection-dialog/themes/elemental/light/es5/all-elements.js +2 -0
- package/lib/column-selection-dialog/themes/elemental/light/imports/all-elements.js +1 -0
- package/lib/column-selection-dialog/themes/elemental/light/imports/custom-elements.js +1 -0
- package/lib/column-selection-dialog/themes/elemental/light/imports/native-elements.js +0 -0
- package/lib/column-selection-dialog/themes/elemental/light.js +6 -0
- package/lib/column-selection-dialog/themes/halo/column-selection-dialog.less +22 -0
- package/lib/column-selection-dialog/themes/halo/dark/column-selection-dialog.js +4 -0
- package/lib/column-selection-dialog/themes/halo/dark/css/native-elements.css +0 -0
- package/lib/column-selection-dialog/themes/halo/dark/es5/all-elements.js +2 -0
- package/lib/column-selection-dialog/themes/halo/dark/imports/all-elements.js +1 -0
- package/lib/column-selection-dialog/themes/halo/dark/imports/custom-elements.js +1 -0
- package/lib/column-selection-dialog/themes/halo/dark/imports/native-elements.js +0 -0
- package/lib/column-selection-dialog/themes/halo/dark.js +6 -0
- package/lib/column-selection-dialog/themes/halo/defaults.less +1 -0
- package/lib/column-selection-dialog/themes/halo/index.less +6 -0
- package/lib/column-selection-dialog/themes/halo/light/column-selection-dialog.js +4 -0
- package/lib/column-selection-dialog/themes/halo/light/css/native-elements.css +0 -0
- package/lib/column-selection-dialog/themes/halo/light/es5/all-elements.js +2 -0
- package/lib/column-selection-dialog/themes/halo/light/imports/all-elements.js +1 -0
- package/lib/column-selection-dialog/themes/halo/light/imports/custom-elements.js +1 -0
- package/lib/column-selection-dialog/themes/halo/light/imports/native-elements.js +0 -0
- package/lib/column-selection-dialog/themes/halo/light.js +6 -0
- package/lib/column-selection-dialog/themes/solar/charcoal/column-selection-dialog.js +4 -0
- package/lib/column-selection-dialog/themes/solar/charcoal/css/native-elements.css +0 -0
- package/lib/column-selection-dialog/themes/solar/charcoal/es5/all-elements.js +2 -0
- package/lib/column-selection-dialog/themes/solar/charcoal/imports/all-elements.js +1 -0
- package/lib/column-selection-dialog/themes/solar/charcoal/imports/custom-elements.js +1 -0
- package/lib/column-selection-dialog/themes/solar/charcoal/imports/native-elements.js +0 -0
- package/lib/column-selection-dialog/themes/solar/charcoal.js +6 -0
- package/lib/column-selection-dialog/themes/solar/column-selection-dialog.less +1 -0
- package/lib/column-selection-dialog/themes/solar/defaults.less +1 -0
- package/lib/column-selection-dialog/themes/solar/index.less +6 -0
- package/lib/column-selection-dialog/themes/solar/pearl/column-selection-dialog.js +4 -0
- package/lib/column-selection-dialog/themes/solar/pearl/css/native-elements.css +0 -0
- package/lib/column-selection-dialog/themes/solar/pearl/es5/all-elements.js +2 -0
- package/lib/column-selection-dialog/themes/solar/pearl/imports/all-elements.js +1 -0
- package/lib/column-selection-dialog/themes/solar/pearl/imports/custom-elements.js +1 -0
- package/lib/column-selection-dialog/themes/solar/pearl/imports/native-elements.js +0 -0
- package/lib/column-selection-dialog/themes/solar/pearl.js +6 -0
- package/lib/core/dist/core.css +1 -0
- package/lib/core/dist/core.js +28075 -0
- package/lib/core/dist/core.min.js +1 -0
- package/lib/core/es6/data/ColumnStats.d.ts +42 -0
- package/lib/core/es6/data/ColumnStats.js +428 -0
- package/lib/core/es6/data/DataCache.d.ts +81 -0
- package/lib/core/es6/data/DataCache.js +1317 -0
- package/lib/core/es6/data/DataTable.d.ts +125 -0
- package/lib/core/es6/data/DataTable.js +1655 -0
- package/lib/core/es6/data/DataView.d.ts +280 -0
- package/lib/core/es6/data/DataView.js +3654 -0
- package/lib/core/es6/data/Segment.d.ts +38 -0
- package/lib/core/es6/data/Segment.js +193 -0
- package/lib/core/es6/data/SegmentCollection.d.ts +58 -0
- package/lib/core/es6/data/SegmentCollection.js +431 -0
- package/lib/core/es6/grid/Core.d.ts +387 -0
- package/lib/core/es6/grid/Core.js +4939 -0
- package/lib/core/es6/grid/ILayoutGrid.d.ts +204 -0
- package/lib/core/es6/grid/ILayoutGrid.js +658 -0
- package/lib/core/es6/grid/LayoutGrid.d.ts +23 -0
- package/lib/core/es6/grid/LayoutGrid.js +2602 -0
- package/lib/core/es6/grid/VirtualizedLayoutGrid.d.ts +18 -0
- package/lib/core/es6/grid/VirtualizedLayoutGrid.js +907 -0
- package/lib/core/es6/grid/components/Cell.d.ts +50 -0
- package/lib/core/es6/grid/components/Cell.js +740 -0
- package/lib/core/es6/grid/components/CellFloatingPanel.d.ts +19 -0
- package/lib/core/es6/grid/components/CellFloatingPanel.js +123 -0
- package/lib/core/es6/grid/components/CellSpan.d.ts +18 -0
- package/lib/core/es6/grid/components/CellSpan.js +99 -0
- package/lib/core/es6/grid/components/CellSpans.d.ts +38 -0
- package/lib/core/es6/grid/components/CellSpans.js +341 -0
- package/lib/core/es6/grid/components/Column.d.ts +22 -0
- package/lib/core/es6/grid/components/Column.js +612 -0
- package/lib/core/es6/grid/components/ElementWrapper.d.ts +125 -0
- package/lib/core/es6/grid/components/ElementWrapper.js +714 -0
- package/lib/core/es6/grid/components/HScrollbar.d.ts +24 -0
- package/lib/core/es6/grid/components/HScrollbar.js +222 -0
- package/lib/core/es6/grid/components/Scrollbar.d.ts +61 -0
- package/lib/core/es6/grid/components/Scrollbar.js +1374 -0
- package/lib/core/es6/grid/components/StretchedCells.d.ts +17 -0
- package/lib/core/es6/grid/components/StretchedCells.js +328 -0
- package/lib/core/es6/grid/components/VScrollbar.d.ts +18 -0
- package/lib/core/es6/grid/components/VScrollbar.js +139 -0
- package/lib/core/es6/grid/components/VirtualItems.d.ts +12 -0
- package/lib/core/es6/grid/components/VirtualItems.js +51 -0
- package/lib/core/es6/grid/event/EventDispatcher.d.ts +16 -0
- package/lib/core/es6/grid/event/EventDispatcher.js +138 -0
- package/lib/core/es6/grid/event/EventListeners.d.ts +34 -0
- package/lib/core/es6/grid/event/EventListeners.js +163 -0
- package/lib/core/es6/grid/plugins/DragAndDropTitlePlugin.d.ts +24 -0
- package/lib/core/es6/grid/plugins/DragAndDropTitlePlugin.js +615 -0
- package/lib/core/es6/grid/plugins/Plugin.d.ts +28 -0
- package/lib/core/es6/grid/plugins/Plugin.js +272 -0
- package/lib/core/es6/grid/plugins/SortableTitlePlugin.d.ts +127 -0
- package/lib/core/es6/grid/plugins/SortableTitlePlugin.js +1707 -0
- package/lib/core/es6/grid/util/Conflator.d.ts +32 -0
- package/lib/core/es6/grid/util/Conflator.js +191 -0
- package/lib/core/es6/grid/util/ElementFrameWork.d.ts +18 -0
- package/lib/core/es6/grid/util/ElementFrameWork.js +227 -0
- package/lib/core/es6/grid/util/HttpRequest.d.ts +53 -0
- package/lib/core/es6/grid/util/HttpRequest.js +371 -0
- package/lib/core/es6/grid/util/PercentBar.d.ts +43 -0
- package/lib/core/es6/grid/util/PercentBar.js +390 -0
- package/lib/core/es6/grid/util/PercentBarRenderer.d.ts +41 -0
- package/lib/core/es6/grid/util/PercentBarRenderer.js +316 -0
- package/lib/core/es6/grid/util/RangeBar.d.ts +25 -0
- package/lib/core/es6/grid/util/RangeBar.js +255 -0
- package/lib/core/es6/grid/util/Reverter.d.ts +14 -0
- package/lib/core/es6/grid/util/Reverter.js +79 -0
- package/lib/core/es6/grid/util/SectionSettings.d.ts +79 -0
- package/lib/core/es6/grid/util/SectionSettings.js +674 -0
- package/lib/core/es6/grid/util/SelectionList.d.ts +50 -0
- package/lib/core/es6/grid/util/SelectionList.js +422 -0
- package/lib/core/es6/grid/util/TrackLayout.d.ts +84 -0
- package/lib/core/es6/grid/util/TrackLayout.js +850 -0
- package/lib/core/es6/grid/util/Virtualizer.d.ts +40 -0
- package/lib/core/es6/grid/util/Virtualizer.js +340 -0
- package/lib/core/es6/grid/util/util.d.ts +18 -0
- package/lib/core/es6/grid/util/util.js +450 -0
- package/lib/core/es6/index.d.ts +84 -0
- package/lib/core/es6/index.js +132 -0
- package/lib/core/es6/tr-grid-theme.d.ts +5 -0
- package/lib/core/es6/tr-grid-theme.js +5 -0
- package/lib/filter-dialog/index.d.ts +1 -0
- package/lib/filter-dialog/index.js +1 -0
- package/lib/filter-dialog/lib/checkbox-list.d.ts +27 -0
- package/lib/filter-dialog/lib/checkbox-list.js +336 -0
- package/lib/filter-dialog/lib/filter-dialog.d.ts +53 -0
- package/lib/filter-dialog/lib/filter-dialog.js +860 -0
- package/lib/filter-dialog/lib/locale/translation-de.d.ts +7 -0
- package/lib/filter-dialog/lib/locale/translation-de.js +37 -0
- package/lib/filter-dialog/lib/locale/translation-en.d.ts +7 -0
- package/lib/filter-dialog/lib/locale/translation-en.js +37 -0
- package/lib/filter-dialog/lib/locale/translation-ja.d.ts +7 -0
- package/lib/filter-dialog/lib/locale/translation-ja.js +37 -0
- package/lib/filter-dialog/lib/locale/translation-zh-hant.d.ts +7 -0
- package/lib/filter-dialog/lib/locale/translation-zh-hant.js +37 -0
- package/lib/filter-dialog/lib/locale/translation-zh.d.ts +7 -0
- package/lib/filter-dialog/lib/locale/translation-zh.js +37 -0
- package/lib/filter-dialog/lib/locale/translation.d.ts +11 -0
- package/lib/filter-dialog/lib/locale/translation.js +18 -0
- package/lib/filter-dialog/themes/base-checkbox.less +37 -0
- package/lib/filter-dialog/themes/base.less +102 -0
- package/lib/filter-dialog/themes/elemental/checkbox-list.less +3 -0
- package/lib/filter-dialog/themes/elemental/dark/checkbox-list.js +4 -0
- package/lib/filter-dialog/themes/elemental/dark/css/native-elements.css +0 -0
- package/lib/filter-dialog/themes/elemental/dark/es5/all-elements.js +4 -0
- package/lib/filter-dialog/themes/elemental/dark/filter-dialog.js +5 -0
- package/lib/filter-dialog/themes/elemental/dark/imports/all-elements.js +2 -0
- package/lib/filter-dialog/themes/elemental/dark/imports/custom-elements.js +2 -0
- package/lib/filter-dialog/themes/elemental/dark/imports/native-elements.js +0 -0
- package/lib/filter-dialog/themes/elemental/dark.js +11 -0
- package/lib/filter-dialog/themes/elemental/defaults.less +3 -0
- package/lib/filter-dialog/themes/elemental/filter-dialog.less +1 -0
- package/lib/filter-dialog/themes/elemental/index.less +6 -0
- package/lib/filter-dialog/themes/elemental/light/checkbox-list.js +4 -0
- package/lib/filter-dialog/themes/elemental/light/css/native-elements.css +0 -0
- package/lib/filter-dialog/themes/elemental/light/es5/all-elements.js +4 -0
- package/lib/filter-dialog/themes/elemental/light/filter-dialog.js +5 -0
- package/lib/filter-dialog/themes/elemental/light/imports/all-elements.js +2 -0
- package/lib/filter-dialog/themes/elemental/light/imports/custom-elements.js +2 -0
- package/lib/filter-dialog/themes/elemental/light/imports/native-elements.js +0 -0
- package/lib/filter-dialog/themes/elemental/light.js +11 -0
- package/lib/filter-dialog/themes/halo/checkbox-list.less +3 -0
- package/lib/filter-dialog/themes/halo/dark/checkbox-list.js +4 -0
- package/lib/filter-dialog/themes/halo/dark/css/native-elements.css +0 -0
- package/lib/filter-dialog/themes/halo/dark/es5/all-elements.js +4 -0
- package/lib/filter-dialog/themes/halo/dark/filter-dialog.js +5 -0
- package/lib/filter-dialog/themes/halo/dark/imports/all-elements.js +2 -0
- package/lib/filter-dialog/themes/halo/dark/imports/custom-elements.js +2 -0
- package/lib/filter-dialog/themes/halo/dark/imports/native-elements.js +0 -0
- package/lib/filter-dialog/themes/halo/dark.js +11 -0
- package/lib/filter-dialog/themes/halo/defaults.less +3 -0
- package/lib/filter-dialog/themes/halo/filter-dialog.less +9 -0
- package/lib/filter-dialog/themes/halo/index.less +6 -0
- package/lib/filter-dialog/themes/halo/light/checkbox-list.js +4 -0
- package/lib/filter-dialog/themes/halo/light/css/native-elements.css +0 -0
- package/lib/filter-dialog/themes/halo/light/es5/all-elements.js +4 -0
- package/lib/filter-dialog/themes/halo/light/filter-dialog.js +5 -0
- package/lib/filter-dialog/themes/halo/light/imports/all-elements.js +2 -0
- package/lib/filter-dialog/themes/halo/light/imports/custom-elements.js +2 -0
- package/lib/filter-dialog/themes/halo/light/imports/native-elements.js +0 -0
- package/lib/filter-dialog/themes/halo/light.js +11 -0
- package/lib/filter-dialog/themes/solar/charcoal/checkbox-list.js +4 -0
- package/lib/filter-dialog/themes/solar/charcoal/css/native-elements.css +0 -0
- package/lib/filter-dialog/themes/solar/charcoal/es5/all-elements.js +4 -0
- package/lib/filter-dialog/themes/solar/charcoal/filter-dialog.js +5 -0
- package/lib/filter-dialog/themes/solar/charcoal/imports/all-elements.js +2 -0
- package/lib/filter-dialog/themes/solar/charcoal/imports/custom-elements.js +2 -0
- package/lib/filter-dialog/themes/solar/charcoal/imports/native-elements.js +0 -0
- package/lib/filter-dialog/themes/solar/charcoal.js +11 -0
- package/lib/filter-dialog/themes/solar/checkbox-list.less +3 -0
- package/lib/filter-dialog/themes/solar/defaults.less +3 -0
- package/lib/filter-dialog/themes/solar/filter-dialog.less +5 -0
- package/lib/filter-dialog/themes/solar/index.less +6 -0
- package/lib/filter-dialog/themes/solar/pearl/checkbox-list.js +4 -0
- package/lib/filter-dialog/themes/solar/pearl/css/native-elements.css +0 -0
- package/lib/filter-dialog/themes/solar/pearl/es5/all-elements.js +4 -0
- package/lib/filter-dialog/themes/solar/pearl/filter-dialog.js +5 -0
- package/lib/filter-dialog/themes/solar/pearl/imports/all-elements.js +2 -0
- package/lib/filter-dialog/themes/solar/pearl/imports/custom-elements.js +2 -0
- package/lib/filter-dialog/themes/solar/pearl/imports/native-elements.js +0 -0
- package/lib/filter-dialog/themes/solar/pearl.js +11 -0
- package/lib/formatters/es6/CoralButtonFormatter.d.ts +22 -0
- package/lib/formatters/es6/CoralButtonFormatter.js +40 -0
- package/lib/formatters/es6/CoralCheckboxFormatter.d.ts +12 -0
- package/lib/formatters/es6/CoralCheckboxFormatter.js +45 -0
- package/lib/formatters/es6/CoralComboBoxFormatter.d.ts +23 -0
- package/lib/formatters/es6/CoralComboBoxFormatter.js +102 -0
- package/lib/formatters/es6/CoralIconFormatter.d.ts +23 -0
- package/lib/formatters/es6/CoralIconFormatter.js +45 -0
- package/lib/formatters/es6/CoralInputFormatter.d.ts +12 -0
- package/lib/formatters/es6/CoralInputFormatter.js +40 -0
- package/lib/formatters/es6/CoralRadioButtonFormatter.d.ts +22 -0
- package/lib/formatters/es6/CoralRadioButtonFormatter.js +80 -0
- package/lib/formatters/es6/CoralSelectFormatter.d.ts +23 -0
- package/lib/formatters/es6/CoralSelectFormatter.js +66 -0
- package/lib/formatters/es6/CoralToggleFormatter.d.ts +12 -0
- package/lib/formatters/es6/CoralToggleFormatter.js +47 -0
- package/lib/formatters/es6/DuplexEmeraldDateTimePickerFormatter.d.ts +14 -0
- package/lib/formatters/es6/DuplexEmeraldDateTimePickerFormatter.js +119 -0
- package/lib/formatters/es6/EFButtonFormatter.d.ts +22 -0
- package/lib/formatters/es6/EFButtonFormatter.js +40 -0
- package/lib/formatters/es6/EFCheckboxFormatter.d.ts +12 -0
- package/lib/formatters/es6/EFCheckboxFormatter.js +45 -0
- package/lib/formatters/es6/EFComboBoxFormatter.d.ts +23 -0
- package/lib/formatters/es6/EFComboBoxFormatter.js +68 -0
- package/lib/formatters/es6/EFDateTimePickerFormatter.d.ts +13 -0
- package/lib/formatters/es6/EFDateTimePickerFormatter.js +55 -0
- package/lib/formatters/es6/EFIconFormatter.d.ts +23 -0
- package/lib/formatters/es6/EFIconFormatter.js +45 -0
- package/lib/formatters/es6/EFNumberFieldFormatter.d.ts +12 -0
- package/lib/formatters/es6/EFNumberFieldFormatter.js +40 -0
- package/lib/formatters/es6/EFRadioButtonFormatter.d.ts +22 -0
- package/lib/formatters/es6/EFRadioButtonFormatter.js +80 -0
- package/lib/formatters/es6/EFSelectFormatter.d.ts +23 -0
- package/lib/formatters/es6/EFSelectFormatter.js +66 -0
- package/lib/formatters/es6/EFTextFieldFormatter.d.ts +12 -0
- package/lib/formatters/es6/EFTextFieldFormatter.js +40 -0
- package/lib/formatters/es6/EFToggleFormatter.d.ts +12 -0
- package/lib/formatters/es6/EFToggleFormatter.js +47 -0
- package/lib/formatters/es6/EmeraldDateTimePickerFormatter.d.ts +13 -0
- package/lib/formatters/es6/EmeraldDateTimePickerFormatter.js +55 -0
- package/lib/formatters/es6/FormatterBuilder.d.ts +22 -0
- package/lib/formatters/es6/FormatterBuilder.js +334 -0
- package/lib/formatters/es6/NumericInputFormatter.d.ts +13 -0
- package/lib/formatters/es6/NumericInputFormatter.js +64 -0
- package/lib/formatters/es6/PercentBarFormatter.d.ts +25 -0
- package/lib/formatters/es6/PercentBarFormatter.js +62 -0
- package/lib/formatters/es6/SimpleImageFormatter.d.ts +21 -0
- package/lib/formatters/es6/SimpleImageFormatter.js +64 -0
- package/lib/formatters/es6/SimpleInputFormatter.d.ts +12 -0
- package/lib/formatters/es6/SimpleInputFormatter.js +40 -0
- package/lib/formatters/es6/SimpleLinkFormatter.d.ts +21 -0
- package/lib/formatters/es6/SimpleLinkFormatter.js +48 -0
- package/lib/formatters/es6/SimpleTickerFormatter.d.ts +25 -0
- package/lib/formatters/es6/SimpleTickerFormatter.js +65 -0
- package/lib/formatters/es6/SimpleToggleFormatter.d.ts +22 -0
- package/lib/formatters/es6/SimpleToggleFormatter.js +132 -0
- package/lib/formatters/es6/TextFormatter.d.ts +12 -0
- package/lib/formatters/es6/TextFormatter.js +30 -0
- package/lib/formatters/es6/index.d.ts +43 -0
- package/lib/formatters/es6/index.js +67 -0
- package/lib/grid/index.d.ts +1 -0
- package/lib/grid/index.js +2 -0
- package/lib/grid/lib/efx-grid.d.ts +32 -0
- package/lib/grid/lib/efx-grid.js +469 -0
- package/lib/grid/themes/base.less +134 -0
- package/lib/grid/themes/halo/dark/css/native-elements.css +0 -0
- package/lib/grid/themes/halo/dark/efx-grid.js +4 -0
- package/lib/grid/themes/halo/dark/es5/all-elements.js +2 -0
- package/lib/grid/themes/halo/dark/imports/all-elements.js +1 -0
- package/lib/grid/themes/halo/dark/imports/custom-elements.js +1 -0
- package/lib/grid/themes/halo/dark/imports/native-elements.js +0 -0
- package/lib/grid/themes/halo/dark.js +3 -0
- package/lib/grid/themes/halo/efx-grid.less +92 -0
- package/lib/grid/themes/halo/index.less +3 -0
- package/lib/grid/themes/halo/light/css/native-elements.css +0 -0
- package/lib/grid/themes/halo/light/efx-grid.js +4 -0
- package/lib/grid/themes/halo/light/es5/all-elements.js +2 -0
- package/lib/grid/themes/halo/light/imports/all-elements.js +1 -0
- package/lib/grid/themes/halo/light/imports/custom-elements.js +1 -0
- package/lib/grid/themes/halo/light/imports/native-elements.js +0 -0
- package/lib/grid/themes/halo/light.js +3 -0
- package/lib/grid/themes/solar/charcoal/css/native-elements.css +0 -0
- package/lib/grid/themes/solar/charcoal/efx-grid.js +4 -0
- package/lib/grid/themes/solar/charcoal/es5/all-elements.js +2 -0
- package/lib/grid/themes/solar/charcoal/imports/all-elements.js +1 -0
- package/lib/grid/themes/solar/charcoal/imports/custom-elements.js +1 -0
- package/lib/grid/themes/solar/charcoal/imports/native-elements.js +0 -0
- package/lib/grid/themes/solar/charcoal.js +3 -0
- package/lib/grid/themes/solar/efx-grid.less +27 -0
- package/lib/grid/themes/solar/index.less +3 -0
- package/lib/grid/themes/solar/pearl/css/native-elements.css +0 -0
- package/lib/grid/themes/solar/pearl/efx-grid.js +4 -0
- package/lib/grid/themes/solar/pearl/es5/all-elements.js +2 -0
- package/lib/grid/themes/solar/pearl/imports/all-elements.js +1 -0
- package/lib/grid/themes/solar/pearl/imports/custom-elements.js +1 -0
- package/lib/grid/themes/solar/pearl/imports/native-elements.js +0 -0
- package/lib/grid/themes/solar/pearl.js +3 -0
- package/lib/index.d.ts +102 -0
- package/lib/index.js +102 -0
- package/lib/row-segmenting/es6/RowSegmenting.d.ts +83 -0
- package/lib/row-segmenting/es6/RowSegmenting.js +592 -0
- package/lib/row-segmenting/es6/index.d.ts +1 -0
- package/lib/row-segmenting/es6/index.js +1 -0
- package/lib/rt-grid/dist/rt-grid.js +44672 -0
- package/lib/rt-grid/dist/rt-grid.min.js +1 -0
- package/lib/rt-grid/es6/ColumnDefinition.d.ts +141 -0
- package/lib/rt-grid/es6/ColumnDefinition.js +1074 -0
- package/lib/rt-grid/es6/DataConnector.d.ts +37 -0
- package/lib/rt-grid/es6/DataConnector.js +266 -0
- package/lib/rt-grid/es6/FieldDefinition.d.ts +20 -0
- package/lib/rt-grid/es6/FieldDefinition.js +418 -0
- package/lib/rt-grid/es6/Grid.d.ts +261 -0
- package/lib/rt-grid/es6/Grid.js +2893 -0
- package/lib/rt-grid/es6/PredefinedFormula.d.ts +16 -0
- package/lib/rt-grid/es6/PredefinedFormula.js +33 -0
- package/lib/rt-grid/es6/ReferenceCounter.d.ts +38 -0
- package/lib/rt-grid/es6/ReferenceCounter.js +230 -0
- package/lib/rt-grid/es6/RowDefinition.d.ts +120 -0
- package/lib/rt-grid/es6/RowDefinition.js +873 -0
- package/lib/rt-grid/es6/SnapshotFiller.d.ts +21 -0
- package/lib/rt-grid/es6/SnapshotFiller.js +252 -0
- package/lib/rt-grid/es6/StyleLoader.d.ts +17 -0
- package/lib/rt-grid/es6/StyleLoader.js +47 -0
- package/lib/rt-grid/es6/index.d.ts +8 -0
- package/lib/rt-grid/es6/index.js +43 -0
- package/lib/statistics-row/es6/StatisticsRow.d.ts +67 -0
- package/lib/statistics-row/es6/StatisticsRow.js +786 -0
- package/lib/statistics-row/es6/index.d.ts +1 -0
- package/lib/statistics-row/es6/index.js +1 -0
- package/lib/tr-grid-auto-tooltip/es6/AutoTooltip.d.ts +45 -0
- package/lib/tr-grid-auto-tooltip/es6/AutoTooltip.js +431 -0
- package/lib/tr-grid-auto-tooltip/es6/index.d.ts +1 -0
- package/lib/tr-grid-auto-tooltip/es6/index.js +1 -0
- package/lib/tr-grid-cell-selection/es6/CellSelection.d.ts +67 -0
- package/lib/tr-grid-cell-selection/es6/CellSelection.js +1777 -0
- package/lib/tr-grid-cell-selection/es6/index.d.ts +1 -0
- package/lib/tr-grid-cell-selection/es6/index.js +1 -0
- package/lib/tr-grid-checkbox/es6/Checkbox.d.ts +69 -0
- package/lib/tr-grid-checkbox/es6/Checkbox.js +1476 -0
- package/lib/tr-grid-checkbox/es6/index.d.ts +1 -0
- package/lib/tr-grid-checkbox/es6/index.js +1 -0
- package/lib/tr-grid-column-fitter/es6/ColumnFitter.d.ts +56 -0
- package/lib/tr-grid-column-fitter/es6/ColumnFitter.js +1000 -0
- package/lib/tr-grid-column-fitter/es6/index.d.ts +1 -0
- package/lib/tr-grid-column-fitter/es6/index.js +1 -0
- package/lib/tr-grid-column-formatting/es6/ColumnFormatting.d.ts +89 -0
- package/lib/tr-grid-column-formatting/es6/ColumnFormatting.js +615 -0
- package/lib/tr-grid-column-formatting/es6/index.d.ts +1 -0
- package/lib/tr-grid-column-formatting/es6/index.js +1 -0
- package/lib/tr-grid-column-grouping/es6/ColumnGrouping.d.ts +60 -0
- package/lib/tr-grid-column-grouping/es6/ColumnGrouping.js +913 -0
- package/lib/tr-grid-column-grouping/es6/index.d.ts +1 -0
- package/lib/tr-grid-column-grouping/es6/index.js +1 -0
- package/lib/tr-grid-column-resizing/es6/ColumnResizing.d.ts +68 -0
- package/lib/tr-grid-column-resizing/es6/ColumnResizing.js +1013 -0
- package/lib/tr-grid-column-resizing/es6/index.d.ts +1 -0
- package/lib/tr-grid-column-resizing/es6/index.js +1 -0
- package/lib/tr-grid-column-selection/es6/ColumnSelection.d.ts +70 -0
- package/lib/tr-grid-column-selection/es6/ColumnSelection.js +928 -0
- package/lib/tr-grid-column-selection/es6/index.d.ts +1 -0
- package/lib/tr-grid-column-selection/es6/index.js +1 -0
- package/lib/tr-grid-column-stack/es6/ColumnStack.d.ts +76 -0
- package/lib/tr-grid-column-stack/es6/ColumnStack.js +1227 -0
- package/lib/tr-grid-column-stack/es6/index.d.ts +1 -0
- package/lib/tr-grid-column-stack/es6/index.js +1 -0
- package/lib/tr-grid-conditional-coloring/es6/ConditionalColoring.d.ts +70 -0
- package/lib/tr-grid-conditional-coloring/es6/ConditionalColoring.js +947 -0
- package/lib/tr-grid-conditional-coloring/es6/index.d.ts +1 -0
- package/lib/tr-grid-conditional-coloring/es6/index.js +1 -0
- package/lib/tr-grid-content-wrap/es6/ContentWrap.d.ts +43 -0
- package/lib/tr-grid-content-wrap/es6/ContentWrap.js +478 -0
- package/lib/tr-grid-content-wrap/es6/index.d.ts +1 -0
- package/lib/tr-grid-content-wrap/es6/index.js +1 -0
- package/lib/tr-grid-contextmenu/es6/ContextMenu.d.ts +83 -0
- package/lib/tr-grid-contextmenu/es6/ContextMenu.js +471 -0
- package/lib/tr-grid-contextmenu/es6/MenuEventAPI.d.ts +22 -0
- package/lib/tr-grid-contextmenu/es6/MenuEventAPI.js +133 -0
- package/lib/tr-grid-contextmenu/es6/MenuItem.d.ts +39 -0
- package/lib/tr-grid-contextmenu/es6/MenuItem.js +245 -0
- package/lib/tr-grid-contextmenu/es6/PopupMenu.d.ts +29 -0
- package/lib/tr-grid-contextmenu/es6/PopupMenu.js +292 -0
- package/lib/tr-grid-contextmenu/es6/index.d.ts +1 -0
- package/lib/tr-grid-contextmenu/es6/index.js +1 -0
- package/lib/tr-grid-filter-input/es6/FilterInput.d.ts +57 -0
- package/lib/tr-grid-filter-input/es6/FilterInput.js +928 -0
- package/lib/tr-grid-filter-input/es6/index.d.ts +1 -0
- package/lib/tr-grid-filter-input/es6/index.js +1 -0
- package/lib/tr-grid-heat-map/es6/HeatMap.d.ts +44 -0
- package/lib/tr-grid-heat-map/es6/HeatMap.js +394 -0
- package/lib/tr-grid-heat-map/es6/index.d.ts +1 -0
- package/lib/tr-grid-heat-map/es6/index.js +1 -0
- package/lib/tr-grid-in-cell-editing/es6/InCellEditing.d.ts +129 -0
- package/lib/tr-grid-in-cell-editing/es6/InCellEditing.js +1977 -0
- package/lib/tr-grid-in-cell-editing/es6/index.d.ts +1 -0
- package/lib/tr-grid-in-cell-editing/es6/index.js +1 -0
- package/lib/tr-grid-pagination/es6/Pagination.d.ts +57 -0
- package/lib/tr-grid-pagination/es6/Pagination.js +427 -0
- package/lib/tr-grid-pagination/es6/index.d.ts +1 -0
- package/lib/tr-grid-pagination/es6/index.js +1 -0
- package/lib/tr-grid-percent-bar/es6/PercentBar.d.ts +60 -0
- package/lib/tr-grid-percent-bar/es6/PercentBar.js +801 -0
- package/lib/tr-grid-percent-bar/es6/index.d.ts +1 -0
- package/lib/tr-grid-percent-bar/es6/index.js +1 -0
- package/lib/tr-grid-printer/es6/CellWriter.d.ts +49 -0
- package/lib/tr-grid-printer/es6/CellWriter.js +226 -0
- package/lib/tr-grid-printer/es6/ColumnWriter.d.ts +12 -0
- package/lib/tr-grid-printer/es6/ColumnWriter.js +21 -0
- package/lib/tr-grid-printer/es6/GridPrinter.d.ts +32 -0
- package/lib/tr-grid-printer/es6/GridPrinter.js +761 -0
- package/lib/tr-grid-printer/es6/PrintTrait.d.ts +38 -0
- package/lib/tr-grid-printer/es6/PrintTrait.js +481 -0
- package/lib/tr-grid-printer/es6/SectionWriter.d.ts +54 -0
- package/lib/tr-grid-printer/es6/SectionWriter.js +205 -0
- package/lib/tr-grid-printer/es6/index.d.ts +1 -0
- package/lib/tr-grid-printer/es6/index.js +1 -0
- package/lib/tr-grid-range-bar/es6/RangeBar.d.ts +39 -0
- package/lib/tr-grid-range-bar/es6/RangeBar.js +353 -0
- package/lib/tr-grid-range-bar/es6/index.d.ts +1 -0
- package/lib/tr-grid-range-bar/es6/index.js +1 -0
- package/lib/tr-grid-row-dragging/es6/RowDragging.d.ts +53 -0
- package/lib/tr-grid-row-dragging/es6/RowDragging.js +794 -0
- package/lib/tr-grid-row-dragging/es6/index.d.ts +1 -0
- package/lib/tr-grid-row-dragging/es6/index.js +1 -0
- package/lib/tr-grid-row-filtering/es6/RowFiltering.d.ts +118 -0
- package/lib/tr-grid-row-filtering/es6/RowFiltering.js +1884 -0
- package/lib/tr-grid-row-filtering/es6/index.d.ts +1 -0
- package/lib/tr-grid-row-filtering/es6/index.js +1 -0
- package/lib/tr-grid-row-grouping/es6/RowGrouping.d.ts +109 -0
- package/lib/tr-grid-row-grouping/es6/RowGrouping.js +1541 -0
- package/lib/tr-grid-row-grouping/es6/index.d.ts +1 -0
- package/lib/tr-grid-row-grouping/es6/index.js +1 -0
- package/lib/tr-grid-row-selection/es6/RowSelection.d.ts +74 -0
- package/lib/tr-grid-row-selection/es6/RowSelection.js +1202 -0
- package/lib/tr-grid-row-selection/es6/index.d.ts +1 -0
- package/lib/tr-grid-row-selection/es6/index.js +1 -0
- package/lib/tr-grid-rowcoloring/es6/RowColoring.d.ts +60 -0
- package/lib/tr-grid-rowcoloring/es6/RowColoring.js +611 -0
- package/lib/tr-grid-rowcoloring/es6/index.d.ts +1 -0
- package/lib/tr-grid-rowcoloring/es6/index.js +1 -0
- package/lib/tr-grid-textformatting/es6/TextFormatting.d.ts +77 -0
- package/lib/tr-grid-textformatting/es6/TextFormatting.js +574 -0
- package/lib/tr-grid-textformatting/es6/index.d.ts +1 -0
- package/lib/tr-grid-textformatting/es6/index.js +1 -0
- package/lib/tr-grid-titlewrap/es6/TitleWrap.d.ts +29 -0
- package/lib/tr-grid-titlewrap/es6/TitleWrap.js +431 -0
- package/lib/tr-grid-titlewrap/es6/index.d.ts +1 -0
- package/lib/tr-grid-titlewrap/es6/index.js +1 -0
- package/lib/tr-grid-util/es6/CellPainter.d.ts +136 -0
- package/lib/tr-grid-util/es6/CellPainter.js +1128 -0
- package/lib/tr-grid-util/es6/Conflator.d.ts +34 -0
- package/lib/tr-grid-util/es6/Conflator.js +193 -0
- package/lib/tr-grid-util/es6/CoralItems.d.ts +10 -0
- package/lib/tr-grid-util/es6/CoralItems.js +42 -0
- package/lib/tr-grid-util/es6/DateTime.d.ts +57 -0
- package/lib/tr-grid-util/es6/DateTime.js +508 -0
- package/lib/tr-grid-util/es6/Deferred.d.ts +14 -0
- package/lib/tr-grid-util/es6/Deferred.js +98 -0
- package/lib/tr-grid-util/es6/Delay.d.ts +20 -0
- package/lib/tr-grid-util/es6/Delay.js +85 -0
- package/lib/tr-grid-util/es6/Dom.d.ts +32 -0
- package/lib/tr-grid-util/es6/Dom.js +346 -0
- package/lib/tr-grid-util/es6/ElementObserver.d.ts +10 -0
- package/lib/tr-grid-util/es6/ElementObserver.js +101 -0
- package/lib/tr-grid-util/es6/ElementWrapper.d.ts +23 -0
- package/lib/tr-grid-util/es6/ElementWrapper.js +83 -0
- package/lib/tr-grid-util/es6/ElfDate.d.ts +26 -0
- package/lib/tr-grid-util/es6/ElfDate.js +163 -0
- package/lib/tr-grid-util/es6/ElfUtil.d.ts +33 -0
- package/lib/tr-grid-util/es6/ElfUtil.js +458 -0
- package/lib/tr-grid-util/es6/EventDispatcher.d.ts +26 -0
- package/lib/tr-grid-util/es6/EventDispatcher.js +161 -0
- package/lib/tr-grid-util/es6/ExpanderIcon.d.ts +27 -0
- package/lib/tr-grid-util/es6/ExpanderIcon.js +169 -0
- package/lib/tr-grid-util/es6/Ext.d.ts +10 -0
- package/lib/tr-grid-util/es6/Ext.js +52 -0
- package/lib/tr-grid-util/es6/FieldFormatter.d.ts +55 -0
- package/lib/tr-grid-util/es6/FieldFormatter.js +432 -0
- package/lib/tr-grid-util/es6/FilterBuilder.d.ts +48 -0
- package/lib/tr-grid-util/es6/FilterBuilder.js +521 -0
- package/lib/tr-grid-util/es6/FilterOperators.d.ts +41 -0
- package/lib/tr-grid-util/es6/FilterOperators.js +181 -0
- package/lib/tr-grid-util/es6/GridPlugin.d.ts +72 -0
- package/lib/tr-grid-util/es6/GridPlugin.js +747 -0
- package/lib/tr-grid-util/es6/Icon.d.ts +14 -0
- package/lib/tr-grid-util/es6/Icon.js +61 -0
- package/lib/tr-grid-util/es6/MouseDownTrait.d.ts +42 -0
- package/lib/tr-grid-util/es6/MouseDownTrait.js +237 -0
- package/lib/tr-grid-util/es6/MultiTableManager.d.ts +32 -0
- package/lib/tr-grid-util/es6/MultiTableManager.js +506 -0
- package/lib/tr-grid-util/es6/NumberFormatter.d.ts +83 -0
- package/lib/tr-grid-util/es6/NumberFormatter.js +471 -0
- package/lib/tr-grid-util/es6/PercentBar.d.ts +71 -0
- package/lib/tr-grid-util/es6/PercentBar.js +600 -0
- package/lib/tr-grid-util/es6/Perf.d.ts +32 -0
- package/lib/tr-grid-util/es6/Perf.js +162 -0
- package/lib/tr-grid-util/es6/Popup.d.ts +84 -0
- package/lib/tr-grid-util/es6/Popup.js +818 -0
- package/lib/tr-grid-util/es6/RangeBar.d.ts +33 -0
- package/lib/tr-grid-util/es6/RangeBar.js +259 -0
- package/lib/tr-grid-util/es6/RequestQueue.d.ts +30 -0
- package/lib/tr-grid-util/es6/RequestQueue.js +239 -0
- package/lib/tr-grid-util/es6/RowPainter.d.ts +23 -0
- package/lib/tr-grid-util/es6/RowPainter.js +188 -0
- package/lib/tr-grid-util/es6/SubTable.d.ts +74 -0
- package/lib/tr-grid-util/es6/SubTable.js +558 -0
- package/lib/tr-grid-util/es6/Table.d.ts +125 -0
- package/lib/tr-grid-util/es6/Table.js +790 -0
- package/lib/tr-grid-util/es6/TextHighlighter.d.ts +18 -0
- package/lib/tr-grid-util/es6/TextHighlighter.js +273 -0
- package/lib/tr-grid-util/es6/TickCodes.d.ts +8 -0
- package/lib/tr-grid-util/es6/TickCodes.js +33 -0
- package/lib/tr-grid-util/es6/Timer.d.ts +16 -0
- package/lib/tr-grid-util/es6/Timer.js +49 -0
- package/lib/tr-grid-util/es6/TouchProxy.d.ts +46 -0
- package/lib/tr-grid-util/es6/TouchProxy.js +212 -0
- package/lib/tr-grid-util/es6/Util.d.ts +65 -0
- package/lib/tr-grid-util/es6/Util.js +528 -0
- package/lib/tr-grid-util/es6/formula/ADCService.d.ts +11 -0
- package/lib/tr-grid-util/es6/formula/ADCService.js +72 -0
- package/lib/tr-grid-util/es6/formula/ADCSubscription.d.ts +17 -0
- package/lib/tr-grid-util/es6/formula/ADCSubscription.js +317 -0
- package/lib/tr-grid-util/es6/formula/AdFinService.d.ts +12 -0
- package/lib/tr-grid-util/es6/formula/AdFinService.js +61 -0
- package/lib/tr-grid-util/es6/formula/AdFinSubscription.d.ts +19 -0
- package/lib/tr-grid-util/es6/formula/AdFinSubscription.js +310 -0
- package/lib/tr-grid-util/es6/formula/Engine.d.ts +56 -0
- package/lib/tr-grid-util/es6/formula/Engine.js +592 -0
- package/lib/tr-grid-util/es6/formula/Formula.d.ts +68 -0
- package/lib/tr-grid-util/es6/formula/Formula.js +882 -0
- package/lib/tr-grid-util/es6/formula/IntervalSubscription.d.ts +16 -0
- package/lib/tr-grid-util/es6/formula/IntervalSubscription.js +165 -0
- package/lib/tr-grid-util/es6/formula/Realtime.d.ts +18 -0
- package/lib/tr-grid-util/es6/formula/Realtime.js +279 -0
- package/lib/tr-grid-util/es6/formula/RealtimeService.d.ts +18 -0
- package/lib/tr-grid-util/es6/formula/RealtimeService.js +203 -0
- package/lib/tr-grid-util/es6/formula/TSIService.d.ts +11 -0
- package/lib/tr-grid-util/es6/formula/TSIService.js +51 -0
- package/lib/tr-grid-util/es6/formula/TSISubscription.d.ts +18 -0
- package/lib/tr-grid-util/es6/formula/TSISubscription.js +1015 -0
- package/lib/tr-grid-util/es6/formula/VariableToken.d.ts +30 -0
- package/lib/tr-grid-util/es6/formula/VariableToken.js +314 -0
- package/lib/tr-grid-util/es6/formula/functions/AdFin.d.ts +9 -0
- package/lib/tr-grid-util/es6/formula/functions/AdFin.js +1778 -0
- package/lib/tr-grid-util/es6/formula/functions/Excel.d.ts +8 -0
- package/lib/tr-grid-util/es6/formula/functions/Excel.js +21 -0
- package/lib/tr-grid-util/es6/formula/functions/Info.d.ts +8 -0
- package/lib/tr-grid-util/es6/formula/functions/Info.js +192 -0
- package/lib/tr-grid-util/es6/formula/functions/Internal.d.ts +8 -0
- package/lib/tr-grid-util/es6/formula/functions/Internal.js +90 -0
- package/lib/tr-grid-util/es6/formula/functions/Logic.d.ts +12 -0
- package/lib/tr-grid-util/es6/formula/functions/Logic.js +176 -0
- package/lib/tr-grid-util/es6/formula/functions/Math.d.ts +18 -0
- package/lib/tr-grid-util/es6/formula/functions/Math.js +1624 -0
- package/lib/tr-grid-util/es6/formula/functions/Statistics.d.ts +18 -0
- package/lib/tr-grid-util/es6/formula/functions/Statistics.js +234 -0
- package/lib/tr-grid-util/es6/formula/functions/Text.d.ts +10 -0
- package/lib/tr-grid-util/es6/formula/functions/Text.js +676 -0
- package/lib/tr-grid-util/es6/index.d.ts +63 -0
- package/lib/tr-grid-util/es6/index.js +99 -0
- package/lib/tr-grid-util/es6/jet/CollectionDict.d.ts +28 -0
- package/lib/tr-grid-util/es6/jet/CollectionDict.js +141 -0
- package/lib/tr-grid-util/es6/jet/DataGenerator.d.ts +114 -0
- package/lib/tr-grid-util/es6/jet/DataGenerator.js +827 -0
- package/lib/tr-grid-util/es6/jet/DataSet.d.ts +8 -0
- package/lib/tr-grid-util/es6/jet/DataSet.js +392 -0
- package/lib/tr-grid-util/es6/jet/MockArchive.d.ts +21 -0
- package/lib/tr-grid-util/es6/jet/MockArchive.js +56 -0
- package/lib/tr-grid-util/es6/jet/MockJET.d.ts +25 -0
- package/lib/tr-grid-util/es6/jet/MockJET.js +63 -0
- package/lib/tr-grid-util/es6/jet/MockQuotes.d.ts +37 -0
- package/lib/tr-grid-util/es6/jet/MockQuotes.js +199 -0
- package/lib/tr-grid-util/es6/jet/MockQuotes2.d.ts +72 -0
- package/lib/tr-grid-util/es6/jet/MockQuotes2.js +564 -0
- package/lib/tr-grid-util/es6/jet/MockRTK.d.ts +8 -0
- package/lib/tr-grid-util/es6/jet/MockRTK.js +43 -0
- package/lib/tr-grid-util/es6/jet/index.d.ts +9 -0
- package/lib/tr-grid-util/es6/jet/index.js +18 -0
- package/lib/tr-grid-util/es6/jet/mockDataAPI.d.ts +11 -0
- package/lib/tr-grid-util/es6/jet/mockDataAPI.js +131 -0
- package/lib/tr-grid-util/es6/locale/translation-de.d.ts +7 -0
- package/lib/tr-grid-util/es6/locale/translation-de.js +51 -0
- package/lib/tr-grid-util/es6/locale/translation-en.d.ts +7 -0
- package/lib/tr-grid-util/es6/locale/translation-en.js +51 -0
- package/lib/tr-grid-util/es6/locale/translation-ja.d.ts +7 -0
- package/lib/tr-grid-util/es6/locale/translation-ja.js +51 -0
- package/lib/tr-grid-util/es6/locale/translation-zh-hant.d.ts +7 -0
- package/lib/tr-grid-util/es6/locale/translation-zh-hant.js +51 -0
- package/lib/tr-grid-util/es6/locale/translation-zh.d.ts +7 -0
- package/lib/tr-grid-util/es6/locale/translation-zh.js +51 -0
- package/lib/tr-grid-util/es6/locale/translation.d.ts +11 -0
- package/lib/tr-grid-util/es6/locale/translation.js +18 -0
- package/lib/types/es6/AutoTooltip.d.ts +45 -0
- package/lib/types/es6/CellSelection.d.ts +67 -0
- package/lib/types/es6/Checkbox.d.ts +69 -0
- package/lib/types/es6/ColumnFitter.d.ts +56 -0
- package/lib/types/es6/ColumnFormatting.d.ts +90 -0
- package/lib/types/es6/ColumnGrouping.d.ts +60 -0
- package/lib/types/es6/ColumnResizing.d.ts +68 -0
- package/lib/types/es6/ColumnSelection.d.ts +70 -0
- package/lib/types/es6/ColumnStack.d.ts +76 -0
- package/lib/types/es6/CompositeGrid/CollapsibleHeaderPlugin.d.ts +11 -0
- package/lib/types/es6/CompositeGrid/ColumnSelectionPlugin.d.ts +38 -0
- package/lib/types/es6/CompositeGrid/ColumnWidthAdjustingPlugin.d.ts +45 -0
- package/lib/types/es6/CompositeGrid/CompositeGrid.d.ts +287 -0
- package/lib/types/es6/CompositeGrid/DragAndDropTitlePlugin.d.ts +22 -0
- package/lib/types/es6/CompositeGrid/DraggableContentPlugin.d.ts +44 -0
- package/lib/types/es6/CompositeGrid/ResizableTitlePlugin.d.ts +30 -0
- package/lib/types/es6/CompositeGrid/RowSelectionPlugin.d.ts +42 -0
- package/lib/types/es6/CompositeGrid/TextWidthCalculator.d.ts +24 -0
- package/lib/types/es6/CompositeGrid/TreeIndentingPlugin.d.ts +46 -0
- package/lib/types/es6/CompositeGrid/index.d.ts +9 -0
- package/lib/types/es6/ConditionalColoring.d.ts +70 -0
- package/lib/types/es6/ContentWrap.d.ts +43 -0
- package/lib/types/es6/ContextMenu.d.ts +83 -0
- package/lib/types/es6/CoralButtonFormatter.d.ts +22 -0
- package/lib/types/es6/CoralCheckboxFormatter.d.ts +12 -0
- package/lib/types/es6/CoralComboBoxFormatter.d.ts +23 -0
- package/lib/types/es6/CoralIconFormatter.d.ts +23 -0
- package/lib/types/es6/CoralInputFormatter.d.ts +12 -0
- package/lib/types/es6/CoralRadioButtonFormatter.d.ts +22 -0
- package/lib/types/es6/CoralSelectFormatter.d.ts +23 -0
- package/lib/types/es6/CoralToggleFormatter.d.ts +12 -0
- package/lib/types/es6/Core/data/ColumnStats.d.ts +42 -0
- package/lib/types/es6/Core/data/DataCache.d.ts +81 -0
- package/lib/types/es6/Core/data/DataTable.d.ts +125 -0
- package/lib/types/es6/Core/data/DataView.d.ts +280 -0
- package/lib/types/es6/Core/data/Segment.d.ts +38 -0
- package/lib/types/es6/Core/data/SegmentCollection.d.ts +58 -0
- package/lib/types/es6/Core/grid/Core.d.ts +387 -0
- package/lib/types/es6/Core/grid/ILayoutGrid.d.ts +204 -0
- package/lib/types/es6/Core/grid/LayoutGrid.d.ts +23 -0
- package/lib/types/es6/Core/grid/VirtualizedLayoutGrid.d.ts +18 -0
- package/lib/types/es6/Core/grid/components/Cell.d.ts +50 -0
- package/lib/types/es6/Core/grid/components/CellFloatingPanel.d.ts +19 -0
- package/lib/types/es6/Core/grid/components/CellSpan.d.ts +18 -0
- package/lib/types/es6/Core/grid/components/CellSpans.d.ts +38 -0
- package/lib/types/es6/Core/grid/components/Column.d.ts +22 -0
- package/lib/types/es6/Core/grid/components/ElementWrapper.d.ts +125 -0
- package/lib/types/es6/Core/grid/components/HScrollbar.d.ts +24 -0
- package/lib/types/es6/Core/grid/components/Scrollbar.d.ts +61 -0
- package/lib/types/es6/Core/grid/components/StretchedCells.d.ts +17 -0
- package/lib/types/es6/Core/grid/components/VScrollbar.d.ts +18 -0
- package/lib/types/es6/Core/grid/components/VirtualItems.d.ts +12 -0
- package/lib/types/es6/Core/grid/event/EventDispatcher.d.ts +16 -0
- package/lib/types/es6/Core/grid/event/EventListeners.d.ts +34 -0
- package/lib/types/es6/Core/grid/plugins/DragAndDropTitlePlugin.d.ts +24 -0
- package/lib/types/es6/Core/grid/plugins/Plugin.d.ts +28 -0
- package/lib/types/es6/Core/grid/plugins/SortableTitlePlugin.d.ts +127 -0
- package/lib/types/es6/Core/grid/util/Conflator.d.ts +32 -0
- package/lib/types/es6/Core/grid/util/ElementFrameWork.d.ts +18 -0
- package/lib/types/es6/Core/grid/util/HttpRequest.d.ts +53 -0
- package/lib/types/es6/Core/grid/util/PercentBar.d.ts +43 -0
- package/lib/types/es6/Core/grid/util/PercentBarRenderer.d.ts +41 -0
- package/lib/types/es6/Core/grid/util/RangeBar.d.ts +25 -0
- package/lib/types/es6/Core/grid/util/Reverter.d.ts +14 -0
- package/lib/types/es6/Core/grid/util/SectionSettings.d.ts +79 -0
- package/lib/types/es6/Core/grid/util/SelectionList.d.ts +50 -0
- package/lib/types/es6/Core/grid/util/TrackLayout.d.ts +84 -0
- package/lib/types/es6/Core/grid/util/Virtualizer.d.ts +40 -0
- package/lib/types/es6/Core/grid/util/util.d.ts +18 -0
- package/lib/types/es6/Core/index.d.ts +84 -0
- package/lib/types/es6/Core/tr-grid-theme.d.ts +5 -0
- package/lib/types/es6/DuplexEmeraldDateTimePickerFormatter.d.ts +14 -0
- package/lib/types/es6/EFButtonFormatter.d.ts +22 -0
- package/lib/types/es6/EFCheckboxFormatter.d.ts +12 -0
- package/lib/types/es6/EFComboBoxFormatter.d.ts +23 -0
- package/lib/types/es6/EFDateTimePickerFormatter.d.ts +13 -0
- package/lib/types/es6/EFIconFormatter.d.ts +23 -0
- package/lib/types/es6/EFNumberFieldFormatter.d.ts +12 -0
- package/lib/types/es6/EFRadioButtonFormatter.d.ts +22 -0
- package/lib/types/es6/EFSelectFormatter.d.ts +23 -0
- package/lib/types/es6/EFTextFieldFormatter.d.ts +12 -0
- package/lib/types/es6/EFToggleFormatter.d.ts +12 -0
- package/lib/types/es6/EmeraldDateTimePickerFormatter.d.ts +13 -0
- package/lib/types/es6/ExtensionColumnOptions.d.ts +41 -0
- package/lib/types/es6/ExtensionOptions.d.ts +52 -0
- package/lib/types/es6/Extensions.d.ts +61 -0
- package/lib/types/es6/FilterInput.d.ts +57 -0
- package/lib/types/es6/FormatterBuilder.d.ts +22 -0
- package/lib/types/es6/GridFormatter.d.ts +63 -0
- package/lib/types/es6/HeatMap.d.ts +44 -0
- package/lib/types/es6/InCellEditing.d.ts +129 -0
- package/lib/types/es6/MenuEventAPI.d.ts +22 -0
- package/lib/types/es6/MenuItem.d.ts +39 -0
- package/lib/types/es6/NumericInputFormatter.d.ts +13 -0
- package/lib/types/es6/Pagination.d.ts +57 -0
- package/lib/types/es6/PercentBar.d.ts +60 -0
- package/lib/types/es6/PercentBarFormatter.d.ts +25 -0
- package/lib/types/es6/PopupMenu.d.ts +29 -0
- package/lib/types/es6/RangeBar.d.ts +39 -0
- package/lib/types/es6/RealtimeGrid/ColumnDefinition.d.ts +143 -0
- package/lib/types/es6/RealtimeGrid/DataConnector.d.ts +37 -0
- package/lib/types/es6/RealtimeGrid/FieldDefinition.d.ts +20 -0
- package/lib/types/es6/RealtimeGrid/Grid.d.ts +263 -0
- package/lib/types/es6/RealtimeGrid/PredefinedFormula.d.ts +16 -0
- package/lib/types/es6/RealtimeGrid/ReferenceCounter.d.ts +38 -0
- package/lib/types/es6/RealtimeGrid/RowDefinition.d.ts +120 -0
- package/lib/types/es6/RealtimeGrid/SnapshotFiller.d.ts +21 -0
- package/lib/types/es6/RealtimeGrid/StyleLoader.d.ts +17 -0
- package/lib/types/es6/RealtimeGrid/index.d.ts +8 -0
- package/lib/types/es6/RowColoring.d.ts +60 -0
- package/lib/types/es6/RowDragging.d.ts +53 -0
- package/lib/types/es6/RowFiltering.d.ts +118 -0
- package/lib/types/es6/RowGrouping.d.ts +109 -0
- package/lib/types/es6/RowSegmenting.d.ts +83 -0
- package/lib/types/es6/RowSelection.d.ts +74 -0
- package/lib/types/es6/SimpleImageFormatter.d.ts +21 -0
- package/lib/types/es6/SimpleInputFormatter.d.ts +12 -0
- package/lib/types/es6/SimpleLinkFormatter.d.ts +21 -0
- package/lib/types/es6/SimpleTickerFormatter.d.ts +25 -0
- package/lib/types/es6/SimpleToggleFormatter.d.ts +22 -0
- package/lib/types/es6/StatisticsRow.d.ts +67 -0
- package/lib/types/es6/TextFormatter.d.ts +12 -0
- package/lib/types/es6/TextFormatting.d.ts +77 -0
- package/lib/types/es6/TitleWrap.d.ts +29 -0
- package/lib/types/es6/Zoom.d.ts +51 -0
- package/lib/types/es6/index.d.ts +76 -0
- package/lib/types/index.d.ts +1 -0
- package/lib/versions.json +36 -0
- package/lib/window-exporter.js +13 -0
- package/lib/zoom/es6/Zoom.d.ts +51 -0
- package/lib/zoom/es6/Zoom.js +419 -0
- package/lib/zoom/es6/index.d.ts +1 -0
- package/lib/zoom/es6/index.js +1 -0
- package/package.json +42 -0
@@ -0,0 +1,1227 @@
|
|
1
|
+
import { Ext } from "../../tr-grid-util/es6/Ext.js";
|
2
|
+
import { GridPlugin } from "../../tr-grid-util/es6/GridPlugin.js";
|
3
|
+
import { Conflator } from "../../tr-grid-util/es6/Conflator.js";
|
4
|
+
import { Icon } from "../../tr-grid-util/es6/Icon.js";
|
5
|
+
import { ElfUtil } from "../../tr-grid-util/es6/ElfUtil.js";
|
6
|
+
import { Dom } from "../../tr-grid-util/es6/Dom.js";
|
7
|
+
import { injectCss, prettifyCss } from "../../tr-grid-util/es6/Util.js";
|
8
|
+
import { preventDefault } from "../../tr-grid-util/es6/EventDispatcher.js";
|
9
|
+
|
10
|
+
/** @typedef {Object} ColumnStackPlugin~ColumnOptions
|
11
|
+
* @description Extension column options that can be specified on each individual grid's column option.
|
12
|
+
* @property {string=} stackId Group ID
|
13
|
+
* @property {(string|StackOptions)=} stack Group ID or StackOptions object
|
14
|
+
*/
|
15
|
+
|
16
|
+
/** @typedef {Object} ColumnStackPlugin~StackOptions
|
17
|
+
* @description Available options describing grouped column displaying
|
18
|
+
* @property {string} id Group ID
|
19
|
+
* @property {boolean=} spreading=false If specified true, this group will be running in collapsing mode
|
20
|
+
* @property {boolean=} collapsed=true If disabled, this group will be expanded at the first time
|
21
|
+
*/
|
22
|
+
|
23
|
+
/** @constructor
|
24
|
+
* @extends {GridPlugin}
|
25
|
+
*/
|
26
|
+
var ColumnStackPlugin = function () {
|
27
|
+
this._onPreSectionRender = this._onPreSectionRender.bind(this);
|
28
|
+
this._onColumnRemoved = this._onColumnRemoved.bind(this);
|
29
|
+
this._onColumnMoved = this._onColumnMoved.bind(this);
|
30
|
+
this._onColumnAdded = this._onColumnAdded.bind(this);
|
31
|
+
this._onStackButtonClicked = this._onStackButtonClicked.bind(this);
|
32
|
+
this._updateUI = this._updateUI.bind(this);
|
33
|
+
this._hosts = [];
|
34
|
+
this._stacks = {};
|
35
|
+
|
36
|
+
this._conflator = new Conflator(100, this._updateUI);
|
37
|
+
};
|
38
|
+
|
39
|
+
Ext.inherits(ColumnStackPlugin, GridPlugin);
|
40
|
+
|
41
|
+
/** @type {number}
|
42
|
+
* @private
|
43
|
+
*/
|
44
|
+
ColumnStackPlugin._runningId = 0;
|
45
|
+
/** @type {!Object.<string, Object>}
|
46
|
+
* @private
|
47
|
+
*/
|
48
|
+
ColumnStackPlugin.prototype._stacks;
|
49
|
+
/** @type {Object.<string, string>}
|
50
|
+
* @private
|
51
|
+
*/
|
52
|
+
ColumnStackPlugin.prototype._pendingStacks;
|
53
|
+
|
54
|
+
/** @override
|
55
|
+
* @return {string}
|
56
|
+
*/
|
57
|
+
ColumnStackPlugin.prototype.getName = function () {
|
58
|
+
return "ColumnStackPlugin"; // Readonly
|
59
|
+
};
|
60
|
+
/** @override
|
61
|
+
* @return {boolean}
|
62
|
+
*/
|
63
|
+
GridPlugin.prototype.hasMultiTableSupport = function() {
|
64
|
+
return true;
|
65
|
+
};
|
66
|
+
/** @public
|
67
|
+
* @param {Object} host core grid object
|
68
|
+
* @param {Object=} options
|
69
|
+
*/
|
70
|
+
ColumnStackPlugin.prototype.initialize = function (host, options) {
|
71
|
+
if(this._hosts.indexOf(host) >= 0) { return; }
|
72
|
+
this._hosts.push(host);
|
73
|
+
|
74
|
+
if(options && options["icons"]) {
|
75
|
+
var icons = options["icons"]["columnStack"];
|
76
|
+
if(icons) {
|
77
|
+
this._stackIconName = icons["stack"];
|
78
|
+
this._expandIconName = icons["expand"];
|
79
|
+
this._collapseIconName = icons["collapse"];
|
80
|
+
}
|
81
|
+
}
|
82
|
+
|
83
|
+
ColumnStackPlugin._applyThemeColor(host);
|
84
|
+
|
85
|
+
if(this._hosts.length === 1) {
|
86
|
+
this.config(options); // WARNING: Configure only for the first host
|
87
|
+
host.listen("columnRemoved", this._onColumnRemoved);
|
88
|
+
host.listen("columnMoved", this._onColumnMoved);
|
89
|
+
host.listen("columnAdded", this._onColumnAdded);
|
90
|
+
}
|
91
|
+
host.listen("preSectionRender", this._onPreSectionRender);
|
92
|
+
|
93
|
+
// In case of lazy loading
|
94
|
+
// DO something
|
95
|
+
};
|
96
|
+
/** @public
|
97
|
+
* @param {Object} host core grid object
|
98
|
+
*/
|
99
|
+
ColumnStackPlugin.prototype.unload = function (host) {
|
100
|
+
var at = this._hosts.indexOf(host);
|
101
|
+
if(at < 0) { return; }
|
102
|
+
this._hosts.splice(at, 1);
|
103
|
+
|
104
|
+
host.unlisten("columnRemoved", this._onColumnRemoved);
|
105
|
+
host.unlisten("columnMoved", this._onColumnMoved);
|
106
|
+
host.unlisten("columnAdded", this._onColumnAdded);
|
107
|
+
host.unlisten("preSectionRender", this._onPreSectionRender);
|
108
|
+
|
109
|
+
if(this._hosts.length <= 0) {
|
110
|
+
this._conflator.reset();
|
111
|
+
}
|
112
|
+
this._dispose();
|
113
|
+
};
|
114
|
+
|
115
|
+
/** @private
|
116
|
+
* @param {Object} grid core grid object
|
117
|
+
*/
|
118
|
+
ColumnStackPlugin._applyThemeColor = function(grid) {
|
119
|
+
if (!ColumnStackPlugin._styles) {
|
120
|
+
ColumnStackPlugin._styles = prettifyCss([
|
121
|
+
".tr-grid .collapsed .cell.grouping .valigner", [
|
122
|
+
"width: 0;"
|
123
|
+
],
|
124
|
+
".tr-grid .collapsed .cell.grouping .floating-panel", [
|
125
|
+
"width: 100%;",
|
126
|
+
"margin: 0;",
|
127
|
+
"justify-content: center;"
|
128
|
+
],
|
129
|
+
".tr-grid .collapsed .cell.grouping .front-panel, " +
|
130
|
+
".tr-grid .collapsed .cell.grouping .floating-panel *:not(.stack-icon)", [
|
131
|
+
"display: none;"
|
132
|
+
],
|
133
|
+
".tr-grid .collapsed .cell.grouping .floating-panel .stack-icon", [
|
134
|
+
"margin-left: 0;"
|
135
|
+
]
|
136
|
+
]);
|
137
|
+
injectCss(ColumnStackPlugin._styles, grid.getElement());
|
138
|
+
}
|
139
|
+
};
|
140
|
+
|
141
|
+
/** @public
|
142
|
+
* @param {Object=} options
|
143
|
+
*/
|
144
|
+
ColumnStackPlugin.prototype.config = function (options) {
|
145
|
+
if(!options) { return; }
|
146
|
+
|
147
|
+
var columns = options["columns"];
|
148
|
+
if(!columns) { return; }
|
149
|
+
|
150
|
+
var stacks = {};
|
151
|
+
var len = columns.length;
|
152
|
+
for(var i = 0; i < len; ++i) {
|
153
|
+
this._setColumnStacking(i, {}); // used for further column index getting
|
154
|
+
var column = columns[i];
|
155
|
+
var stackOpt = column["stackId"] || column["stack"];
|
156
|
+
if(typeof stackOpt === "string") {
|
157
|
+
if(!stacks[stackOpt]) {
|
158
|
+
stacks[stackOpt] = {
|
159
|
+
spreading: false,
|
160
|
+
colIndices: []
|
161
|
+
};
|
162
|
+
}
|
163
|
+
|
164
|
+
stacks[stackOpt].colIndices.push(i);
|
165
|
+
} else if(typeof stackOpt === "object") {
|
166
|
+
if(!stacks[stackOpt["id"]]) {
|
167
|
+
stacks[stackOpt["id"]] = {
|
168
|
+
spreading: stackOpt["spreading"] === true,
|
169
|
+
collapsed: stackOpt["collapsed"] !== false,
|
170
|
+
colIndices: []
|
171
|
+
};
|
172
|
+
}
|
173
|
+
stacks[stackOpt["id"]].colIndices.push(i);
|
174
|
+
} else {
|
175
|
+
continue;
|
176
|
+
}
|
177
|
+
}
|
178
|
+
|
179
|
+
if(this._initializedGrid) {
|
180
|
+
for(var sid in stacks) {
|
181
|
+
this.stackColumns(stacks[sid].colIndices, sid, stacks[sid]);
|
182
|
+
}
|
183
|
+
} else {
|
184
|
+
this._pendingStacks = stacks;
|
185
|
+
}
|
186
|
+
};
|
187
|
+
|
188
|
+
|
189
|
+
/** @public
|
190
|
+
* @param {Object=} gridOptions
|
191
|
+
* @return {!Object}
|
192
|
+
*/
|
193
|
+
ColumnStackPlugin.prototype.getConfigObject = function (gridOptions) {
|
194
|
+
var obj = gridOptions || {};
|
195
|
+
|
196
|
+
var columns = obj.columns;
|
197
|
+
if (!columns) {
|
198
|
+
columns = obj.columns = [];
|
199
|
+
}
|
200
|
+
|
201
|
+
var len = this.getColumnCount();
|
202
|
+
for (var i = 0; i < len; ++i) {
|
203
|
+
var column = columns[i];
|
204
|
+
if (!column) {
|
205
|
+
column = columns[i] = {};
|
206
|
+
}
|
207
|
+
|
208
|
+
var stackOpt = this._getColumnStackOptions(i);
|
209
|
+
if (!stackOpt) continue;
|
210
|
+
|
211
|
+
column.stack = {
|
212
|
+
id: stackOpt.stackId,
|
213
|
+
spreading: stackOpt.spreading,
|
214
|
+
collapsed: stackOpt.collapsed
|
215
|
+
};
|
216
|
+
}
|
217
|
+
|
218
|
+
return obj;
|
219
|
+
};
|
220
|
+
|
221
|
+
/** @override
|
222
|
+
*/
|
223
|
+
ColumnStackPlugin.prototype._afterInit = function () {
|
224
|
+
if(this._pendingStacks) {
|
225
|
+
for(var sid in this._pendingStacks) {
|
226
|
+
this.stackColumns(this._pendingStacks[sid].colIndices, sid, this._pendingStacks[sid]);
|
227
|
+
}
|
228
|
+
this._pendingStacks = null;
|
229
|
+
}
|
230
|
+
// In case of lazy loading
|
231
|
+
// DO something
|
232
|
+
};
|
233
|
+
/** @private
|
234
|
+
* @param {object} stackRef
|
235
|
+
* @return {number}
|
236
|
+
*/
|
237
|
+
ColumnStackPlugin.prototype._getColumnIndex = function(stackRef) {
|
238
|
+
var colCount = this.getColumnCount();
|
239
|
+
var stacking, index = -1;
|
240
|
+
for(var i = 0; i < colCount; i++) {
|
241
|
+
stacking = this._getColumnStacking(i);
|
242
|
+
if(stackRef === stacking) {
|
243
|
+
index = i;
|
244
|
+
break;
|
245
|
+
}
|
246
|
+
}
|
247
|
+
return index;
|
248
|
+
};
|
249
|
+
/** @private
|
250
|
+
* @param {number} colIndex
|
251
|
+
* @param {object} stacking
|
252
|
+
*/
|
253
|
+
ColumnStackPlugin.prototype._setColumnStacking = function(colIndex, stacking) {
|
254
|
+
var colData = this._newColumnData(colIndex);
|
255
|
+
colData["stack"] = stacking;
|
256
|
+
};
|
257
|
+
/** @private
|
258
|
+
* @param {number} colIndex
|
259
|
+
* @return {*}
|
260
|
+
*/
|
261
|
+
ColumnStackPlugin.prototype._getColumnStacking = function(colIndex) {
|
262
|
+
return this._getColumnOption(colIndex, "stack");
|
263
|
+
};
|
264
|
+
/** @private
|
265
|
+
* @param {number} colIndex
|
266
|
+
* @param {object} stackOptions
|
267
|
+
*/
|
268
|
+
ColumnStackPlugin.prototype._setColumnStackOptions = function(colIndex, stackOptions) {
|
269
|
+
var stacking = this._getColumnStacking(colIndex);
|
270
|
+
if(stacking) {
|
271
|
+
stacking["stackOpt"] = stackOptions;
|
272
|
+
}
|
273
|
+
};
|
274
|
+
/** @private
|
275
|
+
* @param {number} colIndex
|
276
|
+
* @return {*}
|
277
|
+
*/
|
278
|
+
ColumnStackPlugin.prototype._getColumnStackOptions = function(colIndex) {
|
279
|
+
var stacking = this._getColumnStacking(colIndex);
|
280
|
+
if(stacking){
|
281
|
+
return stacking["stackOpt"] || null;
|
282
|
+
}
|
283
|
+
return null;
|
284
|
+
};
|
285
|
+
/** @private
|
286
|
+
* @param {number} colIndex
|
287
|
+
*/
|
288
|
+
ColumnStackPlugin.prototype._removeColumnStacking = function(colIndex) {
|
289
|
+
var colData = this._getColumnData(colIndex);
|
290
|
+
colData["stack"] = {};
|
291
|
+
};
|
292
|
+
/** @private
|
293
|
+
* @return {!Array.<number>} Sorted column indices
|
294
|
+
*/
|
295
|
+
ColumnStackPlugin.prototype._getSelectedColumns = function() {
|
296
|
+
var csp = this._getPlugin("ColumnSelectionPlugin");
|
297
|
+
return (csp && csp.isEnabled()) ? csp.getSelectedColumns() : [];
|
298
|
+
};
|
299
|
+
/** @private
|
300
|
+
* @param {number} colIndex
|
301
|
+
* @param {boolean} shown
|
302
|
+
*/
|
303
|
+
ColumnStackPlugin.prototype._setColumnVisibility = function(colIndex, shown) {
|
304
|
+
if(colIndex >= 0) {
|
305
|
+
for(var g = this._hosts.length; --g >= 0;) {
|
306
|
+
this._hosts[g].setColumnVisibility(colIndex, shown, 2);
|
307
|
+
}
|
308
|
+
}
|
309
|
+
};
|
310
|
+
/** @private
|
311
|
+
* @param {number} colIndex
|
312
|
+
* @param {number} destIndex
|
313
|
+
*/
|
314
|
+
ColumnStackPlugin.prototype._moveColumn = function(colIndex, destIndex) {
|
315
|
+
if(colIndex >= 0 && destIndex >= 0 && colIndex !== destIndex) {
|
316
|
+
for(var i = this._hosts.length; --i >= 0;) {
|
317
|
+
this._hosts[i].moveColumn(colIndex, destIndex);
|
318
|
+
}
|
319
|
+
}
|
320
|
+
};
|
321
|
+
/** @private
|
322
|
+
* @param {Array.<object>} stackRefs
|
323
|
+
*/
|
324
|
+
ColumnStackPlugin.prototype._moveStackedColumns = function (stackRefs) {
|
325
|
+
var len = stackRefs.length;
|
326
|
+
for(var i = 1; i < len; ++i) {
|
327
|
+
var fromIndex = this._getColumnIndex(stackRefs[i]);
|
328
|
+
var destIndex = this._getColumnIndex(stackRefs[0]); // Active Column may be shifted due to the move
|
329
|
+
this._moveColumn(fromIndex, destIndex + i);
|
330
|
+
}
|
331
|
+
};
|
332
|
+
/** @private
|
333
|
+
* @return {number}
|
334
|
+
*/
|
335
|
+
ColumnStackPlugin.prototype._getColumnCount = function() {
|
336
|
+
var host = this._host || this._hosts[0];
|
337
|
+
return host ? host.getColumnCount() : 0;
|
338
|
+
};
|
339
|
+
/** @private
|
340
|
+
* @return {boolean}
|
341
|
+
*/
|
342
|
+
ColumnStackPlugin.prototype._isIconAvailable = function() {
|
343
|
+
return ElfUtil.hasComponent("ef-icon") &&
|
344
|
+
(ElfUtil.hasTheme("elf-theme-solar") ||
|
345
|
+
ElfUtil.hasTheme("elf-theme-luna"));
|
346
|
+
};
|
347
|
+
/** @private */
|
348
|
+
ColumnStackPlugin.prototype._updateUI = function() {
|
349
|
+
if(this._conflator.conflate()) {
|
350
|
+
return;
|
351
|
+
}
|
352
|
+
|
353
|
+
var colCount = this._getColumnCount();
|
354
|
+
var gridCount = this._hosts.length;
|
355
|
+
for(var c = 0; c < colCount; ++c) {
|
356
|
+
var colData = this._getColumnStackOptions(c);
|
357
|
+
var stackRefs = (colData) ? colData.stackRefs : null;
|
358
|
+
var spreading = (colData) ? colData.spreading : false;
|
359
|
+
for(var g = 0; g < gridCount; ++g) {
|
360
|
+
var host = this._hosts[g];
|
361
|
+
host.enableColumnClass(c, "grouped", spreading === true);
|
362
|
+
var tSect = host.getSection("title");
|
363
|
+
var rowCount = tSect.getRowCount();
|
364
|
+
var cell = tSect.getCell(c, rowCount - 1, true);
|
365
|
+
if(!cell) { continue; }
|
366
|
+
|
367
|
+
var stackIcon = cell._stackIcon;
|
368
|
+
if(stackRefs) {
|
369
|
+
if(!stackIcon && this.isActiveStackedColumn(c)) {
|
370
|
+
if(spreading) {
|
371
|
+
cell.addClass("grouping");
|
372
|
+
if(this._expandIconName) {
|
373
|
+
if(colData.collapsed) {
|
374
|
+
stackIcon = Icon.create(this._expandIconName);
|
375
|
+
} else {
|
376
|
+
stackIcon = Icon.create(this._collapseIconName);
|
377
|
+
}
|
378
|
+
} else {
|
379
|
+
if(colData.collapsed) {
|
380
|
+
stackIcon = Dom.text(">");
|
381
|
+
} else {
|
382
|
+
stackIcon = Dom.text("<");
|
383
|
+
}
|
384
|
+
}
|
385
|
+
} else {
|
386
|
+
cell.addClass("stacking");
|
387
|
+
if(this._stackIconName) {
|
388
|
+
stackIcon = Icon.create(this._stackIconName);
|
389
|
+
} else {
|
390
|
+
stackIcon = Dom.text("\u2261");
|
391
|
+
stackIcon.style.fontSize = "1.3em";
|
392
|
+
}
|
393
|
+
}
|
394
|
+
stackIcon.className = "stack-icon";
|
395
|
+
stackIcon.addEventListener("click", this._onStackButtonClicked, false);
|
396
|
+
stackIcon.addEventListener("dblclick", preventDefault, false);
|
397
|
+
stackIcon.addEventListener("mousedown", preventDefault, false);
|
398
|
+
stackIcon.addEventListener("keydown", preventDefault, false);
|
399
|
+
|
400
|
+
cell.insertFloatingIcon(stackIcon, 20);
|
401
|
+
cell._stackIcon = stackIcon;
|
402
|
+
|
403
|
+
this._dispatch("iconCreated", {"icon": stackIcon, "colIndex": c, "grid": host, "cell": cell});
|
404
|
+
} else if(stackIcon && this.isInactiveStackedColumn(c)) {
|
405
|
+
cell.removeFloatingIcon(cell._stackIcon);
|
406
|
+
cell._stackIcon = null;
|
407
|
+
}
|
408
|
+
} else if(stackIcon) {
|
409
|
+
cell.removeFloatingIcon(cell._stackIcon);
|
410
|
+
cell._stackIcon = null;
|
411
|
+
if(spreading) {
|
412
|
+
cell.removeClass("grouping");
|
413
|
+
} else {
|
414
|
+
cell.removeClass("stacking");
|
415
|
+
}
|
416
|
+
}
|
417
|
+
}
|
418
|
+
if(colData) {
|
419
|
+
if(spreading) {
|
420
|
+
this._collapseMember(c, colData.collapsed);
|
421
|
+
} else {
|
422
|
+
this._setColumnVisibility(c, this.isActiveStackedColumn(c)); // a little slow
|
423
|
+
}
|
424
|
+
}
|
425
|
+
}
|
426
|
+
};
|
427
|
+
/** @private
|
428
|
+
* @param {number} colIndex
|
429
|
+
* @param {boolean} collapsed
|
430
|
+
*/
|
431
|
+
ColumnStackPlugin.prototype._collapseMember = function(colIndex, collapsed) {
|
432
|
+
var colData = this._getColumnStackOptions(colIndex);
|
433
|
+
if(!colData) {
|
434
|
+
return;
|
435
|
+
}
|
436
|
+
|
437
|
+
for (var i = this._hosts.length; --i >= 0;) {
|
438
|
+
var host = this._hosts[i];
|
439
|
+
host.enableColumnClass(colIndex, "collapsed", collapsed);
|
440
|
+
|
441
|
+
if(this.isActiveStackedColumn(colIndex)) {
|
442
|
+
host.setColumnVisibility(colIndex, true, 2);
|
443
|
+
var tSect = host.getSection("title");
|
444
|
+
var rowCount = tSect.getRowCount();
|
445
|
+
var cell = tSect.getCell(colIndex, rowCount - 1, true);
|
446
|
+
if(collapsed) {
|
447
|
+
if(colData.collapsed !== collapsed || !colData._origWidth) { // Prevent from getting width while column is collapsed
|
448
|
+
colData._origWidth = this._getColumnWidth(host, colIndex);
|
449
|
+
colData._scalable = host.getColumnScalability(colIndex);
|
450
|
+
}
|
451
|
+
|
452
|
+
host.setColumnWidth(colIndex, tSect.getRowHeight(0), false);
|
453
|
+
|
454
|
+
if(cell._stackIcon) {
|
455
|
+
if(this._expandIconName) {
|
456
|
+
cell._stackIcon.setAttribute("icon", "right");
|
457
|
+
} else {
|
458
|
+
cell._stackIcon.textContent = ">";
|
459
|
+
}
|
460
|
+
}
|
461
|
+
} else {
|
462
|
+
if(colData._origWidth != null) {
|
463
|
+
host.setColumnWidth(colIndex, colData._origWidth, colData._scalable);
|
464
|
+
}
|
465
|
+
|
466
|
+
if(cell._stackIcon) {
|
467
|
+
if(this._collapseIconName) {
|
468
|
+
cell._stackIcon.setAttribute("icon", "left");
|
469
|
+
} else {
|
470
|
+
cell._stackIcon.textContent = "<";
|
471
|
+
}
|
472
|
+
}
|
473
|
+
}
|
474
|
+
} else {
|
475
|
+
host.setColumnVisibility(colIndex, !collapsed, 2);
|
476
|
+
}
|
477
|
+
}
|
478
|
+
|
479
|
+
colData.collapsed = collapsed;
|
480
|
+
};
|
481
|
+
/** Get column width that is currently defined in the layout inside grid <br>
|
482
|
+
* (not included the effect by this extension). <br>
|
483
|
+
* Hidden column still gives positive size as oppose to visibly 0 size
|
484
|
+
* @private
|
485
|
+
* @param {Object} host core grid object
|
486
|
+
* @param {number} colIndex
|
487
|
+
* @return {number}
|
488
|
+
*/
|
489
|
+
ColumnStackPlugin.prototype._getColumnWidth = function(host, colIndex) {
|
490
|
+
if(host) {
|
491
|
+
var min = host.getMinimumColumnWidth(colIndex);
|
492
|
+
var size = host.getColumnCustomLaneSize(colIndex);
|
493
|
+
return (size < min) ? min : size; // Column width cannot be smaller than min
|
494
|
+
}
|
495
|
+
return NaN;
|
496
|
+
};
|
497
|
+
/** @public
|
498
|
+
* @param {number} colIndex
|
499
|
+
* @return {Array.<number>} Null if there is no column data
|
500
|
+
*/
|
501
|
+
ColumnStackPlugin.prototype.getMemberIndices = function(colIndex) {
|
502
|
+
var colData = this._getColumnStackOptions(colIndex);
|
503
|
+
if(!colData) {
|
504
|
+
return null;
|
505
|
+
}
|
506
|
+
|
507
|
+
var stackRefs = colData.stackRefs;
|
508
|
+
var len = stackRefs.length;
|
509
|
+
var indices = [];
|
510
|
+
for(var i = 0; i < len; ++i) {
|
511
|
+
indices.push(this._getColumnIndex(stackRefs[i]));
|
512
|
+
}
|
513
|
+
return indices;
|
514
|
+
};
|
515
|
+
/** @public
|
516
|
+
* @param {number} colIndex
|
517
|
+
* @param {boolean=} collapsed
|
518
|
+
* @return {Array.<number>} Null if it is non-grouped column
|
519
|
+
*/
|
520
|
+
ColumnStackPlugin.prototype.collapseGroup = function(colIndex, collapsed) {
|
521
|
+
var groupMembers = this.getMemberIndices(colIndex);
|
522
|
+
if(!groupMembers) {
|
523
|
+
return null;
|
524
|
+
}
|
525
|
+
|
526
|
+
collapsed = collapsed !== false;
|
527
|
+
for(var j = groupMembers.length; --j >= 0;) {
|
528
|
+
this._collapseMember(groupMembers[j], collapsed);
|
529
|
+
}
|
530
|
+
return groupMembers;
|
531
|
+
};
|
532
|
+
/** @public
|
533
|
+
* @param {number} colIndex
|
534
|
+
* @return {Array.<number>} Null if it is non-grouped column
|
535
|
+
*/
|
536
|
+
ColumnStackPlugin.prototype.expandGroup = function(colIndex) {
|
537
|
+
var groupMembers = this.getMemberIndices(colIndex);
|
538
|
+
if(!groupMembers) {
|
539
|
+
return null;
|
540
|
+
}
|
541
|
+
|
542
|
+
for(var j = groupMembers.length; --j >= 0;) {
|
543
|
+
this._collapseMember(groupMembers[j], false);
|
544
|
+
}
|
545
|
+
return groupMembers;
|
546
|
+
};
|
547
|
+
/** Intended for determining if the selected columns can be stacked from the context menu
|
548
|
+
* @public
|
549
|
+
* @param {Array.<number>} colIndices
|
550
|
+
* @return {boolean} Return true if all of the given columns can be stacked together
|
551
|
+
*/
|
552
|
+
ColumnStackPlugin.prototype.isColumnStackable = function(colIndices) {
|
553
|
+
if(!colIndices) {
|
554
|
+
return false;
|
555
|
+
}
|
556
|
+
|
557
|
+
var len = colIndices.length;
|
558
|
+
for(var i = 0; i < len; ++i) {
|
559
|
+
var colIndex = colIndices[i];
|
560
|
+
if(this.isColumnInCollection(colIndex)) {
|
561
|
+
return false;
|
562
|
+
}
|
563
|
+
}
|
564
|
+
return true;
|
565
|
+
};
|
566
|
+
/** Deprecated. Use isColumnInCollection instead.
|
567
|
+
* @public
|
568
|
+
* @param {Array.<number>=} colIndices
|
569
|
+
* @return {boolean} Return true if one of the columns is being stacked
|
570
|
+
*/
|
571
|
+
ColumnStackPlugin.prototype.isColumnStacked = function(colIndices) {
|
572
|
+
if(!colIndices) {
|
573
|
+
colIndices = this._getSelectedColumns();
|
574
|
+
}
|
575
|
+
var len = colIndices.length;
|
576
|
+
for(var i = 0; i < len; ++i) {
|
577
|
+
var colData = this._getColumnStackOptions(colIndices[i]);
|
578
|
+
if(colData && colData.stackRefs) {
|
579
|
+
return true;
|
580
|
+
}
|
581
|
+
}
|
582
|
+
return false;
|
583
|
+
};
|
584
|
+
/** This is used for removing some column state while the column is inactive
|
585
|
+
* @public
|
586
|
+
* @param {number} colIndex
|
587
|
+
* @return {boolean} Return true if the columns is grouped and inactive
|
588
|
+
*/
|
589
|
+
ColumnStackPlugin.prototype.isInactiveStackedColumn = function(colIndex) {
|
590
|
+
var stackOpt = this._getColumnStackOptions(colIndex);
|
591
|
+
if(stackOpt && stackOpt.stackRefs) {
|
592
|
+
return colIndex !== this._getColumnIndex(stackOpt.activeColumn);
|
593
|
+
}
|
594
|
+
return false;
|
595
|
+
};
|
596
|
+
/** Check if the given column is active (visible) in the stack
|
597
|
+
* @public
|
598
|
+
* @param {number} colIndex
|
599
|
+
* @return {boolean}
|
600
|
+
*/
|
601
|
+
ColumnStackPlugin.prototype.isActiveStackedColumn = function(colIndex) {
|
602
|
+
var stackOpt = this._getColumnStackOptions(colIndex);
|
603
|
+
if(stackOpt && stackOpt.stackRefs) {
|
604
|
+
return colIndex === this._getColumnIndex(stackOpt.activeColumn);
|
605
|
+
}
|
606
|
+
return true;
|
607
|
+
};
|
608
|
+
|
609
|
+
/** @public
|
610
|
+
* @param {number} colIndex
|
611
|
+
* @return {boolean}
|
612
|
+
*/
|
613
|
+
ColumnStackPlugin.prototype.isStackingMode = function(colIndex) {
|
614
|
+
var stackOpt = this._getColumnStackOptions(colIndex);
|
615
|
+
if(stackOpt) {
|
616
|
+
return stackOpt.spreading !== true;
|
617
|
+
}
|
618
|
+
return false;
|
619
|
+
};
|
620
|
+
/** @public
|
621
|
+
* @param {number} colIndex
|
622
|
+
* @return {boolean}
|
623
|
+
*/
|
624
|
+
ColumnStackPlugin.prototype.isCollapsingMode = function(colIndex) {
|
625
|
+
var stackOpt = this._getColumnStackOptions(colIndex);
|
626
|
+
if(stackOpt) {
|
627
|
+
return stackOpt.spreading === true;
|
628
|
+
}
|
629
|
+
return false;
|
630
|
+
};
|
631
|
+
/** @public
|
632
|
+
* @param {number} colIndex
|
633
|
+
* @return {boolean}
|
634
|
+
*/
|
635
|
+
ColumnStackPlugin.prototype.isColumnInCollection = function(colIndex) {
|
636
|
+
var stackOpt = this._getColumnStackOptions(colIndex);
|
637
|
+
if(stackOpt) {
|
638
|
+
return true;
|
639
|
+
}
|
640
|
+
return false;
|
641
|
+
};
|
642
|
+
/** Alias of isColumnInCollection
|
643
|
+
* @public
|
644
|
+
* @type {function}
|
645
|
+
* @param {number} colIndex
|
646
|
+
* @return {boolean}
|
647
|
+
*/
|
648
|
+
ColumnStackPlugin.prototype.isInCollection = ColumnStackPlugin.prototype.isColumnInCollection;
|
649
|
+
/** Return collapsing state in collapsing mode. Always return false for stacking mode
|
650
|
+
* @public
|
651
|
+
* @param {number} colIndex
|
652
|
+
* @return {boolean}
|
653
|
+
*/
|
654
|
+
ColumnStackPlugin.prototype.isColumnCollapsed = function(colIndex) {
|
655
|
+
var stackOpt = this._getColumnStackOptions(colIndex);
|
656
|
+
if(stackOpt) {
|
657
|
+
return (stackOpt.spreading === true) && (stackOpt.collapsed === true);
|
658
|
+
}
|
659
|
+
return false;
|
660
|
+
};
|
661
|
+
/** @public
|
662
|
+
* @param {number} colIndex
|
663
|
+
* @return {boolean}
|
664
|
+
*/
|
665
|
+
ColumnStackPlugin.prototype.isColumnActive = function(colIndex) {
|
666
|
+
var stackOpt = this._getColumnStackOptions(colIndex);
|
667
|
+
if(stackOpt) {
|
668
|
+
if(stackOpt.spreading) {
|
669
|
+
if(!stackOpt.collapsed) {
|
670
|
+
return true;
|
671
|
+
} else {
|
672
|
+
return false;
|
673
|
+
}
|
674
|
+
} else {
|
675
|
+
return colIndex === this._getColumnIndex(stackOpt.activeColumn);
|
676
|
+
}
|
677
|
+
}
|
678
|
+
return false;
|
679
|
+
};
|
680
|
+
|
681
|
+
/** @public
|
682
|
+
* @param {number} colIndex
|
683
|
+
* @return {string}
|
684
|
+
*/
|
685
|
+
ColumnStackPlugin.prototype.getStackId = function(colIndex) {
|
686
|
+
var colData = this._getColumnStackOptions(colIndex);
|
687
|
+
return colData ? colData.stackId : "";
|
688
|
+
};
|
689
|
+
/** @public
|
690
|
+
* @param {Array.<number>=} colIndices Selected columns will be used, if it is not given
|
691
|
+
* @param {string=} stackId Must be unique
|
692
|
+
* @param {Object=} options
|
693
|
+
* @return {boolean} Return true if all of the given columns is stacked together
|
694
|
+
*/
|
695
|
+
ColumnStackPlugin.prototype.stackColumns = function(colIndices, stackId, options) {
|
696
|
+
if(!colIndices) {
|
697
|
+
colIndices = this._getSelectedColumns();
|
698
|
+
} else {
|
699
|
+
colIndices.sort(function(a, b) { return a - b; });
|
700
|
+
}
|
701
|
+
|
702
|
+
var i, colIndex, len = colIndices.length;
|
703
|
+
var colCount = this.getColumnCount();
|
704
|
+
var validIndices = [];
|
705
|
+
for (i = 0; i < len; i++) {
|
706
|
+
colIndex = colIndices[i];
|
707
|
+
if(colIndex < colCount) {
|
708
|
+
validIndices.push(colIndex);
|
709
|
+
}
|
710
|
+
}
|
711
|
+
len = validIndices.length;
|
712
|
+
if(len <= 1) {
|
713
|
+
return false; // Only two or more columns can be stacked
|
714
|
+
}
|
715
|
+
if(!this.isColumnStackable(validIndices)) {
|
716
|
+
return false;
|
717
|
+
}
|
718
|
+
var sid;
|
719
|
+
if(stackId) {
|
720
|
+
if(this._stacks[stackId]) {
|
721
|
+
return false; // Cannot store the same stack Id
|
722
|
+
}
|
723
|
+
sid = stackId;
|
724
|
+
} else {
|
725
|
+
sid = "Stack" + ColumnStackPlugin._runningId++;
|
726
|
+
while(this._stacks[sid]) {
|
727
|
+
sid = "Stack" + ColumnStackPlugin._runningId++;
|
728
|
+
}
|
729
|
+
}
|
730
|
+
|
731
|
+
options = options || {};
|
732
|
+
|
733
|
+
var activeIndex = validIndices[0];
|
734
|
+
// Collecting data
|
735
|
+
var stack = {};
|
736
|
+
stack.stackId = sid;
|
737
|
+
stack.spreading = options.spreading === true;
|
738
|
+
if(stack.spreading) {
|
739
|
+
activeIndex = validIndices[len - 1];
|
740
|
+
}
|
741
|
+
stack.collapsed = options.collapsed !== false;
|
742
|
+
stack.stackRefs = new Array(len);
|
743
|
+
for(i = 0; i < len; ++i) {
|
744
|
+
colIndex = validIndices[i];
|
745
|
+
this._setColumnStackOptions(colIndex, stack);
|
746
|
+
stack.stackRefs[i] = this._getColumnStacking(colIndex);
|
747
|
+
|
748
|
+
// Prevent from flashing in stack mode
|
749
|
+
if(colIndex !== activeIndex && stack.collapsed !== false) {
|
750
|
+
this._setColumnVisibility(colIndex, false);
|
751
|
+
}
|
752
|
+
}
|
753
|
+
// Make sure that all columns stay packed together
|
754
|
+
this._moveStackedColumns(stack.stackRefs);
|
755
|
+
|
756
|
+
if(stack.spreading) {
|
757
|
+
stack.activeColumn = stack.stackRefs[stack.stackRefs.length - 1]; // Right most column is the active column
|
758
|
+
} else {
|
759
|
+
stack.activeColumn = stack.stackRefs[0]; // Left most column is the active column
|
760
|
+
var csp = this._getPlugin("ColumnSelectionPlugin");
|
761
|
+
if(csp && csp.isEnabled()) {
|
762
|
+
csp.selectSingleColumn(activeIndex);
|
763
|
+
}
|
764
|
+
}
|
765
|
+
this._stacks[sid] = stack;
|
766
|
+
|
767
|
+
|
768
|
+
var cfp = this._getPlugin("ColumnFilterPlugin");
|
769
|
+
if(cfp) {
|
770
|
+
cfp["refresh"]();
|
771
|
+
}
|
772
|
+
this._updateUI(); // asyncronuos
|
773
|
+
return true;
|
774
|
+
};
|
775
|
+
|
776
|
+
/** @public
|
777
|
+
* @description Remove all stacking from the grid and replace it with a new one
|
778
|
+
* @param {Array.<number|string>} colRefs Names of fields or column indices
|
779
|
+
* @return {boolean} true if the stack has been modified
|
780
|
+
*/
|
781
|
+
ColumnStackPlugin.prototype.setStack = function(colRefs) {
|
782
|
+
colRefs = this.getColumnIndices(colRefs);
|
783
|
+
if(colRefs.length <= 1) { // When the array is empty or contains only one element, all stacking is removed
|
784
|
+
return this.removeAllStacks();
|
785
|
+
}
|
786
|
+
|
787
|
+
// Check old data stacking
|
788
|
+
var count = 0, i;
|
789
|
+
var sid = "_uniqueStack"; // WARNING : This hardcode for assign uniqe stacking id
|
790
|
+
if(this._stacks[sid]) {
|
791
|
+
var stackRefs = this._stacks[sid].stackRefs;
|
792
|
+
if(stackRefs.length === colRefs.length) {
|
793
|
+
for (i = 0; i < colRefs.length; i++) {
|
794
|
+
var stacking = this._getColumnStacking(colRefs[i]);
|
795
|
+
var oldStacking = stackRefs[i];
|
796
|
+
if(stacking === oldStacking) {
|
797
|
+
count++;
|
798
|
+
}
|
799
|
+
}
|
800
|
+
if(count === colRefs.length) {
|
801
|
+
return false;
|
802
|
+
}
|
803
|
+
}
|
804
|
+
}
|
805
|
+
|
806
|
+
this.removeAllStacks(false); // Remove the stack without updating the UI (UI will only update when column is stacked)
|
807
|
+
|
808
|
+
var activeIndex = colRefs[0]; // For the active index, choose the first element.
|
809
|
+
|
810
|
+
// Collecting data
|
811
|
+
var stack = {};
|
812
|
+
stack.stackId = sid;
|
813
|
+
stack.spreading = false;
|
814
|
+
stack.stackRefs = new Array(colRefs.length);
|
815
|
+
for(i = 0; i < colRefs.length; ++i) {
|
816
|
+
var colIndex = colRefs[i];
|
817
|
+
stack.stackRefs[i] = this._getColumnStacking(colIndex);
|
818
|
+
this._setColumnStackOptions(colIndex, stack);
|
819
|
+
|
820
|
+
// Prevent from flashing in stack mode
|
821
|
+
if(colIndex !== activeIndex && stack.collapsed !== false) {
|
822
|
+
this._setColumnVisibility(colIndex, false);
|
823
|
+
}
|
824
|
+
}
|
825
|
+
stack.activeColumn = stack.stackRefs[0]; // The first stacking (the first given columns) is the active column
|
826
|
+
this._stacks[sid] = stack;
|
827
|
+
var cfp = this._getPlugin("ColumnFilterPlugin");
|
828
|
+
if(cfp) {
|
829
|
+
cfp["refresh"]();
|
830
|
+
}
|
831
|
+
this._updateUI(); // asyncronuos
|
832
|
+
return true;
|
833
|
+
};
|
834
|
+
/** @public
|
835
|
+
* @param {Array.<number>=} colIndices Selected columns will be used, if it is not given
|
836
|
+
* @return {boolean}
|
837
|
+
*/
|
838
|
+
ColumnStackPlugin.prototype.unstackColumns = function(colIndices) {
|
839
|
+
if(!colIndices) {
|
840
|
+
colIndices = this._getSelectedColumns();
|
841
|
+
}
|
842
|
+
|
843
|
+
var i, colIndex;
|
844
|
+
var len = colIndices.length;
|
845
|
+
var stacks = {};
|
846
|
+
var colCount = this.getColumnCount();
|
847
|
+
|
848
|
+
for(i = 0; i < len; ++i) {
|
849
|
+
colIndex = colIndices[i];
|
850
|
+
if(colIndex < colCount) {
|
851
|
+
var colData = this._getColumnStackOptions(colIndex);
|
852
|
+
if(!colData) {
|
853
|
+
continue; // Invalid index
|
854
|
+
}
|
855
|
+
if(colData.collapsed === true) {
|
856
|
+
this.expandGroup(colIndex);
|
857
|
+
}
|
858
|
+
stacks[colData.stackId] = 1; // Exclude duplicate stacks
|
859
|
+
}
|
860
|
+
}
|
861
|
+
|
862
|
+
var dirty = false;
|
863
|
+
var selFrom, selLen;
|
864
|
+
|
865
|
+
for(var sid in stacks) {
|
866
|
+
var stack = this._stacks[sid];
|
867
|
+
if(!stack) {
|
868
|
+
continue; // Invalid stackId
|
869
|
+
}
|
870
|
+
dirty = true;
|
871
|
+
|
872
|
+
var stackRefs = stack.stackRefs;
|
873
|
+
len = stackRefs.length;
|
874
|
+
if(colData && colData.spreading) {
|
875
|
+
selFrom = this._getColumnIndex(stack.stackRefs[0]);
|
876
|
+
} else {
|
877
|
+
selFrom = this._getColumnIndex(stack.activeColumn);
|
878
|
+
}
|
879
|
+
selLen = len - 1;
|
880
|
+
|
881
|
+
for(i = 0; i < len; ++i) {
|
882
|
+
var stackRef = stackRefs[i];
|
883
|
+
colIndex = this._getColumnIndex(stackRef);
|
884
|
+
this._removeColumnStacking(colIndex);
|
885
|
+
this._setColumnVisibility(colIndex, true);
|
886
|
+
}
|
887
|
+
|
888
|
+
delete this._stacks[sid]; // Remove all reference to the stack
|
889
|
+
}
|
890
|
+
if(dirty) {
|
891
|
+
var csp = this._getPlugin("ColumnSelectionPlugin");
|
892
|
+
if(csp && csp.isEnabled()) {
|
893
|
+
csp.selectRange(selFrom, selLen);
|
894
|
+
}
|
895
|
+
var cfp = this._getPlugin("ColumnFilterPlugin");
|
896
|
+
if(cfp) {
|
897
|
+
cfp["refresh"]();
|
898
|
+
}
|
899
|
+
this._updateUI(); // asyncronuos
|
900
|
+
}
|
901
|
+
|
902
|
+
return dirty;
|
903
|
+
};
|
904
|
+
/** @public
|
905
|
+
* @param {boolean=} enableUpdateUI set false if you want to remove without update UI
|
906
|
+
* @return {boolean} true if at least one stacking removed
|
907
|
+
*/
|
908
|
+
ColumnStackPlugin.prototype.removeAllStacks = function(enableUpdateUI) {
|
909
|
+
var disableUpdateUI = enableUpdateUI === false;
|
910
|
+
var dirty = false;
|
911
|
+
for(var sid in this._stacks) {
|
912
|
+
var stack = this._stacks[sid];
|
913
|
+
dirty = true;
|
914
|
+
|
915
|
+
var stackRefs = stack.stackRefs;
|
916
|
+
var len = stackRefs.length;
|
917
|
+
for(var i = 0; i < len; ++i) {
|
918
|
+
var stackRef = stackRefs[i];
|
919
|
+
var colIndex = this._getColumnIndex(stackRef);
|
920
|
+
if(stack.collapsed) {
|
921
|
+
this.collapseGroup(colIndex, false);
|
922
|
+
}
|
923
|
+
this._removeColumnStacking(colIndex);
|
924
|
+
this._setColumnVisibility(colIndex, true);
|
925
|
+
}
|
926
|
+
}
|
927
|
+
if(dirty) {
|
928
|
+
this._stacks = {};
|
929
|
+
if(!disableUpdateUI) {
|
930
|
+
this._updateUI(); // asyncronous
|
931
|
+
}
|
932
|
+
}
|
933
|
+
return dirty;
|
934
|
+
};
|
935
|
+
/** @public
|
936
|
+
* @param {number|Event} colRef
|
937
|
+
* @param {number} swappingIndex
|
938
|
+
* @return {boolean}
|
939
|
+
*/
|
940
|
+
ColumnStackPlugin.prototype.swapColumn = function(colRef, swappingIndex) {
|
941
|
+
var colIndex = -1;
|
942
|
+
if(typeof colRef == "number") {
|
943
|
+
colIndex = colRef;
|
944
|
+
} else {
|
945
|
+
var grid = this.getRelativeGrid(colRef);
|
946
|
+
if(grid) {
|
947
|
+
var pos = grid.getRelativePosition(colRef);
|
948
|
+
colIndex = pos["colIndex"];
|
949
|
+
}
|
950
|
+
}
|
951
|
+
|
952
|
+
var colData = this._getColumnStackOptions(colIndex);
|
953
|
+
if(!colData) {
|
954
|
+
return false; // Invalid column index
|
955
|
+
}
|
956
|
+
var stackRefs = colData.stackRefs;
|
957
|
+
if(!stackRefs) {
|
958
|
+
return false; // Invalid column type
|
959
|
+
}
|
960
|
+
var newActiveColumn = stackRefs[swappingIndex];
|
961
|
+
if(!newActiveColumn) {
|
962
|
+
return false; // Invalid selected index
|
963
|
+
}
|
964
|
+
|
965
|
+
if(newActiveColumn === colData.activeColumn) {
|
966
|
+
return false; // The given index is already active stacked column
|
967
|
+
}
|
968
|
+
|
969
|
+
colData.stackRefs.splice(swappingIndex, 1);
|
970
|
+
colData.stackRefs.unshift(newActiveColumn); // Move data to front
|
971
|
+
var prevActiveColumnIndex = this._getColumnIndex(colData.activeColumn);
|
972
|
+
var newActiveColumnIndex = this._getColumnIndex(newActiveColumn);
|
973
|
+
this._moveColumn(newActiveColumnIndex, prevActiveColumnIndex); // Move UI to front
|
974
|
+
|
975
|
+
this._setColumnVisibility(prevActiveColumnIndex, false); // Hide current active column
|
976
|
+
colData.activeColumn = newActiveColumn; // Change active column
|
977
|
+
this._setColumnVisibility(newActiveColumnIndex, true);
|
978
|
+
|
979
|
+
var csp = this._getPlugin("ColumnSelectionPlugin");
|
980
|
+
if(csp && csp.isEnabled()) {
|
981
|
+
csp.selectSingleColumn(newActiveColumnIndex);
|
982
|
+
}
|
983
|
+
var cfp = this._getPlugin("ColumnFilterPlugin");
|
984
|
+
if(cfp) {
|
985
|
+
cfp["refresh"]();
|
986
|
+
}
|
987
|
+
|
988
|
+
this._updateUI();
|
989
|
+
// this._hosts.forEach(function(host){
|
990
|
+
// host.updateLayout();
|
991
|
+
// });
|
992
|
+
|
993
|
+
return true;
|
994
|
+
};
|
995
|
+
|
996
|
+
/** @private
|
997
|
+
* @param {Object} e
|
998
|
+
*/
|
999
|
+
ColumnStackPlugin.prototype._onPreSectionRender = function (e) {
|
1000
|
+
if (e["sectionType"] !== "title") {
|
1001
|
+
return;
|
1002
|
+
}
|
1003
|
+
this._updateUI(); // asyncronuos
|
1004
|
+
};
|
1005
|
+
/** @private
|
1006
|
+
* @param {Object} e
|
1007
|
+
*/
|
1008
|
+
ColumnStackPlugin.prototype._onColumnRemoved = function (e) {
|
1009
|
+
var colData = /** @type{Object} */(e.columnData);
|
1010
|
+
if(!colData) { return; }
|
1011
|
+
|
1012
|
+
var stacking = colData["stack"];
|
1013
|
+
if(!stacking) { return; }
|
1014
|
+
|
1015
|
+
var stackOpt = stacking["stackOpt"];
|
1016
|
+
if(!stackOpt) { return; }
|
1017
|
+
|
1018
|
+
// update members
|
1019
|
+
if(stackOpt.stackRefs) {
|
1020
|
+
var index = stackOpt.stackRefs.indexOf(stacking);
|
1021
|
+
if(index > -1) {
|
1022
|
+
stackOpt.stackRefs.splice(index, 1);
|
1023
|
+
if(stackOpt.stackRefs.length < 2) {
|
1024
|
+
// delete group
|
1025
|
+
var colIndex = this._getColumnIndex(stackOpt.activeColumn);
|
1026
|
+
this.unstackColumns([colIndex]);
|
1027
|
+
} else {
|
1028
|
+
if(stackOpt.spreading) {
|
1029
|
+
stackOpt.activeColumn = stackOpt.stackRefs[stackOpt.stackRefs.length - 1];
|
1030
|
+
} else {
|
1031
|
+
stackOpt.activeColumn = stackOpt.stackRefs[0];
|
1032
|
+
}
|
1033
|
+
this._updateUI();
|
1034
|
+
}
|
1035
|
+
}
|
1036
|
+
}
|
1037
|
+
|
1038
|
+
colData["stack"] = null;
|
1039
|
+
};
|
1040
|
+
|
1041
|
+
/** @private
|
1042
|
+
* @param {Object} e
|
1043
|
+
*/
|
1044
|
+
ColumnStackPlugin.prototype._onColumnMoved = function (e) {
|
1045
|
+
var toIndex = e.toColIndex;
|
1046
|
+
var stackOpt = this._getColumnStackOptions(toIndex);
|
1047
|
+
|
1048
|
+
// column swaping
|
1049
|
+
if(stackOpt && !stackOpt.spreading) {
|
1050
|
+
return;
|
1051
|
+
}
|
1052
|
+
|
1053
|
+
var stackRef = this._getColumnStacking(toIndex);
|
1054
|
+
|
1055
|
+
var leftStackOpt = this._getColumnStackOptions(toIndex - 1);
|
1056
|
+
var rightStackOpt = this._getColumnStackOptions(toIndex + 1);
|
1057
|
+
var index, leftColStackRef;
|
1058
|
+
// move inside
|
1059
|
+
if(stackOpt) {
|
1060
|
+
if(stackOpt === leftStackOpt) {
|
1061
|
+
leftStackOpt.stackRefs.splice(leftStackOpt.stackRefs.indexOf(stackRef), 1);
|
1062
|
+
leftColStackRef = this._getColumnStacking(toIndex - 1);
|
1063
|
+
index = leftStackOpt.stackRefs.indexOf(leftColStackRef);
|
1064
|
+
if(index > -1) {
|
1065
|
+
leftStackOpt.stackRefs.splice(index + 1, 0, stackRef);
|
1066
|
+
if(leftStackOpt.spreading) {
|
1067
|
+
leftStackOpt.activeColumn = leftStackOpt.stackRefs[leftStackOpt.stackRefs.length - 1];
|
1068
|
+
} else {
|
1069
|
+
leftStackOpt.activeColumn = leftStackOpt.stackRefs[0];
|
1070
|
+
}
|
1071
|
+
}
|
1072
|
+
this._updateUI();
|
1073
|
+
return;
|
1074
|
+
} else if(stackOpt === rightStackOpt) {
|
1075
|
+
rightStackOpt.stackRefs.splice(rightStackOpt.stackRefs.indexOf(stackRef), 1);
|
1076
|
+
var rightColStackRef = this._getColumnStacking(toIndex + 1);
|
1077
|
+
index = rightStackOpt.stackRefs.indexOf(rightColStackRef);
|
1078
|
+
if(index > -1) {
|
1079
|
+
rightStackOpt.stackRefs.splice(index, 0, stackRef);
|
1080
|
+
if(rightStackOpt.spreading) {
|
1081
|
+
rightStackOpt.activeColumn = rightStackOpt.stackRefs[rightStackOpt.stackRefs.length - 1];
|
1082
|
+
} else {
|
1083
|
+
rightStackOpt.activeColumn = rightStackOpt.stackRefs[0];
|
1084
|
+
}
|
1085
|
+
}
|
1086
|
+
this._updateUI();
|
1087
|
+
return;
|
1088
|
+
}
|
1089
|
+
}
|
1090
|
+
|
1091
|
+
var dirty = false;
|
1092
|
+
|
1093
|
+
var fromIndex = e.fromColIndex;
|
1094
|
+
var rIndex = fromIndex + 1;
|
1095
|
+
if(toIndex > fromIndex) {
|
1096
|
+
// move right
|
1097
|
+
rIndex = fromIndex;
|
1098
|
+
}
|
1099
|
+
var lIndex = rIndex - 1;
|
1100
|
+
|
1101
|
+
// move out checking
|
1102
|
+
leftStackOpt = this._getColumnStackOptions(lIndex);
|
1103
|
+
if(leftStackOpt && leftStackOpt.spreading) {
|
1104
|
+
index = leftStackOpt.stackRefs.indexOf(stackRef);
|
1105
|
+
if(index > -1) {
|
1106
|
+
leftStackOpt.stackRefs.splice(index, 1);
|
1107
|
+
if(leftStackOpt.spreading) {
|
1108
|
+
leftStackOpt.activeColumn = leftStackOpt.stackRefs[leftStackOpt.stackRefs.length - 1];
|
1109
|
+
} else {
|
1110
|
+
leftStackOpt.activeColumn = leftStackOpt.stackRefs[0];
|
1111
|
+
}
|
1112
|
+
this._setColumnStackOptions(toIndex, null);
|
1113
|
+
dirty = true;
|
1114
|
+
}
|
1115
|
+
}
|
1116
|
+
|
1117
|
+
rightStackOpt = this._getColumnStackOptions(rIndex);
|
1118
|
+
if(rightStackOpt && rightStackOpt.spreading) {
|
1119
|
+
index = rightStackOpt.stackRefs.indexOf(stackRef);
|
1120
|
+
if(index > -1) {
|
1121
|
+
rightStackOpt.stackRefs.splice(index, 1);
|
1122
|
+
if(rightStackOpt.spreading) {
|
1123
|
+
rightStackOpt.activeColumn = rightStackOpt.stackRefs[rightStackOpt.stackRefs.length - 1];
|
1124
|
+
} else {
|
1125
|
+
rightStackOpt.activeColumn = rightStackOpt.stackRefs[0];
|
1126
|
+
}
|
1127
|
+
this._setColumnStackOptions(toIndex, null);
|
1128
|
+
dirty = true;
|
1129
|
+
}
|
1130
|
+
}
|
1131
|
+
|
1132
|
+
// move in checking
|
1133
|
+
rIndex = toIndex + 1;
|
1134
|
+
lIndex = rIndex - 2;
|
1135
|
+
leftStackOpt = this._getColumnStackOptions(lIndex);
|
1136
|
+
rightStackOpt = this._getColumnStackOptions(rIndex);
|
1137
|
+
if(leftStackOpt && leftStackOpt.spreading &&
|
1138
|
+
(leftStackOpt === rightStackOpt)) {
|
1139
|
+
leftColStackRef = this._getColumnStacking(toIndex - 1);
|
1140
|
+
index = leftStackOpt.stackRefs.indexOf(leftColStackRef);
|
1141
|
+
if(index > -1) {
|
1142
|
+
leftStackOpt.stackRefs.splice(index + 1, 0, stackRef);
|
1143
|
+
if(leftStackOpt.spreading) {
|
1144
|
+
leftStackOpt.activeColumn = leftStackOpt.stackRefs[leftStackOpt.stackRefs.length - 1];
|
1145
|
+
} else {
|
1146
|
+
leftStackOpt.activeColumn = leftStackOpt.stackRefs[0];
|
1147
|
+
}
|
1148
|
+
this._setColumnStackOptions(toIndex, leftStackOpt);
|
1149
|
+
dirty = true;
|
1150
|
+
}
|
1151
|
+
}
|
1152
|
+
|
1153
|
+
if(dirty) {
|
1154
|
+
this._updateUI();
|
1155
|
+
}
|
1156
|
+
};
|
1157
|
+
|
1158
|
+
/** @private
|
1159
|
+
* @param {Object} e
|
1160
|
+
*/
|
1161
|
+
ColumnStackPlugin.prototype._onColumnAdded = function (e) {
|
1162
|
+
var colIndex = e.colIndex;
|
1163
|
+
this._setColumnStacking(colIndex, {});
|
1164
|
+
|
1165
|
+
// add to group
|
1166
|
+
var leftStackOpt = this._getColumnStackOptions(colIndex - 1);
|
1167
|
+
var rightStackOpt = this._getColumnStackOptions(colIndex + 1);
|
1168
|
+
if(leftStackOpt && (leftStackOpt === rightStackOpt)) {
|
1169
|
+
var leftColStackRef = this._getColumnStacking(colIndex - 1);
|
1170
|
+
var stackRef = this._getColumnStacking(colIndex);
|
1171
|
+
var index = leftStackOpt.stackRefs.indexOf(leftColStackRef);
|
1172
|
+
if(index > -1) {
|
1173
|
+
leftStackOpt.stackRefs.splice(index + 1, 0, stackRef);
|
1174
|
+
leftStackOpt.activeColumn = leftStackOpt.stackRefs[leftStackOpt.stackRefs.length - 1];
|
1175
|
+
this._setColumnStackOptions(colIndex, leftStackOpt);
|
1176
|
+
this._updateUI();
|
1177
|
+
}
|
1178
|
+
}
|
1179
|
+
};
|
1180
|
+
/** @private
|
1181
|
+
* @param {Object} e
|
1182
|
+
*/
|
1183
|
+
ColumnStackPlugin.prototype._onStackButtonClicked = function(e) {
|
1184
|
+
var elem = e.currentTarget;
|
1185
|
+
if(e.button) { // right click or middle click
|
1186
|
+
return;
|
1187
|
+
}
|
1188
|
+
|
1189
|
+
var grid = this.getRelativeGrid(e);
|
1190
|
+
var pos = grid.getRelativePosition(e);
|
1191
|
+
var colIndex = pos["colIndex"];
|
1192
|
+
var colData = this._getColumnStackOptions(colIndex);
|
1193
|
+
if(!colData) { return; }
|
1194
|
+
|
1195
|
+
e.stopPropagation();
|
1196
|
+
|
1197
|
+
if(colData.spreading) {
|
1198
|
+
this.collapseGroup(colIndex, !colData.collapsed);
|
1199
|
+
return;
|
1200
|
+
}
|
1201
|
+
|
1202
|
+
var stackRefs = colData.stackRefs;
|
1203
|
+
var activeIndex = stackRefs.indexOf(colData.activeColumn);
|
1204
|
+
var len = stackRefs.length;
|
1205
|
+
var colIndices = new Array(len);
|
1206
|
+
var menuData = new Array(len);
|
1207
|
+
for(var i = len; --i >= 0;) {
|
1208
|
+
colIndices[i] = this._getColumnIndex(stackRefs[i]);
|
1209
|
+
menuData[i] = {
|
1210
|
+
value: i,
|
1211
|
+
selected: i === activeIndex,
|
1212
|
+
label: this.getColumnName(colIndices[i])
|
1213
|
+
};
|
1214
|
+
}
|
1215
|
+
pos["menuData"] = menuData;
|
1216
|
+
pos["activeIndex"] = activeIndex;
|
1217
|
+
pos["columnIndices"] = colIndices;
|
1218
|
+
pos["activeColIndex"] = this._getColumnIndex(colData.activeColumn);
|
1219
|
+
pos["event"] = e;
|
1220
|
+
|
1221
|
+
elem.focus();
|
1222
|
+
this._dispatch("clicked", pos);
|
1223
|
+
};
|
1224
|
+
|
1225
|
+
|
1226
|
+
export default ColumnStackPlugin;
|
1227
|
+
export { ColumnStackPlugin, ColumnStackPlugin as ColumnStack, ColumnStackPlugin as ColumnStackExtension };
|