@formio/reporting 1.0.2 → 1.0.3-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.
@@ -6,7 +6,7 @@ interface IAggregationOperator {
6
6
  }
7
7
  export default class AggregationOperator implements IAggregationOperator {
8
8
  static get operatorKey(): string;
9
- static getDisplayField(settings: any): {
9
+ static getDisplayField(settings: any, reportingConfig?: any): {
10
10
  type: string;
11
11
  };
12
12
  static get acceptedValueTypes(): any[];
@@ -2,7 +2,7 @@ import AggregationOperator from './AggregationOperator';
2
2
  export default class Avg extends AggregationOperator {
3
3
  static get operatorKey(): string;
4
4
  static get operatorTitle(): string;
5
- static getDisplayField(settings: any): {
5
+ static getDisplayField(settings: any, reportingConfig?: any): {
6
6
  type: string;
7
7
  };
8
8
  static get acceptedValueTypes(): any[];
@@ -1,7 +1,7 @@
1
1
  import AggregationOperator from './AggregationOperator';
2
2
  export default class Count extends AggregationOperator {
3
3
  static get operatorKey(): string;
4
- static getDisplayField(settings: any): {
4
+ static getDisplayField(settings: any, reportingConfig?: any): {
5
5
  type: string;
6
6
  };
7
7
  static get operatorTitle(): string;
@@ -1,7 +1,7 @@
1
1
  import AggregationOperator from './AggregationOperator';
2
2
  export default class DateDiff extends AggregationOperator {
3
3
  static get operatorKey(): string;
4
- static getDisplayField(settings: any): {
4
+ static getDisplayField(settings: any, reportingConfig?: any): {
5
5
  type: string;
6
6
  };
7
7
  static get operatorTitle(): string;
@@ -1,7 +1,7 @@
1
1
  import AggregationOperator from './AggregationOperator';
2
2
  export default class DayOfMonth extends AggregationOperator {
3
3
  static get operatorKey(): string;
4
- static getDisplayField(settings: any): {
4
+ static getDisplayField(settings: any, reportingConfig?: any): {
5
5
  type: string;
6
6
  };
7
7
  static get operatorTitle(): string;
@@ -1,7 +1,7 @@
1
1
  import AggregationOperator from './AggregationOperator';
2
2
  export default class DayOfWeek extends AggregationOperator {
3
3
  static get operatorKey(): string;
4
- static getDisplayField(settings: any): {
4
+ static getDisplayField(settings: any, reportingConfig?: any): {
5
5
  type: string;
6
6
  };
7
7
  static get operatorTitle(): string;
@@ -1,7 +1,7 @@
1
1
  import AggregationOperator from './AggregationOperator';
2
2
  export default class DayOfYear extends AggregationOperator {
3
3
  static get operatorKey(): string;
4
- static getDisplayField(settings: any): {
4
+ static getDisplayField(settings: any, reportingConfig?: any): {
5
5
  type: string;
6
6
  };
7
7
  static get operatorTitle(): string;
@@ -1,7 +1,7 @@
1
1
  import AggregationOperator from './AggregationOperator';
2
2
  export default class Divide extends AggregationOperator {
3
3
  static get operatorKey(): string;
4
- static getDisplayField(settings: any): {
4
+ static getDisplayField(settings: any, reportingConfig?: any): {
5
5
  type: string;
6
6
  };
7
7
  static get operatorTitle(): string;
@@ -1,7 +1,7 @@
1
1
  import AggregationOperator from './AggregationOperator';
2
2
  export default class Max extends AggregationOperator {
3
3
  static get operatorKey(): string;
4
- static getDisplayField(settings: any): {
4
+ static getDisplayField(settings: any, reportingConfig?: any): {
5
5
  type: string;
6
6
  };
7
7
  static get operatorTitle(): string;
@@ -1,7 +1,7 @@
1
1
  import AggregationOperator from './AggregationOperator';
2
2
  export default class Min extends AggregationOperator {
3
3
  static get operatorKey(): string;
4
- static getDisplayField(settings: any): {
4
+ static getDisplayField(settings: any, reportingConfig?: any): {
5
5
  type: string;
6
6
  };
7
7
  static get operatorTitle(): string;
@@ -1,7 +1,7 @@
1
1
  import AggregationOperator from './AggregationOperator';
2
2
  export default class Month extends AggregationOperator {
3
3
  static get operatorKey(): string;
4
- static getDisplayField(settings: any): {
4
+ static getDisplayField(settings: any, reportingConfig?: any): {
5
5
  type: string;
6
6
  };
7
7
  static get operatorTitle(): string;
@@ -1,7 +1,7 @@
1
1
  import AggregationOperator from './AggregationOperator';
2
2
  export default class Multiply extends AggregationOperator {
3
3
  static get operatorKey(): string;
4
- static getDisplayField(settings: any): {
4
+ static getDisplayField(settings: any, reportingConfig?: any): {
5
5
  type: string;
6
6
  };
7
7
  static get operatorTitle(): string;
@@ -0,0 +1,15 @@
1
+ import AggregationOperator from './AggregationOperator';
2
+ export default class Percentage extends AggregationOperator {
3
+ static get operatorKey(): string;
4
+ static getDisplayField(settings: any): {
5
+ type: string;
6
+ };
7
+ static get operatorTitle(): string;
8
+ static get aggregatedGroupOperator(): boolean;
9
+ static get acceptedValueTypes(): any[];
10
+ static get aggregatedCalculationOperator(): boolean;
11
+ static get calculationArgs(): string[];
12
+ getRequest(settings: any): {
13
+ $multiply: (string | number)[];
14
+ };
15
+ }
@@ -1,7 +1,7 @@
1
1
  import AggregationOperator from './AggregationOperator';
2
2
  export default class Size extends AggregationOperator {
3
3
  static get operatorKey(): string;
4
- static getDisplayField(settings: any): {
4
+ static getDisplayField(settings: any, reportingConfig?: any): {
5
5
  type: string;
6
6
  };
7
7
  static get operatorTitle(): string;
@@ -0,0 +1,16 @@
1
+ import AggregationOperator from './AggregationOperator';
2
+ export default class Subtract extends AggregationOperator {
3
+ static get operatorKey(): string;
4
+ static getDisplayField(settings: any): {
5
+ type: string;
6
+ };
7
+ static get operatorTitle(): string;
8
+ static get aggregatedGroupOperator(): boolean;
9
+ static get acceptedValueTypes(): any[];
10
+ static get aggregatedCalculationOperator(): boolean;
11
+ static getFieldArgs(settings: any): any;
12
+ static get calculationArgs(): string[];
13
+ getRequest(settings: any): {
14
+ $subtract: string[];
15
+ };
16
+ }
@@ -1,7 +1,7 @@
1
1
  import AggregationOperator from './AggregationOperator';
2
2
  export default class Sum extends AggregationOperator {
3
3
  static get operatorKey(): string;
4
- static getDisplayField(settings: any): {
4
+ static getDisplayField(settings: any, reportingConfig?: any): {
5
5
  type: string;
6
6
  };
7
7
  static get operatorTitle(): string;
@@ -1,7 +1,7 @@
1
1
  import AggregationOperator from './AggregationOperator';
2
2
  export default class Week extends AggregationOperator {
3
3
  static get operatorKey(): string;
4
- static getDisplayField(settings: any): {
4
+ static getDisplayField(settings: any, reportingConfig?: any): {
5
5
  type: string;
6
6
  };
7
7
  static get operatorTitle(): string;
@@ -1,7 +1,7 @@
1
1
  import AggregationOperator from './AggregationOperator';
2
2
  export default class Year extends AggregationOperator {
3
3
  static get operatorKey(): string;
4
- static getDisplayField(settings: any): {
4
+ static getDisplayField(settings: any, reportingConfig?: any): {
5
5
  type: string;
6
6
  };
7
7
  static get operatorTitle(): string;
@@ -14,7 +14,8 @@ import Week from './Week';
14
14
  import DayOfMonth from './DayOfMonth';
15
15
  import DayOfWeek from './DayOfWeek';
16
16
  import DayOfYear from './DayOfYear';
17
+ import Subtract from './Subtract';
17
18
  declare const AggregationOperators: {
18
- [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;
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;
19
20
  };
20
21
  export default AggregationOperators;
@@ -32,6 +32,7 @@ export declare function addCalculatedColumnsOptions({ calculatedColumns, options
32
32
  options: any;
33
33
  operator?: any;
34
34
  }): void;
35
+ export declare function getCalculationArgsOptions(reportingForms: any, calculatedColumns: any[], operator: any, calculatedValueIndex: any): any;
35
36
  export declare function getReportingFormsComponentsAndExtraComponentsAsOptions({ reportingForms, calculatedColumns, selectedItems, operator, }: {
36
37
  reportingForms?: any[];
37
38
  calculatedColumns?: any[];
@@ -276,11 +276,11 @@ declare const ReportingUtils: {
276
276
  gridKey: string;
277
277
  };
278
278
  convertReportingFormCompIntoGridComp(comp: any, columnSettings: any): any;
279
- convertReportingCalcSettingsIntoGridComp(columnSettings: any): any;
279
+ convertReportingCalcSettingsIntoGridComp(columnSettings: any, reportingConfig?: any): any;
280
280
  getPropertyFromFormId(formId: any): string;
281
281
  getDataPath(setting: any): string;
282
282
  getJoinedFormDataPathInJoinedObj(formId: any): string;
283
- getAggrOperatorNumberField(settings: any): {
283
+ getAggrOperatorNumberField(settings: any, reportingConfig?: any): {
284
284
  type: string;
285
285
  };
286
286
  _: any;
@@ -1,7 +1,7 @@
1
1
  export declare const _: any;
2
2
  export declare const valueTypes: any;
3
3
  export declare function convertReportingFormCompIntoGridComp(comp: any, columnSettings: any): any;
4
- export declare function convertReportingCalcSettingsIntoGridComp(columnSettings: any): any;
4
+ export declare function convertReportingCalcSettingsIntoGridComp(columnSettings: any, reportingConfig?: any): any;
5
5
  export declare function getPropertyFromFormId(formId: any): string;
6
6
  export declare function getDataPath(setting: any): string;
7
7
  export declare function getJoinedFormDataPathInJoinedObj(formId: any): string;
@@ -11,6 +11,6 @@ export declare const defaultColumns: {
11
11
  component: any;
12
12
  submissionRootPath: boolean;
13
13
  }[];
14
- export declare function getAggrOperatorNumberField(settings: any): {
14
+ export declare function getAggrOperatorNumberField(settings: any, reportingConfig?: any): {
15
15
  type: string;
16
16
  };
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"@formio/reporting","version":"1.0.2","description":"Reporting components for form.io","main":"reporting.js","module":"node","scripts":{"watch":"tsc -w","build:style":"node-sass ./src/sass/reporting.scss ./dist/reporting.css","build:dist":"rm -rf lib && rm -rf dist && gulp licenseCheck && tsc && gulp templates && webpack --config=config/webpack.prod.js && gulp modifyPackage && yarn build:style","build:dev":"rm -rf lib && rm -rf dist && gulp licenseCheck && tsc && gulp templates && webpack --config=config/webpack.dev.js && gulp changeEntry && yarn build:style","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","build:vm":"rm -rf lib && rm -f build/reporting.vm.js && gulp licenseCheck:noCheck && tsc && gulp templates && webpack --config=config/webpack.vm.js","build":"yarn build:portal && yarn build:vm && yarn build:dist","lint":"tslint -p .","release":"yarn build && yarn publish ./dist --access public"},"pre-commit":["lint"],"files":["*"],"repository":{"type":"git","url":"git+https://github.com/formio/reporting"},"keywords":["Form.io","components"],"license":"UNLICENSED","bugs":{"url":"https://github.com/formio/reporting/issues"},"reportConfigVersion":1,"homepage":"https://github.com/formio/reporting#readme","devDependencies":{"@formio/license":"^1.4.2","@types/file-saver":"^2.0.5","@types/mocha":"^10.0.1","@types/node":"^20.1.5","chai":"^4.3.7","copy-webpack-plugin":"^9.0.1","ejsify":"^1.0.0","esm":"^3.2.25","formiojs":"^4.18.0-rc.1","gulp":"^4.0.2","gulp-insert":"^0.5.0","gulp-rename":"^2.0.0","gulp-template":"^5.0.0","javascript-obfuscator":"^4.0.2","jsdom":"^17.0.0","jsdom-global":"^3.0.2","mocha":"^10.2.0","node-sass":"^7.0.3","nyc":"^15.1.0","pre-commit":"^1.2.2","ts-node":"^10.9.1","ts-sinon":"^2.0.2","tslint":"^6.1.2","typescript":"5.1.6","webpack":"^5.88.1","webpack-cli":"^4.9.2","request":"^2.88.2","webpack-node-externals":"^3.0.0","webpack-obfuscator":"^3.5.1"},"peerDependencies":{"formiojs":"^4.18.0-rc.1"},"dependencies":{"file-saver":"^2.0.5","jose":"^4.14.4","uuid":"^9.0.0"}}
1
+ {"name":"@formio/reporting","version":"1.0.3-rc.1","description":"Reporting components for form.io","main":"reporting.js","module":"node","scripts":{"watch":"tsc -w","build:style":"node-sass ./src/sass/reporting.scss ./dist/reporting.css","build:dist":"rm -rf lib && rm -rf dist && gulp licenseCheck && tsc && gulp templates && webpack --config=config/webpack.prod.js && gulp modifyPackage && yarn build:style","build:dev":"rm -rf lib && rm -rf dist && gulp licenseCheck && tsc && gulp templates && webpack --config=config/webpack.dev.js && gulp changeEntry && yarn build:style","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","build:vm":"rm -rf lib && rm -f build/reporting.vm.js && gulp licenseCheck:noCheck && tsc && gulp templates && webpack --config=config/webpack.vm.js","build":"yarn build:portal && yarn build:vm && yarn build:dist","lint":"tslint -p .","release":"yarn build && yarn publish ./dist --access public"},"pre-commit":["lint"],"files":["*"],"repository":{"type":"git","url":"git+https://github.com/formio/reporting"},"keywords":["Form.io","components"],"license":"UNLICENSED","bugs":{"url":"https://github.com/formio/reporting/issues"},"reportConfigVersion":5,"homepage":"https://github.com/formio/reporting#readme","devDependencies":{"@formio/license":"^1.4.2","@types/file-saver":"^2.0.5","@types/mocha":"^10.0.1","@types/node":"^20.1.5","chai":"^4.3.7","copy-webpack-plugin":"^9.0.1","ejsify":"^1.0.0","esm":"^3.2.25","formiojs":"^4.18.0-rc.1","gulp":"^4.0.2","gulp-insert":"^0.5.0","gulp-rename":"^2.0.0","gulp-template":"^5.0.0","javascript-obfuscator":"^4.0.2","jsdom":"^17.0.0","jsdom-global":"^3.0.2","mocha":"^10.2.0","node-sass":"^7.0.3","nyc":"^15.1.0","pre-commit":"^1.2.2","ts-node":"^10.9.1","ts-sinon":"^2.0.2","tslint":"^6.1.2","typescript":"5.1.6","webpack":"^5.88.1","webpack-cli":"^4.9.2","request":"^2.88.2","webpack-node-externals":"^3.0.0","webpack-obfuscator":"^3.5.1"},"peerDependencies":{"formiojs":"^4.18.0-rc.1"},"dependencies":{"file-saver":"^2.0.5","jose":"^4.14.4","uuid":"^9.0.0"}}