@formio/reporting 2.0.1-rc.7 → 2.0.1-rc.9

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