@formio/reporting 2.2.6 → 2.3.0

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/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import Report from './Report';
2
2
  import ReportingUtils from './utils';
3
3
  import * as ReportingConfigUtils from './utils/configurationFormUtils';
4
- export { Report, ReportingUtils };
4
+ export { Report, ReportingUtils, ReportingConfigUtils };
5
5
  declare const _default: {
6
6
  Report: {
7
7
  new (elementOrForm: any, formOrOptions: any, options?: any): {
@@ -310,6 +310,7 @@ declare const _default: {
310
310
  submissionRootPath: boolean;
311
311
  }[];
312
312
  };
313
+ utils: typeof ReportingConfigUtils;
313
314
  components: {
314
315
  reportingcontrols: typeof import("./components/ReportingControls/ReportingControls").default;
315
316
  reportinggrid: typeof import("./components/ReportingGrid/ReportingGrid").default;
@@ -336,7 +337,6 @@ declare const _default: {
336
337
  };
337
338
  };
338
339
  };
339
- utils: typeof ReportingConfigUtils;
340
340
  library: string;
341
341
  };
342
342
  export default _default;
@@ -0,0 +1,339 @@
1
+ import * as reportingConfig from './index';
2
+ declare const _default: {
3
+ Report: {
4
+ new (elementOrForm: any, formOrOptions: any, options?: any): {
5
+ [x: string]: any;
6
+ setForm(reportParam: any): any;
7
+ create(): any;
8
+ };
9
+ [x: string]: any;
10
+ create(elementOrForm: any, formOrOptions: any, options?: {}): any;
11
+ };
12
+ ReportingUtils: {
13
+ FilterOperators: {
14
+ [x: string]: typeof import("@formio/js/lib/cjs/utils/conditionOperators/IsEqualTo").default | typeof import("@formio/js/lib/cjs/utils/conditionOperators/IsEmptyValue").default | typeof import("@formio/js/lib/cjs/utils/conditionOperators/DateGreaterThan").default;
15
+ };
16
+ filtersQueries: {
17
+ equal: string;
18
+ notEqual: string;
19
+ startsWith: string;
20
+ contain: string;
21
+ notContain: string;
22
+ endsWith: string;
23
+ matches: string;
24
+ greaterThen: string;
25
+ greaterThenOrEqual: string;
26
+ lessThen: string;
27
+ lessThenOrEqual: string;
28
+ exist: string;
29
+ empty: string;
30
+ notEmpty: string;
31
+ notExist: string;
32
+ sort: string;
33
+ limit: string;
34
+ skip: string;
35
+ };
36
+ getColumnsTab(): {
37
+ label: string;
38
+ key: string;
39
+ components: ({
40
+ label: string;
41
+ hideLabel: boolean;
42
+ description: string;
43
+ widget: string;
44
+ multiple: boolean;
45
+ dataSrc: string;
46
+ valueProperty: string;
47
+ dataType: string;
48
+ key: string;
49
+ data: {
50
+ custom({ instance, _ }: {
51
+ instance: any;
52
+ _: any;
53
+ }): any;
54
+ };
55
+ customDefaultValue({ instance, _ }: {
56
+ instance: any;
57
+ _: any;
58
+ }): any;
59
+ type: string;
60
+ input: boolean;
61
+ action?: undefined;
62
+ showValidations?: undefined;
63
+ event?: undefined;
64
+ } | {
65
+ label: string;
66
+ action: string;
67
+ showValidations: boolean;
68
+ key: string;
69
+ type: string;
70
+ event: string;
71
+ input: boolean;
72
+ hideLabel?: undefined;
73
+ description?: undefined;
74
+ widget?: undefined;
75
+ multiple?: undefined;
76
+ dataSrc?: undefined;
77
+ valueProperty?: undefined;
78
+ dataType?: undefined;
79
+ data?: undefined;
80
+ customDefaultValue?: undefined;
81
+ })[];
82
+ };
83
+ getSingleFilterOperators(): any;
84
+ getSingleFilterOperatorValueComp(filter: any): {
85
+ widget: string;
86
+ data: {
87
+ values: {
88
+ label: string;
89
+ value: string;
90
+ }[];
91
+ };
92
+ dataType: string;
93
+ type: string;
94
+ input: boolean;
95
+ };
96
+ getFilterSetStyleLogic(): {
97
+ name: string;
98
+ trigger: {
99
+ type: string;
100
+ javascript: string;
101
+ };
102
+ actions: {
103
+ name: string;
104
+ type: string;
105
+ customAction: string;
106
+ }[];
107
+ };
108
+ getFilterColumns(filterComponents: any, filtersPerRow?: number): any[];
109
+ getFiltersTab(filterComponents: any, filtersPerRow: any): {
110
+ label: string;
111
+ key: string;
112
+ components: ({
113
+ label: string;
114
+ key: string;
115
+ type: string;
116
+ input: boolean;
117
+ components: any[];
118
+ columns?: undefined;
119
+ } | {
120
+ label: string;
121
+ columns: ({
122
+ components: {
123
+ label: string;
124
+ action: string;
125
+ showValidations: boolean;
126
+ disableOnInvalid: boolean;
127
+ key: string;
128
+ type: string;
129
+ event: string;
130
+ input: boolean;
131
+ }[];
132
+ width: number;
133
+ offset: number;
134
+ push: number;
135
+ pull: number;
136
+ size: string;
137
+ currentWidth: number;
138
+ } | {
139
+ components: {
140
+ label: string;
141
+ action: string;
142
+ showValidations: boolean;
143
+ theme: string;
144
+ key: string;
145
+ type: string;
146
+ event: string;
147
+ input: boolean;
148
+ }[];
149
+ width: number;
150
+ offset: number;
151
+ push: number;
152
+ pull: number;
153
+ size: string;
154
+ currentWidth: number;
155
+ })[];
156
+ key: string;
157
+ type: string;
158
+ input: boolean;
159
+ components?: undefined;
160
+ })[];
161
+ };
162
+ getActionsTab(actions: any): {
163
+ label: string;
164
+ key: string;
165
+ components: ({
166
+ label: string;
167
+ widget: string;
168
+ data: {
169
+ values: any;
170
+ };
171
+ dataType: string;
172
+ key: string;
173
+ type: string;
174
+ hideLabel: boolean;
175
+ placeholder: string;
176
+ description: string;
177
+ input: boolean;
178
+ action?: undefined;
179
+ event?: undefined;
180
+ disabled?: undefined;
181
+ logic?: undefined;
182
+ } | {
183
+ label: string;
184
+ action: string;
185
+ key: string;
186
+ type: string;
187
+ event: string;
188
+ input: boolean;
189
+ disabled: boolean;
190
+ logic: ({
191
+ name: string;
192
+ trigger: {
193
+ type: string;
194
+ javascript: string;
195
+ event?: undefined;
196
+ };
197
+ actions: {
198
+ name: string;
199
+ type: string;
200
+ property: {
201
+ label: string;
202
+ value: string;
203
+ type: string;
204
+ };
205
+ state: boolean;
206
+ }[];
207
+ } | {
208
+ name: string;
209
+ trigger: {
210
+ type: string;
211
+ javascript: string;
212
+ event?: undefined;
213
+ };
214
+ actions: {
215
+ name: string;
216
+ type: string;
217
+ property: {
218
+ label: string;
219
+ value: string;
220
+ type: string;
221
+ };
222
+ text: string;
223
+ }[];
224
+ } | {
225
+ name: string;
226
+ trigger: {
227
+ type: string;
228
+ event: string;
229
+ javascript?: undefined;
230
+ };
231
+ actions: {
232
+ name: string;
233
+ type: string;
234
+ customAction: string;
235
+ }[];
236
+ })[];
237
+ widget?: undefined;
238
+ data?: undefined;
239
+ dataType?: undefined;
240
+ hideLabel?: undefined;
241
+ placeholder?: undefined;
242
+ description?: undefined;
243
+ })[];
244
+ };
245
+ getControlsTabsComponet({ title, collapsePanel, theme, tabs, }: {
246
+ title?: string;
247
+ collapsePanel?: boolean;
248
+ theme?: string;
249
+ tabs?: any[];
250
+ }): {
251
+ title: string;
252
+ collapsible: boolean;
253
+ key: string;
254
+ type: string;
255
+ label: string;
256
+ collapsed: boolean;
257
+ theme: string;
258
+ components: {
259
+ label: string;
260
+ components: any[];
261
+ key: string;
262
+ type: string;
263
+ input: boolean;
264
+ }[];
265
+ };
266
+ convertToCSV({ submissions, components, fileName }: {
267
+ submissions: any;
268
+ components: any;
269
+ fileName: any;
270
+ }): void;
271
+ reportingControlsConfig: {
272
+ controlsKey: string;
273
+ filtersCompKey: string;
274
+ actionCompKey: string;
275
+ displayedColumnsCompKey: string;
276
+ events: {
277
+ applyColumns: string;
278
+ filter: string;
279
+ clearFilters: string;
280
+ performAction: string;
281
+ };
282
+ filterSetClass: string;
283
+ };
284
+ getPDFDownloadUrl: ({ projectId, submissions, form }: {
285
+ projectId: any;
286
+ submissions: any;
287
+ form: any;
288
+ }) => Promise<string>;
289
+ reportingGridConfig: {
290
+ gridKey: string;
291
+ };
292
+ convertReportingFormCompIntoGridComp(comp: any, columnSettings: any): any;
293
+ getCalcOperatorFieldArgs(columnSettings: any): any;
294
+ convertReportingCalcSettingsIntoGridComp(columnSettings: any, reportingConfig?: any): any;
295
+ getPropertyFromFormId(formId: any): string;
296
+ getDataPath(setting: any): string;
297
+ getJoinedFormDataPathInJoinedObj(formId: any): string;
298
+ getAggrOperatorNumberField(settings: any, reportingConfig?: any): {
299
+ type: string;
300
+ };
301
+ _: any;
302
+ valueTypes: any;
303
+ connectionByFullSubmissionObjectOptionValue: "submissionObject*";
304
+ defaultColumns: {
305
+ path: string;
306
+ component: any;
307
+ submissionRootPath: boolean;
308
+ }[];
309
+ };
310
+ utils: typeof reportingConfig.ReportingConfigUtils;
311
+ components: {
312
+ reportingcontrols: typeof import("./components/ReportingControls/ReportingControls").default;
313
+ reportinggrid: typeof import("./components/ReportingGrid/ReportingGrid").default;
314
+ };
315
+ templates: {
316
+ bootstrap: {
317
+ reportingGrid: {
318
+ form: string;
319
+ };
320
+ };
321
+ bootstrap3: {
322
+ reportingGrid: {
323
+ form: string;
324
+ };
325
+ };
326
+ bootstrap4: {
327
+ reportingGrid: {
328
+ form: string;
329
+ };
330
+ };
331
+ semantic: {
332
+ reportingGrid: {
333
+ form: string;
334
+ };
335
+ };
336
+ };
337
+ library: string;
338
+ };
339
+ export default _default;
@@ -43,3 +43,4 @@ export declare function getReportTypeInfo(data: any, instance: any): {
43
43
  grouping: boolean;
44
44
  typeChanged: boolean;
45
45
  };
