@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,832 @@
|
|
1
|
+
import { Dom } from "./Dom.js";
|
2
|
+
import { Ext } from "./Ext.js";
|
3
|
+
import { ElementWrapper } from "./ElementWrapper.js";
|
4
|
+
import { SubTable } from "./SubTable.js";
|
5
|
+
|
6
|
+
/** @typedef {Object} Table~Options
|
7
|
+
* @description Options for Table initialization
|
8
|
+
* @property {number=} colCount=0 Number of columns
|
9
|
+
* @property {number=} rowCount=0 Number of rows in content table (tbody)
|
10
|
+
* @property {number=} cellWidth Default cell width of each column
|
11
|
+
* @property {number=} cellHeight Default cell height of each row
|
12
|
+
* @property {number=} width Total width of the table. If it is specified, it will override cellWidth
|
13
|
+
* @property {number=} height Total height of the table. If it is specified, it will override cellHeight
|
14
|
+
* @property {number=} header=0 Number of header rows
|
15
|
+
* @property {number=} footer=0 Number of footer rows
|
16
|
+
*/
|
17
|
+
|
18
|
+
/** Table represents table (tag) element which can host multiple tbody, thead, tfoot elements at the same time
|
19
|
+
* @constructor
|
20
|
+
* @extends {ElementWrapper}
|
21
|
+
* @param {Element=} elem Element is a place holder element (e.g., div). This should not be a table (tag) element.
|
22
|
+
* @param {Table~Options=} options
|
23
|
+
* @example
|
24
|
+
* let elem = document.getElementById("table_div");
|
25
|
+
* // Create a table element with 2 columns and 3 rows inside the given element
|
26
|
+
* let tbl = new Table(elem, {colCount: 2, rowCount: 3});
|
27
|
+
*/
|
28
|
+
let Table = function(elem, options) {
|
29
|
+
let t = this;
|
30
|
+
|
31
|
+
let colCount = 0;
|
32
|
+
let rowCount = 0;
|
33
|
+
if(elem && elem.nodeType === 1) {
|
34
|
+
t._elem = /** @type{Element} */(elem);
|
35
|
+
} else {
|
36
|
+
t._elem = Dom.create("div", "inline-table");
|
37
|
+
if(typeof elem == "number") {
|
38
|
+
if(typeof options === "number") {
|
39
|
+
rowCount = options;
|
40
|
+
options = null;
|
41
|
+
}
|
42
|
+
colCount = elem;
|
43
|
+
elem = null;
|
44
|
+
}
|
45
|
+
}
|
46
|
+
t._elem.classList.add("js-table"); // Auto-generated class for generic styling
|
47
|
+
|
48
|
+
t._table = Dom.create("table");
|
49
|
+
// t._table.style.borderCollapse = "collapse"; // Collapse border by default
|
50
|
+
t._colgroup = document.createElement("colgroup");
|
51
|
+
|
52
|
+
t._tbody = new SubTable("tbody");
|
53
|
+
t._subs = [t._tbody]; // tbody will always be the first item
|
54
|
+
|
55
|
+
let configObj = null;
|
56
|
+
if(options) {
|
57
|
+
if(typeof options == "number") {
|
58
|
+
colCount = options;
|
59
|
+
} else {
|
60
|
+
configObj = /** @type{Object} */(options);
|
61
|
+
}
|
62
|
+
}
|
63
|
+
if(colCount > 0) {
|
64
|
+
t.addColumns(colCount);
|
65
|
+
}
|
66
|
+
if(rowCount > 0) {
|
67
|
+
t.addRows(rowCount);
|
68
|
+
}
|
69
|
+
t._table.appendChild(t._colgroup);
|
70
|
+
t._table.appendChild(t._tbody.getElement());
|
71
|
+
|
72
|
+
t.fixateTableWidth(); // By default, table should be able to overflow its container if it has a fixed size
|
73
|
+
|
74
|
+
t.init(configObj);
|
75
|
+
|
76
|
+
t._elem.appendChild(t._table); // Append the entire table last to save some page reflow
|
77
|
+
};
|
78
|
+
Ext.inherits(Table, ElementWrapper);
|
79
|
+
|
80
|
+
/** @type {!Element}
|
81
|
+
* @private
|
82
|
+
*/
|
83
|
+
Table.prototype._table;
|
84
|
+
/** @type {!Element}
|
85
|
+
* @private
|
86
|
+
*/
|
87
|
+
Table.prototype._colgroup;
|
88
|
+
/** @type {number}
|
89
|
+
* @private
|
90
|
+
*/
|
91
|
+
Table.prototype._colCount = 0;
|
92
|
+
/** @type {number|null}
|
93
|
+
* @private
|
94
|
+
*/
|
95
|
+
Table.prototype._defaultRowHeight = null;
|
96
|
+
|
97
|
+
/** @type {number|null}
|
98
|
+
* @private
|
99
|
+
*/
|
100
|
+
Table.prototype._defaultColumnWidth = null;
|
101
|
+
/** @type {boolean}
|
102
|
+
* @private
|
103
|
+
*/
|
104
|
+
Table.prototype._autoWidthUpdate = false;
|
105
|
+
|
106
|
+
/** @type {!SubTable}
|
107
|
+
* @private
|
108
|
+
*/
|
109
|
+
Table.prototype._tbody;
|
110
|
+
/** @type {SubTable}
|
111
|
+
* @private
|
112
|
+
*/
|
113
|
+
Table.prototype._thead;
|
114
|
+
/** @type {SubTable}
|
115
|
+
* @private
|
116
|
+
*/
|
117
|
+
Table.prototype._tfoot;
|
118
|
+
/** @type {!Array.<SubTable>}
|
119
|
+
* @private
|
120
|
+
*/
|
121
|
+
Table.prototype._subs;
|
122
|
+
|
123
|
+
|
124
|
+
/** @public
|
125
|
+
* @return {Element}
|
126
|
+
*/
|
127
|
+
Table.prototype.getTableElement = function() {
|
128
|
+
return this._table;
|
129
|
+
};
|
130
|
+
/** @public
|
131
|
+
* @param {number} col
|
132
|
+
* @param {number} row
|
133
|
+
* @param {number} width
|
134
|
+
* @param {number} height
|
135
|
+
*/
|
136
|
+
Table.prototype.setCRWH = function(col, row, width, height) {
|
137
|
+
this.setColumnCount(col);
|
138
|
+
this.setRowCount(row);
|
139
|
+
this.setSize(width, height);
|
140
|
+
};
|
141
|
+
/** @public
|
142
|
+
* @param {Table~Options} options
|
143
|
+
*/
|
144
|
+
Table.prototype.init = function(options) {
|
145
|
+
if(!options) {
|
146
|
+
return;
|
147
|
+
}
|
148
|
+
|
149
|
+
let colWidth = options["colWidth"] || options["cellWidth"];
|
150
|
+
if(colWidth) {
|
151
|
+
this.setDefaultColumnWidth(colWidth);
|
152
|
+
}
|
153
|
+
let rowHeight = options["rowHeight"] || options["cellHeight"];
|
154
|
+
if(rowHeight) {
|
155
|
+
this.setDefaultRowHeight(rowHeight);
|
156
|
+
}
|
157
|
+
|
158
|
+
let colCount = options["colCount"];
|
159
|
+
if(colCount) {
|
160
|
+
this.setColumnCount(colCount);
|
161
|
+
}
|
162
|
+
let rowCount = options["rowCount"];
|
163
|
+
if(rowCount) {
|
164
|
+
this.setRowCount(rowCount);
|
165
|
+
}
|
166
|
+
|
167
|
+
let tableWidth = options["width"] || options["tableWidth"];
|
168
|
+
if(tableWidth && this._colCount) { // TODO: Move this to setWidth() method
|
169
|
+
this.setDefaultColumnWidth((tableWidth / this._colCount) | 0);
|
170
|
+
}
|
171
|
+
|
172
|
+
let tableHeight = options["height"] || options["tableHeight"];
|
173
|
+
if(tableHeight) { // TODO: Move this to setHeight() method
|
174
|
+
rowCount = this.getRowCount();
|
175
|
+
if(rowCount) {
|
176
|
+
this.setDefaultRowHeight((tableHeight / rowCount) | 0);
|
177
|
+
}
|
178
|
+
}
|
179
|
+
|
180
|
+
let header = options["header"];
|
181
|
+
if(header != null) {
|
182
|
+
if(header) {
|
183
|
+
rowCount = (typeof header === "number") ? header : 1;
|
184
|
+
|
185
|
+
this._addHeader();
|
186
|
+
this._thead.setRowCount(rowCount);
|
187
|
+
} else if(this._thead) {
|
188
|
+
Dom.removeParent(this._thead.getElement());
|
189
|
+
this._thead = null;
|
190
|
+
}
|
191
|
+
}
|
192
|
+
|
193
|
+
let footer = options["footer"];
|
194
|
+
if(footer != null) {
|
195
|
+
if(footer) {
|
196
|
+
rowCount = (typeof footer === "number") ? footer : 1;
|
197
|
+
|
198
|
+
this._addFooter();
|
199
|
+
this._tfoot.setRowCount(rowCount);
|
200
|
+
} else if(this._tfoot) {
|
201
|
+
Dom.removeParent(this._tfoot.getElement());
|
202
|
+
this._tfoot = null;
|
203
|
+
}
|
204
|
+
}
|
205
|
+
};
|
206
|
+
|
207
|
+
/** @public
|
208
|
+
* @param {number=} count=1
|
209
|
+
* @return {Array.<Element>} Array of col elements (not td or cell)
|
210
|
+
*/
|
211
|
+
Table.prototype.addColumns = function(count) {
|
212
|
+
if(count == null) { count = 1; }
|
213
|
+
else if(count <= 0) { return null; }
|
214
|
+
|
215
|
+
let cols = [];
|
216
|
+
let c;
|
217
|
+
for(c = count; --c >= 0;) {
|
218
|
+
let col = document.createElement("col");
|
219
|
+
this._colgroup.appendChild(col);
|
220
|
+
cols[c] = col;
|
221
|
+
}
|
222
|
+
this._colCount += count;
|
223
|
+
|
224
|
+
if(this._defaultColumnWidth != null) {
|
225
|
+
let minWidth = this._defaultColumnWidth + "px";
|
226
|
+
for(c = count; --c >= 0;) {
|
227
|
+
cols[c].style.width = minWidth;
|
228
|
+
}
|
229
|
+
}
|
230
|
+
|
231
|
+
for(let i = this._subs.length; --i >= 0;) {
|
232
|
+
this._subs[i].addColumns(count);
|
233
|
+
}
|
234
|
+
this._updateTableWidth();
|
235
|
+
return cols;
|
236
|
+
};
|
237
|
+
/** @public
|
238
|
+
* @param {number=} opt_count
|
239
|
+
*/
|
240
|
+
Table.prototype.removeColumns = function(opt_count) {
|
241
|
+
if(opt_count == null || opt_count >= this._colCount) {
|
242
|
+
this.removeAllColumns();
|
243
|
+
return;
|
244
|
+
}
|
245
|
+
if(opt_count <= 0) { return; }
|
246
|
+
|
247
|
+
this._colCount -= opt_count;
|
248
|
+
Dom.removeChildren(this._colgroup, opt_count);
|
249
|
+
|
250
|
+
for(let i = this._subs.length; --i >= 0;) {
|
251
|
+
this._subs[i].removeColumns(opt_count);
|
252
|
+
}
|
253
|
+
this._updateTableWidth();
|
254
|
+
};
|
255
|
+
/** @public */
|
256
|
+
Table.prototype.removeAllColumns = function() {
|
257
|
+
if(this._colCount <= 0) { return; }
|
258
|
+
this._colCount = 0;
|
259
|
+
Dom.removeChildren(this._colgroup);
|
260
|
+
|
261
|
+
for(let i = this._subs.length; --i >= 0;) {
|
262
|
+
this._subs[i].removeAllColumns(); // Removing all column will also remove all rows
|
263
|
+
}
|
264
|
+
this._updateTableWidth();
|
265
|
+
};
|
266
|
+
/** @public
|
267
|
+
* @param {number} val
|
268
|
+
*/
|
269
|
+
Table.prototype.setColumnCount = function(val) {
|
270
|
+
if(val >= this._colCount) {
|
271
|
+
this.addColumns(val - this._colCount);
|
272
|
+
} else {
|
273
|
+
this.removeColumns(this._colCount - val);
|
274
|
+
}
|
275
|
+
};
|
276
|
+
|
277
|
+
/** @public
|
278
|
+
* @param {number=} count=1
|
279
|
+
* @return {!Array.<Element>} Array of tr (HTMLTableRowElement) elements
|
280
|
+
*/
|
281
|
+
Table.prototype.addRows = function(count) {
|
282
|
+
return this._tbody.addRows(count);
|
283
|
+
};
|
284
|
+
/** @public
|
285
|
+
* @param {number=} count Number of rows to be removed. If count is not specified, all rows are removed
|
286
|
+
*/
|
287
|
+
Table.prototype.removeRows = function(count) {
|
288
|
+
this._tbody.removeRows(count);
|
289
|
+
};
|
290
|
+
/** @public */
|
291
|
+
Table.prototype.removeAllRows = function() {
|
292
|
+
this._tbody.removeAllRows();
|
293
|
+
};
|
294
|
+
/** @public
|
295
|
+
* @param {number} val
|
296
|
+
*/
|
297
|
+
Table.prototype.setRowCount = function(val) {
|
298
|
+
this._tbody.setRowCount(val);
|
299
|
+
};
|
300
|
+
|
301
|
+
/** @public
|
302
|
+
* @return {number}
|
303
|
+
*/
|
304
|
+
Table.prototype.getColumnCount = function() { return this._colCount; };
|
305
|
+
/** @public
|
306
|
+
* @return {number}
|
307
|
+
*/
|
308
|
+
Table.prototype.getRowCount = function() { return this._tbody.getRowCount(); };
|
309
|
+
/** @public
|
310
|
+
* @param {number} c
|
311
|
+
* @param {number} r
|
312
|
+
* @return {Element}
|
313
|
+
*/
|
314
|
+
Table.prototype.getCell = function(c, r) { return this._tbody.getCell(c, r); };
|
315
|
+
/** @public
|
316
|
+
* @param {number} c
|
317
|
+
* @return {Array.<Element>} Array of td (HTMLTableCellElement) elements
|
318
|
+
*/
|
319
|
+
Table.prototype.getCellsInColumn = function(c) { return this._tbody.getCellsInColumn(c); };
|
320
|
+
/** @public
|
321
|
+
* @param {number} r
|
322
|
+
* @return {Array.<Element>} Array of td (HTMLTableCellElement) elements
|
323
|
+
*/
|
324
|
+
Table.prototype.getCellsInRow = function(r) { return this._tbody.getCellsInRow(r); };
|
325
|
+
/** @public
|
326
|
+
* @return {!Array.<Element>} Array of td (HTMLTableCellElement) elements
|
327
|
+
*/
|
328
|
+
Table.prototype.getAllCells = function() { return this._tbody.getAllCells(); };
|
329
|
+
/** @public
|
330
|
+
* @return {!Array.<Element>} Array of tr (HTMLTableRowElement) elements
|
331
|
+
*/
|
332
|
+
Table.prototype.getAllRows = function() { return this._tbody.getAllRows(); };
|
333
|
+
/** @public
|
334
|
+
* @function
|
335
|
+
* @return {!Array<Element>} Array of tr (HTMLTableRowElement) elements
|
336
|
+
*/
|
337
|
+
Table.prototype.getRows = Table.prototype.getAllRows;
|
338
|
+
/** @public
|
339
|
+
* @param {number} r
|
340
|
+
* @return {Element} Array of tr (HTMLTableRowElement) elements
|
341
|
+
*/
|
342
|
+
Table.prototype.getRow = function(r) { return this._tbody.getRow(r); };
|
343
|
+
|
344
|
+
/** @public
|
345
|
+
* @param {number} c1 Starting column index
|
346
|
+
* @param {number} c2 Destination column index
|
347
|
+
* @param {number} r1 Starting row index
|
348
|
+
* @param {number} r2 Destination row index
|
349
|
+
* @return {Element} Top left cell element
|
350
|
+
*/
|
351
|
+
Table.prototype.spanBlock = function(c1, c2, r1, r2) { return this._tbody.spanBlock(c1, c2, r1, r2); };
|
352
|
+
/** Horizontally span the cell from the first column to cover the entire row. This is useful for creating header row
|
353
|
+
* @public
|
354
|
+
* @param {number} r
|
355
|
+
* @param {boolean} bool
|
356
|
+
* @return {Element} Top left cell element
|
357
|
+
*/
|
358
|
+
Table.prototype.spanHorizontally = function(r, bool) {
|
359
|
+
return this._tbody.spanBlock(0, (bool !== false) ? this._colCount : 0, r, r);
|
360
|
+
};
|
361
|
+
|
362
|
+
/** @public
|
363
|
+
* @param {number|string|Array.<string|number>} val
|
364
|
+
* @param {number=} colIndex Column index
|
365
|
+
*/
|
366
|
+
Table.prototype.setColMinWidths = function(val, colIndex) {
|
367
|
+
this._setColStyle("width", val, colIndex);
|
368
|
+
this._updateTableWidth();
|
369
|
+
};
|
370
|
+
/** @public
|
371
|
+
* @function
|
372
|
+
* @param {number|string|Array.<string|number>} val
|
373
|
+
* @param {number=} colIndex Column index
|
374
|
+
*/
|
375
|
+
Table.prototype.setColumnWidths = Table.prototype.setColMinWidths;
|
376
|
+
/** @public
|
377
|
+
* @param {string|Array.<string>} val
|
378
|
+
* @param {number=} colIndex Column index
|
379
|
+
*/
|
380
|
+
Table.prototype.setColBackgroundColors = function(val, colIndex) {
|
381
|
+
this._setColStyle("background-color", val, colIndex);
|
382
|
+
};
|
383
|
+
/** @public
|
384
|
+
* @function
|
385
|
+
* @param {string|Array.<string>} val
|
386
|
+
* @param {number=} colIndex Column index
|
387
|
+
*/
|
388
|
+
Table.prototype.setColBGColors = Table.prototype.setColBackgroundColors; // Alias
|
389
|
+
/** @public
|
390
|
+
* @param {number|string|Array.<number|string>} val
|
391
|
+
* @param {number=} colIndex Column index
|
392
|
+
*/
|
393
|
+
Table.prototype.setColBorders = function(val, colIndex) {
|
394
|
+
this._setColStyle("border", val, colIndex);
|
395
|
+
};
|
396
|
+
|
397
|
+
/** @public
|
398
|
+
* @param {number} width
|
399
|
+
* @param {number} height
|
400
|
+
*/
|
401
|
+
Table.prototype.setSize = function(width, height) {
|
402
|
+
if(this._colCount < 0) { this.addColumns(); }
|
403
|
+
if(this.getRowCount() < 0) { this.addRows(); }
|
404
|
+
|
405
|
+
this.setCellSize((width / this._colCount) | 0, (height / this.getRowCount()) | 0);
|
406
|
+
};
|
407
|
+
/** @public
|
408
|
+
* @param {number} defaultWidth
|
409
|
+
* @param {number} defaultHeight
|
410
|
+
*/
|
411
|
+
Table.prototype.setCellSize = function(defaultWidth, defaultHeight) {
|
412
|
+
this.setDefaultColumnWidth(defaultWidth);
|
413
|
+
this.setDefaultRowHeight(defaultHeight);
|
414
|
+
};
|
415
|
+
/** @public
|
416
|
+
* @param {(number|null)=} val
|
417
|
+
*/
|
418
|
+
Table.prototype.setDefaultColumnWidth = function(val) {
|
419
|
+
if(!val) { val = null; }
|
420
|
+
if(val === this._defaultColumnWidth) { return; }
|
421
|
+
|
422
|
+
this._defaultColumnWidth = val;
|
423
|
+
if(this._colCount > 0) {
|
424
|
+
this._setColStyle("width", this._defaultColumnWidth || "");
|
425
|
+
}
|
426
|
+
this._updateTableWidth();
|
427
|
+
};
|
428
|
+
|
429
|
+
/** @public
|
430
|
+
* @return {number|null}
|
431
|
+
*/
|
432
|
+
Table.prototype.getDefaultColumnWidth = function() {
|
433
|
+
return this._defaultColumnWidth;
|
434
|
+
};
|
435
|
+
/** @public
|
436
|
+
* @param {(number|null)=} val
|
437
|
+
*/
|
438
|
+
Table.prototype.setDefaultRowHeight = function(val) {
|
439
|
+
if(!val) { val = null; }
|
440
|
+
if(val === this._defaultRowHeight) { return; }
|
441
|
+
|
442
|
+
this._defaultRowHeight = val;
|
443
|
+
|
444
|
+
for(let i = this._subs.length; --i >= 0;) {
|
445
|
+
this._subs[i].setDefaultRowHeight(val);
|
446
|
+
}
|
447
|
+
};
|
448
|
+
/** @public
|
449
|
+
* @return {number|null}
|
450
|
+
*/
|
451
|
+
Table.prototype.getDefaultRowHeight = function() {
|
452
|
+
return this._defaultRowHeight;
|
453
|
+
};
|
454
|
+
/** Distribute columns based on their textContent length
|
455
|
+
* @public
|
456
|
+
*/
|
457
|
+
Table.prototype.distributeColumnWidth = function() {
|
458
|
+
if(this._colCount <= 1) {
|
459
|
+
return;
|
460
|
+
}
|
461
|
+
let txtRows = this._tbody.getTextContents();
|
462
|
+
let rowCount = txtRows.length;
|
463
|
+
if(!rowCount) {
|
464
|
+
return;
|
465
|
+
}
|
466
|
+
let maxWidths = new Array(this._colCount);
|
467
|
+
let txtRow = txtRows[0];
|
468
|
+
let c;
|
469
|
+
for(c = 0; c < this._colCount; ++c) {
|
470
|
+
maxWidths[c] = txtRow[c].length;
|
471
|
+
}
|
472
|
+
for(let r = 1; r < rowCount; ++r) {
|
473
|
+
txtRow = txtRows[r];
|
474
|
+
for(c = 0; c < this._colCount; ++c) {
|
475
|
+
if(maxWidths[c] < txtRow[c].length) {
|
476
|
+
maxWidths[c] = txtRow[c].length;
|
477
|
+
}
|
478
|
+
}
|
479
|
+
}
|
480
|
+
let longestColumn = 0;
|
481
|
+
let maxWidth = maxWidths[0];
|
482
|
+
for(c = this._colCount; --c >= 1;) {
|
483
|
+
if(maxWidth < maxWidths[c]) {
|
484
|
+
maxWidth = maxWidths[c];
|
485
|
+
longestColumn = c;
|
486
|
+
}
|
487
|
+
}
|
488
|
+
for(c = this._colCount; --c >= 0;) {
|
489
|
+
maxWidths[c] = Math.floor(maxWidths[c] / maxWidth * 100) + "%";
|
490
|
+
}
|
491
|
+
maxWidths[longestColumn] = "";
|
492
|
+
this.setColumnWidths(maxWidths);
|
493
|
+
};
|
494
|
+
|
495
|
+
/** @public
|
496
|
+
* @param {number=} opt_rowLimit
|
497
|
+
* @return {Array<Object>} Array of rows that just log in console
|
498
|
+
*/
|
499
|
+
Table.prototype.log = function(opt_rowLimit) {
|
500
|
+
let trs = this.getRows();
|
501
|
+
let rowCount = trs.length;
|
502
|
+
if(!opt_rowLimit || opt_rowLimit <= 0) { opt_rowLimit = rowCount; }
|
503
|
+
|
504
|
+
let c;
|
505
|
+
let colNames = new Array(this._colCount);
|
506
|
+
for(c = 0; c < this._colCount; ++c) {
|
507
|
+
let hCell = this.getHeaderCell(c, 0);
|
508
|
+
let hStr = hCell ? hCell.textContent : "";
|
509
|
+
colNames[c] = hStr || ("" + c);
|
510
|
+
}
|
511
|
+
|
512
|
+
let rows = [];
|
513
|
+
for(let r = 0; r < rowCount; ++r) {
|
514
|
+
let cols = {};
|
515
|
+
for(c = 0; c < this._colCount; ++c) {
|
516
|
+
cols[colNames[c]] = trs[r].cells[c].textContent;
|
517
|
+
}
|
518
|
+
if(rows.length < opt_rowLimit) {
|
519
|
+
rows.push(cols);
|
520
|
+
} else {
|
521
|
+
break;
|
522
|
+
}
|
523
|
+
}
|
524
|
+
console.table(rows);
|
525
|
+
return rows; // Debug
|
526
|
+
};
|
527
|
+
/** @public
|
528
|
+
* @return {!Array.<Array.<string>>}
|
529
|
+
*/
|
530
|
+
Table.prototype.getTextContents = function() { return this._tbody.getTextContents(); };
|
531
|
+
/** @public
|
532
|
+
* @param {number} c
|
533
|
+
* @param {number} r
|
534
|
+
* @return {string}
|
535
|
+
*/
|
536
|
+
Table.prototype.getCellTextContent = function(c, r) { return this._tbody.getCellTextContent(c, r); };
|
537
|
+
/** @public
|
538
|
+
* @param {number} c
|
539
|
+
* @return {string}
|
540
|
+
*/
|
541
|
+
Table.prototype.getColumnTextContent = function(c) { return this._tbody.getColumnTextContent(c); };
|
542
|
+
/** @public
|
543
|
+
* @param {number} r
|
544
|
+
* @return {string}
|
545
|
+
*/
|
546
|
+
Table.prototype.getRowTextContent = function(r) { return this._tbody.getRowTextContent(r); };
|
547
|
+
/** @public
|
548
|
+
* @return {string}
|
549
|
+
*/
|
550
|
+
Table.prototype.getTableTextContent = function() { return this._tbody.getTableTextContent(); };
|
551
|
+
|
552
|
+
/** Try to make table to have fixed size. Table may not have a fixed size, if one of its column has no width (dynamic width).
|
553
|
+
* @public
|
554
|
+
* @function
|
555
|
+
* @param {boolean=} opt_bool
|
556
|
+
*/
|
557
|
+
Table.prototype.fixateTableWidth = function(opt_bool) {
|
558
|
+
this._autoWidthUpdate = (opt_bool !== false);
|
559
|
+
if(this._autoWidthUpdate) {
|
560
|
+
this._updateTableWidth();
|
561
|
+
} else if(this._table.style.width) {
|
562
|
+
this._table.style.width = "";
|
563
|
+
}
|
564
|
+
};
|
565
|
+
/** Opposite of {@link Table#fixateTableWidth}
|
566
|
+
* @public
|
567
|
+
* @param {boolean=} opt_bool
|
568
|
+
*/
|
569
|
+
Table.prototype.loosenTableWidth = function(opt_bool) {
|
570
|
+
this.fixateTableWidth(opt_bool === false);
|
571
|
+
};
|
572
|
+
|
573
|
+
/** @public
|
574
|
+
* @param {number=} opt_count
|
575
|
+
* @return {!Array.<Element>} Array of tr (HTMLTableRowElement) elements
|
576
|
+
*/
|
577
|
+
Table.prototype.addHeaderRows = function(opt_count) {
|
578
|
+
this._addHeader();
|
579
|
+
|
580
|
+
return this._thead.addRows(opt_count);
|
581
|
+
};
|
582
|
+
/** @public
|
583
|
+
* @param {number} c
|
584
|
+
* @param {number} r
|
585
|
+
* @return {Element}
|
586
|
+
*/
|
587
|
+
Table.prototype.getHeaderCell = function(c, r) {
|
588
|
+
if(this._thead) {
|
589
|
+
return this._thead.getCell(c, r);
|
590
|
+
}
|
591
|
+
return null;
|
592
|
+
};
|
593
|
+
/** @public
|
594
|
+
* @return {!Array.<Element>} Array of td (HTMLTableCellElement) elements
|
595
|
+
*/
|
596
|
+
Table.prototype.getAllHeaderCells = function() {
|
597
|
+
if(!this._thead) { return []; }
|
598
|
+
|
599
|
+
return this._thead.getAllCells();
|
600
|
+
};
|
601
|
+
/** @public
|
602
|
+
* @param {number=} opt_count
|
603
|
+
*/
|
604
|
+
Table.prototype.removeHeaderRows = function(opt_count) {
|
605
|
+
if(this._thead) {
|
606
|
+
this._thead.removeRows(opt_count);
|
607
|
+
}
|
608
|
+
};
|
609
|
+
|
610
|
+
/** @public
|
611
|
+
* @param {number=} opt_count
|
612
|
+
* @return {!Array.<Element>} Array of tr (HTMLTableRowElement) elements
|
613
|
+
*/
|
614
|
+
Table.prototype.addFooterRows = function(opt_count) {
|
615
|
+
this._addFooter();
|
616
|
+
|
617
|
+
return this._tfoot.addRows(opt_count);
|
618
|
+
};
|
619
|
+
/** @public
|
620
|
+
* @param {number} c
|
621
|
+
* @param {number} r
|
622
|
+
* @return {Element}
|
623
|
+
*/
|
624
|
+
Table.prototype.getFooterCell = function(c, r) {
|
625
|
+
if(this._tfoot) {
|
626
|
+
return this._tfoot.getCell(c, r);
|
627
|
+
}
|
628
|
+
return null;
|
629
|
+
};
|
630
|
+
/** @public
|
631
|
+
* @return {!Array.<Element>} Array of td (HTMLTableCellElement) elements
|
632
|
+
*/
|
633
|
+
Table.prototype.getAllFooterCells = function() {
|
634
|
+
if(!this._tfoot) { return []; }
|
635
|
+
|
636
|
+
return this._tfoot.getAllCells();
|
637
|
+
};
|
638
|
+
/** @public
|
639
|
+
* @param {number=} opt_count
|
640
|
+
*/
|
641
|
+
Table.prototype.removeFooterRows = function(opt_count) {
|
642
|
+
if(this._tfoot) {
|
643
|
+
this._tfoot.removeRows(opt_count);
|
644
|
+
}
|
645
|
+
};
|
646
|
+
|
647
|
+
/** @public
|
648
|
+
* @param {Event} e
|
649
|
+
* @return {number}
|
650
|
+
*/
|
651
|
+
Table.prototype.getColumnIndex = function(e) {
|
652
|
+
return this._tbody.getColumnIndex(e);
|
653
|
+
};
|
654
|
+
/** @public
|
655
|
+
* @param {Event} e
|
656
|
+
* @return {number}
|
657
|
+
*/
|
658
|
+
Table.prototype.getRowIndex = function(e) {
|
659
|
+
return this._tbody.getRowIndex(e);
|
660
|
+
};
|
661
|
+
/** @public
|
662
|
+
* @param {number} colIndex
|
663
|
+
* @param {number=} rowIndex
|
664
|
+
* @return {number}
|
665
|
+
*/
|
666
|
+
Table.prototype.getColumnLeft = function(colIndex, rowIndex) {
|
667
|
+
return this._tbody.getColumnLeft(colIndex, rowIndex);
|
668
|
+
};
|
669
|
+
/** @public
|
670
|
+
* @param {number|Element} rowRef
|
671
|
+
* @return {number}
|
672
|
+
*/
|
673
|
+
Table.prototype.getRowTop = function(rowRef) {
|
674
|
+
return this._tbody.getRowTop(rowRef) + this._tbody.getElement().offsetTop;
|
675
|
+
};
|
676
|
+
/** @public
|
677
|
+
* @param {Element} cell
|
678
|
+
* @param {Object=} ret_obj
|
679
|
+
* @return {!Object} Object with x and y property
|
680
|
+
*/
|
681
|
+
Table.prototype.getCellPosition = function(cell, ret_obj) {
|
682
|
+
ret_obj = this._tbody.getCellPosition(cell, ret_obj);
|
683
|
+
ret_obj["y"] += this._tbody.getElement().offsetTop;
|
684
|
+
return ret_obj;
|
685
|
+
};
|
686
|
+
|
687
|
+
/** This will change size of the table
|
688
|
+
* @public
|
689
|
+
* @param {Element} tblElem
|
690
|
+
*/
|
691
|
+
Table.prototype.cloak = function(tblElem) {
|
692
|
+
if(!tblElem) { return; }
|
693
|
+
if(!tblElem.parentElement) { return; }
|
694
|
+
if(tblElem.tagName !== "TABLE") { return; }
|
695
|
+
this._elem = tblElem.parentElement;
|
696
|
+
this._elem.classList.add("js-table");
|
697
|
+
|
698
|
+
this._table = tblElem;
|
699
|
+
let elems = tblElem.getElementsByTagName("COLGROUP");
|
700
|
+
this._colgroup = (elems[0]) ? elems[0] : document.createElement("colgroup");
|
701
|
+
|
702
|
+
elems = tblElem.getElementsByTagName("TR");
|
703
|
+
this._colCount = elems[0] ? elems[0].children.length : 0;
|
704
|
+
this._autoWidthUpdate = this._table.getAttribute("width") ? true : false;
|
705
|
+
|
706
|
+
elems = tblElem.getElementsByTagName("TBODY");
|
707
|
+
if(elems[0]) {
|
708
|
+
this._tbody.cloak(elems[0]);
|
709
|
+
}
|
710
|
+
elems = tblElem.getElementsByTagName("THEAD");
|
711
|
+
if(elems[0]) {
|
712
|
+
this._addHeader(elems[0]);
|
713
|
+
}
|
714
|
+
elems = tblElem.getElementsByTagName("TFOOT");
|
715
|
+
if(elems[0]) {
|
716
|
+
this._addFooter(elems[0]);
|
717
|
+
}
|
718
|
+
};
|
719
|
+
|
720
|
+
/** @public
|
721
|
+
* @return {SubTable}
|
722
|
+
*/
|
723
|
+
Table.prototype.getBody = function() {
|
724
|
+
return this._tbody;
|
725
|
+
};
|
726
|
+
/** @public
|
727
|
+
* @return {SubTable}
|
728
|
+
*/
|
729
|
+
Table.prototype.getHeader = function() {
|
730
|
+
return this._thead;
|
731
|
+
};
|
732
|
+
/** @public
|
733
|
+
* @return {SubTable}
|
734
|
+
*/
|
735
|
+
Table.prototype.getFooter = function() {
|
736
|
+
return this._tfoot;
|
737
|
+
};
|
738
|
+
|
739
|
+
|
740
|
+
/** @private
|
741
|
+
* @param {Element=} elem
|
742
|
+
*/
|
743
|
+
Table.prototype._addHeader = function(elem) {
|
744
|
+
let t = this;
|
745
|
+
if(!t._thead) {
|
746
|
+
t._thead = new SubTable(elem ? elem : "thead");
|
747
|
+
t._subs.push(t._thead);
|
748
|
+
|
749
|
+
t._thead.setColumnCount(t._colCount);
|
750
|
+
t._thead.setDefaultRowHeight(t._defaultRowHeight);
|
751
|
+
t._table.insertBefore(t._thead.getElement(), t._tbody.getElement());
|
752
|
+
} else if(elem) {
|
753
|
+
t._thead.cloak(elem);
|
754
|
+
}
|
755
|
+
};
|
756
|
+
/** @private
|
757
|
+
* @param {Element=} elem
|
758
|
+
*/
|
759
|
+
Table.prototype._addFooter = function(elem) {
|
760
|
+
let t = this;
|
761
|
+
if(!t._tfoot) {
|
762
|
+
t._tfoot = new SubTable(elem ? elem : "tfoot");
|
763
|
+
t._subs.push(t._tfoot);
|
764
|
+
|
765
|
+
t._tfoot.setColumnCount(t._colCount);
|
766
|
+
t._tfoot.setDefaultRowHeight(t._defaultRowHeight);
|
767
|
+
t._table.appendChild(t._tfoot.getElement());
|
768
|
+
} else if(elem) {
|
769
|
+
t._tfoot.cloak(elem);
|
770
|
+
}
|
771
|
+
};
|
772
|
+
|
773
|
+
/** Only four styles available for colgroup which are border, background, width, and visibility
|
774
|
+
* @private
|
775
|
+
* @param {string} prop
|
776
|
+
* @param {number|string|Array.<number|string>} val
|
777
|
+
* @param {number=} opt_at
|
778
|
+
*/
|
779
|
+
Table.prototype._setColStyle = function(prop, val, opt_at) {
|
780
|
+
if(val == null) { val = ""; }
|
781
|
+
let c, col;
|
782
|
+
if(val instanceof Array) {
|
783
|
+
let count = (val.length < this._colCount) ? val.length : this._colCount;
|
784
|
+
for(c = count; --c >= 0;) {
|
785
|
+
let str = val[c];
|
786
|
+
if(typeof str === "number") { str = str + "px"; }
|
787
|
+
if(str) {
|
788
|
+
col = this._colgroup.children[c];
|
789
|
+
col.style[prop] = str;
|
790
|
+
}
|
791
|
+
}
|
792
|
+
} else {
|
793
|
+
if(typeof val === "number") { val = val + "px"; }
|
794
|
+
if(typeof opt_at === "number") {
|
795
|
+
col = this._colgroup.children[opt_at];
|
796
|
+
if(col) {
|
797
|
+
col.style[prop] = val;
|
798
|
+
}
|
799
|
+
} else {
|
800
|
+
for(c = this._colCount; --c >= 0;) {
|
801
|
+
col = this._colgroup.children[c];
|
802
|
+
col.style[prop] = val;
|
803
|
+
}
|
804
|
+
}
|
805
|
+
}
|
806
|
+
};
|
807
|
+
/** @private */
|
808
|
+
Table.prototype._updateTableWidth = function() {
|
809
|
+
if(!this._autoWidthUpdate) { return; }
|
810
|
+
|
811
|
+
let fixedWidth = true;
|
812
|
+
let totalWidth = 0;
|
813
|
+
for(let c = this._colCount; --c >= 0;) {
|
814
|
+
let col = this._colgroup.children[c];
|
815
|
+
let str = col.style.width;
|
816
|
+
if(!str) {
|
817
|
+
fixedWidth = false;
|
818
|
+
break;
|
819
|
+
}
|
820
|
+
totalWidth += parseFloat(str);
|
821
|
+
}
|
822
|
+
|
823
|
+
if(fixedWidth && totalWidth > 0) {
|
824
|
+
this._table.style.width = totalWidth + "px";
|
825
|
+
} else if(this._table.style.width) {
|
826
|
+
this._table.style.width = "";
|
827
|
+
}
|
828
|
+
};
|
829
|
+
|
830
|
+
|
831
|
+
export default Table;
|
832
|
+
export { Table };
|