@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,1001 @@
|
|
1
|
+
import Ext from "../../../tr-grid-util/es6/Ext.js";
|
2
|
+
import EventDispatcher from "../../../tr-grid-util/es6/EventDispatcher.js";
|
3
|
+
|
4
|
+
/** @constructor
|
5
|
+
* @extends {EventDispatcher}
|
6
|
+
* @param {string} rid
|
7
|
+
* @param {!Object} sharedObj
|
8
|
+
*/
|
9
|
+
let Segment = function(rid, sharedObj) {
|
10
|
+
this._rid = rid;
|
11
|
+
this._childIds = [];
|
12
|
+
this._shared = sharedObj;
|
13
|
+
if(sharedObj.defaultCollapsing) {
|
14
|
+
this._collapsed = true;
|
15
|
+
}
|
16
|
+
};
|
17
|
+
Ext.inherits(Segment, EventDispatcher);
|
18
|
+
|
19
|
+
/** @public
|
20
|
+
* @type {string}
|
21
|
+
* @constant
|
22
|
+
*/
|
23
|
+
const UNCATEGORY = "Uncategorized";
|
24
|
+
|
25
|
+
/** @private
|
26
|
+
* @function
|
27
|
+
* @param {string} a
|
28
|
+
* @param {string} b
|
29
|
+
* @return {number}
|
30
|
+
*/
|
31
|
+
Segment._subSegSortLogic = function(a, b) {
|
32
|
+
if(a === UNCATEGORY) {
|
33
|
+
return 1;
|
34
|
+
}
|
35
|
+
if(b === UNCATEGORY) {
|
36
|
+
return -1;
|
37
|
+
}
|
38
|
+
|
39
|
+
if(a < b) {
|
40
|
+
return -1;
|
41
|
+
}
|
42
|
+
if(b < a) {
|
43
|
+
return 1;
|
44
|
+
}
|
45
|
+
|
46
|
+
return 0;
|
47
|
+
};
|
48
|
+
|
49
|
+
/** @type {Object}
|
50
|
+
* @private
|
51
|
+
*/
|
52
|
+
Segment.prototype._shared = null;
|
53
|
+
|
54
|
+
/** @type {string}
|
55
|
+
* @private
|
56
|
+
*/
|
57
|
+
Segment.prototype._rid;
|
58
|
+
/** @type {!Array.<string>}
|
59
|
+
* @private
|
60
|
+
*/
|
61
|
+
Segment.prototype._childIds;
|
62
|
+
/** @type {Object}
|
63
|
+
* @private
|
64
|
+
*/
|
65
|
+
Segment.prototype._childDataIds = null;
|
66
|
+
/** @type {boolean}
|
67
|
+
* @private
|
68
|
+
*/
|
69
|
+
Segment.prototype._collapsed = false;
|
70
|
+
/** @type {number}
|
71
|
+
* @private
|
72
|
+
*/
|
73
|
+
Segment.prototype._order = 0;
|
74
|
+
/** @type {number}
|
75
|
+
* @private
|
76
|
+
*/
|
77
|
+
Segment.prototype._offsetOrder = 0;
|
78
|
+
/** @type {number}
|
79
|
+
* @private
|
80
|
+
*/
|
81
|
+
Segment.prototype._depth = 0;
|
82
|
+
/** @type {boolean}
|
83
|
+
* @private
|
84
|
+
*/
|
85
|
+
Segment.prototype._disposed = false;
|
86
|
+
|
87
|
+
/** @type {Object}
|
88
|
+
* @private
|
89
|
+
*/
|
90
|
+
Segment.prototype._subSegDef = null;
|
91
|
+
/** @type {boolean}
|
92
|
+
* @private
|
93
|
+
*/
|
94
|
+
Segment.prototype._subSegment = false; // This indicates that the segment is autogenerated (subsegment)
|
95
|
+
/** @type {Object.<string, Segment>}
|
96
|
+
* @private
|
97
|
+
*/
|
98
|
+
Segment.prototype._subSegMap = null; // For immediate sub-segment children
|
99
|
+
/** @type {Array.<string>}
|
100
|
+
* @private
|
101
|
+
*/
|
102
|
+
Segment.prototype._subSegNames = null; // For immediate sub-segment child names/ids
|
103
|
+
/** @type {string}
|
104
|
+
* @private
|
105
|
+
*/
|
106
|
+
Segment.prototype._subSegName = "";
|
107
|
+
/** @type {*}
|
108
|
+
* @private
|
109
|
+
*/
|
110
|
+
Segment.prototype._subSegVal;
|
111
|
+
|
112
|
+
|
113
|
+
/** @public
|
114
|
+
*/
|
115
|
+
Segment.prototype.dispose = function() {
|
116
|
+
if(this._disposed) {
|
117
|
+
return;
|
118
|
+
}
|
119
|
+
this._disposed = true;
|
120
|
+
|
121
|
+
this.removeAllEventListeners();
|
122
|
+
let segmentNames = this._subSegNames;
|
123
|
+
if(segmentNames) {
|
124
|
+
let segmentCount = segmentNames.length;
|
125
|
+
let segmentMap = this._subSegMap;
|
126
|
+
for(let i = 0; i < segmentCount; ++i) {
|
127
|
+
segmentMap[segmentNames[i]].dispose();
|
128
|
+
}
|
129
|
+
this._subSegMap = this._subSegNames = null;
|
130
|
+
}
|
131
|
+
if(this._collapsed) {
|
132
|
+
this.markCollapsingStateDirty();
|
133
|
+
}
|
134
|
+
|
135
|
+
this._childDataIds = null;
|
136
|
+
this._childIds.length = 0;
|
137
|
+
this._shared = null;
|
138
|
+
this._subSegDef = this._subSegVal = null;
|
139
|
+
};
|
140
|
+
/** @public
|
141
|
+
* @return {string}
|
142
|
+
*/
|
143
|
+
Segment.prototype.getId = function() {
|
144
|
+
return this._rid;
|
145
|
+
};
|
146
|
+
/** @public
|
147
|
+
* @return {string}
|
148
|
+
*/
|
149
|
+
Segment.prototype.getParentId = function() {
|
150
|
+
return this._shared.childToSegment[this._rid] || "";
|
151
|
+
};
|
152
|
+
/** @public
|
153
|
+
* @return {Segment}
|
154
|
+
*/
|
155
|
+
Segment.prototype.getParent = function() {
|
156
|
+
let parentId = this.getParentId();
|
157
|
+
if(parentId) {
|
158
|
+
return this._shared.segments[parentId] || null;
|
159
|
+
}
|
160
|
+
return null;
|
161
|
+
};
|
162
|
+
/** @public
|
163
|
+
* @param {Array.<string>=} out_ary
|
164
|
+
* @return {Array.<string>}
|
165
|
+
*/
|
166
|
+
Segment.prototype.getSubSegmentIds = function(out_ary) {
|
167
|
+
let segmentNames = this._subSegNames;
|
168
|
+
if(segmentNames) {
|
169
|
+
if(!out_ary) {
|
170
|
+
out_ary = [];
|
171
|
+
}
|
172
|
+
let segmentCount = segmentNames.length;
|
173
|
+
let segmentMap = this._subSegMap;
|
174
|
+
for(let i = 0; i < segmentCount; ++i) {
|
175
|
+
let segmentName = segmentNames[i];
|
176
|
+
let segment = segmentMap[segmentName];
|
177
|
+
out_ary.push(segment.getId());
|
178
|
+
segment.getSubSegmentIds(out_ary);
|
179
|
+
}
|
180
|
+
|
181
|
+
return out_ary;
|
182
|
+
}
|
183
|
+
return null;
|
184
|
+
};
|
185
|
+
/** @public
|
186
|
+
* @param {string} rid
|
187
|
+
* @param {string=} dataId Row id for retrieving data
|
188
|
+
* @return {boolean} Returns true only a new child is added
|
189
|
+
*/
|
190
|
+
Segment.prototype.addChild = function(rid, dataId) {
|
191
|
+
if(!rid) {
|
192
|
+
return false;
|
193
|
+
}
|
194
|
+
let prevSegmentId = this._shared.childToSegment[rid];
|
195
|
+
if(prevSegmentId) {
|
196
|
+
if(prevSegmentId !== this._rid) {
|
197
|
+
let prevSegment = this._shared.segments[prevSegmentId];
|
198
|
+
if(prevSegment && !prevSegment.hasSubSegments()) { // Children of a classified segment always stick the root segment
|
199
|
+
prevSegment.removeChild(rid);
|
200
|
+
}
|
201
|
+
this._shared.childToSegment[rid] = this._rid;
|
202
|
+
}
|
203
|
+
} else {
|
204
|
+
this._shared.childToSegment[rid] = this._rid;
|
205
|
+
}
|
206
|
+
|
207
|
+
if(dataId != null) { // Update data id
|
208
|
+
if(dataId && dataId !== rid) {
|
209
|
+
if(!this._childDataIds) {
|
210
|
+
this._childDataIds = {};
|
211
|
+
}
|
212
|
+
this._childDataIds[rid] = dataId;
|
213
|
+
} else if(this._childDataIds) {
|
214
|
+
delete this._childDataIds[rid];
|
215
|
+
}
|
216
|
+
}
|
217
|
+
|
218
|
+
let at = this._childIds.indexOf(rid);
|
219
|
+
if(at < 0) {
|
220
|
+
if(this._collapsed) {
|
221
|
+
this._shared.dirtyCollapsingState = true; // TODO: Check if we need to update this only when new child is added
|
222
|
+
}
|
223
|
+
this._childIds.push(rid);
|
224
|
+
return true;
|
225
|
+
}
|
226
|
+
return false;
|
227
|
+
};
|
228
|
+
/** @public
|
229
|
+
* @param {Array.<string>} rids
|
230
|
+
* @param {Array.<string>=} dataIds Row ids for retrieving data
|
231
|
+
* @return {boolean}
|
232
|
+
*/
|
233
|
+
Segment.prototype.addChildren = function(rids, dataIds) {
|
234
|
+
if(!rids) {
|
235
|
+
return false;
|
236
|
+
}
|
237
|
+
let rowIds = Array.isArray(rids) ? rids : [rids];
|
238
|
+
let rowCount = rowIds.length;
|
239
|
+
if(!rowCount) {
|
240
|
+
return false;
|
241
|
+
}
|
242
|
+
|
243
|
+
let dirty = 0;
|
244
|
+
let i;
|
245
|
+
if(dataIds != null) {
|
246
|
+
dataIds = Array.isArray(dataIds) ? dataIds : [dataIds];
|
247
|
+
for(i = 0; i < rowCount; ++i) {
|
248
|
+
dirty |= this.addChild(rowIds[i], dataIds[i]);
|
249
|
+
}
|
250
|
+
} else {
|
251
|
+
for(i = 0; i < rowCount; ++i) {
|
252
|
+
dirty |= this.addChild(rowIds[i]);
|
253
|
+
}
|
254
|
+
}
|
255
|
+
return dirty ? true : false;
|
256
|
+
};
|
257
|
+
/** @public
|
258
|
+
* @param {string} rid
|
259
|
+
* @return {boolean}
|
260
|
+
*/
|
261
|
+
Segment.prototype.containsChild = function(rid) {
|
262
|
+
return this._childIds.indexOf(rid) >= 0;
|
263
|
+
};
|
264
|
+
/** @public
|
265
|
+
* @param {string} rid
|
266
|
+
* @return {number}
|
267
|
+
*/
|
268
|
+
Segment.prototype.getChildIndex = function(rid) {
|
269
|
+
return this._childIds.indexOf(rid);
|
270
|
+
};
|
271
|
+
/** @public
|
272
|
+
* @param {string} rid
|
273
|
+
* @return {boolean}
|
274
|
+
*/
|
275
|
+
Segment.prototype.removeChild = function(rid) {
|
276
|
+
if(this._subSegment) {
|
277
|
+
return false; // Sub segments are not allowed to remove its children
|
278
|
+
}
|
279
|
+
if(!this._childIds.length) {
|
280
|
+
return false;
|
281
|
+
}
|
282
|
+
let at = this._childIds.indexOf(rid);
|
283
|
+
if(at < 0) {
|
284
|
+
return false; // The specified rid is not a child of this segment
|
285
|
+
}
|
286
|
+
|
287
|
+
if(this._shared.childToSegment[rid] === this._rid) {
|
288
|
+
delete this._shared.childToSegment[rid];
|
289
|
+
}
|
290
|
+
this._childIds.splice(at, 1); // Slow
|
291
|
+
|
292
|
+
if(this._collapsed) {
|
293
|
+
this._shared.dirtyCollapsingState = true;
|
294
|
+
}
|
295
|
+
return true;
|
296
|
+
};
|
297
|
+
/** @public
|
298
|
+
* @param {Array.<string>} rids
|
299
|
+
* @return {boolean}
|
300
|
+
*/
|
301
|
+
Segment.prototype.removeChildren = function(rids) {
|
302
|
+
if(this._subSegment) {
|
303
|
+
return false; // Sub segments are not allowed to remove its children
|
304
|
+
}
|
305
|
+
if(!this._childIds.length) {
|
306
|
+
return false;
|
307
|
+
}
|
308
|
+
let rowIds = Array.isArray(rids) ? rids : [rids];
|
309
|
+
let rowCount = rowIds.length;
|
310
|
+
let dirty = 0;
|
311
|
+
for(let i = 0; i < rowCount; ++i) {
|
312
|
+
dirty |= this.removeChild(rowIds[i]);
|
313
|
+
}
|
314
|
+
return dirty ? true : false;
|
315
|
+
};
|
316
|
+
/** @public
|
317
|
+
* @return {boolean}
|
318
|
+
*/
|
319
|
+
Segment.prototype.removeAllChildren = function() {
|
320
|
+
if(this._subSegment) {
|
321
|
+
return false; // Sub segments are not allowed to remove its children
|
322
|
+
}
|
323
|
+
let childCount = this._childIds.length;
|
324
|
+
if(!this._childIds.length) {
|
325
|
+
return false;
|
326
|
+
}
|
327
|
+
let segmentId = this._rid;
|
328
|
+
let objMap = this._shared.childToSegment;
|
329
|
+
let chdr = this._childIds;
|
330
|
+
for(let i = 0; i < childCount; ++i) {
|
331
|
+
let rid = chdr[i];
|
332
|
+
if(objMap[rid] === segmentId) {
|
333
|
+
delete objMap[rid];
|
334
|
+
}
|
335
|
+
}
|
336
|
+
this._childIds.length = 0;
|
337
|
+
this._childDataIds = null;
|
338
|
+
|
339
|
+
if(this._collapsed) {
|
340
|
+
this._shared.dirtyCollapsingState = true;
|
341
|
+
}
|
342
|
+
return true;
|
343
|
+
};
|
344
|
+
/** @public
|
345
|
+
* @return {!Array.<string>}
|
346
|
+
*/
|
347
|
+
Segment.prototype.getChildIds = function() {
|
348
|
+
return this._childIds; // WARNING: Returns private members
|
349
|
+
};
|
350
|
+
/** @public
|
351
|
+
* @return {!Object}
|
352
|
+
*/
|
353
|
+
Segment.prototype.getChildren = function() {
|
354
|
+
let obj = {};
|
355
|
+
let chdr = this._childIds;
|
356
|
+
let childCount = chdr.length;
|
357
|
+
let dataIds = this._childDataIds || {};
|
358
|
+
for(let i = 0; i < childCount; ++i) {
|
359
|
+
let rid = chdr[i];
|
360
|
+
obj[rid] = dataIds[rid] || rid;
|
361
|
+
}
|
362
|
+
return obj;
|
363
|
+
};
|
364
|
+
/** @public
|
365
|
+
* @return {number}
|
366
|
+
*/
|
367
|
+
Segment.prototype.getChildCount = function() {
|
368
|
+
return this._childIds.length;
|
369
|
+
};
|
370
|
+
/** When a segment is not empty, the visibility of its content need to be updated.
|
371
|
+
* @public
|
372
|
+
*/
|
373
|
+
Segment.prototype.markCollapsingStateDirty = function() {
|
374
|
+
// A segment can have a child and/or autogenerated segment (subsegment) to not be considered as empty.
|
375
|
+
if(this._childIds.length || this._subSegDef) {
|
376
|
+
this._shared.dirtyCollapsingState = true;
|
377
|
+
}
|
378
|
+
};
|
379
|
+
|
380
|
+
|
381
|
+
/** @public
|
382
|
+
* @return {Array.<string>}
|
383
|
+
*/
|
384
|
+
Segment.prototype.getClassification = function() {
|
385
|
+
if(this._subSegDef) {
|
386
|
+
return this._subSegDef.classifiers || null;
|
387
|
+
}
|
388
|
+
return null;
|
389
|
+
};
|
390
|
+
/** @public
|
391
|
+
* @param {string|Array.<string>} fields
|
392
|
+
* @return {boolean}
|
393
|
+
*/
|
394
|
+
Segment.prototype.setClassification = function(fields) {
|
395
|
+
if(this._subSegment) {
|
396
|
+
return false; // subsegment cannot be classified
|
397
|
+
}
|
398
|
+
let classifiers = null;
|
399
|
+
if(this._subSegDef) {
|
400
|
+
classifiers = this._subSegDef.classifiers;
|
401
|
+
}
|
402
|
+
|
403
|
+
let newClassifiers = null;
|
404
|
+
if(fields) {
|
405
|
+
if(typeof fields === "string") {
|
406
|
+
newClassifiers = [fields];
|
407
|
+
} else if(Array.isArray(fields)) {
|
408
|
+
newClassifiers = fields;
|
409
|
+
}
|
410
|
+
}
|
411
|
+
let i;
|
412
|
+
let fieldCount = newClassifiers ? newClassifiers.length : 0;
|
413
|
+
|
414
|
+
if(fieldCount) {
|
415
|
+
let curCount = classifiers ? classifiers.length : 0;
|
416
|
+
if(curCount === fieldCount) { // Check duplication
|
417
|
+
for(i = 0; i < fieldCount; ++i) {
|
418
|
+
if(newClassifiers[i] !== classifiers[i]) {
|
419
|
+
break;
|
420
|
+
}
|
421
|
+
}
|
422
|
+
if(i >= fieldCount) {
|
423
|
+
return false; // nothing has change
|
424
|
+
}
|
425
|
+
}
|
426
|
+
|
427
|
+
if(!this._subSegDef) {
|
428
|
+
this._subSegDef = {
|
429
|
+
root: this,
|
430
|
+
subSegments: null
|
431
|
+
};
|
432
|
+
}
|
433
|
+
|
434
|
+
this._subSegDef.classifiers = newClassifiers;
|
435
|
+
// this._subSegDef.classifierChanged = true;
|
436
|
+
return true;
|
437
|
+
} else if(classifiers) { // Remove existing ones
|
438
|
+
this._subSegDef.classifiers = null;
|
439
|
+
// this._subSegDef.classifierChanged = true;
|
440
|
+
this._subSegDef = null; // WARNING: All subsegments remain existing
|
441
|
+
return true;
|
442
|
+
}
|
443
|
+
return false;
|
444
|
+
};
|
445
|
+
/** @public
|
446
|
+
* @param {Object.<string, Object>=} rows Object maps between row id and its record
|
447
|
+
* @return {boolean}
|
448
|
+
*/
|
449
|
+
Segment.prototype.classify = function(rows) {
|
450
|
+
let classifiers = this._subSegDef ? this._subSegDef.classifiers : null;
|
451
|
+
let classifierCount = classifiers ? classifiers.length : 0;
|
452
|
+
|
453
|
+
let segmentNames = this._subSegNames;
|
454
|
+
let segmentCount = segmentNames ? segmentNames.length : 0;
|
455
|
+
|
456
|
+
if(!segmentCount) {
|
457
|
+
if(this._depth >= classifierCount) {
|
458
|
+
return false; // Current segment level is beyond existing classification level and this segment should already be removed
|
459
|
+
}
|
460
|
+
}
|
461
|
+
|
462
|
+
let sharedObj = this._shared;
|
463
|
+
if(this._collapsed) {
|
464
|
+
sharedObj.dirtyCollapsingState = true;
|
465
|
+
}
|
466
|
+
|
467
|
+
// Prepare existing subsegments for checking change in its members
|
468
|
+
let i;
|
469
|
+
let segmentName = "";
|
470
|
+
let nonExistenceGroups = {};
|
471
|
+
let removalCount = 0;
|
472
|
+
let segmentMap = this._subSegMap;
|
473
|
+
let segment = null;
|
474
|
+
if(segmentCount) {
|
475
|
+
removalCount = segmentCount;
|
476
|
+
for(i = 0; i < removalCount; ++i) {
|
477
|
+
segmentName = segmentNames[i];
|
478
|
+
nonExistenceGroups[segmentName] = 1;
|
479
|
+
|
480
|
+
segment = segmentMap[segmentName];
|
481
|
+
if(segment._childIds.length) { // Quick cleaning up
|
482
|
+
segment._childIds.length = 0;
|
483
|
+
}
|
484
|
+
if(segment._collapsed) {
|
485
|
+
sharedObj.dirtyCollapsingState = true;
|
486
|
+
}
|
487
|
+
}
|
488
|
+
}
|
489
|
+
|
490
|
+
// Loop through row children and assign them to their corresponding subsegment
|
491
|
+
let rootSegment = !this._subSegment;
|
492
|
+
let dataIds = this._childDataIds || {};
|
493
|
+
let rid;
|
494
|
+
let chdr = this._childIds;
|
495
|
+
let childCount = chdr.length;
|
496
|
+
if(this._depth < classifierCount && rows) {
|
497
|
+
if(!segmentMap) {
|
498
|
+
segmentMap = this._subSegMap = {};
|
499
|
+
segmentNames = this._subSegNames = [];
|
500
|
+
}
|
501
|
+
|
502
|
+
let classifier = classifiers[this._depth];
|
503
|
+
|
504
|
+
for(i = 0; i < childCount; ++i) {
|
505
|
+
rid = chdr[i];
|
506
|
+
let dataId = dataIds[rid] || rid;
|
507
|
+
let record = rows[dataId];
|
508
|
+
let val = record ? record[classifier] : null; // WARNING: row could already be removed
|
509
|
+
|
510
|
+
sharedObj.childToSegment[rid] = this._rid; // Relocate child in case of it has been moved to a non existence group
|
511
|
+
|
512
|
+
segmentName = UNCATEGORY;
|
513
|
+
if(val || val === 0 || val === false) { // Check for null, undefined, "", and NaN value
|
514
|
+
segmentName = val + "";
|
515
|
+
}
|
516
|
+
if(nonExistenceGroups[segmentName]) {
|
517
|
+
nonExistenceGroups[segmentName] = 0;
|
518
|
+
--removalCount;
|
519
|
+
}
|
520
|
+
|
521
|
+
segment = segmentMap[segmentName];
|
522
|
+
if(!segment) { // New group is detected
|
523
|
+
let subSegId = this._rid + "/" + segmentName;
|
524
|
+
segment = new Segment(subSegId, sharedObj);
|
525
|
+
segment._subSegDef = this._subSegDef;
|
526
|
+
segment._subSegment = true; // this indicates that the segment is autogenerated (subsegment)
|
527
|
+
segment._depth = this._depth + 1;
|
528
|
+
segment._subSegName = segmentName;
|
529
|
+
segment._subSegVal = val;
|
530
|
+
sharedObj.childToSegment[subSegId] = this._rid; // WARNING: this will mix autogenerated rows with actual rows
|
531
|
+
|
532
|
+
segmentMap[segmentName] = segment;
|
533
|
+
segmentNames.push(segmentName);
|
534
|
+
|
535
|
+
this._dispatch("subSegmentAdded", {
|
536
|
+
"rid": subSegId,
|
537
|
+
"segment": segment
|
538
|
+
});
|
539
|
+
}
|
540
|
+
|
541
|
+
segment.addChild(rid, dataId);
|
542
|
+
}
|
543
|
+
} else if(rootSegment) { // In case of no classification
|
544
|
+
for(i = 0; i < childCount; ++i) {
|
545
|
+
rid = chdr[i];
|
546
|
+
sharedObj.childToSegment[rid] = this._rid; // Relocate child in case of it has been moved to a non existence group
|
547
|
+
}
|
548
|
+
}
|
549
|
+
|
550
|
+
// Remove all subsegments with no members
|
551
|
+
if(removalCount > 0) {
|
552
|
+
if(removalCount >= segmentNames.length) {
|
553
|
+
segmentNames.length = 0;
|
554
|
+
}
|
555
|
+
for(segmentName in nonExistenceGroups) {
|
556
|
+
if(nonExistenceGroups[segmentName]) {
|
557
|
+
segment = segmentMap[segmentName];
|
558
|
+
delete segmentMap[segmentName];
|
559
|
+
// TODO: Slow
|
560
|
+
let at = segmentNames.indexOf(segmentName);
|
561
|
+
if(at >= 0) {
|
562
|
+
segmentNames.splice(at, 1);
|
563
|
+
}
|
564
|
+
|
565
|
+
this._dispatch("subSegmentRemoved", {
|
566
|
+
"rid": segment.getId(),
|
567
|
+
"segment": segment
|
568
|
+
});
|
569
|
+
|
570
|
+
// segment.dispose(); Already done by segment collection
|
571
|
+
}
|
572
|
+
}
|
573
|
+
if(!segmentNames.length) {
|
574
|
+
segmentNames = this._subSegMap = this._subSegNames = null;
|
575
|
+
}
|
576
|
+
}
|
577
|
+
|
578
|
+
// Sort and classify existing subsegments
|
579
|
+
segmentCount = segmentNames ? segmentNames.length : 0;
|
580
|
+
if(segmentCount) {
|
581
|
+
segmentNames.sort(Segment._subSegSortLogic);
|
582
|
+
for(i = 0; i < segmentCount; ++i) {
|
583
|
+
segment = segmentMap[segmentNames[i]];
|
584
|
+
segment.classify(rows);
|
585
|
+
}
|
586
|
+
}
|
587
|
+
|
588
|
+
return true;
|
589
|
+
};
|
590
|
+
/** SubSegment implies being classified
|
591
|
+
* @public
|
592
|
+
* @return {boolean}
|
593
|
+
*/
|
594
|
+
Segment.prototype.hasSubSegments = function() {
|
595
|
+
if(this._subSegNames) {
|
596
|
+
return this._subSegNames.length ? true : false;
|
597
|
+
}
|
598
|
+
return false;
|
599
|
+
};
|
600
|
+
/** SubSegment implies autogenerated segment
|
601
|
+
* @public
|
602
|
+
* @return {boolean}
|
603
|
+
*/
|
604
|
+
Segment.prototype.isSubSegment = function() {
|
605
|
+
return this._subSegment;
|
606
|
+
};
|
607
|
+
/** @public
|
608
|
+
* @return {boolean}
|
609
|
+
*/
|
610
|
+
Segment.prototype.isRootSegment = function() {
|
611
|
+
return this._shared.childToSegment[this._rid] ? false : true;
|
612
|
+
};
|
613
|
+
/** @public
|
614
|
+
* @return {Segment}
|
615
|
+
*/
|
616
|
+
Segment.prototype.getFirstAncestor = function() {
|
617
|
+
let ancestor = null;
|
618
|
+
if(this._subSegment && this._subSegDef) { // Quick way to get root
|
619
|
+
ancestor = this._subSegDef.root;
|
620
|
+
} else { // Slow
|
621
|
+
ancestor = this.getParent();
|
622
|
+
if(ancestor) {
|
623
|
+
let parentSeg = ancestor.getParent();
|
624
|
+
while(parentSeg) { // This could cause infinite loop
|
625
|
+
ancestor = parentSeg;
|
626
|
+
parentSeg = ancestor.getParent();
|
627
|
+
}
|
628
|
+
}
|
629
|
+
}
|
630
|
+
return ancestor || null;
|
631
|
+
};
|
632
|
+
/** @public
|
633
|
+
* @param {Array.<Segment>=} out_ary
|
634
|
+
* @return {Array.<Segment>}
|
635
|
+
*/
|
636
|
+
Segment.prototype.getAllSubSegments = function(out_ary) {
|
637
|
+
let segmentNames = this._subSegNames;
|
638
|
+
if(segmentNames) {
|
639
|
+
if(!out_ary) {
|
640
|
+
out_ary = [];
|
641
|
+
}
|
642
|
+
let segmentMap = this._subSegMap;
|
643
|
+
let segmentCount = segmentNames.length;
|
644
|
+
for(let i = 0; i < segmentCount; ++i) {
|
645
|
+
let segment = segmentMap[segmentNames[i]];
|
646
|
+
out_ary.push(segment);
|
647
|
+
segment.getAllSubSegments(out_ary);
|
648
|
+
}
|
649
|
+
}
|
650
|
+
return out_ary || null;
|
651
|
+
};
|
652
|
+
/** This method sets order, last order, and depth to entire tree structure in the segment, including the segment itself
|
653
|
+
* @public
|
654
|
+
* @param {number} counter
|
655
|
+
* @param {number} rootOrder
|
656
|
+
* @param {Object} ridMap Row id map that stores row order of the entire tree
|
657
|
+
* @return {number} Last order of the segment
|
658
|
+
*/
|
659
|
+
Segment.prototype.updateTreeStructure = function(counter, rootOrder, ridMap) {
|
660
|
+
if(!counter) {
|
661
|
+
counter = 0;
|
662
|
+
if(!this._subSegment) { // Subsegment's depth cannot be reset back to 0
|
663
|
+
this._depth = 0; // WARNING: this assumes counter at 0 is the root segment
|
664
|
+
}
|
665
|
+
}
|
666
|
+
if(!rootOrder) {
|
667
|
+
rootOrder = 0;
|
668
|
+
}
|
669
|
+
if(!ridMap) {
|
670
|
+
ridMap = {};
|
671
|
+
}
|
672
|
+
|
673
|
+
let i;
|
674
|
+
let segmentNames = this._subSegNames;
|
675
|
+
let subSegmentCount = segmentNames ? segmentNames.length : 0;
|
676
|
+
if(subSegmentCount) { // Classified segment
|
677
|
+
let segmentMap = this._subSegMap;
|
678
|
+
for(i = 0; i < subSegmentCount; ++i) {
|
679
|
+
let subSegment = segmentMap[segmentNames[i]];
|
680
|
+
++counter;
|
681
|
+
ridMap[subSegment.getId()] = rootOrder + counter;
|
682
|
+
subSegment.setOrder(counter);
|
683
|
+
counter = subSegment.updateTreeStructure(counter, rootOrder, ridMap);
|
684
|
+
}
|
685
|
+
} else {
|
686
|
+
let childIds = this._childIds;
|
687
|
+
let childCount = childIds.length;
|
688
|
+
let segmentSeparators = this._shared.segments;
|
689
|
+
let prevSeg = "";
|
690
|
+
for(i = 0; i < childCount; ++i) {
|
691
|
+
let childId = childIds[i];
|
692
|
+
let childSegment = segmentSeparators[childId];
|
693
|
+
let segmentId = (childSegment) ? childSegment.getId() : UNCATEGORY;
|
694
|
+
if(prevSeg !== segmentId) {
|
695
|
+
++counter;
|
696
|
+
prevSeg = segmentId;
|
697
|
+
}
|
698
|
+
ridMap[childId] = rootOrder + counter;
|
699
|
+
if(childSegment) {
|
700
|
+
childSegment._depth = this._depth + 1;
|
701
|
+
childSegment.setOrder(counter);
|
702
|
+
counter = childSegment.updateTreeStructure(counter, rootOrder, ridMap);
|
703
|
+
}
|
704
|
+
}
|
705
|
+
}
|
706
|
+
|
707
|
+
return this.setLastOrder(counter);
|
708
|
+
};
|
709
|
+
/** Deprecated.
|
710
|
+
* @ignore
|
711
|
+
* @public
|
712
|
+
* @function
|
713
|
+
* @param {number} counter
|
714
|
+
* @return {number}
|
715
|
+
*/
|
716
|
+
Segment.prototype.calcSubSegmentOrder = Segment.prototype.updateTreeStructure;
|
717
|
+
/** @public
|
718
|
+
* @return {number}
|
719
|
+
*/
|
720
|
+
Segment.prototype.getSegmentLevel = function() {
|
721
|
+
return this._depth;
|
722
|
+
};
|
723
|
+
/** This method will be called on subsegments only
|
724
|
+
* @public
|
725
|
+
* @param {Object=} rows
|
726
|
+
* @param {Object=} clsSource
|
727
|
+
*/
|
728
|
+
Segment.prototype.setRowData = function(rows, clsSource) {
|
729
|
+
if(!rows) {
|
730
|
+
return;
|
731
|
+
}
|
732
|
+
let row = rows[this._rid];
|
733
|
+
if(!row) {
|
734
|
+
row = rows[this._rid] = {};
|
735
|
+
}
|
736
|
+
|
737
|
+
if(!clsSource) {
|
738
|
+
clsSource = rows;
|
739
|
+
}
|
740
|
+
row = clsSource[this._rid];
|
741
|
+
if(!row) {
|
742
|
+
row = clsSource[this._rid] = {};
|
743
|
+
}
|
744
|
+
|
745
|
+
let segment = this;
|
746
|
+
while(segment && segment.isSubSegment()) {
|
747
|
+
segment.getSubSegmentName(row);
|
748
|
+
segment = segment.getParent();
|
749
|
+
}
|
750
|
+
};
|
751
|
+
/** @public
|
752
|
+
* @param {Object=} row
|
753
|
+
* @return {string}
|
754
|
+
*/
|
755
|
+
Segment.prototype.getSubSegmentName = function(row) {
|
756
|
+
if(row && this._subSegment) {
|
757
|
+
let classifiers = this.getClassification();
|
758
|
+
let field = classifiers[this._depth - 1];
|
759
|
+
if(field) {
|
760
|
+
row[field] = this._subSegName;
|
761
|
+
}
|
762
|
+
}
|
763
|
+
return this._subSegName;
|
764
|
+
};
|
765
|
+
/**
|
766
|
+
* @public
|
767
|
+
* @param {!Function} comparer
|
768
|
+
* @returns {boolean} Returns true if there is any change
|
769
|
+
*/
|
770
|
+
Segment.prototype.sortSegments = function(comparer) {
|
771
|
+
if(!comparer || this.hasSubSegments()) {
|
772
|
+
return false;
|
773
|
+
}
|
774
|
+
|
775
|
+
let childIds = this._childIds;
|
776
|
+
let childCount = childIds.length;
|
777
|
+
let segments = this._shared.segments;
|
778
|
+
for(let i = 0; i < childCount; ++i) {
|
779
|
+
if(segments[childIds[i]]) {
|
780
|
+
this._childIds.sort(comparer); // Perform segment sorting only if children have at least one segment
|
781
|
+
return true;
|
782
|
+
}
|
783
|
+
}
|
784
|
+
|
785
|
+
return false;
|
786
|
+
};
|
787
|
+
/** Get segment id and ids of children, including nested segments, but excluding sub segments
|
788
|
+
* @public
|
789
|
+
* @param {Array.<string>} ary
|
790
|
+
* @return {!Array.<string>}
|
791
|
+
*/
|
792
|
+
Segment.prototype.getFlattenTreeIds = function(ary) {
|
793
|
+
if(!ary) {
|
794
|
+
ary = [];
|
795
|
+
}
|
796
|
+
|
797
|
+
if(!this._subSegment) { // Sub segments are excluded from tree
|
798
|
+
ary.push(this._rid);
|
799
|
+
}
|
800
|
+
let i;
|
801
|
+
let segmentNames = this._subSegNames;
|
802
|
+
if(segmentNames) { // Classified segment
|
803
|
+
let segmentCount = segmentNames.length;
|
804
|
+
let segmentMap = this._subSegMap;
|
805
|
+
for(i = 0; i < segmentCount; ++i) {
|
806
|
+
segmentMap[segmentNames[i]].getFlattenTreeIds(ary);
|
807
|
+
}
|
808
|
+
} else {
|
809
|
+
let childIds = this._childIds;
|
810
|
+
let childCount = childIds.length;
|
811
|
+
let segments = this._shared.segments;
|
812
|
+
for(i = 0; i < childCount; ++i) {
|
813
|
+
let childId = childIds[i];
|
814
|
+
let childSegment = segments[childId];
|
815
|
+
if(childSegment) {
|
816
|
+
childSegment.getFlattenTreeIds(ary);
|
817
|
+
} else {
|
818
|
+
ary.push(childId);
|
819
|
+
}
|
820
|
+
}
|
821
|
+
}
|
822
|
+
|
823
|
+
return ary;
|
824
|
+
};
|
825
|
+
|
826
|
+
/** @public
|
827
|
+
* @param {boolean=} bool
|
828
|
+
* @return {boolean}
|
829
|
+
*/
|
830
|
+
Segment.prototype.collapse = function(bool) {
|
831
|
+
bool = (bool !== false);
|
832
|
+
if(this._collapsed !== bool) {
|
833
|
+
this._collapsed = bool;
|
834
|
+
this.markCollapsingStateDirty();
|
835
|
+
return true;
|
836
|
+
}
|
837
|
+
return false;
|
838
|
+
};
|
839
|
+
/** @public
|
840
|
+
* @param {boolean=} bool
|
841
|
+
* @return {boolean}
|
842
|
+
*/
|
843
|
+
Segment.prototype.expand = function(bool) {
|
844
|
+
return this.collapse(bool === false);
|
845
|
+
};
|
846
|
+
/** @public
|
847
|
+
* @return {boolean}
|
848
|
+
*/
|
849
|
+
Segment.prototype.isCollapsed = function() {
|
850
|
+
return this._collapsed;
|
851
|
+
};
|
852
|
+
/** Get all collapsing state from all children (subsegments and child segments), excluding the segment itself
|
853
|
+
* @public
|
854
|
+
* @param {Object=} objMap
|
855
|
+
* @param {boolean=} parentState=false Collapsing state from parent segment
|
856
|
+
* @return {boolean}
|
857
|
+
*/
|
858
|
+
Segment.prototype.getCollapsingStates = function(objMap, parentState) {
|
859
|
+
let childList = this._subSegNames;
|
860
|
+
let segmentMap = this._subSegMap;
|
861
|
+
let subSegment = true; // Normal segments can have subsegments without being subsegment themselve
|
862
|
+
if(!childList && this._shared) { // Ensure that segment has not been disposed
|
863
|
+
childList = this._childIds;
|
864
|
+
segmentMap = this._shared.segments;
|
865
|
+
subSegment = false;
|
866
|
+
}
|
867
|
+
let childCount = childList ? childList.length : 0;
|
868
|
+
if(!childCount) {
|
869
|
+
return false;
|
870
|
+
}
|
871
|
+
|
872
|
+
let dirty = false;
|
873
|
+
let childCollapsed = (parentState || this._collapsed) ? true : false;
|
874
|
+
|
875
|
+
if(!objMap) {
|
876
|
+
objMap = {};
|
877
|
+
}
|
878
|
+
for(let i = 0; i < childCount; ++i) {
|
879
|
+
let rid = "";
|
880
|
+
let segment = null;
|
881
|
+
if(subSegment) {
|
882
|
+
segment = segmentMap[childList[i]]; // Use segment name to retrieve subsegment
|
883
|
+
rid = segment.getId();
|
884
|
+
} else {
|
885
|
+
rid = childList[i];
|
886
|
+
segment = segmentMap[rid]; // Use row id to retrieve segment from shared map
|
887
|
+
}
|
888
|
+
if(childCollapsed) {
|
889
|
+
objMap[rid] = childCollapsed; // Collapsing states for all children is registered here
|
890
|
+
dirty = true;
|
891
|
+
}
|
892
|
+
if(segment && segment.getCollapsingStates(objMap, childCollapsed)) {
|
893
|
+
dirty = true;
|
894
|
+
}
|
895
|
+
}
|
896
|
+
return dirty;
|
897
|
+
};
|
898
|
+
|
899
|
+
/** @public
|
900
|
+
* @return {number}
|
901
|
+
*/
|
902
|
+
Segment.prototype.getOrder = function() {
|
903
|
+
let ancestor = this.getFirstAncestor();
|
904
|
+
if(ancestor) {
|
905
|
+
return ancestor._order + this._order;
|
906
|
+
}
|
907
|
+
return this._order; // This is root order
|
908
|
+
};
|
909
|
+
/** Get the last (highest) order from the entire tree regardless of the current position segment in the hierachy
|
910
|
+
* @public
|
911
|
+
* @return {number}
|
912
|
+
*/
|
913
|
+
Segment.prototype.getLastOrder = function() {
|
914
|
+
let ancestor = this.getFirstAncestor();
|
915
|
+
if(ancestor) {
|
916
|
+
return ancestor.getLastOrder();
|
917
|
+
}
|
918
|
+
return this._order + this._offsetOrder; // This is root last order
|
919
|
+
};
|
920
|
+
/** @public
|
921
|
+
* @param {number} val
|
922
|
+
*/
|
923
|
+
Segment.prototype.setOrder = function(val) {
|
924
|
+
this._order = val;
|
925
|
+
};
|
926
|
+
/** WARNING: This actually sets offset from the starting order
|
927
|
+
* @public
|
928
|
+
* @param {number} val
|
929
|
+
* @returns {number} Returns the number set
|
930
|
+
*/
|
931
|
+
Segment.prototype.setLastOrder = function(val) {
|
932
|
+
return (this._offsetOrder = val); // WARNING: this._offsetOrder cannot be greater than 9999
|
933
|
+
};
|
934
|
+
|
935
|
+
/** @private
|
936
|
+
* @type {Array.<string>}
|
937
|
+
*/
|
938
|
+
Segment._tabs = null;
|
939
|
+
/** @public
|
940
|
+
* @param {Array.<string>=} lines
|
941
|
+
* @param {number=} tabLevel
|
942
|
+
* @return {!Array.<string>} lines
|
943
|
+
*/
|
944
|
+
Segment.prototype.log = function(lines, tabLevel) {
|
945
|
+
if(!lines) {
|
946
|
+
lines = [];
|
947
|
+
}
|
948
|
+
|
949
|
+
let i;
|
950
|
+
let tabs = Segment._tabs;
|
951
|
+
if(!tabs) {
|
952
|
+
tabs = Segment._tabs = [];
|
953
|
+
let tabCh = "";
|
954
|
+
for(i = 0; i < 11; ++i) {
|
955
|
+
tabs[i] = tabCh;
|
956
|
+
tabCh += " ";
|
957
|
+
}
|
958
|
+
}
|
959
|
+
if(!tabLevel) {
|
960
|
+
tabLevel = 0;
|
961
|
+
}
|
962
|
+
|
963
|
+
let collapsedCh = this._collapsed ? "+ " : "- ";
|
964
|
+
lines.push(tabs[tabLevel] + collapsedCh + this._rid);
|
965
|
+
|
966
|
+
let childLevel = tabLevel + 1;
|
967
|
+
let childIndent = tabs[childLevel];
|
968
|
+
|
969
|
+
let childList = this._subSegNames;
|
970
|
+
let segmentMap = this._subSegMap;
|
971
|
+
let subSegment = true; // Normal segments can have subsegments without being subsegment themselve
|
972
|
+
if(!childList && this._shared) { // Ensure that segment has not been disposed
|
973
|
+
childList = this._childIds;
|
974
|
+
segmentMap = this._shared.segments;
|
975
|
+
subSegment = false;
|
976
|
+
}
|
977
|
+
let childCount = childList ? childList.length : 0;
|
978
|
+
|
979
|
+
for(i = 0; i < childCount; ++i) {
|
980
|
+
let rid = "";
|
981
|
+
let segment = null;
|
982
|
+
if(subSegment) {
|
983
|
+
segment = segmentMap[childList[i]]; // Use segment name to retrieve subsegment
|
984
|
+
rid = segment.getId();
|
985
|
+
} else {
|
986
|
+
rid = childList[i];
|
987
|
+
segment = segmentMap[rid]; // Use row id to retrieve segment from shared map
|
988
|
+
}
|
989
|
+
|
990
|
+
if(segment) {
|
991
|
+
segment.log(lines, childLevel);
|
992
|
+
} else {
|
993
|
+
lines.push(childIndent + "- " + rid);
|
994
|
+
}
|
995
|
+
}
|
996
|
+
return lines;
|
997
|
+
};
|
998
|
+
|
999
|
+
|
1000
|
+
export default Segment;
|
1001
|
+
export { Segment, UNCATEGORY };
|