@formio/reporting 2.0.0-rc.9 → 2.0.1-rc.1

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.
@@ -9,21 +9,21 @@ export default class ReportingControls extends ReportingControls_base {
9
9
  clearFilters: string;
10
10
  performAction: string;
11
11
  };
12
- get singleFilterOperators(): any;
12
+ get singleFilterOperators(): string[];
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(): any;
26
+ getGridFilters(): {} | Exclude<this["formioGrid.options.fetchProvider.defaultFilters"], undefined>;
27
27
  downloadPDF(action: any): Promise<void>;
28
28
  exportCSV(action: any): void;
29
29
  onApplyColumns(): void;
@@ -1,3 +1,5 @@
1
+ /// <reference types="lodash" />
2
+ import { Utils } from '@formio/js';
1
3
  import ReportingUrlFetchProvider from '../../providers/ReportingUrlFetchProvider';
2
4
  declare const ReportingGrid_base: any;
3
5
  export default class ReportingGrid extends ReportingGrid_base {
@@ -12,13 +14,13 @@ export default class ReportingGrid extends ReportingGrid_base {
12
14
  get reportingConfig(): any;
13
15
  get reportingForms(): any;
14
16
  get reportingId(): any;
15
- get visibility(): any;
17
+ get visibility(): {};
16
18
  get fetchProvider(): ReportingUrlFetchProvider;
17
19
  get iteratableRows(): any[];
18
20
  addReportingColumnProperties(comp: any, columnSettings: any): void;
19
21
  getCalculatedColumnSchema(columnSettings: any): any;
20
- formatGridComponent(comp: any, columnSettings: any): any;
21
- isDefaultColumn(columnReportingSettings: any): any;
22
+ formatGridComponent(comp: any, columnSettings: any): Utils._.Omit<any, "logic" | "prefix" | "suffix" | "action" | "defaultValue" | "conditional" | "hideLabel" | "calculateValue" | "validate" | "hidden" | "customConditional">;
23
+ isDefaultColumn(columnReportingSettings: any): boolean;
22
24
  addColumnsFromReportingForms(allColumns: any, fieldsGroupedByForm: any): void;
23
25
  checkDeconstructions(fieldSettings: any): void;
24
26
  checkDeconstructionRequirement(formId: any, compPath: any): void;
@@ -41,7 +43,7 @@ export default class ReportingGrid extends ReportingGrid_base {
41
43
  resetValue: () => void;
42
44
  };
43
45
  customFilters(component: any): any;
44
- getGridColumns(): any;
46
+ getGridColumns(): any[];
45
47
  get preview(): any;
46
48
  initFormioGrid(FormioGrid: any): Promise<any>;
47
49
  transformFetchedData(responseData: any): any;
package/lib/index.d.ts CHANGED
@@ -15,7 +15,16 @@ declare const _default: {
15
15
  form: string;
16
16
  };
17
17
  };
18
- semantic: {};
18
+ bootstrap4: {
19
+ reportingGrid: {
20
+ form: string;
21
+ };
22
+ };
23
+ semantic: {
24
+ reportingGrid: {
25
+ form: string;
26
+ };
27
+ };
19
28
  };
20
29
  utils: typeof ReportingConfigUtils;
21
30
  library: string;
@@ -9,6 +9,15 @@ declare const _default: {
9
9
  form: string;
10
10
  };
11
11
  };
12
- semantic: {};
12
+ bootstrap4: {
13
+ reportingGrid: {
14
+ form: string;
15
+ };
16
+ };
17
+ semantic: {
18
+ reportingGrid: {
19
+ form: string;
20
+ };
21
+ };
13
22
  };
14
23
  export default _default;
@@ -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[];
@@ -10,6 +10,6 @@ export default class Multiply extends AggregationOperator {
10
10
  static get aggregatedCalculationOperator(): boolean;
11
11
  static get calculationArgs(): string[];
12
12
  getRequest(settings: any): {
13
- $multiply: any;
13
+ $multiply: string[];
14
14
  };
15
15
  }
@@ -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: any;
13
+ $sum: string[];
14
14
  };
