@refinitiv-ui/efx-grid 0.0.0-dev.12023565035.1
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-dragging/es6/ColumnDragging.d.ts +51 -0
- package/lib/column-dragging/es6/ColumnDragging.js +968 -0
- package/lib/column-dragging/es6/index.d.ts +1 -0
- package/lib/column-dragging/es6/index.js +1 -0
- package/lib/column-format-dialog/index.d.ts +2 -0
- package/lib/column-format-dialog/index.js +2 -0
- package/lib/column-format-dialog/lib/column-format-dialog.d.ts +77 -0
- package/lib/column-format-dialog/lib/column-format-dialog.js +2688 -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 +982 -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 +2 -0
- package/lib/column-selection-dialog/index.js +2 -0
- package/lib/column-selection-dialog/lib/column-selection-dialog.d.ts +66 -0
- package/lib/column-selection-dialog/lib/column-selection-dialog.js +2034 -0
- package/lib/column-selection-dialog/lib/locale/translation-de.d.ts +7 -0
- package/lib/column-selection-dialog/lib/locale/translation-de.js +20 -0
- package/lib/column-selection-dialog/lib/locale/translation-en.d.ts +7 -0
- package/lib/column-selection-dialog/lib/locale/translation-en.js +20 -0
- package/lib/column-selection-dialog/lib/locale/translation-ja.d.ts +7 -0
- package/lib/column-selection-dialog/lib/locale/translation-ja.js +20 -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 +20 -0
- package/lib/column-selection-dialog/lib/locale/translation-zh.d.ts +7 -0
- package/lib/column-selection-dialog/lib/locale/translation-zh.js +20 -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 +258 -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 +8 -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 +8 -0
- package/lib/column-selection-dialog/themes/halo/column-selection-dialog.less +25 -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 +8 -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 +8 -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 +8 -0
- package/lib/column-selection-dialog/themes/solar/column-selection-dialog.less +5 -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 +8 -0
- package/lib/core/dist/core.css +1 -0
- package/lib/core/dist/core.js +33910 -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 +43 -0
- package/lib/core/es6/data/DataCache.js +597 -0
- package/lib/core/es6/data/DataTable.d.ts +156 -0
- package/lib/core/es6/data/DataTable.js +2206 -0
- package/lib/core/es6/data/DataView.d.ts +332 -0
- package/lib/core/es6/data/DataView.js +4144 -0
- package/lib/core/es6/data/Segment.d.ts +91 -0
- package/lib/core/es6/data/Segment.js +1001 -0
- package/lib/core/es6/data/SegmentCollection.d.ts +84 -0
- package/lib/core/es6/data/SegmentCollection.js +713 -0
- package/lib/core/es6/data/WrappedView.d.ts +290 -0
- package/lib/core/es6/data/WrappedView.js +1320 -0
- package/lib/core/es6/grid/Core.d.ts +455 -0
- package/lib/core/es6/grid/Core.js +6196 -0
- package/lib/core/es6/grid/ILayoutGrid.d.ts +212 -0
- package/lib/core/es6/grid/ILayoutGrid.js +706 -0
- package/lib/core/es6/grid/LayoutGrid.d.ts +37 -0
- package/lib/core/es6/grid/LayoutGrid.js +2975 -0
- package/lib/core/es6/grid/VirtualizedLayoutGrid.d.ts +28 -0
- package/lib/core/es6/grid/VirtualizedLayoutGrid.js +1241 -0
- package/lib/core/es6/grid/components/Cell.d.ts +52 -0
- package/lib/core/es6/grid/components/Cell.js +826 -0
- package/lib/core/es6/grid/components/CellFloatingPanel.d.ts +21 -0
- package/lib/core/es6/grid/components/CellFloatingPanel.js +130 -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 +40 -0
- package/lib/core/es6/grid/components/CellSpans.js +368 -0
- package/lib/core/es6/grid/components/Column.d.ts +22 -0
- package/lib/core/es6/grid/components/Column.js +618 -0
- package/lib/core/es6/grid/components/ElementWrapper.d.ts +127 -0
- package/lib/core/es6/grid/components/ElementWrapper.js +718 -0
- package/lib/core/es6/grid/components/HScrollbar.d.ts +28 -0
- package/lib/core/es6/grid/components/HScrollbar.js +241 -0
- package/lib/core/es6/grid/components/Scrollbar.d.ts +63 -0
- package/lib/core/es6/grid/components/Scrollbar.js +1413 -0
- package/lib/core/es6/grid/components/StretchedCells.d.ts +17 -0
- package/lib/core/es6/grid/components/StretchedCells.js +342 -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 +166 -0
- package/lib/core/es6/grid/plugins/SortableTitlePlugin.d.ts +155 -0
- package/lib/core/es6/grid/plugins/SortableTitlePlugin.js +1977 -0
- package/lib/core/es6/grid/util/CellBoundPainter.d.ts +16 -0
- package/lib/core/es6/grid/util/CellBoundPainter.js +171 -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/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 +679 -0
- package/lib/core/es6/grid/util/SelectionList.d.ts +54 -0
- package/lib/core/es6/grid/util/SelectionList.js +491 -0
- package/lib/core/es6/grid/util/TrackLayout.d.ts +92 -0
- package/lib/core/es6/grid/util/TrackLayout.js +902 -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 +20 -0
- package/lib/core/es6/grid/util/util.js +391 -0
- package/lib/core/es6/index.d.ts +79 -0
- package/lib/core/es6/index.js +125 -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 +2 -0
- package/lib/filter-dialog/index.js +2 -0
- package/lib/filter-dialog/lib/checkbox-list.d.ts +52 -0
- package/lib/filter-dialog/lib/checkbox-list.js +444 -0
- package/lib/filter-dialog/lib/filter-dialog.d.ts +75 -0
- package/lib/filter-dialog/lib/filter-dialog.js +1160 -0
- package/lib/filter-dialog/lib/locale/translation-de.d.ts +7 -0
- package/lib/filter-dialog/lib/locale/translation-de.js +40 -0
- package/lib/filter-dialog/lib/locale/translation-en.d.ts +7 -0
- package/lib/filter-dialog/lib/locale/translation-en.js +40 -0
- package/lib/filter-dialog/lib/locale/translation-ja.d.ts +7 -0
- package/lib/filter-dialog/lib/locale/translation-ja.js +40 -0
- package/lib/filter-dialog/lib/locale/translation-zh-hant.d.ts +7 -0
- package/lib/filter-dialog/lib/locale/translation-zh-hant.js +40 -0
- package/lib/filter-dialog/lib/locale/translation-zh.d.ts +7 -0
- package/lib/filter-dialog/lib/locale/translation-zh.js +40 -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 +42 -0
- package/lib/filter-dialog/themes/base.less +191 -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 +15 -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 +20 -0
- package/lib/formatters/es6/CoralButtonFormatter.js +45 -0
- package/lib/formatters/es6/CoralCheckboxFormatter.d.ts +12 -0
- package/lib/formatters/es6/CoralCheckboxFormatter.js +50 -0
- package/lib/formatters/es6/CoralComboBoxFormatter.d.ts +23 -0
- package/lib/formatters/es6/CoralComboBoxFormatter.js +103 -0
- package/lib/formatters/es6/CoralIconFormatter.d.ts +21 -0
- package/lib/formatters/es6/CoralIconFormatter.js +50 -0
- package/lib/formatters/es6/CoralInputFormatter.d.ts +12 -0
- package/lib/formatters/es6/CoralInputFormatter.js +45 -0
- package/lib/formatters/es6/CoralRadioButtonFormatter.d.ts +20 -0
- package/lib/formatters/es6/CoralRadioButtonFormatter.js +85 -0
- package/lib/formatters/es6/CoralSelectFormatter.d.ts +23 -0
- package/lib/formatters/es6/CoralSelectFormatter.js +71 -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 +20 -0
- package/lib/formatters/es6/EFButtonFormatter.js +45 -0
- package/lib/formatters/es6/EFCheckboxFormatter.d.ts +12 -0
- package/lib/formatters/es6/EFCheckboxFormatter.js +50 -0
- package/lib/formatters/es6/EFComboBoxFormatter.d.ts +23 -0
- package/lib/formatters/es6/EFComboBoxFormatter.js +78 -0
- package/lib/formatters/es6/EFDateTimePickerFormatter.d.ts +13 -0
- package/lib/formatters/es6/EFDateTimePickerFormatter.js +60 -0
- package/lib/formatters/es6/EFIconFormatter.d.ts +21 -0
- package/lib/formatters/es6/EFIconFormatter.js +50 -0
- package/lib/formatters/es6/EFNumberFieldFormatter.d.ts +12 -0
- package/lib/formatters/es6/EFNumberFieldFormatter.js +45 -0
- package/lib/formatters/es6/EFRadioButtonFormatter.d.ts +20 -0
- package/lib/formatters/es6/EFRadioButtonFormatter.js +132 -0
- package/lib/formatters/es6/EFSelectFormatter.d.ts +23 -0
- package/lib/formatters/es6/EFSelectFormatter.js +76 -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 +26 -0
- package/lib/formatters/es6/FormatterBuilder.js +493 -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 +23 -0
- package/lib/formatters/es6/SimpleTickerFormatter.js +66 -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 +35 -0
- package/lib/formatters/es6/index.d.ts +64 -0
- package/lib/formatters/es6/index.js +88 -0
- package/lib/grid/index.d.ts +2 -0
- package/lib/grid/index.js +3 -0
- package/lib/grid/lib/efx-grid.d.ts +53 -0
- package/lib/grid/lib/efx-grid.js +444 -0
- package/lib/grid/themes/base.less +137 -0
- package/lib/grid/themes/ds/dark/css/native-elements.css +0 -0
- package/lib/grid/themes/ds/dark/efx-grid.js +4 -0
- package/lib/grid/themes/ds/dark/es5/all-elements.js +2 -0
- package/lib/grid/themes/ds/dark/imports/all-elements.js +1 -0
- package/lib/grid/themes/ds/dark/imports/custom-elements.js +1 -0
- package/lib/grid/themes/ds/dark/imports/native-elements.js +0 -0
- package/lib/grid/themes/ds/dark.js +3 -0
- package/lib/grid/themes/ds/efx-grid.less +207 -0
- package/lib/grid/themes/ds/index.less +3 -0
- package/lib/grid/themes/ds/light/css/native-elements.css +0 -0
- package/lib/grid/themes/ds/light/efx-grid.js +4 -0
- package/lib/grid/themes/ds/light/es5/all-elements.js +2 -0
- package/lib/grid/themes/ds/light/imports/all-elements.js +1 -0
- package/lib/grid/themes/ds/light/imports/custom-elements.js +1 -0
- package/lib/grid/themes/ds/light/imports/native-elements.js +0 -0
- package/lib/grid/themes/ds/light.js +3 -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 +127 -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 +100 -0
- package/lib/index.js +100 -0
- package/lib/row-segmenting/es6/RowSegmenting.d.ts +115 -0
- package/lib/row-segmenting/es6/RowSegmenting.js +1182 -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 +54547 -0
- package/lib/rt-grid/dist/rt-grid.min.js +1 -0
- package/lib/rt-grid/es6/ColumnDefinition.d.ts +174 -0
- package/lib/rt-grid/es6/ColumnDefinition.js +1203 -0
- package/lib/rt-grid/es6/DataConnector.d.ts +43 -0
- package/lib/rt-grid/es6/DataConnector.js +290 -0
- package/lib/rt-grid/es6/FieldDefinition.d.ts +40 -0
- package/lib/rt-grid/es6/FieldDefinition.js +560 -0
- package/lib/rt-grid/es6/Grid.d.ts +376 -0
- package/lib/rt-grid/es6/Grid.js +4653 -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 +40 -0
- package/lib/rt-grid/es6/ReferenceCounter.js +251 -0
- package/lib/rt-grid/es6/RowDefSorter.d.ts +19 -0
- package/lib/rt-grid/es6/RowDefSorter.js +231 -0
- package/lib/rt-grid/es6/RowDefinition.d.ts +156 -0
- package/lib/rt-grid/es6/RowDefinition.js +1478 -0
- package/lib/rt-grid/es6/SnapshotFiller.d.ts +36 -0
- package/lib/rt-grid/es6/SnapshotFiller.js +537 -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 +68 -0
- package/lib/statistics-row/es6/StatisticsRow.js +807 -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 +46 -0
- package/lib/tr-grid-auto-tooltip/es6/AutoTooltip.js +617 -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 +70 -0
- package/lib/tr-grid-cell-selection/es6/CellSelection.js +1695 -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 +82 -0
- package/lib/tr-grid-checkbox/es6/Checkbox.js +1704 -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 +817 -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 +91 -0
- package/lib/tr-grid-column-formatting/es6/ColumnFormatting.js +617 -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 +110 -0
- package/lib/tr-grid-column-grouping/es6/ColumnGrouping.js +2028 -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 +1010 -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 +77 -0
- package/lib/tr-grid-column-selection/es6/ColumnSelection.js +1405 -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 +160 -0
- package/lib/tr-grid-column-stack/es6/ColumnStack.js +2155 -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 +100 -0
- package/lib/tr-grid-conditional-coloring/es6/ConditionalColoring.js +1513 -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 +519 -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 +453 -0
- package/lib/tr-grid-contextmenu/es6/MenuEventAPI.d.ts +22 -0
- package/lib/tr-grid-contextmenu/es6/MenuEventAPI.js +138 -0
- package/lib/tr-grid-contextmenu/es6/MenuItem.d.ts +41 -0
- package/lib/tr-grid-contextmenu/es6/MenuItem.js +285 -0
- package/lib/tr-grid-contextmenu/es6/PopupMenu.d.ts +33 -0
- package/lib/tr-grid-contextmenu/es6/PopupMenu.js +303 -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 +64 -0
- package/lib/tr-grid-filter-input/es6/FilterInput.js +1027 -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 +45 -0
- package/lib/tr-grid-heat-map/es6/HeatMap.js +401 -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 +148 -0
- package/lib/tr-grid-in-cell-editing/es6/InCellEditing.js +2671 -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 +58 -0
- package/lib/tr-grid-pagination/es6/Pagination.js +433 -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 +804 -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 +50 -0
- package/lib/tr-grid-printer/es6/CellWriter.js +234 -0
- package/lib/tr-grid-printer/es6/ColumnWriter.d.ts +13 -0
- package/lib/tr-grid-printer/es6/ColumnWriter.js +23 -0
- package/lib/tr-grid-printer/es6/GridPrinter.d.ts +33 -0
- package/lib/tr-grid-printer/es6/GridPrinter.js +794 -0
- package/lib/tr-grid-printer/es6/PrintTrait.d.ts +39 -0
- package/lib/tr-grid-printer/es6/PrintTrait.js +494 -0
- package/lib/tr-grid-printer/es6/SectionWriter.d.ts +57 -0
- package/lib/tr-grid-printer/es6/SectionWriter.js +238 -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/LEDGuage.d.ts +39 -0
- package/lib/tr-grid-range-bar/es6/LEDGuage.js +261 -0
- package/lib/tr-grid-range-bar/es6/RangeBar.d.ts +56 -0
- package/lib/tr-grid-range-bar/es6/RangeBar.js +514 -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 +81 -0
- package/lib/tr-grid-row-dragging/es6/RowDragging.js +1479 -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 +159 -0
- package/lib/tr-grid-row-filtering/es6/RowFiltering.js +2568 -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 +123 -0
- package/lib/tr-grid-row-grouping/es6/RowGrouping.js +1728 -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 +75 -0
- package/lib/tr-grid-row-selection/es6/RowSelection.js +1447 -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 +64 -0
- package/lib/tr-grid-rowcoloring/es6/RowColoring.js +615 -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 +72 -0
- package/lib/tr-grid-textformatting/es6/TextFormatting.js +543 -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 +27 -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 +142 -0
- package/lib/tr-grid-util/es6/CellPainter.js +1183 -0
- package/lib/tr-grid-util/es6/Color.d.ts +40 -0
- package/lib/tr-grid-util/es6/Color.js +210 -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 +16 -0
- package/lib/tr-grid-util/es6/Deferred.js +108 -0
- package/lib/tr-grid-util/es6/Delay.d.ts +20 -0
- package/lib/tr-grid-util/es6/Delay.js +96 -0
- package/lib/tr-grid-util/es6/Dom.d.ts +32 -0
- package/lib/tr-grid-util/es6/Dom.js +350 -0
- package/lib/tr-grid-util/es6/DragUI.d.ts +20 -0
- package/lib/tr-grid-util/es6/DragUI.js +263 -0
- package/lib/tr-grid-util/es6/ElementObserver.d.ts +12 -0
- package/lib/tr-grid-util/es6/ElementObserver.js +134 -0
- package/lib/tr-grid-util/es6/ElementWrapper.d.ts +23 -0
- package/lib/tr-grid-util/es6/ElementWrapper.js +84 -0
- package/lib/tr-grid-util/es6/ElfDate.d.ts +26 -0
- package/lib/tr-grid-util/es6/ElfDate.js +164 -0
- package/lib/tr-grid-util/es6/ElfUtil.d.ts +46 -0
- package/lib/tr-grid-util/es6/ElfUtil.js +637 -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 +24 -0
- package/lib/tr-grid-util/es6/ExpanderIcon.js +120 -0
- package/lib/tr-grid-util/es6/ExpressionParser.d.ts +10 -0
- package/lib/tr-grid-util/es6/ExpressionParser.js +408 -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 +440 -0
- package/lib/tr-grid-util/es6/FilterBuilder.d.ts +54 -0
- package/lib/tr-grid-util/es6/FilterBuilder.js +580 -0
- package/lib/tr-grid-util/es6/FilterOperators.d.ts +56 -0
- package/lib/tr-grid-util/es6/FilterOperators.js +255 -0
- package/lib/tr-grid-util/es6/GridPlugin.d.ts +86 -0
- package/lib/tr-grid-util/es6/GridPlugin.js +1055 -0
- package/lib/tr-grid-util/es6/GroupDefinitions.d.ts +74 -0
- package/lib/tr-grid-util/es6/GroupDefinitions.js +642 -0
- package/lib/tr-grid-util/es6/Icon.d.ts +14 -0
- package/lib/tr-grid-util/es6/Icon.js +62 -0
- package/lib/tr-grid-util/es6/MouseDownTrait.d.ts +42 -0
- package/lib/tr-grid-util/es6/MouseDownTrait.js +250 -0
- package/lib/tr-grid-util/es6/MultiTableManager.d.ts +40 -0
- package/lib/tr-grid-util/es6/MultiTableManager.js +611 -0
- package/lib/tr-grid-util/es6/NumberFormatter.d.ts +85 -0
- package/lib/tr-grid-util/es6/NumberFormatter.js +528 -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 +163 -0
- package/lib/tr-grid-util/es6/Popup.d.ts +98 -0
- package/lib/tr-grid-util/es6/Popup.js +991 -0
- package/lib/tr-grid-util/es6/RangeBar.d.ts +33 -0
- package/lib/tr-grid-util/es6/RangeBar.js +260 -0
- package/lib/tr-grid-util/es6/RequestQueue.d.ts +30 -0
- package/lib/tr-grid-util/es6/RequestQueue.js +228 -0
- package/lib/tr-grid-util/es6/RowPainter.d.ts +60 -0
- package/lib/tr-grid-util/es6/RowPainter.js +448 -0
- package/lib/tr-grid-util/es6/SubTable.d.ts +78 -0
- package/lib/tr-grid-util/es6/SubTable.js +642 -0
- package/lib/tr-grid-util/es6/Table.d.ts +146 -0
- package/lib/tr-grid-util/es6/Table.js +832 -0
- package/lib/tr-grid-util/es6/TextHighlighter.d.ts +16 -0
- package/lib/tr-grid-util/es6/TextHighlighter.js +268 -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 +66 -0
- package/lib/tr-grid-util/es6/Util.js +508 -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 +890 -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 +65 -0
- package/lib/tr-grid-util/es6/index.js +102 -0
- package/lib/tr-grid-util/es6/jet/Adc.d.ts +9 -0
- package/lib/tr-grid-util/es6/jet/Adc.js +268 -0
- package/lib/tr-grid-util/es6/jet/CollectionDict.d.ts +28 -0
- package/lib/tr-grid-util/es6/jet/CollectionDict.js +151 -0
- package/lib/tr-grid-util/es6/jet/DataGenerator.d.ts +136 -0
- package/lib/tr-grid-util/es6/jet/DataGenerator.js +860 -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 +71 -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 +82 -0
- package/lib/tr-grid-util/es6/jet/MockQuotes2.js +890 -0
- package/lib/tr-grid-util/es6/jet/MockRTK.d.ts +48 -0
- package/lib/tr-grid-util/es6/jet/MockRTK.js +82 -0
- package/lib/tr-grid-util/es6/jet/MockUtil.d.ts +7 -0
- package/lib/tr-grid-util/es6/jet/MockUtil.js +25 -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 +111 -0
- package/lib/tr-grid-util/es6/jsx.d.ts +223 -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 +46 -0
- package/lib/types/es6/CellSelection.d.ts +70 -0
- package/lib/types/es6/Checkbox.d.ts +82 -0
- package/lib/types/es6/ColumnDragging.d.ts +51 -0
- package/lib/types/es6/ColumnFitter.d.ts +56 -0
- package/lib/types/es6/ColumnFormatting.d.ts +92 -0
- package/lib/types/es6/ColumnGrouping.d.ts +107 -0
- package/lib/types/es6/ColumnResizing.d.ts +68 -0
- package/lib/types/es6/ColumnSelection.d.ts +77 -0
- package/lib/types/es6/ColumnStack.d.ts +160 -0
- package/lib/types/es6/CompositeGrid/CollapsibleHeaderPlugin.d.ts +11 -0
- package/lib/types/es6/CompositeGrid/ColumnSelectionPlugin.d.ts +41 -0
- package/lib/types/es6/CompositeGrid/ColumnWidthAdjustingPlugin.d.ts +45 -0
- package/lib/types/es6/CompositeGrid/CompositeGrid.d.ts +289 -0
- package/lib/types/es6/CompositeGrid/DragAndDropTitlePlugin.d.ts +23 -0
- package/lib/types/es6/CompositeGrid/DraggableContentPlugin.d.ts +41 -0
- package/lib/types/es6/CompositeGrid/Plugin.d.ts +30 -0
- package/lib/types/es6/CompositeGrid/ResizableTitlePlugin.d.ts +32 -0
- package/lib/types/es6/CompositeGrid/RowSelectionPlugin.d.ts +44 -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 +100 -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 +20 -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 +21 -0
- package/lib/types/es6/CoralInputFormatter.d.ts +12 -0
- package/lib/types/es6/CoralRadioButtonFormatter.d.ts +20 -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 +43 -0
- package/lib/types/es6/Core/data/DataTable.d.ts +156 -0
- package/lib/types/es6/Core/data/DataView.d.ts +332 -0
- package/lib/types/es6/Core/data/Segment.d.ts +91 -0
- package/lib/types/es6/Core/data/SegmentCollection.d.ts +84 -0
- package/lib/types/es6/Core/data/WrappedView.d.ts +290 -0
- package/lib/types/es6/Core/grid/Core.d.ts +455 -0
- package/lib/types/es6/Core/grid/ILayoutGrid.d.ts +212 -0
- package/lib/types/es6/Core/grid/LayoutGrid.d.ts +37 -0
- package/lib/types/es6/Core/grid/VirtualizedLayoutGrid.d.ts +28 -0
- package/lib/types/es6/Core/grid/components/Cell.d.ts +52 -0
- package/lib/types/es6/Core/grid/components/CellFloatingPanel.d.ts +21 -0
- package/lib/types/es6/Core/grid/components/CellSpan.d.ts +18 -0
- package/lib/types/es6/Core/grid/components/CellSpans.d.ts +40 -0
- package/lib/types/es6/Core/grid/components/Column.d.ts +22 -0
- package/lib/types/es6/Core/grid/components/ElementWrapper.d.ts +127 -0
- package/lib/types/es6/Core/grid/components/HScrollbar.d.ts +28 -0
- package/lib/types/es6/Core/grid/components/Scrollbar.d.ts +63 -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/SortableTitlePlugin.d.ts +155 -0
- package/lib/types/es6/Core/grid/util/CellBoundPainter.d.ts +16 -0
- package/lib/types/es6/Core/grid/util/Conflator.d.ts +32 -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 +54 -0
- package/lib/types/es6/Core/grid/util/TrackLayout.d.ts +92 -0
- package/lib/types/es6/Core/grid/util/Virtualizer.d.ts +40 -0
- package/lib/types/es6/Core/grid/util/util.d.ts +20 -0
- package/lib/types/es6/Core/index.d.ts +79 -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 +20 -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 +21 -0
- package/lib/types/es6/EFNumberFieldFormatter.d.ts +12 -0
- package/lib/types/es6/EFRadioButtonFormatter.d.ts +20 -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 +58 -0
- package/lib/types/es6/Extensions.d.ts +63 -0
- package/lib/types/es6/FilterInput.d.ts +64 -0
- package/lib/types/es6/FormatterBuilder.d.ts +26 -0
- package/lib/types/es6/GridFormatter.d.ts +63 -0
- package/lib/types/es6/HeatMap.d.ts +45 -0
- package/lib/types/es6/InCellEditing.d.ts +148 -0
- package/lib/types/es6/MenuEventAPI.d.ts +22 -0
- package/lib/types/es6/MenuItem.d.ts +41 -0
- package/lib/types/es6/NumericInputFormatter.d.ts +13 -0
- package/lib/types/es6/Pagination.d.ts +58 -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 +33 -0
- package/lib/types/es6/RangeBar.d.ts +39 -0
- package/lib/types/es6/RealtimeGrid/ColumnDefinition.d.ts +176 -0
- package/lib/types/es6/RealtimeGrid/DataConnector.d.ts +43 -0
- package/lib/types/es6/RealtimeGrid/FieldDefinition.d.ts +40 -0
- package/lib/types/es6/RealtimeGrid/Grid.d.ts +413 -0
- package/lib/types/es6/RealtimeGrid/PredefinedFormula.d.ts +16 -0
- package/lib/types/es6/RealtimeGrid/ReferenceCounter.d.ts +40 -0
- package/lib/types/es6/RealtimeGrid/RowDefSorter.d.ts +19 -0
- package/lib/types/es6/RealtimeGrid/RowDefinition.d.ts +156 -0
- package/lib/types/es6/RealtimeGrid/SnapshotFiller.d.ts +36 -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 +64 -0
- package/lib/types/es6/RowDragging.d.ts +81 -0
- package/lib/types/es6/RowFiltering.d.ts +159 -0
- package/lib/types/es6/RowGrouping.d.ts +123 -0
- package/lib/types/es6/RowSegmenting.d.ts +109 -0
- package/lib/types/es6/RowSelection.d.ts +75 -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 +23 -0
- package/lib/types/es6/SimpleToggleFormatter.d.ts +22 -0
- package/lib/types/es6/StatisticsRow.d.ts +68 -0
- package/lib/types/es6/TextFormatter.d.ts +12 -0
- package/lib/types/es6/TextFormatting.d.ts +72 -0
- package/lib/types/es6/TitleWrap.d.ts +27 -0
- package/lib/types/es6/Zoom.d.ts +52 -0
- package/lib/types/es6/index.d.ts +80 -0
- package/lib/types/index.d.ts +1 -0
- package/lib/utils/index.d.ts +7 -0
- package/lib/utils/index.js +7 -0
- package/lib/versions.json +37 -0
- package/lib/window-exporter.js +18 -0
- package/lib/zoom/es6/Zoom.d.ts +52 -0
- package/lib/zoom/es6/Zoom.js +438 -0
- package/lib/zoom/es6/index.d.ts +1 -0
- package/lib/zoom/es6/index.js +1 -0
- package/package.json +69 -0
@@ -0,0 +1,1513 @@
|
|
1
|
+
import {Ext} from '../../tr-grid-util/es6/Ext.js';
|
2
|
+
import {GridPlugin} from '../../tr-grid-util/es6/GridPlugin.js';
|
3
|
+
import {extendObject, injectCss, prettifyCss} from '../../tr-grid-util/es6/Util.js';
|
4
|
+
import {CellPainter} from '../../tr-grid-util/es6/CellPainter.js';
|
5
|
+
import {FilterBuilder} from '../../tr-grid-util/es6/FilterBuilder.js';
|
6
|
+
import {ElfUtil} from '../../tr-grid-util/es6/ElfUtil.js';
|
7
|
+
|
8
|
+
/** @typedef {Object} ConditionalColoringPlugin~Options
|
9
|
+
* @description The options can be specified by `conditionalColoring` property of the main grid's options
|
10
|
+
* @property {Object=} predefinedColors Predefined color object map for conditional coloring
|
11
|
+
* @property {number=} blinkingDuration=250 Blinking duration in milliseconds
|
12
|
+
* @property {(boolean|string)=} insertionBlinking=false When a new row is added to Grid, cell will blink.
|
13
|
+
* Specify true for blinking with theme's neutral movement color. To blink cell with a certain color, specify a string of hex color value.
|
14
|
+
*/
|
15
|
+
|
16
|
+
/** @typedef {Object} ConditionalColoringPlugin~ColumnOptions
|
17
|
+
* @description Extension column options that can be specified on each Grid column configuration object
|
18
|
+
* @property {Array.<ConditionalColoringPlugin~Condition>=} conditions=null List of condition options
|
19
|
+
* @property {(string|boolean|ConditionalColoringPlugin~ColorText)=} colorText=null A shorthand for specifying default condition based on the field.
|
20
|
+
* @property {(string|boolean|ConditionalColoringPlugin~ColorText)=} tickColor=null Alias of colorText.
|
21
|
+
* @property {(string|boolean|ConditionalColoringPlugin~Blinking)=} blinking=null Blink Options. If specified, the cell will be blinked on data change.
|
22
|
+
* @property {string=} field Field for Grid column configuration object
|
23
|
+
*/
|
24
|
+
|
25
|
+
/** @typedef {Object} ConditionalColoringPlugin~ConditionalColoringOptions
|
26
|
+
* @description Available options for changing conditional coloring at runtime
|
27
|
+
* @property {Array.<ConditionalColoringPlugin~Condition>=} conditions=null List of condition options
|
28
|
+
* @property {(string|boolean|ConditionalColoringPlugin~ColorText)=} colorText=null A shorthand for specifying default condition based on the field.
|
29
|
+
* @property {(string|boolean|ConditionalColoringPlugin~ColorText)=} tickColor=null Alias of colorText
|
30
|
+
* @property {string=} field Field to be used for all conditions, overriding the field defined in ColumnOptions
|
31
|
+
*/
|
32
|
+
|
33
|
+
/** @typedef {Object} ConditionalColoringPlugin~Condition
|
34
|
+
* @description Properties defining colors and conditioning
|
35
|
+
* @property {(string|Function|Array)=} expression The expression can be in the following forms: text, function, and 2 dimentional array
|
36
|
+
* @property {string=} backgroundColor="" CSS color (e.g. #ffffff, black)
|
37
|
+
* @property {string=} color CSS="" color (e.g. #000000, white)
|
38
|
+
* @property {string=} cssClass cssClass="" Predefined color class name
|
39
|
+
* @property {string=} field Field to be used for this specific condition, overriding the field defined in ConditionalColoringOptions
|
40
|
+
* @example
|
41
|
+
* let conditions1 = [ // Add cssClass for any value that is greater than or equal to 10, and less than or equal to 20
|
42
|
+
* {expression: [["GTE", 10, "AND"], ["LTE", 20]], cssClass: "predefinedColors"}
|
43
|
+
* ];
|
44
|
+
* let conditions2 = [ // Add background color for any fieldA value that is not blank value (e.g., null, undefined, 0, false, empty string)
|
45
|
+
* {
|
46
|
+
* expression: function(rowData) {
|
47
|
+
* return rowData["fieldA"] ? true : false;
|
48
|
+
* },
|
49
|
+
* backgroundColor: "blue",
|
50
|
+
* field: "fieldA"
|
51
|
+
* }
|
52
|
+
* ];
|
53
|
+
* let conditions3 = [ // Add text color for any fieldA value that is not equal to 10
|
54
|
+
* {expression: "[fieldA] != 10", color: "red"}
|
55
|
+
* ];
|
56
|
+
*/
|
57
|
+
|
58
|
+
/** @typedef {(string|boolean|Object)} ConditionalColoringPlugin~Blinking
|
59
|
+
* @description Available options describing `blinking` object. Additionally if specify blinking as string of field, blinking will base on the field. <br>
|
60
|
+
* If specified true, field from column definition will be used. If up, down and level value are not specified, theme's movement colors will be used.
|
61
|
+
* @property {boolean=} border=false If enabled, border will be blinked instead of background
|
62
|
+
* @property {string=} field If not specified, field from column definition will be used
|
63
|
+
* @property {string=} up CSS color (e.g. #00ff00, green)
|
64
|
+
* @property {string=} down CSS color (e.g. #ff0000, red)
|
65
|
+
* @property {(string|boolean)=} level CSS color (e.g. #33333, grey). If false value is specified, blinking for level color is disabled.
|
66
|
+
* @property {number=} duration If specified, this will override blinking duration from extension option. Blinking duration in milliseconds
|
67
|
+
*/
|
68
|
+
|
69
|
+
/** @typedef {(string|boolean|Object)} ConditionalColoringPlugin~ColorText
|
70
|
+
* @description Available options describing `colorText` object. Additionally if specify colorText as string of field, colorText will base on the field. <br>
|
71
|
+
* If specified true, field from column definition will be used.
|
72
|
+
* @property {string=} field If not specified, field from column definition will be used
|
73
|
+
* @property {string=} upClass CSS class name.
|
74
|
+
* @property {string=} downClass CSS class name.
|
75
|
+
* @property {string=} levelClass CSS class name.
|
76
|
+
*/
|
77
|
+
|
78
|
+
/** @type {string}
|
79
|
+
* @private
|
80
|
+
* @constant
|
81
|
+
*/
|
82
|
+
const COLORING_TYPE = "coloring";
|
83
|
+
/** @type {string}
|
84
|
+
* @private
|
85
|
+
* @constant
|
86
|
+
*/
|
87
|
+
const BLINKING_TYPE = "blinking";
|
88
|
+
/** @type {Object}
|
89
|
+
* @private
|
90
|
+
* @constant
|
91
|
+
*/
|
92
|
+
const CLEARING_BG = {
|
93
|
+
"backgroundColor": 1
|
94
|
+
};
|
95
|
+
/** @type {Object}
|
96
|
+
* @private
|
97
|
+
* @constant
|
98
|
+
*/
|
99
|
+
const CLEARING_TEXT = {
|
100
|
+
"color": 1
|
101
|
+
};
|
102
|
+
/** @type {Object}
|
103
|
+
* @private
|
104
|
+
* @constant
|
105
|
+
*/
|
106
|
+
const CLEARING_ALL = {
|
107
|
+
"backgroundColor": 1,
|
108
|
+
"color": 1
|
109
|
+
};
|
110
|
+
|
111
|
+
let _bracketExp = /\[[^\[\]]*\]/g;
|
112
|
+
|
113
|
+
/** @private
|
114
|
+
* @param {string} exp Expression string
|
115
|
+
* @return {Array.<string>}
|
116
|
+
*/
|
117
|
+
let _getFieldsFromExpression = function(exp) {
|
118
|
+
let fields = [];
|
119
|
+
if(exp && typeof exp === "string") {
|
120
|
+
let matches = exp.match(_bracketExp);
|
121
|
+
for (let i = 0; i < matches.length; i++) {
|
122
|
+
fields.push(matches[i].replace(/[\[\]]/g, ""));
|
123
|
+
}
|
124
|
+
}
|
125
|
+
return fields;
|
126
|
+
};
|
127
|
+
|
128
|
+
/** @constructor
|
129
|
+
* @extends {GridPlugin}
|
130
|
+
*/
|
131
|
+
let ConditionalColoringPlugin = function () {
|
132
|
+
this._onSectionBinding = this._onSectionBinding.bind(this);
|
133
|
+
this._onColumnAdded = this._onColumnAdded.bind(this);
|
134
|
+
this._onColumnRemoved = this._onColumnRemoved.bind(this);
|
135
|
+
this._onThemeLoaded = this._onThemeLoaded.bind(this);
|
136
|
+
|
137
|
+
ConditionalColoringPlugin.cleanUpPrevRows = ConditionalColoringPlugin.cleanUpPrevRows.bind(this);
|
138
|
+
ConditionalColoringPlugin._cleanUpPrevFields = ConditionalColoringPlugin._cleanUpPrevFields.bind(this);
|
139
|
+
|
140
|
+
this._hosts = [];
|
141
|
+
};
|
142
|
+
Ext.inherits(ConditionalColoringPlugin, GridPlugin);
|
143
|
+
|
144
|
+
/** @type {number}
|
145
|
+
* @private
|
146
|
+
*/
|
147
|
+
ConditionalColoringPlugin._cleanUpTimer = 0;
|
148
|
+
/** @type {string}
|
149
|
+
* @private
|
150
|
+
*/
|
151
|
+
ConditionalColoringPlugin._controlClass = "predefined-conditional-color";
|
152
|
+
/** @type {string}
|
153
|
+
* @private
|
154
|
+
*/
|
155
|
+
ConditionalColoringPlugin._colorTextStyles;
|
156
|
+
|
157
|
+
/** @type {boolean}
|
158
|
+
* @private
|
159
|
+
*/
|
160
|
+
ConditionalColoringPlugin.prototype._blinkingEnabled = false; // WORKAROUND: To improve performance
|
161
|
+
|
162
|
+
/** @type {Array}
|
163
|
+
* @private
|
164
|
+
*/
|
165
|
+
ConditionalColoringPlugin.prototype._pendingFields;
|
166
|
+
/** @type {Object}
|
167
|
+
* @private
|
168
|
+
*/
|
169
|
+
ConditionalColoringPlugin.prototype._predefinedColors = null;
|
170
|
+
/** @type {number}
|
171
|
+
* @private
|
172
|
+
*/
|
173
|
+
ConditionalColoringPlugin.prototype._blinkingDuration = 250;
|
174
|
+
/** @type {boolean|string}
|
175
|
+
* @private
|
176
|
+
*/
|
177
|
+
ConditionalColoringPlugin.prototype._insertionBlinking = false;
|
178
|
+
/** @type {string}
|
179
|
+
* @private
|
180
|
+
*/
|
181
|
+
ConditionalColoringPlugin._predefinedColorsStyles;
|
182
|
+
|
183
|
+
/** @override
|
184
|
+
* @return {string}
|
185
|
+
*/
|
186
|
+
ConditionalColoringPlugin.prototype.getName = function () {
|
187
|
+
return "ConditionalColoringPlugin"; // Readonly
|
188
|
+
};
|
189
|
+
|
190
|
+
/** Plugin that has multi-table support means that it can have multiple hosts/tables and share its states across those hosts/tables.
|
191
|
+
* @override
|
192
|
+
* @public
|
193
|
+
* @return {boolean}
|
194
|
+
*/
|
195
|
+
ConditionalColoringPlugin.prototype.hasMultiTableSupport = function() {
|
196
|
+
return true;
|
197
|
+
};
|
198
|
+
|
199
|
+
/** @public
|
200
|
+
* @param {Object} host core grid object
|
201
|
+
* @param {Object=} options
|
202
|
+
*/
|
203
|
+
ConditionalColoringPlugin.prototype.initialize = function (host, options) {
|
204
|
+
host._prevDataRows = {};
|
205
|
+
|
206
|
+
let hosts = this._hosts;
|
207
|
+
if(hosts.indexOf(host) >= 0) { return; }
|
208
|
+
|
209
|
+
hosts.push(host);
|
210
|
+
|
211
|
+
let extOptions = options["conditionalColoring"];
|
212
|
+
if (extOptions) {
|
213
|
+
let predefinedColors = extOptions["predefinedColors"];
|
214
|
+
if (predefinedColors != null && typeof predefinedColors === "object") {
|
215
|
+
if (!this._predefinedColors) {
|
216
|
+
this._predefinedColors = predefinedColors;
|
217
|
+
this._predefinedColorsStyles = this._prepareStyles(predefinedColors);
|
218
|
+
}
|
219
|
+
|
220
|
+
this._injectPredefinedColors(host);
|
221
|
+
host.enableClass(ConditionalColoringPlugin._controlClass);
|
222
|
+
}
|
223
|
+
let blinkingDuration = extOptions["blinkingDuration"];
|
224
|
+
if(blinkingDuration != null && typeof blinkingDuration === "number"){
|
225
|
+
this._blinkingDuration = blinkingDuration;
|
226
|
+
}
|
227
|
+
let insertionBlinking = extOptions["insertionBlinking"];
|
228
|
+
if(insertionBlinking != null){
|
229
|
+
this._insertionBlinking = insertionBlinking;
|
230
|
+
}
|
231
|
+
}
|
232
|
+
|
233
|
+
if(hosts.length === 1) {
|
234
|
+
this.config(options);
|
235
|
+
} else {
|
236
|
+
this._applyStyle(host, options);
|
237
|
+
this._injectColorTextStyles();
|
238
|
+
}
|
239
|
+
|
240
|
+
host.listen("postSectionDataBinding", this._onSectionBinding);
|
241
|
+
host.listen("columnAdded", this._onColumnAdded);
|
242
|
+
host.listen("columnRemoved", this._onColumnRemoved);
|
243
|
+
|
244
|
+
if (!CellPainter.themeReady) {
|
245
|
+
CellPainter.loadThemeColors().then(this._onThemeLoaded).catch(this._onThemeLoaded);
|
246
|
+
}
|
247
|
+
|
248
|
+
// Register callback for movement-color-profile attribute changed event
|
249
|
+
ElfUtil.getThemeColors(this._onThemeLoaded);
|
250
|
+
|
251
|
+
// In case of lazy loading
|
252
|
+
// DO something
|
253
|
+
};
|
254
|
+
|
255
|
+
/** @override
|
256
|
+
* @ignore
|
257
|
+
*/
|
258
|
+
ConditionalColoringPlugin.prototype._afterInit = function () {
|
259
|
+
let pendingFields = this._pendingFields;
|
260
|
+
if(pendingFields) {
|
261
|
+
let fields, colIndex, type;
|
262
|
+
for(let i = 0; i < pendingFields.length; i++) {
|
263
|
+
fields = pendingFields[i][0];
|
264
|
+
colIndex = pendingFields[i][1];
|
265
|
+
type = pendingFields[i][2];
|
266
|
+
this._addDataFields(fields, colIndex, type);
|
267
|
+
}
|
268
|
+
this._pendingFields = null;
|
269
|
+
}
|
270
|
+
};
|
271
|
+
|
272
|
+
/** @public
|
273
|
+
* @param {Object} host core grid object
|
274
|
+
*/
|
275
|
+
ConditionalColoringPlugin.prototype.unload = function (host) {
|
276
|
+
let at = this._hosts.indexOf(host);
|
277
|
+
if(at < 0) { return; }
|
278
|
+
this._hosts.splice(at, 1);
|
279
|
+
|
280
|
+
host.unlisten("postSectionDataBinding", this._onSectionBinding);
|
281
|
+
host.unlisten("columnAdded", this._onColumnAdded);
|
282
|
+
host.unlisten("columnRemoved", this._onColumnRemoved);
|
283
|
+
|
284
|
+
host._prevDataRows = null;
|
285
|
+
|
286
|
+
this._dispose();
|
287
|
+
};
|
288
|
+
/** Remove redundant built-in feature
|
289
|
+
* @public
|
290
|
+
* @param {string} optionName
|
291
|
+
* @param {*} optionVal
|
292
|
+
* @return {*} The transformed value of the option
|
293
|
+
*/
|
294
|
+
ConditionalColoringPlugin.prototype.beforeProcessOption = function (optionName, optionVal) {
|
295
|
+
if (optionName == "blinker") { // TODO: Handle blinkBy option in column model
|
296
|
+
return null; // eslint-disable-line
|
297
|
+
}
|
298
|
+
return; // eslint-disable-line
|
299
|
+
};
|
300
|
+
|
301
|
+
/** @public
|
302
|
+
* @param {Object=} options
|
303
|
+
*/
|
304
|
+
ConditionalColoringPlugin.prototype.config = function (options) {
|
305
|
+
if(!options) { return; }
|
306
|
+
|
307
|
+
let columns = options["columns"];
|
308
|
+
if(!columns) { return; }
|
309
|
+
|
310
|
+
let len = columns.length;
|
311
|
+
for(let i = 0; i < len; ++i) {
|
312
|
+
this.setColumnColoring(i, columns[i]);
|
313
|
+
}
|
314
|
+
};
|
315
|
+
|
316
|
+
/** @public
|
317
|
+
* @param {Object=} gridOptions
|
318
|
+
* @return {!Object}
|
319
|
+
*/
|
320
|
+
ConditionalColoringPlugin.prototype.getConfigObject = function (gridOptions) {
|
321
|
+
let obj = gridOptions || {};
|
322
|
+
|
323
|
+
let extOptions = obj["conditionalColoring"];
|
324
|
+
if(!extOptions) {
|
325
|
+
extOptions = obj["conditionalColoring"] = {};
|
326
|
+
}
|
327
|
+
|
328
|
+
if(this._predefinedColors != null) {
|
329
|
+
extOptions["predefinedColors"] = this._predefinedColors;
|
330
|
+
}
|
331
|
+
|
332
|
+
if(this._blinkingDuration !== 250) {
|
333
|
+
extOptions["blinkingDuration"] = this._blinkingDuration;
|
334
|
+
}
|
335
|
+
|
336
|
+
if(this._insertionBlinking !== false) {
|
337
|
+
extOptions["insertionBlinking"] = this._insertionBlinking;
|
338
|
+
}
|
339
|
+
|
340
|
+
let columns = obj.columns;
|
341
|
+
if (!columns) {
|
342
|
+
columns = obj.columns = [];
|
343
|
+
}
|
344
|
+
|
345
|
+
let len = this.getColumnCount();
|
346
|
+
for (let i = 0; i < len; ++i) {
|
347
|
+
let column = columns[i];
|
348
|
+
if (!column) {
|
349
|
+
column = columns[i] = {};
|
350
|
+
}
|
351
|
+
|
352
|
+
this.getColumnColoring(i, column);
|
353
|
+
}
|
354
|
+
|
355
|
+
return obj;
|
356
|
+
};
|
357
|
+
|
358
|
+
/** @public
|
359
|
+
* @param {number} colIndex
|
360
|
+
* @param {Object=} options
|
361
|
+
* @return {!ConditionalColoringPlugin~ColumnOptions}
|
362
|
+
*/
|
363
|
+
ConditionalColoringPlugin.prototype.getColumnColoring = function(colIndex, options) {
|
364
|
+
if(!options) {
|
365
|
+
options = {};
|
366
|
+
}
|
367
|
+
let host = this._hosts[0];
|
368
|
+
let conditions = this._getColumnOption(colIndex, "conditions", host);
|
369
|
+
if (Array.isArray(conditions) && conditions.length > 0) {
|
370
|
+
options.conditions = [];
|
371
|
+
|
372
|
+
let returnedFields = [
|
373
|
+
"expression",
|
374
|
+
"backgroundColor",
|
375
|
+
"color",
|
376
|
+
"cssClass",
|
377
|
+
"field"
|
378
|
+
];
|
379
|
+
let count = conditions.length;
|
380
|
+
for (let n = 0; n < count; n++) {
|
381
|
+
let exCondition = {};
|
382
|
+
let cond = conditions[n];
|
383
|
+
extendObject(exCondition, cond, returnedFields);
|
384
|
+
if(typeof exCondition["expression"] === "function") {
|
385
|
+
let origExp = cond["origExpression"];
|
386
|
+
if(origExp) {
|
387
|
+
exCondition["expression"] = origExp;
|
388
|
+
}
|
389
|
+
}
|
390
|
+
|
391
|
+
options.conditions.push(exCondition);
|
392
|
+
}
|
393
|
+
}
|
394
|
+
|
395
|
+
let colorText = this._getColumnOption(colIndex, "colorText", host);
|
396
|
+
if (colorText) {
|
397
|
+
options.colorText = colorText;
|
398
|
+
}
|
399
|
+
|
400
|
+
// alias with colorText
|
401
|
+
let tickColor = this._getColumnOption(colIndex, "tickColor", host);
|
402
|
+
if (tickColor) {
|
403
|
+
options.tickColor = tickColor;
|
404
|
+
}
|
405
|
+
|
406
|
+
let blinking = this._getColumnOption(colIndex, "blinking", host);
|
407
|
+
if (blinking) {
|
408
|
+
options.blinking = blinking;
|
409
|
+
}
|
410
|
+
|
411
|
+
let field = this._getField(colIndex);
|
412
|
+
if (field) {
|
413
|
+
options.field = field;
|
414
|
+
}
|
415
|
+
|
416
|
+
return options;
|
417
|
+
};
|
418
|
+
|
419
|
+
/** @private
|
420
|
+
* @param {Object} host core grid object
|
421
|
+
* @param {Object=} options
|
422
|
+
*/
|
423
|
+
ConditionalColoringPlugin.prototype._applyStyle = function(host, options) {
|
424
|
+
if(!options) { return; }
|
425
|
+
|
426
|
+
let columns = options["columns"];
|
427
|
+
if(!columns) { return; }
|
428
|
+
|
429
|
+
let painter;
|
430
|
+
let len = columns.length;
|
431
|
+
for(let i = 0; i < len; ++i) {
|
432
|
+
painter = this.getColumnPainter(i);
|
433
|
+
if(this._isValidPainter(painter)) {
|
434
|
+
host.enableColumnClass(i, "conditionally-colored", true);
|
435
|
+
}
|
436
|
+
}
|
437
|
+
};
|
438
|
+
|
439
|
+
/** @private
|
440
|
+
* @param {number} colIndex
|
441
|
+
* @param {boolean=} enabled=true
|
442
|
+
*/
|
443
|
+
ConditionalColoringPlugin.prototype._enableColumnStyle = function(colIndex, enabled) {
|
444
|
+
enabled = enabled !== false;
|
445
|
+
let hosts = this._hosts;
|
446
|
+
let grid;
|
447
|
+
for(let i = hosts.length; --i >= 0;) {
|
448
|
+
grid = hosts[i];
|
449
|
+
grid.enableColumnClass(colIndex, "conditionally-colored", enabled);
|
450
|
+
}
|
451
|
+
};
|
452
|
+
|
453
|
+
/** @private
|
454
|
+
* @param {CellPainter=} painter
|
455
|
+
* @return {boolean}
|
456
|
+
*/
|
457
|
+
ConditionalColoringPlugin.prototype._isValidPainter = function(painter) {
|
458
|
+
if (!painter) {
|
459
|
+
return false;
|
460
|
+
}
|
461
|
+
let type = painter.getColoringType();
|
462
|
+
if (type !== CellPainter.ColoringTypes.HEATMAP) {
|
463
|
+
return true;
|
464
|
+
} else {
|
465
|
+
return false;
|
466
|
+
}
|
467
|
+
};
|
468
|
+
|
469
|
+
/** @private
|
470
|
+
* @param {number} colIndex
|
471
|
+
* @param {Object=} styleMapping
|
472
|
+
*/
|
473
|
+
ConditionalColoringPlugin.prototype._clearCellStyles = function(colIndex, styleMapping) {
|
474
|
+
let i, grid, sect, rowCount, r, cell;
|
475
|
+
let hosts = this._hosts;
|
476
|
+
for(i = hosts.length; --i >= 0;) {
|
477
|
+
grid = hosts[i];
|
478
|
+
sect = grid.getSection("content");
|
479
|
+
rowCount = sect.getRowCount();
|
480
|
+
for(r = 0; r < rowCount; ++r) {
|
481
|
+
cell = sect.getCell(colIndex, r, false);
|
482
|
+
if (cell) {
|
483
|
+
CellPainter.clearCellStyle(cell, styleMapping);
|
484
|
+
}
|
485
|
+
}
|
486
|
+
}
|
487
|
+
};
|
488
|
+
|
489
|
+
/** @private
|
490
|
+
*/
|
491
|
+
ConditionalColoringPlugin.prototype._cachePreviousValue = function() {
|
492
|
+
let colCount = this.getColumnCount();
|
493
|
+
let hosts = this._hosts;
|
494
|
+
let len = hosts.length;
|
495
|
+
let i, c, host;
|
496
|
+
for (i = 0; i < len; i++) {
|
497
|
+
host = hosts[i];
|
498
|
+
for (c = 0; c < colCount; ++c) {
|
499
|
+
this._cacheColumnPreviousValue(c, host);
|
500
|
+
}
|
501
|
+
}
|
502
|
+
};
|
503
|
+
|
504
|
+
/** @private
|
505
|
+
* @param {number} colIndex
|
506
|
+
* @param {Object} host
|
507
|
+
*/
|
508
|
+
ConditionalColoringPlugin.prototype._cacheColumnPreviousValue = function(colIndex, host) {
|
509
|
+
let prevDataRows = host._prevDataRows || {};
|
510
|
+
let dv = host.getDataSource();
|
511
|
+
let rowCount = dv.getRowCount();
|
512
|
+
let colData = this._getColumnData(colIndex);
|
513
|
+
if (colData["blinking"]) {
|
514
|
+
let field = colData["blinkingField"] || this._getField(colIndex);
|
515
|
+
let r, rid, value, prevDataRow;
|
516
|
+
for (r = 0; r < rowCount; r++) {
|
517
|
+
rid = dv.getRowId(r);
|
518
|
+
value = this._getData(dv, r, field);
|
519
|
+
if (value != null) {
|
520
|
+
prevDataRow = prevDataRows[rid];
|
521
|
+
if (!prevDataRow) {
|
522
|
+
prevDataRow = prevDataRows[rid] = {};
|
523
|
+
}
|
524
|
+
|
525
|
+
prevDataRow[field] = value;
|
526
|
+
}
|
527
|
+
}
|
528
|
+
host._prevDataRows = prevDataRows;
|
529
|
+
}
|
530
|
+
};
|
531
|
+
|
532
|
+
/** @private
|
533
|
+
* @param {string|Array.<string>} fieldRef
|
534
|
+
* @param {(Object|number)=} colRef
|
535
|
+
* @param {string} type
|
536
|
+
*/
|
537
|
+
ConditionalColoringPlugin.prototype._addDataFields = function(fieldRef, colRef, type) {
|
538
|
+
if(!this._realTimeGrid || !fieldRef || !type) {
|
539
|
+
return;
|
540
|
+
}
|
541
|
+
let referrer = null;
|
542
|
+
if (colRef != null) {
|
543
|
+
let colDef = typeof colRef === "object" ? colRef : this._realTimeGrid.getColumnDefinition(colRef);
|
544
|
+
referrer = colDef ? colDef.getId() + "_" + type : null;
|
545
|
+
}
|
546
|
+
|
547
|
+
this._realTimeGrid.addDataFields(fieldRef, referrer);
|
548
|
+
};
|
549
|
+
|
550
|
+
/** @private
|
551
|
+
* @param {string|Array.<string>} fieldRef
|
552
|
+
* @param {(Object|number)=} colRef
|
553
|
+
* @param {string} type
|
554
|
+
*/
|
555
|
+
ConditionalColoringPlugin.prototype._removeDataFields = function(fieldRef, colRef, type) {
|
556
|
+
if(!this._realTimeGrid || !fieldRef || !type) {
|
557
|
+
return;
|
558
|
+
}
|
559
|
+
let referrer = null;
|
560
|
+
if (colRef != null) {
|
561
|
+
let colDef = typeof colRef === "object" ? colRef : this._realTimeGrid.getColumnDefinition(colRef);
|
562
|
+
referrer = colDef ? colDef.getId() + "_" + type : null;
|
563
|
+
}
|
564
|
+
this._realTimeGrid.removeDataFields(fieldRef, referrer);
|
565
|
+
};
|
566
|
+
|
567
|
+
/** @private
|
568
|
+
* @param {(string|number)=} colRef
|
569
|
+
* @param {string} type
|
570
|
+
*/
|
571
|
+
ConditionalColoringPlugin.prototype._removeFieldReferrer = function(colRef, type) {
|
572
|
+
if(!this._realTimeGrid || !type) {
|
573
|
+
return;
|
574
|
+
}
|
575
|
+
let referrer = null;
|
576
|
+
if (colRef != null) {
|
577
|
+
let colId = colRef;
|
578
|
+
if (typeof colRef === "number") {
|
579
|
+
let colDef = this._realTimeGrid.getColumnDefinition(colRef);
|
580
|
+
if (colDef) {
|
581
|
+
colId = colDef.getId();
|
582
|
+
}
|
583
|
+
}
|
584
|
+
|
585
|
+
referrer = colId ? colId + "_" + type : null;
|
586
|
+
this._realTimeGrid.removeFieldReferrer(referrer);
|
587
|
+
}
|
588
|
+
};
|
589
|
+
|
590
|
+
/** @public
|
591
|
+
* @description To define coloring for columns, conditions or colorText or tickColor need to be specified.
|
592
|
+
* To enable cell blinking the blinking option need to be defined.<br>
|
593
|
+
* Coloring options and blinking options can be applied to a column at the same time.<br>
|
594
|
+
* The blinking or coloring abilities will be removed if the correspondent options are not given.<br>
|
595
|
+
* If columnOptions is undefined or null, both coloring and blinking will be removed.
|
596
|
+
* @param {number} colIndex
|
597
|
+
* @param {(ConditionalColoringPlugin~ColumnOptions|null)=} columnOptions
|
598
|
+
* @see {@link ConditionalColoringPlugin.setConditionalColoring}
|
599
|
+
* @see {@link ConditionalColoringPlugin.setColumnBlinking}
|
600
|
+
* @example
|
601
|
+
* let columnOptions1 = {
|
602
|
+
* "field": "string",
|
603
|
+
* "conditions": [{ // Array.<Object> Condition Object Properties
|
604
|
+
* "expression": "[column0] > 0", // string
|
605
|
+
* "backgroundColor": "", // Optional string e.g. #ffffff, black
|
606
|
+
* "color": "" // Optional string e.g. #000000, white
|
607
|
+
* }]
|
608
|
+
* };
|
609
|
+
* let columnOptions2 = {
|
610
|
+
* "field": "string",
|
611
|
+
* "colorText": true, // string as Field or boolean for text coloring mode
|
612
|
+
* "blinking": true
|
613
|
+
* };
|
614
|
+
*/
|
615
|
+
ConditionalColoringPlugin.prototype.setColumnColoring = function (colIndex, columnOptions) {
|
616
|
+
let blinkingOptions, field;
|
617
|
+
if(columnOptions) {
|
618
|
+
blinkingOptions = columnOptions["blinking"];
|
619
|
+
field = columnOptions["field"];
|
620
|
+
}
|
621
|
+
|
622
|
+
this.setColumnBlinking(colIndex, blinkingOptions, field);
|
623
|
+
this.setConditionalColoring(colIndex, columnOptions);
|
624
|
+
|
625
|
+
let colData = this._newColumnData(colIndex);
|
626
|
+
if (colData["painter"] && !(colData["coloringFields"] || colData["blinkingField"])) { // Clear existing painter
|
627
|
+
this._clearPainter(colData);
|
628
|
+
}
|
629
|
+
};
|
630
|
+
|
631
|
+
/** @public
|
632
|
+
* @param {number} colIndex
|
633
|
+
* @param {ConditionalColoringPlugin~ConditionalColoringOptions=} coloringOptions
|
634
|
+
*/
|
635
|
+
ConditionalColoringPlugin.prototype.setConditionalColoring = function (colIndex, coloringOptions) {
|
636
|
+
let colData = this._newColumnData(colIndex);
|
637
|
+
|
638
|
+
colData["conditions"] = null; // WARNING: This clears existing user states
|
639
|
+
if(coloringOptions) {
|
640
|
+
// Save column config state
|
641
|
+
colData["colorText"] = coloringOptions["colorText"];
|
642
|
+
colData["tickColor"] = coloringOptions["tickColor"];
|
643
|
+
colData["field"] = coloringOptions["field"];
|
644
|
+
} else {
|
645
|
+
colData["colorText"] = null;
|
646
|
+
colData["tickColor"] = null;
|
647
|
+
}
|
648
|
+
let painter = colData["painter"];
|
649
|
+
let prevFields = colData["coloringFields"] ? Object.keys(colData["coloringFields"]) : null;
|
650
|
+
let colorOptions = this._prepareColorOptions(colIndex, coloringOptions);
|
651
|
+
|
652
|
+
if (this._isValidPainter(painter)) {
|
653
|
+
if (prevFields) {
|
654
|
+
let effectiveStyles = painter.getEffectiveStyles();
|
655
|
+
this._clearCellStyles(colIndex, effectiveStyles); // Need to clear the existing previous coloring styles here
|
656
|
+
}
|
657
|
+
painter.resetColoring(); // Release any used memory
|
658
|
+
}
|
659
|
+
|
660
|
+
if(colorOptions.hasColor) { // Set new coloring
|
661
|
+
colData["conditions"] = coloringOptions["conditions"]; // WARNING: This stores user object
|
662
|
+
let newFieldsMap = colorOptions.fields;
|
663
|
+
if (!painter) {
|
664
|
+
painter = colData["painter"] = new CellPainter();
|
665
|
+
} else if (prevFields) {
|
666
|
+
// Remove unused fields
|
667
|
+
let unusedFields = [];
|
668
|
+
let prevField;
|
669
|
+
for (let i = 0; i < prevFields.length; i++) {
|
670
|
+
prevField = prevFields[i];
|
671
|
+
if (!newFieldsMap[prevField]) {
|
672
|
+
unusedFields.push(prevField);
|
673
|
+
}
|
674
|
+
}
|
675
|
+
if (unusedFields.length) {
|
676
|
+
this._removeDataFields(unusedFields, colIndex, COLORING_TYPE);
|
677
|
+
}
|
678
|
+
}
|
679
|
+
|
680
|
+
if(colorOptions.condColoring) {
|
681
|
+
let conditions = colorOptions.condColoring.conditions;
|
682
|
+
painter.setConditions(conditions);
|
683
|
+
this._setEffectiveStyles(painter, conditions);
|
684
|
+
} else if(colorOptions.colorText) {
|
685
|
+
let options = colorOptions.colorText;
|
686
|
+
if (options.useThemeColors) {
|
687
|
+
if (!ConditionalColoringPlugin._colorTextStyles) {
|
688
|
+
let styles = {
|
689
|
+
positive: {
|
690
|
+
color: "var(--color-scheme-positive)"
|
691
|
+
},
|
692
|
+
negative: {
|
693
|
+
color: "var(--color-scheme-negative)"
|
694
|
+
},
|
695
|
+
neutral: {
|
696
|
+
color: "var(--color-scheme-neutral)"
|
697
|
+
}
|
698
|
+
};
|
699
|
+
|
700
|
+
ConditionalColoringPlugin._colorTextStyles = this._prepareStyles(styles);
|
701
|
+
}
|
702
|
+
this._injectColorTextStyles();
|
703
|
+
painter.addColorTextWithTheme(colorOptions.colorText.field);
|
704
|
+
} else {
|
705
|
+
painter.addColorText(options.field, options.upClass, options.downClass, options.levelClass);
|
706
|
+
}
|
707
|
+
}
|
708
|
+
|
709
|
+
let fields = Object.keys(newFieldsMap);
|
710
|
+
if (this._initializedGrid) {
|
711
|
+
this._addDataFields(fields, colIndex, COLORING_TYPE);
|
712
|
+
} else {
|
713
|
+
if (!this._pendingFields) {
|
714
|
+
this._pendingFields = [];
|
715
|
+
}
|
716
|
+
this._pendingFields.push([fields, colIndex, COLORING_TYPE]);
|
717
|
+
}
|
718
|
+
|
719
|
+
this._enableColumnStyle(colIndex, true); // Remove the background image
|
720
|
+
painter["inputField"] = colorOptions.inputField; // Used in ColumnFormatting extension for restoring the user's selected field in column format dialog
|
721
|
+
colData["coloringFields"] = newFieldsMap;
|
722
|
+
} else {
|
723
|
+
if (prevFields) {
|
724
|
+
this._removeFieldReferrer(colIndex, COLORING_TYPE);
|
725
|
+
}
|
726
|
+
|
727
|
+
colData["coloringFields"] = null;
|
728
|
+
this._enableColumnStyle(colIndex, false);
|
729
|
+
}
|
730
|
+
if (this._initializedGrid) {
|
731
|
+
let core = this._hosts[0];
|
732
|
+
if(core){
|
733
|
+
let rowColoring = core.getPlugin('RowColoringPlugin');
|
734
|
+
if(rowColoring && rowColoring.forceUpdateRowColor){
|
735
|
+
rowColoring.forceUpdateRowColor();
|
736
|
+
}
|
737
|
+
}
|
738
|
+
this._requestRowRefresh();
|
739
|
+
}
|
740
|
+
};
|
741
|
+
|
742
|
+
/** @public
|
743
|
+
* @param {number} colIndex
|
744
|
+
* @param {(boolean|ConditionalColoringPlugin~Blinking)=} blinkingOptions
|
745
|
+
* @param {string=} field If not specified, column field will be used
|
746
|
+
*/
|
747
|
+
ConditionalColoringPlugin.prototype.setColumnBlinking = function (colIndex, blinkingOptions, field) {
|
748
|
+
let colData = this._newColumnData(colIndex);
|
749
|
+
let prevField = colData["blinkingField"];
|
750
|
+
colData["blinking"] = blinkingOptions;
|
751
|
+
let painter = colData["painter"];
|
752
|
+
let bOptions = this._prepareBlinkingOptions(colIndex, blinkingOptions, field);
|
753
|
+
if (bOptions) {
|
754
|
+
let newBlinkingField = bOptions.field;
|
755
|
+
if (!painter) {
|
756
|
+
colData["painter"] = painter = new CellPainter();
|
757
|
+
} else if(prevField) {
|
758
|
+
// Clear current style, blinking and existing styles related to blinking
|
759
|
+
painter.clearBlinking();
|
760
|
+
if (prevField !== newBlinkingField) {
|
761
|
+
this._removeDataFields(prevField, colIndex, BLINKING_TYPE);
|
762
|
+
}
|
763
|
+
}
|
764
|
+
let blinkDuration = bOptions.duration || this._blinkingDuration;
|
765
|
+
painter.setBlinkingDuration(blinkDuration);
|
766
|
+
colData.levelBlinkingDisabled = bOptions.level === false; // Used in _onSectionBinding
|
767
|
+
if (bOptions.customColor) {
|
768
|
+
painter.addBlink(newBlinkingField, bOptions.up, bOptions.down, bOptions.level, bOptions.border);
|
769
|
+
} else {
|
770
|
+
painter.addBlinkWithTheme(newBlinkingField, bOptions.border);
|
771
|
+
}
|
772
|
+
colData["blinkingField"] = newBlinkingField; // used for binding and cache clearing
|
773
|
+
this._blinkingEnabled = true; // TODO: need to dynamically verify the blink state
|
774
|
+
|
775
|
+
if (!prevField) { // No need update the cache for the options changing
|
776
|
+
// Emerald Grid needs to cache in the initializing phase
|
777
|
+
// Atlas Blotter will cache in the first binding
|
778
|
+
if (this._compositeGrid || this._initializedGrid) {
|
779
|
+
let host, hosts = this._hosts;
|
780
|
+
for (let i = 0; i < hosts.length; i++) {
|
781
|
+
host = hosts[i];
|
782
|
+
this._cacheColumnPreviousValue(colIndex, host);
|
783
|
+
}
|
784
|
+
}
|
785
|
+
}
|
786
|
+
|
787
|
+
ConditionalColoringPlugin._startCleanUpInterval();
|
788
|
+
if (this._initializedGrid) {
|
789
|
+
this._addDataFields(newBlinkingField, colIndex, BLINKING_TYPE);
|
790
|
+
} else {
|
791
|
+
if (!this._pendingFields) {
|
792
|
+
this._pendingFields = [];
|
793
|
+
}
|
794
|
+
this._pendingFields.push([newBlinkingField, colIndex, BLINKING_TYPE]);
|
795
|
+
}
|
796
|
+
} else {
|
797
|
+
if (prevField) {
|
798
|
+
if (painter) {
|
799
|
+
painter.clearBlinking(); // Release any used memory and restore cell's style
|
800
|
+
ConditionalColoringPlugin._cleanUpPrevFields();
|
801
|
+
}
|
802
|
+
this._removeFieldReferrer(colIndex, BLINKING_TYPE);
|
803
|
+
}
|
804
|
+
colData["blinkingField"] = null; // Used by cache clearing, do not reset before cache clearing
|
805
|
+
}
|
806
|
+
};
|
807
|
+
|
808
|
+
/** @public
|
809
|
+
* @param {number} rowIndex
|
810
|
+
* @param {number} blinkSignal
|
811
|
+
* @param {Object=} host core grid object
|
812
|
+
*/
|
813
|
+
ConditionalColoringPlugin.prototype.blinkRow = function (rowIndex, blinkSignal, host) {
|
814
|
+
host = host || this._hosts[0];
|
815
|
+
if (!host) return;
|
816
|
+
|
817
|
+
let dv = host.getDataSource();
|
818
|
+
if (!dv) return;
|
819
|
+
|
820
|
+
let section = host.getSection('content');
|
821
|
+
if (!section) return;
|
822
|
+
|
823
|
+
let rowData = dv.getRowDataAt(rowIndex);
|
824
|
+
|
825
|
+
let colCount = section.getColumnCount();
|
826
|
+
for (let c = 0; c < colCount; ++c) {
|
827
|
+
let painter = this.getColumnPainter(c);
|
828
|
+
if (!painter) continue;
|
829
|
+
|
830
|
+
let cell = section.getCell(c, rowIndex, false);
|
831
|
+
if (!cell) continue;
|
832
|
+
painter.blink(cell, blinkSignal, rowData);
|
833
|
+
}
|
834
|
+
};
|
835
|
+
|
836
|
+
/** @private
|
837
|
+
* @param {number} colIndex
|
838
|
+
* @param {(boolean|ConditionalColoringPlugin~Blinking)=} blinkingOptions
|
839
|
+
* @param {string=} columnField
|
840
|
+
* @return {Object}
|
841
|
+
*/
|
842
|
+
ConditionalColoringPlugin.prototype._prepareBlinkingOptions = function (colIndex, blinkingOptions, columnField) {
|
843
|
+
if (colIndex == null || !blinkingOptions) {
|
844
|
+
return null;
|
845
|
+
}
|
846
|
+
|
847
|
+
let bOptions = {};
|
848
|
+
let field = columnField || this._getField(colIndex);
|
849
|
+
let blinkField = field;
|
850
|
+
if (typeof blinkingOptions === "string") {
|
851
|
+
blinkField = blinkingOptions;
|
852
|
+
} else if(typeof blinkingOptions === "object") {
|
853
|
+
blinkField = /** @type{string} */(blinkingOptions["field"]) || field;
|
854
|
+
bOptions.border = blinkingOptions["border"];
|
855
|
+
bOptions.duration = blinkingOptions["duration"];
|
856
|
+
if (blinkingOptions["up"] || blinkingOptions["down"] || blinkingOptions["level"]) {
|
857
|
+
bOptions.customColor = true;
|
858
|
+
bOptions.up = blinkingOptions["up"];
|
859
|
+
bOptions.down = blinkingOptions["down"];
|
860
|
+
bOptions.level = blinkingOptions["level"];
|
861
|
+
}
|
862
|
+
if (blinkingOptions["level"] === false) {
|
863
|
+
bOptions.level = false;
|
864
|
+
}
|
865
|
+
}
|
866
|
+
bOptions.field = ConditionalColoringPlugin._convertKeyword(blinkField, field);
|
867
|
+
bOptions.inputField = blinkField;
|
868
|
+
return bOptions;
|
869
|
+
};
|
870
|
+
|
871
|
+
/** @private
|
872
|
+
* @param {Object} obj
|
873
|
+
* @param {Array|string} entries
|
874
|
+
*/
|
875
|
+
let _addMapEntries = function(obj, entries) {
|
876
|
+
if(entries) {
|
877
|
+
if(Array.isArray(entries)) {
|
878
|
+
let len = entries.length;
|
879
|
+
for(let i = 0; i < len; ++i) {
|
880
|
+
obj[entries[i]] = true;
|
881
|
+
}
|
882
|
+
} else {
|
883
|
+
obj[entries] = true;
|
884
|
+
}
|
885
|
+
}
|
886
|
+
};
|
887
|
+
/** @private
|
888
|
+
* @param {number} colIndex
|
889
|
+
* @param {ConditionalColoringPlugin~ColumnOptions} columnOptions
|
890
|
+
* @return {!Object}
|
891
|
+
*/
|
892
|
+
ConditionalColoringPlugin.prototype._prepareColorOptions = function(colIndex, columnOptions) {
|
893
|
+
if(!columnOptions) {
|
894
|
+
return {};
|
895
|
+
}
|
896
|
+
let colField = this._getField(colIndex);
|
897
|
+
let inputField = columnOptions["inputField"] || ""; // The value is from user so it can be "THIS_COLUMN" or null
|
898
|
+
let field = ConditionalColoringPlugin._convertKeyword(inputField, colField);
|
899
|
+
if(columnOptions["field"]) {
|
900
|
+
field = /** @type{string} */(columnOptions["field"]);
|
901
|
+
}
|
902
|
+
|
903
|
+
let hasColor = 0;
|
904
|
+
let fieldMap = {};
|
905
|
+
|
906
|
+
// Check if there is another type of coloring
|
907
|
+
let colorText = columnOptions["colorText"] || columnOptions["tickColor"];
|
908
|
+
let conditions = columnOptions["conditions"];
|
909
|
+
let conditionCount = conditions ? conditions.length : 0;
|
910
|
+
let colorOptions = {};
|
911
|
+
if(conditionCount) {
|
912
|
+
colorOptions.condColoring = {};
|
913
|
+
colorOptions.condColoring.conditions = conditions;
|
914
|
+
|
915
|
+
let formatter = (field == colField) ? columnOptions["textFormatter"] : null; // TODO: This text formatter is not used or defined any where
|
916
|
+
let builder = ConditionalColoringPlugin.getFilterBuilder();
|
917
|
+
|
918
|
+
for(let i = conditionCount; --i >= 0;) {
|
919
|
+
let cond = conditions[i];
|
920
|
+
let exp = cond ? cond["expression"] : null;
|
921
|
+
if(Array.isArray(exp)) {
|
922
|
+
let fieldPerCon = cond["field"] || field;
|
923
|
+
cond["expression"] = builder.parse(exp, fieldPerCon, null, fieldPerCon); // WARNING: This alters user object
|
924
|
+
if(cond["expression"]) {
|
925
|
+
cond["origExpression"] = exp;
|
926
|
+
hasColor = 1;
|
927
|
+
fieldMap[fieldPerCon] = true;
|
928
|
+
}
|
929
|
+
} else if(typeof exp === "function") {
|
930
|
+
hasColor = 1;
|
931
|
+
_addMapEntries(fieldMap, cond["fields"] || cond["field"]);
|
932
|
+
} else if(typeof exp === "string") {
|
933
|
+
hasColor = 1;
|
934
|
+
_addMapEntries(fieldMap, _getFieldsFromExpression(exp));
|
935
|
+
} else if(field && cond["condition"]) {
|
936
|
+
hasColor = 1;
|
937
|
+
builder.setFieldDefinition(field, formatter, field); // TODO: Each condition could have different fields
|
938
|
+
let oper = cond["condition"]; // WARNING: This condition is used by Format dialog. It's undocumented
|
939
|
+
let value1 = cond["value1"];
|
940
|
+
let value2 = cond["value2"];
|
941
|
+
|
942
|
+
if(oper !== "BTW") {
|
943
|
+
builder.addCondition(oper, value1);
|
944
|
+
} else {
|
945
|
+
builder.addCondition("GTE", value1);
|
946
|
+
builder.addCondition("LTE", value2);
|
947
|
+
}
|
948
|
+
cond["expression"] = builder.buildFilter();
|
949
|
+
fieldMap[field] = true;
|
950
|
+
}
|
951
|
+
}
|
952
|
+
} else if(colorText) {
|
953
|
+
colorOptions.colorText = {};
|
954
|
+
colorOptions.colorText.useThemeColors = true;
|
955
|
+
if(typeof colorText === "string") {
|
956
|
+
field = colorText;
|
957
|
+
} else if(typeof colorText === "object") {
|
958
|
+
field = /** @type{string} */(colorText["field"]) || field;
|
959
|
+
|
960
|
+
if (colorText["upClass"] || colorText["downClass"] || colorText["levelClass"]) {
|
961
|
+
colorOptions.colorText.useThemeColors = false;
|
962
|
+
colorOptions.colorText.upClass = colorText["upClass"];
|
963
|
+
colorOptions.colorText.downClass = colorText["downClass"];
|
964
|
+
colorOptions.colorText.levelClass = colorText["levelClass"];
|
965
|
+
}
|
966
|
+
}
|
967
|
+
|
968
|
+
if(field) {
|
969
|
+
colorOptions.colorText.field = field;
|
970
|
+
hasColor = 1;
|
971
|
+
fieldMap[field] = true;
|
972
|
+
}
|
973
|
+
}
|
974
|
+
|
975
|
+
if(hasColor) {
|
976
|
+
colorOptions.hasColor = 1;
|
977
|
+
colorOptions.fields = fieldMap;
|
978
|
+
colorOptions["inputField"] = inputField; // Used to retain state on Column Format Dialog
|
979
|
+
return colorOptions;
|
980
|
+
}
|
981
|
+
|
982
|
+
return {};
|
983
|
+
};
|
984
|
+
/** @private
|
985
|
+
* @function
|
986
|
+
* @param {string} userInput
|
987
|
+
* @param {string} fallback
|
988
|
+
* @return {string}
|
989
|
+
*/
|
990
|
+
ConditionalColoringPlugin._convertKeyword = function(userInput, fallback) {
|
991
|
+
if(userInput) {
|
992
|
+
// Note that THIS_COLUMN is a special keyword that needs to be converted before usage
|
993
|
+
return userInput.indexOf("THIS_COLUMN") < 0 ? userInput : fallback;
|
994
|
+
}
|
995
|
+
return fallback;
|
996
|
+
};
|
997
|
+
|
998
|
+
/** @private
|
999
|
+
* @function
|
1000
|
+
* @param {Array.<Object>} events
|
1001
|
+
* @return {Object} mapping of inserted row id
|
1002
|
+
*/
|
1003
|
+
ConditionalColoringPlugin._mapInsertedRowId = function (events) {
|
1004
|
+
let insertedDict = {};
|
1005
|
+
let eventCount = events ? events.length : 0;
|
1006
|
+
for (let i = 0; i < eventCount; ++i) {
|
1007
|
+
let event = events[i];
|
1008
|
+
|
1009
|
+
// map inserted row
|
1010
|
+
if (event.type === "inserted") {
|
1011
|
+
insertedDict[event.rid] = true;
|
1012
|
+
}
|
1013
|
+
}
|
1014
|
+
return insertedDict;
|
1015
|
+
};
|
1016
|
+
|
1017
|
+
/** @private
|
1018
|
+
* @function
|
1019
|
+
* @param {Object} e
|
1020
|
+
* @return {!Array.<Object>} Array of merged changes
|
1021
|
+
*/
|
1022
|
+
ConditionalColoringPlugin._mergeUpdates = function(e) {
|
1023
|
+
let evts = e.events; // dataSource event
|
1024
|
+
let evtCount = evts ? evts.length : 0;
|
1025
|
+
let dv = e.dataSource;
|
1026
|
+
let changedRows = [];
|
1027
|
+
let evt, i;
|
1028
|
+
for (i = 0; i < evtCount; ++i) {
|
1029
|
+
evt = evts[i];
|
1030
|
+
|
1031
|
+
// merge update event
|
1032
|
+
if (evt.type === "updated") {
|
1033
|
+
let rowIndex = dv.getRowIndex(evt.rid);
|
1034
|
+
if (!changedRows[rowIndex]) {
|
1035
|
+
changedRows[rowIndex] = {
|
1036
|
+
changed: {},
|
1037
|
+
rid: evt.rid
|
1038
|
+
};
|
1039
|
+
}
|
1040
|
+
let mergedChanges = changedRows[rowIndex].changed;
|
1041
|
+
let changes = evt.changes;
|
1042
|
+
for (let key in changes) {
|
1043
|
+
mergedChanges[key] = 1;
|
1044
|
+
}
|
1045
|
+
}
|
1046
|
+
}
|
1047
|
+
return changedRows;
|
1048
|
+
};
|
1049
|
+
/** @private
|
1050
|
+
* @param {Object} colors Predefined color object map
|
1051
|
+
* @return {string} prettified CSS string
|
1052
|
+
*/
|
1053
|
+
ConditionalColoringPlugin.prototype._prepareStyles = function(colors) {
|
1054
|
+
let prefix = ".tr-grid." + ConditionalColoringPlugin._controlClass + " .column.conditionally-colored .cell";
|
1055
|
+
let css = [];
|
1056
|
+
let ss, styles, value;
|
1057
|
+
for (let className in colors) {
|
1058
|
+
css.push(prefix + "." + className);
|
1059
|
+
ss = [];
|
1060
|
+
styles = colors[className];
|
1061
|
+
|
1062
|
+
value = styles["backgroundColor"];
|
1063
|
+
if(value) {
|
1064
|
+
ss.push("background-color: " + value + ";");
|
1065
|
+
}
|
1066
|
+
|
1067
|
+
value = styles["color"];
|
1068
|
+
if(value) {
|
1069
|
+
ss.push("color: " + value + ";");
|
1070
|
+
}
|
1071
|
+
|
1072
|
+
css.push(ss);
|
1073
|
+
}
|
1074
|
+
|
1075
|
+
return prettifyCss(css);
|
1076
|
+
};
|
1077
|
+
/** @private
|
1078
|
+
*/
|
1079
|
+
ConditionalColoringPlugin.prototype._injectColorTextStyles = function() {
|
1080
|
+
if (ConditionalColoringPlugin._colorTextStyles) {
|
1081
|
+
let hosts = this._hosts;
|
1082
|
+
let len = hosts.length;
|
1083
|
+
for (let i = 0; i < len; i++) {
|
1084
|
+
let host = hosts[i];
|
1085
|
+
host.enableClass(ConditionalColoringPlugin._controlClass);
|
1086
|
+
if (!host._colorTextStyles) {
|
1087
|
+
injectCss(ConditionalColoringPlugin._colorTextStyles, host.getElement());
|
1088
|
+
host._colorTextStyles = true;
|
1089
|
+
}
|
1090
|
+
}
|
1091
|
+
}
|
1092
|
+
};
|
1093
|
+
/** @private
|
1094
|
+
* @param {Object} host
|
1095
|
+
*/
|
1096
|
+
ConditionalColoringPlugin.prototype._injectPredefinedColors = function(host) {
|
1097
|
+
if(host._conditionalColoringStyleTag) {
|
1098
|
+
host._conditionalColoringStyleTag.parentNode.removeChild(host._conditionalColoringStyleTag);
|
1099
|
+
host._conditionalColoringStyleTag = null;
|
1100
|
+
}
|
1101
|
+
host._conditionalColoringStyleTag = injectCss(this._predefinedColorsStyles, host.getElement());
|
1102
|
+
};
|
1103
|
+
/** @public
|
1104
|
+
* @param {Object} predefinedColors Predefined color object map
|
1105
|
+
*/
|
1106
|
+
ConditionalColoringPlugin.prototype.setPredefinedColors = function(predefinedColors) {
|
1107
|
+
if (predefinedColors != null && typeof predefinedColors === "object") {
|
1108
|
+
this._predefinedColors = predefinedColors;
|
1109
|
+
this._predefinedColorsStyles = this._prepareStyles(predefinedColors);
|
1110
|
+
let hosts = this._hosts;
|
1111
|
+
let len = hosts.length;
|
1112
|
+
for (let i = 0; i < len; i++) {
|
1113
|
+
this._injectPredefinedColors(hosts[i]);
|
1114
|
+
}
|
1115
|
+
}
|
1116
|
+
};
|
1117
|
+
/** @public
|
1118
|
+
* @param {boolean|string} blinking Enable blinking on row insertion. Specify true for blinking with theme's neutral movement color.
|
1119
|
+
* To blink cell with a certain color, specify a string of hex color value.
|
1120
|
+
*/
|
1121
|
+
ConditionalColoringPlugin.prototype.setInsertionBlinking = function(blinking) {
|
1122
|
+
if (blinking != null) {
|
1123
|
+
this._insertionBlinking = blinking;
|
1124
|
+
}
|
1125
|
+
};
|
1126
|
+
/** @private
|
1127
|
+
* @function
|
1128
|
+
* @return {!FilterBuilder}
|
1129
|
+
*/
|
1130
|
+
ConditionalColoringPlugin.getFilterBuilder = function() {
|
1131
|
+
if(!ConditionalColoringPlugin._fb) {
|
1132
|
+
ConditionalColoringPlugin._fb = new FilterBuilder();
|
1133
|
+
}
|
1134
|
+
return ConditionalColoringPlugin._fb;
|
1135
|
+
};
|
1136
|
+
/** @type {FilterBuilder}
|
1137
|
+
* @private
|
1138
|
+
*/
|
1139
|
+
ConditionalColoringPlugin._fb = null;
|
1140
|
+
|
1141
|
+
/** @private */
|
1142
|
+
ConditionalColoringPlugin.prototype._requestRowRefresh = function () {
|
1143
|
+
if(!this._hasColoring()){
|
1144
|
+
return;
|
1145
|
+
}
|
1146
|
+
for(let i = this._hosts.length; --i >= 0;) {
|
1147
|
+
this._hosts[i].requestRowRefresh();
|
1148
|
+
}
|
1149
|
+
};
|
1150
|
+
/** @public
|
1151
|
+
* @param {number} colIndex
|
1152
|
+
* @return {CellPainter}
|
1153
|
+
*/
|
1154
|
+
ConditionalColoringPlugin.prototype.getColumnPainter = function (colIndex) {
|
1155
|
+
return /** @type{CellPainter} */(this._getColumnOption(colIndex, "painter"));
|
1156
|
+
};
|
1157
|
+
|
1158
|
+
/** Apply color to a cell base on input column index
|
1159
|
+
* @public
|
1160
|
+
* @param {number} colIndex Coloring condition from this column index will be used
|
1161
|
+
* @param {Object} cell Target grid cell to apply color to
|
1162
|
+
* @param {Object=} rowData A row data which will be used to determine a color together with a colIndex
|
1163
|
+
*/
|
1164
|
+
ConditionalColoringPlugin.prototype.applyColor = function (colIndex, cell, rowData) {
|
1165
|
+
let painter = this.getColumnPainter(colIndex);
|
1166
|
+
if (!painter) { return; }
|
1167
|
+
|
1168
|
+
if (!rowData) rowData = {};
|
1169
|
+
let field = this._getField(colIndex);
|
1170
|
+
let changes = {};
|
1171
|
+
changes[field] = 1;
|
1172
|
+
painter.render(cell, rowData, NaN, NaN, changes); // NaN values are min and max values for heatmap calculation
|
1173
|
+
};
|
1174
|
+
|
1175
|
+
/** @private
|
1176
|
+
* @param {Object} e
|
1177
|
+
*/
|
1178
|
+
ConditionalColoringPlugin.prototype._onSectionBinding = function (e) {
|
1179
|
+
let dataRows = /** @type{Array.<Object>} */(e["dataRows"]);
|
1180
|
+
if(!dataRows) {
|
1181
|
+
return; // dataRows could be empty in case of no column is presented
|
1182
|
+
}
|
1183
|
+
|
1184
|
+
let c, r, cell, painter, changedCols, rowDef, rid, changedRow, changedRows;
|
1185
|
+
let dataRow, insertedId, colData, cachedValues, updatePrev;
|
1186
|
+
let section = e["section"];
|
1187
|
+
let colCount = section.getColumnCount();
|
1188
|
+
let fromR = /** @type{number} */(e["fromRowIndex"]);
|
1189
|
+
let toR = /** @type{number} */(e["toRowIndex"]);
|
1190
|
+
let actualUpdate = e["actualUpdate"];
|
1191
|
+
let dv = e["dataSource"];
|
1192
|
+
let host = e["sender"];
|
1193
|
+
|
1194
|
+
let blinkingEnabled = actualUpdate && this._blinkingEnabled;
|
1195
|
+
if (blinkingEnabled) {
|
1196
|
+
insertedId = ConditionalColoringPlugin._mapInsertedRowId(e.events);
|
1197
|
+
if (this._compositeGrid) {
|
1198
|
+
changedRows = ConditionalColoringPlugin._mergeUpdates(e);
|
1199
|
+
}
|
1200
|
+
}
|
1201
|
+
|
1202
|
+
let prevDataRow, prevDataRows = host._prevDataRows;
|
1203
|
+
let api = this.getGridApi();
|
1204
|
+
for (r = fromR; r < toR; ++r) {
|
1205
|
+
rid = dv.getRowId(r);
|
1206
|
+
if (!rid) { continue; }
|
1207
|
+
|
1208
|
+
dataRow = this._rowGetter(dataRows[r]);
|
1209
|
+
if (!dataRow) continue; // prevent from null value access when using with RowGroupingExtension
|
1210
|
+
|
1211
|
+
changedCols = null;
|
1212
|
+
let allowBlinking = false;
|
1213
|
+
let insertedRow = null;
|
1214
|
+
if (blinkingEnabled) {
|
1215
|
+
if (this._realTimeGrid) {
|
1216
|
+
rowDef = api.getRowDefinition(rid);
|
1217
|
+
if(rowDef){
|
1218
|
+
changedCols = rowDef.getUpdates();
|
1219
|
+
}
|
1220
|
+
} else { // composite grid
|
1221
|
+
changedRow = changedRows[r];
|
1222
|
+
if (changedRow) {
|
1223
|
+
rid = changedRow.rid;
|
1224
|
+
changedCols = changedRow.changed;
|
1225
|
+
}
|
1226
|
+
}
|
1227
|
+
insertedRow = rid ? insertedId[rid] : null;
|
1228
|
+
allowBlinking = !insertedRow || this._insertionBlinking;
|
1229
|
+
if (!allowBlinking) {
|
1230
|
+
changedCols = null;
|
1231
|
+
}
|
1232
|
+
}
|
1233
|
+
|
1234
|
+
prevDataRow = prevDataRows[rid];
|
1235
|
+
cachedValues = {};
|
1236
|
+
updatePrev = false;
|
1237
|
+
for (c = 0; c < colCount; ++c) {
|
1238
|
+
cell = section.getCell(c, r, false);
|
1239
|
+
if (!cell) continue;
|
1240
|
+
|
1241
|
+
painter = this.getColumnPainter(c);
|
1242
|
+
if (painter) {
|
1243
|
+
colData = this._getColumnData(c);
|
1244
|
+
let bgBlinking = false;
|
1245
|
+
if (colData["blinking"] && actualUpdate) {
|
1246
|
+
let blinking = false;
|
1247
|
+
let field = colData["blinkingField"] || this._getField(c);
|
1248
|
+
let newValue = dataRow[field];
|
1249
|
+
if(allowBlinking){
|
1250
|
+
if (prevDataRow) {
|
1251
|
+
let prevValue = prevDataRow[field];
|
1252
|
+
if (prevValue != null) {
|
1253
|
+
if (changedCols && changedCols[field]) {
|
1254
|
+
let blinkSignal = painter.calcBlinkSignal(newValue, prevValue);
|
1255
|
+
if(blinkSignal !== 0 || (blinkSignal === 0 && !colData.levelBlinkingDisabled)) {
|
1256
|
+
blinking = true;
|
1257
|
+
bgBlinking = painter.blink(cell, blinkSignal, dataRow);
|
1258
|
+
}
|
1259
|
+
}
|
1260
|
+
}
|
1261
|
+
} else {
|
1262
|
+
if(insertedRow){
|
1263
|
+
blinking = true;
|
1264
|
+
bgBlinking = painter.flash(cell, this._insertionBlinking, dataRow);
|
1265
|
+
}
|
1266
|
+
}
|
1267
|
+
}
|
1268
|
+
|
1269
|
+
if (!blinking) {
|
1270
|
+
painter.verifyBlinking(cell, dataRow);
|
1271
|
+
}
|
1272
|
+
cachedValues[field] = newValue;
|
1273
|
+
updatePrev = true;
|
1274
|
+
}
|
1275
|
+
|
1276
|
+
// conditional coloring
|
1277
|
+
if (colData["coloringFields"] && !bgBlinking) {
|
1278
|
+
painter.renderColoring(cell, dataRow);
|
1279
|
+
}
|
1280
|
+
}
|
1281
|
+
}
|
1282
|
+
if (updatePrev) {
|
1283
|
+
// Need to update cache when all columns are finished
|
1284
|
+
// To prevent column that uses the same field from always blink with level color
|
1285
|
+
// because the cache is updated by former column
|
1286
|
+
prevDataRows[rid] = cachedValues;
|
1287
|
+
}
|
1288
|
+
rid = null;
|
1289
|
+
}
|
1290
|
+
};
|
1291
|
+
/** @private
|
1292
|
+
* @param {Object} e
|
1293
|
+
*/
|
1294
|
+
ConditionalColoringPlugin.prototype._onColumnAdded = function(e) {
|
1295
|
+
if(e.context) {
|
1296
|
+
this.setColumnColoring(e.colIndex, e.context, e.sender);
|
1297
|
+
}
|
1298
|
+
};
|
1299
|
+
/** @private
|
1300
|
+
* @param {Object} e
|
1301
|
+
*/
|
1302
|
+
ConditionalColoringPlugin.prototype._onColumnRemoved = function(e) {
|
1303
|
+
let colData = /** @type{Object} */(e.columnData);
|
1304
|
+
if (!colData) {
|
1305
|
+
return;
|
1306
|
+
}
|
1307
|
+
|
1308
|
+
this._clearPainter(colData);
|
1309
|
+
|
1310
|
+
// Removed column
|
1311
|
+
let colId = e["colId"];
|
1312
|
+
if (colId) {
|
1313
|
+
if (colData["coloringFields"]) {
|
1314
|
+
this._removeFieldReferrer(colId, COLORING_TYPE);
|
1315
|
+
}
|
1316
|
+
if (colData["blinkingField"]) {
|
1317
|
+
this._removeFieldReferrer(colId, BLINKING_TYPE);
|
1318
|
+
}
|
1319
|
+
}
|
1320
|
+
|
1321
|
+
// Another columns
|
1322
|
+
let field = colData["field"];
|
1323
|
+
if (field) {
|
1324
|
+
let colDef = colData["COL_DEF"];
|
1325
|
+
let isStaticField = colDef ? !colDef.isRealTimeField() : true;
|
1326
|
+
if (isStaticField) {
|
1327
|
+
let colCount = this.getColumnCount();
|
1328
|
+
for (let i = 0; i < colCount; i++) {
|
1329
|
+
colData = this._getColumnData(i);
|
1330
|
+
if (colData["coloringFields"] && colData["coloringFields"][field]) {
|
1331
|
+
this.setConditionalColoring(i, null);
|
1332
|
+
}
|
1333
|
+
|
1334
|
+
if (colData["blinkingField"] === field) {
|
1335
|
+
this.setColumnBlinking(i, null);
|
1336
|
+
}
|
1337
|
+
}
|
1338
|
+
}
|
1339
|
+
}
|
1340
|
+
};
|
1341
|
+
|
1342
|
+
/** @private */
|
1343
|
+
ConditionalColoringPlugin.prototype._onThemeLoaded = function () {
|
1344
|
+
this._requestRowRefresh();
|
1345
|
+
};
|
1346
|
+
|
1347
|
+
/** @private
|
1348
|
+
* @param {Object} colData
|
1349
|
+
* @return {boolean}
|
1350
|
+
*/
|
1351
|
+
ConditionalColoringPlugin.prototype._clearPainter = function (colData) {
|
1352
|
+
if (colData) {
|
1353
|
+
ConditionalColoringPlugin._cleanUpPrevFields();
|
1354
|
+
let painter = colData["painter"];
|
1355
|
+
if (painter) {
|
1356
|
+
if (this._isValidPainter(painter)) {
|
1357
|
+
painter.dispose();
|
1358
|
+
colData["painter"] = null;
|
1359
|
+
return true;
|
1360
|
+
} else {
|
1361
|
+
painter.clearBlinking();
|
1362
|
+
// cannot set colData["painter"] to be null here because some other extensions may be still using this painter
|
1363
|
+
}
|
1364
|
+
}
|
1365
|
+
}
|
1366
|
+
return false;
|
1367
|
+
};
|
1368
|
+
|
1369
|
+
/** @private
|
1370
|
+
* @param {CellPainter} painter
|
1371
|
+
* @param {Array<ConditionalColoringPlugin~Condition>} conditions
|
1372
|
+
*/
|
1373
|
+
ConditionalColoringPlugin.prototype._setEffectiveStyles = function(painter, conditions) {
|
1374
|
+
let effectiveStyles = null;
|
1375
|
+
let hasColor = false;
|
1376
|
+
let hasBackgroundColor = false;
|
1377
|
+
let condCount = conditions ? conditions.length : 0;
|
1378
|
+
for(let i = 0; i < condCount; i++){
|
1379
|
+
let cond = conditions[i];
|
1380
|
+
if(cond["color"]){
|
1381
|
+
hasColor = true;
|
1382
|
+
}
|
1383
|
+
if(cond["backgroundColor"]){
|
1384
|
+
hasBackgroundColor = true;
|
1385
|
+
}
|
1386
|
+
}
|
1387
|
+
if(hasColor && hasBackgroundColor){
|
1388
|
+
effectiveStyles = CLEARING_ALL;
|
1389
|
+
} else if(hasColor){
|
1390
|
+
effectiveStyles = CLEARING_TEXT;
|
1391
|
+
} else if(hasBackgroundColor){
|
1392
|
+
effectiveStyles = CLEARING_BG;
|
1393
|
+
}
|
1394
|
+
|
1395
|
+
painter.setEffectiveStyles(effectiveStyles);
|
1396
|
+
};
|
1397
|
+
|
1398
|
+
/** @private
|
1399
|
+
*/
|
1400
|
+
ConditionalColoringPlugin._cleanUpPrevFields = function() {
|
1401
|
+
// Assume that all hosts are using the same columns' options
|
1402
|
+
let colCount = this.getColumnCount();
|
1403
|
+
let colData, blinkingFields = {};
|
1404
|
+
let isBlinking = false;
|
1405
|
+
for (let c = 0; c < colCount; c++) {
|
1406
|
+
colData = this._getColumnData(c);
|
1407
|
+
if (colData["blinking"]) {
|
1408
|
+
blinkingFields[colData["blinkingField"]] = isBlinking = true;
|
1409
|
+
}
|
1410
|
+
}
|
1411
|
+
|
1412
|
+
let hosts = this._hosts;
|
1413
|
+
let len = hosts.length;
|
1414
|
+
let host, i;
|
1415
|
+
if (isBlinking) {
|
1416
|
+
let prevDataRow, prevDataRows, rid, field;
|
1417
|
+
for (i = 0; i < len; i++) {
|
1418
|
+
host = hosts[i];
|
1419
|
+
prevDataRows = host._prevDataRows;
|
1420
|
+
for (rid in prevDataRows) {
|
1421
|
+
prevDataRow = prevDataRows[rid];
|
1422
|
+
for (field in prevDataRow) {
|
1423
|
+
if (!blinkingFields[field]) {
|
1424
|
+
delete prevDataRow[field];
|
1425
|
+
}
|
1426
|
+
}
|
1427
|
+
}
|
1428
|
+
}
|
1429
|
+
} else {
|
1430
|
+
for (i = 0; i < len; i++) {
|
1431
|
+
host = hosts[i];
|
1432
|
+
host._prevDataRows = {};
|
1433
|
+
}
|
1434
|
+
ConditionalColoringPlugin._stopCleanUpInterval();
|
1435
|
+
}
|
1436
|
+
};
|
1437
|
+
|
1438
|
+
/** @public
|
1439
|
+
*/
|
1440
|
+
ConditionalColoringPlugin.cleanUpPrevRows = function() {
|
1441
|
+
let hosts = this._hosts;
|
1442
|
+
let len = hosts.length;
|
1443
|
+
let host, dv, i, n, rids, rid, prevDataRows;
|
1444
|
+
for (i = 0; i < len; i++) {
|
1445
|
+
host = hosts[i];
|
1446
|
+
dv = host.getDataSource();
|
1447
|
+
if (!dv) { continue; }
|
1448
|
+
prevDataRows = host._prevDataRows;
|
1449
|
+
rids = Object.keys(prevDataRows);
|
1450
|
+
for (n = 0; n < rids.length; n++) {
|
1451
|
+
rid = rids[n];
|
1452
|
+
if (!dv.getRowData(rid)) {
|
1453
|
+
delete prevDataRows[rid];
|
1454
|
+
}
|
1455
|
+
}
|
1456
|
+
}
|
1457
|
+
};
|
1458
|
+
|
1459
|
+
/** @private
|
1460
|
+
*/
|
1461
|
+
ConditionalColoringPlugin._startCleanUpInterval = function() {
|
1462
|
+
if (!ConditionalColoringPlugin._cleanUpTimer) {
|
1463
|
+
ConditionalColoringPlugin._cleanUpTimer = setInterval(ConditionalColoringPlugin.cleanUpPrevRows, 1800000);
|
1464
|
+
}
|
1465
|
+
};
|
1466
|
+
|
1467
|
+
/** @private
|
1468
|
+
*/
|
1469
|
+
ConditionalColoringPlugin._stopCleanUpInterval = function() {
|
1470
|
+
if (ConditionalColoringPlugin._cleanUpTimer) {
|
1471
|
+
clearInterval(ConditionalColoringPlugin._cleanUpTimer);
|
1472
|
+
ConditionalColoringPlugin._cleanUpTimer = 0;
|
1473
|
+
}
|
1474
|
+
};
|
1475
|
+
/** @private
|
1476
|
+
* @return {Boolean}
|
1477
|
+
*/
|
1478
|
+
ConditionalColoringPlugin.prototype._hasColoring = function() {
|
1479
|
+
let hosts = this._hosts;
|
1480
|
+
let grid = hosts[0];
|
1481
|
+
|
1482
|
+
let colCount = this.getColumnCount();
|
1483
|
+
for(let colIndex = 0; colIndex < colCount; colIndex++){
|
1484
|
+
if(grid.hasColumnClass(colIndex, "conditionally-colored")){
|
1485
|
+
return true;
|
1486
|
+
}
|
1487
|
+
}
|
1488
|
+
return false;
|
1489
|
+
};
|
1490
|
+
|
1491
|
+
/** @public
|
1492
|
+
* @description Deprecated:: Should use reloadThemeColors instead
|
1493
|
+
* @function
|
1494
|
+
* @param {Object.<string, string>} colors Name/Value pair object
|
1495
|
+
*/
|
1496
|
+
ConditionalColoringPlugin.setThemeColors = CellPainter.setThemeColors;
|
1497
|
+
|
1498
|
+
/** @public
|
1499
|
+
* @description Reload theme colors and change colors for all instances of CellPainter.
|
1500
|
+
* Should call after the overwriting css variables for MovementColor without changing movement-color-profile attribute.
|
1501
|
+
* @function
|
1502
|
+
* @return {Promise<Object>}
|
1503
|
+
*/
|
1504
|
+
ConditionalColoringPlugin.prototype.reloadThemeColors = function () {
|
1505
|
+
return CellPainter.reloadThemeColors()
|
1506
|
+
.then(this._onThemeLoaded)
|
1507
|
+
.catch(this._onThemeLoaded);
|
1508
|
+
};
|
1509
|
+
|
1510
|
+
|
1511
|
+
|
1512
|
+
export default ConditionalColoringPlugin;
|
1513
|
+
export { ConditionalColoringPlugin, ConditionalColoringPlugin as ConditionalColoring, ConditionalColoringPlugin as ConditionalColoringExtension };
|