@refinitiv-ui/efx-grid 6.0.0-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +17 -0
- package/README.md +61 -0
- package/lib/column-format-dialog/index.d.ts +1 -0
- package/lib/column-format-dialog/index.js +1 -0
- package/lib/column-format-dialog/lib/column-format-dialog.d.ts +64 -0
- package/lib/column-format-dialog/lib/column-format-dialog.js +2713 -0
- package/lib/column-format-dialog/lib/locale/translation-de.d.ts +7 -0
- package/lib/column-format-dialog/lib/locale/translation-de.js +94 -0
- package/lib/column-format-dialog/lib/locale/translation-en.d.ts +7 -0
- package/lib/column-format-dialog/lib/locale/translation-en.js +94 -0
- package/lib/column-format-dialog/lib/locale/translation-ja.d.ts +7 -0
- package/lib/column-format-dialog/lib/locale/translation-ja.js +94 -0
- package/lib/column-format-dialog/lib/locale/translation-zh-hant.d.ts +7 -0
- package/lib/column-format-dialog/lib/locale/translation-zh-hant.js +94 -0
- package/lib/column-format-dialog/lib/locale/translation-zh.d.ts +7 -0
- package/lib/column-format-dialog/lib/locale/translation-zh.js +94 -0
- package/lib/column-format-dialog/lib/locale/translation.d.ts +11 -0
- package/lib/column-format-dialog/lib/locale/translation.js +18 -0
- package/lib/column-format-dialog/lib/preview-table.d.ts +151 -0
- package/lib/column-format-dialog/lib/preview-table.js +995 -0
- package/lib/column-format-dialog/themes/base.less +429 -0
- package/lib/column-format-dialog/themes/elemental/column-format-dialog.less +1 -0
- package/lib/column-format-dialog/themes/elemental/dark/column-format-dialog.js +4 -0
- package/lib/column-format-dialog/themes/elemental/dark/css/native-elements.css +0 -0
- package/lib/column-format-dialog/themes/elemental/dark/es5/all-elements.js +2 -0
- package/lib/column-format-dialog/themes/elemental/dark/imports/all-elements.js +1 -0
- package/lib/column-format-dialog/themes/elemental/dark/imports/custom-elements.js +1 -0
- package/lib/column-format-dialog/themes/elemental/dark/imports/native-elements.js +0 -0
- package/lib/column-format-dialog/themes/elemental/dark.js +16 -0
- package/lib/column-format-dialog/themes/elemental/defaults.less +1 -0
- package/lib/column-format-dialog/themes/elemental/index.less +5 -0
- package/lib/column-format-dialog/themes/elemental/light/column-format-dialog.js +4 -0
- package/lib/column-format-dialog/themes/elemental/light/css/native-elements.css +0 -0
- package/lib/column-format-dialog/themes/elemental/light/es5/all-elements.js +2 -0
- package/lib/column-format-dialog/themes/elemental/light/imports/all-elements.js +1 -0
- package/lib/column-format-dialog/themes/elemental/light/imports/custom-elements.js +1 -0
- package/lib/column-format-dialog/themes/elemental/light/imports/native-elements.js +0 -0
- package/lib/column-format-dialog/themes/elemental/light.js +16 -0
- package/lib/column-format-dialog/themes/halo/column-format-dialog.less +6 -0
- package/lib/column-format-dialog/themes/halo/dark/column-format-dialog.js +4 -0
- package/lib/column-format-dialog/themes/halo/dark/css/native-elements.css +0 -0
- package/lib/column-format-dialog/themes/halo/dark/es5/all-elements.js +2 -0
- package/lib/column-format-dialog/themes/halo/dark/imports/all-elements.js +1 -0
- package/lib/column-format-dialog/themes/halo/dark/imports/custom-elements.js +1 -0
- package/lib/column-format-dialog/themes/halo/dark/imports/native-elements.js +0 -0
- package/lib/column-format-dialog/themes/halo/dark.js +16 -0
- package/lib/column-format-dialog/themes/halo/defaults.less +1 -0
- package/lib/column-format-dialog/themes/halo/index.less +5 -0
- package/lib/column-format-dialog/themes/halo/light/column-format-dialog.js +4 -0
- package/lib/column-format-dialog/themes/halo/light/css/native-elements.css +0 -0
- package/lib/column-format-dialog/themes/halo/light/es5/all-elements.js +2 -0
- package/lib/column-format-dialog/themes/halo/light/imports/all-elements.js +1 -0
- package/lib/column-format-dialog/themes/halo/light/imports/custom-elements.js +1 -0
- package/lib/column-format-dialog/themes/halo/light/imports/native-elements.js +0 -0
- package/lib/column-format-dialog/themes/halo/light.js +16 -0
- package/lib/column-format-dialog/themes/luna/column-format-dialog.less +1 -0
- package/lib/column-format-dialog/themes/luna/default/column-format-dialog.js +4 -0
- package/lib/column-format-dialog/themes/luna/default/css/native-elements.css +0 -0
- package/lib/column-format-dialog/themes/luna/default/es5/all-elements.js +2 -0
- package/lib/column-format-dialog/themes/luna/default/imports/all-elements.js +1 -0
- package/lib/column-format-dialog/themes/luna/default/imports/custom-elements.js +1 -0
- package/lib/column-format-dialog/themes/luna/default/imports/native-elements.js +0 -0
- package/lib/column-format-dialog/themes/luna/defaults.less +1 -0
- package/lib/column-format-dialog/themes/luna/index.less +5 -0
- package/lib/column-format-dialog/themes/solar/charcoal/column-format-dialog.js +4 -0
- package/lib/column-format-dialog/themes/solar/charcoal/css/native-elements.css +0 -0
- package/lib/column-format-dialog/themes/solar/charcoal/es5/all-elements.js +2 -0
- package/lib/column-format-dialog/themes/solar/charcoal/imports/all-elements.js +1 -0
- package/lib/column-format-dialog/themes/solar/charcoal/imports/custom-elements.js +1 -0
- package/lib/column-format-dialog/themes/solar/charcoal/imports/native-elements.js +0 -0
- package/lib/column-format-dialog/themes/solar/charcoal.js +16 -0
- package/lib/column-format-dialog/themes/solar/column-format-dialog.less +6 -0
- package/lib/column-format-dialog/themes/solar/defaults.less +1 -0
- package/lib/column-format-dialog/themes/solar/index.less +5 -0
- package/lib/column-format-dialog/themes/solar/pearl/column-format-dialog.js +4 -0
- package/lib/column-format-dialog/themes/solar/pearl/css/native-elements.css +0 -0
- package/lib/column-format-dialog/themes/solar/pearl/es5/all-elements.js +2 -0
- package/lib/column-format-dialog/themes/solar/pearl/imports/all-elements.js +1 -0
- package/lib/column-format-dialog/themes/solar/pearl/imports/custom-elements.js +1 -0
- package/lib/column-format-dialog/themes/solar/pearl/imports/native-elements.js +0 -0
- package/lib/column-format-dialog/themes/solar/pearl.js +16 -0
- package/lib/column-selection-dialog/index.d.ts +1 -0
- package/lib/column-selection-dialog/index.js +1 -0
- package/lib/column-selection-dialog/lib/column-selection-dialog.d.ts +41 -0
- package/lib/column-selection-dialog/lib/column-selection-dialog.js +1410 -0
- package/lib/column-selection-dialog/lib/locale/translation-de.d.ts +7 -0
- package/lib/column-selection-dialog/lib/locale/translation-de.js +19 -0
- package/lib/column-selection-dialog/lib/locale/translation-en.d.ts +7 -0
- package/lib/column-selection-dialog/lib/locale/translation-en.js +19 -0
- package/lib/column-selection-dialog/lib/locale/translation-ja.d.ts +7 -0
- package/lib/column-selection-dialog/lib/locale/translation-ja.js +19 -0
- package/lib/column-selection-dialog/lib/locale/translation-zh-hant.d.ts +7 -0
- package/lib/column-selection-dialog/lib/locale/translation-zh-hant.js +19 -0
- package/lib/column-selection-dialog/lib/locale/translation-zh.d.ts +7 -0
- package/lib/column-selection-dialog/lib/locale/translation-zh.js +19 -0
- package/lib/column-selection-dialog/lib/locale/translation.d.ts +11 -0
- package/lib/column-selection-dialog/lib/locale/translation.js +18 -0
- package/lib/column-selection-dialog/themes/base.less +189 -0
- package/lib/column-selection-dialog/themes/elemental/column-selection-dialog.less +1 -0
- package/lib/column-selection-dialog/themes/elemental/dark/column-selection-dialog.js +4 -0
- package/lib/column-selection-dialog/themes/elemental/dark/css/native-elements.css +0 -0
- package/lib/column-selection-dialog/themes/elemental/dark/es5/all-elements.js +2 -0
- package/lib/column-selection-dialog/themes/elemental/dark/imports/all-elements.js +1 -0
- package/lib/column-selection-dialog/themes/elemental/dark/imports/custom-elements.js +1 -0
- package/lib/column-selection-dialog/themes/elemental/dark/imports/native-elements.js +0 -0
- package/lib/column-selection-dialog/themes/elemental/dark.js +6 -0
- package/lib/column-selection-dialog/themes/elemental/defaults.less +1 -0
- package/lib/column-selection-dialog/themes/elemental/index.less +5 -0
- package/lib/column-selection-dialog/themes/elemental/light/column-selection-dialog.js +4 -0
- package/lib/column-selection-dialog/themes/elemental/light/css/native-elements.css +0 -0
- package/lib/column-selection-dialog/themes/elemental/light/es5/all-elements.js +2 -0
- package/lib/column-selection-dialog/themes/elemental/light/imports/all-elements.js +1 -0
- package/lib/column-selection-dialog/themes/elemental/light/imports/custom-elements.js +1 -0
- package/lib/column-selection-dialog/themes/elemental/light/imports/native-elements.js +0 -0
- package/lib/column-selection-dialog/themes/elemental/light.js +6 -0
- package/lib/column-selection-dialog/themes/halo/column-selection-dialog.less +22 -0
- package/lib/column-selection-dialog/themes/halo/dark/column-selection-dialog.js +4 -0
- package/lib/column-selection-dialog/themes/halo/dark/css/native-elements.css +0 -0
- package/lib/column-selection-dialog/themes/halo/dark/es5/all-elements.js +2 -0
- package/lib/column-selection-dialog/themes/halo/dark/imports/all-elements.js +1 -0
- package/lib/column-selection-dialog/themes/halo/dark/imports/custom-elements.js +1 -0
- package/lib/column-selection-dialog/themes/halo/dark/imports/native-elements.js +0 -0
- package/lib/column-selection-dialog/themes/halo/dark.js +6 -0
- package/lib/column-selection-dialog/themes/halo/defaults.less +1 -0
- package/lib/column-selection-dialog/themes/halo/index.less +6 -0
- package/lib/column-selection-dialog/themes/halo/light/column-selection-dialog.js +4 -0
- package/lib/column-selection-dialog/themes/halo/light/css/native-elements.css +0 -0
- package/lib/column-selection-dialog/themes/halo/light/es5/all-elements.js +2 -0
- package/lib/column-selection-dialog/themes/halo/light/imports/all-elements.js +1 -0
- package/lib/column-selection-dialog/themes/halo/light/imports/custom-elements.js +1 -0
- package/lib/column-selection-dialog/themes/halo/light/imports/native-elements.js +0 -0
- package/lib/column-selection-dialog/themes/halo/light.js +6 -0
- package/lib/column-selection-dialog/themes/solar/charcoal/column-selection-dialog.js +4 -0
- package/lib/column-selection-dialog/themes/solar/charcoal/css/native-elements.css +0 -0
- package/lib/column-selection-dialog/themes/solar/charcoal/es5/all-elements.js +2 -0
- package/lib/column-selection-dialog/themes/solar/charcoal/imports/all-elements.js +1 -0
- package/lib/column-selection-dialog/themes/solar/charcoal/imports/custom-elements.js +1 -0
- package/lib/column-selection-dialog/themes/solar/charcoal/imports/native-elements.js +0 -0
- package/lib/column-selection-dialog/themes/solar/charcoal.js +6 -0
- package/lib/column-selection-dialog/themes/solar/column-selection-dialog.less +1 -0
- package/lib/column-selection-dialog/themes/solar/defaults.less +1 -0
- package/lib/column-selection-dialog/themes/solar/index.less +6 -0
- package/lib/column-selection-dialog/themes/solar/pearl/column-selection-dialog.js +4 -0
- package/lib/column-selection-dialog/themes/solar/pearl/css/native-elements.css +0 -0
- package/lib/column-selection-dialog/themes/solar/pearl/es5/all-elements.js +2 -0
- package/lib/column-selection-dialog/themes/solar/pearl/imports/all-elements.js +1 -0
- package/lib/column-selection-dialog/themes/solar/pearl/imports/custom-elements.js +1 -0
- package/lib/column-selection-dialog/themes/solar/pearl/imports/native-elements.js +0 -0
- package/lib/column-selection-dialog/themes/solar/pearl.js +6 -0
- package/lib/core/dist/core.css +1 -0
- package/lib/core/dist/core.js +28075 -0
- package/lib/core/dist/core.min.js +1 -0
- package/lib/core/es6/data/ColumnStats.d.ts +42 -0
- package/lib/core/es6/data/ColumnStats.js +428 -0
- package/lib/core/es6/data/DataCache.d.ts +81 -0
- package/lib/core/es6/data/DataCache.js +1317 -0
- package/lib/core/es6/data/DataTable.d.ts +125 -0
- package/lib/core/es6/data/DataTable.js +1655 -0
- package/lib/core/es6/data/DataView.d.ts +280 -0
- package/lib/core/es6/data/DataView.js +3654 -0
- package/lib/core/es6/data/Segment.d.ts +38 -0
- package/lib/core/es6/data/Segment.js +193 -0
- package/lib/core/es6/data/SegmentCollection.d.ts +58 -0
- package/lib/core/es6/data/SegmentCollection.js +431 -0
- package/lib/core/es6/grid/Core.d.ts +387 -0
- package/lib/core/es6/grid/Core.js +4939 -0
- package/lib/core/es6/grid/ILayoutGrid.d.ts +204 -0
- package/lib/core/es6/grid/ILayoutGrid.js +658 -0
- package/lib/core/es6/grid/LayoutGrid.d.ts +23 -0
- package/lib/core/es6/grid/LayoutGrid.js +2602 -0
- package/lib/core/es6/grid/VirtualizedLayoutGrid.d.ts +18 -0
- package/lib/core/es6/grid/VirtualizedLayoutGrid.js +907 -0
- package/lib/core/es6/grid/components/Cell.d.ts +50 -0
- package/lib/core/es6/grid/components/Cell.js +740 -0
- package/lib/core/es6/grid/components/CellFloatingPanel.d.ts +19 -0
- package/lib/core/es6/grid/components/CellFloatingPanel.js +123 -0
- package/lib/core/es6/grid/components/CellSpan.d.ts +18 -0
- package/lib/core/es6/grid/components/CellSpan.js +99 -0
- package/lib/core/es6/grid/components/CellSpans.d.ts +38 -0
- package/lib/core/es6/grid/components/CellSpans.js +341 -0
- package/lib/core/es6/grid/components/Column.d.ts +22 -0
- package/lib/core/es6/grid/components/Column.js +612 -0
- package/lib/core/es6/grid/components/ElementWrapper.d.ts +125 -0
- package/lib/core/es6/grid/components/ElementWrapper.js +714 -0
- package/lib/core/es6/grid/components/HScrollbar.d.ts +24 -0
- package/lib/core/es6/grid/components/HScrollbar.js +222 -0
- package/lib/core/es6/grid/components/Scrollbar.d.ts +61 -0
- package/lib/core/es6/grid/components/Scrollbar.js +1374 -0
- package/lib/core/es6/grid/components/StretchedCells.d.ts +17 -0
- package/lib/core/es6/grid/components/StretchedCells.js +328 -0
- package/lib/core/es6/grid/components/VScrollbar.d.ts +18 -0
- package/lib/core/es6/grid/components/VScrollbar.js +139 -0
- package/lib/core/es6/grid/components/VirtualItems.d.ts +12 -0
- package/lib/core/es6/grid/components/VirtualItems.js +51 -0
- package/lib/core/es6/grid/event/EventDispatcher.d.ts +16 -0
- package/lib/core/es6/grid/event/EventDispatcher.js +138 -0
- package/lib/core/es6/grid/event/EventListeners.d.ts +34 -0
- package/lib/core/es6/grid/event/EventListeners.js +163 -0
- package/lib/core/es6/grid/plugins/DragAndDropTitlePlugin.d.ts +24 -0
- package/lib/core/es6/grid/plugins/DragAndDropTitlePlugin.js +615 -0
- package/lib/core/es6/grid/plugins/Plugin.d.ts +28 -0
- package/lib/core/es6/grid/plugins/Plugin.js +272 -0
- package/lib/core/es6/grid/plugins/SortableTitlePlugin.d.ts +127 -0
- package/lib/core/es6/grid/plugins/SortableTitlePlugin.js +1707 -0
- package/lib/core/es6/grid/util/Conflator.d.ts +32 -0
- package/lib/core/es6/grid/util/Conflator.js +191 -0
- package/lib/core/es6/grid/util/ElementFrameWork.d.ts +18 -0
- package/lib/core/es6/grid/util/ElementFrameWork.js +227 -0
- package/lib/core/es6/grid/util/HttpRequest.d.ts +53 -0
- package/lib/core/es6/grid/util/HttpRequest.js +371 -0
- package/lib/core/es6/grid/util/PercentBar.d.ts +43 -0
- package/lib/core/es6/grid/util/PercentBar.js +390 -0
- package/lib/core/es6/grid/util/PercentBarRenderer.d.ts +41 -0
- package/lib/core/es6/grid/util/PercentBarRenderer.js +316 -0
- package/lib/core/es6/grid/util/RangeBar.d.ts +25 -0
- package/lib/core/es6/grid/util/RangeBar.js +255 -0
- package/lib/core/es6/grid/util/Reverter.d.ts +14 -0
- package/lib/core/es6/grid/util/Reverter.js +79 -0
- package/lib/core/es6/grid/util/SectionSettings.d.ts +79 -0
- package/lib/core/es6/grid/util/SectionSettings.js +674 -0
- package/lib/core/es6/grid/util/SelectionList.d.ts +50 -0
- package/lib/core/es6/grid/util/SelectionList.js +422 -0
- package/lib/core/es6/grid/util/TrackLayout.d.ts +84 -0
- package/lib/core/es6/grid/util/TrackLayout.js +850 -0
- package/lib/core/es6/grid/util/Virtualizer.d.ts +40 -0
- package/lib/core/es6/grid/util/Virtualizer.js +340 -0
- package/lib/core/es6/grid/util/util.d.ts +18 -0
- package/lib/core/es6/grid/util/util.js +450 -0
- package/lib/core/es6/index.d.ts +84 -0
- package/lib/core/es6/index.js +132 -0
- package/lib/core/es6/tr-grid-theme.d.ts +5 -0
- package/lib/core/es6/tr-grid-theme.js +5 -0
- package/lib/filter-dialog/index.d.ts +1 -0
- package/lib/filter-dialog/index.js +1 -0
- package/lib/filter-dialog/lib/checkbox-list.d.ts +27 -0
- package/lib/filter-dialog/lib/checkbox-list.js +336 -0
- package/lib/filter-dialog/lib/filter-dialog.d.ts +53 -0
- package/lib/filter-dialog/lib/filter-dialog.js +860 -0
- package/lib/filter-dialog/lib/locale/translation-de.d.ts +7 -0
- package/lib/filter-dialog/lib/locale/translation-de.js +37 -0
- package/lib/filter-dialog/lib/locale/translation-en.d.ts +7 -0
- package/lib/filter-dialog/lib/locale/translation-en.js +37 -0
- package/lib/filter-dialog/lib/locale/translation-ja.d.ts +7 -0
- package/lib/filter-dialog/lib/locale/translation-ja.js +37 -0
- package/lib/filter-dialog/lib/locale/translation-zh-hant.d.ts +7 -0
- package/lib/filter-dialog/lib/locale/translation-zh-hant.js +37 -0
- package/lib/filter-dialog/lib/locale/translation-zh.d.ts +7 -0
- package/lib/filter-dialog/lib/locale/translation-zh.js +37 -0
- package/lib/filter-dialog/lib/locale/translation.d.ts +11 -0
- package/lib/filter-dialog/lib/locale/translation.js +18 -0
- package/lib/filter-dialog/themes/base-checkbox.less +37 -0
- package/lib/filter-dialog/themes/base.less +102 -0
- package/lib/filter-dialog/themes/elemental/checkbox-list.less +3 -0
- package/lib/filter-dialog/themes/elemental/dark/checkbox-list.js +4 -0
- package/lib/filter-dialog/themes/elemental/dark/css/native-elements.css +0 -0
- package/lib/filter-dialog/themes/elemental/dark/es5/all-elements.js +4 -0
- package/lib/filter-dialog/themes/elemental/dark/filter-dialog.js +5 -0
- package/lib/filter-dialog/themes/elemental/dark/imports/all-elements.js +2 -0
- package/lib/filter-dialog/themes/elemental/dark/imports/custom-elements.js +2 -0
- package/lib/filter-dialog/themes/elemental/dark/imports/native-elements.js +0 -0
- package/lib/filter-dialog/themes/elemental/dark.js +11 -0
- package/lib/filter-dialog/themes/elemental/defaults.less +3 -0
- package/lib/filter-dialog/themes/elemental/filter-dialog.less +1 -0
- package/lib/filter-dialog/themes/elemental/index.less +6 -0
- package/lib/filter-dialog/themes/elemental/light/checkbox-list.js +4 -0
- package/lib/filter-dialog/themes/elemental/light/css/native-elements.css +0 -0
- package/lib/filter-dialog/themes/elemental/light/es5/all-elements.js +4 -0
- package/lib/filter-dialog/themes/elemental/light/filter-dialog.js +5 -0
- package/lib/filter-dialog/themes/elemental/light/imports/all-elements.js +2 -0
- package/lib/filter-dialog/themes/elemental/light/imports/custom-elements.js +2 -0
- package/lib/filter-dialog/themes/elemental/light/imports/native-elements.js +0 -0
- package/lib/filter-dialog/themes/elemental/light.js +11 -0
- package/lib/filter-dialog/themes/halo/checkbox-list.less +3 -0
- package/lib/filter-dialog/themes/halo/dark/checkbox-list.js +4 -0
- package/lib/filter-dialog/themes/halo/dark/css/native-elements.css +0 -0
- package/lib/filter-dialog/themes/halo/dark/es5/all-elements.js +4 -0
- package/lib/filter-dialog/themes/halo/dark/filter-dialog.js +5 -0
- package/lib/filter-dialog/themes/halo/dark/imports/all-elements.js +2 -0
- package/lib/filter-dialog/themes/halo/dark/imports/custom-elements.js +2 -0
- package/lib/filter-dialog/themes/halo/dark/imports/native-elements.js +0 -0
- package/lib/filter-dialog/themes/halo/dark.js +11 -0
- package/lib/filter-dialog/themes/halo/defaults.less +3 -0
- package/lib/filter-dialog/themes/halo/filter-dialog.less +9 -0
- package/lib/filter-dialog/themes/halo/index.less +6 -0
- package/lib/filter-dialog/themes/halo/light/checkbox-list.js +4 -0
- package/lib/filter-dialog/themes/halo/light/css/native-elements.css +0 -0
- package/lib/filter-dialog/themes/halo/light/es5/all-elements.js +4 -0
- package/lib/filter-dialog/themes/halo/light/filter-dialog.js +5 -0
- package/lib/filter-dialog/themes/halo/light/imports/all-elements.js +2 -0
- package/lib/filter-dialog/themes/halo/light/imports/custom-elements.js +2 -0
- package/lib/filter-dialog/themes/halo/light/imports/native-elements.js +0 -0
- package/lib/filter-dialog/themes/halo/light.js +11 -0
- package/lib/filter-dialog/themes/solar/charcoal/checkbox-list.js +4 -0
- package/lib/filter-dialog/themes/solar/charcoal/css/native-elements.css +0 -0
- package/lib/filter-dialog/themes/solar/charcoal/es5/all-elements.js +4 -0
- package/lib/filter-dialog/themes/solar/charcoal/filter-dialog.js +5 -0
- package/lib/filter-dialog/themes/solar/charcoal/imports/all-elements.js +2 -0
- package/lib/filter-dialog/themes/solar/charcoal/imports/custom-elements.js +2 -0
- package/lib/filter-dialog/themes/solar/charcoal/imports/native-elements.js +0 -0
- package/lib/filter-dialog/themes/solar/charcoal.js +11 -0
- package/lib/filter-dialog/themes/solar/checkbox-list.less +3 -0
- package/lib/filter-dialog/themes/solar/defaults.less +3 -0
- package/lib/filter-dialog/themes/solar/filter-dialog.less +5 -0
- package/lib/filter-dialog/themes/solar/index.less +6 -0
- package/lib/filter-dialog/themes/solar/pearl/checkbox-list.js +4 -0
- package/lib/filter-dialog/themes/solar/pearl/css/native-elements.css +0 -0
- package/lib/filter-dialog/themes/solar/pearl/es5/all-elements.js +4 -0
- package/lib/filter-dialog/themes/solar/pearl/filter-dialog.js +5 -0
- package/lib/filter-dialog/themes/solar/pearl/imports/all-elements.js +2 -0
- package/lib/filter-dialog/themes/solar/pearl/imports/custom-elements.js +2 -0
- package/lib/filter-dialog/themes/solar/pearl/imports/native-elements.js +0 -0
- package/lib/filter-dialog/themes/solar/pearl.js +11 -0
- package/lib/formatters/es6/CoralButtonFormatter.d.ts +22 -0
- package/lib/formatters/es6/CoralButtonFormatter.js +40 -0
- package/lib/formatters/es6/CoralCheckboxFormatter.d.ts +12 -0
- package/lib/formatters/es6/CoralCheckboxFormatter.js +45 -0
- package/lib/formatters/es6/CoralComboBoxFormatter.d.ts +23 -0
- package/lib/formatters/es6/CoralComboBoxFormatter.js +102 -0
- package/lib/formatters/es6/CoralIconFormatter.d.ts +23 -0
- package/lib/formatters/es6/CoralIconFormatter.js +45 -0
- package/lib/formatters/es6/CoralInputFormatter.d.ts +12 -0
- package/lib/formatters/es6/CoralInputFormatter.js +40 -0
- package/lib/formatters/es6/CoralRadioButtonFormatter.d.ts +22 -0
- package/lib/formatters/es6/CoralRadioButtonFormatter.js +80 -0
- package/lib/formatters/es6/CoralSelectFormatter.d.ts +23 -0
- package/lib/formatters/es6/CoralSelectFormatter.js +66 -0
- package/lib/formatters/es6/CoralToggleFormatter.d.ts +12 -0
- package/lib/formatters/es6/CoralToggleFormatter.js +47 -0
- package/lib/formatters/es6/DuplexEmeraldDateTimePickerFormatter.d.ts +14 -0
- package/lib/formatters/es6/DuplexEmeraldDateTimePickerFormatter.js +119 -0
- package/lib/formatters/es6/EFButtonFormatter.d.ts +22 -0
- package/lib/formatters/es6/EFButtonFormatter.js +40 -0
- package/lib/formatters/es6/EFCheckboxFormatter.d.ts +12 -0
- package/lib/formatters/es6/EFCheckboxFormatter.js +45 -0
- package/lib/formatters/es6/EFComboBoxFormatter.d.ts +23 -0
- package/lib/formatters/es6/EFComboBoxFormatter.js +68 -0
- package/lib/formatters/es6/EFDateTimePickerFormatter.d.ts +13 -0
- package/lib/formatters/es6/EFDateTimePickerFormatter.js +55 -0
- package/lib/formatters/es6/EFIconFormatter.d.ts +23 -0
- package/lib/formatters/es6/EFIconFormatter.js +45 -0
- package/lib/formatters/es6/EFNumberFieldFormatter.d.ts +12 -0
- package/lib/formatters/es6/EFNumberFieldFormatter.js +40 -0
- package/lib/formatters/es6/EFRadioButtonFormatter.d.ts +22 -0
- package/lib/formatters/es6/EFRadioButtonFormatter.js +80 -0
- package/lib/formatters/es6/EFSelectFormatter.d.ts +23 -0
- package/lib/formatters/es6/EFSelectFormatter.js +66 -0
- package/lib/formatters/es6/EFTextFieldFormatter.d.ts +12 -0
- package/lib/formatters/es6/EFTextFieldFormatter.js +40 -0
- package/lib/formatters/es6/EFToggleFormatter.d.ts +12 -0
- package/lib/formatters/es6/EFToggleFormatter.js +47 -0
- package/lib/formatters/es6/EmeraldDateTimePickerFormatter.d.ts +13 -0
- package/lib/formatters/es6/EmeraldDateTimePickerFormatter.js +55 -0
- package/lib/formatters/es6/FormatterBuilder.d.ts +22 -0
- package/lib/formatters/es6/FormatterBuilder.js +334 -0
- package/lib/formatters/es6/NumericInputFormatter.d.ts +13 -0
- package/lib/formatters/es6/NumericInputFormatter.js +64 -0
- package/lib/formatters/es6/PercentBarFormatter.d.ts +25 -0
- package/lib/formatters/es6/PercentBarFormatter.js +62 -0
- package/lib/formatters/es6/SimpleImageFormatter.d.ts +21 -0
- package/lib/formatters/es6/SimpleImageFormatter.js +64 -0
- package/lib/formatters/es6/SimpleInputFormatter.d.ts +12 -0
- package/lib/formatters/es6/SimpleInputFormatter.js +40 -0
- package/lib/formatters/es6/SimpleLinkFormatter.d.ts +21 -0
- package/lib/formatters/es6/SimpleLinkFormatter.js +48 -0
- package/lib/formatters/es6/SimpleTickerFormatter.d.ts +25 -0
- package/lib/formatters/es6/SimpleTickerFormatter.js +65 -0
- package/lib/formatters/es6/SimpleToggleFormatter.d.ts +22 -0
- package/lib/formatters/es6/SimpleToggleFormatter.js +132 -0
- package/lib/formatters/es6/TextFormatter.d.ts +12 -0
- package/lib/formatters/es6/TextFormatter.js +30 -0
- package/lib/formatters/es6/index.d.ts +43 -0
- package/lib/formatters/es6/index.js +67 -0
- package/lib/grid/index.d.ts +1 -0
- package/lib/grid/index.js +2 -0
- package/lib/grid/lib/efx-grid.d.ts +32 -0
- package/lib/grid/lib/efx-grid.js +469 -0
- package/lib/grid/themes/base.less +134 -0
- package/lib/grid/themes/halo/dark/css/native-elements.css +0 -0
- package/lib/grid/themes/halo/dark/efx-grid.js +4 -0
- package/lib/grid/themes/halo/dark/es5/all-elements.js +2 -0
- package/lib/grid/themes/halo/dark/imports/all-elements.js +1 -0
- package/lib/grid/themes/halo/dark/imports/custom-elements.js +1 -0
- package/lib/grid/themes/halo/dark/imports/native-elements.js +0 -0
- package/lib/grid/themes/halo/dark.js +3 -0
- package/lib/grid/themes/halo/efx-grid.less +92 -0
- package/lib/grid/themes/halo/index.less +3 -0
- package/lib/grid/themes/halo/light/css/native-elements.css +0 -0
- package/lib/grid/themes/halo/light/efx-grid.js +4 -0
- package/lib/grid/themes/halo/light/es5/all-elements.js +2 -0
- package/lib/grid/themes/halo/light/imports/all-elements.js +1 -0
- package/lib/grid/themes/halo/light/imports/custom-elements.js +1 -0
- package/lib/grid/themes/halo/light/imports/native-elements.js +0 -0
- package/lib/grid/themes/halo/light.js +3 -0
- package/lib/grid/themes/solar/charcoal/css/native-elements.css +0 -0
- package/lib/grid/themes/solar/charcoal/efx-grid.js +4 -0
- package/lib/grid/themes/solar/charcoal/es5/all-elements.js +2 -0
- package/lib/grid/themes/solar/charcoal/imports/all-elements.js +1 -0
- package/lib/grid/themes/solar/charcoal/imports/custom-elements.js +1 -0
- package/lib/grid/themes/solar/charcoal/imports/native-elements.js +0 -0
- package/lib/grid/themes/solar/charcoal.js +3 -0
- package/lib/grid/themes/solar/efx-grid.less +27 -0
- package/lib/grid/themes/solar/index.less +3 -0
- package/lib/grid/themes/solar/pearl/css/native-elements.css +0 -0
- package/lib/grid/themes/solar/pearl/efx-grid.js +4 -0
- package/lib/grid/themes/solar/pearl/es5/all-elements.js +2 -0
- package/lib/grid/themes/solar/pearl/imports/all-elements.js +1 -0
- package/lib/grid/themes/solar/pearl/imports/custom-elements.js +1 -0
- package/lib/grid/themes/solar/pearl/imports/native-elements.js +0 -0
- package/lib/grid/themes/solar/pearl.js +3 -0
- package/lib/index.d.ts +102 -0
- package/lib/index.js +102 -0
- package/lib/row-segmenting/es6/RowSegmenting.d.ts +83 -0
- package/lib/row-segmenting/es6/RowSegmenting.js +592 -0
- package/lib/row-segmenting/es6/index.d.ts +1 -0
- package/lib/row-segmenting/es6/index.js +1 -0
- package/lib/rt-grid/dist/rt-grid.js +44672 -0
- package/lib/rt-grid/dist/rt-grid.min.js +1 -0
- package/lib/rt-grid/es6/ColumnDefinition.d.ts +141 -0
- package/lib/rt-grid/es6/ColumnDefinition.js +1074 -0
- package/lib/rt-grid/es6/DataConnector.d.ts +37 -0
- package/lib/rt-grid/es6/DataConnector.js +266 -0
- package/lib/rt-grid/es6/FieldDefinition.d.ts +20 -0
- package/lib/rt-grid/es6/FieldDefinition.js +418 -0
- package/lib/rt-grid/es6/Grid.d.ts +261 -0
- package/lib/rt-grid/es6/Grid.js +2893 -0
- package/lib/rt-grid/es6/PredefinedFormula.d.ts +16 -0
- package/lib/rt-grid/es6/PredefinedFormula.js +33 -0
- package/lib/rt-grid/es6/ReferenceCounter.d.ts +38 -0
- package/lib/rt-grid/es6/ReferenceCounter.js +230 -0
- package/lib/rt-grid/es6/RowDefinition.d.ts +120 -0
- package/lib/rt-grid/es6/RowDefinition.js +873 -0
- package/lib/rt-grid/es6/SnapshotFiller.d.ts +21 -0
- package/lib/rt-grid/es6/SnapshotFiller.js +252 -0
- package/lib/rt-grid/es6/StyleLoader.d.ts +17 -0
- package/lib/rt-grid/es6/StyleLoader.js +47 -0
- package/lib/rt-grid/es6/index.d.ts +8 -0
- package/lib/rt-grid/es6/index.js +43 -0
- package/lib/statistics-row/es6/StatisticsRow.d.ts +67 -0
- package/lib/statistics-row/es6/StatisticsRow.js +786 -0
- package/lib/statistics-row/es6/index.d.ts +1 -0
- package/lib/statistics-row/es6/index.js +1 -0
- package/lib/tr-grid-auto-tooltip/es6/AutoTooltip.d.ts +45 -0
- package/lib/tr-grid-auto-tooltip/es6/AutoTooltip.js +431 -0
- package/lib/tr-grid-auto-tooltip/es6/index.d.ts +1 -0
- package/lib/tr-grid-auto-tooltip/es6/index.js +1 -0
- package/lib/tr-grid-cell-selection/es6/CellSelection.d.ts +67 -0
- package/lib/tr-grid-cell-selection/es6/CellSelection.js +1777 -0
- package/lib/tr-grid-cell-selection/es6/index.d.ts +1 -0
- package/lib/tr-grid-cell-selection/es6/index.js +1 -0
- package/lib/tr-grid-checkbox/es6/Checkbox.d.ts +69 -0
- package/lib/tr-grid-checkbox/es6/Checkbox.js +1476 -0
- package/lib/tr-grid-checkbox/es6/index.d.ts +1 -0
- package/lib/tr-grid-checkbox/es6/index.js +1 -0
- package/lib/tr-grid-column-fitter/es6/ColumnFitter.d.ts +56 -0
- package/lib/tr-grid-column-fitter/es6/ColumnFitter.js +1000 -0
- package/lib/tr-grid-column-fitter/es6/index.d.ts +1 -0
- package/lib/tr-grid-column-fitter/es6/index.js +1 -0
- package/lib/tr-grid-column-formatting/es6/ColumnFormatting.d.ts +89 -0
- package/lib/tr-grid-column-formatting/es6/ColumnFormatting.js +615 -0
- package/lib/tr-grid-column-formatting/es6/index.d.ts +1 -0
- package/lib/tr-grid-column-formatting/es6/index.js +1 -0
- package/lib/tr-grid-column-grouping/es6/ColumnGrouping.d.ts +60 -0
- package/lib/tr-grid-column-grouping/es6/ColumnGrouping.js +913 -0
- package/lib/tr-grid-column-grouping/es6/index.d.ts +1 -0
- package/lib/tr-grid-column-grouping/es6/index.js +1 -0
- package/lib/tr-grid-column-resizing/es6/ColumnResizing.d.ts +68 -0
- package/lib/tr-grid-column-resizing/es6/ColumnResizing.js +1013 -0
- package/lib/tr-grid-column-resizing/es6/index.d.ts +1 -0
- package/lib/tr-grid-column-resizing/es6/index.js +1 -0
- package/lib/tr-grid-column-selection/es6/ColumnSelection.d.ts +70 -0
- package/lib/tr-grid-column-selection/es6/ColumnSelection.js +928 -0
- package/lib/tr-grid-column-selection/es6/index.d.ts +1 -0
- package/lib/tr-grid-column-selection/es6/index.js +1 -0
- package/lib/tr-grid-column-stack/es6/ColumnStack.d.ts +76 -0
- package/lib/tr-grid-column-stack/es6/ColumnStack.js +1227 -0
- package/lib/tr-grid-column-stack/es6/index.d.ts +1 -0
- package/lib/tr-grid-column-stack/es6/index.js +1 -0
- package/lib/tr-grid-conditional-coloring/es6/ConditionalColoring.d.ts +70 -0
- package/lib/tr-grid-conditional-coloring/es6/ConditionalColoring.js +947 -0
- package/lib/tr-grid-conditional-coloring/es6/index.d.ts +1 -0
- package/lib/tr-grid-conditional-coloring/es6/index.js +1 -0
- package/lib/tr-grid-content-wrap/es6/ContentWrap.d.ts +43 -0
- package/lib/tr-grid-content-wrap/es6/ContentWrap.js +478 -0
- package/lib/tr-grid-content-wrap/es6/index.d.ts +1 -0
- package/lib/tr-grid-content-wrap/es6/index.js +1 -0
- package/lib/tr-grid-contextmenu/es6/ContextMenu.d.ts +83 -0
- package/lib/tr-grid-contextmenu/es6/ContextMenu.js +471 -0
- package/lib/tr-grid-contextmenu/es6/MenuEventAPI.d.ts +22 -0
- package/lib/tr-grid-contextmenu/es6/MenuEventAPI.js +133 -0
- package/lib/tr-grid-contextmenu/es6/MenuItem.d.ts +39 -0
- package/lib/tr-grid-contextmenu/es6/MenuItem.js +245 -0
- package/lib/tr-grid-contextmenu/es6/PopupMenu.d.ts +29 -0
- package/lib/tr-grid-contextmenu/es6/PopupMenu.js +292 -0
- package/lib/tr-grid-contextmenu/es6/index.d.ts +1 -0
- package/lib/tr-grid-contextmenu/es6/index.js +1 -0
- package/lib/tr-grid-filter-input/es6/FilterInput.d.ts +57 -0
- package/lib/tr-grid-filter-input/es6/FilterInput.js +928 -0
- package/lib/tr-grid-filter-input/es6/index.d.ts +1 -0
- package/lib/tr-grid-filter-input/es6/index.js +1 -0
- package/lib/tr-grid-heat-map/es6/HeatMap.d.ts +44 -0
- package/lib/tr-grid-heat-map/es6/HeatMap.js +394 -0
- package/lib/tr-grid-heat-map/es6/index.d.ts +1 -0
- package/lib/tr-grid-heat-map/es6/index.js +1 -0
- package/lib/tr-grid-in-cell-editing/es6/InCellEditing.d.ts +129 -0
- package/lib/tr-grid-in-cell-editing/es6/InCellEditing.js +1977 -0
- package/lib/tr-grid-in-cell-editing/es6/index.d.ts +1 -0
- package/lib/tr-grid-in-cell-editing/es6/index.js +1 -0
- package/lib/tr-grid-pagination/es6/Pagination.d.ts +57 -0
- package/lib/tr-grid-pagination/es6/Pagination.js +427 -0
- package/lib/tr-grid-pagination/es6/index.d.ts +1 -0
- package/lib/tr-grid-pagination/es6/index.js +1 -0
- package/lib/tr-grid-percent-bar/es6/PercentBar.d.ts +60 -0
- package/lib/tr-grid-percent-bar/es6/PercentBar.js +801 -0
- package/lib/tr-grid-percent-bar/es6/index.d.ts +1 -0
- package/lib/tr-grid-percent-bar/es6/index.js +1 -0
- package/lib/tr-grid-printer/es6/CellWriter.d.ts +49 -0
- package/lib/tr-grid-printer/es6/CellWriter.js +226 -0
- package/lib/tr-grid-printer/es6/ColumnWriter.d.ts +12 -0
- package/lib/tr-grid-printer/es6/ColumnWriter.js +21 -0
- package/lib/tr-grid-printer/es6/GridPrinter.d.ts +32 -0
- package/lib/tr-grid-printer/es6/GridPrinter.js +761 -0
- package/lib/tr-grid-printer/es6/PrintTrait.d.ts +38 -0
- package/lib/tr-grid-printer/es6/PrintTrait.js +481 -0
- package/lib/tr-grid-printer/es6/SectionWriter.d.ts +54 -0
- package/lib/tr-grid-printer/es6/SectionWriter.js +205 -0
- package/lib/tr-grid-printer/es6/index.d.ts +1 -0
- package/lib/tr-grid-printer/es6/index.js +1 -0
- package/lib/tr-grid-range-bar/es6/RangeBar.d.ts +39 -0
- package/lib/tr-grid-range-bar/es6/RangeBar.js +353 -0
- package/lib/tr-grid-range-bar/es6/index.d.ts +1 -0
- package/lib/tr-grid-range-bar/es6/index.js +1 -0
- package/lib/tr-grid-row-dragging/es6/RowDragging.d.ts +53 -0
- package/lib/tr-grid-row-dragging/es6/RowDragging.js +794 -0
- package/lib/tr-grid-row-dragging/es6/index.d.ts +1 -0
- package/lib/tr-grid-row-dragging/es6/index.js +1 -0
- package/lib/tr-grid-row-filtering/es6/RowFiltering.d.ts +118 -0
- package/lib/tr-grid-row-filtering/es6/RowFiltering.js +1884 -0
- package/lib/tr-grid-row-filtering/es6/index.d.ts +1 -0
- package/lib/tr-grid-row-filtering/es6/index.js +1 -0
- package/lib/tr-grid-row-grouping/es6/RowGrouping.d.ts +109 -0
- package/lib/tr-grid-row-grouping/es6/RowGrouping.js +1541 -0
- package/lib/tr-grid-row-grouping/es6/index.d.ts +1 -0
- package/lib/tr-grid-row-grouping/es6/index.js +1 -0
- package/lib/tr-grid-row-selection/es6/RowSelection.d.ts +74 -0
- package/lib/tr-grid-row-selection/es6/RowSelection.js +1202 -0
- package/lib/tr-grid-row-selection/es6/index.d.ts +1 -0
- package/lib/tr-grid-row-selection/es6/index.js +1 -0
- package/lib/tr-grid-rowcoloring/es6/RowColoring.d.ts +60 -0
- package/lib/tr-grid-rowcoloring/es6/RowColoring.js +611 -0
- package/lib/tr-grid-rowcoloring/es6/index.d.ts +1 -0
- package/lib/tr-grid-rowcoloring/es6/index.js +1 -0
- package/lib/tr-grid-textformatting/es6/TextFormatting.d.ts +77 -0
- package/lib/tr-grid-textformatting/es6/TextFormatting.js +574 -0
- package/lib/tr-grid-textformatting/es6/index.d.ts +1 -0
- package/lib/tr-grid-textformatting/es6/index.js +1 -0
- package/lib/tr-grid-titlewrap/es6/TitleWrap.d.ts +29 -0
- package/lib/tr-grid-titlewrap/es6/TitleWrap.js +431 -0
- package/lib/tr-grid-titlewrap/es6/index.d.ts +1 -0
- package/lib/tr-grid-titlewrap/es6/index.js +1 -0
- package/lib/tr-grid-util/es6/CellPainter.d.ts +136 -0
- package/lib/tr-grid-util/es6/CellPainter.js +1128 -0
- package/lib/tr-grid-util/es6/Conflator.d.ts +34 -0
- package/lib/tr-grid-util/es6/Conflator.js +193 -0
- package/lib/tr-grid-util/es6/CoralItems.d.ts +10 -0
- package/lib/tr-grid-util/es6/CoralItems.js +42 -0
- package/lib/tr-grid-util/es6/DateTime.d.ts +57 -0
- package/lib/tr-grid-util/es6/DateTime.js +508 -0
- package/lib/tr-grid-util/es6/Deferred.d.ts +14 -0
- package/lib/tr-grid-util/es6/Deferred.js +98 -0
- package/lib/tr-grid-util/es6/Delay.d.ts +20 -0
- package/lib/tr-grid-util/es6/Delay.js +85 -0
- package/lib/tr-grid-util/es6/Dom.d.ts +32 -0
- package/lib/tr-grid-util/es6/Dom.js +346 -0
- package/lib/tr-grid-util/es6/ElementObserver.d.ts +10 -0
- package/lib/tr-grid-util/es6/ElementObserver.js +101 -0
- package/lib/tr-grid-util/es6/ElementWrapper.d.ts +23 -0
- package/lib/tr-grid-util/es6/ElementWrapper.js +83 -0
- package/lib/tr-grid-util/es6/ElfDate.d.ts +26 -0
- package/lib/tr-grid-util/es6/ElfDate.js +163 -0
- package/lib/tr-grid-util/es6/ElfUtil.d.ts +33 -0
- package/lib/tr-grid-util/es6/ElfUtil.js +458 -0
- package/lib/tr-grid-util/es6/EventDispatcher.d.ts +26 -0
- package/lib/tr-grid-util/es6/EventDispatcher.js +161 -0
- package/lib/tr-grid-util/es6/ExpanderIcon.d.ts +27 -0
- package/lib/tr-grid-util/es6/ExpanderIcon.js +169 -0
- package/lib/tr-grid-util/es6/Ext.d.ts +10 -0
- package/lib/tr-grid-util/es6/Ext.js +52 -0
- package/lib/tr-grid-util/es6/FieldFormatter.d.ts +55 -0
- package/lib/tr-grid-util/es6/FieldFormatter.js +432 -0
- package/lib/tr-grid-util/es6/FilterBuilder.d.ts +48 -0
- package/lib/tr-grid-util/es6/FilterBuilder.js +521 -0
- package/lib/tr-grid-util/es6/FilterOperators.d.ts +41 -0
- package/lib/tr-grid-util/es6/FilterOperators.js +181 -0
- package/lib/tr-grid-util/es6/GridPlugin.d.ts +72 -0
- package/lib/tr-grid-util/es6/GridPlugin.js +747 -0
- package/lib/tr-grid-util/es6/Icon.d.ts +14 -0
- package/lib/tr-grid-util/es6/Icon.js +61 -0
- package/lib/tr-grid-util/es6/MouseDownTrait.d.ts +42 -0
- package/lib/tr-grid-util/es6/MouseDownTrait.js +237 -0
- package/lib/tr-grid-util/es6/MultiTableManager.d.ts +32 -0
- package/lib/tr-grid-util/es6/MultiTableManager.js +506 -0
- package/lib/tr-grid-util/es6/NumberFormatter.d.ts +83 -0
- package/lib/tr-grid-util/es6/NumberFormatter.js +471 -0
- package/lib/tr-grid-util/es6/PercentBar.d.ts +71 -0
- package/lib/tr-grid-util/es6/PercentBar.js +600 -0
- package/lib/tr-grid-util/es6/Perf.d.ts +32 -0
- package/lib/tr-grid-util/es6/Perf.js +162 -0
- package/lib/tr-grid-util/es6/Popup.d.ts +84 -0
- package/lib/tr-grid-util/es6/Popup.js +818 -0
- package/lib/tr-grid-util/es6/RangeBar.d.ts +33 -0
- package/lib/tr-grid-util/es6/RangeBar.js +259 -0
- package/lib/tr-grid-util/es6/RequestQueue.d.ts +30 -0
- package/lib/tr-grid-util/es6/RequestQueue.js +239 -0
- package/lib/tr-grid-util/es6/RowPainter.d.ts +23 -0
- package/lib/tr-grid-util/es6/RowPainter.js +188 -0
- package/lib/tr-grid-util/es6/SubTable.d.ts +74 -0
- package/lib/tr-grid-util/es6/SubTable.js +558 -0
- package/lib/tr-grid-util/es6/Table.d.ts +125 -0
- package/lib/tr-grid-util/es6/Table.js +790 -0
- package/lib/tr-grid-util/es6/TextHighlighter.d.ts +18 -0
- package/lib/tr-grid-util/es6/TextHighlighter.js +273 -0
- package/lib/tr-grid-util/es6/TickCodes.d.ts +8 -0
- package/lib/tr-grid-util/es6/TickCodes.js +33 -0
- package/lib/tr-grid-util/es6/Timer.d.ts +16 -0
- package/lib/tr-grid-util/es6/Timer.js +49 -0
- package/lib/tr-grid-util/es6/TouchProxy.d.ts +46 -0
- package/lib/tr-grid-util/es6/TouchProxy.js +212 -0
- package/lib/tr-grid-util/es6/Util.d.ts +65 -0
- package/lib/tr-grid-util/es6/Util.js +528 -0
- package/lib/tr-grid-util/es6/formula/ADCService.d.ts +11 -0
- package/lib/tr-grid-util/es6/formula/ADCService.js +72 -0
- package/lib/tr-grid-util/es6/formula/ADCSubscription.d.ts +17 -0
- package/lib/tr-grid-util/es6/formula/ADCSubscription.js +317 -0
- package/lib/tr-grid-util/es6/formula/AdFinService.d.ts +12 -0
- package/lib/tr-grid-util/es6/formula/AdFinService.js +61 -0
- package/lib/tr-grid-util/es6/formula/AdFinSubscription.d.ts +19 -0
- package/lib/tr-grid-util/es6/formula/AdFinSubscription.js +310 -0
- package/lib/tr-grid-util/es6/formula/Engine.d.ts +56 -0
- package/lib/tr-grid-util/es6/formula/Engine.js +592 -0
- package/lib/tr-grid-util/es6/formula/Formula.d.ts +68 -0
- package/lib/tr-grid-util/es6/formula/Formula.js +882 -0
- package/lib/tr-grid-util/es6/formula/IntervalSubscription.d.ts +16 -0
- package/lib/tr-grid-util/es6/formula/IntervalSubscription.js +165 -0
- package/lib/tr-grid-util/es6/formula/Realtime.d.ts +18 -0
- package/lib/tr-grid-util/es6/formula/Realtime.js +279 -0
- package/lib/tr-grid-util/es6/formula/RealtimeService.d.ts +18 -0
- package/lib/tr-grid-util/es6/formula/RealtimeService.js +203 -0
- package/lib/tr-grid-util/es6/formula/TSIService.d.ts +11 -0
- package/lib/tr-grid-util/es6/formula/TSIService.js +51 -0
- package/lib/tr-grid-util/es6/formula/TSISubscription.d.ts +18 -0
- package/lib/tr-grid-util/es6/formula/TSISubscription.js +1015 -0
- package/lib/tr-grid-util/es6/formula/VariableToken.d.ts +30 -0
- package/lib/tr-grid-util/es6/formula/VariableToken.js +314 -0
- package/lib/tr-grid-util/es6/formula/functions/AdFin.d.ts +9 -0
- package/lib/tr-grid-util/es6/formula/functions/AdFin.js +1778 -0
- package/lib/tr-grid-util/es6/formula/functions/Excel.d.ts +8 -0
- package/lib/tr-grid-util/es6/formula/functions/Excel.js +21 -0
- package/lib/tr-grid-util/es6/formula/functions/Info.d.ts +8 -0
- package/lib/tr-grid-util/es6/formula/functions/Info.js +192 -0
- package/lib/tr-grid-util/es6/formula/functions/Internal.d.ts +8 -0
- package/lib/tr-grid-util/es6/formula/functions/Internal.js +90 -0
- package/lib/tr-grid-util/es6/formula/functions/Logic.d.ts +12 -0
- package/lib/tr-grid-util/es6/formula/functions/Logic.js +176 -0
- package/lib/tr-grid-util/es6/formula/functions/Math.d.ts +18 -0
- package/lib/tr-grid-util/es6/formula/functions/Math.js +1624 -0
- package/lib/tr-grid-util/es6/formula/functions/Statistics.d.ts +18 -0
- package/lib/tr-grid-util/es6/formula/functions/Statistics.js +234 -0
- package/lib/tr-grid-util/es6/formula/functions/Text.d.ts +10 -0
- package/lib/tr-grid-util/es6/formula/functions/Text.js +676 -0
- package/lib/tr-grid-util/es6/index.d.ts +63 -0
- package/lib/tr-grid-util/es6/index.js +99 -0
- package/lib/tr-grid-util/es6/jet/CollectionDict.d.ts +28 -0
- package/lib/tr-grid-util/es6/jet/CollectionDict.js +141 -0
- package/lib/tr-grid-util/es6/jet/DataGenerator.d.ts +114 -0
- package/lib/tr-grid-util/es6/jet/DataGenerator.js +827 -0
- package/lib/tr-grid-util/es6/jet/DataSet.d.ts +8 -0
- package/lib/tr-grid-util/es6/jet/DataSet.js +392 -0
- package/lib/tr-grid-util/es6/jet/MockArchive.d.ts +21 -0
- package/lib/tr-grid-util/es6/jet/MockArchive.js +56 -0
- package/lib/tr-grid-util/es6/jet/MockJET.d.ts +25 -0
- package/lib/tr-grid-util/es6/jet/MockJET.js +63 -0
- package/lib/tr-grid-util/es6/jet/MockQuotes.d.ts +37 -0
- package/lib/tr-grid-util/es6/jet/MockQuotes.js +199 -0
- package/lib/tr-grid-util/es6/jet/MockQuotes2.d.ts +72 -0
- package/lib/tr-grid-util/es6/jet/MockQuotes2.js +564 -0
- package/lib/tr-grid-util/es6/jet/MockRTK.d.ts +8 -0
- package/lib/tr-grid-util/es6/jet/MockRTK.js +43 -0
- package/lib/tr-grid-util/es6/jet/index.d.ts +9 -0
- package/lib/tr-grid-util/es6/jet/index.js +18 -0
- package/lib/tr-grid-util/es6/jet/mockDataAPI.d.ts +11 -0
- package/lib/tr-grid-util/es6/jet/mockDataAPI.js +131 -0
- package/lib/tr-grid-util/es6/locale/translation-de.d.ts +7 -0
- package/lib/tr-grid-util/es6/locale/translation-de.js +51 -0
- package/lib/tr-grid-util/es6/locale/translation-en.d.ts +7 -0
- package/lib/tr-grid-util/es6/locale/translation-en.js +51 -0
- package/lib/tr-grid-util/es6/locale/translation-ja.d.ts +7 -0
- package/lib/tr-grid-util/es6/locale/translation-ja.js +51 -0
- package/lib/tr-grid-util/es6/locale/translation-zh-hant.d.ts +7 -0
- package/lib/tr-grid-util/es6/locale/translation-zh-hant.js +51 -0
- package/lib/tr-grid-util/es6/locale/translation-zh.d.ts +7 -0
- package/lib/tr-grid-util/es6/locale/translation-zh.js +51 -0
- package/lib/tr-grid-util/es6/locale/translation.d.ts +11 -0
- package/lib/tr-grid-util/es6/locale/translation.js +18 -0
- package/lib/types/es6/AutoTooltip.d.ts +45 -0
- package/lib/types/es6/CellSelection.d.ts +67 -0
- package/lib/types/es6/Checkbox.d.ts +69 -0
- package/lib/types/es6/ColumnFitter.d.ts +56 -0
- package/lib/types/es6/ColumnFormatting.d.ts +90 -0
- package/lib/types/es6/ColumnGrouping.d.ts +60 -0
- package/lib/types/es6/ColumnResizing.d.ts +68 -0
- package/lib/types/es6/ColumnSelection.d.ts +70 -0
- package/lib/types/es6/ColumnStack.d.ts +76 -0
- package/lib/types/es6/CompositeGrid/CollapsibleHeaderPlugin.d.ts +11 -0
- package/lib/types/es6/CompositeGrid/ColumnSelectionPlugin.d.ts +38 -0
- package/lib/types/es6/CompositeGrid/ColumnWidthAdjustingPlugin.d.ts +45 -0
- package/lib/types/es6/CompositeGrid/CompositeGrid.d.ts +287 -0
- package/lib/types/es6/CompositeGrid/DragAndDropTitlePlugin.d.ts +22 -0
- package/lib/types/es6/CompositeGrid/DraggableContentPlugin.d.ts +44 -0
- package/lib/types/es6/CompositeGrid/ResizableTitlePlugin.d.ts +30 -0
- package/lib/types/es6/CompositeGrid/RowSelectionPlugin.d.ts +42 -0
- package/lib/types/es6/CompositeGrid/TextWidthCalculator.d.ts +24 -0
- package/lib/types/es6/CompositeGrid/TreeIndentingPlugin.d.ts +46 -0
- package/lib/types/es6/CompositeGrid/index.d.ts +9 -0
- package/lib/types/es6/ConditionalColoring.d.ts +70 -0
- package/lib/types/es6/ContentWrap.d.ts +43 -0
- package/lib/types/es6/ContextMenu.d.ts +83 -0
- package/lib/types/es6/CoralButtonFormatter.d.ts +22 -0
- package/lib/types/es6/CoralCheckboxFormatter.d.ts +12 -0
- package/lib/types/es6/CoralComboBoxFormatter.d.ts +23 -0
- package/lib/types/es6/CoralIconFormatter.d.ts +23 -0
- package/lib/types/es6/CoralInputFormatter.d.ts +12 -0
- package/lib/types/es6/CoralRadioButtonFormatter.d.ts +22 -0
- package/lib/types/es6/CoralSelectFormatter.d.ts +23 -0
- package/lib/types/es6/CoralToggleFormatter.d.ts +12 -0
- package/lib/types/es6/Core/data/ColumnStats.d.ts +42 -0
- package/lib/types/es6/Core/data/DataCache.d.ts +81 -0
- package/lib/types/es6/Core/data/DataTable.d.ts +125 -0
- package/lib/types/es6/Core/data/DataView.d.ts +280 -0
- package/lib/types/es6/Core/data/Segment.d.ts +38 -0
- package/lib/types/es6/Core/data/SegmentCollection.d.ts +58 -0
- package/lib/types/es6/Core/grid/Core.d.ts +387 -0
- package/lib/types/es6/Core/grid/ILayoutGrid.d.ts +204 -0
- package/lib/types/es6/Core/grid/LayoutGrid.d.ts +23 -0
- package/lib/types/es6/Core/grid/VirtualizedLayoutGrid.d.ts +18 -0
- package/lib/types/es6/Core/grid/components/Cell.d.ts +50 -0
- package/lib/types/es6/Core/grid/components/CellFloatingPanel.d.ts +19 -0
- package/lib/types/es6/Core/grid/components/CellSpan.d.ts +18 -0
- package/lib/types/es6/Core/grid/components/CellSpans.d.ts +38 -0
- package/lib/types/es6/Core/grid/components/Column.d.ts +22 -0
- package/lib/types/es6/Core/grid/components/ElementWrapper.d.ts +125 -0
- package/lib/types/es6/Core/grid/components/HScrollbar.d.ts +24 -0
- package/lib/types/es6/Core/grid/components/Scrollbar.d.ts +61 -0
- package/lib/types/es6/Core/grid/components/StretchedCells.d.ts +17 -0
- package/lib/types/es6/Core/grid/components/VScrollbar.d.ts +18 -0
- package/lib/types/es6/Core/grid/components/VirtualItems.d.ts +12 -0
- package/lib/types/es6/Core/grid/event/EventDispatcher.d.ts +16 -0
- package/lib/types/es6/Core/grid/event/EventListeners.d.ts +34 -0
- package/lib/types/es6/Core/grid/plugins/DragAndDropTitlePlugin.d.ts +24 -0
- package/lib/types/es6/Core/grid/plugins/Plugin.d.ts +28 -0
- package/lib/types/es6/Core/grid/plugins/SortableTitlePlugin.d.ts +127 -0
- package/lib/types/es6/Core/grid/util/Conflator.d.ts +32 -0
- package/lib/types/es6/Core/grid/util/ElementFrameWork.d.ts +18 -0
- package/lib/types/es6/Core/grid/util/HttpRequest.d.ts +53 -0
- package/lib/types/es6/Core/grid/util/PercentBar.d.ts +43 -0
- package/lib/types/es6/Core/grid/util/PercentBarRenderer.d.ts +41 -0
- package/lib/types/es6/Core/grid/util/RangeBar.d.ts +25 -0
- package/lib/types/es6/Core/grid/util/Reverter.d.ts +14 -0
- package/lib/types/es6/Core/grid/util/SectionSettings.d.ts +79 -0
- package/lib/types/es6/Core/grid/util/SelectionList.d.ts +50 -0
- package/lib/types/es6/Core/grid/util/TrackLayout.d.ts +84 -0
- package/lib/types/es6/Core/grid/util/Virtualizer.d.ts +40 -0
- package/lib/types/es6/Core/grid/util/util.d.ts +18 -0
- package/lib/types/es6/Core/index.d.ts +84 -0
- package/lib/types/es6/Core/tr-grid-theme.d.ts +5 -0
- package/lib/types/es6/DuplexEmeraldDateTimePickerFormatter.d.ts +14 -0
- package/lib/types/es6/EFButtonFormatter.d.ts +22 -0
- package/lib/types/es6/EFCheckboxFormatter.d.ts +12 -0
- package/lib/types/es6/EFComboBoxFormatter.d.ts +23 -0
- package/lib/types/es6/EFDateTimePickerFormatter.d.ts +13 -0
- package/lib/types/es6/EFIconFormatter.d.ts +23 -0
- package/lib/types/es6/EFNumberFieldFormatter.d.ts +12 -0
- package/lib/types/es6/EFRadioButtonFormatter.d.ts +22 -0
- package/lib/types/es6/EFSelectFormatter.d.ts +23 -0
- package/lib/types/es6/EFTextFieldFormatter.d.ts +12 -0
- package/lib/types/es6/EFToggleFormatter.d.ts +12 -0
- package/lib/types/es6/EmeraldDateTimePickerFormatter.d.ts +13 -0
- package/lib/types/es6/ExtensionColumnOptions.d.ts +41 -0
- package/lib/types/es6/ExtensionOptions.d.ts +52 -0
- package/lib/types/es6/Extensions.d.ts +61 -0
- package/lib/types/es6/FilterInput.d.ts +57 -0
- package/lib/types/es6/FormatterBuilder.d.ts +22 -0
- package/lib/types/es6/GridFormatter.d.ts +63 -0
- package/lib/types/es6/HeatMap.d.ts +44 -0
- package/lib/types/es6/InCellEditing.d.ts +129 -0
- package/lib/types/es6/MenuEventAPI.d.ts +22 -0
- package/lib/types/es6/MenuItem.d.ts +39 -0
- package/lib/types/es6/NumericInputFormatter.d.ts +13 -0
- package/lib/types/es6/Pagination.d.ts +57 -0
- package/lib/types/es6/PercentBar.d.ts +60 -0
- package/lib/types/es6/PercentBarFormatter.d.ts +25 -0
- package/lib/types/es6/PopupMenu.d.ts +29 -0
- package/lib/types/es6/RangeBar.d.ts +39 -0
- package/lib/types/es6/RealtimeGrid/ColumnDefinition.d.ts +143 -0
- package/lib/types/es6/RealtimeGrid/DataConnector.d.ts +37 -0
- package/lib/types/es6/RealtimeGrid/FieldDefinition.d.ts +20 -0
- package/lib/types/es6/RealtimeGrid/Grid.d.ts +263 -0
- package/lib/types/es6/RealtimeGrid/PredefinedFormula.d.ts +16 -0
- package/lib/types/es6/RealtimeGrid/ReferenceCounter.d.ts +38 -0
- package/lib/types/es6/RealtimeGrid/RowDefinition.d.ts +120 -0
- package/lib/types/es6/RealtimeGrid/SnapshotFiller.d.ts +21 -0
- package/lib/types/es6/RealtimeGrid/StyleLoader.d.ts +17 -0
- package/lib/types/es6/RealtimeGrid/index.d.ts +8 -0
- package/lib/types/es6/RowColoring.d.ts +60 -0
- package/lib/types/es6/RowDragging.d.ts +53 -0
- package/lib/types/es6/RowFiltering.d.ts +118 -0
- package/lib/types/es6/RowGrouping.d.ts +109 -0
- package/lib/types/es6/RowSegmenting.d.ts +83 -0
- package/lib/types/es6/RowSelection.d.ts +74 -0
- package/lib/types/es6/SimpleImageFormatter.d.ts +21 -0
- package/lib/types/es6/SimpleInputFormatter.d.ts +12 -0
- package/lib/types/es6/SimpleLinkFormatter.d.ts +21 -0
- package/lib/types/es6/SimpleTickerFormatter.d.ts +25 -0
- package/lib/types/es6/SimpleToggleFormatter.d.ts +22 -0
- package/lib/types/es6/StatisticsRow.d.ts +67 -0
- package/lib/types/es6/TextFormatter.d.ts +12 -0
- package/lib/types/es6/TextFormatting.d.ts +77 -0
- package/lib/types/es6/TitleWrap.d.ts +29 -0
- package/lib/types/es6/Zoom.d.ts +51 -0
- package/lib/types/es6/index.d.ts +76 -0
- package/lib/types/index.d.ts +1 -0
- package/lib/versions.json +36 -0
- package/lib/window-exporter.js +13 -0
- package/lib/zoom/es6/Zoom.d.ts +51 -0
- package/lib/zoom/es6/Zoom.js +419 -0
- package/lib/zoom/es6/index.d.ts +1 -0
- package/lib/zoom/es6/index.js +1 -0
- package/package.json +42 -0
@@ -0,0 +1,1013 @@
|
|
1
|
+
import {Ext} from '../../tr-grid-util/es6/Ext.js';
|
2
|
+
import {GridPlugin} from '../../tr-grid-util/es6/GridPlugin.js';
|
3
|
+
import {Dom} from '../../tr-grid-util/es6/Dom.js';
|
4
|
+
import { injectCss, prettifyCss } from "../../tr-grid-util/es6/Util.js";
|
5
|
+
|
6
|
+
/** @typedef {Object} ColumnResizingPlugin~Options
|
7
|
+
* @description The options can be specified by `columnResizing` property of the main grid's options
|
8
|
+
* @property {boolean=} preserveProportion=false By setting this to true, it will try to preserve proportion of the resized column compared to other columns
|
9
|
+
* @property {boolean=} preserveGridSize=false By setting this to true, grid size will not change after double click to resize column
|
10
|
+
* @property {boolean=} noResizing=false If enabled, all columns cannot be dragged to resize (column can still be resized programmatically). This overrides column config.
|
11
|
+
* @property {Function=} columnResized=null Event handler
|
12
|
+
* @property {Function=} dblClicked=null Event handler
|
13
|
+
* @property {Function=} dragStart=null Event handler
|
14
|
+
* @property {Function=} dragEnd=null Event handler
|
15
|
+
*/
|
16
|
+
|
17
|
+
/** @typedef {Object} ColumnResizingPlugin~ColumnOptions
|
18
|
+
* @description The column options can be specified on each individual grid's column option:
|
19
|
+
* @property {boolean=} noResizing=false If enabled, it will disable an ability to drag and resize the column
|
20
|
+
* @property {number=} defaultWidth Specified default width used when user double clicks the column edge
|
21
|
+
*/
|
22
|
+
|
23
|
+
/** @event ColumnResizingPlugin#columnResized
|
24
|
+
* @description Fired when dragging column edge has ended and the column width has changed
|
25
|
+
* @property {number} colIndex
|
26
|
+
* @property {number} width
|
27
|
+
* @property {Array.<number>} colIndices
|
28
|
+
* @property {boolean=} scalability
|
29
|
+
*/
|
30
|
+
/** @event ColumnResizingPlugin#dblClicked
|
31
|
+
* @description Fired when column edge has been double clicked
|
32
|
+
* @property {number} colIndex
|
33
|
+
*/
|
34
|
+
/** @event ColumnResizingPlugin#dragStart */
|
35
|
+
/** @event ColumnResizingPlugin#dragEnd */
|
36
|
+
|
37
|
+
|
38
|
+
/** @constructor
|
39
|
+
* @extends {GridPlugin}
|
40
|
+
* @param {ColumnResizingPlugin~Options=} options
|
41
|
+
*/
|
42
|
+
var ColumnResizingPlugin = function (options) {
|
43
|
+
var t = this;
|
44
|
+
t._onPreSectionRender = t._onPreSectionRender.bind(t);
|
45
|
+
t._requestResizerUpdate = t._requestResizerUpdate.bind(t);
|
46
|
+
t._updateResizers = t._updateResizers.bind(t);
|
47
|
+
t._onTimer = t._onTimer.bind(t);
|
48
|
+
t._onColumnAdded = t._onColumnAdded.bind(t);
|
49
|
+
|
50
|
+
t._onDrag = t._onDrag.bind(t);
|
51
|
+
t._onDragEnd = t._onDragEnd.bind(t);
|
52
|
+
t._onDragStart = t._onDragStart.bind(t);
|
53
|
+
t._onDblClick = t._onDblClick.bind(t);
|
54
|
+
t._updateHandlebar = t._updateHandlebar.bind(t);
|
55
|
+
|
56
|
+
t._hosts = [];
|
57
|
+
t._guideline = Dom.create("svg", "tr-guideline");
|
58
|
+
|
59
|
+
if(options) {
|
60
|
+
t.config({"columnResizing": options});
|
61
|
+
}
|
62
|
+
};
|
63
|
+
Ext.inherits(ColumnResizingPlugin, GridPlugin);
|
64
|
+
|
65
|
+
/** @type {string}
|
66
|
+
* @private
|
67
|
+
*/
|
68
|
+
ColumnResizingPlugin._styles = prettifyCss([
|
69
|
+
".tr-pipe-resizer .resizer", [
|
70
|
+
"display: none;"
|
71
|
+
],
|
72
|
+
".tr-pipe-resizer .selected-column .resizer", [
|
73
|
+
"display: block;",
|
74
|
+
"width: 16px;",
|
75
|
+
"right: 0;",
|
76
|
+
"box-sizing: border-box;",
|
77
|
+
"padding-left: 4px;",
|
78
|
+
"text-align: center;"
|
79
|
+
],
|
80
|
+
".tr-pipe-resizer .selected-column.last .resizer", [
|
81
|
+
"right: 0;"
|
82
|
+
],
|
83
|
+
".tr-pipe-resizer .selected-column .floating-panel", [
|
84
|
+
"display: none;"
|
85
|
+
],
|
86
|
+
".tr-pipe-resizer .selected-column .resizer:before, .tr-pipe-resizer .selected-column .resizer:after", [
|
87
|
+
"content: \"\";",
|
88
|
+
"display: inline-block;",
|
89
|
+
"vertical-align: middle;"
|
90
|
+
],
|
91
|
+
".tr-pipe-resizer .selected-column .resizer:before", [
|
92
|
+
"border-left: 1px solid #ff9933;",
|
93
|
+
"border-right: 1px solid #ff9933;",
|
94
|
+
"width: 2px;",
|
95
|
+
"height: 45%;"
|
96
|
+
],
|
97
|
+
".tr-pipe-resizer .selected-column .resizer:after", [ //Used for vertical alignment
|
98
|
+
"width: 0;", /* Possibly unnecessary */
|
99
|
+
"height: 100%;"
|
100
|
+
],
|
101
|
+
"body:not(.tr-dragging) .tr-pipe-resizer .selected-column>.cell", [
|
102
|
+
"border-right-width: 2px;",
|
103
|
+
"border-right-style: solid;"
|
104
|
+
],
|
105
|
+
".tr-pipe-resizer .selected-column>.cell", [
|
106
|
+
"border-right-color: #ff9933;"
|
107
|
+
],
|
108
|
+
".pearl .tr-pipe-resizer .selected-column .resizer:before, [theme=\"pearl\"] .tr-pipe-resizer .selected-column .resizer:before", [
|
109
|
+
"border-left-color: #ee7600;",
|
110
|
+
"border-right-color: #ee7600;"
|
111
|
+
],
|
112
|
+
".pearl .tr-pipe-resizer .selected-column>.cell [theme=\"pearl\"] .tr-pipe-resizer .selected-column>.cell", [
|
113
|
+
"border-right-color: #ee7600;"
|
114
|
+
],
|
115
|
+
".tr-handlebar", [
|
116
|
+
"position: absolute;",
|
117
|
+
"box-sizing: border-box;",
|
118
|
+
"cursor: e-resize;",
|
119
|
+
"width: 10px;",
|
120
|
+
"margin-left: -4px;",
|
121
|
+
"border-radius: 5px;",
|
122
|
+
"height: 32px;",
|
123
|
+
"top: calc(50% - 16px);",
|
124
|
+
"box-sizing: border-box;",
|
125
|
+
"text-align: center;",
|
126
|
+
"background-color: #ff9933;",
|
127
|
+
"pointer-events: all;"
|
128
|
+
],
|
129
|
+
".tr-dragging .tr-handlebar", [
|
130
|
+
"pointer-events: none;"
|
131
|
+
],
|
132
|
+
".tr-hb-guideline.tr-guideline", [
|
133
|
+
"width: 2px;",
|
134
|
+
"height: 100%;"
|
135
|
+
],
|
136
|
+
".tr-handlebar:before, .tr-handlebar:after", [
|
137
|
+
"content: \"\";",
|
138
|
+
"display: inline-block;",
|
139
|
+
"vertical-align: middle;"
|
140
|
+
],
|
141
|
+
".tr-handlebar:before", [
|
142
|
+
"border-left: 1px solid #000;",
|
143
|
+
"border-right: 1px solid #000;",
|
144
|
+
"width: 2px;", "height: 55%;"
|
145
|
+
],
|
146
|
+
".tr-handlebar:after", [ //Used for vertical alignment
|
147
|
+
"width: 0;", /* Possibly unnecessary */
|
148
|
+
"height: 100%;"
|
149
|
+
]
|
150
|
+
]);
|
151
|
+
/** @private
|
152
|
+
* @param {Object} grid core grid object
|
153
|
+
*/
|
154
|
+
ColumnResizingPlugin._applyStyles = function(grid) {
|
155
|
+
if(grid && !grid._columnResizingStyles) { // TODO: Support run-time theme loading
|
156
|
+
grid._columnResizingStyles = true; // Prevent loading the same style twice
|
157
|
+
injectCss(ColumnResizingPlugin._styles, grid.getElement());
|
158
|
+
}
|
159
|
+
};
|
160
|
+
|
161
|
+
/** @type {number}
|
162
|
+
* @private
|
163
|
+
*/
|
164
|
+
ColumnResizingPlugin.prototype._anchorX = 0; // in pixel
|
165
|
+
/** @type {number}
|
166
|
+
* @private
|
167
|
+
*/
|
168
|
+
ColumnResizingPlugin.prototype._guideX = 0; // in pixel
|
169
|
+
/** @type {number}
|
170
|
+
* @private
|
171
|
+
*/
|
172
|
+
ColumnResizingPlugin.prototype._diffX = 0; // in pixel
|
173
|
+
/** @type {number}
|
174
|
+
* @private
|
175
|
+
*/
|
176
|
+
ColumnResizingPlugin.prototype._dragIndex = -1;
|
177
|
+
/** Core grid object
|
178
|
+
* @type {Object}
|
179
|
+
* @private
|
180
|
+
*/
|
181
|
+
ColumnResizingPlugin.prototype._draggedGrid = null;
|
182
|
+
/** @type {boolean}
|
183
|
+
* @private
|
184
|
+
*/
|
185
|
+
ColumnResizingPlugin.prototype._keepProportion = false;
|
186
|
+
/** @type {boolean}
|
187
|
+
* @private
|
188
|
+
*/
|
189
|
+
ColumnResizingPlugin.prototype._keepGridSize = false;
|
190
|
+
/** @type {boolean}
|
191
|
+
* @private
|
192
|
+
*/
|
193
|
+
ColumnResizingPlugin.prototype._pipe = false;
|
194
|
+
/** @type {boolean}
|
195
|
+
* @private
|
196
|
+
*/
|
197
|
+
ColumnResizingPlugin.prototype._hbMode = false;
|
198
|
+
/** @type {Element}
|
199
|
+
* @private
|
200
|
+
*/
|
201
|
+
ColumnResizingPlugin.prototype._handlebar = null;
|
202
|
+
/** @type {Element}
|
203
|
+
* @private
|
204
|
+
*/
|
205
|
+
ColumnResizingPlugin.prototype._guideline;
|
206
|
+
/** @type {number}
|
207
|
+
* @private
|
208
|
+
*/
|
209
|
+
ColumnResizingPlugin.prototype._updateTimer = 0;
|
210
|
+
/** @type {Element}
|
211
|
+
* @private
|
212
|
+
*/
|
213
|
+
ColumnResizingPlugin.prototype._activeResizer = null;
|
214
|
+
/** @type {Element}
|
215
|
+
* @private
|
216
|
+
*/
|
217
|
+
ColumnResizingPlugin.prototype._disabled = false;
|
218
|
+
|
219
|
+
/** @public
|
220
|
+
* @return {string}
|
221
|
+
*/
|
222
|
+
ColumnResizingPlugin.prototype.getName = function () {
|
223
|
+
return "ColumnResizingPlugin"; // Read Only
|
224
|
+
};
|
225
|
+
/** Remove redundant built-in feature
|
226
|
+
* @public
|
227
|
+
* @param {string} optionName
|
228
|
+
* @param {*} optionVal
|
229
|
+
* @return {*} The transformed value of the option
|
230
|
+
*/
|
231
|
+
ColumnResizingPlugin.prototype.beforeProcessOption = function (optionName, optionVal) {
|
232
|
+
if (optionName == "columnResizability") {
|
233
|
+
return false; // eslint-disable-line
|
234
|
+
}
|
235
|
+
return; // eslint-disable-line
|
236
|
+
};
|
237
|
+
/** Plugin that has multi-table support means that it can have multiple hosts/tables and share its states across those hosts/tables.
|
238
|
+
* @public
|
239
|
+
* @return {boolean}
|
240
|
+
*/
|
241
|
+
ColumnResizingPlugin.prototype.hasMultiTableSupport = function () {
|
242
|
+
return true;
|
243
|
+
};
|
244
|
+
/** @public
|
245
|
+
* @param {Object} host core grid object
|
246
|
+
* @param {Object=} options
|
247
|
+
*/
|
248
|
+
ColumnResizingPlugin.prototype.initialize = function (host, options) {
|
249
|
+
if(this._hosts.indexOf(host) >= 0) { return; }
|
250
|
+
this._hosts.push(host);
|
251
|
+
|
252
|
+
if (this._hosts.length === 1) {
|
253
|
+
host.listen("columnMoved", this._requestResizerUpdate);
|
254
|
+
host.listen("columnRemoved", this._requestResizerUpdate);
|
255
|
+
host.listen("columnAdded", this._requestResizerUpdate);
|
256
|
+
host.listen("columnAdded", this._onColumnAdded);
|
257
|
+
}
|
258
|
+
|
259
|
+
host.listen("preSectionRender", this._onPreSectionRender);
|
260
|
+
this.config(options);
|
261
|
+
ColumnResizingPlugin._applyStyles(host);
|
262
|
+
this._updateResizerCount(host);
|
263
|
+
this._updateResizeHitBoxPosition(host);
|
264
|
+
};
|
265
|
+
/** @public
|
266
|
+
* @param {Object} host core grid object
|
267
|
+
*/
|
268
|
+
ColumnResizingPlugin.prototype.unload = function (host) {
|
269
|
+
var at = this._hosts.indexOf(host);
|
270
|
+
if(at < 0) { return; }
|
271
|
+
|
272
|
+
this._hosts.splice(at, 1);
|
273
|
+
host.unlisten("columnMoved", this._requestResizerUpdate);
|
274
|
+
host.unlisten("columnRemoved", this._requestResizerUpdate);
|
275
|
+
host.unlisten("columnAdded", this._requestResizerUpdate);
|
276
|
+
host.unlisten("columnAdded", this._onColumnAdded);
|
277
|
+
host.unlisten("preSectionRender", this._onPreSectionRender);
|
278
|
+
|
279
|
+
if(this._updateTimer) {
|
280
|
+
clearTimeout(this._updateTimer);
|
281
|
+
this._updateTimer = 0;
|
282
|
+
}
|
283
|
+
|
284
|
+
var titleSect = host.getSection("title");
|
285
|
+
if(titleSect) {
|
286
|
+
for(var c = host.getColumnCount(); --c >= 0;) {
|
287
|
+
var col = titleSect.getColumn(c);
|
288
|
+
if(col._resizers) {
|
289
|
+
var len = col._resizers.length;
|
290
|
+
for(var i = 0; i < len; ++i) {
|
291
|
+
var resizer = col._resizers[i];
|
292
|
+
if(resizer.dispose) {
|
293
|
+
resizer.dispose();
|
294
|
+
} else {
|
295
|
+
Dom.removeParent(resizer);
|
296
|
+
}
|
297
|
+
}
|
298
|
+
col._resizers = null;
|
299
|
+
}
|
300
|
+
}
|
301
|
+
}
|
302
|
+
|
303
|
+
if(!this._hosts.length) {
|
304
|
+
this._compositeGrid = null;
|
305
|
+
}
|
306
|
+
};
|
307
|
+
/** @public
|
308
|
+
* @param {Object=} options
|
309
|
+
*/
|
310
|
+
ColumnResizingPlugin.prototype.config = function (options) {
|
311
|
+
if(!options) { return; }
|
312
|
+
var host = this._hosts[this._hosts.length - 1];
|
313
|
+
var pluginOption = options["columnResizing"];
|
314
|
+
if(pluginOption) {
|
315
|
+
if(pluginOption["preserveProportion"]) {
|
316
|
+
this._keepProportion = true;
|
317
|
+
if(host) {
|
318
|
+
host.preserveProportion(true);
|
319
|
+
}
|
320
|
+
}
|
321
|
+
if(pluginOption["preserveGridSize"]) {
|
322
|
+
this._keepGridSize = true;
|
323
|
+
if(host) {
|
324
|
+
host.preserveGridSize(true);
|
325
|
+
}
|
326
|
+
}
|
327
|
+
if(pluginOption["noResizing"]) {
|
328
|
+
this._disabled = true;
|
329
|
+
}
|
330
|
+
if (pluginOption["pipeHandle"]) {
|
331
|
+
// TODO: Pipe mode has bug when reduce size of column the pipe ui disappear
|
332
|
+
this.enablePipeHandleMode();
|
333
|
+
} else if (pluginOption["handlebar"]) {
|
334
|
+
this.enableHandlebarMode();
|
335
|
+
}
|
336
|
+
|
337
|
+
this.addListener(pluginOption, "columnResized");
|
338
|
+
this.addListener(pluginOption, "dblClicked");
|
339
|
+
this.addListener(pluginOption, "dragStart");
|
340
|
+
this.addListener(pluginOption, "dragEnd");
|
341
|
+
}
|
342
|
+
|
343
|
+
var columns = options["columns"];
|
344
|
+
if(!columns) { return; }
|
345
|
+
|
346
|
+
var len = columns.length;
|
347
|
+
for(var c = 0; c < len; ++c) {
|
348
|
+
this._configColumn(host, c, columns[c]);
|
349
|
+
}
|
350
|
+
};
|
351
|
+
|
352
|
+
/** @public
|
353
|
+
* @param {Object=} gridOptions
|
354
|
+
* @return {!Object}
|
355
|
+
*/
|
356
|
+
ColumnResizingPlugin.prototype.getConfigObject = function (gridOptions) {
|
357
|
+
var obj = gridOptions || {};
|
358
|
+
|
359
|
+
var columns = obj.columns;
|
360
|
+
if (!columns) {
|
361
|
+
columns = obj.columns = [];
|
362
|
+
}
|
363
|
+
|
364
|
+
var len = this.getColumnCount();
|
365
|
+
for (var i = 0; i < len; ++i) {
|
366
|
+
var column = columns[i];
|
367
|
+
if (!column) {
|
368
|
+
column = columns[i] = {};
|
369
|
+
}
|
370
|
+
|
371
|
+
var noResizing = this._getColumnOption(i, 'noResizing', this._hosts[0]);
|
372
|
+
if (noResizing) {
|
373
|
+
column.noResizing = noResizing;
|
374
|
+
}
|
375
|
+
|
376
|
+
var defaultWidth = this._getColumnOption(i, 'defaultWidth', this._hosts[0]);
|
377
|
+
if (typeof defaultWidth == "number") {
|
378
|
+
column.defaultWidth = defaultWidth;
|
379
|
+
}
|
380
|
+
}
|
381
|
+
|
382
|
+
var extOptions = obj.columnResizing;
|
383
|
+
if (!extOptions) {
|
384
|
+
extOptions = obj.columnResizing = {};
|
385
|
+
}
|
386
|
+
extOptions.preserveProportion = this._keepProportion;
|
387
|
+
extOptions.preserveGridSize = this._keepGridSize;
|
388
|
+
extOptions.noResizing = this._disabled;
|
389
|
+
extOptions.pipeHandle = this._pipe;
|
390
|
+
extOptions.handlebar = this._hbMode;
|
391
|
+
|
392
|
+
return obj;
|
393
|
+
};
|
394
|
+
|
395
|
+
/** @private
|
396
|
+
* @param {Object} host core grid object
|
397
|
+
* @param {number} colIndex
|
398
|
+
* @param {number} columnConfig
|
399
|
+
*/
|
400
|
+
ColumnResizingPlugin.prototype._configColumn = function(host, colIndex, columnConfig) {
|
401
|
+
if(columnConfig) {
|
402
|
+
if(columnConfig["noResizing"]) {
|
403
|
+
this._newColumnData(colIndex)["noResizing"] = true;
|
404
|
+
}
|
405
|
+
var num = columnConfig["defaultWidth"];
|
406
|
+
if(typeof num == "number") {
|
407
|
+
this._newColumnData(colIndex)["defaultWidth"] = num;
|
408
|
+
if(host) {
|
409
|
+
host.setColumnDefaultWidth(colIndex, num);
|
410
|
+
}
|
411
|
+
}
|
412
|
+
}
|
413
|
+
};
|
414
|
+
/** Used to block built-in features that are redundant with this extension
|
415
|
+
* @protected
|
416
|
+
* @ignore
|
417
|
+
*/
|
418
|
+
ColumnResizingPlugin.prototype._afterInit = function () {
|
419
|
+
if(this._compositeGrid) {
|
420
|
+
var core = this._compositeGrid.getCoreGrid();
|
421
|
+
core.unloadPlugin("ResizableTitlePlugin");
|
422
|
+
}
|
423
|
+
};
|
424
|
+
|
425
|
+
/** Disable ability to drag to resize for the specified column
|
426
|
+
* @public
|
427
|
+
* @param {number} colIndex
|
428
|
+
* @param {boolean=} opt_disabled
|
429
|
+
*/
|
430
|
+
ColumnResizingPlugin.prototype.disableResizing = function(colIndex, opt_disabled) {
|
431
|
+
var colData = this._newColumnData(colIndex);
|
432
|
+
colData["noResizing"] = opt_disabled !== false;
|
433
|
+
|
434
|
+
for(var i = this._hosts.length; --i >= 0;) {
|
435
|
+
this._updateResizeHitBoxPosition(this._hosts[i], colIndex);
|
436
|
+
}
|
437
|
+
};
|
438
|
+
|
439
|
+
/** @public
|
440
|
+
* @return {number} Return negative number if currently no column is dragged
|
441
|
+
*/
|
442
|
+
ColumnResizingPlugin.prototype.getDraggedColumnIndex = function() {
|
443
|
+
return this._dragIndex;
|
444
|
+
};
|
445
|
+
|
446
|
+
/** @public
|
447
|
+
* @return {number} Return position of left size of column
|
448
|
+
*/
|
449
|
+
ColumnResizingPlugin.prototype.getDraggedAnchorX = function() {
|
450
|
+
return this._anchorX;
|
451
|
+
};
|
452
|
+
|
453
|
+
/** This function is used for set the size of multiple columns
|
454
|
+
* @public
|
455
|
+
* @param {Array.<number>} cols
|
456
|
+
* @param {Array.<number>|number} width
|
457
|
+
* @param {boolean=} opt_scalable If not defined false value is used instead
|
458
|
+
*/
|
459
|
+
ColumnResizingPlugin.prototype.setColumnWidths = function (cols, width, opt_scalable) {
|
460
|
+
var colCount = this.getColumnCount();
|
461
|
+
var widths = new Array(colCount);
|
462
|
+
var isNumber = typeof width === "number";
|
463
|
+
for (var c = 0; c < cols.length; c++) {
|
464
|
+
widths[cols[c]] = isNumber ? width : width[c];
|
465
|
+
}
|
466
|
+
var host;
|
467
|
+
for(var i = this._hosts.length; --i >= 0;) {
|
468
|
+
host = this._hosts[i];
|
469
|
+
host.setColumnWidths(widths, opt_scalable);
|
470
|
+
}
|
471
|
+
};
|
472
|
+
|
473
|
+
/** Set width for multiple column at once
|
474
|
+
* @public
|
475
|
+
* @param {number} colWidth width
|
476
|
+
* @param {boolean=} scalability If not defined false value is used instead
|
477
|
+
* @return {boolean} True if there is any changed
|
478
|
+
*/
|
479
|
+
ColumnResizingPlugin.prototype.setAllColumnWidths = function (colWidth, scalability) {
|
480
|
+
var colCount = this.getColumnCount();
|
481
|
+
var widths = new Array(colCount);
|
482
|
+
var i;
|
483
|
+
for (i = 0; i < colCount; i++) {
|
484
|
+
widths[i] = colWidth;
|
485
|
+
}
|
486
|
+
var host, dirty = false;
|
487
|
+
for(i = this._hosts.length; --i >= 0;) {
|
488
|
+
host = this._hosts[i];
|
489
|
+
dirty |= host.setColumnWidths(widths, scalability);
|
490
|
+
}
|
491
|
+
return dirty ? true : false;
|
492
|
+
};
|
493
|
+
|
494
|
+
/** Get width for multiple column
|
495
|
+
* @public
|
496
|
+
* @returns {Array.<number>} Array of width
|
497
|
+
*/
|
498
|
+
ColumnResizingPlugin.prototype.getColumnWidths = function () {
|
499
|
+
var colCount = this.getColumnCount();
|
500
|
+
var host = this._hosts[0], out = new Array(colCount);
|
501
|
+
for (var i = 0; i < colCount; i++) {
|
502
|
+
out[i] = host.getColumnWidth(i);
|
503
|
+
}
|
504
|
+
return out;
|
505
|
+
};
|
506
|
+
|
507
|
+
/** Reset to default column width
|
508
|
+
* @public
|
509
|
+
* @returns {boolean} True if there is any changed
|
510
|
+
*/
|
511
|
+
ColumnResizingPlugin.prototype.resetAllColumnsToDefaultWidth = function () {
|
512
|
+
var dirty = false;
|
513
|
+
var hosts = this._hosts;
|
514
|
+
var host;
|
515
|
+
for (var i = 0; i < hosts.length; i++ ) {
|
516
|
+
host = hosts[i];
|
517
|
+
dirty |= host.resetColumnWidths();
|
518
|
+
}
|
519
|
+
return dirty ? true : false;
|
520
|
+
};
|
521
|
+
|
522
|
+
/** Get JSON Object state of columns
|
523
|
+
* @public
|
524
|
+
* @returns {Array.<Object>} Columns state
|
525
|
+
*/
|
526
|
+
ColumnResizingPlugin.prototype.getColumnSizeStates = function () {
|
527
|
+
var colCount = this.getColumnCount();
|
528
|
+
var host = this._hosts[0], out = new Array(colCount);
|
529
|
+
for (var i = 0; i < colCount; i++) {
|
530
|
+
out[i] = {
|
531
|
+
width: host.getColumnWidth(i),
|
532
|
+
scalability: host.getColumnScalability(i)
|
533
|
+
};
|
534
|
+
}
|
535
|
+
return out;
|
536
|
+
};
|
537
|
+
|
538
|
+
/** Deprecated. Set JSON Object state of columns
|
539
|
+
* @deprecated
|
540
|
+
* @public
|
541
|
+
* @param {Array.<Object>|string} columns Array or string
|
542
|
+
*/
|
543
|
+
ColumnResizingPlugin.prototype.setColumnSizeStates = function (columns) {
|
544
|
+
var host = this._hosts[0];
|
545
|
+
|
546
|
+
if (typeof columns === 'string') {
|
547
|
+
columns = JSON.parse(columns);
|
548
|
+
}
|
549
|
+
|
550
|
+
host.freezeLayout();
|
551
|
+
columns.forEach(function (col, colIndex) {
|
552
|
+
return host.setColumnWidth(colIndex, col.width, col.scalability);
|
553
|
+
});
|
554
|
+
host.unfreezeLayout();
|
555
|
+
};
|
556
|
+
|
557
|
+
/** @public
|
558
|
+
* @param {boolean=} bool
|
559
|
+
*/
|
560
|
+
ColumnResizingPlugin.prototype.enablePipeHandleMode = function(bool) {
|
561
|
+
var pipe = this._pipe = (bool !== false);
|
562
|
+
var len = this._hosts.length;
|
563
|
+
for(var i = 0; i < len; ++i) {
|
564
|
+
this._hosts[i].enableClass("tr-pipe-resizer", pipe);
|
565
|
+
}
|
566
|
+
};
|
567
|
+
/** @public
|
568
|
+
* @param {boolean=} bool
|
569
|
+
*/
|
570
|
+
ColumnResizingPlugin.prototype.enableHandlebarMode = function(bool) {
|
571
|
+
var enabled = this._hbMode = (bool !== false);
|
572
|
+
|
573
|
+
if(enabled) {
|
574
|
+
var csp = this._getCSP();
|
575
|
+
if(csp) {
|
576
|
+
csp.listen("selectionChanged", this._updateHandlebar);
|
577
|
+
} else {
|
578
|
+
setTimeout(this._onTimer, 100); // WORKAROUND
|
579
|
+
}
|
580
|
+
} else {
|
581
|
+
if(this._handlebar) {
|
582
|
+
Dom.removeParent(this._handlebar);
|
583
|
+
this._guideline.classList.remove("tr-hb-guideline");
|
584
|
+
this._handlebar = null;
|
585
|
+
}
|
586
|
+
}
|
587
|
+
};
|
588
|
+
|
589
|
+
/** @private
|
590
|
+
* @param {Object=} e
|
591
|
+
*/
|
592
|
+
ColumnResizingPlugin.prototype._requestResizerUpdate = function (e) {
|
593
|
+
if(!this._updateTimer) {
|
594
|
+
this._updateTimer = setTimeout(this._updateResizers, 10);
|
595
|
+
}
|
596
|
+
};
|
597
|
+
/** @private */
|
598
|
+
ColumnResizingPlugin.prototype._updateResizers = function () {
|
599
|
+
this._updateTimer = 0;
|
600
|
+
if(this._hbMode) {
|
601
|
+
this._updateHandlebar();
|
602
|
+
} else {
|
603
|
+
for(var i = this._hosts.length; --i >= 0;) {
|
604
|
+
var host = this._hosts[i];
|
605
|
+
this._updateResizerCount(host);
|
606
|
+
this._updateResizeHitBoxPosition(host, 0);
|
607
|
+
}
|
608
|
+
}
|
609
|
+
};
|
610
|
+
|
611
|
+
/** @private
|
612
|
+
* @param {Object} e
|
613
|
+
*/
|
614
|
+
ColumnResizingPlugin.prototype._onPreSectionRender = function (e) {
|
615
|
+
if (e["sectionType"] === "title") { // HACK: Initialize resizers after all plugins have been loaded
|
616
|
+
this._updateResizerCount(e["sender"]);
|
617
|
+
}
|
618
|
+
};
|
619
|
+
|
620
|
+
/** @private
|
621
|
+
* @param {Object} e
|
622
|
+
*/
|
623
|
+
ColumnResizingPlugin.prototype._onTimer = function() {
|
624
|
+
if(this._hbMode) {
|
625
|
+
var csp = this._getCSP();
|
626
|
+
if(csp) {
|
627
|
+
csp.listen("selectionChanged", this._updateHandlebar);
|
628
|
+
}
|
629
|
+
}
|
630
|
+
};
|
631
|
+
|
632
|
+
|
633
|
+
/** @private
|
634
|
+
* @param {Event|Element} e
|
635
|
+
*/
|
636
|
+
ColumnResizingPlugin.prototype._onColumnAdded = function(e) {
|
637
|
+
if(e.context && e.colIndex != null) {
|
638
|
+
for(var i = this._hosts.length; --i >= 0;) {
|
639
|
+
var host = this._hosts[i];
|
640
|
+
this._configColumn(host, e.colIndex, e.context);
|
641
|
+
}
|
642
|
+
}
|
643
|
+
};
|
644
|
+
/** @private
|
645
|
+
* @param {Event} e
|
646
|
+
*/
|
647
|
+
ColumnResizingPlugin.prototype._onDragStart = function (e) {
|
648
|
+
if (this._dragIndex >= 0) { return; }
|
649
|
+
|
650
|
+
var host = this._getDraggedGrid(e);
|
651
|
+
this._dragIndex = this._getResizerIndex(host, e);
|
652
|
+
if (this._dragIndex < 0) { return; }
|
653
|
+
|
654
|
+
// add style pointer-event = 'none' to avoid unexpected click event in title cell
|
655
|
+
this._activeResizer = e.currentTarget;
|
656
|
+
this._activeResizer.parentElement.style.pointerEvents = "none";
|
657
|
+
|
658
|
+
if(e.type === "dragstart") {
|
659
|
+
window.addEventListener("mousemove", this._onDrag);
|
660
|
+
window.addEventListener("mouseup", this._onDragEnd);
|
661
|
+
}
|
662
|
+
|
663
|
+
var gridParent = host.getElement().parentElement;
|
664
|
+
|
665
|
+
gridParent.classList.add("tr-dragging"); // Prevent text selection
|
666
|
+
gridParent.classList.add("tr-resize-cursor");
|
667
|
+
|
668
|
+
this._draggedGrid = host;
|
669
|
+
this._anchorX = this._getAnchorX(e);
|
670
|
+
this._guideline.style.height = (gridParent.clientHeight) + "px";
|
671
|
+
this._guideX = 1 + this._getColumnRight(host, this._dragIndex);
|
672
|
+
this._guideline.style.top = "1px";
|
673
|
+
this._guideline.style.left = this._guideX + "px";
|
674
|
+
|
675
|
+
Dom.appendChild(gridParent, this._guideline);
|
676
|
+
this._dispatch("dragStart", e);
|
677
|
+
Dom.preventDefault(e);
|
678
|
+
};
|
679
|
+
/** @private
|
680
|
+
* @param {Event} e
|
681
|
+
* @return {number}
|
682
|
+
*/
|
683
|
+
ColumnResizingPlugin.prototype._getAnchorX = function (e) {
|
684
|
+
if(typeof e.clientX === "number") {
|
685
|
+
return e.clientX;
|
686
|
+
}
|
687
|
+
if(e.touches != null) {
|
688
|
+
if(e.touches[0]) {
|
689
|
+
return e.touches[0].clientX;
|
690
|
+
}
|
691
|
+
}
|
692
|
+
return 0;
|
693
|
+
};
|
694
|
+
/** @private
|
695
|
+
* @param {Event} e
|
696
|
+
*/
|
697
|
+
ColumnResizingPlugin.prototype._onDrag = function (e) {
|
698
|
+
if(!this._draggedGrid) {
|
699
|
+
return;
|
700
|
+
}
|
701
|
+
|
702
|
+
var diff = this._diffX = this._getAnchorX(e) - this._anchorX;
|
703
|
+
var width = this._draggedGrid.getColumnWidth(this._dragIndex);
|
704
|
+
var minWidth = this._draggedGrid.getMinimumColumnWidth(this._dragIndex);
|
705
|
+
|
706
|
+
if (width + diff < minWidth) {
|
707
|
+
diff = minWidth - width;
|
708
|
+
}
|
709
|
+
|
710
|
+
this._guideline.style.left = (this._guideX + diff) + "px";
|
711
|
+
|
712
|
+
Dom.preventDefault(e);
|
713
|
+
};
|
714
|
+
/** @private
|
715
|
+
* @param {Event} e
|
716
|
+
*/
|
717
|
+
ColumnResizingPlugin.prototype._onDragEnd = function (e) {
|
718
|
+
window.removeEventListener("mousemove", this._onDrag);
|
719
|
+
window.removeEventListener("mouseup", this._onDragEnd);
|
720
|
+
|
721
|
+
var parentElement = this._guideline.parentElement;
|
722
|
+
if (parentElement) {
|
723
|
+
parentElement.classList.remove("tr-dragging");
|
724
|
+
parentElement.classList.remove("tr-resize-cursor");
|
725
|
+
}
|
726
|
+
|
727
|
+
Dom.removeParent(this._guideline);
|
728
|
+
|
729
|
+
// set back previous pointer event style of active resizer parent
|
730
|
+
this._activeResizer.parentElement.style.pointerEvents = "";
|
731
|
+
this._activeResizer = null;
|
732
|
+
|
733
|
+
if(this._diffX) { // There must be some change after dragging
|
734
|
+
var diff = this._diffX;
|
735
|
+
var minWidth = this._draggedGrid.getMinimumColumnWidth(this._dragIndex);
|
736
|
+
var newWidth = this._draggedGrid.getColumnWidth(this._dragIndex) + (diff / this._draggedGrid["zoomFactor"]);
|
737
|
+
if (newWidth < minWidth) { newWidth = minWidth; }
|
738
|
+
|
739
|
+
if (this._keepProportion) {
|
740
|
+
this.setColumnWidths([this._dragIndex], [newWidth]);
|
741
|
+
|
742
|
+
this._dispatch("columnResized", {
|
743
|
+
"colIndex": this._dragIndex,
|
744
|
+
"width": this._hosts[0].getColumnCustomLaneSize(this._dragIndex), // calculated weight
|
745
|
+
"scalability": true
|
746
|
+
});
|
747
|
+
} else {
|
748
|
+
var cols = this._getResizingCols(this._dragIndex);
|
749
|
+
this.setColumnWidths(cols, newWidth);
|
750
|
+
|
751
|
+
this._dispatch("columnResized", {
|
752
|
+
"colIndex": this._dragIndex,
|
753
|
+
"colIndices": cols,
|
754
|
+
"width": newWidth
|
755
|
+
});
|
756
|
+
}
|
757
|
+
}
|
758
|
+
this._updateHandlebar();
|
759
|
+
this._dispatch("dragEnd", e);
|
760
|
+
|
761
|
+
this._anchorX = this._guideX = this._diffX = 0;
|
762
|
+
this._dragIndex = -1;
|
763
|
+
this._draggedGrid = null;
|
764
|
+
|
765
|
+
Dom.preventDefault(e);
|
766
|
+
};
|
767
|
+
|
768
|
+
/** @private
|
769
|
+
* @param {Event} e
|
770
|
+
*/
|
771
|
+
ColumnResizingPlugin.prototype._onDblClick = function(e){
|
772
|
+
var host = this.getRelativeGrid(e);
|
773
|
+
var colIndex = this._getResizerIndex(host, e);
|
774
|
+
var plugin = this._getPlugin("ColumnFitterPlugin");
|
775
|
+
if(!plugin) {
|
776
|
+
plugin = this._getPlugin("ColumnWidthAdjustingPlugin");
|
777
|
+
}
|
778
|
+
|
779
|
+
if(plugin) {
|
780
|
+
var cols = this._getResizingCols(colIndex);
|
781
|
+
var widths = [];
|
782
|
+
var index;
|
783
|
+
for(var i = cols.length; --i >= 0;) {
|
784
|
+
index = cols[i];
|
785
|
+
var defaultW = this._getColumnOption(index, "defaultWidth");
|
786
|
+
widths[i] = (defaultW != null) ? defaultW : plugin["getAdjustedColumnWidth"](index);
|
787
|
+
}
|
788
|
+
|
789
|
+
this.setColumnWidths(cols, widths);
|
790
|
+
Dom.preventDefault(e);
|
791
|
+
}
|
792
|
+
this._dispatch("dblClicked", {"colIndex": colIndex});
|
793
|
+
this._updateHandlebar();
|
794
|
+
};
|
795
|
+
|
796
|
+
/** @private
|
797
|
+
* @param {Object=} e
|
798
|
+
*/
|
799
|
+
ColumnResizingPlugin.prototype._updateHandlebar = function(e) {
|
800
|
+
if(!this._hbMode) {
|
801
|
+
return;
|
802
|
+
}
|
803
|
+
|
804
|
+
var csp = this._getCSP();
|
805
|
+
if(!csp) {
|
806
|
+
return;
|
807
|
+
}
|
808
|
+
|
809
|
+
var sels = csp.getSelectedColumns();
|
810
|
+
|
811
|
+
var showHandlebar = sels.length === 1;
|
812
|
+
if(showHandlebar) {
|
813
|
+
if(!this._handlebar) {
|
814
|
+
this._handlebar = this._newResizer("tr-handlebar");
|
815
|
+
this._guideline.classList.add("tr-hb-guideline");
|
816
|
+
this._guideline.appendChild(this._handlebar);
|
817
|
+
}
|
818
|
+
var colIndex = this._handlebar._colIndex = sels[0];
|
819
|
+
var grid = null;
|
820
|
+
if(e) {
|
821
|
+
grid = this._handlebar._grid = e.grid;
|
822
|
+
} else {
|
823
|
+
grid = this._handlebar._grid;
|
824
|
+
}
|
825
|
+
|
826
|
+
if(grid) {
|
827
|
+
this._guideline.style.left = this._getColumnRight(grid, colIndex) + "px";
|
828
|
+
this._guideline.style.top = "";
|
829
|
+
this._guideline.style.height = "";
|
830
|
+
grid.getElement().appendChild(this._guideline);
|
831
|
+
}
|
832
|
+
} else {
|
833
|
+
if(this._handlebar) {
|
834
|
+
this._handlebar._colIndex = -1;
|
835
|
+
this._handlebar._grid = null;
|
836
|
+
Dom.removeParent(this._guideline);
|
837
|
+
}
|
838
|
+
}
|
839
|
+
};
|
840
|
+
|
841
|
+
/** @private
|
842
|
+
* @param {Event} e
|
843
|
+
*/
|
844
|
+
ColumnResizingPlugin._stopPropagation = function (e) {
|
845
|
+
e.stopPropagation();
|
846
|
+
};
|
847
|
+
/** @private
|
848
|
+
* @return {ColumnSelectionPlugin}
|
849
|
+
*/
|
850
|
+
ColumnResizingPlugin.prototype._getCSP = function () {
|
851
|
+
var csp = this._getPlugin("ColumnSelectionPlugin");
|
852
|
+
if(csp && csp.isEnabled()) {
|
853
|
+
return /** @type{ColumnSelectionPlugin} */(csp);
|
854
|
+
} else {
|
855
|
+
return null;
|
856
|
+
}
|
857
|
+
};
|
858
|
+
/** @private
|
859
|
+
* @param {Object} host core grid object
|
860
|
+
*/
|
861
|
+
ColumnResizingPlugin.prototype._updateResizerCount = function (host) {
|
862
|
+
if(this._hbMode || this._disabled) {
|
863
|
+
return;
|
864
|
+
}
|
865
|
+
|
866
|
+
var titleSect = host.getSection("title");
|
867
|
+
if(!titleSect) {
|
868
|
+
return;
|
869
|
+
}
|
870
|
+
var colCount = host.getColumnCount();
|
871
|
+
var c, rowCount, col, boxes;
|
872
|
+
// Normal mode and Pipe mode
|
873
|
+
var titleSects = host.getAllSections("title");
|
874
|
+
for (var i = 0; i < titleSects.length; i++) {
|
875
|
+
titleSect = titleSects[i];
|
876
|
+
for (c = 0; c < colCount; ++c) {
|
877
|
+
rowCount = titleSect.getRowCount();
|
878
|
+
col = titleSect.getColumn(c);
|
879
|
+
boxes = col._resizers;
|
880
|
+
if (!boxes) {
|
881
|
+
boxes = col._resizers = [];
|
882
|
+
}
|
883
|
+
for (var j = 0; j < rowCount; j++) {
|
884
|
+
var cell = titleSect.getCell(c, j); // TODO: This can be optimized
|
885
|
+
var box = cell._resizer;
|
886
|
+
if (!box) {
|
887
|
+
box = this._newResizer();
|
888
|
+
cell._resizer = box; // Cache to prevent repeating creation
|
889
|
+
var cellElem = cell.getElement();
|
890
|
+
cellElem.insertBefore(box, cellElem.firstChild);
|
891
|
+
boxes.push(box);
|
892
|
+
}
|
893
|
+
}
|
894
|
+
}
|
895
|
+
}
|
896
|
+
};
|
897
|
+
/** @private
|
898
|
+
* @param {string=} classStr
|
899
|
+
* @return {!Element}
|
900
|
+
*/
|
901
|
+
ColumnResizingPlugin.prototype._newResizer = function (classStr) {
|
902
|
+
var box = Dom.div(classStr ? classStr : "resizer");
|
903
|
+
box.setAttribute("draggable", "true");
|
904
|
+
box.addEventListener("mousedown", ColumnResizingPlugin._stopPropagation);
|
905
|
+
box.addEventListener("click", ColumnResizingPlugin._stopPropagation);
|
906
|
+
box.addEventListener("dragstart", this._onDragStart);
|
907
|
+
box.addEventListener("dblclick", this._onDblClick);
|
908
|
+
box.addEventListener("touchstart", this._onDragStart);
|
909
|
+
box.addEventListener("touchend", this._onDragEnd);
|
910
|
+
box.addEventListener("touchcancel", this._onDragEnd);
|
911
|
+
// box.addEventListener("touchleave", this._onDragEnd);
|
912
|
+
box.addEventListener("touchmove", this._onDrag);
|
913
|
+
return box;
|
914
|
+
};
|
915
|
+
/** @private
|
916
|
+
* @param {Object} host core grid object
|
917
|
+
* @param {number=} from
|
918
|
+
*/
|
919
|
+
ColumnResizingPlugin.prototype._updateResizeHitBoxPosition = function (host, from) { // Slow
|
920
|
+
if(this._hbMode || this._disabled) {
|
921
|
+
return;
|
922
|
+
}
|
923
|
+
|
924
|
+
var titleSect = host.getSection("title");
|
925
|
+
if(!titleSect) {
|
926
|
+
return;
|
927
|
+
}
|
928
|
+
|
929
|
+
if(!from) {
|
930
|
+
from = 0;
|
931
|
+
}
|
932
|
+
|
933
|
+
var titleSects = host.getAllSections("title");
|
934
|
+
var colCount = host.getColumnCount();
|
935
|
+
for (var i = 0; i < titleSects.length; i++) {
|
936
|
+
titleSect = titleSects[i];
|
937
|
+
for (var c = from; c < colCount; ++c) {
|
938
|
+
var col = titleSect.getColumn(c);
|
939
|
+
var disabled = this._getColumnOption(c, "noResizing");
|
940
|
+
var boxes = col._resizers;
|
941
|
+
for (var j = 0; j < boxes.length; j++) {
|
942
|
+
var box = boxes[j];
|
943
|
+
box._disabled = disabled; // disabled is an internal flag
|
944
|
+
box.style.display = (disabled) ? "none" : "";
|
945
|
+
}
|
946
|
+
}
|
947
|
+
}
|
948
|
+
};
|
949
|
+
/** @private
|
950
|
+
* @param {Event} e
|
951
|
+
* @return {Object} host, core grid object
|
952
|
+
*/
|
953
|
+
ColumnResizingPlugin.prototype._getDraggedGrid = function (e) {
|
954
|
+
if(this._hbMode) {
|
955
|
+
return this._handlebar._grid;
|
956
|
+
} else {
|
957
|
+
return this.getRelativeGrid(e);
|
958
|
+
}
|
959
|
+
};
|
960
|
+
/** @private
|
961
|
+
* @param {Object} host core grid object
|
962
|
+
* @param {Event} e
|
963
|
+
* @return {number}
|
964
|
+
*/
|
965
|
+
ColumnResizingPlugin.prototype._getResizerIndex = function (host, e) {
|
966
|
+
if(this._hbMode) {
|
967
|
+
if(this._handlebar) {
|
968
|
+
// TODO: Check for disabling flag
|
969
|
+
return /** @type{number} */(this._handlebar._colIndex);
|
970
|
+
} else {
|
971
|
+
return -1;
|
972
|
+
}
|
973
|
+
}
|
974
|
+
|
975
|
+
var box = e["currentTarget"];
|
976
|
+
if (box._disabled) { // disabled is an internal flag
|
977
|
+
return -1;
|
978
|
+
}
|
979
|
+
|
980
|
+
var pos = host.getRelativePosition(e);
|
981
|
+
var colIndex = pos.colIndex;
|
982
|
+
var rowIndex = pos.rowIndex;
|
983
|
+
var colSpan = pos["section"].getCellColSpan(colIndex, rowIndex);
|
984
|
+
return (colIndex != null) ? colIndex + colSpan - 1 : -1;
|
985
|
+
};
|
986
|
+
/** @private
|
987
|
+
* @param {Object} host core grid object
|
988
|
+
* @param {number} colIndex
|
989
|
+
* @return {number}
|
990
|
+
*/
|
991
|
+
ColumnResizingPlugin.prototype._getColumnRight = function (host, colIndex) {
|
992
|
+
// TODO: Replace zoomFactor with more proper API
|
993
|
+
return (host.getColumnRight(colIndex) - 1) * host["zoomFactor"];
|
994
|
+
};
|
995
|
+
|
996
|
+
/** @private
|
997
|
+
* @param {number} clickIndex
|
998
|
+
* @return {Array.<number>}
|
999
|
+
*/
|
1000
|
+
ColumnResizingPlugin.prototype._getResizingCols = function (clickIndex) {
|
1001
|
+
var csp = this._getCSP();
|
1002
|
+
if(csp) {
|
1003
|
+
var cols = csp["getSelectedColumns"]();
|
1004
|
+
if(cols.indexOf(clickIndex) >= 0) { // if clickIndex does not exist in selected columns then return clickIndex.
|
1005
|
+
return cols;
|
1006
|
+
}
|
1007
|
+
}
|
1008
|
+
return [clickIndex];
|
1009
|
+
};
|
1010
|
+
|
1011
|
+
|
1012
|
+
export default ColumnResizingPlugin;
|
1013
|
+
export { ColumnResizingPlugin, ColumnResizingPlugin as ColumnResizing, ColumnResizingPlugin as ColumnResizingExtension };
|