@refinitiv-ui/efx-grid 0.0.0-dev.12023565035.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +17 -0
- package/README.md +61 -0
- package/lib/column-dragging/es6/ColumnDragging.d.ts +51 -0
- package/lib/column-dragging/es6/ColumnDragging.js +968 -0
- package/lib/column-dragging/es6/index.d.ts +1 -0
- package/lib/column-dragging/es6/index.js +1 -0
- package/lib/column-format-dialog/index.d.ts +2 -0
- package/lib/column-format-dialog/index.js +2 -0
- package/lib/column-format-dialog/lib/column-format-dialog.d.ts +77 -0
- package/lib/column-format-dialog/lib/column-format-dialog.js +2688 -0
- package/lib/column-format-dialog/lib/locale/translation-de.d.ts +7 -0
- package/lib/column-format-dialog/lib/locale/translation-de.js +94 -0
- package/lib/column-format-dialog/lib/locale/translation-en.d.ts +7 -0
- package/lib/column-format-dialog/lib/locale/translation-en.js +94 -0
- package/lib/column-format-dialog/lib/locale/translation-ja.d.ts +7 -0
- package/lib/column-format-dialog/lib/locale/translation-ja.js +94 -0
- package/lib/column-format-dialog/lib/locale/translation-zh-hant.d.ts +7 -0
- package/lib/column-format-dialog/lib/locale/translation-zh-hant.js +94 -0
- package/lib/column-format-dialog/lib/locale/translation-zh.d.ts +7 -0
- package/lib/column-format-dialog/lib/locale/translation-zh.js +94 -0
- package/lib/column-format-dialog/lib/locale/translation.d.ts +11 -0
- package/lib/column-format-dialog/lib/locale/translation.js +18 -0
- package/lib/column-format-dialog/lib/preview-table.d.ts +151 -0
- package/lib/column-format-dialog/lib/preview-table.js +982 -0
- package/lib/column-format-dialog/themes/base.less +429 -0
- package/lib/column-format-dialog/themes/elemental/column-format-dialog.less +1 -0
- package/lib/column-format-dialog/themes/elemental/dark/column-format-dialog.js +4 -0
- package/lib/column-format-dialog/themes/elemental/dark/css/native-elements.css +0 -0
- package/lib/column-format-dialog/themes/elemental/dark/es5/all-elements.js +2 -0
- package/lib/column-format-dialog/themes/elemental/dark/imports/all-elements.js +1 -0
- package/lib/column-format-dialog/themes/elemental/dark/imports/custom-elements.js +1 -0
- package/lib/column-format-dialog/themes/elemental/dark/imports/native-elements.js +0 -0
- package/lib/column-format-dialog/themes/elemental/dark.js +16 -0
- package/lib/column-format-dialog/themes/elemental/defaults.less +1 -0
- package/lib/column-format-dialog/themes/elemental/index.less +5 -0
- package/lib/column-format-dialog/themes/elemental/light/column-format-dialog.js +4 -0
- package/lib/column-format-dialog/themes/elemental/light/css/native-elements.css +0 -0
- package/lib/column-format-dialog/themes/elemental/light/es5/all-elements.js +2 -0
- package/lib/column-format-dialog/themes/elemental/light/imports/all-elements.js +1 -0
- package/lib/column-format-dialog/themes/elemental/light/imports/custom-elements.js +1 -0
- package/lib/column-format-dialog/themes/elemental/light/imports/native-elements.js +0 -0
- package/lib/column-format-dialog/themes/elemental/light.js +16 -0
- package/lib/column-format-dialog/themes/halo/column-format-dialog.less +6 -0
- package/lib/column-format-dialog/themes/halo/dark/column-format-dialog.js +4 -0
- package/lib/column-format-dialog/themes/halo/dark/css/native-elements.css +0 -0
- package/lib/column-format-dialog/themes/halo/dark/es5/all-elements.js +2 -0
- package/lib/column-format-dialog/themes/halo/dark/imports/all-elements.js +1 -0
- package/lib/column-format-dialog/themes/halo/dark/imports/custom-elements.js +1 -0
- package/lib/column-format-dialog/themes/halo/dark/imports/native-elements.js +0 -0
- package/lib/column-format-dialog/themes/halo/dark.js +16 -0
- package/lib/column-format-dialog/themes/halo/defaults.less +1 -0
- package/lib/column-format-dialog/themes/halo/index.less +5 -0
- package/lib/column-format-dialog/themes/halo/light/column-format-dialog.js +4 -0
- package/lib/column-format-dialog/themes/halo/light/css/native-elements.css +0 -0
- package/lib/column-format-dialog/themes/halo/light/es5/all-elements.js +2 -0
- package/lib/column-format-dialog/themes/halo/light/imports/all-elements.js +1 -0
- package/lib/column-format-dialog/themes/halo/light/imports/custom-elements.js +1 -0
- package/lib/column-format-dialog/themes/halo/light/imports/native-elements.js +0 -0
- package/lib/column-format-dialog/themes/halo/light.js +16 -0
- package/lib/column-format-dialog/themes/luna/column-format-dialog.less +1 -0
- package/lib/column-format-dialog/themes/luna/default/column-format-dialog.js +4 -0
- package/lib/column-format-dialog/themes/luna/default/css/native-elements.css +0 -0
- package/lib/column-format-dialog/themes/luna/default/es5/all-elements.js +2 -0
- package/lib/column-format-dialog/themes/luna/default/imports/all-elements.js +1 -0
- package/lib/column-format-dialog/themes/luna/default/imports/custom-elements.js +1 -0
- package/lib/column-format-dialog/themes/luna/default/imports/native-elements.js +0 -0
- package/lib/column-format-dialog/themes/luna/defaults.less +1 -0
- package/lib/column-format-dialog/themes/luna/index.less +5 -0
- package/lib/column-format-dialog/themes/solar/charcoal/column-format-dialog.js +4 -0
- package/lib/column-format-dialog/themes/solar/charcoal/css/native-elements.css +0 -0
- package/lib/column-format-dialog/themes/solar/charcoal/es5/all-elements.js +2 -0
- package/lib/column-format-dialog/themes/solar/charcoal/imports/all-elements.js +1 -0
- package/lib/column-format-dialog/themes/solar/charcoal/imports/custom-elements.js +1 -0
- package/lib/column-format-dialog/themes/solar/charcoal/imports/native-elements.js +0 -0
- package/lib/column-format-dialog/themes/solar/charcoal.js +16 -0
- package/lib/column-format-dialog/themes/solar/column-format-dialog.less +6 -0
- package/lib/column-format-dialog/themes/solar/defaults.less +1 -0
- package/lib/column-format-dialog/themes/solar/index.less +5 -0
- package/lib/column-format-dialog/themes/solar/pearl/column-format-dialog.js +4 -0
- package/lib/column-format-dialog/themes/solar/pearl/css/native-elements.css +0 -0
- package/lib/column-format-dialog/themes/solar/pearl/es5/all-elements.js +2 -0
- package/lib/column-format-dialog/themes/solar/pearl/imports/all-elements.js +1 -0
- package/lib/column-format-dialog/themes/solar/pearl/imports/custom-elements.js +1 -0
- package/lib/column-format-dialog/themes/solar/pearl/imports/native-elements.js +0 -0
- package/lib/column-format-dialog/themes/solar/pearl.js +16 -0
- package/lib/column-selection-dialog/index.d.ts +2 -0
- package/lib/column-selection-dialog/index.js +2 -0
- package/lib/column-selection-dialog/lib/column-selection-dialog.d.ts +66 -0
- package/lib/column-selection-dialog/lib/column-selection-dialog.js +2034 -0
- package/lib/column-selection-dialog/lib/locale/translation-de.d.ts +7 -0
- package/lib/column-selection-dialog/lib/locale/translation-de.js +20 -0
- package/lib/column-selection-dialog/lib/locale/translation-en.d.ts +7 -0
- package/lib/column-selection-dialog/lib/locale/translation-en.js +20 -0
- package/lib/column-selection-dialog/lib/locale/translation-ja.d.ts +7 -0
- package/lib/column-selection-dialog/lib/locale/translation-ja.js +20 -0
- package/lib/column-selection-dialog/lib/locale/translation-zh-hant.d.ts +7 -0
- package/lib/column-selection-dialog/lib/locale/translation-zh-hant.js +20 -0
- package/lib/column-selection-dialog/lib/locale/translation-zh.d.ts +7 -0
- package/lib/column-selection-dialog/lib/locale/translation-zh.js +20 -0
- package/lib/column-selection-dialog/lib/locale/translation.d.ts +11 -0
- package/lib/column-selection-dialog/lib/locale/translation.js +18 -0
- package/lib/column-selection-dialog/themes/base.less +258 -0
- package/lib/column-selection-dialog/themes/elemental/column-selection-dialog.less +1 -0
- package/lib/column-selection-dialog/themes/elemental/dark/column-selection-dialog.js +4 -0
- package/lib/column-selection-dialog/themes/elemental/dark/css/native-elements.css +0 -0
- package/lib/column-selection-dialog/themes/elemental/dark/es5/all-elements.js +2 -0
- package/lib/column-selection-dialog/themes/elemental/dark/imports/all-elements.js +1 -0
- package/lib/column-selection-dialog/themes/elemental/dark/imports/custom-elements.js +1 -0
- package/lib/column-selection-dialog/themes/elemental/dark/imports/native-elements.js +0 -0
- package/lib/column-selection-dialog/themes/elemental/dark.js +8 -0
- package/lib/column-selection-dialog/themes/elemental/defaults.less +1 -0
- package/lib/column-selection-dialog/themes/elemental/index.less +5 -0
- package/lib/column-selection-dialog/themes/elemental/light/column-selection-dialog.js +4 -0
- package/lib/column-selection-dialog/themes/elemental/light/css/native-elements.css +0 -0
- package/lib/column-selection-dialog/themes/elemental/light/es5/all-elements.js +2 -0
- package/lib/column-selection-dialog/themes/elemental/light/imports/all-elements.js +1 -0
- package/lib/column-selection-dialog/themes/elemental/light/imports/custom-elements.js +1 -0
- package/lib/column-selection-dialog/themes/elemental/light/imports/native-elements.js +0 -0
- package/lib/column-selection-dialog/themes/elemental/light.js +8 -0
- package/lib/column-selection-dialog/themes/halo/column-selection-dialog.less +25 -0
- package/lib/column-selection-dialog/themes/halo/dark/column-selection-dialog.js +4 -0
- package/lib/column-selection-dialog/themes/halo/dark/css/native-elements.css +0 -0
- package/lib/column-selection-dialog/themes/halo/dark/es5/all-elements.js +2 -0
- package/lib/column-selection-dialog/themes/halo/dark/imports/all-elements.js +1 -0
- package/lib/column-selection-dialog/themes/halo/dark/imports/custom-elements.js +1 -0
- package/lib/column-selection-dialog/themes/halo/dark/imports/native-elements.js +0 -0
- package/lib/column-selection-dialog/themes/halo/dark.js +8 -0
- package/lib/column-selection-dialog/themes/halo/defaults.less +1 -0
- package/lib/column-selection-dialog/themes/halo/index.less +6 -0
- package/lib/column-selection-dialog/themes/halo/light/column-selection-dialog.js +4 -0
- package/lib/column-selection-dialog/themes/halo/light/css/native-elements.css +0 -0
- package/lib/column-selection-dialog/themes/halo/light/es5/all-elements.js +2 -0
- package/lib/column-selection-dialog/themes/halo/light/imports/all-elements.js +1 -0
- package/lib/column-selection-dialog/themes/halo/light/imports/custom-elements.js +1 -0
- package/lib/column-selection-dialog/themes/halo/light/imports/native-elements.js +0 -0
- package/lib/column-selection-dialog/themes/halo/light.js +8 -0
- package/lib/column-selection-dialog/themes/solar/charcoal/column-selection-dialog.js +4 -0
- package/lib/column-selection-dialog/themes/solar/charcoal/css/native-elements.css +0 -0
- package/lib/column-selection-dialog/themes/solar/charcoal/es5/all-elements.js +2 -0
- package/lib/column-selection-dialog/themes/solar/charcoal/imports/all-elements.js +1 -0
- package/lib/column-selection-dialog/themes/solar/charcoal/imports/custom-elements.js +1 -0
- package/lib/column-selection-dialog/themes/solar/charcoal/imports/native-elements.js +0 -0
- package/lib/column-selection-dialog/themes/solar/charcoal.js +8 -0
- package/lib/column-selection-dialog/themes/solar/column-selection-dialog.less +5 -0
- package/lib/column-selection-dialog/themes/solar/defaults.less +1 -0
- package/lib/column-selection-dialog/themes/solar/index.less +6 -0
- package/lib/column-selection-dialog/themes/solar/pearl/column-selection-dialog.js +4 -0
- package/lib/column-selection-dialog/themes/solar/pearl/css/native-elements.css +0 -0
- package/lib/column-selection-dialog/themes/solar/pearl/es5/all-elements.js +2 -0
- package/lib/column-selection-dialog/themes/solar/pearl/imports/all-elements.js +1 -0
- package/lib/column-selection-dialog/themes/solar/pearl/imports/custom-elements.js +1 -0
- package/lib/column-selection-dialog/themes/solar/pearl/imports/native-elements.js +0 -0
- package/lib/column-selection-dialog/themes/solar/pearl.js +8 -0
- package/lib/core/dist/core.css +1 -0
- package/lib/core/dist/core.js +33910 -0
- package/lib/core/dist/core.min.js +1 -0
- package/lib/core/es6/data/ColumnStats.d.ts +42 -0
- package/lib/core/es6/data/ColumnStats.js +428 -0
- package/lib/core/es6/data/DataCache.d.ts +43 -0
- package/lib/core/es6/data/DataCache.js +597 -0
- package/lib/core/es6/data/DataTable.d.ts +156 -0
- package/lib/core/es6/data/DataTable.js +2206 -0
- package/lib/core/es6/data/DataView.d.ts +332 -0
- package/lib/core/es6/data/DataView.js +4144 -0
- package/lib/core/es6/data/Segment.d.ts +91 -0
- package/lib/core/es6/data/Segment.js +1001 -0
- package/lib/core/es6/data/SegmentCollection.d.ts +84 -0
- package/lib/core/es6/data/SegmentCollection.js +713 -0
- package/lib/core/es6/data/WrappedView.d.ts +290 -0
- package/lib/core/es6/data/WrappedView.js +1320 -0
- package/lib/core/es6/grid/Core.d.ts +455 -0
- package/lib/core/es6/grid/Core.js +6196 -0
- package/lib/core/es6/grid/ILayoutGrid.d.ts +212 -0
- package/lib/core/es6/grid/ILayoutGrid.js +706 -0
- package/lib/core/es6/grid/LayoutGrid.d.ts +37 -0
- package/lib/core/es6/grid/LayoutGrid.js +2975 -0
- package/lib/core/es6/grid/VirtualizedLayoutGrid.d.ts +28 -0
- package/lib/core/es6/grid/VirtualizedLayoutGrid.js +1241 -0
- package/lib/core/es6/grid/components/Cell.d.ts +52 -0
- package/lib/core/es6/grid/components/Cell.js +826 -0
- package/lib/core/es6/grid/components/CellFloatingPanel.d.ts +21 -0
- package/lib/core/es6/grid/components/CellFloatingPanel.js +130 -0
- package/lib/core/es6/grid/components/CellSpan.d.ts +18 -0
- package/lib/core/es6/grid/components/CellSpan.js +99 -0
- package/lib/core/es6/grid/components/CellSpans.d.ts +40 -0
- package/lib/core/es6/grid/components/CellSpans.js +368 -0
- package/lib/core/es6/grid/components/Column.d.ts +22 -0
- package/lib/core/es6/grid/components/Column.js +618 -0
- package/lib/core/es6/grid/components/ElementWrapper.d.ts +127 -0
- package/lib/core/es6/grid/components/ElementWrapper.js +718 -0
- package/lib/core/es6/grid/components/HScrollbar.d.ts +28 -0
- package/lib/core/es6/grid/components/HScrollbar.js +241 -0
- package/lib/core/es6/grid/components/Scrollbar.d.ts +63 -0
- package/lib/core/es6/grid/components/Scrollbar.js +1413 -0
- package/lib/core/es6/grid/components/StretchedCells.d.ts +17 -0
- package/lib/core/es6/grid/components/StretchedCells.js +342 -0
- package/lib/core/es6/grid/components/VScrollbar.d.ts +18 -0
- package/lib/core/es6/grid/components/VScrollbar.js +139 -0
- package/lib/core/es6/grid/components/VirtualItems.d.ts +12 -0
- package/lib/core/es6/grid/components/VirtualItems.js +51 -0
- package/lib/core/es6/grid/event/EventDispatcher.d.ts +16 -0
- package/lib/core/es6/grid/event/EventDispatcher.js +138 -0
- package/lib/core/es6/grid/event/EventListeners.d.ts +34 -0
- package/lib/core/es6/grid/event/EventListeners.js +166 -0
- package/lib/core/es6/grid/plugins/SortableTitlePlugin.d.ts +155 -0
- package/lib/core/es6/grid/plugins/SortableTitlePlugin.js +1977 -0
- package/lib/core/es6/grid/util/CellBoundPainter.d.ts +16 -0
- package/lib/core/es6/grid/util/CellBoundPainter.js +171 -0
- package/lib/core/es6/grid/util/Conflator.d.ts +32 -0
- package/lib/core/es6/grid/util/Conflator.js +191 -0
- package/lib/core/es6/grid/util/Reverter.d.ts +14 -0
- package/lib/core/es6/grid/util/Reverter.js +79 -0
- package/lib/core/es6/grid/util/SectionSettings.d.ts +79 -0
- package/lib/core/es6/grid/util/SectionSettings.js +679 -0
- package/lib/core/es6/grid/util/SelectionList.d.ts +54 -0
- package/lib/core/es6/grid/util/SelectionList.js +491 -0
- package/lib/core/es6/grid/util/TrackLayout.d.ts +92 -0
- package/lib/core/es6/grid/util/TrackLayout.js +902 -0
- package/lib/core/es6/grid/util/Virtualizer.d.ts +40 -0
- package/lib/core/es6/grid/util/Virtualizer.js +340 -0
- package/lib/core/es6/grid/util/util.d.ts +20 -0
- package/lib/core/es6/grid/util/util.js +391 -0
- package/lib/core/es6/index.d.ts +79 -0
- package/lib/core/es6/index.js +125 -0
- package/lib/core/es6/tr-grid-theme.d.ts +5 -0
- package/lib/core/es6/tr-grid-theme.js +5 -0
- package/lib/filter-dialog/index.d.ts +2 -0
- package/lib/filter-dialog/index.js +2 -0
- package/lib/filter-dialog/lib/checkbox-list.d.ts +52 -0
- package/lib/filter-dialog/lib/checkbox-list.js +444 -0
- package/lib/filter-dialog/lib/filter-dialog.d.ts +75 -0
- package/lib/filter-dialog/lib/filter-dialog.js +1160 -0
- package/lib/filter-dialog/lib/locale/translation-de.d.ts +7 -0
- package/lib/filter-dialog/lib/locale/translation-de.js +40 -0
- package/lib/filter-dialog/lib/locale/translation-en.d.ts +7 -0
- package/lib/filter-dialog/lib/locale/translation-en.js +40 -0
- package/lib/filter-dialog/lib/locale/translation-ja.d.ts +7 -0
- package/lib/filter-dialog/lib/locale/translation-ja.js +40 -0
- package/lib/filter-dialog/lib/locale/translation-zh-hant.d.ts +7 -0
- package/lib/filter-dialog/lib/locale/translation-zh-hant.js +40 -0
- package/lib/filter-dialog/lib/locale/translation-zh.d.ts +7 -0
- package/lib/filter-dialog/lib/locale/translation-zh.js +40 -0
- package/lib/filter-dialog/lib/locale/translation.d.ts +11 -0
- package/lib/filter-dialog/lib/locale/translation.js +18 -0
- package/lib/filter-dialog/themes/base-checkbox.less +42 -0
- package/lib/filter-dialog/themes/base.less +191 -0
- package/lib/filter-dialog/themes/elemental/checkbox-list.less +3 -0
- package/lib/filter-dialog/themes/elemental/dark/checkbox-list.js +4 -0
- package/lib/filter-dialog/themes/elemental/dark/css/native-elements.css +0 -0
- package/lib/filter-dialog/themes/elemental/dark/es5/all-elements.js +4 -0
- package/lib/filter-dialog/themes/elemental/dark/filter-dialog.js +5 -0
- package/lib/filter-dialog/themes/elemental/dark/imports/all-elements.js +2 -0
- package/lib/filter-dialog/themes/elemental/dark/imports/custom-elements.js +2 -0
- package/lib/filter-dialog/themes/elemental/dark/imports/native-elements.js +0 -0
- package/lib/filter-dialog/themes/elemental/dark.js +11 -0
- package/lib/filter-dialog/themes/elemental/defaults.less +3 -0
- package/lib/filter-dialog/themes/elemental/filter-dialog.less +1 -0
- package/lib/filter-dialog/themes/elemental/index.less +6 -0
- package/lib/filter-dialog/themes/elemental/light/checkbox-list.js +4 -0
- package/lib/filter-dialog/themes/elemental/light/css/native-elements.css +0 -0
- package/lib/filter-dialog/themes/elemental/light/es5/all-elements.js +4 -0
- package/lib/filter-dialog/themes/elemental/light/filter-dialog.js +5 -0
- package/lib/filter-dialog/themes/elemental/light/imports/all-elements.js +2 -0
- package/lib/filter-dialog/themes/elemental/light/imports/custom-elements.js +2 -0
- package/lib/filter-dialog/themes/elemental/light/imports/native-elements.js +0 -0
- package/lib/filter-dialog/themes/elemental/light.js +11 -0
- package/lib/filter-dialog/themes/halo/checkbox-list.less +3 -0
- package/lib/filter-dialog/themes/halo/dark/checkbox-list.js +4 -0
- package/lib/filter-dialog/themes/halo/dark/css/native-elements.css +0 -0
- package/lib/filter-dialog/themes/halo/dark/es5/all-elements.js +4 -0
- package/lib/filter-dialog/themes/halo/dark/filter-dialog.js +5 -0
- package/lib/filter-dialog/themes/halo/dark/imports/all-elements.js +2 -0
- package/lib/filter-dialog/themes/halo/dark/imports/custom-elements.js +2 -0
- package/lib/filter-dialog/themes/halo/dark/imports/native-elements.js +0 -0
- package/lib/filter-dialog/themes/halo/dark.js +11 -0
- package/lib/filter-dialog/themes/halo/defaults.less +3 -0
- package/lib/filter-dialog/themes/halo/filter-dialog.less +15 -0
- package/lib/filter-dialog/themes/halo/index.less +6 -0
- package/lib/filter-dialog/themes/halo/light/checkbox-list.js +4 -0
- package/lib/filter-dialog/themes/halo/light/css/native-elements.css +0 -0
- package/lib/filter-dialog/themes/halo/light/es5/all-elements.js +4 -0
- package/lib/filter-dialog/themes/halo/light/filter-dialog.js +5 -0
- package/lib/filter-dialog/themes/halo/light/imports/all-elements.js +2 -0
- package/lib/filter-dialog/themes/halo/light/imports/custom-elements.js +2 -0
- package/lib/filter-dialog/themes/halo/light/imports/native-elements.js +0 -0
- package/lib/filter-dialog/themes/halo/light.js +11 -0
- package/lib/filter-dialog/themes/solar/charcoal/checkbox-list.js +4 -0
- package/lib/filter-dialog/themes/solar/charcoal/css/native-elements.css +0 -0
- package/lib/filter-dialog/themes/solar/charcoal/es5/all-elements.js +4 -0
- package/lib/filter-dialog/themes/solar/charcoal/filter-dialog.js +5 -0
- package/lib/filter-dialog/themes/solar/charcoal/imports/all-elements.js +2 -0
- package/lib/filter-dialog/themes/solar/charcoal/imports/custom-elements.js +2 -0
- package/lib/filter-dialog/themes/solar/charcoal/imports/native-elements.js +0 -0
- package/lib/filter-dialog/themes/solar/charcoal.js +11 -0
- package/lib/filter-dialog/themes/solar/checkbox-list.less +3 -0
- package/lib/filter-dialog/themes/solar/defaults.less +3 -0
- package/lib/filter-dialog/themes/solar/filter-dialog.less +5 -0
- package/lib/filter-dialog/themes/solar/index.less +6 -0
- package/lib/filter-dialog/themes/solar/pearl/checkbox-list.js +4 -0
- package/lib/filter-dialog/themes/solar/pearl/css/native-elements.css +0 -0
- package/lib/filter-dialog/themes/solar/pearl/es5/all-elements.js +4 -0
- package/lib/filter-dialog/themes/solar/pearl/filter-dialog.js +5 -0
- package/lib/filter-dialog/themes/solar/pearl/imports/all-elements.js +2 -0
- package/lib/filter-dialog/themes/solar/pearl/imports/custom-elements.js +2 -0
- package/lib/filter-dialog/themes/solar/pearl/imports/native-elements.js +0 -0
- package/lib/filter-dialog/themes/solar/pearl.js +11 -0
- package/lib/formatters/es6/CoralButtonFormatter.d.ts +20 -0
- package/lib/formatters/es6/CoralButtonFormatter.js +45 -0
- package/lib/formatters/es6/CoralCheckboxFormatter.d.ts +12 -0
- package/lib/formatters/es6/CoralCheckboxFormatter.js +50 -0
- package/lib/formatters/es6/CoralComboBoxFormatter.d.ts +23 -0
- package/lib/formatters/es6/CoralComboBoxFormatter.js +103 -0
- package/lib/formatters/es6/CoralIconFormatter.d.ts +21 -0
- package/lib/formatters/es6/CoralIconFormatter.js +50 -0
- package/lib/formatters/es6/CoralInputFormatter.d.ts +12 -0
- package/lib/formatters/es6/CoralInputFormatter.js +45 -0
- package/lib/formatters/es6/CoralRadioButtonFormatter.d.ts +20 -0
- package/lib/formatters/es6/CoralRadioButtonFormatter.js +85 -0
- package/lib/formatters/es6/CoralSelectFormatter.d.ts +23 -0
- package/lib/formatters/es6/CoralSelectFormatter.js +71 -0
- package/lib/formatters/es6/CoralToggleFormatter.d.ts +12 -0
- package/lib/formatters/es6/CoralToggleFormatter.js +47 -0
- package/lib/formatters/es6/DuplexEmeraldDateTimePickerFormatter.d.ts +14 -0
- package/lib/formatters/es6/DuplexEmeraldDateTimePickerFormatter.js +119 -0
- package/lib/formatters/es6/EFButtonFormatter.d.ts +20 -0
- package/lib/formatters/es6/EFButtonFormatter.js +45 -0
- package/lib/formatters/es6/EFCheckboxFormatter.d.ts +12 -0
- package/lib/formatters/es6/EFCheckboxFormatter.js +50 -0
- package/lib/formatters/es6/EFComboBoxFormatter.d.ts +23 -0
- package/lib/formatters/es6/EFComboBoxFormatter.js +78 -0
- package/lib/formatters/es6/EFDateTimePickerFormatter.d.ts +13 -0
- package/lib/formatters/es6/EFDateTimePickerFormatter.js +60 -0
- package/lib/formatters/es6/EFIconFormatter.d.ts +21 -0
- package/lib/formatters/es6/EFIconFormatter.js +50 -0
- package/lib/formatters/es6/EFNumberFieldFormatter.d.ts +12 -0
- package/lib/formatters/es6/EFNumberFieldFormatter.js +45 -0
- package/lib/formatters/es6/EFRadioButtonFormatter.d.ts +20 -0
- package/lib/formatters/es6/EFRadioButtonFormatter.js +132 -0
- package/lib/formatters/es6/EFSelectFormatter.d.ts +23 -0
- package/lib/formatters/es6/EFSelectFormatter.js +76 -0
- package/lib/formatters/es6/EFTextFieldFormatter.d.ts +12 -0
- package/lib/formatters/es6/EFTextFieldFormatter.js +40 -0
- package/lib/formatters/es6/EFToggleFormatter.d.ts +12 -0
- package/lib/formatters/es6/EFToggleFormatter.js +47 -0
- package/lib/formatters/es6/EmeraldDateTimePickerFormatter.d.ts +13 -0
- package/lib/formatters/es6/EmeraldDateTimePickerFormatter.js +55 -0
- package/lib/formatters/es6/FormatterBuilder.d.ts +26 -0
- package/lib/formatters/es6/FormatterBuilder.js +493 -0
- package/lib/formatters/es6/NumericInputFormatter.d.ts +13 -0
- package/lib/formatters/es6/NumericInputFormatter.js +64 -0
- package/lib/formatters/es6/PercentBarFormatter.d.ts +25 -0
- package/lib/formatters/es6/PercentBarFormatter.js +62 -0
- package/lib/formatters/es6/SimpleImageFormatter.d.ts +21 -0
- package/lib/formatters/es6/SimpleImageFormatter.js +64 -0
- package/lib/formatters/es6/SimpleInputFormatter.d.ts +12 -0
- package/lib/formatters/es6/SimpleInputFormatter.js +40 -0
- package/lib/formatters/es6/SimpleLinkFormatter.d.ts +21 -0
- package/lib/formatters/es6/SimpleLinkFormatter.js +48 -0
- package/lib/formatters/es6/SimpleTickerFormatter.d.ts +23 -0
- package/lib/formatters/es6/SimpleTickerFormatter.js +66 -0
- package/lib/formatters/es6/SimpleToggleFormatter.d.ts +22 -0
- package/lib/formatters/es6/SimpleToggleFormatter.js +132 -0
- package/lib/formatters/es6/TextFormatter.d.ts +12 -0
- package/lib/formatters/es6/TextFormatter.js +35 -0
- package/lib/formatters/es6/index.d.ts +64 -0
- package/lib/formatters/es6/index.js +88 -0
- package/lib/grid/index.d.ts +2 -0
- package/lib/grid/index.js +3 -0
- package/lib/grid/lib/efx-grid.d.ts +53 -0
- package/lib/grid/lib/efx-grid.js +444 -0
- package/lib/grid/themes/base.less +137 -0
- package/lib/grid/themes/ds/dark/css/native-elements.css +0 -0
- package/lib/grid/themes/ds/dark/efx-grid.js +4 -0
- package/lib/grid/themes/ds/dark/es5/all-elements.js +2 -0
- package/lib/grid/themes/ds/dark/imports/all-elements.js +1 -0
- package/lib/grid/themes/ds/dark/imports/custom-elements.js +1 -0
- package/lib/grid/themes/ds/dark/imports/native-elements.js +0 -0
- package/lib/grid/themes/ds/dark.js +3 -0
- package/lib/grid/themes/ds/efx-grid.less +207 -0
- package/lib/grid/themes/ds/index.less +3 -0
- package/lib/grid/themes/ds/light/css/native-elements.css +0 -0
- package/lib/grid/themes/ds/light/efx-grid.js +4 -0
- package/lib/grid/themes/ds/light/es5/all-elements.js +2 -0
- package/lib/grid/themes/ds/light/imports/all-elements.js +1 -0
- package/lib/grid/themes/ds/light/imports/custom-elements.js +1 -0
- package/lib/grid/themes/ds/light/imports/native-elements.js +0 -0
- package/lib/grid/themes/ds/light.js +3 -0
- package/lib/grid/themes/halo/dark/css/native-elements.css +0 -0
- package/lib/grid/themes/halo/dark/efx-grid.js +4 -0
- package/lib/grid/themes/halo/dark/es5/all-elements.js +2 -0
- package/lib/grid/themes/halo/dark/imports/all-elements.js +1 -0
- package/lib/grid/themes/halo/dark/imports/custom-elements.js +1 -0
- package/lib/grid/themes/halo/dark/imports/native-elements.js +0 -0
- package/lib/grid/themes/halo/dark.js +3 -0
- package/lib/grid/themes/halo/efx-grid.less +127 -0
- package/lib/grid/themes/halo/index.less +3 -0
- package/lib/grid/themes/halo/light/css/native-elements.css +0 -0
- package/lib/grid/themes/halo/light/efx-grid.js +4 -0
- package/lib/grid/themes/halo/light/es5/all-elements.js +2 -0
- package/lib/grid/themes/halo/light/imports/all-elements.js +1 -0
- package/lib/grid/themes/halo/light/imports/custom-elements.js +1 -0
- package/lib/grid/themes/halo/light/imports/native-elements.js +0 -0
- package/lib/grid/themes/halo/light.js +3 -0
- package/lib/grid/themes/solar/charcoal/css/native-elements.css +0 -0
- package/lib/grid/themes/solar/charcoal/efx-grid.js +4 -0
- package/lib/grid/themes/solar/charcoal/es5/all-elements.js +2 -0
- package/lib/grid/themes/solar/charcoal/imports/all-elements.js +1 -0
- package/lib/grid/themes/solar/charcoal/imports/custom-elements.js +1 -0
- package/lib/grid/themes/solar/charcoal/imports/native-elements.js +0 -0
- package/lib/grid/themes/solar/charcoal.js +3 -0
- package/lib/grid/themes/solar/efx-grid.less +27 -0
- package/lib/grid/themes/solar/index.less +3 -0
- package/lib/grid/themes/solar/pearl/css/native-elements.css +0 -0
- package/lib/grid/themes/solar/pearl/efx-grid.js +4 -0
- package/lib/grid/themes/solar/pearl/es5/all-elements.js +2 -0
- package/lib/grid/themes/solar/pearl/imports/all-elements.js +1 -0
- package/lib/grid/themes/solar/pearl/imports/custom-elements.js +1 -0
- package/lib/grid/themes/solar/pearl/imports/native-elements.js +0 -0
- package/lib/grid/themes/solar/pearl.js +3 -0
- package/lib/index.d.ts +100 -0
- package/lib/index.js +100 -0
- package/lib/row-segmenting/es6/RowSegmenting.d.ts +115 -0
- package/lib/row-segmenting/es6/RowSegmenting.js +1182 -0
- package/lib/row-segmenting/es6/index.d.ts +1 -0
- package/lib/row-segmenting/es6/index.js +1 -0
- package/lib/rt-grid/dist/rt-grid.js +54547 -0
- package/lib/rt-grid/dist/rt-grid.min.js +1 -0
- package/lib/rt-grid/es6/ColumnDefinition.d.ts +174 -0
- package/lib/rt-grid/es6/ColumnDefinition.js +1203 -0
- package/lib/rt-grid/es6/DataConnector.d.ts +43 -0
- package/lib/rt-grid/es6/DataConnector.js +290 -0
- package/lib/rt-grid/es6/FieldDefinition.d.ts +40 -0
- package/lib/rt-grid/es6/FieldDefinition.js +560 -0
- package/lib/rt-grid/es6/Grid.d.ts +376 -0
- package/lib/rt-grid/es6/Grid.js +4653 -0
- package/lib/rt-grid/es6/PredefinedFormula.d.ts +16 -0
- package/lib/rt-grid/es6/PredefinedFormula.js +33 -0
- package/lib/rt-grid/es6/ReferenceCounter.d.ts +40 -0
- package/lib/rt-grid/es6/ReferenceCounter.js +251 -0
- package/lib/rt-grid/es6/RowDefSorter.d.ts +19 -0
- package/lib/rt-grid/es6/RowDefSorter.js +231 -0
- package/lib/rt-grid/es6/RowDefinition.d.ts +156 -0
- package/lib/rt-grid/es6/RowDefinition.js +1478 -0
- package/lib/rt-grid/es6/SnapshotFiller.d.ts +36 -0
- package/lib/rt-grid/es6/SnapshotFiller.js +537 -0
- package/lib/rt-grid/es6/StyleLoader.d.ts +17 -0
- package/lib/rt-grid/es6/StyleLoader.js +47 -0
- package/lib/rt-grid/es6/index.d.ts +8 -0
- package/lib/rt-grid/es6/index.js +43 -0
- package/lib/statistics-row/es6/StatisticsRow.d.ts +68 -0
- package/lib/statistics-row/es6/StatisticsRow.js +807 -0
- package/lib/statistics-row/es6/index.d.ts +1 -0
- package/lib/statistics-row/es6/index.js +1 -0
- package/lib/tr-grid-auto-tooltip/es6/AutoTooltip.d.ts +46 -0
- package/lib/tr-grid-auto-tooltip/es6/AutoTooltip.js +617 -0
- package/lib/tr-grid-auto-tooltip/es6/index.d.ts +1 -0
- package/lib/tr-grid-auto-tooltip/es6/index.js +1 -0
- package/lib/tr-grid-cell-selection/es6/CellSelection.d.ts +70 -0
- package/lib/tr-grid-cell-selection/es6/CellSelection.js +1695 -0
- package/lib/tr-grid-cell-selection/es6/index.d.ts +1 -0
- package/lib/tr-grid-cell-selection/es6/index.js +1 -0
- package/lib/tr-grid-checkbox/es6/Checkbox.d.ts +82 -0
- package/lib/tr-grid-checkbox/es6/Checkbox.js +1704 -0
- package/lib/tr-grid-checkbox/es6/index.d.ts +1 -0
- package/lib/tr-grid-checkbox/es6/index.js +1 -0
- package/lib/tr-grid-column-fitter/es6/ColumnFitter.d.ts +56 -0
- package/lib/tr-grid-column-fitter/es6/ColumnFitter.js +817 -0
- package/lib/tr-grid-column-fitter/es6/index.d.ts +1 -0
- package/lib/tr-grid-column-fitter/es6/index.js +1 -0
- package/lib/tr-grid-column-formatting/es6/ColumnFormatting.d.ts +91 -0
- package/lib/tr-grid-column-formatting/es6/ColumnFormatting.js +617 -0
- package/lib/tr-grid-column-formatting/es6/index.d.ts +1 -0
- package/lib/tr-grid-column-formatting/es6/index.js +1 -0
- package/lib/tr-grid-column-grouping/es6/ColumnGrouping.d.ts +110 -0
- package/lib/tr-grid-column-grouping/es6/ColumnGrouping.js +2028 -0
- package/lib/tr-grid-column-grouping/es6/index.d.ts +1 -0
- package/lib/tr-grid-column-grouping/es6/index.js +1 -0
- package/lib/tr-grid-column-resizing/es6/ColumnResizing.d.ts +68 -0
- package/lib/tr-grid-column-resizing/es6/ColumnResizing.js +1010 -0
- package/lib/tr-grid-column-resizing/es6/index.d.ts +1 -0
- package/lib/tr-grid-column-resizing/es6/index.js +1 -0
- package/lib/tr-grid-column-selection/es6/ColumnSelection.d.ts +77 -0
- package/lib/tr-grid-column-selection/es6/ColumnSelection.js +1405 -0
- package/lib/tr-grid-column-selection/es6/index.d.ts +1 -0
- package/lib/tr-grid-column-selection/es6/index.js +1 -0
- package/lib/tr-grid-column-stack/es6/ColumnStack.d.ts +160 -0
- package/lib/tr-grid-column-stack/es6/ColumnStack.js +2155 -0
- package/lib/tr-grid-column-stack/es6/index.d.ts +1 -0
- package/lib/tr-grid-column-stack/es6/index.js +1 -0
- package/lib/tr-grid-conditional-coloring/es6/ConditionalColoring.d.ts +100 -0
- package/lib/tr-grid-conditional-coloring/es6/ConditionalColoring.js +1513 -0
- package/lib/tr-grid-conditional-coloring/es6/index.d.ts +1 -0
- package/lib/tr-grid-conditional-coloring/es6/index.js +1 -0
- package/lib/tr-grid-content-wrap/es6/ContentWrap.d.ts +43 -0
- package/lib/tr-grid-content-wrap/es6/ContentWrap.js +519 -0
- package/lib/tr-grid-content-wrap/es6/index.d.ts +1 -0
- package/lib/tr-grid-content-wrap/es6/index.js +1 -0
- package/lib/tr-grid-contextmenu/es6/ContextMenu.d.ts +83 -0
- package/lib/tr-grid-contextmenu/es6/ContextMenu.js +453 -0
- package/lib/tr-grid-contextmenu/es6/MenuEventAPI.d.ts +22 -0
- package/lib/tr-grid-contextmenu/es6/MenuEventAPI.js +138 -0
- package/lib/tr-grid-contextmenu/es6/MenuItem.d.ts +41 -0
- package/lib/tr-grid-contextmenu/es6/MenuItem.js +285 -0
- package/lib/tr-grid-contextmenu/es6/PopupMenu.d.ts +33 -0
- package/lib/tr-grid-contextmenu/es6/PopupMenu.js +303 -0
- package/lib/tr-grid-contextmenu/es6/index.d.ts +1 -0
- package/lib/tr-grid-contextmenu/es6/index.js +1 -0
- package/lib/tr-grid-filter-input/es6/FilterInput.d.ts +64 -0
- package/lib/tr-grid-filter-input/es6/FilterInput.js +1027 -0
- package/lib/tr-grid-filter-input/es6/index.d.ts +1 -0
- package/lib/tr-grid-filter-input/es6/index.js +1 -0
- package/lib/tr-grid-heat-map/es6/HeatMap.d.ts +45 -0
- package/lib/tr-grid-heat-map/es6/HeatMap.js +401 -0
- package/lib/tr-grid-heat-map/es6/index.d.ts +1 -0
- package/lib/tr-grid-heat-map/es6/index.js +1 -0
- package/lib/tr-grid-in-cell-editing/es6/InCellEditing.d.ts +148 -0
- package/lib/tr-grid-in-cell-editing/es6/InCellEditing.js +2671 -0
- package/lib/tr-grid-in-cell-editing/es6/index.d.ts +1 -0
- package/lib/tr-grid-in-cell-editing/es6/index.js +1 -0
- package/lib/tr-grid-pagination/es6/Pagination.d.ts +58 -0
- package/lib/tr-grid-pagination/es6/Pagination.js +433 -0
- package/lib/tr-grid-pagination/es6/index.d.ts +1 -0
- package/lib/tr-grid-pagination/es6/index.js +1 -0
- package/lib/tr-grid-percent-bar/es6/PercentBar.d.ts +60 -0
- package/lib/tr-grid-percent-bar/es6/PercentBar.js +804 -0
- package/lib/tr-grid-percent-bar/es6/index.d.ts +1 -0
- package/lib/tr-grid-percent-bar/es6/index.js +1 -0
- package/lib/tr-grid-printer/es6/CellWriter.d.ts +50 -0
- package/lib/tr-grid-printer/es6/CellWriter.js +234 -0
- package/lib/tr-grid-printer/es6/ColumnWriter.d.ts +13 -0
- package/lib/tr-grid-printer/es6/ColumnWriter.js +23 -0
- package/lib/tr-grid-printer/es6/GridPrinter.d.ts +33 -0
- package/lib/tr-grid-printer/es6/GridPrinter.js +794 -0
- package/lib/tr-grid-printer/es6/PrintTrait.d.ts +39 -0
- package/lib/tr-grid-printer/es6/PrintTrait.js +494 -0
- package/lib/tr-grid-printer/es6/SectionWriter.d.ts +57 -0
- package/lib/tr-grid-printer/es6/SectionWriter.js +238 -0
- package/lib/tr-grid-printer/es6/index.d.ts +1 -0
- package/lib/tr-grid-printer/es6/index.js +1 -0
- package/lib/tr-grid-range-bar/es6/LEDGuage.d.ts +39 -0
- package/lib/tr-grid-range-bar/es6/LEDGuage.js +261 -0
- package/lib/tr-grid-range-bar/es6/RangeBar.d.ts +56 -0
- package/lib/tr-grid-range-bar/es6/RangeBar.js +514 -0
- package/lib/tr-grid-range-bar/es6/index.d.ts +1 -0
- package/lib/tr-grid-range-bar/es6/index.js +1 -0
- package/lib/tr-grid-row-dragging/es6/RowDragging.d.ts +81 -0
- package/lib/tr-grid-row-dragging/es6/RowDragging.js +1479 -0
- package/lib/tr-grid-row-dragging/es6/index.d.ts +1 -0
- package/lib/tr-grid-row-dragging/es6/index.js +1 -0
- package/lib/tr-grid-row-filtering/es6/RowFiltering.d.ts +159 -0
- package/lib/tr-grid-row-filtering/es6/RowFiltering.js +2568 -0
- package/lib/tr-grid-row-filtering/es6/index.d.ts +1 -0
- package/lib/tr-grid-row-filtering/es6/index.js +1 -0
- package/lib/tr-grid-row-grouping/es6/RowGrouping.d.ts +123 -0
- package/lib/tr-grid-row-grouping/es6/RowGrouping.js +1728 -0
- package/lib/tr-grid-row-grouping/es6/index.d.ts +1 -0
- package/lib/tr-grid-row-grouping/es6/index.js +1 -0
- package/lib/tr-grid-row-selection/es6/RowSelection.d.ts +75 -0
- package/lib/tr-grid-row-selection/es6/RowSelection.js +1447 -0
- package/lib/tr-grid-row-selection/es6/index.d.ts +1 -0
- package/lib/tr-grid-row-selection/es6/index.js +1 -0
- package/lib/tr-grid-rowcoloring/es6/RowColoring.d.ts +64 -0
- package/lib/tr-grid-rowcoloring/es6/RowColoring.js +615 -0
- package/lib/tr-grid-rowcoloring/es6/index.d.ts +1 -0
- package/lib/tr-grid-rowcoloring/es6/index.js +1 -0
- package/lib/tr-grid-textformatting/es6/TextFormatting.d.ts +72 -0
- package/lib/tr-grid-textformatting/es6/TextFormatting.js +543 -0
- package/lib/tr-grid-textformatting/es6/index.d.ts +1 -0
- package/lib/tr-grid-textformatting/es6/index.js +1 -0
- package/lib/tr-grid-titlewrap/es6/TitleWrap.d.ts +27 -0
- package/lib/tr-grid-titlewrap/es6/TitleWrap.js +431 -0
- package/lib/tr-grid-titlewrap/es6/index.d.ts +1 -0
- package/lib/tr-grid-titlewrap/es6/index.js +1 -0
- package/lib/tr-grid-util/es6/CellPainter.d.ts +142 -0
- package/lib/tr-grid-util/es6/CellPainter.js +1183 -0
- package/lib/tr-grid-util/es6/Color.d.ts +40 -0
- package/lib/tr-grid-util/es6/Color.js +210 -0
- package/lib/tr-grid-util/es6/Conflator.d.ts +34 -0
- package/lib/tr-grid-util/es6/Conflator.js +193 -0
- package/lib/tr-grid-util/es6/CoralItems.d.ts +10 -0
- package/lib/tr-grid-util/es6/CoralItems.js +42 -0
- package/lib/tr-grid-util/es6/DateTime.d.ts +57 -0
- package/lib/tr-grid-util/es6/DateTime.js +508 -0
- package/lib/tr-grid-util/es6/Deferred.d.ts +16 -0
- package/lib/tr-grid-util/es6/Deferred.js +108 -0
- package/lib/tr-grid-util/es6/Delay.d.ts +20 -0
- package/lib/tr-grid-util/es6/Delay.js +96 -0
- package/lib/tr-grid-util/es6/Dom.d.ts +32 -0
- package/lib/tr-grid-util/es6/Dom.js +350 -0
- package/lib/tr-grid-util/es6/DragUI.d.ts +20 -0
- package/lib/tr-grid-util/es6/DragUI.js +263 -0
- package/lib/tr-grid-util/es6/ElementObserver.d.ts +12 -0
- package/lib/tr-grid-util/es6/ElementObserver.js +134 -0
- package/lib/tr-grid-util/es6/ElementWrapper.d.ts +23 -0
- package/lib/tr-grid-util/es6/ElementWrapper.js +84 -0
- package/lib/tr-grid-util/es6/ElfDate.d.ts +26 -0
- package/lib/tr-grid-util/es6/ElfDate.js +164 -0
- package/lib/tr-grid-util/es6/ElfUtil.d.ts +46 -0
- package/lib/tr-grid-util/es6/ElfUtil.js +637 -0
- package/lib/tr-grid-util/es6/EventDispatcher.d.ts +26 -0
- package/lib/tr-grid-util/es6/EventDispatcher.js +161 -0
- package/lib/tr-grid-util/es6/ExpanderIcon.d.ts +24 -0
- package/lib/tr-grid-util/es6/ExpanderIcon.js +120 -0
- package/lib/tr-grid-util/es6/ExpressionParser.d.ts +10 -0
- package/lib/tr-grid-util/es6/ExpressionParser.js +408 -0
- package/lib/tr-grid-util/es6/Ext.d.ts +10 -0
- package/lib/tr-grid-util/es6/Ext.js +52 -0
- package/lib/tr-grid-util/es6/FieldFormatter.d.ts +55 -0
- package/lib/tr-grid-util/es6/FieldFormatter.js +440 -0
- package/lib/tr-grid-util/es6/FilterBuilder.d.ts +54 -0
- package/lib/tr-grid-util/es6/FilterBuilder.js +580 -0
- package/lib/tr-grid-util/es6/FilterOperators.d.ts +56 -0
- package/lib/tr-grid-util/es6/FilterOperators.js +255 -0
- package/lib/tr-grid-util/es6/GridPlugin.d.ts +86 -0
- package/lib/tr-grid-util/es6/GridPlugin.js +1055 -0
- package/lib/tr-grid-util/es6/GroupDefinitions.d.ts +74 -0
- package/lib/tr-grid-util/es6/GroupDefinitions.js +642 -0
- package/lib/tr-grid-util/es6/Icon.d.ts +14 -0
- package/lib/tr-grid-util/es6/Icon.js +62 -0
- package/lib/tr-grid-util/es6/MouseDownTrait.d.ts +42 -0
- package/lib/tr-grid-util/es6/MouseDownTrait.js +250 -0
- package/lib/tr-grid-util/es6/MultiTableManager.d.ts +40 -0
- package/lib/tr-grid-util/es6/MultiTableManager.js +611 -0
- package/lib/tr-grid-util/es6/NumberFormatter.d.ts +85 -0
- package/lib/tr-grid-util/es6/NumberFormatter.js +528 -0
- package/lib/tr-grid-util/es6/PercentBar.d.ts +71 -0
- package/lib/tr-grid-util/es6/PercentBar.js +600 -0
- package/lib/tr-grid-util/es6/Perf.d.ts +32 -0
- package/lib/tr-grid-util/es6/Perf.js +163 -0
- package/lib/tr-grid-util/es6/Popup.d.ts +98 -0
- package/lib/tr-grid-util/es6/Popup.js +991 -0
- package/lib/tr-grid-util/es6/RangeBar.d.ts +33 -0
- package/lib/tr-grid-util/es6/RangeBar.js +260 -0
- package/lib/tr-grid-util/es6/RequestQueue.d.ts +30 -0
- package/lib/tr-grid-util/es6/RequestQueue.js +228 -0
- package/lib/tr-grid-util/es6/RowPainter.d.ts +60 -0
- package/lib/tr-grid-util/es6/RowPainter.js +448 -0
- package/lib/tr-grid-util/es6/SubTable.d.ts +78 -0
- package/lib/tr-grid-util/es6/SubTable.js +642 -0
- package/lib/tr-grid-util/es6/Table.d.ts +146 -0
- package/lib/tr-grid-util/es6/Table.js +832 -0
- package/lib/tr-grid-util/es6/TextHighlighter.d.ts +16 -0
- package/lib/tr-grid-util/es6/TextHighlighter.js +268 -0
- package/lib/tr-grid-util/es6/TickCodes.d.ts +8 -0
- package/lib/tr-grid-util/es6/TickCodes.js +33 -0
- package/lib/tr-grid-util/es6/Timer.d.ts +16 -0
- package/lib/tr-grid-util/es6/Timer.js +49 -0
- package/lib/tr-grid-util/es6/TouchProxy.d.ts +46 -0
- package/lib/tr-grid-util/es6/TouchProxy.js +212 -0
- package/lib/tr-grid-util/es6/Util.d.ts +66 -0
- package/lib/tr-grid-util/es6/Util.js +508 -0
- package/lib/tr-grid-util/es6/formula/ADCService.d.ts +11 -0
- package/lib/tr-grid-util/es6/formula/ADCService.js +72 -0
- package/lib/tr-grid-util/es6/formula/ADCSubscription.d.ts +17 -0
- package/lib/tr-grid-util/es6/formula/ADCSubscription.js +317 -0
- package/lib/tr-grid-util/es6/formula/AdFinService.d.ts +12 -0
- package/lib/tr-grid-util/es6/formula/AdFinService.js +61 -0
- package/lib/tr-grid-util/es6/formula/AdFinSubscription.d.ts +19 -0
- package/lib/tr-grid-util/es6/formula/AdFinSubscription.js +310 -0
- package/lib/tr-grid-util/es6/formula/Engine.d.ts +56 -0
- package/lib/tr-grid-util/es6/formula/Engine.js +592 -0
- package/lib/tr-grid-util/es6/formula/Formula.d.ts +68 -0
- package/lib/tr-grid-util/es6/formula/Formula.js +890 -0
- package/lib/tr-grid-util/es6/formula/IntervalSubscription.d.ts +16 -0
- package/lib/tr-grid-util/es6/formula/IntervalSubscription.js +165 -0
- package/lib/tr-grid-util/es6/formula/Realtime.d.ts +18 -0
- package/lib/tr-grid-util/es6/formula/Realtime.js +279 -0
- package/lib/tr-grid-util/es6/formula/RealtimeService.d.ts +18 -0
- package/lib/tr-grid-util/es6/formula/RealtimeService.js +203 -0
- package/lib/tr-grid-util/es6/formula/TSIService.d.ts +11 -0
- package/lib/tr-grid-util/es6/formula/TSIService.js +51 -0
- package/lib/tr-grid-util/es6/formula/TSISubscription.d.ts +18 -0
- package/lib/tr-grid-util/es6/formula/TSISubscription.js +1015 -0
- package/lib/tr-grid-util/es6/formula/VariableToken.d.ts +30 -0
- package/lib/tr-grid-util/es6/formula/VariableToken.js +314 -0
- package/lib/tr-grid-util/es6/formula/functions/AdFin.d.ts +9 -0
- package/lib/tr-grid-util/es6/formula/functions/AdFin.js +1778 -0
- package/lib/tr-grid-util/es6/formula/functions/Excel.d.ts +8 -0
- package/lib/tr-grid-util/es6/formula/functions/Excel.js +21 -0
- package/lib/tr-grid-util/es6/formula/functions/Info.d.ts +8 -0
- package/lib/tr-grid-util/es6/formula/functions/Info.js +192 -0
- package/lib/tr-grid-util/es6/formula/functions/Internal.d.ts +8 -0
- package/lib/tr-grid-util/es6/formula/functions/Internal.js +90 -0
- package/lib/tr-grid-util/es6/formula/functions/Logic.d.ts +12 -0
- package/lib/tr-grid-util/es6/formula/functions/Logic.js +176 -0
- package/lib/tr-grid-util/es6/formula/functions/Math.d.ts +18 -0
- package/lib/tr-grid-util/es6/formula/functions/Math.js +1624 -0
- package/lib/tr-grid-util/es6/formula/functions/Statistics.d.ts +18 -0
- package/lib/tr-grid-util/es6/formula/functions/Statistics.js +234 -0
- package/lib/tr-grid-util/es6/formula/functions/Text.d.ts +10 -0
- package/lib/tr-grid-util/es6/formula/functions/Text.js +676 -0
- package/lib/tr-grid-util/es6/index.d.ts +65 -0
- package/lib/tr-grid-util/es6/index.js +102 -0
- package/lib/tr-grid-util/es6/jet/Adc.d.ts +9 -0
- package/lib/tr-grid-util/es6/jet/Adc.js +268 -0
- package/lib/tr-grid-util/es6/jet/CollectionDict.d.ts +28 -0
- package/lib/tr-grid-util/es6/jet/CollectionDict.js +151 -0
- package/lib/tr-grid-util/es6/jet/DataGenerator.d.ts +136 -0
- package/lib/tr-grid-util/es6/jet/DataGenerator.js +860 -0
- package/lib/tr-grid-util/es6/jet/DataSet.d.ts +8 -0
- package/lib/tr-grid-util/es6/jet/DataSet.js +392 -0
- package/lib/tr-grid-util/es6/jet/MockArchive.d.ts +21 -0
- package/lib/tr-grid-util/es6/jet/MockArchive.js +56 -0
- package/lib/tr-grid-util/es6/jet/MockJET.d.ts +25 -0
- package/lib/tr-grid-util/es6/jet/MockJET.js +71 -0
- package/lib/tr-grid-util/es6/jet/MockQuotes.d.ts +37 -0
- package/lib/tr-grid-util/es6/jet/MockQuotes.js +199 -0
- package/lib/tr-grid-util/es6/jet/MockQuotes2.d.ts +82 -0
- package/lib/tr-grid-util/es6/jet/MockQuotes2.js +890 -0
- package/lib/tr-grid-util/es6/jet/MockRTK.d.ts +48 -0
- package/lib/tr-grid-util/es6/jet/MockRTK.js +82 -0
- package/lib/tr-grid-util/es6/jet/MockUtil.d.ts +7 -0
- package/lib/tr-grid-util/es6/jet/MockUtil.js +25 -0
- package/lib/tr-grid-util/es6/jet/index.d.ts +9 -0
- package/lib/tr-grid-util/es6/jet/index.js +18 -0
- package/lib/tr-grid-util/es6/jet/mockDataAPI.d.ts +11 -0
- package/lib/tr-grid-util/es6/jet/mockDataAPI.js +111 -0
- package/lib/tr-grid-util/es6/jsx.d.ts +223 -0
- package/lib/tr-grid-util/es6/locale/translation-de.d.ts +7 -0
- package/lib/tr-grid-util/es6/locale/translation-de.js +51 -0
- package/lib/tr-grid-util/es6/locale/translation-en.d.ts +7 -0
- package/lib/tr-grid-util/es6/locale/translation-en.js +51 -0
- package/lib/tr-grid-util/es6/locale/translation-ja.d.ts +7 -0
- package/lib/tr-grid-util/es6/locale/translation-ja.js +51 -0
- package/lib/tr-grid-util/es6/locale/translation-zh-hant.d.ts +7 -0
- package/lib/tr-grid-util/es6/locale/translation-zh-hant.js +51 -0
- package/lib/tr-grid-util/es6/locale/translation-zh.d.ts +7 -0
- package/lib/tr-grid-util/es6/locale/translation-zh.js +51 -0
- package/lib/tr-grid-util/es6/locale/translation.d.ts +11 -0
- package/lib/tr-grid-util/es6/locale/translation.js +18 -0
- package/lib/types/es6/AutoTooltip.d.ts +46 -0
- package/lib/types/es6/CellSelection.d.ts +70 -0
- package/lib/types/es6/Checkbox.d.ts +82 -0
- package/lib/types/es6/ColumnDragging.d.ts +51 -0
- package/lib/types/es6/ColumnFitter.d.ts +56 -0
- package/lib/types/es6/ColumnFormatting.d.ts +92 -0
- package/lib/types/es6/ColumnGrouping.d.ts +107 -0
- package/lib/types/es6/ColumnResizing.d.ts +68 -0
- package/lib/types/es6/ColumnSelection.d.ts +77 -0
- package/lib/types/es6/ColumnStack.d.ts +160 -0
- package/lib/types/es6/CompositeGrid/CollapsibleHeaderPlugin.d.ts +11 -0
- package/lib/types/es6/CompositeGrid/ColumnSelectionPlugin.d.ts +41 -0
- package/lib/types/es6/CompositeGrid/ColumnWidthAdjustingPlugin.d.ts +45 -0
- package/lib/types/es6/CompositeGrid/CompositeGrid.d.ts +289 -0
- package/lib/types/es6/CompositeGrid/DragAndDropTitlePlugin.d.ts +23 -0
- package/lib/types/es6/CompositeGrid/DraggableContentPlugin.d.ts +41 -0
- package/lib/types/es6/CompositeGrid/Plugin.d.ts +30 -0
- package/lib/types/es6/CompositeGrid/ResizableTitlePlugin.d.ts +32 -0
- package/lib/types/es6/CompositeGrid/RowSelectionPlugin.d.ts +44 -0
- package/lib/types/es6/CompositeGrid/TextWidthCalculator.d.ts +24 -0
- package/lib/types/es6/CompositeGrid/TreeIndentingPlugin.d.ts +46 -0
- package/lib/types/es6/CompositeGrid/index.d.ts +9 -0
- package/lib/types/es6/ConditionalColoring.d.ts +100 -0
- package/lib/types/es6/ContentWrap.d.ts +43 -0
- package/lib/types/es6/ContextMenu.d.ts +83 -0
- package/lib/types/es6/CoralButtonFormatter.d.ts +20 -0
- package/lib/types/es6/CoralCheckboxFormatter.d.ts +12 -0
- package/lib/types/es6/CoralComboBoxFormatter.d.ts +23 -0
- package/lib/types/es6/CoralIconFormatter.d.ts +21 -0
- package/lib/types/es6/CoralInputFormatter.d.ts +12 -0
- package/lib/types/es6/CoralRadioButtonFormatter.d.ts +20 -0
- package/lib/types/es6/CoralSelectFormatter.d.ts +23 -0
- package/lib/types/es6/CoralToggleFormatter.d.ts +12 -0
- package/lib/types/es6/Core/data/ColumnStats.d.ts +42 -0
- package/lib/types/es6/Core/data/DataCache.d.ts +43 -0
- package/lib/types/es6/Core/data/DataTable.d.ts +156 -0
- package/lib/types/es6/Core/data/DataView.d.ts +332 -0
- package/lib/types/es6/Core/data/Segment.d.ts +91 -0
- package/lib/types/es6/Core/data/SegmentCollection.d.ts +84 -0
- package/lib/types/es6/Core/data/WrappedView.d.ts +290 -0
- package/lib/types/es6/Core/grid/Core.d.ts +455 -0
- package/lib/types/es6/Core/grid/ILayoutGrid.d.ts +212 -0
- package/lib/types/es6/Core/grid/LayoutGrid.d.ts +37 -0
- package/lib/types/es6/Core/grid/VirtualizedLayoutGrid.d.ts +28 -0
- package/lib/types/es6/Core/grid/components/Cell.d.ts +52 -0
- package/lib/types/es6/Core/grid/components/CellFloatingPanel.d.ts +21 -0
- package/lib/types/es6/Core/grid/components/CellSpan.d.ts +18 -0
- package/lib/types/es6/Core/grid/components/CellSpans.d.ts +40 -0
- package/lib/types/es6/Core/grid/components/Column.d.ts +22 -0
- package/lib/types/es6/Core/grid/components/ElementWrapper.d.ts +127 -0
- package/lib/types/es6/Core/grid/components/HScrollbar.d.ts +28 -0
- package/lib/types/es6/Core/grid/components/Scrollbar.d.ts +63 -0
- package/lib/types/es6/Core/grid/components/StretchedCells.d.ts +17 -0
- package/lib/types/es6/Core/grid/components/VScrollbar.d.ts +18 -0
- package/lib/types/es6/Core/grid/components/VirtualItems.d.ts +12 -0
- package/lib/types/es6/Core/grid/event/EventDispatcher.d.ts +16 -0
- package/lib/types/es6/Core/grid/event/EventListeners.d.ts +34 -0
- package/lib/types/es6/Core/grid/plugins/SortableTitlePlugin.d.ts +155 -0
- package/lib/types/es6/Core/grid/util/CellBoundPainter.d.ts +16 -0
- package/lib/types/es6/Core/grid/util/Conflator.d.ts +32 -0
- package/lib/types/es6/Core/grid/util/Reverter.d.ts +14 -0
- package/lib/types/es6/Core/grid/util/SectionSettings.d.ts +79 -0
- package/lib/types/es6/Core/grid/util/SelectionList.d.ts +54 -0
- package/lib/types/es6/Core/grid/util/TrackLayout.d.ts +92 -0
- package/lib/types/es6/Core/grid/util/Virtualizer.d.ts +40 -0
- package/lib/types/es6/Core/grid/util/util.d.ts +20 -0
- package/lib/types/es6/Core/index.d.ts +79 -0
- package/lib/types/es6/Core/tr-grid-theme.d.ts +5 -0
- package/lib/types/es6/DuplexEmeraldDateTimePickerFormatter.d.ts +14 -0
- package/lib/types/es6/EFButtonFormatter.d.ts +20 -0
- package/lib/types/es6/EFCheckboxFormatter.d.ts +12 -0
- package/lib/types/es6/EFComboBoxFormatter.d.ts +23 -0
- package/lib/types/es6/EFDateTimePickerFormatter.d.ts +13 -0
- package/lib/types/es6/EFIconFormatter.d.ts +21 -0
- package/lib/types/es6/EFNumberFieldFormatter.d.ts +12 -0
- package/lib/types/es6/EFRadioButtonFormatter.d.ts +20 -0
- package/lib/types/es6/EFSelectFormatter.d.ts +23 -0
- package/lib/types/es6/EFTextFieldFormatter.d.ts +12 -0
- package/lib/types/es6/EFToggleFormatter.d.ts +12 -0
- package/lib/types/es6/EmeraldDateTimePickerFormatter.d.ts +13 -0
- package/lib/types/es6/ExtensionColumnOptions.d.ts +41 -0
- package/lib/types/es6/ExtensionOptions.d.ts +58 -0
- package/lib/types/es6/Extensions.d.ts +63 -0
- package/lib/types/es6/FilterInput.d.ts +64 -0
- package/lib/types/es6/FormatterBuilder.d.ts +26 -0
- package/lib/types/es6/GridFormatter.d.ts +63 -0
- package/lib/types/es6/HeatMap.d.ts +45 -0
- package/lib/types/es6/InCellEditing.d.ts +148 -0
- package/lib/types/es6/MenuEventAPI.d.ts +22 -0
- package/lib/types/es6/MenuItem.d.ts +41 -0
- package/lib/types/es6/NumericInputFormatter.d.ts +13 -0
- package/lib/types/es6/Pagination.d.ts +58 -0
- package/lib/types/es6/PercentBar.d.ts +60 -0
- package/lib/types/es6/PercentBarFormatter.d.ts +25 -0
- package/lib/types/es6/PopupMenu.d.ts +33 -0
- package/lib/types/es6/RangeBar.d.ts +39 -0
- package/lib/types/es6/RealtimeGrid/ColumnDefinition.d.ts +176 -0
- package/lib/types/es6/RealtimeGrid/DataConnector.d.ts +43 -0
- package/lib/types/es6/RealtimeGrid/FieldDefinition.d.ts +40 -0
- package/lib/types/es6/RealtimeGrid/Grid.d.ts +413 -0
- package/lib/types/es6/RealtimeGrid/PredefinedFormula.d.ts +16 -0
- package/lib/types/es6/RealtimeGrid/ReferenceCounter.d.ts +40 -0
- package/lib/types/es6/RealtimeGrid/RowDefSorter.d.ts +19 -0
- package/lib/types/es6/RealtimeGrid/RowDefinition.d.ts +156 -0
- package/lib/types/es6/RealtimeGrid/SnapshotFiller.d.ts +36 -0
- package/lib/types/es6/RealtimeGrid/StyleLoader.d.ts +17 -0
- package/lib/types/es6/RealtimeGrid/index.d.ts +8 -0
- package/lib/types/es6/RowColoring.d.ts +64 -0
- package/lib/types/es6/RowDragging.d.ts +81 -0
- package/lib/types/es6/RowFiltering.d.ts +159 -0
- package/lib/types/es6/RowGrouping.d.ts +123 -0
- package/lib/types/es6/RowSegmenting.d.ts +109 -0
- package/lib/types/es6/RowSelection.d.ts +75 -0
- package/lib/types/es6/SimpleImageFormatter.d.ts +21 -0
- package/lib/types/es6/SimpleInputFormatter.d.ts +12 -0
- package/lib/types/es6/SimpleLinkFormatter.d.ts +21 -0
- package/lib/types/es6/SimpleTickerFormatter.d.ts +23 -0
- package/lib/types/es6/SimpleToggleFormatter.d.ts +22 -0
- package/lib/types/es6/StatisticsRow.d.ts +68 -0
- package/lib/types/es6/TextFormatter.d.ts +12 -0
- package/lib/types/es6/TextFormatting.d.ts +72 -0
- package/lib/types/es6/TitleWrap.d.ts +27 -0
- package/lib/types/es6/Zoom.d.ts +52 -0
- package/lib/types/es6/index.d.ts +80 -0
- package/lib/types/index.d.ts +1 -0
- package/lib/utils/index.d.ts +7 -0
- package/lib/utils/index.js +7 -0
- package/lib/versions.json +37 -0
- package/lib/window-exporter.js +18 -0
- package/lib/zoom/es6/Zoom.d.ts +52 -0
- package/lib/zoom/es6/Zoom.js +438 -0
- package/lib/zoom/es6/index.d.ts +1 -0
- package/lib/zoom/es6/index.js +1 -0
- package/package.json +69 -0
@@ -0,0 +1,1405 @@
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
2
|
+
|
3
|
+
import { Ext } from "../../tr-grid-util/es6/Ext.js";
|
4
|
+
import { Dom } from "../../tr-grid-util/es6/Dom.js";
|
5
|
+
import { GridPlugin } from "../../tr-grid-util/es6/GridPlugin.js";
|
6
|
+
import { prettifyCss } from "../../tr-grid-util/es6/Util.js";
|
7
|
+
/** @event ColumnSelectionPlugin#selectionChanged
|
8
|
+
* @description Fired when selection is changed by mouse down or key press. A change by JavaScript APIs will not trigger this event.
|
9
|
+
*/
|
10
|
+
|
11
|
+
/** @typedef {(Object|boolean)} ColumnSelectionPlugin~Options
|
12
|
+
* @description Extension options available in main grid configuration under `columnSelection` property
|
13
|
+
* @property {boolean=} singleSelection=false If enabled, user can have one selection at any moment
|
14
|
+
* @property {boolean=} clickToggle=false If enabled, click at the already selected column will deselect it
|
15
|
+
* @property {Function=} selectionChanged=null selectionChanged event handler
|
16
|
+
* @property {Function=} menuClicked=null Event Handler when user clicks on menu icon.
|
17
|
+
* @property {string=} menuPosition="outside" show icon in column grid that have style outside and non-outside
|
18
|
+
*/
|
19
|
+
|
20
|
+
/** @typedef {Object} ColumnSelectionPlugin~ColumnOptions
|
21
|
+
* @description Extension options available in column configuration object
|
22
|
+
* @property {boolean=} unselectable=false If enabled, the specified column is not selectable
|
23
|
+
*/
|
24
|
+
|
25
|
+
/** @constructor
|
26
|
+
* @extends {GridPlugin}
|
27
|
+
* @param {ColumnSelectionPlugin~Options=} options
|
28
|
+
*/
|
29
|
+
|
30
|
+
var ColumnSelectionPlugin = function ColumnSelectionPlugin(options) {
|
31
|
+
var t = this;
|
32
|
+
t._onClick = t._onClick.bind(t);
|
33
|
+
t._onMouseDown = t._onMouseDown.bind(t);
|
34
|
+
t._onKeyDown = t._onKeyDown.bind(t);
|
35
|
+
t._onColumnRemoved = t._onColumnRemoved.bind(t);
|
36
|
+
t._onColumnAdded = t._onColumnAdded.bind(t);
|
37
|
+
t._onReselection = t._onReselection.bind(t);
|
38
|
+
t._onColumnPositionChanged = t._onColumnPositionChanged.bind(t);
|
39
|
+
t._onBeforeBatchOperation = t._onBeforeBatchOperation.bind(t);
|
40
|
+
t._onAfterBatchOperation = t._onAfterBatchOperation.bind(t);
|
41
|
+
t._updateMenuIcon = t._updateMenuIcon.bind(t);
|
42
|
+
t._hosts = [];
|
43
|
+
|
44
|
+
if (options) {
|
45
|
+
t.config({
|
46
|
+
"columnSelection": options
|
47
|
+
});
|
48
|
+
}
|
49
|
+
};
|
50
|
+
|
51
|
+
Ext.inherits(ColumnSelectionPlugin, GridPlugin);
|
52
|
+
/** Core grid object
|
53
|
+
* @type {Object}
|
54
|
+
* @private
|
55
|
+
*/
|
56
|
+
|
57
|
+
ColumnSelectionPlugin.prototype._activeGrid = null;
|
58
|
+
/** @type {number}
|
59
|
+
* @private
|
60
|
+
*/
|
61
|
+
|
62
|
+
ColumnSelectionPlugin.prototype._anchorCol = -1;
|
63
|
+
/** @type {boolean}
|
64
|
+
* @private
|
65
|
+
*/
|
66
|
+
|
67
|
+
ColumnSelectionPlugin.prototype._disabled = false;
|
68
|
+
/** @type {boolean}
|
69
|
+
* @private
|
70
|
+
*/
|
71
|
+
|
72
|
+
ColumnSelectionPlugin.prototype._singleSelMode = false;
|
73
|
+
/** @type {boolean}
|
74
|
+
* @private
|
75
|
+
*/
|
76
|
+
|
77
|
+
ColumnSelectionPlugin.prototype._clickToggleMode = false;
|
78
|
+
/** @type {(boolean|null)}
|
79
|
+
* @private
|
80
|
+
*/
|
81
|
+
|
82
|
+
ColumnSelectionPlugin.prototype._hasSelection = false;
|
83
|
+
/** @type {number}
|
84
|
+
* @private
|
85
|
+
*/
|
86
|
+
|
87
|
+
ColumnSelectionPlugin.prototype._timerId = 0;
|
88
|
+
/** @type {number}
|
89
|
+
* @private
|
90
|
+
*/
|
91
|
+
|
92
|
+
ColumnSelectionPlugin.prototype._timerMenuId = 0;
|
93
|
+
/** @type {number}
|
94
|
+
* @private
|
95
|
+
*/
|
96
|
+
|
97
|
+
ColumnSelectionPlugin.prototype._pendingSelectionOnAdded = -1;
|
98
|
+
/** @type {Function}
|
99
|
+
* @private
|
100
|
+
*/
|
101
|
+
|
102
|
+
ColumnSelectionPlugin.prototype._pendingSelectionOnRemoved = -1;
|
103
|
+
/** @type {Function}
|
104
|
+
* @private
|
105
|
+
*/
|
106
|
+
|
107
|
+
ColumnSelectionPlugin.prototype._onMenuClicked = null;
|
108
|
+
/** @type {Object}
|
109
|
+
* @private
|
110
|
+
*/
|
111
|
+
|
112
|
+
ColumnSelectionPlugin.prototype._menuButton = null;
|
113
|
+
/** @type {string}
|
114
|
+
* @private
|
115
|
+
*/
|
116
|
+
|
117
|
+
ColumnSelectionPlugin.prototype._menuPosition = "outside";
|
118
|
+
/** @type {Object}
|
119
|
+
* @private
|
120
|
+
*/
|
121
|
+
|
122
|
+
ColumnSelectionPlugin.prototype._cgp = null; // Column grouping extension
|
123
|
+
|
124
|
+
/** @type {Array.<string>}
|
125
|
+
* @private
|
126
|
+
*/
|
127
|
+
|
128
|
+
ColumnSelectionPlugin.prototype._prevSelectedCols = {}; // previous selected columns during batch operation
|
129
|
+
|
130
|
+
/** @private
|
131
|
+
* @return {string}
|
132
|
+
*/
|
133
|
+
|
134
|
+
ColumnSelectionPlugin._styleCalculator = function () {
|
135
|
+
var styles = [".column-selection-menu", ["position: absolute;", "background-color: var(--grid-column-menu-icon-bgcolor);", "color: var(--grid-column-menu-icon-color);", "z-index: 1;", "cursor: pointer;", "text-align: center;", "width: 16px;", "height: 16px;", "padding: 6px;"], ".column-selection-menu:hover", ["background-color: var(--grid-column-menu-icon-hover-bgcolor);"], ".column-selection-menu-inside", ["padding: 4px;" // if not outside icon, move to inside
|
136
|
+
], ".selected-column .cell.selected-group", ["background-color: var(--grid-selection-bgcolor);"]];
|
137
|
+
return prettifyCss(styles);
|
138
|
+
};
|
139
|
+
/** @public
|
140
|
+
* @return {string}
|
141
|
+
*/
|
142
|
+
|
143
|
+
|
144
|
+
ColumnSelectionPlugin.prototype.getName = function () {
|
145
|
+
return "ColumnSelectionPlugin"; // Read Only
|
146
|
+
};
|
147
|
+
/**
|
148
|
+
* @override
|
149
|
+
* @return {boolean}
|
150
|
+
*/
|
151
|
+
|
152
|
+
|
153
|
+
ColumnSelectionPlugin.prototype.hasMultiTableSupport = function () {
|
154
|
+
return true;
|
155
|
+
};
|
156
|
+
/** @public
|
157
|
+
* @param {Object} host Core grid instance
|
158
|
+
* @param {Object=} options Grid configuration object
|
159
|
+
*/
|
160
|
+
|
161
|
+
|
162
|
+
ColumnSelectionPlugin.prototype.initialize = function (host, options) {
|
163
|
+
if (this._hosts.indexOf(host) >= 0) {
|
164
|
+
return;
|
165
|
+
}
|
166
|
+
|
167
|
+
this._hosts.push(host);
|
168
|
+
|
169
|
+
host.listen("click", this._onClick);
|
170
|
+
host.listen("mousedown", this._onMouseDown);
|
171
|
+
host.listen("keydown", this._onKeyDown);
|
172
|
+
host.listen("columnRemoved", this._onColumnRemoved);
|
173
|
+
host.listen("columnAdded", this._onColumnAdded);
|
174
|
+
host.listen("columnPositionChanged", this._onColumnPositionChanged);
|
175
|
+
host.listen("beforeBatchOperation", this._onBeforeBatchOperation);
|
176
|
+
host.listen("afterBatchOperation", this._onAfterBatchOperation);
|
177
|
+
this.config(options);
|
178
|
+
this.applyStaticStyles(ColumnSelectionPlugin._styleCalculator);
|
179
|
+
};
|
180
|
+
/**
|
181
|
+
* @protected
|
182
|
+
* @ignore
|
183
|
+
*/
|
184
|
+
|
185
|
+
|
186
|
+
ColumnSelectionPlugin.prototype._afterInit = function () {
|
187
|
+
this._cgp = this._getPlugin("ColumnGroupingPlugin");
|
188
|
+
};
|
189
|
+
/** @public
|
190
|
+
* @param {Object=} host core grid object
|
191
|
+
*/
|
192
|
+
|
193
|
+
|
194
|
+
ColumnSelectionPlugin.prototype.unload = function (host) {
|
195
|
+
var at = this._hosts.indexOf(host);
|
196
|
+
|
197
|
+
if (at < 0) {
|
198
|
+
return;
|
199
|
+
}
|
200
|
+
|
201
|
+
host.unlisten("click", this._onClick);
|
202
|
+
host.unlisten("mousedown", this._onMouseDown);
|
203
|
+
host.unlisten("keydown", this._onKeyDown);
|
204
|
+
host.unlisten("columnRemoved", this._onColumnRemoved);
|
205
|
+
host.unlisten("columnAdded", this._onColumnAdded);
|
206
|
+
host.unlisten("columnPositionChanged", this._onColumnPositionChanged);
|
207
|
+
|
208
|
+
this._hosts.splice(at, 1);
|
209
|
+
|
210
|
+
if (!this._hosts.length) {
|
211
|
+
if (this._timerId) {
|
212
|
+
clearTimeout(this._timerId);
|
213
|
+
this._timerId = 0;
|
214
|
+
this._timerMenuId = 0;
|
215
|
+
}
|
216
|
+
}
|
217
|
+
|
218
|
+
this._dispose();
|
219
|
+
};
|
220
|
+
/** @public
|
221
|
+
* @param {Object=} options Grid configuration object
|
222
|
+
*/
|
223
|
+
|
224
|
+
|
225
|
+
ColumnSelectionPlugin.prototype.config = function (options) {
|
226
|
+
if (!options) {
|
227
|
+
return;
|
228
|
+
}
|
229
|
+
|
230
|
+
var pluginOptions = options["columnSelection"];
|
231
|
+
|
232
|
+
if (pluginOptions) {
|
233
|
+
if (_typeof(pluginOptions) === "object") {
|
234
|
+
var val = pluginOptions["singleSelection"];
|
235
|
+
|
236
|
+
if (val) {
|
237
|
+
this._singleSelMode = true;
|
238
|
+
}
|
239
|
+
|
240
|
+
val = pluginOptions["clickToggle"];
|
241
|
+
|
242
|
+
if (val) {
|
243
|
+
this._clickToggleMode = true;
|
244
|
+
}
|
245
|
+
|
246
|
+
val = pluginOptions["menuClicked"];
|
247
|
+
|
248
|
+
if (val) {
|
249
|
+
this._onMenuClicked = val;
|
250
|
+
}
|
251
|
+
|
252
|
+
val = pluginOptions["menuPosition"];
|
253
|
+
|
254
|
+
if (val) {
|
255
|
+
this._menuPosition = val;
|
256
|
+
}
|
257
|
+
|
258
|
+
this.addListener(pluginOptions, "selectionChanged");
|
259
|
+
}
|
260
|
+
} else if (pluginOptions != null) {
|
261
|
+
this.disable();
|
262
|
+
}
|
263
|
+
|
264
|
+
var columns = options["columns"];
|
265
|
+
|
266
|
+
if (!Array.isArray(columns)) {
|
267
|
+
return;
|
268
|
+
}
|
269
|
+
|
270
|
+
var len = columns.length;
|
271
|
+
|
272
|
+
for (var c = 0; c < len; ++c) {
|
273
|
+
var column = columns[c];
|
274
|
+
|
275
|
+
var colData = this._newColumnData(c);
|
276
|
+
|
277
|
+
if (column["unselectable"]) {
|
278
|
+
colData["unselectable"] = true;
|
279
|
+
}
|
280
|
+
}
|
281
|
+
};
|
282
|
+
/** @public
|
283
|
+
* @param {Object=} gridOptions
|
284
|
+
* @return {!Object}
|
285
|
+
*/
|
286
|
+
|
287
|
+
|
288
|
+
ColumnSelectionPlugin.prototype.getConfigObject = function (gridOptions) {
|
289
|
+
var obj = gridOptions || {};
|
290
|
+
var columns = obj.columns;
|
291
|
+
|
292
|
+
if (!columns) {
|
293
|
+
columns = obj.columns = [];
|
294
|
+
}
|
295
|
+
|
296
|
+
var len = this.getColumnCount();
|
297
|
+
|
298
|
+
for (var i = 0; i < len; ++i) {
|
299
|
+
var column = columns[i];
|
300
|
+
|
301
|
+
if (!column) {
|
302
|
+
column = columns[i] = {};
|
303
|
+
}
|
304
|
+
|
305
|
+
var unselectable = this._getColumnOption(i, 'unselectable', this._hosts[0]);
|
306
|
+
|
307
|
+
if (unselectable) {
|
308
|
+
column.unselectable = unselectable;
|
309
|
+
}
|
310
|
+
}
|
311
|
+
|
312
|
+
var extOptions = obj.columnSelection;
|
313
|
+
|
314
|
+
if (!extOptions) {
|
315
|
+
extOptions = obj.columnSelection = {};
|
316
|
+
}
|
317
|
+
|
318
|
+
extOptions.singleSelection = this._singleSelMode;
|
319
|
+
extOptions.clickToggle = this._clickToggleMode;
|
320
|
+
return obj;
|
321
|
+
};
|
322
|
+
/** @public
|
323
|
+
* @param {boolean=} opt_bool
|
324
|
+
*/
|
325
|
+
|
326
|
+
|
327
|
+
ColumnSelectionPlugin.prototype.disable = function (opt_bool) {
|
328
|
+
this._disabled = opt_bool !== false;
|
329
|
+
};
|
330
|
+
/** @public
|
331
|
+
* @return {boolean}
|
332
|
+
*/
|
333
|
+
|
334
|
+
|
335
|
+
ColumnSelectionPlugin.prototype.isEnabled = function () {
|
336
|
+
return !this._disabled;
|
337
|
+
};
|
338
|
+
/** @public
|
339
|
+
* @return {boolean}
|
340
|
+
*/
|
341
|
+
|
342
|
+
|
343
|
+
ColumnSelectionPlugin.prototype.hasSelectedColumn = function () {
|
344
|
+
if (this._hasSelection != null) {
|
345
|
+
return this._hasSelection;
|
346
|
+
}
|
347
|
+
|
348
|
+
return this.getFirstSelectedColumn() >= 0;
|
349
|
+
};
|
350
|
+
/** @public
|
351
|
+
* @return {!Array.<number>}
|
352
|
+
*/
|
353
|
+
|
354
|
+
|
355
|
+
ColumnSelectionPlugin.prototype.getSelectedColumns = function () {
|
356
|
+
var cols = [];
|
357
|
+
|
358
|
+
if (this._hasSelection !== false) {
|
359
|
+
var colCount = this.getColumnCount();
|
360
|
+
|
361
|
+
for (var i = 0; i < colCount; ++i) {
|
362
|
+
if (this.isSelectedColumn(i)) {
|
363
|
+
this._hasSelection = true;
|
364
|
+
cols.push(i);
|
365
|
+
}
|
366
|
+
}
|
367
|
+
}
|
368
|
+
|
369
|
+
return cols;
|
370
|
+
};
|
371
|
+
/** @public
|
372
|
+
* @return {number}
|
373
|
+
*/
|
374
|
+
|
375
|
+
|
376
|
+
ColumnSelectionPlugin.prototype.getFirstSelectedColumn = function () {
|
377
|
+
if (this._hasSelection !== false) {
|
378
|
+
var colCount = this.getColumnCount();
|
379
|
+
|
380
|
+
for (var i = 0; i < colCount; ++i) {
|
381
|
+
if (this.isSelectedColumn(i)) {
|
382
|
+
this._hasSelection = true;
|
383
|
+
return i;
|
384
|
+
}
|
385
|
+
}
|
386
|
+
}
|
387
|
+
|
388
|
+
return -1;
|
389
|
+
};
|
390
|
+
/** @public
|
391
|
+
* @return {number}
|
392
|
+
*/
|
393
|
+
|
394
|
+
|
395
|
+
ColumnSelectionPlugin.prototype.getLastSelectedColumn = function () {
|
396
|
+
if (this._hasSelection !== false) {
|
397
|
+
var colCount = this.getColumnCount();
|
398
|
+
|
399
|
+
for (var i = colCount; --i >= 0;) {
|
400
|
+
if (this.isSelectedColumn(i)) {
|
401
|
+
this._hasSelection = true;
|
402
|
+
return i;
|
403
|
+
}
|
404
|
+
}
|
405
|
+
}
|
406
|
+
|
407
|
+
return -1;
|
408
|
+
}; // /** @public
|
409
|
+
// * @return {!Array.<string>}
|
410
|
+
// */
|
411
|
+
// ColumnSelectionPlugin.prototype.getSelectedFields = function() {
|
412
|
+
// var cols = this.getSelectedColumns();
|
413
|
+
// var len = cols.length;
|
414
|
+
// var fields = new Array(len);
|
415
|
+
// for(var i = 0; i < len; ++i) {
|
416
|
+
// fields[i] = this._getField(cols[i]);
|
417
|
+
// }
|
418
|
+
// return fields;
|
419
|
+
// };
|
420
|
+
|
421
|
+
/** Select or deselect a column on the active grid
|
422
|
+
* @public
|
423
|
+
* @param {number} colIndex
|
424
|
+
* @param {boolean=} opt_select=false Null or undefined value will be treated as false value
|
425
|
+
* @param {Object=} opt_grid core grid object
|
426
|
+
* @return {boolean} Return true for successful selection, otherwise false
|
427
|
+
*/
|
428
|
+
|
429
|
+
|
430
|
+
ColumnSelectionPlugin.prototype.setSelectedColumn = function (colIndex, opt_select, opt_grid) {
|
431
|
+
var dirty = this._setSelectedColumn(colIndex, opt_select, opt_grid);
|
432
|
+
|
433
|
+
if (dirty) {
|
434
|
+
this._updateGroupSelection();
|
435
|
+
}
|
436
|
+
|
437
|
+
return dirty;
|
438
|
+
};
|
439
|
+
/** Select the specified column on an active grid, and clear all other column selections
|
440
|
+
* @public
|
441
|
+
* @param {(number|null)=} opt_colIndex
|
442
|
+
* @param {Object=} opt_grid core grid object
|
443
|
+
*/
|
444
|
+
|
445
|
+
|
446
|
+
ColumnSelectionPlugin.prototype.selectSingleColumn = function (opt_colIndex, opt_grid) {
|
447
|
+
if (opt_colIndex == null) {
|
448
|
+
// null or undefined
|
449
|
+
opt_colIndex = this._anchorCol;
|
450
|
+
}
|
451
|
+
|
452
|
+
if (!(opt_colIndex >= 0)) {
|
453
|
+
opt_colIndex = 0;
|
454
|
+
}
|
455
|
+
|
456
|
+
var activeGrid = opt_grid || this._activeGrid;
|
457
|
+
this.clearAllSelections();
|
458
|
+
|
459
|
+
if (this._setSelectedColumn(opt_colIndex, true, activeGrid)) {
|
460
|
+
this._anchorCol = opt_colIndex; // Update the anchor
|
461
|
+
}
|
462
|
+
|
463
|
+
this._updateGroupSelection();
|
464
|
+
};
|
465
|
+
/**
|
466
|
+
* Select the columns in a group on an active grid, and clear all other column selections
|
467
|
+
* This does not working with single selection mode
|
468
|
+
* @public
|
469
|
+
* @param {string} groupId
|
470
|
+
* @param {Object=} opt_grid core grid object
|
471
|
+
*/
|
472
|
+
|
473
|
+
|
474
|
+
ColumnSelectionPlugin.prototype.selectSingleGroup = function (groupId, opt_grid) {
|
475
|
+
var activeGrid = opt_grid || this._activeGrid;
|
476
|
+
var cgp = this._cgp;
|
477
|
+
|
478
|
+
if (!cgp || !groupId) {
|
479
|
+
return;
|
480
|
+
}
|
481
|
+
|
482
|
+
var childIndices = cgp.getChildColumnIndices(groupId);
|
483
|
+
var dirty = false;
|
484
|
+
this.clearAllSelections();
|
485
|
+
|
486
|
+
for (var i = 0; i <= childIndices.length; i++) {
|
487
|
+
dirty |= this._setSelectedColumn(childIndices[i], true, activeGrid);
|
488
|
+
}
|
489
|
+
|
490
|
+
if (dirty) {
|
491
|
+
this._anchorCol = childIndices[0];
|
492
|
+
}
|
493
|
+
|
494
|
+
this._updateGroupSelection();
|
495
|
+
};
|
496
|
+
/** Select from the anchorIndex to the target by length
|
497
|
+
* @public
|
498
|
+
* @param {number} anchorIndex
|
499
|
+
* @param {number} len If 1, two column will be selected (anchor and the one next to it). Negative len will select column to the left. 0 only anchor column is selected.
|
500
|
+
* @param {Object=} opt_grid core grid object
|
501
|
+
*/
|
502
|
+
|
503
|
+
|
504
|
+
ColumnSelectionPlugin.prototype.selectRange = function (anchorIndex, len, opt_grid) {
|
505
|
+
this._anchorCol = !(anchorIndex >= 0) ? 0 : anchorIndex;
|
506
|
+
|
507
|
+
this._selectFromAnchorToTarget(this._anchorCol + len);
|
508
|
+
};
|
509
|
+
/** Select all column in a single grid
|
510
|
+
* @public
|
511
|
+
*/
|
512
|
+
|
513
|
+
|
514
|
+
ColumnSelectionPlugin.prototype.selectAllColumns = function () {
|
515
|
+
this.selectRange(0, this.getColumnCount());
|
516
|
+
};
|
517
|
+
/** @private
|
518
|
+
* @param {Object} e
|
519
|
+
*/
|
520
|
+
|
521
|
+
|
522
|
+
ColumnSelectionPlugin.prototype._onColumnPositionChanged = function (e) {
|
523
|
+
if (this._timerMenuId) {
|
524
|
+
return;
|
525
|
+
}
|
526
|
+
|
527
|
+
if (e.sender && e.sender === this._activeGrid) {
|
528
|
+
this._clearMenuIcon(); // Clear icon before re-renderer
|
529
|
+
|
530
|
+
|
531
|
+
this._timerMenuId = setTimeout(this._updateMenuIcon, 800);
|
532
|
+
}
|
533
|
+
};
|
534
|
+
/** @private
|
535
|
+
* @return {boolean} return true if icon added
|
536
|
+
*/
|
537
|
+
|
538
|
+
|
539
|
+
ColumnSelectionPlugin.prototype._updateMenuIcon = function () {
|
540
|
+
this._timerMenuId = 0;
|
541
|
+
|
542
|
+
if (!this._onMenuClicked) {
|
543
|
+
// When not set to onMenuClicked, the icon is not displayed
|
544
|
+
return false;
|
545
|
+
}
|
546
|
+
|
547
|
+
var startColIndex = this.getFirstSelectedColumn();
|
548
|
+
var host = this._activeGrid;
|
549
|
+
|
550
|
+
if (startColIndex < 0 || !host) {
|
551
|
+
this._clearMenuIcon();
|
552
|
+
|
553
|
+
return false;
|
554
|
+
}
|
555
|
+
|
556
|
+
var parentEl = host.getParent().parentNode;
|
557
|
+
var endColIndex = this.getLastSelectedColumn();
|
558
|
+
var rectPos = host.getColumnRect(startColIndex, endColIndex);
|
559
|
+
|
560
|
+
if (rectPos.width <= 0 || rectPos.left > rectPos.gridWidth) {
|
561
|
+
// hide icon when selection left or right not show.
|
562
|
+
this._clearMenuIcon();
|
563
|
+
|
564
|
+
return false;
|
565
|
+
}
|
566
|
+
|
567
|
+
if (!this._menuButton) {
|
568
|
+
this._menuButton = document.createElement("div");
|
569
|
+
|
570
|
+
this._menuButton.classList.add("column-selection-menu");
|
571
|
+
|
572
|
+
if (this._menuPosition !== "outside") {
|
573
|
+
this._menuButton.classList.add("column-selection-menu-inside"); // currently not support runtime change
|
574
|
+
|
575
|
+
}
|
576
|
+
|
577
|
+
var coralItem = document.createElement("ef-icon");
|
578
|
+
coralItem.icon = "most-detail";
|
579
|
+
|
580
|
+
this._menuButton.appendChild(coralItem);
|
581
|
+
|
582
|
+
this._menuButton.addEventListener("click", this._onMenuClicked);
|
583
|
+
}
|
584
|
+
|
585
|
+
parentEl.appendChild(this._menuButton);
|
586
|
+
var c;
|
587
|
+
var iconSize = 28; // calculate actual view when have pinned right
|
588
|
+
|
589
|
+
var pinnedLeftCount = rectPos.leftPinnedIndex;
|
590
|
+
var pinnedLeftSize = 0;
|
591
|
+
|
592
|
+
for (c = 0; c <= pinnedLeftCount; c++) {
|
593
|
+
// include index 0 from leftPinnedIndex
|
594
|
+
pinnedLeftSize = pinnedLeftSize + host.getColumnWidth(c);
|
595
|
+
}
|
596
|
+
|
597
|
+
var rightPx = rectPos.left + rectPos.width;
|
598
|
+
var leftOffset = rightPx;
|
599
|
+
var topOffset = rectPos.top;
|
600
|
+
|
601
|
+
if (this._menuPosition !== "outside") {
|
602
|
+
iconSize = 24; // edit size icon and re-calculate
|
603
|
+
|
604
|
+
this._menuButton.classList.add("column-selection-menu-inside");
|
605
|
+
|
606
|
+
var actualView = rightPx + iconSize;
|
607
|
+
var endRightPosition = rectPos.scrollViewSize + pinnedLeftSize; // rectPos.scrollViewSize doesn't including pinned left size
|
608
|
+
|
609
|
+
if (actualView >= endRightPosition) {
|
610
|
+
// case swap top right to left side column, when can't add menu in right side (overflow right)
|
611
|
+
leftOffset = rectPos.left - iconSize;
|
612
|
+
|
613
|
+
if (leftOffset < 0) {
|
614
|
+
// only case select all row in inside mode
|
615
|
+
leftOffset = rectPos.gridWidth - iconSize;
|
616
|
+
}
|
617
|
+
}
|
618
|
+
} else {
|
619
|
+
// TODO : support in another mode currently have "outside" and "inside"
|
620
|
+
if (rightPx >= rectPos.gridWidth) {
|
621
|
+
leftOffset = rectPos.gridWidth; // Menu move to the right size if inside mode when overflow grid
|
622
|
+
}
|
623
|
+
}
|
624
|
+
|
625
|
+
this._menuButton.style.left = leftOffset + "px"; // Menu icon position in top right
|
626
|
+
|
627
|
+
this._menuButton.style.top = topOffset + "px";
|
628
|
+
return true;
|
629
|
+
};
|
630
|
+
/** @private */
|
631
|
+
|
632
|
+
|
633
|
+
ColumnSelectionPlugin.prototype._clearMenuIcon = function () {
|
634
|
+
if (this._menuButton && this._menuButton.parentNode) {
|
635
|
+
this._menuButton.parentNode.removeChild(this._menuButton);
|
636
|
+
}
|
637
|
+
};
|
638
|
+
/** @public */
|
639
|
+
|
640
|
+
|
641
|
+
ColumnSelectionPlugin.prototype.clearAllSelections = function () {
|
642
|
+
var tableCount = this._hosts.length;
|
643
|
+
|
644
|
+
if (this.hasSelectedColumn()) {
|
645
|
+
for (var c = this.getColumnCount(); --c >= 0;) {
|
646
|
+
if (this.isSelectedColumn(c)) {
|
647
|
+
for (var i = 0; i < tableCount; ++i) {
|
648
|
+
this._hosts[i].selectColumn(c, false);
|
649
|
+
}
|
650
|
+
}
|
651
|
+
}
|
652
|
+
|
653
|
+
this._hasSelection = false;
|
654
|
+
this._activeGrid = this._hosts[0] || null; // Maintain selectability even if there is no selection
|
655
|
+
|
656
|
+
this._clearMenuIcon();
|
657
|
+
}
|
658
|
+
|
659
|
+
this._updateGroupSelection();
|
660
|
+
};
|
661
|
+
/** Alias to clearAllSelections() method
|
662
|
+
* @public
|
663
|
+
* @function
|
664
|
+
* @see {@link ColumnSelectionPlugin#clearAllSelections}
|
665
|
+
*/
|
666
|
+
|
667
|
+
|
668
|
+
ColumnSelectionPlugin.prototype.clearSelectedColumns = ColumnSelectionPlugin.prototype.clearAllSelections;
|
669
|
+
/** @public
|
670
|
+
* @param {(number|Array.<number>)=} cols
|
671
|
+
*/
|
672
|
+
|
673
|
+
ColumnSelectionPlugin.prototype.clearSelection = function (cols) {
|
674
|
+
if (cols) {
|
675
|
+
if (Array.isArray(cols)) {
|
676
|
+
for (var i = cols.length; --i >= 0;) {
|
677
|
+
this.setSelectedColumn(cols[i], false);
|
678
|
+
}
|
679
|
+
} else if (typeof cols === "number") {
|
680
|
+
this.setSelectedColumn(cols, false);
|
681
|
+
}
|
682
|
+
} else {
|
683
|
+
this.clearAllSelections();
|
684
|
+
}
|
685
|
+
};
|
686
|
+
/** Alias of {@link ColumnSelectionPlugin#selectAllColumns}
|
687
|
+
* @public
|
688
|
+
* @function
|
689
|
+
*/
|
690
|
+
|
691
|
+
|
692
|
+
ColumnSelectionPlugin.prototype.selectAll = ColumnSelectionPlugin.prototype.selectAllColumns;
|
693
|
+
/** Alias of {@link ColumnSelectionPlugin#clearSelection}
|
694
|
+
* @public
|
695
|
+
* @function
|
696
|
+
*/
|
697
|
+
|
698
|
+
ColumnSelectionPlugin.prototype.deselectAll = ColumnSelectionPlugin.prototype.clearSelection;
|
699
|
+
/** @public
|
700
|
+
* @param {number} colIndex
|
701
|
+
* @return {boolean}
|
702
|
+
*/
|
703
|
+
|
704
|
+
ColumnSelectionPlugin.prototype.isSelectedColumn = function (colIndex) {
|
705
|
+
if (this._activeGrid) {
|
706
|
+
return this._activeGrid.isSelectedColumn(colIndex);
|
707
|
+
}
|
708
|
+
|
709
|
+
return false;
|
710
|
+
};
|
711
|
+
/** @public
|
712
|
+
* @return {Object} core grid object
|
713
|
+
*/
|
714
|
+
|
715
|
+
|
716
|
+
ColumnSelectionPlugin.prototype.getActiveGrid = function () {
|
717
|
+
return this._activeGrid;
|
718
|
+
};
|
719
|
+
/** Select or deselect a column on the active grid
|
720
|
+
* @private
|
721
|
+
* @param {number} colIndex
|
722
|
+
* @param {boolean=} opt_select=false Null or undefined value will be treated as false value
|
723
|
+
* @param {Object=} opt_grid core grid object
|
724
|
+
* @return {boolean} Return true for successful selection, otherwise false
|
725
|
+
*/
|
726
|
+
|
727
|
+
|
728
|
+
ColumnSelectionPlugin.prototype._setSelectedColumn = function (colIndex, opt_select, opt_grid) {
|
729
|
+
if (!(colIndex >= 0)) {
|
730
|
+
return false;
|
731
|
+
}
|
732
|
+
|
733
|
+
if (opt_grid) {
|
734
|
+
if (opt_grid !== this._activeGrid) {
|
735
|
+
this._activeGrid = opt_grid; // TODO: Check if the grid is one of the hosts
|
736
|
+
}
|
737
|
+
}
|
738
|
+
|
739
|
+
if (!this._activeGrid) {
|
740
|
+
this._activeGrid = this._hosts[0]; // Select the first grid
|
741
|
+
|
742
|
+
if (!this._activeGrid) {
|
743
|
+
return false;
|
744
|
+
}
|
745
|
+
}
|
746
|
+
|
747
|
+
if (colIndex >= this.getColumnCount()) {
|
748
|
+
return false;
|
749
|
+
}
|
750
|
+
|
751
|
+
var selection = opt_select ? true : false;
|
752
|
+
|
753
|
+
if (selection && this._getColumnOption(colIndex, "unselectable")) {
|
754
|
+
return false;
|
755
|
+
}
|
756
|
+
|
757
|
+
this._hasSelection = selection ? true : null;
|
758
|
+
this._pendingSelectionOnAdded = -1; // New selection happens before resolving the pending selection
|
759
|
+
|
760
|
+
this._pendingSelectionOnRemoved = -1; // New selection happens before resolving the pending selection
|
761
|
+
|
762
|
+
var len = this._hosts.length;
|
763
|
+
|
764
|
+
for (var i = 0; i < len; ++i) {
|
765
|
+
this._hosts[i].selectColumn(colIndex, selection);
|
766
|
+
}
|
767
|
+
|
768
|
+
this._updateMenuIcon();
|
769
|
+
|
770
|
+
return true;
|
771
|
+
};
|
772
|
+
/**
|
773
|
+
* @private
|
774
|
+
* @param {Array<number>} colIndices
|
775
|
+
* @return {boolean}
|
776
|
+
*/
|
777
|
+
|
778
|
+
|
779
|
+
ColumnSelectionPlugin.prototype._isSelectedColumns = function (colIndices) {
|
780
|
+
var isAllSelected = false;
|
781
|
+
var count = colIndices.length;
|
782
|
+
|
783
|
+
if (this._activeGrid) {
|
784
|
+
for (var i = 0; i < count; i++) {
|
785
|
+
var colIndex = colIndices[i];
|
786
|
+
isAllSelected = this._activeGrid.isSelectedColumn(colIndex);
|
787
|
+
|
788
|
+
if (!isAllSelected) {
|
789
|
+
break;
|
790
|
+
}
|
791
|
+
}
|
792
|
+
}
|
793
|
+
|
794
|
+
return isAllSelected;
|
795
|
+
};
|
796
|
+
/** Update group selection according to current selected columns
|
797
|
+
* @private
|
798
|
+
*/
|
799
|
+
|
800
|
+
|
801
|
+
ColumnSelectionPlugin.prototype._updateGroupSelection = function () {
|
802
|
+
if (this._cgp && this._cgp.selectGroupHeaders) {
|
803
|
+
this._cgp.selectGroupHeaders(this.getSelectedColumns());
|
804
|
+
}
|
805
|
+
};
|
806
|
+
/** Left click on title causes selection change. <br>
|
807
|
+
* Ctrl/Shift left click on title causes multi selection. <br>
|
808
|
+
* Left click anywhere, not title, causes deselection.
|
809
|
+
* @private
|
810
|
+
* @param {MouseEvent} e
|
811
|
+
*/
|
812
|
+
|
813
|
+
|
814
|
+
ColumnSelectionPlugin.prototype._onClick = function (e) {
|
815
|
+
if (this._disabled) {
|
816
|
+
return;
|
817
|
+
}
|
818
|
+
|
819
|
+
var host = this.getRelativeGrid(e);
|
820
|
+
|
821
|
+
if (!host) {
|
822
|
+
return;
|
823
|
+
}
|
824
|
+
|
825
|
+
var cgp = this._cgp;
|
826
|
+
var info = cgp ? cgp.getCellInfo(e) : host.getRelativePosition(e);
|
827
|
+
|
828
|
+
if (!info["hit"] || info["sectionType"] !== "title") {
|
829
|
+
return;
|
830
|
+
}
|
831
|
+
|
832
|
+
var cIndex = info["colIndex"];
|
833
|
+
var prevSel = this.isSelectedColumn(cIndex);
|
834
|
+
|
835
|
+
if (e.button === 2) {
|
836
|
+
// Right button
|
837
|
+
if (e.type === "click") {
|
838
|
+
// Do nothing on right click
|
839
|
+
return;
|
840
|
+
} // To allow right clicking at the content for context menu and multi column selection
|
841
|
+
|
842
|
+
|
843
|
+
if (prevSel) {
|
844
|
+
return;
|
845
|
+
}
|
846
|
+
}
|
847
|
+
|
848
|
+
var isNewGridClicked = !this._activeGrid || this._activeGrid !== host;
|
849
|
+
var groupId = info["groupId"];
|
850
|
+
var childIndices, childCount;
|
851
|
+
|
852
|
+
if (groupId) {
|
853
|
+
childIndices = cgp.getChildColumnIndices(groupId);
|
854
|
+
childCount = childIndices.length;
|
855
|
+
}
|
856
|
+
|
857
|
+
if (isNewGridClicked) {
|
858
|
+
this.clearAllSelections();
|
859
|
+
this._activeGrid = host;
|
860
|
+
this._anchorCol = -1;
|
861
|
+
}
|
862
|
+
|
863
|
+
if (e.ctrlKey || e.metaKey) {
|
864
|
+
if (!groupId && (!this._singleSelMode || prevSel)) {
|
865
|
+
this.setSelectedColumn(cIndex, !prevSel);
|
866
|
+
this._anchorCol = prevSel ? cIndex : this.getFirstSelectedColumn();
|
867
|
+
} else {
|
868
|
+
var newState = !this._isSelectedColumns(childIndices);
|
869
|
+
|
870
|
+
for (var i = 0; i < childCount; i++) {
|
871
|
+
this.setSelectedColumn(childIndices[i], newState, host);
|
872
|
+
}
|
873
|
+
|
874
|
+
this._anchorCol = newState ? childIndices[0] : this.getFirstSelectedColumn();
|
875
|
+
}
|
876
|
+
} else if (e.shiftKey && !this._singleSelMode) {
|
877
|
+
if (groupId) {
|
878
|
+
var firstGroupCol = childIndices[0];
|
879
|
+
var lastGroupCol = childIndices[childCount - 1];
|
880
|
+
|
881
|
+
if (this._anchorCol >= firstGroupCol && this._anchorCol <= lastGroupCol) {
|
882
|
+
this._anchorCol = firstGroupCol;
|
883
|
+
cIndex = lastGroupCol;
|
884
|
+
} else if (this._anchorCol > firstGroupCol) {
|
885
|
+
cIndex = firstGroupCol;
|
886
|
+
} else if (this._anchorCol < lastGroupCol) {
|
887
|
+
cIndex = lastGroupCol;
|
888
|
+
}
|
889
|
+
}
|
890
|
+
|
891
|
+
this._selectFromAnchorToTarget(cIndex);
|
892
|
+
} else if (this._clickToggleMode) {
|
893
|
+
var cols = this.getSelectedColumns();
|
894
|
+
|
895
|
+
if (cols.length === 1 && cols[0] === cIndex) {
|
896
|
+
this.setSelectedColumn(cIndex, false); // toggle
|
897
|
+
|
898
|
+
this._anchorCol = -1;
|
899
|
+
} else if (childIndices && cols.length == childCount && this._isSelectedColumns(childIndices)) {
|
900
|
+
this.clearAllSelections();
|
901
|
+
this._anchorCol = -1;
|
902
|
+
} else {
|
903
|
+
groupId ? this.selectSingleGroup(groupId) : this.selectSingleColumn(cIndex);
|
904
|
+
}
|
905
|
+
} else {
|
906
|
+
if (this._singleSelMode) {
|
907
|
+
if (groupId) {
|
908
|
+
return;
|
909
|
+
}
|
910
|
+
|
911
|
+
this.selectSingleColumn(cIndex);
|
912
|
+
} else {
|
913
|
+
groupId ? this.selectSingleGroup(groupId) : this.selectSingleColumn(cIndex);
|
914
|
+
}
|
915
|
+
}
|
916
|
+
|
917
|
+
if (this._anchorCol < 0) {
|
918
|
+
this._hasSelection = false;
|
919
|
+
this._activeGrid = this._hosts[0] || null; // Maintain selectability even if there is no selection
|
920
|
+
} else {
|
921
|
+
if (this._activeGrid && !prevSel) {
|
922
|
+
this._activeGrid.focus();
|
923
|
+
}
|
924
|
+
}
|
925
|
+
|
926
|
+
this._dispatchSelectionChanged(e, cIndex);
|
927
|
+
};
|
928
|
+
/** @private
|
929
|
+
* @param {MouseEvent} e
|
930
|
+
*/
|
931
|
+
|
932
|
+
|
933
|
+
ColumnSelectionPlugin.prototype._onMouseDown = function (e) {
|
934
|
+
if (e.button === 2) {
|
935
|
+
// Right button
|
936
|
+
if (e.shiftKey || e.ctrlKey) {
|
937
|
+
return;
|
938
|
+
}
|
939
|
+
|
940
|
+
this._onClick(e);
|
941
|
+
}
|
942
|
+
};
|
943
|
+
/** @private
|
944
|
+
* @param {KeyboardEvent} e
|
945
|
+
*/
|
946
|
+
|
947
|
+
|
948
|
+
ColumnSelectionPlugin.prototype._onKeyDown = function (e) {
|
949
|
+
if (!this._activeGrid || !this.hasSelectedColumn()) {
|
950
|
+
return;
|
951
|
+
}
|
952
|
+
|
953
|
+
switch (e.keyCode) {
|
954
|
+
case 9:
|
955
|
+
// Tab
|
956
|
+
if (this._selectByTab(e)) {
|
957
|
+
this._dispatchSelectionChanged(e);
|
958
|
+
}
|
959
|
+
|
960
|
+
break;
|
961
|
+
|
962
|
+
case 37:
|
963
|
+
//Left arrow
|
964
|
+
if (this._selectByKey(-1, e)) {
|
965
|
+
this._dispatchSelectionChanged(e);
|
966
|
+
}
|
967
|
+
|
968
|
+
break;
|
969
|
+
|
970
|
+
case 39:
|
971
|
+
//Right arrow
|
972
|
+
if (this._selectByKey(1, e)) {
|
973
|
+
this._dispatchSelectionChanged(e);
|
974
|
+
}
|
975
|
+
|
976
|
+
break;
|
977
|
+
|
978
|
+
case 40:
|
979
|
+
//Down arrow
|
980
|
+
//window.setTimeout(this._gotoContent, 10); // RowSelection also listen to the keydown, and thus we have to use timer
|
981
|
+
if (this._gotoContent()) {
|
982
|
+
this._dispatchSelectionChanged(e);
|
983
|
+
}
|
984
|
+
|
985
|
+
break;
|
986
|
+
}
|
987
|
+
};
|
988
|
+
/** @private
|
989
|
+
* @param {Object} e
|
990
|
+
*/
|
991
|
+
|
992
|
+
|
993
|
+
ColumnSelectionPlugin.prototype._onColumnRemoved = function (e) {
|
994
|
+
var colIndex = e.colIndex;
|
995
|
+
|
996
|
+
if (this._timerId) {
|
997
|
+
if (this._pendingSelectionOnAdded > 0 && colIndex < this._pendingSelectionOnAdded) {
|
998
|
+
this._pendingSelectionOnAdded = this._pendingSelectionOnAdded - 1;
|
999
|
+
}
|
1000
|
+
|
1001
|
+
return;
|
1002
|
+
} // Since column and its selection state has been removed, we have to keep track of the first selection across multiple calls
|
1003
|
+
|
1004
|
+
|
1005
|
+
if (this._hasSelection) {
|
1006
|
+
var firstSel = this.getFirstSelectedColumn();
|
1007
|
+
|
1008
|
+
if (firstSel < 0) {
|
1009
|
+
// The last selection has been removed
|
1010
|
+
this._hasSelection = false;
|
1011
|
+
|
1012
|
+
if (this._pendingSelectionOnRemoved < 0) {
|
1013
|
+
if (colIndex >= this.getColumnCount()) {
|
1014
|
+
colIndex = this.getColumnCount() - 1;
|
1015
|
+
}
|
1016
|
+
|
1017
|
+
this._pendingSelectionOnRemoved = colIndex;
|
1018
|
+
}
|
1019
|
+
|
1020
|
+
this._timerId = setTimeout(this._onReselection, 10);
|
1021
|
+
} else {
|
1022
|
+
this._pendingSelectionOnRemoved = firstSel;
|
1023
|
+
}
|
1024
|
+
}
|
1025
|
+
};
|
1026
|
+
/** @private
|
1027
|
+
* @param {Object} e
|
1028
|
+
*/
|
1029
|
+
|
1030
|
+
|
1031
|
+
ColumnSelectionPlugin.prototype._onColumnAdded = function (e) {
|
1032
|
+
if (this._timerId) {
|
1033
|
+
this._pendingSelectionOnAdded = e.colIndex;
|
1034
|
+
return;
|
1035
|
+
}
|
1036
|
+
|
1037
|
+
if (this._hasSelection) {
|
1038
|
+
this.clearAllSelections();
|
1039
|
+
|
1040
|
+
if (this._pendingSelectionOnAdded < 0) {
|
1041
|
+
this._pendingSelectionOnAdded = e.colIndex;
|
1042
|
+
}
|
1043
|
+
|
1044
|
+
this._timerId = setTimeout(this._onReselection, 10);
|
1045
|
+
}
|
1046
|
+
};
|
1047
|
+
/** @private
|
1048
|
+
* @param {Object} e
|
1049
|
+
*/
|
1050
|
+
|
1051
|
+
|
1052
|
+
ColumnSelectionPlugin.prototype._onReselection = function (e) {
|
1053
|
+
this._timerId = 0;
|
1054
|
+
var pendingSelection = this._pendingSelectionOnAdded > -1 ? this._pendingSelectionOnAdded : this._pendingSelectionOnRemoved;
|
1055
|
+
this.setSelectedColumn(pendingSelection, true);
|
1056
|
+
this._pendingSelectionOnAdded = -1;
|
1057
|
+
this._pendingSelectionOnRemoved = -1;
|
1058
|
+
|
1059
|
+
if (!this._activeGrid) {
|
1060
|
+
this._activeGrid = this._hosts[0];
|
1061
|
+
}
|
1062
|
+
|
1063
|
+
this._activeGrid.focus();
|
1064
|
+
};
|
1065
|
+
/** @private
|
1066
|
+
* @param {Object} e
|
1067
|
+
*/
|
1068
|
+
|
1069
|
+
|
1070
|
+
ColumnSelectionPlugin.prototype._onBeforeBatchOperation = function (e) {
|
1071
|
+
var host = this._activeGrid;
|
1072
|
+
|
1073
|
+
if (this._hasSelection && e["batchType"] === "reset") {
|
1074
|
+
var colCount = this.getColumnCount();
|
1075
|
+
|
1076
|
+
for (var i = 0; i < colCount; ++i) {
|
1077
|
+
if (this.isSelectedColumn(i)) {
|
1078
|
+
var colId = host.getColumnId(i);
|
1079
|
+
var field = host.getColumnField(i);
|
1080
|
+
|
1081
|
+
if (colId) {
|
1082
|
+
this._prevSelectedCols[colId] = field;
|
1083
|
+
} else {
|
1084
|
+
this._prevSelectedCols[field] = "";
|
1085
|
+
}
|
1086
|
+
}
|
1087
|
+
}
|
1088
|
+
|
1089
|
+
this.clearAllSelections(); //clear all to improve performance during add/remove operation
|
1090
|
+
}
|
1091
|
+
};
|
1092
|
+
/** @private
|
1093
|
+
* @param {Object} e
|
1094
|
+
*/
|
1095
|
+
|
1096
|
+
|
1097
|
+
ColumnSelectionPlugin.prototype._onAfterBatchOperation = function (e) {
|
1098
|
+
if (e["batchType"] === "reset") {
|
1099
|
+
var prevSelectedCols = Object.keys(this._prevSelectedCols);
|
1100
|
+
var prevSelectedCount = prevSelectedCols.length;
|
1101
|
+
|
1102
|
+
if (prevSelectedCount) {
|
1103
|
+
this.clearAllSelections();
|
1104
|
+
|
1105
|
+
for (var i = 0; i < prevSelectedCount; i++) {
|
1106
|
+
var colId = prevSelectedCols[i];
|
1107
|
+
var field = this._prevSelectedCols[colId];
|
1108
|
+
var prevSelectedIndex = this.getColumnIndex(colId);
|
1109
|
+
|
1110
|
+
if (prevSelectedIndex < 0) {
|
1111
|
+
prevSelectedIndex = this.getColumnIndex(field);
|
1112
|
+
}
|
1113
|
+
|
1114
|
+
this.setSelectedColumn(prevSelectedIndex, true);
|
1115
|
+
}
|
1116
|
+
|
1117
|
+
this._prevSelectedCols = {};
|
1118
|
+
}
|
1119
|
+
}
|
1120
|
+
};
|
1121
|
+
/** @private
|
1122
|
+
* @param {KeyboardEvent} e
|
1123
|
+
* @return {boolean}
|
1124
|
+
*/
|
1125
|
+
|
1126
|
+
|
1127
|
+
ColumnSelectionPlugin.prototype._selectByTab = function (e) {
|
1128
|
+
var direction = e.shiftKey ? -1 : 1;
|
1129
|
+
var next = direction < 0 ? this.getFirstSelectedColumn() : this.getLastSelectedColumn();
|
1130
|
+
|
1131
|
+
if (next < 0) {
|
1132
|
+
return false; // No selected column
|
1133
|
+
}
|
1134
|
+
|
1135
|
+
Dom.preventDefault(e);
|
1136
|
+
next += direction;
|
1137
|
+
var colCount = this.getColumnCount();
|
1138
|
+
|
1139
|
+
if (next < 0) {
|
1140
|
+
if (this._gotoPrevGrid()) {
|
1141
|
+
return true;
|
1142
|
+
}
|
1143
|
+
|
1144
|
+
next = 0;
|
1145
|
+
} else if (next >= colCount) {
|
1146
|
+
if (this._gotoNextGrid()) {
|
1147
|
+
return true;
|
1148
|
+
}
|
1149
|
+
|
1150
|
+
next = colCount - 1;
|
1151
|
+
}
|
1152
|
+
|
1153
|
+
this.selectSingleColumn(next);
|
1154
|
+
|
1155
|
+
this._activeGrid.scrollToColumn(next);
|
1156
|
+
|
1157
|
+
return true;
|
1158
|
+
};
|
1159
|
+
/** @private
|
1160
|
+
* @param {number} direction
|
1161
|
+
* @param {KeyboardEvent} e
|
1162
|
+
* @return {boolean}
|
1163
|
+
*/
|
1164
|
+
|
1165
|
+
|
1166
|
+
ColumnSelectionPlugin.prototype._selectByKey = function (direction, e) {
|
1167
|
+
var curSel = direction < 0 ? this.getFirstSelectedColumn() : this.getLastSelectedColumn();
|
1168
|
+
|
1169
|
+
if (curSel < 0) {
|
1170
|
+
return false; // No selected column
|
1171
|
+
}
|
1172
|
+
|
1173
|
+
var colCount = this.getColumnCount();
|
1174
|
+
|
1175
|
+
var next = this._getNextSelection(curSel, direction);
|
1176
|
+
|
1177
|
+
if (next < 0) {
|
1178
|
+
if (!e.shiftKey && this._gotoPrevGrid()) {
|
1179
|
+
Dom.preventDefault(e);
|
1180
|
+
return true;
|
1181
|
+
}
|
1182
|
+
|
1183
|
+
next = 0;
|
1184
|
+
} else if (next >= colCount) {
|
1185
|
+
if (!e.shiftKey && this._gotoNextGrid()) {
|
1186
|
+
Dom.preventDefault(e);
|
1187
|
+
return true;
|
1188
|
+
}
|
1189
|
+
|
1190
|
+
next = colCount - 1;
|
1191
|
+
}
|
1192
|
+
|
1193
|
+
if (!this._activeGrid.isColumnVisible(next)) {
|
1194
|
+
return false; // No further visible column can be selected
|
1195
|
+
}
|
1196
|
+
|
1197
|
+
Dom.preventDefault(e);
|
1198
|
+
|
1199
|
+
if (e.shiftKey && !this._singleSelMode) {
|
1200
|
+
this._selectFromAnchorToTarget(next);
|
1201
|
+
} else {
|
1202
|
+
this.selectSingleColumn(next);
|
1203
|
+
}
|
1204
|
+
|
1205
|
+
this._activeGrid.scrollToColumn(next);
|
1206
|
+
|
1207
|
+
return true;
|
1208
|
+
};
|
1209
|
+
/** @private
|
1210
|
+
* @param {number} curSel
|
1211
|
+
* @param {number} direction Must not be zero
|
1212
|
+
* @return {number} next selection
|
1213
|
+
*/
|
1214
|
+
|
1215
|
+
|
1216
|
+
ColumnSelectionPlugin.prototype._getNextSelection = function (curSel, direction) {
|
1217
|
+
var next = curSel + direction;
|
1218
|
+
var colCount = this.getColumnCount(); // isColumnVisible() with negative index or invalid index gives true as a result.
|
1219
|
+
|
1220
|
+
while (!this._activeGrid.isColumnVisible(next)) {
|
1221
|
+
// Skip invisible columns
|
1222
|
+
if (next < 0 || next >= colCount) {
|
1223
|
+
break; // no further visible selection
|
1224
|
+
}
|
1225
|
+
|
1226
|
+
next += direction;
|
1227
|
+
}
|
1228
|
+
|
1229
|
+
return next;
|
1230
|
+
};
|
1231
|
+
/** @private
|
1232
|
+
* @return {boolean}
|
1233
|
+
*/
|
1234
|
+
|
1235
|
+
|
1236
|
+
ColumnSelectionPlugin.prototype._gotoPrevGrid = function () {
|
1237
|
+
if (this._activeGrid === this._hosts[0]) {
|
1238
|
+
// This the first grid, so go to the content
|
1239
|
+
return this._gotoContent();
|
1240
|
+
} else {
|
1241
|
+
var curIndex = this._hosts.indexOf(this._activeGrid);
|
1242
|
+
|
1243
|
+
if (curIndex > 0) {
|
1244
|
+
this.selectSingleColumn(this._getNextSelection(this.getColumnCount(), -1), this._hosts[curIndex - 1]); // go to the next grid at the first column
|
1245
|
+
|
1246
|
+
return true;
|
1247
|
+
}
|
1248
|
+
}
|
1249
|
+
|
1250
|
+
return false;
|
1251
|
+
};
|
1252
|
+
/** @private
|
1253
|
+
* @return {boolean}
|
1254
|
+
*/
|
1255
|
+
|
1256
|
+
|
1257
|
+
ColumnSelectionPlugin.prototype._gotoNextGrid = function () {
|
1258
|
+
var lastIndex = this._hosts.length - 1;
|
1259
|
+
|
1260
|
+
if (this._activeGrid === this._hosts[lastIndex]) {
|
1261
|
+
// This the last grid, so go to the content
|
1262
|
+
return this._gotoContent();
|
1263
|
+
} else {
|
1264
|
+
var curIndex = this._hosts.indexOf(this._activeGrid);
|
1265
|
+
|
1266
|
+
if (curIndex >= 0) {
|
1267
|
+
this.selectSingleColumn(this._getNextSelection(-1, 1), this._hosts[curIndex + 1]); // go to the next grid at the first column
|
1268
|
+
|
1269
|
+
return true;
|
1270
|
+
}
|
1271
|
+
}
|
1272
|
+
|
1273
|
+
return false;
|
1274
|
+
};
|
1275
|
+
/** @private
|
1276
|
+
* @return {boolean}
|
1277
|
+
*/
|
1278
|
+
|
1279
|
+
|
1280
|
+
ColumnSelectionPlugin.prototype._gotoContent = function () {
|
1281
|
+
if (this._activeGrid) {
|
1282
|
+
var rsp = this._getPlugin("RowSelectionPlugin");
|
1283
|
+
|
1284
|
+
if (rsp) {
|
1285
|
+
setTimeout(function (p, s, g) {
|
1286
|
+
p["selectSingleRow"](0, s, g);
|
1287
|
+
}.bind(null, rsp, this._activeGrid.getSectionSettings("content"), this._activeGrid), 10); // Since Row Selection plugin is also listening to key down, we have to avoid double executions
|
1288
|
+
|
1289
|
+
this.clearAllSelections();
|
1290
|
+
return true;
|
1291
|
+
}
|
1292
|
+
}
|
1293
|
+
|
1294
|
+
return false;
|
1295
|
+
};
|
1296
|
+
/** @private
|
1297
|
+
* @param {number} targetIndex
|
1298
|
+
*/
|
1299
|
+
|
1300
|
+
|
1301
|
+
ColumnSelectionPlugin.prototype._selectFromAnchorToTarget = function (targetIndex) {
|
1302
|
+
if (this._anchorCol < 0) {
|
1303
|
+
this.selectSingleColumn(targetIndex);
|
1304
|
+
return;
|
1305
|
+
}
|
1306
|
+
|
1307
|
+
var i;
|
1308
|
+
var grid = this._activeGrid;
|
1309
|
+
this.clearAllSelections();
|
1310
|
+
|
1311
|
+
if (targetIndex <= this._anchorCol) {
|
1312
|
+
for (i = targetIndex; i <= this._anchorCol; ++i) {
|
1313
|
+
this._setSelectedColumn(i, true, grid);
|
1314
|
+
}
|
1315
|
+
} else {
|
1316
|
+
for (i = this._anchorCol; i <= targetIndex; ++i) {
|
1317
|
+
this._setSelectedColumn(i, true, grid);
|
1318
|
+
}
|
1319
|
+
}
|
1320
|
+
|
1321
|
+
this._updateGroupSelection();
|
1322
|
+
};
|
1323
|
+
/** @private
|
1324
|
+
* @param {Event} e
|
1325
|
+
* @param {number=} colIndex
|
1326
|
+
*/
|
1327
|
+
|
1328
|
+
|
1329
|
+
ColumnSelectionPlugin.prototype._dispatchSelectionChanged = function (e, colIndex) {
|
1330
|
+
if (this._activeGrid) {
|
1331
|
+
var rsp = this._getPlugin("RowSelectionPlugin");
|
1332
|
+
|
1333
|
+
if (rsp) {
|
1334
|
+
rsp["clearSelectedRows"]();
|
1335
|
+
}
|
1336
|
+
|
1337
|
+
var cep = this._getPlugin("CellEditingPlugin");
|
1338
|
+
|
1339
|
+
if (cep) {
|
1340
|
+
cep["closeCellEditor"]();
|
1341
|
+
}
|
1342
|
+
|
1343
|
+
cep = this._getPlugin("InCellEditingPlugin");
|
1344
|
+
|
1345
|
+
if (cep) {
|
1346
|
+
cep["closeCellEditor"]();
|
1347
|
+
}
|
1348
|
+
}
|
1349
|
+
|
1350
|
+
this._dispatch("selectionChanged", {
|
1351
|
+
"selectedCols": this.getSelectedColumns(),
|
1352
|
+
"colIndex": colIndex,
|
1353
|
+
"grid": this._activeGrid,
|
1354
|
+
"event": e
|
1355
|
+
});
|
1356
|
+
};
|
1357
|
+
/** @public
|
1358
|
+
*/
|
1359
|
+
|
1360
|
+
|
1361
|
+
ColumnSelectionPlugin.prototype.dispatchSelectionChanged = function () {
|
1362
|
+
var selectedCols = this.getSelectedColumns();
|
1363
|
+
var colIndex = selectedCols.length ? selectedCols[0] : -1;
|
1364
|
+
|
1365
|
+
this._dispatch("selectionChanged", {
|
1366
|
+
"selectedCols": selectedCols,
|
1367
|
+
"colIndex": colIndex,
|
1368
|
+
"grid": this._activeGrid
|
1369
|
+
});
|
1370
|
+
};
|
1371
|
+
/** @public
|
1372
|
+
* @description Select a specified column by a simulated mouse click input. This is for testing purpose.
|
1373
|
+
* @ignore
|
1374
|
+
* @param {number} colIndex
|
1375
|
+
* @param {Object=} mouseEvt
|
1376
|
+
*/
|
1377
|
+
|
1378
|
+
|
1379
|
+
ColumnSelectionPlugin.prototype.selectByMouse = function (colIndex, mouseEvt) {
|
1380
|
+
if (!mouseEvt) {
|
1381
|
+
mouseEvt = {};
|
1382
|
+
}
|
1383
|
+
|
1384
|
+
mouseEvt.sectionType = "title";
|
1385
|
+
|
1386
|
+
var eventObj = this._mockMouseEvent(colIndex, 0, mouseEvt);
|
1387
|
+
|
1388
|
+
this._onClick(eventObj);
|
1389
|
+
};
|
1390
|
+
/** @public
|
1391
|
+
* @description Select a specified column by a keyboard input. This is for testing purpose.
|
1392
|
+
* @ignore
|
1393
|
+
* @param {number|string} keyCode Use key code number or "left" ,"right" or "tab" string
|
1394
|
+
* @param {Object=} keyboardEvt
|
1395
|
+
*/
|
1396
|
+
|
1397
|
+
|
1398
|
+
ColumnSelectionPlugin.prototype.selectByKey = function (keyCode, keyboardEvt) {
|
1399
|
+
var eventObj = this._mockKeyboardEvent(keyCode, keyboardEvt);
|
1400
|
+
|
1401
|
+
this._onKeyDown(eventObj);
|
1402
|
+
};
|
1403
|
+
|
1404
|
+
export default ColumnSelectionPlugin;
|
1405
|
+
export { ColumnSelectionPlugin, ColumnSelectionPlugin as ColumnSelection, ColumnSelectionPlugin as ColumnSelectionExtension };
|