@formio/reporting 2.0.1-rc.3 → 2.0.1-rc.6
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 +8 -0
- package/lib/ReportForm.d.ts +7 -0
- package/lib/components/ReportingControls/ReportingControls.d.ts +36 -0
- package/lib/components/ReportingGrid/ReportingGrid.d.ts +56 -0
- package/lib/components/ReportingGrid/customFilters.d.ts +12 -0
- package/lib/components/index.d.ts +7 -0
- package/lib/index.d.ts +32 -0
- package/lib/licenseCheck/common.d.ts +5 -0
- package/lib/licenseCheck/index.d.ts +1 -0
- package/lib/licenseCheck/noLicenseCheck.d.ts +5 -0
- package/lib/providers/ReportingUrlFetchProvider.d.ts +85 -0
- package/lib/providers/index.d.ts +5 -0
- package/lib/services/ReportingStorageService.d.ts +7 -0
- package/lib/templates/bootstrap/index.d.ts +6 -0
- package/lib/templates/bootstrap/reportingGrid/index.d.ts +4 -0
- package/lib/templates/index.d.ts +23 -0
- package/lib/utils/AggregationOperators/AggregationOperator.d.ts +24 -0
- package/lib/utils/AggregationOperators/Avg.d.ts +15 -0
- package/lib/utils/AggregationOperators/Concat.d.ts +16 -0
- package/lib/utils/AggregationOperators/Count.d.ts +17 -0
- package/lib/utils/AggregationOperators/DateDiff.d.ts +20 -0
- package/lib/utils/AggregationOperators/DayOfMonth.d.ts +18 -0
- package/lib/utils/AggregationOperators/DayOfWeek.d.ts +18 -0
- package/lib/utils/AggregationOperators/DayOfYear.d.ts +18 -0
- package/lib/utils/AggregationOperators/Divide.d.ts +22 -0
- package/lib/utils/AggregationOperators/Max.d.ts +15 -0
- package/lib/utils/AggregationOperators/Min.d.ts +15 -0
- package/lib/utils/AggregationOperators/Month.d.ts +18 -0
- package/lib/utils/AggregationOperators/Multiply.d.ts +15 -0
- package/lib/utils/AggregationOperators/Percentage.d.ts +15 -0
- package/lib/utils/AggregationOperators/Size.d.ts +23 -0
- package/lib/utils/AggregationOperators/Subtract.d.ts +16 -0
- package/lib/utils/AggregationOperators/Sum.d.ts +18 -0
- package/lib/utils/AggregationOperators/Week.d.ts +18 -0
- package/lib/utils/AggregationOperators/Year.d.ts +18 -0
- package/lib/utils/AggregationOperators/index.d.ts +22 -0
- package/lib/utils/FilterOperators.d.ts +4 -0
- package/lib/utils/configurationFormUtils.d.ts +72 -0
- package/lib/utils/controlsUtils.d.ts +255 -0
- package/lib/utils/filtersQueries.d.ts +21 -0
- package/lib/utils/gridUtils.d.ts +3 -0
- package/lib/utils/index.d.ts +314 -0
- package/lib/utils/libraryName.d.ts +2 -0
- package/lib/utils/utils.d.ts +31 -0
- package/package.json +2 -2
- package/reporting.js +1 -1
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
/// <reference types="lodash" />
|
|
2
|
+
/// <reference types="lodash" />
|
|
3
|
+
/// <reference types="lodash" />
|
|
4
|
+
/// <reference types="lodash" />
|
|
5
|
+
/// <reference types="lodash" />
|
|
6
|
+
/// <reference types="lodash" />
|
|
7
|
+
/// <reference types="lodash" />
|
|
8
|
+
/// <reference types="lodash" />
|
|
9
|
+
/// <reference types="lodash" />
|
|
10
|
+
/// <reference types="lodash" />
|
|
11
|
+
/// <reference types="lodash" />
|
|
12
|
+
/// <reference types="lodash" />
|
|
13
|
+
/// <reference types="lodash" />
|
|
14
|
+
declare const ReportingUtils: {
|
|
15
|
+
FilterOperators: {
|
|
16
|
+
[x: string]: typeof import("@formio/js/lib/cjs/utils/conditionOperators/IsEqualTo").default | typeof import("@formio/js/lib/cjs/utils/conditionOperators/DateGreaterThan").default;
|
|
17
|
+
};
|
|
18
|
+
filtersQueries: {
|
|
19
|
+
equal: string;
|
|
20
|
+
notEqual: string;
|
|
21
|
+
startsWith: string;
|
|
22
|
+
contain: string;
|
|
23
|
+
notContain: string;
|
|
24
|
+
endsWith: string;
|
|
25
|
+
matches: string;
|
|
26
|
+
greaterThen: string;
|
|
27
|
+
greaterThenOrEqual: string;
|
|
28
|
+
lessThen: string;
|
|
29
|
+
lessThenOrEqual: string;
|
|
30
|
+
exist: string;
|
|
31
|
+
empty: string;
|
|
32
|
+
notEmpty: string;
|
|
33
|
+
notExist: string;
|
|
34
|
+
sort: string;
|
|
35
|
+
limit: string;
|
|
36
|
+
skip: string;
|
|
37
|
+
};
|
|
38
|
+
getColumnsTab(): {
|
|
39
|
+
label: string;
|
|
40
|
+
key: string;
|
|
41
|
+
components: ({
|
|
42
|
+
label: string;
|
|
43
|
+
hideLabel: boolean;
|
|
44
|
+
description: string;
|
|
45
|
+
widget: string;
|
|
46
|
+
multiple: boolean;
|
|
47
|
+
dataSrc: string;
|
|
48
|
+
valueProperty: string;
|
|
49
|
+
dataType: string;
|
|
50
|
+
key: string;
|
|
51
|
+
data: {
|
|
52
|
+
custom({ instance, _ }: {
|
|
53
|
+
instance: any;
|
|
54
|
+
_: any;
|
|
55
|
+
}): any;
|
|
56
|
+
};
|
|
57
|
+
customDefaultValue({ instance, _ }: {
|
|
58
|
+
instance: any;
|
|
59
|
+
_: any;
|
|
60
|
+
}): any;
|
|
61
|
+
type: string;
|
|
62
|
+
input: boolean;
|
|
63
|
+
action?: undefined;
|
|
64
|
+
showValidations?: undefined;
|
|
65
|
+
event?: undefined;
|
|
66
|
+
} | {
|
|
67
|
+
label: string;
|
|
68
|
+
action: string;
|
|
69
|
+
showValidations: boolean;
|
|
70
|
+
key: string;
|
|
71
|
+
type: string;
|
|
72
|
+
event: string;
|
|
73
|
+
input: boolean;
|
|
74
|
+
hideLabel?: undefined;
|
|
75
|
+
description?: undefined;
|
|
76
|
+
widget?: undefined;
|
|
77
|
+
multiple?: undefined;
|
|
78
|
+
dataSrc?: undefined;
|
|
79
|
+
valueProperty?: undefined;
|
|
80
|
+
dataType?: undefined;
|
|
81
|
+
data?: undefined;
|
|
82
|
+
})[];
|
|
83
|
+
};
|
|
84
|
+
getSingleFilterOperators(): string[];
|
|
85
|
+
getSingleFilterOperatorValueComp(filter: any): {
|
|
86
|
+
widget: string;
|
|
87
|
+
data: {
|
|
88
|
+
values: {
|
|
89
|
+
label: string;
|
|
90
|
+
value: string;
|
|
91
|
+
}[];
|
|
92
|
+
};
|
|
93
|
+
dataType: string;
|
|
94
|
+
type: string;
|
|
95
|
+
input: boolean;
|
|
96
|
+
};
|
|
97
|
+
getFilterSetStyleLogic(): {
|
|
98
|
+
name: string;
|
|
99
|
+
trigger: {
|
|
100
|
+
type: string;
|
|
101
|
+
javascript: string;
|
|
102
|
+
};
|
|
103
|
+
actions: {
|
|
104
|
+
name: string;
|
|
105
|
+
type: string;
|
|
106
|
+
customAction: string;
|
|
107
|
+
}[];
|
|
108
|
+
};
|
|
109
|
+
getFilterColumns(filterComponents: any, filtersPerRow?: number): any[];
|
|
110
|
+
getFiltersTab(filterComponents: any, filtersPerRow: any): {
|
|
111
|
+
label: string;
|
|
112
|
+
key: string;
|
|
113
|
+
components: ({
|
|
114
|
+
label: string;
|
|
115
|
+
key: string;
|
|
116
|
+
type: string;
|
|
117
|
+
input: boolean;
|
|
118
|
+
components: any[];
|
|
119
|
+
columns?: undefined;
|
|
120
|
+
} | {
|
|
121
|
+
label: string;
|
|
122
|
+
columns: ({
|
|
123
|
+
components: {
|
|
124
|
+
label: string;
|
|
125
|
+
action: string;
|
|
126
|
+
showValidations: boolean;
|
|
127
|
+
disableOnInvalid: boolean;
|
|
128
|
+
key: string;
|
|
129
|
+
type: string;
|
|
130
|
+
event: string;
|
|
131
|
+
input: boolean;
|
|
132
|
+
}[];
|
|
133
|
+
width: number;
|
|
134
|
+
offset: number;
|
|
135
|
+
push: number;
|
|
136
|
+
pull: number;
|
|
137
|
+
size: string;
|
|
138
|
+
currentWidth: number;
|
|
139
|
+
} | {
|
|
140
|
+
components: {
|
|
141
|
+
label: string;
|
|
142
|
+
action: string;
|
|
143
|
+
showValidations: boolean;
|
|
144
|
+
theme: string;
|
|
145
|
+
key: string;
|
|
146
|
+
type: string;
|
|
147
|
+
event: string;
|
|
148
|
+
input: boolean;
|
|
149
|
+
}[];
|
|
150
|
+
width: number;
|
|
151
|
+
offset: number;
|
|
152
|
+
push: number;
|
|
153
|
+
pull: number;
|
|
154
|
+
size: string;
|
|
155
|
+
currentWidth: number;
|
|
156
|
+
})[];
|
|
157
|
+
key: string;
|
|
158
|
+
type: string;
|
|
159
|
+
input: boolean;
|
|
160
|
+
components?: undefined;
|
|
161
|
+
})[];
|
|
162
|
+
};
|
|
163
|
+
getActionsTab(actions: any): {
|
|
164
|
+
label: string;
|
|
165
|
+
key: string;
|
|
166
|
+
components: ({
|
|
167
|
+
label: string;
|
|
168
|
+
widget: string;
|
|
169
|
+
data: {
|
|
170
|
+
values: {
|
|
171
|
+
label: any;
|
|
172
|
+
value: string;
|
|
173
|
+
}[];
|
|
174
|
+
};
|
|
175
|
+
dataType: string;
|
|
176
|
+
key: string;
|
|
177
|
+
type: string;
|
|
178
|
+
hideLabel: boolean;
|
|
179
|
+
placeholder: string;
|
|
180
|
+
description: string;
|
|
181
|
+
input: boolean;
|
|
182
|
+
action?: undefined;
|
|
183
|
+
event?: undefined;
|
|
184
|
+
disabled?: undefined;
|
|
185
|
+
logic?: undefined;
|
|
186
|
+
} | {
|
|
187
|
+
label: string;
|
|
188
|
+
action: string;
|
|
189
|
+
key: string;
|
|
190
|
+
type: string;
|
|
191
|
+
event: string;
|
|
192
|
+
input: boolean;
|
|
193
|
+
disabled: boolean;
|
|
194
|
+
logic: ({
|
|
195
|
+
name: string;
|
|
196
|
+
trigger: {
|
|
197
|
+
type: string;
|
|
198
|
+
javascript: string;
|
|
199
|
+
event?: undefined;
|
|
200
|
+
};
|
|
201
|
+
actions: {
|
|
202
|
+
name: string;
|
|
203
|
+
type: string;
|
|
204
|
+
property: {
|
|
205
|
+
label: string;
|
|
206
|
+
value: string;
|
|
207
|
+
type: string;
|
|
208
|
+
};
|
|
209
|
+
state: boolean;
|
|
210
|
+
}[];
|
|
211
|
+
} | {
|
|
212
|
+
name: string;
|
|
213
|
+
trigger: {
|
|
214
|
+
type: string;
|
|
215
|
+
javascript: string;
|
|
216
|
+
event?: undefined;
|
|
217
|
+
};
|
|
218
|
+
actions: {
|
|
219
|
+
name: string;
|
|
220
|
+
type: string;
|
|
221
|
+
property: {
|
|
222
|
+
label: string;
|
|
223
|
+
value: string;
|
|
224
|
+
type: string;
|
|
225
|
+
};
|
|
226
|
+
text: string;
|
|
227
|
+
}[];
|
|
228
|
+
} | {
|
|
229
|
+
name: string;
|
|
230
|
+
trigger: {
|
|
231
|
+
type: string;
|
|
232
|
+
event: string;
|
|
233
|
+
javascript?: undefined;
|
|
234
|
+
};
|
|
235
|
+
actions: {
|
|
236
|
+
name: string;
|
|
237
|
+
type: string;
|
|
238
|
+
customAction: string;
|
|
239
|
+
}[];
|
|
240
|
+
})[];
|
|
241
|
+
widget?: undefined;
|
|
242
|
+
data?: undefined;
|
|
243
|
+
dataType?: undefined;
|
|
244
|
+
hideLabel?: undefined;
|
|
245
|
+
placeholder?: undefined;
|
|
246
|
+
description?: undefined;
|
|
247
|
+
})[];
|
|
248
|
+
};
|
|
249
|
+
getControlsTabsComponet({ title, collapsePanel, theme, tabs, }: {
|
|
250
|
+
title?: string;
|
|
251
|
+
collapsePanel?: boolean;
|
|
252
|
+
theme?: string;
|
|
253
|
+
tabs?: any[];
|
|
254
|
+
}): {
|
|
255
|
+
title: string;
|
|
256
|
+
collapsible: boolean;
|
|
257
|
+
key: string;
|
|
258
|
+
type: string;
|
|
259
|
+
label: string;
|
|
260
|
+
collapsed: boolean;
|
|
261
|
+
theme: string;
|
|
262
|
+
components: {
|
|
263
|
+
label: string;
|
|
264
|
+
components: any[];
|
|
265
|
+
key: string;
|
|
266
|
+
type: string;
|
|
267
|
+
input: boolean;
|
|
268
|
+
}[];
|
|
269
|
+
};
|
|
270
|
+
convertToCSV({ submissions, components, fileName }: {
|
|
271
|
+
submissions: any;
|
|
272
|
+
components: any;
|
|
273
|
+
fileName: any;
|
|
274
|
+
}): void;
|
|
275
|
+
reportingControlsConfig: {
|
|
276
|
+
controlsKey: string;
|
|
277
|
+
filtersCompKey: string;
|
|
278
|
+
actionCompKey: string;
|
|
279
|
+
displayedColumnsCompKey: string;
|
|
280
|
+
events: {
|
|
281
|
+
applyColumns: string;
|
|
282
|
+
filter: string;
|
|
283
|
+
clearFilters: string;
|
|
284
|
+
performAction: string;
|
|
285
|
+
};
|
|
286
|
+
filterSetClass: string;
|
|
287
|
+
};
|
|
288
|
+
getPDFDownloadUrl: ({ projectId, submissions, form }: {
|
|
289
|
+
projectId: any;
|
|
290
|
+
submissions: any;
|
|
291
|
+
form: any;
|
|
292
|
+
}) => Promise<string>;
|
|
293
|
+
reportingGridConfig: {
|
|
294
|
+
gridKey: string;
|
|
295
|
+
};
|
|
296
|
+
convertReportingFormCompIntoGridComp(comp: any, columnSettings: any): import("lodash").Omit<any, "logic" | "prefix" | "suffix" | "action" | "defaultValue" | "conditional" | "hideLabel" | "calculateValue" | "validate" | "hidden" | "customConditional">;
|
|
297
|
+
getCalcOperatorFieldArgs(columnSettings: any): any;
|
|
298
|
+
convertReportingCalcSettingsIntoGridComp(columnSettings: any, reportingConfig?: any): any;
|
|
299
|
+
getPropertyFromFormId(formId: any): string;
|
|
300
|
+
getDataPath(setting: any): string;
|
|
301
|
+
getJoinedFormDataPathInJoinedObj(formId: any): string;
|
|
302
|
+
getAggrOperatorNumberField(settings: any, reportingConfig?: any): {
|
|
303
|
+
type: string;
|
|
304
|
+
};
|
|
305
|
+
_: import("lodash").LoDashStatic;
|
|
306
|
+
valueTypes: any;
|
|
307
|
+
connectionByFullSubmissionObjectOptionValue: "submissionObject*";
|
|
308
|
+
defaultColumns: {
|
|
309
|
+
path: string;
|
|
310
|
+
component: any;
|
|
311
|
+
submissionRootPath: boolean;
|
|
312
|
+
}[];
|
|
313
|
+
};
|
|
314
|
+
export default ReportingUtils;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/// <reference types="lodash" />
|
|
2
|
+
/// <reference types="lodash" />
|
|
3
|
+
/// <reference types="lodash" />
|
|
4
|
+
/// <reference types="lodash" />
|
|
5
|
+
/// <reference types="lodash" />
|
|
6
|
+
/// <reference types="lodash" />
|
|
7
|
+
/// <reference types="lodash" />
|
|
8
|
+
/// <reference types="lodash" />
|
|
9
|
+
/// <reference types="lodash" />
|
|
10
|
+
/// <reference types="lodash" />
|
|
11
|
+
/// <reference types="lodash" />
|
|
12
|
+
/// <reference types="lodash" />
|
|
13
|
+
/// <reference types="lodash" />
|
|
14
|
+
import { Utils } from '@formio/js';
|
|
15
|
+
export declare const _: Utils._.LoDashStatic;
|
|
16
|
+
export declare const valueTypes: any;
|
|
17
|
+
export declare function convertReportingFormCompIntoGridComp(comp: any, columnSettings: any): Utils._.Omit<any, "logic" | "prefix" | "suffix" | "action" | "defaultValue" | "conditional" | "hideLabel" | "calculateValue" | "validate" | "hidden" | "customConditional">;
|
|
18
|
+
export declare function getCalcOperatorFieldArgs(columnSettings: any): any;
|
|
19
|
+
export declare function convertReportingCalcSettingsIntoGridComp(columnSettings: any, reportingConfig?: any): any;
|
|
20
|
+
export declare function getPropertyFromFormId(formId: any): string;
|
|
21
|
+
export declare function getDataPath(setting: any): string;
|
|
22
|
+
export declare function getJoinedFormDataPathInJoinedObj(formId: any): string;
|
|
23
|
+
export declare const connectionByFullSubmissionObjectOptionValue = "submissionObject*";
|
|
24
|
+
export declare const defaultColumns: {
|
|
25
|
+
path: string;
|
|
26
|
+
component: any;
|
|
27
|
+
submissionRootPath: boolean;
|
|
28
|
+
}[];
|
|
29
|
+
export declare function getAggrOperatorNumberField(settings: any, reportingConfig?: any): {
|
|
30
|
+
type: string;
|
|
31
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@formio/reporting",
|
|
3
|
-
"version": "2.0.1-rc.
|
|
3
|
+
"version": "2.0.1-rc.6",
|
|
4
4
|
"description": "Reporting components for form.io",
|
|
5
5
|
"main": "reporting.js",
|
|
6
6
|
"scripts": {
|
|
@@ -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.12",
|
|
40
40
|
"@types/file-saver": "^2.0.5",
|
|
41
41
|
"@types/mocha": "^10.0.1",
|
|
42
42
|
"@types/node": "^20.1.5",
|