@refinitiv-ui/efx-grid 6.0.0-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +17 -0
- package/README.md +61 -0
- package/lib/column-format-dialog/index.d.ts +1 -0
- package/lib/column-format-dialog/index.js +1 -0
- package/lib/column-format-dialog/lib/column-format-dialog.d.ts +64 -0
- package/lib/column-format-dialog/lib/column-format-dialog.js +2713 -0
- package/lib/column-format-dialog/lib/locale/translation-de.d.ts +7 -0
- package/lib/column-format-dialog/lib/locale/translation-de.js +94 -0
- package/lib/column-format-dialog/lib/locale/translation-en.d.ts +7 -0
- package/lib/column-format-dialog/lib/locale/translation-en.js +94 -0
- package/lib/column-format-dialog/lib/locale/translation-ja.d.ts +7 -0
- package/lib/column-format-dialog/lib/locale/translation-ja.js +94 -0
- package/lib/column-format-dialog/lib/locale/translation-zh-hant.d.ts +7 -0
- package/lib/column-format-dialog/lib/locale/translation-zh-hant.js +94 -0
- package/lib/column-format-dialog/lib/locale/translation-zh.d.ts +7 -0
- package/lib/column-format-dialog/lib/locale/translation-zh.js +94 -0
- package/lib/column-format-dialog/lib/locale/translation.d.ts +11 -0
- package/lib/column-format-dialog/lib/locale/translation.js +18 -0
- package/lib/column-format-dialog/lib/preview-table.d.ts +151 -0
- package/lib/column-format-dialog/lib/preview-table.js +995 -0
- package/lib/column-format-dialog/themes/base.less +429 -0
- package/lib/column-format-dialog/themes/elemental/column-format-dialog.less +1 -0
- package/lib/column-format-dialog/themes/elemental/dark/column-format-dialog.js +4 -0
- package/lib/column-format-dialog/themes/elemental/dark/css/native-elements.css +0 -0
- package/lib/column-format-dialog/themes/elemental/dark/es5/all-elements.js +2 -0
- package/lib/column-format-dialog/themes/elemental/dark/imports/all-elements.js +1 -0
- package/lib/column-format-dialog/themes/elemental/dark/imports/custom-elements.js +1 -0
- package/lib/column-format-dialog/themes/elemental/dark/imports/native-elements.js +0 -0
- package/lib/column-format-dialog/themes/elemental/dark.js +16 -0
- package/lib/column-format-dialog/themes/elemental/defaults.less +1 -0
- package/lib/column-format-dialog/themes/elemental/index.less +5 -0
- package/lib/column-format-dialog/themes/elemental/light/column-format-dialog.js +4 -0
- package/lib/column-format-dialog/themes/elemental/light/css/native-elements.css +0 -0
- package/lib/column-format-dialog/themes/elemental/light/es5/all-elements.js +2 -0
- package/lib/column-format-dialog/themes/elemental/light/imports/all-elements.js +1 -0
- package/lib/column-format-dialog/themes/elemental/light/imports/custom-elements.js +1 -0
- package/lib/column-format-dialog/themes/elemental/light/imports/native-elements.js +0 -0
- package/lib/column-format-dialog/themes/elemental/light.js +16 -0
- package/lib/column-format-dialog/themes/halo/column-format-dialog.less +6 -0
- package/lib/column-format-dialog/themes/halo/dark/column-format-dialog.js +4 -0
- package/lib/column-format-dialog/themes/halo/dark/css/native-elements.css +0 -0
- package/lib/column-format-dialog/themes/halo/dark/es5/all-elements.js +2 -0
- package/lib/column-format-dialog/themes/halo/dark/imports/all-elements.js +1 -0
- package/lib/column-format-dialog/themes/halo/dark/imports/custom-elements.js +1 -0
- package/lib/column-format-dialog/themes/halo/dark/imports/native-elements.js +0 -0
- package/lib/column-format-dialog/themes/halo/dark.js +16 -0
- package/lib/column-format-dialog/themes/halo/defaults.less +1 -0
- package/lib/column-format-dialog/themes/halo/index.less +5 -0
- package/lib/column-format-dialog/themes/halo/light/column-format-dialog.js +4 -0
- package/lib/column-format-dialog/themes/halo/light/css/native-elements.css +0 -0
- package/lib/column-format-dialog/themes/halo/light/es5/all-elements.js +2 -0
- package/lib/column-format-dialog/themes/halo/light/imports/all-elements.js +1 -0
- package/lib/column-format-dialog/themes/halo/light/imports/custom-elements.js +1 -0
- package/lib/column-format-dialog/themes/halo/light/imports/native-elements.js +0 -0
- package/lib/column-format-dialog/themes/halo/light.js +16 -0
- package/lib/column-format-dialog/themes/luna/column-format-dialog.less +1 -0
- package/lib/column-format-dialog/themes/luna/default/column-format-dialog.js +4 -0
- package/lib/column-format-dialog/themes/luna/default/css/native-elements.css +0 -0
- package/lib/column-format-dialog/themes/luna/default/es5/all-elements.js +2 -0
- package/lib/column-format-dialog/themes/luna/default/imports/all-elements.js +1 -0
- package/lib/column-format-dialog/themes/luna/default/imports/custom-elements.js +1 -0
- package/lib/column-format-dialog/themes/luna/default/imports/native-elements.js +0 -0
- package/lib/column-format-dialog/themes/luna/defaults.less +1 -0
- package/lib/column-format-dialog/themes/luna/index.less +5 -0
- package/lib/column-format-dialog/themes/solar/charcoal/column-format-dialog.js +4 -0
- package/lib/column-format-dialog/themes/solar/charcoal/css/native-elements.css +0 -0
- package/lib/column-format-dialog/themes/solar/charcoal/es5/all-elements.js +2 -0
- package/lib/column-format-dialog/themes/solar/charcoal/imports/all-elements.js +1 -0
- package/lib/column-format-dialog/themes/solar/charcoal/imports/custom-elements.js +1 -0
- package/lib/column-format-dialog/themes/solar/charcoal/imports/native-elements.js +0 -0
- package/lib/column-format-dialog/themes/solar/charcoal.js +16 -0
- package/lib/column-format-dialog/themes/solar/column-format-dialog.less +6 -0
- package/lib/column-format-dialog/themes/solar/defaults.less +1 -0
- package/lib/column-format-dialog/themes/solar/index.less +5 -0
- package/lib/column-format-dialog/themes/solar/pearl/column-format-dialog.js +4 -0
- package/lib/column-format-dialog/themes/solar/pearl/css/native-elements.css +0 -0
- package/lib/column-format-dialog/themes/solar/pearl/es5/all-elements.js +2 -0
- package/lib/column-format-dialog/themes/solar/pearl/imports/all-elements.js +1 -0
- package/lib/column-format-dialog/themes/solar/pearl/imports/custom-elements.js +1 -0
- package/lib/column-format-dialog/themes/solar/pearl/imports/native-elements.js +0 -0
- package/lib/column-format-dialog/themes/solar/pearl.js +16 -0
- package/lib/column-selection-dialog/index.d.ts +1 -0
- package/lib/column-selection-dialog/index.js +1 -0
- package/lib/column-selection-dialog/lib/column-selection-dialog.d.ts +41 -0
- package/lib/column-selection-dialog/lib/column-selection-dialog.js +1410 -0
- package/lib/column-selection-dialog/lib/locale/translation-de.d.ts +7 -0
- package/lib/column-selection-dialog/lib/locale/translation-de.js +19 -0
- package/lib/column-selection-dialog/lib/locale/translation-en.d.ts +7 -0
- package/lib/column-selection-dialog/lib/locale/translation-en.js +19 -0
- package/lib/column-selection-dialog/lib/locale/translation-ja.d.ts +7 -0
- package/lib/column-selection-dialog/lib/locale/translation-ja.js +19 -0
- package/lib/column-selection-dialog/lib/locale/translation-zh-hant.d.ts +7 -0
- package/lib/column-selection-dialog/lib/locale/translation-zh-hant.js +19 -0
- package/lib/column-selection-dialog/lib/locale/translation-zh.d.ts +7 -0
- package/lib/column-selection-dialog/lib/locale/translation-zh.js +19 -0
- package/lib/column-selection-dialog/lib/locale/translation.d.ts +11 -0
- package/lib/column-selection-dialog/lib/locale/translation.js +18 -0
- package/lib/column-selection-dialog/themes/base.less +189 -0
- package/lib/column-selection-dialog/themes/elemental/column-selection-dialog.less +1 -0
- package/lib/column-selection-dialog/themes/elemental/dark/column-selection-dialog.js +4 -0
- package/lib/column-selection-dialog/themes/elemental/dark/css/native-elements.css +0 -0
- package/lib/column-selection-dialog/themes/elemental/dark/es5/all-elements.js +2 -0
- package/lib/column-selection-dialog/themes/elemental/dark/imports/all-elements.js +1 -0
- package/lib/column-selection-dialog/themes/elemental/dark/imports/custom-elements.js +1 -0
- package/lib/column-selection-dialog/themes/elemental/dark/imports/native-elements.js +0 -0
- package/lib/column-selection-dialog/themes/elemental/dark.js +6 -0
- package/lib/column-selection-dialog/themes/elemental/defaults.less +1 -0
- package/lib/column-selection-dialog/themes/elemental/index.less +5 -0
- package/lib/column-selection-dialog/themes/elemental/light/column-selection-dialog.js +4 -0
- package/lib/column-selection-dialog/themes/elemental/light/css/native-elements.css +0 -0
- package/lib/column-selection-dialog/themes/elemental/light/es5/all-elements.js +2 -0
- package/lib/column-selection-dialog/themes/elemental/light/imports/all-elements.js +1 -0
- package/lib/column-selection-dialog/themes/elemental/light/imports/custom-elements.js +1 -0
- package/lib/column-selection-dialog/themes/elemental/light/imports/native-elements.js +0 -0
- package/lib/column-selection-dialog/themes/elemental/light.js +6 -0
- package/lib/column-selection-dialog/themes/halo/column-selection-dialog.less +22 -0
- package/lib/column-selection-dialog/themes/halo/dark/column-selection-dialog.js +4 -0
- package/lib/column-selection-dialog/themes/halo/dark/css/native-elements.css +0 -0
- package/lib/column-selection-dialog/themes/halo/dark/es5/all-elements.js +2 -0
- package/lib/column-selection-dialog/themes/halo/dark/imports/all-elements.js +1 -0
- package/lib/column-selection-dialog/themes/halo/dark/imports/custom-elements.js +1 -0
- package/lib/column-selection-dialog/themes/halo/dark/imports/native-elements.js +0 -0
- package/lib/column-selection-dialog/themes/halo/dark.js +6 -0
- package/lib/column-selection-dialog/themes/halo/defaults.less +1 -0
- package/lib/column-selection-dialog/themes/halo/index.less +6 -0
- package/lib/column-selection-dialog/themes/halo/light/column-selection-dialog.js +4 -0
- package/lib/column-selection-dialog/themes/halo/light/css/native-elements.css +0 -0
- package/lib/column-selection-dialog/themes/halo/light/es5/all-elements.js +2 -0
- package/lib/column-selection-dialog/themes/halo/light/imports/all-elements.js +1 -0
- package/lib/column-selection-dialog/themes/halo/light/imports/custom-elements.js +1 -0
- package/lib/column-selection-dialog/themes/halo/light/imports/native-elements.js +0 -0
- package/lib/column-selection-dialog/themes/halo/light.js +6 -0
- package/lib/column-selection-dialog/themes/solar/charcoal/column-selection-dialog.js +4 -0
- package/lib/column-selection-dialog/themes/solar/charcoal/css/native-elements.css +0 -0
- package/lib/column-selection-dialog/themes/solar/charcoal/es5/all-elements.js +2 -0
- package/lib/column-selection-dialog/themes/solar/charcoal/imports/all-elements.js +1 -0
- package/lib/column-selection-dialog/themes/solar/charcoal/imports/custom-elements.js +1 -0
- package/lib/column-selection-dialog/themes/solar/charcoal/imports/native-elements.js +0 -0
- package/lib/column-selection-dialog/themes/solar/charcoal.js +6 -0
- package/lib/column-selection-dialog/themes/solar/column-selection-dialog.less +1 -0
- package/lib/column-selection-dialog/themes/solar/defaults.less +1 -0
- package/lib/column-selection-dialog/themes/solar/index.less +6 -0
- package/lib/column-selection-dialog/themes/solar/pearl/column-selection-dialog.js +4 -0
- package/lib/column-selection-dialog/themes/solar/pearl/css/native-elements.css +0 -0
- package/lib/column-selection-dialog/themes/solar/pearl/es5/all-elements.js +2 -0
- package/lib/column-selection-dialog/themes/solar/pearl/imports/all-elements.js +1 -0
- package/lib/column-selection-dialog/themes/solar/pearl/imports/custom-elements.js +1 -0
- package/lib/column-selection-dialog/themes/solar/pearl/imports/native-elements.js +0 -0
- package/lib/column-selection-dialog/themes/solar/pearl.js +6 -0
- package/lib/core/dist/core.css +1 -0
- package/lib/core/dist/core.js +28075 -0
- package/lib/core/dist/core.min.js +1 -0
- package/lib/core/es6/data/ColumnStats.d.ts +42 -0
- package/lib/core/es6/data/ColumnStats.js +428 -0
- package/lib/core/es6/data/DataCache.d.ts +81 -0
- package/lib/core/es6/data/DataCache.js +1317 -0
- package/lib/core/es6/data/DataTable.d.ts +125 -0
- package/lib/core/es6/data/DataTable.js +1655 -0
- package/lib/core/es6/data/DataView.d.ts +280 -0
- package/lib/core/es6/data/DataView.js +3654 -0
- package/lib/core/es6/data/Segment.d.ts +38 -0
- package/lib/core/es6/data/Segment.js +193 -0
- package/lib/core/es6/data/SegmentCollection.d.ts +58 -0
- package/lib/core/es6/data/SegmentCollection.js +431 -0
- package/lib/core/es6/grid/Core.d.ts +387 -0
- package/lib/core/es6/grid/Core.js +4939 -0
- package/lib/core/es6/grid/ILayoutGrid.d.ts +204 -0
- package/lib/core/es6/grid/ILayoutGrid.js +658 -0
- package/lib/core/es6/grid/LayoutGrid.d.ts +23 -0
- package/lib/core/es6/grid/LayoutGrid.js +2602 -0
- package/lib/core/es6/grid/VirtualizedLayoutGrid.d.ts +18 -0
- package/lib/core/es6/grid/VirtualizedLayoutGrid.js +907 -0
- package/lib/core/es6/grid/components/Cell.d.ts +50 -0
- package/lib/core/es6/grid/components/Cell.js +740 -0
- package/lib/core/es6/grid/components/CellFloatingPanel.d.ts +19 -0
- package/lib/core/es6/grid/components/CellFloatingPanel.js +123 -0
- package/lib/core/es6/grid/components/CellSpan.d.ts +18 -0
- package/lib/core/es6/grid/components/CellSpan.js +99 -0
- package/lib/core/es6/grid/components/CellSpans.d.ts +38 -0
- package/lib/core/es6/grid/components/CellSpans.js +341 -0
- package/lib/core/es6/grid/components/Column.d.ts +22 -0
- package/lib/core/es6/grid/components/Column.js +612 -0
- package/lib/core/es6/grid/components/ElementWrapper.d.ts +125 -0
- package/lib/core/es6/grid/components/ElementWrapper.js +714 -0
- package/lib/core/es6/grid/components/HScrollbar.d.ts +24 -0
- package/lib/core/es6/grid/components/HScrollbar.js +222 -0
- package/lib/core/es6/grid/components/Scrollbar.d.ts +61 -0
- package/lib/core/es6/grid/components/Scrollbar.js +1374 -0
- package/lib/core/es6/grid/components/StretchedCells.d.ts +17 -0
- package/lib/core/es6/grid/components/StretchedCells.js +328 -0
- package/lib/core/es6/grid/components/VScrollbar.d.ts +18 -0
- package/lib/core/es6/grid/components/VScrollbar.js +139 -0
- package/lib/core/es6/grid/components/VirtualItems.d.ts +12 -0
- package/lib/core/es6/grid/components/VirtualItems.js +51 -0
- package/lib/core/es6/grid/event/EventDispatcher.d.ts +16 -0
- package/lib/core/es6/grid/event/EventDispatcher.js +138 -0
- package/lib/core/es6/grid/event/EventListeners.d.ts +34 -0
- package/lib/core/es6/grid/event/EventListeners.js +163 -0
- package/lib/core/es6/grid/plugins/DragAndDropTitlePlugin.d.ts +24 -0
- package/lib/core/es6/grid/plugins/DragAndDropTitlePlugin.js +615 -0
- package/lib/core/es6/grid/plugins/Plugin.d.ts +28 -0
- package/lib/core/es6/grid/plugins/Plugin.js +272 -0
- package/lib/core/es6/grid/plugins/SortableTitlePlugin.d.ts +127 -0
- package/lib/core/es6/grid/plugins/SortableTitlePlugin.js +1707 -0
- package/lib/core/es6/grid/util/Conflator.d.ts +32 -0
- package/lib/core/es6/grid/util/Conflator.js +191 -0
- package/lib/core/es6/grid/util/ElementFrameWork.d.ts +18 -0
- package/lib/core/es6/grid/util/ElementFrameWork.js +227 -0
- package/lib/core/es6/grid/util/HttpRequest.d.ts +53 -0
- package/lib/core/es6/grid/util/HttpRequest.js +371 -0
- package/lib/core/es6/grid/util/PercentBar.d.ts +43 -0
- package/lib/core/es6/grid/util/PercentBar.js +390 -0
- package/lib/core/es6/grid/util/PercentBarRenderer.d.ts +41 -0
- package/lib/core/es6/grid/util/PercentBarRenderer.js +316 -0
- package/lib/core/es6/grid/util/RangeBar.d.ts +25 -0
- package/lib/core/es6/grid/util/RangeBar.js +255 -0
- package/lib/core/es6/grid/util/Reverter.d.ts +14 -0
- package/lib/core/es6/grid/util/Reverter.js +79 -0
- package/lib/core/es6/grid/util/SectionSettings.d.ts +79 -0
- package/lib/core/es6/grid/util/SectionSettings.js +674 -0
- package/lib/core/es6/grid/util/SelectionList.d.ts +50 -0
- package/lib/core/es6/grid/util/SelectionList.js +422 -0
- package/lib/core/es6/grid/util/TrackLayout.d.ts +84 -0
- package/lib/core/es6/grid/util/TrackLayout.js +850 -0
- package/lib/core/es6/grid/util/Virtualizer.d.ts +40 -0
- package/lib/core/es6/grid/util/Virtualizer.js +340 -0
- package/lib/core/es6/grid/util/util.d.ts +18 -0
- package/lib/core/es6/grid/util/util.js +450 -0
- package/lib/core/es6/index.d.ts +84 -0
- package/lib/core/es6/index.js +132 -0
- package/lib/core/es6/tr-grid-theme.d.ts +5 -0
- package/lib/core/es6/tr-grid-theme.js +5 -0
- package/lib/filter-dialog/index.d.ts +1 -0
- package/lib/filter-dialog/index.js +1 -0
- package/lib/filter-dialog/lib/checkbox-list.d.ts +27 -0
- package/lib/filter-dialog/lib/checkbox-list.js +336 -0
- package/lib/filter-dialog/lib/filter-dialog.d.ts +53 -0
- package/lib/filter-dialog/lib/filter-dialog.js +860 -0
- package/lib/filter-dialog/lib/locale/translation-de.d.ts +7 -0
- package/lib/filter-dialog/lib/locale/translation-de.js +37 -0
- package/lib/filter-dialog/lib/locale/translation-en.d.ts +7 -0
- package/lib/filter-dialog/lib/locale/translation-en.js +37 -0
- package/lib/filter-dialog/lib/locale/translation-ja.d.ts +7 -0
- package/lib/filter-dialog/lib/locale/translation-ja.js +37 -0
- package/lib/filter-dialog/lib/locale/translation-zh-hant.d.ts +7 -0
- package/lib/filter-dialog/lib/locale/translation-zh-hant.js +37 -0
- package/lib/filter-dialog/lib/locale/translation-zh.d.ts +7 -0
- package/lib/filter-dialog/lib/locale/translation-zh.js +37 -0
- package/lib/filter-dialog/lib/locale/translation.d.ts +11 -0
- package/lib/filter-dialog/lib/locale/translation.js +18 -0
- package/lib/filter-dialog/themes/base-checkbox.less +37 -0
- package/lib/filter-dialog/themes/base.less +102 -0
- package/lib/filter-dialog/themes/elemental/checkbox-list.less +3 -0
- package/lib/filter-dialog/themes/elemental/dark/checkbox-list.js +4 -0
- package/lib/filter-dialog/themes/elemental/dark/css/native-elements.css +0 -0
- package/lib/filter-dialog/themes/elemental/dark/es5/all-elements.js +4 -0
- package/lib/filter-dialog/themes/elemental/dark/filter-dialog.js +5 -0
- package/lib/filter-dialog/themes/elemental/dark/imports/all-elements.js +2 -0
- package/lib/filter-dialog/themes/elemental/dark/imports/custom-elements.js +2 -0
- package/lib/filter-dialog/themes/elemental/dark/imports/native-elements.js +0 -0
- package/lib/filter-dialog/themes/elemental/dark.js +11 -0
- package/lib/filter-dialog/themes/elemental/defaults.less +3 -0
- package/lib/filter-dialog/themes/elemental/filter-dialog.less +1 -0
- package/lib/filter-dialog/themes/elemental/index.less +6 -0
- package/lib/filter-dialog/themes/elemental/light/checkbox-list.js +4 -0
- package/lib/filter-dialog/themes/elemental/light/css/native-elements.css +0 -0
- package/lib/filter-dialog/themes/elemental/light/es5/all-elements.js +4 -0
- package/lib/filter-dialog/themes/elemental/light/filter-dialog.js +5 -0
- package/lib/filter-dialog/themes/elemental/light/imports/all-elements.js +2 -0
- package/lib/filter-dialog/themes/elemental/light/imports/custom-elements.js +2 -0
- package/lib/filter-dialog/themes/elemental/light/imports/native-elements.js +0 -0
- package/lib/filter-dialog/themes/elemental/light.js +11 -0
- package/lib/filter-dialog/themes/halo/checkbox-list.less +3 -0
- package/lib/filter-dialog/themes/halo/dark/checkbox-list.js +4 -0
- package/lib/filter-dialog/themes/halo/dark/css/native-elements.css +0 -0
- package/lib/filter-dialog/themes/halo/dark/es5/all-elements.js +4 -0
- package/lib/filter-dialog/themes/halo/dark/filter-dialog.js +5 -0
- package/lib/filter-dialog/themes/halo/dark/imports/all-elements.js +2 -0
- package/lib/filter-dialog/themes/halo/dark/imports/custom-elements.js +2 -0
- package/lib/filter-dialog/themes/halo/dark/imports/native-elements.js +0 -0
- package/lib/filter-dialog/themes/halo/dark.js +11 -0
- package/lib/filter-dialog/themes/halo/defaults.less +3 -0
- package/lib/filter-dialog/themes/halo/filter-dialog.less +9 -0
- package/lib/filter-dialog/themes/halo/index.less +6 -0
- package/lib/filter-dialog/themes/halo/light/checkbox-list.js +4 -0
- package/lib/filter-dialog/themes/halo/light/css/native-elements.css +0 -0
- package/lib/filter-dialog/themes/halo/light/es5/all-elements.js +4 -0
- package/lib/filter-dialog/themes/halo/light/filter-dialog.js +5 -0
- package/lib/filter-dialog/themes/halo/light/imports/all-elements.js +2 -0
- package/lib/filter-dialog/themes/halo/light/imports/custom-elements.js +2 -0
- package/lib/filter-dialog/themes/halo/light/imports/native-elements.js +0 -0
- package/lib/filter-dialog/themes/halo/light.js +11 -0
- package/lib/filter-dialog/themes/solar/charcoal/checkbox-list.js +4 -0
- package/lib/filter-dialog/themes/solar/charcoal/css/native-elements.css +0 -0
- package/lib/filter-dialog/themes/solar/charcoal/es5/all-elements.js +4 -0
- package/lib/filter-dialog/themes/solar/charcoal/filter-dialog.js +5 -0
- package/lib/filter-dialog/themes/solar/charcoal/imports/all-elements.js +2 -0
- package/lib/filter-dialog/themes/solar/charcoal/imports/custom-elements.js +2 -0
- package/lib/filter-dialog/themes/solar/charcoal/imports/native-elements.js +0 -0
- package/lib/filter-dialog/themes/solar/charcoal.js +11 -0
- package/lib/filter-dialog/themes/solar/checkbox-list.less +3 -0
- package/lib/filter-dialog/themes/solar/defaults.less +3 -0
- package/lib/filter-dialog/themes/solar/filter-dialog.less +5 -0
- package/lib/filter-dialog/themes/solar/index.less +6 -0
- package/lib/filter-dialog/themes/solar/pearl/checkbox-list.js +4 -0
- package/lib/filter-dialog/themes/solar/pearl/css/native-elements.css +0 -0
- package/lib/filter-dialog/themes/solar/pearl/es5/all-elements.js +4 -0
- package/lib/filter-dialog/themes/solar/pearl/filter-dialog.js +5 -0
- package/lib/filter-dialog/themes/solar/pearl/imports/all-elements.js +2 -0
- package/lib/filter-dialog/themes/solar/pearl/imports/custom-elements.js +2 -0
- package/lib/filter-dialog/themes/solar/pearl/imports/native-elements.js +0 -0
- package/lib/filter-dialog/themes/solar/pearl.js +11 -0
- package/lib/formatters/es6/CoralButtonFormatter.d.ts +22 -0
- package/lib/formatters/es6/CoralButtonFormatter.js +40 -0
- package/lib/formatters/es6/CoralCheckboxFormatter.d.ts +12 -0
- package/lib/formatters/es6/CoralCheckboxFormatter.js +45 -0
- package/lib/formatters/es6/CoralComboBoxFormatter.d.ts +23 -0
- package/lib/formatters/es6/CoralComboBoxFormatter.js +102 -0
- package/lib/formatters/es6/CoralIconFormatter.d.ts +23 -0
- package/lib/formatters/es6/CoralIconFormatter.js +45 -0
- package/lib/formatters/es6/CoralInputFormatter.d.ts +12 -0
- package/lib/formatters/es6/CoralInputFormatter.js +40 -0
- package/lib/formatters/es6/CoralRadioButtonFormatter.d.ts +22 -0
- package/lib/formatters/es6/CoralRadioButtonFormatter.js +80 -0
- package/lib/formatters/es6/CoralSelectFormatter.d.ts +23 -0
- package/lib/formatters/es6/CoralSelectFormatter.js +66 -0
- package/lib/formatters/es6/CoralToggleFormatter.d.ts +12 -0
- package/lib/formatters/es6/CoralToggleFormatter.js +47 -0
- package/lib/formatters/es6/DuplexEmeraldDateTimePickerFormatter.d.ts +14 -0
- package/lib/formatters/es6/DuplexEmeraldDateTimePickerFormatter.js +119 -0
- package/lib/formatters/es6/EFButtonFormatter.d.ts +22 -0
- package/lib/formatters/es6/EFButtonFormatter.js +40 -0
- package/lib/formatters/es6/EFCheckboxFormatter.d.ts +12 -0
- package/lib/formatters/es6/EFCheckboxFormatter.js +45 -0
- package/lib/formatters/es6/EFComboBoxFormatter.d.ts +23 -0
- package/lib/formatters/es6/EFComboBoxFormatter.js +68 -0
- package/lib/formatters/es6/EFDateTimePickerFormatter.d.ts +13 -0
- package/lib/formatters/es6/EFDateTimePickerFormatter.js +55 -0
- package/lib/formatters/es6/EFIconFormatter.d.ts +23 -0
- package/lib/formatters/es6/EFIconFormatter.js +45 -0
- package/lib/formatters/es6/EFNumberFieldFormatter.d.ts +12 -0
- package/lib/formatters/es6/EFNumberFieldFormatter.js +40 -0
- package/lib/formatters/es6/EFRadioButtonFormatter.d.ts +22 -0
- package/lib/formatters/es6/EFRadioButtonFormatter.js +80 -0
- package/lib/formatters/es6/EFSelectFormatter.d.ts +23 -0
- package/lib/formatters/es6/EFSelectFormatter.js +66 -0
- package/lib/formatters/es6/EFTextFieldFormatter.d.ts +12 -0
- package/lib/formatters/es6/EFTextFieldFormatter.js +40 -0
- package/lib/formatters/es6/EFToggleFormatter.d.ts +12 -0
- package/lib/formatters/es6/EFToggleFormatter.js +47 -0
- package/lib/formatters/es6/EmeraldDateTimePickerFormatter.d.ts +13 -0
- package/lib/formatters/es6/EmeraldDateTimePickerFormatter.js +55 -0
- package/lib/formatters/es6/FormatterBuilder.d.ts +22 -0
- package/lib/formatters/es6/FormatterBuilder.js +334 -0
- package/lib/formatters/es6/NumericInputFormatter.d.ts +13 -0
- package/lib/formatters/es6/NumericInputFormatter.js +64 -0
- package/lib/formatters/es6/PercentBarFormatter.d.ts +25 -0
- package/lib/formatters/es6/PercentBarFormatter.js +62 -0
- package/lib/formatters/es6/SimpleImageFormatter.d.ts +21 -0
- package/lib/formatters/es6/SimpleImageFormatter.js +64 -0
- package/lib/formatters/es6/SimpleInputFormatter.d.ts +12 -0
- package/lib/formatters/es6/SimpleInputFormatter.js +40 -0
- package/lib/formatters/es6/SimpleLinkFormatter.d.ts +21 -0
- package/lib/formatters/es6/SimpleLinkFormatter.js +48 -0
- package/lib/formatters/es6/SimpleTickerFormatter.d.ts +25 -0
- package/lib/formatters/es6/SimpleTickerFormatter.js +65 -0
- package/lib/formatters/es6/SimpleToggleFormatter.d.ts +22 -0
- package/lib/formatters/es6/SimpleToggleFormatter.js +132 -0
- package/lib/formatters/es6/TextFormatter.d.ts +12 -0
- package/lib/formatters/es6/TextFormatter.js +30 -0
- package/lib/formatters/es6/index.d.ts +43 -0
- package/lib/formatters/es6/index.js +67 -0
- package/lib/grid/index.d.ts +1 -0
- package/lib/grid/index.js +2 -0
- package/lib/grid/lib/efx-grid.d.ts +32 -0
- package/lib/grid/lib/efx-grid.js +469 -0
- package/lib/grid/themes/base.less +134 -0
- package/lib/grid/themes/halo/dark/css/native-elements.css +0 -0
- package/lib/grid/themes/halo/dark/efx-grid.js +4 -0
- package/lib/grid/themes/halo/dark/es5/all-elements.js +2 -0
- package/lib/grid/themes/halo/dark/imports/all-elements.js +1 -0
- package/lib/grid/themes/halo/dark/imports/custom-elements.js +1 -0
- package/lib/grid/themes/halo/dark/imports/native-elements.js +0 -0
- package/lib/grid/themes/halo/dark.js +3 -0
- package/lib/grid/themes/halo/efx-grid.less +92 -0
- package/lib/grid/themes/halo/index.less +3 -0
- package/lib/grid/themes/halo/light/css/native-elements.css +0 -0
- package/lib/grid/themes/halo/light/efx-grid.js +4 -0
- package/lib/grid/themes/halo/light/es5/all-elements.js +2 -0
- package/lib/grid/themes/halo/light/imports/all-elements.js +1 -0
- package/lib/grid/themes/halo/light/imports/custom-elements.js +1 -0
- package/lib/grid/themes/halo/light/imports/native-elements.js +0 -0
- package/lib/grid/themes/halo/light.js +3 -0
- package/lib/grid/themes/solar/charcoal/css/native-elements.css +0 -0
- package/lib/grid/themes/solar/charcoal/efx-grid.js +4 -0
- package/lib/grid/themes/solar/charcoal/es5/all-elements.js +2 -0
- package/lib/grid/themes/solar/charcoal/imports/all-elements.js +1 -0
- package/lib/grid/themes/solar/charcoal/imports/custom-elements.js +1 -0
- package/lib/grid/themes/solar/charcoal/imports/native-elements.js +0 -0
- package/lib/grid/themes/solar/charcoal.js +3 -0
- package/lib/grid/themes/solar/efx-grid.less +27 -0
- package/lib/grid/themes/solar/index.less +3 -0
- package/lib/grid/themes/solar/pearl/css/native-elements.css +0 -0
- package/lib/grid/themes/solar/pearl/efx-grid.js +4 -0
- package/lib/grid/themes/solar/pearl/es5/all-elements.js +2 -0
- package/lib/grid/themes/solar/pearl/imports/all-elements.js +1 -0
- package/lib/grid/themes/solar/pearl/imports/custom-elements.js +1 -0
- package/lib/grid/themes/solar/pearl/imports/native-elements.js +0 -0
- package/lib/grid/themes/solar/pearl.js +3 -0
- package/lib/index.d.ts +102 -0
- package/lib/index.js +102 -0
- package/lib/row-segmenting/es6/RowSegmenting.d.ts +83 -0
- package/lib/row-segmenting/es6/RowSegmenting.js +592 -0
- package/lib/row-segmenting/es6/index.d.ts +1 -0
- package/lib/row-segmenting/es6/index.js +1 -0
- package/lib/rt-grid/dist/rt-grid.js +44672 -0
- package/lib/rt-grid/dist/rt-grid.min.js +1 -0
- package/lib/rt-grid/es6/ColumnDefinition.d.ts +141 -0
- package/lib/rt-grid/es6/ColumnDefinition.js +1074 -0
- package/lib/rt-grid/es6/DataConnector.d.ts +37 -0
- package/lib/rt-grid/es6/DataConnector.js +266 -0
- package/lib/rt-grid/es6/FieldDefinition.d.ts +20 -0
- package/lib/rt-grid/es6/FieldDefinition.js +418 -0
- package/lib/rt-grid/es6/Grid.d.ts +261 -0
- package/lib/rt-grid/es6/Grid.js +2893 -0
- package/lib/rt-grid/es6/PredefinedFormula.d.ts +16 -0
- package/lib/rt-grid/es6/PredefinedFormula.js +33 -0
- package/lib/rt-grid/es6/ReferenceCounter.d.ts +38 -0
- package/lib/rt-grid/es6/ReferenceCounter.js +230 -0
- package/lib/rt-grid/es6/RowDefinition.d.ts +120 -0
- package/lib/rt-grid/es6/RowDefinition.js +873 -0
- package/lib/rt-grid/es6/SnapshotFiller.d.ts +21 -0
- package/lib/rt-grid/es6/SnapshotFiller.js +252 -0
- package/lib/rt-grid/es6/StyleLoader.d.ts +17 -0
- package/lib/rt-grid/es6/StyleLoader.js +47 -0
- package/lib/rt-grid/es6/index.d.ts +8 -0
- package/lib/rt-grid/es6/index.js +43 -0
- package/lib/statistics-row/es6/StatisticsRow.d.ts +67 -0
- package/lib/statistics-row/es6/StatisticsRow.js +786 -0
- package/lib/statistics-row/es6/index.d.ts +1 -0
- package/lib/statistics-row/es6/index.js +1 -0
- package/lib/tr-grid-auto-tooltip/es6/AutoTooltip.d.ts +45 -0
- package/lib/tr-grid-auto-tooltip/es6/AutoTooltip.js +431 -0
- package/lib/tr-grid-auto-tooltip/es6/index.d.ts +1 -0
- package/lib/tr-grid-auto-tooltip/es6/index.js +1 -0
- package/lib/tr-grid-cell-selection/es6/CellSelection.d.ts +67 -0
- package/lib/tr-grid-cell-selection/es6/CellSelection.js +1777 -0
- package/lib/tr-grid-cell-selection/es6/index.d.ts +1 -0
- package/lib/tr-grid-cell-selection/es6/index.js +1 -0
- package/lib/tr-grid-checkbox/es6/Checkbox.d.ts +69 -0
- package/lib/tr-grid-checkbox/es6/Checkbox.js +1476 -0
- package/lib/tr-grid-checkbox/es6/index.d.ts +1 -0
- package/lib/tr-grid-checkbox/es6/index.js +1 -0
- package/lib/tr-grid-column-fitter/es6/ColumnFitter.d.ts +56 -0
- package/lib/tr-grid-column-fitter/es6/ColumnFitter.js +1000 -0
- package/lib/tr-grid-column-fitter/es6/index.d.ts +1 -0
- package/lib/tr-grid-column-fitter/es6/index.js +1 -0
- package/lib/tr-grid-column-formatting/es6/ColumnFormatting.d.ts +89 -0
- package/lib/tr-grid-column-formatting/es6/ColumnFormatting.js +615 -0
- package/lib/tr-grid-column-formatting/es6/index.d.ts +1 -0
- package/lib/tr-grid-column-formatting/es6/index.js +1 -0
- package/lib/tr-grid-column-grouping/es6/ColumnGrouping.d.ts +60 -0
- package/lib/tr-grid-column-grouping/es6/ColumnGrouping.js +913 -0
- package/lib/tr-grid-column-grouping/es6/index.d.ts +1 -0
- package/lib/tr-grid-column-grouping/es6/index.js +1 -0
- package/lib/tr-grid-column-resizing/es6/ColumnResizing.d.ts +68 -0
- package/lib/tr-grid-column-resizing/es6/ColumnResizing.js +1013 -0
- package/lib/tr-grid-column-resizing/es6/index.d.ts +1 -0
- package/lib/tr-grid-column-resizing/es6/index.js +1 -0
- package/lib/tr-grid-column-selection/es6/ColumnSelection.d.ts +70 -0
- package/lib/tr-grid-column-selection/es6/ColumnSelection.js +928 -0
- package/lib/tr-grid-column-selection/es6/index.d.ts +1 -0
- package/lib/tr-grid-column-selection/es6/index.js +1 -0
- package/lib/tr-grid-column-stack/es6/ColumnStack.d.ts +76 -0
- package/lib/tr-grid-column-stack/es6/ColumnStack.js +1227 -0
- package/lib/tr-grid-column-stack/es6/index.d.ts +1 -0
- package/lib/tr-grid-column-stack/es6/index.js +1 -0
- package/lib/tr-grid-conditional-coloring/es6/ConditionalColoring.d.ts +70 -0
- package/lib/tr-grid-conditional-coloring/es6/ConditionalColoring.js +947 -0
- package/lib/tr-grid-conditional-coloring/es6/index.d.ts +1 -0
- package/lib/tr-grid-conditional-coloring/es6/index.js +1 -0
- package/lib/tr-grid-content-wrap/es6/ContentWrap.d.ts +43 -0
- package/lib/tr-grid-content-wrap/es6/ContentWrap.js +478 -0
- package/lib/tr-grid-content-wrap/es6/index.d.ts +1 -0
- package/lib/tr-grid-content-wrap/es6/index.js +1 -0
- package/lib/tr-grid-contextmenu/es6/ContextMenu.d.ts +83 -0
- package/lib/tr-grid-contextmenu/es6/ContextMenu.js +471 -0
- package/lib/tr-grid-contextmenu/es6/MenuEventAPI.d.ts +22 -0
- package/lib/tr-grid-contextmenu/es6/MenuEventAPI.js +133 -0
- package/lib/tr-grid-contextmenu/es6/MenuItem.d.ts +39 -0
- package/lib/tr-grid-contextmenu/es6/MenuItem.js +245 -0
- package/lib/tr-grid-contextmenu/es6/PopupMenu.d.ts +29 -0
- package/lib/tr-grid-contextmenu/es6/PopupMenu.js +292 -0
- package/lib/tr-grid-contextmenu/es6/index.d.ts +1 -0
- package/lib/tr-grid-contextmenu/es6/index.js +1 -0
- package/lib/tr-grid-filter-input/es6/FilterInput.d.ts +57 -0
- package/lib/tr-grid-filter-input/es6/FilterInput.js +928 -0
- package/lib/tr-grid-filter-input/es6/index.d.ts +1 -0
- package/lib/tr-grid-filter-input/es6/index.js +1 -0
- package/lib/tr-grid-heat-map/es6/HeatMap.d.ts +44 -0
- package/lib/tr-grid-heat-map/es6/HeatMap.js +394 -0
- package/lib/tr-grid-heat-map/es6/index.d.ts +1 -0
- package/lib/tr-grid-heat-map/es6/index.js +1 -0
- package/lib/tr-grid-in-cell-editing/es6/InCellEditing.d.ts +129 -0
- package/lib/tr-grid-in-cell-editing/es6/InCellEditing.js +1977 -0
- package/lib/tr-grid-in-cell-editing/es6/index.d.ts +1 -0
- package/lib/tr-grid-in-cell-editing/es6/index.js +1 -0
- package/lib/tr-grid-pagination/es6/Pagination.d.ts +57 -0
- package/lib/tr-grid-pagination/es6/Pagination.js +427 -0
- package/lib/tr-grid-pagination/es6/index.d.ts +1 -0
- package/lib/tr-grid-pagination/es6/index.js +1 -0
- package/lib/tr-grid-percent-bar/es6/PercentBar.d.ts +60 -0
- package/lib/tr-grid-percent-bar/es6/PercentBar.js +801 -0
- package/lib/tr-grid-percent-bar/es6/index.d.ts +1 -0
- package/lib/tr-grid-percent-bar/es6/index.js +1 -0
- package/lib/tr-grid-printer/es6/CellWriter.d.ts +49 -0
- package/lib/tr-grid-printer/es6/CellWriter.js +226 -0
- package/lib/tr-grid-printer/es6/ColumnWriter.d.ts +12 -0
- package/lib/tr-grid-printer/es6/ColumnWriter.js +21 -0
- package/lib/tr-grid-printer/es6/GridPrinter.d.ts +32 -0
- package/lib/tr-grid-printer/es6/GridPrinter.js +761 -0
- package/lib/tr-grid-printer/es6/PrintTrait.d.ts +38 -0
- package/lib/tr-grid-printer/es6/PrintTrait.js +481 -0
- package/lib/tr-grid-printer/es6/SectionWriter.d.ts +54 -0
- package/lib/tr-grid-printer/es6/SectionWriter.js +205 -0
- package/lib/tr-grid-printer/es6/index.d.ts +1 -0
- package/lib/tr-grid-printer/es6/index.js +1 -0
- package/lib/tr-grid-range-bar/es6/RangeBar.d.ts +39 -0
- package/lib/tr-grid-range-bar/es6/RangeBar.js +353 -0
- package/lib/tr-grid-range-bar/es6/index.d.ts +1 -0
- package/lib/tr-grid-range-bar/es6/index.js +1 -0
- package/lib/tr-grid-row-dragging/es6/RowDragging.d.ts +53 -0
- package/lib/tr-grid-row-dragging/es6/RowDragging.js +794 -0
- package/lib/tr-grid-row-dragging/es6/index.d.ts +1 -0
- package/lib/tr-grid-row-dragging/es6/index.js +1 -0
- package/lib/tr-grid-row-filtering/es6/RowFiltering.d.ts +118 -0
- package/lib/tr-grid-row-filtering/es6/RowFiltering.js +1884 -0
- package/lib/tr-grid-row-filtering/es6/index.d.ts +1 -0
- package/lib/tr-grid-row-filtering/es6/index.js +1 -0
- package/lib/tr-grid-row-grouping/es6/RowGrouping.d.ts +109 -0
- package/lib/tr-grid-row-grouping/es6/RowGrouping.js +1541 -0
- package/lib/tr-grid-row-grouping/es6/index.d.ts +1 -0
- package/lib/tr-grid-row-grouping/es6/index.js +1 -0
- package/lib/tr-grid-row-selection/es6/RowSelection.d.ts +74 -0
- package/lib/tr-grid-row-selection/es6/RowSelection.js +1202 -0
- package/lib/tr-grid-row-selection/es6/index.d.ts +1 -0
- package/lib/tr-grid-row-selection/es6/index.js +1 -0
- package/lib/tr-grid-rowcoloring/es6/RowColoring.d.ts +60 -0
- package/lib/tr-grid-rowcoloring/es6/RowColoring.js +611 -0
- package/lib/tr-grid-rowcoloring/es6/index.d.ts +1 -0
- package/lib/tr-grid-rowcoloring/es6/index.js +1 -0
- package/lib/tr-grid-textformatting/es6/TextFormatting.d.ts +77 -0
- package/lib/tr-grid-textformatting/es6/TextFormatting.js +574 -0
- package/lib/tr-grid-textformatting/es6/index.d.ts +1 -0
- package/lib/tr-grid-textformatting/es6/index.js +1 -0
- package/lib/tr-grid-titlewrap/es6/TitleWrap.d.ts +29 -0
- package/lib/tr-grid-titlewrap/es6/TitleWrap.js +431 -0
- package/lib/tr-grid-titlewrap/es6/index.d.ts +1 -0
- package/lib/tr-grid-titlewrap/es6/index.js +1 -0
- package/lib/tr-grid-util/es6/CellPainter.d.ts +136 -0
- package/lib/tr-grid-util/es6/CellPainter.js +1128 -0
- package/lib/tr-grid-util/es6/Conflator.d.ts +34 -0
- package/lib/tr-grid-util/es6/Conflator.js +193 -0
- package/lib/tr-grid-util/es6/CoralItems.d.ts +10 -0
- package/lib/tr-grid-util/es6/CoralItems.js +42 -0
- package/lib/tr-grid-util/es6/DateTime.d.ts +57 -0
- package/lib/tr-grid-util/es6/DateTime.js +508 -0
- package/lib/tr-grid-util/es6/Deferred.d.ts +14 -0
- package/lib/tr-grid-util/es6/Deferred.js +98 -0
- package/lib/tr-grid-util/es6/Delay.d.ts +20 -0
- package/lib/tr-grid-util/es6/Delay.js +85 -0
- package/lib/tr-grid-util/es6/Dom.d.ts +32 -0
- package/lib/tr-grid-util/es6/Dom.js +346 -0
- package/lib/tr-grid-util/es6/ElementObserver.d.ts +10 -0
- package/lib/tr-grid-util/es6/ElementObserver.js +101 -0
- package/lib/tr-grid-util/es6/ElementWrapper.d.ts +23 -0
- package/lib/tr-grid-util/es6/ElementWrapper.js +83 -0
- package/lib/tr-grid-util/es6/ElfDate.d.ts +26 -0
- package/lib/tr-grid-util/es6/ElfDate.js +163 -0
- package/lib/tr-grid-util/es6/ElfUtil.d.ts +33 -0
- package/lib/tr-grid-util/es6/ElfUtil.js +458 -0
- package/lib/tr-grid-util/es6/EventDispatcher.d.ts +26 -0
- package/lib/tr-grid-util/es6/EventDispatcher.js +161 -0
- package/lib/tr-grid-util/es6/ExpanderIcon.d.ts +27 -0
- package/lib/tr-grid-util/es6/ExpanderIcon.js +169 -0
- package/lib/tr-grid-util/es6/Ext.d.ts +10 -0
- package/lib/tr-grid-util/es6/Ext.js +52 -0
- package/lib/tr-grid-util/es6/FieldFormatter.d.ts +55 -0
- package/lib/tr-grid-util/es6/FieldFormatter.js +432 -0
- package/lib/tr-grid-util/es6/FilterBuilder.d.ts +48 -0
- package/lib/tr-grid-util/es6/FilterBuilder.js +521 -0
- package/lib/tr-grid-util/es6/FilterOperators.d.ts +41 -0
- package/lib/tr-grid-util/es6/FilterOperators.js +181 -0
- package/lib/tr-grid-util/es6/GridPlugin.d.ts +72 -0
- package/lib/tr-grid-util/es6/GridPlugin.js +747 -0
- package/lib/tr-grid-util/es6/Icon.d.ts +14 -0
- package/lib/tr-grid-util/es6/Icon.js +61 -0
- package/lib/tr-grid-util/es6/MouseDownTrait.d.ts +42 -0
- package/lib/tr-grid-util/es6/MouseDownTrait.js +237 -0
- package/lib/tr-grid-util/es6/MultiTableManager.d.ts +32 -0
- package/lib/tr-grid-util/es6/MultiTableManager.js +506 -0
- package/lib/tr-grid-util/es6/NumberFormatter.d.ts +83 -0
- package/lib/tr-grid-util/es6/NumberFormatter.js +471 -0
- package/lib/tr-grid-util/es6/PercentBar.d.ts +71 -0
- package/lib/tr-grid-util/es6/PercentBar.js +600 -0
- package/lib/tr-grid-util/es6/Perf.d.ts +32 -0
- package/lib/tr-grid-util/es6/Perf.js +162 -0
- package/lib/tr-grid-util/es6/Popup.d.ts +84 -0
- package/lib/tr-grid-util/es6/Popup.js +818 -0
- package/lib/tr-grid-util/es6/RangeBar.d.ts +33 -0
- package/lib/tr-grid-util/es6/RangeBar.js +259 -0
- package/lib/tr-grid-util/es6/RequestQueue.d.ts +30 -0
- package/lib/tr-grid-util/es6/RequestQueue.js +239 -0
- package/lib/tr-grid-util/es6/RowPainter.d.ts +23 -0
- package/lib/tr-grid-util/es6/RowPainter.js +188 -0
- package/lib/tr-grid-util/es6/SubTable.d.ts +74 -0
- package/lib/tr-grid-util/es6/SubTable.js +558 -0
- package/lib/tr-grid-util/es6/Table.d.ts +125 -0
- package/lib/tr-grid-util/es6/Table.js +790 -0
- package/lib/tr-grid-util/es6/TextHighlighter.d.ts +18 -0
- package/lib/tr-grid-util/es6/TextHighlighter.js +273 -0
- package/lib/tr-grid-util/es6/TickCodes.d.ts +8 -0
- package/lib/tr-grid-util/es6/TickCodes.js +33 -0
- package/lib/tr-grid-util/es6/Timer.d.ts +16 -0
- package/lib/tr-grid-util/es6/Timer.js +49 -0
- package/lib/tr-grid-util/es6/TouchProxy.d.ts +46 -0
- package/lib/tr-grid-util/es6/TouchProxy.js +212 -0
- package/lib/tr-grid-util/es6/Util.d.ts +65 -0
- package/lib/tr-grid-util/es6/Util.js +528 -0
- package/lib/tr-grid-util/es6/formula/ADCService.d.ts +11 -0
- package/lib/tr-grid-util/es6/formula/ADCService.js +72 -0
- package/lib/tr-grid-util/es6/formula/ADCSubscription.d.ts +17 -0
- package/lib/tr-grid-util/es6/formula/ADCSubscription.js +317 -0
- package/lib/tr-grid-util/es6/formula/AdFinService.d.ts +12 -0
- package/lib/tr-grid-util/es6/formula/AdFinService.js +61 -0
- package/lib/tr-grid-util/es6/formula/AdFinSubscription.d.ts +19 -0
- package/lib/tr-grid-util/es6/formula/AdFinSubscription.js +310 -0
- package/lib/tr-grid-util/es6/formula/Engine.d.ts +56 -0
- package/lib/tr-grid-util/es6/formula/Engine.js +592 -0
- package/lib/tr-grid-util/es6/formula/Formula.d.ts +68 -0
- package/lib/tr-grid-util/es6/formula/Formula.js +882 -0
- package/lib/tr-grid-util/es6/formula/IntervalSubscription.d.ts +16 -0
- package/lib/tr-grid-util/es6/formula/IntervalSubscription.js +165 -0
- package/lib/tr-grid-util/es6/formula/Realtime.d.ts +18 -0
- package/lib/tr-grid-util/es6/formula/Realtime.js +279 -0
- package/lib/tr-grid-util/es6/formula/RealtimeService.d.ts +18 -0
- package/lib/tr-grid-util/es6/formula/RealtimeService.js +203 -0
- package/lib/tr-grid-util/es6/formula/TSIService.d.ts +11 -0
- package/lib/tr-grid-util/es6/formula/TSIService.js +51 -0
- package/lib/tr-grid-util/es6/formula/TSISubscription.d.ts +18 -0
- package/lib/tr-grid-util/es6/formula/TSISubscription.js +1015 -0
- package/lib/tr-grid-util/es6/formula/VariableToken.d.ts +30 -0
- package/lib/tr-grid-util/es6/formula/VariableToken.js +314 -0
- package/lib/tr-grid-util/es6/formula/functions/AdFin.d.ts +9 -0
- package/lib/tr-grid-util/es6/formula/functions/AdFin.js +1778 -0
- package/lib/tr-grid-util/es6/formula/functions/Excel.d.ts +8 -0
- package/lib/tr-grid-util/es6/formula/functions/Excel.js +21 -0
- package/lib/tr-grid-util/es6/formula/functions/Info.d.ts +8 -0
- package/lib/tr-grid-util/es6/formula/functions/Info.js +192 -0
- package/lib/tr-grid-util/es6/formula/functions/Internal.d.ts +8 -0
- package/lib/tr-grid-util/es6/formula/functions/Internal.js +90 -0
- package/lib/tr-grid-util/es6/formula/functions/Logic.d.ts +12 -0
- package/lib/tr-grid-util/es6/formula/functions/Logic.js +176 -0
- package/lib/tr-grid-util/es6/formula/functions/Math.d.ts +18 -0
- package/lib/tr-grid-util/es6/formula/functions/Math.js +1624 -0
- package/lib/tr-grid-util/es6/formula/functions/Statistics.d.ts +18 -0
- package/lib/tr-grid-util/es6/formula/functions/Statistics.js +234 -0
- package/lib/tr-grid-util/es6/formula/functions/Text.d.ts +10 -0
- package/lib/tr-grid-util/es6/formula/functions/Text.js +676 -0
- package/lib/tr-grid-util/es6/index.d.ts +63 -0
- package/lib/tr-grid-util/es6/index.js +99 -0
- package/lib/tr-grid-util/es6/jet/CollectionDict.d.ts +28 -0
- package/lib/tr-grid-util/es6/jet/CollectionDict.js +141 -0
- package/lib/tr-grid-util/es6/jet/DataGenerator.d.ts +114 -0
- package/lib/tr-grid-util/es6/jet/DataGenerator.js +827 -0
- package/lib/tr-grid-util/es6/jet/DataSet.d.ts +8 -0
- package/lib/tr-grid-util/es6/jet/DataSet.js +392 -0
- package/lib/tr-grid-util/es6/jet/MockArchive.d.ts +21 -0
- package/lib/tr-grid-util/es6/jet/MockArchive.js +56 -0
- package/lib/tr-grid-util/es6/jet/MockJET.d.ts +25 -0
- package/lib/tr-grid-util/es6/jet/MockJET.js +63 -0
- package/lib/tr-grid-util/es6/jet/MockQuotes.d.ts +37 -0
- package/lib/tr-grid-util/es6/jet/MockQuotes.js +199 -0
- package/lib/tr-grid-util/es6/jet/MockQuotes2.d.ts +72 -0
- package/lib/tr-grid-util/es6/jet/MockQuotes2.js +564 -0
- package/lib/tr-grid-util/es6/jet/MockRTK.d.ts +8 -0
- package/lib/tr-grid-util/es6/jet/MockRTK.js +43 -0
- package/lib/tr-grid-util/es6/jet/index.d.ts +9 -0
- package/lib/tr-grid-util/es6/jet/index.js +18 -0
- package/lib/tr-grid-util/es6/jet/mockDataAPI.d.ts +11 -0
- package/lib/tr-grid-util/es6/jet/mockDataAPI.js +131 -0
- package/lib/tr-grid-util/es6/locale/translation-de.d.ts +7 -0
- package/lib/tr-grid-util/es6/locale/translation-de.js +51 -0
- package/lib/tr-grid-util/es6/locale/translation-en.d.ts +7 -0
- package/lib/tr-grid-util/es6/locale/translation-en.js +51 -0
- package/lib/tr-grid-util/es6/locale/translation-ja.d.ts +7 -0
- package/lib/tr-grid-util/es6/locale/translation-ja.js +51 -0
- package/lib/tr-grid-util/es6/locale/translation-zh-hant.d.ts +7 -0
- package/lib/tr-grid-util/es6/locale/translation-zh-hant.js +51 -0
- package/lib/tr-grid-util/es6/locale/translation-zh.d.ts +7 -0
- package/lib/tr-grid-util/es6/locale/translation-zh.js +51 -0
- package/lib/tr-grid-util/es6/locale/translation.d.ts +11 -0
- package/lib/tr-grid-util/es6/locale/translation.js +18 -0
- package/lib/types/es6/AutoTooltip.d.ts +45 -0
- package/lib/types/es6/CellSelection.d.ts +67 -0
- package/lib/types/es6/Checkbox.d.ts +69 -0
- package/lib/types/es6/ColumnFitter.d.ts +56 -0
- package/lib/types/es6/ColumnFormatting.d.ts +90 -0
- package/lib/types/es6/ColumnGrouping.d.ts +60 -0
- package/lib/types/es6/ColumnResizing.d.ts +68 -0
- package/lib/types/es6/ColumnSelection.d.ts +70 -0
- package/lib/types/es6/ColumnStack.d.ts +76 -0
- package/lib/types/es6/CompositeGrid/CollapsibleHeaderPlugin.d.ts +11 -0
- package/lib/types/es6/CompositeGrid/ColumnSelectionPlugin.d.ts +38 -0
- package/lib/types/es6/CompositeGrid/ColumnWidthAdjustingPlugin.d.ts +45 -0
- package/lib/types/es6/CompositeGrid/CompositeGrid.d.ts +287 -0
- package/lib/types/es6/CompositeGrid/DragAndDropTitlePlugin.d.ts +22 -0
- package/lib/types/es6/CompositeGrid/DraggableContentPlugin.d.ts +44 -0
- package/lib/types/es6/CompositeGrid/ResizableTitlePlugin.d.ts +30 -0
- package/lib/types/es6/CompositeGrid/RowSelectionPlugin.d.ts +42 -0
- package/lib/types/es6/CompositeGrid/TextWidthCalculator.d.ts +24 -0
- package/lib/types/es6/CompositeGrid/TreeIndentingPlugin.d.ts +46 -0
- package/lib/types/es6/CompositeGrid/index.d.ts +9 -0
- package/lib/types/es6/ConditionalColoring.d.ts +70 -0
- package/lib/types/es6/ContentWrap.d.ts +43 -0
- package/lib/types/es6/ContextMenu.d.ts +83 -0
- package/lib/types/es6/CoralButtonFormatter.d.ts +22 -0
- package/lib/types/es6/CoralCheckboxFormatter.d.ts +12 -0
- package/lib/types/es6/CoralComboBoxFormatter.d.ts +23 -0
- package/lib/types/es6/CoralIconFormatter.d.ts +23 -0
- package/lib/types/es6/CoralInputFormatter.d.ts +12 -0
- package/lib/types/es6/CoralRadioButtonFormatter.d.ts +22 -0
- package/lib/types/es6/CoralSelectFormatter.d.ts +23 -0
- package/lib/types/es6/CoralToggleFormatter.d.ts +12 -0
- package/lib/types/es6/Core/data/ColumnStats.d.ts +42 -0
- package/lib/types/es6/Core/data/DataCache.d.ts +81 -0
- package/lib/types/es6/Core/data/DataTable.d.ts +125 -0
- package/lib/types/es6/Core/data/DataView.d.ts +280 -0
- package/lib/types/es6/Core/data/Segment.d.ts +38 -0
- package/lib/types/es6/Core/data/SegmentCollection.d.ts +58 -0
- package/lib/types/es6/Core/grid/Core.d.ts +387 -0
- package/lib/types/es6/Core/grid/ILayoutGrid.d.ts +204 -0
- package/lib/types/es6/Core/grid/LayoutGrid.d.ts +23 -0
- package/lib/types/es6/Core/grid/VirtualizedLayoutGrid.d.ts +18 -0
- package/lib/types/es6/Core/grid/components/Cell.d.ts +50 -0
- package/lib/types/es6/Core/grid/components/CellFloatingPanel.d.ts +19 -0
- package/lib/types/es6/Core/grid/components/CellSpan.d.ts +18 -0
- package/lib/types/es6/Core/grid/components/CellSpans.d.ts +38 -0
- package/lib/types/es6/Core/grid/components/Column.d.ts +22 -0
- package/lib/types/es6/Core/grid/components/ElementWrapper.d.ts +125 -0
- package/lib/types/es6/Core/grid/components/HScrollbar.d.ts +24 -0
- package/lib/types/es6/Core/grid/components/Scrollbar.d.ts +61 -0
- package/lib/types/es6/Core/grid/components/StretchedCells.d.ts +17 -0
- package/lib/types/es6/Core/grid/components/VScrollbar.d.ts +18 -0
- package/lib/types/es6/Core/grid/components/VirtualItems.d.ts +12 -0
- package/lib/types/es6/Core/grid/event/EventDispatcher.d.ts +16 -0
- package/lib/types/es6/Core/grid/event/EventListeners.d.ts +34 -0
- package/lib/types/es6/Core/grid/plugins/DragAndDropTitlePlugin.d.ts +24 -0
- package/lib/types/es6/Core/grid/plugins/Plugin.d.ts +28 -0
- package/lib/types/es6/Core/grid/plugins/SortableTitlePlugin.d.ts +127 -0
- package/lib/types/es6/Core/grid/util/Conflator.d.ts +32 -0
- package/lib/types/es6/Core/grid/util/ElementFrameWork.d.ts +18 -0
- package/lib/types/es6/Core/grid/util/HttpRequest.d.ts +53 -0
- package/lib/types/es6/Core/grid/util/PercentBar.d.ts +43 -0
- package/lib/types/es6/Core/grid/util/PercentBarRenderer.d.ts +41 -0
- package/lib/types/es6/Core/grid/util/RangeBar.d.ts +25 -0
- package/lib/types/es6/Core/grid/util/Reverter.d.ts +14 -0
- package/lib/types/es6/Core/grid/util/SectionSettings.d.ts +79 -0
- package/lib/types/es6/Core/grid/util/SelectionList.d.ts +50 -0
- package/lib/types/es6/Core/grid/util/TrackLayout.d.ts +84 -0
- package/lib/types/es6/Core/grid/util/Virtualizer.d.ts +40 -0
- package/lib/types/es6/Core/grid/util/util.d.ts +18 -0
- package/lib/types/es6/Core/index.d.ts +84 -0
- package/lib/types/es6/Core/tr-grid-theme.d.ts +5 -0
- package/lib/types/es6/DuplexEmeraldDateTimePickerFormatter.d.ts +14 -0
- package/lib/types/es6/EFButtonFormatter.d.ts +22 -0
- package/lib/types/es6/EFCheckboxFormatter.d.ts +12 -0
- package/lib/types/es6/EFComboBoxFormatter.d.ts +23 -0
- package/lib/types/es6/EFDateTimePickerFormatter.d.ts +13 -0
- package/lib/types/es6/EFIconFormatter.d.ts +23 -0
- package/lib/types/es6/EFNumberFieldFormatter.d.ts +12 -0
- package/lib/types/es6/EFRadioButtonFormatter.d.ts +22 -0
- package/lib/types/es6/EFSelectFormatter.d.ts +23 -0
- package/lib/types/es6/EFTextFieldFormatter.d.ts +12 -0
- package/lib/types/es6/EFToggleFormatter.d.ts +12 -0
- package/lib/types/es6/EmeraldDateTimePickerFormatter.d.ts +13 -0
- package/lib/types/es6/ExtensionColumnOptions.d.ts +41 -0
- package/lib/types/es6/ExtensionOptions.d.ts +52 -0
- package/lib/types/es6/Extensions.d.ts +61 -0
- package/lib/types/es6/FilterInput.d.ts +57 -0
- package/lib/types/es6/FormatterBuilder.d.ts +22 -0
- package/lib/types/es6/GridFormatter.d.ts +63 -0
- package/lib/types/es6/HeatMap.d.ts +44 -0
- package/lib/types/es6/InCellEditing.d.ts +129 -0
- package/lib/types/es6/MenuEventAPI.d.ts +22 -0
- package/lib/types/es6/MenuItem.d.ts +39 -0
- package/lib/types/es6/NumericInputFormatter.d.ts +13 -0
- package/lib/types/es6/Pagination.d.ts +57 -0
- package/lib/types/es6/PercentBar.d.ts +60 -0
- package/lib/types/es6/PercentBarFormatter.d.ts +25 -0
- package/lib/types/es6/PopupMenu.d.ts +29 -0
- package/lib/types/es6/RangeBar.d.ts +39 -0
- package/lib/types/es6/RealtimeGrid/ColumnDefinition.d.ts +143 -0
- package/lib/types/es6/RealtimeGrid/DataConnector.d.ts +37 -0
- package/lib/types/es6/RealtimeGrid/FieldDefinition.d.ts +20 -0
- package/lib/types/es6/RealtimeGrid/Grid.d.ts +263 -0
- package/lib/types/es6/RealtimeGrid/PredefinedFormula.d.ts +16 -0
- package/lib/types/es6/RealtimeGrid/ReferenceCounter.d.ts +38 -0
- package/lib/types/es6/RealtimeGrid/RowDefinition.d.ts +120 -0
- package/lib/types/es6/RealtimeGrid/SnapshotFiller.d.ts +21 -0
- package/lib/types/es6/RealtimeGrid/StyleLoader.d.ts +17 -0
- package/lib/types/es6/RealtimeGrid/index.d.ts +8 -0
- package/lib/types/es6/RowColoring.d.ts +60 -0
- package/lib/types/es6/RowDragging.d.ts +53 -0
- package/lib/types/es6/RowFiltering.d.ts +118 -0
- package/lib/types/es6/RowGrouping.d.ts +109 -0
- package/lib/types/es6/RowSegmenting.d.ts +83 -0
- package/lib/types/es6/RowSelection.d.ts +74 -0
- package/lib/types/es6/SimpleImageFormatter.d.ts +21 -0
- package/lib/types/es6/SimpleInputFormatter.d.ts +12 -0
- package/lib/types/es6/SimpleLinkFormatter.d.ts +21 -0
- package/lib/types/es6/SimpleTickerFormatter.d.ts +25 -0
- package/lib/types/es6/SimpleToggleFormatter.d.ts +22 -0
- package/lib/types/es6/StatisticsRow.d.ts +67 -0
- package/lib/types/es6/TextFormatter.d.ts +12 -0
- package/lib/types/es6/TextFormatting.d.ts +77 -0
- package/lib/types/es6/TitleWrap.d.ts +29 -0
- package/lib/types/es6/Zoom.d.ts +51 -0
- package/lib/types/es6/index.d.ts +76 -0
- package/lib/types/index.d.ts +1 -0
- package/lib/versions.json +36 -0
- package/lib/window-exporter.js +13 -0
- package/lib/zoom/es6/Zoom.d.ts +51 -0
- package/lib/zoom/es6/Zoom.js +419 -0
- package/lib/zoom/es6/index.d.ts +1 -0
- package/lib/zoom/es6/index.js +1 -0
- package/package.json +42 -0
@@ -0,0 +1,1374 @@
|
|
1
|
+
/* eslint-disable */
|
2
|
+
import Ext from "../../../../tr-grid-util/es6/Ext.js";
|
3
|
+
import Util from "../util/util.js";
|
4
|
+
import ElementWrapper from "../components/ElementWrapper.js";
|
5
|
+
import Reverter from "../util/Reverter.js";
|
6
|
+
/* eslint-enable */
|
7
|
+
|
8
|
+
/** @constructor
|
9
|
+
* @extends {ElementWrapper}
|
10
|
+
*/
|
11
|
+
var Scrollbar = function () {
|
12
|
+
var t = this; // Create a shorthand to shorthen file size
|
13
|
+
t._addEvents(
|
14
|
+
"scroll",
|
15
|
+
"activated",
|
16
|
+
"deactivated",
|
17
|
+
"scrollStart",
|
18
|
+
"scrollEnd",
|
19
|
+
"thicknessChanged",
|
20
|
+
"layoutChanged",
|
21
|
+
"enabled",
|
22
|
+
"disabled"
|
23
|
+
);
|
24
|
+
|
25
|
+
t._onTrackScroll = t._onTrackScroll.bind(t);
|
26
|
+
t._onKeyDown = t._onKeyDown.bind(t);
|
27
|
+
t._onStartFading = t._onStartFading.bind(t);
|
28
|
+
t._onMouseWheel = t._onMouseWheel.bind(t);
|
29
|
+
t._flash = t._flash.bind(t);
|
30
|
+
|
31
|
+
t._onTouchStart = t._onTouchStart.bind(t);
|
32
|
+
t._onTouchMove = t._onTouchMove.bind(t);
|
33
|
+
t._onTouchEnd = t._onTouchEnd.bind(t);
|
34
|
+
t._smoothScroll = t._smoothScroll.bind(t);
|
35
|
+
t._updateEffectiveArea = t._updateEffectiveArea.bind(t);
|
36
|
+
t._onRestingPosition = t._onRestingPosition.bind(t);
|
37
|
+
|
38
|
+
t._element = document.createElement("div");
|
39
|
+
t._element.className = "grid-scrollbar";
|
40
|
+
|
41
|
+
t._trackContent = document.createElement("div");
|
42
|
+
|
43
|
+
t._panes = [];
|
44
|
+
t._paneSliders = [];
|
45
|
+
t._startPos = {};
|
46
|
+
t._endPos = {};
|
47
|
+
t._reverter = new Reverter(t._onRestingPosition, 300); // WORKAROUND: GRID-402
|
48
|
+
|
49
|
+
t._element.addEventListener("scroll", t._onTrackScroll);
|
50
|
+
t._element.addEventListener("mouseover", t._flash); // Allow interaction if scrollbar is fading
|
51
|
+
t._element.appendChild(t._trackContent); // WARNING: trackContent is not registered as ElementWrapper's content
|
52
|
+
|
53
|
+
t.disableKeyboardInput(false); // Enable keyboard input by default
|
54
|
+
Scrollbar._queryNativeTrackThickness(t._dispatch.bind(t, "thicknessChanged"));
|
55
|
+
|
56
|
+
if(!t._updateEffectiveArea()) {
|
57
|
+
t.listen("thicknessChanged", t._updateEffectiveArea);
|
58
|
+
}
|
59
|
+
};
|
60
|
+
Ext.inherits(Scrollbar, ElementWrapper);
|
61
|
+
|
62
|
+
/** @type {boolean}
|
63
|
+
* @protected
|
64
|
+
* @ignore
|
65
|
+
*/
|
66
|
+
Scrollbar.prototype._vertical = true;
|
67
|
+
/** @type {number}
|
68
|
+
* @protected
|
69
|
+
* @ignore
|
70
|
+
*/
|
71
|
+
Scrollbar.prototype._step = 0;
|
72
|
+
/** @type {Element}
|
73
|
+
* @protected
|
74
|
+
* @ignore
|
75
|
+
*/
|
76
|
+
Scrollbar.prototype._parentNode = null;
|
77
|
+
/** @type {string}
|
78
|
+
* @protected
|
79
|
+
* @ignore
|
80
|
+
*/
|
81
|
+
Scrollbar.prototype._hostClassName = "";
|
82
|
+
|
83
|
+
/** @type {Element}
|
84
|
+
* @protected
|
85
|
+
* @ignore
|
86
|
+
*/
|
87
|
+
Scrollbar.prototype._trackContent = null;
|
88
|
+
/** @type {Array.<ElementWrapper>}
|
89
|
+
* @protected
|
90
|
+
* @ignore
|
91
|
+
*/
|
92
|
+
Scrollbar.prototype._panes = null;
|
93
|
+
/** @type {Array.<ElementWrapper>}
|
94
|
+
* @protected
|
95
|
+
* @ignore
|
96
|
+
*/
|
97
|
+
Scrollbar.prototype._paneSliders = null;
|
98
|
+
|
99
|
+
/** @type {boolean}
|
100
|
+
* @private
|
101
|
+
*/
|
102
|
+
Scrollbar.prototype._enabled = true;
|
103
|
+
/** @type {boolean}
|
104
|
+
* @private
|
105
|
+
*/
|
106
|
+
Scrollbar.prototype._active = false;
|
107
|
+
/** if freeze, scroll can't be moved. Event will stopPropagation and preventDefault
|
108
|
+
* @type {boolean}
|
109
|
+
* @private
|
110
|
+
*/
|
111
|
+
Scrollbar.prototype._isFrozen = false;
|
112
|
+
/** @type {Scrollbar}
|
113
|
+
* @protected
|
114
|
+
* @ignore
|
115
|
+
*/
|
116
|
+
Scrollbar.prototype._otherScrollbar = null;
|
117
|
+
/** @type {boolean}
|
118
|
+
* @private
|
119
|
+
*/
|
120
|
+
Scrollbar.prototype._autoHideScrollbar = true;
|
121
|
+
|
122
|
+
/** @type {number}
|
123
|
+
* @protected
|
124
|
+
* @ignore
|
125
|
+
*/
|
126
|
+
Scrollbar.prototype._trackSize = 120;
|
127
|
+
/** @type {number}
|
128
|
+
* @private
|
129
|
+
*/
|
130
|
+
Scrollbar.prototype._tContentSize = 0;
|
131
|
+
/** @type {number}
|
132
|
+
* @private
|
133
|
+
*/
|
134
|
+
Scrollbar.prototype._tScrollVal = 0; // Track and pane may have different size and content
|
135
|
+
/** @type {number}
|
136
|
+
* @private
|
137
|
+
*/
|
138
|
+
Scrollbar.prototype._tPercentVal = 0; // Percentage [0, 1] of track scroll value
|
139
|
+
|
140
|
+
/** @type {number}
|
141
|
+
* @private
|
142
|
+
*/
|
143
|
+
Scrollbar.prototype._paneSize = 0;
|
144
|
+
/** @type {number}
|
145
|
+
* @private
|
146
|
+
*/
|
147
|
+
Scrollbar.prototype._pContentSize = 0;
|
148
|
+
/** @type {number}
|
149
|
+
* @private
|
150
|
+
*/
|
151
|
+
Scrollbar.prototype._pScrollVal = 0; // Track and pane may have different size and content
|
152
|
+
|
153
|
+
/** @type {number}
|
154
|
+
* @protected
|
155
|
+
* @ignore
|
156
|
+
*/
|
157
|
+
Scrollbar.prototype._footerCount = 0;
|
158
|
+
|
159
|
+
/** @type {number}
|
160
|
+
* @private
|
161
|
+
*/
|
162
|
+
Scrollbar.prototype._fadingId = 0;
|
163
|
+
/** @type {boolean}
|
164
|
+
* @private
|
165
|
+
*/
|
166
|
+
Scrollbar.prototype._postponeFading = false;
|
167
|
+
|
168
|
+
/** @type {boolean}
|
169
|
+
* @private
|
170
|
+
*/
|
171
|
+
Scrollbar.prototype._layoutChanged = false;
|
172
|
+
/** @type {boolean}
|
173
|
+
* @private
|
174
|
+
*/
|
175
|
+
Scrollbar.prototype._contentDirty = true;
|
176
|
+
/** @type {boolean}
|
177
|
+
* @private
|
178
|
+
*/
|
179
|
+
Scrollbar.prototype._layoutDirty = true;
|
180
|
+
|
181
|
+
/** @type {boolean}
|
182
|
+
* @private
|
183
|
+
*/
|
184
|
+
Scrollbar.prototype._touchInput = true;
|
185
|
+
/** @type {boolean}
|
186
|
+
* @private
|
187
|
+
*/
|
188
|
+
Scrollbar.prototype._swiping = false;
|
189
|
+
/** @type {boolean}
|
190
|
+
* @private
|
191
|
+
*/
|
192
|
+
Scrollbar.prototype._touchDrag = false;
|
193
|
+
/** @type {!Object}
|
194
|
+
* @private
|
195
|
+
*/
|
196
|
+
Scrollbar.prototype._startPos;
|
197
|
+
/** @type {!Object}
|
198
|
+
* @private
|
199
|
+
*/
|
200
|
+
Scrollbar.prototype._endPos;
|
201
|
+
|
202
|
+
/** @type {boolean}
|
203
|
+
* @private
|
204
|
+
*/
|
205
|
+
Scrollbar.prototype._smoothing = true;
|
206
|
+
/** @type {number}
|
207
|
+
* @private
|
208
|
+
*/
|
209
|
+
Scrollbar.prototype._smoothingId = 0;
|
210
|
+
/** @type {number}
|
211
|
+
* @private
|
212
|
+
*/
|
213
|
+
Scrollbar.prototype._smoothingSpeed = 0;
|
214
|
+
|
215
|
+
/** @type {string}
|
216
|
+
* @private
|
217
|
+
*/
|
218
|
+
Scrollbar.prototype._wheelScrolling = "";
|
219
|
+
/** @type {Function}
|
220
|
+
* @private
|
221
|
+
* @ignore
|
222
|
+
*/
|
223
|
+
Scrollbar.prototype._mouseWheelLogic = null;
|
224
|
+
|
225
|
+
/** @type {number}
|
226
|
+
* @private
|
227
|
+
*/
|
228
|
+
Scrollbar._trackThickness = 0;
|
229
|
+
/** @type {number}
|
230
|
+
* @private
|
231
|
+
*/
|
232
|
+
Scrollbar._queryTimeout = 0;
|
233
|
+
/** @type {boolean}
|
234
|
+
* @private
|
235
|
+
*/
|
236
|
+
Scrollbar._queryStarted = false;
|
237
|
+
/** @type {Element}
|
238
|
+
* @private
|
239
|
+
*/
|
240
|
+
Scrollbar._outerDummy = null;
|
241
|
+
/** @type {Element}
|
242
|
+
* @private
|
243
|
+
*/
|
244
|
+
Scrollbar._innerDummy = null;
|
245
|
+
/** @type {Array.<Function>}
|
246
|
+
* @private
|
247
|
+
*/
|
248
|
+
Scrollbar._listeners = null;
|
249
|
+
|
250
|
+
|
251
|
+
|
252
|
+
/** @private
|
253
|
+
* @return {boolean}
|
254
|
+
*/
|
255
|
+
Scrollbar.prototype._updateEffectiveArea = function() {
|
256
|
+
var thickness = this.getTrackThickness();
|
257
|
+
if(thickness) {
|
258
|
+
var prop = (this._vertical) ? "width" : "height";
|
259
|
+
this._element.style[prop] = (thickness + 1) + "px";
|
260
|
+
}
|
261
|
+
return thickness ? true : false;
|
262
|
+
};
|
263
|
+
/** @private
|
264
|
+
* @function
|
265
|
+
* @param {Function=} listener
|
266
|
+
*/
|
267
|
+
Scrollbar._queryNativeTrackThickness = function (listener) {
|
268
|
+
if(!Scrollbar._queryStarted) { // We only need one query for all scrollbars
|
269
|
+
Scrollbar._repeatQuery();
|
270
|
+
}
|
271
|
+
|
272
|
+
if(listener && Scrollbar._trackThickness <= 0) {
|
273
|
+
var listeners = Scrollbar._listeners;
|
274
|
+
if(!listeners) {
|
275
|
+
listeners = Scrollbar._listeners = [];
|
276
|
+
}
|
277
|
+
listeners.push(listener);
|
278
|
+
}
|
279
|
+
};
|
280
|
+
/** @private
|
281
|
+
* @function
|
282
|
+
*/
|
283
|
+
Scrollbar._repeatQuery = function () {
|
284
|
+
Scrollbar._queryStarted = true;
|
285
|
+
if(Scrollbar._retrieveNativeTrackThinkness()) {
|
286
|
+
return;
|
287
|
+
}
|
288
|
+
//Re-query if the thickness is not yet available. Add some delay for each query to increase chance of getting the value.
|
289
|
+
|
290
|
+
// TODO: Use window.addEventListener("load", ); in conjunction with this to speed things up
|
291
|
+
Scrollbar._queryTimeout += 100;
|
292
|
+
if(Scrollbar._queryTimeout < 3000) { // Prevent infinite loop
|
293
|
+
setTimeout(Scrollbar._repeatQuery, Scrollbar._queryTimeout);
|
294
|
+
} else {
|
295
|
+
Scrollbar._trackThickness = 13; // Set to 13px as a last ditch effort
|
296
|
+
Scrollbar._clearStaticResources();
|
297
|
+
}
|
298
|
+
};
|
299
|
+
/** @private
|
300
|
+
* @function
|
301
|
+
* @return {boolean} Returns true if valid track thickness
|
302
|
+
*/
|
303
|
+
Scrollbar._retrieveNativeTrackThinkness = function () {
|
304
|
+
if(Scrollbar._trackThickness > 0) {
|
305
|
+
return true;
|
306
|
+
}
|
307
|
+
|
308
|
+
var inner = Scrollbar._innerDummy;
|
309
|
+
var outer = Scrollbar._outerDummy;
|
310
|
+
if(!inner) {
|
311
|
+
inner = Scrollbar._innerDummy = document.createElement('p');
|
312
|
+
inner.style.width = "100%";
|
313
|
+
inner.style.height = "200px";
|
314
|
+
|
315
|
+
outer = Scrollbar._outerDummy = document.createElement('div');
|
316
|
+
outer.style.position = "absolute";
|
317
|
+
outer.style.top = "0px";
|
318
|
+
outer.style.left = "0px";
|
319
|
+
outer.style.visibility = "hidden";
|
320
|
+
outer.style.width = "200px";
|
321
|
+
outer.style.height = "150px";
|
322
|
+
outer.appendChild(inner);
|
323
|
+
}
|
324
|
+
|
325
|
+
outer.style.overflow = "hidden";
|
326
|
+
document.body.appendChild(outer);
|
327
|
+
var w1 = inner.offsetWidth;
|
328
|
+
outer.style.overflow = 'scroll';
|
329
|
+
var w2 = inner.offsetWidth;
|
330
|
+
|
331
|
+
if(w1 == w2) {
|
332
|
+
w2 = outer.clientWidth;
|
333
|
+
}
|
334
|
+
document.body.removeChild(outer);
|
335
|
+
var scrollbarWidth = Scrollbar._trackThickness = (w1 - w2);
|
336
|
+
if(scrollbarWidth > 0) {
|
337
|
+
Scrollbar._clearStaticResources();
|
338
|
+
return true;
|
339
|
+
}
|
340
|
+
return false;
|
341
|
+
};
|
342
|
+
/** @private
|
343
|
+
* @function
|
344
|
+
*/
|
345
|
+
Scrollbar._clearStaticResources = function () {
|
346
|
+
Scrollbar._innerDummy = Scrollbar._outerDummy = null;
|
347
|
+
var listeners = Scrollbar._listeners;
|
348
|
+
if(listeners) {
|
349
|
+
Scrollbar._listeners = null;
|
350
|
+
|
351
|
+
var arg = {};
|
352
|
+
for(var i = listeners.length; --i >= 0;) {
|
353
|
+
listeners[i](arg);
|
354
|
+
}
|
355
|
+
}
|
356
|
+
};
|
357
|
+
/** @public
|
358
|
+
* @function
|
359
|
+
*/
|
360
|
+
Scrollbar.updateTrackThickness = function () {
|
361
|
+
Scrollbar._trackThickness = 0;
|
362
|
+
Scrollbar._queryTimeout = 0;
|
363
|
+
Scrollbar._queryStarted = false;
|
364
|
+
Scrollbar._queryNativeTrackThickness();
|
365
|
+
};
|
366
|
+
|
367
|
+
|
368
|
+
/** @override */
|
369
|
+
Scrollbar.prototype.dispose = function () {
|
370
|
+
this.unlistenAll();
|
371
|
+
if(this._smoothingId) {
|
372
|
+
clearInterval(this._smoothingId);
|
373
|
+
this._smoothingId = 0;
|
374
|
+
}
|
375
|
+
|
376
|
+
this._active = this._layoutChanged = false;
|
377
|
+
this._dispose();
|
378
|
+
for(var i = this._panes.length; --i >= 0;) {
|
379
|
+
this._panes[i].dispose();
|
380
|
+
this._paneSliders[i].dispose();
|
381
|
+
}
|
382
|
+
this._reverter.dispose();
|
383
|
+
};
|
384
|
+
/** @override */
|
385
|
+
Scrollbar.prototype.getContent = function (opt_allContent) {
|
386
|
+
return this._paneSliders[0].getContent(opt_allContent);
|
387
|
+
};
|
388
|
+
/** @override */
|
389
|
+
Scrollbar.prototype.getParent = function () {
|
390
|
+
return this._parentNode;
|
391
|
+
};
|
392
|
+
/** @override */
|
393
|
+
Scrollbar.prototype.setParent = function (p, opt_prepend) {
|
394
|
+
var elem = Util.getElement(p);
|
395
|
+
|
396
|
+
var isDifferentParent = this._parentNode !== elem;
|
397
|
+
if(isDifferentParent && this._parentNode) {
|
398
|
+
this.removeWheelListener(this._parentNode);
|
399
|
+
this._parentNode.classList.remove(this._hostClassName);
|
400
|
+
}
|
401
|
+
|
402
|
+
if(this.isActive()) {
|
403
|
+
this._setParent(elem, opt_prepend); // This also reorder scrollbar to the top or bottom (z-order) of the view
|
404
|
+
this._parentNode = /** @type{Element} */(this._element.parentNode); // TODO:Change to parentElement
|
405
|
+
if(this._parentNode) {
|
406
|
+
this._parentNode.classList.add(this._hostClassName);
|
407
|
+
}
|
408
|
+
} else {
|
409
|
+
this._parentNode = elem;
|
410
|
+
}
|
411
|
+
if(isDifferentParent) {
|
412
|
+
this.addWheelListener(this._parentNode);
|
413
|
+
}
|
414
|
+
};
|
415
|
+
/** @public
|
416
|
+
* @param {Element|Node} host
|
417
|
+
*/
|
418
|
+
Scrollbar.prototype.attachToExternalElement = function (host) {
|
419
|
+
this.setParent(host);
|
420
|
+
var scrollElem = this.getElement();
|
421
|
+
scrollElem.style.right = "0";
|
422
|
+
if(this._vertical) {
|
423
|
+
scrollElem.style.overflowX = "hidden";
|
424
|
+
} else {
|
425
|
+
scrollElem.style.overflowY = "hidden";
|
426
|
+
}
|
427
|
+
scrollElem.style.boxSizing = "border-box";
|
428
|
+
scrollElem.style.position = "absolute";
|
429
|
+
scrollElem.style.outline = "none";
|
430
|
+
};
|
431
|
+
|
432
|
+
/** @private
|
433
|
+
*/
|
434
|
+
Scrollbar.prototype._onActiveStateChange = function () {
|
435
|
+
var t = this; // Minimize file size
|
436
|
+
t._scrollTo(0, true); // WARNING: Reset scroll position
|
437
|
+
var i;
|
438
|
+
if(t._active) {
|
439
|
+
// t._element.style.display = "";
|
440
|
+
if(t._parentNode) {
|
441
|
+
t._layoutDirty = true;
|
442
|
+
t._setParent(t._parentNode);
|
443
|
+
t._parentNode.classList.add(t._hostClassName);
|
444
|
+
}
|
445
|
+
t._flash(); // WARNING: Auto flashing
|
446
|
+
|
447
|
+
// Activate scrollbar on all panes
|
448
|
+
for (i = t._panes.length; --i >= 0; ) {
|
449
|
+
t._panes[i].removeClass("scroll-disabled");
|
450
|
+
}
|
451
|
+
t._dispatch("activated", {});
|
452
|
+
} else {
|
453
|
+
// t._element.style.display = "none";
|
454
|
+
t._setParent(null);
|
455
|
+
if(t._parentNode) {
|
456
|
+
t._parentNode.classList.remove(t._hostClassName);
|
457
|
+
}
|
458
|
+
|
459
|
+
// Remove scrollbar on all panes
|
460
|
+
var prop = (t._vertical) ? "height" : "width";
|
461
|
+
for (i = t._panes.length; --i >= 0; ) {
|
462
|
+
t._panes[i].addClass("scroll-disabled");
|
463
|
+
t._panes[i].setStyle(prop, "");
|
464
|
+
}
|
465
|
+
t._dispatch("deactivated", {});
|
466
|
+
}
|
467
|
+
if(t._vertical) {
|
468
|
+
if(t._otherScrollbar && t._otherScrollbar.isActive()) {
|
469
|
+
t._otherScrollbar.invalidate(); // Vertical scrollbar can have an impact on horizontal track size
|
470
|
+
}
|
471
|
+
}
|
472
|
+
};
|
473
|
+
/** @private
|
474
|
+
*/
|
475
|
+
Scrollbar.prototype._onEnablingStateChange = function () {
|
476
|
+
var t = this; // Minimize file size
|
477
|
+
if(t._enabled) {
|
478
|
+
t._dispatch("enabled", {});
|
479
|
+
} else {
|
480
|
+
t._dispatch("disabled", {});
|
481
|
+
}
|
482
|
+
};
|
483
|
+
|
484
|
+
/** @public
|
485
|
+
* @return {boolean}
|
486
|
+
*/
|
487
|
+
Scrollbar.prototype.isActive = function () {
|
488
|
+
return this._active;
|
489
|
+
};
|
490
|
+
/** @public
|
491
|
+
* @return {boolean}
|
492
|
+
*/
|
493
|
+
Scrollbar.prototype.isEnabled = function () {
|
494
|
+
return this._enabled;
|
495
|
+
};
|
496
|
+
/** @public
|
497
|
+
* @param {boolean=} opt_enabled
|
498
|
+
*/
|
499
|
+
Scrollbar.prototype.enable = function (opt_enabled) {
|
500
|
+
opt_enabled = opt_enabled !== false;
|
501
|
+
if(this._enabled != opt_enabled) {
|
502
|
+
this._enabled = opt_enabled;
|
503
|
+
this._updateLayout();
|
504
|
+
this._onEnablingStateChange();
|
505
|
+
}
|
506
|
+
};
|
507
|
+
/** @public
|
508
|
+
* @param {boolean=} opt_disabled
|
509
|
+
*/
|
510
|
+
Scrollbar.prototype.disable = function (opt_disabled) {
|
511
|
+
this.enable(opt_disabled === false);
|
512
|
+
};
|
513
|
+
|
514
|
+
/** @public
|
515
|
+
* @return {number}
|
516
|
+
*/
|
517
|
+
Scrollbar.prototype.getTrackSize = function () { return this._trackSize; };
|
518
|
+
/** This is equivalent to clientHeight or clientWidth (i.e. view port).
|
519
|
+
* @public
|
520
|
+
* @ignore
|
521
|
+
* @return {number} Pane size without zoom factor
|
522
|
+
*/
|
523
|
+
Scrollbar.prototype.getPaneSize = function () { return this._paneSize; };
|
524
|
+
/** This is equivalent to scrollHeight or scrollWidth
|
525
|
+
* @public
|
526
|
+
* @return {number} Content size without zoom factor
|
527
|
+
*/
|
528
|
+
Scrollbar.prototype.getContentSize = function () { return this._pContentSize; };
|
529
|
+
/** @public
|
530
|
+
* @returns {number}
|
531
|
+
*/
|
532
|
+
Scrollbar.prototype.getTrackThickness = function () { return Scrollbar._trackThickness; };
|
533
|
+
|
534
|
+
/** Get available space for scrolling which is equivalent to content size subtracted by view size
|
535
|
+
* @public
|
536
|
+
* @return {number}
|
537
|
+
* @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollHeight|scrollHeight}
|
538
|
+
* @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollWidth|scrollWidth}
|
539
|
+
*/
|
540
|
+
Scrollbar.prototype.getScrollGap = function () {
|
541
|
+
return this._pContentSize - this.getPaneSize();
|
542
|
+
};
|
543
|
+
|
544
|
+
/** @public
|
545
|
+
* @param {number} size
|
546
|
+
* @param {number} paneSize
|
547
|
+
*/
|
548
|
+
Scrollbar.prototype.setTrackSize = function (size, paneSize) {
|
549
|
+
this._trackSize = size > 0 ? size : 0;
|
550
|
+
this._paneSize = paneSize > 0 ? paneSize : 0;
|
551
|
+
|
552
|
+
// Actually it should invoke _updateLayout() immediately for active-state updating here.
|
553
|
+
// But grid always invokes _updateLayout() implicitly after invokes setTrackSize(),
|
554
|
+
// so _updateLayout() invoking is unneccessory.
|
555
|
+
};
|
556
|
+
/** Must be implemented by the inheritance
|
557
|
+
* @protected
|
558
|
+
* @return {number}
|
559
|
+
*/
|
560
|
+
Scrollbar.prototype.calculateContentSize = function () { return 0; };
|
561
|
+
|
562
|
+
/** @public
|
563
|
+
* @return {boolean} Return true if there is any change, otherwise false
|
564
|
+
*/
|
565
|
+
Scrollbar.prototype.update = function () {
|
566
|
+
if(this._contentDirty) { // WARNING: Causes page recalculation
|
567
|
+
this._contentDirty = false;
|
568
|
+
var size = this.calculateContentSize();
|
569
|
+
if(!size || size < 0) {
|
570
|
+
size = 0;
|
571
|
+
}
|
572
|
+
if(this._pContentSize !== size) {
|
573
|
+
this._pContentSize = size;
|
574
|
+
this._layoutDirty = true;
|
575
|
+
}
|
576
|
+
}
|
577
|
+
if(this._layoutDirty) {
|
578
|
+
this._layoutDirty = false;
|
579
|
+
this._updateLayout();
|
580
|
+
return true;
|
581
|
+
}
|
582
|
+
return false;
|
583
|
+
};
|
584
|
+
/** @public
|
585
|
+
* @param {boolean=} forceUpdate
|
586
|
+
* @param {number=} scrollVal
|
587
|
+
* @ignore
|
588
|
+
*/
|
589
|
+
Scrollbar.prototype.invalidate = function (forceUpdate, scrollVal) {
|
590
|
+
this._contentDirty = true;
|
591
|
+
this._layoutDirty = true;
|
592
|
+
if(scrollVal != null) {
|
593
|
+
this._pScrollVal = scrollVal;
|
594
|
+
}
|
595
|
+
if(forceUpdate) {
|
596
|
+
this.update();
|
597
|
+
}
|
598
|
+
};
|
599
|
+
/** @public
|
600
|
+
* @ignore
|
601
|
+
*/
|
602
|
+
Scrollbar.prototype.invalidateContent = function () {
|
603
|
+
this._contentDirty = true;
|
604
|
+
};
|
605
|
+
/** Validates scrollbar-position against real content-size and pane-size
|
606
|
+
* @public
|
607
|
+
* @ignore
|
608
|
+
* @param {number} contentSize
|
609
|
+
* @return {boolean}
|
610
|
+
*/
|
611
|
+
Scrollbar.prototype.isScrollPosValid = function(contentSize) {
|
612
|
+
var scrollGap = contentSize - this.getPaneSize();
|
613
|
+
var pScrollVal = this._pScrollVal;
|
614
|
+
return (pScrollVal === 0) || ((pScrollVal > 0) &&
|
615
|
+
(scrollGap > 0) && (pScrollVal < scrollGap));
|
616
|
+
};
|
617
|
+
/** @public
|
618
|
+
*/
|
619
|
+
Scrollbar.prototype.flash = function () {
|
620
|
+
this.update();
|
621
|
+
this._flash();
|
622
|
+
};
|
623
|
+
|
624
|
+
/** @protected
|
625
|
+
* @ignore
|
626
|
+
* @param {number} pScrollVal
|
627
|
+
*/
|
628
|
+
Scrollbar.prototype._scroll = function (pScrollVal) {
|
629
|
+
this._scrollTo(this._pScrollVal + pScrollVal);
|
630
|
+
};
|
631
|
+
/** @protected
|
632
|
+
* @ignore
|
633
|
+
* @param {number} pScrollVal Scroll value of the pane (not the track)
|
634
|
+
* @param {boolean=} layoutChanged Force triggering scroll event
|
635
|
+
*/
|
636
|
+
Scrollbar.prototype._scrollTo = function (pScrollVal, layoutChanged) {
|
637
|
+
if(!this._active && !layoutChanged) {
|
638
|
+
return;
|
639
|
+
}
|
640
|
+
pScrollVal = this._calcProperScrollValue(pScrollVal);
|
641
|
+
|
642
|
+
var dirty = false;
|
643
|
+
if(this._pScrollVal !== pScrollVal) {
|
644
|
+
this._pScrollVal = pScrollVal; // Fix asynchronous of tracking issue
|
645
|
+
dirty = true;
|
646
|
+
}
|
647
|
+
|
648
|
+
this._setTrackScrollVal(pScrollVal);
|
649
|
+
|
650
|
+
if(dirty) {
|
651
|
+
if(layoutChanged) {
|
652
|
+
this._layoutChanged = true;
|
653
|
+
}
|
654
|
+
this._dispatchScrollEvent(null); // Event is fire synchronously
|
655
|
+
} else if(layoutChanged) {
|
656
|
+
this._dispatch("layoutChanged", {});
|
657
|
+
}
|
658
|
+
};
|
659
|
+
/** @private
|
660
|
+
* @param {number} scrollVal
|
661
|
+
* @return {number}
|
662
|
+
*/
|
663
|
+
Scrollbar.prototype._calcProperScrollValue = function (scrollVal) {
|
664
|
+
if(!scrollVal || scrollVal - 0.5 < 0) {
|
665
|
+
return 0;
|
666
|
+
}
|
667
|
+
if(this._tPercentVal >= 1 && Math.abs(this._pScrollVal - scrollVal) <= 2) {
|
668
|
+
return this._pScrollVal; // Zooming could cause recalculation errors, so we try to snap the value to the end of the scrollbar
|
669
|
+
}
|
670
|
+
|
671
|
+
var scrollGap = this.getScrollGap();
|
672
|
+
if(scrollGap <= 0) { // Scrollbar is disabled or inactive
|
673
|
+
return 0;
|
674
|
+
} else if(scrollVal + 0.5 >= scrollGap) {
|
675
|
+
return scrollGap;
|
676
|
+
}
|
677
|
+
|
678
|
+
var step = this._step;
|
679
|
+
if(step) { // Step scrolling
|
680
|
+
scrollVal = Math.round(scrollVal / step) * step;
|
681
|
+
if(scrollVal - step / 2 <= 0) {
|
682
|
+
return 0;
|
683
|
+
} else if(scrollVal + step / 2 >= scrollGap) {
|
684
|
+
return scrollGap;
|
685
|
+
}
|
686
|
+
}
|
687
|
+
return Math.round(scrollVal); // Scroll value can only be integers
|
688
|
+
};
|
689
|
+
/** @private
|
690
|
+
* @param {number} tScrollVal Track scroll value
|
691
|
+
* @return {number}
|
692
|
+
*/
|
693
|
+
Scrollbar.prototype._convertTrackToPane = function (tScrollVal) {
|
694
|
+
tScrollVal = Math.round(tScrollVal); // tScrollVal may not be an integer due to zooming
|
695
|
+
|
696
|
+
// Track scroll could be changed due to browser's zoom. We need to avoid unnecessary changes
|
697
|
+
var trackGap = this._getTrackGap();
|
698
|
+
if(this._tPercentVal >= 1) {
|
699
|
+
if(Math.abs(this._tScrollVal - tScrollVal) <= 5) {
|
700
|
+
tScrollVal = trackGap;
|
701
|
+
}
|
702
|
+
}
|
703
|
+
|
704
|
+
this._tScrollVal = tScrollVal;
|
705
|
+
this._tPercentVal = trackGap ? tScrollVal / trackGap : 0;
|
706
|
+
|
707
|
+
// Convert track value to pane value
|
708
|
+
var paneGap = this.getScrollGap();
|
709
|
+
var pScrollVal = (trackGap === paneGap) ? tScrollVal : this._tPercentVal * paneGap;
|
710
|
+
return pScrollVal;
|
711
|
+
};
|
712
|
+
/** @private
|
713
|
+
* @param {number} pScrollVal Pane scroll value
|
714
|
+
* @return {boolean} Return true, if there is any change to track value
|
715
|
+
*/
|
716
|
+
Scrollbar.prototype._setTrackScrollVal = function(pScrollVal) {
|
717
|
+
var trackGap = this._getTrackGap();
|
718
|
+
var tScrollVal = 0;
|
719
|
+
if(trackGap > 0) {
|
720
|
+
if(pScrollVal > 0) {
|
721
|
+
var paneGap = this.getScrollGap();
|
722
|
+
tScrollVal = (trackGap === paneGap) ? pScrollVal : pScrollVal / paneGap * trackGap;
|
723
|
+
tScrollVal = Math.round(tScrollVal); // Avoid calculation error due to fractions from conversion
|
724
|
+
}
|
725
|
+
if(tScrollVal >= trackGap) {
|
726
|
+
tScrollVal = trackGap;
|
727
|
+
}
|
728
|
+
}
|
729
|
+
|
730
|
+
if(tScrollVal !== this._tScrollVal) {
|
731
|
+
this._tScrollVal = tScrollVal;
|
732
|
+
this._tPercentVal = trackGap ? tScrollVal / trackGap : 0;
|
733
|
+
|
734
|
+
// Scroll event will be fired asynchronously, if there is any change
|
735
|
+
var track = this._element;
|
736
|
+
if(this._vertical) {
|
737
|
+
track.scrollTop = tScrollVal;
|
738
|
+
} else {
|
739
|
+
track.scrollLeft = tScrollVal;
|
740
|
+
}
|
741
|
+
return true;
|
742
|
+
}
|
743
|
+
return false;
|
744
|
+
};
|
745
|
+
/** Get gap between thumb and its track
|
746
|
+
* @private
|
747
|
+
* @return {number}
|
748
|
+
*/
|
749
|
+
Scrollbar.prototype._getTrackGap = function () {
|
750
|
+
var trackGap = this._tContentSize - this.getTrackSize();
|
751
|
+
return trackGap > 0 ? trackGap : 0;
|
752
|
+
};
|
753
|
+
|
754
|
+
/** @protected
|
755
|
+
* @ignore
|
756
|
+
* @return {number}
|
757
|
+
*/
|
758
|
+
Scrollbar.prototype._getScrollValue = function () {
|
759
|
+
return this._pScrollVal;
|
760
|
+
};
|
761
|
+
/** @protected
|
762
|
+
* @ignore
|
763
|
+
* @return {boolean}
|
764
|
+
*/
|
765
|
+
Scrollbar.prototype._isEndOfScroll = function () {
|
766
|
+
if(!this._active) {
|
767
|
+
return true; // TODO: Check if inactive state means end of scrolling
|
768
|
+
}
|
769
|
+
|
770
|
+
return this._pScrollVal >= this.getScrollGap();
|
771
|
+
};
|
772
|
+
/** @protected
|
773
|
+
* @ignore
|
774
|
+
* @return {boolean}
|
775
|
+
*/
|
776
|
+
Scrollbar.prototype._isStartOfScroll = function() {
|
777
|
+
return !this._pScrollVal;
|
778
|
+
};
|
779
|
+
/** @protected
|
780
|
+
* @ignore
|
781
|
+
* @param {number} diff
|
782
|
+
* @return {boolean}
|
783
|
+
*/
|
784
|
+
Scrollbar.prototype._isOnEdge = function (diff) {
|
785
|
+
return (diff < 0 && this._isStartOfScroll()) || (diff > 0 && this._isEndOfScroll());
|
786
|
+
};
|
787
|
+
/** @protected
|
788
|
+
* @ignore
|
789
|
+
*/
|
790
|
+
Scrollbar.prototype._flash = function () {
|
791
|
+
if(!this._active || !this._autoHideScrollbar) { return; }
|
792
|
+
|
793
|
+
if(this._fadingId) {
|
794
|
+
this._postponeFading = true;
|
795
|
+
} else {
|
796
|
+
if(this._element._fading) { // This can improve performance a lot
|
797
|
+
this._element.classList.remove("grid-scroll-fadeout");
|
798
|
+
this._element._fading = false;
|
799
|
+
}
|
800
|
+
this._fadingId = setTimeout(this._onStartFading, 1000);
|
801
|
+
}
|
802
|
+
};
|
803
|
+
|
804
|
+
/** @protected
|
805
|
+
* @ignore
|
806
|
+
*/
|
807
|
+
Scrollbar.prototype._clearAllPanes = function() {
|
808
|
+
for (var i = this._panes.length; --i >= 0; ) {
|
809
|
+
this._panes[i].setParent(null);
|
810
|
+
var paneSlider = this._paneSliders[i];
|
811
|
+
paneSlider._content = paneSlider._columns = null;
|
812
|
+
var elem = paneSlider.getElement();
|
813
|
+
while (elem.firstChild !== null) {
|
814
|
+
elem.removeChild(elem.firstChild);
|
815
|
+
}
|
816
|
+
}
|
817
|
+
};
|
818
|
+
|
819
|
+
/** @public
|
820
|
+
* @param {boolean=} opt_disabled
|
821
|
+
*/
|
822
|
+
Scrollbar.prototype.disableKeyboardInput = function (opt_disabled) {
|
823
|
+
if(opt_disabled === false) {
|
824
|
+
this._element.setAttribute("tabindex", "0");
|
825
|
+
this._element.addEventListener("keydown", this._onKeyDown, false);
|
826
|
+
} else {
|
827
|
+
this._element.removeAttribute("tabindex");
|
828
|
+
this._element.removeEventListener("keydown", this._onKeyDown, false);
|
829
|
+
}
|
830
|
+
};
|
831
|
+
/** @public
|
832
|
+
* @param {boolean=} opt_disabled
|
833
|
+
*/
|
834
|
+
Scrollbar.prototype.disableTouchInput = function (opt_disabled) {
|
835
|
+
this._touchInput = (opt_disabled === false);
|
836
|
+
};
|
837
|
+
|
838
|
+
/** Set scrollbar autohide status If set to false, scrollbar will always be shown and no fading
|
839
|
+
* @public
|
840
|
+
* @param {boolean} hide true if autohide, false if not
|
841
|
+
*/
|
842
|
+
Scrollbar.prototype.setAutoHide = function (hide) {
|
843
|
+
this._autoHideScrollbar = hide;
|
844
|
+
if(!hide) { // Always show scrollbar
|
845
|
+
if(this._element._fading) {
|
846
|
+
this._element.classList.remove("grid-scroll-fadeout");
|
847
|
+
this._element._fading = false;
|
848
|
+
}
|
849
|
+
if(this._fadingId) {
|
850
|
+
clearTimeout(this._fadingId);
|
851
|
+
this._fadingId = 0;
|
852
|
+
}
|
853
|
+
}
|
854
|
+
};
|
855
|
+
|
856
|
+
/** Get scrollbar autohide status
|
857
|
+
* @public
|
858
|
+
* @return {boolean} true if autohide, false if not
|
859
|
+
*/
|
860
|
+
Scrollbar.prototype.getAutoHide = function () {
|
861
|
+
return this._autoHideScrollbar;
|
862
|
+
};
|
863
|
+
|
864
|
+
/** Set reference to other scrollbar. For internal use only
|
865
|
+
* @public
|
866
|
+
* @ignore
|
867
|
+
* @param {Scrollbar} scrollbar Other scrollbar object
|
868
|
+
*/
|
869
|
+
Scrollbar.prototype.setOtherScrollbar = function(scrollbar){
|
870
|
+
this._otherScrollbar = scrollbar;
|
871
|
+
};
|
872
|
+
|
873
|
+
/** Set number of expected frozen footer count. For internal use only.
|
874
|
+
* @public
|
875
|
+
* @ignore
|
876
|
+
* @param {number} num
|
877
|
+
*/
|
878
|
+
Scrollbar.prototype.setFooterCount = function(num){
|
879
|
+
this._footerCount = num;
|
880
|
+
};
|
881
|
+
|
882
|
+
/** @private
|
883
|
+
* @return {boolean}
|
884
|
+
*/
|
885
|
+
Scrollbar.prototype._calcActiveState = function () {
|
886
|
+
if(this._enabled) {
|
887
|
+
if(this.getTrackSize() > 20) {
|
888
|
+
var paneSize = this.getPaneSize();
|
889
|
+
if(paneSize > 0) {
|
890
|
+
return (this._pContentSize - paneSize > 0);
|
891
|
+
}
|
892
|
+
}
|
893
|
+
}
|
894
|
+
return false;
|
895
|
+
};
|
896
|
+
/** @private
|
897
|
+
*/
|
898
|
+
Scrollbar.prototype._updateLayout = function () {
|
899
|
+
var active = this._calcActiveState();
|
900
|
+
if(active !== this._active) {
|
901
|
+
this._active = active;
|
902
|
+
this._onActiveStateChange();
|
903
|
+
}
|
904
|
+
if(!this._active) {
|
905
|
+
return;
|
906
|
+
}
|
907
|
+
|
908
|
+
var trackSize = this.getTrackSize();
|
909
|
+
var paneSize = this.getPaneSize();
|
910
|
+
this._tContentSize = this._pContentSize / paneSize * trackSize;
|
911
|
+
if (this._vertical) {
|
912
|
+
this._trackContent.style.height = this._tContentSize + "px";
|
913
|
+
|
914
|
+
this._element.style.height = trackSize + "px";
|
915
|
+
this._panes[0].setHeight(paneSize);
|
916
|
+
} else {
|
917
|
+
this._trackContent.style.width = this._tContentSize + "px";
|
918
|
+
|
919
|
+
this._element.style.width = trackSize + "px";
|
920
|
+
for (var i = this._panes.length; --i >= 0;) {
|
921
|
+
this._panes[i].setWidth(paneSize);
|
922
|
+
}
|
923
|
+
}
|
924
|
+
|
925
|
+
// Since track could be smaller, scrollVal needs to be updated. Also UI needs to be always updated too
|
926
|
+
this._scrollTo(this._pScrollVal, true); // Scroll event may be fired
|
927
|
+
};
|
928
|
+
|
929
|
+
/** @public
|
930
|
+
* @ignore
|
931
|
+
*/
|
932
|
+
Scrollbar.prototype.resetPaneSize = function () {
|
933
|
+
var prop = (this._vertical) ? "height" : "width";
|
934
|
+
for (var i = this._panes.length; --i >= 0;) {
|
935
|
+
this._panes[i].setStyle(prop, "");
|
936
|
+
}
|
937
|
+
};
|
938
|
+
|
939
|
+
/** @private
|
940
|
+
* @param {MouseEvent} e
|
941
|
+
*/
|
942
|
+
Scrollbar._preventVScrolling = function(e) {
|
943
|
+
e.currentTarget.scrollTop = 0;
|
944
|
+
};
|
945
|
+
/** @private
|
946
|
+
* @param {MouseEvent} e
|
947
|
+
*/
|
948
|
+
Scrollbar._preventHScrolling = function(e) {
|
949
|
+
e.currentTarget.scrollLeft = 0;
|
950
|
+
};
|
951
|
+
|
952
|
+
/** @protected
|
953
|
+
* @ignore
|
954
|
+
* @param {number=} opt_at
|
955
|
+
* @returns {ElementWrapper}
|
956
|
+
*/
|
957
|
+
Scrollbar.prototype._addPaneAt = function (opt_at) {
|
958
|
+
if(opt_at == null) {
|
959
|
+
opt_at = this._panes.length;
|
960
|
+
}
|
961
|
+
|
962
|
+
var pane = this._panes[opt_at];
|
963
|
+
if(!pane) {
|
964
|
+
pane = new ElementWrapper(document.createElement("div"));
|
965
|
+
pane.setClass("grid-pane");
|
966
|
+
if(this._vertical) {
|
967
|
+
pane.addClass("sections"); // The pane will host multiple sections
|
968
|
+
pane.listen("scroll", Scrollbar._preventVScrolling);
|
969
|
+
} else {
|
970
|
+
pane.addClass("columns"); // The pane will host multiple columns
|
971
|
+
pane.listen("scroll", Scrollbar._preventHScrolling);
|
972
|
+
}
|
973
|
+
if(!this._active) {
|
974
|
+
pane.addClass("scroll-disabled");
|
975
|
+
}
|
976
|
+
if(this._paneSize && this._active) {
|
977
|
+
var paneSize = this.getPaneSize();
|
978
|
+
if(this._vertical) {
|
979
|
+
pane.setHeight(paneSize);
|
980
|
+
} else {
|
981
|
+
pane.setWidth(paneSize);
|
982
|
+
}
|
983
|
+
}
|
984
|
+
pane.listen("touchstart", this._onTouchStart);
|
985
|
+
pane.listen("touchmove", this._onTouchMove);
|
986
|
+
pane.listen("touchend", this._onTouchEnd);
|
987
|
+
pane.listen("touchcancel", this._onTouchEnd);
|
988
|
+
|
989
|
+
var paneSlider = new ElementWrapper(document.createElement("div"));
|
990
|
+
paneSlider.setClass("grid-pane-slider");
|
991
|
+
paneSlider.setParent(pane);
|
992
|
+
|
993
|
+
this._panes[opt_at] = pane;
|
994
|
+
this._paneSliders[opt_at] = paneSlider;
|
995
|
+
}
|
996
|
+
return pane;
|
997
|
+
};
|
998
|
+
/** @private
|
999
|
+
* @param {!Event} e
|
1000
|
+
*/
|
1001
|
+
Scrollbar.prototype._onStartFading = function (e) {
|
1002
|
+
this._fadingId = 0;
|
1003
|
+
if(!this._active) { return; }
|
1004
|
+
if(this._postponeFading) {
|
1005
|
+
this._postponeFading = false;
|
1006
|
+
this._flash();
|
1007
|
+
} else {
|
1008
|
+
if(!this._element._fading) {
|
1009
|
+
this._element.classList.add("grid-scroll-fadeout");
|
1010
|
+
this._element._fading = true;
|
1011
|
+
}
|
1012
|
+
}
|
1013
|
+
};
|
1014
|
+
/** Scrolling from the UI
|
1015
|
+
* @private
|
1016
|
+
* @param {Object} e
|
1017
|
+
*/
|
1018
|
+
Scrollbar.prototype._onTrackScroll = function (e) {
|
1019
|
+
var tScrollVal = (this._vertical) ? e.target["scrollTop"] : e.target["scrollLeft"];
|
1020
|
+
|
1021
|
+
var pScrollVal = this._convertTrackToPane(tScrollVal);
|
1022
|
+
|
1023
|
+
pScrollVal = this._calcProperScrollValue(pScrollVal);
|
1024
|
+
|
1025
|
+
if(pScrollVal !== this._pScrollVal) { // Prevent duplicate event firing
|
1026
|
+
this._pScrollVal = pScrollVal;
|
1027
|
+
this._dispatchScrollEvent(e);
|
1028
|
+
}
|
1029
|
+
};
|
1030
|
+
|
1031
|
+
/** @private
|
1032
|
+
*/
|
1033
|
+
Scrollbar.prototype._onRestingPosition = function () {
|
1034
|
+
this._setSliderPosition(-this._pScrollVal, true);
|
1035
|
+
};
|
1036
|
+
/** @private
|
1037
|
+
* @param {number} scrollVal
|
1038
|
+
* @param {boolean=} resting
|
1039
|
+
*/
|
1040
|
+
Scrollbar.prototype._setSliderPosition = function (scrollVal, resting) {
|
1041
|
+
var translateStr = "";
|
1042
|
+
var relativeStr = "";
|
1043
|
+
var direction = this._vertical ? "top" : "left";
|
1044
|
+
if(scrollVal) {
|
1045
|
+
if(resting) {
|
1046
|
+
relativeStr = scrollVal + "px";
|
1047
|
+
} else {
|
1048
|
+
translateStr = this._vertical ? "translateY" : "translateX";
|
1049
|
+
translateStr += "(" + scrollVal + "px)";
|
1050
|
+
this._reverter.start();
|
1051
|
+
}
|
1052
|
+
}
|
1053
|
+
for (var i = this._paneSliders.length; --i >= 0; ) {
|
1054
|
+
var paneSlider = this._paneSliders[i];
|
1055
|
+
var paneSliderStyle = paneSlider.getElement().style;
|
1056
|
+
if(paneSlider._titleSection) {
|
1057
|
+
paneSliderStyle[direction] = scrollVal + "px";
|
1058
|
+
} else {
|
1059
|
+
paneSliderStyle.transform = translateStr;
|
1060
|
+
paneSliderStyle[direction] = relativeStr; // WORKAROUND: GRID-402
|
1061
|
+
}
|
1062
|
+
}
|
1063
|
+
if(resting) {
|
1064
|
+
this._dispatch("scrollEnd", {});
|
1065
|
+
} else {
|
1066
|
+
this._dispatch("scrollStart", {});
|
1067
|
+
}
|
1068
|
+
};
|
1069
|
+
/** @private
|
1070
|
+
* @param {Object=} e
|
1071
|
+
*/
|
1072
|
+
Scrollbar.prototype._dispatchScrollEvent = function (e) {
|
1073
|
+
this._setSliderPosition(-this._pScrollVal, false);
|
1074
|
+
|
1075
|
+
this._flash(); // Slider has been updated. Flash the track's UI
|
1076
|
+
|
1077
|
+
// Fire scroll event synchronously
|
1078
|
+
if(!this._isEventDispatching("scroll")) { // VScrollbar may change scroll value
|
1079
|
+
if(!e) {
|
1080
|
+
var target = this._element;
|
1081
|
+
e = {
|
1082
|
+
"currentTarget": target,
|
1083
|
+
"srcElement": target,
|
1084
|
+
"target": target
|
1085
|
+
};
|
1086
|
+
}
|
1087
|
+
e["layoutChanged"] = this._layoutChanged; // Do not close the editor - the scroll is due to a layout change - this a not an actual scroll - see QuoteList.js (monitor-grid)
|
1088
|
+
if(this._vertical) {
|
1089
|
+
e["scrollTop"] = this._pScrollVal; // For backward compatibility
|
1090
|
+
} else {
|
1091
|
+
e["scrollLeft"] = this._pScrollVal;
|
1092
|
+
}
|
1093
|
+
|
1094
|
+
this._dispatch("scroll", e);
|
1095
|
+
}
|
1096
|
+
};
|
1097
|
+
/** @private
|
1098
|
+
* @param {!Event} e
|
1099
|
+
*/
|
1100
|
+
Scrollbar.prototype._onKeyDown = function (e) {
|
1101
|
+
if (this._isFrozen) {
|
1102
|
+
Util._preventDefault(e);
|
1103
|
+
return;
|
1104
|
+
}
|
1105
|
+
if (!this._active) { return; }
|
1106
|
+
|
1107
|
+
var isArrow = false;
|
1108
|
+
if(this._vertical) {
|
1109
|
+
isArrow = (e.keyCode === 38 || e.keyCode === 40);
|
1110
|
+
} else {
|
1111
|
+
isArrow = (e.keyCode === 37 || e.keyCode === 39);
|
1112
|
+
}
|
1113
|
+
|
1114
|
+
if(isArrow) {
|
1115
|
+
var scrollGap = this.getScrollGap();
|
1116
|
+
var scrollVal = Math.round(scrollGap * 0.07);
|
1117
|
+
if(scrollVal < 10) {
|
1118
|
+
scrollVal = 10;
|
1119
|
+
} else if(scrollVal > 100) {
|
1120
|
+
scrollVal = 100;
|
1121
|
+
}
|
1122
|
+
if(e.keyCode === 37 || e.keyCode === 38) { // Left or Up
|
1123
|
+
scrollVal *= -1;
|
1124
|
+
}
|
1125
|
+
this._scroll(scrollVal);
|
1126
|
+
Util._preventDefault(e);
|
1127
|
+
}
|
1128
|
+
};
|
1129
|
+
|
1130
|
+
/** @private
|
1131
|
+
* @param {Event} e
|
1132
|
+
*/
|
1133
|
+
Scrollbar.prototype._onTouchStart = function (e) {
|
1134
|
+
if (this._isFrozen) {
|
1135
|
+
Util._preventDefault(e);
|
1136
|
+
return;
|
1137
|
+
}
|
1138
|
+
if(this._swiping || !this._touchInput) {
|
1139
|
+
return;
|
1140
|
+
}
|
1141
|
+
if(this._vertical) { // Vertical scrollbar is optimized, so that it will not be activated on row change event
|
1142
|
+
this.update();
|
1143
|
+
}
|
1144
|
+
this._flash();
|
1145
|
+
|
1146
|
+
if(this._smoothingId) {
|
1147
|
+
clearInterval(this._smoothingId);
|
1148
|
+
this._smoothingId = 0;
|
1149
|
+
}
|
1150
|
+
|
1151
|
+
this._swiping = true;
|
1152
|
+
this._getTouchInfo(e, this._startPos);
|
1153
|
+
};
|
1154
|
+
/** @private
|
1155
|
+
* @param {Event} e
|
1156
|
+
*/
|
1157
|
+
Scrollbar.prototype._onTouchMove = function (e) {
|
1158
|
+
var t = this;
|
1159
|
+
|
1160
|
+
if (t._isFrozen) {
|
1161
|
+
Util._preventDefault(e);
|
1162
|
+
return;
|
1163
|
+
}
|
1164
|
+
// Stop scrolling when scrollbar becomes inactive
|
1165
|
+
if(!t._swiping || !t._active || !t._touchInput) {
|
1166
|
+
return;
|
1167
|
+
}
|
1168
|
+
|
1169
|
+
if(e.touches && e.touches.length > 1) {
|
1170
|
+
return;
|
1171
|
+
}
|
1172
|
+
|
1173
|
+
var sp = t._startPos;
|
1174
|
+
var ep = t._endPos;
|
1175
|
+
t._getTouchInfo(e, ep);
|
1176
|
+
var diff = (this._vertical) ? sp["y"] - ep["y"] : sp["x"] - ep["x"];
|
1177
|
+
|
1178
|
+
if(diff > -5 && diff < 5) {
|
1179
|
+
return;
|
1180
|
+
} else if(t._isOnEdge(diff)) {
|
1181
|
+
return;
|
1182
|
+
}
|
1183
|
+
|
1184
|
+
if(t._touchDrag) {
|
1185
|
+
t._scrollTo(sp["scrollValue"] + diff);
|
1186
|
+
} else {
|
1187
|
+
var duration = ep["timeStamp"] - sp["timeStamp"];
|
1188
|
+
if(duration > 30) {
|
1189
|
+
t._touchDrag = true;
|
1190
|
+
}
|
1191
|
+
}
|
1192
|
+
|
1193
|
+
if(e.cancelable) {
|
1194
|
+
e.preventDefault();
|
1195
|
+
}
|
1196
|
+
};
|
1197
|
+
/** @private
|
1198
|
+
* @param {Event} e
|
1199
|
+
*/
|
1200
|
+
Scrollbar.prototype._onTouchEnd = function (e) {
|
1201
|
+
if (this._isFrozen) {
|
1202
|
+
Util._preventDefault(e);
|
1203
|
+
return;
|
1204
|
+
}
|
1205
|
+
this._swiping = false;
|
1206
|
+
if(this._touchDrag) {
|
1207
|
+
this._touchDrag = false;
|
1208
|
+
|
1209
|
+
if(e.cancelable) {
|
1210
|
+
e.preventDefault();
|
1211
|
+
}
|
1212
|
+
|
1213
|
+
if(this._smoothing && !this._smoothingId) {
|
1214
|
+
var sp = this._startPos;
|
1215
|
+
var ep = this._getTouchInfo(e, this._endPos);
|
1216
|
+
var duration = ep["timeStamp"] - sp["timeStamp"];
|
1217
|
+
var diff = (this._vertical) ? (sp["y"] - ep["y"]) : (sp["x"] - ep["x"]);
|
1218
|
+
this._smoothingSpeed = diff * 30 / duration; // pixel per milliseconds
|
1219
|
+
if(this._smoothingSpeed > 10 || this._smoothingSpeed < -10) {
|
1220
|
+
this._smoothingId = setInterval(this._smoothScroll, 25);
|
1221
|
+
}
|
1222
|
+
}
|
1223
|
+
}
|
1224
|
+
};
|
1225
|
+
/** @private
|
1226
|
+
* @param {Event} e
|
1227
|
+
* @param {Object=} obj
|
1228
|
+
* @return {!Object}
|
1229
|
+
*/
|
1230
|
+
Scrollbar.prototype._getTouchInfo = function(e, obj) {
|
1231
|
+
var touch = e.changedTouches[0];
|
1232
|
+
if(!obj) {
|
1233
|
+
obj = {};
|
1234
|
+
}
|
1235
|
+
obj["x"] = touch.pageX;
|
1236
|
+
obj["y"] = touch.pageY;
|
1237
|
+
obj["timeStamp"] = e.timeStamp;
|
1238
|
+
obj["scrollValue"] = this._getScrollValue();
|
1239
|
+
return obj;
|
1240
|
+
};
|
1241
|
+
/** @private
|
1242
|
+
*/
|
1243
|
+
Scrollbar.prototype._smoothScroll = function() {
|
1244
|
+
var ss = this._smoothingSpeed;
|
1245
|
+
ss = (ss * 0.9) | 0; // OR operator is not equivalent to Math.floor()
|
1246
|
+
this._smoothingSpeed = ss;
|
1247
|
+
if(ss > 1 || ss < -1) {
|
1248
|
+
this._scroll(ss);
|
1249
|
+
} else {
|
1250
|
+
clearInterval(this._smoothingId);
|
1251
|
+
this._smoothingId = 0;
|
1252
|
+
}
|
1253
|
+
};
|
1254
|
+
|
1255
|
+
/** @public
|
1256
|
+
* @param {boolean=} opt_disabled
|
1257
|
+
*/
|
1258
|
+
Scrollbar.prototype.disableMouseWheel = function (opt_disabled) {
|
1259
|
+
if(opt_disabled === false) {
|
1260
|
+
this.setMouseWheelLogic(this._mouseWheelLogic || this._onMouseWheel);
|
1261
|
+
} else {
|
1262
|
+
this.setMouseWheelLogic(null);
|
1263
|
+
}
|
1264
|
+
};
|
1265
|
+
/** @public
|
1266
|
+
* @ignore
|
1267
|
+
* @param {Function} handler
|
1268
|
+
*/
|
1269
|
+
Scrollbar.prototype.setMouseWheelLogic = function (handler) {
|
1270
|
+
this.removeWheelListener(this._parentNode);
|
1271
|
+
|
1272
|
+
this._mouseWheelLogic = handler;
|
1273
|
+
|
1274
|
+
if(this._mouseWheelLogic) {
|
1275
|
+
// Wheel listener should be added to parentNode (utilizing event bubbling)
|
1276
|
+
this.addWheelListener(this._parentNode);
|
1277
|
+
}
|
1278
|
+
};
|
1279
|
+
/** @public
|
1280
|
+
* @param {Element} elem Element that will trigger scrolling by mouse wheel
|
1281
|
+
*/
|
1282
|
+
Scrollbar.prototype.addWheelListener = function (elem) {
|
1283
|
+
if(elem && this._mouseWheelLogic) {
|
1284
|
+
// Note that this wheel event can not use passive options ({passive: false}) because of the need to prevent default behavior
|
1285
|
+
elem.addEventListener("wheel", this._mouseWheelLogic, false);
|
1286
|
+
}
|
1287
|
+
};
|
1288
|
+
/** @public
|
1289
|
+
* @param {Element} elem Element that will trigger scrolling by mouse wheel
|
1290
|
+
*/
|
1291
|
+
Scrollbar.prototype.removeWheelListener = function (elem) {
|
1292
|
+
if(elem && this._mouseWheelLogic) {
|
1293
|
+
elem.removeEventListener("wheel", this._mouseWheelLogic, false);
|
1294
|
+
}
|
1295
|
+
};
|
1296
|
+
/** @public
|
1297
|
+
* @param {string} val
|
1298
|
+
*/
|
1299
|
+
Scrollbar.prototype.setMouseWheelSpeed = function (val) {
|
1300
|
+
this._wheelScrolling = typeof val == "string" ? val : "";
|
1301
|
+
};
|
1302
|
+
/** @public
|
1303
|
+
* @ignore
|
1304
|
+
* @return {string}
|
1305
|
+
*/
|
1306
|
+
Scrollbar.prototype.getMouseWheelSpeed = function () {
|
1307
|
+
return this._wheelScrolling;
|
1308
|
+
};
|
1309
|
+
/** @public
|
1310
|
+
* @return {function(Event)} Mouse wheel logic that is attached to this instance
|
1311
|
+
*/
|
1312
|
+
Scrollbar.prototype.getDefaultMouseWheelLogic = function () {
|
1313
|
+
return this._onMouseWheel;
|
1314
|
+
};
|
1315
|
+
/** TODO: Support mouse wheel (currently works only touchpad wheel)
|
1316
|
+
* @private
|
1317
|
+
* @param {Event} e
|
1318
|
+
*/
|
1319
|
+
Scrollbar.prototype._onMouseWheel = function (e) {
|
1320
|
+
if (this._isFrozen) {
|
1321
|
+
Util._preventDefault(e);
|
1322
|
+
return;
|
1323
|
+
}
|
1324
|
+
if(e.ctrlKey || e.altKey || e.shiftKey) { return; }
|
1325
|
+
if (!this.isActive()) { return; }
|
1326
|
+
|
1327
|
+
var delta = (this._vertical) ? e["deltaY"] : e["deltaX"];
|
1328
|
+
|
1329
|
+
if(!delta) { return; }
|
1330
|
+
|
1331
|
+
if(this._isOnEdge(delta)) { return; }
|
1332
|
+
|
1333
|
+
// We must prevent on a passive event such as "wheel" to prevent default scrolling of the window
|
1334
|
+
Util._preventDefault(e);
|
1335
|
+
|
1336
|
+
// Only Firefox implements deltaMode. All other browsers use DOM_DELTA_PIXEL in most of the cases
|
1337
|
+
// See https://github.com/w3c/uievents/issues/181 and https://github.com/svgdotjs/svg.panzoom.js/issues/67
|
1338
|
+
// Hence, we need to normalize the delta value, so every browser have similar mousewheel behaviors.
|
1339
|
+
if(e.deltaMode) { // https://developer.mozilla.org/en-US/docs/Web/API/WheelEvent/deltaMode
|
1340
|
+
delta = (delta > 0) ? 100 : -100; // WARNING: We use estimated value, since there is no simple way to calculate actual pixel value
|
1341
|
+
}
|
1342
|
+
|
1343
|
+
if(this._wheelScrolling != "linear") {
|
1344
|
+
var scrollSize = this.getContentSize();
|
1345
|
+
if(scrollSize >= 4000) { // Scaling for large content
|
1346
|
+
delta *= 1 + scrollSize / 4000 | 0; // If scrollSize == 4000, delta *= 2. If scrollSize == 8000, delta *= 3
|
1347
|
+
}
|
1348
|
+
}
|
1349
|
+
|
1350
|
+
this.update();
|
1351
|
+
this._scroll(delta);
|
1352
|
+
};
|
1353
|
+
/** @public
|
1354
|
+
* @param {number} px
|
1355
|
+
*/
|
1356
|
+
Scrollbar.prototype.setScrollingStep = function (px) {
|
1357
|
+
this._step = (px > 0) ? px : 0;
|
1358
|
+
};
|
1359
|
+
|
1360
|
+
/** prevent all scrollbar action using stopPropagation and preventDefault
|
1361
|
+
* @public
|
1362
|
+
* @param {boolean=} frozen=true
|
1363
|
+
* @return {boolean} return previous frozen status
|
1364
|
+
*/
|
1365
|
+
Scrollbar.prototype.freezeScrolling = function (frozen) {
|
1366
|
+
var prev = this._isFrozen;
|
1367
|
+
this._isFrozen = frozen !== false;
|
1368
|
+
return prev;
|
1369
|
+
};
|
1370
|
+
|
1371
|
+
Scrollbar._proto = Scrollbar.prototype;
|
1372
|
+
|
1373
|
+
export default Scrollbar;
|
1374
|
+
export { Scrollbar };
|