@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,1000 @@
|
|
1
|
+
import { Ext } from '../../tr-grid-util/es6/Ext.js';
|
2
|
+
import { GridPlugin } from '../../tr-grid-util/es6/GridPlugin.js';
|
3
|
+
/** @typedef {Object} ColumnFitterPlugin~Options
|
4
|
+
* @description The options can be specified by `columnFitting` property of the main grid's options
|
5
|
+
* @property {boolean=} proportion=false Proportionally expand columns, if there is enough space
|
6
|
+
* @property {boolean=} constraint=false Prevents column width to go lower than its content size
|
7
|
+
* @property {(boolean|number)=} autoAdjust=false Automatic column width adjusting on each data update
|
8
|
+
* @property {(boolean|number)=} autoAdjusting=false Alias to `autoAdjust`
|
9
|
+
* @property {boolean=} title=false Include title section in the fitting calculation
|
10
|
+
* @property {number=} paddingSize=2 Additional padding from existing cell padding. This will add extra space (in pixel) to the right of the longest text.
|
11
|
+
* @property {boolean=} shrinkable=false Allow column width to be shrunken during autoAdjust enabled
|
12
|
+
*/
|
13
|
+
|
14
|
+
/** @typedef {Object} ColumnFitterPlugin~ColumnOptions
|
15
|
+
* @description Extension column options that can be specified on each individual grid's column option:
|
16
|
+
* @property {boolean=} noFitting=false If enabled, the given column will not be included in the calculation
|
17
|
+
* @property {boolean=} contentFitting=false By default, fitting extension only calculate text content. Enable this option to support custom rendering fitting for a specified column
|
18
|
+
* @property {number=} minWidth Minimum width of the column
|
19
|
+
* @property {number=} maxWidth Maximum width of the column
|
20
|
+
*/
|
21
|
+
|
22
|
+
/** @constructor
|
23
|
+
* @param {ColumnFitterPlugin~Options=} options
|
24
|
+
* @extends {GridPlugin}
|
25
|
+
*/
|
26
|
+
|
27
|
+
var ColumnFitterPlugin = function ColumnFitterPlugin(options) {
|
28
|
+
this._onItemResizeThisColumnClicked = this._onItemResizeThisColumnClicked.bind(this);
|
29
|
+
this._onItemResizeAllColumnClicked = this._onItemResizeAllColumnClicked.bind(this);
|
30
|
+
this._onPostSectionDataBinding = this._onPostSectionDataBinding.bind(this);
|
31
|
+
this._onColumnAdded = this._onColumnAdded.bind(this);
|
32
|
+
this._onTimeout = this._onTimeout.bind(this);
|
33
|
+
this._hosts = [];
|
34
|
+
this._dummyCells = [];
|
35
|
+
this._cellPaddings = [];
|
36
|
+
this.config(options);
|
37
|
+
};
|
38
|
+
|
39
|
+
Ext.inherits(ColumnFitterPlugin, GridPlugin);
|
40
|
+
/** @type {number}
|
41
|
+
* @private
|
42
|
+
*/
|
43
|
+
|
44
|
+
ColumnFitterPlugin.prototype._paddingSize = 2;
|
45
|
+
/** @type {boolean}
|
46
|
+
* @private
|
47
|
+
*/
|
48
|
+
|
49
|
+
ColumnFitterPlugin.prototype._defaultPadding = true;
|
50
|
+
/** @type {boolean}
|
51
|
+
* @private
|
52
|
+
*/
|
53
|
+
|
54
|
+
ColumnFitterPlugin.prototype._autoAdjust = false;
|
55
|
+
/** @type {boolean}
|
56
|
+
* @private
|
57
|
+
*/
|
58
|
+
|
59
|
+
ColumnFitterPlugin.prototype._constraint = false;
|
60
|
+
/** @type {boolean}
|
61
|
+
* @private
|
62
|
+
*/
|
63
|
+
|
64
|
+
ColumnFitterPlugin.prototype._proportion = false;
|
65
|
+
/** If true, include title sections into the calculation
|
66
|
+
* @type {boolean}
|
67
|
+
* @private
|
68
|
+
*/
|
69
|
+
|
70
|
+
ColumnFitterPlugin.prototype._title = false;
|
71
|
+
/** Column can be shrunken after initial fitting
|
72
|
+
* @type {boolean}
|
73
|
+
* @private
|
74
|
+
*/
|
75
|
+
|
76
|
+
ColumnFitterPlugin.prototype._shrinkable = false;
|
77
|
+
/** @type {number}
|
78
|
+
* @private
|
79
|
+
*/
|
80
|
+
|
81
|
+
ColumnFitterPlugin.prototype._interval = 300;
|
82
|
+
/** @type {number}
|
83
|
+
* @private
|
84
|
+
*/
|
85
|
+
|
86
|
+
ColumnFitterPlugin.prototype._timerId = 0;
|
87
|
+
/** @type {Array.<Element>}
|
88
|
+
* @private
|
89
|
+
*/
|
90
|
+
|
91
|
+
ColumnFitterPlugin.prototype._dummyCells = null;
|
92
|
+
/** @type {Array.<number>}
|
93
|
+
* @private
|
94
|
+
*/
|
95
|
+
|
96
|
+
ColumnFitterPlugin.prototype._cellPaddings = null;
|
97
|
+
/** @type {number}
|
98
|
+
* @private
|
99
|
+
*/
|
100
|
+
|
101
|
+
ColumnFitterPlugin.prototype._synchronousRendering = true;
|
102
|
+
/** @public
|
103
|
+
* @return {string}
|
104
|
+
*/
|
105
|
+
|
106
|
+
ColumnFitterPlugin.prototype.getName = function () {
|
107
|
+
return "ColumnFitterPlugin"; // Read Only
|
108
|
+
};
|
109
|
+
/**
|
110
|
+
* @override
|
111
|
+
* @return {boolean}
|
112
|
+
*/
|
113
|
+
|
114
|
+
|
115
|
+
ColumnFitterPlugin.prototype.hasMultiTableSupport = function () {
|
116
|
+
return true;
|
117
|
+
};
|
118
|
+
/** @public
|
119
|
+
* @param {Object} host core grid object
|
120
|
+
* @param {Object=} options
|
121
|
+
*/
|
122
|
+
|
123
|
+
|
124
|
+
ColumnFitterPlugin.prototype.initialize = function (host, options) {
|
125
|
+
if (this._hosts.indexOf(host) >= 0) {
|
126
|
+
return;
|
127
|
+
} // In case of multi-grid, grace period will be used multiple times because extension is a single instance.
|
128
|
+
|
129
|
+
|
130
|
+
this._synchronousRendering = true;
|
131
|
+
|
132
|
+
this._hosts.push(host);
|
133
|
+
|
134
|
+
if (options) {
|
135
|
+
var pluginOptions = options["columnFitting"] || {}; // Avoid using properties from the main object
|
136
|
+
|
137
|
+
pluginOptions.columns = options["columns"]; // Retrieved property defined in the column
|
138
|
+
|
139
|
+
this.config(pluginOptions);
|
140
|
+
}
|
141
|
+
|
142
|
+
if (this._autoAdjust) {
|
143
|
+
host.listen("postSectionDataBinding", this._onPostSectionDataBinding);
|
144
|
+
}
|
145
|
+
|
146
|
+
host.listen("columnAdded", this._onColumnAdded); // In case of lazy loading
|
147
|
+
|
148
|
+
this._onPostSectionDataBinding();
|
149
|
+
};
|
150
|
+
/** @public
|
151
|
+
* @param {Object} host core grid object
|
152
|
+
*/
|
153
|
+
|
154
|
+
|
155
|
+
ColumnFitterPlugin.prototype.unload = function (host) {
|
156
|
+
var at = this._hosts.indexOf(host);
|
157
|
+
|
158
|
+
if (at < 0) {
|
159
|
+
return;
|
160
|
+
}
|
161
|
+
|
162
|
+
this._hosts.splice(at, 1);
|
163
|
+
|
164
|
+
host.unlisten("postSectionDataBinding", this._onPostSectionDataBinding);
|
165
|
+
host.unlisten("columnAdded", this._onColumnAdded);
|
166
|
+
|
167
|
+
if (!this._hosts.length) {
|
168
|
+
if (this._timerId) {
|
169
|
+
clearTimeout(this._timerId);
|
170
|
+
this._timerId = 0;
|
171
|
+
}
|
172
|
+
}
|
173
|
+
};
|
174
|
+
/** @public
|
175
|
+
* @param {ColumnFitterPlugin~Options=} options
|
176
|
+
*/
|
177
|
+
|
178
|
+
|
179
|
+
ColumnFitterPlugin.prototype.config = function (options) {
|
180
|
+
if (!options) {
|
181
|
+
return;
|
182
|
+
}
|
183
|
+
|
184
|
+
var columns = options["columns"];
|
185
|
+
|
186
|
+
if (columns) {
|
187
|
+
var column,
|
188
|
+
len = columns.length;
|
189
|
+
|
190
|
+
for (var c = 0; c < len; ++c) {
|
191
|
+
column = columns[c];
|
192
|
+
|
193
|
+
this._retrieveBooleanColumnOption(column, "noFitting", c);
|
194
|
+
|
195
|
+
this._retrieveBooleanColumnOption(column, "contentFitting", c);
|
196
|
+
|
197
|
+
this._retrieveColumnOption(column, "width", c);
|
198
|
+
|
199
|
+
this._retrieveColumnOption(column, "scalable", c);
|
200
|
+
|
201
|
+
this._retrieveColumnOption(column, "minWidth", c); // NOTE: minWidth is also used in core grid. This will make minWidth option redundant.
|
202
|
+
|
203
|
+
|
204
|
+
this._retrieveColumnOption(column, "maxWidth", c);
|
205
|
+
}
|
206
|
+
}
|
207
|
+
|
208
|
+
this._proportion = ColumnFitterPlugin._readBoolean(options, "proportion", this._proportion);
|
209
|
+
this._constraint = ColumnFitterPlugin._readBoolean(options, "constraint", this._constraint);
|
210
|
+
this._title = ColumnFitterPlugin._readBoolean(options, "title", this._title);
|
211
|
+
this._shrinkable = ColumnFitterPlugin._readBoolean(options, "shrinkable", this._shrinkable);
|
212
|
+
|
213
|
+
if (this._proportion) {
|
214
|
+
var host = this._hosts[this._hosts.length - 1];
|
215
|
+
|
216
|
+
if (host) {
|
217
|
+
host.preserveProportion(true);
|
218
|
+
}
|
219
|
+
}
|
220
|
+
|
221
|
+
var val = options["autoAdjust"] || options["autoAdjusting"];
|
222
|
+
|
223
|
+
if (val != null) {
|
224
|
+
this._autoAdjust = val ? true : false;
|
225
|
+
|
226
|
+
if (typeof val === "number") {
|
227
|
+
this._interval = val;
|
228
|
+
}
|
229
|
+
}
|
230
|
+
|
231
|
+
var paddingSize =
|
232
|
+
/** @type {number} */
|
233
|
+
options["paddingSize"];
|
234
|
+
|
235
|
+
if (paddingSize != null) {
|
236
|
+
this._defaultPadding = false;
|
237
|
+
this._paddingSize = paddingSize;
|
238
|
+
}
|
239
|
+
|
240
|
+
if (this._defaultPadding) {
|
241
|
+
// Title section need extra padding to avoid ellipsis
|
242
|
+
this._paddingSize = this._title ? 4 : 2;
|
243
|
+
}
|
244
|
+
};
|
245
|
+
/** @public
|
246
|
+
* @param {Object=} gridOptions
|
247
|
+
* @return {!Object}
|
248
|
+
*/
|
249
|
+
|
250
|
+
|
251
|
+
ColumnFitterPlugin.prototype.getConfigObject = function (gridOptions) {
|
252
|
+
var obj = gridOptions || {};
|
253
|
+
var columns = obj.columns;
|
254
|
+
|
255
|
+
if (!columns) {
|
256
|
+
columns = obj.columns = [];
|
257
|
+
}
|
258
|
+
|
259
|
+
var len = this.getColumnCount();
|
260
|
+
|
261
|
+
for (var i = 0; i < len; ++i) {
|
262
|
+
var column = columns[i];
|
263
|
+
|
264
|
+
if (!column) {
|
265
|
+
column = columns[i] = {};
|
266
|
+
}
|
267
|
+
|
268
|
+
var colOptions = this._getColumnOption(i, "noFitting");
|
269
|
+
|
270
|
+
if (colOptions) {
|
271
|
+
column.noFitting = true;
|
272
|
+
}
|
273
|
+
}
|
274
|
+
|
275
|
+
var extOptions = obj.columnFitting;
|
276
|
+
|
277
|
+
if (!extOptions) {
|
278
|
+
extOptions = obj.columnFitting = {};
|
279
|
+
}
|
280
|
+
|
281
|
+
if (this._proportion) {
|
282
|
+
extOptions.proportion = true;
|
283
|
+
}
|
284
|
+
|
285
|
+
if (this._constraint) {
|
286
|
+
extOptions.constraint = true;
|
287
|
+
}
|
288
|
+
|
289
|
+
if (this._title) {
|
290
|
+
extOptions.title = true;
|
291
|
+
}
|
292
|
+
|
293
|
+
if (this._shrinkable) {
|
294
|
+
extOptions.shrinkable = true;
|
295
|
+
}
|
296
|
+
|
297
|
+
if (this._autoAdjust) {
|
298
|
+
extOptions.autoAdjust = true;
|
299
|
+
}
|
300
|
+
|
301
|
+
if (!this._defaultPadding) {
|
302
|
+
extOptions.paddingSize = this._paddingSize;
|
303
|
+
}
|
304
|
+
|
305
|
+
return obj;
|
306
|
+
};
|
307
|
+
/** Function for ColumnMenuExtension to collect config of column menu
|
308
|
+
* @public
|
309
|
+
* @param {number} colIndex Column index
|
310
|
+
* @param {Object} config Column Menu configuration
|
311
|
+
* @return {!Object}
|
312
|
+
*/
|
313
|
+
|
314
|
+
|
315
|
+
ColumnFitterPlugin.prototype.getColumnMenu = function (colIndex, config) {
|
316
|
+
if (!config) {
|
317
|
+
config = {};
|
318
|
+
}
|
319
|
+
|
320
|
+
var menus = config.menus;
|
321
|
+
|
322
|
+
if (!menus) {
|
323
|
+
menus = config.menus = [];
|
324
|
+
}
|
325
|
+
|
326
|
+
var menu = menus[0];
|
327
|
+
|
328
|
+
if (!menu) {
|
329
|
+
menu = menus[0] = {
|
330
|
+
menuItems: []
|
331
|
+
};
|
332
|
+
} // Menu items for this extension
|
333
|
+
|
334
|
+
|
335
|
+
var group = "USED_ONCE";
|
336
|
+
var extMenuItems = [{
|
337
|
+
indexScore: 2,
|
338
|
+
label: "Autosize This Column",
|
339
|
+
group: group,
|
340
|
+
value: {
|
341
|
+
colIndex: colIndex
|
342
|
+
},
|
343
|
+
click: this._onItemResizeThisColumnClicked
|
344
|
+
}, {
|
345
|
+
indexScore: 1,
|
346
|
+
label: "Autosize All Columns",
|
347
|
+
group: group,
|
348
|
+
click: this._onItemResizeAllColumnClicked
|
349
|
+
}]; // Push menu items to config
|
350
|
+
|
351
|
+
Array.prototype.push.apply(menu.menuItems, extMenuItems);
|
352
|
+
return config;
|
353
|
+
};
|
354
|
+
/** @private
|
355
|
+
* @param {Object} e
|
356
|
+
*/
|
357
|
+
|
358
|
+
|
359
|
+
ColumnFitterPlugin.prototype._onItemResizeThisColumnClicked = function (e) {
|
360
|
+
this.adjustColumnWidth(e.currentTarget.value.colIndex);
|
361
|
+
|
362
|
+
this._hideColumnMenu();
|
363
|
+
};
|
364
|
+
/** @private
|
365
|
+
* @param {Object} e
|
366
|
+
*/
|
367
|
+
|
368
|
+
|
369
|
+
ColumnFitterPlugin.prototype._onItemResizeAllColumnClicked = function (e) {
|
370
|
+
this.adjustAllColumns();
|
371
|
+
|
372
|
+
this._hideColumnMenu();
|
373
|
+
};
|
374
|
+
/** @private
|
375
|
+
*/
|
376
|
+
|
377
|
+
|
378
|
+
ColumnFitterPlugin.prototype._hideColumnMenu = function () {
|
379
|
+
var host = this._hosts[0];
|
380
|
+
var columnMenuExt = host.getPlugin('ColumnMenuPlugin');
|
381
|
+
columnMenuExt.hide();
|
382
|
+
};
|
383
|
+
/** @private
|
384
|
+
* @param {Object} column
|
385
|
+
* @param {string} propName
|
386
|
+
* @param {number} colIndex
|
387
|
+
*/
|
388
|
+
|
389
|
+
|
390
|
+
ColumnFitterPlugin.prototype._retrieveBooleanColumnOption = function (column, propName, colIndex) {
|
391
|
+
if (column) {
|
392
|
+
var bool = ColumnFitterPlugin._readBoolean(column, propName, false);
|
393
|
+
|
394
|
+
this._newColumnData(colIndex)[propName] = bool;
|
395
|
+
}
|
396
|
+
};
|
397
|
+
/** @private
|
398
|
+
* @param {Object} column
|
399
|
+
* @param {string} propName
|
400
|
+
* @param {number} colIndex
|
401
|
+
*/
|
402
|
+
|
403
|
+
|
404
|
+
ColumnFitterPlugin.prototype._retrieveColumnOption = function (column, propName, colIndex) {
|
405
|
+
if (column) {
|
406
|
+
var val = column[propName];
|
407
|
+
|
408
|
+
if (val != null) {
|
409
|
+
this._newColumnData(colIndex)[propName] = val;
|
410
|
+
}
|
411
|
+
}
|
412
|
+
};
|
413
|
+
/** Guarantee boolean value
|
414
|
+
* @private
|
415
|
+
* @function
|
416
|
+
* @param {Object} obj
|
417
|
+
* @param {string} propName
|
418
|
+
* @param {boolean} defaultVal
|
419
|
+
* @return {boolean}
|
420
|
+
*/
|
421
|
+
|
422
|
+
|
423
|
+
ColumnFitterPlugin._readBoolean = function (obj, propName, defaultVal) {
|
424
|
+
var val = obj[propName];
|
425
|
+
|
426
|
+
if (val != null) {
|
427
|
+
return val ? true : false;
|
428
|
+
} else {
|
429
|
+
return defaultVal;
|
430
|
+
}
|
431
|
+
};
|
432
|
+
/** Force update and calculation on a single column. It is not recommended to be used multiple time successively
|
433
|
+
* @public
|
434
|
+
* @param {Array.<number>=} colIndex Column indices
|
435
|
+
* @return {boolean} True if there is any change, otherwise false
|
436
|
+
*/
|
437
|
+
|
438
|
+
|
439
|
+
ColumnFitterPlugin.prototype.adjustColumnWidth = function (colIndex) {
|
440
|
+
return this.adjustColumns([colIndex]);
|
441
|
+
};
|
442
|
+
/** Force update and calculation on specific columns
|
443
|
+
* @public
|
444
|
+
* @param {Array.<number>=} colIndices Column indices
|
445
|
+
* @param {boolean=} force=true Force adjust the columns regardless of noFitting flag
|
446
|
+
* @return {boolean} True if there is any change, otherwise false
|
447
|
+
*/
|
448
|
+
|
449
|
+
|
450
|
+
ColumnFitterPlugin.prototype.adjustColumns = function (colIndices, force) {
|
451
|
+
if (force == null) {
|
452
|
+
force = true;
|
453
|
+
}
|
454
|
+
|
455
|
+
var candidates = this._collectCandidates(colIndices, force);
|
456
|
+
|
457
|
+
var len = candidates.length;
|
458
|
+
|
459
|
+
if (!len) {
|
460
|
+
return false; // No valid column to be processed
|
461
|
+
}
|
462
|
+
|
463
|
+
var i, cd;
|
464
|
+
|
465
|
+
for (i = 0; i < len; ++i) {
|
466
|
+
cd = candidates[i];
|
467
|
+
|
468
|
+
if (cd.text) {
|
469
|
+
cd.elem.appendChild(this._getDummyCell(cd.index, cd.text)); // TODO: Handle case where the column is hidden or virtualized.
|
470
|
+
}
|
471
|
+
}
|
472
|
+
|
473
|
+
var host = this._hosts[0];
|
474
|
+
var widths = new Array(host.getColumnCount());
|
475
|
+
|
476
|
+
for (i = 0; i < len; ++i) {
|
477
|
+
cd = candidates[i];
|
478
|
+
|
479
|
+
var width = this._calculateCellWidth(cd.index, host, cd.width); // WARNING: Only the first host is used
|
480
|
+
|
481
|
+
|
482
|
+
var prevW = cd.elem._caclWidth || 0;
|
483
|
+
|
484
|
+
if (width > prevW) {
|
485
|
+
// Exclude zero width
|
486
|
+
widths[cd.index] = width;
|
487
|
+
|
488
|
+
if (this._autoAdjust && !this._shrinkable) {
|
489
|
+
cd.elem._caclWidth = width;
|
490
|
+
}
|
491
|
+
}
|
492
|
+
} // Remove all dummy cells
|
493
|
+
|
494
|
+
|
495
|
+
for (i = 0; i < len; ++i) {
|
496
|
+
var dummy = this._dummyCells[candidates[i].index];
|
497
|
+
|
498
|
+
if (dummy && dummy.parentNode) {
|
499
|
+
dummy.parentNode.removeChild(dummy);
|
500
|
+
dummy.textContent = ""; // Reduce cache memory
|
501
|
+
}
|
502
|
+
}
|
503
|
+
|
504
|
+
var dirty = 0;
|
505
|
+
var hostCount = this._hosts.length;
|
506
|
+
|
507
|
+
if (this._constraint) {
|
508
|
+
for (i = 0; i < hostCount; ++i) {
|
509
|
+
host = this._hosts[i];
|
510
|
+
dirty |= host.setMinimumColumnWidths(widths);
|
511
|
+
}
|
512
|
+
} else {
|
513
|
+
for (i = 0; i < hostCount; ++i) {
|
514
|
+
host = this._hosts[i];
|
515
|
+
|
516
|
+
if (host.isProportionPreserved()) {
|
517
|
+
// Get proportion mode from grid
|
518
|
+
var columnScalability = [];
|
519
|
+
|
520
|
+
for (var columnIndex = 0; columnIndex < len; columnIndex++) {
|
521
|
+
columnScalability.push(host.getColumnScalability(columnIndex));
|
522
|
+
}
|
523
|
+
|
524
|
+
dirty |= host.setColumnWidths(widths, columnScalability);
|
525
|
+
} else {
|
526
|
+
dirty |= host.setColumnWidths(widths);
|
527
|
+
}
|
528
|
+
}
|
529
|
+
}
|
530
|
+
|
531
|
+
this._synchronousRendering = false; // Next time will render asynchronously
|
532
|
+
|
533
|
+
return !!dirty;
|
534
|
+
};
|
535
|
+
/** Force update and calculation on all columns
|
536
|
+
* @public
|
537
|
+
* @return {boolean} True if there is any change, otherwise false
|
538
|
+
*/
|
539
|
+
|
540
|
+
|
541
|
+
ColumnFitterPlugin.prototype.adjustAllColumns = function () {
|
542
|
+
return this.adjustColumns();
|
543
|
+
};
|
544
|
+
/** @public
|
545
|
+
* @param {number} colIndex
|
546
|
+
* @return {number}
|
547
|
+
*/
|
548
|
+
|
549
|
+
|
550
|
+
ColumnFitterPlugin.prototype.calculateColumnWidth = function (colIndex) {
|
551
|
+
var host = this._hosts[0];
|
552
|
+
var section = host ? host.getSection("content") : null;
|
553
|
+
|
554
|
+
if (!section) {
|
555
|
+
return NaN;
|
556
|
+
}
|
557
|
+
|
558
|
+
var colObj = section.getColumn(colIndex);
|
559
|
+
|
560
|
+
if (!colObj) {
|
561
|
+
return NaN; // The given column does not exist
|
562
|
+
}
|
563
|
+
|
564
|
+
var noFitting = this._getColumnOption(colIndex, "noFitting");
|
565
|
+
|
566
|
+
if (noFitting) {
|
567
|
+
return NaN;
|
568
|
+
}
|
569
|
+
|
570
|
+
var width, dummyCell;
|
571
|
+
|
572
|
+
var contentFitting = this._getColumnOption(colIndex, "contentFitting");
|
573
|
+
|
574
|
+
if (contentFitting) {
|
575
|
+
width = this._getColumnFitContentWidth(colIndex);
|
576
|
+
width = this._calculateCellWidth(colIndex, host, width);
|
577
|
+
} else {
|
578
|
+
var text = this._getColumnFitContentText(colIndex);
|
579
|
+
|
580
|
+
dummyCell = this._getDummyCell(colIndex, text);
|
581
|
+
var columnElem = colObj.getElement();
|
582
|
+
columnElem.appendChild(dummyCell);
|
583
|
+
width = this._calculateCellWidth(colIndex, host);
|
584
|
+
columnElem.removeChild(dummyCell);
|
585
|
+
}
|
586
|
+
|
587
|
+
return width;
|
588
|
+
};
|
589
|
+
/** This is for backward compatability with old ColumnWidthAdjustingPlugin. The method is an alias of {@link ColumnFitterPlugin#calculateColumnWidth}
|
590
|
+
* @public
|
591
|
+
* @function
|
592
|
+
* @param {number} colIndex
|
593
|
+
* @return {number}
|
594
|
+
*/
|
595
|
+
|
596
|
+
|
597
|
+
ColumnFitterPlugin.prototype.getAdjustedColumnWidth = ColumnFitterPlugin.prototype.calculateColumnWidth;
|
598
|
+
/** Set all column widths to percentage width
|
599
|
+
* @public
|
600
|
+
*/
|
601
|
+
|
602
|
+
ColumnFitterPlugin.prototype.resetAllColumns = function () {
|
603
|
+
var hosts = this._hosts;
|
604
|
+
var colCount = this.getColumnCount();
|
605
|
+
var host, width, proportion;
|
606
|
+
|
607
|
+
for (var i = 0; i < hosts.length; i++) {
|
608
|
+
host = hosts[i];
|
609
|
+
|
610
|
+
for (var c = 0; c < colCount; c++) {
|
611
|
+
width = this._getColumnOption(c, "width");
|
612
|
+
proportion = this._getColumnOption(c, "scalable");
|
613
|
+
|
614
|
+
if (width != null) {
|
615
|
+
host.setColumnWidth(c, width, false);
|
616
|
+
} else {
|
617
|
+
host.setColumnWidth(c, 100, proportion !== false);
|
618
|
+
}
|
619
|
+
}
|
620
|
+
}
|
621
|
+
};
|
622
|
+
/** @private */
|
623
|
+
|
624
|
+
|
625
|
+
ColumnFitterPlugin.prototype._onPostSectionDataBinding = function () {
|
626
|
+
if (!this._autoAdjust) {
|
627
|
+
return;
|
628
|
+
}
|
629
|
+
|
630
|
+
if (this._synchronousRendering) {
|
631
|
+
this.adjustColumns(null, false);
|
632
|
+
return;
|
633
|
+
}
|
634
|
+
|
635
|
+
if (!this._timerId) {
|
636
|
+
this._timerId = setTimeout(this._onTimeout, this._interval);
|
637
|
+
}
|
638
|
+
};
|
639
|
+
/** @private
|
640
|
+
* @param {Object} e
|
641
|
+
*/
|
642
|
+
|
643
|
+
|
644
|
+
ColumnFitterPlugin.prototype._onColumnAdded = function (e) {
|
645
|
+
var context = e.context;
|
646
|
+
var colIndex = e.colIndex;
|
647
|
+
|
648
|
+
this._retrieveBooleanColumnOption(context, "noFitting", colIndex);
|
649
|
+
|
650
|
+
this._retrieveBooleanColumnOption(context, "contentFitting", colIndex);
|
651
|
+
|
652
|
+
this._retrieveColumnOption(context, "width", colIndex);
|
653
|
+
|
654
|
+
this._retrieveColumnOption(context, "scalable", colIndex);
|
655
|
+
|
656
|
+
this._retrieveColumnOption(context, "minWidth", colIndex); // NOTE: minWidth is also used in core grid. This will make minWidth option redundant.
|
657
|
+
|
658
|
+
|
659
|
+
this._retrieveColumnOption(context, "maxWidth", colIndex);
|
660
|
+
|
661
|
+
this._synchronousRendering = true;
|
662
|
+
};
|
663
|
+
/** @private */
|
664
|
+
|
665
|
+
|
666
|
+
ColumnFitterPlugin.prototype._onTimeout = function () {
|
667
|
+
this._timerId = 0;
|
668
|
+
this.adjustColumns(null, false);
|
669
|
+
};
|
670
|
+
/** @private
|
671
|
+
* @param {Array.<number>=} colIndices Column indices
|
672
|
+
* @param {boolean} force
|
673
|
+
* @return {!Array.<Object>}
|
674
|
+
*/
|
675
|
+
|
676
|
+
|
677
|
+
ColumnFitterPlugin.prototype._collectCandidates = function (colIndices, force) {
|
678
|
+
var host = this._hosts[0];
|
679
|
+
var section = host ? host.getSection("content") : null;
|
680
|
+
|
681
|
+
if (!section) {
|
682
|
+
return [];
|
683
|
+
}
|
684
|
+
|
685
|
+
var candidate;
|
686
|
+
var candidates = [];
|
687
|
+
var len = colIndices ? colIndices.length : host.getColumnCount();
|
688
|
+
|
689
|
+
for (var i = 0; i < len; ++i) {
|
690
|
+
candidate = this._collectCandidate(section, colIndices ? colIndices[i] : i, force);
|
691
|
+
|
692
|
+
if (candidate) {
|
693
|
+
candidates.push(candidate);
|
694
|
+
}
|
695
|
+
}
|
696
|
+
|
697
|
+
return candidates;
|
698
|
+
};
|
699
|
+
/** @private
|
700
|
+
* @param {Object} section ILayoutGrid
|
701
|
+
* @param {number} colIndex
|
702
|
+
* @param {boolean} force
|
703
|
+
* @return {Object}
|
704
|
+
*/
|
705
|
+
|
706
|
+
|
707
|
+
ColumnFitterPlugin.prototype._collectCandidate = function (section, colIndex, force) {
|
708
|
+
var colObj = section.getColumn(colIndex);
|
709
|
+
|
710
|
+
if (colObj) {
|
711
|
+
var obj = {
|
712
|
+
index: colIndex,
|
713
|
+
elem: colObj.getElement()
|
714
|
+
};
|
715
|
+
var noFitting = force ? false : this._getColumnOption(colIndex, "noFitting");
|
716
|
+
|
717
|
+
var contentFitting = this._getColumnOption(colIndex, "contentFitting");
|
718
|
+
|
719
|
+
if (!noFitting) {
|
720
|
+
if (contentFitting) {
|
721
|
+
var width = this._getColumnFitContentWidth(colIndex);
|
722
|
+
|
723
|
+
if (width > 0) {
|
724
|
+
obj.width = width;
|
725
|
+
}
|
726
|
+
} else {
|
727
|
+
var text = this._getColumnFitContentText(colIndex);
|
728
|
+
|
729
|
+
if (text) {
|
730
|
+
obj.text = text;
|
731
|
+
}
|
732
|
+
}
|
733
|
+
}
|
734
|
+
|
735
|
+
return obj;
|
736
|
+
}
|
737
|
+
|
738
|
+
return null;
|
739
|
+
};
|
740
|
+
/** @private
|
741
|
+
* @description Calculate width of cell's custom rendered content
|
742
|
+
* @param {number} colIndex
|
743
|
+
* @return {number}
|
744
|
+
*/
|
745
|
+
|
746
|
+
|
747
|
+
ColumnFitterPlugin.prototype._getColumnFitContentWidth = function (colIndex) {
|
748
|
+
var w, contentWidth;
|
749
|
+
var width = 0;
|
750
|
+
|
751
|
+
var cellPadding = this._getCellPadding(colIndex);
|
752
|
+
|
753
|
+
for (var i = this._hosts.length; --i >= 0;) {
|
754
|
+
var host = this._hosts[i];
|
755
|
+
var sections = host.getAllSections("content");
|
756
|
+
var sectionCount = sections.length;
|
757
|
+
|
758
|
+
for (var s = 0; s < sectionCount; s++) {
|
759
|
+
var section = sections[s];
|
760
|
+
var rowCount = section.getRowCount();
|
761
|
+
|
762
|
+
for (var r = 0; r < rowCount; r++) {
|
763
|
+
var cell = section.getCell(colIndex, r, false);
|
764
|
+
|
765
|
+
if (!cell) {
|
766
|
+
continue;
|
767
|
+
}
|
768
|
+
|
769
|
+
var cellElem = cell.getElement();
|
770
|
+
|
771
|
+
if (cellElem.classList.contains("tr-stretched")) {
|
772
|
+
continue;
|
773
|
+
}
|
774
|
+
|
775
|
+
var content = cell.getContent();
|
776
|
+
|
777
|
+
if (content && cellElem && cell.isVisible()) {
|
778
|
+
w = contentWidth = content.offsetWidth;
|
779
|
+
var children = content.children;
|
780
|
+
|
781
|
+
var isWidth100Pct = ColumnFitterPlugin._almost100Pct(contentWidth + cellPadding, cellElem.offsetWidth);
|
782
|
+
|
783
|
+
var hasChild = children.length > 0;
|
784
|
+
|
785
|
+
if (isWidth100Pct && hasChild) {
|
786
|
+
// Content width is 100% of cell.
|
787
|
+
w = ColumnFitterPlugin._sumChildrenWidth(children); // Use children to calculate width
|
788
|
+
}
|
789
|
+
|
790
|
+
if (w > width) {
|
791
|
+
width = w;
|
792
|
+
}
|
793
|
+
}
|
794
|
+
}
|
795
|
+
}
|
796
|
+
}
|
797
|
+
|
798
|
+
if (!width) {
|
799
|
+
// If there is no with, clear cell padding cache.
|
800
|
+
this._cellPaddings[colIndex] = 0;
|
801
|
+
return 0;
|
802
|
+
}
|
803
|
+
|
804
|
+
return width + cellPadding;
|
805
|
+
};
|
806
|
+
/** @private
|
807
|
+
* @param {number} colIndex
|
808
|
+
* @return {string}
|
809
|
+
*/
|
810
|
+
|
811
|
+
|
812
|
+
ColumnFitterPlugin.prototype._getColumnFitContentText = function (colIndex) {
|
813
|
+
var maxLen = NaN;
|
814
|
+
var filteringChars = 3; // TODO: Change this default value
|
815
|
+
|
816
|
+
var texts = [];
|
817
|
+
|
818
|
+
for (var i = this._hosts.length; --i >= 0;) {
|
819
|
+
var host = this._hosts[i];
|
820
|
+
var sections = host.getAllSections("content"); // TODO: Get data from the datasource
|
821
|
+
|
822
|
+
if (this._title) {
|
823
|
+
sections = host.getAllSections("title").concat(sections);
|
824
|
+
}
|
825
|
+
|
826
|
+
var sectionCount = sections.length;
|
827
|
+
|
828
|
+
for (var s = 0; s < sectionCount; s++) {
|
829
|
+
var section = sections[s];
|
830
|
+
var rowCount = section.getRowCount();
|
831
|
+
|
832
|
+
for (var r = 0; r < rowCount; r++) {
|
833
|
+
var cell = section.getCell(colIndex, r, false); // Ignore cell span
|
834
|
+
|
835
|
+
if (!cell) {
|
836
|
+
continue;
|
837
|
+
}
|
838
|
+
|
839
|
+
var text = cell.getTextContent(); // Content can only be string
|
840
|
+
|
841
|
+
if (text && cell.getElement() && cell.isVisible()) {
|
842
|
+
// Due to timer nature of the algorithm
|
843
|
+
var textLen = text.length;
|
844
|
+
|
845
|
+
if (textLen <= maxLen) {
|
846
|
+
if (textLen >= maxLen - filteringChars) {
|
847
|
+
texts.push(text);
|
848
|
+
}
|
849
|
+
} else {
|
850
|
+
maxLen = textLen;
|
851
|
+
texts.push(text);
|
852
|
+
}
|
853
|
+
}
|
854
|
+
}
|
855
|
+
}
|
856
|
+
}
|
857
|
+
|
858
|
+
return texts.length ? texts.join("\n") : "";
|
859
|
+
};
|
860
|
+
/** @private
|
861
|
+
* @param {number} colIndex
|
862
|
+
* @param {string=} text
|
863
|
+
* @return {Element}
|
864
|
+
*/
|
865
|
+
|
866
|
+
|
867
|
+
ColumnFitterPlugin.prototype._getDummyCell = function (colIndex, text) {
|
868
|
+
var dummyCell = this._dummyCells[colIndex];
|
869
|
+
|
870
|
+
if (!dummyCell) {
|
871
|
+
dummyCell = this._dummyCells[colIndex] = ColumnFitterPlugin._createDummyCell();
|
872
|
+
}
|
873
|
+
|
874
|
+
if (text) {
|
875
|
+
// TODO: Check if we can find a better way to improve innerText
|
876
|
+
dummyCell.innerText = text; // innerText will populate <br> tag from the newline character '\n'
|
877
|
+
}
|
878
|
+
|
879
|
+
return dummyCell;
|
880
|
+
};
|
881
|
+
/** @private
|
882
|
+
* @param {number} colIndex
|
883
|
+
* @return {number}
|
884
|
+
*/
|
885
|
+
|
886
|
+
|
887
|
+
ColumnFitterPlugin.prototype._getCellPadding = function (colIndex) {
|
888
|
+
var cellPadding = this._cellPaddings[colIndex];
|
889
|
+
|
890
|
+
if (cellPadding > 0) {
|
891
|
+
return cellPadding;
|
892
|
+
}
|
893
|
+
|
894
|
+
var host = this._hosts[0];
|
895
|
+
var section = host ? host.getSection("content") : null;
|
896
|
+
var colObj = section.getColumn(colIndex);
|
897
|
+
|
898
|
+
if (!colObj) {
|
899
|
+
cellPadding = this._cellPaddings[colIndex] = NaN;
|
900
|
+
return cellPadding;
|
901
|
+
}
|
902
|
+
|
903
|
+
var columnElem = colObj.getElement();
|
904
|
+
|
905
|
+
var dummyCell = ColumnFitterPlugin._createDummyCell();
|
906
|
+
|
907
|
+
columnElem.appendChild(dummyCell);
|
908
|
+
var width = this._cellPaddings[colIndex] = dummyCell.offsetWidth;
|
909
|
+
columnElem.removeChild(dummyCell);
|
910
|
+
return width;
|
911
|
+
};
|
912
|
+
/** @private
|
913
|
+
* @param {number} colIndex
|
914
|
+
* @param {Object} grid core grid object
|
915
|
+
* @param {number=} opt_width Optional initial width
|
916
|
+
* @return {number}
|
917
|
+
*/
|
918
|
+
|
919
|
+
|
920
|
+
ColumnFitterPlugin.prototype._calculateCellWidth = function (colIndex, grid, opt_width) {
|
921
|
+
var minWidth = NaN;
|
922
|
+
var maxWidth = NaN;
|
923
|
+
var colDef = grid.getColumnData(colIndex);
|
924
|
+
|
925
|
+
if (colDef) {
|
926
|
+
minWidth = colDef["minWidth"] || NaN;
|
927
|
+
maxWidth = colDef["maxWidth"] || NaN;
|
928
|
+
}
|
929
|
+
|
930
|
+
var width;
|
931
|
+
|
932
|
+
if (opt_width) {
|
933
|
+
width = opt_width;
|
934
|
+
} else {
|
935
|
+
var dummyCell = this._dummyCells[colIndex];
|
936
|
+
|
937
|
+
if (dummyCell) {
|
938
|
+
// NOTE: If font isn't cached, comparison is being done against Arial instead of Proxima Nova, thus yielding wrong offsetwidth
|
939
|
+
width = dummyCell.offsetWidth; // TODO: Handle case where the column is hidden or virtualized
|
940
|
+
}
|
941
|
+
}
|
942
|
+
|
943
|
+
if (width) {
|
944
|
+
width += this._paddingSize;
|
945
|
+
|
946
|
+
if (width > maxWidth) {
|
947
|
+
width = maxWidth;
|
948
|
+
}
|
949
|
+
|
950
|
+
if (width < minWidth) {
|
951
|
+
width = minWidth;
|
952
|
+
}
|
953
|
+
}
|
954
|
+
|
955
|
+
return width;
|
956
|
+
};
|
957
|
+
/** @private
|
958
|
+
* @param {NodeList} childNodes
|
959
|
+
* @return {number}
|
960
|
+
*/
|
961
|
+
|
962
|
+
|
963
|
+
ColumnFitterPlugin._sumChildrenWidth = function (childNodes) {
|
964
|
+
var len = childNodes.length;
|
965
|
+
|
966
|
+
if (len > 0) {
|
967
|
+
var last = childNodes[len - 1];
|
968
|
+
var first = childNodes[0];
|
969
|
+
return last.offsetWidth + last.offsetLeft - first.offsetLeft;
|
970
|
+
}
|
971
|
+
|
972
|
+
return 0;
|
973
|
+
};
|
974
|
+
/** @private
|
975
|
+
* @return {Element}
|
976
|
+
*/
|
977
|
+
|
978
|
+
|
979
|
+
ColumnFitterPlugin._createDummyCell = function () {
|
980
|
+
var dummyCell = document.createElement("div");
|
981
|
+
dummyCell.className = "cell";
|
982
|
+
dummyCell.style.whiteSpace = "nowrap"; // Inline style will override everything
|
983
|
+
|
984
|
+
dummyCell.style.width = "auto";
|
985
|
+
dummyCell.style.display = "table";
|
986
|
+
return dummyCell;
|
987
|
+
};
|
988
|
+
/** @private
|
989
|
+
* @param {number} val1
|
990
|
+
* @param {number} val2
|
991
|
+
* @return {boolean}
|
992
|
+
*/
|
993
|
+
|
994
|
+
|
995
|
+
ColumnFitterPlugin._almost100Pct = function (val1, val2) {
|
996
|
+
return (val1 > val2 ? val2 / val1 : val1 / val2) >= 0.97;
|
997
|
+
};
|
998
|
+
|
999
|
+
export default ColumnFitterPlugin;
|
1000
|
+
export { ColumnFitterPlugin, ColumnFitterPlugin as ColumnFitter, ColumnFitterPlugin as ColumnFitterExtension };
|