15
15
  getGroupRequest(settings: any): {
16
16
  $sum: string;
@@ -15,7 +15,8 @@ import DayOfMonth from './DayOfMonth';
15
15
  import DayOfWeek from './DayOfWeek';
16
16
  import DayOfYear from './DayOfYear';
17
17
  import Subtract from './Subtract';
18
+ import Percentage from './Percentage';
18
19
  declare const AggregationOperators: {
19
- [x: string]: typeof Year | typeof DateDiff | typeof Divide | typeof Multiply | typeof Sum | typeof Count | typeof Max | typeof Min | typeof Avg | typeof Concat | typeof Size | typeof Month | typeof Week | typeof DayOfMonth | typeof DayOfWeek | typeof DayOfYear | typeof Subtract;
20
+ [x: string]: typeof Year | typeof DateDiff | typeof Divide | typeof Multiply | typeof Sum | typeof Count | typeof Max | typeof Min | typeof Avg | typeof Concat | typeof Size | typeof Month | typeof Week | typeof DayOfMonth | typeof DayOfWeek | typeof DayOfYear | typeof Subtract | typeof Percentage;
20
21
  };
21
22
  export default AggregationOperators;
@@ -1,18 +1,36 @@
1
- export declare function getFilterOperatorOptions(operators?: any[]): 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;
1
+ export declare function getFilterOperatorOptions(operators?: any[]): {
2
+ label: string;
3
+ value: string;
4
+ }[];
5
+ export declare function getFilterOperatorsOptionsForCompType(compType: any): {
6
+ label: string;
7
+ value: string;
8
+ }[];
9
+ export declare function getControlsFilterOperators(columnSettings: any, reportingForms?: any[], calculatedColumnsSettings?: any[]): {
10
+ label: string;
11
+ value: string;
12
+ }[];
13
+ export declare function getUnselectedColumnsOptions(columnsOptions: any, selectedColumns: any): any[];
5
14
  export declare function getReportingFormAsOption(form: any): {
6
15
  label: any;
7
16
  value: any;
8
17
  };
9
- export declare function getConnectionBaseFormOptions(reportingForms: any[], connections: any[], compRowIndex: any): any;
10
- export declare function getConnectionJoiningFormOptions(reportingForms: any[], connections: any[], compRowIndex: any): any;
18
+ export declare function getConnectionBaseFormOptions(reportingForms: any[], connections: any[], compRowIndex: any): {
19
+ label: any;
20
+ value: any;
21
+ }[];
22
+ export declare function getConnectionJoiningFormOptions(reportingForms: any[], connections: any[], compRowIndex: any): {
23
+ label: any;
24
+ value: any;
25
+ }[];
11
26
  export declare function getConnectionFormComponentsAsOptions(formId: any, reportingForms?: any[]): {
12
27
  label: string;
13
28
  value: string;
14
29
  }[];
15
- export declare function getAggregationOperatorsOptions(groupOperators?: boolean): any;
30
+ export declare function getAggregationOperatorsOptions(groupOperators?: boolean): {
31
+ value: string;
32
+ label: string;
33
+ }[];
16
34
  export declare function getReportingFormComponentAsOption(form: any, comp: any, compPath: any): {
17
35
  value: {
18
36
  path: any;
@@ -32,18 +50,21 @@ export declare function addCalculatedColumnsOptions({ calculatedColumns, options
32
50
  options: any;
33
51
  operator?: any;
34
52
  }): void;
35
- export declare function getCalculationArgsOptions(reportingForms: any[], calculatedColumns: any[], operator: any, calculatedValueIndex: any): any;
53
+ export declare function getCalculationArgsOptions(reportingForms: any[], calculatedColumns: any[], operator: any, calculatedValueIndex: any): any[];
36
54
  export declare function getReportingFormsComponentsAndExtraComponentsAsOptions({ reportingForms, calculatedColumns, selectedItems, operator, }: {
37
55
  reportingForms?: any[];
38
56
  calculatedColumns?: any[];
39
57
  selectedItems?: any[];
40
58
  operator?: any;
41
- }): any;
59
+ }): any[];
42
60
  export declare function getColumnsListOptions(reportingForms: any[], groupsSettings: any, calculatedColumns: any): any[];
43
- export declare function getAvailableColumnsAsOptions(availableColumns: any, columnsList: any): any;
61
+ export declare function getAvailableColumnsAsOptions(availableColumns: any, columnsList: any): any[];
44
62
  export declare function getCustomScriptAvailableVarialbles(): string;
45
- export declare function getDateDiffUnitOptions(operator: any): any;
46
- export declare function showAggregationOperatorArg(compKey: any, operator: any): any;
63
+ export declare function getDateDiffUnitOptions(operator: any): {
64
+ label: any;
65
+ value: any;
66
+ }[];
67
+ export declare function showAggregationOperatorArg(compKey: any, operator: any): boolean;
47
68
  export declare function showGroupOperatorArg(operator: any): boolean;
48
69
  export declare function getReportTypeInfo(data: any, instance: any): {
49
70
  grouping: boolean;
@@ -57,7 +57,7 @@ export declare function getColumnsTab(): {
57
57
  data?: undefined;
58
58
  })[];
59
59
  };
