@refinitiv-ui/efx-grid 6.0.0-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +17 -0
- package/README.md +61 -0
- package/lib/column-format-dialog/index.d.ts +1 -0
- package/lib/column-format-dialog/index.js +1 -0
- package/lib/column-format-dialog/lib/column-format-dialog.d.ts +64 -0
- package/lib/column-format-dialog/lib/column-format-dialog.js +2713 -0
- package/lib/column-format-dialog/lib/locale/translation-de.d.ts +7 -0
- package/lib/column-format-dialog/lib/locale/translation-de.js +94 -0
- package/lib/column-format-dialog/lib/locale/translation-en.d.ts +7 -0
- package/lib/column-format-dialog/lib/locale/translation-en.js +94 -0
- package/lib/column-format-dialog/lib/locale/translation-ja.d.ts +7 -0
- package/lib/column-format-dialog/lib/locale/translation-ja.js +94 -0
- package/lib/column-format-dialog/lib/locale/translation-zh-hant.d.ts +7 -0
- package/lib/column-format-dialog/lib/locale/translation-zh-hant.js +94 -0
- package/lib/column-format-dialog/lib/locale/translation-zh.d.ts +7 -0
- package/lib/column-format-dialog/lib/locale/translation-zh.js +94 -0
- package/lib/column-format-dialog/lib/locale/translation.d.ts +11 -0
- package/lib/column-format-dialog/lib/locale/translation.js +18 -0
- package/lib/column-format-dialog/lib/preview-table.d.ts +151 -0
- package/lib/column-format-dialog/lib/preview-table.js +995 -0
- package/lib/column-format-dialog/themes/base.less +429 -0
- package/lib/column-format-dialog/themes/elemental/column-format-dialog.less +1 -0
- package/lib/column-format-dialog/themes/elemental/dark/column-format-dialog.js +4 -0
- package/lib/column-format-dialog/themes/elemental/dark/css/native-elements.css +0 -0
- package/lib/column-format-dialog/themes/elemental/dark/es5/all-elements.js +2 -0
- package/lib/column-format-dialog/themes/elemental/dark/imports/all-elements.js +1 -0
- package/lib/column-format-dialog/themes/elemental/dark/imports/custom-elements.js +1 -0
- package/lib/column-format-dialog/themes/elemental/dark/imports/native-elements.js +0 -0
- package/lib/column-format-dialog/themes/elemental/dark.js +16 -0
- package/lib/column-format-dialog/themes/elemental/defaults.less +1 -0
- package/lib/column-format-dialog/themes/elemental/index.less +5 -0
- package/lib/column-format-dialog/themes/elemental/light/column-format-dialog.js +4 -0
- package/lib/column-format-dialog/themes/elemental/light/css/native-elements.css +0 -0
- package/lib/column-format-dialog/themes/elemental/light/es5/all-elements.js +2 -0
- package/lib/column-format-dialog/themes/elemental/light/imports/all-elements.js +1 -0
- package/lib/column-format-dialog/themes/elemental/light/imports/custom-elements.js +1 -0
- package/lib/column-format-dialog/themes/elemental/light/imports/native-elements.js +0 -0
- package/lib/column-format-dialog/themes/elemental/light.js +16 -0
- package/lib/column-format-dialog/themes/halo/column-format-dialog.less +6 -0
- package/lib/column-format-dialog/themes/halo/dark/column-format-dialog.js +4 -0
- package/lib/column-format-dialog/themes/halo/dark/css/native-elements.css +0 -0
- package/lib/column-format-dialog/themes/halo/dark/es5/all-elements.js +2 -0
- package/lib/column-format-dialog/themes/halo/dark/imports/all-elements.js +1 -0
- package/lib/column-format-dialog/themes/halo/dark/imports/custom-elements.js +1 -0
- package/lib/column-format-dialog/themes/halo/dark/imports/native-elements.js +0 -0
- package/lib/column-format-dialog/themes/halo/dark.js +16 -0
- package/lib/column-format-dialog/themes/halo/defaults.less +1 -0
- package/lib/column-format-dialog/themes/halo/index.less +5 -0
- package/lib/column-format-dialog/themes/halo/light/column-format-dialog.js +4 -0
- package/lib/column-format-dialog/themes/halo/light/css/native-elements.css +0 -0
- package/lib/column-format-dialog/themes/halo/light/es5/all-elements.js +2 -0
- package/lib/column-format-dialog/themes/halo/light/imports/all-elements.js +1 -0
- package/lib/column-format-dialog/themes/halo/light/imports/custom-elements.js +1 -0
- package/lib/column-format-dialog/themes/halo/light/imports/native-elements.js +0 -0
- package/lib/column-format-dialog/themes/halo/light.js +16 -0
- package/lib/column-format-dialog/themes/luna/column-format-dialog.less +1 -0
- package/lib/column-format-dialog/themes/luna/default/column-format-dialog.js +4 -0
- package/lib/column-format-dialog/themes/luna/default/css/native-elements.css +0 -0
- package/lib/column-format-dialog/themes/luna/default/es5/all-elements.js +2 -0
- package/lib/column-format-dialog/themes/luna/default/imports/all-elements.js +1 -0
- package/lib/column-format-dialog/themes/luna/default/imports/custom-elements.js +1 -0
- package/lib/column-format-dialog/themes/luna/default/imports/native-elements.js +0 -0
- package/lib/column-format-dialog/themes/luna/defaults.less +1 -0
- package/lib/column-format-dialog/themes/luna/index.less +5 -0
- package/lib/column-format-dialog/themes/solar/charcoal/column-format-dialog.js +4 -0
- package/lib/column-format-dialog/themes/solar/charcoal/css/native-elements.css +0 -0
- package/lib/column-format-dialog/themes/solar/charcoal/es5/all-elements.js +2 -0
- package/lib/column-format-dialog/themes/solar/charcoal/imports/all-elements.js +1 -0
- package/lib/column-format-dialog/themes/solar/charcoal/imports/custom-elements.js +1 -0
- package/lib/column-format-dialog/themes/solar/charcoal/imports/native-elements.js +0 -0
- package/lib/column-format-dialog/themes/solar/charcoal.js +16 -0
- package/lib/column-format-dialog/themes/solar/column-format-dialog.less +6 -0
- package/lib/column-format-dialog/themes/solar/defaults.less +1 -0
- package/lib/column-format-dialog/themes/solar/index.less +5 -0
- package/lib/column-format-dialog/themes/solar/pearl/column-format-dialog.js +4 -0
- package/lib/column-format-dialog/themes/solar/pearl/css/native-elements.css +0 -0
- package/lib/column-format-dialog/themes/solar/pearl/es5/all-elements.js +2 -0
- package/lib/column-format-dialog/themes/solar/pearl/imports/all-elements.js +1 -0
- package/lib/column-format-dialog/themes/solar/pearl/imports/custom-elements.js +1 -0
- package/lib/column-format-dialog/themes/solar/pearl/imports/native-elements.js +0 -0
- package/lib/column-format-dialog/themes/solar/pearl.js +16 -0
- package/lib/column-selection-dialog/index.d.ts +1 -0
- package/lib/column-selection-dialog/index.js +1 -0
- package/lib/column-selection-dialog/lib/column-selection-dialog.d.ts +41 -0
- package/lib/column-selection-dialog/lib/column-selection-dialog.js +1410 -0
- package/lib/column-selection-dialog/lib/locale/translation-de.d.ts +7 -0
- package/lib/column-selection-dialog/lib/locale/translation-de.js +19 -0
- package/lib/column-selection-dialog/lib/locale/translation-en.d.ts +7 -0
- package/lib/column-selection-dialog/lib/locale/translation-en.js +19 -0
- package/lib/column-selection-dialog/lib/locale/translation-ja.d.ts +7 -0
- package/lib/column-selection-dialog/lib/locale/translation-ja.js +19 -0
- package/lib/column-selection-dialog/lib/locale/translation-zh-hant.d.ts +7 -0
- package/lib/column-selection-dialog/lib/locale/translation-zh-hant.js +19 -0
- package/lib/column-selection-dialog/lib/locale/translation-zh.d.ts +7 -0
- package/lib/column-selection-dialog/lib/locale/translation-zh.js +19 -0
- package/lib/column-selection-dialog/lib/locale/translation.d.ts +11 -0
- package/lib/column-selection-dialog/lib/locale/translation.js +18 -0
- package/lib/column-selection-dialog/themes/base.less +189 -0
- package/lib/column-selection-dialog/themes/elemental/column-selection-dialog.less +1 -0
- package/lib/column-selection-dialog/themes/elemental/dark/column-selection-dialog.js +4 -0
- package/lib/column-selection-dialog/themes/elemental/dark/css/native-elements.css +0 -0
- package/lib/column-selection-dialog/themes/elemental/dark/es5/all-elements.js +2 -0
- package/lib/column-selection-dialog/themes/elemental/dark/imports/all-elements.js +1 -0
- package/lib/column-selection-dialog/themes/elemental/dark/imports/custom-elements.js +1 -0
- package/lib/column-selection-dialog/themes/elemental/dark/imports/native-elements.js +0 -0
- package/lib/column-selection-dialog/themes/elemental/dark.js +6 -0
- package/lib/column-selection-dialog/themes/elemental/defaults.less +1 -0
- package/lib/column-selection-dialog/themes/elemental/index.less +5 -0
- package/lib/column-selection-dialog/themes/elemental/light/column-selection-dialog.js +4 -0
- package/lib/column-selection-dialog/themes/elemental/light/css/native-elements.css +0 -0
- package/lib/column-selection-dialog/themes/elemental/light/es5/all-elements.js +2 -0
- package/lib/column-selection-dialog/themes/elemental/light/imports/all-elements.js +1 -0
- package/lib/column-selection-dialog/themes/elemental/light/imports/custom-elements.js +1 -0
- package/lib/column-selection-dialog/themes/elemental/light/imports/native-elements.js +0 -0
- package/lib/column-selection-dialog/themes/elemental/light.js +6 -0
- package/lib/column-selection-dialog/themes/halo/column-selection-dialog.less +22 -0
- package/lib/column-selection-dialog/themes/halo/dark/column-selection-dialog.js +4 -0
- package/lib/column-selection-dialog/themes/halo/dark/css/native-elements.css +0 -0
- package/lib/column-selection-dialog/themes/halo/dark/es5/all-elements.js +2 -0
- package/lib/column-selection-dialog/themes/halo/dark/imports/all-elements.js +1 -0
- package/lib/column-selection-dialog/themes/halo/dark/imports/custom-elements.js +1 -0
- package/lib/column-selection-dialog/themes/halo/dark/imports/native-elements.js +0 -0
- package/lib/column-selection-dialog/themes/halo/dark.js +6 -0
- package/lib/column-selection-dialog/themes/halo/defaults.less +1 -0
- package/lib/column-selection-dialog/themes/halo/index.less +6 -0
- package/lib/column-selection-dialog/themes/halo/light/column-selection-dialog.js +4 -0
- package/lib/column-selection-dialog/themes/halo/light/css/native-elements.css +0 -0
- package/lib/column-selection-dialog/themes/halo/light/es5/all-elements.js +2 -0
- package/lib/column-selection-dialog/themes/halo/light/imports/all-elements.js +1 -0
- package/lib/column-selection-dialog/themes/halo/light/imports/custom-elements.js +1 -0
- package/lib/column-selection-dialog/themes/halo/light/imports/native-elements.js +0 -0
- package/lib/column-selection-dialog/themes/halo/light.js +6 -0
- package/lib/column-selection-dialog/themes/solar/charcoal/column-selection-dialog.js +4 -0
- package/lib/column-selection-dialog/themes/solar/charcoal/css/native-elements.css +0 -0
- package/lib/column-selection-dialog/themes/solar/charcoal/es5/all-elements.js +2 -0
- package/lib/column-selection-dialog/themes/solar/charcoal/imports/all-elements.js +1 -0
- package/lib/column-selection-dialog/themes/solar/charcoal/imports/custom-elements.js +1 -0
- package/lib/column-selection-dialog/themes/solar/charcoal/imports/native-elements.js +0 -0
- package/lib/column-selection-dialog/themes/solar/charcoal.js +6 -0
- package/lib/column-selection-dialog/themes/solar/column-selection-dialog.less +1 -0
- package/lib/column-selection-dialog/themes/solar/defaults.less +1 -0
- package/lib/column-selection-dialog/themes/solar/index.less +6 -0
- package/lib/column-selection-dialog/themes/solar/pearl/column-selection-dialog.js +4 -0
- package/lib/column-selection-dialog/themes/solar/pearl/css/native-elements.css +0 -0
- package/lib/column-selection-dialog/themes/solar/pearl/es5/all-elements.js +2 -0
- package/lib/column-selection-dialog/themes/solar/pearl/imports/all-elements.js +1 -0
- package/lib/column-selection-dialog/themes/solar/pearl/imports/custom-elements.js +1 -0
- package/lib/column-selection-dialog/themes/solar/pearl/imports/native-elements.js +0 -0
- package/lib/column-selection-dialog/themes/solar/pearl.js +6 -0
- package/lib/core/dist/core.css +1 -0
- package/lib/core/dist/core.js +28075 -0
- package/lib/core/dist/core.min.js +1 -0
- package/lib/core/es6/data/ColumnStats.d.ts +42 -0
- package/lib/core/es6/data/ColumnStats.js +428 -0
- package/lib/core/es6/data/DataCache.d.ts +81 -0
- package/lib/core/es6/data/DataCache.js +1317 -0
- package/lib/core/es6/data/DataTable.d.ts +125 -0
- package/lib/core/es6/data/DataTable.js +1655 -0
- package/lib/core/es6/data/DataView.d.ts +280 -0
- package/lib/core/es6/data/DataView.js +3654 -0
- package/lib/core/es6/data/Segment.d.ts +38 -0
- package/lib/core/es6/data/Segment.js +193 -0
- package/lib/core/es6/data/SegmentCollection.d.ts +58 -0
- package/lib/core/es6/data/SegmentCollection.js +431 -0
- package/lib/core/es6/grid/Core.d.ts +387 -0
- package/lib/core/es6/grid/Core.js +4939 -0
- package/lib/core/es6/grid/ILayoutGrid.d.ts +204 -0
- package/lib/core/es6/grid/ILayoutGrid.js +658 -0
- package/lib/core/es6/grid/LayoutGrid.d.ts +23 -0
- package/lib/core/es6/grid/LayoutGrid.js +2602 -0
- package/lib/core/es6/grid/VirtualizedLayoutGrid.d.ts +18 -0
- package/lib/core/es6/grid/VirtualizedLayoutGrid.js +907 -0
- package/lib/core/es6/grid/components/Cell.d.ts +50 -0
- package/lib/core/es6/grid/components/Cell.js +740 -0
- package/lib/core/es6/grid/components/CellFloatingPanel.d.ts +19 -0
- package/lib/core/es6/grid/components/CellFloatingPanel.js +123 -0
- package/lib/core/es6/grid/components/CellSpan.d.ts +18 -0
- package/lib/core/es6/grid/components/CellSpan.js +99 -0
- package/lib/core/es6/grid/components/CellSpans.d.ts +38 -0
- package/lib/core/es6/grid/components/CellSpans.js +341 -0
- package/lib/core/es6/grid/components/Column.d.ts +22 -0
- package/lib/core/es6/grid/components/Column.js +612 -0
- package/lib/core/es6/grid/components/ElementWrapper.d.ts +125 -0
- package/lib/core/es6/grid/components/ElementWrapper.js +714 -0
- package/lib/core/es6/grid/components/HScrollbar.d.ts +24 -0
- package/lib/core/es6/grid/components/HScrollbar.js +222 -0
- package/lib/core/es6/grid/components/Scrollbar.d.ts +61 -0
- package/lib/core/es6/grid/components/Scrollbar.js +1374 -0
- package/lib/core/es6/grid/components/StretchedCells.d.ts +17 -0
- package/lib/core/es6/grid/components/StretchedCells.js +328 -0
- package/lib/core/es6/grid/components/VScrollbar.d.ts +18 -0
- package/lib/core/es6/grid/components/VScrollbar.js +139 -0
- package/lib/core/es6/grid/components/VirtualItems.d.ts +12 -0
- package/lib/core/es6/grid/components/VirtualItems.js +51 -0
- package/lib/core/es6/grid/event/EventDispatcher.d.ts +16 -0
- package/lib/core/es6/grid/event/EventDispatcher.js +138 -0
- package/lib/core/es6/grid/event/EventListeners.d.ts +34 -0
- package/lib/core/es6/grid/event/EventListeners.js +163 -0
- package/lib/core/es6/grid/plugins/DragAndDropTitlePlugin.d.ts +24 -0
- package/lib/core/es6/grid/plugins/DragAndDropTitlePlugin.js +615 -0
- package/lib/core/es6/grid/plugins/Plugin.d.ts +28 -0
- package/lib/core/es6/grid/plugins/Plugin.js +272 -0
- package/lib/core/es6/grid/plugins/SortableTitlePlugin.d.ts +127 -0
- package/lib/core/es6/grid/plugins/SortableTitlePlugin.js +1707 -0
- package/lib/core/es6/grid/util/Conflator.d.ts +32 -0
- package/lib/core/es6/grid/util/Conflator.js +191 -0
- package/lib/core/es6/grid/util/ElementFrameWork.d.ts +18 -0
- package/lib/core/es6/grid/util/ElementFrameWork.js +227 -0
- package/lib/core/es6/grid/util/HttpRequest.d.ts +53 -0
- package/lib/core/es6/grid/util/HttpRequest.js +371 -0
- package/lib/core/es6/grid/util/PercentBar.d.ts +43 -0
- package/lib/core/es6/grid/util/PercentBar.js +390 -0
- package/lib/core/es6/grid/util/PercentBarRenderer.d.ts +41 -0
- package/lib/core/es6/grid/util/PercentBarRenderer.js +316 -0
- package/lib/core/es6/grid/util/RangeBar.d.ts +25 -0
- package/lib/core/es6/grid/util/RangeBar.js +255 -0
- package/lib/core/es6/grid/util/Reverter.d.ts +14 -0
- package/lib/core/es6/grid/util/Reverter.js +79 -0
- package/lib/core/es6/grid/util/SectionSettings.d.ts +79 -0
- package/lib/core/es6/grid/util/SectionSettings.js +674 -0
- package/lib/core/es6/grid/util/SelectionList.d.ts +50 -0
- package/lib/core/es6/grid/util/SelectionList.js +422 -0
- package/lib/core/es6/grid/util/TrackLayout.d.ts +84 -0
- package/lib/core/es6/grid/util/TrackLayout.js +850 -0
- package/lib/core/es6/grid/util/Virtualizer.d.ts +40 -0
- package/lib/core/es6/grid/util/Virtualizer.js +340 -0
- package/lib/core/es6/grid/util/util.d.ts +18 -0
- package/lib/core/es6/grid/util/util.js +450 -0
- package/lib/core/es6/index.d.ts +84 -0
- package/lib/core/es6/index.js +132 -0
- package/lib/core/es6/tr-grid-theme.d.ts +5 -0
- package/lib/core/es6/tr-grid-theme.js +5 -0
- package/lib/filter-dialog/index.d.ts +1 -0
- package/lib/filter-dialog/index.js +1 -0
- package/lib/filter-dialog/lib/checkbox-list.d.ts +27 -0
- package/lib/filter-dialog/lib/checkbox-list.js +336 -0
- package/lib/filter-dialog/lib/filter-dialog.d.ts +53 -0
- package/lib/filter-dialog/lib/filter-dialog.js +860 -0
- package/lib/filter-dialog/lib/locale/translation-de.d.ts +7 -0
- package/lib/filter-dialog/lib/locale/translation-de.js +37 -0
- package/lib/filter-dialog/lib/locale/translation-en.d.ts +7 -0
- package/lib/filter-dialog/lib/locale/translation-en.js +37 -0
- package/lib/filter-dialog/lib/locale/translation-ja.d.ts +7 -0
- package/lib/filter-dialog/lib/locale/translation-ja.js +37 -0
- package/lib/filter-dialog/lib/locale/translation-zh-hant.d.ts +7 -0
- package/lib/filter-dialog/lib/locale/translation-zh-hant.js +37 -0
- package/lib/filter-dialog/lib/locale/translation-zh.d.ts +7 -0
- package/lib/filter-dialog/lib/locale/translation-zh.js +37 -0
- package/lib/filter-dialog/lib/locale/translation.d.ts +11 -0
- package/lib/filter-dialog/lib/locale/translation.js +18 -0
- package/lib/filter-dialog/themes/base-checkbox.less +37 -0
- package/lib/filter-dialog/themes/base.less +102 -0
- package/lib/filter-dialog/themes/elemental/checkbox-list.less +3 -0
- package/lib/filter-dialog/themes/elemental/dark/checkbox-list.js +4 -0
- package/lib/filter-dialog/themes/elemental/dark/css/native-elements.css +0 -0
- package/lib/filter-dialog/themes/elemental/dark/es5/all-elements.js +4 -0
- package/lib/filter-dialog/themes/elemental/dark/filter-dialog.js +5 -0
- package/lib/filter-dialog/themes/elemental/dark/imports/all-elements.js +2 -0
- package/lib/filter-dialog/themes/elemental/dark/imports/custom-elements.js +2 -0
- package/lib/filter-dialog/themes/elemental/dark/imports/native-elements.js +0 -0
- package/lib/filter-dialog/themes/elemental/dark.js +11 -0
- package/lib/filter-dialog/themes/elemental/defaults.less +3 -0
- package/lib/filter-dialog/themes/elemental/filter-dialog.less +1 -0
- package/lib/filter-dialog/themes/elemental/index.less +6 -0
- package/lib/filter-dialog/themes/elemental/light/checkbox-list.js +4 -0
- package/lib/filter-dialog/themes/elemental/light/css/native-elements.css +0 -0
- package/lib/filter-dialog/themes/elemental/light/es5/all-elements.js +4 -0
- package/lib/filter-dialog/themes/elemental/light/filter-dialog.js +5 -0
- package/lib/filter-dialog/themes/elemental/light/imports/all-elements.js +2 -0
- package/lib/filter-dialog/themes/elemental/light/imports/custom-elements.js +2 -0
- package/lib/filter-dialog/themes/elemental/light/imports/native-elements.js +0 -0
- package/lib/filter-dialog/themes/elemental/light.js +11 -0
- package/lib/filter-dialog/themes/halo/checkbox-list.less +3 -0
- package/lib/filter-dialog/themes/halo/dark/checkbox-list.js +4 -0
- package/lib/filter-dialog/themes/halo/dark/css/native-elements.css +0 -0
- package/lib/filter-dialog/themes/halo/dark/es5/all-elements.js +4 -0
- package/lib/filter-dialog/themes/halo/dark/filter-dialog.js +5 -0
- package/lib/filter-dialog/themes/halo/dark/imports/all-elements.js +2 -0
- package/lib/filter-dialog/themes/halo/dark/imports/custom-elements.js +2 -0
- package/lib/filter-dialog/themes/halo/dark/imports/native-elements.js +0 -0
- package/lib/filter-dialog/themes/halo/dark.js +11 -0
- package/lib/filter-dialog/themes/halo/defaults.less +3 -0
- package/lib/filter-dialog/themes/halo/filter-dialog.less +9 -0
- package/lib/filter-dialog/themes/halo/index.less +6 -0
- package/lib/filter-dialog/themes/halo/light/checkbox-list.js +4 -0
- package/lib/filter-dialog/themes/halo/light/css/native-elements.css +0 -0
- package/lib/filter-dialog/themes/halo/light/es5/all-elements.js +4 -0
- package/lib/filter-dialog/themes/halo/light/filter-dialog.js +5 -0
- package/lib/filter-dialog/themes/halo/light/imports/all-elements.js +2 -0
- package/lib/filter-dialog/themes/halo/light/imports/custom-elements.js +2 -0
- package/lib/filter-dialog/themes/halo/light/imports/native-elements.js +0 -0
- package/lib/filter-dialog/themes/halo/light.js +11 -0
- package/lib/filter-dialog/themes/solar/charcoal/checkbox-list.js +4 -0
- package/lib/filter-dialog/themes/solar/charcoal/css/native-elements.css +0 -0
- package/lib/filter-dialog/themes/solar/charcoal/es5/all-elements.js +4 -0
- package/lib/filter-dialog/themes/solar/charcoal/filter-dialog.js +5 -0
- package/lib/filter-dialog/themes/solar/charcoal/imports/all-elements.js +2 -0
- package/lib/filter-dialog/themes/solar/charcoal/imports/custom-elements.js +2 -0
- package/lib/filter-dialog/themes/solar/charcoal/imports/native-elements.js +0 -0
- package/lib/filter-dialog/themes/solar/charcoal.js +11 -0
- package/lib/filter-dialog/themes/solar/checkbox-list.less +3 -0
- package/lib/filter-dialog/themes/solar/defaults.less +3 -0
- package/lib/filter-dialog/themes/solar/filter-dialog.less +5 -0
- package/lib/filter-dialog/themes/solar/index.less +6 -0
- package/lib/filter-dialog/themes/solar/pearl/checkbox-list.js +4 -0
- package/lib/filter-dialog/themes/solar/pearl/css/native-elements.css +0 -0
- package/lib/filter-dialog/themes/solar/pearl/es5/all-elements.js +4 -0
- package/lib/filter-dialog/themes/solar/pearl/filter-dialog.js +5 -0
- package/lib/filter-dialog/themes/solar/pearl/imports/all-elements.js +2 -0
- package/lib/filter-dialog/themes/solar/pearl/imports/custom-elements.js +2 -0
- package/lib/filter-dialog/themes/solar/pearl/imports/native-elements.js +0 -0
- package/lib/filter-dialog/themes/solar/pearl.js +11 -0
- package/lib/formatters/es6/CoralButtonFormatter.d.ts +22 -0
- package/lib/formatters/es6/CoralButtonFormatter.js +40 -0
- package/lib/formatters/es6/CoralCheckboxFormatter.d.ts +12 -0
- package/lib/formatters/es6/CoralCheckboxFormatter.js +45 -0
- package/lib/formatters/es6/CoralComboBoxFormatter.d.ts +23 -0
- package/lib/formatters/es6/CoralComboBoxFormatter.js +102 -0
- package/lib/formatters/es6/CoralIconFormatter.d.ts +23 -0
- package/lib/formatters/es6/CoralIconFormatter.js +45 -0
- package/lib/formatters/es6/CoralInputFormatter.d.ts +12 -0
- package/lib/formatters/es6/CoralInputFormatter.js +40 -0
- package/lib/formatters/es6/CoralRadioButtonFormatter.d.ts +22 -0
- package/lib/formatters/es6/CoralRadioButtonFormatter.js +80 -0
- package/lib/formatters/es6/CoralSelectFormatter.d.ts +23 -0
- package/lib/formatters/es6/CoralSelectFormatter.js +66 -0
- package/lib/formatters/es6/CoralToggleFormatter.d.ts +12 -0
- package/lib/formatters/es6/CoralToggleFormatter.js +47 -0
- package/lib/formatters/es6/DuplexEmeraldDateTimePickerFormatter.d.ts +14 -0
- package/lib/formatters/es6/DuplexEmeraldDateTimePickerFormatter.js +119 -0
- package/lib/formatters/es6/EFButtonFormatter.d.ts +22 -0
- package/lib/formatters/es6/EFButtonFormatter.js +40 -0
- package/lib/formatters/es6/EFCheckboxFormatter.d.ts +12 -0
- package/lib/formatters/es6/EFCheckboxFormatter.js +45 -0
- package/lib/formatters/es6/EFComboBoxFormatter.d.ts +23 -0
- package/lib/formatters/es6/EFComboBoxFormatter.js +68 -0
- package/lib/formatters/es6/EFDateTimePickerFormatter.d.ts +13 -0
- package/lib/formatters/es6/EFDateTimePickerFormatter.js +55 -0
- package/lib/formatters/es6/EFIconFormatter.d.ts +23 -0
- package/lib/formatters/es6/EFIconFormatter.js +45 -0
- package/lib/formatters/es6/EFNumberFieldFormatter.d.ts +12 -0
- package/lib/formatters/es6/EFNumberFieldFormatter.js +40 -0
- package/lib/formatters/es6/EFRadioButtonFormatter.d.ts +22 -0
- package/lib/formatters/es6/EFRadioButtonFormatter.js +80 -0
- package/lib/formatters/es6/EFSelectFormatter.d.ts +23 -0
- package/lib/formatters/es6/EFSelectFormatter.js +66 -0
- package/lib/formatters/es6/EFTextFieldFormatter.d.ts +12 -0
- package/lib/formatters/es6/EFTextFieldFormatter.js +40 -0
- package/lib/formatters/es6/EFToggleFormatter.d.ts +12 -0
- package/lib/formatters/es6/EFToggleFormatter.js +47 -0
- package/lib/formatters/es6/EmeraldDateTimePickerFormatter.d.ts +13 -0
- package/lib/formatters/es6/EmeraldDateTimePickerFormatter.js +55 -0
- package/lib/formatters/es6/FormatterBuilder.d.ts +22 -0
- package/lib/formatters/es6/FormatterBuilder.js +334 -0
- package/lib/formatters/es6/NumericInputFormatter.d.ts +13 -0
- package/lib/formatters/es6/NumericInputFormatter.js +64 -0
- package/lib/formatters/es6/PercentBarFormatter.d.ts +25 -0
- package/lib/formatters/es6/PercentBarFormatter.js +62 -0
- package/lib/formatters/es6/SimpleImageFormatter.d.ts +21 -0
- package/lib/formatters/es6/SimpleImageFormatter.js +64 -0
- package/lib/formatters/es6/SimpleInputFormatter.d.ts +12 -0
- package/lib/formatters/es6/SimpleInputFormatter.js +40 -0
- package/lib/formatters/es6/SimpleLinkFormatter.d.ts +21 -0
- package/lib/formatters/es6/SimpleLinkFormatter.js +48 -0
- package/lib/formatters/es6/SimpleTickerFormatter.d.ts +25 -0
- package/lib/formatters/es6/SimpleTickerFormatter.js +65 -0
- package/lib/formatters/es6/SimpleToggleFormatter.d.ts +22 -0
- package/lib/formatters/es6/SimpleToggleFormatter.js +132 -0
- package/lib/formatters/es6/TextFormatter.d.ts +12 -0
- package/lib/formatters/es6/TextFormatter.js +30 -0
- package/lib/formatters/es6/index.d.ts +43 -0
- package/lib/formatters/es6/index.js +67 -0
- package/lib/grid/index.d.ts +1 -0
- package/lib/grid/index.js +2 -0
- package/lib/grid/lib/efx-grid.d.ts +32 -0
- package/lib/grid/lib/efx-grid.js +469 -0
- package/lib/grid/themes/base.less +134 -0
- package/lib/grid/themes/halo/dark/css/native-elements.css +0 -0
- package/lib/grid/themes/halo/dark/efx-grid.js +4 -0
- package/lib/grid/themes/halo/dark/es5/all-elements.js +2 -0
- package/lib/grid/themes/halo/dark/imports/all-elements.js +1 -0
- package/lib/grid/themes/halo/dark/imports/custom-elements.js +1 -0
- package/lib/grid/themes/halo/dark/imports/native-elements.js +0 -0
- package/lib/grid/themes/halo/dark.js +3 -0
- package/lib/grid/themes/halo/efx-grid.less +92 -0
- package/lib/grid/themes/halo/index.less +3 -0
- package/lib/grid/themes/halo/light/css/native-elements.css +0 -0
- package/lib/grid/themes/halo/light/efx-grid.js +4 -0
- package/lib/grid/themes/halo/light/es5/all-elements.js +2 -0
- package/lib/grid/themes/halo/light/imports/all-elements.js +1 -0
- package/lib/grid/themes/halo/light/imports/custom-elements.js +1 -0
- package/lib/grid/themes/halo/light/imports/native-elements.js +0 -0
- package/lib/grid/themes/halo/light.js +3 -0
- package/lib/grid/themes/solar/charcoal/css/native-elements.css +0 -0
- package/lib/grid/themes/solar/charcoal/efx-grid.js +4 -0
- package/lib/grid/themes/solar/charcoal/es5/all-elements.js +2 -0
- package/lib/grid/themes/solar/charcoal/imports/all-elements.js +1 -0
- package/lib/grid/themes/solar/charcoal/imports/custom-elements.js +1 -0
- package/lib/grid/themes/solar/charcoal/imports/native-elements.js +0 -0
- package/lib/grid/themes/solar/charcoal.js +3 -0
- package/lib/grid/themes/solar/efx-grid.less +27 -0
- package/lib/grid/themes/solar/index.less +3 -0
- package/lib/grid/themes/solar/pearl/css/native-elements.css +0 -0
- package/lib/grid/themes/solar/pearl/efx-grid.js +4 -0
- package/lib/grid/themes/solar/pearl/es5/all-elements.js +2 -0
- package/lib/grid/themes/solar/pearl/imports/all-elements.js +1 -0
- package/lib/grid/themes/solar/pearl/imports/custom-elements.js +1 -0
- package/lib/grid/themes/solar/pearl/imports/native-elements.js +0 -0
- package/lib/grid/themes/solar/pearl.js +3 -0
- package/lib/index.d.ts +102 -0
- package/lib/index.js +102 -0
- package/lib/row-segmenting/es6/RowSegmenting.d.ts +83 -0
- package/lib/row-segmenting/es6/RowSegmenting.js +592 -0
- package/lib/row-segmenting/es6/index.d.ts +1 -0
- package/lib/row-segmenting/es6/index.js +1 -0
- package/lib/rt-grid/dist/rt-grid.js +44672 -0
- package/lib/rt-grid/dist/rt-grid.min.js +1 -0
- package/lib/rt-grid/es6/ColumnDefinition.d.ts +141 -0
- package/lib/rt-grid/es6/ColumnDefinition.js +1074 -0
- package/lib/rt-grid/es6/DataConnector.d.ts +37 -0
- package/lib/rt-grid/es6/DataConnector.js +266 -0
- package/lib/rt-grid/es6/FieldDefinition.d.ts +20 -0
- package/lib/rt-grid/es6/FieldDefinition.js +418 -0
- package/lib/rt-grid/es6/Grid.d.ts +261 -0
- package/lib/rt-grid/es6/Grid.js +2893 -0
- package/lib/rt-grid/es6/PredefinedFormula.d.ts +16 -0
- package/lib/rt-grid/es6/PredefinedFormula.js +33 -0
- package/lib/rt-grid/es6/ReferenceCounter.d.ts +38 -0
- package/lib/rt-grid/es6/ReferenceCounter.js +230 -0
- package/lib/rt-grid/es6/RowDefinition.d.ts +120 -0
- package/lib/rt-grid/es6/RowDefinition.js +873 -0
- package/lib/rt-grid/es6/SnapshotFiller.d.ts +21 -0
- package/lib/rt-grid/es6/SnapshotFiller.js +252 -0
- package/lib/rt-grid/es6/StyleLoader.d.ts +17 -0
- package/lib/rt-grid/es6/StyleLoader.js +47 -0
- package/lib/rt-grid/es6/index.d.ts +8 -0
- package/lib/rt-grid/es6/index.js +43 -0
- package/lib/statistics-row/es6/StatisticsRow.d.ts +67 -0
- package/lib/statistics-row/es6/StatisticsRow.js +786 -0
- package/lib/statistics-row/es6/index.d.ts +1 -0
- package/lib/statistics-row/es6/index.js +1 -0
- package/lib/tr-grid-auto-tooltip/es6/AutoTooltip.d.ts +45 -0
- package/lib/tr-grid-auto-tooltip/es6/AutoTooltip.js +431 -0
- package/lib/tr-grid-auto-tooltip/es6/index.d.ts +1 -0
- package/lib/tr-grid-auto-tooltip/es6/index.js +1 -0
- package/lib/tr-grid-cell-selection/es6/CellSelection.d.ts +67 -0
- package/lib/tr-grid-cell-selection/es6/CellSelection.js +1777 -0
- package/lib/tr-grid-cell-selection/es6/index.d.ts +1 -0
- package/lib/tr-grid-cell-selection/es6/index.js +1 -0
- package/lib/tr-grid-checkbox/es6/Checkbox.d.ts +69 -0
- package/lib/tr-grid-checkbox/es6/Checkbox.js +1476 -0
- package/lib/tr-grid-checkbox/es6/index.d.ts +1 -0
- package/lib/tr-grid-checkbox/es6/index.js +1 -0
- package/lib/tr-grid-column-fitter/es6/ColumnFitter.d.ts +56 -0
- package/lib/tr-grid-column-fitter/es6/ColumnFitter.js +1000 -0
- package/lib/tr-grid-column-fitter/es6/index.d.ts +1 -0
- package/lib/tr-grid-column-fitter/es6/index.js +1 -0
- package/lib/tr-grid-column-formatting/es6/ColumnFormatting.d.ts +89 -0
- package/lib/tr-grid-column-formatting/es6/ColumnFormatting.js +615 -0
- package/lib/tr-grid-column-formatting/es6/index.d.ts +1 -0
- package/lib/tr-grid-column-formatting/es6/index.js +1 -0
- package/lib/tr-grid-column-grouping/es6/ColumnGrouping.d.ts +60 -0
- package/lib/tr-grid-column-grouping/es6/ColumnGrouping.js +913 -0
- package/lib/tr-grid-column-grouping/es6/index.d.ts +1 -0
- package/lib/tr-grid-column-grouping/es6/index.js +1 -0
- package/lib/tr-grid-column-resizing/es6/ColumnResizing.d.ts +68 -0
- package/lib/tr-grid-column-resizing/es6/ColumnResizing.js +1013 -0
- package/lib/tr-grid-column-resizing/es6/index.d.ts +1 -0
- package/lib/tr-grid-column-resizing/es6/index.js +1 -0
- package/lib/tr-grid-column-selection/es6/ColumnSelection.d.ts +70 -0
- package/lib/tr-grid-column-selection/es6/ColumnSelection.js +928 -0
- package/lib/tr-grid-column-selection/es6/index.d.ts +1 -0
- package/lib/tr-grid-column-selection/es6/index.js +1 -0
- package/lib/tr-grid-column-stack/es6/ColumnStack.d.ts +76 -0
- package/lib/tr-grid-column-stack/es6/ColumnStack.js +1227 -0
- package/lib/tr-grid-column-stack/es6/index.d.ts +1 -0
- package/lib/tr-grid-column-stack/es6/index.js +1 -0
- package/lib/tr-grid-conditional-coloring/es6/ConditionalColoring.d.ts +70 -0
- package/lib/tr-grid-conditional-coloring/es6/ConditionalColoring.js +947 -0
- package/lib/tr-grid-conditional-coloring/es6/index.d.ts +1 -0
- package/lib/tr-grid-conditional-coloring/es6/index.js +1 -0
- package/lib/tr-grid-content-wrap/es6/ContentWrap.d.ts +43 -0
- package/lib/tr-grid-content-wrap/es6/ContentWrap.js +478 -0
- package/lib/tr-grid-content-wrap/es6/index.d.ts +1 -0
- package/lib/tr-grid-content-wrap/es6/index.js +1 -0
- package/lib/tr-grid-contextmenu/es6/ContextMenu.d.ts +83 -0
- package/lib/tr-grid-contextmenu/es6/ContextMenu.js +471 -0
- package/lib/tr-grid-contextmenu/es6/MenuEventAPI.d.ts +22 -0
- package/lib/tr-grid-contextmenu/es6/MenuEventAPI.js +133 -0
- package/lib/tr-grid-contextmenu/es6/MenuItem.d.ts +39 -0
- package/lib/tr-grid-contextmenu/es6/MenuItem.js +245 -0
- package/lib/tr-grid-contextmenu/es6/PopupMenu.d.ts +29 -0
- package/lib/tr-grid-contextmenu/es6/PopupMenu.js +292 -0
- package/lib/tr-grid-contextmenu/es6/index.d.ts +1 -0
- package/lib/tr-grid-contextmenu/es6/index.js +1 -0
- package/lib/tr-grid-filter-input/es6/FilterInput.d.ts +57 -0
- package/lib/tr-grid-filter-input/es6/FilterInput.js +928 -0
- package/lib/tr-grid-filter-input/es6/index.d.ts +1 -0
- package/lib/tr-grid-filter-input/es6/index.js +1 -0
- package/lib/tr-grid-heat-map/es6/HeatMap.d.ts +44 -0
- package/lib/tr-grid-heat-map/es6/HeatMap.js +394 -0
- package/lib/tr-grid-heat-map/es6/index.d.ts +1 -0
- package/lib/tr-grid-heat-map/es6/index.js +1 -0
- package/lib/tr-grid-in-cell-editing/es6/InCellEditing.d.ts +129 -0
- package/lib/tr-grid-in-cell-editing/es6/InCellEditing.js +1977 -0
- package/lib/tr-grid-in-cell-editing/es6/index.d.ts +1 -0
- package/lib/tr-grid-in-cell-editing/es6/index.js +1 -0
- package/lib/tr-grid-pagination/es6/Pagination.d.ts +57 -0
- package/lib/tr-grid-pagination/es6/Pagination.js +427 -0
- package/lib/tr-grid-pagination/es6/index.d.ts +1 -0
- package/lib/tr-grid-pagination/es6/index.js +1 -0
- package/lib/tr-grid-percent-bar/es6/PercentBar.d.ts +60 -0
- package/lib/tr-grid-percent-bar/es6/PercentBar.js +801 -0
- package/lib/tr-grid-percent-bar/es6/index.d.ts +1 -0
- package/lib/tr-grid-percent-bar/es6/index.js +1 -0
- package/lib/tr-grid-printer/es6/CellWriter.d.ts +49 -0
- package/lib/tr-grid-printer/es6/CellWriter.js +226 -0
- package/lib/tr-grid-printer/es6/ColumnWriter.d.ts +12 -0
- package/lib/tr-grid-printer/es6/ColumnWriter.js +21 -0
- package/lib/tr-grid-printer/es6/GridPrinter.d.ts +32 -0
- package/lib/tr-grid-printer/es6/GridPrinter.js +761 -0
- package/lib/tr-grid-printer/es6/PrintTrait.d.ts +38 -0
- package/lib/tr-grid-printer/es6/PrintTrait.js +481 -0
- package/lib/tr-grid-printer/es6/SectionWriter.d.ts +54 -0
- package/lib/tr-grid-printer/es6/SectionWriter.js +205 -0
- package/lib/tr-grid-printer/es6/index.d.ts +1 -0
- package/lib/tr-grid-printer/es6/index.js +1 -0
- package/lib/tr-grid-range-bar/es6/RangeBar.d.ts +39 -0
- package/lib/tr-grid-range-bar/es6/RangeBar.js +353 -0
- package/lib/tr-grid-range-bar/es6/index.d.ts +1 -0
- package/lib/tr-grid-range-bar/es6/index.js +1 -0
- package/lib/tr-grid-row-dragging/es6/RowDragging.d.ts +53 -0
- package/lib/tr-grid-row-dragging/es6/RowDragging.js +794 -0
- package/lib/tr-grid-row-dragging/es6/index.d.ts +1 -0
- package/lib/tr-grid-row-dragging/es6/index.js +1 -0
- package/lib/tr-grid-row-filtering/es6/RowFiltering.d.ts +118 -0
- package/lib/tr-grid-row-filtering/es6/RowFiltering.js +1884 -0
- package/lib/tr-grid-row-filtering/es6/index.d.ts +1 -0
- package/lib/tr-grid-row-filtering/es6/index.js +1 -0
- package/lib/tr-grid-row-grouping/es6/RowGrouping.d.ts +109 -0
- package/lib/tr-grid-row-grouping/es6/RowGrouping.js +1541 -0
- package/lib/tr-grid-row-grouping/es6/index.d.ts +1 -0
- package/lib/tr-grid-row-grouping/es6/index.js +1 -0
- package/lib/tr-grid-row-selection/es6/RowSelection.d.ts +74 -0
- package/lib/tr-grid-row-selection/es6/RowSelection.js +1202 -0
- package/lib/tr-grid-row-selection/es6/index.d.ts +1 -0
- package/lib/tr-grid-row-selection/es6/index.js +1 -0
- package/lib/tr-grid-rowcoloring/es6/RowColoring.d.ts +60 -0
- package/lib/tr-grid-rowcoloring/es6/RowColoring.js +611 -0
- package/lib/tr-grid-rowcoloring/es6/index.d.ts +1 -0
- package/lib/tr-grid-rowcoloring/es6/index.js +1 -0
- package/lib/tr-grid-textformatting/es6/TextFormatting.d.ts +77 -0
- package/lib/tr-grid-textformatting/es6/TextFormatting.js +574 -0
- package/lib/tr-grid-textformatting/es6/index.d.ts +1 -0
- package/lib/tr-grid-textformatting/es6/index.js +1 -0
- package/lib/tr-grid-titlewrap/es6/TitleWrap.d.ts +29 -0
- package/lib/tr-grid-titlewrap/es6/TitleWrap.js +431 -0
- package/lib/tr-grid-titlewrap/es6/index.d.ts +1 -0
- package/lib/tr-grid-titlewrap/es6/index.js +1 -0
- package/lib/tr-grid-util/es6/CellPainter.d.ts +136 -0
- package/lib/tr-grid-util/es6/CellPainter.js +1128 -0
- package/lib/tr-grid-util/es6/Conflator.d.ts +34 -0
- package/lib/tr-grid-util/es6/Conflator.js +193 -0
- package/lib/tr-grid-util/es6/CoralItems.d.ts +10 -0
- package/lib/tr-grid-util/es6/CoralItems.js +42 -0
- package/lib/tr-grid-util/es6/DateTime.d.ts +57 -0
- package/lib/tr-grid-util/es6/DateTime.js +508 -0
- package/lib/tr-grid-util/es6/Deferred.d.ts +14 -0
- package/lib/tr-grid-util/es6/Deferred.js +98 -0
- package/lib/tr-grid-util/es6/Delay.d.ts +20 -0
- package/lib/tr-grid-util/es6/Delay.js +85 -0
- package/lib/tr-grid-util/es6/Dom.d.ts +32 -0
- package/lib/tr-grid-util/es6/Dom.js +346 -0
- package/lib/tr-grid-util/es6/ElementObserver.d.ts +10 -0
- package/lib/tr-grid-util/es6/ElementObserver.js +101 -0
- package/lib/tr-grid-util/es6/ElementWrapper.d.ts +23 -0
- package/lib/tr-grid-util/es6/ElementWrapper.js +83 -0
- package/lib/tr-grid-util/es6/ElfDate.d.ts +26 -0
- package/lib/tr-grid-util/es6/ElfDate.js +163 -0
- package/lib/tr-grid-util/es6/ElfUtil.d.ts +33 -0
- package/lib/tr-grid-util/es6/ElfUtil.js +458 -0
- package/lib/tr-grid-util/es6/EventDispatcher.d.ts +26 -0
- package/lib/tr-grid-util/es6/EventDispatcher.js +161 -0
- package/lib/tr-grid-util/es6/ExpanderIcon.d.ts +27 -0
- package/lib/tr-grid-util/es6/ExpanderIcon.js +169 -0
- package/lib/tr-grid-util/es6/Ext.d.ts +10 -0
- package/lib/tr-grid-util/es6/Ext.js +52 -0
- package/lib/tr-grid-util/es6/FieldFormatter.d.ts +55 -0
- package/lib/tr-grid-util/es6/FieldFormatter.js +432 -0
- package/lib/tr-grid-util/es6/FilterBuilder.d.ts +48 -0
- package/lib/tr-grid-util/es6/FilterBuilder.js +521 -0
- package/lib/tr-grid-util/es6/FilterOperators.d.ts +41 -0
- package/lib/tr-grid-util/es6/FilterOperators.js +181 -0
- package/lib/tr-grid-util/es6/GridPlugin.d.ts +72 -0
- package/lib/tr-grid-util/es6/GridPlugin.js +747 -0
- package/lib/tr-grid-util/es6/Icon.d.ts +14 -0
- package/lib/tr-grid-util/es6/Icon.js +61 -0
- package/lib/tr-grid-util/es6/MouseDownTrait.d.ts +42 -0
- package/lib/tr-grid-util/es6/MouseDownTrait.js +237 -0
- package/lib/tr-grid-util/es6/MultiTableManager.d.ts +32 -0
- package/lib/tr-grid-util/es6/MultiTableManager.js +506 -0
- package/lib/tr-grid-util/es6/NumberFormatter.d.ts +83 -0
- package/lib/tr-grid-util/es6/NumberFormatter.js +471 -0
- package/lib/tr-grid-util/es6/PercentBar.d.ts +71 -0
- package/lib/tr-grid-util/es6/PercentBar.js +600 -0
- package/lib/tr-grid-util/es6/Perf.d.ts +32 -0
- package/lib/tr-grid-util/es6/Perf.js +162 -0
- package/lib/tr-grid-util/es6/Popup.d.ts +84 -0
- package/lib/tr-grid-util/es6/Popup.js +818 -0
- package/lib/tr-grid-util/es6/RangeBar.d.ts +33 -0
- package/lib/tr-grid-util/es6/RangeBar.js +259 -0
- package/lib/tr-grid-util/es6/RequestQueue.d.ts +30 -0
- package/lib/tr-grid-util/es6/RequestQueue.js +239 -0
- package/lib/tr-grid-util/es6/RowPainter.d.ts +23 -0
- package/lib/tr-grid-util/es6/RowPainter.js +188 -0
- package/lib/tr-grid-util/es6/SubTable.d.ts +74 -0
- package/lib/tr-grid-util/es6/SubTable.js +558 -0
- package/lib/tr-grid-util/es6/Table.d.ts +125 -0
- package/lib/tr-grid-util/es6/Table.js +790 -0
- package/lib/tr-grid-util/es6/TextHighlighter.d.ts +18 -0
- package/lib/tr-grid-util/es6/TextHighlighter.js +273 -0
- package/lib/tr-grid-util/es6/TickCodes.d.ts +8 -0
- package/lib/tr-grid-util/es6/TickCodes.js +33 -0
- package/lib/tr-grid-util/es6/Timer.d.ts +16 -0
- package/lib/tr-grid-util/es6/Timer.js +49 -0
- package/lib/tr-grid-util/es6/TouchProxy.d.ts +46 -0
- package/lib/tr-grid-util/es6/TouchProxy.js +212 -0
- package/lib/tr-grid-util/es6/Util.d.ts +65 -0
- package/lib/tr-grid-util/es6/Util.js +528 -0
- package/lib/tr-grid-util/es6/formula/ADCService.d.ts +11 -0
- package/lib/tr-grid-util/es6/formula/ADCService.js +72 -0
- package/lib/tr-grid-util/es6/formula/ADCSubscription.d.ts +17 -0
- package/lib/tr-grid-util/es6/formula/ADCSubscription.js +317 -0
- package/lib/tr-grid-util/es6/formula/AdFinService.d.ts +12 -0
- package/lib/tr-grid-util/es6/formula/AdFinService.js +61 -0
- package/lib/tr-grid-util/es6/formula/AdFinSubscription.d.ts +19 -0
- package/lib/tr-grid-util/es6/formula/AdFinSubscription.js +310 -0
- package/lib/tr-grid-util/es6/formula/Engine.d.ts +56 -0
- package/lib/tr-grid-util/es6/formula/Engine.js +592 -0
- package/lib/tr-grid-util/es6/formula/Formula.d.ts +68 -0
- package/lib/tr-grid-util/es6/formula/Formula.js +882 -0
- package/lib/tr-grid-util/es6/formula/IntervalSubscription.d.ts +16 -0
- package/lib/tr-grid-util/es6/formula/IntervalSubscription.js +165 -0
- package/lib/tr-grid-util/es6/formula/Realtime.d.ts +18 -0
- package/lib/tr-grid-util/es6/formula/Realtime.js +279 -0
- package/lib/tr-grid-util/es6/formula/RealtimeService.d.ts +18 -0
- package/lib/tr-grid-util/es6/formula/RealtimeService.js +203 -0
- package/lib/tr-grid-util/es6/formula/TSIService.d.ts +11 -0
- package/lib/tr-grid-util/es6/formula/TSIService.js +51 -0
- package/lib/tr-grid-util/es6/formula/TSISubscription.d.ts +18 -0
- package/lib/tr-grid-util/es6/formula/TSISubscription.js +1015 -0
- package/lib/tr-grid-util/es6/formula/VariableToken.d.ts +30 -0
- package/lib/tr-grid-util/es6/formula/VariableToken.js +314 -0
- package/lib/tr-grid-util/es6/formula/functions/AdFin.d.ts +9 -0
- package/lib/tr-grid-util/es6/formula/functions/AdFin.js +1778 -0
- package/lib/tr-grid-util/es6/formula/functions/Excel.d.ts +8 -0
- package/lib/tr-grid-util/es6/formula/functions/Excel.js +21 -0
- package/lib/tr-grid-util/es6/formula/functions/Info.d.ts +8 -0
- package/lib/tr-grid-util/es6/formula/functions/Info.js +192 -0
- package/lib/tr-grid-util/es6/formula/functions/Internal.d.ts +8 -0
- package/lib/tr-grid-util/es6/formula/functions/Internal.js +90 -0
- package/lib/tr-grid-util/es6/formula/functions/Logic.d.ts +12 -0
- package/lib/tr-grid-util/es6/formula/functions/Logic.js +176 -0
- package/lib/tr-grid-util/es6/formula/functions/Math.d.ts +18 -0
- package/lib/tr-grid-util/es6/formula/functions/Math.js +1624 -0
- package/lib/tr-grid-util/es6/formula/functions/Statistics.d.ts +18 -0
- package/lib/tr-grid-util/es6/formula/functions/Statistics.js +234 -0
- package/lib/tr-grid-util/es6/formula/functions/Text.d.ts +10 -0
- package/lib/tr-grid-util/es6/formula/functions/Text.js +676 -0
- package/lib/tr-grid-util/es6/index.d.ts +63 -0
- package/lib/tr-grid-util/es6/index.js +99 -0
- package/lib/tr-grid-util/es6/jet/CollectionDict.d.ts +28 -0
- package/lib/tr-grid-util/es6/jet/CollectionDict.js +141 -0
- package/lib/tr-grid-util/es6/jet/DataGenerator.d.ts +114 -0
- package/lib/tr-grid-util/es6/jet/DataGenerator.js +827 -0
- package/lib/tr-grid-util/es6/jet/DataSet.d.ts +8 -0
- package/lib/tr-grid-util/es6/jet/DataSet.js +392 -0
- package/lib/tr-grid-util/es6/jet/MockArchive.d.ts +21 -0
- package/lib/tr-grid-util/es6/jet/MockArchive.js +56 -0
- package/lib/tr-grid-util/es6/jet/MockJET.d.ts +25 -0
- package/lib/tr-grid-util/es6/jet/MockJET.js +63 -0
- package/lib/tr-grid-util/es6/jet/MockQuotes.d.ts +37 -0
- package/lib/tr-grid-util/es6/jet/MockQuotes.js +199 -0
- package/lib/tr-grid-util/es6/jet/MockQuotes2.d.ts +72 -0
- package/lib/tr-grid-util/es6/jet/MockQuotes2.js +564 -0
- package/lib/tr-grid-util/es6/jet/MockRTK.d.ts +8 -0
- package/lib/tr-grid-util/es6/jet/MockRTK.js +43 -0
- package/lib/tr-grid-util/es6/jet/index.d.ts +9 -0
- package/lib/tr-grid-util/es6/jet/index.js +18 -0
- package/lib/tr-grid-util/es6/jet/mockDataAPI.d.ts +11 -0
- package/lib/tr-grid-util/es6/jet/mockDataAPI.js +131 -0
- package/lib/tr-grid-util/es6/locale/translation-de.d.ts +7 -0
- package/lib/tr-grid-util/es6/locale/translation-de.js +51 -0
- package/lib/tr-grid-util/es6/locale/translation-en.d.ts +7 -0
- package/lib/tr-grid-util/es6/locale/translation-en.js +51 -0
- package/lib/tr-grid-util/es6/locale/translation-ja.d.ts +7 -0
- package/lib/tr-grid-util/es6/locale/translation-ja.js +51 -0
- package/lib/tr-grid-util/es6/locale/translation-zh-hant.d.ts +7 -0
- package/lib/tr-grid-util/es6/locale/translation-zh-hant.js +51 -0
- package/lib/tr-grid-util/es6/locale/translation-zh.d.ts +7 -0
- package/lib/tr-grid-util/es6/locale/translation-zh.js +51 -0
- package/lib/tr-grid-util/es6/locale/translation.d.ts +11 -0
- package/lib/tr-grid-util/es6/locale/translation.js +18 -0
- package/lib/types/es6/AutoTooltip.d.ts +45 -0
- package/lib/types/es6/CellSelection.d.ts +67 -0
- package/lib/types/es6/Checkbox.d.ts +69 -0
- package/lib/types/es6/ColumnFitter.d.ts +56 -0
- package/lib/types/es6/ColumnFormatting.d.ts +90 -0
- package/lib/types/es6/ColumnGrouping.d.ts +60 -0
- package/lib/types/es6/ColumnResizing.d.ts +68 -0
- package/lib/types/es6/ColumnSelection.d.ts +70 -0
- package/lib/types/es6/ColumnStack.d.ts +76 -0
- package/lib/types/es6/CompositeGrid/CollapsibleHeaderPlugin.d.ts +11 -0
- package/lib/types/es6/CompositeGrid/ColumnSelectionPlugin.d.ts +38 -0
- package/lib/types/es6/CompositeGrid/ColumnWidthAdjustingPlugin.d.ts +45 -0
- package/lib/types/es6/CompositeGrid/CompositeGrid.d.ts +287 -0
- package/lib/types/es6/CompositeGrid/DragAndDropTitlePlugin.d.ts +22 -0
- package/lib/types/es6/CompositeGrid/DraggableContentPlugin.d.ts +44 -0
- package/lib/types/es6/CompositeGrid/ResizableTitlePlugin.d.ts +30 -0
- package/lib/types/es6/CompositeGrid/RowSelectionPlugin.d.ts +42 -0
- package/lib/types/es6/CompositeGrid/TextWidthCalculator.d.ts +24 -0
- package/lib/types/es6/CompositeGrid/TreeIndentingPlugin.d.ts +46 -0
- package/lib/types/es6/CompositeGrid/index.d.ts +9 -0
- package/lib/types/es6/ConditionalColoring.d.ts +70 -0
- package/lib/types/es6/ContentWrap.d.ts +43 -0
- package/lib/types/es6/ContextMenu.d.ts +83 -0
- package/lib/types/es6/CoralButtonFormatter.d.ts +22 -0
- package/lib/types/es6/CoralCheckboxFormatter.d.ts +12 -0
- package/lib/types/es6/CoralComboBoxFormatter.d.ts +23 -0
- package/lib/types/es6/CoralIconFormatter.d.ts +23 -0
- package/lib/types/es6/CoralInputFormatter.d.ts +12 -0
- package/lib/types/es6/CoralRadioButtonFormatter.d.ts +22 -0
- package/lib/types/es6/CoralSelectFormatter.d.ts +23 -0
- package/lib/types/es6/CoralToggleFormatter.d.ts +12 -0
- package/lib/types/es6/Core/data/ColumnStats.d.ts +42 -0
- package/lib/types/es6/Core/data/DataCache.d.ts +81 -0
- package/lib/types/es6/Core/data/DataTable.d.ts +125 -0
- package/lib/types/es6/Core/data/DataView.d.ts +280 -0
- package/lib/types/es6/Core/data/Segment.d.ts +38 -0
- package/lib/types/es6/Core/data/SegmentCollection.d.ts +58 -0
- package/lib/types/es6/Core/grid/Core.d.ts +387 -0
- package/lib/types/es6/Core/grid/ILayoutGrid.d.ts +204 -0
- package/lib/types/es6/Core/grid/LayoutGrid.d.ts +23 -0
- package/lib/types/es6/Core/grid/VirtualizedLayoutGrid.d.ts +18 -0
- package/lib/types/es6/Core/grid/components/Cell.d.ts +50 -0
- package/lib/types/es6/Core/grid/components/CellFloatingPanel.d.ts +19 -0
- package/lib/types/es6/Core/grid/components/CellSpan.d.ts +18 -0
- package/lib/types/es6/Core/grid/components/CellSpans.d.ts +38 -0
- package/lib/types/es6/Core/grid/components/Column.d.ts +22 -0
- package/lib/types/es6/Core/grid/components/ElementWrapper.d.ts +125 -0
- package/lib/types/es6/Core/grid/components/HScrollbar.d.ts +24 -0
- package/lib/types/es6/Core/grid/components/Scrollbar.d.ts +61 -0
- package/lib/types/es6/Core/grid/components/StretchedCells.d.ts +17 -0
- package/lib/types/es6/Core/grid/components/VScrollbar.d.ts +18 -0
- package/lib/types/es6/Core/grid/components/VirtualItems.d.ts +12 -0
- package/lib/types/es6/Core/grid/event/EventDispatcher.d.ts +16 -0
- package/lib/types/es6/Core/grid/event/EventListeners.d.ts +34 -0
- package/lib/types/es6/Core/grid/plugins/DragAndDropTitlePlugin.d.ts +24 -0
- package/lib/types/es6/Core/grid/plugins/Plugin.d.ts +28 -0
- package/lib/types/es6/Core/grid/plugins/SortableTitlePlugin.d.ts +127 -0
- package/lib/types/es6/Core/grid/util/Conflator.d.ts +32 -0
- package/lib/types/es6/Core/grid/util/ElementFrameWork.d.ts +18 -0
- package/lib/types/es6/Core/grid/util/HttpRequest.d.ts +53 -0
- package/lib/types/es6/Core/grid/util/PercentBar.d.ts +43 -0
- package/lib/types/es6/Core/grid/util/PercentBarRenderer.d.ts +41 -0
- package/lib/types/es6/Core/grid/util/RangeBar.d.ts +25 -0
- package/lib/types/es6/Core/grid/util/Reverter.d.ts +14 -0
- package/lib/types/es6/Core/grid/util/SectionSettings.d.ts +79 -0
- package/lib/types/es6/Core/grid/util/SelectionList.d.ts +50 -0
- package/lib/types/es6/Core/grid/util/TrackLayout.d.ts +84 -0
- package/lib/types/es6/Core/grid/util/Virtualizer.d.ts +40 -0
- package/lib/types/es6/Core/grid/util/util.d.ts +18 -0
- package/lib/types/es6/Core/index.d.ts +84 -0
- package/lib/types/es6/Core/tr-grid-theme.d.ts +5 -0
- package/lib/types/es6/DuplexEmeraldDateTimePickerFormatter.d.ts +14 -0
- package/lib/types/es6/EFButtonFormatter.d.ts +22 -0
- package/lib/types/es6/EFCheckboxFormatter.d.ts +12 -0
- package/lib/types/es6/EFComboBoxFormatter.d.ts +23 -0
- package/lib/types/es6/EFDateTimePickerFormatter.d.ts +13 -0
- package/lib/types/es6/EFIconFormatter.d.ts +23 -0
- package/lib/types/es6/EFNumberFieldFormatter.d.ts +12 -0
- package/lib/types/es6/EFRadioButtonFormatter.d.ts +22 -0
- package/lib/types/es6/EFSelectFormatter.d.ts +23 -0
- package/lib/types/es6/EFTextFieldFormatter.d.ts +12 -0
- package/lib/types/es6/EFToggleFormatter.d.ts +12 -0
- package/lib/types/es6/EmeraldDateTimePickerFormatter.d.ts +13 -0
- package/lib/types/es6/ExtensionColumnOptions.d.ts +41 -0
- package/lib/types/es6/ExtensionOptions.d.ts +52 -0
- package/lib/types/es6/Extensions.d.ts +61 -0
- package/lib/types/es6/FilterInput.d.ts +57 -0
- package/lib/types/es6/FormatterBuilder.d.ts +22 -0
- package/lib/types/es6/GridFormatter.d.ts +63 -0
- package/lib/types/es6/HeatMap.d.ts +44 -0
- package/lib/types/es6/InCellEditing.d.ts +129 -0
- package/lib/types/es6/MenuEventAPI.d.ts +22 -0
- package/lib/types/es6/MenuItem.d.ts +39 -0
- package/lib/types/es6/NumericInputFormatter.d.ts +13 -0
- package/lib/types/es6/Pagination.d.ts +57 -0
- package/lib/types/es6/PercentBar.d.ts +60 -0
- package/lib/types/es6/PercentBarFormatter.d.ts +25 -0
- package/lib/types/es6/PopupMenu.d.ts +29 -0
- package/lib/types/es6/RangeBar.d.ts +39 -0
- package/lib/types/es6/RealtimeGrid/ColumnDefinition.d.ts +143 -0
- package/lib/types/es6/RealtimeGrid/DataConnector.d.ts +37 -0
- package/lib/types/es6/RealtimeGrid/FieldDefinition.d.ts +20 -0
- package/lib/types/es6/RealtimeGrid/Grid.d.ts +263 -0
- package/lib/types/es6/RealtimeGrid/PredefinedFormula.d.ts +16 -0
- package/lib/types/es6/RealtimeGrid/ReferenceCounter.d.ts +38 -0
- package/lib/types/es6/RealtimeGrid/RowDefinition.d.ts +120 -0
- package/lib/types/es6/RealtimeGrid/SnapshotFiller.d.ts +21 -0
- package/lib/types/es6/RealtimeGrid/StyleLoader.d.ts +17 -0
- package/lib/types/es6/RealtimeGrid/index.d.ts +8 -0
- package/lib/types/es6/RowColoring.d.ts +60 -0
- package/lib/types/es6/RowDragging.d.ts +53 -0
- package/lib/types/es6/RowFiltering.d.ts +118 -0
- package/lib/types/es6/RowGrouping.d.ts +109 -0
- package/lib/types/es6/RowSegmenting.d.ts +83 -0
- package/lib/types/es6/RowSelection.d.ts +74 -0
- package/lib/types/es6/SimpleImageFormatter.d.ts +21 -0
- package/lib/types/es6/SimpleInputFormatter.d.ts +12 -0
- package/lib/types/es6/SimpleLinkFormatter.d.ts +21 -0
- package/lib/types/es6/SimpleTickerFormatter.d.ts +25 -0
- package/lib/types/es6/SimpleToggleFormatter.d.ts +22 -0
- package/lib/types/es6/StatisticsRow.d.ts +67 -0
- package/lib/types/es6/TextFormatter.d.ts +12 -0
- package/lib/types/es6/TextFormatting.d.ts +77 -0
- package/lib/types/es6/TitleWrap.d.ts +29 -0
- package/lib/types/es6/Zoom.d.ts +51 -0
- package/lib/types/es6/index.d.ts +76 -0
- package/lib/types/index.d.ts +1 -0
- package/lib/versions.json +36 -0
- package/lib/window-exporter.js +13 -0
- package/lib/zoom/es6/Zoom.d.ts +51 -0
- package/lib/zoom/es6/Zoom.js +419 -0
- package/lib/zoom/es6/index.d.ts +1 -0
- package/lib/zoom/es6/index.js +1 -0
- package/package.json +42 -0
@@ -0,0 +1,508 @@
|
|
1
|
+
import translation from './locale/translation.js';
|
2
|
+
import ElfUtil from './ElfUtil.js';
|
3
|
+
|
4
|
+
/** @type {!Date}
|
5
|
+
* @public
|
6
|
+
* @constant
|
7
|
+
*/
|
8
|
+
var INVALID_DATE = new Date(NaN); // eslint-disable-line
|
9
|
+
/** JavaScript date starts at Jan 01 1970, while Excel date starts at Jan 01 1900 (before JavaScript date). This value is the difference in days between the two values.
|
10
|
+
* @type {number}
|
11
|
+
* @private
|
12
|
+
* @constant
|
13
|
+
*/
|
14
|
+
var _DIFF_DAYS = 25567 + 2; // Start 1 on 1 Jan 1900 + 1 for error on 29 Feb 1900 (Not existing date but existing in window)
|
15
|
+
/** Starting date (1 Jan 1900) of Excel date in milliseconds counting from JavaScript date
|
16
|
+
* @type {number}
|
17
|
+
* @private
|
18
|
+
* @constant
|
19
|
+
*/
|
20
|
+
var _1_JAN_1900 = Date.UTC(1900, 0, 1); // -2208988800000
|
21
|
+
/** @type {number}
|
22
|
+
* @private
|
23
|
+
* @constant
|
24
|
+
*/
|
25
|
+
var _1_MAR_1900 = Date.UTC(1900, 2, 1); // -2203891200000
|
26
|
+
/** @type {number}
|
27
|
+
* @public
|
28
|
+
* @constant
|
29
|
+
*/
|
30
|
+
var MILLISECONDS_IN_DAY = 24 * 60 * 60 * 1000; // 86400000
|
31
|
+
/** 86400 seconds in a day
|
32
|
+
* @type {number}
|
33
|
+
* @public
|
34
|
+
* @constant
|
35
|
+
*/
|
36
|
+
var SECONDS_IN_DAY = 24 * 60 * 60; // eslint-disable-line
|
37
|
+
/** 3600 seconds in a day
|
38
|
+
* @type {number}
|
39
|
+
* @public
|
40
|
+
* @constant
|
41
|
+
*/
|
42
|
+
var SECONDS_IN_HOUR = 60 * 60; // eslint-disable-line
|
43
|
+
/** @type {number}
|
44
|
+
* @public
|
45
|
+
* @constant
|
46
|
+
*/
|
47
|
+
var SECONDS_IN_MINUTE = 60; // eslint-disable-line
|
48
|
+
|
49
|
+
/** @type {Array.<string>}
|
50
|
+
* @public
|
51
|
+
* @constant
|
52
|
+
*/
|
53
|
+
var SHORT_DAYS = ["sun", "mon", "tue", "wed", "thu", "fri", "sat"];
|
54
|
+
/** @type {Array.<string>}
|
55
|
+
* @public
|
56
|
+
* @constant
|
57
|
+
*/
|
58
|
+
var FULL_DAYS = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
|
59
|
+
/** @type {Array.<string>}
|
60
|
+
* @public
|
61
|
+
* @constant
|
62
|
+
*/
|
63
|
+
var SHORT_MONTHS = ["jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov", "dec"];
|
64
|
+
/** @type {Array.<string>}
|
65
|
+
* @public
|
66
|
+
* @constant
|
67
|
+
*/
|
68
|
+
var FULL_MONTHS = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
|
69
|
+
|
70
|
+
/** Add zero prefix to the number. WARNING: Does not support negative number
|
71
|
+
* @ignore
|
72
|
+
* @function
|
73
|
+
* @param {number} num
|
74
|
+
* @return {string}
|
75
|
+
*/
|
76
|
+
var prefixZero = function(num) {
|
77
|
+
return (num > 9) ? "" + num : "0" + num;
|
78
|
+
};
|
79
|
+
|
80
|
+
/** Add double zero prefix to the number. WARNING: Does not support negative number
|
81
|
+
* @ignore
|
82
|
+
* @function
|
83
|
+
* @param {number} num
|
84
|
+
* @return {string}
|
85
|
+
*/
|
86
|
+
var prefixDoubleZero = function(num) {
|
87
|
+
if (num > 99) {
|
88
|
+
return "" + num;
|
89
|
+
} else if (num > 9) {
|
90
|
+
return "0" + num;
|
91
|
+
} else {
|
92
|
+
return "00" + num;
|
93
|
+
}
|
94
|
+
};
|
95
|
+
|
96
|
+
/** @type {!Object.<string, Function>}
|
97
|
+
* @ignore
|
98
|
+
* @description Map of date pattern convertion
|
99
|
+
*/
|
100
|
+
var Parsers = {
|
101
|
+
// Interday time
|
102
|
+
"D": function(date, locale) { return "" + date.getDate(); },
|
103
|
+
"DD": function(date, locale) { return prefixZero(date.getDate()); },
|
104
|
+
"DDD": function(date, locale) { return locale[ SHORT_DAYS[date.getDay()] ]; },
|
105
|
+
"D_": function(date, locale) { return locale[ FULL_DAYS[date.getDay()] ]; },
|
106
|
+
"M": function(date, locale) { return "" + (date.getMonth() + 1); },
|
107
|
+
"MM": function(date, locale) { return prefixZero(date.getMonth() + 1); },
|
108
|
+
"MMM": function(date, locale) { return locale[ SHORT_MONTHS[date.getMonth()] ]; },
|
109
|
+
"M_": function(date, locale) { return locale[ FULL_MONTHS[date.getMonth()] ]; },
|
110
|
+
"YY": function(date, locale) { return ("" + date.getFullYear()).substr(-2); },
|
111
|
+
"Y_": function(date, locale) { return "" + date.getFullYear(); },
|
112
|
+
// Intraday time
|
113
|
+
"H": function(date, locale) { return "" + date.getHours(); },
|
114
|
+
"H_": function(date, locale) { return prefixZero(date.getHours()); },
|
115
|
+
"h": function(date, locale) {
|
116
|
+
var temp = date.getHours() % 12;
|
117
|
+
return (temp === 0) ? "12" : "" + temp;
|
118
|
+
},
|
119
|
+
"h_": function(date, locale) {
|
120
|
+
var temp = date.getHours() % 12;
|
121
|
+
temp = (temp === 0) ? 12 : temp;
|
122
|
+
return prefixZero(temp);
|
123
|
+
},
|
124
|
+
"m": function(date, locale) { return "" + date.getMinutes(); },
|
125
|
+
"m_": function(date, locale) { return prefixZero(date.getMinutes()); },
|
126
|
+
"s": function(date, locale) { return "" + date.getSeconds(); },
|
127
|
+
"s_": function(date, locale) { return prefixZero(date.getSeconds()); },
|
128
|
+
"S": function(date, locale) { return ~~(date.getMilliseconds() / 100); },
|
129
|
+
"SS": function(date, locale) { return prefixZero(~~(date.getMilliseconds() / 10)); },
|
130
|
+
"S_": function(date, locale) { return prefixDoubleZero(date.getMilliseconds()); },
|
131
|
+
// AM/PM suffix
|
132
|
+
"A": function(date, locale) { return (date.getHours() < 12) ? locale["AM"] : locale["PM"]; },
|
133
|
+
"a": function(date, locale) { return (date.getHours() < 12) ? locale["am"] : locale["pm"]; }
|
134
|
+
};
|
135
|
+
|
136
|
+
/** @namespace
|
137
|
+
*/
|
138
|
+
var DateTime = {};
|
139
|
+
|
140
|
+
/**
|
141
|
+
* @type {string}
|
142
|
+
* @private
|
143
|
+
*/
|
144
|
+
DateTime._dateTimePattern = "M/D/YY h:mm A";
|
145
|
+
/**
|
146
|
+
* @type {string}
|
147
|
+
* @private
|
148
|
+
*/
|
149
|
+
DateTime._localeSetting = "en";
|
150
|
+
/**
|
151
|
+
* @type {Object.<string, string>}
|
152
|
+
* @private
|
153
|
+
*/
|
154
|
+
DateTime._activeLocaleMap = null;
|
155
|
+
/**
|
156
|
+
* @type {Date}
|
157
|
+
* @private
|
158
|
+
*/
|
159
|
+
DateTime._activeInput = null;
|
160
|
+
|
161
|
+
|
162
|
+
/** @public
|
163
|
+
* @function
|
164
|
+
* @description Set the default date time format in formula.
|
165
|
+
* @param {string=} format
|
166
|
+
*/
|
167
|
+
DateTime.setDateTimePattern = function(format) {
|
168
|
+
DateTime._dateTimePattern = format || "M/D/YY h:mm A";
|
169
|
+
};
|
170
|
+
/** @public
|
171
|
+
* @function
|
172
|
+
* @description Set the locale language for localization.
|
173
|
+
* @param {string=} lang
|
174
|
+
*/
|
175
|
+
DateTime.setLocale = function(lang) {
|
176
|
+
var mainLang = ElfUtil.toLangString(lang);
|
177
|
+
DateTime._localeSetting = translation[mainLang] ? mainLang : "en";
|
178
|
+
};
|
179
|
+
|
180
|
+
/**
|
181
|
+
* @public
|
182
|
+
* @function
|
183
|
+
* @description The TEXT function converts an date & time number since 1 Jan, 1900 into a text in customizable format. Default is YYYY-MM-DD HH:mm:ss.
|
184
|
+
* @param {number|string|Date} dateTimeNumber A date & time number since 1 Jan, 1900 or date & time text in format YYYY-MM-DDTHH:mm:ss
|
185
|
+
* @param {string=} dateTimeFormat A customized format of the result. Default format is M/D/YY h:mm A.
|
186
|
+
* @param {string=} timezone GMT (Greenwich Mean Time) or LOCAL (Local timezone). Default is GMT.
|
187
|
+
* @return {string}
|
188
|
+
* @example
|
189
|
+
* ---------------------------------------------------------------------
|
190
|
+
* | Group | Character | English Output |
|
191
|
+
* ---------------------------------------------------------------------
|
192
|
+
* | Year | YY / yy | 00 01 ... 16 17 |
|
193
|
+
* | | YYYY / yyyy | 2000 2001 ... 2016 2017 |
|
194
|
+
* | Month | M | 1 2 ... 11 12 |
|
195
|
+
* | | MM | 01 02 ... 11 12 |
|
196
|
+
* | | MMM | Jan Feb ... Nov Dec |
|
197
|
+
* | | MMMM | January February ... November December|
|
198
|
+
* | Day | D / d | 1 2 ... 30 31 |
|
199
|
+
* | | DD / dd | 01 02 ... 30 31 |
|
200
|
+
* | | DDD / ddd | Sun Mon ... Fri Sat |
|
201
|
+
* | | DDDD / dddd | Sunday Monday ... Friday Saturday |
|
202
|
+
* | Hour | H | 0 1 ... 22 23 |
|
203
|
+
* | | HH | 00 01 ... 22 23 |
|
204
|
+
* | | h | 1 2 ... 11 12 |
|
205
|
+
* | | hh | 01 02 ... 11 12 |
|
206
|
+
* | Minute | m | 0 1 ... 58 59 |
|
207
|
+
* | | mm | 00 01 ... 58 59 |
|
208
|
+
* | Second | s | 0 1 ... 58 59 |
|
209
|
+
* | | ss | 00 01 ... 58 59 |
|
210
|
+
* | Millisecond | S | 0 1 ... 8 9 |
|
211
|
+
* | | SS | 00 01 ... 98 99 |
|
212
|
+
* | | SSS | 001 002 ... 998 999 |
|
213
|
+
* | AM/PM | A | AM PM |
|
214
|
+
* | | a | am pm |
|
215
|
+
* ---------------------------------------------------------------------
|
216
|
+
*/
|
217
|
+
DateTime.format = function(dateTimeNumber, dateTimeFormat, timezone) {
|
218
|
+
var date = null;
|
219
|
+
var dtTxt = ""; // new Date() is on par with Date.parse in term of performance.
|
220
|
+
var localTime = !!(timezone && timezone.toUpperCase() === "LOCAL");
|
221
|
+
if(typeof dateTimeNumber === "number") {
|
222
|
+
if(dateTimeNumber > 1e8) { // Maximum date is 100 millions and any number greater than that is assumed to be millisecond
|
223
|
+
date = new Date(dateTimeNumber); // convert milisecond
|
224
|
+
} else { // The given number is assumed to be in Excel format (i.e. integer represents date and fraction represents time)
|
225
|
+
// This number is a product of other formulas (e.g. TODAY(), NOW()), which are all local time.
|
226
|
+
date = DateTime.fromDateNumber(dateTimeNumber);
|
227
|
+
localTime = true; // Assume that the given date is already in local time
|
228
|
+
}
|
229
|
+
} else if(dateTimeNumber instanceof Date) {
|
230
|
+
// Monitor timestamp should pass the value as Date object
|
231
|
+
// IDN data should pass the value as Date object. E.g. CF_DATE, CF_TIME
|
232
|
+
date = new Date(dateTimeNumber); // Always clone the passing object as Date object is mutable
|
233
|
+
} else {
|
234
|
+
// Pass the value with string format, expected to be ISO8601 format (YYYY-MM-DDTHH:mm:ss)
|
235
|
+
dtTxt = dateTimeNumber + "";
|
236
|
+
var isISO8601 = dtTxt.match(/^\d{4}(-\d{2}(-\d{2}(T\d{2}\:\d{2}\:\d{2})?)?)?$/);
|
237
|
+
dtTxt = dtTxt.replace(/\-/g, "\/"); // Convert to YYYY/MM/DD HH:mm:ss (common for all browsers)
|
238
|
+
if(isISO8601) {
|
239
|
+
dtTxt = dtTxt.replace(/T/g, " "); // Convert to YYYY/MM/DD HH:mm:ss (common for all browsers)
|
240
|
+
}
|
241
|
+
|
242
|
+
date = new Date(dtTxt);
|
243
|
+
}
|
244
|
+
|
245
|
+
if(DateTime.isInvalidDate(date)) { // Invalid date
|
246
|
+
return dateTimeNumber || ""; // TODO: Check if we need to convert the original object to string
|
247
|
+
}
|
248
|
+
|
249
|
+
// Convert non-local time (GMT) to local time
|
250
|
+
if(!localTime) {
|
251
|
+
date.setTime(date.getTime() + date.getTimezoneOffset() * 60000);
|
252
|
+
}
|
253
|
+
|
254
|
+
return DateTime.formatDateObject(date, dateTimeFormat);
|
255
|
+
};
|
256
|
+
/** Format the Date object to specified format.
|
257
|
+
* @public
|
258
|
+
* @function
|
259
|
+
* @param {Date} date Date object
|
260
|
+
* @param {string=} dateTimeFormat Datetime format. Referred to TEXT function.
|
261
|
+
* @return {string} Return empty string, if the given date object is invalid
|
262
|
+
*/
|
263
|
+
DateTime.formatDateObject = function(date, dateTimeFormat) {
|
264
|
+
if(DateTime.isInvalidDate(date)) { // Invalid date
|
265
|
+
return "";
|
266
|
+
}
|
267
|
+
|
268
|
+
if(!dateTimeFormat) {
|
269
|
+
dateTimeFormat = DateTime._dateTimePattern;
|
270
|
+
}
|
271
|
+
|
272
|
+
DateTime._activeInput = date;
|
273
|
+
DateTime._activeLocaleMap = translation[DateTime._localeSetting] || DateTimeLocale["en"];
|
274
|
+
|
275
|
+
var result = dateTimeFormat.replace(/D+|M+|Y+|H+|S+|A+|d+|m+|y+|h+|s+|a+|\[[^\]]*\]+/g, DateTime._parseDatePattern);
|
276
|
+
DateTime._activeInput = null;
|
277
|
+
|
278
|
+
return result;
|
279
|
+
};
|
280
|
+
|
281
|
+
/** @type {!Object.<string, boolean>}
|
282
|
+
* @private
|
283
|
+
*/
|
284
|
+
DateTime._lowerCaseDatePatterns = {
|
285
|
+
"d": true,
|
286
|
+
"y": true
|
287
|
+
};
|
288
|
+
/**
|
289
|
+
* @private
|
290
|
+
* @function
|
291
|
+
* @param {string} match
|
292
|
+
* @return {string}
|
293
|
+
*/
|
294
|
+
DateTime._parseDatePattern = function(match) {
|
295
|
+
var fchar = (match) ? match.charAt(0) : "";
|
296
|
+
if(fchar === "[") { // Static text
|
297
|
+
return match.substring(1, match.length - 1);
|
298
|
+
}
|
299
|
+
|
300
|
+
var parser = Parsers[match];
|
301
|
+
if(!parser) {
|
302
|
+
var mod = match;
|
303
|
+
if(DateTime._lowerCaseDatePatterns[fchar]) {
|
304
|
+
mod = match.toUpperCase();
|
305
|
+
fchar = fchar.toUpperCase();
|
306
|
+
parser = Parsers[mod];
|
307
|
+
}
|
308
|
+
if(!parser) {
|
309
|
+
mod = fchar + "_";
|
310
|
+
parser = Parsers[mod];
|
311
|
+
}
|
312
|
+
}
|
313
|
+
if(parser) {
|
314
|
+
return parser(DateTime._activeInput, DateTime._activeLocaleMap);
|
315
|
+
}
|
316
|
+
return match;
|
317
|
+
};
|
318
|
+
|
319
|
+
/** Check if the given date obj is valid without any automatic data type conversion.
|
320
|
+
* @public
|
321
|
+
* @function
|
322
|
+
* @param {Date} dateObj Date number since 1 Jan, 1900 (value is 1)
|
323
|
+
* @return {boolean}
|
324
|
+
*/
|
325
|
+
DateTime.isValidDate = function(dateObj) {
|
326
|
+
if(dateObj) {
|
327
|
+
if(dateObj.getTime) {
|
328
|
+
var t = dateObj.getTime();
|
329
|
+
return t === t;
|
330
|
+
}
|
331
|
+
}
|
332
|
+
return false;
|
333
|
+
};
|
334
|
+
/** Check if the given date obj is invalid without any automatic data type conversion.
|
335
|
+
* @public
|
336
|
+
* @function
|
337
|
+
* @param {Date} dateObj Date number since 1 Jan, 1900 (value is 1)
|
338
|
+
* @return {boolean}
|
339
|
+
*/
|
340
|
+
DateTime.isInvalidDate = function(dateObj) {
|
341
|
+
if(dateObj) {
|
342
|
+
if(dateObj.getTime) {
|
343
|
+
var t = dateObj.getTime();
|
344
|
+
return t !== t;
|
345
|
+
}
|
346
|
+
}
|
347
|
+
return true;
|
348
|
+
};
|
349
|
+
|
350
|
+
/** Convert the date number (Excel date format) since 1 Jan, 1900 (value is 1) to Date object.
|
351
|
+
* @public
|
352
|
+
* @function
|
353
|
+
* @param {number} dateNumber Date number since 1 Jan, 1900 (value is 1)
|
354
|
+
* @return {!Date}
|
355
|
+
* @see {@link DateTime#dateNumberToMs}
|
356
|
+
* @see {@link DateTime#timeNumberToMs}
|
357
|
+
*/
|
358
|
+
DateTime.fromDateNumber = function(dateNumber) {
|
359
|
+
var datePart = DateTime.dateNumberToMs(dateNumber);
|
360
|
+
if(datePart === datePart) {
|
361
|
+
var timePart = DateTime.timeNumberToMs(dateNumber);
|
362
|
+
return new Date(datePart + timePart);
|
363
|
+
}
|
364
|
+
return new Date(NaN);
|
365
|
+
};
|
366
|
+
/** Convert the date number (Excel date format) to milliseconds. WARNING: This discards any intraday time information (keep only date part).
|
367
|
+
* @public
|
368
|
+
* @function
|
369
|
+
* @param {number} dateNumber Date number since 1 Jan, 1900 (value is 1)
|
370
|
+
* @return {number} Returns NaN, if the given number is invalid. Otherwise, returns positive number in milliseconds
|
371
|
+
* @see {@link DateTime#timeNumberToMs}
|
372
|
+
* @see {@link DateTime#fromDateNumber}
|
373
|
+
*/
|
374
|
+
DateTime.dateNumberToMs = function(dateNumber) {
|
375
|
+
dateNumber = Math.floor(+dateNumber); // Remove the floating point to prevent calculation error
|
376
|
+
if(!dateNumber || dateNumber <= 0 || dateNumber === 60) { // Invalid input // 60 is 29 Feb 1900 that is not existing
|
377
|
+
return NaN;
|
378
|
+
}
|
379
|
+
|
380
|
+
var num = dateNumber - _DIFF_DAYS;
|
381
|
+
if(dateNumber < 60) {
|
382
|
+
num++; // +1 Before 1 Mar 1900 because there is not existing 29 Feb 1900 but existing in Window.
|
383
|
+
}
|
384
|
+
return num * MILLISECONDS_IN_DAY;
|
385
|
+
};
|
386
|
+
/** Convert the time number (Excel time format) with range between 0 and 1 to milliseconds. WARNING: This discards date and millisecond from the given number.
|
387
|
+
* @public
|
388
|
+
* @function
|
389
|
+
* @param {number} dateNumber Date number since 1 Jan, 1900 (value is 1)
|
390
|
+
* @return {number}
|
391
|
+
* @see {@link DateTime#dateNumberToMs}
|
392
|
+
* @see {@link DateTime#fromDateNumber}
|
393
|
+
*/
|
394
|
+
DateTime.timeNumberToMs = function(dateNumber) {
|
395
|
+
if(typeof dateNumber !== "number") {
|
396
|
+
dateNumber = (+dateNumber);
|
397
|
+
}
|
398
|
+
var timeNumber = dateNumber - Math.floor(dateNumber);
|
399
|
+
if(!timeNumber) { // NaN or 0
|
400
|
+
return 0;
|
401
|
+
}
|
402
|
+
if(timeNumber < 0) {
|
403
|
+
timeNumber = -timeNumber;
|
404
|
+
}
|
405
|
+
|
406
|
+
var secondFromMidnight = Math.round(timeNumber * SECONDS_IN_DAY);
|
407
|
+
return secondFromMidnight * 1000;
|
408
|
+
};
|
409
|
+
|
410
|
+
/** Convert string or number to date object
|
411
|
+
* @public
|
412
|
+
* @param {string|number} dateInput
|
413
|
+
* @return {Object}
|
414
|
+
*/
|
415
|
+
DateTime.toDateObject = function(dateInput) {
|
416
|
+
var date = null;
|
417
|
+
if(dateInput instanceof Date) {
|
418
|
+
date = dateInput;
|
419
|
+
} else if(typeof dateInput === "number") {
|
420
|
+
if(dateInput > 3e9 || dateInput <= 0) { // 3e9 milliseconds is Thu Feb 05 1970 00:20:00
|
421
|
+
date = new Date(dateInput); // convert milisecond
|
422
|
+
} else if(dateInput > 1e5) { // 1e5 days is Tue Oct 17 2243
|
423
|
+
// The given number is assumed to be second
|
424
|
+
date = new Date(dateInput * 1000);
|
425
|
+
} else {
|
426
|
+
// The given number is assumed to be in Excel format (i.e. integer represents date and fraction represents time)
|
427
|
+
// Excel stores dates as the number of days since January 0, 1900.
|
428
|
+
// This number is a product of other formulas (e.g. TODAY(), NOW()), which are all local time.
|
429
|
+
date = DateTime.fromDateNumber(dateInput);
|
430
|
+
}
|
431
|
+
} else if(!dateInput) {
|
432
|
+
date = new Date(NaN);
|
433
|
+
} else {
|
434
|
+
// Pass the value with string format, expected to be ISO8601 format (YYYY-MM-DDTHH:mm:ss)
|
435
|
+
var dtTxt = dateInput + "";
|
436
|
+
var isISO8601 = dtTxt.match(/^\d{4}(-\d{2}(-\d{2}(T\d{2}\:\d{2}\:\d{2})?)?)?$/);
|
437
|
+
dtTxt = dtTxt.replace(/\-/g, "\/"); // Convert to YYYY/MM/DD HH:mm:ss (common for all browsers)
|
438
|
+
if(isISO8601) {
|
439
|
+
dtTxt = dtTxt.replace(/T/g, " "); // Convert to YYYY/MM/DD HH:mm:ss (common for all browsers)
|
440
|
+
}
|
441
|
+
|
442
|
+
date = new Date(dtTxt);
|
443
|
+
}
|
444
|
+
|
445
|
+
return date;
|
446
|
+
};
|
447
|
+
|
448
|
+
/** Convert the JavaScript date object to the date number since 1 Jan, 1900 (value is 1). WARNING: This discards any intraday time information (keep only date part).
|
449
|
+
* @public
|
450
|
+
* @param {Date} dateObj JavaScript date object
|
451
|
+
* @return {number}
|
452
|
+
*/
|
453
|
+
DateTime.toDateNumber = function(dateObj) {
|
454
|
+
return DateTime._millisecondToDateNumber(Date.UTC(
|
455
|
+
dateObj.getFullYear(),
|
456
|
+
dateObj.getMonth(),
|
457
|
+
dateObj.getDate()
|
458
|
+
));
|
459
|
+
};
|
460
|
+
/** Convert the JavaScript date object to the time number in a range between 0 and 1. WARNING: This discards date and millisecond from the given date object.
|
461
|
+
* @public
|
462
|
+
* @param {Date} dateObj JavaScript date object
|
463
|
+
* @return {number}
|
464
|
+
*/
|
465
|
+
DateTime.toTimeNumber = function(dateObj) {
|
466
|
+
return Date.UTC(
|
467
|
+
1970, 0, 1,
|
468
|
+
dateObj.getUTCHours(),
|
469
|
+
dateObj.getUTCMinutes(),
|
470
|
+
dateObj.getUTCSeconds()
|
471
|
+
) / MILLISECONDS_IN_DAY;
|
472
|
+
};
|
473
|
+
/** Convert the time in millisecond of JavaScript date object to date number since 1 Jan, 1900 (value is 1).
|
474
|
+
* @private
|
475
|
+
* @function
|
476
|
+
* @param {number} millisecond Milliseconds of JavaScript date object (UTC)
|
477
|
+
* @return {number} Date number
|
478
|
+
*/
|
479
|
+
DateTime._millisecondToDateNumber = function(millisecond) {
|
480
|
+
millisecond = +millisecond;
|
481
|
+
if(millisecond !== millisecond || millisecond < _1_JAN_1900) { // Invalid input
|
482
|
+
return NaN;
|
483
|
+
} else {
|
484
|
+
var calDate = (millisecond / MILLISECONDS_IN_DAY) + _DIFF_DAYS;
|
485
|
+
if(millisecond < _1_MAR_1900) {
|
486
|
+
calDate--; // -1 before 1 Mar 1900 because there is not existing 29 Feb 1900 but existing in Window.
|
487
|
+
}
|
488
|
+
return calDate;
|
489
|
+
}
|
490
|
+
};
|
491
|
+
|
492
|
+
/** Returns YYYY-MM-DD (UTC)
|
493
|
+
* @public
|
494
|
+
* @function
|
495
|
+
* @param {Date} dateObj
|
496
|
+
* @return {string}
|
497
|
+
*/
|
498
|
+
DateTime.toYYYYMMDD = function(dateObj) {
|
499
|
+
var str = dateObj ? dateObj.toJSON() : "";
|
500
|
+
if(str) {
|
501
|
+
return str.substr(0, 10);
|
502
|
+
}
|
503
|
+
return "";
|
504
|
+
};
|
505
|
+
|
506
|
+
|
507
|
+
export default DateTime;
|
508
|
+
export { DateTime, MILLISECONDS_IN_DAY, SECONDS_IN_DAY };
|
@@ -0,0 +1,14 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
declare class Deferred {
|
4
|
+
|
5
|
+
constructor(resolveHandler?: ((...params: any[]) => any), rejectHandler?: ((...params: any[]) => any), ctx?: any);
|
6
|
+
|
7
|
+
public resolve(result?: any): void;
|
8
|
+
|
9
|
+
public reject(result?: any): void;
|
10
|
+
|
11
|
+
}
|
12
|
+
|
13
|
+
export default Deferred;
|
14
|
+
export {Deferred};
|
@@ -0,0 +1,98 @@
|
|
1
|
+
/** Deferred promise should be used when asynchronous method does not return promise object (e.g. typical AJAX calls, or native setTimeout()). In other words, deferred promise is used to allow any non-promise logics to be worked in promise pattern.
|
2
|
+
* @constructor
|
3
|
+
* @param {Function=} resolveHandler
|
4
|
+
* @param {Function=} rejectHandler
|
5
|
+
* @param {*=} ctx Context object that will be provided as the second parameter of the given handlers
|
6
|
+
* @example
|
7
|
+
* var def = new Deferred(handler);
|
8
|
+
* setTimeout(def.resolve, 2000);
|
9
|
+
* var def2 = new Deferred();
|
10
|
+
* setTimeout(function() {
|
11
|
+
* def2.resolve();
|
12
|
+
* }, 4000);
|
13
|
+
*/
|
14
|
+
var Deferred = function(resolveHandler, rejectHandler, ctx) {
|
15
|
+
this.resolve = this.resolve.bind(this);
|
16
|
+
this.reject = this.reject.bind(this);
|
17
|
+
|
18
|
+
if(typeof resolveHandler === "function") {
|
19
|
+
this._resolveHandler = resolveHandler;
|
20
|
+
}
|
21
|
+
if(typeof rejectHandler === "function") {
|
22
|
+
this._rejectHandler = rejectHandler;
|
23
|
+
}
|
24
|
+
if(ctx != null) {
|
25
|
+
this._ctx = ctx;
|
26
|
+
}
|
27
|
+
this.promise = new Promise((function(resolve, reject) {
|
28
|
+
this._resolve = resolve;
|
29
|
+
this._reject = reject;
|
30
|
+
}).bind(this));
|
31
|
+
};
|
32
|
+
/** @type {Promise<*>}
|
33
|
+
* @public
|
34
|
+
*/
|
35
|
+
Deferred.prototype.promise = null;
|
36
|
+
/** @type {Function}
|
37
|
+
* @private
|
38
|
+
*/
|
39
|
+
Deferred.prototype._resolve = null; // Always supplied from Promise object
|
40
|
+
/** @type {Function}
|
41
|
+
* @private
|
42
|
+
*/
|
43
|
+
Deferred.prototype._reject = null; // Always supplied from Promise object
|
44
|
+
/** @type {Function}
|
45
|
+
* @private
|
46
|
+
*/
|
47
|
+
Deferred.prototype._resolveHandler = null;
|
48
|
+
/** @type {Function}
|
49
|
+
* @private
|
50
|
+
*/
|
51
|
+
Deferred.prototype._rejectHandler = null;
|
52
|
+
/** Context object that will be provided as the second parameter of the given handlers
|
53
|
+
* @type {*}
|
54
|
+
* @private
|
55
|
+
*/
|
56
|
+
Deferred.prototype._ctx = null;
|
57
|
+
|
58
|
+
|
59
|
+
/** @public
|
60
|
+
* @param {*=} result
|
61
|
+
*/
|
62
|
+
Deferred.prototype.resolve = function(result) {
|
63
|
+
if(this._resolve) { // Promise can be resolved only once
|
64
|
+
if(this._resolveHandler) {
|
65
|
+
var handlerRes = this._resolveHandler(result, this._ctx || this);
|
66
|
+
if(handlerRes != null) {
|
67
|
+
result = handlerRes;
|
68
|
+
}
|
69
|
+
}
|
70
|
+
this._resolve(result); // WARNING: Synchronous call. The standard promise behavior requires asynchronous response.
|
71
|
+
this._finally();
|
72
|
+
}
|
73
|
+
};
|
74
|
+
/** @public
|
75
|
+
* @param {*=} result
|
76
|
+
*/
|
77
|
+
Deferred.prototype.reject = function(result) {
|
78
|
+
if(this._reject) { // Promise can be resolved only once
|
79
|
+
if(this._rejectHandler) {
|
80
|
+
var handlerRes = this._rejectHandler(result, this._ctx || this);
|
81
|
+
if(handlerRes != null) {
|
82
|
+
result = handlerRes;
|
83
|
+
}
|
84
|
+
}
|
85
|
+
this._reject(result); // WARNING: Synchronous call
|
86
|
+
this._finally();
|
87
|
+
}
|
88
|
+
};
|
89
|
+
|
90
|
+
/** @private */
|
91
|
+
Deferred.prototype._finally = function() {
|
92
|
+
// Release all references to avoid memory leak
|
93
|
+
this._ctx = this._resolveHandler = this._rejectHandler = null;
|
94
|
+
this._resolve = this._reject = null;
|
95
|
+
};
|
96
|
+
|
97
|
+
export default Deferred;
|
98
|
+
export {Deferred};
|
@@ -0,0 +1,20 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
declare class Delay {
|
4
|
+
|
5
|
+
constructor(ms?: number, ctx?: any);
|
6
|
+
|
7
|
+
public static readonly promise: Promise<any>;
|
8
|
+
|
9
|
+
public static for(ms?: number, ctx?: any): Delay;
|
10
|
+
|
11
|
+
public resolve(): void;
|
12
|
+
|
13
|
+
public reject(): void;
|
14
|
+
|
15
|
+
public isTimeout(): boolean;
|
16
|
+
|
17
|
+
}
|
18
|
+
|
19
|
+
export default Delay;
|
20
|
+
export {Delay};
|