@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,827 @@
|
|
1
|
+
import DataSet from "./DataSet.js";
|
2
|
+
|
3
|
+
/** @private
|
4
|
+
* @param {Object} fInfo
|
5
|
+
* @param {number=} seed
|
6
|
+
* @return {number}
|
7
|
+
*/
|
8
|
+
var _generateId = function(fInfo, seed) {
|
9
|
+
if(seed == null) {
|
10
|
+
seed = fInfo._id != null ? fInfo._id : -1;
|
11
|
+
fInfo._id = ++seed;
|
12
|
+
}
|
13
|
+
return seed || 0;
|
14
|
+
};
|
15
|
+
/** @private
|
16
|
+
* @param {Object} fInfo
|
17
|
+
* @param {number=} seed
|
18
|
+
* @return {Date}
|
19
|
+
*/
|
20
|
+
var _generateDate1 = function(fInfo, seed) {
|
21
|
+
if(seed == null) {
|
22
|
+
return randDate(6e11, 16e11, seed);
|
23
|
+
}
|
24
|
+
return new Date(1e12 + 1e9 * seed);
|
25
|
+
};
|
26
|
+
|
27
|
+
var POW10 = [1, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10];
|
28
|
+
|
29
|
+
/** to format data including type, suffix, prefix, min, max, prec, fixedValue, changeOnly, members, isoDate.
|
30
|
+
* @type {Object}
|
31
|
+
* @private
|
32
|
+
*/
|
33
|
+
var _fieldInfo = {
|
34
|
+
"X_RIC_NAME": {type: "string"},
|
35
|
+
"CF_NAME": {type: "string", prefix: true, suffix: " Name"},
|
36
|
+
"CF_LAST": {type: "number", min: 0.01, max: 1000, prec: 2},
|
37
|
+
"PCTCHNG": {type: "number", min: -1, max: 1, prec: 2, suffix: "%"},
|
38
|
+
"PCTCHNG2": {type: "float", min: -20, max: 20, prec: 2, suffix: "%"},
|
39
|
+
"CF_CURR": {fixedValue: "USD"},
|
40
|
+
"INDICATOR": {type: "number", min: 0, max: 5},
|
41
|
+
"CF_TICK": {type: "number", min: 1, max: 3, changeOnly: true},
|
42
|
+
"PRCTCK_1": {type: "set", members: ["\u21e7", "B\u21e7", "\u2191", "B\u2191", "26", "1", "\"1\"", "-1", "\u21e9", "B\u21e9", "\u2193", "B\u2193", "27", "2", "\"2\""] },
|
43
|
+
"CF_NETCHNG": {type: "number", min: -100, max: 100},
|
44
|
+
"CF_VOLUME": {type: "number", min: 0, max: 1e7},
|
45
|
+
"RI_FLAG": {type: "set", members: ["R", "Q", "I", "_", ""]},
|
46
|
+
"RI_CODE": {type: "number", min: 0, max: 2},
|
47
|
+
"STATUS": {type: "number", min: 0, max: 6},
|
48
|
+
"YRLOW": {type: "number", min: 0, max: 20},
|
49
|
+
"YRHIGH": {type: "number", min: 200, max: 2000},
|
50
|
+
"CFLOW": {type: "number", min: 0, max: 20},
|
51
|
+
"CFHIGH": {type: "number", min: 200, max: 2000},
|
52
|
+
"LOW_YLD": {type: "set", members: [undefined, 0, 1, 2, 3, 4, 5, 10, 11, 15, 20]}, // eslint-disable-line
|
53
|
+
"HIGH_YLD": {type: "set", members: [undefined, 200, 300, 400, 500, 1000, 1500, 2000]}, // eslint-disable-line
|
54
|
+
"CF_YIELD": {type: "set", members: [undefined, 0, 10, 20, 30, 40, 50, 100, 200, 300, 400, 500]}, // eslint-disable-line
|
55
|
+
"TR.IPODate": {type: "isoDate", min: Date.now() - 63072000000 /* 2 years back from now */, max: Date.now()},
|
56
|
+
"TR.Volume": {type: "number", min: 2000, max: 1e7},
|
57
|
+
"TR.Price52WeekHigh": {type: "number", min: 100, max: 300, prec: 2},
|
58
|
+
"TR.Price52WeekLow": { type: "number", min: 1, max: 200, prec: 2 },
|
59
|
+
// eslint-disable-next-line
|
60
|
+
"TR.InvalidField": { type: "set", members: [undefined] },
|
61
|
+
"percent": {type: "number", min: 0, max: 101 },
|
62
|
+
"number_1": {type: "number", min: 1, max: 100 },
|
63
|
+
"number_2": {type: "number", min: -100, max: 100 },
|
64
|
+
"index4": {type: "number", min: 0, max: 4 },
|
65
|
+
"index5": {type: "number", min: 0, max: 5 },
|
66
|
+
"index10": {type: "number", min: 0, max: 10 },
|
67
|
+
"index100": {type: "number", min: 0, max: 100 },
|
68
|
+
"group3": {type: "set", members: ["Group_A", "Group_B", "Group_C"]},
|
69
|
+
"group4": {type: "set", members: ["Group_1", "Group_2", "Group_3", "Group_4"]},
|
70
|
+
"float_1": {type: "float", min: 0, max: 1, prec: 2 },
|
71
|
+
"float_2": {type: "float", min: 0, max: 100, prec: 2 },
|
72
|
+
"float_3": {type: "float", min: -1, max: 1, prec: 2 },
|
73
|
+
"precision4": {type: "float", min: -10, max: 10, prec: 4 },
|
74
|
+
"precision8": {type: "float", min: -100, max: 100, prec: 8 },
|
75
|
+
"boolean": {type: "boolean"},
|
76
|
+
"date": {type: "date", min: 15e11, max: 16e11 },
|
77
|
+
"date1": {type: "function", generate: _generateDate1 },
|
78
|
+
"ISODate": {type: "isoDateObject", min: Date.now() - 63072000000 /* 2 years back from now */, max: Date.now()},
|
79
|
+
"word": {type: "string", min: 1, max: 1},
|
80
|
+
"phrase": {type: "string", min: 2, max: 5},
|
81
|
+
"words": {type: "string", min: 1, max: 20},
|
82
|
+
"words1": {type: "string", min: 2, max: 8},
|
83
|
+
"words2": {type: "string", min: 3, max: 10},
|
84
|
+
"words3": {type: "string", min: 5, max: 15},
|
85
|
+
"sentence": {type: "string", min: 8, max: 20},
|
86
|
+
"id": {type: "function", generate: _generateId},
|
87
|
+
"companyName": {type: "set", members: DataSet.companyName },
|
88
|
+
"industry": {type: "set", members: DataSet.industry },
|
89
|
+
"market": {type: "set", members: DataSet.market },
|
90
|
+
"country": {type: "set", members: DataSet.country }
|
91
|
+
};
|
92
|
+
|
93
|
+
/** @public
|
94
|
+
* @param {string} field
|
95
|
+
* @return {!Object}
|
96
|
+
*/
|
97
|
+
var getFieldInfo = function(field) {
|
98
|
+
return _fieldInfo[field] || {};
|
99
|
+
};
|
100
|
+
|
101
|
+
/** @public
|
102
|
+
* @param {string} field
|
103
|
+
* @param {Object|Function} options
|
104
|
+
*/
|
105
|
+
var addFieldInfo = function(field, options) {
|
106
|
+
var opt = options;
|
107
|
+
if(typeof options === "function") {
|
108
|
+
opt = {
|
109
|
+
type: "function",
|
110
|
+
generate: options
|
111
|
+
};
|
112
|
+
}
|
113
|
+
_fieldInfo[field] = opt;
|
114
|
+
};
|
115
|
+
|
116
|
+
/** Return pseudo random number in the range of 0 to 1 (exclusive of 1)
|
117
|
+
* @public
|
118
|
+
* @param {number} seed
|
119
|
+
* @return {number}
|
120
|
+
*/
|
121
|
+
var pseudoRandNumber = function(seed) {
|
122
|
+
var rand = Math.sin(seed * 113) * 10000;
|
123
|
+
rand *= rand;
|
124
|
+
return rand - (rand | 0);
|
125
|
+
};
|
126
|
+
|
127
|
+
/** @private
|
128
|
+
* @param {*=} seed
|
129
|
+
* @return {number}
|
130
|
+
*/
|
131
|
+
var _getRandomNumber = function(seed) {
|
132
|
+
return (typeof seed === "number") ? pseudoRandNumber(seed) : Math.random();
|
133
|
+
};
|
134
|
+
|
135
|
+
/** Return a floating-point random number in the range min - max (inclusive of min, but not max) with prec digits of precision.
|
136
|
+
* @public
|
137
|
+
* @param {number=} min=0
|
138
|
+
* @param {number=} max=100 Exclusive value
|
139
|
+
* @param {(number|null)=} prec
|
140
|
+
* @param {number=} seed
|
141
|
+
* @return {number}
|
142
|
+
*/
|
143
|
+
var randNumber = function(min, max, prec, seed) {
|
144
|
+
if(!min) { min = 0; }
|
145
|
+
if(max == null) { max = 100; }
|
146
|
+
var v = (max - min) * _getRandomNumber(seed) + min;
|
147
|
+
|
148
|
+
if(prec > 0) {
|
149
|
+
var pow = POW10[prec];
|
150
|
+
return Math.floor(v * pow) / pow;
|
151
|
+
} else if(prec != null) {
|
152
|
+
return Math.floor(v);
|
153
|
+
} else {
|
154
|
+
return v;
|
155
|
+
}
|
156
|
+
};
|
157
|
+
|
158
|
+
/** Return an interger random number in the range min - max (inclusive of min and max).
|
159
|
+
* @public
|
160
|
+
* @param {number} min
|
161
|
+
* @param {number} max Inclusive value
|
162
|
+
* @param {number=} seed
|
163
|
+
* @return {number}
|
164
|
+
*/
|
165
|
+
var randInt = function(min, max, seed) {
|
166
|
+
return randNumber(min, max + 1, 0, seed);
|
167
|
+
};
|
168
|
+
|
169
|
+
/** Return a integer random number in the range min - max (inclusive of min, but not max).
|
170
|
+
* @public
|
171
|
+
* @param {number=} min
|
172
|
+
* @param {number=} max Exclusive value
|
173
|
+
* @param {number=} seed
|
174
|
+
* @return {number}
|
175
|
+
*/
|
176
|
+
var randBetween = function(min, max, seed) {
|
177
|
+
return randNumber(min, max, 0, seed);
|
178
|
+
};
|
179
|
+
|
180
|
+
/** Return a integer random number in the range 0 - max (exclusive of max). It is usefull in some cases for example, <br>
|
181
|
+
* if you want to get a random member of an array, <br>
|
182
|
+
* just get a random index via randIndex(ary.length).
|
183
|
+
* @public
|
184
|
+
* @param {number} max Exclusive value
|
185
|
+
* @param {number=} seed
|
186
|
+
* @return {number}
|
187
|
+
*/
|
188
|
+
var randIndex = function(max, seed) {
|
189
|
+
return randBetween(0, max, seed);
|
190
|
+
};
|
191
|
+
|
192
|
+
/** @public
|
193
|
+
* @param {number=} seed
|
194
|
+
* @return {boolean}
|
195
|
+
*/
|
196
|
+
var randBoolean = function(seed) {
|
197
|
+
return randInt(0, 1, seed) === 0;
|
198
|
+
};
|
199
|
+
|
200
|
+
/** Return a random member of set or single character in the range of A to Z
|
201
|
+
* @public
|
202
|
+
* @param {Array} set
|
203
|
+
* @param {number=} seed
|
204
|
+
* @return {*}
|
205
|
+
*/
|
206
|
+
var randMember = function(set, seed) {
|
207
|
+
if(set) {
|
208
|
+
var index = randIndex(set.length, seed);
|
209
|
+
return set[index];
|
210
|
+
}
|
211
|
+
return String.fromCharCode(randInt(65, 90, seed));
|
212
|
+
};
|
213
|
+
|
214
|
+
/** @public
|
215
|
+
* @param {(number|Object)=} min minimum timestamp or date object
|
216
|
+
* @param {(number|Object)=} max minimum timestamp or date object
|
217
|
+
* @param {number=} seed
|
218
|
+
* @return {Date}
|
219
|
+
*/
|
220
|
+
var randDate = function(min, max, seed) {
|
221
|
+
min = min || (Date.now() - 63072000000); //2 years back from now
|
222
|
+
if(min instanceof Date) {
|
223
|
+
min = min.getTime();
|
224
|
+
}
|
225
|
+
|
226
|
+
max = max || Date.now();
|
227
|
+
if(max instanceof Date) {
|
228
|
+
max = max.getTime();
|
229
|
+
}
|
230
|
+
|
231
|
+
var ts = randInt(0, (max - min) / 1000, seed);
|
232
|
+
return new Date(min + (ts * 1000));
|
233
|
+
};
|
234
|
+
|
235
|
+
/** @public
|
236
|
+
* @param {number=} min
|
237
|
+
* @param {number=} max Exclusive value
|
238
|
+
* @param {number=} seed
|
239
|
+
* @return {string}
|
240
|
+
*/
|
241
|
+
var randString = function(min, max, seed) {
|
242
|
+
var wordCount = (min < max) ? randBetween(min, max, seed) : min;
|
243
|
+
|
244
|
+
var ary = new Array(wordCount);
|
245
|
+
for(var i = 0; i < wordCount; ++i) {
|
246
|
+
if(seed != null) {
|
247
|
+
seed *= 1.17 * (i + 1);
|
248
|
+
}
|
249
|
+
var idx = randIndex(DataSet.words.length, seed);
|
250
|
+
ary[i] = DataSet.words[idx];
|
251
|
+
}
|
252
|
+
return ary.join(" ");
|
253
|
+
};
|
254
|
+
|
255
|
+
|
256
|
+
/** Convert 2D Array to Array of records
|
257
|
+
* @public
|
258
|
+
* @param {Array.<Array>} data2D Array of values
|
259
|
+
* @param {Array.<string>=} fields Keys to be mapped on the output records.
|
260
|
+
* @return {Array.<Object>} records
|
261
|
+
*/
|
262
|
+
var toRecords = function(data2D, fields) {
|
263
|
+
if(!Array.isArray(data2D)) {
|
264
|
+
return null;
|
265
|
+
}
|
266
|
+
if(!Array.isArray(fields)) {
|
267
|
+
if(fields) {
|
268
|
+
fields = [fields + ""];
|
269
|
+
} else {
|
270
|
+
fields = [];
|
271
|
+
}
|
272
|
+
}
|
273
|
+
var len = data2D.length;
|
274
|
+
var records = new Array(len);
|
275
|
+
for(var i = 0; i < len; ++i) {
|
276
|
+
var record = records[i] = {};
|
277
|
+
var columns = data2D[i];
|
278
|
+
var jLen = columns ? (columns.length || 0) : 0;
|
279
|
+
for(var j = 0; j < jLen; ++j) {
|
280
|
+
var value = columns[j];
|
281
|
+
if(value !== undefined) { // eslint-disable-line
|
282
|
+
var key = fields[j];
|
283
|
+
if(!key && key !== 0) {
|
284
|
+
key = j + "";
|
285
|
+
}
|
286
|
+
record[key] = value;
|
287
|
+
}
|
288
|
+
}
|
289
|
+
}
|
290
|
+
return records;
|
291
|
+
};
|
292
|
+
|
293
|
+
/** @public
|
294
|
+
* @return {number}
|
295
|
+
*/
|
296
|
+
var getSeed = function() {
|
297
|
+
return DataGenerator.seed;
|
298
|
+
};
|
299
|
+
|
300
|
+
/** @public
|
301
|
+
* @param {string|Array.<string>} fields
|
302
|
+
* @param {Object=} options
|
303
|
+
* @return {!Array.<Array>} 2D Array of data
|
304
|
+
*/
|
305
|
+
var generate = function(fields, options) {
|
306
|
+
var result = _generate2DArray(fields, options, DataGenerator.seed);
|
307
|
+
DataGenerator.seed = result.seed;
|
308
|
+
|
309
|
+
return result.data;
|
310
|
+
};
|
311
|
+
|
312
|
+
/** WARNING: This method does not modify global seed
|
313
|
+
* @public
|
314
|
+
* @param {string|Array.<string>} fields
|
315
|
+
* @param {(number|Object)=} options Configuration object or seed number
|
316
|
+
* @param {number=} seed
|
317
|
+
* @return {!Object} Object with the given fields as its keys
|
318
|
+
*/
|
319
|
+
var generateRecord = function(fields, options, seed) {
|
320
|
+
if(!Array.isArray(fields)) {
|
321
|
+
fields = [fields + ""];
|
322
|
+
}
|
323
|
+
var config = {};
|
324
|
+
if(options != null) {
|
325
|
+
if(typeof options === "number") {
|
326
|
+
seed = options;
|
327
|
+
} else if(options) {
|
328
|
+
config = options;
|
329
|
+
}
|
330
|
+
}
|
331
|
+
|
332
|
+
var fieldCount = fields.length;
|
333
|
+
var record = {};
|
334
|
+
for(var i = 0; i < fieldCount; ++i) {
|
335
|
+
var field = fields[i];
|
336
|
+
record[field] = _generateFieldData(field, config, seed).value;
|
337
|
+
}
|
338
|
+
return record;
|
339
|
+
};
|
340
|
+
|
341
|
+
/** @public
|
342
|
+
* @param {string|Array.<string>} fields
|
343
|
+
* @param {(number|Object)=} options Configuration object or number of rows
|
344
|
+
* @return {!Array.<Object>} Array of object with the given fields as its keys
|
345
|
+
*/
|
346
|
+
var generateRecords = function(fields, options) {
|
347
|
+
var result = _generate2DArray(fields, options, DataGenerator.seed);
|
348
|
+
DataGenerator.seed = result.seed;
|
349
|
+
fields = result.fields;
|
350
|
+
var fieldCount = fields.length;
|
351
|
+
var records = result.data;
|
352
|
+
for(var i = records.length; --i >= 0;) {
|
353
|
+
var ary = records[i];
|
354
|
+
var record = {};
|
355
|
+
for(var j = 0; j < fieldCount; ++j) {
|
356
|
+
var field = fields[j];
|
357
|
+
record[field] = ary[j];
|
358
|
+
}
|
359
|
+
records[i] = record;
|
360
|
+
}
|
361
|
+
return records;
|
362
|
+
};
|
363
|
+
|
364
|
+
/** WARNING: This method does not modify global seed
|
365
|
+
* @public
|
366
|
+
* @param {string} field
|
367
|
+
* @param {Object=} options
|
368
|
+
* @param {number=} seed
|
369
|
+
* @return {!Object} Object with value, formattedValue and other properties
|
370
|
+
*/
|
371
|
+
var generateQuoteData = function(field, options, seed) {
|
372
|
+
var fInfo = _generateFieldData(field, options, seed);
|
373
|
+
|
374
|
+
//formatting
|
375
|
+
var fmtValue = fInfo.value + "";
|
376
|
+
if(fInfo.prefix){
|
377
|
+
if(typeof fInfo.prefix == "string") {
|
378
|
+
fmtValue = fInfo.prefix + fmtValue;
|
379
|
+
} else if(options.prefix) {
|
380
|
+
fmtValue = options.prefix + " " + fmtValue;
|
381
|
+
}
|
382
|
+
}
|
383
|
+
if(fInfo.suffix){
|
384
|
+
fmtValue = fmtValue + fInfo.suffix;
|
385
|
+
}
|
386
|
+
|
387
|
+
if(fInfo.type === "string") {
|
388
|
+
fInfo.value = fmtValue; // Make sure that original value has correct data type
|
389
|
+
}
|
390
|
+
fInfo.formattedValue = fmtValue;
|
391
|
+
return fInfo;
|
392
|
+
};
|
393
|
+
|
394
|
+
/** @private
|
395
|
+
* @param {string|Array.<string>} fields
|
396
|
+
* @param {(number|Object)=} options Configuration object or number of rows
|
397
|
+
* @param {number=} seed Default seed for randomization
|
398
|
+
* @return {!Object}
|
399
|
+
*/
|
400
|
+
var _generate2DArray = function(fields, options, seed) {
|
401
|
+
var config = {};
|
402
|
+
var numRows = 0;
|
403
|
+
if(options) {
|
404
|
+
if(typeof options === "number") {
|
405
|
+
numRows = config.numRows = options;
|
406
|
+
} else {
|
407
|
+
config = options;
|
408
|
+
numRows = options.numRows || options.numRow || options.rowCount;
|
409
|
+
if(options.seed != null) {
|
410
|
+
seed = options.seed; // Seed from option object overwrite the default seed
|
411
|
+
if(seed === -1) {
|
412
|
+
seed = null; // Negative one is a special value for reseting seed
|
413
|
+
}
|
414
|
+
}
|
415
|
+
}
|
416
|
+
} // else case is "", false, 0, null, undefined
|
417
|
+
if(!numRows) {
|
418
|
+
numRows = 1;
|
419
|
+
}
|
420
|
+
|
421
|
+
if(!fields) {
|
422
|
+
fields = [""]; // Default field
|
423
|
+
} else if(!Array.isArray(fields)) {
|
424
|
+
fields = [fields + ""];
|
425
|
+
}
|
426
|
+
var fieldCount = fields.length;
|
427
|
+
|
428
|
+
var dataRows = [];
|
429
|
+
for(var i = 0; i < numRows; ++i) {
|
430
|
+
var row = [];
|
431
|
+
// Same field in a single record must be produced to the same value
|
432
|
+
for(var j = 0; j < fieldCount; ++j) {
|
433
|
+
var field = fields[j];
|
434
|
+
row.push(_generateFieldData(field, options, seed).value);
|
435
|
+
}
|
436
|
+
if(seed != null) {
|
437
|
+
++seed;
|
438
|
+
}
|
439
|
+
dataRows.push(row);
|
440
|
+
}
|
441
|
+
|
442
|
+
return {
|
443
|
+
data: dataRows, // Array.<Array>
|
444
|
+
seed: seed, // nullable
|
445
|
+
fields: fields
|
446
|
+
};
|
447
|
+
};
|
448
|
+
/** Simple hash
|
449
|
+
* @private
|
450
|
+
* @param {string} str
|
451
|
+
* @return {number}
|
452
|
+
*/
|
453
|
+
var _hash = function(str) {
|
454
|
+
var sum = 0;
|
455
|
+
for(var i = str.length; --i >= 0;) {
|
456
|
+
sum += str.charCodeAt(i) * (i + 0.9);
|
457
|
+
}
|
458
|
+
return sum;
|
459
|
+
};
|
460
|
+
/** @private
|
461
|
+
* @param {string} field
|
462
|
+
* @param {Object=} options
|
463
|
+
* @param {number=} seed
|
464
|
+
* @return {!Object} Object with value and other properties
|
465
|
+
*/
|
466
|
+
var _generateFieldData = function(field, options, seed) {
|
467
|
+
var fInfo = getFieldInfo(field);
|
468
|
+
var min = fInfo.min != null ? fInfo.min : 100; // WARNING: Default values are non-standard values
|
469
|
+
var max = fInfo.max != null ? fInfo.max : 10000;
|
470
|
+
var prec = fInfo.prec != null ? fInfo.prec : 0;
|
471
|
+
var value;
|
472
|
+
|
473
|
+
if(fInfo.fixedValue){
|
474
|
+
value = fInfo.fixedValue;
|
475
|
+
} else if(!fInfo.type) { // Unknown type
|
476
|
+
if(seed != null) {
|
477
|
+
if(field) {
|
478
|
+
if(!fInfo.hash) {
|
479
|
+
fInfo.hash = _hash(field);
|
480
|
+
addFieldInfo(field, fInfo); // WARNING: modify global state
|
481
|
+
}
|
482
|
+
seed += fInfo.hash;
|
483
|
+
}
|
484
|
+
}
|
485
|
+
value = randNumber(min, max, prec, seed);
|
486
|
+
} else if(fInfo.type === "string") {
|
487
|
+
if(fInfo.min != null || fInfo.max != null) {
|
488
|
+
if(seed != null) {
|
489
|
+
if(!fInfo.hash) {
|
490
|
+
fInfo.hash = _hash(field);
|
491
|
+
}
|
492
|
+
seed += fInfo.hash;
|
493
|
+
}
|
494
|
+
value = randString(min, max, seed);
|
495
|
+
} else {
|
496
|
+
value = options.text || "";
|
497
|
+
}
|
498
|
+
} else if(fInfo.type === "set") {
|
499
|
+
value = randMember(fInfo.members, seed);
|
500
|
+
} else if(fInfo.type === "date") {
|
501
|
+
value = randDate(min, max, seed);
|
502
|
+
} else if(fInfo.type === "isoDate") {
|
503
|
+
var date = randDate(min, max, seed);
|
504
|
+
value = date.toISOString().slice(0, 10);
|
505
|
+
} else if(fInfo.type === "isoDateObject") {
|
506
|
+
value = randDate(min, max, seed);
|
507
|
+
value = new Date(value.toISOString().slice(0, 10));
|
508
|
+
} else if(fInfo.type === "boolean") {
|
509
|
+
value = randBoolean(seed);
|
510
|
+
} else if(fInfo.type === "function") {
|
511
|
+
fInfo.field = field;
|
512
|
+
value = fInfo.generate(fInfo, seed);
|
513
|
+
} else { // Default is number
|
514
|
+
value = randNumber(min, max, prec, seed);
|
515
|
+
}
|
516
|
+
fInfo.value = value;
|
517
|
+
return fInfo;
|
518
|
+
};
|
519
|
+
|
520
|
+
|
521
|
+
/** @constructor
|
522
|
+
* @param {number=} seed
|
523
|
+
*/
|
524
|
+
var DataGenerator = function(seed) {
|
525
|
+
this._seed = seed != null ? seed : null;
|
526
|
+
};
|
527
|
+
|
528
|
+
/** @type {number=}
|
529
|
+
* @private
|
530
|
+
*/
|
531
|
+
DataGenerator.prototype._seed = null;
|
532
|
+
|
533
|
+
/** @public
|
534
|
+
* @param {string|Array.<string>} fields
|
535
|
+
* @param {(number|Object)=} options
|
536
|
+
* @return {!Array.<Array>} 2D Array of data
|
537
|
+
*/
|
538
|
+
DataGenerator.prototype.generate = function(fields, options) {
|
539
|
+
var result = _generate2DArray(fields, options, this._seed);
|
540
|
+
this._seed = result.seed;
|
541
|
+
|
542
|
+
return result.data;
|
543
|
+
};
|
544
|
+
|
545
|
+
/** @public
|
546
|
+
* @param {string|Array.<string>} fields
|
547
|
+
* @param {(number|Object)=} options
|
548
|
+
* @return {!Array.<Object>} Array of data object
|
549
|
+
*/
|
550
|
+
DataGenerator.prototype.generateRecords = function(fields, options) {
|
551
|
+
var result = _generate2DArray(fields, options, this._seed);
|
552
|
+
this._seed = result.seed;
|
553
|
+
fields = result.fields;
|
554
|
+
var fieldCount = fields.length;
|
555
|
+
var records = result.data;
|
556
|
+
for(var i = records.length; --i >= 0;) {
|
557
|
+
var ary = records[i];
|
558
|
+
var record = {};
|
559
|
+
for(var j = 0; j < fieldCount; ++j) {
|
560
|
+
var field = fields[j];
|
561
|
+
record[field] = ary[j];
|
562
|
+
}
|
563
|
+
records[i] = record;
|
564
|
+
}
|
565
|
+
return records;
|
566
|
+
};
|
567
|
+
|
568
|
+
/** @public
|
569
|
+
* @param {string} field
|
570
|
+
* @param {Object=} options
|
571
|
+
* @return {!Object} Object with value, formattedValue and other properties
|
572
|
+
*/
|
573
|
+
DataGenerator.prototype.generateQuoteData = function(field, options) {
|
574
|
+
var fInfo = generateQuoteData(field, options, this._seed);
|
575
|
+
if(this._seed != null) {
|
576
|
+
++this._seed;
|
577
|
+
}
|
578
|
+
|
579
|
+
return fInfo;
|
580
|
+
};
|
581
|
+
/** @public
|
582
|
+
* @return {?number}
|
583
|
+
*/
|
584
|
+
DataGenerator.prototype.getSeed = function() {
|
585
|
+
return this._seed;
|
586
|
+
};
|
587
|
+
|
588
|
+
/** @public
|
589
|
+
* @param {number} seed
|
590
|
+
*/
|
591
|
+
DataGenerator.prototype.setSeed = function(seed) {
|
592
|
+
if(typeof seed === "number") {
|
593
|
+
this._seed = seed;
|
594
|
+
}
|
595
|
+
};
|
596
|
+
|
597
|
+
/** @public
|
598
|
+
* @param {number=} min
|
599
|
+
* @param {number=} max Exclusive value
|
600
|
+
* @return {number}
|
601
|
+
*/
|
602
|
+
DataGenerator.prototype.randBetween = function(min, max) {
|
603
|
+
var result = randBetween(min, max, this._seed);
|
604
|
+
if(this._seed != null) {
|
605
|
+
++this._seed;
|
606
|
+
}
|
607
|
+
return result;
|
608
|
+
};
|
609
|
+
|
610
|
+
/** @public
|
611
|
+
* @param {number} min
|
612
|
+
* @param {number} max Inclusive value
|
613
|
+
* @return {number}
|
614
|
+
*/
|
615
|
+
DataGenerator.prototype.randInt = function(min, max) {
|
616
|
+
var result = randInt(min, max, this._seed);
|
617
|
+
if(this._seed != null) {
|
618
|
+
++this._seed;
|
619
|
+
}
|
620
|
+
return result;
|
621
|
+
};
|
622
|
+
|
623
|
+
/** @public
|
624
|
+
* @param {number} max Exclusive value
|
625
|
+
* @return {number}
|
626
|
+
*/
|
627
|
+
DataGenerator.prototype.randIndex = function(max) {
|
628
|
+
var result = randIndex(max, this._seed);
|
629
|
+
if(this._seed != null) {
|
630
|
+
++this._seed;
|
631
|
+
}
|
632
|
+
return result;
|
633
|
+
};
|
634
|
+
|
635
|
+
/** @public
|
636
|
+
* @param {number=} min=0
|
637
|
+
* @param {number=} max=100 Exclusive value
|
638
|
+
* @param {(number|null)=} prec
|
639
|
+
* @return {number}
|
640
|
+
*/
|
641
|
+
DataGenerator.prototype.randNumber = function(min, max, prec) {
|
642
|
+
var result = randNumber(min, max, prec, this._seed);
|
643
|
+
if(this._seed != null) {
|
644
|
+
++this._seed;
|
645
|
+
}
|
646
|
+
return result;
|
647
|
+
};
|
648
|
+
|
649
|
+
/** @public
|
650
|
+
* @return {boolean}
|
651
|
+
*/
|
652
|
+
DataGenerator.prototype.randBoolean = function() {
|
653
|
+
var result = randBoolean(this._seed);
|
654
|
+
if(this._seed != null) {
|
655
|
+
++this._seed;
|
656
|
+
}
|
657
|
+
return result;
|
658
|
+
};
|
659
|
+
|
660
|
+
/** @public
|
661
|
+
* @param {Array} set
|
662
|
+
* @return {*}
|
663
|
+
*/
|
664
|
+
DataGenerator.prototype.randMember = function(set) {
|
665
|
+
var result = randMember(set, this._seed);
|
666
|
+
if(this._seed != null) {
|
667
|
+
++this._seed;
|
668
|
+
}
|
669
|
+
return result;
|
670
|
+
};
|
671
|
+
|
672
|
+
/** @public
|
673
|
+
* @param {(number|Object)=} min minimum timestamp or date object
|
674
|
+
* @param {(number|Object)=} max minimum timestamp or date object
|
675
|
+
* @return {Date}
|
676
|
+
*/
|
677
|
+
DataGenerator.prototype.randDate = function(min, max) {
|
678
|
+
var result = randDate(min, max, this._seed);
|
679
|
+
if(this._seed != null) {
|
680
|
+
++this._seed;
|
681
|
+
}
|
682
|
+
return result;
|
683
|
+
};
|
684
|
+
|
685
|
+
/** @public
|
686
|
+
* @param {number=} min
|
687
|
+
* @param {number=} max Exclusive value
|
688
|
+
* @return {string}
|
689
|
+
*/
|
690
|
+
DataGenerator.prototype.randString = function(min, max) {
|
691
|
+
var result = randString(min, max, this._seed);
|
692
|
+
if(this._seed != null) {
|
693
|
+
++this._seed;
|
694
|
+
}
|
695
|
+
return result;
|
696
|
+
};
|
697
|
+
|
698
|
+
/** @type {?number}
|
699
|
+
* @public
|
700
|
+
*/
|
701
|
+
DataGenerator.seed = null;
|
702
|
+
/** @public
|
703
|
+
* @function
|
704
|
+
* @param {string|Array.<string>} fields
|
705
|
+
* @param {Object=} options
|
706
|
+
* @return {!Array.<Array>} 2D Array of data
|
707
|
+
*/
|
708
|
+
DataGenerator.generate = generate;
|
709
|
+
/** @public
|
710
|
+
* @function
|
711
|
+
* @param {string|Array.<string>} fields
|
712
|
+
* @param {Object=} options
|
713
|
+
* @return {Object} Object with the given fields as its keys
|
714
|
+
*/
|
715
|
+
DataGenerator.generateRecord = generateRecord;
|
716
|
+
/** @public
|
717
|
+
* @function
|
718
|
+
* @param {string|Array.<string>} fields
|
719
|
+
* @param {(number|Object)=} options Configuration object or seed number
|
720
|
+
* @return {!Array.<Object>} Array of object with the given fields as its keys
|
721
|
+
*/
|
722
|
+
DataGenerator.generateRecords = generateRecords;
|
723
|
+
/** @public
|
724
|
+
* @function
|
725
|
+
* @param {string} field
|
726
|
+
* @param {Object|Function} options
|
727
|
+
*/
|
728
|
+
DataGenerator.addFieldInfo = addFieldInfo;
|
729
|
+
/** Return a floating-point random number in the range min - max (inclusive of min, but not max) with prec digits of precision.
|
730
|
+
* @public
|
731
|
+
* @function
|
732
|
+
* @param {number=} min=0
|
733
|
+
* @param {number=} max=100 Exclusive value
|
734
|
+
* @param {(number|null)=} prec
|
735
|
+
* @param {number=} seed
|
736
|
+
* @return {number}
|
737
|
+
*/
|
738
|
+
DataGenerator.randNumber = randNumber;
|
739
|
+
/** Return an interger random number in the range min - max (inclusive of min and max).
|
740
|
+
* @public
|
741
|
+
* @function
|
742
|
+
* @param {number} min
|
743
|
+
* @param {number} max Inclusive value
|
744
|
+
* @param {number=} seed
|
745
|
+
* @return {number}
|
746
|
+
*/
|
747
|
+
DataGenerator.randInt = randInt;
|
748
|
+
/** Return a integer random number in the range min - max (inclusive of min, but not max).
|
749
|
+
* @public
|
750
|
+
* @function
|
751
|
+
* @param {number=} min
|
752
|
+
* @param {number=} max Exclusive value
|
753
|
+
* @param {number=} seed
|
754
|
+
* @return {number}
|
755
|
+
*/
|
756
|
+
DataGenerator.randBetween = randBetween;
|
757
|
+
/** Return a integer random number in the range 0 - max <br>
|
758
|
+
* (exclusive of max). It is usefull in some cases for example, <br>
|
759
|
+
* if you want to get a random member of an array, <br>
|
760
|
+
* just get a random index via randIndex(ary.length).
|
761
|
+
* @public
|
762
|
+
* @function
|
763
|
+
* @param {number} max Exclusive value
|
764
|
+
* @param {number=} seed
|
765
|
+
* @return {number}
|
766
|
+
*/
|
767
|
+
DataGenerator.randIndex = randIndex;
|
768
|
+
/** @public
|
769
|
+
* @function
|
770
|
+
* @param {number=} seed
|
771
|
+
* @return {boolean}
|
772
|
+
*/
|
773
|
+
DataGenerator.randBoolean = randBoolean;
|
774
|
+
/** Return a random member of set or single character in the range of A to Z
|
775
|
+
* @public
|
776
|
+
* @function
|
777
|
+
* @param {Array} set
|
778
|
+
* @param {number=} seed
|
779
|
+
* @return {*}
|
780
|
+
*/
|
781
|
+
DataGenerator.randMember = randMember;
|
782
|
+
/** @public
|
783
|
+
* @function
|
784
|
+
* @param {(number|Object)=} min minimum timestamp or date object
|
785
|
+
* @param {(number|Object)=} max minimum timestamp or date object
|
786
|
+
* @param {number=} seed
|
787
|
+
* @return {Date}
|
788
|
+
*/
|
789
|
+
DataGenerator.randDate = randDate;
|
790
|
+
/** @public
|
791
|
+
* @function
|
792
|
+
* @param {number=} min
|
793
|
+
* @param {number=} max
|
794
|
+
* @param {string=} subType "w"/"W" = word, "s"/"S" = sentence
|
795
|
+
* @param {number=} seed
|
796
|
+
* @return {string}
|
797
|
+
*/
|
798
|
+
DataGenerator.randString = randString;
|
799
|
+
|
800
|
+
/** Convert 2D Array to Array of records
|
801
|
+
* @param {Array.<Array>} data2D Array of values
|
802
|
+
* @param {Array.<string>=} fields Keys to be mapped on the output records.
|
803
|
+
* @return {Array.<Object>} records
|
804
|
+
*/
|
805
|
+
DataGenerator.toRecords = toRecords;
|
806
|
+
|
807
|
+
|
808
|
+
export default DataGenerator;
|
809
|
+
export {
|
810
|
+
DataGenerator,
|
811
|
+
addFieldInfo,
|
812
|
+
getSeed,
|
813
|
+
generate,
|
814
|
+
generateRecord,
|
815
|
+
generateRecords,
|
816
|
+
generateQuoteData,
|
817
|
+
randBetween,
|
818
|
+
randInt,
|
819
|
+
randIndex,
|
820
|
+
randNumber,
|
821
|
+
randBoolean,
|
822
|
+
randMember,
|
823
|
+
randDate,
|
824
|
+
randString,
|
825
|
+
pseudoRandNumber,
|
826
|
+
toRecords
|
827
|
+
};
|