survey-analytics 1.10.4 → 1.10.5
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/package.json +2 -2
- package/survey-analytics-datatables.types/tables/table.d.ts +36 -4
- package/survey-analytics-tabulator.types/tables/table.d.ts +36 -4
- package/survey-analytics-tabulator.types/tables/tabulator.d.ts +2 -2
- package/survey.analytics.css +1 -1
- package/survey.analytics.datatables.css +1 -1
- package/survey.analytics.datatables.js +21 -14
- package/survey.analytics.datatables.min.css +1 -1
- package/survey.analytics.datatables.min.js +2 -2
- package/survey.analytics.js +1 -1
- package/survey.analytics.min.css +1 -1
- package/survey.analytics.min.js +1 -1
- package/survey.analytics.tabulator.css +1 -1
- package/survey.analytics.tabulator.js +54 -14
- package/survey.analytics.tabulator.min.css +1 -1
- package/survey.analytics.tabulator.min.js +2 -2
package/package.json
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"lint": "eslint ./src --quiet",
|
|
21
21
|
"pre-push-check": "npm run lint && npm run test"
|
|
22
22
|
},
|
|
23
|
-
"version": "1.10.
|
|
23
|
+
"version": "1.10.5",
|
|
24
24
|
"name": "survey-analytics",
|
|
25
25
|
"description": "SurveyJS analytics Library.",
|
|
26
26
|
"main": "survey.analytics.js",
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
"peerDependencies": {
|
|
108
108
|
"@types/datatables.net": "^1.10.21",
|
|
109
109
|
"@types/plotly.js-dist-min": "^2.3.0",
|
|
110
|
-
"survey-core": "1.10.
|
|
110
|
+
"survey-core": "1.10.5"
|
|
111
111
|
},
|
|
112
112
|
"husky": {
|
|
113
113
|
"hooks": {
|
|
@@ -19,11 +19,42 @@ export interface ITableOptions {
|
|
|
19
19
|
displayValue: any;
|
|
20
20
|
}) => void;
|
|
21
21
|
}
|
|
22
|
+
export type TabulatorFilter = {
|
|
23
|
+
field: string;
|
|
24
|
+
type: string;
|
|
25
|
+
value: any;
|
|
26
|
+
};
|
|
27
|
+
export type TabulatorSortOrder = {
|
|
28
|
+
field: string;
|
|
29
|
+
direction: undefined | "asc" | "desc";
|
|
30
|
+
};
|
|
31
|
+
export type GetDataUsingCallbackFn = (params: {
|
|
32
|
+
filter?: Array<TabulatorFilter>;
|
|
33
|
+
sort?: Array<TabulatorSortOrder>;
|
|
34
|
+
offset?: number;
|
|
35
|
+
limit?: number;
|
|
36
|
+
callback?: (response: {
|
|
37
|
+
data: Array<Object>;
|
|
38
|
+
totalCount: number;
|
|
39
|
+
error?: any;
|
|
40
|
+
}) => void;
|
|
41
|
+
}) => void;
|
|
42
|
+
export type GetDataUsingPromiseFn = (params: {
|
|
43
|
+
filter?: Array<TabulatorFilter>;
|
|
44
|
+
sort?: Array<TabulatorSortOrder>;
|
|
45
|
+
offset?: number;
|
|
46
|
+
limit?: number;
|
|
47
|
+
}) => Promise<{
|
|
48
|
+
data: Array<Object>;
|
|
49
|
+
totalCount: number;
|
|
50
|
+
error?: any;
|
|
51
|
+
}>;
|
|
52
|
+
export type GetDataFn = GetDataUsingCallbackFn | GetDataUsingPromiseFn;
|
|
22
53
|
export declare class TableEvent extends EventBase<Table> {
|
|
23
54
|
}
|
|
24
55
|
export declare abstract class Table {
|
|
25
56
|
protected _survey: SurveyModel;
|
|
26
|
-
protected data: Array<Object
|
|
57
|
+
protected data: Array<Object> | GetDataFn;
|
|
27
58
|
protected _options: ITableOptions;
|
|
28
59
|
protected _columnsData: Array<IColumnData>;
|
|
29
60
|
static showFilesAsImages: boolean;
|
|
@@ -32,7 +63,7 @@ export declare abstract class Table {
|
|
|
32
63
|
protected extensions: TableExtensions;
|
|
33
64
|
private haveCommercialLicense;
|
|
34
65
|
protected _columns: Array<IColumn>;
|
|
35
|
-
constructor(_survey: SurveyModel, data: Array<Object
|
|
66
|
+
constructor(_survey: SurveyModel, data: Array<Object> | GetDataFn, _options?: ITableOptions, _columnsData?: Array<IColumnData>);
|
|
36
67
|
protected renderResult: HTMLElement;
|
|
37
68
|
protected currentPageSize: number;
|
|
38
69
|
protected currentPageNumber: number;
|
|
@@ -46,7 +77,7 @@ export declare abstract class Table {
|
|
|
46
77
|
onColumnsLocationChanged: TableEvent;
|
|
47
78
|
onRowRemoved: TableEvent;
|
|
48
79
|
renderDetailActions: (container: HTMLElement, row: TableRow) => HTMLElement;
|
|
49
|
-
getData(): Object[];
|
|
80
|
+
getData(): Object[] | GetDataFn;
|
|
50
81
|
get survey(): SurveyModel;
|
|
51
82
|
get options(): ITableOptions;
|
|
52
83
|
abstract applyFilter(value: string): void;
|
|
@@ -74,7 +105,8 @@ export declare abstract class Table {
|
|
|
74
105
|
set columns(columns: Array<IColumn>);
|
|
75
106
|
get isInitTableDataProcessing(): boolean;
|
|
76
107
|
private isInitTableDataProcessingValue;
|
|
77
|
-
protected
|
|
108
|
+
protected processLoadedDataItem(item: any): any;
|
|
109
|
+
protected initTableData(data: Array<any> | GetDataFn): void;
|
|
78
110
|
moveColumn(from: number, to: number): void;
|
|
79
111
|
setColumnLocation(columnName: string, location: QuestionLocation): void;
|
|
80
112
|
getColumnByName(columnName: string): IColumn;
|
|
@@ -19,11 +19,42 @@ export interface ITableOptions {
|
|
|
19
19
|
displayValue: any;
|
|
20
20
|
}) => void;
|
|
21
21
|
}
|
|
22
|
+
export type TabulatorFilter = {
|
|
23
|
+
field: string;
|
|
24
|
+
type: string;
|
|
25
|
+
value: any;
|
|
26
|
+
};
|
|
27
|
+
export type TabulatorSortOrder = {
|
|
28
|
+
field: string;
|
|
29
|
+
direction: undefined | "asc" | "desc";
|
|
30
|
+
};
|
|
31
|
+
export type GetDataUsingCallbackFn = (params: {
|
|
32
|
+
filter?: Array<TabulatorFilter>;
|
|
33
|
+
sort?: Array<TabulatorSortOrder>;
|
|
34
|
+
offset?: number;
|
|
35
|
+
limit?: number;
|
|
36
|
+
callback?: (response: {
|
|
37
|
+
data: Array<Object>;
|
|
38
|
+
totalCount: number;
|
|
39
|
+
error?: any;
|
|
40
|
+
}) => void;
|
|
41
|
+
}) => void;
|
|
42
|
+
export type GetDataUsingPromiseFn = (params: {
|
|
43
|
+
filter?: Array<TabulatorFilter>;
|
|
44
|
+
sort?: Array<TabulatorSortOrder>;
|
|
45
|
+
offset?: number;
|
|
46
|
+
limit?: number;
|
|
47
|
+
}) => Promise<{
|
|
48
|
+
data: Array<Object>;
|
|
49
|
+
totalCount: number;
|
|
50
|
+
error?: any;
|
|
51
|
+
}>;
|
|
52
|
+
export type GetDataFn = GetDataUsingCallbackFn | GetDataUsingPromiseFn;
|
|
22
53
|
export declare class TableEvent extends EventBase<Table> {
|
|
23
54
|
}
|
|
24
55
|
export declare abstract class Table {
|
|
25
56
|
protected _survey: SurveyModel;
|
|
26
|
-
protected data: Array<Object
|
|
57
|
+
protected data: Array<Object> | GetDataFn;
|
|
27
58
|
protected _options: ITableOptions;
|
|
28
59
|
protected _columnsData: Array<IColumnData>;
|
|
29
60
|
static showFilesAsImages: boolean;
|
|
@@ -32,7 +63,7 @@ export declare abstract class Table {
|
|
|
32
63
|
protected extensions: TableExtensions;
|
|
33
64
|
private haveCommercialLicense;
|
|
34
65
|
protected _columns: Array<IColumn>;
|
|
35
|
-
constructor(_survey: SurveyModel, data: Array<Object
|
|
66
|
+
constructor(_survey: SurveyModel, data: Array<Object> | GetDataFn, _options?: ITableOptions, _columnsData?: Array<IColumnData>);
|
|
36
67
|
protected renderResult: HTMLElement;
|
|
37
68
|
protected currentPageSize: number;
|
|
38
69
|
protected currentPageNumber: number;
|
|
@@ -46,7 +77,7 @@ export declare abstract class Table {
|
|
|
46
77
|
onColumnsLocationChanged: TableEvent;
|
|
47
78
|
onRowRemoved: TableEvent;
|
|
48
79
|
renderDetailActions: (container: HTMLElement, row: TableRow) => HTMLElement;
|
|
49
|
-
getData(): Object[];
|
|
80
|
+
getData(): Object[] | GetDataFn;
|
|
50
81
|
get survey(): SurveyModel;
|
|
51
82
|
get options(): ITableOptions;
|
|
52
83
|
abstract applyFilter(value: string): void;
|
|
@@ -74,7 +105,8 @@ export declare abstract class Table {
|
|
|
74
105
|
set columns(columns: Array<IColumn>);
|
|
75
106
|
get isInitTableDataProcessing(): boolean;
|
|
76
107
|
private isInitTableDataProcessingValue;
|
|
77
|
-
protected
|
|
108
|
+
protected processLoadedDataItem(item: any): any;
|
|
109
|
+
protected initTableData(data: Array<any> | GetDataFn): void;
|
|
78
110
|
moveColumn(from: number, to: number): void;
|
|
79
111
|
setColumnLocation(columnName: string, location: QuestionLocation): void;
|
|
80
112
|
getColumnByName(columnName: string): IColumn;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ITableOptions, Table, TableRow } from "./table";
|
|
1
|
+
import { GetDataFn, ITableOptions, Table, TableRow } from "./table";
|
|
2
2
|
import { SurveyModel } from "survey-core";
|
|
3
3
|
import { IColumnData, QuestionLocation } from "./config";
|
|
4
4
|
interface ITabulatorOptions extends ITableOptions {
|
|
@@ -41,7 +41,7 @@ export declare const defaultDownloadOptions: {
|
|
|
41
41
|
export declare const defaultOptions: ITabulatorOptions;
|
|
42
42
|
export declare class Tabulator extends Table {
|
|
43
43
|
static set haveCommercialLicense(val: boolean);
|
|
44
|
-
constructor(survey: SurveyModel, data: Array<Object
|
|
44
|
+
constructor(survey: SurveyModel, data: Array<Object> | GetDataFn, options?: ITabulatorOptions, _columnsData?: Array<IColumnData>);
|
|
45
45
|
private readonly COLUMN_MIN_WIDTH;
|
|
46
46
|
tabulatorTables: any;
|
|
47
47
|
private tableContainer;
|
package/survey.analytics.css
CHANGED