@refinitiv-ui/efx-grid 0.0.0-dev.12023565035.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +17 -0
- package/README.md +61 -0
- package/lib/column-dragging/es6/ColumnDragging.d.ts +51 -0
- package/lib/column-dragging/es6/ColumnDragging.js +968 -0
- package/lib/column-dragging/es6/index.d.ts +1 -0
- package/lib/column-dragging/es6/index.js +1 -0
- package/lib/column-format-dialog/index.d.ts +2 -0
- package/lib/column-format-dialog/index.js +2 -0
- package/lib/column-format-dialog/lib/column-format-dialog.d.ts +77 -0
- package/lib/column-format-dialog/lib/column-format-dialog.js +2688 -0
- package/lib/column-format-dialog/lib/locale/translation-de.d.ts +7 -0
- package/lib/column-format-dialog/lib/locale/translation-de.js +94 -0
- package/lib/column-format-dialog/lib/locale/translation-en.d.ts +7 -0
- package/lib/column-format-dialog/lib/locale/translation-en.js +94 -0
- package/lib/column-format-dialog/lib/locale/translation-ja.d.ts +7 -0
- package/lib/column-format-dialog/lib/locale/translation-ja.js +94 -0
- package/lib/column-format-dialog/lib/locale/translation-zh-hant.d.ts +7 -0
- package/lib/column-format-dialog/lib/locale/translation-zh-hant.js +94 -0
- package/lib/column-format-dialog/lib/locale/translation-zh.d.ts +7 -0
- package/lib/column-format-dialog/lib/locale/translation-zh.js +94 -0
- package/lib/column-format-dialog/lib/locale/translation.d.ts +11 -0
- package/lib/column-format-dialog/lib/locale/translation.js +18 -0
- package/lib/column-format-dialog/lib/preview-table.d.ts +151 -0
- package/lib/column-format-dialog/lib/preview-table.js +982 -0
- package/lib/column-format-dialog/themes/base.less +429 -0
- package/lib/column-format-dialog/themes/elemental/column-format-dialog.less +1 -0
- package/lib/column-format-dialog/themes/elemental/dark/column-format-dialog.js +4 -0
- package/lib/column-format-dialog/themes/elemental/dark/css/native-elements.css +0 -0
- package/lib/column-format-dialog/themes/elemental/dark/es5/all-elements.js +2 -0
- package/lib/column-format-dialog/themes/elemental/dark/imports/all-elements.js +1 -0
- package/lib/column-format-dialog/themes/elemental/dark/imports/custom-elements.js +1 -0
- package/lib/column-format-dialog/themes/elemental/dark/imports/native-elements.js +0 -0
- package/lib/column-format-dialog/themes/elemental/dark.js +16 -0
- package/lib/column-format-dialog/themes/elemental/defaults.less +1 -0
- package/lib/column-format-dialog/themes/elemental/index.less +5 -0
- package/lib/column-format-dialog/themes/elemental/light/column-format-dialog.js +4 -0
- package/lib/column-format-dialog/themes/elemental/light/css/native-elements.css +0 -0
- package/lib/column-format-dialog/themes/elemental/light/es5/all-elements.js +2 -0
- package/lib/column-format-dialog/themes/elemental/light/imports/all-elements.js +1 -0
- package/lib/column-format-dialog/themes/elemental/light/imports/custom-elements.js +1 -0
- package/lib/column-format-dialog/themes/elemental/light/imports/native-elements.js +0 -0
- package/lib/column-format-dialog/themes/elemental/light.js +16 -0
- package/lib/column-format-dialog/themes/halo/column-format-dialog.less +6 -0
- package/lib/column-format-dialog/themes/halo/dark/column-format-dialog.js +4 -0
- package/lib/column-format-dialog/themes/halo/dark/css/native-elements.css +0 -0
- package/lib/column-format-dialog/themes/halo/dark/es5/all-elements.js +2 -0
- package/lib/column-format-dialog/themes/halo/dark/imports/all-elements.js +1 -0
- package/lib/column-format-dialog/themes/halo/dark/imports/custom-elements.js +1 -0
- package/lib/column-format-dialog/themes/halo/dark/imports/native-elements.js +0 -0
- package/lib/column-format-dialog/themes/halo/dark.js +16 -0
- package/lib/column-format-dialog/themes/halo/defaults.less +1 -0
- package/lib/column-format-dialog/themes/halo/index.less +5 -0
- package/lib/column-format-dialog/themes/halo/light/column-format-dialog.js +4 -0
- package/lib/column-format-dialog/themes/halo/light/css/native-elements.css +0 -0
- package/lib/column-format-dialog/themes/halo/light/es5/all-elements.js +2 -0
- package/lib/column-format-dialog/themes/halo/light/imports/all-elements.js +1 -0
- package/lib/column-format-dialog/themes/halo/light/imports/custom-elements.js +1 -0
- package/lib/column-format-dialog/themes/halo/light/imports/native-elements.js +0 -0
- package/lib/column-format-dialog/themes/halo/light.js +16 -0
- package/lib/column-format-dialog/themes/luna/column-format-dialog.less +1 -0
- package/lib/column-format-dialog/themes/luna/default/column-format-dialog.js +4 -0
- package/lib/column-format-dialog/themes/luna/default/css/native-elements.css +0 -0
- package/lib/column-format-dialog/themes/luna/default/es5/all-elements.js +2 -0
- package/lib/column-format-dialog/themes/luna/default/imports/all-elements.js +1 -0
- package/lib/column-format-dialog/themes/luna/default/imports/custom-elements.js +1 -0
- package/lib/column-format-dialog/themes/luna/default/imports/native-elements.js +0 -0
- package/lib/column-format-dialog/themes/luna/defaults.less +1 -0
- package/lib/column-format-dialog/themes/luna/index.less +5 -0
- package/lib/column-format-dialog/themes/solar/charcoal/column-format-dialog.js +4 -0
- package/lib/column-format-dialog/themes/solar/charcoal/css/native-elements.css +0 -0
- package/lib/column-format-dialog/themes/solar/charcoal/es5/all-elements.js +2 -0
- package/lib/column-format-dialog/themes/solar/charcoal/imports/all-elements.js +1 -0
- package/lib/column-format-dialog/themes/solar/charcoal/imports/custom-elements.js +1 -0
- package/lib/column-format-dialog/themes/solar/charcoal/imports/native-elements.js +0 -0
- package/lib/column-format-dialog/themes/solar/charcoal.js +16 -0
- package/lib/column-format-dialog/themes/solar/column-format-dialog.less +6 -0
- package/lib/column-format-dialog/themes/solar/defaults.less +1 -0
- package/lib/column-format-dialog/themes/solar/index.less +5 -0
- package/lib/column-format-dialog/themes/solar/pearl/column-format-dialog.js +4 -0
- package/lib/column-format-dialog/themes/solar/pearl/css/native-elements.css +0 -0
- package/lib/column-format-dialog/themes/solar/pearl/es5/all-elements.js +2 -0
- package/lib/column-format-dialog/themes/solar/pearl/imports/all-elements.js +1 -0
- package/lib/column-format-dialog/themes/solar/pearl/imports/custom-elements.js +1 -0
- package/lib/column-format-dialog/themes/solar/pearl/imports/native-elements.js +0 -0
- package/lib/column-format-dialog/themes/solar/pearl.js +16 -0
- package/lib/column-selection-dialog/index.d.ts +2 -0
- package/lib/column-selection-dialog/index.js +2 -0
- package/lib/column-selection-dialog/lib/column-selection-dialog.d.ts +66 -0
- package/lib/column-selection-dialog/lib/column-selection-dialog.js +2034 -0
- package/lib/column-selection-dialog/lib/locale/translation-de.d.ts +7 -0
- package/lib/column-selection-dialog/lib/locale/translation-de.js +20 -0
- package/lib/column-selection-dialog/lib/locale/translation-en.d.ts +7 -0
- package/lib/column-selection-dialog/lib/locale/translation-en.js +20 -0
- package/lib/column-selection-dialog/lib/locale/translation-ja.d.ts +7 -0
- package/lib/column-selection-dialog/lib/locale/translation-ja.js +20 -0
- package/lib/column-selection-dialog/lib/locale/translation-zh-hant.d.ts +7 -0
- package/lib/column-selection-dialog/lib/locale/translation-zh-hant.js +20 -0
- package/lib/column-selection-dialog/lib/locale/translation-zh.d.ts +7 -0
- package/lib/column-selection-dialog/lib/locale/translation-zh.js +20 -0
- package/lib/column-selection-dialog/lib/locale/translation.d.ts +11 -0
- package/lib/column-selection-dialog/lib/locale/translation.js +18 -0
- package/lib/column-selection-dialog/themes/base.less +258 -0
- package/lib/column-selection-dialog/themes/elemental/column-selection-dialog.less +1 -0
- package/lib/column-selection-dialog/themes/elemental/dark/column-selection-dialog.js +4 -0
- package/lib/column-selection-dialog/themes/elemental/dark/css/native-elements.css +0 -0
- package/lib/column-selection-dialog/themes/elemental/dark/es5/all-elements.js +2 -0
- package/lib/column-selection-dialog/themes/elemental/dark/imports/all-elements.js +1 -0
- package/lib/column-selection-dialog/themes/elemental/dark/imports/custom-elements.js +1 -0
- package/lib/column-selection-dialog/themes/elemental/dark/imports/native-elements.js +0 -0
- package/lib/column-selection-dialog/themes/elemental/dark.js +8 -0
- package/lib/column-selection-dialog/themes/elemental/defaults.less +1 -0
- package/lib/column-selection-dialog/themes/elemental/index.less +5 -0
- package/lib/column-selection-dialog/themes/elemental/light/column-selection-dialog.js +4 -0
- package/lib/column-selection-dialog/themes/elemental/light/css/native-elements.css +0 -0
- package/lib/column-selection-dialog/themes/elemental/light/es5/all-elements.js +2 -0
- package/lib/column-selection-dialog/themes/elemental/light/imports/all-elements.js +1 -0
- package/lib/column-selection-dialog/themes/elemental/light/imports/custom-elements.js +1 -0
- package/lib/column-selection-dialog/themes/elemental/light/imports/native-elements.js +0 -0
- package/lib/column-selection-dialog/themes/elemental/light.js +8 -0
- package/lib/column-selection-dialog/themes/halo/column-selection-dialog.less +25 -0
- package/lib/column-selection-dialog/themes/halo/dark/column-selection-dialog.js +4 -0
- package/lib/column-selection-dialog/themes/halo/dark/css/native-elements.css +0 -0
- package/lib/column-selection-dialog/themes/halo/dark/es5/all-elements.js +2 -0
- package/lib/column-selection-dialog/themes/halo/dark/imports/all-elements.js +1 -0
- package/lib/column-selection-dialog/themes/halo/dark/imports/custom-elements.js +1 -0
- package/lib/column-selection-dialog/themes/halo/dark/imports/native-elements.js +0 -0
- package/lib/column-selection-dialog/themes/halo/dark.js +8 -0
- package/lib/column-selection-dialog/themes/halo/defaults.less +1 -0
- package/lib/column-selection-dialog/themes/halo/index.less +6 -0
- package/lib/column-selection-dialog/themes/halo/light/column-selection-dialog.js +4 -0
- package/lib/column-selection-dialog/themes/halo/light/css/native-elements.css +0 -0
- package/lib/column-selection-dialog/themes/halo/light/es5/all-elements.js +2 -0
- package/lib/column-selection-dialog/themes/halo/light/imports/all-elements.js +1 -0
- package/lib/column-selection-dialog/themes/halo/light/imports/custom-elements.js +1 -0
- package/lib/column-selection-dialog/themes/halo/light/imports/native-elements.js +0 -0
- package/lib/column-selection-dialog/themes/halo/light.js +8 -0
- package/lib/column-selection-dialog/themes/solar/charcoal/column-selection-dialog.js +4 -0
- package/lib/column-selection-dialog/themes/solar/charcoal/css/native-elements.css +0 -0
- package/lib/column-selection-dialog/themes/solar/charcoal/es5/all-elements.js +2 -0
- package/lib/column-selection-dialog/themes/solar/charcoal/imports/all-elements.js +1 -0
- package/lib/column-selection-dialog/themes/solar/charcoal/imports/custom-elements.js +1 -0
- package/lib/column-selection-dialog/themes/solar/charcoal/imports/native-elements.js +0 -0
- package/lib/column-selection-dialog/themes/solar/charcoal.js +8 -0
- package/lib/column-selection-dialog/themes/solar/column-selection-dialog.less +5 -0
- package/lib/column-selection-dialog/themes/solar/defaults.less +1 -0
- package/lib/column-selection-dialog/themes/solar/index.less +6 -0
- package/lib/column-selection-dialog/themes/solar/pearl/column-selection-dialog.js +4 -0
- package/lib/column-selection-dialog/themes/solar/pearl/css/native-elements.css +0 -0
- package/lib/column-selection-dialog/themes/solar/pearl/es5/all-elements.js +2 -0
- package/lib/column-selection-dialog/themes/solar/pearl/imports/all-elements.js +1 -0
- package/lib/column-selection-dialog/themes/solar/pearl/imports/custom-elements.js +1 -0
- package/lib/column-selection-dialog/themes/solar/pearl/imports/native-elements.js +0 -0
- package/lib/column-selection-dialog/themes/solar/pearl.js +8 -0
- package/lib/core/dist/core.css +1 -0
- package/lib/core/dist/core.js +33910 -0
- package/lib/core/dist/core.min.js +1 -0
- package/lib/core/es6/data/ColumnStats.d.ts +42 -0
- package/lib/core/es6/data/ColumnStats.js +428 -0
- package/lib/core/es6/data/DataCache.d.ts +43 -0
- package/lib/core/es6/data/DataCache.js +597 -0
- package/lib/core/es6/data/DataTable.d.ts +156 -0
- package/lib/core/es6/data/DataTable.js +2206 -0
- package/lib/core/es6/data/DataView.d.ts +332 -0
- package/lib/core/es6/data/DataView.js +4144 -0
- package/lib/core/es6/data/Segment.d.ts +91 -0
- package/lib/core/es6/data/Segment.js +1001 -0
- package/lib/core/es6/data/SegmentCollection.d.ts +84 -0
- package/lib/core/es6/data/SegmentCollection.js +713 -0
- package/lib/core/es6/data/WrappedView.d.ts +290 -0
- package/lib/core/es6/data/WrappedView.js +1320 -0
- package/lib/core/es6/grid/Core.d.ts +455 -0
- package/lib/core/es6/grid/Core.js +6196 -0
- package/lib/core/es6/grid/ILayoutGrid.d.ts +212 -0
- package/lib/core/es6/grid/ILayoutGrid.js +706 -0
- package/lib/core/es6/grid/LayoutGrid.d.ts +37 -0
- package/lib/core/es6/grid/LayoutGrid.js +2975 -0
- package/lib/core/es6/grid/VirtualizedLayoutGrid.d.ts +28 -0
- package/lib/core/es6/grid/VirtualizedLayoutGrid.js +1241 -0
- package/lib/core/es6/grid/components/Cell.d.ts +52 -0
- package/lib/core/es6/grid/components/Cell.js +826 -0
- package/lib/core/es6/grid/components/CellFloatingPanel.d.ts +21 -0
- package/lib/core/es6/grid/components/CellFloatingPanel.js +130 -0
- package/lib/core/es6/grid/components/CellSpan.d.ts +18 -0
- package/lib/core/es6/grid/components/CellSpan.js +99 -0
- package/lib/core/es6/grid/components/CellSpans.d.ts +40 -0
- package/lib/core/es6/grid/components/CellSpans.js +368 -0
- package/lib/core/es6/grid/components/Column.d.ts +22 -0
- package/lib/core/es6/grid/components/Column.js +618 -0
- package/lib/core/es6/grid/components/ElementWrapper.d.ts +127 -0
- package/lib/core/es6/grid/components/ElementWrapper.js +718 -0
- package/lib/core/es6/grid/components/HScrollbar.d.ts +28 -0
- package/lib/core/es6/grid/components/HScrollbar.js +241 -0
- package/lib/core/es6/grid/components/Scrollbar.d.ts +63 -0
- package/lib/core/es6/grid/components/Scrollbar.js +1413 -0
- package/lib/core/es6/grid/components/StretchedCells.d.ts +17 -0
- package/lib/core/es6/grid/components/StretchedCells.js +342 -0
- package/lib/core/es6/grid/components/VScrollbar.d.ts +18 -0
- package/lib/core/es6/grid/components/VScrollbar.js +139 -0
- package/lib/core/es6/grid/components/VirtualItems.d.ts +12 -0
- package/lib/core/es6/grid/components/VirtualItems.js +51 -0
- package/lib/core/es6/grid/event/EventDispatcher.d.ts +16 -0
- package/lib/core/es6/grid/event/EventDispatcher.js +138 -0
- package/lib/core/es6/grid/event/EventListeners.d.ts +34 -0
- package/lib/core/es6/grid/event/EventListeners.js +166 -0
- package/lib/core/es6/grid/plugins/SortableTitlePlugin.d.ts +155 -0
- package/lib/core/es6/grid/plugins/SortableTitlePlugin.js +1977 -0
- package/lib/core/es6/grid/util/CellBoundPainter.d.ts +16 -0
- package/lib/core/es6/grid/util/CellBoundPainter.js +171 -0
- package/lib/core/es6/grid/util/Conflator.d.ts +32 -0
- package/lib/core/es6/grid/util/Conflator.js +191 -0
- package/lib/core/es6/grid/util/Reverter.d.ts +14 -0
- package/lib/core/es6/grid/util/Reverter.js +79 -0
- package/lib/core/es6/grid/util/SectionSettings.d.ts +79 -0
- package/lib/core/es6/grid/util/SectionSettings.js +679 -0
- package/lib/core/es6/grid/util/SelectionList.d.ts +54 -0
- package/lib/core/es6/grid/util/SelectionList.js +491 -0
- package/lib/core/es6/grid/util/TrackLayout.d.ts +92 -0
- package/lib/core/es6/grid/util/TrackLayout.js +902 -0
- package/lib/core/es6/grid/util/Virtualizer.d.ts +40 -0
- package/lib/core/es6/grid/util/Virtualizer.js +340 -0
- package/lib/core/es6/grid/util/util.d.ts +20 -0
- package/lib/core/es6/grid/util/util.js +391 -0
- package/lib/core/es6/index.d.ts +79 -0
- package/lib/core/es6/index.js +125 -0
- package/lib/core/es6/tr-grid-theme.d.ts +5 -0
- package/lib/core/es6/tr-grid-theme.js +5 -0
- package/lib/filter-dialog/index.d.ts +2 -0
- package/lib/filter-dialog/index.js +2 -0
- package/lib/filter-dialog/lib/checkbox-list.d.ts +52 -0
- package/lib/filter-dialog/lib/checkbox-list.js +444 -0
- package/lib/filter-dialog/lib/filter-dialog.d.ts +75 -0
- package/lib/filter-dialog/lib/filter-dialog.js +1160 -0
- package/lib/filter-dialog/lib/locale/translation-de.d.ts +7 -0
- package/lib/filter-dialog/lib/locale/translation-de.js +40 -0
- package/lib/filter-dialog/lib/locale/translation-en.d.ts +7 -0
- package/lib/filter-dialog/lib/locale/translation-en.js +40 -0
- package/lib/filter-dialog/lib/locale/translation-ja.d.ts +7 -0
- package/lib/filter-dialog/lib/locale/translation-ja.js +40 -0
- package/lib/filter-dialog/lib/locale/translation-zh-hant.d.ts +7 -0
- package/lib/filter-dialog/lib/locale/translation-zh-hant.js +40 -0
- package/lib/filter-dialog/lib/locale/translation-zh.d.ts +7 -0
- package/lib/filter-dialog/lib/locale/translation-zh.js +40 -0
- package/lib/filter-dialog/lib/locale/translation.d.ts +11 -0
- package/lib/filter-dialog/lib/locale/translation.js +18 -0
- package/lib/filter-dialog/themes/base-checkbox.less +42 -0
- package/lib/filter-dialog/themes/base.less +191 -0
- package/lib/filter-dialog/themes/elemental/checkbox-list.less +3 -0
- package/lib/filter-dialog/themes/elemental/dark/checkbox-list.js +4 -0
- package/lib/filter-dialog/themes/elemental/dark/css/native-elements.css +0 -0
- package/lib/filter-dialog/themes/elemental/dark/es5/all-elements.js +4 -0
- package/lib/filter-dialog/themes/elemental/dark/filter-dialog.js +5 -0
- package/lib/filter-dialog/themes/elemental/dark/imports/all-elements.js +2 -0
- package/lib/filter-dialog/themes/elemental/dark/imports/custom-elements.js +2 -0
- package/lib/filter-dialog/themes/elemental/dark/imports/native-elements.js +0 -0
- package/lib/filter-dialog/themes/elemental/dark.js +11 -0
- package/lib/filter-dialog/themes/elemental/defaults.less +3 -0
- package/lib/filter-dialog/themes/elemental/filter-dialog.less +1 -0
- package/lib/filter-dialog/themes/elemental/index.less +6 -0
- package/lib/filter-dialog/themes/elemental/light/checkbox-list.js +4 -0
- package/lib/filter-dialog/themes/elemental/light/css/native-elements.css +0 -0
- package/lib/filter-dialog/themes/elemental/light/es5/all-elements.js +4 -0
- package/lib/filter-dialog/themes/elemental/light/filter-dialog.js +5 -0
- package/lib/filter-dialog/themes/elemental/light/imports/all-elements.js +2 -0
- package/lib/filter-dialog/themes/elemental/light/imports/custom-elements.js +2 -0
- package/lib/filter-dialog/themes/elemental/light/imports/native-elements.js +0 -0
- package/lib/filter-dialog/themes/elemental/light.js +11 -0
- package/lib/filter-dialog/themes/halo/checkbox-list.less +3 -0
- package/lib/filter-dialog/themes/halo/dark/checkbox-list.js +4 -0
- package/lib/filter-dialog/themes/halo/dark/css/native-elements.css +0 -0
- package/lib/filter-dialog/themes/halo/dark/es5/all-elements.js +4 -0
- package/lib/filter-dialog/themes/halo/dark/filter-dialog.js +5 -0
- package/lib/filter-dialog/themes/halo/dark/imports/all-elements.js +2 -0
- package/lib/filter-dialog/themes/halo/dark/imports/custom-elements.js +2 -0
- package/lib/filter-dialog/themes/halo/dark/imports/native-elements.js +0 -0
- package/lib/filter-dialog/themes/halo/dark.js +11 -0
- package/lib/filter-dialog/themes/halo/defaults.less +3 -0
- package/lib/filter-dialog/themes/halo/filter-dialog.less +15 -0
- package/lib/filter-dialog/themes/halo/index.less +6 -0
- package/lib/filter-dialog/themes/halo/light/checkbox-list.js +4 -0
- package/lib/filter-dialog/themes/halo/light/css/native-elements.css +0 -0
- package/lib/filter-dialog/themes/halo/light/es5/all-elements.js +4 -0
- package/lib/filter-dialog/themes/halo/light/filter-dialog.js +5 -0
- package/lib/filter-dialog/themes/halo/light/imports/all-elements.js +2 -0
- package/lib/filter-dialog/themes/halo/light/imports/custom-elements.js +2 -0
- package/lib/filter-dialog/themes/halo/light/imports/native-elements.js +0 -0
- package/lib/filter-dialog/themes/halo/light.js +11 -0
- package/lib/filter-dialog/themes/solar/charcoal/checkbox-list.js +4 -0
- package/lib/filter-dialog/themes/solar/charcoal/css/native-elements.css +0 -0
- package/lib/filter-dialog/themes/solar/charcoal/es5/all-elements.js +4 -0
- package/lib/filter-dialog/themes/solar/charcoal/filter-dialog.js +5 -0
- package/lib/filter-dialog/themes/solar/charcoal/imports/all-elements.js +2 -0
- package/lib/filter-dialog/themes/solar/charcoal/imports/custom-elements.js +2 -0
- package/lib/filter-dialog/themes/solar/charcoal/imports/native-elements.js +0 -0
- package/lib/filter-dialog/themes/solar/charcoal.js +11 -0
- package/lib/filter-dialog/themes/solar/checkbox-list.less +3 -0
- package/lib/filter-dialog/themes/solar/defaults.less +3 -0
- package/lib/filter-dialog/themes/solar/filter-dialog.less +5 -0
- package/lib/filter-dialog/themes/solar/index.less +6 -0
- package/lib/filter-dialog/themes/solar/pearl/checkbox-list.js +4 -0
- package/lib/filter-dialog/themes/solar/pearl/css/native-elements.css +0 -0
- package/lib/filter-dialog/themes/solar/pearl/es5/all-elements.js +4 -0
- package/lib/filter-dialog/themes/solar/pearl/filter-dialog.js +5 -0
- package/lib/filter-dialog/themes/solar/pearl/imports/all-elements.js +2 -0
- package/lib/filter-dialog/themes/solar/pearl/imports/custom-elements.js +2 -0
- package/lib/filter-dialog/themes/solar/pearl/imports/native-elements.js +0 -0
- package/lib/filter-dialog/themes/solar/pearl.js +11 -0
- package/lib/formatters/es6/CoralButtonFormatter.d.ts +20 -0
- package/lib/formatters/es6/CoralButtonFormatter.js +45 -0
- package/lib/formatters/es6/CoralCheckboxFormatter.d.ts +12 -0
- package/lib/formatters/es6/CoralCheckboxFormatter.js +50 -0
- package/lib/formatters/es6/CoralComboBoxFormatter.d.ts +23 -0
- package/lib/formatters/es6/CoralComboBoxFormatter.js +103 -0
- package/lib/formatters/es6/CoralIconFormatter.d.ts +21 -0
- package/lib/formatters/es6/CoralIconFormatter.js +50 -0
- package/lib/formatters/es6/CoralInputFormatter.d.ts +12 -0
- package/lib/formatters/es6/CoralInputFormatter.js +45 -0
- package/lib/formatters/es6/CoralRadioButtonFormatter.d.ts +20 -0
- package/lib/formatters/es6/CoralRadioButtonFormatter.js +85 -0
- package/lib/formatters/es6/CoralSelectFormatter.d.ts +23 -0
- package/lib/formatters/es6/CoralSelectFormatter.js +71 -0
- package/lib/formatters/es6/CoralToggleFormatter.d.ts +12 -0
- package/lib/formatters/es6/CoralToggleFormatter.js +47 -0
- package/lib/formatters/es6/DuplexEmeraldDateTimePickerFormatter.d.ts +14 -0
- package/lib/formatters/es6/DuplexEmeraldDateTimePickerFormatter.js +119 -0
- package/lib/formatters/es6/EFButtonFormatter.d.ts +20 -0
- package/lib/formatters/es6/EFButtonFormatter.js +45 -0
- package/lib/formatters/es6/EFCheckboxFormatter.d.ts +12 -0
- package/lib/formatters/es6/EFCheckboxFormatter.js +50 -0
- package/lib/formatters/es6/EFComboBoxFormatter.d.ts +23 -0
- package/lib/formatters/es6/EFComboBoxFormatter.js +78 -0
- package/lib/formatters/es6/EFDateTimePickerFormatter.d.ts +13 -0
- package/lib/formatters/es6/EFDateTimePickerFormatter.js +60 -0
- package/lib/formatters/es6/EFIconFormatter.d.ts +21 -0
- package/lib/formatters/es6/EFIconFormatter.js +50 -0
- package/lib/formatters/es6/EFNumberFieldFormatter.d.ts +12 -0
- package/lib/formatters/es6/EFNumberFieldFormatter.js +45 -0
- package/lib/formatters/es6/EFRadioButtonFormatter.d.ts +20 -0
- package/lib/formatters/es6/EFRadioButtonFormatter.js +132 -0
- package/lib/formatters/es6/EFSelectFormatter.d.ts +23 -0
- package/lib/formatters/es6/EFSelectFormatter.js +76 -0
- package/lib/formatters/es6/EFTextFieldFormatter.d.ts +12 -0
- package/lib/formatters/es6/EFTextFieldFormatter.js +40 -0
- package/lib/formatters/es6/EFToggleFormatter.d.ts +12 -0
- package/lib/formatters/es6/EFToggleFormatter.js +47 -0
- package/lib/formatters/es6/EmeraldDateTimePickerFormatter.d.ts +13 -0
- package/lib/formatters/es6/EmeraldDateTimePickerFormatter.js +55 -0
- package/lib/formatters/es6/FormatterBuilder.d.ts +26 -0
- package/lib/formatters/es6/FormatterBuilder.js +493 -0
- package/lib/formatters/es6/NumericInputFormatter.d.ts +13 -0
- package/lib/formatters/es6/NumericInputFormatter.js +64 -0
- package/lib/formatters/es6/PercentBarFormatter.d.ts +25 -0
- package/lib/formatters/es6/PercentBarFormatter.js +62 -0
- package/lib/formatters/es6/SimpleImageFormatter.d.ts +21 -0
- package/lib/formatters/es6/SimpleImageFormatter.js +64 -0
- package/lib/formatters/es6/SimpleInputFormatter.d.ts +12 -0
- package/lib/formatters/es6/SimpleInputFormatter.js +40 -0
- package/lib/formatters/es6/SimpleLinkFormatter.d.ts +21 -0
- package/lib/formatters/es6/SimpleLinkFormatter.js +48 -0
- package/lib/formatters/es6/SimpleTickerFormatter.d.ts +23 -0
- package/lib/formatters/es6/SimpleTickerFormatter.js +66 -0
- package/lib/formatters/es6/SimpleToggleFormatter.d.ts +22 -0
- package/lib/formatters/es6/SimpleToggleFormatter.js +132 -0
- package/lib/formatters/es6/TextFormatter.d.ts +12 -0
- package/lib/formatters/es6/TextFormatter.js +35 -0
- package/lib/formatters/es6/index.d.ts +64 -0
- package/lib/formatters/es6/index.js +88 -0
- package/lib/grid/index.d.ts +2 -0
- package/lib/grid/index.js +3 -0
- package/lib/grid/lib/efx-grid.d.ts +53 -0
- package/lib/grid/lib/efx-grid.js +444 -0
- package/lib/grid/themes/base.less +137 -0
- package/lib/grid/themes/ds/dark/css/native-elements.css +0 -0
- package/lib/grid/themes/ds/dark/efx-grid.js +4 -0
- package/lib/grid/themes/ds/dark/es5/all-elements.js +2 -0
- package/lib/grid/themes/ds/dark/imports/all-elements.js +1 -0
- package/lib/grid/themes/ds/dark/imports/custom-elements.js +1 -0
- package/lib/grid/themes/ds/dark/imports/native-elements.js +0 -0
- package/lib/grid/themes/ds/dark.js +3 -0
- package/lib/grid/themes/ds/efx-grid.less +207 -0
- package/lib/grid/themes/ds/index.less +3 -0
- package/lib/grid/themes/ds/light/css/native-elements.css +0 -0
- package/lib/grid/themes/ds/light/efx-grid.js +4 -0
- package/lib/grid/themes/ds/light/es5/all-elements.js +2 -0
- package/lib/grid/themes/ds/light/imports/all-elements.js +1 -0
- package/lib/grid/themes/ds/light/imports/custom-elements.js +1 -0
- package/lib/grid/themes/ds/light/imports/native-elements.js +0 -0
- package/lib/grid/themes/ds/light.js +3 -0
- package/lib/grid/themes/halo/dark/css/native-elements.css +0 -0
- package/lib/grid/themes/halo/dark/efx-grid.js +4 -0
- package/lib/grid/themes/halo/dark/es5/all-elements.js +2 -0
- package/lib/grid/themes/halo/dark/imports/all-elements.js +1 -0
- package/lib/grid/themes/halo/dark/imports/custom-elements.js +1 -0
- package/lib/grid/themes/halo/dark/imports/native-elements.js +0 -0
- package/lib/grid/themes/halo/dark.js +3 -0
- package/lib/grid/themes/halo/efx-grid.less +127 -0
- package/lib/grid/themes/halo/index.less +3 -0
- package/lib/grid/themes/halo/light/css/native-elements.css +0 -0
- package/lib/grid/themes/halo/light/efx-grid.js +4 -0
- package/lib/grid/themes/halo/light/es5/all-elements.js +2 -0
- package/lib/grid/themes/halo/light/imports/all-elements.js +1 -0
- package/lib/grid/themes/halo/light/imports/custom-elements.js +1 -0
- package/lib/grid/themes/halo/light/imports/native-elements.js +0 -0
- package/lib/grid/themes/halo/light.js +3 -0
- package/lib/grid/themes/solar/charcoal/css/native-elements.css +0 -0
- package/lib/grid/themes/solar/charcoal/efx-grid.js +4 -0
- package/lib/grid/themes/solar/charcoal/es5/all-elements.js +2 -0
- package/lib/grid/themes/solar/charcoal/imports/all-elements.js +1 -0
- package/lib/grid/themes/solar/charcoal/imports/custom-elements.js +1 -0
- package/lib/grid/themes/solar/charcoal/imports/native-elements.js +0 -0
- package/lib/grid/themes/solar/charcoal.js +3 -0
- package/lib/grid/themes/solar/efx-grid.less +27 -0
- package/lib/grid/themes/solar/index.less +3 -0
- package/lib/grid/themes/solar/pearl/css/native-elements.css +0 -0
- package/lib/grid/themes/solar/pearl/efx-grid.js +4 -0
- package/lib/grid/themes/solar/pearl/es5/all-elements.js +2 -0
- package/lib/grid/themes/solar/pearl/imports/all-elements.js +1 -0
- package/lib/grid/themes/solar/pearl/imports/custom-elements.js +1 -0
- package/lib/grid/themes/solar/pearl/imports/native-elements.js +0 -0
- package/lib/grid/themes/solar/pearl.js +3 -0
- package/lib/index.d.ts +100 -0
- package/lib/index.js +100 -0
- package/lib/row-segmenting/es6/RowSegmenting.d.ts +115 -0
- package/lib/row-segmenting/es6/RowSegmenting.js +1182 -0
- package/lib/row-segmenting/es6/index.d.ts +1 -0
- package/lib/row-segmenting/es6/index.js +1 -0
- package/lib/rt-grid/dist/rt-grid.js +54547 -0
- package/lib/rt-grid/dist/rt-grid.min.js +1 -0
- package/lib/rt-grid/es6/ColumnDefinition.d.ts +174 -0
- package/lib/rt-grid/es6/ColumnDefinition.js +1203 -0
- package/lib/rt-grid/es6/DataConnector.d.ts +43 -0
- package/lib/rt-grid/es6/DataConnector.js +290 -0
- package/lib/rt-grid/es6/FieldDefinition.d.ts +40 -0
- package/lib/rt-grid/es6/FieldDefinition.js +560 -0
- package/lib/rt-grid/es6/Grid.d.ts +376 -0
- package/lib/rt-grid/es6/Grid.js +4653 -0
- package/lib/rt-grid/es6/PredefinedFormula.d.ts +16 -0
- package/lib/rt-grid/es6/PredefinedFormula.js +33 -0
- package/lib/rt-grid/es6/ReferenceCounter.d.ts +40 -0
- package/lib/rt-grid/es6/ReferenceCounter.js +251 -0
- package/lib/rt-grid/es6/RowDefSorter.d.ts +19 -0
- package/lib/rt-grid/es6/RowDefSorter.js +231 -0
- package/lib/rt-grid/es6/RowDefinition.d.ts +156 -0
- package/lib/rt-grid/es6/RowDefinition.js +1478 -0
- package/lib/rt-grid/es6/SnapshotFiller.d.ts +36 -0
- package/lib/rt-grid/es6/SnapshotFiller.js +537 -0
- package/lib/rt-grid/es6/StyleLoader.d.ts +17 -0
- package/lib/rt-grid/es6/StyleLoader.js +47 -0
- package/lib/rt-grid/es6/index.d.ts +8 -0
- package/lib/rt-grid/es6/index.js +43 -0
- package/lib/statistics-row/es6/StatisticsRow.d.ts +68 -0
- package/lib/statistics-row/es6/StatisticsRow.js +807 -0
- package/lib/statistics-row/es6/index.d.ts +1 -0
- package/lib/statistics-row/es6/index.js +1 -0
- package/lib/tr-grid-auto-tooltip/es6/AutoTooltip.d.ts +46 -0
- package/lib/tr-grid-auto-tooltip/es6/AutoTooltip.js +617 -0
- package/lib/tr-grid-auto-tooltip/es6/index.d.ts +1 -0
- package/lib/tr-grid-auto-tooltip/es6/index.js +1 -0
- package/lib/tr-grid-cell-selection/es6/CellSelection.d.ts +70 -0
- package/lib/tr-grid-cell-selection/es6/CellSelection.js +1695 -0
- package/lib/tr-grid-cell-selection/es6/index.d.ts +1 -0
- package/lib/tr-grid-cell-selection/es6/index.js +1 -0
- package/lib/tr-grid-checkbox/es6/Checkbox.d.ts +82 -0
- package/lib/tr-grid-checkbox/es6/Checkbox.js +1704 -0
- package/lib/tr-grid-checkbox/es6/index.d.ts +1 -0
- package/lib/tr-grid-checkbox/es6/index.js +1 -0
- package/lib/tr-grid-column-fitter/es6/ColumnFitter.d.ts +56 -0
- package/lib/tr-grid-column-fitter/es6/ColumnFitter.js +817 -0
- package/lib/tr-grid-column-fitter/es6/index.d.ts +1 -0
- package/lib/tr-grid-column-fitter/es6/index.js +1 -0
- package/lib/tr-grid-column-formatting/es6/ColumnFormatting.d.ts +91 -0
- package/lib/tr-grid-column-formatting/es6/ColumnFormatting.js +617 -0
- package/lib/tr-grid-column-formatting/es6/index.d.ts +1 -0
- package/lib/tr-grid-column-formatting/es6/index.js +1 -0
- package/lib/tr-grid-column-grouping/es6/ColumnGrouping.d.ts +110 -0
- package/lib/tr-grid-column-grouping/es6/ColumnGrouping.js +2028 -0
- package/lib/tr-grid-column-grouping/es6/index.d.ts +1 -0
- package/lib/tr-grid-column-grouping/es6/index.js +1 -0
- package/lib/tr-grid-column-resizing/es6/ColumnResizing.d.ts +68 -0
- package/lib/tr-grid-column-resizing/es6/ColumnResizing.js +1010 -0
- package/lib/tr-grid-column-resizing/es6/index.d.ts +1 -0
- package/lib/tr-grid-column-resizing/es6/index.js +1 -0
- package/lib/tr-grid-column-selection/es6/ColumnSelection.d.ts +77 -0
- package/lib/tr-grid-column-selection/es6/ColumnSelection.js +1405 -0
- package/lib/tr-grid-column-selection/es6/index.d.ts +1 -0
- package/lib/tr-grid-column-selection/es6/index.js +1 -0
- package/lib/tr-grid-column-stack/es6/ColumnStack.d.ts +160 -0
- package/lib/tr-grid-column-stack/es6/ColumnStack.js +2155 -0
- package/lib/tr-grid-column-stack/es6/index.d.ts +1 -0
- package/lib/tr-grid-column-stack/es6/index.js +1 -0
- package/lib/tr-grid-conditional-coloring/es6/ConditionalColoring.d.ts +100 -0
- package/lib/tr-grid-conditional-coloring/es6/ConditionalColoring.js +1513 -0
- package/lib/tr-grid-conditional-coloring/es6/index.d.ts +1 -0
- package/lib/tr-grid-conditional-coloring/es6/index.js +1 -0
- package/lib/tr-grid-content-wrap/es6/ContentWrap.d.ts +43 -0
- package/lib/tr-grid-content-wrap/es6/ContentWrap.js +519 -0
- package/lib/tr-grid-content-wrap/es6/index.d.ts +1 -0
- package/lib/tr-grid-content-wrap/es6/index.js +1 -0
- package/lib/tr-grid-contextmenu/es6/ContextMenu.d.ts +83 -0
- package/lib/tr-grid-contextmenu/es6/ContextMenu.js +453 -0
- package/lib/tr-grid-contextmenu/es6/MenuEventAPI.d.ts +22 -0
- package/lib/tr-grid-contextmenu/es6/MenuEventAPI.js +138 -0
- package/lib/tr-grid-contextmenu/es6/MenuItem.d.ts +41 -0
- package/lib/tr-grid-contextmenu/es6/MenuItem.js +285 -0
- package/lib/tr-grid-contextmenu/es6/PopupMenu.d.ts +33 -0
- package/lib/tr-grid-contextmenu/es6/PopupMenu.js +303 -0
- package/lib/tr-grid-contextmenu/es6/index.d.ts +1 -0
- package/lib/tr-grid-contextmenu/es6/index.js +1 -0
- package/lib/tr-grid-filter-input/es6/FilterInput.d.ts +64 -0
- package/lib/tr-grid-filter-input/es6/FilterInput.js +1027 -0
- package/lib/tr-grid-filter-input/es6/index.d.ts +1 -0
- package/lib/tr-grid-filter-input/es6/index.js +1 -0
- package/lib/tr-grid-heat-map/es6/HeatMap.d.ts +45 -0
- package/lib/tr-grid-heat-map/es6/HeatMap.js +401 -0
- package/lib/tr-grid-heat-map/es6/index.d.ts +1 -0
- package/lib/tr-grid-heat-map/es6/index.js +1 -0
- package/lib/tr-grid-in-cell-editing/es6/InCellEditing.d.ts +148 -0
- package/lib/tr-grid-in-cell-editing/es6/InCellEditing.js +2671 -0
- package/lib/tr-grid-in-cell-editing/es6/index.d.ts +1 -0
- package/lib/tr-grid-in-cell-editing/es6/index.js +1 -0
- package/lib/tr-grid-pagination/es6/Pagination.d.ts +58 -0
- package/lib/tr-grid-pagination/es6/Pagination.js +433 -0
- package/lib/tr-grid-pagination/es6/index.d.ts +1 -0
- package/lib/tr-grid-pagination/es6/index.js +1 -0
- package/lib/tr-grid-percent-bar/es6/PercentBar.d.ts +60 -0
- package/lib/tr-grid-percent-bar/es6/PercentBar.js +804 -0
- package/lib/tr-grid-percent-bar/es6/index.d.ts +1 -0
- package/lib/tr-grid-percent-bar/es6/index.js +1 -0
- package/lib/tr-grid-printer/es6/CellWriter.d.ts +50 -0
- package/lib/tr-grid-printer/es6/CellWriter.js +234 -0
- package/lib/tr-grid-printer/es6/ColumnWriter.d.ts +13 -0
- package/lib/tr-grid-printer/es6/ColumnWriter.js +23 -0
- package/lib/tr-grid-printer/es6/GridPrinter.d.ts +33 -0
- package/lib/tr-grid-printer/es6/GridPrinter.js +794 -0
- package/lib/tr-grid-printer/es6/PrintTrait.d.ts +39 -0
- package/lib/tr-grid-printer/es6/PrintTrait.js +494 -0
- package/lib/tr-grid-printer/es6/SectionWriter.d.ts +57 -0
- package/lib/tr-grid-printer/es6/SectionWriter.js +238 -0
- package/lib/tr-grid-printer/es6/index.d.ts +1 -0
- package/lib/tr-grid-printer/es6/index.js +1 -0
- package/lib/tr-grid-range-bar/es6/LEDGuage.d.ts +39 -0
- package/lib/tr-grid-range-bar/es6/LEDGuage.js +261 -0
- package/lib/tr-grid-range-bar/es6/RangeBar.d.ts +56 -0
- package/lib/tr-grid-range-bar/es6/RangeBar.js +514 -0
- package/lib/tr-grid-range-bar/es6/index.d.ts +1 -0
- package/lib/tr-grid-range-bar/es6/index.js +1 -0
- package/lib/tr-grid-row-dragging/es6/RowDragging.d.ts +81 -0
- package/lib/tr-grid-row-dragging/es6/RowDragging.js +1479 -0
- package/lib/tr-grid-row-dragging/es6/index.d.ts +1 -0
- package/lib/tr-grid-row-dragging/es6/index.js +1 -0
- package/lib/tr-grid-row-filtering/es6/RowFiltering.d.ts +159 -0
- package/lib/tr-grid-row-filtering/es6/RowFiltering.js +2568 -0
- package/lib/tr-grid-row-filtering/es6/index.d.ts +1 -0
- package/lib/tr-grid-row-filtering/es6/index.js +1 -0
- package/lib/tr-grid-row-grouping/es6/RowGrouping.d.ts +123 -0
- package/lib/tr-grid-row-grouping/es6/RowGrouping.js +1728 -0
- package/lib/tr-grid-row-grouping/es6/index.d.ts +1 -0
- package/lib/tr-grid-row-grouping/es6/index.js +1 -0
- package/lib/tr-grid-row-selection/es6/RowSelection.d.ts +75 -0
- package/lib/tr-grid-row-selection/es6/RowSelection.js +1447 -0
- package/lib/tr-grid-row-selection/es6/index.d.ts +1 -0
- package/lib/tr-grid-row-selection/es6/index.js +1 -0
- package/lib/tr-grid-rowcoloring/es6/RowColoring.d.ts +64 -0
- package/lib/tr-grid-rowcoloring/es6/RowColoring.js +615 -0
- package/lib/tr-grid-rowcoloring/es6/index.d.ts +1 -0
- package/lib/tr-grid-rowcoloring/es6/index.js +1 -0
- package/lib/tr-grid-textformatting/es6/TextFormatting.d.ts +72 -0
- package/lib/tr-grid-textformatting/es6/TextFormatting.js +543 -0
- package/lib/tr-grid-textformatting/es6/index.d.ts +1 -0
- package/lib/tr-grid-textformatting/es6/index.js +1 -0
- package/lib/tr-grid-titlewrap/es6/TitleWrap.d.ts +27 -0
- package/lib/tr-grid-titlewrap/es6/TitleWrap.js +431 -0
- package/lib/tr-grid-titlewrap/es6/index.d.ts +1 -0
- package/lib/tr-grid-titlewrap/es6/index.js +1 -0
- package/lib/tr-grid-util/es6/CellPainter.d.ts +142 -0
- package/lib/tr-grid-util/es6/CellPainter.js +1183 -0
- package/lib/tr-grid-util/es6/Color.d.ts +40 -0
- package/lib/tr-grid-util/es6/Color.js +210 -0
- package/lib/tr-grid-util/es6/Conflator.d.ts +34 -0
- package/lib/tr-grid-util/es6/Conflator.js +193 -0
- package/lib/tr-grid-util/es6/CoralItems.d.ts +10 -0
- package/lib/tr-grid-util/es6/CoralItems.js +42 -0
- package/lib/tr-grid-util/es6/DateTime.d.ts +57 -0
- package/lib/tr-grid-util/es6/DateTime.js +508 -0
- package/lib/tr-grid-util/es6/Deferred.d.ts +16 -0
- package/lib/tr-grid-util/es6/Deferred.js +108 -0
- package/lib/tr-grid-util/es6/Delay.d.ts +20 -0
- package/lib/tr-grid-util/es6/Delay.js +96 -0
- package/lib/tr-grid-util/es6/Dom.d.ts +32 -0
- package/lib/tr-grid-util/es6/Dom.js +350 -0
- package/lib/tr-grid-util/es6/DragUI.d.ts +20 -0
- package/lib/tr-grid-util/es6/DragUI.js +263 -0
- package/lib/tr-grid-util/es6/ElementObserver.d.ts +12 -0
- package/lib/tr-grid-util/es6/ElementObserver.js +134 -0
- package/lib/tr-grid-util/es6/ElementWrapper.d.ts +23 -0
- package/lib/tr-grid-util/es6/ElementWrapper.js +84 -0
- package/lib/tr-grid-util/es6/ElfDate.d.ts +26 -0
- package/lib/tr-grid-util/es6/ElfDate.js +164 -0
- package/lib/tr-grid-util/es6/ElfUtil.d.ts +46 -0
- package/lib/tr-grid-util/es6/ElfUtil.js +637 -0
- package/lib/tr-grid-util/es6/EventDispatcher.d.ts +26 -0
- package/lib/tr-grid-util/es6/EventDispatcher.js +161 -0
- package/lib/tr-grid-util/es6/ExpanderIcon.d.ts +24 -0
- package/lib/tr-grid-util/es6/ExpanderIcon.js +120 -0
- package/lib/tr-grid-util/es6/ExpressionParser.d.ts +10 -0
- package/lib/tr-grid-util/es6/ExpressionParser.js +408 -0
- package/lib/tr-grid-util/es6/Ext.d.ts +10 -0
- package/lib/tr-grid-util/es6/Ext.js +52 -0
- package/lib/tr-grid-util/es6/FieldFormatter.d.ts +55 -0
- package/lib/tr-grid-util/es6/FieldFormatter.js +440 -0
- package/lib/tr-grid-util/es6/FilterBuilder.d.ts +54 -0
- package/lib/tr-grid-util/es6/FilterBuilder.js +580 -0
- package/lib/tr-grid-util/es6/FilterOperators.d.ts +56 -0
- package/lib/tr-grid-util/es6/FilterOperators.js +255 -0
- package/lib/tr-grid-util/es6/GridPlugin.d.ts +86 -0
- package/lib/tr-grid-util/es6/GridPlugin.js +1055 -0
- package/lib/tr-grid-util/es6/GroupDefinitions.d.ts +74 -0
- package/lib/tr-grid-util/es6/GroupDefinitions.js +642 -0
- package/lib/tr-grid-util/es6/Icon.d.ts +14 -0
- package/lib/tr-grid-util/es6/Icon.js +62 -0
- package/lib/tr-grid-util/es6/MouseDownTrait.d.ts +42 -0
- package/lib/tr-grid-util/es6/MouseDownTrait.js +250 -0
- package/lib/tr-grid-util/es6/MultiTableManager.d.ts +40 -0
- package/lib/tr-grid-util/es6/MultiTableManager.js +611 -0
- package/lib/tr-grid-util/es6/NumberFormatter.d.ts +85 -0
- package/lib/tr-grid-util/es6/NumberFormatter.js +528 -0
- package/lib/tr-grid-util/es6/PercentBar.d.ts +71 -0
- package/lib/tr-grid-util/es6/PercentBar.js +600 -0
- package/lib/tr-grid-util/es6/Perf.d.ts +32 -0
- package/lib/tr-grid-util/es6/Perf.js +163 -0
- package/lib/tr-grid-util/es6/Popup.d.ts +98 -0
- package/lib/tr-grid-util/es6/Popup.js +991 -0
- package/lib/tr-grid-util/es6/RangeBar.d.ts +33 -0
- package/lib/tr-grid-util/es6/RangeBar.js +260 -0
- package/lib/tr-grid-util/es6/RequestQueue.d.ts +30 -0
- package/lib/tr-grid-util/es6/RequestQueue.js +228 -0
- package/lib/tr-grid-util/es6/RowPainter.d.ts +60 -0
- package/lib/tr-grid-util/es6/RowPainter.js +448 -0
- package/lib/tr-grid-util/es6/SubTable.d.ts +78 -0
- package/lib/tr-grid-util/es6/SubTable.js +642 -0
- package/lib/tr-grid-util/es6/Table.d.ts +146 -0
- package/lib/tr-grid-util/es6/Table.js +832 -0
- package/lib/tr-grid-util/es6/TextHighlighter.d.ts +16 -0
- package/lib/tr-grid-util/es6/TextHighlighter.js +268 -0
- package/lib/tr-grid-util/es6/TickCodes.d.ts +8 -0
- package/lib/tr-grid-util/es6/TickCodes.js +33 -0
- package/lib/tr-grid-util/es6/Timer.d.ts +16 -0
- package/lib/tr-grid-util/es6/Timer.js +49 -0
- package/lib/tr-grid-util/es6/TouchProxy.d.ts +46 -0
- package/lib/tr-grid-util/es6/TouchProxy.js +212 -0
- package/lib/tr-grid-util/es6/Util.d.ts +66 -0
- package/lib/tr-grid-util/es6/Util.js +508 -0
- package/lib/tr-grid-util/es6/formula/ADCService.d.ts +11 -0
- package/lib/tr-grid-util/es6/formula/ADCService.js +72 -0
- package/lib/tr-grid-util/es6/formula/ADCSubscription.d.ts +17 -0
- package/lib/tr-grid-util/es6/formula/ADCSubscription.js +317 -0
- package/lib/tr-grid-util/es6/formula/AdFinService.d.ts +12 -0
- package/lib/tr-grid-util/es6/formula/AdFinService.js +61 -0
- package/lib/tr-grid-util/es6/formula/AdFinSubscription.d.ts +19 -0
- package/lib/tr-grid-util/es6/formula/AdFinSubscription.js +310 -0
- package/lib/tr-grid-util/es6/formula/Engine.d.ts +56 -0
- package/lib/tr-grid-util/es6/formula/Engine.js +592 -0
- package/lib/tr-grid-util/es6/formula/Formula.d.ts +68 -0
- package/lib/tr-grid-util/es6/formula/Formula.js +890 -0
- package/lib/tr-grid-util/es6/formula/IntervalSubscription.d.ts +16 -0
- package/lib/tr-grid-util/es6/formula/IntervalSubscription.js +165 -0
- package/lib/tr-grid-util/es6/formula/Realtime.d.ts +18 -0
- package/lib/tr-grid-util/es6/formula/Realtime.js +279 -0
- package/lib/tr-grid-util/es6/formula/RealtimeService.d.ts +18 -0
- package/lib/tr-grid-util/es6/formula/RealtimeService.js +203 -0
- package/lib/tr-grid-util/es6/formula/TSIService.d.ts +11 -0
- package/lib/tr-grid-util/es6/formula/TSIService.js +51 -0
- package/lib/tr-grid-util/es6/formula/TSISubscription.d.ts +18 -0
- package/lib/tr-grid-util/es6/formula/TSISubscription.js +1015 -0
- package/lib/tr-grid-util/es6/formula/VariableToken.d.ts +30 -0
- package/lib/tr-grid-util/es6/formula/VariableToken.js +314 -0
- package/lib/tr-grid-util/es6/formula/functions/AdFin.d.ts +9 -0
- package/lib/tr-grid-util/es6/formula/functions/AdFin.js +1778 -0
- package/lib/tr-grid-util/es6/formula/functions/Excel.d.ts +8 -0
- package/lib/tr-grid-util/es6/formula/functions/Excel.js +21 -0
- package/lib/tr-grid-util/es6/formula/functions/Info.d.ts +8 -0
- package/lib/tr-grid-util/es6/formula/functions/Info.js +192 -0
- package/lib/tr-grid-util/es6/formula/functions/Internal.d.ts +8 -0
- package/lib/tr-grid-util/es6/formula/functions/Internal.js +90 -0
- package/lib/tr-grid-util/es6/formula/functions/Logic.d.ts +12 -0
- package/lib/tr-grid-util/es6/formula/functions/Logic.js +176 -0
- package/lib/tr-grid-util/es6/formula/functions/Math.d.ts +18 -0
- package/lib/tr-grid-util/es6/formula/functions/Math.js +1624 -0
- package/lib/tr-grid-util/es6/formula/functions/Statistics.d.ts +18 -0
- package/lib/tr-grid-util/es6/formula/functions/Statistics.js +234 -0
- package/lib/tr-grid-util/es6/formula/functions/Text.d.ts +10 -0
- package/lib/tr-grid-util/es6/formula/functions/Text.js +676 -0
- package/lib/tr-grid-util/es6/index.d.ts +65 -0
- package/lib/tr-grid-util/es6/index.js +102 -0
- package/lib/tr-grid-util/es6/jet/Adc.d.ts +9 -0
- package/lib/tr-grid-util/es6/jet/Adc.js +268 -0
- package/lib/tr-grid-util/es6/jet/CollectionDict.d.ts +28 -0
- package/lib/tr-grid-util/es6/jet/CollectionDict.js +151 -0
- package/lib/tr-grid-util/es6/jet/DataGenerator.d.ts +136 -0
- package/lib/tr-grid-util/es6/jet/DataGenerator.js +860 -0
- package/lib/tr-grid-util/es6/jet/DataSet.d.ts +8 -0
- package/lib/tr-grid-util/es6/jet/DataSet.js +392 -0
- package/lib/tr-grid-util/es6/jet/MockArchive.d.ts +21 -0
- package/lib/tr-grid-util/es6/jet/MockArchive.js +56 -0
- package/lib/tr-grid-util/es6/jet/MockJET.d.ts +25 -0
- package/lib/tr-grid-util/es6/jet/MockJET.js +71 -0
- package/lib/tr-grid-util/es6/jet/MockQuotes.d.ts +37 -0
- package/lib/tr-grid-util/es6/jet/MockQuotes.js +199 -0
- package/lib/tr-grid-util/es6/jet/MockQuotes2.d.ts +82 -0
- package/lib/tr-grid-util/es6/jet/MockQuotes2.js +890 -0
- package/lib/tr-grid-util/es6/jet/MockRTK.d.ts +48 -0
- package/lib/tr-grid-util/es6/jet/MockRTK.js +82 -0
- package/lib/tr-grid-util/es6/jet/MockUtil.d.ts +7 -0
- package/lib/tr-grid-util/es6/jet/MockUtil.js +25 -0
- package/lib/tr-grid-util/es6/jet/index.d.ts +9 -0
- package/lib/tr-grid-util/es6/jet/index.js +18 -0
- package/lib/tr-grid-util/es6/jet/mockDataAPI.d.ts +11 -0
- package/lib/tr-grid-util/es6/jet/mockDataAPI.js +111 -0
- package/lib/tr-grid-util/es6/jsx.d.ts +223 -0
- package/lib/tr-grid-util/es6/locale/translation-de.d.ts +7 -0
- package/lib/tr-grid-util/es6/locale/translation-de.js +51 -0
- package/lib/tr-grid-util/es6/locale/translation-en.d.ts +7 -0
- package/lib/tr-grid-util/es6/locale/translation-en.js +51 -0
- package/lib/tr-grid-util/es6/locale/translation-ja.d.ts +7 -0
- package/lib/tr-grid-util/es6/locale/translation-ja.js +51 -0
- package/lib/tr-grid-util/es6/locale/translation-zh-hant.d.ts +7 -0
- package/lib/tr-grid-util/es6/locale/translation-zh-hant.js +51 -0
- package/lib/tr-grid-util/es6/locale/translation-zh.d.ts +7 -0
- package/lib/tr-grid-util/es6/locale/translation-zh.js +51 -0
- package/lib/tr-grid-util/es6/locale/translation.d.ts +11 -0
- package/lib/tr-grid-util/es6/locale/translation.js +18 -0
- package/lib/types/es6/AutoTooltip.d.ts +46 -0
- package/lib/types/es6/CellSelection.d.ts +70 -0
- package/lib/types/es6/Checkbox.d.ts +82 -0
- package/lib/types/es6/ColumnDragging.d.ts +51 -0
- package/lib/types/es6/ColumnFitter.d.ts +56 -0
- package/lib/types/es6/ColumnFormatting.d.ts +92 -0
- package/lib/types/es6/ColumnGrouping.d.ts +107 -0
- package/lib/types/es6/ColumnResizing.d.ts +68 -0
- package/lib/types/es6/ColumnSelection.d.ts +77 -0
- package/lib/types/es6/ColumnStack.d.ts +160 -0
- package/lib/types/es6/CompositeGrid/CollapsibleHeaderPlugin.d.ts +11 -0
- package/lib/types/es6/CompositeGrid/ColumnSelectionPlugin.d.ts +41 -0
- package/lib/types/es6/CompositeGrid/ColumnWidthAdjustingPlugin.d.ts +45 -0
- package/lib/types/es6/CompositeGrid/CompositeGrid.d.ts +289 -0
- package/lib/types/es6/CompositeGrid/DragAndDropTitlePlugin.d.ts +23 -0
- package/lib/types/es6/CompositeGrid/DraggableContentPlugin.d.ts +41 -0
- package/lib/types/es6/CompositeGrid/Plugin.d.ts +30 -0
- package/lib/types/es6/CompositeGrid/ResizableTitlePlugin.d.ts +32 -0
- package/lib/types/es6/CompositeGrid/RowSelectionPlugin.d.ts +44 -0
- package/lib/types/es6/CompositeGrid/TextWidthCalculator.d.ts +24 -0
- package/lib/types/es6/CompositeGrid/TreeIndentingPlugin.d.ts +46 -0
- package/lib/types/es6/CompositeGrid/index.d.ts +9 -0
- package/lib/types/es6/ConditionalColoring.d.ts +100 -0
- package/lib/types/es6/ContentWrap.d.ts +43 -0
- package/lib/types/es6/ContextMenu.d.ts +83 -0
- package/lib/types/es6/CoralButtonFormatter.d.ts +20 -0
- package/lib/types/es6/CoralCheckboxFormatter.d.ts +12 -0
- package/lib/types/es6/CoralComboBoxFormatter.d.ts +23 -0
- package/lib/types/es6/CoralIconFormatter.d.ts +21 -0
- package/lib/types/es6/CoralInputFormatter.d.ts +12 -0
- package/lib/types/es6/CoralRadioButtonFormatter.d.ts +20 -0
- package/lib/types/es6/CoralSelectFormatter.d.ts +23 -0
- package/lib/types/es6/CoralToggleFormatter.d.ts +12 -0
- package/lib/types/es6/Core/data/ColumnStats.d.ts +42 -0
- package/lib/types/es6/Core/data/DataCache.d.ts +43 -0
- package/lib/types/es6/Core/data/DataTable.d.ts +156 -0
- package/lib/types/es6/Core/data/DataView.d.ts +332 -0
- package/lib/types/es6/Core/data/Segment.d.ts +91 -0
- package/lib/types/es6/Core/data/SegmentCollection.d.ts +84 -0
- package/lib/types/es6/Core/data/WrappedView.d.ts +290 -0
- package/lib/types/es6/Core/grid/Core.d.ts +455 -0
- package/lib/types/es6/Core/grid/ILayoutGrid.d.ts +212 -0
- package/lib/types/es6/Core/grid/LayoutGrid.d.ts +37 -0
- package/lib/types/es6/Core/grid/VirtualizedLayoutGrid.d.ts +28 -0
- package/lib/types/es6/Core/grid/components/Cell.d.ts +52 -0
- package/lib/types/es6/Core/grid/components/CellFloatingPanel.d.ts +21 -0
- package/lib/types/es6/Core/grid/components/CellSpan.d.ts +18 -0
- package/lib/types/es6/Core/grid/components/CellSpans.d.ts +40 -0
- package/lib/types/es6/Core/grid/components/Column.d.ts +22 -0
- package/lib/types/es6/Core/grid/components/ElementWrapper.d.ts +127 -0
- package/lib/types/es6/Core/grid/components/HScrollbar.d.ts +28 -0
- package/lib/types/es6/Core/grid/components/Scrollbar.d.ts +63 -0
- package/lib/types/es6/Core/grid/components/StretchedCells.d.ts +17 -0
- package/lib/types/es6/Core/grid/components/VScrollbar.d.ts +18 -0
- package/lib/types/es6/Core/grid/components/VirtualItems.d.ts +12 -0
- package/lib/types/es6/Core/grid/event/EventDispatcher.d.ts +16 -0
- package/lib/types/es6/Core/grid/event/EventListeners.d.ts +34 -0
- package/lib/types/es6/Core/grid/plugins/SortableTitlePlugin.d.ts +155 -0
- package/lib/types/es6/Core/grid/util/CellBoundPainter.d.ts +16 -0
- package/lib/types/es6/Core/grid/util/Conflator.d.ts +32 -0
- package/lib/types/es6/Core/grid/util/Reverter.d.ts +14 -0
- package/lib/types/es6/Core/grid/util/SectionSettings.d.ts +79 -0
- package/lib/types/es6/Core/grid/util/SelectionList.d.ts +54 -0
- package/lib/types/es6/Core/grid/util/TrackLayout.d.ts +92 -0
- package/lib/types/es6/Core/grid/util/Virtualizer.d.ts +40 -0
- package/lib/types/es6/Core/grid/util/util.d.ts +20 -0
- package/lib/types/es6/Core/index.d.ts +79 -0
- package/lib/types/es6/Core/tr-grid-theme.d.ts +5 -0
- package/lib/types/es6/DuplexEmeraldDateTimePickerFormatter.d.ts +14 -0
- package/lib/types/es6/EFButtonFormatter.d.ts +20 -0
- package/lib/types/es6/EFCheckboxFormatter.d.ts +12 -0
- package/lib/types/es6/EFComboBoxFormatter.d.ts +23 -0
- package/lib/types/es6/EFDateTimePickerFormatter.d.ts +13 -0
- package/lib/types/es6/EFIconFormatter.d.ts +21 -0
- package/lib/types/es6/EFNumberFieldFormatter.d.ts +12 -0
- package/lib/types/es6/EFRadioButtonFormatter.d.ts +20 -0
- package/lib/types/es6/EFSelectFormatter.d.ts +23 -0
- package/lib/types/es6/EFTextFieldFormatter.d.ts +12 -0
- package/lib/types/es6/EFToggleFormatter.d.ts +12 -0
- package/lib/types/es6/EmeraldDateTimePickerFormatter.d.ts +13 -0
- package/lib/types/es6/ExtensionColumnOptions.d.ts +41 -0
- package/lib/types/es6/ExtensionOptions.d.ts +58 -0
- package/lib/types/es6/Extensions.d.ts +63 -0
- package/lib/types/es6/FilterInput.d.ts +64 -0
- package/lib/types/es6/FormatterBuilder.d.ts +26 -0
- package/lib/types/es6/GridFormatter.d.ts +63 -0
- package/lib/types/es6/HeatMap.d.ts +45 -0
- package/lib/types/es6/InCellEditing.d.ts +148 -0
- package/lib/types/es6/MenuEventAPI.d.ts +22 -0
- package/lib/types/es6/MenuItem.d.ts +41 -0
- package/lib/types/es6/NumericInputFormatter.d.ts +13 -0
- package/lib/types/es6/Pagination.d.ts +58 -0
- package/lib/types/es6/PercentBar.d.ts +60 -0
- package/lib/types/es6/PercentBarFormatter.d.ts +25 -0
- package/lib/types/es6/PopupMenu.d.ts +33 -0
- package/lib/types/es6/RangeBar.d.ts +39 -0
- package/lib/types/es6/RealtimeGrid/ColumnDefinition.d.ts +176 -0
- package/lib/types/es6/RealtimeGrid/DataConnector.d.ts +43 -0
- package/lib/types/es6/RealtimeGrid/FieldDefinition.d.ts +40 -0
- package/lib/types/es6/RealtimeGrid/Grid.d.ts +413 -0
- package/lib/types/es6/RealtimeGrid/PredefinedFormula.d.ts +16 -0
- package/lib/types/es6/RealtimeGrid/ReferenceCounter.d.ts +40 -0
- package/lib/types/es6/RealtimeGrid/RowDefSorter.d.ts +19 -0
- package/lib/types/es6/RealtimeGrid/RowDefinition.d.ts +156 -0
- package/lib/types/es6/RealtimeGrid/SnapshotFiller.d.ts +36 -0
- package/lib/types/es6/RealtimeGrid/StyleLoader.d.ts +17 -0
- package/lib/types/es6/RealtimeGrid/index.d.ts +8 -0
- package/lib/types/es6/RowColoring.d.ts +64 -0
- package/lib/types/es6/RowDragging.d.ts +81 -0
- package/lib/types/es6/RowFiltering.d.ts +159 -0
- package/lib/types/es6/RowGrouping.d.ts +123 -0
- package/lib/types/es6/RowSegmenting.d.ts +109 -0
- package/lib/types/es6/RowSelection.d.ts +75 -0
- package/lib/types/es6/SimpleImageFormatter.d.ts +21 -0
- package/lib/types/es6/SimpleInputFormatter.d.ts +12 -0
- package/lib/types/es6/SimpleLinkFormatter.d.ts +21 -0
- package/lib/types/es6/SimpleTickerFormatter.d.ts +23 -0
- package/lib/types/es6/SimpleToggleFormatter.d.ts +22 -0
- package/lib/types/es6/StatisticsRow.d.ts +68 -0
- package/lib/types/es6/TextFormatter.d.ts +12 -0
- package/lib/types/es6/TextFormatting.d.ts +72 -0
- package/lib/types/es6/TitleWrap.d.ts +27 -0
- package/lib/types/es6/Zoom.d.ts +52 -0
- package/lib/types/es6/index.d.ts +80 -0
- package/lib/types/index.d.ts +1 -0
- package/lib/utils/index.d.ts +7 -0
- package/lib/utils/index.js +7 -0
- package/lib/versions.json +37 -0
- package/lib/window-exporter.js +18 -0
- package/lib/zoom/es6/Zoom.d.ts +52 -0
- package/lib/zoom/es6/Zoom.js +438 -0
- package/lib/zoom/es6/index.d.ts +1 -0
- package/lib/zoom/es6/index.js +1 -0
- package/package.json +69 -0
@@ -0,0 +1,860 @@
|
|
1
|
+
import DataSet from "./DataSet.js";
|
2
|
+
|
3
|
+
/** @typedef {Object} DataGenerator~DataOptions
|
4
|
+
* @description Options for generating data
|
5
|
+
* @property {number=} seed Seed for randomization. If seed is not specified (default), new set of data will be generated every time. Otherwise, the same set of data will be generated.
|
6
|
+
* @property {number=} numRows Number of rows to be generated
|
7
|
+
* @property {number=} rowCount Alias to numRows
|
8
|
+
*/
|
9
|
+
|
10
|
+
/** @typedef {Object} DataGenerator~FieldInformation
|
11
|
+
* @description Information object for defining how data are generated for a specific field
|
12
|
+
* @property {string=} type Available types are number, float, boolean, set, function, and isoDate
|
13
|
+
* @property {string=} prefix Add a text prefix to the data
|
14
|
+
* @property {string=} suffix Add a text suffix to the data
|
15
|
+
* @property {number=} min Minimum value of the numeric data
|
16
|
+
* @property {number=} max Maximum value of the numeric data. This is exclusive (not included in the result).
|
17
|
+
* @property {string=} prec Precision (place number after the decimal point) of the numeric data.
|
18
|
+
* @property {string=} fixedValue Single/static/constant value
|
19
|
+
* @property {Array=} members List of possible data when the type is "set"
|
20
|
+
* @property {Function=} generate Function for generating data when the type is "function"
|
21
|
+
*/
|
22
|
+
|
23
|
+
/** @private
|
24
|
+
* @param {Object} fInfo
|
25
|
+
* @param {number=} seed
|
26
|
+
* @return {number}
|
27
|
+
*/
|
28
|
+
let _generateId = function(fInfo, seed) {
|
29
|
+
if(seed == null) {
|
30
|
+
seed = fInfo._id != null ? fInfo._id : -1;
|
31
|
+
fInfo._id = ++seed;
|
32
|
+
}
|
33
|
+
return seed || 0;
|
34
|
+
};
|
35
|
+
/** @private
|
36
|
+
* @param {Object} fInfo
|
37
|
+
* @param {number=} seed
|
38
|
+
* @return {Date}
|
39
|
+
*/
|
40
|
+
let _generateDate1 = function(fInfo, seed) {
|
41
|
+
if(seed == null) {
|
42
|
+
return randDate(6e11, 16e11, seed);
|
43
|
+
}
|
44
|
+
return new Date(1e12 + 1e9 * seed);
|
45
|
+
};
|
46
|
+
|
47
|
+
let POW10 = [1, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10];
|
48
|
+
|
49
|
+
/** @type {Object.<string, DataGenerator~DataOptions>}
|
50
|
+
* @private
|
51
|
+
*/
|
52
|
+
let _fieldInfo = {
|
53
|
+
"X_RIC_NAME": {type: "string"},
|
54
|
+
"CF_NAME": {type: "string", prefix: true, suffix: " Name"},
|
55
|
+
"CF_LAST": {type: "number", min: 0.01, max: 1000, prec: 2},
|
56
|
+
"PCTCHNG": {type: "number", min: -1, max: 1, prec: 2, suffix: "%"},
|
57
|
+
"PCTCHNG2": {type: "float", min: -20, max: 20, prec: 2, suffix: "%"},
|
58
|
+
"CF_CURR": {type: "set", members: ["USD", "GBP", "EUR", "JPY", "THB"]},
|
59
|
+
"INDICATOR": {type: "number", min: 0, max: 5},
|
60
|
+
"CF_TICK": {type: "number", min: 1, max: 3, changeOnly: true},
|
61
|
+
"PRCTCK_1": {type: "set", members: ["\u21e7", "B\u21e7", "\u2191", "B\u2191", "26", "1", "\"1\"", "-1", "\u21e9", "B\u21e9", "\u2193", "B\u2193", "27", "2", "\"2\""] },
|
62
|
+
"CF_NETCHNG": {type: "number", min: -100, max: 100},
|
63
|
+
"CF_VOLUME": {type: "number", min: 0, max: 1e7},
|
64
|
+
"CHILD_ORDER": {type: "set", ignore: true, members: [undefined]}, // eslint-disable-line
|
65
|
+
"RI_FLAG": {type: "set", members: ["R", "Q", "I", "_", ""]},
|
66
|
+
"RI_CODE": {type: "number", min: 0, max: 2},
|
67
|
+
"STATUS": {type: "number", min: 0, max: 6},
|
68
|
+
"YRLOW": {type: "number", min: 0, max: 20},
|
69
|
+
"YRHIGH": {type: "number", min: 200, max: 2000},
|
70
|
+
"CFLOW": {type: "number", min: 0, max: 20},
|
71
|
+
"CFHIGH": {type: "number", min: 200, max: 2000},
|
72
|
+
"LOW_YLD": {type: "set", members: [undefined, 0, 1, 2, 3, 4, 5, 10, 11, 15, 20]}, // eslint-disable-line
|
73
|
+
"HIGH_YLD": {type: "set", members: [undefined, 200, 300, 400, 500, 1000, 1500, 2000]}, // eslint-disable-line
|
74
|
+
"CF_YIELD": {type: "set", members: [undefined, 0, 10, 20, 30, 40, 50, 100, 200, 300, 400, 500]}, // eslint-disable-line
|
75
|
+
"TR.IPODate": {type: "isoDate", min: Date.now() - 63072000000 /* 2 years back from now */, max: Date.now()},
|
76
|
+
"TR.Volume": {type: "number", min: 2000, max: 1e7},
|
77
|
+
"TR.Price52WeekHigh": {type: "number", min: 100, max: 300, prec: 2},
|
78
|
+
"TR.Price52WeekLow": {type: "number", min: 1, max: 200, prec: 2 },
|
79
|
+
"TR.InvalidField": {type: "set", members: [undefined, null, NaN]}, // eslint-disable-line
|
80
|
+
"falsyValues": {type: "set", members: [undefined, null, NaN, 0, false, ""]}, // eslint-disable-line
|
81
|
+
"percent": {type: "number", min: 0, max: 101 },
|
82
|
+
"number_1": {type: "number", min: 1, max: 100 },
|
83
|
+
"number_2": {type: "number", min: -100, max: 100 },
|
84
|
+
"index4": {type: "number", min: 0, max: 4 },
|
85
|
+
"index5": {type: "number", min: 0, max: 5 },
|
86
|
+
"index10": {type: "number", min: 0, max: 10 },
|
87
|
+
"index100": {type: "number", min: 0, max: 100 },
|
88
|
+
"group3": {type: "set", members: ["Group_A", "Group_B", "Group_C"]},
|
89
|
+
"group4": {type: "set", members: ["Group_1", "Group_2", "Group_3", "Group_4"]},
|
90
|
+
"float_1": {type: "float", min: 0, max: 1, prec: 2 },
|
91
|
+
"float_2": {type: "float", min: 0, max: 100, prec: 2 },
|
92
|
+
"float_3": {type: "float", min: -1, max: 1, prec: 2 },
|
93
|
+
"precision4": {type: "float", min: -10, max: 10, prec: 4 },
|
94
|
+
"precision8": {type: "float", min: -100, max: 100, prec: 8 },
|
95
|
+
"boolean": {type: "boolean"},
|
96
|
+
"date": {type: "date", min: 15e11, max: 16e11 },
|
97
|
+
"date1": {type: "function", generate: _generateDate1 },
|
98
|
+
"ISODate": {type: "isoDateObject", min: Date.now() - 63072000000 /* 2 years back from now */, max: Date.now()},
|
99
|
+
"word": {type: "string", min: 1, max: 1},
|
100
|
+
"phrase": {type: "string", min: 2, max: 5},
|
101
|
+
"words": {type: "string", min: 1, max: 20},
|
102
|
+
"words1": {type: "string", min: 2, max: 8},
|
103
|
+
"words2": {type: "string", min: 3, max: 10},
|
104
|
+
"words3": {type: "string", min: 5, max: 15},
|
105
|
+
"sentence": {type: "string", min: 8, max: 20},
|
106
|
+
"id": {type: "function", hash: 0, generate: _generateId},
|
107
|
+
"companyName": {type: "set", members: DataSet.companyName },
|
108
|
+
"industry": {type: "set", members: DataSet.industry },
|
109
|
+
"market": {type: "set", members: DataSet.market },
|
110
|
+
"country": {type: "set", members: DataSet.country }
|
111
|
+
};
|
112
|
+
|
113
|
+
/** @public
|
114
|
+
* @param {string} field
|
115
|
+
* @return {!Object}
|
116
|
+
*/
|
117
|
+
let getFieldInfo = function(field) {
|
118
|
+
return _fieldInfo[field] || {};
|
119
|
+
};
|
120
|
+
|
121
|
+
/** @public
|
122
|
+
* @param {string} field
|
123
|
+
* @param {DataGenerator~FieldInformation|Function} options
|
124
|
+
*/
|
125
|
+
let addFieldInfo = function(field, options) {
|
126
|
+
if(field) {
|
127
|
+
let opt = options;
|
128
|
+
if(typeof options === "function") {
|
129
|
+
opt = {
|
130
|
+
type: "function",
|
131
|
+
generate: options
|
132
|
+
};
|
133
|
+
}
|
134
|
+
_fieldInfo[field] = opt; // WARNING: This could replace existing info
|
135
|
+
}
|
136
|
+
};
|
137
|
+
|
138
|
+
/** Return pseudo random number in the range of 0 to 1 (exclusive of 1)
|
139
|
+
* @public
|
140
|
+
* @param {number} seed
|
141
|
+
* @return {number}
|
142
|
+
*/
|
143
|
+
let pseudoRandNumber = function(seed) {
|
144
|
+
let rand = Math.sin(seed * 113) * 10000;
|
145
|
+
rand *= rand;
|
146
|
+
return rand - (rand | 0);
|
147
|
+
};
|
148
|
+
|
149
|
+
/** @private
|
150
|
+
* @param {*=} seed
|
151
|
+
* @return {number}
|
152
|
+
*/
|
153
|
+
let _getRandomNumber = function(seed) {
|
154
|
+
return (typeof seed === "number") ? pseudoRandNumber(seed) : Math.random();
|
155
|
+
};
|
156
|
+
|
157
|
+
/** Return a floating-point random number in the range min - max (inclusive of min, but not max) with prec digits of precision.
|
158
|
+
* @public
|
159
|
+
* @param {number=} min=0
|
160
|
+
* @param {number=} max=100 Exclusive value
|
161
|
+
* @param {(number|null)=} prec
|
162
|
+
* @param {number=} seed
|
163
|
+
* @return {number}
|
164
|
+
*/
|
165
|
+
let randNumber = function(min, max, prec, seed) {
|
166
|
+
if(!min) { min = 0; }
|
167
|
+
if(max == null) { max = 100; }
|
168
|
+
let v = (max - min) * _getRandomNumber(seed) + min;
|
169
|
+
|
170
|
+
if(prec > 0) {
|
171
|
+
let pow = POW10[prec];
|
172
|
+
return Math.floor(v * pow) / pow;
|
173
|
+
} else if(prec != null) {
|
174
|
+
return Math.floor(v);
|
175
|
+
} else {
|
176
|
+
return v;
|
177
|
+
}
|
178
|
+
};
|
179
|
+
|
180
|
+
/** Return an interger random number in the range min - max (inclusive of min and max).
|
181
|
+
* @public
|
182
|
+
* @param {number} min
|
183
|
+
* @param {number} max Inclusive value
|
184
|
+
* @param {number=} seed
|
185
|
+
* @return {number}
|
186
|
+
*/
|
187
|
+
let randInt = function(min, max, seed) {
|
188
|
+
return randNumber(min, max + 1, 0, seed);
|
189
|
+
};
|
190
|
+
|
191
|
+
/** Return a integer random number in the range min - max (inclusive of min, but not max).
|
192
|
+
* @public
|
193
|
+
* @param {number=} min
|
194
|
+
* @param {number=} max Exclusive value
|
195
|
+
* @param {number=} seed
|
196
|
+
* @return {number}
|
197
|
+
*/
|
198
|
+
let randBetween = function(min, max, seed) {
|
199
|
+
return randNumber(min, max, 0, seed);
|
200
|
+
};
|
201
|
+
|
202
|
+
/** Return a integer random number in the range 0 - max (exclusive of max). It is usefull in some cases for example, <br>
|
203
|
+
* if you want to get a random member of an array, <br>
|
204
|
+
* just get a random index via randIndex(ary.length).
|
205
|
+
* @public
|
206
|
+
* @param {number} max Exclusive value
|
207
|
+
* @param {number=} seed
|
208
|
+
* @return {number}
|
209
|
+
*/
|
210
|
+
let randIndex = function(max, seed) {
|
211
|
+
return randBetween(0, max, seed);
|
212
|
+
};
|
213
|
+
|
214
|
+
/** @public
|
215
|
+
* @param {number=} seed
|
216
|
+
* @return {boolean}
|
217
|
+
*/
|
218
|
+
let randBoolean = function(seed) {
|
219
|
+
return randInt(0, 1, seed) === 0;
|
220
|
+
};
|
221
|
+
|
222
|
+
/** Return a random member of set or single character in the range of A to Z
|
223
|
+
* @public
|
224
|
+
* @param {Array} set
|
225
|
+
* @param {number=} seed
|
226
|
+
* @return {*}
|
227
|
+
*/
|
228
|
+
let randMember = function(set, seed) {
|
229
|
+
var len = set ? (set.length || 0) : 0;
|
230
|
+
if(len) {
|
231
|
+
if(len === 1) {
|
232
|
+
return set[0];
|
233
|
+
}
|
234
|
+
let index = randIndex(len, seed);
|
235
|
+
return set[index];
|
236
|
+
}
|
237
|
+
return String.fromCharCode(randInt(65, 90, seed));
|
238
|
+
};
|
239
|
+
|
240
|
+
/** @public
|
241
|
+
* @param {(number|Object)=} min minimum timestamp or date object
|
242
|
+
* @param {(number|Object)=} max minimum timestamp or date object
|
243
|
+
* @param {number=} seed
|
244
|
+
* @return {Date}
|
245
|
+
*/
|
246
|
+
let randDate = function(min, max, seed) {
|
247
|
+
min = min || (Date.now() - 63072000000); //2 years back from now
|
248
|
+
if(min instanceof Date) {
|
249
|
+
min = min.getTime();
|
250
|
+
}
|
251
|
+
|
252
|
+
max = max || Date.now();
|
253
|
+
if(max instanceof Date) {
|
254
|
+
max = max.getTime();
|
255
|
+
}
|
256
|
+
|
257
|
+
let ts = randInt(0, (max - min) / 1000, seed);
|
258
|
+
return new Date(min + (ts * 1000));
|
259
|
+
};
|
260
|
+
|
261
|
+
/** @public
|
262
|
+
* @param {number=} min
|
263
|
+
* @param {number=} max Exclusive value
|
264
|
+
* @param {number=} seed
|
265
|
+
* @return {string}
|
266
|
+
*/
|
267
|
+
let randString = function(min, max, seed) {
|
268
|
+
let wordCount = (min < max) ? randBetween(min, max, seed) : min;
|
269
|
+
|
270
|
+
let ary = new Array(wordCount);
|
271
|
+
for(let i = 0; i < wordCount; ++i) {
|
272
|
+
if(seed != null) {
|
273
|
+
seed *= 1.17 * (i + 1);
|
274
|
+
}
|
275
|
+
let idx = randIndex(DataSet.words.length, seed);
|
276
|
+
ary[i] = DataSet.words[idx];
|
277
|
+
}
|
278
|
+
return ary.join(" ");
|
279
|
+
};
|
280
|
+
|
281
|
+
|
282
|
+
/** Convert 2D Array to Array of records
|
283
|
+
* @public
|
284
|
+
* @param {Array.<Array>} data2D Array of values
|
285
|
+
* @param {Array.<string|number>=} fields Keys to be mapped on the output records.
|
286
|
+
* @return {Array.<Object>} records
|
287
|
+
*/
|
288
|
+
let toRecords = function(data2D, fields) {
|
289
|
+
if(!Array.isArray(data2D)) {
|
290
|
+
return null;
|
291
|
+
}
|
292
|
+
if(!Array.isArray(fields)) {
|
293
|
+
if(fields) {
|
294
|
+
fields = [fields + ""];
|
295
|
+
} else {
|
296
|
+
fields = [];
|
297
|
+
}
|
298
|
+
}
|
299
|
+
let len = data2D.length;
|
300
|
+
let records = new Array(len);
|
301
|
+
for(let i = 0; i < len; ++i) {
|
302
|
+
let record = records[i] = {};
|
303
|
+
let columns = data2D[i];
|
304
|
+
let jLen = columns ? (columns.length || 0) : 0;
|
305
|
+
for(let j = 0; j < jLen; ++j) {
|
306
|
+
let value = columns[j];
|
307
|
+
if(value !== undefined) { // eslint-disable-line
|
308
|
+
let key = fields[j];
|
309
|
+
if(!key && key !== 0) {
|
310
|
+
key = j + "";
|
311
|
+
}
|
312
|
+
record[key] = value;
|
313
|
+
}
|
314
|
+
}
|
315
|
+
}
|
316
|
+
return records;
|
317
|
+
};
|
318
|
+
|
319
|
+
/** @public
|
320
|
+
* @return {number}
|
321
|
+
*/
|
322
|
+
let getSeed = function() {
|
323
|
+
return DataGenerator.seed;
|
324
|
+
};
|
325
|
+
|
326
|
+
/** Generate 2 dimensional array of data from the specified field and options. Note that 2D array data structure is not recommended for usage due to the position of fields/columns can be changed at runtime.
|
327
|
+
* @public
|
328
|
+
* @param {string|Array.<string>} fields
|
329
|
+
* @param {DataGenerator~DataOptions=} options
|
330
|
+
* @return {!Array.<Array>} 2D Array of data
|
331
|
+
*/
|
332
|
+
let generate = function(fields, options) {
|
333
|
+
let result = _generate2DArray(fields, options, DataGenerator.seed);
|
334
|
+
DataGenerator.seed = result.seed;
|
335
|
+
|
336
|
+
return result.data;
|
337
|
+
};
|
338
|
+
|
339
|
+
/** WARNING: This method does not modify global seed
|
340
|
+
* @public
|
341
|
+
* @param {string|Array.<string>} fields
|
342
|
+
* @param {(number|DataGenerator~DataOptions)=} options Configuration object or seed number
|
343
|
+
* @param {number=} seed
|
344
|
+
* @return {!Object} Object with the given fields as its keys
|
345
|
+
*/
|
346
|
+
let generateRecord = function(fields, options, seed) {
|
347
|
+
if(!Array.isArray(fields)) {
|
348
|
+
fields = [fields + ""];
|
349
|
+
}
|
350
|
+
let config = {};
|
351
|
+
if(options != null) {
|
352
|
+
if(typeof options === "number") {
|
353
|
+
seed = options;
|
354
|
+
} else if(options) {
|
355
|
+
config = options;
|
356
|
+
}
|
357
|
+
}
|
358
|
+
|
359
|
+
let fieldCount = fields.length;
|
360
|
+
let record = {};
|
361
|
+
for(let i = 0; i < fieldCount; ++i) {
|
362
|
+
let field = fields[i];
|
363
|
+
record[field] = _generateFieldData(field, config, seed).value;
|
364
|
+
}
|
365
|
+
return record;
|
366
|
+
};
|
367
|
+
|
368
|
+
/** @public
|
369
|
+
* @param {string|Array.<string>} fields
|
370
|
+
* @param {(number|DataGenerator~DataOptions)=} options Configuration object or number of rows
|
371
|
+
* @return {!Array.<Object>} Array of object with the given fields as its keys
|
372
|
+
*/
|
373
|
+
let generateRecords = function(fields, options) {
|
374
|
+
let result = _generate2DArray(fields, options, DataGenerator.seed);
|
375
|
+
DataGenerator.seed = result.seed;
|
376
|
+
fields = result.fields;
|
377
|
+
let fieldCount = fields.length;
|
378
|
+
let records = result.data;
|
379
|
+
for(let i = records.length; --i >= 0;) {
|
380
|
+
let ary = records[i];
|
381
|
+
let record = {};
|
382
|
+
for(let j = 0; j < fieldCount; ++j) {
|
383
|
+
let field = fields[j];
|
384
|
+
record[field] = ary[j];
|
385
|
+
}
|
386
|
+
records[i] = record;
|
387
|
+
}
|
388
|
+
return records;
|
389
|
+
};
|
390
|
+
|
391
|
+
/** WARNING: This method does not modify global seed
|
392
|
+
* @public
|
393
|
+
* @param {string} field
|
394
|
+
* @param {DataGenerator~DataOptions=} options
|
395
|
+
* @param {number=} seed
|
396
|
+
* @return {!Object} Object with value, formattedValue and other properties
|
397
|
+
*/
|
398
|
+
let generateQuoteData = function(field, options, seed) {
|
399
|
+
let fInfo = _generateFieldData(field, options, seed);
|
400
|
+
|
401
|
+
//formatting
|
402
|
+
let fmtValue = fInfo.value + "";
|
403
|
+
if(fInfo.prefix){
|
404
|
+
if(typeof fInfo.prefix == "string") {
|
405
|
+
fmtValue = fInfo.prefix + fmtValue;
|
406
|
+
} else if(options.prefix) {
|
407
|
+
fmtValue = options.prefix + " " + fmtValue;
|
408
|
+
}
|
409
|
+
}
|
410
|
+
if(fInfo.suffix){
|
411
|
+
fmtValue = fmtValue + fInfo.suffix;
|
412
|
+
}
|
413
|
+
|
414
|
+
if(fInfo.type === "string") {
|
415
|
+
fInfo.value = fmtValue; // Make sure that original value has correct data type
|
416
|
+
}
|
417
|
+
fInfo.formattedValue = fmtValue;
|
418
|
+
return fInfo;
|
419
|
+
};
|
420
|
+
|
421
|
+
/** @private
|
422
|
+
* @param {string|Array.<string>} fields
|
423
|
+
* @param {(number|Object)=} options Configuration object or number of rows
|
424
|
+
* @param {number=} seed Default seed for randomization
|
425
|
+
* @return {!Object}
|
426
|
+
*/
|
427
|
+
let _generate2DArray = function(fields, options, seed) {
|
428
|
+
let config = {};
|
429
|
+
let numRows = 0;
|
430
|
+
if(options) {
|
431
|
+
if(typeof options === "number") {
|
432
|
+
numRows = config.numRows = options;
|
433
|
+
} else {
|
434
|
+
config = options;
|
435
|
+
numRows = options.numRows || options.numRow || options.rowCount;
|
436
|
+
if(options.seed != null) {
|
437
|
+
seed = options.seed; // Seed from option object overwrite the default seed
|
438
|
+
if(seed === -1) {
|
439
|
+
seed = null; // Negative one is a special value for reseting seed
|
440
|
+
}
|
441
|
+
}
|
442
|
+
}
|
443
|
+
} // else case is "", false, 0, null, undefined
|
444
|
+
if(!numRows) {
|
445
|
+
numRows = 1;
|
446
|
+
}
|
447
|
+
|
448
|
+
if(!fields) {
|
449
|
+
fields = [""]; // Default field
|
450
|
+
} else if(!Array.isArray(fields)) {
|
451
|
+
fields = [fields + ""];
|
452
|
+
}
|
453
|
+
let fieldCount = fields.length;
|
454
|
+
|
455
|
+
let dataRows = [];
|
456
|
+
for(let i = 0; i < numRows; ++i) {
|
457
|
+
let row = [];
|
458
|
+
// Same field in a single record must be produced to the same value
|
459
|
+
for(let j = 0; j < fieldCount; ++j) {
|
460
|
+
let field = fields[j];
|
461
|
+
row.push(_generateFieldData(field, options, seed).value);
|
462
|
+
}
|
463
|
+
if(seed != null) {
|
464
|
+
++seed;
|
465
|
+
}
|
466
|
+
dataRows.push(row);
|
467
|
+
}
|
468
|
+
|
469
|
+
return {
|
470
|
+
data: dataRows, // Array.<Array>
|
471
|
+
seed: seed, // nullable
|
472
|
+
fields: fields
|
473
|
+
};
|
474
|
+
};
|
475
|
+
/** Simple hash
|
476
|
+
* @private
|
477
|
+
* @param {string} str
|
478
|
+
* @return {number}
|
479
|
+
*/
|
480
|
+
let _hash = function(str) {
|
481
|
+
let sum = 0;
|
482
|
+
let i = str ? str.length : 0;
|
483
|
+
while(--i >= 0) {
|
484
|
+
sum += str.charCodeAt(i) * (i + 0.9879);
|
485
|
+
}
|
486
|
+
return sum;
|
487
|
+
};
|
488
|
+
/** @private
|
489
|
+
* @param {string} field
|
490
|
+
* @param {DataGenerator~DataOptions=} options
|
491
|
+
* @param {number=} seed
|
492
|
+
* @return {!Object} Object with value and other properties
|
493
|
+
*/
|
494
|
+
let _generateFieldData = function(field, options, seed) {
|
495
|
+
let value;
|
496
|
+
let fInfo = getFieldInfo(field);
|
497
|
+
if(!fInfo.type) {
|
498
|
+
fInfo.type = "number";
|
499
|
+
addFieldInfo(field, fInfo);
|
500
|
+
}
|
501
|
+
if(fInfo.fixedValue !== undefined){ // eslint-disable-line
|
502
|
+
fInfo.value = fInfo.fixedValue;
|
503
|
+
return fInfo;
|
504
|
+
}
|
505
|
+
if(seed != null) {
|
506
|
+
if(fInfo.hash == null) {
|
507
|
+
fInfo.hash = _hash(field);
|
508
|
+
}
|
509
|
+
seed += fInfo.hash; // Make each field unique for the same seed
|
510
|
+
}
|
511
|
+
|
512
|
+
let min = fInfo.min != null ? fInfo.min : 100; // WARNING: Default values are non-standard values
|
513
|
+
let max = fInfo.max != null ? fInfo.max : 10000;
|
514
|
+
|
515
|
+
if(fInfo.type === "string") {
|
516
|
+
if(fInfo.min != null || fInfo.max != null) {
|
517
|
+
value = randString(min, max, seed);
|
518
|
+
} else {
|
519
|
+
if(options) {
|
520
|
+
value = options.text || "";
|
521
|
+
} else {
|
522
|
+
value = "";
|
523
|
+
}
|
524
|
+
}
|
525
|
+
} else if(fInfo.type === "set") {
|
526
|
+
value = randMember(fInfo.members, seed);
|
527
|
+
} else if(fInfo.type === "date") {
|
528
|
+
value = randDate(min, max, seed);
|
529
|
+
} else if(fInfo.type === "isoDate") {
|
530
|
+
let date = randDate(min, max, seed);
|
531
|
+
value = date.toISOString().slice(0, 10);
|
532
|
+
} else if(fInfo.type === "isoDateObject") {
|
533
|
+
value = randDate(min, max, seed);
|
534
|
+
value = new Date(value.toISOString().slice(0, 10));
|
535
|
+
} else if(fInfo.type === "boolean") {
|
536
|
+
value = randBoolean(seed);
|
537
|
+
} else if(fInfo.type === "function") {
|
538
|
+
fInfo.field = field;
|
539
|
+
value = fInfo.generate(fInfo, seed);
|
540
|
+
} else { // Default is number for all unknown type
|
541
|
+
let prec = fInfo.prec != null ? fInfo.prec : 0;
|
542
|
+
value = randNumber(min, max, prec, seed);
|
543
|
+
}
|
544
|
+
fInfo.value = value;
|
545
|
+
return fInfo;
|
546
|
+
};
|
547
|
+
|
548
|
+
|
549
|
+
/** @constructor
|
550
|
+
* @param {number=} seed
|
551
|
+
*/
|
552
|
+
let DataGenerator = function(seed) {
|
553
|
+
this._seed = seed != null ? seed : null;
|
554
|
+
};
|
555
|
+
|
556
|
+
/** @type {number=}
|
557
|
+
* @private
|
558
|
+
*/
|
559
|
+
DataGenerator.prototype._seed = null;
|
560
|
+
|
561
|
+
/** Generate 2 dimensional array of data from the specified field and options. Note that 2D array data structure is not recommended for usage due to the position of fields/columns can be changed at runtime.
|
562
|
+
* @public
|
563
|
+
* @param {string|Array.<string>} fields
|
564
|
+
* @param {(number|DataGenerator~DataOptions)=} options
|
565
|
+
* @return {!Array.<Array>} 2D Array of data
|
566
|
+
*/
|
567
|
+
DataGenerator.prototype.generate = function(fields, options) {
|
568
|
+
let result = _generate2DArray(fields, options, this._seed);
|
569
|
+
this._seed = result.seed;
|
570
|
+
|
571
|
+
return result.data;
|
572
|
+
};
|
573
|
+
|
574
|
+
/** @public
|
575
|
+
* @param {string|Array.<string>} fields
|
576
|
+
* @param {(number|Object)=} options
|
577
|
+
* @return {!Array.<Object>} Array of data object
|
578
|
+
*/
|
579
|
+
DataGenerator.prototype.generateRecords = function(fields, options) {
|
580
|
+
let result = _generate2DArray(fields, options, this._seed);
|
581
|
+
this._seed = result.seed;
|
582
|
+
fields = result.fields;
|
583
|
+
let fieldCount = fields.length;
|
584
|
+
let records = result.data;
|
585
|
+
for(let i = records.length; --i >= 0;) {
|
586
|
+
let ary = records[i];
|
587
|
+
let record = {};
|
588
|
+
for(let j = 0; j < fieldCount; ++j) {
|
589
|
+
let field = fields[j];
|
590
|
+
record[field] = ary[j];
|
591
|
+
}
|
592
|
+
records[i] = record;
|
593
|
+
}
|
594
|
+
return records;
|
595
|
+
};
|
596
|
+
|
597
|
+
/** @public
|
598
|
+
* @param {string} field
|
599
|
+
* @param {DataGenerator~DataOptions=} options
|
600
|
+
* @return {!Object} Object with value, formattedValue and other properties
|
601
|
+
*/
|
602
|
+
DataGenerator.prototype.generateQuoteData = function(field, options) {
|
603
|
+
let fInfo = generateQuoteData(field, options, this._seed);
|
604
|
+
if(this._seed != null) {
|
605
|
+
++this._seed;
|
606
|
+
}
|
607
|
+
|
608
|
+
return fInfo;
|
609
|
+
};
|
610
|
+
/** @public
|
611
|
+
* @return {?number}
|
612
|
+
*/
|
613
|
+
DataGenerator.prototype.getSeed = function() {
|
614
|
+
return this._seed;
|
615
|
+
};
|
616
|
+
|
617
|
+
/** @public
|
618
|
+
* @param {number} seed
|
619
|
+
*/
|
620
|
+
DataGenerator.prototype.setSeed = function(seed) {
|
621
|
+
if(typeof seed === "number") {
|
622
|
+
this._seed = seed;
|
623
|
+
}
|
624
|
+
};
|
625
|
+
|
626
|
+
/** @public
|
627
|
+
* @param {number=} min
|
628
|
+
* @param {number=} max Exclusive value
|
629
|
+
* @return {number}
|
630
|
+
*/
|
631
|
+
DataGenerator.prototype.randBetween = function(min, max) {
|
632
|
+
let result = randBetween(min, max, this._seed);
|
633
|
+
if(this._seed != null) {
|
634
|
+
++this._seed;
|
635
|
+
}
|
636
|
+
return result;
|
637
|
+
};
|
638
|
+
|
639
|
+
/** @public
|
640
|
+
* @param {number} min
|
641
|
+
* @param {number} max Inclusive value
|
642
|
+
* @return {number}
|
643
|
+
*/
|
644
|
+
DataGenerator.prototype.randInt = function(min, max) {
|
645
|
+
let result = randInt(min, max, this._seed);
|
646
|
+
if(this._seed != null) {
|
647
|
+
++this._seed;
|
648
|
+
}
|
649
|
+
return result;
|
650
|
+
};
|
651
|
+
|
652
|
+
/** @public
|
653
|
+
* @param {number} max Exclusive value
|
654
|
+
* @return {number}
|
655
|
+
*/
|
656
|
+
DataGenerator.prototype.randIndex = function(max) {
|
657
|
+
let result = randIndex(max, this._seed);
|
658
|
+
if(this._seed != null) {
|
659
|
+
++this._seed;
|
660
|
+
}
|
661
|
+
return result;
|
662
|
+
};
|
663
|
+
|
664
|
+
/** @public
|
665
|
+
* @param {number=} min=0
|
666
|
+
* @param {number=} max=100 Exclusive value
|
667
|
+
* @param {(number|null)=} prec
|
668
|
+
* @return {number}
|
669
|
+
*/
|
670
|
+
DataGenerator.prototype.randNumber = function(min, max, prec) {
|
671
|
+
let result = randNumber(min, max, prec, this._seed);
|
672
|
+
if(this._seed != null) {
|
673
|
+
++this._seed;
|
674
|
+
}
|
675
|
+
return result;
|
676
|
+
};
|
677
|
+
|
678
|
+
/** @public
|
679
|
+
* @return {boolean}
|
680
|
+
*/
|
681
|
+
DataGenerator.prototype.randBoolean = function() {
|
682
|
+
let result = randBoolean(this._seed);
|
683
|
+
if(this._seed != null) {
|
684
|
+
++this._seed;
|
685
|
+
}
|
686
|
+
return result;
|
687
|
+
};
|
688
|
+
|
689
|
+
/** @public
|
690
|
+
* @param {Array} set
|
691
|
+
* @return {*}
|
692
|
+
*/
|
693
|
+
DataGenerator.prototype.randMember = function(set) {
|
694
|
+
let result = randMember(set, this._seed);
|
695
|
+
if(this._seed != null) {
|
696
|
+
++this._seed;
|
697
|
+
}
|
698
|
+
return result;
|
699
|
+
};
|
700
|
+
|
701
|
+
/** @public
|
702
|
+
* @param {(number|Object)=} min minimum timestamp or date object
|
703
|
+
* @param {(number|Object)=} max minimum timestamp or date object
|
704
|
+
* @return {Date}
|
705
|
+
*/
|
706
|
+
DataGenerator.prototype.randDate = function(min, max) {
|
707
|
+
let result = randDate(min, max, this._seed);
|
708
|
+
if(this._seed != null) {
|
709
|
+
++this._seed;
|
710
|
+
}
|
711
|
+
return result;
|
712
|
+
};
|
713
|
+
|
714
|
+
/** @public
|
715
|
+
* @param {number=} min
|
716
|
+
* @param {number=} max Exclusive value
|
717
|
+
* @return {string}
|
718
|
+
*/
|
719
|
+
DataGenerator.prototype.randString = function(min, max) {
|
720
|
+
let result = randString(min, max, this._seed);
|
721
|
+
if(this._seed != null) {
|
722
|
+
++this._seed;
|
723
|
+
}
|
724
|
+
return result;
|
725
|
+
};
|
726
|
+
|
727
|
+
/** @type {?number}
|
728
|
+
* @public
|
729
|
+
* @ignore
|
730
|
+
*/
|
731
|
+
DataGenerator.seed = null;
|
732
|
+
/** Generate 2 dimensional array of data from the specified field and options. Note that 2D array data structure is not recommended for usage due to the position of fields/columns can be changed at runtime.
|
733
|
+
* @public
|
734
|
+
* @function
|
735
|
+
* @param {string|Array.<string>} fields
|
736
|
+
* @param {DataGenerator~DataOptions=} options
|
737
|
+
* @return {!Array.<Array>} 2D Array of data
|
738
|
+
*/
|
739
|
+
DataGenerator.generate = generate;
|
740
|
+
/** @public
|
741
|
+
* @function
|
742
|
+
* @param {string|Array.<string>} fields
|
743
|
+
* @param {DataGenerator~DataOptions=} options
|
744
|
+
* @return {Object} Object with the given fields as its keys
|
745
|
+
*/
|
746
|
+
DataGenerator.generateRecord = generateRecord;
|
747
|
+
/** @public
|
748
|
+
* @function
|
749
|
+
* @param {string|Array.<string>} fields
|
750
|
+
* @param {(number|DataGenerator~DataOptions)=} options Configuration object or number of rows
|
751
|
+
* @return {!Array.<Object>} Array of object with the given fields as its keys
|
752
|
+
*/
|
753
|
+
DataGenerator.generateRecords = generateRecords;
|
754
|
+
/** @public
|
755
|
+
* @function
|
756
|
+
* @param {string} field
|
757
|
+
* @param {DataGenerator~FieldInformation|Function} options
|
758
|
+
*/
|
759
|
+
DataGenerator.addFieldInfo = addFieldInfo;
|
760
|
+
/** Return a floating-point random number in the range min - max (inclusive of min, but not max) with prec digits of precision.
|
761
|
+
* @public
|
762
|
+
* @function
|
763
|
+
* @param {number=} min=0
|
764
|
+
* @param {number=} max=100 Exclusive value
|
765
|
+
* @param {(number|null)=} prec
|
766
|
+
* @param {number=} seed
|
767
|
+
* @return {number}
|
768
|
+
*/
|
769
|
+
DataGenerator.randNumber = randNumber;
|
770
|
+
/** Return an interger random number in the range min - max (inclusive of min and max).
|
771
|
+
* @public
|
772
|
+
* @function
|
773
|
+
* @param {number} min
|
774
|
+
* @param {number} max Inclusive value
|
775
|
+
* @param {number=} seed
|
776
|
+
* @return {number}
|
777
|
+
*/
|
778
|
+
DataGenerator.randInt = randInt;
|
779
|
+
/** Return a integer random number in the range min - max (inclusive of min, but not max).
|
780
|
+
* @public
|
781
|
+
* @function
|
782
|
+
* @param {number=} min
|
783
|
+
* @param {number=} max Exclusive value
|
784
|
+
* @param {number=} seed
|
785
|
+
* @return {number}
|
786
|
+
*/
|
787
|
+
DataGenerator.randBetween = randBetween;
|
788
|
+
/** Return a integer random number in the range 0 - max <br>
|
789
|
+
* (exclusive of max). It is usefull in some cases for example, <br>
|
790
|
+
* if you want to get a random member of an array, <br>
|
791
|
+
* just get a random index via randIndex(ary.length).
|
792
|
+
* @public
|
793
|
+
* @function
|
794
|
+
* @param {number} max Exclusive value
|
795
|
+
* @param {number=} seed
|
796
|
+
* @return {number}
|
797
|
+
*/
|
798
|
+
DataGenerator.randIndex = randIndex;
|
799
|
+
/** @public
|
800
|
+
* @function
|
801
|
+
* @param {number=} seed
|
802
|
+
* @return {boolean}
|
803
|
+
*/
|
804
|
+
DataGenerator.randBoolean = randBoolean;
|
805
|
+
/** Return a random member of set or single character in the range of A to Z
|
806
|
+
* @public
|
807
|
+
* @function
|
808
|
+
* @param {Array} set
|
809
|
+
* @param {number=} seed
|
810
|
+
* @return {*}
|
811
|
+
*/
|
812
|
+
DataGenerator.randMember = randMember;
|
813
|
+
/** @public
|
814
|
+
* @function
|
815
|
+
* @param {(number|Object)=} min minimum timestamp or date object
|
816
|
+
* @param {(number|Object)=} max minimum timestamp or date object
|
817
|
+
* @param {number=} seed
|
818
|
+
* @return {Date}
|
819
|
+
*/
|
820
|
+
DataGenerator.randDate = randDate;
|
821
|
+
/** @public
|
822
|
+
* @function
|
823
|
+
* @param {number=} min
|
824
|
+
* @param {number=} max
|
825
|
+
* @param {string=} subType "w"/"W" = word, "s"/"S" = sentence
|
826
|
+
* @param {number=} seed
|
827
|
+
* @return {string}
|
828
|
+
*/
|
829
|
+
DataGenerator.randString = randString;
|
830
|
+
|
831
|
+
/** Convert 2D Array to Array of records
|
832
|
+
* @public
|
833
|
+
* @function
|
834
|
+
* @param {Array.<Array>} data2D Array of values
|
835
|
+
* @param {Array.<string>=} fields Keys to be mapped on the output records.
|
836
|
+
* @return {Array.<Object>} records
|
837
|
+
*/
|
838
|
+
DataGenerator.toRecords = toRecords;
|
839
|
+
|
840
|
+
|
841
|
+
export default DataGenerator;
|
842
|
+
export {
|
843
|
+
DataGenerator,
|
844
|
+
addFieldInfo,
|
845
|
+
getSeed,
|
846
|
+
generate,
|
847
|
+
generateRecord,
|
848
|
+
generateRecords,
|
849
|
+
generateQuoteData,
|
850
|
+
randBetween,
|
851
|
+
randInt,
|
852
|
+
randIndex,
|
853
|
+
randNumber,
|
854
|
+
randBoolean,
|
855
|
+
randMember,
|
856
|
+
randDate,
|
857
|
+
randString,
|
858
|
+
pseudoRandNumber,
|
859
|
+
toRecords
|
860
|
+
};
|