@formio/reporting 2.0.0 → 2.0.1-rc.2
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/lib/Report.d.ts +1 -0
- package/lib/ReportForm.d.ts +1 -0
- package/lib/components/ReportingControls/ReportingControls.d.ts +4 -3
- package/lib/components/ReportingGrid/ReportingGrid.d.ts +6 -4
- package/lib/utils/AggregationOperators/AggregationOperator.d.ts +1 -1
- package/lib/utils/AggregationOperators/Concat.d.ts +2 -2
- package/lib/utils/AggregationOperators/DateDiff.d.ts +1 -1
- package/lib/utils/AggregationOperators/Divide.d.ts +1 -1
- package/lib/utils/AggregationOperators/Multiply.d.ts +1 -1
- package/lib/utils/AggregationOperators/Subtract.d.ts +1 -1
- package/lib/utils/AggregationOperators/Sum.d.ts +1 -1
- package/lib/utils/AggregationOperators/index.d.ts +2 -1
- package/lib/utils/configurationFormUtils.d.ts +33 -12
- package/lib/utils/controlsUtils.d.ts +6 -2
- package/lib/utils/index.d.ts +8 -4
- package/lib/utils/utils.d.ts +3 -2
- package/package.json +4 -4
- package/reporting.js +1 -1
package/lib/Report.d.ts
CHANGED
package/lib/ReportForm.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
declare const ReportingControls_base: any;
|
|
2
2
|
export default class ReportingControls extends ReportingControls_base {
|
|
3
|
+
static [x: string]: any;
|
|
3
4
|
static schema(...extend: any[]): any;
|
|
4
5
|
static get builderInfo(): {};
|
|
5
6
|
constructor(component: any, options: any, data: any);
|
|
@@ -9,21 +10,21 @@ export default class ReportingControls extends ReportingControls_base {
|
|
|
9
10
|
clearFilters: string;
|
|
10
11
|
performAction: string;
|
|
11
12
|
};
|
|
12
|
-
get singleFilterOperators():
|
|
13
|
+
get singleFilterOperators(): string[];
|
|
13
14
|
get reportingConfig(): any;
|
|
14
15
|
get reportingForms(): any;
|
|
15
16
|
get reportingId(): any;
|
|
16
17
|
get formioGrid(): any;
|
|
17
18
|
get controlsSaveKey(): string;
|
|
18
19
|
attach(element: any): any;
|
|
19
|
-
getFilterComponents(): any;
|
|
20
|
+
getFilterComponents(): any[];
|
|
20
21
|
getFilterValueCompFromGridComp(gridComp: any, filter: any, ind: any): any;
|
|
21
22
|
toggleFilterClass(filterInstance: any): void;
|
|
22
23
|
getTabs(): any[];
|
|
23
24
|
formatFilterValue(filterSettings: any, value: any): any;
|
|
24
25
|
getActionComponents(applyActionFor: any): any;
|
|
25
26
|
setGridFilters(filters?: {}): void;
|
|
26
|
-
getGridFilters():
|
|
27
|
+
getGridFilters(): {} | Exclude<this["formioGrid.options.fetchProvider.defaultFilters"], undefined>;
|
|
27
28
|
downloadPDF(action: any): Promise<void>;
|
|
28
29
|
exportCSV(action: any): void;
|
|
29
30
|
onApplyColumns(): void;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { Utils } from '@formio/js';
|
|
1
2
|
import ReportingUrlFetchProvider from '../../providers/ReportingUrlFetchProvider';
|
|
2
3
|
declare const ReportingGrid_base: any;
|
|
3
4
|
export default class ReportingGrid extends ReportingGrid_base {
|
|
5
|
+
static [x: string]: any;
|
|
4
6
|
static schema(...extend: any[]): any;
|
|
5
7
|
static get builderInfo(): {};
|
|
6
8
|
formioGrid: any;
|
|
@@ -12,13 +14,13 @@ export default class ReportingGrid extends ReportingGrid_base {
|
|
|
12
14
|
get reportingConfig(): any;
|
|
13
15
|
get reportingForms(): any;
|
|
14
16
|
get reportingId(): any;
|
|
15
|
-
get visibility():
|
|
17
|
+
get visibility(): {};
|
|
16
18
|
get fetchProvider(): ReportingUrlFetchProvider;
|
|
17
19
|
get iteratableRows(): any[];
|
|
18
20
|
addReportingColumnProperties(comp: any, columnSettings: any): void;
|
|
19
21
|
getCalculatedColumnSchema(columnSettings: any): any;
|
|
20
|
-
formatGridComponent(comp: any, columnSettings: any): any
|
|
21
|
-
isDefaultColumn(columnReportingSettings: any):
|
|
22
|
+
formatGridComponent(comp: any, columnSettings: any): Utils._.Omit<any, "logic" | "prefix" | "suffix" | "action" | "defaultValue" | "conditional" | "hideLabel" | "calculateValue" | "validate" | "hidden" | "customConditional">;
|
|
23
|
+
isDefaultColumn(columnReportingSettings: any): boolean;
|
|
22
24
|
addColumnsFromReportingForms(allColumns: any, fieldsGroupedByForm: any): void;
|
|
23
25
|
checkDeconstructions(fieldSettings: any): void;
|
|
24
26
|
checkDeconstructionRequirement(formId: any, compPath: any): void;
|
|
@@ -41,7 +43,7 @@ export default class ReportingGrid extends ReportingGrid_base {
|
|
|
41
43
|
resetValue: () => void;
|
|
42
44
|
};
|
|
43
45
|
customFilters(component: any): any;
|
|
44
|
-
getGridColumns(): any;
|
|
46
|
+
getGridColumns(): any[];
|
|
45
47
|
get preview(): any;
|
|
46
48
|
initFormioGrid(FormioGrid: any): Promise<any>;
|
|
47
49
|
transformFetchedData(responseData: any): any;
|
|
@@ -9,7 +9,7 @@ export default class AggregationOperator implements IAggregationOperator {
|
|
|
9
9
|
static getDisplayField(settings: any, reportingConfig?: any): {
|
|
10
10
|
type: string;
|
|
11
11
|
};
|
|
12
|
-
static getFieldArgs(settings: any): any;
|
|
12
|
+
static getFieldArgs(settings: any): any[];
|
|
13
13
|
static get acceptedValueTypes(): any[];
|
|
14
14
|
static get operatorTitle(): string;
|
|
15
15
|
static get aggregatedGroupOperator(): boolean;
|
|
@@ -4,13 +4,13 @@ export default class Concat extends AggregationOperator {
|
|
|
4
4
|
static getDisplayField(settings: any): {
|
|
5
5
|
type: string;
|
|
6
6
|
};
|
|
7
|
-
static getFieldArgs(settings: any): any;
|
|
7
|
+
static getFieldArgs(settings: any): any[];
|
|
8
8
|
static get operatorTitle(): string;
|
|
9
9
|
static get acceptedValueTypes(): any[];
|
|
10
10
|
static get aggregatedGroupOperator(): boolean;
|
|
11
11
|
static get aggregatedCalculationOperator(): boolean;
|
|
12
12
|
static get calculationArgs(): string[];
|
|
13
13
|
getRequest(settings: any): {
|
|
14
|
-
$concat: any;
|
|
14
|
+
$concat: any[];
|
|
15
15
|
};
|
|
16
16
|
}
|
|
@@ -4,7 +4,7 @@ export default class DateDiff extends AggregationOperator {
|
|
|
4
4
|
static getDisplayField(settings: any, reportingConfig?: any): {
|
|
5
5
|
type: string;
|
|
6
6
|
};
|
|
7
|
-
static getFieldArgs(settings: any): any;
|
|
7
|
+
static getFieldArgs(settings: any): any[];
|
|
8
8
|
static get operatorTitle(): string;
|
|
9
9
|
static get acceptedValueTypes(): any[];
|
|
10
10
|
static get aggregatedGroupOperator(): boolean;
|
|
@@ -4,7 +4,7 @@ export default class Divide extends AggregationOperator {
|
|
|
4
4
|
static getDisplayField(settings: any, reportingConfig?: any): {
|
|
5
5
|
type: string;
|
|
6
6
|
};
|
|
7
|
-
static getFieldArgs(settings: any): any;
|
|
7
|
+
static getFieldArgs(settings: any): any[];
|
|
8
8
|
static get operatorTitle(): string;
|
|
9
9
|
static get aggregatedGroupOperator(): boolean;
|
|
10
10
|
static get acceptedValueTypes(): any[];
|
|
@@ -8,7 +8,7 @@ export default class Subtract extends AggregationOperator {
|
|
|
8
8
|
static get aggregatedGroupOperator(): boolean;
|
|
9
9
|
static get acceptedValueTypes(): any[];
|
|
10
10
|
static get aggregatedCalculationOperator(): boolean;
|
|
11
|
-
static getFieldArgs(settings: any): any;
|
|
11
|
+
static getFieldArgs(settings: any): any[];
|
|
12
12
|
static get calculationArgs(): string[];
|
|
13
13
|
getRequest(settings: any): {
|
|
14
14
|
$subtract: string[];
|
|
@@ -10,7 +10,7 @@ export default class Sum extends AggregationOperator {
|
|
|
10
10
|
static get acceptedValueTypes(): any[];
|
|
11
11
|
static get calculationArgs(): string[];
|
|
12
12
|
getRequest(settings: any): {
|
|
13
|
-
$sum:
|
|
13
|
+
$sum: string[];
|
|
14
14
|
};
|
|
15
15
|
getGroupRequest(settings: any): {
|
|
16
16
|
$sum: string;
|
|
@@ -15,7 +15,8 @@ import DayOfMonth from './DayOfMonth';
|
|
|
15
15
|
import DayOfWeek from './DayOfWeek';
|
|
16
16
|
import DayOfYear from './DayOfYear';
|
|
17
17
|
import Subtract from './Subtract';
|
|
18
|
+
import Percentage from './Percentage';
|
|
18
19
|
declare const AggregationOperators: {
|
|
19
|
-
[x: string]: typeof Year | typeof DateDiff | typeof Divide | typeof Multiply | typeof Sum | typeof Count | typeof Max | typeof Min | typeof Avg | typeof Concat | typeof Size | typeof Month | typeof Week | typeof DayOfMonth | typeof DayOfWeek | typeof DayOfYear | typeof Subtract;
|
|
20
|
+
[x: string]: typeof Year | typeof DateDiff | typeof Divide | typeof Multiply | typeof Sum | typeof Count | typeof Max | typeof Min | typeof Avg | typeof Concat | typeof Size | typeof Month | typeof Week | typeof DayOfMonth | typeof DayOfWeek | typeof DayOfYear | typeof Subtract | typeof Percentage;
|
|
20
21
|
};
|
|
21
22
|
export default AggregationOperators;
|
|
@@ -1,18 +1,36 @@
|
|
|
1
|
-
export declare function getFilterOperatorOptions(operators?: any[]):
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
export declare function getFilterOperatorOptions(operators?: any[]): {
|
|
2
|
+
label: string;
|
|
3
|
+
value: string;
|
|
4
|
+
}[];
|
|
5
|
+
export declare function getFilterOperatorsOptionsForCompType(compType: any): {
|
|
6
|
+
label: string;
|
|
7
|
+
value: string;
|
|
8
|
+
}[];
|
|
9
|
+
export declare function getControlsFilterOperators(columnSettings: any, reportingForms?: any[], calculatedColumnsSettings?: any[]): {
|
|
10
|
+
label: string;
|
|
11
|
+
value: string;
|
|
12
|
+
}[];
|
|
13
|
+
export declare function getUnselectedColumnsOptions(columnsOptions: any, selectedColumns: any): any[];
|
|
5
14
|
export declare function getReportingFormAsOption(form: any): {
|
|
6
15
|
label: any;
|
|
7
16
|
value: any;
|
|
8
17
|
};
|
|
9
|
-
export declare function getConnectionBaseFormOptions(reportingForms: any[], connections: any[], compRowIndex: any):
|
|
10
|
-
|
|
18
|
+
export declare function getConnectionBaseFormOptions(reportingForms: any[], connections: any[], compRowIndex: any): {
|
|
19
|
+
label: any;
|
|
20
|
+
value: any;
|
|
21
|
+
}[];
|
|
22
|
+
export declare function getConnectionJoiningFormOptions(reportingForms: any[], connections: any[], compRowIndex: any): {
|
|
23
|
+
label: any;
|
|
24
|
+
value: any;
|
|
25
|
+
}[];
|
|
11
26
|
export declare function getConnectionFormComponentsAsOptions(formId: any, reportingForms?: any[]): {
|
|
12
27
|
label: string;
|
|
13
28
|
value: string;
|
|
14
29
|
}[];
|
|
15
|
-
export declare function getAggregationOperatorsOptions(groupOperators?: boolean):
|
|
30
|
+
export declare function getAggregationOperatorsOptions(groupOperators?: boolean): {
|
|
31
|
+
value: string;
|
|
32
|
+
label: string;
|
|
33
|
+
}[];
|
|
16
34
|
export declare function getReportingFormComponentAsOption(form: any, comp: any, compPath: any): {
|
|
17
35
|
value: {
|
|
18
36
|
path: any;
|
|
@@ -32,18 +50,21 @@ export declare function addCalculatedColumnsOptions({ calculatedColumns, options
|
|
|
32
50
|
options: any;
|
|
33
51
|
operator?: any;
|
|
34
52
|
}): void;
|
|
35
|
-
export declare function getCalculationArgsOptions(reportingForms: any[], calculatedColumns: any[], operator: any, calculatedValueIndex: any): any;
|
|
53
|
+
export declare function getCalculationArgsOptions(reportingForms: any[], calculatedColumns: any[], operator: any, calculatedValueIndex: any): any[];
|
|
36
54
|
export declare function getReportingFormsComponentsAndExtraComponentsAsOptions({ reportingForms, calculatedColumns, selectedItems, operator, }: {
|
|
37
55
|
reportingForms?: any[];
|
|
38
56
|
calculatedColumns?: any[];
|
|
39
57
|
selectedItems?: any[];
|
|
40
58
|
operator?: any;
|
|
41
|
-
}): any;
|
|
59
|
+
}): any[];
|
|
42
60
|
export declare function getColumnsListOptions(reportingForms: any[], groupsSettings: any, calculatedColumns: any): any[];
|
|
43
|
-
export declare function getAvailableColumnsAsOptions(availableColumns: any, columnsList: any): any;
|
|
61
|
+
export declare function getAvailableColumnsAsOptions(availableColumns: any, columnsList: any): any[];
|
|
44
62
|
export declare function getCustomScriptAvailableVarialbles(): string;
|
|
45
|
-
export declare function getDateDiffUnitOptions(operator: any):
|
|
46
|
-
|
|
63
|
+
export declare function getDateDiffUnitOptions(operator: any): {
|
|
64
|
+
label: any;
|
|
65
|
+
value: any;
|
|
66
|
+
}[];
|
|
67
|
+
export declare function showAggregationOperatorArg(compKey: any, operator: any): boolean;
|
|
47
68
|
export declare function showGroupOperatorArg(operator: any): boolean;
|
|
48
69
|
export declare function getReportTypeInfo(data: any, instance: any): {
|
|
49
70
|
grouping: boolean;
|
|
@@ -55,9 +55,10 @@ export declare function getColumnsTab(): {
|
|
|
55
55
|
valueProperty?: undefined;
|
|
56
56
|
dataType?: undefined;
|
|
57
57
|
data?: undefined;
|
|
58
|
+
customDefaultValue?: undefined;
|
|
58
59
|
})[];
|
|
59
60
|
};
|
|
60
|
-
export declare function getSingleFilterOperators():
|
|
61
|
+
export declare function getSingleFilterOperators(): string[];
|
|
61
62
|
export declare function getSingleFilterOperatorValueComp(filter: any): {
|
|
62
63
|
widget: string;
|
|
63
64
|
data: {
|
|
@@ -143,7 +144,10 @@ export declare function getActionsTab(actions: any): {
|
|
|
143
144
|
label: string;
|
|
144
145
|
widget: string;
|
|
145
146
|
data: {
|
|
146
|
-
values:
|
|
147
|
+
values: {
|
|
148
|
+
label: any;
|
|
149
|
+
value: string;
|
|
150
|
+
}[];
|
|
147
151
|
};
|
|
148
152
|
dataType: string;
|
|
149
153
|
key: string;
|
package/lib/utils/index.d.ts
CHANGED
|
@@ -66,9 +66,10 @@ declare const ReportingUtils: {
|
|
|
66
66
|
valueProperty?: undefined;
|
|
67
67
|
dataType?: undefined;
|
|
68
68
|
data?: undefined;
|
|
69
|
+
customDefaultValue?: undefined;
|
|
69
70
|
})[];
|
|
70
71
|
};
|
|
71
|
-
getSingleFilterOperators():
|
|
72
|
+
getSingleFilterOperators(): string[];
|
|
72
73
|
getSingleFilterOperatorValueComp(filter: any): {
|
|
73
74
|
widget: string;
|
|
74
75
|
data: {
|
|
@@ -154,7 +155,10 @@ declare const ReportingUtils: {
|
|
|
154
155
|
label: string;
|
|
155
156
|
widget: string;
|
|
156
157
|
data: {
|
|
157
|
-
values:
|
|
158
|
+
values: {
|
|
159
|
+
label: any;
|
|
160
|
+
value: string;
|
|
161
|
+
}[];
|
|
158
162
|
};
|
|
159
163
|
dataType: string;
|
|
160
164
|
key: string;
|
|
@@ -277,7 +281,7 @@ declare const ReportingUtils: {
|
|
|
277
281
|
reportingGridConfig: {
|
|
278
282
|
gridKey: string;
|
|
279
283
|
};
|
|
280
|
-
convertReportingFormCompIntoGridComp(comp: any, columnSettings: any): any
|
|
284
|
+
convertReportingFormCompIntoGridComp(comp: any, columnSettings: any): import("lodash").Omit<any, "logic" | "prefix" | "suffix" | "action" | "defaultValue" | "conditional" | "hideLabel" | "calculateValue" | "validate" | "hidden" | "customConditional">;
|
|
281
285
|
getCalcOperatorFieldArgs(columnSettings: any): any;
|
|
282
286
|
convertReportingCalcSettingsIntoGridComp(columnSettings: any, reportingConfig?: any): any;
|
|
283
287
|
getPropertyFromFormId(formId: any): string;
|
|
@@ -286,7 +290,7 @@ declare const ReportingUtils: {
|
|
|
286
290
|
getAggrOperatorNumberField(settings: any, reportingConfig?: any): {
|
|
287
291
|
type: string;
|
|
288
292
|
};
|
|
289
|
-
_:
|
|
293
|
+
_: import("lodash").LoDashStatic;
|
|
290
294
|
valueTypes: any;
|
|
291
295
|
connectionByFullSubmissionObjectOptionValue: "submissionObject*";
|
|
292
296
|
defaultColumns: {
|
package/lib/utils/utils.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import { Utils } from '@formio/js';
|
|
2
|
+
export declare const _: Utils._.LoDashStatic;
|
|
2
3
|
export declare const valueTypes: any;
|
|
3
|
-
export declare function convertReportingFormCompIntoGridComp(comp: any, columnSettings: any): any
|
|
4
|
+
export declare function convertReportingFormCompIntoGridComp(comp: any, columnSettings: any): Utils._.Omit<any, "logic" | "prefix" | "suffix" | "action" | "defaultValue" | "conditional" | "hideLabel" | "calculateValue" | "validate" | "hidden" | "customConditional">;
|
|
4
5
|
export declare function getCalcOperatorFieldArgs(columnSettings: any): any;
|
|
5
6
|
export declare function convertReportingCalcSettingsIntoGridComp(columnSettings: any, reportingConfig?: any): any;
|
|
6
7
|
export declare function getPropertyFromFormId(formId: any): string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@formio/reporting",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1-rc.2",
|
|
4
4
|
"description": "Reporting components for form.io",
|
|
5
5
|
"main": "reporting.js",
|
|
6
6
|
"scripts": {
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"build:vm": "rm -rf lib && rm -f build/reporting.vm.js && gulp licenseCheck:noCheck && tsc && gulp templates && webpack --config=config/webpack.vm.js",
|
|
13
13
|
"build": "yarn build:portal && yarn build:vm && yarn build:dist",
|
|
14
14
|
"lint": "tslint -p .",
|
|
15
|
-
"release": "yarn build &&
|
|
15
|
+
"release": "yarn build && npm publish ./dist --access public"
|
|
16
16
|
},
|
|
17
17
|
"pre-commit": [
|
|
18
18
|
"lint"
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"homepage": "https://github.com/formio/reporting#readme",
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@formio/js": "^5.0.0",
|
|
39
|
-
"@formio/license": "^2.0.0-rc.
|
|
39
|
+
"@formio/license": "^2.0.0-rc.9",
|
|
40
40
|
"@types/file-saver": "^2.0.5",
|
|
41
41
|
"@types/mocha": "^10.0.1",
|
|
42
42
|
"@types/node": "^20.1.5",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"ts-node": "^10.9.1",
|
|
61
61
|
"ts-sinon": "^2.0.2",
|
|
62
62
|
"tslint": "^6.1.2",
|
|
63
|
-
"typescript": "5.
|
|
63
|
+
"typescript": "^5.7.2",
|
|
64
64
|
"webpack": "^5.88.1",
|
|
65
65
|
"webpack-cli": "^4.9.2",
|
|
66
66
|
"webpack-node-externals": "^3.0.0",
|