@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,1074 @@
|
|
1
|
+
/* eslint-disable */
|
2
|
+
import FieldDefinition from "./FieldDefinition.js";
|
3
|
+
import PredefinedFormula from "./PredefinedFormula.js";
|
4
|
+
import Formula from "../../tr-grid-util/es6/formula/Formula.js";
|
5
|
+
import Engine from "../../tr-grid-util/es6/formula/Engine.js";
|
6
|
+
/* eslint-enable */
|
7
|
+
|
8
|
+
/** @callback ColumnDefinition~SortLogic
|
9
|
+
* @param {*} valA Data or RowDefinition object, depending on rowSorting flag, used for comparison
|
10
|
+
* @param {*} valB Data or RowDefinition object, depending on rowSorting flag, used for comparison
|
11
|
+
* @param {number} order Order code. 1 means ascending order and -1 means descending order
|
12
|
+
* @param {Object} ctx Context Object of the current sorting operation
|
13
|
+
*/
|
14
|
+
|
15
|
+
/** @typedef {Object} ColumnDefinition~Options
|
16
|
+
* @description ColumnDefinition options
|
17
|
+
* @property {string=} field="" Field for real-time, ADC, formula sources
|
18
|
+
* @property {string=} dataType="" data type eg. string, datetime, number
|
19
|
+
* @property {string=} formulaReference=""
|
20
|
+
* @property {Array.<string>=} require=null Extra fields required by this column will be requested for real-time data.
|
21
|
+
* @property {string=} name="" Label of the column
|
22
|
+
* @property {boolean=} notRealTimeField=false If enabled, the `field` will not be requested for real-time data. By enabling this, `rowSorting` will also be disabled, if not specified.
|
23
|
+
* @property {(boolean|string|null)=} tooltip=null Show tooltip in header section
|
24
|
+
* @property {Function=} headerBinding=null Method for custom header rendering.
|
25
|
+
* @property {Function=} headerRenderer=null Alias to `headerBinding`
|
26
|
+
* @property {Function=} binding=null Method for custom rendering. It will be executed on each data update and scrolling
|
27
|
+
* @property {Function=} renderer=null Alias to `binding`
|
28
|
+
* @property {ColumnDefinition~SortLogic=} sortLogic=null
|
29
|
+
* @property {ColumnDefinition~SortLogic=} sortingLogic=null Alias to `sortLogic`
|
30
|
+
* @property {ColumnDefinition~SortLogic=} sorter=null Alias to `sortLogic`
|
31
|
+
* @property {boolean=} rowSorting=null If set to true, RowDefinition object will be used for sorting comparison. If set to false, data from the given `field` will be used for sorting comparison.
|
32
|
+
* @property {boolean=} sortable=true If disabled, the column cannot be sorted by user click
|
33
|
+
* @property {string=} sort="" This column will be sorted at the initialization in the specified order (e.g. "asc", "desc")
|
34
|
+
* @property {Object=} styles=null Key/value pair Object specifying CSS styles
|
35
|
+
* @property {number=} width=NaN If specified, column will have a fixed width in pixel
|
36
|
+
* @property {number=} minWidth=NaN If specified, column will have a minimum width in pixel
|
37
|
+
* @property {boolean=} scalable=true Column scalability forces column to be scaled and filled the grid. `width` property will be used as a weight/ratio
|
38
|
+
* @property {string=} className=""
|
39
|
+
* @property {string=} class="" Alias to `className`
|
40
|
+
* @property {string=} textAlign="" Text alignment for content and column header. Available values are: left|center|right
|
41
|
+
* @property {string=} alignment="" Alias to `textAlign`
|
42
|
+
* @property {string=} headerAlignment="" Text alignment for column header. This will override `textAlign` option for column header.
|
43
|
+
* @property {string=} titleAlignment="" Alias to `headerAlignment`
|
44
|
+
* @property {boolean=} hidden=false
|
45
|
+
* @property {string=} id Id for unique identifier
|
46
|
+
* @property {boolean=} textSelect=false If enabled, user can select text in this column
|
47
|
+
* @property {boolean=} keepModel If enabled, initial column's options will be kept
|
48
|
+
*/
|
49
|
+
|
50
|
+
/** mapping of field type to javascript type
|
51
|
+
* @type {Object.<string, string>}
|
52
|
+
* @private
|
53
|
+
*/
|
54
|
+
var TYPE_MAPPING = {
|
55
|
+
STRING: "string",
|
56
|
+
BOOLEAN: "boolean",
|
57
|
+
NUMBER: "number",
|
58
|
+
|
59
|
+
DATE: "datetime",
|
60
|
+
DATETIME: "datetime",
|
61
|
+
TIME: "datetime",
|
62
|
+
|
63
|
+
ENUMERATED: "string",
|
64
|
+
ALPHANUMERIC: "string",
|
65
|
+
PERCENT: "string",
|
66
|
+
|
67
|
+
PRICE: "number",
|
68
|
+
DOUBLE: "number",
|
69
|
+
MONEY: "number"
|
70
|
+
};
|
71
|
+
|
72
|
+
/** @type {string}
|
73
|
+
* @public
|
74
|
+
* @const
|
75
|
+
*/
|
76
|
+
var COL_DEF = "COL_DEF";
|
77
|
+
|
78
|
+
/** @private
|
79
|
+
* @param {string} str
|
80
|
+
* @return {string}
|
81
|
+
*/
|
82
|
+
var _toAlignment = function(str) {
|
83
|
+
if(str) {
|
84
|
+
var ch = str.charAt(0).toLowerCase();
|
85
|
+
if(ch === "l") {
|
86
|
+
return "left";
|
87
|
+
}
|
88
|
+
if(ch === "r") {
|
89
|
+
return "right";
|
90
|
+
}
|
91
|
+
if(ch === "c") {
|
92
|
+
return "center";
|
93
|
+
}
|
94
|
+
}
|
95
|
+
return "";
|
96
|
+
};
|
97
|
+
|
98
|
+
/** @constructor
|
99
|
+
* @param {ColumnDefinition~Options|string=} columnOption
|
100
|
+
* @param {*=} hostGrid
|
101
|
+
*/
|
102
|
+
var ColumnDefinition = function(columnOption, hostGrid) {
|
103
|
+
this._defaultRenderer = this._defaultRenderer.bind(this);
|
104
|
+
this._customRenderer = this._customRenderer.bind(this);
|
105
|
+
this._defaultSorter = this._defaultSorter.bind(this);
|
106
|
+
this._dataSorter = this._dataSorter.bind(this);
|
107
|
+
this._rowDefSorter = this._rowDefSorter.bind(this);
|
108
|
+
|
109
|
+
this._id = "" + ColumnDefinition._runningId++;
|
110
|
+
this._internalRenderer = this._defaultRenderer;
|
111
|
+
this._internalSorter = this._defaultSorter;
|
112
|
+
|
113
|
+
this._eventArg = {"colDef": this}; // WARNING: Circular reference
|
114
|
+
this._sortContext = {"colDef": this};
|
115
|
+
if(hostGrid) {
|
116
|
+
this._updateContext("grid", hostGrid);
|
117
|
+
this._updateContext("core", hostGrid["getCoreGrid"]()); // TODO: Handle multiple core grids
|
118
|
+
}
|
119
|
+
|
120
|
+
this._classes = [];
|
121
|
+
this._requiredFields = [];
|
122
|
+
|
123
|
+
this.initialize(columnOption);
|
124
|
+
};
|
125
|
+
//#region Private Members
|
126
|
+
/** @type {string}
|
127
|
+
* @private
|
128
|
+
*/
|
129
|
+
ColumnDefinition.prototype._id;
|
130
|
+
/** @type {number}
|
131
|
+
* @private
|
132
|
+
*/
|
133
|
+
ColumnDefinition._runningId = 1;
|
134
|
+
|
135
|
+
/** @type {string}
|
136
|
+
* @private
|
137
|
+
*/
|
138
|
+
ColumnDefinition.prototype._field = "";
|
139
|
+
/** @type {string}
|
140
|
+
* @private
|
141
|
+
*/
|
142
|
+
ColumnDefinition.prototype._dataType = "";
|
143
|
+
/** @type {string}
|
144
|
+
* @private
|
145
|
+
*/
|
146
|
+
ColumnDefinition.prototype._name = "";
|
147
|
+
/** @type {boolean}
|
148
|
+
* @private
|
149
|
+
*/
|
150
|
+
ColumnDefinition.prototype._isDefaultName = true;
|
151
|
+
/** @type {string|null}
|
152
|
+
* @private
|
153
|
+
*/
|
154
|
+
ColumnDefinition.prototype._tooltip = null;
|
155
|
+
/** @type {!Array.<string>}
|
156
|
+
* @private
|
157
|
+
*/
|
158
|
+
ColumnDefinition.prototype._requiredFields;
|
159
|
+
/** @type {Function}
|
160
|
+
* @private
|
161
|
+
*/
|
162
|
+
ColumnDefinition.prototype._headerRenderer = null;
|
163
|
+
/** @type {string}
|
164
|
+
* @private
|
165
|
+
*/
|
166
|
+
ColumnDefinition.prototype._headerAlignment = "";
|
167
|
+
/** @type {!Function}
|
168
|
+
* @private
|
169
|
+
*/
|
170
|
+
ColumnDefinition.prototype._internalRenderer;
|
171
|
+
/** @type {Array.<Function>}
|
172
|
+
* @private
|
173
|
+
*/
|
174
|
+
ColumnDefinition.prototype._userRenderers = null;
|
175
|
+
/** @type {Function}
|
176
|
+
* @private
|
177
|
+
*/
|
178
|
+
ColumnDefinition.prototype._activatedRenderer = null;
|
179
|
+
/** @type {Object.<string, Function>}
|
180
|
+
* @private
|
181
|
+
*/
|
182
|
+
ColumnDefinition.prototype._rendererMap = null;
|
183
|
+
/** @type {!Function}
|
184
|
+
* @private
|
185
|
+
*/
|
186
|
+
ColumnDefinition.prototype._internalSorter;
|
187
|
+
/** Workaround to provide user a context during the sorting process
|
188
|
+
* @type {Object}
|
189
|
+
* @private
|
190
|
+
*/
|
191
|
+
ColumnDefinition.prototype._sortContext = null;
|
192
|
+
/** @type {Function}
|
193
|
+
* @private
|
194
|
+
*/
|
195
|
+
ColumnDefinition.prototype._userSorter = null;
|
196
|
+
/** @type {boolean}
|
197
|
+
* @private
|
198
|
+
*/
|
199
|
+
ColumnDefinition.prototype._sortable = true;
|
200
|
+
|
201
|
+
/** @type {!Object}
|
202
|
+
* @private
|
203
|
+
*/
|
204
|
+
ColumnDefinition.prototype._eventArg;
|
205
|
+
/** @type {boolean}
|
206
|
+
* @private
|
207
|
+
*/
|
208
|
+
ColumnDefinition.prototype._realTimeField = false;
|
209
|
+
|
210
|
+
/** @type {!Array.<string>}
|
211
|
+
* @private
|
212
|
+
*/
|
213
|
+
ColumnDefinition.prototype._classes;
|
214
|
+
|
215
|
+
/** @type {Engine}
|
216
|
+
* @private
|
217
|
+
*/
|
218
|
+
ColumnDefinition.prototype._fnEngine = null;
|
219
|
+
/** @type {Formula}
|
220
|
+
* @private
|
221
|
+
*/
|
222
|
+
ColumnDefinition.prototype._formula = null;
|
223
|
+
/** @type {string}
|
224
|
+
* @private
|
225
|
+
*/
|
226
|
+
ColumnDefinition.prototype._formulaRef = "";
|
227
|
+
/** @type {string}
|
228
|
+
* @deprecated
|
229
|
+
* @private
|
230
|
+
*/
|
231
|
+
ColumnDefinition.prototype._initialOrder = "";
|
232
|
+
/** @type {boolean|null}
|
233
|
+
* @private
|
234
|
+
*/
|
235
|
+
ColumnDefinition.prototype._rowSorting = null;
|
236
|
+
/** @type {boolean}
|
237
|
+
* @private
|
238
|
+
*/
|
239
|
+
ColumnDefinition.prototype._textSelect = false;
|
240
|
+
|
241
|
+
/** @type {Object}
|
242
|
+
* @private
|
243
|
+
*/
|
244
|
+
ColumnDefinition.prototype._userModel = null;
|
245
|
+
//#endregion Private Members
|
246
|
+
|
247
|
+
|
248
|
+
/** @public
|
249
|
+
*/
|
250
|
+
ColumnDefinition.prototype.dispose = function() {
|
251
|
+
this._eventArg = {}; // Clear all references
|
252
|
+
this._activatedRenderer = this._rendererMap = null;
|
253
|
+
this.setRenderer(null); // this._userRenderers are removed
|
254
|
+
this.setSorter(null);
|
255
|
+
this._userModel = null;
|
256
|
+
// TODO: Remove any related reference from this._fnEngine
|
257
|
+
};
|
258
|
+
/** @public
|
259
|
+
* @param {ColumnDefinition~Options|string=} columnOption
|
260
|
+
*/
|
261
|
+
ColumnDefinition.prototype.initialize = function(columnOption) {
|
262
|
+
var field = "";
|
263
|
+
if(typeof columnOption === "string") {
|
264
|
+
field = columnOption;
|
265
|
+
columnOption = FieldDefinition.get(field) || null;
|
266
|
+
}
|
267
|
+
|
268
|
+
if(!columnOption) {
|
269
|
+
this._setField(field);
|
270
|
+
return;
|
271
|
+
}
|
272
|
+
|
273
|
+
var i, len, key;
|
274
|
+
//#region Apply pre-defined option
|
275
|
+
field = columnOption["field"];
|
276
|
+
var defaultOption = FieldDefinition.get(field);
|
277
|
+
if(defaultOption && defaultOption !== columnOption) { // The column match the default field list
|
278
|
+
var userOption = columnOption;
|
279
|
+
columnOption = {}; // Create a new object for cloning process
|
280
|
+
|
281
|
+
for(key in defaultOption) {
|
282
|
+
columnOption[key] = defaultOption[key];
|
283
|
+
}
|
284
|
+
|
285
|
+
for(key in userOption) {
|
286
|
+
columnOption[key] = userOption[key]; // User option will override default option with the same key
|
287
|
+
}
|
288
|
+
}
|
289
|
+
//#endregion Apply pre-defined option
|
290
|
+
|
291
|
+
var val;
|
292
|
+
val = columnOption["id"];
|
293
|
+
if(val) {
|
294
|
+
this._id = val + "";
|
295
|
+
}
|
296
|
+
|
297
|
+
val = columnOption["formulaEngine"];
|
298
|
+
if(val && val["addFormula"]) {
|
299
|
+
this._fnEngine = /** @type{Engine} */(val);
|
300
|
+
}
|
301
|
+
val = columnOption["formulaReference"];
|
302
|
+
if(val) {
|
303
|
+
this._formulaRef = val + "";
|
304
|
+
}
|
305
|
+
|
306
|
+
val = columnOption["require"] || columnOption["requiredFields"];
|
307
|
+
if(val != null) { // Empty string is allowed
|
308
|
+
if(typeof val === "string") {
|
309
|
+
this._requiredFields = val.split(" ");
|
310
|
+
} else if(Array.isArray(val)) {
|
311
|
+
this._requiredFields = val.slice();
|
312
|
+
}
|
313
|
+
}
|
314
|
+
|
315
|
+
this._setField(field, columnOption["formula"]); // Perform some field manipulation
|
316
|
+
|
317
|
+
val = columnOption["name"] || columnOption["title"]; // title is migrated from Composite Grid
|
318
|
+
if(val != null) { // Name can be empty string
|
319
|
+
this._name = val;
|
320
|
+
this._isDefaultName = false;
|
321
|
+
}
|
322
|
+
|
323
|
+
val = columnOption["dataType"];
|
324
|
+
if(val != null) {
|
325
|
+
this._dataType = val;
|
326
|
+
}
|
327
|
+
|
328
|
+
val = columnOption["notRealTimeField"];
|
329
|
+
if(val != null) {
|
330
|
+
this._realTimeField = !val;
|
331
|
+
}
|
332
|
+
|
333
|
+
val = columnOption["tooltip"];
|
334
|
+
if(val != null) { // Tooltip can be empty string
|
335
|
+
this._tooltip = val;
|
336
|
+
}
|
337
|
+
|
338
|
+
val = columnOption["headerAlignment"] || columnOption["titleAlignment"];
|
339
|
+
if(val != null) {
|
340
|
+
this._headerAlignment = _toAlignment(val);
|
341
|
+
}
|
342
|
+
|
343
|
+
val = columnOption["headerBinding"] || columnOption["headerRenderer"];
|
344
|
+
// eslint-disable-next-line no-undefined
|
345
|
+
if(val !== undefined) { // null is allowed for headerBinding
|
346
|
+
this._headerRenderer = val;
|
347
|
+
}
|
348
|
+
|
349
|
+
val = columnOption["binding"] || columnOption["renderer"];
|
350
|
+
if(!val) {
|
351
|
+
val = columnOption["formatter"]; // Migrate from Composite Grid
|
352
|
+
}
|
353
|
+
// eslint-disable-next-line no-undefined
|
354
|
+
if(val !== undefined) { // null is allowed for renderer
|
355
|
+
if(val instanceof Array) {
|
356
|
+
len = val.length;
|
357
|
+
for(i = 0; i < len; ++i) {
|
358
|
+
this.addRenderer(/** @type{Function} */(val[i]));
|
359
|
+
}
|
360
|
+
} else if(val) {
|
361
|
+
if(typeof val === "function") {
|
362
|
+
this.setRenderer(val);
|
363
|
+
} else if(val["binding"]) {
|
364
|
+
this.setRenderer(val["binding"]);
|
365
|
+
}
|
366
|
+
} else {
|
367
|
+
this.setRenderer(null);
|
368
|
+
}
|
369
|
+
}
|
370
|
+
|
371
|
+
val = columnOption["rowSorting"];
|
372
|
+
if(val != null) {
|
373
|
+
this._rowSorting = val ? true : false;
|
374
|
+
}
|
375
|
+
|
376
|
+
val = columnOption["sortLogic"] || columnOption["sortingLogic"] || columnOption["sorter"];
|
377
|
+
// eslint-disable-next-line no-undefined
|
378
|
+
if(val !== undefined) { // null is allowed for sorter
|
379
|
+
this.setSorter(/** @type{Function} */(val));
|
380
|
+
}
|
381
|
+
|
382
|
+
// Deprecate
|
383
|
+
val = columnOption["sortable"];
|
384
|
+
if(val != null) {
|
385
|
+
this._sortable = val ? true : false;
|
386
|
+
}
|
387
|
+
|
388
|
+
val = columnOption["className"] || columnOption["class"];
|
389
|
+
if(typeof val === "string") {
|
390
|
+
this._classes = val.split(" ");
|
391
|
+
}
|
392
|
+
|
393
|
+
// Deprecate
|
394
|
+
val = columnOption["sort"];
|
395
|
+
if(val) {
|
396
|
+
this._initialOrder = val;
|
397
|
+
}
|
398
|
+
|
399
|
+
val = columnOption["textSelect"];
|
400
|
+
if(val) {
|
401
|
+
this._textSelect = val;
|
402
|
+
}
|
403
|
+
|
404
|
+
this._userModel = columnOption;
|
405
|
+
};
|
406
|
+
|
407
|
+
/** @public
|
408
|
+
* @return {string}
|
409
|
+
*/
|
410
|
+
ColumnDefinition.prototype.getId = function() {
|
411
|
+
return this._id;
|
412
|
+
};
|
413
|
+
/** @public
|
414
|
+
* @return {!Array.<string>}
|
415
|
+
*/
|
416
|
+
ColumnDefinition.prototype.getRequireFields = function() {
|
417
|
+
// TODO: Validate the fields
|
418
|
+
return this._requiredFields;
|
419
|
+
};
|
420
|
+
/** @public
|
421
|
+
* @function
|
422
|
+
* @return {!Array.<string>}
|
423
|
+
*/
|
424
|
+
ColumnDefinition.prototype.getRequiredFields = ColumnDefinition.prototype.getRequireFields;
|
425
|
+
/** @public
|
426
|
+
* @return {!Function}
|
427
|
+
*/
|
428
|
+
ColumnDefinition.prototype.getRenderer = function() {
|
429
|
+
return this._internalRenderer;
|
430
|
+
};
|
431
|
+
/** @public
|
432
|
+
* @return {Function}
|
433
|
+
*/
|
434
|
+
ColumnDefinition.prototype.getHeaderRenderer = function() {
|
435
|
+
return this._headerRenderer;
|
436
|
+
};
|
437
|
+
/** @public
|
438
|
+
* @return {!Function}
|
439
|
+
*/
|
440
|
+
ColumnDefinition.prototype.getSorter = function() {
|
441
|
+
return this._internalSorter;
|
442
|
+
};
|
443
|
+
/** Internal method for preparing sort context
|
444
|
+
* @public
|
445
|
+
* @ignore
|
446
|
+
* @param {number} colIndex
|
447
|
+
* @return {!Function}
|
448
|
+
*/
|
449
|
+
ColumnDefinition.prototype._prepareSortContext = function(colIndex) {
|
450
|
+
// TODO: Context does not get updated when column is moved or removed
|
451
|
+
this._sortContext["colIndex"] = colIndex;
|
452
|
+
this._sortContext["field"] = this._field;
|
453
|
+
|
454
|
+
return this._internalSorter;
|
455
|
+
};
|
456
|
+
|
457
|
+
/** @public
|
458
|
+
* @return {string}
|
459
|
+
*/
|
460
|
+
ColumnDefinition.prototype.getName = function() {
|
461
|
+
return this._name;
|
462
|
+
};
|
463
|
+
/** @public
|
464
|
+
* @return {boolean}
|
465
|
+
*/
|
466
|
+
ColumnDefinition.prototype.isDefaultName = function() {
|
467
|
+
return this._isDefaultName;
|
468
|
+
};
|
469
|
+
/** @public
|
470
|
+
* @return {string}
|
471
|
+
*/
|
472
|
+
ColumnDefinition.prototype.getFieldDefinition = function () {
|
473
|
+
return FieldDefinition.get(this._field);
|
474
|
+
};
|
475
|
+
/** get realtime field data type
|
476
|
+
* @public
|
477
|
+
* @return {string}
|
478
|
+
*/
|
479
|
+
ColumnDefinition.prototype.getFieldDataType = function () {
|
480
|
+
var fieldDef = this.getFieldDefinition();
|
481
|
+
if(fieldDef && fieldDef.fieldDataType) {
|
482
|
+
return fieldDef.fieldDataType;
|
483
|
+
}
|
484
|
+
return "";
|
485
|
+
};
|
486
|
+
/** get data type
|
487
|
+
* @public
|
488
|
+
* @return {string}
|
489
|
+
*/
|
490
|
+
ColumnDefinition.prototype.getDataType = function () {
|
491
|
+
if(this._dataType) return this._dataType;
|
492
|
+
|
493
|
+
var fieldDataType = this.getFieldDataType();
|
494
|
+
if(fieldDataType) {
|
495
|
+
return TYPE_MAPPING[fieldDataType.toUpperCase()];
|
496
|
+
}
|
497
|
+
return "";
|
498
|
+
};
|
499
|
+
/** get data type
|
500
|
+
* @public
|
501
|
+
* @param {string} field
|
502
|
+
* @return {string}
|
503
|
+
*/
|
504
|
+
ColumnDefinition.getDataType = function(field) {
|
505
|
+
var fieldDef = FieldDefinition.get(field);
|
506
|
+
if(fieldDef) {
|
507
|
+
var fieldDataType = fieldDef.fieldDataType ? fieldDef.fieldDataType.toUpperCase() : null;
|
508
|
+
return TYPE_MAPPING[fieldDataType] ? TYPE_MAPPING[fieldDataType] : "";
|
509
|
+
}
|
510
|
+
return "";
|
511
|
+
};
|
512
|
+
/** @public
|
513
|
+
* @return {string}
|
514
|
+
*/
|
515
|
+
ColumnDefinition.prototype.getTooltip = function() {
|
516
|
+
if(this._tooltip != null) {
|
517
|
+
if(typeof this._tooltip === "string") {
|
518
|
+
return this._tooltip; // There is a custom tooltip
|
519
|
+
} else if(!this._tooltip) {
|
520
|
+
return "";
|
521
|
+
}
|
522
|
+
}
|
523
|
+
|
524
|
+
if(this._name) {
|
525
|
+
return this._name;
|
526
|
+
}
|
527
|
+
|
528
|
+
if(this._field) {
|
529
|
+
return this._field;
|
530
|
+
}
|
531
|
+
|
532
|
+
return "";
|
533
|
+
};
|
534
|
+
/** @public
|
535
|
+
* @return {string}
|
536
|
+
*/
|
537
|
+
ColumnDefinition.prototype.getField = function() {
|
538
|
+
return this._field;
|
539
|
+
};
|
540
|
+
/** @public
|
541
|
+
* @return {!Array.<string>}
|
542
|
+
*/
|
543
|
+
ColumnDefinition.prototype.getAllFields = function() {
|
544
|
+
return this._requiredFields.concat(this._field);
|
545
|
+
};
|
546
|
+
/** @public
|
547
|
+
* @return {boolean}
|
548
|
+
*/
|
549
|
+
ColumnDefinition.prototype.isRealTimeField = function() {
|
550
|
+
// TODO: Simplify this logic
|
551
|
+
if(this._field && this._realTimeField && !this._formula) {
|
552
|
+
return ColumnDefinition.isRealTimeField(this._field);
|
553
|
+
}
|
554
|
+
return false;
|
555
|
+
};
|
556
|
+
/** @public
|
557
|
+
* @return {boolean}
|
558
|
+
*/
|
559
|
+
ColumnDefinition.prototype.isFormulaField = function() {
|
560
|
+
return this._formula ? true : false;
|
561
|
+
};
|
562
|
+
/** @public
|
563
|
+
* @param {string} field
|
564
|
+
* @return {boolean}
|
565
|
+
*/
|
566
|
+
ColumnDefinition.isFormulaField = function(field) {
|
567
|
+
return field.charAt(0) === "=";
|
568
|
+
};
|
569
|
+
/** @public
|
570
|
+
* @param {string} field
|
571
|
+
* @return {boolean}
|
572
|
+
*/
|
573
|
+
ColumnDefinition.isAdcField = function(field) {
|
574
|
+
return field.indexOf("TR.") === 0;
|
575
|
+
};
|
576
|
+
/** @public
|
577
|
+
* @param {string} field
|
578
|
+
* @return {boolean}
|
579
|
+
*/
|
580
|
+
ColumnDefinition.isRealTimeField = function(field) {
|
581
|
+
if(field) {
|
582
|
+
if(!ColumnDefinition.isFormulaField(field)) {
|
583
|
+
return !ColumnDefinition.isAdcField(field);
|
584
|
+
}
|
585
|
+
}
|
586
|
+
|
587
|
+
return false;
|
588
|
+
};
|
589
|
+
/** @public
|
590
|
+
* @function
|
591
|
+
* @param {Array.<string>} fields To be used by Array.reduce method
|
592
|
+
* @param {ColumnDefinition} colDef
|
593
|
+
* @return {!Array.<string>}
|
594
|
+
*/
|
595
|
+
ColumnDefinition.getRealTimeFields = function(fields, colDef) {
|
596
|
+
if(colDef.isRealTimeField()) {
|
597
|
+
fields.push(colDef.getField());
|
598
|
+
}
|
599
|
+
|
600
|
+
// TODO: Exclude any formula references from requesting real-time field
|
601
|
+
var reqFields = colDef.getRequiredFields();
|
602
|
+
var len = reqFields.length;
|
603
|
+
for(var i = 0; i < len; ++i) {
|
604
|
+
var field = reqFields[i];
|
605
|
+
if(ColumnDefinition.isRealTimeField(field)) {
|
606
|
+
fields.push(field);
|
607
|
+
}
|
608
|
+
}
|
609
|
+
return fields;
|
610
|
+
};
|
611
|
+
/** @public
|
612
|
+
* @deprecated
|
613
|
+
* @return {boolean}
|
614
|
+
*/
|
615
|
+
ColumnDefinition.prototype.isSortable = function() {
|
616
|
+
return this._sortable;
|
617
|
+
};
|
618
|
+
/** @public
|
619
|
+
* @return {boolean}
|
620
|
+
*/
|
621
|
+
ColumnDefinition.prototype.isScalable = function() {
|
622
|
+
var core = this._eventArg["core"];
|
623
|
+
var grid = this._eventArg["grid"];
|
624
|
+
var colIndex = grid.getColumnIndex(this);
|
625
|
+
return core.getColumnScalability(colIndex);
|
626
|
+
};
|
627
|
+
/** @public
|
628
|
+
* @deprecated
|
629
|
+
* @return {string}
|
630
|
+
*/
|
631
|
+
ColumnDefinition.prototype.getInitialSortOrder = function() {
|
632
|
+
return this._initialOrder;
|
633
|
+
};
|
634
|
+
/** @public
|
635
|
+
* @return {number}
|
636
|
+
*/
|
637
|
+
ColumnDefinition.prototype.getWidth = function() {
|
638
|
+
var core = this._eventArg["core"];
|
639
|
+
var grid = this._eventArg["grid"];
|
640
|
+
var colIndex = grid.getColumnIndex(this);
|
641
|
+
return core.getColumnWidth(colIndex);
|
642
|
+
};
|
643
|
+
/** @public
|
644
|
+
* @return {number}
|
645
|
+
*/
|
646
|
+
ColumnDefinition.prototype.getMinWidth = function() {
|
647
|
+
var core = this._eventArg["core"];
|
648
|
+
var grid = this._eventArg["grid"];
|
649
|
+
var colIndex = grid.getColumnIndex(this);
|
650
|
+
return core.getMinimumColumnWidth(colIndex);
|
651
|
+
};
|
652
|
+
/** @public
|
653
|
+
* @return {string}
|
654
|
+
*/
|
655
|
+
ColumnDefinition.prototype.getTextAlign = function() {
|
656
|
+
var core = this._eventArg["core"];
|
657
|
+
var grid = this._eventArg["grid"];
|
658
|
+
var colIndex = grid.getColumnIndex(this);
|
659
|
+
return core.getColumnAlignment(colIndex);
|
660
|
+
};
|
661
|
+
/** @public
|
662
|
+
* @return {string}
|
663
|
+
*/
|
664
|
+
ColumnDefinition.prototype.getHeaderAlignment = function() {
|
665
|
+
return this._headerAlignment || "";
|
666
|
+
};
|
667
|
+
/** @public
|
668
|
+
* @return {!Array.<string>}
|
669
|
+
*/
|
670
|
+
ColumnDefinition.prototype.getClasses = function() {
|
671
|
+
return this._classes;
|
672
|
+
};
|
673
|
+
/** @public
|
674
|
+
* @param {Object=} colOptions
|
675
|
+
* @return {!Object}
|
676
|
+
*/
|
677
|
+
ColumnDefinition.prototype.getConfigObject = function(colOptions) {
|
678
|
+
var obj = colOptions || {};
|
679
|
+
|
680
|
+
if(this._field !== "" && !this._field.match(/^COLUMN_/)) {
|
681
|
+
obj["field"] = this._field;
|
682
|
+
}
|
683
|
+
|
684
|
+
var value = this.getDataType();
|
685
|
+
if(value) {
|
686
|
+
obj["dataType"] = value;
|
687
|
+
}
|
688
|
+
|
689
|
+
if(this._formulaRef) {
|
690
|
+
obj["formulaReference"] = this._formulaRef;
|
691
|
+
}
|
692
|
+
|
693
|
+
if(this._requiredFields) {
|
694
|
+
obj["require"] = this._requiredFields;
|
695
|
+
}
|
696
|
+
|
697
|
+
if(this._name) {
|
698
|
+
obj["name"] = this._name;
|
699
|
+
}
|
700
|
+
|
701
|
+
if(!this._realTimeField) {
|
702
|
+
obj["notRealTimeField"] = true;
|
703
|
+
}
|
704
|
+
|
705
|
+
if(this._tooltip != null) {
|
706
|
+
obj["tooltip"] = this._tooltip;
|
707
|
+
}
|
708
|
+
|
709
|
+
if(this._rowSorting != null) {
|
710
|
+
obj["rowSorting"] = this._rowSorting;
|
711
|
+
}
|
712
|
+
|
713
|
+
if(!this._sortable) {
|
714
|
+
obj["sortable"] = false;
|
715
|
+
}
|
716
|
+
|
717
|
+
if(this._initialOrder) {
|
718
|
+
obj["sort"] = this._initialOrder;
|
719
|
+
}
|
720
|
+
|
721
|
+
if(this._classes) {
|
722
|
+
obj["className"] = this._classes.join(" ");
|
723
|
+
}
|
724
|
+
|
725
|
+
if(this._textSelect) {
|
726
|
+
obj["textSelect"] = this._textSelect;
|
727
|
+
}
|
728
|
+
|
729
|
+
if(this._headerAlignment) {
|
730
|
+
obj["headerAlignment"] = this._headerAlignment;
|
731
|
+
}
|
732
|
+
|
733
|
+
var core = this._eventArg["core"];
|
734
|
+
var grid = this._eventArg["grid"];
|
735
|
+
var colIndex = grid.getColumnIndex(this);
|
736
|
+
value = core.getColumnScalability(colIndex);
|
737
|
+
obj["scalable"] = value;
|
738
|
+
|
739
|
+
value = core.getColumnCustomLaneSize(colIndex);
|
740
|
+
obj["width"] = value;
|
741
|
+
|
742
|
+
value = core.getMinimumColumnWidth(colIndex);
|
743
|
+
if(value !== 32) {
|
744
|
+
obj["minWidth"] = value;
|
745
|
+
}
|
746
|
+
|
747
|
+
value = core.isColumnVisible(colIndex);
|
748
|
+
if(!value) {
|
749
|
+
obj["hidden"] = true;
|
750
|
+
}
|
751
|
+
|
752
|
+
value = core.getColumnAlignment(colIndex);
|
753
|
+
if(value !== "default") {
|
754
|
+
obj["textAlign"] = value;
|
755
|
+
}
|
756
|
+
|
757
|
+
return obj;
|
758
|
+
};
|
759
|
+
/** @public
|
760
|
+
* @return {boolean}
|
761
|
+
*/
|
762
|
+
ColumnDefinition.prototype.isHidden = function() {
|
763
|
+
var core = this._eventArg["core"];
|
764
|
+
var grid = this._eventArg["grid"];
|
765
|
+
var colIndex = grid.getColumnIndex(this);
|
766
|
+
return !core.isColumnVisible(colIndex);
|
767
|
+
};
|
768
|
+
/** @public
|
769
|
+
* @return {boolean}
|
770
|
+
*/
|
771
|
+
ColumnDefinition.prototype.isTextSelect = function () {
|
772
|
+
return this._textSelect;
|
773
|
+
};
|
774
|
+
/** @public
|
775
|
+
* @param {boolean=} bool
|
776
|
+
*/
|
777
|
+
ColumnDefinition.prototype.hide = function(bool) {
|
778
|
+
var core = this._eventArg["core"];
|
779
|
+
var grid = this._eventArg["grid"];
|
780
|
+
var colIndex = grid.getColumnIndex(this);
|
781
|
+
core.hideColumn(colIndex, bool !== false);
|
782
|
+
};
|
783
|
+
/** This will clear all previously stored renderers and set a new one.
|
784
|
+
* @public
|
785
|
+
* @param {Function} func
|
786
|
+
*/
|
787
|
+
ColumnDefinition.prototype.setHeaderRenderer = function(func) {
|
788
|
+
this._headerRenderer = func;
|
789
|
+
};
|
790
|
+
/** This will clear all previously stored renderers and set a new one.
|
791
|
+
* @public
|
792
|
+
* @param {Function} func
|
793
|
+
*/
|
794
|
+
ColumnDefinition.prototype.setRenderer = function(func) {
|
795
|
+
if(typeof func === "function") {
|
796
|
+
this._internalRenderer = this._customRenderer;
|
797
|
+
if(this._activatedRenderer !== func) {
|
798
|
+
if(this._userRenderers) {
|
799
|
+
this._userRenderers.length = 0;
|
800
|
+
} else {
|
801
|
+
this._userRenderers = [];
|
802
|
+
}
|
803
|
+
this._userRenderers.push(func);
|
804
|
+
}
|
805
|
+
} else {
|
806
|
+
this._internalRenderer = this._defaultRenderer;
|
807
|
+
this._userRenderers = null;
|
808
|
+
}
|
809
|
+
};
|
810
|
+
/** Add more renderer to the existing list
|
811
|
+
* @public
|
812
|
+
* @param {Function} func
|
813
|
+
*/
|
814
|
+
ColumnDefinition.prototype.addRenderer = function(func) {
|
815
|
+
if(func) {
|
816
|
+
if(this._userRenderers) {
|
817
|
+
this._userRenderers.push(func);
|
818
|
+
} else {
|
819
|
+
this.setRenderer(func);
|
820
|
+
}
|
821
|
+
}
|
822
|
+
};
|
823
|
+
/** Make the given renderer the first priority, overriding any existing renderer. The method still maintain existing renderers for restoring back to original state.
|
824
|
+
* @public
|
825
|
+
* @param {string=} id ID for renderer mapping. If not specified the default renderer will be picked up
|
826
|
+
* @param {Function=} func If not specified the renderer which corresponded id from mapping will be picked up. If false is given, the corresponding id will be cleared.
|
827
|
+
* @return {boolean} Current activation state after the call
|
828
|
+
*/
|
829
|
+
ColumnDefinition.prototype.activateRenderer = function(id, func) {
|
830
|
+
var renderer = null;
|
831
|
+
if (id != null) {
|
832
|
+
var rendererMap = this._rendererMap;
|
833
|
+
if (!rendererMap) {
|
834
|
+
rendererMap = this._rendererMap = {};
|
835
|
+
}
|
836
|
+
|
837
|
+
if (typeof func === "function") {
|
838
|
+
renderer = rendererMap[id] = func;
|
839
|
+
} else if(func == null) { // Use cached method if null or undefined value is given
|
840
|
+
renderer = rendererMap[id];
|
841
|
+
} else if(!func) { // Empty string, zero, or false value
|
842
|
+
renderer = rendererMap[id] = null;
|
843
|
+
}
|
844
|
+
}
|
845
|
+
|
846
|
+
this._activatedRenderer = renderer || null;
|
847
|
+
if(!renderer) { // Restore back existing user renderers if there is no activated renderer
|
848
|
+
renderer = this._userRenderers ? this._userRenderers[0] : null;
|
849
|
+
}
|
850
|
+
this.setRenderer(renderer);
|
851
|
+
return this._activatedRenderer ? true : false;
|
852
|
+
};
|
853
|
+
/** @public
|
854
|
+
* @param {ColumnDefinition~SortLogic=} func
|
855
|
+
*/
|
856
|
+
ColumnDefinition.prototype.setSorter = function(func) {
|
857
|
+
if(typeof func === "function") {
|
858
|
+
this._userSorter = func;
|
859
|
+
if(this._rowSorting == null) {
|
860
|
+
this._internalSorter = this._realTimeField ? this._dataSorter : this._rowDefSorter;
|
861
|
+
} else {
|
862
|
+
this._internalSorter = !this._rowSorting ? this._dataSorter : this._rowDefSorter;
|
863
|
+
}
|
864
|
+
} else {
|
865
|
+
this._userSorter = null;
|
866
|
+
this._internalSorter = this._defaultSorter;
|
867
|
+
}
|
868
|
+
};
|
869
|
+
|
870
|
+
/** To allow user change column name in run-time (language change or localization)
|
871
|
+
* @public
|
872
|
+
* @param {string} str
|
873
|
+
*/
|
874
|
+
ColumnDefinition.prototype.setName = function(str) {
|
875
|
+
this._name = str;
|
876
|
+
this._isDefaultName = false;
|
877
|
+
};
|
878
|
+
|
879
|
+
/** @private
|
880
|
+
* @param {string|null=} field
|
881
|
+
* @param {string} formulaStr
|
882
|
+
*/
|
883
|
+
ColumnDefinition.prototype._setField = function(field, formulaStr) {
|
884
|
+
var defaultField = (field == null); // undefined or null
|
885
|
+
if(!field) {
|
886
|
+
field = "";
|
887
|
+
}
|
888
|
+
// Trim white spaces -- equivalent to String.trim(), which is not support in IE8
|
889
|
+
field = field.replace(/^\s+|\s+$/gm, "");
|
890
|
+
|
891
|
+
if(this._fnEngine) {
|
892
|
+
var uppercasedF = field.toUpperCase(); // For comparison only
|
893
|
+
var predefinedF = formulaStr || PredefinedFormula.get(uppercasedF);
|
894
|
+
if(predefinedF || ColumnDefinition.isFormulaField(field)) {
|
895
|
+
field = Formula.toUpperCase(field);
|
896
|
+
this._formula = this._fnEngine.addFormula(predefinedF || field); // Always a success
|
897
|
+
if(predefinedF) {
|
898
|
+
this._formula.setAlias(field); // This field is used for retrieving data for dependent fields
|
899
|
+
this._fnEngine.addReference(this._formula, field); // Add reference name for dependencies calculation
|
900
|
+
}
|
901
|
+
|
902
|
+
this._retrieveNestedFields(this._formula.getFieldNames());
|
903
|
+
}
|
904
|
+
if(this._formulaRef) { // Allow user input to be used as a shorthand of the field
|
905
|
+
// WARNING: Formula Reference must be unique, or else it will be changed
|
906
|
+
this._formulaRef = this._fnEngine.addReference(this._formula || field, this._formulaRef);
|
907
|
+
}
|
908
|
+
}
|
909
|
+
|
910
|
+
if(defaultField) {
|
911
|
+
this._field = "COLUMN_" + this._id;
|
912
|
+
this._name = "Column " + this._id;
|
913
|
+
} else {
|
914
|
+
this._field = field;
|
915
|
+
this._name = field;
|
916
|
+
this._realTimeField = field ? true : false;
|
917
|
+
}
|
918
|
+
this._isDefaultName = true;
|
919
|
+
this._updateContext("field", field);
|
920
|
+
if(this.isRealTimeField()) { // Only realtime field will have a formatted field
|
921
|
+
this._updateContext("formattedField", field + "_FORMATTED");
|
922
|
+
}
|
923
|
+
};
|
924
|
+
/** @private
|
925
|
+
* @param {Array.<string>} fields
|
926
|
+
*/
|
927
|
+
ColumnDefinition.prototype._retrieveNestedFields = function(fields) {
|
928
|
+
if(!fields) {
|
929
|
+
return;
|
930
|
+
}
|
931
|
+
for(var i = fields.length; --i >= 0;) {
|
932
|
+
var field = fields[i];
|
933
|
+
var uppercasedF = field.toUpperCase();
|
934
|
+
var predefinedF = PredefinedFormula.get(uppercasedF);
|
935
|
+
if(predefinedF) { // Predefined formula
|
936
|
+
var f = this._fnEngine.getFormula(field); // Get formula by reference name
|
937
|
+
if(f) {
|
938
|
+
f.addFormulaCount(); // Add reference count
|
939
|
+
} else {
|
940
|
+
f = this._fnEngine.addFormula(predefinedF);
|
941
|
+
f.setAlias(field); // This field is used for retrieving data for dependent fields
|
942
|
+
this._fnEngine.addReference(f, field); // Add reference name for dependencies calculation
|
943
|
+
}
|
944
|
+
this._retrieveNestedFields(f.getFieldNames()); // Recursion
|
945
|
+
} else { // Any field that is not a predefined formula will be sent for requesting real-time data
|
946
|
+
this._requiredFields.push(field); // TODO: Exclude column reference
|
947
|
+
}
|
948
|
+
}
|
949
|
+
};
|
950
|
+
/** @private
|
951
|
+
* @param {Object} e
|
952
|
+
*/
|
953
|
+
ColumnDefinition.prototype._defaultRenderer = function(e) {
|
954
|
+
var rowDef = /** @type{RowDefinition} */(e["dataValue"]);
|
955
|
+
var data = rowDef.getData(this._field);
|
956
|
+
e["cell"].setContent(data);
|
957
|
+
};
|
958
|
+
/** @private
|
959
|
+
* @param {Object} e
|
960
|
+
*/
|
961
|
+
ColumnDefinition.prototype._customRenderer = function(e) {
|
962
|
+
var rowDef = /** @type{RowDefinition} */(e["dataValue"]);
|
963
|
+
var rowData = rowDef.getRowData();
|
964
|
+
|
965
|
+
var arg = this._eventArg; // Reuse the same object
|
966
|
+
arg["rowDef"] = rowDef;
|
967
|
+
arg["rowData"] = rowData;
|
968
|
+
arg["rowIndex"] = e["rowIndex"];
|
969
|
+
if(rowData) {
|
970
|
+
arg["data"] = rowData[this._field];
|
971
|
+
}
|
972
|
+
arg["colIndex"] = e["colIndex"];
|
973
|
+
arg["cell"] = e["cell"];
|
974
|
+
arg["section"] = e["section"];
|
975
|
+
|
976
|
+
if(this._activatedRenderer) {
|
977
|
+
this._activatedRenderer(arg);
|
978
|
+
} else {
|
979
|
+
var urs = this._userRenderers;
|
980
|
+
var len = urs.length;
|
981
|
+
for(var i = 0; i < len; ++i) {
|
982
|
+
urs[i](arg);
|
983
|
+
}
|
984
|
+
}
|
985
|
+
};
|
986
|
+
/** @private
|
987
|
+
* @param {RowDefinition} rowDefA
|
988
|
+
* @param {RowDefinition} rowDefB
|
989
|
+
* @param {number} order
|
990
|
+
* @return {number}
|
991
|
+
*/
|
992
|
+
ColumnDefinition.prototype._defaultSorter = function(rowDefA, rowDefB, order) {
|
993
|
+
var orderA = rowDefA.getGroupOrder();
|
994
|
+
var orderB = rowDefB.getGroupOrder();
|
995
|
+
if(orderA !== orderB) {
|
996
|
+
return orderA - orderB; // Regardless of sort order
|
997
|
+
}
|
998
|
+
|
999
|
+
var a = rowDefA.getData(this._field);
|
1000
|
+
var b = rowDefB.getData(this._field);
|
1001
|
+
|
1002
|
+
if(a == null || a !== a) {
|
1003
|
+
if(b == null || b !== b) {
|
1004
|
+
return 0;
|
1005
|
+
}
|
1006
|
+
return 1;
|
1007
|
+
}
|
1008
|
+
if(b == null || b !== b) {
|
1009
|
+
return -1;
|
1010
|
+
}
|
1011
|
+
|
1012
|
+
if(a < b) {
|
1013
|
+
return -order;
|
1014
|
+
}
|
1015
|
+
if(b < a) {
|
1016
|
+
return order;
|
1017
|
+
}
|
1018
|
+
return 0;
|
1019
|
+
};
|
1020
|
+
/** @private
|
1021
|
+
* @param {RowDefinition} rowDefA
|
1022
|
+
* @param {RowDefinition} rowDefB
|
1023
|
+
* @param {number} order
|
1024
|
+
* @return {number}
|
1025
|
+
*/
|
1026
|
+
ColumnDefinition.prototype._dataSorter = function(rowDefA, rowDefB, order) {
|
1027
|
+
var orderA = rowDefA.getGroupOrder();
|
1028
|
+
var orderB = rowDefB.getGroupOrder();
|
1029
|
+
if(orderA !== orderB) {
|
1030
|
+
return orderA - orderB; // Regardless of sort order
|
1031
|
+
}
|
1032
|
+
|
1033
|
+
var a = rowDefA.getData(this._field);
|
1034
|
+
var b = rowDefB.getData(this._field);
|
1035
|
+
return this._userSorter(a, b, order, this._sortContext);
|
1036
|
+
};
|
1037
|
+
/** @private
|
1038
|
+
* @param {RowDefinition} rowDefA
|
1039
|
+
* @param {RowDefinition} rowDefB
|
1040
|
+
* @param {number} order
|
1041
|
+
* @return {number}
|
1042
|
+
*/
|
1043
|
+
ColumnDefinition.prototype._rowDefSorter = function(rowDefA, rowDefB, order) {
|
1044
|
+
var orderA = rowDefA.getGroupOrder();
|
1045
|
+
var orderB = rowDefB.getGroupOrder();
|
1046
|
+
if(orderA !== orderB) {
|
1047
|
+
return orderA - orderB; // Regardless of sort order
|
1048
|
+
}
|
1049
|
+
|
1050
|
+
return this._userSorter(rowDefA, rowDefB, order, this._sortContext);
|
1051
|
+
};
|
1052
|
+
/** @private
|
1053
|
+
* @param {string} propName
|
1054
|
+
* @param {*} val
|
1055
|
+
*/
|
1056
|
+
ColumnDefinition.prototype._updateContext = function(propName, val) {
|
1057
|
+
this._eventArg[propName] = this._sortContext[propName] = val;
|
1058
|
+
};
|
1059
|
+
|
1060
|
+
/** @public
|
1061
|
+
* @return {Object}
|
1062
|
+
*/
|
1063
|
+
ColumnDefinition.prototype.getUserModel = function() {
|
1064
|
+
return this._userModel;
|
1065
|
+
};
|
1066
|
+
|
1067
|
+
/** @public
|
1068
|
+
*/
|
1069
|
+
ColumnDefinition.prototype.clearUserModel = function() {
|
1070
|
+
this._userModel = null;
|
1071
|
+
};
|
1072
|
+
|
1073
|
+
export {ColumnDefinition, COL_DEF};
|
1074
|
+
export default ColumnDefinition;
|