46
+ export declare function validateUniqueColumnKey(currentKeyValue: any, rowIndex: any, rows: any[], server: any): true | "The calculated column key must be unique.";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@formio/reporting",
3
- "version": "2.2.6",
3
+ "version": "2.3.0",
4
4
  "description": "Reporting components for form.io",
5
5
  "main": "reporting.js",
6
6
  "types": "lib/index.d.ts",
@@ -66,11 +66,11 @@
66
66
  "webpack-cli": "^4.9.2",
67
67
  "webpack-node-externals": "^3.0.0",
68
68
  "webpack-obfuscator": "^3.5.1",
69
- "@formio/js": "^5.3.6",
70
- "@formio/license": "^2.0.2"
69
+ "@formio/js": "^5.4.0",
70
+ "@formio/license": "^2.1.0"
71
71
  },
72
72
  "peerDependencies": {
73
- "@formio/js": "^5.3.6"
73
+ "@formio/js": "^5.4.0"
74
74
  },
75
75
  "dependencies": {
76
76
  "file-saver": "^2.0.5",
@@ -78,11 +78,10 @@
78
78
  },
79
79
  "scripts": {
80
80
  "watch": "tsc -w",
81
- "precommit": "gulp report-config-template",
82
81
  "build:style": "sass ./src/sass/reporting.scss ./dist/reporting.css",
83
82
  "build:dist": "rm -rf lib && rm -rf dist && gulp licenseCheck && tsc && gulp templates && webpack --config=config/webpack.dist.js && npm run build:style",
84
- "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",
85
- "build:portal": "rm -rf lib && rm -rf dist && rm -f build/reporting.css && gulp licenseCheck:noCheck && tsc && gulp templates && webpack --config=config/webpack.portal.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 modifyPackage && 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",
86
85
  "build:vm": "rm -rf lib && rm -f dist/reporting.vm.js && gulp licenseCheck:noCheck && tsc && gulp templates && webpack --config=config/webpack.vm.js",
87
86
  "build": "npm run build:portal && npm run build:vm",
88
87
  "lint": "tslint -p .",