@formio/reporting 2.1.1 → 2.1.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/components/ReportingControls/ReportingControls.d.ts +3 -3
- package/lib/components/ReportingGrid/ReportingGrid.d.ts +4 -5
- package/lib/index.d.ts +4 -8
- 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 +1 -2
- package/lib/utils/configurationFormUtils.d.ts +12 -33
- package/lib/utils/controlsUtils.d.ts +2 -5
- package/lib/utils/index.d.ts +4 -7
- package/lib/utils/utils.d.ts +2 -3
- package/package.json +28 -16
- package/reportConfigTemplate.json +1 -0
- package/reporting.css +4 -1
- package/reporting.css.map +1 -0
- package/reporting.js +1 -1
|
@@ -9,21 +9,21 @@ export default class ReportingControls extends ReportingControls_base {
|
|
|
9
9
|
clearFilters: string;
|
|
10
10
|
performAction: string;
|
|
11
11
|
};
|
|
12
|
-
get singleFilterOperators():
|
|
12
|
+
get singleFilterOperators(): any;
|
|
13
13
|
get reportingConfig(): any;
|
|
14
14
|
get reportingForms(): any;
|
|
15
15
|
get reportingId(): any;
|
|
16
16
|
get formioGrid(): any;
|
|
17
17
|
get controlsSaveKey(): string;
|
|
18
18
|
attach(element: any): any;
|
|
19
|
-
getFilterComponents(): any
|
|
19
|
+
getFilterComponents(): any;
|
|
20
20
|
getFilterValueCompFromGridComp(gridComp: any, filter: any, ind: any): any;
|
|
21
21
|
toggleFilterClass(filterInstance: any): void;
|
|
22
22
|
getTabs(): any[];
|
|
23
23
|
formatFilterValue(filterSettings: any, value: any): any;
|
|
24
24
|
getActionComponents(applyActionFor: any): any;
|
|
25
25
|
setGridFilters(filters?: {}): void;
|
|
26
|
-
getGridFilters():
|
|
26
|
+
getGridFilters(): any;
|
|
27
27
|
downloadPDF(action: any): Promise<void>;
|
|
28
28
|
exportCSV(action: any): void;
|
|
29
29
|
onApplyColumns(): void;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Utils } from '@formio/js';
|
|
2
1
|
import ReportingUrlFetchProvider from '../../providers/ReportingUrlFetchProvider';
|
|
3
2
|
declare const ReportingGrid_base: any;
|
|
4
3
|
export default class ReportingGrid extends ReportingGrid_base {
|
|
@@ -13,13 +12,13 @@ export default class ReportingGrid extends ReportingGrid_base {
|
|
|
13
12
|
get reportingConfig(): any;
|
|
14
13
|
get reportingForms(): any;
|
|
15
14
|
get reportingId(): any;
|
|
16
|
-
get visibility():
|
|
15
|
+
get visibility(): any;
|
|
17
16
|
get fetchProvider(): ReportingUrlFetchProvider;
|
|
18
17
|
get iteratableRows(): any[];
|
|
19
18
|
addReportingColumnProperties(comp: any, columnSettings: any): void;
|
|
20
19
|
getCalculatedColumnSchema(columnSettings: any): any;
|
|
21
|
-
formatGridComponent(comp: any, columnSettings: any):
|
|
22
|
-
isDefaultColumn(columnReportingSettings: any):
|
|
20
|
+
formatGridComponent(comp: any, columnSettings: any): any;
|
|
21
|
+
isDefaultColumn(columnReportingSettings: any): any;
|
|
23
22
|
addColumnsFromReportingForms(allColumns: any, fieldsGroupedByForm: any): void;
|
|
24
23
|
checkDeconstructions(fieldSettings: any): void;
|
|
25
24
|
checkDeconstructionRequirement(formId: any, compPath: any): void;
|
|
@@ -42,7 +41,7 @@ export default class ReportingGrid extends ReportingGrid_base {
|
|
|
42
41
|
resetValue: () => void;
|
|
43
42
|
};
|
|
44
43
|
customFilters(component: any): any;
|
|
45
|
-
getGridColumns(): any
|
|
44
|
+
getGridColumns(): any;
|
|
46
45
|
get preview(): any;
|
|
47
46
|
initFormioGrid(FormioGrid: any): Promise<any>;
|
|
48
47
|
transformFetchedData(responseData: any): any;
|
package/lib/index.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Utils } from '@formio/js';
|
|
2
1
|
import Report from './Report';
|
|
3
2
|
import ReportingUtils from './utils';
|
|
4
3
|
import * as ReportingConfigUtils from './utils/configurationFormUtils';
|
|
@@ -84,7 +83,7 @@ declare const _default: {
|
|
|
84
83
|
customDefaultValue?: undefined;
|
|
85
84
|
})[];
|
|
86
85
|
};
|
|
87
|
-
getSingleFilterOperators():
|
|
86
|
+
getSingleFilterOperators(): any;
|
|
88
87
|
getSingleFilterOperatorValueComp(filter: any): {
|
|
89
88
|
widget: string;
|
|
90
89
|
data: {
|
|
@@ -170,10 +169,7 @@ declare const _default: {
|
|
|
170
169
|
label: string;
|
|
171
170
|
widget: string;
|
|
172
171
|
data: {
|
|
173
|
-
values:
|
|
174
|
-
label: any;
|
|
175
|
-
value: string;
|
|
176
|
-
}[];
|
|
172
|
+
values: any;
|
|
177
173
|
};
|
|
178
174
|
dataType: string;
|
|
179
175
|
key: string;
|
|
@@ -296,7 +292,7 @@ declare const _default: {
|
|
|
296
292
|
reportingGridConfig: {
|
|
297
293
|
gridKey: string;
|
|
298
294
|
};
|
|
299
|
-
convertReportingFormCompIntoGridComp(comp: any, columnSettings: any):
|
|
295
|
+
convertReportingFormCompIntoGridComp(comp: any, columnSettings: any): any;
|
|
300
296
|
getCalcOperatorFieldArgs(columnSettings: any): any;
|
|
301
297
|
convertReportingCalcSettingsIntoGridComp(columnSettings: any, reportingConfig?: any): any;
|
|
302
298
|
getPropertyFromFormId(formId: any): string;
|
|
@@ -305,7 +301,7 @@ declare const _default: {
|
|
|
305
301
|
getAggrOperatorNumberField(settings: any, reportingConfig?: any): {
|
|
306
302
|
type: string;
|
|
307
303
|
};
|
|
308
|
-
_:
|
|
304
|
+
_: any;
|
|
309
305
|
valueTypes: any;
|
|
310
306
|
connectionByFullSubmissionObjectOptionValue: "submissionObject*";
|
|
311
307
|
defaultColumns: {
|
|
@@ -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: any;
|
|
14
14
|
};
|
|
15
15
|
getGroupRequest(settings: any): {
|
|
16
16
|
$sum: string;
|
|
@@ -15,8 +15,7 @@ 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';
|
|
19
18
|
declare const AggregationOperators: {
|
|
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
|
|
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;
|
|
21
20
|
};
|
|
22
21
|
export default AggregationOperators;
|
|
@@ -1,36 +1,18 @@
|
|
|
1
|
-
export declare function getFilterOperatorOptions(operators?: any[]):
|
|
2
|
-
|
|
3
|
-
|
|
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[];
|
|
1
|
+
export declare function getFilterOperatorOptions(operators?: any[]): any;
|
|
2
|
+
export declare function getFilterOperatorsOptionsForCompType(compType: any): any;
|
|
3
|
+
export declare function getControlsFilterOperators(columnSettings: any, reportingForms?: any[], calculatedColumnsSettings?: any[]): any;
|
|
4
|
+
export declare function getUnselectedColumnsOptions(columnsOptions: any, selectedColumns: any): any;
|
|
14
5
|
export declare function getReportingFormAsOption(form: any): {
|
|
15
6
|
label: any;
|
|
16
7
|
value: any;
|
|
17
8
|
};
|
|
18
|
-
export declare function getConnectionBaseFormOptions(reportingForms: any[], connections: any[], compRowIndex: any):
|
|
19
|
-
|
|
20
|
-
value: any;
|
|
21
|
-
}[];
|
|
22
|
-
export declare function getConnectionJoiningFormOptions(reportingForms: any[], connections: any[], compRowIndex: any): {
|
|
23
|
-
label: any;
|
|
24
|
-
value: any;
|
|
25
|
-
}[];
|
|
9
|
+
export declare function getConnectionBaseFormOptions(reportingForms: any[], connections: any[], compRowIndex: any): any;
|
|
10
|
+
export declare function getConnectionJoiningFormOptions(reportingForms: any[], connections: any[], compRowIndex: any): any;
|
|
26
11
|
export declare function getConnectionFormComponentsAsOptions(formId: any, reportingForms?: any[]): {
|
|
27
12
|
label: string;
|
|
28
13
|
value: string;
|
|
29
14
|
}[];
|
|
30
|
-
export declare function getAggregationOperatorsOptions(groupOperators?: boolean):
|
|
31
|
-
value: string;
|
|
32
|
-
label: string;
|
|
33
|
-
}[];
|
|
15
|
+
export declare function getAggregationOperatorsOptions(groupOperators?: boolean): any;
|
|
34
16
|
export declare function getReportingFormComponentAsOption(form: any, comp: any, compPath: any): {
|
|
35
17
|
value: {
|
|
36
18
|
path: any;
|
|
@@ -50,21 +32,18 @@ export declare function addCalculatedColumnsOptions({ calculatedColumns, options
|
|
|
50
32
|
options: any;
|
|
51
33
|
operator?: any;
|
|
52
34
|
}): void;
|
|
53
|
-
export declare function getCalculationArgsOptions(reportingForms: any[], calculatedColumns: any[], operator: any, calculatedValueIndex: any): any
|
|
35
|
+
export declare function getCalculationArgsOptions(reportingForms: any[], calculatedColumns: any[], operator: any, calculatedValueIndex: any): any;
|
|
54
36
|
export declare function getReportingFormsComponentsAndExtraComponentsAsOptions({ reportingForms, calculatedColumns, selectedItems, operator, }: {
|
|
55
37
|
reportingForms?: any[];
|
|
56
38
|
calculatedColumns?: any[];
|
|
57
39
|
selectedItems?: any[];
|
|
58
40
|
operator?: any;
|
|
59
|
-
}): any
|
|
41
|
+
}): any;
|
|
60
42
|
export declare function getColumnsListOptions(reportingForms: any[], groupsSettings: any, calculatedColumns: any): any[];
|
|
61
|
-
export declare function getAvailableColumnsAsOptions(availableColumns: any, columnsList: any): any
|
|
43
|
+
export declare function getAvailableColumnsAsOptions(availableColumns: any, columnsList: any): any;
|
|
62
44
|
export declare function getCustomScriptAvailableVarialbles(): string;
|
|
63
|
-
export declare function getDateDiffUnitOptions(operator: any):
|
|
64
|
-
|
|
65
|
-
value: any;
|
|
66
|
-
}[];
|
|
67
|
-
export declare function showAggregationOperatorArg(compKey: any, operator: any): boolean;
|
|
45
|
+
export declare function getDateDiffUnitOptions(operator: any): any;
|
|
46
|
+
export declare function showAggregationOperatorArg(compKey: any, operator: any): any;
|
|
68
47
|
export declare function showGroupOperatorArg(operator: any): boolean;
|
|
69
48
|
export declare function getReportTypeInfo(data: any, instance: any): {
|
|
70
49
|
grouping: boolean;
|
|
@@ -58,7 +58,7 @@ export declare function getColumnsTab(): {
|
|
|
58
58
|
customDefaultValue?: undefined;
|
|
59
59
|
})[];
|
|
60
60
|
};
|
|
61
|
-
export declare function getSingleFilterOperators():
|
|
61
|
+
export declare function getSingleFilterOperators(): any;
|
|
62
62
|
export declare function getSingleFilterOperatorValueComp(filter: any): {
|
|
63
63
|
widget: string;
|
|
64
64
|
data: {
|
|
@@ -144,10 +144,7 @@ export declare function getActionsTab(actions: any): {
|
|
|
144
144
|
label: string;
|
|
145
145
|
widget: string;
|
|
146
146
|
data: {
|
|
147
|
-
values:
|
|
148
|
-
label: any;
|
|
149
|
-
value: string;
|
|
150
|
-
}[];
|
|
147
|
+
values: any;
|
|
151
148
|
};
|
|
152
149
|
dataType: string;
|
|
153
150
|
key: string;
|
package/lib/utils/index.d.ts
CHANGED
|
@@ -69,7 +69,7 @@ declare const ReportingUtils: {
|
|
|
69
69
|
customDefaultValue?: undefined;
|
|
70
70
|
})[];
|
|
71
71
|
};
|
|
72
|
-
getSingleFilterOperators():
|
|
72
|
+
getSingleFilterOperators(): any;
|
|
73
73
|
getSingleFilterOperatorValueComp(filter: any): {
|
|
74
74
|
widget: string;
|
|
75
75
|
data: {
|
|
@@ -155,10 +155,7 @@ declare const ReportingUtils: {
|
|
|
155
155
|
label: string;
|
|
156
156
|
widget: string;
|
|
157
157
|
data: {
|
|
158
|
-
values:
|
|
159
|
-
label: any;
|
|
160
|
-
value: string;
|
|
161
|
-
}[];
|
|
158
|
+
values: any;
|
|
162
159
|
};
|
|
163
160
|
dataType: string;
|
|
164
161
|
key: string;
|
|
@@ -281,7 +278,7 @@ declare const ReportingUtils: {
|
|
|
281
278
|
reportingGridConfig: {
|
|
282
279
|
gridKey: string;
|
|
283
280
|
};
|
|
284
|
-
convertReportingFormCompIntoGridComp(comp: any, columnSettings: any):
|
|
281
|
+
convertReportingFormCompIntoGridComp(comp: any, columnSettings: any): any;
|
|
285
282
|
getCalcOperatorFieldArgs(columnSettings: any): any;
|
|
286
283
|
convertReportingCalcSettingsIntoGridComp(columnSettings: any, reportingConfig?: any): any;
|
|
287
284
|
getPropertyFromFormId(formId: any): string;
|
|
@@ -290,7 +287,7 @@ declare const ReportingUtils: {
|
|
|
290
287
|
getAggrOperatorNumberField(settings: any, reportingConfig?: any): {
|
|
291
288
|
type: string;
|
|
292
289
|
};
|
|
293
|
-
_:
|
|
290
|
+
_: any;
|
|
294
291
|
valueTypes: any;
|
|
295
292
|
connectionByFullSubmissionObjectOptionValue: "submissionObject*";
|
|
296
293
|
defaultColumns: {
|
package/lib/utils/utils.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const _: Utils._.LoDashStatic;
|
|
1
|
+
export declare const _: any;
|
|
3
2
|
export declare const valueTypes: any;
|
|
4
|
-
export declare function convertReportingFormCompIntoGridComp(comp: any, columnSettings: any):
|
|
3
|
+
export declare function convertReportingFormCompIntoGridComp(comp: any, columnSettings: any): any;
|
|
5
4
|
export declare function getCalcOperatorFieldArgs(columnSettings: any): any;
|
|
6
5
|
export declare function convertReportingCalcSettingsIntoGridComp(columnSettings: any, reportingConfig?: any): any;
|
|
7
6
|
export declare function getPropertyFromFormId(formId: any): string;
|
package/package.json
CHANGED
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@formio/reporting",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.2",
|
|
4
4
|
"description": "Reporting components for form.io",
|
|
5
5
|
"main": "reporting.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
|
|
16
|
-
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"import": "./reporting.js",
|
|
10
|
+
"require": "./reporting.js",
|
|
11
|
+
"types": "./lib/index.d.ts"
|
|
12
|
+
},
|
|
13
|
+
"./reporting.css": "./reporting.css",
|
|
14
|
+
"./reportConfigTemplate.json": "./reportConfigTemplate.json"
|
|
15
|
+
},
|
|
16
|
+
"publishConfig": {
|
|
17
|
+
"access": "public",
|
|
18
|
+
"directory": "dist"
|
|
17
19
|
},
|
|
18
20
|
"pre-commit": [
|
|
19
21
|
"lint"
|
|
@@ -36,8 +38,6 @@
|
|
|
36
38
|
"reportConfigVersion": 5,
|
|
37
39
|
"homepage": "https://github.com/formio/reporting#readme",
|
|
38
40
|
"devDependencies": {
|
|
39
|
-
"@formio/js": "^5.0.0",
|
|
40
|
-
"@formio/license": "2.0.1",
|
|
41
41
|
"@types/file-saver": "^2.0.5",
|
|
42
42
|
"@types/mocha": "^10.0.1",
|
|
43
43
|
"@types/node": "^20.1.5",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"jsdom": "^17.0.0",
|
|
55
55
|
"jsdom-global": "^3.0.2",
|
|
56
56
|
"mocha": "^10.2.0",
|
|
57
|
-
"
|
|
57
|
+
"sass": "^1.85.0",
|
|
58
58
|
"nyc": "^15.1.0",
|
|
59
59
|
"pre-commit": "^1.2.2",
|
|
60
60
|
"request": "^2.88.2",
|
|
@@ -65,13 +65,25 @@
|
|
|
65
65
|
"webpack": "^5.88.1",
|
|
66
66
|
"webpack-cli": "^4.9.2",
|
|
67
67
|
"webpack-node-externals": "^3.0.0",
|
|
68
|
-
"webpack-obfuscator": "^3.5.1"
|
|
68
|
+
"webpack-obfuscator": "^3.5.1",
|
|
69
|
+
"@formio/license": "^2.0.1",
|
|
70
|
+
"@formio/js": "^5.2.3"
|
|
69
71
|
},
|
|
70
72
|
"peerDependencies": {
|
|
71
|
-
"@formio/js": "^5.
|
|
73
|
+
"@formio/js": "^5.2.3"
|
|
72
74
|
},
|
|
73
75
|
"dependencies": {
|
|
74
76
|
"file-saver": "^2.0.5",
|
|
75
77
|
"jose": "^5.6.3"
|
|
78
|
+
},
|
|
79
|
+
"scripts": {
|
|
80
|
+
"watch": "tsc -w",
|
|
81
|
+
"build:style": "sass ./src/sass/reporting.scss ./dist/reporting.css",
|
|
82
|
+
"build:dist": "rm -rf lib && rm -rf dist && gulp licenseCheck && tsc && gulp templates && webpack --config=config/webpack.dist.js && npm run build:style",
|
|
83
|
+
"build:dev": "rm -rf lib && rm -rf dist && gulp licenseCheck && tsc && gulp templates && webpack --config=config/webpack.dev.js && gulp changeEntry && npm run build:style",
|
|
84
|
+
"build:portal": "rm -rf lib && rm -rf dist && rm -f build/reporting.css && gulp licenseCheck:noCheck && tsc && gulp templates && gulp report-config-template && webpack --config=config/webpack.portal.js && npm run build:style",
|
|
85
|
+
"build:vm": "rm -rf lib && rm -f dist/reporting.vm.js && gulp licenseCheck:noCheck && tsc && gulp templates && webpack --config=config/webpack.vm.js",
|
|
86
|
+
"build": "npm run build:portal && npm run build:vm",
|
|
87
|
+
"lint": "tslint -p ."
|
|
76
88
|
}
|
|
77
89
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"resources":{"reportingui":{"title":"Reporting UI","type":"resource","name":"reportingui","path":"reportingui","display":"wizard","settings":{"wizardHeaderType":"Vertical"},"components":[{"title":"Basic Settings","breadcrumbClickable":true,"buttonSettings":{"previous":true,"cancel":true,"next":true},"navigateOnEnter":false,"saveOnEnter":false,"scrollToTop":false,"collapsible":false,"key":"basic","type":"panel","label":"Page 6","input":false,"tableView":false,"components":[{"html":"<p style=\"text-align:right;\"><span class=\"text-small\"><i>v{{form.properties.version}}</i></span></p>","label":"Content","customClass":"text-muted","refreshOnChange":false,"key":"version1","type":"content","input":false,"tableView":false},{"html":"<p><span class=\"text-big\"><strong>Report Setup - Basic Settings</strong></span></p>","label":"Report Setup - Basic Settings","refreshOnChange":false,"key":"basicReportSettings","type":"content","input":false,"tableView":false},{"label":"Columns","columns":[{"components":[{"label":"Report Title","placeholder":"Report Title","applyMaskOn":"change","tableView":true,"validate":{"required":true},"key":"title","type":"textfield","input":true}],"width":6,"offset":0,"push":0,"pull":0,"size":"md","currentWidth":6},{"components":[{"label":"Report Name","placeholder":"Report Name","tooltip":"This is autogenerated by default to be a camel case version of the Report Title.","applyMaskOn":"change","tableView":true,"calculateValue":"value = _.camelCase(data.title);\n\n","allowCalculateOverride":true,"validate":{"pattern":"(\\w|\\w[\\w-.]*\\w)","patternMessage":"The key must only contain alphanumeric characters, underscores, dots and dashes and should not be ended by dash or dot."},"unique":true,"key":"name","logic":[{"name":"make required","trigger":{"type":"javascript","javascript":"result = data.title;"},"actions":[{"name":"make required","type":"property","property":{"label":"Required","value":"validate.required","type":"boolean"},"state":true}]}],"type":"textfield","input":true}],"width":6,"offset":0,"push":0,"pull":0,"size":"md","currentWidth":6}],"key":"columns1","type":"columns","input":false,"tableView":false},{"label":"Report Forms","persistent":false,"trigger":{"init":false,"server":false},"refreshOn":"forms","refreshOnEvent":"formsSet","event":"reportingFormsUpdated","dataSrc":"url","fetch":{"url":"{{Formio.projectUrl}}/form?_id__in={{data.forms.join(\",\")}}","method":"get","headers":[{"key":"","value":""}],"mapFunction":"value = _.isArray(responseData) ? responseData : [];","forwardHeaders":false,"authenticate":true},"allowCaching":true,"key":"reportingForms","type":"datasource","input":true,"tableView":false},{"label":"Container","tableView":false,"key":"gridSettings","type":"container","input":true,"components":[{"html":"<p><span class=\"text-big\">Report Grid - Basic Settings</span></p>","label":"Reporting Grid Basic Settings","refreshOnChange":false,"key":"basicReportingSettings3","type":"content","input":false,"tableView":false},{"label":"Items per page","widget":"choicesjs","tooltip":"Select how many records (Rows) to display on each page of the Report Grid by default.","tableView":true,"defaultValue":10,"data":{"values":[{"label":"5","value":5},{"label":"10","value":10},{"label":"25","value":25},{"label":"50","value":50},{"label":"100","value":100},{"label":"All","value":-1}]},"key":"itemsPerPage","type":"select","input":true,"weight":442},{"label":"Enable to Store Request Result in the Cache","tooltip":"When checked, the requests and their results will be stored in the cache. If the Report tries to make a request to the same URL with the same parameters, the cached data will be returned. This increases performance. PLEASE NOTE: if the remote source's data changes frequently and requires frequent updates, uncheck this option as caching is not ideal in all scenarios.","tableView":false,"defaultValue":true,"key":"allowCaching","type":"checkbox","input":true},{"label":"Cell max width","tooltip":"It sets the maximum size of the Report Grid cells.","applyMaskOn":"change","tableView":true,"key":"cellMaxWidth","type":"textfield","input":true}]}]},{"title":"Source Forms","breadcrumbClickable":true,"buttonSettings":{"previous":true,"cancel":true,"next":true},"navigateOnEnter":false,"saveOnEnter":false,"scrollToTop":false,"collapsible":false,"key":"dataSourcePanel","type":"panel","label":"Page 1","input":false,"tableView":false,"components":[{"html":"<p style=\"text-align:right;\"><span class=\"text-small\"><i>v{{form.properties.version}}</i></span></p>","label":"Content","customClass":"text-muted","refreshOnChange":false,"key":"version2","type":"content","input":false,"tableView":false},{"html":"<p><span class=\"text-big\"><strong>Report Setup - Source Forms </strong></span></p><p>A report can aggregate Submission Data submitted against one or more Forms. Many times, Reports aggregate data from multiple Forms which allow a singular Report UI to visualize connected data stemming from multiple Form Sources. </p>","label":"Basic Report Settings","refreshOnChange":false,"key":"sourceFormsSettings","type":"content","input":false,"tableView":false},{"label":"Choose from the Forms within this Project:","widget":"choicesjs","tooltip":"Select one or more related forms that will be the source of data for the Report Grid.","tableView":false,"multiple":true,"dataSrc":"url","data":{"url":"{{Formio.projectUrl}}/form","headers":[{"key":"","value":""}]},"valueProperty":"_id","template":"<span>{{ item.title }}</span>","validate":{"required":true,"select":false},"key":"forms","type":"select","disableLimit":false,"searchField":"title__regex","noRefreshOnScroll":false,"authenticate":true,"input":true},{"label":"Forms Connections","tooltip":"Define the fields that are common for the pairs of forms. The fields will be used as connectors to join the submissions of source forms in the Report Grid.","tableView":false,"templates":{"header":"<div class=\"row\">\n {% util.eachComponent(components, function(component) { %}\n {% if (displayValue(component)) { %}\n <div class=\"col-sm-6 font-weight-bold\">{{ t(component.label) }}</div>\n {% } %}\n {% }) %}\n </div>","row":"<div class=\"row\">\n {% util.eachComponent(components, function(component) { %}\n {% if (displayValue(component)) { %}\n {% if (component.key === 'baseForm') { %}\n <div class=\"col-sm-6\">\n {% } else { %}\n <div class=\"col-sm-4\">\n {% } %}\n {{ isVisibleInRow(component) ? getView(component, row[component.key]) : ''}}\n </div>\n {% } %}\n {% }) %}\n {% if (!instance.options.readOnly && !instance.disabled) { %}\n <div class=\"col-sm-2\">\n <div class=\"btn-group pull-right\">\n <button class=\"btn btn-default btn-light btn-sm editRow\"><i class=\"{{ iconClass('edit') }}\"></i></button>\n {% if (!instance.hasRemoveButtons || instance.hasRemoveButtons()) { %}\n <button class=\"btn btn-danger btn-sm removeRow\"><i class=\"{{ iconClass('trash') }}\"></i></button>\n {% } %}\n </div>\n </div>\n {% } %}\n </div>"},"addAnother":"Add Connection","redrawOn":"reportingForms","validate":{"required":true},"rowDrafts":false,"key":"connections","customConditional":"show = data.forms && data.forms.length > 1;","logic":[{"name":"min max validation","trigger":{"type":"javascript","javascript":"result = !!data.reportingForms;"},"actions":[{"name":"min max validation","type":"mergeComponentSchema","schemaDefinition":"schema = {validate: {\n maxLength: data.reportingForms.length - 1,\n minLength: data.reportingForms.length - 1,\n}}"}]}],"type":"editgrid","displayAsTable":false,"reorder":false,"addAnotherPosition":"bottom","layoutFixed":false,"enableRowGroups":false,"initEmpty":false,"input":true,"components":[{"label":"Data Source Connections","columns":[{"components":[{"label":"Base Form","widget":"choicesjs","placeholder":"Source Form","tooltip":"Select the form that has a common field with the row Joining Form.","tableView":true,"dataSrc":"custom","data":{"custom":"var rowIndex = instance.rowIndex;\nvar connections = instance.root.data.connections;\n\nvalues = utils.reporting.getConnectionBaseFormOptions(data.reportingForms, connections, rowIndex)\n"},"valueProperty":"value","validate":{"required":true},"key":"baseForm","type":"select","input":true},{"label":"Connecting field of base Form","widget":"choicesjs","placeholder":"Connecting Field","tooltip":"Select the base Form field that has a corresponding field in the row joining Form.","disabled":true,"tableView":false,"dataSrc":"custom","data":{"custom":"values = utils.reporting.getConnectionFormComponentsAsOptions(row.baseForm, data.reportingForms);\n"},"valueProperty":"value","validate":{"required":true},"key":"baseFormField","logic":[{"name":"enable","trigger":{"type":"javascript","javascript":"result = row.baseForm"},"actions":[{"name":"enable","type":"property","property":{"label":"Disabled","value":"disabled","type":"boolean"},"state":false}]},{"name":"clear value","trigger":{"type":"javascript","javascript":"result = !row.baseForm"},"actions":[{"name":"clear value","type":"customAction","customAction":"instance.dataValue = instance.emptyValue"}]}],"type":"select","input":true},{"label":"Base Form path to connecting value","placeholder":"Path","applyMaskOn":"change","tableView":false,"key":"baseFormValuePath","customConditional":"show = !_.includes([utils.reporting.connectionByFullSubmissionObjectOptionValue], row.baseFormField);","type":"textfield","input":true}],"width":6,"offset":0,"push":0,"pull":0,"size":"md","currentWidth":6},{"components":[{"label":"Joining Form","widget":"choicesjs","placeholder":"Source Form","tooltip":"Select the form that has a common field with the row Base Form.","tableView":true,"dataSrc":"custom","data":{"custom":"var rowIndex = instance.rowIndex;\nvar connections = instance.root.data.connections;\n\nvalues = utils.reporting.getConnectionJoiningFormOptions(data.reportingForms, connections, rowIndex);\n\n"},"valueProperty":"value","refreshOn":"connections.baseForm","validate":{"required":true},"key":"joiningForm","type":"select","input":true},{"label":"Connecting field of joining Form","widget":"choicesjs","placeholder":"Connecting Field","tooltip":"Select the Joining Form field that corresponds to the Connecting Field of the Base Form.","disabled":true,"tableView":false,"dataSrc":"custom","data":{"custom":"values = utils.reporting.getConnectionFormComponentsAsOptions(row.joiningForm, data.reportingForms);\n"},"valueProperty":"value","validate":{"required":true},"key":"joiningFormField","logic":[{"name":"enable","trigger":{"type":"javascript","javascript":"result = row.joiningForm"},"actions":[{"name":"enable","type":"property","property":{"label":"Disabled","value":"disabled","type":"boolean"},"state":false}]},{"name":"clear value","trigger":{"type":"javascript","javascript":"result = !row.joiningForm"},"actions":[{"name":"clear value","type":"customAction","customAction":"instance.dataValue = instance.emptyValue"}]}],"type":"select","input":true},{"label":"Joining Form path to connecting value","placeholder":"Path","applyMaskOn":"change","tableView":false,"key":"joiningFormValuePath","customConditional":"show = !_.includes([utils.reporting.connectionByFullSubmissionObjectOptionValue], row.joiningFormField);","type":"textfield","input":true}],"width":6,"offset":0,"push":0,"pull":0,"size":"md","currentWidth":6}],"hideLabel":true,"key":"columns","type":"columns","input":false,"tableView":false}]}]},{"title":"Calculated Columns","breadcrumbClickable":true,"buttonSettings":{"previous":true,"cancel":true,"next":true},"navigateOnEnter":false,"saveOnEnter":false,"scrollToTop":false,"collapsible":false,"key":"extraColumnsPanel","type":"panel","label":"Page 7","input":false,"tableView":false,"components":[{"html":"<p style=\"text-align:right;\"><span class=\"text-small\"><i>v{{form.properties.version}}</i></span></p>","label":"Content","customClass":"text-muted","refreshOnChange":false,"key":"version3","type":"content","input":false,"tableView":false},{"html":"<p><span class=\"text-big\"><strong>Report Setup - Calculated Columns</strong></span></p><p>Here you can add additional columns to the Report Grid that do not exist in the the Data Source Forms. These columns` value(s) will be calculated based on the fields of the Data Source Forms. </p>","label":"Basic Reporting Settings","refreshOnChange":false,"key":"calculatedColumnsSettingsDescription","type":"content","input":false,"tableView":false},{"label":"Calculated Extra Columns","hideLabel":true,"tableView":false,"templates":{"header":"<div class=\"row\">\n {% util.eachComponent(components, function(component) { %}\n {% if (displayValue(component)) { %}\n <div class=\"col-sm-4 font-weight-bold\">{{ t(component.label) }}</div>\n {% } %}\n {% }) %}\n </div>","row":"<div class=\"row\">\n {% util.eachComponent(components, function(component) { %}\n {% if (displayValue(component)) { %}\n <div class=\"col-sm-4\">\n {{ isVisibleInRow(component) ? getView(component, row[component.key]) : ''}}\n </div>\n {% } %}\n {% }) %}\n {% if (!instance.options.readOnly && !instance.disabled) { %}\n <div class=\"col-sm-4\">\n <div class=\"btn-group pull-right\">\n <button class=\"btn btn-default btn-light btn-sm editRow\"><i class=\"{{ iconClass('edit') }}\"></i></button>\n {% if (!instance.hasRemoveButtons || instance.hasRemoveButtons()) { %}\n <button class=\"btn btn-danger btn-sm removeRow\"><i class=\"{{ iconClass('trash') }}\"></i></button>\n {% } %}\n </div>\n </div>\n {% } %}\n </div>"},"addAnother":"Add Column","redrawOn":"reportingForms","rowDrafts":false,"key":"calculatedColumns","type":"editgrid","displayAsTable":false,"input":true,"components":[{"label":"Columns","columns":[{"components":[{"label":"Column Title","applyMaskOn":"change","tableView":true,"validate":{"required":true},"key":"name","type":"textfield","input":true}],"width":6,"offset":0,"push":0,"pull":0,"size":"md","currentWidth":6},{"components":[{"label":"Column Key","applyMaskOn":"change","tableView":false,"calculateValue":"value = _.camelCase(row.name);","allowCalculateOverride":true,"validate":{"pattern":"(\\w|\\w[\\w-.]*\\w)","patternMessage":"The key must only contain alphanumeric characters, underscores, dots and dashes and should not be ended by dash or dot."},"key":"key","logic":[{"name":"make required","trigger":{"type":"javascript","javascript":"result = row.title;"},"actions":[{"name":"make required","type":"property","property":{"label":"Required","value":"validate.required","type":"boolean"},"state":true}]}],"type":"textfield","input":true}],"width":6,"offset":0,"push":0,"pull":0,"size":"md","currentWidth":6}],"key":"columns","type":"columns","input":false,"tableView":false},{"label":"Operator","widget":"choicesjs","tooltip":"Select an operator to calculate the column value.","tableView":true,"dataSrc":"custom","data":{"custom":"values = utils.reporting.getAggregationOperatorsOptions(false);\n"},"valueProperty":"value","validate":{"required":true},"key":"operator","type":"select","input":true},{"label":"Arguments","widget":"choicesjs","tableView":false,"multiple":true,"dataSrc":"custom","data":{"custom":"var reportingForms = instance.root.data.reportingForms;\nvalues = utils.reporting.getCalculationArgsOptions(reportingForms, _.get(instance, 'root.data.calculatedColumns', []), row.operator, instance.rowIndex);"},"valueProperty":"value","validate":{"required":true},"key":"args","customConditional":"show = utils.reporting.showAggregationOperatorArg(instance.component.key, row.operator);","type":"select","input":true},{"label":"Argument","widget":"choicesjs","tableView":false,"dataSrc":"custom","data":{"custom":"var reportingForms = instance.root.data.reportingForms;\nvalues = utils.reporting.getCalculationArgsOptions(reportingForms, _.get(instance, 'root.data.calculatedColumns', []), row.operator, instance.rowIndex);"},"valueProperty":"value","validate":{"required":true},"key":"arg","customConditional":"show = utils.reporting.showAggregationOperatorArg(instance.component.key, row.operator);","type":"select","input":true},{"label":"Arguments","reorder":false,"addAnotherPosition":"bottom","layoutFixed":false,"enableRowGroups":false,"initEmpty":false,"tableView":false,"validate":{"required":true},"key":"concatArgs","customConditional":"show = utils.reporting.showAggregationOperatorArg(instance.component.key, row.operator);","type":"datagrid","input":true,"components":[{"label":"Field","widget":"choicesjs","tableView":false,"dataSrc":"custom","data":{"custom":"var reportingForms = instance.root.data.reportingForms;\nvalues = utils.reporting.getCalculationArgsOptions(reportingForms, _.get(instance, 'root.data.calculatedColumns', []), 'concat', instance.parent.rowIndex);"},"valueProperty":"value","validate":{"required":true},"key":"field","type":"select","input":true},{"label":"Connector","tooltip":"Enter the connector that will be added between this row field value and next row filed value. Whitespace is used by default.","applyMaskOn":"change","tableView":false,"key":"connector","type":"textfield","input":true}]},{"label":"Columns","columns":[{"components":[{"label":"Dividend","widget":"choicesjs","tableView":false,"dataSrc":"custom","data":{"custom":"var reportingForms = instance.root.data.reportingForms;\nvalues = utils.reporting.getCalculationArgsOptions(reportingForms, _.get(instance, 'root.data.calculatedColumns', []), row.operator, instance.rowIndex);"},"valueProperty":"value","validate":{"required":true},"key":"dividend","type":"select","input":true}],"width":6,"offset":0,"push":0,"pull":0,"size":"md","currentWidth":6},{"components":[{"label":"Divisor","widget":"choicesjs","tableView":false,"dataSrc":"custom","data":{"custom":"var reportingForms = instance.root.data.reportingForms;\nvalues = utils.reporting.getCalculationArgsOptions(reportingForms, _.get(instance, 'root.data.calculatedColumns', []), row.operator, instance.rowIndex);"},"valueProperty":"value","validate":{"required":true},"key":"divisor","type":"select","input":true}],"width":6,"offset":0,"push":0,"pull":0,"size":"md","currentWidth":6}],"key":"divideArgs","customConditional":"show = utils.reporting.showAggregationOperatorArg(instance.component.key, row.operator);","type":"columns","input":false,"tableView":false},{"label":"Columns","columns":[{"components":[{"label":"Minuend","widget":"choicesjs","tooltip":"Select the value from which another value is to be subtracted","tableView":false,"dataSrc":"custom","data":{"custom":"var reportingForms = instance.root.data.reportingForms;\nvalues = utils.reporting.getCalculationArgsOptions(reportingForms, _.get(instance, 'root.data.calculatedColumns', []), row.operator, instance.rowIndex);"},"valueProperty":"value","validate":{"required":true},"key":"minuend","type":"select","input":true}],"width":6,"offset":0,"push":0,"pull":0,"size":"md","currentWidth":6},{"components":[{"label":"Subtrahend","widget":"choicesjs","tooltip":"Select the value that is to be subtracted from the minuend","tableView":false,"dataSrc":"custom","data":{"custom":"var reportingForms = instance.root.data.reportingForms;\nvalues = utils.reporting.getCalculationArgsOptions(reportingForms, _.get(instance, 'root.data.calculatedColumns', []), row.operator, instance.rowIndex);"},"valueProperty":"value","validate":{"required":true},"key":"subtrahend","type":"select","input":true}],"width":6,"offset":0,"push":0,"pull":0,"size":"md","currentWidth":6}],"key":"subtractArgs","customConditional":"show = utils.reporting.showAggregationOperatorArg(instance.component.key, row.operator);","type":"columns","input":false,"tableView":false},{"label":"Columns","columns":[{"components":[{"label":"Start Date","widget":"choicesjs","tableView":false,"dataSrc":"custom","data":{"custom":"var reportingForms = instance.root.data.reportingForms;\nvalues = utils.reporting.getCalculationArgsOptions(reportingForms, _.get(instance, 'root.data.calculatedColumns', []), row.operator, instance.rowIndex);"},"valueProperty":"value","validate":{"required":true},"key":"startDate","type":"select","input":true}],"width":4,"offset":0,"push":0,"pull":0,"size":"md","currentWidth":4},{"components":[{"label":"End Date","widget":"choicesjs","tableView":false,"dataSrc":"custom","data":{"custom":"var reportingForms = instance.root.data.reportingForms;\nvalues = utils.reporting.getCalculationArgsOptions(reportingForms, _.get(instance, 'root.data.calculatedColumns', []), row.operator, instance.rowIndex);"},"valueProperty":"value","validate":{"required":true},"key":"endDate","type":"select","input":true}],"width":4,"offset":0,"push":0,"pull":0,"size":"md","currentWidth":4},{"components":[{"label":"Unit","widget":"choicesjs","tooltip":"Select the time measurement unit between the Start Date and End Date.","tableView":false,"dataSrc":"custom","data":{"custom":"values = utils.reporting.getDateDiffUnitOptions(row.operator);"},"valueProperty":"value","validate":{"required":true},"key":"unit","type":"select","input":true}],"size":"md","width":4,"offset":0,"push":0,"pull":0,"currentWidth":4}],"key":"dateDiffArgs","customConditional":"show = utils.reporting.showAggregationOperatorArg(instance.component.key, row.operator);","type":"columns","input":false,"tableView":false},{"label":"Date","widget":"choicesjs","tableView":false,"dataSrc":"custom","data":{"custom":"var reportingForms = instance.root.data.reportingForms;\nvalues = utils.reporting.getCalculationArgsOptions(reportingForms, _.get(instance, 'root.data.calculatedColumns', []), row.operator, instance.rowIndex);"},"valueProperty":"value","validate":{"required":true},"key":"date","customConditional":"show = utils.reporting.showAggregationOperatorArg(instance.component.key, row.operator);","type":"select","input":true},{"label":"Decimal Places","tooltip":"Enter the number of decimal places for the calculated value. If the original calculated value has more decimal places, the value will be rounded.","applyMaskOn":"change","mask":false,"tableView":false,"delimiter":false,"requireDecimal":false,"inputFormat":"plain","truncateMultipleSpaces":false,"key":"decimalLimit","customConditional":"show = utils.reporting.showAggregationOperatorArg(instance.component.key, row.operator);","type":"number","input":true}]},{"label":"Container","tableView":false,"key":"calculatedColumnsSettings","type":"container","input":true,"components":[{"html":"<p><span class=\"text-big\">Calculated Columns - Global Settings</span></p>","label":"Reporting Grid Basic Settings","refreshOnChange":false,"key":"calcSettingsDescription","type":"content","input":false,"tableView":false},{"label":"Use Thousands Separator","tooltip":"Separate thousands by local delimiter in calculated columns with number value","tableView":false,"defaultValue":false,"key":"thousandsSeparator","type":"checkbox","input":true}]}]},{"title":"Aggregation","breadcrumbClickable":true,"buttonSettings":{"previous":true,"cancel":true,"next":true},"navigateOnEnter":false,"saveOnEnter":false,"scrollToTop":false,"collapsible":false,"key":"groupingPanel","type":"panel","label":"Page 8","input":false,"tableView":false,"components":[{"html":"<p style=\"text-align:right;\"><span class=\"text-small\"><i>v{{form.properties.version}}</i></span></p>","label":"Content","customClass":"text-muted","refreshOnChange":false,"key":"version4","type":"content","input":false,"tableView":false},{"html":"<p><span class=\"text-big\"><strong>Report Setup - Aggregated Columns</strong></span></p><p>You can create an <strong>aggregated report</strong> that groups the selected Forms' submissions by one or several fields (e.g. department ID or employee ID). Using the UI below, select the fields that will be used as criteria for the grouping. Then, add columns to your Reporting Grid that will be calculated per group based on the existing selected Forms fields or the Grid Calculated Extra Fields. </p><p><strong>Please note that only Aggregated Columns will be available to display in the Reporting Grid for Aggregated Reports.</strong></p>","label":"Content","refreshOnChange":false,"key":"content","type":"content","input":false,"tableView":false},{"label":"Fields to group by","tooltip":"Select the fields that will be used as criteria for grouping the Data Source Forms` data.","reorder":false,"addAnother":"Add Field","addAnotherPosition":"bottom","layoutFixed":false,"enableRowGroups":false,"initEmpty":true,"tableView":false,"redrawOn":"reportingForms","key":"groups.groupingFields","type":"datagrid","input":true,"components":[{"label":"Field","widget":"choicesjs","placeholder":"Grouping Field","hideLabel":true,"tableView":false,"dataSrc":"custom","data":{"custom":"var reportingForms = instance.root.data.reportingForms;\nvar calculatedColumns = instance.root.data.calculatedColumns;\nvar selectedItems = _.chain(instance.root.data.groups.groupingFields || [])\n .map(col => col.field)\n .filter(col => col && !_.isEqual(instance.dataValue, col))\n .value();\n\nvalues = utils.reporting.getReportingFormsComponentsAndExtraComponentsAsOptions({ reportingForms, calculatedColumns, selectedItems});"},"valueProperty":"value","validate":{"required":true},"key":"field","type":"select","input":true}]},{"label":"Calculated Aggregation Columns","tooltip":"Here you can add additional calculated columns to the Report Grid based on other aggregated columns.","tableView":false,"templates":{"header":"<div class=\"row\">\n {% util.eachComponent(components, function(component) { %}\n {% if (displayValue(component)) { %}\n <div class=\"col-sm-4 font-weight-bold\">{{ t(component.label) }}</div>\n {% } %}\n {% }) %}\n </div>","row":"<div class=\"row\">\n {% util.eachComponent(components, function(component) { %}\n {% if (displayValue(component)) { %}\n <div class=\"col-sm-4\">\n {{ isVisibleInRow(component) ? getView(component, row[component.key]) : ''}}\n </div>\n {% } %}\n {% }) %}\n {% if (!instance.options.readOnly && !instance.disabled) { %}\n <div class=\"col-sm-4\">\n <div class=\"btn-group pull-right\">\n <button class=\"btn btn-default btn-light btn-sm editRow\"><i class=\"{{ iconClass('edit') }}\"></i></button>\n {% if (!instance.hasRemoveButtons || instance.hasRemoveButtons()) { %}\n <button class=\"btn btn-danger btn-sm removeRow\"><i class=\"{{ iconClass('trash') }}\"></i></button>\n {% } %}\n </div>\n </div>\n {% } %}\n </div>"},"addAnother":"Add Column","rowDrafts":false,"key":"groups.calculatedColumns","customConditional":"var groupingFields = _.get(data, 'groups.groupingFields', []);\nshow = _.some(groupingFields, field => !!field.field);","type":"editgrid","displayAsTable":false,"input":true,"components":[{"label":"Columns","columns":[{"components":[{"label":"Column Title","applyMaskOn":"change","tableView":true,"validate":{"required":true},"key":"name","type":"textfield","input":true}],"width":6,"offset":0,"push":0,"pull":0,"size":"md","currentWidth":6},{"components":[{"label":"Column Key","applyMaskOn":"change","tableView":false,"calculateValue":"value = _.camelCase(row.name);","allowCalculateOverride":true,"validate":{"pattern":"(\\w|\\w[\\w-.]*\\w)","patternMessage":"The key must only contain alphanumeric characters, underscores, dots and dashes and should not be ended by dash or dot."},"key":"key","logic":[{"name":"make required","trigger":{"type":"javascript","javascript":"result = row.title;"},"actions":[{"name":"make required","type":"property","property":{"label":"Required","value":"validate.required","type":"boolean"},"state":true}]}],"type":"textfield","input":true}],"width":6,"offset":0,"push":0,"pull":0,"size":"md","currentWidth":6}],"key":"columns","type":"columns","input":false,"tableView":false},{"label":"Operator","widget":"choicesjs","tooltip":"Select operator to calculate column value","tableView":true,"dataSrc":"custom","data":{"custom":"values = utils.reporting.getAggregationOperatorsOptions(true);"},"valueProperty":"value","validate":{"required":true},"key":"operator","type":"select","input":true},{"label":"Argument","widget":"choicesjs","tableView":false,"dataSrc":"custom","data":{"custom":"var reportingForms = instance.root.data.reportingForms;\nvalues = utils.reporting.getReportingFormsComponentsAndExtraComponentsAsOptions({reportingForms, calculatedColumns: instance.root.data.calculatedColumns, operator: row.operator});"},"valueProperty":"value","validate":{"required":true},"key":"argument","customConditional":"show = utils.reporting.showGroupOperatorArg(row.operator);","type":"select","input":true},{"label":"Decimal Places","tooltip":"Enter the number of decimal places for the calculated value. If the original calculated value has more decimal places, the value will be rounded.","applyMaskOn":"change","mask":false,"tableView":false,"delimiter":false,"requireDecimal":false,"inputFormat":"plain","truncateMultipleSpaces":false,"key":"decimalLimit","customConditional":"show = utils.reporting.showAggregationOperatorArg(instance.component.key, row.operator);","type":"number","input":true}]}]},{"title":"Columns","breadcrumbClickable":true,"buttonSettings":{"previous":true,"cancel":true,"next":true},"navigateOnEnter":false,"saveOnEnter":false,"scrollToTop":false,"collapsible":false,"key":"columnsPanel","type":"panel","label":"Page 2","input":false,"tableView":false,"components":[{"html":"<p style=\"text-align:right;\"><span class=\"text-small\"><i>v{{form.properties.version}}</i></span></p>","label":"Content","customClass":"text-muted","refreshOnChange":false,"key":"version5","type":"content","input":false,"tableView":false},{"html":"<p><span class=\"text-big\"><strong>Report Setup - Columns </strong></span></p><p>Use the UI below to choose which columns are available to the end user of the Report. Then, select which columns the end user has available by default. The end user will start out with the default columns shown visually, with an option to choose which of the available columns they wish to see based on their requirements at runtime. </p>","label":"Basic Reporting Settings","refreshOnChange":false,"key":"basicReportingSettings2","type":"content","input":false,"tableView":false},{"label":"Columns List","persistent":false,"redrawOn":"reportingForms","calculateValue":"value = utils.reporting.getColumnsListOptions(data.reportingForms, data.groups, data.calculatedColumns);","key":"columnsList","type":"hidden","input":true,"tableView":false},{"label":"Report Type","persistent":false,"calculateValue":"value = utils.reporting.getReportTypeInfo(data, instance);","key":"reportType","type":"hidden","input":true,"tableView":false},{"label":"Available Columns","tooltip":"Available Columns that will be available for possible display in the Report Grid. The columns will display in the Report Grid in the order chosen here.","reorder":true,"addAnother":"Add Column","addAnotherPosition":"bottom","layoutFixed":false,"enableRowGroups":false,"initEmpty":true,"tableView":false,"validate":{"required":true},"key":"availableColumns","logic":[{"name":"clear Columns","trigger":{"type":"javascript","javascript":"result = data.reportType?.typeChanged;"},"actions":[{"name":"clear","type":"customAction","customAction":"instance.resetValue();"}]}],"type":"datagrid","input":true,"components":[{"label":"Column","widget":"choicesjs","tableView":true,"dataSrc":"custom","data":{"custom":"var selectedItems = _.chain(instance.root.data.availableColumns || [])\n .map(col => col.column)\n .filter(col => col && !_.isEqual(instance.dataValue, col))\n .value();\n\nvalues = utils.reporting.getUnselectedColumnsOptions(instance.root.data.columnsList, selectedItems);\n"},"valueProperty":"value","refreshOn":"columnsList","validate":{"required":true},"key":"column","type":"select","input":true},{"label":"Display Title","tooltip":"This title will be shown in the Report. If not set, original component title will be used.","applyMaskOn":"change","tableView":true,"key":"displayTitle","customConditional":"show = row.column && row.column.formId;","type":"textfield","input":true}]},{"label":"Default Columns","widget":"choicesjs","tooltip":"Default columns will be displayed in the Report Grid on initial load of the UI. If not set, all available columns will be displayed.","tableView":false,"multiple":true,"dataSrc":"custom","data":{"custom":"values = utils.reporting.getAvailableColumnsAsOptions(data.availableColumns, data.columnsList);"},"valueProperty":"value","refreshOn":"availableColumns","key":"defaultColumns","logic":[{"name":"clear Columns","trigger":{"type":"javascript","javascript":"result = data.reportType?.typeChanged;"},"actions":[{"name":"clear","type":"customAction","customAction":"instance.resetValue();"}]}],"type":"select","input":true}]},{"title":"Control Panel","breadcrumbClickable":true,"buttonSettings":{"previous":true,"cancel":true,"next":true},"navigateOnEnter":false,"saveOnEnter":false,"scrollToTop":false,"collapsible":false,"key":"controlsPanel","type":"panel","label":"Page 9","input":false,"tableView":false,"components":[{"html":"<p style=\"text-align:right;\"><span class=\"text-small\"><i>v{{form.properties.version}}</i></span></p>","label":"Content","customClass":"text-muted","refreshOnChange":false,"key":"version6","type":"content","input":false,"tableView":false},{"html":"<p><span class=\"text-big\"><strong>Control Panel - Basic Settings</strong></span></p><p>In addition to the Report Grid, a Control Panel can be enabled and customized here. This includes a Columns Selection UI, customized Filters, and Actions that can be performed on rows which are selected in the grid. </p>","label":"Basic Reporting Settings","refreshOnChange":false,"key":"basicReportingSettings7","type":"content","input":false,"tableView":false},{"label":"Enable Control Panel","tooltip":"When checked, a special Control Panel UI will display above the Report Grid. The Control Panel additional settings can be configured in the Filtering and Actions sections.","tableView":false,"defaultValue":false,"key":"enableControls","type":"checkbox","input":true},{"label":"Controls Settings","tableView":false,"key":"controlsSettings","customConditional":"show = data.enableControls;","type":"container","input":true,"components":[{"html":"<p><span class=\"text-big\">Report Controls - Basic Settings</span></p>","label":"Reporting Grid Basic Settings","refreshOnChange":false,"key":"basicReportingSettings8","type":"content","input":false,"tableView":false},{"label":"Control Panel Title","tooltip":"This title will be displayed for the Control Panel.","applyMaskOn":"change","tableView":true,"key":"title","type":"textfield","input":true},{"label":"Control Panel Theme","widget":"choicesjs","tableView":true,"defaultValue":"default","data":{"values":[{"label":"Default","value":"default"},{"label":"Primary","value":"primary"},{"label":"Info","value":"info"},{"label":"Success","value":"success"},{"label":"Danger","value":"danger"},{"label":"Warning","value":"warning"}]},"key":"theme","type":"select","input":true},{"label":"Initially Collapsed","tooltip":"If checked, the Control Panel will initially be collapsed.","tableView":false,"defaultValue":false,"key":"collapsePanel","type":"checkbox","input":true}]}]},{"title":"Filters ","collapsible":false,"key":"filtersPanel","conditional":{"show":true,"conjunction":"all","conditions":[{"component":"enableControls","operator":"isEqual","value":true}]},"type":"panel","label":"Page 3","breadcrumbClickable":true,"buttonSettings":{"previous":true,"cancel":true,"next":true},"navigateOnEnter":false,"saveOnEnter":false,"scrollToTop":false,"input":false,"tableView":false,"components":[{"html":"<p style=\"text-align:right;\"><span class=\"text-small\"><i>v{{form.properties.version}}</i></span></p>","label":"Content","customClass":"text-muted","refreshOnChange":false,"key":"version7","type":"content","input":false,"tableView":false},{"html":"<p><span class=\"text-big\"><strong>Control Panel - Filters</strong></span></p><p>Filters enable end users of this report to view any subset of data needed at runtime. Customize Filters for your Report Below. </p>","label":"Basic Reporting Settings","refreshOnChange":false,"key":"basicReportingSettings5","type":"content","input":false,"tableView":false},{"label":"Number Of Filters Per Row","widget":"choicesjs","tooltip":"How many filters display horizontally in each row of the Control Panel Filters Section.","tableView":false,"defaultValue":2,"data":{"values":[{"label":"1","value":"1"},{"label":"2","value":"2"},{"label":"3","value":"3"},{"label":"4","value":"4"}]},"dataType":"number","key":"filtersPerRow","type":"select","input":true},{"label":"Filter Label Position","widget":"choicesjs","tooltip":"Position for the labels of the Controls Filter Fields.","tableView":false,"defaultValue":"top","data":{"values":[{"label":"Top","value":"top"},{"label":"Left","value":"left-left"},{"label":"Right","value":"right-right"}]},"key":"filterLabelPosition","type":"select","input":true},{"label":"Control Panel Filters","tooltip":"Add the fields by which you want to filter the data within the Report. These filters will display in the Report Control Panel UI.","reorder":true,"addAnotherPosition":"bottom","layoutFixed":false,"enableRowGroups":false,"initEmpty":true,"tableView":false,"key":"filters","type":"datagrid","input":true,"components":[{"label":"Field","widget":"choicesjs","tableView":true,"dataSrc":"custom","data":{"custom":"values = instance.root.data.columnsList;"},"valueProperty":"value","refreshOn":"columnsList","validate":{"required":true},"key":"field","type":"select","input":true},{"label":"Filter Type","widget":"choicesjs","tooltip":"Select filter operator you want to apply for filtering the field.","tableView":true,"dataSrc":"custom","data":{"custom":"var calculatedExtraColumns = instance.root.data.calculatedColumns || [];\nvar calculatedGroupingColumns = _.get(instance, 'root.data.groups.calculatedColumns', []);\n\nvalues = utils.reporting.getControlsFilterOperators(row.field, instance.root.data.reportingForms, [...calculatedExtraColumns, ...calculatedGroupingColumns])"},"valueProperty":"value","validate":{"required":true},"key":"filterType","type":"select","input":true},{"label":"Filter Title","tooltip":"This title will be displayed next to the filter. If not set, the label of the filter field is used.","applyMaskOn":"change","tableView":true,"key":"filterTitle","type":"textfield","input":true}]}]},{"title":"Actions","collapsible":false,"key":"actionsPanel","conditional":{"show":true,"conjunction":"all","conditions":[{"component":"enableControls","operator":"isEqual","value":true}]},"type":"panel","label":"Page 4","breadcrumbClickable":true,"buttonSettings":{"previous":true,"cancel":true,"next":true},"navigateOnEnter":false,"saveOnEnter":false,"scrollToTop":false,"input":false,"tableView":false,"components":[{"html":"<p style=\"text-align:right;\"><span class=\"text-small\"><i>v{{form.properties.version}}</i></span></p>","label":"Content","customClass":"text-muted","refreshOnChange":false,"key":"version8","type":"content","input":false,"tableView":false},{"html":"<p><span class=\"text-big\"><strong>Control Panel - Actions</strong></span></p><p>Enable end users of the Report to execute actions on rows which are selected within the Report Grid. Select a default Action, or create any customized Action to meet bespoke requirements by entering custom Javascript below. </p>","label":"Basic Reporting Settings","refreshOnChange":false,"key":"basicReportingSettings6","type":"content","input":false,"tableView":false},{"label":"Actions","tooltip":"Actions will be displayed in Actions of the Control Panel and will be applied for selected rows in the Report Grid.","tableView":false,"templates":{"header":"<div class=\"row\">\n {% util.eachComponent(components, function(component) { %}\n {% if (displayValue(component)) { %}\n <div class=\"col-sm-4 font-weight-bold\">{{ t(component.label) }}</div>\n {% } %}\n {% }) %}\n </div>","row":"<div class=\"row\">\n {% util.eachComponent(components, function(component) { %}\n {% if (displayValue(component)) { %}\n <div class=\"col-sm-4\">\n {{ isVisibleInRow(component) ? getView(component, row[component.key]) : ''}}\n </div>\n {% } %}\n {% }) %}\n {% if (!instance.options.readOnly && !instance.disabled) { %}\n <div class=\"col-sm-4\">\n <div class=\"btn-group pull-right\">\n <button class=\"btn btn-default btn-light btn-sm editRow\"><i class=\"{{ iconClass('edit') }}\"></i></button>\n {% if (!instance.hasRemoveButtons || instance.hasRemoveButtons()) { %}\n <button class=\"btn btn-danger btn-sm removeRow\"><i class=\"{{ iconClass('trash') }}\"></i></button>\n {% } %}\n </div>\n </div>\n {% } %}\n </div>"},"addAnother":"Add Action","rowDrafts":false,"key":"actions","type":"editgrid","displayAsTable":false,"input":true,"components":[{"label":"Title","tooltip":"Action title that will be shown in the Control Panel.","applyMaskOn":"change","tableView":true,"validate":{"required":true},"key":"title","type":"textfield","input":true},{"label":"Type","widget":"choicesjs","tableView":true,"data":{"values":[{"label":"Export CSV","value":"csv"},{"label":"Download PDF","value":"pdf"},{"label":"Custom","value":"custom"}]},"validate":{"required":true},"key":"type","type":"select","input":true},{"label":"Apply action for:","optionsLabelPosition":"right","inline":true,"tableView":false,"defaultValue":"availableColumns","values":[{"label":"All Available Columns","value":"availableColumns","shortcut":""},{"label":"Visible Columns","value":"visibleColumns","shortcut":""}],"validate":{"required":true},"key":"applyFor","customConditional":"show = _.includes(['csv', 'pdf'], row.type);","type":"radio","input":true},{"label":"Custom JS Code","placeholder":"promise = Promise.resolve(true);","tooltip":"Enter custom JavaScript code that will be executed for selected rows. If you want the Report Grid to redraw and reload the page data after the custom action is performed, the promise should return true.","applyMaskOn":"change","editor":"ace","autoExpand":false,"tableView":false,"validate":{"required":true},"key":"customCode","conditional":{"conjunction":"all"},"customConditional":"show = row.type === 'custom';","type":"textarea","input":true},{"label":"HTML","attrs":[{"attr":"","value":""}],"content":"{{utils.reporting.getCustomScriptAvailableVarialbles()}}\n","refreshOnChange":false,"key":"html","customConditional":"show = row.type === 'custom';","type":"htmlelement","input":false,"tableView":false}]}]}],"access":[{"type":"read_all","roles":["administrator","authenticated","anonymous"]}],"submissionAccess":[{"type":"read_all","roles":["administrator","authenticated","anonymous"]}],"properties":{"version":5},"controller":"instance.submissionReady.then((subm) => {\n instance.emit('formsSet');\n});\n","submissionRevisions":"","tags":["noBuilderResource"]}},"actions":{"reportingui:save":{"title":"Save Submission","name":"save","form":"reportingui","priority":10,"method":["create","update"],"handler":["before"]}}}
|
package/reporting.css
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sourceRoot":"","sources":["../src/sass/reporting.scss"],"names":[],"mappings":"AAAA;AAAA;EAEE","file":"reporting.css"}
|