@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,761 @@
|
|
1
|
+
import { Dom } from "../../tr-grid-util/es6/Dom.js";
|
2
|
+
import { injectCss, prettifyCss } from "../../tr-grid-util/es6/Util.js";
|
3
|
+
import { Table } from "../../tr-grid-util/es6/Table.js";
|
4
|
+
|
5
|
+
import { PrintTrait } from "./PrintTrait.js";
|
6
|
+
import { SectionWriter } from "./SectionWriter.js";
|
7
|
+
|
8
|
+
|
9
|
+
/** @private
|
10
|
+
* @type {Node}
|
11
|
+
*/
|
12
|
+
var _dummyNode = null;
|
13
|
+
|
14
|
+
|
15
|
+
/** TODO: Move this logic to PrintTrait
|
16
|
+
* @private
|
17
|
+
* @param {Object=} options
|
18
|
+
* @return {!Object}
|
19
|
+
*/
|
20
|
+
var _getPageSize = function (options) {
|
21
|
+
var pageWidth = 0;
|
22
|
+
var pageHeight = 0;
|
23
|
+
|
24
|
+
if (options) {
|
25
|
+
if (options["pageWidth"]) {
|
26
|
+
pageWidth = options["pageWidth"];
|
27
|
+
}
|
28
|
+
if (options["pageHeight"]) {
|
29
|
+
pageHeight = options["pageHeight"];
|
30
|
+
}
|
31
|
+
}
|
32
|
+
if (!pageWidth) {
|
33
|
+
pageWidth = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);
|
34
|
+
}
|
35
|
+
if (!pageHeight) {
|
36
|
+
pageHeight = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);
|
37
|
+
}
|
38
|
+
|
39
|
+
// TODO: Subtract page margins
|
40
|
+
pageWidth -= 2; // HACK: Prevent chrome from populating table incorrectly
|
41
|
+
pageHeight -= 10; // HACK: Prevent chrome from populating table incorrectly
|
42
|
+
|
43
|
+
return {
|
44
|
+
"pageWidth": pageWidth,
|
45
|
+
"pageHeight": pageHeight
|
46
|
+
};
|
47
|
+
};
|
48
|
+
|
49
|
+
/** @private
|
50
|
+
* @param {Node} nodeA
|
51
|
+
* @param {Node} nodeB
|
52
|
+
*/
|
53
|
+
var swapNode = function (nodeA, nodeB) {
|
54
|
+
if (!nodeA || !nodeB || !nodeA.parentNode || !nodeB.parentNode) {
|
55
|
+
Dom.removeParent(nodeA);
|
56
|
+
Dom.removeParent(nodeB);
|
57
|
+
return;
|
58
|
+
}
|
59
|
+
|
60
|
+
if (!_dummyNode) {
|
61
|
+
_dummyNode = document.createElement("span");
|
62
|
+
}
|
63
|
+
|
64
|
+
nodeA.parentNode.replaceChild(_dummyNode, nodeA);
|
65
|
+
nodeB.parentNode.replaceChild(nodeA, nodeB);
|
66
|
+
_dummyNode.parentNode.replaceChild(nodeB, _dummyNode);
|
67
|
+
};
|
68
|
+
/** @private
|
69
|
+
* @param {Node} fromNode
|
70
|
+
* @param {Node} toNode
|
71
|
+
*/
|
72
|
+
var copyNode = function (fromNode, toNode) {
|
73
|
+
if (fromNode && toNode) {
|
74
|
+
var i, attrs;
|
75
|
+
if (toNode.hasAttributes()) {
|
76
|
+
attrs = toNode.attributes;
|
77
|
+
for (i = attrs.length; --i >= 0;) {
|
78
|
+
toNode.removeAttribute(attrs[i].name);
|
79
|
+
}
|
80
|
+
}
|
81
|
+
|
82
|
+
if (fromNode.hasAttributes()) {
|
83
|
+
attrs = fromNode.attributes;
|
84
|
+
for (i = attrs.length; --i >= 0;) {
|
85
|
+
toNode.setAttribute(attrs[i].name, attrs[i].value);
|
86
|
+
}
|
87
|
+
}
|
88
|
+
|
89
|
+
Dom.removeChildren(toNode);
|
90
|
+
|
91
|
+
var chdr = fromNode.childNodes;
|
92
|
+
var childCount = chdr.length;
|
93
|
+
for (i = 0; i < childCount; ++i) {
|
94
|
+
toNode.appendChild(chdr[i].cloneNode(true));
|
95
|
+
}
|
96
|
+
}
|
97
|
+
};
|
98
|
+
|
99
|
+
/** @private
|
100
|
+
* @param {Table|SubTable} tbl
|
101
|
+
* @param {number} colIndex
|
102
|
+
* @param {string} alignment
|
103
|
+
*/
|
104
|
+
var _setColumnAlignment = function (tbl, colIndex, alignment) {
|
105
|
+
if (!alignment || alignment === "default") {
|
106
|
+
return;
|
107
|
+
}
|
108
|
+
var cells = tbl.getCellsInColumn(colIndex);
|
109
|
+
if (!cells) return;
|
110
|
+
for (var i = cells.length; --i >= 0;) {
|
111
|
+
var cell = cells[i];
|
112
|
+
cell.classList.add("tr-align-" + alignment);
|
113
|
+
}
|
114
|
+
};
|
115
|
+
|
116
|
+
/** @namespaces
|
117
|
+
*/
|
118
|
+
var GridPrinter = {};
|
119
|
+
/** @private
|
120
|
+
* @type {string}
|
121
|
+
*/
|
122
|
+
GridPrinter._styles = ""; // Static variable
|
123
|
+
/** @type {PrintTrait}
|
124
|
+
* @private
|
125
|
+
*/
|
126
|
+
GridPrinter._printTrait = null;
|
127
|
+
/** @type {Element}
|
128
|
+
* @private
|
129
|
+
*/
|
130
|
+
GridPrinter._blankPage = null;
|
131
|
+
/** @type {tr.Grid}
|
132
|
+
* @private
|
133
|
+
*/
|
134
|
+
GridPrinter._grid = null;
|
135
|
+
/** @type {boolean}
|
136
|
+
* @private
|
137
|
+
*/
|
138
|
+
GridPrinter._isObserving = false;
|
139
|
+
/** @type {!Object}
|
140
|
+
* @private
|
141
|
+
*/
|
142
|
+
GridPrinter._options = {};
|
143
|
+
|
144
|
+
/** @public
|
145
|
+
* @param {GridPrinter.Options} options
|
146
|
+
*/
|
147
|
+
GridPrinter.setPrintOptions = function (options) {
|
148
|
+
if (options) {
|
149
|
+
GridPrinter._options = options;
|
150
|
+
} else {
|
151
|
+
GridPrinter._options = {};
|
152
|
+
}
|
153
|
+
};
|
154
|
+
|
155
|
+
/** @public
|
156
|
+
* @param {HTMLIFrameElement=} iFrameElement If not specified, current window is used instead. Specify null to un-observe existing window object.
|
157
|
+
*/
|
158
|
+
GridPrinter.observe = function (iFrameElement) {
|
159
|
+
var pt = GridPrinter._getPrintTrait();
|
160
|
+
pt.observe(iFrameElement);
|
161
|
+
GridPrinter._isObserving = pt.isObserving();
|
162
|
+
};
|
163
|
+
/** @public
|
164
|
+
*/
|
165
|
+
GridPrinter.unobserve = function () {
|
166
|
+
GridPrinter._getPrintTrait().unobserve();
|
167
|
+
};
|
168
|
+
/** @public
|
169
|
+
* @param {boolean=} bool
|
170
|
+
*/
|
171
|
+
GridPrinter.enableDebugMode = function (bool) {
|
172
|
+
PrintTrait.DEBUG = bool !== false;
|
173
|
+
};
|
174
|
+
|
175
|
+
/** @public
|
176
|
+
* @param {tr.Grid} grid
|
177
|
+
* @param {Object=} options
|
178
|
+
* @return {!Object}
|
179
|
+
*/
|
180
|
+
GridPrinter.getPreFlightInfo = function (grid, options) {
|
181
|
+
var pfInfo = options || {};
|
182
|
+
if (!pfInfo.pageCount) {
|
183
|
+
pfInfo.pageCount = 0;
|
184
|
+
}
|
185
|
+
if (!grid) {
|
186
|
+
return pfInfo;
|
187
|
+
}
|
188
|
+
|
189
|
+
var colCount = grid.getColumnCount();
|
190
|
+
if (!colCount) {
|
191
|
+
return pfInfo;
|
192
|
+
}
|
193
|
+
pfInfo._calculated = false;
|
194
|
+
if (GridPrinter._options["pageWidth"]) {
|
195
|
+
options.pageWidth = GridPrinter._options["pageWidth"];
|
196
|
+
}
|
197
|
+
if (GridPrinter._options["pageHeight"]) {
|
198
|
+
options.pageHeight = GridPrinter._options["pageHeight"];
|
199
|
+
}
|
200
|
+
|
201
|
+
var pageSize = _getPageSize(options);
|
202
|
+
var pageWidth = pfInfo.pageWidth = pageSize.pageWidth;
|
203
|
+
var pageHeight = pfInfo.pageHeight = pageSize.pageHeight;
|
204
|
+
|
205
|
+
// Find primary column that will exist in every page
|
206
|
+
var c;
|
207
|
+
var primaryColIndex = 0;
|
208
|
+
var identifierCol = GridPrinter._options["identifierField"] || GridPrinter._options["primaryColumn"];
|
209
|
+
// if(typeof identifierCol === "string") {
|
210
|
+
// for(c = 0; c < colCount; ++c) {
|
211
|
+
// if() {
|
212
|
+
// }
|
213
|
+
// }
|
214
|
+
// } else
|
215
|
+
if (typeof identifierCol === "number") {
|
216
|
+
primaryColIndex = identifierCol;
|
217
|
+
}
|
218
|
+
|
219
|
+
var primaryCol = pfInfo.primaryColumn = GridPrinter._newColInfo(grid, primaryColIndex);
|
220
|
+
|
221
|
+
// Collect properties from all visible columns
|
222
|
+
// Create a column set that fit the page width
|
223
|
+
// Create multiple column sets for single grid
|
224
|
+
var colSets = []; // Each set will fit a single page
|
225
|
+
var colSet, colInfo;
|
226
|
+
// var defaultMinWidth = 50; // WARNING: Hardcoded value
|
227
|
+
var availSpace = 0;
|
228
|
+
for (c = 0; c < colCount; ++c) {
|
229
|
+
if (c == primaryCol.index) {
|
230
|
+
continue;
|
231
|
+
}
|
232
|
+
|
233
|
+
var colVisible = grid.isColumnVisible(c);
|
234
|
+
if (!colVisible) {
|
235
|
+
continue;
|
236
|
+
}
|
237
|
+
colInfo = GridPrinter._newColInfo(grid, c);
|
238
|
+
|
239
|
+
availSpace -= colInfo.width;
|
240
|
+
if (availSpace <= 0 || !colSets.length) {
|
241
|
+
colSet = {
|
242
|
+
columns: []
|
243
|
+
};
|
244
|
+
colSet.columns.push(primaryCol); // Primary column must exist as the first column on each page
|
245
|
+
availSpace = pageWidth - primaryCol.width;
|
246
|
+
availSpace -= colInfo.width;
|
247
|
+
|
248
|
+
colSets.push(colSet);
|
249
|
+
}
|
250
|
+
colSet.columns.push(colInfo);
|
251
|
+
}
|
252
|
+
|
253
|
+
|
254
|
+
var colSetCount = colSets.length;
|
255
|
+
if (!colSetCount) {
|
256
|
+
colSetCount = 1;
|
257
|
+
colSets.push([primaryCol]);
|
258
|
+
}
|
259
|
+
pfInfo.columnSets = colSets;
|
260
|
+
|
261
|
+
// Resolve scalable columns and width
|
262
|
+
for (var i = 0; i < colSetCount; ++i) {
|
263
|
+
colSet = colSets[i];
|
264
|
+
colCount = colSet.columns.length;
|
265
|
+
var scalableColumns = [];
|
266
|
+
availSpace = pageWidth;
|
267
|
+
for (c = 0; c < colCount; ++c) {
|
268
|
+
colInfo = colSet.columns[c];
|
269
|
+
if (colInfo.scalability) {
|
270
|
+
scalableColumns.push(colInfo);
|
271
|
+
} else {
|
272
|
+
availSpace -= colInfo.width;
|
273
|
+
}
|
274
|
+
}
|
275
|
+
var scalableColCount = scalableColumns.length;
|
276
|
+
if (scalableColCount) {
|
277
|
+
var avgWidth = (availSpace / scalableColCount); // TODO: Take min width into account
|
278
|
+
for (c = 0; c < scalableColCount; ++c) {
|
279
|
+
scalableColumns[c].width = (avgWidth * (c + 1) | 0) - (avgWidth * c | 0);
|
280
|
+
}
|
281
|
+
}
|
282
|
+
|
283
|
+
var totalWidth = 0;
|
284
|
+
var widths = colSet.widths = new Array(colCount);
|
285
|
+
for (c = 0; c < colCount; ++c) {
|
286
|
+
colInfo = colSet.columns[c];
|
287
|
+
widths[c] = colInfo.width;
|
288
|
+
totalWidth += colInfo.width;
|
289
|
+
}
|
290
|
+
colSet.width = totalWidth;
|
291
|
+
}
|
292
|
+
|
293
|
+
// Find total row count per table. Remove all empty rows after the last occupied row.
|
294
|
+
var dv = grid.getDataSource();
|
295
|
+
var totalRowCount = pfInfo.totalRowcount = dv.getVisibleRowCount();
|
296
|
+
|
297
|
+
// Find cutoff point for each page
|
298
|
+
var titleSect = grid.getSection("title");
|
299
|
+
var headerHeight = pfInfo.headerHeight = (titleSect.isVisible()) ? titleSect.getDefaultRowHeight() : 0;
|
300
|
+
var rowHeight = pfInfo.rowHeight = grid.getSection("content").getDefaultRowHeight();
|
301
|
+
var maxRowPerPage = (pageHeight - headerHeight) / rowHeight | 0;
|
302
|
+
if (!(maxRowPerPage > 0)) { // NaN, negative number, or zero is not allowed.
|
303
|
+
maxRowPerPage = 1; // number of content rows
|
304
|
+
}
|
305
|
+
pfInfo.maxRowPerPage = maxRowPerPage;
|
306
|
+
|
307
|
+
var gridCount = pfInfo.gridCount = Math.ceil(totalRowCount / maxRowPerPage); // Number of grid require to render all of the rows. Grid must fit a single page
|
308
|
+
// var lastPageRowCount = totalRowCount - (totalRowCount / maxRowPerPage | 0);
|
309
|
+
pfInfo.pageCount = gridCount * colSetCount;
|
310
|
+
|
311
|
+
|
312
|
+
// TODO: Stack the table horizontally, if there is enough space
|
313
|
+
// if(colSetCount == 1 && pageCount > 1) {
|
314
|
+
// availSpace = pageWidth;
|
315
|
+
// tableWidth = tables[0]._width;
|
316
|
+
// var numGridPerPage = Math.floor(pageWidth / tableWidth);
|
317
|
+
|
318
|
+
// var margin = 4;
|
319
|
+
// var takenSpace = numTablePerPage * tableWidth + (numTablePerPage - 1) * margin;
|
320
|
+
// if(takenSpace > pageWidth) {
|
321
|
+
// numGridPerPage--; // There is not enough space for margin
|
322
|
+
// }
|
323
|
+
// if(numGridPerPage > 1) {
|
324
|
+
|
325
|
+
// }
|
326
|
+
// }
|
327
|
+
|
328
|
+
pfInfo._calculated = true; // Internal flag
|
329
|
+
|
330
|
+
return pfInfo;
|
331
|
+
};
|
332
|
+
|
333
|
+
/** @public
|
334
|
+
* @param {tr.Grid} grid
|
335
|
+
* @param {Object=} options
|
336
|
+
* @return {Element}
|
337
|
+
*/
|
338
|
+
GridPrinter.createPrintElement = function (grid, options) {
|
339
|
+
if (!grid) {
|
340
|
+
grid = GridPrinter._grid;
|
341
|
+
}
|
342
|
+
|
343
|
+
if (!grid) {
|
344
|
+
return null;
|
345
|
+
}
|
346
|
+
|
347
|
+
var pfInfo = options || GridPrinter._printInfo;
|
348
|
+
if (!pfInfo || !pfInfo._calculated) {
|
349
|
+
pfInfo = GridPrinter.getPreFlightInfo(grid, pfInfo);
|
350
|
+
}
|
351
|
+
|
352
|
+
// TODO: Check if we need to recalculate everything again
|
353
|
+
var maxRowPerPage = pfInfo.maxRowPerPage;
|
354
|
+
var totalRowCount = pfInfo.totalRowcount;
|
355
|
+
var rowHeight = pfInfo.rowHeight;
|
356
|
+
var headerHeight = pfInfo.headerHeight;
|
357
|
+
var colSets = pfInfo.columnSets;
|
358
|
+
var colSetCount = pfInfo.columnSets.length;
|
359
|
+
var primaryColumn = pfInfo.primaryColumn;
|
360
|
+
var gridCount = pfInfo.gridCount;
|
361
|
+
var contentWriter = new SectionWriter(); // content section
|
362
|
+
var headerWriter = new SectionWriter();
|
363
|
+
|
364
|
+
var gridContentSection = grid.getSectionSettings("content");
|
365
|
+
gridContentSection.snapshot(contentWriter);
|
366
|
+
|
367
|
+
var gridHeaderSection = grid.getSectionSettings("title");
|
368
|
+
if (gridHeaderSection) {
|
369
|
+
gridHeaderSection.snapshot(headerWriter);
|
370
|
+
}
|
371
|
+
|
372
|
+
// Begin element construction
|
373
|
+
var tables = [];
|
374
|
+
for (var t = 0; t < gridCount; ++t) { // For each table
|
375
|
+
var rowStart = t * maxRowPerPage;
|
376
|
+
var rowEnd = rowStart + maxRowPerPage;
|
377
|
+
if (rowEnd > totalRowCount) {
|
378
|
+
rowEnd = totalRowCount;
|
379
|
+
}
|
380
|
+
var rowCount = rowEnd - rowStart;
|
381
|
+
|
382
|
+
for (var s = 0; s < colSetCount; ++s) { // For each column set
|
383
|
+
var colSet = colSets[s];
|
384
|
+
var colCount = colSet.columns.length;
|
385
|
+
var c, col, colIndex;
|
386
|
+
var tbl = new Table(null, {
|
387
|
+
colCount: colCount,
|
388
|
+
rowCount: rowCount,
|
389
|
+
rowHeight: rowHeight
|
390
|
+
});
|
391
|
+
|
392
|
+
tbl.setColumnWidths(colSet.widths);
|
393
|
+
|
394
|
+
if (headerHeight) {
|
395
|
+
tbl.addHeaderRows(); // TODO: support multiple rows
|
396
|
+
var thead = tbl.getHeader();
|
397
|
+
thead.setDefaultRowHeight(headerHeight);
|
398
|
+
|
399
|
+
// Render header columns
|
400
|
+
for (c = 0; c < colCount; ++c) { // Create header and columns
|
401
|
+
col = colSet.columns[c];
|
402
|
+
colIndex = col.index;
|
403
|
+
copyNode(headerWriter.getCellElement(colIndex, 0), thead.getCell(c, 0));
|
404
|
+
_setColumnAlignment(thead, c, col.alignment);
|
405
|
+
}
|
406
|
+
|
407
|
+
// TODO: Span the header rows
|
408
|
+
}
|
409
|
+
|
410
|
+
// Render content section
|
411
|
+
for (c = 0; c < colCount; ++c) { // Populate each cell
|
412
|
+
col = colSet.columns[c];
|
413
|
+
colIndex = col.index;
|
414
|
+
var isPrimary = colIndex === primaryColumn.index;
|
415
|
+
|
416
|
+
for (var r = 0; r < rowCount; ++r) {
|
417
|
+
var rowIndex = rowStart + r;
|
418
|
+
var masterCell = contentWriter.getCellElement(colIndex, rowIndex);
|
419
|
+
var cell = tbl.getCell(c, r);
|
420
|
+
if (isPrimary) {
|
421
|
+
copyNode(masterCell, cell);
|
422
|
+
} else {
|
423
|
+
swapNode(masterCell, cell);
|
424
|
+
}
|
425
|
+
}
|
426
|
+
|
427
|
+
_setColumnAlignment(tbl, c, col.alignment);
|
428
|
+
}
|
429
|
+
|
430
|
+
tbl._tableNum = t;
|
431
|
+
tables.push(tbl);
|
432
|
+
}
|
433
|
+
}
|
434
|
+
|
435
|
+
// Produce the root element to be appended to the page
|
436
|
+
var pageCount = pfInfo.pageCount;
|
437
|
+
var rootElem = document.createElement("div");
|
438
|
+
rootElem.className = "tr-printing-root";
|
439
|
+
rootElem.style.display = "block"; // This will beat any CSS selector
|
440
|
+
for (t = 0; t < pageCount; ++t) {
|
441
|
+
rootElem.appendChild(tables[t].getElement());
|
442
|
+
}
|
443
|
+
// rootElem.appendChild(headerWriter.getElement());
|
444
|
+
// rootElem.appendChild(contentWriter.getElement());
|
445
|
+
|
446
|
+
return rootElem;
|
447
|
+
};
|
448
|
+
|
449
|
+
GridPrinter._applyCss = function () {
|
450
|
+
if (GridPrinter._styles) {
|
451
|
+
return;
|
452
|
+
}
|
453
|
+
GridPrinter._styles = prettifyCss([
|
454
|
+
".tr-printing-mode, .tr-printing-mode body", [
|
455
|
+
"width: 100%;",
|
456
|
+
"height: unset;",
|
457
|
+
"padding: 0;",
|
458
|
+
"margin: 0;",
|
459
|
+
"background-color: white;",
|
460
|
+
"overflow: hidden; /* No scrollbar for printing */"
|
461
|
+
],
|
462
|
+
".tr-printing-mode body > *", [
|
463
|
+
"display: none;"
|
464
|
+
],
|
465
|
+
".tr-printing-root", [
|
466
|
+
"width: 100%;",
|
467
|
+
"background-color: white;"
|
468
|
+
],
|
469
|
+
".tr-printing-root > *", [
|
470
|
+
"page-break-after: always;"
|
471
|
+
],
|
472
|
+
".tr-printing-root table", [
|
473
|
+
"border-collapse: collapse;",
|
474
|
+
"table-layout:fixed; /* To force clipping text */"
|
475
|
+
],
|
476
|
+
".tr-printing-root tr", [
|
477
|
+
"height: 21px;",
|
478
|
+
"color: unset;",
|
479
|
+
"background-color: unset;"
|
480
|
+
],
|
481
|
+
".tr-printing-root td", [
|
482
|
+
"border: 1px solid black;",
|
483
|
+
"padding: 0 5px;",
|
484
|
+
"height: unset;",
|
485
|
+
"font-size: 12px;",
|
486
|
+
"text-overflow: ellipsis;",
|
487
|
+
"white-space: nowrap;",
|
488
|
+
"overflow: hidden;"
|
489
|
+
],
|
490
|
+
".tr-printing-root td, .tr-printing-root tr:hover td, .tr-printing-root tr td:hover", [
|
491
|
+
"color: black;",
|
492
|
+
"background-color: white;"
|
493
|
+
],
|
494
|
+
".tr-printing-root .tr-align-left", [
|
495
|
+
"text-align: left;"
|
496
|
+
],
|
497
|
+
".tr-printing-root .tr-align-right", [
|
498
|
+
"text-align: right;"
|
499
|
+
],
|
500
|
+
".tr-printing-root .tr-align-center", [
|
501
|
+
"text-align: center;"
|
502
|
+
],
|
503
|
+
".tr-printing-root .cell ef-icon", [
|
504
|
+
"margin-top: 3px;"
|
505
|
+
],
|
506
|
+
".tr-printing-root .cell .sort-symbol", [
|
507
|
+
"margin-left: 4px;",
|
508
|
+
"display: inline-block;"
|
509
|
+
],
|
510
|
+
".tr-printing-root .cell .sort-symbol", [
|
511
|
+
"margin-left: 4px;",
|
512
|
+
"display: inline-block;"
|
513
|
+
],
|
514
|
+
// eslint-disable-next-line no-multi-str
|
515
|
+
".tr-printing-root .priority-symbol:last-child,\
|
516
|
+
.tr-printing-root .sortable-indicator:last-child,\
|
517
|
+
.tr-printing-root .sort-symbol:last-child", [
|
518
|
+
"margin-right: 0px;"
|
519
|
+
],
|
520
|
+
".tr-printing-root .sortable-indicator:last-child", [
|
521
|
+
"opacity: 0.5;"
|
522
|
+
],
|
523
|
+
".tr-printing-root .folder .expander", [
|
524
|
+
"margin-right: 7px;",
|
525
|
+
"margin-left: 3px;"
|
526
|
+
],
|
527
|
+
".tr-printing-root .folder .fallback-arrow", [
|
528
|
+
"vertical-align: middle;",
|
529
|
+
"font-size: 7px;",
|
530
|
+
"line-height: 1;",
|
531
|
+
"display: inline-block;", // For transformation
|
532
|
+
"transform: scaleX(1.5);",
|
533
|
+
"font-family: Arial;"
|
534
|
+
],
|
535
|
+
".tr-printing-root .folder.closed .expander", [
|
536
|
+
"transform: translate(0px, 1px) rotate(-90deg);"
|
537
|
+
],
|
538
|
+
".tr-printing-root .folder.closed .expander .fallback-arrow", [
|
539
|
+
"transform: translate(0px, -1px) rotate(-90deg) scaleX(1.5);"
|
540
|
+
],
|
541
|
+
".tr-printing-root .print-inline", [
|
542
|
+
"display:inline-block;"
|
543
|
+
],
|
544
|
+
".tr-printing-root .text", [
|
545
|
+
"vertical-align: middle;",
|
546
|
+
"overflow: hidden;",
|
547
|
+
"text-overflow: ellipsis;"
|
548
|
+
],
|
549
|
+
".tr-printing-root .group-header, .tr-printing-root .ric-arrow", [
|
550
|
+
"color: black !important;"
|
551
|
+
],
|
552
|
+
".tr-printing-root .group-header-box", [
|
553
|
+
"display: inline-block;",
|
554
|
+
"width: 180px;"
|
555
|
+
],
|
556
|
+
".tr-printing-root .group-header-box *", [
|
557
|
+
"display: inline-block;"
|
558
|
+
],
|
559
|
+
".tr-printing-root .tr-percent-bar", [
|
560
|
+
"position:relative;",
|
561
|
+
"text-align: left;",
|
562
|
+
"overflow: hidden;",
|
563
|
+
"white-space: nowrap;"
|
564
|
+
],
|
565
|
+
".tr-printing-root .tr-percent-bar>div", [
|
566
|
+
"position:relative;",
|
567
|
+
"display: inline-block;",
|
568
|
+
"height: 8px;",
|
569
|
+
"vertical-align: middle;"
|
570
|
+
],
|
571
|
+
".tr-printing-root .tr-percent-bar>div>div", [
|
572
|
+
"position:absolute;",
|
573
|
+
"height: 100%;"
|
574
|
+
],
|
575
|
+
".tr-printing-root .tr-percent-bar>span", [
|
576
|
+
"display: inline-block;",
|
577
|
+
"vertical-align: middle;",
|
578
|
+
"box-sizing: border-box;",
|
579
|
+
"padding-left: 4px;",
|
580
|
+
"padding-right: 4px;",
|
581
|
+
"overflow: hidden;",
|
582
|
+
"max-width: 100%;"
|
583
|
+
],
|
584
|
+
".tr-printing-wrapper", [
|
585
|
+
"white-space: nowrap;",
|
586
|
+
"overflow: hidden;"
|
587
|
+
],
|
588
|
+
"/* For safety */",
|
589
|
+
".tr-printing-wrapper > *", [
|
590
|
+
"display: inline-block;",
|
591
|
+
"vertical-align: top;"
|
592
|
+
],
|
593
|
+
".tr-printing-wrapper > * + *", [
|
594
|
+
"margin-left: 4px;"
|
595
|
+
],
|
596
|
+
".tr-blank-page", [
|
597
|
+
"page-break-after: always;",
|
598
|
+
"height: 1px;",
|
599
|
+
"visibility: hidden;"
|
600
|
+
],
|
601
|
+
".tr-printing-flex-row", [
|
602
|
+
"display: flex;",
|
603
|
+
"width: 100%;",
|
604
|
+
"min-width: 0;",
|
605
|
+
"align-items: center;"
|
606
|
+
],
|
607
|
+
".tr-printing-flex-row>*:not(.tr-printing-float-right)", [
|
608
|
+
"flex: 1 1 0;"
|
609
|
+
],
|
610
|
+
"@media screen", [
|
611
|
+
prettifyCss([
|
612
|
+
"/* For debugging */",
|
613
|
+
".tr-printing-mode", [
|
614
|
+
"overflow: auto;",
|
615
|
+
"background-color: lightgrey;"
|
616
|
+
],
|
617
|
+
".tr-printing-root > * + *", [
|
618
|
+
"margin-top: 4px;"
|
619
|
+
]
|
620
|
+
])
|
621
|
+
]
|
622
|
+
]);
|
623
|
+
injectCss(GridPrinter._styles, document.body);
|
624
|
+
};
|
625
|
+
|
626
|
+
/** @public
|
627
|
+
* @param {tr.Grid} grid
|
628
|
+
*/
|
629
|
+
GridPrinter.print = function (grid) {
|
630
|
+
var core = null;
|
631
|
+
if (grid) {
|
632
|
+
GridPrinter._applyCss();
|
633
|
+
try {
|
634
|
+
if (grid.api) { // ef-grid or atlas-blotter
|
635
|
+
core = grid.api.getCoreGrid();
|
636
|
+
} else if (grid.getCoreGrid) { // tr.CompositeGrid or rt.Grid
|
637
|
+
core = grid.getCoreGrid();
|
638
|
+
} else if (grid instanceof tr.Grid) {
|
639
|
+
core = grid;
|
640
|
+
}
|
641
|
+
} catch (err) {
|
642
|
+
console.log("Cannot print the given object");
|
643
|
+
}
|
644
|
+
}
|
645
|
+
|
646
|
+
if (core) {
|
647
|
+
GridPrinter._grid = core;
|
648
|
+
|
649
|
+
var pt = GridPrinter._getPrintTrait(); // initialize
|
650
|
+
if (!GridPrinter._isObserving) {
|
651
|
+
pt.observe(); // Observe current window
|
652
|
+
}
|
653
|
+
|
654
|
+
pt.print();
|
655
|
+
} else {
|
656
|
+
GridPrinter._grid = null;
|
657
|
+
}
|
658
|
+
};
|
659
|
+
|
660
|
+
|
661
|
+
/** @private
|
662
|
+
* @return {!PrintTrait}
|
663
|
+
*/
|
664
|
+
GridPrinter._getPrintTrait = function () {
|
665
|
+
var pt = GridPrinter._printTrait;
|
666
|
+
if (!pt) {
|
667
|
+
pt = GridPrinter._printTrait = new PrintTrait();
|
668
|
+
// TODO: this._printTrait.fixPaperSize(); // WORKAROUND: We cannot detect the change in paper size during the browser's preview dialog.
|
669
|
+
|
670
|
+
pt.addEventListener('pageCounting', GridPrinter._onPageCounting);
|
671
|
+
pt.addEventListener('beforeprint', GridPrinter._onBeforePrint);
|
672
|
+
pt.addEventListener('afterprint', GridPrinter._onAfterPrint);
|
673
|
+
}
|
674
|
+
return pt;
|
675
|
+
};
|
676
|
+
/** @private
|
677
|
+
* @param {tr.Grid} grid
|
678
|
+
* @param {number} idx
|
679
|
+
* @return {!Object}
|
680
|
+
*/
|
681
|
+
GridPrinter._newColInfo = function (grid, idx) {
|
682
|
+
var minWidth = grid.getMinimumColumnWidth(idx);
|
683
|
+
if (minWidth <= 0) {
|
684
|
+
minWidth = 50; // WARNING: Hard-coded value
|
685
|
+
}
|
686
|
+
var scalability = grid.getColumnScalability(idx);
|
687
|
+
var width = scalability ? minWidth : grid.getColumnWidth(idx);
|
688
|
+
|
689
|
+
return {
|
690
|
+
"index": idx,
|
691
|
+
"width": width,
|
692
|
+
"data": grid.getColumnData(idx),
|
693
|
+
"scalability": scalability,
|
694
|
+
"minWidth": minWidth,
|
695
|
+
"alignment": grid.getColumnAlignment(idx)
|
696
|
+
};
|
697
|
+
};
|
698
|
+
/** @private
|
699
|
+
*/
|
700
|
+
GridPrinter._removePrintElements = function () {
|
701
|
+
Dom.removeParent(GridPrinter._blankPage);
|
702
|
+
GridPrinter._blankPage = null;
|
703
|
+
|
704
|
+
Dom.removeParent(GridPrinter._printElem);
|
705
|
+
GridPrinter._printElem = null;
|
706
|
+
};
|
707
|
+
|
708
|
+
|
709
|
+
/** @private
|
710
|
+
* @param {Object} e Event argument created from PrintTrait
|
711
|
+
*/
|
712
|
+
GridPrinter._onPageCounting = function (e) {
|
713
|
+
GridPrinter._removePrintElements();
|
714
|
+
|
715
|
+
GridPrinter._printInfo = GridPrinter.getPreFlightInfo(GridPrinter._grid, e);
|
716
|
+
if (GridPrinter._printInfo.pageCount) {
|
717
|
+
// There is no need to render anything at this phase
|
718
|
+
GridPrinter._blankPage = PrintTrait.createBlankPages(GridPrinter._printInfo.pageCount);
|
719
|
+
e.bodyElement.appendChild(GridPrinter._blankPage);
|
720
|
+
}
|
721
|
+
};
|
722
|
+
/** @private
|
723
|
+
* @param {Object} e
|
724
|
+
*/
|
725
|
+
GridPrinter._onBeforePrint = function (e) {
|
726
|
+
GridPrinter._removePrintElements();
|
727
|
+
|
728
|
+
if (GridPrinter._printInfo && GridPrinter._printInfo.pageCount) {
|
729
|
+
GridPrinter._printElem = GridPrinter.createPrintElement(GridPrinter._grid, GridPrinter._printInfo); // TODO: Use new sizes given from PrintTrait
|
730
|
+
|
731
|
+
// var elem = GridPrinter._printTrait.createClientBox(e.pageWidth, e.pageHeight);
|
732
|
+
e.bodyElement.appendChild(GridPrinter._printElem);
|
733
|
+
}
|
734
|
+
};
|
735
|
+
/** @private
|
736
|
+
* @param {Object} e
|
737
|
+
*/
|
738
|
+
GridPrinter._onAfterPrint = function (e) {
|
739
|
+
GridPrinter._removePrintElements();
|
740
|
+
|
741
|
+
if (!GridPrinter._isObserving) {
|
742
|
+
GridPrinter._getPrintTrait().unobserve();
|
743
|
+
}
|
744
|
+
|
745
|
+
GridPrinter._printInfo = null;
|
746
|
+
if (GridPrinter._grid) {
|
747
|
+
GridPrinter._grid.updateLayout();
|
748
|
+
GridPrinter._grid = null;
|
749
|
+
}
|
750
|
+
};
|
751
|
+
|
752
|
+
/** @typedef {Object} GridPrinter~Options
|
753
|
+
* @description Configuration object for customizing priting behavior can be passed through `GridPrinter.setPrintOptions` method
|
754
|
+
* @property {number=} pageWidth Paper width in pixel. This limits number of columns to be shown on a single page
|
755
|
+
* @property {number=} pageHeight Paper height in pixel. This limits number of rows to be shown on a single page
|
756
|
+
* @property {number=} primaryColumn Column index that will be placed as the first column on each page.
|
757
|
+
*/
|
758
|
+
GridPrinter.Options;
|
759
|
+
|
760
|
+
|
761
|
+
export { GridPrinter };
|