@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,1479 @@
|
|
1
|
+
import { Ext } from "../../tr-grid-util/es6/Ext.js";
|
2
|
+
import { ElfUtil } from "../../tr-grid-util/es6/ElfUtil.js";
|
3
|
+
import { GridPlugin } from "../../tr-grid-util/es6/GridPlugin.js";
|
4
|
+
import Dom from "../../tr-grid-util/es6/Dom.js";
|
5
|
+
import { DragUI } from "../../tr-grid-util/es6/DragUI.js";
|
6
|
+
import { cloneObject, injectCss, prettifyCss } from "../../tr-grid-util/es6/Util.js";
|
7
|
+
|
8
|
+
/** @typedef {Object} RowDraggingPlugin~Options
|
9
|
+
* @description Available options describing `rowDragging` object specified in grid's option
|
10
|
+
* @property {boolean=} dragBox=false If enabled, information box will be shown during the drag
|
11
|
+
* @property {boolean=} disabled=false A flag to turn off UIs, while events will still be dispatched. If enabled, guileline and drag box will be hidden. autoScroll will also be turned off.
|
12
|
+
* @property {boolean=} mouseInput=true If disabled, mousemove/mousedown will not trigger the drag operation.
|
13
|
+
* @property {boolean=} dataTransfer=true If disabled, internal row data will not be moved at the end of the drag operation.
|
14
|
+
* @property {boolean=} autoScroll=true If disabled, grid will not be verticallly scrolled when mouse is hovering around the edges of the grid.
|
15
|
+
* @property {Function=} dragBoxRenderer Allow user to customize dragBox
|
16
|
+
* @property {Function=} dragStart=null Function handler for dragStart event
|
17
|
+
* @property {Function=} drag=null Function handler for drag event
|
18
|
+
* @property {Function=} dragEnd=null Function handler for dragEnd event. This event is for clearing any resource hold during the drag operation
|
19
|
+
* @property {Function=} dataMoved=null Function handler for dataMoved event
|
20
|
+
* @property {Function=} beforeDataMoved=null Function handler for beforeDataMoved event
|
21
|
+
*/
|
22
|
+
|
23
|
+
/** @event RowDraggingPlugin#drag
|
24
|
+
* @description Fired on each mousemove or touchmove
|
25
|
+
* @type {Object}
|
26
|
+
*/
|
27
|
+
/** @event RowDraggingPlugin#dragStart
|
28
|
+
* @description The event is fired at the beginning of the drag operation. You can cancel the operation by setting cancel property to true.
|
29
|
+
* @type {Object}
|
30
|
+
* @example
|
31
|
+
* // ...
|
32
|
+
* dragStart: function(e) {
|
33
|
+
* e.cancel = true; // To cancel the operation
|
34
|
+
* }, // ..
|
35
|
+
*/
|
36
|
+
/** @event RowDraggingPlugin#dragEnd
|
37
|
+
* @description The event will always be fired at the end of the drag operation. This is to allow clearing of any resource used during the drag operation
|
38
|
+
* @type {Object}
|
39
|
+
* @property {number} rowIndex The current or final position of the first dragged row after the move. Negative row index is returned when there is no moved row
|
40
|
+
|
41
|
+
*/
|
42
|
+
/** @event RowDraggingPlugin#dragInterval
|
43
|
+
* @description Fired at an interval during drag
|
44
|
+
* @type {Object}
|
45
|
+
*/
|
46
|
+
/** @event RowDraggingPlugin#dataMoved
|
47
|
+
* @description Fired when rows or data are moved by the drag operation. This happens before dragEnd event
|
48
|
+
* @type {Object}
|
49
|
+
* @property {number} rowIndex The current or final position of the first dragged row after the move. Use srcRowIds to determine the row positions in case of dragging multiple rows.
|
50
|
+
* @property {Array.<number>} srcRowIndices Row indices of the selected rows. The values represent the indices before the move and cannot be used for referencing
|
51
|
+
* @property {Array.<string>} srcRowIds Row ids of the selected rows
|
52
|
+
* @property {Array.<string>} srcRowTypes Row types of the selected rows
|
53
|
+
* @property {string} consolidatedSrcRowType "MIXED" type is set if there are two or more row types in the srcRowTypes
|
54
|
+
* @property {number} destRowIndex Row index of the drop area. The value represents row index before the move and cannot be used for referencing
|
55
|
+
* @property {string} destRowId Row id of the drop area. This will be empty string for the end of grid
|
56
|
+
* @property {number} destRowType Row type of the drop area. This will be empty string for the end of grid
|
57
|
+
*/
|
58
|
+
/** @event RowDraggingPlugin#beforeDataMoved
|
59
|
+
* @description Fired after mouseup and before the data/row is about to be moved. You can check the current drag and drop states, cancel operation, or apply custom tasks in this event.
|
60
|
+
* @type {Object}
|
61
|
+
* @property {number} rowIndex Row index of the first row to be dragged
|
62
|
+
* @property {Array.<number>} srcRowIndices Row indices of the selected rows
|
63
|
+
* @property {Array.<string>} srcRowIds Row ids of the selected rows
|
64
|
+
* @property {Array.<string>} srcRowTypes Row types of the selected rows
|
65
|
+
* @property {string} consolidatedSrcRowType "MIXED" type is set if there are two or more row types in the srcRowTypes
|
66
|
+
* @property {number} destRowIndex Row index of the drop area
|
67
|
+
* @property {string} destRowId Row id of the drop area. This will be empty string for the end of grid
|
68
|
+
* @property {number} destRowType Row type of the drop area. This will be empty string for the end of grid
|
69
|
+
* @property {boolean=} cancel Set this property to true to cancel the default operation (data moving)
|
70
|
+
* @example
|
71
|
+
* beforeDataMoved: function(e) {
|
72
|
+
* let srcRowType = e.srcRowTypes[0];
|
73
|
+
* let destRowType = e.destRowType;
|
74
|
+
* if(srcRowType === "GROUP_MEMBER" && destRowType === "CONTENT") {
|
75
|
+
* e.cancel = true; // Prevent a group member row from moving outside of its own group
|
76
|
+
* }
|
77
|
+
* }
|
78
|
+
*/
|
79
|
+
|
80
|
+
|
81
|
+
/** @private
|
82
|
+
* @param {Object} pos
|
83
|
+
* @return {boolean}
|
84
|
+
*/
|
85
|
+
let _isInContentSection = function (pos) {
|
86
|
+
if(pos) {
|
87
|
+
if(pos["sectionType"] === "content") {
|
88
|
+
return pos["sectionName"] !== "bottomPadding";
|
89
|
+
}
|
90
|
+
}
|
91
|
+
return false;
|
92
|
+
};
|
93
|
+
|
94
|
+
/** @private
|
95
|
+
* @param {string} rowType
|
96
|
+
* @return {boolean}
|
97
|
+
*/
|
98
|
+
let _isNormalRowType = function (rowType) {
|
99
|
+
if(rowType) {
|
100
|
+
if(rowType === "CONTENT") {
|
101
|
+
return true;
|
102
|
+
}
|
103
|
+
if(rowType === "CHAIN") {
|
104
|
+
return true;
|
105
|
+
}
|
106
|
+
if(rowType === "GROUP_HEADER") {
|
107
|
+
return true;
|
108
|
+
}
|
109
|
+
return false;
|
110
|
+
} else {
|
111
|
+
return true;
|
112
|
+
}
|
113
|
+
};
|
114
|
+
|
115
|
+
/** @private
|
116
|
+
* @param {Object} api
|
117
|
+
* @param {number|string} rowRef
|
118
|
+
* @returns {string}
|
119
|
+
*/
|
120
|
+
let _getRowType = function (api, rowRef) {
|
121
|
+
if(api) {
|
122
|
+
if(api.getRowType) {
|
123
|
+
return api.getRowType(rowRef);
|
124
|
+
}
|
125
|
+
}
|
126
|
+
return "CONTENT";
|
127
|
+
};
|
128
|
+
|
129
|
+
/** @constructor
|
130
|
+
* @param {RowDraggingPlugin.Options=} options
|
131
|
+
* @extends {GridPlugin}
|
132
|
+
*/
|
133
|
+
let RowDraggingPlugin = function (options) {
|
134
|
+
let t = this;
|
135
|
+
|
136
|
+
t.startDrag = t.startDrag.bind(t);
|
137
|
+
t.stopDrag = t.stopDrag.bind(t);
|
138
|
+
t._clearCache = t._clearCache.bind(t);
|
139
|
+
|
140
|
+
t._onMouseDown = t._onMouseDown.bind(t);
|
141
|
+
|
142
|
+
t._onDragPulse = t._onDragPulse.bind(t);
|
143
|
+
|
144
|
+
t._onDragStart = t._onDragStart.bind(t);
|
145
|
+
t._onMouseMove = t._onMouseMove.bind(t);
|
146
|
+
t._onDragEnd = t._onDragEnd.bind(t);
|
147
|
+
|
148
|
+
t._onJETDrop = t._onJETDrop.bind(t);
|
149
|
+
t._onJETDragOver = t._onJETDragOver.bind(t);
|
150
|
+
t._delayStart = t._delayStart.bind(t);
|
151
|
+
t._onMouseOut = t._onMouseOut.bind(t);
|
152
|
+
|
153
|
+
t._hosts = [];
|
154
|
+
|
155
|
+
t._guideline = document.createElement("div"); // Test IE mouse event, guildline close mouse event
|
156
|
+
t._guideline.className = "tr-row-guideline";
|
157
|
+
|
158
|
+
t._dragBox = document.createElement("div");
|
159
|
+
t._dragBox.className = "drag-box-disabled";
|
160
|
+
|
161
|
+
t._dragBoxIcon = document.createElement("ef-icon");
|
162
|
+
t._dragBoxIcon.className = "drag-box-icon";
|
163
|
+
|
164
|
+
if(options) {
|
165
|
+
t.config({ "rowDragging": options });
|
166
|
+
}
|
167
|
+
};
|
168
|
+
Ext.inherits(RowDraggingPlugin, GridPlugin);
|
169
|
+
|
170
|
+
/** @type {string}
|
171
|
+
* @private
|
172
|
+
*/
|
173
|
+
RowDraggingPlugin._styles = ""; // Static variable
|
174
|
+
/** @type {Promise<Object>}
|
175
|
+
* @private
|
176
|
+
*/
|
177
|
+
RowDraggingPlugin._stylePromise = null; // Static variable
|
178
|
+
|
179
|
+
/** @type {Element}
|
180
|
+
* @private
|
181
|
+
*/
|
182
|
+
RowDraggingPlugin.prototype._guideline = null;
|
183
|
+
/** @type {Element}
|
184
|
+
* @private
|
185
|
+
*/
|
186
|
+
RowDraggingPlugin.prototype._dragBox = null;
|
187
|
+
/** @type {Element}
|
188
|
+
* @private
|
189
|
+
*/
|
190
|
+
RowDraggingPlugin.prototype._dragBoxIcon = null;
|
191
|
+
/** For disabling UIs
|
192
|
+
* @type {boolean}
|
193
|
+
* @private
|
194
|
+
*/
|
195
|
+
RowDraggingPlugin.prototype._uiDisabled = false;
|
196
|
+
/** For disabling drag and drop functionalities
|
197
|
+
* @type {boolean}
|
198
|
+
* @private
|
199
|
+
*/
|
200
|
+
RowDraggingPlugin.prototype._disabled = false;
|
201
|
+
/** @type {Element}
|
202
|
+
* @private
|
203
|
+
*/
|
204
|
+
RowDraggingPlugin.prototype._dragTarget = null;
|
205
|
+
/** @type {Object}
|
206
|
+
* @private
|
207
|
+
*/
|
208
|
+
RowDraggingPlugin.prototype._dragBoxRenderer = null;
|
209
|
+
/** @type {*}
|
210
|
+
* @private
|
211
|
+
*/
|
212
|
+
RowDraggingPlugin.prototype._legacyRowReorder = null;
|
213
|
+
/** @type {Object}
|
214
|
+
* @private
|
215
|
+
*/
|
216
|
+
RowDraggingPlugin.prototype._pos = null;
|
217
|
+
/** @type {string}
|
218
|
+
* @private
|
219
|
+
*/
|
220
|
+
RowDraggingPlugin.prototype._startingRid = "";
|
221
|
+
/** @type {string}
|
222
|
+
* @private
|
223
|
+
*/
|
224
|
+
RowDraggingPlugin.prototype._startingRowType = "";
|
225
|
+
/** Core grid instance
|
226
|
+
* @type {Object}
|
227
|
+
* @private
|
228
|
+
*/
|
229
|
+
RowDraggingPlugin.prototype._startingGrid = null;
|
230
|
+
|
231
|
+
/** @type {number}
|
232
|
+
* @private
|
233
|
+
*/
|
234
|
+
RowDraggingPlugin.prototype._dragPulseId = 0;
|
235
|
+
/** @type {number}
|
236
|
+
* @private
|
237
|
+
*/
|
238
|
+
RowDraggingPlugin.prototype._topBound = 0; // For drag pulse
|
239
|
+
/** @type {number}
|
240
|
+
* @private
|
241
|
+
*/
|
242
|
+
RowDraggingPlugin.prototype._btmBound = 0; // For drag pulse
|
243
|
+
/** @type {number}
|
244
|
+
* @private
|
245
|
+
*/
|
246
|
+
RowDraggingPlugin.prototype._scrollStep = 40; // For drag pulse
|
247
|
+
|
248
|
+
/** @type {boolean}
|
249
|
+
* @private
|
250
|
+
*/
|
251
|
+
RowDraggingPlugin.prototype._dragging = false;
|
252
|
+
/** @type {boolean}
|
253
|
+
* @private
|
254
|
+
*/
|
255
|
+
RowDraggingPlugin.prototype._scrollingZone = false;
|
256
|
+
/** @type {boolean}
|
257
|
+
* @private
|
258
|
+
*/
|
259
|
+
RowDraggingPlugin.prototype._touchMode = false;
|
260
|
+
/** @type {boolean}
|
261
|
+
* @private
|
262
|
+
*/
|
263
|
+
RowDraggingPlugin.prototype._mouseInput = true;
|
264
|
+
/** @type {boolean}
|
265
|
+
* @private
|
266
|
+
*/
|
267
|
+
RowDraggingPlugin.prototype._dragBoxEnabled = false;
|
268
|
+
/** @type {boolean}
|
269
|
+
* @private
|
270
|
+
*/
|
271
|
+
RowDraggingPlugin.prototype._dataTransfer = true;
|
272
|
+
/** @type {boolean}
|
273
|
+
* @private
|
274
|
+
*/
|
275
|
+
RowDraggingPlugin.prototype._autoScroll = true;
|
276
|
+
/** @type {Object}
|
277
|
+
* @private
|
278
|
+
*/
|
279
|
+
RowDraggingPlugin.prototype._dragUI = null;
|
280
|
+
/** @type {number}
|
281
|
+
* @private
|
282
|
+
*/
|
283
|
+
RowDraggingPlugin.prototype._timerId = 0;
|
284
|
+
/** @type {boolean}
|
285
|
+
* @private
|
286
|
+
*/
|
287
|
+
RowDraggingPlugin.prototype._jetDnD = false;
|
288
|
+
/** @type {Object}
|
289
|
+
* @private
|
290
|
+
*/
|
291
|
+
RowDraggingPlugin.prototype._jetDragContent = null;
|
292
|
+
/** @type {boolean}
|
293
|
+
* @private
|
294
|
+
*/
|
295
|
+
RowDraggingPlugin.prototype._jetContentHasRic = false;
|
296
|
+
/** @type {boolean}
|
297
|
+
* @private
|
298
|
+
*/
|
299
|
+
RowDraggingPlugin.prototype._jetContentHasField = false;
|
300
|
+
/** @type {string}
|
301
|
+
* @private
|
302
|
+
*/
|
303
|
+
RowDraggingPlugin.prototype._entryPoint = "";
|
304
|
+
|
305
|
+
/** Prevent built-in config
|
306
|
+
* @public
|
307
|
+
* @ignore
|
308
|
+
* @param {string} optionName
|
309
|
+
* @param {*} optionValue
|
310
|
+
* @return {*}
|
311
|
+
*/
|
312
|
+
RowDraggingPlugin.prototype.beforeProcessOption = function (optionName, optionValue) {
|
313
|
+
if (optionName === "rowReorder") {
|
314
|
+
this._legacyRowReorder = optionValue;
|
315
|
+
return false; // eslint-disable-line
|
316
|
+
}
|
317
|
+
return; // eslint-disable-line
|
318
|
+
};
|
319
|
+
|
320
|
+
/** Plugin can have multiple hosts/tables and share its states across those hosts/tables.
|
321
|
+
* @public
|
322
|
+
* @override
|
323
|
+
* @return {boolean}
|
324
|
+
*/
|
325
|
+
RowDraggingPlugin.prototype.hasMultiTableSupport = function() {
|
326
|
+
return true;
|
327
|
+
};
|
328
|
+
|
329
|
+
/** @public
|
330
|
+
* @return {string}
|
331
|
+
*/
|
332
|
+
RowDraggingPlugin.prototype.getName = function () {
|
333
|
+
return "RowDraggingPlugin"; // Read Only
|
334
|
+
};
|
335
|
+
/** @public
|
336
|
+
* @param {Object} host core grid instance
|
337
|
+
* @param {Object} options
|
338
|
+
*/
|
339
|
+
RowDraggingPlugin.prototype.initialize = function (host, options) {
|
340
|
+
if (this._hosts.indexOf(host) >= 0) { return; }
|
341
|
+
this._hosts.push(host);
|
342
|
+
|
343
|
+
this.config(options);
|
344
|
+
|
345
|
+
if (this._mouseInput) {
|
346
|
+
host.setAttribute("draggable", "true");
|
347
|
+
host.listen("dragstart", this.startDrag);
|
348
|
+
}
|
349
|
+
|
350
|
+
host.listen("mousedown", this._onMouseDown);
|
351
|
+
host.listen("touchstart", this._onMouseDown);
|
352
|
+
|
353
|
+
this._dragUI = new DragUI({
|
354
|
+
dragBox: this._dragBox,
|
355
|
+
dragBoxIcon: this._dragBoxIcon
|
356
|
+
});
|
357
|
+
|
358
|
+
ElfUtil.getThemeColors().then(
|
359
|
+
RowDraggingPlugin._onThemeLoaded.bind(null, host)
|
360
|
+
).catch(
|
361
|
+
RowDraggingPlugin._onThemeLoaded.bind(null, host)
|
362
|
+
);
|
363
|
+
|
364
|
+
// In case of lazy loading
|
365
|
+
// host.getAllSections("content").forEach(this._registerSection);
|
366
|
+
};
|
367
|
+
/** @public
|
368
|
+
* @param {Object} host core grid instance
|
369
|
+
*/
|
370
|
+
RowDraggingPlugin.prototype.unload = function (host) {
|
371
|
+
let at = this._hosts.indexOf(host);
|
372
|
+
if (at < 0) { return; }
|
373
|
+
|
374
|
+
// host.removeAttribute("draggable");
|
375
|
+
host.unlisten("dragstart", this.startDrag);
|
376
|
+
host.unlisten("mousedown", this._onMouseDown);
|
377
|
+
host.unlisten("touchstart", this._onMouseDown);
|
378
|
+
|
379
|
+
this._hosts.splice(at, 1);
|
380
|
+
if (!this._hosts.length) {
|
381
|
+
window.removeEventListener("mousemove", this._onMouseMove, false);
|
382
|
+
window.removeEventListener("touchmove", this._onMouseMove, false);
|
383
|
+
window.removeEventListener("mouseup", this._onDragEnd, false);
|
384
|
+
window.removeEventListener("touchend", this._onDragEnd, false);
|
385
|
+
window.removeEventListener("touchcancel", this._onDragEnd, false);
|
386
|
+
|
387
|
+
this._clearCache();
|
388
|
+
}
|
389
|
+
if(this._timerId) {
|
390
|
+
clearTimeout(this._timerId);
|
391
|
+
this._timerId = 0;
|
392
|
+
}
|
393
|
+
this._dispose();
|
394
|
+
};
|
395
|
+
|
396
|
+
/** @private
|
397
|
+
* @function
|
398
|
+
* @param {Object} grid Core grid instance
|
399
|
+
*/
|
400
|
+
RowDraggingPlugin._onThemeLoaded = function(grid) {
|
401
|
+
if(!RowDraggingPlugin._styles) {
|
402
|
+
let styles = [
|
403
|
+
":host .row-dragging .cover-layer .selection-bound", [
|
404
|
+
"border: var(--grid-drag-indicator)"
|
405
|
+
],
|
406
|
+
":host .row-dragging .tr-lg .cell.selected-row", [
|
407
|
+
"background-color: unset;"
|
408
|
+
]
|
409
|
+
];
|
410
|
+
RowDraggingPlugin._styles = prettifyCss(styles);
|
411
|
+
}
|
412
|
+
|
413
|
+
DragUI.initStyles();
|
414
|
+
RowDraggingPlugin._applyThemeColor(grid);
|
415
|
+
DragUI.applyThemeColor(grid);
|
416
|
+
};
|
417
|
+
/** @private
|
418
|
+
* @param {Object} grid core grid instance
|
419
|
+
*/
|
420
|
+
RowDraggingPlugin._applyThemeColor = function(grid) {
|
421
|
+
if(!grid || grid._rowDraggingStyles) {
|
422
|
+
return;
|
423
|
+
}
|
424
|
+
if(RowDraggingPlugin._styles) {
|
425
|
+
grid._rowDraggingStyles = true; // Prevent loading the same style twice
|
426
|
+
injectCss(RowDraggingPlugin._styles, grid.getParent());
|
427
|
+
}
|
428
|
+
};
|
429
|
+
|
430
|
+
/** @public
|
431
|
+
* @param {Object=} options Grid model object
|
432
|
+
*/
|
433
|
+
RowDraggingPlugin.prototype.config = function (options) {
|
434
|
+
if (!options) { return; }
|
435
|
+
|
436
|
+
let extOptions = options["rowDragging"] || this._legacyRowReorder;
|
437
|
+
if (!extOptions) {
|
438
|
+
return;
|
439
|
+
}
|
440
|
+
|
441
|
+
if (typeof extOptions["dragBoxRenderer"] === "function") {
|
442
|
+
this._dragBoxRenderer = extOptions["dragBoxRenderer"];
|
443
|
+
let className = "drag-box";
|
444
|
+
if (ElfUtil.getElfVersion() < 3) {
|
445
|
+
className = "tr-dragbox content-dragging"; // Keep backward compatibility
|
446
|
+
}
|
447
|
+
this._dragBox.className = className;
|
448
|
+
} else {
|
449
|
+
this._dragBox.className = "drag-box-disabled"; // set disable drag-box
|
450
|
+
}
|
451
|
+
|
452
|
+
this._dragBoxEnabled = !!extOptions["dragBox"];
|
453
|
+
|
454
|
+
let val = extOptions["mouseInput"];
|
455
|
+
if (val != null) {
|
456
|
+
this._mouseInput = !!val;
|
457
|
+
}
|
458
|
+
val = extOptions["dataTransfer"];
|
459
|
+
if (val != null) {
|
460
|
+
this._dataTransfer = !!val;
|
461
|
+
}
|
462
|
+
val = extOptions["autoScroll"];
|
463
|
+
if (val != null) {
|
464
|
+
this._autoScroll = !!val;
|
465
|
+
}
|
466
|
+
|
467
|
+
if (extOptions["disabled"]) {
|
468
|
+
this._uiDisabled = true;
|
469
|
+
}
|
470
|
+
|
471
|
+
this.addListener(extOptions, "dragStart");
|
472
|
+
this.addListener(extOptions, "drag");
|
473
|
+
this.addListener(extOptions, "dragEnd");
|
474
|
+
this.addListener(extOptions, "dataMoved");
|
475
|
+
this.addListener(extOptions, "beforeDataMoved");
|
476
|
+
};
|
477
|
+
|
478
|
+
/** Get a current state of grid and extension config
|
479
|
+
* @public
|
480
|
+
* @param {Object=} out_obj
|
481
|
+
* @returns {!Object}
|
482
|
+
*/
|
483
|
+
RowDraggingPlugin.prototype.getConfigObject = function (out_obj) {
|
484
|
+
let obj = out_obj || {};
|
485
|
+
|
486
|
+
let extOptions = obj.rowDragging;
|
487
|
+
if(!extOptions) {
|
488
|
+
extOptions = obj.rowDragging = {};
|
489
|
+
}
|
490
|
+
|
491
|
+
if(this._dragBoxEnabled) {
|
492
|
+
extOptions.dragBox = this._dragBoxEnabled;
|
493
|
+
}
|
494
|
+
if(!this._mouseInput) {
|
495
|
+
extOptions.mouseInput = this._mouseInput;
|
496
|
+
}
|
497
|
+
if(!this._autoScroll) {
|
498
|
+
extOptions.autoScroll = this._autoScroll;
|
499
|
+
}
|
500
|
+
if(!this._dataTransfer) {
|
501
|
+
extOptions.dataTransfer = this._dataTransfer;
|
502
|
+
}
|
503
|
+
if(this._uiDisabled) {
|
504
|
+
extOptions.disabled = this._uiDisabled;
|
505
|
+
}
|
506
|
+
|
507
|
+
return obj;
|
508
|
+
};
|
509
|
+
|
510
|
+
/** Drag start to simulate "dragStart" event for testing purpose
|
511
|
+
* @ignore
|
512
|
+
* @param {number} rowIndex
|
513
|
+
* @param {*=} mouseEvt
|
514
|
+
*/
|
515
|
+
RowDraggingPlugin.prototype.dragStart = function (rowIndex, mouseEvt) {
|
516
|
+
// dragstart event
|
517
|
+
if(!mouseEvt) {
|
518
|
+
mouseEvt = {};
|
519
|
+
}
|
520
|
+
mouseEvt["type"] = "dragstart";
|
521
|
+
let core = this._hosts[0];
|
522
|
+
let cell = core ? core.getCell("content", 0, rowIndex) : null;
|
523
|
+
mouseEvt.target = cell ? cell.getElement() : null;
|
524
|
+
this._onMouseDown(mouseEvt);
|
525
|
+
this.startDrag(mouseEvt);
|
526
|
+
};
|
527
|
+
|
528
|
+
/** Move mouse to drag cell for testing purpose
|
529
|
+
* @public
|
530
|
+
* @ignore
|
531
|
+
* @param {number} rowIndex
|
532
|
+
* @param {*=} mouseEvt
|
533
|
+
*/
|
534
|
+
RowDraggingPlugin.prototype.dragMove = function (rowIndex, mouseEvt) {
|
535
|
+
let core = this._hosts[0];
|
536
|
+
if(!core) {
|
537
|
+
return; // Extension has been disposed
|
538
|
+
}
|
539
|
+
|
540
|
+
// mousemove, touchmove event
|
541
|
+
if(!mouseEvt) {
|
542
|
+
mouseEvt = {};
|
543
|
+
}
|
544
|
+
mouseEvt["type"] = "mousemove";
|
545
|
+
mouseEvt["which"] = 1; // Simulation of mouse down and move
|
546
|
+
let cell = core.getCell("content", 0, rowIndex);
|
547
|
+
let cellRelativePosition = core.getRelativePosition(cell); // get relative position of cell only when dragging for calculate dragBox
|
548
|
+
|
549
|
+
mouseEvt.clientX = cellRelativePosition.x;
|
550
|
+
mouseEvt.pageY = cellRelativePosition.y;
|
551
|
+
mouseEvt.target = cell ? cell.getElement() : null;
|
552
|
+
mouseEvt.stopPropagation = function() {};
|
553
|
+
mouseEvt.preventDefault = function() {};
|
554
|
+
this._onMouseMove(mouseEvt);
|
555
|
+
};
|
556
|
+
|
557
|
+
/** Mouse up to end of drag for testing purpose
|
558
|
+
* @public
|
559
|
+
* @ignore
|
560
|
+
* @param {number} rowIndex
|
561
|
+
* @param {*=} mouseEvt
|
562
|
+
*/
|
563
|
+
RowDraggingPlugin.prototype.dragEnd = function (rowIndex, mouseEvt) {
|
564
|
+
// mouseup, touchend, touchcancel event
|
565
|
+
if(!mouseEvt) {
|
566
|
+
mouseEvt = {};
|
567
|
+
}
|
568
|
+
mouseEvt["type"] = "mouseup";
|
569
|
+
let core = this._hosts[0];
|
570
|
+
let cell = core ? core.getCell("content", 0, rowIndex) : null;
|
571
|
+
mouseEvt.target = cell ? cell.getElement() : null;
|
572
|
+
mouseEvt.stopPropagation = function() {};
|
573
|
+
mouseEvt.preventDefault = function() {};
|
574
|
+
this._onDragEnd(mouseEvt);
|
575
|
+
};
|
576
|
+
|
577
|
+
/** @public
|
578
|
+
* @param {*=} startRef
|
579
|
+
*/
|
580
|
+
RowDraggingPlugin.prototype.startDrag = function (startRef) {
|
581
|
+
this._startDrag(false, startRef); // Start without delay start
|
582
|
+
};
|
583
|
+
/** @public */
|
584
|
+
RowDraggingPlugin.prototype.stopDrag = function () {
|
585
|
+
this.cancelDrag(); // Cancel drag if this method is called on dragStart event
|
586
|
+
if(this._dragging) {
|
587
|
+
this._onDragEnd();
|
588
|
+
}
|
589
|
+
};
|
590
|
+
/** @public */
|
591
|
+
RowDraggingPlugin.prototype.cancelDrag = function () {
|
592
|
+
if (this._pos) { this._pos["cancel"] = true; }
|
593
|
+
};
|
594
|
+
|
595
|
+
/** @public
|
596
|
+
* @return {Element}
|
597
|
+
*/
|
598
|
+
RowDraggingPlugin.prototype.getGuideline = function () {
|
599
|
+
return this._guideline;
|
600
|
+
};
|
601
|
+
|
602
|
+
/** Disable drag and drop functionality. Unlike disableUIs method, no events will be triggered or dispatched by user actions.
|
603
|
+
* This method is useful for temporary turnning off drag and drop functionalities.
|
604
|
+
* @public
|
605
|
+
* @param {boolean=} disabled
|
606
|
+
* @see {@link RowDraggingPlugin#disable}
|
607
|
+
*/
|
608
|
+
RowDraggingPlugin.prototype.disable = function (disabled) {
|
609
|
+
this._disabled = disabled !== false;
|
610
|
+
};
|
611
|
+
/** @public
|
612
|
+
* @return {boolean}
|
613
|
+
*/
|
614
|
+
RowDraggingPlugin.prototype.isDisabled = function () {
|
615
|
+
return this._disabled;
|
616
|
+
};
|
617
|
+
/** Disable UIs, while events will still be triggered by user actions. This method modify `disabled` property on the configuration object.
|
618
|
+
* This method is useful for customizing UIs during the drag operations.
|
619
|
+
* @public
|
620
|
+
* @param {boolean=} disabled
|
621
|
+
* @see {@link RowDraggingPlugin#disable}
|
622
|
+
*/
|
623
|
+
RowDraggingPlugin.prototype.disableUIs = function (disabled) {
|
624
|
+
this._uiDisabled = disabled !== false;
|
625
|
+
};
|
626
|
+
|
627
|
+
/** @public
|
628
|
+
* @param {boolean=} allowed
|
629
|
+
*/
|
630
|
+
RowDraggingPlugin.prototype.allowDrag = function (allowed) {
|
631
|
+
if(this._pos) {// WARNING: Please note that this method is intent to be used by client, and not for internal use
|
632
|
+
this._pos["invalidTarget"] = (allowed === false);
|
633
|
+
}
|
634
|
+
};
|
635
|
+
|
636
|
+
/** @public
|
637
|
+
* @function
|
638
|
+
* @param {boolean=} allowed
|
639
|
+
*/
|
640
|
+
RowDraggingPlugin.prototype.allowDrop = RowDraggingPlugin.prototype.allowDrag;
|
641
|
+
|
642
|
+
/** @public
|
643
|
+
* @param {*} content Element, Node, string, number, or everything else.
|
644
|
+
*/
|
645
|
+
RowDraggingPlugin.prototype.setDragContent = function (content) {
|
646
|
+
this._dragUI.setContent(content);
|
647
|
+
};
|
648
|
+
|
649
|
+
/** @public
|
650
|
+
* @return {Element}
|
651
|
+
*/
|
652
|
+
RowDraggingPlugin.prototype.getDragBox = function () {
|
653
|
+
return this._dragBox;
|
654
|
+
};
|
655
|
+
|
656
|
+
/** @public
|
657
|
+
* @return {string}
|
658
|
+
*/
|
659
|
+
RowDraggingPlugin.prototype.getDragSource = function () {
|
660
|
+
return this._entryPoint;
|
661
|
+
};
|
662
|
+
|
663
|
+
/** @public
|
664
|
+
* @return {boolean}
|
665
|
+
*/
|
666
|
+
RowDraggingPlugin.prototype.isDragging = function () {
|
667
|
+
return this._dragging;
|
668
|
+
};
|
669
|
+
|
670
|
+
/** @public
|
671
|
+
* @param {boolean=} disabled
|
672
|
+
*/
|
673
|
+
RowDraggingPlugin.prototype.disableDragging = function (disabled) {
|
674
|
+
this._disabled = disabled !== false;
|
675
|
+
};
|
676
|
+
|
677
|
+
/** @public
|
678
|
+
* @param {boolean=} enabled
|
679
|
+
*/
|
680
|
+
RowDraggingPlugin.prototype.enableJETDragAndDrop = function (enabled) {
|
681
|
+
let val = enabled !== false;
|
682
|
+
if(this._jetDnD === val) { return; }
|
683
|
+
|
684
|
+
this._jetDnD = val;
|
685
|
+
|
686
|
+
let jet = window["JET"];
|
687
|
+
if (jet) {
|
688
|
+
//If ContainerDescription is undefined, that means JET is not initalized. Mostlikely the app
|
689
|
+
//is running the local development mode without container. Disable dnd in this case
|
690
|
+
if (jet["ContainerDescription"] && (jet["ContainerDescription"]["name"] !== "EikonNowContainer")) {
|
691
|
+
if (this._jetDnD) {
|
692
|
+
jet["onDrop"](this._onJETDrop);
|
693
|
+
jet["onDragOver"](this._onJETDragOver);
|
694
|
+
jet["onDragLeave"](this.stopDrag);
|
695
|
+
} else {
|
696
|
+
jet["onDrop"](null);
|
697
|
+
jet["onDragOver"](null);
|
698
|
+
jet["onDragLeave"](null);
|
699
|
+
}
|
700
|
+
} else {
|
701
|
+
this._jetDnD = false;
|
702
|
+
}
|
703
|
+
}
|
704
|
+
};
|
705
|
+
|
706
|
+
/** @public
|
707
|
+
* @return {Object}
|
708
|
+
*/
|
709
|
+
RowDraggingPlugin.prototype.getJETDragContent = function () {
|
710
|
+
return this._jetDragContent;
|
711
|
+
};
|
712
|
+
|
713
|
+
/** @public
|
714
|
+
* @param {Object} content
|
715
|
+
*/
|
716
|
+
RowDraggingPlugin.prototype.setJETDragContent = function (content) {
|
717
|
+
this._jetDragContent = content;
|
718
|
+
|
719
|
+
let tr = window["tr"];
|
720
|
+
let grid = (tr) ? tr["grid"] : null;
|
721
|
+
let JetDragContent = (grid) ? grid["JetDragContent"] : null;
|
722
|
+
if (content && JetDragContent) {
|
723
|
+
let jetDragContentMgr = new JetDragContent(content);
|
724
|
+
let rics = jetDragContentMgr["getRicsToDrop"]();
|
725
|
+
let fields = jetDragContentMgr["getFieldsToDrop"]();
|
726
|
+
|
727
|
+
this._jetContentHasRic = (rics && rics.length > 0) ? true : false;
|
728
|
+
this._jetContentHasField = (fields && fields.length > 0) ? true : false;
|
729
|
+
} else {
|
730
|
+
this._jetContentHasRic = false;
|
731
|
+
this._jetContentHasField = false;
|
732
|
+
}
|
733
|
+
};
|
734
|
+
|
735
|
+
/** @private
|
736
|
+
* @param {*} e
|
737
|
+
* @return {!Object}
|
738
|
+
*/
|
739
|
+
RowDraggingPlugin.prototype._hitTest = function (e) {
|
740
|
+
let host = this.getRelativeGrid(e);
|
741
|
+
if (host) {
|
742
|
+
let pos;
|
743
|
+
if (e.changedTouches) {
|
744
|
+
// https://stackoverflow.com/questions/3918842/how-to-find-out-the-actual-event-target-of-touchmove-javascript-event
|
745
|
+
let touchPos = e.changedTouches[0];
|
746
|
+
pos = host.getRelativePosition(
|
747
|
+
document.elementFromPoint(
|
748
|
+
touchPos.clientX, touchPos.clientY
|
749
|
+
)
|
750
|
+
);
|
751
|
+
Dom.getRelativePosition(touchPos, host.getElement(), pos); // Overwrite x and y property
|
752
|
+
} else {
|
753
|
+
pos = host.getRelativePosition(e);
|
754
|
+
}
|
755
|
+
return pos;
|
756
|
+
} else {
|
757
|
+
return /** @type{!Object} */(e || {});
|
758
|
+
}
|
759
|
+
};
|
760
|
+
|
761
|
+
/** @private
|
762
|
+
* @param {Event} e
|
763
|
+
*/
|
764
|
+
RowDraggingPlugin.prototype._onMouseDown = function (e) {
|
765
|
+
if (e.changedTouches) {
|
766
|
+
this._touchMode = true;
|
767
|
+
}
|
768
|
+
this._dragTarget = /** @type{Element} */(e.target);
|
769
|
+
this._setEntryPoint("grid");
|
770
|
+
};
|
771
|
+
/** @private
|
772
|
+
* @param {*=} e
|
773
|
+
* @param {boolean=} fromJET
|
774
|
+
*/
|
775
|
+
RowDraggingPlugin.prototype._onDragStart = function (e, fromJET) {
|
776
|
+
this._timerId = 0;
|
777
|
+
|
778
|
+
if (this._dragging) { return; }
|
779
|
+
if (!this._pos) { return; }
|
780
|
+
|
781
|
+
this._listenAbortActions(false); // Unlisen abort action
|
782
|
+
|
783
|
+
let useJetDragStart = false;
|
784
|
+
let jet = window["JET"];
|
785
|
+
if (fromJET) {
|
786
|
+
useJetDragStart = true;
|
787
|
+
} else {
|
788
|
+
this._dispatch("dragStart", /** @type{!Object} */(this._pos));
|
789
|
+
if(this._isDragCancelled()) {
|
790
|
+
return; // User does not allow this drag to happen
|
791
|
+
}
|
792
|
+
if (jet && this._jetDnD && this._jetDragContent) {
|
793
|
+
useJetDragStart = true;
|
794
|
+
jet["dragStart"](this._jetDragContent);
|
795
|
+
}
|
796
|
+
}
|
797
|
+
|
798
|
+
this._dragging = true;
|
799
|
+
// Event listeners
|
800
|
+
document.body.classList.add("tr-dragging"); // Prevent text selection
|
801
|
+
|
802
|
+
if (!useJetDragStart) { // WARNING: JET wrongly intercepts all mouse events without app's consent
|
803
|
+
window.addEventListener("mousemove", this._onMouseMove, false);
|
804
|
+
window.addEventListener("touchmove", this._onMouseMove, false);
|
805
|
+
}
|
806
|
+
window.addEventListener("mouseup", this._onDragEnd, false);
|
807
|
+
window.addEventListener("touchend", this._onDragEnd, false);
|
808
|
+
window.addEventListener("touchcancel", this._onDragEnd, false);
|
809
|
+
|
810
|
+
if (this._touchMode) {
|
811
|
+
for (let i = this._hosts.length; --i >= 0;) {
|
812
|
+
let host = this._hosts[i];
|
813
|
+
host.getVScrollbar().disableTouchInput();
|
814
|
+
host.getHScrollbar().disableTouchInput();
|
815
|
+
}
|
816
|
+
}
|
817
|
+
|
818
|
+
// Update UI, grid cursor and guideline
|
819
|
+
if (!this._uiDisabled) { //disabledUI
|
820
|
+
let grid = this._pos["grid"] || null;
|
821
|
+
if (!grid) return;
|
822
|
+
|
823
|
+
if (this._dataTransfer) {
|
824
|
+
let rowIndex = this._pos["rowIndex"];
|
825
|
+
let dv = grid.getDataSource();
|
826
|
+
this._startingRid = dv.getRowId(rowIndex);
|
827
|
+
this._startingGrid = grid;
|
828
|
+
this._startingRowType = _getRowType(this.getGridApi(grid), rowIndex);
|
829
|
+
|
830
|
+
if (this._dragBoxRenderer) { // For custom drag box rendering
|
831
|
+
let arg = cloneObject(e); // TODO: Check if cloning is necessary
|
832
|
+
arg.dragBox = this._dragBox;
|
833
|
+
arg.dataRow = this._getRowData(dv.getRowDataAt(rowIndex));
|
834
|
+
|
835
|
+
if (this._legacyRowReorder) {
|
836
|
+
this._dragBoxRenderer(e, arg.dragBox, [arg.dataRow]);
|
837
|
+
} else {
|
838
|
+
this._dragBoxRenderer(arg);
|
839
|
+
}
|
840
|
+
}
|
841
|
+
}
|
842
|
+
|
843
|
+
// TODO: Just update curser will not gonna work since cell is pointer-events: none;
|
844
|
+
// we should do something to overwrite pointer-events first
|
845
|
+
// then set cursor move will have an effect
|
846
|
+
let gridElem = grid.getElement();
|
847
|
+
gridElem.classList.add("mouse-dragging");
|
848
|
+
gridElem.classList.add("row-dragging");
|
849
|
+
|
850
|
+
this._updateGuidePosition();
|
851
|
+
|
852
|
+
if (this._autoScroll) {
|
853
|
+
let scrollbar = grid.getVScrollbar();
|
854
|
+
this._topBound = scrollbar.getTop() + 50;
|
855
|
+
this._btmBound = scrollbar.getTop() + scrollbar.getHeight() - 50;
|
856
|
+
|
857
|
+
if (this._topBound < this._btmBound) {
|
858
|
+
// For step scrolling
|
859
|
+
this._scrollStep = Math.floor(grid.getScrollHeight() / 25); // Update the scrollbar first
|
860
|
+
if (this._scrollStep < 40) {
|
861
|
+
this._scrollStep = 40;
|
862
|
+
} else if (this._scrollStep > 400) {
|
863
|
+
this._scrollStep = 400;
|
864
|
+
}
|
865
|
+
this._dragPulseId = setInterval(this._onDragPulse, 130); // Start pulse
|
866
|
+
}
|
867
|
+
}
|
868
|
+
}
|
869
|
+
};
|
870
|
+
/** @private
|
871
|
+
* @param {Object} e
|
872
|
+
*/
|
873
|
+
RowDraggingPlugin.prototype._onMouseMove = function (e) {
|
874
|
+
if (!this._dragging) { return; }
|
875
|
+
|
876
|
+
if (e.type != "touchmove") {
|
877
|
+
if (!e || (e.which !== 1)) { // Left click is not down. Support in IE9 and up
|
878
|
+
this.stopDrag();
|
879
|
+
return;
|
880
|
+
}
|
881
|
+
Dom.preventDefault(e);
|
882
|
+
}
|
883
|
+
|
884
|
+
let newPos = this._hitTest(e); // A new object is created
|
885
|
+
if(newPos["grid"]) { //Mouse is in grid area
|
886
|
+
if(_isInContentSection(this._pos) && this._pos["grid"] === newPos["grid"]) {
|
887
|
+
if(!_isInContentSection(newPos) || !(newPos["rowIndex"] >= 0)) { // Mouse is on un-dropable area
|
888
|
+
newPos = null;
|
889
|
+
}
|
890
|
+
}
|
891
|
+
}
|
892
|
+
if(newPos) {
|
893
|
+
this._pos = newPos;
|
894
|
+
} else {
|
895
|
+
newPos = this._pos;
|
896
|
+
}
|
897
|
+
|
898
|
+
newPos["dragBox"] = this._dragBox; // assign dragBox for user determine valid target
|
899
|
+
|
900
|
+
// need to check grid properties because row can be move outside the grid
|
901
|
+
if(this._shouldPreventDrop(newPos)) {
|
902
|
+
newPos.dragBoxIcon = "void";
|
903
|
+
}
|
904
|
+
|
905
|
+
let dropable = (this._entryPoint !== "JET" || this._jetContentHasRic);
|
906
|
+
if(dropable) {
|
907
|
+
this._updateGuidePosition(e);
|
908
|
+
}
|
909
|
+
|
910
|
+
// Dispatch drag event to let user determine valid drop target using allowDrag (allowDrop) method
|
911
|
+
this._dispatch("drag", newPos);
|
912
|
+
if(!this._uiDisabled && dropable) {
|
913
|
+
e.dragBoxIcon = newPos.dragBoxIcon; // access event object instread of element for prevent element persistence
|
914
|
+
let drop = this._dragUI.renderDragBox(e, this._startingGrid);
|
915
|
+
if(!drop) { // can not be drop or not allow to drop or insertion
|
916
|
+
this.cancelDrag();
|
917
|
+
}
|
918
|
+
}
|
919
|
+
};
|
920
|
+
/** @private
|
921
|
+
* @param {Object} e
|
922
|
+
*/
|
923
|
+
RowDraggingPlugin.prototype._onDragEnd = function (e) {
|
924
|
+
if (!this._dragging) { return; }
|
925
|
+
this._dragging = false;
|
926
|
+
|
927
|
+
if(e) {
|
928
|
+
Dom.preventDefault(e);
|
929
|
+
}
|
930
|
+
Dom.removeParent(this._guideline);
|
931
|
+
Dom.removeParent(this._dragBox);
|
932
|
+
|
933
|
+
document.body.classList.remove("tr-dragging");
|
934
|
+
|
935
|
+
window.removeEventListener("mousemove", this._onMouseMove, false);
|
936
|
+
window.removeEventListener("touchmove", this._onMouseMove, false);
|
937
|
+
window.removeEventListener("mouseup", this._onDragEnd, false);
|
938
|
+
window.removeEventListener("touchend", this._onDragEnd, false);
|
939
|
+
window.removeEventListener("touchcancel", this._onDragEnd, false);
|
940
|
+
|
941
|
+
if (this._touchMode) {
|
942
|
+
for (let i = this._hosts.length; --i >= 0;) {
|
943
|
+
let host = this._hosts[i];
|
944
|
+
host.getVScrollbar().disableTouchInput(false);
|
945
|
+
host.getHScrollbar().disableTouchInput(false);
|
946
|
+
}
|
947
|
+
}
|
948
|
+
|
949
|
+
let srcGrid = this._startingGrid || this._hosts[0];
|
950
|
+
|
951
|
+
let srcGridElem = srcGrid.getElement();
|
952
|
+
srcGridElem.classList.remove("mouse-dragging");
|
953
|
+
srcGridElem.classList.remove("row-dragging");
|
954
|
+
|
955
|
+
let evtArg = {
|
956
|
+
rowIndex: -1
|
957
|
+
};
|
958
|
+
if(!this._isDragCancelled()) {
|
959
|
+
evtArg["srcGrid"] = srcGrid;
|
960
|
+
evtArg["dropTarget"] = e ? e.target : null; // WARNING: dropTarget is not correct for element in a shadow root
|
961
|
+
|
962
|
+
if (!this._jetDnD && this._dataTransfer && _isInContentSection(this._pos)) {
|
963
|
+
let destGrid = this._pos["grid"] || srcGrid; // this._pos is always valid at this point
|
964
|
+
let destRowIndex = this._pos["rowIndex"];
|
965
|
+
|
966
|
+
let rowSelection = srcGrid.getPlugin("RowSelectionPlugin");
|
967
|
+
let srcRowIndices = rowSelection && rowSelection.getSelectedRows();
|
968
|
+
if (!srcRowIndices || !srcRowIndices.length) {
|
969
|
+
// case no row selection or it disabled
|
970
|
+
srcRowIndices = this._startingRid; // Str Type
|
971
|
+
}
|
972
|
+
|
973
|
+
// evtArg["destGrid"] is filled in _moveRows
|
974
|
+
this._moveRows(srcRowIndices, destRowIndex, srcGrid, destGrid, evtArg);
|
975
|
+
}
|
976
|
+
|
977
|
+
evtArg["currentPosition"] = this._pos; // To support JET requirement
|
978
|
+
evtArg["data"] = this._jetDragContent;
|
979
|
+
} else {
|
980
|
+
evtArg["cancel"] = true;
|
981
|
+
}
|
982
|
+
|
983
|
+
this._dispatch("dragEnd", evtArg); // Always fire drag end for client to clean up its resource
|
984
|
+
this._clearCache();
|
985
|
+
this._jetDragContent = null;
|
986
|
+
};
|
987
|
+
|
988
|
+
/** Move multiple rows to the specified row index. The move results will be based on row type of the given rows. The behavior is the same as drag and drop operation from this extension.
|
989
|
+
* @public
|
990
|
+
* @param {Array.<number>} srcRowIndices Array of row indices from the source Grid (e.g., row index or row id)
|
991
|
+
* @param {number} destRowIndex Destination row index
|
992
|
+
* @param {Object=} srcGrid Core grid instance of the source rows
|
993
|
+
* @param {Object=} destGrid Core grid instance of the destination
|
994
|
+
* @return {number} Number of rows from the given rows that have been moved
|
995
|
+
*/
|
996
|
+
RowDraggingPlugin.prototype.moveRows = function (srcRowIndices, destRowIndex, srcGrid, destGrid) {
|
997
|
+
if(!srcGrid) {
|
998
|
+
srcGrid = this._startingGrid || this._hosts[0];
|
999
|
+
if(!srcGrid) {
|
1000
|
+
return 0;
|
1001
|
+
}
|
1002
|
+
}
|
1003
|
+
if(!destGrid) {
|
1004
|
+
destGrid = srcGrid;
|
1005
|
+
}
|
1006
|
+
|
1007
|
+
return this._moveRows(srcRowIndices, destRowIndex, srcGrid, destGrid, {});
|
1008
|
+
};
|
1009
|
+
/** @private
|
1010
|
+
* @param {Array.<number>|string} srcRowRef
|
1011
|
+
* @param {number} destRowIndex
|
1012
|
+
* @param {!Object} srcGrid core grid instance
|
1013
|
+
* @param {!Object} destGrid core grid instance
|
1014
|
+
* @param {!Object} evtArg
|
1015
|
+
* @return {number}
|
1016
|
+
*/
|
1017
|
+
RowDraggingPlugin.prototype._moveRows = function (srcRowRef, destRowIndex, srcGrid, destGrid, evtArg) {
|
1018
|
+
let srcRowIndices = null;
|
1019
|
+
let srcDv = srcGrid.getDataSource();
|
1020
|
+
let destDv = destGrid.getDataSource();
|
1021
|
+
if(typeof srcRowRef === "string") {
|
1022
|
+
let srcRowIndex = srcDv.getRowIndex(srcRowRef);
|
1023
|
+
if(srcRowIndex >= 0) {
|
1024
|
+
srcRowIndices = [srcRowIndex];
|
1025
|
+
}
|
1026
|
+
} else if(Array.isArray(srcRowRef)) {
|
1027
|
+
if(srcRowRef.length) {
|
1028
|
+
srcRowIndices = srcRowRef;
|
1029
|
+
}
|
1030
|
+
}
|
1031
|
+
|
1032
|
+
if(!srcRowIndices) {
|
1033
|
+
return 0;
|
1034
|
+
}
|
1035
|
+
|
1036
|
+
// Available row types are ["CONTENT", "CHAIN", "CONSTITUENT", "GROUP_HEADER", "SUBGROUP_HEADER", "GROUP_MEMBER"]
|
1037
|
+
let i;
|
1038
|
+
let srcCount = srcRowIndices.length;
|
1039
|
+
let srcRowIds = new Array(srcCount);
|
1040
|
+
let srcRowTypes = [];
|
1041
|
+
let conRowType = "";
|
1042
|
+
let api = this.getGridApi(srcGrid);
|
1043
|
+
if(api && !api.getRowType) {
|
1044
|
+
api = null;
|
1045
|
+
}
|
1046
|
+
for(i = 0; i < srcCount; ++i) {
|
1047
|
+
let srcIndex = srcRowIndices[i];
|
1048
|
+
let rowType = _getRowType(api, srcIndex);
|
1049
|
+
srcRowIds[i] = srcDv.getRowId(srcIndex);
|
1050
|
+
srcRowTypes[i] = rowType;
|
1051
|
+
if(conRowType) {
|
1052
|
+
if(conRowType !== rowType) {
|
1053
|
+
conRowType = "MIXED";
|
1054
|
+
} // TODO: Check if the GROUP_MEMBER coms from the same parent
|
1055
|
+
} else {
|
1056
|
+
conRowType = rowType;
|
1057
|
+
}
|
1058
|
+
}
|
1059
|
+
if(!conRowType) {
|
1060
|
+
conRowType = "CONTENT";
|
1061
|
+
}
|
1062
|
+
let destRowType = _getRowType(api, destRowIndex); // TODO: this has to be get from destGrid
|
1063
|
+
let destRowId = destDv.getRowId(destRowIndex);
|
1064
|
+
let destParentRowId = destDv.getSegmentParentRowId(destRowId);
|
1065
|
+
|
1066
|
+
evtArg["rowIndex"] = srcRowIndices[0];
|
1067
|
+
evtArg["srcRowIndices"] = srcRowIndices;
|
1068
|
+
evtArg["srcRowIds"] = srcRowIds;
|
1069
|
+
evtArg["srcRowTypes"] = srcRowTypes;
|
1070
|
+
evtArg["consolidatedSrcRowType"] = conRowType;
|
1071
|
+
evtArg["destRowIndex"] = destRowIndex;
|
1072
|
+
evtArg["destRowId"] = destRowId;
|
1073
|
+
evtArg["destRowType"] = destRowType;
|
1074
|
+
this._dispatch("beforeDataMoved", evtArg);
|
1075
|
+
if(evtArg["cancel"]) {
|
1076
|
+
return 0;
|
1077
|
+
}
|
1078
|
+
|
1079
|
+
let movedRowIds = null;
|
1080
|
+
if(srcGrid === destGrid) { // TODO: Support wrap mode
|
1081
|
+
if(conRowType === "MIXED") {
|
1082
|
+
movedRowIds = srcDv.moveRow(srcRowIds, destRowId); // TODO: Handle each row individually in this mixed case
|
1083
|
+
} else if(conRowType === "CONTENT") {
|
1084
|
+
if(destRowType === "GROUP_HEADER") {
|
1085
|
+
if(srcDv.getSegmentChildIds(destRowId)) {
|
1086
|
+
movedRowIds = srcDv.moveRow(srcRowIds, destRowId);
|
1087
|
+
} else { // Add content row as a new member only if there is no member
|
1088
|
+
srcDv.addSegmentChildren(destRowId, srcRowIds);
|
1089
|
+
movedRowIds = srcRowIds;
|
1090
|
+
}
|
1091
|
+
} else if(_isNormalRowType(destRowType)) {
|
1092
|
+
movedRowIds = srcDv.moveRow(srcRowIds, destRowId);
|
1093
|
+
} else if(destRowType === "GROUP_MEMBER") {
|
1094
|
+
srcDv.addSegmentChildren(destParentRowId, srcRowIds);
|
1095
|
+
|
1096
|
+
srcDv.moveRow(srcRowIds, destRowId);
|
1097
|
+
movedRowIds = srcRowIds;
|
1098
|
+
}
|
1099
|
+
} else if(conRowType === "CHAIN" || conRowType === "GROUP_HEADER") {
|
1100
|
+
if(_isNormalRowType(destRowType)) {
|
1101
|
+
movedRowIds = srcDv.moveRow(srcRowIds, destRowId);
|
1102
|
+
}
|
1103
|
+
} else if(conRowType === "GROUP_MEMBER") {
|
1104
|
+
if(destRowType !== "CONSTITUENT" && destRowType !== "SUBGROUP_HEADER") {
|
1105
|
+
let srcRowId = srcRowIds[0];
|
1106
|
+
let parentRowId = srcDv.getSegmentParentRowId(srcRowId);
|
1107
|
+
let endOfSegment = -1;
|
1108
|
+
if(!srcDv.isSegmentCollapsed(parentRowId)) {
|
1109
|
+
let childRowIds = srcDv.getSegmentChildIds(parentRowId);
|
1110
|
+
let childCount = childRowIds ? childRowIds.length : 0;
|
1111
|
+
endOfSegment = srcDv.getRowIndex(parentRowId) + childCount + 1;
|
1112
|
+
}
|
1113
|
+
if(destRowIndex !== endOfSegment) {
|
1114
|
+
if(destRowType !== "GROUP_MEMBER" || parentRowId !== destParentRowId) {
|
1115
|
+
srcDv.removeSegmentChildren(parentRowId, srcRowIds); // move members out of existing segment
|
1116
|
+
if(destParentRowId) {
|
1117
|
+
srcDv.addSegmentChildren(destParentRowId, srcRowIds); // Moving row between two segments
|
1118
|
+
}
|
1119
|
+
}
|
1120
|
+
}
|
1121
|
+
movedRowIds = srcDv.moveRow(srcRowIds, destRowId);
|
1122
|
+
} // CONSTITUENT and SUBGROUP_HEADER types are not valid destination
|
1123
|
+
} // CONSTITUENT and SUBGROUP_HEADER types cannot be moved
|
1124
|
+
} else {
|
1125
|
+
// TODO: Add support moving row based on row types
|
1126
|
+
// TODO: Check if we support moving to last row for multi-table
|
1127
|
+
|
1128
|
+
evtArg["destGrid"] = destGrid;
|
1129
|
+
|
1130
|
+
if(api) { // This can only be Real-time Grid
|
1131
|
+
let destApi = this.getGridApi(destGrid);
|
1132
|
+
if(destApi) {
|
1133
|
+
movedRowIds = srcRowIds;
|
1134
|
+
for(i = 0; i < srcCount; ++i) {
|
1135
|
+
let rowDef = api.getRowDefinition(srcRowIds[i]);
|
1136
|
+
if(rowDef) {
|
1137
|
+
destApi.insertRow(rowDef.getConfigObject(), destRowId);
|
1138
|
+
}
|
1139
|
+
}
|
1140
|
+
api.removeRows(srcRowIds);
|
1141
|
+
}
|
1142
|
+
} else {
|
1143
|
+
movedRowIds = srcRowIds;
|
1144
|
+
for(i = 0; i < srcCount; ++i) {
|
1145
|
+
let rowData = srcDv.getRowData(srcRowIds[i]);
|
1146
|
+
if(rowData) {
|
1147
|
+
destDv.insertRow(destRowId, rowData); // TODO: Update view data source and grid
|
1148
|
+
}
|
1149
|
+
}
|
1150
|
+
srcDv.removeRows(srcRowIndices);
|
1151
|
+
}
|
1152
|
+
}
|
1153
|
+
|
1154
|
+
let moveCount = 0;
|
1155
|
+
if(movedRowIds) {
|
1156
|
+
if(Array.isArray(movedRowIds)) {
|
1157
|
+
moveCount = movedRowIds.length;
|
1158
|
+
} else { // Single row is moved
|
1159
|
+
movedRowIds = [movedRowIds];
|
1160
|
+
moveCount = 1;
|
1161
|
+
}
|
1162
|
+
}
|
1163
|
+
|
1164
|
+
if(moveCount) {
|
1165
|
+
destGrid.focus();
|
1166
|
+
|
1167
|
+
evtArg["rowIndex"] = destDv.getRowIndex(srcRowIds[0]);
|
1168
|
+
// For backward compatibility and should not be used anymore
|
1169
|
+
evtArg["originRowId"] = movedRowIds[0];
|
1170
|
+
evtArg["originRowIds"] = movedRowIds;
|
1171
|
+
evtArg["destinationRowId"] = destRowId; // Return empty string for the last row
|
1172
|
+
|
1173
|
+
this._dispatch("dataMoved", evtArg);
|
1174
|
+
}
|
1175
|
+
return moveCount;
|
1176
|
+
};
|
1177
|
+
/** @private
|
1178
|
+
* @return {boolean}
|
1179
|
+
*/
|
1180
|
+
RowDraggingPlugin.prototype._isDragCancelled = function () {
|
1181
|
+
return (this._pos && this._pos["cancel"]) ? true : false;
|
1182
|
+
};
|
1183
|
+
|
1184
|
+
/** @private
|
1185
|
+
* @param {Event=} e
|
1186
|
+
*/
|
1187
|
+
RowDraggingPlugin.prototype._updateGuidePosition = function (e) {
|
1188
|
+
let pos = this._pos;
|
1189
|
+
if (this._uiDisabled || !pos || pos["invalidTarget"]) {
|
1190
|
+
return;
|
1191
|
+
}
|
1192
|
+
if(pos["dragBoxIcon"] === "not-allowed" || pos["dragBoxIcon"] === "void" ) {
|
1193
|
+
Dom.removeParent(this._guideline);
|
1194
|
+
return;
|
1195
|
+
}
|
1196
|
+
|
1197
|
+
if (_isInContentSection(pos)) {
|
1198
|
+
let guideline = this._guideline;
|
1199
|
+
// let grid = pos["grid"];
|
1200
|
+
let section = pos["section"];
|
1201
|
+
let pn = section.getColumnHost(); // This is to hide out of view guideline
|
1202
|
+
if (pn !== guideline.parentNode) {
|
1203
|
+
guideline.style.width = section.getWidth() + "px";
|
1204
|
+
pn.appendChild(guideline);
|
1205
|
+
}
|
1206
|
+
|
1207
|
+
let cellElement = pos["cellElement"];
|
1208
|
+
let relativePos = Dom.getRelativePosition(cellElement, pn);
|
1209
|
+
let cellTop = relativePos["y"];
|
1210
|
+
let rowIndex = pos["rowIndex"];
|
1211
|
+
let offsetY = 0;
|
1212
|
+
|
1213
|
+
if(rowIndex) {
|
1214
|
+
offsetY = -1; // Make guideline stay on top of the target cell
|
1215
|
+
if(e) { // MouseEvent or TouchEvent
|
1216
|
+
let lastRow = section.getRowCount() - 1;
|
1217
|
+
if(rowIndex >= lastRow) { // bottommost row
|
1218
|
+
let rowHeight = section.getRowHeight(lastRow);
|
1219
|
+
relativePos = Dom.getRelativePosition(e, cellElement);
|
1220
|
+
if(relativePos["y"] >= (rowHeight / 2) | 0) {
|
1221
|
+
offsetY = rowHeight - 3; // TODO: Use actual guideline height for the offset
|
1222
|
+
++pos["rowIndex"];
|
1223
|
+
}
|
1224
|
+
}
|
1225
|
+
}
|
1226
|
+
} // else { Topmost row
|
1227
|
+
|
1228
|
+
guideline.style.top = (cellTop + offsetY) + "px";
|
1229
|
+
}
|
1230
|
+
};
|
1231
|
+
|
1232
|
+
|
1233
|
+
/** @private
|
1234
|
+
* @param {Object} posObj
|
1235
|
+
* @return {boolean}
|
1236
|
+
*/
|
1237
|
+
RowDraggingPlugin.prototype._shouldPreventDrop = function (posObj) {
|
1238
|
+
if(this._startingRowType === "CONSTITUENT" || this._startingRowType === "SUBGROUP_HEADER") {
|
1239
|
+
return true;
|
1240
|
+
}
|
1241
|
+
|
1242
|
+
if(!posObj) {
|
1243
|
+
return false;
|
1244
|
+
}
|
1245
|
+
let grid = posObj["grid"];
|
1246
|
+
if(!grid) {
|
1247
|
+
return false;
|
1248
|
+
}
|
1249
|
+
let dv = grid.getDataSource();
|
1250
|
+
if(!dv) {
|
1251
|
+
return false; // Grid has been disposed
|
1252
|
+
}
|
1253
|
+
|
1254
|
+
let destApi = this.getGridApi(grid);
|
1255
|
+
let destRowId = dv.getRowId(posObj["rowIndex"]);
|
1256
|
+
let destParentId = dv.getSegmentParentRowId(destRowId);
|
1257
|
+
if(this._startingRowType === "GROUP_MEMBER") {
|
1258
|
+
let startingParentId = dv.getSegmentParentRowId(this._startingRid);
|
1259
|
+
let startingApi = this.getGridApi(this._startingGrid);
|
1260
|
+
if(_getRowType(startingApi, startingParentId) === "SUBGROUP_HEADER") {
|
1261
|
+
if(!destParentId) {
|
1262
|
+
return true;
|
1263
|
+
}
|
1264
|
+
|
1265
|
+
if(destParentId === startingParentId) { // GROUP_MEMBER same parent can be move inside
|
1266
|
+
return false;
|
1267
|
+
}
|
1268
|
+
return true;
|
1269
|
+
}
|
1270
|
+
// else { } starting have GROUP_HEADER case, it can be move outside the group
|
1271
|
+
} else if(this._startingRowType === "CHAIN" ) {
|
1272
|
+
if(destParentId) { // CHAIN can not move inside the member that have parent
|
1273
|
+
return true;
|
1274
|
+
}
|
1275
|
+
} else if (this._startingRowType === "GROUP_HEADER") {
|
1276
|
+
if(destParentId) { // GROUP_HEADER can't move inside another GROUP, SUBGROUP, or the same group
|
1277
|
+
return true;
|
1278
|
+
}
|
1279
|
+
}
|
1280
|
+
|
1281
|
+
let destRowType = _getRowType(destApi, destRowId);
|
1282
|
+
if(destRowType === "CONSTITUENT" || destRowType === "SUBGROUP_HEADER") { // Do not allow dropping this type when starting with any row types
|
1283
|
+
return true;
|
1284
|
+
}
|
1285
|
+
|
1286
|
+
if(destRowType === "GROUP_MEMBER") {
|
1287
|
+
if(_getRowType(destApi, destParentId) === "SUBGROUP_HEADER") { // Do not allow to drop group member that have parent is SUBGROUP_HEADER
|
1288
|
+
return true;
|
1289
|
+
}
|
1290
|
+
}
|
1291
|
+
|
1292
|
+
return false;
|
1293
|
+
|
1294
|
+
};
|
1295
|
+
|
1296
|
+
/** @private */
|
1297
|
+
RowDraggingPlugin.prototype._clearCache = function () {
|
1298
|
+
if (this._dragPulseId) {
|
1299
|
+
clearInterval(this._dragPulseId);
|
1300
|
+
this._dragPulseId = 0;
|
1301
|
+
}
|
1302
|
+
|
1303
|
+
this._pos = this._dragTarget = this._startingGrid = null;
|
1304
|
+
|
1305
|
+
this._scrollingZone = false;
|
1306
|
+
};
|
1307
|
+
|
1308
|
+
|
1309
|
+
/** @private */
|
1310
|
+
RowDraggingPlugin.prototype._onDragPulse = function () {
|
1311
|
+
if (!this._dragging) { return; }
|
1312
|
+
|
1313
|
+
this._dispatch("dragInterval", this._pos);
|
1314
|
+
|
1315
|
+
// Manage vertical scrollbar
|
1316
|
+
let primaryHost = this._pos["grid"] || this._startingGrid;
|
1317
|
+
if (!primaryHost || !primaryHost.getVScrollbar().isActive()) {
|
1318
|
+
return;
|
1319
|
+
}
|
1320
|
+
|
1321
|
+
let y = this._pos["y"];
|
1322
|
+
if (y == null) { return; }
|
1323
|
+
|
1324
|
+
if (y >= this._topBound && y <= this._btmBound) {
|
1325
|
+
this._scrollingZone = false;
|
1326
|
+
} else {
|
1327
|
+
this._scrollingZone = true;
|
1328
|
+
let scrollVal = (this._scrollStep * (0.8 + Math.random())) | 0;
|
1329
|
+
|
1330
|
+
if (y < this._topBound) {
|
1331
|
+
scrollVal = -scrollVal;
|
1332
|
+
}
|
1333
|
+
primaryHost.scrollDown(scrollVal);
|
1334
|
+
}
|
1335
|
+
};
|
1336
|
+
|
1337
|
+
/** @private
|
1338
|
+
* @param {string} str
|
1339
|
+
*/
|
1340
|
+
RowDraggingPlugin.prototype._setEntryPoint = function (str) {
|
1341
|
+
this._entryPoint = str;
|
1342
|
+
this.setDragContent(null); // Clear original content
|
1343
|
+
};
|
1344
|
+
|
1345
|
+
/** @private
|
1346
|
+
* @param {Object} e
|
1347
|
+
*/
|
1348
|
+
RowDraggingPlugin.prototype._onMouseOut = function (e) {
|
1349
|
+
if(!e) {
|
1350
|
+
e = window.event;
|
1351
|
+
if(!e) {
|
1352
|
+
return;
|
1353
|
+
}
|
1354
|
+
}
|
1355
|
+
let from = e.relatedTarget || e.toElement;
|
1356
|
+
if (!from || from.nodeName == "HTML") {
|
1357
|
+
/*
|
1358
|
+
* TRGRID-1493
|
1359
|
+
* The DragStart is delayed using a timer (_timerId created by _delayStart )
|
1360
|
+
* The mouse may left the window before the drag start
|
1361
|
+
* In this case we should force the stopDrag to stop the drag on the source
|
1362
|
+
* Because the mouse up will not be handled by the source
|
1363
|
+
*/
|
1364
|
+
|
1365
|
+
// cancel the timer - _onDragStart will not be called by the timer
|
1366
|
+
if(this._timerId) {
|
1367
|
+
clearTimeout(this._timerId);
|
1368
|
+
this._timerId = 0;
|
1369
|
+
}
|
1370
|
+
|
1371
|
+
this._onDragStart();
|
1372
|
+
this.stopDrag();
|
1373
|
+
}
|
1374
|
+
};
|
1375
|
+
|
1376
|
+
/** @private
|
1377
|
+
* @param {Object} e
|
1378
|
+
*/
|
1379
|
+
RowDraggingPlugin.prototype._delayStart = function (e) {
|
1380
|
+
this._startingGrid.unlisten("mousemove", this._delayStart);
|
1381
|
+
|
1382
|
+
if(!this._timerId) {
|
1383
|
+
this._timerId = window.setTimeout(this._onDragStart, 200);
|
1384
|
+
}
|
1385
|
+
if (this._jetDnD) {
|
1386
|
+
document.addEventListener("mouseout", this._onMouseOut, false);
|
1387
|
+
}
|
1388
|
+
};
|
1389
|
+
/** @private
|
1390
|
+
* @param {boolean=} bool
|
1391
|
+
*/
|
1392
|
+
RowDraggingPlugin.prototype._listenAbortActions = function (bool) {
|
1393
|
+
if (bool !== false) {
|
1394
|
+
window.addEventListener("mouseup", this._clearCache, false);
|
1395
|
+
} else {
|
1396
|
+
window.removeEventListener("mouseup", this._clearCache, false);
|
1397
|
+
}
|
1398
|
+
};
|
1399
|
+
/** @private
|
1400
|
+
* @param {boolean=} delayStart
|
1401
|
+
* @param {*=} startRef
|
1402
|
+
* @param {boolean=} fromJET
|
1403
|
+
*/
|
1404
|
+
RowDraggingPlugin.prototype._startDrag = function (delayStart, startRef, fromJET) {
|
1405
|
+
if (this._dragging || this._hosts.length <= 0) { return; }
|
1406
|
+
if (this._disabled) { return; }
|
1407
|
+
|
1408
|
+
let pos;
|
1409
|
+
if (startRef) {
|
1410
|
+
if (startRef.type === "dragstart") {
|
1411
|
+
if (startRef["preventDefault"]) {
|
1412
|
+
Dom.preventDefault(startRef);
|
1413
|
+
}
|
1414
|
+
let host = this.getRelativeGrid(startRef);
|
1415
|
+
if (host) {
|
1416
|
+
pos = host.getRelativePosition(this._dragTarget);
|
1417
|
+
}
|
1418
|
+
} else {
|
1419
|
+
pos = this._hitTest(startRef);
|
1420
|
+
}
|
1421
|
+
} else {
|
1422
|
+
let target = this._dragTarget || this._hosts[0].getSection("content").getCell(0, 0);
|
1423
|
+
pos = this._hitTest(target);
|
1424
|
+
}
|
1425
|
+
|
1426
|
+
if (_isInContentSection(pos)) {
|
1427
|
+
this._clearCache();
|
1428
|
+
this._pos = pos;
|
1429
|
+
this._startingGrid = pos["grid"];
|
1430
|
+
|
1431
|
+
if (delayStart) {
|
1432
|
+
this._startingGrid.listen("mousemove", this._delayStart);
|
1433
|
+
this._listenAbortActions();
|
1434
|
+
} else { // Start immediately
|
1435
|
+
this._onDragStart(startRef, fromJET);
|
1436
|
+
}
|
1437
|
+
}
|
1438
|
+
};
|
1439
|
+
/** @private
|
1440
|
+
* @param {Object} clientPos
|
1441
|
+
*/
|
1442
|
+
RowDraggingPlugin.prototype._onJETDragOver = function (clientPos) {
|
1443
|
+
if (!clientPos) { return; }
|
1444
|
+
|
1445
|
+
if (!this._dragging) {
|
1446
|
+
if (!clientPos["dropData"]) { return; }
|
1447
|
+
this._setEntryPoint("JET");
|
1448
|
+
this.setJETDragContent(clientPos["dropData"]); // WARNING: We have no way to distinguish between dropData from grid and other apps
|
1449
|
+
this._startDrag(false, clientPos["e"], true); // Event is suppressed
|
1450
|
+
} else {
|
1451
|
+
this._onDrag(clientPos["e"]);
|
1452
|
+
}
|
1453
|
+
};
|
1454
|
+
/** @private
|
1455
|
+
* @param {Object} jetObj
|
1456
|
+
*/
|
1457
|
+
RowDraggingPlugin.prototype._onJETDrop = function (jetObj) {
|
1458
|
+
if (!this._dragging) { return; }
|
1459
|
+
|
1460
|
+
if (!this._jetDragContent) {
|
1461
|
+
this._jetDragContent = jetObj; // To maintain original client signature
|
1462
|
+
}
|
1463
|
+
this._onDragEnd(jetObj["mouse"]["srcEvent"]);
|
1464
|
+
};
|
1465
|
+
|
1466
|
+
/** @public
|
1467
|
+
* @ignore
|
1468
|
+
* @return {!Object}
|
1469
|
+
*/
|
1470
|
+
RowDraggingPlugin.prototype._getEventHandlers = function() {
|
1471
|
+
return {
|
1472
|
+
"mouseout": this._onMouseOut
|
1473
|
+
};
|
1474
|
+
};
|
1475
|
+
|
1476
|
+
|
1477
|
+
|
1478
|
+
export default RowDraggingPlugin;
|
1479
|
+
export { RowDraggingPlugin, RowDraggingPlugin as RowDragging, RowDraggingPlugin as RowDraggingExtension };
|