@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,968 @@
|
|
1
|
+
import { Ext } from "../../tr-grid-util/es6/Ext.js";
|
2
|
+
import { preventDefault } from "../../tr-grid-util/es6/EventDispatcher.js";
|
3
|
+
import { GridPlugin } from "../../tr-grid-util/es6/GridPlugin.js";
|
4
|
+
import { ElfUtil } from "../../tr-grid-util/es6/ElfUtil.js";
|
5
|
+
import { cloneObject, deepEqual, injectCss, prettifyCss } from "../../tr-grid-util/es6/Util.js";
|
6
|
+
import { DragUI } from "../../tr-grid-util/es6/DragUI.js";
|
7
|
+
|
8
|
+
/** @typedef {Object} ColumnDraggingPlugin~Options
|
9
|
+
* @description The options can be specified by `columnDragging` property of the main grid's options
|
10
|
+
* @property {Function=} dragStart Function handler for dragStart event
|
11
|
+
* @property {Function=} drag Function handler for drag event
|
12
|
+
* @property {Function=} dragEnd Function handler for dragEnd event
|
13
|
+
* @property {Function=} preColumnMoved Function handler for preColumnMoved event
|
14
|
+
* @property {Function=} columnMoved Function handler for columnMoved event
|
15
|
+
* @property {Function=} dragInterval Function handler for dragInterval event
|
16
|
+
* @property {Function=} dragBoxRenderer Allow user to customize dragBox
|
17
|
+
*/
|
18
|
+
|
19
|
+
/** @event ColumnDraggingPlugin#drag
|
20
|
+
* @description Fired on each mousemove or touchmove
|
21
|
+
* @type {Object}
|
22
|
+
*/
|
23
|
+
/** @event ColumnDraggingPlugin#dragStart
|
24
|
+
* @description The event is fired at the beginning of the drag operation. You can cancel the operation by setting cancel property to true.
|
25
|
+
* @type {Object}
|
26
|
+
* @example
|
27
|
+
* // ...
|
28
|
+
* dragStart: function(e) {
|
29
|
+
* e.cancel = true; // To cancel the operation
|
30
|
+
* }, // ..
|
31
|
+
*/
|
32
|
+
/** @event ColumnDraggingPlugin#dragEnd
|
33
|
+
* @description The event will always be fired at the end of the drag operation. This is to allow clearing of any resource used. You can cancel the data moving operation by setting cancel property to true.
|
34
|
+
* @type {Object}
|
35
|
+
*/
|
36
|
+
|
37
|
+
/** @event ColumnDraggingPlugin#preColumnMoved
|
38
|
+
* @description Fired before the actual move
|
39
|
+
* @type {Object}
|
40
|
+
* @property {number} startColumnIndex
|
41
|
+
* @property {number} destColumnIndex
|
42
|
+
* @example
|
43
|
+
* // ...
|
44
|
+
* preColumnMoved: function(e) {
|
45
|
+
* e.cancel = true; // To cancel the operation
|
46
|
+
* }, // ..
|
47
|
+
*/
|
48
|
+
/** @event ColumnDraggingPlugin#columnMoved
|
49
|
+
* @description Fired if the column is successfully moved by drag and drop operation
|
50
|
+
* @type {Object}
|
51
|
+
* @property {number} startColumnIndex
|
52
|
+
* @property {number} destColumnIndex
|
53
|
+
*/
|
54
|
+
|
55
|
+
/** @event ColumnDraggingPlugin#dragInterval
|
56
|
+
* @description Fired at an interval during drag
|
57
|
+
* @type {Object}
|
58
|
+
*/
|
59
|
+
|
60
|
+
/** @constructor
|
61
|
+
* @param {ColumnDraggingPlugin~Options=} options
|
62
|
+
* @extends {GridPlugin}
|
63
|
+
*/
|
64
|
+
let ColumnDraggingPlugin = function (options) {
|
65
|
+
let t = this;
|
66
|
+
t._onMouseUp = t._onMouseUp.bind(t);
|
67
|
+
t._onMouseDown = t._onMouseDown.bind(t);
|
68
|
+
|
69
|
+
t._onDrag = t._onDrag.bind(t);
|
70
|
+
t._onDragStart = t._onDragStart.bind(t);
|
71
|
+
t._onDragEnd = t._onDragEnd.bind(t);
|
72
|
+
t._onDragPulse = t._onDragPulse.bind(t);
|
73
|
+
|
74
|
+
t._hosts = [];
|
75
|
+
|
76
|
+
t._guideline = document.createElement("div");
|
77
|
+
t._dragBox = document.createElement("div");
|
78
|
+
t._dragBox.classList.add("drag-box-disabled"); // defualt disable dragbox
|
79
|
+
t._dragBoxIcon = document.createElement("ef-icon");
|
80
|
+
t._dragBoxIcon.classList.add("drag-box-icon");
|
81
|
+
|
82
|
+
if(ElfUtil.getElfVersion() < 4) {
|
83
|
+
t._dragBox.classList.add("tr-dragbox");
|
84
|
+
t._guideline.classList.add("tr-guideline");
|
85
|
+
} else {
|
86
|
+
t._guideline.classList.add("guideline");
|
87
|
+
}
|
88
|
+
|
89
|
+
if(options) {
|
90
|
+
this.config({ "columnDragging": options });
|
91
|
+
}
|
92
|
+
};
|
93
|
+
Ext.inherits(ColumnDraggingPlugin, GridPlugin);
|
94
|
+
|
95
|
+
/** @private
|
96
|
+
* @type {Core}
|
97
|
+
*/
|
98
|
+
ColumnDraggingPlugin.prototype._clickedGrid = null;
|
99
|
+
/** @private
|
100
|
+
* @type {ILayoutGrid}
|
101
|
+
*/
|
102
|
+
ColumnDraggingPlugin.prototype._clickedSection = null;
|
103
|
+
/** @private
|
104
|
+
* @type {number}
|
105
|
+
*/
|
106
|
+
ColumnDraggingPlugin.prototype._clickedRow = -1;
|
107
|
+
/** @private
|
108
|
+
* @type {Element}
|
109
|
+
*/
|
110
|
+
ColumnDraggingPlugin.prototype._guideline = null;
|
111
|
+
/** @private
|
112
|
+
* @type {Element}
|
113
|
+
*/
|
114
|
+
ColumnDraggingPlugin.prototype._dragBox = null;
|
115
|
+
/** @private
|
116
|
+
* @type {Element}
|
117
|
+
*/
|
118
|
+
ColumnDraggingPlugin.prototype._dragBoxIcon = null;
|
119
|
+
/** @type {Object}
|
120
|
+
* @private
|
121
|
+
*/
|
122
|
+
ColumnDraggingPlugin.prototype._dragBoxRenderer = null;
|
123
|
+
/** @private
|
124
|
+
* @type {number}
|
125
|
+
*/
|
126
|
+
ColumnDraggingPlugin.prototype._timerId = 0;
|
127
|
+
/** @private
|
128
|
+
* @type {number}
|
129
|
+
*/
|
130
|
+
ColumnDraggingPlugin.prototype._dragPulseId = 0;
|
131
|
+
/** @private
|
132
|
+
* @type {Object}
|
133
|
+
*/
|
134
|
+
ColumnDraggingPlugin.prototype._pos = null; // Cache of current mouse position
|
135
|
+
/** @private
|
136
|
+
* @type {Object}
|
137
|
+
*/
|
138
|
+
ColumnDraggingPlugin.prototype._startPos = null; // Cache of start column position
|
139
|
+
/** @private
|
140
|
+
* @type {number}
|
141
|
+
*/
|
142
|
+
ColumnDraggingPlugin.prototype._cacheLeft = 0;
|
143
|
+
/** @private
|
144
|
+
* @type {number}
|
145
|
+
*/
|
146
|
+
ColumnDraggingPlugin.prototype._cacheWidth = 0;
|
147
|
+
|
148
|
+
/** @private
|
149
|
+
* @type {number}
|
150
|
+
*/
|
151
|
+
ColumnDraggingPlugin.prototype._startColumn = -1;
|
152
|
+
/** @private
|
153
|
+
* @type {number}
|
154
|
+
*/
|
155
|
+
ColumnDraggingPlugin.prototype._endColumn = -1;
|
156
|
+
/** @private
|
157
|
+
* @type {number}
|
158
|
+
*/
|
159
|
+
ColumnDraggingPlugin.prototype._destColumn = -1;
|
160
|
+
/** @private
|
161
|
+
* @type {number}
|
162
|
+
*/
|
163
|
+
ColumnDraggingPlugin.prototype._leftMovableBorder = -1;
|
164
|
+
/** @private
|
165
|
+
* @type {number}
|
166
|
+
*/
|
167
|
+
ColumnDraggingPlugin.prototype._rightMovableBorder = -1;
|
168
|
+
/** @private
|
169
|
+
* @type {boolean}
|
170
|
+
*/
|
171
|
+
ColumnDraggingPlugin.prototype._isDragging = false;
|
172
|
+
/** @private
|
173
|
+
* @type {boolean}
|
174
|
+
*/
|
175
|
+
ColumnDraggingPlugin.prototype._lockFrozen = false;
|
176
|
+
/** @private
|
177
|
+
* @type {boolean}
|
178
|
+
*/
|
179
|
+
ColumnDraggingPlugin.prototype._disabled = false;
|
180
|
+
/** @private
|
181
|
+
* @type {boolean}
|
182
|
+
*/
|
183
|
+
ColumnDraggingPlugin.prototype._noColumnMoving = false;
|
184
|
+
/** @private
|
185
|
+
* @type {boolean}
|
186
|
+
*/
|
187
|
+
ColumnDraggingPlugin.prototype._noDragBox = false;
|
188
|
+
/** @type {string}
|
189
|
+
* @private
|
190
|
+
*/
|
191
|
+
ColumnDraggingPlugin._styles = ""; // Static variable
|
192
|
+
/** @private
|
193
|
+
* @type {Object}
|
194
|
+
*/
|
195
|
+
ColumnDraggingPlugin.prototype._dragUI = null;
|
196
|
+
|
197
|
+
/** @public
|
198
|
+
* @return {string}
|
199
|
+
*/
|
200
|
+
ColumnDraggingPlugin.prototype.getName = function () {
|
201
|
+
return "ColumnDraggingPlugin"; // Read Only
|
202
|
+
};
|
203
|
+
/** Plugin that has multi-table support means that it can have multiple hosts/tables and share its states across those hosts/tables.
|
204
|
+
* @public
|
205
|
+
* @return {boolean}
|
206
|
+
*/
|
207
|
+
ColumnDraggingPlugin.prototype.hasMultiTableSupport = function () {
|
208
|
+
return true;
|
209
|
+
};
|
210
|
+
|
211
|
+
/** @public
|
212
|
+
* @param {Object} host core grid instance
|
213
|
+
* @param {Object=} options
|
214
|
+
*/
|
215
|
+
ColumnDraggingPlugin.prototype.initialize = function (host, options) {
|
216
|
+
if (this._hosts.indexOf(host) >= 0) {
|
217
|
+
return;
|
218
|
+
}
|
219
|
+
|
220
|
+
this._hosts.push(host);
|
221
|
+
host.unloadPlugin("DragAndDropTitlePlugin");
|
222
|
+
|
223
|
+
host.listen("mousedown", this._onMouseDown);
|
224
|
+
host.listen("dragstart", preventDefault);
|
225
|
+
|
226
|
+
this.config(options);
|
227
|
+
|
228
|
+
this._dragUI = new DragUI({
|
229
|
+
dragBox: this._dragBox,
|
230
|
+
dragBoxIcon: this._dragBoxIcon
|
231
|
+
});
|
232
|
+
|
233
|
+
ElfUtil.getThemeColors().then(
|
234
|
+
ColumnDraggingPlugin._onThemeLoaded.bind(null, host)
|
235
|
+
).catch(
|
236
|
+
ColumnDraggingPlugin._onThemeLoaded.bind(null, host)
|
237
|
+
);
|
238
|
+
};
|
239
|
+
/** @public
|
240
|
+
* @param {Object=} host core grid instance
|
241
|
+
*/
|
242
|
+
ColumnDraggingPlugin.prototype.unload = function (host) {
|
243
|
+
let at = this._hosts.indexOf(host);
|
244
|
+
if (at < 0) {
|
245
|
+
return;
|
246
|
+
}
|
247
|
+
|
248
|
+
this._hosts.splice(at, 1);
|
249
|
+
host.unlisten("mousedown", this._onMouseDown);
|
250
|
+
|
251
|
+
if(!this._hosts.length) {
|
252
|
+
if(this._dragPulseId) {
|
253
|
+
window.clearInterval(this._dragPulseId);
|
254
|
+
this._dragPulseId = 0;
|
255
|
+
}
|
256
|
+
}
|
257
|
+
|
258
|
+
this._dispose();
|
259
|
+
};
|
260
|
+
|
261
|
+
/** @private
|
262
|
+
* @function
|
263
|
+
* @param {Object} grid Core grid instance
|
264
|
+
*/
|
265
|
+
ColumnDraggingPlugin._onThemeLoaded = function(grid) {
|
266
|
+
if(!ColumnDraggingPlugin._styles) {
|
267
|
+
let styles = [
|
268
|
+
".multi-column-drag-indicator .section.title .cover-layer .column-bound.selection-bound ", [
|
269
|
+
"border-top: var(--grid-drag-indicator);",
|
270
|
+
"border-right: var(--grid-drag-indicator);",
|
271
|
+
"border-left: var(--grid-drag-indicator);"
|
272
|
+
],
|
273
|
+
".multi-column-drag-indicator .sections .cover-layer .column-bound.selection-bound ", [
|
274
|
+
"border-right: var(--grid-drag-indicator);",
|
275
|
+
"border-left: var(--grid-drag-indicator);",
|
276
|
+
"border-bottom: var(--grid-drag-indicator);"
|
277
|
+
]
|
278
|
+
];
|
279
|
+
ColumnDraggingPlugin._styles = prettifyCss(styles);
|
280
|
+
}
|
281
|
+
|
282
|
+
DragUI.initStyles();
|
283
|
+
ColumnDraggingPlugin._applyThemeColor(grid);
|
284
|
+
DragUI.applyThemeColor(grid);
|
285
|
+
};
|
286
|
+
|
287
|
+
/** @private
|
288
|
+
* @param {Object} grid Core grid instance
|
289
|
+
*/
|
290
|
+
ColumnDraggingPlugin._applyThemeColor = function(grid) {
|
291
|
+
if(!grid || grid._columnDraggingStyles) {
|
292
|
+
return;
|
293
|
+
}
|
294
|
+
if(ColumnDraggingPlugin._styles) {
|
295
|
+
grid._columnDraggingStyles = true; // Prevent loading the same style twice
|
296
|
+
injectCss(ColumnDraggingPlugin._styles, grid.getParent());
|
297
|
+
}
|
298
|
+
};
|
299
|
+
|
300
|
+
/** @public
|
301
|
+
* @param {Object=} options Grid configuration object
|
302
|
+
*/
|
303
|
+
ColumnDraggingPlugin.prototype.config = function (options) {
|
304
|
+
if (!options) { return; }
|
305
|
+
|
306
|
+
let noColumnDragging = options["noColumnDragging"];
|
307
|
+
if (noColumnDragging == null && options["columnReorder"] != null) {
|
308
|
+
noColumnDragging = !options["columnReorder"];
|
309
|
+
}
|
310
|
+
if (noColumnDragging != null) {
|
311
|
+
this._disabled = noColumnDragging ? true : false;
|
312
|
+
}
|
313
|
+
|
314
|
+
let extOptions = options.columnDragging;
|
315
|
+
if (!extOptions) { return; }
|
316
|
+
|
317
|
+
if (typeof extOptions["dragBoxRenderer"] === "function") {
|
318
|
+
this._dragBoxRenderer = extOptions["dragBoxRenderer"];
|
319
|
+
this._dragBox.classList.add("drag-box");
|
320
|
+
this._dragBox.classList.remove("drag-box-disabled");
|
321
|
+
}
|
322
|
+
this.addListener(extOptions, "dragStart");
|
323
|
+
this.addListener(extOptions, "drag");
|
324
|
+
this.addListener(extOptions, "dragEnd");
|
325
|
+
this.addListener(extOptions, "preColumnMoved");
|
326
|
+
this.addListener(extOptions, "columnMoved");
|
327
|
+
this.addListener(extOptions, "dragInterval");
|
328
|
+
};
|
329
|
+
|
330
|
+
/** @public
|
331
|
+
* @param {Object=} gridOptions
|
332
|
+
* @return {!Object}
|
333
|
+
*/
|
334
|
+
ColumnDraggingPlugin.prototype.getConfigObject = function (gridOptions) {
|
335
|
+
let obj = gridOptions || {};
|
336
|
+
|
337
|
+
if(this._disabled) {
|
338
|
+
obj.noColumnDragging = true;
|
339
|
+
}
|
340
|
+
|
341
|
+
let extOptions = obj.columnDragging;
|
342
|
+
if(!extOptions) {
|
343
|
+
extOptions = obj.columnDragging = {}; // TO_DO: This is unnecessary
|
344
|
+
}
|
345
|
+
|
346
|
+
return obj;
|
347
|
+
};
|
348
|
+
|
349
|
+
/**
|
350
|
+
* Lock moving of frozen column. If true is spsecified, dragging is disabled for frozen column.
|
351
|
+
* @public
|
352
|
+
* @param {boolean} lock
|
353
|
+
*/
|
354
|
+
ColumnDraggingPlugin.prototype.lockFrozenColumn = function(lock) {
|
355
|
+
this._lockFrozen = lock;
|
356
|
+
};
|
357
|
+
|
358
|
+
/** Disable this plugin entirely
|
359
|
+
* @public
|
360
|
+
* @param {boolean=} disabled
|
361
|
+
*/
|
362
|
+
ColumnDraggingPlugin.prototype.disable = function(disabled) {
|
363
|
+
this._disabled = disabled !== false;
|
364
|
+
};
|
365
|
+
/** @public
|
366
|
+
* @return {boolean}
|
367
|
+
*/
|
368
|
+
ColumnDraggingPlugin.prototype.isDisabled = function() {
|
369
|
+
return this._disabled;
|
370
|
+
};
|
371
|
+
/** Disable column moving. Only cursor is showing and events are fired. No real column moving.
|
372
|
+
* @public
|
373
|
+
* @param {boolean=} disabled
|
374
|
+
*/
|
375
|
+
ColumnDraggingPlugin.prototype.disableMoving = function(disabled) {
|
376
|
+
this._noColumnMoving = disabled !== false;
|
377
|
+
};
|
378
|
+
/** Disable column moving. Only cursor is showing and events are fired. No real column moving.
|
379
|
+
* @public
|
380
|
+
* @param {boolean=} disabled
|
381
|
+
*/
|
382
|
+
ColumnDraggingPlugin.prototype.disableDragBox = function(disabled) {
|
383
|
+
this._noDragBox = disabled !== false;
|
384
|
+
};
|
385
|
+
|
386
|
+
/** @private
|
387
|
+
* @param {number} colIndex
|
388
|
+
* @return {boolean}
|
389
|
+
*/
|
390
|
+
ColumnDraggingPlugin.prototype._isAllowed = function(colIndex) {
|
391
|
+
let host = this._clickedGrid || this._hosts[0];
|
392
|
+
if (host) {
|
393
|
+
let stationaryIndex = host.getStationaryColumnIndex();
|
394
|
+
if (stationaryIndex < 0) {
|
395
|
+
return true;
|
396
|
+
}
|
397
|
+
if (colIndex <= stationaryIndex) {
|
398
|
+
return false;
|
399
|
+
}
|
400
|
+
}
|
401
|
+
return true;
|
402
|
+
};
|
403
|
+
/** @public
|
404
|
+
* @description Emitate the mousedown event. This is for testing purpose.
|
405
|
+
* @ignore
|
406
|
+
* @param {number} colIndex
|
407
|
+
* @param {number} rowIndex
|
408
|
+
* @param {number} x
|
409
|
+
* @param {number} y
|
410
|
+
*/
|
411
|
+
ColumnDraggingPlugin.prototype.mockMousedown = function(colIndex, rowIndex, x, y) {
|
412
|
+
let evt = {
|
413
|
+
clientX: x,
|
414
|
+
clientY: y,
|
415
|
+
sectionType: "title"
|
416
|
+
};
|
417
|
+
evt = this._mockMouseEvent(colIndex, rowIndex, evt);
|
418
|
+
this._onMouseDown(evt);
|
419
|
+
};
|
420
|
+
/** @public
|
421
|
+
* @description Emitate the mousemove event. This is for testing purpose.
|
422
|
+
* @ignore
|
423
|
+
* @param {number} colIndex
|
424
|
+
* @param {number} rowIndex
|
425
|
+
* @param {number} x
|
426
|
+
* @param {number} y
|
427
|
+
*/
|
428
|
+
ColumnDraggingPlugin.prototype.mockMousemove = function(colIndex, rowIndex, x, y) {
|
429
|
+
let evt = {
|
430
|
+
clientX: x,
|
431
|
+
clientY: y,
|
432
|
+
sectionType: "title"
|
433
|
+
};
|
434
|
+
evt = this._mockMouseEvent(colIndex, rowIndex, evt);
|
435
|
+
evt.path = [evt.target];
|
436
|
+
this._onDrag(evt);
|
437
|
+
};
|
438
|
+
/** @public
|
439
|
+
* @description Emitate the mouseup event. This is for testing purpose.
|
440
|
+
* @ignore
|
441
|
+
* @param {number} colIndex
|
442
|
+
* @param {number} rowIndex
|
443
|
+
* @param {number} x
|
444
|
+
* @param {number} y
|
445
|
+
*/
|
446
|
+
ColumnDraggingPlugin.prototype.mockMouseup = function(colIndex, rowIndex, x, y) {
|
447
|
+
let evt = {
|
448
|
+
clientX: x,
|
449
|
+
clientY: y,
|
450
|
+
sectionType: "title"
|
451
|
+
};
|
452
|
+
evt = this._mockMouseEvent(colIndex, rowIndex, evt);
|
453
|
+
evt.path = [evt.target];
|
454
|
+
this._onMouseUp(evt);
|
455
|
+
this._onDragEnd(evt);
|
456
|
+
};
|
457
|
+
|
458
|
+
/** @private
|
459
|
+
* @param {Event} e
|
460
|
+
*/
|
461
|
+
ColumnDraggingPlugin.prototype._onMouseDown = function (e) {
|
462
|
+
if(this._disabled) {
|
463
|
+
return;
|
464
|
+
}
|
465
|
+
if(e.shiftKey || e.ctrlKey || e.altKey) {
|
466
|
+
return; // Ignore mousedown event, if modifier key is detected
|
467
|
+
}
|
468
|
+
if(e.button) {
|
469
|
+
return; // We don't allow drag with middle click (button == 1), or right click (button == 2)
|
470
|
+
}
|
471
|
+
if(this._timerId) {
|
472
|
+
return; // Drag timer is already start
|
473
|
+
}
|
474
|
+
|
475
|
+
let host = this.getRelativeGrid(e);
|
476
|
+
if(!host) {
|
477
|
+
return; // Given event should be within grid element
|
478
|
+
}
|
479
|
+
|
480
|
+
this._pos = host.getRelativePosition(e);
|
481
|
+
if (this._pos["hit"] === false) {
|
482
|
+
return; // Only start dragging when mouse is down on the grid
|
483
|
+
}
|
484
|
+
|
485
|
+
let section = this._pos["section"];
|
486
|
+
if(!section) {
|
487
|
+
return; // The section that is not in the target section list cannot be dragged
|
488
|
+
} else if(this._pos["sectionType"] !== "title") {
|
489
|
+
return; // Sections other than title section cannot be dragged by default
|
490
|
+
}
|
491
|
+
|
492
|
+
let colIndex = this._pos["colIndex"];
|
493
|
+
if(!this._isAllowed(colIndex)) {
|
494
|
+
return; // The column cannot be dragged
|
495
|
+
}
|
496
|
+
if(this._lockFrozen && host.isPinnedColumn(colIndex)) {
|
497
|
+
return; // If the lock frag is on, frozen columns cannot be dragged
|
498
|
+
}
|
499
|
+
|
500
|
+
let rowIndex = this._pos["rowIndex"]; // rowIndex may not exist
|
501
|
+
let movableBorder = this._findMoveableBorder(colIndex, rowIndex - 1, section);
|
502
|
+
let movingColumns = this._getSpan(colIndex, rowIndex, section);
|
503
|
+
|
504
|
+
this._clickedGrid = host;
|
505
|
+
this._clickedSection = section;
|
506
|
+
this._clickedRow = rowIndex;
|
507
|
+
|
508
|
+
this._startPos = this._pos;
|
509
|
+
this._startColumn = movingColumns["left"];
|
510
|
+
this._endColumn = movingColumns["right"];
|
511
|
+
this._leftMovableBorder = movableBorder["left"];
|
512
|
+
this._rightMovableBorder = movableBorder["right"];
|
513
|
+
this._destColumn = this._startColumn;
|
514
|
+
this._timerId = setTimeout(this._onDragStart, 300);
|
515
|
+
window.addEventListener("mouseup", this._onMouseUp, false);
|
516
|
+
};
|
517
|
+
/** @private
|
518
|
+
* @param {Object} e
|
519
|
+
*/
|
520
|
+
ColumnDraggingPlugin.prototype._onMouseUp = function (e) {
|
521
|
+
if(this._timerId) {
|
522
|
+
window.clearTimeout(this._timerId);
|
523
|
+
window.removeEventListener("mouseup", this._onMouseUp, false);
|
524
|
+
this._timerId = 0;
|
525
|
+
this._clearCache();
|
526
|
+
}
|
527
|
+
};
|
528
|
+
|
529
|
+
/** @private
|
530
|
+
* @return {number} 0 does not allow dragging, 1 allows single dragging, and 2 allows multiple dragging with row selection =.
|
531
|
+
*/
|
532
|
+
ColumnDraggingPlugin.prototype._getDraggingStyle = function() {
|
533
|
+
let colSelExt = this._getPlugin("ColumnSelectionPlugin");
|
534
|
+
if(!colSelExt) {
|
535
|
+
return 1;
|
536
|
+
}
|
537
|
+
let cgp = this._getPlugin("ColumnGroupingPlugin");
|
538
|
+
let selectedCols = colSelExt.getSelectedColumns();
|
539
|
+
let dragOutSel = selectedCols.indexOf(this._startColumn) === -1;
|
540
|
+
if(dragOutSel) { // drag outside selected col, drag only 1 row
|
541
|
+
return 1;
|
542
|
+
}
|
543
|
+
let selectedColCount = selectedCols.length;
|
544
|
+
if(selectedColCount > 1) { // Multiple column drag
|
545
|
+
if(!cgp) {
|
546
|
+
return 2;
|
547
|
+
}
|
548
|
+
let currentGroup, prevGroup;
|
549
|
+
for (let i = 0; i < selectedColCount; i++) {
|
550
|
+
let colIndex = selectedCols[i];
|
551
|
+
currentGroup = cgp.getGroupIds(colIndex) || []; // empty array is root group
|
552
|
+
if(prevGroup && !deepEqual(currentGroup, prevGroup)) {
|
553
|
+
if(cgp.getMutualGroupId(selectedCols)) { // Dragging a group inside another group is permitted only when the group being dragged is the same parent group
|
554
|
+
return 2;
|
555
|
+
}
|
556
|
+
return 0; // Drag with difference group is not allowed
|
557
|
+
} // else {} // Drag with same group is allowed
|
558
|
+
prevGroup = currentGroup;
|
559
|
+
}
|
560
|
+
}
|
561
|
+
return 2;
|
562
|
+
};
|
563
|
+
|
564
|
+
/** @private
|
565
|
+
* @param {*} e
|
566
|
+
*/
|
567
|
+
ColumnDraggingPlugin.prototype._onDragStart = function (e) {
|
568
|
+
if(this._disabled || this._isDragging) { return; }
|
569
|
+
if (this.hasListener("dragStart")) {
|
570
|
+
this._dispatch("dragStart", this._pos);
|
571
|
+
}
|
572
|
+
|
573
|
+
if (this._pos["cancel"]) { // user cancel drag start
|
574
|
+
return;
|
575
|
+
}
|
576
|
+
|
577
|
+
let dragStyles = this._getDraggingStyle();
|
578
|
+
if (!dragStyles) { // not allow to drag
|
579
|
+
return;
|
580
|
+
}
|
581
|
+
|
582
|
+
this._timerId = 0;
|
583
|
+
window.removeEventListener("mouseup", this._onMouseUp, false);
|
584
|
+
|
585
|
+
if(!this._clickedGrid) {
|
586
|
+
return;
|
587
|
+
}
|
588
|
+
|
589
|
+
this._isDragging = true;
|
590
|
+
document.body.classList.add("tr-dragging"); // Prevent text selection
|
591
|
+
// document.body.classList.add("tr-move-cursor");
|
592
|
+
|
593
|
+
window.addEventListener("mousemove", this._onDrag, false); // TODO: support touch operation
|
594
|
+
window.addEventListener("mouseup", this._onDragEnd, true);
|
595
|
+
|
596
|
+
let host = this._clickedGrid;
|
597
|
+
let height = host.getHeight();
|
598
|
+
let sectionBound = this._clickedSection.getBoundingClientRect();
|
599
|
+
let clickedCellBound = this._clickedSection.getCell(this._startColumn, this._clickedRow).getBoundingClientRect();
|
600
|
+
|
601
|
+
let gridElem = host.getElement();
|
602
|
+
this._guideline.style.top = (clickedCellBound.top - sectionBound.top) + "px";
|
603
|
+
this._guideline.style.height = (height - 1) + "px";
|
604
|
+
|
605
|
+
// TODO: guideline and drag box should be outside of grid area
|
606
|
+
gridElem.parentNode.classList.add("mouse-dragging"); // change cursor
|
607
|
+
|
608
|
+
|
609
|
+
// TODO: guideline and drag box should be outside of grid area
|
610
|
+
gridElem.appendChild(this._guideline);
|
611
|
+
|
612
|
+
if (this._dragBoxRenderer) { // For custom drag box rendering
|
613
|
+
let arg = cloneObject(e); // TODO: Check if cloning is necessary
|
614
|
+
let id = this.getColumnId(this._startColumn);
|
615
|
+
let index = this.getColumnIndex(id);
|
616
|
+
let field = this._getField(this._startColumn);
|
617
|
+
|
618
|
+
arg.dragBox = this._dragBox;
|
619
|
+
arg.columnData = {
|
620
|
+
index: index,
|
621
|
+
field: field,
|
622
|
+
id: id
|
623
|
+
};
|
624
|
+
this._dragBoxRenderer(arg);
|
625
|
+
}
|
626
|
+
if(dragStyles > 1 ) {
|
627
|
+
gridElem.parentNode.classList.add("multi-column-drag-indicator");
|
628
|
+
} else if(dragStyles === 1) {
|
629
|
+
this._dimCol(true); // Single drag
|
630
|
+
} // else {} // no need to handled drag 0 column
|
631
|
+
this._renderGuideline();
|
632
|
+
|
633
|
+
// For step scrolling // TODO: Merge this logic with DraggableContentPlugin
|
634
|
+
this._scrollStep = Math.floor(host.getScrollWidth() / 25); // Update the scrollbar first
|
635
|
+
if(this._scrollStep < 40) {
|
636
|
+
this._scrollStep = 40;
|
637
|
+
} else if(this._scrollStep > 400) {
|
638
|
+
this._scrollStep = 400;
|
639
|
+
}
|
640
|
+
let scrollbar = host.getHScrollbar();
|
641
|
+
this._cacheLeft = scrollbar.getLeft() + 20;
|
642
|
+
this._cacheWidth = scrollbar.getLeft() + scrollbar.getWidth() - 20;
|
643
|
+
|
644
|
+
this._dragPulseId = window.setInterval(this._onDragPulse, 150); // Start pulse
|
645
|
+
};
|
646
|
+
/** @private
|
647
|
+
* @param {Event} e
|
648
|
+
*/
|
649
|
+
ColumnDraggingPlugin.prototype._onDrag = function (e) {
|
650
|
+
if(!this._isDragging) { return; }
|
651
|
+
|
652
|
+
preventDefault(e);
|
653
|
+
this._pos = this._clickedGrid.getRelativePosition(e); // Relative to the clicked grid
|
654
|
+
|
655
|
+
var host = this.getRelativeGrid(e);
|
656
|
+
if (!host || host !== this._clickedGrid) { return; }
|
657
|
+
|
658
|
+
let colIndex = this._pos["colIndex"];
|
659
|
+
if ((colIndex >= this._leftMovableBorder) &&
|
660
|
+
(colIndex <= this._rightMovableBorder) &&
|
661
|
+
this._isAllowed(colIndex) &&
|
662
|
+
!(this._lockFrozen && host.isPinnedColumn(colIndex))) {
|
663
|
+
e.dragBox = this._dragBox;
|
664
|
+
this._renderGuideline();
|
665
|
+
this._dispatch("drag", /** @type{!Object} */(e));
|
666
|
+
if(!this._noDragBox) {
|
667
|
+
this._dragUI.renderDragBox(e, this._clickedGrid);
|
668
|
+
}
|
669
|
+
}
|
670
|
+
};
|
671
|
+
/** @private
|
672
|
+
* @param {Event} e
|
673
|
+
*/
|
674
|
+
ColumnDraggingPlugin.prototype._onDragEnd = function (e) {
|
675
|
+
if(!this._isDragging) {
|
676
|
+
return;
|
677
|
+
}
|
678
|
+
|
679
|
+
this._isDragging = false;
|
680
|
+
document.body.classList.remove("tr-dragging");
|
681
|
+
// document.body.classList.remove("tr-move-cursor");
|
682
|
+
this._dimCol(false);
|
683
|
+
|
684
|
+
let pn = this._guideline.parentNode;
|
685
|
+
if(pn) {
|
686
|
+
pn.removeChild(this._guideline);
|
687
|
+
}
|
688
|
+
|
689
|
+
pn = this._dragBox.parentNode;
|
690
|
+
if(pn) {
|
691
|
+
pn.removeChild(this._dragBox);
|
692
|
+
}
|
693
|
+
this._clickedGrid.getElement().parentNode.classList.remove("mouse-dragging"); // retain mouse cursor
|
694
|
+
this._clickedGrid.getElement().parentNode.classList.remove("multi-column-drag-indicator");
|
695
|
+
|
696
|
+
window.removeEventListener("mousemove", this._onDrag, false);
|
697
|
+
window.removeEventListener("mouseup", this._onDragEnd, true);
|
698
|
+
|
699
|
+
if(this._dragPulseId) {
|
700
|
+
window.clearInterval(this._dragPulseId);
|
701
|
+
this._dragPulseId = 0;
|
702
|
+
}
|
703
|
+
let destPos = this._pos;
|
704
|
+
this._pos = null;
|
705
|
+
|
706
|
+
preventDefault(e);
|
707
|
+
let operationCancelled = false;
|
708
|
+
if(destPos["cancel"]) {
|
709
|
+
operationCancelled = true;
|
710
|
+
}
|
711
|
+
|
712
|
+
if(!this._noDragBox && this._dragBoxIcon.icon === "void") {
|
713
|
+
operationCancelled = true;
|
714
|
+
}
|
715
|
+
//When move to the right, the first position is the current one.
|
716
|
+
if (this._destColumn > this._startColumn) {
|
717
|
+
--this._destColumn;
|
718
|
+
}
|
719
|
+
//Cancel moving if the destination column is the current column or not allowed column
|
720
|
+
if ((!this._destColumn && this._destColumn !== 0) || // undefined, NaN, null
|
721
|
+
this._destColumn < 0 ||
|
722
|
+
!this._isAllowed(this._destColumn) ||
|
723
|
+
(this._destColumn >= this._startColumn && this._destColumn <= this._endColumn)) {
|
724
|
+
operationCancelled = true;
|
725
|
+
}
|
726
|
+
|
727
|
+
let arg = null;
|
728
|
+
|
729
|
+
if(!operationCancelled) {
|
730
|
+
arg = {
|
731
|
+
"startColumnIndex": this._startColumn,
|
732
|
+
"destColumnIndex": this._destColumn
|
733
|
+
};
|
734
|
+
this._dispatch("preColumnMoved", arg);
|
735
|
+
if(arg["cancel"]) {
|
736
|
+
operationCancelled = true;
|
737
|
+
}
|
738
|
+
}
|
739
|
+
|
740
|
+
if (!operationCancelled) {
|
741
|
+
if (!this._noColumnMoving) {
|
742
|
+
let colSelExt = this._getPlugin("ColumnSelectionPlugin");
|
743
|
+
let selectedCols;
|
744
|
+
if(colSelExt) {
|
745
|
+
selectedCols = colSelExt.getSelectedColumns();
|
746
|
+
}
|
747
|
+
if(!colSelExt || !selectedCols.length || selectedCols.indexOf(this._startColumn) === -1) {
|
748
|
+
// No selected column or move column outside selected column, tried to move only _startColumn
|
749
|
+
selectedCols = [this._startColumn];
|
750
|
+
}
|
751
|
+
let destIndex = this._destColumn;
|
752
|
+
// Move operation always move to the left of destination column
|
753
|
+
// When moving forward, destnation need to added by 1 to move correctly
|
754
|
+
if (this._startColumn < this._destColumn) {
|
755
|
+
destIndex = this._destColumn + 1;
|
756
|
+
}
|
757
|
+
|
758
|
+
this._moveColumns(selectedCols, destIndex);
|
759
|
+
|
760
|
+
}
|
761
|
+
|
762
|
+
if (this.hasListener("columnMoved")) {
|
763
|
+
this._dispatch("columnMoved", {
|
764
|
+
"startColumnIndex": this._startColumn,
|
765
|
+
"endColumnIndex": this._endColumn,
|
766
|
+
"destColumnIndex": this._destColumn,
|
767
|
+
"clickedRow": this._clickedRow
|
768
|
+
});
|
769
|
+
}
|
770
|
+
}
|
771
|
+
|
772
|
+
this._dispatch("dragEnd", destPos || {}); // Always fire drag end for client to clean up its resource
|
773
|
+
this._clearCache();
|
774
|
+
};
|
775
|
+
|
776
|
+
/** @private
|
777
|
+
* @param {Array<number>} srcColIndices
|
778
|
+
* @param {number} destColumnIndex
|
779
|
+
*/
|
780
|
+
ColumnDraggingPlugin.prototype._moveColumns = function (srcColIndices, destColumnIndex) {
|
781
|
+
let srcCount = srcColIndices.length;
|
782
|
+
let colList = [];
|
783
|
+
let csp = this._getPlugin("ColumnStackPlugin");
|
784
|
+
let stackId, groupId;
|
785
|
+
let i;
|
786
|
+
if(srcCount === 1) {
|
787
|
+
if(csp) {
|
788
|
+
stackId = csp.getStackId(this._startColumn);
|
789
|
+
}
|
790
|
+
let cgp = this._getPlugin("ColumnGroupingPlugin");
|
791
|
+
if(cgp){
|
792
|
+
let cellInfo = cgp.getCellInfo(this._startPos);
|
793
|
+
groupId = cellInfo["groupId"] || cellInfo["columnId"];
|
794
|
+
}
|
795
|
+
|
796
|
+
if(stackId && this._startColumn === this._endColumn){
|
797
|
+
csp.moveStack(stackId, destColumnIndex);
|
798
|
+
} else if(groupId) {
|
799
|
+
cgp.moveGroup(groupId, destColumnIndex);
|
800
|
+
} else {
|
801
|
+
for(i = this._startColumn; i <= this._endColumn; i++){
|
802
|
+
colList.push(i);
|
803
|
+
}
|
804
|
+
}
|
805
|
+
} else {
|
806
|
+
let stacking = {}; // Object to optimize call column stack api repeatly
|
807
|
+
for (i = 0; i < srcCount; i++) {
|
808
|
+
let srcIdx = srcColIndices[i];
|
809
|
+
|
810
|
+
if(csp) {
|
811
|
+
stackId = csp.getStackId(srcIdx);
|
812
|
+
}
|
813
|
+
if(stackId && !stacking[stackId]) {
|
814
|
+
stacking[stackId] = true; // optimize column same stack
|
815
|
+
let stackMemberIds = csp.getStackMemberIds(stackId);
|
816
|
+
for (let j = 0; j < stackMemberIds.length; j++) {
|
817
|
+
let colId = stackMemberIds[j];
|
818
|
+
colList.push(colId);
|
819
|
+
}
|
820
|
+
} else {
|
821
|
+
let srcId = this.getColumnId(srcIdx);
|
822
|
+
colList.push(srcId); // Normal case
|
823
|
+
}
|
824
|
+
}
|
825
|
+
}
|
826
|
+
for(i = this._hosts.length; --i >= 0;) {
|
827
|
+
let host = this._hosts[i];
|
828
|
+
host.reorderColumns(colList, destColumnIndex);
|
829
|
+
}
|
830
|
+
};
|
831
|
+
|
832
|
+
/** @private
|
833
|
+
*/
|
834
|
+
ColumnDraggingPlugin.prototype._onDragPulse = function() {
|
835
|
+
if(!this._isDragging || !this._pos) { return; }
|
836
|
+
|
837
|
+
this._dispatch("dragInterval", this._pos);
|
838
|
+
|
839
|
+
let host = this._clickedGrid;
|
840
|
+
if(!host || !host.getHScrollbar().isActive()) { return; }
|
841
|
+
|
842
|
+
let x = this._pos["x"];
|
843
|
+
let scrollVal = 0;
|
844
|
+
if(x < this._cacheLeft) {
|
845
|
+
scrollVal = -Math.floor(this._scrollStep * (0.8 + Math.random()));
|
846
|
+
|
847
|
+
} else if(x > this._cacheWidth) {
|
848
|
+
scrollVal = Math.floor(this._scrollStep * (0.8 + Math.random()));
|
849
|
+
}
|
850
|
+
|
851
|
+
let len = this._hosts ? this._hosts.length : 0;
|
852
|
+
for(let i = 0; i < len; ++i) {
|
853
|
+
this._hosts[i].scrollRight(scrollVal);
|
854
|
+
}
|
855
|
+
};
|
856
|
+
/** @private
|
857
|
+
*/
|
858
|
+
ColumnDraggingPlugin.prototype._clearCache = function() {
|
859
|
+
this._startColumn = this._endColumn = this._destColumn = -1;
|
860
|
+
this._startPos = null;
|
861
|
+
|
862
|
+
this._leftMovableBorder = this._rightMovableBorder = -1;
|
863
|
+
|
864
|
+
this._clickedRow = -1;
|
865
|
+
this._clickedSection = this._clickedGrid = null;
|
866
|
+
this._dragBoxIcon.icon = null;
|
867
|
+
};
|
868
|
+
|
869
|
+
/** @private
|
870
|
+
* @param {number} colIndex
|
871
|
+
* @param {number} row
|
872
|
+
* @param {ILayoutGrid} section
|
873
|
+
* @return {!Object}
|
874
|
+
*/
|
875
|
+
ColumnDraggingPlugin.prototype._getSpan = function(colIndex, row, section) {
|
876
|
+
let cellSpan = section.getCellColSpan(colIndex, row);
|
877
|
+
|
878
|
+
if (cellSpan <= 0) { // The specified cell is being occupied
|
879
|
+
colIndex += cellSpan; // Convert the given negative index to the spanning cell
|
880
|
+
cellSpan = section.getCellColSpan(colIndex, row);
|
881
|
+
}
|
882
|
+
|
883
|
+
return { "left": colIndex, "right": (colIndex + cellSpan - 1) };
|
884
|
+
};
|
885
|
+
/** @private
|
886
|
+
* @param {number} col
|
887
|
+
* @param {number} row
|
888
|
+
* @param {ILayoutGrid} section
|
889
|
+
* @return {!Object}
|
890
|
+
*/
|
891
|
+
ColumnDraggingPlugin.prototype._findMoveableBorder = function(col, row, section) {
|
892
|
+
if (row < 0 || (!row && row !== 0)) { // Guaranteed to get out of infinite loop by checking undefined, NaN, null
|
893
|
+
return { "left": 0, "right": (section.getColumnCount() - 1) };
|
894
|
+
}
|
895
|
+
let span = this._getSpan(col, row, section);
|
896
|
+
if (span["right"] >= span["left"]) {
|
897
|
+
return span;
|
898
|
+
} else {
|
899
|
+
return this._findMoveableBorder(col, row - 1, section);
|
900
|
+
}
|
901
|
+
};
|
902
|
+
/**
|
903
|
+
* @private
|
904
|
+
*/
|
905
|
+
ColumnDraggingPlugin.prototype._renderGuideline = function() {
|
906
|
+
let colIndex = this._pos["colIndex"];
|
907
|
+
if(colIndex == null || colIndex < 0) { // undefined, null or negative number
|
908
|
+
return;
|
909
|
+
}
|
910
|
+
|
911
|
+
let currentSpan = this._getSpan(colIndex, this._clickedRow, this._clickedSection);
|
912
|
+
let colStart = currentSpan["left"]; // This can be different from colIndex
|
913
|
+
let colEnd = currentSpan["right"];
|
914
|
+
let colLeft = this._clickedGrid.getColumnLeft(colStart);
|
915
|
+
let colWidth = 0;
|
916
|
+
for(let i = colStart; i <= colEnd; ++i) {
|
917
|
+
colWidth += this._clickedGrid.getColumnWidth(i);
|
918
|
+
}
|
919
|
+
|
920
|
+
let rightHand = this._pos["x"] > colLeft + colWidth / 2;
|
921
|
+
let destColumn = (rightHand) ? colEnd + 1 : colStart;
|
922
|
+
|
923
|
+
let csp = this._getPlugin("ColumnStackPlugin");
|
924
|
+
if(csp){
|
925
|
+
let stackId = csp.getStackId(destColumn);
|
926
|
+
if(stackId){
|
927
|
+
let members = csp.getStackMemberIndices(stackId);
|
928
|
+
let memberCount = members.length;
|
929
|
+
if(members && memberCount){
|
930
|
+
destColumn = rightHand ? members[memberCount - 1] + 1 : members[0];
|
931
|
+
}
|
932
|
+
}
|
933
|
+
}
|
934
|
+
|
935
|
+
colLeft = this._clickedGrid.getColumnLeft(this._destColumn);
|
936
|
+
// If destination exceeds the specified bounds
|
937
|
+
if (destColumn < this._leftMovableBorder) {
|
938
|
+
destColumn = this._leftMovableBorder;
|
939
|
+
} else if (destColumn > this._rightMovableBorder) {
|
940
|
+
destColumn = this._rightMovableBorder + 1;
|
941
|
+
if(rightHand) {
|
942
|
+
colLeft -= 4; // Shift guideline to the left if this is the rightmost column
|
943
|
+
}
|
944
|
+
}
|
945
|
+
|
946
|
+
this._destColumn = destColumn;
|
947
|
+
this._guideline.style.left = colLeft + "px";
|
948
|
+
};
|
949
|
+
|
950
|
+
/**
|
951
|
+
* @private
|
952
|
+
* @param {boolean} inOut
|
953
|
+
*/
|
954
|
+
ColumnDraggingPlugin.prototype._dimCol = function(inOut) {
|
955
|
+
let host = this._clickedGrid;
|
956
|
+
let titleCell = host.getSection("title").getColumn(this._startColumn).getCell(this._clickedRow);
|
957
|
+
let titleCellEl = titleCell.getElement();
|
958
|
+
if(inOut) {
|
959
|
+
titleCellEl.classList.add("drag-indicator");
|
960
|
+
} else {
|
961
|
+
titleCellEl.classList.remove("drag-indicator");
|
962
|
+
}
|
963
|
+
};
|
964
|
+
|
965
|
+
|
966
|
+
|
967
|
+
export default ColumnDraggingPlugin;
|
968
|
+
export { ColumnDraggingPlugin, ColumnDraggingPlugin as ColumnDragging, ColumnDraggingPlugin as ColumnDraggingExtension };
|