60
- export declare function getSingleFilterOperators(): any;
60
+ export declare function getSingleFilterOperators(): string[];
61
61
  export declare function getSingleFilterOperatorValueComp(filter: any): {
62
62
  widget: string;
63
63
  data: {
@@ -143,7 +143,10 @@ export declare function getActionsTab(actions: any): {
143
143
  label: string;
144
144
  widget: string;
145
145
  data: {
146
- values: any;
146
+ values: {
147
+ label: any;
148
+ value: string;
149
+ }[];
147
150
  };
148
151
  dataType: string;
149
152
  key: string;
@@ -1,3 +1,16 @@
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" />
1
14
  declare const ReportingUtils: {
2
15
  FilterOperators: {
3
16
  [x: string]: typeof import("@formio/js/lib/cjs/utils/conditionOperators/IsEqualTo").default | typeof import("@formio/js/lib/cjs/utils/conditionOperators/DateGreaterThan").default;
@@ -68,7 +81,7 @@ declare const ReportingUtils: {
68
81
  data?: undefined;
69
82
  })[];
70
83
  };
71
- getSingleFilterOperators(): any;
84
+ getSingleFilterOperators(): string[];
72
85
  getSingleFilterOperatorValueComp(filter: any): {
73
86
  widget: string;
74
87
  data: {
@@ -154,7 +167,10 @@ declare const ReportingUtils: {
154
167
  label: string;
155
168
  widget: string;
156
169
  data: {
157
- values: any;
170
+ values: {
171
+ label: any;
172
+ value: string;
173
+ }[];
158
174
  };
159
175
  dataType: string;
160
176
  key: string;
@@ -277,7 +293,7 @@ declare const ReportingUtils: {
277
293
  reportingGridConfig: {
278
294
  gridKey: string;
279
295
  };
280
- convertReportingFormCompIntoGridComp(comp: any, columnSettings: any): any;
296
+ convertReportingFormCompIntoGridComp(comp: any, columnSettings: any): import("lodash").Omit<any, "logic" | "prefix" | "suffix" | "action" | "defaultValue" | "conditional" | "hideLabel" | "calculateValue" | "validate" | "hidden" | "customConditional">;
281
297
  getCalcOperatorFieldArgs(columnSettings: any): any;
282
298
  convertReportingCalcSettingsIntoGridComp(columnSettings: any, reportingConfig?: any): any;
283
299
  getPropertyFromFormId(formId: any): string;
@@ -286,7 +302,7 @@ declare const ReportingUtils: {
286
302
  getAggrOperatorNumberField(settings: any, reportingConfig?: any): {
287
303
  type: string;
288
304
  };
289
- _: any;
305
+ _: import("lodash").LoDashStatic;
290
306
  valueTypes: any;
291
307
  connectionByFullSubmissionObjectOptionValue: "submissionObject*";
292
308
  defaultColumns: {
@@ -1,6 +1,20 @@
1
- export declare const _: any;
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;
2
16
  export declare const valueTypes: any;
3
- export declare function convertReportingFormCompIntoGridComp(comp: any, columnSettings: any): any;
17
+ export declare function convertReportingFormCompIntoGridComp(comp: any, columnSettings: any): Utils._.Omit<any, "logic" | "prefix" | "suffix" | "action" | "defaultValue" | "conditional" | "hideLabel" | "calculateValue" | "validate" | "hidden" | "customConditional">;
4
18
  export declare function getCalcOperatorFieldArgs(columnSettings: any): any;
5
19
  export declare function convertReportingCalcSettingsIntoGridComp(columnSettings: any, reportingConfig?: any): any;
6
20
  export declare function getPropertyFromFormId(formId: any): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@formio/reporting",
3
- "version": "2.0.0-rc.9",
3
+ "version": "2.0.1-rc.1",
4
4
  "description": "Reporting components for form.io",
5
5
  "main": "reporting.js",
6
6
  "scripts": {
@@ -12,7 +12,7 @@
12
12
  "build:vm": "rm -rf lib && rm -f build/reporting.vm.js && gulp licenseCheck:noCheck && tsc && gulp templates && webpack --config=config/webpack.vm.js",
13
13
  "build": "yarn build:portal && yarn build:vm && yarn build:dist",
14
14
  "lint": "tslint -p .",
15
- "release": "yarn build && yarn publish ./dist --access public"
15
+ "release": "yarn build && npm publish ./dist --access public"
16
16
  },
17
17
  "pre-commit": [
18
18
  "lint"
@@ -35,8 +35,8 @@
35
35
  "reportConfigVersion": 5,
36
36
  "homepage": "https://github.com/formio/reporting#readme",
37
37
  "devDependencies": {
38
- "@formio/js": "^5.0.0-rc.47",
39
- "@formio/license": "^2.0.0-rc.2",
38
+ "@formio/js": "^5.0.0",
39
+ "@formio/license": "^2.0.0-rc.9",
40
40
  "@types/file-saver": "^2.0.5",
41
41
  "@types/mocha": "^10.0.1",
42
42
  "@types/node": "^20.1.5",
@@ -45,6 +45,7 @@
45
45
  "ejsify": "^1.0.0",
46
46
  "esm": "^3.2.25",
47
47
  "gulp": "^4.0.2",
48
+ "gulp-cli": "^3.0.0",
48
49
  "gulp-insert": "^0.5.0",
49
50
  "gulp-rename": "^2.0.0",
50
51
  "gulp-template": "^5.0.0",
@@ -66,7 +67,8 @@
66
67
  "webpack-obfuscator": "^3.5.1"
67
68
  },
68
69
  "peerDependencies": {
69
- "@formio/js": "^5.0.0-rc.47"
70
+ "@formio/js": "^5.0.0",
71
+ "lodash": "^4.17.21"
70
72
  },
71
73
  "dependencies": {
72
74
  "file-saver": "^2.0.5"