@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,786 @@
|
|
1
|
+
import { Ext } from "../../tr-grid-util/es6/Ext.js";
|
2
|
+
import { GridPlugin } from "../../tr-grid-util/es6/GridPlugin.js";
|
3
|
+
|
4
|
+
/** @typedef {Object} StatisticsRowPlugin~Options
|
5
|
+
* @description Available options describing `statisticsRow` object specified in grid's option
|
6
|
+
* @property {Array=} rows=null Array of StatisticsRowPlugin~RowOptions
|
7
|
+
* @property {string=} invalidText="" Text to be shown for invalid statistic (i.e. Not a Number value)
|
8
|
+
* @property {boolean=} noColoring=false If enabled, all conditional coloring (i.e. tick coloring) will not automatically be applied.
|
9
|
+
* @property {boolean=} noFormatting=false If enabled, all formatting (i.e. decimal places) will not automatically be applied.
|
10
|
+
* @property {Function=} postCalculation Function handler excuted after statistics calculation and before default rendering
|
11
|
+
* @property {Function=} postRendering Function handler excuted after default rendering
|
12
|
+
*/
|
13
|
+
|
14
|
+
/** @typedef {Object} StatisticsRowPlugin~ColumnOptions
|
15
|
+
* @description Available column options specified in grid's column configuration
|
16
|
+
* @property {(boolean|string)=} statistics=false If enabled, the column is qualified for the calculation. If "label" is specified, the column will be used to show statistic label
|
17
|
+
*/
|
18
|
+
|
19
|
+
/** @typedef {Object} StatisticsRowPlugin~RowOptions
|
20
|
+
* @description Available options describing statistics row specified as item in `rows` array property.
|
21
|
+
* @property {string=} placement="footer" Available footer are "header", "title", and "footer"
|
22
|
+
* @property {string=} statistic="" Statistic to be calculated. Predefined values are "average", "min", "max", "count", and "sum"
|
23
|
+
* @property {string=} label=null By default, label will be statistics name.
|
24
|
+
* @property {string=} id="" Text Id used for row referencing in extension's APIs
|
25
|
+
*/
|
26
|
+
|
27
|
+
/** @typedef {string|number} StatisticsRowPlugin~RowReference
|
28
|
+
* @description Statistics Row can be referenced by one of the following ways: <br>
|
29
|
+
* 1. Number as index counted from top to bottom and only for the statistics rows (excluding normal rows) <br>
|
30
|
+
* 2. String as statistic (e.g., "average", "min", "max") <br>
|
31
|
+
* 3. String as id defined in the row configuration object
|
32
|
+
*/
|
33
|
+
|
34
|
+
/** @typedef {Object} StatisticsRowPlugin~Stats
|
35
|
+
* @description Statistics Object contains calculated statistic values that will be provided in `postCalculation` and `postRendering` events
|
36
|
+
* @property {string=} field
|
37
|
+
* @property {boolean=} label Indicating the column is used to show label
|
38
|
+
* @property {number=} count Count of all valid values in the column. Invalid values such as empty, null, undefined, string values are excluded. For label column, counting method will include only truthy values except number 0, and exclude all other falsy values.
|
39
|
+
* @property {number=} sum Summation
|
40
|
+
* @property {number=} average Average
|
41
|
+
* @property {number=} min Minimum
|
42
|
+
* @property {number=} max Maximum
|
43
|
+
*/
|
44
|
+
|
45
|
+
/** @event StatisticsRowPlugin#postCalculation
|
46
|
+
* @description `postCalculation` fired after all basic statistics calculation and before default rendering. This is a place where you should calculate your custom statistics.
|
47
|
+
* @type {Object}
|
48
|
+
* @property {number} colCount
|
49
|
+
* @property {Array.<string>} fields Fields for current columns
|
50
|
+
* @property {Array.<StatisticsRowPlugin~Stats>} statistics Array of statistic values. You should add your custom statistics to the object
|
51
|
+
* @property {Array.<Object>} dataRows Data row used for the calculation
|
52
|
+
* @property {Object} dataView Class object representing current view of grid
|
53
|
+
* @property {Object} dataTable Class object contains all data
|
54
|
+
*/
|
55
|
+
|
56
|
+
/** @event StatisticsRowPlugin#postRendering
|
57
|
+
* @description `postRendering` fired after all statistics calculation and default rendering. This is a place where you override default rendering
|
58
|
+
* @type {Object}
|
59
|
+
* @property {number} colCount
|
60
|
+
* @property {Array.<string>} fields Fields for current columns
|
61
|
+
* @property {Array.<StatisticsRowPlugin~Stats>} statistics Array of statistic values
|
62
|
+
* @property {Object} headerSection ILayoutGrid UI Section representing header part
|
63
|
+
* @property {Object} footerSection ILayoutGrid UI Section representing footer part
|
64
|
+
* @property {Array.<Object>} headerRows Definition objects given at the configuration time
|
65
|
+
* @property {Array.<Object>} footerRows Definition objects given at the configuration time
|
66
|
+
*/
|
67
|
+
|
68
|
+
/** @constructor
|
69
|
+
* @param {StatisticsRowPlugin~Options=} options
|
70
|
+
* @extends {GridPlugin}
|
71
|
+
*/
|
72
|
+
var StatisticsRowPlugin = function (options) {
|
73
|
+
this._onPostDataSourceChanged = this._onPostDataSourceChanged.bind(this);
|
74
|
+
this._onPostSectionDataBinding = this._onPostSectionDataBinding.bind(this);
|
75
|
+
this._onColumnAdded = this._onColumnAdded.bind(this);
|
76
|
+
this._onExtensionLoaded = this._onExtensionLoaded.bind(this);
|
77
|
+
this._onDataChanged = this._onDataChanged.bind(this);
|
78
|
+
this._onRowRemoved = this._onRowRemoved.bind(this);
|
79
|
+
|
80
|
+
this._hosts = [];
|
81
|
+
this._headerRows = [];
|
82
|
+
this._footerRows = [];
|
83
|
+
this._rows = [];
|
84
|
+
|
85
|
+
if (options) {
|
86
|
+
this.config({ statisticsRow: options });
|
87
|
+
}
|
88
|
+
};
|
89
|
+
Ext.inherits(StatisticsRowPlugin, GridPlugin);
|
90
|
+
|
91
|
+
/** @type {Object.<string, string>}
|
92
|
+
* @private
|
93
|
+
*/
|
94
|
+
StatisticsRowPlugin._aliases = {
|
95
|
+
"average": "average",
|
96
|
+
"avg": "average",
|
97
|
+
"mean": "average",
|
98
|
+
"count": "count",
|
99
|
+
"max": "max",
|
100
|
+
"maximum": "max",
|
101
|
+
"min": "min",
|
102
|
+
"minimum": "min",
|
103
|
+
"sum": "sum",
|
104
|
+
"summation": "sum"
|
105
|
+
};
|
106
|
+
/** @type {Object.<string, string>}
|
107
|
+
* @private
|
108
|
+
*/
|
109
|
+
StatisticsRowPlugin._defaultLabels = {
|
110
|
+
"average": "Average",
|
111
|
+
"count": "Count",
|
112
|
+
"max": "Maximum",
|
113
|
+
"min": "Minimum",
|
114
|
+
"sum": "Summation"
|
115
|
+
};
|
116
|
+
|
117
|
+
/** @type {string}
|
118
|
+
* @private
|
119
|
+
*/
|
120
|
+
StatisticsRowPlugin.prototype._invalidText = "";
|
121
|
+
/** @type {boolean}
|
122
|
+
* @private
|
123
|
+
*/
|
124
|
+
StatisticsRowPlugin.prototype._noColoring = false;
|
125
|
+
/** @type {boolean}
|
126
|
+
* @private
|
127
|
+
*/
|
128
|
+
StatisticsRowPlugin.prototype._noFormatting = false;
|
129
|
+
|
130
|
+
/** @type {Array}
|
131
|
+
* @private
|
132
|
+
*/
|
133
|
+
StatisticsRowPlugin.prototype._headerRows = null;
|
134
|
+
/** @type {Array}
|
135
|
+
* @private
|
136
|
+
*/
|
137
|
+
StatisticsRowPlugin.prototype._footerRows = null;
|
138
|
+
/** @type {Array}
|
139
|
+
* @private
|
140
|
+
*/
|
141
|
+
StatisticsRowPlugin.prototype._rows = null;
|
142
|
+
/** @type {Object}
|
143
|
+
* @private
|
144
|
+
* @description Grid section object
|
145
|
+
*/
|
146
|
+
StatisticsRowPlugin.prototype._headerSect = null;
|
147
|
+
/** @type {Object}
|
148
|
+
* @private
|
149
|
+
* @description Grid section object
|
150
|
+
*/
|
151
|
+
StatisticsRowPlugin.prototype._footerSect = null;
|
152
|
+
/** @type {Object}
|
153
|
+
* @private
|
154
|
+
* @description TextFormattingExtension
|
155
|
+
*/
|
156
|
+
StatisticsRowPlugin.prototype._tfExt = null;
|
157
|
+
/** @type {Object}
|
158
|
+
* @private
|
159
|
+
* @description ConditionalColoringExtension
|
160
|
+
*/
|
161
|
+
StatisticsRowPlugin.prototype._ccExt = null;
|
162
|
+
/** @type {boolean}
|
163
|
+
* @private
|
164
|
+
*/
|
165
|
+
StatisticsRowPlugin.prototype._disabledUIs = false;
|
166
|
+
|
167
|
+
/** @public
|
168
|
+
* @return {string}
|
169
|
+
*/
|
170
|
+
StatisticsRowPlugin.prototype.getName = function () {
|
171
|
+
return "StatisticsRowPlugin"; // Read Only
|
172
|
+
};
|
173
|
+
|
174
|
+
/** @public
|
175
|
+
* @param {Object} host core grid instance
|
176
|
+
* @param {Object=} options
|
177
|
+
*/
|
178
|
+
StatisticsRowPlugin.prototype.initialize = function (host, options) {
|
179
|
+
if (this._hosts.indexOf(host) >= 0) { return; }
|
180
|
+
|
181
|
+
this._hosts.push(host);
|
182
|
+
setTimeout(this._onExtensionLoaded, 0);
|
183
|
+
|
184
|
+
this._disabledUIs = true; // Prevent unnecessary updates
|
185
|
+
this.config(options);
|
186
|
+
this._disabledUIs = false;
|
187
|
+
|
188
|
+
host.getDataSource().listen("dataChanged", this._onDataChanged);
|
189
|
+
host.listen("rowRemoved", this._onRowRemoved);
|
190
|
+
host.listen("postDataSourceChanged", this._onPostDataSourceChanged);
|
191
|
+
host.listen("postSectionDataBinding", this._onPostSectionDataBinding);
|
192
|
+
host.listen("columnAdded", this._onColumnAdded);
|
193
|
+
|
194
|
+
// In case of lazy loading
|
195
|
+
var title = host.getSection("title");
|
196
|
+
if(title) {
|
197
|
+
this._onPostDataSourceChanged();
|
198
|
+
}
|
199
|
+
};
|
200
|
+
|
201
|
+
/** @private
|
202
|
+
*/
|
203
|
+
StatisticsRowPlugin.prototype._onExtensionLoaded = function () {
|
204
|
+
if(!this._tfExt || !this._ccExt) {
|
205
|
+
var host = this._hosts[0];
|
206
|
+
if(host) {
|
207
|
+
this._tfExt = host.getPlugin("TextFormattingPlugin");
|
208
|
+
this._ccExt = host.getPlugin("ConditionalColoringPlugin");
|
209
|
+
}
|
210
|
+
}
|
211
|
+
};
|
212
|
+
/** @public
|
213
|
+
* @param {Object} host core grid instance
|
214
|
+
*/
|
215
|
+
StatisticsRowPlugin.prototype.unload = function (host) {
|
216
|
+
var at = this._hosts.indexOf(host);
|
217
|
+
if (at < 0) { return; }
|
218
|
+
this._hosts.splice(at, 1);
|
219
|
+
|
220
|
+
host.getDataSource().unlisten("dataChanged", this._onDataChanged);
|
221
|
+
host.unlisten("rowRemoved", this._onRowRemoved);
|
222
|
+
host.unlisten("postDataSourceChanged", this._onPostDataSourceChanged);
|
223
|
+
host.unlisten("postSectionDataBinding", this._onPostSectionDataBinding);
|
224
|
+
host.unlisten("columnAdded", this._onColumnAdded);
|
225
|
+
|
226
|
+
if (!this._hosts.length) {
|
227
|
+
this._headerSect = this._footerSect = null;
|
228
|
+
this._tfExt = this._ccExt = null;
|
229
|
+
}
|
230
|
+
|
231
|
+
this._dispose();
|
232
|
+
};
|
233
|
+
|
234
|
+
/** @public
|
235
|
+
* @param {Object=} options Grid configuration object
|
236
|
+
*/
|
237
|
+
StatisticsRowPlugin.prototype.config = function (options) {
|
238
|
+
if (!options) { return; }
|
239
|
+
|
240
|
+
var extOptions = options.statisticsRow;
|
241
|
+
if(extOptions) {
|
242
|
+
if(extOptions.invalidText != null) {
|
243
|
+
this._invalidText = extOptions.invalidText;
|
244
|
+
}
|
245
|
+
if(extOptions.noColoring != null) {
|
246
|
+
this._noColoring = extOptions.noColoring ? true : false;
|
247
|
+
}
|
248
|
+
if(extOptions.noFormatting != null) {
|
249
|
+
this._noFormatting = extOptions.noFormatting ? true : false;
|
250
|
+
}
|
251
|
+
this.addListener(extOptions, "postCalculation");
|
252
|
+
this.addListener(extOptions, "postRendering");
|
253
|
+
|
254
|
+
if(extOptions.rows != null) {
|
255
|
+
this.setStatisticsRows(extOptions.rows);
|
256
|
+
}
|
257
|
+
}
|
258
|
+
|
259
|
+
var columns = options.columns;
|
260
|
+
var colCount = columns ? columns.length : 0;
|
261
|
+
for(var c = 0; c < colCount; ++c) {
|
262
|
+
var colOptions = columns[c];
|
263
|
+
this._configColumn(c, colOptions);
|
264
|
+
}
|
265
|
+
};
|
266
|
+
|
267
|
+
/** @public
|
268
|
+
* @param {Object=} gridOptions
|
269
|
+
* @return {!Object}
|
270
|
+
*/
|
271
|
+
StatisticsRowPlugin.prototype.getConfigObject = function (gridOptions) {
|
272
|
+
var obj = gridOptions || {};
|
273
|
+
|
274
|
+
var columns = obj.columns;
|
275
|
+
if(!columns) {
|
276
|
+
columns = obj.columns = [];
|
277
|
+
}
|
278
|
+
|
279
|
+
var len = this.getColumnCount();
|
280
|
+
for(var i = 0; i < len; ++i) {
|
281
|
+
var column = columns[i];
|
282
|
+
if(!column) {
|
283
|
+
column = columns[i] = {};
|
284
|
+
}
|
285
|
+
|
286
|
+
var colOptions = this._getExtColumnConfig(i);
|
287
|
+
if(colOptions) {
|
288
|
+
if(colOptions.label) {
|
289
|
+
column.statistics = "label";
|
290
|
+
} else if(colOptions.statistics) {
|
291
|
+
column.statistics = true;
|
292
|
+
}
|
293
|
+
}
|
294
|
+
}
|
295
|
+
|
296
|
+
var extOptions = obj.statisticsRow;
|
297
|
+
if(!extOptions) {
|
298
|
+
extOptions = obj.statisticsRow = {};
|
299
|
+
}
|
300
|
+
|
301
|
+
if(this._rows.length > 0) {
|
302
|
+
extOptions.rows = this._rows;
|
303
|
+
}
|
304
|
+
|
305
|
+
if(this._invalidText) {
|
306
|
+
extOptions.invalidText = this._invalidText;
|
307
|
+
}
|
308
|
+
|
309
|
+
if(this._noColoring) {
|
310
|
+
extOptions.noColoring = this._noColoring;
|
311
|
+
}
|
312
|
+
|
313
|
+
if(this._noFormatting) {
|
314
|
+
extOptions.noFormatting = this._noFormatting;
|
315
|
+
}
|
316
|
+
|
317
|
+
return obj;
|
318
|
+
};
|
319
|
+
|
320
|
+
/** Remove all existing statistics rows and create new rows based on the given inputs. Use null to remove all rows.
|
321
|
+
* @public
|
322
|
+
* @param {Array.<StatisticsRowPlugin~RowOptions>} rows
|
323
|
+
*/
|
324
|
+
StatisticsRowPlugin.prototype.setStatisticsRows = function(rows) {
|
325
|
+
var rowCount = rows ? rows.length : 0;
|
326
|
+
this._headerRows.length = 0;
|
327
|
+
this._footerRows.length = 0;
|
328
|
+
for(var r = 0; r < rowCount; ++r) {
|
329
|
+
var row = this._prepareStatRow(rows[r]);
|
330
|
+
|
331
|
+
if(row.placement === "header") {
|
332
|
+
this._headerRows.push(row);
|
333
|
+
} else {
|
334
|
+
this._footerRows.push(row);
|
335
|
+
}
|
336
|
+
}
|
337
|
+
this._rows = this._headerRows.concat(this._footerRows);
|
338
|
+
|
339
|
+
this._prepareSections();
|
340
|
+
this._updateUIs();
|
341
|
+
};
|
342
|
+
/** Get all existng statistics rows
|
343
|
+
* @public
|
344
|
+
* @return {Array.<StatisticsRowPlugin~RowOptions>}
|
345
|
+
*/
|
346
|
+
StatisticsRowPlugin.prototype.getStatisticsRows = function() {
|
347
|
+
return this._rows.slice(); // Clone a copy for users
|
348
|
+
};
|
349
|
+
|
350
|
+
/** Normalize user inputs
|
351
|
+
* @private
|
352
|
+
* @param {StatisticsRowPlugin~RowOptions} row
|
353
|
+
* @return {StatisticsRowPlugin~RowOptions}
|
354
|
+
*/
|
355
|
+
StatisticsRowPlugin.prototype._prepareStatRow = function(row) {
|
356
|
+
if(!row) {
|
357
|
+
return null;
|
358
|
+
}
|
359
|
+
var placement = row.placement;
|
360
|
+
if(placement === "header" || placement === "title") {
|
361
|
+
row.placement = "header";
|
362
|
+
} else {
|
363
|
+
row.placement = "footer";
|
364
|
+
}
|
365
|
+
var statistic = row.statistic || row.statistics;
|
366
|
+
if(row.statistics) { // Handle alias
|
367
|
+
row.statistics = null;
|
368
|
+
}
|
369
|
+
if(statistic) {
|
370
|
+
var predefined = StatisticsRowPlugin._aliases[statistic.toLowerCase()];
|
371
|
+
if(predefined) {
|
372
|
+
statistic = predefined;
|
373
|
+
}
|
374
|
+
}
|
375
|
+
row.statistic = statistic || "custom";
|
376
|
+
|
377
|
+
row.cachedData = {}; // WARNING: This will get returned by getConfigData() method
|
378
|
+
|
379
|
+
return row;
|
380
|
+
};
|
381
|
+
/** @private
|
382
|
+
* @param {StatisticsRowPlugin~RowReference} rowRef
|
383
|
+
* @return {number}
|
384
|
+
*/
|
385
|
+
StatisticsRowPlugin.prototype._getStatRowIndex = function(rowRef) {
|
386
|
+
var rowIndex = -1;
|
387
|
+
if(typeof rowRef === "string" && rowRef) {
|
388
|
+
var rowCount = this._rows.length;
|
389
|
+
for(var i = 0; i < rowCount; ++i) {
|
390
|
+
var row = this._rows[i];
|
391
|
+
if(row.statistic === rowRef) {
|
392
|
+
rowIndex = i;
|
393
|
+
break;
|
394
|
+
} else if(row.id === rowRef) {
|
395
|
+
rowIndex = i;
|
396
|
+
break;
|
397
|
+
}
|
398
|
+
}
|
399
|
+
} else {
|
400
|
+
if(typeof rowRef === "number") {
|
401
|
+
rowIndex = rowRef;
|
402
|
+
} else if(rowRef) {
|
403
|
+
rowIndex = +rowRef;
|
404
|
+
if(rowIndex !== rowIndex) {
|
405
|
+
rowIndex = -1;
|
406
|
+
}
|
407
|
+
}
|
408
|
+
|
409
|
+
if(rowIndex < 0 || rowIndex >= this._rows.length) {
|
410
|
+
rowIndex = -1;
|
411
|
+
}
|
412
|
+
}
|
413
|
+
|
414
|
+
return rowIndex;
|
415
|
+
};
|
416
|
+
|
417
|
+
/** Replace and update existing statistics row. Placement and order of the row cannot be changed. Use setStatisticsRows() to update multiple rows at once.
|
418
|
+
* @public
|
419
|
+
* @param {StatisticsRowPlugin~RowReference} rowRef Index, stat, or id
|
420
|
+
* @param {StatisticsRowPlugin~RowOptions} options The given configuration object cannot be null nor the same existing object.
|
421
|
+
* @return {boolean} Returns true if there is any change, otherwise returns false
|
422
|
+
*/
|
423
|
+
StatisticsRowPlugin.prototype.setStatisticsRow = function(rowRef, options) {
|
424
|
+
var rowIndex = this._getStatRowIndex(rowRef);
|
425
|
+
var prevRow = this._rows[rowIndex];
|
426
|
+
if(!prevRow || prevRow === options) {
|
427
|
+
return false;
|
428
|
+
}
|
429
|
+
|
430
|
+
var row = this._prepareStatRow(options);
|
431
|
+
if(!row) {
|
432
|
+
return false;
|
433
|
+
}
|
434
|
+
|
435
|
+
row.placement = prevRow.placement; // Position cannot be changed
|
436
|
+
var subset = (row.placement === "header") ? this._headerRows : this._footerRows;
|
437
|
+
var subRowIndex = subset.indexOf(prevRow);
|
438
|
+
|
439
|
+
this._rows[rowIndex] = row;
|
440
|
+
subset[subRowIndex] = row;
|
441
|
+
|
442
|
+
this._updateUIs();
|
443
|
+
return true;
|
444
|
+
};
|
445
|
+
/** Add new statistic row at the bottom of either header or footer section
|
446
|
+
* @public
|
447
|
+
* @param {StatisticsRowPlugin~RowOptions} options The given configuration object cannot be null nor the same existing object
|
448
|
+
*/
|
449
|
+
StatisticsRowPlugin.prototype.addStatisticsRow = function(options) {
|
450
|
+
var row = this._prepareStatRow(options);
|
451
|
+
var rowIndex = this._rows.indexOf(row);
|
452
|
+
if(!row || rowIndex >= 0) {
|
453
|
+
return;
|
454
|
+
}
|
455
|
+
if(row.placement === "header") {
|
456
|
+
this._headerRows.push(row);
|
457
|
+
} else {
|
458
|
+
this._footerRows.push(row);
|
459
|
+
}
|
460
|
+
|
461
|
+
this._rows = this._headerRows.concat(this._footerRows);
|
462
|
+
|
463
|
+
this._prepareSections();
|
464
|
+
this._updateUIs();
|
465
|
+
};
|
466
|
+
/** Remove existing statistics row
|
467
|
+
* @public
|
468
|
+
* @param {StatisticsRowPlugin~RowReference} rowRef Index, stat, or id
|
469
|
+
*/
|
470
|
+
StatisticsRowPlugin.prototype.removeStatisticsRow = function(rowRef) {
|
471
|
+
var rowIndex = this._getStatRowIndex(rowRef);
|
472
|
+
if(rowIndex < 0) {
|
473
|
+
return;
|
474
|
+
}
|
475
|
+
var row = this._rows[rowIndex];
|
476
|
+
var subset = (row.placement === "header") ? this._headerRows : this._footerRows;
|
477
|
+
var subRowIndex = subset.indexOf(row);
|
478
|
+
|
479
|
+
this._rows.splice(rowIndex, 1);
|
480
|
+
subset.splice(subRowIndex, 1);
|
481
|
+
|
482
|
+
this._prepareSections();
|
483
|
+
this._updateUIs();
|
484
|
+
};
|
485
|
+
// getStatisticsValues(rowRef):Object
|
486
|
+
|
487
|
+
/** @private
|
488
|
+
* @param {number} colIndex
|
489
|
+
* @param {number} columnConfig
|
490
|
+
*/
|
491
|
+
StatisticsRowPlugin.prototype._configColumn = function(colIndex, columnConfig) {
|
492
|
+
if(columnConfig) {
|
493
|
+
var statistics = columnConfig["statistics"] || columnConfig["statistic"];
|
494
|
+
if(!statistics) {
|
495
|
+
return;
|
496
|
+
}
|
497
|
+
|
498
|
+
var colData = this._newColumnData(colIndex);
|
499
|
+
var options = colData["statisticsRow"];
|
500
|
+
if(!options) {
|
501
|
+
options = colData["statisticsRow"] = {};
|
502
|
+
}
|
503
|
+
if(statistics === "label") {
|
504
|
+
options.label = true;
|
505
|
+
} else {
|
506
|
+
options.statistics = true;
|
507
|
+
}
|
508
|
+
}
|
509
|
+
};
|
510
|
+
/** @private
|
511
|
+
* @param {number} colIndex
|
512
|
+
* @return {Object}
|
513
|
+
*/
|
514
|
+
StatisticsRowPlugin.prototype._getExtColumnConfig = function(colIndex) {
|
515
|
+
return this._getColumnOption(colIndex, "statisticsRow") || null;
|
516
|
+
};
|
517
|
+
|
518
|
+
/** @private
|
519
|
+
* @param {Object=} e
|
520
|
+
*/
|
521
|
+
StatisticsRowPlugin.prototype._onColumnAdded = function (e) {
|
522
|
+
if(e.context && e.colIndex != null) {
|
523
|
+
this._configColumn(e.colIndex, e.context);
|
524
|
+
}
|
525
|
+
};
|
526
|
+
|
527
|
+
/** @private
|
528
|
+
*/
|
529
|
+
StatisticsRowPlugin.prototype._prepareSections = function () {
|
530
|
+
var host = this._hosts[0];
|
531
|
+
if(!host || this._disabledUIs) {
|
532
|
+
return;
|
533
|
+
}
|
534
|
+
|
535
|
+
var contentSect = host.getSection("content");
|
536
|
+
var sectIndex, section;
|
537
|
+
var rowHeight = host.getDefaultRowHeight();
|
538
|
+
if(this._headerRows.length) {
|
539
|
+
section = this._headerSect;
|
540
|
+
if(!section) {
|
541
|
+
sectIndex = contentSect ? contentSect.getIndex() : 1;
|
542
|
+
section = this._headerSect = host.addSectionAt(sectIndex, "title", "statisticsHeaderRows");
|
543
|
+
|
544
|
+
section.setDefaultRowHeight(rowHeight);
|
545
|
+
section.enableClass("statistics-rows");
|
546
|
+
}
|
547
|
+
section.setRowCount(this._headerRows.length);
|
548
|
+
} else if(this._headerSect) {
|
549
|
+
host.removeSectionAt(this._headerSect.getIndex());
|
550
|
+
this._headerSect = null;
|
551
|
+
}
|
552
|
+
|
553
|
+
if(this._footerRows.length) {
|
554
|
+
section = this._footerSect;
|
555
|
+
if(!section) {
|
556
|
+
sectIndex = contentSect ? contentSect.getIndex() + 1 : host.getSectionCount();
|
557
|
+
section = this._footerSect = host.addSectionAt(sectIndex, "footer", "statisticsFooterRows");
|
558
|
+
|
559
|
+
section.setDefaultRowHeight(rowHeight);
|
560
|
+
section.enableClass("statistics-rows");
|
561
|
+
}
|
562
|
+
section.setRowCount(this._footerRows.length);
|
563
|
+
} else if(this._footerSect) {
|
564
|
+
host.removeSectionAt(this._footerSect.getIndex());
|
565
|
+
this._footerSect = null;
|
566
|
+
}
|
567
|
+
};
|
568
|
+
/** @private
|
569
|
+
*/
|
570
|
+
StatisticsRowPlugin.prototype._updateUIs = function () {
|
571
|
+
var host = this._hosts[0];
|
572
|
+
if(!host || this._disabledUIs) {
|
573
|
+
return;
|
574
|
+
}
|
575
|
+
if(host.getRowCount() > 0) {
|
576
|
+
host.requestRowRefresh();
|
577
|
+
} else {
|
578
|
+
this._onPostSectionDataBinding();
|
579
|
+
}
|
580
|
+
};
|
581
|
+
/** @private
|
582
|
+
* @param {Object=} e
|
583
|
+
*/
|
584
|
+
StatisticsRowPlugin.prototype._onPostDataSourceChanged = function (e) {
|
585
|
+
this._prepareSections();
|
586
|
+
};
|
587
|
+
/** @private
|
588
|
+
* @param {Object=} e
|
589
|
+
*/
|
590
|
+
StatisticsRowPlugin.prototype._onDataChanged = function (e) {
|
591
|
+
this._updateUIs();
|
592
|
+
};
|
593
|
+
/** @private
|
594
|
+
* @param {Object=} e
|
595
|
+
*/
|
596
|
+
StatisticsRowPlugin.prototype._onRowRemoved = function (e) {
|
597
|
+
if(!e.rowCount) { // Since binding won't be occured for 0 row, we have to force re-rendering on the headers/footers by ourselve
|
598
|
+
if(e.sectionType === "content") {
|
599
|
+
this._onPostSectionDataBinding();
|
600
|
+
}
|
601
|
+
}
|
602
|
+
};
|
603
|
+
|
604
|
+
/** @private
|
605
|
+
* @param {Object=} e
|
606
|
+
*/
|
607
|
+
StatisticsRowPlugin.prototype._onPostSectionDataBinding = function (e) {
|
608
|
+
if(!this._headerSect && !this._footerSect) {
|
609
|
+
return;
|
610
|
+
}
|
611
|
+
|
612
|
+
if(e && e.positionChangeOnly) { // To avoid unnecessary calculation and rendering
|
613
|
+
return;
|
614
|
+
}
|
615
|
+
|
616
|
+
// TODO: Reduce unneccessary calculation due to UI updates
|
617
|
+
// Preparing context
|
618
|
+
var host = this._hosts[0];
|
619
|
+
var colCount = host.getColumnCount();
|
620
|
+
var dv = host.getDataSource();
|
621
|
+
var dt = dv.getDataSource();
|
622
|
+
var rows = dt.getAllRowData(); // Slow: A new copy of data is created
|
623
|
+
var rowCount = rows.length;
|
624
|
+
|
625
|
+
var fields = null;
|
626
|
+
if(this._compositeGrid) {
|
627
|
+
fields = this._compositeGrid.getColumnFields();
|
628
|
+
} else if(this._realTimeGrid) {
|
629
|
+
fields = this._realTimeGrid.getColumnFields();
|
630
|
+
rows = rows.map(this._rowGetter);
|
631
|
+
}
|
632
|
+
if(!fields) {
|
633
|
+
return;
|
634
|
+
}
|
635
|
+
|
636
|
+
// Calculate stats
|
637
|
+
var c;
|
638
|
+
var statistics = new Array(colCount);
|
639
|
+
for(c = 0; c < colCount; ++c) {
|
640
|
+
statistics[c] = null;
|
641
|
+
var colOptions = this._getExtColumnConfig(c);
|
642
|
+
if(!colOptions) {
|
643
|
+
continue;
|
644
|
+
}
|
645
|
+
var field = fields[c];
|
646
|
+
var count = 0;
|
647
|
+
var stat = null;
|
648
|
+
var r, val;
|
649
|
+
if(colOptions.statistics) {
|
650
|
+
stat = statistics[c] = {};
|
651
|
+
var sum = 0;
|
652
|
+
var min = NaN;
|
653
|
+
var max = NaN;
|
654
|
+
for(r = 0; r < rowCount; ++r) {
|
655
|
+
val = rows[r][field];
|
656
|
+
if(val != null) { // Not undefined or null
|
657
|
+
if(typeof val !== "number") { // Slow: Type casting
|
658
|
+
val = +val;
|
659
|
+
}
|
660
|
+
if(val === val) {
|
661
|
+
++count;
|
662
|
+
if(!(val >= min)) {
|
663
|
+
min = val;
|
664
|
+
}
|
665
|
+
if(!(val <= max)) {
|
666
|
+
max = val;
|
667
|
+
}
|
668
|
+
sum += val;
|
669
|
+
}
|
670
|
+
}
|
671
|
+
}
|
672
|
+
stat.field = field;
|
673
|
+
stat.count = count;
|
674
|
+
stat.sum = (count > 0) ? sum : NaN;
|
675
|
+
stat.average = sum / count;
|
676
|
+
stat.min = min;
|
677
|
+
stat.max = max;
|
678
|
+
} else if(colOptions.label) {
|
679
|
+
stat = statistics[c] = {"label": true};
|
680
|
+
for(r = 0; r < rowCount; ++r) {
|
681
|
+
val = rows[r][field];
|
682
|
+
if(val || val === 0) { // WARNING: Use different counting criteria from normal statistic.
|
683
|
+
++count;
|
684
|
+
}
|
685
|
+
}
|
686
|
+
stat.field = field;
|
687
|
+
stat.count = count;
|
688
|
+
}
|
689
|
+
}
|
690
|
+
|
691
|
+
if(this.hasListener("postCalculation")) {
|
692
|
+
this._dispatch("postCalculation", {
|
693
|
+
"colCount": colCount,
|
694
|
+
"fields": fields,
|
695
|
+
"statistics": statistics,
|
696
|
+
"dataRows": rows,
|
697
|
+
"dataView": dv,
|
698
|
+
"dataTable": dt,
|
699
|
+
"core": host,
|
700
|
+
"extension": this
|
701
|
+
});
|
702
|
+
}
|
703
|
+
// Render stuff
|
704
|
+
for(c = 0; c < colCount; ++c) {
|
705
|
+
this._renderStatistics(c, statistics[c], e.actualUpdate);
|
706
|
+
}
|
707
|
+
|
708
|
+
if(this.hasListener("postRendering")) {
|
709
|
+
this._dispatch("postRendering", {
|
710
|
+
"colCount": colCount,
|
711
|
+
"fields": fields,
|
712
|
+
"statistics": statistics,
|
713
|
+
"headerSection": this._headerSect,
|
714
|
+
"footerSection": this._footerSect,
|
715
|
+
"headerRows": this._headerRows,
|
716
|
+
"footerRows": this._footerRows,
|
717
|
+
"core": host,
|
718
|
+
"extension": this
|
719
|
+
});
|
720
|
+
}
|
721
|
+
};
|
722
|
+
/** @private
|
723
|
+
* @param {number} colIndex
|
724
|
+
* @param {Object} stats
|
725
|
+
* @param {boolean} actualUpdate
|
726
|
+
*/
|
727
|
+
StatisticsRowPlugin.prototype._renderStatistics = function (colIndex, stats, actualUpdate) {
|
728
|
+
if(!this._headerSect && !this._footerSect) {
|
729
|
+
return;
|
730
|
+
}
|
731
|
+
if(!stats) {
|
732
|
+
return;
|
733
|
+
}
|
734
|
+
|
735
|
+
var r, rowCount;
|
736
|
+
if(this._headerSect) {
|
737
|
+
rowCount = this._headerSect.getRowCount();
|
738
|
+
for(r = 0; r < rowCount; ++r) {
|
739
|
+
this._headerRows[r].cell = this._headerSect.getCell(colIndex, r);
|
740
|
+
}
|
741
|
+
}
|
742
|
+
if(this._footerSect) {
|
743
|
+
rowCount = this._footerSect.getRowCount();
|
744
|
+
for(r = 0; r < rowCount; ++r) {
|
745
|
+
this._footerRows[r].cell = this._footerSect.getCell(colIndex, r);
|
746
|
+
}
|
747
|
+
}
|
748
|
+
|
749
|
+
var rows = this._rows;
|
750
|
+
rowCount = rows.length;
|
751
|
+
for(r = 0; r < rowCount; ++r) {
|
752
|
+
var row = rows[r];
|
753
|
+
var txt = null;
|
754
|
+
|
755
|
+
var statistic = row.statistic;
|
756
|
+
if(stats.label) {
|
757
|
+
txt = row.label;
|
758
|
+
if(txt == null) {
|
759
|
+
txt = StatisticsRowPlugin._defaultLabels[statistic] || statistic;
|
760
|
+
}
|
761
|
+
} else {
|
762
|
+
txt = stats[statistic];
|
763
|
+
if(!txt && txt !== 0) {
|
764
|
+
txt = this._invalidText;
|
765
|
+
} else {
|
766
|
+
var num = txt;
|
767
|
+
if(this._tfExt && !this._noFormatting) {
|
768
|
+
txt = this._tfExt.formatText(colIndex, num);
|
769
|
+
}
|
770
|
+
if(this._ccExt && !this._noColoring) {
|
771
|
+
var rowData = row.cachedData;
|
772
|
+
rowData[stats.field] = num;
|
773
|
+
this._ccExt.applyColor(colIndex, row.cell, rowData, actualUpdate);
|
774
|
+
}
|
775
|
+
}
|
776
|
+
}
|
777
|
+
|
778
|
+
row.cell.setContent(txt);
|
779
|
+
row.cell = null;
|
780
|
+
}
|
781
|
+
};
|
782
|
+
|
783
|
+
|
784
|
+
|
785
|
+
export default StatisticsRowPlugin;
|
786
|
+
export { StatisticsRowPlugin, StatisticsRowPlugin as StatisticsRow, StatisticsRowPlugin as StatisticsRowExtension };
|