@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,1182 @@
|
|
1
|
+
import { Ext } from "../../tr-grid-util/es6/Ext.js";
|
2
|
+
import { GridPlugin, rowDefRowGetter } from "../../tr-grid-util/es6/GridPlugin.js";
|
3
|
+
import { ExpanderIcon } from "../../tr-grid-util/es6/ExpanderIcon.js";
|
4
|
+
import { ElfUtil } from "../../tr-grid-util/es6/ElfUtil.js";
|
5
|
+
import { RowPainter } from "../../tr-grid-util/es6/RowPainter.js";
|
6
|
+
import { injectCss, prettifyCss } from "../../tr-grid-util/es6/Util.js";
|
7
|
+
import { Conflator } from "../../tr-grid-util/es6/Conflator.js";
|
8
|
+
|
9
|
+
/** @typedef {Object} RowSegmentingPlugin~Options
|
10
|
+
* @description The options can be specified by `rowSegmenting` property of the main grid's options
|
11
|
+
* @property {boolean=} spanning=true If disabled, segment separator rows will not be spanned/stretched across multiple cells
|
12
|
+
* @property {boolean=} colorTag If not specified, the color tag will be disabled when using extension without halo theme.
|
13
|
+
* @property {string=} cssField="TAG_CSS_CLASS" Apply CSS class based on the given field
|
14
|
+
* @property {Object=} predefinedColors Predefined color object map for color tag
|
15
|
+
* @property {Function=} clicked=null Event handler when user clicks on arrows or cells
|
16
|
+
* @property {Function=} headerMenuClicked=null Event handler when user clicks on menu icon. The menu icon will be displayed if spanning option is true.
|
17
|
+
* @property {Function=} segmentSeparatorBinding=null Logic that will be executed on each segment separator row
|
18
|
+
* @property {Function=} nonSegmentSeparatorBinding=null Logic that will be executed for all non segment separator row
|
19
|
+
* @property {Function=} sortingLogic=null Logic to be used by sortSegments method
|
20
|
+
* @property {string=} rowSpanningField="ROW_SPANNING" Field to be used for spanning segment header rows based on the field values
|
21
|
+
* @property {string=} segmentIdField="" Field used for initializing segments based on text id
|
22
|
+
* @property {string=} collapsingField="" Field used for indicating that the corresponding segment row is collapsed
|
23
|
+
* @property {string=} parentIdField="" Field used for specifying parent segment of the row
|
24
|
+
* @property {boolean=} defaultCollapsing=false If enabled, any newly created segment will be collapsed by default
|
25
|
+
* @property {(string|number)=} displayColumn=null Render tags in the given column. It can be either the column index, column ID, or field
|
26
|
+
*/
|
27
|
+
|
28
|
+
/** @callback RowSegmentingPlugin~SortingLogic
|
29
|
+
* @description Comparer function for comparing the order of 2 segment separator rows. The function takes at least 2 parameters. <br> The function should return -1 if the first parameter should comes first, 1 for the other way, and 0 if they are equal.
|
30
|
+
* @param {Object} rowDataA Row data of the segment separator row
|
31
|
+
* @param {Object} rowDataB Row data of the segment separator row
|
32
|
+
* @return {number}
|
33
|
+
*/
|
34
|
+
|
35
|
+
/** @typedef {Object} RowSegmentingPlugin~SegmentDefinition
|
36
|
+
* @description An object that can be passed to setSegmentSeparator method
|
37
|
+
* @property {Array.<string>=} children=null Array of child row ids
|
38
|
+
* @property {boolean=} collapsed Initial expanding/colapssing state of the segment
|
39
|
+
*/
|
40
|
+
|
41
|
+
/** @constructor
|
42
|
+
* @param {RowSegmentingPlugin~Options=} options
|
43
|
+
* @extends {GridPlugin}
|
44
|
+
*/
|
45
|
+
let RowSegmentingPlugin = function (options) {
|
46
|
+
let t = this;
|
47
|
+
t._onPreSectionDataBinding = t._onPreSectionDataBinding.bind(t);
|
48
|
+
t._updateHeader = t._updateHeader.bind(t);
|
49
|
+
t._onArrowClick = t._onArrowClick.bind(t);
|
50
|
+
t._onColumnIndexChanged = t._onColumnIndexChanged.bind(t);
|
51
|
+
t._rtSortingLogic = t._rtSortingLogic.bind(t);
|
52
|
+
t.requestSeparatorRefresh = t.requestSeparatorRefresh.bind(t);
|
53
|
+
t._separatorRefreshConflator = new Conflator(10, t.requestSeparatorRefresh);
|
54
|
+
t._columnIndexChangedConflator = new Conflator(10, t._onColumnIndexChanged);
|
55
|
+
|
56
|
+
t._hosts = [];
|
57
|
+
this.config({ rowSegmenting: options });
|
58
|
+
};
|
59
|
+
Ext.inherits(RowSegmentingPlugin, GridPlugin);
|
60
|
+
|
61
|
+
/** @type {RowSegmentingPlugin~SortingLogic}
|
62
|
+
* @private
|
63
|
+
*/
|
64
|
+
RowSegmentingPlugin.prototype._userSortingLogic = null;
|
65
|
+
/** @type {boolean}
|
66
|
+
* @private
|
67
|
+
*/
|
68
|
+
RowSegmentingPlugin.prototype._spanning = true;
|
69
|
+
/** @type {boolean}
|
70
|
+
* @private
|
71
|
+
*/
|
72
|
+
RowSegmentingPlugin.prototype._prevSegmentBySegmentId = false;
|
73
|
+
/** @type {Array.<number>}
|
74
|
+
* @private
|
75
|
+
*/
|
76
|
+
RowSegmentingPlugin.prototype._indentSizes = null;
|
77
|
+
/** @type {number}
|
78
|
+
* @private
|
79
|
+
*/
|
80
|
+
RowSegmentingPlugin.prototype._arrowSize = 9;
|
81
|
+
/** @type {number|string}
|
82
|
+
* @private
|
83
|
+
*/
|
84
|
+
RowSegmentingPlugin.prototype._displayColumn = null;
|
85
|
+
/** @type {Object}
|
86
|
+
* @private
|
87
|
+
*/
|
88
|
+
RowSegmentingPlugin.prototype._rowPainter = null;
|
89
|
+
/** @type {boolean|null}
|
90
|
+
* @private
|
91
|
+
*/
|
92
|
+
RowSegmentingPlugin.prototype._colorTag = null;
|
93
|
+
/** @type {string}
|
94
|
+
* @private
|
95
|
+
*/
|
96
|
+
RowSegmentingPlugin.prototype._cssField = "TAG_CSS_CLASS";
|
97
|
+
/** @type {string}
|
98
|
+
* @private
|
99
|
+
*/
|
100
|
+
RowSegmentingPlugin.prototype._rowSpanningField = "ROW_SPANNING";
|
101
|
+
/** @type {string}
|
102
|
+
* @private
|
103
|
+
*/
|
104
|
+
RowSegmentingPlugin.prototype._segmentIdField = "";
|
105
|
+
/** @type {string}
|
106
|
+
* @private
|
107
|
+
*/
|
108
|
+
RowSegmentingPlugin.prototype._collapsingField = "";
|
109
|
+
/** @type {string}
|
110
|
+
* @private
|
111
|
+
*/
|
112
|
+
RowSegmentingPlugin.prototype._parentIdField = "";
|
113
|
+
/** @type {number}
|
114
|
+
* @private
|
115
|
+
*/
|
116
|
+
RowSegmentingPlugin.prototype._runningId = 0;
|
117
|
+
/** @type {Conflator}
|
118
|
+
* @private
|
119
|
+
*/
|
120
|
+
RowSegmentingPlugin.prototype._separatorRefreshConflator = null;
|
121
|
+
/** @type {Object}
|
122
|
+
* @private
|
123
|
+
*/
|
124
|
+
RowSegmentingPlugin.prototype._styleTag = null;
|
125
|
+
/** @type {Object}
|
126
|
+
* @private
|
127
|
+
*/
|
128
|
+
RowSegmentingPlugin.prototype._predefinedColors = null;
|
129
|
+
/** @type {string}
|
130
|
+
* @private
|
131
|
+
*/
|
132
|
+
RowSegmentingPlugin._controlClass = "predefined-color-tag";
|
133
|
+
/** @type {Object}
|
134
|
+
* @private
|
135
|
+
*/
|
136
|
+
RowSegmentingPlugin.prototype._collapsingMap = null;
|
137
|
+
/** @type {boolean}
|
138
|
+
* @private
|
139
|
+
*/
|
140
|
+
RowSegmentingPlugin.prototype._defaultCollapsing = false;
|
141
|
+
|
142
|
+
/** @public
|
143
|
+
* @return {string}
|
144
|
+
*/
|
145
|
+
RowSegmentingPlugin.prototype.getName = function () {
|
146
|
+
return "RowSegmentingPlugin"; // Read Only
|
147
|
+
};
|
148
|
+
|
149
|
+
/** @public
|
150
|
+
* @ignore
|
151
|
+
* @param {Element} elem
|
152
|
+
* @param {Object} config
|
153
|
+
*/
|
154
|
+
RowSegmentingPlugin.prototype.beforeInit = function(elem, config) {
|
155
|
+
if (ElfUtil.isHaloTheme()) {
|
156
|
+
this._arrowSize = 18;
|
157
|
+
}
|
158
|
+
};
|
159
|
+
|
160
|
+
/** @public
|
161
|
+
* @param {Object} host core grid instance
|
162
|
+
* @param {Object=} options
|
163
|
+
*/
|
164
|
+
RowSegmentingPlugin.prototype.initialize = function (host, options) {
|
165
|
+
if (this._hosts.indexOf(host) >= 0) {
|
166
|
+
return;
|
167
|
+
}
|
168
|
+
|
169
|
+
ExpanderIcon.loadExpanderStyles();
|
170
|
+
|
171
|
+
this._hosts.push(host);
|
172
|
+
host.listen("columnMoved", this._onColumnIndexChanged);
|
173
|
+
host.listen("columnRemoved", this._onColumnIndexChanged);
|
174
|
+
host.listen("columnAdded", this._onColumnIndexChanged);
|
175
|
+
host.listen("preSectionDataBinding", this._onPreSectionDataBinding);
|
176
|
+
|
177
|
+
this.config(options);
|
178
|
+
let dv = host.getDataSource();
|
179
|
+
if(dv && dv.setSegmentDefaultCollapsing) {
|
180
|
+
dv.setSegmentDefaultCollapsing(this._defaultCollapsing);
|
181
|
+
}
|
182
|
+
|
183
|
+
let enabled = this._colorTag != null ? this._colorTag : ElfUtil.isHaloTheme();
|
184
|
+
RowPainter.disableColorTag(host, enabled === false);
|
185
|
+
|
186
|
+
if (this._predefinedColors != null) {
|
187
|
+
this._injectStyles(this._predefinedColors);
|
188
|
+
host.enableClass(RowSegmentingPlugin._controlClass);
|
189
|
+
}
|
190
|
+
|
191
|
+
RowPainter.applyGroupingStyles(host);
|
192
|
+
host.addClass("folder-disabled"); // Mouse cursor will be pointer when hovering at header rows
|
193
|
+
|
194
|
+
enabled = this._headerMenuClicked;
|
195
|
+
RowPainter.enableHeaderMenu(host, enabled ? true : false);
|
196
|
+
};
|
197
|
+
|
198
|
+
/** Request for updating the segment separators based on values from segment Id field in row data
|
199
|
+
* @public
|
200
|
+
*/
|
201
|
+
RowSegmentingPlugin.prototype.requestSeparatorRefresh = function () {
|
202
|
+
if(!this._segmentIdField) {
|
203
|
+
return;
|
204
|
+
}
|
205
|
+
if(this._separatorRefreshConflator.conflate()) {
|
206
|
+
return;
|
207
|
+
}
|
208
|
+
|
209
|
+
let dv = this._getDataView();
|
210
|
+
if (!dv) { return; }
|
211
|
+
|
212
|
+
let collapsingMap = {};
|
213
|
+
if (this._collapsingMap) {
|
214
|
+
collapsingMap = this._collapsingMap;
|
215
|
+
this._collapsingMap = null;
|
216
|
+
}
|
217
|
+
|
218
|
+
let rowId, rowData, segmentId;
|
219
|
+
let dt = dv.getDataSource();
|
220
|
+
let segmentRowIds = this.getSegmentIds() || [];
|
221
|
+
let segmentCount = segmentRowIds.length;
|
222
|
+
if (segmentCount){
|
223
|
+
for(let s = 0; s < segmentCount; s++) {
|
224
|
+
rowId = segmentRowIds[s];
|
225
|
+
rowData = this._rowGetter(dt.getRowData(rowId));
|
226
|
+
segmentId = rowData[this._segmentIdField];
|
227
|
+
if (segmentId) {
|
228
|
+
if (collapsingMap[segmentId] == null) {
|
229
|
+
collapsingMap[segmentId] = this.isSegmentCollapsed(rowId);
|
230
|
+
}
|
231
|
+
}
|
232
|
+
}
|
233
|
+
}
|
234
|
+
|
235
|
+
if (this._prevSegmentBySegmentId) { // Check only the segmentation set by the segment ID field and exclude the segment separator set by the runtime API using the setSegmentSeparator method
|
236
|
+
this._prevSegmentBySegmentId = false;
|
237
|
+
this.unsetAllSegmentSeparators();
|
238
|
+
// Note: if there are chains, their segmenting will be lost here and they cannot be restored
|
239
|
+
// because their children has no segment-id.
|
240
|
+
}
|
241
|
+
|
242
|
+
let rowIds = dt.getAllRowIds();
|
243
|
+
let rowCount = rowIds.length;
|
244
|
+
let segmentMap = {};
|
245
|
+
let segmentArr = [];
|
246
|
+
let separatorArr = [];
|
247
|
+
let collapsingAry = [];
|
248
|
+
let expandingAry = [];
|
249
|
+
let parentId = "";
|
250
|
+
for(let i = 0; i < rowCount; i++) {
|
251
|
+
rowId = rowIds[i];
|
252
|
+
rowData = this._rowGetter(dt.getRowData(rowId));
|
253
|
+
segmentId = rowData[this._segmentIdField];
|
254
|
+
parentId = rowData[this._parentIdField];
|
255
|
+
if(segmentId == null && parentId == null) {
|
256
|
+
continue;
|
257
|
+
}
|
258
|
+
this._prevSegmentBySegmentId = true;
|
259
|
+
|
260
|
+
let segmentInfo = segmentMap[segmentId];
|
261
|
+
let parentInfo = parentId !== segmentId ? segmentMap[parentId] : null; // WARNING: parent must exist beforehand
|
262
|
+
if(segmentInfo) {
|
263
|
+
if(parentInfo) {
|
264
|
+
segmentInfo = parentInfo;
|
265
|
+
parentInfo = null;
|
266
|
+
}
|
267
|
+
segmentInfo.rowIds.push(rowId);
|
268
|
+
} else if(segmentId) {
|
269
|
+
segmentInfo = segmentMap[segmentId] = {
|
270
|
+
rowIds: [],
|
271
|
+
segmentId: rowId
|
272
|
+
};
|
273
|
+
segmentArr.push(segmentInfo);
|
274
|
+
separatorArr.push(rowId);
|
275
|
+
|
276
|
+
let collapsed = (this._collapsingField) ? rowData[this._collapsingField] : collapsingMap[segmentId];
|
277
|
+
if(collapsed != null) {
|
278
|
+
if(collapsed) {
|
279
|
+
collapsingAry.push(rowId);
|
280
|
+
} else {
|
281
|
+
expandingAry.push(rowId);
|
282
|
+
}
|
283
|
+
}
|
284
|
+
}
|
285
|
+
|
286
|
+
if(parentInfo) {
|
287
|
+
parentInfo.rowIds.push(rowId);
|
288
|
+
}
|
289
|
+
}
|
290
|
+
if(segmentArr.length) {
|
291
|
+
this.setSegmentSeparators(separatorArr); // TODO: This method can be merged into setSegmentChildren
|
292
|
+
this.setSegmentChildren(segmentArr);
|
293
|
+
}
|
294
|
+
|
295
|
+
if(collapsingAry.length) {
|
296
|
+
this.collapseSegments(collapsingAry, true);
|
297
|
+
}
|
298
|
+
if(expandingAry.length) {
|
299
|
+
this.collapseSegments(expandingAry, false);
|
300
|
+
}
|
301
|
+
};
|
302
|
+
/** @public
|
303
|
+
* @param {Object=} host core grid instance
|
304
|
+
*/
|
305
|
+
RowSegmentingPlugin.prototype.unload = function (host) {
|
306
|
+
let at = this._hosts.indexOf(host);
|
307
|
+
if (at < 0) {
|
308
|
+
return;
|
309
|
+
}
|
310
|
+
host.unlisten("columnMoved", this._onColumnIndexChanged);
|
311
|
+
host.unlisten("columnRemoved", this._onColumnIndexChanged);
|
312
|
+
host.unlisten("columnAdded", this._onColumnIndexChanged);
|
313
|
+
host.unlisten("preSectionDataBinding", this._onPreSectionDataBinding);
|
314
|
+
this._hosts.splice(at, 1);
|
315
|
+
if(this._hosts.length <= 0) {
|
316
|
+
this._separatorRefreshConflator.reset();
|
317
|
+
this._columnIndexChangedConflator.reset();
|
318
|
+
}
|
319
|
+
this._dispose();
|
320
|
+
};
|
321
|
+
|
322
|
+
/** @public
|
323
|
+
* @param {Object=} options Grid configuration object
|
324
|
+
*/
|
325
|
+
RowSegmentingPlugin.prototype.config = function (options) {
|
326
|
+
if (!options) { return; }
|
327
|
+
|
328
|
+
let option = options.rowSegmenting;
|
329
|
+
if (!option) { return; }
|
330
|
+
|
331
|
+
if (typeof option.sortingLogic === "function") {
|
332
|
+
this._userSortingLogic = option.sortingLogic;
|
333
|
+
}
|
334
|
+
if (typeof option.headerMenuClicked === "function") {
|
335
|
+
this._headerMenuClicked = option.headerMenuClicked;
|
336
|
+
}
|
337
|
+
if (option.spanning != null) {
|
338
|
+
this._spanning = option.spanning ? true : false;
|
339
|
+
}
|
340
|
+
if (option.colorTag != null) {
|
341
|
+
this._colorTag = option.colorTag;
|
342
|
+
}
|
343
|
+
if (option.cssField != null) {
|
344
|
+
this._cssField = option.cssField;
|
345
|
+
}
|
346
|
+
if (option.rowSpanningField != null) {
|
347
|
+
this._rowSpanningField = option.rowSpanningField;
|
348
|
+
}
|
349
|
+
if (option.segmentIdField != null) {
|
350
|
+
this._segmentIdField = option.segmentIdField;
|
351
|
+
}
|
352
|
+
if (option.collapsingField != null) {
|
353
|
+
this._collapsingField = option.collapsingField;
|
354
|
+
}
|
355
|
+
if (option.parentIdField != null) {
|
356
|
+
this._parentIdField = option.parentIdField;
|
357
|
+
}
|
358
|
+
if (option.predefinedColors != null && typeof option.predefinedColors === "object") {
|
359
|
+
this._predefinedColors = option.predefinedColors;
|
360
|
+
}
|
361
|
+
if(option.displayColumn != null) {
|
362
|
+
this._displayColumn = option.displayColumn;
|
363
|
+
}
|
364
|
+
if(option.defaultCollapse != null) {
|
365
|
+
this._defaultCollapsing = option.defaultCollapse;
|
366
|
+
}
|
367
|
+
if(option.defaultCollapsing != null) {
|
368
|
+
this._defaultCollapsing = option.defaultCollapsing;
|
369
|
+
}
|
370
|
+
|
371
|
+
this._rowPainter = new RowPainter({
|
372
|
+
clickableCell: false,
|
373
|
+
headerSpanning: this._spanning,
|
374
|
+
footerSpanning: false,
|
375
|
+
onCellClicked: this._onArrowClick,
|
376
|
+
headerMenuClicked: this._headerMenuClicked,
|
377
|
+
segmentMode: true
|
378
|
+
});
|
379
|
+
|
380
|
+
this.addListener(option, "clicked");
|
381
|
+
this.addListener(option, "segmentSeparatorBinding");
|
382
|
+
this.addListener(option, "nonSegmentSeparatorBinding");
|
383
|
+
|
384
|
+
// Collect collapsing states from configuration
|
385
|
+
let collapsingMap = {};
|
386
|
+
let dirty = false;
|
387
|
+
let rows = this._segmentIdField ? options.rows : null; // If there is no segment Id, collapsing states cannot be mapped to the inexistence segments
|
388
|
+
let len = rows ? rows.length : 0;
|
389
|
+
for (let i = 0; i < len; i++) {
|
390
|
+
let row = rows[i];
|
391
|
+
if (row && typeof row === "object") {
|
392
|
+
let segmentId = row.values ? row.values[this._segmentIdField] : null;
|
393
|
+
if (segmentId && collapsingMap[segmentId] == null) {
|
394
|
+
if (row["collapsed"] != null) {
|
395
|
+
dirty = true;
|
396
|
+
collapsingMap[segmentId] = row["collapsed"] ? true : false;
|
397
|
+
}
|
398
|
+
}
|
399
|
+
}
|
400
|
+
}
|
401
|
+
|
402
|
+
if (dirty) {
|
403
|
+
this._collapsingMap = collapsingMap;
|
404
|
+
}
|
405
|
+
|
406
|
+
this.requestSeparatorRefresh();
|
407
|
+
};
|
408
|
+
|
409
|
+
/** @public
|
410
|
+
* @param {Object=} gridOptions
|
411
|
+
* @return {!Object}
|
412
|
+
*/
|
413
|
+
RowSegmentingPlugin.prototype.getConfigObject = function (gridOptions) {
|
414
|
+
let obj = gridOptions || {};
|
415
|
+
|
416
|
+
let extOptions = obj.rowSegmenting;
|
417
|
+
if(!extOptions) {
|
418
|
+
extOptions = obj.rowSegmenting = {};
|
419
|
+
}
|
420
|
+
if(!this._spanning) {
|
421
|
+
extOptions.spanning = false;
|
422
|
+
}
|
423
|
+
if(this._colorTag != null) {
|
424
|
+
extOptions.colorTag = this._colorTag;
|
425
|
+
}
|
426
|
+
if(this._cssField !== "TAG_CSS_CLASS") {
|
427
|
+
extOptions.cssField = this._cssField;
|
428
|
+
}
|
429
|
+
if(this._predefinedColors != null) {
|
430
|
+
extOptions.predefinedColors = this._predefinedColors;
|
431
|
+
}
|
432
|
+
if(this._rowSpanningField != "ROW_SPANNING") {
|
433
|
+
extOptions.rowSpanningField = this._rowSpanningField;
|
434
|
+
}
|
435
|
+
if(this._segmentIdField) {
|
436
|
+
extOptions.segmentIdField = this._segmentIdField;
|
437
|
+
}
|
438
|
+
if(this._collapsingField) {
|
439
|
+
extOptions.collapsingField = this._collapsingField;
|
440
|
+
}
|
441
|
+
if(this._parentIdField) {
|
442
|
+
extOptions.parentIdField = this._parentIdField;
|
443
|
+
}
|
444
|
+
if(this._defaultCollapsing) {
|
445
|
+
extOptions.defaultCollapsing = true;
|
446
|
+
}
|
447
|
+
|
448
|
+
if(this._displayColumn != null) {
|
449
|
+
// WANRING: display column use colId and colIndex for internal, but give field and colIndex for user
|
450
|
+
let curDisIndex = this._resolveDisplayColumn();
|
451
|
+
if(curDisIndex < 0 ) {
|
452
|
+
extOptions.displayColumn = this._displayColumn; // column id
|
453
|
+
} else {
|
454
|
+
let curDisFied = this.getColumnField(curDisIndex);
|
455
|
+
let fields = this.getColumnFields();
|
456
|
+
let currentIndex = fields.indexOf(curDisFied);
|
457
|
+
if(currentIndex === fields.lastIndexOf(curDisFied)) {
|
458
|
+
extOptions.displayColumn = curDisFied; // column field
|
459
|
+
} else { // duplicate col use col index
|
460
|
+
extOptions.displayColumn = curDisIndex; // column index
|
461
|
+
}
|
462
|
+
}
|
463
|
+
}
|
464
|
+
|
465
|
+
// restore runningId for spanningIdField
|
466
|
+
this._runningId = 0;
|
467
|
+
|
468
|
+
return obj;
|
469
|
+
};
|
470
|
+
|
471
|
+
/** @private
|
472
|
+
* @function
|
473
|
+
* @param {!Object} obj
|
474
|
+
* @param {string} field
|
475
|
+
* @param {*} val
|
476
|
+
*/
|
477
|
+
let _setObjectValue = function(obj, field, val) {
|
478
|
+
if(field) {
|
479
|
+
if(!obj.values) {
|
480
|
+
obj.values = {};
|
481
|
+
}
|
482
|
+
obj.values[field] = val;
|
483
|
+
}
|
484
|
+
};
|
485
|
+
/** @private
|
486
|
+
* @function
|
487
|
+
* @param {!Object} obj
|
488
|
+
* @param {string} field
|
489
|
+
*/
|
490
|
+
let _deleteObjectValue = function(obj, field) {
|
491
|
+
if(field && obj.values) {
|
492
|
+
if(obj.values[field]) {
|
493
|
+
delete obj.values[field]; // Slow
|
494
|
+
}
|
495
|
+
}
|
496
|
+
};
|
497
|
+
/** @public
|
498
|
+
* @param {Object} rowData row config object
|
499
|
+
* @param {string} rowId
|
500
|
+
* @return {!Object} return row config object with update special field data
|
501
|
+
*/
|
502
|
+
RowSegmentingPlugin.prototype.getRowConfigObject = function (rowData, rowId) {
|
503
|
+
let obj = rowData || {};
|
504
|
+
let segmentIdField = this._segmentIdField;
|
505
|
+
if(!segmentIdField) {
|
506
|
+
return obj;
|
507
|
+
}
|
508
|
+
|
509
|
+
_deleteObjectValue(obj, segmentIdField);
|
510
|
+
_deleteObjectValue(obj, this._parentIdField);
|
511
|
+
|
512
|
+
let dv = this._getDataView();
|
513
|
+
let segment = dv.getSegment(rowId);
|
514
|
+
if(segment) {
|
515
|
+
_setObjectValue(obj, segmentIdField, ++this._runningId);
|
516
|
+
segment.runningId = this._runningId; // WANRING: Add
|
517
|
+
|
518
|
+
let collapsed = segment.isCollapsed();
|
519
|
+
_setObjectValue(obj, this._collapsingField, collapsed);
|
520
|
+
|
521
|
+
if(obj["collapsed"] == null) { // Avoid overriding value from real-time grid
|
522
|
+
obj["collapsed"] = collapsed;
|
523
|
+
}
|
524
|
+
}
|
525
|
+
|
526
|
+
let parentSegment = dv.getSegmentParent(rowId);
|
527
|
+
if(parentSegment) {
|
528
|
+
if(this._parentIdField) {
|
529
|
+
// WARNING: this assumes the parent segment is always appeared before this row id
|
530
|
+
_setObjectValue(obj, this._parentIdField, parentSegment.runningId || this._runningId);
|
531
|
+
} else if(!segment) {
|
532
|
+
_setObjectValue(obj, segmentIdField, this._runningId);
|
533
|
+
}
|
534
|
+
}
|
535
|
+
|
536
|
+
return obj;
|
537
|
+
};
|
538
|
+
|
539
|
+
/** @private
|
540
|
+
* @param {Object} predefinedColors Predefined color object map
|
541
|
+
*/
|
542
|
+
RowSegmentingPlugin.prototype._injectStyles = function(predefinedColors) {
|
543
|
+
let prefix = ".tr-grid." + RowSegmentingPlugin._controlClass + " .tr-lg .cell";
|
544
|
+
let css = [];
|
545
|
+
let value;
|
546
|
+
for (let className in predefinedColors) {
|
547
|
+
css.push(prefix + "." + className + "::before");
|
548
|
+
value = predefinedColors[className]["backgroundColor"];
|
549
|
+
if (value) {
|
550
|
+
css.push(["background-color: " + value + ";"]);
|
551
|
+
}
|
552
|
+
}
|
553
|
+
|
554
|
+
let host = this._hosts[0];
|
555
|
+
|
556
|
+
if (this._styleTag) {
|
557
|
+
if (this._styleTag.parentNode) {
|
558
|
+
this._styleTag.parentNode.removeChild(this._styleTag);
|
559
|
+
}
|
560
|
+
this._styleTag = null;
|
561
|
+
}
|
562
|
+
this._styleTag = injectCss(prettifyCss(css), host.getElement());
|
563
|
+
};
|
564
|
+
|
565
|
+
/** @private
|
566
|
+
* @param {Object} e
|
567
|
+
*/
|
568
|
+
RowSegmentingPlugin.prototype._onPreSectionDataBinding = function (e) {
|
569
|
+
this._updateHeader(
|
570
|
+
e.sectionSettings,
|
571
|
+
e.fromRowIndex,
|
572
|
+
e.toRowIndex - 1
|
573
|
+
);
|
574
|
+
};
|
575
|
+
|
576
|
+
/**
|
577
|
+
* @private
|
578
|
+
*/
|
579
|
+
RowSegmentingPlugin.prototype._onColumnIndexChanged = function () {
|
580
|
+
if(this._columnIndexChangedConflator.conflate()) {
|
581
|
+
return;
|
582
|
+
}
|
583
|
+
if(this._spanning) {
|
584
|
+
this._clearSectionHeaderStyle();
|
585
|
+
}
|
586
|
+
// columnAdded event will fire binding, so it will be double render header
|
587
|
+
this.updateHeaders(); // need to force update header when column index is changed
|
588
|
+
};
|
589
|
+
|
590
|
+
/** @private
|
591
|
+
*/
|
592
|
+
RowSegmentingPlugin.prototype._clearSectionHeaderStyle = function () {
|
593
|
+
let host = this._hosts[0];
|
594
|
+
if (!host) {
|
595
|
+
return;
|
596
|
+
}
|
597
|
+
let sections = host.getAllSections("content");
|
598
|
+
let rowPainter = this._rowPainter;
|
599
|
+
for (let i = sections.length; --i >= 0;) {
|
600
|
+
let section = sections[i];
|
601
|
+
|
602
|
+
let fi = section.getFirstIndexInView();
|
603
|
+
let li = section.getLastIndexInView();
|
604
|
+
for (let r = fi; r <= li; r++) {
|
605
|
+
// Currently, removeHeaderStyle removes all stretched cells, no need to use column index. In this case, we're specifying column index 0
|
606
|
+
rowPainter.removeHeaderStyle(section, 0, r);
|
607
|
+
}
|
608
|
+
}
|
609
|
+
};
|
610
|
+
|
611
|
+
/** @public */
|
612
|
+
RowSegmentingPlugin.prototype.updateHeaders = function () {
|
613
|
+
let host = this._hosts[0];
|
614
|
+
if (!host) {
|
615
|
+
return;
|
616
|
+
}
|
617
|
+
let settingList = host.getAllSectionSettings("content");
|
618
|
+
for (let i = settingList.length; --i >= 0;) {
|
619
|
+
this._updateHeader(settingList[i]);
|
620
|
+
}
|
621
|
+
};
|
622
|
+
|
623
|
+
/** @private
|
624
|
+
* @param {Object} settings SectionSettings
|
625
|
+
* @return {boolean}
|
626
|
+
*/
|
627
|
+
RowSegmentingPlugin.prototype._hasSegmentation = function (settings) {
|
628
|
+
if (settings && settings.getType() === "content") {
|
629
|
+
let dv = settings.getDataSource();
|
630
|
+
if (dv) {
|
631
|
+
if(dv.hasSegmentation()) {
|
632
|
+
dv._previouslyHasSegmentation = true; // Allow one more cycle to clean up styling
|
633
|
+
return true;
|
634
|
+
} else if(dv._previouslyHasSegmentation) {
|
635
|
+
dv._previouslyHasSegmentation = false;
|
636
|
+
return true;
|
637
|
+
}
|
638
|
+
}
|
639
|
+
}
|
640
|
+
return false;
|
641
|
+
};
|
642
|
+
|
643
|
+
/** @public
|
644
|
+
* @param {string|number} rowRef Row Id or row index
|
645
|
+
* @return {string} parent row id of this segmentation. If the parent row id for this segmentation cannot be found, return ""
|
646
|
+
*/
|
647
|
+
RowSegmentingPlugin.prototype.getSegmentParentRowId = function (rowRef) {
|
648
|
+
let dv = this._getDataView();
|
649
|
+
if(dv) {
|
650
|
+
// WARNING: getRowId is slow
|
651
|
+
let rowId = (typeof rowRef === "number") ? dv.getRowId(rowRef) : rowRef;
|
652
|
+
return dv.getSegmentParentRowId(rowId);
|
653
|
+
}
|
654
|
+
return "";
|
655
|
+
};
|
656
|
+
|
657
|
+
/** @private
|
658
|
+
* @description Resolve display column from column id to column index
|
659
|
+
* @return {number} return column index of display column
|
660
|
+
*/
|
661
|
+
RowSegmentingPlugin.prototype._resolveDisplayColumn = function () {
|
662
|
+
if(this._displayColumn == null) {
|
663
|
+
return 0;
|
664
|
+
}
|
665
|
+
if(this.getColumnCount() === 0) {
|
666
|
+
return -1;
|
667
|
+
}
|
668
|
+
if(typeof this._displayColumn === "number") {
|
669
|
+
let colId = this.getColumnId(this._displayColumn);
|
670
|
+
if(colId) {
|
671
|
+
this._displayColumn = colId;
|
672
|
+
}
|
673
|
+
}
|
674
|
+
let colIndex = this.getColumnIndex(this._displayColumn);
|
675
|
+
if(colIndex < 0) {
|
676
|
+
colIndex = 0;
|
677
|
+
this._displayColumn = this.getColumnId(colIndex);
|
678
|
+
}
|
679
|
+
|
680
|
+
return colIndex;
|
681
|
+
};
|
682
|
+
|
683
|
+
/** @private
|
684
|
+
* @param {Object} settings SectionSettings
|
685
|
+
* @param {number=} firstRowIndex
|
686
|
+
* @param {number=} lastRowIndex INCLUSIVE
|
687
|
+
*/
|
688
|
+
RowSegmentingPlugin.prototype._updateHeader = function (settings, firstRowIndex, lastRowIndex) {
|
689
|
+
if (!this._hasSegmentation(settings) || !this._rowPainter) {
|
690
|
+
return;
|
691
|
+
}
|
692
|
+
|
693
|
+
let headerColumn = this._resolveDisplayColumn();
|
694
|
+
if(headerColumn < 0) {
|
695
|
+
return;
|
696
|
+
}
|
697
|
+
let dv = settings.getDataSource();
|
698
|
+
let dt = dv.getDataSource();
|
699
|
+
let section = settings.getSection();
|
700
|
+
let fi = (firstRowIndex != null) ? firstRowIndex : section.getFirstIndexInView();
|
701
|
+
let li = (lastRowIndex != null) ? lastRowIndex : section.getLastIndexInView();
|
702
|
+
|
703
|
+
let arg = {};
|
704
|
+
arg.section = section;
|
705
|
+
arg.colIndex = headerColumn;
|
706
|
+
|
707
|
+
let colCount = section.getColumnCount();
|
708
|
+
for (let c = 0; c < colCount; c++) {
|
709
|
+
if(this._getColumnOption(c, "isCheckboxColumn")) {
|
710
|
+
arg.checkboxColumnIndex = c;
|
711
|
+
break;
|
712
|
+
}
|
713
|
+
}
|
714
|
+
let cssField = this._cssField;
|
715
|
+
let rowPainter = this._rowPainter;
|
716
|
+
let parentRows = {};
|
717
|
+
for (let r = fi; r <= li; r++) {
|
718
|
+
let cell = section.getCell(headerColumn, r, false); // Work only one row
|
719
|
+
if (!cell) { // There may be no header to be updated
|
720
|
+
continue;
|
721
|
+
}
|
722
|
+
|
723
|
+
arg.cell = cell;
|
724
|
+
arg.rowIndex = r;
|
725
|
+
arg.rowData = this._getRow(dv, r); // Support composite and rt-grid
|
726
|
+
arg.spanning = null;
|
727
|
+
arg.content = null;
|
728
|
+
let rowId = arg.rowId = dv.getRowId(r); // Slow
|
729
|
+
// TODO: Getting segment once for better performance
|
730
|
+
let segmentSeparator = arg.segmentSeparator = dv.isSegmentSeparator(rowId);
|
731
|
+
arg.collapsedSegment = arg.collapsed = segmentSeparator ? dv.isSegmentCollapsed(rowId) : false;
|
732
|
+
|
733
|
+
if (segmentSeparator) {
|
734
|
+
arg.groupLevel = dv.getSegmentLevel ? dv.getSegmentLevel(rowId) : 1;
|
735
|
+
arg.indentSize = this._getIndentSize(arg.groupLevel - 1, true); // Group level starts from 1
|
736
|
+
if(dv.getSegment) {
|
737
|
+
let segment = dv.getSegment(rowId);
|
738
|
+
if(segment && arg.groupLevel > 1) { // Sub segment always has name
|
739
|
+
arg.content = segment.getSubSegmentName();
|
740
|
+
}
|
741
|
+
}
|
742
|
+
|
743
|
+
let spanning = arg.rowData[this._rowSpanningField];
|
744
|
+
if(spanning != null) {
|
745
|
+
arg.spanning = !!spanning;
|
746
|
+
}
|
747
|
+
|
748
|
+
if (this._predefinedColors) {
|
749
|
+
arg.colorTagClass = arg.rowData[cssField];
|
750
|
+
}
|
751
|
+
rowPainter.applyHeaderStyle(arg);
|
752
|
+
this._dispatch("segmentSeparatorBinding", arg);
|
753
|
+
} else {
|
754
|
+
arg.groupLevel = 0;
|
755
|
+
let indentLevel = 0;
|
756
|
+
let parentId = dv.getSegmentParentRowId(rowId);
|
757
|
+
if(parentId) {
|
758
|
+
let parentSegment = dv.getSegment(parentId);
|
759
|
+
indentLevel = parentSegment ? parentSegment.getSegmentLevel() + 1 : 1;
|
760
|
+
arg.nonGroupRow = false;
|
761
|
+
let parentRowData = parentRows[parentId];
|
762
|
+
if (!parentRowData) {
|
763
|
+
parentRowData = parentRows[parentId] = this._rowGetter(dt.getRowData(parentId)); // We need to use Datable because parent row may be hidden
|
764
|
+
}
|
765
|
+
arg.colorTagClass = parentRowData[cssField];
|
766
|
+
} else {
|
767
|
+
arg.colorTagClass = null;
|
768
|
+
arg.nonGroupRow = true;
|
769
|
+
}
|
770
|
+
arg.indentSize = this._getIndentSize(indentLevel, false);
|
771
|
+
rowPainter.removeHeaderStyle(arg.section, arg.colIndex, r);
|
772
|
+
rowPainter.applyRowStyle(arg);
|
773
|
+
this._dispatch("nonSegmentSeparatorBinding", arg);
|
774
|
+
}
|
775
|
+
}
|
776
|
+
};
|
777
|
+
|
778
|
+
/** @private
|
779
|
+
* @param {number} indentLevel
|
780
|
+
* @param {boolean} groupRow
|
781
|
+
* @return {number}
|
782
|
+
*/
|
783
|
+
RowSegmentingPlugin.prototype._getIndentSize = function (indentLevel, groupRow) {
|
784
|
+
let indentSize = 0;
|
785
|
+
if(this._indentSizes) {
|
786
|
+
indentSize = this._indentSizes[0];
|
787
|
+
if(indentLevel > 0) {
|
788
|
+
let indentLimit = this._indentSizes.length;
|
789
|
+
indentSize = indentLevel < indentLimit ? this._indentSizes[indentLevel] : this._indentSizes[indentLimit - 1];
|
790
|
+
}
|
791
|
+
} else if(indentLevel > 0) {
|
792
|
+
indentSize = 8 + indentLevel * 4; // 8 is default cell padding
|
793
|
+
if(!groupRow) {
|
794
|
+
indentSize += this._arrowSize;
|
795
|
+
}
|
796
|
+
}
|
797
|
+
return indentSize;
|
798
|
+
};
|
799
|
+
/** @private
|
800
|
+
* @param {MouseEvent} e
|
801
|
+
*/
|
802
|
+
RowSegmentingPlugin.prototype._onArrowClick = function (e) {
|
803
|
+
let host = this._hosts[0];
|
804
|
+
let info = host.getRelativePosition(e);
|
805
|
+
let cellElem = info.cell ? info.cell.getElement() : null;
|
806
|
+
if(!cellElem) {
|
807
|
+
return;
|
808
|
+
}
|
809
|
+
|
810
|
+
let rowIndex = info.rowIndex;
|
811
|
+
let collapsedSegment = this.isSegmentCollapsed(rowIndex); // current state
|
812
|
+
collapsedSegment = !collapsedSegment; // Toggle state
|
813
|
+
|
814
|
+
if (collapsedSegment) {
|
815
|
+
cellElem.classList.add("closed");
|
816
|
+
this.collapseSegment(rowIndex);
|
817
|
+
} else {
|
818
|
+
cellElem.classList.remove("closed");
|
819
|
+
this.expandSegment(rowIndex);
|
820
|
+
}
|
821
|
+
info.collapsedSegment = collapsedSegment;
|
822
|
+
this._dispatch("clicked", info);
|
823
|
+
};
|
824
|
+
|
825
|
+
/** @private
|
826
|
+
* @return {Object} DataView instance
|
827
|
+
*/
|
828
|
+
RowSegmentingPlugin.prototype._getDataView = function () {
|
829
|
+
let host = this._hosts[0];
|
830
|
+
return host ? host.getDataSource() : null;
|
831
|
+
};
|
832
|
+
|
833
|
+
/** Set specified row ids as a segment separator
|
834
|
+
* @public
|
835
|
+
* @param {Array<string>} rowIds
|
836
|
+
* @param {boolean=} enabled
|
837
|
+
* @return {boolean} Return true if there is any change
|
838
|
+
*/
|
839
|
+
RowSegmentingPlugin.prototype.setSegmentSeparators = function(rowIds, enabled) {
|
840
|
+
let dv = this._getDataView();
|
841
|
+
if(dv) {
|
842
|
+
return dv.setSegmentSeparators(rowIds, enabled);
|
843
|
+
}
|
844
|
+
return false;
|
845
|
+
};
|
846
|
+
|
847
|
+
/** Set specified row as a segment separator
|
848
|
+
* @public
|
849
|
+
* @param {string|number} rowRef Row id or row index
|
850
|
+
* @param {*=} options The segment will be created and initialized according to the given option. If the value is false, the specified segment is removed.
|
851
|
+
* @return {boolean} Return true if there is any change
|
852
|
+
*/
|
853
|
+
RowSegmentingPlugin.prototype.setSegmentSeparator = function(rowRef, options) {
|
854
|
+
let dv = this._getDataView();
|
855
|
+
if(dv) {
|
856
|
+
if(options) {
|
857
|
+
dv.setSegmentSeparator(rowRef, true);
|
858
|
+
|
859
|
+
if(Array.isArray(options.children)) {
|
860
|
+
dv.addSegmentChildren(rowRef, options.children);
|
861
|
+
}
|
862
|
+
if(options.collapsed != null) {
|
863
|
+
dv.collapseSegment(rowRef, options.collapsed);
|
864
|
+
}
|
865
|
+
} else {
|
866
|
+
return dv.setSegmentSeparator(rowRef, options == null);
|
867
|
+
}
|
868
|
+
}
|
869
|
+
return false;
|
870
|
+
};
|
871
|
+
/** Set classification for the specified segment
|
872
|
+
* @public
|
873
|
+
* @param {string|number} rowRef Row id or row index
|
874
|
+
* @param {string|Array.<string>} fields
|
875
|
+
* @return {boolean}
|
876
|
+
*/
|
877
|
+
RowSegmentingPlugin.prototype.setSegmentClassification = function(rowRef, fields) {
|
878
|
+
let dv = this._getDataView();
|
879
|
+
if(dv) {
|
880
|
+
return dv.setSegmentClassification(rowRef, fields);
|
881
|
+
}
|
882
|
+
return false;
|
883
|
+
};
|
884
|
+
/** Clear all segment separator rows
|
885
|
+
* @public
|
886
|
+
* @return {boolean} Return true if there is any change
|
887
|
+
*/
|
888
|
+
RowSegmentingPlugin.prototype.unsetAllSegmentSeparators = function() {
|
889
|
+
let dv = this._getDataView();
|
890
|
+
if(dv) {
|
891
|
+
return dv.unsetAllSegmentSeparators();
|
892
|
+
}
|
893
|
+
return false;
|
894
|
+
};
|
895
|
+
/** Check if there is at least one segment separator in the data view
|
896
|
+
* @public
|
897
|
+
* @return {boolean}
|
898
|
+
*/
|
899
|
+
RowSegmentingPlugin.prototype.hasSegmentation = function() {
|
900
|
+
let dv = this._getDataView();
|
901
|
+
if(dv) {
|
902
|
+
return dv.hasSegmentation();
|
903
|
+
}
|
904
|
+
return false;
|
905
|
+
};
|
906
|
+
/** Check if the specified row is a segment separator
|
907
|
+
* @public
|
908
|
+
* @param {string|number} rowRef Row id or row index (not recommended for usage)
|
909
|
+
* @return {boolean}
|
910
|
+
*/
|
911
|
+
RowSegmentingPlugin.prototype.isSegmentSeparator = function(rowRef) {
|
912
|
+
let dv = this._getDataView();
|
913
|
+
if(dv) {
|
914
|
+
let rowId = "";
|
915
|
+
if(typeof rowRef === "number") {
|
916
|
+
rowId = dv.getRowId(rowRef); // WARNING: This is very slow
|
917
|
+
} else {
|
918
|
+
rowId = rowRef;
|
919
|
+
}
|
920
|
+
|
921
|
+
return dv.isSegmentSeparator(rowId);
|
922
|
+
}
|
923
|
+
return false;
|
924
|
+
};
|
925
|
+
|
926
|
+
/**
|
927
|
+
* @public
|
928
|
+
* @param {Array.<string >} rowIds
|
929
|
+
* @param {Array.<string >} collapsed
|
930
|
+
|
931
|
+
* @return {boolean} Return true if there is any change
|
932
|
+
*/
|
933
|
+
RowSegmentingPlugin.prototype.collapseSegments = function(rowIds, collapsed) {
|
934
|
+
let dv = this._getDataView();
|
935
|
+
if(dv) {
|
936
|
+
return dv.collapseSegments(rowIds, collapsed);
|
937
|
+
}
|
938
|
+
return false;
|
939
|
+
};
|
940
|
+
|
941
|
+
/** Hide all members in the segment
|
942
|
+
* @public
|
943
|
+
* @param {string|number} rowRef Row id or row index of the segment separator
|
944
|
+
* @param {boolean=} collapsed
|
945
|
+
* @return {boolean} Return true if there is any change
|
946
|
+
*/
|
947
|
+
RowSegmentingPlugin.prototype.collapseSegment = function(rowRef, collapsed) {
|
948
|
+
let dv = this._getDataView();
|
949
|
+
if(dv) {
|
950
|
+
return dv.collapseSegment(rowRef, collapsed);
|
951
|
+
}
|
952
|
+
return false;
|
953
|
+
};
|
954
|
+
/** @public
|
955
|
+
* @param {string|number} rowRef Row id or row index
|
956
|
+
* @param {boolean=} expanded
|
957
|
+
* @return {boolean} Return true if there is any change
|
958
|
+
*/
|
959
|
+
RowSegmentingPlugin.prototype.expandSegment = function(rowRef, expanded) {
|
960
|
+
let dv = this._getDataView();
|
961
|
+
if(dv) {
|
962
|
+
return dv.expandSegment(rowRef, expanded);
|
963
|
+
}
|
964
|
+
return false;
|
965
|
+
};
|
966
|
+
/** @public
|
967
|
+
* @return {boolean} Return true if there is any change
|
968
|
+
*/
|
969
|
+
RowSegmentingPlugin.prototype.expandAllSegments = function() {
|
970
|
+
let dv = this._getDataView();
|
971
|
+
if(dv) {
|
972
|
+
return dv.expandAllSegments();
|
973
|
+
}
|
974
|
+
return false;
|
975
|
+
};
|
976
|
+
/** @public
|
977
|
+
* @param {string|number} rowRef Row id or row index
|
978
|
+
* @return {boolean} Return true if only the given row is a collapsed segment separator
|
979
|
+
*/
|
980
|
+
RowSegmentingPlugin.prototype.isSegmentCollapsed = function(rowRef) {
|
981
|
+
let dv = this._getDataView();
|
982
|
+
if(dv) {
|
983
|
+
return dv.isSegmentCollapsed(rowRef);
|
984
|
+
}
|
985
|
+
return false;
|
986
|
+
};
|
987
|
+
/** @public
|
988
|
+
* @param {Function} func By default, all row members are hidden in a collapsed segment
|
989
|
+
*/
|
990
|
+
RowSegmentingPlugin.prototype.setSegmentCollapsingLogic = function(func) {
|
991
|
+
let dv = this._getDataView();
|
992
|
+
if(dv) {
|
993
|
+
dv.setSegmentCollapsingLogic(func);
|
994
|
+
}
|
995
|
+
};
|
996
|
+
|
997
|
+
/** Remove existing segment children and fill the segments with all contnet rows before the next segment separator
|
998
|
+
* @public
|
999
|
+
* @param {string|number} segmentRef Row id or row index
|
1000
|
+
*/
|
1001
|
+
RowSegmentingPlugin.prototype.fillSegment = function(segmentRef) {
|
1002
|
+
let dv = this._getDataView();
|
1003
|
+
if(dv) {
|
1004
|
+
dv.fillSegment(segmentRef);
|
1005
|
+
}
|
1006
|
+
};
|
1007
|
+
/** Remove all existing segment children in each segment and fill the segments with all contnet rows before the next segment separator
|
1008
|
+
* @public
|
1009
|
+
*/
|
1010
|
+
RowSegmentingPlugin.prototype.fillSegments = function() {
|
1011
|
+
let dv = this._getDataView();
|
1012
|
+
if(dv) {
|
1013
|
+
dv.fillSegments();
|
1014
|
+
}
|
1015
|
+
};
|
1016
|
+
/** @public
|
1017
|
+
* @param {string|number} segmentRef Row id or row index
|
1018
|
+
* @param {string|number} rowRef Row id, row index
|
1019
|
+
*/
|
1020
|
+
RowSegmentingPlugin.prototype.addSegmentChild = function(segmentRef, rowRef) {
|
1021
|
+
let dv = this._getDataView();
|
1022
|
+
if(dv) {
|
1023
|
+
let dataId;
|
1024
|
+
if(this._realTimeGrid) {
|
1025
|
+
let rowDef = this._realTimeGrid.getRowDefinition(rowRef);
|
1026
|
+
if(rowDef) {
|
1027
|
+
dataId = rowDef.getDataId();
|
1028
|
+
}
|
1029
|
+
}
|
1030
|
+
dv.addSegmentChild(segmentRef, rowRef, dataId);
|
1031
|
+
}
|
1032
|
+
};
|
1033
|
+
|
1034
|
+
/** @public
|
1035
|
+
* @param {Array<Object>} segmentArr Segment array that contain "segmentId", "rowIds" to set segment children
|
1036
|
+
*/
|
1037
|
+
RowSegmentingPlugin.prototype.setSegmentChildren = function(segmentArr) {
|
1038
|
+
let dv = this._getDataView();
|
1039
|
+
if(dv) {
|
1040
|
+
dv.setSegmentChildren(segmentArr);
|
1041
|
+
}
|
1042
|
+
};
|
1043
|
+
|
1044
|
+
/** @public
|
1045
|
+
* @param {string|number} segmentRef Row id or row index
|
1046
|
+
* @param {Array.<string|number>} rowRefs Array of row ids or row indices. If null is given, no child will be removed.
|
1047
|
+
*/
|
1048
|
+
RowSegmentingPlugin.prototype.addSegmentChildren = function(segmentRef, rowRefs) {
|
1049
|
+
let dv = this._getDataView();
|
1050
|
+
if(dv) {
|
1051
|
+
let dataIds;
|
1052
|
+
if(this._realTimeGrid) {
|
1053
|
+
rowRefs = Array.isArray(rowRefs) ? rowRefs : [rowRefs];
|
1054
|
+
let len = rowRefs.length;
|
1055
|
+
dataIds = new Array(len);
|
1056
|
+
for(let i = 0; i < len; i++) {
|
1057
|
+
let rowDef = this._realTimeGrid.getRowDefinition(rowRefs[i]);
|
1058
|
+
if(rowDef) {
|
1059
|
+
dataIds[i] = rowDef.getDataId();
|
1060
|
+
}
|
1061
|
+
}
|
1062
|
+
}
|
1063
|
+
dv.addSegmentChildren(segmentRef, rowRefs, dataIds);
|
1064
|
+
}
|
1065
|
+
};
|
1066
|
+
/** @public
|
1067
|
+
* @param {string|number} segmentRef Row id or row index
|
1068
|
+
* @param {string|number} rowRef Row id, row index
|
1069
|
+
*/
|
1070
|
+
RowSegmentingPlugin.prototype.removeSegmentChild = function(segmentRef, rowRef) {
|
1071
|
+
let dv = this._getDataView();
|
1072
|
+
if(dv) {
|
1073
|
+
dv.removeSegmentChild(segmentRef, rowRef);
|
1074
|
+
}
|
1075
|
+
};
|
1076
|
+
/** @public
|
1077
|
+
* @param {string|number} segmentRef Row id or row index
|
1078
|
+
* @param {Array.<string|number>} rowRefs Array of row ids or row indices
|
1079
|
+
*/
|
1080
|
+
RowSegmentingPlugin.prototype.removeSegmentChildren = function(segmentRef, rowRefs) {
|
1081
|
+
let dv = this._getDataView();
|
1082
|
+
if(dv) {
|
1083
|
+
dv.removeSegmentChildren(segmentRef, rowRefs);
|
1084
|
+
}
|
1085
|
+
};
|
1086
|
+
/** @public
|
1087
|
+
*/
|
1088
|
+
RowSegmentingPlugin.prototype.removeAllSegmentChildren = function() {
|
1089
|
+
let dv = this._getDataView();
|
1090
|
+
if(dv) {
|
1091
|
+
dv.removeAllSegmentChildren();
|
1092
|
+
}
|
1093
|
+
};
|
1094
|
+
/** Get row ids of all segment separator
|
1095
|
+
* @public
|
1096
|
+
* @return {Array.<string>} Return null if there is no segment separator
|
1097
|
+
*/
|
1098
|
+
RowSegmentingPlugin.prototype.getSegmentIds = function() {
|
1099
|
+
let dv = this._getDataView();
|
1100
|
+
if(dv) {
|
1101
|
+
return dv.getSegmentIds();
|
1102
|
+
}
|
1103
|
+
return null;
|
1104
|
+
};
|
1105
|
+
/** Get row ids of all children from the specified segment
|
1106
|
+
* @public
|
1107
|
+
* @param {string|number} segmentRef Row id or row index
|
1108
|
+
* @return {Array.<string>} Returns array of row ids. Returns null if there is no child or no segment separator found
|
1109
|
+
*/
|
1110
|
+
RowSegmentingPlugin.prototype.getSegmentChildIds = function(segmentRef) {
|
1111
|
+
let dv = this._getDataView();
|
1112
|
+
if(dv) {
|
1113
|
+
return dv.getSegmentChildIds(segmentRef);
|
1114
|
+
}
|
1115
|
+
return null;
|
1116
|
+
};
|
1117
|
+
|
1118
|
+
/** @public
|
1119
|
+
* @param {RowSegmentingPlugin~SortingLogic} sortFunction
|
1120
|
+
*/
|
1121
|
+
RowSegmentingPlugin.prototype.setSortingLogic = function (sortFunction) {
|
1122
|
+
this._userSortingLogic = (typeof sortFunction === "function") ? sortFunction : null;
|
1123
|
+
};
|
1124
|
+
/** @public
|
1125
|
+
* @param {RowSegmentingPlugin~SortingLogic=} sortFunction
|
1126
|
+
*/
|
1127
|
+
RowSegmentingPlugin.prototype.sortSegments = function (sortFunction) {
|
1128
|
+
if(sortFunction != null) {
|
1129
|
+
this.setSortingLogic(sortFunction);
|
1130
|
+
}
|
1131
|
+
if (this._userSortingLogic) {
|
1132
|
+
let dv = this._getDataView();
|
1133
|
+
if (dv) {
|
1134
|
+
let sortingLogic = this._realTimeGrid ? this._rtSortingLogic : this._userSortingLogic;
|
1135
|
+
dv.sortSegments(sortingLogic);
|
1136
|
+
}
|
1137
|
+
}
|
1138
|
+
};
|
1139
|
+
/** @private
|
1140
|
+
* @param {Object} rowDataA
|
1141
|
+
* @param {Object} rowDataB
|
1142
|
+
* @return {number}
|
1143
|
+
*/
|
1144
|
+
RowSegmentingPlugin.prototype._rtSortingLogic = function (rowDataA, rowDataB) {
|
1145
|
+
return this._userSortingLogic(
|
1146
|
+
rowDefRowGetter(rowDataA),
|
1147
|
+
rowDefRowGetter(rowDataB)
|
1148
|
+
);
|
1149
|
+
};
|
1150
|
+
|
1151
|
+
/** @public
|
1152
|
+
* @param {Object} predefinedColors Predefined color object map
|
1153
|
+
*/
|
1154
|
+
RowSegmentingPlugin.prototype.setPredefinedColors = function(predefinedColors) {
|
1155
|
+
if(predefinedColors != null && typeof predefinedColors === "object") {
|
1156
|
+
this._predefinedColors = predefinedColors;
|
1157
|
+
this._injectStyles(predefinedColors);
|
1158
|
+
}
|
1159
|
+
};
|
1160
|
+
|
1161
|
+
/** @public
|
1162
|
+
* @param {number|string} rowRef rowIndex or rowId
|
1163
|
+
* @param {boolean|null} spanning if set true when rowRef is row separator, then span that row
|
1164
|
+
*/
|
1165
|
+
RowSegmentingPlugin.prototype.spanSegmentSeparator = function(rowRef, spanning) {
|
1166
|
+
let dv = this._getDataView();
|
1167
|
+
if(!dv) { return; }
|
1168
|
+
|
1169
|
+
if(typeof rowRef === "string") {
|
1170
|
+
rowRef = dv.getRowIndex(rowRef);
|
1171
|
+
}
|
1172
|
+
|
1173
|
+
if(rowRef == null || rowRef < 0) { return; }
|
1174
|
+
|
1175
|
+
this._setStaticData(dv, rowRef, this._rowSpanningField, spanning);
|
1176
|
+
|
1177
|
+
};
|
1178
|
+
|
1179
|
+
|
1180
|
+
|
1181
|
+
export default RowSegmentingPlugin;
|
1182
|
+
export { RowSegmentingPlugin, RowSegmentingPlugin as RowSegmenting, RowSegmentingPlugin as RowSegmentingExtension };
|