@refinitiv-ui/efx-grid 0.0.0-dev.12023565035.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +17 -0
- package/README.md +61 -0
- package/lib/column-dragging/es6/ColumnDragging.d.ts +51 -0
- package/lib/column-dragging/es6/ColumnDragging.js +968 -0
- package/lib/column-dragging/es6/index.d.ts +1 -0
- package/lib/column-dragging/es6/index.js +1 -0
- package/lib/column-format-dialog/index.d.ts +2 -0
- package/lib/column-format-dialog/index.js +2 -0
- package/lib/column-format-dialog/lib/column-format-dialog.d.ts +77 -0
- package/lib/column-format-dialog/lib/column-format-dialog.js +2688 -0
- package/lib/column-format-dialog/lib/locale/translation-de.d.ts +7 -0
- package/lib/column-format-dialog/lib/locale/translation-de.js +94 -0
- package/lib/column-format-dialog/lib/locale/translation-en.d.ts +7 -0
- package/lib/column-format-dialog/lib/locale/translation-en.js +94 -0
- package/lib/column-format-dialog/lib/locale/translation-ja.d.ts +7 -0
- package/lib/column-format-dialog/lib/locale/translation-ja.js +94 -0
- package/lib/column-format-dialog/lib/locale/translation-zh-hant.d.ts +7 -0
- package/lib/column-format-dialog/lib/locale/translation-zh-hant.js +94 -0
- package/lib/column-format-dialog/lib/locale/translation-zh.d.ts +7 -0
- package/lib/column-format-dialog/lib/locale/translation-zh.js +94 -0
- package/lib/column-format-dialog/lib/locale/translation.d.ts +11 -0
- package/lib/column-format-dialog/lib/locale/translation.js +18 -0
- package/lib/column-format-dialog/lib/preview-table.d.ts +151 -0
- package/lib/column-format-dialog/lib/preview-table.js +982 -0
- package/lib/column-format-dialog/themes/base.less +429 -0
- package/lib/column-format-dialog/themes/elemental/column-format-dialog.less +1 -0
- package/lib/column-format-dialog/themes/elemental/dark/column-format-dialog.js +4 -0
- package/lib/column-format-dialog/themes/elemental/dark/css/native-elements.css +0 -0
- package/lib/column-format-dialog/themes/elemental/dark/es5/all-elements.js +2 -0
- package/lib/column-format-dialog/themes/elemental/dark/imports/all-elements.js +1 -0
- package/lib/column-format-dialog/themes/elemental/dark/imports/custom-elements.js +1 -0
- package/lib/column-format-dialog/themes/elemental/dark/imports/native-elements.js +0 -0
- package/lib/column-format-dialog/themes/elemental/dark.js +16 -0
- package/lib/column-format-dialog/themes/elemental/defaults.less +1 -0
- package/lib/column-format-dialog/themes/elemental/index.less +5 -0
- package/lib/column-format-dialog/themes/elemental/light/column-format-dialog.js +4 -0
- package/lib/column-format-dialog/themes/elemental/light/css/native-elements.css +0 -0
- package/lib/column-format-dialog/themes/elemental/light/es5/all-elements.js +2 -0
- package/lib/column-format-dialog/themes/elemental/light/imports/all-elements.js +1 -0
- package/lib/column-format-dialog/themes/elemental/light/imports/custom-elements.js +1 -0
- package/lib/column-format-dialog/themes/elemental/light/imports/native-elements.js +0 -0
- package/lib/column-format-dialog/themes/elemental/light.js +16 -0
- package/lib/column-format-dialog/themes/halo/column-format-dialog.less +6 -0
- package/lib/column-format-dialog/themes/halo/dark/column-format-dialog.js +4 -0
- package/lib/column-format-dialog/themes/halo/dark/css/native-elements.css +0 -0
- package/lib/column-format-dialog/themes/halo/dark/es5/all-elements.js +2 -0
- package/lib/column-format-dialog/themes/halo/dark/imports/all-elements.js +1 -0
- package/lib/column-format-dialog/themes/halo/dark/imports/custom-elements.js +1 -0
- package/lib/column-format-dialog/themes/halo/dark/imports/native-elements.js +0 -0
- package/lib/column-format-dialog/themes/halo/dark.js +16 -0
- package/lib/column-format-dialog/themes/halo/defaults.less +1 -0
- package/lib/column-format-dialog/themes/halo/index.less +5 -0
- package/lib/column-format-dialog/themes/halo/light/column-format-dialog.js +4 -0
- package/lib/column-format-dialog/themes/halo/light/css/native-elements.css +0 -0
- package/lib/column-format-dialog/themes/halo/light/es5/all-elements.js +2 -0
- package/lib/column-format-dialog/themes/halo/light/imports/all-elements.js +1 -0
- package/lib/column-format-dialog/themes/halo/light/imports/custom-elements.js +1 -0
- package/lib/column-format-dialog/themes/halo/light/imports/native-elements.js +0 -0
- package/lib/column-format-dialog/themes/halo/light.js +16 -0
- package/lib/column-format-dialog/themes/luna/column-format-dialog.less +1 -0
- package/lib/column-format-dialog/themes/luna/default/column-format-dialog.js +4 -0
- package/lib/column-format-dialog/themes/luna/default/css/native-elements.css +0 -0
- package/lib/column-format-dialog/themes/luna/default/es5/all-elements.js +2 -0
- package/lib/column-format-dialog/themes/luna/default/imports/all-elements.js +1 -0
- package/lib/column-format-dialog/themes/luna/default/imports/custom-elements.js +1 -0
- package/lib/column-format-dialog/themes/luna/default/imports/native-elements.js +0 -0
- package/lib/column-format-dialog/themes/luna/defaults.less +1 -0
- package/lib/column-format-dialog/themes/luna/index.less +5 -0
- package/lib/column-format-dialog/themes/solar/charcoal/column-format-dialog.js +4 -0
- package/lib/column-format-dialog/themes/solar/charcoal/css/native-elements.css +0 -0
- package/lib/column-format-dialog/themes/solar/charcoal/es5/all-elements.js +2 -0
- package/lib/column-format-dialog/themes/solar/charcoal/imports/all-elements.js +1 -0
- package/lib/column-format-dialog/themes/solar/charcoal/imports/custom-elements.js +1 -0
- package/lib/column-format-dialog/themes/solar/charcoal/imports/native-elements.js +0 -0
- package/lib/column-format-dialog/themes/solar/charcoal.js +16 -0
- package/lib/column-format-dialog/themes/solar/column-format-dialog.less +6 -0
- package/lib/column-format-dialog/themes/solar/defaults.less +1 -0
- package/lib/column-format-dialog/themes/solar/index.less +5 -0
- package/lib/column-format-dialog/themes/solar/pearl/column-format-dialog.js +4 -0
- package/lib/column-format-dialog/themes/solar/pearl/css/native-elements.css +0 -0
- package/lib/column-format-dialog/themes/solar/pearl/es5/all-elements.js +2 -0
- package/lib/column-format-dialog/themes/solar/pearl/imports/all-elements.js +1 -0
- package/lib/column-format-dialog/themes/solar/pearl/imports/custom-elements.js +1 -0
- package/lib/column-format-dialog/themes/solar/pearl/imports/native-elements.js +0 -0
- package/lib/column-format-dialog/themes/solar/pearl.js +16 -0
- package/lib/column-selection-dialog/index.d.ts +2 -0
- package/lib/column-selection-dialog/index.js +2 -0
- package/lib/column-selection-dialog/lib/column-selection-dialog.d.ts +66 -0
- package/lib/column-selection-dialog/lib/column-selection-dialog.js +2034 -0
- package/lib/column-selection-dialog/lib/locale/translation-de.d.ts +7 -0
- package/lib/column-selection-dialog/lib/locale/translation-de.js +20 -0
- package/lib/column-selection-dialog/lib/locale/translation-en.d.ts +7 -0
- package/lib/column-selection-dialog/lib/locale/translation-en.js +20 -0
- package/lib/column-selection-dialog/lib/locale/translation-ja.d.ts +7 -0
- package/lib/column-selection-dialog/lib/locale/translation-ja.js +20 -0
- package/lib/column-selection-dialog/lib/locale/translation-zh-hant.d.ts +7 -0
- package/lib/column-selection-dialog/lib/locale/translation-zh-hant.js +20 -0
- package/lib/column-selection-dialog/lib/locale/translation-zh.d.ts +7 -0
- package/lib/column-selection-dialog/lib/locale/translation-zh.js +20 -0
- package/lib/column-selection-dialog/lib/locale/translation.d.ts +11 -0
- package/lib/column-selection-dialog/lib/locale/translation.js +18 -0
- package/lib/column-selection-dialog/themes/base.less +258 -0
- package/lib/column-selection-dialog/themes/elemental/column-selection-dialog.less +1 -0
- package/lib/column-selection-dialog/themes/elemental/dark/column-selection-dialog.js +4 -0
- package/lib/column-selection-dialog/themes/elemental/dark/css/native-elements.css +0 -0
- package/lib/column-selection-dialog/themes/elemental/dark/es5/all-elements.js +2 -0
- package/lib/column-selection-dialog/themes/elemental/dark/imports/all-elements.js +1 -0
- package/lib/column-selection-dialog/themes/elemental/dark/imports/custom-elements.js +1 -0
- package/lib/column-selection-dialog/themes/elemental/dark/imports/native-elements.js +0 -0
- package/lib/column-selection-dialog/themes/elemental/dark.js +8 -0
- package/lib/column-selection-dialog/themes/elemental/defaults.less +1 -0
- package/lib/column-selection-dialog/themes/elemental/index.less +5 -0
- package/lib/column-selection-dialog/themes/elemental/light/column-selection-dialog.js +4 -0
- package/lib/column-selection-dialog/themes/elemental/light/css/native-elements.css +0 -0
- package/lib/column-selection-dialog/themes/elemental/light/es5/all-elements.js +2 -0
- package/lib/column-selection-dialog/themes/elemental/light/imports/all-elements.js +1 -0
- package/lib/column-selection-dialog/themes/elemental/light/imports/custom-elements.js +1 -0
- package/lib/column-selection-dialog/themes/elemental/light/imports/native-elements.js +0 -0
- package/lib/column-selection-dialog/themes/elemental/light.js +8 -0
- package/lib/column-selection-dialog/themes/halo/column-selection-dialog.less +25 -0
- package/lib/column-selection-dialog/themes/halo/dark/column-selection-dialog.js +4 -0
- package/lib/column-selection-dialog/themes/halo/dark/css/native-elements.css +0 -0
- package/lib/column-selection-dialog/themes/halo/dark/es5/all-elements.js +2 -0
- package/lib/column-selection-dialog/themes/halo/dark/imports/all-elements.js +1 -0
- package/lib/column-selection-dialog/themes/halo/dark/imports/custom-elements.js +1 -0
- package/lib/column-selection-dialog/themes/halo/dark/imports/native-elements.js +0 -0
- package/lib/column-selection-dialog/themes/halo/dark.js +8 -0
- package/lib/column-selection-dialog/themes/halo/defaults.less +1 -0
- package/lib/column-selection-dialog/themes/halo/index.less +6 -0
- package/lib/column-selection-dialog/themes/halo/light/column-selection-dialog.js +4 -0
- package/lib/column-selection-dialog/themes/halo/light/css/native-elements.css +0 -0
- package/lib/column-selection-dialog/themes/halo/light/es5/all-elements.js +2 -0
- package/lib/column-selection-dialog/themes/halo/light/imports/all-elements.js +1 -0
- package/lib/column-selection-dialog/themes/halo/light/imports/custom-elements.js +1 -0
- package/lib/column-selection-dialog/themes/halo/light/imports/native-elements.js +0 -0
- package/lib/column-selection-dialog/themes/halo/light.js +8 -0
- package/lib/column-selection-dialog/themes/solar/charcoal/column-selection-dialog.js +4 -0
- package/lib/column-selection-dialog/themes/solar/charcoal/css/native-elements.css +0 -0
- package/lib/column-selection-dialog/themes/solar/charcoal/es5/all-elements.js +2 -0
- package/lib/column-selection-dialog/themes/solar/charcoal/imports/all-elements.js +1 -0
- package/lib/column-selection-dialog/themes/solar/charcoal/imports/custom-elements.js +1 -0
- package/lib/column-selection-dialog/themes/solar/charcoal/imports/native-elements.js +0 -0
- package/lib/column-selection-dialog/themes/solar/charcoal.js +8 -0
- package/lib/column-selection-dialog/themes/solar/column-selection-dialog.less +5 -0
- package/lib/column-selection-dialog/themes/solar/defaults.less +1 -0
- package/lib/column-selection-dialog/themes/solar/index.less +6 -0
- package/lib/column-selection-dialog/themes/solar/pearl/column-selection-dialog.js +4 -0
- package/lib/column-selection-dialog/themes/solar/pearl/css/native-elements.css +0 -0
- package/lib/column-selection-dialog/themes/solar/pearl/es5/all-elements.js +2 -0
- package/lib/column-selection-dialog/themes/solar/pearl/imports/all-elements.js +1 -0
- package/lib/column-selection-dialog/themes/solar/pearl/imports/custom-elements.js +1 -0
- package/lib/column-selection-dialog/themes/solar/pearl/imports/native-elements.js +0 -0
- package/lib/column-selection-dialog/themes/solar/pearl.js +8 -0
- package/lib/core/dist/core.css +1 -0
- package/lib/core/dist/core.js +33910 -0
- package/lib/core/dist/core.min.js +1 -0
- package/lib/core/es6/data/ColumnStats.d.ts +42 -0
- package/lib/core/es6/data/ColumnStats.js +428 -0
- package/lib/core/es6/data/DataCache.d.ts +43 -0
- package/lib/core/es6/data/DataCache.js +597 -0
- package/lib/core/es6/data/DataTable.d.ts +156 -0
- package/lib/core/es6/data/DataTable.js +2206 -0
- package/lib/core/es6/data/DataView.d.ts +332 -0
- package/lib/core/es6/data/DataView.js +4144 -0
- package/lib/core/es6/data/Segment.d.ts +91 -0
- package/lib/core/es6/data/Segment.js +1001 -0
- package/lib/core/es6/data/SegmentCollection.d.ts +84 -0
- package/lib/core/es6/data/SegmentCollection.js +713 -0
- package/lib/core/es6/data/WrappedView.d.ts +290 -0
- package/lib/core/es6/data/WrappedView.js +1320 -0
- package/lib/core/es6/grid/Core.d.ts +455 -0
- package/lib/core/es6/grid/Core.js +6196 -0
- package/lib/core/es6/grid/ILayoutGrid.d.ts +212 -0
- package/lib/core/es6/grid/ILayoutGrid.js +706 -0
- package/lib/core/es6/grid/LayoutGrid.d.ts +37 -0
- package/lib/core/es6/grid/LayoutGrid.js +2975 -0
- package/lib/core/es6/grid/VirtualizedLayoutGrid.d.ts +28 -0
- package/lib/core/es6/grid/VirtualizedLayoutGrid.js +1241 -0
- package/lib/core/es6/grid/components/Cell.d.ts +52 -0
- package/lib/core/es6/grid/components/Cell.js +826 -0
- package/lib/core/es6/grid/components/CellFloatingPanel.d.ts +21 -0
- package/lib/core/es6/grid/components/CellFloatingPanel.js +130 -0
- package/lib/core/es6/grid/components/CellSpan.d.ts +18 -0
- package/lib/core/es6/grid/components/CellSpan.js +99 -0
- package/lib/core/es6/grid/components/CellSpans.d.ts +40 -0
- package/lib/core/es6/grid/components/CellSpans.js +368 -0
- package/lib/core/es6/grid/components/Column.d.ts +22 -0
- package/lib/core/es6/grid/components/Column.js +618 -0
- package/lib/core/es6/grid/components/ElementWrapper.d.ts +127 -0
- package/lib/core/es6/grid/components/ElementWrapper.js +718 -0
- package/lib/core/es6/grid/components/HScrollbar.d.ts +28 -0
- package/lib/core/es6/grid/components/HScrollbar.js +241 -0
- package/lib/core/es6/grid/components/Scrollbar.d.ts +63 -0
- package/lib/core/es6/grid/components/Scrollbar.js +1413 -0
- package/lib/core/es6/grid/components/StretchedCells.d.ts +17 -0
- package/lib/core/es6/grid/components/StretchedCells.js +342 -0
- package/lib/core/es6/grid/components/VScrollbar.d.ts +18 -0
- package/lib/core/es6/grid/components/VScrollbar.js +139 -0
- package/lib/core/es6/grid/components/VirtualItems.d.ts +12 -0
- package/lib/core/es6/grid/components/VirtualItems.js +51 -0
- package/lib/core/es6/grid/event/EventDispatcher.d.ts +16 -0
- package/lib/core/es6/grid/event/EventDispatcher.js +138 -0
- package/lib/core/es6/grid/event/EventListeners.d.ts +34 -0
- package/lib/core/es6/grid/event/EventListeners.js +166 -0
- package/lib/core/es6/grid/plugins/SortableTitlePlugin.d.ts +155 -0
- package/lib/core/es6/grid/plugins/SortableTitlePlugin.js +1977 -0
- package/lib/core/es6/grid/util/CellBoundPainter.d.ts +16 -0
- package/lib/core/es6/grid/util/CellBoundPainter.js +171 -0
- package/lib/core/es6/grid/util/Conflator.d.ts +32 -0
- package/lib/core/es6/grid/util/Conflator.js +191 -0
- package/lib/core/es6/grid/util/Reverter.d.ts +14 -0
- package/lib/core/es6/grid/util/Reverter.js +79 -0
- package/lib/core/es6/grid/util/SectionSettings.d.ts +79 -0
- package/lib/core/es6/grid/util/SectionSettings.js +679 -0
- package/lib/core/es6/grid/util/SelectionList.d.ts +54 -0
- package/lib/core/es6/grid/util/SelectionList.js +491 -0
- package/lib/core/es6/grid/util/TrackLayout.d.ts +92 -0
- package/lib/core/es6/grid/util/TrackLayout.js +902 -0
- package/lib/core/es6/grid/util/Virtualizer.d.ts +40 -0
- package/lib/core/es6/grid/util/Virtualizer.js +340 -0
- package/lib/core/es6/grid/util/util.d.ts +20 -0
- package/lib/core/es6/grid/util/util.js +391 -0
- package/lib/core/es6/index.d.ts +79 -0
- package/lib/core/es6/index.js +125 -0
- package/lib/core/es6/tr-grid-theme.d.ts +5 -0
- package/lib/core/es6/tr-grid-theme.js +5 -0
- package/lib/filter-dialog/index.d.ts +2 -0
- package/lib/filter-dialog/index.js +2 -0
- package/lib/filter-dialog/lib/checkbox-list.d.ts +52 -0
- package/lib/filter-dialog/lib/checkbox-list.js +444 -0
- package/lib/filter-dialog/lib/filter-dialog.d.ts +75 -0
- package/lib/filter-dialog/lib/filter-dialog.js +1160 -0
- package/lib/filter-dialog/lib/locale/translation-de.d.ts +7 -0
- package/lib/filter-dialog/lib/locale/translation-de.js +40 -0
- package/lib/filter-dialog/lib/locale/translation-en.d.ts +7 -0
- package/lib/filter-dialog/lib/locale/translation-en.js +40 -0
- package/lib/filter-dialog/lib/locale/translation-ja.d.ts +7 -0
- package/lib/filter-dialog/lib/locale/translation-ja.js +40 -0
- package/lib/filter-dialog/lib/locale/translation-zh-hant.d.ts +7 -0
- package/lib/filter-dialog/lib/locale/translation-zh-hant.js +40 -0
- package/lib/filter-dialog/lib/locale/translation-zh.d.ts +7 -0
- package/lib/filter-dialog/lib/locale/translation-zh.js +40 -0
- package/lib/filter-dialog/lib/locale/translation.d.ts +11 -0
- package/lib/filter-dialog/lib/locale/translation.js +18 -0
- package/lib/filter-dialog/themes/base-checkbox.less +42 -0
- package/lib/filter-dialog/themes/base.less +191 -0
- package/lib/filter-dialog/themes/elemental/checkbox-list.less +3 -0
- package/lib/filter-dialog/themes/elemental/dark/checkbox-list.js +4 -0
- package/lib/filter-dialog/themes/elemental/dark/css/native-elements.css +0 -0
- package/lib/filter-dialog/themes/elemental/dark/es5/all-elements.js +4 -0
- package/lib/filter-dialog/themes/elemental/dark/filter-dialog.js +5 -0
- package/lib/filter-dialog/themes/elemental/dark/imports/all-elements.js +2 -0
- package/lib/filter-dialog/themes/elemental/dark/imports/custom-elements.js +2 -0
- package/lib/filter-dialog/themes/elemental/dark/imports/native-elements.js +0 -0
- package/lib/filter-dialog/themes/elemental/dark.js +11 -0
- package/lib/filter-dialog/themes/elemental/defaults.less +3 -0
- package/lib/filter-dialog/themes/elemental/filter-dialog.less +1 -0
- package/lib/filter-dialog/themes/elemental/index.less +6 -0
- package/lib/filter-dialog/themes/elemental/light/checkbox-list.js +4 -0
- package/lib/filter-dialog/themes/elemental/light/css/native-elements.css +0 -0
- package/lib/filter-dialog/themes/elemental/light/es5/all-elements.js +4 -0
- package/lib/filter-dialog/themes/elemental/light/filter-dialog.js +5 -0
- package/lib/filter-dialog/themes/elemental/light/imports/all-elements.js +2 -0
- package/lib/filter-dialog/themes/elemental/light/imports/custom-elements.js +2 -0
- package/lib/filter-dialog/themes/elemental/light/imports/native-elements.js +0 -0
- package/lib/filter-dialog/themes/elemental/light.js +11 -0
- package/lib/filter-dialog/themes/halo/checkbox-list.less +3 -0
- package/lib/filter-dialog/themes/halo/dark/checkbox-list.js +4 -0
- package/lib/filter-dialog/themes/halo/dark/css/native-elements.css +0 -0
- package/lib/filter-dialog/themes/halo/dark/es5/all-elements.js +4 -0
- package/lib/filter-dialog/themes/halo/dark/filter-dialog.js +5 -0
- package/lib/filter-dialog/themes/halo/dark/imports/all-elements.js +2 -0
- package/lib/filter-dialog/themes/halo/dark/imports/custom-elements.js +2 -0
- package/lib/filter-dialog/themes/halo/dark/imports/native-elements.js +0 -0
- package/lib/filter-dialog/themes/halo/dark.js +11 -0
- package/lib/filter-dialog/themes/halo/defaults.less +3 -0
- package/lib/filter-dialog/themes/halo/filter-dialog.less +15 -0
- package/lib/filter-dialog/themes/halo/index.less +6 -0
- package/lib/filter-dialog/themes/halo/light/checkbox-list.js +4 -0
- package/lib/filter-dialog/themes/halo/light/css/native-elements.css +0 -0
- package/lib/filter-dialog/themes/halo/light/es5/all-elements.js +4 -0
- package/lib/filter-dialog/themes/halo/light/filter-dialog.js +5 -0
- package/lib/filter-dialog/themes/halo/light/imports/all-elements.js +2 -0
- package/lib/filter-dialog/themes/halo/light/imports/custom-elements.js +2 -0
- package/lib/filter-dialog/themes/halo/light/imports/native-elements.js +0 -0
- package/lib/filter-dialog/themes/halo/light.js +11 -0
- package/lib/filter-dialog/themes/solar/charcoal/checkbox-list.js +4 -0
- package/lib/filter-dialog/themes/solar/charcoal/css/native-elements.css +0 -0
- package/lib/filter-dialog/themes/solar/charcoal/es5/all-elements.js +4 -0
- package/lib/filter-dialog/themes/solar/charcoal/filter-dialog.js +5 -0
- package/lib/filter-dialog/themes/solar/charcoal/imports/all-elements.js +2 -0
- package/lib/filter-dialog/themes/solar/charcoal/imports/custom-elements.js +2 -0
- package/lib/filter-dialog/themes/solar/charcoal/imports/native-elements.js +0 -0
- package/lib/filter-dialog/themes/solar/charcoal.js +11 -0
- package/lib/filter-dialog/themes/solar/checkbox-list.less +3 -0
- package/lib/filter-dialog/themes/solar/defaults.less +3 -0
- package/lib/filter-dialog/themes/solar/filter-dialog.less +5 -0
- package/lib/filter-dialog/themes/solar/index.less +6 -0
- package/lib/filter-dialog/themes/solar/pearl/checkbox-list.js +4 -0
- package/lib/filter-dialog/themes/solar/pearl/css/native-elements.css +0 -0
- package/lib/filter-dialog/themes/solar/pearl/es5/all-elements.js +4 -0
- package/lib/filter-dialog/themes/solar/pearl/filter-dialog.js +5 -0
- package/lib/filter-dialog/themes/solar/pearl/imports/all-elements.js +2 -0
- package/lib/filter-dialog/themes/solar/pearl/imports/custom-elements.js +2 -0
- package/lib/filter-dialog/themes/solar/pearl/imports/native-elements.js +0 -0
- package/lib/filter-dialog/themes/solar/pearl.js +11 -0
- package/lib/formatters/es6/CoralButtonFormatter.d.ts +20 -0
- package/lib/formatters/es6/CoralButtonFormatter.js +45 -0
- package/lib/formatters/es6/CoralCheckboxFormatter.d.ts +12 -0
- package/lib/formatters/es6/CoralCheckboxFormatter.js +50 -0
- package/lib/formatters/es6/CoralComboBoxFormatter.d.ts +23 -0
- package/lib/formatters/es6/CoralComboBoxFormatter.js +103 -0
- package/lib/formatters/es6/CoralIconFormatter.d.ts +21 -0
- package/lib/formatters/es6/CoralIconFormatter.js +50 -0
- package/lib/formatters/es6/CoralInputFormatter.d.ts +12 -0
- package/lib/formatters/es6/CoralInputFormatter.js +45 -0
- package/lib/formatters/es6/CoralRadioButtonFormatter.d.ts +20 -0
- package/lib/formatters/es6/CoralRadioButtonFormatter.js +85 -0
- package/lib/formatters/es6/CoralSelectFormatter.d.ts +23 -0
- package/lib/formatters/es6/CoralSelectFormatter.js +71 -0
- package/lib/formatters/es6/CoralToggleFormatter.d.ts +12 -0
- package/lib/formatters/es6/CoralToggleFormatter.js +47 -0
- package/lib/formatters/es6/DuplexEmeraldDateTimePickerFormatter.d.ts +14 -0
- package/lib/formatters/es6/DuplexEmeraldDateTimePickerFormatter.js +119 -0
- package/lib/formatters/es6/EFButtonFormatter.d.ts +20 -0
- package/lib/formatters/es6/EFButtonFormatter.js +45 -0
- package/lib/formatters/es6/EFCheckboxFormatter.d.ts +12 -0
- package/lib/formatters/es6/EFCheckboxFormatter.js +50 -0
- package/lib/formatters/es6/EFComboBoxFormatter.d.ts +23 -0
- package/lib/formatters/es6/EFComboBoxFormatter.js +78 -0
- package/lib/formatters/es6/EFDateTimePickerFormatter.d.ts +13 -0
- package/lib/formatters/es6/EFDateTimePickerFormatter.js +60 -0
- package/lib/formatters/es6/EFIconFormatter.d.ts +21 -0
- package/lib/formatters/es6/EFIconFormatter.js +50 -0
- package/lib/formatters/es6/EFNumberFieldFormatter.d.ts +12 -0
- package/lib/formatters/es6/EFNumberFieldFormatter.js +45 -0
- package/lib/formatters/es6/EFRadioButtonFormatter.d.ts +20 -0
- package/lib/formatters/es6/EFRadioButtonFormatter.js +132 -0
- package/lib/formatters/es6/EFSelectFormatter.d.ts +23 -0
- package/lib/formatters/es6/EFSelectFormatter.js +76 -0
- package/lib/formatters/es6/EFTextFieldFormatter.d.ts +12 -0
- package/lib/formatters/es6/EFTextFieldFormatter.js +40 -0
- package/lib/formatters/es6/EFToggleFormatter.d.ts +12 -0
- package/lib/formatters/es6/EFToggleFormatter.js +47 -0
- package/lib/formatters/es6/EmeraldDateTimePickerFormatter.d.ts +13 -0
- package/lib/formatters/es6/EmeraldDateTimePickerFormatter.js +55 -0
- package/lib/formatters/es6/FormatterBuilder.d.ts +26 -0
- package/lib/formatters/es6/FormatterBuilder.js +493 -0
- package/lib/formatters/es6/NumericInputFormatter.d.ts +13 -0
- package/lib/formatters/es6/NumericInputFormatter.js +64 -0
- package/lib/formatters/es6/PercentBarFormatter.d.ts +25 -0
- package/lib/formatters/es6/PercentBarFormatter.js +62 -0
- package/lib/formatters/es6/SimpleImageFormatter.d.ts +21 -0
- package/lib/formatters/es6/SimpleImageFormatter.js +64 -0
- package/lib/formatters/es6/SimpleInputFormatter.d.ts +12 -0
- package/lib/formatters/es6/SimpleInputFormatter.js +40 -0
- package/lib/formatters/es6/SimpleLinkFormatter.d.ts +21 -0
- package/lib/formatters/es6/SimpleLinkFormatter.js +48 -0
- package/lib/formatters/es6/SimpleTickerFormatter.d.ts +23 -0
- package/lib/formatters/es6/SimpleTickerFormatter.js +66 -0
- package/lib/formatters/es6/SimpleToggleFormatter.d.ts +22 -0
- package/lib/formatters/es6/SimpleToggleFormatter.js +132 -0
- package/lib/formatters/es6/TextFormatter.d.ts +12 -0
- package/lib/formatters/es6/TextFormatter.js +35 -0
- package/lib/formatters/es6/index.d.ts +64 -0
- package/lib/formatters/es6/index.js +88 -0
- package/lib/grid/index.d.ts +2 -0
- package/lib/grid/index.js +3 -0
- package/lib/grid/lib/efx-grid.d.ts +53 -0
- package/lib/grid/lib/efx-grid.js +444 -0
- package/lib/grid/themes/base.less +137 -0
- package/lib/grid/themes/ds/dark/css/native-elements.css +0 -0
- package/lib/grid/themes/ds/dark/efx-grid.js +4 -0
- package/lib/grid/themes/ds/dark/es5/all-elements.js +2 -0
- package/lib/grid/themes/ds/dark/imports/all-elements.js +1 -0
- package/lib/grid/themes/ds/dark/imports/custom-elements.js +1 -0
- package/lib/grid/themes/ds/dark/imports/native-elements.js +0 -0
- package/lib/grid/themes/ds/dark.js +3 -0
- package/lib/grid/themes/ds/efx-grid.less +207 -0
- package/lib/grid/themes/ds/index.less +3 -0
- package/lib/grid/themes/ds/light/css/native-elements.css +0 -0
- package/lib/grid/themes/ds/light/efx-grid.js +4 -0
- package/lib/grid/themes/ds/light/es5/all-elements.js +2 -0
- package/lib/grid/themes/ds/light/imports/all-elements.js +1 -0
- package/lib/grid/themes/ds/light/imports/custom-elements.js +1 -0
- package/lib/grid/themes/ds/light/imports/native-elements.js +0 -0
- package/lib/grid/themes/ds/light.js +3 -0
- package/lib/grid/themes/halo/dark/css/native-elements.css +0 -0
- package/lib/grid/themes/halo/dark/efx-grid.js +4 -0
- package/lib/grid/themes/halo/dark/es5/all-elements.js +2 -0
- package/lib/grid/themes/halo/dark/imports/all-elements.js +1 -0
- package/lib/grid/themes/halo/dark/imports/custom-elements.js +1 -0
- package/lib/grid/themes/halo/dark/imports/native-elements.js +0 -0
- package/lib/grid/themes/halo/dark.js +3 -0
- package/lib/grid/themes/halo/efx-grid.less +127 -0
- package/lib/grid/themes/halo/index.less +3 -0
- package/lib/grid/themes/halo/light/css/native-elements.css +0 -0
- package/lib/grid/themes/halo/light/efx-grid.js +4 -0
- package/lib/grid/themes/halo/light/es5/all-elements.js +2 -0
- package/lib/grid/themes/halo/light/imports/all-elements.js +1 -0
- package/lib/grid/themes/halo/light/imports/custom-elements.js +1 -0
- package/lib/grid/themes/halo/light/imports/native-elements.js +0 -0
- package/lib/grid/themes/halo/light.js +3 -0
- package/lib/grid/themes/solar/charcoal/css/native-elements.css +0 -0
- package/lib/grid/themes/solar/charcoal/efx-grid.js +4 -0
- package/lib/grid/themes/solar/charcoal/es5/all-elements.js +2 -0
- package/lib/grid/themes/solar/charcoal/imports/all-elements.js +1 -0
- package/lib/grid/themes/solar/charcoal/imports/custom-elements.js +1 -0
- package/lib/grid/themes/solar/charcoal/imports/native-elements.js +0 -0
- package/lib/grid/themes/solar/charcoal.js +3 -0
- package/lib/grid/themes/solar/efx-grid.less +27 -0
- package/lib/grid/themes/solar/index.less +3 -0
- package/lib/grid/themes/solar/pearl/css/native-elements.css +0 -0
- package/lib/grid/themes/solar/pearl/efx-grid.js +4 -0
- package/lib/grid/themes/solar/pearl/es5/all-elements.js +2 -0
- package/lib/grid/themes/solar/pearl/imports/all-elements.js +1 -0
- package/lib/grid/themes/solar/pearl/imports/custom-elements.js +1 -0
- package/lib/grid/themes/solar/pearl/imports/native-elements.js +0 -0
- package/lib/grid/themes/solar/pearl.js +3 -0
- package/lib/index.d.ts +100 -0
- package/lib/index.js +100 -0
- package/lib/row-segmenting/es6/RowSegmenting.d.ts +115 -0
- package/lib/row-segmenting/es6/RowSegmenting.js +1182 -0
- package/lib/row-segmenting/es6/index.d.ts +1 -0
- package/lib/row-segmenting/es6/index.js +1 -0
- package/lib/rt-grid/dist/rt-grid.js +54547 -0
- package/lib/rt-grid/dist/rt-grid.min.js +1 -0
- package/lib/rt-grid/es6/ColumnDefinition.d.ts +174 -0
- package/lib/rt-grid/es6/ColumnDefinition.js +1203 -0
- package/lib/rt-grid/es6/DataConnector.d.ts +43 -0
- package/lib/rt-grid/es6/DataConnector.js +290 -0
- package/lib/rt-grid/es6/FieldDefinition.d.ts +40 -0
- package/lib/rt-grid/es6/FieldDefinition.js +560 -0
- package/lib/rt-grid/es6/Grid.d.ts +376 -0
- package/lib/rt-grid/es6/Grid.js +4653 -0
- package/lib/rt-grid/es6/PredefinedFormula.d.ts +16 -0
- package/lib/rt-grid/es6/PredefinedFormula.js +33 -0
- package/lib/rt-grid/es6/ReferenceCounter.d.ts +40 -0
- package/lib/rt-grid/es6/ReferenceCounter.js +251 -0
- package/lib/rt-grid/es6/RowDefSorter.d.ts +19 -0
- package/lib/rt-grid/es6/RowDefSorter.js +231 -0
- package/lib/rt-grid/es6/RowDefinition.d.ts +156 -0
- package/lib/rt-grid/es6/RowDefinition.js +1478 -0
- package/lib/rt-grid/es6/SnapshotFiller.d.ts +36 -0
- package/lib/rt-grid/es6/SnapshotFiller.js +537 -0
- package/lib/rt-grid/es6/StyleLoader.d.ts +17 -0
- package/lib/rt-grid/es6/StyleLoader.js +47 -0
- package/lib/rt-grid/es6/index.d.ts +8 -0
- package/lib/rt-grid/es6/index.js +43 -0
- package/lib/statistics-row/es6/StatisticsRow.d.ts +68 -0
- package/lib/statistics-row/es6/StatisticsRow.js +807 -0
- package/lib/statistics-row/es6/index.d.ts +1 -0
- package/lib/statistics-row/es6/index.js +1 -0
- package/lib/tr-grid-auto-tooltip/es6/AutoTooltip.d.ts +46 -0
- package/lib/tr-grid-auto-tooltip/es6/AutoTooltip.js +617 -0
- package/lib/tr-grid-auto-tooltip/es6/index.d.ts +1 -0
- package/lib/tr-grid-auto-tooltip/es6/index.js +1 -0
- package/lib/tr-grid-cell-selection/es6/CellSelection.d.ts +70 -0
- package/lib/tr-grid-cell-selection/es6/CellSelection.js +1695 -0
- package/lib/tr-grid-cell-selection/es6/index.d.ts +1 -0
- package/lib/tr-grid-cell-selection/es6/index.js +1 -0
- package/lib/tr-grid-checkbox/es6/Checkbox.d.ts +82 -0
- package/lib/tr-grid-checkbox/es6/Checkbox.js +1704 -0
- package/lib/tr-grid-checkbox/es6/index.d.ts +1 -0
- package/lib/tr-grid-checkbox/es6/index.js +1 -0
- package/lib/tr-grid-column-fitter/es6/ColumnFitter.d.ts +56 -0
- package/lib/tr-grid-column-fitter/es6/ColumnFitter.js +817 -0
- package/lib/tr-grid-column-fitter/es6/index.d.ts +1 -0
- package/lib/tr-grid-column-fitter/es6/index.js +1 -0
- package/lib/tr-grid-column-formatting/es6/ColumnFormatting.d.ts +91 -0
- package/lib/tr-grid-column-formatting/es6/ColumnFormatting.js +617 -0
- package/lib/tr-grid-column-formatting/es6/index.d.ts +1 -0
- package/lib/tr-grid-column-formatting/es6/index.js +1 -0
- package/lib/tr-grid-column-grouping/es6/ColumnGrouping.d.ts +110 -0
- package/lib/tr-grid-column-grouping/es6/ColumnGrouping.js +2028 -0
- package/lib/tr-grid-column-grouping/es6/index.d.ts +1 -0
- package/lib/tr-grid-column-grouping/es6/index.js +1 -0
- package/lib/tr-grid-column-resizing/es6/ColumnResizing.d.ts +68 -0
- package/lib/tr-grid-column-resizing/es6/ColumnResizing.js +1010 -0
- package/lib/tr-grid-column-resizing/es6/index.d.ts +1 -0
- package/lib/tr-grid-column-resizing/es6/index.js +1 -0
- package/lib/tr-grid-column-selection/es6/ColumnSelection.d.ts +77 -0
- package/lib/tr-grid-column-selection/es6/ColumnSelection.js +1405 -0
- package/lib/tr-grid-column-selection/es6/index.d.ts +1 -0
- package/lib/tr-grid-column-selection/es6/index.js +1 -0
- package/lib/tr-grid-column-stack/es6/ColumnStack.d.ts +160 -0
- package/lib/tr-grid-column-stack/es6/ColumnStack.js +2155 -0
- package/lib/tr-grid-column-stack/es6/index.d.ts +1 -0
- package/lib/tr-grid-column-stack/es6/index.js +1 -0
- package/lib/tr-grid-conditional-coloring/es6/ConditionalColoring.d.ts +100 -0
- package/lib/tr-grid-conditional-coloring/es6/ConditionalColoring.js +1513 -0
- package/lib/tr-grid-conditional-coloring/es6/index.d.ts +1 -0
- package/lib/tr-grid-conditional-coloring/es6/index.js +1 -0
- package/lib/tr-grid-content-wrap/es6/ContentWrap.d.ts +43 -0
- package/lib/tr-grid-content-wrap/es6/ContentWrap.js +519 -0
- package/lib/tr-grid-content-wrap/es6/index.d.ts +1 -0
- package/lib/tr-grid-content-wrap/es6/index.js +1 -0
- package/lib/tr-grid-contextmenu/es6/ContextMenu.d.ts +83 -0
- package/lib/tr-grid-contextmenu/es6/ContextMenu.js +453 -0
- package/lib/tr-grid-contextmenu/es6/MenuEventAPI.d.ts +22 -0
- package/lib/tr-grid-contextmenu/es6/MenuEventAPI.js +138 -0
- package/lib/tr-grid-contextmenu/es6/MenuItem.d.ts +41 -0
- package/lib/tr-grid-contextmenu/es6/MenuItem.js +285 -0
- package/lib/tr-grid-contextmenu/es6/PopupMenu.d.ts +33 -0
- package/lib/tr-grid-contextmenu/es6/PopupMenu.js +303 -0
- package/lib/tr-grid-contextmenu/es6/index.d.ts +1 -0
- package/lib/tr-grid-contextmenu/es6/index.js +1 -0
- package/lib/tr-grid-filter-input/es6/FilterInput.d.ts +64 -0
- package/lib/tr-grid-filter-input/es6/FilterInput.js +1027 -0
- package/lib/tr-grid-filter-input/es6/index.d.ts +1 -0
- package/lib/tr-grid-filter-input/es6/index.js +1 -0
- package/lib/tr-grid-heat-map/es6/HeatMap.d.ts +45 -0
- package/lib/tr-grid-heat-map/es6/HeatMap.js +401 -0
- package/lib/tr-grid-heat-map/es6/index.d.ts +1 -0
- package/lib/tr-grid-heat-map/es6/index.js +1 -0
- package/lib/tr-grid-in-cell-editing/es6/InCellEditing.d.ts +148 -0
- package/lib/tr-grid-in-cell-editing/es6/InCellEditing.js +2671 -0
- package/lib/tr-grid-in-cell-editing/es6/index.d.ts +1 -0
- package/lib/tr-grid-in-cell-editing/es6/index.js +1 -0
- package/lib/tr-grid-pagination/es6/Pagination.d.ts +58 -0
- package/lib/tr-grid-pagination/es6/Pagination.js +433 -0
- package/lib/tr-grid-pagination/es6/index.d.ts +1 -0
- package/lib/tr-grid-pagination/es6/index.js +1 -0
- package/lib/tr-grid-percent-bar/es6/PercentBar.d.ts +60 -0
- package/lib/tr-grid-percent-bar/es6/PercentBar.js +804 -0
- package/lib/tr-grid-percent-bar/es6/index.d.ts +1 -0
- package/lib/tr-grid-percent-bar/es6/index.js +1 -0
- package/lib/tr-grid-printer/es6/CellWriter.d.ts +50 -0
- package/lib/tr-grid-printer/es6/CellWriter.js +234 -0
- package/lib/tr-grid-printer/es6/ColumnWriter.d.ts +13 -0
- package/lib/tr-grid-printer/es6/ColumnWriter.js +23 -0
- package/lib/tr-grid-printer/es6/GridPrinter.d.ts +33 -0
- package/lib/tr-grid-printer/es6/GridPrinter.js +794 -0
- package/lib/tr-grid-printer/es6/PrintTrait.d.ts +39 -0
- package/lib/tr-grid-printer/es6/PrintTrait.js +494 -0
- package/lib/tr-grid-printer/es6/SectionWriter.d.ts +57 -0
- package/lib/tr-grid-printer/es6/SectionWriter.js +238 -0
- package/lib/tr-grid-printer/es6/index.d.ts +1 -0
- package/lib/tr-grid-printer/es6/index.js +1 -0
- package/lib/tr-grid-range-bar/es6/LEDGuage.d.ts +39 -0
- package/lib/tr-grid-range-bar/es6/LEDGuage.js +261 -0
- package/lib/tr-grid-range-bar/es6/RangeBar.d.ts +56 -0
- package/lib/tr-grid-range-bar/es6/RangeBar.js +514 -0
- package/lib/tr-grid-range-bar/es6/index.d.ts +1 -0
- package/lib/tr-grid-range-bar/es6/index.js +1 -0
- package/lib/tr-grid-row-dragging/es6/RowDragging.d.ts +81 -0
- package/lib/tr-grid-row-dragging/es6/RowDragging.js +1479 -0
- package/lib/tr-grid-row-dragging/es6/index.d.ts +1 -0
- package/lib/tr-grid-row-dragging/es6/index.js +1 -0
- package/lib/tr-grid-row-filtering/es6/RowFiltering.d.ts +159 -0
- package/lib/tr-grid-row-filtering/es6/RowFiltering.js +2568 -0
- package/lib/tr-grid-row-filtering/es6/index.d.ts +1 -0
- package/lib/tr-grid-row-filtering/es6/index.js +1 -0
- package/lib/tr-grid-row-grouping/es6/RowGrouping.d.ts +123 -0
- package/lib/tr-grid-row-grouping/es6/RowGrouping.js +1728 -0
- package/lib/tr-grid-row-grouping/es6/index.d.ts +1 -0
- package/lib/tr-grid-row-grouping/es6/index.js +1 -0
- package/lib/tr-grid-row-selection/es6/RowSelection.d.ts +75 -0
- package/lib/tr-grid-row-selection/es6/RowSelection.js +1447 -0
- package/lib/tr-grid-row-selection/es6/index.d.ts +1 -0
- package/lib/tr-grid-row-selection/es6/index.js +1 -0
- package/lib/tr-grid-rowcoloring/es6/RowColoring.d.ts +64 -0
- package/lib/tr-grid-rowcoloring/es6/RowColoring.js +615 -0
- package/lib/tr-grid-rowcoloring/es6/index.d.ts +1 -0
- package/lib/tr-grid-rowcoloring/es6/index.js +1 -0
- package/lib/tr-grid-textformatting/es6/TextFormatting.d.ts +72 -0
- package/lib/tr-grid-textformatting/es6/TextFormatting.js +543 -0
- package/lib/tr-grid-textformatting/es6/index.d.ts +1 -0
- package/lib/tr-grid-textformatting/es6/index.js +1 -0
- package/lib/tr-grid-titlewrap/es6/TitleWrap.d.ts +27 -0
- package/lib/tr-grid-titlewrap/es6/TitleWrap.js +431 -0
- package/lib/tr-grid-titlewrap/es6/index.d.ts +1 -0
- package/lib/tr-grid-titlewrap/es6/index.js +1 -0
- package/lib/tr-grid-util/es6/CellPainter.d.ts +142 -0
- package/lib/tr-grid-util/es6/CellPainter.js +1183 -0
- package/lib/tr-grid-util/es6/Color.d.ts +40 -0
- package/lib/tr-grid-util/es6/Color.js +210 -0
- package/lib/tr-grid-util/es6/Conflator.d.ts +34 -0
- package/lib/tr-grid-util/es6/Conflator.js +193 -0
- package/lib/tr-grid-util/es6/CoralItems.d.ts +10 -0
- package/lib/tr-grid-util/es6/CoralItems.js +42 -0
- package/lib/tr-grid-util/es6/DateTime.d.ts +57 -0
- package/lib/tr-grid-util/es6/DateTime.js +508 -0
- package/lib/tr-grid-util/es6/Deferred.d.ts +16 -0
- package/lib/tr-grid-util/es6/Deferred.js +108 -0
- package/lib/tr-grid-util/es6/Delay.d.ts +20 -0
- package/lib/tr-grid-util/es6/Delay.js +96 -0
- package/lib/tr-grid-util/es6/Dom.d.ts +32 -0
- package/lib/tr-grid-util/es6/Dom.js +350 -0
- package/lib/tr-grid-util/es6/DragUI.d.ts +20 -0
- package/lib/tr-grid-util/es6/DragUI.js +263 -0
- package/lib/tr-grid-util/es6/ElementObserver.d.ts +12 -0
- package/lib/tr-grid-util/es6/ElementObserver.js +134 -0
- package/lib/tr-grid-util/es6/ElementWrapper.d.ts +23 -0
- package/lib/tr-grid-util/es6/ElementWrapper.js +84 -0
- package/lib/tr-grid-util/es6/ElfDate.d.ts +26 -0
- package/lib/tr-grid-util/es6/ElfDate.js +164 -0
- package/lib/tr-grid-util/es6/ElfUtil.d.ts +46 -0
- package/lib/tr-grid-util/es6/ElfUtil.js +637 -0
- package/lib/tr-grid-util/es6/EventDispatcher.d.ts +26 -0
- package/lib/tr-grid-util/es6/EventDispatcher.js +161 -0
- package/lib/tr-grid-util/es6/ExpanderIcon.d.ts +24 -0
- package/lib/tr-grid-util/es6/ExpanderIcon.js +120 -0
- package/lib/tr-grid-util/es6/ExpressionParser.d.ts +10 -0
- package/lib/tr-grid-util/es6/ExpressionParser.js +408 -0
- package/lib/tr-grid-util/es6/Ext.d.ts +10 -0
- package/lib/tr-grid-util/es6/Ext.js +52 -0
- package/lib/tr-grid-util/es6/FieldFormatter.d.ts +55 -0
- package/lib/tr-grid-util/es6/FieldFormatter.js +440 -0
- package/lib/tr-grid-util/es6/FilterBuilder.d.ts +54 -0
- package/lib/tr-grid-util/es6/FilterBuilder.js +580 -0
- package/lib/tr-grid-util/es6/FilterOperators.d.ts +56 -0
- package/lib/tr-grid-util/es6/FilterOperators.js +255 -0
- package/lib/tr-grid-util/es6/GridPlugin.d.ts +86 -0
- package/lib/tr-grid-util/es6/GridPlugin.js +1055 -0
- package/lib/tr-grid-util/es6/GroupDefinitions.d.ts +74 -0
- package/lib/tr-grid-util/es6/GroupDefinitions.js +642 -0
- package/lib/tr-grid-util/es6/Icon.d.ts +14 -0
- package/lib/tr-grid-util/es6/Icon.js +62 -0
- package/lib/tr-grid-util/es6/MouseDownTrait.d.ts +42 -0
- package/lib/tr-grid-util/es6/MouseDownTrait.js +250 -0
- package/lib/tr-grid-util/es6/MultiTableManager.d.ts +40 -0
- package/lib/tr-grid-util/es6/MultiTableManager.js +611 -0
- package/lib/tr-grid-util/es6/NumberFormatter.d.ts +85 -0
- package/lib/tr-grid-util/es6/NumberFormatter.js +528 -0
- package/lib/tr-grid-util/es6/PercentBar.d.ts +71 -0
- package/lib/tr-grid-util/es6/PercentBar.js +600 -0
- package/lib/tr-grid-util/es6/Perf.d.ts +32 -0
- package/lib/tr-grid-util/es6/Perf.js +163 -0
- package/lib/tr-grid-util/es6/Popup.d.ts +98 -0
- package/lib/tr-grid-util/es6/Popup.js +991 -0
- package/lib/tr-grid-util/es6/RangeBar.d.ts +33 -0
- package/lib/tr-grid-util/es6/RangeBar.js +260 -0
- package/lib/tr-grid-util/es6/RequestQueue.d.ts +30 -0
- package/lib/tr-grid-util/es6/RequestQueue.js +228 -0
- package/lib/tr-grid-util/es6/RowPainter.d.ts +60 -0
- package/lib/tr-grid-util/es6/RowPainter.js +448 -0
- package/lib/tr-grid-util/es6/SubTable.d.ts +78 -0
- package/lib/tr-grid-util/es6/SubTable.js +642 -0
- package/lib/tr-grid-util/es6/Table.d.ts +146 -0
- package/lib/tr-grid-util/es6/Table.js +832 -0
- package/lib/tr-grid-util/es6/TextHighlighter.d.ts +16 -0
- package/lib/tr-grid-util/es6/TextHighlighter.js +268 -0
- package/lib/tr-grid-util/es6/TickCodes.d.ts +8 -0
- package/lib/tr-grid-util/es6/TickCodes.js +33 -0
- package/lib/tr-grid-util/es6/Timer.d.ts +16 -0
- package/lib/tr-grid-util/es6/Timer.js +49 -0
- package/lib/tr-grid-util/es6/TouchProxy.d.ts +46 -0
- package/lib/tr-grid-util/es6/TouchProxy.js +212 -0
- package/lib/tr-grid-util/es6/Util.d.ts +66 -0
- package/lib/tr-grid-util/es6/Util.js +508 -0
- package/lib/tr-grid-util/es6/formula/ADCService.d.ts +11 -0
- package/lib/tr-grid-util/es6/formula/ADCService.js +72 -0
- package/lib/tr-grid-util/es6/formula/ADCSubscription.d.ts +17 -0
- package/lib/tr-grid-util/es6/formula/ADCSubscription.js +317 -0
- package/lib/tr-grid-util/es6/formula/AdFinService.d.ts +12 -0
- package/lib/tr-grid-util/es6/formula/AdFinService.js +61 -0
- package/lib/tr-grid-util/es6/formula/AdFinSubscription.d.ts +19 -0
- package/lib/tr-grid-util/es6/formula/AdFinSubscription.js +310 -0
- package/lib/tr-grid-util/es6/formula/Engine.d.ts +56 -0
- package/lib/tr-grid-util/es6/formula/Engine.js +592 -0
- package/lib/tr-grid-util/es6/formula/Formula.d.ts +68 -0
- package/lib/tr-grid-util/es6/formula/Formula.js +890 -0
- package/lib/tr-grid-util/es6/formula/IntervalSubscription.d.ts +16 -0
- package/lib/tr-grid-util/es6/formula/IntervalSubscription.js +165 -0
- package/lib/tr-grid-util/es6/formula/Realtime.d.ts +18 -0
- package/lib/tr-grid-util/es6/formula/Realtime.js +279 -0
- package/lib/tr-grid-util/es6/formula/RealtimeService.d.ts +18 -0
- package/lib/tr-grid-util/es6/formula/RealtimeService.js +203 -0
- package/lib/tr-grid-util/es6/formula/TSIService.d.ts +11 -0
- package/lib/tr-grid-util/es6/formula/TSIService.js +51 -0
- package/lib/tr-grid-util/es6/formula/TSISubscription.d.ts +18 -0
- package/lib/tr-grid-util/es6/formula/TSISubscription.js +1015 -0
- package/lib/tr-grid-util/es6/formula/VariableToken.d.ts +30 -0
- package/lib/tr-grid-util/es6/formula/VariableToken.js +314 -0
- package/lib/tr-grid-util/es6/formula/functions/AdFin.d.ts +9 -0
- package/lib/tr-grid-util/es6/formula/functions/AdFin.js +1778 -0
- package/lib/tr-grid-util/es6/formula/functions/Excel.d.ts +8 -0
- package/lib/tr-grid-util/es6/formula/functions/Excel.js +21 -0
- package/lib/tr-grid-util/es6/formula/functions/Info.d.ts +8 -0
- package/lib/tr-grid-util/es6/formula/functions/Info.js +192 -0
- package/lib/tr-grid-util/es6/formula/functions/Internal.d.ts +8 -0
- package/lib/tr-grid-util/es6/formula/functions/Internal.js +90 -0
- package/lib/tr-grid-util/es6/formula/functions/Logic.d.ts +12 -0
- package/lib/tr-grid-util/es6/formula/functions/Logic.js +176 -0
- package/lib/tr-grid-util/es6/formula/functions/Math.d.ts +18 -0
- package/lib/tr-grid-util/es6/formula/functions/Math.js +1624 -0
- package/lib/tr-grid-util/es6/formula/functions/Statistics.d.ts +18 -0
- package/lib/tr-grid-util/es6/formula/functions/Statistics.js +234 -0
- package/lib/tr-grid-util/es6/formula/functions/Text.d.ts +10 -0
- package/lib/tr-grid-util/es6/formula/functions/Text.js +676 -0
- package/lib/tr-grid-util/es6/index.d.ts +65 -0
- package/lib/tr-grid-util/es6/index.js +102 -0
- package/lib/tr-grid-util/es6/jet/Adc.d.ts +9 -0
- package/lib/tr-grid-util/es6/jet/Adc.js +268 -0
- package/lib/tr-grid-util/es6/jet/CollectionDict.d.ts +28 -0
- package/lib/tr-grid-util/es6/jet/CollectionDict.js +151 -0
- package/lib/tr-grid-util/es6/jet/DataGenerator.d.ts +136 -0
- package/lib/tr-grid-util/es6/jet/DataGenerator.js +860 -0
- package/lib/tr-grid-util/es6/jet/DataSet.d.ts +8 -0
- package/lib/tr-grid-util/es6/jet/DataSet.js +392 -0
- package/lib/tr-grid-util/es6/jet/MockArchive.d.ts +21 -0
- package/lib/tr-grid-util/es6/jet/MockArchive.js +56 -0
- package/lib/tr-grid-util/es6/jet/MockJET.d.ts +25 -0
- package/lib/tr-grid-util/es6/jet/MockJET.js +71 -0
- package/lib/tr-grid-util/es6/jet/MockQuotes.d.ts +37 -0
- package/lib/tr-grid-util/es6/jet/MockQuotes.js +199 -0
- package/lib/tr-grid-util/es6/jet/MockQuotes2.d.ts +82 -0
- package/lib/tr-grid-util/es6/jet/MockQuotes2.js +890 -0
- package/lib/tr-grid-util/es6/jet/MockRTK.d.ts +48 -0
- package/lib/tr-grid-util/es6/jet/MockRTK.js +82 -0
- package/lib/tr-grid-util/es6/jet/MockUtil.d.ts +7 -0
- package/lib/tr-grid-util/es6/jet/MockUtil.js +25 -0
- package/lib/tr-grid-util/es6/jet/index.d.ts +9 -0
- package/lib/tr-grid-util/es6/jet/index.js +18 -0
- package/lib/tr-grid-util/es6/jet/mockDataAPI.d.ts +11 -0
- package/lib/tr-grid-util/es6/jet/mockDataAPI.js +111 -0
- package/lib/tr-grid-util/es6/jsx.d.ts +223 -0
- package/lib/tr-grid-util/es6/locale/translation-de.d.ts +7 -0
- package/lib/tr-grid-util/es6/locale/translation-de.js +51 -0
- package/lib/tr-grid-util/es6/locale/translation-en.d.ts +7 -0
- package/lib/tr-grid-util/es6/locale/translation-en.js +51 -0
- package/lib/tr-grid-util/es6/locale/translation-ja.d.ts +7 -0
- package/lib/tr-grid-util/es6/locale/translation-ja.js +51 -0
- package/lib/tr-grid-util/es6/locale/translation-zh-hant.d.ts +7 -0
- package/lib/tr-grid-util/es6/locale/translation-zh-hant.js +51 -0
- package/lib/tr-grid-util/es6/locale/translation-zh.d.ts +7 -0
- package/lib/tr-grid-util/es6/locale/translation-zh.js +51 -0
- package/lib/tr-grid-util/es6/locale/translation.d.ts +11 -0
- package/lib/tr-grid-util/es6/locale/translation.js +18 -0
- package/lib/types/es6/AutoTooltip.d.ts +46 -0
- package/lib/types/es6/CellSelection.d.ts +70 -0
- package/lib/types/es6/Checkbox.d.ts +82 -0
- package/lib/types/es6/ColumnDragging.d.ts +51 -0
- package/lib/types/es6/ColumnFitter.d.ts +56 -0
- package/lib/types/es6/ColumnFormatting.d.ts +92 -0
- package/lib/types/es6/ColumnGrouping.d.ts +107 -0
- package/lib/types/es6/ColumnResizing.d.ts +68 -0
- package/lib/types/es6/ColumnSelection.d.ts +77 -0
- package/lib/types/es6/ColumnStack.d.ts +160 -0
- package/lib/types/es6/CompositeGrid/CollapsibleHeaderPlugin.d.ts +11 -0
- package/lib/types/es6/CompositeGrid/ColumnSelectionPlugin.d.ts +41 -0
- package/lib/types/es6/CompositeGrid/ColumnWidthAdjustingPlugin.d.ts +45 -0
- package/lib/types/es6/CompositeGrid/CompositeGrid.d.ts +289 -0
- package/lib/types/es6/CompositeGrid/DragAndDropTitlePlugin.d.ts +23 -0
- package/lib/types/es6/CompositeGrid/DraggableContentPlugin.d.ts +41 -0
- package/lib/types/es6/CompositeGrid/Plugin.d.ts +30 -0
- package/lib/types/es6/CompositeGrid/ResizableTitlePlugin.d.ts +32 -0
- package/lib/types/es6/CompositeGrid/RowSelectionPlugin.d.ts +44 -0
- package/lib/types/es6/CompositeGrid/TextWidthCalculator.d.ts +24 -0
- package/lib/types/es6/CompositeGrid/TreeIndentingPlugin.d.ts +46 -0
- package/lib/types/es6/CompositeGrid/index.d.ts +9 -0
- package/lib/types/es6/ConditionalColoring.d.ts +100 -0
- package/lib/types/es6/ContentWrap.d.ts +43 -0
- package/lib/types/es6/ContextMenu.d.ts +83 -0
- package/lib/types/es6/CoralButtonFormatter.d.ts +20 -0
- package/lib/types/es6/CoralCheckboxFormatter.d.ts +12 -0
- package/lib/types/es6/CoralComboBoxFormatter.d.ts +23 -0
- package/lib/types/es6/CoralIconFormatter.d.ts +21 -0
- package/lib/types/es6/CoralInputFormatter.d.ts +12 -0
- package/lib/types/es6/CoralRadioButtonFormatter.d.ts +20 -0
- package/lib/types/es6/CoralSelectFormatter.d.ts +23 -0
- package/lib/types/es6/CoralToggleFormatter.d.ts +12 -0
- package/lib/types/es6/Core/data/ColumnStats.d.ts +42 -0
- package/lib/types/es6/Core/data/DataCache.d.ts +43 -0
- package/lib/types/es6/Core/data/DataTable.d.ts +156 -0
- package/lib/types/es6/Core/data/DataView.d.ts +332 -0
- package/lib/types/es6/Core/data/Segment.d.ts +91 -0
- package/lib/types/es6/Core/data/SegmentCollection.d.ts +84 -0
- package/lib/types/es6/Core/data/WrappedView.d.ts +290 -0
- package/lib/types/es6/Core/grid/Core.d.ts +455 -0
- package/lib/types/es6/Core/grid/ILayoutGrid.d.ts +212 -0
- package/lib/types/es6/Core/grid/LayoutGrid.d.ts +37 -0
- package/lib/types/es6/Core/grid/VirtualizedLayoutGrid.d.ts +28 -0
- package/lib/types/es6/Core/grid/components/Cell.d.ts +52 -0
- package/lib/types/es6/Core/grid/components/CellFloatingPanel.d.ts +21 -0
- package/lib/types/es6/Core/grid/components/CellSpan.d.ts +18 -0
- package/lib/types/es6/Core/grid/components/CellSpans.d.ts +40 -0
- package/lib/types/es6/Core/grid/components/Column.d.ts +22 -0
- package/lib/types/es6/Core/grid/components/ElementWrapper.d.ts +127 -0
- package/lib/types/es6/Core/grid/components/HScrollbar.d.ts +28 -0
- package/lib/types/es6/Core/grid/components/Scrollbar.d.ts +63 -0
- package/lib/types/es6/Core/grid/components/StretchedCells.d.ts +17 -0
- package/lib/types/es6/Core/grid/components/VScrollbar.d.ts +18 -0
- package/lib/types/es6/Core/grid/components/VirtualItems.d.ts +12 -0
- package/lib/types/es6/Core/grid/event/EventDispatcher.d.ts +16 -0
- package/lib/types/es6/Core/grid/event/EventListeners.d.ts +34 -0
- package/lib/types/es6/Core/grid/plugins/SortableTitlePlugin.d.ts +155 -0
- package/lib/types/es6/Core/grid/util/CellBoundPainter.d.ts +16 -0
- package/lib/types/es6/Core/grid/util/Conflator.d.ts +32 -0
- package/lib/types/es6/Core/grid/util/Reverter.d.ts +14 -0
- package/lib/types/es6/Core/grid/util/SectionSettings.d.ts +79 -0
- package/lib/types/es6/Core/grid/util/SelectionList.d.ts +54 -0
- package/lib/types/es6/Core/grid/util/TrackLayout.d.ts +92 -0
- package/lib/types/es6/Core/grid/util/Virtualizer.d.ts +40 -0
- package/lib/types/es6/Core/grid/util/util.d.ts +20 -0
- package/lib/types/es6/Core/index.d.ts +79 -0
- package/lib/types/es6/Core/tr-grid-theme.d.ts +5 -0
- package/lib/types/es6/DuplexEmeraldDateTimePickerFormatter.d.ts +14 -0
- package/lib/types/es6/EFButtonFormatter.d.ts +20 -0
- package/lib/types/es6/EFCheckboxFormatter.d.ts +12 -0
- package/lib/types/es6/EFComboBoxFormatter.d.ts +23 -0
- package/lib/types/es6/EFDateTimePickerFormatter.d.ts +13 -0
- package/lib/types/es6/EFIconFormatter.d.ts +21 -0
- package/lib/types/es6/EFNumberFieldFormatter.d.ts +12 -0
- package/lib/types/es6/EFRadioButtonFormatter.d.ts +20 -0
- package/lib/types/es6/EFSelectFormatter.d.ts +23 -0
- package/lib/types/es6/EFTextFieldFormatter.d.ts +12 -0
- package/lib/types/es6/EFToggleFormatter.d.ts +12 -0
- package/lib/types/es6/EmeraldDateTimePickerFormatter.d.ts +13 -0
- package/lib/types/es6/ExtensionColumnOptions.d.ts +41 -0
- package/lib/types/es6/ExtensionOptions.d.ts +58 -0
- package/lib/types/es6/Extensions.d.ts +63 -0
- package/lib/types/es6/FilterInput.d.ts +64 -0
- package/lib/types/es6/FormatterBuilder.d.ts +26 -0
- package/lib/types/es6/GridFormatter.d.ts +63 -0
- package/lib/types/es6/HeatMap.d.ts +45 -0
- package/lib/types/es6/InCellEditing.d.ts +148 -0
- package/lib/types/es6/MenuEventAPI.d.ts +22 -0
- package/lib/types/es6/MenuItem.d.ts +41 -0
- package/lib/types/es6/NumericInputFormatter.d.ts +13 -0
- package/lib/types/es6/Pagination.d.ts +58 -0
- package/lib/types/es6/PercentBar.d.ts +60 -0
- package/lib/types/es6/PercentBarFormatter.d.ts +25 -0
- package/lib/types/es6/PopupMenu.d.ts +33 -0
- package/lib/types/es6/RangeBar.d.ts +39 -0
- package/lib/types/es6/RealtimeGrid/ColumnDefinition.d.ts +176 -0
- package/lib/types/es6/RealtimeGrid/DataConnector.d.ts +43 -0
- package/lib/types/es6/RealtimeGrid/FieldDefinition.d.ts +40 -0
- package/lib/types/es6/RealtimeGrid/Grid.d.ts +413 -0
- package/lib/types/es6/RealtimeGrid/PredefinedFormula.d.ts +16 -0
- package/lib/types/es6/RealtimeGrid/ReferenceCounter.d.ts +40 -0
- package/lib/types/es6/RealtimeGrid/RowDefSorter.d.ts +19 -0
- package/lib/types/es6/RealtimeGrid/RowDefinition.d.ts +156 -0
- package/lib/types/es6/RealtimeGrid/SnapshotFiller.d.ts +36 -0
- package/lib/types/es6/RealtimeGrid/StyleLoader.d.ts +17 -0
- package/lib/types/es6/RealtimeGrid/index.d.ts +8 -0
- package/lib/types/es6/RowColoring.d.ts +64 -0
- package/lib/types/es6/RowDragging.d.ts +81 -0
- package/lib/types/es6/RowFiltering.d.ts +159 -0
- package/lib/types/es6/RowGrouping.d.ts +123 -0
- package/lib/types/es6/RowSegmenting.d.ts +109 -0
- package/lib/types/es6/RowSelection.d.ts +75 -0
- package/lib/types/es6/SimpleImageFormatter.d.ts +21 -0
- package/lib/types/es6/SimpleInputFormatter.d.ts +12 -0
- package/lib/types/es6/SimpleLinkFormatter.d.ts +21 -0
- package/lib/types/es6/SimpleTickerFormatter.d.ts +23 -0
- package/lib/types/es6/SimpleToggleFormatter.d.ts +22 -0
- package/lib/types/es6/StatisticsRow.d.ts +68 -0
- package/lib/types/es6/TextFormatter.d.ts +12 -0
- package/lib/types/es6/TextFormatting.d.ts +72 -0
- package/lib/types/es6/TitleWrap.d.ts +27 -0
- package/lib/types/es6/Zoom.d.ts +52 -0
- package/lib/types/es6/index.d.ts +80 -0
- package/lib/types/index.d.ts +1 -0
- package/lib/utils/index.d.ts +7 -0
- package/lib/utils/index.js +7 -0
- package/lib/versions.json +37 -0
- package/lib/window-exporter.js +18 -0
- package/lib/zoom/es6/Zoom.d.ts +52 -0
- package/lib/zoom/es6/Zoom.js +438 -0
- package/lib/zoom/es6/index.d.ts +1 -0
- package/lib/zoom/es6/index.js +1 -0
- package/package.json +69 -0
@@ -0,0 +1,991 @@
|
|
1
|
+
import { Ext } from './Ext.js';
|
2
|
+
import { EventDispatcher } from './EventDispatcher.js';
|
3
|
+
import { Dom } from './Dom.js';
|
4
|
+
|
5
|
+
/** @typedef {Object} Popup~Options
|
6
|
+
* @description Popup options
|
7
|
+
* @property {Popup~Positioning=} positioning="under" Avialable value are under, right, over, fixed, custom
|
8
|
+
* @property {boolean=} autoHiding=true Hide on blur or clicking outside of popup elements
|
9
|
+
* @property {boolean=} hoverToShow=false Show popup when mouse is over the attached element.
|
10
|
+
* @property {boolean=} autoClipping=true Clip popup element when there is not enough space to show popup
|
11
|
+
* @property {Element=} attachedElement=null Target element that will be used as a base for positioning.
|
12
|
+
* @property {Element=} focusElement=null Additional element that can be focused without triggering autoHiding
|
13
|
+
* @property {Array.<Element>=} focusElements=null Additional elements that can be focused without triggering autoHiding
|
14
|
+
* @property {Element=} parentElement=body Element that popup will become a child
|
15
|
+
* @property {Element=} contentElement=null Content element that will be moved out of document and added as a child of popup element
|
16
|
+
* @property {Popup=} popupChild=null Popup instance that will be hidden when its parent is hidden
|
17
|
+
* @property {boolean=} uiBlocking=false To attach overlay to block user from interact with ui behind popup
|
18
|
+
* @property {boolean=} hideOnScroll=true If disabled, popup will not be hidden when scrolling
|
19
|
+
* @property {Element=} zIndexReference=null Popup will be opened with zIndex greater than the given element
|
20
|
+
*/
|
21
|
+
|
22
|
+
/** @typedef {string} Popup~Positioning
|
23
|
+
* @description Available positioning type are: <br>
|
24
|
+
* <b>under</b> : Popup appears under the attached element (Default) <br>
|
25
|
+
* <b>right</b> : Popup appears on the right side of the attached element <br>
|
26
|
+
* <b>over</b> : Popup appears on the top left of the attached element (i.e. over the element) <br>
|
27
|
+
* <b>center</b>: Deprecated. Popup appears at the center of the screen. No element should be supplied <br>
|
28
|
+
* <b>fixed</b> : Popup appears without any positioning <br>
|
29
|
+
* <b>custom</b>: Popup appears without any positioning <br>
|
30
|
+
*
|
31
|
+
*/
|
32
|
+
|
33
|
+
/** @event Popup#show
|
34
|
+
* @description Fired before popup element entering the DOM tree
|
35
|
+
* @type {Object}
|
36
|
+
* @property {string} type="show"
|
37
|
+
* @property {Element} target
|
38
|
+
* @property {Element} currentTarget
|
39
|
+
* @property {boolean} cancel=false Set to true to cancel the operation
|
40
|
+
*/
|
41
|
+
/** @event Popup#hide
|
42
|
+
* @description Fired before popup element leaving the DOM tree
|
43
|
+
* @type {Object}
|
44
|
+
* @property {string} type="hide"
|
45
|
+
* @property {Element} target
|
46
|
+
* @property {Element} currentTarget
|
47
|
+
* @property {boolean} cancel=false Set to true to cancel the operation
|
48
|
+
*/
|
49
|
+
/** @event Popup#shown
|
50
|
+
* @description Fired after popup element entering the DOM tree and before positioning
|
51
|
+
* @type {Object}
|
52
|
+
* @property {string} type="shown"
|
53
|
+
* @property {Element} target
|
54
|
+
* @property {Element} currentTarget
|
55
|
+
*/
|
56
|
+
/** @event Popup#hidden
|
57
|
+
* @description Fired after popup element leaving the DOM tree
|
58
|
+
* @type {Object}
|
59
|
+
* @property {string} type="hidden"
|
60
|
+
* @property {Element} target
|
61
|
+
* @property {Element} currentTarget
|
62
|
+
*/
|
63
|
+
/** @event Popup#positioning
|
64
|
+
* @description Fired after each positioning operation
|
65
|
+
* @type {Object}
|
66
|
+
* @property {Element} target
|
67
|
+
* @property {Element} currentTarget
|
68
|
+
*/
|
69
|
+
|
70
|
+
/** Check if one of the target elements of the MouseEvent is contained inside the parentElement
|
71
|
+
* @public
|
72
|
+
* @param {Element} parentElem
|
73
|
+
* @param {MouseEvent} e
|
74
|
+
* @return {boolean}
|
75
|
+
*/
|
76
|
+
let containElements = function (parentElem, e) {
|
77
|
+
// Use e.composedPath() instead of e.target (if composedPath exists)
|
78
|
+
// when popup inside custom element and popup has been clicked
|
79
|
+
// e.target appear to be custom element itself (we expect to be element item inside popup)
|
80
|
+
// so use e.composedPath() will make the trick
|
81
|
+
if (e.composedPath) {
|
82
|
+
let elems = e.composedPath();
|
83
|
+
if (elems.indexOf(parentElem) >= 0) {
|
84
|
+
return true;
|
85
|
+
}
|
86
|
+
return parentElem.contains(elems[0]);
|
87
|
+
}
|
88
|
+
return parentElem.contains(e.target);
|
89
|
+
};
|
90
|
+
|
91
|
+
/** @constructor
|
92
|
+
* @extends {EventDispatcher}
|
93
|
+
* @param {(Element|Popup~Options)=} popupElem Popup element or popup configuration object
|
94
|
+
* @param {Popup~Options=} options
|
95
|
+
* @example
|
96
|
+
* let pu = new Popup(popupElem);
|
97
|
+
* pu.attachTo(some_elem);
|
98
|
+
* pu.show();
|
99
|
+
*/
|
100
|
+
let Popup = function (popupElem, options) {
|
101
|
+
let t = this;
|
102
|
+
t["show"] = t.show = t.show.bind(t);
|
103
|
+
t["hide"] = t.hide = t.hide.bind(t);
|
104
|
+
t["toggle"] = t.toggle = t.toggle.bind(t);
|
105
|
+
t._onBlur = t._onBlur.bind(t); // For auto hiding
|
106
|
+
t._onBlurTimer = t._onBlurTimer.bind(t); // For auto hiding
|
107
|
+
t._onResize = t._onResize.bind(t); // For throttling
|
108
|
+
t.updatePosition = t.updatePosition.bind(t); // For throttling
|
109
|
+
t._onScroll = t._onScroll.bind(t); // For throttling
|
110
|
+
t._onMouseOver = t._onMouseOver.bind(t);
|
111
|
+
t._onMouseOut = t._onMouseOut.bind(t);
|
112
|
+
t._onMouseOverTimeout = t._onMouseOverTimeout.bind(t);
|
113
|
+
|
114
|
+
if (popupElem && popupElem.nodeType !== 1) {
|
115
|
+
options = popupElem;
|
116
|
+
popupElem = null;
|
117
|
+
}
|
118
|
+
|
119
|
+
if (popupElem) {
|
120
|
+
t._elem = popupElem;
|
121
|
+
Dom.removeParent(popupElem);
|
122
|
+
} else {
|
123
|
+
t._elem = document.createElement("div");
|
124
|
+
}
|
125
|
+
t._elem.style.position = "fixed";
|
126
|
+
t._elem.style.left = "0";
|
127
|
+
t._elem.style.top = "0";
|
128
|
+
t._elem.style.display = "inline-block";
|
129
|
+
|
130
|
+
t._focusElements = [t._elem];
|
131
|
+
t._children = [];
|
132
|
+
t._evtArg = {
|
133
|
+
"target": t._elem,
|
134
|
+
"currentTarget": t._elem
|
135
|
+
};
|
136
|
+
|
137
|
+
t._parentElement = document.body;
|
138
|
+
t.init(options);
|
139
|
+
};
|
140
|
+
Ext.inherits(Popup, EventDispatcher);
|
141
|
+
|
142
|
+
/** @type {Element}
|
143
|
+
* @private
|
144
|
+
*/
|
145
|
+
Popup.prototype._elem = null;
|
146
|
+
/** @type {boolean}
|
147
|
+
* @private
|
148
|
+
*/
|
149
|
+
Popup.prototype._disabled = false;
|
150
|
+
/** @type {boolean}
|
151
|
+
* @private
|
152
|
+
*/
|
153
|
+
Popup.prototype._inDoc = false;
|
154
|
+
/** @type {boolean}
|
155
|
+
* @private
|
156
|
+
*/
|
157
|
+
Popup.prototype._autoHiding = true;
|
158
|
+
/** @type {number}
|
159
|
+
* @private
|
160
|
+
*/
|
161
|
+
Popup.prototype._blurTimer = 0;
|
162
|
+
/** @type {number}
|
163
|
+
* @private
|
164
|
+
*/
|
165
|
+
Popup.prototype._resizeTimer = 0;
|
166
|
+
|
167
|
+
/** @type {Element}
|
168
|
+
* @private
|
169
|
+
*/
|
170
|
+
Popup.prototype._attachedElem = null;
|
171
|
+
/** @type {Element}
|
172
|
+
* @private
|
173
|
+
*/
|
174
|
+
Popup.prototype._zIndexRef = null;
|
175
|
+
/** @type {string}
|
176
|
+
* @private
|
177
|
+
*/
|
178
|
+
Popup.prototype._positioning = "under";
|
179
|
+
/** @type {!Array.<Element>}
|
180
|
+
* @private
|
181
|
+
*/
|
182
|
+
Popup.prototype._focusElements;
|
183
|
+
/** @type {Element}
|
184
|
+
* @private
|
185
|
+
*/
|
186
|
+
Popup.prototype._parentElement = null;
|
187
|
+
/** @type {!Array.<Popup>}
|
188
|
+
* @private
|
189
|
+
*/
|
190
|
+
Popup.prototype._children;
|
191
|
+
/** @type {!Object}
|
192
|
+
* @private
|
193
|
+
*/
|
194
|
+
Popup.prototype._evtArg;
|
195
|
+
|
196
|
+
/** @type {boolean}
|
197
|
+
* @private
|
198
|
+
*/
|
199
|
+
Popup.prototype._autoClipping = true;
|
200
|
+
/** @type {number|string|null}
|
201
|
+
* @private
|
202
|
+
*/
|
203
|
+
Popup.prototype._origW = null;
|
204
|
+
/** @type {number|string|null}
|
205
|
+
* @private
|
206
|
+
*/
|
207
|
+
Popup.prototype._origH = null;
|
208
|
+
|
209
|
+
/** @type {boolean}
|
210
|
+
* @private
|
211
|
+
*/
|
212
|
+
Popup.prototype._hoverToShow = false;
|
213
|
+
/** @type {number}
|
214
|
+
* @private
|
215
|
+
*/
|
216
|
+
Popup.prototype._hoverTimer = 0;
|
217
|
+
/** @type {number}
|
218
|
+
* @private
|
219
|
+
*/
|
220
|
+
Popup.prototype._gap = 0;
|
221
|
+
/** @type {boolean}
|
222
|
+
* @private
|
223
|
+
*/
|
224
|
+
Popup.prototype._uiBlocking = false;
|
225
|
+
/** @type {boolean}
|
226
|
+
* @private
|
227
|
+
*/
|
228
|
+
Popup.prototype._hideOnScroll = true;
|
229
|
+
/** @type {boolean}
|
230
|
+
* @private
|
231
|
+
*/
|
232
|
+
Popup.prototype._autoRepositioning = true;
|
233
|
+
|
234
|
+
/** @public */
|
235
|
+
Popup.prototype.dispose = function () {
|
236
|
+
this._removeEventListeners();
|
237
|
+
this._clearMouseOverTimer();
|
238
|
+
|
239
|
+
for (let i = this._children.length; --i >= 0;) {
|
240
|
+
this._children[i].dispose();
|
241
|
+
}
|
242
|
+
|
243
|
+
this._inDoc = false;
|
244
|
+
Dom.removeParent(this._elem);
|
245
|
+
Dom.removeParent(this._overlay);
|
246
|
+
this._elem = this._parentElement = this._attachedElem = this._zIndexRef = null;
|
247
|
+
};
|
248
|
+
/** @public
|
249
|
+
* @return {Element}
|
250
|
+
*/
|
251
|
+
Popup.prototype.getElement = function () {
|
252
|
+
return this._elem;
|
253
|
+
};
|
254
|
+
/** @public
|
255
|
+
* @param {Element} childElem
|
256
|
+
*/
|
257
|
+
Popup.prototype.appendChild = function (childElem) {
|
258
|
+
if (childElem) {
|
259
|
+
this._elem.appendChild(childElem);
|
260
|
+
}
|
261
|
+
};
|
262
|
+
|
263
|
+
/** @public
|
264
|
+
* @param {boolean=} opt_bool
|
265
|
+
*/
|
266
|
+
Popup.prototype.disable = function (opt_bool) {
|
267
|
+
this._disabled = opt_bool !== false;
|
268
|
+
};
|
269
|
+
/** @public
|
270
|
+
* @param {boolean=} opt_bool
|
271
|
+
*/
|
272
|
+
Popup.prototype.enable = function (opt_bool) {
|
273
|
+
this._disabled = opt_bool === false;
|
274
|
+
};
|
275
|
+
|
276
|
+
/** @public
|
277
|
+
* @param {Popup~Options=} options
|
278
|
+
*/
|
279
|
+
Popup.prototype.init = function (options) {
|
280
|
+
if (!options) { return; }
|
281
|
+
|
282
|
+
let val = options["positioning"];
|
283
|
+
if (val) {
|
284
|
+
this._positioning = val;
|
285
|
+
}
|
286
|
+
val = options["autoHiding"];
|
287
|
+
if (val != null) {
|
288
|
+
this._autoHiding = val ? true : false;
|
289
|
+
}
|
290
|
+
val = options["uiBlocking"];
|
291
|
+
if (val != null) {
|
292
|
+
this.enableUIBlocking(val);
|
293
|
+
}
|
294
|
+
val = options["hoverToShow"];
|
295
|
+
if (val != null) {
|
296
|
+
this._hoverToShow = val ? true : false;
|
297
|
+
}
|
298
|
+
val = options["autoClipping"];
|
299
|
+
if (val != null) {
|
300
|
+
this._autoClipping = val ? true : false;
|
301
|
+
}
|
302
|
+
val = options["attachedElement"];
|
303
|
+
if (val !== undefined) { // eslint-disable-line
|
304
|
+
this.attachTo(val);
|
305
|
+
}
|
306
|
+
val = options["contentElement"];
|
307
|
+
if (val instanceof Element) {
|
308
|
+
this.appendChild(val);
|
309
|
+
}
|
310
|
+
val = options["parentElement"];
|
311
|
+
if (val !== undefined) { // eslint-disable-line
|
312
|
+
this.setParentElement(val);
|
313
|
+
}
|
314
|
+
val = options["popupChild"];
|
315
|
+
if (val) {
|
316
|
+
this.addPopupChild(val);
|
317
|
+
}
|
318
|
+
val = options["hideOnScroll"];
|
319
|
+
if (val != null) {
|
320
|
+
this._hideOnScroll = val ? true : false;
|
321
|
+
}
|
322
|
+
val = options["autoRepositioning"];
|
323
|
+
if (val != null) {
|
324
|
+
this._autoRepositioning = val ? true : false;
|
325
|
+
}
|
326
|
+
val = options["zIndexReference"];
|
327
|
+
if (val !== undefined) { // eslint-disable-line
|
328
|
+
this.setZIndexReference(val);
|
329
|
+
}
|
330
|
+
|
331
|
+
this.addListener(options, "show");
|
332
|
+
this.addListener(options, "hide");
|
333
|
+
this.addListener(options, "shown");
|
334
|
+
this.addListener(options, "hidden");
|
335
|
+
|
336
|
+
let fe = options["focusElement"] || options["focusElements"];
|
337
|
+
if (fe) {
|
338
|
+
if (Array.isArray(fe)) {
|
339
|
+
for (let i = fe.length; --i >= 0;) {
|
340
|
+
this.addFocusElement(fe[i]);
|
341
|
+
}
|
342
|
+
} else {
|
343
|
+
this.addFocusElement(fe);
|
344
|
+
}
|
345
|
+
}
|
346
|
+
};
|
347
|
+
|
348
|
+
/** Use {@link Popup#addPopupChild} method instead to create menu and submenus. <br>
|
349
|
+
* attachTo() method is good for creating popup suggestion.
|
350
|
+
* @public
|
351
|
+
* @param {Element} elem
|
352
|
+
* @param {Popup~Positioning=} positioning
|
353
|
+
*/
|
354
|
+
Popup.prototype.attachTo = function (elem, positioning) {
|
355
|
+
if (!elem) {
|
356
|
+
elem = null;
|
357
|
+
}
|
358
|
+
if (this._attachedElem !== elem) {
|
359
|
+
if (this._hoverToShow && this._attachedElem) {
|
360
|
+
this._attachedElem.removeEventListener("mouseover", this._onMouseOver, false);
|
361
|
+
this._attachedElem.removeEventListener("mouseout", this._onMouseOut, false);
|
362
|
+
}
|
363
|
+
this.removeFocusElement(this._attachedElem);
|
364
|
+
this._attachedElem = elem;
|
365
|
+
this.addFocusElement(this._attachedElem);
|
366
|
+
|
367
|
+
if (this._hoverToShow && this._attachedElem) {
|
368
|
+
this._attachedElem.addEventListener("mouseover", this._onMouseOver, false);
|
369
|
+
this._attachedElem.addEventListener("mouseout", this._onMouseOut, false);
|
370
|
+
}
|
371
|
+
}
|
372
|
+
if (positioning != null) {
|
373
|
+
this.setPositioning(positioning);
|
374
|
+
}
|
375
|
+
};
|
376
|
+
/** @public
|
377
|
+
* @function
|
378
|
+
* @returns {Element}
|
379
|
+
*/
|
380
|
+
Popup.prototype.getAttachedElement = function() {
|
381
|
+
return this._attachedElem;
|
382
|
+
};
|
383
|
+
/** @public
|
384
|
+
* @function
|
385
|
+
* @param {Element} elem
|
386
|
+
* @param {Popup~Positioning=} positioning
|
387
|
+
*/
|
388
|
+
Popup.prototype.setAttachedElement = Popup.prototype.attachTo;
|
389
|
+
|
390
|
+
/** @public
|
391
|
+
* @param {Element} elem
|
392
|
+
*/
|
393
|
+
Popup.prototype.addFocusElement = function (elem) {
|
394
|
+
if (elem) {
|
395
|
+
if (this._focusElements.indexOf(elem) < 0) {
|
396
|
+
this._focusElements.push(elem);
|
397
|
+
}
|
398
|
+
}
|
399
|
+
};
|
400
|
+
/** @public
|
401
|
+
* @param {Element} elem
|
402
|
+
*/
|
403
|
+
Popup.prototype.removeFocusElement = function (elem) {
|
404
|
+
if (elem) {
|
405
|
+
let at = this._focusElements.indexOf(elem);
|
406
|
+
if (at >= 0) {
|
407
|
+
this._focusElements.splice(at, 1);
|
408
|
+
}
|
409
|
+
}
|
410
|
+
};
|
411
|
+
/** @public
|
412
|
+
* @param {Popup=} popup
|
413
|
+
* @return {!Popup}
|
414
|
+
*/
|
415
|
+
Popup.prototype.addPopupChild = function (popup) {
|
416
|
+
if (!popup) {
|
417
|
+
popup = new Popup();
|
418
|
+
popup.setPositioning("right");
|
419
|
+
popup.attachTo(this._elem);
|
420
|
+
}
|
421
|
+
this.addFocusElement(popup.getElement());
|
422
|
+
this._children.push(popup);
|
423
|
+
return popup;
|
424
|
+
};
|
425
|
+
/** @public
|
426
|
+
* @param {number=} gap
|
427
|
+
*/
|
428
|
+
Popup.prototype.setPopupGap = function (gap) {
|
429
|
+
if (typeof gap === "number") {
|
430
|
+
this._gap = gap;
|
431
|
+
} else {
|
432
|
+
this._gap = 0;
|
433
|
+
}
|
434
|
+
};
|
435
|
+
|
436
|
+
/** @public
|
437
|
+
* @param {Element} parentElement
|
438
|
+
* @return {Element} In order to set parent element of popup <br>
|
439
|
+
* if parentElement is not Element (maybe undefined) then this._parentElement will be place with document.body;
|
440
|
+
*/
|
441
|
+
Popup.prototype.setParentElement = function (parentElement) {
|
442
|
+
if (parentElement instanceof Element) {
|
443
|
+
this._parentElement = parentElement;
|
444
|
+
} else {
|
445
|
+
this._parentElement = document.body;
|
446
|
+
}
|
447
|
+
return this._parentElement;
|
448
|
+
};
|
449
|
+
|
450
|
+
/** @public
|
451
|
+
* @returns {Element}
|
452
|
+
*/
|
453
|
+
Popup.prototype.getZIndexReference = function () {
|
454
|
+
return this._zIndexRef;
|
455
|
+
};
|
456
|
+
/** @public
|
457
|
+
* @param {Element} elem
|
458
|
+
*/
|
459
|
+
Popup.prototype.setZIndexReference = function (elem) {
|
460
|
+
this._zIndexRef = elem || null;
|
461
|
+
};
|
462
|
+
/** @private
|
463
|
+
* @param {Element} elem
|
464
|
+
* @returns {number}
|
465
|
+
*/
|
466
|
+
let _getComputedZIndex = function (elem) {
|
467
|
+
if(elem) {
|
468
|
+
try {
|
469
|
+
let comp = getComputedStyle(elem);
|
470
|
+
let zIndex = comp.getPropertyValue("z-index");
|
471
|
+
if(zIndex) {
|
472
|
+
return (+zIndex) || 0;
|
473
|
+
}
|
474
|
+
} catch(err) {}
|
475
|
+
}
|
476
|
+
return 0;
|
477
|
+
};
|
478
|
+
/** @private
|
479
|
+
* @param {Element} elem
|
480
|
+
* @returns {number}
|
481
|
+
*/
|
482
|
+
let _getElementZIndex = function (elem) {
|
483
|
+
if(!elem) {
|
484
|
+
return 0;
|
485
|
+
}
|
486
|
+
|
487
|
+
let zIndex = _getComputedZIndex(elem);
|
488
|
+
if(elem.getRootNode) {
|
489
|
+
let rn = elem.getRootNode();
|
490
|
+
let host = rn ? rn.host : null;
|
491
|
+
if(host) {
|
492
|
+
let rnZIndex = _getComputedZIndex(host);
|
493
|
+
return zIndex >= rnZIndex ? zIndex : rnZIndex;
|
494
|
+
}
|
495
|
+
}
|
496
|
+
return zIndex;
|
497
|
+
};
|
498
|
+
/** @private
|
499
|
+
* @param {Element} elem
|
500
|
+
* @param {number} zIndex
|
501
|
+
*/
|
502
|
+
let _setElementZIndex = function (elem, zIndex) {
|
503
|
+
if(elem) {
|
504
|
+
if(zIndex) {
|
505
|
+
elem.style.zIndex = zIndex + "";
|
506
|
+
} else if(elem.style.zIndex) {
|
507
|
+
elem.style.zIndex = "";
|
508
|
+
}
|
509
|
+
}
|
510
|
+
};
|
511
|
+
/** Recalculate popup's z-index based on existing elements and references.
|
512
|
+
* @public
|
513
|
+
*/
|
514
|
+
Popup.prototype.updateZIndex = function () {
|
515
|
+
let zIndex = _getElementZIndex(this._elem.parentNode);
|
516
|
+
let aez = _getElementZIndex(this._attachedElem);
|
517
|
+
let rez = _getElementZIndex(this._zIndexRef);
|
518
|
+
if(zIndex < aez) {
|
519
|
+
zIndex = aez;
|
520
|
+
}
|
521
|
+
if(zIndex < rez) {
|
522
|
+
zIndex = rez;
|
523
|
+
}
|
524
|
+
if(zIndex) {
|
525
|
+
++zIndex;
|
526
|
+
}
|
527
|
+
_setElementZIndex(this._elem, zIndex);
|
528
|
+
_setElementZIndex(this._overlay, zIndex);
|
529
|
+
};
|
530
|
+
/** @public
|
531
|
+
* @param {boolean=} opt_shown
|
532
|
+
* @param {Element=} parentElement
|
533
|
+
* @fires Popup#show
|
534
|
+
* @fires Popup#hide
|
535
|
+
* @fires Popup#shown
|
536
|
+
* @fires Popup#hidden
|
537
|
+
* @fires Popup#positioning
|
538
|
+
*/
|
539
|
+
Popup.prototype.show = function (opt_shown, parentElement) {
|
540
|
+
let t = this;
|
541
|
+
t._clearMouseOverTimer();
|
542
|
+
if (t._disabled) { return; }
|
543
|
+
|
544
|
+
let shown = opt_shown !== false;
|
545
|
+
let dirty = t._inDoc !== shown;
|
546
|
+
if (!dirty) {
|
547
|
+
t.updatePosition();
|
548
|
+
return;
|
549
|
+
}
|
550
|
+
|
551
|
+
let evtType = shown ? "show" : "hide";
|
552
|
+
t._evtArg["type"] = evtType;
|
553
|
+
t._dispatch(evtType, t._evtArg);
|
554
|
+
if (t._evtArg["cancel"]) {
|
555
|
+
t._evtArg["cancel"] = false;
|
556
|
+
return;
|
557
|
+
}
|
558
|
+
|
559
|
+
if (shown) {
|
560
|
+
t._inDoc = true;
|
561
|
+
|
562
|
+
if (!(parentElement instanceof Element)) {
|
563
|
+
parentElement = t._parentElement;
|
564
|
+
}
|
565
|
+
if (t._uiBlocking) {
|
566
|
+
t._attachOverlay(parentElement);
|
567
|
+
}
|
568
|
+
|
569
|
+
parentElement.appendChild(t._elem);
|
570
|
+
parentElement.addEventListener("scroll", t._onScroll, true); // TODO: Remove the listener
|
571
|
+
|
572
|
+
if (t._autoHiding) {
|
573
|
+
window.addEventListener("mousedown", t._onBlur, true);
|
574
|
+
window.addEventListener("touchstart", t._onBlur, true);
|
575
|
+
}
|
576
|
+
window.addEventListener("resize", t._onResize, false);
|
577
|
+
window.addEventListener("scroll", t._onScroll, true);
|
578
|
+
} else if (t._inDoc) {
|
579
|
+
t._removeEventListeners();
|
580
|
+
t._restoreElementSize();
|
581
|
+
|
582
|
+
for (let i = t._children.length; --i >= 0;) {
|
583
|
+
t._children[i].hide();
|
584
|
+
}
|
585
|
+
t._inDoc = false;
|
586
|
+
|
587
|
+
Dom.removeParent(t._elem);
|
588
|
+
Dom.removeParent(t._overlay);
|
589
|
+
}
|
590
|
+
|
591
|
+
|
592
|
+
|
593
|
+
if (shown) {
|
594
|
+
t.updatePosition(); // Position has to be updated after firing the event, for client element to be resized
|
595
|
+
t._evtArg["type"] = "shown";
|
596
|
+
t._dispatch("shown", t._evtArg);
|
597
|
+
} else {
|
598
|
+
t._evtArg["type"] = "hidden";
|
599
|
+
t._dispatch("hidden", t._evtArg);
|
600
|
+
}
|
601
|
+
};
|
602
|
+
/** @public
|
603
|
+
* @param {boolean=} opt_hidden
|
604
|
+
*/
|
605
|
+
Popup.prototype.hide = function (opt_hidden) {
|
606
|
+
this.show(opt_hidden === false);
|
607
|
+
};
|
608
|
+
/** Toggle showing or hiding state
|
609
|
+
* @public
|
610
|
+
* @param {boolean=} force Force the state without toggling
|
611
|
+
* @param {Element=} parentElement
|
612
|
+
* @fires Popup#show
|
613
|
+
* @fires Popup#hide
|
614
|
+
* @fires Popup#shown
|
615
|
+
* @fires Popup#hidden
|
616
|
+
* @fires Popup#positioning
|
617
|
+
*/
|
618
|
+
Popup.prototype.toggle = function (force, parentElement) {
|
619
|
+
if (force == null) {
|
620
|
+
force = !this._inDoc;
|
621
|
+
}
|
622
|
+
if (force) {
|
623
|
+
this.show(true, parentElement);
|
624
|
+
} else {
|
625
|
+
this.hide();
|
626
|
+
}
|
627
|
+
};
|
628
|
+
|
629
|
+
/** @public
|
630
|
+
* @return {boolean}
|
631
|
+
*/
|
632
|
+
Popup.prototype.isShown = function () {
|
633
|
+
return this._inDoc;
|
634
|
+
};
|
635
|
+
/** @public
|
636
|
+
* @return {boolean}
|
637
|
+
*/
|
638
|
+
Popup.prototype.isHidden = function () {
|
639
|
+
return !this._inDoc;
|
640
|
+
};
|
641
|
+
|
642
|
+
/** @public
|
643
|
+
* @param {Element|Array.<Element>} elems
|
644
|
+
* @return {boolean}
|
645
|
+
*/
|
646
|
+
Popup.prototype.contains = function (elems) {
|
647
|
+
if (elems) {
|
648
|
+
elems = Array.isArray(elems) ? elems : [elems];
|
649
|
+
|
650
|
+
let fe = this._focusElements;
|
651
|
+
for (let i = fe.length; --i >= 0;) {
|
652
|
+
if (elems.indexOf(fe[i]) >= 0 || fe[i].contains(elems[0])) {
|
653
|
+
return true;
|
654
|
+
}
|
655
|
+
}
|
656
|
+
}
|
657
|
+
return false;
|
658
|
+
};
|
659
|
+
|
660
|
+
/** @public
|
661
|
+
* @param {Popup~Positioning} posType
|
662
|
+
* @fires Popup#positioning
|
663
|
+
*/
|
664
|
+
Popup.prototype.setPositioning = function (posType) {
|
665
|
+
if (this._positioning !== posType) {
|
666
|
+
this._positioning = posType;
|
667
|
+
this.updatePosition();
|
668
|
+
}
|
669
|
+
};
|
670
|
+
|
671
|
+
/** @public
|
672
|
+
* @param {boolean=} opt_disabled
|
673
|
+
*/
|
674
|
+
Popup.prototype.disableAutoHiding = function (opt_disabled) {
|
675
|
+
let autoHiding = (opt_disabled === false);
|
676
|
+
if (this._autoHiding !== autoHiding) {
|
677
|
+
this._autoHiding = autoHiding;
|
678
|
+
if (this._inDoc) {
|
679
|
+
if (autoHiding) {
|
680
|
+
window.addEventListener("mousedown", this._onBlur, true);
|
681
|
+
window.addEventListener("touchstart", this._onBlur, true);
|
682
|
+
} else {
|
683
|
+
window.removeEventListener("mousedown", this._onBlur, true);
|
684
|
+
window.removeEventListener("touchstart", this._onBlur, true);
|
685
|
+
}
|
686
|
+
}
|
687
|
+
}
|
688
|
+
};
|
689
|
+
/** @public
|
690
|
+
* @param {boolean=} opt_disabled
|
691
|
+
*/
|
692
|
+
Popup.prototype.disableAutoRepositioning = function (opt_disabled) {
|
693
|
+
let autoRepositioning = (opt_disabled === false);
|
694
|
+
if (this._autoRepositioning !== autoRepositioning) {
|
695
|
+
this._autoRepositioning = autoRepositioning;
|
696
|
+
}
|
697
|
+
};
|
698
|
+
/** @public
|
699
|
+
* @param {boolean=} opt_disabled
|
700
|
+
*/
|
701
|
+
Popup.prototype.disableAutoClipping = function (opt_disabled) {
|
702
|
+
let autoClipping = (opt_disabled === false);
|
703
|
+
if (this._autoClipping !== autoClipping) {
|
704
|
+
this._autoClipping = autoClipping;
|
705
|
+
}
|
706
|
+
};
|
707
|
+
/** @public
|
708
|
+
* @param {boolean=} opt_disabled
|
709
|
+
*/
|
710
|
+
Popup.prototype.disableHideOnScroll = function (opt_disabled) {
|
711
|
+
let hideOnScroll = (opt_disabled === false);
|
712
|
+
if (this._hideOnScroll !== hideOnScroll) {
|
713
|
+
this._hideOnScroll = hideOnScroll;
|
714
|
+
}
|
715
|
+
};
|
716
|
+
|
717
|
+
|
718
|
+
/** @public
|
719
|
+
* @fires Popup#positioning
|
720
|
+
* @param {boolean=} fallback=true
|
721
|
+
*/
|
722
|
+
Popup.prototype.updatePosition = function (fallback) {
|
723
|
+
if(fallback == null){
|
724
|
+
fallback = true;
|
725
|
+
}
|
726
|
+
let t = this;
|
727
|
+
t._resizeTimer = 0;
|
728
|
+
|
729
|
+
if (!t._inDoc) { return; }
|
730
|
+
|
731
|
+
t.updateZIndex();
|
732
|
+
|
733
|
+
if (t._attachedElem) {
|
734
|
+
if (!t._attachedElem.offsetWidth) { // Check if attached element is visible in the DOM
|
735
|
+
return; // If the element has has no parent
|
736
|
+
}
|
737
|
+
|
738
|
+
if (t._autoClipping) {
|
739
|
+
t._restoreElementSize();
|
740
|
+
}
|
741
|
+
let refElement = document.body;
|
742
|
+
if (t._positioning === "over") {
|
743
|
+
refElement = document.documentElement;
|
744
|
+
}
|
745
|
+
let pos = Dom.getRelativePosition(t._attachedElem, refElement);
|
746
|
+
let px = pos["x"];
|
747
|
+
let py = pos["y"];
|
748
|
+
|
749
|
+
let ww = window.innerWidth;
|
750
|
+
let wh = window.innerHeight;
|
751
|
+
let sx = (window.scrollX != null) ? window.scrollX : window.pageXOffset;
|
752
|
+
let sy = (window.scrollY != null) ? window.scrollY : window.pageYOffset;
|
753
|
+
let rb = ww + sx; // view port right bound
|
754
|
+
let bb = wh + sy; // view port bottom bound
|
755
|
+
|
756
|
+
let aw = t._attachedElem.offsetWidth;
|
757
|
+
let ah = t._attachedElem.offsetHeight;
|
758
|
+
let ew = t._elem.offsetWidth;
|
759
|
+
let eh = t._elem.offsetHeight;
|
760
|
+
let x, y;
|
761
|
+
if (t._positioning == "right") {
|
762
|
+
x = px + aw + this._gap;
|
763
|
+
y = py;
|
764
|
+
} else if (t._positioning == "over") {
|
765
|
+
x = px;
|
766
|
+
y = py;
|
767
|
+
} else { // under, bottom, or etc.
|
768
|
+
x = px;
|
769
|
+
y = py + ah;
|
770
|
+
}
|
771
|
+
|
772
|
+
if(fallback){
|
773
|
+
// Re-position for each type of positioning, if the popup exceeds the bounds
|
774
|
+
if (t._positioning == "right") {
|
775
|
+
if ((x + ew > rb) && (px - ew > sx)) {
|
776
|
+
x = px - ew - this._gap;
|
777
|
+
}
|
778
|
+
if ((y + eh > bb) && (py + ah - eh > sy)) {
|
779
|
+
y = py + ah - eh;
|
780
|
+
}
|
781
|
+
} else if (t._positioning == "over") {
|
782
|
+
if ((x + ew > rb) && (px + aw - ew > sx)) {
|
783
|
+
x = px + aw - ew;
|
784
|
+
}
|
785
|
+
if ((y + eh > bb) && (py + aw - eh > sy)) {
|
786
|
+
y = py + aw - eh;
|
787
|
+
}
|
788
|
+
} else { // under, bottom, or etc.
|
789
|
+
if ((x + ew > rb) && (px + aw - ew > sx)) {
|
790
|
+
x = px + aw - ew;
|
791
|
+
}
|
792
|
+
if (y + eh > bb) {
|
793
|
+
// If popup is exceeded bottom bound
|
794
|
+
if(py - eh > sy){
|
795
|
+
y = py - eh; // move popup to top of attached element, if it has enough space
|
796
|
+
} else {
|
797
|
+
y = y - (y + eh - bb); // shift the popup up to make everything in popup visible
|
798
|
+
if(y < 0){
|
799
|
+
y = 0; // popup should not shift beyond top bound
|
800
|
+
}
|
801
|
+
}
|
802
|
+
}
|
803
|
+
}
|
804
|
+
}
|
805
|
+
|
806
|
+
if (t._autoClipping) { // Last resort of positioning
|
807
|
+
if (x + ew > rb) {
|
808
|
+
if (t._origW == null) {
|
809
|
+
t._origW = t._elem.style.width;
|
810
|
+
}
|
811
|
+
t._elem.style.width = (rb - x) + "px";
|
812
|
+
}
|
813
|
+
if (y + eh > bb) {
|
814
|
+
if (t._origH == null) {
|
815
|
+
t._origH = t._elem.style.height;
|
816
|
+
}
|
817
|
+
t._elem.style.height = (bb - y) + "px";
|
818
|
+
}
|
819
|
+
}
|
820
|
+
|
821
|
+
t._elem.style.left = Math.floor(x - sx) + "px"; // Due to fixed position we have to subtract window scrolling
|
822
|
+
t._elem.style.top = Math.floor(y - sy) + "px";
|
823
|
+
} else if (t._positioning != "fixed" && t._positioning != "custom") { // Centering at the middle
|
824
|
+
t._elem.style.left = "calc(50vw - " + Math.floor(t._elem.offsetWidth / 2) + "px)";
|
825
|
+
t._elem.style.top = "calc(46vh - " + Math.floor(t._elem.offsetHeight / 2) + "px)";
|
826
|
+
}
|
827
|
+
|
828
|
+
let evtType = "positioning";
|
829
|
+
t._evtArg["type"] = evtType;
|
830
|
+
t._dispatch(evtType, t._evtArg);
|
831
|
+
};
|
832
|
+
|
833
|
+
/** @public
|
834
|
+
* @param {boolean=} bool
|
835
|
+
* @return {boolean} previous uiBlocking state
|
836
|
+
*/
|
837
|
+
Popup.prototype.enableUIBlocking = function (bool) {
|
838
|
+
let prev = this._uiBlocking;
|
839
|
+
this._uiBlocking = bool !== false;
|
840
|
+
return prev;
|
841
|
+
};
|
842
|
+
|
843
|
+
/** @private
|
844
|
+
* @param {Element} parentElem
|
845
|
+
*/
|
846
|
+
Popup.prototype._attachOverlay = function (parentElem) {
|
847
|
+
if (!this._overlay) {
|
848
|
+
let elem = this._overlay = document.createElement('div');
|
849
|
+
|
850
|
+
// set style to overlay
|
851
|
+
let style = elem.style;
|
852
|
+
style.height = "100%";
|
853
|
+
style.width = "100%";
|
854
|
+
style.top = "0";
|
855
|
+
style.left = "0";
|
856
|
+
style.backgroundColor = "rgba(0, 0, 0, 0)"; /* transparent and no color apply */
|
857
|
+
}
|
858
|
+
|
859
|
+
|
860
|
+
if (parentElem === document.body) {
|
861
|
+
// use position fixed only for window
|
862
|
+
this._overlay.style.position = 'fixed';
|
863
|
+
} else {
|
864
|
+
// position absolute is use for any element that not body eg. Grid in shadow dom
|
865
|
+
// the overlay will cover for parent that has position relative setted
|
866
|
+
this._overlay.style.position = 'absolute';
|
867
|
+
}
|
868
|
+
parentElem.appendChild(this._overlay);
|
869
|
+
};
|
870
|
+
|
871
|
+
/** @public
|
872
|
+
* @return {Element} Overlay element
|
873
|
+
*/
|
874
|
+
Popup.prototype.getOverlayElement = function () {
|
875
|
+
return this._overlay;
|
876
|
+
};
|
877
|
+
|
878
|
+
/** @private
|
879
|
+
* @param {Object=} e
|
880
|
+
*/
|
881
|
+
Popup.prototype._onBlur = function (e) {
|
882
|
+
if (this._blurTimer || !this._inDoc) {
|
883
|
+
return;
|
884
|
+
}
|
885
|
+
if (e) {
|
886
|
+
// use e.composedPath() instead of e.target (if composedPath exists)
|
887
|
+
// when popup inside custom element and popup has been clicked
|
888
|
+
// e.target appear to be custom element itself (we expect to be element item inside popup)
|
889
|
+
// so use e.composedPath() will make the trick
|
890
|
+
if (e.composedPath) {
|
891
|
+
if (this.contains(e.composedPath())) {
|
892
|
+
return;
|
893
|
+
}
|
894
|
+
} else if (this.contains(e.target)) {
|
895
|
+
return;
|
896
|
+
}
|
897
|
+
}
|
898
|
+
|
899
|
+
this._blurTimer = setTimeout(this._onBlurTimer, 10);
|
900
|
+
};
|
901
|
+
/** @private */
|
902
|
+
Popup.prototype._onBlurTimer = function () {
|
903
|
+
this._blurTimer = 0;
|
904
|
+
if (this.contains(document.activeElement)) {
|
905
|
+
return;
|
906
|
+
}
|
907
|
+
this.hide();
|
908
|
+
};
|
909
|
+
/** @private
|
910
|
+
* @fires Popup#positioning
|
911
|
+
*/
|
912
|
+
Popup.prototype._onResize = function () {
|
913
|
+
if (!this._resizeTimer && this._inDoc && this._autoRepositioning) {
|
914
|
+
this._resizeTimer = setTimeout(this.updatePosition, 50);
|
915
|
+
}
|
916
|
+
};
|
917
|
+
/** @private
|
918
|
+
* @param {Object} e
|
919
|
+
*/
|
920
|
+
Popup.prototype._onScroll = function (e) {
|
921
|
+
// only hide if target is not child of popup and e.target not the popup itself.
|
922
|
+
if (!this.contains(e.target) && this._hideOnScroll) {
|
923
|
+
this.hide();
|
924
|
+
}
|
925
|
+
};
|
926
|
+
/** @private
|
927
|
+
* @param {Object} e
|
928
|
+
*/
|
929
|
+
Popup.prototype._onMouseOver = function (e) {
|
930
|
+
if (!this._hoverTimer && !this._inDoc) {
|
931
|
+
this._hoverTimer = setTimeout(this._onMouseOverTimeout, 500);
|
932
|
+
}
|
933
|
+
};
|
934
|
+
/** @private
|
935
|
+
* @param {Object} e
|
936
|
+
*/
|
937
|
+
Popup.prototype._onMouseOut = function (e) {
|
938
|
+
if (this._hoverTimer) {
|
939
|
+
if (!e.currentTarget.contains(e.relatedTarget)) {
|
940
|
+
this._clearMouseOverTimer();
|
941
|
+
}
|
942
|
+
}
|
943
|
+
};
|
944
|
+
/** @private
|
945
|
+
*/
|
946
|
+
Popup.prototype._onMouseOverTimeout = function () {
|
947
|
+
this._hoverTimer = 0;
|
948
|
+
this.show();
|
949
|
+
};
|
950
|
+
/** @private
|
951
|
+
*/
|
952
|
+
Popup.prototype._clearMouseOverTimer = function () {
|
953
|
+
if (this._hoverTimer) {
|
954
|
+
clearTimeout(this._hoverTimer);
|
955
|
+
this._hoverTimer = 0;
|
956
|
+
}
|
957
|
+
};
|
958
|
+
|
959
|
+
/** @private */
|
960
|
+
Popup.prototype._restoreElementSize = function () {
|
961
|
+
if (this._origW != null) {
|
962
|
+
this._elem.style.width = this._origW;
|
963
|
+
this._origW = null;
|
964
|
+
}
|
965
|
+
if (this._origH != null) {
|
966
|
+
this._elem.style.height = this._origH;
|
967
|
+
this._origH = null;
|
968
|
+
}
|
969
|
+
};
|
970
|
+
/** @private */
|
971
|
+
Popup.prototype._removeEventListeners = function () {
|
972
|
+
if (this._blurTimer) {
|
973
|
+
clearTimeout(this._blurTimer);
|
974
|
+
this._blurTimer = 0;
|
975
|
+
}
|
976
|
+
if (this._resizeTimer) {
|
977
|
+
clearTimeout(this._resizeTimer);
|
978
|
+
this._resizeTimer = 0;
|
979
|
+
}
|
980
|
+
|
981
|
+
window.removeEventListener("mousedown", this._onBlur, true);
|
982
|
+
window.removeEventListener("touchstart", this._onBlur, true);
|
983
|
+
window.removeEventListener("resize", this._onResize, false);
|
984
|
+
window.removeEventListener("scroll", this._onScroll, true);
|
985
|
+
if (this._elem.parentElement) {
|
986
|
+
this._elem.parentElement.removeEventListener("scroll", this._onScroll, true);
|
987
|
+
}
|
988
|
+
};
|
989
|
+
|
990
|
+
export { Popup, containElements };
|
991
|
+
export default Popup;
|