@keen.io/data-export
Advanced tools
Comparing version 1.2.3 to 1.2.4
@@ -6,2 +6,13 @@ # Change Log | ||
## [1.2.4](https://github.com/keen/keen/compare/@keen.io/data-export@1.2.3...@keen.io/data-export@1.2.4) (2021-10-07) | ||
### Bug Fixes | ||
* 🐛 table raw csv extraction ([2be4773](https://github.com/keen/keen/commit/2be477306e498a56b90ec28d159f20b637df7cb8)) | ||
## [1.2.3](https://github.com/keen/keen/compare/@keen.io/data-export@1.2.2...@keen.io/data-export@1.2.3) (2021-10-07) | ||
@@ -8,0 +19,0 @@ |
import { VisualizationExport, RawExport, ExportOutput, CSVExport } from './types'; | ||
declare class DataExport { | ||
static exportToCSV(payload: CSVExport): string; | ||
static exportRawData({ keys, data }: RawExport): ExportOutput; | ||
static exportRawData({ query, keys, data }: RawExport): ExportOutput; | ||
static exportVisualizationData(payload: VisualizationExport): ExportOutput; | ||
} | ||
export default DataExport; |
@@ -13,9 +13,9 @@ import { __read, __spread } from "tslib"; | ||
DataExport.exportRawData = function (_a) { | ||
var keys = _a.keys, data = _a.data; | ||
var columns = __spread([KEEN_KEY], keys); | ||
var query = _a.query, keys = _a.keys, data = _a.data; | ||
var analysisType = query.analysis_type; | ||
var isDataSelection = ['extraction', 'select_unique'].includes(analysisType); | ||
var columns = __spread((isDataSelection ? [] : [KEEN_KEY]), keys); | ||
return __spread([ | ||
columns | ||
], data.map(function (item) { return __spread([ | ||
item[KEEN_KEY] | ||
], keys.map(function (keyName) { return item[keyName]; })); })); | ||
], data.map(function (item) { return __spread((isDataSelection ? [] : [item[KEEN_KEY]]), keys.map(function (keyName) { return item[keyName]; })); })); | ||
}; | ||
@@ -22,0 +22,0 @@ DataExport.exportVisualizationData = function (payload) { |
@@ -15,2 +15,3 @@ import { Widgets } from '@keen.io/widgets'; | ||
export declare type RawExport = { | ||
query: Query; | ||
data: Record<string, any>; | ||
@@ -17,0 +18,0 @@ keys: string[]; |
{ | ||
"name": "@keen.io/data-export", | ||
"version": "1.2.3", | ||
"version": "1.2.4", | ||
"description": "Keen data export utilities", | ||
@@ -40,3 +40,3 @@ "author": "Keen.IO <team@keen.io> (https://keen.io/)", | ||
}, | ||
"gitHead": "858dbaa6e6a92f1dc427f89b03e6008691c9957b" | ||
"gitHead": "4183b648a140e2dba935749e9bbcaa845f38be93" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
34718
621